Skip to content

Instantly share code, notes, and snippets.

View bookings.txt
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
View lambda_multiprocess.py
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 Dec 18, 2018
Python Multiprocessing
View multiprocess.py
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)