How to add a Notebook (.ipynb file) to Launcher? - jupyter-lab

I would like to add a new specific notebook or a file in the Launcher tab instead of a kernel.
What kind of ways are there?

Related

Copy data from cygwin window to another cygwin window

I'm having 2 cygwin windows opened.
Is there a way I can transfer data between the 2 windows?
I try to write a script that setting some envs on the second window, based on envs that were set in the first cygwin window.
I though about creating a file in the first window, and then the script that will be run in the second window can go to that file, read the data and set the envs according.
But I prefer a better solution, if possible without including files.
Thank you

how to add a custom file type in jupyterlab launcher?

I work with jupyterlab on daily basis and I would like to customize my launcher to add extra file type. Right now I need to create a new text file and then change the extention.
If anyone can help me add Yaml for example ?

How can I load data from an external drive into a Jupyter notebook on MacOs?

I have running code in my home directory in Jupyter notebook. I'd like to import some data from an external drive, as the data is too large to be stored on my local drive. I am unable to import this data into my notebook.
If you can browse to the data using Finder, you should be able to load the data into your Jupyter notebook.
Your code to open a file in your notebook probably looks something like this:
with open("data.txt","r") as dataFile:
You need to replace data.txt with the path to the file you want to open.
One way to get the path name is to navigate to the file in Finder and then drag the file into your Terminal. The path to the file will then be pasted into the command prompt of the Terminal.
The path may look something like this: /Volumes/Remove/Data/bigfile.txt
You can also navigate to the file using the cd command in the Terminal.
You may even be able to drag the file directly into your Jupyter notebook to get the path.
Hope this helps!

Jupyter Notebook Copy mechanism

I am trying to make a copy of a readonly jupyter notebook (made by setting the chattr i bit with a 644 permission). The notebook copy fails when the kernel is set to Python2 or Python3. It only opens a blank page. Interestingly a similar notebook with a R kernel successfully makes the copy.
Does jupyter kernels have special calls for this make a copy UI?
As far as I can tell make a copy triggers notebook.js which is handled by handler.py. I put a listener in handler.py to debug this but it seems like the make a copy is not even entering the context. I tried putting in a alert box in the notebook.js as well before line 2781, but that didn't seem to do anything. Any pointers to debug this scenario or how the copy code gets called?
Relevant information:
Jupyter is being served via jupyterhub==0.6.1
jupyter==1.0.0
ipykernel==4.3.1

Kernel gets busy when using nltk.download

I am using jupyter notebook to practice this problem on kaggle https://www.kaggle.com/c/word2vec-nlp-tutorial/details/part-1-for-beginners-bag-of-words.
When I use the following code
import nltk
nltk.download() # Download text data sets, including stop words
Kernel goes in the busy state and then I am unable to execute any cells further.
When you run nltk.download(), it launches an interactive GUI window that you can use to download resources. But very often this window is hidden behind other windows on your screen. Look for it, download anything you need and then close the downloader window in order for your script to return control to the notebook kernel.
To avoid hanging when your code gets to a download command, you could use a non-interactive download command instead. E.g., nltk.download("brown") for the Brown corpus, or nltk.download("book") to get all resources needed when reading through the nltk book. These carry out the download (even if you already have the requested resource) without opening a GUI window. For this you'll need to know, or guess, the internal name of the resource you want.

Resources