How to clear Jupyter Notebook’s output in all cells from the Linux terminal?

nbconvert 6.0 should fix –clear-output The option had been broken for a long time previously, bug report with merged patch: https://github.com/jupyter/nbconvert/issues/822 Usage should be for in-place operation: jupyter nbconvert –clear-output –inplace my_notebook.ipynb Or to save to another file called my_notebook_no_out.ipynb: jupyter nbconvert –clear-output \ –to notebook –output=my_notebook_no_out my_notebook.ipynb This was brought to my attention by … Read more

Why I can’t access remote Jupyter Notebook server?

Have you configured the jupyter_notebook_config.py file to allow external connections? By default, Jupyter Notebook only accepts connections from localhost (eg, from the same computer that its running on). By modifying the NotebookApp.allow_origin option from the default ‘ ‘ to ‘*’, you allow Jupyter to be accessed externally. c.NotebookApp.allow_origin = ‘*’ #allow all origins You’ll also … Read more

Install Python 3.8 kernel in Google Colaboratory

I have found how to run Python 3.8 notebook on Colab. install Anaconda3 add (fake) google.colab library start jupyterlab access it with ngrok Here’s the code # install Anaconda3 !wget -qO ac.sh https://repo.anaconda.com/archive/Anaconda3-2020.07-Linux-x86_64.sh !bash ./ac.sh -b # a fake google.colab library !ln -s /usr/local/lib/python3.7/dist-packages/google \ /root/anaconda3/lib/python3.8/site-packages/google # start jupyterlab, which now has Python3 = 3.8 … Read more

Importing .py files in Google Colab

You can save it first, then import it. from google.colab import files src = list(files.upload().values())[0] open(‘mylib.py’,’wb’).write(src) import mylib Update (nov 2018): Now you can upload easily by click at [>] to open the left pane choose file tab click [upload] and choose your [mylib.py] import mylib Update (oct 2019): If you don’t want to upload … Read more