Skip to content

Instantly share code, notes, and snippets.

Danny Whalen invisiblefunnel

Block or report user

Report or block invisiblefunnel

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View geojson_in_directions_table.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View remote_resource.py
from contextlib import contextmanager
import os
import subprocess
import tempfile
@contextmanager
def maybe_download_remote(url_or_path, **kwargs):
"""
Adapted from: https://git.io/fxMdS
View SharedStreets + Pandas.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View debug.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@invisiblefunnel
invisiblefunnel / howto.md
Created Jul 3, 2018
Geopackage to PostGIS via ogr2ogr
View howto.md
ogr2ogr -nlt PROMOTE_TO_MULTI \
        -t_srs 'EPSG:4326' \
        -overwrite \
        -lco SCHEMA=public \
        -lco PRECISION=NO \
        --config PG_USE_COPY YES \
        -f PostgreSQL PG:$(heroku config:get DATABASE_URL -a myapp) \
        ~/Downloads/natural_earth_vector.gpkg/packages/natural_earth_vector.gpkg
View shared-streets-python-caching.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View segmentize.py
def segmentize(points, km):
npoints = len(points)
if npoints == 0:
return []
elif npoints == 1:
return [points[0]]
a, b = points[:2]
rest = segmentize(points[2:], km)
if haversine(a, b) > km:
View Merging GTFS with shapefile geometries.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View merge agencies.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View merge agencies.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
You can’t perform that action at this time.