Skip to content

Instantly share code, notes, and snippets.

View rt121212121's full-sized avatar

Roger Taylor rt121212121

View GitHub Profile
@rt121212121
rt121212121 / test.py
Last active October 29, 2024 17:56
Cuckoo filter testing
from collections import defaultdict
import os
import bsvcuckoo
LOOKUP_COUNT = 1000000
ITERATIONS = 100
MAX_KICK_COUNT = 1
with open("test.csv", "w") as f:
@rt121212121
rt121212121 / benford_intevals.py
Created October 12, 2020 06:15
Simple script implementing nchain benford's law distribution example
# https://nchain.com/2019/10/22/benfords-wallet/
from collections import defaultdict
import random
def f(v, n):
l = []
for i in range(n-1):
l.append(random.randint(1, v))
l.append(v)