Skip to content

Instantly share code, notes, and snippets.

View mattjaenicke's full-sized avatar

Matthias Jaenicke mattjaenicke

  • Lufthansa
View GitHub Profile
@mattjaenicke
mattjaenicke / twitter_network.py
Created March 19, 2016 00:00 — forked from mjcreativeventures/twitter_network.py
Process twitter data to generate an output file of relationships between twitter account
import glob
import os
import json
import sys
from collections import defaultdict
users = defaultdict(lambda: { 'followers': 0 })
for f in glob.glob('twitter-users/*.json'):
data = json.load(file(f))
@mattjaenicke
mattjaenicke / get_followers.py
Created March 18, 2016 23:59 — forked from mjcreativeventures/get_followers.py
Collect twitter followers
import tweepy
import time
import os
import sys
import json
import argparse
FOLLOWING_DIR = 'following'
MAX_FRIENDS = 200
FRIENDS_OF_FRIENDS_LIMIT = 200