From thomas.robitaille at gmail.com  Thu Oct  1 08:13:04 2015
From: thomas.robitaille at gmail.com (Thomas Robitaille)
Date: Thu, 1 Oct 2015 14:13:04 +0200
Subject: [IPython-dev] ANN: numtraits v0.2
Message-ID: <CAGMHX_2CtWtU+wLEqqiObFaEM6WFMsTYCF5Cb3-4Oqmuou3rSQ@mail.gmail.com>

Hi everyone,

(I sent this to ipython-user but didn't realize it was deprecated, so
re-sending to this list)

We have released a small experimental package called numtraits that
builds on top of the traitlets package and provides a NumericalTrait
class that can be used to validate properties such as:

* number of dimension (for arrays)
* shape (for arrays)
* domain (e.g. positive, negative, range of values)
* units (with support for astropy.units, pint, and quantities)

The idea is to be able to write a class like:

    class Sphere(HasTraits):

        radius = NumericalTrait(domain='strictly-positive', ndim=0)
        position = NumericalTrait(shape=(3,))

and all the validation will then be done automatically when the user
sets 'radius' or 'position'.

In addition, tuples and lists can get automatically converted to
arrays, and default values can be specified. You can read more about
the package and see examples of it in use here:

  https://github.com/astrofrog/numtraits

and it can be easily installed with

  pip install numtraits

The package supports both Python 3.3+ and Legacy Python (2.7) :)

At this point, we would be very interested in feedback - the package
is still very young and we can still change the API if needed. Please
open issues with suggestions!

Cheers,

Tom and Francesco


From gijsmolenaar at gmail.com  Thu Oct  1 08:45:43 2015
From: gijsmolenaar at gmail.com (Gijs Molenaar)
Date: Thu, 1 Oct 2015 14:45:43 +0200
Subject: [IPython-dev] embedding js9 into a notebook
Message-ID: <CAFA9sd2Xrah0rzGXR=mZLNdo5BxpKZaPy9i2NAV=ABTssQTtYA@mail.gmail.com>

Hi all!  I'm trying to embed JS9 into a notebook, but I'm not successful
yet. I hope this is the right place to ask a question about this. JS9 is
the javascript version of DS9, an astronomical image viewer:

http://js9.si.edu/

You can find my initial work here:

https://github.com/gijzelaerr/js9notebook

I could not really find documentation on how to create such a thing. My
idea was to create a python package which you can pip and load, just like
bokeh works.  I see multiple ways you can inject javascript into the
browser from the python code, but I think using
IPython.core.displaypub.publish_display_data is probably best.

https://github.com/gijzelaerr/js9notebook/blob/master/js9notebook/__init__.py#L18

I was assuming reading the javascript file like this and then executing it
with publish_display_data would be the same as loading it with a script
tag, but I keep getting all kind of errors about objects not defined:

https://github.com/gijzelaerr/js9notebook/blob/master/example/js9notebook.ipynb

So basically I have two questions:

 * Is this the right way to do such a thing? I find it a bit hard to find
out where the problems are, isn't it possible to serve the javascript
somewhere static?
 * What am I doing wrong loading javascript this way?


Greetings,

-- 
Gijs Molenaar
http://pythonic.nl
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20151001/3e595216/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screenshot from 2015-10-01 14:24:47.png
Type: image/png
Size: 114223 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20151001/3e595216/attachment.png>

From nick.bollweg at gmail.com  Thu Oct  1 08:47:40 2015
From: nick.bollweg at gmail.com (Nicholas Bollweg)
Date: Thu, 01 Oct 2015 12:47:40 +0000
Subject: [IPython-dev] ANN: numtraits v0.2
In-Reply-To: <CAGMHX_2CtWtU+wLEqqiObFaEM6WFMsTYCF5Cb3-4Oqmuou3rSQ@mail.gmail.com>
References: <CAGMHX_2CtWtU+wLEqqiObFaEM6WFMsTYCF5Cb3-4Oqmuou3rSQ@mail.gmail.com>
Message-ID: <CACejjWyqzWpwG5qWV17vAmYCJxztoX-0QsfGt=3N=PL2yig3Xg@mail.gmail.com>

Really awesome! FurlongsPerHogsheadFloatSliders for everyone!

When using this with widgets in the notebook, i would desperately want the
units/shapes to be available on the frontend in math.js and (some matrix
library) wrappers, though I'm not sure how compatible their unit system is
with astropy's. Any thoughts about that?

We also use openmdao, and would love to be able to use their units
directly... Do you think that would be extensible?

On 08:13, Thu, Oct 1, 2015 Thomas Robitaille <thomas.robitaille at gmail.com>
wrote:

> Hi everyone,
>
> (I sent this to ipython-user but didn't realize it was deprecated, so
> re-sending to this list)
>
> We have released a small experimental package called numtraits that
> builds on top of the traitlets package and provides a NumericalTrait
> class that can be used to validate properties such as:
>
> * number of dimension (for arrays)
> * shape (for arrays)
> * domain (e.g. positive, negative, range of values)
> * units (with support for astropy.units, pint, and quantities)
>
> The idea is to be able to write a class like:
>
>     class Sphere(HasTraits):
>
>         radius = NumericalTrait(domain='strictly-positive', ndim=0)
>         position = NumericalTrait(shape=(3,))
>
> and all the validation will then be done automatically when the user
> sets 'radius' or 'position'.
>
> In addition, tuples and lists can get automatically converted to
> arrays, and default values can be specified. You can read more about
> the package and see examples of it in use here:
>
>   https://github.com/astrofrog/numtraits
>
> and it can be easily installed with
>
>   pip install numtraits
>
> The package supports both Python 3.3+ and Legacy Python (2.7) :)
>
> At this point, we would be very interested in feedback - the package
> is still very young and we can still change the API if needed. Please
> open issues with suggestions!
>
> Cheers,
>
> Tom and Francesco
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> https://mail.scipy.org/mailman/listinfo/ipython-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20151001/ac714f76/attachment.html>

From wes.turner at gmail.com  Thu Oct  1 09:04:45 2015
From: wes.turner at gmail.com (Wes Turner)
Date: Thu, 1 Oct 2015 08:04:45 -0500
Subject: [IPython-dev] ANN: numtraits v0.2
In-Reply-To: <CACfEFw9hXU1MhBFtHyHq6P-D7604tD9zML+NWSLVmHgzQgkutg@mail.gmail.com>
References: <CAGMHX_2CtWtU+wLEqqiObFaEM6WFMsTYCF5Cb3-4Oqmuou3rSQ@mail.gmail.com>
 <CACfEFw8YUEgOSJWN-nWLMzTe5ACpO6f=YAtv9XDhmXrpoR9zcA@mail.gmail.com>
 <CACfEFw9hXU1MhBFtHyHq6P-D7604tD9zML+NWSLVmHgzQgkutg@mail.gmail.com>
Message-ID: <CACfEFw94tPw_E0vwnb9mhQcqS6bzNnCNRxHWpHFLeKo-+x7vCA@mail.gmail.com>

"Numerical properties for Python objects"
https://github.com/astrofrog/numtraits /blob/master/README.md

at first glance, thanks!

other relevant type constraints work:

* https://andreacensi.github.io/contracts/
* http://mypy-lang.org/examples.html

* https://www.python.org/dev/peps/pep-0482/
  PEP 0482 -- Literature Overview for Type Hints
* https://www.python.org/dev/peps/pep-0484/
  PEP 0484 -- Type Hints
* XSD

other relevant units work:

* https://wrdrd.com/docs/consulting/units#rdf-and-units
* QUDT
  https://wrdrd.com/docs/consulting/knowledge-engineering#qudt

scipy pydata ecosystem support:

- how do I save this schema and these units (metadata) with the data? is
this compositional?
- [ ] .meta colspec w/ datatype URIs and unit URIs (pandasrdf#1)
- [ ] ...

looks great; thanks again!
On Oct 1, 2015 7:13 AM, "Thomas Robitaille" <thomas.robitaille at gmail.com>
wrote:

Hi everyone,

(I sent this to ipython-user but didn't realize it was deprecated, so
re-sending to this list)

We have released a small experimental package called numtraits that
builds on top of the traitlets package and provides a NumericalTrait
class that can be used to validate properties such as:

* number of dimension (for arrays)
* shape (for arrays)
* domain (e.g. positive, negative, range of values)
* units (with support for astropy.units, pint, and quantities)

The idea is to be able to write a class like:

    class Sphere(HasTraits):

        radius = NumericalTrait(domain='strictly-positive', ndim=0)
        position = NumericalTrait(shape=(3,))

and all the validation will then be done automatically when the user
sets 'radius' or 'position'.

In addition, tuples and lists can get automatically converted to
arrays, and default values can be specified. You can read more about
the package and see examples of it in use here:

  https://github.com/astrofrog/numtraits

and it can be easily installed with

  pip install numtraits

The package supports both Python 3.3+ and Legacy Python (2.7) :)

At this point, we would be very interested in feedback - the package
is still very young and we can still change the API if needed. Please
open issues with suggestions!

Cheers,

Tom and Francesco
_______________________________________________
IPython-dev mailing list
IPython-dev at scipy.org
https://mail.scipy.org/mailman/listinfo/ipython-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20151001/cc2e32f3/attachment.html>

From kikocorreoso at gmail.com  Thu Oct  1 09:08:26 2015
From: kikocorreoso at gmail.com (Kiko)
Date: Thu, 1 Oct 2015 15:08:26 +0200
Subject: [IPython-dev] embedding js9 into a notebook
In-Reply-To: <CAFA9sd2Xrah0rzGXR=mZLNdo5BxpKZaPy9i2NAV=ABTssQTtYA@mail.gmail.com>
References: <CAFA9sd2Xrah0rzGXR=mZLNdo5BxpKZaPy9i2NAV=ABTssQTtYA@mail.gmail.com>
Message-ID: <CAB-sx63CPtnvk-QYBVmxgwspFG5+BrHkbvskZN7_8AdoTSpqwA@mail.gmail.com>

