rem stringlengths 1 322k | add stringlengths 0 2.05M | context stringlengths 4 228k | meta stringlengths 156 215 |
|---|---|---|---|
printf(\"Could not load gamera.py - falling back to gameracore\n\"); | printf(\"Could not load gamera.py - falling back to gameracore\\n\"); | [[def switch(layer, args)]] switch(get_image_combination([[images[layer].name]], cc_type)) { [[for type in images[layer].pixel_types]] [[exec current = '*((' + type + '*)((RectObject*)' + images[layer].name + ')->m_x)']] case [[type.upper()]]: [[if layer == len(images) - 1]] [[if function.return_type != None]] return_v... | d0955d089e22590fe4cf90052f62d885bd031828 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9927/d0955d089e22590fe4cf90052f62d885bd031828/generate.py |
PyErr_SetString(PyExc_RuntimeError, \"Unable to load gameracore.\"); | PyErr_SetString(PyExc_RuntimeError, \"Unable to load gameracore.\\n\"); | [[def switch(layer, args)]] switch(get_image_combination([[images[layer].name]], cc_type)) { [[for type in images[layer].pixel_types]] [[exec current = '*((' + type + '*)((RectObject*)' + images[layer].name + ')->m_x)']] case [[type.upper()]]: [[if layer == len(images) - 1]] [[if function.return_type != None]] return_v... | d0955d089e22590fe4cf90052f62d885bd031828 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9927/d0955d089e22590fe4cf90052f62d885bd031828/generate.py |
PyErr_SetString(PyExc_RuntimeError, \"Unable to get module dictionary\"); | PyErr_SetString(PyExc_RuntimeError, \"Unable to get module dictionary\\n\"); | [[def switch(layer, args)]] switch(get_image_combination([[images[layer].name]], cc_type)) { [[for type in images[layer].pixel_types]] [[exec current = '*((' + type + '*)((RectObject*)' + images[layer].name + ')->m_x)']] case [[type.upper()]]: [[if layer == len(images) - 1]] [[if function.return_type != None]] return_v... | d0955d089e22590fe4cf90052f62d885bd031828 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9927/d0955d089e22590fe4cf90052f62d885bd031828/generate.py |
[[def switch(layer, args)]] switch(get_image_combination([[images[layer].name]], cc_type)) { [[for type in images[layer].pixel_types]] [[exec current = '*((' + type + '*)((RectObject*)' + images[layer].name + ')->m_x)']] case [[type.upper()]]: [[if layer == len(images) - 1]] [[if function.return_type != None]] return_v... | d0955d089e22590fe4cf90052f62d885bd031828 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9927/d0955d089e22590fe4cf90052f62d885bd031828/generate.py | ||
output_file.write('\n') output_file.close() | [[def switch(layer, args)]] switch(get_image_combination([[images[layer].name]], cc_type)) { [[for type in images[layer].pixel_types]] [[exec current = '*((' + type + '*)((RectObject*)' + images[layer].name + ')->m_x)']] case [[type.upper()]]: [[if layer == len(images) - 1]] [[if function.return_type != None]] return_v... | d0955d089e22590fe4cf90052f62d885bd031828 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9927/d0955d089e22590fe4cf90052f62d885bd031828/generate.py | |
[[ | def restore_import(): global std_import __builtins__['__import__'] = std_import | b3fd5292b72e1acbf4db33f70e7ed6f265a333bc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9927/b3fd5292b72e1acbf4db33f70e7ed6f265a333bc/generate.py | |
return 0;\ | return 0; | #ifndef _MSC_VER void init[[module_name]](void); | b3fd5292b72e1acbf4db33f70e7ed6f265a333bc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9927/b3fd5292b72e1acbf4db33f70e7ed6f265a333bc/generate.py |
return Cc(self, *args, **kwargs) | return Cc(self, self.label, *args, **kwargs) | def subimage(self, *args, **kwargs): """Creates a new view that is part of an existing image. | 6a3a5339798e360999a441f7411bf96a917a5db1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9927/6a3a5339798e360999a441f7411bf96a917a5db1/core.py |
self.class_names.sort(lambda x, y: cmp(x.lower(), y.lower())) | self.class_names.sort(lambda x, y: cmp(x[0].lower(), y[0].lower())) | def table_of_contents(self, classes): s = open(os.path.join(self.docgen.src_path, "classes.txt"), "w") s.write("=======\nClasses\n=======\n\n") s.write("Alphabetical\n-------------\n") self.class_names.sort(lambda x, y: cmp(x.lower(), y.lower())) letter = '~' first = True links = [] for name, combined_name in self.clas... | ebb837d1bfc3981593730f9a62b50126496efb8e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9927/ebb837d1bfc3981593730f9a62b50126496efb8e/gendoc.py |
return 1 return 0 | return True return False | def has_id_name(self, name): for confidence, id_name in self.id_name: if name == id_name: return 1 return 0 | 67dca1a6adf6c923d06499c7cdbde6eab16f18c1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9927/67dca1a6adf6c923d06499c7cdbde6eab16f18c1/core.py |
cls.last_directory, "", extensions, self._flags) | cls.last_directory, "", str(extensions), self._flags) | def __init__(self, parent, extensions="*.*", multiple=0): cls = self.__class__ if cls.last_directory is None: cls.last_directory = config.get("default_dir") self._flags = False if multiple: self._flags |= wxMULTIPLE self._multiple = True else: self._multiple = False wxFileDialog.__init__( self, parent, "Choose a file",... | 98c84a979461ce1820d9adbbf6d680bac8c73f6b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9927/98c84a979461ce1820d9adbbf6d680bac8c73f6b/gui_util.py |
tmp_dc = wxMemoryDC() | def Draw(self, grid, attr, dc, rect, row, col, isSelected): view_start = grid.GetViewStart() view_units = grid.GetScrollPixelsPerUnit() view_size = grid.GetClientSize() if not rect.Intersects(wxRect( view_start[0] * view_units[0], view_start[1] * view_units[1], view_size[0], view_size[1])): return | 693f257b0d1dc3ae158e5b60409e58362344ebe5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9927/693f257b0d1dc3ae158e5b60409e58362344ebe5/gamera_display.py | |
try: color = self._colors[classification_state] except KeyError: color = wxColor(200, 200, 200) | color = self._colors[classification_state] | def Draw(self, grid, attr, dc, rect, row, col, isSelected): view_start = grid.GetViewStart() view_units = grid.GetScrollPixelsPerUnit() view_size = grid.GetClientSize() if not rect.Intersects(wxRect( view_start[0] * view_units[0], view_start[1] * view_units[1], view_size[0], view_size[1])): return | 693f257b0d1dc3ae158e5b60409e58362344ebe5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9927/693f257b0d1dc3ae158e5b60409e58362344ebe5/gamera_display.py |
x = int(rect.x + (rect.width - width) / 2) y = int(rect.y + (rect.height - height) / 2) | x = rect.x + (rect.width - width) / 2 y = rect.y + (rect.height - height) / 2 | def Draw(self, grid, attr, dc, rect, row, col, isSelected): view_start = grid.GetViewStart() view_units = grid.GetScrollPixelsPerUnit() view_size = grid.GetClientSize() if not rect.Intersects(wxRect( view_start[0] * view_units[0], view_start[1] * view_units[1], view_size[0], view_size[1])): return | 693f257b0d1dc3ae158e5b60409e58362344ebe5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9927/693f257b0d1dc3ae158e5b60409e58362344ebe5/gamera_display.py |
bmp = wxBitmapFromImage(wx_image) | bmp = wx_image.ConvertToBitmap() | def Draw(self, grid, attr, dc, rect, row, col, isSelected): view_start = grid.GetViewStart() view_units = grid.GetScrollPixelsPerUnit() view_size = grid.GetClientSize() if not rect.Intersects(wxRect( view_start[0] * view_units[0], view_start[1] * view_units[1], view_size[0], view_size[1])): return | 693f257b0d1dc3ae158e5b60409e58362344ebe5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9927/693f257b0d1dc3ae158e5b60409e58362344ebe5/gamera_display.py |
tmp_dc = wxMemoryDC() | def Draw(self, grid, attr, dc, rect, row, col, isSelected): view_start = grid.GetViewStart() view_units = grid.GetScrollPixelsPerUnit() view_size = grid.GetClientSize() if not rect.Intersects(wxRect( view_start[0] * view_units[0], view_start[1] * view_units[1], view_size[0], view_size[1])): return | 693f257b0d1dc3ae158e5b60409e58362344ebe5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9927/693f257b0d1dc3ae158e5b60409e58362344ebe5/gamera_display.py | |
def Draw(self, grid, attr, dc, rect, row, col, isSelected): view_start = grid.GetViewStart() view_units = grid.GetScrollPixelsPerUnit() view_size = grid.GetClientSize() if not rect.Intersects(wxRect( view_start[0] * view_units[0], view_start[1] * view_units[1], view_size[0], view_size[1])): return | 693f257b0d1dc3ae158e5b60409e58362344ebe5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9927/693f257b0d1dc3ae158e5b60409e58362344ebe5/gamera_display.py | ||
self._flags = False | def __init__(self, parent, extensions="*.*", multiple=0): cls = self.__class__ if cls.last_directory is None: cls.last_directory = config.get("default_dir") self._flags = False if multiple: self._flags |= wxMULTIPLE self._multiple = True else: self._multiple = False wxFileDialog.__init__( self, parent, "Choose a file",... | e18c17cde60da05c24f9f834359e54c0ca52bf83 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9927/e18c17cde60da05c24f9f834359e54c0ca52bf83/gui_util.py | |
subimage = self.image.subimage(y, x, h, w) | subimage = self.image.subimage(int(y), int(x), int(h), int(w)) | def PaintArea(self, x, y, w, h, check=1, dc=None): if not self.image: return if dc == None: dc = wxClientDC(self) self.draw_rubber(dc) redraw_rubber = 1 else: redraw_rubber = 0 # This needs to be created every time we call Paint, since its # address can (but in practice usually doesn't) change. tmpdc = wxMemoryDC() | 72aa8c6fdd6f62845d1377d1fa5fd839ff9ebdec /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9927/72aa8c6fdd6f62845d1377d1fa5fd839ff9ebdec/gamera_display.py |
node['name'] = name state_machine.document.note_implicit_target(node, node) | version = [int(x) for x in docutils.__version__.split(".")] if version >= (0, 3, 9): node['names'] = [name] else: node['name'] = name state_machine.document.note_implicit_target(node) | def do_docstring(obj, name): doc_string = inspect.getdoc(obj) if doc_string is None: text = "[Not documented]\n\n" else: text = doc_string + "\n\n" content = docutils.statemachine.string2lines(text, convert_whitespace=1) if not options.has_key('no_title'): title_text = "``%s``" % name textnodes, messages = state.inline... | 625ae845161f72e516c450f5f49b677022f456ed /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9927/625ae845161f72e516c450f5f49b677022f456ed/gendoc.py |
state.nested_parse(content, 0, node) | state.nested_parse(content, content_offset, node) | def do_docstring(obj, name): doc_string = inspect.getdoc(obj) if doc_string is None: text = "[Not documented]\n\n" else: text = doc_string + "\n\n" content = docutils.statemachine.string2lines(text, convert_whitespace=1) if not options.has_key('no_title'): title_text = "``%s``" % name textnodes, messages = state.inline... | 625ae845161f72e516c450f5f49b677022f456ed /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9927/625ae845161f72e516c450f5f49b677022f456ed/gendoc.py |
y1, x1, y2, x1, value = args | y1, x1, y2, x2, value = args | def __call__(self, *args): if len(args) == 3: return _draw.draw_filled_rect(self, *args) elif len(args) == 2: try: a, value = args return _draw.draw_filled_rect(self, a.ul, a.lr, value) except KeyError, AttributeError: pass elif len(args) == 5: try: y1, x1, y2, x1, value = args result = _draw.draw_filled_rect(self, (x1... | 6e9810b2674cf821303d376ce2c7bca0bfddc1d1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9927/6e9810b2674cf821303d376ce2c7bca0bfddc1d1/draw.py |
origin = self.GetViewStart() | origin = [x * self.scroll_amount for x in self.GetViewStart()] | def focus(self, subimages): scroll_amount = self.scroll_amount if not util.is_sequence(subimages): subimages = (subimages,) x1 = y1 = maxint x2 = y2 = 0 # Get a combined rectangle of all images in the list for image in subimages: x1 = min(image.page_offset_x(), x1) y1 = min(image.page_offset_y(), y1) x2 = max(image.pag... | 6eb1cae57ca1773babed2c1c4d12cf475259fce5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9927/6eb1cae57ca1773babed2c1c4d12cf475259fce5/gamera_display.py |
scale = self.scaling | scale = scaling | def scale(self, scale=None): scroll_amount = self.scroll_amount if scale == None: scale = self.scaling w = self.width * scale - 1 h = self.height * scale - 1 x = max(min(self.GetViewStart()[0] * scale / self.scaling + 1, w - self.GetSize().x) - 2, 0) y = max(min(self.GetViewStart()[1] * scale / self.scaling + 1, h - se... | 6eb1cae57ca1773babed2c1c4d12cf475259fce5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9927/6eb1cae57ca1773babed2c1c4d12cf475259fce5/gamera_display.py |
x = max(min(self.GetViewStart()[0] * scale / self.scaling + 1, | origin = [x * self.scroll_amount for x in self.GetViewStart()] x = max(min(origin[0] * scale / scaling + 1, | def scale(self, scale=None): scroll_amount = self.scroll_amount if scale == None: scale = self.scaling w = self.width * scale - 1 h = self.height * scale - 1 x = max(min(self.GetViewStart()[0] * scale / self.scaling + 1, w - self.GetSize().x) - 2, 0) y = max(min(self.GetViewStart()[1] * scale / self.scaling + 1, h - se... | 6eb1cae57ca1773babed2c1c4d12cf475259fce5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9927/6eb1cae57ca1773babed2c1c4d12cf475259fce5/gamera_display.py |
y = max(min(self.GetViewStart()[1] * scale / self.scaling + 1, | y = max(min(origin[1] * scale / scaling + 1, | def scale(self, scale=None): scroll_amount = self.scroll_amount if scale == None: scale = self.scaling w = self.width * scale - 1 h = self.height * scale - 1 x = max(min(self.GetViewStart()[0] * scale / self.scaling + 1, w - self.GetSize().x) - 2, 0) y = max(min(self.GetViewStart()[1] * scale / self.scaling + 1, h - se... | 6eb1cae57ca1773babed2c1c4d12cf475259fce5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9927/6eb1cae57ca1773babed2c1c4d12cf475259fce5/gamera_display.py |
x, y) | floor(x / scroll_amount), floor(y / scroll_amount)) self.Clear() | def scale(self, scale=None): scroll_amount = self.scroll_amount if scale == None: scale = self.scaling w = self.width * scale - 1 h = self.height * scale - 1 x = max(min(self.GetViewStart()[0] * scale / self.scaling + 1, w - self.GetSize().x) - 2, 0) y = max(min(self.GetViewStart()[1] * scale / self.scaling + 1, h - se... | 6eb1cae57ca1773babed2c1c4d12cf475259fce5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9927/6eb1cae57ca1773babed2c1c4d12cf475259fce5/gamera_display.py |
if hasattr(sys, 'winver'): def OnPaint(self, event): origin = [x * self.scroll_amount for x in self.GetViewStart()] if self.image: self.BeginDrawing() update_regions = self.GetUpdateRegion() rects = wxRegionIterator(update_regions) while rects.HaveRects(): ox = rects.GetX() / self.scaling oy = rects.GetY() / self.sc... | def OnPaint(self, event): if not self.image: return scaling = self.scaling origin = [x * self.scroll_amount for x in self.GetViewStart()] origin_scaled = [x / scaling for x in origin] update_regions = self.GetUpdateRegion() rects = wxRegionIterator(update_regions) while rects.HaveRects(): ox = rects.GetX() / scaling o... | def OnResize(self, event): size = self.GetSize() self.tmpDC.SelectObject(wxEmptyBitmap( size.GetWidth(), size.GetHeight())) self.tmpDC.SetPen(wxTRANSPARENT_PEN) event.Skip() self.scale() | 6eb1cae57ca1773babed2c1c4d12cf475259fce5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9927/6eb1cae57ca1773babed2c1c4d12cf475259fce5/gamera_display.py |
origin_scaled = [a / self.scaling for a in origin] size_scaled = [a / self.scaling for a in self.GetSizeTuple()] | origin_scaled = [a / scaling for a in origin] size_scaled = [a / scaling for a in self.GetSizeTuple()] | def PaintArea(self, x, y, w, h, check=1): dc = wxPaintDC(self) dc.SetLogicalFunction(wxCOPY) origin = [a * self.scroll_amount for a in self.GetViewStart()] origin_scaled = [a / self.scaling for a in origin] size_scaled = [a / self.scaling for a in self.GetSizeTuple()] if check: if ((x + w < origin_scaled[0]) and (y + h... | 6eb1cae57ca1773babed2c1c4d12cf475259fce5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9927/6eb1cae57ca1773babed2c1c4d12cf475259fce5/gamera_display.py |
self.tmpDC.SetUserScale(self.scaling, self.scaling) if (y + h > self.image.nrows): | self.tmpDC.SetUserScale(scaling, scaling) if (y + h >= self.height): | def PaintArea(self, x, y, w, h, check=1): dc = wxPaintDC(self) dc.SetLogicalFunction(wxCOPY) origin = [a * self.scroll_amount for a in self.GetViewStart()] origin_scaled = [a / self.scaling for a in origin] size_scaled = [a / self.scaling for a in self.GetSizeTuple()] if check: if ((x + w < origin_scaled[0]) and (y + h... | 6eb1cae57ca1773babed2c1c4d12cf475259fce5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9927/6eb1cae57ca1773babed2c1c4d12cf475259fce5/gamera_display.py |
if (x + w > self.image.ncols): | if (x + w >= self.width): | def PaintArea(self, x, y, w, h, check=1): dc = wxPaintDC(self) dc.SetLogicalFunction(wxCOPY) origin = [a * self.scroll_amount for a in self.GetViewStart()] origin_scaled = [a / self.scaling for a in origin] size_scaled = [a / self.scaling for a in self.GetSizeTuple()] if check: if ((x + w < origin_scaled[0]) and (y + h... | 6eb1cae57ca1773babed2c1c4d12cf475259fce5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9927/6eb1cae57ca1773babed2c1c4d12cf475259fce5/gamera_display.py |
fudge = int(self.scaling / 2.0) if self.scaling == 1: | fudge = int(scaling / 2.0) if scaling == 1: | def PaintArea(self, x, y, w, h, check=1): dc = wxPaintDC(self) dc.SetLogicalFunction(wxCOPY) origin = [a * self.scroll_amount for a in self.GetViewStart()] origin_scaled = [a / self.scaling for a in origin] size_scaled = [a / self.scaling for a in self.GetSizeTuple()] if check: if ((x + w < origin_scaled[0]) and (y + h... | 6eb1cae57ca1773babed2c1c4d12cf475259fce5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9927/6eb1cae57ca1773babed2c1c4d12cf475259fce5/gamera_display.py |
dc.Blit(x * self.scaling - origin[0], y * self.scaling - origin[1], w * self.scaling, h * self.scaling, | dc.Blit(x * scaling - origin[0], y * scaling - origin[1], w * scaling, h * scaling, | def PaintArea(self, x, y, w, h, check=1): dc = wxPaintDC(self) dc.SetLogicalFunction(wxCOPY) origin = [a * self.scroll_amount for a in self.GetViewStart()] origin_scaled = [a / self.scaling for a in origin] size_scaled = [a / self.scaling for a in self.GetSizeTuple()] if check: if ((x + w < origin_scaled[0]) and (y + h... | 6eb1cae57ca1773babed2c1c4d12cf475259fce5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9927/6eb1cae57ca1773babed2c1c4d12cf475259fce5/gamera_display.py |
origin = self.GetViewStart() | origin = [x * self.scroll_amount for x in self.GetViewStart()] | def OnLeftDown(self, event): self.rubber_on = 1 self.draw_rubber() origin = self.GetViewStart() x = min((event.GetX() + origin[0]) / self.scaling, self.image.ncols - 1) y = min((event.GetY() + origin[1]) / self.scaling, self.image.nrows - 1) if (x > self.rubber_origin_x and x < self.rubber_origin_x + self.block_w): sel... | 6eb1cae57ca1773babed2c1c4d12cf475259fce5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9927/6eb1cae57ca1773babed2c1c4d12cf475259fce5/gamera_display.py |
self.rubber_origin_x = self.rubber_x2 = x self.rubber_origin_y = self.rubber_y2 = y | self.rubber_origin_x = self.rubber_x2 = int(x) self.rubber_origin_y = self.rubber_y2 = int(y) | def OnLeftDown(self, event): self.rubber_on = 1 self.draw_rubber() origin = self.GetViewStart() x = min((event.GetX() + origin[0]) / self.scaling, self.image.ncols - 1) y = min((event.GetY() + origin[1]) / self.scaling, self.image.nrows - 1) if (x > self.rubber_origin_x and x < self.rubber_origin_x + self.block_w): sel... | 6eb1cae57ca1773babed2c1c4d12cf475259fce5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9927/6eb1cae57ca1773babed2c1c4d12cf475259fce5/gamera_display.py |
origin = self.GetViewStart() self.rubber_x2 = min((event.GetX() + origin[0]) / self.scaling, self.image.ncols - 1) self.rubber_y2 = min((event.GetY() + origin[1]) / self.scaling, self.image.nrows - 1) | origin = [x * self.scroll_amount for x in self.GetViewStart()] self.rubber_x2 = int(min((event.GetX() + origin[0]) / self.scaling, self.image.ncols - 1)) self.rubber_y2 = int(min((event.GetY() + origin[1]) / self.scaling, self.image.nrows - 1)) | def OnLeftUp(self, event): if self.rubber_on: self.draw_rubber() origin = self.GetViewStart() self.rubber_x2 = min((event.GetX() + origin[0]) / self.scaling, self.image.ncols - 1) self.rubber_y2 = min((event.GetY() + origin[1]) / self.scaling, self.image.nrows - 1) self.draw_rubber() for i in self.click_callbacks: try:... | 6eb1cae57ca1773babed2c1c4d12cf475259fce5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9927/6eb1cae57ca1773babed2c1c4d12cf475259fce5/gamera_display.py |
origin = self.GetViewStart() | scaling = self.scaling origin = [x * self.scroll_amount for x in self.GetViewStart()] | def draw_rubber(self): dc = wxPaintDC(self) origin = self.GetViewStart() x = min(self.rubber_origin_x, self.rubber_x2) y = min(self.rubber_origin_y, self.rubber_y2) x2 = max(self.rubber_origin_x, self.rubber_x2) y2 = max(self.rubber_origin_y, self.rubber_y2) x = x * self.scaling - origin[0] y = y * self.scaling - origi... | 6eb1cae57ca1773babed2c1c4d12cf475259fce5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9927/6eb1cae57ca1773babed2c1c4d12cf475259fce5/gamera_display.py |
x = x * self.scaling - origin[0] y = y * self.scaling - origin[1] x2 = x2 * self.scaling - origin[0] y2 = y2 * self.scaling - origin[1] | x = x * scaling - origin[0] y = y * scaling - origin[1] x2 = x2 * scaling - origin[0] y2 = y2 * scaling - origin[1] | def draw_rubber(self): dc = wxPaintDC(self) origin = self.GetViewStart() x = min(self.rubber_origin_x, self.rubber_x2) y = min(self.rubber_origin_y, self.rubber_y2) x2 = max(self.rubber_origin_x, self.rubber_x2) y2 = max(self.rubber_origin_y, self.rubber_y2) x = x * self.scaling - origin[0] y = y * self.scaling - origi... | 6eb1cae57ca1773babed2c1c4d12cf475259fce5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9927/6eb1cae57ca1773babed2c1c4d12cf475259fce5/gamera_display.py |
origin = self.GetViewStart() self.rubber_x2 = min((event.GetX() + origin[0]) / self.scaling, self.image.ncols - 1) self.rubber_y2 = min((event.GetY() + origin[1]) / self.scaling, self.image.nrows - 1) | origin = [x * self.scroll_amount for x in self.GetViewStart()] self.rubber_x2 = int(min((event.GetX() + origin[0]) / self.scaling, self.image.ncols - 1)) self.rubber_y2 = int(min((event.GetY() + origin[1]) / self.scaling, self.image.nrows - 1)) | def OnMotion(self, event): if self.rubber_on: self.draw_rubber() origin = self.GetViewStart() self.rubber_x2 = min((event.GetX() + origin[0]) / self.scaling, self.image.ncols - 1) self.rubber_y2 = min((event.GetY() + origin[1]) / self.scaling, self.image.nrows - 1) self.draw_rubber() if self.dragging: self.Scroll( (sel... | 6eb1cae57ca1773babed2c1c4d12cf475259fce5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9927/6eb1cae57ca1773babed2c1c4d12cf475259fce5/gamera_display.py |
(self.dragging_origin_x - (event.GetX() - self.dragging_x)) / self.scroll_amount, (self.dragging_origin_y - (event.GetY() - self.dragging_y)) / self.scroll_amount) | (self.dragging_origin_x - (event.GetX() - self.dragging_x)) / self.scroll_amount, (self.dragging_origin_y - (event.GetY() - self.dragging_y)) / self.scroll_amount) | def OnMotion(self, event): if self.rubber_on: self.draw_rubber() origin = self.GetViewStart() self.rubber_x2 = min((event.GetX() + origin[0]) / self.scaling, self.image.ncols - 1) self.rubber_y2 = min((event.GetY() + origin[1]) / self.scaling, self.image.nrows - 1) self.draw_rubber() if self.dragging: self.Scroll( (sel... | 6eb1cae57ca1773babed2c1c4d12cf475259fce5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9927/6eb1cae57ca1773babed2c1c4d12cf475259fce5/gamera_display.py |
except IOError, e: print e | except: pass | def load_image(filename, compression = DENSE): """**load_image** (FileOpen *filename*, Choice *storage_format* = ``DENSE``) | 0f83e9af508b8b2bad5521a820f6c7dc86c593ba /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9927/0f83e9af508b8b2bad5521a820f6c7dc86c593ba/core.py |
except IOError, e: print e | except: pass | def load_image(filename, compression = DENSE): """**load_image** (FileOpen *filename*, Choice *storage_format* = ``DENSE``) | 0f83e9af508b8b2bad5521a820f6c7dc86c593ba /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9927/0f83e9af508b8b2bad5521a820f6c7dc86c593ba/core.py |
*input_filename*: The input Gamera XML filename *output_filename*: The output Gamera XML filename""" | *input_filename* The input Gamera XML filename *output_filename* The output Gamera XML filename""" | def strip_features(input_filename, output_filename): """**strip_features** (FileOpen *input_filename*, FileSave *output_filename*) | 5771329b9e0871ada3ee598cee4b17eb97b355db /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9927/5771329b9e0871ada3ee598cee4b17eb97b355db/gamera_xml.py |
def __init__(self, main_win, parent, id, message): | 0201e4439e1a81e305f7de5459adb84cd2880135 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9927/0201e4439e1a81e305f7de5459adb84cd2880135/gui.py | ||
faces = shell.faces style_face = config.options.shell.face for face in ('times', 'mono', 'helv', 'other'): faces[face] = style_face faces['lnsize'] = int(config.options.shell.size) - 2 faces['size'] = int(config.options.shell.size) self.setStyles(faces) | def __init__(self, main_win, parent, id, message): | 0201e4439e1a81e305f7de5459adb84cd2880135 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9927/0201e4439e1a81e305f7de5459adb84cd2880135/gui.py | |
self._database = util.CallbackList(database) | def __init__(self, database=[], features='all', perform_splits=True): """ | 58d52aa3dbd7a50f93592b8e738ce2d2882c4b26 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9927/58d52aa3dbd7a50f93592b8e738ce2d2882c4b26/classify.py | |
if (recursion_level > max_recursion) or len(self.database) == 0: | if (recursion_level > max_recursion): | def _classify_list_automatic(self, glyphs, max_recursion=10, recursion_level=0, progress=None): | 4c8f8987cdfb682b3ae66d744e1ba6f9972330fb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9927/4c8f8987cdfb682b3ae66d744e1ba6f9972330fb/classify.py |
self._classifier.generate_features(glyphs) | for glyph in glyphs: self._classifier.generate_features(glyph) | def _SavePageCollection(self, filename, glyphs=None, with_features=True): if glyphs is None: glyphs = self.multi_iw.id.GetAllItems() self._classifier.generate_features(glyphs) try: gamera_xml.WriteXMLFile( glyphs=glyphs, symbol_table=self._symbol_table, with_features=with_features).write_filename(filename) except gamer... | dfa904c7813281880076a886a3faa7df23176f74 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9927/dfa904c7813281880076a886a3faa7df23176f74/classifier_display.py |
self._classifier.generate_features(glyphs) | for glyph in glyphs: self._classifier.generate_features(glyph) | def _OnSaveSelectedGlyphs(self, event): glyphs = self.get_all_selected()[0] if len(glyphs) == 0: gui_util.message("There are no selected glyphs.") return if gui_util.are_you_sure_dialog( ("There are %d selected glyphs.\n" + "Are you sure you want to save?") % len(glyphs)): filename = gui_util.save_file_dialog(self._fra... | dfa904c7813281880076a886a3faa7df23176f74 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9927/dfa904c7813281880076a886a3faa7df23176f74/classifier_display.py |
if not gui_util.are_you_sure_dialog("Editing glyphs have not been saved. Are you sure you wish to proceed?"): | if not gui_util.are_you_sure_dialog("Page glyphs have not been saved. Are you sure you wish to proceed?"): | def _OnOpenAndSegmentImage(self, event): if self.multi_iw.id.is_dirty: if not gui_util.are_you_sure_dialog("Editing glyphs have not been saved. Are you sure you wish to proceed?"): return segmenters = [x[0] for x in ImageBase.methods_flat_category("Segmentation", ONEBIT)] if self.default_segmenter == -1: self.default_... | dfa904c7813281880076a886a3faa7df23176f74 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9927/dfa904c7813281880076a886a3faa7df23176f74/classifier_display.py |
if not gui_util.are_you_sure_dialog("Editing glyphs have not been saved. Are you sure you wish to proceed?"): | if not gui_util.are_you_sure_dialog("Page glyphs have not been saved. Are you sure you wish to proceed?"): | def _OnSelectAndSegmentImage(self, event): if self.multi_iw.id.is_dirty: if not gui_util.are_you_sure_dialog("Editing glyphs have not been saved. Are you sure you wish to proceed?"): return segmenters = [x[0] for x in ImageBase.methods_flat_category("Segmentation", ONEBIT)] if self.default_segmenter == -1: self.defaul... | dfa904c7813281880076a886a3faa7df23176f74 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9927/dfa904c7813281880076a886a3faa7df23176f74/classifier_display.py |
self.progress_box.Update(min(100, int((float(num) / float(den)) * 100.0))) | def update(self, num, den): if not self.done: self.progress_box.Update(min(100, int((float(num) / float(den)) * 100.0))) if num >= den: self.done = 1 wxEndBusyCursor() self.progress_box.Destroy() | 93465d193f104c6b5233854c033b81eb6fc9090c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9927/93465d193f104c6b5233854c033b81eb6fc9090c/gui_util.py | |
self.done = 1 | self.done = True | def update(self, num, den): if not self.done: self.progress_box.Update(min(100, int((float(num) / float(den)) * 100.0))) if num >= den: self.done = 1 wxEndBusyCursor() self.progress_box.Destroy() | 93465d193f104c6b5233854c033b81eb6fc9090c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9927/93465d193f104c6b5233854c033b81eb6fc9090c/gui_util.py |
def do_auto_move(self, state): # if auto-moving is turned off, just return if state == []: return | be47457f91d298127231ad75e72f684aa0d1e499 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9927/be47457f91d298127231ad75e72f684aa0d1e499/classifier_display.py | ||
for col in xrange(self.cols, -1, -1): for row in xrange(self.rows, -1, -1): | for row in xrange(0, self.cols): for col in xrange(0, self.rows): | def do_auto_move(self, state): # if auto-moving is turned off, just return if state == []: return | be47457f91d298127231ad75e72f684aa0d1e499 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9927/be47457f91d298127231ad75e72f684aa0d1e499/classifier_display.py |
def add_file(self, file): | 8142ee3e631bd0bbc2cfcec3fcfbdb88d9e27b83 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9927/8142ee3e631bd0bbc2cfcec3fcfbdb88d9e27b83/config.py | ||
def add_file(self, file): | 8142ee3e631bd0bbc2cfcec3fcfbdb88d9e27b83 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9927/8142ee3e631bd0bbc2cfcec3fcfbdb88d9e27b83/config.py | ||
def get_config_files(self): | 8142ee3e631bd0bbc2cfcec3fcfbdb88d9e27b83 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9927/8142ee3e631bd0bbc2cfcec3fcfbdb88d9e27b83/config.py | ||
def get_config_files(self): | 8142ee3e631bd0bbc2cfcec3fcfbdb88d9e27b83 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9927/8142ee3e631bd0bbc2cfcec3fcfbdb88d9e27b83/config.py | ||
def get_config_files(self): | 8142ee3e631bd0bbc2cfcec3fcfbdb88d9e27b83 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9927/8142ee3e631bd0bbc2cfcec3fcfbdb88d9e27b83/config.py | ||
def get_config_files(self): | 8142ee3e631bd0bbc2cfcec3fcfbdb88d9e27b83 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9927/8142ee3e631bd0bbc2cfcec3fcfbdb88d9e27b83/config.py | ||
def get_config_files(self): | 8142ee3e631bd0bbc2cfcec3fcfbdb88d9e27b83 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9927/8142ee3e631bd0bbc2cfcec3fcfbdb88d9e27b83/config.py | ||
Pixel("value")]) def __call__(self, *args): if len(args) == 9: | Pixel("value"), Float("accuracy", default=0.1)]) def __call__(self, *args): if len(args) == 10: | def __doc_example1__(): from random import randint from gamera.core import Image image = Image(0, 0, 100, 100, RGB, DENSE) for i in range(10): image.draw_filled_rect(randint(0, 100), randint(0, 100), randint(0, 100), randint(0, 100), RGBPixel(randint(0, 255), randint(0,255), randint(0, 255))) return image | dfb61cd0433a25e5e5661cfa7a70f2e96a134225 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9927/dfb61cd0433a25e5e5661cfa7a70f2e96a134225/draw.py |
elif len(args) == 5: | elif len(args) in (5, 6): | def __call__(self, *args): if len(args) == 9: return _draw.draw_bezier(self, *args) elif len(args) == 5: try: a = args[0] b = args[1] c = args[2] d = args[3] value = args[4] return _draw.draw_bezier(self, a.y, a.x, b.y, b.x, c.y, c.x, d.y, d.x, value) except KeyError, AttributeError: pass raise ValueError("Arguments ar... | dfb61cd0433a25e5e5661cfa7a70f2e96a134225 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9927/dfb61cd0433a25e5e5661cfa7a70f2e96a134225/draw.py |
c.y, c.x, d.y, d.x, value) | c.y, c.x, d.y, d.x, value, accuracy) | def __call__(self, *args): if len(args) == 9: return _draw.draw_bezier(self, *args) elif len(args) == 5: try: a = args[0] b = args[1] c = args[2] d = args[3] value = args[4] return _draw.draw_bezier(self, a.y, a.x, b.y, b.x, c.y, c.x, d.y, d.x, value) except KeyError, AttributeError: pass raise ValueError("Arguments ar... | dfb61cd0433a25e5e5661cfa7a70f2e96a134225 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9927/dfb61cd0433a25e5e5661cfa7a70f2e96a134225/draw.py |
del RGBPixel | def __call__(self, *args): if len(args) == 3: return _draw.flood_fill(self, *args) elif len(args) == 2: try: a = args[0] value = args[1] return _draw.flood_fill(self, a.y, a.x, value) except KeyError, AttributeError: pass raise ValueError("Arguments are incorrect.") | dfb61cd0433a25e5e5661cfa7a70f2e96a134225 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9927/dfb61cd0433a25e5e5661cfa7a70f2e96a134225/draw.py | |
def highlight_cc(self, ccs, function, color=-1): if not util.is_sequence(ccs): ccs = (ccs,) for cc in ccs: if color == -1: color = self.color self.color = self.color + 1 image = wxEmptyImage(cc.ncols, cc.nrows) image.SetData(apply(function, (cc,))) bmp = wxBitmapFromImage(image, 1) rect = (cc.page_offset_x(), cc.page_o... | 2933083de4a9e93226072bcc8aa7851a6a2b86c7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9927/2933083de4a9e93226072bcc8aa7851a6a2b86c7/gamera_display.py | ||
for i in range(len(self.highlighted)): | for i in range(last_one, len(self.highlighted)): | def clear_highlight_cc(self, ccs): if not util.is_sequence(ccs): ccs = (ccs,) for cc in ccs: for i in range(len(self.highlighted)): if (self.highlighted[i][0][0] == cc.page_offset_x() and self.highlighted[i][0][1] == cc.page_offset_y()): del self.highlighted[i] self.PaintArea(cc.page_offset_x(), cc.page_offset_y(), cc.... | 2933083de4a9e93226072bcc8aa7851a6a2b86c7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9927/2933083de4a9e93226072bcc8aa7851a6a2b86c7/gamera_display.py |
if self.scaling <= 1: for highlight in old_highlighted: self.PaintArea(*highlight[0]) if self.scaling > 1: self.Refresh(0, rect=wxRect(0,0,self.GetSize().x,self.GetSize().y)) | self.Refresh(0, rect=wxRect(0,0,self.GetSize().x,self.GetSize().y)) | def clear_all_highlights(self): old_highlighted = self.highlighted[:] self.highlighted = [] if self.scaling <= 1: for highlight in old_highlighted: self.PaintArea(*highlight[0]) if self.scaling > 1: self.Refresh(0, rect=wxRect(0,0,self.GetSize().x,self.GetSize().y)) | 2933083de4a9e93226072bcc8aa7851a6a2b86c7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9927/2933083de4a9e93226072bcc8aa7851a6a2b86c7/gamera_display.py |
w = self.width * scale - 1 h = self.height * scale - 1 | w = self.image.width * scale h = self.image.height * scale | def scale(self, scale=None): scroll_amount = self.scroll_amount scaling = self.scaling if scale == None: scale = scaling w = self.width * scale - 1 h = self.height * scale - 1 origin = [x * self.scroll_amount for x in self.GetViewStart()] x = max(min(origin[0] * scale / scaling + 1, w - self.GetSize().x) - 2, 0) y = ma... | 2933083de4a9e93226072bcc8aa7851a6a2b86c7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9927/2933083de4a9e93226072bcc8aa7851a6a2b86c7/gamera_display.py |
origin = [x * self.scroll_amount for x in self.GetViewStart()] origin_scaled = [x / scaling for x in origin] update_regions = self.GetUpdateRegion() rects = wxRegionIterator(update_regions) while rects.HaveRects(): ox = rects.GetX() / scaling oy = rects.GetY() / scaling x = ox + origin_scaled[0] y = oy + origin_scaled... | if scaling == 1: origin = [x * self.scroll_amount for x in self.GetViewStart()] update_regions = self.GetUpdateRegion() rects = wxRegionIterator(update_regions) while rects.HaveRects(): ox = rects.GetX() oy = rects.GetY() x = ox + origin[0] y = oy + origin[1] if (x > self.image.lr_x or y > self.image.lr_y or x < self.... | def OnPaint(self, event): if not self.image: return scaling = self.scaling origin = [x * self.scroll_amount for x in self.GetViewStart()] origin_scaled = [x / scaling for x in origin] update_regions = self.GetUpdateRegion() rects = wxRegionIterator(update_regions) # Paint only where wxWindows tells us to, this is faste... | 2933083de4a9e93226072bcc8aa7851a6a2b86c7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9927/2933083de4a9e93226072bcc8aa7851a6a2b86c7/gamera_display.py |
if (y + h >= self.height): h = self.image.nrows - y - 2 if (x + w >= self.width): w = self.image.ncols - x - 2 | if (y + h >= self.image.lr_y): h = self.image.lr_y - y - 2 if (x + w >= self.image.lr_x): w = self.image.lr_x - x - 2 | def PaintArea(self, x, y, w, h, check=1): dc = wxPaintDC(self) dc.SetLogicalFunction(wxCOPY) scaling = self.scaling origin = [a * self.scroll_amount for a in self.GetViewStart()] origin_scaled = [a / scaling for a in origin] size_scaled = [a / scaling for a in self.GetSizeTuple()] if check: if ((x + w < origin_scaled[0... | 2933083de4a9e93226072bcc8aa7851a6a2b86c7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9927/2933083de4a9e93226072bcc8aa7851a6a2b86c7/gamera_display.py |
image = wxEmptyImage(w + 1, h + 1) | def PaintArea(self, x, y, w, h, check=1): dc = wxPaintDC(self) dc.SetLogicalFunction(wxCOPY) scaling = self.scaling origin = [a * self.scroll_amount for a in self.GetViewStart()] origin_scaled = [a / scaling for a in origin] size_scaled = [a / scaling for a in self.GetSizeTuple()] if check: if ((x + w < origin_scaled[0... | 2933083de4a9e93226072bcc8aa7851a6a2b86c7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9927/2933083de4a9e93226072bcc8aa7851a6a2b86c7/gamera_display.py | |
apply(self.scaled_to_string_function, (subimage, scaling, image.GetDataBuffer())) | image = wxEmptyImage(w * scaling, h * scaling) apply(self.scaled_to_string_function, (subimage, scaling, image.GetDataBuffer())) | def PaintArea(self, x, y, w, h, check=1): dc = wxPaintDC(self) dc.SetLogicalFunction(wxCOPY) scaling = self.scaling origin = [a * self.scroll_amount for a in self.GetViewStart()] origin_scaled = [a / scaling for a in origin] size_scaled = [a / scaling for a in self.GetSizeTuple()] if check: if ((x + w < origin_scaled[0... | 2933083de4a9e93226072bcc8aa7851a6a2b86c7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9927/2933083de4a9e93226072bcc8aa7851a6a2b86c7/gamera_display.py |
return "%s.display()" % self.name | return "%s.display()" % self.label | def double_click(self): return "%s.display()" % self.name | 40c6c691fb065ef86176774738a64237d0c7763b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9927/40c6c691fb065ef86176774738a64237d0c7763b/icon_display.py |
return _guiClass.determine_choices(self, locals) | return Class.determine_choices(self, locals) | def determine_choices(self, locals): from gamera import core self.klass = core.Region return _guiClass.determine_choices(self, locals) | f5d4e3d597188d03306f89255f12e2f9db0d51c9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9927/f5d4e3d597188d03306f89255f12e2f9db0d51c9/args_gui.py |
return _guiClass.determine_choices(self, locals) | return Class.determine_choices(self, locals) | def determine_choices(self, locals): from gamera import core self.klass = core.RegionMap return _guiClass.determine_choices(self, locals) | f5d4e3d597188d03306f89255f12e2f9db0d51c9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9927/f5d4e3d597188d03306f89255f12e2f9db0d51c9/args_gui.py |
return _guiClass.determine_choices(self, locals) | return Class.determine_choices(self, locals) | def determine_choices(self, locals): from gamera import core self.klass = core.ImageInfo return _guiClass.determine_choices(self, locals) | f5d4e3d597188d03306f89255f12e2f9db0d51c9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9927/f5d4e3d597188d03306f89255f12e2f9db0d51c9/args_gui.py |
return _guiClass.determine_choices(self, locals) | return Class.determine_choices(self, locals) | def determine_choices(self, locals): from gamera import core self.klass = core.ImageBase return _guiClass.determine_choices(self, locals) | f5d4e3d597188d03306f89255f12e2f9db0d51c9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9927/f5d4e3d597188d03306f89255f12e2f9db0d51c9/args_gui.py |
return _guiClass.determine_choices(self, locals) | return Class.determine_choices(self, locals) | def determine_choices(self, locals): from gamera import core self.klass = core.Point return _guiClass.determine_choices(self, locals) | f5d4e3d597188d03306f89255f12e2f9db0d51c9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9927/f5d4e3d597188d03306f89255f12e2f9db0d51c9/args_gui.py |
a list of glyphs that is already updated for splitting.""" | a list of glyphs that is already updated based on splitting.""" | def classify_and_update_list_automatic(self, glyphs, *args, **kwargs): """**classify_and_update_list_automatic** (ImageList *glyphs*, Int | fee98bf8efa8fd72e9196f3d4b33605027146a0a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9927/fee98bf8efa8fd72e9196f3d4b33605027146a0a/classify.py |
flags |= wxMULTIPLE | self._flags |= wxMULTIPLE | def __init__(self, parent, extensions="*.*", multiple=0): cls = self.__class__ if cls.last_directory is None: cls.last_directory = config.get("default_dir") if multiple: flags |= wxMULTIPLE self._multiple = True else: self._multiple = False wxFileDialog.__init__( self, parent, "Choose a file", cls.last_directory, "", e... | e35c7af4f9f7f8a813ae6b0da1df64742aa52b07 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9927/e35c7af4f9f7f8a813ae6b0da1df64742aa52b07/gui_util.py |
show_plot(figure) | show_figure(figure) | def plot(*args): figure = Figure() axis = figure.add_subplot(111) axis.plot(*args) show_plot(figure) return figure | 29e6a9da5e211b2cd7e85bdebbd88bce68f8d57b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9927/29e6a9da5e211b2cd7e85bdebbd88bce68f8d57b/matplotlib_support.py |
**draw_hollow_rect** (Point(*x1*, *y1*), Point(*x2*, *y2)) | **draw_hollow_rect** (Point(*x1*, *y1*), Point(*x2*, *y2*)) | def __doc_example1__(images): from random import randint from gamera.core import Image image = Image(0, 0, 100, 100, RGB, DENSE) for i in range(10): image.draw_line(randint(0, 100), randint(0, 100), randint(0, 100), randint(0, 100), RGBPixel(randint(0, 255), randint(0,255), randint(0, 255))) return image | 7698f4c152db422edb41f02710cafdcf878a5452 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9927/7698f4c152db422edb41f02710cafdcf878a5452/draw.py |
for file in config.get("execfile"): try: self.shell.push("execfile(%s)" % repr(file)) except Exception, e: exc_type, exc_value, exc_traceback = sys.exc_info() gui_util.message("Error importing file '%s':\n%s" % (file, "".join(traceback.format_exception( exc_type, exc_value, exc_traceback)))) | execfiles = config.get("execfile") if execfiles is not None: for file in execfiles: try: self.shell.run("execfile(%s)" % repr(file)) except Exception, e: exc_type, exc_value, exc_traceback = sys.exc_info() gui_util.message("Error importing file '%s':\n%s" % (file, "".join(traceback.format_exception( exc_type, exc_value... | def import_command_line_modules(self): for file in config.get_free_args(): try: name = os.path.basename(file)[:-3] module = imp.load_source(name, file) self.shell.locals[name] = module self.shell.push(name) imported = True except Exception, e: exc_type, exc_value, exc_traceback = sys.exc_info() gui_util.message("Error ... | f3175c4e2bedc7291694efb8cbe7329a9309f64c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9927/f3175c4e2bedc7291694efb8cbe7329a9309f64c/gui.py |
splits = getattr(glyph, parts[1]).__call__(glyph) | if sys.version_info[:2] < (2, 4): splits = getattr(glyph, parts[1]).__call__(glyph) else: splits = getattr(glyph, parts[1]).__call__() | def _do_splits_impl(self, glyph): id = glyph.get_main_id() if (id.startswith('_split.')): parts = id.split('.') if (len(parts) != 2 or not hasattr(glyph, parts[1])): raise ClassifierError("'%s' is not a known or valid split function." % parts[1]) try: splits = getattr(glyph, parts[1]).__call__(glyph) except core.Segmen... | aef60734d64bb29a60e9360781f1802a6f3db54d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9927/aef60734d64bb29a60e9360781f1802a6f3db54d/classify.py |
progress = gamera.util.ProgressFactory("Generating features...", len(list)) | progress = util.ProgressFactory("Generating features...", len(list)) | def generate_features(self, glyphs): """Generates features for all the given glyphs.""" progress = gamera.util.ProgressFactory("Generating features...", len(list)) try: for glyph in list: glyph.generate_features(self.feature_functions) progress.step() finally: progress.kill() | db66742808f15bd05bc90d1f1b0768be5d43c288 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9927/db66742808f15bd05bc90d1f1b0768be5d43c288/classify.py |
update = kill = step = add_length = ___ | update = kill = step = add_length = set_length = ___ | def ___(*args): pass | a973c67e4e3e26247439cd762a8e777aa758cb5c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9927/a973c67e4e3e26247439cd762a8e777aa758cb5c/util.py |
config.config.add_option( "-p", "--progress-bars", default=False, help="[console] Display textual progress bars on stdout") | def update(self, num, den): if self._starting: sys.stdout.write(self._message) sys.stdout.write("\n") self._starting = 0 if not self._done: progress = int((float(num) / float(den)) * self.width) if progress != self._last_amount: self._last_amount = progress left = self.width - progress sys.stdout.write("|") sys.stdout.... | a973c67e4e3e26247439cd762a8e777aa758cb5c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9927/a973c67e4e3e26247439cd762a8e777aa758cb5c/util.py | |
elif config.config.get("progress_bars"): | elif config.get("progress_bar"): | def ProgressFactory(message, length=1): if has_gui.gui != None: return has_gui.gui.ProgressBox(message, length) elif config.config.get("progress_bars"): return ProgressText(message, length) else: return ProgressNothing(message, length) | a973c67e4e3e26247439cd762a8e777aa758cb5c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9927/a973c67e4e3e26247439cd762a8e777aa758cb5c/util.py |
__getstate__ = ImageBase.__getstate__ | def __del__(self): if self._display: self._display.close() | 32424634ef5aa6ed1a5777ed0faf9ae79cba7af5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9927/32424634ef5aa6ed1a5777ed0faf9ae79cba7af5/core.py | |
__getstate__ = ImageBase.__getstate__ | def __del__(self): if self._display: self._display.close() | 32424634ef5aa6ed1a5777ed0faf9ae79cba7af5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9927/32424634ef5aa6ed1a5777ed0faf9ae79cba7af5/core.py | |
__getstate__ = ImageBase.__getstate__ | def __init__(self, *args, **kwargs): ImageBase.__init__(self) gameracore.Cc.__init__(self, *args, **kwargs) | 32424634ef5aa6ed1a5777ed0faf9ae79cba7af5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9927/32424634ef5aa6ed1a5777ed0faf9ae79cba7af5/core.py | |
init_gamera() | def run(startup=_show_shell): global app has_gui.has_gui = has_gui.WX_GUI has_gui.gui = GameraGui from gamera.gui import args_gui init_gamera() class MyApp(wxApp): def __init__(self, startup, parent): self._startup = startup wxApp.__init__(self, parent) self.SetExitOnFrameDelete(1) # wxWindows calls this method to in... | ee9e8c0b649623ea15ffecd005a87dadc7f9edf7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9927/ee9e8c0b649623ea15ffecd005a87dadc7f9edf7/gui.py | |
self.trigger_callback("click", self.rubber_y2, self.rubber_x2, event.ShiftDown(), event.ControlDown()) | self.trigger_callback("click", self.rubber_y2 + self.original_image.ul_y, self.rubber_x2 + self.original_image.ul_x, event.ShiftDown(), event.ControlDown()) | def _OnLeftUp(self, event): if self.rubber_on: if self.HasCapture(): self.ReleaseMouse() self.draw_rubber() origin = [x * self.scroll_amount for x in self.GetViewStart()] self.rubber_x2 = int(max(min((event.GetX() + origin[0]) / self.scaling, self.image.ncols - 1), 0)) self.rubber_y2 = int(max(min((event.GetY() + origi... | 3c630e48bfa03d051a783b9ab0ecaae9945fb1a8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9927/3c630e48bfa03d051a783b9ab0ecaae9945fb1a8/gamera_display.py |
self.trigger_callback("rubber", self.rubber_origin_y, self.rubber_origin_x, self.rubber_y2, self.rubber_x2, event.ShiftDown(), event.ControlDown()) | self.trigger_callback("rubber", self.rubber_origin_y + self.original_image.ul_y, self.rubber_origin_x + self.original_image.ul_x, self.rubber_y2 + self.original_image.ul_y, self.rubber_x2 + self.original_image.ul_x, event.ShiftDown(), event.ControlDown()) | def _OnLeftUp(self, event): if self.rubber_on: if self.HasCapture(): self.ReleaseMouse() self.draw_rubber() origin = [x * self.scroll_amount for x in self.GetViewStart()] self.rubber_x2 = int(max(min((event.GetX() + origin[0]) / self.scaling, self.image.ncols - 1), 0)) self.rubber_y2 = int(max(min((event.GetY() + origi... | 3c630e48bfa03d051a783b9ab0ecaae9945fb1a8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9927/3c630e48bfa03d051a783b9ab0ecaae9945fb1a8/gamera_display.py |
self.trigger_callback("move", y2, x2) | self.trigger_callback("move", y2 + self.original_image.ul_y, x2 + self.original_image.ul_x) | def _OnMotion(self, event): image = self.image if image is None: return scaling = self.scaling origin = [x * self.scroll_amount for x in self.GetViewStart()] x2 = int(max(min((event.GetX() + origin[0]) / scaling, image.ncols - 1), 0)) y2 = int(max(min((event.GetY() + origin[1]) / scaling, image.nrows - 1), 0)) if self.... | 3c630e48bfa03d051a783b9ab0ecaae9945fb1a8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9927/3c630e48bfa03d051a783b9ab0ecaae9945fb1a8/gamera_display.py |
"(%d, %d): %s" % (x + image.ul_x, y + image.ul_y, self._iw.id.original_image.get(y, x)), 0) | "(%d, %d): %s" % (x, y, image.get(y - image.ul_y, x - image.ul_x)), 0) | def _OnMove(self, y, x): image = self._iw.id.original_image self._status_bar.SetStatusText( "(%d, %d): %s" % (x + image.ul_x, y + image.ul_y, self._iw.id.original_image.get(y, x)), 0) | 3c630e48bfa03d051a783b9ab0ecaae9945fb1a8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9927/3c630e48bfa03d051a783b9ab0ecaae9945fb1a8/gamera_display.py |
"(%d, %d): %s" % (x1 + image.ul_x, y1 + image.ul_y, self._iw.id.original_image.get(y2, x2)), 1) | "(%d, %d): %s" % (x1, y1, image.get(y2 - image.ul_y, x2 - image.ul_x)), 1) | def _OnRubber(self, y1, x1, y2, x2, shift, ctrl): image = self._iw.id.original_image if y1 == y2 and x1 == x2: self._status_bar.SetStatusText( "(%d, %d): %s" % (x1 + image.ul_x, y1 + image.ul_y, self._iw.id.original_image.get(y2, x2)), 1) else: self._status_bar.SetStatusText( "(%d, %d) to (%d, %d) / (%d w, %d h) %s" % ... | 3c630e48bfa03d051a783b9ab0ecaae9945fb1a8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9927/3c630e48bfa03d051a783b9ab0ecaae9945fb1a8/gamera_display.py |
(x1 + image.ul_x, y1 + image.ul_y, x2 + image.ul_x, y2 + image.ul_y, abs(x1-x2), abs(y1-y2), self._iw.id.original_image.get(y2, x2)), 1) | (x1, y1, x2, y2, abs(x1-x2), abs(y1-y2), image.get(y2 - image.ul_y, x2 - image.ul_x)), 1) | def _OnRubber(self, y1, x1, y2, x2, shift, ctrl): image = self._iw.id.original_image if y1 == y2 and x1 == x2: self._status_bar.SetStatusText( "(%d, %d): %s" % (x1 + image.ul_x, y1 + image.ul_y, self._iw.id.original_image.get(y2, x2)), 1) else: self._status_bar.SetStatusText( "(%d, %d) to (%d, %d) / (%d w, %d h) %s" % ... | 3c630e48bfa03d051a783b9ab0ecaae9945fb1a8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9927/3c630e48bfa03d051a783b9ab0ecaae9945fb1a8/gamera_display.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.