Add README with dataset information
Browse files
README.md
CHANGED
|
@@ -1,17 +1,52 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Code Contests C++ Dataset
|
| 2 |
+
|
| 3 |
+
This dataset contains C++ programming solutions extracted from the [DeepMind Code Contests](https://huggingface.co/datasets/deepmind/code_contests) dataset.
|
| 4 |
+
|
| 5 |
+
## Source
|
| 6 |
+
|
| 7 |
+
This dataset is derived from the [DeepMind Code Contests](https://huggingface.co/datasets/deepmind/code_contests) dataset, which contains programming problems and solutions from various coding competition platforms.
|
| 8 |
+
|
| 9 |
+
### Original Dataset Citation
|
| 10 |
+
|
| 11 |
+
```
|
| 12 |
+
@article{li2022competition,
|
| 13 |
+
title={Competition-level code generation with alphacode},
|
| 14 |
+
author={Li, Yujia and Choi, David and Chung, Junyoung and Kushman, Nate and Schrittwieser, Julian and Leblond, R{\'e}mi and Eccles, Tom and Keeling, James and Gimeno, Felix and Lago, Agustin Dal and others},
|
| 15 |
+
journal={Science},
|
| 16 |
+
volume={378},
|
| 17 |
+
number={6624},
|
| 18 |
+
pages={1092--1097},
|
| 19 |
+
year={2022},
|
| 20 |
+
publisher={American Association for the Advancement of Science}
|
| 21 |
+
}
|
| 22 |
+
```
|
| 23 |
+
|
| 24 |
+
## Dataset Description
|
| 25 |
+
|
| 26 |
+
- **Format**: CSV file with a single 'text' column containing C++ programs
|
| 27 |
+
- **Number of Programs**: 27,520
|
| 28 |
+
- **Source Languages**: Only C++ (language ID 2 from the original dataset)
|
| 29 |
+
- **Preprocessing**:
|
| 30 |
+
- Filtered to include only C++ solutions
|
| 31 |
+
- Extracted program text only
|
| 32 |
+
- Removed duplicate solutions
|
| 33 |
+
|
| 34 |
+
## Usage
|
| 35 |
+
|
| 36 |
+
```python
|
| 37 |
+
import pandas as pd
|
| 38 |
+
|
| 39 |
+
# Load the dataset
|
| 40 |
+
df = pd.read_csv('code_contests_cpp.csv')
|
| 41 |
+
print(f"Number of C++ programs: {len(df)}")
|
| 42 |
+
print("First program:")
|
| 43 |
+
print(df['text'].iloc[0][:200] + "...") # Print first 200 chars of first program
|
| 44 |
+
```
|
| 45 |
+
|
| 46 |
+
## License
|
| 47 |
+
|
| 48 |
+
This dataset is derived from the DeepMind Code Contests dataset and is subject to the same license terms as the original dataset. Please refer to the [original dataset](https://huggingface.co/datasets/deepmind/code_contests) for licensing information.
|
| 49 |
+
|
| 50 |
+
## Creation
|
| 51 |
+
|
| 52 |
+
This dataset was created using the script in `scripts/process_code_contests.py`, which filters the original dataset for C++ solutions and extracts the program text.
|