Vincent Davis | 23 Aug 03:09 2014
Picon

notebook does not run(execute code) after update to development version

I just updated to the development version of ipython and not ipython,
I followed the instructions on github. 
I am able to start ipython notebook and browse directories, open notebooks, create new notebooks. The notebooks open and show that they are busy, hitting shift-return enter a new line rather than executing the cell. Regular ipython works fine.
Help...

Here is what I get when I start ipython notebook
(py34)vincent <at> server4:~$ ipython notebook  --no-browser --port=5023
[I 20:03:20.616 NotebookApp] Using existing profile dir: '/home/vincent/.ipython/profile_default'
[I 20:03:20.700 NotebookApp] Using MathJax from CDN: https://cdn.mathjax.org/mathjax/latest/MathJax.js
[I 20:03:20.739 NotebookApp] Serving notebooks from local directory: /home/vincent
[I 20:03:20.739 NotebookApp] 0 active kernels
[I 20:03:20.739 NotebookApp] The IPython Notebook is running at: http://localhost:5023/

Here is just ipython
(py34)vincent <at> server4:~$ ipython
Python 3.4.1 |Anaconda 2.0.1 (64-bit)| (default, May 19 2014, 13:02:41)
Type "copyright", "credits" or "license" for more information.

Vincent Davis
720-301-3003
_______________________________________________
IPython-User mailing list
IPython-User <at> scipy.org
http://mail.scipy.org/mailman/listinfo/ipython-user
William Shipman | 9 Aug 18:20 2014
Picon

Using DirectView.execute to import modules on worker processes

I have looked through the documentation about importing modules on IPython Parallel worker processes, and it seems imports of the form "import foo as bar" are not supported.  However, I found that using DirectView.execute allows me to get around this.  Is this safe, if not what can go wrong?

Here's the code I'm using to import part of the dateutil library and :

    from IPython.parallel import Client
    ipython_client = Client()
    dview = ipython_client.direct_view()
    dview.execute('from dateutil import parser as dtparser')

I am only using on my local PC, not a cluster.  After executing the above I can happily run code that uses dtparser using dview.map_sync.  I can rewrite my code to avoid doing this but I'd like to know why I shouldn't use this method.

Thanks in advance.
_______________________________________________
IPython-User mailing list
IPython-User <at> scipy.org
http://mail.scipy.org/mailman/listinfo/ipython-user
Damien Garaud | 5 Aug 17:48 2014
Picon

Is there a way to upgrade IPython configuration files?

Hi there,

I'm trying to manage my IPython configuration & profiles in a Git repo at
this configuration on any computer (at home, at work, on a VM, etc.).

I know that:

   ipython profile create jazz

creates a few IPython configuration files at ~/.ipython/profile_jazz.

For now, I've three files generated by IPython:

- ipython_config.py
- ipython_notebook_config.py
- ipython_qtconsole_config.py

which are the same for my all profiles.

I wonder if there is a way to upgrade a IPython configuration file when there is
a new IPython version. I slightly modified the default IPy config files and I
would like to easily merge my future modifications with a new version of these
files.

Thanks,
Damien G.

_______________________________________________
IPython-User mailing list
IPython-User <at> scipy.org
http://mail.scipy.org/mailman/listinfo/ipython-user
Clare Sloggett | 3 Aug 14:11 2014
Picon

Moving content between Notebooks

Hi all,

I'm building some teaching content out of pre-existing teaching content. Is there any good way to copy cells from one notebook to another?

Right now I'm literally copy-pasting each individual cell's contents into the new cells. This feels like the wrong approach! It's extremely fiddly as the source content is a large number of small cells.

Even if the answer involves editing the JSON files, this would be better than what I'm currently doing. But my understanding is that that is something that's quite fragile, and discouraged?

Thanks for any help!

Clare
_______________________________________________
IPython-User mailing list
IPython-User <at> scipy.org
http://mail.scipy.org/mailman/listinfo/ipython-user
Mark Bakker | 30 Jul 23:00 2014
Picon

Re: IPython-User Digest, Vol 129, Issue 6