2015-10-01 14:45 GMT+02:00 Gijs Molenaar <gijsmolenaar at gmail.com>:

> Hi all!  I'm trying to embed JS9 into a notebook, but I'm not successful
> yet. I hope this is the right place to ask a question about this. JS9 is
> the javascript version of DS9, an astronomical image viewer:
>
> http://js9.si.edu/
>
> You can find my initial work here:
>
> https://github.com/gijzelaerr/js9notebook
>
> I could not really find documentation on how to create such a thing. My
> idea was to create a python package which you can pip and load, just like
> bokeh works.  I see multiple ways you can inject javascript into the
> browser from the python code, but I think using
> IPython.core.displaypub.publish_display_data is probably best.
>
>
> https://github.com/gijzelaerr/js9notebook/blob/master/js9notebook/__init__.py#L18
>
> I was assuming reading the javascript file like this and then executing it
> with publish_display_data would be the same as loading it with a script
> tag, but I keep getting all kind of errors about objects not defined:
>
>
> https://github.com/gijzelaerr/js9notebook/blob/master/example/js9notebook.ipynb
>
> So basically I have two questions:
>
>  * Is this the right way to do such a thing? I find it a bit hard to find
> out where the problems are, isn't it possible to serve the javascript
> somewhere static?
>  * What am I doing wrong loading javascript this way?
>
>
> Greetings,
>

Hi,

Maybe the following links can help you to find the path:

https://github.com/jdfreder/jupyter-pip
https://github.com/ipython-contrib/IPython-notebook-extensions/wiki/Home_Jupyter

If you are successfull and you have time it would be great to document it.

:-D


> --
> Gijs Molenaar
> http://pythonic.nl
>
>
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> https://mail.scipy.org/mailman/listinfo/ipython-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20151001/8164d4a3/attachment.html>

From wes.turner at gmail.com  Thu Oct  1 09:15:23 2015
From: wes.turner at gmail.com (Wes Turner)
Date: Thu, 1 Oct 2015 08:15:23 -0500
Subject: [IPython-dev] embedding js9 into a notebook
In-Reply-To: <CAB-sx63CPtnvk-QYBVmxgwspFG5+BrHkbvskZN7_8AdoTSpqwA@mail.gmail.com>
References: <CAFA9sd2Xrah0rzGXR=mZLNdo5BxpKZaPy9i2NAV=ABTssQTtYA@mail.gmail.com>
 <CAB-sx63CPtnvk-QYBVmxgwspFG5+BrHkbvskZN7_8AdoTSpqwA@mail.gmail.com>
Message-ID: <CACfEFw_pUXa3Q9iPeya4_AnnLHCTcy_5K4=C9Ev0ZDqotV6jMQ@mail.gmail.com>

On Oct 1, 2015 8:08 AM, "Kiko" <kikocorreoso at gmail.com> wrote:
>
>
>
> 2015-10-01 14:45 GMT+02:00 Gijs Molenaar <gijsmolenaar at gmail.com>:
>>
>> Hi all!  I'm trying to embed JS9 into a notebook, but I'm not successful
yet. I hope this is the right place to ask a question about this. JS9 is
the javascript version of DS9, an astronomical image viewer:
>>
>> http://js9.si.edu/
>>
>> You can find my initial work here:
>>
>> https://github.com/gijzelaerr/js9notebook
>>
>> I could not really find documentation on how to create such a thing. My
idea was to create a python package which you can pip and load, just like
bokeh works.  I see multiple ways you can inject javascript into the
browser from the python code, but I think using
IPython.core.displaypub.publish_display_data is probably best.
>>
>>
https://github.com/gijzelaerr/js9notebook/blob/master/js9notebook/__init__.py#L18
>>
>> I was assuming reading the javascript file like this and then executing
it with publish_display_data would be the same as loading it with a script
tag, but I keep getting all kind of errors about objects not defined:
>>
>>
https://github.com/gijzelaerr/js9notebook/blob/master/example/js9notebook.ipynb
>>
>> So basically I have two questions:
>>
>>  * Is this the right way to do such a thing? I find it a bit hard to
find out where the problems are, isn't it possible to serve the javascript
somewhere static?
>>  * What am I doing wrong loading javascript this way?
>>
>>
>> Greetings,
>
>
> Hi,
>
> Maybe the following links can help you to find the path:
>
> https://github.com/jdfreder/jupyter-pip
>
https://github.com/ipython-contrib/IPython-notebook-extensions/wiki/Home_Jupyter
>
> If you are successfull and you have time it would be great to document it.

is this similar to the pattern your are looking for?
https://github.com/ricklupton/ipython-d3-sankey/blob/master/setup.py

>
> :-D
>
>>
>> --
>> Gijs Molenaar
>> http://pythonic.nl
>>
>>
>> _______________________________________________
>> IPython-dev mailing list
>> IPython-dev at scipy.org
>> https://mail.scipy.org/mailman/listinfo/ipython-dev
>>
>
>
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> https://mail.scipy.org/mailman/listinfo/ipython-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20151001/b9911ca5/attachment.html>

From gijsmolenaar at gmail.com  Thu Oct  1 09:16:04 2015
From: gijsmolenaar at gmail.com (Gijs Molenaar)
Date: Thu, 1 Oct 2015 15:16:04 +0200
Subject: [IPython-dev] embedding js9 into a notebook
In-Reply-To: <CAB-sx63CPtnvk-QYBVmxgwspFG5+BrHkbvskZN7_8AdoTSpqwA@mail.gmail.com>
References: <CAFA9sd2Xrah0rzGXR=mZLNdo5BxpKZaPy9i2NAV=ABTssQTtYA@mail.gmail.com>
 <CAB-sx63CPtnvk-QYBVmxgwspFG5+BrHkbvskZN7_8AdoTSpqwA@mail.gmail.com>
Message-ID: <CAFA9sd3tDvnNneT5j10=UWhEjYhZzrjrvOGYdZoSKYp15-0OPA@mail.gmail.com>

Hi Kiko,

I was looking into extensions, but wasn't sure if that was the right way to
go. As far is I know for example bokeh is not an extension. Also as far as
I know one needs to manually enable an extension to use them. Please
correct me if i'm wrong.

greetings,

 - Gijs

2015-10-01 15:08 GMT+02:00 Kiko <kikocorreoso at gmail.com>:

>
>
> 2015-10-01 14:45 GMT+02:00 Gijs Molenaar <gijsmolenaar at gmail.com>:
>
>> Hi all!  I'm trying to embed JS9 into a notebook, but I'm not successful
>> yet. I hope this is the right place to ask a question about this. JS9 is
>> the javascript version of DS9, an astronomical image viewer:
>>
>> http://js9.si.edu/
>>
>> You can find my initial work here:
>>
>> https://github.com/gijzelaerr/js9notebook
>>
>> I could not really find documentation on how to create such a thing. My
>> idea was to create a python package which you can pip and load, just like
>> bokeh works.  I see multiple ways you can inject javascript into the
>> browser from the python code, but I think using
>> IPython.core.displaypub.publish_display_data is probably best.
>>
>>
>> https://github.com/gijzelaerr/js9notebook/blob/master/js9notebook/__init__.py#L18
>>
>> I was assuming reading the javascript file like this and then executing
>> it with publish_display_data would be the same as loading it with a script
>> tag, but I keep getting all kind of errors about objects not defined:
>>
>>
>> https://github.com/gijzelaerr/js9notebook/blob/master/example/js9notebook.ipynb
>>
>> So basically I have two questions:
>>
>>  * Is this the right way to do such a thing? I find it a bit hard to find
>> out where the problems are, isn't it possible to serve the javascript
>> somewhere static?
>>  * What am I doing wrong loading javascript this way?
>>
>>
>> Greetings,
>>
>
> Hi,
>
> Maybe the following links can help you to find the path:
>
> https://github.com/jdfreder/jupyter-pip
>
> https://github.com/ipython-contrib/IPython-notebook-extensions/wiki/Home_Jupyter
>
> If you are successfull and you have time it would be great to document it.
>
> :-D
>
>
>> --
>> Gijs Molenaar
>> http://pythonic.nl
>>
>>
>> _______________________________________________
>> IPython-dev mailing list
>> IPython-dev at scipy.org
>> https://mail.scipy.org/mailman/listinfo/ipython-dev
>>
>>
>
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> https://mail.scipy.org/mailman/listinfo/ipython-dev
>
>


-- 
Gijs Molenaar
http://pythonic.nl
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20151001/b6bfff9a/attachment.html>

From kikocorreoso at gmail.com  Thu Oct  1 09:37:44 2015
From: kikocorreoso at gmail.com (Kiko)
Date: Thu, 1 Oct 2015 15:37:44 +0200
Subject: [IPython-dev] embedding js9 into a notebook
In-Reply-To: <CAFA9sd3tDvnNneT5j10=UWhEjYhZzrjrvOGYdZoSKYp15-0OPA@mail.gmail.com>
References: <CAFA9sd2Xrah0rzGXR=mZLNdo5BxpKZaPy9i2NAV=ABTssQTtYA@mail.gmail.com>
 <CAB-sx63CPtnvk-QYBVmxgwspFG5+BrHkbvskZN7_8AdoTSpqwA@mail.gmail.com>
 <CAFA9sd3tDvnNneT5j10=UWhEjYhZzrjrvOGYdZoSKYp15-0OPA@mail.gmail.com>
Message-ID: <CAB-sx60ydPcgx0AKK=TQbagN0J0yCVyf-4DnK8iGuzpOF+LKRg@mail.gmail.com>

2015-10-01 15:16 GMT+02:00 Gijs Molenaar <gijsmolenaar at gmail.com>:

> Hi Kiko,
>
> one needs to manually enable an extension to use them
>

Like a library ;-)

There are libraries that have a notebook mode.

