jupyter lab open an iframe on a tab for monitoring dask scheduler - jupyter-notebook

I am developping with dask distributed and this package provides a very useful debugging view as a bokeh application.
I want to have this application next to my notebook in a jupyterlab tab.
I have managed to do so by opening the jupyter lab reference (Help > Jupyter lab reference) and modifying the url with the inspect tool of firefox from it's orignial value to 127.0.0.1:8787 (the URL for the dask dashboard)
see below :
dask scheduler console in jupyter lab
Is there a less hacky way to open a website in jupyter lab?

It looks like there is an active Github issue for this. I recommend tracking https://github.com/jupyterlab/jupyterlab/issues/2369
It sounds like you may also want to look at https://github.com/dask/dask-labextension

Related

How to view two jupyter notebooks on the same screen (I have just one monitor) using a Mac?

I welcome instructions to do this either with Jupyter Notebook or Jupyter Lab.
My intent for learning purposes, is to download and open various notebooks from GitHub, and open new notebooks to replicate the original notebook from GitHub.
I could simply switch back-and-forth from one notebook to the other to achieve my goal. But, it would be a lot easier if I could have both notebooks opened vertically in two separate windows. Is there an easy way to do some sort of split-screen viewing?
You can do this out of the box in JupyterLab by opening both notebooks and then dragging one of the tabs to the right side of the screen. You can’t do this in the legacy jupyter notebook viewer - it needs to be jupyter lab.
See the jupyterlab docs on the interface for more info.

Can cloud instances of Jupyter Lab support pop out interactive windows

I'm new to Jupyter notebooks/Lab and I've successfully got interaction with pop-out windows and buttons etc with ipywidgets on local instances of Jupyter Lab but not in the cloud when using notebooks.ai - the code runs without error but doesn't create the appropriate windows/button.
Is there anyway to get this working or is this an inherent restriction of using Jupyter Lab in the cloud?
I'm wondering whether there are firewall settings that need configuring to get this to work?
The X11 forwarding is disabled on the docker machines provided by notebooks.ai. Hence, any pop-up interaction is not being forwarded to your machine. However, you can see any inline plot/button in the Jupyter notebook.
If you are interested in this feature there is a GitHub repository to request features (I have never tried it) but might be interesting for you to receive a more in-depth explanation, workaround, or solution.
PROVE:
In the launcher tab you can either run a notebook, a python interpreter or a terminal on the remote docker machine. If you select the terminal and type echo $DISPLAY, you will see that the result is an empty line (if a valid display was attached you will see something like: DISPLAY=localhost:11.0).
For further information about using BASH to check if X11 forwarding is enabled from SSH check this question.

Jupyter Notebook extensions within Jupyter Lab

Is it possible to use notebook extensions (nbextensions) within Jupyter Lab?
I think my extensions are enabled... I call jupyter nbextension enable on them beforehand. But I don't see them in notebooks from within Jupyter Lab.
No, it is not possible to use a Notebook Classic extension in JupyterLab.
Though a great deal of effort has been made to make the notebook UI in JupyterLab look and feel like the UI in Notebook Classic, on the backend they do not share a code base. Thus, nbextensions for Notebook Classic have zero fundamental compatibility with JupyterLab. Beyond that, as #madhu94 points out, the extension API (how extensions should be structured, required methods, etc) are completely different in Classic and Lab.
There are some examples of projects with both an nbextension for Notebook Classic and a labextension for JupyterLab (eg jupyter-widgets/ipywidgets). In these cases the project will have separate code for each kind of extension.

Jupyter notebook extension loading eratically

I load extensions to IPython notebook (powered by Jupyter) with the following command in ~\.ipython\profile_default\static\custom\custom.js.
IPython.load_extensions("calico-spell-check", "calico-document-tools");
The extensions are correctly loaded in the first notebook I open. But they are typically disabled in the following notebooks I open. Then when I close, reopen, etc. the notebooks they are loaded (seldom) or not (often) without any specific message in the console.
Is it a problem of compatibility with Jupyter or rather a bad configuration of mine?
You are hitting a race condition. Most of the instruction on how to activate extension in custom.js are wrong/too old when they tell you to directly copy past code in custom.js. Please follow official docs, use requirejs, and register the extension following the information in official docs.

Possible to copy/paste from IPython Notebook to other apps?

I'm new to Ipython Notebook. I can cut and paste from other apps into my notebooks, but how do I copy/paste code out of notebook into a different app?
I'm accessing a Linux VNC session via Chicken. I can cut/paste with wild abandon between OSX/Linux using both command X/C/V and/or middle mouse button. I can also copy code into IPython notebook. I'm stopped dead in my tracks trying to get code out of IpyNotebook.
Using Notebook's 'Edit/Copy Cell' doesn't work, neither does 'Ctrl-m c'.
I'm running IPython 0.13.1
You have to select and copy code using normal Ctrl-C Ctrl-V. 'Edit/Copy Cell' is a specific action in javascript that does a little more and that browser security policy prevent us to bind with clipboard.

Resources