I hereby claim:
- I am daleobrien on github.
- I am whale (https://keybase.io/whale) on keybase.
- I have a public key whose fingerprint is D2D8 D041 9FDF 08D3 5E6B F27A 776C 8A43 BA91 ACBB
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
config: | |
FunctionName: lambda-python | |
Handler: index.handler | |
Runtime: nodejs | |
Description: Python hello world from Lambda | |
install: make |
def ga_yearWeek_to_date(yearweek): | |
''' | |
Convert from Google Analytic ga:yearweek to a date at the start of | |
the time period. | |
e.g.: | |
>> ga_yearWeek_to_date('201353') | |
>> 2013-12-29 | |
''' | |
year, week = int(yearweek[:4]), int(yearweek[4:]) |
if isinstance(o, decimal.Decimal): | |
if o % 1 > 0: | |
return float(o) | |
else: | |
return int(o) |
user nginx; | |
worker_processes auto; | |
error_log /var/log/nginx/error.log; | |
pid /var/run/nginx.pid; | |
events { | |
worker_connections 1024; | |
} | |
# Start w?? first (general workers) and b?? (beat workers) last | |
# CELERYD_NODES="w01 w02 w03 w04 w05 w06 w07 w08 w09 w10 w11 w12 w13 w14 w15 w16 w17 w18 w19 w20 w21 w22 w23 w24 w25 w26 w27 w28 w29 w30 w31 w31 w32 w33 w34 w35 w36 w37 w39 w40 w41 w42 w43 w44 w45 w46 w47 w48 w49 w50 b01 b02 b03 b04 b05 b06 b07 b08 b09 b10 b11 b12 b13 b14 b15 b16 b17 b18 b19 b20" | |
CELERYD_NODES="w01 w02 b01 b02 b03 b04 b05 b06 b07 b08 b09 b10 b11 b12 b13 b14 b15 b16" | |
# Where to chdir at start. (CATMAID Django project dir.) | |
CELERYD_CHDIR="/home/www/.virtualenvs/insight_env/core" | |
# Python interpreter from environment. (in CATMAID Django dir) | |
ENV_PYTHON="/home/www/.virtualenvs/insight_env/bin/python" | |
# Where to chdir at start. | |
CELERYBEAT_CHDIR="$CELERYD_CHDIR" | |
CELERYBEAT="$ENV_PYTHON $CELERYD_CHDIR/manage.py celerybeat" | |
# | |
# # Extra arguments to celerybeat | |
CELERYBEAT_OPTS="--schedule=/home/www/.virtualenvs/insight_env/core/run/celerybeat-schedule" | |
# | |
CELERYBEAT_LOG_FILE="/mnt/log/celery/celerybeat.log" | |
CELERYBEAT_PID_FILE="/var/run/celery/celerybeat.pid" | |
#!/bin/sh -e | |
# ============================================ | |
# celeryd - Starts the Celery worker daemon. | |
# ============================================ | |
# | |
# :Usage: /etc/init.d/celeryd {start|stop|force-reload|restart|try-restart|status} | |
# :Configuration file: /etc/default/celeryd | |
# | |
# See http://docs.celeryq.org/en/latest/cookbook/daemonizing.html#init-script-celeryd | |
#!/bin/bash | |
# ========================================================= | |
# celerybeat - Starts the Celery periodic task scheduler. | |
# ========================================================= | |
# | |
# :Usage: /etc/init.d/celerybeat {start|stop|force-reload|restart|try-restart|status} | |
# :Configuration file: /etc/default/celerybeat or /etc/default/celeryd | |
# | |
# See http://docs.celeryproject.org/en/latest/tutorials/daemonizing.html#generic-init-scripts | |
cd ~/Downloads | |
wget https://www.openssl.org/source/openssl-1.0.2h.tar.gz | |
tar -xvf openssl-1.0.2h.tar.gz | |
cd openssl-1.0.2h | |
./Configure darwin64-x86_64-cc | |
make depend -j4 | |
sudo make install | |
cd ~/Downloads |