See, for instance, the approach made by this library:
https://github.com/quantopian/qgrid#how-it-works
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20151001/0ab61c46/attachment.html>

From nick.bollweg at gmail.com  Thu Oct  1 13:57:39 2015
From: nick.bollweg at gmail.com (Nicholas Bollweg)
Date: Thu, 01 Oct 2015 17:57:39 +0000
Subject: [IPython-dev] ANN: numtraits v0.2
In-Reply-To: <CACejjWyqzWpwG5qWV17vAmYCJxztoX-0QsfGt=3N=PL2yig3Xg@mail.gmail.com>
References: <CAGMHX_2CtWtU+wLEqqiObFaEM6WFMsTYCF5Cb3-4Oqmuou3rSQ@mail.gmail.com>
 <CACejjWyqzWpwG5qWV17vAmYCJxztoX-0QsfGt=3N=PL2yig3Xg@mail.gmail.com>
Message-ID: <CACejjWzpZ4K221HVn53pv8nuAFBXy8nLBOxTeSUFK8+h0YO3Dw@mail.gmail.com>

To answer my own questions:
NumericalTrait doesn't yet work with ipywidgets. But it probably could!

We made an example that uses a passthrough traitlet:
http://nbviewer.ipython.org/gist/anonymous/0358c8fee545f6ab5853

Everything works pretty well, with two sliders exposing the same value,
automatically handling the translation. Nice!

The javascript side is a bit ugly, as there isn't a ton of resources for
potentially complex forms. As it is, quantities
<https://github.com/gentooboontoo/js-quantities> is the best option.

It also looks like openmdao units would be possible, but it's all pretty
baked in... perhaps this is an opportunity for entry_points?

As an aside, we tried to put that gist up as a binder, but ran into some
issues... i'll raise them appropriately!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20151001/397eb6b8/attachment.html>

From wes.turner at gmail.com  Thu Oct  1 17:52:56 2015
From: wes.turner at gmail.com (Wes Turner)
Date: Thu, 1 Oct 2015 16:52:56 -0500
Subject: [IPython-dev] ANN: numtraits v0.2
In-Reply-To: <CACejjWzpZ4K221HVn53pv8nuAFBXy8nLBOxTeSUFK8+h0YO3Dw@mail.gmail.com>
References: <CAGMHX_2CtWtU+wLEqqiObFaEM6WFMsTYCF5Cb3-4Oqmuou3rSQ@mail.gmail.com>
 <CACejjWyqzWpwG5qWV17vAmYCJxztoX-0QsfGt=3N=PL2yig3Xg@mail.gmail.com>
 <CACejjWzpZ4K221HVn53pv8nuAFBXy8nLBOxTeSUFK8+h0YO3Dw@mail.gmail.com>
Message-ID: <CACfEFw-ojgC51yT2DvNo2QkzaA+9nSdOFirJYi1_JLe1ERqSoQ@mail.gmail.com>

On Thu, Oct 1, 2015 at 12:57 PM, Nicholas Bollweg <nick.bollweg at gmail.com>
wrote:

> To answer my own questions:
> NumericalTrait doesn't yet work with ipywidgets. But it probably could!
>
> We made an example that uses a passthrough traitlet:
> http://nbviewer.ipython.org/gist/anonymous/0358c8fee545f6ab5853
>
> Everything works pretty well, with two sliders exposing the same value,
> automatically handling the translation. Nice!
>
> The javascript side is a bit ugly, as there isn't a ton of resources for
> potentially complex forms. As it is, quantities
> <https://github.com/gentooboontoo/js-quantities> is the best option.
>

- NumPy Support: https://pint.readthedocs.org/en/0.6/numpy.html
-

Would [CSVW (csv2json, csv2rdf)] JSON-LD with e.g. QUDT be the most
flexible option
for working with javascript <> [python] data
with Jupyter widgets?

- CSVW: https://w3c.github.io/csvw/
- JSON-LD: http://json-ld.org/
- QUDT: http://lov.okfn.org/dataset/lov/vocabs/qudt



>
> It also looks like openmdao units would be possible, but it's all pretty
> baked in... perhaps this is an opportunity for entry_points?
>
> As an aside, we tried to put that gist up as a binder, but ran into some
> issues... i'll raise them appropriately!
>
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> https://mail.scipy.org/mailman/listinfo/ipython-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20151001/36daacdf/attachment.html>

From wes.turner at gmail.com  Thu Oct  1 17:55:08 2015
From: wes.turner at gmail.com (Wes Turner)
Date: Thu, 1 Oct 2015 16:55:08 -0500
Subject: [IPython-dev] ANN: numtraits v0.2
In-Reply-To: <CACejjWzpZ4K221HVn53pv8nuAFBXy8nLBOxTeSUFK8+h0YO3Dw@mail.gmail.com>
References: <CAGMHX_2CtWtU+wLEqqiObFaEM6WFMsTYCF5Cb3-4Oqmuou3rSQ@mail.gmail.com>
 <CACejjWyqzWpwG5qWV17vAmYCJxztoX-0QsfGt=3N=PL2yig3Xg@mail.gmail.com>
 <CACejjWzpZ4K221HVn53pv8nuAFBXy8nLBOxTeSUFK8+h0YO3Dw@mail.gmail.com>
Message-ID: <CACfEFw8B4295V00sh_20xoe_BupXrXwnKACuU9g7B-hNBfDoUw@mail.gmail.com>

On Thu, Oct 1, 2015 at 12:57 PM, Nicholas Bollweg <nick.bollweg at gmail.com>
wrote:

> To answer my own questions:
> NumericalTrait doesn't yet work with ipywidgets. But it probably could!
>

- [ ] ENH: ipywidget support
- [ ] ENH: _repr_json_, _repr_html_, _repr_latex_

https://github.com/jrjohansson/version_information/blob/master/version_information/version_information.py


>
> We made an example that uses a passthrough traitlet:
> http://nbviewer.ipython.org/gist/anonymous/0358c8fee545f6ab5853
>
> Everything works pretty well, with two sliders exposing the same value,
> automatically handling the translation. Nice!
>
> The javascript side is a bit ugly, as there isn't a ton of resources for
> potentially complex forms. As it is, quantities
> <https://github.com/gentooboontoo/js-quantities> is the best option.
>
> It also looks like openmdao units would be possible, but it's all pretty
> baked in... perhaps this is an opportunity for entry_points?
>
> As an aside, we tried to put that gist up as a binder, but ran into some
> issues... i'll raise them appropriately!
>
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> https://mail.scipy.org/mailman/listinfo/ipython-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20151001/f65166ee/attachment.html>

From gijsmolenaar at gmail.com  Fri Oct  2 08:08:52 2015
From: gijsmolenaar at gmail.com (Gijs Molenaar)
Date: Fri, 2 Oct 2015 14:08:52 +0200
Subject: [IPython-dev] embedding js9 into a notebook
In-Reply-To: <CAB-sx60ydPcgx0AKK=TQbagN0J0yCVyf-4DnK8iGuzpOF+LKRg@mail.gmail.com>
References: <CAFA9sd2Xrah0rzGXR=mZLNdo5BxpKZaPy9i2NAV=ABTssQTtYA@mail.gmail.com>
 <CAB-sx63CPtnvk-QYBVmxgwspFG5+BrHkbvskZN7_8AdoTSpqwA@mail.gmail.com>
 <CAFA9sd3tDvnNneT5j10=UWhEjYhZzrjrvOGYdZoSKYp15-0OPA@mail.gmail.com>
 <CAB-sx60ydPcgx0AKK=TQbagN0J0yCVyf-4DnK8iGuzpOF+LKRg@mail.gmail.com>
Message-ID: <CAFA9sd2RktiCwAX39ekYLPvrVmVgZ5wgN=YbSnUmQmeiV6xfWg@mail.gmail.com>

Thanks for the answers!

 I'm still trying to get my head around this, but I still don't fully
understand the advantage of having an extension. The only advantage I see
is that you can serve static files that you copied from outside the
webserver tree?

Also, I would say having a Python module is more intuitive as an API than
having magic functions installing files into your IPython configuration.
But that is maybe preference.

meanwhile I'm understanding my problems a bit better now. Basically
publish_display_data
pushes the javascript code to the browser where it is put into eval(). This
works for most javascript code, but not for fabricjs. I posted a question
about that on the fabric mailinglist:

https://groups.google.com/forum/#!topic/fabricjs/W09fEtKopkk



2015-10-01 15:37 GMT+02:00 Kiko <kikocorreoso at gmail.com>:

>
>
> 2015-10-01 15:16 GMT+02:00 Gijs Molenaar <gijsmolenaar at gmail.com>:
>
>> Hi Kiko,
>>
>> one needs to manually enable an extension to use them
>>
>
> Like a library ;-)
>
> There are libraries that have a notebook mode.
>
> See, for instance, the approach made by this library:
> https://github.com/quantopian/qgrid#how-it-works
>
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> https://mail.scipy.org/mailman/listinfo/ipython-dev
>
>


-- 
Gijs Molenaar
http://pythonic.nl
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20151002/2ab538d5/attachment.html>

From nick.bollweg at gmail.com  Fri Oct  2 10:24:18 2015
From: nick.bollweg at gmail.com (Nicholas Bollweg)
Date: Fri, 02 Oct 2015 14:24:18 +0000
Subject: [IPython-dev] embedding js9 into a notebook
In-Reply-To: <CAFA9sd2RktiCwAX39ekYLPvrVmVgZ5wgN=YbSnUmQmeiV6xfWg@mail.gmail.com>
References: <CAFA9sd2Xrah0rzGXR=mZLNdo5BxpKZaPy9i2NAV=ABTssQTtYA@mail.gmail.com>
 <CAB-sx63CPtnvk-QYBVmxgwspFG5+BrHkbvskZN7_8AdoTSpqwA@mail.gmail.com>
 <CAFA9sd3tDvnNneT5j10=UWhEjYhZzrjrvOGYdZoSKYp15-0OPA@mail.gmail.com>
 <CAB-sx60ydPcgx0AKK=TQbagN0J0yCVyf-4DnK8iGuzpOF+LKRg@mail.gmail.com>
 <CAFA9sd2RktiCwAX39ekYLPvrVmVgZ5wgN=YbSnUmQmeiV6xfWg@mail.gmail.com>
