hc99's picture
Add files using upload-large-folder tool
7ffff7d verified
# -*- coding: utf-8 -*-
ascii_coded = 'Γ’β™™β™™β™™β™™β™™β™™β™™β™™β™Œβ™β™β™Œβ™™β™™β™™β™™β™™β™™β™Œβ™Œβ™™β™™Γ’β™™β™™β™™β™™β™™β™™β™™β™˜β™β™β™β™ˆβ™™β™™β™™β™™β™™β™Œβ™β™β™β™”Γ’β™™β™™β™Œβ™ˆβ™™β™™β™Œβ™β™ˆβ™ˆβ™™β™™β™™β™™β™™β™™β™™β™™β™ˆβ™β™β™™Γ’β™™β™β™™β™™β™™β™β™β™™β™™β™™β™™β™™β™™β™™β™™β™™β™™β™™β™™β™™β™™β™™Γ’β™β™”β™™β™™β™˜β™β™β™™β™™β™Œβ™β™β™”β™™β™™β™Œβ™Œβ™Œβ™™β™™β™™β™ŒΓ’β™β™β™™β™™β™˜β™β™β™Œβ™™β™ˆβ™β™ˆβ™™β™™β™™β™ˆβ™β™β™™β™™β™˜β™”Γ’β™β™β™Œβ™™β™˜β™β™β™β™Œβ™Œβ™™β™™β™Œβ™Œβ™Œβ™™β™ˆβ™ˆβ™™β™Œβ™β™Γ’β™˜β™β™β™β™Œβ™β™β™β™β™β™β™Œβ™™β™ˆβ™™β™Œβ™β™β™β™β™β™”Γ’β™˜β™β™β™β™β™β™β™β™β™β™β™β™β™ˆβ™ˆβ™β™β™β™β™β™β™™Γ’β™™β™˜β™β™β™β™β™ˆβ™β™β™β™β™β™β™™β™™β™β™β™β™β™β™™β™™Γ’β™™β™™β™™β™ˆβ™ˆβ™ˆβ™™β™™β™β™β™β™β™β™”β™™β™β™β™β™β™ˆβ™™β™™Γ’β™™β™™β™™β™™β™™β™™β™™β™™β™™β™ˆβ™ˆβ™β™β™β™™β™ˆβ™ˆβ™ˆβ™™β™™β™™β™™Γ’'
ascii_uncoded = ''.join([chr(ord(c)-200) for c in ascii_coded])
url = 'https://media.giphy.com/media/e24Q8FKE2mxRS/giphy.gif'
message_coded = 'ĘĩĢĬĩĻ÷ĜĩΔͺΔ΄Δ­Γ¨Δ±ΔΆΔΌΔ­ΔΊΔ©Δ«ΔΌΔ±Δ·ΔΆ'
message_uncoded = ''.join([chr(ord(c)-200) for c in message_coded])
try:
from IPython import display
html = display.Image(url=url)._repr_html_()
class HTMLWithBackup(display.HTML):
def __init__(self, data, backup_text):
super().__init__(data)
self.backup_text = backup_text
def __repr__(self):
if self.backup_text is None:
return super().__repr__()
else:
return self.backup_text
dhtml = HTMLWithBackup(html, ascii_uncoded)
display.display(dhtml)
except ImportError:
print(ascii_uncoded)