This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pygraph.classes import graph, exceptions | |
def make_graph(nodes, edges): | |
bg = graph.graph() | |
bg.add_nodes(nodes) | |
for edge in edges: | |
try: | |
bg.add_edge(edge) | |
except exceptions.AdditionError: | |
print "Already had it: %s %s" % (edge[0], edge[1]) # Edge is tuple |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DATABASES = { | |
'default': { | |
'ENGINE': 'django.contrib.gis.db.backends.postgis', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. | |
'NAME': 'haltes', # Or path to database file if using sqlite3. | |
'USER': 'geo', # Not used with sqlite3. | |
'PASSWORD': 'haltes', # Not used with sqlite3. | |
'HOST': '', # Set to empty string for localhost. Not used with sqlite3. | |
'PORT': '', # Set to empty string for default. Not used with sqlite3. | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from fabric.api import task, cd, sudo, run, env, prefix | |
from contextlib import contextmanager as _contextmanager | |
@task(default=True) | |
def live(): | |
env.hosts = ['ssh.myserver.com'] | |
env.virtualenv = "project-release" | |
env.parent = "github" | |
env.branch = "master" | |
env.user = "user" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def transform_rd(point): | |
''' Please note this returns an OGRGeometry, not a point ''' | |
src_string = '+proj=sterea +lat_0=52.15616055555555 +lon_0=5.38763888888889 +k=0.9999079 +x_0=155000 +y_0=463000 +ellps=bessel +units=m +towgs84=565.2369,50.0087,465.658,-0.406857330322398,0.350732676542563,-1.8703473836068,4.0812 +no_defs no_defs <>' | |
src_srs = SpatialReference(src_string) | |
geom = OGRGeometry(point.wkt, src_srs) | |
geom.transform(4326) | |
return geom |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
line_id,operator_id,directiontype,name,stoparearef,latitude,longitude,pointorder,journeypatterns | |
HTM:3,HTM:8127,1,"Zoetermeer, Centrum-West",3006,52.060565,4.483079,1,{154579} | |
HTM:3,HTM:8103,1,"Zoetermeer, Centrum-West",3006,52.060597,4.483706,1,{154562} | |
HTM:3,HTM:1818,2,"Den Haag, Arnold Spoelplein",3165,52.05464,4.232891,1,"{154591,154580}" | |
HTM:3,HTM:8126,1,"Zoetermeer, Dorp",3177,52.054132,4.491709,2,"{154579,154562}" | |
HTM:3,HTM:1806,2,"Den Haag, Pisuissestraat",3131,52.057413,4.22792,2,"{154591,154580}" | |
HTM:3,HTM:8124,1,"Zoetermeer, Delftsewallen",3179,52.050779,4.486936,3,"{154579,154562}" | |
HTM:3,HTM:1813,2,"Den Haag, Mozartlaan",3164,52.060732,4.231698,3,"{154591,154580}" | |
HTM:3,HTM:8122,1,"Zoetermeer, Driemanspolder",3136,52.048483,4.477098,4,"{154579,154562}" | |
HTM:3,HTM:1802,2,"Den Haag, Heliotrooplaan",3133,52.062723,4.231297,4,"{154591,154580}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.twitter-typeahead .tt-query, | |
.twitter-typeahead .tt-hint { | |
margin-bottom: 0; | |
} | |
.tt-hint { | |
display: block; | |
width: 100%; | |
height: 38px; | |
padding: 8px 12px; | |
font-size: 14px; |
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28309 Dorpsstraat | |
22798 Kerkstraat | |
17848 Hoofdstraat | |
15678 Molenstraat | |
15043 Schoolstraat | |
12229 Nieuwstraat | |
11880 Wilhelminastraat | |
11536 Julianastraat | |
10825 Hoofdweg | |
8728 Stationsstraat |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Requires: requests, bs4, python-pushover | |
import time | |
import requests | |
from bs4 import BeautifulSoup | |
from pushover import init, Client | |
known_last_updated = "" |