This file contains hidden or 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
# allow compare datetime.datetime and datetime.date types | |
def by_date_and_datetime(x): | |
if isinstance(x.date, datetime.datetime): | |
return x.date.date() | |
else: | |
return x.date | |
return sorted(profit_transactions + done_transactions, | |
key=by_date_and_datetime, reverse=True) |
This file contains hidden or 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
8701.9208984375, | |
8001.811217727662, | |
7579.575804595947, | |
7852.544248886108, | |
7412.933835754395, | |
7619.973080825806, | |
7115.814327850341, | |
6290.871151046753, | |
6080.863765258789, | |
5832.461726150512, |
This file contains hidden or 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
[Wed Aug 19 10:44:15 2015] [error] 2015-08-19 10:44:15,444 INFO [ckan.lib.base] /pages render time 0.074 seconds | |
[Wed Aug 19 10:44:15 2015] [error] 2015-08-19 10:44:15,519 INFO [ckan.lib.base] /api/i18n/en render time 0.001 seconds | |
[Wed Aug 19 10:44:17 2015] [error] [client 127.0.0.1] Error - <type 'exceptions.UnboundLocalError'>: local variable 'lxml' referenced before assignment | |
[Wed Aug 19 10:44:17 2015] [error] [client 127.0.0.1] URL: http://localhost/pages/ololo | |
[Wed Aug 19 10:44:17 2015] [error] [client 127.0.0.1] File '/usr/lib/ckan/default/lib/python2.7/site-packages/weberror/errormiddleware.py', line 162 in __call__ | |
[Wed Aug 19 10:44:17 2015] [error] [client 127.0.0.1] app_iter = self.application(environ, sr_checker) | |
[Wed Aug 19 10:44:17 2015] [error] [client 127.0.0.1] File '/usr/lib/ckan/default/lib/python2.7/site-packages/webob/dec.py', line 147 in __call__ | |
[Wed Aug 19 10:44:17 2015] [error] [client 127.0.0.1] resp = self.call_func(req, *args, **self.kwargs) | |
[Wed Aug 19 10:44:17 2015] [err |
This file contains hidden or 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
## Common Packages | |
# --------------- | |
sudo apt-get -y update | |
sudo apt-get -y upgrade | |
sudo apt-get -y install software-properties-common libssl-dev openssl wget | |
## Install latest Python 3 | |
# ----------------------- | |
PY_VERSION=3.4.3 | |
PY_URL="https://www.python.org/ftp/python/$PY_VERSION/Python-$PY_VERSION.tgz" |
This file contains hidden or 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
eval $(docker-machine env default) |
This file contains hidden or 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
BTCmsg Protocol v1 (2011-09-18) | |
=============================== | |
Each message is represented by multiple payment which is calculated by | |
the following algorithm: | |
1. Two first chars for message type ('01' for md5, '02' for ascii). | |
2. Then the message in hex (python binascii.hexlify). | |
3. Split the long string to groups of 4 hex digits. | |
4. Each group of 4 hex (e.g. 2 ascii letters from the message) is | |
represented by a payment in satoshi (maximum 0xffff=65535). |
This file contains hidden or 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
// or any othe port | |
sudo netstat -ltnp | grep ':30303' | |
// will return | |
tcp6 0 0 :::30303 :::* LISTEN 844/S20geth | |
sudo kill -9 844 |
This file contains hidden or 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
#!/bin/bash | |
# Author: Alexander Rodin <[email protected]> | |
# License: MIT | |
BUILD_DIR=build | |
while getopts "hp:s:r:b:o:c:n" opt; do | |
case $opt in | |
h) | |
echo "Usage: $0 [options]" |
This file contains hidden or 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
contract random { | |
/* Generates a random number from 0 to 100 based on the last block hash */ | |
function randomGen(uint seed) constant returns (uint randomNumber) { | |
return(uint(sha3(block.blockhash(block.number-1), seed ))%100); | |
} | |
/* generates a number from 0 to 2^n based on the last n blocks */ | |
function multiBlockRandomGen(uint seed, uint size) constant returns (uint randomNumber) { | |
uint n = 0; | |
for (uint i = 0; i < size; i++){ |
This file contains hidden or 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
docker-machine rm default | |
docker-machine create --driver virtualbox default |
OlderNewer