Skip to content

Instantly share code, notes, and snippets.

View vleugelcomplement's full-sized avatar

Iliya Tikhonenko vleugelcomplement

  • MPE
  • Garching
View GitHub Profile
@vleugelcomplement
vleugelcomplement / piticks.py
Last active September 21, 2023 12:53
matplotlib ticks at multiples of pi
"""
An example of an attempt to get non-standard ticks in matplotlib plot.
Here, we use π/3 as unit length.
"""
import numpy as np
from fractions import Fraction as frac
import matplotlib.pyplot as plt
from matplotlib.ticker import FuncFormatter, MultipleLocator
@vleugelcomplement
vleugelcomplement / scatdens.py
Created September 19, 2019 18:12
scatter-density plots
from scipy.interpolate import interpn
from scipy.stats import gaussian_kde
from scipy.spatial import cKDTree
import seaborn as sb
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.path as mpath
from matplotlib.colors import Normalize
from matplotlib import cm
@vleugelcomplement
vleugelcomplement / recognize.py
Created May 14, 2021 22:57
transcribe mp4 video with vosk engine
#!/usr/bin/env python3
# see https://alphacephei.com/vosk
from vosk import Model, KaldiRecognizer, SetLogLevel
import argparse
import wave
import subprocess
import json
from pathlib import Path
\cslet{beamer@@tmpop@title page@focus}\relax
\setbeamerfont{author}{size=\LARGE, shape=\scshape}
\setbeamerfont{institute}{size=\footnotesize, shape=\scshape}
\defbeamertemplate*{title page}{focus}{%
\vspace{-1.\baselineskip}
\begin{minipage}[b][0.275\paperheight]{\textwidth}
\vspace{\baselineskip}
\usebeamerfont{title}
\usebeamercolor[main]{frametitle}