ronantakizawa commited on
Commit
6f11f07
·
verified ·
1 Parent(s): 9335a0f

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +54 -14
README.md CHANGED
@@ -16,9 +16,7 @@ size_categories:
16
 
17
  # GitHub Top Developer Source Code
18
 
19
- A curated dataset of **1.3M+ source code files** from **GitHub's ranked developers (2015-2025)**.
20
-
21
- This dataset is filtered to code written by developers who repeatedly appeared on GitHub's trending page (Based on this dataset: https://huggingface.co/datasets/ronantakizawa/github-top-developers)
22
 
23
  ## Dataset Summary
24
 
@@ -28,13 +26,6 @@ This dataset is filtered to code written by developers who repeatedly appeared o
28
  - **Permissive licenses only** (MIT, Apache-2.0, BSD, ISC, etc.)
29
  - **Rich metadata** per file: repo stars, description, primary language, developer company affiliation
30
 
31
- ## Use Cases
32
-
33
- - Code generation fine-tuning — Train or fine-tune LLMs on high-quality source code written by recognized developers, providing a higher signal-to-noise ratio than bulk GitHub scrapes
34
- - Cross-language code analysis — Study patterns across 80+ programming languages from the same pool of elite developers to compare idioms, styles, and conventions
35
- - Open source contribution patterns — Analyze how prolific open source contributors structure their most popular projects
36
-
37
-
38
  ## Schema
39
 
40
  Each row represents a single source file:
@@ -54,20 +45,69 @@ Each row represents a single source file:
54
 
55
  **Note on language columns:** `file_language` is determined per-file from the file extension (e.g. a `.py` file is always `Python`). `repo_primary_language` is GitHub's auto-detected primary language for the entire repository. These may differ — for example, a C header file (`.h` → `C/C++ Header`) in a repo that GitHub classifies as `Python`.
56
 
 
 
 
 
 
 
 
 
 
 
57
  ## Usage
58
 
59
  ```python
60
  from datasets import load_dataset
61
 
62
- ds = load_dataset("ronantakizawa/github-top-code", split="train")
 
 
63
 
64
  # Filter by language
65
- python_files = ds.filter(lambda x: x["file_language"] == "Python")
66
 
67
  # Filter by stars
68
- popular = ds.filter(lambda x: x["repo_stars"] > 1000)
69
 
70
  # Get files from a specific developer
71
- dev_files = ds.filter(lambda x: x["developer_username"] == "torvalds")
72
  ```
73
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
 
17
  # GitHub Top Developer Source Code
18
 
19
+ A curated dataset of source code from **GitHub's top trending developers (2015-2025)**. Unlike bulk code scrapes, this dataset is filtered to code written by developers who repeatedly appeared on GitHub's trending page, linking each file to rich developer and repository metadata.
 
 
20
 
21
  ## Dataset Summary
22
 
 
26
  - **Permissive licenses only** (MIT, Apache-2.0, BSD, ISC, etc.)
27
  - **Rich metadata** per file: repo stars, description, primary language, developer company affiliation
28
 
 
 
 
 
 
 
 
29
  ## Schema
30
 
31
  Each row represents a single source file:
 
45
 
46
  **Note on language columns:** `file_language` is determined per-file from the file extension (e.g. a `.py` file is always `Python`). `repo_primary_language` is GitHub's auto-detected primary language for the entire repository. These may differ — for example, a C header file (`.h` → `C/C++ Header`) in a repo that GitHub classifies as `Python`.
47
 
48
+ ## Splits
49
+
50
+ | Split | Description |
51
+ |-------|-------------|
52
+ | `train` | ~90% of repos — for training |
53
+ | `test` | ~5% of repos — for evaluation |
54
+ | `validation` | ~5% of repos — for hyperparameter tuning |
55
+
56
+ Splits are assigned **by repository** (deterministic hash), so no repo appears in multiple splits. This prevents data leakage from files in the same project.
57
+
58
  ## Usage
59
 
60
  ```python
61
  from datasets import load_dataset
62
 
63
+ # Load a specific split
64
+ train = load_dataset("ronantakizawa/github-top-code", split="train")
65
+ test = load_dataset("ronantakizawa/github-top-code", split="test")
66
 
67
  # Filter by language
68
+ python_files = train.filter(lambda x: x["file_language"] == "Python")
69
 
70
  # Filter by stars
71
+ popular = train.filter(lambda x: x["repo_stars"] > 1000)
72
 
73
  # Get files from a specific developer
74
+ dev_files = train.filter(lambda x: x["developer_username"] == "torvalds")
75
  ```
76
 
77
+ ## What Makes This Dataset Unique
78
+
79
+ | Feature | This Dataset | The Stack | codeparrot/github-code |
80
+ |---------|-------------|-----------|----------------------|
81
+ | Curated by developer reputation | Yes | No | No |
82
+ | Developer metadata (company) | Yes | No | No |
83
+ | Stars per repo | Yes | Yes | No |
84
+ | Permissive licenses only | Yes | Yes | Mixed |
85
+
86
+ Existing code datasets are massive bulk scrapes of all public GitHub repos. This dataset is intentionally curated: every file comes from a developer who was recognized on GitHub's trending page, providing a higher signal-to-noise ratio for studying elite developer practices or fine-tuning code models.
87
+
88
+ ## Collection Methodology
89
+
90
+ 1. **Developer sourcing**: 4,763 unique developers extracted from [ronantakizawa/github-top-developers](https://huggingface.co/datasets/ronantakizawa/github-top-developers), which tracks GitHub trending page appearances from 2015-2025 via Wayback Machine snapshots.
91
+ 2. **Repository discovery**: For each developer, their top 10 repositories by stars were selected using the GitHub API, filtered to repos they own (not forks or contributions).
92
+ 3. **License filtering**: Only repositories with permissive licenses (MIT, Apache-2.0, BSD, ISC, Unlicense, etc.) were included.
93
+ 4. **Code extraction**: Repository tarballs were downloaded and source files extracted, skipping binary files, vendored directories (`node_modules`, `vendor`, etc.), generated files, and files exceeding 1MB.
94
+ 5. **Source code filtering**: Only source code files are included (80+ language extensions). Configuration files (JSON, YAML, TOML, XML, INI), documentation (Markdown, TXT, RST), and template files are excluded.
95
+ 6. **Metadata enrichment**: Each file is linked to repository metadata (stars, language, description) and developer metadata (username, name, company).
96
+
97
+ ## Filtering Applied
98
+
99
+ - **Repos**: Owner-created only (no forks), permissive license, non-empty
100
+ - **Directories skipped**: `node_modules`, `vendor`, `third_party`, `dist`, `build`, `__pycache__`, `.git`, `venv`, and 30+ more
101
+ - **Files skipped**: Binary files, files >1MB, non-UTF-8 files, config/doc files (JSON, YAML, TOML, XML, Markdown, etc.)
102
+ - **Top 10 repos per developer** by star count
103
+
104
+ ## Limitations
105
+
106
+ - Star counts and commit counts reflect the time of collection, not real-time values
107
+ - Some developers may have deleted or renamed their accounts since trending
108
+ - Commit counts are for the default branch only
109
+ - The dataset reflects trending developers specifically, which may over-represent certain languages or project types popular on GitHub
110
+
111
+ ## Source
112
+
113
+ Built from [ronantakizawa/github-top-developers](https://huggingface.co/datasets/ronantakizawa/github-top-developers) using the GitHub REST API.