Skip to content

Instantly share code, notes, and snippets.

@thomaswilburn
thomaswilburn / Code.gs
Created August 29, 2014 19:20
Apps Script example for handling custom forms
var sheetID = "xxx-id-goes-here-xxx";
var rowConfig = "timestamp name location favorite note lifespan season contact lat lng zone approve feature".split(" ");
/***
Requests may come in with the following parameters:
name
favorite - player name (number?)
note
@chris-creditdesign
chris-creditdesign / README.md
Last active August 29, 2015 14:19
Impact of terror groups 1970 to 2013
@markng
markng / gist:1101904
Created July 23, 2011 21:28
Interactive translation tool.
#!/usr/bin/env python
import sys, tty, termios
fd = sys.stdin.fileno()
old_settings = termios.tcgetattr(fd)
try:
filename = sys.argv[1]
f = open(filename, 'r')
text = f.read()
@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.

@csessig86
csessig86 / GOP Caucus Results
Created January 6, 2012 20:55
Map of GOP caucus/primary dates and results
<html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<title>Lee Enterprises - GOP Caucus/Primary Results</title>
<style>
body { height: 650px; width:610px;
font-family: Arial, sans-serif; }
@chrislkeller
chrislkeller / README.md
Last active September 30, 2015 03:08
This has been updated here to reflect the coming changes to the Fusion Tables API.

SpreadSheet to Fusion Tables

This has been updated here to reflect the coming changes to the Fusion Tables API.

@chrislkeller
chrislkeller / Learning-python-django.md
Last active September 30, 2015 07:07
In my quest to learn how to use python within the django framework, the most difficult thing was the development environment, and getting to the point where I could play. Here are some steps that I took to get to that point.

In my quest to learn how to use python within the django framework, the most difficult thing was the development environment, and getting to the point where I could play learn, practice and experiment. Here are some steps that I took to get to that point.

I’ll add to this as I can, but mostly I’m using it as a handy resource that I can access while continuing to learn.

SETUP DJANGO PROJECT IN MY MAC OS DEV ENV

Cribbed from my notes and this blog post.

@JoeGermuska
JoeGermuska / ranker.py
Created April 18, 2012 15:20
Example of how to convert a csv file to a table of ranked headers for each row
#!/usr/bin/env python
import csv, json
from collections import defaultdict
r = csv.reader(open("data.csv"))
headers = r.next()
countries = headers[1:]
out_rows = []
for row in r:
area = row[0]
out_row = [area]
@csessig86
csessig86 / crime_scraper.py
Created June 29, 2012 21:00
This Python scraper pulls information off a PDF after its been converted to HTML. The PDF is a weekly arrest log provided by the Waterloo Police Department. The information is then put into a CSV file.
# We will be using the Python library Beautiful Soup
# To scrape the information
import urllib2
from bs4 import BeautifulSoup
import re
# Note: This arrest log is available at:
# http://chrisessig.com/arrestlog.PDF
# It was taken from the Waterloo Police Department's website:
# http://www.waterloopolice.com/images/arrestlog.PDF
@csessig86
csessig86 / geojson.js
Created July 8, 2012 08:18 — forked from mourner/geojson.js
Leaflet GeoJSON API proposal
var geojson = L.geoJson(data, {
// style for all vector layers (color, opacity, etc.) (optional)
getStyle: function (feature) {
return feature.properties && feature.properties.style;
},
// function for creating layers for GeoJSON point features (optional)
pointToLayer: function (feature, latlng) {
return L.marker(latlng, {