jupyter-notebook

how to load data to jupyter notebook VM from google cloud?

纵然是瞬间 提交于 2020-08-08 18:46:06
问题 I am trying to load a bunch of csv files stored on my google cloud into my jupyter notebook. I use python 3 and gsutil does not work. Lets's assume I have 6 .csv files in '\bucket1\1'. does anybody know what I should do? 回答1: You are running a Jupyter Notebook on a Google Cloud VM instance. And you want to load 6 .csv files (that you currently have on your Cloud Storage) into it. Install the dependencies: pip install google-cloud-storage pip install pandas Run the following script on your

jupyter-notebook, ImportError: cannot import name 'Type'

可紊 提交于 2020-08-07 05:53:38
问题 I am a Windows user, and I have installed Python 3.6 on my computer. In order to use Jupyter notebooks, I downloaded atom. I already installed ipython and pandas. After entering the command jupyter notebook on the command-line, my browser doesn't open jupyter notebook, instead I get the follow error message: [C:\Users\ELIDAD>jupyter notebook Traceback (most recent call last): File "c:\users\elidad\appdata\local\programs\python\python35\lib\runpy.py", line 170, in _run_module_as_main "__main__

Plotly: How to plot just month and day on x axis? (Ignore year)

你离开我真会死。 提交于 2020-08-05 07:48:15
问题 I am trying to plot timeseries data and would like the x axis to just be Month and Day. Plotly requires format to be yyyy-mm-dd , but I have daily averages from a data set over a few years, so I just want to plot mm-dd on the x axis. When I send a datetime that is just mm-dd it assumes the mm to be the year. Can I get it to bypass the year and only take mm-dd ? df_en_ave1.index = df_en_ave1.index.strftime('%m-%d') #convert my index to month and day datetime trace1=go.Scatter(x=df_en_ave1

Is there a simple way to plot vertical lines on scatter plots in plotly

痞子三分冷 提交于 2020-08-05 03:39:07
问题 I am trying to re-work some jupyter notebooks using plotly instead of matplotlib . My original function is def plot_power_spectrum(y): ps = np.abs(np.fft.fft(y - np.mean(y)))**2 time_step = 1.0/6 # hours freqs = np.fft.fftfreq(y.size, time_step) idx = np.argsort(freqs) plt.plot(freqs[idx], ps[idx]) plt.axvline(2*np.pi/168.0, color="magenta", alpha=0.4, lw=5) plt.axvline(-2*np.pi/168.0, color="magenta", alpha=0.4, lw=5) I can't see a simple way to add such vertical lines (or other markup) in

“RuntimeError: Found 0 files in subfolders of ”.. Error about subfolder in Pytorch

谁说胖子不能爱 提交于 2020-08-04 05:29:12
问题 I'm based on Window 10, Jupyter Notebook, Pytorch 1.0, Python 3.6.x currently. At first I confirm to the correct path of files using this code : print(os.listdir('./Dataset/images/')) . and I could check that this path is correct. but I met Error : RuntimeError: Found 0 files in subfolders of: ./Dataset/images/ Supported extensions are: .jpg,.jpeg,.png,.ppm,.bmp,.pgm,.tif" What is the matter? Could you suggest a solution? I tried to ./dataset/1/images like this method. but the result was same

“RuntimeError: Found 0 files in subfolders of ”.. Error about subfolder in Pytorch

人走茶凉 提交于 2020-08-04 05:29:11
问题 I'm based on Window 10, Jupyter Notebook, Pytorch 1.0, Python 3.6.x currently. At first I confirm to the correct path of files using this code : print(os.listdir('./Dataset/images/')) . and I could check that this path is correct. but I met Error : RuntimeError: Found 0 files in subfolders of: ./Dataset/images/ Supported extensions are: .jpg,.jpeg,.png,.ppm,.bmp,.pgm,.tif" What is the matter? Could you suggest a solution? I tried to ./dataset/1/images like this method. but the result was same

Able to open a specific jupyter notebook from command line but not able to execute

好久不见. 提交于 2020-08-03 09:39:09
问题 Am trying to open and execute .ipynb file from command line, i created a vb script for this. It is below. Set WinScriptHost = WScript.CreateObject("WScript.Shell") WinScriptHost.Run "C:\Users\vevek.seetharaman\AppData\Local\Continuum\anaconda3\Scripts\activate.bat & jupyter notebook C:\Users\vevek.seetharaman\Downloads\Notebooks\MouseMovements.ipynb --notebook-dir=C:\Users\vevek.seetharaman\Downloads\ScriptAutomation\Notebooks", 1 Set WinScriptHost = Nothing Mouse Movements.py is the name of

Error “Unable to open Jupyter Notebook: Port 8888 is already in use”

牧云@^-^@ 提交于 2020-08-02 04:21:57
问题 I am getting following error when I run Jupyter Notebook: (base) C:\Users\ramne>jupyter notebook [I 01:19:00.648 NotebookApp] The port 8888 is already in use, trying another port. And when I do netstat -ano | find Str "8888" , I get the following: C:\Users\ramne>netstat -ano | findStr "8888" TCP 127.0.0.1:8888 0.0.0.0:0 LISTENING 16024 TCP [::1]:8888 [::]:0 LISTENING 16024 I don't know what the default connection of port 8888 is or what its behavior should be like. How do I fix this error so

Error “Unable to open Jupyter Notebook: Port 8888 is already in use”

心已入冬 提交于 2020-08-02 04:20:54
问题 I am getting following error when I run Jupyter Notebook: (base) C:\Users\ramne>jupyter notebook [I 01:19:00.648 NotebookApp] The port 8888 is already in use, trying another port. And when I do netstat -ano | find Str "8888" , I get the following: C:\Users\ramne>netstat -ano | findStr "8888" TCP 127.0.0.1:8888 0.0.0.0:0 LISTENING 16024 TCP [::1]:8888 [::]:0 LISTENING 16024 I don't know what the default connection of port 8888 is or what its behavior should be like. How do I fix this error so

IPython Notebook: how to display() multiple objects without newline

北战南征 提交于 2020-08-01 09:44:45
问题 Currently when I use display() function in the IPython notebook I get newlines inserted between objects: >>> display('first line', 'second line') first line second line But I would like the print() function's behaviour where everything is kept on the same line, e.g.: >>> print("all on", "one line") all on one line Is there a method of changing display behaviour to do this? 回答1: No, display cannot prevent newlines, in part because there are no newlines to prevent. Each displayed object gets