{"id":48805760,"url":"https://github.com/zients/tw-lottery-recommandation","last_synced_at":"2026-05-03T07:10:57.885Z","repository":{"id":349804466,"uuid":"1203989736","full_name":"zients/tw-lottery-recommandation","owner":"zients","description":"Taiwan lottery draw analyzer \u0026 number recommender with Transformer ML model. Supports 539, 649, 638, 3D, and 4D lotteries.","archived":false,"fork":false,"pushed_at":"2026-05-03T05:25:47.000Z","size":115,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-03T06:34:57.966Z","etag":null,"topics":["cli","data-analysis","lottery","machine-learning","python","pytorch","taiwan","transformer"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zients.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-07T15:27:41.000Z","updated_at":"2026-05-03T05:15:13.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/zients/tw-lottery-recommandation","commit_stats":null,"previous_names":["zients/lottery-539","zients/tw-lottery-recommandation"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/zients/tw-lottery-recommandation","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zients%2Ftw-lottery-recommandation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zients%2Ftw-lottery-recommandation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zients%2Ftw-lottery-recommandation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zients%2Ftw-lottery-recommandation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zients","download_url":"https://codeload.github.com/zients/tw-lottery-recommandation/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zients%2Ftw-lottery-recommandation/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32560992,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T06:36:36.687Z","status":"ssl_error","status_checked_at":"2026-05-03T06:36:09.306Z","response_time":103,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["cli","data-analysis","lottery","machine-learning","python","pytorch","taiwan","transformer"],"created_at":"2026-04-14T05:03:14.128Z","updated_at":"2026-05-03T07:10:57.880Z","avatar_url":"https://github.com/zients.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tw-lottery-recommandation\n\nTaiwan lottery draw analyzer \u0026 number recommender with a Transformer ML model. Supports multiple lottery types.\n\nData source: [Taiwan Lottery official API](https://api.taiwanlottery.com)\n\n## Supported Lotteries\n\n| `--type` | Name | Format |\n|----------|------|--------|\n| `539` | Daily 539 | Pick 5, range 1–39 |\n| `649` | Lotto 649 | Pick 6, range 1–49 |\n| `638` | Super Lotto 638 | Pick 6 (1–38) + bonus ball (1–8) |\n| `3d` | 3D Lottery | 3 digits, 0–9 |\n| `4d` | 4D Lottery | 4 digits, 0–9 |\n\n## Installation\n\n```bash\nuv sync\n```\n\n## Usage\n\n### Update draw data\n\n```bash\nuv run lottery update --type 539                          # continues from latest DB record, or fetches from the beginning\nuv run lottery update --type 649 --from-month 2024-01    # specify a start month\n```\n\n### Statistics\n\n```bash\nuv run lottery stats --type 539\n```\n\nOutput:\n- Top 10 most frequent numbers (all-time)\n- Hot / cold numbers (last 30 draws)\n- Bonus ball frequency Top 5 (638 only)\n\n### Number recommendation\n\n```bash\nuv run lottery recommend --type 638\n```\n\nGenerates 3 recommended combinations based on:\n- Historical frequency (top 20 candidates)\n- Odd/even ratio and sum range filters (539 / 649 / 638)\n- Bonus ball recommendation (638 only)\n- Transformer ML model when a trained checkpoint is available\n\n### Train ML model\n\n```bash\nuv run lottery train --type 539 --epochs 100\n```\n\nTrains a Transformer model and saves the best checkpoint to `ml/checkpoints/`. Once trained, `recommend` will automatically use ML predictions.\n\n### Run tests\n\n```bash\nuv run pytest\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzients%2Ftw-lottery-recommandation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzients%2Ftw-lottery-recommandation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzients%2Ftw-lottery-recommandation/lists"}