|
|
@ -1,4 +1,6 @@
|
|
|
|
import requests
|
|
|
|
import requests
|
|
|
|
|
|
|
|
from time import sleep
|
|
|
|
|
|
|
|
# Progress-bar
|
|
|
|
from tqdm import tqdm
|
|
|
|
from tqdm import tqdm
|
|
|
|
# Work with list-like objects
|
|
|
|
# Work with list-like objects
|
|
|
|
from listwork import *
|
|
|
|
from listwork import *
|
|
|
@ -22,6 +24,7 @@ def fill(x1,y1, x2,y2, color):
|
|
|
|
# draw( fill(...) )
|
|
|
|
# draw( fill(...) )
|
|
|
|
def draw(pxls):
|
|
|
|
def draw(pxls):
|
|
|
|
global server
|
|
|
|
global server
|
|
|
|
|
|
|
|
ic(pxls)
|
|
|
|
|
|
|
|
|
|
|
|
push = [] # Push %limit% items
|
|
|
|
push = [] # Push %limit% items
|
|
|
|
limit = 300
|
|
|
|
limit = 300
|
|
|
@ -34,11 +37,13 @@ def draw(pxls):
|
|
|
|
push.append({"main": pack(packs)})
|
|
|
|
push.append({"main": pack(packs)})
|
|
|
|
push.append({"main": pack(pxls)}) # Pack last
|
|
|
|
push.append({"main": pack(pxls)}) # Pack last
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ic(push)
|
|
|
|
for i in tqdm(push):
|
|
|
|
for i in tqdm(push):
|
|
|
|
response = requests.post(server, i)
|
|
|
|
response = requests.post(server, i)
|
|
|
|
while not response.status_code == 200:
|
|
|
|
while not response.status_code == 200:
|
|
|
|
print("Error, retrying...")
|
|
|
|
print("Error, retrying...")
|
|
|
|
response = requests.post(server, i)
|
|
|
|
response = requests.post(server, i)
|
|
|
|
|
|
|
|
sleep(0.1)
|
|
|
|
|
|
|
|
|
|
|
|
# cfill(0,0, 10,10)
|
|
|
|
# cfill(0,0, 10,10)
|
|
|
|
def cfill(x1,y1, x2,y2):
|
|
|
|
def cfill(x1,y1, x2,y2):
|
|
|
@ -57,10 +62,11 @@ def ccheck(packed):
|
|
|
|
return out
|
|
|
|
return out
|
|
|
|
|
|
|
|
|
|
|
|
from random import randint as ri
|
|
|
|
from random import randint as ri
|
|
|
|
draw( fill(0,0, 100,100, [ri(0,255),ri(0,255),ri(0,255)]) )
|
|
|
|
#draw( fill(0,0, 100,100, [ri(0,255),ri(0,255),ri(0,255)]) )
|
|
|
|
|
|
|
|
#draw( [[0,0, 100,100, 255,255,255]] )
|
|
|
|
|
|
|
|
|
|
|
|
#print(ccheck(pack([[0,0]]) ))
|
|
|
|
#print(ccheck(pack([[0,0]]) ))
|
|
|
|
#print(ccheck(cfill(0,0, 10,10)))
|
|
|
|
#print(ccheck(cfill(0,0, 10,10)))
|
|
|
|
|
|
|
|
|
|
|
|
#from bot_extras import *
|
|
|
|
from bot_extras import *
|
|
|
|
#print( draw(pas2( rand(0,0, 100,100) )) )
|
|
|
|
draw(pas2( rand(0,0, 100,100) ))
|
|
|
|