Message-ID: <CACejjWz_+SCPnenm8Y5nARydBsN8vTZGBMb4AKdbaZCrNwsUHw@mail.gmail.com>

Started a draft earlier, lost it.

js9 looks very cool! I'd love to see it integrated!

I would recommend doing an nbextension and wrapping your view in a widget,
packaged up as a python module. Then you either have to tell the user to
install the files to the magic location, or do it for them (as qgrid, with
its nbinstall) based on something they do.

Though they are not the same thing, the big advantage to nbextensions and
widgets are:

   - widgets: interactive integration with all the other widget things:
   layouts, controls, etc.
   - Some Day being able to use your front end work with another kernel

When integrating with the notebook front end from python "simply", a higher
order pattern than publish_display_data is:


*def show(data):   display.display(Javascript("..**.data..."))*

Every time you want to change something, you call show. If you want to have
the frontend do something to the backend, you do something like

*IPython.kernel.execute("something")*

Eventually, you will end up reimplementing most of what widgets do.

With widgets,


*class SomeWidget(Widget):   _view_module = Unicode
("nbextensions/extension/file"*

*)   _view_name = Unicode ("SomeView")   Data = SomeTrait()*



*x = SomeWidget() display.display(x) x.data = data*

You can work with the widget instance as a normal python object... But it
has a secret life up in the browser, and you don't have to worry about
state, which is huge. Now your view/backend is part of the larger widget
ecosystem, and other widgets can be linked to it without any additional
integration work, and you're really pushing
All that being said, this is not as easy as it could be. The issue arises
from "the notebook" as the user perceives it, actually being:

   - the kernel: do compute
   - the server: provision compute, serve static assets
   - their code and data

The single user, native kernel, local install experience has suffered
somewhat from the needs of the distributed, multi-user, multi-kernel
experience. In the case of javascript, the kernel doesn't even know it's
running a notebook (could be running shell or qt... or whatever).

So we're stuck right now with:

   - install your backend package into the kernel
   - install the extension into the server

Here is an exhaustive issue describing some of the issues (with pictures!):
https://github.com/jupyter/notebook/issues/116
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20151002/a94d5c8d/attachment.html>

From gijsmolenaar at gmail.com  Fri Oct  2 10:29:11 2015
From: gijsmolenaar at gmail.com (Gijs Molenaar)
Date: Fri, 2 Oct 2015 16:29:11 +0200
Subject: [IPython-dev] embedding js9 into a notebook
In-Reply-To: <CACejjWz_+SCPnenm8Y5nARydBsN8vTZGBMb4AKdbaZCrNwsUHw@mail.gmail.com>
References: <CAFA9sd2Xrah0rzGXR=mZLNdo5BxpKZaPy9i2NAV=ABTssQTtYA@mail.gmail.com>
 <CAB-sx63CPtnvk-QYBVmxgwspFG5+BrHkbvskZN7_8AdoTSpqwA@mail.gmail.com>
 <CAFA9sd3tDvnNneT5j10=UWhEjYhZzrjrvOGYdZoSKYp15-0OPA@mail.gmail.com>
 <CAB-sx60ydPcgx0AKK=TQbagN0J0yCVyf-4DnK8iGuzpOF+LKRg@mail.gmail.com>
 <CAFA9sd2RktiCwAX39ekYLPvrVmVgZ5wgN=YbSnUmQmeiV6xfWg@mail.gmail.com>
 <CACejjWz_+SCPnenm8Y5nARydBsN8vTZGBMb4AKdbaZCrNwsUHw@mail.gmail.com>
Message-ID: <CAFA9sd1urU1O223AKPE-OPr0KZ=5PGZ=dn4Z1DpSO5AYL3pu3Q@mail.gmail.com>

Hi Nicholas,

Thanks for your answer!

meanwhile I found out why pushing some javascript to the browser using
publish_display_data
doens't work. It is related to this issue:

http://stackoverflow.com/questions/4670805/javascript-eval-on-global-scope

When I load the javascript files using `$.globaleval()` I get everything to
work. Not sure how to make that work with an IPython notebook though.


2015-10-02 16:24 GMT+02:00 Nicholas Bollweg <nick.bollweg at gmail.com>:

> Started a draft earlier, lost it.
>
> js9 looks very cool! I'd love to see it integrated!
>
> I would recommend doing an nbextension and wrapping your view in a widget,
> packaged up as a python module. Then you either have to tell the user to
> install the files to the magic location, or do it for them (as qgrid, with
> its nbinstall) based on something they do.
>
> Though they are not the same thing, the big advantage to nbextensions and
> widgets are:
>
>    - widgets: interactive integration with all the other widget things:
>    layouts, controls, etc.
>    - Some Day being able to use your front end work with another kernel
>
> When integrating with the notebook front end from python "simply", a
> higher order pattern than publish_display_data is:
>
>
> *def show(data):   display.display(Javascript("..**.data..."))*
>
> Every time you want to change something, you call show. If you want to
> have the frontend do something to the backend, you do something like
>
> *IPython.kernel.execute("something")*
>
> Eventually, you will end up reimplementing most of what widgets do.
>
> With widgets,
>
>
> *class SomeWidget(Widget):   _view_module = Unicode
> ("nbextensions/extension/file"*
>
> *)   _view_name = Unicode ("SomeView")   Data = SomeTrait()*
>
>
>
> *x = SomeWidget() display.display(x) x.data = data*
>
> You can work with the widget instance as a normal python object... But it
> has a secret life up in the browser, and you don't have to worry about
> state, which is huge. Now your view/backend is part of the larger widget
> ecosystem, and other widgets can be linked to it without any additional
> integration work, and you're really pushing
> All that being said, this is not as easy as it could be. The issue arises
> from "the notebook" as the user perceives it, actually being:
>
>    - the kernel: do compute
>    - the server: provision compute, serve static assets
>    - their code and data
>
> The single user, native kernel, local install experience has suffered
> somewhat from the needs of the distributed, multi-user, multi-kernel
> experience. In the case of javascript, the kernel doesn't even know it's
> running a notebook (could be running shell or qt... or whatever).
>
> So we're stuck right now with:
>
>    - install your backend package into the kernel
>    - install the extension into the server
>
> Here is an exhaustive issue describing some of the issues (with pictures!):
> https://github.com/jupyter/notebook/issues/116
>
>
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> https://mail.scipy.org/mailman/listinfo/ipython-dev
>
>


-- 
Gijs Molenaar
http://pythonic.nl
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20151002/2b756b3b/attachment.html>

From nick.bollweg at gmail.com  Fri Oct  2 17:29:50 2015
From: nick.bollweg at gmail.com (Nicholas Bollweg)
Date: Fri, 02 Oct 2015 21:29:50 +0000
Subject: [IPython-dev] embedding js9 into a notebook
In-Reply-To: <CAFA9sd1urU1O223AKPE-OPr0KZ=5PGZ=dn4Z1DpSO5AYL3pu3Q@mail.gmail.com>
References: <CAFA9sd2Xrah0rzGXR=mZLNdo5BxpKZaPy9i2NAV=ABTssQTtYA@mail.gmail.com>
 <CAB-sx63CPtnvk-QYBVmxgwspFG5+BrHkbvskZN7_8AdoTSpqwA@mail.gmail.com>
 <CAFA9sd3tDvnNneT5j10=UWhEjYhZzrjrvOGYdZoSKYp15-0OPA@mail.gmail.com>
 <CAB-sx60ydPcgx0AKK=TQbagN0J0yCVyf-4DnK8iGuzpOF+LKRg@mail.gmail.com>
 <CAFA9sd2RktiCwAX39ekYLPvrVmVgZ5wgN=YbSnUmQmeiV6xfWg@mail.gmail.com>
 <CACejjWz_+SCPnenm8Y5nARydBsN8vTZGBMb4AKdbaZCrNwsUHw@mail.gmail.com>
 <CAFA9sd1urU1O223AKPE-OPr0KZ=5PGZ=dn4Z1DpSO5AYL3pu3Q@mail.gmail.com>
Message-ID: <CACejjWzfk_+Wq8=v75GS+sQv-z3TxAN2Ypk8HQ-Jpzgkbk0LMQ@mail.gmail.com>

You wouldn't want to eval yourself anyway... if you do it the notebook way
with display(Javascript()), you'll have access to a lovely element
variable, which is the cell output where you are right now.

Looking a bit deeper, I see all the dependencies, both frontend and backend.

Here's a notebook with my amateurish means of exploring the kinds of things
that will fail:
http://nbviewer.org/1259dd3bb7cef8988e92

It's going to be a pretty long road to make everything play nice, widget or
no. But hopefully this helps.

On Fri, Oct 2, 2015 at 10:29 AM Gijs Molenaar <gijsmolenaar at gmail.com>
wrote:

