Update README.md
Browse files
README.md
CHANGED
@@ -30,3 +30,46 @@ configs:
|
|
30 |
- split: validation
|
31 |
path: data/validation-*
|
32 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
- split: validation
|
31 |
path: data/validation-*
|
32 |
---
|
33 |
+
|
34 |
+
# 🐍 CodeParrot Python Only
|
35 |
+
|
36 |
+
This dataset contains **Python-only source code** extracted from the larger [CodeParrot](https://huggingface.co/datasets/codeparrot) corpus. It includes high-quality `.py` files filtered from public GitHub repositories and curated for use in training large language models (LLMs) on Python code generation tasks.
|
37 |
+
|
38 |
+
## 📦 Dataset Summary
|
39 |
+
|
40 |
+
- ✅ Filtered to include **only Python code**
|
41 |
+
- 🧹 Cleaned to remove non-source content (e.g., binaries, notebooks, scripts with mixed languages)
|
42 |
+
- 🧠 Ideal for training or evaluating code generation models
|
43 |
+
- 🧾 Each entry is a code snippet or full Python file stored as raw text
|
44 |
+
|
45 |
+
## 💡 Use Cases
|
46 |
+
|
47 |
+
This dataset is best suited for:
|
48 |
+
|
49 |
+
- Training/fine-tuning LLMs for:
|
50 |
+
- Python code generation
|
51 |
+
- Auto-completion
|
52 |
+
- Bug detection
|
53 |
+
- Code summarization
|
54 |
+
- Evaluating code-specific capabilities of general LLMs
|
55 |
+
- Research in code intelligence, representation learning, and software engineering
|
56 |
+
|
57 |
+
## 📁 Example Format
|
58 |
+
|
59 |
+
Each record is a single code block:
|
60 |
+
|
61 |
+
```json
|
62 |
+
{
|
63 |
+
"code": "def hello_world():\n print('Hello, world!')"
|
64 |
+
}
|
65 |
+
```
|
66 |
+
|
67 |
+
🚀 How to Use
|
68 |
+
|
69 |
+
```
|
70 |
+
from datasets import load_dataset
|
71 |
+
|
72 |
+
ds = load_dataset("theothertom/codeparrot-python-only")
|
73 |
+
print(ds["train"][0]["code"])
|
74 |
+
```
|
75 |
+
|