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 / so3_mat_exp.py
Created August 12, 2021 18:24
Rotating points with SO3 using the matrix exponential for so3
"""
Code from the video:
https://youtu.be/QcfYTagj3pk
For two gifs made from it, see
https://thumbs.gfycat.com/BlissfulMenacingCanine-mobile.mp4
https://thumbs.gfycat.com/MinorHealthyCub-mobile.mp4
Note that this code can't be executed on it's own - it's just all the functions about geometry used in the animation.
@Nikolaj-K
Nikolaj-K / acceleration_annotation.py
Last active August 1, 2021 23:27
How to compute velocity and acceleration from a stream of points
"""
Code discussed in this video:
https://youtu.be/qA58ggk9fPA
And here's the links mentioned:
Torque-free motion gif's:
Integrated motion:
https://gfycat.com/costlyhardtofinddolphin &
@Nikolaj-K
Nikolaj-K / ascending_products.py
Created June 6, 2021 19:36
>Is there a way to generate pairs of numbers in ascending order of their product?
from functools import reduce
from more_itertools import set_partitions
import operator
from sympy.ntheory import factorint
from time import sleep
def prod(nums):
return reduce(operator.mul, nums, 1)
@Nikolaj-K
Nikolaj-K / gambling_problems_simple.py
Created May 25, 2021 11:40
gambling_problems_simple
import random
# Set configuration in simulate() function
def naturals():
n = 0
while True:
yield n
@Nikolaj-K
Nikolaj-K / bell_concat.py
Last active May 23, 2021 22:29
Concatenation of analytic functions using Bell polynomials
"""
This is the script discussed in the video
https://youtu.be/JCXZw1qC1ZA
$g(x) := 2 + 5 x^2 - 6 x^3 + x^4$
$g(x^2) =$
$= 2 + 5 x^4 - 6 x^6 + x^8$
@Nikolaj-K
Nikolaj-K / bell_circ.py
Last active May 22, 2021 00:01
Concatenation of series via Bell polynomials
import math
from sympy import bell # https://en.wikipedia.org/wiki/Bell_polynomials
"""
# Pretty print bell polynomials
from sympy import Symbol, symbols
print(bell(4, Symbol('t')))
print(bell(6, 2, symbols('x:6')[1:]))
print()
"""

Keybase proof

I hereby claim:

  • I am nikolaj-k on github.
  • I am nikolajk (https://keybase.io/nikolajk) on keybase.
  • I have a public key ASC4jS_ZAFOTsigcMsy9J7rRKelrY4yFjK54i4Ae-jv0sQo

To claim this, I am signing this object:

"""
Doing the same as on
https://wallet.compendia.org/
https://wallet.nos.dev/
See
https://compendia.org/
See also
https://ark.dev/docs/core/transactions/cryptography#privatekey
@Nikolaj-K
Nikolaj-K / satoshi.py
Last active April 3, 2025 18:08
A private key brute forcing routine
"""
Script for the video discussed in
https://youtu.be/2ewwFC0FzE4
Script to bruteforce search for the private key given a public key.
Efficient python and C 99 algos to for the SECP256k1 log at:
https://github.com/Telariust
See also the programs in
https://privatekeys.pw/
@Nikolaj-K
Nikolaj-K / compendia_api.py
Last active February 22, 2021 23:14
Using python to run through the Compendia API examples
"""
Using the python requests library to run through query examples calls following
https://docs.compendia.org/api
or
https://api.ark.io/api
Manually, one can do the same using curl via, e.g.,
'curl https://api.nos.dev/api/v2/blockchain'
which you might call from python (Not recommended, as this variant not return python dicts)
import subprocess; subprocess.run(["curl", "https://api.nos.dev/api/v2/blockchain"])