Skip to content

Instantly share code, notes, and snippets.

Ed Summers edsu

Block or report user

Report or block edsu

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View followers.py
#!/usr/bin/env python
import sys
import twarc
# usage: followers.py <screen_name>
screen_name = sys.argv[1]
twitter = twarc.Twarc()
@edsu
edsu / drinks.csv
Last active May 14, 2019
% cat ~/irclogs/freenode/#code4lib.log | ./stats.py
View drinks.csv
drink count
Wild Snow Sprout Tea 180
Golden Orchid 173
Honey Black Tea 162
Keemun Full Leaf Tea 134
Bio Pao Chung Pouchong 121
Masala Chai 110
Bi Luo Chun Green Tea (Pi Lo Chun) 104
BH02: Holy Basil Purple Leaf 87
Bao Zhong Oolong Tea 78
View _config.yml
# ==============================================================
# WAX CONFIGURATION
# ==============================================================
# Jekyll configuration files are written in YAML format.
# Colons, tabs/spacing, and quotes are meaningful in YAML.
# It is recommended you look at the following guide to avoid
# syntax errors in this file:
# ~> https://learnxinyminutes.com/docs/yaml/
#
#
View jobs.py
#!/usr/bin/env python3
import re
import csv
import json
import twarc
import string
import collections
jobs = collections.Counter()
View jobs.csv
job count
waitress 33
teacher 25
bartender 25
receptionist 18
lifeguard 16
waiter 14
dishwasher 14
graphic designer 14
barmaid 14
View bills.py
import json
import requests
# get maryland's current house members
key = "your_key_here"
headers = {"X-API-KEY": key}
url = 'https://api.propublica.org/congress/v1/members/house/md/current.json'
resp = requests.get(url, headers=headers)
View get.py
import requests
key = "2B0i2oVrIov0sn69IL56GLcInvHqzv90E0U2kJLQ"
headers = {"X-API-KEY": key}
url = 'https://api.propublica.org/congress/v1/116/house/members.json'
resp = requests.get(url, headers=headers)
print(resp.json())
View get.py
import requests
key = "my_key"
headers = {"X-API-KEY": key}
url = 'https://api.propublica.org/congress/v1/116/house/members.json'
resp = requests.get(url, headers=headers)
print(resp.json())
View retweet_ratio.py
#!/usr/bin/env python3
import sys
from twarc import Twarc
screen_name = sys.argv[1]
twitter = Twarc()
tweets = 0
View obama-ids.txt
1113160564858122240
1113160564438650880
1113160563729862661
1113160562849054721
1113160560227627018
1113160559212421120
1113160556897292288
1113160556737957895
1113160555966197760
1113160555697668096
You can’t perform that action at this time.