This file contains hidden or 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
[Sources] | |
AmtUrl = http://www.stadtplan.hagen.de/StrVz/Hauskoordinaten.csv | |
AmtSep = ; | |
AmtEnc = cp1252 | |
AmtCRS = EPSG:4647 | |
OsmUrl = http://overpass-api.de/api/interpreter?data=%5Bout%3Acsv%28%3A%3Alat%2C%3A%3Alon%2C%3A%3Aid%2C%3A%3Atype%2C%22addr%3Apostcode%22%2C%22addr%3Astreet%22%2C%22addr%3Ahousenumber%22%2C%22addr%3Aplace%22%3Btrue%3B%22%3B%22%29%5D%5Btimeout%3A200%5D%3B%0Aarea%283601800297%29-%3E.searchArea%3B%0A%28%0A%20%20node%5B%22addr%3Ahousenumber%22%5D%28area.searchArea%29%3B%0A%20%20way%5B%22addr%3Ahousenumber%22%5D%28area.searchArea%29%3B%0A%29%3B%0Aout%20center%3B | |
;OsmPlace = Hagen | |
OsmSep = ; | |
OsmEnc = utf-8 |
This file contains hidden or 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
#!/usr/bin/env python3.7 | |
# -*- coding: utf-8 -*- | |
from radbox import * | |
if __name__ == "__main__": | |
baseurls = [URL("https://www.dein-radschloss.de/"), URL("https://www.bikeandridebox.de/")] | |
print("\n".join(f"[{bi}] {bu}" for bi, bu in enumerate(baseurls))) | |
try: |
This file contains hidden or 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
#!/usr/bin/env python3.7 | |
# -*- coding: utf-8 -*- | |
import traceback | |
import argparse | |
from radbox import * | |
from datetime import datetime | |
from decimal import Decimal, ROUND_HALF_UP | |
from subprocess import check_output | |
from rgbmatrix import RGBMatrix, RGBMatrixOptions, graphics |
This file contains hidden or 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
ifopt_haltestelle1 = "..." | |
ifopt_haltestelle2 = "..." | |
# siehe dm_depdata.py: | |
''' | |
Liste von nacheinander (im Falle von mehreren Fehlschlägen ※) abzuarbeitenden Funktionen | |
mit jeweils nacheinander (siehe ※) erstmal abzuarbeitenden Argumenten, | |
alles nacheinander durchlaufend, bis irgendwas erfolgreich ein Ergebnis liefert. |
This file contains hidden or 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
POST | |
http://db-regio.hafas.de/bin/hci/mgate.exe | |
HTTP/1.1 | |
User-Agent | |
: Dalvik/2.1.0 (Linux; U; Android 9; moto g(6) Build/PPS29.55-37-4) | |
Content-Type | |
: application/json;charset=UTF-8 | |
Host | |
: db-regio.hafas.de | |
Connection |
This file contains hidden or 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
# -*- coding: utf-8 -*- | |
from dataclasses import dataclass, field | |
from datetime import datetime, timezone | |
from enum import Enum | |
from requests import get | |
from typing import Set, List, Dict, Callable, Union, Optional, Any, Tuple, Iterable | |
import xml.etree.ElementTree as ET | |
@dataclass |
This file contains hidden or 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
#!/usr/bin/env python3.7 | |
# -*- coding: utf-8 -*- | |
from DINO import Version, Line, getlinetrips, readrestrictions, readallstops, printstops, csvstops | |
import pandas | |
from tqdm import tqdm | |
from collections import defaultdict | |
from datetime import timedelta | |
This file contains hidden or 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
import xml.etree.ElementTree as ET | |
from csv import writer | |
from datetime import datetime, timezone | |
from sys import argv | |
def parsefile(filename: str): | |
root = ET.parse(filename).getroot() | |
#wkt = "LINESTRING M (" | |
wkt = "MULTILINESTRING M ((" | |
_xym = "" |
This file contains hidden or 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
Datei: trip_vdt.din | |
Ausgangslage: | |
-> Dokumentation von Mentz ist (sowieso) nicht anwendbar | |
-> Primaerschlussel enthaelt angeblich NICHT die TRIP_ID, diese ist aber trotzdem als mandatory angegeben, und in der description steht wiederum etwas mit "nur" | |
-> Habe mich dazu entschieden, STR_LINE_VAR und LINE_DIR_NR nicht im PK aufzunehmen, dafuer aber TRIP_ID, die sowieso immer vorkommt. | |
-> LINE_NR und TRIP_ID zusammen sind eindeutig und machen die Angabe der STR_LINE_VAR und LINE_DIR_NR nicht mehr notwendig | |
-> Funktioniert so gut und eindeutig, anders (ohne TRIP_ID im PK) wuerde es erst recht nie funktionieren. | |
Problem: |
This file contains hidden or 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
import requests | |
import twitter | |
#import sys | |
from datetime import datetime | |
import logging | |
import xml.etree.ElementTree as ET | |
logging.basicConfig(filename='efa.log',level=logging.INFO) | |
tweet_length = 280 | |
hashtags = "#VRR" |
OlderNewer