Skip to content

Instantly share code, notes, and snippets.

View tommeagher's full-sized avatar

Tom Meagher tommeagher

View GitHub Profile
@tommeagher
tommeagher / #NICAR18 advice
Last active March 9, 2018 13:47
Note to self for #NICAR16
Next year, try to:
* Drink more water.
* Drink less coffee, beer and whiskey.
* Eat a vegetable, it won't kill you.
* Get up and hit the gym in the morning.
* Leave the hotel at least once every day.
* Bring extra charging cords and a powerstrip. Write your name on the supplies you lend out. (@ecarewgrovum)
* Eat meals with parties of 4. It's much easier to get a table in a busy town. For big groups, just get drinks.
* Split into smaller groups, if you take a large party to dinner, and you have to wait forever. (@chrislkeller)
@tommeagher
tommeagher / README.md
Created June 25, 2014 18:23
Setting up a new machine

Placeholder

@tommeagher
tommeagher / Janelle scrape
Created March 13, 2014 15:22
Helping troubleshoot a scrape for PythonJournos
import urllib2
import csv
from BeautifulSoup import BeautifulSoup
url = "https://www.uif.uillinois.edu/simpledetail.aspx?id=91"
html = urllib2.urlopen(url).read()
soup = BeautifulSoup(html)
names = soup.find('ul', {'class':'people'})
@tommeagher
tommeagher / fizzbuzz.py
Created June 17, 2013 17:00
Fizzbuzz.py
for x in range(101)[1:]:
if x % 3 == 0:
print "Fizz"
if x % 5 == 0:
print "Buzz"
if x % 5 == 0 and x % 3 == 0:
print "FizzBuzz"
else:
print x
@tommeagher
tommeagher / edgelist.py
Last active February 11, 2018 19:21
Create an edge list in Python.
mylist = ['john', 'paul', 'george', 'ringo', 'matthew', 'mark', 'luke']
resultlist = []
for person in mylist:
myindex = mylist.index(person)
newlist = mylist[:myindex]+mylist[myindex+1:] #make a new temp list without the person in it
for item in newlist:
mytuple = (person, item)
backtuple = (item, person)
@tommeagher
tommeagher / sunlightblog.md
Last active December 14, 2015 22:28
Sunlight Foundation blog post draft for Hack Jersey

By Tom Meagher, co-founder of Hack Jersey

Wrapped by the hanging air quotes of New York City and Philadelphia, New Jersey's history of invention and investigative reporting tends to get overlooked.

Even within the state, the two disciplines haven't acknowledged each other much. In recent years, there've been hackathons at local colleges or tech groups, but the Garden State's journalists never really mingled with programmers or dipped their toes into building news applications. Until now.

This winter, Hack Jersey held the state's first news hackathon and attracted dozens of journalists and developers to learn from and compete with each other. Sponsored by the NJ News Commons, Knight-Mozilla'sOpenNews and many other organizations, the hackathon revolved around a simple (and maybe obvious) idea. By bringing c

// Types
var one = 1;
var two = 2;
three;
window.three;
window.one = 1;
one = 1;
var one = [];
var one = {one: 1};
one.two = 1;
@tommeagher
tommeagher / hj13introscript
Created January 25, 2013 20:53
Hack Jersey intro gist
SLIDE - Hack Jersey logo
SLIDE - Log into the WIFI (Tom)
SLIDE - Tweet at #HackJersey (Tom)
SLIDE - NJ NEWS COMMONS - Debbie welcomes everyone. Anyone from MSU (Debbie)
SLIDE - OPENNEWS (Tom)
thank you for support of hackathon.

#Hack the news

Good morning. Welcome. My name is Tom Meagher and I am the data editor at Digital First Media. I work in a quasi-futuristic, post-apocalyptic newsroom in Manhattan called Project Thunderdome, where I lead a team of developer journalists building data-driven, interactive news applications.

I've spent my entire career in newsrooms and in the past few years I've been sucked into this world of news development.

So we're here for the weekend by this time tomorrow, we're going to have built the next amazing news application. My goal right now is to talk a little about how news development works, show you some examples and offer some advice for getting the most out of the weekend.

What's really great about HackJersey is that we are able to bring so many of you from these two worlds of news and programming together. Fundamentally, reporters are great storytellers and coders are great at building software, and working together there are greater possibilities than either can a

@tommeagher
tommeagher / trigger-zoom.js
Created March 16, 2012 20:46 — forked from thejefflarson/trigger-zoom.js
Possible TimelineSetter function to fix card flipping
var currentTimeline = TimelineSetter.Timeline.boot(options);
currentTimeline.api.onLoad(function() {
currentTimline.timeline.$('.TS-zoom_in').click();
});