> Hi Nicholas,
>
> Thanks for your answer!
>
> meanwhile I found out why pushing some javascript to the browser using publish_display_data
> doens't work. It is related to this issue:
>
> http://stackoverflow.com/questions/4670805/javascript-eval-on-global-scope
>
> When I load the javascript files using `$.globaleval()` I get everything
> to work. Not sure how to make that work with an IPython notebook though.
>
>
> 2015-10-02 16:24 GMT+02:00 Nicholas Bollweg <nick.bollweg at gmail.com>:
>
>> Started a draft earlier, lost it.
>>
>> js9 looks very cool! I'd love to see it integrated!
>>
>> I would recommend doing an nbextension and wrapping your view in a
>> widget, packaged up as a python module. Then you either have to tell the
>> user to install the files to the magic location, or do it for them (as
>> qgrid, with its nbinstall) based on something they do.
>>
>> Though they are not the same thing, the big advantage to nbextensions and
>> widgets are:
>>
>>    - widgets: interactive integration with all the other widget things:
>>    layouts, controls, etc.
>>    - Some Day being able to use your front end work with another kernel
>>
>> When integrating with the notebook front end from python "simply", a
>> higher order pattern than publish_display_data is:
>>
>>
>> *def show(data):   display.display(Javascript("..**.data..."))*
>>
>> Every time you want to change something, you call show. If you want to
>> have the frontend do something to the backend, you do something like
>>
>> *IPython.kernel.execute("something")*
>>
>> Eventually, you will end up reimplementing most of what widgets do.
>>
>> With widgets,
>>
>>
>> *class SomeWidget(Widget):   _view_module = Unicode
>> ("nbextensions/extension/file"*
>>
>> *)   _view_name = Unicode ("SomeView")   Data = SomeTrait()*
>>
>>
>>
>> *x = SomeWidget() display.display(x) x.data = data*
>>
>> You can work with the widget instance as a normal python object... But it
>> has a secret life up in the browser, and you don't have to worry about
>> state, which is huge. Now your view/backend is part of the larger widget
>> ecosystem, and other widgets can be linked to it without any additional
>> integration work, and you're really pushing
>> All that being said, this is not as easy as it could be. The issue arises
>> from "the notebook" as the user perceives it, actually being:
>>
>>    - the kernel: do compute
>>    - the server: provision compute, serve static assets
>>    - their code and data
>>
>> The single user, native kernel, local install experience has suffered
>> somewhat from the needs of the distributed, multi-user, multi-kernel
>> experience. In the case of javascript, the kernel doesn't even know it's
>> running a notebook (could be running shell or qt... or whatever).
>>
>> So we're stuck right now with:
>>
>>    - install your backend package into the kernel
>>    - install the extension into the server
>>
>> Here is an exhaustive issue describing some of the issues (with
>> pictures!):
>> https://github.com/jupyter/notebook/issues/116
>>
>>
>> _______________________________________________
>> IPython-dev mailing list
>> IPython-dev at scipy.org
>> https://mail.scipy.org/mailman/listinfo/ipython-dev
>>
>>
>
>
> --
> Gijs Molenaar
> http://pythonic.nl
>
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> https://mail.scipy.org/mailman/listinfo/ipython-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20151002/9453259d/attachment.html>

From andresete.chaos at gmail.com  Tue Oct  6 17:06:00 2015
From: andresete.chaos at gmail.com (=?UTF-8?Q?Omar_Andr=C3=A9s_Zapata_Mesa?=)
Date: Tue, 6 Oct 2015 16:06:00 -0500
Subject: [IPython-dev] custom kernel with custom magics
Message-ID: <CAOB9epqaaPpkkPbFcRCt0gYPh1PTmqPckxLuaX=isMqRsfP2sQ@mail.gmail.com>

Hi Dears,

I am writing my own kernel I am trying to create my own magics according to
https://ipython.org/ipython-doc/dev/config/custommagics.html

but into my kernel class the function get_ipython() is returning None.

My questing is, is possible to get an ipython instance into my kernel class?

Best Regards
Omar.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20151006/0d55f605/attachment.html>

From benjaminrk at gmail.com  Wed Oct  7 05:30:19 2015
From: benjaminrk at gmail.com (MinRK)
Date: Wed, 7 Oct 2015 11:30:19 +0200
Subject: [IPython-dev] custom kernel with custom magics
In-Reply-To: <CAOB9epqaaPpkkPbFcRCt0gYPh1PTmqPckxLuaX=isMqRsfP2sQ@mail.gmail.com>
References: <CAOB9epqaaPpkkPbFcRCt0gYPh1PTmqPckxLuaX=isMqRsfP2sQ@mail.gmail.com>
Message-ID: <CAHNn8BXeVRhpe1vRwRp1CzJTJWzc_NYcWy47_yySwnLw+s6C4A@mail.gmail.com>

On Tue, Oct 6, 2015 at 11:06 PM, Omar Andr?s Zapata Mesa <
andresete.chaos at gmail.com> wrote:

> Hi Dears,
>
> I am writing my own kernel I am trying to create my own magics according to
> https://ipython.org/ipython-doc/dev/config/custommagics.html
>
> but into my kernel class the function get_ipython() is returning None.
>
> My questing is, is possible to get an ipython instance into my kernel
> class?
>

You can instantiate an IPython InteractiveShell object, but perhaps what
you really want is to be subclassing and extending the IPython kernel.

-MinRK


>
> Best Regards
> Omar.
>
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> https://mail.scipy.org/mailman/listinfo/ipython-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20151007/9387a213/attachment.html>

From benjaminrk at gmail.com  Wed Oct  7 08:10:08 2015
From: benjaminrk at gmail.com (MinRK)
Date: Wed, 7 Oct 2015 14:10:08 +0200
Subject: [IPython-dev] [ANN] ipykernel-4.1
Message-ID: <CAHNn8BVNeZYZGawHt_unvZq9RTQZLHWEsBS_DuTkaM0VhFri0w@mail.gmail.com>

We just released 4.1 of the IPython kernel package ipykernel. This has
various bugfixes, but the highlight is the addition of the ipython kernel
install entrypoint for installing the IPython kernelspec. This is
accessible as python -m ipykernel install as well.

docs <http://ipykernel.readthedocs.org/en/latest/changelog.html#id1>

We happen have several IPython and Jupyter packages close to release, so
there will likely be a series of 4.1 and 4.0.x releases over the next few
days/weeks.

-MinRK
?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20151007/45f7f8ac/attachment.html>

From wes.turner at gmail.com  Wed Oct  7 13:33:19 2015
From: wes.turner at gmail.com (Wes Turner)
Date: Wed, 7 Oct 2015 12:33:19 -0500
Subject: [IPython-dev] [ANN] ipykernel-4.1
In-Reply-To: <CAHNn8BVNeZYZGawHt_unvZq9RTQZLHWEsBS_DuTkaM0VhFri0w@mail.gmail.com>
References: <CAHNn8BVNeZYZGawHt_unvZq9RTQZLHWEsBS_DuTkaM0VhFri0w@mail.gmail.com>
Message-ID: <CACfEFw_o-=M4W3-s_SXWALcjF--gqw=9_Q4g+fMrUc=XedcDLQ@mail.gmail.com>

thanks!
https://github.com/ipython/ipykernel/commits/master/ipykernel
On Oct 7, 2015 7:10 AM, "MinRK" <benjaminrk at gmail.com> wrote:

> We just released 4.1 of the IPython kernel package ipykernel. This has
> various bugfixes, but the highlight is the addition of the ipython kernel
> install entrypoint for installing the IPython kernelspec. This is
> accessible as python -m ipykernel install as well.
>
> docs <http://ipykernel.readthedocs.org/en/latest/changelog.html#id1>
>
> We happen have several IPython and Jupyter packages close to release, so
> there will likely be a series of 4.1 and 4.0.x releases over the next few
> days/weeks.
>
> -MinRK
> ?
>
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> https://mail.scipy.org/mailman/listinfo/ipython-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20151007/482f572e/attachment.html>

From prabhu at aero.iitb.ac.in  Fri Oct 16 07:46:40 2015
From: prabhu at aero.iitb.ac.in (Prabhu Ramachandran)
Date: Fri, 16 Oct 2015 17:16:40 +0530
Subject: [IPython-dev] [ANN] SciPy India 2015: call for papers
Message-ID: <5620E3A0.8020605@aero.iitb.ac.in>

Hello,

[Apologies for the cross-posting]

