Skip to content

Instantly share code, notes, and snippets.

Monday 10th June 2019 18:00
Tuesday 11th June 2019 18:00
Wednesday 12th June 2019 18:00
Thursday 13th June 2019 21:20
Friday 14th June 2019 18:00
Monday 3rd June 2019 21:20
@njsaunders
njsaunders / lambda_multiprocess.py
Created February 11, 2019 11:57
lambda_multiprocessing
from multiprocessing import Process, Pipe
def add_two(x, conn):
conn.send([x+2])
conn.close()
processes = []
parent_connections = []
xs = [1,2,3,4,5]
@njsaunders
njsaunders / multiprocess.py
Created December 18, 2018 16:14
Python Multiprocessing
from functools import partial
import pathos.multiprocessing as mp
input_list = [1,2,3,4,5]
def add_2(number):
return number + 2
pool = mp.ProcessingPool(50)
process_row = partial(add_2)