Created
March 2, 2012 09:22
-
-
Save bikashp/1957131 to your computer and use it in GitHub Desktop.
Variable price YAML
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ | |
# Assembly Line: video-transcription | |
# ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ | |
# See docs at http://cloudfactory.com/developers/ | |
# See example lines at http://cloudfactory.com/developers/lines/ | |
# Run `cf login` OR manually specify your API key below (See http://cloudfactory.com/developers/resources/account.html) | |
# api_key: fill_in_your_api_key #(optional) | |
title: timecoding_variable_pricing | |
public: false # Make your line a public line if true (http://cloudfactory.com/developers/resources/line.html#public) | |
#api_key: 5f27b0c87532ff8389fd4955b88b6336c579b529 #0cff92505889e9530baebda027459e1ce073e9dd | |
description: A sample line generated via CLI to use both standard and custom form for video transcription. | |
department: Data Processing # Department to build line in (See http://cloudfactory.com/developers/resources/department.html) | |
# Line Input Formats (see http://cloudfactory.com/developers/resources/input_format.html) | |
input_formats: | |
- name: translation | |
required: true | |
valid_type: | |
- name: chapter | |
required: true | |
valid_type: | |
- name: factor | |
required: true | |
stations: | |
- station: | |
station_index: 1 | |
station_type: tournament | |
worker: | |
worker_type: human | |
num_workers: 2 | |
reward: "2 *{{ factor }}" | |
jury_worker: | |
number: 1 | |
reward: "3 *{{ factor }}" | |
max_judges: 2 | |
auto_judge: | |
enabled: true | |
best_output_for: | |
time_codes: "<% threshold = 0.5; | |
times = outputs.map{|v| v.split(',').map(&:strip).map(&:to_f) }.transpose; | |
if outputs.length == 2; | |
if times.any?{|t| (t[0] - t[1]).abs >= threshold}; | |
return false; | |
else; | |
return times.map{|x| x.inject(0){|x,y| x+=y} / x.length }.join(','); | |
end; | |
else; | |
return times.map{|t| t = t.sort; (t[0]-t[1]).abs > (t[1]-t[2]).abs ? (t[1]+t[2])/2 : (t[0]+t[1])/2}.join(','); | |
end; %>" | |
reject_output_if: | |
time_codes: "<% threshold=0.5; | |
output = output.split(',').map(&:strip).map(&:to_f); | |
best_output = best_output.split(',').map(&:strip).map(&:to_f); | |
flag=false; | |
output.each_with_index do |value, index| | |
flag = true if (value - best_output[index]).abs > threshold; | |
end; | |
return flag; | |
%>" | |
custom_task_form: | |
form_title: "TimeCode the Provided Bible Chapter" | |
instruction: "Play this game by listening to some audio while reading along at the same time. You need to click the heart icon immediately when the audio plays the word before it. Help us timecode the audio, it is simple and fun!" | |
html: station1.html |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment