How to use @nteract/examples - 1 common examples

To help you get started, we’ve selected a few @nteract/examples 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 / applications / desktop / src / main / menu.ts View on Github external
kernel => ({
      label: kernel.spec.display_name,
      click: () => launchNewNotebook(null, kernel)
    })
  );

  // Iterate over the manifest, creating example notebooks for multiple categories

  const examplesBaseDir = path
    .join(__dirname, "..", "node_modules", "@nteract/examples")
    .replace("app.asar", "app.asar.unpacked");

  const openExampleNotebooks = {
    label: "&Open Example Notebook",
    // From the @nteract/examples manifest...
    submenu: manifest.map(collection => {
      return {
        // create a submenu for each language
        label: `&${collection.language}`,
        submenu: collection.files.map(fileInfo => {
          return {
            click: launch.bind(null, path.join(examplesBaseDir, fileInfo.path)),
            label: `&${fileInfo.metadata.title}`
          };
        })
      };
    })
  };

  const fileSubMenus = {
    new: {
      label: "&New",

@nteract/examples

Example Jupyter notebooks for nteract

BSD-3-Clause
Latest version published 3 years ago

Package Health Score

49 / 100
Full package analysis

Popular @nteract/examples functions