Muennighoff
commited on
Commit
·
309d09e
1
Parent(s):
03f95d1
Update README.md
Browse files
README.md
CHANGED
@@ -1,330 +1,2 @@
|
|
1 |
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
Samples: 76674567
|
6 |
-
76,674,567
|
7 |
-
|
8 |
-
|
9 |
-
SQL queries executed one-by-one. They're split up as BigQuery was raising `Resources exceeded during query execution` when running all in one.
|
10 |
-
|
11 |
-
```sql
|
12 |
-
SELECT
|
13 |
-
commit, difference, subject, message, unnested_repo_name
|
14 |
-
FROM (
|
15 |
-
SELECT
|
16 |
-
repo_name,
|
17 |
-
lang.name AS language_name
|
18 |
-
FROM
|
19 |
-
`bigquery-public-data.github_repos.languages` AS lang_table,
|
20 |
-
UNNEST(LANGUAGE) AS lang) lang_table
|
21 |
-
JOIN
|
22 |
-
`bigquery-public-data.github_repos.licenses` AS license_table
|
23 |
-
ON
|
24 |
-
license_table.repo_name = lang_table.repo_name
|
25 |
-
JOIN (
|
26 |
-
SELECT
|
27 |
-
*
|
28 |
-
FROM
|
29 |
-
`bigquery-public-data.github_repos.commits` AS commits_table,
|
30 |
-
UNNEST(repo_name) AS unnested_repo_name) commits_table
|
31 |
-
ON
|
32 |
-
commits_table.unnested_repo_name = lang_table.repo_name
|
33 |
-
WHERE
|
34 |
-
((license_table.license LIKE 'mit')
|
35 |
-
OR (license_table.license LIKE 'artistic-2.0')
|
36 |
-
OR (license_table.license LIKE 'isc')
|
37 |
-
OR (license_table.license LIKE 'cc0-1.0')
|
38 |
-
OR (license_table.license LIKE 'epl-1.0')
|
39 |
-
OR (license_table.license LIKE 'mpl-2.0')
|
40 |
-
OR (license_table.license LIKE 'unlicense')
|
41 |
-
OR (license_table.license LIKE 'apache-2.0')
|
42 |
-
OR (license_table.license LIKE 'bsd-3-clause')
|
43 |
-
OR (license_table.license LIKE 'agpl-3.0')
|
44 |
-
OR (license_table.license LIKE 'lgpl-2.1')
|
45 |
-
OR (license_table.license LIKE 'bsd-2-clause'))
|
46 |
-
AND ( (lang_table.language_name LIKE 'Python')
|
47 |
-
OR (lang_table.language_name LIKE 'Java')
|
48 |
-
OR (lang_table.language_name LIKE 'JavaScript')
|
49 |
-
OR (lang_table.language_name LIKE 'HTML')
|
50 |
-
OR (lang_table.language_name LIKE 'Common Lisp')
|
51 |
-
OR (lang_table.language_name LIKE 'Shell')
|
52 |
-
OR (lang_table.language_name LIKE 'R')
|
53 |
-
OR (lang_table.language_name LIKE 'Perl%')
|
54 |
-
OR (lang_table.language_name LIKE 'SQL')
|
55 |
-
OR (lang_table.language_name LIKE 'C')
|
56 |
-
OR (lang_table.language_name LIKE 'C#')
|
57 |
-
OR (lang_table.language_name LIKE 'C++')
|
58 |
-
OR (lang_table.language_name LIKE 'TypeScript')
|
59 |
-
OR (lang_table.language_name LIKE 'Go')
|
60 |
-
OR (lang_table.language_name LIKE 'Rust')
|
61 |
-
OR (lang_table.language_name LIKE 'Swift')
|
62 |
-
OR (lang_table.language_name LIKE 'PHP')
|
63 |
-
OR (lang_table.language_name LIKE 'Dart')
|
64 |
-
OR (lang_table.language_name LIKE 'Kotlin')
|
65 |
-
OR (lang_table.language_name LIKE 'Matlab')
|
66 |
-
OR (lang_table.language_name LIKE 'MATLAB')
|
67 |
-
OR (lang_table.language_name LIKE 'Ruby') )
|
68 |
-
AND
|
69 |
-
LENGTH(commits_table.message) > 5
|
70 |
-
AND
|
71 |
-
LENGTH(commits_table.message) < 10000
|
72 |
-
AND LOWER(commits_table.message) NOT LIKE 'update readme.md'
|
73 |
-
AND LOWER(commits_table.message) NOT LIKE 'initial commit'
|
74 |
-
AND LOWER(commits_table.message) NOT LIKE 'update'
|
75 |
-
AND LOWER(commits_table.message) NOT LIKE 'mirroring from micro.blog.'
|
76 |
-
AND LOWER(commits_table.message) NOT LIKE 'update data.json'
|
77 |
-
AND LOWER(commits_table.message) NOT LIKE 'update data.js'
|
78 |
-
AND LOWER(commits_table.message) NOT LIKE 'add files via upload'
|
79 |
-
AND LOWER(commits_table.message) NOT LIKE 'update readme'
|
80 |
-
AND LOWER(commits_table.message) NOT LIKE "can't you see i'm updating the time?"
|
81 |
-
AND LOWER(commits_table.message) NOT LIKE 'pi push'
|
82 |
-
AND LOWER(commits_table.message) NOT LIKE 'dummy'
|
83 |
-
AND LOWER(commits_table.message) NOT LIKE 'update index.html'
|
84 |
-
AND LOWER(commits_table.message) NOT LIKE 'first commit'
|
85 |
-
AND LOWER(commits_table.message) NOT LIKE 'create readme.md'
|
86 |
-
AND LOWER(commits_table.message) NOT LIKE 'heartbeat update'
|
87 |
-
AND LOWER(commits_table.message) NOT LIKE 'updated readme'
|
88 |
-
AND LOWER(commits_table.message) NOT LIKE 'update log'
|
89 |
-
AND LOWER(commits_table.message) NOT LIKE 'test'
|
90 |
-
AND LOWER(commits_table.message) NOT LIKE 'no message'
|
91 |
-
AND LOWER(commits_table.message) NOT LIKE 'readme'
|
92 |
-
AND LOWER(commits_table.message) NOT LIKE 'wip'
|
93 |
-
AND LOWER(commits_table.message) NOT LIKE 'updates'
|
94 |
-
AND LOWER(commits_table.message) NOT LIKE 'first commit'
|
95 |
-
AND LOWER(commits_table.message) NOT LIKE 'commit'
|
96 |
-
AND LOWER(commits_table.message) NOT LIKE 'update _config.yaml'
|
97 |
-
AND LOWER(commits_table.message) NOT LIKE 'update data.json'
|
98 |
-
AND LOWER(commits_table.message) NOT LIKE 'update data.js'
|
99 |
-
AND LOWER(commits_table.message) NOT LIKE 'merge%';
|
100 |
-
```
|
101 |
-
|
102 |
-
3,641,694,786
|
103 |
-
|
104 |
-
|
105 |
-
```sql
|
106 |
-
SELECT commit, subject, message, STRING_AGG(unnested_repo_name) AS repos
|
107 |
-
FROM `huggingface-ml.commits_table_24122022.commits_table_base`
|
108 |
-
GROUP BY commit, subject, message
|
109 |
-
```
|
110 |
-
|
111 |
-
```sql
|
112 |
-
SELECT *
|
113 |
-
FROM (
|
114 |
-
SELECT
|
115 |
-
commit,subject,message,repos,difference
|
116 |
-
FROM
|
117 |
-
`huggingface-ml.commits_table_24122022.commits_table_dedup` AS commits_table_dedup
|
118 |
-
JOIN (
|
119 |
-
SELECT
|
120 |
-
commit AS commit_base,difference
|
121 |
-
FROM
|
122 |
-
`bigquery-public-data.github_repos.commits` AS commits_table_base
|
123 |
-
) commits_table_base
|
124 |
-
ON
|
125 |
-
commits_table_base.commit_base = commits_table_dedup.commit
|
126 |
-
)
|
127 |
-
```
|
128 |
-
|
129 |
-
```sql
|
130 |
-
SELECT
|
131 |
-
commit,subject,message,repos,d.old_path as old_file,d.new_path as new_file
|
132 |
-
FROM
|
133 |
-
`huggingface-ml.commits_table_24122022.commits_table_dedup_difference` AS commits_table,
|
134 |
-
UNNEST(difference) AS d
|
135 |
-
WHERE (d.old_path = d.new_path) AND (d.old_path IS NOT NULL) AND (d.new_path IS NOT NULL)
|
136 |
-
```
|
137 |
-
|
138 |
-
```sql
|
139 |
-
SELECT commit,subject,message,repos,old_file,new_file
|
140 |
-
FROM (
|
141 |
-
(
|
142 |
-
SELECT commit AS commit_base
|
143 |
-
FROM `huggingface-ml.commits_table_24122022.commits_table_dedup_files`
|
144 |
-
GROUP BY commit
|
145 |
-
HAVING COUNT(*) = 1
|
146 |
-
)
|
147 |
-
JOIN (
|
148 |
-
SELECT
|
149 |
-
commit,subject,message,repos,old_file,new_file
|
150 |
-
FROM
|
151 |
-
`huggingface-ml.commits_table_24122022.commits_table_dedup_files` AS commits_table_base
|
152 |
-
) commits_table_base
|
153 |
-
ON commits_table_base.commit = commit_base
|
154 |
-
)
|
155 |
-
```
|
156 |
-
|
157 |
-
|
158 |
-
Then export the final dataset from GCP to a bucket as parquet files.
|
159 |
-
Then copy those parquet files to the hf dataset on an instance.
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
### Redoing it to add licenses
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
Samples: 76674567
|
172 |
-
76,674,567
|
173 |
-
|
174 |
-
|
175 |
-
SQL queries executed one-by-one. They're split up as BigQuery was raising `Resources exceeded during query execution` when running all in one.
|
176 |
-
|
177 |
-
```sql
|
178 |
-
SELECT
|
179 |
-
commit, difference, subject, message, unnested_repo_name, license
|
180 |
-
FROM (
|
181 |
-
SELECT
|
182 |
-
repo_name,
|
183 |
-
lang.name AS language_name
|
184 |
-
FROM
|
185 |
-
`bigquery-public-data.github_repos.languages` AS lang_table,
|
186 |
-
UNNEST(LANGUAGE) AS lang) lang_table
|
187 |
-
JOIN
|
188 |
-
`bigquery-public-data.github_repos.licenses` AS license_table
|
189 |
-
ON
|
190 |
-
license_table.repo_name = lang_table.repo_name
|
191 |
-
JOIN (
|
192 |
-
SELECT
|
193 |
-
*
|
194 |
-
FROM
|
195 |
-
`bigquery-public-data.github_repos.commits` AS commits_table,
|
196 |
-
UNNEST(repo_name) AS unnested_repo_name) commits_table
|
197 |
-
ON
|
198 |
-
commits_table.unnested_repo_name = lang_table.repo_name
|
199 |
-
WHERE
|
200 |
-
((license_table.license LIKE 'mit')
|
201 |
-
OR (license_table.license LIKE 'artistic-2.0')
|
202 |
-
OR (license_table.license LIKE 'isc')
|
203 |
-
OR (license_table.license LIKE 'cc0-1.0')
|
204 |
-
OR (license_table.license LIKE 'epl-1.0')
|
205 |
-
OR (license_table.license LIKE 'mpl-2.0')
|
206 |
-
OR (license_table.license LIKE 'unlicense')
|
207 |
-
OR (license_table.license LIKE 'apache-2.0')
|
208 |
-
OR (license_table.license LIKE 'bsd-3-clause')
|
209 |
-
OR (license_table.license LIKE 'agpl-3.0')
|
210 |
-
OR (license_table.license LIKE 'lgpl-2.1')
|
211 |
-
OR (license_table.license LIKE 'bsd-2-clause'))
|
212 |
-
AND ( (lang_table.language_name LIKE 'Python')
|
213 |
-
OR (lang_table.language_name LIKE 'Java')
|
214 |
-
OR (lang_table.language_name LIKE 'JavaScript')
|
215 |
-
OR (lang_table.language_name LIKE 'HTML')
|
216 |
-
OR (lang_table.language_name LIKE 'Common Lisp')
|
217 |
-
OR (lang_table.language_name LIKE 'Shell')
|
218 |
-
OR (lang_table.language_name LIKE 'R')
|
219 |
-
OR (lang_table.language_name LIKE 'Perl%')
|
220 |
-
OR (lang_table.language_name LIKE 'SQL')
|
221 |
-
OR (lang_table.language_name LIKE 'C')
|
222 |
-
OR (lang_table.language_name LIKE 'C#')
|
223 |
-
OR (lang_table.language_name LIKE 'C++')
|
224 |
-
OR (lang_table.language_name LIKE 'TypeScript')
|
225 |
-
OR (lang_table.language_name LIKE 'Go')
|
226 |
-
OR (lang_table.language_name LIKE 'Rust')
|
227 |
-
OR (lang_table.language_name LIKE 'Swift')
|
228 |
-
OR (lang_table.language_name LIKE 'PHP')
|
229 |
-
OR (lang_table.language_name LIKE 'Dart')
|
230 |
-
OR (lang_table.language_name LIKE 'Kotlin')
|
231 |
-
OR (lang_table.language_name LIKE 'Matlab')
|
232 |
-
OR (lang_table.language_name LIKE 'MATLAB')
|
233 |
-
OR (lang_table.language_name LIKE 'Ruby') )
|
234 |
-
AND
|
235 |
-
LENGTH(commits_table.message) > 5
|
236 |
-
AND
|
237 |
-
LENGTH(commits_table.message) < 10000
|
238 |
-
AND LOWER(commits_table.message) NOT LIKE 'update readme.md'
|
239 |
-
AND LOWER(commits_table.message) NOT LIKE 'initial commit'
|
240 |
-
AND LOWER(commits_table.message) NOT LIKE 'update'
|
241 |
-
AND LOWER(commits_table.message) NOT LIKE 'mirroring from micro.blog.'
|
242 |
-
AND LOWER(commits_table.message) NOT LIKE 'update data.json'
|
243 |
-
AND LOWER(commits_table.message) NOT LIKE 'update data.js'
|
244 |
-
AND LOWER(commits_table.message) NOT LIKE 'add files via upload'
|
245 |
-
AND LOWER(commits_table.message) NOT LIKE 'update readme'
|
246 |
-
AND LOWER(commits_table.message) NOT LIKE "can't you see i'm updating the time?"
|
247 |
-
AND LOWER(commits_table.message) NOT LIKE 'pi push'
|
248 |
-
AND LOWER(commits_table.message) NOT LIKE 'dummy'
|
249 |
-
AND LOWER(commits_table.message) NOT LIKE 'update index.html'
|
250 |
-
AND LOWER(commits_table.message) NOT LIKE 'first commit'
|
251 |
-
AND LOWER(commits_table.message) NOT LIKE 'create readme.md'
|
252 |
-
AND LOWER(commits_table.message) NOT LIKE 'heartbeat update'
|
253 |
-
AND LOWER(commits_table.message) NOT LIKE 'updated readme'
|
254 |
-
AND LOWER(commits_table.message) NOT LIKE 'update log'
|
255 |
-
AND LOWER(commits_table.message) NOT LIKE 'test'
|
256 |
-
AND LOWER(commits_table.message) NOT LIKE 'no message'
|
257 |
-
AND LOWER(commits_table.message) NOT LIKE 'readme'
|
258 |
-
AND LOWER(commits_table.message) NOT LIKE 'wip'
|
259 |
-
AND LOWER(commits_table.message) NOT LIKE 'updates'
|
260 |
-
AND LOWER(commits_table.message) NOT LIKE 'first commit'
|
261 |
-
AND LOWER(commits_table.message) NOT LIKE 'commit'
|
262 |
-
AND LOWER(commits_table.message) NOT LIKE 'update _config.yaml'
|
263 |
-
AND LOWER(commits_table.message) NOT LIKE 'update data.json'
|
264 |
-
AND LOWER(commits_table.message) NOT LIKE 'update data.js'
|
265 |
-
AND LOWER(commits_table.message) NOT LIKE 'merge%';
|
266 |
-
```
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
3,641,694,786
|
271 |
-
|
272 |
-
|
273 |
-
```sql
|
274 |
-
SELECT commit, subject, message, STRING_AGG(unnested_repo_name), license AS repos
|
275 |
-
FROM `huggingface-ml.commits_table_24122022.commits_table_base`
|
276 |
-
GROUP BY commit, subject, message, license
|
277 |
-
```
|
278 |
-
|
279 |
-
```sql
|
280 |
-
SELECT *
|
281 |
-
FROM (
|
282 |
-
SELECT
|
283 |
-
commit,subject,message,repos,difference,license
|
284 |
-
FROM
|
285 |
-
`huggingface-ml.commits_table_24122022.commits_table_dedup` AS commits_table_dedup
|
286 |
-
JOIN (
|
287 |
-
SELECT
|
288 |
-
commit AS commit_base,difference
|
289 |
-
FROM
|
290 |
-
`bigquery-public-data.github_repos.commits` AS commits_table_base
|
291 |
-
) commits_table_base
|
292 |
-
ON
|
293 |
-
commits_table_base.commit_base = commits_table_dedup.commit
|
294 |
-
)
|
295 |
-
```
|
296 |
-
|
297 |
-
```sql
|
298 |
-
SELECT
|
299 |
-
commit,subject,message,repos,license,d.old_path as old_file,d.new_path as new_file
|
300 |
-
FROM
|
301 |
-
`huggingface-ml.commits_table_24122022.commits_table_dedup_difference` AS commits_table,
|
302 |
-
UNNEST(difference) AS d
|
303 |
-
WHERE (d.old_path = d.new_path) AND (d.old_path IS NOT NULL) AND (d.new_path IS NOT NULL)
|
304 |
-
```
|
305 |
-
|
306 |
-
```sql
|
307 |
-
SELECT commit,repos,licenses
|
308 |
-
FROM (
|
309 |
-
(
|
310 |
-
SELECT commit AS commit_base
|
311 |
-
FROM `huggingface-ml.commits_table_24122022.commits_table_dedup_files`
|
312 |
-
GROUP BY commit
|
313 |
-
HAVING COUNT(*) = 1
|
314 |
-
)
|
315 |
-
JOIN (
|
316 |
-
SELECT
|
317 |
-
commit,subject,message,repos,old_file,new_file
|
318 |
-
FROM
|
319 |
-
`huggingface-ml.commits_table_24122022.commits_table_dedup_files` AS commits_table_base
|
320 |
-
) commits_table_base
|
321 |
-
ON commits_table_base.commit = commit_base
|
322 |
-
)
|
323 |
-
```
|
324 |
-
|
325 |
-
|
326 |
-
Then export the final dataset from GCP to a bucket as parquet files.
|
327 |
-
Then copy those parquet files to the hf dataset on an instance.
|
328 |
-
|
329 |
-
|
330 |
-
|
|
|
1 |
|
2 |
+
GitHub metadata for https://huggingface.co/datasets/bigcode/commitpack
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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