This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# OSX for Hackers (Mavericks/Yosemite) | |
# | |
# Source: https://gist.github.com/brandonb927/3195465 | |
#!/bin/sh | |
# Some things taken from here | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# Ask for the administrator password upfront |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
########################################################################## | |
# Maximum Response filterbank from | |
# http://www.robots.ox.ac.uk/~vgg/research/texclass/filters.html | |
# based on several edge and bar filters. | |
# Adapted to Python by Andreas Mueller amueller@ais.uni-bonn.de | |
# Share and enjoy | |
# | |
import numpy as np | |
import matplotlib.pyplot as plt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cpscript | |
from scipy import ndimage | |
labels = cpscript.Cells.segmented | |
background_labels = np.array(labels == 0, dtype=int) | |
dt_labels = ndimage.distance_transform_edt(background_labels) | |
imVSVG_pixels = cpscript.imVSVG.pixel_data | |
imVSVG_dt_pixels = imVSVG_pixels * dt_labels |