def calc_pi_host(samples):
    count = sum(1 for k in frange(samples) if in_circle(random(), random()))
    return 4 * float(count) / samples
dataset/ETHPy150Open arrayfire/arrayfire-python/examples/benchmarks/monte_carlo_pi.py/calc_pi_host/original