nyuuzyou commited on
Commit
99adee1
·
verified ·
1 Parent(s): 21210b5

Add files using upload-large-folder tool

Browse files
README.md CHANGED
@@ -1,55 +1,225 @@
1
  ---
2
- pretty_name: gitgud.io Code Dataset
3
- size_categories:
4
- - 10M<n<100M
5
- task_categories:
6
- - text-generation
7
- - fill-mask
8
  annotations_creators:
 
 
9
  - found
 
 
 
 
10
  multilinguality:
11
  - multilingual
 
 
 
12
  source_datasets:
13
  - original
 
 
 
 
14
  configs:
15
  - config_name: default
16
  data_files:
17
  - split: train
18
- path: "gitgud_*.jsonl.zst"
19
  default: true
20
- tags:
21
- - code
22
- license:
23
- - other
 
 
 
 
 
 
 
 
 
 
24
  ---
25
 
26
- # Dataset Card for gitgud.io Code Dataset
 
 
 
 
27
 
28
  ### Dataset Summary
29
 
30
- This dataset contains source code files collected from 26,610 repositories and branches hosted on gitgud.io, a free code hosting platform. The dataset includes code from various programming languages and represents a diverse collection of open-source projects and personal repositories.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
31
 
32
  ## Dataset Structure
33
 
34
  ### Data Fields
35
 
36
- This dataset includes the following fields:
 
 
 
 
 
 
 
37
 
38
- - `code`: Content of the source file (string)
39
- - `repo_name`: Name of the gitgud.io repository (string)
40
- - `path`: Path of file within the repository (string)
41
- - `language`: Programming language as inferred by file extension (string)
42
- - `license`: License of the repository, if available (string)
43
- - `size`: Size of source file in bytes (integer)
44
 
45
  ### Data Splits
46
 
47
- All examples are in the train split, there is no validation split.
48
 
49
- ### Data Format
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
50
 
51
- - **Format**: JSONL (JSON Lines) compressed with Zstandard (.jsonl.zst)
52
- - **File Structure**: 194 files (gitgud_0000.jsonl.zst to gitgud_0193.jsonl.zst)
53
- - **Total Repositories**: 26,610 repositories and branches
54
- - **Filtering**: Files with lines longer than 1,000 characters were excluded
55
- - **Deduplication**: No deduplication was performed on the dataset
 
1
  ---
 
 
 
 
 
 
2
  annotations_creators:
3
+ - machine-generated
4
+ language_creators:
5
  - found
6
+ language:
7
+ - code
8
+ - en
9
+ license: other
10
  multilinguality:
11
  - multilingual
12
+ pretty_name: GitGud Code Dataset
13
+ size_categories:
14
+ - 10M<n<100M
15
  source_datasets:
16
  - original
17
+ task_categories:
18
+ - text-generation
19
+ tags:
20
+ - code
21
  configs:
22
  - config_name: default
23
  data_files:
24
  - split: train
25
+ path: "data/*.parquet"
26
  default: true
27
+ dataset_info:
28
+ features:
29
+ - name: code
30
+ dtype: string
31
+ - name: repo_name
32
+ dtype: string
33
+ - name: path
34
+ dtype: string
35
+ - name: language
36
+ dtype: string
37
+ - name: license
38
+ dtype: string
39
+ - name: size
40
+ dtype: int64
41
  ---
42
 
