This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def get_iso3_code(iso2): | |
iso_codes = {'AF':'AFG','AX':'ALA','AL':'ALB','DZ':'DZA','AS':'ASM','AD':'AND','AO':'AGO','AI':'AIA','AQ':'ATA','AG':'ATG','AR':'ARG','AM':'ARM','AW':'ABW','AU':'AUS','AT':'AUT','AZ':'AZE','BS':'BHS','BH':'BHR','BD':'BGD','BB':'BRB','BY':'BLR','BE':'BEL','BZ':'BLZ','BJ':'BEN','BM':'BMU','BT':'BTN','BO':'BOL','BA':'BIH','BW':'BWA','BV':'BVT','BR':'BRA','IO':'IOT','BN':'BRN','BG':'BGR','BF':'BFA','BI':'BDI','KH':'KHM','CM':'CMR','CA':'CAN','CV':'CPV','KY':'CYM','CF':'CAF','TD':'TCD','CL':'CHL','CN':'CHN','CX':'CXR','CC':'CCK','CO':'COL','KM':'COM','CG':'COG','CD':'COD','CK':'COK','CR':'CRI','CI':'CIV','HR':'HRV','CU':'CUB','CY':'CYP','CZ':'CZE','DK':'DNK','DJ':'DJI','DM':'DMA','DO':'DOM','EC':'ECU','EG':'EGY','SV':'SLV','GQ':'GNQ','ER':'ERI','EE':'EST','ET':'ETH','FK':'FLK','FO':'FRO','FJ':'FJI','FI':'FIN','FR':'FRA','GF':'GUF','PF':'PYF','TF':'ATF','GA':'GAB','GM':'GMB','GE':'GEO','DE':'DEU','GH':'GHA','GI':'GIB','GR':'GRC','GL':'GRL','GD':'GRD','GP':'GLP','GU':'GUM','GT':'GTM','GG':' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
api_key = '' | |
auth_token = '' | |
response = requests.get('https://trello.com/1/member/me/boards?fields=id,name,dateLastView&key='+api_key+'&token='+auth_token) | |
boards = response.json() | |
boards.sort(key=lambda board : board["dateLastView"], reverse=True) | |
the_new_resource = boards.pop(0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
OAuth::Unauthorized | |
401 Unauthorized | |
Rails.root: /Users/hackyourcity/Repos/follow-all | |
Application Trace | Framework Trace | Full Trace | |
oauth (0.4.7) lib/oauth/consumer.rb:216:in `token_request' | |
oauth (0.4.7) lib/oauth/consumer.rb:136:in `get_request_token' | |
omniauth-oauth (1.0.1) lib/omniauth/strategies/oauth.rb:29:in `request_phase' | |
omniauth-twitter (1.0.1) lib/omniauth/strategies/twitter.rb:60:in `request_phase' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# vim: ai ts=4 sts=4 et sw=4 | |
""" | |
Tools to extract feed links, test if they are valid and parse them | |
with feedparser, returning content or a proper error. | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
list of featured issues | |
https://github.com/jasonlally/housing-policy-hub/issues/21 | |
https://github.com/Code-for-Miami/MDBudgetviz/issues/21 | |
https://github.com/codeforamerica/ohana-web-search/issues/518 | |
https://github.com/codeforamerica/cfapi/issues/140 | |
https://github.com/codeforamerica/bizfriendly-web/issues/151 | |
https://github.com/codeforamerica/bizfriendly-web/issues/172 | |
https://github.com/codeforamerica/ohana-web-search/issues/572 | |
https://github.com/sfbrigade/sfbrigade.github.io/issues/3 | |
https://github.com/CodeForPortland/ideas/issues/6 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"configUrl": "https://docs.google.com/a/codeforamerica.org/spreadsheet/ccc?key=0ArHmv-6U1drqdGZRSjBIdGFGOEVodWZManpGUW1TS3c#gid=0", | |
"censusid": "service-census", | |
"approve_first_submission": "FALSE", | |
"anonymous_submissions": "TRUE", | |
"google": { | |
"user": "[email protected]", | |
"password": my real password that i use which makes me nervous, | |
"app_id" : my google app id, | |
"app_secret" : my google app secret |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Exports Issues from a specified repository to a CSV file | |
Uses basic authentication (Github username + password) to retrieve Issues | |
from a repository that username has access to. Supports Github API v3. | |
""" | |
import csv | |
import requests | |