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 / absorbing_markov_chains.py
Last active October 1, 2023 12:06
Absorption probabilities in finite Markov chains
"""
Code used in the video
https://youtu.be/BiViLT6FCC4
"""
import random
import numpy as np
class LinAlgLib: # Linear algebra'ish functions
@Nikolaj-K
Nikolaj-K / regularity_vs_induction.md
Last active November 8, 2022 01:24
Regularity versus Induction

Text used in this video:

https://youtu.be/7HKnOOvssvs

==== Recall the regularity statement ==== $\forall s.\Big(s\neq{},\to,\exists(x\in s). x\cap s={}\Big)$

==== Logical definitions and theorems ==== === Definitions ===

@Nikolaj-K
Nikolaj-K / regularity_nonstandard.md
Last active September 7, 2022 13:51
Regularity and non-standard models of arithmetic #PaCE1
@Nikolaj-K
Nikolaj-K / choice_implies_lem.md
Last active August 16, 2022 23:35
AoC => LEM

Text used in the video

https://youtu.be/2EOW23uVcRA

==== ==== ==== ==== ==== ==== ==== ==== ==== ==== ==== ==== ==== ====

Theorem: ${\mathrm{Axiom\ of\ Choice}}$ implies ${\mathrm{LEM}}$

More concretely: If equality is governed by set-extensionality, then for any predicate $P$ allowed

@Nikolaj-K
Nikolaj-K / letterFrequency.py
Last active July 1, 2022 15:06 — forked from pozhidaevak/letterFrequency.py
Python dict with English letter frequency
LETTER_FREQUENCIES = {'E' : 12.0,
'T' : 9.10,
'A' : 8.12,
'O' : 7.68,
'I' : 7.31,
'N' : 6.95,
'S' : 6.28,
'R' : 6.02,
'H' : 5.92,
'D' : 4.32,
import time
import pyautogui # pip install pyautogui
# Warning: This script will control your cursor for its runtime
ID_WHERE_YOU_ARE_NOW = 13665
ID_TARGET = 13800
BUTTON_POSITION = (1400, 500) # Depends on your screen
SLEEP_TIME = 0.1
DISTANCE = ID_TARGET - ID_WHERE_YOU_ARE_NOW + 1
@Nikolaj-K
Nikolaj-K / lotus_recall.py
Last active March 15, 2022 22:20
What's the optimal deck consisting of Lotus & Recall only?
"""
Code discussed in the video
https://youtu.be/s5ud06udqT0
"""
from random import shuffle
NUM_GAME_SIMS: int = 1000
PRINT_LOG: bool = NUM_GAME_SIMS == 1
@Nikolaj-K
Nikolaj-K / lotus_and_recall_deck.py
Last active March 10, 2024 13:03
Computing the best ratio of lotus to recall among lotus-recall-only decks
"""
Script discussed in
https://youtu.be/s5ud06udqT0
"""
import random
NUM_GAME_SIMS = 10 ** 7
@Nikolaj-K
Nikolaj-K / koenig.py
Last active October 16, 2021 09:49
Failure of the computable weak Kőnig's lemma
import os
os.system("clear")
"""
Weak Königs lemma:
"Every infinite subtree of the full binary tree has an infinite path."
See
https://en.wikipedia.org/wiki/K%C5%91nig%27s_lemma
https://en.wikipedia.org/wiki/Reverse_mathematics#The_big_five_subsystems_of_second-order_arithmetic
@Nikolaj-K
Nikolaj-K / semidecidable.py
Created August 23, 2021 02:30
A Turing machine abstraction for motivating the notion of a semi-decidable set.
"""
Code discussed in:
https://youtu.be/Ox0tD58DTG0
This video is mostly about understadning decidable vs. semi-decidable sets
and showing that they are not the same, i.e. there are undecidable but still semi-decidable.
We'll show how the Halting problem is of that type. It will be non-decidable by diagonalization
and we'll impement a general dovetailing_runing algorithm that makes it clear that it's semi-decidable.
"""