Created
August 28, 2015 00:30
-
-
Save pfeodrippe/b07ad7246ab82bdf95c6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import time | |
| import requests | |
| from random import randint | |
| while True: | |
| # url = 'http://127.0.0.1:8001/uploadImg' | |
| url = 'http://bioanalyzer.cloudapp.net:81/uploadImg' | |
| init_time = time.time() | |
| folder = str(randint(0,1)) | |
| print "\nSent a " + folder | |
| files = {'file': open('_'+ folder +'/'+ str(randint(0,3000)) +'.png', 'rb')} | |
| r = requests.post(url, files=files) | |
| print "Received " + r.text | |
| print "Total time: " + str(time.time() - init_time) + "s" | |
| time.sleep(1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment