ipython-notebook

Cheat sheet for caffe / pycaffe?

非 Y 不嫁゛ 提交于 2019-11-27 04:58:49
问题 Does anyone know whether there is a cheat sheet for all important pycaffe commands? I was so far using caffe only via Matlab interface and terminal + bash scripts. I wanted to shift towards using ipython and work through the ipython notebook examples. However I find it hard to get an overview of all the functions that are inside the caffe module for python. (I'm also quite new to python). 回答1: The pycaffe tests and this file are the main gateway to the python coding interface. First of all,

ipython notebook on linux VM running matplotlib interactive with nbagg

泪湿孤枕 提交于 2019-11-27 04:46:05
问题 I want buttons and other interactive matplotlib objects to appear from within my ipython notebook. Here is what I've done: Installed http://datasciencetoolbox.org, it is a vagrant box with ipython installed and version 1.3.1 of matplotlib. I needed to upgrade matplotlib to the latest version, because it has this capability to do inline interactive plots. What's new in Matplotlib 1.4.1 I needed to run sudo apt-get install pkg-config and sudo pip install matplotlib --upgrade in order to get

How to export an IPython notebook to HTML for a blog post?

六月ゝ 毕业季﹏ 提交于 2019-11-27 04:20:36
问题 What is the best way to get an ipython notebook into html format for use in a blog post? It is easy to turn an ipython notebook into a PDF, but I'd rather publish as an html notebook. I've found that if I download the notebook as a .ipynb file, then load it onto gist, then look at it with the ipython notebook viewer (nbviewer.ipython.org), THEN grab the html source, I can paste it into a blog post (or just load it as html anywhere) and it looks about right. However, if I use the "print view"

Simple way to measure cell execution time in ipython notebook

白昼怎懂夜的黑 提交于 2019-11-27 04:10:53
问题 I would like to get the time spent on the cell execution in addition to the original output from cell. To this end, I tried %%timeit -r1 -n1 but it doesn't expose the variable defined within cell. %%time works for cell which only contains 1 statement. In[1]: %%time 1 CPU times: user 4 µs, sys: 0 ns, total: 4 µs Wall time: 5.96 µs Out[1]: 1 In[2]: %%time # Notice there is no out result in this case. x = 1 x CPU times: user 3 µs, sys: 0 ns, total: 3 µs Wall time: 5.96 µs What's the best way to

IPython notebook won't read the configuration file

♀尐吖头ヾ 提交于 2019-11-27 03:14:15
问题 I used the following command to initialize a profile: ipython profile create myserver Added thses lines to ~/.ipython/profile_myserver/ipython_notebook_config.py : c = get_config() c.NotebookApp.ip = '*' c.NotebookApp.port = 8889 Tried starting the notebook with: ipython notebook --profile=myserver --debug It does not read the config file at all. This is the log output: [W 16:26:56.607 NotebookApp] Unrecognized alias: '--profile=myserver', it will probably have no effect. [D 16:26:56.609

Pandas: Setting no. of max rows

孤街醉人 提交于 2019-11-27 02:59:23
I have a problem viewing the following DataFrame : n = 100 foo = DataFrame(index=range(n)) foo['floats'] = np.random.randn(n) foo The problem is that it does not print all rows per default in ipython notebook, but I have to slice to view the resulting rows. Even the following option does not change the output: pd.set_option('display.max_rows', 500) Does anyone know how to display the whole array? Wouter Overmeire For version 0.11.0 you need to change both display.height and display.max_rows . pd.set_option('display.height', 500) pd.set_option('display.max_rows', 500) See also pd.describe

how to dynamically update a plot in a loop in ipython notebook (within one cell)

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-27 02:38:02
Environment: Python 2.7, matplotlib 1.3, IPython notebook 1.1, linux, chrome. The code is in one single input cell, using --pylab=inline I want to use IPython notebook and pandas to consume a stream and dynamically update a plot every 5 seconds. When I just use print statement to print the data in text format, it works perfectly fine: the output cell just keeps printing data and adding new rows. But when I try to plot the data (and then update it in a loop), the plot never show up in the output cell. But if I remove the loop, just plot it once. It works fine. Then I did some simple test: i =

IPython Notebook run all cells on open

↘锁芯ラ 提交于 2019-11-27 02:17:51
问题 I have an IPython noteboook and I'm trying to set it up in a way so that all cells are ran automatically when the notebook is opened. This behaviour is different from saved output for notebooks which contain widgets. Widgets only seem to get rendered for me when the cells containing them are run. Consider the following example: from IPython.display import display from IPython.html.widgets import IntSlider w = IntSlider() display(w) The slider is not displayed until the cell is executed. Is

IPython.parallel not using multicore?

馋奶兔 提交于 2019-11-27 02:17:11
问题 I am experimenting with IPython.parallel and just want to launch several shell command on different engines. I have the following Notebook: Cell 0: from IPython.parallel import Client client = Client() print len(client) 5 And launch the commands: Cell 1: %%px --targets 0 --noblock !python server.py Cell 2: %%px --targets 1 --noblock !python mincemeat.py 127.0.0.1 Cell 3: %%px --targets 2 --noblock !python mincemeat.py 127.0.0.1 What it does is it uses the mincemeat implementation of MapReduce

IPython (Jupyter) notebook producing ghost line in all equations

 ̄綄美尐妖づ 提交于 2019-11-27 02:06:01
问题 I installed IPython / Jupyter using pip on a new machine (Macbook Air with El Capitan). In a fairly simple notebook of mine (created with the same version of the whole stack) all equations, inline or not, suddenly have a vertical line on the right hand side; same height as the embedded image. This is the case even for a single inline symbol such as $x$ . I have no complicated macros or any weird LaTeX hacking going on. Does anybody know this? Here's a picture. 回答1: This is a change in Chrome,