Skip to content

Instantly share code, notes, and snippets.

View flooie's full-sized avatar

William Palin flooie

  • Free Law Project
  • Cambridge, MA
View GitHub Profile
We can make this file beautiful and searchable if this error is corrected: It looks like row 5 should actually have 19 columns, instead of 16. in line 4.
Town,Title,Street,City,State,Zip,County,Latitude,Longitude,Error,Mailing Street,Mailing City,Mailing State,Mailing Zip,Phone,Fax,Email,Web,Hours
Abington,Office of the Town Clerk,500 Gliniewicz Way,Abington,MA,02351,Plymouth,42.117569,-70.956284,,"TOWN HALL 500 GLINIEWICZ WAY",ABINGTON,MA,02351-2058,(781) 982-2112,(781) 982-2138,ladams@abingtonmass.com,http://www.abingtonmass.com/,M-Th: 8:30a-4:30p; F: 8:30a-12:30p
Acton,Office of the Town Clerk,472 Main Street,Acton,MA,01720,Middlesex,42.485806,-71.433586,,"TOWN HALL 472 MAIN ST",ACTON,MA,01720-3952,(978) 929-6620,(978) 264-9630,clerk@acton-ma.gov,http://www.acton-ma.gov/,M-F: 8a-5p
Acushnet,Town Clerk’s Office,122 Main Street,Acushnet,MA,02743,Bristol,41.682774,-70.909793,,122 MAIN ST,ACUSHNET,MA,02743-1548,(508) 998-0215,(508) 998-0216,plabonte@acushnettown.mec.edu,http://www.acushnet.ma.us/,"M, W-F: 8a-4p; Tu: 8a-8p"
Adams,Town Clerk,8 Park Street,Adams,MA,01220,Berkshire,42.620503,-73.120589,,8 PARK ST STE 110,ADAMS,MA,01220-2090,(413) 743-8320,(413) 743
@hrp
hrp / twitter.json
Created April 4, 2011 00:20
Example JSON response from Twitter streaming API
{
"text": "RT @PostGradProblem: In preparation for the NFL lockout, I will be spending twice as much time analyzing my fantasy baseball team during ...",
"truncated": true,
"in_reply_to_user_id": null,
"in_reply_to_status_id": null,
"favorited": false,
"source": "<a href=\"http://twitter.com/\" rel=\"nofollow\">Twitter for iPhone</a>",
"in_reply_to_screen_name": null,
"in_reply_to_status_id_str": null,
"id_str": "54691802283900928",
@zyegfryed
zyegfryed / pdf.py
Created April 13, 2011 21:00
Outputting PDFs with Django and FDFgen
# -*- coding: utf-8 -*-
import codecs
import subprocess
from fdfgen import forge_fdf
from django.template import Template, loader
from django.template.loader import find_template, LoaderOrigin
class PdfTemplateError(Exception):
@mhawksey
mhawksey / gist:1276293
Last active October 23, 2023 09:00
Google App Script to insert data to a google spreadsheet via POST or GET - updated version as per https://mashe.hawksey.info/2014/07/google-sheets-as-a-database-insert-with-apps-script-using-postget-methods-with-ajax-example/
/*
Copyright 2011 Martin Hawksey
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
@dAnjou
dAnjou / flask-upload
Created June 5, 2012 12:35
Flask upload example
<VirtualHost *>
ServerName example.com
WSGIDaemonProcess www user=max group=max threads=5
WSGIScriptAlias / /home/max/Projekte/flask-upload/flask-upload.wsgi
<Directory /home/max/Projekte/flask-upload>
WSGIProcessGroup www
WSGIApplicationGroup %{GLOBAL}
Order deny,allow
@MalphasWats
MalphasWats / flask_ajax.py
Created July 2, 2012 08:15
Making a basic AJAX request with Flask
# Answer to a question on Flask mailing list
# http://librelist.com/browser//flask/2012/6/30/using-ajax-with-flask/
# NOTE: *REALLY* don't do the thing with putting the HTML in a global
# variable like I have, I just wanted to keep everything in one
# file for the sake of completeness of answer.
# It's generally a very bad way to do things :)
#
from flask import (Flask, request, jsonify)
app = Flask(__name__)
@maccman
maccman / app.py
Created August 8, 2012 23:30
Stripe Flask Example
import os
from flask import Flask, render_template, request
import stripe
stripe_keys = {
'secret_key': os.environ['SECRET_KEY'],
'publishable_key': os.environ['PUBLISHABLE_KEY']
}
stripe.api_key = stripe_keys['secret_key']
@janodev
janodev / gist:5341598
Created April 8, 2013 23:44
Text to speech on iOS with private framework.
// Not App Store safe. Only available in real devices.
#define RTLD_LAZY 0x1
#define RTLD_NOW 0x2
#define RTLD_LOCAL 0x4
#define RTLD_GLOBAL 0x8
NSObject *voiceSynthesizer;
void *voiceServices;
@bycoffe
bycoffe / README.md
Created June 26, 2013 20:19
Town/county map using d3 and TopoJSON

This is a demonstration of how to create a combination town/county map from a shapefile using TopoJSON and d3.js.

It includes a simplified version of the code used for the Massachusetts special Senate election results on The Huffington Post.

Get the data

Download a shapefile of Massachusetts towns from the state's GIS site:

wget http://wsgw.mass.gov/data/gispub/shape/census2000/towns/census2000towns_poly.exe
@killercup
killercup / pandoc.css
Created July 3, 2013 11:31
Add this to your Pandoc HTML documents using `--css pandoc.css` to make them look more awesome. (Tested with Markdown and LaTeX.)
/*
* I add this to html files generated with pandoc.
*/
html {
font-size: 100%;
overflow-y: scroll;
-webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%;
}