ipython

ipython not reloading modules

不羁的心 提交于 2019-12-13 06:49:56
问题 I'm running IPython in an emacs shell using: ;; Set IPython interpreter in my init.el (defvar python-shell-interpreter "ipython") (defvar python-shell-interpreter-args "-i") Then: Start IPython with M-x run-python Run a program within IPython with %run myprog.py . myprog.py imports a module called mymodule . I make changes to mymodule but when I run %run myprog.py again, it runs the original mymodule , not the changed code. FWIW, I'm using emacs 24.5 prelude, on Windows 10 with Anaconda and

How to install python 3.2.3 on Windows 7 enterprise

冷暖自知 提交于 2019-12-13 05:53:41
问题 although I have been using python a long time very easily in a Linux environment, I have tremendous trouble to even install it correctly in a windows environment. I hope this is a question to be asked here, as it is not directly a programming question. Especially, I have the following problems: When on the command line, python is not a recognized command. Do I have to set the Windows path manually myself? If so, how to do that? When starting a python script, should this be done with python

Asynchronous evaluation in ipython parallel

☆樱花仙子☆ 提交于 2019-12-13 05:14:49
问题 Since the awesome 1.0.0 release I've been playing around with iPython parallel interface. What I'm trying to do is to set up a asynchronous stochastic gradient descent system. The way I see it, I want to send a function to all the nodes and get the results as they come out. From what I was able to implement and glance from the documentation the standard views implemented don't really support that. The get(timeout) method would do that, but you can't really loop through every entry in a <ASync

IPython engines returning different results

浪尽此生 提交于 2019-12-13 04:26:54
问题 Hopefully someone can enlighten me without me having to post a lot of confusing code. I am using IPython.parallel to process neural networks. In an attempt to find a bug I decided to send the same network out to each client with the same input data. I would expect to have each client return the same answer, which most of the time, it does. However sometimes I will get vastly different results from each client. here's just a sample of running the code 5 different times. Each time the code is

Segregating tweets by dates gives warning

偶尔善良 提交于 2019-12-13 04:12:44
问题 I am able to run a code, but there is a big paragraph of warning that comes below the cell in jupyter notebook. I am not able to make much sense out of it except the fact it creates a big distraction to my code. All I need a bit of tweaking help on my code so that whatever slight error it indicates can be weaned away. Please do not give me altogether new code because I am not a coding professional. My code is as follows: #segregating tweets2 based on dates. tweets2['date'] = pd.to_datetime

convert poly1d to string ipython

一个人想着一个人 提交于 2019-12-13 03:00:03
问题 I have a polynomial equation expressed as a poly1d object and want to take it and use it to label the scatter plot I'm making. Is there any to do this? %d doesn't work unless you specify only one element of the polynomial, such as below this works: polynomial = 1.211e-16 x^2 + 3.619e-16 x + 22.53 (as poly1d object) s = polynomial(0) print 'the polynomial is %d'%(s) but trying s = polynomial print 'the polynomial is %d'%(s) runs an error: %d format: a number is required, not poly1d any

IPython (Spyder) is very slow and often freezes running on Mac OS X 10.11

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-13 02:39:22
问题 I've just changed from MATLAB to Python and I'm rather disappointed. I've installed Spyder 2.3 for Python 2.7 via terminal on my early '15 MBP (just for you to get an idea about the hardware) with OS X El Capitan installed on it and the IPython console it is pretty slow. Running simple commands like numpy's np.arange() or sometimes even while calculating fundamental things just as 1+1 , it takes between several seconds and a minute and sometimes it even freezes for a couple of minutes. Since

dill dump_session with ipython

随声附和 提交于 2019-12-13 02:22:22
问题 I'm trying to use the dill module to save my ipython session using dump_session() but I'm getting an error message. I'm using Ipython 1.0.0 and dill 0.2-a-dev 20120503. Does anyone out there have any insight? Thanks in advance. Niall Here's the enormous traceback: --------------------------------------------------------------------------- AssertionError Traceback (most recent call last) <ipython-input-15-9934c16a537e> in <module>() ----> 1 dill.dump_session("/data/local/nrobin/tset.sess")

iPython Notebook Print Above Last Line

不想你离开。 提交于 2019-12-13 02:09:49
问题 I have a notebook that is going to print off hundreds of lines. Is there anyway to have the next line print above the last one? As in: Output_n ... Output 2 Output 1 Instead of: Output1 Output2 ... Output_n 回答1: Kind of! from IPython.display import clear_output , then calling clear_output() will clear everything. Then you reprint everything starting from Output_n. It's... not ideal. Here's a link. 来源: https://stackoverflow.com/questions/24439629/ipython-notebook-print-above-last-line

R magic for ipython notebook runtime error turning off device on new server installed with anaconda

人盡茶涼 提交于 2019-12-13 02:09:45
问题 I loved the R magic in ipython notebook. I had to switch to a new server and heard that a huge headache can be taken out by installing everything through anaconda. However, R magic doesn't seem to work, which is half the reason I use ipython notebook. After installing anaconda, I open a notebook and simply type the following. %load_ext rmagic %%R print("hi") This produces a Runtime error I can't get to the bottom of: --------------------------------------------------------------------------