hytopot commited on
Commit
a25249a
·
verified ·
1 Parent(s): 2cd2065

Update README with dataset information

Browse files
Files changed (1) hide show
  1. README.md +13 -38
README.md CHANGED
@@ -1,30 +1,3 @@
1
- ---
2
- dataset_info:
3
- features:
4
- - name: text
5
- dtype: string
6
- splits:
7
- - name: train
8
- num_bytes: 2124117137
9
- num_examples: 1756174
10
- - name: test
11
- num_bytes: 23335122
12
- num_examples: 14677
13
- - name: valid
14
- num_bytes: 19402251
15
- num_examples: 12734
16
- download_size: 821240120
17
- dataset_size: 2166854510
18
- configs:
19
- - config_name: default
20
- data_files:
21
- - split: train
22
- path: data/train-*
23
- - split: test
24
- path: data/test-*
25
- - split: valid
26
- path: data/valid-*
27
- ---
28
  # Code Contests C++ Dataset
29
 
30
  This dataset contains C++ programming solutions extracted from the [DeepMind Code Contests](https://huggingface.co/datasets/deepmind/code_contests) dataset.
@@ -51,29 +24,31 @@ This dataset is derived from the [DeepMind Code Contests](https://huggingface.co
51
  ## Dataset Description
52
 
53
  - **Format**: CSV file with a single 'text' column containing C++ programs
54
- - **Number of Programs**: 27,520
55
  - **Source Languages**: Only C++ (language ID 2 from the original dataset)
56
  - **Preprocessing**:
57
  - Filtered to include only C++ solutions
58
  - Extracted program text only
59
- - Removed duplicate solutions
60
 
61
  ## Usage
62
 
63
  ```python
64
- import pandas as pd
65
 
66
  # Load the dataset
67
- df = pd.read_csv('code_contests_cpp.csv')
68
- print(f"Number of C++ programs: {len(df)}")
69
- print("First program:")
70
- print(df['text'].iloc[0][:200] + "...") # Print first 200 chars of first program
 
 
 
 
 
 
71
  ```
72
 
73
  ## License
74
 
75
  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.
76
-
77
- ## Creation
78
-
79
- 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.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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.
 
24
  ## Dataset Description
25
 
26
  - **Format**: CSV file with a single 'text' column containing C++ programs
27
+ - **Splits**: train, test, valid (preserved from original dataset)
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
+ - Preserved original dataset splits
33
 
34
  ## Usage
35
 
36
  ```python
37
+ from datasets import load_dataset
38
 
39
  # Load the dataset
40
+ dataset = load_dataset("hytopot/code_contests_cpp")
41
+
42
+ # Access different splits
43
+ train_data = dataset["train"]
44
+ test_data = dataset["test"]
45
+ valid_data = dataset["valid"]
46
+
47
+ # Example: Print first program in training set
48
+ print("First training program:")
49
+ print(train_data[0]["text"][:200] + "...")
50
  ```
51
 
52
  ## License
53
 
54
  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.