ipython

IPython parallel on SGE cluster : Scikit-learn SVC parallel import causes engines to crash

你说的曾经没有我的故事 提交于 2019-12-12 03:44:50
问题 I use a SGE cluster with IPcontroller running on the head node, and ~50 engines running on the other nodes (submitted using QSUB). The engines are able to connect and register with the controller without any issues. I can also connect to the head node using SSH and view the engines IDs and running simple code. For e.g., this works perfectly well : %px %pylab inline parallel_result = lbView.map_sync(lambda x: x*rand(), range(32)) However, when I try to run the following line, then the engines

Error in Converting iPython Notebook file to PDF

家住魔仙堡 提交于 2019-12-12 03:44:50
问题 I am using linux and trying to convert .ipynb file to .pdf by following instructions from here but I am getting following error ipython nbconvert notebook_file.ipynb --to latex --post PDF but I am getting following error [NbConvertApp] Using existing profile dir: u'/home/user/.ipython/profile_default' Traceback (most recent call last): File "/usr/bin/ipython", line 5, in <module> start_ipython() File "/usr/lib/python2.7/dist-packages/IPython/__init__.py", line 120, in start_ipython return

ipython with MPI clustering using machinefile

邮差的信 提交于 2019-12-12 03:33:00
问题 I have successfully configured mpi with mpi4py support across three nodes, as per testing of the hellowworld.py script in the mpi4py demo directory: gms@host:~/development/mpi$ mpiexec -f machinefile -n 10 python ~/development/mpi4py/demo/helloworld.py Hello, World! I am process 3 of 10 on host. Hello, World! I am process 1 of 10 on worker1. Hello, World! I am process 6 of 10 on host. Hello, World! I am process 2 of 10 on worker2. Hello, World! I am process 4 of 10 on worker1. Hello, World! I

Run IPython in a script

早过忘川 提交于 2019-12-12 03:25:05
问题 I am trying to do some scripting with IPython, but I am finding that it behaves very differently in a script to when I run an interactive shell. For example, I can run the following interactively: In [1]: %profile default In [2]: ls / bin/ cdrom/ etc/ initrd.img@ lib/ lib64/ media/ opt/ root/ sbin/ sys/ usr/ vmlinuz@ boot/ dev/ home/ initrd.img.old@ lib32/ lost+found/ mnt/ proc/ run/ srv/ tmp/ var/ vmlinuz.old@ In [3]: mkdir tmpdir In [4]: cd tmpdir /home/alex/tmp/tmpdir No problem. However,

IPython MPI with a Machinefile

情到浓时终转凉″ 提交于 2019-12-12 02:57:16
问题 I want to use IPython's MPI abilities with distributed computing. Namely I would like MPI to be run with a machine file of sorts so I can add multiple machines. EDIT: I forgot to include my configuration. Configuration ~/.ipython/profile_default/ipcluster_config.py # The command line arguments to pass to mpiexec. c.MPILauncher.mpi_args = ["-machinefile ~/.ipython/profile_default/machinefile"] # The mpiexec command to use in starting the process. c.MPILauncher.mpi_cmd = ['mpiexec'] Bash

Pandas: create a conditional column and return a value based on the values of 2 columns in another df.groupby

我怕爱的太早我们不能终老 提交于 2019-12-12 02:53:17
问题 This question is an extension of another question but with a different approach. I have the following 2 dfs: (if someone can show me a more efficient way of creating the df below,instead of writing it out by hand, that would be great) yrs = pd.DataFrame({'years': [1950, 1951, 1952, 1953, 1954, 1955, \ 1956, 1957,1958,1959,1960,1961,1962,1963,1964,1965,1967,1968,1969,\ 1970,1971,1972,1973,1974,1975,1976,10977,1978,1979,1980,1981,1982,\ 1983,1984,1985,1986,1987,1988,1989,1990,1991,1992,1993

vim-ipython failed on Windows 7

心不动则不痛 提交于 2019-12-12 02:52:10
问题 I installed iPython by Anaconda on Windows 7. (There's no python installed previously). I can run ipython without problem. Then I installed vim-ipython plugin. In vim, when I run :IPython I got this: E492 Not an editor command. I checked vim version: :version +python/dyn I checked (in vim) :python import sys E370 Could not load python27.dll Run python on cmd: Python 2.7.5 |Anaconda 1.7.0 (64-bit)| (default, Jul 1 2013, 12:37:52) [MSC v.1500 64 bit (AMD64)] Could you please tell me what is

Jupyter webpages not displaying properly

孤街浪徒 提交于 2019-12-12 02:46:48
问题 Screen shot here. With Cntrl-Shift-I No matter how I install Jupyter(aka IPython) I get a dud webpage. It does not display tabs or menus as expected. The screen shot above is from a 64bit Windows Anaconda install. It was a default install. Install finished. No changes to configuration. First action after install was select IPython menu item in start menu. Now, trust me, I have tried everything. I have tried installing IPython from pip over top my python2.7 installation, anaconda etc. No

Why can't I import OpenCV (cv2) in IPython notebook?

自古美人都是妖i 提交于 2019-12-12 02:39:39
问题 Whenever I run import cv2 in an IPython notebook cell, I get an error screen with the message Kernel Restarting The kernel appears to have died. It will restart automatically. Then another dialog stating python quit unexpectedly. Does this mean I cannot run OpenCV in IPython? I cannot seem to find the solution to this anywhere by googling. Is there a solution to this problem? Platform: Mac OSX:10.9, IPython 4.0.3, Python 2.7.9 回答1: The slight variant of the solution to this post solved my

matplotlib slider not working when called from a function

你。 提交于 2019-12-12 02:25:25
问题 I have the following code, which shows a graph with a slinding bar from matplotlib.widgets import Slider import matplotlib.pyplot as plt from numpy import arange, sin, pi t = arange(0.0, 10.0, 0.01) fig =plt.figure(figsize = [30,20]) ax = plt.subplot(111) plt.plot(t, sin(t*10)) plt.ylim((-2,2)) plt.xlim((0,1)) plt.tight_layout() axzoom= plt.axes([0.15, 0.05, 0.65, 0.03]) szoom = Slider(axzoom, 'Window', 1, 2) def update(val): ax.set_xlim([val,val+1]) fig.canvas.draw_idle() szoom.on_changed