File size: 2,438 Bytes
2cd2065
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
93af956
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
---
dataset_info:
  features:
  - name: text
    dtype: string
  splits:
  - name: train
    num_bytes: 2124117137
    num_examples: 1756174
  - name: test
    num_bytes: 23335122
    num_examples: 14677
  - name: valid
    num_bytes: 19402251
    num_examples: 12734
  download_size: 821240120
  dataset_size: 2166854510
configs:
- config_name: default
  data_files:
  - split: train
    path: data/train-*
  - split: test
    path: data/test-*
  - split: valid
    path: data/valid-*
---
# Code Contests C++ Dataset

This dataset contains C++ programming solutions extracted from the [DeepMind Code Contests](https://huggingface.co/datasets/deepmind/code_contests) dataset.

## Source

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.

### Original Dataset Citation

```
@article{li2022competition,
  title={Competition-level code generation with alphacode},
  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},
  journal={Science},
  volume={378},
  number={6624},
  pages={1092--1097},
  year={2022},
  publisher={American Association for the Advancement of Science}
}
```

## Dataset Description

- **Format**: CSV file with a single 'text' column containing C++ programs
- **Number of Programs**: 27,520
- **Source Languages**: Only C++ (language ID 2 from the original dataset)
- **Preprocessing**:
  - Filtered to include only C++ solutions
  - Extracted program text only
  - Removed duplicate solutions

## Usage

```python
import pandas as pd

# Load the dataset
df = pd.read_csv('code_contests_cpp.csv')
print(f"Number of C++ programs: {len(df)}")
print("First program:")
print(df['text'].iloc[0][:200] + "...")  # Print first 200 chars of first program
```

## License

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.

## Creation

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.