Jupyter notebook plugin that allows you to search for code snippets

186 views
Skip to first unread message

Jared Burgess

unread,
Dec 2, 2015, 8:06:46 AM12/2/15
to Project Jupyter

Hi All,


I am working on jupyter notebook plugin that allows users to search for code snippets with a library and function name, it then returns the function signature (which includes a link to the documentation) and an example code snippet (from Stack Overflow), see the screenshot below for the example.




It’s not quite ready yet, but I would love to hear your thoughts before releasing the alpha!


A bit of additional information around how it functions, currently is is bound to the hotkey "alt + /", it will either submit the active line you're on (in the code cell), or submit text you have specifically selected within the cell. The result is then returned in the cell output. If the cell is executed, the output of the code execution will replace the result (so there is no need to manually remove the result after you have finished with it).


Peter Parente

unread,
Dec 2, 2015, 11:02:05 AM12/2/15
to Project Jupyter


On Wednesday, December 2, 2015 at 8:06:46 AM UTC-5, Jared Burgess wrote:

Hi All,


I am working on jupyter notebook plugin that allows users to search for code snippets with a library and function name, it then returns the function signature (which includes a link to the documentation) and an example code snippet (from Stack Overflow), see the screenshot below for the example.


Very nice. 

I wonder if it could be a next-level feature in the https://github.com/jupyter-incubator/contentmangement extension instead of a standalone one? The content management extension already supports search over local notebooks, an %inject magic for pull snippets from local notebooks, and the ability to invoke annotated functions in other notebooks as APIs. It sounds like a natural progression from reusing snippets locally to finding and reusing snippets remotely.

Happy to discuss integration if it makes sense.

Cheers,
Pete

Jared Burgess

unread,
Dec 3, 2015, 11:28:23 AM12/3/15
to Project Jupyter
Hi Pete,

I had a look at the youtube conference video on the contentmanager extension, I was impressed with the added functionality of the internal search using Whoosh, and local snippet injection, it is essentially the other side of the coin. I am currently working as part of a project called Stepsize (a team of four). We are actively carrying out ML based projects and experiments to improve code search and ultimately automate some aspects of software development.


I would be very interested in discussing more about the future of your contentmanager extension and our extension in more detail. I’ll send you a tweet so we can continue this discussion further!


Reply all
Reply to author
Forward
0 new messages