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