<|file_name|>calculate_pi_old.py<|end_file_name|><｜fim▁begin｜>import tensorflow as tf
import matplotlib.pyplot as plt
import math

x_node = tf.random_uniform([1], minval=-1, maxval=1, dtype=tf.float32,
						   name='x_node')
y_node = tf.random_uniform([1], minval=-1, maxval=1, dtype=tf.float32,
						   name='y_node')

times = 5000
hits = 0

pis = []
<｜fim▁hole｜>		x = session.run(x_node)
		y = session.run(y_node)
		if x*x + y*y < 1:
			hits += 1
			pass
		pi = 4 * float(hits) / i
		print(pi)
		pis.append(pi)
		pass
	pass

plt.plot(pis)
plt.plot([0, times], [math.pi, math.pi])
plt.show()<｜fim▁end｜>
with tf.Session() as session:
	
	for i in range(1, times):