Skip to content

Instantly share code, notes, and snippets.

View eHorn96's full-sized avatar
๐ŸŒ“
Working

Erik Horn eHorn96

๐ŸŒ“
Working
  • Self Employed
  • Frankfurt, Germany
  • 21:22 (UTC +01:00)
View GitHub Profile
@eHorn96
eHorn96 / siren_schema.py
Last active February 25, 2025 12:12
JSON:Siren specification in Pydantic
# generated by datamodel-codegen:
# filename: schema.siren.json
# timestamp: 2025-02-18T14:12:41+00:00
from __future__ import annotations
from typing import Annotated, Any, Dict, List, Literal
from devtools import debug
from pydantic import AnyUrl, BaseModel, Field
@eHorn96
eHorn96 / preprocessing.py
Created January 9, 2023 21:26
Preprocessing
def graph_download(coords:list,
root_dir:str,
name:str,simplified=False,
distance=9000,
keep_geometries=False,
nominatim_endpoint='http://localhost:8088/',
network_type='drive'):
graph_attrs = {'crs': 'epsg:4326',
'simplified': simplified