Skip to content

Instantly share code, notes, and snippets.

View manishdas's full-sized avatar

Manish Das manishdas

View GitHub Profile
line = CF::Line.create("bizzcard_army","Digitization") do |l|
# Creating a new InputFormat
CF::InputFormat.new({:line => l, :label => "image_url",:field_type => "text_data", :value => "http://s3.amazon.com/bizcardarmy/medium/1.jpg", :required => true, :validation_format => "url"})
# Creating a new Station
CF::Station.create({:line => l, :type => "work"}) do |s|
# Creating a new HumanWorker
CF::HumanWorker.new({:station => s, :number => 1, :reward => 20})
# Creating A new TaskForm
CF::TaskForm.create({:station => s, :title => "Enter text from a business card image", :instruction => "Describe"}) do |i|
# Creating a new FormField
# ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁ ☁
# 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: video-transcription
public: false # Make your line a public line if true (http://cloudfactory.com/developers/resources/line.html#public)
description: A sample line generated via CLI to use both standard and custom form for video transcription.
○ cf login
Enter your email: sprout@sprout-technology.com
Enter the password: ************
Now you're logged in.
To get started, run cf help
  ○ cf production list


  Showing page 1 of 2 (Total runs: 28)

  +--------------------------------------+---------------------------------------------------------------------------------+
  | Run Title                            | URL                                                                             |
  +--------------------------------------+---------------------------------------------------------------------------------+
  | adding_units_error_run_1             | http://manish.cloudfactory.com/runs/manish/adding_units_error_run_1             |

| blah-11aug26-163752 | http://manish.cloudfactory.com/runs/manish/blah-11aug26-163752 |

○ cf line list


Showing page 1 of 2 Total lines: 37
+-----------------------+-------------------------------------------------------------------+
| Line Title            | URL                                                               |
+-----------------------+-------------------------------------------------------------------+
| adding_units_error_1  | http://manish.cloudfactory.com/lines/manish/adding_units_error_1  |
| manish                | http://manish.cloudfactory.com/lines/manish/manish                |

| manish0 | http://manish.cloudfactory.com/lines/manish/manish0 |

  ○ cf production start 
  Creating a production run with title manish-11aug28-204212
  Error: run is created but could not be started because of lack of funds please refund your account to continue the run see your email for more information

Resume Production Run

  ○ cf production resume --run-title=manish-11aug28-204212                                                                                                                                        
  Run with title "manish-11aug28-204212" is resumed!

○ cf line delete !!! Warning !!! The following are the existing production runs based on this line.

  Showing page 1 of 1 (Total runs: 4)

  +-------------------------+--------------------------------------------------------------------+
  | Run Title               | URL                                                                |
  +-------------------------+--------------------------------------------------------------------+

| manish-11aug26-163957 | http://manish.cloudfactory.com/runs/manish/manish-11aug26-163957 |

○ cf production add_units --run-title=run_title --input-data=file_path/file.csv
"sucessfully added 2 units, failed :0"!
 ○ cf line details 


  The following is the structure of the line: cloudfactory_line

  {
              "title" => "cloudfactory_line",
        "description" => "A shiny new assembly line ready for you to customize. Right now it is finding people dates (uncomment and try for fun) but you should just replace everything below accordingly for your line.",
         "department" => "Web Research",

"code" => 200,

@manishdas
manishdas / cf production start
Created August 30, 2011 10:27
cf production start
○ cf production start
Creating a production run with title cloudfactory-line-11aug23-175935
Run created successfully.
View your production at:
http://manish.manish.lvh.me:3000/runs/manish/cloudfactory-line-11aug23-175935/workerpool_preview