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
find ./ -name "*.py" -exec gsed -r -i '1,1s/^/"""\n:copyright: (c) 2014 Building Energy Inc\n:license: Apache v2, see LICENSE for more details.\n"""\n/' {} \; |
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
VENV_DIR=`md5sum requirements/* | md5sum 2>&1 | awk '{print $1}'` | |
if [ -e $VENV_DIR ]; then | |
. /tmp/$VENV_DIR/bin/activate | |
else | |
virtualenv --no-site-packages /tmp/$VENV_DIR | |
. /tmp/$VENV_DIR/bin/activate | |
pip install --download-cache /var/lib/jenkins/.pip_download_cache -r requirements/ci.txt | |
fi |
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
# Mixpanel, Inc. | |
# http://mixpanel.com | |
max_ring_size = 2**127 | |
def token_percent(token, max): | |
return round(token / float(max_ring_size), 4) | |
def calc(ring_load): | |
highest = {'total': 0, 'percent0': 0, 'percent1': 0} |