On Tue, Jul 29, 2014 at 11:19 PM, <ipython-user-request <at> scipy.org> wrote:
Send IPython-User mailing list submissions to
        ipython-user <at> scipy.org

To subscribe or unsubscribe via the World Wide Web, visit
        http://mail.scipy.org/mailman/listinfo/ipython-user
or, via email, send a message with subject or body 'help' to
        ipython-user-request <at> scipy.org

You can reach the person managing the list at
        ipython-user-owner <at> scipy.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of IPython-User digest..."


Today's Topics:

   1. Re: IPython Notebooks and Active Learning (Matthew        Brett)
      (Mark Bakker)
   2. Re: IPython Notebooks and Active Learning (Matthew        Brett)
      (Thomas Kluyver)
   3. Re: IPython Notebooks and Active Learning (Matthew        Brett)
      (Thomas Kluyver)
   4. Re: IPython Notebooks and Active Learning (Matthew        Brett)
      (Fernando Perez)
   5. Re: IPython Notebooks and Active Learning (Matthew        Brett)
      (Matthew Brett)
   6. check for value in list of columns (Vincent Davis)


----------------------------------------------------------------------

Message: 1
Date: Tue, 29 Jul 2014 22:50:39 +0200
From: Mark Bakker <markbak <at> gmail.com>
Subject: Re: [IPython-User] IPython Notebooks and Active Learning
        (Matthew        Brett)
To: ipython-user <at> scipy.org
Message-ID:
        <CAEX=yaaZ23V9cpBYdCMUnY8kttF_B4KNHfMPX9M99xr9+sytZw <at> mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

We have developed a series of 15 Notebooks for scientists and engineers who
want to use Python programming for exploratory computing, scipting, data
analysis, and visualization. No prior knowledge of computer programming is
assumed. Each Notebook covers a specific topic and includes a number of
exercises. The exercises should take less than 4 hours to complete for each
Notebook.

We have developed these Notebooks for an undergraduate class (sophomores)
in Civil Engineering. A short survey of the students taking the class (~270
of them) showed that the students really liked the class and learned a lot.

The Notebooks may be viewed at
http://mbakker7.github.io/exploratory_computing_with_python/
A link to the GitHub repository is also shown on this page.

Hope you find it useful,

Mark Bakker
TU Delft, The Netherlands
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/ipython-user/attachments/20140729/b531c35f/attachment-0001.html

------------------------------

Message: 2
Date: Tue, 29 Jul 2014 14:00:05 -0700
From: Thomas Kluyver <takowl <at> gmail.com>
Subject: Re: [IPython-User] IPython Notebooks and Active Learning
        (Matthew        Brett)
To: "Discussions about using IPython. http://ipython.org"
        <ipython-user <at> scipy.org>
Message-ID:
        <CAOvn4qh_riO5a4JgkBziZ4Hd+=x3EZj8NeGnTE47oVjzqZsg7w <at> mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

Thanks Mark, that looks very nice. Please do post this to the ipython-dev
list as well - we're gently deprecating the -user list to fold the two into
one.

Best wishes,
Thomas


On 29 July 2014 13:50, Mark Bakker <markbak <at> gmail.com> wrote:

> We have developed a series of 15 Notebooks for scientists and engineers
> who want to use Python programming for exploratory computing, scipting,
> data analysis, and visualization. No prior knowledge of computer
> programming is assumed. Each Notebook covers a specific topic and includes
> a number of exercises. The exercises should take less than 4 hours to
> complete for each Notebook.
>
> We have developed these Notebooks for an undergraduate class (sophomores)
> in Civil Engineering. A short survey of the students taking the class (~270
> of them) showed that the students really liked the class and learned a lot.
>
> The Notebooks may be viewed at
> http://mbakker7.github.io/exploratory_computing_with_python/
> A link to the GitHub repository is also shown on this page.
>
> Hope you find it useful,
>
> Mark Bakker
> TU Delft, The Netherlands
>
> _______________________________________________
> IPython-User mailing list
> IPython-User <at> scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-user
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/ipython-user/attachments/20140729/f7ab5c8c/attachment-0001.html

