datasets
Training and evaluation data, with the modality, task and licence stated up front. Listed live from the Hugging Face Hub.
python-codes-25k
License
MIT
This is a Cleaned Python Dataset Covering 25,000 Instructional Tasks
Overview
The dataset has 4 key features (fields): instruction, input, output, and text.It's a rich source for Python codes, tasks, and extends into behavioral aspects.
Dataset Statistics
Total Entries: 24,813
Unique Instructions: 24,580
Unique Inputs: 3,666
Unique Outputs: 24,581
Unique Texts: 24,813
Average Tokens per example: 508
Features… See the full description on the dataset page: https://huggingface.co/datasets/flytech/python-codes-25k.Python-Code-LargePython-Code-Large
Python-Code-Large is a large-scale corpus of Python source code comprising more than 2 million rows of Python code. The dataset is designed to support research in large language model (LLM) pretraining, code intelligence, software engineering automation, and program analysis for the Python ecosystem.
By providing a high-volume, language-specific corpus, Python-Code-Large enables systematic experimentation in Python-focused model training, domain adaptation, and downstream… See the full description on the dataset page: https://huggingface.co/datasets/Lovett01/Python-Code-Large.Python-Code-LargePython-Code-Large
Python-Code-Large is a large-scale corpus of Python source code comprising more than 2 million rows of Python code. The dataset is designed to support research in large language model (LLM) pretraining, code intelligence, software engineering automation, and program analysis for the Python ecosystem.
By providing a high-volume, language-specific corpus, Python-Code-Large enables systematic experimentation in Python-focused model training, domain adaptation, and downstream… See the full description on the dataset page: https://huggingface.co/datasets/ajibawa-2023/Python-Code-Large.Competitive-Programming-python-blend
Dataset Card for Competitive-Programming-python-blend
Summary
Competitive-Programming-python-blend is a mixed supervised fine-tuning dataset centered on competitive programming, code reasoning, and instruction-style problem solving. The blend is Python-first, but it also keeps a small amount of C++, agentless SWE, and reasoning-oriented chat supervision to broaden training coverage.
The current release is published as a single HF-friendly JSONL file, clean.jsonl.… See the full description on the dataset page: https://huggingface.co/datasets/Jackrong/Competitive-Programming-python-blend.python-code-instructions-85k
Python Code Instructions - 85K
Instruction-tuning dataset of Python functions paired with short natural-language instructions derived from repository docstrings.
What changed in this release
This release keeps the original public rows and format, but makes the dataset easier to use responsibly:
exact duplicate rows were removed again using normalized instruction + output hashing
deterministic train, validation, and test splits were added
the dataset card now documents… See the full description on the dataset page: https://huggingface.co/datasets/NickIBrody/python-code-instructions-85k.Stable-Code-Python-SFT
Stable Code Python SFT
The Stable Code Python SFT dataset is a high-quality synthetic dataset derived from the
stabilityai/stable-code-instruct-3b model for the purpose of supervised fine-tuning (SFT). Please refer to the
Versioning section for dataset versions.
Note: If you would like to contribute to this repository,
please read the CONTRIBUTING first.
TableofContents
Features
File Structure
Metadata
Usage
Versioning
License
TeamContact
Reference
Citation… See the full description on the dataset page: https://huggingface.co/datasets/bunyaminergen/Stable-Code-Python-SFT.leetcode-python-dataset
leetcode-python-dataset
Code for building and publishing the justindal/leetcode-python-dataset dataset on Hugging Face.
Merges two open-source LeetCode datasets into a unified schema with consistent formatting, field normalisation, and solution validation.
Dataset
Split
Rows
Source
train
2856
newfacade + greengerong
valid
310
slug-group split from train
test
228
newfacade only
Schema
default config (training)
Each row is a… See the full description on the dataset page: https://huggingface.co/datasets/justindal/leetcode-python-dataset.python-unit-test-training-pool
Python unit test training pool
A pool of public data for training a model to write tests for Python code. It is a
straight collection of open datasets, not a new corpus: every row comes from one of the
sources below, at the revision named, and the only rows removed are the ones an overlap
filter flagged against held-out material this pool is kept separate from.
Every row of the normalised layer pairs a program with tests for it. That is the point of
the pool, and it is why the… See the full description on the dataset page: https://huggingface.co/datasets/Emulated-Inc/python-unit-test-training-pool.python_enhancement_proposals
Python Enhancement Proposals
Description
Python Enhancement Proposals, or PEPs, are design documents that generally provide a technical specification and rationale for new features of the Python programming language.
There are been 661 PEPs published.
The majority of PEPs are published in the Public Domain, but 5 were published under the “Open Publication License” and omitted from this dataset.
PEPs are long, highly-polished, and technical in nature and often include… See the full description on the dataset page: https://huggingface.co/datasets/common-pile/python_enhancement_proposals.python_code_docstring_ast_corpus
Overview
This dataset contains 34,000+ rows of code-docstring-ast data along with additional metadata. Data was gathered from various Python libraries and frameworks and their
publicly available GitHub repos. This dataset was created for the purpose of training the CodeT5+ transformer on AST-enhanced code-to-doc tasks.
Sources
The dataset was gathered from various GitHub repos sampled from this repo by Vinta.
The 26 repos are:
matplotlib
pytorch
cryptography
django… See the full description on the dataset page: https://huggingface.co/datasets/Mir-2002/python_code_docstring_ast_corpus.ReForm-Python2Dafny-Dataset
Re:Form Datasets
This repository contains the datasets associated with the paper "Re:Form -- Reducing Human Priors in Scalable Formal Software Verification with RL in LLMs: A Preliminary Study on Dafny".
The paper introduces a framework that leverages Reinforcement Learning (RL) within Large Language Models (LLMs) to reduce reliance on human-annotated priors for formal software verification. The datasets provided are integral for training and evaluating models in formal language… See the full description on the dataset page: https://huggingface.co/datasets/Veri-Code/ReForm-Python2Dafny-Dataset.llama-python-codes-30k
Python Codes - 30k examples, Llama1&2 tokenized dataset
Author
FlyTech
For general guide on how to create, quantize, merge or inference the model and more, visit:
hackmd.io/my_first_ai
Overview
This dataset serves as a rich resource for various Natural Language Processing tasks such as:
Question Answering
Text Generation
Text-to-Text Generation
It primarily focuses on instructional tasks in Python, tokenized specifically for the Llama architecture.… See the full description on the dataset page: https://huggingface.co/datasets/flytech/llama-python-codes-30k.python_documentation_codeDataset created using https://github.com/jeffmeloy/py2dataset using the Python code from the following:
https://github.com/ansible/ansible
https://github.com/apache/airflow
https://github.com/arogozhnikov/einops
https://github.com/arviz-devs/arviz
https://github.com/astropy/astropy
https://github.com/biopython/biopython
https://github.com/bjodah/chempy
https://github.com/bokeh/bokehhttps://github.com/CalebBell/thermo
https://github.com/camDavidsonPilon/lifelines
https://github.com/coin-or/pulp… See the full description on the dataset page: https://huggingface.co/datasets/jeffmeloy/python_documentation_code.Python_Refactor_Dataset
🧩 Python Refactor Dataset (45k)
Behavior-Preserving Refactoring Examples for Instruction-Tuning Code Models
This dataset contains 45,000 synthetic Python code refactoring examples designed for
instruction-tuning models such as IBM Granite 4.0 (micro/h-tiny) and Meta CodeLlama-7B-Python.
Each example demonstrates a behavior-preserving refactor — improving code readability,
maintainability, and style (PEP8, type hints, context managers, modularization, etc.)
without… See the full description on the dataset page: https://huggingface.co/datasets/KavinduHansaka/Python_Refactor_Dataset.python-functions-training-pool
Python function-writing training pool
A pool of public data for training a model to write Python functions. It is a straight
collection of open datasets, not a new corpus: every row comes from one of the sources
below, at the revision named, and the only rows removed are the ones an overlap filter
flagged against held-out material this pool is kept separate from.
Rows in the normalised layer: 5756045.
Rows in the raw layer: 6258415.
The two layers
pool/ holds the… See the full description on the dataset page: https://huggingface.co/datasets/Emulated-Inc/python-functions-training-pool.29K_Python_Docstring_Pairs
29K High-Quality Python Docstring Pairs
Author: Michael Hernandez (XxCotHGxX)License: CC BY 4.0Cleaned from: XxCotHGxX/242K_Python_Docstring_Pairs
Overview
A curated, high-quality subset of Python function–docstring pairs for use in code documentation generation, docstring completion, and code understanding tasks.
The original 242K dataset was scraped from open-source Python repositories but contained a significant proportion of functions without docstrings (84% of… See the full description on the dataset page: https://huggingface.co/datasets/XxCotHGxX/29K_Python_Docstring_Pairs.Python_GOD_Coder_Omniforge_AI_12k
Python GOD Coder Omniforge AI 12k
Creator: Within Us AI
A 12,000-row mixed-format Python coding dataset designed as a sharpening corpus for building a small but dangerous Python specialist.
This dataset is intentionally focused on the practical behaviors that matter for a modern Python coding model:
implementation with tests
strict code-only instruction following
debugging and repair
refactoring for readability and production readiness
next-token code completion… See the full description on the dataset page: https://huggingface.co/datasets/WithinUsAI/Python_GOD_Coder_Omniforge_AI_12k.kodcode-verified-python-235k
KodCode-Verified Python — 234,555 execution-verified Python SFT rows
One row per problem. Every assistant turn is code that passed its own unit tests when
actually run — real pytest against KodCode-V1's
tests, in a pinned interpreter, in a sandboxed subprocess. No LLM judge, no heuristic
filter, no model-generated answers.
Unlike the v3 release this supersedes, the corpus is deduplicated, decontaminated against
HumanEval/MBPP, and stripped of rows whose tests cannot constrain… See the full description on the dataset page: https://huggingface.co/datasets/F-A-I-L/kodcode-verified-python-235k.python_debugging
Python Debugging
A synthetic instruction-tuning dataset for training AI models to identify and fix bugs in Python code.
Dataset Summary
Field
Value
Entries
75
Format
input / output pairs
Language
English
Topic
Finding and fixing bugs in Python code
Synthetic
Yes, generated with DeepSeek
License
MIT
Dataset Description
Each entry presents a snippet of Python code containing a deliberate bug, along with a corrected version… See the full description on the dataset page: https://huggingface.co/datasets/creeperdatasets/python_debugging.python-mental-execution-traces
Python Mental Execution Traces
A 12,000-row prompt/completion dataset for evaluating and training language models to mentally execute self-contained Python 3 snippets without running them. Completions provide the expected standard output together with a concise variable trace or explanation.
Dataset structure
The JSONL file contains two text fields:
prompt: a Python mental-execution problem.
completion: the expected stdout and concise reasoning or variable trace.… See the full description on the dataset page: https://huggingface.co/datasets/ILoveBuns/python-mental-execution-traces.python-sft-dataset
python-sft-dataset
A curated, deduplicated Python instruction-following dataset built for supervised
fine-tuning of PocketCoder, a 95.87M-parameter decoder-only code language model.
280,317 examples, ~99.1M tokens.
Paper: PocketCoder: What Distillation, SFT, and DPO Each Buy You at 100M Parameters
Model: Ananda100/PocketCoder
Pretraining corpus: Ananda100/python-clean-codeparrot
Code: github.com/AnandaRimal/PocketCoder
Composition
Built as a two-layer mix: a… See the full description on the dataset page: https://huggingface.co/datasets/Ananda100/python-sft-dataset.Cornstack-Python-V1-Filtered
Cornstack Python v1 Filtered
The Cornstack Python v1 Filtered dataset is derived from
the nomic-ai/cornstack-python-v1 dataset by limiting
queries to a maximum of 17 words and restricting the total number of rows to 423259. This dataset is suitable for
Python programming education and question-answering applications.
Note: If you would like to contribute to this repository,
please read the CONTRIBUTING first.
TableofContents
Features
File Structure
Metadata
Usage… See the full description on the dataset page: https://huggingface.co/datasets/bunyaminergen/Cornstack-Python-V1-Filtered.python-codes-25k
License
MIT
This is a Cleaned Python Dataset Covering 25,000 Instructional Tasks
Overview
The dataset has 4 key features (fields): instruction, input, output, and text.It's a rich source for Python codes, tasks, and extends into behavioral aspects.
Dataset Statistics
Total Entries: 24,813
Unique Instructions: 24,580
Unique Inputs: 3,666
Unique Outputs: 24,581
Unique Texts: 24,813
Average Tokens per example: 508
Features… See the full description on the dataset page: https://huggingface.co/datasets/xphillyx/python-codes-25k.dfm11-mathagentic-tinygsm-python
dfm11-mathagentic-tinygsm-python
English arithmetic word problems converted into native Python tool-call trajectories with precomputed tool responses and boxed final answers.
Contents
Rows: 367,749
Shards: 4
Format: deterministic gzip JSON Lines in data/train-*.jsonl.gz
Schema: tools, four-message native tool trajectory, execution metadata,
stable source ID, source revision, and admission status
Intended repository:… See the full description on the dataset page: https://huggingface.co/datasets/schneiderkamplab/dfm11-mathagentic-tinygsm-python.library-python-training-pool
Python library function-writing training pool
A pool of public data for training a model to write Python functions, many of them
calling libraries: 8.3 percent of the answers in the normalised layer import a library that
is not in the Python standard library. It is a straight collection of open datasets, not
a new corpus: every row comes from one of the sources below, at the revision named. Rows
an overlap filter flagged against held-out material this pool is kept separate from… See the full description on the dataset page: https://huggingface.co/datasets/Emulated-Inc/library-python-training-pool.chatgpt-python311-implementation-77
ChatGPT Python 3.11 Implementation 77
A 77-record synthetic Python 3.11 implementation dataset generated with ChatGPT.
The exact generator model variant was not preserved. Creator recollection favors ChatGPT LunaMax, but ChatGPT Terra Max remains possible, so the dataset does not attribute generation to a single exact model.
Dataset Size
Metric
Count
Final records
77
Unique records
77
Python prompts
77
Python 3.11 prompts
77
Fresh GPT-5.6 Sol… See the full description on the dataset page: https://huggingface.co/datasets/TaskPuppyAI/chatgpt-python311-implementation-77.Python-codes
Dataset Card for Dataset Name
Please note that this dataset maynot be perfect and may contain a very small quantity of non python codes. But the quantity appears to be very small
Dataset Summary
The dataset contains a collection of python question and their code. This is meant to be used for training models to be efficient in Python specific coding.
The dataset has two features - 'question' and 'code'.
An example is:
{'question': 'Create a function that takes in a string… See the full description on the dataset page: https://huggingface.co/datasets/Arjun-G-Ravi/Python-codes.python-instruct-turkish
AhiskaAI Python Instruct Turkish Dataset
AhiskaAI Python Instruct Turkish is a large-scale, high-quality instruction-following dataset containing 10,823 unique Python programming tasks, code solutions, and line-by-line logical explanations in Turkish.
This dataset is specifically tailored to enhance the Python code-generation, bug-fixing, and algorithmic reasoning capabilities of Small Language Models (SLMs) in the Turkish language ecosystem.
📊 Dataset Details… See the full description on the dataset page: https://huggingface.co/datasets/AhiskaAI/python-instruct-turkish.python-codes-25k
License
MIT
This is a Cleaned Python Dataset Covering 25,000 Instructional Tasks
Overview
The dataset has 4 key features (fields): instruction, input, output, and text.It's a rich source for Python codes, tasks, and extends into behavioral aspects.
Dataset Statistics
Total Entries: 24,813
Unique Instructions: 24,580
Unique Inputs: 3,666
Unique Outputs: 24,581
Unique Texts: 24,813
Average Tokens per example: 508
Features… See the full description on the dataset page: https://huggingface.co/datasets/nitish26/python-codes-25k.python-runtime-verified-error-correction
Python Runtime-Verified Error Correction Dataset 🐍⚡
Overview
Production-grade synthetic dataset of Python code errors with runtime-verified corrections. Each sample contains broken code, the actual runtime error, and a guaranteed-working fix validated through execution.
Unlike traditional synthetic datasets, every correction is verified by actually running the code in an isolated environment—eliminating hallucinations and ensuring real-world applicability.… See the full description on the dataset page: https://huggingface.co/datasets/SyntheticLogic-Labs/python-runtime-verified-error-correction.
