jupyter

JupyterLab: How to save a figure from the notebook

霸气de小男生 提交于 2021-02-17 21:07:28
问题 I'm trying the new JupyterLab and am having trouble saving figures. Using vanilla Jupyter notebooks, I can two-fingers click (using macOS, Safari or Chrome) and I get a browser menu that allows me to copy or save the figure. In JupyterLab, this menu is replaced by notebook specific one with cell-related functions, as seen here: Is there a way I can save a figure directly from the notebook in JupyterLab? 回答1: Following the suggestion from @Matt, I opened an issue in GitHub and got the answer:

Bash script with multiple papermill commands does not fail on notebook errors

无人久伴 提交于 2021-02-16 20:55:25
问题 I have a refresh_data.sh file which contains multiple papermill commands, for example: papermill notebook_1.ipynb output_1.ipynb -p start "2017-12-01" -p date "2017-12-31" papermill notebook_2.ipynb output_2.ipynb -p start "2018-01-01" -p date "2018-01-31" If I get an error while it is running the first notebook, the process continues executing the second one. In other words, an error in one of the notebooks doesn't "break" the overall script. As far as I remember with normal python scripts

Bash script with multiple papermill commands does not fail on notebook errors

断了今生、忘了曾经 提交于 2021-02-16 20:55:12
问题 I have a refresh_data.sh file which contains multiple papermill commands, for example: papermill notebook_1.ipynb output_1.ipynb -p start "2017-12-01" -p date "2017-12-31" papermill notebook_2.ipynb output_2.ipynb -p start "2018-01-01" -p date "2018-01-31" If I get an error while it is running the first notebook, the process continues executing the second one. In other words, an error in one of the notebooks doesn't "break" the overall script. As far as I remember with normal python scripts

Completion in IPython (jupyter) does now work (unexpected keyword argument 'column')

北城以北 提交于 2021-02-14 11:23:10
问题 I'm using jupyter notebook, and it works fine, but when I press TAB, the auto-completion doesn't work. I already checked all the similar cases in StackOverflow, but none of the solutions worked for me. I have also tried to do "pip upgrade" to: IPython, IPYKernel, Jedi, and Tornado, the upgrade works fine but the problem is still there. I tried in Firefox, Chrome and Edge. When I press TAB I can see those errors in the terminal: [IPKernelApp] ERROR | Exception in message handler: Traceback

Completion in IPython (jupyter) does now work (unexpected keyword argument 'column')

♀尐吖头ヾ 提交于 2021-02-14 11:23:02
问题 I'm using jupyter notebook, and it works fine, but when I press TAB, the auto-completion doesn't work. I already checked all the similar cases in StackOverflow, but none of the solutions worked for me. I have also tried to do "pip upgrade" to: IPython, IPYKernel, Jedi, and Tornado, the upgrade works fine but the problem is still there. I tried in Firefox, Chrome and Edge. When I press TAB I can see those errors in the terminal: [IPKernelApp] ERROR | Exception in message handler: Traceback

Completion in IPython (jupyter) does now work (unexpected keyword argument 'column')

你。 提交于 2021-02-14 11:20:57
问题 I'm using jupyter notebook, and it works fine, but when I press TAB, the auto-completion doesn't work. I already checked all the similar cases in StackOverflow, but none of the solutions worked for me. I have also tried to do "pip upgrade" to: IPython, IPYKernel, Jedi, and Tornado, the upgrade works fine but the problem is still there. I tried in Firefox, Chrome and Edge. When I press TAB I can see those errors in the terminal: [IPKernelApp] ERROR | Exception in message handler: Traceback

Completion in IPython (jupyter) does now work (unexpected keyword argument 'column')

删除回忆录丶 提交于 2021-02-14 11:20:54
问题 I'm using jupyter notebook, and it works fine, but when I press TAB, the auto-completion doesn't work. I already checked all the similar cases in StackOverflow, but none of the solutions worked for me. I have also tried to do "pip upgrade" to: IPython, IPYKernel, Jedi, and Tornado, the upgrade works fine but the problem is still there. I tried in Firefox, Chrome and Edge. When I press TAB I can see those errors in the terminal: [IPKernelApp] ERROR | Exception in message handler: Traceback

Relabel axis ticks in seaborn heatmap

流过昼夜 提交于 2021-02-11 13:33:00
问题 I have a seaborn heatmap that I am building from a matrix of values. Each element of the matrix corresponds to an entitiy that I would like to make the tick label for each row/col in the matrix. I tried using the ax.set_xticklabel() function to accomplish this but it seems to do nothing. Here is my code: type(jr_matrix) >>> numpy.ndarray jr_matrix.shape >>> (15, 15) short_cols = ['label1','label2',...,'label15'] # list of strings with len 15 fig, ax = plt.subplots(figsize=(13,10)) ax.set

Jupyter Notebook - Attribute Error: 'module' object has no attribute 'F_OK'

杀马特。学长 韩版系。学妹 提交于 2021-02-10 20:39:38
问题 Whenever I type in the command "jupyter notebook" it is giving me the attribute error listed above. I am running it through the Anaconda Prompt. What is in the prompt window: (base) C:\Users\jj891w>jupyter notebook Traceback (most recent call last): File "C:\Users\jj891w\AppData\Local\Continuum\anaconda2\Scripts\jupyter-notebo ok-script.py", line 10, in <module> sys.exit(main()) File "C:\Users\jj891w\AppData\Local\Continuum\anaconda2\lib\site-packages\jupy ter_core\application.py", line 266,

Jupyter: trick to run next cell even if previous cell fails

点点圈 提交于 2021-02-10 16:51:13
问题 I want to send alerts if a long running cell fails, but I don't want to try/except because then I will send needless messages when I am looking at the error. Is there a way to do this? Desired workflow: 1) run status=train() cell 2) see no error in first 15 seconds 3) execute next cell send_alert('done or error') that will execute regardless of the outcome of cell 1. 4) Go do something else Here is a one cell solution that is annoying to code every time: try: start = time.time() train(...)