Skip to content

Instantly share code, notes, and snippets.

@hkalodner
hkalodner / utxo_age.py
Last active February 1, 2024 15:33
BlockSci UTXO age distribution
import blocksci
import pandas as pd
import numpy as np
chain = blocksci.Blockchain("/blocksci/bitcoin")
block_day = 6 * 24
block_year = 365 * block_day
block_week = 7 * block_day
block_month = block_year // 12
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@shagunsodhani
shagunsodhani / LIME.md
Created January 28, 2017 12:32
Summary of "Why Should I Trust You? Explaining the Predictions of Any Classifier" paper

"Why Should I Trust You?": Explaining the Predictions of Any Classifier

Introduction

  • The paper introduces a novel technique to explain the predictions of any classifier in an interpretable and faithful manner.
  • It also proposes a method to explain models by obtaining representative individual predictions and their explanations.
  • Link to the paper
  • Demo

Desired Characteristics for Explanations

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?

@ryanxcharles
ryanxcharles / stealth.md
Last active June 14, 2023 13:35
Stealth Addresses, Transactions and Messages

Stealth Addresses, Transactions and Messages

Normal bitcoin addresses cannot be published in public without losing all privacy, since all transactions to that address can be seen by anybody. Stealth addresses let us publish an address in public which can be used by payers to derive a new address that the payee has access to, but no one else knows is associated with the stealth address. The trick is that the payer must use a nonce to derive the address paid to, and this nonce must be delivered to the payee so they know how to recover the funds. This nonce can be delivered in the transaction, so that no separate channel is required to communicate the nonce.

The same technology can also be used to construct new public keys to send encrypted messages to.

We will discuss four methods:

  1. The simplest form of stealth addresses, which has some drawbacks that can improved upon.
@jompa
jompa / Erlan POST MailChimp ChicagoBoss
Created October 3, 2013 20:50
Erlang httpc POST request to MailChimp API 2.0 in ChicagoBoss
-module(myapp_register_controller, [Req]).
-compile(export_all).
-define(API_KEY, "mykey").
-define(LIST_ID, "mylist").
add('GET', [])->
ok;
@triceam
triceam / index.html
Created August 20, 2012 19:44
JavaScript Templating Example to show rendering techniques of JS data in HTML or XML formats.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>JSON Transform</title>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.8.0.min.js"></script>
<script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.3.3/underscore-min.js"></script>
<script type="text/javascript" src="https://raw.github.com/douglascrockford/JSON-js/master/json2.js"></script>
<link href="http://twitter.github.com/bootstrap/assets/css/bootstrap.css" rel="stylesheet"></link>

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name: