Skip to content

Instantly share code, notes, and snippets.

View Dominik1123's full-sized avatar

Dominik Vilsmeier Dominik1123

View GitHub Profile
@Dominik1123
Dominik1123 / dunder.py
Created February 4, 2022 15:38
Collection of all __dunder__ attributes/methods and functionality for creating a class that intercepts all __dunder__ methods
"""Collection of all __dunder__ attributes/methods and functionality for creating a class that intercepts all __dunder__ methods.
Example usage:
$ python -i dunder.py
>>> T = create_intercept_class()
>>> T()
__new__: args=(), kwargs={}
__init__: args=(), kwargs={}
__repr__: args=(), kwargs={}
@Dominik1123
Dominik1123 / poll_byom.py
Last active December 8, 2022 18:25
Poll emails from byom.de
import argparse
from datetime import datetime
import difflib
from functools import partial
import logging
import os.path
import requests
import time
parser = argparse.ArgumentParser()
@Dominik1123
Dominik1123 / osculating_circle.py
Last active August 6, 2019 14:44
Plot an osculating circle for a 5th order polynomial together with intersecting normals to the curve
import math
from matplotlib.patches import Circle
import matplotlib.pyplot as plt
import numpy as np
ts = np.linspace(-1.25, 1.25, 500)
dt = ts[1] - ts[0]
x = np.poly1d([1, 0])
y = np.poly1d([0.1, -0.5, 0.2, 1, -1, 0])