jupyter-notebook

Jupyter Notebook's RISE Missing Slideshow Button

前提是你 提交于 2020-06-28 07:52:14
问题 I followed the instructions on installing RISE for Jupyter notebook with Anaconda (conda) but the "Enter/Exit RISE Slideshow" button never showed in the toolbar. I followed the recommendations on solving the problem in the two closed RISE issues (#137, #275), but with no luck. I updated Jupyter to the latest version, started a new notebook, hard refreshed the browser page, reinstalled Rise and still no button. I also saw this SO question, which is different from my case since I never saw the

Is there a way to set PYTHONHASHSEED for a Jupyter Notebook session?

浪子不回头ぞ 提交于 2020-06-28 07:01:21
问题 I want to disable the randomization of Python's hash function. According to this thread (Unable to see or modify value of PYTHONHASHSEED through a module), setting PYTHONHASHSEED by setting os.environ['PYTHONHASHSEED'] at runtime does not work. How can I set PYTHONHASHSEED to a fixed value when I run Jupyter Notebook? 回答1: You can try to modify the kernel.json and add the line "env": {"PYTHONHASHSEED":"0"} . The file is located in your python-folder or virtual environment at: [venv|python

Tensorflow2 Tensorboard is not working in jupyter (static ip)

余生颓废 提交于 2020-06-28 06:07:45
问题 I Want to see it Tensorflow Graph and Weight using Tensorflow in Jupyter Notebook . But It is not working. I use Jupyter notebook on the remote server. %tensorboard --logdir logs %load_ext tensorboard it say it is too long to response at static ip. How can I solve it?! 回答1: Reading this Github issue, you can find that specifying the host manually when launching Tensorboard apparently does the trick. Instead of %tensorboard --logdir {logs_base_dir} Run %tensorboard --logdir {logs_base_dir} -

How to reload a jupyter notebook after a kernel restart?

让人想犯罪 __ 提交于 2020-06-28 05:03:16
问题 In a jupyter notebook I would like to define a function in python, which, when called, does the following: Gives out an alert to the user Restarts the notebook kernel Marks the executed cell as done (i.e. without a star, [ ] ) Focus is on the next cell Or as an alternative: Gives out an alert to the user Restarts the notebook kernel Clears all the output of the entire notebook Focus is on the first cell again (like a F5 reload of the browser tab). I have tried the following code from IPython

GraphLab installation when Python 2.7 is no longer supported

蓝咒 提交于 2020-06-27 16:59:46
问题 i need to install GraphLab in jupyter notebook to do a coursera project but all instructions that i found and my research in stackoverflow shows that it require python-2.x or now python-2.7 is no longer supported so what can i do ? 回答1: I faced the same issue. This is how I solved it. I hope it'll help you too. First, you need to open your anaconda navigator. Then Go to the Environment tab. Click create option Then provide a name for your environment and choose the appropriate python version.

Why is Pandas so madly fast? How to define such functions?

﹥>﹥吖頭↗ 提交于 2020-06-27 11:01:43
问题 I tried comparing the performance of Pandas and the traditional loop . I realized that with the same input and output , Pandas performed terribly fast calculations compared to the traditional loop. My code: #df_1h has been imported before import time n = 14 pd.options.display.max_columns = 8 display("df_1h's Shape {} rows x {} columns".format(df_1h.shape[0], df_1h.shape[1])) close = df_1h['close'] start = time.time() df_1h['sma_14_pandas'] = close.rolling(14).mean() end = time.time() display(

Combine 'toc' and 'hide input' when using nbconvert html export

允我心安 提交于 2020-06-27 09:07:50
问题 I would like to export my Jupyter notebook to html displaying the table of contents (toc2) AND hiding the input cells at the same time in the export. I use a template to hide the code (https://github.com/ihuston/jupyter-hide-code-html), which works fine for itself. For displaying the table of contents I run the command jupyter nbconvert --to html_toc FILE.ipynb , which works as well. As soon as I try to combine both by jupyter nbconvert --to html_toc --template HIDE_CELL FILE.ipynb , only

What does `exit` keyword do in Python3 with Jupyter Notebook?

◇◆丶佛笑我妖孽 提交于 2020-06-27 07:03:29
问题 I am currently using Python3 in Jupyter Notebook and I just ran into a keyword exit . What does this keyword do ? with open("some_file.txt") as f: for lines in f: print(lines) exit 回答1: The exit lines in your loop do nothing. Why they do nothing is a bit more complicated than the usual reason exit would do nothing in Python, though. Normally, exit on a line by its own wouldn't exit Python. At most, in interactive mode, it would print a message telling you how to quit Python (message

Tqdm 4.28.1 in Jupyter Notebook “IntProgress not found. Please update jupyter and ipywidgets.”

狂风中的少年 提交于 2020-06-27 06:46:10
问题 I am trying to use tqdm_notebook in my Python code, but I am running into this error import tqdm for i in tqdm.tqdm_notebook(range(2, int(total_number)//20):i ERROR: IntProgress not found. Please update jupyter and ipywidgets. ImportError: IntProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html I am using Python 3.7.1 and tqdm version (4.28.1) 回答1: This worked for me. conda install -c conda-forge ipywidgets jupyter

Error Running Jupyter Lab/Notebook and Most Conda Commands Following Update

元气小坏坏 提交于 2020-06-26 13:43:11
问题 After attempting to update conda packages, I am no longer able to start either Jupyter Notebook or Jupyter Lab. Most conda commands also result in an error in terminal. While each command results in a slightly different error, every one terminates in the following statement: ImportError: dlopen(/Users/USERNAME/anaconda3/lib/python3.7/lib-dynload/_ctypes.cpython-37m-darwin.so, 2): Library not loaded: @rpath/libffi.6.dylib Referenced from: /Users/USERNAME/anaconda3/lib/python3.7/lib-dynload/