Last active
June 18, 2024 12:57
-
-
Save pekochan069/365cdadf6851195e87317618d8e8ac8d to your computer and use it in GitHub Desktop.
qlock python bad implementation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from time import sleep | |
from datetime import datetime as d | |
def C(c,a):return a+c+"\x1b[0m" | |
a=open(__file__).read().replace(":\n",":").replace("\n",";").replace(" ","") | |
while 1: | |
c=d.now().strftime("%H:%M:%S") | |
for i in range(len(a)//64): | |
for j in range(64): | |
e=int((j/2)%4) | |
print(C(a[i*64+j],"\x1b[40;37;1m"if i>4 or e==3 or~[31599,19812,14479,31207,23524,29411,29679,30866,31727,31719,1040][10 if c[j//8]==":"else int(c[j//8])]>>(12-i*3+e)&1 else"\x1b[47;30;1m"), end="") | |
print() | |
print(C(a[64*(len(a)//64):],"\x1b[40;37;1m")+"\n\x1b[9A",end="\x1b[0J") | |
sleep(1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
reduced from 11 lines to 9 lines of output