Created
June 30, 2018 06:10
-
-
Save carlos-jenkins/33367c30b4522119c6d52946d9d980f3 to your computer and use it in GitHub Desktop.
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
def lovewins(text='LoveWins'): | |
def esc(*x): | |
return '\033[' + ';'.join(x) + 'm' | |
colors = [7, 1, 3, 63, 2, 4, 5, 7] | |
for byte in text.encode('ascii'): | |
print(''.join( | |
''.join([ | |
esc('30'), | |
esc(str(colors[index] + 30)), | |
bit, | |
esc('0') | |
]) | |
for index, bit in enumerate('{:08b}'.format(byte)) | |
)) | |
lovewins() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment