Giter VIP home page Giter VIP logo

lambdaexpt's Introduction

LambdaExpt is a simple framework for running Psychology Experiments on Amazon Web Services Lambdas. These lambdas allow us to both run experiments cheaply and at scale. This framework has been developed by the Complex Human Data Hub at the University of Melbourne. It can be used to run individual experiments, experiments on Mechanical Turk, and Research For Experience (REP) experiments.

Below gives you a brief over of how to use the framework, please read the wiki for more detailed documentation: https://github.com/complex-human-data-hub/LambdaExpt/wiki

INSTALLATION

Linux or Mac

python3 -m venv venv
source venv/bin/activate
pip install pip --upgrade
pip install -r requirements.txt

Windows

python3 -m venv venv
.\venv\Scripts\activate
pip install pip --upgrade
pip install -r requirements.txt

STARTING THE LOCAL SERVER

To develop run flask server locally

Linux

FLASK_APP=experiment.py flask run

Windows

python experiment.py

ACCESSING YOUR EXPERIMENT

If you are developing locally the change to a localhost address, for example: http://localhost:5000/unique-expt

or in production: https://example.com/unique-expt

ADDING PARAMETERS TO PASS TO PYTHON

You can also add parameters to pass to the get_data(opts) function mentioned below: http://localhost:5000/expt?unique-expt?foo=bar&foo2=bar2 or https://example.com/unique-expt?foo=bar&foo2=bar2

BASIC STRUCTURE OF YOUR EXPERIMENT

  • expt_config.py - this is where your python code goes. You will setup your experimental stimuli in this file.

You can optionally provide a flask Blueprint using the 'custom_code' variable. Flask Blueprints allow you to define your own routes.

Functions in expt_config.py:

  get_data(opts)
    foo = opts.get('foo')
    return object_to_pass_to_javascript
  • templates/exp.html This is were you will create your experiments HTML

  • static This is a directory for you static files: images, css, js

lambdaexpt's People

Contributors

benston3 avatar dwd3 avatar

Stargazers

Knowledge, Information & Learning Lab avatar  avatar

Watchers

James Cloos avatar  avatar

Forkers

denisfitz57

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.