Skip to content

Instantly share code, notes, and snippets.

Steven Silvester blink1073

Block or report user

Report or block blink1073

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View phantom_3d.py
from __future__ import division
import numpy as np
def phantom3d(phantom='modified-shepp-logan', n=64):
"""Three-dimensional Shepp-Logan phantom
Can be used to test 3-D reconstruction algorithms.
Parameters
@blink1073
blink1073 / index.ts
Last active Nov 2, 2019
property inspector
View index.ts
import {
JupyterFrontEnd, JupyterFrontEndPlugin, ILabShell
} from '@jupyterlab/application';
import {
MainAreaWidget, ReactWidget
} from '@jupyterlab/apputils';
import {
Token
@blink1073
blink1073 / Backup Notes.md
Last active Oct 4, 2019
Jupyter Enterprise JEP (Draft)
View Backup Notes.md

When submitting an enhancement proposal, individuals will include the following information in their submission.

The problem that this enhancement addresses. If possible include code or anecdotes to describe this problem to readers.

A brief (1-2 sentences) overview of the enhancement you are proposing. If possible include hypothetical code sample to describe how the solution would work to readers.

A detailed explanation covering relevant algorithms, data structures, an API spec, and any other relevant technical information
A list of pros that this implementation has over other potential implementations.
A list of cons that this implementation has.
@blink1073
blink1073 / pexpect.py
Last active Aug 27, 2019
Simple cross platform version of pexpect
View pexpect.py
'''Pexpect is a Python module for spawning child applications and controlling
them automatically. Pexpect can be used for automating interactive applications
such as ssh, ftp, passwd, telnet, etc. It can be used to a automate setup
scripts for duplicating software package installations on different servers. It
can be used for automated software testing. Pexpect is in the spirit of Don
Libes' Expect, but Pexpect is pure Python. Other Expect-like modules for Python
require TCL and Expect or require C extensions to be compiled. Pexpect does not
use C, Expect, or TCL extensions. It should work on any platform that supports
the standard Python pty module. The Pexpect interface focuses on ease of use so
that simple tasks are easy.
View keybase.json
### Keybase proof
I hereby claim:
* I am blink1073 on github.
* I am blink1073 (https://keybase.io/blink1073) on keybase.
* I have a public key ASCDyw9ILX4MYwb0QEz0FoJCY3PcM49VZGetMmdcf3RsOAo
To claim this, I am signing this object:
@blink1073
blink1073 / plotting.ipynb
Created May 3, 2019
Octave Kernel Plotting
View plotting.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@blink1073
blink1073 / dict_to_table.py
Last active Aug 20, 2018
Dict to PyTables Store
View dict_to_table.py
"""
Given an arbitrarily nested dictionary, create a PyTables Table
Populate a table row given the contents of a dictionary
"""
import tables
import numpy as np
import sys
@blink1073
blink1073 / selection_widgets.py
Last active Jun 18, 2018
Improved RectangleSelector and LassoSelector and new EllipseSelector, PaintSelector and LineSelector widgets.
View selection_widgets.py
import numpy as np
from matplotlib.widgets import AxesWidget
from matplotlib.patches import Rectangle, Ellipse
from matplotlib.lines import Line2D
import matplotlib.colors as mcolors
from matplotlib.transforms import blended_transform_factory
LABELS_CMAP = mcolors.ListedColormap(['white', 'red', 'dodgerblue', 'gold',
'greenyellow', 'blueviolet'])
View winpexpect.py
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 / live_image_plugin.py
Created Dec 8, 2014
Python to ImageJ (FIJI) Bridge
View live_image_plugin.py
# Live streaming 2D monochrome image receiver
# We can start this from python to view images
# So we get the live image or a current image from Python, and
# send it to ImageJ through this interface. Boom!
from ij import IJ
from ij.process import ByteProcessor, ShortProcessor, LUT
import jarray
You can’t perform that action at this time.