Skip to content

Instantly share code, notes, and snippets.

View tague's full-sized avatar

Tague Griffith tague

  • San Francisco, CA
View GitHub Profile

Keybase proof

I hereby claim:

  • I am tague on github.
  • I am tague (https://keybase.io/tague) on keybase.
  • I have a public key whose fingerprint is B0E7 434D B53F F7A5 DFFB 771D ED9E C850 8672 7BD2

To claim this, I am signing this object:

127.0.0.1:6379> GEOPOS NYC:stations:location NYC:station:523
1) 1) "-73.99138301610946655"
   2) "40.75466497634030105"
@tague
tague / gist:42756d4fbe0f834d8952bf8ccf817cc2
Created February 1, 2018 00:56
GEORADIUSBYMEMBER Example
127.0.0.1:6379> GEORADIUSBYMEMBER NYC:stations:location NYC:station:281 1000 ft WITHDIST
1) 1) "NYC:station:281"
   2) "0.0000"
2) 1) "NYC:station:3132"
   2) "793.4223"
3) 1) "NYC:station:2006"
   2) "911.9752"
4) 1) "NYC:station:3136"
   2) "940.3399"
@tague
tague / gist:a23e7f6b2c8f86985f316026c3583741
Created February 8, 2018 18:25
generate_station_kml.py
#!/usr/bin/env python3
import redis
import xml.dom.minidom as minidom
def generate_placemark(doc, document, station):
"Generates a single place mark from a station"
placemark = doc.createElement('Placemark')
document.appendChild(placemark)