How to use @nteract/fs-kernels - 3 common examples

To help you get started, we’ve selected a few @nteract/fs-kernels examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github nteract / nteract / packages / kernel-relay / src / server.ts View on Github external
startKernel: async (parentValue: any, args: StartKernel) => {
      const kernel = await launchKernel(args.name);

      console.log(`kernel ${args.name}:${kernel.connectionInfo.key} launched`);

      // NOTE: we should generate IDs
      // We're also setting a session ID within the enchannel-zmq setup, I wonder
      // if we should use that
      const id = kernel.connectionInfo.key;

      messages[id] = [];
      kernels[id] = kernel;

      const subscription = kernel.channels.subscribe(
        (message: JupyterMessage) => {
          messages[id].push(message);
        }
      );
github nteract / kernel-relay / src / server.ts View on Github external
startKernel: async (parentValue: any, args: StartKernel) => {
      const kernel = await launchKernel(args.name);

      console.log(`kernel ${args.name}:${kernel.connectionInfo.key} launched`);

      // NOTE: we should generate IDs
      // We're also setting a session ID within the enchannel-zmq setup, I wonder
      // if we should use that
      const id = kernel.connectionInfo.key;

      messages[id] = [];
      kernels[id] = kernel;

      const subscription = kernel.channels.subscribe(
        (message: JupyterMessage) => {
          messages[id].push(message);
        }
      );
github nteract / nteract / packages / kernel-relay / src / index.ts View on Github external
startKernel: async (_parentValue: any, args: StartKernel) => {
      const kernel = await launchKernel(args.name);

      kernels[kernel.connectionInfo.key] = kernel;
      return {
        id: kernel.connectionInfo.key,
        status: "launched"
      };
    },
    shutdownKernel: async (_parentValue: any, args: { id: string }) => {

@nteract/fs-kernels

A manager for the filesystem aspects of Juyter kernels

BSD-3-Clause
Latest version published 4 years ago

Package Health Score

65 / 100
Full package analysis

Popular @nteract/fs-kernels functions