I hereby claim:
- I am metachris on github.
- I am metachris (https://keybase.io/metachris) on keybase.
- I have a public key whose fingerprint is F243 D24D BA02 97F7 CC6A CBCC 0B14 7F87 AE91 9662
To claim this, I am signing this object:
| # | |
| # This patch for multiprocessing/reduction.py adds example usage to | |
| # help(multiprocessing.reduction) | |
| # | |
| # Compatible with Python 2.6, 2.7 and 3.1. | |
| # | |
| 6a7,20 | |
| > # Example usage: | |
| > # | |
| > # # Main process |
| import errno | |
| import socket | |
| from threading import Thread | |
| from tornado import ioloop | |
| class IOLoopThread(Thread): | |
| def __init__(self): | |
| Thread.__init__(self) | |
| self.running = True |
I hereby claim:
To claim this, I am signing this object:
| # 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`: | |
| # |
| """ | |
| 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) | |
| """ |
| 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), |
| { | |
| "ProtocolConfiguration": { | |
| "Magic": 56753, | |
| "AddressVersion": 23, | |
| "StandbyValidators": [ | |
| "02b3622bf4017bdfe317c58aed5f4c753f206b7db896046fa7d774bbc4bf7f8dc2", | |
| "02103a7f7dd016558597f7960d27c516a4394fd968b9e65155eb4b013e4040406e", | |
| "03d90c07df63e690ce77912e10ab51acc944b66860237b608c4f8f8309e71ee699", | |
| "02a7bc55fe8684e0119768d104ba30795bdcc86619e864add26156723ed185cd62" | |
| ], |
| # 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 |
I hereby claim:
To claim this, I am signing this object:
| # 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` |