Skip to content

Instantly share code, notes, and snippets.

blink1073 / perf_test.ipynb
Last active Oct 4, 2017
Perf Test for String Operations
View perf_test.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
blink1073 /
Created May 8, 2017
JupyterLab Config Notes


Config - creates it in USER as needed unless otherwise configured

NbExtensions - installs in system unless given --user or --sys-prefix

ServerExtensions - installs in user unless given --sys-prefix

Config and data default to user then sys-prefix, then system

blink1073 /
Last active Mar 16, 2017
JupyterLab Big Split Utilities
if [ "$#" -ne 1 ]; then
echo "Specify the target"
# copy default files
cp tsconfig.json $1
cp package.json $1
cd $1
# make source and optionally style directories
mkdir src
git mv *.ts src
View concrete_interfaces.ts
interface ISignal<T, U> { };
interface ITextSelection { };
interface JSONValue { };
interface JSONObject { };
interface IMap<T> extends Map<string, T> { };
interface JSONMap extends IMap<JSONValue> { };
// Editor
blink1073 / editor_interface.ts
Created Oct 21, 2016
An editor interface for JupyterLab
View editor_interface.ts
// Copyright (c) Jupyter Development Team.
// Distributed under the terms of the Modified BSD License.
import {
} from 'phosphor/lib/core/disposable';
import {
} from 'phosphor/lib/core/messaging';
blink1073 / createsession.ts
Last active Jun 2, 2016
Create a session for a notebook
View createsession.ts
import {
INotebookSession, IKernelSpecIds, ContentsManager, startNewSession,
} from 'jupyter-js-services';
* Fetch notebook contents by path.
# -*- coding: utf-8 -*-
# Copyright © 2016 The Spyder development team
# Licensed under the terms of the MIT License
# (see spyderlib/ for details)
import socket
import errno
import os
import sys
View kernelfuture.ts
* Implementation of a kernel future.
class KernelFutureHandler implements IKernelFuture {
constructor(kernel: IKernel, msgId: string, shellPromise: Promise<IKernelMessage>) {
this._msgId = msgId;
this.autoDispose = false;
this._kernel = kernel;
blink1073 / actions.ts
Last active Aug 26, 2015
Keyboard Manager
View actions.ts
// Copyright (c) Jupyter Development Team.
// Distributed under the terms of the Modified BSD License.
* A bunch of predefined `Simple Actions` used by Jupyter.
* `Simple Actions` have the following keys:
* help (optional): a short string the describe the action.
* will be used in various context, like as menu name, tool tips on buttons,
* and short description in help menu.
* help_index (optional): a string used to sort action in help menu.
blink1073 / services.ts
Last active Aug 29, 2015
Services Base Class
View services.ts
class Service {
constructor() {
this._onReady = new Promise<void>((resolve, reject) => {
this._finishInit = resolve;
* Promise fullfilled when the object is initialized.
You can’t perform that action at this time.