CodeParrot Clean — Deduplicated Python Code
Source, license and coverage
Supplier documentation. These claims are separate from the automated sample score. A listing edit date is not a data freshness date.
- License
- Not documented — confirm reuse terms with the seller
- Source / creator
- codeparrot/codeparrot-clean
- Collection method
- The CodeParrot team queried public GitHub for Python files, then applied the following cleaning pipeline: (1) exact-match deduplication on file content hash; (2) filter to files with average line length < 100 and max line length < 1000; (3) require alphanumeric character fraction > 0.25; (4) drop files matching keywords associated with auto-generated code. The result is a cleaner, lower-redundancy corpus than the raw scrape, oriented toward training code generation models.
- Coverage start
- Not documented
- Coverage end
- Not documented
- Data last updated
- Not documented
- Update schedule
- Not documented
- Snapshot is from 2022; does not reflect recent Python ecosystem changes (e.g., newer libraries, typing patterns, recent frameworks). - Per-file license metadata is best-effort from repo-level detection; downstream users must respect individual file licenses for derivative works. - Filtering heuristics (alphanumeric fraction, auto-generated keyword list) are imperfect — some boilerplate and generated code remain. - Python only; not suitable for multi-language code modeling without augmentation. - Likely overlap with common code benchmarks (HumanEval, MBPP) — leakage risk if used to train models evaluated on those suites.
Sample structure score: 100 / 100
This automated check describes the inspected sample, not factual accuracy, legal rights, representativeness, or the quality of the entire dataset. It is not a customer rating.
Assessed 10 sample records (JSON) on 2026-10-09. All records in the provided sample were checked.
| Check | Points | Evidence |
|---|---|---|
| Populated cells | 50 / 50 | 110 of 110 top-level cells contain a value. Null, absent and blank values count as missing; zero and false count as populated. |
| Consistent value types | 30 / 30 | 110 of 110 populated cells match their column's most common observed type. Types are inferred, not checked against real-world truth. |
| Consistent record shape | 20 / 20 | 10 of 10 records have the expected fields. CSV/TSV use the header width; JSON uses the union of observed keys. |
Field-level findings and improvements
Check missing cells and mixed types below. Document intentional missing values or mixed types in your field descriptions. Do not fill legitimate unknowns with invented values just to increase this score.
| Field | Missing cells | Most common type | Other populated types |
|---|---|---|---|
| repo_name | 0 / 10 | string | 0 / 10 |
| path | 0 / 10 | string | 0 / 10 |
| copies | 0 / 10 | number | 0 / 10 |
| size | 0 / 10 | number | 0 / 10 |
| content | 0 / 10 | string | 0 / 10 |
| license | 0 / 10 | string | 0 / 10 |
| hash | 0 / 10 | number | 0 / 10 |
| line_mean | 0 / 10 | number | 0 / 10 |
| line_max | 0 / 10 | number | 0 / 10 |
| alpha_frac | 0 / 10 | number | 0 / 10 |
| autogenerated | 0 / 10 | boolean | 0 / 10 |
About this data
Cleaned and deduplicated Python source code from GitHub, filtered for line length, alphanumeric fraction, and auto-generated content. Commonly used for code language model pretraining and fine-tuning.
Retrieve with your agent or Python
Create an account and configure DATABAZAAR_API_KEY. This example retrieves free or already purchased data; it never makes a purchase. For a multi-file dataset, choose a file index from the manifest.
Download the Python examplepython3 retrieve-dataset.py 4b6d4631-e372-4ac9-80ce-30489f8d8e00 --output dataset.bin
Full supplier documentation
Schema
| Name | Type | Description |
|---|---|---|
| repo_name | VARCHAR | GitHub repository identifier in owner/repo format |
| path | VARCHAR | File path within the repository |
| copies | VARCHAR | Number of near-duplicate copies detected before deduplication |
| size | VARCHAR | File size in bytes |
| content | VARCHAR | Raw Python source code |
| license | VARCHAR | Detected license of the source repository |
| hash | BIGINT | Content hash used for deduplication |
| line_mean | DOUBLE | Average line length in characters |
| line_max | BIGINT | Maximum line length in characters |
| alpha_frac | DOUBLE | Fraction of alphanumeric characters in the file (0.0–1.0) |
| autogenerated | BOOLEAN | Boolean flag indicating heuristic detection of autogenerated code |
Sample Data
Preview a sample of the data before downloading.
Public sample only. Sign in to retrieve the full dataset, including free datasets.
For AI Agents
# 1. Add to your agent's MCP config (claude_desktop_config.json or similar):
{
"mcpServers": {
"databazaar": { "command": "npx", "args": ["databazaar-mcp"] }
}
}
# 2. Your agent can then call:
search_datasets({ query: "CodeParrot Clean — Deduplicate" })
// Found: 4b6d4631-e372-4ac9-80ce-30489f8d8e00
get_download_url({ dataset_id: "4b6d4631-e372-4ac9-80ce-30489f8d8e00" }) // free — sign in with MCP OAuth first# Free dataset — sign in or use your account API key: curl https://api.databazaar.io/datasets/4b6d4631-e372-4ac9-80ce-30489f8d8e00/download-url -H "Authorization: Bearer $DATABAZAAR_API_KEY"