This file contains hidden or 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
for count, gene in countgenes: | |
name = wx.StaticText(self, -1, gene) | |
name.BackgroundColour = '#ffffff' | |
self.grid_sizer.Add(name, 0, wx.EXPAND) | |
c = wx.StaticText(self, -1, "%d"%(count)) | |
self.grid_sizer.Add(c, 0, wx.EXPAND) | |
b1 = wx.RadioButton(self, -1, style=wx.RB_GROUP) | |
b1.BackgroundColour = '#ffffff' | |
b1.Alignment = wx.ALIGN_CENTER_HORIZONTAL | |
self.grid_sizer.Add(b1, flag=wx.ALIGN_CENTER|wx.EXPAND) |
This file contains hidden or 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
# http://thp.io/2007/09/x11-idle-time-and-focused-window-in.html | |
# http://www.freedesktop.org/software/ConsoleKit/doc/ConsoleKit.html#Session:idle-hint | |
import Xlib.display | |
display = Xlib.display.Display() | |
focus = display.get_input_focus() | |
print "WM Class: %s" % ( focus.focus.get_wm_class(), ) | |
print "WM Name: %s" % ( focus.focus.get_wm_name(), ) |
This file contains hidden or 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
"""Measurements.py - storage for image and object measurements | |
CellProfiler is distributed under the GNU General Public License. | |
See the accompanying file LICENSE for details. | |
Copyright (c) 2003-2009 Massachusetts Institute of Technology | |
Copyright (c) 2009-2011 Broad Institute | |
All rights reserved. | |
Please see the AUTHORS file for credits. |
This file contains hidden or 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 xlrd | |
import sys | |
import numpy as np | |
book = xlrd.open_workbook(sys.argv[1]) | |
sheet = book.sheet_by_name('Normalization 1') | |
headers = [c.value for c in sheet.row(0)] | |
# find columns | |
colidx = dict([(name, headers.index(name)) for name in ['Gene', 'rep1', 'rep2', 'rep3']]) |
This file contains hidden or 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
;;; from http://richardriley.net/projects/emacs/dotprogramming#sec-1.5 | |
(when (load "flymake" t) | |
(defun flymake-pycheckers-init () | |
(let* ((temp-file (flymake-init-create-temp-buffer-copy | |
'flymake-create-temp-inplace)) | |
(local-file (file-relative-name | |
temp-file | |
(file-name-directory buffer-file-name)))) | |
(list "/Users/tjones/elisp/pycheckers.sh" (list local-file))))) |
This file contains hidden or 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
def recalculate_group(self, workspace, indexes): | |
'''Recalculate all measurements once post_group has run | |
workspace - the workspace being operated on | |
indexes - the indexes of the group's image sets' measurements | |
''' | |
m = workspace.measurements | |
object_name = self.object_name.value | |
assert isinstance(m, cpmeas.Measurements) | |
parent_object_numbers = m.get_all_measurements( |
This file contains hidden or 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
#!/bin/sh | |
# TODO: check for virtualenv | |
# TODO: verify python is universal 32+64 bit | |
virtualenv -p /Library/Frameworks/Python.framework/Versions/2.7/bin/python --no-site-packages ${1}/cpdev | |
. ${1}/cpdev/bin/activate | |
pip install -U pip # to get git+https |
This file contains hidden or 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 |
This file contains hidden or 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 [email protected] | |
# Share and enjoy | |
# | |
import numpy as np | |
import matplotlib.pyplot as plt |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
OlderNewer