Understand your Mac and iPhone more deeply by tracing the evolution of Mac OS X from prelease to Swift. John Siracusa delivers the details.
You've got two main options:
| # The code uses API providers from different networks to check the balance of wallets | |
| # whose mnemonic phrases have been determined to be valid. The results are written to a separate file. | |
| from tqdm import tqdm | |
| from web3 import Web3 | |
| from eth_account import Account | |
| # Enable unaudited HD wallet features | |
| Account.enable_unaudited_hdwallet_features() |
| def get_isin_from_cusip(cusip_str, country_code): | |
| """ | |
| >>> get_isin_from_cusip('037833100', 'US') | |
| 'US0378331005' | |
| """ | |
| isin_to_digest = country_code + cusip_str.upper() | |
| get_numerical_code = lambda c: str(ord(c) - 55) | |
| encode_letters = lambda c: c if c.isdigit() else get_numerical_code(c) | |
| to_digest = ''.join(map(encode_letters, isin_to_digest)) |