Skip to content

Instantly share code, notes, and snippets.

@blink1073
blink1073 / winpexpect.py
Created November 23, 2017 11:32
winpexpect
import os
import sys
import time
import errno
import signal
from winpty import PtyProcess
from .exceptions import ExceptionPexpect, EOF, TIMEOUT
from .spawnbase import SpawnBase
@blink1073
blink1073 / setup_hooks.py
Created November 16, 2017 11:58
setup.py hooks
from setuptools.command.develop import develop
from setuptools.command.install import install
class PostDevelopCommand(develop):
"""Post-installation for development mode."""
def run(self):
fetch_yarn()
develop.run(self)
@blink1073
blink1073 / index.js
Created November 6, 2017 17:03
es6 module with es5 target
import * as path from 'path';
function foo() {
return import('leaflet').then(function (mod) {
console.log(mod);
});
}
;
console.log(path);
console.log(foo);
@blink1073
blink1073 / errors.txt
Created October 30, 2017 17:30
Vega offline install
0 info it worked if it ends with ok
1 verbose cli [ '/Users/ssilvester/anaconda/bin/node',
1 verbose cli '/Users/ssilvester/anaconda/bin/npm',
1 verbose cli 'install' ]
2 info using npm@5.5.1
3 info using node@v6.10.2
4 verbose npm-session 04f734b5bfb8fe65
5 silly install runPreinstallTopLevelLifecycles
6 silly preinstall @jupyterlab/application-top@0.11.1
7 info lifecycle @jupyterlab/application-top@0.11.1~preinstall: @jupyterlab/application-top@0.11.1
@blink1073
blink1073 / index.ts
Last active October 27, 2017 18:36
GeoJSON renderer using require.ensure
// Copyright (c) Jupyter Development Team.
// Distributed under the terms of the Modified BSD License.
import {
Widget
} from '@phosphor/widgets';
import {
IRenderMime
} from '@jupyterlab/rendermime-interfaces';
@blink1073
blink1073 / perf_test.ipynb
Last active October 4, 2017 14:43
Perf Test for String Operations
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@blink1073
blink1073 / notes.md
Created May 8, 2017 15:57
JupyterLab Config Notes

Notebook:

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
blink1073 / create_package.sh
Last active March 16, 2017 11:13
JupyterLab Big Split Utilities
if [ "$#" -ne 1 ]; then
echo "Specify the target"
fi
# 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
@blink1073
blink1073 / concrete_interfaces.ts
Last active February 23, 2017 11:38
JupyterLab models
interface ISignal<T, U> { };
interface ITextSelection { };
interface JSONValue { };
interface JSONObject { };
interface IMap<T> extends Map<string, T> { };
interface JSONMap extends IMap<JSONValue> { };
// Editor
@blink1073
blink1073 / editor_interface.ts
Created October 21, 2016 21:40
An editor interface for JupyterLab
// Copyright (c) Jupyter Development Team.
// Distributed under the terms of the Modified BSD License.
import {
IDisposable
} from 'phosphor/lib/core/disposable';
import {
Message
} from 'phosphor/lib/core/messaging';