Skip to content

Instantly share code, notes, and snippets.

View garamond's full-sized avatar

Andreas Moor garamond

View GitHub Profile
alert("hello");
@garamond
garamond / file.py
Last active February 18, 2020 13:31
Jupyter Environment
import os
import urllib
from zipfile import ZipFile
import re
def download_file(url, out_dir='./input', overwrite=False):
name = url.rsplit('/', 1)[-1]
os.makedirs(out_dir, exist_ok=True)
path = os.path.join(out_dir, name)
if overwrite or not os.path.isfile(path):
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
<?xml version="1.0" encoding="utf-8" ?>
<kml xmlns="http://www.opengis.net/kml/2.2">
<Document id="root_doc">
<Schema name="roundshot" id="roundshot">
<SimpleField name="Name" type="string"></SimpleField>
<SimpleField name="Description" type="string"></SimpleField>
<SimpleField name="altitude" type="int"></SimpleField>
<SimpleField name="angle" type="int"></SimpleField>
<SimpleField name="north" type="int"></SimpleField>
<SimpleField name="title" type="string"></SimpleField>
@garamond
garamond / peerDependencies.py
Last active August 27, 2019 14:32
Script to install all peer dependencies of a Node module
#!/usr/bin/env python
import json
import os
import sys
if len(sys.argv) > 1:
packageFile = sys.argv[1]
else:
print('Usage: peerDependencies /path/to/package.json')
We can make this file beautiful and searchable if this error is corrected: It looks like row 6 should actually have 25 columns, instead of 10. in line 5.
GMDHISTID,GMDNR,GMDNAME,BZHISTID,BZNR,KTNR,GRNR,AREA_HA,E_MIN,E_MAX,N_MIN,N_MAX,E_CNTR,N_CNTR,Z_MIN,Z_MAX,Z_AVG,Z_MED,Z_CNTR,X_MIN,X_MAX,Y_MIN,Y_MAX,X_CNTR,Y_CNTR
13256.0,1.0,Aeugst am Albis,10053.0,101.0,1.0,4.0,791.0,2678111.0,2681155.0,1234561.0,1238544.0,2679300.0,1235700.0,533.0,887.0,685.0,673.0,700.0,678111.0,681155.0,234561.0,238544.0,679300.0,235700.0
11742.0,2.0,Affoltern am Albis,10053.0,101.0,1.0,4.0,1059.0,2673826.0,2678584.0,1235208.0,1239338.0,2676800.0,1236800.0,440.0,749.0,529.0,502.0,490.0,673826.0,678584.0,235208.0,239338.0,676800.0,236800.0
11801.0,3.0,Bonstetten,10053.0,101.0,1.0,4.0,743.0,2675745.0,2679642.0,1238997.0,1243159.0,2677800.0,1241000.0,502.0,715.0,581.0,583.0,544.0,675745.0,679642.0,238997.0,243159.0,677800.0,241000.0
11992.0,4.0,Hausen am Albis,10053.0,101.0,1.0,4.0,1360.0,2680394.0,2686463.0,1230185.0,1236411.0,2682900.0,1233100.0,524.0,915.0,673.0,653.0,610.0,680394.0,686463.0,230185.0,236411.0,682900.0,233100.0
12249.0,5.0,Hedingen,10053.0,101.0,1.0,4.0,653.0,2674866.0,26
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
{
"version": 0.6,
"generator": "Overpass API 0.7.55.5 2ca3f387",
"osm3s": {
"timestamp_osm_base": "2018-11-21T11:40:02Z",
"timestamp_areas_base": "2018-11-21T09:58:02Z",
"copyright": "The data included in this document is from www.openstreetmap.org. The data is made available under ODbL."
},
"elements": [
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.