This example starts nbclassic instead of the Classic Jupyter Notebook as the main server:
Try it on Binder!
| from IPython.parallel import Client | |
| from IPython.parallel import interactive | |
| import time | |
| import random | |
| @interactive | |
| def work(i): | |
| import time | |
| import random | |
| sleeptime = 1 + random.random() * 2 |
| #!/usr/bin/env python | |
| """ | |
| Script for running and save notebooks from command line. | |
| How to use: `ipynb_run_save.py foo.ipynb | |
| Some tweaks over ipydoctest.py from minrk | |
| by @damianavila | |
| """ |
| # bring up the vagrant VM | |
| sudo apt-get install vagrant | |
| git clone https://bitbucket.org/puffnfresh/vagrant-haskell-heroku.git | |
| cd vagrant-haskell-heroku | |
| vagrant up | |
| vagrant ssh | |
| # run this in vagrant shell | |
| cabal update | |
| cabal install cabal-install |
| import logging | |
| import zmq | |
| def main(): | |
| context = zmq.Context() | |
| frontend = context.socket(zmq.PULL) | |
| frontend.bind('tcp://*:5559') | |
| backend = context.socket(zmq.PUB) |
| ### MATPLOTLIBRC FORMAT | |
| # This is a sample matplotlib configuration file - you can find a copy | |
| # of it on your system in | |
| # site-packages/matplotlib/mpl-data/matplotlibrc. If you edit it | |
| # there, please note that it will be overridden in your next install. | |
| # If you want to keep a permanent local copy that will not be | |
| # over-written, place it in HOME/.matplotlib/matplotlibrc (unix/linux | |
| # like systems) and C:\Documents and Settings\yourname\.matplotlib | |
| # (win32 systems). |
| import asyncio | |
| import logging | |
| import zmq | |
| import zmq.asyncio | |
| from scheduler import SchedulerCode | |
| class Client: |
This example starts nbclassic instead of the Classic Jupyter Notebook as the main server:
Try it on Binder!