python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
flask db init
flask db migrate
flask db upgrade
You also need to compile the checker and place icfpcontest2019.jar
in the root of this repository.
flask run
docker run -d -p 5672:5672 -p 15672:15672 rabbitmq:3-management
celery -A app.celery worker --loglevel=info -E -O fair
watch -n5 curl https://localhost:5000/notify/block_timer
celery flower -A app.celery --address=127.0.0.1 --port=5555 --basic_auth=admin:password --persistent --natural_time=false
curl -F 'private_id=cb70e4f1259f3d43' -F '[email protected]' localhost:5000/submit
Assumes problems/
contains sizes.csv
:
./rankings.py -p persistent/problems/ -g persistent/grades/ --output-folder persistent/rankings/
./block -b <num>
The blockchain server-side logic is "event-driven", but for simplicity reasons
there are no timed events. Rather, the server expects periodic GET
requests at
the /notify/block_timer
endpoint to trigger timed events (e.g. new block
creation). For example:
watch -n5 curl https://localhost:5000/notify/block_timer