{"id":19890423,"url":"https://github.com/urish/nn-function-generator","last_synced_at":"2025-09-08T03:45:34.695Z","repository":{"id":51732244,"uuid":"165137999","full_name":"urish/nn-function-generator","owner":"urish","description":"Experimenting with automatic generation of TS function bodies using ANN models","archived":false,"fork":false,"pushed_at":"2021-05-10T11:54:59.000Z","size":184,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-05-02T18:53:09.393Z","etag":null,"topics":["bigquery","tensorflow","tsquery","typescript"],"latest_commit_sha":null,"homepage":"https://nn-functions-playground-myeqrox3aa-uc.a.run.app/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/urish.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-01-10T22:07:32.000Z","updated_at":"2022-12-07T20:07:31.000Z","dependencies_parsed_at":"2022-08-22T11:01:25.385Z","dependency_job_id":null,"html_url":"https://github.com/urish/nn-function-generator","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/urish/nn-function-generator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/urish%2Fnn-function-generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/urish%2Fnn-function-generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/urish%2Fnn-function-generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/urish%2Fnn-function-generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/urish","download_url":"https://codeload.github.com/urish/nn-function-generator/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/urish%2Fnn-function-generator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274130192,"owners_count":25227270,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-08T02:00:09.813Z","response_time":121,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bigquery","tensorflow","tsquery","typescript"],"created_at":"2024-11-12T18:14:18.903Z","updated_at":"2025-09-08T03:45:34.629Z","avatar_url":"https://github.com/urish.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nn-function-generator\n\nExperimenting with automatic generation of TS function bodies using ANN models\n\n## Setup\n\n1. Download `typescript-all-functions.json.gz` and put it inside the `data` directory\n2. Run `yarn dataset` to prepare the dataset for training\n3. Run `cd model \u0026\u0026 python train.py` to train the model\n\n## Running the playground\n\n1. Run `cd model \u0026\u0026 python test-server.py --run run_001`\n2. Run `yarn start`\n3. Go to `http://localhost:3003/` and have fun!\n\nAlternatively, you can use docker and generate an image for the playground app using the\nprovided [Dockerfile](Dockerfile):\n\n```bash\ndocker build -t nn-function-gen .\ndocker -it -v /path/to/dataset:/app/data -v /path/to/model/runs:/app/runs -p 3003:3003 run nn-function-gen \n```\n\nRemember to replace `/path/to/dataset` and `/path/to/model/runs` with the appropriate paths for your machine. The image is configured to load the model from the first run (`run_001`) by default.\n\nAfter starting the container, you can go to [http://localhost:3003](http://localhost:3003/) to launch the playground.\n\n## Training on Google Cloud TPU\n\n```\nctpu up -preemptible -machine-type n1-highmem-16\t\nvirtualenv ngvikings\nsource ngvikings/bin/activate\ncd model\npip install -r requirements.txt\npython train.py --tpu\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Furish%2Fnn-function-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Furish%2Fnn-function-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Furish%2Fnn-function-generator/lists"}