Skip to content

Instantly share code, notes, and snippets.

View chrislkeller's full-sized avatar

Chris Keller chrislkeller

View GitHub Profile
@chrislkeller
chrislkeller / init.py
Created January 10, 2015 00:38
When you need to name data blogs and data teams and you can't think of anything... script it.
import random
from random import shuffle
data_terms = [
"Parser",
"Numbered",
"Quantified",
"Quantifying",
"Clusters",
"Data",

In django template, I am linking to css like this: <link href="..{% static 'css/style.css' %}" media="screen" rel="stylesheet" type="text/css" />

The baked output gives me exactly what I asked for which is: <link href="../static/css/main-foundation-style-v3.css" media="screen" rel="stylesheet" type="text/css" />

That works fine for each BuildableDetailView that is baked but requires me to change the path on the BuildableListView` to <link href="static/css/style.css" media="screen" rel="stylesheet" type="text/css" />

I do not have the optional build_path set in the BuildableListView class.

Also relevant: STATIC_ROOT = os.path.join(SITE_ROOT, "public", "static")

L.geoJson(hydrologic_regions, {
style: function(feature){
//console.log(layerData[i].hydrologic_region);
//var thisFeature = _.where(layerData, {hydrologic_region: feature.properties.FIRST_HRNA});
@chrislkeller
chrislkeller / _2015_talkpay_tweets.csv
Last active August 29, 2015 14:20
Scrape of #talkpay tweets on May 1, 2015 at 2:15 p.m. pacific... Based on code used for https://github.com/chrislkeller/nicar-tweets
We can't make this file beautiful and searchable because it's too large.
"hashtag","tweet_utc_date","user_name","user_screen_name","bot_or_not","tweet_text","tweet_url","tweet_id","user_profile_image_url","user_location","source","in_reply_to_screen_name","in_reply_to_status_id","image_link","retweet_count","favorite_count","time_zone","geo_enabled","geography","coordinates","lang"
"#talkpay","2015-05-07 23:00:55+00:00","Gina Helfrich, Ph.D.","ginahelfrich","False","RT @anitaborg_org: Are you an ally to #WomenIntech? Participate in the dialogue around #TalkPay. Most folks don't realize they're underpai","https://twitter.com/ginahelfrich/status/596449663026266112","596449663026266112","http://pbs.twimg.com/profile_images/583425594890661888/eUkdJ_ct_normal.jpg","Austin, TX","<a href=""http://twitter.com"" rel=""nofollow"">Twitter Web Client</a>","","","","12","0","Central Time (US & Canada)","False","","","en"
@chrislkeller
chrislkeller / _2015_#hackforLA_tweets.csv
Created June 9, 2015 06:28
Tweets from the June 6-7 #HackForLa
We can't make this file beautiful and searchable because it's too large.
"hashtag","tweet_utc_date","user_name","user_screen_name","bot_or_not","tweet_text","tweet_url","tweet_id","user_profile_image_url","user_location","source","in_reply_to_screen_name","in_reply_to_status_id","image_link","retweet_count","favorite_count","time_zone","geo_enabled","geography","coordinates","lang"
"#hackforLA","2015-06-09 05:50:30+00:00","Vicky Rodriguez","151ffed5b78a43f","False","RT @ImmigranNacion: Congratulations, Team ExBully @cybercodetwins @jorge_orrantia won the #HackForLA #HackforChange #antibullying #AINF htt","https://twitter.com/151ffed5b78a43f/status/608149149960146944","608149149960146944","http://abs.twimg.com/sticky/default_profile_images/default_profile_4_normal.png","","<a href=""http://twitter.com/download/android"" rel=""nofollow"">Twitter for Android</a>","","","","127","0","","False","","","en"
"#hackforLA","2015-06-09 04:04:34+00:00","Glorys ","GlorysPz","False","RT @ImmigranNacion: Congratulations, Team ExBully @cybercodetwins @jorge_orrantia won the #HackForLA #HackforCha
@chrislkeller
chrislkeller / supplies.md
Last active August 29, 2015 14:23
Some hints as to what supplies new parents could use as the journey begins...

Friend No. 1

  • STROLLER/CARSEAT

    • Baby Jogger City Mini (We picked this over the Britax B-Agile. The Baby Jogger handle height was a little more comfortable for me, but they are essentially the same.)
    • Chicco KeyFit w/infant insert
    • Adapter to use the infant carseat with the stroller
    • Stroller console (useful for neighborhood walks, to hold a coffee mug, keys, burp cloth)
  • CRIB:

    • Ikea Sundvik (The reviews are mixed, because previous versions had a recall. But for us, it does the job, feels sturdy for the right price. We have friends who spent a lot more and are also happy, so to each their own.)
@chrislkeller
chrislkeller / script.py
Created July 7, 2015 23:03
Beginning of a class to work through the rap collaboration data...
import logging
import json
logger = logging.getLogger("root")
logging.basicConfig(
format = "\033[1;36m%(levelname)s: %(filename)s (def %(funcName)s %(lineno)s): \033[1;37m %(message)s",
level=logging.DEBUG
)
class SearchJsonFile(object):
@chrislkeller
chrislkeller / README.md
Last active September 28, 2015 10:18
Quick map creating a mouseover-like event on a google map using a Fusion Tables layer...

Demo: fusion-tables-pseudo-mouseover

This repo's location has changed.

@chrislkeller
chrislkeller / README.md
Last active September 29, 2015 03:57
Scrape Wisconsin state representative bios

python-legi-write-bio

Python scraper to pull Wisconsin state senator and state representative district contact information and biographies into a text file or csv.

@chrislkeller
chrislkeller / README.md
Last active September 29, 2015 10:47
Madison Parking Ramp Scrape

Madison Parking Ramp Scrape

A simple django management command to scrape the status of Madison parking garages and save to a database model. It's the basis for the parking garage information at the bottom of this page.