Skip to content

Instantly share code, notes, and snippets.

View driki's full-sized avatar

Matt MacDonald driki

View GitHub Profile
@driki
driki / gist:10606407
Created April 13, 2014 23:26
keybase.md
### Keybase proof
I hereby claim:
* I am driki on github.
* I am mattmacdonald (https://keybase.io/mattmacdonald) on keybase.
* I have a public key whose fingerprint is BDD5 D099 131C 44B4 B8F6 C011 F4B5 B327 983E 3CCF
To claim this, I am signing this object:
@driki
driki / states.json
Last active December 17, 2015 12:09
{
"states" : [
{"AL":"Alabama"},
{"AK":"Alaska"},
{"AZ":"Arizona"},
{"AR":"Arkansas"},
{"CA":"California"},
{"CO":"Colorado"},
{"CT":"Connecticut"},
{"DE":"Delaware"},
<div class='tree-map plans' data-table='[["Title","Model","Count","Weight"],["Model","",0,0],["ASUS NEXUS 7","Model",275,0],["CASIO C771","Model",108,0],["HTC ADR6300","Model",99,0],["HTC ADR6350","Model",94,0],["HTC ADR6400L","Model",130,0],["HTC ADR6425LVW","Model",89,0],["HTC PC36100","Model",154,0],["HTC T-MOBILE G2","Model",410,0],["LGE LG-VM696","Model",39,0],["MOTOROLA DROID BIONIC","Model",501,0],["MOTOROLA DROID RAZR","Model",1483,0],["MOTOROLA DROID X2","Model",498,0],["MOTOROLA DROID2","Model",281,0],["MOTOROLA DROID2 GLOBAL","Model",162,0],["MOTOROLA DROID3","Model",238,0],["MOTOROLA DROID4","Model",365,0],["MOTOROLA DROIDX","Model",957,0],["MOTOROLA MB855","Model",147,0],["MOTOROLA MB860","Model",242,0],["SAMSUNG GALAXY NEXUS","Model",424,0],["SAMSUNG GT-I9100","Model",85,0],["SAMSUNG GT-I9300","Model",129,0],["SAMSUNG SAMSUNG-SGH-I747","Model",318,0],["SAMSUNG SCH-I500","Model",58,0],["SAMSUNG SCH-I535","Model",545,0],["SAMSUNG SGH-T989","Model",178,0],["SAMSUNG SGH-T999","Model",178,0],["SAMSUN

Legislative/Committees

Meeting minutes with attachments
Agenda Items with attachments

Town/City Manager and their secretary or assistants

Citizen complaints about almost anything someone has an issue with.
Studies and surveys about services the community provides.

Newsletters and other mass citizen communications

@driki
driki / news-entires.md
Last active December 15, 2015 08:38
30 topics and themes automatically extracted from Knight News Challenge entries.

#Knight News Challenge - Open Government ###Hi, there.

NearbyFYI submitted a proposal to the Knight Foundation News Challenge, we're making it easier for small and mid-sized cities to share information online. It's a website like Yelp, but for cities and towns instead of restaurants.

Small cities and towns lack tools and incentive to publish structured data, so we collect what they already publish, unstructured text and analyze it to create structured data. We wanted to use the same tools and techniques that we use everyday to learn more about the themes and topics in the Open Government News Challenge. It was also a pretty neat way to browse the more than 800 amazing entries.

We've used a technique called latent Dirichlet allocation to automatically cluster and group the challenge entries. What themes emerge, what clusters of entries show up and how are they grouping? The groupi

@driki
driki / gist:4679255
Last active December 11, 2015 23:48
Municipal government topics.
Topic 00 4060.638381492015
number 131.84254459571682
dwelling 130.0942066586498
name 107.50313007741401
state 107.23074287437205
unit 94.60188337501059
address 83.35383631029445
code 75.011551118471
yes 68.04857715759431
owner 65.04524048536197
08:51:20 worker.1 | 2012-12-31T13:51:20Z 11451 TID-ovw3jav00 ExtractTextFromDocument JID-21e38454b9696092b4b8313c WARN: !!! Failure ExtractTextFromDocument(56410)
08:51:20 worker.1 | 2012-12-31T13:51:20Z 11451 TID-ovw3jav00 ExtractTextFromDocument JID-21e38454b9696092b4b8313c DEBUG: Failure! Retry 5 in 742 seconds
08:51:20 worker.1 | 2012-12-31T13:51:20Z 11451 TID-ovw3jav00 ExtractTextFromDocument JID-21e38454b9696092b4b8313c INFO: fail: 42.405 sec
08:51:20 worker.1 | 2012-12-31T13:51:20Z 11451 TID-ovw3jav00 WARN: {"retry"=>10, "queue"=>"high", "class"=>"ExtractTextFromDocument", "args"=>[56410, "Workflow.end_extract_text(arg)"], "jid"=>"21e38454b9696092b4b8313c", "error_message"=>"!!! Caught exception while executing ExtractTextFromDocument(56410): Text extraction service error: (503)", "error_class"=>"StandardError", "failed_at"=>"2012-12-30T20:28:13Z", "retry_count"=>5, "retried_at"=>2012-12-31 13:51:20 UTC}
08:51:20 worker.1 | 2012-12-31T13:51:20Z 11451 TID-ovw3jav00 WARN: !!! Caught exception while execu
@driki
driki / gist:4400443
Last active December 10, 2015 07:19
Memory leak in Net::HTTP.get and non memory leak in HTTPClient.get which I think impacts Anemone https://github.com/NearbyFYI/anemone/blob/next/lib/anemone/http.rb#L136
require 'net/http'
# Memory continues to climb.
idx = 0
loop do
begin
# Our sample website
url = "http://localhost:2000"
resp = Net::HTTP.get(URI.parse(url))
puts "run loop: #{idx}"
@driki
driki / gist:4390503
Last active December 10, 2015 05:49
require 'rubygems'
require 'tire'
Tire.configure { logger 'elasticsearch.log', :level => 'debug' }
class Municipality
include Tire::Model::Persistence
include Tire::Model::Search
include Tire::Model::Callbacks
@driki
driki / How I cut my RCN internet bill
Created November 28, 2012 01:00
How I cut my monthly RCN internet bill
19:40John B.: Hello Matt! How may I help you?
19:41Matt M.: Hi John. I need to lower my bill. Comcast internet is much cheaper. Thinking of switching
19:43Matt M.: They are offering me $34.99/mo my latest RCN bill is $49.99
19:43John B.: Let me see what I can do, sir. I'd be happy to help you. May I please have your address and phone number?
19:44Matt M.: Sure. XXXXXXXXX, MA XXXXX and my phone number is XXX-XXX-XXXX.
19:45John B.: Thank you sir. One moment please while I research what I can do.
19:45Matt M.: Great thanks.
19:48John B.: I tried to put you in the $34.99 plan, however the system knows your an active customer and denies me.
19:49John B.: But we do have another option!
19:49Matt M.: OK. What are you thinking?