Skip to content

Instantly share code, notes, and snippets.

View mac389's full-sized avatar

Michael Chary mac389

View GitHub Profile
@bradmontgomery
bradmontgomery / geo.py
Created April 16, 2013 16:42
Example of Reverse Geocoding in python with Google Maps api
import requests
def example():
# grab some lat/long coords from wherever. For this example,
# I just opened a javascript console in the browser and ran:
#
# navigator.geolocation.getCurrentPosition(function(p) {
# console.log(p);
# })
@stefanv
stefanv / boxplot.py
Created November 8, 2012 01:04
Better boxplot
def my_boxplot(ax, positions, values, width=None, color=None, label=None):
"""Custom box plot to work around some of matplotlib's quirks.
Parameters
----------
ax : matplotlib axis
Target axis.
positions : (M,) ndarray of float
Where to positions boxes on the x-axis.
values : (M, N) ndarray of float
@beniwohli
beniwohli / greek_alphabet.py
Created January 4, 2011 19:29
A Python dictionary mapping the Unicode codes of the greek alphabet to their names
greek_alphabet = {
u'\u0391': 'Alpha',
u'\u0392': 'Beta',
u'\u0393': 'Gamma',
u'\u0394': 'Delta',
u'\u0395': 'Epsilon',
u'\u0396': 'Zeta',
u'\u0397': 'Eta',
u'\u0398': 'Theta',
u'\u0399': 'Iota',