Skip to content

Instantly share code, notes, and snippets.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import NSKeyedUnArchiver, json
def decodePlist(data):
if data[:2]=='0x': data=data[2:]
data=bytes.fromhex(data)
my_dict=NSKeyedUnArchiver.unserializeNSKeyedArchiver(data)
return(json.dumps(my_dict, indent=4, sort_keys=True, default=str))
public MainPage()
{
this.InitializeComponent();
Loaded += MainPage_Loaded;
}
private async void MainPage_Loaded(object sender, RoutedEventArgs e)
{
string url = "https://p.bigstockphoto.com/GeFvQkBbSLaMdpKXF1Zv_bigstock-Aerial-View-Of-Blue-Lakes-And--227291596.jpg";
var file = await Windows.Storage.ApplicationData.Current.LocalFolder.CreateFileAsync("photo.jpg");
import sys
if __name__ == "__main__":
if len(sys.argv) < 1:
sys.stderr.write("Usage: %s tsvtoaddr.py blockchair_*_addresses_latest.tsv\n" % sys.argv[0])
sys.exit(1)
for addr in open(sys.argv[1], 'r').readlines():
print(str.split(addr,'\t')[0])
@etherx-dev
etherx-dev / requires python binanace api
Last active April 9, 2024 23:26
Crypto Currency address Regular Expressions - extracted from the binance api on 31/03/2022
from binance.client import Client
from binance.exceptions import BinanceAPIException, BinanceRequestException
#incomplete but i just need a useful regex
client = Client("apikey", "secret")
coininfo = client.get_all_coins_info()
for coin in coininfo:
for network in (coin['networkList']):
print(coin['name'],network['addressRegex'])
@etherx-dev
etherx-dev / balanced_merkle_path_update.md
Created November 14, 2021 19:03 — forked from gavinandresen/balanced_merkle_path_update.md
Updating old paths (witnesses) for a balanced merkle forest accumulator

Introduction

It would be spiffy to use the balanced merkle forest idea for ethereum tokens or to store unspent transaction outputs.

Tadge Dryja has been working on 'utreexo' (presentation) for storing unspent transaction outputs in log(n) space; this gist is inspired by, and is very similar to, that work.

So my previous gist describes really simple algorithms for adding and removing items from a balanced merkle forest. This gist extends those operations to create

-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v2.0.14 (GNU/Linux)
mQINBGF15iUBEADthQjDB0rFH61YFm2o6co9omS21oaHNvCQdlSIjNiUDqt+wZ+A
GftK72M18C5eME3Vg2AY9epvIr82wl+kHQTGiQVks/2LT6mW2oJaQcsPuIK+Fxiq
DxoeDMa3BVLjEq7572g10tbBVaUV1HkKoqOESXlKOWmYErdzrGjccZT7jj2rHTNn
vOvugBtGkJZOyF0R+lrHdm6R0mcHyTeWC9AWVgd1a9hf7KEf+gucOlWfZOTZwqGI
2VmS4fWOXqAcAUDzpuKsjmBiO/tZcRpCYwxop3W9IR7sYCXHVFvK+I/hirHV9vfQ
8u7b7AnchYwY+W7+CNr/EvREWKKb6ApUXW/wUAQKCjmtbW9/lMt4cJNA/a8SZCpP
22oidmIUuVsZNX7vv/AY4+F4j/jfNE+LCjLAiyU3+lEjpMhceYrNBabMq2gDfNLG
@etherx-dev
etherx-dev / gist:e0763150e0f95096051bb83dd8396449
Created October 24, 2021 22:09 — forked from LaurentMT/gist:e758767ca4038ac40aaf
Bitcoin Transactions & Privacy (part 1)
This document is an attempt to define metrics quantifying the degree of privacy provided by a bitcoin transaction.
Objectives
Definition of metrics measuring the resistance of a transaction to a set of attacks against users privacy.
Attacks considered in the scope of these metrics are:
- Merged Inputs Heuristic: methods identifying the inputs controlled by a same entity
- Coinjoin Sudoku: methods identifying the links existing between the inputs and outputs of a transaction
import binascii
import hashlib
import codecs
import mmap
import sys
import ecdsa
import base58
# Define base58str
def base58str(address_hex):
{
"0xe3ffc9a3": [
"sendEtherToOwner()"
],
"0x5629c6d9": [
"doExecution(address)"
],
"0xe2deaa81": [
"set_reference(uint256,uint256,uint256)"
],