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 / russian-accounts-unitetheright.csv
Last active Mar 10, 2019
Number of tweets in a 200,113 tweet #unitetheright dataset (collected August 15, 2017) sent by users identified as Russian trolls in https://intelligence.house.gov/uploadedfiles/exhibit_b.pdf
View russian-accounts-unitetheright.csv
screen_name tweets
elizeestr 6
mayluusstr 5
TEN_GOP 5
sterrsam 4
marrissatrr 4
thelmmisb 2
elinsstr 2
aswwimMOrris 2
verosanrrt 1
View follower_count.py
#!/usr/bin/env python3
import sys
import time
import twarc
t = twarc.Twarc()
screen_name = sys.argv[1]
while True:
View snowflakes.py
#!/usr/bin/env python3
import twarc
# This small script shows how to listen to the Twitter sample stream and
# deconstruct tweet ids into their various components. The tweet_components
# method accepts a tweet id and returns a dict object with key / values
# representing the various components of a tweet id. Each component has its own
# method detailing how values are extracted from the tweet id.
View flashcard.py
QUESTIONS = ["2 + 2", "10 // 5", "8 == 2 ** 3", "5 % 2 == 0"]
ANSWERS = ["4", "2", "True", "False"]
correct = 0
num_count = 0
while num_count < len(QUESTIONS):
user_answer = input('What is ' + QUESTIONS[num_count] + '?: ')
user_answer = user_answer.capitalize()
View table.md
Collected (Stream) 43,448 
Rate Limited 12,262
Hydrated 42,162 
Deleted 1,286 
Collected (Search) 35,861
View diffs.py
#!/usr/bin/env python3
# Use the Twitter archive's tweets.csv to download all the revision information
# for edits that were announced.
import csv
import sys
import json
import time
import requests
View batch_validate.py
#!/usr/bin/env python3
"""
usage: batch_validate.py <bags directory>
"""
import os
import sys
import bagit
@edsu
edsu / dat-ips.js
Last active Dec 31, 2018
list ip addresses of connections in dat network
View dat-ips.js
#!/usr/bin/env node
Dat = require('dat-node')
Dat('/Users/edsu/Dat/datproject.org', (err, dat) => {
dat.joinNetwork()
dat.network.on('connection', (conn, info) => {
console.log(info.host)
})
})
@edsu
edsu / waybackprov.csv
Last active Nov 29, 2018
% waybackprov --collapse --start 2014 --end 2018 http://www.ustream.tv/channel/bassemmasri
View waybackprov.csv
collection crawls
https://archive.org/details/alexacrawls 44
https://archive.org/details/archivebot 26
https://archive-it.org/collections/4783 12
https://archive.org/details/wide00013 3
https://archive.org/details/survey_00005 3
https://archive-it.org/collections/4667 2
https://archive.org/details/top_domains-02750 1
https://archive-it.org/collections/3680 1
https://archive-it.org/collections/4679 1
@edsu
edsu / whois.txt
Created Sep 27, 2018
whois 143.231.249.130
View whois.txt
% IANA WHOIS server
% for more information on IANA, visit http://www.iana.org
% This query returned 1 object
refer: whois.arin.net
inetnum: 143.0.0.0 - 143.255.255.255
organisation: Administered by ARIN
status: LEGACY
You can’t perform that action at this time.