This Gist moved to https://github.com/coinlab/bitcoin-docs.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import urllib2, urllib | |
import logging | |
def send_mail_sendgrid(from, to, subject, body): | |
base_url = 'https://sendgrid.com/api/mail.send.json' | |
params = { | |
'api_user': '[email protected]', | |
'api_key': 'yourpassword', | |
'from': from, | |
'to': to, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Low rank approximation for the lena image | |
""" | |
import numpy as np | |
import scipy as sp | |
from scipy import linalg | |
import pylab as pl | |
X = sp.lena().astype(np.float) | |
pl.gray() |
See https://en.bitcoin.it/wiki/BIP_0070 for the latest version of this document; I'll keep this document so the process of discussion/revision isn't lost.
This document proposes protocol buffer-based formats for a simple payment protocol between a customer's bitcoin client software and a merchant.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# Copyright Harald Schilly <harald.schil.ly> | |
# License: Apache 2.0 | |
# Hint: run it periodically via: watch -d -n 30 python countdown.py | |
# (sorry blockexplorer ...) | |
# which halfing? 1, 2, ... | |
nb_halfing = 2 | |
quot = 2 ** nb_halfing | |
reward = 50. / quot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# maybe.py - a Pythonic implementation of the Maybe monad | |
# Copyright (C) 2014. Senko Rasic <[email protected]> | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is | |
# furnished to do so, subject to the following conditions: | |
# |
A description of known problems in Satoshi Nakamoto's paper, "Bitcoin: A Peer-to-Peer Electronic Cash System", as well as notes on terminology changes and how Bitcoin's implementation differs from that described in the paper.
The longest chain not only serves as proof of the sequence of events witnessed, but proof that it came from the largest pool of CPU power.