The CFP and registration for SciPy India 2015 (http://scipy.in) is open.  SciPy
India 2015 will be held at IIT Bombay between December 14th to December 16th, 2015.

Please spread the word!

SciPy India is an annual conference on using Python for research and education.
The conference is currently in its seventh year.

Call for Papers
=============

We look forward to your submissions on the use of Python for scientific
computing and education. This includes pedagogy, exploration, modeling and
analysis from both applied and  developmental perspectives. We welcome
contributions from academia as well as industry.

For details on the paper submission please see here:

    http://scipy.in/2015/cfp/

Important Dates
================

  - Call for proposals end: 24th November 2015
  - List of accepted proposals will be published: 1st December 2015.


We look forward to seeing you at SciPy India.

Regards,
Prabhu Ramachandran and Jarrod Millman


From jakevdp at cs.washington.edu  Fri Oct 16 17:49:38 2015
From: jakevdp at cs.washington.edu (Jacob Vanderplas)
Date: Fri, 16 Oct 2015 14:49:38 -0700
Subject: [IPython-dev] Using pip within notebooks
Message-ID: <CACpqBg2Dn7PePwCmrJ=APRNZKYY+1Q-n8ybrG_y+CouTjjaCnA@mail.gmail.com>

Hi folks,
One quick question ? in previous IPython versions, I had often used ``!pip
install`` commands from within the notebook to make sure packages are
installed before importing them. I've noticed that in newer versions of the
notebook this doesn't work ? the kernel and the shell are not necessarily
in sync: it seems that pip is by default tied to the python version which
ran ``jupyter notebook``, rather than the Python version running the kernel.

Is there anything I can do to make pip work in the notebook again? Thanks!
   Jake
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20151016/1e1093f5/attachment.html>

From bussonniermatthias at gmail.com  Fri Oct 16 18:55:49 2015
From: bussonniermatthias at gmail.com (Matthias Bussonnier)
Date: Fri, 16 Oct 2015 15:55:49 -0700
Subject: [IPython-dev] Using pip within notebooks
In-Reply-To: <CACpqBg2Dn7PePwCmrJ=APRNZKYY+1Q-n8ybrG_y+CouTjjaCnA@mail.gmail.com>
References: <CACpqBg2Dn7PePwCmrJ=APRNZKYY+1Q-n8ybrG_y+CouTjjaCnA@mail.gmail.com>
Message-ID: <1284523F-1BDF-4619-8034-7C1FFB5902D7@gmail.com>

Hi Jake, 

> On Oct 16, 2015, at 14:49, Jacob Vanderplas <jakevdp at cs.washington.edu> wrote:
> 
> Hi folks,
> One quick question ? in previous IPython versions, I had often used ``!pip install`` commands from within the notebook to make sure packages are installed before importing them. I've noticed that in newer versions of the notebook this doesn't work ? the kernel and the shell are not necessarily in sync: it seems that pip is by default tied to the python version which ran ``jupyter notebook``, rather than the Python version running the kernel.
> 
> Is there anything I can do to make pip work in the notebook again? Thanks!

a quick way would be the following: 

```
import sys
!{sys.executable} -m pip ...
```

or make use of some magics: 

https://pypi.python.org/pypi/pip_magic <https://pypi.python.org/pypi/pip_magic>   (don?t even need the ! anymore, just import it :-)


Won't work with conda though, unless you mess with the kernel spec to export PATH correctly to be in your envs,
So that any shelling out use conda executables executables instead of systems ones. Kind of a manual ?source activate? step. 
I know that some people are working on Conda Kernels Launchers to automatize that.

Happy Coding. 

-- 
M

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20151016/b31ca5cb/attachment.html>

From bn121rajesh at gmail.com  Fri Oct 16 19:28:34 2015
From: bn121rajesh at gmail.com (Rajesh Bondugula)
Date: Fri, 16 Oct 2015 16:28:34 -0700
Subject: [IPython-dev] linux command on ipython
Message-ID: <CA+LCnPATtnMA+E_r2Fv+50mWrMPypmfbuKP7d42wwarAgubbuA@mail.gmail.com>

hi team,

in unix / mac

the following command will give me the files that are more than 100MB and
are not accessed in last 2 days.

size=100
days=2

for i in $(find . -size +$size"M" -atime +$days); do echo "file: " $i; done


But the same command in ipython gives me error.


!for i in $(find . -size +$size"M" -atime +$days); do echo "file: " $i; done

*find: -size: +M: illegal numeric value.*


some how it is unable to expand the $size and $days


I want to use for loop and want to do in pure unix command with out python.


Please let me know if there is an error in using it.


Thanks

Rajesh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20151016/92621864/attachment.html>

From bussonniermatthias at gmail.com  Fri Oct 16 20:09:11 2015
From: bussonniermatthias at gmail.com (Matthias Bussonnier)
Date: Fri, 16 Oct 2015 17:09:11 -0700
Subject: [IPython-dev] linux command on ipython
In-Reply-To: <CA+LCnPATtnMA+E_r2Fv+50mWrMPypmfbuKP7d42wwarAgubbuA@mail.gmail.com>
References: <CA+LCnPATtnMA+E_r2Fv+50mWrMPypmfbuKP7d42wwarAgubbuA@mail.gmail.com>
Message-ID: <9C570256-249B-4B2E-8005-0860C623C53C@gmail.com>


> On Oct 16, 2015, at 16:28, Rajesh Bondugula <bn121rajesh at gmail.com> wrote:
> 
> some how it is unable to expand the $size and $days


yes, because it can?t expand $i it bails out and expand nothing. 
escape the $i with a second $. 

In [4]: !for i in $(find . -size +$size"M" -atime +$days); do echo "file: " $$i; done
^C
KeyboardInterrupt



-- 
M
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20151016/573ec5fb/attachment.html>

From asmeurer at gmail.com  Fri Oct 16 21:30:47 2015
From: asmeurer at gmail.com (Aaron S. Meurer)
Date: Fri, 16 Oct 2015 20:30:47 -0500
Subject: [IPython-dev] Using pip within notebooks
In-Reply-To: <1284523F-1BDF-4619-8034-7C1FFB5902D7@gmail.com>
References: <CACpqBg2Dn7PePwCmrJ=APRNZKYY+1Q-n8ybrG_y+CouTjjaCnA@mail.gmail.com>
 <1284523F-1BDF-4619-8034-7C1FFB5902D7@gmail.com>
Message-ID: <EB5B506D-AF09-499C-867E-BFBEEE9F6F94@gmail.com>

For conda you can use conda install -p {sys.prefix}. 

Aaron Meurer

> On Oct 16, 2015, at 5:55 PM, Matthias Bussonnier <bussonniermatthias at gmail.com> wrote:
> 
> Hi Jake, 
> 
>> On Oct 16, 2015, at 14:49, Jacob Vanderplas <jakevdp at cs.washington.edu> wrote:
>> 
>> Hi folks,
>> One quick question ? in previous IPython versions, I had often used ``!pip install`` commands from within the notebook to make sure packages are installed before importing them. I've noticed that in newer versions of the notebook this doesn't work ? the kernel and the shell are not necessarily in sync: it seems that pip is by default tied to the python version which ran ``jupyter notebook``, rather than the Python version running the kernel.
>> 
>> Is there anything I can do to make pip work in the notebook again? Thanks!
> 
> a quick way would be the following: 
> 
> ```
> import sys
> !{sys.executable} -m pip ...
> ```
> 
> or make use of some magics: 
> 
> https://pypi.python.org/pypi/pip_magic   (don?t even need the ! anymore, just import it :-)
> 
> 
> Won't work with conda though, unless you mess with the kernel spec to export PATH correctly to be in your envs,
> So that any shelling out use conda executables executables instead of systems ones. Kind of a manual ?source activate? step. 
> I know that some people are working on Conda Kernels Launchers to automatize that.
> 
> Happy Coding. 
> 
> -- 
> M
> 
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> https://mail.scipy.org/mailman/listinfo/ipython-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20151016/53b3fc56/attachment.html>

From jakevdp at cs.washington.edu  Fri Oct 16 22:08:53 2015
From: jakevdp at cs.washington.edu (Jacob Vanderplas)
Date: Fri, 16 Oct 2015 19:08:53 -0700
Subject: [IPython-dev] Using pip within notebooks
In-Reply-To: <EB5B506D-AF09-499C-867E-BFBEEE9F6F94@gmail.com>
References: <CACpqBg2Dn7PePwCmrJ=APRNZKYY+1Q-n8ybrG_y+CouTjjaCnA@mail.gmail.com>
 <1284523F-1BDF-4619-8034-7C1FFB5902D7@gmail.com>
 <EB5B506D-AF09-499C-867E-BFBEEE9F6F94@gmail.com>
Message-ID: <CACpqBg23CTuOtsAPEUD1FSxKip-99W5_d62w75XqsQxhNCW4ZQ@mail.gmail.com>

Thanks all!
   Jake

 Jake VanderPlas
 Senior Data Science Fellow
 Director of Research in Physical Sciences
 University of Washington eScience Institute

On Fri, Oct 16, 2015 at 6:30 PM, Aaron S. Meurer <asmeurer at gmail.com> wrote:

> For conda you can use conda install -p {sys.prefix}.
>
> Aaron Meurer
>
> On Oct 16, 2015, at 5:55 PM, Matthias Bussonnier <
> bussonniermatthias at gmail.com> wrote:
>
> Hi Jake,
>
> On Oct 16, 2015, at 14:49, Jacob Vanderplas <jakevdp at cs.washington.edu>
> wrote:
>
> Hi folks,
> One quick question ? in previous IPython versions, I had often used ``!pip
> install`` commands from within the notebook to make sure packages are
> installed before importing them. I've noticed that in newer versions of the
> notebook this doesn't work ? the kernel and the shell are not necessarily
> in sync: it seems that pip is by default tied to the python version which
> ran ``jupyter notebook``, rather than the Python version running the kernel.
>
> Is there anything I can do to make pip work in the notebook again? Thanks!
>
>
> a quick way would be the following:
>
> ```
> import sys
> !{sys.executable} -m pip ...
> ```
>
> or make use of some magics:
>
> https://pypi.python.org/pypi/pip_magic   (don?t even need the ! anymore,
> just import it :-)
>
>
> Won't work with conda though, unless you mess with the kernel spec to
> export PATH correctly to be in your envs,
> So that any shelling out use conda executables executables instead of
> systems ones. Kind of a manual ?source activate? step.
> I know that some people are working on Conda Kernels Launchers to
> automatize that.
>
> Happy Coding.
>
> --
> M
>
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> https://mail.scipy.org/mailman/listinfo/ipython-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20151016/cb8daa03/attachment.html>

From nathan12343 at gmail.com  Sat Oct 17 13:52:43 2015
From: nathan12343 at gmail.com (Nathan Goldbaum)
Date: Sat, 17 Oct 2015 10:52:43 -0700
Subject: [IPython-dev] Example of custom CSS styling with ipywidgets?
Message-ID: <CAJXewOkMHPkpn7mLF+Z-pvS8LbiXrPyYzybKFf-eqjSJ-DSKaA@mail.gmail.com>

Hi all,

I'm trying to update a custom widget I made a while back (IPython 2.x
days). I used some custom CSS to style the widget.

I see nowadays we should be using the `_css` attribute of the widget to set
custom CSS, but I don't see any examples of actually using this
functionality anywhere.

Does anyone have an example they can link me to? Could be a real custom
widget or just a precanned example demonstrating this functionality.

Thanks very much for your help!

-Nathan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20151017/7a26060c/attachment.html>

From nathan12343 at gmail.com  Sat Oct 17 14:34:15 2015
From: nathan12343 at gmail.com (Nathan Goldbaum)
Date: Sat, 17 Oct 2015 11:34:15 -0700
Subject: [IPython-dev] Example of custom CSS styling with ipywidgets?
In-Reply-To: <CAJXewOkMHPkpn7mLF+Z-pvS8LbiXrPyYzybKFf-eqjSJ-DSKaA@mail.gmail.com>
References: <CAJXewOkMHPkpn7mLF+Z-pvS8LbiXrPyYzybKFf-eqjSJ-DSKaA@mail.gmail.com>
Message-ID: <CAJXewOkvWV1Nr=e4gNE74MVzp7aTSNdzOt2hThjOBJ-Tts3M=w@mail.gmail.com>

