See also:
- https://github.com/CityOfZion/neo-python/blob/development/api-server.py
- https://github.com/CityOfZion/standards/blob/master/nodes.md
Start a server (eg. based on Ubuntu 17.10)
Basic system setup
sudo su
See also:
Start a server (eg. based on Ubuntu 17.10)
Basic system setup
sudo su
# Systemd service config file for pyapi, to run as user 'node', group 'node' and in `/server/neo-python` | |
# https://www.freedesktop.org/software/systemd/man/systemd.exec.html | |
# | |
# Instructions: | |
# 1. Adapt this file if and as needed (directories, user, group) | |
# 2. Save this file in /etc/systemd/system/pyapi.service | |
# 3. Enable the service with `systemctl enable pyapi` | |
# | |
# Now you can use systemctl to check status, start stop and restart the service: | |
# `systemctl status|start|stop|restart pyapi` |
I hereby claim:
To claim this, I am signing this object:
# Create a keypair and export wif and address | |
def gen_keypair(): | |
private_key = bytes(Random.get_random_bytes(32)) | |
key = KeyPair(priv_key=private_key) | |
wif = key.Export() | |
contract = Contract.CreateSignatureContract(key.PublicKey) | |
address = contract.Address | |
return wif, address |
{ | |
"ProtocolConfiguration": { | |
"Magic": 56753, | |
"AddressVersion": 23, | |
"StandbyValidators": [ | |
"02b3622bf4017bdfe317c58aed5f4c753f206b7db896046fa7d774bbc4bf7f8dc2", | |
"02103a7f7dd016558597f7960d27c516a4394fd968b9e65155eb4b013e4040406e", | |
"03d90c07df63e690ce77912e10ab51acc944b66860237b608c4f8f8309e71ee699", | |
"02a7bc55fe8684e0119768d104ba30795bdcc86619e864add26156723ed185cd62" | |
], |
from gpiozero import Button, RGBLED | |
from signal import pause | |
button = Button(22, pull_up=True) | |
led = RGBLED(17, 18, 27) | |
colors = ( | |
(1, 0, 0), | |
(0, 1, 0), | |
(0, 0, 1), |
""" | |
Detect encoding of bytes/str and return unicode object. | |
Compatible with Python 2 and 3 | |
Dependencies: | |
- chardet (https://pypi.python.org/pypi/chardet) | |
Author: Chris Hager <[email protected]> https://www.metachris.com | |
License: Public Domain (The Unlicense) | |
""" |
# Simple Bash Hash Generator | |
# | |
# Author: Chris Hager <[email protected]> | |
# | |
# Put the `hashgen` method in your `.functions` file and source it from your `.bash_profile` | |
# | |
# Usage: hashgen [type] [#chars] | |
# | |
# Optional argument `type`: | |
# |
I hereby claim:
To claim this, I am signing this object:
import errno | |
import socket | |
from threading import Thread | |
from tornado import ioloop | |
class IOLoopThread(Thread): | |
def __init__(self): | |
Thread.__init__(self) | |
self.running = True |