Skip to content

Instantly share code, notes, and snippets.

View antsankov's full-sized avatar

Alex Tsankov antsankov

View GitHub Profile
@antsankov
antsankov / etc_kecck256_test.txt
Created February 24, 2021 03:12
ECIP-1049-Keccak256-Mining-Test-Vectors
Nonce: 0x0000000000000038
Mining Hash Hex: 0xec1e0af050c8c5b9e2b59c65da7d9dd62eaf5a17f9ff6a91da60858a0233e444
Keccak Header Input: 0xec1e0af050c8c5b9e2b59c65da7d9dd62eaf5a17f9ff6a91da60858a0233e4440000000000000038
Keccak Result: 0x0116ad248e0dc3f7f843f73a62803c5f6b7c0427700b70c8b1aab39db404089f
Hash (int):492378471644473844779041230572681759021515627522456897855697138922293561503
Difficulty (int):1157920892373161954235709850086879078532699846656405640394575840079131296399
Difference (hash - diff): -665542420728688109456668619514197319511184219133948742538878701156837734896
// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.7.0;
/***
*
* Structue of Treasury
* - Every block 20% of all block reward goes to this contract with deposit(false), if miner has no faith in the system they can call deposit(true) and funds are sent to burn address.
* - There are 3 triads addresses (ETCLabs, ETCCoop, IOHK) - any policy requires consensus of 2 of 3.
* - A proposal is made with a claiment address, amount of ether to be claimed, blockNumber that activates the claim.
* - If a poroposal gets support of 2 of 3 triads, proposal funds can be collected after the blockNumber, with redeem() which pays out to the claiment.
@antsankov
antsankov / multigeth.sh
Created April 22, 2020 16:35
How to run a Multigeth Phoenix Node with Sane Flags
./nodes/multi-geth-phoenix --classic --cache 4096 --datadir "/mnt/volume_ams3_04/.multigeth-classic/" --rpc --rpcaddr "127.0.0.1" --rpccorsdomain "*" --rpcport "8545" --rpcapi "db, eth, net, web3, personal" --ws --wsport 8546 --wsaddr "127.0.0.1" --wsorigins "*" --wsapi "web3, eth" --maxpeers=100

Keybase proof

I hereby claim:

  • I am antsankov on github.
  • I am antsankov (https://keybase.io/antsankov) on keybase.
  • I have a public key ASAMb9TNsYW-b7E8pSWz_5UKSyfIjw6xqL5K4JtbrvVpfAo

To claim this, I am signing this object:

#!flask/bin/python
from flask import Flask,jsonify,request
app = Flask(__name__)
recipes = [
{
'id' : 1,
'title' : u'lasagna',
import sys
import time
import logging
from watchdog.observers import Observer
from watchdog.events import *
#http://stackoverflow.com/questions/18599339/python-watchdog-monitoring-file-for-changes
class MyHandler(LoggingEventHandler):
#this creates the list of paths
def __init__(self):
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDe/P/RUSyyS9zlX4XU4fJkR5srQE3V+REJ81RSCp45154EHvItlBXcAtwPY1DEIljADiAaO/j51vP0Y2b9XQ++ccmCYkx3IhdQ/aRCGLTNeI2uw02fT38ekDgBBxpBvqgwl6tKd1uG2La+hFnFwScBJwbICL6ofuSwl50i3IW9XIx8eGIkImapPIfPrSYjNE5DJh3enQHqWsrPHQJroFCJl74/LFJiIEY7xdDmUD2WB2gRrw0erIC3+eQ+H4DRzbJ9oIb/3gg4cWlngJQBABvb4S5pXaJmjmy/bxqJJJsLklwjB/CG0GAMIMqItyxfbZnBBpT4kT3sXKwvF2CK38tz antsankov@Alexanders-MacBook-Air.local
@antsankov
antsankov / watchdogTest.py
Last active February 1, 2016 16:22
Watchdog Test
import sys
import time
import logging
from watchdog.observers import Observer
from watchdog.events import *
#http://stackoverflow.com/questions/18599339/python-watchdog-monitoring-file-for-changes
class MyHandler(LoggingEventHandler):
#this creates the list of paths
def __init__(self):
@antsankov
antsankov / gist:a8cd5410f37e267f48b8
Created October 16, 2014 03:37
Final project idea for Big Data

Peiman,

I’m in the Big Data class and I noticed an awesome library: Melopy which transforms python code and simple method calls into musical notes on a .wav file to be played through a media player.

I was wondering if you would like to collaborate on this idea for a final project:

  1. Take the input from the arudino
  2. Parse it with python.
  3. Use it as a random seed to generate a note OR
  4. make a mapping of arrays of decibel measurements gathered each second to sound notes and arrange a song from the 100s of measurements every couple of seconds.
sourcetype=* host="hack" | chart payplan by AppointmentTerm