-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathread_pickle.py
More file actions
28 lines (20 loc) · 955 Bytes
/
read_pickle.py
File metadata and controls
28 lines (20 loc) · 955 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import pickle
# Uncomment one of the follwoing in order to ~un-pickle~ certain files, whether you're looking for submission ids, titles or comments.
# # Prints all ids for a team. Replace "heat" with whichever team you want.
# fh = open("subreddit_data/ids/heat_ids.py", "rb")
# submission_titles = pickle.load(fh)
# for i in submission_titles:
# print(i)
# # Prints all submission titles for a team. Replace "heat" with whichever team you want.
# fh = open("subreddit_data/titles/heat_titles.py", "rb")
# submission_titles = pickle.load(fh)
# for i in submission_titles:
# print(i)
# # Prints all subreddit comments for a team. Replace "mavericks" with whichever team you want.
# fh = open("subreddit_data/comments/mavericks_comments.py", "rb")
# submission_comments = pickle.load(fh)
# for i in submission_comments:
# print(i)
fh = open("subreddit_data/sentiment_results.py", "rb")
sentiment_results = pickle.load(fh)
print(sentiment_results)