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
import hmac | |
import hashlib | |
import requests | |
import time | |
import json | |
import re | |
import arrow | |
from decimal import Decimal | |
def to_bytes(s): |
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
import bitcoin | |
def btc_to_btcp(addr): | |
assert addr[0] in ('1', '3') # we don't support bech32 addrs for now | |
addr_prefix = b'\x13\x25' if addr[0] == '1' else b'\x13\xaf' | |
pkh = bitcoin.b58check_to_bin(addr) | |
assert len(pkh) == 20 | |
return bitcoin.bin_to_b58check(addr_prefix[1:2] + pkh, addr_prefix[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 ofxparse import OfxParser | |
import sys | |
import csv | |
with open(sys.argv[1]) as f: | |
ofx = OfxParser.parse(f) | |
account = ofx.account | |
statement = account.statement | |
institution = account.institution |
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
''' | |
Copyright (c) 2020 Lucas Ryan | |
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. |
OlderNewer