ronantakizawa commited on
Commit
dd1c5ea
·
verified ·
1 Parent(s): ece7aed

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +106 -0
README.md ADDED
@@ -0,0 +1,106 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ task_categories:
4
+ - text-generation
5
+ language:
6
+ - code
7
+ tags:
8
+ - code
9
+ - github
10
+ - source-code
11
+ - trending-developers
12
+ - software-engineering
13
+ size_categories:
14
+ - 1M<n<10M
15
+ ---
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
+
23
+ - **1.3M+ source code files** from ~13,500 repositories across ~4,700 unique developers
24
+ - **All programming languages** included (Python, JavaScript, TypeScript, Rust, Go, C/C++, Java, and 80+ more)
25
+ - **Permissive licenses only** (MIT, Apache-2.0, BSD, ISC, etc.)
26
+ - **Rich metadata** per file: repo stars, commit count, developer trending rank, company affiliation
27
+
28
+ ## Schema
29
+
30
+ Each row represents a single source file:
31
+
32
+ | Column | Type | Description |
33
+ |--------|------|-------------|
34
+ | `file_path` | string | Path within the repo (e.g. `src/main.py`) |
35
+ | `file_language` | string | Detected programming language |
36
+ | `file_size` | int64 | File size in bytes |
37
+ | `content` | string | Raw source code (UTF-8) |
38
+ | `repo_name` | string | Full repository name (`owner/repo`) |
39
+ | `repo_stars` | int64 | GitHub star count at time of collection |
40
+ | `repo_commit_count` | int64 | Total commits on default branch |
41
+ | `repo_license` | string | SPDX license identifier |
42
+ | `repo_description` | string | Repository description |
43
+ | `repo_primary_language` | string | GitHub-detected primary language |
44
+ | `repo_topics` | list[string] | Repository topics/tags |
45
+ | `developer_username` | string | GitHub username |
46
+ | `developer_name` | string | Developer display name |
47
+ | `developer_company` | string | Company affiliation |
48
+ | `developer_times_trended` | int64 | Number of times on GitHub trending page |
49
+ | `developer_best_rank` | int64 | Best trending rank achieved |
50
+ | `developer_avg_rank` | float64 | Average trending rank |
51
+ | `developer_median_rank` | float64 | Median trending rank |
52
+
53
+ ## Usage
54
+
55
+ ```python
56
+ from datasets import load_dataset
57
+
58
+ ds = load_dataset("ronantakizawa/github-top-code", split="train")
59
+
60
+ # Filter by language
61
+ python_files = ds.filter(lambda x: x["file_language"] == "Python")
62
+
63
+ # Filter by stars
64
+ popular = ds.filter(lambda x: x["repo_stars"] > 1000)
65
+
66
+ # Get files from a specific developer
67
+ dev_files = ds.filter(lambda x: x["developer_username"] == "torvalds")
68
+ ```
69
+
70
+ ## What Makes This Dataset Unique
71
+
72
+ | Feature | This Dataset | The Stack | codeparrot/github-code |
73
+ |---------|-------------|-----------|----------------------|
74
+ | Curated by developer reputation | Yes | No | No |
75
+ | Developer metadata (trending rank, company) | Yes | No | No |
76
+ | Stars per repo | Yes | Yes | No |
77
+ | Commit count | Yes | No | No |
78
+ | Permissive licenses only | Yes | Yes | Mixed |
79
+
80
+ 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.
81
+
82
+ ## Collection Methodology
83
+
84
+ 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.
85
+ 2. **Repository discovery**: For each developer, their top 5 repositories by stars were selected using the GitHub API, filtered to repos they own (not forks or contributions).
86
+ 3. **License filtering**: Only repositories with permissive licenses (MIT, Apache-2.0, BSD, ISC, Unlicense, etc.) were included.
87
+ 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.
88
+ 5. **Metadata enrichment**: Each file is linked to repository metadata (stars, language, topics) and developer metadata (trending history, company).
89
+
90
+ ## Filtering Applied
91
+
92
+ - **Repos**: Owner-created only (no forks), permissive license, non-empty
93
+ - **Directories skipped**: `node_modules`, `vendor`, `third_party`, `dist`, `build`, `__pycache__`, `.git`, `venv`, and 30+ more
94
+ - **Files skipped**: Binary files, files >1MB, non-UTF-8 files
95
+ - **Top 5 repos per developer** by star count
96
+
97
+ ## Limitations
98
+
99
+ - Star counts and commit counts reflect the time of collection, not real-time values
100
+ - Some developers may have deleted or renamed their accounts since trending
101
+ - Commit counts are for the default branch only
102
+ - The dataset reflects trending developers specifically, which may over-represent certain languages or project types popular on GitHub
103
+
104
+ ## Source
105
+
106
+ Built from [ronantakizawa/github-top-developers](https://huggingface.co/datasets/ronantakizawa/github-top-developers) using the GitHub REST API.