Created
May 16, 2014 15:45
-
-
Save joaojeronimo/cd28ad37ca75005aad4b to your computer and use it in GitHub Desktop.
Can it get any easier ?
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
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); | |
}); |
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
>>> 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