jupyter-notebook

How to manually change the tick labels of the margin plots on a Seaborn jointplot

怎甘沉沦 提交于 2019-12-20 06:43:28
问题 I am trying to use a log scale as the margin plots for my seaborn jointplot. I am usings set_xticks() and set_yticks(), but my changes do not appear. Here is my code below and the resulting graph: import matplotlib.pyplot as plt %matplotlib inline import numpy as np import seaborn as sns import pandas as pd tips = sns.load_dataset('tips') female_waiters = tips[tips['sex']=='Female'] def graph_joint_histograms(df1): g=sns.jointplot(x = 'total_bill',y = 'tip', data = tips, space = 0.3,ratio = 3

Installed package on Anaconda not accessible in Jupyter Notebook

[亡魂溺海] 提交于 2019-12-20 06:28:42
问题 I installed Anaconda on an external drive inode/directory/0C707E95707E84EC . I opened Anaconda-Navigator to install r-aer in base(root). So far so good. Then I start Jupyter Notebook from inode/directory/0C707E95707E84EC and am unable to access the aer library. This all started last week. when I was unable to install aer and after a circus of affairs I finally ended up updating Anaconda and then having to delete and reinstall it. All I want to do is access aer on Jupyter Notebook. The image

How to apply Henze-Zirkler's Multivariate Normality Test in Jupyter notebook with rpy2

岁酱吖の 提交于 2019-12-20 05:47:27
问题 I am interested in Applying Henze-Zirkler's Multivariate Normality Test in python 3x and I was wondering if I may do so in python in Jupyter notebook. I have fitted a VAR model with my data and the then I would like to test whether the residuals from this fitted VAR model are normally distributed. How may I do so in Jupyter notebook using python? 回答1: This is another answer since I discover this method later. If you do not want to import the library of R into Python. One may call the output

How do I set matplotlib's DPI for every cell in Jupyter

时光总嘲笑我的痴心妄想 提交于 2019-12-20 05:31:21
问题 When I try to set the DPI for Matplotlib plots in Jupyter, it appears to be reset in every cell: The code: # In[1]: get_ipython().run_line_magic('matplotlib', 'inline') from matplotlib import pyplot print(pyplot.rcParams['figure.dpi']) pyplot.rcParams['figure.dpi'] = 150 print(pyplot.rcParams['figure.dpi']) # In[2]: print(pyplot.rcParams['figure.dpi']) How do I set a consistent DPI for plots throughout the entire notebook? This is using Jupyter 1.0.0, Matplotlib 3.0.1, Python 3.6 on Windows

I can open a jupyter notebook, but I cannot run the notebook with python script in it on my Mac

回眸只為那壹抹淺笑 提交于 2019-12-20 05:24:31
问题 I have been using jupyter as well as Atom with python for more than a year now. I'm currently using Python 3.7.2 on macOS 10.14. There is no problem running Python from the Terminal and here are the PATH I get after running sys.path : ['', '/Library/Frameworks/Python.framework/Versions/3.7/lib/python37.zip', '/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7', '/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/lib-dynload', '/Library/Frameworks/Python.framework

ignore markdown cells in `jupyter nbconvert` with `--to script`

女生的网名这么多〃 提交于 2019-12-20 04:22:54
问题 Is it possible to have jupyter nbconvert ... --to script ignore markdown cells rather than convert them to comments? I'm asking because I want to use flake8 to check the Python code that's generated but I don't want to include the markdown cells (for example, because they are often long lines, and I don't want flake8 to complain about them). 回答1: There is the command line argument PythonExporter.exclude_markdown that does what you want. To get a list of pep8 errors that just look at the code

Can I run my jupyter notebook that contains seaborn code on GPU?

六月ゝ 毕业季﹏ 提交于 2019-12-20 03:52:45
问题 I have CUDA compatible GPU (Nvidia GeForce 1060) in my system. While analyzing a bigger dataset, I often have to use pair plot function of the seaborn library, it consumes a lot of time. Is there a way I can run my entire notebook on GPU. I mean, apart from seaborn, I want to run all of my code on GPU, is it possible? I have watched a couple of videos on youtube that advises using numba python compiler and jit annotations, I want to know whether there is a generic setting that can be applied

Error while running a convolutional network using my own data in Tensorflow

柔情痞子 提交于 2019-12-20 03:28:08
问题 I´m a complete beginner in using Tensorflow and machine learning in general, so there are many concepts that I still don´t understand quite well, so sorry if my error is obvious. I´m trying to train my own convolutional network using my own images (optical microscopy photos) resized to 60x60, and I have only 2 labels to classify them (if the sample is positive or not). Here is my code: from __future__ import absolute_import from __future__ import division from __future__ import print_function

tensorflow gpu can not be called from jupyterhub/jupyter notebook, why?

倖福魔咒の 提交于 2019-12-20 02:07:22
问题 Well I figure eight hours is enough time trying to fix this on my own, so I'll just ask folks: I am running tensorflow-gpu 1.1.0 just fine in my virtual environment named 'tensorflow' outside of jupyterhub and Jupyter notebook. That is, I can import tensorflow and run scripts with it using the gpu. When I'm inside my tensorflow virtualenv and using jupyterhub, Jupyter can not seem to 'see' tensorflow. I get the following error: ImportError: libcublas.so.8.0: cannot open shared object file: No

How to convert an ipython notebook to html with collapsed output (and/or input)

蓝咒 提交于 2019-12-20 01:11:14
问题 I have an ipython notebook I'd like to share with colleagues who may not have ipython installed. So I converted it to html with : ipython nbconvert my_notebook.ipynb But my problem is that I have very long outputs which make the reading difficult, and I'd like to know whether it's possible to have the collapse or scroll option of the notebook viewer on the html version. Basically, I'd like this : output example But in the html version. Is this even possible ? Thanks for helping ! 回答1: I found