script de redémarrage python
sys.stdout.flush()
os.execl(sys.executable, 'python', __file__, *sys.argv[1:])
Long Lobster
sys.stdout.flush()
os.execl(sys.executable, 'python', __file__, *sys.argv[1:])
import os
import sys
os.execl(sys.executable, sys.executable, *sys.argv)
import os
while 1:
os.system("python main.py")
print "Restarting..."
exit()
os.execv(sys.executable, ['python'] + sys.argv)
theta = 2 * np.pi * np.random.random(1000)
r = 6 * np.random.random(1000)
x = np.ravel(r * np.sin(theta))
y = np.ravel(r * np.cos(theta))
z = f(x, y)
ax = plt.axes(projection=’3d’)
ax.plot_trisurf(x, y, z,cmap=’viridis’, edgecolor=’none’);