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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
---
|
| 4 |
|
| 5 |
-
# 💻 Processed Stack-Edu
|
| 6 |
|
| 7 |
-
This repository contains a pre-downloaded and processed version of the **[Stack-Edu](https://huggingface.co/datasets/HuggingFaceTB/stack-edu)** dataset. The original dataset consists of SWHIDs pointing to files on Software Heritage. This version contains the **full text content**, saved in Parquet format and organized by programming language, making it immediately usable for training and analysis without the slow download process
|
| 8 |
|
| 9 |
Stack-Edu is a 125B token dataset of high-quality, educational code filtered from [The Stack v2](https://huggingface.co/datasets/bigcode/the-stack-v2). It was curated by the Hugging Face team for training the StarCoder2 models.
|
| 10 |
|
|
@@ -14,45 +408,28 @@ The data is organized into one Parquet file per programming language. Each langu
|
|
| 14 |
|
| 15 |
### Available Languages (Configurations)
|
| 16 |
|
| 17 |
-
You can load data for any of the following languages:
|
| 18 |
`c`, `cpp`, `csharp`, `go`, `java`, `javascript`, `markdown`, `php`, `python`, `ruby`, `rust`, `shell`, `sql`, `swift`, `typescript`.
|
| 19 |
|
| 20 |
## How to Use
|
| 21 |
|
| 22 |
-
You can easily load any language-specific subset using the `datasets` library.
|
| 23 |
|
| 24 |
```python
|
| 25 |
from datasets import load_dataset
|
| 26 |
|
| 27 |
# Load a specific language, for example, Python
|
| 28 |
-
#
|
| 29 |
-
python_data = load_dataset("meryyllebr543/stack-edu-huggingface", name="python", split="train")
|
| 30 |
|
| 31 |
# Load the C++ data
|
| 32 |
cpp_data = load_dataset("meryyllebr543/stack-edu-huggingface", name="cpp", split="train")
|
| 33 |
|
| 34 |
# You can then iterate through the dataset
|
| 35 |
-
|
| 36 |
-
#
|
| 37 |
-
# {
|
| 38 |
-
# 'language': 'python',
|
| 39 |
-
# 'text': '# Your python code here...',
|
| 40 |
-
# ... (other columns)
|
| 41 |
-
# }
|
| 42 |
```
|
| 43 |
|
| 44 |
-
### Data Schema
|
| 45 |
-
|
| 46 |
-
The dataset contains the following columns:
|
| 47 |
-
* `language`: The programming language of the file.
|
| 48 |
-
* `src_encoding`: The detected source encoding.
|
| 49 |
-
* `length_bytes`: The size of the file in bytes.
|
| 50 |
-
* `score`: The educational quality score (float).
|
| 51 |
-
* `int_score`: The integer version of the quality score.
|
| 52 |
-
* `detected_licenses`: A list of licenses detected in the file.
|
| 53 |
-
* `license_type`: The general type of license.
|
| 54 |
-
* `text`: The full text content of the code file.
|
| 55 |
-
|
| 56 |
## Original Dataset Information
|
| 57 |
|
| 58 |
For more details on the curation process, please refer to the original **[Stack-Edu dataset card](https://huggingface.co/datasets/HuggingFaceTB/stack-edu)**.
|
|
|
|
| 1 |
---
|
| 2 |
license: other
|
| 3 |
+
dataset_info:
|
| 4 |
+
- config_name: c
|
| 5 |
+
features:
|
| 6 |
+
- name: language
|
| 7 |
+
dtype: string
|
| 8 |
+
- name: src_encoding
|
| 9 |
+
dtype: string
|
| 10 |
+
- name: length_bytes
|
| 11 |
+
dtype: int64
|
| 12 |
+
- name: score
|
| 13 |
+
dtype: float64
|
| 14 |
+
- name: int_score
|
| 15 |
+
dtype: int64
|
| 16 |
+
- name: detected_licenses
|
| 17 |
+
sequence: string
|
| 18 |
+
- name: license_type
|
| 19 |
+
dtype: string
|
| 20 |
+
- name: text
|
| 21 |
+
dtype: string
|
| 22 |
+
splits:
|
| 23 |
+
- name: train
|
| 24 |
+
num_bytes: ???
|
| 25 |
+
num_examples: ???
|
| 26 |
+
- config_name: cpp
|
| 27 |
+
features:
|
| 28 |
+
- name: language
|
| 29 |
+
dtype: string
|
| 30 |
+
- name: src_encoding
|
| 31 |
+
dtype: string
|
| 32 |
+
- name: length_bytes
|
| 33 |
+
dtype: int64
|
| 34 |
+
- name: score
|
| 35 |
+
dtype: float64
|
| 36 |
+
- name: int_score
|
| 37 |
+
dtype: int64
|
| 38 |
+
- name: detected_licenses
|
| 39 |
+
sequence: string
|
| 40 |
+
- name: license_type
|
| 41 |
+
dtype: string
|
| 42 |
+
- name: text
|
| 43 |
+
dtype: string
|
| 44 |
+
splits:
|
| 45 |
+
- name: train
|
| 46 |
+
num_bytes: ???
|
| 47 |
+
num_examples: ???
|
| 48 |
+
- config_name: csharp
|
| 49 |
+
features:
|
| 50 |
+
- name: language
|
| 51 |
+
dtype: string
|
| 52 |
+
- name: src_encoding
|
| 53 |
+
dtype: string
|
| 54 |
+
- name: length_bytes
|
| 55 |
+
dtype: int64
|
| 56 |
+
- name: score
|
| 57 |
+
dtype: float64
|
| 58 |
+
- name: int_score
|
| 59 |
+
dtype: int64
|
| 60 |
+
- name: detected_licenses
|
| 61 |
+
sequence: string
|
| 62 |
+
- name: license_type
|
| 63 |
+
dtype: string
|
| 64 |
+
- name: text
|
| 65 |
+
dtype: string
|
| 66 |
+
splits:
|
| 67 |
+
- name: train
|
| 68 |
+
num_bytes: ???
|
| 69 |
+
num_examples: ???
|
| 70 |
+
- config_name: go
|
| 71 |
+
features:
|
| 72 |
+
- name: language
|
| 73 |
+
dtype: string
|
| 74 |
+
- name: src_encoding
|
| 75 |
+
dtype: string
|
| 76 |
+
- name: length_bytes
|
| 77 |
+
dtype: int64
|
| 78 |
+
- name: score
|
| 79 |
+
dtype: float64
|
| 80 |
+
- name: int_score
|
| 81 |
+
dtype: int64
|
| 82 |
+
- name: detected_licenses
|
| 83 |
+
sequence: string
|
| 84 |
+
- name: license_type
|
| 85 |
+
dtype: string
|
| 86 |
+
- name: text
|
| 87 |
+
dtype: string
|
| 88 |
+
splits:
|
| 89 |
+
- name: train
|
| 90 |
+
num_bytes: ???
|
| 91 |
+
num_examples: ???
|
| 92 |
+
- config_name: java
|
| 93 |
+
features:
|
| 94 |
+
- name: language
|
| 95 |
+
dtype: string
|
| 96 |
+
- name: src_encoding
|
| 97 |
+
dtype: string
|
| 98 |
+
- name: length_bytes
|
| 99 |
+
dtype: int64
|
| 100 |
+
- name: score
|
| 101 |
+
dtype: float64
|
| 102 |
+
- name: int_score
|
| 103 |
+
dtype: int64
|
| 104 |
+
- name: detected_licenses
|
| 105 |
+
sequence: string
|
| 106 |
+
- name: license_type
|
| 107 |
+
dtype: string
|
| 108 |
+
- name: text
|
| 109 |
+
dtype: string
|
| 110 |
+
splits:
|
| 111 |
+
- name: train
|
| 112 |
+
num_bytes: ???
|
| 113 |
+
num_examples: ???
|
| 114 |
+
- config_name: javascript
|
| 115 |
+
features:
|
| 116 |
+
- name: language
|
| 117 |
+
dtype: string
|
| 118 |
+
- name: src_encoding
|
| 119 |
+
dtype: string
|
| 120 |
+
- name: length_bytes
|
| 121 |
+
dtype: int64
|
| 122 |
+
- name: score
|
| 123 |
+
dtype: float64
|
| 124 |
+
- name: int_score
|
| 125 |
+
dtype: int64
|
| 126 |
+
- name: detected_licenses
|
| 127 |
+
sequence: string
|
| 128 |
+
- name: license_type
|
| 129 |
+
dtype: string
|
| 130 |
+
- name: text
|
| 131 |
+
dtype: string
|
| 132 |
+
splits:
|
| 133 |
+
- name: train
|
| 134 |
+
num_bytes: ???
|
| 135 |
+
num_examples: ???
|
| 136 |
+
- config_name: markdown
|
| 137 |
+
features:
|
| 138 |
+
- name: language
|
| 139 |
+
dtype: string
|
| 140 |
+
- name: src_encoding
|
| 141 |
+
dtype: string
|
| 142 |
+
- name: length_bytes
|
| 143 |
+
dtype: int64
|
| 144 |
+
- name: score
|
| 145 |
+
dtype: float64
|
| 146 |
+
- name: int_score
|
| 147 |
+
dtype: int64
|
| 148 |
+
- name: detected_licenses
|
| 149 |
+
sequence: string
|
| 150 |
+
- name: license_type
|
| 151 |
+
dtype: string
|
| 152 |
+
- name: text
|
| 153 |
+
dtype: string
|
| 154 |
+
splits:
|
| 155 |
+
- name: train
|
| 156 |
+
num_bytes: ???
|
| 157 |
+
num_examples: ???
|
| 158 |
+
- config_name: php
|
| 159 |
+
features:
|
| 160 |
+
- name: language
|
| 161 |
+
dtype: string
|
| 162 |
+
- name: src_encoding
|
| 163 |
+
dtype: string
|
| 164 |
+
- name: length_bytes
|
| 165 |
+
dtype: int64
|
| 166 |
+
- name: score
|
| 167 |
+
dtype: float64
|
| 168 |
+
- name: int_score
|
| 169 |
+
dtype: int64
|
| 170 |
+
- name: detected_licenses
|
| 171 |
+
sequence: string
|
| 172 |
+
- name: license_type
|
| 173 |
+
dtype: string
|
| 174 |
+
- name: text
|
| 175 |
+
dtype: string
|
| 176 |
+
splits:
|
| 177 |
+
- name: train
|
| 178 |
+
num_bytes: ???
|
| 179 |
+
num_examples: ???
|
| 180 |
+
- config_name: python
|
| 181 |
+
features:
|
| 182 |
+
- name: language
|
| 183 |
+
dtype: string
|
| 184 |
+
- name: src_encoding
|
| 185 |
+
dtype: string
|
| 186 |
+
- name: length_bytes
|
| 187 |
+
dtype: int64
|
| 188 |
+
- name: score
|
| 189 |
+
dtype: float64
|
| 190 |
+
- name: int_score
|
| 191 |
+
dtype: int64
|
| 192 |
+
- name: detected_licenses
|
| 193 |
+
sequence: string
|
| 194 |
+
- name: license_type
|
| 195 |
+
dtype: string
|
| 196 |
+
- name: text
|
| 197 |
+
dtype: string
|
| 198 |
+
splits:
|
| 199 |
+
- name: train
|
| 200 |
+
num_bytes: ???
|
| 201 |
+
num_examples: ???
|
| 202 |
+
- config_name: ruby
|
| 203 |
+
features:
|
| 204 |
+
- name: language
|
| 205 |
+
dtype: string
|
| 206 |
+
- name: src_encoding
|
| 207 |
+
dtype: string
|
| 208 |
+
- name: length_bytes
|
| 209 |
+
dtype: int64
|
| 210 |
+
- name: score
|
| 211 |
+
dtype: float64
|
| 212 |
+
- name: int_score
|
| 213 |
+
dtype: int64
|
| 214 |
+
- name: detected_licenses
|
| 215 |
+
sequence: string
|
| 216 |
+
- name: license_type
|
| 217 |
+
dtype: string
|
| 218 |
+
- name: text
|
| 219 |
+
dtype: string
|
| 220 |
+
splits:
|
| 221 |
+
- name: train
|
| 222 |
+
num_bytes: ???
|
| 223 |
+
num_examples: ???
|
| 224 |
+
- config_name: rust
|
| 225 |
+
features:
|
| 226 |
+
- name: language
|
| 227 |
+
dtype: string
|
| 228 |
+
- name: src_encoding
|
| 229 |
+
dtype: string
|
| 230 |
+
- name: length_bytes
|
| 231 |
+
dtype: int64
|
| 232 |
+
- name: score
|
| 233 |
+
dtype: float64
|
| 234 |
+
- name: int_score
|
| 235 |
+
dtype: int64
|
| 236 |
+
- name: detected_licenses
|
| 237 |
+
sequence: string
|
| 238 |
+
- name: license_type
|
| 239 |
+
dtype: string
|
| 240 |
+
- name: text
|
| 241 |
+
dtype: string
|
| 242 |
+
splits:
|
| 243 |
+
- name: train
|
| 244 |
+
num_bytes: ???
|
| 245 |
+
num_examples: ???
|
| 246 |
+
- config_name: shell
|
| 247 |
+
features:
|
| 248 |
+
- name: language
|
| 249 |
+
dtype: string
|
| 250 |
+
- name: src_encoding
|
| 251 |
+
dtype: string
|
| 252 |
+
- name: length_bytes
|
| 253 |
+
dtype: int64
|
| 254 |
+
- name: score
|
| 255 |
+
dtype: float64
|
| 256 |
+
- name: int_score
|
| 257 |
+
dtype: int64
|
| 258 |
+
- name: detected_licenses
|
| 259 |
+
sequence: string
|
| 260 |
+
- name: license_type
|
| 261 |
+
dtype: string
|
| 262 |
+
- name: text
|
| 263 |
+
dtype: string
|
| 264 |
+
splits:
|
| 265 |
+
- name: train
|
| 266 |
+
num_bytes: ???
|
| 267 |
+
num_examples: ???
|
| 268 |
+
- config_name: sql
|
| 269 |
+
features:
|
| 270 |
+
- name: language
|
| 271 |
+
dtype: string
|
| 272 |
+
- name: src_encoding
|
| 273 |
+
dtype: string
|
| 274 |
+
- name: length_bytes
|
| 275 |
+
dtype: int64
|
| 276 |
+
- name: score
|
| 277 |
+
dtype: float64
|
| 278 |
+
- name: int_score
|
| 279 |
+
dtype: int64
|
| 280 |
+
- name: detected_licenses
|
| 281 |
+
sequence: string
|
| 282 |
+
- name: license_type
|
| 283 |
+
dtype: string
|
| 284 |
+
- name: text
|
| 285 |
+
dtype: string
|
| 286 |
+
splits:
|
| 287 |
+
- name: train
|
| 288 |
+
num_bytes: ???
|
| 289 |
+
num_examples: ???
|
| 290 |
+
- config_name: swift
|
| 291 |
+
features:
|
| 292 |
+
- name: language
|
| 293 |
+
dtype: string
|
| 294 |
+
- name: src_encoding
|
| 295 |
+
dtype: string
|
| 296 |
+
- name: length_bytes
|
| 297 |
+
dtype: int64
|
| 298 |
+
- name: score
|
| 299 |
+
dtype: float64
|
| 300 |
+
- name: int_score
|
| 301 |
+
dtype: int64
|
| 302 |
+
- name: detected_licenses
|
| 303 |
+
sequence: string
|
| 304 |
+
- name: license_type
|
| 305 |
+
dtype: string
|
| 306 |
+
- name: text
|
| 307 |
+
dtype: string
|
| 308 |
+
splits:
|
| 309 |
+
- name: train
|
| 310 |
+
num_bytes: ???
|
| 311 |
+
num_examples: ???
|
| 312 |
+
- config_name: typescript
|
| 313 |
+
features:
|
| 314 |
+
- name: language
|
| 315 |
+
dtype: string
|
| 316 |
+
- name: src_encoding
|
| 317 |
+
dtype: string
|
| 318 |
+
- name: length_bytes
|
| 319 |
+
dtype: int64
|
| 320 |
+
- name: score
|
| 321 |
+
dtype: float64
|
| 322 |
+
- name: int_score
|
| 323 |
+
dtype: int64
|
| 324 |
+
- name: detected_licenses
|
| 325 |
+
sequence: string
|
| 326 |
+
- name: license_type
|
| 327 |
+
dtype: string
|
| 328 |
+
- name: text
|
| 329 |
+
dtype: string
|
| 330 |
+
splits:
|
| 331 |
+
- name: train
|
| 332 |
+
num_bytes: ???
|
| 333 |
+
num_examples: ???
|
| 334 |
+
|
| 335 |
+
# The `configs` section maps the config names to the actual data files
|
| 336 |
+
configs:
|
| 337 |
+
- config_name: c
|
| 338 |
+
data_files:
|
| 339 |
+
- split: train
|
| 340 |
+
path: c.parquet
|
| 341 |
+
- config_name: cpp
|
| 342 |
+
data_files:
|
| 343 |
+
- split: train
|
| 344 |
+
path: cpp.parquet
|
| 345 |
+
- config_name: csharp
|
| 346 |
+
data_files:
|
| 347 |
+
- split: train
|
| 348 |
+
path: csharp.parquet
|
| 349 |
+
- config_name: go
|
| 350 |
+
data_files:
|
| 351 |
+
- split: train
|
| 352 |
+
path: go.parquet
|
| 353 |
+
- config_name: java
|
| 354 |
+
data_files:
|
| 355 |
+
- split: train
|
| 356 |
+
path: java.parquet
|
| 357 |
+
- config_name: javascript
|
| 358 |
+
data_files:
|
| 359 |
+
- split: train
|
| 360 |
+
path: javascript.parquet
|
| 361 |
+
- config_name: markdown
|
| 362 |
+
data_files:
|
| 363 |
+
- split: train
|
| 364 |
+
path: markdown.parquet
|
| 365 |
+
- config_name: php
|
| 366 |
+
data_files:
|
| 367 |
+
- split: train
|
| 368 |
+
path: php.parquet
|
| 369 |
+
- config_name: python
|
| 370 |
+
data_files:
|
| 371 |
+
- split: train
|
| 372 |
+
path: python.parquet
|
| 373 |
+
- config_name: ruby
|
| 374 |
+
data_files:
|
| 375 |
+
- split: train
|
| 376 |
+
path: ruby.parquet
|
| 377 |
+
- config_name: rust
|
| 378 |
+
data_files:
|
| 379 |
+
- split: train
|
| 380 |
+
path: rust.parquet
|
| 381 |
+
- config_name: shell
|
| 382 |
+
data_files:
|
| 383 |
+
- split: train
|
| 384 |
+
path: shell.parquet
|
| 385 |
+
- config_name: sql
|
| 386 |
+
data_files:
|
| 387 |
+
- split: train
|
| 388 |
+
path: sql.parquet
|
| 389 |
+
- config_name: swift
|
| 390 |
+
data_files:
|
| 391 |
+
- split: train
|
| 392 |
+
path: swift.parquet
|
| 393 |
+
- config_name: typescript
|
| 394 |
+
data_files:
|
| 395 |
+
- split: train
|
| 396 |
+
path: typescript.parquet
|
| 397 |
---
|
| 398 |
|
| 399 |
+
# 💻 Processed Stack-Edu (Direct Access)
|
| 400 |
|
| 401 |
+
This repository contains a pre-downloaded and processed version of the **[Stack-Edu](https://huggingface.co/datasets/HuggingFaceTB/stack-edu)** dataset. The original dataset consists of SWHIDs pointing to files on Software Heritage. This version contains the **full text content**, saved in Parquet format and organized by programming language, making it immediately usable for training and analysis without the slow download process.
|
| 402 |
|
| 403 |
Stack-Edu is a 125B token dataset of high-quality, educational code filtered from [The Stack v2](https://huggingface.co/datasets/bigcode/the-stack-v2). It was curated by the Hugging Face team for training the StarCoder2 models.
|
| 404 |
|
|
|
|
| 408 |
|
| 409 |
### Available Languages (Configurations)
|
| 410 |
|
| 411 |
+
You can load data for any of the following languages by specifying its name in the `load_dataset` function:
|
| 412 |
`c`, `cpp`, `csharp`, `go`, `java`, `javascript`, `markdown`, `php`, `python`, `ruby`, `rust`, `shell`, `sql`, `swift`, `typescript`.
|
| 413 |
|
| 414 |
## How to Use
|
| 415 |
|
| 416 |
+
You can easily load any language-specific subset using the `datasets` library. The dataset card metadata in this `README.md` allows for direct loading of each configuration.
|
| 417 |
|
| 418 |
```python
|
| 419 |
from datasets import load_dataset
|
| 420 |
|
| 421 |
# Load a specific language, for example, Python
|
| 422 |
+
# Note: It is recommended to use streaming=True for large datasets to avoid downloading everything at once.
|
| 423 |
+
python_data = load_dataset("meryyllebr543/stack-edu-huggingface", name="python", split="train", streaming=True)
|
| 424 |
|
| 425 |
# Load the C++ data
|
| 426 |
cpp_data = load_dataset("meryyllebr543/stack-edu-huggingface", name="cpp", split="train")
|
| 427 |
|
| 428 |
# You can then iterate through the dataset
|
| 429 |
+
for example in python_data.take(5):
|
| 430 |
+
print(example['text'][:200]) # Print the first 200 characters of the text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 431 |
```
|
| 432 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 433 |
## Original Dataset Information
|
| 434 |
|
| 435 |
For more details on the curation process, please refer to the original **[Stack-Edu dataset card](https://huggingface.co/datasets/HuggingFaceTB/stack-edu)**.
|