Skip to content

Instantly share code, notes, and snippets.

View dgenr8's full-sized avatar

Tom Harding dgenr8

  • California, US
View GitHub Profile
@dgenr8
dgenr8 / stickygate.py
Created November 30, 2016 15:40 — forked from awemany/stickygate.py
Python code awemany vs. dgenr8 block depth probability
#!/usr/bin/env python
import numpy as np
from scipy.special import binom
from scipy.integrate import quad
from scipy.stats import erlang
######################################################################
# awemany: look at binomial
def bprop(k, n, p):
"""Binomial probability density.
Probability of drawing exactly k x-like items out of n total, where
#!/usr/bin/env python2
# Copyright (c) 2014-2015 The Bitcoin Core developers
# Copyright (c) 2015-2016 The Bitcoin Unlimited developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
# Exercise the getchaintips API. We introduce a network split, work
# on chains of different lengths, and join the network together again.
# This gives us two tips, verify that it works.
import time
#!/usr/bin/env python2
# Copyright (c) 2014-2015 The Bitcoin Core developers
# Copyright (c) 2015-2016 The Bitcoin Unlimited developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
# Exercise the getchaintips API. We introduce a network split, work
# on chains of different lengths, and join the network together again.
# This gives us two tips, verify that it works.
import time
### Keybase proof
I hereby claim:
* I am dgenr8 on github.
* I am dgenr8 (https://keybase.io/dgenr8) on keybase.
* I have a public key whose fingerprint is 3C80 E037 EE28 86AE D8DC E831 CB7B 9002 412A 8FDF
To claim this, I am signing this object: