Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
bin
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

brains

it thinks!

using it

install the cli

$ pip install brains
$ mkdir experiment
$ cd experiment

make an example program

$ echo "print 'hello world'" >> run.py

configure brains

$ brains init
Give me your brains, I mean name: Eric Carmichael
Languages (python, ruby, etc.): python
How do you run your script? eg, `python run.py $INPUT` ($INPUT is replaced with dataset path)
: python run.py $INPUT

Automatically including the follow files in brain contents:
	run.py

done! brains.yaml created

$ cat brains.yaml
contents:
- run.py
languages: 'python'
name: 'Eric Carmichael'
run: 'python run.py $INPUT'

run the program

$ brains push
zipping...done
sending to server...done

Output:                                                                       

=============================== no dataset used ================================

hello world

run with datasets

your program can be ran multiple times at once vs many datasets

$ brains push --dataset test,test2
zipping...done
sending to server...done

Output:                                                                       

=================================== test =======================================

hello world

=================================== test2 ======================================

hello world

setup server

local

brew install memcached

pip install -r requirements.txt

heroku

Deploy

then... on the app dashboard enable web for the site/queuing and worker to processes tasks.

You can then go to your heroku app -> settings -> "reveal config vars" and point your worker to a different queue.

running

django server

cd src && python app.py

celery task runner

cd src && celery -A workers worker -l INFO

tests

cd src && python app.py tests

todo

  • test on heroku
  • setup one click deploy
  • add cli get command
  • save stdout/stderr from submissions... streamed and lost right now...
  • time submissions
  • use codejail? https://github.com/edx/codejail
  • support multiple datasets
    • send cool stdout =============== ===============

About

run some code, share some code, grow your brains

Resources

License

Releases

No releases published

Packages

No packages published