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
| # By: Justin Chase | |
| # Description: Based heavily on PYBITCOINTOOLS - https://github.com/vbuterin/pybitcointools By: vbuterin | |
| # Version: 0.01 | |
| import sys, re | |
| import binascii | |
| import os | |
| import hashlib | |
| import random | |
| import time |
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
| #!/usr/bin/python3 | |
| import sys | |
| from bitcoin import privtopub, pubtoaddr, random_key | |
| for x in range(int(sys.argv[1])): | |
| key = random_key() | |
| addr = pubtoaddr(privtopub(key)) | |
| print("{},{}".format(addr, key)) |
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
| # delete local tag '12345' | |
| git tag -d 12345 | |
| # delete remote tag '12345' (eg, GitHub version too) | |
| git push origin :refs/tags/12345 | |
| # alternative approach | |
| git push --delete origin tagName | |
| git tag -d tagName |
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
| # Just a test to see how Eliptic Curve DSA works in Bitcoin. | |
| # This isn't production code, this was an exploratory process simply | |
| # for me to learn about it. | |
| def egcd(a, b): | |
| if a == 0: | |
| return (b, 0, 1) | |
| else: | |
| g, y, x = egcd(b % a, a) | |
| return (g, x - (b // a) * y, y) |
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
| # Solves a randomized 8-puzzle using A* algorithm with plug-in heuristics | |
| import random | |
| import math | |
| _goal_state = [[1,2,3], | |
| [4,5,6], | |
| [7,8,0]] | |
| def index(item, seq): |