jupyter-notebook

Jupyter Notebook's default page appears nothing [duplicate]

柔情痞子 提交于 2019-12-11 16:46:10
问题 This question already has an answer here : Jupyter Notebook Opening but no contents are visible (1 answer) Closed 9 months ago . I installed python 3.7.2 version and jupyter notebook with pip command. All programs and modules are successfully installed and enter the "jupyter notebook" into my folder's domain. And I copied the URLs and paste to my chrome browser. But, default pages didn't appear anything. How can I fix this problem? I need your help... 回答1: Please refer to https://github.com

How do I set parameters for each notebook on JuPyterHub running on K8s

倾然丶 夕夏残阳落幕 提交于 2019-12-11 15:57:43
问题 I want to set some parameters as defined here(https://github.com/nteract/papermill#python-version-support). The catch is, I want to be able to do this via UI. I have a JHub installed on my cluster and while opening it, I want certain parameters to be set by default. Also, when I pass the parameters via papermill(the above script gets saved somewhere and then I will run it via papermill), I want the latter to override the former. I tried looking into several topics in pure JuPyter notebooks

Turn off magic from jupyter notebook

旧时模样 提交于 2019-12-11 15:32:52
问题 I`m using jupyter notebook on a shared environment with multiple user, while magic is powerful it's actually a double edge sword, an irresponsible user can use commands to run linux command directly for example !ls /opt this command will allow you to list down all /opt directory !pip install <some package> will allow user to install package directly from jupyter notebook and many other magic command that has potential to change system How do I turn off several / all magic commands on jupyter

How to write html inside IPython Dialog box?

感情迁移 提交于 2019-12-11 15:18:59
问题 How can I write html as html (not as HTML String) inside IPython Dialog? For example: I have a Ipython UI Extension that shows a Dialog box require( ["base/js/dialog"], function(dialog) { dialog.modal({ title: 'Hello world', body: ?? , buttons: { 'schedule': {} } }); } ); Now inside body of the dialog box, I want to show following HTML content. <label>Quick Schedule</label><br /> <a class="btn btn-primary" onclick="schedule = '@reboot'; job_string();">Startup</a> <a class="btn btn-primary"

How to have file written automatically in the startup folder when a new user signs up/in on JuPyter hub?

时光怂恿深爱的人放手 提交于 2019-12-11 15:17:33
问题 I am using JuPyter hub on k8s. It has a persistent volume claim. I want to have my users use a variable run_id = "sample" every time they use jupyter notebook. Doing so requires making a file aviral.py in the path /home/jovyan/.ipython/profile_default/startup with the content run_id = "sample" . I have to do this manually and would want this to be done as soon as the new user's pod is created for the first time i.e. the file gets written there itself. Is there any way to automate this?

What could I do to build the 3D Bar Chart on my machine using Mayavi?

柔情痞子 提交于 2019-12-11 15:12:20
问题 Want to build a 3D Bar Chart using Mayavi (on my Asus Laptop Intel CoreTM i7-4510U CPU @ 2.00 GHz with 8 GBs de RAM, Windows 10) using a Jupyter Notebook (on a Python virtualenv) but I'm getting a grey screen. Once the data was imported, I clicked in New > Python 3 and wrote Used pandas' fast CSV parser, pandas.read_csv(), and once I ran line 4, I could see the memory usage increase to 88% of the capable using CleanMem Mini Monitor and got results in less than 1 minute. Then, to build the bar

KeyError: class 'numpy.object_' while downloading image dataset using imread

岁酱吖の 提交于 2019-12-11 15:10:43
问题 I am trying to download images from URLs using imread. After downloading about 700 images, I see KeyError: class 'numpy.object_' . I am really not familiar with numpy and Conda libraries. Any help would be appreciated for i in range(len(classes)): if not os.path.exists(saved_dirs[i]): os.mkdir() saved_dir = saved_dirs[i] for url in urls[i]: # print(url) img = io.imread(url) saved_path = os.path.join(saved_dir, url[-20:]) io.imsave(saved_path, img) Trigger URL: https://requestor-proxy.figure

Dynamic plot in python jupyter notebook using drawnow

早过忘川 提交于 2019-12-11 14:55:58
问题 I am trying to plot some data from a camera dynamically using drawnow. However, the dynamic plotting (using matplotlib and drawnow) doesn't seem to be working on jupyter notebook. It's currently working in Pycharm. My code: import matplotlib.pyplot as plt import numpy as np from drawnow import * x = np.random.randn(10, 2) def function_to_draw_figure(): plt.plot(i, j, 'r.') plt.ion() figure() for i, j in x: drawnow(function_to_draw_figure) plt.xlim(-1, 1) plt.ylim(-1, 1) plt.pause(0.5) I would

How to restore a deleted Jupyter notebook file

亡梦爱人 提交于 2019-12-11 14:41:07
问题 I accidentally deleted a jupyter notebook file on my Google Cloud instance. I wonder if there's anyway to restore/recover the file? 回答1: Thanks to this link, I found the solution. Files deleted in the browser should probably be in a Trash folder. In my case and on my Google Cloud instance, the deleted files were in the following path. cd ~/.local/share/Trash/files/ By using ls , list the files and see if your file is in this folder. If yes, then simply using the mv command you can move your

FileNotFoundError: [WinError 2] system can't find the file specified

Deadly 提交于 2019-12-11 14:25:49
问题 I used to load waveform file with librosa but failed I tried to check the kernel.jason file to fix it import librosa import matplotlib.pyplot as plt import numpy as np import librosa.display import IPython.display as ipd %matplotlib inline filepath = './audio_train/happy/' filename = filepath + '00334.wav' y, sr = librosa.load(filename, sr=None) FileNotFoundError: [WinError 2] The system cannot find the file specified. 回答1: i fix this problem by entering conda install -c conda-forge librosa