|
|
|
@ -16,25 +16,48 @@ def kbv(dict_, value):
|
|
|
|
|
class RequestHandler(BaseHTTPRequestHandler):
|
|
|
|
|
MATRIX_SIZE = (800, 1024)
|
|
|
|
|
COLORS = {
|
|
|
|
|
'white': (255, 255, 255),
|
|
|
|
|
'blue': (0, 0, 255),
|
|
|
|
|
'red': (255, 0, 0),
|
|
|
|
|
'lime': (0, 255, 0),
|
|
|
|
|
'black': (0, 0, 0),
|
|
|
|
|
'orange': (255, 128, 0),
|
|
|
|
|
'yellow': (255, 255, 0),
|
|
|
|
|
'cyan': (0, 255, 255),
|
|
|
|
|
'purple': (128, 0, 255),
|
|
|
|
|
'pink': (255, 0, 255),
|
|
|
|
|
'green': (0, 128, 0),
|
|
|
|
|
'light_blue': (0, 128, 255),
|
|
|
|
|
'dark_purple': (128, 0, 128),
|
|
|
|
|
'gray': (128, 128, 128),
|
|
|
|
|
'dark_pink': (255, 0, 128),
|
|
|
|
|
'lime': (0, 128, 0),
|
|
|
|
|
'mint': (0, 255, 128),
|
|
|
|
|
'salad': (128, 255, 0)
|
|
|
|
|
}
|
|
|
|
|
'white': (255, 255, 255),
|
|
|
|
|
|
|
|
|
|
'light_red': (255, 0, 0),
|
|
|
|
|
'red': (192, 0, 0),
|
|
|
|
|
'dark_red': (128, 0, 0),
|
|
|
|
|
|
|
|
|
|
'maroon': (80, 25, 40),
|
|
|
|
|
'dark_maroon': (25, 5, 5),
|
|
|
|
|
'light_maroon': (115, 40, 60),
|
|
|
|
|
|
|
|
|
|
'brown': (165, 90, 25),
|
|
|
|
|
'light_brown': (210, 150, 95),
|
|
|
|
|
'dark_brown': (50, 40, 10),
|
|
|
|
|
|
|
|
|
|
'sand': (250, 245, 200),
|
|
|
|
|
'orange': (255, 128, 0),
|
|
|
|
|
'yellow': (255, 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):
|
|
|
|
|
params = parse_qs(self.path[2:])
|
|
|
|
|