Skip to content

Instantly share code, notes, and snippets.

Ilya Oskin oskin1

Block or report user

Report or block oskin1

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@oskin1
oskin1 / boot_api_service_mock.py
Created Jun 1, 2019
Bootstrap service API mock
View boot_api_service_mock.py
from flask_api import FlaskAPI
app = FlaskAPI(__name__)
@app.route("/bootSettings")
def get_boot_settings():
return {'noPremineProof': ['proof1', 'proof2'],
'genesisStateDigestHex': 'cb63aa99a3060f341781d8662b58bf18b9ad258db4fe88d09f8f71cb668cad4502'}
View simple_neural_network.py
import numpy as np
# sigmoid function
def nonlin(x):
return 1 / (1 + np.exp(-x))
# sigmoid derivative
def noniln_deriv(x):
View ergo_script_helper.py
import argparse
import requests
import json
def load_source(path):
with open(path, "r") as file:
return file.read()
View seed_gen.py
import secrets
if __name__ == '__main__':
secret = secrets.token_bytes(32)
print('Seed: \n{}'.format(secret.hex()))
View ergo_api_token_gen.py
import hashlib
import secrets
if __name__ == '__main__':
secret_hex = secrets.token_bytes(32).hex()
h_secret = hashlib.blake2b(secret_hex.encode('utf8'), digest_size=32)
print('Secret: \n{}\nHashed secret: \n{}'.format(secret_hex, h_secret.hexdigest()))
View miners_info_collector.py
import argparse
import yaml
import requests
import psycopg2
INFO_ROUTE = "/info"
ADDR_ROUTE = "/wallet/addresses"
You can’t perform that action at this time.