Ascend your Jupyter Notebook usage

Overview

Jupyter Ascending

Sync Jupyter Notebooks from any editor

Jupyter Ascending

About

Jupyter Ascending lets you edit Jupyter notebooks from your favorite editor, then instantly sync and execute that code in the Jupyter notebook running in your browser.

It's the best of both worlds--the autocomplete, keybindings, and refactoring tools you love in your favorite editor, plus the great visualization abilities of a Jupyter notebook.

Combined with basic syncing of your code to a remote server, you can have all the power of a beefy dev-server with all the convenience of editing code locally.

Installation

$ pip install jupyter_ascending && \
jupyter nbextension    install jupyter_ascending --sys-prefix --py && \
jupyter nbextension     enable jupyter_ascending --sys-prefix --py && \
jupyter serverextension enable jupyter_ascending --sys-prefix --py

You can confirm it's installed by checking for jupyter_ascending in:

$ jupyter nbextension     list
$ jupyter serverextension list

Usage

Quickstart

  1. python -m jupyter_ascending.scripts.make_pair --base example

    This makes a pair of synced py and ipynb files, example.sync.py and example.sync.ipynb.

  2. Start jupyter and open the notebook:

    jupyter notebook example.sync.ipynb

  3. Add some code to the .sync.py file, e.g.

    echo 'print("Hello World!")' >> example.sync.py

  4. Sync the code into the jupyter notebook:

    python -m jupyter_ascending.requests.sync --filename example.sync.py

  5. Run that cell of code

    python -m jupyter_ascending.requests.execute --filename example.sync.py --line 16

Set up one of the editor integrations to do all of this from within your favorite editor!

Working with multiple jupyter servers or alternate ports

Currently Jupyter Ascending expects the jupyter server to be running at localhost:8888. If it's running elsewhere (eg due to having multiple jupyter notebooks open), you'll need to set the env variables JUPYTER_ASCENDING_EXECUTE_HOST and JUPYTER_ASCENDING_EXECUTE_PORT appropriately both where you use the client (ie in your editor) and where you start the server.

By default the Jupyter server will search for a free port starting at 8888. If 8888 is unavailable and it selects eg 8889, Jupyter Ascending won't work - as it's expecting to connect to 8888. To force Jupyter to use a specific port, start your jupyter notebook with JUPYTER_PORT=8888 JUPYTER_PORT_RETRIES=0 jupyter notebook (or whatever port you want, setting also JUPYTER_ASCENDING_EXECUTE_PORT appropriately).

Working on a remote server

Jupyter Ascending doesn't know or care if the editor and the jupyter server are on the same machine. The client is just sending requests to http://[jupyter_server_url]:[jupyter_server_port]/jupyter_ascending, with the default set to http://localhost:8888/jupyter_ascending. We typically use SSH to forward the local jupyter port into the remote server, but you can set up the networking however you like, and use the environment variables to tell the client where to look for the Jupyter server.

There's fuzzy-matching logic to match the locally edited file path with the remote notebook file path (eg if the two machines have the code in a different directory), so everything should just work!

Here's an example of how you could set this up:

  1. install jupyter-ascending on both the client and the server

  2. put a copy of your project code on both the client and the server

  3. start a jupyter notebook on the server, and open a .sync.ipynb notebook

  4. set up port forwarding, e.g. with something like this (forwards local port 8888 to the remote port 8888)

    ssh -L 8888:127.0.0.1:8888 user@remote_hostname

  5. use Jupyter Ascending clients as normal on the corresponding .sync.py file

Security Warning

The jupyter-ascending client-server connection is currently completely unauthenticated, even if you have auth enabled on the Jupyter server. This means that, if your jupyter server port is open to the internet, someone could detect that you have jupyter-ascending running, then sync and run arbitrary code on your machine. That's bad!

For the moment, we recommend only running jupyter-ascending when you're using jupyter locally, or when your jupyter server isn't open to the public internet. For example, we run Jupyter on remote servers, but keep Jupyter accessible only to localhost. Then we use a secure SSH tunnel to do port-forwarding.

Hopefully we can add proper authentication in the future. Contributions are welcome here!

