

Easy parallel loops in Python, R, Matlab and Octave - earino
http://blog.dominoup.com/simple-parallelization/

======
earino
Includes sample code for Python using joblib, in R using the Parallel
language, and in Matlab/Octave using the parfor construct!

------
techdragon
Parallel looping is one of those things I wish was easier to use. Countless
times I've stared at my python code weighing the cost of using the available
primitives to optimise the loop. I just wish it was as simple as

    
    
      parallel_for x in range(10):
          myFunc(x)
    

But we can't have everything.

~~~
DominoDataLab
The joblib packages gets you pretty close:

    
    
      num_cores = multiprocessing.cpu_count()
      Parallel(n_jobs=num_cores)(
        delayed(myFunc)(x) for x in range(10))

