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,28 @@
import requests
import time
def get_duration(code):
res = requests.get(url="https://pydefis.callicode.fr/defis/PinCodeBroyeur/intern/ExQDQkhTLQIZCwICBB0aFRs%3D/validatepincode?pincode="+code)
pos = res.text.find("Temps d'exécution de la page : ") + 31
duration = res.text[pos:pos+7]
return duration
table = dict()
moyenne = dict()
for i in range(6):
for j in range(10):
code = str(j).ljust(i+1,"0").rjust(6,"0")
table[code] = list()
for code in table:
for i in range(5):
duration = get_duration(code)
table[code].append(float(duration))
print("\t", code, "==>", duration)
time.sleep(10.5)
moyenne[code] = sum(table[code]) / len(table[code])
print(code, moyenne[code])
print(table)
for code in table:
print(code, moyenne[code])