Git Product home page Git Product logo

ngnk_kernel's Introduction

A Jupyter kernel for ngn/k

NOTE: This is alpha quality at best.

This is a jupyter kernel for ngn/k, derived from the bash_kernel.

To use the kernel with docker, see the file README-Docker.md

Install

Ensure that you have a working build of ngn/k. This kernel expects that you have built the k-libc version. Set the environment variable NGNKDIR

export NGNKDIR="/your/path/to/k/dir"

so that the executable can be reached as /your/path/to/k/dir/k-libc.

Now run

`python install.py --sys-prefix`

and start the notebook server

jupyter notebook

For details of how this works, see the Jupyter docs on wrapper kernels, and pexpect's docs on the replwrap module.

ngnk_kernel's People

Contributors

xpqz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

kidd zabrane

ngnk_kernel's Issues

Installation Help: Kernel not recognized outside of project directory

Hey Stefan

First of all, thank you! Your resources have been exceptionally valuable ๐Ÿ™‚ โค๏ธ

I am trying to install the ngnk_kernel to play around with k and follow your k book.

I have successfully compiled ngn/k, and ran the installation script for the kernel.

Everything works as expected if I launch Jupyter from the project directory.

If I instead launch Jupyter from another directory then I get the following error and the kernel doesn't work.

Any advice on how to set things up so I can use this kernel independent of where I start Jupyter?

Thank again for all that you do

-Eitan

[I 2023-05-15 15:50:56.192 ServerApp] Creating new notebook in
[I 2023-05-15 15:50:56.494 ServerApp] Kernel started: 58b678b6-38b7-4638-b4db-a72c569c1851
/Users/eitanlees/miniforge3/bin/python: No module named ngnk_kernel
[I 2023-05-15 15:50:59.484 ServerApp] AsyncIOLoopKernelRestarter: restarting kernel (1/5), new random ports
/Users/eitanlees/miniforge3/bin/python: No module named ngnk_kernel
[W 2023-05-15 15:51:00.289 ServerApp] 404 GET /api/kernels/9fb80a8b-2067-4eff-bde5-152bea787c72?1684180260277 (::1): Kernel does not exist: 9fb80a8b-2067-4eff-bde5-152bea787c72
[W 2023-05-15 15:51:00.290 ServerApp] wrote error: 'Kernel does not exist: 9fb80a8b-2067-4eff-bde5-152bea787c72'
    Traceback (most recent call last):
      File "/Users/eitanlees/miniforge3/lib/python3.9/site-packages/tornado/web.py", line 1713, in _execute
        result = await result
      File "/Users/eitanlees/miniforge3/lib/python3.9/site-packages/jupyter_server/services/kernels/handlers.py", line 72, in get
        model = await ensure_async(km.kernel_model(kernel_id))
      File "/Users/eitanlees/miniforge3/lib/python3.9/site-packages/jupyter_server/services/kernels/kernelmanager.py", line 496, in kernel_model
        self._check_kernel_id(kernel_id)
      File "/Users/eitanlees/miniforge3/lib/python3.9/site-packages/jupyter_server/services/kernels/kernelmanager.py", line 527, in _check_kernel_id
        raise web.HTTPError(404, "Kernel does not exist: %s" % kernel_id)
    tornado.web.HTTPError: HTTP 404: Not Found (Kernel does not exist: 9fb80a8b-2067-4eff-bde5-152bea787c72)
[W 2023-05-15 15:51:00.292 ServerApp] 404 GET /api/kernels/9fb80a8b-2067-4eff-bde5-152bea787c72?1684180260277 (21bbdf99a89d4fa79b22056eb2675733@::1) 6.33ms referer=http://localhost:8888/lab/workspaces/auto-3/tree/Untitled3.ipynb

Kernel shutdown doesn't

Triggering shudown from the notebook interface doesn't seem to trigger an actual shutdown.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.