Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am turunut on github.
  • I am turunut (https://keybase.io/turunut) on keybase.
  • I have a public key ASAydJkdWU3h2VwAo9PMTQ48UX8J70q0VykFwsWU0OOQPQo

To claim this, I am signing this object:

@turunut
turunut / IOTAseed.py
Created November 19, 2017 17:16
IOTA seed generator
from random import SystemRandom
import random
import string
alphabet = u'9ABCDEFGHIJKLMNOPQRSTUVWXYZ'
generator = SystemRandom()
print(u''.join(generator.choice(alphabet) for _ in range(81)))
print(''.join(random.choice(string.ascii_uppercase + "9") for _ in range(81)))
@turunut
turunut / minePYTHON36.py
Last active February 22, 2022 07:48 — forked from shirriff/mine.py
Example of how a Bitcoin block is mined by finding a successful nonce
import hashlib, struct, codecs
ver = 2
prev_block = "000000000000000117c80378b8da0e33559b5997f2ad55e2f7d18ec1975b9717"
mrkl_root = "871714dcbae6c8193a2bb9b2a69fe1c0440399f38d94b3a0f1b447275a29978a"
time_ = 0x53058b35 # 2014-02-20 04:57:25
bits = 0x19015f53
# https://en.bitcoin.it/wiki/Difficulty
exp = bits >> 24