rem
stringlengths
1
226k
add
stringlengths
0
227k
context
stringlengths
6
326k
meta
stringlengths
143
403
input_ids
listlengths
256
256
attention_mask
listlengths
256
256
labels
listlengths
128
128
self.transpose = kwargs.get('transpose', False) if self.transpose:
if self.transposed: self.shape = (m, m) self.__mul__ = self._rmul else:
def __init__(self, A, **kwargs): m, n = A.shape LinearOperator.__init__(self, n, m, **kwargs) if isinstance(A, LinearOperator): self.A = A else: self.A = PysparseLinearOperator(A) self.symmetric = True self.transpose = kwargs.get('transpose', False) if self.transpose: self.shape = (n, n) self.__mul__ = self._rmul else: self.shape = (m, m) self.__mul__ = self._mul if self.log: self.logger.info('New squared operator with shape ' + str(self.shape)) self.T = self
b227d76a576b904390737d7baf644f160080f80a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13857/b227d76a576b904390737d7baf644f160080f80a/linop.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 432, 16, 2826, 4333, 4672, 312, 16, 290, 273, 432, 18, 4867, 13921, 5592, 16186, 2738, 972, 12, 2890, 16, 290, 16, 312, 16, 2826, 4333, 13, 309, 1549, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 432, 16, 2826, 4333, 4672, 312, 16, 290, 273, 432, 18, 4867, 13921, 5592, 16186, 2738, 972, 12, 2890, 16, 290, 16, 312, 16, 2826, 4333, 13, 309, 1549, ...
FL_Coord, STRING],
FL_Coord, STRING],
def fl_setpup_submenu(m, i, subm): """ fl_setpup_submenu(m, i, subm) """ _fl_setpup_submenu(m, i, subm)
9942dac8ce2b35a1e43615a26fd8e7054ef805d3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2429/9942dac8ce2b35a1e43615a26fd8e7054ef805d3/xformslib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1183, 67, 542, 84, 416, 67, 1717, 5414, 12, 81, 16, 277, 16, 720, 81, 4672, 3536, 1183, 67, 542, 84, 416, 67, 1717, 5414, 12, 81, 16, 277, 16, 720, 81, 13, 3536, 225, 389, 2242, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1183, 67, 542, 84, 416, 67, 1717, 5414, 12, 81, 16, 277, 16, 720, 81, 4672, 3536, 1183, 67, 542, 84, 416, 67, 1717, 5414, 12, 81, 16, 277, 16, 720, 81, 13, 3536, 225, 389, 2242, ...
if self.parent.id != 'TEXT' and isinstance(self.parent.value, AttributeValue):
if self.inherited:
def effect_color(self): if self.parent.id != 'TEXT' and isinstance(self.parent.value, AttributeValue): return self.parent.value.effect_color if self.default_effect_color: return self.transform(self.default_effect_color) if self.parent.id != "TEXT": return self.parent.value.effect_color return None
743a3d22481d747ebd171f349ac1474d59936299 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13582/743a3d22481d747ebd171f349ac1474d59936299/colorSchemeTool.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5426, 67, 3266, 12, 2890, 4672, 309, 365, 18, 6018, 329, 30, 327, 365, 18, 2938, 18, 1132, 18, 13867, 67, 3266, 309, 365, 18, 1886, 67, 13867, 67, 3266, 30, 327, 365, 18, 6547, 12, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5426, 67, 3266, 12, 2890, 4672, 309, 365, 18, 6018, 329, 30, 327, 365, 18, 2938, 18, 1132, 18, 13867, 67, 3266, 309, 365, 18, 1886, 67, 13867, 67, 3266, 30, 327, 365, 18, 6547, 12, ...
def timesort(dict,requests): for r in requests: if not r.t_end: r.t_end=r.start for t in range(r.start,r.t_end+1): if not dict.has_key(t): dict[t] = 0 dict[t]=dict[t]+1 def timewrite(dict,start,end,resolution):
def getTimeslice(period, utime): low = int(math.floor(utime)) - period + 1 high = int(math.ceil(utime)) + 1 for x in range(low, high): if x % period == 0: return x def timewrite(requests, start, end, resolution):
def getdate(val): try: val = string.strip(val) year, month, day = int(val[:4]), int(val[5:7]), int(val[8:10]) hour,minute,second=int(val[11:13]),int(val[14:16]),int(val[17:19]) t = time.mktime((year, month, day, hour, minute, second, 0, 0, -1)) return t except: raise ProfileException, "bad date %s" % val
80ca4194666259398660aa3973c1ed8d4b99bb7a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/80ca4194666259398660aa3973c1ed8d4b99bb7a/requestprofiler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 712, 12, 1125, 4672, 775, 30, 1244, 273, 533, 18, 6406, 12, 1125, 13, 3286, 16, 3138, 16, 2548, 273, 509, 12, 1125, 10531, 24, 65, 3631, 509, 12, 1125, 63, 25, 30, 27, 65, 363...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 712, 12, 1125, 4672, 775, 30, 1244, 273, 533, 18, 6406, 12, 1125, 13, 3286, 16, 3138, 16, 2548, 273, 509, 12, 1125, 10531, 24, 65, 3631, 509, 12, 1125, 63, 25, 30, 27, 65, 363...
port_link = lun_dir + "/" + port
port_link_tmp = lun_dir + "/" + port if not os.path.islink(port_link_tmp): continue port_link = port_link_tmp break if port_link == "": print "Active TCM_Loop port link does not exist!" sys.exit(1)
def tcm_loop_dellun(option, opt_str, value, parser): sas_target_address = str(value[0]) sas_target_tpgt = str(value[1]) sas_target_lun = str(value[2]) port_link = "" lun_dir = tcm_loop_root + sas_target_address + "/tpgt_" + sas_target_tpgt + "/lun/lun_" + sas_target_lun for port in os.listdir(lun_dir): port_link = lun_dir + "/" + port unlink_op = "unlink " + port_link ret = os.system(unlink_op) if ret: print "Unable to unlink port for virtual SCSI Logical Unit: " + port sys.exit(1) rmdir_op = "rmdir " + tcm_loop_root + sas_target_address + "/tpgt_" + sas_target_tpgt + "/lun/lun_" + sas_target_lun ret = os.system(rmdir_op) if ret: print "Unable to rmdir configfs group for virtual SCSI Logical Unit: " + port sys.exit(1) else: print "Succesfully deleted local virtual SCSI Logical Unit from SAS Target Port" return
8ad98e3de13bca4157719f80b606a67b4c51a324 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8449/8ad98e3de13bca4157719f80b606a67b4c51a324/tcm_loop.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1715, 81, 67, 6498, 67, 72, 1165, 318, 12, 3482, 16, 2153, 67, 701, 16, 460, 16, 2082, 4672, 16375, 67, 3299, 67, 2867, 273, 609, 12, 1132, 63, 20, 5717, 16375, 67, 3299, 67, 6834, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1715, 81, 67, 6498, 67, 72, 1165, 318, 12, 3482, 16, 2153, 67, 701, 16, 460, 16, 2082, 4672, 16375, 67, 3299, 67, 2867, 273, 609, 12, 1132, 63, 20, 5717, 16375, 67, 3299, 67, 6834, ...
assert False
self.endTagColgroup() if not self.parser.innerHTML: self.parser.processEndTag(name)
def endTagOther(self, name): # XXX assert False
36b71a4ddc0e98d7d11e201f10b1fca5a4402b83 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10463/36b71a4ddc0e98d7d11e201f10b1fca5a4402b83/parser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 29765, 8290, 12, 2890, 16, 508, 4672, 468, 11329, 1815, 1083, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 29765, 8290, 12, 2890, 16, 508, 4672, 468, 11329, 1815, 1083, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
if self.parser.openElements[-1] in ("title", "style", "script"):
if self.parser.openElements[-1].name in ("title", "style", "script"):
def processNonSpaceCharacter(self, data): if self.parser.openElements[-1] in ("title", "style", "script"): self.parser.openElements[-1].appendChild(TextNode(data)) else: self.endTagHead("head") self.parser.switchInsertionMode("afterHead") self.parser.processCharacter(data) """ if self.collectingCharacters: self.characterBuffer += data else: self.anythingElse() self.parser.processCharacter(data) """
aef8e8816e937784b3d533d7714a0db19c756bcd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10463/aef8e8816e937784b3d533d7714a0db19c756bcd/parser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 3989, 3819, 7069, 12, 2890, 16, 501, 4672, 309, 365, 18, 4288, 18, 3190, 3471, 18919, 21, 8009, 529, 316, 7566, 2649, 3113, 315, 4060, 3113, 315, 4263, 6, 4672, 365, 18, 4288, 18...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 3989, 3819, 7069, 12, 2890, 16, 501, 4672, 309, 365, 18, 4288, 18, 3190, 3471, 18919, 21, 8009, 529, 316, 7566, 2649, 3113, 315, 4060, 3113, 315, 4263, 6, 4672, 365, 18, 4288, 18...
selrow_metadata.append(model.get_metadata(path))
selrow_metadata.append(model.get_metadata(path))
def __get_currently_selected_rows_metadata(self): tv = None selrow_metadata = None #get the current treeview if self.__treeview_file.is_focus(): tv = self.__treeview_file elif self.__treeview_track.is_focus(): tv = self.__treeview_track else: return None # find which (last) row was selected on which treeview selrow_metadata = [] (model, paths) = tv.get_selection().get_selected_rows() if tv: for path in paths: selrow_metadata.append(model.get_metadata(path)) return selrow_metadata
d382ec2a930240988ff9b57599420845a0b6f246 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2271/d382ec2a930240988ff9b57599420845a0b6f246/MTPnavigator.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 588, 67, 2972, 715, 67, 8109, 67, 3870, 67, 4165, 12, 2890, 4672, 13521, 273, 599, 357, 492, 67, 4165, 273, 599, 468, 588, 326, 783, 2151, 1945, 309, 365, 16186, 3413, 1945, 67, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 588, 67, 2972, 715, 67, 8109, 67, 3870, 67, 4165, 12, 2890, 4672, 13521, 273, 599, 357, 492, 67, 4165, 273, 599, 468, 588, 326, 783, 2151, 1945, 309, 365, 16186, 3413, 1945, 67, ...
for newNode in newNodeList: if isinstance(newNode, Chunk): chunkList.append(newNode)
other_pastable_items = [] chunkList = filter(lambda newNode: filterChunks(newNode), newNodeList) if len(chunkList) < len(newNodeList): other_pastable_items = filter(lambda newNode: filterOtherPastables(newNode), newNodeList)
def _pasteGroup(self, groupToPaste, mousePosition = None): """ Paste the given group (and all its members) in the 3 D workspace. @param groupToPaste: The group to be pasted in the 3D workspace @type groupToPaste: L{Group} @param mousePosition: These are the coordinates during mouse double click. @type mousePosition: Array containing the x, y, z positions on the screen or 'None' @see: L{self.paste} for implementation notes. """ assert isinstance(groupToPaste, Group) pastable = groupToPaste pos = mousePosition newGroup = None errorMsg = None moveOffset = V(0, 0, 0) assy = self.assy newGroup = Group(pastable.name, assy, None) # Review: should this use Group or groupToPaste.__class__, # e.g. re a DnaGroup or DnaSegment? [bruce 080314 question] nodes = list(pastable.members) newNodeList = copied_nodes_for_DND(nodes, autogroup_at_top = False, assy = assy) if not newNodeList: errorMsg = orangemsg("Clipboard item is an empty group."\ "Paste cancelled") # review: is this claim about the cause always correct? return newGroup, errorMsg chunkList = [] for newNode in newNodeList: if isinstance(newNode, Chunk): chunkList.append(newNode) if chunkList: boundingBox = BBox() for m in chunkList: boundingBox.merge(m.bbox) approxCenter = boundingBox.center() scale = float(boundingBox.scale() * 0.06) if scale < 0.001: scale = 0.1 else: approxCenter = V(0.01, 0.01, 0.01) scale = 0.1 if pos: moveOffset = pos - approxCenter else: moveOffset = scale * self.assy.o.right moveOffset += scale * self.assy.o.down for newNode in newNodeList: newNode.move(moveOffset) newGroup.addmember(newNode) assy.addnode(newGroup) return newGroup, errorMsg
f8f2489732dadd8ad6f66ca6d06b74cd1a4a3b8b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11221/f8f2489732dadd8ad6f66ca6d06b74cd1a4a3b8b/ops_copy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 29795, 1114, 12, 2890, 16, 1041, 774, 52, 14725, 16, 7644, 2555, 273, 599, 4672, 3536, 453, 14725, 326, 864, 1041, 261, 464, 777, 2097, 4833, 13, 316, 326, 890, 463, 6003, 18, 632...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 29795, 1114, 12, 2890, 16, 1041, 774, 52, 14725, 16, 7644, 2555, 273, 599, 4672, 3536, 453, 14725, 326, 864, 1041, 261, 464, 777, 2097, 4833, 13, 316, 326, 890, 463, 6003, 18, 632...
Py_DECREF(numpy);
#ifdef NPY_ENABLE_SEPARATE_COMPILATION
5b4964b395f7c7c032a1d87f98b3f82c6ff8510c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14925/5b4964b395f7c7c032a1d87f98b3f82c6ff8510c/generate_ufunc_api.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 468, 430, 536, 423, 16235, 67, 29377, 67, 1090, 2778, 1777, 67, 31075, 48, 2689, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 468, 430, 536, 423, 16235, 67, 29377, 67, 1090, 2778, 1777, 67, 31075, 48, 2689, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
req.log_error('FileSession cleanup: another process is already running.',
mtime = os.stat(lockfile).st_mtime if mtime < (time.time() - 3600): req.log_error('FileSession cleanup: stale lockfile found - deleting it', apache.APLOG_NOTICE) os.remove(lockfile) else: req.log_error('FileSession cleanup: another process is already running',
def filesession_cleanup(data): # There is a small chance that a the cleanup for a given session file # may occur at the exact time that the session is being accessed by # another request. It is possible under certain circumstances for that # session file to be saved in another request only to immediately deleted # by the cleanup. To avoid this race condition, a session is allowed a # grace_period before it is considered for deletion by the cleanup. # As long as the grace_period is longer that the time it takes to complete # the request (which should normally be less than 1 second), the session will # not be mistakenly deleted by the cleanup. By doing this we also avoid the # need to lock individual sessions and bypass any potential deadlock # situations. req = data['req'] sessdir = data['sessdir'] fast_cleanup = data['fast_cleanup'] verify_cleanup = data['verify_cleanup'] timeout = data['timeout'] grace_period = data['grace_period'] cleanup_time_limit = data['cleanup_time_limit'] req.log_error('FileSession cleanup: (fast=%s, verify=%s) ...' % (fast_cleanup,verify_cleanup), apache.APLOG_NOTICE) lockfile = os.path.join(sessdir,'.mp_sess.lck') try: lockfp = os.open(lockfile, os.O_CREAT | os.O_EXCL | os.O_WRONLY, 0660) except: req.log_error('FileSession cleanup: another process is already running.', apache.APLOG_NOTICE) return try: status_file = file(os.path.join(sessdir, 'fs_status.txt'), 'r') d = status_file.readline() status_file.close() if not d.startswith(FS_STAT_VERSION): raise Exception, 'wrong status file version' parts = d.split() stat_version = parts[0] next_i = int(parts[1]) expired_file_count = int(parts[2]) total_file_count = int(parts[3]) total_time = float(parts[4]) except: stat_version = FS_STAT_VERSION next_i = 0 expired_file_count = 0 total_file_count = 0 total_time = 0.0 try: start_time = time.time() filelist = os.listdir(sessdir) dir_index = range(0,256)[next_i:] for i in dir_index: path = '%s/%s' % (sessdir,'%02x' % i) if not os.path.exists(path): continue filelist = os.listdir(path) total_file_count += len(filelist) for f in filelist: try: filename = os.path.join(path,f) if fast_cleanup: accessed = os.stat(filename).st_mtime if time.time() - accessed < (timeout + grace_period): continue if fast_cleanup and not verify_cleanup: delete_session = True else: try: fp = file(filename) dict = cPickle.load(fp) if (time.time() - dict['_accessed']) > (dict['_timeout'] + grace_period): delete_session = True else: delete_session = False finally: fp.close() if delete_session: os.unlink(filename) expired_file_count += 1 except: s = cStringIO.StringIO() traceback.print_exc(file=s) s = s.getvalue() req.log_error('FileSession cleanup error: %s' % (s), apache.APLOG_NOTICE) next_i = (i + 1) % 256 time_used = time.time() - start_time if (cleanup_time_limit > 0) and (time_used > cleanup_time_limit): break total_time += time.time() - start_time if next_i == 0: # next_i can only be 0 when the full cleanup has run to completion req.log_error("FileSession cleanup: deleted %d of %d in %.4f seconds" % (expired_file_count, total_file_count, total_time), apache.APLOG_NOTICE) expired_file_count = 0 total_file_count = 0 total_time = 0.0 else: req.log_error("FileSession cleanup incomplete: next cleanup will start at index %d (%02x)" % (next_i,), apache.APLOG_NOTICE) status_file = file(os.path.join(sessdir, 'fs_status.txt'), 'w') status_file.write('%s %d %d %d %f\n' % (stat_version, next_i, expired_file_count, total_file_count, total_time)) status_file.close() try: os.unlink(lockfile) except: pass finally: os.close(lockfp)
2a8737450738d9b0e7e9bad90a69b68451e179cf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10002/2a8737450738d9b0e7e9bad90a69b68451e179cf/Session.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1390, 893, 67, 16732, 12, 892, 4672, 468, 6149, 353, 279, 5264, 17920, 716, 279, 326, 6686, 364, 279, 864, 1339, 585, 468, 2026, 3334, 622, 326, 5565, 813, 716, 326, 1339, 353, 3832, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1390, 893, 67, 16732, 12, 892, 4672, 468, 6149, 353, 279, 5264, 17920, 716, 279, 326, 6686, 364, 279, 864, 1339, 585, 468, 2026, 3334, 622, 326, 5565, 813, 716, 326, 1339, 353, 3832, 1...
'for %s: %s vs %s' % (path, n1, n2))
'for %s: (%s) vs (%s)' % (path, ', '.join(str(n) for n in n1), ', '.join(str(n) for n in n2)))
def merge_submodules(v1, v2, precedence, cyclecheck, path): n1 = sorted([m.canonical_name for m in v1]) n2 = sorted([m.canonical_name for m in v2]) if (n1 != n2) and (n2 != []): log.warning('Introspector & parser disagree about submodules ' 'for %s: %s vs %s' % (path, n1, n2)) return v1 + [m for m in v2 if m.canonical_name not in n1] return v1
98938405ab46d4c207a86fa5b8caf32c32aa73c0 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3512/98938405ab46d4c207a86fa5b8caf32c32aa73c0/docbuilder.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2691, 67, 1717, 6400, 12, 90, 21, 16, 331, 22, 16, 14172, 16, 8589, 1893, 16, 589, 4672, 290, 21, 273, 3115, 3816, 81, 18, 18288, 67, 529, 364, 312, 316, 331, 21, 5717, 290, 22, 27...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2691, 67, 1717, 6400, 12, 90, 21, 16, 331, 22, 16, 14172, 16, 8589, 1893, 16, 589, 4672, 290, 21, 273, 3115, 3816, 81, 18, 18288, 67, 529, 364, 312, 316, 331, 21, 5717, 290, 22, 27...
res = validation.validate(v, value)
res = validation.validate(v, value, **kwargs)
def validate(self, value): """ Validate passed-in value using all field validators. Return None if all validations pass; otherwise, return failed result returned by validator """ for v in self.validators: res = validation.validate(v, value) if res != 1: return res return None
f21d9314e77a27b2d7664a853ef8d3fdc4ca23a8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12165/f21d9314e77a27b2d7664a853ef8d3fdc4ca23a8/Field.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1954, 12, 2890, 16, 460, 4672, 3536, 3554, 2275, 17, 267, 460, 1450, 777, 652, 11632, 18, 2000, 599, 309, 777, 20808, 1342, 31, 3541, 16, 327, 2535, 563, 2106, 635, 4213, 3536, 364, 33...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1954, 12, 2890, 16, 460, 4672, 3536, 3554, 2275, 17, 267, 460, 1450, 777, 652, 11632, 18, 2000, 599, 309, 777, 20808, 1342, 31, 3541, 16, 327, 2535, 563, 2106, 635, 4213, 3536, 364, 33...
fstack = filter(None, self.margin_stack)
fstack = [m for m in self.margin_stack if m]
def pop_margin(self): if self.margin_stack: del self.margin_stack[-1] fstack = filter(None, self.margin_stack) if fstack: margin = fstack[-1] else: margin = None self.writer.new_margin(margin, len(fstack))
03af49c6a798af1750aa4097fce372e7821e481d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8125/03af49c6a798af1750aa4097fce372e7821e481d/formatter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1843, 67, 10107, 12, 2890, 4672, 309, 365, 18, 10107, 67, 3772, 30, 1464, 365, 18, 10107, 67, 3772, 18919, 21, 65, 284, 3772, 273, 306, 81, 364, 312, 316, 365, 18, 10107, 67, 3772, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1843, 67, 10107, 12, 2890, 4672, 309, 365, 18, 10107, 67, 3772, 30, 1464, 365, 18, 10107, 67, 3772, 18919, 21, 65, 284, 3772, 273, 306, 81, 364, 312, 316, 365, 18, 10107, 67, 3772, 3...
self.show_error('Cannot')
self.show_error('Cannot read memory')
def browse_memory(self, addr=None): # select a region contains addr try: self.read_maps() except: show_error('Cannot retieve memory maps of that process, maybe it has exited (crashed), or you don\'t have enough privilege') selected_region = None if addr: for m in self.maps: if m['start_addr'] <= addr and addr < m['end_addr']: selected_region = m break if selected_region: if selected_region['flags'][0] != 'r': # not readable show_error('Address %x is not readable' % (addr,)) return else: show_error('Address %x is not valid' % (addr,)) return else: # just select the first readable region for m in self.maps: if m['flags'][0] == 'r': selected_region = m break if selected_region is None: self.show_error('Cannot find a readable region') return addr = selected_region['start_addr']
0d3f0f2df725417cab3e0878478cda8a55917e88 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4850/0d3f0f2df725417cab3e0878478cda8a55917e88/GameConqueror.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 21670, 67, 7858, 12, 2890, 16, 3091, 33, 7036, 4672, 468, 2027, 279, 3020, 1914, 3091, 775, 30, 365, 18, 896, 67, 10711, 1435, 1335, 30, 2405, 67, 1636, 2668, 4515, 325, 21271, 3778, 7...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 21670, 67, 7858, 12, 2890, 16, 3091, 33, 7036, 4672, 468, 2027, 279, 3020, 1914, 3091, 775, 30, 365, 18, 896, 67, 10711, 1435, 1335, 30, 2405, 67, 1636, 2668, 4515, 325, 21271, 3778, 7...
ovrs=self._overview_list[self.overview_menu.get_history()]
progress.ProgressCB(1, 'Done') ovrs = self._overview_list[self.overview_menu.get_history()]
def export_cb(self,*args): ipfile=self.frame_dict['Files'].get('Input') opfile=self.frame_dict['Files'].get('Output') if os.path.isfile(opfile): resp=GtkExtra.message_box('Confirmation',opfile + ' exists. Overwrite?',('Yes','No')) if resp == 'No': return elif len(opfile) == 0: gvutils.error('No output filename entered!') return
18bebfddf000a5af98d1ab83e4246e700756e2a4 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11090/18bebfddf000a5af98d1ab83e4246e700756e2a4/Tool_Export.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3359, 67, 7358, 12, 2890, 16, 14, 1968, 4672, 2359, 768, 33, 2890, 18, 3789, 67, 1576, 3292, 2697, 29489, 588, 2668, 1210, 6134, 1061, 768, 33, 2890, 18, 3789, 67, 1576, 3292, 2697, 29...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3359, 67, 7358, 12, 2890, 16, 14, 1968, 4672, 2359, 768, 33, 2890, 18, 3789, 67, 1576, 3292, 2697, 29489, 588, 2668, 1210, 6134, 1061, 768, 33, 2890, 18, 3789, 67, 1576, 3292, 2697, 29...
if self.missingModules:
if self.missingModules or self.maybeMissingModules:
def postProcess(self): self.addPythonModules() if self.strip and not self.symlink: self.stripBinaries()
74bdca8a207af74796b7e4a117886be92818f6cb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/74bdca8a207af74796b7e4a117886be92818f6cb/bundlebuilder.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1603, 2227, 12, 2890, 4672, 365, 18, 1289, 15774, 7782, 1435, 309, 365, 18, 6406, 471, 486, 365, 18, 21278, 30, 365, 18, 6406, 9913, 5646, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1603, 2227, 12, 2890, 4672, 365, 18, 1289, 15774, 7782, 1435, 309, 365, 18, 6406, 471, 486, 365, 18, 21278, 30, 365, 18, 6406, 9913, 5646, 1435, 2, -100, -100, -100, -100, -100, -100, ...
def classlistFromInclude(self, include, block, variants, verifyDeps=False): def classlistFromClassRecursive(item, block, variants, result):
def classlistFromInclude(self, includeWithDeps, excludeWithDeps, variants, verifyDeps=False): def classlistFromClassRecursive(item, excludeWithDeps, variants, result):
def classlistFromInclude(self, include, block, variants, verifyDeps=False):
ca3bf86fb2d4f8478c8c20f6093a6fb5226c2f4b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5718/ca3bf86fb2d4f8478c8c20f6093a6fb5226c2f4b/DependencyLoader.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 667, 1098, 1265, 8752, 12, 2890, 16, 2341, 16, 1203, 16, 12935, 16, 3929, 14430, 33, 8381, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 667, 1098, 1265, 8752, 12, 2890, 16, 2341, 16, 1203, 16, 12935, 16, 3929, 14430, 33, 8381, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
if expectedToWork:
if expect_success:
def tryProtocolCombo (server_protocol, client_protocol, expectedToWork, certsreqs=None):
f08683542eada763321715f558eac5b2baec28e9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12029/f08683542eada763321715f558eac5b2baec28e9/test_ssl.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 775, 5752, 16156, 261, 3567, 67, 8373, 16, 1004, 67, 8373, 16, 2665, 774, 2421, 16, 13870, 25782, 33, 7036, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 775, 5752, 16156, 261, 3567, 67, 8373, 16, 1004, 67, 8373, 16, 2665, 774, 2421, 16, 13870, 25782, 33, 7036, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
def send_request(self, layout, entry, **kargs): counter = unicode(entry.entry_get()).encode("utf-8").replace("<br>","").strip() if len(counter) == 0: self.send_empty(layout).start() elif len(counter) > 159: self.dialog.dialog("layout", "Error", "Text too long, only single messages possible at the moment, please shorten your text").start()
def send_request(self, layout, entry, number, **kargs): if len(number) < 4 : self.dialog.dialog("layout", "Error", "Number too short or none entered. Please enter a valid number.").start()
def send_request(self, layout, entry, **kargs):
09f34ee0fec480f5f1cdb3f85e0b9de65261564f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4712/09f34ee0fec480f5f1cdb3f85e0b9de65261564f/msgs2.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 67, 2293, 12, 2890, 16, 3511, 16, 1241, 16, 2826, 79, 1968, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 67, 2293, 12, 2890, 16, 3511, 16, 1241, 16, 2826, 79, 1968, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
def __call__(self, *args, **kwargs): """ converts ``values()`` into a string value This method converts the results of ``values()`` into a string value for common usage. If more than one result are found; they are comma delimited as described by section 4.2 of RFC 2616. """ results = self.values(*args, **kwargs) if not results: return '' return ", ".join([str(v).strip() for v in results])
def __call__(self, *args, **kwargs): """ converts ``values()`` into a string value
74c8cfe93867f6b65436c8d806519ede20e99b6d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2097/74c8cfe93867f6b65436c8d806519ede20e99b6d/httpheaders.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 380, 1968, 16, 2826, 4333, 4672, 3536, 7759, 12176, 2372, 1435, 10335, 1368, 279, 533, 460, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 380, 1968, 16, 2826, 4333, 4672, 3536, 7759, 12176, 2372, 1435, 10335, 1368, 279, 533, 460, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
structure_a.append(5)
array_a.append(5)
def test_unequal(a, b, test): if k3d.almost_equal(a, b, 0): print repr(a) print repr(b) raise Exception(test + " should test unequal")
8b37b565a58bed65bfcbd2ece6605e3bd491068b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11286/8b37b565a58bed65bfcbd2ece6605e3bd491068b/mesh.diff.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 7556, 3369, 12, 69, 16, 324, 16, 1842, 4672, 309, 417, 23, 72, 18, 287, 10329, 67, 9729, 12, 69, 16, 324, 16, 374, 4672, 1172, 8480, 12, 69, 13, 1172, 8480, 12, 70, 13, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 7556, 3369, 12, 69, 16, 324, 16, 1842, 4672, 309, 417, 23, 72, 18, 287, 10329, 67, 9729, 12, 69, 16, 324, 16, 374, 4672, 1172, 8480, 12, 69, 13, 1172, 8480, 12, 70, 13, ...
def validate(self, value, instance, errors={}, **kwargs):
def validate(self, value, **kwargs):
def validate(self, value, instance, errors={}, **kwargs): """ Validate passed-in value using all field validators. Return None if all validations pass; otherwise, return failed result returned by validator """ name = self.getName() if errors and errors.has_key(name): return 1
64c71cec849e633ac53e1bcfe44e2c42bf15bd9b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12165/64c71cec849e633ac53e1bcfe44e2c42bf15bd9b/Field.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1954, 12, 2890, 16, 460, 16, 2826, 4333, 4672, 3536, 3554, 2275, 17, 267, 460, 1450, 777, 652, 11632, 18, 2000, 599, 309, 777, 20808, 1342, 31, 3541, 16, 327, 2535, 563, 2106, 635, 421...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1954, 12, 2890, 16, 460, 16, 2826, 4333, 4672, 3536, 3554, 2275, 17, 267, 460, 1450, 777, 652, 11632, 18, 2000, 599, 309, 777, 20808, 1342, 31, 3541, 16, 327, 2535, 563, 2106, 635, 421...
data.append(v)
dataappend(v)
def _mk_bitmap(bits): data = [] if _sre.CODESIZE == 2: start = (1, 0) else: start = (1L, 0L) m, v = start for c in bits: if c: v = v + m m = m << 1 if m > MAXCODE: data.append(v) m, v = start return data
2177055b902a7e649c7988bb4499ab5115b4ea1d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2177055b902a7e649c7988bb4499ab5115b4ea1d/sre_compile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 24816, 67, 3682, 1458, 12, 6789, 4672, 501, 273, 5378, 309, 389, 87, 266, 18, 5572, 4574, 422, 576, 30, 787, 273, 261, 21, 16, 374, 13, 469, 30, 787, 273, 261, 21, 48, 16, 374...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 24816, 67, 3682, 1458, 12, 6789, 4672, 501, 273, 5378, 309, 389, 87, 266, 18, 5572, 4574, 422, 576, 30, 787, 273, 261, 21, 16, 374, 13, 469, 30, 787, 273, 261, 21, 48, 16, 374...
WEIGHTS[_('Comments')] = 2 WEIGHTS[_('Series')] = 3 WEIGHTS[_('Tags')] = 4
WEIGHTS[_('Comments')] = 4 WEIGHTS[_('Series')] = 2 WEIGHTS[_('Tags')] = 3
def mouseReleaseEvent(self, ev): self.emit(SIGNAL('mr(int)'), 1)
e72ce2c29f161a6decf8399c6d2ffd2140767bac /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9125/e72ce2c29f161a6decf8399c6d2ffd2140767bac/status.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7644, 7391, 1133, 12, 2890, 16, 2113, 4672, 365, 18, 18356, 12, 11260, 1013, 2668, 21387, 12, 474, 2506, 3631, 404, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7644, 7391, 1133, 12, 2890, 16, 2113, 4672, 365, 18, 18356, 12, 11260, 1013, 2668, 21387, 12, 474, 2506, 3631, 404, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
if type(depstring) not in types.StringTypes: depstring = str(depstring) raise Errors.YumBaseError, _('No Package found for %s') % depstring
raise Errors.YumBaseError, _('No Package found for %s') % errstring
def returnPackageByDep(self, depstring): """Pass in a generic [build]require string and this function will pass back the best(or first) package it finds providing that dep.""" try: pkglist = self.returnPackagesByDep(depstring) except Errors.YumBaseError: if type(depstring) not in types.StringTypes: depstring = str(depstring) raise Errors.YumBaseError, _('No Package found for %s') % depstring ps = ListPackageSack(pkglist) result = self._bestPackageFromList(ps.returnNewestByNameArch()) if result is None: if type(depstring) not in types.StringTypes: depstring = str(depstring) raise Errors.YumBaseError, _('No Package found for %s') % depstring return result
dce91a8c36d10be8b4242e0bce7369f55121b2f5 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5445/dce91a8c36d10be8b4242e0bce7369f55121b2f5/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 327, 2261, 858, 16316, 12, 2890, 16, 5993, 1080, 4672, 3536, 6433, 316, 279, 5210, 306, 3510, 65, 6528, 533, 471, 333, 445, 903, 1342, 1473, 326, 3796, 12, 280, 1122, 13, 2181, 518, 13...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 327, 2261, 858, 16316, 12, 2890, 16, 5993, 1080, 4672, 3536, 6433, 316, 279, 5210, 306, 3510, 65, 6528, 533, 471, 333, 445, 903, 1342, 1473, 326, 3796, 12, 280, 1122, 13, 2181, 518, 13...
self.attributes = attributes self.__dict__.update(attributes) self._is_record = isrec self._bytes = [1, 1, 2, 4, 4, 8][self._nc_type-1] type_ = ['i', 'S', 'i', 'i', 'f', 'f'][self._nc_type-1] dtype = '>%s%d' % (type_, self._bytes) bytes = self._begin + self._vsize if isrec: self.__array_data__ = zeros(shape, dtype) bytes += (shape[0] - 1) * recsize for n in range(shape[0]): offset = self._begin + (n * recsize) mm = mmap.mmap(fileno, bytes, access=mmap.ACCESS_READ) self.__array_data__[n] = ndarray.__new__(ndarray, shape[1:], dtype=dtype, buffer=mm, offset=offset, order=0) else: mm = mmap.mmap(fileno, bytes, access=mmap.ACCESS_READ) self.__array_data__ = ndarray.__new__(ndarray, shape, dtype=dtype, buffer=mm, offset=self._begin, order=0) self.__array_interface__ = {'shape' : shape, 'typestr': dtype, 'data' : self.__array_data__, 'version': 3, }
self._attributes = attributes or {} for k, v in self._attributes.items(): self.__dict__[k] = v def __setattr__(self, attr, value): try: self._attributes[attr] = value except AttributeError: pass self.__dict__[attr] = value def isrec(self): return self.data.shape and not self._shape[0] isrec = property(isrec) def shape(self): return self.data.shape shape = property(shape) def getValue(self): return self.data.item() def assignValue(self, value): self.data.itemset(value) def typecode(self): return self._typecode
def __init__(self, fileno, nc_type, vsize, begin, shape, dimensions, attributes, isrec=False, recsize=0): self._nc_type = nc_type self._vsize = vsize self._begin = begin self.shape = shape self.dimensions = dimensions self.attributes = attributes # for ``dap.plugins.netcdf`` self.__dict__.update(attributes) self._is_record = isrec
10f173ae17d920e2e13f35ad760832641e6b4a35 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1380/10f173ae17d920e2e13f35ad760832641e6b4a35/pupynere.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 24256, 16, 8194, 67, 723, 16, 331, 1467, 16, 2376, 16, 2179, 16, 5769, 16, 1677, 16, 353, 3927, 33, 8381, 16, 1950, 1467, 33, 20, 4672, 365, 6315, 1420...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 24256, 16, 8194, 67, 723, 16, 331, 1467, 16, 2376, 16, 2179, 16, 5769, 16, 1677, 16, 353, 3927, 33, 8381, 16, 1950, 1467, 33, 20, 4672, 365, 6315, 1420...
print "Loading plugins in dir %s" % pluginPath
def _loadPlugins(self): """ Load plugins. """ for pluginPath in self.pluginPaths: print "Loading plugins in dir %s" % pluginPath self._loadPluginsInDir(pluginPath)
93668ff5f5ed8f81c83638f670b89ce8ee94b530 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8259/93668ff5f5ed8f81c83638f670b89ce8ee94b530/Core.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 945, 9461, 12, 2890, 4672, 3536, 4444, 4799, 18, 3536, 364, 1909, 743, 316, 365, 18, 4094, 4466, 30, 365, 6315, 945, 9461, 382, 1621, 12, 4094, 743, 13, 2, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 945, 9461, 12, 2890, 4672, 3536, 4444, 4799, 18, 3536, 364, 1909, 743, 316, 365, 18, 4094, 4466, 30, 365, 6315, 945, 9461, 382, 1621, 12, 4094, 743, 13, 2, -100, -100, -100, -100,...
% (page_put_queue.qsize(), datetime.timedelta(seconds=(page_put_queue.qsize()) * config.put_throttle)),
% (remainingPages, remainingSeconds),
def _flush(): """Wait for the page-putter to flush its queue. Called automatically upon exiting from Python. """ if page_put_queue.qsize() > 0: import datetime remaining = datetime.timedelta( seconds = page_put_queue.qsize() * config.put_throttle) output(u'Waiting for %i pages to be put. Estimated time remaining: %s' % (page_put_queue.qsize(), remaining)) page_put_queue.put((None, None, None, None, None, None, None)) while(_putthread.isAlive()): try: _putthread.join(1) except KeyboardInterrupt: answer = inputChoice(u'There are %i pages remaining in the queue. Estimated time remaining: %s\nReally exit?' % (page_put_queue.qsize(), datetime.timedelta(seconds=(page_put_queue.qsize()) * config.put_throttle)), ['yes', 'no'], ['y', 'N'], 'N') if answer in ['y', 'Y']: return try: get_throttle.drop() except NameError: pass
44bfae3756892859809543bfb38c7ad8d28b5d64 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4404/44bfae3756892859809543bfb38c7ad8d28b5d64/wikipedia.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 11330, 13332, 3536, 5480, 364, 326, 1363, 17, 458, 387, 358, 3663, 2097, 2389, 18, 225, 11782, 6635, 12318, 15702, 628, 6600, 18, 225, 3536, 309, 1363, 67, 458, 67, 4000, 18, 85, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 11330, 13332, 3536, 5480, 364, 326, 1363, 17, 458, 387, 358, 3663, 2097, 2389, 18, 225, 11782, 6635, 12318, 15702, 628, 6600, 18, 225, 3536, 309, 1363, 67, 458, 67, 4000, 18, 85, ...
update_equality_graph(eq_graph, s, t, mat)
update_equality_graph(eq_graph, s, t, mat, x_vec, y_vec)
def calc_max_assignment(mat): """Uses the Hungarian algorithm to find the maximum weighted perfect matching. see notes http://www.cse.ust.hk/~golin/COMP572/Notes/Matching.pdf for description of the algorithm and the notation. """ print mat dim = len(mat) # Initialization: # Assign the initial labels (all y's get 0, and all x's get the cell weight) # Construct the equality graph, and # Find the initial matching y_vec = [Vertex(n, 0, True) for n in xrange(dim)] x_vec = [] eq_graph = EqualityGraph(dim) matching = [] m_y_vertices = set() m_x_vertices = set() for n, row in enumerate(mat): assert (dim == len(row)) m = max(row) x_el = Vertex(n, m, False) x_vec.append(x_el) for col_n, cell in enumerate(row): if cell == m: y_el = y_vec[col_n] e = eq_graph.add(x_el, y_el) if (y_el not in m_y_vertices) and (x_el not in m_x_vertices): # Edges of the equality graph can be part of the matching # as long as the vertices do not already exist in the matching m_x_vertices.add(x_el) m_y_vertices.add(y_el) matching.append(e) e.set_in_match(True) # if the matching is perfect, we are done. if len(matching) == dim: return score_from_matching(matching) # Add a free vertex to the set S assert len(s) == 1 # The set t is the empty set t = set() all_y = set(range(dim)) reset_s = True while len(matching) != dim: if reset_s: s = set() for x in x_vec: if x.matching_edge is None: s.add(x) break reset_s = False neighborhood = get_neighboring_vertices(s) if neighborhood == t: update_labelings(all_y, t, s, mat) update_equality_graph(eq_graph, s, t, mat) else: diff = neighborhood - t y = diff[0] if y.matching_edge is None: # y is free assert len(s) == 1 u = s.pop() eq_graph.augment_path(u, y, matching) reset_s = True else: t.add(u) s.add(y.matching_edge.tail) return
a2ad0dee0947cbc68b1113dad3dc27777f909fdb /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11717/a2ad0dee0947cbc68b1113dad3dc27777f909fdb/partition_dist.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7029, 67, 1896, 67, 12960, 12, 7373, 4672, 3536, 15128, 326, 670, 20651, 297, 2779, 4886, 358, 1104, 326, 4207, 13747, 24746, 3607, 18, 2621, 10913, 1062, 2207, 5591, 18, 71, 307, 18, 64...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7029, 67, 1896, 67, 12960, 12, 7373, 4672, 3536, 15128, 326, 670, 20651, 297, 2779, 4886, 358, 1104, 326, 4207, 13747, 24746, 3607, 18, 2621, 10913, 1062, 2207, 5591, 18, 71, 307, 18, 64...
self.failUnlessEqual(ct, later) self.failUnlessEqual(at, later) self.failUnlessEqual(wt, later)
if issubclass(pywintypes.TimeType, datetime.datetime): self.failUnlessEqual(ct, later) self.failUnlessEqual(at, later) self.failUnlessEqual(wt, later)
def testFileTimes(self): if issubclass(pywintypes.TimeType, datetime.datetime): from win32timezone import GetLocalTimeZone now = datetime.datetime.now(tz=GetLocalTimeZone()) ok_delta = datetime.timedelta(seconds=1) later = now + datetime.timedelta(seconds=120) else: tick = int(time.time()) now = pywintypes.Time(tick) ok_delta = 1 later = pywintypes.Time(tick+120)
cc4c24e2f7937be9431972ddb327c9bbbc07b4f5 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/992/cc4c24e2f7937be9431972ddb327c9bbbc07b4f5/test_win32file.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 812, 10694, 12, 2890, 4672, 309, 14664, 12, 2074, 91, 474, 989, 18, 950, 559, 16, 3314, 18, 6585, 4672, 628, 5657, 1578, 12690, 1930, 968, 2042, 16760, 2037, 273, 3314, 18, 6585, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 812, 10694, 12, 2890, 4672, 309, 14664, 12, 2074, 91, 474, 989, 18, 950, 559, 16, 3314, 18, 6585, 4672, 628, 5657, 1578, 12690, 1930, 968, 2042, 16760, 2037, 273, 3314, 18, 6585, ...
self._mesg('%s response: %s' % (typ, dat))
self._mesg('%s response: %r' % (typ, dat))
def _get_response(self):
904415bf68711317b77f5fac862d529284410d4b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12029/904415bf68711317b77f5fac862d529284410d4b/imaplib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 2740, 12, 2890, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 2740, 12, 2890, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
def parse_options():
def parse_options(arglist):
def parse_options(): import optparse usage = "usage: %prog [options]" parser = optparse.OptionParser(usage) parser.add_option("-s", "--steps", action="store", metavar="S[,S]", default="", help="Select range of steps to run") parser.add_option("--no-work_files", "--suppress-work-files", action="store_false", default=True, dest="save_work", help="Do not save intermediate files in the work sub-directory") options, args = parser.parse_args() if len(args) != 0: parser.error("Unexpected arguments") options.steps = parse_steps(options.steps) return options, args
0bdd54259d82872335af5eada509d7c3e7b3807a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6890/0bdd54259d82872335af5eada509d7c3e7b3807a/run.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 2116, 12, 3175, 1098, 4672, 1930, 2153, 2670, 4084, 273, 315, 9167, 30, 738, 14654, 306, 2116, 4279, 2082, 273, 2153, 2670, 18, 1895, 2678, 12, 9167, 13, 225, 2082, 18, 1289, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 2116, 12, 3175, 1098, 4672, 1930, 2153, 2670, 4084, 273, 315, 9167, 30, 738, 14654, 306, 2116, 4279, 2082, 273, 2153, 2670, 18, 1895, 2678, 12, 9167, 13, 225, 2082, 18, 1289, ...
st = obspy.read(mseedfile)
st = read(mseedfile)
def test_saveWaveform(self): """ """ mseedfile = NamedTemporaryFile().name fseedfile = NamedTemporaryFile().name # initialize client client = Client() start = UTCDateTime(2008, 1, 1) end = start + 1 # MiniSEED client.saveWaveform(mseedfile, 'BW', 'MANZ', '', 'EHZ', start, end) stats = os.stat(mseedfile) st = obspy.read(mseedfile) self.assertEquals(stats.st_size, 1024) # ArcLink cuts on record base self.assertTrue(st[0].stats.starttime <= start) self.assertTrue(st[0].stats.endtime >= end) self.assertEquals(st[0].stats.network, 'BW') self.assertEquals(st[0].stats.station, 'MANZ') self.assertEquals(st[0].stats.location, '') self.assertEquals(st[0].stats.channel, 'EHZ') os.remove(mseedfile) # Full SEED client.saveWaveform(fseedfile, 'BW', 'MANZ', '', 'EHZ', start, end, format='FSEED') stats = os.stat(fseedfile) st = obspy.read(fseedfile) self.assertTrue(stats.st_size > 1024) self.assertEquals(open(fseedfile).read(8), "000001V ") # ArcLink cuts on record base self.assertTrue(st[0].stats.starttime <= start) self.assertTrue(st[0].stats.endtime >= end) self.assertEquals(st[0].stats.network, 'BW') self.assertEquals(st[0].stats.station, 'MANZ') self.assertEquals(st[0].stats.location, '') self.assertEquals(st[0].stats.channel, 'EHZ') os.remove(fseedfile)
947320f8ec777bd92bf28a04ec93bbc08a261511 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10470/947320f8ec777bd92bf28a04ec93bbc08a261511/test_client.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 5688, 22368, 687, 12, 2890, 4672, 3536, 3536, 312, 12407, 768, 273, 27555, 7675, 529, 284, 12407, 768, 273, 27555, 7675, 529, 468, 4046, 1004, 1004, 273, 2445, 1435, 787, 273, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 5688, 22368, 687, 12, 2890, 4672, 3536, 3536, 312, 12407, 768, 273, 27555, 7675, 529, 284, 12407, 768, 273, 27555, 7675, 529, 468, 4046, 1004, 1004, 273, 2445, 1435, 787, 273, ...
headers += ('lum_V')
headers += ('lum_V',)
def weightvecs(m1, x1, m2, x2) : return [(x1[0]*m1 + x2[0]*m2)/(m1+m2), (x1[1]*m1 + x2[1]*m2)/(m1+m2), (x1[2]*m1 + x2[2]*m2)/(m1+m2)]
bfb5dae22944ece69bd7d148c3a4a1312a893d1a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7492/bfb5dae22944ece69bd7d148c3a4a1312a893d1a/tprofile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3119, 27698, 12, 81, 21, 16, 619, 21, 16, 312, 22, 16, 619, 22, 13, 294, 327, 306, 12, 92, 21, 63, 20, 5772, 81, 21, 397, 619, 22, 63, 20, 5772, 81, 22, 13176, 12, 81, 21, 15, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3119, 27698, 12, 81, 21, 16, 619, 21, 16, 312, 22, 16, 619, 22, 13, 294, 327, 306, 12, 92, 21, 63, 20, 5772, 81, 21, 397, 619, 22, 63, 20, 5772, 81, 22, 13176, 12, 81, 21, 15, ...
self.prefix = ""
def __init__(self, name=""): """Construct a TarInfo object. name is the optional name of the member. """
2527f7fee0f20946aa3162fae4ffe6181aee1eb1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/2527f7fee0f20946aa3162fae4ffe6181aee1eb1/tarfile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 508, 1546, 6, 4672, 3536, 7249, 279, 20334, 966, 733, 18, 508, 353, 326, 3129, 508, 434, 326, 3140, 18, 3536, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 508, 1546, 6, 4672, 3536, 7249, 279, 20334, 966, 733, 18, 508, 353, 326, 3129, 508, 434, 326, 3140, 18, 3536, 2, -100, -100, -100, -100, -100, -100, -100...
self._cont_handler.startElement(name, attrs)
self._cont_handler.startElementNS(name, qname, attrs)
def startElementNS(self, name, qname, attrs): self._cont_handler.startElement(name, attrs)
b21425775fa80c9c8cbb22911a08be9cf02eec45 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/b21425775fa80c9c8cbb22911a08be9cf02eec45/saxutils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13591, 3156, 12, 2890, 16, 508, 16, 12621, 16, 3422, 4672, 365, 6315, 1213, 67, 4176, 18, 1937, 1046, 12, 529, 16, 3422, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13591, 3156, 12, 2890, 16, 508, 16, 12621, 16, 3422, 4672, 365, 6315, 1213, 67, 4176, 18, 1937, 1046, 12, 529, 16, 3422, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
if system is None and hasattr('system', job):
if system is None and hasattr(job, 'system'):
def get(self, job, stat, system=None): run = self.allRunNames.get(str(job), None) if run is None: return None
ebe6e780a71ebcbcab3ab48d0e454e9c899a2e2c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7385/ebe6e780a71ebcbcab3ab48d0e454e9c899a2e2c/db.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 12, 2890, 16, 1719, 16, 610, 16, 2619, 33, 7036, 4672, 1086, 273, 365, 18, 454, 1997, 1557, 18, 588, 12, 701, 12, 4688, 3631, 599, 13, 309, 1086, 353, 599, 30, 327, 599, 2, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 12, 2890, 16, 1719, 16, 610, 16, 2619, 33, 7036, 4672, 1086, 273, 365, 18, 454, 1997, 1557, 18, 588, 12, 701, 12, 4688, 3631, 599, 13, 309, 1086, 353, 599, 30, 327, 599, 2, -1...
renaming[ltarg] = rename(lprev)
newrenaming[ltarg] = rename(lprev)
def visit(block): if not (isinstance(block, Block) and block.exitswitch == clastexc and len(block.exits) == 2 and block.exits[1].exitcase is Exception): return seen = [] norm, exc = block.exits query = exc.target switches = [ (None, norm) ] # collect the targets while len(query.exits) == 2: for lprev, ltarg in zip(exc.args, query.inputargs): renaming[ltarg] = rename(lprev) op = query.operations[0] if not (op.opname in ("is_", "issubtype") and rename(op.args[0]) == clastexc): break case = query.operations[0].args[-1].value assert issubclass(case, Exception) lno, lyes = query.exits if case not in seen: switches.append( (case, lyes) ) seen.append(case) exc = lno query = exc.target if Exception not in seen: switches.append( (Exception, exc) ) # construct the block's new exits exits = [] for case, oldlink in switches: link = oldlink.copy(rename) link.exitcase = case link.prevblock = block exits.append(link) block.exits = tuple(exits)
d70fc3af6325a4f519ac025faa578f6d6178d1fe /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/d70fc3af6325a4f519ac025faa578f6d6178d1fe/simplify.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3757, 12, 2629, 4672, 309, 486, 261, 291, 1336, 12, 2629, 16, 3914, 13, 471, 1203, 18, 338, 1282, 30390, 422, 927, 689, 10075, 471, 562, 12, 2629, 18, 338, 1282, 13, 422, 576, 471, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3757, 12, 2629, 4672, 309, 486, 261, 291, 1336, 12, 2629, 16, 3914, 13, 471, 1203, 18, 338, 1282, 30390, 422, 927, 689, 10075, 471, 562, 12, 2629, 18, 338, 1282, 13, 422, 576, 471, 1...
tim = im.resize((int(0.75*th), th), PILImage.ANTIALIAS).convert('RGB') tf = PersistentTemporaryFile(prefix="html2lrf_", suffix=".jpg") tf.close() tim.save(tf.name) tpath = tf.name else: raise ConversionError, 'Cannot read from: %s'% (options.cover,) if not options.title: options.title = default_title for prop in ('author', 'author_sort', 'title', 'title_sort', 'publisher', 'freetext'): val = getattr(options, prop) if val and not isinstance(val, unicode): soup = BeautifulSoup(val) setattr(options, prop, unicode(soup)) title = (options.title, options.title_sort) author = (options.author, options.author_sort) args = dict(font_delta=options.font_delta, title=title, \ author=author, sourceencoding='utf8',\ freetext=options.freetext, category=options.category, publisher=options.publisher, booksetting=BookSetting(dpi=10*options.profile.dpi, screenheight=options.profile.screen_height, screenwidth=options.profile.screen_width)) if tpath: args['thumbnail'] = tpath header = None if options.header: header = Paragraph() fheader = options.headerformat fheader = re.sub(r'([^%]|^)%t', r'\1' + options.title, fheader) fheader = re.sub(r'([^%]|^)%a', r'\1' + options.author, fheader) fheader = re.sub(r'%%a','%a',fheader) fheader = re.sub(r'%%t','%t',fheader) header.append(fheader + " ") book, fonts = Book(options, logger, header=header, **args) le = re.compile(options.link_exclude) if options.link_exclude else \ re.compile('$') pb = re.compile(options.page_break, re.IGNORECASE) if options.page_break else \ re.compile('$') fpb = re.compile(options.force_page_break, re.IGNORECASE) if options.force_page_break else \ re.compile('$') options.cover = cpath options.force_page_break = fpb options.link_exclude = le options.page_break = pb options.chapter_regex = re.compile(options.chapter_regex, re.IGNORECASE) fpba = options.force_page_break_attr.split(',') if len(fpba) != 3: fpba = ['$', '', '$'] options.force_page_break_attr = [re.compile(fpba[0], re.IGNORECASE), fpba[1], re.compile(fpba[2], re.IGNORECASE)] if not hasattr(options, 'anchor_ids'): options.anchor_ids = True files = options.spine if options.use_spine else [path] conv = HTMLConverter(book, fonts, options, logger, files) if options.use_spine: conv.create_toc(options.toc) oname = options.output if not oname: suffix = '.lrs' if options.lrs else '.lrf' name = os.path.splitext(os.path.basename(path))[0] + suffix oname = os.path.join(cwd,name) oname = os.path.abspath(os.path.expanduser(oname)) conv.writeto(oname, lrs=options.lrs) logger.info('Output written to %s', oname) conv.cleanup() return oname finally: os.chdir(cwd)
if not options.title: options.title = default_title for prop in ('author', 'author_sort', 'title', 'title_sort', 'publisher', 'freetext'): val = getattr(options, prop) if val and not isinstance(val, unicode): soup = BeautifulSoup(val) setattr(options, prop, unicode(soup)) title = (options.title, options.title_sort) author = (options.author, options.author_sort) args = dict(font_delta=options.font_delta, title=title, \ author=author, sourceencoding='utf8',\ freetext=options.freetext, category=options.category, publisher=options.publisher, booksetting=BookSetting(dpi=10*options.profile.dpi, screenheight=options.profile.screen_height, screenwidth=options.profile.screen_width)) if tpath: args['thumbnail'] = tpath header = None if options.header: header = Paragraph() fheader = options.headerformat fheader = re.sub(r'([^%]|^)%t', r'\1' + options.title, fheader) fheader = re.sub(r'([^%]|^)%a', r'\1' + options.author, fheader) fheader = re.sub(r'%%a','%a',fheader) fheader = re.sub(r'%%t','%t',fheader) header.append(fheader + " ") book, fonts = Book(options, logger, header=header, **args) le = re.compile(options.link_exclude) if options.link_exclude else \ re.compile('$') pb = re.compile(options.page_break, re.IGNORECASE) if options.page_break else \ re.compile('$') fpb = re.compile(options.force_page_break, re.IGNORECASE) if options.force_page_break else \ re.compile('$') options.force_page_break = fpb options.link_exclude = le options.page_break = pb options.chapter_regex = re.compile(options.chapter_regex, re.IGNORECASE) fpba = options.force_page_break_attr.split(',') if len(fpba) != 3: fpba = ['$', '', '$'] options.force_page_break_attr = [re.compile(fpba[0], re.IGNORECASE), fpba[1], re.compile(fpba[2], re.IGNORECASE)] if not hasattr(options, 'anchor_ids'): options.anchor_ids = True files = options.spine if options.use_spine else [path] conv = HTMLConverter(book, fonts, options, logger, files) if options.use_spine: conv.create_toc(options.toc) oname = options.output if not oname: suffix = '.lrs' if options.lrs else '.lrf' name = os.path.splitext(os.path.basename(path))[0] + suffix oname = os.path.join(os.getcwd(), name) oname = os.path.abspath(os.path.expanduser(oname)) conv.writeto(oname, lrs=options.lrs) logger.info('Output written to %s', oname) conv.cleanup() return oname
def process_file(path, options, logger=None): if re.match('http://|https://', path): raise ConversionError, 'You have to save the website %s as an html file first and then run html2lrf on it.'%(path,) if logger is None: level = logging.DEBUG if options.verbose else logging.INFO logger = logging.getLogger('html2lrf') setup_cli_handlers(logger, level) cwd = os.getcwd() default_title = filename_to_utf8(os.path.splitext(os.path.basename(path))[0]) dirpath = os.path.dirname(path) try: cpath, tpath = '', '' try_opf(path, options, logger) if options.cover: cpath = os.path.join(dirpath, os.path.basename(options.cover)) if not os.path.exists(cpath): cpath = os.path.abspath(os.path.expanduser(options.cover)) options.cover = cpath if os.access(options.cover, os.R_OK): th = Device.THUMBNAIL_HEIGHT im = PILImage.open(os.path.join(cwd, cpath)) cim = im.resize((options.profile.screen_width, options.profile.screen_height - options.profile.fudge), PILImage.BICUBIC).convert('RGB') cf = PersistentTemporaryFile(prefix=__appname__+"_", suffix=".jpg") cf.close() cim.save(cf.name) cpath = cf.name tim = im.resize((int(0.75*th), th), PILImage.ANTIALIAS).convert('RGB') tf = PersistentTemporaryFile(prefix="html2lrf_", suffix=".jpg") tf.close() tim.save(tf.name) tpath = tf.name else: raise ConversionError, 'Cannot read from: %s'% (options.cover,) if not options.title: options.title = default_title for prop in ('author', 'author_sort', 'title', 'title_sort', 'publisher', 'freetext'): val = getattr(options, prop) if val and not isinstance(val, unicode): soup = BeautifulSoup(val) setattr(options, prop, unicode(soup)) title = (options.title, options.title_sort) author = (options.author, options.author_sort) args = dict(font_delta=options.font_delta, title=title, \ author=author, sourceencoding='utf8',\ freetext=options.freetext, category=options.category, publisher=options.publisher, booksetting=BookSetting(dpi=10*options.profile.dpi, screenheight=options.profile.screen_height, screenwidth=options.profile.screen_width)) if tpath: args['thumbnail'] = tpath header = None if options.header: header = Paragraph() fheader = options.headerformat fheader = re.sub(r'([^%]|^)%t', r'\1' + options.title, fheader) fheader = re.sub(r'([^%]|^)%a', r'\1' + options.author, fheader) fheader = re.sub(r'%%a','%a',fheader) fheader = re.sub(r'%%t','%t',fheader) header.append(fheader + " ") book, fonts = Book(options, logger, header=header, **args) le = re.compile(options.link_exclude) if options.link_exclude else \ re.compile('$') pb = re.compile(options.page_break, re.IGNORECASE) if options.page_break else \ re.compile('$') fpb = re.compile(options.force_page_break, re.IGNORECASE) if options.force_page_break else \ re.compile('$') options.cover = cpath options.force_page_break = fpb options.link_exclude = le options.page_break = pb options.chapter_regex = re.compile(options.chapter_regex, re.IGNORECASE) fpba = options.force_page_break_attr.split(',') if len(fpba) != 3: fpba = ['$', '', '$'] options.force_page_break_attr = [re.compile(fpba[0], re.IGNORECASE), fpba[1], re.compile(fpba[2], re.IGNORECASE)] if not hasattr(options, 'anchor_ids'): options.anchor_ids = True files = options.spine if options.use_spine else [path] conv = HTMLConverter(book, fonts, options, logger, files) if options.use_spine: conv.create_toc(options.toc) oname = options.output if not oname: suffix = '.lrs' if options.lrs else '.lrf' name = os.path.splitext(os.path.basename(path))[0] + suffix oname = os.path.join(cwd,name) oname = os.path.abspath(os.path.expanduser(oname)) conv.writeto(oname, lrs=options.lrs) logger.info('Output written to %s', oname) conv.cleanup() return oname finally: os.chdir(cwd)
2e52d6dfe34d581cf37a65a4b03909a18d938c95 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9125/2e52d6dfe34d581cf37a65a4b03909a18d938c95/convert_from.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 768, 12, 803, 16, 702, 16, 1194, 33, 7036, 4672, 309, 283, 18, 1916, 2668, 2505, 2207, 96, 4528, 2207, 2187, 589, 4672, 1002, 16401, 668, 16, 296, 6225, 1240, 358, 1923, 326,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 768, 12, 803, 16, 702, 16, 1194, 33, 7036, 4672, 309, 283, 18, 1916, 2668, 2505, 2207, 96, 4528, 2207, 2187, 589, 4672, 1002, 16401, 668, 16, 296, 6225, 1240, 358, 1923, 326,...
print 'Please install using "sudo apt-get install lighttpd php5cgi"' sys.exit(1)
self.MissingLigHTTPd()
def LigHTTPdPHPPath(self): """Returns the PHP executable path for LigHTTPd""" binpath = "/usr/bin/php-cgi" if os.path.exists(binpath): return binpath print "Unable to find PHP CGI executable %s" % binpath print 'Please install using "sudo apt-get install lighttpd php5cgi"' sys.exit(1)
c35d0206b2ad1b9004d07d25e615ce80c22b72eb /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9392/c35d0206b2ad1b9004d07d25e615ce80c22b72eb/platform_utils_linux.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 511, 360, 3693, 72, 7159, 743, 12, 2890, 4672, 3536, 1356, 326, 2899, 9070, 589, 364, 511, 360, 3693, 72, 8395, 4158, 803, 273, 2206, 13640, 19, 4757, 19, 2684, 17, 19062, 6, 309, 1140...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 511, 360, 3693, 72, 7159, 743, 12, 2890, 4672, 3536, 1356, 326, 2899, 9070, 589, 364, 511, 360, 3693, 72, 8395, 4158, 803, 273, 2206, 13640, 19, 4757, 19, 2684, 17, 19062, 6, 309, 1140...
@unittest.skipIf(ctypes_copy is None, "requires ctypes.copy")
def test_synchronize(self): self.test_sharedctypes(lock=True)
121965aa32c653b72b5d717a79b0d90df597853b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8125/121965aa32c653b72b5d717a79b0d90df597853b/test_multiprocessing.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 87, 2600, 554, 12, 2890, 4672, 365, 18, 3813, 67, 11574, 299, 989, 12, 739, 33, 5510, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 87, 2600, 554, 12, 2890, 4672, 365, 18, 3813, 67, 11574, 299, 989, 12, 739, 33, 5510, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
sage: sr = mq.SR(1,1,1,8)
sage: sr = mq.SR(1, 1, 1, 8)
def inversion_polynomials(self, xi, wi, length): """ Return polynomials to represent the inversion in the AES S-Box.
e506ccc2459e6e3948659b0d1b28d9d6b70342e4 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/e506ccc2459e6e3948659b0d1b28d9d6b70342e4/sr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 316, 1589, 67, 3915, 13602, 87, 12, 2890, 16, 14087, 16, 16138, 16, 769, 4672, 3536, 2000, 16991, 87, 358, 2406, 326, 316, 1589, 316, 326, 15986, 348, 17, 3514, 18, 2, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 316, 1589, 67, 3915, 13602, 87, 12, 2890, 16, 14087, 16, 16138, 16, 769, 4672, 3536, 2000, 16991, 87, 358, 2406, 326, 316, 1589, 316, 326, 15986, 348, 17, 3514, 18, 2, -100, -100, -100...
cty.POINTER(FL_IMAGE), [STRING],
cty.POINTER(FL_IMAGE), [STRING],
def flimage_invalidate_pixels(pImage): """ flimage_invalidate_pixels(pImage) """ _flimage_invalidate_pixels(pImage)
9942dac8ce2b35a1e43615a26fd8e7054ef805d3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2429/9942dac8ce2b35a1e43615a26fd8e7054ef805d3/xformslib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1183, 2730, 67, 5387, 340, 67, 21084, 12, 84, 2040, 4672, 3536, 1183, 2730, 67, 5387, 340, 67, 21084, 12, 84, 2040, 13, 3536, 225, 389, 2242, 2730, 67, 5387, 340, 67, 21084, 12, 84, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1183, 2730, 67, 5387, 340, 67, 21084, 12, 84, 2040, 4672, 3536, 1183, 2730, 67, 5387, 340, 67, 21084, 12, 84, 2040, 13, 3536, 225, 389, 2242, 2730, 67, 5387, 340, 67, 21084, 12, 84, ...
def GetLastMember(id):
def GetLastMember(sid):
def GetLastMember(id): """ Get offset of the last member of a structure @param id: structure type ID @return: -1 if bad structure type ID is passed or structure has no members otherwise returns offset of the last member. @note: IDA allows 'holes' between members of a structure. It treats these 'holes' as unnamed arrays of bytes. """ s = idaapi.get_struc(id) if not s: return -1 return idaapi.get_struc_last_offset(s)
76aa24fecdace41c9fc827e500b95cfdf5053272 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4773/76aa24fecdace41c9fc827e500b95cfdf5053272/idc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 968, 3024, 4419, 12, 7453, 4672, 3536, 968, 1384, 434, 326, 1142, 3140, 434, 279, 3695, 225, 632, 891, 612, 30, 3695, 618, 1599, 225, 632, 2463, 30, 300, 21, 309, 5570, 3695, 618, 1599...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 968, 3024, 4419, 12, 7453, 4672, 3536, 968, 1384, 434, 326, 1142, 3140, 434, 279, 3695, 225, 632, 891, 612, 30, 3695, 618, 1599, 225, 632, 2463, 30, 300, 21, 309, 5570, 3695, 618, 1599...
for item in self.conn.do.search('artist', self.view_artist_artist):
for item in self.browse_search_artist(self.view_artist_artist):
def browse(self, widget=None, root='/'): # Populates the library list with entries starting at root if not self.conn: return
ef335bb5758783289bea4a5b77282ae0c87d687a /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2312/ef335bb5758783289bea4a5b77282ae0c87d687a/sonata.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 21670, 12, 2890, 16, 3604, 33, 7036, 16, 1365, 2218, 2473, 4672, 468, 10264, 17099, 326, 5313, 666, 598, 3222, 5023, 622, 1365, 309, 486, 365, 18, 4646, 30, 327, 2, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 21670, 12, 2890, 16, 3604, 33, 7036, 16, 1365, 2218, 2473, 4672, 468, 10264, 17099, 326, 5313, 666, 598, 3222, 5023, 622, 1365, 309, 486, 365, 18, 4646, 30, 327, 2, -100, -100, -100, -...
pos -- an optional positioning dictionary: for example, the
pos -- a positioning dictionary: for example, the
def __init__(self, data=None, pos=None, **kwds): """ Create a graph object. INPUT: data -- can be any of the following: 1. A NetworkX graph 2. A dictionary of dictionaries 3. A dictionary of lists 4. A numpy matrix or ndarray 5. A pygraphviz agraph 6. A scipy sparse matrix
2ebd36bafafb67bf005da138a71b9ce99d893add /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9890/2ebd36bafafb67bf005da138a71b9ce99d893add/graph.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 501, 33, 7036, 16, 949, 33, 7036, 16, 2826, 25577, 4672, 3536, 1788, 279, 2667, 733, 18, 225, 12943, 30, 501, 1493, 848, 506, 1281, 434, 326, 3751, 30, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 501, 33, 7036, 16, 949, 33, 7036, 16, 2826, 25577, 4672, 3536, 1788, 279, 2667, 733, 18, 225, 12943, 30, 501, 1493, 848, 506, 1281, 434, 326, 3751, 30, ...
- fail reason (as from utils.RunResult)
- fail reason (as from L{utils.RunResult})
def Run(self, name, idata): """Run an iallocator script.
10c2650b20cea3203db19baa02cca416127a3cea /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7542/10c2650b20cea3203db19baa02cca416127a3cea/backend.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1939, 12, 2890, 16, 508, 16, 612, 396, 4672, 3536, 1997, 392, 277, 9853, 639, 2728, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1939, 12, 2890, 16, 508, 16, 612, 396, 4672, 3536, 1997, 392, 277, 9853, 639, 2728, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
filename=self.filename())
filename=self.notebook.filename())
def save_selection_as(self, *args): dialog = SaveSelectionFileDialog(app.list_extensions(), parent=self, filename=self.filename()) filename = dialog.get_filename() if filename != None: self.notebook.save_selection_as(filename)
1b6993641d609e0b9fc873cf0fd3c60dfb934cbc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11419/1b6993641d609e0b9fc873cf0fd3c60dfb934cbc/gtkui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1923, 67, 10705, 67, 345, 12, 2890, 16, 380, 1968, 4672, 6176, 273, 7074, 6233, 812, 6353, 12, 2910, 18, 1098, 67, 9489, 9334, 982, 33, 2890, 16, 1544, 33, 2890, 18, 24422, 18, 3459, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1923, 67, 10705, 67, 345, 12, 2890, 16, 380, 1968, 4672, 6176, 273, 7074, 6233, 812, 6353, 12, 2910, 18, 1098, 67, 9489, 9334, 982, 33, 2890, 16, 1544, 33, 2890, 18, 24422, 18, 3459, ...
metric_test = np.dtype([('cost', 'f'), ('align_cost', 'f'), ('rotate', 'f', 6), ('align_rotate', 'f', 6)]) fMRIdata = funclist
fMRIdata = read_fMRI_directory('fMRIData\*.img')
def demo_MRI_coregistration(anatfile, funclist, optimizer_method='powell', histo_method=1, smooth_histo=0, smooth_image=0, ftype=1): """ demo with (must have file ANAT1_V0001.img and fMRI directory fMRIData) measures, imageF_anat, fmri_series = reg.demo_MRI_coregistration() show results with In [59]: measures[25]['cost'] Out[59]: -0.48607185 In [60]: measures[25]['align_cost'] Out[60]: -0.99514639 In [61]: measures[25]['align_rotate'] Out[61]: array([ 1.94480181, 5.64703989, 5.35002136, -5.00544405, -2.2712214, -1.42249691], dtype=float32) In [62]: measures[25]['rotate'] Out[62]: array([ 1.36566341, 4.70644331, 4.68198586, -4.32256889, -2.47607017, -2.39173937], dtype=float32) """ # demo of alignment of fMRI series with anatomical MRI # in this demo, each fMRI volume is first perturbed (rotated, translated) # by a random value. The initial registration is measured, then the optimal # alignment is computed and the registration measure made following the volume remap. # The fMRI registration is done with the first fMRI volume using normalized cross-correlation. # Each fMRI volume is rotated to the fMRI-0 volume and the series is ensemble averaged. # The ensemble averaged is then registered with the anatomical MRI volume using normalized mutual information. # The fMRI series is then rotated with this parameter. The alignments are done with 3D cubic splines. # read the anatomical MRI volume anat_desc = load_anatMRI_desc() imageF_anat = load_volume(anat_desc, imagename=anatfile) # the sampling structure imdata = build_structs() # the volume filter imageF_anat['fwhm'] = build_fwhm(imageF_anat['mat'], imdata['step']) # read in the file list of the fMRI data metric_test = np.dtype([('cost', 'f'), ('align_cost', 'f'), ('rotate', 'f', 6), ('align_rotate', 'f', 6)]) #fMRIdata = read_fMRI_directory('fMRIData\*.img') #fMRIdata = read_fMRI_directory(funcdir + '/*.img') fMRIdata = funclist fmri_desc = load_fMRI_desc() fmri_series = {} ave_fMRI_volume = np.zeros(fmri_desc['layers']*fmri_desc['rows']*fmri_desc['cols'], dtype=np.float64).reshape(fmri_desc['layers'], fmri_desc['rows'], fmri_desc['cols']) count = 0 number_volumes = len(fMRIdata) measures = np.zeros(number_volumes, dtype=metric_test) # load and perturb (rotation, translation) the fMRI volumes for i in fMRIdata: image = load_volume(fmri_desc, i) # random perturbation of angle, translation for each volume beyond the first if count == 0: image['fwhm'] = build_fwhm(image['mat'], imdata['step']) fmri_series[count] = image count = count + 1 else: x = np.random.random(6) - 0.5 x = 10.0 * x fmri_series[count] = demo_rotate_fMRI_volume(image, x) measures[count]['rotate'][0:6] = x[0:6] count = count + 1 # load and register the fMRI volumes with volume_0 using normalized cross correlation metric imageF = fmri_series[0] if smooth_image: image_F_xyz = filter_image_3D(imageF['data'], imageF['fwhm'], ftype) imageF['data'] = image_F_xyz for i in range(1, number_volumes): imageG = fmri_series[i] # the measure prior to alignment measures[i]['cost'] = check_alignment(imageF, imageG, imdata, method='ncc', lite=histo_method, smhist=smooth_histo) x = python_coreg(imageF, imageG, imdata, lite=histo_method, method='ncc', opt_method=optimizer_method, smhist=smooth_histo, smimage=smooth_image) measures[i]['align_rotate'][0:6] = x[0:6] measures[i]['align_cost'] = check_alignment(imageF, imageG, imdata, method='ncc', lite=histo_method, smhist=smooth_histo, alpha=x[0], beta=x[1], gamma=x[2], Tx=x[3], Ty=x[4], Tz=x[5]) # align the volumes and average them for co-registration with the anatomical MRI ave_fMRI_volume = fmri_series[0]['data'].astype(np.float64) for i in range(1, number_volumes): image = fmri_series[i] x[0:6] = measures[i]['align_rotate'][0:6] # overwrite the fMRI volume with the aligned volume fmri_series[i] = remap_image(image, x, resample='cubic') ave_fMRI_volume = ave_fMRI_volume + fmri_series[i]['data'].astype(np.float64) ave_fMRI_volume = (ave_fMRI_volume / float(number_volumes)).astype(np.uint8) ave_fMRI_volume = {'data' : ave_fMRI_volume, 'mat' : imageF['mat'], 'dim' : imageF['dim'], 'fwhm' : imageF['fwhm']} # register (using normalized mutual information) with the anatomical MRI if smooth_image: image_F_anat_xyz = filter_image_3D(imageF_anat['data'], imageF_anat['fwhm'], ftype) imageF_anat['data'] = image_F_anat_xyz x = python_coreg(imageF_anat, ave_fMRI_volume, imdata, lite=histo_method, method='nmi', opt_method=optimizer_method, smhist=smooth_histo, smimage=smooth_image) print 'functional-anatomical align parameters ' print x for i in range(number_volumes): image = fmri_series[i] # overwrite the fMRI volume with the anatomical-aligned volume fmri_series[i] = remap_image(image, x, resample='cubic') return measures, imageF_anat, fmri_series
a0a06507bdbd3322039b726463a7cc1c63e59774 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12971/a0a06507bdbd3322039b726463a7cc1c63e59774/_registration.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 21477, 67, 49, 2259, 67, 3644, 75, 4218, 12, 304, 270, 768, 16, 1326, 1098, 16, 13066, 67, 2039, 2218, 23509, 1165, 2187, 5356, 83, 67, 2039, 33, 21, 16, 11957, 67, 11488, 83, 33, 20...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 21477, 67, 49, 2259, 67, 3644, 75, 4218, 12, 304, 270, 768, 16, 1326, 1098, 16, 13066, 67, 2039, 2218, 23509, 1165, 2187, 5356, 83, 67, 2039, 33, 21, 16, 11957, 67, 11488, 83, 33, 20...
if not host: return addinfo(open(file, 'r'), noheaders())
if not host: return addinfo(open(_fixpath(file), 'r'), noheaders())
def open_local_file(self, url): host, file = splithost(url) if not host: return addinfo(open(file, 'r'), noheaders()) host, port = splitport(host) if not port and socket.gethostbyname(host) in ( localhost(), thishost()): file = unquote(file) return addinfo(open(file, 'r'), noheaders()) raise IOError, ('local file error', 'not on local host')
dc3e3f69db6a6aa5aed1d604d53c0b4cf156add8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/dc3e3f69db6a6aa5aed1d604d53c0b4cf156add8/urllib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1696, 67, 3729, 67, 768, 12, 2890, 16, 880, 4672, 1479, 16, 585, 273, 6121, 483, 669, 12, 718, 13, 309, 486, 1479, 30, 327, 527, 1376, 12, 3190, 24899, 904, 803, 12, 768, 3631, 296, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1696, 67, 3729, 67, 768, 12, 2890, 16, 880, 4672, 1479, 16, 585, 273, 6121, 483, 669, 12, 718, 13, 309, 486, 1479, 30, 327, 527, 1376, 12, 3190, 24899, 904, 803, 12, 768, 3631, 296, ...
raise OSError(0, "couldn't make directories", path)
raise OSError(0, "couldn't make directories", path)
def makedirs(path, mode='ignored'): if not File(path).mkdirs(): raise OSError(0, "couldn't make directories", path)
5983a691b16eecde718073ce68a1624ff2a162aa /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6753/5983a691b16eecde718073ce68a1624ff2a162aa/javaos.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12151, 12, 803, 16, 1965, 2218, 24055, 11, 4672, 309, 486, 1387, 12, 803, 2934, 24816, 8291, 13332, 1002, 10002, 12, 20, 16, 315, 15195, 82, 1404, 1221, 6402, 3113, 589, 13, 225, 2, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12151, 12, 803, 16, 1965, 2218, 24055, 11, 4672, 309, 486, 1387, 12, 803, 2934, 24816, 8291, 13332, 1002, 10002, 12, 20, 16, 315, 15195, 82, 1404, 1221, 6402, 3113, 589, 13, 225, 2, -1...
if ckan.last_status == 200:
if ckan.last_status == None: if ckan.last_url_error: print "Network error: %s" % ckan.last_url_error.reason[1] elif ckan.last_status == 200:
def print_status(ckan): if ckan.last_status == 200: pass #print "Datapkg operation was a success." elif ckan.last_status == 403: print "Operation not authorised." elif ckan.last_status == 404: print "Package not found." elif ckan.last_status == 409: print "Package already registered." else: print "Datapkg operation failed (code: %s)." % ckan.last_status
a0e616e50d997843b6c957d7de65d788ecf8a28c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12519/a0e616e50d997843b6c957d7de65d788ecf8a28c/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1172, 67, 2327, 12, 363, 304, 4672, 309, 12622, 304, 18, 2722, 67, 2327, 422, 599, 30, 309, 12622, 304, 18, 2722, 67, 718, 67, 1636, 30, 1172, 315, 3906, 555, 30, 738, 87, 6, 738, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1172, 67, 2327, 12, 363, 304, 4672, 309, 12622, 304, 18, 2722, 67, 2327, 422, 599, 30, 309, 12622, 304, 18, 2722, 67, 718, 67, 1636, 30, 1172, 315, 3906, 555, 30, 738, 87, 6, 738, ...
def _fix_link_args (self, objects, output_dir, takes_libs=0, libraries=None, library_dirs=None): """Typecheck and fix up some of the arguments supplied to the 'link_*' methods and return the fixed values. Specifically: ensure that 'objects' is a list; if output_dir is None, use self.output_dir; ensure that 'libraries' and 'library_dirs' are both lists, and augment them with 'self.libraries' and 'self.library_dirs'. If 'takes_libs' is true, return a tuple (objects, output_dir, libraries, library_dirs; else return (objects, output_dir)."""
def _fix_object_args (self, objects, output_dir): """Typecheck and fix up some arguments supplied to various methods. Specifically: ensure that 'objects' is a list; if output_dir is None, replace with self.output_dir. Return fixed versions of 'objects' and 'output_dir'."""
def _fix_link_args (self, objects, output_dir, takes_libs=0, libraries=None, library_dirs=None): """Typecheck and fix up some of the arguments supplied to the 'link_*' methods and return the fixed values. Specifically: ensure that 'objects' is a list; if output_dir is None, use self.output_dir; ensure that 'libraries' and 'library_dirs' are both lists, and augment them with 'self.libraries' and 'self.library_dirs'. If 'takes_libs' is true, return a tuple (objects, output_dir, libraries, library_dirs; else return (objects, output_dir)."""
95814602b55f2db3c2f66568a412da3709fb4635 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/95814602b55f2db3c2f66568a412da3709fb4635/ccompiler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 904, 67, 1232, 67, 1968, 261, 2890, 16, 2184, 16, 876, 67, 1214, 16, 5530, 67, 21571, 33, 20, 16, 14732, 33, 7036, 16, 5313, 67, 8291, 33, 7036, 4672, 3536, 559, 1893, 471, 2917...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 904, 67, 1232, 67, 1968, 261, 2890, 16, 2184, 16, 876, 67, 1214, 16, 5530, 67, 21571, 33, 20, 16, 14732, 33, 7036, 16, 5313, 67, 8291, 33, 7036, 4672, 3536, 559, 1893, 471, 2917...
if fLoop:
if fLoop and self.duration:
def play(self, deltaT, fLoop): if self.frameActiveVar.get(): # Compute new time self.currT = self.currT + deltaT if fLoop: # If its looping compute modulo loopT = self.currT % self.duration self.goToT(loopT) else: if (self.currT > self.maxSeconds): # Clear this actor control from play list self['animPanel'].playList.remove(self) else: self.goToT(self.currT) else: # Clear this actor control from play list self['animPanel'].playList.remove(self)
39b6b560f7ca1732839a0d6a5a2cf334a930012d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7242/39b6b560f7ca1732839a0d6a5a2cf334a930012d/AnimPanel.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6599, 12, 2890, 16, 3622, 56, 16, 284, 6452, 4672, 309, 365, 18, 3789, 3896, 1537, 18, 588, 13332, 468, 8155, 394, 813, 365, 18, 17016, 56, 273, 365, 18, 17016, 56, 397, 3622, 56, 30...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6599, 12, 2890, 16, 3622, 56, 16, 284, 6452, 4672, 309, 365, 18, 3789, 3896, 1537, 18, 588, 13332, 468, 8155, 394, 813, 365, 18, 17016, 56, 273, 365, 18, 17016, 56, 397, 3622, 56, 30...
__p4_attrs = ('subdirs',) __p3_attrs = ('same_files', 'diff_files', 'funny_files') __p2_attrs = ('common_dirs', 'common_files', 'common_funny') __p1_attrs = ('common', 'left_only', 'right_only') __p0_attrs = ('left_list', 'right_list') def __getattr__(self, attr): if attr in self.__p4_attrs: self.phase4() elif attr in self.__p3_attrs: self.phase3() elif attr in self.__p2_attrs: self.phase2() elif attr in self.__p1_attrs: self.phase1() elif attr in self.__p0_attrs: self.phase0() else: raise AttributeError, attr return getattr(self, attr)
def phase0(self): # Compare everything except common subdirectories self.left_list = _filter(os.listdir(self.left), self.hide+self.ignore) self.right_list = _filter(os.listdir(self.right), self.hide+self.ignore) self.left_list.sort() self.right_list.sort()
cfba4dfc10b1cdf017562bcca7d0a344649d031f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/cfba4dfc10b1cdf017562bcca7d0a344649d031f/filecmp.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6855, 20, 12, 2890, 4672, 468, 11051, 7756, 1335, 2975, 31220, 365, 18, 4482, 67, 1098, 273, 389, 2188, 12, 538, 18, 1098, 1214, 12, 2890, 18, 4482, 3631, 365, 18, 11248, 15, 2890, 18,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6855, 20, 12, 2890, 4672, 468, 11051, 7756, 1335, 2975, 31220, 365, 18, 4482, 67, 1098, 273, 389, 2188, 12, 538, 18, 1098, 1214, 12, 2890, 18, 4482, 3631, 365, 18, 11248, 15, 2890, 18,...
self.display.vprint_err(VERB_STD, \
display.vprint_err(VERB_STD, \
def ttyloop(task, nodeset, timeout, display): """Manage the interactive prompt to run command""" readline_avail = False if task.default("USER_interactive"): assert sys.stdin.isatty() try: import readline readline_setup() readline_avail = True except ImportError: pass self.display.vprint(VERB_STD, \ "Enter 'quit' to leave this interactive mode") rc = 0 ns = NodeSet(nodeset) ns_info = True cmd = "" while task.default("USER_running") or cmd.lower() != 'quit': try: if task.default("USER_interactive") and \ not task.default("USER_running"): if ns_info: self.display.vprint(VERB_QUIET, \ "Working with nodes: %s" % ns) ns_info = False prompt = "clush> " else: prompt = "" # Set SIGUSR1 handler if needed if task.default("USER_handle_SIGUSR1"): signal.signal(signal.SIGUSR1, signal_handler) try: cmd = raw_input(prompt) finally: signal.signal(signal.SIGUSR1, signal.SIG_IGN) except EOFError: print return except UpdatePromptException: if task.default("USER_interactive"): continue return except KeyboardInterrupt, kbe: if display.gather: # Suspend task, so we can safely access its data from # the main thread task.suspend() print_warn = False # Display command output, but cannot order buffers by rc nodesetify = lambda v: (v[0], NodeSet.fromlist(v[1])) for buf, nodeset in sorted(map(nodesetify, task.iter_buffers()), cmp=bufnodeset_cmp): if not print_warn: print_warn = True self.display.vprint_err(VERB_STD, \ "Warning: Caught keyboard interrupt!") display.print_gather(nodeset, buf) # Return code handling ns_ok = NodeSet() for rc, nodelist in task.iter_retcodes(): ns_ok.add(NodeSet.fromlist(nodelist)) if rc != 0: # Display return code if not ok ( != 0) ns = NodeSet.fromlist(nodelist) self.display.vprint_err(VERB_QUIET, \ "clush: %s: exited with exit code %s" % (ns, rc)) # Add uncompleted nodeset to exception object kbe.uncompleted_nodes = ns - ns_ok # Display nodes that didn't answer within command timeout delay if task.num_timeout() > 0: self.display.vprint_err(VERB_QUIET, \ "clush: %s: command timeout" % \ NodeSet.fromlist(task.iter_keys_timeout())) raise kbe if task.default("USER_running"): ns_reg, ns_unreg = NodeSet(), NodeSet() for c in task._engine.clients(): if c.registered: ns_reg.add(c.key) else: ns_unreg.add(c.key) if ns_unreg: pending = "\nclush: pending(%d): %s" % (len(ns_unreg), ns_unreg) else: pending = "" self.display.vprint_err(VERB_QUIET, "clush: interrupt (^C to " \ "abort task)\nclush: in progress(%d): %s%s" % (len(ns_reg), \ ns_reg, pending)) else: cmdl = cmd.lower() try: ns_info = True if cmdl.startswith('+'): ns.update(cmdl[1:]) elif cmdl.startswith('-'): ns.difference_update(cmdl[1:]) elif cmdl.startswith('@'): ns = NodeSet(cmdl[1:]) elif cmdl == '=': display.gather = not display.gather if display.gather: self.display.vprint(VERB_STD, \ "Switching to gathered output format") else: self.display.vprint(VERB_STD, \ "Switching to standard output format") ns_info = False continue elif not cmdl.startswith('?'): # if ?, just print ns_info ns_info = False except NodeSetParseError: self.display.vprint_err(VERB_QUIET, \ "clush: nodeset parse error (ignoring)") if ns_info: continue if cmdl.startswith('!') and len(cmd.strip()) > 0: run_command(task, cmd[1:], None, timeout, display) elif cmdl != "quit": if not cmd: continue if readline_avail: readline.write_history_file(get_history_file()) run_command(task, cmd, ns, timeout, display) return rc
40e717199e01e0d30a142905d4bb8e333c468cd4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11479/40e717199e01e0d30a142905d4bb8e333c468cd4/Clush.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 21520, 6498, 12, 4146, 16, 2199, 278, 16, 2021, 16, 2562, 4672, 3536, 21258, 326, 12625, 6866, 358, 1086, 1296, 8395, 12023, 67, 842, 671, 273, 1083, 309, 1562, 18, 1886, 2932, 4714, 67,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 21520, 6498, 12, 4146, 16, 2199, 278, 16, 2021, 16, 2562, 4672, 3536, 21258, 326, 12625, 6866, 358, 1086, 1296, 8395, 12023, 67, 842, 671, 273, 1083, 309, 1562, 18, 1886, 2932, 4714, 67,...
print "barrier: master=" + self.hostid
self.report("selected as master")
def master(self): print "barrier: master=" + self.hostid
bb655f3af134dd0fb185950c28aa4391201eb99d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12268/bb655f3af134dd0fb185950c28aa4391201eb99d/barrier.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4171, 12, 2890, 4672, 1172, 315, 3215, 10342, 30, 4171, 1546, 397, 365, 18, 2564, 350, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4171, 12, 2890, 4672, 1172, 315, 3215, 10342, 30, 4171, 1546, 397, 365, 18, 2564, 350, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
discretizer = orange.EntropyDiscretization() catData = orange.Preprocessor_discretize(data, method=discretizer)
def showNomogram(self): if self.bnomogram and self.cl: self.bnomogram.show()
3728a5e00ef71de0fb670958fd3cd4caf7f4696a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6366/3728a5e00ef71de0fb670958fd3cd4caf7f4696a/OWNomogram.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 26685, 5553, 12, 2890, 4672, 309, 365, 18, 70, 12306, 5553, 471, 365, 18, 830, 30, 365, 18, 70, 12306, 5553, 18, 4500, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 26685, 5553, 12, 2890, 4672, 309, 365, 18, 70, 12306, 5553, 471, 365, 18, 830, 30, 365, 18, 70, 12306, 5553, 18, 4500, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -1...
llf1 = self.res1.model.family.loglike(self.res1.model.endog, self.res1.mu, scale=1)
llf1 = self.res1.model.family.loglike(self.res1.model.endog, self.res1.mu, scale=1)
def check_loglike(self, llf1, llf2): llf1 = self.res1.model.family.loglike(self.res1.model.endog, self.res1.mu, scale=1) # Stata assumes scale = 1 in calc, # which shouldn't be right... assert_almost_equal(llf1, llf2, DECIMAL_less)
74679194056e9f17f68527ec6d607fc36e1318b1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12658/74679194056e9f17f68527ec6d607fc36e1318b1/test_glm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 1330, 5625, 12, 2890, 16, 6579, 74, 21, 16, 6579, 74, 22, 4672, 6579, 74, 21, 273, 365, 18, 455, 21, 18, 2284, 18, 9309, 18, 1330, 5625, 12, 2890, 18, 455, 21, 18, 2284, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 1330, 5625, 12, 2890, 16, 6579, 74, 21, 16, 6579, 74, 22, 4672, 6579, 74, 21, 273, 365, 18, 455, 21, 18, 2284, 18, 9309, 18, 1330, 5625, 12, 2890, 18, 455, 21, 18, 2284, ...
action_map = {
action_map = {
def get_last_modified(self): if not self.isfile: return None
de6186dad1c3af656c3b6eea168c80e2eba66f0a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/14465/de6186dad1c3af656c3b6eea168c80e2eba66f0a/git_fs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 2722, 67, 7342, 12, 2890, 4672, 309, 486, 365, 18, 291, 768, 30, 327, 599, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 2722, 67, 7342, 12, 2890, 4672, 309, 486, 365, 18, 291, 768, 30, 327, 599, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
self.announce('-'*75, r.read(), '-'*75)
msg = ''.join('-' * 75, r.read(), '-' * 75) self.announce(msg, log.INFO)
def upload_file(self, command, pyversion, filename): # Sign if requested if self.sign: gpg_args = ["gpg", "--detach-sign", "-a", filename] if self.identity: gpg_args[2:2] = ["--local-user", self.identity] spawn(gpg_args, dry_run=self.dry_run)
f58beffc2c29368d3d8ff9eb5c8f15558be1b63e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3187/f58beffc2c29368d3d8ff9eb5c8f15558be1b63e/upload.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3617, 67, 768, 12, 2890, 16, 1296, 16, 2395, 1589, 16, 1544, 4672, 468, 4383, 309, 3764, 309, 365, 18, 2977, 30, 22544, 67, 1968, 273, 8247, 6403, 75, 3113, 5238, 8238, 497, 17, 2977, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3617, 67, 768, 12, 2890, 16, 1296, 16, 2395, 1589, 16, 1544, 4672, 468, 4383, 309, 3764, 309, 365, 18, 2977, 30, 22544, 67, 1968, 273, 8247, 6403, 75, 3113, 5238, 8238, 497, 17, 2977, ...
raise TypeError('%r is not a code object' % co)
raise TypeError('{!r} is not a code object'.format(co))
def getargs(co): """Get information about the arguments accepted by a code object. Three things are returned: (args, varargs, varkw), where 'args' is a list of argument names (possibly containing nested lists), and 'varargs' and 'varkw' are the names of the * and ** arguments or None.""" if not iscode(co): raise TypeError('%r is not a code object' % co) nargs = co.co_argcount names = co.co_varnames args = list(names[:nargs]) step = 0 # The following acrobatics are for anonymous (tuple) arguments. for i in range(nargs): if args[i][:1] in ('', '.'): stack, remain, count = [], [], [] while step < len(co.co_code): op = ord(co.co_code[step]) step = step + 1 if op >= dis.HAVE_ARGUMENT: opname = dis.opname[op] value = ord(co.co_code[step]) + ord(co.co_code[step+1])*256 step = step + 2 if opname in ('UNPACK_TUPLE', 'UNPACK_SEQUENCE'): remain.append(value) count.append(value) elif opname == 'STORE_FAST': stack.append(names[value]) # Special case for sublists of length 1: def foo((bar)) # doesn't generate the UNPACK_TUPLE bytecode, so if # `remain` is empty here, we have such a sublist. if not remain: stack[0] = [stack[0]] break else: remain[-1] = remain[-1] - 1 while remain[-1] == 0: remain.pop() size = count.pop() stack[-size:] = [stack[-size:]] if not remain: break remain[-1] = remain[-1] - 1 if not remain: break args[i] = stack[0] varargs = None if co.co_flags & CO_VARARGS: varargs = co.co_varnames[nargs] nargs = nargs + 1 varkw = None if co.co_flags & CO_VARKEYWORDS: varkw = co.co_varnames[nargs] return Arguments(args, varargs, varkw)
4b941017d7d1f338edaaca77d3e613717ece0b68 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3187/4b941017d7d1f338edaaca77d3e613717ece0b68/inspect.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 1968, 12, 2894, 4672, 3536, 967, 1779, 2973, 326, 1775, 8494, 635, 279, 981, 733, 18, 225, 935, 992, 9198, 854, 2106, 30, 261, 1968, 16, 19732, 16, 569, 9987, 3631, 1625, 296, 196...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 1968, 12, 2894, 4672, 3536, 967, 1779, 2973, 326, 1775, 8494, 635, 279, 981, 733, 18, 225, 935, 992, 9198, 854, 2106, 30, 261, 1968, 16, 19732, 16, 569, 9987, 3631, 1625, 296, 196...
print msg
pass
def warning(self, msg): print msg
eaccdc6554d90d6a29a3674d444710a7c0933f41 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12659/eaccdc6554d90d6a29a3674d444710a7c0933f41/libxml.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3436, 12, 2890, 16, 1234, 4672, 1172, 1234, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3436, 12, 2890, 16, 1234, 4672, 1172, 1234, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
reporters = get_bugzilla_reporters(milestone)
reporters = {} for milestone in milestones: reporters.update(get_bugzilla_reporters(milestone))
def main(argv): if not(argv): print USAGE print HELP return 0 if len(argv) < 3: print USAGE return 0 logging.basicConfig(level=logging.INFO) prevrev = argv[0] rev = argv[1] milestone = argv[2] git_authors = get_git_authors(prevrev, rev) reporters = get_bugzilla_reporters(milestone) addtl = get_additional_contributors("additional.txt") print_stats("git", git_authors) print_stats("bugzilla", reporters) print_stats("additional", addtl) everyone = addtl everyone.update(reporters) everyone.update(git_authors) everyone = everyone.keys() everyone.sort(key=lambda k: name_to_key(*k).lower()) # FIXME should do a pass of uniquifying the list here output_file = open("for_credits", "w") for mem in everyone: output_file.write("* %s\n" % mem[0].encode("utf-8")) output_file.close() output_file = open("for_osx_credits_html", "w") for mem in everyone[:-1]: mem = html_escape(mem[0].encode("utf-8")) output_file.write("%s,\n" % mem) output_file.write("and %s.\n" % html_escape(everyone[-1][0].encode("utf-8"))) output_file.close() return 0
bd9527790c909915fbba58ccc627859c7cce0601 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12354/bd9527790c909915fbba58ccc627859c7cce0601/contributors.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 19485, 4672, 309, 486, 12, 19485, 4672, 1172, 11836, 2833, 1172, 22557, 52, 327, 374, 225, 309, 562, 12, 19485, 13, 411, 890, 30, 1172, 11836, 2833, 327, 374, 225, 2907, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 19485, 4672, 309, 486, 12, 19485, 4672, 1172, 11836, 2833, 1172, 22557, 52, 327, 374, 225, 309, 562, 12, 19485, 13, 411, 890, 30, 1172, 11836, 2833, 327, 374, 225, 2907, 18, ...
cmd = "%s -ncpu %i -nice %i -noexec < %s > %s"
cmd = "%s -ncpu %i -nice %i -noexec -e %s > %s"
def runHex( self, finp, log=0, ncpu=2, nice=0, host=os.uname()[1] ): """ @param finp: hex macro file @type finp: str @param log: write log file @type log: 1|0 @param ncpu: number of cpus to use @type ncpu: int @param nice: nice value for HEX job (default: 0) @type nice: int @param host: host to run jon on @type host: str """ flog = finp + '.log'
5e498888065d55c61a1a660b68d25a236e1adbdd /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/482/5e498888065d55c61a1a660b68d25a236e1adbdd/Docker.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 7037, 12, 365, 16, 574, 84, 16, 613, 33, 20, 16, 290, 11447, 33, 22, 16, 13752, 33, 20, 16, 1479, 33, 538, 18, 318, 339, 1435, 63, 21, 65, 262, 30, 3536, 632, 891, 574, 84,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 7037, 12, 365, 16, 574, 84, 16, 613, 33, 20, 16, 290, 11447, 33, 22, 16, 13752, 33, 20, 16, 1479, 33, 538, 18, 318, 339, 1435, 63, 21, 65, 262, 30, 3536, 632, 891, 574, 84,...
- w differential (if one of P,Q is Weierstrass, w must be odd)
- w differential (if one of P,Q is Weierstrass, w must be odd)
def coleman_integral(self, w, P, Q, algorithm = 'None'): """ INPUT: - w differential (if one of P,Q is Weierstrass, w must be odd) - P point on self - Q point on self - algorithm (optional) = None (uses Frobenius) or teichmuller (uses Teichmuller points)
39cb56bda09ea4299209526570c2970b0274b09f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/39cb56bda09ea4299209526570c2970b0274b09f/hyperelliptic_padic_field.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 276, 790, 4728, 67, 14970, 23811, 12, 2890, 16, 341, 16, 453, 16, 2238, 16, 4886, 273, 296, 7036, 11, 4672, 3536, 12943, 30, 300, 341, 15221, 2001, 261, 430, 1245, 434, 453, 16, 53, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 276, 790, 4728, 67, 14970, 23811, 12, 2890, 16, 341, 16, 453, 16, 2238, 16, 4886, 273, 296, 7036, 11, 4672, 3536, 12943, 30, 300, 341, 15221, 2001, 261, 430, 1245, 434, 453, 16, 53, ...
return "jdbc:%s://%s/%s" % (self.jdbc_db_name, url.host, url.database)
return 'jdbc:%s://%s%s/%s' % (self.jdbc_db_name, url.host, url.port is not None and ':%s' % url.port or '', url.database)
def _create_jdbc_url(self, url): """Create a JDBC url from a :class:`~sqlalchemy.engine.url.URL`""" return "jdbc:%s://%s/%s" % (self.jdbc_db_name, url.host, url.database)
7e0614fc7a3c9be0c00cbd1a8fcf9c979174c01c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1074/7e0614fc7a3c9be0c00cbd1a8fcf9c979174c01c/zxJDBC.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2640, 67, 24687, 67, 718, 12, 2890, 16, 880, 4672, 3536, 1684, 279, 16364, 880, 628, 279, 294, 1106, 28288, 98, 4669, 24182, 18, 8944, 18, 718, 18, 1785, 68, 8395, 327, 296, 24687...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2640, 67, 24687, 67, 718, 12, 2890, 16, 880, 4672, 3536, 1684, 279, 16364, 880, 628, 279, 294, 1106, 28288, 98, 4669, 24182, 18, 8944, 18, 718, 18, 1785, 68, 8395, 327, 296, 24687...
def _set_segment(self, cr, uid, data, context): address = data['form']['address_id']
report_list_fields = { 'report': {'string': 'Select Report', 'type': 'selection', 'selection': _get_reports, }, 'address_id': {'string': 'Select Customer Address', 'type': 'many2one', 'relation': 'res.partner.address', 'domain': [('partner_id.category_id', '=', 'DTP Preview Customers')] }, 'segment_id': {'string': 'Select Segment', 'type': 'selection', 'selection': get_campaings,} }
def _set_segment(self, cr, uid, data, context): address = data['form']['address_id']
b69e0ff6222fffdf5d7938c8aefd8c12c4ce59bc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7339/b69e0ff6222fffdf5d7938c8aefd8c12c4ce59bc/dm_document_report.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 542, 67, 9273, 12, 2890, 16, 4422, 16, 4555, 16, 501, 16, 819, 4672, 1758, 273, 501, 3292, 687, 21712, 2867, 67, 350, 3546, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 542, 67, 9273, 12, 2890, 16, 4422, 16, 4555, 16, 501, 16, 819, 4672, 1758, 273, 501, 3292, 687, 21712, 2867, 67, 350, 3546, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100...
(model, paths) = treeview.get_selection().get_selected_rows()
(model, paths) = self.get_selection().get_selected_rows()
def __get_selected_row_metadata(self, treeview): metadata = [] (model, paths) = treeview.get_selection().get_selected_rows() for path in paths: row = model.get_model().get_metadata(model.convert_path_to_child_path(path)) metadata.append(row) return metadata
c53ab5980eab6bc66121ddbad3807ad1581e7164 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2271/c53ab5980eab6bc66121ddbad3807ad1581e7164/MTPnavigatorGui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 588, 67, 8109, 67, 492, 67, 4165, 12, 2890, 16, 2151, 1945, 4672, 1982, 273, 5378, 261, 2284, 16, 2953, 13, 273, 365, 18, 588, 67, 10705, 7675, 588, 67, 8109, 67, 3870, 1435, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 588, 67, 8109, 67, 492, 67, 4165, 12, 2890, 16, 2151, 1945, 4672, 1982, 273, 5378, 261, 2284, 16, 2953, 13, 273, 365, 18, 588, 67, 10705, 7675, 588, 67, 8109, 67, 3870, 1435, 3...
check_call('/etc/init.d/haldaemon restart', shell=True)
try: check_call('/etc/init.d/haldaemon restart', shell=True) except: check_call('/etc/rc.d/rc.hald restart', shell=True)
def setup_udev_rules(): print 'Trying to setup udev rules...' sys.stdout.flush() groups = open('/etc/group', 'rb').read() group = 'plugdev' if 'plugdev' in groups else 'usb' udev = open('/etc/udev/rules.d/95-libprs500.rules', 'w') udev.write('''# Sony Reader PRS-500\n''' '''BUS=="usb", SYSFS{idProduct}=="029b", SYSFS{idVendor}=="054c", MODE="660", GROUP="%s"\n'''%(group,) ) udev.close() fdi = open('/usr/share/hal/fdi/policy/20thirdparty/10-libprs500.fdi', 'w') fdi.write('<?xml version="1.0" encoding="UTF-8"?>\n\n<deviceinfo version="0.2">\n') for cls in DEVICES: fdi.write(\
6f7a0c8bb7803aa97029d8e7675144c7ce35f385 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9125/6f7a0c8bb7803aa97029d8e7675144c7ce35f385/linux.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 67, 1317, 90, 67, 7482, 13332, 1172, 296, 18038, 358, 3875, 582, 5206, 2931, 7821, 2589, 18, 10283, 18, 11330, 1435, 3252, 273, 1696, 2668, 19, 14175, 19, 1655, 2187, 296, 6731, 16...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 67, 1317, 90, 67, 7482, 13332, 1172, 296, 18038, 358, 3875, 582, 5206, 2931, 7821, 2589, 18, 10283, 18, 11330, 1435, 3252, 273, 1696, 2668, 19, 14175, 19, 1655, 2187, 296, 6731, 16...
print "* Unexpected error with %s: %s" % (self, sys.exc_info()[0])
print "* Unexpected error with %s: %s" % (self, sys.exc_info())
def TimedRequest(self, type_string, record_string, timeout=None, timer=DEFAULT_TIMER): """Make a DNS request, returning the reply and duration it took.
9b0880f2582bf143089edac5117900518bec78b2 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4170/9b0880f2582bf143089edac5117900518bec78b2/nameserver.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 23925, 691, 12, 2890, 16, 618, 67, 1080, 16, 1409, 67, 1080, 16, 2021, 33, 7036, 16, 5441, 33, 5280, 67, 56, 31582, 4672, 3536, 6464, 279, 8858, 590, 16, 5785, 326, 4332, 471, 3734, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 23925, 691, 12, 2890, 16, 618, 67, 1080, 16, 1409, 67, 1080, 16, 2021, 33, 7036, 16, 5441, 33, 5280, 67, 56, 31582, 4672, 3536, 6464, 279, 8858, 590, 16, 5785, 326, 4332, 471, 3734, ...
return self._ArchiveJobUnlocked(job)
return self._ArchiveJobUnlocked([job]) == 1
def ArchiveJob(self, job_id): """Archives a job.
d7fd1f284ee57053fe39b519abed258cc0e80a27 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7542/d7fd1f284ee57053fe39b519abed258cc0e80a27/jqueue.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13124, 2278, 12, 2890, 16, 1719, 67, 350, 4672, 3536, 12269, 3606, 279, 1719, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13124, 2278, 12, 2890, 16, 1719, 67, 350, 4672, 3536, 12269, 3606, 279, 1719, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
return re_not_isbn_chars.sub(m.group(1), '')
return re_not_isbn_chars.sub('', m.group(1))
def normalize_isbn (s): m = re_isbn_chars.search(s) if m: return re_not_isbn_chars.sub(m.group(1), '') else: return None
c2f1c94e27d8765bbdff3295752df469ca0c7724 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3913/c2f1c94e27d8765bbdff3295752df469ca0c7724/parse.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3883, 67, 291, 13392, 261, 87, 4672, 312, 273, 283, 67, 291, 13392, 67, 7549, 18, 3072, 12, 87, 13, 309, 312, 30, 327, 283, 67, 902, 67, 291, 13392, 67, 7549, 18, 1717, 2668, 2187, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3883, 67, 291, 13392, 261, 87, 4672, 312, 273, 283, 67, 291, 13392, 67, 7549, 18, 3072, 12, 87, 13, 309, 312, 30, 327, 283, 67, 902, 67, 291, 13392, 67, 7549, 18, 1717, 2668, 2187, ...
return 1
return True
def __eq__(self, n): if n.lid == self.lid: return 1 else: return 0
db5e486ce08d4d56bdca35160b820bcab1d43c7f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4470/db5e486ce08d4d56bdca35160b820bcab1d43c7f/astar.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 11253, 972, 12, 2890, 16, 290, 4672, 309, 290, 18, 80, 350, 422, 365, 18, 80, 350, 30, 327, 1053, 469, 30, 327, 374, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 11253, 972, 12, 2890, 16, 290, 4672, 309, 290, 18, 80, 350, 422, 365, 18, 80, 350, 30, 327, 1053, 469, 30, 327, 374, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
_mapping = {'From': parse_address, 'To': parse_address, 'cc': parse_address}
_mapping = {'From': parse_cpim_address, 'To': parse_cpim_address, 'cc': parse_cpim_address}
def parse_address(s): """ >>> alice = parse_address('<sip:alice@example.com>') >>> alice.user, alice.host, alice.display ('alice', 'example.com', None) >>> alice = parse_address('Alice The Great <sip:alice@example.com>') >>> alice.user, alice.host, alice.display ('alice', 'example.com', 'Alice The Great') """ m = _re_address.match(s) if not m: raise ValueError('Cannot parse message/cpim address: %r' % s) display, uri = m.groups() if display: display = display.strip().strip('"') uri = SIPAddress.parse(uri) return SIPURI(user=uri.username, host=uri.domain, display=display)
c477aabaf91fdf998b4b0fa53512b62ef670f3c7 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3449/c477aabaf91fdf998b4b0fa53512b62ef670f3c7/cpim.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 2867, 12, 87, 4672, 3536, 4080, 524, 1812, 273, 1109, 67, 2867, 2668, 32, 28477, 30, 287, 1812, 36, 8236, 18, 832, 1870, 13, 4080, 524, 1812, 18, 1355, 16, 524, 1812, 18, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 2867, 12, 87, 4672, 3536, 4080, 524, 1812, 273, 1109, 67, 2867, 2668, 32, 28477, 30, 287, 1812, 36, 8236, 18, 832, 1870, 13, 4080, 524, 1812, 18, 1355, 16, 524, 1812, 18, 2...
else: self.irc_connection.privmsg(self.bridge.irc_room, message)
def sayOnIRC(self, message): if self.protocol == 'irc': raise Exception('[Internal Error] "'+self.nickname+'" comes from IRC') try: if self.irc_connection == None: self.bridge.irc_connection.privmsg(self.bridge.irc_room, '<'+self.nickname+'> '+message) else: self.irc_connection.privmsg(self.bridge.irc_room, message) except EncodingException: self.bridge.say('[Warning] "'+self.nickname+'" is sending messages using an unknown encoding')
d96bf24efa4ff6b4c74a1fdc2610fadf512c84fe /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9915/d96bf24efa4ff6b4c74a1fdc2610fadf512c84fe/participant.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12532, 1398, 30240, 12, 2890, 16, 883, 4672, 309, 365, 18, 8373, 422, 296, 481, 71, 4278, 1002, 1185, 2668, 63, 3061, 1068, 65, 2491, 15, 2890, 18, 17091, 529, 15, 4970, 14535, 628, 46...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12532, 1398, 30240, 12, 2890, 16, 883, 4672, 309, 365, 18, 8373, 422, 296, 481, 71, 4278, 1002, 1185, 2668, 63, 3061, 1068, 65, 2491, 15, 2890, 18, 17091, 529, 15, 4970, 14535, 628, 46...
pbuffer(False,"HEADERS=")
pbufferStr("HEADERS=")
def main(): global printbuffer # Parse input args (args,list_mode,help_mode,ofile) = parseArgs() # If in help_mode, print help string and exit if help_mode: print HELP_STRING sys.exit(1) # try: # If in list mode: if list_mode: # Remove duplicates from list args = list(set(args)) # Initialize a list of include file paths include_paths = [] # Process all of the listed files for path in args: # Check to make sure the file ends in .s if not path.endswith(".s"): print("Error: the file \"" + path + "\" has an invalid file extension " + "and may not be a valid source file.\nExiting...") sys.exit(1) # Check to make sure the file exists if not (os.path.exists(path) and os.path.isfile(path)): print("Error: the file \"" + path + "\" does not exist.\nExiting...") sys.exit(1) # Try to open the file try: sfile = open(path,'r') except: print("Error: the file \"" + path + "\" cannot be opened.\nExiting...") sys.exit(1) # Find the absolute paths of all includes from the file include_paths.extend(getIncludes(sfile)) # Remove duplicate headers include_paths = list(set(include_paths)) # Get the print buffer ready pbuffer(False,"HEADERS=") # Escape any spaces in the pathname includes = [inc_path.replace(" ","\ ") for inc_path in include_paths] # Add the include paths to the print buffer for path in include_paths: path = path[0:len(path) - 3] + ".csv" pbuffer(False,path + " ") # If in regular mode: else: path = args[0] # Check to make sure the input file ends in .s if not path.endswith(".s"): print("Error: the file \"" + path + "\" has an invalid file extension " + "and may not be a valid source file.\nExiting...") sys.exit(1) # Check to make sure the input file exists if not (os.path.exists(path) and os.path.isfile(path)): print("Error: the file \"" + path + "\" does not exist.\nExiting...") sys.exit(1) # Try to open the source file try: sfile = open(path,'r') except: print("Error: the file \"" + path + "\" cannot be opened.\nExiting...") sys.exit(1) # Find the absolute paths of all includes from the source file include_paths = getIncludes(sfile) # Parse the include files and build a defines dictionary var_dict = {} # For each header file: for hpath in include_paths: # Try to open the file try: hfile = open(hpath,'r') except: print("Error: the file \"" + hpath + "\" cannot be opened.\nExiting...") sys.exit(1) # Parse the header file parseHeader(hfile, hpath, var_dict) # Parse the source file parseSource(sfile, var_dict) # Print out the printbuffer if ofile == None: print printbuffer else: try: file = open(ofile,'w') file.write(printbuffer) file.close() except: print "Error: could not open output file \"" + ofile + "\" for writing.\nExiting..." sys.exit(1)
bc7caa6020ce9c0d3efd9e0dbbc8e121c4373dda /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3352/bc7caa6020ce9c0d3efd9e0dbbc8e121c4373dda/preprocessor.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 225, 2552, 1172, 4106, 225, 468, 2884, 810, 833, 261, 1968, 16, 1098, 67, 3188, 16, 5201, 67, 3188, 16, 83, 768, 13, 273, 1109, 2615, 1435, 225, 468, 971, 316, 2809, 67, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 225, 2552, 1172, 4106, 225, 468, 2884, 810, 833, 261, 1968, 16, 1098, 67, 3188, 16, 5201, 67, 3188, 16, 83, 768, 13, 273, 1109, 2615, 1435, 225, 468, 971, 316, 2809, 67, ...
if len(file_list) == previous_list_len: for x in failure: if ('502 Bad Gateway' in x or 'svn: REPORT of \'/svn/!svn/vcc/default\': 200 OK' in x): break else: raise else: pass
if len(file_list) == previous_list_len and not IsKnownFailure(): raise
def CaptureMatchingLines(line): match = compiled_pattern.search(line) if match: file_list.append(match.group(1)) if line.startswith('svn: '): failure.append(line)
b0c2c6fd6888325d4936e391bc35b87de93873c5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6076/b0c2c6fd6888325d4936e391bc35b87de93873c5/scm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 18477, 9517, 5763, 12, 1369, 4672, 845, 273, 7743, 67, 4951, 18, 3072, 12, 1369, 13, 309, 845, 30, 585, 67, 1098, 18, 6923, 12, 1916, 18, 1655, 12, 21, 3719, 309, 980, 18, 17514, 191...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 18477, 9517, 5763, 12, 1369, 4672, 845, 273, 7743, 67, 4951, 18, 3072, 12, 1369, 13, 309, 845, 30, 585, 67, 1098, 18, 6923, 12, 1916, 18, 1655, 12, 21, 3719, 309, 980, 18, 17514, 191...
self.reconnecting = False
def __init__(self, owner_bot, xmpp_room_jid, irc_room, irc_server, mode, say_level, irc_port=6667, irc_connection_interval=None, irc_charsets=None): """Create a new bridge.""" self.bot = owner_bot self.irc_server = irc_server self.irc_port = irc_port self.irc_room = irc_room.lower() self.irc_connection_interval = irc_connection_interval self.irc_charsets = irc_charsets self.irc_op = False self.xmpp_room_jid = xmpp_room_jid self.say_level = say_level self.participants = [] self.reconnecting = False if mode not in self.__class__.modes: raise Exception('[Error] "'+mode+'" is not a correct value for a bridge\'s "mode" attribute') self.mode = mode self.lock = threading.RLock() self.init2()
c452eafaa4502bd655de3d0dd9d7fef0daa19247 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9915/c452eafaa4502bd655de3d0dd9d7fef0daa19247/bridge.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 3410, 67, 4819, 16, 619, 24109, 67, 13924, 67, 18252, 16, 277, 1310, 67, 13924, 16, 277, 1310, 67, 3567, 16, 1965, 16, 12532, 67, 2815, 16, 277, 1310, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 3410, 67, 4819, 16, 619, 24109, 67, 13924, 67, 18252, 16, 277, 1310, 67, 13924, 16, 277, 1310, 67, 3567, 16, 1965, 16, 12532, 67, 2815, 16, 277, 1310, ...
print key+' Failed' print value['diff'] print "Total resources = %s, Passed = %s, Failed = %s" % (total, passed, failed)
self.end_strings.append(key+' Failed') self.end_strings.append(value['diff']) self.end_strings.append("Total resources = %s, Passed = %s, Failed = %s" % (total, passed, failed))
def validate(self): total = passed = failed = 0 failures = {} print 'Starting validation for all resources for hub-test user' for item in self.store['hub_test_resources']: print 'Verifying %s' % item['href'] body = self.client.get(item['href'].replace(self.client._url.geturl(), '')) try: total = total + 1 assert item['body'] == body passed = passed + 1 except AssertionError: failed = failed + 1 diff = '\n'.join([line.encode('ascii', 'ignore') for line in difflib.unified_diff(item['body'].split('\n'), body.split('\n'))]) failure = {'item':item, 'body':body, 'diff':diff} failures[item['href'].replace(self.client._url.geturl(), '')] = failure print 'Failure in '+item['href'] print diff self.store['test_account_failures'] = failures for key, value in failures: print key+' Failed' print value['diff'] print "Total resources = %s, Passed = %s, Failed = %s" % (total, passed, failed) if failed is not 0: print 'Failed urls :: \n%s' % '\n'.join([fail['href'] for fail in failed])
8345d84d0169485f1cac49ac8f76da8b393a958d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9939/8345d84d0169485f1cac49ac8f76da8b393a958d/migration_test.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1954, 12, 2890, 4672, 2078, 273, 2275, 273, 2535, 273, 374, 11720, 273, 2618, 225, 1172, 296, 11715, 3379, 364, 777, 2703, 364, 11891, 17, 3813, 729, 11, 364, 761, 316, 365, 18, 2233, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1954, 12, 2890, 4672, 2078, 273, 2275, 273, 2535, 273, 374, 11720, 273, 2618, 225, 1172, 296, 11715, 3379, 364, 777, 2703, 364, 11891, 17, 3813, 729, 11, 364, 761, 316, 365, 18, 2233, ...
sloc = os.lstat(current)
sloc = os.stat(current)
def InstallDirectory(self, entry): '''Install Directory Entry''' self.logger.info("Installing Directory %s" % (entry.get('name'))) try: fmode = os.lstat(entry.get('name')) if not S_ISDIR(fmode[ST_MODE]): self.logger.debug("Found a non-directory entry at %s" % (entry.get('name'))) try: os.unlink(entry.get('name')) except OSError: self.logger.info("Failed to unlink %s" % (entry.get('name'))) return False else: self.logger.debug("Found a pre-existing directory at %s" % (entry.get('name'))) exists = True except OSError: # stat failed exists = False
18b8880cdb8fb99facafe79517bf850635affbca /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11867/18b8880cdb8fb99facafe79517bf850635affbca/POSIX.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10284, 2853, 12, 2890, 16, 1241, 4672, 9163, 6410, 8930, 3841, 26418, 365, 18, 4901, 18, 1376, 2932, 6410, 310, 8930, 738, 87, 6, 738, 261, 4099, 18, 588, 2668, 529, 11, 20349, 775, 30...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10284, 2853, 12, 2890, 16, 1241, 4672, 9163, 6410, 8930, 3841, 26418, 365, 18, 4901, 18, 1376, 2932, 6410, 310, 8930, 738, 87, 6, 738, 261, 4099, 18, 588, 2668, 529, 11, 20349, 775, 30...
OUTPUT: - QuaternionOrder
OUTPUT: QuaternionOrder
def quaternion_order(self): """ Return the order for which this ideal is a left or right fractional ideal. If this ideal has both a left and right ideal structure, then the left order is returned. If it has neither structure, then an error is raised.
1ec65dfa0c3aab294b8ecca3f5f5493e154b7172 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9417/1ec65dfa0c3aab294b8ecca3f5f5493e154b7172/quaternion_algebra.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 26774, 67, 1019, 12, 2890, 4672, 3536, 2000, 326, 1353, 364, 1492, 333, 23349, 353, 279, 2002, 578, 2145, 20462, 23349, 18, 225, 971, 333, 23349, 711, 3937, 279, 2002, 471, 2145, 23349, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 26774, 67, 1019, 12, 2890, 4672, 3536, 2000, 326, 1353, 364, 1492, 333, 23349, 353, 279, 2002, 578, 2145, 20462, 23349, 18, 225, 971, 333, 23349, 711, 3937, 279, 2002, 471, 2145, 23349, ...
self.assertPattern('<li>.*<a href="%s">.*Series 9:.*Audiovisual material.*</a>.*</li>' % \
self.assertPattern('<li>.*<a href="%s".*rel="">.*Series 9:.*Audiovisual material.*</a>.*</li>' % \
def test_view_series__bailey_series1(self): series_url = reverse('fa:series-or-index', kwargs={'id': 'bailey807', 'series_id': 'bailey807_series1'}) response = self.client.get(series_url) expected = 200 self.assertEqual(response.status_code, expected, 'Expected %s but returned %s for %s' % \ (expected, response.status_code, series_url))
4dad10bc358413e2fc2241a93d4315ef0ddc39ab /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10178/4dad10bc358413e2fc2241a93d4315ef0ddc39ab/tests.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 1945, 67, 10222, 972, 12124, 398, 93, 67, 10222, 21, 12, 2890, 4672, 4166, 67, 718, 273, 4219, 2668, 507, 30, 10222, 17, 280, 17, 1615, 2187, 1205, 5899, 11, 350, 4278, 296, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 1945, 67, 10222, 972, 12124, 398, 93, 67, 10222, 21, 12, 2890, 4672, 4166, 67, 718, 273, 4219, 2668, 507, 30, 10222, 17, 280, 17, 1615, 2187, 1205, 5899, 11, 350, 4278, 296, ...
script_review_currentWord.__doc__=_("Speaks the word of the current navigator object where the review cursor is situated")
script_review_currentWord.__doc__=_("Speaks the word of the current navigator object where the review cursor is situated. If this key is pressed twice, the word will be spelled")
def script_review_currentWord(self,keyPress): info=globalVars.reviewPosition.copy() info.expand(textHandler.UNIT_WORD) if scriptHandler.getLastScriptRepeateCount()==0: speech.speakFormattedText(info) else: speech.speakSpelling(info._get_text())
e71a52fd4a4b47af55b85211140c5deabbe03c2b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9340/e71a52fd4a4b47af55b85211140c5deabbe03c2b/_default.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2728, 67, 16041, 67, 2972, 3944, 12, 2890, 16, 856, 11840, 4672, 1123, 33, 6347, 5555, 18, 16041, 2555, 18, 3530, 1435, 1123, 18, 12320, 12, 955, 1503, 18, 15736, 67, 7952, 13, 309, 27...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2728, 67, 16041, 67, 2972, 3944, 12, 2890, 16, 856, 11840, 4672, 1123, 33, 6347, 5555, 18, 16041, 2555, 18, 3530, 1435, 1123, 18, 12320, 12, 955, 1503, 18, 15736, 67, 7952, 13, 309, 27...
TixSubWidget.__init__(self, master, name, destroy_physically)
TixSubWidget.__init__(self, master, name, destroy_physically)
def __init__(self, master, name, destroy_physically=1):
0049f0036898e656085d5c214ba07642a9c25a6e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/0049f0036898e656085d5c214ba07642a9c25a6e/Tix.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 4171, 16, 508, 16, 5546, 67, 844, 1900, 6478, 33, 21, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 4171, 16, 508, 16, 5546, 67, 844, 1900, 6478, 33, 21, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
dev_null = open('/dev/null', 'w')
dev_null = open(os.devnull, 'w')
def __start_console_log(self, logfilename): """ Log the output of the console session to a specified file """ if logfilename == None: return if not self.conmux_attach or not os.path.exists(self.conmux_attach): return
167e93c3dd37b38926cf650cc12234f8027d19de /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12268/167e93c3dd37b38926cf650cc12234f8027d19de/ssh_host.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1937, 67, 8698, 67, 1330, 12, 2890, 16, 613, 3459, 4672, 3536, 1827, 326, 876, 434, 326, 2983, 1339, 358, 279, 1269, 585, 3536, 309, 613, 3459, 422, 599, 30, 327, 309, 486, 365, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1937, 67, 8698, 67, 1330, 12, 2890, 16, 613, 3459, 4672, 3536, 1827, 326, 876, 434, 326, 2983, 1339, 358, 279, 1269, 585, 3536, 309, 613, 3459, 422, 599, 30, 327, 309, 486, 365, ...
footnote = self.make_target_footnote(target, [ref]) if not self.notes.has_key(target['refuri']): self.notes[target['refuri']] = footnote
footnote = self.make_target_footnote(target, [ref], notes) if not notes.has_key(target['refuri']): notes[target['refuri']] = footnote
def apply(self): nodelist = [] for target in self.document.external_targets: name = target.get('name') if not name: print >>sys.stderr, 'no name on target: %r' % target continue refs = self.document.refnames.get(name, []) if not refs: continue footnote = self.make_target_footnote(target, refs) if not self.notes.has_key(target['refuri']): self.notes[target['refuri']] = footnote nodelist.append(footnote) if len(self.document.anonymous_targets) \ == len(self.document.anonymous_refs): for target, ref in zip(self.document.anonymous_targets, self.document.anonymous_refs): if target.hasattr('refuri'): footnote = self.make_target_footnote(target, [ref]) if not self.notes.has_key(target['refuri']): self.notes[target['refuri']] = footnote nodelist.append(footnote) self.startnode.parent.replace(self.startnode, nodelist) # @@@ what about indirect links to external targets?
8f79e17adb34ec6ac6e9aef23e7b146a9221ec29 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8194/8f79e17adb34ec6ac6e9aef23e7b146a9221ec29/references.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2230, 12, 2890, 4672, 30068, 273, 5378, 364, 1018, 316, 365, 18, 5457, 18, 9375, 67, 11358, 30, 508, 273, 1018, 18, 588, 2668, 529, 6134, 309, 486, 508, 30, 1172, 1671, 9499, 18, 11241...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2230, 12, 2890, 4672, 30068, 273, 5378, 364, 1018, 316, 365, 18, 5457, 18, 9375, 67, 11358, 30, 508, 273, 1018, 18, 588, 2668, 529, 6134, 309, 486, 508, 30, 1172, 1671, 9499, 18, 11241...
if chunk.method=='REPORT':
elif chunk.method=='REPORT':
def _on_incoming(self, chunk=None, error=None): if error is not None: if isinstance(error.value, ConnectionDone): self.notification_center.post_notification('MSRPChatDidEnd', self) else: self.notification_center.post_notification('MSRPChatDidFail', self, NotificationData(context='reading', failure=error)) if chunk.method=='REPORT': # in theory, REPORT can come with Byte-Range which would limit the scope of the REPORT to # the part of the message. data = NotificationData(message_id=chunk.message_id, message=chunk, code=chunk.status.code, reason=chunk.status.reason) if chunk.status.code == 200: self.notification_center.post_notification('MSRPChatDidDeliverMessage', self, data) else: self.notification_center.post_notification('MSRPChatDidNotDeliverMessage', self, data) elif chunk.method=='SEND': if chunk.content_type.lower()=='message/cpim': cpim_headers, content = MessageCPIMParser.parse_string(chunk.data) content_type = cpim_headers.get('Content-Type') else: cpim_headers = {} content = chunk.data content_type = chunk.content_type # TODO: issue a success report if needed # TODO: check wrapped content-type and issue a report if it's invalid ndata = NotificationData(content=content, content_type=content_type, cpim_headers=cpim_headers, message=chunk) self.notification_center.post_notification('MSRPChatGotMessage', self, ndata)
370c1b4f87d36d4f80c280b86e7413ce6d6513c9 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3449/370c1b4f87d36d4f80c280b86e7413ce6d6513c9/msrp.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 265, 67, 31033, 12, 2890, 16, 2441, 33, 7036, 16, 555, 33, 7036, 4672, 309, 555, 353, 486, 599, 30, 309, 1549, 12, 1636, 18, 1132, 16, 4050, 7387, 4672, 365, 18, 9927, 67, 5693,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 265, 67, 31033, 12, 2890, 16, 2441, 33, 7036, 16, 555, 33, 7036, 4672, 309, 555, 353, 486, 599, 30, 309, 1549, 12, 1636, 18, 1132, 16, 4050, 7387, 4672, 365, 18, 9927, 67, 5693,...
elif self.jsScript(self.script, ver): print >> sys.stderr, "JS popup src", url
def jsScriptData (self, data, url, ver): assert self.state=='wait' if data is None: if not self.script: print >> sys.stderr, "empty JS src", url elif self.jsScript(self.script, ver): print >> sys.stderr, "JS popup src", url else: self.buf.append([STARTTAG, "script", {'type': 'text/javascript'}]) self.buf.append([DATA, "<!--\n%s\n//-->"%self.script]) self.state = 'parse' self.script = '' debug(NIGHTMARE, "XXX switching back to parse with") debug(NIGHTMARE, "self.buf", `self.buf`) #debug(NIGHTMARE, "self.outbuf", `self.outbuf.getvalue()`) debug(NIGHTMARE, "self.inbuf", `self.inbuf.getvalue()`) debug(NIGHTMARE, "self.waitbuf", `self.waitbuf.getvalue()`) else: debug(HURT_ME_PLENTY, "JS: read", len(data)) self.script += data
89b79386924e75b2a16ac8ce4c732a86c3d9ed2d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3948/89b79386924e75b2a16ac8ce4c732a86c3d9ed2d/Rewriter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3828, 3651, 751, 261, 2890, 16, 501, 16, 880, 16, 1924, 4672, 1815, 365, 18, 2019, 18920, 7048, 11, 309, 501, 353, 599, 30, 309, 486, 365, 18, 4263, 30, 1172, 1671, 2589, 18, 11241, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3828, 3651, 751, 261, 2890, 16, 501, 16, 880, 16, 1924, 4672, 1815, 365, 18, 2019, 18920, 7048, 11, 309, 501, 353, 599, 30, 309, 486, 365, 18, 4263, 30, 1172, 1671, 2589, 18, 11241, ...
colSizer.Add(self.fileNameText, 0, wxEXPAND, 4) self.gauge = wxGauge(panel, -1, range = 1000) self.gauge.SetBezelFace(5) self.gauge.SetShadowWidth(5) colSizer.Add(self.gauge, 0, wxEXPAND, 7)
colSizer.Add(self.fileNameText, 0, wxEXPAND) self.gauge = wxGauge(panel, -1, range = 1000, style = wxGA_SMOOTH) colSizer.Add(self.gauge, 0, wxEXPAND)
def drawGUI(self): panel = wxPanel(self, -1) colSizer = wxBoxSizer(wxVERTICAL)
430aa782d5a96eea7ba9a579f334d6b2c77bbde2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4538/430aa782d5a96eea7ba9a579f334d6b2c77bbde2/btdownloadgui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3724, 43, 5370, 12, 2890, 4672, 6594, 273, 7075, 5537, 12, 2890, 16, 300, 21, 13, 645, 20512, 273, 7075, 3514, 20512, 12, 27226, 21654, 10109, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3724, 43, 5370, 12, 2890, 4672, 6594, 273, 7075, 5537, 12, 2890, 16, 300, 21, 13, 645, 20512, 273, 7075, 3514, 20512, 12, 27226, 21654, 10109, 13, 2, -100, -100, -100, -100, -100, -100, ...
bus.config_get_value("/engine/PinYin/HalfPnctuations", PinYinEngine.__half_puncts)
bus.config_get_value("/engine/PinYin/HalfPunctuations", PinYinEngine.__half_puncts)
def CONFIG_VALUE_CHANGED(cls, bus, key, value): if key == "/engine/PinYin/ShuangPinSchema": PinYinEngine.__shuangpin_schema = \ bus.config_get_value("/engine/PinYin/ShuangPinSchema", "MSPY") if PinYinEngine.__shuangpin_schema not in pydict.SHUANGPIN_SCHEMAS: PinYinEngine.__shuangpin_schema = "MSPY" elif key == "/engine/PinYin/FuzzyPinYin": PinYinEngine.__fuzzy_pinyin = \ bus.config_get_value("/engine/PinYin/FuzzyPinYin", False) elif key == "/engine/PinYin/AutoCorrect": PinYinEngine.__auto_correct = \ bus.config_get_value("/engine/PinYin/AutoCorrect", True) elif key == "/engine/PinYin/SpellCheck": PinYinEngine.__spell_check = \ bus.config_get_value("/engine/PinYin/SpellCheck", True) elif key == "/engine/PinYin/PageSize": PinYinEngine.__page_size = \ bus.config_get_value("/engine/PinYin/PageSize", 5) if PinYinEngine.__page_size < 1 or PinYinEngine.__page_size > 9: PinYinEngine.__page_size = 5 elif key == "/engine/PinYin/SupportGBK": PinYinEngine.__gbk = \ bus.config_get_value("/engine/PinYin/SupportGBK", False) elif key == "/engine/PinYin/ShuangPin": PinYinEngine.__shuangpin = \ bus.config_get_value("/engine/PinYin/ShuangPin", False) elif key == "/engine/PinYin/PhraseColor": PinYinEngine.__phrase_color = \ bus.config_get_value("/engine/PinYin/PhraseColor", PinYinEngine.__phrase_color) elif key == "/engine/PinYin/NewPhraseColor": PinYinEngine.__new_phrase_color = \ bus.config_get_value("/engine/PinYin/NewPhraseColor", PinYinEngine.__new_phrase_color) elif key == "/engine/PinYin/UserPhraseColor": PinYinEngine.__user_phrase_color = \ bus.config_get_value("/engine/PinYin/UserPhraseColor", PinYinEngine.__user_phrase_color) elif key == "/engine/PinYin/SpecialPhraseColor": PinYinEngine.__special_phrase_color = \ bus.config_get_value("/engine/PinYin/SpecialPhraseColor", PinYinEngine.__special_phrase_color) elif key == "/engine/PinYin/EnglishPhraseColor": PinYinEngine.__english_phrase_color = \ bus.config_get_value("/engine/PinYin/EnglishPhraseColor", PinYinEngine.__english_phrase_color) elif key == "/engine/PinYin/ErrorEnglishPhraseColor": PinYinEngine.__error_eng_phrase_color = \ bus.config_get_value("/engine/PinYin/ErrorEnglishPhraseColor", PinYinEngine.__error_eng_phrase_color) elif key == "/engine/PinYin/UVToTemp": PinYinEngine.__uv_to_temp = \ bus.config_get_value("/engine/PinYin/UVToTemp", PinYinEngine.__uv_to_temp) elif key == "/engine/PinYin/ShiftSelectCandidates": PinYinEngine.__shift_select_canidates = \ bus.config_get_value("/engine/PinYin/ShiftSelectCandidates", PinYinEngine.__shift_select_candidates) elif key == "/engine/PinYin/CommaPageDownUp": PinYinEngine.__comma_page_down_up = \ bus.config_get_value("/engine/PinYin/CommaPageDownUp", PinYinEngine.__comma_page_down_up) elif key == "/engine/PinYin/EqualPageDownUp": PinYinEngine.__equal_page_down_up = \ bus.config_get_value("/engine/PinYin/EqualPageDownUp", PinYinEngine.__equal_page_down_up) elif key == "/engine/PinYin/AutoCommit": PinYinEngine.__auto_commit = \ bus.config_get_value("/engine/PinYin/AutoCommit", PinYinEngine.__auto_commit) elif key == "/engine/PinYin/HalfPnctuations": PinYinEngine.__half_puncts = \ bus.config_get_value("/engine/PinYin/HalfPnctuations", PinYinEngine.__half_puncts) else: print "Unknow key(%s)" % key
4293565d5ffac5938248e5c787ec11ebbf5e5a88 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/471/4293565d5ffac5938248e5c787ec11ebbf5e5a88/pinyin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9128, 67, 4051, 67, 24435, 12, 6429, 16, 5766, 16, 498, 16, 460, 4672, 309, 498, 422, 2206, 8944, 19, 12178, 61, 267, 19, 1555, 89, 539, 12178, 3078, 6877, 14999, 61, 267, 4410, 16186,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9128, 67, 4051, 67, 24435, 12, 6429, 16, 5766, 16, 498, 16, 460, 4672, 309, 498, 422, 2206, 8944, 19, 12178, 61, 267, 19, 1555, 89, 539, 12178, 3078, 6877, 14999, 61, 267, 4410, 16186,...
check(make_url('/search.py', p='nuclear', as=1), make_url('/search', p='nuclear', as=1))
check(make_url('/search.py', p='nuclear') + 'as=1', make_url('/search', p='nuclear') + 'as=1')
def check(legacy, new): browser.open(legacy) got = browser.geturl()
36971c8f593ce88ae2b3b51dafadc95f10ec4d41 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2139/36971c8f593ce88ae2b3b51dafadc95f10ec4d41/websearch_regression_tests.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 12, 17386, 16, 394, 4672, 4748, 18, 3190, 12, 17386, 13, 2363, 273, 4748, 18, 588, 718, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 12, 17386, 16, 394, 4672, 4748, 18, 3190, 12, 17386, 13, 2363, 273, 4748, 18, 588, 718, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
if latest_edit == history[-1]:
if history[0]['timestamp'] == history[-1]['timestamp']:
def put_mex_in_talk(self): """ Function to put the warning in talk page of the uploader.""" commento2 = wikipedia.translate(self.site, comm2) emailPageName = wikipedia.translate(self.site, emailPageWithText) emailSubj = wikipedia.translate(self.site, emailSubject) if self.notification2 == None: self.notification2 = self.notification else: self.notification2 = self.notification2 % self.image_to_report second_text = False # Getting the talk page's history, to check if there is another advise... # The try block is used to prevent error if you use an old wikipedia.py's version. edit_to_load = 10 try: testoattuale = self.talk_page.get() try: history = self.talk_page.getVersionHistory(False, False, False, edit_to_load) except TypeError: history = self.talk_page.getVersionHistory(False, False, False) latest_edit = history[0] latest_user = latest_edit[2] wikipedia.output(u'The latest user that has written something is: %s' % latest_user) for i in self.botolist: if latest_user == i: second_text = True # A block to prevent the second message if the bot also welcomed users... if latest_edit == history[-1]: second_text = False except wikipedia.IsRedirectPage: wikipedia.output(u'The user talk is a redirect, trying to get the right talk...') try: self.talk_page = self.talk_page.getRedirectTarget() testoattuale = self.talk_page.get() except wikipedia.NoPage: second_text = False ti_es_ti = wikipedia.translate(self.site, empty) testoattuale = ti_es_ti except wikipedia.NoPage: wikipedia.output(u'The user page is blank') second_text = False ti_es_ti = wikipedia.translate(self.site, empty) testoattuale = ti_es_ti if self.commTalk == None: commentox = commento2 else: commentox = self.commTalk if second_text == True: self.talk_page.put(u"%s\n\n%s" % (testoattuale, self.notification2), comment = commentox, minorEdit = False) elif second_text == False: self.talk_page.put(testoattuale + self.head + self.notification, comment = commentox, minorEdit = False) if emailPageName != None and emailSubj != None: emailPage = wikipedia.Page(self.site, emailPageName) try: emailText = emailPage.get() except (wikipedia.NoPage, wikipedia.IsRedirectPage): return # Exit if self.sendemailActive: text_to_send = re.sub(r'__user-nickname__', r'%s' % self.luser, emailText) emailClass = EmailSender(self.site, self.luser) emailClass.send(emailSubj, text_to_send)
6ae6882e2ccf7c8ed6dd97bd5e45a15331b8160f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4404/6ae6882e2ccf7c8ed6dd97bd5e45a15331b8160f/checkimages.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1378, 67, 81, 338, 67, 267, 67, 88, 2960, 12, 2890, 4672, 3536, 4284, 358, 1378, 326, 3436, 316, 26591, 1363, 434, 326, 25062, 12123, 2879, 83, 22, 273, 21137, 18, 13929, 12, 2890, 18,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1378, 67, 81, 338, 67, 267, 67, 88, 2960, 12, 2890, 4672, 3536, 4284, 358, 1378, 326, 3436, 316, 26591, 1363, 434, 326, 25062, 12123, 2879, 83, 22, 273, 21137, 18, 13929, 12, 2890, 18,...
ip_address = models.IPAddressField(null=True, unique=True)
ip_address = models.IPAddressField(null=True, blank=True, unique=True)
def __unicode__(self): return self.name
36a9075f290173b71a22041303d860fe727c66bb /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11354/36a9075f290173b71a22041303d860fe727c66bb/models.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 9124, 972, 12, 2890, 4672, 327, 365, 18, 529, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 9124, 972, 12, 2890, 4672, 327, 365, 18, 529, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
return self.filter_common(js, 'js', settings.COMPRESS_YUI_CSS_ARGUMENTS)
return self.filter_common(js, 'js', settings.COMPRESS_YUI_JS_ARGUMENTS)
def filter_js(self, js): return self.filter_common(js, 'js', settings.COMPRESS_YUI_CSS_ARGUMENTS)
4532912e02761ef5b0209e866107987216a6e98d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12688/4532912e02761ef5b0209e866107987216a6e98d/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1034, 67, 2924, 12, 2890, 16, 3828, 4672, 327, 365, 18, 2188, 67, 6054, 12, 2924, 16, 296, 2924, 2187, 1947, 18, 4208, 22526, 67, 61, 5370, 67, 10276, 67, 18311, 55, 13, 2, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1034, 67, 2924, 12, 2890, 16, 3828, 4672, 327, 365, 18, 2188, 67, 6054, 12, 2924, 16, 296, 2924, 2187, 1947, 18, 4208, 22526, 67, 61, 5370, 67, 10276, 67, 18311, 55, 13, 2, -100, -10...
transform = converter() self.assert_( transform.isInstanceOf( IECore.TransformationMatrixf.staticTypeId() ) )
transform = converter.convert() self.assert_( transform.isInstanceOf( IECore.TransformationMatrixdData.staticTypeId() ) )
def testTransformationMatrix( self ) :
14311ddb2749614ef4b4beb4cf472f68900ca872 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9042/14311ddb2749614ef4b4beb4cf472f68900ca872/FromMayaPlugConverterTest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 15292, 4635, 12, 365, 262, 294, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 15292, 4635, 12, 365, 262, 294, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
<form action="add">
<form action="weblog-add.py">
def genFormPage(): categories=get_blog_dirs() print """\
ce460fe0139475f4387e3acebbe7142c7073257d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11836/ce460fe0139475f4387e3acebbe7142c7073257d/weblog-add.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3157, 1204, 1964, 13332, 6477, 33, 588, 67, 11439, 67, 8291, 1435, 1172, 3536, 64, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3157, 1204, 1964, 13332, 6477, 33, 588, 67, 11439, 67, 8291, 1435, 1172, 3536, 64, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
raise self.interrupt
if self.interrupt: raise self.interrupt
def start(self): """Run the server forever.""" # We don't have to trap KeyboardInterrupt or SystemExit here, # because cherrpy.server already does so, calling self.stop() for us. # If you're using this server with another framework, you should # trap those exceptions in whatever code block calls start(). self._interrupt = None # Select the appropriate socket if isinstance(self.bind_addr, basestring): # AF_UNIX socket # So we can reuse the socket... try: os.unlink(self.bind_addr) except: pass # So everyone can access the socket... try: os.chmod(self.bind_addr, 0777) except: pass info = [(socket.AF_UNIX, socket.SOCK_STREAM, 0, "", self.bind_addr)] else: # AF_INET or AF_INET6 socket # Get the correct address family for our host (allows IPv6 addresses) host, port = self.bind_addr flags = 0 if host == '': # Despite the socket module docs, using '' does not # allow AI_PASSIVE to work. Passing None instead # returns '0.0.0.0' like we want. In other words: # host AI_PASSIVE result # '' Y 192.168.x.y # '' N 192.168.x.y # None Y 0.0.0.0 # None N 127.0.0.1 host = None flags = socket.AI_PASSIVE try: info = socket.getaddrinfo(host, port, socket.AF_UNSPEC, socket.SOCK_STREAM, 0, flags) except socket.gaierror: # Probably a DNS issue. Assume IPv4. info = [(socket.AF_INET, socket.SOCK_STREAM, 0, "", self.bind_addr)] self.socket = None msg = "No socket could be created" for res in info: af, socktype, proto, canonname, sa = res try: self.bind(af, socktype, proto) except socket.error, msg: if self.socket: self.socket.close() self.socket = None continue break if not self.socket: raise socket.error, msg # Timeout so KeyboardInterrupt can be caught on Win32 self.socket.settimeout(1) self.socket.listen(self.request_queue_size) # Create worker threads for i in xrange(self.numthreads): self._workerThreads.append(WorkerThread(self)) for worker in self._workerThreads: worker.setName("CP WSGIServer " + worker.getName()) worker.start() for worker in self._workerThreads: while not worker.ready: time.sleep(.1) self.ready = True while self.ready: self.tick() if self.interrupt: while self.interrupt is True: # Wait for self.stop() to complete. See _set_interrupt. time.sleep(0.1) raise self.interrupt
c1b60ffa36125d073b6d7cc572a61908146aa23d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/82/c1b60ffa36125d073b6d7cc572a61908146aa23d/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 787, 12, 2890, 4672, 3536, 1997, 326, 1438, 21238, 12123, 468, 1660, 2727, 1404, 1240, 358, 23034, 19424, 578, 25454, 2674, 16, 468, 2724, 462, 370, 2074, 18, 3567, 1818, 1552, 1427, 16, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 787, 12, 2890, 4672, 3536, 1997, 326, 1438, 21238, 12123, 468, 1660, 2727, 1404, 1240, 358, 23034, 19424, 578, 25454, 2674, 16, 468, 2724, 462, 370, 2074, 18, 3567, 1818, 1552, 1427, 16, ...
hlr_utils.result_insert(result,res_descr,value,map_so,"x",axis)
hlr_utils.result_insert(result, res_descr, value, map_so, "x", axis)
def tof_to_wavelength(obj,**kwargs): """ This function converts a primary axis of a SOM or SO from time-of-flight to wavelength. The wavelength axis for a SOM must be in units of microseconds. The primary axis of a SO is assumed to be in units of microseconds. A tuple of (tof, tof_err2) (assumed to be in units of microseconds) can be converted to (wavelength, wavelength_err2). Parameters: ---------- -> obj is the SOM, SO or tuple to be converted -> kwargs is a list of key word arguments that the function accepts: pathlength= a tuple or list of tuples containing the pathlength and its associated error^2 inst_param= a string containing the type of parameter requested from an associated instrument. For this function the acceptable parameters are primary and secondary. Default is primary. units= a string containing the expected units for this function. The default for this function is microseconds Return: ------ <- A SOM or SO with a primary axis in wavelength or a tuple converted to wavelength Exceptions: ---------- <- TypeError is raised if the incoming object is not a type the function recognizes <- RuntimeError is raised if the SOM x-axis units are not microseconds <- RuntimeError is raised if a SOM does not contain an instrument and no pathlength was provided <- RuntimeError is raised is no SOM is provided and no pathlength given """ # import the helper functions import hlr_utils # set up for working through data (result,res_descr)=hlr_utils.empty_result(obj) (o_descr,d_descr)=hlr_utils.get_descr(obj) # Setup keyword arguments try: inst_param = kwargs["inst_param"] except KeyError: inst_param = "primary" try: pathlength = kwargs["pathlength"] except KeyError: pathlength = None try: units = kwargs["units"] except KeyError: units = "microseconds" # Primary axis for transformation. If a SO is passed, the function, will # assume the axis for transformation is at the 0 position if o_descr == "SOM": axis = hlr_utils.hlr_1D_units(obj, units) else: axis = 0 result=hlr_utils.copy_som_attr(result,res_descr,obj,o_descr) if res_descr == "SOM": result = hlr_utils.hlr_force_units(result, "Angstroms", axis) result.setAxisLabel(axis, "wavelength") result.setYUnits("Counts/A") result.setYLabel("Intensity") else: pass if pathlength != None: (p_descr,e_descr) = hlr_utils.get_descr(pathlength) else: if o_descr == "SOM": try: obj.attr_list.instrument.get_primary() inst = obj.attr_list.instrument except RuntimeError: raise RuntimeError, "A detector was not provided" else: raise RuntimeError, "If no SOM is provided, then pathlength "\ +"information must be provided" # iterate through the values import axis_manip for i in range(hlr_utils.get_length(obj)): val = hlr_utils.get_value(obj,i,o_descr,"x",axis) err2 = hlr_utils.get_err2(obj,i,o_descr,"x",axis) map_so = hlr_utils.get_map_so(obj,None,i) if pathlength == None: (pl,pl_err2) = hlr_utils.get_parameter(inst_param,map_so,inst) else: pl = hlr_utils.get_value(pathlength,i,p_descr) pl_err2 = hlr_utils.get_err2(pathlength,i,p_descr) value=axis_manip.tof_to_wavelength(val, err2, pl, pl_err2) hlr_utils.result_insert(result,res_descr,value,map_so,"x",axis) return result
481f3c69e02c2688215a796ae23eec59561b6860 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/763/481f3c69e02c2688215a796ae23eec59561b6860/hlr_tof_to_wavelength.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 358, 74, 67, 869, 67, 91, 16775, 12, 2603, 16, 636, 4333, 4672, 3536, 1220, 445, 7759, 279, 3354, 2654, 434, 279, 348, 1872, 578, 7460, 628, 813, 17, 792, 17, 19131, 358, 21410, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 358, 74, 67, 869, 67, 91, 16775, 12, 2603, 16, 636, 4333, 4672, 3536, 1220, 445, 7759, 279, 3354, 2654, 434, 279, 348, 1872, 578, 7460, 628, 813, 17, 792, 17, 19131, 358, 21410, 18, ...