Skip to content

Instantly share code, notes, and snippets.

View PublicMakings's full-sized avatar

A O PublicMakings

  • New England, it's lovely & dreary...
View GitHub Profile
@PublicMakings
PublicMakings / pi_mp.py
Created January 18, 2018 19:12 — forked from amitsaha/pi_mp.py
Parallel Pi Calculation using Python's multiprocessing module
''' listing 6: pi_mp.py
Multiprocessing based code to estimate the value of PI
using monte carlo sampling
Ref: http://math.fullerton.edu/mathews/n2003/montecarlopimod.html
Uses workers:
http://docs.python.org/library/multiprocessing.html#module-multiprocessing.pool
'''
import random