I hereby claim:
- I am mhl on github.
- I am mhl (https://keybase.io/mhl) on keybase.
- I have a public key whose fingerprint is 74D7 CE8D ADB3 E542 93A5 D25D FEBF 4CC4 8EE8 9E5A
To claim this, I am signing this object:
from pygeocoder import Geocoder | |
def our_geocoder(country, query): | |
print "### in our_geocoder" | |
components = 'country:' + country | |
response = Geocoder.geocode(query, components=components) | |
return [ | |
{ | |
"address": entry['formatted_address'], | |
"latitude": entry['geometry']['location']['lat'], |
from django.contrib.contenttypes.models import ContentType | |
from pombola.core.models import OrganisationKind | |
for ok in OrganisationKind.objects.filter(name__icontains='committee'): | |
print ok | |
for o in ok.organisation_set.all(): | |
print " ", o | |
for i in Identifier.objects.filter( | |
object_id=o.id, | |
content_type=ContentType.objects.get_for_model(Organisation) |
#!/usr/bin/python | |
import mailbox | |
import os | |
import re | |
from subprocess import check_output | |
import sys | |
top_level_mail_directory = os.path.join(os.environ['HOME'], 'Mail') |
var popitURL = 'http://za-new-import.popit.mysociety.org/api/v0.1'; | |
var today = new Date().toISOString().substring(0, 10); | |
function endDateAfter(endDate, whenDate) { | |
if (!endDate) { | |
/* A falsy endDate indicates that the end date is 'future' */ | |
return true; | |
} | |
return endDate > whenDate; |
In [1]: from candidates.static_data import MapItData | |
In [2]: from candidates.popit import create_popit_api_object | |
In [3]: api = create_popit_api_object() | |
In [4]: scottish_cons = [m['id'] for m in MapItData.constituencies_2010.values() if m['country'] == 'S'] | |
In [15]: for post_id in scottish_cons: | |
....: p = api.posts(str(post_id)).get(embed='membership.person')['result'] |
===================================================== | |
3 party:103 Alliance - Alliance Party of Northern Ireland | |
-- | |
Emblem 1 | |
http://yournextmp.popit.mysociety.org/organizations/party:103/image/54ce61a895590a102032012e | |
-- | |
Emblem 2 | |
http://yournextmp.popit.mysociety.org/organizations/party:103/image/54ce61a895590a102032012f | |
-- | |
Emblem 3 |
diff --git a/data/all-parties-from-popit.json b/data/all-parties-from-popit.json | |
index 8f97cf7..b313e9f 100644 | |
--- a/data/all-parties-from-popit.json | |
+++ b/data/all-parties-from-popit.json | |
@@ -1260,21 +1260,21 @@ | |
"slug": "the-monmouth-party" | |
}, | |
{ | |
"classification": "Party", | |
"contact_details": [], |
#!/usr/bin/env python | |
import sys | |
import os | |
from subprocess import check_call | |
from lxml import etree | |
if len(sys.argv) != 2: | |
print >> sys.stderr, "Usage: %s [EMX-FILE]" % (sys.argv[0]) | |
sys.exit(1) |
I hereby claim:
To claim this, I am signing this object:
This is now replaced by a version in the YourNextRepresentative repository