mirror of
https://github.com/Watchful1/PushshiftDumps.git
synced 2025-07-26 16:15:37 -04:00
Add personal scripts to git
This commit is contained in:
parent
e4e8ad480c
commit
3be517ef12
12 changed files with 531 additions and 113 deletions
21
personal/comments_per_day.py
Normal file
21
personal/comments_per_day.py
Normal file
|
@ -0,0 +1,21 @@
|
|||
import utils
|
||||
import discord_logging
|
||||
from datetime import datetime
|
||||
|
||||
log = discord_logging.init_logging()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
day = None
|
||||
day_comments = 0
|
||||
for comment in utils.read_obj_zst(r"\\MYCLOUDPR4100\Public\reddit_final\wallstreetbets_comments.zst"):
|
||||
created_day = datetime.utcfromtimestamp(int(comment['created_utc'])).strftime("%m/%d/%y")
|
||||
if day is None:
|
||||
day = created_day
|
||||
if day != created_day:
|
||||
log.info(f"{day} {day_comments}")
|
||||
day_comments = 0
|
||||
day = created_day
|
||||
day_comments += 1
|
||||
|
||||
log.info(f"{day} {day_comments}")
|
Loading…
Add table
Add a link
Reference in a new issue