GithubHelp home page GithubHelp logo

vdt / jupyter-notify Goto Github PK

View Code? Open in Web Editor NEW

This project forked from shoprunner/jupyter-notify

0.0 2.0 0.0 17 KB

A Jupyter Notebook magic for browser notifications of cell completion

License: BSD 3-Clause "New" or "Revised" License

Makefile 8.88% Python 44.34% JavaScript 46.79%

jupyter-notify's Introduction

ShopRunner logo

A Jupyter Magic For Browser Notifications of Cell Completion

Jupyter notebook notification in Chrome

Jupyter notebook notification in Firefox

This package provides a Jupyter notebook cell magic %%notify that notifies the user upon completion of a potentially long-running cell via a browser push notification. Use cases include long-running machine learning models, grid searches, or Spark computations. This magic allows you to navigate away to other work (or even another Mac desktop entirely) and still get a notification when your cell completes.

Supported browsers

The extension has currently been tested in Chrome (Version: 58.0.3029) and Firefox (Version: 53.0.3).

Note: Firefox also makes an audible bell sound when the notification fires (the sound can be turned off in OS X as described here).

Import the repo

To use the package, install it via pip directly:

pip install jupyternotify

or add it to the requirements.txt of your repo.

To install directly from source:

git clone [email protected]:ShopRunner/jupyter-notify.git
cd jupyter-notify/
virtualenv venv
source venv/bin/activate
pip install -r requirements.txt
jupyter notebook

Usage

Load inside a Jupyter notebook:

import jupyternotify
ip = get_ipython()
ip.register_magics(jupyternotify.JupyterNotifyMagics)

Automatically load in all notebooks

Add the following lines to your ipython startup file:

c.InteractiveShellApp.exec_lines = [
	'import jupyternotify',
	'ip = get_ipython()',
	'ip.register_magics(jupyternotify.JupyterNotifyMagics)'
]

The .ipython startup file can be generated with ipython profile create [profilename] and will create a configuration file at ~/.ipython/profile_[profilename]/ipython_config.py'. Leaving [profilename] blank will create a default profile (see this for more info).

To test the extension, try

%%notify
import time
time.sleep(5)

jupyter-notify's People

Contributors

mdagost avatar parsing-science avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.