npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

insci-notebook

v1.0.14

Published

The \[In\]teractive \[S\]cientific \[C\]omputing \[I\]nterface

Downloads

5

Readme

INSCI-notebook

The [In]teractive [S]cientific [C]omputing [I]nterface


INSCI-notebook is the backbone of the INSCI environment. You can use this library to completely customize the function of your own notebook environment as compared to the regular INSCI environment. For developers looking to get started writing INSCI notebooks directly, see the main INSCI repository for more on the project as a whole. INSCI-notebook is a pluggable library made using Typescript. INSCI-notebook doesn't depend on any large and/or slow libraries or frameworks, and achieves it's light weight by depending upon only a few smaller libraries:

  • pyodide - Python interpretor compiled to WebAssembly.
  • µhtml - Lightweight html rendering framework.
  • KaTeX - Fast LaTeX to HTML library.
  • marked - Small markdown to HTML library.
  • insci-codemirror - Minified version of codemirror used for insci with slightly modified mode files.

Installation

INSCI-notebook is available from npm:

npm install insci-notebook

API

INSCI-notebook implements a plugin framework so that third-party developers can easily add to the features of the library. Plugins are defined using the experimental decorator feature in typescript, which can be enabled by setting "experimentalDecorators":true. Here's an example plugin/App scenario:

/* ExamplePlugin.ts */
import {Cell, Plugin, IPlugin} from 'insci-notebook';
/*
 * We can optionally implement the IPlugin so that an IDE's intellisense 
 * could show methods that can be overriden. This is optional.
 */
@Plugin
class ExamplePlugin implements IPlugin{
    constructor(){
        console.log("Plugin Initialized");
    }
    onSelectCell(cell: Cell): void{
        console.log("Cell with type " + cell.type + " selected!");
    }
}
/* App.ts */
import 'ExamplePlugin.ts';
import {Notebook} from 'insci-notebook';
class App{
    constructor(){
        const nb: Notebook = new Notebook(document.querySelector("#nb-container") as HTMLElement);
        // ExamplePlugin is loaded when the notebook initializes.
    }
}

Of course, here we're assuming that an App instance is created somewhere else, for example an index.ts or some other entrypoint. The full plugin API is in the documentation.

Work-in-progress Features and Goals

  • Adapt Pyodide to load smoothly.
  • Javascript and/or Typescript Cells.
  • Loading and saving notebooks as JSON (or some other format).
  • Conversion between Jupyter and INSCI notebooks.

Credits

INSCI-notebook itself is developed and maintained by Amit Prasad. See the main INSCI repository to see how the library is implemented in it's primary usecase.