jupyter-notebook

Get Jupyter notebook name

孤人 提交于 2019-12-13 13:32:41
问题 I want to store currently running Jupyter notebook name in python variable. I create 2 cells from IPython.display import display,Javascript Javascript('IPython.notebook.kernel.execute("notebook_name = " + "\'"+IPython.notebook.notebook_name+"\'");') and notebook_name This works fine if I execute cells one after another, but I mostly execute cells with "run all cells" command, and in this case I get the error: NameError: name 'notebook_name' is not defined I get the same error if I unite

Changing Python Executable

我与影子孤独终老i 提交于 2019-12-13 13:08:14
问题 I'm pretty new to programming, and very new to doing so in a UNIX environment, so please bear with me. When I run import sys sys.executable in my Python 3 console, the output is usr\bin\python3 and I'm able to import whatever libraries I've installed with pip3, no problem. When I do so in my Jupyter Notebook running a Python 3 kernel, the output is usr\bin\python and the libraries that I've installed with pip3 are inaccessible to me. What can I do to fix it so Jupyter is executing Python from

Getting DLL error with 'jupyter lab' command in Anaconda Installation

柔情痞子 提交于 2019-12-13 12:40:15
问题 Getting DLL error with 'jupyter lab' command in Anaconda Installation: Details for system: conda 4.5.11 Python 3.7.0 jupyter 4.4.0 Height of weirdness is that I am able to launch jupyter lab from Anaconda Navigator, but ' jupyter lab ' is not working and throwing below exception: Traceback (most recent call last): File "c:\ml\installed_tools\anaconda3\lib\runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "c:\ml\installed_tools\anaconda3\lib\runpy.py", line 85, in _run

Can I autosave a running jupyter python notebook without having it open in a browser tab?

可紊 提交于 2019-12-13 11:59:07
问题 So I have a long-running python notebook. As long as it's open in my browser's tab, it's autosaving every 2 minutes, and life is good. Is it possible to keep it auto-saving even if I close the browser tab? The kernel already keeps running when I close the tab, which is great. This is kind of like "screen", but in jupyter EDIT: Even if I leave the tab open in my browser, I noticed that after 24 hours, the "kernel status" in the top right becomes "disconnected", even though the running cell

Google Cloud AI Platform Notebook Instance won't use GPU with Jupyter

和自甴很熟 提交于 2019-12-13 10:26:53
问题 I'm using the pre-built AI Platform Jupyter Notebook instances to train a model with a single Tesla K80 card. The issue is that I don't believe the model is actually training on the GPU. nvidia-smi returns the following during training: No Running Processes Found Not the "No Running Process Found" yet "Volatile GPU Usage" is 100%. Something seems strange... ...And the training is excruciatingly slow. A few days ago, I was having issues with the GPU not being released after each notebook run.

How can I merge CSV rows that have the same value in the first cell?

别说谁变了你拦得住时间么 提交于 2019-12-13 09:46:27
问题 This is the file: https://drive.google.com/file/d/0B5v-nJeoVouHc25wTGdqaDV1WW8/view?usp=sharing As you can see, there are duplicates in the first column, but if I were to combine the duplicate rows, no data would get overridden in the other columns. Is there any way I can combine the rows with duplicate values in the first column? For example, turn "1,A,A,," and "1,,,T,T" into "1,A,A,T,T". 回答1: Plain Python: import csv reader = csv.Reader(open('combined.csv')) result = {} for row in reader:

R is dead in Jupyter

人盡茶涼 提交于 2019-12-13 07:57:18
问题 I have instaled R in my jupyter through anaconda and It was working fine. Today I found this message when I opened R form Jupyter and I don't know what is the problem ? The kernel has died, and the automatic restart has failed. It is possible the kernel cannot be restarted. If you are not able to restart the kernel, you will still be able to save the notebook, but running code will no longer work until the notebook is reopened. I'm using Mac OSX 回答1: I had the same problem in Mac OSX when R

Import from python library on bluemix

☆樱花仙子☆ 提交于 2019-12-13 07:21:35
问题 I need to use the following imports in a Jupyter notebook on IBM Bluemix import swiftclient from keystoneclient import client If I were on my local workstation, I could use pip to install the libraries, but how do I do it on Bluemix? Another post suggests adding a requirements.txt file and a Procfile file into the root directory of my Python application, but I don't see how to do this with a notebook. Any suggestions? Here is the code: #!pip install --upgrade pip !pip install python

%AddJar for hellospark_2.10-1.0.jar giving Name: java.util.zip.ZipException Message: error in opening zip file

此生再无相见时 提交于 2019-12-13 06:45:40
问题 Using Bluemix (console.ng.bluemix.net) Spark notebook to run the above step. I am getting an exception error. This is my build (using standard procedure outlined with docs; used sbt). I tried bunch of others from publicly posted on github as well as jazz hub. All stop at this very first step, with an exception. I am unable to proceed further - this started at around this time yesterday (was not a problem previously). Thank you. 来源: https://stackoverflow.com/questions/36873865/addjar-for

Unable to deduce why one imagePuller pod of JuPyterhub fails while the rest three are successfully created

放肆的年华 提交于 2019-12-13 05:44:07
问题 I am deploying jupyterhub on a kubernetes cluster. In the config.yaml file, I am specifying a registry and the image tag. While 3 pods are successfully created, one is not. I could not find much content pertaining to jupyter-hub. The helm chart can be found here(https://jupyterhub.github.io/helm-chart/jupyterhub-0.8.2.tgz). My config for values.yaml is: proxy: secretToken: "some token" singleuser: image: name: acc_id.dkr.ecr.ap-south-1.amazonaws.com/demo tag: 12c lifecycleHooks: postStart: