|
|
@ -16,25 +16,48 @@ def kbv(dict_, value):
|
|
|
|
class RequestHandler(BaseHTTPRequestHandler):
|
|
|
|
class RequestHandler(BaseHTTPRequestHandler):
|
|
|
|
MATRIX_SIZE = (800, 1024)
|
|
|
|
MATRIX_SIZE = (800, 1024)
|
|
|
|
COLORS = {
|
|
|
|
COLORS = {
|
|
|
|
'white': (255, 255, 255),
|
|
|
|
'white': (255, 255, 255),
|
|
|
|
'blue': (0, 0, 255),
|
|
|
|
|
|
|
|
'red': (255, 0, 0),
|
|
|
|
'light_red': (255, 0, 0),
|
|
|
|
'lime': (0, 255, 0),
|
|
|
|
'red': (192, 0, 0),
|
|
|
|
'black': (0, 0, 0),
|
|
|
|
'dark_red': (128, 0, 0),
|
|
|
|
'orange': (255, 128, 0),
|
|
|
|
|
|
|
|
'yellow': (255, 255, 0),
|
|
|
|
'maroon': (80, 25, 40),
|
|
|
|
'cyan': (0, 255, 255),
|
|
|
|
'dark_maroon': (25, 5, 5),
|
|
|
|
'purple': (128, 0, 255),
|
|
|
|
'light_maroon': (115, 40, 60),
|
|
|
|
'pink': (255, 0, 255),
|
|
|
|
|
|
|
|
'green': (0, 128, 0),
|
|
|
|
'brown': (165, 90, 25),
|
|
|
|
'light_blue': (0, 128, 255),
|
|
|
|
'light_brown': (210, 150, 95),
|
|
|
|
'dark_purple': (128, 0, 128),
|
|
|
|
'dark_brown': (50, 40, 10),
|
|
|
|
'gray': (128, 128, 128),
|
|
|
|
|
|
|
|
'dark_pink': (255, 0, 128),
|
|
|
|
'sand': (250, 245, 200),
|
|
|
|
'lime': (0, 128, 0),
|
|
|
|
'orange': (255, 128, 0),
|
|
|
|
'mint': (0, 255, 128),
|
|
|
|
'yellow': (255, 255, 0),
|
|
|
|
'salad': (128, 255, 0)
|
|
|
|
|
|
|
|
}
|
|
|
|
'light_gold': (255, 215, 0),
|
|
|
|
|
|
|
|
'dark_gold': (185, 135, 10),
|
|
|
|
|
|
|
|
'gold': (220, 165, 30),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
'light_lime': (0, 255, 0),
|
|
|
|
|
|
|
|
'lime': (0, 128, 0),
|
|
|
|
|
|
|
|
'salad': (128, 255, 0),
|
|
|
|
|
|
|
|
'mint': (0, 255, 128),
|
|
|
|
|
|
|
|
'green': (0, 128, 0),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
'cyan': (0, 255, 255),
|
|
|
|
|
|
|
|
'light_blue': (0, 128, 255),
|
|
|
|
|
|
|
|
'blue': (0, 0, 255),
|
|
|
|
|
|
|
|
'dark_blue': (0, 65, 90),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
'dark_purple': (128, 0, 128),
|
|
|
|
|
|
|
|
'purple': (128, 0, 255),
|
|
|
|
|
|
|
|
'dark_pink': (255, 0, 128),
|
|
|
|
|
|
|
|
'pink': (255, 0, 255),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
'light_gray': (192, 192, 192),
|
|
|
|
|
|
|
|
'gray': (128, 128, 128),
|
|
|
|
|
|
|
|
'dark_gray': (64, 64, 64),
|
|
|
|
|
|
|
|
'black': (0, 0, 0)}
|
|
|
|
|
|
|
|
|
|
|
|
def do_GET(self):
|
|
|
|
def do_GET(self):
|
|
|
|
params = parse_qs(self.path[2:])
|
|
|
|
params = parse_qs(self.path[2:])
|
|
|
|