Skip to content

Instantly share code, notes, and snippets.

@twneale
twneale / pypscl-example.py
Last active December 16, 2016 19:15
Calculating legislator ideal points with Python
from sunlight import openstates, response_cache
from pscl.ext.openstates import RollcallBuilder
response_cache.enable('mongo')
response_cache.logger.setLevel(10)
spec = dict(state='al', chamber='lower', search_window='term:2011-2014')
valid_ids = [leg['id'] for leg in openstates.legislators(spec)]
usc25.xml:
- The xml for /us/usc/t25/s450l (Contract or grant specifications) contains a model agreement with its own internal
Thom Neale <[email protected]>
Apr 13
to Katherine
Hi Katherine, please forgive the earlier email fragment; I accidentally sent if before I was done typing.
@twneale
twneale / gist:86ac56607f48ab375e60
Created June 5, 2014 17:24
Duped US Code identifiers
[('/us/usc/t21/s812/b/1', 4),
('/us/usc/t21/s812/b/4', 4),
('/us/usc/t21/s812/b/5', 4),
('/us/usc/t21/s812/b/2', 4),
('/us/usc/t21/s812/a', 4),
('/us/usc/t21/s812/b', 4),
('/us/usc/t21/s812/b/3', 4),
('/us/usc/t21/s812/c', 4),
('/us/usc/t42/s14214/d/10', 3),
('/us/usc/t21/s812/a/1', 3),
@twneale
twneale / gist:ef11712e43991d671747
Created June 11, 2014 01:55
All hyperlinked citations in the Boston municipal code
Any person violating any provision of subsection
1-2.6
shall be punished by a fine not exceeding twenty ($20.00) dollars for each offense, and not only the
The provisions of subsection
2-12.3
to the contrary notwithstanding, this ordinance shall be published by the action of the City Council

Keybase proof

I hereby claim:

  • I am twneale on github.
  • I am twneale (https://keybase.io/twneale) on keybase.
  • I have a public key ASBHERV361ILHrWj9WnVa_X7mI5u8FrXDmrlwqhOswPRsgo

To claim this, I am signing this object: