Skip to content

Instantly share code, notes, and snippets.

View Expector-Hutch's full-sized avatar
😭
不想上学啊啊啊

Expector Expector-Hutch

😭
不想上学啊啊啊
View GitHub Profile
def printc(*args, fg = '', bg = '', light: bool = False, style = (), sep=' ', end='\n', file=None, flush=False):
def prints(arg): return print(arg, end='', file=file, flush=flush)
def decoder(data):
if type(data) is str:
com_table = {'black': 0, 'red': 1, 'green': 2, 'yellow': 3,
'blue': 4, 'magenta': 5, 'cyan': 6, 'white': 7}
return com_table[data]
elif type(data) is int:
return f'8;5;{data}'