Skip to content

Instantly share code, notes, and snippets.

Avatar

Petteri Aimonen PetteriAimonen

View GitHub Profile
@PetteriAimonen
PetteriAimonen / numerology.py
Created Aug 10, 2022
Python script to find numerological coincidences in bible verses
View numerology.py
# Find numerological coincidences in bible verses
# https://skeptics.stackexchange.com/questions/53659/are-the-mathematical-constants-e-and-%cf%80-encoded-in-the-bible
import itertools
import functools
import math
import random
# Source data, in this case Genesis 1:1
words = [[400, 10, 300, 1, 200, 2], [1, 200, 2], [40, 10, 5, 30, 1], [400, 1], [40, 10, 40, 300, 5], [400, 1, 6], [90, 200, 1, 5]]
View interpolate.py
#!/usr/bin/python3
# Interpolate depth maps
from PIL import Image
import math
import random
contours = Image.open("contours.png")
contourspx = contours.load()
w, h = contours.size
View keybase.md

Keybase proof

I hereby claim:

  • I am petteriaimonen on github.
  • I am jpa (https://keybase.io/jpa) on keybase.
  • I have a public key ASDMJhsa2oINfygbEdRO47UU2yytVjRxUXZK3OH70zMwQgo

To claim this, I am signing this object:

View gist:8a05e7b908183251f55ea43d118b49b2
>>> class foobar: pass
...
>>> A = foobar()
>>> B = foobar()
>>> A.b = B
>>> B.a = A
>>> pickle.dumps(A)
"(i__main__\nfoobar\np0\n(dp1\nS'b'\np2\n(i__main__\nfoobar\np3\n(dp4\nS'a'\np5\ng0\nsbsb."
>>> newA = pickle.loads(pickle.dumps(A))
>>> newA.b