yimingzhang commited on
Commit
51cff15
·
1 Parent(s): b176ee1
README.md CHANGED
@@ -1,3 +1,8 @@
1
  ---
 
 
 
 
 
2
  license: cc0-1.0
3
  ---
 
1
  ---
2
+ configs:
3
+ - config_name: all
4
+ data_files: "all/*.jsonl.gz"
5
+ - config_name: rapid-classical-correspondence
6
+ data_files: "rapid-classical-correspondence/*.jsonl.gz"
7
  license: cc0-1.0
8
  ---
{data → all}/2022-01.jsonl.gz RENAMED
File without changes
{data → all}/2022-02.jsonl.gz RENAMED
File without changes
{data → all}/2022-03.jsonl.gz RENAMED
File without changes
{data → all}/2022-04.jsonl.gz RENAMED
File without changes
{data → all}/2022-05.jsonl.gz RENAMED
File without changes
{data → all}/2022-06.jsonl.gz RENAMED
File without changes
{data → all}/2022-07.jsonl.gz RENAMED
File without changes
{data → all}/2022-08.jsonl.gz RENAMED
File without changes
{data → all}/2022-09.jsonl.gz RENAMED
File without changes
{data → all}/2022-10.jsonl.gz RENAMED
File without changes
{data → all}/2022-11.jsonl.gz RENAMED
File without changes
{data → all}/2022-12.jsonl.gz RENAMED
File without changes
rapid-classical-correspondence/2022-01.jsonl.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1cab1d846bb99e84b78e4781c8fdbedf9b231ece6001e6be423e928c42d9c35c
3
+ size 4616851865
rapid-classical-correspondence/2022-02.jsonl.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:de4ea3b87d4a1eececa16121b79405c696cafb3fb36c6952ff47821a36904bf2
3
+ size 3977524839
rapid-classical-correspondence/2022-03.jsonl.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:632392af1b61ad2aa8b97b0979e8d9a30800a4bbb10d0dce36c9b015e2d24b30
3
+ size 4147941338
rapid-classical-correspondence/2022-04.jsonl.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:eba76d5a69480076711c05412524d9ac99c1a54fc2a0f4a5bbaa9be5c546e2db
3
+ size 3925628605
rapid-classical-correspondence/2022-05.jsonl.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5d270547bbdbb03062e64bb8f90f4eb1cc7f0250b36c8424d0ee5d76ad38c07b
3
+ size 4001751151
rapid-classical-correspondence/2022-06.jsonl.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b07861e9bf30ee795b87a9acd220f4bc5dde868947511903f5df2878b022b0f0
3
+ size 3978903268
rapid-classical-correspondence/2022-07.jsonl.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:452a42add9b84de2065728f181c59d521318eb70d0190dddd643333702703c0f
3
+ size 4206131650
rapid-classical-correspondence/2022-08.jsonl.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:aeace31be91a9a5b0ec96dc6e25cbd59051bfa05b88a3c1377dfa8161bab372d
3
+ size 4194023958
rapid-classical-correspondence/2022-09.jsonl.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:81f6a1915ef617edbf68634bb5f043fbc3419745664302bf655312d29da50646
3
+ size 4034851108
rapid-classical-correspondence/2022-10.jsonl.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ed95bcac86c97e57b07dceca0bc7f7669759dd3761da33bb6051a22d24a6c923
3
+ size 4174836528
rapid-classical-correspondence/2022-11.jsonl.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5caf54ea4b18bc1dcc5662bf304d636a7aa843018f2c9d1216b9a71a6ad6b1ac
3
+ size 4064894717
rapid-classical-correspondence/2022-12.jsonl.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:33632259c9d48d7c6f63e435eebd77e29acc057ce5d02bce5f239b88f1d2ac82
3
+ size 4284555624
scripts/filter-rcc.py ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gzip
2
+ import json
3
+ from concurrent.futures import ProcessPoolExecutor
4
+
5
+ MONTHS = ["01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12"]
6
+
7
+ def filter_month(month: str):
8
+ with gzip.open(f"all/2022-{month}.jsonl.gz", "rb") as f:
9
+ with gzip.open(f"rapid-classical-correspondence/2022-{month}.jsonl.gz", "wb") as fo:
10
+ for i, line in enumerate(f):
11
+ d = json.loads(line)
12
+ s = d["event"]
13
+ if "Rapid" in s or "Classical" in s or "Correspondence" in s:
14
+ fo.write((json.dumps(d) + '\n').encode())
15
+ return 0
16
+
17
+ ppe = ProcessPoolExecutor(12)
18
+ for _ in ppe.map(filter_month, MONTHS):
19
+ ...
20
+
21
+ ppe.shutdown()
22
+ print("Done!")