Skip to content

Instantly share code, notes, and snippets.

View Excape's full-sized avatar

Robin Excape

View GitHub Profile
@Excape
Excape / puzzle-3.py
Created December 3, 2021 13:44
Advent of Code Day 3
from functools import reduce
length = 12
def inverse_str(bin_str):
return ''.join('1' if c == '0' else '0' for c in bin_str)
def to_int(bin_str):
return int(bin_str, 2)
@Excape
Excape / query.sql
Last active January 22, 2019 15:14
OSM discrepancies between official UIC location and OSM node
uic_ref | stop_name | osm_id | distance | stop_lat | stop_lon | osm_point
---------+--------------------------------+------------+---------------+-----------+-----------+------------------------------
8570794 | Ayent, Bisse d'Ayent | 983827255 | 3838.45236497 | 46.292994 | 7.40284 | POINT(7.437404 46.317924)
8503471 | Ramsen, Post | 4117376859 | 3440.93805811 | 47.707173 | 8.816035 | POINT(8.831183 47.677956)
8589538 | St. Margrethen SG, Central | 984724580 | 1931.45075161 | 47.453921 | 9.607889 | POINT(9.633412 47.451957)
8578792 | Hub, Dorfplatz | 3547306970 | 1573.29028014 | 47.453747 | 9.016092 | POINT(9.034368 47.4606385)
8589470 | Riehen, Moosrain | 983964430 | 1548.82527503 | 47.583269 | 7.658628 | POINT(7.6432449 47.5739776)
8530212 | Zermatt ZBAG-zsb | 240135050 | 1488.30217992 | 46.022429 | 7.752262 | POINT(7.7700623 46.0172947)
8530303 | Les Fumeaux
@Excape
Excape / keybase.md
Created June 16, 2017 18:02
My proof for keybase.io

Keybase proof

I hereby claim:

  • I am excape on github.
  • I am rsuter (https://keybase.io/rsuter) on keybase.
  • I have a public key ASD26WGwjv31rtXDoKxoBNvaODbU5GxR68BzP76fnT5jFQo

To claim this, I am signing this object:

@Excape
Excape / build.sh
Created November 26, 2016 19:46
Deploy mkdocs to GH-Pages with Travis
#!/bin/bash
set -e # exit with nonzero exit code if anything fails
#Build with mkdocs into ./site
mkdocs build --clean
# Checkout gh-pages
git clone --branch gh-pages git@github.com:Excape/hsr-docs-hs16.git gh-pages
@Excape
Excape / openhsr-connect.yaml
Last active September 11, 2017 11:44
openhsr connect HS17 config
# Config file for use in https://github.com/openhsr/connect
#put file to ~/.config/openhsr-connect.yaml
login:
username: m1muster
email: max.mustermann@hsr.ch
sync:
global-exclude:
- .DS_Store