This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Tested in Ubuntu 14, requires pv | |
copy () | |
{ | |
echo Copying $1 to $2 | |
cat $1 | pv -a -r -b -p -e -s $(stat --printf="%s" $1) > $2 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Finally figured out how to interact with contracts without running a Geth node or any kind of daemon on my machine. | |
// Running a Geth node was way harder than I thought. It worked sometimes, randomly broke other times... I lost interest. | |
// Prerequisites: | |
// - web3-js 1.0.0, NOT the older versions that have different APIs. | |
// - An Ethereum wallet for which you have the private key. | |
// - A public web3-rpc-compatible node. Infura is an easy one: https://infura.io/signup | |
// - You don't trust the node with your wallet private key | |
// but do trust that it won't lie to you (maybe you shouldn't). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Created by AlecZ | |
# Tested with Python 3.4 | |
# | |
# These example classes make it easy to multiprocess* in Python, | |
# useful if you want to take advantage of multiple cores on a single machine | |
# or run lots of low-CPU-usage but blocking tasks like web scrapers | |
# without configuring a more permanent solution like Celery workers. | |
# | |
# * Actually runs multiple Python processes to take advantage of more cores, | |
# unlike Python's `multithreading` module helpers that actually don't run things in parallel. |