Hmm, so I think my confusion was arising from a bug (?) in ipywidgets.  In
any case, PR incoming.

On Sat, Oct 17, 2015 at 10:52 AM, Nathan Goldbaum <nathan12343 at gmail.com>
wrote:

> Hi all,
>
> I'm trying to update a custom widget I made a while back (IPython 2.x
> days). I used some custom CSS to style the widget.
>
> I see nowadays we should be using the `_css` attribute of the widget to
> set custom CSS, but I don't see any examples of actually using this
> functionality anywhere.
>
> Does anyone have an example they can link me to? Could be a real custom
> widget or just a precanned example demonstrating this functionality.
>
> Thanks very much for your help!
>
> -Nathan
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20151017/9be64ede/attachment.html>

From jon.freder at gmail.com  Mon Oct 19 13:09:30 2015
From: jon.freder at gmail.com (Jonathan Frederic)
Date: Mon, 19 Oct 2015 10:09:30 -0700
Subject: [IPython-dev] Example of custom CSS styling with ipywidgets?
In-Reply-To: <CAJXewOkvWV1Nr=e4gNE74MVzp7aTSNdzOt2hThjOBJ-Tts3M=w@mail.gmail.com>
References: <CAJXewOkMHPkpn7mLF+Z-pvS8LbiXrPyYzybKFf-eqjSJ-DSKaA@mail.gmail.com>
 <CAJXewOkvWV1Nr=e4gNE74MVzp7aTSNdzOt2hThjOBJ-Tts3M=w@mail.gmail.com>
Message-ID: <CAAoBLw3KQyYM5zDWY+ET9YH8yv=yYzqBuB2rb_ROE6rK5NstLA@mail.gmail.com>

Hi Nathan,

This indeed was caused by a bug which your PR (merged) fixed.  This fix
will be included in the upcoming 4.1 release of ipywidgets.  We've
discussed bringing back the css helper functions for ipywidgets 5.0, and I
think we will bring back at least some variation of them (see
https://github.com/ipython/ipywidgets/issues/121#issuecomment-147765524).

Cheers,
Jon

On Sat, Oct 17, 2015 at 11:34 AM, Nathan Goldbaum <nathan12343 at gmail.com>
wrote:

> Hmm, so I think my confusion was arising from a bug (?) in ipywidgets.  In
> any case, PR incoming.
>
> On Sat, Oct 17, 2015 at 10:52 AM, Nathan Goldbaum <nathan12343 at gmail.com>
> wrote:
>
>> Hi all,
>>
>> I'm trying to update a custom widget I made a while back (IPython 2.x
>> days). I used some custom CSS to style the widget.
>>
>> I see nowadays we should be using the `_css` attribute of the widget to
>> set custom CSS, but I don't see any examples of actually using this
>> functionality anywhere.
>>
>> Does anyone have an example they can link me to? Could be a real custom
>> widget or just a precanned example demonstrating this functionality.
>>
>> Thanks very much for your help!
>>
>> -Nathan
>>
>
>
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> https://mail.scipy.org/mailman/listinfo/ipython-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20151019/756e1389/attachment.html>

From Chahe.Adourian at asc-csa.gc.ca  Tue Oct 20 10:45:44 2015
From: Chahe.Adourian at asc-csa.gc.ca (Chahe.Adourian at asc-csa.gc.ca)
Date: Tue, 20 Oct 2015 14:45:44 +0000
Subject: [IPython-dev] ipython memory usage problem
Message-ID: <BB55F08FADEC70499457369A81C7A4B553F61092@EXSTHMBX1.csa.space.gc.ca>

Hi there,

I am using ipyparallel to run some tests. Every time I call the function on the remote engines, the memory use of the engine is increasing.
I have tried the following to clear the memory on the engines without success.


1)      dview.execute('%reset')

2)      dview.execute('%reset In')

3)      dview.execute('%reset Out')

4)      dview.execut('gc.collect')

5)      I used a more forceful approach where all the variables are deleted, but that kills my remote link as well to the engine.

The only solution so far is to stop the Engines and restart them again, but that's not my first choice. Anybody know what's going on? Why doesn't '%reset' cleanup properly?

Thanks
_____________________________________________
Chah? Adourian


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20151020/ca137075/attachment.html>

From benjaminrk at gmail.com  Wed Oct 21 09:41:17 2015
From: benjaminrk at gmail.com (MinRK)
Date: Wed, 21 Oct 2015 14:41:17 +0100
Subject: [IPython-dev] ipython memory usage problem
In-Reply-To: <BB55F08FADEC70499457369A81C7A4B553F61092@EXSTHMBX1.csa.space.gc.ca>
References: <BB55F08FADEC70499457369A81C7A4B553F61092@EXSTHMBX1.csa.space.gc.ca>
Message-ID: <CAHNn8BWCaPOo_6F8cog_r9-=fgrs_2mT-wJM5R0U4Z64DT9gKA@mail.gmail.com>

Can you provide a complete example and the Python version and OS you are
using?

On Tue, Oct 20, 2015 at 3:45 PM, <Chahe.Adourian at asc-csa.gc.ca> wrote:

> Hi there,
>
>
>
> I am using ipyparallel to run some tests. Every time I call the function
> on the remote engines, the memory use of the engine is increasing.
>
> I have tried the following to clear the memory on the engines without
> success.
>
>
>
> 1)      dview.execute(?%reset?)
>
> 2)      dview.execute(?%reset In?)
>
> 3)      dview.execute(?%reset Out?)
>
> 4)      dview.execut(?gc.collect?)
>
> 5)      I used a more forceful approach where all the variables are
> deleted, but that kills my remote link as well to the engine.
>
>
>
> The only solution so far is to stop the Engines and restart them again,
> but that?s not my first choice. Anybody know what?s going on? Why doesn?t
> ?%reset? cleanup properly?
>
>
>
> Thanks
>
> _____________________________________________
>
> Chah? Adourian
>
>
>
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> https://mail.scipy.org/mailman/listinfo/ipython-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20151021/9f085986/attachment.html>

From tom.quarendon at teamwpc.co.uk  Thu Oct 22 11:50:55 2015
From: tom.quarendon at teamwpc.co.uk (Tom Quarendon)
Date: Thu, 22 Oct 2015 15:50:55 +0000
Subject: [IPython-dev] Multiple front ends connecting to same kernel
Message-ID: <AM2PR05MB0771C3488F2D546879EFD0E5B0270@AM2PR05MB0771.eurprd05.prod.outlook.com>

If I connect multiple front ends to the same jupyter/ipython kernel, then having read the message docs I naively expected that everything I did on one would get mirrored on the other. So if I create a cell and run it on one front end, I naively expected that the other front end would display the executed cell text along with any output.
However this doesn?t happen.
Is this as expected? I rather assumed that the point of everything being sent out on the iopub socket was to make collaboration between front ends and sharing of kernels possible.

Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20151022/2bf89d4a/attachment.html>

From bussonniermatthias at gmail.com  Thu Oct 22 12:53:55 2015
From: bussonniermatthias at gmail.com (Matthias Bussonnier)
Date: Thu, 22 Oct 2015 09:53:55 -0700
Subject: [IPython-dev] Multiple front ends connecting to same kernel
In-Reply-To: <AM2PR05MB0771C3488F2D546879EFD0E5B0270@AM2PR05MB0771.eurprd05.prod.outlook.com>
References: <AM2PR05MB0771C3488F2D546879EFD0E5B0270@AM2PR05MB0771.eurprd05.prod.outlook.com>
Message-ID: <7F5DC3E7-88A9-4294-9B47-A00A981AFE18@gmail.com>

Hi Tom, 


> On Oct 22, 2015, at 08:50, Tom Quarendon <tom.quarendon at teamwpc.co.uk> wrote:
> 
> If I connect multiple front ends to the same jupyter/ipython kernel, then having read the message docs I naively expected that everything I did on one would get mirrored on the other. So if I create a cell and run it on one front end, I naively expected that the other front end would display the executed cell text along with any output.
> However this doesn?t happen. 
> Is this as expected? I rather assumed that the point of everything being sent out on the iopub socket was to make collaboration between front ends and sharing of kernels possible.


All the front-end do receive the broadcasted messages, the front-end can then decide what to do with these input/output. 
IIRC the ipython console will show other outputs that comes don?t originate from them, but not all client handle that. 

You might need to set --ZMQTerminalInteractiveShell.include_other_output=True on the command line arguments or configuration:


In [7]:
[remote] In [7]: "hey I'm remote"
[remote] Out[7]: "hey I'm remote"

In [7]:

In the notebook in particular, what to do with other input/output is not obvious. Do you append it at the end ? Replace current cell ? 
Append just after current cells ? Just before ? 

Keep in mind that kernel is not aware it is run from a notebook in the case of a notebook, so there is work in progress to synchronize
the state of multiple notebook, but this is independent from what the kernel broadcasts. 


Does that make sens ?

-- 
M


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20151022/7a4a17ec/attachment.html>

From bn121rajesh at gmail.com  Thu Oct 22 16:40:11 2015
From: bn121rajesh at gmail.com (Rajesh Bondugula)
Date: Thu, 22 Oct 2015 13:40:11 -0700
Subject: [IPython-dev] sorting rows of data frame using sort_values
Message-ID: <CA+LCnPCHO7N8YJEdNEU0tA3zeq4k+Zb5B=buArHE=Ba9iT=ZmA@mail.gmail.com>

hi,

I have this data frame.

     728  562  599  642  592  686  602  744  640  678
309   96   29   99   63   73   48   81   48   13   25
337   40   25   41   47   14   33   54   63   33   45
395   64   95   63   90   52   82   66   26   26   20
264   38   56   73   17   98   56   80   77   44   49