------------------------------

Message: 3
Date: Tue, 29 Jul 2014 14:00:34 -0700
From: Thomas Kluyver <takowl <at> gmail.com>
Subject: Re: [IPython-User] IPython Notebooks and Active Learning
        (Matthew        Brett)
To: "Discussions about using IPython. http://ipython.org"
        <ipython-user <at> scipy.org>
Message-ID:
        <CAOvn4qhOodiu=XD_eg7_5ny6SNZv_=0xcxwt0mmj5fpR2yggpA <at> mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

Nevermind, you already did.


On 29 July 2014 14:00, Thomas Kluyver <takowl <at> gmail.com> wrote:

> Thanks Mark, that looks very nice. Please do post this to the ipython-dev
> list as well - we're gently deprecating the -user list to fold the two into
> one.
>
> Best wishes,
> Thomas
>
>
> On 29 July 2014 13:50, Mark Bakker <markbak <at> gmail.com> wrote:
>
>> We have developed a series of 15 Notebooks for scientists and engineers
>> who want to use Python programming for exploratory computing, scipting,
>> data analysis, and visualization. No prior knowledge of computer
>> programming is assumed. Each Notebook covers a specific topic and includes
>> a number of exercises. The exercises should take less than 4 hours to
>> complete for each Notebook.
>>
>> We have developed these Notebooks for an undergraduate class (sophomores)
>> in Civil Engineering. A short survey of the students taking the class (~270
>> of them) showed that the students really liked the class and learned a lot.
>>
>> The Notebooks may be viewed at
>> http://mbakker7.github.io/exploratory_computing_with_python/
>> A link to the GitHub repository is also shown on this page.
>>
>> Hope you find it useful,
>>
>> Mark Bakker
>> TU Delft, The Netherlands
>>
>> _______________________________________________
>> IPython-User mailing list
>> IPython-User <at> scipy.org
>> http://mail.scipy.org/mailman/listinfo/ipython-user
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/ipython-user/attachments/20140729/5b3367d1/attachment-0001.html

------------------------------

Message: 4
Date: Tue, 29 Jul 2014 14:01:59 -0700
From: Fernando Perez <fperez.net <at> gmail.com>
Subject: Re: [IPython-User] IPython Notebooks and Active Learning
        (Matthew        Brett)
To: "Discussions about using IPython. http://ipython.org"
        <ipython-user <at> scipy.org>
Message-ID:
        <CAHAreOpcme-X3YvMwXaaJ5WLV2V31nu_0ncGXS=KS-8ru+a8vg <at> mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

These look great! Could I ask you to add them to the gallery in the
relevant section, along with any other relevant links for them?  They will
be more easily found that way in the future:

https://github.com/ipython/ipython/wiki/A-gallery-of-interesting-IPython-Notebooks#entire-books-or-other-large-collections-of-notebooks-on-a-topic

Cheers

f


On Tue, Jul 29, 2014 at 1:50 PM, Mark Bakker <markbak <at> gmail.com> wrote:

> We have developed a series of 15 Notebooks for scientists and engineers
> who want to use Python programming for exploratory computing, scipting,
> data analysis, and visualization. No prior knowledge of computer
> programming is assumed. Each Notebook covers a specific topic and includes
> a number of exercises. The exercises should take less than 4 hours to
> complete for each Notebook.
>
> We have developed these Notebooks for an undergraduate class (sophomores)
> in Civil Engineering. A short survey of the students taking the class (~270
> of them) showed that the students really liked the class and learned a lot.
>
> The Notebooks may be viewed at
> http://mbakker7.github.io/exploratory_computing_with_python/
> A link to the GitHub repository is also shown on this page.
>
> Hope you find it useful,
>
> Mark Bakker
> TU Delft, The Netherlands
>
> _______________________________________________
> IPython-User mailing list
> IPython-User <at> scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-user
>
>


