Skip to content

Instantly share code, notes, and snippets.

View andymos66's full-sized avatar

Andrew Mosola andymos66

View GitHub Profile
@andymos66
andymos66 / python batch geocoding.py
Created December 18, 2018 09:23 — forked from shanealynn/python batch geocoding.py
Geocode as many addresses as you'd like with a powerful Python and Google Geocoding API combination
"""
Python script for batch geocoding of addresses using the Google Geocoding API.
This script allows for massive lists of addresses to be geocoded for free by pausing when the
geocoder hits the free rate limit set by Google (2500 per day). If you have an API key for paid
geocoding from Google, set it in the API key section.
Addresses for geocoding can be specified in a list of strings "addresses". In this script, addresses
come from a csv file with a column "Address". Adjust the code to your own requirements as needed.
After every 500 successul geocode operations, a temporary file with results is recorded in case of
script failure / loss of connection later.
Addresses and data are held in memory, so this script may need to be adjusted to process files line
@andymos66
andymos66 / cs50.c
Created December 5, 2016 05:54 — forked from bradjohansen/cs50.c
cs50 GetString()
// [...]
/*
* string
* GetString()
*
* Reads a line of text from standard input and returns it as a string,
* sans trailing newline character. (Ergo, if user inputs only "\n",
* returns "" not NULL.) Leading and trailing whitespace is not ignored.
* Returns NULL upon error or no input whatsoever (i.e., just EOF).