Skip to content

Instantly share code, notes, and snippets.

View sdaitzman's full-sized avatar
👩‍💻

Sam Daitzman sdaitzman

👩‍💻
View GitHub Profile
@sdaitzman
sdaitzman / draw.py
Created October 12, 2021 12:17 — forked from korakot/draw.py
Drawing on Google Colab
from IPython.display import HTML, Image
from google.colab.output import eval_js
from base64 import b64decode
canvas_html = """
<canvas width=%d height=%d></canvas>
<button>Finish</button>
<script>
var canvas = document.querySelector('canvas')
var ctx = canvas.getContext('2d')