Initial release

This commit is contained in:
Francois JUMELLE
2021-05-03 22:32:40 +02:00
commit 20526d93c8
928 changed files with 452368 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
import time
import requests
from PIL import Image
GET = "https://pydefis.callicode.fr/defis/MachineLearning/intern/C0MfHAoFXBILF1IiEgUCC0BVX14VE1FfTU5RVV9DAgQAUVdMaWtqGkJRXUBaWR4QHABGT0BEWDEeEABqXEEoKEBVBx4ABUVNU0ZdQgAFbBtQUy5fTTdpHQUGXlJERkFMBwQfD0dULl9NX28cEWwrTEJHQ10ABR0XXVZCXV5bB20dF0Q8X1M2NwMBABlGU0ZfTUEGBh8PR1QuX01ZbxwRbCtMQkBDXwUFHRdIVl1BWDEeEANqXEEoKEBaHAUdF0NUXUVfWW8cEQQtPA4%3D/getpoint"
GET2 = "https://pydefis.callicode.fr/defis/MachineLearning/intern/C0MfHAoFXBILF1IiEgUCC0BVX14VE1FfTU5RVV9DAgQAUVdMaWtqGkJRXUBaWR4QHABGT0BEWDEeEABqXEEoKEBVBx4ABUVNU0ZdQgAFbBtQUy5fTTdpHQUGXlJERkFMBwQfD0dULl9NX28cEWwrTEJHQ10ABR0XXVZCXV5bB20dF0Q8X1M2NwMBABlGU0ZfTUEGBh8PR1QuX01ZbxwRbCtMQkBDXwUFHRdIVl1BWDEeEANqXEEoKEBaHAUdF0NUXUVfWW8cEQQtPA4%3D/reponse/"
#Collect data
while True:
res = requests.get(GET)
x,y = [float(v) for v in res.text.replace("[", "").replace("]", "").split(",")]
res = requests.get(GET2 + str(1))
color = res.text
datafile = open("MachineLearning_data.txt", "a")
datafile.write("{},{},{}".format(x,y,color))
datafile.close
time.sleep(1)