View model.py
import pandas as pd
import numpy as np
import matplotlib
import matplotlib.pyplot as plt
import math
import seaborn as sns
def define_strats(h=10):
return np.linspace(1, h+1, h+1, dtype=int)
View jquery.draggable.js
(function($) {
$.fn.drags = function(opt) {
opt = $.extend({handle:"",cursor:"move"}, opt);
if(opt.handle === "") {
var $el = this;
} else {
var $parent = this;
var $el = this.find(opt.handle);
View zooniverse_realtime_api.md

See https://gist.github.com/arfon/a79777b68dc512c06043 for general API discussion. Also, Arfon has a PDF file outlining our whiteboard design for this API.

Overall vision for the realtime research API:

  • Refactor Ouroboros to allow support for subject retiring, assignment (including client side), and custom interface commands.
  • Find an appropriate project for CrowdSynth or engagement-style experiments. Design interface tweaks, messaging, and other interventions into the project.
  • Subscriber gets access key to experiment on users for a given project. Access has certain limits such as max percentage of users, and time limit (2 months) etc.
  • Subscriber listens to Kafka stream (using DB replication library) for users coming online.
  • Subscriber sends a user request command (with possible time demand) to API when an interesting user comes online. API responds with either 200 (OK) or 403 (denied). If OK, these users are available for sending commands.
  • Control of users via commands is available for the spe
View sampling.py
import cplex
import numpy as np
if __name__ == "__main__":
#The histogram data, 250 histograms with 3 bins
prob = cplex.Cplex()
hists = 250
bins = 3
pairs = bins*(bins-1)/2