Skip to content

Instantly share code, notes, and snippets.

Kevin Arutyunyan d3d9

Block or report user

Report or block d3d9

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 dino-zaehlung.py
#!/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
View depdata.py
# -*- 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
@d3d9
d3d9 / JourneyDetails
Last active Aug 20, 2019
DB Busradar NRW requests
View JourneyDetails
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
View 2-vrr-depfunctions.py
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.
View boxmatrix.py
#!/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
@d3d9
d3d9 / example.py
Last active Mar 1, 2019
radbox.py: lädt Daten von https://www.bikeandridebox.de/ bzw. https://www.dein-radschloss.de/ und weiteren (Kienzler/SinusQuadrat)
View example.py
#!/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:
@d3d9
d3d9 / hagen.ini
Last active Mar 27, 2018
Hausnummernvergleich zwischen amtlichen Daten der Stadt Hagen und Daten von OpenStreetMap.
View hagen.ini
[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
You can’t perform that action at this time.