--
Fernando Perez ( <at> fperez_org; http://fperez.org)
fperez.net-at-gmail: mailing lists only (I ignore this when swamped!)
fernando.perez-at-berkeley: contact me here for any direct mail
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/ipython-user/attachments/20140729/db6179f3/attachment-0001.html

------------------------------

Message: 5
Date: Tue, 29 Jul 2014 17:16:31 -0400
From: Matthew Brett <matthew.brett <at> gmail.com>
Subject: Re: [IPython-User] IPython Notebooks and Active Learning
        (Matthew        Brett)
To: "Discussions about using IPython. http://ipython.org"
        <ipython-user <at> scipy.org>, IPython Development list
        <ipython-dev <at> scipy.org>
Message-ID:
        <CAH6Pt5oU3nVgJt4uA6c3g0fXrAB5FW+bThm2bsXH8DDK-MZKAA <at> mail.gmail.com>
Content-Type: text/plain; charset=UTF-8

Hi,

On Tue, Jul 29, 2014 at 4:50 PM, Mark Bakker <markbak <at> gmail.com> wrote:
> We have developed a series of 15 Notebooks for scientists and engineers who
> want to use Python programming for exploratory computing, scipting, data
> analysis, and visualization. No prior knowledge of computer programming is
> assumed. Each Notebook covers a specific topic and includes a number of
> exercises. The exercises should take less than 4 hours to complete for each
> Notebook.
>
> We have developed these Notebooks for an undergraduate class (sophomores) in
> Civil Engineering. A short survey of the students taking the class (~270 of
> them) showed that the students really liked the class and learned a lot.
>
> The Notebooks may be viewed at
> http://mbakker7.github.io/exploratory_computing_with_python/
> A link to the GitHub repository is also shown on this page.

Thanks a lot for this.   From our feedback, our students liked the
notebooks too - e.g.

"I appreciate the downloadable iPython notebooks with explanations of
what the code is and does - will be a great reference"

I think there's really no question that the notebooks make running
code examples easier and clearer for the teacher and the student.  And
they are indeed a great reference.   The question always is - what do
we want to teach?  In some cases it's probably enough that the
students get the idea, and running / writing code in the notebooks
helps them get the idea.   But the students also implicitly learn that
this is the standard way of working with code, and I personally don't
think we should be teaching that.  So, for me at least, I am trying to
find a way to strike a balance between the ease of writing materials /
ease of getting students running code, and the need for teaching solid
working practice. For example, for the next iteration of our course,
I'm thinking of doing a flipped classroom format, with the tutorials
mostly in IPython notebooks, but doing the exercises in class using
text editor and terminal and git.  I'd also like to try and teach the
IPython notebook as a great tool for sharing and explaining a
workflow, or developing a tutorial.

Cheers,

Matthew


------------------------------

Message: 6
Date: Tue, 29 Jul 2014 15:32:16 -0600
From: Vincent Davis <vincent <at> vincentdavis.net>
Subject: [IPython-User] check for value in list of columns
To: ipython <ipython-user <at> scipy.org>
Message-ID:
        <CALyJZZVwRYT-xNhkLmAHRhGF3GKe2QyyMgAJt0WfvYjNzfnmWw <at> mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

I have data that looks like this
 VMONTH VDAYVYEAR MED1MED2 MED3MED4 MED5PATWT PATCODE 010 1593 6073524355
3384316475 999595686 11 1015 9310126 578917165 9000090000 956862 210 1593
578919675 3055390000 9000095686 33 1015 9360735 1786534495 9000090000 956864
410 1593 196755810 9000090000 9000095686 5

?I want to create a new bool column "med" that has True/False based on  ?60735
in the columns MED1...MED5
I am trying this and am not sure why it does not work.
DF['med'] = (60735 in [DF['MED1'], DF['MED1']])

ValueError: The truth value of a Series is ambiguous. Use a.empty,
a.bool(), a.item(), a.any() or a.all()


Vincent Davis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/ipython-user/attachments/20140729/77e6d649/attachment.html

------------------------------

_______________________________________________
IPython-User mailing list
IPython-User <at> scipy.org
http://mail.scipy.org/mailman/listinfo/ipython-user


End of IPython-User Digest, Vol 129, Issue 6
********************************************

_______________________________________________
IPython-User mailing list
IPython-User <at> scipy.org
http://mail.scipy.org/mailman/listinfo/ipython-user
Vincent Davis | 29 Jul 23:32 2014
Picon

check for value in list of columns

I have data that looks like this
VMONTH VDAYVYEAR MED1MED2 MED3MED4 MED5PATWT PATCODE 01 23 4
10 15 93 60735 24355 33843 16475 9995 95686 1
10 15 93 10126 5789 17165 90000 90000 95686 2
10 15 93 5789 19675 30553 90000 90000 95686 3
10 15 93 60735 17865 34495 90000 90000 95686 4
10 15 93 19675 5810 90000 90000 90000 95686 5

​I want to create a new bool column "med" that has True/False based on  ​60735 in the columns MED1...MED5
I am trying this and am not sure why it does not work.
DF['med'] = (60735 in [DF['MED1'], DF['MED1']])
ValueError: The truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all()
Vincent Davis

_______________________________________________
IPython-User mailing list
IPython-User <at> scipy.org
http://mail.scipy.org/mailman/listinfo/ipython-user
Brian E Chapman | 28 Jul 22:53 2014
Picon

IPython Notebooks and Active Learning

Hello,

We are developing a medical data science curriculum based on Python using Ipython notebooks as a key part of the curriculum. Is anyone aware of studies that have been done evaluating the Ipython notebooks in terms of how well they promote active learning by the students using them?

Thanks,

Brian
— 
Brian E. Chapman, Ph.D.
Associate Professor
Department of Radiology
University of Utah

_______________________________________________
IPython-User mailing list
IPython-User <at> scipy.org
http://mail.scipy.org/mailman/listinfo/ipython-user
minotaurs | 25 Jul 22:22 2014
Picon

Multiprocessing on existing iPython 2.7 code

Hey, is it possible to use multiple cores to do calculations on an existing
iPython 2.7 code? And if it is than how?

--
View this message in context: http://python.6.x6.nabble.com/Multiprocessing-on-existing-iPython-2-7-code-tp5065153.html
Sent from the IPython - User mailing list archive at Nabble.com.
klo uo | 25 Jul 01:39 2014
Picon

Embedding Qt widgets

Is it easily possible to embed Qt Widget inside IPython Qt console?

I would guess that it's not possible at all, and that I can only render html items, but anyway thought to ask.

_______________________________________________
IPython-User mailing list
IPython-User <at> scipy.org
http://mail.scipy.org/mailman/listinfo/ipython-user
Davide Lasagna | 4 Jul 16:39 2014
Picon

Persistent storage of cell computations

Hi all!

Have a question. Is there any built-in cell magic that gives sort of persistent storage for the computations in the cell itself? Basically, my notebooks tend to be split in computation and visualisation parts, and I would like some robust and built-in way to save computations between runs, something similar to what Joblib Memory class provides,just within IPython. I think It would be great to have it. How difficult is to program it, BTW? 

Also, Can you point me in the right spot in the docs where I can get a basic idea of the API for creating this sort of magic by myself? 

Thanks, 

Davide
_______________________________________________
IPython-User mailing list
IPython-User <at> scipy.org
http://mail.scipy.org/mailman/listinfo/ipython-user
Konrad Hinsen | 23 Jun 12:31 2014
Picon

"Connection failed" after updating to IPython 2.1

Hi everyone,

I just updated my Anaconda installation, which included an update from
IPython 2.0 to IPython 2.1. Since then, I cannot access my notebooks
with Firefox or Chrome any more ("connection failed"), though Safari
continues to work. Further system details: MacOS 10.9.3, Python 2.7.7,
and thanks to Anaconda all the dependencies should be up to date.

Since many packages were updated together with IPython, I did a test
install in a different (very plain) Python 2.7 installation, and
verified that it is indeed IPython 2.1 that makes the difference.

Does anyone have an idea what to do about this?

Konrad.

Gmane