Running Google Colab from Observable (or vice versa)

hi @cornhundred,

Could one craft a client-server python code that communicates with the jupyter-kernel to receive data from Observable?

You gave me an idea: try to serve a simple web server from one Colab instance and fetch data directly from an Observable notebook. Using ngrok.com with Flask

The Flask web server can be improved a lot and how it’s integrated to Colab workflow. Anyway, it’s just a PoC. It relies on ngrok.com as a reverse proxy.

Run this Colab notebook, copy and paste the generate ngrok.io URL to the Observable notebook below. It serves a CSV file with embeddings data from a PyMDE MNIST analysis. This workflow is a bit quicker than exporting a CSV file and importing on Observable. But it’s not faster than using Observable inside Colab with observable-jupyter made by ObservableHQ folks.

Another helpful hack: it’s easy to connect via ssh to a Colab instance. I use another service for reverse proxy tmate.io

edit: I forgot to mention a previous post here that might be helpful

2 Likes