Download README.md from Playfulbug/python_dataset: direct link, hf CLI and curl.
- Browser
- Download file 2.41 kB
-
https://huggingface.co/datasets/Playfulbug/python_dataset/resolve/main/README.md
- Command line
-
hf download hf://datasets/Playfulbug/python_dataset/README.md
-
curl -L -o README.md https://huggingface.co/datasets/Playfulbug/python_dataset/resolve/main/README.md
license: apache-2.0
language:
- en
tags:
- code
- python
- pretraining
- programming
- pip
- datasets
- gradio
- keras
- pytorch-lightning
- pytest
- transformers
- ternsorflow
- pytorch
- numpy
- pandas
- matpotlib
- django
size_categories:
- 100K<n<1M
pretty_name: Goodman
Python and Docs Training Dataset
A massive, multi-format code and documentation corpus built from 70+ major open-source Python repositories (including the Pip, Keras, Gradio, Transformers, Datasets, and more).
Dataset Structure
The dataset is processed using exact BPE token chunking (512-token chunks with zero overlap via OpenAI's cl100k_base tokenizer) while preserving original Python indentation, newlines, and <|file|>path document boundaries—eliminating boundary duplication and allowing direct fixed-window pre-training without truncation or padding.
Each record in the JSONL and Parquet shards contains:
id: Unique sequential identifier for the 512-token chunk (e.g.,combine_chunk_0).source: Originating combined corpus file (combine.txt).chunk_index: Zero-based sequential index preserving repository-grouped ordering (Docs -> Code).token_count: Exact BPE token length (512tokens per row;< 512only on the final EOF tail row if retained).content: Raw, indentation-preserved block of Python code, type stubs, or documentation separated by<|file|>pathheaders.
(An accompanying flat binary shard Python_pretrain.bin stores the same continuous token stream as headerless uint32 token IDs for zero-copy np.memmap training.)
Corpus Breakdown
- Combined Repository Corpus (
combine.txt): 22,551,967 lines (~850.3 MB / ~220M+cl100k_basetokens) curated across 74 permissive-license (MIT, Apache-2.0, BSD-3) repositories, with line lengths capped at999characters and test/vendored directories excluded. - Documentation (
.md,.rst): Repository guides, API references, and technical manuals grouped ahead of each library's source tree. - Python Source & Type Stubs (
.py,.pyi): Production library implementations, core modules, and type annotations across foundational Python, data science, web, and ML frameworks (including CPython, PyTorch, TensorFlow, NumPy, SciPy, Pandas, Django, FastAPI/Starlette, and Transformers).
License
Distributed under the Apache-2.0 open-source license.