How it works

  • your editor calls the jupyter ascending client library with one of a few commands:
    • sync the code to the notebook (typically on save)
    • run a cell / run all cells / other commands that should be mapped to a keyboard shortcut
  • the client library assembles a HTTP POST request and sends it to the jupyter server
  • there is a jupyter server extension which accepts HTTP POST requests at http://[jupyter_server_url]:[jupyter_server_port]/jupyter_ascending.
  • the server extension matches the request filename to the proper running notebooks and forwards the command along to the notebook plugin
  • a notebook plugin receives the command, and updates the contents of the notebook or executes the requested command.
  • the notebook plugin consists of two parts - one part executes within the python process of the notebook kernel, and the other executes in javascript in the notebook's browser window. the part in python launches a little webserver in a thread, which is how it receives messages the server extension. when the webserver thread starts up, it sends a message to the server extension to "register" itself so the server extension knows where to send commands for that notebook.

Local development

To do local development (only needed if you're modifying the jupyter-ascending code):

# install dependencies
$ poetry install

# Activate the poetry env
$ poetry shell

# Installs the extension, using symlinks
$ jupyter nbextension install --py --sys-prefix --symlink jupyter_ascending

# Enables them, so it auto loads
$ jupyter nbextension enable jupyter_ascending --py --sys-prefix
$ jupyter serverextension enable jupyter_ascending --sys-prefix --py

To check that they are enabled, do something like this:

$ jupyter nbextension list
Known nbextensions:
  config dir: /home/tj/.pyenv/versions/3.8.1/envs/general/etc/jupyter/nbconfig
    notebook section
      jupytext/index  enabled
      - Validating: OK
      jupyter-js-widgets/extension  enabled
      - Validating: OK
      jupyter_ascending/extension  enabled
      - Validating: OK

$ jupyter serverextension list
config dir: /home/tj/.pyenv/versions/3.8.1/envs/general/etc/jupyter
    jupytext  enabled
    - Validating...
      jupytext 1.8.0 OK
    jupyter_ascending  enabled
    - Validating...
      jupyter_ascending 0.1.13 OK

Run tests from the root directory of this repository using python -m pytest ..

Format files with pyfixfmt. In a PyCharm file watcher, something like

python -m pyfixfmt --file-glob $FilePathRelativeToProjectRoot$ --verbose

Pushing a new version to PyPI:

  • Bump the version number in pyproject.toml and _version.py.
  • poetry build
  • poetry publish
  • git tag VERSION and git push origin VERSION

Updating dependencies:

  • Dependency constraints are in pyproject.toml. These are the constraints that will be enforced when distributing the package to end users.
  • These get locked down to specific versions of each package in poetry.lock, when you run poetry lock or poetry install for the first time. poetry.lock is only used by developers using poetry install - the goal is to have a consistent development environment for a all developers.
  • If you make a change to the dependencies in pyproject.toml, you'll want to update the lock file with poetry lock. To get only the minimal required changes, use poetry lock --no-update.
Comments
  • Not syncing automatically

    Not syncing automatically

    Hi, thanks for this extension really useful.

    I think I have installed it successfully since in the nbextension and serverextension list I see the jupyter_ascending.

    jupyter serverextension list                                                                                                                                at 11:20:42
    config dir: /home/argyris/.jupyter
        jupyter_ascending  enabled 
        - Validating...
          jupyter_ascending 0.1.18 OK
        jupytext  enabled 
        - Validating...
          jupytext 1.8.2 OK
    

    I open the console of the jupyter notebook everything seems correct:

    ===================================
    extension.js:197 Loading Jupyter Ascending extension...
    extension.js:198 Opening...  test.sync.ipynb
    extension.js:199 Is synced:  true
    extension.js:201 Attemping create comm...
    extension.js:221 ... success!
    

    When I open in nvim the test.sync.py (produced from your make pair script) and make changes, the changes are not syncing back to my test.sync.ipynb.

    If I manually do:

    python jupyter_ascending/requests/sync.py --filename test.sync.py
    

    Then it works.

    Same for execution, i have the nvim plugin jupyter_ascending if press space-space-x nothing happens if I call the script

    python jupyter_ascending/requests/execute_all.py --filename test.sync.py
    

    it works.

    Python 3.9.1 but same problem with 3.8.6

    Do you have any ideas about what it might be wrong?

    Thank you in advance.

    Argyris

    opened by argapost 10
  • Cleanup + improve logging

    Cleanup + improve logging

    • get rid of J_LOGGER and replace with logger.
    • set up the logger in a more sane way (set it up as a "script" not a "module", as this code mostly will never be imported as a library)
    • ensure useful warnings+errors are thrown in common cases. previously the client just logged error messages but didn't actually throw errors, now it throws a RequestFailure exception.

    cases i tested + ensured they produce useful output with default logging options:

    on the client:

    • notebook is not open / wrong name
    • server is not running / can't connect to server

    on the server:

    • notebook is not open / wrong name

    Ran pytest and checked functionality.

    opened by zplizzi 7
  • the jupyter notebook does not execute

    the jupyter notebook does not execute

    After installing the package and following the simple example but stuck in the last step: "python -m jupyter_ascending.requests.execute --filename example.sync.py --line 16" the jupyter notebook does not execute and directly create a new cell.

    opened by mcyhx 4
  • Sync from *.ipynb to *.py file

    Sync from *.ipynb to *.py file

    Hi, I'm wondering does this sync works bi-directional? Say I have a .ipynb file from a collaborator and I want to edit it.

    In the example, the command only sync the stuffs in .py file to the notebook.

    I tried

    python3 -m jupyter_ascending.requests.sync --filename example.sync.ipynb

    But it seems to do nothing. I'm wondering is this feature currently supported?

    opened by albert-ying 4
  • removes need for second jupyter port

    removes need for second jupyter port

    Uses the ability to add a custom HTTP request handler within a jupyter server extension to remove the need for the second HTTP server alongside the jupyter server. Now we just send jupyter ascending POST requests to localhost:8888/jupyter_ascending.

    Also did a little bit of cleanup/refactoring to make the server extension file only include code for the server extension.

    Tested and working! All tests pass.

    opened by zplizzi 4
  • Unabled to find File?

    Unabled to find File?

    Hi there! After setting up jupyter_ascending, I'm getting an error message and I don't know what to make of it.

    File Content

    # jupyter:
    #   jupytext:
    #     text_representation:
    #       extension: .py
    #       format_name: light
    #       format_version: '1.5'
    #       jupytext_version: 1.7.1
    #   kernelspec:
    #     display_name: Python 3
    #     language: python
    #     name: python3
    # ---
    
    print('foo')
    

    Error Message in Jupyter

    {"jsonrpc": "2.0", "method": "perform_notebook_request", "params": {"command_name": "SyncRequest", "notebook_path": "/home/user/projects/dictateMeBot/test.synced.py", "data": {"file_name": "/home/user/projects/dictateMeBot/test.synced.py", "contents": "# ---\n# jupyter:\n#  jupytext:\n#   text_representation:\n#    extension: .py\n#    format_name: light\n#    format_version: '1.5'\n#    jupytext_version: 1.7.1\n#  kernelspec:\n#   display_name: Python 3\n#   language: python\n#   name: python3\n# ---\n\nprint('foo')\n\n"}}, "id": 1}
    2020-12-02T10:53:28.449440+0100 - Unabled to find /home/user/projects/dictateMeBot/test.synced.py in {}
    {"jsonrpc": "2.0", "result": {"success": false, "notebook_path": "/home/user/projects/dictateMeBot/test.synced.py"}, "id": 1}
    

    Error Message in Vim

    2020-12-02 10:53:28.441 | INFO     | __main__:send:16 - Syncing File: /home/user/projects/dictateMeBot/test.synced.py...
    2020-12-02 10:53:28.448 | INFO     | jupyter_ascending.handlers:do_POST:49 - JupyterServer processing request:
                    {"jsonrpc": "2.0", "method": "perform_notebook_request", "params": {"command_name": "SyncRequest", "notebook_path": "/home/user/projects/dictateMeBot/test.synced.py", "data": {"file_name": "/home/user/projects/dictateMeBot/test.synced.py", "contents": "# ---\n# jupyter:\n#   jupytext:\n#     text_representation:\n#       extension: .py\n#       format_name: light\n#       format_version: '1.5'\n#       jupytext_version: 1.7.1\n#   kernelspec:\n#     display_name: Python 3\n#     language: python\n#     name: python3\n# ---\n\nprint('foo')\n\n"}}, "id": 1}
    2020-12-02 10:53:28.449 | WARNING  | jupyter_ascending.handlers.jupyter_server:perform_notebook_request:54 - Unabled to find /home/user/projects/dictateMeBot/test.synced.py in {}
    2020-12-02 10:53:28.449 | INFO     | jupyter_ascending.handlers:do_POST:53 - Got Response:
                    {"jsonrpc": "2.0", "result": {"success": false, "notebook_path": "/home/user/projects/dictateMeBot/test.synced.py"}, "id": 1}
    2020-12-02 10:53:28.450 | ERROR    | __main__:<module>:43 - An error has been caught in function '<module>', process 'MainProcess' (63346), thread 'MainThread' (139936503093056):
    Traceback (most recent call last):
      File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
        return _run_code(code, main_globals, None,
               │         │     └ {'__name__': '__main__', '__doc__': None, '__package__': 'jupyter_ascending.requests', '__loader__': <_frozen_importlib_exter...
               │         └ <code object <module> at 0x7f457f4f59d0, file "/home/user/.local/pylibs-PopOS20/lib/python3.8/site-packages/jupyter_ascendi...
               └ <function _run_code at 0x7f458086b3a0>
      File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
        exec(code, run_globals)
             │     └ {'__name__': '__main__', '__doc__': None, '__package__': 'jupyter_ascending.requests', '__loader__': <_frozen_importlib_exter...
             └ <code object <module> at 0x7f457f4f59d0, file "/home/user/.local/pylibs-PopOS20/lib/python3.8/site-packages/jupyter_ascendi...
    > File "/home/user/.local/pylibs-PopOS20/lib/python3.8/site-packages/jupyter_ascending/requests/sync.py", line 43, in <module>
        send(arguments.filename)
        │    │         └ '/home/user/projects/dictateMeBot/test.synced.py'
        │    └ Namespace(filename='/home/user/projects/dictateMeBot/test.synced.py')
        └ <function send at 0x7f458078f790>
      File "/home/user/.local/pylibs-PopOS20/lib/python3.8/site-packages/jupyter_ascending/requests/sync.py", line 32, in send
        jupyter_server.request_notebook_command(request_obj)
        │              │                        └ SyncRequest(file_name='/home/user/projects/dictateMeBot/test.synced.py', contents="# ---\n# jupyter:\n#   jupytext:\n#     ...
        │              └ <function request_notebook_command at 0x7f457f4f61f0>
        └ <module 'jupyter_ascending.handlers.jupyter_server' from '/home/user/.local/pylibs-PopOS20/lib/python3.8/site-packages/jupy...
      File "/home/user/.local/pylibs-PopOS20/lib/python3.8/site-packages/jupyter_ascending/handlers/jupyter_server.py", line 128, in request_notebook_command
        raise Exception(f"Failed to complete request. {result.data}")
    
    Exception: Failed to complete request. {"jsonrpc": "2.0", "result": {"success": false, "notebook_path": "/home/user/projects/dictateMeBot/test.synced.py"}, "id": 1}
    
    opened by mova 4
  • Execute all works, but execute line does nothing

    Execute all works, but execute line does nothing

    Through both the plugin and through calling jupyter_ascending directly, I can run the code in all cells without issue, but when I try to send a specific line, it simply inserts a blank cell below it.

    2022-06-16 23:43:42.510 | INFO     | jupyter_ascending.requests.sync:send:17 - Syncing File: /home/jr2396/example.sync.py...
    2022-06-16 23:43:42.614 | INFO     | jupyter_ascending.requests.sync:send:26 - ... Complete
    2022-06-16 23:43:42.616 | INFO     | __main__:send:59 - Sending request with ExecuteRequest(file_name='/home/jr2396/example.sync.py', cell_index=8, contents='')
    2022-06-16 23:43:42.628 | INFO     | __main__:send:61 - ... Complete
    
    opened by jmrussell 3
  • Cell index off by one when calling execute()

    Cell index off by one when calling execute()

    https://github.com/untitled-ai/jupyter_ascending/blob/ab7ecec2654872726be1ebfa94900dc6745a7224/jupyter_ascending/requests/execute.py#L20-L26

    I believe this ignores the case where jupytext has a large multi-line prefix at the start of the file followed by a # %% line so this causes the execute() command to execute one cell after the actual cell.

    For example, this is the start of the python file:

    # ---
    # jupyter:
    #   jupytext:
    #     formats: ipynb,py:hydrogen
    #     text_representation:
    #       extension: .py
    #       format_name: hydrogen
    #       format_version: '1.3'
    #       jupytext_version: 1.13.0
    #   kernelspec:
    #     display_name: Python 
    #     language: python
    #     name: py
    # ---
    
    # %% 
    import numpy as np
    
    

    While the first cell of the notebook contains the import numpy statement.

    opened by rajatvd 3
  • Various changes

    Various changes

    Changes:

    • client execution commands now sync the file first
    • fixes a race condition where two sync commands sent simultaneously could cause duplicate additions to the notebook
    • cleaned up make_comms/get_comms to just always make a new comm
    • added a lot of documentation

    Planning to continue adding more documentation in later PRs!

    Tested working + ran test suite.

    opened by zplizzi 3
  • Change chunk type

    Change chunk type

    Hey,

    I'm using this right now im combination with vim and works great so far. Was wondering if there is anyway to change a chunk from code to say markdown in the .sync.py file?

    Thanks!

    opened by KaBach 2
  • adds restart kernel command

    adds restart kernel command

    Tested working.

    Adding a single combined command for "restart and run all cells" is unfortunately pretty annoying - because there's not an easy clean way to know when the restart command has finished before executing run all cells. So I'm thinking we start with just separate commands (run all already exists), and see if that meets people's needs well enough?

    opened by zplizzi 2
  • Not working over ssh

    Not working over ssh

    Hello, I'm trying to execute jupyter_ascending over ssh (as showed on the readme), but it doesn't seem to work. It does work locally thou.

    I connect with the following command to the server ssh -L 8888:127.0.0.1:8080 user@ip and start the jupyter server like

    JUPYTER_ASCENDING_EXECUTE_PORT=8080 jupyter notebook --port 8080
    [I 13:54:54.964 NotebookApp] LOADING JUPYTER ASCENDING SERVER PLUGIN
    
    

    The error I get when trying to execute a cell on the editor

    2022-12-28T13:55:14.143776+0000 - Unable to find a paired notebook for /home/juanolon/uni/master/LSTMandRNs/ex3/A3.sync.py in registered notebooks: {}.
    Either a properly named notebook (ending in .sync.ipynb) is not running, or it didn't register properly for some reason.
    {"jsonrpc": "2.0", "result": {"success": false, "error": "Unable to find a paired notebook for /home/juanolon/uni/master/LSTMandRNs/ex3/A3.sync.py in registered notebooks: {}.\nEither a properly named notebook (ending in .sync.ipynb) is not running, or it didn't register properly for some reason."}, "id": 1}
    {"jsonrpc": "2.0", "method": "perform_notebook_request", "params": {"command_name": "ExecuteRequest", "notebook_path": "/home/juanolon/uni/master/LSTMandRNs/ex3/A3.sync.py", "data": {"file_name": "/home/juanolon/uni/master/LSTMandRNs/ex3/A3.sync.py", "cell_index": 1, "contents": ""}}, "id": 1}
    
    

    Jupyter ascending seems to be correctly installed on the server

    jupyter serverextension list
    Known nbextensions:
      config dir: /usr/local/share/miniconda/etc/jupyter/nbconfig
        notebook section
          jupytext/index  enabled 
          - Validating: OK
          jupyter_ascending/extension  enabled 
          - Validating: OK
    
    
    jupyter serverextension list
    config dir: /usr/local/share/miniconda/etc/jupyter
        jupyterlab  enabled 
        - Validating...
          jupyterlab 3.5.2 OK
        jupytext  enabled 
        - Validating...
          jupytext 1.14.4 OK
        jupyter_ascending  enabled 
        - Validating...
          jupyter_ascending 0.1.24 OK
    

    My first assumption was the absolute path on the jsonrpc request, so i tested to create the same folder structure on the server. same error..

    Any ideas?

    Thanks!

    opened by juanolon 0
  • No registered notebook

    No registered notebook

    2022-10-26T15:07:18.659992+0200 - Finding server for notebook_str, script_path: /home/fbence/Codes/example.sync.ipynb
    2022-10-26T15:07:18.660125+0200 - Unable to find a paired notebook for /home/fbence/Codes/example.sync.py in registered notebooks: {}.
    Either a properly named notebook (ending in .sync.ipynb) is not running, or it didn't register properly for some reason.
    

    I was following the example along and I'm getting this error although the notebook is definitely running. I'm on python 3.9. Any pointers? Thanks!

    opened by ferdinandyb 5
  • Can't sync in Python 3.10

    Can't sync in Python 3.10

    I built a simple Dockerfile:

    FROM python:3.10.8
    
    WORKDIR /usr/src/app
    
    COPY requirements.txt ./
    
    RUN pip install --no-cache-dir -r requirements.txt
    

    requirements.txt

    and then launch jupyter notebook with the command:

    docker run --name jptr-asc-cont -p 8888:8888 --rm -it test-jptr-asc jupyter notebook --no-browser --allow-root --ip 0.0.0.0
    

    However, after successful installation in docker container:

    pip install jupyter_ascending && \
        jupyter nbextension    install jupyter_ascending --sys-prefix --py && \
        jupyter nbextension     enable jupyter_ascending --sys-prefix --py && \
        jupyter serverextension enable jupyter_ascending --sys-prefix --py
    

    From docker container Quickstart fails at 4th step:

    python -m jupyter_ascending.requests.sync --filename example.sync.py
    

    With the issue:

    root@9157f020cf89:/usr/src/app# python -m jupyter_ascending.requests.sync --filename example.sync.py
    Logging Jupyter Ascending logs to /tmp/jupyter_ascending/log.log
    2022-10-14T03:46:35.071256+0000 - An error has been caught in function '<module>', process 'MainProcess' (64), thread 'MainThread' (281473422687536):
    Traceback (most recent call last):
    
      File "/usr/local/lib/python3.10/site-packages/jupyter_ascending/requests/client_lib.py", line 24, in request_notebook_command
        result = request(
                 └ <function request at 0xffffa1927f40>
      File "/usr/local/lib/python3.10/site-packages/jsonrpcclient/__init__.py", line 8, in request
        return HTTPClient(endpoint).request(*args, **kwargs)
               │          │                  │       └ {'command_name': 'SyncRequest', 'notebook_path': '/usr/src/app/example.sync.py', 'data': {'file_name': '/usr/src/app/example....
               │          │                  └ ('perform_notebook_request',)
               │          └ 'http://localhost:8888/jupyter_ascending'
               └ <class 'jsonrpcclient.clients.http_client.HTTPClient'>
      File "/usr/local/lib/python3.10/site-packages/apply_defaults/decorators.py", line 13, in wrapper
        return function(self, *args, **kwargs)
               │        │      │       └ {'command_name': 'SyncRequest', 'notebook_path': '/usr/src/app/example.sync.py', 'data': {'file_name': '/usr/src/app/example....
               │        │      └ ('perform_notebook_request',)
               │        └ <jsonrpcclient.clients.http_client.HTTPClient object at 0xffff9f0d1960>
               └ <function Client.request at 0xffffa18293f0>
      File "/usr/local/lib/python3.10/site-packages/jsonrpcclient/client.py", line 229, in request
        return self.send(
               │    └ <function Client.send at 0xffffa18291b0>
               └ <jsonrpcclient.clients.http_client.HTTPClient object at 0xffff9f0d1960>
      File "/usr/local/lib/python3.10/site-packages/apply_defaults/decorators.py", line 13, in wrapper
        return function(self, *args, **kwargs)
               │        │      │       └ {'trim_log_values': False, 'validate_against_schema': True}
               │        │      └ ({'jsonrpc': '2.0', 'method': 'perform_notebook_request', 'params': {'command_name': 'SyncRequest', 'notebook_path': '/usr/sr...
               │        └ <jsonrpcclient.clients.http_client.HTTPClient object at 0xffff9f0d1960>
               └ <function Client.send at 0xffffa1829120>
      File "/usr/local/lib/python3.10/site-packages/jsonrpcclient/client.py", line 171, in send
        self.validate_response(response)
        │    │                 └ <Response[0]>
        │    └ <function HTTPClient.validate_response at 0xffff9f0e5ab0>
        └ <jsonrpcclient.clients.http_client.HTTPClient object at 0xffff9f0d1960>
      File "/usr/local/lib/python3.10/site-packages/jsonrpcclient/clients/http_client.py", line 48, in validate_response
        raise ReceivedNon2xxResponseError(response.raw.status_code)
              │                           │        │   └ 403
              │                           │        └ <Response [403]>
              │                           └ <Response[0]>
              └ <class 'jsonrpcclient.exceptions.ReceivedNon2xxResponseError'>
    
    jsonrpcclient.exceptions.ReceivedNon2xxResponseError: Received 403 status code
    
    
    During handling of the above exception, another exception occurred:
    
    
    Traceback (most recent call last):
    
      File "/usr/local/lib/python3.10/runpy.py", line 196, in _run_module_as_main
        return _run_code(code, main_globals, None,
               │         │     └ {'__name__': '__main__', '__doc__': None, '__package__': 'jupyter_ascending.requests', '__loader__': <_frozen_importlib_exter...
               │         └ <code object <module> at 0xffff9f39c2f0, file "/usr/local/lib/python3.10/site-packages/jupyter_ascending/requests/sync.py", l...
               └ <function _run_code at 0xffffa2c59000>
      File "/usr/local/lib/python3.10/runpy.py", line 86, in _run_code
        exec(code, run_globals)
             │     └ {'__name__': '__main__', '__doc__': None, '__package__': 'jupyter_ascending.requests', '__loader__': <_frozen_importlib_exter...
             └ <code object <module> at 0xffff9f39c2f0, file "/usr/local/lib/python3.10/site-packages/jupyter_ascending/requests/sync.py", l...
    > File "/usr/local/lib/python3.10/site-packages/jupyter_ascending/requests/sync.py", line 36, in <module>
        send(arguments.filename)
        │    │         └ 'example.sync.py'
        │    └ Namespace(filename='example.sync.py')
        └ <function send at 0xffff9f3a05e0>
      File "/usr/local/lib/python3.10/site-packages/jupyter_ascending/requests/sync.py", line 24, in send
        request_notebook_command(request_obj)
        │                        └ SyncRequest(file_name='/usr/src/app/example.sync.py', contents='# ---\n# jupyter:\n#   jupytext:\n#     text_representation:\...
        └ <function request_notebook_command at 0xffff9f3a0550>
      File "/usr/local/lib/python3.10/site-packages/jupyter_ascending/requests/client_lib.py", line 43, in request_notebook_command
        raise RequestFailure(
              └ <class 'jupyter_ascending.requests.client_lib.RequestFailure'>
    
    jupyter_ascending.requests.client_lib.RequestFailure: Unable to process request. Is jupyter-ascending installed in the server's python environment? Perhaps something else is running on this port? Received 403 status code
    root@9157f020cf89:/usr/src/app#
    ─────────────────────────────────
    

    #42 might be related

    opened by IliaOzhmegov 2
  • Google colab with our favorite editor?

    Google colab with our favorite editor?

    Hello, the repo seems very promising. I use jupyter.vim, and confirm this extension opens another door to increase our productivity.

    A question though, can we connect google colab to local jupyter, and then connect to Jupyter via vim? Is it possible? Here is google documentation on running locally.

    opened by Shahin-rmz 2
  • 181_on_stdout: line 2: E730: using List as a String"">

    "Error detected while processing function 181_on_stdout: line 2: E730: using List as a String"

    Hi, great plugin, works as advertised, am greatly enjoying using it in neovim.

    One weird thing is that I get the above error every time any function is executed, commenting out the following lines in autoload.vim seems to fix the issue for me, though I'm not really sure what was going on there in the first place:

      "if len(a:d) > 0 && len(a:d[0]) > 0
        "echom '[JupyterAscending]' a:d
      "endif
    

    Cheers,

    James

    opened by jazmit 0
Owner
Untitled AI
We're investigating the fundamentals of learning across humans and machines in order to create more general machine intelligence.
Untitled AI
This Jupyter notebook shows one way to implement a simple first-order low-pass filter on sampled data in discrete time.

How to Implement a First-Order Low-Pass Filter in Discrete Time We often teach or learn about filters in continuous time, but then need to implement t

Joshua Marshall 4 Aug 24, 2022
A colab notebook for training Stylegan2-ada on colab, transfer learning onto your own dataset.

Stylegan2-Ada-Google-Colab-Starter-Notebook A no thrills colab notebook for training Stylegan2-ada on colab. transfer learning onto your own dataset h

Harnick Khera 66 Dec 16, 2022
Approximate Nearest Neighbors in C++/Python optimized for memory usage and loading/saving to disk

Annoy Annoy (Approximate Nearest Neighbors Oh Yeah) is a C++ library with Python bindings to search for points in space that are close to a given quer

Spotify 10.6k Jan 4, 2023
A compendium of useful, interesting, inspirational usage of pandas functions, each example will be an ipynb file

Pandas_by_examples A compendium of useful/interesting/inspirational usage of pandas functions, each example will be an ipynb file What is this reposit

Guangyuan(Frank) Li 32 Nov 20, 2022
Jetson Nano-based smart camera system that measures crowd face mask usage in real-time.

MaskCam MaskCam is a prototype reference design for a Jetson Nano-based smart camera system that measures crowd face mask usage in real-time, with all

BDTI 212 Dec 29, 2022
[ICSE2020] MemLock: Memory Usage Guided Fuzzing

MemLock: Memory Usage Guided Fuzzing This repository provides the tool and the evaluation subjects for the paper "MemLock: Memory Usage Guided Fuzzing

Cheng Wen 54 Jan 7, 2023
Code for the prototype tool in our paper "CoProtector: Protect Open-Source Code against Unauthorized Training Usage with Data Poisoning".

CoProtector Code for the prototype tool in our paper "CoProtector: Protect Open-Source Code against Unauthorized Training Usage with Data Poisoning".

Zhensu Sun 1 Oct 26, 2021
Discord Multi Tool that focuses on design and easy usage

Multi-Tool-v1.0 Discord Multi Tool that focuses on design and easy usage Delete webhook Block all friends Spam webhook Modify webhook Webhook info Tok

Lodi#0001 24 May 23, 2022
My usage of Real-ESRGAN to upscale anime, some test and results in the test_img folder

anime upscaler My usage of Real-ESRGAN to upscale anime, I hope to use this on a proper GPU cuz doing this on CPU is completely shit ?? , I even tried

Shangar Muhunthan 29 Jan 7, 2023
This repository contains notebook implementations of the following Neural Process variants: Conditional Neural Processes (CNPs), Neural Processes (NPs), Attentive Neural Processes (ANPs).

The Neural Process Family This repository contains notebook implementations of the following Neural Process variants: Conditional Neural Processes (CN

DeepMind 892 Dec 28, 2022
📚 A collection of Jupyter notebooks for learning and experimenting with OpenVINO 👓

A collection of ready-to-run Python* notebooks for learning and experimenting with OpenVINO developer tools. The notebooks are meant to provide an introduction to OpenVINO basics and teach developers how to leverage our APIs for optimized deep learning inference in their applications.

OpenVINO Toolkit 840 Jan 3, 2023
Jupyter notebooks for the code samples of the book "Deep Learning with Python"

Jupyter notebooks for the code samples of the book "Deep Learning with Python"

François Chollet 16.2k Dec 30, 2022
Library extending Jupyter notebooks to integrate with Apache TinkerPop and RDF SPARQL.

Graph Notebook: easily query and visualize graphs The graph notebook provides an easy way to interact with graph databases using Jupyter notebooks. Us

Amazon Web Services 501 Dec 28, 2022
Checkout some cool self-projects you can try your hands on to curb your boredom this December!

SoC-Winter Checkout some cool self-projects you can try your hands on to curb your boredom this December! These are short projects that you can do you

Web and Coding Club, IIT Bombay 29 Nov 8, 2022
Gesture-controlled Video Game. Just swing your finger and play the game without touching your PC

Gesture Controlled Video Game Detailed Blog : https://www.analyticsvidhya.com/blog/2021/06/gesture-controlled-video-game/ Introduction This project is

Devbrat Anuragi 35 Jan 6, 2023
Applicator Kit for Modo allow you to apply Apple ARKit Face Tracking data from your iPhone or iPad to your characters in Modo.

Applicator Kit for Modo Applicator Kit for Modo allow you to apply Apple ARKit Face Tracking data from your iPhone or iPad with a TrueDepth camera to

Andrew Buttigieg 3 Aug 24, 2021
A hand tracking demo made with mediapipe where you can control lights with pinching your fingers and moving your hand up/down.

HandTrackingBrightnessControl A hand tracking demo made with mediapipe where you can control lights with pinching your fingers and moving your hand up

Teemu Laurila 19 Feb 12, 2022
Discord-Protect is a simple discord bot allowing you to have some security on your discord server by ordering a captcha to the user who joins your server.

Discord-Protect Discord-Protect is a simple discord bot allowing you to have some security on your discord server by ordering a captcha to the user wh

Tir Omar 2 Oct 28, 2021