Skip to content

Instantly share code, notes, and snippets.

View nschloe's full-sized avatar
👨‍💻
doing math

Nico Schlömer nschloe

👨‍💻
doing math
  • Monday Tech
  • Berlin, Germany
  • X @nschloe
View GitHub Profile
@rena2019
rena2019 / deutschlandticket.md
Last active June 1, 2024 14:25
DeutschlandTicket Anomalien

DeutschlandTicket Anomalien

Einige DeutschlandTickets sind anders als die anderen. Preislich soll es für 49EUR starten und für ganz Deutschland einen bestimmten Featureset mitbringen. Folgende Verkehrsverbunde wollen allerdings Zusatzoptionen anbieten:

Falls Ihr noch weitere kennt: einfach unten als Kommentar oder via Twitter ergaenzen

  • Dresdner Verkehrsbetriebe AG (DVB) @ Verkehrsverbund Oberelbe (VVO) bzw siehe PDF vom VVO
    • Deutschlandticket Plus Mitnahme (+10 EUR)
      Berechtigt zur Mitnahme im Verkehrsverbund Oberelbe (VVO) von einem Hund oder einem Fahrrad ohne zeitliche Einschränkung sowie einem weiteren Erwachsenen und bis zu vier Schülern bis zum 15. Geburtstag von Montag bis Freitag zwischen 18 und 4 Uhr sowie ganztags an Wochenenden und Feiertagen.
@crvdgc
crvdgc / math-render-error.md
Last active June 27, 2022 03:16
Showcase and analyze a rendering error of MathJax in GitHub Markdown

GitHub Markdown MathJax rendering error

Two inlines after text will hide the text in between

where $T$ is lookback; $\tau$ is horizon.

renders to

@fredrik-johansson
fredrik-johansson / color_function.py
Created February 16, 2022 20:31
Color functions
from colorsys import hls_to_rgb, rgb_to_hls
import math
import cmath
CLAMP = lambda y: max(0.0, min(y, 1.0))
BLEND = lambda x, y: 0.5*x + 0.5*y
DODGE = lambda a, b: a / (1.0 - b + 1/256.0)
# gimp color balance algorithm
def balance_channel(value, l, shadows, midtones, highlights):
@jtpio
jtpio / ast_visitor_template.py
Last active April 15, 2024 10:31
Template for visiting all Python AST nodes
"""
All the methods were generated based on the list of nodes from the
"Green Tree Snakes" guide:
https://greentreesnakes.readthedocs.io/en/latest/index.html
"""
import ast
class Visitor(ast.NodeVisitor):
@gbaman
gbaman / graphql_example.py
Created November 1, 2017 00:18
An example on using the Github GraphQL API with Python 3
# An example to get the remaining rate limit using the Github GraphQL API.
import requests
headers = {"Authorization": "Bearer YOUR API KEY"}
def run_query(query): # A simple function to use requests.post to make the API call. Note the json= section.
request = requests.post('https://api.github.com/graphql', json={'query': query}, headers=headers)
if request.status_code == 200:

Aligning images

This is a guide for aligning images.

See the full Advanced Markdown doc for more tips and tricks

left alignment

@aaronzirbes
aaronzirbes / shrink-git-repo.sh
Created January 19, 2013 05:32
This script will help you remove large files from your git repo history and shrink the size of your repository.
#!/bin/bash
echo "Finding and Purging Big Files From Git History"
echo "=============================================="
echo ""
echo "http://naleid.com/blog/2012/01/17/finding-and-purging-big-files-from-git-history/"
echo ""
pushd "$(git rev-parse --show-toplevel)" > /dev/null