rem
stringlengths
2
226k
add
stringlengths
0
227k
context
stringlengths
8
228k
meta
stringlengths
156
215
input_ids
list
attention_mask
list
labels
list
return "About Python IDE"+ELIPSES
return "About Python IDE"+ELLIPSIS
def getabouttext(self): return "About Python IDE"+ELIPSES
f8a40653079a68a233004a4391a7e19632ab85d2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/f8a40653079a68a233004a4391a7e19632ab85d2/PythonIDEMain.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 21071, 955, 12, 2890, 4672, 327, 315, 24813, 6600, 1599, 41, 6, 15, 2247, 2053, 52, 15664, 225, 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, 336, 21071, 955, 12, 2890, 4672, 327, 315, 24813, 6600, 1599, 41, 6, 15, 2247, 2053, 52, 15664, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
self.assertEquals(PyObjC_TestClassAndInstanceClassOverride.isInstance(PyObjC_TestClassAndInstanceClassOverride), objc.YES) self.assertEquals(PyObjC_TestClassAndInstanceClassOverride.alloc().init().isInstance(), objc.YES)
self.assertEquals(PyObjC_TestClassAndInstanceClassOverride.pyobjc_classMethods.isInstance(), objc.YES) self.assertEquals(PyObjC_TestClassAndInstanceClassOverride.alloc().init().pyobjc_instanceMethods.isInstance(), objc.YES)
def testClassAndInstanceClassOverrideWorkaround(self): self.assertEquals(PyObjC_TestClassAndInstanceClassOverride.isInstance(PyObjC_TestClassAndInstanceClassOverride), objc.YES) self.assertEquals(PyObjC_TestClassAndInstanceClassOverride.alloc().init().isInstance(), objc.YES)
47c81b4e4ec5e7e785935889a966b8881de63f6f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/47c81b4e4ec5e7e785935889a966b8881de63f6f/test_classandinst.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 797, 1876, 1442, 797, 6618, 2421, 12716, 12, 2890, 4672, 365, 18, 11231, 8867, 12, 9413, 2675, 39, 67, 4709, 797, 1876, 1442, 797, 6618, 18, 291, 1442, 12, 9413, 2675, 39, 67, 47...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 797, 1876, 1442, 797, 6618, 2421, 12716, 12, 2890, 4672, 365, 18, 11231, 8867, 12, 9413, 2675, 39, 67, 4709, 797, 1876, 1442, 797, 6618, 18, 291, 1442, 12, 9413, 2675, 39, 67, 47...
del self.pInfo
del self.pInfo
def OnCancel(self): del self.pInfo
81be9edd0818d0cc5675a75bd7b6fce36ac54c3d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/992/81be9edd0818d0cc5675a75bd7b6fce36ac54c3d/dialog.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2755, 6691, 12, 2890, 4672, 1464, 365, 18, 84, 966, 225, 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, ...
[ 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, 2755, 6691, 12, 2890, 4672, 1464, 365, 18, 84, 966, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
self.emit('if(PyDict_SetItemString(d, "%s", (PyObject*)%s_type) < 0) return;' % (name, name), 1)
self.emit('if (PyDict_SetItemString(d, "%s", (PyObject*)%s_type) < 0) return;' % (name, name), 1)
def addObj(self, name): self.emit('if(PyDict_SetItemString(d, "%s", (PyObject*)%s_type) < 0) return;' % (name, name), 1)
ee33a34d4f6d7e33d3b6da7df3701570d9fff33a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/ee33a34d4f6d7e33d3b6da7df3701570d9fff33a/asdl_c.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 2675, 12, 2890, 16, 508, 4672, 365, 18, 18356, 2668, 430, 12, 9413, 5014, 67, 694, 1180, 780, 12, 72, 16, 2213, 87, 3113, 261, 9413, 921, 12437, 9, 87, 67, 723, 13, 411, 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, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 2675, 12, 2890, 16, 508, 4672, 365, 18, 18356, 2668, 430, 12, 9413, 5014, 67, 694, 1180, 780, 12, 72, 16, 2213, 87, 3113, 261, 9413, 921, 12437, 9, 87, 67, 723, 13, 411, 374, ...
if not data: for (name, streamType) in self.streamList: self.__setattr__(name, streamType()) else:
for streamType, name in self.streamDict.itervalues(): self.__setattr__(name, streamType()) if data:
def initializeStreams(self, data):
a67de324b6550ed8a3b892f25e8458e04b9f4282 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8747/a67de324b6550ed8a3b892f25e8458e04b9f4282/files.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4046, 10301, 12, 2890, 16, 501, 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, ...
[ 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, 4046, 10301, 12, 2890, 16, 501, 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, -10...
sage: D = C.divisor([ (4, pts[0]), (0,pts[1]), (4, pts[2]) ])
sage: D = C.divisor([ (4, pts[0]), (4, pts[2]) ])
def riemann_roch_basis(self, D): r""" Return a basis for the Riemann-Roch space corresponding to `D`. .. warning::
77afcbecaf564fe98fd62507a1eccb878b037e67 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/77afcbecaf564fe98fd62507a1eccb878b037e67/projective_curve.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12347, 351, 1072, 67, 303, 343, 67, 23774, 12, 2890, 16, 463, 4672, 436, 8395, 2000, 279, 10853, 364, 326, 21688, 351, 1072, 17, 54, 9842, 3476, 4656, 358, 1375, 40, 8338, 225, 6116, 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, 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, 12347, 351, 1072, 67, 303, 343, 67, 23774, 12, 2890, 16, 463, 4672, 436, 8395, 2000, 279, 10853, 364, 326, 21688, 351, 1072, 17, 54, 9842, 3476, 4656, 358, 1375, 40, 8338, 225, 6116, 3...
if visible.isPath(): if isinstance(visible.client, Stimulus): visible = visible.pathStart elif visible not in self.highlightedVisibles and visible not in self.animatedVisibles: if isinstance(visible.client, Arborization) or isinstance(visible.client, GapJunction): if isinstance(visible.pathStart.client, Neuron): visible = visible.pathStart elif isinstance(visible.pathEnd.client, Neuron): visible = visible.pathEnd elif isinstance(visible.client, Synapse): preSynapticNeuron = visible.client.preSynapticNeurite.neuron() if visible.pathStart.client == preSynapticNeuron: visible = visible.pathStart elif visible.pathEnd.client == preSynapticNeuron: visible = visible.pathEnd
if visible.isPath() and not extend and visible not in self.highlightedVisibles and visible not in self.animatedVisibles: if isinstance(visible.client, Arborization) or isinstance(visible.client, GapJunction): if isinstance(visible.pathStart.client, Neuron): visible = visible.pathStart elif isinstance(visible.pathEnd.client, Neuron): visible = visible.pathEnd elif isinstance(visible.client, Synapse): preSynapticNeuron = visible.client.preSynapticNeurite.neuron() if visible.pathStart.client == preSynapticNeuron: visible = visible.pathStart elif visible.pathEnd.client == preSynapticNeuron: visible = visible.pathEnd
def selectVisible(self, visible, extend = False, findShortestPath = False): self.clearDragger() if visible is None: self.deselectAll(report = False) else: if extend and findShortestPath and len(self.selectedVisibles) == 1: # Add the visibles that exist along the path to the selection. for pathObject in self.selectedVisibles[0].client.shortestPathTo(visible.client): pathVisibles = self.visiblesForObject(pathObject) if len(pathVisibles) == 1: self.selectVisible(pathVisible[0], extend = True) return if not extend or visible not in self.selectedVisibles or (self.hoverSelected and not self.hoverSelecting): # Alter the visible to be selected in certain cases if visible.isPath(): if isinstance(visible.client, Stimulus): # Always select the stimulus's node visible, not its path visible. visible = visible.pathStart elif visible not in self.highlightedVisibles and visible not in self.animatedVisibles: # Select an arborization's, gap junction's or synapse's neuron instead, unless the neuron is already selected. if isinstance(visible.client, Arborization) or isinstance(visible.client, GapJunction): if isinstance(visible.pathStart.client, Neuron): visible = visible.pathStart elif isinstance(visible.pathEnd.client, Neuron): visible = visible.pathEnd elif isinstance(visible.client, Synapse): preSynapticNeuron = visible.client.preSynapticNeurite.neuron() if visible.pathStart.client == preSynapticNeuron: visible = visible.pathStart elif visible.pathEnd.client == preSynapticNeuron: visible = visible.pathEnd if not extend: self.deselectAll(report = False) self.hoverSelected = self.hoverSelecting self.hoverSelecting = False # Strongly highlight the selected visible. # TODO: highlighting should be done via display filters self.selectedVisibles.append(visible) visible.setGlowColor(self._primarySelectionColor) # Make sure the selected visible does not look ghosted. if self._useGhosts: visible.setOpacity(1) elif extend and visible in self.selectedVisibles: # Remove the visible from the selection self.selectedVisibles.remove(visible) dispatcher.send(('set', 'selection'), self) if len(self.selectedVisibles) == 0: self.hoverSelect = True self.hoverSelected = False else: if not self.hoverSelected: self.hoverSelect = False if len(self.selectedVisibles) == 1: if not self.hoverSelected: # Add a dragger to the selected visible. visible = self.selectedVisibles[0] if visible.isDraggable(): self.addDragger(visible)
a6d23a8d813ff801967b9ddf69839b55038cf445 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6368/a6d23a8d813ff801967b9ddf69839b55038cf445/Display.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2027, 6207, 12, 2890, 16, 6021, 16, 2133, 273, 1083, 16, 1104, 4897, 395, 743, 273, 1083, 4672, 365, 18, 8507, 11728, 693, 1435, 309, 6021, 353, 599, 30, 365, 18, 5489, 13759, 1595, 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, 2027, 6207, 12, 2890, 16, 6021, 16, 2133, 273, 1083, 16, 1104, 4897, 395, 743, 273, 1083, 4672, 365, 18, 8507, 11728, 693, 1435, 309, 6021, 353, 599, 30, 365, 18, 5489, 13759, 1595, 12...
if procXml.haschild('Arguments/ParamList'):
if procXml.findall('Arguments/ParamList'):
def riCxxMethodDecl(procXml, className=None): args = [formalArg(arg) for arg in ribArgs(procXml.findall('Arguments/Argument'))] if procXml.haschild('Arguments/ParamList'): args += ['const ParamList& pList'] procName = procXml.findtext('Name') if className is not None: procName = className + '::' + procName return '%s %s(%s)' % (procXml.findtext('ReturnType'), procName, ', '.join(args))
955727445029de8de2b01125125b85498dbc2345 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11560/955727445029de8de2b01125125b85498dbc2345/codegenutils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12347, 39, 5279, 1305, 3456, 12, 9381, 4432, 16, 2658, 33, 7036, 4672, 833, 273, 306, 687, 287, 4117, 12, 3175, 13, 364, 1501, 316, 436, 495, 2615, 12, 9381, 4432, 18, 4720, 454, 2668,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 12347, 39, 5279, 1305, 3456, 12, 9381, 4432, 16, 2658, 33, 7036, 4672, 833, 273, 306, 687, 287, 4117, 12, 3175, 13, 364, 1501, 316, 436, 495, 2615, 12, 9381, 4432, 18, 4720, 454, 2668,...
subq = dict(query=sq, cursor=True, escape=False)
subq = dict(query=sq, escape=False) if isinstance(sq, list): subq['cursor'] = True
def mqlread(self, sq): """read a structure query""" subq = dict(query=sq, cursor=True, escape=False) qstr = simplejson.dumps(dict(c0=subq))
47e6fe17862a5f974e46929577872fc98af8f950 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11603/47e6fe17862a5f974e46929577872fc98af8f950/session.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 312, 1217, 896, 12, 2890, 16, 4744, 4672, 3536, 896, 279, 3695, 843, 8395, 720, 85, 273, 2065, 12, 2271, 33, 11410, 16, 4114, 33, 8381, 13, 309, 1549, 12, 11410, 16, 666, 4672, 720, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 312, 1217, 896, 12, 2890, 16, 4744, 4672, 3536, 896, 279, 3695, 843, 8395, 720, 85, 273, 2065, 12, 2271, 33, 11410, 16, 4114, 33, 8381, 13, 309, 1549, 12, 11410, 16, 666, 4672, 720, ...
def get_reverse_codec(self):
@property def reverse_codec(self):
def get_reverse_codec(self): if not self.loaded: raise FileNotLoadedException c = self.codec keys = c.keys() values = c.values() rc = {} for i in range(0, len(keys)): k = keys[i] v = values[i] print("key: %d, value %s" % (k,v)) rc[v] = k return rc
94d8a0a6189eca5994f296dbc42339bdbf0e7b83 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12313/94d8a0a6189eca5994f296dbc42339bdbf0e7b83/data.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 632, 4468, 1652, 4219, 67, 21059, 12, 2890, 4672, 309, 486, 365, 18, 4230, 30, 1002, 1387, 1248, 8835, 503, 225, 276, 273, 365, 18, 21059, 1311, 273, 276, 18, 2452, 1435, 924, 273, 276, 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, 632, 4468, 1652, 4219, 67, 21059, 12, 2890, 4672, 309, 486, 365, 18, 4230, 30, 1002, 1387, 1248, 8835, 503, 225, 276, 273, 365, 18, 21059, 1311, 273, 276, 18, 2452, 1435, 924, 273, 276, 18, ...
'active_id': datas.get('id',False), 'active_ids': datas.get('ids',[]), 'user': rpc._USER, }
'active_id': datas.get('id',False), 'active_ids': datas.get('ids',[]), 'user': rpc._USER, }
def _exec_action(action, datas=None, context=None): if context is None: context = rpc.CONTEXT.copy() if datas is None: datas = {} if 'type' not in action: return from tryton.gui import Main win = Main.get_main().window if 'window' in datas: win = datas['window'] del datas['window']
4e1d74e962848241a082a4283f65a8be3a3c4e3c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9151/4e1d74e962848241a082a4283f65a8be3a3c4e3c/main.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4177, 67, 1128, 12, 1128, 16, 5386, 33, 7036, 16, 819, 33, 7036, 4672, 309, 819, 353, 599, 30, 819, 273, 6724, 18, 13181, 18, 3530, 1435, 309, 5386, 353, 599, 30, 5386, 273, 261...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4177, 67, 1128, 12, 1128, 16, 5386, 33, 7036, 16, 819, 33, 7036, 4672, 309, 819, 353, 599, 30, 819, 273, 6724, 18, 13181, 18, 3530, 1435, 309, 5386, 353, 599, 30, 5386, 273, 261...
paramNameList.append(x)
paramNameList.append(ret)
def getJobOptParameters(self,jobID,paramList=[]): """ Get optimizer parameters for the given job. If the list of parameter names is empty, get all the parameters then """
18f5833df85631de19578536c128efaccf6004f2 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12864/18f5833df85631de19578536c128efaccf6004f2/JobDB.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13024, 6179, 2402, 12, 2890, 16, 4688, 734, 16, 891, 682, 33, 8526, 4672, 3536, 968, 13066, 1472, 364, 326, 864, 1719, 18, 971, 326, 666, 434, 1569, 1257, 353, 1008, 16, 336, 777, 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, 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, 13024, 6179, 2402, 12, 2890, 16, 4688, 734, 16, 891, 682, 33, 8526, 4672, 3536, 968, 13066, 1472, 364, 326, 864, 1719, 18, 971, 326, 666, 434, 1569, 1257, 353, 1008, 16, 336, 777, 326,...
print '%-7.2f %s' % (elapsed, 'seconds elapsed') keys = ['directories', 'files', 'logical lines', 'physical lines'] for key in keys: if key in options.counters: print '%-7d %s per second (%d total)' % ( options.counters[key] / elapsed, key, options.counters[key])
print_benchmark()
def _main(): """ Parse command line options and run checks on Python source. """ global options usage = "%prog [options] input ..." parser = OptionParser(usage) parser.add_option('-v', '--verbose', default=0, action='count', help="print status messages, or debug with -vv") parser.add_option('-q', '--quiet', default=0, action='count', help="report only file names, or nothing with -qq") parser.add_option('--exclude', metavar='patterns', default=default_exclude, help="skip matches (default %s)" % default_exclude) parser.add_option('--filename', metavar='patterns', help="only check matching files (e.g. *.py)") parser.add_option('--ignore', metavar='errors', default='', help="skip errors and warnings (e.g. E4,W)") parser.add_option('--repeat', action='store_true', help="show all occurrences of the same error") parser.add_option('--show-source', action='store_true', help="show source code for each error") parser.add_option('--show-pep8', action='store_true', help="show text of PEP 8 for each error") parser.add_option('--statistics', action='store_true', help="count errors and warnings") parser.add_option('--benchmark', action='store_true', help="measure processing speed") parser.add_option('--testsuite', metavar='dir', help="run regression tests from dir") parser.add_option('--doctest', action='store_true', help="run doctest on myself") options, args = parser.parse_args() if options.doctest: import doctest return doctest.testmod() if options.testsuite: args.append(options.testsuite) if len(args) == 0: parser.error('input not specified') options.prog = os.path.basename(sys.argv[0]) options.exclude = options.exclude.split(',') for index in range(len(options.exclude)): options.exclude[index] = options.exclude[index].rstrip('/') if options.filename: options.filename = options.filename.split(',') if options.ignore: options.ignore = options.ignore.split(',') else: options.ignore = [] # print options.exclude, options.ignore start_time = time.time() options.counters = {} options.messages = {} for path in args: if os.path.isdir(path): input_dir(path) else: input_file(path) elapsed = time.time() - start_time if options.statistics: keys = options.counters.keys() keys.sort() for key in keys: if key[0] in 'EW': print '%-7s %s %s' % (options.counters[key], key, options.messages[key]) if options.benchmark: print '%-7.2f %s' % (elapsed, 'seconds elapsed') keys = ['directories', 'files', 'logical lines', 'physical lines'] for key in keys: if key in options.counters: print '%-7d %s per second (%d total)' % ( options.counters[key] / elapsed, key, options.counters[key])
b69e50e89584add8ba3cde2f8eea42330b1cdbc3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3111/b69e50e89584add8ba3cde2f8eea42330b1cdbc3/pep8.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5254, 13332, 3536, 2884, 1296, 980, 702, 471, 1086, 4271, 603, 6600, 1084, 18, 3536, 2552, 702, 4084, 273, 2213, 14654, 306, 2116, 65, 810, 18483, 2082, 273, 18862, 12, 9167, 13, 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, 389, 5254, 13332, 3536, 2884, 1296, 980, 702, 471, 1086, 4271, 603, 6600, 1084, 18, 3536, 2552, 702, 4084, 273, 2213, 14654, 306, 2116, 65, 810, 18483, 2082, 273, 18862, 12, 9167, 13, 20...
handler = root.get_handler('ui/base/new_instance.xml')
handler = root.get_object('ui/base/new_instance.xml')
def new_instance_form(cls, context, with_language=False): root = context.root here = context.handler
47ed6245c14eddc3c9d50f5123d28ff6eddf5ae3 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12681/47ed6245c14eddc3c9d50f5123d28ff6eddf5ae3/base.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 394, 67, 1336, 67, 687, 12, 6429, 16, 819, 16, 598, 67, 4923, 33, 8381, 4672, 1365, 273, 819, 18, 3085, 2674, 273, 819, 18, 4176, 2, 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, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 394, 67, 1336, 67, 687, 12, 6429, 16, 819, 16, 598, 67, 4923, 33, 8381, 4672, 1365, 273, 819, 18, 3085, 2674, 273, 819, 18, 4176, 2, -100, -100, -100, -100, -100, -100, -100, -100, -...
return self.combine(expr.flat)
return self.combine(self.rec(el) for el in expr.flat)
def map_numpy_array(self, expr): return self.combine(expr.flat)
5ce156336082f58df0fce1082a5948de8508dc25 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12571/5ce156336082f58df0fce1082a5948de8508dc25/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 852, 67, 15974, 67, 1126, 12, 2890, 16, 3065, 4672, 327, 365, 18, 14082, 12, 8638, 18, 15401, 13, 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, 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, 852, 67, 15974, 67, 1126, 12, 2890, 16, 3065, 4672, 327, 365, 18, 14082, 12, 8638, 18, 15401, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
print "got multiple adds"
syslog(LOG_INFO, "got multiple adds for %s" % name)
def AddEntry(self, name): '''Add new entry to data structures upon file creation''' if self.entries.has_key(name): print "got multiple adds" else: if ((name[-1] == '~') or (name[:2] == '.#') or (name == 'SCCS') or (name[-4:] == '.swp')): return self.entries[name] = self.__child__('%s/%s' % (self.name, name)) self.entries[name].HandleEvent()
bc98c9e35769f4b6f902cdc074600eb9e30039d6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11867/bc98c9e35769f4b6f902cdc074600eb9e30039d6/Generator.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1436, 1622, 12, 2890, 16, 508, 4672, 9163, 986, 394, 1241, 358, 501, 12597, 12318, 585, 6710, 26418, 309, 365, 18, 8219, 18, 5332, 67, 856, 12, 529, 4672, 16718, 12, 4842, 67, 5923, 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, 1436, 1622, 12, 2890, 16, 508, 4672, 9163, 986, 394, 1241, 358, 501, 12597, 12318, 585, 6710, 26418, 309, 365, 18, 8219, 18, 5332, 67, 856, 12, 529, 4672, 16718, 12, 4842, 67, 5923, 16...
if descriptionCriteria is not None and re.compile(descriptionCriteria).match(description) is None:
if descriptionMatcher is not None and descriptionMatcher.match(description) is None:
def get_sane_callback(backend): """ Try to set a sane default callback number on these preferences 1) 1747 numbers ( Gizmo ) 2) anything with gizmo in the name 3) anything with computer in the name 4) the first value """ numbers = backend.get_callback_numbers() priorityOrderedCriteria = [ ("+1747", None), ("1747", None), ("747", None), (None, "gizmo"), (None, "computer"), (None, "sip"), (None, None), ] for numberCriteria, descriptionCriteria in priorityOrderedCriteria: for number, description in numbers.iteritems(): if numberCriteria is not None and re.compile(numberCriteria).match(number) is None: continue if descriptionCriteria is not None and re.compile(descriptionCriteria).match(description) is None: continue return number
c2f933a3569e5159aec1bedf117725380c5db8cf /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13096/c2f933a3569e5159aec1bedf117725380c5db8cf/backend.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 87, 8806, 67, 3394, 12, 9993, 4672, 3536, 6161, 358, 444, 279, 30426, 805, 1348, 1300, 603, 4259, 12750, 404, 13, 404, 5608, 27, 5600, 261, 611, 452, 8683, 262, 576, 13, 6967,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 67, 87, 8806, 67, 3394, 12, 9993, 4672, 3536, 6161, 358, 444, 279, 30426, 805, 1348, 1300, 603, 4259, 12750, 404, 13, 404, 5608, 27, 5600, 261, 611, 452, 8683, 262, 576, 13, 6967,...
extension_attributes=extension_attributes,
extension_attributes=extension_attributes,
def __init__(self, extension_elements=None, extension_attributes=None, text=None): UriEnumElement.__init__(self, tag='transparency', enum_map=Transparency.transparency_enum, extension_elements=extension_elements, extension_attributes=extension_attributes, text=text)
6a016768dbbd7d5ee9c62bcd2d2ce3bf7f6d1048 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6580/6a016768dbbd7d5ee9c62bcd2d2ce3bf7f6d1048/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2710, 67, 6274, 33, 7036, 16, 2710, 67, 4350, 33, 7036, 16, 977, 33, 7036, 4672, 10693, 3572, 1046, 16186, 2738, 972, 12, 2890, 16, 1047, 2218, 2338, 182...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2710, 67, 6274, 33, 7036, 16, 2710, 67, 4350, 33, 7036, 16, 977, 33, 7036, 4672, 10693, 3572, 1046, 16186, 2738, 972, 12, 2890, 16, 1047, 2218, 2338, 182...
deps = ['pattern', 'core'])
deps = ['pattern', 'core', 'math'])
def get_features(): global FEATURES # Only generate the list once if not FEATURES is None: return FEATURES FEATURES = {} # List of features in the build # See the "add_feature" function in the "SUPPORT" section of the file below # for more information add_feature('core', dirs = ['packages/core']) add_feature('pattern', dirs = ['packages/pattern']) add_feature('math', dirs = ['packages/math']) add_feature('vision', dirs = ['packages/vision'], deps = ['pattern', 'core']) add_feature('vehicle', dirs = ['packages/vehicle'], deps = ['math', 'core', 'pattern']) add_feature('control', dirs = ['packages/control'], deps = ['math', 'core', 'vehicle']) add_feature('wrappers', dirs = ['wrappers/samples'], opt_dirs = {'control' : ['wrappers/control'], 'math' : ['wrappers/math'], 'vehicle' : ['wrappers/vehicle'], 'vision' : ['wrappers/vision'], 'core' : ['wrappers/core']}) if os.name == 'posix': add_feature('network', dirs = ['packages/network']) add_feature('vision_tools', opt_dirs = {'vision' : ['tools/vision_viewer']} ) add_feature('drivers', dirs = ['packages/sensorapi', 'packages/thrusterapi', 'packages/imu', 'packages/carnetix']) add_feature('calib_tools', dirs = ['tools/MagInclination', 'tools/BiasFinder']) add_feature('jaus', dirs = ['sandbox/jaus']) return FEATURES
952242587965b9919a40c1cba838e48824b501d5 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10608/952242587965b9919a40c1cba838e48824b501d5/features.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 7139, 13332, 2552, 25201, 55, 225, 468, 5098, 2103, 326, 666, 3647, 309, 486, 25201, 55, 353, 599, 30, 327, 25201, 55, 225, 25201, 55, 273, 2618, 225, 468, 987, 434, 4467, 316...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 67, 7139, 13332, 2552, 25201, 55, 225, 468, 5098, 2103, 326, 666, 3647, 309, 486, 25201, 55, 353, 599, 30, 327, 25201, 55, 225, 25201, 55, 273, 2618, 225, 468, 987, 434, 4467, 316...
x = n / (12 * (1.0 + exp(acut * (r - rc))))
x = n / (12 * (1.0 + exp(self.acut * (r - rc))))
def initialize(self, atoms): self.par = {} self.rc = 0.0 self.numbers = atoms.get_atomic_numbers() for Z in self.numbers: if Z not in self.par: p = parameters[chemical_symbols[Z]] s0 = p[1] * Bohr eta2 = p[3] / Bohr kappa = p[4] / Bohr rc = beta * s0 * 0.5 * (sqrt(3) + sqrt(4)) x = eta2 * beta * s0 gamma1 = 0.0 gamma2 = 0.0 if p[7] == 'fcc': for i, n in enumerate([12, 6, 24, 12]): r = s0 * beta * sqrt(i + 1) x = n / (12 * (1.0 + exp(acut * (r - rc)))) gamma1 += x * exp(-eta2 * (r - beta * s0)) gamma2 += x * exp(-kappa / beta * (r - beta * s0)) elif p[7] == 'dimer': r = s0 * beta n = 1 x = n / (12 * (1.0 + exp(acut * (r - rc)))) gamma1 += x * exp(-eta2 * (r - beta * s0)) gamma2 += x * exp(-kappa / beta * (r - beta * s0)) else: raise RuntimeError self.par[Z] = {'E0': p[0], 's0': s0, 'V0': p[2], 'eta2': eta2, 'kappa': kappa, 'lambda': p[5] / Bohr, 'n0': p[6] / Bohr**3, 'rc': rc, 'gamma1': gamma1, 'gamma2': gamma2} if rc + 0.5 > self.rc: self.rc = rc + 0.5
c2b1a3b3bc98c0e223a5925d5cd6b9e26120a9af /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5572/c2b1a3b3bc98c0e223a5925d5cd6b9e26120a9af/emt.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4046, 12, 2890, 16, 9006, 4672, 365, 18, 1065, 273, 2618, 365, 18, 1310, 273, 374, 18, 20, 365, 18, 13851, 273, 9006, 18, 588, 67, 27718, 67, 13851, 1435, 364, 2285, 316, 365, 18, 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, 4046, 12, 2890, 16, 9006, 4672, 365, 18, 1065, 273, 2618, 365, 18, 1310, 273, 374, 18, 20, 365, 18, 13851, 273, 9006, 18, 588, 67, 27718, 67, 13851, 1435, 364, 2285, 316, 365, 18, 13...
query = '({query})[{position}]'.format(query=query, position=str(position))
query = u'({query})[{position}]'.format(query=query, position=str(position))
def _make_xpath_query(element_name, style=None, family=None, draw_name=None, draw_style=None, table_name=None, style_name=None, note_class=None, text_id=None, text_name=None, office_name=None, office_title=None, level=None, position=None, context=None, **kw): if context is None: query = ['//'] else: query = [] query.append(element_name) attributes = kw if style: attributes['text:style-name'] = style.encode('utf_8') if family: attributes['style:family'] = family if draw_name: attributes['draw:name'] = draw_name.encode('utf_8') if draw_style: attributes['draw:style-name'] = draw_style.encode('utf_8') if table_name: attributes['table:name'] = table_name.encode('utf_8') if style_name: attributes['style:name'] = style_name.encode('utf_8') if note_class: attributes['text:note-class'] = note_class if text_id: attributes['text:id'] = text_id if text_name: attributes['text:name'] = text_name.encode('utf_8') if office_name: attributes['office:name'] = office_name.encode('utf_8') if office_title: attributes['office:title'] = office_title.encode('utf_8') if level: attributes['text:outline-level'] = level # Sort attributes for reproducible test cases for qname in sorted(attributes): value = attributes[qname] if value is not None: query.append('[@{qname}="{value}"]'.format(qname=qname, value=str(value))) else: query.append('[@{qname}]'.format(qname=qname)) query = ''.join(query) if position is not None: query = '({query})[{position}]'.format(query=query, position=str(position)) return query
4c27701c7ddcd949feef6f24cae30ec972c89e61 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10612/4c27701c7ddcd949feef6f24cae30ec972c89e61/utils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 6540, 67, 18644, 67, 2271, 12, 2956, 67, 529, 16, 2154, 33, 7036, 16, 6755, 33, 7036, 16, 3724, 67, 529, 33, 7036, 16, 3724, 67, 4060, 33, 7036, 16, 1014, 67, 529, 33, 7036, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 6540, 67, 18644, 67, 2271, 12, 2956, 67, 529, 16, 2154, 33, 7036, 16, 6755, 33, 7036, 16, 3724, 67, 529, 33, 7036, 16, 3724, 67, 4060, 33, 7036, 16, 1014, 67, 529, 33, 7036, 1...
movfp st(0), ufp1
def macroop FST_P { movfp st(0), ufp1 rdip t7 stfp ufp1, seg, riprel, disp
e3fed881adcb3cc0a96acaf54cf14bae77e31983 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7385/e3fed881adcb3cc0a96acaf54cf14bae77e31983/load_or_store_floating_point.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11522, 556, 478, 882, 67, 52, 288, 9437, 625, 268, 27, 384, 7944, 582, 7944, 21, 16, 2291, 16, 436, 625, 2878, 16, 16232, 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, 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, 11522, 556, 478, 882, 67, 52, 288, 9437, 625, 268, 27, 384, 7944, 582, 7944, 21, 16, 2291, 16, 436, 625, 2878, 16, 16232, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
response += self._processAtom(li, sessionID)
response += self._processElement(li, sessionID)
def _processCondition(self, atom, sessionID): # Condition atoms come in three flavors. Each has different # attributes, and each handles their contents differently. attr = None response = "" try: attr = atom[1] except: if self._verboseMode: print "Missing attributes dict in _processCondition" return response # The simplest case is when the condition tag has both a # 'name' and a 'value' attribute. In this case, if the # predicate 'name' has the value 'value', then the contents of # the atom are processed and returned. if attr.has_key('name') and attr.has_key('value'): try: val = self.getPredicate(attr['name'], sessionID) if val == attr['value']: for a in atom[2:]: response += self._processAtom(a,sessionID) return response except: if self._verboseMode: print "Something amiss in condition/name/value" pass # If the condition atom has only a 'name' attribute, then its # contents are a series of <li> atoms, each of which has a # 'value' attribute. The list is scanned from top to bottom # until a match is found. Optionally, the last <li> atom can # have no 'value' attribute, in which case it is processed and # returned if no other match is found. # # If the condition atom has neither a 'name' nor a 'value' # attribute, then it behaves almost exactly like the previous # case, except that each <li> subatom (except the optional # last entry) must now include a 'name' attribute. else: try: name = None if attr.has_key('name'): name = attr['name'] # Get the list of <li> atoms listitems = [] for a in atom[2:]: if a[0] == 'li': listitems.append(a) # iterate through the list looking for a condition that # matches. foundMatch = False for li in listitems: try: liAttr = li[1] # if this is the last list item, it's allowed # to have no attributes. We just skip it for now. if len(liAttr.keys()) == 0 and li == listitems[-1]: continue # get the name of the predicate to test liName = name if liName == None: liName = liAttr['name'] # get the value to check against liValue = liAttr['value'] # do the test if self.getPredicate(liName, sessionID) == liValue: foundMatch = True response += self._processAtom(li,sessionID) break except: # No attributes, no name/value attributes, no # such predicate/session, or processing error. if self._verboseMode: print "Something amiss -- skipping listitem", li continue if not foundMatch: # Check the last element of listitems. If it has # no 'name' or 'value' attribute, process it. try: li = listitems[-1] liAttr = li[1] if not (liAttr.has_key('name') or liAttr.has_key('value')): response += self._processAtom(li, sessionID) except: # listitems was empty, no attributes, missing # name/value attributes, or processing error. if self._verboseMode: print "error in default listitem" pass except: # Some other catastrophic cataclysm if self._verboseMode: print "catastrophic condition failure" pass return response
cdb5ca51cf362e7f41cc166060e200bc84fcb1e8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6428/cdb5ca51cf362e7f41cc166060e200bc84fcb1e8/Kernel.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2567, 3418, 12, 2890, 16, 3179, 16, 13737, 4672, 468, 7949, 9006, 12404, 316, 8925, 31227, 1383, 18, 225, 8315, 711, 3775, 468, 1677, 16, 471, 1517, 7372, 3675, 2939, 23621, 18, 160...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2567, 3418, 12, 2890, 16, 3179, 16, 13737, 4672, 468, 7949, 9006, 12404, 316, 8925, 31227, 1383, 18, 225, 8315, 711, 3775, 468, 1677, 16, 471, 1517, 7372, 3675, 2939, 23621, 18, 160...
if self.conf.diskspacecheck == False:
if not self.conf.diskspacecheck:
def doTransaction(self): """takes care of package downloading, checking, user confirmation and actually RUNNING the transaction""" # just make sure there's not, well, nothing to do if len(self.tsInfo) == 0: self.verbose_logger.info(_('Trying to run the transaction but nothing to do. Exiting.')) return 1
b5e5671ffcb1e942e385155fe0d144ed2fb5992b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5445/b5e5671ffcb1e942e385155fe0d144ed2fb5992b/cli.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 3342, 12, 2890, 4672, 3536, 88, 3223, 7671, 434, 2181, 23742, 16, 6728, 16, 729, 14296, 471, 6013, 23574, 326, 2492, 8395, 225, 468, 2537, 1221, 3071, 1915, 1807, 486, 16, 5492, 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, 741, 3342, 12, 2890, 4672, 3536, 88, 3223, 7671, 434, 2181, 23742, 16, 6728, 16, 729, 14296, 471, 6013, 23574, 326, 2492, 8395, 225, 468, 2537, 1221, 3071, 1915, 1807, 486, 16, 5492, 16,...
outfile.write('content_ = [\n') for item_ in self.content_: item_.exportLiteral(outfile, level, name_) showIndent(outfile, level) outfile.write('],\n') showIndent(outfile, level) outfile.write('content_ = [\n') for item_ in self.content_: item_.exportLiteral(outfile, level, name_) showIndent(outfile, level) outfile.write('],\n') showIndent(outfile, level) outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))
outfile.write('row=[\n') level += 1 for row_ in self.row: showIndent(outfile, level) outfile.write('model_.AbstractObsRow(\n') row_.exportLiteral(outfile, level, name_='AbstractObsRow') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n') showIndent(outfile, level) outfile.write('set=[\n') level += 1 for set_ in self.set: showIndent(outfile, level) outfile.write('model_.RowSet(\n') set_.exportLiteral(outfile, level, name_='RowSet') showIndent(outfile, level) outfile.write('),\n') level -= 1 showIndent(outfile, level) outfile.write('],\n')
def exportLiteralChildren(self, outfile, level, name_): super(AbstractObsMatrix, self).exportLiteralChildren(outfile, level, name_) showIndent(outfile, level) outfile.write('content_ = [\n') for item_ in self.content_: item_.exportLiteral(outfile, level, name_) showIndent(outfile, level) outfile.write('],\n') showIndent(outfile, level) outfile.write('content_ = [\n') for item_ in self.content_: item_.exportLiteral(outfile, level, name_) showIndent(outfile, level) outfile.write('],\n') showIndent(outfile, level) outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))
9c12e50d449fa27d6f8f3415ece228ae97bb0266 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14016/9c12e50d449fa27d6f8f3415ece228ae97bb0266/_nexml.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3359, 6177, 4212, 12, 2890, 16, 8756, 16, 1801, 16, 508, 67, 4672, 2240, 12, 7469, 27637, 4635, 16, 365, 2934, 6530, 6177, 4212, 12, 26050, 16, 1801, 16, 508, 67, 13, 2405, 7790, 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, 3359, 6177, 4212, 12, 2890, 16, 8756, 16, 1801, 16, 508, 67, 4672, 2240, 12, 7469, 27637, 4635, 16, 365, 2934, 6530, 6177, 4212, 12, 26050, 16, 1801, 16, 508, 67, 13, 2405, 7790, 12, ...
nodes[sob.UID()] = target
nodes[sob.UID()] = source
def local_refernece_graph(inst): nodes = {} graphs = { 'forward' : {}, 'backward' : {}, } rc = inst.reference_catalog references = rc.getReferences(inst) back_references = rc.getBackReferences(inst) node = Node(inst) nodes[inst.UID()] = node for ref in references: tob = ref.getTargetObject() target = Node(tob) if tob.UID() not in nodes: nodes[tob.UID()] = target e = Edge(node, target, ref) graphs['forward'].setdefault(ref.relationship, []).append(e) for ref in back_references: sob = ref.getSourceObject() source = Node(sob) if sob.UID() not in nodes: nodes[sob.UID()] = target e = Edge(source, node, ref) graphs['backward'].setdefault(ref.relationship, []).append(e) return graphs
2dd0d859a87f1867395b16320651a696b09cdbda /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12165/2dd0d859a87f1867395b16320651a696b09cdbda/ref_graph.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1191, 67, 266, 586, 4644, 311, 67, 4660, 12, 8591, 4672, 2199, 225, 273, 2618, 19422, 273, 288, 296, 11565, 11, 294, 10615, 296, 29275, 11, 294, 10615, 289, 225, 4519, 273, 1804, 18, 6...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1191, 67, 266, 586, 4644, 311, 67, 4660, 12, 8591, 4672, 2199, 225, 273, 2618, 19422, 273, 288, 296, 11565, 11, 294, 10615, 296, 29275, 11, 294, 10615, 289, 225, 4519, 273, 1804, 18, 6...
"""
"""
def flimage_convert(pImage, p2, p3): """ flimage_convert(pImage, p2, p3) -> num. """ retval = _flimage_convert(pImage, p2, p3) return retval
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, 6283, 12, 84, 2040, 16, 293, 22, 16, 293, 23, 4672, 3536, 1183, 2730, 67, 6283, 12, 84, 2040, 16, 293, 22, 16, 293, 23, 13, 317, 818, 18, 3536, 225, 5221, 273, 389,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1183, 2730, 67, 6283, 12, 84, 2040, 16, 293, 22, 16, 293, 23, 4672, 3536, 1183, 2730, 67, 6283, 12, 84, 2040, 16, 293, 22, 16, 293, 23, 13, 317, 818, 18, 3536, 225, 5221, 273, 389,...
if self._pos: new_pos = {} for v in perm.iterkeys(): try: new_pos[perm[v]] = self._pos[v] except KeyError: pass self._pos = new_pos
attributes_to_update = ('_pos', '_assoc', '_embedding') for attr in attributes_to_update: if hasattr(self, attr) and getattr(self, attr) is not None: new_attr = {} for v,value in getattr(self, attr).iteritems(): new_attr[perm[v]] = value setattr(self, attr, new_attr)
def relabel(self, perm=None, inplace=True, return_map=False): r""" Uses a dictionary, list, or permutation to relabel the (di)graph. If perm is a dictionary d, each old vertex v is a key in the dictionary, and its new label is d[v].
4dc618e9fc2af20a2ac3fcc7082dc9f20b69def7 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/4dc618e9fc2af20a2ac3fcc7082dc9f20b69def7/graph.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1279, 873, 12, 2890, 16, 4641, 33, 7036, 16, 11783, 33, 5510, 16, 327, 67, 1458, 33, 8381, 4672, 436, 8395, 14854, 279, 3880, 16, 666, 16, 578, 17440, 358, 1279, 873, 326, 261, 3211, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1279, 873, 12, 2890, 16, 4641, 33, 7036, 16, 11783, 33, 5510, 16, 327, 67, 1458, 33, 8381, 4672, 436, 8395, 14854, 279, 3880, 16, 666, 16, 578, 17440, 358, 1279, 873, 326, 261, 3211, ...
return masked_array(self._data.real, mask=self._mask.ravel(),
return masked_array(self._data.real, mask=self._mask,
def _get_real(self): "Get the real part of a complex array." if self._mask is nomask: return masked_array(self._data.real, mask=nomask, fill_value = self.fill_value()) else: return masked_array(self._data.real, mask=self._mask.ravel(), fill_value = self.fill_value())
543e764f6f0b05c38f460aeae9036dc2e6be2f2b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14925/543e764f6f0b05c38f460aeae9036dc2e6be2f2b/ma.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 7688, 12, 2890, 4672, 315, 967, 326, 2863, 1087, 434, 279, 7233, 526, 1199, 309, 365, 6315, 4455, 353, 12457, 835, 30, 327, 13196, 67, 1126, 12, 2890, 6315, 892, 18, 7688...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 588, 67, 7688, 12, 2890, 4672, 315, 967, 326, 2863, 1087, 434, 279, 7233, 526, 1199, 309, 365, 6315, 4455, 353, 12457, 835, 30, 327, 13196, 67, 1126, 12, 2890, 6315, 892, 18, 7688...
"""rend(self) -> const_reverse_iterator"""
""" rend(self) -> reverse_iterator rend(self) -> const_reverse_iterator """
def rend(*args): """rend(self) -> const_reverse_iterator""" return _moose.uint_vector_rend(*args)
a30e1b85be87f4bb65146e5509e165b2cf26068d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2961/a30e1b85be87f4bb65146e5509e165b2cf26068d/moose.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1654, 72, 30857, 1968, 4672, 3536, 1654, 72, 12, 2890, 13, 317, 4219, 67, 9838, 1654, 72, 12, 2890, 13, 317, 1866, 67, 9845, 67, 9838, 3536, 327, 389, 8683, 2584, 18, 11890, 67, 7737, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1654, 72, 30857, 1968, 4672, 3536, 1654, 72, 12, 2890, 13, 317, 4219, 67, 9838, 1654, 72, 12, 2890, 13, 317, 1866, 67, 9845, 67, 9838, 3536, 327, 389, 8683, 2584, 18, 11890, 67, 7737, ...
Dav.DAV(url).put(itemCollection)
try: Dav.DAV(url).put(itemCollection) except: itemCollection.displayName = originalName raise
def ShareCollection (self, itemCollection): """ Share an ItemCollection. Called by ItemCollection.shareSend(), when the Notify button is pressed in the itemCollection's Detail View. """ # commit changes, since we'll be switching to Twisted thread self.RepositoryCommitWithStatus()
ee16e3a0a8ffd1bf9d95b2fc7d6ebec91cf2a089 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/ee16e3a0a8ffd1bf9d95b2fc7d6ebec91cf2a089/Main.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 25805, 2532, 261, 2890, 16, 761, 2532, 4672, 3536, 25805, 392, 4342, 2532, 18, 11782, 635, 4342, 2532, 18, 14419, 3826, 9334, 1347, 326, 10918, 3568, 353, 19504, 316, 326, 761, 2532, 1807,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 25805, 2532, 261, 2890, 16, 761, 2532, 4672, 3536, 25805, 392, 4342, 2532, 18, 11782, 635, 4342, 2532, 18, 14419, 3826, 9334, 1347, 326, 10918, 3568, 353, 19504, 316, 326, 761, 2532, 1807,...
print 'importernm', importernm
debug('importernm %s' % importernm)
def importHook(self, name, globals=None, locals=None, fromlist=None, level=-1): # first see if we could be importing a relative name #print "importHook(%s, %s, locals, %s)" % (name, getattr(globals, '__name__', None), fromlist) _sys_modules_get = sys.modules.get _self_doimport = self.doimport threaded = self.threaded
a9e95ad57cf9a0d8fb32c1e84cc88fafcd308461 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11925/a9e95ad57cf9a0d8fb32c1e84cc88fafcd308461/iu.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1930, 5394, 12, 2890, 16, 508, 16, 10941, 33, 7036, 16, 8985, 33, 7036, 16, 628, 1098, 33, 7036, 16, 1801, 29711, 21, 4672, 468, 1122, 2621, 309, 732, 3377, 506, 25077, 279, 3632, 508,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1930, 5394, 12, 2890, 16, 508, 16, 10941, 33, 7036, 16, 8985, 33, 7036, 16, 628, 1098, 33, 7036, 16, 1801, 29711, 21, 4672, 468, 1122, 2621, 309, 732, 3377, 506, 25077, 279, 3632, 508,...
item.location_name = e['x-calconnect-street'] item.item_date = datetime.datetime.strptime(e.dtstart, "%Y-%m-%d %H:%M:%S +0000")
item.item_date = datetime.datetime(*e.updated_parsed[:6])
def main(argv=None): url = 'http://calendar.boston.com/search?acat=&cat=&commit=Search&new=n&rss=1&search=true&sort=0&srad=20&srss=50&ssrss=5&st=event&st_select=any&svt=text&swhat=&swhen=today&swhere=&trim=1' schema = 'events' try: schema = Schema.objects.get(slug=schema) except Schema.DoesNotExist: print "Schema (%s): DoesNotExist" % schema sys.exit(0) f = feedparser.parse(url) geocoder = SmartGeocoder() for e in f.entries: try: item = NewsItem.objects.get(title=e.title, description=e.description) except NewsItem.DoesNotExist: item = NewsItem() item.schema = schema item.title = e.title item.description = e.description item.url = e.link item.location_name = e['x-calconnect-street'] item.item_date = datetime.datetime.strptime(e.dtstart, "%Y-%m-%d %H:%M:%S +0000") item.pub_date = datetime.datetime(*e.updated_parsed[:6]) try: add = geocoder.geocode(item.location_name) item.location = add['point'] item.block = add['block'] except: pass item.save() print "Added: %s" % item.title
66766fe0d86caeee8131276221d8f8b09ce87754 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10327/66766fe0d86caeee8131276221d8f8b09ce87754/add_events.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 19485, 33, 7036, 4672, 880, 273, 296, 2505, 2207, 11650, 18, 70, 669, 265, 18, 832, 19, 3072, 35, 1077, 270, 33, 10, 2574, 33, 10, 7371, 33, 2979, 10, 2704, 33, 82, 10, 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, 2774, 12, 19485, 33, 7036, 4672, 880, 273, 296, 2505, 2207, 11650, 18, 70, 669, 265, 18, 832, 19, 3072, 35, 1077, 270, 33, 10, 2574, 33, 10, 7371, 33, 2979, 10, 2704, 33, 82, 10, 2...
assert v == cleartext
assert v == self.cleartext
def _check_6_decryptVerify(self): s = SMIME.SMIME() s.load_key('recipient_key.pem', 'recipient.pem') # XXX Bug not enough data? p7, data = SMIME.smime_load_pkcs7_bio(signedEncrypted) out = s.decrypt(p7) x509 = X509.load_cert('signer.pem') sk = X509.X509_Stack() sk.push(x509) s.set_x509_stack(sk) st = X509.X509_Store() st.load_info('signer.pem') s.set_x509_store(st) p7_bio = BIO.MemoryBuffer(out) p7, data = SMIME.smime_load_pkcs7_bio(p7_bio) v = s.verify(p7) assert v == cleartext
8d88bcc39abdc6db218e3a485dc691c215692d64 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8055/8d88bcc39abdc6db218e3a485dc691c215692d64/test_smime.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1893, 67, 26, 67, 19790, 8097, 12, 2890, 4672, 272, 273, 12014, 3114, 18, 7303, 3114, 1435, 225, 272, 18, 945, 67, 856, 2668, 20367, 67, 856, 18, 20313, 2187, 296, 20367, 18, 2031...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1893, 67, 26, 67, 19790, 8097, 12, 2890, 4672, 272, 273, 12014, 3114, 18, 7303, 3114, 1435, 225, 272, 18, 945, 67, 856, 2668, 20367, 67, 856, 18, 20313, 2187, 296, 20367, 18, 2031...
return self._imported._all.queries
return self._imported.own.queries
def queries(self): if not self._imported: raise UnreachableImportError(self._id) return self._imported._all.queries
46078d9a93aa41d0d58630f0427916f90830a36b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11977/46078d9a93aa41d0d58630f0427916f90830a36b/import_.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6218, 12, 2890, 4672, 309, 486, 365, 6315, 29266, 30, 1002, 1351, 17246, 5010, 668, 12, 2890, 6315, 350, 13, 327, 365, 6315, 29266, 6315, 454, 18, 13748, 2, 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, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6218, 12, 2890, 4672, 309, 486, 365, 6315, 29266, 30, 1002, 1351, 17246, 5010, 668, 12, 2890, 6315, 350, 13, 327, 365, 6315, 29266, 6315, 454, 18, 13748, 2, -100, -100, -100, -100, -100,...
[compile.In(rng_R, value=numpy.random.RandomState(55), update=post_r, mutable=True)],
[compile.In(rng_R, value=numpy.random.RandomState(utt.fetch_seed()), update=post_r, mutable=True)],
def test_uniform(self): """Test that raw_random.uniform generates the same results as numpy.""" # Check over two calls to see if the random state is correctly updated. rng_R = random_state_type() # Use non-default parameters post_r, out = uniform(rng_R, (4,), -2.0, 2.0)
d5701303093e5943cc4df89bc18c7fecc19b0be2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12438/d5701303093e5943cc4df89bc18c7fecc19b0be2/test_raw_random.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 24120, 12, 2890, 4672, 3536, 4709, 716, 1831, 67, 9188, 18, 24120, 6026, 326, 1967, 1686, 487, 3972, 12123, 468, 2073, 1879, 2795, 4097, 358, 2621, 309, 326, 2744, 919, 353, 87...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 24120, 12, 2890, 4672, 3536, 4709, 716, 1831, 67, 9188, 18, 24120, 6026, 326, 1967, 1686, 487, 3972, 12123, 468, 2073, 1879, 2795, 4097, 358, 2621, 309, 326, 2744, 919, 353, 87...
gump.addButton( 190, 340, 0xF3, 0xF1, -1 )
gump.addButton( 190, 340, 0xF3, 0xF1, 0 )
def charinfo( socket, char ): if not char or not socket: return page_ = 0 pages = 0 if char.npc: pages = 5 else: pages = 5 gump = cGump( 0, 0, 0, 0, 40 ) gump.setCallback( "commands.info.charinfo_response" ) gump.setArgs( [char] ) gump.startPage( page_ ) gump.addResizeGump( 0, 40, 0xA28, 450, 350 ) # Background gump.addGump( 105, 18, 0x58B ) # Fancy top-bar gump.addGump( 182, 0, 0x589 ) # "Button" like gump
16d943fd0e5ebca2889aa24e812f754ff243f756 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/16d943fd0e5ebca2889aa24e812f754ff243f756/info.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1149, 1376, 12, 2987, 16, 1149, 262, 30, 309, 486, 1149, 578, 486, 2987, 30, 327, 225, 1363, 67, 273, 374, 4689, 273, 374, 309, 1149, 18, 82, 2436, 30, 4689, 273, 1381, 469, 30, 4689...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1149, 1376, 12, 2987, 16, 1149, 262, 30, 309, 486, 1149, 578, 486, 2987, 30, 327, 225, 1363, 67, 273, 374, 4689, 273, 374, 309, 1149, 18, 82, 2436, 30, 4689, 273, 1381, 469, 30, 4689...
Integral Homology of Jacobian of the modular curve associated to the congruence subgroup Gamma1(17)
Integral Homology of Abelian variety J1(17) of dimension 5
def integral_homology(self): """ Return the integral homology of this modular abelian variety.
231a556974015ed454b20c5783447e82495d8183 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/231a556974015ed454b20c5783447e82495d8183/abvar.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 21423, 67, 17125, 4676, 12, 2890, 4672, 3536, 2000, 326, 21423, 13995, 4676, 434, 333, 681, 2490, 1223, 292, 2779, 1394, 14369, 18, 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, 0, 0, 0, 0, 0, 0, 0, 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, 21423, 67, 17125, 4676, 12, 2890, 4672, 3536, 2000, 326, 21423, 13995, 4676, 434, 333, 681, 2490, 1223, 292, 2779, 1394, 14369, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
raise RuntimeError("could not find path to PyCUDA's C header files")
raise RuntimeError("could not find path to PyCUDA's C" " header files, searched in : %s" % '\n'.join(possible_include_paths))
def _find_pycuda_include_path(): from imp import find_module file, pathname, descr = find_module("pycuda") # Who knew Python installation is so uniform and predictable? from os.path import join, exists possible_include_paths = [ join(pathname, "..", "include", "pycuda"), join(pathname, "..", "src", "cuda"), join(pathname, "..", "..", "..", "src", "cuda"), join(pathname, "..", "..", "..", "..", "include", "pycuda") ] import sys if sys.platform == "linux2": possible_include_paths.extend([ join(sys.prefix, "include" , "pycuda"), "/usr/include/pycuda", "/usr/local/include/pycuda" ]) for inc_path in possible_include_paths: if exists(inc_path): return inc_path raise RuntimeError("could not find path to PyCUDA's C header files")
6fbf2a5a0527866552d2461c46ed3a0a3dd45f94 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12870/6fbf2a5a0527866552d2461c46ed3a0a3dd45f94/compiler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4720, 67, 2074, 71, 13177, 67, 6702, 67, 803, 13332, 628, 1646, 1930, 1104, 67, 2978, 585, 16, 9806, 16, 18426, 273, 1104, 67, 2978, 2932, 2074, 71, 13177, 7923, 225, 468, 3497, 8...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4720, 67, 2074, 71, 13177, 67, 6702, 67, 803, 13332, 628, 1646, 1930, 1104, 67, 2978, 585, 16, 9806, 16, 18426, 273, 1104, 67, 2978, 2932, 2074, 71, 13177, 7923, 225, 468, 3497, 8...
return QVariant(f)
return QVariant(f)
def data(self, index, role=Qt.DisplayRole): row = index.row() if not index.isValid() or not (0 <= row < len(self.taginfo)): return QVariant() if (role == Qt.DisplayRole) or (role == Qt.ToolTipRole) or (role == Qt.EditRole): try: audio = self.taginfo[row] tag = self.headerdata[index.column()][1] if tag in audio.testData: val = audio.testData[tag] else: val = audio[tag]
aae085cf81bdbfdd423ed9d4edf1ae50a76468fc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3907/aae085cf81bdbfdd423ed9d4edf1ae50a76468fc/tagmodel.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 501, 12, 2890, 16, 770, 16, 2478, 33, 23310, 18, 4236, 2996, 4672, 1027, 273, 770, 18, 492, 1435, 309, 486, 770, 18, 26810, 1435, 578, 486, 261, 20, 1648, 1027, 411, 562, 12, 2890, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 501, 12, 2890, 16, 770, 16, 2478, 33, 23310, 18, 4236, 2996, 4672, 1027, 273, 770, 18, 492, 1435, 309, 486, 770, 18, 26810, 1435, 578, 486, 261, 20, 1648, 1027, 411, 562, 12, 2890, 1...
logging.info('UpdateStatsCache: category=%s, browsers=%s', category, browsers_str)
compressed_browsers_str = request.REQUEST.get('zbrowsers')
def UpdateStatsCache(request): """Load rankers into memcache.""" category = request.REQUEST.get('category') browsers_str = request.REQUEST.get('browsers') logging.info('UpdateStatsCache: category=%s, browsers=%s', category, browsers_str) if not category: logging.info('UpdateStatsCache: Must set category') return http.HttpResponseServerError('Must set "category".') if not browsers_str: logging.info('UpdateStatsCache: Must set browsers.') return http.HttpResponseServerError('Must set "browsers" ' '(comma-separated list).') browsers = browsers_str.split(',') result_stats.CategoryStatsManager.UpdateStatsCache(category, browsers) return http.HttpResponse('Success.')
164c2b3f66ae57390881a2faab3e77b13e7343bc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5745/164c2b3f66ae57390881a2faab3e77b13e7343bc/admin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2315, 4195, 1649, 12, 2293, 4672, 3536, 2563, 6171, 414, 1368, 20549, 12123, 3150, 273, 590, 18, 5519, 18, 588, 2668, 4743, 6134, 14993, 67, 701, 273, 590, 18, 5519, 18, 588, 2668, 70, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2315, 4195, 1649, 12, 2293, 4672, 3536, 2563, 6171, 414, 1368, 20549, 12123, 3150, 273, 590, 18, 5519, 18, 588, 2668, 4743, 6134, 14993, 67, 701, 273, 590, 18, 5519, 18, 588, 2668, 70, ...
while 1:
while True:
def _do_cmp(f1, f2): bufsize = BUFSIZE fp1 = open(f1, 'rb') fp2 = open(f2, 'rb') while 1: b1 = fp1.read(bufsize) b2 = fp2.read(bufsize) if b1 != b2: return 0 if not b1: return 1
05595e9d73b2c05fcd9492cf8f5d126282b82053 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/05595e9d73b2c05fcd9492cf8f5d126282b82053/filecmp.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2896, 67, 9625, 12, 74, 21, 16, 284, 22, 4672, 1681, 1467, 273, 10937, 42, 4574, 4253, 21, 273, 1696, 12, 74, 21, 16, 296, 6731, 6134, 4253, 22, 273, 1696, 12, 74, 22, 16, 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, 389, 2896, 67, 9625, 12, 74, 21, 16, 284, 22, 4672, 1681, 1467, 273, 10937, 42, 4574, 4253, 21, 273, 1696, 12, 74, 21, 16, 296, 6731, 6134, 4253, 22, 273, 1696, 12, 74, 22, 16, 296...
duration = int(prog.stop - now - 10)
duration = int((prog.stop + config.RECORD_PADDING ) - now - 10)
def checkToRecord(self): if DEBUG: log.debug('in checkToRecord') rec_cmd = None rec_prog = None cleaned = None scheduledRecordings = self.getScheduledRecordings()
f79c81409fa066f1fd35ff211636eb7c2c76f741 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/f79c81409fa066f1fd35ff211636eb7c2c76f741/recordserver.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 774, 2115, 12, 2890, 4672, 309, 6369, 30, 613, 18, 4148, 2668, 267, 866, 774, 2115, 6134, 1950, 67, 4172, 273, 599, 1950, 67, 14654, 273, 599, 9426, 273, 599, 9755, 2115, 899, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 774, 2115, 12, 2890, 4672, 309, 6369, 30, 613, 18, 4148, 2668, 267, 866, 774, 2115, 6134, 1950, 67, 4172, 273, 599, 1950, 67, 14654, 273, 599, 9426, 273, 599, 9755, 2115, 899, 273...
partner_id, date_order=date_order)
partner_id, date_order=date_order,fiscal_position=fiscal_position)
def product_uom_change(self, cr, uid, ids, pricelist, product, qty, uom, partner_id, date_order=False): res = self.product_id_change(cr, uid, ids, pricelist, product, qty, uom, partner_id, date_order=date_order) if 'product_uom' in res['value']: del res['value']['product_uom'] if not uom: res['value']['price_unit'] = 0.0 return res
a1af6dc8c94fbcdad05d26ff9277ad4a8a1027d3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/a1af6dc8c94fbcdad05d26ff9277ad4a8a1027d3/purchase.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3017, 67, 89, 362, 67, 3427, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 846, 335, 5449, 16, 3017, 16, 26667, 16, 582, 362, 16, 19170, 67, 350, 16, 1509, 67, 1019, 33, 8381, 4672, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3017, 67, 89, 362, 67, 3427, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 846, 335, 5449, 16, 3017, 16, 26667, 16, 582, 362, 16, 19170, 67, 350, 16, 1509, 67, 1019, 33, 8381, 4672, ...
""" Import a list of classes. """
"""Import a list of classes."""
def _import_classes(self, class_names, currmodule): """ Import a list of classes. """ classes = [] for name in class_names: classes.extend(self._import_class_or_module(name, currmodule)) return classes
b90ca05941e1fd53e0d69ced376e466dab659f67 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5532/b90ca05941e1fd53e0d69ced376e466dab659f67/inheritance_diagram.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5666, 67, 4701, 12, 2890, 16, 667, 67, 1973, 16, 4306, 2978, 4672, 3536, 5010, 279, 666, 434, 3318, 12123, 3318, 273, 5378, 364, 508, 316, 667, 67, 1973, 30, 3318, 18, 14313, 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, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5666, 67, 4701, 12, 2890, 16, 667, 67, 1973, 16, 4306, 2978, 4672, 3536, 5010, 279, 666, 434, 3318, 12123, 3318, 273, 5378, 364, 508, 316, 667, 67, 1973, 30, 3318, 18, 14313, 12, ...
parser.add_option("-v", "--verbose", action="store_true", dest="verbose",
optgrp.add_option("-v", "--verbose", action="store_true", dest="verbose",
def clush_main(args): """Main clush script function""" # Default values nodeset_base, nodeset_exclude = NodeSet(), NodeSet() # # Argument management # usage = "%prog [options] command" parser = optparse.OptionParser(usage, version="%%prog %s" % version) parser.disable_interspersed_args() # Node selections optgrp = optparse.OptionGroup(parser, "Selecting target nodes") optgrp.add_option("-w", action="store", dest="nodes", help="nodes where to run the command") optgrp.add_option("-x", action="store", dest="exclude", help="exclude nodes from the node list") optgrp.add_option("-a", "--all", action="store_true", dest="nodes_all", help="run command on all nodes") optgrp.add_option("-g", "--group", action="store", dest="group", help="run command on a group of nodes") parser.add_option_group(optgrp) parser.add_option("-q", "--quiet", action="store_true", dest="quiet", help="be quiet, print essential output only") parser.add_option("-v", "--verbose", action="store_true", dest="verbose", help="be verbose, print informative messages") parser.add_option("-d", "--debug", action="store_true", dest="debug", help="output more messages for debugging purpose") parser.add_option("-N", action="store_false", dest="label", default=True, help="disable labeling of command line") parser.add_option("-l", "--user", action="store", dest="user", help="execute remote command as user") parser.add_option("-S", action="store_true", dest="maxrc", help="return the largest of command return codes") parser.add_option("-b", "--dshbak", action="store_true", dest="gather", help="display results in a dshbak-like way") # Copy parser.add_option("-c", "--copy", action="store", dest="source_path", help="copy local file or directory to the nodes") parser.add_option("--dest", action="store", dest="dest_path", help="destination file or directory on the nodes") parser.add_option("-f", "--fanout", action="store", dest="fanout", help="use a specified fanout", type="int") # Timeouts parser.add_option("-t", "--connect_timeout", action="store", dest="connect_timeout", help="limit time to connect to a node" ,type="int") parser.add_option("-u", "--command_timeout", action="store", dest="command_timeout", help="limit time for command to run on the node", type="int") (options, args) = parser.parse_args() # # Load config file # config = ClushConfig(options) # Apply command line overrides if options.quiet: config.set_main("verbosity", VERB_QUIET) if options.verbose: config.set_main("verbosity", VERB_VERB) if options.debug: config.set_main("verbosity", VERB_DEBUG) if options.fanout: config.set_main("fanout", overrides.fanout) if options.user: self.set_main("ssh_user", overrides.user) if options.connect_timeout: self.set_main("connect_timeout", overrides.connect_timeout) if options.command_timeout: self.set_main("command_timeout", overrides.command_timeout) # # Compute the nodeset # nodeset_base = NodeSet(options.nodes) nodeset_exclude = NodeSet(options.exclude) # Do we have nodes group? task = task_self() task.set_info("debug", config.get_verbosity() > 1) if options.nodes_all: command = config.get_nodes_all_command() task.shell(command, key="all") if options.group: command = config.get_nodes_group_command(options.group) task.shell(command, key="group") # Run needed external commands task.resume() for buf, keys in task.iter_buffers(): for line in buf.splitlines(): config.verbose_print(DEBUG, "Nodes from option %s: %s" % (','.join(keys), buf)) nodeset_base.add(line) # Do we have an exclude list? (-x ...) nodeset_base.difference_update(nodeset_exclude) if len(nodeset_base) < 1: parser.error('No node to run on.') config.verbose_print(VERB_DEBUG, "Final NodeSet is %s" % nodeset_base) # # Task management # stdin_isatty = sys.stdin.isatty() if stdin_isatty: # Standard input is a terminal and we want to perform some user # interactions in the main thread (using blocking calls), so # we run cluster commands in a new ClusterShell Task (a new # thread is created). task = Task() signal.signal(signal.SIGHUP, signal_handler) task.set_info("USER_handle_SIGHUP", True) else: # Perform everything in main thread. task.set_info("USER_handle_SIGHUP", False) timeout = 0 task.set_info("debug", config.get_verbosity() >= VERB_DEBUG) task.set_info("fanout", config.get_fanout() * 2) ssh_user = config.get_ssh_user() if ssh_user: task.set_info("ssh_user", ssh_user) ssh_path = config.get_ssh_path() if ssh_path: task.set_info("ssh_path", ssh_path) ssh_options = config.get_ssh_options() if ssh_options: task.set_info("ssh_options", ssh_options) connect_timeout = config.get_connect_timeout() task.set_info("connect_timeout", connect_timeout) timeout += connect_timeout command_timeout = config.get_command_timeout() task.set_info("command_timeout", command_timeout) if connect_timeout < 1e-3 or command_timeout < 1e-3: timeout = 0 else: timeout += command_timeout # Configure custom task related status task.set_info("USER_interactive", len(args) == 0 and not options.source_path) task.set_info("USER_running", False) if options.source_path and not options.dest_path: options.dest_path = options.source_path if options.source_path: if not options.dest_path: options.dest_path = options.source_path op = "copy source=%s dest=%s" % (options.source_path, options.dest_path) else: op = "command=\"%s\"" % ' '.join(args) config.verbose_print(VERB_VERB, "clush: nodeset=%s fanout=%d [timeout conn=%d " \ "cmd=%d] %s" % (nodeset_base, task.info("fanout")/2, task.info("connect_timeout"), task.info("command_timeout"), op)) if not task.info("USER_interactive"): if options.source_path: if not options.dest_path: options.dest_path = options.source_path run_copy(task, options.source_path, options.dest_path, nodeset_base, 0) else: run_command(task, ' '.join(args), nodeset_base, options.gather, timeout, options.label, config.get_verbosity()) if stdin_isatty: ttyloop(task, nodeset_base, options.gather, timeout, options.label, config.get_verbosity()) elif task.info("USER_interactive"): print >>sys.stderr, "ERROR: interactive mode requires a tty" os_.exit(1) # return the command retcode if options.maxrc: os._exit(task.max_retcode()) # return clush retcode else: os._exit(0)
96d07ce6e79c549159c502f12c931c42463ef2de /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11479/96d07ce6e79c549159c502f12c931c42463ef2de/clush.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 927, 1218, 67, 5254, 12, 1968, 4672, 3536, 6376, 927, 1218, 2728, 445, 8395, 225, 468, 2989, 924, 2199, 278, 67, 1969, 16, 2199, 278, 67, 10157, 273, 2029, 694, 9334, 2029, 694, 1435, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 927, 1218, 67, 5254, 12, 1968, 4672, 3536, 6376, 927, 1218, 2728, 445, 8395, 225, 468, 2989, 924, 2199, 278, 67, 1969, 16, 2199, 278, 67, 10157, 273, 2029, 694, 9334, 2029, 694, 1435, ...
ns, name, full = namespace.splitname(name, namespace.NS_TEMPLATE)
ns, name, full = namespace.splitname(name, namespace.NS_TEMPLATE)
def getTemplate(self, name, followRedirects=True): ns, name, full = namespace.splitname(name, namespace.NS_TEMPLATE) if ns!=namespace.NS_TEMPLATE: return self.getRawArticle(full) try: result = nget(self.templates,name)['content'] if isinstance(result, str): # fix bug in some simplejson version w/ Python 2.4 return unicode(result, 'utf-8') return result except KeyError: pass return None
e961541f4f36fc7c2fdd836ee28abf90ccab0204 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12391/e961541f4f36fc7c2fdd836ee28abf90ccab0204/zipwiki.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10646, 12, 2890, 16, 508, 16, 2805, 21978, 33, 5510, 4672, 3153, 16, 508, 16, 1983, 273, 1981, 18, 4939, 529, 12, 529, 16, 1981, 18, 3156, 67, 12205, 13, 309, 3153, 5, 33, 4937, 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, 10646, 12, 2890, 16, 508, 16, 2805, 21978, 33, 5510, 4672, 3153, 16, 508, 16, 1983, 273, 1981, 18, 4939, 529, 12, 529, 16, 1981, 18, 3156, 67, 12205, 13, 309, 3153, 5, 33, 4937, 18, ...
"""
"""
def flimage_rotate(p1, p2, p3): """ flimage_rotate(p1, p2, p3) -> num. """ retval = _flimage_rotate(p1, p2, p3) return retval
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, 20342, 12, 84, 21, 16, 293, 22, 16, 293, 23, 4672, 3536, 1183, 2730, 67, 20342, 12, 84, 21, 16, 293, 22, 16, 293, 23, 13, 317, 818, 18, 3536, 225, 5221, 273, 389, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1183, 2730, 67, 20342, 12, 84, 21, 16, 293, 22, 16, 293, 23, 4672, 3536, 1183, 2730, 67, 20342, 12, 84, 21, 16, 293, 22, 16, 293, 23, 13, 317, 818, 18, 3536, 225, 5221, 273, 389, ...
filterOperator = 'OR'
filterOperator = _('or')
def advanced_search(request): # default values of a filter filterName = _('My filter') filterOperator = 'OR' conditionsList = [] try: filterName = request.session['filter_name'] filterOperator = request.session['filter_operator'] conditionsList = request.session['criteria'] except KeyError: pass request.session['filter_name'] = filterName request.session['filter_operator'] = filterOperator request.session['criteria'] = conditionsList ain7members = False if request.method == 'POST': ain7members = sessionSearch(request, request.session['criteria']) return ain7_render_to_response(request, 'annuaire/adv_search.html', {'ain7members': ain7members, 'searchFilter': None, 'conditionsList': conditionsList, 'filterName': filterName, 'filterOperator': filterOperator})
0f01717a4a0003f14d18b8df5a9f44726d7f1ca5 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5417/0f01717a4a0003f14d18b8df5a9f44726d7f1ca5/views.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 16111, 67, 3072, 12, 2293, 4672, 225, 468, 805, 924, 434, 279, 1034, 25469, 273, 389, 2668, 12062, 1034, 6134, 1034, 5592, 273, 389, 2668, 280, 6134, 4636, 682, 273, 5378, 775, 30, 25469...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 16111, 67, 3072, 12, 2293, 4672, 225, 468, 805, 924, 434, 279, 1034, 25469, 273, 389, 2668, 12062, 1034, 6134, 1034, 5592, 273, 389, 2668, 280, 6134, 4636, 682, 273, 5378, 775, 30, 25469...
removeLayout.addWidget(self.removeButton)
removeLayout.addWidget(self.helixRemoveButton)
def setupHelixTab(self): #These go in the Helix tab self.modifyRadioButton = QtGui.QRadioButton(self.tr('Modify')) self.newRadioButtion = QtGui.QRadioButton(self.tr('New')) NterminusLabel = QtGui.QLabel('N term') self.NtermResNameLabel = QtGui.QLabel('?') self.NtermSpinBox = QtGui.QSpinBox() self.NtermSpinBox.setRange(1, 10000) CterminusLabel = QtGui.QLabel('C term') self.CtermResNameLabel = QtGui.QLabel('?') self.CtermSpinBox = QtGui.QSpinBox() self.CtermSpinBox.setRange(1, 10000) self.decreasePositionButton = QtGui.QPushButton('-') self.decreasePositionButton.setMaximumWidth(30) positionLabel = QtGui.QLabel(self.tr('Position')) self.increasePositionButton = QtGui.QPushButton('+') self.increasePositionButton.setMaximumWidth(30) self.createCAHelixButton = QtGui.QPushButton(self.tr('Create C-alpha Helix')) self.removeButton = QtGui.QPushButton(self.tr('Remove')) self.flipButton = QtGui.QPushButton(self.tr('Flip')) radioLayout = QtGui.QHBoxLayout() radioLayout.addWidget(self.modifyRadioButton) radioLayout.addWidget(self.newRadioButtion) radioLayout.addStretch() NtermLayout = QtGui.QHBoxLayout() NtermLayout.addWidget(NterminusLabel) NtermLayout.addWidget(self.NtermResNameLabel) NtermLayout.addWidget(self.NtermSpinBox) NtermLayout.addStretch() CtermLayout = QtGui.QHBoxLayout() CtermLayout.addWidget(CterminusLabel) CtermLayout.addWidget(self.CtermResNameLabel) CtermLayout.addWidget(self.CtermSpinBox) CtermLayout.addStretch() positionLayout = QtGui.QHBoxLayout() positionLayout.addWidget(self.decreasePositionButton) positionLayout.addWidget(positionLabel) positionLayout.addWidget(self.increasePositionButton) positionLayout.addStretch() createLayout = QtGui.QHBoxLayout() createLayout.addWidget(self.createCAHelixButton) createLayout.addStretch() removeLayout = QtGui.QHBoxLayout() removeLayout.addWidget(self.removeButton) removeLayout.addStretch() flipLayout = QtGui.QHBoxLayout() flipLayout.addWidget(self.flipButton) flipLayout.addStretch() helixLayout = QtGui.QVBoxLayout() helixLayout.addLayout(radioLayout) helixLayout.addLayout(NtermLayout) helixLayout.addLayout(CtermLayout) helixLayout.addLayout(positionLayout) helixLayout.addLayout(createLayout) helixLayout.addLayout(removeLayout) helixLayout.addLayout(flipLayout) self.helixTab.setLayout(helixLayout)
e8ef4efb1ee70bddc3bc00074e7599d9adb9bfb9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4399/e8ef4efb1ee70bddc3bc00074e7599d9adb9bfb9/structure_editor.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 44, 26342, 5661, 12, 2890, 4672, 468, 29690, 1960, 316, 326, 670, 26342, 3246, 365, 18, 17042, 19984, 3616, 273, 23425, 18, 53, 19984, 3616, 12, 2890, 18, 313, 2668, 11047, 26112, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 44, 26342, 5661, 12, 2890, 4672, 468, 29690, 1960, 316, 326, 670, 26342, 3246, 365, 18, 17042, 19984, 3616, 273, 23425, 18, 53, 19984, 3616, 12, 2890, 18, 313, 2668, 11047, 26112, ...
repo = self._get_repo()
def find_files(self): repo = self._get_repo() excluded = self._get_excluded() from mercurial import util node = None walker = cmdutil.walk(repo, [], {}, node=node, badmatch=util.always, default='relglob') return (abs for src, abs, rel, exact in walker if src != 'b' and (node or abs in repo.dirstate) and abs not in excluded )
d8c7ce5a9420e2bafd7373ccbe4c47e12804af14 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/833/d8c7ce5a9420e2bafd7373ccbe4c47e12804af14/setuptools_hg.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 67, 2354, 12, 2890, 4672, 8845, 273, 365, 6315, 588, 67, 24602, 1435, 628, 4045, 1397, 649, 1930, 1709, 756, 273, 599, 14810, 273, 24884, 18, 11348, 12, 7422, 16, 5378, 16, 10615, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1104, 67, 2354, 12, 2890, 4672, 8845, 273, 365, 6315, 588, 67, 24602, 1435, 628, 4045, 1397, 649, 1930, 1709, 756, 273, 599, 14810, 273, 24884, 18, 11348, 12, 7422, 16, 5378, 16, 10615, ...
addToRC(r'\Format dvi2 dvi DraftDVI "" "" "document,vector"')
addToRC(r'\Format dvi2 dvi DraftDVI "" "" "" "vector"')
def checkFormatEntries(dtl_tools): ''' Check all formats (\Format entries) ''' checkViewer('a Tgif viewer and editor', ['tgif'], rc_entry = [r'\Format tgif obj Tgif "" "%%" "%%" "vector"']) # checkViewer('a FIG viewer and editor', ['xfig'], rc_entry = [r'\Format fig fig FIG "" "%%" "%%" "vector"']) # checkViewer('a Grace viewer and editor', ['xmgrace'], rc_entry = [r'\Format agr agr Grace "" "%%" "%%" "vector"']) # checkViewer('a FEN viewer and editor', ['xboard -lpf $$i -mode EditPosition'], rc_entry = [r'\Format fen fen FEN "" "%%" "%%" ""']) # path, iv = checkViewer('a raster image viewer', ['xv', 'kview', 'gimp-remote', 'gimp']) path, ie = checkViewer('a raster image editor', ['gimp-remote', 'gimp']) addToRC(r'''\Format bmp bmp BMP "" "%s" "%s" ""
727a421a1f0cdc3d899b8f533bc2bcff352755c4 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7514/727a421a1f0cdc3d899b8f533bc2bcff352755c4/configure.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 1630, 5400, 12, 72, 6172, 67, 6642, 4672, 9163, 2073, 777, 6449, 17938, 1630, 3222, 13, 9163, 866, 18415, 2668, 69, 399, 13905, 14157, 471, 4858, 2187, 10228, 88, 13905, 17337, 4519, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1630, 5400, 12, 72, 6172, 67, 6642, 4672, 9163, 2073, 777, 6449, 17938, 1630, 3222, 13, 9163, 866, 18415, 2668, 69, 399, 13905, 14157, 471, 4858, 2187, 10228, 88, 13905, 17337, 4519, ...
if self.dc: self.dc.cancel() self.dc = eventloop.addIdle (self.update, "Channel Guide Update")
if not self.dc: self.dc = eventloop.addIdle (self.update, "Channel Guide Update")
def startUpdates(self): if self.dc: self.dc.cancel() self.dc = eventloop.addIdle (self.update, "Channel Guide Update")
5ec794575f4d48610068678c0104ad6bb474c1af /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12354/5ec794575f4d48610068678c0104ad6bb474c1af/guide.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 787, 5121, 12, 2890, 4672, 309, 365, 18, 7201, 30, 365, 18, 7201, 18, 10996, 1435, 365, 18, 7201, 273, 871, 6498, 18, 1289, 13834, 261, 2890, 18, 2725, 16, 315, 2909, 13018, 2315, 7923...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 787, 5121, 12, 2890, 4672, 309, 365, 18, 7201, 30, 365, 18, 7201, 18, 10996, 1435, 365, 18, 7201, 273, 871, 6498, 18, 1289, 13834, 261, 2890, 18, 2725, 16, 315, 2909, 13018, 2315, 7923...
if not (obj.amount == obj.voucher_id.amount):
if not (abs(obj.amount) == obj.voucher_id.amount):
def _check_amount(self, cr, uid, ids, context=None): for obj in self.browse(cr, uid, ids, context=context): if obj.voucher_id: if not (obj.amount == obj.voucher_id.amount): return False return True
45915a7d1e8d7dfe715ee3237eacf5d87ec9dc68 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/45915a7d1e8d7dfe715ee3237eacf5d87ec9dc68/account_voucher.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1893, 67, 8949, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 819, 33, 7036, 4672, 364, 1081, 316, 365, 18, 25731, 12, 3353, 16, 4555, 16, 3258, 16, 819, 33, 2472, 4672, 309, 1081...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1893, 67, 8949, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 819, 33, 7036, 4672, 364, 1081, 316, 365, 18, 25731, 12, 3353, 16, 4555, 16, 3258, 16, 819, 33, 2472, 4672, 309, 1081...
sys.exit(0)
os._exit(0)
def cookCommand(cfg, args, prep, macros, emerge = False, resume = None, allowUnknownFlags = False, showBuildReqs = False, ignoreDeps = False, profile = False, logBuild = True, crossCompile = None, cookIds=None, downloadOnly=False): # this ensures the repository exists client = conaryclient.ConaryClient(cfg) repos = client.getRepos() if cookIds: cookUid, cookGid = cookIds else: cookUid = cookGid = None if not os.getuid(): if not cookUid or not cookGid: raise CookError('Do not cook as root') items = {} for idx, item in enumerate(args): (name, version, flavor) = parseTroveSpec(item) l = items.setdefault((name, version), (idx, set())) l[1].add(flavor) finalItems = [] items = sorted(items.iteritems(), key=lambda x: x[1][0]) for (name, version), (idx, flavorList) in items: # NOTE: most of the cook code is set up to allow # cooks to be shared when building multiple flavors # of the same trove. However, troves with files in # them cannot handle creating one changeset w/ # shared pathIds in them. If this limitation of the # changeset format ever gets fixed, we can remove this # check. if name.startswith('group-'): finalItems.append((name, version, flavorList)) else: for flavor in flavorList: finalItems.append((name, version, [flavor])) for item in finalItems: # we want to fork here to isolate changes the recipe might make # in the environment (such as environment variables) # first, we need to ignore the tty output in the child process signal.signal(signal.SIGTTOU, signal.SIG_IGN) # we need a pipe to enable communication with our child (mainly # for emerge) inpipe, outpipe = os.pipe() pid = os.fork() if not pid: # we have no need for the read side of the pipe os.close(inpipe) # make sure that the write side of the pipe is closed # when we fork/exec fcntl.fcntl(outpipe, fcntl.FD_CLOEXEC) if profile: import hotshot prof = hotshot.Profile('conary-cook.prof') prof.start() # child, set ourself to be the foreground process os.setpgrp() if cookGid: os.setgid(cookGid) if cookUid: os.setuid(cookUid) try: # the child should control stdin -- if stdin is a tty # that can be controlled, and we're not piping output # to some other process that should be controlling it # (like less). if sys.stdin.isatty() and sys.stdout.isatty(): os.tcsetpgrp(0, os.getpgrp()) except AttributeError: # stdin might not even have an isatty method pass # make sure we do not accidentally make files group-writeable os.umask(0022) # and if we do not create core files we will not package them resource.setrlimit(resource.RLIMIT_CORE, (0,0)) built = cookItem(repos, cfg, item, prep=prep, macros=macros, emerge = emerge, resume = resume, allowUnknownFlags = allowUnknownFlags, showBuildReqs = showBuildReqs, ignoreDeps = ignoreDeps, logBuild = logBuild, crossCompile = crossCompile, callback = CookCallback(), downloadOnly = downloadOnly) components, csFile = built if not components: # --prep or --download or perhaps an error was logged if log.errorOccurred(): sys.exit(1) sys.exit(0) for component, version, flavor in sorted(components): print "Created component:", component, version, if flavor is not None: print str(flavor).replace("\n", " "), print if csFile is None: print 'Changeset committed to the repository.' else: print 'Changeset written to:', csFile # send the changeset file over the pipe os.write(outpipe, csFile) if profile: prof.stop() sys.exit(0) else: # parent process, no need for the write side of the pipe os.close(outpipe) while 1: try: (id, status) = os.waitpid(pid, os.WUNTRACED) if os.WIFSTOPPED(status): # if our child has been stopped (Ctrl+Z or similar) # stop ourself os.killpg(os.getpgrp(), os.WSTOPSIG(status)) # when we continue, place our child back # in the foreground process group os.tcsetpgrp(0, pid) # tell the child to continue os.kill(-pid, signal.SIGCONT) else: # if our child exited with a non-0 status, exit # with that status if os.WEXITSTATUS(status): sys.exit(os.WEXITSTATUS(status)) break except KeyboardInterrupt: # kill the entire process group os.kill(-pid, signal.SIGINT) # see if the child process sent us a changeset filename over # the pipe csFile = os.read(inpipe, 1000) if emerge: # apply the changeset file written by the child if not csFile: log.error('The cook process did not return a changeset file') break print 'Applying changeset file %s' %csFile client = conaryclient.ConaryClient(cfg) try: cs = changeset.ChangeSetFromFile(csFile) job = [ (x[0], (None, None), (x[1], x[2]), True) for x in cs.getPrimaryTroveList() ] callback = updatecmd.UpdateCallback() rc = client.updateChangeSet(job, recurse = True, resolveDeps = False, callback = callback, fromChangesets = [ cs ]) client.applyUpdate(rc[0]) except (conaryclient.UpdateError, errors.CommitError), e: log.error(e) log.error("Not committing changeset: please apply %s by " "hand" % csFile) else: os.unlink(csFile) # make sure that we are the foreground process again try: # the child should control stdin -- if stdin is a tty # that can be controlled if sys.stdin.isatty(): os.tcsetpgrp(0, os.getpgrp()) except AttributeError: # stdin might not even have an isatty method pass
daa88edb6d2106940625002dbcc3a4fbb5b613d3 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8747/daa88edb6d2106940625002dbcc3a4fbb5b613d3/cook.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15860, 2189, 12, 7066, 16, 833, 16, 13237, 16, 24302, 16, 801, 1583, 273, 1083, 16, 10774, 273, 599, 16, 1699, 4874, 5094, 273, 1083, 16, 2405, 3116, 6113, 87, 273, 1083, 16, 2305, 144...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 15860, 2189, 12, 7066, 16, 833, 16, 13237, 16, 24302, 16, 801, 1583, 273, 1083, 16, 10774, 273, 599, 16, 1699, 4874, 5094, 273, 1083, 16, 2405, 3116, 6113, 87, 273, 1083, 16, 2305, 144...
"""Tries to convert the start-time and end-time of the given class into a nice AP-style string representation."""
"""Tries to convert the start-time and end-time of the given class into a nice AP-style string representation."""
def format_formatted_times(self, value): """Tries to convert the start-time and end-time of the given class into a nice AP-style string representation.""" start = self.input.get('start-time', '') end = self.input.get('end-time', '')
20eab91c91a9f72ec790d8c5d1fb9261b7b89028 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4025/20eab91c91a9f72ec790d8c5d1fb9261b7b89028/formatters.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 740, 67, 14897, 67, 8293, 12, 2890, 16, 460, 4672, 3536, 13652, 358, 1765, 326, 787, 17, 957, 471, 679, 17, 957, 434, 326, 864, 667, 1368, 279, 13752, 14410, 17, 4060, 533, 4335, 12123...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 740, 67, 14897, 67, 8293, 12, 2890, 16, 460, 4672, 3536, 13652, 358, 1765, 326, 787, 17, 957, 471, 679, 17, 957, 434, 326, 864, 667, 1368, 279, 13752, 14410, 17, 4060, 533, 4335, 12123...
bar = '='*int(25 * frac) out = '\r%-25.25s %3i%% |%-25.25s| %5sB %8s ETA ' % \ (text, frac*100, bar, fread, frtime)
ui_time = tl.add(' %9s' % frtime) ui_end = tl.add(' ETA ') if sofar_size is None: ui_sofar_pc = '' else: ui_sofar_pc = tl.add(' (%i%%)' % sofar_pc, full_len=len(" (100%)")) ui_pc = tl.add(' %2i%%' % (frac*100)) ui_rate = tl.add(' %5sB/s' % ave_dl) blen = 4 + tl.rest_split(8 + 8 + 4) bar = '='*int(blen * frac) if (blen * frac) - int(blen * frac) >= 0.5: bar += '-' ui_bar = tl.add(' [%-*.*s]' % (blen, blen, bar)) out = '%-*.*s%s%s%s%s%s%s%s\r' % (tl.rest(), tl.rest(), text, ui_sofar_pc, ui_pc, ui_bar, ui_rate, ui_size, ui_time, ui_end)
def _do_update(self, amount_read, now=None): etime = self.re.elapsed_time() fetime = format_time(etime) fread = format_number(amount_read) #self.size = None if self.text is not None: text = self.text else: text = self.basename if self.size is None: out = '\r%-60.60s %5sB %s ' % \ (text, fread, fetime) else: rtime = self.re.remaining_time() frtime = format_time(rtime) frac = self.re.fraction_read() bar = '='*int(25 * frac)
9a135f5dabc48230cd64b53699bb78f5386f1a7a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7001/9a135f5dabc48230cd64b53699bb78f5386f1a7a/progress.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2896, 67, 2725, 12, 2890, 16, 3844, 67, 896, 16, 2037, 33, 7036, 4672, 225, 2374, 273, 365, 18, 266, 18, 26201, 67, 957, 1435, 284, 2374, 273, 740, 67, 957, 12, 2374, 13, 18159,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2896, 67, 2725, 12, 2890, 16, 3844, 67, 896, 16, 2037, 33, 7036, 4672, 225, 2374, 273, 365, 18, 266, 18, 26201, 67, 957, 1435, 284, 2374, 273, 740, 67, 957, 12, 2374, 13, 18159,...
path = '/'.join((prefix, file[3:]))
path = '/'.join((prefix, file[3:]))[1:]
def getdocinfo(file, prefix=''): path = '/'.join((prefix, file[3:])) prettyname = (os.path.splitext(os.path.split(file)[-1])[0]) prettyname = prettyname[0].capitalize() + prettyname[1:] if file.find('html') >= 0: info = open(file).readlines(2)[1] else: info = open(file).readline().strip().capitalize() return path, prettyname, info
bf397a96871d3057f69fcd6cae418dbfec572201 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1298/bf397a96871d3057f69fcd6cae418dbfec572201/makedocs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 2434, 1376, 12, 768, 16, 1633, 2218, 11, 4672, 589, 273, 2023, 18, 5701, 12443, 3239, 16, 585, 63, 23, 30, 22643, 63, 21, 26894, 7517, 529, 273, 261, 538, 18, 803, 18, 4939, 408...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2434, 1376, 12, 768, 16, 1633, 2218, 11, 4672, 589, 273, 2023, 18, 5701, 12443, 3239, 16, 585, 63, 23, 30, 22643, 63, 21, 26894, 7517, 529, 273, 261, 538, 18, 803, 18, 4939, 408...
complete -F _'''%(opts, words) + name + ' ' + name +"\n\n").encode('utf-8')
complete -F _'''%(opts, words) + fname + ' ' + name +"\n\n").encode('utf-8')
def opts_and_words(name, op, words): opts = '|'.join(options(op)) words = '|'.join([w.replace("'", "\\'") for w in words]) return ('_'+name+'()'+\
1b828d5f33700d4755b26a80e5d9dcfd0cdd1830 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9125/1b828d5f33700d4755b26a80e5d9dcfd0cdd1830/linux.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1500, 67, 464, 67, 3753, 12, 529, 16, 1061, 16, 4511, 4672, 1500, 225, 273, 8030, 18, 5701, 12, 2116, 12, 556, 3719, 4511, 273, 8030, 18, 5701, 3816, 91, 18, 2079, 29823, 3113, 1548, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1500, 67, 464, 67, 3753, 12, 529, 16, 1061, 16, 4511, 4672, 1500, 225, 273, 8030, 18, 5701, 12, 2116, 12, 556, 3719, 4511, 273, 8030, 18, 5701, 3816, 91, 18, 2079, 29823, 3113, 1548, ...
:Return: seid
:Return: seid
def complex(self, seid, sid): """ Return the complex of the component seid at the scale sid
34fb233a9df2b2453852578079879a85a0b395b2 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11338/34fb233a9df2b2453852578079879a85a0b395b2/latticeconcept.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7233, 12, 2890, 16, 695, 350, 16, 7348, 4672, 3536, 2000, 326, 7233, 434, 326, 1794, 695, 350, 622, 326, 3159, 7348, 2, 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, 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, 7233, 12, 2890, 16, 695, 350, 16, 7348, 4672, 3536, 2000, 326, 7233, 434, 326, 1794, 695, 350, 622, 326, 3159, 7348, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
for resolve in self.dns_resolve: resolve (self) self.dns_resolve = None if len (self.dns_client.dns_pending) == 0: self.dns_client.close () self.dns_client = None
self.dns_finalize ()
def dns_continue (self, when): try: del self.dns_client.dns_pending[self.dns_uid] except KeyError: for resolve in self.dns_resolve: resolve (self) self.dns_resolve = None if len (self.dns_client.dns_pending) == 0: self.dns_client.close () self.dns_client = None return self.dns_failover += 1 if self.dns_failover < ( len (self.dns_servers) * self.dns_client.dns_failover ): # continue with the next peer and a new time self.dns_peer = ( self.dns_servers[ self.dns_failover % len ( self.dns_servers ) ], 53 ) self.dns_client.dns_send (self, time.time ()) else: # ... or finalize ... self.dns_client = None # break circular ref?
9af864bef6d2984f1a182b45186374fa70f4ab46 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2577/9af864bef6d2984f1a182b45186374fa70f4ab46/dns_client.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6605, 67, 17143, 261, 2890, 16, 1347, 4672, 775, 30, 1464, 365, 18, 14926, 67, 2625, 18, 14926, 67, 9561, 63, 2890, 18, 14926, 67, 1911, 65, 1335, 4999, 30, 365, 18, 14926, 67, 30343, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 6605, 67, 17143, 261, 2890, 16, 1347, 4672, 775, 30, 1464, 365, 18, 14926, 67, 2625, 18, 14926, 67, 9561, 63, 2890, 18, 14926, 67, 1911, 65, 1335, 4999, 30, 365, 18, 14926, 67, 30343, ...
def write(self, directory, verbose=1): """Write the documentation to the given directory.""" if directory in ('', None): directory = './' if directory[-1] != '/': directory = directory + '/' self._show_both = 0 str = self._tree_to_html() open(directory+'epydoc-tree.html', 'w').write(str) str = self._index_to_html() open(directory+'epydoc-index.html', 'w').write(str) self._show_private = 0 self._write_css(directory) self._write_help(directory) self._show_private = 'both' if self._show_private == 'both': self._show_both = 1 self._show_private = 0 self._write_docs(directory, verbose) self._show_private = 1 self._cssfile = '../'+self._cssfile self._write_docs(os.path.join(directory, 'private'), verbose) else: self._write_docs(directory, verbose)
def write(self, directory, verbose=1): """Write the documentation to the given directory.""" if directory in ('', None): directory = './' if directory[-1] != '/': directory = directory + '/' self._show_both = 0 str = self._tree_to_html() open(directory+'epydoc-tree.html', 'w').write(str)
b1b93a7c8720ea1ae0c715da86bbf6fe1dbf094a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/b1b93a7c8720ea1ae0c715da86bbf6fe1dbf094a/html.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 12, 2890, 16, 1867, 16, 3988, 33, 21, 4672, 3536, 3067, 326, 7323, 358, 326, 864, 1867, 12123, 309, 1867, 316, 7707, 2187, 599, 4672, 1867, 273, 26544, 309, 1867, 18919, 21, 65, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1045, 12, 2890, 16, 1867, 16, 3988, 33, 21, 4672, 3536, 3067, 326, 7323, 358, 326, 864, 1867, 12123, 309, 1867, 316, 7707, 2187, 599, 4672, 1867, 273, 26544, 309, 1867, 18919, 21, 65, ...
str += ' <TD BGCOLOR=" '<B><FONT SIZE="+1">Class' +\ '</FONT></B>&nbsp;&nbsp;&nbsp;</TD>\n'
str += I+'<TH BGCOLOR=" '&nbsp;&nbsp;Class&nbsp;&nbsp;&nbsp;</TH>\n'
def _navbar(self, where, uid=None): """ @param where: What page the navbar is being displayed on.. """ str = self._start_of('Navbar') + \ '<TABLE BORDER="0" WIDTH="100%" '+\ 'CELLPADDING="0" BGCOLOR="WHITE" CELLSPACING="0">\n'+\ '<TR>\n<TD COLSPAN=2 BGCOLOR="#a0c0ff">\n'+\ '<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="1">\n'+\ ' <TR ALIGN="center" VALIGN="top">\n' # Go to Package if self._package is None: pass elif where in ('class', 'module'): pkg = uid.package() if pkg is not None: str += ' <TD>&nbsp;&nbsp;&nbsp;<B><FONT SIZE="+1">'+\ '<A HREF="'+`pkg`+'.html">'+\ 'Package</A>'+\ '</FONT></B>&nbsp;&nbsp;&nbsp;</TD>\n' else: str += ' <TD>&nbsp;&nbsp;&nbsp;'+\ '<B><FONT SIZE="+1">Package' +\ '</FONT></B>&nbsp;&nbsp;&nbsp;</TD>\n' elif where=='package': str += ' <TD BGCOLOR="#70b0f0">&nbsp;&nbsp;&nbsp;'+\ '<B><FONT SIZE="+1">Package' +\ '</FONT></B>&nbsp;&nbsp;&nbsp;</TD>\n' elif isinstance(self._package, UID): str += ' <TD>&nbsp;&nbsp;&nbsp;<B><FONT SIZE="+1">'+\ '<A HREF="'+`self._package`+'.html">'+\ 'Package</A>'+\ '</FONT></B>&nbsp;&nbsp;&nbsp;</TD>\n' elif 'multiple' == self._package: str += ' <TD>&nbsp;&nbsp;&nbsp;'+\ '<B><FONT SIZE="+1">Package' +\ '</FONT></B>&nbsp;&nbsp;&nbsp;</TD></B>\n' # Go to Module if self._module is None: pass elif where=='class': str += ' <TD>&nbsp;&nbsp;&nbsp;<B><FONT SIZE="+1">'+\ '<A HREF="'+`uid.module()`+'.html">'+\ 'Module</A>'+\ '</FONT></B>&nbsp;&nbsp;&nbsp;</TD>\n' elif where=='module': str += ' <TD BGCOLOR="#70b0f0">&nbsp;&nbsp;&nbsp;'+\ '<B><FONT SIZE="+1">Module' +\ '</FONT></B>&nbsp;&nbsp;&nbsp;</TD>\n' elif isinstance(self._module, UID): str += ' <TD>&nbsp;&nbsp;&nbsp;<B><FONT SIZE="+1">'+\ '<A HREF="'+`self._module`+'.html">'+\ 'Module</A>'+\ '</FONT></B>&nbsp;&nbsp;&nbsp;</TD>\n' elif 'multiple' == self._module: str += ' <TD>&nbsp;&nbsp;&nbsp;'+\ '<B><FONT SIZE="+1">Module' +\ '</FONT></B>&nbsp;&nbsp;&nbsp;</TD></B>\n' # Go to Class if where == 'class': str += ' <TD BGCOLOR="#70b0f0">&nbsp;&nbsp;&nbsp;'+\ '<B><FONT SIZE="+1">Class' +\ '</FONT></B>&nbsp;&nbsp;&nbsp;</TD>\n' else: str += ' <TD>&nbsp;&nbsp;&nbsp;<B><FONT SIZE="+1">Class' +\ '</FONT></B>&nbsp;&nbsp;&nbsp;</TD>\n'
07991a6224980123acb6be68dd2d39634e5ac591 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/07991a6224980123acb6be68dd2d39634e5ac591/html.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 11589, 3215, 12, 2890, 16, 1625, 16, 4555, 33, 7036, 4672, 3536, 632, 891, 1625, 30, 18734, 1363, 326, 8775, 3215, 353, 3832, 10453, 603, 838, 3536, 609, 273, 365, 6315, 1937, 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, 389, 11589, 3215, 12, 2890, 16, 1625, 16, 4555, 33, 7036, 4672, 3536, 632, 891, 1625, 30, 18734, 1363, 326, 8775, 3215, 353, 3832, 10453, 603, 838, 3536, 609, 273, 365, 6315, 1937, 67, ...
return 1, "I cannot do this until this part is saved."
if make: return 1, "I cannot do this until this part is saved." else: return 0, None
def find_or_make_part_files_directory(self, make=True): """Return the Part Files directory for this assembly. The Part Files directory exists next to the current MMP file and has the same name as the MMP file (without the .mmp extension) but with the ' Files' suffix. The Part Files directory contains all the associated subdirectories and files for this assembly, such as movie files (*.dpb), POV-Ray Scene files (*.pov), GAMESS files (*.gms), etc. For any error, return (1, errortext); on success return (0, full_path_of_part_files_dir). In other words, return (errorcode, path_or_errortext). """ if self.filename: path_wo_ext, ext = os.path.splitext(self.filename) from platform import find_or_make_any_directory return find_or_make_any_directory(path_wo_ext + " Files", make = make) else: return 1, "I cannot do this until this part is saved."
c1f48fca8082b68e042f69d4e0977f29151c4969 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/c1f48fca8082b68e042f69d4e0977f29151c4969/assembly.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 67, 280, 67, 6540, 67, 2680, 67, 2354, 67, 5149, 12, 2890, 16, 1221, 33, 5510, 4672, 3536, 990, 326, 6393, 6471, 1867, 364, 333, 19931, 18, 1021, 6393, 6471, 1867, 1704, 1024, 35...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1104, 67, 280, 67, 6540, 67, 2680, 67, 2354, 67, 5149, 12, 2890, 16, 1221, 33, 5510, 4672, 3536, 990, 326, 6393, 6471, 1867, 364, 333, 19931, 18, 1021, 6393, 6471, 1867, 1704, 1024, 35...
http = http.client.HTTPSConnection(netloc)
http = httpclient.HTTPSConnection(netloc)
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)
ced6203ffef566cf6a86e860e570efc5dd66580b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8125/ced6203ffef566cf6a86e860e570efc5dd66580b/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, ...
(" <Email addresss=\""+packageName.lower()+"-regression@software.sandia.gov\"/>\n")
(" <Email address=\""+packageName.lower()+"-regression@software.sandia.gov\"/>\n")
def createCDashDepsXMLFromRawDepsTable(self, rawTable): xmlText = ""
80db11491bec5fd1944dceb4cd84f24236e6b038 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1130/80db11491bec5fd1944dceb4cd84f24236e6b038/TrilinosDependencies.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 10160, 961, 14430, 4201, 1265, 4809, 14430, 1388, 12, 2890, 16, 1831, 1388, 4672, 225, 2025, 1528, 273, 1408, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 752, 10160, 961, 14430, 4201, 1265, 4809, 14430, 1388, 12, 2890, 16, 1831, 1388, 4672, 225, 2025, 1528, 273, 1408, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
env['CONTENT_TYPE'] = self.headers.type
if self.headers.typeheader is None: env['CONTENT_TYPE'] = self.headers.type else: env['CONTENT_TYPE'] = self.headers.typeheader
def run_cgi(self): """Execute a CGI script.""" dir, rest = self.cgi_info i = string.rfind(rest, '?') if i >= 0: rest, query = rest[:i], rest[i+1:] else: query = '' i = string.find(rest, '/') if i >= 0: script, rest = rest[:i], rest[i:] else: script, rest = rest, '' scriptname = dir + '/' + script scriptfile = self.translate_path(scriptname) if not os.path.exists(scriptfile): self.send_error(404, "No such CGI script (%s)" % `scriptname`) return if not os.path.isfile(scriptfile): self.send_error(403, "CGI script is not a plain file (%s)" % `scriptname`) return if not executable(scriptfile): self.send_error(403, "CGI script is not executable (%s)" % `scriptname`) return nobody = nobody_uid() self.send_response(200, "Script output follows") self.wfile.flush() # Always flush before forking pid = os.fork() if pid != 0: # Parent pid, sts = os.waitpid(pid, 0) if sts: self.log_error("CGI script exit status x%x" % sts) return # Child try: # Reference: http://hoohoo.ncsa.uiuc.edu/cgi/env.html # XXX Much of the following could be prepared ahead of time! env = {} env['SERVER_SOFTWARE'] = self.version_string() env['SERVER_NAME'] = self.server.server_name env['GATEWAY_INTERFACE'] = 'CGI/1.1' env['SERVER_PROTOCOL'] = self.protocol_version env['SERVER_PORT'] = str(self.server.server_port) env['REQUEST_METHOD'] = self.command uqrest = urllib.unquote(rest) env['PATH_INFO'] = uqrest env['PATH_TRANSLATED'] = self.translate_path(uqrest) env['SCRIPT_NAME'] = scriptname if query: env['QUERY_STRING'] = query host = self.address_string() if host != self.client_address[0]: env['REMOTE_HOST'] = host env['REMOTE_ADDR'] = self.client_address[0] # AUTH_TYPE # REMOTE_USER # REMOTE_IDENT env['CONTENT_TYPE'] = self.headers.type length = self.headers.getheader('content-length') if length: env['CONTENT_LENGTH'] = length accept = [] for line in self.headers.getallmatchingheaders('accept'): if line[:1] in string.whitespace: accept.append(string.strip(line)) else: accept = accept + string.split(line[7:]) env['HTTP_ACCEPT'] = string.joinfields(accept, ',') ua = self.headers.getheader('user-agent') if ua: env['HTTP_USER_AGENT'] = ua # XXX Other HTTP_* headers decoded_query = string.replace(query, '+', ' ') try: os.setuid(nobody) except os.error: pass os.dup2(self.rfile.fileno(), 0) os.dup2(self.wfile.fileno(), 1) print scriptfile, script, decoded_query os.execve(scriptfile, [script, decoded_query], env) except: self.server.handle_error(self.request, self.client_address) os._exit(127)
fb7480f7feb8b178ec1ff09a3daee6dee7aa6743 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/fb7480f7feb8b178ec1ff09a3daee6dee7aa6743/CGIHTTPServer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 67, 19062, 12, 2890, 4672, 3536, 5289, 279, 385, 13797, 2728, 12123, 1577, 16, 3127, 273, 365, 18, 19062, 67, 1376, 277, 273, 533, 18, 86, 4720, 12, 8792, 16, 6787, 13, 309, 277,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 67, 19062, 12, 2890, 4672, 3536, 5289, 279, 385, 13797, 2728, 12123, 1577, 16, 3127, 273, 365, 18, 19062, 67, 1376, 277, 273, 533, 18, 86, 4720, 12, 8792, 16, 6787, 13, 309, 277,...
self.stream = self.uri
self.stream = self.uri
def run(self): self.uris = self.getURI(self.sourceuri) self.abort = False if not self.abort: if True: Damnlog('Conversion routine starting, URI is', self.uris[0]) self.uri = self.uris[0] self.update(0) self.parent.thisvideo.append(self.parent.videos[self.parent.converting]) self.filename = unicodedata.normalize('NFKD', DamnUnicode(REGEX_FILE_CLEANUP_FILENAME.sub('', self.parent.meta[self.parent.videos[self.parent.converting]]['name']))).encode('utf8', 'ignore').replace('/', '').replace('\\', '').strip() # Heck of a line! self.profile = int(self.parent.meta[self.parent.videos[self.parent.converting]]['profile']) if os.path.exists(self.uri): Damnlog('We\'re dealing with a file stream here.') self.stream = self.uri # Despite setting this, ffmpeg will still be fed the file via stdin rather than letting it read the file itself # Fixes some accents-in-pathnames problems if self.outdir is None: self.outdir = DV.prefs.get('defaultoutdir') else: Damnlog('We\'re dealing with a network stream here.') self.stream = '-' # It's another stream, spawn a downloader thread to take care of it and pipe the content to ffmpeg via stdin if self.outdir is None: self.outdir = DV.prefs.get('defaultweboutdir') if self.outdir[-1:] == DV.sep: self.outdir = self.outdir[0:-1] if not os.path.exists(self.outdir): os.makedirs(self.outdir) elif not os.path.isdir(self.outdir): os.remove(self.outdir) os.makedirs(self.outdir) self.outdir = self.outdir + DV.sep Damnlog('Profile is', self.profile, '; Output directory is', self.outdir) if self.profile == -1: # Do not encode, just copy Damnlog('We\'re in raw copy mode') if True: failed = False if self.stream == '-': # Spawn a downloader src = DamnURLPicker(self.uris) total = int(src.info()['Content-Length']) Damnlog('Total bytes:', total) ext = 'avi' try: if src.info()['Content-Type'].lower().find('audio') != -1: ext = 'mp3' except: ext = 'avi' try: tmpuri = src.info()['Content-Disposition'][src.info()['Content-Disposition'].find('filename=') + 9:] except: tmpuri = 'Video.' + ext # And pray for the best! Damnlog('Temp URI is', tmpuri) else: # Just copy the file, lol total = int(os.lstat(self.stream).st_size) src = DamnOpenFile(self.stream, 'rb') tmpuri = self.stream Damnlog('Total is', total, '; Temp URI is', tmpuri) if REGEX_URI_EXTENSION_EXTRACT.search(tmpuri): ext = '.' + REGEX_URI_EXTENSION_EXTRACT.sub('\\1', tmpuri) else: ext = '.avi' # And pray for the best again! self.filename = self.getfinalfilename(self.outdir, self.filename, ext) Damnlog('Filename is', self.filename, '; opening local stream.') dst = DamnOpenFile(self.outdir + self.filename + ext, 'wb') Damnlog(self.outdir + self.filename + ext, 'opened.') keepgoing = True copied = 0.0 lasttime = 0.0 self.update(statustext=DV.l('Copying ') + DamnUnicode(self.parent.meta[self.parent.videos[self.parent.converting]]['name']) + DV.l('...')) Damnlog('Starting raw download of stream', src) while keepgoing and not self.abort: i = src.read(4096) if len(i): dst.write(i) copied += 4096.0 else: copied = float(total) keepgoing = False progress = min((100.0, copied / total * 100.0)) nowtime = float(time.time()) if lasttime + .5 < nowtime or not keepgoing: # Do not send a progress update more than 2 times per second, otherwise the event queue can get overloaded. On some platforms, time() is an int, but that doesn't matter; the progress will be updated once a second instead of 2 times, which is still acceptable. self.update(progress, status=self.parent.meta[self.parent.videos[self.parent.converting]]['status'] + ' [' + str(int(progress)) + '%]') lasttime = nowtime Damnlog('Done downloading!') else: Damnlog('Raw download failed. Aborted?', self.abort) failed = True self.grabberrun = False if self.abort or failed: self.parent.meta[self.parent.videos[self.parent.converting]]['status'] = DV.l('Failure.') self.update(status=DV.l('Failure.')) else: self.parent.meta[self.parent.videos[self.parent.converting]]['status'] = DV.l('Success!') self.update(status=DV.l('Success!')) self.parent.resultlist.append((self.filename + ext, self.outdir, self.parent.meta[self.parent.videos[self.parent.converting]]['icon'])) self.update(go=self.abort) return Damnlog('We\'re in on-the-fly conversion mode.') os_exe_ext = '' if DV.os == 'nt': os_exe_ext = '.exe' elif DV.os == 'mac': os_exe_ext = 'osx' if DV.bit64: os_exe_ext = '64' + os_exe_ext self.passes = 1 cmd = [DV.bin_path + 'ffmpeg' + os_exe_ext, '-i', '?DAMNVID_VIDEO_STREAM?', '-y', '-passlogfile', DV.tmp_path + 'pass'] for i in DV.preferences.keys(): if i[0:25] == 'damnvid-profile:encoding_': i = i[16:] pref = DV.prefs.getp(self.profile, i) if pref: if type(DV.preferences['damnvid-profile:' + i]['kind']) in (type(''), type(u'')): if DV.preferences['damnvid-profile:' + i]['kind'][0] == '%': pref = str(round(float(pref), 0)) # Round if i == 'encoding_pass': pref = '?DAMNVID_VIDEO_PASS?' if i[9:] == 'b' and pref == 'sameq': cmd.append('-sameq') else: cmd.extend(['-' + i[9:], pref]) self.encodevideo = DamnUnicode(DV.prefs.getp(self.profile, 'video')) == u'True' self.encodeaudio = DamnUnicode(DV.prefs.getp(self.profile, 'audio')) == u'True' if self.encodevideo: Damnlog('Encoding video.') else: Damnlog('Not encoding video.') cmd.append('-vn') if self.encodeaudio: Damnlog('Encoding audio.') else: Damnlog('Not encoding audio.') cmd.append('-an') vidformat = DV.prefs.getp(self.profile, 'Encoding_f') self.vcodec = DV.prefs.getp(self.profile, 'Encoding_vcodec') self.acodec = DV.prefs.getp(self.profile, 'Encoding_acodec') self.totalpasses = DV.prefs.getp(self.profile, 'Encoding_pass') if not self.totalpasses: self.totalpasses = 1 else: self.totalpasses = int(self.totalpasses) if vidformat and DV.file_ext.has_key(vidformat): ext = '.' + DV.file_ext[vidformat] else: if self.vcodec and self.encodevideo and DV.file_ext_by_codec.has_key(self.vcodec): ext = '.' + DV.file_ext_by_codec[self.vcodec] elif self.encodeaudio and not self.encodevideo: if DV.file_ext_by_codec.has_key(self.acodec): ext = '.' + DV.file_ext_by_codec[self.acodec] else: ext = '.mp3' else: ext = '.avi' flags = [] if self.vcodec and DV.codec_advanced_cl.has_key(self.vcodec): for o in DV.codec_advanced_cl[self.vcodec]: if type(o) in (type(''), type(u'')): if o not in flags: # If the flag is already there, don't add it again flags.append(o) else: if '-' + o[0] not in cmd: # If the option is already there, don't overwrite it cmd.extend(['-' + o[0], o[1]]) if len(flags): cmd.extend(['-flags', ''.join(flags)]) self.filename = DamnUnicode(self.getfinalfilename(self.outdir, self.filename, ext)) self.filenamenoext = self.filename self.tmpfilename = DamnUnicode(self.gettmpfilename(DV.tmp_path, self.filenamenoext, ext)) cmd.append('?DAMNVID_OUTPUT_FILE?') if len(self.moduleextraargs): cmd.extend(self.moduleextraargs) Damnlog('ffmpeg call has been generated:', cmd) self.filename = self.filenamenoext + ext self.duration = None self.update(statustext=DV.l('Converting ') + DamnUnicode(self.parent.meta[self.parent.videos[self.parent.converting]]['name']) + DV.l('...')) while int(self.passes) <= int(self.totalpasses) and not self.abort: Damnlog('Starting pass', self.passes, 'out of', self.totalpasses) if self.totalpasses != 1: self.parent.meta[self.parent.videos[self.parent.converting]]['status'] = DV.l('Pass ') + str(self.passes) + '/' + str(self.totalpasses) + DV.l('...') self.update(status=DV.l('Pass ') + str(self.passes) + '/' + str(self.totalpasses) + DV.l('...')) if self.stream == '-': if self.passes == 1: self.tmppassfile = DV.tmp_path + self.gettmpfilename(DV.tmp_path, self.filenamenoext, ext) else: self.stream = self.tmppassfile if self.passes != 1: self.tmpfilename = self.gettmpfilename(DV.tmp_path, self.filenamenoext, ext) self.process = DamnSpawner(self.cmd2str(cmd), stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE, cwd=os.path.dirname(DV.tmp_path)) if self.stream == '-': if self.totalpasses != 1: self.feeder = DamnDownloader(self.uris, self.process.stdin, self.tmppassfile) else: self.feeder = DamnDownloader(self.uris, self.process.stdin) self.feeder.start() else: self.feeder = DamnStreamCopy(self.stream, self.process.stdin) self.feeder.start() curline = '' Damnlog('Starting ffmpeg polling.') while self.process.poll() == None and not self.abort: c = self.process.stderr.read(1) curline += c if c == '\r' or c == '\n': self.parseLine(curline) curline = '' Damnlog('Stopping ffmpeg polling. Abort?', self.abort) try: commun = self.process.communicate() curline += commun Damnlog('Grabbed additional ffmpeg stuff:', commun) except: Damnlog('Couldn\'t grab additional ffmpeg stuff.') if curline: self.parseLine(curline) self.passes += 1 Damnlog('And we\'re done converting!') self.update(100) result = self.process.poll() # The process is complete, but .poll() still returns the process's return code time.sleep(.25) # Wait a bit self.grabberrun = False # That'll make the DamnConverterGrabber wake up just in case if result and os.path.exists(DV.tmp_path + self.tmpfilename): os.remove(DV.tmp_path + self.tmpfilename) # Delete the output file if ffmpeg has exitted with a bad return code Damnlog('All the routine completed successfully.') else: result = 1 Damnlog('Error in main conversion routine.') Damnlog('Cleaning up after conversion.') for i in os.listdir(os.path.dirname(DV.tmp_path)): if i == self.tmpfilename and not result and not self.abort: try: os.rename(DV.tmp_path + i, self.outdir + self.filename) except: # Maybe the file still isn't unlocked, it happens... Wait moar and retry try: time.sleep(2) os.rename(DV.tmp_path + i, self.outdir + self.filename) except: # Now this is really bad, alert the user try: # Manual copy, might be needed if we're working on two different filesystems on a non-Windows platform src = DamnOpenFile(DV.tmp_path + i, 'rb') dst = DamnOpenFile(self.outdir + self.filename, 'wb') for fileline in src.readlines(): dst.write(fileline) try: # Another try block in order to avoid raising the huge except block with the dialog src.close() dst.close() os.remove(DV.tmp_path + i) except: pass except: self.update(dialog=(DV.l('Cannot move file!'), DV.l('locale:successfully-converted-file-but-ioerror') + '\n' + DV.tmp_path + i, wx.OK | wx.ICON_EXCLAMATION)) else: try: os.remove(DV.tmp_path + i) except: pass Damnlog('End cleanup, returning. Result?', result, '; Abort?', self.abort) if not result and not self.abort: self.parent.meta[self.parent.videos[self.parent.converting]]['status'] = DV.l('Success!') self.parent.resultlist.append((self.filename, self.outdir, self.parent.meta[self.parent.videos[self.parent.converting]]['icon'])) self.update(status=DV.l('Success!'), go=self.abort) return self.parent.meta[self.parent.videos[self.parent.converting]]['status'] = DV.l('Failure.') self.update(status=DV.l('Failure.'), go=self.abort)
6efe94af856bb918c22e3763b1f81660ac519337 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11142/6efe94af856bb918c22e3763b1f81660ac519337/DamnVid.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 365, 18, 23510, 273, 365, 18, 588, 3098, 12, 2890, 18, 3168, 1650, 13, 365, 18, 18623, 273, 1083, 309, 486, 365, 18, 18623, 30, 309, 1053, 30, 463, 301, 82, 133...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 12, 2890, 4672, 365, 18, 23510, 273, 365, 18, 588, 3098, 12, 2890, 18, 3168, 1650, 13, 365, 18, 18623, 273, 1083, 309, 486, 365, 18, 18623, 30, 309, 1053, 30, 463, 301, 82, 133...
if self["magic"].value != "BLP2": return "Invalid magic!"
if self.stream.readBytes(0, 4) != "BLP2": return "Invalid magic"
def validate(self): if self["magic"].value != "BLP2": return "Invalid magic!" return True
80adea6dd3bef06695c8c9370f20925f7c91136b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9327/80adea6dd3bef06695c8c9370f20925f7c91136b/blp.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1954, 12, 2890, 4672, 309, 365, 18, 3256, 18, 896, 2160, 12, 20, 16, 1059, 13, 480, 315, 38, 14461, 22, 6877, 327, 315, 1941, 8146, 6, 327, 1053, 2, 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, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1954, 12, 2890, 4672, 309, 365, 18, 3256, 18, 896, 2160, 12, 20, 16, 1059, 13, 480, 315, 38, 14461, 22, 6877, 327, 315, 1941, 8146, 6, 327, 1053, 2, -100, -100, -100, -100, -100, -10...
self.__timeout(id=gobject.timeout_add(100, self.__undisplay))
def __motion(self, view, event): # trigger over row area, not column headers if event.window is not view.get_bin_window(): return if event.get_state() & gtk.gdk.MODIFIER_MASK: return
0177f0c8fe5c6fac7bcdebd0aeedfe3bcb3cceac /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4764/0177f0c8fe5c6fac7bcdebd0aeedfe3bcb3cceac/views.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 81, 8240, 12, 2890, 16, 1476, 16, 871, 4672, 468, 3080, 1879, 1027, 5091, 16, 486, 1057, 1607, 309, 871, 18, 5668, 353, 486, 1476, 18, 588, 67, 4757, 67, 5668, 13332, 327, 309, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1001, 81, 8240, 12, 2890, 16, 1476, 16, 871, 4672, 468, 3080, 1879, 1027, 5091, 16, 486, 1057, 1607, 309, 871, 18, 5668, 353, 486, 1476, 18, 588, 67, 4757, 67, 5668, 13332, 327, 309, ...
msg = "Error querying LDRdataFindServer for LFNs with metadata query %s : %s" % (sql, str(output[0]))
msg = "Error querying LDRdataFindServer for LFNs: %s" % (str(output[0],))
def lfnQueryWithMetadata(self, queryList): """ Query LDRdataFindServer to find the LFN(s) with the appropriate metadata values.
81b9d7c7c4404ae1291d87aa24af8d6033789ae8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3589/81b9d7c7c4404ae1291d87aa24af8d6033789ae8/LDRdataFindClient.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 328, 4293, 1138, 1190, 2277, 12, 2890, 16, 843, 682, 4672, 3536, 2770, 511, 6331, 892, 3125, 2081, 358, 1104, 326, 18803, 50, 12, 87, 13, 598, 326, 5505, 1982, 924, 18, 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, 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, 328, 4293, 1138, 1190, 2277, 12, 2890, 16, 843, 682, 4672, 3536, 2770, 511, 6331, 892, 3125, 2081, 358, 1104, 326, 18803, 50, 12, 87, 13, 598, 326, 5505, 1982, 924, 18, 2, -100, -100, ...
t = Template(file=v, searchList=[self.infocollection.get_collection()])
if siz > 0: t = Template(file=v, searchList=[self.infocollection.get_collection()]) else: t = ''
def store_link(args,dirname,fnames): """ This function is used by os.path.walk to collect which config templates should be used for a certain hosttype and host """ temp_level, file_location = args for f in fnames: if os.path.isfile(os.path.join(dirname,f)): file_location[os.path.join(dirname[len(temp_level):],f)] = os.path.join(dirname,f)
9a029d9b7d3c0a1247568f90227035aaa77e6582 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2487/9a029d9b7d3c0a1247568f90227035aaa77e6582/configbuilder.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1707, 67, 1232, 12, 1968, 16, 12287, 16, 74, 1973, 4672, 3536, 1220, 445, 353, 1399, 635, 1140, 18, 803, 18, 11348, 358, 3274, 1492, 642, 5539, 1410, 506, 1399, 364, 279, 8626, 1479, 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, 1707, 67, 1232, 12, 1968, 16, 12287, 16, 74, 1973, 4672, 3536, 1220, 445, 353, 1399, 635, 1140, 18, 803, 18, 11348, 358, 3274, 1492, 642, 5539, 1410, 506, 1399, 364, 279, 8626, 1479, 7...
cls._receivers[sender_id].add(receiver)
cls._receivers[sender_id].add(rcv)
def subscribe(cls,sender,receiver,hold=False): """Call `receiver` with events of this type from `sender`
5259eb938c76c9ba0582d350509eaa9bbbc38af9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/5259eb938c76c9ba0582d350509eaa9bbbc38af9/events.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9129, 12, 6429, 16, 15330, 16, 24454, 16, 21056, 33, 8381, 4672, 3536, 1477, 1375, 24454, 68, 598, 2641, 434, 333, 618, 628, 1375, 15330, 68, 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, 0, 0, 0, 0, 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, 9129, 12, 6429, 16, 15330, 16, 24454, 16, 21056, 33, 8381, 4672, 3536, 1477, 1375, 24454, 68, 598, 2641, 434, 333, 618, 628, 1375, 15330, 68, 2, -100, -100, -100, -100, -100, -100, -100,...
if verbose_description: print >> stream_to_write, verbose_description
if prefix: print >> stream_to_write, prefix
def register_exception(force_stack=False, stream='error', req=None, verbose_description=''): """ log error exception to invenio.err and warning exception to invenio.log errors will be logged with client information (if req is given) @param force_stack: when True stack is always printed, while when False, stack is printed only whenever the Exception type is not containing the word Invenio @param stream: 'error' or 'warning' @param req = mod_python request @param verbose_description a message to be printed before the exception in the log @return 1 if successfully wrote to stream, 0 if not """ exc_info = sys.exc_info() if exc_info[0]: if stream=='error': stream='err' else: stream='log' stream_to_write = open(logdir + '/invenio.' + stream, 'a') # <type 'exceptions.StandardError'> -> exceptions.StandardError exc_name = str(exc_info[0])[7:-2] # exceptions.StandardError -> StandardError if exc_name.startswith('exceptions.'): exc_name = exc_name[11:] exc_value = str(exc_info[1]) print >> stream_to_write, "%(time)s -> %(name)s %(value)s" % { 'time' : time.strftime("%Y-%m-%d %H:%M:%S"), 'name' : exc_name, 'value' : exc_value } if verbose_description: print >> stream_to_write, verbose_description print >> stream_to_write, get_pretty_wide_client_info(req) if not exc_name.startswith('Invenio') or force_stack: tracestack = traceback.extract_stack()[-5:-2] #force traceback except for this call tracestack_pretty = "%sForced traceback (most recent call last)" % (' '*4,) for trace_tuple in tracestack: tracestack_pretty += """ File "%(file)s", line %(line)s, in %(function)s %(text)s""" % \ { 'file' : trace_tuple[0], 'line' : trace_tuple[1], 'function' : trace_tuple[2], 'text' : trace_tuple[3] is not None and str(trace_tuple[3]) or "" } print >> stream_to_write, tracestack_pretty traceback.print_exception(exc_info[0], exc_info[1], exc_info[2], None, stream_to_write) print >> stream_to_write stream_to_write.close() return 1 else: return 0
43574f9c1d9b16eb9ba9893d5b363d9a51a7d754 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12027/43574f9c1d9b16eb9ba9893d5b363d9a51a7d754/errorlib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1744, 67, 4064, 12, 5734, 67, 3772, 33, 8381, 16, 1407, 2218, 1636, 2187, 1111, 33, 7036, 16, 3988, 67, 3384, 2218, 11, 4672, 3536, 613, 555, 1520, 358, 2198, 275, 1594, 18, 370, 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, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1744, 67, 4064, 12, 5734, 67, 3772, 33, 8381, 16, 1407, 2218, 1636, 2187, 1111, 33, 7036, 16, 3988, 67, 3384, 2218, 11, 4672, 3536, 613, 555, 1520, 358, 2198, 275, 1594, 18, 370, 471, ...
self.ignore_local_hold = False
self.ignore_local_unhold = False
def _NH_SIPSessionDidChangeHoldState(self, notification): session = notification.sender if notification.data.on_hold: if notification.data.originator == 'remote': if session is self.active_session: self.output.put('Remote party has put the audio session on hold\n') else: identity = str(session.remote_identity.uri) if session.remote_identity.display_name: identity = '"%s" <%s>' % (session.remote_identity.display_name, identity) self.output.put('%s has put the audio session on hold\n' % identity) elif not self.ignore_local_hold: if session is self.active_session: self.output.put('Audio session is put on hold\n') else: identity = str(session.remote_identity.uri) if session.remote_identity.display_name: identity = '"%s" <%s>' % (session.remote_identity.display_name, identity) self.output.put('Audio session %s is put on hold\n' % identity) else: self.ignore_local_hold = False else: if notification.data.originator == 'remote': if session is self.active_session: self.output.put('Remote party has taken the audio session out of hold\n') else: identity = str(session.remote_identity.uri) if session.remote_identity.display_name: identity = '"%s" <%s>' % (session.remote_identity.display_name, identity) self.output.put('%s has taken the audio session out of hold\n' % identity) elif not self.ignore_local_unhold: if session is self.active_session: self.output.put('Audio session is taken out of hold\n') else: identity = str(session.remote_identity.uri) if session.remote_identity.display_name: identity = '"%s" <%s>' % (session.remote_identity.display_name, identity) self.output.put('Audio session %s is taken out of hold\n' % identity) else: self.ignore_local_hold = False
4de651b3cfcbef33d807eb78f194261b199e86a3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3449/4de651b3cfcbef33d807eb78f194261b199e86a3/sip_audio_session.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 50, 44, 67, 17739, 2157, 18250, 3043, 20586, 1119, 12, 2890, 16, 3851, 4672, 1339, 273, 3851, 18, 15330, 309, 3851, 18, 892, 18, 265, 67, 21056, 30, 309, 3851, 18, 892, 18, 4949, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 50, 44, 67, 17739, 2157, 18250, 3043, 20586, 1119, 12, 2890, 16, 3851, 4672, 1339, 273, 3851, 18, 15330, 309, 3851, 18, 892, 18, 265, 67, 21056, 30, 309, 3851, 18, 892, 18, 4949, ...
lfit = Results(L.lstsq(self.wdesign, Z)[0])
lfit = Results(L.lstsq(self.wdesign, Z)[0], Y)
def est_coef(self, Y): """ Estimate coefficients using lstsq, returning fitted values, Y and coefficients, but initialize is not called so no psuedo-inverse is calculated. """ Z = self.whiten(Y)
af7b6951110ce17903406fde26c729dadde75f31 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/af7b6951110ce17903406fde26c729dadde75f31/regression.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4387, 67, 24305, 12, 2890, 16, 1624, 4672, 3536, 17787, 4988, 14229, 1450, 9441, 11410, 16, 5785, 31379, 924, 16, 1624, 471, 14229, 16, 1496, 4046, 353, 486, 2566, 1427, 1158, 4250, 5957, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4387, 67, 24305, 12, 2890, 16, 1624, 4672, 3536, 17787, 4988, 14229, 1450, 9441, 11410, 16, 5785, 31379, 924, 16, 1624, 471, 14229, 16, 1496, 4046, 353, 486, 2566, 1427, 1158, 4250, 5957, ...
raise except_orm(_('UnknownError'), str(e))
raise
def create(self, cr, uid, vals, context={}): try: res = super(account_invoice, self).create(cr, uid, vals, context) return res except Exception,e: if '"journal_id" viol' in e.args[0]: raise except_orm(_('Configuration Error!'), _('There is no Accounting Journal of type Sale/Purchase defined!')) else: raise except_orm(_('UnknownError'), str(e))
0a33d12afe9dcbb8104212a2de8d821cbba67254 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/0a33d12afe9dcbb8104212a2de8d821cbba67254/invoice.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 12, 2890, 16, 4422, 16, 4555, 16, 5773, 16, 819, 12938, 4672, 775, 30, 400, 273, 2240, 12, 4631, 67, 16119, 16, 365, 2934, 2640, 12, 3353, 16, 4555, 16, 5773, 16, 819, 13, 327, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 752, 12, 2890, 16, 4422, 16, 4555, 16, 5773, 16, 819, 12938, 4672, 775, 30, 400, 273, 2240, 12, 4631, 67, 16119, 16, 365, 2934, 2640, 12, 3353, 16, 4555, 16, 5773, 16, 819, 13, 327, ...
f.write( "\nSession send : %s\n" % str(time.time())) f.write( "Shape : %s:%s:%s\n" % (shape[0], shape[1], shape[2])) f.write( "Type : %s\n" % dtype)
def sendVolume(vol, c, log='report.log', isDti=False): Slicer = __import__ ( "Slicer" ) slicer = Slicer.slicer f = open(log,'w+') name = vol.GetName() data = numpy.empty(0) if not isDti: data = vol.GetImageData().ToArray() else: data = vol.GetImageData().GetPointData().GetTensors().ToArray() shape = data.shape dtype = data.dtype f.write( "\nSession send : %s\n" % str(time.time())) f.write( "Shape : %s:%s:%s\n" % (shape[0], shape[1], shape[2])) f.write( "Type : %s\n" % dtype) org = vol.GetOrigin() f.write( "origin : %s:%s:%s\n" % (org[0], org[1], org[2]) ) spa = vol.GetSpacing() f.write( "spacing : %s:%s:%s\n" % (spa[0], spa[1], spa[2]) ) I2R = numpy.zeros((4,4), 'float') R2I = numpy.zeros((4,4), 'float') i2r = slicer.vtkMatrix4x4() r2i = slicer.vtkMatrix4x4() vol.GetRASToIJKMatrix(r2i) vol.GetIJKToRASMatrix(i2r) for i in range(4): for j in range(4): I2R[i,j] = i2r.GetElement(i,j) R2I[i,j] = r2i.GetElement(i,j) c.send('put\n') ack = c.recv(SIZE) c.send('pipeline STOCHASTIC\n') ack = c.recv(SIZE) c.send('image ' + name + '\n') ack = c.recv(SIZE) c.send('origin ' + str(org[0]) + ' ' + str(org[1]) + ' ' + str(org[2]) + '\n') ack = c.recv(SIZE) c.send('spacing ' + str(spa[0]) + ' ' + str(spa[1]) + ' ' + str(spa[2]) + '\n') ack = c.recv(SIZE) c.send('ijk2ras\n') ack = c.recv(SIZE) c.send(I2R.tostring()) ack = c.recv(SIZE) c.send('components 1\n') ack = c.recv(SIZE) c.send('scalar_type ' + numpy_vtk_types[ str(dtype) ] + '\n') ack = c.recv(SIZE) isDwi = False if len(shape)==4: isDwi = True grad = slicer.vtkDoubleArray() grad = vol.GetDiffusionGradients() G = grad.ToArray() bval = slicer.vtkDoubleArray() bval = vol.GetBValues() b = bval.ToArray() M2R = numpy.zeros((4,4), 'float') m2r = slicer.vtkMatrix4x4() vol.GetMeasurementFrameMatrix(m2r) for i in range(4): for j in range(4): M2R[i,j] = m2r.GetElement(i,j) c.send('kinds dwi\n') ack = c.recv(SIZE) c.send('grads\n') ack = c.recv(SIZE) c.send(G.tostring()) ack = c.recv(SIZE) c.send('bval\n') ack = c.recv(SIZE) c.send(b.tostring()) ack = c.recv(SIZE) c.send('mu\n') ack = c.recv(SIZE) c.send(M2R.tostring()) ack = c.recv(SIZE) c.send('dimensions ' + str(shape[0]) + ' ' + str(shape[1]) + ' ' + str(shape[2]) + ' ' + str(shape[3]) + '\n') ack = c.recv(SIZE) elif len(shape)==2: # dti c.send('kinds dti\n') ack = c.recv(SIZE) c.send('dimensions ' + str(shape[0]) + ' ' + str(shape[1]) + '\n') ack = c.recv(SIZE) else: c.send('kinds scalar\n') ack = c.recv(SIZE) c.send('dimensions ' + str(shape[0]) + ' ' + str(shape[1]) + ' ' + str(shape[2]) + '\n') ack = c.recv(SIZE) if isDwi: f.write("Shape : %s\n" % str(shape[3])) for i in range(shape[3]): c.send(data[..., i].tostring()) if i < shape[3] - 1: ack = c.recv(SIZE) else: c.send(data.tostring()) f.write("completed\n") f.close() return shape, dtype
ee5f3a2ca222b366ec1bc193f9bc78834eeb9a83 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12580/ee5f3a2ca222b366ec1bc193f9bc78834eeb9a83/StochasticTractography.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 4545, 12, 15416, 16, 276, 16, 613, 2218, 6006, 18, 1330, 2187, 353, 40, 9096, 33, 8381, 4672, 225, 9708, 21349, 273, 1001, 5666, 972, 261, 315, 3738, 21349, 6, 262, 2020, 21349, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1366, 4545, 12, 15416, 16, 276, 16, 613, 2218, 6006, 18, 1330, 2187, 353, 40, 9096, 33, 8381, 4672, 225, 9708, 21349, 273, 1001, 5666, 972, 261, 315, 3738, 21349, 6, 262, 2020, 21349, ...
filter=['class'])
filter=['class','associationclass'])
def generateFlavor(self, element, **kw): """this is the all singing all dancing core generator logic for a full featured Flavor """ log.info("%sGenerating flavor '%s'.", ' '*self.infoind, element.getName())
27f08c3143c5e3d992dd78558d10d40c5507300c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11941/27f08c3143c5e3d992dd78558d10d40c5507300c/ArchetypesGenerator.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 2340, 9444, 12, 2890, 16, 930, 16, 2826, 9987, 4672, 3536, 2211, 353, 326, 777, 4864, 310, 777, 302, 304, 2822, 2922, 4456, 4058, 364, 279, 1983, 2572, 72, 3857, 9444, 3536, 613, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2103, 2340, 9444, 12, 2890, 16, 930, 16, 2826, 9987, 4672, 3536, 2211, 353, 326, 777, 4864, 310, 777, 302, 304, 2822, 2922, 4456, 4058, 364, 279, 1983, 2572, 72, 3857, 9444, 3536, 613, ...
flaggedRevsFile = conf.get("wiki", "flaggedrevs")
flaggedRevsFile = conf.get("wiki", "flaggedrevslist")
def __init__(self): home = os.path.dirname(sys.argv[0]) files = [ os.path.join(home, "wikidump.conf"), "/etc/wikidump.conf", os.path.join(os.getenv("HOME"), ".wikidump.conf")] defaults = { #"wiki": { "dblist": "", "privatelist": "", "biglist": "", "dir": "", "forcenormal": "0", "halt": "0", #"output": { "public": "/dumps/public", "private": "/dumps/private", "webroot": "http://localhost/dumps", "index": "index.html", "templatedir": home, #"reporting": { "adminmail": "root@localhost", "mailfrom": "root@localhost", "smtpserver": "localhost", "staleage": "3600", #"database": { "user": "root", "password": "", #"tools": { "php": "php", "bzip2": "bzip2", "sevenzip": "7za", "mysql": "mysql", #"cleanup": { "keep": "3", } conf = ConfigParser.SafeConfigParser(defaults) conf.read(files) self.dbList = dbList(conf.get("wiki", "dblist")) self.privateList = dbList(conf.get("wiki", "privatelist")) biglistFile = conf.get("wiki", "biglist") if biglistFile: self.bigList = dbList(biglistFile) else: self.bigList = [] flaggedRevsFile = conf.get("wiki", "flaggedrevs") if flaggedRevsFile: self.flaggedRevsList = dbList(flaggedRevsFile) else: self.flaggedRevsList = [] self.wikiDir = conf.get("wiki", "dir") self.forceNormal = conf.getint("wiki", "forceNormal") self.halt = conf.getint("wiki", "halt") self.publicDir = conf.get("output", "public") self.privateDir = conf.get("output", "private") self.webRoot = conf.get("output", "webroot") self.index = conf.get("output", "index") self.templateDir = conf.get("output", "templateDir") self.adminMail = conf.get("reporting", "adminmail") self.mailFrom = conf.get("reporting", "mailfrom") self.smtpServer = conf.get("reporting", "smtpserver") self.staleAge = conf.getint("reporting", "staleAge") self.dbUser = conf.get("database", "user") self.dbPassword = conf.get("database", "password") self.php = conf.get("tools", "php") self.bzip2 = conf.get("tools", "bzip2") self.sevenzip = conf.get("tools", "sevenzip") self.mysql = conf.get("tools", "mysql") self.keep = conf.getint("cleanup", "keep")
f075237241fc24f3c92ad18d4956cc5c40d6dec7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9870/f075237241fc24f3c92ad18d4956cc5c40d6dec7/WikiDump.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 6382, 273, 1140, 18, 803, 18, 12287, 12, 9499, 18, 19485, 63, 20, 5717, 1390, 273, 306, 1140, 18, 803, 18, 5701, 12, 8712, 16, 315, 11999, 350, 2801, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4672, 6382, 273, 1140, 18, 803, 18, 12287, 12, 9499, 18, 19485, 63, 20, 5717, 1390, 273, 306, 1140, 18, 803, 18, 5701, 12, 8712, 16, 315, 11999, 350, 2801, ...
if row.startswith('| '): return self._pipe_splitter(row) return self._space_splitter.split(row) def _pipe_splitter(self, row):
if not row.startswith('| '): return self._space_splitter.split(row)
def _split_row(self, row): row = row.rstrip() if row.startswith('| '): return self._pipe_splitter(row) return self._space_splitter.split(row)
206c99ba67bd3661443463c8cc34512f74849549 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6988/206c99ba67bd3661443463c8cc34512f74849549/txtreader.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4939, 67, 492, 12, 2890, 16, 1027, 4672, 1027, 273, 1027, 18, 86, 6406, 1435, 309, 1027, 18, 17514, 1918, 2668, 96, 296, 4672, 327, 365, 6315, 14772, 67, 4939, 387, 12, 492, 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, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4939, 67, 492, 12, 2890, 16, 1027, 4672, 1027, 273, 1027, 18, 86, 6406, 1435, 309, 1027, 18, 17514, 1918, 2668, 96, 296, 4672, 327, 365, 6315, 14772, 67, 4939, 387, 12, 492, 13, ...
if statusSupported.lower() == "true" or\ statusSupported == True or \ statusSupported.lower() == "t":
if type(statusSupported) == type('t') and (statusSupported.lower() == "true" or\ statusSupported.lower() == "t") or \ statusSupported == True:
def __init__(self, Identifier, Title, processVersion="1.0", Abstract="", statusSupported="false", storeSupported="false"): self.Identifier = Identifier self.processVersion = processVersion self.Title = Title self.Abstract = Abstract
02e9b99b54629102fe967dd34565b820233ce445 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/10967/02e9b99b54629102fe967dd34565b820233ce445/process.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 10333, 16, 10984, 16, 1207, 1444, 1546, 21, 18, 20, 3113, 4115, 1546, 3113, 1267, 7223, 1546, 5743, 3113, 1707, 7223, 1546, 5743, 6, 4672, 365, 18, 3004, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1001, 2738, 972, 12, 2890, 16, 10333, 16, 10984, 16, 1207, 1444, 1546, 21, 18, 20, 3113, 4115, 1546, 3113, 1267, 7223, 1546, 5743, 3113, 1707, 7223, 1546, 5743, 6, 4672, 365, 18, 3004, ...
wikitag, wikiurl, wikitail, wikitag_bad = wikiutil.resolve_wiki(self.request, word)
def _interwiki_repl(self, word): """Handle InterWiki links.""" wikitag, wikiurl, wikitail, wikitag_bad = wikiutil.resolve_wiki(self.request, word) return word
8e5afa2fec89b3f85e1e2a6cd4bb9e210c371580 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/888/8e5afa2fec89b3f85e1e2a6cd4bb9e210c371580/wikimarkup_converter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2761, 13044, 67, 26745, 12, 2890, 16, 2076, 4672, 3536, 3259, 5294, 25438, 4716, 12123, 225, 327, 2076, 2, 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, 389, 2761, 13044, 67, 26745, 12, 2890, 16, 2076, 4672, 3536, 3259, 5294, 25438, 4716, 12123, 225, 327, 2076, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
if verticesDict[current] != -1: continue verticesDict[current] = clusterIndex
if clusterDict[current] != -1: continue clusterDict[current] = clusterIndex verticesDict[clusterIndex].append(current)
def enumerateClusters(graph, minimumValidValue): clusterIndex = 1 verticesDict = {} edgesDict = {} for (i,j) in graph.getEdges(): graph[i,j][CLUSTER] = -1 # initialize class cluster for i in range(graph.nVertices): verticesDict[i] = -1 for i in range(graph.nVertices): if graph.getNeighbours(i) == [] or verticesDict[i] != -1: continue edgesDict[clusterIndex] = [] verticesToSearch = [i] while verticesToSearch != []: current = verticesToSearch.pop() if verticesDict[current] != -1: continue verticesDict[current] = clusterIndex for n in graph.getNeighbours(current): if graph[current,n][VALUE] < minimumValidValue: continue if verticesDict[n] == -1: verticesToSearch.append(n) edgesDict[clusterIndex].append((n, current)) graph[current, n][CLUSTER] = clusterIndex clusterIndex += 1 return (edgesDict, verticesDict, clusterIndex-1)
1618dfe9d167f792a4119498d1a371333deb3479 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6366/1618dfe9d167f792a4119498d1a371333deb3479/OWClusterOptimization.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4241, 13698, 12, 4660, 16, 5224, 1556, 620, 4672, 2855, 1016, 273, 404, 6928, 5014, 273, 2618, 5231, 5014, 273, 2618, 364, 261, 77, 16, 78, 13, 316, 2667, 18, 588, 10697, 13332, 2667, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4241, 13698, 12, 4660, 16, 5224, 1556, 620, 4672, 2855, 1016, 273, 404, 6928, 5014, 273, 2618, 5231, 5014, 273, 2618, 364, 261, 77, 16, 78, 13, 316, 2667, 18, 588, 10697, 13332, 2667, ...
try: import ogg.vorbis except: try: import _vorbis except ImportError: msg = _("""You do not have Python Vorbis bindings installed. Others will not be able to see the lengths and the bitrates of Ogg Vorbis files that you share. You can get the from http://www.andrewchatham.com/pyogg/. If you're using Debian, install the python-pyvorbis package. If you're using Gentoo, install nicotine+ with the vorbis USE flag. """) print msg log.append(msg)
def checkenv(log=[]): import sys, string ver = sys.version_info[0]*100+sys.version_info[1]*10+sys.version_info[2] if ver < 220: return _("""You're using an old version of Python interpreter (%s).
3fcfaf824649dc27aa2dd3d1a5740f5c3c1c9b85 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8738/3fcfaf824649dc27aa2dd3d1a5740f5c3c1c9b85/nicotine.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 3074, 12, 1330, 33, 8526, 4672, 225, 1930, 2589, 16, 533, 1924, 273, 2589, 18, 1589, 67, 1376, 63, 20, 5772, 6625, 15, 9499, 18, 1589, 67, 1376, 63, 21, 5772, 2163, 15, 9499, 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, 866, 3074, 12, 1330, 33, 8526, 4672, 225, 1930, 2589, 16, 533, 1924, 273, 2589, 18, 1589, 67, 1376, 63, 20, 5772, 6625, 15, 9499, 18, 1589, 67, 1376, 63, 21, 5772, 2163, 15, 9499, 18...
self.close_connection(client)
client.handle_close()
def close(self): for client in self.clients.values(): self.close_connection(client)
dadd1c1f5b4833892832f68a8c679f9036edfc79 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11722/dadd1c1f5b4833892832f68a8c679f9036edfc79/ipc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1746, 12, 2890, 4672, 364, 1004, 316, 365, 18, 16931, 18, 2372, 13332, 365, 18, 4412, 67, 4071, 12, 2625, 13, 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, 1746, 12, 2890, 4672, 364, 1004, 316, 365, 18, 16931, 18, 2372, 13332, 365, 18, 4412, 67, 4071, 12, 2625, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
self.assert_(True)
pass
def test_Session(self): session = self.conn.createSession() self.assert_(isinstance(session, pyactivemq.Closeable)) self.assert_(isinstance(session, pyactivemq.Session)) self.assert_(not session.transacted) from pyactivemq import AcknowledgeMode ackmode = AcknowledgeMode.AUTO_ACKNOWLEDGE self.assertEqual(ackmode, session.acknowledgeMode) try: session.acknowledgeMode = ackmode self.assert_(False) except AttributeError: # shouldn't be able to set this attribute self.assert_(True) session.close()
495a97b7732a060d96e59c2e67732ce9cdc8c4da /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4509/495a97b7732a060d96e59c2e67732ce9cdc8c4da/test.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 2157, 12, 2890, 4672, 1339, 273, 365, 18, 4646, 18, 2640, 2157, 1435, 365, 18, 11231, 67, 12, 291, 1336, 12, 3184, 16, 2395, 11422, 351, 85, 18, 4605, 429, 3719, 365, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 2157, 12, 2890, 4672, 1339, 273, 365, 18, 4646, 18, 2640, 2157, 1435, 365, 18, 11231, 67, 12, 291, 1336, 12, 3184, 16, 2395, 11422, 351, 85, 18, 4605, 429, 3719, 365, 18, 1...
sys.exit(True)
sys.exit(0)
def main(): parser = OptionParser(usage=u"%prog usage: ttvdb -hdruviomMPFBDS [parameters]\n <series name or 'series and season number' or 'series and season number and episode number'>\n\nFor details on using ttvdb with Mythvideo see the ttvdb wiki page at:\nhttp://www.mythtv.org/wiki/Ttvdb.py") parser.add_option( "-d", "--debug", action="store_true", default=False, dest="debug", help=u"Show debugging info") parser.add_option( "-r", "--raw", action="store_true",default=False, dest="raw", help=u"Dump raw data only") parser.add_option( "-u", "--usage", action="store_true", default=False, dest="usage", help=u"Display examples for executing the ttvdb script") parser.add_option( "-v", "--version", action="store_true", default=False, dest="version", help=u"Display version and author") parser.add_option( "-i", "--interactive", action="store_true", default=False, dest="interactive", help=u"Interaction mode (allows selection of a specific Series)") parser.add_option( "-c", "--configure", metavar="FILE", default="", dest="configure", help=u"Use configuration settings") parser.add_option( "-l", "--language", metavar="LANGUAGE", default=u'en', dest="language", help=u"Select data that matches the specified language fall back to english if nothing found (e.g. 'es' Español, 'de' Deutsch ... etc)") parser.add_option( "-n", "--num_seasons", action="store_true", default=False, dest="num_seasons", help=u"Return the season numbers for a series") parser.add_option( "-t", "--toprated", action="store_true", default=False, dest="toprated", help=u"Only return the top rated graphics for a TV Series") parser.add_option( "-m", "--mythvideo", action="store_true", default=False, dest="mythvideo", help=u"Conform to mythvideo standards when processing -M, -P, -F and -D") parser.add_option( "-M", "--list", action="store_true", default=False, dest="list", help=u"Get matching TV Series list") parser.add_option( "-P", "--poster", action="store_true", default=False, dest="poster", help=u"Get Series Poster URL(s)") parser.add_option( "-F", "--fanart", action="store_true", default=False, dest="fanart", help=u"Get Series fan art URL(s)") parser.add_option( "-B", "--backdrop", action="store_true", default=False, dest="banner", help=u"Get Series banner/backdrop URL(s)") parser.add_option( "-S", "--screenshot", action="store_true", default=False, dest="screenshot", help=u"Get Series episode screenshot URL") parser.add_option( "-D", "--data", action="store_true", default=False, dest="data", help=u"Get Series episode data") parser.add_option( "-N", "--numbers", action="store_true", default=False, dest="numbers", help=u"Get Season and Episode numbers") opts, series_season_ep = parser.parse_args() # Make everything unicode utf8 for index in range(len(series_season_ep)): series_season_ep[index] = unicode(series_season_ep[index], 'utf8') if opts.debug == True: print "opts", opts print "\nargs", series_season_ep # Process version command line requests if opts.version == True: sys.stdout.write("%s (%s) by %s\n" % ( __title__, __version__, __author__ )) sys.exit(True) # Process usage command line requests if opts.usage == True: sys.stdout.write(usage_txt) sys.exit(True) if len(series_season_ep) == 0: parser.error("! No series or series season episode supplied") sys.exit(False) # Default output format of season and episode numbers global season_and_episode_num, screenshot_request season_and_episode_num='S%02dE%02d' # Format output example "S04E12" if opts.numbers == False: if len(series_season_ep) > 1: if not _can_int(series_season_ep[1]): parser.error("! Season is not numeric") sys.exit(False) if len(series_season_ep) > 2: if not _can_int(series_season_ep[2]): parser.error("! Episode is not numeric") sys.exit(False) else: if len(series_season_ep) < 2: parser.error("! An Episode name must be included") sys.exit(False) if len(series_season_ep) == 3: season_and_episode_num = series_season_ep[2] # Override default output format if opts.screenshot: if len(series_season_ep) > 1: if not _can_int(series_season_ep[1]): parser.error("! Season is not numeric") sys.exit(False) if len(series_season_ep) > 2: if not _can_int(series_season_ep[2]): parser.error("! Episode is not numeric") sys.exit(False) if not len(series_season_ep) > 2: parser.error("! Option (-S), episode screenshot search requires Season and Episode numbers") sys.exit(False) screenshot_request = True if opts.debug == True: print series_season_ep if opts.debug == True: print "#"*20 print "# series_season_ep array(",series_season_ep,")" if opts.debug == True: print "#"*20 print "# Starting tvtvb" print "# Processing (%s) Series" % ( series_season_ep[0] ) # List of language from http://www.thetvdb.com/api/0629B785CE550C8D/languages.xml # Hard-coded here as it is realtively static, and saves another HTTP request, as # recommended on http://thetvdb.com/wiki/index.php/API:languages.xml valid_languages = ["da", "fi", "nl", "de", "it", "es", "fr","pl", "hu","el","tr", "ru","he","ja","pt","zh","cs","sl", "hr","ko","en","sv","no"] # Validate language as specified by user if opts.language: for lang in valid_languages: if opts.language == lang: break else: valid_langs = '' for lang in valid_languages: valid_langs+= lang+', ' valid_langs=valid_langs[:-2] sys.stdout.write("! Specified language(%s) must match one of the following languages supported by thetvdb.com wiki:\n (%s)\n" % (opts.language, valid_langs)) sys.exit(False) # Access thetvdb.com API with banners (Posters, Fanart, banners, screenshots) data retrieval enabled if opts.list ==True: t = tvdb_api.Tvdb(banners=False, debug = opts.debug, cache = cache_dir, custom_ui=returnAllSeriesUI, language = opts.language, apikey="0BB856A59C51D607") # thetvdb.com API key requested by MythTV) elif opts.interactive == True: t = tvdb_api.Tvdb(banners=True, debug=opts.debug, interactive=True, select_first=False, cache=cache_dir, actors = True, language = opts.language, apikey="0BB856A59C51D607") # thetvdb.com API key requested by MythTV) else: t = tvdb_api.Tvdb(banners=True, debug = opts.debug, cache = cache_dir, actors = True, language = opts.language, apikey="0BB856A59C51D607") # thetvdb.com API key requested by MythTV) # Determine if there is a SID or a series name to search with global SID SID = False if _can_int(series_season_ep[0]): # if it is numeric then assume it is a series ID number SID = True else: SID = False if opts.debug == True: print "# ..got tvdb mirrors" print "# Start to process series or series_season_ep" print "#"*20 global override override={} # Initialize series name override dictionary # If the user wants Series name overrides and a override file exists then create an overide dictionary if opts.configure != '': if opts.configure[0]=='~': opts.configure=os.path.expanduser("~")+opts.configure[1:] if os.path.exists(opts.configure) == 1: # Do overrides exist? initialize_override_dictionary(opts.configure) else: debuglog("! The specified override file (%s) does not exist" % opts.configure) sys.exit(False) if len(override) == 0: opts.configure = False # Turn off the override option as there is nothing to override # Check if a video name was passed and if so parse it for series name, season and episode numbers if len(series_season_ep) == 1: for r in name_parse: match = r.match(series_season_ep[0]) if match: seriesname, seasno, epno = match.groups() #remove ._- characters from name (- removed only if next to end of line) seriesname = re.sub("[\._]|\-(?=$)", " ", seriesname).strip() series_season_ep = [seriesname, seasno, epno] break # Matched - to the next file! # Fetch a list of matching series names if (opts.list ==True ): try: allSeries=t._getSeries(series_season_ep[0]) except tvdb_shownotfound: sys.exit(True) # No matching series for series_name_sid in allSeries: # list search results print u"%s:%s" % (series_name_sid['sid'], series_name_sid['name']) sys.exit(True) # The Series list option (-M) is the only option honoured when used # Verify that thetvdb.com has the desired series_season_ep. # Exit this module if series_season_ep is not found if opts.numbers == False and opts.num_seasons == False: seriesfound=searchseries(t, opts, series_season_ep) x=1 else: x=[] x.append(series_season_ep[0]) # Only use series name in check seriesfound=searchseries(t, opts, x) # Return the season numbers for a series if opts.num_seasons == True: season_numbers='' for x in seriesfound.keys(): season_numbers+='%d,' % x print season_numbers[:-1] sys.exit(True) # Option (-n) is the only option honoured when used # Dump information accessable for a Series and ONLY first season of episoded data if opts.debug == True: print "#"*20 print "# Starting Raw keys call" print "Lvl #1:" # Seasons for series x = t[series_season_ep[0]].keys() print t[series_season_ep[0]].keys() print "#"*20 print "Lvl #2:" # Episodes for each season for y in x: print t[series_season_ep[0]][y].keys() print "#"*20 print "Lvl #3:" # Keys for each episode within the 1st season z = t[series_season_ep[0]][1].keys() for aa in z: print t[series_season_ep[0]][1][aa].keys() print "#"*20 print "Lvl #4:" # Available data for each episode in 1st season for aa in z: codes = t[series_season_ep[0]][1][aa].keys() print "\n\nStart:" for c in codes: print "="*50 print 'Key Name=('+c+'):' print t[series_season_ep[0]][1][aa][c] print "="*50 print "#"*20 sys.exit (True) if opts.numbers == True: # Fetch and output season and episode numbers Getseries_episode_numbers(t, opts, series_season_ep) sys.exit(True) # The Numbers option (-N) is the only option honoured when used if opts.data or screenshot_request: # Fetch and output episode data if opts.mythvideo: if len(series_season_ep) != 3: print u"Season and Episode numbers required." else: Getseries_episode_data(t, opts, series_season_ep, language=opts.language) else: Getseries_episode_data(t, opts, series_season_ep, language=opts.language) # Fetch the requested graphics URL(s) if opts.debug == True: print "#"*20 print "# Checking if Posters, Fanart or Banners are available" print "#"*20 if opts.configure != "" and override.has_key(series_season_ep[0].lower()): banners_keys = search_for_series(t, override[series_season_ep[0].lower()][0])['_banners'].keys() else: banners_keys = search_for_series(t, series_season_ep[0])['_banners'].keys() banner= False poster= False fanart= False for x in banners_keys: # Determine what type of graphics is available if x == fanart_key: fanart=True elif x== poster_key: poster=True elif x==season_key or x==banner_key: banner=True # Make sure that some graphics URL(s) (Posters, FanArt or Banners) are available if ( fanart!=True and poster!=True and banner!=True ): sys.exit(True) if opts.debug == True: print "#"*20 print "# One or more of Posters, Fanart or Banners are available" print "#"*20 # Determine if graphic URL identification output is required if opts.data: # Along with episode data get all graphics opts.poster = True opts.fanart = True opts.banner = True single_option = True opts.toprated = False fanart, banner, poster = (True, True, True) else: y=0 single_option=True if opts.poster==True: y+=1 if opts.fanart==True: y+=1 if opts.banner==True: y+=1 # Determine if only top rated by thetvdb.com graphics has been requested: if opts.toprated == True: series_name='' if opts.configure != "" and override.has_key(series_season_ep[0].lower()): series_name=override[series_season_ep[0].lower()][0] # Override series name else: series_name=series_season_ep[0] # Leave the series name alone if opts.poster==True: if search_for_series(t, series_name)['poster'] != None: if single_option==True: print (search_for_series(t, series_name)['poster']).replace(http_find, http_replace) else: print u"Coverart:%s" % (search_for_series(t, series_name)['poster']).replace(http_find, http_replace) if opts.fanart==True: if search_for_series(t, series_name)['fanart'] != None: if single_option==True: print (search_for_series(t, series_name)['fanart']).replace(http_find, http_replace) else: print u"Fanart:%s" % (search_for_series(t, series_name)['fanart']).replace(http_find, http_replace) if opts.banner==True: if search_for_series(t, series_name)['banner'] != None: if single_option==True: print (search_for_series(t, series_name)['banner']).replace(http_find, http_replace) else: print u"Banner:%s" % (search_for_series(t, series_name)['banner']).replace(http_find, http_replace) sys.exit(True) # Only the top rated for a TV Series is returned if (poster==True and opts.poster==True and opts.raw!=True): # Get posters and send to stdout season_poster_found = False if opts.mythvideo: if len(series_season_ep) < 2: print u"Season and Episode numbers required." sys.exit(True) all_posters = u'Coverart:' all_empty = len(all_posters) for p in get_graphics(t, opts, series_season_ep, poster_type, single_option, opts.language): all_posters = all_posters+p+u',' season_poster_found = True if season_poster_found == False: # If there were no season posters get the series top poster series_name='' if opts.configure != "" and override.has_key(series_season_ep[0].lower()): series_name=override[series_season_ep[0].lower()][0] # Override series name else: series_name=series_season_ep[0] # Leave the series name alone for p in get_graphics(t, opts, [series_name], poster_type, single_option, opts.language): all_posters = all_posters+p+u',' if len(all_posters) > all_empty: if all_posters[-1] == u',': print all_posters[:-1] else: print all_posters if (fanart==True and opts.fanart==True and opts.raw!=True): # Get Fan Art and send to stdout all_fanart = u'Fanart:' all_empty = len(all_fanart) for f in get_graphics(t, opts, series_season_ep, fanart_type, single_option, opts.language): all_fanart = all_fanart+f+u',' if len(all_fanart) > all_empty: if all_fanart[-1] == u',': print all_fanart[:-1] else: print all_fanart if (banner==True and opts.banner==True and opts.raw!=True): # Also change to get ALL Series graphics season_banner_found = False if opts.mythvideo: if len(series_season_ep) < 2: print u"Season and Episode numbers required." sys.exit(True) all_banners = u'Banner:' all_empty = len(all_banners) for b in get_graphics(t, opts, series_season_ep, banner_type, single_option, opts.language): all_banners = all_banners+b+u',' season_banner_found = True if not season_banner_found: # If there were no season banner get the series top banner series_name='' if opts.configure != "" and override.has_key(series_season_ep[0].lower()): series_name=override[series_season_ep[0].lower()][0] # Override series name else: series_name=series_season_ep[0] # Leave the series name alone for b in get_graphics(t, opts, [series_name], banner_type, single_option, opts.language): all_banners = all_banners+b+u',' if len(all_banners) > all_empty: if all_banners[-1] == u',': print all_banners[:-1] else: print all_banners if opts.debug == True: print "#"*20 print "# Processing complete" print "#"*20 sys.exit(True)
5be61520a0a3d60abf11f719e6c9c43d73baab36 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/13713/5be61520a0a3d60abf11f719e6c9c43d73baab36/ttvdb.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 2082, 273, 18862, 12, 9167, 33, 89, 28385, 14654, 4084, 30, 3574, 90, 1966, 300, 16587, 89, 522, 362, 4566, 22201, 3948, 306, 3977, 13944, 82, 411, 10222, 508, 578, 296, 102...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2082, 273, 18862, 12, 9167, 33, 89, 28385, 14654, 4084, 30, 3574, 90, 1966, 300, 16587, 89, 522, 362, 4566, 22201, 3948, 306, 3977, 13944, 82, 411, 10222, 508, 578, 296, 102...
self.socket.close()
def process_request(self, request, client_address): """Fork a new subprocess to process the request.""" self.collect_children() pid = os.fork() if pid: # Parent process if self.active_children is None: self.active_children = [] self.active_children.append(pid) return else: # Child process. # This must never return, hence os._exit()! try: self.finish_request(request, client_address) os._exit(0) except: try: self.socket.close() self.handle_error(request, client_address) finally: os._exit(1)
6ec14cd04a1e2ab54a9e9e77350d34bbbf039414 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/6ec14cd04a1e2ab54a9e9e77350d34bbbf039414/SocketServer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 2293, 12, 2890, 16, 590, 16, 1004, 67, 2867, 4672, 3536, 22662, 279, 394, 6652, 358, 1207, 326, 590, 12123, 365, 18, 14676, 67, 5906, 1435, 4231, 273, 1140, 18, 23335, 1435, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2293, 12, 2890, 16, 590, 16, 1004, 67, 2867, 4672, 3536, 22662, 279, 394, 6652, 358, 1207, 326, 590, 12123, 365, 18, 14676, 67, 5906, 1435, 4231, 273, 1140, 18, 23335, 1435, ...
def do_query(self, query, repos=self._repo_list.repos):
def do_query(self, query, repos):
def do_query(self, query, repos=self._repo_list.repos): """ Do a query. Arguments: query - the searched term repos - a list of repositories, which will be searched (default all avaliable repositories) """ result = Result( self._result_list, self._result_list2) if repos == None: return None if not haattr(repos, '__iter__'): repos = (repos, ) for repo in repos: result.add_rows(self._query(repo, query)) return result
ba15adb8906e7086e154041ef5caa47650535e27 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8331/ba15adb8906e7086e154041ef5caa47650535e27/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 2271, 12, 2890, 16, 843, 16, 13686, 4672, 3536, 2256, 279, 843, 18, 13599, 30, 843, 300, 326, 19242, 2481, 13686, 300, 279, 666, 434, 14531, 16, 1492, 903, 506, 19242, 261, 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, 741, 67, 2271, 12, 2890, 16, 843, 16, 13686, 4672, 3536, 2256, 279, 843, 18, 13599, 30, 843, 300, 326, 19242, 2481, 13686, 300, 279, 666, 434, 14531, 16, 1492, 903, 506, 19242, 261, 18...
def _check_certificat(self, cr, uid, ids):
def _check_certificate(self, cr, uid, ids):
def _check_certificat(self, cr, uid, ids): if not ids: return True
5418bf7003f9733309f8b82e9ed86e9af25aa71a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/5418bf7003f9733309f8b82e9ed86e9af25aa71a/module.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1893, 67, 14108, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 4672, 309, 486, 3258, 30, 327, 1053, 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, 389, 1893, 67, 14108, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 4672, 309, 486, 3258, 30, 327, 1053, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
self.local_vars[jvar.name] = idx self.function_arguments.append((jtype, idx))
self.local_vars[jvar.name] = (idx, jtype) if is_param: self.function_arguments.append((jtype, idx))
def add_var(self, jvar, jtype): """ Adds new entry for variable 'jvar', of java type 'jtype' """ idx = self.next_offset self.next_offset += jtype.descriptor.type_width() if jvar: assert jvar.name not in self.local_vars # never been added before self.local_vars[jvar.name] = idx self.function_arguments.append((jtype, idx)) return idx
73b1a43cd7b4cc2fcffbe1562f79e9765c59b941 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6934/73b1a43cd7b4cc2fcffbe1562f79e9765c59b941/generator.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 1401, 12, 2890, 16, 525, 1401, 16, 525, 723, 4672, 3536, 15605, 394, 1241, 364, 2190, 296, 78, 1401, 2187, 434, 2252, 618, 296, 78, 723, 11, 3536, 2067, 273, 365, 18, 4285, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 527, 67, 1401, 12, 2890, 16, 525, 1401, 16, 525, 723, 4672, 3536, 15605, 394, 1241, 364, 2190, 296, 78, 1401, 2187, 434, 2252, 618, 296, 78, 723, 11, 3536, 2067, 273, 365, 18, 4285, ...
readwarnings(args[0]) def usage(exit, msg=None): if msg: sys.stderr.write("%s: %s\n" % (sys.argv[0], msg))
warnings = readwarnings(args[0]) if warnings is None: return 1 files = warnings.keys() if not files: print "No classic division warnings read from", args[0] return files.sort() exit = None for file in files: x = process(file, warnings[file]) exit = exit or x return exit def usage(msg): sys.stderr.write("%s: %s\n" % (sys.argv[0], msg))
def main(): try: opts, args = getopt.getopt(sys.argv[1:], "h") except getopt.error, msg: usage(2, msg) for o, a in opts: if o == "-h": help() if not args: usage(2, "at least one file argument is required") if args[1:]: sys.stderr.write("%s: extra file arguments ignored\n", sys.argv[0]) readwarnings(args[0])
13c51ecb8c5b70f83f746db9af759b9d6a590769 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/13c51ecb8c5b70f83f746db9af759b9d6a590769/fixdiv.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 775, 30, 1500, 16, 833, 273, 336, 3838, 18, 588, 3838, 12, 9499, 18, 19485, 63, 21, 30, 6487, 315, 76, 7923, 1335, 336, 3838, 18, 1636, 16, 1234, 30, 4084, 12, 22, 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, 2774, 13332, 775, 30, 1500, 16, 833, 273, 336, 3838, 18, 588, 3838, 12, 9499, 18, 19485, 63, 21, 30, 6487, 315, 76, 7923, 1335, 336, 3838, 18, 1636, 16, 1234, 30, 4084, 12, 22, 16, ...
self.log.error( 'Failed to retrieve %(diracInstallFileName)s from %(diracInstallUrl)s' % {'diracInstallFileName':self.diracInstallFileName, 'diracInstallUrl':self.diracInstallURL} )
self.log.error( 'Failed to retrieve %(diracInstallFileName)s from %(diracInstallUrl)s' % { 'diracInstallFileName':self.diracInstallFileName, 'diracInstallUrl':self.diracInstallURL } )
def initialize( self, loops = 0 ): """Sets default parameters and creates CE instance """ self.maxcount = loops
0bd90b0eab10b2108384fa9fd724e81211bc1a92 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/0bd90b0eab10b2108384fa9fd724e81211bc1a92/DiracSiteAgent.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4046, 12, 365, 16, 14075, 273, 374, 262, 30, 3536, 2785, 805, 1472, 471, 3414, 29538, 791, 3536, 365, 18, 1896, 1883, 273, 14075, 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, 0, 0, 0, 0, 0, 0, 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, 4046, 12, 365, 16, 14075, 273, 374, 262, 30, 3536, 2785, 805, 1472, 471, 3414, 29538, 791, 3536, 365, 18, 1896, 1883, 273, 14075, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
system(NMAKE + "/f python9.mak clean") system(NMAKE + "/f python9.mak MACHINE=%s" % machine) system(NMAKE + "/f python9.mak install")
nmake("python9.mak", "clean") nmake("python9.mak", MACHINE=machine) nmake("python9.mak", "install")
def build(platform, clean): if platform == "Win32": dest = os.path.join(ROOT, "tcltk") machine = "X86" elif platform == "x64": dest = os.path.join(ROOT, "tcltk64") machine = "X64" else: raise ValueError(platform) # TCL tcldir = os.path.join(ROOT, TCL) if True: os.chdir(os.path.join(tcldir, "win")) if clean: system(NMAKE + "/f makefile.vc clean") system(NMAKE + "/f makefile.vc") system(NMAKE + "/f makefile.vc INSTALLDIR=%s install" % dest) # TK if True: os.chdir(os.path.join(ROOT, TK, "win")) if clean: system(NMAKE + "/f makefile.vc clean") system(NMAKE + "/f makefile.vc TCLDIR=%s" % tcldir) system(NMAKE + "/f makefile.vc TCLDIR=%s INSTALLDIR=%s install" % (tcldir, dest)) # TIX if True: # python9.mak is available at http://svn.python.org os.chdir(os.path.join(ROOT, TIX, "win")) if clean: system(NMAKE + "/f python9.mak clean") system(NMAKE + "/f python9.mak MACHINE=%s" % machine) system(NMAKE + "/f python9.mak install")
8affb5f2360c057176c820efc425906bdb36ee49 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8546/8affb5f2360c057176c820efc425906bdb36ee49/build_tkinter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 12, 9898, 16, 2721, 4672, 309, 4072, 422, 315, 18049, 1578, 6877, 1570, 273, 1140, 18, 803, 18, 5701, 12, 9185, 16, 315, 88, 830, 16099, 7923, 5228, 273, 315, 60, 5292, 6, 1327, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1361, 12, 9898, 16, 2721, 4672, 309, 4072, 422, 315, 18049, 1578, 6877, 1570, 273, 1140, 18, 803, 18, 5701, 12, 9185, 16, 315, 88, 830, 16099, 7923, 5228, 273, 315, 60, 5292, 6, 1327, ...
""" % {'servername': conf.get('Invenio', 'CFG_SITE_URL_SECURE').replace("http://", ""), 'serveralias': conf.get('Invenio', 'CFG_SITE_URL_SECURE').replace("http://", "").split('.')[0],
""" % {'servername': conf.get('Invenio', 'CFG_SITE_SECURE_URL').replace("http://", ""), 'serveralias': conf.get('Invenio', 'CFG_SITE_SECURE_URL').replace("http://", "").split('.')[0],
def cli_cmd_create_apache_conf(conf): """ Create Apache conf files for this site, keeping previous files in a backup copy. """ print ">>> Going to create Apache conf files..." from invenio.textutils import wrap_text_in_a_box apache_conf_dir = conf.get("Invenio", 'CFG_ETCDIR') + \ os.sep + 'apache' if not os.path.exists(apache_conf_dir): os.mkdir(apache_conf_dir) apache_vhost_file = apache_conf_dir + os.sep + \ 'invenio-apache-vhost.conf' apache_vhost_ssl_file = apache_conf_dir + os.sep + \ 'invenio-apache-vhost-ssl.conf' apache_vhost_body = """\
53678c49b4e7e16ae575471d6ff474c537c531ab /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12027/53678c49b4e7e16ae575471d6ff474c537c531ab/inveniocfg.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4942, 67, 4172, 67, 2640, 67, 19211, 67, 3923, 12, 3923, 4672, 3536, 1788, 24840, 2195, 1390, 364, 333, 2834, 16, 19966, 2416, 1390, 316, 279, 5114, 1610, 18, 3536, 1172, 315, 23012, 422...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4942, 67, 4172, 67, 2640, 67, 19211, 67, 3923, 12, 3923, 4672, 3536, 1788, 24840, 2195, 1390, 364, 333, 2834, 16, 19966, 2416, 1390, 316, 279, 5114, 1610, 18, 3536, 1172, 315, 23012, 422...
for other in self:
while True: other = self.first() if other is None: break
def _clearRefs(self):
18b314e0cf544be4325b6393669c99e0a843f372 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9228/18b314e0cf544be4325b6393669c99e0a843f372/RefCollections.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8507, 9837, 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, 0,...
[ 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, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8507, 9837, 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, -1...
anchor=NSEW (or subset) - position anchor according to given direction
anchor=NSEW (or subset) - position anchor according to given direction
def place_configure(self, cnf={}, **kw): """Place a widget in the parent widget. Use as options: in=master - master relative to which the widget is placed. x=amount - locate anchor of this widget at position x of master y=amount - locate anchor of this widget at position y of master relx=amount - locate anchor of this widget between 0.0 and 1.0 relative to width of master (1.0 is right edge) rely=amount - locate anchor of this widget between 0.0 and 1.0 relative to height of master (1.0 is bottom edge) anchor=NSEW (or subset) - position anchor according to given direction width=amount - width of this widget in pixel height=amount - height of this widget in pixel relwidth=amount - width of this widget between 0.0 and 1.0 relative to width of master (1.0 is the same width as the master) relheight=amount - height of this widget between 0.0 and 1.0 relative to height of master (1.0 is the same height as the master) bordermode="inside" or "outside" - whether to take border width of master widget into account """ for k in ['in_']: if kw.has_key(k): kw[k[:-1]] = kw[k] del kw[k] self.tk.call( ('place', 'configure', self._w) + self._options(cnf, kw))
eb2c0a4bc6aefd487ac6f4a699d330514052134a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8125/eb2c0a4bc6aefd487ac6f4a699d330514052134a/Tkinter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3166, 67, 14895, 12, 2890, 16, 23118, 28793, 2826, 9987, 4672, 3536, 6029, 279, 3604, 316, 326, 982, 3604, 18, 2672, 487, 702, 30, 316, 33, 7525, 300, 4171, 3632, 358, 1492, 326, 3604, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3166, 67, 14895, 12, 2890, 16, 23118, 28793, 2826, 9987, 4672, 3536, 6029, 279, 3604, 316, 326, 982, 3604, 18, 2672, 487, 702, 30, 316, 33, 7525, 300, 4171, 3632, 358, 1492, 326, 3604, ...
nothing is done.
nothing is done, unless the config options ('config' command) are changed.
def formvalue(formname, fieldname, value): """ >> formvalue <formname> <field> <value> Set value of a form field. There are some ambiguities in the way formvalue deals with lists: 'fv' will *add* the given value to a multilist. Formvalue ignores read-only fields completely; if they're readonly, nothing is done. Available as 'fv' as well. """ form = browser.get_form(formname) control = browser.get_form_field(form, fieldname) if control: browser.clicked(form, control) if control.readonly: return set_form_control_value(control, value) else: print 'NO SUCH FIELD FOUND / MULTIPLE MATCHES TO NAME' assert 0
05f845006f6bc27c423f1148b08b0e7a868d9b54 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8598/05f845006f6bc27c423f1148b08b0e7a868d9b54/commands.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 646, 1132, 12, 687, 529, 16, 14680, 16, 460, 4672, 3536, 1671, 646, 1132, 411, 687, 529, 34, 411, 1518, 34, 411, 1132, 34, 225, 1000, 460, 434, 279, 646, 652, 18, 225, 6149, 854, 269...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 646, 1132, 12, 687, 529, 16, 14680, 16, 460, 4672, 3536, 1671, 646, 1132, 411, 687, 529, 34, 411, 1518, 34, 411, 1132, 34, 225, 1000, 460, 434, 279, 646, 652, 18, 225, 6149, 854, 269...
return base64.b64encode(hashed.digest())
return binascii.b2a_base64(hashed.digest())[:-1]
def build_signature(self, oauth_request, consumer, token): # build the base signature string key, raw = self.build_signature_base_string(oauth_request, consumer, token)
6693d442ced806c6c8cda35b96d4347a543dcae0 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1598/6693d442ced806c6c8cda35b96d4347a543dcae0/oauth.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 67, 8195, 12, 2890, 16, 6924, 67, 2293, 16, 4765, 16, 1147, 4672, 468, 1361, 326, 1026, 3372, 533, 498, 16, 1831, 273, 365, 18, 3510, 67, 8195, 67, 1969, 67, 1080, 12, 7280, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 67, 8195, 12, 2890, 16, 6924, 67, 2293, 16, 4765, 16, 1147, 4672, 468, 1361, 326, 1026, 3372, 533, 498, 16, 1831, 273, 365, 18, 3510, 67, 8195, 67, 1969, 67, 1080, 12, 7280, 67...