Skip to content

Instantly share code, notes, and snippets.

View kailashbadu's full-sized avatar

Kailash Badu kailashbadu

  • CloudFactory
View GitHub Profile
{"unit_id":"4ea1224fcdbb3405d3000084","final_outputs":[{"gender":"Female"},{"rich":"1"},{"kind":"2"},{"attractive":"1"},{"id":"4ea12262cdbb341600000003"}],"meta_data":"137"}
title: Image Moderator
description: This line asks cloud workers to review an image and determine if the image contains inappropriate content
department: Content Moderation
#input_station defines how will the data fed into the production run. We can put it here or call it station 0 and put it under stations
input_station:
#How will you upload input data? Accepted methods are spreadsheet, file uplod, text area (comma seperated values, line seperated units), or on-screen data grid (future)
method: spreadsheet
#This form will be displayed as soon as you click on the 'start production run' for this line. This form is where you upload the input data used to populate the task forms
# we might also consider having standard forms for common methods such as 'spreadsheet' and 'text area'. This saves the user from having to design the form himself
/** final output is just a combination of previous stations **/
{
"ticket_number" : "19830747",
"ticket_date" : "05/19/2014",
"city" : "SAN JUAN",
"plate_number" : "FXR671",
"license" : "6426957",
"registration": "6298368",
"law_code" : "22",
"cost": "25"
@kailashbadu
kailashbadu / output.js
Last active August 29, 2015 14:24
sample_data_transformation
{
"company_name": "Boink",
"company_address": "Maroptic",
"revenue": 24006.6421
}
function transform(unit) {
var url = unit.input.url;
var doc_extensions = line.settings.extensions['doc'];
var image_extensions = line.settings.extensions['image'];
var spreadsheet_extensions = line.settings.extensions['spreadsheet'];
return {"document_extension" : url.split('.').pop()};
}
Proc.new do |tx|
NoOpV1(tx)
branch(tx.aggregates) do |agg|
label(:InputFormatCheckerAndConverter)
InputFormatCheckerAndConverter(agg)
label(:ConvertToImageAndCreateChild)
ImageConverterAndChildCreator(agg)
branch(agg.active_children) do |child|
label(:MarkerStation)
APIContentV1(child, station_index: 0)
#Workflow:: CompStak
credentials:
username:
password:
account:
line:
title: CompStack V1.0
template_id: DaAvql4Ayi
- type : robot
sub_type: API
title: JSON Generator
description: this is a great opportunity
endpoint: http://api.github.com/users/{{username}}/starred
method: GET # Other options are POST, PUT, DELETE, and HEAD.
{
"input": {},
"output": {},
"meta":{
"status" : "completed" //String. Public. possible values are completed, flagged, aborted.
"work_duration": 234.12 //Number. Private. Total amount of time spent by the worker in seconds. Robot Time is not included.
"skips": 2 //Number. Private. Total number of skips registered in the tasks from this unit.
"created_time": "2015-08-02T21:50:49+00:00" //String. Public. The time the unit was created.
"processed_time": "2015-08-02T21:50:49+00:00" //String. Public. The time the unit was processed.
"turnaround_time": 22.12 //Number. Public. Time it took for the unit to be delivered.
@kailashbadu
kailashbadu / router.js
Created August 11, 2015 10:57
Components
function router(unit){
//this function should return the id of the station to which the unit is routed
return 12341415
}