Re: [jupyter] command line ipython kernel incantation / API?

2017-06-05 Thread Matthias Bussonnier
Hi John,

The (best?) place to start is Jupyter Client docs [1], if you want to
communicate with a pure kernel you'll have to use ZMQ – not much
harder than HTTP[2], it's basically sockets on steroids –. and you
want to manually use `python -m ipykernel ` to start
a python kernel. The connection file give you infomations on how to
bind/connect ZMQ ports. The "Making a kernel" part is the most
complete (as that's what usually people are interested in), and we
should improve the "making a client" part (maybe with your help ?).
Regardless bug report welcome, and despite the jupyter_client
implementation being in Python, any example in documentation in other
languages welcome.

Hope that helps get you started.

Cheers
-- 
M
[1] http://jupyter-client.readthedocs.io/en/latest/
[2] the "Http" communication with kernels is actually websoket, and
the `jupyter notebook`application is a websocket<->ZMQ bridge.

On Mon, Jun 5, 2017 at 9:31 PM, John Kitchin  wrote:
> Hi,
>
> I was wondering if there is a command to start an ipython kernel that you
> can communicate with through http requests. I want to communicate with the
> kernel through emacs to execute  code blocks, inspect things, get completion
> targets, and to interrupt the kernel.  I haven't found any specific
> documentation that suggests this exists though.
>
> I am familiar with the EIN project, but it does not seem to work for me. I
> also know of the ob-ipython project. I currently use that, but it has its
> own python driver to create a web server attached to a kernel. It does not
> support completion or interruption though, and it isn't obvious how to
> extend it.
>
> Thanks!
>
> --
> You received this message because you are subscribed to the Google Groups
> "Project Jupyter" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jupyter+unsubscr...@googlegroups.com.
> To post to this group, send email to jupyter@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jupyter/fc7035bb-e5f1-43cc-ae05-47ce64243907%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jupyter+unsubscr...@googlegroups.com.
To post to this group, send email to jupyter@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jupyter/CANJQusUR6sJdhgj36HBNsEiLPKE37zYP%3DjhusjXyOLRhz8yyKA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[jupyter] command line ipython kernel incantation / API?

2017-06-05 Thread John Kitchin
Hi,

I was wondering if there is a command to start an ipython kernel that you 
can communicate with through http requests. I want to communicate with the 
kernel through emacs to execute  code blocks, inspect things, get 
completion targets, and to interrupt the kernel.  I haven't found any 
specific documentation that suggests this exists though.

I am familiar with the EIN project, but it does not seem to work for me. I 
also know of the ob-ipython project. I currently use that, but it has its 
own python driver to create a web server attached to a kernel. It does not 
support completion or interruption though, and it isn't obvious how to 
extend it.

Thanks!

-- 
You received this message because you are subscribed to the Google Groups 
"Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jupyter+unsubscr...@googlegroups.com.
To post to this group, send email to jupyter@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jupyter/fc7035bb-e5f1-43cc-ae05-47ce64243907%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [jupyter] Syncronize Code Between Jupyter and External Scripts

2017-06-05 Thread Brian Granger
I think the best way to start playing with this is to build it as an
extension, and use notebook metadata that tracks separate file should
be pointed to by a given cell. I completely agree this is an good
usage case.

On Sat, Jun 3, 2017 at 11:19 AM, Utkonos  wrote:
> I have been running into the following problem with regards to developing in
> Jupyter and then deploying the code elsewhere. The code as deployed may have
> a bug or change that needs to occur, and then the code from the cell where
> it was located in the Jupyter notebook is now different and out of sync. I
> would like to know how to keep code in a cell synchronized with code outside
> in another file. I found the following question on StackOverflow that
> pertains to this problem exactly:
> https://stackoverflow.com/questions/38770604/synchronizing-code-between-jupyter-ipython-notebook-script-and-class-methods
>
> I will try this method of workflow, but I am curious whether there is a
> better mousetrap out there.
>
> Here is my alternative, and I'd like to know the feasibility of it and
> whether it's a good idea or not:
>
> There are multiple types of cell in Jupyter, and they behave differently. I
> am proposing a new type of cell called "Linked Snippet". A linked snippet
> cell would initially have a start and end line number and a file path. As
> long as the user the notebook is running as has write access the file path,
> the lines of code would be pulled into the cell. This code would be editable
> in jupyter, but would have the option of saving the contents of the cell and
> replacing the code between the two line numbers in the external file. This
> means no cells can overlap line numbers, and this would need to be enforced
> properly in Jupyter. Ideally, this would be bi-directional, and if the code
> in the external file changed, Jupyter would offer the user a chance to
> reload the cell before running. It also may need to change the line numbers
> that are syncronized at this point to make sure that the expected code is
> loaded into the cell.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Project Jupyter" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jupyter+unsubscr...@googlegroups.com.
> To post to this group, send email to jupyter@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jupyter/ae6819f5-f422-43aa-b7bf-0ba63bc523cd%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



-- 
Brian E. Granger
Associate Professor of Physics and Data Science
Cal Poly State University, San Luis Obispo
@ellisonbg on Twitter and GitHub
bgran...@calpoly.edu and elliso...@gmail.com

-- 
You received this message because you are subscribed to the Google Groups 
"Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jupyter+unsubscr...@googlegroups.com.
To post to this group, send email to jupyter@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jupyter/CAH4pYpTGeiAUkKbSE6efow10_2wjZCpt7%2BS1qof4-GFgT%2Bo8vg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [jupyter] SageMath 7.6 Deprecation Warning

2017-06-05 Thread Matthias Bussonnier
I believe this has been fixed if you upgrade jupyter_client.
-- 
M

On Sun, Jun 4, 2017 at 2:02 PM, Michael Shea  wrote:
> I am new to Jupyter and have been have finally been able to install and run
> the SageMath Kernel, however I am getting an annoying warning on cell
> execution that I think is slowing down execution.
>
> I am current running Arch Linux as a VMware guest on windows 10. I installed
> Jupyter with Anaconnda 3.  I have installed and registered the python 2
> kernel in Jupyter.
>
> I installed sagemath-kernel via pacman and successfully registered it via
> jupyter-kernelspec.
>
> Now, whenever I execute a Sage
>
> /usr/lib/python2.7/json/encoder.py:207: DeprecationWarning: Interpreting
> naive datetime as local 2017-06-03 22:23:23.879862. Please add timezone info
> to timestamps.
>   chunks = self.iterencode(o, _one_shot=True)
>
>
> Any suggestions.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Project Jupyter" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jupyter+unsubscr...@googlegroups.com.
> To post to this group, send email to jupyter@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jupyter/a97049c7-bad2-406d-ae86-145608f7eff3%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jupyter+unsubscr...@googlegroups.com.
To post to this group, send email to jupyter@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jupyter/CANJQusV_Os87H6hrbPhSZS7PRcPLUh_%2BNMiBqZ7WhGh6Fg_rEg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.