This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import itertools | |
if len(sys.argv) < 3: | |
print("Too few arguments -- at least 2 args are needed.") | |
exit(0) | |
print(len(sys.argv)) | |
words = list(map(list, sys.argv[1:])) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
from collections import Counter | |
df = pd.read_csv('judges.csv') | |
fields = ['Birth State', 'Gender', 'Race or Ethnicity', 'Party of Appointing President (1)'] | |
for field in fields: | |
counts = Counter(df[field]).most_common() | |
with open(field + '.csv', 'w+') as f: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import praw | |
reddit = praw.Reddit(client_id='clientid', | |
client_secret='clientsecret', | |
password='password', | |
user_agent='Script by me', | |
username='username') | |
checked_users = [] | |
with open('users.txt', 'w+') as f: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import praw | |
import re | |
from praw.models import Comment | |
from newspaper import Article | |
import time | |
uname = 'username' | |
reddit = praw.Reddit(client_id='clientid', | |
client_secret='clientsecret', | |
password='password', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import praw | |
import re | |
from collections import Counter | |
reddit = praw.Reddit(client_id='clientid', | |
client_secret='clientsecret', | |
password='password', | |
user_agent='Script by me', | |
username='username') |