Skip to content

Instantly share code, notes, and snippets.

@LeeKamentsky
LeeKamentsky / yea_nay.ipynb
Created Jun 11, 2018
nuggt.yea_nay example
View yea_nay.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@LeeKamentsky
LeeKamentsky / neuroglancer-alignment.ipynb
Created Apr 13, 2018
Neuroglancer for alignment inspection
View neuroglancer-alignment.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@LeeKamentsky
LeeKamentsky / label_centers.py
Created Mar 21, 2018
Function to get centers of labels
View label_centers.py
def centers(l):
z, y, x = np.where(l > 0)
a = np.bincount(l[z, y, x])
xx = np.bincount(l[z, y, x], x)
yy = np.bincount(l[z, y, x], y)
zz = np.bincount(l[z, y, x], z)
return np.column_stack(
(zz.astype(float) / a, yy.astype(float) / a, xx.astype(float) / a))
View keybase.md

Keybase proof

I hereby claim:

  • I am LeeKamentsky on github.
  • I am leek (https://keybase.io/leek) on keybase.
  • I have a public key whose fingerprint is 3121 F2B2 72A5 B170 CDD2 354C 9B73 EE8C 668F 943B

To claim this, I am signing this object:

View warp.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View cudasift.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View AQLM_Machine_Learning.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@LeeKamentsky
LeeKamentsky / AQLM_2016.ipynb
Last active Nov 28, 2016
AQLM 2016 presentation on image analysis
View AQLM_2016.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View kirsch.py
def rotate(direction, index):
return direction[-index:] + direction[:-index]
def make_kernel(convolution_mask):
k = list(convolution_mask)
k.insert(4, 0)
return np.array(k).reshape(3, 3)
def kirsch(img):
convolution_mask = [5, -3, -3, -3, -3, -3, 5, 5]
@LeeKamentsky
LeeKamentsky / ASCIICP.txt
Created Nov 25, 2015
ASCII art rendition of CP logo
View ASCIICP.txt
oMMy
+++++++++++++++++++++++++++++++++++++hMMd++++++++++++++++++++++++++++++++++++++++++++++++++++:
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMh
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMh
MMMsooooooooooohMMMNNMMMMMMMmdyyhyhhhmMMmhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhdddMMMMMMMMMMh
MMM:-----------oMMMh+sdNMMMMMNdhsoooohMMdoooooooooooooooooooooooooooosssssssssssyyhMMMMMMMMMMh
MMM/-----------oMMMh/:/+sdNMMMMMNNdyshMMdoooooooooooooooooooooooooooosssssssssssyyhMMMMMMMMMMh
MMM/-----------:hMMd/:-:::/ohmNMMMMMNNMMmsooooooooooooooooooooooooooosssssssssssyyhMMMMMMMMMMh
MMM/::::::::::::hMMd/:---::::/+shdNMMMMMMNmdyyooooooooooooooooooooooosssssssssssyyhMMMMMMMMMMh
MMM/::::::::::::hMMd/-----:::::://+oyhmNNMMMMMNNdhhssoooooooooooooooosssssssssssyyhMMMMMMMMMMh