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
def shuffle(cards): | |
return [i for sublst in zip(cards[:len(cards) // 2], cards[len(cards) // 2:]) for i in sublst] | |
def main(deck_len): | |
cards = list(range(deck_len)) | |
start = shuffle(cards) | |
counter = 1 | |
while start != cards: | |
start = shuffle(start) |
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 two1.lib.wallet import Wallet, exceptions | |
from two1.lib.bitcoin.crypto import PublicKey | |
from two1.lib.bitcoin.script import Script | |
from two1.lib.bitcoin.txn import Transaction | |
SRV_ACCT = 'signing' | |
wallet = Wallet() | |
try: |
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 two1.lib.wallet import Wallet, exceptions | |
from two1.lib.bitcoin.crypto import PublicKey | |
from two1.lib.bitcoin.script import Script | |
from two1.lib.bitcoin.txn import Transaction | |
SRV_ACCT = 'signing' | |
wallet = Wallet() | |
try: |
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 two1.lib.wallet import Wallet | |
wallet = Wallet() | |
print(wallet) |
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 two1.lib.wallet import Wallet | |
wallet = Wallet() | |
tx = wallet.send_to("13jtZRqzYK6fg9MFP1cRvjSB8g5TufEMmp", 1000) | |
print(tx) |
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 two1.lib.wallet import Wallet, exceptions | |
wallet = Wallet() | |
try: | |
wallet.create_account('signing') | |
print("successfully created account") | |
except exceptions.AccountCreationError: | |
print("failed to create account") | |
pass |
NewerOlder