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
# 15 statement in this Fiona script, 12 after I move the prop_type function to Fiona. | |
# Compare to 31 statements for the ogr.py script at | |
# http://pcjericks.github.io/py-gdalogr-cookbook/layers.html#create-a-new-shapefile-and-add-data. | |
# The difference is that Fiona's schema and feature definition are declarative (using dict | |
# literals and comprehensions, not imperative (CreateField, SetField, etc) and that Fiona | |
# is designed to allow concise code. | |
from csv import DictReader | |
import fiona | |
from fiona.crs import from_epsg |
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 oauth2 as oauth | |
import urlparse | |
url = 'http://www.goodreads.com' | |
request_token_url = '%s/oauth/request_token/' % url | |
authorize_url = '%s/oauth/authorize/' % url | |
access_token_url = '%s/oauth/access_token/' % url | |
consumer = oauth.Consumer(key='Your-GoodReads-Key', | |
secret='Your-GoodReads-Secret') |