AWfaw commited on
Commit
082d508
·
1 Parent(s): 9d7ccf7

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +26 -0
README.md CHANGED
@@ -2,3 +2,29 @@
2
  license: apache-2.0
3
  ---
4
  Cleaned dataset for experiments and fast pretokenizing. The SQL query to create the dataset is the following:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  license: apache-2.0
3
  ---
4
  Cleaned dataset for experiments and fast pretokenizing. The SQL query to create the dataset is the following:
5
+ ```python
6
+ SELECT
7
+ f.repo_name,
8
+ f.path,
9
+ c.copies,
10
+ c.size,
11
+ c.content,
12
+ l.license
13
+ FROM
14
+ (select f.*, row_number() over (partition by id order by path desc) as seqnum
15
+ from `bigquery-public-data.github_repos.files` AS f) f
16
+ JOIN
17
+ `bigquery-public-data.github_repos.contents` AS c
18
+ ON
19
+ f.id = c.id AND seqnum=1
20
+ JOIN
21
+ `bigquery-public-data.github_repos.licenses` AS l
22
+ ON
23
+ f.repo_name = l.repo_name
24
+ WHERE
25
+ NOT c.binary
26
+ AND ((f.path LIKE '%.vhdl'
27
+ OR f.path LIKE '%.vhd'
28
+ AND (c.size BETWEEN 0
29
+ AND 1048575)))
30
+ ```