Skip to content

Instantly share code, notes, and snippets.

@endolith
endolith / election_simulator.py
Last active December 27, 2020 18:57
Election simulator
# -*- coding: utf-8 -*-
"""
Created on Sat Dec 17 11:33:35 2016
"""
from __future__ import division, print_function
from numpy.random import multivariate_normal
import matplotlib.pyplot as plt
from scipy.spatial.distance import cdist
import numpy as np
If you have an opinion on ST (Speedy Trial) proposal please ACK/NACK this so we can log the level of support for this proposal
Details of the proposal are here: https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2021-March/018583.html
edit (April 14th 2021)
Jeremy Rubin has asked me to add the following:
"[bitcoin/bips#1104](https://github.com/bitcoin/bips/pull/1104) has been proposed (and implemented via
[bitcoin/bitcoin#21377](https://github.com/bitcoin/bitcoin/pull/21377)) as a concrete interpretation of @harding's original
proposal. Feel free to re-ACK on the BIP PR (and in the core PR if you feel qualified to review) if this plan matches your

Replace by Fee Improvements

This post discusses limitations of current Bitcoin Core RBF policy and attempts to start a conversation about how we can improve it, summarizing some ideas that have been discussed. Please reply if you have any new input on issues to be solved and ideas for improvement!

Background

Please feel free to skip this section if you are already familiar

@OrganicPanda
OrganicPanda / hacky-scrollbar-resize-listener.js
Last active April 7, 2024 10:53
A sham that will throw a window resize event even when scrollbars are added/removed (this is not something the standard window resize event does). Tested in IE9+, Chrome & Firefox latest.
// Demo: http://jsfiddle.net/pFaSx/
// Create an invisible iframe
var iframe = document.createElement('iframe');
iframe.id = "hacky-scrollbar-resize-listener";
iframe.style.cssText = 'height: 0; background-color: transparent; margin: 0; padding: 0; overflow: hidden; border-width: 0; position: absolute; width: 100%;';
// Register our event when the iframe loads
iframe.onload = function() {
// The trick here is that because this iframe has 100% width