basically the most basic of leaflet maps posible
basically
| # nuke the queue | |
| redis-cli FLUSHALL | |
| # nuke anything currently running | |
| pkill -9 celeryd | |
| # add the key | |
| ssh-add ~/.ssh/me_rsa |
| #!/usr/bin/env python | |
| import random | |
| f = open('us-states.json', 'w') | |
| f.write("""{"type":"FeatureCollection","features":[\n""") | |
| lat = 35.0 | |
| lng = -87.3 |
| #!/usr/bin/env python | |
| from itertools import imap, groupby | |
| from operator import itemgetter | |
| def _unique_justseen(iterable, key=None): | |
| """List unique elements, preserving order. | |
| Remember only the element just seen.""" |
| #!/usr/bin/env python | |
| from itertools import imap, groupby | |
| from operator import itemgetter | |
| def unique_justseen(iterable, key=None): | |
| """List unique elements, preserving order. | |
| Remember only the element just seen.""" |
| curl -i -H "Accept: application/json" -H "Content-type: application/json" --data @test.json http://localhost:5033/match |
| import datetime | |
| import time | |
| # some datetime object | |
| dt = datetime.datetime.now() | |
| # get the seconds since epoch for that datetime | |
| print time.mktime(dt.timetuple()) |
| import blessings | |
| term = blessings.Terminal() | |
| def keypress(): | |
| with term.cbreak(): | |
| inp = term.inkey() | |
| if inp.code == term.KEY_ENTER: | |
| print 'hit enter' |