{"id":50734830,"url":"https://github.com/justindal/leetcode-python-dataset","last_synced_at":"2026-06-10T12:31:56.882Z","repository":{"id":345610687,"uuid":"1184762039","full_name":"justindal/leetcode-python-dataset","owner":"justindal","description":"Code for building and publishing the justindal/leetcode-python-dataset dataset on Hugging Face","archived":false,"fork":false,"pushed_at":"2026-04-12T20:14:22.000Z","size":119,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-12T22:17:05.999Z","etag":null,"topics":["datasets","huggingface","leetcode","llm","ml"],"latest_commit_sha":null,"homepage":"https://huggingface.co/datasets/justindal/leetcode-python-dataset","language":"Python","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/justindal.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,"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-03-17T22:59:03.000Z","updated_at":"2026-04-12T20:14:31.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/justindal/leetcode-python-dataset","commit_stats":null,"previous_names":["justindal/leetcode-python-dataset"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/justindal/leetcode-python-dataset","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justindal%2Fleetcode-python-dataset","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justindal%2Fleetcode-python-dataset/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justindal%2Fleetcode-python-dataset/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justindal%2Fleetcode-python-dataset/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/justindal","download_url":"https://codeload.github.com/justindal/leetcode-python-dataset/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justindal%2Fleetcode-python-dataset/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34153482,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-10T02:00:07.152Z","response_time":89,"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":["datasets","huggingface","leetcode","llm","ml"],"created_at":"2026-06-10T12:31:56.332Z","updated_at":"2026-06-10T12:31:56.877Z","avatar_url":"https://github.com/justindal.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"---\npretty_name: LeetCode Python Dataset\nlicense: apache-2.0\nlanguage:\n  - en\ntask_categories:\n  - text-generation\ntask_ids:\n  - text2text-generation\nsize_categories:\n  - 1K\u003cn\u003c10K\ntags:\n  - code\n  - python\n  - leetcode\nconfigs:\n  - config_name: default\n    default: true\n    data_files:\n      - split: train\n        path: train.jsonl\n      - split: valid\n        path: valid.jsonl\n      - split: test\n        path: test.jsonl\n  - config_name: benchmark\n    data_files:\n      - split: benchmark\n        path: benchmark.jsonl\n---\n\n# leetcode-python-dataset\n\nCode for building and publishing the [`justindal/leetcode-python-dataset`](https://huggingface.co/datasets/justindal/leetcode-python-dataset) dataset on Hugging Face.\n\nMerges two open-source LeetCode datasets into a unified schema with consistent formatting, field normalisation, and solution validation.\n\n## Dataset\n\n| Split | Rows | Source |\n|---|---|---|\n| train | 2856 | newfacade + greengerong |\n| valid | 310 | slug-group split from train |\n| test | 228 | newfacade only |\n\n\n## Schema\n\n### `default` config (training)\n\nEach row is a single-turn chat conversation in the standard `messages` format:\n\n| Column | Type | Description |\n|---|---|---|\n| `messages` | list[dict] | Chat messages: system prompt, user problem, assistant solution |\n\nEach message dict has keys `role` (`\"system\"`, `\"user\"`, or `\"assistant\"`) and `content` (string).\n\n### `benchmark` config\n\nRows keep the full structured problem fields and include a split label:\n\n| Column | Type | Description |\n|---|---|---|\n| `slug` | string | Problem slug / task id |\n| `difficulty` | string | Problem difficulty |\n| `tags` | list[string] | Topic tags |\n| `problem` | string | Problem statement |\n| `starter_code` | string | Prompt starter code |\n| `solution` | string | Reference Python solution |\n| `tests` | string or object | Source-provided tests metadata |\n| `source` | string | Upstream source dataset |\n| `type` | string | Original split: `train`, `valid`, or `test` |\n\n## Sources\n\n- [`newfacade/LeetCodeDataset`](https://huggingface.co/datasets/newfacade/LeetCodeDataset) (Apache 2.0)\n- [`greengerong/leetcode`](https://huggingface.co/datasets/greengerong/leetcode) (MIT)\n\n## Usage\n\nuv:\n\n```bash\ngit clone https://github.com/justindal/leetcode-python-dataset\ncd leetcode-python-dataset\nuv sync\n```\n\nRun the build:\n\n```bash\nuv run leetcode-dataset\n```\n\nOptional flags:\n- `--verify` to filter the dataset against source tests\n- `--verify-test` to also verify the test split\n- `--publish --message \"...\"` for a non-interactive publish run\n\nVerification is optional and can change the final row counts.\n\npip:\n\n```bash\ngit clone https://github.com/justindal/leetcode-python-dataset\ncd leetcode-python-dataset\npython -m venv .venv \u0026\u0026 source .venv/bin/activate\npip install -e .\n```\n\nBuild the dataset locally:\n\n```bash\nleetcode-dataset\n\n# or\npython3 main.py\n```\n\nThe same optional flags are available here as well.\n\n## Citation\n\nnewfacade/LeetCodeDataset:\n\n```bibtex\n@misc{xia2025leetcodedatasettemporaldatasetrobust,\n\ttitle={LeetCodeDataset: A Temporal Dataset for Robust Evaluation and Efficient Training of Code LLMs},\n\tauthor={Yunhui Xia and Wei Shen and Yan Wang and Jason Klein Liu and Huifeng Sun and Siyue Wu and Jian Hu and Xiaolong Xu},\n\tyear={2025},\n\teprint={2504.14655},\n\tarchivePrefix={arXiv},\n\tprimaryClass={cs.LG},\n\turl={https://arxiv.org/abs/2504.14655},\n}\n```\n\n## License\n\nApache 2.0","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjustindal%2Fleetcode-python-dataset","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjustindal%2Fleetcode-python-dataset","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjustindal%2Fleetcode-python-dataset/lists"}