JulianAT commited on
Commit
da0cc47
·
verified ·
1 Parent(s): 847f55d

Publish validated code corpus

Browse files
README.md ADDED
@@ -0,0 +1,130 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ pretty_name: Personal Code Corpus (raw-max)
3
+ license: other
4
+ language:
5
+ - code
6
+ annotations_creators:
7
+ - no-annotation
8
+ language_creators:
9
+ - found
10
+ source_datasets:
11
+ - original
12
+ size_categories:
13
+ - 1K<n<10K
14
+ task_categories:
15
+ - text-generation
16
+ tags:
17
+ - code
18
+ - source-code
19
+ - code-completion
20
+ - deduplicated
21
+ - datasets
22
+ configs:
23
+ - config_name: default
24
+ data_files:
25
+ - split: train
26
+ path: data/train-*.parquet
27
+ - split: valid
28
+ path: data/valid-*.parquet
29
+ dataset_info:
30
+ features:
31
+ - name: text
32
+ dtype: string
33
+ - name: repo
34
+ dtype: string
35
+ - name: path
36
+ dtype: string
37
+ - name: language
38
+ dtype: string
39
+ - name: sha
40
+ dtype: string
41
+ - name: chunk_index
42
+ dtype: int32
43
+ - name: n_tokens
44
+ dtype: int32
45
+ splits:
46
+ - name: train
47
+ num_examples: 7172
48
+ num_bytes: 19583125
49
+ - name: valid
50
+ num_examples: 1189
51
+ num_bytes: 3248759
52
+ ---
53
+
54
+ # Personal code corpus: raw-max
55
+
56
+ This is a repo-walked style/volume corpus, **not a curated accepted-state dataset**. It captures
57
+ files present in local repository checkouts when the builder ran. It does not establish that every
58
+ chunk is correct, reviewed, authored exclusively by one person, or suitable as a preferred answer.
59
+
60
+ The corpus is intended for code-language modeling, code completion, and controlled personalization
61
+ experiments. It must not be used to infer repository ownership, software quality, security, or the
62
+ identity of an author.
63
+
64
+ ## Dataset summary
65
+
66
+ - Rows: 8,361
67
+ - Repositories with retained rows: 53
68
+ - Completion field: `text`
69
+ - Provenance fields: `repo`, `path`, `language`, `sha`, `chunk_index`, `n_tokens`
70
+ - Split: deterministic repository-level train/valid assignment; a repository never crosses splits
71
+ - Hash: SHA-256 of the emitted chunk text
72
+ - Token counts: deterministic tokenizer-independent lexical estimates used for approximate chunking
73
+
74
+ ## Load the dataset
75
+
76
+ ```python
77
+ from datasets import load_dataset
78
+
79
+ dataset = load_dataset("JulianAT/code-corpus")
80
+ ```
81
+
82
+ Each row has the following stable schema:
83
+
84
+ - `text`: source-code chunk used as the completion field
85
+ - `repo`, `path`: source provenance within the local corpus
86
+ - `language`: language inferred from the file extension
87
+ - `sha`: SHA-256 of the emitted `text`
88
+ - `chunk_index`: zero-based chunk position within the source file
89
+ - `n_tokens`: tokenizer-independent lexical token estimate
90
+
91
+ `raw-max` is bounded by code that actually exists after filtering. A claim of several million rows
92
+ is only credible when the source repositories contain enough retained code; `--max-rows` is a
93
+ ceiling, not a promised row count. This implementation supports at most 1,000,000 rows per variant.
94
+
95
+ ## Deduplication
96
+
97
+ Exact duplicate chunks are removed by SHA-256. Near duplicates are removed online with
98
+ `datasketch.MinHashLSH`, 128 permutations, token
99
+ 5-grams, and a Jaccard threshold of 0.85.
100
+
101
+ ## Exclusions and limitations
102
+
103
+ The walk excludes gitignored paths, `.git`, dependency/environment directories, build outputs,
104
+ vendored/generated directories and filename patterns, lockfiles, minified files, symlinks, binaries,
105
+ non-UTF-8 files, unsupported extensions, and files above 1,048,576 bytes.
106
+ The quality variant may additionally exclude tests, fixtures, and low-history files.
107
+
108
+ Repository licenses and obligations still apply to the source code. The dataset-level `other`
109
+ license value does not replace per-repository licenses. Paths and code can contain sensitive data;
110
+ inspect the artifacts before publishing. MinHash is approximate, lexical token counts are not model
111
+ token counts, current checkouts omit deleted historical code, and repository-level splitting can
112
+ produce an empty validation split when fewer than two repositories contribute rows.
113
+
114
+ This corpus can contain insecure, incomplete, duplicated, outdated, or otherwise low-quality code.
115
+ It is not a benchmark and has no correctness labels. The secret scanner uses a conservative set of
116
+ high-confidence patterns and is not proof that the corpus is free of private or identifying data.
117
+
118
+ ## Reproducibility and audit
119
+
120
+ `statistics.json` records row counts, split assignments, language distribution, filter decisions,
121
+ deduplication totals, and build parameters. Splits are deterministic for the recorded seed. Source
122
+ repository checkouts and the builder configuration are deliberately not included in the Hub repo.
123
+
124
+ ## Hub files
125
+
126
+ - `data/*.parquet`: Hugging Face loader source
127
+ - `dataset_infos.json`, `statistics.json`: schema, counts, filters, and dedup audit
128
+
129
+ The local build also creates Arrow and JSONL representations for training. They are intentionally
130
+ excluded from Hub publication because they duplicate the Parquet data.
data/train-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cb7a5af89fbe1147611287b2072b6b5dd3daba2580c184dcd286cfba25f4348f
3
+ size 6548017
data/valid-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e742a19f733d2715d9de717d29f32d3acc358b478f15690fa6e19790fbd22b0f
3
+ size 1177351
dataset_infos.json ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "default": {
3
+ "builder_name": "parquet",
4
+ "config_name": "default",
5
+ "dataset_name": "raw-max",
6
+ "dataset_size": 22831884,
7
+ "description": "Repository-walked personal code chunks for completion training.",
8
+ "download_size": 7725368,
9
+ "features": {
10
+ "chunk_index": {
11
+ "_type": "Value",
12
+ "dtype": "int32"
13
+ },
14
+ "language": {
15
+ "_type": "Value",
16
+ "dtype": "string"
17
+ },
18
+ "n_tokens": {
19
+ "_type": "Value",
20
+ "dtype": "int32"
21
+ },
22
+ "path": {
23
+ "_type": "Value",
24
+ "dtype": "string"
25
+ },
26
+ "repo": {
27
+ "_type": "Value",
28
+ "dtype": "string"
29
+ },
30
+ "sha": {
31
+ "_type": "Value",
32
+ "dtype": "string"
33
+ },
34
+ "text": {
35
+ "_type": "Value",
36
+ "dtype": "string"
37
+ }
38
+ },
39
+ "license": "other",
40
+ "size_in_bytes": 30557252,
41
+ "splits": {
42
+ "train": {
43
+ "name": "train",
44
+ "num_bytes": 19583125,
45
+ "num_examples": 7172
46
+ },
47
+ "valid": {
48
+ "name": "valid",
49
+ "num_bytes": 3248759,
50
+ "num_examples": 1189
51
+ }
52
+ }
53
+ }
54
+ }
statistics.json ADDED
@@ -0,0 +1,189 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "by_language": {
3
+ "CSS": 144,
4
+ "HTML": 53,
5
+ "Java": 13,
6
+ "JavaScript": 214,
7
+ "Python": 1530,
8
+ "SQL": 69,
9
+ "Shell": 29,
10
+ "Swift": 15,
11
+ "TOML": 9,
12
+ "TypeScript": 6170,
13
+ "XML": 3,
14
+ "YAML": 112
15
+ },
16
+ "by_repo": {
17
+ "1AHIF-BOT": 1,
18
+ "Illegale_Strassenrennen-Webprojekt": 8,
19
+ "Kriegsmarine_Webprojekt": 19,
20
+ "POS-23-24-Java": 13,
21
+ "Valorant-Webprojekt": 29,
22
+ "adapter-lab": 289,
23
+ "ai-video": 129,
24
+ "aucta": 262,
25
+ "brz-chatbot": 129,
26
+ "catchi": 235,
27
+ "clawguard": 448,
28
+ "codex-hackathon": 333,
29
+ "cursor-austria": 40,
30
+ "cursor-vienna-discord": 95,
31
+ "datagvat-mcp": 565,
32
+ "daytona-generative-ui": 354,
33
+ "diplomarbeit-ideen": 267,
34
+ "diplomarbeit-os": 1016,
35
+ "hacknation": 553,
36
+ "hacknation-app": 61,
37
+ "hacknation-landing": 203,
38
+ "hacknation-venture": 15,
39
+ "hacknation-web": 35,
40
+ "hands-on-ai": 70,
41
+ "htl-donaustadt-chatbot": 40,
42
+ "html-starter": 2,
43
+ "ifg-agentic": 250,
44
+ "interior-3d": 32,
45
+ "interiorly": 377,
46
+ "interiorly-dashboard": 64,
47
+ "interiorly-pitch": 96,
48
+ "interiorly-preview": 40,
49
+ "interiorly-promo-fake": 259,
50
+ "interiorly_changelog": 17,
51
+ "interiorly_landingpage": 55,
52
+ "jku-assignments": 83,
53
+ "jku-current-topics-report": 24,
54
+ "jku-encyclopedia": 335,
55
+ "mlpc-2026-task3": 65,
56
+ "mlpc-exam": 59,
57
+ "mlpc_task_4": 45,
58
+ "mystahd": 65,
59
+ "next-todo": 13,
60
+ "openai-build-week": 68,
61
+ "portfolio": 131,
62
+ "qdrant-hackathon": 172,
63
+ "start-hackathon": 64,
64
+ "synth-ui": 163,
65
+ "synth-ui-training": 15,
66
+ "tdot_chatbot": 139,
67
+ "untis-lehrer-extension": 19,
68
+ "young_ai_leaders_linz": 65,
69
+ "zero_one_hack_01": 435
70
+ },
71
+ "cap_reached": false,
72
+ "chunks_considered": 9443,
73
+ "dedup_report": {
74
+ "exact_duplicates_dropped": 533,
75
+ "near_duplicates_dropped": 549,
76
+ "rows_kept": 8361
77
+ },
78
+ "files_considered": 5501,
79
+ "files_selected": 5455,
80
+ "filter_report": {
81
+ "empty": 45,
82
+ "excluded_directory": 63,
83
+ "extension": 4626,
84
+ "gitignored": 5,
85
+ "lockfile": 55,
86
+ "secret_openai_key": 1,
87
+ "sensitive_path": 31,
88
+ "symlink": 2,
89
+ "symlink_directory": 2,
90
+ "too_large": 121
91
+ },
92
+ "generated_at": "2026-07-16T15:37:20+00:00",
93
+ "max_rows": 1000000,
94
+ "parameters": {
95
+ "chunk_overlap_tokens": 64,
96
+ "chunk_tokens": 896,
97
+ "max_file_bytes": 1048576,
98
+ "max_rows": 1000000,
99
+ "min_validation_repos": 3,
100
+ "minhash_permutations": 128,
101
+ "near_dedup_threshold": 0.85,
102
+ "seed": 42,
103
+ "shingle_tokens": 5,
104
+ "validation_ratio": 0.1
105
+ },
106
+ "repo_split": {
107
+ "1AHIF-BOT": "train",
108
+ "Illegale_Strassenrennen-Webprojekt": "train",
109
+ "Kriegsmarine_Webprojekt": "train",
110
+ "POS-23-24-Java": "train",
111
+ "Valorant-Webprojekt": "train",
112
+ "adapter-lab": "train",
113
+ "ai-video": "train",
114
+ "aucta": "train",
115
+ "brz-chatbot": "train",
116
+ "catchi": "train",
117
+ "clawguard": "train",
118
+ "codex-hackathon": "train",
119
+ "cursor-austria": "train",
120
+ "cursor-vienna-discord": "train",
121
+ "datagvat-mcp": "valid",
122
+ "daytona-generative-ui": "train",
123
+ "diplomarbeit-ideen": "train",
124
+ "diplomarbeit-os": "train",
125
+ "hacknation": "train",
126
+ "hacknation-app": "valid",
127
+ "hacknation-landing": "train",
128
+ "hacknation-venture": "train",
129
+ "hacknation-web": "train",
130
+ "hands-on-ai": "train",
131
+ "htl-donaustadt-chatbot": "train",
132
+ "html-starter": "train",
133
+ "ifg-agentic": "train",
134
+ "interior-3d": "valid",
135
+ "interiorly": "train",
136
+ "interiorly-dashboard": "train",
137
+ "interiorly-pitch": "valid",
138
+ "interiorly-preview": "train",
139
+ "interiorly-promo-fake": "train",
140
+ "interiorly_changelog": "train",
141
+ "interiorly_landingpage": "train",
142
+ "jku-assignments": "train",
143
+ "jku-current-topics-report": "train",
144
+ "jku-encyclopedia": "train",
145
+ "mlpc-2026-task3": "train",
146
+ "mlpc-exam": "train",
147
+ "mlpc_task_4": "train",
148
+ "mystahd": "train",
149
+ "next-todo": "train",
150
+ "openai-build-week": "train",
151
+ "portfolio": "train",
152
+ "qdrant-hackathon": "train",
153
+ "start-hackathon": "train",
154
+ "synth-ui": "train",
155
+ "synth-ui-training": "train",
156
+ "tdot_chatbot": "train",
157
+ "untis-lehrer-extension": "train",
158
+ "young_ai_leaders_linz": "train",
159
+ "zero_one_hack_01": "valid"
160
+ },
161
+ "repositories_discovered": 60,
162
+ "repositories_with_rows": 53,
163
+ "rows": {
164
+ "total": 8361,
165
+ "train": 7172,
166
+ "valid": 1189
167
+ },
168
+ "self_test": {
169
+ "loader": "datasets.load_dataset(\"JulianAT/code-corpus\")",
170
+ "splits": {
171
+ "train": 7172,
172
+ "valid": 1189
173
+ },
174
+ "status": "passed"
175
+ },
176
+ "sources": {
177
+ "config": "local config.yaml (not published)",
178
+ "repository_root": "local repository checkouts (not published)"
179
+ },
180
+ "tokens": {
181
+ "histogram": {
182
+ "0-255": 1891,
183
+ "256-511": 1495,
184
+ "512-1023": 4975
185
+ },
186
+ "total": 4968790
187
+ },
188
+ "variant": "raw-max"
189
+ }