This file contains hidden or 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
require(['jquery-noconflict'], function(jQuery) { | |
//Ensure MooTools is where it must be | |
Window.implement('$', function(el, nc){ | |
return document.id(el, nc, this.document); | |
}); | |
var $ = window.jQuery; | |
$(document).ready(function(){ | |
$("input.submit").click(function(e){ | |
var bad_answers = false; | |
$(".cml.jsawesome").each(function() { |
This file contains hidden or 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
<cml:radios name="category" label="Choose the best category for this product:" validates="required"> | |
<cml:radio label="{{pt_1}}" value="{{pt_1}}" /> | |
{% if pt_2 != '' and pt_2 != 'No data available' and pt_2 != empty %} | |
<cml:radio label="{{pt_2}}" value="{{pt_2}}" /> | |
{% endif %} | |
{% if pt_3 != '' and pt_3 != 'No data available' and pt_3 != empty %} | |
<cml:radio label="{{pt_3}}" value="{{pt_3}}" /> | |
{% endif %} | |
{% if pt_4 != '' and pt_4 != 'No data available' and pt_4 != empty %} | |
<cml:radio label="{{pt_4}}" value="{{pt_4}}" /> |
This file contains hidden or 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
a.clean { | |
color:#00a6e0; | |
text-decoration:underline; | |
font-size: 20pt; | |
line-height: 18pt; | |
font-weight: 900; | |
} | |
a.clean:link { color:#00a6e0; | |
text-decoration:underline; | |
font-size: 20pt; |
This file contains hidden or 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
<cml:group only-if="able_to_classify:[Yes]"> | |
<cml:select label="Please choose the best classification for the company from the following choices:" id="drop" name="drop"> | |
<cml:option label="Please select one of the following choices..." /> | |
<cml:option label="*****MOST COMMON CLASSIFICATIONS*****" /> | |
<cml:option label="Investment Advisor" /> | |
<cml:option label="Corporation" /> | |
<cml:option label="Hedge Fund Manager" /> | |
<cml:option label="Bank" /> | |
<cml:option label="Government" /> |
This file contains hidden or 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
I'm using curl on PHP the request parameters are these: | |
$defaults = array( | |
CURLOPT_CUSTOMREQUEST => "PUT", | |
CURLOPT_RETURNTRANSFER => true, | |
CURLOPT_POST => count($data), | |
CURLOPT_POSTFIELDS=> json_encode($data, JSON_FORCE_OBJECT), | |
CURLOPT_HEADER => 0, | |
CURLOPT_URL => $this->url.$uri.'.json?key='.$this->key, | |
CURLOPT_FRESH_CONNECT => 1, |
This file contains hidden or 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
when I use the /jobs/{job_id}/units/{unit_id} endpoint to create or update a unit to add gold, I am having trouble specifying more than one answer 2:09 | |
the whole array ends up quoted | |
or should I just repeat unit[data][field_golden]=x&unit[data][field_golden]=y to give both answers? | |
I have been doing unit[data][field_golden]=[x,y] 2:10 | |
Wil Stevens sure - I know we separate them by a newline character 2:11 | |
which is often /n | |
Christopher Hundt you mean unit[data][field_golden]=[x\ny] ? | |
or rather unit[data][field_golden]=x\ny? | |
Wil Stevens the latter 2:13 | |
Christopher Hundt that did not seem to work 2:15 |
This file contains hidden or 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
curl https://api.crowdflower.com/v1/jobs/425038/units/448518368.json?key=KEY | |
{"agreement":1.0,"missed_count":0,"results":{"item_price":{"agg":null,"confidence":0},"price":{"agg":"","confidence":1.0},"discount":{"agg":"","confidence":1.0},"include_yn":{"agg":"","confidence":1.0},"judgments":[{"reviewed":null,"worker_id":26078288,"unit_state":"finalized","golden":false,"started_at":"2014-04-17T20:28:13+00:00","created_at":"2014-04-17T20:29:32+00:00","data":{"item_price":"$7.49","item_quantity":"1"},"job_id":425038,"tainted":false,"rejected":null,"judgment":1,"unit_data":{"unit_type":"item_unit","filename":"http://karasic.com/crowdflower/Costco-001.jpg","upc":"805573"},"worker_trust":1.0,"unit_id":448518368,"region":"MA","external_type":"cf_internal","country":"USA","webhook_sent_at":null,"id":1245319265,"trust":1.0,"city":"Lexington","missed":null}],"discount_price":{"agg":"","confidence":1.0},"quantity":{"agg":"","confidence":1.0},"item_quantity":{"agg":null,"confidence":0},"not_readable":{"agg":"","confidence |
This file contains hidden or 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
There's a script you can run that divides an audio clip into small segments. | |
The following code splits an mpeg into optionally overlapping snippets of audio for transcription or whatever... | |
#NOTE! you must install ffmpeg in your system first (http://ffmpeg.org/download.html): $brew install FFmpeg | |
overlap = XX #overlap between snippets in seconds | |
total_length = XX #total length of file in seconds | |
step_size = XX #length of snippets in seconds | |
file_path = "" #path to audio file |
This file contains hidden or 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
Ingredients: 3 lbs of boneless pork spare ribs, 1 package bacon, 1 white onion, 1/2 bottle of BBQ sauce of your choice | |
Dry rub ingredients: 4 tbsp smoked paprika, 2 tbsp sea salt, 2 tbsp chili powder, 2 tbsp ground cumin, 1 tbsp ground black pepper, 1 tbsp dried oregano, 1 tbsp ground white pepper, 2 tsp cayenne pepper, | |
I used a little over 3.3 lbs of pork shoulder to make this, you could also use spare ribs or something similar. | |
Cut the meat into medium-sized meatlets | |
Take the dry rub ingredients and mix them together in a bowl and use this to liberally coat each of the pieces of meat. Once that is done, wrapp them tightly in plastic wrap and leave them in the fridge overnight. |
This file contains hidden or 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
{% if column_1 != 'No data available' %} | |
{{master_column}} | |
{% elsif column_2 != 'No data available' %} | |
{{master_column}} {{column_1}} | |
{% elsif column_3 != 'No data available' %} | |
{{master_column}} {{column_1}} {{column_2}} | |
{% elsif column_4 != 'No data available' %} | |
{{master_column}} {{column_1}} {{column_2}} {{column_3}} | |
{% elsif column_5 != 'No data available' %} | |
{{master_column}} {{column_1}} {{column_2}} {{column_3}} {{column_4}} |