ipython-notebook

How to post ipython notebook thread into Wordpress blog?

强颜欢笑 提交于 2019-12-21 17:22:02
问题 I know nbconvert and I am able to convert notebook file into html but I cannot find a way to embed this html file into wordpress. Is there anyone who tried and succeed? 回答1: We can solve this issue using Simple Mathjax Plugin. For that please follow the below steps: Install and Activate the plugin. Disable WordPress HTML code parsing(this is for displaying the images in the HTML output). Copy and paste the HTML output of nbconvert (content inside the <body> tag) in the Text tab. 来源: https:/

Kernel Error in R Notebook using Jupyter Notebook

不羁的心 提交于 2019-12-21 12:40:03
问题 I am trying to use R within the jupyter notebook. I went to my R shell and ran install.packages(c('rzmq','repr','IRkernel','IRdisplay'), repos = c('http://irkernel.github.io/', getOption('repos'))) IRkernel::installspec() Then I loaded up my ipython notebook and created a new notebook using the now available R extension. How ever when I access the notebook I run into this kernal error: Traceback (most recent call last): File "C:\Users\Nina Kate\Anaconda3\lib\site-packages\IPython\html\base

Customizing IPython notebook / Jupyter slide show

一笑奈何 提交于 2019-12-21 12:01:02
问题 I created a slideshow using the slideshow feature of IPython notebook / Jupyter, which works fine. I created and hosted the slides via ipython nbconvert ... which works fine too. But I cannot find any information how to customize the slides. Obviously I have to customize Reveal.js which is not very well documented too. Can somebody give a starting point on how to get some copyright, logo, ... in the header/footer of my presentation? 回答1: Reveal.js is really just a web template. If you want to

iPython Notebook/Jupyter autosave failed

怎甘沉沦 提交于 2019-12-21 06:46:51
问题 I am working in iPython 3/Jupyter running multiple kernels and servers. As such, i often forget to personally save things as I jump around a lot. The autosave has failed for the past 3 hours. The error says: "Last Checkpoint: 3 hours ago Autosave Failed! I try to manually File>>Save and Checkpoint, and nothing changes. Help! Next to my Python 2 kernel name, there is a yellow box that say forbidden instead of edit. It goes away when i click on it. I don't know if that has anything to do with

suppress section numberings in nbconvert to latex?

我的梦境 提交于 2019-12-21 05:40:55
问题 Is it possible with nbconvert --> latex --> PDF to suppress section numberings? Essentially I would like to keep the simple font size distinctions that the markdown header syntax (#, ##, etc.), and ipynb section headings provide (nbconvert --to latex appears to treat these same), and still use these to define section headings, but without the numberings. Then I also have the option of adding my own numbers manually. I can cope with losing some aspects of general latex document structuring and

ipython notebook: how to toggle header invisible by default

。_饼干妹妹 提交于 2019-12-21 04:48:21
问题 I want to save some space for my 14 inch screen. What should I write in e.g. ipython_notebook_config.py to trigger this? 回答1: If it doesn't already exist, create a file named custom.js in /Users/YOURUSERNAME/.ipython/profile_default/static/custom/ (You may have to run ipython profile create , if you have never run this command.) In custom.js , put the following lines of JavaScript $([IPython.events]).on("app_initialized.NotebookApp", function () { $('div#header').hide(); }); If you would like

Matplotlib animation not working in IPython Notebook (blank plot)

两盒软妹~` 提交于 2019-12-21 03:43:23
问题 I've tried multiple animation sample codes and cannot get any of them working. Here's a basic one I've tried from the Matplotlib documentation: """ A simple example of an animated plot """ import numpy as np import matplotlib.pyplot as plt import matplotlib.animation as animation fig, ax = plt.subplots() x = np.arange(0, 2*np.pi, 0.01) # x-array line, = ax.plot(x, np.sin(x)) def animate(i): line.set_ydata(np.sin(x+i/10.0)) # update the data return line, #Init only required for blitting to

Setting Yaxis in Matplotlib using Pandas

冷暖自知 提交于 2019-12-21 03:14:08
问题 Using Pandas to plot in I-Python Notebook, I have several plots and because Matplotlib decides the Y axis it is setting them differently and we need to compare that data using the same range. I have tried several variants on: (I assume I'll need to apply the limits to each plot.. but since I can't get one working... From the Matplotlib doc it seems that I need to set ylim, but can't figure the syntax to do so. df2250.plot(); plt.ylim((100000,500000)) <<<< if I insert the ; I get int not

Centering Text in IPython notebook markdown/heading cells?

允我心安 提交于 2019-12-21 03:09:16
问题 I want to customize my notebook, make it more readable and stylish. So for that, I want to start with centering my headers. Is it possible? 回答1: You can actually use the markdown mode for the cell and use the normal HTML code, as in <h1><center>Centered text!</center></h1> 回答2: Not directly with markdown i think, but you can just enter HTML in the markdown cells: <h3 align="center">This is a centered header</h3> 回答3: Knowing that in jupyter (ipython) notebook markdown cells the title level is

Why bmp image displayed as wrong color with plt.imshow of matplotlib on IPython-notebook?

陌路散爱 提交于 2019-12-21 03:03:33
问题 There is a bmp image just as shown the first picture bellow, and its information is list as the second picture bellow. But when display with plt.imshow() function of matplotlib on IPython-notebook, it has the wrong color, just as the third picture bellow. So can I know the reason? Thanks! The original file has shared at dropbox https://dl.dropboxusercontent.com/u/26518813/test2.bmp And the code to show image on IPython-notebook is: %pylab inline --no-import-all from PIL import Image plt