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

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

How to change color in markdown cells ipython/jupyter notebook?

You can simply use raw html tags like foo <font color=”red”>bar</font> foo Be aware that this will not survive a conversion of the notebook to latex. As there are some complaints about the deprecation of the proposed solution. They are totally valid and Scott has already answered the question with a more recent, i.e. CSS … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)