Skip to content

Instantly share code, notes, and snippets.

View chrislkeller's full-sized avatar

Chris Keller chrislkeller

View GitHub Profile
@chrislkeller
chrislkeller / crowdsourced-map-functions
Created August 5, 2013 20:07
A series of Google Apps Scripts I use to automate some aspects of making crowdsourced maps...
// Add the ID of the spreadsheet here
var spreadsheetID = '0An8W....';
// Add the name of the sheet here
var workingSheetID = 'working_spreadsheet';
// Add the table ID of the fusion table here
var tableIDFusion = '0An8W....';
// key needed for fusion tables api
<div><span>05:51:34 AM</span>
<span>08.15.13</span></div>
<div><a href='https://twitter.com/kimbui'><img src='http://a0.twimg.com/profile_images/807941574/avatar2_normal.jpg' /></a></div>
<div>I missed #wjchat w two of my favorites: @jmfbrooks &amp; @webjournalist. To make up for it, Im helping @justinlarsen finish transcript coding.</div>
<div><a href='https://twitter.com/kimbui/status/367886263010865152'>I missed #wjchat w two of my favorites: @jmfbrooks &amp; @webjournalist. To make up for it, Im helping @justinlarsen finish transcript coding.</a></div>
<div>kimbui</div>
<div>Los Angeles, CA</div>
<div><span>05:40:12 AM</span>
<span>08.15.13</span></div>
@chrislkeller
chrislkeller / 2013_nfl_sked.csv
Created September 9, 2013 00:31
2013 NFL schedule in csv format...
season week Date tv location time_eastern game
2013 1 Thu, Sep 5 NBC Sports Authority Field at Mile High 8:30 p.m. Baltimore at Denver
2013 1 Sun, Sep 8 CBS Ralph Wilson Stadium 1:00 p.m. New England at Buffalo
2013 1 Sun, Sep 8 CBS Soldier Field 1:00 p.m. Cincinnati at Chicago
2013 1 Sun, Sep 8 CBS FirstEnergy Stadium 1:00 p.m. Miami at Cleveland
2013 1 Sun, Sep 8 FOX Mercedes-Benz Superdome 1:00 p.m. Atlanta at New Orleans
2013 1 Sun, Sep 8 FOX MetLife Stadium 1:00 p.m. Tampa Bay at NY Jets
2013 1 Sun, Sep 8 CBS Heinz Field 1:00 p.m. Tennessee at Pittsburgh
2013 1 Sun, Sep 8 FOX Ford Field 1:00 p.m. Minnesota at Detroit
2013 1 Sun, Sep 8 CBS Lucas Oil Stadium 1:00 p.m. Oakland at Indianapolis
@chrislkeller
chrislkeller / output.txt
Last active April 21, 2019 22:45
Pull the screen name of followers given a twitter user using Tweepy. Output options for the Tweepy User object structure is here (may be outdated): http://tkang.blogspot.com/2011/01/tweepytwitter-api-user-object-structure.html
DEBUG:root:wendyfhsu
DEBUG:root:toastergrrl
DEBUG:root:ubernostrum
DEBUG:root:NickKatzmarek
DEBUG:root:kirkgoldsberry
DEBUG:root:jonnymutineer
DEBUG:root:MSrikat
DEBUG:root:ATXjj
DEBUG:root:RyanLanclos
DEBUG:root:monkeycycle_org
Downloading/unpacking psycopg2==2.5.1
Downloading psycopg2-2.5.1.tar.gz (684kB): 684kB downloaded
Running setup.py egg_info for package psycopg2
Installing collected packages: psycopg2
Running setup.py install for psycopg2
building 'psycopg2._psycopg' extension
cc -fno-strict-aliasing -fno-common -dynamic -I/usr/local/include -I/usr/local/opt/sqlite/include -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION="2.5.1 (dt dec pq3 ext)" -DPG_VERSION_HEX=0x090202 -DPSYCOPG_EXTENSIONS=1 -DPSYCOPG_NEW_BOOLEAN=1 -DHAVE_PQFREEMEM=1 -I/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/include/python2.7 -I. -I/Applications/Postgres.app/Contents/MacOS/include -I/Applications/Postgres.app/Contents/MacOS/include/server -c psycopg/psycopgmodule.c -o build/temp.macosx-10.8-x86_64-2.7/psycopg/psycopgmodule.o
cc -fno-strict-aliasing -fno-common -dynamic -I/usr/local/include -I/usr/local/opt/sqlite/include -DNDEBUG -g -fwrapv -O3 -Wall -Wstri
@chrislkeller
chrislkeller / google-form-redirect
Created October 18, 2013 19:38
Example of re-directing a google from away from boilerplate submission page...
<!-- begin form container -->
<div class="ss-form">
<script type="text/javascript">var submitted=false;</script>
<iframe name="hidden_iframe" id="hidden_iframe" style="display:none;" onload="if(submitted) {window.location='***THIS IS THE URL OF THE PAGE TO REDIRECT'; alert('Thank you for your submission. We\'re manually updating submissions and will be adding yours soon.');}"></iframe>
<!-- begin form -->
<form action="***THIS IS THE URL FROM THE LIVE FORM USED TO POST TO" method="POST" target="hidden_iframe" id="commentForm" onsubmit="submitted=true;">
<div class="errorbox-good">
@chrislkeller
chrislkeller / geojson_export.geojson
Last active December 26, 2015 13:39
Trying to convert shapefile to geojson in QGIS. How do I learn what projection I am looking for...
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@chrislkeller
chrislkeller / backup-requirements.sh
Last active April 12, 2021 10:09
A couple quick bash scripts so I can keep virtualenvs somewhat consistent across machines. backup-requirements.sh exports requirements files for each virtualenv, names the files for the virtualenv and sends them to a date-versioned directory. install-requirements.sh loops through a directory of requirements files and checks to see if a virtualen…
#!/bin/bash
# grab the virtualenvwrapper settings
export WORKON_HOME=$HOME/.virtualenvs
export PIP_VIRTUALENV_BASE=$WORKON_HOME
export PIP_RESPECT_VIRTUALENV=true
# the location of your virtualenv wrapper shell script may differ
source /usr/local/share/python/virtualenvwrapper.sh
@chrislkeller
chrislkeller / drought-project-ideas.md
Last active January 4, 2016 07:29
Brainstorming project aspects re: the drought in Calif.

