jupyter-notebook

iPyWidget with date slider?

别来无恙 提交于 2020-06-09 17:53:10
问题 I am wondering if there's an easy way to build an iPyWidget with a datetime slider. Right now it is easy to slide over integer or floating point ranges (e.g. numbers 1-10, decimals 0.01, 0.02, ...). I imagine you could convert dates to floats or integers, build some sort of slider using these, and then convert back to dates for the display labels on the slider. However, this seems clunky. Does anyone have a smoother solution? 回答1: I had the same issue recently. I had to write my own class to

Python Garbage Collection sometimes not working in Jupyter Notebook

房东的猫 提交于 2020-06-09 12:05:15
问题 I'm constantly running out of RAM with some Jupyter Notebooks and I seem to be unable to release memory that is no longer needed. Here is an example: import gc thing = Thing() result = thing.do_something(...) thing = None gc.collect() As you can presume, thing uses a lot of memory to do something and then I don't need it anymore. I should be able to release the memory it uses. Even though it doesn't write to any variables that I can access from my notebook, garbage collector isn't freeing up

%matplotlib inline gives the same result with or without it on Jupyter Notebook

我怕爱的太早我们不能终老 提交于 2020-06-08 06:21:32
问题 So I went through some questions being posted about the usage of %matplotlib inline function in Jupyter Notebook, I do understand that "%matplotlib inline sets the backend of matplotlib to the 'inline' backend" & "When using the 'inline' backend, your matplotlib graphs will be included in your notebook, next to the code". But, I don't see any difference in my plot results with or without the use of "%matplotlib inline". Can someone explain this to me if I am misunderstanding something? Here's

%matplotlib inline gives the same result with or without it on Jupyter Notebook

别来无恙 提交于 2020-06-08 06:21:10
问题 So I went through some questions being posted about the usage of %matplotlib inline function in Jupyter Notebook, I do understand that "%matplotlib inline sets the backend of matplotlib to the 'inline' backend" & "When using the 'inline' backend, your matplotlib graphs will be included in your notebook, next to the code". But, I don't see any difference in my plot results with or without the use of "%matplotlib inline". Can someone explain this to me if I am misunderstanding something? Here's

`ProcessPoolExecutor` works on Ubuntu, but fails with `BrokenProcessPool` when running Jupyter 5.0.0 notebook with Python 3.5.3 on Windows 10

≡放荡痞女 提交于 2020-06-08 04:16:10
问题 I'm running Jupyter 5.0.0 notebook with Python 3.5.3 on Windows 10. The following example code fails to run: from concurrent.futures import as_completed, ProcessPoolExecutor import time import numpy as np def do_work(idx1, idx2): time.sleep(0.2) return np.mean([idx1, idx2]) with ProcessPoolExecutor(max_workers=4) as executor: futures = set() for idx in range(32): future = winprocess.submit( executor, do_work, idx, idx * 2 ) futures.add(future) for future in as_completed(futures): print(future

`ProcessPoolExecutor` works on Ubuntu, but fails with `BrokenProcessPool` when running Jupyter 5.0.0 notebook with Python 3.5.3 on Windows 10

Deadly 提交于 2020-06-08 04:13:09
问题 I'm running Jupyter 5.0.0 notebook with Python 3.5.3 on Windows 10. The following example code fails to run: from concurrent.futures import as_completed, ProcessPoolExecutor import time import numpy as np def do_work(idx1, idx2): time.sleep(0.2) return np.mean([idx1, idx2]) with ProcessPoolExecutor(max_workers=4) as executor: futures = set() for idx in range(32): future = winprocess.submit( executor, do_work, idx, idx * 2 ) futures.add(future) for future in as_completed(futures): print(future

`ProcessPoolExecutor` works on Ubuntu, but fails with `BrokenProcessPool` when running Jupyter 5.0.0 notebook with Python 3.5.3 on Windows 10

流过昼夜 提交于 2020-06-08 04:13:04
问题 I'm running Jupyter 5.0.0 notebook with Python 3.5.3 on Windows 10. The following example code fails to run: from concurrent.futures import as_completed, ProcessPoolExecutor import time import numpy as np def do_work(idx1, idx2): time.sleep(0.2) return np.mean([idx1, idx2]) with ProcessPoolExecutor(max_workers=4) as executor: futures = set() for idx in range(32): future = winprocess.submit( executor, do_work, idx, idx * 2 ) futures.add(future) for future in as_completed(futures): print(future

Jupyter notebook output cell freezes (Keras related?)

北战南征 提交于 2020-05-30 09:49:14
问题 I am working with Keras and happens to me to leave the jupyter notebook running overnight and close the browser. When I reopen it, the notebook gets stuck in the (Starting) phase and while the kernel is still running I cannot see any update in the output cells. Leaving the browser open doesn't help because eventually the output freezes anyway.. I don't know the exact memory taken by the notebook, but it's a con with several layers so I bet quite heavy. I am working on Ubuntu with Firefox. Any

Can't access jupyter notebook from docker

孤街醉人 提交于 2020-05-30 07:35:47
问题 I am trying to run a jupyter notebook created in Docker. Firstly I run a container: docker run -p 8888:8888 jupyter/tensorflow-notebook What I get is: [I 19:44:47.140 NotebookApp] Writing notebook server cookie secret to /home/jovyan/.local/share/jupyter/runtime/notebook_cookie_secret [I 19:44:51.731 NotebookApp] JupyterLab extension loaded from /opt/conda/lib/python3.7/site-packages/jupyterlab [I 19:44:51.732 NotebookApp] JupyterLab application directory is /opt/conda/share/jupyter/lab [I 19

Can't access jupyter notebook from docker

雨燕双飞 提交于 2020-05-30 07:35:08
问题 I am trying to run a jupyter notebook created in Docker. Firstly I run a container: docker run -p 8888:8888 jupyter/tensorflow-notebook What I get is: [I 19:44:47.140 NotebookApp] Writing notebook server cookie secret to /home/jovyan/.local/share/jupyter/runtime/notebook_cookie_secret [I 19:44:51.731 NotebookApp] JupyterLab extension loaded from /opt/conda/lib/python3.7/site-packages/jupyterlab [I 19:44:51.732 NotebookApp] JupyterLab application directory is /opt/conda/share/jupyter/lab [I 19