43
+ # GitGud Code Dataset
44
+
45
+ ## Dataset Description
46
+
47
+ This dataset was compiled from code repositories hosted on [GitGud.io](https://gitgud.io), a GitLab-based code hosting platform. GitGud.io serves as an alternative git hosting service used by various developer communities and open-source projects.
48
 
49
  ### Dataset Summary
50
 
51
+ | Statistic | Value |
52
+ |-----------|-------|
53
+ | **Total Files** | 16,322,315 |
54
+ | **Total Repositories** | 7,204 |
55
+ | **Total Size** | 17.46 GB (compressed Parquet) |
56
+ | **Programming Languages** | 2,185 |
57
+ | **File Format** | Parquet with Zstd compression (17 files) |
58
+
59
+ ### Key Features
60
+
61
+ - **Diverse code corpus**: Contains code from over 7,000 repositories across various domains
62
+ - **Wide language coverage**: Spans 2,185 programming languages and file types detected by file extension mapping
63
+ - **Rich metadata**: Includes repository name, file path, detected language, license information, and file size
64
+ - **Quality filtered**: Filtering applied to remove binary files, overly long lines, and license files
65
+
66
+ ### Languages
67
+
68
+ The dataset includes 2,185 programming languages and file types. The top 30 languages by file count:
69
+
70
+ | Rank | Language | File Count |
71
+ |------|----------|------------|
72
+ | 1 | tw (Twine) | 3,301,366 |
73
+ | 2 | XML | 3,281,566 |
74
+ | 3 | svg | 1,744,500 |
75
+ | 4 | C# | 1,367,799 |
76
+ | 5 | JavaScript | 1,252,710 |
77
+ | 6 | C++ | 731,619 |
78
+ | 7 | erb | 710,279 |
79
+ | 8 | JSON | 398,139 |
80
+ | 9 | Text | 377,948 |
81
+ | 10 | twee | 300,576 |
82
+ | 11 | csv | 205,230 |
83
+ | 12 | HTML | 170,711 |
84
+ | 13 | Markdown | 160,735 |
85
+ | 14 | TypeScript | 147,173 |
86
+ | 15 | Lua | 117,079 |
87
+ | 16 | PHP | 116,059 |
88
+ | 17 | none | 111,791 |
89
+ | 18 | pal | 110,626 |
90
+ | 19 | CSS | 108,664 |
91
+ | 20 | Python | 106,261 |
92
+ | 21 | dm | 98,333 |
93
+ | 22 | Ruby | 93,685 |
94
+ | 23 | _comment | 91,730 |
95
+ | 24 | Java | 81,190 |
96
+ | 25 | YAML | 63,289 |
97
+ | 26 | ActionScript | 62,210 |
98
+ | 27 | Git | 43,748 |
99
+ | 28 | mdwn | 42,654 |
100
+ | 29 | mk | 41,789 |
101
+ | 30 | INI | 39,760 |
102
+
103
+ ### Licenses
104
+
105
+ The dataset includes files from repositories with various licenses:
106
+
107
+ | License | File Count |
108
+ |---------|------------|
109
+ | mit | 9,517,343 |
110
+ | bsd-3-clause | 3,315,732 |
111
+ | unknown | 2,935,736 |
112
+ | mpl-2.0 | 338,040 |
113
+ | gpl-2.0 | 79,415 |
114
+ | lgpl-2.1 | 38,429 |
115
+ | gpl-3.0 | 25,964 |
116
+ | apache-2.0 | 20,562 |
117
+ | cc-by-4.0 | 18,703 |
118
+ | agpl-3.0 | 15,367 |
119
+ | cc-by-nc-4.0 | 6,362 |
120
+ | wtfpl | 6,163 |
121
+ | bsd-2-clause | 3,749 |
122
+ | zlib | 482 |
123
+ | unlicense | 261 |
124
+ | cc-by-sa-4.0 | 7 |
125
 
126
  ## Dataset Structure
127
 
128
  ### Data Fields
129
 
130
+ | Field | Type | Description |
131
+ |-------|------|-------------|
132
+ | `code` | string | Content of the source file (UTF-8 encoded) |
133
+ | `repo_name` | string | Name of the GitGud repository (format: `username/repo`) |
134
+ | `path` | string | Path of the file within the repository (relative to repo root) |
135
+ | `language` | string | Programming language detected by file extension mapping |
136
+ | `license` | string | License of the repository (SPDX identifier or "unknown") |
137
+ | `size` | int64 | Size of the source file in bytes |
138
 
139
+ ### Data Format
140
+
141
+ - **Format**: Apache Parquet with Zstd compression (level 19)
142
+ - **File Structure**: 17 files (`gitgud-00000.parquet` to `gitgud-00016.parquet`)
143
+ - **Rows per shard**: ~1,000,000 (except last shard: 322,315)
 
144
 
145
  ### Data Splits
146
 
147
+ All examples are in the train split. There is no validation or test split.
148
 
149
+ ### Example Data Point
150
+
151
+ ```
152
+ {
153
+ 'code': 'using System;\nusing System.Collections.Generic;\n...',
154
+ 'repo_name': 'username/game-mod',
155
+ 'path': 'src/GameMod/Player.cs',
156
+ 'language': 'C#',
157
+ 'license': 'mit',
158
+ 'size': 2048
159
+ }
160
+ ```
161
+
162
+ ## Dataset Creation
163
+
164
+ ### Pipeline Overview
165
+
166
+ The dataset was created through a multi-stage pipeline:
167
+
168
+ 1. **Repository Discovery**: Scraping public repository URLs from GitGud.io's GitLab API v4 endpoint using multiple sort orderings (`id`, `name`, `path`, `updated_at`, `star_count`, `last_activity_at`, `similarity`)
169
+ 2. **Branch Enumeration**: Fetching all branches for each repository via the GitLab API
170
+ 3. **Archive Download**: Downloading `.tar.gz` archives for each repository/branch combination
171
+ 4. **Content Extraction**: Extracting and filtering source code files from archives
172
+ 5. **Parquet Generation**: Writing filtered records to Parquet shards with Zstd compression
173
+
174
+ ### Language Detection
175
+
176
+ Programming languages are detected using file extension mapping. The pipeline maps ~80 programming languages by their file extensions, including:
177
+ - **Major languages**: Python, JavaScript, TypeScript, C, C++, C#, Java, Go, Rust, Ruby, PHP
178
+ - **Configuration**: JSON, YAML, TOML, XML, INI
179
+ - **Markup**: HTML, CSS, Markdown, LaTeX
180
+ - **Game development**: GLSL, HLSL, GDScript
181
+ - **And many more**
182
+
183
+ Files with unrecognized extensions are labeled with the extension itself (without the dot prefix). Files without extensions are labeled as "none" or by special filename matching (e.g., "Dockerfile", "Makefile").
184
+
185
+ ### License Detection
186
+
187
+ Licenses are detected by:
188
+ 1. Scanning for license files (`LICENSE`, `LICENSE.txt`, `LICENSE.md`, `COPYING`, `COPYING.txt`, `COPYING.md`)
189
+ 2. Matching license text against known patterns (MIT, Apache 2.0, GPL variants, BSD, Creative Commons, MPL, ISC, Unlicense, Artistic, WTFPL, Zlib, etc.)
190
+ 3. Defaulting to "unknown" if no license can be detected
191
+
192
+ ### File Filtering
193
+
194
+ Filtering is applied to ensure data quality:
195
+
196
+ #### Size Limits
197
+ | Limit | Value |
198
+ |-------|-------|
199
+ | Max repository archive size | 64 MB |
200
+ | Max line length | 1,000 characters |
201
+
202
+ #### Content Filtering
203
+ - **Binary Detection**: Files with null bytes in the first 1KB are excluded
204
+ - **UTF-8 Validation**: Files must be decodable as UTF-8 (with fallback to latin-1, cp1252, iso-8859-1)
205
+ - **Long Lines**: Files with any line exceeding 1,000 characters are excluded
206
+ - **License Files**: License files (LICENSE, COPYING, etc.) are excluded from the dataset (but used for license detection)
207
+
208
+ ### Source Data
209
+
210
+ All data originates from public repositories hosted on [GitGud.io](https://gitgud.io).
211
+
212
+ ## Considerations for Using the Data
213
+
214
+ ### Personal and Sensitive Information
215
+
216
+ The dataset may contain:
217
+ - Email addresses in code comments or configuration files
218
+ - API keys or credentials that were accidentally committed
219
+ - Personal information in comments or documentation
220
+
221
+ Users should exercise caution and implement appropriate filtering when using this data.
222
+
223
+ ### Licensing Information
224
 
225
+ This dataset is a collection of source code from repositories with various licenses. Any use of all or part of the code gathered in this dataset must abide by the terms of the original licenses, including attribution clauses when relevant. The license field in each data point indicates the license of the source repository.
 
 
 
 
data/gitgud-00000.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d17e901473d7354113c5da7c6d857ce85c75eae7b75a26cee9744d457d284635
3
+ size 1175754692
data/gitgud-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:aa74804560fbb4296cc2d650cf5b144978e2ce1c33f93094daad18c1c9156f37
3
+ size 1257588410
data/gitgud-00002.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0044e032bd453c7e3daad7d40cdad825e25a6ed9ffb2d204e34b36204e520d19
3
+ size 1177714174
data/gitgud-00003.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7851244d2a38a5623592373cad66555eb73655b1457b3b7cdcbaf6babdbbb7ee
3
+ size 1143832215
data/gitgud-00004.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f1bdad80ff48e49a391abe73d6943cc82cda4dfac2ea9ac35789ac91232aa208
3
+ size 1136198336
data/gitgud-00005.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f2ef9afb6487b6ab4ec575c796a5171ed3adf9e8248737fc15c8a2aaecd68027
3
+ size 1165140619
data/gitgud-00006.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9f5026eeb25880c4afe5f353b2d434ed8f8edcaf9942b03467545ac2cf6d9986
3
+ size 1138484208
data/gitgud-00007.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7fe592b8b8e31eeed7ce654d17bdbb7975f83454b075713f550bee768d13ef86
3
+ size 1162935866
data/gitgud-00008.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a1e2eeaa7484de845c1e6c55ac5b303e039291d9a003cfe94b3cda36457d00f8
3
+ size 1131053390
data/gitgud-00009.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:747187ad97455ca8c08f7d8606bc87778a2d865c293a8c863da47bd603c8b7e7
3
+ size 1118000781
data/gitgud-00010.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:31a097e6964c837f55562c70aa00e22f8c7b7bbdbf34acfa5c9952dfdd4c9bdf
3
+ size 1080617577
data/gitgud-00011.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6c5d271872bf4e5b8a7ca4a250016ecfc129536d95c89448d0b609fb570df629
3
+ size 1129193244
data/gitgud-00012.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cdd2c33b1da9fc17f762978a8fbd000a38663762365d2365b3b2680973c71694
3
+ size 1165651123
data/gitgud-00013.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e59266eee193ca2e71f714b79eeea9a75918479a76a3beea90a39b175e294820
3
+ size 1157759399
data/gitgud-00014.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:df678af5e0021d4c610c9807fc15da7150a71436056bdd28801ec24d23fa4b92
3
+ size 1113384863
data/gitgud-00015.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1bdc9332f620d329e2db97b36d7f44145d25a03d8164a8742e48c651e99cfd4a
3
+ size 1149564421
data/gitgud-00016.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2fb6d690e574665ac4b8919175decc386301e3263a9c3a2cc5c018834f751ec4
3
+ size 348457371