repo_name stringclasses 25
values | repo_full_name stringclasses 25
values | owner stringclasses 25
values | stars int64 117k 496k | license stringclasses 7
values | repo_description stringclasses 25
values | filepath stringlengths 9 75 | file_type stringclasses 3
values | language stringclasses 2
values | content stringlengths 24 383k | size_bytes int64 25 387k | num_lines int64 2 4.44k |
|---|---|---|---|---|---|---|---|---|---|---|---|
build-your-own-x | codecrafters-io/build-your-own-x | codecrafters-io | 496,460 | null | Master programming by recreating your favorite technologies from scratch. | README.md | readme | Markdown | [](https://codecrafters.io/github-banner)
## Build your own <insert-technology-here>
This repository is a compilation of well-written, step-by-step guides for re-creating our favorite technologies from scratch.
> *What I cannot create, I do not ... | 47,009 | 505 |
public-apis | public-apis/public-apis | public-apis | 426,584 | MIT | A collective list of free APIs | README.md | readme | Markdown | "# Try Public APIs for free\nThe Public APIs repository is manually curated by community members lik(...TRUNCATED) | 197,082 | 1,896 |
public-apis | public-apis/public-apis | public-apis | 426,584 | MIT | A collective list of free APIs | scripts\README.md | readme | Markdown | "# Public APIs Scripts\n\nThis directory contains all validation and testing scripts used by Public (...TRUNCATED) | 1,952 | 76 |
public-apis | public-apis/public-apis | public-apis | 426,584 | MIT | A collective list of free APIs | scripts\tests\__init__.py | test | Python | # -*- coding: utf-8 -*-
| 25 | 2 |
public-apis | public-apis/public-apis | public-apis | 426,584 | MIT | A collective list of free APIs | scripts\tests\test_validate_format.py | test | Python | "# -*- coding: utf-8 -*-\n\nimport unittest\n\nfrom validate.format import error_message\nfrom valid(...TRUNCATED) | 18,620 | 467 |
public-apis | public-apis/public-apis | public-apis | 426,584 | MIT | A collective list of free APIs | scripts\tests\test_validate_links.py | test | Python | "# -*- coding: utf-8 -*-\n\nimport unittest\n\nfrom validate.links import find_links_in_text\nfrom v(...TRUNCATED) | 5,897 | 173 |
public-apis | public-apis/public-apis | public-apis | 426,584 | MIT | A collective list of free APIs | scripts\validate\__init__.py | python | Python | # -*- coding: utf-8 -*-
from validate import format
from validate import links
| 84 | 5 |
public-apis | public-apis/public-apis | public-apis | 426,584 | MIT | A collective list of free APIs | scripts\validate\format.py | python | Python | "# -*- coding: utf-8 -*-\n\nimport re\nimport sys\nfrom string import punctuation\nfrom typing impor(...TRUNCATED) | 8,741 | 278 |
public-apis | public-apis/public-apis | public-apis | 426,584 | MIT | A collective list of free APIs | scripts\validate\links.py | python | Python | "# -*- coding: utf-8 -*-\n\nimport re\nimport sys\nimport random\nfrom typing import List, Tuple\n\n(...TRUNCATED) | 8,305 | 274 |
awesome | sindresorhus/awesome | sindresorhus | 459,144 | CC0-1.0 | 😎 Awesome lists about all kinds of interesting topics | media\readme.md | readme | Markdown | "# Media\n\n## Logo\n\n- Primary color: `#fc60a8`\n- Secondary color: `#494368`\n- Font: [`Orbitron`(...TRUNCATED) | 218 | 10 |
End of preview. Expand in Data Studio
license: mit task_categories: - text-generation - text-classification - question-answering language: - en tags: - code size_categories: - 10K<n<100K
PyHub: Vetted Python Code from Popular GitHub Repositories
A large-scale dataset of Python source code, test files, and documentation scraped from high-quality GitHub repositories. Designed for training code understanding and generation models, particularly for software engineering benchmarks like SWE-bench.
Dataset Statistics
- Total files: 1963
- Repositories: 25 (minimum 50 stars)
- File types: Python source, test files, READMEs
- Time period: Repositories created before January 1, 2020
- Size limit: Maximum 100 MB per repository
- License: MIT
Dataset Structure
Each row in dataset.csv represents a single file with the following columns:
| Column | Description |
|---|---|
repo_name |
Repository name (e.g., "requests") |
repo_full_name |
Full repository name (e.g., "psf/requests") |
owner |
Repository owner (e.g., "psf") |
stars |
Star count |
license |
SPDX license identifier |
repo_description |
Repository description |
filepath |
Relative path within repository |
file_type |
"python", "test", or "readme" |
language |
"Python", "Markdown", "reStructuredText", or "" |
content |
Full file text |
size_bytes |
File size in bytes |
num_lines |
Number of lines |
File Types
- Python source (
.py): Production code files - Test files (
*test*.py): Unit tests and test suites - README files (
README.*): Documentation in Markdown, reStructuredText, or plain text
Collection Methodology
The dataset was collected using a custom GitHub scraper with the following process:
- Repository selection: GitHub API search for repositories with x >= 50 stars, created before 2020-01-01, non-fork
- Cloning: Shallow git clone (
--depth 1) with 100 MB size filter to exclude large monorepos - File collection: Recursive walk through cloned repositories, excluding hidden directories (files starting with
.) - File type filtering: Only Python source files (
.py), test files (*test*.py), and README files (README.*) were collected - Content extraction: UTF-8 encoding with error handling for robust text extraction
- Parallel processing: 3 concurrent workers for efficient processing
- CSV generation: All file data consolidated into a single CSV with repository metadata embedded in each row
Quality Filters
- Star threshold: Minimum 50 stars (indicates community vetting)
- Size limit: 100 MB to exclude monorepos and binary-heavy projects
- File type filtering: Only Python, test, and documentation files
- Hidden files excluded: Files/directories starting with
.ignored - Encoding handling: UTF-8 with error fallback
Intended Use Cases
- Code completion: Training autocompletion models on real-world Python patterns
- Bug detection: Learning from production codebases with established testing practices
- Test generation: Understanding test-code relationships from included test files
- Documentation generation: Learning code-documentation correlations from READMEs
- SWE-bench training: Base dataset for software engineering benchmark preparation
- Code understanding: Repository structure and dependency learning
Limitations
- Temporal bias: Pre-2020 code, missing modern Python features (type hints, match statements, structural pattern matching)
- Popularity bias: High-star repos only, may not represent niche or edge-case patterns
- Size limitation: 100 MB cap excludes large enterprise monorepos
- Language bias: Primarily English documentation and comments
- Static only: No execution data, test results, or runtime behavior
Recommended Supplements
For comprehensive model training, consider supplementing with:
- Post-2020 repositories for modern Python patterns
- Smaller repositories for edge-case and niche patterns
- Synthetic examples for specific bug types
- Negative examples (buggy code) for robustness
License
This dataset is licensed under the MIT License. See the LICENSE file for details.
Note: This dataset was created using a custom GitHub scraper tool.
- Downloads last month
- 42