This file contains hidden or 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
bitcoin-cli getrawtransaction 54e48e5f5c656b26c3bca14a8c95aa583d07ebe84dde3b7dd4a78f4e4186e713 | sed 's/0100000000000000/\n/g' | tail -n +2 | cut -c7-136,139-268,271-400 | tr -d '\n' | cut -c17-368600 | xxd -p -r > bitcoin.pdf |
This file contains hidden or 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
from PIL import Image, ImageFont, ImageDraw | |
from collections import namedtuple | |
def position_tuple(*args): | |
Position = namedtuple('Position', ['top', 'right', 'bottom', 'left']) | |
if len(args) == 0: | |
return Position(0, 0, 0, 0) | |
elif len(args) == 1: | |
return Position(args[0], args[0], args[0], args[0]) |
This file contains hidden or 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
from __future__ import print_function, division | |
""" | |
Example of how calculations on the secp256k1 curve work. | |
secp256k1 is the name of the elliptic curve used by bitcoin | |
see http://bitcoin.stackexchange.com/questions/25382 | |
""" | |
## the prime modules used in the elliptic curve coordinate calculations | |
p = 2**256 - 2**32 - 977 |