|
|
--- |
|
|
license: mit |
|
|
modalities: |
|
|
- Text |
|
|
formats: |
|
|
- parquet |
|
|
size: 10M - 100M |
|
|
libraries: |
|
|
- Datasets |
|
|
- Dask |
|
|
- Croissant |
|
|
- Polars |
|
|
--- |
|
|
|
|
|
# π GitHub Code 2025: The Clean Code Manifesto |
|
|
|
|
|
> **A meticulously curated dataset of 1.5M+ repositories representing both quality and innovation in 2025's code ecosystem** |
|
|
|
|
|
## π The Philosophy |
|
|
|
|
|
**Quality Over Quantity, Purpose Over Volume** |
|
|
|
|
|
In an era of data abundance, we present a dataset built on radical curation. Every file, every repository, every byte has been carefully selected to represent the **signal** in the noise of open-source development. |
|
|
|
|
|
## π― What This Dataset Is |
|
|
|
|
|
### π Dual-Perspective Design |
|
|
|
|
|
| Subset | ποΈ Above 2 Stars | π± Below 2 Stars (2025) | |
|
|
|--------|------------------|------------------------| |
|
|
| **Scope** | 1M top repositories | 1M random 2025 repos | |
|
|
| **Purpose** | Proven quality & patterns | Emerging trends & innovation | |
|
|
| **Value** | What works | What's next | |
|
|
|
|
|
### π§Ή The Clean Code Promise |
|
|
|
|
|
```python |
|
|
# What you WON'T find here: |
|
|
π« Binary files # No images, executables, models |
|
|
π« Build artifacts # No node_modules, __pycache__ |
|
|
π« Configuration noise # No .git, IDE files, lock files |
|
|
π« License duplication # No repetitive legal text |
|
|
π« Minified code # No compressed/obfuscated content |
|
|
π« Empty files # No whitespace-only content |
|
|
``` |
|
|
|
|
|
## π Dataset Structure |
|
|
|
|
|
``` |
|
|
github-code-2025/ |
|
|
βββ π above-2-stars/ |
|
|
β βββ train_000.parquet |
|
|
β βββ train_001.parquet |
|
|
β βββ ... |
|
|
βββ π± below-2-star/ |
|
|
βββ train_000.parquet |
|
|
βββ train_001.parquet |
|
|
βββ ... |
|
|
``` |
|
|
|
|
|
### π Schema |
|
|
|
|
|
```python |
|
|
{ |
|
|
"repo_id": "owner/repo_name", # π Repository identifier |
|
|
"file_path": "src/main.py", # ποΈ Relative file path |
|
|
"content": "def clean_code():", # π Actual source code |
|
|
"size": 1024 # π File size in bytes |
|
|
} |
|
|
``` |
|
|
|
|
|
## π οΈ How to Use |
|
|
|
|
|
### π₯ Quick Start |
|
|
|
|
|
```python |
|
|
from datasets import load_dataset |
|
|
|
|
|
# Load the quality benchmark |
|
|
quality_ds = load_dataset("nick007x/github-code-2025", "above-2-stars") |
|
|
|
|
|
# Load emerging trends |
|
|
emerging_ds = load_dataset("nick007x/github-code-2025", "below-2-star") |
|
|
|
|
|
# Mix for balanced training |
|
|
balanced_ds = interleave_datasets([quality_ds, emerging_ds]) |
|
|
``` |
|
|
|
|
|
### π― Ideal Use Cases |
|
|
|
|
|
- **π§ AI Training**: Clean, diverse code for language models |
|
|
- **π Code Analysis**: Compare popular vs emerging patterns |
|
|
- **π Trend Research**: 2025 development practices |
|
|
- **π Education**: High-quality examples for learning |
|
|
- **π οΈ Tool Development**: Benchmarking code quality tools |
|
|
|
|
|
## ποΈ Creation Methodology |
|
|
|
|
|
### π¨ Selection Strategy |
|
|
|
|
|
| Phase | Action | Purpose | |
|
|
|-------|--------|---------| |
|
|
| **1** | π― Dual population sampling | Balance quality & innovation | |
|
|
| **2** | π§Ή Multi-layer filtering | Remove noise & binaries | |
|
|
| **3** | π Size normalization | Focus on meaningful content | |
|
|
| **4** | π Content validation | Ensure text quality | |
|
|
| **5** | π·οΈ Metadata preservation | Maintain context | |
|
|
|
|
|
### π« What We Filtered Out |
|
|
|
|
|
**File Types Removed:** |
|
|
- 50+ binary extensions (images, models, executables) |
|
|
- 30+ build/system directories |
|
|
- 15+ configuration file types |
|
|
- All files outside 1KB-5MB range |
|
|
|
|
|
**Quality Checks:** |
|
|
- β
UTF-8 text validation |
|
|
- β
Non-empty content check |
|
|
- β
Binary detection |
|
|
- β
Repository structure preservation |
|
|
|
|
|
|
|
|
## πͺ Why This Dataset Matters |
|
|
|
|
|
### π« The Quality Revolution |
|
|
|
|
|
We reject the "more data is better" dogma. Instead, we offer: |
|
|
|
|
|
- **π― Intentional Curation**: Every file serves a purpose |
|
|
- **βοΈ Balanced Perspective**: Popular + Emerging = Complete picture |
|
|
- **π§Ή Unprecedented Cleanliness**: The cleanest code dataset available |
|
|
- **π
Temporal Intelligence**: 2025-focused for relevance |
|
|
|
|
|
|
|
|
## π€ Contributing & Feedback |
|
|
|
|
|
This dataset is a living project. We welcome: |
|
|
|
|
|
- π Bug reports and issues |
|
|
- π‘ Feature requests for future versions |
|
|
- π Validation of data quality |
|
|
- π― Suggestions for improvement |
|
|
|
|
|
## π License |
|
|
|
|
|
This dataset aggregates Github repos. Each individual repo maintains its original copyright and license terms (typically various Creative Commons licenses like CC BY, CC BY-NC, etc.). |
|
|
Users must verify and comply with the specific license of any repo they extract and use from this collection. |
|
|
The MIT license in this repository applies only to the dataset compilation and packaging code. |
|
|
|
|
|
**Important**: Repository contents maintain their original licenses. Please respect individual project licenses when using this data. |
|
|
|
|
|
## π Acknowledgments |
|
|
|
|
|
Built with gratitude for the entire open-source community. Every file in this dataset represents hours of dedication from developers worldwide. |
|
|
|
|
|
--- |
|
|
|
|
|
**β If this dataset helps your research or project, please consider starring the repository!** |
|
|
|
|
|
> **"In the pursuit of AI that understands code, we must first understand what code is worth learning."** |