I hereby claim:
- I am urschrei on github.
- I am shugel (https://keybase.io/shugel) on keybase.
- I have a public key whose fingerprint is 981F 92FE DC9A 0F9B 010E 43D2 C6CA 03B7 BB85 14EB
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
import math | |
def calculate_polygons(startx, starty, endx, endy, radius): | |
""" | |
Calculate a grid of hexagon coordinates of the given radius | |
given lower-left and upper-right coordinates | |
Returns a list of lists containing 6 tuples of x, y point coordinates | |
These can be used to construct valid regular hexagonal polygons | |
# coding: utf-8 | |
# In[147]: | |
from Circles.circles import circle | |
from mpl_toolkits.basemap import Basemap | |
import matplotlib.pyplot as plt | |
from matplotlib.collections import PatchCollection | |
from shapely.geometry import Polygon, MultiPolygon, Point, LineString |
import pandas as pd | |
import numpy as np | |
import matplotlib.pyplot as plt | |
# this data won't work (it's only for one year), it's only illustrative | |
df = pd.DataFrame({ | |
'Age': {0: 32, 1: 38, 2: 45, 3: 39, 4: 44}, | |
'County': {0: 'Bexar', 1: 'Tarrant', 2: 'Harris', 3: 'Nueces', 4: 'Kerr'}, | |
'Date Executed': { | |
0: '10/28/2014', |
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
""" | |
output geojson.py | |
Created by Stephan Hügel on 2015-02-26 | |
I can *never* remember how to efficiently do this, so I'm making a gist. | |
This should be easily adaptable to use with LineStrings, Polygons etc by | |
altering the 'geometry' dict accordingly |
GIT_PS1_SHOWDIRTYSTATE=1 | |
GIT_PS1_SHOWSTASHSTATE=1 | |
GIT_PS1_SHOWUNTRACKEDFILES=1 | |
GIT_PS1_SHOWUPSTREAM="verbose" | |
export GIT_PS1_SHOWDIRTYSTATE | |
export GIT_PS1_SHOWSTASHSTATE | |
export GIT_PS1_SHOWUNTRACKEDFILES | |
export GIT_PS1_SHOWUPSTREAM | |
PS1='\[\e[32m\]\u\[\e[00m\]:\[\e[34m\]\w\[\e[00m\]\[\e[35m\]$(__git_ps1 " (%s)")\[\e[00m\] $ ' | |
export PS1 |
The contents of this gist now reside in their own repo at https://github.com/urschrei/router_comparison!
use std::thread; | |
use std::sync::mpsc::{ channel, Sender }; | |
enum Wrapped { | |
A(f64), | |
B(f64), | |
} | |
fn produce_a(sender: Sender<Wrapped>) { | |
for i in 0 .. 5 { |