Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import requests | |
class Test: | |
def _repr_html_(self): | |
return "<h1>Test</h1>" | |
class ChessBoard: | |
def _repr_html_(self): | |
url = 'https://gist.githubusercontent.com/ontouchstart/d753ff109f591995f399fe5425f0c005/raw/6d2b9e1e016cea1b0d4c1f793b4aa18e7dd53cac/chessboard.svg' | |
with requests.get(url) as response: | |
html = response.content.decode('utf-8') | |
return html |
This comment has been minimized.
This comment has been minimized.
You can also load the code to another notebook on Google Colab and play with it yourself. https://colab.research.google.com/gist/ontouchstart/934da948842bff86d470ffe25d692e67/test.ipynb |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This comment has been minimized.
This notebook can be viewed in
https://nbviewer.jupyter.org/gist/ontouchstart/ea1631f69e507a81a9d9ec56b79e4d11