Skip to content

Instantly share code, notes, and snippets.

@joaojeronimo
Created May 16, 2014 15:45
Show Gist options
  • Save joaojeronimo/cd28ad37ca75005aad4b to your computer and use it in GitHub Desktop.
Save joaojeronimo/cd28ad37ca75005aad4b to your computer and use it in GitHub Desktop.
Can it get any easier ?
var credentials = require('./credentials');
var CrowdProcess = require('..')(credentials);
function Run (d) {
return d*2;
}
var data = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
CrowdProcess(data, Run, function (results) {
console.log('results:', results);
});
>>> from crowdprocess import CrowdProcess
>>> crp = CrowdProcess('username', 'password')
>>> x2 = crp.job('function Run (d) { return d*2; }')
>>> results = x2(range(5))
>>> list(results)
[0, 2, 4, 6, 8, 10]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment