Skip to content

Instantly share code, notes, and snippets.

View erdmann's full-sized avatar

Rob Erdmann erdmann

  • Rijksmuseum, University of Amsterdam
  • Amsterdam
  • X @erdmann
View GitHub Profile
@erdmann
erdmann / Asynchronously watch a shell command in a Jupyter Notebook.ipynb
Created May 1, 2021 10:35
Using ipywidgets and asyncio, it's easy to tap into the existing asynchronous event loop in Jupyter to make a cell that periodically monitors the output of a shell command (such as nvidia-smi) while you go about your work.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.