mirror of
https://github.com/Watchful1/PushshiftDumps.git
synced 2025-07-28 00:55:17 -04:00
Bit of other work
This commit is contained in:
parent
2bae2a38d2
commit
c7aa694631
7 changed files with 483 additions and 0 deletions
15
personal/objects_per_month.py
Normal file
15
personal/objects_per_month.py
Normal file
|
@ -0,0 +1,15 @@
|
|||
import os
|
||||
from collections import defaultdict
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
input_folder = r"\\MYCLOUDPR4100\Public\pushshift_counts_summed"
|
||||
for subdir, dirs, files in os.walk(input_folder):
|
||||
for file_name in files:
|
||||
items = 0
|
||||
input_path = os.path.join(subdir, file_name)
|
||||
with open(input_path, 'r') as input_handle:
|
||||
for line in input_handle:
|
||||
subreddit, count = line.strip().split("\t")
|
||||
items += int(count)
|
||||
print(f"{file_name} {items}")
|
Loading…
Add table
Add a link
Reference in a new issue