"Gaming the drought" aka Drought Tracker

Our pitch is to create a "data-driven" narrative game that allows a user to assume a role, work their way through scenarios related to the drought, water conservation and water consumption, learn from their choices and share their results with their network of friends.

####Flow of the game

  1. User would choose a role and answer two or three questions that would further personalize the role
    • Ideas for roles:
      • Homeowner
  • Owner of an industrial business
@chrislkeller
chrislkeller / wjchat_tweets_tweetinstance.csv
Created February 1, 2014 02:59
Tweets compiled from the 1/29/14 #wjchat session. To create a link to the actual tweet, use the values in the tweet_screen_name and the tweet_id columns where: https://twitter.com/<tweet_screen_name>/status/<tweet_id>. A working example is: https://twitter.com/wjchat/status/428724058335608834 Be cautious when opening in Excel as it will tack zer…
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 4.
"id","tweet_hashtag","tweet_date_time","tweet_avatar","tweet_user_name","tweet_screen_name","tweet_text","tweet_id","tweet_user_location","session_date","session_slug"
10304,"#wjchat","2014-01-30 00:32:06+00","http://pbs.twimg.com/profile_images/1830163265/wjchat-twitter-icon_normal.png","wjchat","wjchat","Coming up in half an hour: Tonight on #wjchat, we're clearing the air -- what does it mean to be a ""digital"" journalist?","428687027458953216","Everywhere you are","2014-01-30 04:03:57.791376+00","1-29-2014"
10303,"#wjchat","2014-01-30 00:33:29+00","http://pbs.twimg.com/profile_images/378800000748762455/a475050acb1966ce2eb8562f056c09fd_normal.jpeg","Rachel C Stella","rachelcstella","RT @wjchat: Coming up in half an hour: Tonight on #wjchat, we're clearing the air -- what does it mean to be a ""digital"" journalist?","428687376551272448","La Salle, Ill.","2014-01-30 04:03:57.791376+00","1-29-2014"
10302,"#wjchat","2014-01-30 00:37:12+00","http://pbs.twimg.com/profile_images/378800000319335614/cdc1c0ce87570