CoolFace
Datasetpublic

theothertom/codeparrot-python-only

🐍 CodeParrot Python Only This dataset contains Python-only source code extracted from the larger CodeParrot corpus. It includes high-quality .py files filtered from public GitHub repositories and curated for use in training large language models (LLMs) on Python code generation tasks. πŸ“¦ Dataset Summary βœ… Filtered to include only Python code 🧹 Cleaned to remove non-source content (e.g., binaries, notebooks, scripts with mixed languages) 🧠 Ideal for training or… See the full description on the dataset page: https://huggingface.co/datasets/theothertom/codeparrot-python-only.

sourceHugging Faceupdated 1y agoView on Hugging Face
1likes554downloads
Dataset Card

🐍 CodeParrot Python Only

This dataset contains Python-only source code extracted from the larger CodeParrot corpus. It includes high-quality .py files filtered from public GitHub repositories and curated for use in training large language models (LLMs) on Python code generation tasks.

πŸ“¦ Dataset Summary

  • β€”βœ… Filtered to include only Python code
  • β€”πŸ§Ή Cleaned to remove non-source content (e.g., binaries, notebooks, scripts with mixed languages)
  • β€”πŸ§  Ideal for training or evaluating code generation models
  • β€”πŸ§Ύ Each entry is a code snippet or full Python file stored as raw text

πŸ’‘ Use Cases

This dataset is best suited for:

  • β€”Training/fine-tuning LLMs for:
  • β€”Python code generation
  • β€”Auto-completion
  • β€”Bug detection
  • β€”Code summarization
  • β€”Evaluating code-specific capabilities of general LLMs
  • β€”Research in code intelligence, representation learning, and software engineering

πŸ“ Example Format

Each record is a single code block:

json
{
  "code": "def hello_world():\n    print('Hello, world!')"
}

πŸš€ How to Use

from datasets import load_dataset

ds = load_dataset("theothertom/codeparrot-python-only")
print(ds["train"][0]["code"])