I want to sort it horizontally based on row index 264
I tried:
df.sort_values(by=264, axis=1)

I gives me: ValueError: When sorting by column, axis must be 0 (rows)

What is the usecase with axis=1

Thanks
Rajesh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20151022/f1a00f6f/attachment.html>

From zvoros at gmail.com  Fri Oct 23 02:26:52 2015
From: zvoros at gmail.com (=?UTF-8?B?Wm9sdMOhbiBWw7Zyw7Zz?=)
Date: Fri, 23 Oct 2015 08:26:52 +0200
Subject: [IPython-dev] sorting rows of data frame using sort_values
In-Reply-To: <CA+LCnPCHO7N8YJEdNEU0tA3zeq4k+Zb5B=buArHE=Ba9iT=ZmA@mail.gmail.com>
References: <CA+LCnPCHO7N8YJEdNEU0tA3zeq4k+Zb5B=buArHE=Ba9iT=ZmA@mail.gmail.com>
Message-ID: <5629D32C.6030606@gmail.com>

But this surely is a pandas issue, if anything at all, so why don't you 
post your question on the relevant mailing list?

On 10/22/2015 10:40 PM, Rajesh Bondugula wrote:
> hi,
>
> I have this data frame.
>
>      728  562  599  642  592  686  602  744  640  678
> 309   96   29   99   63   73   48   81   48   13   25
> 337   40   25   41   47   14   33   54   63   33   45
> 395   64   95   63   90   52   82   66   26   26   20
> 264   38   56   73   17   98   56   80   77   44   49
>
> I want to sort it horizontally based on row index 264
> I tried:
> df.sort_values(by=264, axis=1)
>
> I gives me: ValueError: When sorting by column, axis must be 0 (rows)
>
> What is the usecase with axis=1
>
> Thanks
> Rajesh
>
>
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> https://mail.scipy.org/mailman/listinfo/ipython-dev



From tom.quarendon at teamwpc.co.uk  Fri Oct 23 03:04:12 2015
From: tom.quarendon at teamwpc.co.uk (Tom Quarendon)
Date: Fri, 23 Oct 2015 07:04:12 +0000
Subject: [IPython-dev] Multiple front ends connecting to same kernel
In-Reply-To: <7F5DC3E7-88A9-4294-9B47-A00A981AFE18@gmail.com>
References: <AM2PR05MB0771C3488F2D546879EFD0E5B0270@AM2PR05MB0771.eurprd05.prod.outlook.com>
 <7F5DC3E7-88A9-4294-9B47-A00A981AFE18@gmail.com>
Message-ID: <AM3PR05MB07768E9AF934B0A16E8501CDB0260@AM3PR05MB0776.eurprd05.prod.outlook.com>

OK, I understand.
That option kind of works for the console case (the ANSI formatting characters get all messed up, but the output shows at least).
I was assuming that I?d done something wrong in my kernel, not putting the right topic on the pub messages or something, but since I couldn?t get the behaviour to work anywhere I was then confused as to whether it was indeed supposed to work.

Thanks for your help anyway.


From: IPython-dev [mailto:ipython-dev-bounces at scipy.org] On Behalf Of Matthias Bussonnier
Sent: 22 October 2015 17:54
To: IPython developers list <ipython-dev at scipy.org>
Subject: Re: [IPython-dev] Multiple front ends connecting to same kernel

Hi Tom,


On Oct 22, 2015, at 08:50, Tom Quarendon <tom.quarendon at teamwpc.co.uk<mailto:tom.quarendon at teamwpc.co.uk>> wrote:

If I connect multiple front ends to the same jupyter/ipython kernel, then having read the message docs I naively expected that everything I did on one would get mirrored on the other. So if I create a cell and run it on one front end, I naively expected that the other front end would display the executed cell text along with any output.
However this doesn?t happen.
Is this as expected? I rather assumed that the point of everything being sent out on the iopub socket was to make collaboration between front ends and sharing of kernels possible.


All the front-end do receive the broadcasted messages, the front-end can then decide what to do with these input/output.
IIRC the ipython console will show other outputs that comes don?t originate from them, but not all client handle that.

You might need to set --ZMQTerminalInteractiveShell.include_other_output=True on the command line arguments or configuration:


In [7]:
[remote] In [7]: "hey I'm remote"
[remote] Out[7]: "hey I'm remote"

In [7]:

In the notebook in particular, what to do with other input/output is not obvious. Do you append it at the end ? Replace current cell ?
Append just after current cells ? Just before ?

Keep in mind that kernel is not aware it is run from a notebook in the case of a notebook, so there is work in progress to synchronize
the state of multiple notebook, but this is independent from what the kernel broadcasts.


Does that make sens ?

--
M


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20151023/9fae81e2/attachment.html>

From chahe.adourian at asc-csa.gc.ca  Fri Oct 23 09:24:48 2015
From: chahe.adourian at asc-csa.gc.ca (cadourian)
Date: Fri, 23 Oct 2015 06:24:48 -0700 (PDT)
Subject: [IPython-dev] ipython memory usage problem
In-Reply-To: <CAHNn8BWCaPOo_6F8cog_r9-=fgrs_2mT-wJM5R0U4Z64DT9gKA@mail.gmail.com>
References: <BB55F08FADEC70499457369A81C7A4B553F61092@EXSTHMBX1.csa.space.gc.ca>
 <CAHNn8BWCaPOo_6F8cog_r9-=fgrs_2mT-wJM5R0U4Z64DT9gKA@mail.gmail.com>
Message-ID: <1445606688690-5174644.post@n6.nabble.com>

Hi,

providing a complete example of the exact code I use would not be possible
but I will create a simple example and see if the problem still occurs. I
will provide that once ready.

Cheers



--
View this message in context: http://python.6.x6.nabble.com/ipython-memory-usage-problem-tp5174336p5174644.html
Sent from the IPython - Development mailing list archive at Nabble.com.


From bussonniermatthias at gmail.com  Fri Oct 23 12:31:17 2015
From: bussonniermatthias at gmail.com (Matthias Bussonnier)
Date: Fri, 23 Oct 2015 09:31:17 -0700
Subject: [IPython-dev] Multiple front ends connecting to same kernel
In-Reply-To: <AM3PR05MB07768E9AF934B0A16E8501CDB0260@AM3PR05MB0776.eurprd05.prod.outlook.com>
References: <AM2PR05MB0771C3488F2D546879EFD0E5B0270@AM2PR05MB0771.eurprd05.prod.outlook.com>
 <7F5DC3E7-88A9-4294-9B47-A00A981AFE18@gmail.com>
 <AM3PR05MB07768E9AF934B0A16E8501CDB0260@AM3PR05MB0776.eurprd05.prod.outlook.com>
Message-ID: <F0D71695-55ED-4510-B5CE-AEC69E2D5583@gmail.com>


> On Oct 23, 2015, at 00:04, Tom Quarendon <tom.quarendon at teamwpc.co.uk> wrote:
> 
> OK, I understand.
> That option kind of works for the console case (the ANSI formatting characters get all messed up, but the output shows at least).
> I was assuming that I?d done something wrong in my kernel, not putting the right topic on the pub messages or something, but since I couldn?t get the behaviour to work anywhere I was then confused as to whether it was indeed supposed to work.

Well if the doc in nuclear on that part and you can propose some improvement we will be happy to do so. 
Feel free to ask more question on what kind of socket to use and where if you need help. 

Looking forward to see your kernel if it?s going to be public. 

You can also ask question on jupyter at googlegroups.com where you might have more kernels authors from other languages. 

-- 
M

From chahe.adourian at asc-csa.gc.ca  Fri Oct 23 14:21:39 2015
From: chahe.adourian at asc-csa.gc.ca (cadourian)
Date: Fri, 23 Oct 2015 11:21:39 -0700 (PDT)
Subject: [IPython-dev] ipython memory usage problem
In-Reply-To: <1445606688690-5174644.post@n6.nabble.com>
References: <BB55F08FADEC70499457369A81C7A4B553F61092@EXSTHMBX1.csa.space.gc.ca>
 <CAHNn8BWCaPOo_6F8cog_r9-=fgrs_2mT-wJM5R0U4Z64DT9gKA@mail.gmail.com>
 <1445606688690-5174644.post@n6.nabble.com>
Message-ID: <1445624499566-5174675.post@n6.nabble.com>

I could not provide an example that causes the problem cause the setup to run
it would be too complicated however I think we should be able to make
progress.

I'll explain. I ran two examples. Both examples have the same pseudocode
template

-------------
Procedure A: 
-------------
a) Clear the memory on the engines using the following commands

    securityFile =
r'%s\EngineConfig\profile_default\security\ipcontroller-client.json' %
projectRoot
    rc = Client(securityFile)
    idSubset = rc.ids

    dview = rc[idSubset]
    dview.execute('%reset')
    dview.execute('import gc')
    dview.execute('gc.collect()')


b) Measure memory usage on each cluster engine
c) call a function x using dview.map_sync(x, ....)
d) Measure memory usage on each cluster engine

#1) memory usage on engines does not increase when Procedure A is called
multiple times. In this case, the function x used in dview.map_sync(x, ....)
allocates an array with numpy and returns it

#2) In this case, memory increases when Procedure A is called multiple
times. The difference is that function x used in dview.map_sync(x, ....)
loads DLLs and executes loaded functions.

What I don't understand is that I'm calling a function (x) which is
obviously causing the problems. But, I would have expected that when the
function call returned, any objects created within would be destroyed.
Moreover, I purposefully called garbage collect to eliminate any remaining
objects before measuring memory usage.

The question is whether IPython handles functions a little differently than
Python? Any suggestions appreciated. 





--
View this message in context: http://python.6.x6.nabble.com/ipython-memory-usage-problem-tp5174336p5174675.html
Sent from the IPython - Development mailing list archive at Nabble.com.