From glenn.caltech at gmail.com Thu Mar 2 15:58:03 2017 From: glenn.caltech at gmail.com (G Jones) Date: Thu, 2 Mar 2017 15:58:03 -0500 Subject: [IPython-dev] add tab completion for arguments dynamically Message-ID: Hi, Is it possible to customize the completion list when typing keyword arguments? For example suppose I have a function like: def myfunc(**kwargs): val = kwargs['val'] is there a way to tell ipython that when it sees me type: myfunc(va it suggests "val="? Thanks, Glenn -------------- next part -------------- An HTML attachment was scrubbed... URL: From bussonniermatthias at gmail.com Thu Mar 2 16:25:33 2017 From: bussonniermatthias at gmail.com (Matthias Bussonnier) Date: Thu, 2 Mar 2017 13:25:33 -0800 Subject: [IPython-dev] add tab completion for arguments dynamically In-Reply-To: References: Message-ID: Hi Glenn, You can set the `__signature__` of your object. likely possible with a decorator. Here is a short example of how you could do it in a REPL. In [21]: from inspect import Signature, Parameter In [22]: def foo(*kwargs): ...: pass In [23]: foo? Signature: foo(*kwargs) Docstring: File: ~/dev/docathon/ Type: function In [24]: foo.__signature__ = Signature(parameters={Parameter('a', Parameter.POSITIONAL_OR_KEYWORD):None}) In [25]: foo? Signature: foo(a) Docstring: File: ~/dev/docathon/ Type: function That should not only work with IPython, but with anything that use the Python inspect library. Note that what I do above is imperfect as you should use an OrderedDict instead of a dict for `parameters=...` Does that helps ? -- M On Thu, Mar 2, 2017 at 12:58 PM, G Jones wrote: > Hi, > Is it possible to customize the completion list when typing keyword > arguments? > For example suppose I have a function like: > def myfunc(**kwargs): > val = kwargs['val'] > > is there a way to tell ipython that when it sees me type: > myfunc(va > > it suggests "val="? > > Thanks, > Glenn > > > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > https://mail.scipy.org/mailman/listinfo/ipython-dev > From glenn.caltech at gmail.com Thu Mar 2 22:20:01 2017 From: glenn.caltech at gmail.com (G Jones) Date: Thu, 2 Mar 2017 22:20:01 -0500 Subject: [IPython-dev] add tab completion for arguments dynamically In-Reply-To: References: Message-ID: Hi Matthias, This seems to be exactly what I'm looking for, and it works fine when I attach a __signature__ attribute to a simple function. I had to install funcsigs because the project I'm working on is stuck with py2.7. However, I am having trouble making it work for a callable class: In [53]: class callme(object): ...: def __call__(self,**kwargs): ...: return kwargs ...: __signature__ = funcsigs.Signature(parameters=[funcsigs.Parameter('long_arg',funcsigs.Parameter.POSITIONAL_OR_KEYWORD)]) In [54]: c = callme() In [55]: c? Type: callme String form: <__main__.callme object at 0x7f63e7124350> Signature: c(long_arg) Docstring: Call signature: c(**kwargs) So far so good, the signature is seen as expected. However, when I try to tab complete with "c(long", long_arg is not in the list of suggestions. Is there a way to accomplish this for a callable class? Thanks, Glenn On Thu, Mar 2, 2017 at 4:25 PM, Matthias Bussonnier < bussonniermatthias at gmail.com> wrote: > Hi Glenn, > > You can set the `__signature__` of your object. likely possible with a > decorator. > Here is a short example of how you could do it in a REPL. > > > In [21]: from inspect import Signature, Parameter > > In [22]: def foo(*kwargs): > ...: pass > > In [23]: foo? > Signature: foo(*kwargs) > Docstring: > File: ~/dev/docathon/ > Type: function > > In [24]: foo.__signature__ = Signature(parameters={Parameter('a', > Parameter.POSITIONAL_OR_KEYWORD):None}) > > In [25]: foo? > Signature: foo(a) > Docstring: > File: ~/dev/docathon/ > Type: function > > > That should not only work with IPython, but with anything that use > the Python inspect library. > > Note that what I do above is imperfect as you should use an > OrderedDict instead of a dict for `parameters=...` > > Does that helps ? > > -- > M > > > On Thu, Mar 2, 2017 at 12:58 PM, G Jones wrote: > > Hi, > > Is it possible to customize the completion list when typing keyword > > arguments? > > For example suppose I have a function like: > > def myfunc(**kwargs): > > val = kwargs['val'] > > > > is there a way to tell ipython that when it sees me type: > > myfunc(va > > > > it suggests "val="? > > > > Thanks, > > Glenn > > > > > > > > _______________________________________________ > > 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: From bussonniermatthias at gmail.com Thu Mar 2 22:50:44 2017 From: bussonniermatthias at gmail.com (Matthias Bussonnier) Date: Thu, 2 Mar 2017 19:50:44 -0800 Subject: [IPython-dev] add tab completion for arguments dynamically In-Reply-To: References: Message-ID: Hi Glenn, Almost there, you need to set signature on __call__ not on the class. In [3]: import inspect ...: class callme(object): ...: def __call__(self,**kwargs): ...: return kwargs ...: ...: ...: callme.__call__.__signature__ = inspect.Signature(parameters={ ...: inspect.Parameter('self',inspect.Parameter.POSITIONAL_OR_KEYWORD):1, ...: inspect.Parameter('long_arg',inspect.Parameter.POSITIONAL_OR_KEYWORD):2 ...: }) ...: In [4]: c = callme() In [5]: c? Signature: c(long_arg) Type: callme String form: <__main__.callme object at 0x11020fb00> Docstring: This seem to work for me on tab completion. -- M On Thu, Mar 2, 2017 at 7:20 PM, G Jones wrote: > Hi Matthias, > This seems to be exactly what I'm looking for, and it works fine when I > attach a __signature__ attribute to a simple function. I had to install > funcsigs because the project I'm working on is stuck with py2.7. > However, I am having trouble making it work for a callable class: > > In [53]: class callme(object): > ...: def __call__(self,**kwargs): > ...: return kwargs > ...: __signature__ = > funcsigs.Signature(parameters=[funcsigs.Parameter('long_arg',funcsigs.Parameter.POSITIONAL_OR_KEYWORD)]) > > In [54]: c = callme() > > In [55]: c? > Type: callme > String form: <__main__.callme object at 0x7f63e7124350> > Signature: c(long_arg) > Docstring: > Call signature: c(**kwargs) > > So far so good, the signature is seen as expected. However, when I try to > tab complete with "c(long", long_arg is not in the list of suggestions. > > Is there a way to accomplish this for a callable class? > > Thanks, > Glenn > > On Thu, Mar 2, 2017 at 4:25 PM, Matthias Bussonnier > wrote: >> >> Hi Glenn, >> >> You can set the `__signature__` of your object. likely possible with a >> decorator. >> Here is a short example of how you could do it in a REPL. >> >> >> In [21]: from inspect import Signature, Parameter >> >> In [22]: def foo(*kwargs): >> ...: pass >> >> In [23]: foo? >> Signature: foo(*kwargs) >> Docstring: >> File: ~/dev/docathon/ >> Type: function >> >> In [24]: foo.__signature__ = Signature(parameters={Parameter('a', >> Parameter.POSITIONAL_OR_KEYWORD):None}) >> >> In [25]: foo? >> Signature: foo(a) >> Docstring: >> File: ~/dev/docathon/ >> Type: function >> >> >> That should not only work with IPython, but with anything that use >> the Python inspect library. >> >> Note that what I do above is imperfect as you should use an >> OrderedDict instead of a dict for `parameters=...` >> >> Does that helps ? >> >> -- >> M >> >> >> On Thu, Mar 2, 2017 at 12:58 PM, G Jones wrote: >> > Hi, >> > Is it possible to customize the completion list when typing keyword >> > arguments? >> > For example suppose I have a function like: >> > def myfunc(**kwargs): >> > val = kwargs['val'] >> > >> > is there a way to tell ipython that when it sees me type: >> > myfunc(va >> > >> > it suggests "val="? >> > >> > Thanks, >> > Glenn >> > >> > >> > >> > _______________________________________________ >> > 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 > > > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > https://mail.scipy.org/mailman/listinfo/ipython-dev > From glenn.caltech at gmail.com Thu Mar 2 23:04:08 2017 From: glenn.caltech at gmail.com (G Jones) Date: Thu, 2 Mar 2017 23:04:08 -0500 Subject: [IPython-dev] add tab completion for arguments dynamically In-Reply-To: References: Message-ID: Hi, Unfortunately in py2.7 it looks like I can't assign to callme.__call__.__signature__ AttributeError: 'instancemethod' object has no attribute '__signature__' I was surprised that providing __signature__ for the class doesn't work, since what little documentation I could find for doing this (i.e. PEP362 and the python 3 inspect.signature documentation) all refers to "a callable object" and PEP362 lists "If the [callable] object has a __signature__ attribute and if it is not None - return it". Anyway, it looks like I may need to use another trick for python2. I appreciate any ideas. Thank you again, Glenn On Thu, Mar 2, 2017 at 10:50 PM, Matthias Bussonnier < bussonniermatthias at gmail.com> wrote: > Hi Glenn, > > Almost there, you need to set signature on __call__ not on the class. > > In [3]: import inspect > ...: class callme(object): > ...: def __call__(self,**kwargs): > ...: return kwargs > ...: > ...: > ...: callme.__call__.__signature__ = inspect.Signature(parameters={ > ...: inspect.Parameter('self',inspect.Parameter.POSITIONAL_ > OR_KEYWORD):1, > ...: inspect.Parameter('long_arg',inspect.Parameter.POSITIONAL_ > OR_KEYWORD):2 > ...: }) > ...: > > In [4]: c = callme() > > In [5]: c? > Signature: c(long_arg) > Type: callme > String form: <__main__.callme object at 0x11020fb00> > Docstring: > > This seem to work for me on tab completion. > -- > M > > On Thu, Mar 2, 2017 at 7:20 PM, G Jones wrote: > > Hi Matthias, > > This seems to be exactly what I'm looking for, and it works fine when I > > attach a __signature__ attribute to a simple function. I had to install > > funcsigs because the project I'm working on is stuck with py2.7. > > However, I am having trouble making it work for a callable class: > > > > In [53]: class callme(object): > > ...: def __call__(self,**kwargs): > > ...: return kwargs > > ...: __signature__ = > > funcsigs.Signature(parameters=[funcsigs.Parameter('long_arg' > ,funcsigs.Parameter.POSITIONAL_OR_KEYWORD)]) > > > > In [54]: c = callme() > > > > In [55]: c? > > Type: callme > > String form: <__main__.callme object at 0x7f63e7124350> > > Signature: c(long_arg) > > Docstring: > > Call signature: c(**kwargs) > > > > So far so good, the signature is seen as expected. However, when I try to > > tab complete with "c(long", long_arg is not in the list of > suggestions. > > > > Is there a way to accomplish this for a callable class? > > > > Thanks, > > Glenn > > > > On Thu, Mar 2, 2017 at 4:25 PM, Matthias Bussonnier > > wrote: > >> > >> Hi Glenn, > >> > >> You can set the `__signature__` of your object. likely possible with a > >> decorator. > >> Here is a short example of how you could do it in a REPL. > >> > >> > >> In [21]: from inspect import Signature, Parameter > >> > >> In [22]: def foo(*kwargs): > >> ...: pass > >> > >> In [23]: foo? > >> Signature: foo(*kwargs) > >> Docstring: > >> File: ~/dev/docathon/ > >> Type: function > >> > >> In [24]: foo.__signature__ = Signature(parameters={Parameter('a', > >> Parameter.POSITIONAL_OR_KEYWORD):None}) > >> > >> In [25]: foo? > >> Signature: foo(a) > >> Docstring: > >> File: ~/dev/docathon/ > >> Type: function > >> > >> > >> That should not only work with IPython, but with anything that use > >> the Python inspect library. > >> > >> Note that what I do above is imperfect as you should use an > >> OrderedDict instead of a dict for `parameters=...` > >> > >> Does that helps ? > >> > >> -- > >> M > >> > >> > >> On Thu, Mar 2, 2017 at 12:58 PM, G Jones > wrote: > >> > Hi, > >> > Is it possible to customize the completion list when typing keyword > >> > arguments? > >> > For example suppose I have a function like: > >> > def myfunc(**kwargs): > >> > val = kwargs['val'] > >> > > >> > is there a way to tell ipython that when it sees me type: > >> > myfunc(va > >> > > >> > it suggests "val="? > >> > > >> > Thanks, > >> > Glenn > >> > > >> > > >> > > >> > _______________________________________________ > >> > 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 > > > > > > > > _______________________________________________ > > 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: From bussonniermatthias at gmail.com Thu Mar 2 23:06:42 2017 From: bussonniermatthias at gmail.com (Matthias Bussonnier) Date: Thu, 2 Mar 2017 20:06:42 -0800 Subject: [IPython-dev] add tab completion for arguments dynamically In-Reply-To: References: Message-ID: Hum, sorry about that. I'm unsure how to do it in Python 2 then. Let us know if you figured it out. -- < On Thu, Mar 2, 2017 at 8:04 PM, G Jones wrote: > Hi, > Unfortunately in py2.7 it looks like I can't assign to > callme.__call__.__signature__ > > AttributeError: 'instancemethod' object has no attribute '__signature__' > > I was surprised that providing __signature__ for the class doesn't work, > since what little documentation I could find for doing this (i.e. PEP362 and > the python 3 inspect.signature documentation) all refers to "a callable > object" and PEP362 lists "If the [callable] object has a __signature__ > attribute and if it is not None - return it". > > Anyway, it looks like I may need to use another trick for python2. I > appreciate any ideas. > > Thank you again, > Glenn > > On Thu, Mar 2, 2017 at 10:50 PM, Matthias Bussonnier > wrote: >> >> Hi Glenn, >> >> Almost there, you need to set signature on __call__ not on the class. >> >> In [3]: import inspect >> ...: class callme(object): >> ...: def __call__(self,**kwargs): >> ...: return kwargs >> ...: >> ...: >> ...: callme.__call__.__signature__ = inspect.Signature(parameters={ >> ...: >> inspect.Parameter('self',inspect.Parameter.POSITIONAL_OR_KEYWORD):1, >> ...: >> inspect.Parameter('long_arg',inspect.Parameter.POSITIONAL_OR_KEYWORD):2 >> ...: }) >> ...: >> >> In [4]: c = callme() >> >> In [5]: c? >> Signature: c(long_arg) >> Type: callme >> String form: <__main__.callme object at 0x11020fb00> >> Docstring: >> >> This seem to work for me on tab completion. >> -- >> M >> >> On Thu, Mar 2, 2017 at 7:20 PM, G Jones wrote: >> > Hi Matthias, >> > This seems to be exactly what I'm looking for, and it works fine when I >> > attach a __signature__ attribute to a simple function. I had to install >> > funcsigs because the project I'm working on is stuck with py2.7. >> > However, I am having trouble making it work for a callable class: >> > >> > In [53]: class callme(object): >> > ...: def __call__(self,**kwargs): >> > ...: return kwargs >> > ...: __signature__ = >> > >> > funcsigs.Signature(parameters=[funcsigs.Parameter('long_arg',funcsigs.Parameter.POSITIONAL_OR_KEYWORD)]) >> > >> > In [54]: c = callme() >> > >> > In [55]: c? >> > Type: callme >> > String form: <__main__.callme object at 0x7f63e7124350> >> > Signature: c(long_arg) >> > Docstring: >> > Call signature: c(**kwargs) >> > >> > So far so good, the signature is seen as expected. However, when I try >> > to >> > tab complete with "c(long", long_arg is not in the list of >> > suggestions. >> > >> > Is there a way to accomplish this for a callable class? >> > >> > Thanks, >> > Glenn >> > >> > On Thu, Mar 2, 2017 at 4:25 PM, Matthias Bussonnier >> > wrote: >> >> >> >> Hi Glenn, >> >> >> >> You can set the `__signature__` of your object. likely possible with a >> >> decorator. >> >> Here is a short example of how you could do it in a REPL. >> >> >> >> >> >> In [21]: from inspect import Signature, Parameter >> >> >> >> In [22]: def foo(*kwargs): >> >> ...: pass >> >> >> >> In [23]: foo? >> >> Signature: foo(*kwargs) >> >> Docstring: >> >> File: ~/dev/docathon/ >> >> Type: function >> >> >> >> In [24]: foo.__signature__ = Signature(parameters={Parameter('a', >> >> Parameter.POSITIONAL_OR_KEYWORD):None}) >> >> >> >> In [25]: foo? >> >> Signature: foo(a) >> >> Docstring: >> >> File: ~/dev/docathon/ >> >> Type: function >> >> >> >> >> >> That should not only work with IPython, but with anything that use >> >> the Python inspect library. >> >> >> >> Note that what I do above is imperfect as you should use an >> >> OrderedDict instead of a dict for `parameters=...` >> >> >> >> Does that helps ? >> >> >> >> -- >> >> M >> >> >> >> >> >> On Thu, Mar 2, 2017 at 12:58 PM, G Jones >> >> wrote: >> >> > Hi, >> >> > Is it possible to customize the completion list when typing keyword >> >> > arguments? >> >> > For example suppose I have a function like: >> >> > def myfunc(**kwargs): >> >> > val = kwargs['val'] >> >> > >> >> > is there a way to tell ipython that when it sees me type: >> >> > myfunc(va >> >> > >> >> > it suggests "val="? >> >> > >> >> > Thanks, >> >> > Glenn >> >> > >> >> > >> >> > >> >> > _______________________________________________ >> >> > 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 >> > >> > >> > >> > _______________________________________________ >> > 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 > > > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > https://mail.scipy.org/mailman/listinfo/ipython-dev > From fperez.net at gmail.com Sat Mar 4 00:16:39 2017 From: fperez.net at gmail.com (Fernando Perez) Date: Fri, 3 Mar 2017 21:16:39 -0800 Subject: [IPython-dev] Problem with I-Search when Using IPython in VSCode's Integrated Terminal In-Reply-To: References: Message-ID: On Sat, Feb 4, 2017 at 10:31 AM, Carl Smith wrote: > Thanks Thomas. I'll see if I can figure it out first. Just thought it was > worth asking here, as I was at a loss, and it's one of those things that > are hard to search for on Google. FWIW, Carl, I use VSCode regularly and just tested, and at least with current VSC (1.10) and master IPython, I can't seem to reproduce the problem you mention. Do let us know if it recurs, I think there's a few of us who have switched to VSCode and may be able to help. Cheers, f -- Fernando Perez (@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: From carl.input at gmail.com Sat Mar 4 10:29:31 2017 From: carl.input at gmail.com (Carl Smith) Date: Sat, 4 Mar 2017 15:29:31 +0000 Subject: [IPython-dev] Problem with I-Search when Using IPython in VSCode's Integrated Terminal In-Reply-To: References: Message-ID: > FWIW, Carl, I use VSCode regularly and just tested, and at least with > current VSC (1.10) and master IPython, I can't seem to reproduce the > problem you mention. Do let us know if it recurs, I think there's a few of > us who have switched to VSCode and may be able to help. > ?Thanks mate. Will do. To be honest, I pretty sure now that it's something wrong with my local setup. I do have some keyboard hacks configured, so may have just shot myself in the foot. Sorry for the noise. -------------- next part -------------- An HTML attachment was scrubbed... URL: From mhearne at usgs.gov Wed Mar 8 11:48:32 2017 From: mhearne at usgs.gov (Hearne, Mike) Date: Wed, 8 Mar 2017 08:48:32 -0800 Subject: [IPython-dev] Scipy 2017 Jupyter Tutorials Message-ID: Greetings to all Jupyter developers and devotees! The 2017 Scipy Tutorial Committee is looking for proposals for tutorials for this summers SciPy Conference. In particular, we were hoping that someone from the Jupyter community would be interested in putting together a tutorial(s) on Jupyter. Primarily we think a tutorial focusing on an introduction to Jupyter would be helpful, as well as (possibly) a second tutorial for more experienced users, focusing on widgets or other more advanced functionality. One note: In years past, we have gotten comments that a lot of attendees at Scipy are not as interested in JavaScript-heavy tutorials, so perhaps factor that into any planning. The web page below has all of the information for tutorial submitters, including guidance on what should be in the proposal, schedules, and stipends (!) http://scipy2017.scipy.org/ehome/220975/493424/ Information about SciPy: SciPy 2017, the 16th annual Scientific Computing with Python conference, will be held July 10-16, 2017 in Austin, Texas. The annual SciPy Conference brings together over 700 participants from industry, academia, and government to showcase their latest projects, learn from skilled users and developers, and collaborate on code development. The full program will consist of 2 days of tutorials (July 10-11), 3 days of talks (July 12-14), and 2 days of developer sprints (July 15-16). --The SciPy 2017 Tutorials Committee From mattwcraig at gmail.com Wed Mar 8 12:20:37 2017 From: mattwcraig at gmail.com (Matt Craig) Date: Wed, 8 Mar 2017 11:20:37 -0600 Subject: [IPython-dev] Scipy 2017 Jupyter Tutorials In-Reply-To: References: Message-ID: Hi, Good news -- Sylvain Corley, Jason Grout and I are working on a widget tutorial. If others are interested please let me know. Matt Craig On Wed, Mar 8, 2017 at 10:48 AM, Hearne, Mike wrote: > Greetings to all Jupyter developers and devotees! The 2017 Scipy > Tutorial Committee is looking for proposals for tutorials for this > summers SciPy Conference. In particular, we were hoping that someone > from the Jupyter community would be interested in putting together a > tutorial(s) on Jupyter. Primarily we think a tutorial focusing on an > introduction to Jupyter would be helpful, as well as (possibly) a > second tutorial for more experienced users, focusing on widgets or > other more advanced functionality. > > One note: In years past, we have gotten comments that a lot of > attendees at Scipy are not as interested in JavaScript-heavy > tutorials, so perhaps factor that into any planning. > > The web page below has all of the information for tutorial submitters, > including guidance on what should be in the proposal, schedules, and > stipends (!) > > http://scipy2017.scipy.org/ehome/220975/493424/ > > Information about SciPy: > > SciPy 2017, the 16th annual Scientific Computing with Python > conference, will be held July 10-16, 2017 in Austin, Texas. The annual > SciPy Conference brings together over 700 participants from industry, > academia, and government to showcase their latest projects, learn from > skilled users and developers, and collaborate on code development. The > full program will consist of 2 days of tutorials (July 10-11), 3 days > of talks (July 12-14), and 2 days of developer sprints (July 15-16). > > --The SciPy 2017 Tutorials Committee > _______________________________________________ > 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: From mattwcraig at gmail.com Wed Mar 8 12:23:19 2017 From: mattwcraig at gmail.com (Matt Craig) Date: Wed, 8 Mar 2017 11:23:19 -0600 Subject: [IPython-dev] Scipy 2017 Jupyter Tutorials In-Reply-To: References: Message-ID: Oops, misspelled one of the names...sorry about that, Sylvain Corlay. Matt Craig On Wed, Mar 8, 2017 at 11:20 AM, Matt Craig wrote: > Hi, > > Good news -- Sylvain Corley, Jason Grout and I are working on a > widget tutorial. If others are interested please let me know. > > Matt Craig > > > On Wed, Mar 8, 2017 at 10:48 AM, Hearne, Mike wrote: > >> Greetings to all Jupyter developers and devotees! The 2017 Scipy >> Tutorial Committee is looking for proposals for tutorials for this >> summers SciPy Conference. In particular, we were hoping that someone >> from the Jupyter community would be interested in putting together a >> tutorial(s) on Jupyter. Primarily we think a tutorial focusing on an >> introduction to Jupyter would be helpful, as well as (possibly) a >> second tutorial for more experienced users, focusing on widgets or >> other more advanced functionality. >> >> One note: In years past, we have gotten comments that a lot of >> attendees at Scipy are not as interested in JavaScript-heavy >> tutorials, so perhaps factor that into any planning. >> >> The web page below has all of the information for tutorial submitters, >> including guidance on what should be in the proposal, schedules, and >> stipends (!) >> >> http://scipy2017.scipy.org/ehome/220975/493424/ >> >> Information about SciPy: >> >> SciPy 2017, the 16th annual Scientific Computing with Python >> conference, will be held July 10-16, 2017 in Austin, Texas. The annual >> SciPy Conference brings together over 700 participants from industry, >> academia, and government to showcase their latest projects, learn from >> skilled users and developers, and collaborate on code development. The >> full program will consist of 2 days of tutorials (July 10-11), 3 days >> of talks (July 12-14), and 2 days of developer sprints (July 15-16). >> >> --The SciPy 2017 Tutorials Committee >> _______________________________________________ >> 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: From damianavila at gmail.com Sun Mar 19 21:22:04 2017 From: damianavila at gmail.com (=?UTF-8?Q?Dami=C3=A1n_Avila?=) Date: Sun, 19 Mar 2017 22:22:04 -0300 Subject: [IPython-dev] [ANN ] Jupyter tools: tex2ipy and ipyaml In-Reply-To: References: <5c7c9601-620c-36f1-7a93-50b5bd9f6045@aero.iitb.ac.in> Message-ID: > tex2ipy: https://github.com/prabhuramachandran/tex2ipy >This simple tool makes it relatively easy to convert a LaTeX beamer presentation to a Jupyter/IPython notebook using RISE[1]. Really interesting (some bias here ;-) Thanks for sharing it! 2017-02-22 22:17 GMT-03:00 Fernando Perez : > > On Tue, Feb 21, 2017 at 2:05 PM, Brian Granger > wrote: > >> Very cool! Thanks for sharing! > > > +1! > > Which reminds me of this: > > https://github.com/pypa/pypi-legacy/issues/210 > > It would be really nice to have a "Jupyter" trove classifier for PyPI, so > we could quickly find Jupyter-related packages... That would be useful on > multiple fronts for us... > > Cheers > > f > -- > Fernando Perez (@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 > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > https://mail.scipy.org/mailman/listinfo/ipython-dev > > -- *Dami?n Avila* -------------- next part -------------- An HTML attachment was scrubbed... URL: From knowsuchagency at gmail.com Sun Mar 19 23:04:38 2017 From: knowsuchagency at gmail.com (Stephan Fitzpatrick) Date: Sun, 19 Mar 2017 20:04:38 -0700 Subject: [IPython-dev] Integrating mypy with IPython using custom magic Message-ID: For those interested, I wrote a cell magic to allow one to run a cell through mypy . The link to the gist is here . Anyone interested in the article on how/why I wrote it with example code can find it here . Cheers. -- *Stephan Fitzpatrick* *Software Developer* Facebook LinkedIn Twitter Github -------------- next part -------------- An HTML attachment was scrubbed... URL: From didaci at diee.unica.it Mon Mar 20 08:10:16 2017 From: didaci at diee.unica.it (Luca Didaci) Date: Mon, 20 Mar 2017 13:10:16 +0100 Subject: [IPython-dev] pdf slides from a Jupyter/IPython notebook using RISE Message-ID: Dear All, there is a way to obtain pdf slides from a Jupyter/IPython notebook using damianavila/RISE ? Using nbconvert I CAN'T obtain pdf slides with a page for each page shown in RISE. Thanks! Luca From takowl at gmail.com Mon Mar 20 10:51:58 2017 From: takowl at gmail.com (Thomas Kluyver) Date: Mon, 20 Mar 2017 14:51:58 +0000 Subject: [IPython-dev] Integrating mypy with IPython using custom magic In-Reply-To: References: Message-ID: Neat, thanks Stephan! On 20 March 2017 at 03:04, Stephan Fitzpatrick wrote: > For those interested, I wrote a cell magic to allow one to run a cell > through > mypy . > > The link to the gist is here > . > > Anyone interested in the article on how/why I wrote it with example code > can find it here > . > > Cheers. > > -- > *Stephan Fitzpatrick* > *Software Developer* > Facebook > LinkedIn > Twitter > Github > > _______________________________________________ > 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: From davidgshi at yahoo.co.uk Mon Mar 20 10:54:50 2017 From: davidgshi at yahoo.co.uk (David Shi) Date: Mon, 20 Mar 2017 14:54:50 +0000 (UTC) Subject: [IPython-dev] How to search out all Zip codes and replace with the first 2 digits, in a Pandas dataframe, with the use of regex? References: <1986072713.6500604.1490021690461.ref@mail.yahoo.com> Message-ID: <1986072713.6500604.1490021690461@mail.yahoo.com> Hi, there, Can anyone help? How to search out all Zip codes and replace with the first 2 digits, in a Pandas dataframe, with the use of regex? For instance, a ZIP code 33132 was found and replaced with 33. Looking forward to hearing from you. Regards. David -------------- next part -------------- An HTML attachment was scrubbed... URL: From takowl at gmail.com Mon Mar 20 11:07:15 2017 From: takowl at gmail.com (Thomas Kluyver) Date: Mon, 20 Mar 2017 15:07:15 +0000 Subject: [IPython-dev] pdf slides from a Jupyter/IPython notebook using RISE In-Reply-To: References: Message-ID: You can try going into slideshow mode and then using the browser's print function. I think this has been a problem in the past, though, and I don't know if it's any better now. On 20 March 2017 at 12:10, Luca Didaci wrote: > Dear All, > > there is a way to obtain pdf slides from a Jupyter/IPython notebook using > damianavila/RISE ? > > Using nbconvert I CAN'T obtain pdf slides with a page for each page shown > in RISE. > > Thanks! > Luca > > _______________________________________________ > 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: From fperez.net at gmail.com Mon Mar 20 13:24:00 2017 From: fperez.net at gmail.com (Fernando Perez) Date: Mon, 20 Mar 2017 10:24:00 -0700 Subject: [IPython-dev] pdf slides from a Jupyter/IPython notebook using RISE In-Reply-To: References: Message-ID: On Mon, Mar 20, 2017 at 8:07 AM, Thomas Kluyver wrote: > You can try going into slideshow mode and then using the browser's print > function. I think this has been a problem in the past, though, and I don't > know if it's any better now. Supposedly adding `?print-pdf` to the URL makes this possible, but I know I and others have struggled with making it work reliably; e.g. https://github.com/hakimel/reveal.js/issues/1252. Some more (old) background is here: https://github.com/ipython/ipython/issues/3993. I haven't tested recently, so I have no idea if it's any better. Would love to hear if anyone has a reliable solution for this, coincidentally a colleague was asking me about this very problem just a few days ago. Cheers f -- Fernando Perez (@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: From fperez.net at gmail.com Mon Mar 20 13:45:55 2017 From: fperez.net at gmail.com (Fernando Perez) Date: Mon, 20 Mar 2017 10:45:55 -0700 Subject: [IPython-dev] Integrating mypy with IPython using custom magic In-Reply-To: References: Message-ID: On Sun, Mar 19, 2017 at 8:04 PM, Stephan Fitzpatrick < knowsuchagency at gmail.com> wrote: > For those interested, I wrote a cell magic to allow one to run a cell > through > mypy . > > The link to the gist is here > . > Cool, thanks! This would make for a nice newsletter item! > Anyone interested in the article on how/why I wrote it with example code > can find it here > . > Quick q: you mention you configured IPython to print not only the last evaluated statement but more than that. I admit I didn't realize we'd made that configurable! (not too surprising, the project has grown so much there's quite a bit of the codebase, even in the IPython kernel, I don't recognize anymore). Can you point me to how you did it? Would love to learn :) Cheers f -- Fernando Perez (@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: From fperez.net at gmail.com Mon Mar 20 14:32:41 2017 From: fperez.net at gmail.com (Fernando Perez) Date: Mon, 20 Mar 2017 11:32:41 -0700 Subject: [IPython-dev] [IPython-User] ipyparallel: Can't pickly memoryview objects In-Reply-To: References: Message-ID: Hi Florian, sorry, this list is mostly deprecated, with all IPython discussions now happening on a single list: https://mail.scipy.org/mailman/listinfo/ipython-dev The issue is the closure over xs in your lambda; pickle doesn't know how to serialize closures. You can make it work if you enable the cloudpickle serializer instead: dview.use_cloudpickle() as indicated here: http://ipyparallel.readthedocs.io/en/latest/details.html#closures An interesting tidbit is that if you move the code in `main` out to the top-level of the script and manually push `xs` as well, the code works fine even without the cloudpickle change. That's because names that require a lookup into globals() don't require the creation of a closure object, as explained in the link above. Cheers, f On Thu, Mar 16, 2017 at 2:07 AM, Florian Lindner wrote: > Hello, > > I have this small sample program: > > import ipyparallel as ipp, numpy as np > > class X: > def __init__(self, x, xs): > self.A = np.full((10, 10), x) > np.fill_diagonal(self.A, x*10) > > def norm(self): > return np.linalg.norm(self.A) > > > def main(): > rc = ipp.Client() > lview = rc.load_balanced_view() > dview = rc[:] > dview.push({"X" : X}) > dview.execute("import numpy as np") > > xs = np.linspace(1, 100, 10) > sqxs = [] > > sqxs = lview.map(lambda x: X(x, xs), xs) > sqxs.wait() > > for i in sqxs: > print(i.norm()) > > if __name__ == "__main__": > main() > > > trying it to run gives TypeError: can't pickle memoryview objects. > Probably because I provide the xs array to X. > > How can I work around this situation? > > Thanks, > Florian > > Complete traceback: > > Traceback (most recent call last): > File "ipython_parallel.py", line 30, in > main() > File "ipython_parallel.py", line 23, in main > sqxs = lview.map(lambda x: X(x, xs), xs) > File "", line 2, in map > File "/usr/lib/python3.6/site-packages/ipyparallel/client/view.py", > line 50, in sync_results > ret = f(self, *args, **kwargs) > File "", line 2, in map > File "/usr/lib/python3.6/site-packages/ipyparallel/client/view.py", > line 35, in save_ids > ret = f(self, *args, **kwargs) > File "/usr/lib/python3.6/site-packages/ipyparallel/client/view.py", > line 1109, in map > return pf.map(*sequences) > File "/usr/lib/python3.6/site-packages/ipyparallel/client/remotefunction.py", > line 285, in map > return self(*sequences, __ipp_mapping=True) > File "", line 2, in __call__ > File "/usr/lib/python3.6/site-packages/ipyparallel/client/remotefunction.py", > line 76, in sync_view_results > return f(self, *args, **kwargs) > File "/usr/lib/python3.6/site-packages/ipyparallel/client/remotefunction.py", > line 259, in __call__ > ar = view.apply(f, *args) > File "/usr/lib/python3.6/site-packages/ipyparallel/client/view.py", > line 211, in apply > return self._really_apply(f, args, kwargs) > File "", line 2, in _really_apply > File "/usr/lib/python3.6/site-packages/ipyparallel/client/view.py", > line 47, in sync_results > return f(self, *args, **kwargs) > File "", line 2, in _really_apply > File "/usr/lib/python3.6/site-packages/ipyparallel/client/view.py", > line 35, in save_ids > ret = f(self, *args, **kwargs) > File "/usr/lib/python3.6/site-packages/ipyparallel/client/view.py", > line 1037, in _really_apply > metadata=metadata) > File "/usr/lib/python3.6/site-packages/ipyparallel/client/client.py", > line 1395, in send_apply_request > item_threshold=self.session.item_threshold, > File "/usr/lib/python3.6/site-packages/ipyparallel/serialize/serialize.py", > line 166, in pack_apply_message > serialize_object(arg, buffer_threshold, item_threshold) for arg in > args)) > File "/usr/lib/python3.6/site-packages/ipyparallel/serialize/serialize.py", > line 166, in > serialize_object(arg, buffer_threshold, item_threshold) for arg in > args)) > File "/usr/lib/python3.6/site-packages/ipyparallel/serialize/serialize.py", > line 112, in serialize_object > buffers.insert(0, pickle.dumps(cobj, PICKLE_PROTOCOL)) > TypeError: can't pickle memoryview objects > > _______________________________________________ > IPython-User mailing list > IPython-User at scipy.org > https://mail.scipy.org/mailman/listinfo/ipython-user > -- Fernando Perez (@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: From takowl at gmail.com Wed Mar 22 09:38:37 2017 From: takowl at gmail.com (Thomas Kluyver) Date: Wed, 22 Mar 2017 13:38:37 +0000 Subject: [IPython-dev] [SciPy-User] migration of all scipy.org mailing lists In-Reply-To: References: Message-ID: We may ask you to move ipython-user into the 'retire' bucket; we've been gradually winding it down for a couple of years, and this seems to me like a good moment to finally shutter it. IPython people, does this sound reasonable to you? ipython-dev is still in active use, so +1 to migrating that. On 22 March 2017 at 09:24, Ralf Gommers wrote: > (and now with Didrik on Cc - apologies) > > > > > On Wed, Mar 22, 2017 at 10:23 PM, Ralf Gommers > wrote: > >> Hi all, >> >> The server for the scipy.org mailing list is in very bad shape, so we >> (led by Didrik Pinte) are planning to complete the migration of active >> mailing lists to the python.org infrastructure and to decommission the >> lists than seem dormant/obsolete. >> >> The scipy-user mailing list was already moved to python.org a month or >> two ago, and that migration went smoothly. >> >> These are the lists we plan to migrate: >> >> astropy >> ipython-dev >> ipython-user >> numpy-discussion >> numpy-svn >> scipy-dev >> scipy-organizers >> scipy-svn >> >> And these we plan to retire: >> >> Announce >> APUG >> Ipython-tickets >> Mailman >> numpy-refactor >> numpy-refactor-git >> numpy-tickets >> Pyxg >> scipy-tickets >> NiPy-devel >> >> There will be a short period (<24 hours) where messages to the list may >> be refused, with an informative message as to why. The mailing list address >> will change from listname at scipy.org to listname at python.org >> >> This will happen asap, likely within a day or two. So two requests: >> 1. If you see any issue with this plan, please reply and keep Didrik and >> myself on Cc (we are not subscribed to all lists). >> 2. If you see this message on a numpy/scipy list, but not on another list >> (could be due to a moderation queue) then please forward this message again >> to that other list. >> >> Thanks, >> Ralf >> >> >> >> > > _______________________________________________ > SciPy-User mailing list > SciPy-User at python.org > https://mail.python.org/mailman/listinfo/scipy-user > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From benjaminrk at gmail.com Wed Mar 22 11:50:32 2017 From: benjaminrk at gmail.com (MinRK) Date: Wed, 22 Mar 2017 16:50:32 +0100 Subject: [IPython-dev] [SciPy-User] migration of all scipy.org mailing lists In-Reply-To: References: Message-ID: On Wed, Mar 22, 2017 at 2:38 PM, Thomas Kluyver wrote: > We may ask you to move ipython-user into the 'retire' bucket; we've been > gradually winding it down for a couple of years, and this seems to me like > a good moment to finally shutter it. IPython people, does this sound > reasonable to you? > > ipython-dev is still in active use, so +1 to migrating that. > sounds good to me. > > On 22 March 2017 at 09:24, Ralf Gommers wrote: > >> (and now with Didrik on Cc - apologies) >> >> >> >> >> On Wed, Mar 22, 2017 at 10:23 PM, Ralf Gommers >> wrote: >> >>> Hi all, >>> >>> The server for the scipy.org mailing list is in very bad shape, so we >>> (led by Didrik Pinte) are planning to complete the migration of active >>> mailing lists to the python.org infrastructure and to decommission the >>> lists than seem dormant/obsolete. >>> >>> The scipy-user mailing list was already moved to python.org a month or >>> two ago, and that migration went smoothly. >>> >>> These are the lists we plan to migrate: >>> >>> astropy >>> ipython-dev >>> ipython-user >>> numpy-discussion >>> numpy-svn >>> scipy-dev >>> scipy-organizers >>> scipy-svn >>> >>> And these we plan to retire: >>> >>> Announce >>> APUG >>> Ipython-tickets >>> Mailman >>> numpy-refactor >>> numpy-refactor-git >>> numpy-tickets >>> Pyxg >>> scipy-tickets >>> NiPy-devel >>> >>> There will be a short period (<24 hours) where messages to the list may >>> be refused, with an informative message as to why. The mailing list address >>> will change from listname at scipy.org to listname at python.org >>> >>> This will happen asap, likely within a day or two. So two requests: >>> 1. If you see any issue with this plan, please reply and keep Didrik >>> and myself on Cc (we are not subscribed to all lists). >>> 2. If you see this message on a numpy/scipy list, but not on another >>> list (could be due to a moderation queue) then please forward this message >>> again to that other list. >>> >>> Thanks, >>> Ralf >>> >>> >>> >>> >> >> _______________________________________________ >> SciPy-User mailing list >> SciPy-User at python.org >> https://mail.python.org/mailman/listinfo/scipy-user >> >> > > _______________________________________________ > 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: From fperez.net at gmail.com Wed Mar 22 12:12:10 2017 From: fperez.net at gmail.com (Fernando Perez) Date: Wed, 22 Mar 2017 09:12:10 -0700 Subject: [IPython-dev] [SciPy-User] migration of all scipy.org mailing lists In-Reply-To: References: Message-ID: On Wed, Mar 22, 2017 at 8:50 AM, MinRK wrote: > On Wed, Mar 22, 2017 at 2:38 PM, Thomas Kluyver wrote: > >> We may ask you to move ipython-user into the 'retire' bucket; we've been >> gradually winding it down for a couple of years, and this seems to me like >> a good moment to finally shutter it. IPython people, does this sound >> reasonable to you? >> >> ipython-dev is still in active use, so +1 to migrating that. >> > > sounds good to me. > I was also thinking of using this as an opportunity to stop ipython-user, activity there has truly slowed to a trickle. We should announce prominently that on ipython-user *before* it stops working, though :), and point people to ipython-dev at python.org for IPython-specific material, and the general Jupyter list for the rest. Cheers f -- Fernando Perez (@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: From damianavila at gmail.com Wed Mar 22 12:50:37 2017 From: damianavila at gmail.com (=?UTF-8?Q?Dami=C3=A1n_Avila?=) Date: Wed, 22 Mar 2017 13:50:37 -0300 Subject: [IPython-dev] [SciPy-User] migration of all scipy.org mailing lists In-Reply-To: References: Message-ID: ipython-dev is still in active use, so +1 to migrating that. +1 >We should announce prominently that on ipython-user *before* it stops working, though :), and point people to ipython-dev at python.org for IPython-specific material, and the general Jupyter list for the rest. +1 as well. 2017-03-22 13:12 GMT-03:00 Fernando Perez : > > On Wed, Mar 22, 2017 at 8:50 AM, MinRK wrote: > >> On Wed, Mar 22, 2017 at 2:38 PM, Thomas Kluyver wrote: >> >>> We may ask you to move ipython-user into the 'retire' bucket; we've been >>> gradually winding it down for a couple of years, and this seems to me like >>> a good moment to finally shutter it. IPython people, does this sound >>> reasonable to you? >>> >>> ipython-dev is still in active use, so +1 to migrating that. >>> >> >> sounds good to me. >> > > I was also thinking of using this as an opportunity to stop ipython-user, > activity there has truly slowed to a trickle. > > We should announce prominently that on ipython-user *before* it stops > working, though :), and point people to ipython-dev at python.org for > IPython-specific material, and the general Jupyter list for the rest. > > Cheers > > f > -- > Fernando Perez (@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 > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > https://mail.scipy.org/mailman/listinfo/ipython-dev > > -- *Dami?n Avila* -------------- next part -------------- An HTML attachment was scrubbed... URL: