Skip to content

Instantly share code, notes, and snippets.

View r-marques's full-sized avatar

Rodolphe Marques r-marques

View GitHub Profile
@r-marques
r-marques / benchmark_get_unspents.py
Created November 23, 2016 12:55
Benchmark BigchainDB get_unspents
import os
import random
import time
import rethinkdb as r
from bigchaindb import Bigchain
from bigchaindb.models import Transaction
from bigchaindb.common.crypto import generate_key_pair
from bigchaindb.util import ProcessGroup

Keybase proof

I hereby claim:

  • I am r-marques on github.
  • I am rmarques (https://keybase.io/rmarques) on keybase.
  • I have a public key whose fingerprint is 49FE 5FDE EBBD 8A47 A2F0 9466 6184 CB6A 7182 8027

To claim this, I am signing this object:

[diff]
tool = pycharm
[difftool "pycharm"]
cmd = /usr/local/bin/pycharm diff "$LOCAL" "$REMOTE" && echo "Press enter to continue..." && read
[merge]
tool = pycharm
keepBackup = false
[mergetool "pycharm"]
cmd = /usr/local/bin/pycharm merge "$LOCAL" "$REMOTE" "$BASE" "$MERGED"
@r-marques
r-marques / text_to_btc_address.py
Created June 2, 2015 07:44
Encode text in bitcoin addresses
import requests
from pycoin import encoding
HASHTOADDRESS = "https://blockchain.info/q/hashtoaddress/{}"
def text_to_address(text):
if len(text) > 20:
raise ValueError('Text needs to be below 20 bytes')
else:
text = text + ' ' * (20 - len(text))