Skip to content

Instantly share code, notes, and snippets.

View Nikolaj-K's full-sized avatar
💭
I'm combinating Why's.

Nikolaj Kuntner Nikolaj-K

💭
I'm combinating Why's.
  • DLR Germany, IST Austria, Infineon, ...
  • Vienna
View GitHub Profile
@Nikolaj-K
Nikolaj-K / local_wallet_codex_prompt.md
Last active February 21, 2026 13:15
Local wallet Codex prompt

Dowload the Codex UI at

https://chatgpt.com/codex/

  • log in with your OpenAI (I assume you're on a mac here)
  • create a new empty folder somewhere and then with Codex open a project/thread in there
  • set it to Gpt-5.3-Codex (maybe Extra High)
  • (during runtime you might progressively want to say Yes to various permissions - you won't go far apart from downloading python stuff if you don't have it)
  • start chatting with it a bit, then dump in the following longer prompt at once:
@Nikolaj-K
Nikolaj-K / churchs_thesis.md
Last active February 1, 2026 11:05
Gödelian arithmetization and the anti-classical Church's thesis

This is the script discussed in the video at

https://youtu.be/gNSv2kWRv88

Gödel arithmetization and the anti-classical Church's thesis

Outlook for this video:

  • On the arithmetization of proof
  • On Gödel incompleteness with emphasis on quantifiers
  • Note on Existence and Disjunction property
  • Note on the failure of the Least Number Principle
This script is explained at
https://youtu.be/53lvGfk9ib8
For all $n$,
$\int_{-\pi}^\pi\, x^{2n} \left(\dfrac{2}{1 + {\mathrm e}^{\sin(x)}}\right){\mathrm d}x = \int_{-\pi}^\pi x^{2n} \,{\mathrm d}x$
$\dfrac{2}{1+{\mathrm e}^x} = 1 - \tanh(\frac{1}{2}x)$
@Nikolaj-K
Nikolaj-K / logsumexp_vs_max.md
Created January 9, 2026 17:46
Quickie on LogSumExp vs Max

Video where this script is discussed: https://youtu.be/Lsf4eAGvODs

Consider a non-strictly ordered space $X$ with an (absolutely homogenous) absolute value function $|\cdot|: X\to X$ If $B:(X\times X)\to X$ is a symmetric map, then

$B(\max(x, y)-x, \max(x, y)-y) = B(0, |x-y|)$

Proof

@Nikolaj-K
Nikolaj-K / wiki_page_searcher.py
Last active December 31, 2025 19:19
Minimal Wikipedia semantic search wrapper for web integration.
#!/usr/bin/env python3
"""
Minimal Wikipedia semantic search wrapper for web integration.
Install hints (CPU):
- python, duh
- pip install -U sentence-transformers faiss-cpu numpy
Expected index artifacts (see zip):
- path/to/pages_embeddings.index (main data item, 200 MB)
@Nikolaj-K
Nikolaj-K / applied_optimization_2025.md
Last active December 17, 2025 10:19
Applied Optimization 2025, exercises and some eotes

This file starts with Exercises, which ends at exercise 10 and is followed by "Notes: Applied Optimization".

Search for "Exercise 9" for the Regression cost function minimization exercises.

Greetings Nikolaj Kuntner


Exercises - Applied Optimization

@Nikolaj-K
Nikolaj-K / glasser.md
Last active November 21, 2025 18:34
Visualizer for Glasser transform type theorems

Script for the video

https://youtu.be/LfiIiSPg3Ms

$f$ ... Lebesgue-integrable over (all of) ${\mathbb R}$,

$\int_{-\infty}^\infty f\big(x + d\big),{\mathrm d}x = \int_{-\infty}^\infty f\big(x\big),{\mathrm d}x$

$\int_{-\infty}^\infty f\big(x - \dfrac{1}{x}\big),{\mathrm d}x = \int_{-\infty}^\infty f\big(x\big),{\mathrm d}x$

@Nikolaj-K
Nikolaj-K / prob_theory_midterm.md
Last active November 13, 2025 13:15
Probability Theory Statistics Master Midterm

Probability Theory 1 – Script skeleton

  • 2024W-Prob1__script.pdf: sections 1–5 (up to and including 5. Lebesgue-Integral)
  • 2025W-Prob1-Collection.pdf: sections 0–3 (up to and including 3. Das Lebesgue-Integral)

Notes:

  • Warning: I dropped \mathcal, since it doesn't render in gist
  • Likewise, _\# became _H
  • The items have rough importance rankings
  • roughly "important" vs "neutral" and "random"; I'll derank a few later
@Nikolaj-K
Nikolaj-K / appl_opt_251101_ex5.md
Last active November 1, 2025 11:49
Applied Optimization 251101, Ex5

The relevant content starts at page 17 in the script. The chapter ends on page 25. Note that the exercises are different ones from the listing in the script.

==== Exercise's context ====

We consider the general minimization problem $p^{\ast} := \inf_{x \in M \subseteq X} f(x),$ where $X \subseteq \mathbb{R}^n$, $f:X\to\mathbb{R}$ is continuous,

@Nikolaj-K
Nikolaj-K / dependent_bernoulli.py
Created August 31, 2025 21:01
Sampler for two processes with Bernoulli trial marginals
"""
Code and prompt used in the video
https://youtu.be/xcE_0azawvM
"""
"""You'll get two tasks
First part:
Consider a joint distirbution of two random variables X_k with k in {a, b} (i.e. two random variables X_a and X_b),
over a finite outcome sets of size n_a and n_b.
Explain what the marginal distributions are.