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
@edsu
edsu / DH2020.md
Last active Oct 15, 2019
Panel proposal for DH2020.
View DH2020.md

Documenting Documenting the Now

Ed Summers & Bergis Jules

Over the past four years the Documenting the Now project has been working to help build a community of practice around social media archiving that centers the ethical concerns of content creators, rather than simply the interests of cultural heritage organizations or social media platforms. Starting in the aftermath of the killing of Michael Brown in Ferguson Missouri the project developed the Ferguson Principles to help guide memory workers who are interested in documenting activism and social movements.

The Ferguson Principles have been put to work in a set of workshops with activist communities in the United States, in order to generate new knowledge practices for memory work in the age of social media. In addition the project has also been actively developing a portfolio of tools for data collection, publishing and analysis and using existing web archiving tools to help cultivate new approaches, and relationships between archivists, researche

@edsu
edsu / twint-fetch.py
Last active Oct 10, 2019
Convincing twint to not give up.
View twint-fetch.py
#!/usr/bin/env python3
import os
import csv
import time
import twint
import random
config = twint.Config()
config.Search = 'nodapl'
View embarb-1.py
hours_worked = float(input("Enter hours worked: "))
hourly_rate = float(input("Enter hourly rate: "))
def salary(hours_worked, hourly_rate):
if hourly_rate < 15.0:
print("I'm Sorry " + str(hourly_rate) + " is lower than the minimum wage!")
else:
pay = hours_worked * hourly_rate
print("Pay: " + str(pay))
View toni-morrison-tweeted-urls.csv
We can't make this file beautiful and searchable because it's too large.
url,tweets
https://www.nytimes.com/2019/08/06/books/toni-morrison-dead.html,5099
https://www.vulture.com/2019/08/toni-morrison-dead-at-88.html,4222
https://www.theguardian.com/books/2019/aug/06/toni-morrison-author-and-pulitzer-winner-dies-aged-88,2118
https://www.npr.org/2019/08/06/542391535/toni-morrison-whose-soaring-novels-were-rooted-in-black-lives-dies-at-88?t=1565529065738,2009
https://www.washingtonpost.com/local/obituaries/toni-morrison-nobel-laureate-who-transfigured-american-literature-dies-at-88/2019/08/06/49cd4d46-b84d-11e9-a091-6a96e67d9cce_story.html,1463
https://www.marianne.net/politique/muriel-penicaud-reussit-l-hommage-toni-morrison-le-plus-insultant-de-l-histoire,1186
https://www.newyorker.com/magazine/2003/10/27/ghosts-in-the-house,1176
https://elpais.com/cultura/2019/08/06/actualidad/1565098762_496430.html,1171
https://www.newyorker.com/magazine/2016/11/21/making-america-white-again,1159
View http-response.txt
% curl -i https://twitter.com/BernieSanders/status/1161005398817722368
HTTP/2 302
cache-control: no-cache, no-store, must-revalidate, pre-check=0, post-check=0
content-length: 122
content-type: text/html;charset=utf-8
date: Tue, 13 Aug 2019 11:10:07 GMT
expires: Tue, 31 Mar 1981 05:00:00 GMT
last-modified: Tue, 13 Aug 2019 11:10:07 GMT
location: https://twitter.com/shaunking/status/1161003857176084480
@edsu
edsu / feral-hogs-urls.csv
Last active Aug 6, 2019
% twarc search "feral hogs" | unshrtn.py | urls.py | grep -v twitter.com | sort | uniq -c | sort -rn | csv > feral-hogs-urls.csv
View feral-hogs-urls.csv
tweet_count url
304 https://www.gq.com/story/hogblog
32 https://www.wideopenspaces.com/texas-losing-war-feral-hogs-2/
26 https://globalnews.ca/news/2630688/radioactive-wild-boars-overrun-northern-japan-5-years-after-nuclear-disaster/
24 https://www.youtube.com/watch?v=DJFFls6mBb8
19 https://www.thecut.com/2019/08/what-to-name-your-30-to-50-feral-hogs.html
19 https://knowyourmeme.com/memes/feral-hogs
14 https://splinternews.com/hog-blog-1836979161
10 https://www.outsideonline.com/2141891/attack-radioactive-wild-boars
8 https://wvupressonline.com/node/780
View langdetect_test.py
#!/usr/bin/env python
import csv
from xml.etree import ElementTree
from langdetect import detect_langs
from requests_html import HTMLSession
http = HTMLSession()
def langs(url):
@edsu
edsu / modern-titles-alpha.txt
Created Jun 6, 2019
csvcut -c 2 NSRLProd.txt | perl -nle 's/"//g; print uc(substr($_, 0, 1))' | sort | uniq -c > modern-titles-alpha.txt
View modern-titles-alpha.txt
2 <
60
14 .
6 {
2 ?
3 0
118 1
27 2
50 3
43 4
@edsu
edsu / ios-titles-alpha.txt
Last active Jun 6, 2019
csvcut -c 2 NSRLProd.txt | perl -nle 's/"//g; print uc(substr($_, 0, 1))' | sort | uniq -c > ios-titles-alpha.txt
View ios-titles-alpha.txt
3 `
1 .
4 1
1 6
1 8
88 A
17 B
35 C
22 D
9 E
View followers.py
#!/usr/bin/env python
import sys
import twarc
# usage: followers.py <screen_name>
screen_name = sys.argv[1]
twitter = twarc.Twarc()
You can’t perform that action at this time.