Skip to content

Instantly share code, notes, and snippets.

View klieret's full-sized avatar
💭
🦊

Kilian Lieret klieret

💭
🦊
View GitHub Profile
@klieret
klieret / product_call.py
Last active November 19, 2019 14:23
Oftentimes, we call functions over a wide range of parameter values, e.g. to generate plots for different scenarios. For multiple parameters, this leads to ugly multi-loops and cumbersome boilerplate. With this snippet it becomes one line.
from typing import Callable, Optional, Dict, Any
import itertools
from tqdm.auto import tqdm
def product_call(
fct: Callable,
static: Optional[Dict[str, Any]] = None,
multi: Optional[Dict[str, Any]] = None,
progress=False
) -> Tuple[List[Dict[str, Any]], List[Any]]:
@klieret
klieret / latexclean.py
Last active May 9, 2025 08:44
Python script to clean LaTeX build/auxiliary files with the option of doing so recursively. Asks before removing files.
#!/usr/bin/env python3
"""
Clean LaTeX build files with the option of doing so recursively.
Asks before removing files.
https://gist.github.com/klieret/b3e032095d78269c811f4f8c85f6227b
Kilian Lieret 2020
MIT license
@klieret
klieret / demo.txt
Created July 17, 2023 13:16
demonstration
thiw is a demo
@klieret
klieret / obsidian.md
Last active June 5, 2024 17:04
obsidian addons etc.
asdfasdf