rem
stringlengths
2
226k
add
stringlengths
0
227k
context
stringlengths
8
228k
meta
stringlengths
156
215
input_ids
list
attention_mask
list
labels
list
log_filename = ("scp-%s-%s.log" % (self.name, kvm_utils.generate_random_string(4)))
def copy_files_from(self, remote_path, local_path, nic_index=0, timeout=600): """ Transfer files from the guest.
e2977ee903f7ba9df5910096ad0633a51b664b36 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12268/e2977ee903f7ba9df5910096ad0633a51b664b36/kvm_vm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1610, 67, 2354, 67, 2080, 12, 2890, 16, 2632, 67, 803, 16, 1191, 67, 803, 16, 11562, 67, 1615, 33, 20, 16, 2021, 33, 28133, 4672, 3536, 12279, 1390, 628, 326, 13051, 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, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1610, 67, 2354, 67, 2080, 12, 2890, 16, 2632, 67, 803, 16, 1191, 67, 803, 16, 11562, 67, 1615, 33, 20, 16, 2021, 33, 28133, 4672, 3536, 12279, 1390, 628, 326, 13051, 18, 2, -100, -10...
filenames.extend(tlines)
if tlines: filenames = tlines
def OnData(self, x, y, d): # when we are a drag source, we get blocked throughout the # drag, which means that our picked_cobject doesn't get # updated, which means that drops on glyphs don't get handled. # so here we make sure that the correct picked_cobject is # selected right before we actually handle the drop: self._graphEditor.canvas.update_picked_cobject_at_drop(x, y) if self.GetData(): # single line starting with 'module:' OR # single line starting with 'segment:' OR # multiple lines (with newlines), each specifying a # filename (URI) text = self._tdo.GetText() # array of unicode filenames filenames = self._fdo.GetFilenames() if len(text) > 0: # set the string to zero so we know what to do when self._tdo.SetText('') tlines = self._graphEditor.canvasDropText(x,y,text) # if text is NOT a segment or module spec, # canvasDropText will return an array of text lines # we assume that these could be filenames filenames.extend(tlines)
504f26146a701d7a86cb4abeab22a412290c9db7 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4494/504f26146a701d7a86cb4abeab22a412290c9db7/graph_editor.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2755, 751, 12, 2890, 16, 619, 16, 677, 16, 302, 4672, 468, 1347, 732, 854, 279, 8823, 1084, 16, 732, 336, 14547, 3059, 659, 326, 468, 8823, 16, 1492, 4696, 716, 3134, 25534, 67, 71, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2755, 751, 12, 2890, 16, 619, 16, 677, 16, 302, 4672, 468, 1347, 732, 854, 279, 8823, 1084, 16, 732, 336, 14547, 3059, 659, 326, 468, 8823, 16, 1492, 4696, 716, 3134, 25534, 67, 71, ...
table:style-name="table-default.cell-C4">
table:style-name="table-default.cell-C2">
def test_table_thead_no_tbody(self): """Test <thead> tag without <tbody>""" html = """<html xmlns="http://www.w3.org/1999/xhtml"> <table> <thead> <tr> <th>Cell1</th> <th>Cell2</th> </tr> </thead> <tr> <td>Cell3</td> <td>Cell4</td> </tr> </table> </html> """ odt = xhtml2odt(html) # remove namespaces odt = re.sub('(xmlns:[a-z0-9=:".-]+\s+)*', '', str(odt)) # remove comments odt = re.sub('(<!--[a-z0-9=-]+-->)*', '', odt) print odt assert re.search(r""" <table:table \s+ table:style-name="table-default"> \s* <table:table-column \s+ table:number-columns-repeated="2"/> \s* <table:table-header-rows> \s* <table:table-row> \s*
3cc3d03720f39c36a6c4059ab97c21fe3ef8f42c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7063/3cc3d03720f39c36a6c4059ab97c21fe3ef8f42c/test_tables.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 2121, 67, 24604, 67, 2135, 67, 20779, 12, 2890, 4672, 3536, 4709, 411, 24604, 34, 1047, 2887, 411, 20779, 2984, 3660, 1729, 273, 3536, 32, 2620, 12302, 1546, 2505, 2207, 5591, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2121, 67, 24604, 67, 2135, 67, 20779, 12, 2890, 4672, 3536, 4709, 411, 24604, 34, 1047, 2887, 411, 20779, 2984, 3660, 1729, 273, 3536, 32, 2620, 12302, 1546, 2505, 2207, 5591, ...
assy.addmol(mol) mol.moveto(curgrp) mol = None
mol = _addMolecule(mol, assy, curgrp)
def _readmmp(assy, filnam, isInsert = False): """The routine to actually reading a mmp file and save data into data structure """ #bruce 041011: added 'U' to file mode, for universal newline support. l=open(filnam,"rU").readlines() if not isInsert: assy.filename=filnam mol = None ndix={} assy.alist = [] #assy.tree = Group("Root", assy, None) groupstack = [] grouplist = [] opengroup = None for card in l: key=keypat.match(card) if not key: continue key = key.group(0) if key == "group": # Group of Molecules and/or Groups name = getname(card, "Grp") opengroup = Group(name, assy, opengroup)#assy.tree) if not groupstack: grouplist += [opengroup] groupstack = [(opengroup, name)] + groupstack if key == "egroup": # Group of Molecules and/or Groups name = getname(card, "Grp") curgrp, curnam = groupstack[0] if name != curnam: print "mismatched group records:", name, curnam break if mol: assy.addmol(mol) mol.moveto(curgrp) mol = None groupstack = groupstack[1:] if groupstack: opengroup, junk = groupstack[0] else: opengroup = None elif key=="mol": if mol: assy.addmol(mol) mol.moveto(opengroup) mol = None name = getname(card, "Mole") mol=molecule(assy, name) disp = molpat.match(card) if disp: try: mol.setDisplay(dispNames.index(disp.group(1))) except ValueError: pass else: mol.setDisplay(diDEFAULT) elif key == "atom": m=atom1pat.match(card) if not m: print card n=int(m.group(1)) sym=PeriodicTable[int(m.group(2))].symbol xyz=A(map(float, [m.group(3),m.group(4),m.group(5)]))/1000.0 a = atom(sym, xyz, mol) disp = atom2pat.match(card) if disp: try: a.setDisplay(dispNames.index(disp.group(1))) except ValueError: pass assy.alist += [a] ndix[n]=a prevatom=a prevcard = card elif key == "bond1": list=map(int, re.findall("\d+",card[5:])) try: for a in map((lambda n: ndix[n]), list): mol.bond(prevatom, a) except KeyError: print "error in MMP file: atom ", prevcard print card # Read the MMP record for a Rotary Motor as: # rmotor (name) (r, g, b) torque speed (cx, cy, cz) (ax, ay, az) elif key == "rmotor": if mol: assy.addmol(mol) mol.moveto(opengroup) mol = None m=rmotpat.match(card) name = m.group(1) col=map(lambda (x): int(x)/255.0, [m.group(2),m.group(3),m.group(4)]) torq=float(m.group(5)) sped=float(m.group(6)) cxyz=A(map(float, [m.group(7),m.group(8),m.group(9)]))/1000.0 axyz=A(map(float, [m.group(10),m.group(11),m.group(12)]))/1000.0 prevmotor=RotaryMotor(assy) prevmotor.setProps(name, col, torq, sped, cxyz, axyz) opengroup.addmember(prevmotor) elif key == "shaft": list = map(int, re.findall("\d+",card[6:])) list = map((lambda n: ndix[n]), list) prevmotor.setShaft(list) # Read the MMP record for a Linear Motor as: # lmotor (name) (r, g, b) force stiffness (cx, cy, cz) (ax, ay, az) elif key == "lmotor": if mol: assy.addmol(mol) mol.moveto(opengroup) mol = None m=lmotpat.match(card) name = m.group(1) col=map(lambda (x): int(x)/255.0, [m.group(2),m.group(3),m.group(4)]) force=float(m.group(5)) stiffness=float(m.group(6)) cxyz=A(map(float, [m.group(7),m.group(8),m.group(9)]))/1000.0 axyz=A(map(float, [m.group(10),m.group(11),m.group(12)]))/1000.0 prevmotor=LinearMotor(assy) prevmotor.setProps(name, col, force, stiffness, cxyz, axyz) opengroup.addmember(prevmotor) # Read the MMP record for a Ground as: # ground (name) (r, g, b) atom1 atom2 ... atom25 {up to 25} elif key == "ground": if mol: assy.addmol(mol) mol.moveto(opengroup) mol = None m=grdpat.match(card) name = m.group(1) col=map(lambda (x): int(x)/255.0, [m.group(2),m.group(3),m.group(4)]) # Read in the list of atoms card =card[card.index(")")+1:] # skip past the color field list = map(int, re.findall("\d+",card[card.index(")")+1:])) list = map((lambda n: ndix[n]), list) gr = Ground(assy, list) # create ground and set props gr.name=name gr.color=col opengroup.addmember(gr) # Read the MMP record for a Thermostat as: # stat (name) (r, g, b) (temp) atom1 atom2 ... atom25 {up to 25} elif key == "stat": if mol: assy.addmol(mol) mol.moveto(opengroup) mol = None m=statpat.match(card) name = m.group(1) col=map(lambda (x): int(x)/255.0, [m.group(2),m.group(3),m.group(4)]) temp=m.group(5) # Read in the list of atoms card =card[card.index(")")+1:] # skip past the color field card =card[card.index(")")+1:] # skip past the temp field list = map(int, re.findall("\d+",card[card.index(")")+1:])) list = map((lambda n: ndix[n]), list) sr = Stat(assy, list) # create stat and set props sr.name=name sr.color=col sr.temp=temp opengroup.addmember(sr) elif key == "shaft": list = map(int, re.findall("\d+",card[6:])) list = map((lambda n: ndix[n]), list) prevmotor.setShaft(list) elif key=="csys": # Coordinate System if not isInsert: #Skip this record if inserting m=re.match(csyspat,card) name=m.group(1) wxyz = A(map(float, [m.group(2), m.group(3), m.group(4), m.group(5)])) scale=float(m.group(6)) assy.csys = Csys(assy, name, scale, wxyz) opengroup.addmember(assy.csys) elif key=="datum": # Datum object if not isInsert: #Skip this record if inserting if mol: assy.addmol(mol) mol.moveto(opengroup) mol = None m=re.match(datumpat,card) if not m: print card continue name=m.group(1) type=m.group(5) col = tuple(map(int, [m.group(2), m.group(3), m.group(4)])) vec1 = A(map(float, [m.group(6), m.group(7), m.group(8)])) vec2 = A(map(float, [m.group(9), m.group(10), m.group(11)])) vec3 = A(map(float, [m.group(12), m.group(13), m.group(14)])) new = Datum(assy,name,type,vec1,vec2,vec3) opengroup.addmember(new) new.rgb = col elif key=="waals": # van der Waals Interactions pass # code was wrong -- to be implemented later elif key=="kelvin": # Temperature in Kelvin if not isInsert: #Skip this record if inserting m = re.match("kelvin (\d+)",card) n = int(m.group(1)) assy.temperature = n return grouplist
fb6c9c504f671cac1731613196f6f8f4e6c84063 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/fb6c9c504f671cac1731613196f6f8f4e6c84063/fileIO.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 896, 81, 1291, 12, 428, 93, 16, 661, 17808, 16, 353, 4600, 273, 1083, 4672, 3536, 1986, 12245, 358, 6013, 6453, 279, 312, 1291, 585, 471, 1923, 501, 1368, 501, 3695, 3536, 468, 28...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 896, 81, 1291, 12, 428, 93, 16, 661, 17808, 16, 353, 4600, 273, 1083, 4672, 3536, 1986, 12245, 358, 6013, 6453, 279, 312, 1291, 585, 471, 1923, 501, 1368, 501, 3695, 3536, 468, 28...
pos3 = self.fp.tell()
def close(self): """Close the file, and for mode "w" and "a" write the ending records.""" if self.fp is None: return
1606943723c6c2fa513288a138401c1a8d31c650 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3187/1606943723c6c2fa513288a138401c1a8d31c650/zipfile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1746, 12, 2890, 4672, 3536, 4605, 326, 585, 16, 471, 364, 1965, 315, 91, 6, 471, 315, 69, 6, 1045, 326, 11463, 3853, 12123, 309, 365, 18, 7944, 353, 599, 30, 327, 2, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1746, 12, 2890, 4672, 3536, 4605, 326, 585, 16, 471, 364, 1965, 315, 91, 6, 471, 315, 69, 6, 1045, 326, 11463, 3853, 12123, 309, 365, 18, 7944, 353, 599, 30, 327, 2, -100, -100, -100...
log.debug(cmd)
log.info(cmd)
def execute(cmd, destDir=None, verbose=True): if verbose: log.debug(cmd) if destDir: rc = os.system('cd %s; %s' %(destDir, cmd)) else: rc = os.system(cmd) _handle_rc(rc, cmd)
ebb95a47b84d08505a99f15de6f577d7e037a8fd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8747/ebb95a47b84d08505a99f15de6f577d7e037a8fd/util.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1836, 12, 4172, 16, 26231, 33, 7036, 16, 3988, 33, 5510, 4672, 309, 3988, 30, 613, 18, 1376, 12, 4172, 13, 309, 26231, 30, 4519, 273, 1140, 18, 4299, 2668, 4315, 738, 87, 31, 738, 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, 1836, 12, 4172, 16, 26231, 33, 7036, 16, 3988, 33, 5510, 4672, 309, 3988, 30, 613, 18, 1376, 12, 4172, 13, 309, 26231, 30, 4519, 273, 1140, 18, 4299, 2668, 4315, 738, 87, 31, 738, 87...
pen = self.loadItemPen(item) item.setPen(pen)
def addSeries(self, name, series, parent=None): """ Creates new controls and curve for an individual series.
14ad4626440885b949068a9ed1513d52a79f0e96 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3979/14ad4626440885b949068a9ed1513d52a79f0e96/plot.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 6485, 12, 2890, 16, 508, 16, 4166, 16, 982, 33, 7036, 4672, 3536, 10210, 394, 11022, 471, 8882, 364, 392, 7327, 4166, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 6485, 12, 2890, 16, 508, 16, 4166, 16, 982, 33, 7036, 4672, 3536, 10210, 394, 11022, 471, 8882, 364, 392, 7327, 4166, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
gLogger.info("ReplicaManager.putAndRegister: Checksum information not provided. Calculating adler32.") checksum = fileAdler(file) gLogger.info("ReplicaManager.putAndRegister: Checksum calculated to be %s." % checksum) res = self.fileCatalogue.exists({lfn:guid})
gLogger.info( "ReplicaManager.putAndRegister: Checksum information not provided. Calculating adler32." ) checksum = fileAdler( file ) gLogger.info( "ReplicaManager.putAndRegister: Checksum calculated to be %s." % checksum ) res = self.fileCatalogue.exists( {lfn:guid} )
def putAndRegister(self,lfn,file,diracSE,guid=None,path=None,checksum=None,catalog=None): """ Put a local file to a Storage Element and register in the File Catalogues
9fabceb719d19d46d8b75011d2932552dbe360f9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/9fabceb719d19d46d8b75011d2932552dbe360f9/ReplicaManager.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1378, 1876, 3996, 12, 2890, 16, 80, 4293, 16, 768, 16, 3211, 8836, 1090, 16, 14066, 33, 7036, 16, 803, 33, 7036, 16, 15149, 33, 7036, 16, 7199, 33, 7036, 4672, 3536, 4399, 279, 1191, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1378, 1876, 3996, 12, 2890, 16, 80, 4293, 16, 768, 16, 3211, 8836, 1090, 16, 14066, 33, 7036, 16, 803, 33, 7036, 16, 15149, 33, 7036, 16, 7199, 33, 7036, 4672, 3536, 4399, 279, 1191, ...
store.add((URIRef(uri), RDF['type'], SIOC['Post']))
store.add((URIRef(uri), RDF.type, SIOC['Post']))
def __toRDF(self): """ Dump mailing list into a RDF file """
fc657599e6e8dc5f41369b49f4acca66ed2532f8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5712/fc657599e6e8dc5f41369b49f4acca66ed2532f8/mailinglist.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 869, 30137, 12, 2890, 4672, 3536, 18242, 4791, 310, 666, 1368, 279, 13539, 585, 3536, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 869, 30137, 12, 2890, 4672, 3536, 18242, 4791, 310, 666, 1368, 279, 13539, 585, 3536, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
tls_calcs.phenix_prep(pdbin, tlsins, phenixout)
tls_calcs.phenix_prep(pdbin, tlsins, phenixout)
def Refmac5RefinementPrep(webtlsmdd, job_id, chain_ntls): """Called with a list of tuples (chain_id, ntls). Generates PDB and TLSIN files for refinement with REFMAC5. Returns a single string if there is an error, otherwise a dictionary of results is returned. """ struct_id = webtlsmdd.job_get_structure_id(job_id) analysis_dir = webtlsmdd.job_get_analysis_dir(job_id) analysis_base_url = webtlsmdd.job_get_analysis_base_url(job_id) if not os.path.isdir(analysis_dir): return "Job analysis directory does not exist" old_dir = os.getcwd() os.chdir(analysis_dir) ## input structure pdbin = "%s.pdb" % (struct_id) if not os.path.isfile(pdbin): pdbin = None for pdbx in glob.glob("*.pdb"): if len(pdbx) == 8: struct_id = pdbx[:4] pdbin = pdbx break if pdbin is None: os.chdir(old_dir) return "Input PDB File %s Not Found" % (pdbin) ## the per-chain TLSOUT files from TLSMD must be merged tlsins = [] for chain_id, ntls in chain_ntls: tlsin = "%s_CHAIN%s_NTLS%d.tlsout" % (struct_id, chain_id, ntls) if not os.path.isfile(tlsin): os.chdir(old_dir) return "Input TLSIN File %s Not Found" % (tlsin) tlsins.append(tlsin) ## form unique pdbout/tlsout filenames listx = [struct_id] #for chain_id, ntls in chain_ntls: # ## FIXME: Filename lengths must be less than 255 characters. # listx.append("CHAIN%s" % (chain_id)) # listx.append("NTLS%d" % (ntls)) # #listx.append("%s%d" % (chain_id, ntls)) #outbase ="_".join(listx) outbase = job_id pdbout = "%s.pdb" % (outbase) ## the tlsout from this program is going to be the tlsin ## for refinement, so it's important for the filename to have ## the tlsin extension so the user is not confused tlsout = "%s.tlsin" % (outbase) phenixout = "%s.phenix" % (outbase) ## PHENIX, Christoph Champ, 2007-11-06 ## make urls for linking pdbout_url = "%s/%s" % (analysis_base_url, pdbout) tlsout_url = "%s/%s" % (analysis_base_url, tlsout) phenixout_url = "%s/%s" % (analysis_base_url, phenixout) ## PHENIX, Christoph Champ, 2007-11-06 ## create the files tls_calcs.refmac5_prep(pdbin, tlsins, pdbout, tlsout) tls_calcs.phenix_prep(pdbin, tlsins, phenixout) ## PHENIX, Christoph Champ, 2007-11-06 os.chdir(old_dir) return dict(pdbout = pdbout, pdbout_url = pdbout_url, tlsout = tlsout, tlsout_url = tlsout_url, phenixout = phenixout, phenixout_url = phenixout_url)
0049fea0a8babe00b08f3932abf09fa0bc010db6 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10674/0049fea0a8babe00b08f3932abf09fa0bc010db6/webtlsmdd.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3941, 5821, 25, 426, 926, 820, 15543, 12, 4875, 17116, 81, 449, 16, 1719, 67, 350, 16, 2687, 67, 496, 3251, 4672, 3536, 8185, 598, 279, 666, 434, 10384, 261, 5639, 67, 350, 16, 9513, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3941, 5821, 25, 426, 926, 820, 15543, 12, 4875, 17116, 81, 449, 16, 1719, 67, 350, 16, 2687, 67, 496, 3251, 4672, 3536, 8185, 598, 279, 666, 434, 10384, 261, 5639, 67, 350, 16, 9513, ...
hlr_utils.result_insert(result,res_descr,so2,None,"all")
hlr_utils.result_insert(result, res_descr, so2, None, "all")
def create_E_vs_Q(obj,E,k,px_separate=True,*args,**kwargs): """ This functions takes a SOM with a wavelength axis, energy and wavevector tuples and turns the SOs contained in the SOM to 2D SOs with E and Q axes. Parameters: ---------- -> obj is the input SOM -> E (E_f for IGS) is an energy tuple (value, err2) -> k (k_f for IGS) is an wavevector tuple (value, err2) Returns: ------- <- A SOM containing 2D SOs with E and Q axes Exceptions: ---------- <- RuntimeError is raised if anything other than a SOM is passed to the function <- RuntimeError is raised if an instrument is not contained in the SOM """ import hlr_utils # set up for working through data (result,res_descr)=hlr_utils.empty_result(obj) o_descr=hlr_utils.get_descr(obj) if o_descr != "SOM": raise RuntimeError, "This function only accepts SOMs" # Have a SOM, go on else: pass if o_descr == "SOM": try: obj.attr_list.instrument.get_primary() inst = obj.attr_list.instrument except RuntimeError: raise RuntimeError, "An instrument was not provided!" # Got the instrument, go on else: pass axis = hlr_utils.hlr_1D_units(obj, "Angstroms") result=hlr_utils.copy_som_attr(result,res_descr,obj,o_descr) result.setYLabel("counts") result.setYUnits("counts / (ueV * A^-1)") result.setAllAxisLabels(["Q transfer","energy transfer"]) result.setAllAxisUnits(["A^-1","ueV"]) # iterate through the values import array_manip import axis_manip import nessi_list import SOM y_len = len(obj[0]) y2d_len = y_len * y_len for j in range(hlr_utils.get_length(obj)): xval = hlr_utils.get_value(obj,j,o_descr,"x",axis) xerr2 = hlr_utils.get_err2(obj,j,o_descr,"x",axis) k_j=axis_manip.wavelength_to_scalar_k(xval, xerr2) E_j=axis_manip.wavelength_to_energy(xval, xerr2) yval = hlr_utils.get_value(obj,j,o_descr,"y") yerr2 = hlr_utils.get_err2(obj,j,o_descr,"y") yval = axis_manip.reverse_array_cp(yval) yerr2 = axis_manip.reverse_array_cp(yerr2) so = hlr_utils.get_value(obj,j,o_descr,"all") (angle,angle_err2) = hlr_utils.get_parameter("polar",so,inst) E_t=axis_manip.energy_transfer(E_j[0], E_j[1], E[0], E[1]) E_t=axis_manip.frequency_to_energy(E_t[0], E_t[1]) E_t=array_manip.mult_ncerr(E_t[0], E_t[1], 1000.0, 0.0) Q=axis_manip.init_scatt_wavevector_to_scalar_Q(k_j[0], k_j[1], k[0], k[1], angle, angle_err2) so2 = SOM.SO(2) so2.id = so.id so2.y = nessi_list.NessiList(y2d_len) so2.var_y = nessi_list.NessiList(y2d_len) for m in range(y_len): so2.y[m*(y_len+1)] = yval[m] so2.var_y[m*(y_len+1)] = yerr2[m] so2.axis[0].val = Q[0] so2.axis[1].val = E_t[0] if so.axis[0].var != None: so2.axis[0].var = Q[1] so2.axis[1].var = E_t[1] # Do nothing else: pass hlr_utils.result_insert(result,res_descr,so2,None,"all") return result
cf46b3f0500e4ffd75f0e930b33e4c4cb1695688 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/763/cf46b3f0500e4ffd75f0e930b33e4c4cb1695688/hlr_create_E_vs_Q.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 41, 67, 6904, 67, 53, 12, 2603, 16, 41, 16, 79, 16, 4430, 67, 16627, 340, 33, 5510, 16, 14, 1968, 16, 636, 4333, 4672, 3536, 1220, 4186, 5530, 279, 348, 1872, 598, 279, 21...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 67, 41, 67, 6904, 67, 53, 12, 2603, 16, 41, 16, 79, 16, 4430, 67, 16627, 340, 33, 5510, 16, 14, 1968, 16, 636, 4333, 4672, 3536, 1220, 4186, 5530, 279, 348, 1872, 598, 279, 21...
if on == 1 and sn != 2: return self._fix_nan(context) if sn == 1 and on != 2: return other._fix_nan(context)
if on == 1 and sn == 0: return self._fix(context) if sn == 1 and on == 0: return other._fix(context)
def max_mag(self, other, context=None): """Compares the values numerically with their sign ignored.""" other = _convert_other(other, raiseit=True)
3f122784a35b5a60fac3e946d1a99941b3f116c9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8546/3f122784a35b5a60fac3e946d1a99941b3f116c9/decimal.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 943, 67, 4527, 12, 2890, 16, 1308, 16, 819, 33, 7036, 4672, 3536, 19199, 326, 924, 6389, 1230, 598, 3675, 1573, 5455, 12123, 1308, 273, 389, 6283, 67, 3011, 12, 3011, 16, 1002, 305, 33...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 943, 67, 4527, 12, 2890, 16, 1308, 16, 819, 33, 7036, 4672, 3536, 19199, 326, 924, 6389, 1230, 598, 3675, 1573, 5455, 12123, 1308, 273, 389, 6283, 67, 3011, 12, 3011, 16, 1002, 305, 33...
events = client.get_events(cal_user, start_date=dates[2], end_date=dates[3], title=options.title, query=options.query, expand_recurrence=False) try: client.delete_events(events, options.date, cal_user) except EventsNotFound: print 'No events found that match your options!'
for cal in cal_user_list: print 'For calendar ' + str(cal) events = client.get_events(cal.user, start_date=dates[2], end_date=dates[3], title=options.title, query=options.query, expand_recurrence=False) try: client.delete_events(events, options.date, cal.user) except EventsNotFound: print 'No events found that match your options!'
def _run_delete(client, options, args): cal_user = client.get_calendar_user(options.cal) if not cal_user: print 'No calendar matches "' + options.cal + '"' return dates = get_start_and_end(options.date) events = client.get_events(cal_user, start_date=dates[2], end_date=dates[3], title=options.title, query=options.query, expand_recurrence=False) try: client.delete_events(events, options.date, cal_user) except EventsNotFound: print 'No events found that match your options!'
f846a2afa8ac791418b89ed03bd00a3c62cf31be /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2899/f846a2afa8ac791418b89ed03bd00a3c62cf31be/service.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2681, 67, 3733, 12, 2625, 16, 702, 16, 833, 4672, 1443, 67, 1355, 273, 1004, 18, 588, 67, 11650, 67, 1355, 12, 2116, 18, 771, 13, 309, 486, 1443, 67, 1355, 30, 1172, 296, 2279, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2681, 67, 3733, 12, 2625, 16, 702, 16, 833, 4672, 1443, 67, 1355, 273, 1004, 18, 588, 67, 11650, 67, 1355, 12, 2116, 18, 771, 13, 309, 486, 1443, 67, 1355, 30, 1172, 296, 2279, ...
scaling_term -- default is 0.05. if nodes are getting chopped off, increase; if graph
scaling_term -- default is 0.05. if vertices are getting chopped off, increase; if graph
def show(self, pos=None, layout=None, vertex_labels=True, edge_labels=False, vertex_size=200, graph_border=False, vertex_colors=None, edge_colors=None, partition=None, scaling_term=0.05, talk=False, iterations=50, color_by_label=False, heights=None, **kwds): """ Shows the (di)graph.
139028392b54ae237314b7536b21897e9b1d7ed3 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9417/139028392b54ae237314b7536b21897e9b1d7ed3/graph.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 12, 2890, 16, 949, 33, 7036, 16, 3511, 33, 7036, 16, 5253, 67, 5336, 33, 5510, 16, 3591, 67, 5336, 33, 8381, 16, 5253, 67, 1467, 33, 6976, 16, 2667, 67, 8815, 33, 8381, 16, 5...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2405, 12, 2890, 16, 949, 33, 7036, 16, 3511, 33, 7036, 16, 5253, 67, 5336, 33, 5510, 16, 3591, 67, 5336, 33, 8381, 16, 5253, 67, 1467, 33, 6976, 16, 2667, 67, 8815, 33, 8381, 16, 5...
log.info("after configread at " + time.ctime())
def testSwampInterface(): logging.basicConfig(level=logging.DEBUG) wholelist = open("full_resamp.swamp").readlines() portionlist = wholelist[:10] test = [ "".join(portionlist), "".join(wholelist), testScript4] c = Config("swamp.conf") c.read() log.info("after configread at " + time.ctime()) fe = FakeExecutor() le = LocalExecutor(NcoBinaryFinder(c), FileMapper("swampTest%d"%os.getpid(), c.execSourcePath, c.execScratchPath, c.execBulkPath)) #si = SwampInterface(fe) si = SwampInterface(c, le) #evilly force the interface to use a remote executor assert len(si.remote) > 0 si.executor = si.remote[0] taskid = si.submit(test[2]) log.info("finish at " + time.ctime()) print "submitted with taskid=", taskid
2156f04bd5fc29e60fd70189ecd66684b607d5ed /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5203/2156f04bd5fc29e60fd70189ecd66684b607d5ed/swamp_common.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 6050, 931, 1358, 13332, 2907, 18, 13240, 809, 12, 2815, 33, 11167, 18, 9394, 13, 600, 355, 5449, 273, 1696, 2932, 2854, 67, 455, 931, 18, 5328, 931, 20387, 896, 3548, 1435, 14769, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 6050, 931, 1358, 13332, 2907, 18, 13240, 809, 12, 2815, 33, 11167, 18, 9394, 13, 600, 355, 5449, 273, 1696, 2932, 2854, 67, 455, 931, 18, 5328, 931, 20387, 896, 3548, 1435, 14769, ...
safe_remove(zipfile) safe_remove(tarfile) if src_files==[]: return src_files = string.join(src_files)
def find_src_files(L,d,N): if string.upper(os.path.basename(d))=='CVS': return #ignore all CVS for n in N: fn = os.path.normcase(os.path.normpath(os.path.join(d,n))) if os.path.isfile(fn): L.append(fn)
5c2936a55fe3894aa5b9cc5719900acb6e5b8e57 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3878/5c2936a55fe3894aa5b9cc5719900acb6e5b8e57/daily.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 67, 4816, 67, 2354, 12, 48, 16, 72, 16, 50, 4672, 309, 533, 18, 5797, 12, 538, 18, 803, 18, 13909, 12, 72, 3719, 18920, 39, 14640, 4278, 327, 202, 7, 6185, 777, 385, 14640, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 67, 4816, 67, 2354, 12, 48, 16, 72, 16, 50, 4672, 309, 533, 18, 5797, 12, 538, 18, 803, 18, 13909, 12, 72, 3719, 18920, 39, 14640, 4278, 327, 202, 7, 6185, 777, 385, 14640, 3...
print self.data['pub_date']
def save_changes(self): """Save the changes back to the database. This also adds a redirect if the slug changes. """ old_slug = self.post.slug old_parser = self.post.parser forms.set_fields(self.post, self.data, 'title', 'author', 'parser') if (self.data['text'] != self.post.text or self.data['parser'] != old_parser): self.post.text = self.data['text'] add_redirect = self.post.is_published and old_slug != self.post.slug
f234fd379bc184d633cdf3d884a4a1a16466165a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12815/f234fd379bc184d633cdf3d884a4a1a16466165a/forms.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1923, 67, 6329, 12, 2890, 4672, 3536, 4755, 326, 3478, 1473, 358, 326, 2063, 18, 225, 1220, 2546, 4831, 279, 3136, 309, 326, 4959, 3478, 18, 3536, 1592, 67, 6436, 273, 365, 18, 2767, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1923, 67, 6329, 12, 2890, 4672, 3536, 4755, 326, 3478, 1473, 358, 326, 2063, 18, 225, 1220, 2546, 4831, 279, 3136, 309, 326, 4959, 3478, 18, 3536, 1592, 67, 6436, 273, 365, 18, 2767, 1...
def test_init_alternate_auth_port(self):
def test_init_alternate_dns_port(self):
def test_init_alternate_auth_port(self): bob = BoB(None, 9999) self.assertEqual(bob.verbose, False) self.assertEqual(bob.msgq_socket_file, None) self.assertEqual(bob.auth_port, 9999) self.assertEqual(bob.cc_session, None) self.assertEqual(bob.address, None) self.assertEqual(bob.processes, {}) self.assertEqual(bob.dead_processes, {}) self.assertEqual(bob.runnable, False)
4cf1bd8a3477a1a7c68d0f7cdc7dedc4e9d40a77 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6792/4cf1bd8a3477a1a7c68d0f7cdc7dedc4e9d40a77/bind10_test.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 2738, 67, 16025, 340, 67, 14926, 67, 655, 12, 2890, 4672, 800, 70, 273, 17980, 38, 12, 7036, 16, 30082, 13, 365, 18, 11231, 5812, 12, 70, 947, 18, 11369, 16, 1083, 13, 365,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 2738, 67, 16025, 340, 67, 14926, 67, 655, 12, 2890, 4672, 800, 70, 273, 17980, 38, 12, 7036, 16, 30082, 13, 365, 18, 11231, 5812, 12, 70, 947, 18, 11369, 16, 1083, 13, 365,...
self.connect(stage2, ddc, demod, dst)
self.connect(stage2, ddc) self.connect(ddc, demod) self.connect(demod, dst)
def __init__(self): gr.top_block.__init__(self)
7eaa02555fa1f04ad4e8d854fbb03226267c73f0 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9155/7eaa02555fa1f04ad4e8d854fbb03226267c73f0/btrx.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 3821, 18, 3669, 67, 2629, 16186, 2738, 972, 12, 2890, 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, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 3821, 18, 3669, 67, 2629, 16186, 2738, 972, 12, 2890, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
return S_OK()
return
def initialize( script = False, ignoreErrors = False, initializeMonitor = False, enableCommandLine = False ): global localCfg, scriptName, _isAlreadyInitialized #Please do not call initialize in every file if _isAlreadyInitialized: return S_OK() _isAlreadyInitialized = True userDisabled = not localCfg.isCSEnabled() if not userDisabled: localCfg.disableCS() if not enableCommandLine: localCfg.disableParsingCommandLine() if script: scriptName = script scriptSection = localCfg.setConfigurationForScript( scriptName ) if not ignoreErrors: localCfg.addMandatoryEntry( "/DIRAC/Setup" ) resultDict = localCfg.loadUserData() if not ignoreErrors and not resultDict[ 'OK' ]: gLogger.error( "There were errors when loading configuration", resultDict[ 'Message' ] ) sys.exit( 1 ) if not userDisabled: localCfg.enableCS() if initializeMonitor: gMonitor.setComponentType( gMonitor.COMPONENT_SCRIPT ) gMonitor.setComponentName( scriptName ) gMonitor.setComponentLocation( "script" ) gMonitor.initialize() else: gMonitor.disable()
2ed659d24506e42ee8a85f3b991ed45e45688960 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/2ed659d24506e42ee8a85f3b991ed45e45688960/Script.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4046, 12, 2728, 273, 1083, 16, 2305, 4229, 273, 1083, 16, 4046, 7187, 273, 1083, 16, 4237, 21391, 273, 1083, 262, 30, 2552, 1191, 8198, 16, 31008, 16, 389, 291, 9430, 11459, 225, 468, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2728, 273, 1083, 16, 2305, 4229, 273, 1083, 16, 4046, 7187, 273, 1083, 16, 4237, 21391, 273, 1083, 262, 30, 2552, 1191, 8198, 16, 31008, 16, 389, 291, 9430, 11459, 225, 468, ...
return DAVConnection(self.url)
acct = osaf.framework.sharing.Sharing.getWebDavAccount() if acct.useSSL: return SSLDAVConnection(self.url, acct) return DAVConnection(self.url, acct)
def newConnection(self): return DAVConnection(self.url)
e3cfc89067d78a3e4b0063b94671a3d124dfcc8d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/e3cfc89067d78a3e4b0063b94671a3d124dfcc8d/Dav.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 394, 1952, 12, 2890, 4672, 327, 463, 5856, 1952, 12, 2890, 18, 718, 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, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 394, 1952, 12, 2890, 4672, 327, 463, 5856, 1952, 12, 2890, 18, 718, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
if my_ftype == "symlink" and ftype == "file":
if my_ftype == "symlink" and pf.ftype == "file":
def _ftype(mode): """ Given a "mode" return the name of the type of file. """ if stat.S_ISREG(mode): return "file" if stat.S_ISDIR(mode): return "directory" if stat.S_ISLNK(mode): return "symlink" if stat.S_ISFIFO(mode): return "fifo" if stat.S_ISCHR(mode): return "character device" if stat.S_ISBLK(mode): return "block device" return "<unknown>"
1f1a9c8f653cd8cc3aa77f966051de6095bdd390 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/1f1a9c8f653cd8cc3aa77f966051de6095bdd390/packages.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 74, 723, 12, 3188, 4672, 3536, 16803, 279, 315, 3188, 6, 327, 326, 508, 434, 326, 618, 434, 585, 18, 3536, 309, 610, 18, 55, 67, 5127, 5937, 12, 3188, 4672, 225, 327, 315, 768, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 74, 723, 12, 3188, 4672, 3536, 16803, 279, 315, 3188, 6, 327, 326, 508, 434, 326, 618, 434, 585, 18, 3536, 309, 610, 18, 55, 67, 5127, 5937, 12, 3188, 4672, 225, 327, 315, 768, ...
self.message.set('\n'.join(rows))
return '\n'.join(rows) class EditorError(Exception): pass cmdargs = [editor, name] try: try: retcode = subprocess.call(" ".join(cmdargs), shell=True, stderr=subprocess.PIPE) except OSError, e: raise EditorError if retcode != 0: raise EditorError except EditorError: msg = _getMessageNoEditor() if msg is None: return False self.message.set(msg)
def getMessageFromUser(self, prompt=''):
8cc5e38355fa1132b21bd8eb7d3007291efd377f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8747/8cc5e38355fa1132b21bd8eb7d3007291efd377f/changelog.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2381, 1265, 1299, 12, 2890, 16, 6866, 2218, 11, 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, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2381, 1265, 1299, 12, 2890, 16, 6866, 2218, 11, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
return self.socket.bind (addr) def connect (self, address):
return self.socket.bind(addr) def connect(self, address):
def bind (self, addr): self.addr = addr return self.socket.bind (addr)
f7eb0d3f501f2e379b8719bda476d318d1e79160 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/f7eb0d3f501f2e379b8719bda476d318d1e79160/asyncore.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1993, 261, 2890, 16, 3091, 4672, 365, 18, 4793, 273, 3091, 327, 365, 18, 7814, 18, 4376, 261, 4793, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1993, 261, 2890, 16, 3091, 4672, 365, 18, 4793, 273, 3091, 327, 365, 18, 7814, 18, 4376, 261, 4793, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
if isinstance(self.parent.vals[self.parent.value], str): returnValue = _(self.parent.vals[self.parent.value]) else: returnValue = _(self.parent.vals[self.parent.value][1])
returnValue = _(self.parent.vals[self.parent.value]) if not isinstance(returnValue, str): returnValue = returnValue[0] if returnValue: returnValue = _(returnValue)
def __call__(self, selected): #needed by configlist self.checkValues() if isinstance(self.parent.vals[self.parent.value], str): returnValue = _(self.parent.vals[self.parent.value]) else: returnValue = _(self.parent.vals[self.parent.value][1]) return ("text", returnValue)
334e49f88bb558bb2f07d47c77c7900074d5b7b8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6652/334e49f88bb558bb2f07d47c77c7900074d5b7b8/config.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 3170, 4672, 1082, 202, 7, 17471, 635, 642, 1098, 365, 18, 1893, 1972, 1435, 225, 7750, 273, 389, 12, 2890, 18, 2938, 18, 4524, 63, 2890, 18, 2938, 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, 1001, 1991, 972, 12, 2890, 16, 3170, 4672, 1082, 202, 7, 17471, 635, 642, 1098, 365, 18, 1893, 1972, 1435, 225, 7750, 273, 389, 12, 2890, 18, 2938, 18, 4524, 63, 2890, 18, 2938, 18, ...
return map(str, re.split(r'\s+', flat)) if flat != "" else []
return map(int, re.split(r'\s+', flat)) if flat != "" else []
def cookie_recips(status): flat = urllib.unquote(req.COOKIES.get("recip-%s" % status, "")) return map(str, re.split(r'\s+', flat)) if flat != "" else []
314aa17b58695a5c9eaf80d92f66be919ca5a46d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11809/314aa17b58695a5c9eaf80d92f66be919ca5a46d/views.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3878, 67, 266, 3449, 87, 12, 2327, 4672, 3569, 273, 11527, 18, 318, 6889, 12, 3658, 18, 3865, 3141, 8805, 18, 588, 2932, 266, 3449, 6456, 87, 6, 738, 1267, 16, 1408, 3719, 327, 852, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3878, 67, 266, 3449, 87, 12, 2327, 4672, 3569, 273, 11527, 18, 318, 6889, 12, 3658, 18, 3865, 3141, 8805, 18, 588, 2932, 266, 3449, 6456, 87, 6, 738, 1267, 16, 1408, 3719, 327, 852, ...
'OC':(()),
'OC':(None,),
def __str__(self): result = [str(self.ruleid)] result.append(self.key_list('NAME',self.names,quoted=1)) result.append(self.key_attr('DESC',self.desc,quoted=1)) result.append({0:'',1:' OBSOLETE'}[self.obsolete]) result.append(self.key_attr('FORM',self.form,quoted=0)) result.append(self.key_list('SUP',self.sup,sep=' $ ')) return '( %s )' % ''.join(result)
c72dca7955a21f0514dbdfa740ea8df04bf75f44 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4610/c72dca7955a21f0514dbdfa740ea8df04bf75f44/models.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 701, 972, 12, 2890, 4672, 563, 273, 306, 701, 12, 2890, 18, 5345, 350, 25887, 563, 18, 6923, 12, 2890, 18, 856, 67, 1098, 2668, 1985, 2187, 2890, 18, 1973, 16, 15179, 33, 21, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 701, 972, 12, 2890, 4672, 563, 273, 306, 701, 12, 2890, 18, 5345, 350, 25887, 563, 18, 6923, 12, 2890, 18, 856, 67, 1098, 2668, 1985, 2187, 2890, 18, 1973, 16, 15179, 33, 21, 3...
ori t1, t1, (1 << 9)
limm t5, (1 << 9) or t1, t1, t5
def macroop LTR_R
eec6bfaa9de23b075762a62e57e46cd3f2f977ef /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6787/eec6bfaa9de23b075762a62e57e46cd3f2f977ef/segmentation.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11522, 556, 511, 4349, 67, 54, 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, 11522, 556, 511, 4349, 67, 54, 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, -100...
self.assertRaises(smtplib.SMTPConnectError, smtplib.SMTP, HOST, PORT)
self.assertRaises(smtplib.SMTPConnectError, smtplib.SMTP, HOST, PORT, 'localhost', 3)
def testFailingHELO(self): self.assertRaises(smtplib.SMTPConnectError, smtplib.SMTP, HOST, PORT)
221b34d59e4109e6912d6d0a112231b29655742d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8125/221b34d59e4109e6912d6d0a112231b29655742d/test_smtplib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 3754, 310, 3900, 1502, 12, 2890, 4672, 365, 18, 11231, 12649, 6141, 12, 87, 1010, 6673, 18, 55, 14636, 5215, 668, 16, 272, 1010, 6673, 18, 55, 14636, 16, 21425, 16, 20987, 13, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 3754, 310, 3900, 1502, 12, 2890, 4672, 365, 18, 11231, 12649, 6141, 12, 87, 1010, 6673, 18, 55, 14636, 5215, 668, 16, 272, 1010, 6673, 18, 55, 14636, 16, 21425, 16, 20987, 13, 2,...
self.updating = True self.package.setText(_("Package list update")) self.ipkg.startCmd(IpkgComponent.CMD_UPDATE)
self.updating = False
def __init__(self, session, args = None): Screen.__init__(self, session)
0fe25bffe34c9a5fd50528d5ff2eb576b149163b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6652/0fe25bffe34c9a5fd50528d5ff2eb576b149163b/plugin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1339, 16, 833, 273, 599, 4672, 10146, 16186, 2738, 972, 12, 2890, 16, 1339, 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, 1001, 2738, 972, 12, 2890, 16, 1339, 16, 833, 273, 599, 4672, 10146, 16186, 2738, 972, 12, 2890, 16, 1339, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
from PyQt4.QtGui import QDialog, QStringListModel, QListView, QSplitter
from PyQt4.QtGui import QDialog, QStringListModel, QListView, QSplitter, QValidator
def handle(self, info=None): """handling the exception: show backtrace in browser""" cgitb.Hook.handle(self, info) webbrowser.open(self.tmpFileName)
93bf41dcf49cae215afcd24ea1052237ec6a25e0 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1679/93bf41dcf49cae215afcd24ea1052237ec6a25e0/playfield.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 12, 2890, 16, 225, 1123, 33, 7036, 4672, 3536, 26822, 326, 1520, 30, 2405, 13902, 316, 4748, 8395, 276, 6845, 70, 18, 5394, 18, 4110, 12, 2890, 16, 1123, 13, 3311, 11213, 18, 319...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 12, 2890, 16, 225, 1123, 33, 7036, 4672, 3536, 26822, 326, 1520, 30, 2405, 13902, 316, 4748, 8395, 276, 6845, 70, 18, 5394, 18, 4110, 12, 2890, 16, 1123, 13, 3311, 11213, 18, 319...
allmatchingseries = self.config['tvdb_api']._getSeries(self.config['series_name'])
try: allmatchingseries = self.config['tvdb_api']._getSeries(self.config['series_name']) except Exception: sys.stderr.write(u"\nErrors while trying to contact thetvbd.com for Series (%s)\ntherefore a file rename is not possible.\n\n" % self.config['series_name']) return False
def returnFilename(self): """Return a single file name (excluding file extension and directory), limited by the current variables (sid, season name, season number ... etc). Typically used when writing a meta file or naming/renaming a video file after a TV show recording. return False and out put an error if there not either a series id (SID) or series name return False and out put an error if there proper episode information (numbers or name) return False if the option (-MGF) used and there is not exact TV series name match return a specific episode filename """ sid=self.config['sid'] series_name=self.config['series_name'] season_num=self.config['season_num'] episode_num=self.config['episode_num'] episode_name=self.config['episode_name']
881a9111c0613ff73ff321ac94e0e0ed204b9de1 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/13713/881a9111c0613ff73ff321ac94e0e0ed204b9de1/jamu.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 327, 5359, 12, 2890, 4672, 3536, 990, 279, 2202, 585, 508, 261, 338, 18596, 585, 2710, 471, 1867, 3631, 13594, 635, 326, 783, 3152, 261, 7453, 16, 15874, 508, 16, 15874, 1300, 1372, 5527...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 327, 5359, 12, 2890, 4672, 3536, 990, 279, 2202, 585, 508, 261, 338, 18596, 585, 2710, 471, 1867, 3631, 13594, 635, 326, 783, 3152, 261, 7453, 16, 15874, 508, 16, 15874, 1300, 1372, 5527...
if errors != []:
if len([e for e in errors if e.is_fatal()]) > 0:
def parse(str, errors = None, warnings = None): """ Return a DOM tree encoding the contents of an epytext string. Any errors or warnings generated during parsing will be stored in the C{errors} and C{warnings} parameters. @param str: The epytext string to parse. @type str: C{string} @param errors: A list where any errors generated during parsing will be stored. If no list is specified, then errors will generate exceptions. @type errors: C{list} of L{ParseError} @param warnings: A list where any warnings generated during parsing will be stored. If no list is specified, then warnings will be silently ignored. @type warnings: C{list} of L{ParseError} @return: a DOM tree encoding the contents of an epytext string. @rtype: L{xml.dom.minidom.Document} @raise ParseError: If C{errors} is C{None} and an error is encountered while parsing. @see: L{xml.dom.minidom.Document} """ # Initialize warning and error lists. if warnings == None: warnings = [] if errors == None: errors = [] raise_on_error = 1 else: raise_on_error = 0 # Preprocess the string. str = re.sub('\015\012', '\012', str) str = string.expandtabs(str) # Tokenize the input string. tokens = _tokenize(str, warnings, errors) # Have we encountered a field yet? encountered_field = 0 # Create an XML document to hold the epytext. doc = Document() # Maintain two parallel stacks: one contains DOM elements, and # gives the ancestors of the current block. The other contains # indentation values, and gives the indentation of the # corresponding DOM elements. An indentation of "None" reflects # an unknown indentation. However, the indentation must be # greater than, or greater than or equal to, the indentation of # the prior element (depending on what type of DOM element it # corresponds to). No 2 consecutive indent_stack values will be # ever be "None." Use initial dummy elements in the stack, so we # don't have to worry about bounds checking. stack = [None, doc.createElement('epytext')] indent_stack = [-1, None] for token in tokens: # Uncomment these for debugging: #print ''.join(['%11s' % (t and t.tagName) for t in stack]),':',token.tag #print ''.join(['%11s' % i for i in indent_stack]),':',token.indent # Pop any completed blocks off the stack. _pop_completed_blocks(token, stack, indent_stack) # If Token has type PARA, colorize and add the new paragraph if token.tag == Token.PARA: _add_para(doc, token, stack, indent_stack, errors, warnings) # If Token has type HEADING, add the new section elif token.tag == Token.HEADING: _add_section(doc, token, stack, indent_stack, errors, warnings) # If Token has type LBLOCK, add the new literal block elif token.tag == Token.LBLOCK: stack[-1].appendChild(token.to_dom(doc)) # If Token has type DTBLOCK, add the new doctest block elif token.tag == Token.DTBLOCK: stack[-1].appendChild(token.to_dom(doc)) # If Token has type BULLET, add the new list/list item/field elif token.tag == Token.BULLET: _add_list(doc, token, stack, indent_stack, errors, warnings) else: assert 0, 'Unknown token type: '+token.tag # Check if the DOM element we just added was a field.. if stack[-1].tagName == 'field': encountered_field = 1 elif encountered_field == 1: if len(stack) <= 3: estr = ("Fields must be the final elements in an "+ "epytext string.") errors.append(StructuringError(estr, token)) # If there was an error, then signal it! if errors != []: if raise_on_error: raise errors[0] else: return None # Return the top-level epytext DOM element. doc.appendChild(stack[1]) return doc
7bf7c136593a0f12e906094a55f7b8f591c5abaf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/7bf7c136593a0f12e906094a55f7b8f591c5abaf/epytext.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 12, 701, 16, 1334, 273, 599, 16, 5599, 273, 599, 4672, 3536, 2000, 279, 4703, 2151, 2688, 326, 2939, 434, 392, 425, 2074, 955, 533, 18, 5502, 1334, 578, 5599, 4374, 4982, 5811, 9...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 12, 701, 16, 1334, 273, 599, 16, 5599, 273, 599, 4672, 3536, 2000, 279, 4703, 2151, 2688, 326, 2939, 434, 392, 425, 2074, 955, 533, 18, 5502, 1334, 578, 5599, 4374, 4982, 5811, 9...
def restoreMapList(self, list): self.write(('mapList.clear',)) for l in list: self.write(('mapList.append', l)) self.write(('mapList.save',))
def restoreMapList(self, list): self.write(('mapList.clear',)) for l in list: self.write(('mapList.append', l)) self.write(('mapList.save',))
1b468cfdf08d399f830fcbb1e4c4adae994cbac8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12909/1b468cfdf08d399f830fcbb1e4c4adae994cbac8/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 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, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 225, 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, -100, -100, -100, -100, -100, -100, ...
hider.setWidgets([box6, box7])
box3.syncControls()
def __init__(self,parent=None, signalManager = None, name = "Linear Projection", graphClass = None): OWVisWidget.__init__(self, parent, signalManager, name, TRUE)
cbacee0aa84afb9bb2ddf1fa32442f23cd390f3b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6366/cbacee0aa84afb9bb2ddf1fa32442f23cd390f3b/OWLinProj.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2938, 33, 7036, 16, 4277, 1318, 273, 599, 16, 508, 273, 315, 15982, 21288, 3113, 2667, 797, 273, 599, 4672, 18233, 3282, 4609, 16186, 2738, 972, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2938, 33, 7036, 16, 4277, 1318, 273, 599, 16, 508, 273, 315, 15982, 21288, 3113, 2667, 797, 273, 599, 4672, 18233, 3282, 4609, 16186, 2738, 972, 12, 2890, ...
else: rev, path = chgset, None reponame = rm.get_default_repository(formatter.context) repos = rm.get_repository(reponame, authname)
if path == '/': path = None
def _format_changeset_link(self, formatter, ns, chgset, label, fullmatch=None): intertrac = formatter.shorthand_intertrac_helper(ns, chgset, label, fullmatch) if intertrac: return intertrac
3a32e2f48232fdd756bcbee44b126be6658a54c1 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9317/3a32e2f48232fdd756bcbee44b126be6658a54c1/changeset.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2139, 67, 6329, 278, 67, 1232, 12, 2890, 16, 4453, 16, 3153, 16, 462, 75, 542, 16, 1433, 16, 1983, 1916, 33, 7036, 4672, 1554, 313, 1077, 273, 4453, 18, 674, 15830, 67, 2761, 31...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2139, 67, 6329, 278, 67, 1232, 12, 2890, 16, 4453, 16, 3153, 16, 462, 75, 542, 16, 1433, 16, 1983, 1916, 33, 7036, 4672, 1554, 313, 1077, 273, 4453, 18, 674, 15830, 67, 2761, 31...
"""
"""
def getParameters(self): """ Created: 15.04.2006, KP Description: Return the list of parameters needed for configuring this GUI """ return [["Minimum object size (in pixels)", ("Threshold", )]]
6d7b572696d4ecdce2049b45a6e109836f3272c9 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2877/6d7b572696d4ecdce2049b45a6e109836f3272c9/SegmentationFilters.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10028, 12, 2890, 4672, 3536, 12953, 30, 4711, 18, 3028, 18, 6976, 26, 16, 1475, 52, 6507, 30, 2000, 326, 666, 434, 1472, 3577, 364, 642, 4017, 333, 10978, 3536, 327, 306, 9614, 13042, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10028, 12, 2890, 4672, 3536, 12953, 30, 4711, 18, 3028, 18, 6976, 26, 16, 1475, 52, 6507, 30, 2000, 326, 666, 434, 1472, 3577, 364, 642, 4017, 333, 10978, 3536, 327, 306, 9614, 13042, ...
def __init__(self, type = ETH_P_IP, filter=None):
def __init__(self, type = ETH_P_IP, filter=None, promisc=None, iface=None):
def __init__(self, type = ETH_P_IP, filter=None): self.type = type self.ins = socket.socket(socket.AF_PACKET, socket.SOCK_RAW, socket.htons(type)) self.ins.setsockopt(socket.SOL_SOCKET, socket.SO_RCVBUF, 2**30) if filter is not None: attach_filter(self.ins, filter) self.outs = socket.socket(socket.AF_PACKET, socket.SOCK_RAW, socket.htons(type))
ea674572065aeef03a6af7f9dcde6c13656862d2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7311/ea674572065aeef03a6af7f9dcde6c13656862d2/scapy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 618, 273, 512, 2455, 67, 52, 67, 2579, 16, 1034, 33, 7036, 16, 3012, 291, 71, 33, 7036, 16, 9751, 33, 7036, 4672, 365, 18, 723, 273, 618, 365, 18, 26...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 618, 273, 512, 2455, 67, 52, 67, 2579, 16, 1034, 33, 7036, 16, 3012, 291, 71, 33, 7036, 16, 9751, 33, 7036, 4672, 365, 18, 723, 273, 618, 365, 18, 26...
self.components.append(Variator(self.gcomprisBoard.canvas, self.rootitem,
self.components.append(Rheostat(self.gcomprisBoard.canvas, self.rootitem,
def create_components(self):
a7fd9b10536f478ff50f802a77f6b1aeb3b67be0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11306/a7fd9b10536f478ff50f802a77f6b1aeb3b67be0/electric.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 8119, 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, 752, 67, 8119, 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, -100...
return (1, "%s %s %s" % (CFG_WEBACCESS_WARNING_MSGS[1], (called_from and "%s %s" % (CFG_WEBACCESS_MSGS[0] % quote(user_info['uri']), CFG_WEBACCESS_MSGS[1]) or ""), make_apache_message(name_action, arguments, user_info.get('referer', None))))
return (1, "%s %s %s" % (CFG_WEBACCESS_WARNING_MSGS[1], (called_from and "%s %s" % (CFG_WEBACCESS_MSGS[0] % quote(user_info['uri']), CFG_WEBACCESS_MSGS[1]) or ""), make_apache_message(name_action, arguments, user_info['uri'])))
def acc_authorize_action(req, name_action, verbose=0, check_only_uid_p=False, **arguments): """Check if user is allowed to perform action with given list of arguments. Return (0, message) if authentication succeeds, (error code, error message) if it fails. The arguments are as follows: req - could be either one of these three things: id_user of the current user user_info dictionary built against the user details req mod_python request object name_action - the name of the action arguments - dictionary with keyword=value pairs created automatically by python on the extra arguments. these depend on the given action.
65ea7094ab75e683f85f6867dca65a9d596afbcc /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12027/65ea7094ab75e683f85f6867dca65a9d596afbcc/access_control_engine.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4078, 67, 22488, 67, 1128, 12, 3658, 16, 508, 67, 1128, 16, 3988, 33, 20, 16, 866, 67, 3700, 67, 1911, 67, 84, 33, 8381, 16, 2826, 7099, 4672, 3536, 1564, 309, 729, 353, 2935, 358, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4078, 67, 22488, 67, 1128, 12, 3658, 16, 508, 67, 1128, 16, 3988, 33, 20, 16, 866, 67, 3700, 67, 1911, 67, 84, 33, 8381, 16, 2826, 7099, 4672, 3536, 1564, 309, 729, 353, 2935, 358, ...
keymap = {'channel': 'feed', 'items': 'entries', 'guid': 'id', 'date': 'updated', 'date_parsed': 'updated_parsed', 'description': ['subtitle', 'summary'], 'url': ['href'], 'modified': 'updated', 'modified_parsed': 'updated_parsed', 'issued': 'published', 'issued_parsed': 'published_parsed', 'copyright': 'rights', 'copyright_detail': 'rights_detail', 'tagline': 'subtitle', 'tagline_detail': 'subtitle_detail'}
def __getitem__(self, key): keymap = {'channel': 'feed', 'items': 'entries', 'guid': 'id', 'date': 'updated', 'date_parsed': 'updated_parsed', 'description': ['subtitle', 'summary'], 'url': ['href'], 'modified': 'updated', 'modified_parsed': 'updated_parsed', 'issued': 'published', 'issued_parsed': 'published_parsed', 'copyright': 'rights', 'copyright_detail': 'rights_detail', 'tagline': 'subtitle', 'tagline_detail': 'subtitle_detail'} if key == 'category': return UserDict.__getitem__(self, 'tags')[0]['term'] if key == 'categories': return [(tag['scheme'], tag['term']) for tag in UserDict.__getitem__(self, 'tags')] realkey = keymap.get(key, key) if type(realkey) == types.ListType: for k in realkey: if UserDict.has_key(self, k): return UserDict.__getitem__(self, k) if UserDict.has_key(self, key): return UserDict.__getitem__(self, key) return UserDict.__getitem__(self, realkey)
50cbe5fb44dbff087e8cca95d332bb7b7cc15747 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10695/50cbe5fb44dbff087e8cca95d332bb7b7cc15747/feedparser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 31571, 972, 12, 2890, 16, 498, 4672, 309, 498, 422, 296, 4743, 4278, 327, 2177, 5014, 16186, 31571, 972, 12, 2890, 16, 296, 4156, 6134, 63, 20, 23962, 6408, 3546, 309, 498, 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, 1001, 31571, 972, 12, 2890, 16, 498, 4672, 309, 498, 422, 296, 4743, 4278, 327, 2177, 5014, 16186, 31571, 972, 12, 2890, 16, 296, 4156, 6134, 63, 20, 23962, 6408, 3546, 309, 498, 422, ...
help="URL of DOM Inspector repository to pull from (default: use hg default in mozilla/extensions/inspector/.hg/hgrc; or if that file doesn't exist, use \"" + DEFAULT_INSPECTOR_REPO + "\".)")
help="URL of DOM Inspector repository to pull from (default: use hg default in mozilla/extensions/inspector/.hg/hgrc; or if that file doesn't exist, use \"" + DEFAULTS['INSPECTOR_REPO'] + "\".)")
def check_retries_option(option, opt_str, value, parser): if value < 0: raise OptionValueError("%s option value needs to be positive (not '%d')" % (opt_str, value)) setattr(parser.values, option.dest, value)
bb77714db9931969ccbda06021d80525b7562c7a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11044/bb77714db9931969ccbda06021d80525b7562c7a/client.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 15215, 67, 3482, 12, 3482, 16, 2153, 67, 701, 16, 460, 16, 2082, 4672, 309, 460, 411, 374, 30, 1002, 2698, 23610, 27188, 87, 1456, 460, 4260, 358, 506, 6895, 261, 902, 1995, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 15215, 67, 3482, 12, 3482, 16, 2153, 67, 701, 16, 460, 16, 2082, 4672, 309, 460, 411, 374, 30, 1002, 2698, 23610, 27188, 87, 1456, 460, 4260, 358, 506, 6895, 261, 902, 1995, ...
'%s failed, found error pattern: ' '"%s"' % (command, regexp), result)
'%s failed, found error pattern: "%s"' % (command, regexp), result)
def run_grep(self, command, timeout=30, ignore_status=False, stdout_ok_regexp=None, stdout_err_regexp=None, stderr_ok_regexp=None, stderr_err_regexp=None, connect_timeout=30): """ Run a command on the remote host and look for regexp in stdout or stderr to determine if the command was successul or not.
5c04916cd0e1aca2cffa2895da52eaba47458edb /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12268/5c04916cd0e1aca2cffa2895da52eaba47458edb/ssh_host.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 67, 11556, 84, 12, 2890, 16, 1296, 16, 2021, 33, 5082, 16, 2305, 67, 2327, 33, 8381, 16, 3909, 67, 601, 67, 17745, 33, 7036, 16, 3909, 67, 370, 67, 17745, 33, 7036, 16, 4514, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 11556, 84, 12, 2890, 16, 1296, 16, 2021, 33, 5082, 16, 2305, 67, 2327, 33, 8381, 16, 3909, 67, 601, 67, 17745, 33, 7036, 16, 3909, 67, 370, 67, 17745, 33, 7036, 16, 4514, ...
udays = -1
udays = 10000
def split(self,job):
42396e8a8734fd697e4bd46d75a7d260f5b13284 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1488/42396e8a8734fd697e4bd46d75a7d260f5b13284/DQ2JobSplitter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1416, 12, 2890, 16, 4688, 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, 1416, 12, 2890, 16, 4688, 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, -10...
orig_request=request, extra_args=args,
orig_request=rq.request, extra_args=rq.args,
def ExpireRequests(self): """Delete all the expired requests.
71e114da4ce07bcbe76516069b621ac459da3d69 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7542/71e114da4ce07bcbe76516069b621ac459da3d69/client.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7784, 577, 6421, 12, 2890, 4672, 3536, 2613, 777, 326, 7708, 3285, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 7784, 577, 6421, 12, 2890, 4672, 3536, 2613, 777, 326, 7708, 3285, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
notebook.append_page(windowbutton_box, gtk.Label(_("Window Button")))
notebook.append_page(windowbutton_box, gtk.Label(_("Window Item")))
def __init__ (self):
25580906cd313a0ce8d618137f7433f0450896b2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7075/25580906cd313a0ce8d618137f7433f0450896b2/dbx_preference.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 261, 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, 1001, 2738, 972, 261, 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, -...
EXAMPLES: These computations use pseudo-random numbers, so we set
EXAMPLES: These computations use pseudo-random numbers, so we set
def lower_central_series(self): """ Return the lower central series of this group as a list of permutation groups.
2d077a3331069892dd585070aa02c876686672d2 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9417/2d077a3331069892dd585070aa02c876686672d2/permgroup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2612, 67, 71, 12839, 67, 10222, 12, 2890, 4672, 3536, 2000, 326, 2612, 18291, 4166, 434, 333, 1041, 487, 279, 666, 434, 17440, 3252, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2612, 67, 71, 12839, 67, 10222, 12, 2890, 4672, 3536, 2000, 326, 2612, 18291, 4166, 434, 333, 1041, 487, 279, 666, 434, 17440, 3252, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100...
build = None
def get_build_for_slave(self, name, properties): """Check whether one of the pending builds can be built by the build slave. :param name: the name of the slave :type name: `basestring` :param properties: the slave configuration :type properties: `dict` :return: the allocated build, or `None` if no build was found :rtype: `Build` """ self.log.debug('Checking for pending builds...')
c94787f5d7c70e1690f0a3dddd5ef573c2d72b7b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4547/c94787f5d7c70e1690f0a3dddd5ef573c2d72b7b/queue.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 3510, 67, 1884, 67, 27352, 12, 2890, 16, 508, 16, 1790, 4672, 3536, 1564, 2856, 1245, 434, 326, 4634, 10736, 848, 506, 6650, 635, 326, 1361, 11735, 18, 225, 294, 891, 508, 30,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 3510, 67, 1884, 67, 27352, 12, 2890, 16, 508, 16, 1790, 4672, 3536, 1564, 2856, 1245, 434, 326, 4634, 10736, 848, 506, 6650, 635, 326, 1361, 11735, 18, 225, 294, 891, 508, 30,...
'stopcomm':emulcomm.stopcomm,
'stopcomm':emulcomm.stopcomm,
def nonSafe_fork(): val = __orig_fork() if val == 0 and safe._builtin_globals_r != None: safe._builtin_restore() return val
67fd8a8a159df939f3417ec6b61891f1231d0db8 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7995/67fd8a8a159df939f3417ec6b61891f1231d0db8/repy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1661, 9890, 67, 23335, 13332, 1244, 273, 1001, 4949, 67, 23335, 1435, 309, 1244, 422, 374, 471, 4183, 6315, 24553, 67, 16227, 67, 86, 480, 599, 30, 4183, 6315, 24553, 67, 13991, 1435, 32...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1661, 9890, 67, 23335, 13332, 1244, 273, 1001, 4949, 67, 23335, 1435, 309, 1244, 422, 374, 471, 4183, 6315, 24553, 67, 16227, 67, 86, 480, 599, 30, 4183, 6315, 24553, 67, 13991, 1435, 32...
room = self.current_room()
def command_topic(self, args): """ /topic [new topic] """ subject = ' '.join(args) room = self.current_room() if not room.joined or room.name == "Info": return self.muc.change_subject(room.name, subject)
75c058dafc8dc13883168b413d22b31de1638148 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9814/75c058dafc8dc13883168b413d22b31de1638148/gui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1296, 67, 10476, 12, 2890, 16, 833, 4672, 3536, 342, 10476, 306, 2704, 3958, 65, 3536, 3221, 273, 296, 2418, 5701, 12, 1968, 13, 309, 486, 7725, 18, 5701, 329, 578, 7725, 18, 529, 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, 1296, 67, 10476, 12, 2890, 16, 833, 4672, 3536, 342, 10476, 306, 2704, 3958, 65, 3536, 3221, 273, 296, 2418, 5701, 12, 1968, 13, 309, 486, 7725, 18, 5701, 329, 578, 7725, 18, 529, 422,...
data = decoder._decode_string(node.attributes[attr])
data = decoder._decode_string(node.attributes[attr].nodeValue)
def _decode_into_dict(self, node): diction = {None:[]} for child in node.childNodes: if child.nodeType is child.TEXT_NODE or child.nodeType == child.CDATA_SECTION_NODE: diction[None].append(decoder._decode_string(child.data)) elif node.nodeType is child.ELEMENT_NODE: data = self._decode_into_dict(child) self._add_to_dict(diction, child.tagName, data) else: #TODO !! pass for attr in node.attributes.keys(): data = decoder._decode_string(node.attributes[attr]) self._add_to_dict(diction, attr, data) if len(diction[None]) == 0: del diction[None] return self._reduce_diction(diction)
aa701f9cc79648fdd166a7c1748b9a9fdf829398 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10801/aa701f9cc79648fdd166a7c1748b9a9fdf829398/tools.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3922, 67, 18591, 67, 1576, 12, 2890, 16, 756, 4672, 302, 2228, 273, 288, 7036, 30, 8526, 97, 364, 1151, 316, 756, 18, 3624, 3205, 30, 309, 1151, 18, 2159, 559, 353, 1151, 18, 51...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3922, 67, 18591, 67, 1576, 12, 2890, 16, 756, 4672, 302, 2228, 273, 288, 7036, 30, 8526, 97, 364, 1151, 316, 756, 18, 3624, 3205, 30, 309, 1151, 18, 2159, 559, 353, 1151, 18, 51...
[255, 0, 0, 0, 0, 0, 0, 32, 223, 255],
[255, 0, 0, 0, 0, 0, 0, 31, 223, 255],
def test_antialias_bevel(self): antialias = True width = 3 line_cap = kiva.CAP_BUTT line_join = kiva.JOIN_BEVEL gc = self.helper(antialias, width, line_cap, line_join) actual = gc.bmp_array[:,:,0] desired = array([[255, 255, 255, 255, 255, 255, 255, 255, 255, 255], [255, 255, 255, 255, 255, 127, 0, 0, 127, 255], [255, 255, 255, 255, 255, 127, 0, 0, 127, 255], [255, 255, 255, 255, 255, 127, 0, 0, 127, 255], [255, 255, 255, 255, 255, 127, 0, 0, 127, 255], [255, 127, 127, 127, 127, 0, 0, 0, 127, 255], [255, 0, 0, 0, 0, 0, 0, 0, 127, 255], [255, 0, 0, 0, 0, 0, 0, 32, 223, 255], [255, 127, 127, 127, 127, 127, 127, 223, 255, 255], [255, 255, 255, 255, 255, 255, 255, 255, 255, 255]]) assert_arrays_equal(actual, desired)
693c25b8cee266233747e042e57a3325b339258d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/13166/693c25b8cee266233747e042e57a3325b339258d/join_stroke_path_test_case.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 970, 649, 1795, 67, 2196, 941, 12, 2890, 4672, 17841, 649, 1795, 273, 1053, 1835, 273, 890, 980, 67, 5909, 273, 417, 427, 69, 18, 17296, 67, 3000, 1470, 980, 67, 5701, 273, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 970, 649, 1795, 67, 2196, 941, 12, 2890, 4672, 17841, 649, 1795, 273, 1053, 1835, 273, 890, 980, 67, 5909, 273, 417, 427, 69, 18, 17296, 67, 3000, 1470, 980, 67, 5701, 273, ...
uri = req.uri if uri == '/': path = [''] else: uri = re_slashes.sub('/', uri) path = uri[1:].split('/') return root._traverse(req, path) except TraversalError:
if re_bibdoc_uri.match(req.uri): allowed_methods = ("GET", "POST", "HEAD", "OPTIONS") else: allowed_methods = ("GET", "POST", "OPTIONS") req.allow_methods(allowed_methods) if req.method not in allowed_methods: raise apache.SERVER_RETURN, apache.HTTP_METHOD_NOT_ALLOWED if req.method == 'OPTIONS': req.headers_out['Allow'] = ', '.join(allowed_methods) raise apache.SERVER_RETURN, apache.OK os.environ["HTTP_USER_AGENT"] = req.headers_in.get('User-Agent', '') guest_p = isGuestUser(getUid(req)) if guest_p: cache_control = "public" else: cache_control = "private" req.headers_out['Cache-Control'] = cache_control try: uri = req.uri if uri == '/': path = [''] else: uri = re_slashes.sub('/', uri) path = uri[1:].split('/') return root._traverse(req, path) except TraversalError: return apache.HTTP_NOT_FOUND except apache.SERVER_RETURN: raise except IOError, exc: if 'Write failed, client closed connection' in "%s" % exc: raise else: register_exception(req=req, alert_admin=True) except Exception: register_exception(req=req, alert_admin=True) raise
def _handler(req): """ This handler is invoked by mod_python with the apache request."""
e246d40ba02e9019cdc9b040122014b1d1a2b1d3 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12027/e246d40ba02e9019cdc9b040122014b1d1a2b1d3/webinterface_handler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4176, 12, 3658, 4672, 3536, 1220, 1838, 353, 8187, 635, 681, 67, 8103, 598, 326, 12291, 590, 12123, 2, 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, 4176, 12, 3658, 4672, 3536, 1220, 1838, 353, 8187, 635, 681, 67, 8103, 598, 326, 12291, 590, 12123, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
users_online = User.objects.filter(id__in = users_cached.keys()) and users_cached or []
users_online = users_cached and User.objects.filter(id__in = users_cached.keys()) or []
def index(request, full=True): users_cached = cache.get('users_online', {}) users_online = User.objects.filter(id__in = users_cached.keys()) and users_cached or [] guests_cached = cache.get('guests_online', {}) guest_count = len(guests_cached) users_count = len(users_online) #users_total_online = guest_count + users_count cats = {} forums = {} for forum in Forum.objects.all().select_related(): cat = cats.setdefault(forum.category.id, {'cat': forum.category, 'forums': []}) cat['forums'].append(forum) forums[forum.id] = forum cmpdef = lambda a, b: cmp(a['cat'].position, b['cat'].position) cats = sorted(cats.values(), cmpdef) if full: return {'cats': cats, 'posts': Post.objects.count(), 'topics': Topic.objects.count(), 'users': User.objects.count(), 'users_online': users_online, 'online_count': users_count, 'guest_count': guest_count, 'last_user': User.objects.order_by('-date_joined')[0], } else: return {'cats': cats, 'posts': Post.objects.count(), 'topics': Topic.objects.count(), 'users': User.objects.count(), 'users_online': users_online, 'online_count': users_count, 'guest_count': guest_count, 'last_user': User.objects.order_by('-date_joined')[0], }, 'forum/lofi/index.html'
885343d571bd6dbb8c5b43a652fe979988cadbd2 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/13701/885343d571bd6dbb8c5b43a652fe979988cadbd2/views.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 770, 12, 2293, 16, 1983, 33, 5510, 4672, 3677, 67, 7097, 273, 1247, 18, 588, 2668, 5577, 67, 21026, 2187, 2618, 13, 3677, 67, 21026, 273, 3677, 67, 7097, 471, 2177, 18, 6911, 18, 2188,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 770, 12, 2293, 16, 1983, 33, 5510, 4672, 3677, 67, 7097, 273, 1247, 18, 588, 2668, 5577, 67, 21026, 2187, 2618, 13, 3677, 67, 21026, 273, 3677, 67, 7097, 471, 2177, 18, 6911, 18, 2188,...
l = sum(self.readStats())
stats = self.readStats() print "nr_read", stats[0], "nr_write", stats[1] l = sum(stats) print "sum", l, "prev_sum", self.last_stat
def runIdle(self): if not self.max_idle_time: return t = time.time()
b6b788b0f8da7e1adcde03cebb464da484f48508 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6652/b6b788b0f8da7e1adcde03cebb464da484f48508/Harddisk.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 13834, 12, 2890, 4672, 309, 486, 365, 18, 1896, 67, 20390, 67, 957, 30, 327, 268, 273, 813, 18, 957, 1435, 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, 1086, 13834, 12, 2890, 4672, 309, 486, 365, 18, 1896, 67, 20390, 67, 957, 30, 327, 268, 273, 813, 18, 957, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
scriptRef=weakref.ref(script) if (scriptTime-_lastScriptTime)<=0.5 and script==lastScriptRef:
scriptRef=weakref.ref(script.im_func) if (scriptTime-_lastScriptTime)<=0.5 and script.im_func==lastScriptRef:
def executeScript(script,keyPress): """Executes a given script (function) passing it the given keyPress. It also keeps track of the execution of duplicate scripts with in a certain amount of time, and counts how many times this happens. Use L{getLastScriptRepeatCount} to find out this count value. @param script: the function or method that should be executed. The function or method must take an argument of 'keyPress'. @type script: callable. @param keyPress: the key press that activated this script @type keyPress: an NVDA keyPress """ global _lastScriptTime, _lastScriptCount, _lastScriptRef, _isScriptRunning lastScriptRef=_lastScriptRef() if _lastScriptRef else None #We don't allow the same script to be executed from with in itself, but we still should pass the key through if _isScriptRunning and lastScriptRef==script: return sendKey(keyPress) _isScriptRunning=True try: scriptTime=time.time() scriptRef=weakref.ref(script) if (scriptTime-_lastScriptTime)<=0.5 and script==lastScriptRef: _lastScriptCount+=1 else: _lastScriptCount=0 _lastScriptRef=scriptRef _lastScriptTime=scriptTime script(keyPress) finally: _isScriptRunning=False
03dd0faa19290339da970a1055812f437292b60a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9340/03dd0faa19290339da970a1055812f437292b60a/scriptHandler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1836, 3651, 12, 4263, 16, 856, 11840, 4672, 3536, 9763, 279, 864, 2728, 261, 915, 13, 9588, 518, 326, 864, 498, 11840, 18, 2597, 2546, 20948, 3298, 434, 326, 4588, 434, 6751, 8873, 598, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1836, 3651, 12, 4263, 16, 856, 11840, 4672, 3536, 9763, 279, 864, 2728, 261, 915, 13, 9588, 518, 326, 864, 498, 11840, 18, 2597, 2546, 20948, 3298, 434, 326, 4588, 434, 6751, 8873, 598, ...
role = endmatch.group(suffix)[1:-1]
role = endmatch.group('suffix')[1:-1]
def interpreted(self, before, after, endmatch, role, position, lineno, escaped, rawsource, text): suffix = self.groups.interpreted_or_phrase_ref.suffix if endmatch.group(suffix): if role: msg = self.reporter.warning('Multiple roles in interpreted ' 'text at line %s.' % lineno) return (before + rawsource, [], after, [msg]) role = endmatch.group(suffix)[1:-1] position = 'suffix' if role: atts = {'role': role, 'position': position} else: atts = {} return before, [nodes.interpreted(rawsource, text, **atts)], after, []
6782c922e166489b456fc617b1d5765e9532726e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1532/6782c922e166489b456fc617b1d5765e9532726e/states.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 19898, 12, 2890, 16, 1865, 16, 1839, 16, 679, 1916, 16, 2478, 16, 1754, 16, 7586, 16, 8345, 16, 1831, 3168, 16, 977, 4672, 3758, 273, 365, 18, 4650, 18, 24713, 329, 67, 280, 67, 9429...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 19898, 12, 2890, 16, 1865, 16, 1839, 16, 679, 1916, 16, 2478, 16, 1754, 16, 7586, 16, 8345, 16, 1831, 3168, 16, 977, 4672, 3758, 273, 365, 18, 4650, 18, 24713, 329, 67, 280, 67, 9429...
self._init_utils() self.SetClientSize(wxSize(451, 455))
self.SetClientSize(wx.Size(485, 455))
def _init_ctrls(self, prnt): # generated method, don't edit wxDialog.__init__(self, id=wxID_STCSTYLEEDITDLG, name='STCStyleEditDlg', parent=prnt, pos=wxPoint(583, 291), size=wxSize(459, 482), style=wxWANTS_CHARS | wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER, title=self.stc_title) self._init_utils() self.SetClientSize(wxSize(451, 455)) self.SetAutoLayout(True) self.SetSizeHints(425, 400, -1, -1) self.Center(wxBOTH) EVT_SIZE(self, self.OnStcstyleeditdlgSize)
1e19321bfb8d6ff348cd85bdad3a1a4c2f517fa0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/1e19321bfb8d6ff348cd85bdad3a1a4c2f517fa0/STCStyleEditor.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2738, 67, 16277, 87, 12, 2890, 16, 846, 496, 4672, 468, 4374, 707, 16, 2727, 1404, 3874, 7075, 6353, 16186, 2738, 972, 12, 2890, 16, 612, 33, 27226, 734, 67, 882, 39, 15066, 10776...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2738, 67, 16277, 87, 12, 2890, 16, 846, 496, 4672, 468, 4374, 707, 16, 2727, 1404, 3874, 7075, 6353, 16186, 2738, 972, 12, 2890, 16, 612, 33, 27226, 734, 67, 882, 39, 15066, 10776...
def writeinitialdefs(self): self.defsfile.write("def FOUR_CHAR_CODE(x): return x\n")
def writeinitialdefs(self): self.defsfile.write("def FOUR_CHAR_CODE(x): return x\n")
9b8b720d39a675b26c7ee02ef1bf901b835b2139 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/9b8b720d39a675b26c7ee02ef1bf901b835b2139/mltesupport.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 6769, 12537, 12, 2890, 4672, 365, 18, 12537, 768, 18, 2626, 2932, 536, 17634, 1099, 67, 7305, 67, 5572, 12, 92, 4672, 327, 619, 64, 82, 7923, 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, 0, 0, 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, 1045, 6769, 12537, 12, 2890, 4672, 365, 18, 12537, 768, 18, 2626, 2932, 536, 17634, 1099, 67, 7305, 67, 5572, 12, 92, 4672, 327, 619, 64, 82, 7923, 2, -100, -100, -100, -100, -100, -10...
def on_row_deleted(self, model, path):
def on_row_deleted(self, model, path):
def on_row_deleted(self, model, path): parent_path = path[:-1] if len(parent_path) > 0: it = model.get_iter(parent_path) else: it = model.get_iter_root() nrows = model.iter_n_children(it) for i in xrange(path[-1], nrows): self.data2path[parent_path + (i,)] = \ self[parent_path + (i,)][self.data_col]
594f1c108ffe3bf5b4c53f58baae8e98bcb5a9b3 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4738/594f1c108ffe3bf5b4c53f58baae8e98bcb5a9b3/gui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 492, 67, 8600, 12, 2890, 16, 938, 16, 589, 4672, 982, 67, 803, 273, 589, 10531, 17, 21, 65, 225, 309, 562, 12, 2938, 67, 803, 13, 405, 374, 30, 518, 273, 938, 18, 588, 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, 603, 67, 492, 67, 8600, 12, 2890, 16, 938, 16, 589, 4672, 982, 67, 803, 273, 589, 10531, 17, 21, 65, 225, 309, 562, 12, 2938, 67, 803, 13, 405, 374, 30, 518, 273, 938, 18, 588, 6...
print "New nick already exists!"
LOG.debug( "New nick already exists!" )
def changeNick(self, oldnick, newnick): try: u = self.users.pop(oldnick) except KeyError: print "Nick doesn't exist" return
1a57390c60627da9e810a0212997b3f88d2873a4 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11503/1a57390c60627da9e810a0212997b3f88d2873a4/dtella_bridgeserver.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2549, 29756, 12, 2890, 16, 1592, 17091, 16, 394, 17091, 4672, 775, 30, 582, 273, 365, 18, 5577, 18, 5120, 12, 1673, 17091, 13, 1335, 4999, 30, 1172, 315, 29756, 3302, 1404, 1005, 6, 32...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2549, 29756, 12, 2890, 16, 1592, 17091, 16, 394, 17091, 4672, 775, 30, 582, 273, 365, 18, 5577, 18, 5120, 12, 1673, 17091, 13, 1335, 4999, 30, 1172, 315, 29756, 3302, 1404, 1005, 6, 32...
"""Initialize master list menus.""" if True: sortMenu = MenuLink(_("Sort by")) sortMenu.links.append(Mods_EsmsFirst()) sortMenu.links.append(SeparatorLink()) sortMenu.links.append(Files_SortBy('File')) sortMenu.links.append(Files_SortBy('Author')) sortMenu.links.append(Files_SortBy('Group')) sortMenu.links.append(Files_SortBy('Load Order')) sortMenu.links.append(Files_SortBy('Modified')) sortMenu.links.append(Files_SortBy('Save Order')) sortMenu.links.append(Files_SortBy('Status')) MasterList.mainMenu.append(sortMenu) MasterList.itemMenu.append(Master_ChangeTo()) MasterList.itemMenu.append(Master_Disable())
"""Initialize master list menus.""" if True: sortMenu = MenuLink(_("Sort by")) sortMenu.links.append(Mods_EsmsFirst()) sortMenu.links.append(SeparatorLink()) sortMenu.links.append(Files_SortBy('File')) sortMenu.links.append(Files_SortBy('Author')) sortMenu.links.append(Files_SortBy('Group')) sortMenu.links.append(Files_SortBy('Load Order')) sortMenu.links.append(Files_SortBy('Modified')) sortMenu.links.append(Files_SortBy('Save Order')) sortMenu.links.append(Files_SortBy('Status')) MasterList.mainMenu.append(sortMenu) MasterList.itemMenu.append(Master_ChangeTo()) MasterList.itemMenu.append(Master_Disable())
def InitMasterLinks(): """Initialize master list menus.""" #--MasterList: Column Links if True: #--Sort by sortMenu = MenuLink(_("Sort by")) sortMenu.links.append(Mods_EsmsFirst()) sortMenu.links.append(SeparatorLink()) sortMenu.links.append(Files_SortBy('File')) sortMenu.links.append(Files_SortBy('Author')) sortMenu.links.append(Files_SortBy('Group')) sortMenu.links.append(Files_SortBy('Load Order')) sortMenu.links.append(Files_SortBy('Modified')) sortMenu.links.append(Files_SortBy('Save Order')) sortMenu.links.append(Files_SortBy('Status')) MasterList.mainMenu.append(sortMenu) #--MasterList: Item Links MasterList.itemMenu.append(Master_ChangeTo()) MasterList.itemMenu.append(Master_Disable())
3ac43907fa076fea1e8d682219e2b28fc7419f7b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6682/3ac43907fa076fea1e8d682219e2b28fc7419f7b/basher.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4378, 7786, 7100, 13332, 3536, 7520, 4171, 666, 21374, 12123, 468, 413, 7786, 682, 30, 4753, 21771, 309, 1053, 30, 468, 413, 4416, 635, 1524, 4599, 273, 9809, 2098, 24899, 2932, 4416, 635,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4378, 7786, 7100, 13332, 3536, 7520, 4171, 666, 21374, 12123, 468, 413, 7786, 682, 30, 4753, 21771, 309, 1053, 30, 468, 413, 4416, 635, 1524, 4599, 273, 9809, 2098, 24899, 2932, 4416, 635,...
try: del e.__dict__ except (TypeError, AttributeError): pass else: self.fail("%r's __dict__ can be deleted" % e)
self.assertEqual(can_delete_dict(e), can_delete_dict(ValueError()))
def verify_dict_readonly(x): """ x has to be an instance of a class inheriting from Base. """ cant(x, {}) try: del x.__dict__ except (AttributeError, TypeError): pass else: self.fail("shouldn't allow del %r.__dict__" % x) dict_descr = Base.__dict__["__dict__"] try: dict_descr.__set__(x, {}) except (AttributeError, TypeError): pass else: self.fail("dict_descr allowed access to %r's dict" % x)
4a0d8c36fabcd955e24a465c9276c005529fa702 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8125/4a0d8c36fabcd955e24a465c9276c005529fa702/test_descr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3929, 67, 1576, 67, 16365, 12, 92, 4672, 3536, 619, 711, 358, 506, 392, 791, 434, 279, 667, 6811, 310, 628, 3360, 18, 3536, 848, 88, 12, 92, 16, 2618, 13, 775, 30, 1464, 619, 16186, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3929, 67, 1576, 67, 16365, 12, 92, 4672, 3536, 619, 711, 358, 506, 392, 791, 434, 279, 667, 6811, 310, 628, 3360, 18, 3536, 848, 88, 12, 92, 16, 2618, 13, 775, 30, 1464, 619, 16186, ...
self.bistream_prefix = 'smb-'
def __init__ (self): connection.__init__(self,"tcp") self.state = { 'lastcmd': None, 'readcount': 0, 'stop': False, } self.buf = b'' self.outbuf = None self.fids = {} self.bistream_prefix = 'smb-' self.printer = b'' # spoolss file "queue"
25421a24103a2dc32edc55a3aeaa6a6f22c72e4b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8801/25421a24103a2dc32edc55a3aeaa6a6f22c72e4b/smb.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 261, 2890, 4672, 1459, 16186, 2738, 972, 12, 2890, 10837, 14832, 7923, 365, 18, 2019, 273, 288, 296, 2722, 4172, 4278, 599, 16, 296, 896, 1883, 4278, 374, 16, 296, 5681,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 261, 2890, 4672, 1459, 16186, 2738, 972, 12, 2890, 10837, 14832, 7923, 365, 18, 2019, 273, 288, 296, 2722, 4172, 4278, 599, 16, 296, 896, 1883, 4278, 374, 16, 296, 5681,...
@param capability: enumeration with the following options: - DRIVERVERSION - TECHNOLOGY - HORZSIZE - VERTSIZE - HORZRES - VERTRES - LOGPIXELSX - LOGPIXELSY @return: device capability @rtype: int @type capability: int
@return: Capability dictionary; note that to conform with ECMA documentation, the key names are in upper case: - B{DRIVERVERSION} - Device driver version number. Value is always 1. - B{TECHNOLOGY} - Device technology available. Always returns DT_METAFILE - B{HORZSIZE} - Horizontal size of reference device in millimeters. - B{VERTSIZE} - Vertical size in millimeters. - B{HORZRES} - Horizontal size in device units (pixels). - B{VERTRES} - Vertical size in device units (pixels). - B{LOGPIXELSX} - Number of horizontal pixels per inch. - B{LOGPIXELSY} - Number of vertical pixels per inch. @rtype: C{dict}
def GetDeviceCaps(self,capability): """
688318604ffe18a54bb261a3bde4bf6e1784a8de /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8136/688318604ffe18a54bb261a3bde4bf6e1784a8de/pyemf.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 31102, 24193, 12, 2890, 16, 13568, 4672, 3536, 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, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 31102, 24193, 12, 2890, 16, 13568, 4672, 3536, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
Container(id,SERIES_CONTAINER_ID, brand.find('./{http://purl.org/dc/elements/1.1/}title').text)
Container(id,self,SERIES_CONTAINER_ID,brand.find('./{http://purl.org/dc/elements/1.1/}title').text)
def parse_data(self, xml_data): root = xml_data.getroot()
b05ff0a9e7f655cfa0f1e793ec877c71f81adbdc /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11626/b05ff0a9e7f655cfa0f1e793ec877c71f81adbdc/bbc_storage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 892, 12, 2890, 16, 2025, 67, 892, 4672, 1365, 273, 2025, 67, 892, 18, 588, 3085, 1435, 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, 1109, 67, 892, 12, 2890, 16, 2025, 67, 892, 4672, 1365, 273, 2025, 67, 892, 18, 588, 3085, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
if connType & self.CONN_SSL and proxy.requestProtocol == 'conary':
if connType * self.CONN_SSL and proxy.protocol == 'http':
def _getConnectionTypeEndpointProxy(self, endpoint, proxy): m = URLOpener.ConnectionManager._getConnectionTypeEndpointProxy connType, selector = m(self, endpoint, proxy) if proxy.requestProtocol in self.ConaryProxyProtocols: if connType & self.CONN_TUNNEL: # Conary proxies don't implement tunneling, so clear the bit connType = connType ^ self.CONN_TUNNEL if connType & self.CONN_SSL and proxy.requestProtocol == 'conary': # Endpoint is SSL, but we're mapping to a plain Conary # proxy connType = connType ^ self.CONN_SSL if connType & self.CONN_PROXY: selector = endpoint.url return connType, selector
e580ae3c2b33c030aa37e6519cdca52e7f68f63b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8747/e580ae3c2b33c030aa37e6519cdca52e7f68f63b/transport.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 1952, 559, 3293, 3886, 12, 2890, 16, 2494, 16, 2889, 4672, 312, 273, 225, 1618, 1502, 84, 708, 18, 1952, 1318, 6315, 588, 1952, 559, 3293, 3886, 1487, 559, 16, 3451, 273, 312...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1952, 559, 3293, 3886, 12, 2890, 16, 2494, 16, 2889, 4672, 312, 273, 225, 1618, 1502, 84, 708, 18, 1952, 1318, 6315, 588, 1952, 559, 3293, 3886, 1487, 559, 16, 3451, 273, 312...
preOps = [
postOps = [
def infSitesMutate(pop, param): '''Apply an infinite mutation model''' (startPos, endPos, rate) = param # for each individual for ind in pop.individuals(): # for each homologous copy of chromosomes for p in range(2): # using a geometric distribution to determine # the first mutation location loc = GetRNG().randGeometric(rate) # if a mutation happens, record the mutated location if startPos + loc < endPos: try: # find the first non-zero location idx = ind.genotype(p).index(0) # record mutation here ind.setAllele(startPos + loc, idx, ploidy=p) except: print 'Warning: more than %d mutations have accumulated' % pop.totNumLoci() pass return True
505ded08bbab01d6828bb201d31e079f6d9e3b55 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/401/505ded08bbab01d6828bb201d31e079f6d9e3b55/userGuide.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8286, 17055, 7420, 340, 12, 5120, 16, 579, 4672, 9163, 7001, 392, 14853, 11934, 938, 26418, 261, 1937, 1616, 16, 19809, 16, 4993, 13, 273, 579, 468, 364, 1517, 7327, 364, 1547, 316, 1843...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 8286, 17055, 7420, 340, 12, 5120, 16, 579, 4672, 9163, 7001, 392, 14853, 11934, 938, 26418, 261, 1937, 1616, 16, 19809, 16, 4993, 13, 273, 579, 468, 364, 1517, 7327, 364, 1547, 316, 1843...
def set_playlist(self):
def get_playlist(self):
def set_playlist(self): file_list = [] for root, dirs, files in os.walk(self.media_dir): for file in files: s = file.split('.') ext = s[len(s)-1] if ext.lower() == self.channel.format and not '/.' in file: file_list.append(root + os.sep + file) file_list.sort() self.playlist = file_list
b5e9ba95fb119a579c4d9baa04a915d54abc16d6 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12047/b5e9ba95fb119a579c4d9baa04a915d54abc16d6/deefuzzer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 1601, 1098, 12, 2890, 4672, 585, 67, 1098, 273, 5378, 364, 1365, 16, 7717, 16, 1390, 316, 1140, 18, 11348, 12, 2890, 18, 5829, 67, 1214, 4672, 364, 585, 316, 1390, 30, 272, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1601, 1098, 12, 2890, 4672, 585, 67, 1098, 273, 5378, 364, 1365, 16, 7717, 16, 1390, 316, 1140, 18, 11348, 12, 2890, 18, 5829, 67, 1214, 4672, 364, 585, 316, 1390, 30, 272, ...
cleaner = CleanerBackend.Cleaner()
cleaner = bleachbit.CleanerBackend.Cleaner()
def cb_shred_file(self, action): """Callback for shredding a file"""
172134923f18cf7e444d183a0a73ebddceee0fa3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7853/172134923f18cf7e444d183a0a73ebddceee0fa3/GUI.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2875, 67, 674, 1118, 67, 768, 12, 2890, 16, 1301, 4672, 3536, 2428, 364, 699, 266, 449, 310, 279, 585, 8395, 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, 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, 2875, 67, 674, 1118, 67, 768, 12, 2890, 16, 1301, 4672, 3536, 2428, 364, 699, 266, 449, 310, 279, 585, 8395, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
def load_cache(filename):
def mangle_key(key): return key def load_cache(filename,get_key=mangle_key):
def load_cache(filename): cache={} if not os.path.exists(filename): return cache f=open(filename,'r') l=0 for line in f.readlines(): l+=1 fields=line.split(' ') if fields==None or not len(fields)==2 or fields[0][0]!=':': sys.stderr.write('Invalid file format in [%s], line %d\n' % (filename,l)) continue # put key:value in cache, key without ^: cache[fields[0][1:]]=fields[1].split('\n')[0] f.close() return cache
8551771d2b3ce508a6d901f7cde6818d4e20e361 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12824/8551771d2b3ce508a6d901f7cde6818d4e20e361/hg2git.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 312, 4341, 67, 856, 12, 856, 4672, 327, 498, 225, 1652, 1262, 67, 2493, 12, 3459, 16, 588, 67, 856, 33, 81, 4341, 67, 856, 4672, 1247, 12938, 309, 486, 1140, 18, 803, 18, 1808, 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, 312, 4341, 67, 856, 12, 856, 4672, 327, 498, 225, 1652, 1262, 67, 2493, 12, 3459, 16, 588, 67, 856, 33, 81, 4341, 67, 856, 4672, 1247, 12938, 309, 486, 1140, 18, 803, 18, 1808, 12, ...
self._append(Failure())
self._buffer.append(Failure())
def _process(self): """ pull values from the iterable and add them to the buffer """ try: self._iterable = iter(self._iterable) except: self._append(Failure()) else: try: while 1: self._buffer.append(self._iterable.next()) except StopIteration: pass except: self._append(Failure()) self._stop = 1
6dea9c8aa51573693da7fc94c124b0fba9dc7b06 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/6dea9c8aa51573693da7fc94c124b0fba9dc7b06/flow.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2567, 12, 2890, 4672, 3536, 6892, 924, 628, 326, 6087, 471, 527, 2182, 358, 326, 1613, 3536, 775, 30, 365, 6315, 15364, 273, 1400, 12, 2890, 6315, 15364, 13, 1335, 30, 365, 6315, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 12, 2890, 4672, 3536, 6892, 924, 628, 326, 6087, 471, 527, 2182, 358, 326, 1613, 3536, 775, 30, 365, 6315, 15364, 273, 1400, 12, 2890, 6315, 15364, 13, 1335, 30, 365, 6315, ...
if not self.headers.has_key("Proxy-Authorization"):
if not self.check_proxy_auth():
def __init__(self, client, request, headers, content, nofilter): self.client = client self.request = request self.headers = headers if config["proxyuser"]: if not self.headers.has_key("Proxy-Authorization"): self.error(407, _("Proxy Authentication Required")) return auth = self.headers['Proxy-Authorization'] # XXX more self.content = content self.nofilter = nofilter self.url = "" try: self.method, self.url, protocol = request.split() except: config['requests']['error'] += 1 self.error(400, _("Can't parse request")) return if not self.url: config['requests']['error'] += 1 self.error(400, _("Empty URL")) return scheme, hostname, port, document = wc.proxy.spliturl(self.url) #debug(HURT_ME_PLENTY, "splitted url", scheme, hostname, port, document) if scheme=='file': # a blocked url is a local file:// link # this means we should _not_ use this proxy for local # file links :) mtype = mimetypes.guess_type(self.url)[0] config['requests']['valid'] += 1 config['requests']['blocked'] += 1 ServerHandleDirectly(self.client, 'HTTP/1.0 200 OK\r\n', 'Content-Type: %s\r\n\r\n' % (mtype or 'application/octet-stream'), open(document, 'rb').read()) return
d6835cc5191913e3d2e6a5c36b16f6b076d9fc6c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3948/d6835cc5191913e3d2e6a5c36b16f6b076d9fc6c/ClientServerMatchmaker.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1004, 16, 590, 16, 1607, 16, 913, 16, 290, 792, 1088, 4672, 365, 18, 2625, 273, 1004, 365, 18, 2293, 273, 590, 365, 18, 2485, 273, 1607, 309, 642, 9614...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1004, 16, 590, 16, 1607, 16, 913, 16, 290, 792, 1088, 4672, 365, 18, 2625, 273, 1004, 365, 18, 2293, 273, 590, 365, 18, 2485, 273, 1607, 309, 642, 9614...
"task-specific-name=", "runtime-limit=",
"name=", "limit=",
def _task_build_params( task_name, argv, description="", help_specific_usage="", version=__revision__, specific_params=("", []), task_submit_elaborate_specific_parameter_fnc=None, task_submit_check_options_fnc=None): """ Build the BibTask params. @param argv a list of string as in sys.argv @param description is the generic description printed in the usage page; @param help_specific_usage is the specific parameter help @param task_submit_elaborate_specific_parameter_fnc will be called passing a key and a value, for parsing specific cli parameters. Must return True if it has recognized the parameter. Must eventually update the options with bibtask_set_option; @param task_submit_check_options must check the validity of options (via bibtask_get_option) once all the options where parsed; """ global _task_params, _options _options = {} if task_name in CFG_BIBTASK_DEFAULT_TASK_SETTINGS: _options.update(CFG_BIBTASK_DEFAULT_TASK_SETTINGS[task_name]) # set user-defined options: try: (short_params, long_params) = specific_params opts, args = getopt.gnu_getopt(argv[1:], "hVv:u:s:t:P:N:L:" + short_params, [ "help", "version", "verbose=", "user=", "sleep=", "time=", "priority=", "task-specific-name=", "runtime-limit=", "profile=" ] + long_params) except getopt.GetoptError, err: _usage(1, err, help_specific_usage=help_specific_usage, description=description) try: for opt in opts: if opt[0] in ("-h", "--help"): _usage(0, help_specific_usage=help_specific_usage, description=description) elif opt[0] in ("-V", "--version"): print _task_params["version"] sys.exit(0) elif opt[0] in ("-u", "--user"): _task_params["user"] = opt[1] elif opt[0] in ("-v", "--verbose"): _task_params["verbose"] = int(opt[1]) elif opt[0] in ("-s", "--sleeptime"): if task_name not in CFG_TASK_IS_NOT_A_DEAMON: get_datetime(opt[1]) # see if it is a valid shift _task_params["sleeptime"] = opt[1] elif opt[0] in ("-t", "--runtime"): _task_params["runtime"] = get_datetime(opt[1]) elif opt[0] in ("-P", "--priority"): _task_params["priority"] = int(opt[1]) elif opt[0] in ("-N", "--task-specific-name"): _task_params["task_specific_name"] = opt[1] elif opt[0] in ("-L", "--runtime-limit"): _task_params["runtime_limit"] = parse_runtime_limit(opt[1]) elif opt[0] in ("--profile", ): _task_params["profile"] += opt[1].split(',') elif not callable(task_submit_elaborate_specific_parameter_fnc) or \ not task_submit_elaborate_specific_parameter_fnc(opt[0], opt[1], opts, args): _usage(1, help_specific_usage=help_specific_usage, description=description) except StandardError, e: _usage(e, help_specific_usage=help_specific_usage, description=description) if callable(task_submit_check_options_fnc): if not task_submit_check_options_fnc(): _usage(1, help_specific_usage=help_specific_usage, description=description)
83bf104f28b02316d29d8cf6f2faa75ad4726d30 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12027/83bf104f28b02316d29d8cf6f2faa75ad4726d30/bibtask.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4146, 67, 3510, 67, 2010, 12, 1562, 67, 529, 16, 5261, 16, 2477, 1546, 3113, 2809, 67, 12524, 67, 9167, 1546, 3113, 1177, 33, 972, 13057, 972, 16, 2923, 67, 2010, 33, 2932, 3113, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4146, 67, 3510, 67, 2010, 12, 1562, 67, 529, 16, 5261, 16, 2477, 1546, 3113, 2809, 67, 12524, 67, 9167, 1546, 3113, 1177, 33, 972, 13057, 972, 16, 2923, 67, 2010, 33, 2932, 3113, ...
self.top.wm_deiconify() self.top.tkraise()
def close(self): self.top.wm_deiconify() self.top.tkraise() reply = self.maybesave() if reply != "cancel": self._close() return reply
68bb5d8c6ac691185a1e0d23e1b9e98464d8fd68 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/68bb5d8c6ac691185a1e0d23e1b9e98464d8fd68/EditorWindow.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1746, 12, 2890, 4672, 4332, 273, 365, 18, 24877, 70, 281, 836, 1435, 309, 4332, 480, 315, 10996, 6877, 365, 6315, 4412, 1435, 327, 4332, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1746, 12, 2890, 4672, 4332, 273, 365, 18, 24877, 70, 281, 836, 1435, 309, 4332, 480, 315, 10996, 6877, 365, 6315, 4412, 1435, 327, 4332, 2, -100, -100, -100, -100, -100, -100, -100, -100...
def VisualizeNet(net,xy,coloredvertices=False,equalsize=False,labels={},showAllNodes=True,vcolor=[1.0,1.0,1.0],vsize=1.0,nodeColors={},bgcolor='white',maxwidth=2.0,minwidth=0.2,uselabels='none',edgeColorMap='winter',weightLimits='none'):
def VisualizeNet(net,xy,figsize=(6,6),coloredvertices=False,equalsize=False,labels={},showAllNodes=True,vcolor=[1.0,1.0,1.0],vsize=1.0,nodeColors={},bgcolor='white',maxwidth=2.0,minwidth=0.2,uselabels='none',edgeColorMap='winter',weightLimits='none'):
def VisualizeNet(net,xy,coloredvertices=False,equalsize=False,labels={},showAllNodes=True,vcolor=[1.0,1.0,1.0],vsize=1.0,nodeColors={},bgcolor='white',maxwidth=2.0,minwidth=0.2,uselabels='none',edgeColorMap='winter',weightLimits='none'): ''' Visualizes a network. Inputs: net = network to be visualized (of type SymmNet() ). xy = coordinates (usually originating from visuals.Himmeli, e.g. h=visuals.Himmeli(net,...,...) followed by xy=h.getCoordinates() coloredvertices = (True/False). If True, i) IF dict nodeColors was given, these colors are used, ii) IF NOT, vcolor is used if given, and if not, nodes are white. If False, node colors are based on strength. equalsize = (True/False) True: all vertices are of same size, input as vsize, default 1.0. False: sizes are based on vertex strength. showAllNodes = (True/False) something of a quick hack; if True, displays disconnected components and nodes which have no edges left after e.g. thresholding bgcolor = [r g b], r/g/b between 0.0 and 1.0. Background color, default is black. maxwidth = max width of edges as plotted, default 2.0 minwidth = min width of edges as plotted, default 0.2 uselabels = ('none','all') Determines if node labels are shown. 'none' shows none, 'all' shows all. Note: any labels input in dict labels ({nodename:labelstring}) are always shown; use this dict to show labels next to your chosen nodes of interest. edgeColorMap=myMap allows the user to set color scheme for edges. Edges are always colored according to edge weights, which are first normalized to the range (0,1) and then transformed to colors using edgeColorMap. There are 150 colormaps available in pylab; for a full listing, please see help(pylab.cm) (and look for DATA). Or try, for example, edgeColorMap='orange' or edgeColorMap='primary', two colormaps of our own that are not available in pylab. weightLimits=(0,5) The tuple (minWeight, maxWeight) provides the minimum and maximum value for weights. If none are given, (nearly) the true min and max weights in the network will be used. The weightLimits are used for setting edge colors and width. They enable the user to plot several networks (which may have different min and max weights) such that a certain color and width always correspond to a certain edge weight. Thus, the color and width in the visualization can be used to infer edge weight. If the network turns out to contain weights above the given maxWeight (below minWeight) these will be rounded downwards (upwards) to the given limit. It is more reasonable however for the user to provide limits that can accommodate all weights, this is just a necessary precaution for the case where the given limits are too tight. Usage examples: m=pynet.SymmNet() m[0][1]=1.0 m[1][2]=3.5 m[0][2]=5.0 Here are the coordinates, a dictionary that contains 2-tuples xy={} xy[0]=(0,0) xy[1]=(4,0) xy[2]=(2,3) f=FigureCanvasBase(visuals.VisualizeNet(m,xy)) f.print_eps("tmp.eps",dpi=80.0) f=FigureCanvasBase(visuals.VisualizeNet(m,xy,edgeColorMap='orange')) f.print_eps("tmp2.eps",dpi=80.0) f=FigureCanvasBase(visuals.VisualizeNet(m,xy,edgeColorMap='orange',equalsize=True,vsize=16)) f.print_eps("tmp3.eps",dpi=80.0) (General questions: Is there a neater way to output the figures than using FigureCanvasBase? How can I have a look at the figures from within python, without saving them to .eps files?) ''' thisfigure=Figure(figsize=(6,6),dpi=100,facecolor=bgcolor) axes=thisfigure.add_subplot(111) axes.set_axis_bgcolor(bgcolor) # sets the color for node labels fontcolor='w' if bgcolor=='white': fontcolor='k' # first draw all edges edges=list(net.edges) wlist=[] for edge in edges: wlist.append(edge[2]) wmin=min(wlist) wmax=max(wlist) # If weightLimits were not given, use (almost) the true min # and max weights in the network. Note: using a value slightly # below wmin, because otherwise when normalizing the weights, # the minimum weights would be transformed to zero and the # edges not visible at all. - Riitta if weightLimits=='none': if wmin==0: weightLimits=(wmin,wmax) else: weightLimits=(wmin-0.00001,wmax) myEdgeColorMap=setEdgeColorMap(edgeColorMap) for edge in edges: width=setEdgeWidth(edge[2],weightLimits,minwidth,maxwidth) colour=setEdgeColor(edge[2],weightLimits,myEdgeColorMap) xcoords=[xy[edge[0]][0],xy[edge[1]][0]] ycoords=[xy[edge[0]][1],xy[edge[1]][1]] plot_edge(axes,xcoords,ycoords,width=width,colour=colour) # then draw nodes, depending on given options # showAllNodes displays also nodes who do not have any edges # left after e.g. thresholding nodelist=[] if showAllNodes: for node in xy.keys(): nodelist.append(node) else: for node in net: nodelist.append(node) minnode=2.0 maxnode=6.0 strengths=netext.strengths(net) maxs=max(strengths.values()) mins=min(strengths.values()) if not(equalsize): A=(maxnode-minnode)/(maxs-mins) B=maxnode-A*maxs for node in nodelist: # first define size if equalsize: nodesize=vsize if (nodesize<1.0): # hack: Himmeli wants size <1.0 nodesize=nodesize*maxnode # if Himmeli-type size used, scale up else: if node in net: nodestrength=strengths[node] nodesize=A*strengths[node]+B else: nodestrength=mins nodesize=minnode # then determine color if coloredvertices: if len(nodeColors)>0: ctemp=nodeColors[node] if len(ctemp)==6: # recognize as Himmeli-type string ('999999') rc=float(ctemp[0:2])/99.0 gc=float(ctemp[2:4])/99.0 bc=float(ctemp[4:6])/99.0 # this is a stupid hack; sometimes rounding errors result # in rc=1.0 + epsilon and matplotlib complains... if (rc<0.0): rc=0.0 elif rc>1.0: rc=1.0 if (bc<0.0): bc=0.0 elif bc>1.0: bc=1.0 if (gc<0.0): gc=0.0 elif gc>1.0: gc=1.0 color=(rc,gc,bc) else: color=nodeColors[node] #othrwise assume it is a RGB tuple else: if len(vcolor)==6: rc=float(vcolor[0:2])/99.0 gc=float(vcolor[2:4])/99.0 bc=float(vcolor[4:6])/99.0 if (rc<0.0): rc=0.0 elif rc>1.0: rc=1.0 if (bc<0.0): bc=0.0 elif bc>1.0: bc=1.0 if (gc<0.0): gc=0.0 elif gc>1.0: gc=1.0 color=(rc,gc,bc) else: color=vcolor else: color=setEdgeColor(nodestrength,(mins,maxs),myEdgeColorMap) # use the same colormap for nodes as for edges (now the name edgeColorMap is a bit misleading... Could change it to just colorMap, or alternatively add another input option, 'nodeColorMap') #color=colortuple(nodestrength,mins,maxs) plot_node(axes,x=xy[node][0],y=xy[node][1],color=color,size=nodesize) if uselabels=='all': axes.annotate(str(node),(xy[node][0],xy[node][1]),color=fontcolor,size=7) elif node in labels: axes.annotate(labels[node],(xy[node][0],xy[node][1]),color=fontcolor,size=7) setp(axes,'xticks','','xticklabels','','yticks','','yticklabels','') xylist=xy.values() xlist=[] ylist=[] for elem in xylist: xlist.append(elem[0]) ylist.append(elem[1]) minx=min(xlist) maxx=max(xlist) miny=min(ylist) maxy=max(ylist) xdelta=0.05*(maxx-minx) ydelta=0.05*(maxy-miny) setp(axes,'xlim',(minx-xdelta,maxx+xdelta),'ylim',(miny-ydelta,maxy+ydelta)) return thisfigure
c16fe22866cce6c3aabc203d3b2bf1cd6e8eb553 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/768/c16fe22866cce6c3aabc203d3b2bf1cd6e8eb553/visuals.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 26832, 554, 7308, 12, 2758, 16, 1698, 16, 470, 1467, 28657, 26, 16, 26, 3631, 1293, 7653, 17476, 33, 8381, 16, 14963, 554, 33, 8381, 16, 5336, 28793, 4500, 1595, 3205, 33, 5510, 16, 90...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 26832, 554, 7308, 12, 2758, 16, 1698, 16, 470, 1467, 28657, 26, 16, 26, 3631, 1293, 7653, 17476, 33, 8381, 16, 14963, 554, 33, 8381, 16, 5336, 28793, 4500, 1595, 3205, 33, 5510, 16, 90...
bpnum = int(args[0].strip())
try: bpnum = int(args[0].strip()) except ValueError: print >>self.stdout, \ 'Breakpoint index %r is not a number' % args[0]
def do_ignore(self,arg): """arg is bp number followed by ignore count.""" args = arg.split() bpnum = int(args[0].strip()) try: count = int(args[1].strip()) except: count = 0 bp = bdb.Breakpoint.bpbynumber[bpnum] if bp: bp.ignore = count if count > 0: reply = 'Will ignore next ' if count > 1: reply = reply + '%d crossings' % count else: reply = reply + '1 crossing' print >>self.stdout, reply + ' of breakpoint %d.' % bpnum else: print >>self.stdout, 'Will stop next time breakpoint', print >>self.stdout, bpnum, 'is reached.'
1e4bb440488e7b982c62fe117cd5409402818d02 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8546/1e4bb440488e7b982c62fe117cd5409402818d02/pdb.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 6185, 12, 2890, 16, 3175, 4672, 3536, 3175, 353, 9107, 1300, 10860, 635, 2305, 1056, 12123, 833, 273, 1501, 18, 4939, 1435, 775, 30, 9107, 2107, 273, 509, 12, 1968, 63, 20, 80...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 6185, 12, 2890, 16, 3175, 4672, 3536, 3175, 353, 9107, 1300, 10860, 635, 2305, 1056, 12123, 833, 273, 1501, 18, 4939, 1435, 775, 30, 9107, 2107, 273, 509, 12, 1968, 63, 20, 80...
product = self.pool.get('product.product').read(cr, uid, r['product_id'], [field_to_read,'standard_price'], context=c)
product = self.pool.get('product.product').read(cr, uid, r['product_id'], [field_to_read, 'standard_price'], context=c)
def product_detail(self, cr, uid, id, field, context={}): res = {} res[id] = {} final_value = 0.0 field_to_read = 'virtual_available' if field == 'stock_real_value': field_to_read = 'qty_available' cr.execute('select distinct product_id from stock_move where (location_id=%s) or (location_dest_id=%s)',(id,id)) result = cr.dictfetchall() if result: for r in result: c = (context or {}).copy() c['location'] = id product = self.pool.get('product.product').read(cr, uid, r['product_id'], [field_to_read,'standard_price'], context=c) final_value += (product[field_to_read] * product['standard_price']) return final_value
369221b47101072e094ad2d02fe2edd2b47690aa /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/369221b47101072e094ad2d02fe2edd2b47690aa/stock.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3017, 67, 8992, 12, 2890, 16, 4422, 16, 4555, 16, 612, 16, 652, 16, 819, 12938, 4672, 400, 273, 2618, 400, 63, 350, 65, 273, 2618, 727, 67, 1132, 273, 374, 18, 20, 652, 67, 869, 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, 3017, 67, 8992, 12, 2890, 16, 4422, 16, 4555, 16, 612, 16, 652, 16, 819, 12938, 4672, 400, 273, 2618, 400, 63, 350, 65, 273, 2618, 727, 67, 1132, 273, 374, 18, 20, 652, 67, 869, 67...
if os.access(chapter.props.video_name, os.F_OK): print " video %s already exists" % chapter.props.video_name
if not chapter.remake and os.access(chapter.video_name, os.F_OK): print " video %s already exists" % chapter.video_name
def __check_video(self, chapter): print " creating video %s" % chapter.props.video_name yuv_cmd = "jpeg2yuv -v 0 -f 25 -I p -j '%s' " mpeg_cmd = "mpeg2enc -v 0 -a 2 -n p -f 4 -o '%s'" if os.access(chapter.props.video_name, os.F_OK): print " video %s already exists" % chapter.props.video_name return
197c33d735d49bab858cd4dda3c7f019e3dd0db3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2675/197c33d735d49bab858cd4dda3c7f019e3dd0db3/VideoCD.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1893, 67, 9115, 12, 2890, 16, 23580, 4672, 1172, 315, 4979, 6191, 738, 87, 6, 738, 23580, 18, 9693, 18, 9115, 67, 529, 677, 16303, 67, 4172, 273, 315, 14423, 22, 93, 16303, 300, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1893, 67, 9115, 12, 2890, 16, 23580, 4672, 1172, 315, 4979, 6191, 738, 87, 6, 738, 23580, 18, 9693, 18, 9115, 67, 529, 677, 16303, 67, 4172, 273, 315, 14423, 22, 93, 16303, 300, ...
The method name will be the lowercase version of field name. The method would return relationships in the same format of the PkgRel' rels property.
The method name will be the lowercase version of field name; '-' will be mangled as '_'. The method would return relationships in the same format of the PkgRel' rels property.
def rels(self): """Get raw package relationships
9a8f1b1d3c6e47c614d72d400455e2e43580e865 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12282/9a8f1b1d3c6e47c614d72d400455e2e43580e865/deb822.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 19214, 12, 2890, 4672, 3536, 967, 1831, 2181, 11499, 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...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 19214, 12, 2890, 4672, 3536, 967, 1831, 2181, 11499, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
return s.replace(SAGE_BEGIN,'').replace(SAGE_END,'').replace(SC)
return s.replace(SAGE_BEGIN,'').replace(SAGE_END,'').replace(SC,'')
def _process_output(self, s): s = re.sub('\x08.','',s) s = self._strip_synchro_from_start_of_output(s) if SAGE_ERROR in s: i = s.rfind('>>>') if i >= 0: return s[:i-1] # Remove any control codes that might have not got stripped out. return s.replace(SAGE_BEGIN,'').replace(SAGE_END,'').replace(SC)
51910203590d9891b39901ce860aa12bc977ea30 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9417/51910203590d9891b39901ce860aa12bc977ea30/worksheet.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2567, 67, 2844, 12, 2890, 16, 272, 4672, 272, 273, 283, 18, 1717, 2668, 64, 92, 6840, 1093, 11189, 2187, 87, 13, 272, 273, 365, 6315, 6406, 67, 87, 2515, 303, 67, 2080, 67, 1937...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 67, 2844, 12, 2890, 16, 272, 4672, 272, 273, 283, 18, 1717, 2668, 64, 92, 6840, 1093, 11189, 2187, 87, 13, 272, 273, 365, 6315, 6406, 67, 87, 2515, 303, 67, 2080, 67, 1937...
\end{enumerate} \item Currently this function seems to allow you to ask for exp to
-- Currently this function seems to allow you to ask for exp to
def exp(self, prec = infinity): r""" Returns exp of this power series to the indicated precision.
0c96eb02e071f5846596c353978e1e2460db622c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9417/0c96eb02e071f5846596c353978e1e2460db622c/power_series_ring_element.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1329, 12, 2890, 16, 13382, 273, 27272, 4672, 436, 8395, 2860, 1329, 434, 333, 7212, 4166, 358, 326, 17710, 6039, 18, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 1329, 12, 2890, 16, 13382, 273, 27272, 4672, 436, 8395, 2860, 1329, 434, 333, 7212, 4166, 358, 326, 17710, 6039, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
return result
return result
def fleet_id_change(self, cr, uid, ids, order_fleet_id=False, fleet_id=False, product_id=False, maintenance_start_date=False, maintenance_product_qty=False): result = {} result['value'] = {} fleet_id = order_fleet_id or fleet_id if fleet_id: fleet = self.pool.get('stock.location').browse(cr, uid, fleet_id) if fleet.expire_time and not fleet.is_expired: start_date = DateTime.strptime(fleet.expire_time, '%Y-%m-%d') + RelativeDateTime(days=fixed_days_before_month_end + 1) else: start_date = maintenance_start_date and DateTime.strptime(maintenance_start_date, '%Y-%m-%d') or DateTime.strptime(self.default_maintenance_start_date(cr, uid, {}), '%Y-%m-%d') end_date = self._get_end_date_from_start_date(cr, uid, start_date, fleet) result['value'].update({'fleet_id': fleet_id}) if product_id: product = self.pool.get('product.product').browse(cr, uid, product_id) if product.is_maintenance: maintenance_month_qty = self._get_maintenance_month_qty_from_start_end(cr, uid, start_date, end_date) result['value'].update({'maintenance_start_date': start_date.strftime('%Y-%m-%d')}) result['value'].update({'maintenance_end_date': end_date.strftime('%Y-%m-%d')}) result['value'].update({'maintenance_month_qty': maintenance_month_qty}) result['value'].update({'product_uom_qty': maintenance_product_qty * maintenance_month_qty}) result['value'].update({'product_uos_qty': maintenance_product_qty * maintenance_month_qty}) # TODO * product_obj.uos_coeff return result
1bb7cb71fd72ec0532c769a8014f977fe3ab88c2 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7339/1bb7cb71fd72ec0532c769a8014f977fe3ab88c2/sale.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 19764, 67, 350, 67, 3427, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 1353, 67, 74, 8270, 67, 350, 33, 8381, 16, 19764, 67, 350, 33, 8381, 16, 3017, 67, 350, 33, 8381, 16, 18388, 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, 19764, 67, 350, 67, 3427, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 1353, 67, 74, 8270, 67, 350, 33, 8381, 16, 19764, 67, 350, 33, 8381, 16, 3017, 67, 350, 33, 8381, 16, 18388, 6...
['C1_1S', 'C1_2S', 'C1_3S', 'C1_4XXXX', 'C2_1S']
['C1_S', 'C1_S', 'C1_S', 'C1_XXXX', 'C2_S', 'Si1_S']
def normalise_aonames(self,listoflines): """Normalise the aonames attribute to agree with the other parsers.
cf56ff91267bc593fd401851bb342d43a84b71c2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8167/cf56ff91267bc593fd401851bb342d43a84b71c2/gamessparser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 25475, 67, 69, 265, 753, 12, 2890, 16, 1098, 792, 3548, 4672, 3536, 5506, 784, 326, 279, 265, 753, 1566, 358, 1737, 992, 598, 326, 1308, 14212, 18, 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, 0, 0, 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, 25475, 67, 69, 265, 753, 12, 2890, 16, 1098, 792, 3548, 4672, 3536, 5506, 784, 326, 279, 265, 753, 1566, 358, 1737, 992, 598, 326, 1308, 14212, 18, 2, -100, -100, -100, -100, -100, -10...
self.raw.tofile(str(url))
self.raw.tofile(str(url.path))
def save(self, url): if self.mmap: self.mmap.flush() self.mmap.sync() else: self.raw.tofile(str(url))
afd2203340ef7575d24329f58d8d35adc5a63ed2 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11522/afd2203340ef7575d24329f58d8d35adc5a63ed2/cube.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1923, 12, 2890, 16, 880, 4672, 309, 365, 18, 81, 1458, 30, 365, 18, 81, 1458, 18, 11330, 1435, 365, 18, 81, 1458, 18, 8389, 1435, 469, 30, 365, 18, 1899, 18, 869, 768, 12, 701, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1923, 12, 2890, 16, 880, 4672, 309, 365, 18, 81, 1458, 30, 365, 18, 81, 1458, 18, 11330, 1435, 365, 18, 81, 1458, 18, 8389, 1435, 469, 30, 365, 18, 1899, 18, 869, 768, 12, 701, 12,...
self.setup_form()
def __init__(self, *args): base.Renderer.__init__(self, *args) self.setup_form()
3df24dfa5b26980d27bd0bae9649ed8069f962a7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9843/3df24dfa5b26980d27bd0bae9649ed8069f962a7/channelsubscribe.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 380, 1968, 4672, 1026, 18, 6747, 16186, 2738, 972, 12, 2890, 16, 380, 1968, 13, 365, 18, 8401, 67, 687, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 380, 1968, 4672, 1026, 18, 6747, 16186, 2738, 972, 12, 2890, 16, 380, 1968, 13, 365, 18, 8401, 67, 687, 1435, 2, -100, -100, -100, -100, -100, -100, -100...
if v.GetCaptured() > 2: t = time.millitimer() - t0 cd, st = v.GetCaptureData() data = cd.interleave(x, y) cd.UnlockCaptureData() buffer.append(data, t) else: time.millisleep(10) v.StopCapture() while v.GetCaptured() > 0: t = time.millitimer() - t0 cd, st = v.GetCaptureData() data = cd.interleave(x, y)
try: cd, id = v.GetCaptureData() except RuntimeError: time.millisleep(10) continue id = id + 2*rate lastid = id data = cd.InterleaveFields(1)
def record(v, filename, audiofilename): import thread x, y = gl.getsize() vout = VFile.VoutFile().init(filename) vout.format = 'rgb8' vout.width = x vout.height = y vout.writeheader() buffer = [] thread.start_new_thread(saveframes, (vout, buffer)) if audiofilename: initaudio(audiofilename, buffer) gl.wintitle('(rec) ' + filename) v.StartCapture() t0 = time.millitimer() while not gl.qtest(): if v.GetCaptured() > 2: t = time.millitimer() - t0 cd, st = v.GetCaptureData() data = cd.interleave(x, y) cd.UnlockCaptureData() buffer.append(data, t) else: time.millisleep(10) v.StopCapture() while v.GetCaptured() > 0: t = time.millitimer() - t0 cd, st = v.GetCaptureData() data = cd.interleave(x, y) cd.UnlockCaptureData() buffer.append(data, t) buffer.append(None) # Sentinel gl.wintitle('(done) ' + filename)
15728b345d96a6162fd564e1c123ee9961ee23dc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/15728b345d96a6162fd564e1c123ee9961ee23dc/Vrec.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1409, 12, 90, 16, 1544, 16, 20232, 77, 792, 2550, 4672, 1930, 2650, 619, 16, 677, 273, 5118, 18, 588, 1467, 1435, 331, 659, 273, 776, 812, 18, 58, 659, 812, 7675, 2738, 12, 3459, 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, 1409, 12, 90, 16, 1544, 16, 20232, 77, 792, 2550, 4672, 1930, 2650, 619, 16, 677, 273, 5118, 18, 588, 1467, 1435, 331, 659, 273, 776, 812, 18, 58, 659, 812, 7675, 2738, 12, 3459, 13,...
a : array_like of string_ or unicode_ Returns ------- out : ndarray Output array of booleans
a : array_like of str or unicode Returns ------- out : ndarray Output array of bools
def isspace(a): """ Returns true for each element if there are only whitespace characters in the string and there is at least one character, false otherwise. Calls `str.isspace` element-wise. For 8-bit strings, this method is locale-dependent. Parameters ---------- a : array_like of string_ or unicode_ Returns ------- out : ndarray Output array of booleans See also -------- str.isspace """ return _vec_string(a, bool_, 'isspace')
05324d0e986a1012a342e2650b3883e13a285029 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/14925/05324d0e986a1012a342e2650b3883e13a285029/defchararray.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 2981, 12, 69, 4672, 3536, 2860, 638, 364, 1517, 930, 309, 1915, 854, 1338, 7983, 3949, 316, 326, 533, 471, 1915, 353, 622, 4520, 1245, 3351, 16, 629, 3541, 18, 225, 23665, 1375, 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, 353, 2981, 12, 69, 4672, 3536, 2860, 638, 364, 1517, 930, 309, 1915, 854, 1338, 7983, 3949, 316, 326, 533, 471, 1915, 353, 622, 4520, 1245, 3351, 16, 629, 3541, 18, 225, 23665, 1375, 7...
raise Error, 'either pass a family arguement or call set_family on this object'
raise Error, 'either pass a family argument or call set_family on this object'
def _check_family(self, family): if family is not None: return family else: family = self.current if family is None: raise Error, 'either pass a family arguement or call set_family on this object' return family
2cc9feb07806c2cc82ccda483b99a1f4d8349049 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2558/2cc9feb07806c2cc82ccda483b99a1f4d8349049/main.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1893, 67, 9309, 12, 2890, 16, 6755, 4672, 309, 6755, 353, 486, 599, 30, 327, 6755, 469, 30, 6755, 273, 365, 18, 2972, 309, 6755, 353, 599, 30, 1002, 1068, 16, 296, 73, 2927, 134...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 389, 1893, 67, 9309, 12, 2890, 16, 6755, 4672, 309, 6755, 353, 486, 599, 30, 327, 6755, 469, 30, 6755, 273, 365, 18, 2972, 309, 6755, 353, 599, 30, 1002, 1068, 16, 296, 73, 2927, 134...
self.labelWidgets[g].grid(column=colIndex*2, row=colCount%colParam+1, padx=10, rowspan = len(opt['chooseOneOf']), sticky=tk.E) self.entryWidgets[g] = tk.Listbox(self.app, width=40, selectmode=tk.SINGLE, \ exportselection=0, height=len(opt['chooseOneOf'])) self.entryWidgets[g].grid(column=colIndex*2+1, row=colCount%colParam+1, padx=10, rowspan = len(opt['chooseOneOf'])) colCount += len(opt['chooseOneOf'])
self.labelWidgets[g].grid(column=colIndex*2, row=rowIndex%numRows+1, padx=5, rowspan = height, sticky=tk.E) self.entryWidgets[g] = tk.Listbox(self.app, selectmode=tk.SINGLE, exportselection=0, height = height) self.entryWidgets[g].grid(column=colIndex*2+1, row=rowIndex%numRows+1, padx=5, rowspan = height) rowIndex += height
def createDialog(self): self.app = tk.Tk() self.app.protocol('WM_DELETE_WINDOW', self.denyWindowManagerClose) self.app.title(self.title) self.app.iconname('Dialog') self.app.geometry("+300+200") # # the main window # self.entryWidgets = [None]*len(self.options) self.labelWidgets = [None]*len(self.options) self.app.bind("<Escape>", self.doCancel) # all use grid management # top message # do not use a very long description please tk.Message(self.app, text=self.description, width=600).grid(row=0, column=0, columnspan = 2 * self.nCol, sticky=tk.N+tk.E+tk.S+tk.W, pady=20) # find out number of items etc colParam = 0 for opt in self.options: if opt.has_key('label'): colParam += 1 if opt.has_key('chooseFrom'): colParam += len( opt['chooseFrom']) -1 if opt.has_key('chooseOneOf'): colParam += len( opt['chooseOneOf']) -1 if colParam / self.nCol * self.nCol == colParam: colParam /= self.nCol else: colParam = colParam/self.nCol + 1 colCount = 0 colIndex = 0 # all entries for g in range(len(self.options)): opt = self.options[g] if not opt.has_key('label'): continue # --------- entryWidget ---------------------------------------------- # use different entry method for different types if opt.has_key('chooseOneOf'): # single choice self.labelWidgets[g] = tk.Label(self.app, text=opt['label']) self.labelWidgets[g].grid(column=colIndex*2, row=colCount%colParam+1, padx=10, rowspan = len(opt['chooseOneOf']), sticky=tk.E) self.entryWidgets[g] = tk.Listbox(self.app, width=40, selectmode=tk.SINGLE, \ exportselection=0, height=len(opt['chooseOneOf'])) self.entryWidgets[g].grid(column=colIndex*2+1, row=colCount%colParam+1, padx=10, rowspan = len(opt['chooseOneOf'])) colCount += len(opt['chooseOneOf']) for entry in opt['chooseOneOf']: self.entryWidgets[g].insert(tk.END, str(entry)) if self.values[g] is not None: self.entryWidgets[g].select_set( opt['chooseOneOf'].index(self.values[g])) elif opt.has_key('chooseFrom'): # multiple choice self.labelWidgets[g] = tk.Label(self.app, text=opt['label']) self.labelWidgets[g].grid(column=colIndex*2, row=colCount%colParam+1, padx=10, rowspan = len(opt['chooseFrom']), sticky=tk.E) self.entryWidgets[g] = tk.Listbox(self.app, width=40, selectmode=tk.EXTENDED, \ exportselection=0, height=len( opt['chooseFrom'])) self.entryWidgets[g].grid(column=colIndex*2+1, row=colCount%colParam+1, padx=10, rowspan = len(opt['chooseFrom'])) colCount += len(opt['chooseFrom']) for entry in opt['chooseFrom']: self.entryWidgets[g].insert(tk.END, str(entry)) if self.values[g] is not None: if type(self.values[g]) in [types.TupleType, types.ListType]: for val in self.values[g]: self.entryWidgets[g].select_set( opt['chooseFrom'].index(val)) else: self.entryWidgets[g].select_set( opt['chooseFrom'].index( self.values[g] )) elif (opt.has_key('arg') and opt['arg'][-1] != ':') or \ (opt.has_key('longarg') and opt['longarg'][-1] != '='): # true or false self.labelWidgets[g] = tk.Label(self.app, text=opt['label']) self.labelWidgets[g].grid(column=colIndex*2, row=colCount%colParam+1, padx=10, rowspan = 1, sticky=tk.E) # replace self.values[g] by a tk IntVar() because tk.Checkbutton has to store # its value in such a variable. self.values[g].get() will be used to return the # state of this Checkbutton. # c.f. http://infohost.nmt.edu/tcc/help/pubs/tkinter/control-variables.html iv = tk.IntVar() iv.set(self.values[g] == True) # self.values[g] can be None, True or False self.values[g] = iv self.entryWidgets[g] = tk.Checkbutton(self.app, height=1, text = "Yes / No", variable=self.values[g]) self.entryWidgets[g].grid(column=colIndex*2+1, row=colCount%colParam+1, padx=10, rowspan = 1) colCount += 1 self.entryWidgets[g].deselect() else: self.labelWidgets[g] = tk.Label(self.app, text=opt['label']) self.labelWidgets[g].grid(column=colIndex*2, row=colCount%colParam+1, padx=10, sticky=tk.E) self.entryWidgets[g] = tk.Entry(self.app, width=40) self.entryWidgets[g].grid(column=colIndex*2+1, row=colCount%colParam+1, padx=10) colCount += 1 # put default value into the entryWidget if self.values[g] is not None: self.entryWidgets[g].insert(0, prettyOutput(self.values[g])) colIndex = colCount /colParam self.entryWidgets[g].bind("<Return>", self.doGetText) self.entryWidgets[g].bind("<Escape>", self.doCancel) # help button helpButton = tk.Button(self.app, takefocus=1, text="Help") helpButton.bind("<Return>", self.doHelp) helpButton.bind("<Button-1>", self.doHelp) helpButton.grid(column=0, columnspan=self.nCol, row = colParam+1, pady=20) # ok button okButton = tk.Button(self.app, takefocus=1, text="Run!") okButton.bind("<Return>", self.doGetText) okButton.bind("<Button-1>", self.doGetText) okButton.grid( column=self.nCol, columnspan=self.nCol, row = colParam+1, pady=20) # cancel button cancelButton = tk.Button(self.app, takefocus=1, text="Cancel") cancelButton.bind("<Return>", self.doCancel) cancelButton.bind("<Button-1>", self.doCancel) cancelButton.grid( column=0, columnspan=2*self.nCol, row = colParam+1, pady=20)
b8dc92ef8ad792606f004235722b9585e2bbe014 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/401/b8dc92ef8ad792606f004235722b9585e2bbe014/simuOpt.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 6353, 12, 2890, 4672, 365, 18, 2910, 273, 13030, 18, 56, 79, 1435, 365, 18, 2910, 18, 8373, 2668, 25173, 67, 6460, 67, 23407, 2187, 365, 18, 13002, 93, 3829, 1318, 4605, 13, 365, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 6353, 12, 2890, 4672, 365, 18, 2910, 273, 13030, 18, 56, 79, 1435, 365, 18, 2910, 18, 8373, 2668, 25173, 67, 6460, 67, 23407, 2187, 365, 18, 13002, 93, 3829, 1318, 4605, 13, 365, ...
print 2
def undoMoves (self, moves, gamemodel): if self.ready: if self.mode not in (ANALYZING, INVERSE_ANALYZING): if self.board: print 1 self.movecon.acquire() print 2 try: self.hurry() self.force() self.movecon.wait() finally: self.movecon.release() else: self.force() self.changeLock.acquire() try: for i in xrange(moves): print >> self.engine, "undo" if self.mode not in (ANALYZING, INVERSE_ANALYZING): if gamemodel.curplayer.color == self.color: self.board = gamemodel.boards[-1] self.go() else: self.board = None else: self.board = gamemodel.boards[-1] finally: self.changeLock.release() else: self.runWhenReady(self.undoMoves, moves, gamemodel)
5d88ea2ebdb97e54fd069ee3310d267ec4c8deba /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5339/5d88ea2ebdb97e54fd069ee3310d267ec4c8deba/CECPEngine.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15436, 19297, 261, 2890, 16, 13934, 16, 7920, 2284, 4672, 309, 365, 18, 1672, 30, 309, 365, 18, 3188, 486, 316, 261, 1258, 19448, 62, 1360, 16, 2120, 28489, 67, 1258, 19448, 62, 1360, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 15436, 19297, 261, 2890, 16, 13934, 16, 7920, 2284, 4672, 309, 365, 18, 1672, 30, 309, 365, 18, 3188, 486, 316, 261, 1258, 19448, 62, 1360, 16, 2120, 28489, 67, 1258, 19448, 62, 1360, ...
result=self.getUser(id) return result.__of__(self)
return self.getUser(id)
def getUserById(self, id, default=_marker): """Return the user corresponding to the given id. """ # The connection between getting by ID and by name is not a strong # one try: result=self.getUser(id) return result.__of__(self) # Wrap in our context except: if default is _marker: raise return default
99272e487ca4223ec3efc995fdf17d7add020fdd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/99272e487ca4223ec3efc995fdf17d7add020fdd/User.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4735, 5132, 12, 2890, 16, 612, 16, 805, 33, 67, 11145, 4672, 3536, 990, 326, 729, 4656, 358, 326, 864, 612, 18, 3536, 468, 1021, 1459, 3086, 8742, 635, 1599, 471, 635, 508, 353, 486, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4735, 5132, 12, 2890, 16, 612, 16, 805, 33, 67, 11145, 4672, 3536, 990, 326, 729, 4656, 358, 326, 864, 612, 18, 3536, 468, 1021, 1459, 3086, 8742, 635, 1599, 471, 635, 508, 353, 486, ...
h = hash(a) h, d = divmod(h, 256) h = h & 0xffffff x = (x^h^d) & 255 h = h>>8 y = (y^h^d) & 255 h = h>>8 z = (z^h^d) & 255 whrandom.seed(x, y, z)
x = 69069 * x + hash(a) random.seed(x)
def main(): """Main program when invoked as a script. One argument: tabulate a single row. Two arguments: tabulate a range (inclusive). Extra arguments are used to seed the random generator. """ # default range (inclusive) k1 = 15 k2 = 19 if sys.argv[1:]: # one argument: single point k1 = k2 = int(sys.argv[1]) if sys.argv[2:]: # two arguments: specify range k2 = int(sys.argv[2]) if sys.argv[3:]: # derive random seed from remaining arguments x, y, z = 0, 0, 0 for a in sys.argv[3:]: h = hash(a) h, d = divmod(h, 256) h = h & 0xffffff x = (x^h^d) & 255 h = h>>8 y = (y^h^d) & 255 h = h>>8 z = (z^h^d) & 255 whrandom.seed(x, y, z) r = range(k1, k2+1) # include the end point tabulate(r)
8b6ec79b74284873696b24ab979fb1cb579b86f8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/8b6ec79b74284873696b24ab979fb1cb579b86f8/sortperf.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 3536, 6376, 5402, 1347, 8187, 487, 279, 2728, 18, 225, 6942, 1237, 30, 3246, 6243, 279, 2202, 1027, 18, 16896, 1775, 30, 3246, 6243, 279, 1048, 261, 267, 9173, 2934, 13592, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3536, 6376, 5402, 1347, 8187, 487, 279, 2728, 18, 225, 6942, 1237, 30, 3246, 6243, 279, 2202, 1027, 18, 16896, 1775, 30, 3246, 6243, 279, 1048, 261, 267, 9173, 2934, 13592, ...
security.declareProtected(CMFCorePermissions.ModifyPortalContent,
security.declareProtected(permissions.ModifyPortalContent,
def _editMetadata(self , title=_marker , subject=_marker , description=_marker , contributors=_marker , effective_date=_marker , expiration_date=_marker , format=_marker , language=_marker , rights=_marker ): """ Update the editable metadata for this resource. """ if title is not _marker: self.setTitle( title ) if subject is not _marker: self.setSubject( subject ) if description is not _marker: self.setDescription( description ) if contributors is not _marker: self.setContributors( contributors ) if effective_date is not _marker: self.setEffectiveDate( effective_date ) if expiration_date is not _marker: self.setExpirationDate( expiration_date ) if format is not _marker: self.setFormat( format ) if language is not _marker: self.setLanguage( language ) if rights is not _marker: self.setRights( rights )
bffbf06ccb0e344dcf82f7addf15838da46c2ba5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12165/bffbf06ccb0e344dcf82f7addf15838da46c2ba5/ExtensibleMetadata.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4619, 2277, 12, 2890, 269, 2077, 33, 67, 11145, 269, 3221, 33, 67, 11145, 269, 2477, 33, 67, 11145, 269, 13608, 13595, 33, 67, 11145, 269, 11448, 67, 712, 33, 67, 11145, 269, 7686...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4619, 2277, 12, 2890, 269, 2077, 33, 67, 11145, 269, 3221, 33, 67, 11145, 269, 2477, 33, 67, 11145, 269, 13608, 13595, 33, 67, 11145, 269, 11448, 67, 712, 33, 67, 11145, 269, 7686...
FROM ticket t,enum p WHERE p.name=t.priority AND p.type='priority'
FROM ticket t LEFT JOIN enum p ON p.name = t.priority AND p.type = 'priority'
def get_reports(db): owner = db.concat('owner', "' *'") return (
ca75c5c2fb49333cbc034a710106bdf6d9009566 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2831/ca75c5c2fb49333cbc034a710106bdf6d9009566/db_default.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 20195, 12, 1966, 4672, 3410, 273, 1319, 18, 16426, 2668, 8443, 2187, 2491, 380, 4970, 13, 327, 261, 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, 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, 336, 67, 20195, 12, 1966, 4672, 3410, 273, 1319, 18, 16426, 2668, 8443, 2187, 2491, 380, 4970, 13, 327, 261, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
debug(HURT_ME_PLENTY, "JS: read", len(data))
debug(HURT_ME_PLENTY, "JS: read", len(data), "<=", url)
def jsScriptData (self, data, url, ver): assert self.state=='wait' if data is None: if not self.script: print >> sys.stderr, "empty JS src", url elif self.jsScript(self.script, ver): print >> sys.stderr, "JS popup src", url else: self.buf.append([STARTTAG, "script", {'type': 'text/javascript'}]) self.buf.append([DATA, "<!--\n%s\n//-->"%self.script]) self.state = 'parse' self.script = '' debug(NIGHTMARE, "XXX switching back to parse with") debug(NIGHTMARE, "self.buf", `self.buf`) #debug(NIGHTMARE, "self.outbuf", `self.outbuf.getvalue()`) debug(NIGHTMARE, "self.inbuf", `self.inbuf.getvalue()`) debug(NIGHTMARE, "self.waitbuf", `self.waitbuf.getvalue()`) else: debug(HURT_ME_PLENTY, "JS: read", len(data)) self.script += data
89b79386924e75b2a16ac8ce4c732a86c3d9ed2d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3948/89b79386924e75b2a16ac8ce4c732a86c3d9ed2d/Rewriter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3828, 3651, 751, 261, 2890, 16, 501, 16, 880, 16, 1924, 4672, 1815, 365, 18, 2019, 18920, 7048, 11, 309, 501, 353, 599, 30, 309, 486, 365, 18, 4263, 30, 1172, 1671, 2589, 18, 11241, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3828, 3651, 751, 261, 2890, 16, 501, 16, 880, 16, 1924, 4672, 1815, 365, 18, 2019, 18920, 7048, 11, 309, 501, 353, 599, 30, 309, 486, 365, 18, 4263, 30, 1172, 1671, 2589, 18, 11241, ...
hash_a1 = md5.new(':'.join([pairs['username'], realm, password])).hexdigest() hash_a2 = md5.new(':'.join([self.command, pairs['uri']])).hexdigest()
hash_a1 = _new_md5(':'.join([pairs['username'], realm, password])).hexdigest() hash_a2 = _new_md5(':'.join([self.command, pairs['uri']])).hexdigest()
def AuthDigestHandler(self): """This handler tests 'Digest' authentication. It just sends a page with title 'user/pass' if you succeed."""
827fe44000f83d9801e04fd169054b99f5dc7068 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5060/827fe44000f83d9801e04fd169054b99f5dc7068/testserver.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3123, 9568, 1503, 12, 2890, 4672, 3536, 2503, 1838, 7434, 296, 9568, 11, 5107, 18, 225, 2597, 2537, 9573, 279, 1363, 598, 2077, 296, 1355, 19, 5466, 11, 309, 1846, 12897, 12123, 2, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3123, 9568, 1503, 12, 2890, 4672, 3536, 2503, 1838, 7434, 296, 9568, 11, 5107, 18, 225, 2597, 2537, 9573, 279, 1363, 598, 2077, 296, 1355, 19, 5466, 11, 309, 1846, 12897, 12123, 2, -100,...
document.body[i : i+4] = substi
document.body[i:i + 4] = substi
def revert_vphantom(document): " Reverts vphantom to ERT " i = 0 j = 0 while True: i = find_token(document.body, "\\begin_inset Phantom VPhantom", i) if i == -1: return substi = document.body[i].replace('\\begin_inset Phantom VPhantom', \ '\\begin_inset ERT\nstatus collapsed\n\n' \ '\\begin_layout Plain Layout\n\n\n\\backslash\n' \ 'vphantom{\n\\end_layout\n\n\\end_inset\n') substi = substi.split('\n') document.body[i : i+4] = substi i += len(substi) j = find_token(document.body, "\\end_layout", i) if j == -1: document.warning("Malformed LyX document: Could not find end of VPhantom inset.") return substj = document.body[j].replace('\\end_layout', \ '\\size default\n\n\\begin_inset ERT\nstatus collapsed\n\n' \ '\\begin_layout Plain Layout\n\n' \ '}\n\\end_layout\n\n\\end_inset\n') substj = substj.split('\n') document.body[j : j+4] = substj i += len(substj)
bcd8b9a1f1241c461beb5db1d5a69424a9a25950 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7514/bcd8b9a1f1241c461beb5db1d5a69424a9a25950/lyx_2_0.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15226, 67, 90, 844, 16317, 12, 5457, 4672, 315, 868, 31537, 331, 844, 16317, 358, 4232, 56, 315, 277, 273, 374, 525, 273, 374, 1323, 1053, 30, 277, 273, 1104, 67, 2316, 12, 5457, 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, 15226, 67, 90, 844, 16317, 12, 5457, 4672, 315, 868, 31537, 331, 844, 16317, 358, 4232, 56, 315, 277, 273, 374, 525, 273, 374, 1323, 1053, 30, 277, 273, 1104, 67, 2316, 12, 5457, 18, ...
def sendCreateAccountEmail(self, p_name, p_email, p_username, REQUEST):
def sendCreateAccountEmail(self, p_to, p_name, p_email, p_organisation, p_username, p_location_path, p_location_title, p_comments):
def sendCreateAccountEmail(self, p_name, p_email, p_username, REQUEST): #sends a confirmation email to the newlly created account's owner email_template = self.getEmailTool()._getOb('email_createaccount') l_subject = email_template.title l_content = email_template.body l_content = l_content.replace('@@PORTAL_URL@@', self.portal_url) l_content = l_content.replace('@@PORTAL_TITLE@@', self.site_title) l_content = l_content.replace('@@NAME@@', p_name) l_content = l_content.replace('@@EMAIL@@', p_email) l_content = l_content.replace('@@USERNAME@@', p_username) l_content = l_content.replace('@@TIMEOFPOST@@', str(self.utGetTodayDate())) mail_from = self.mail_address_from self.getEmailTool().sendEmail(l_content, p_email, mail_from, l_subject)
5fdb194b5cc07d6dac0cf0ddee3d4bfd8e6e814f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3287/5fdb194b5cc07d6dac0cf0ddee3d4bfd8e6e814f/CHMSite.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 1684, 3032, 4134, 12, 2890, 16, 293, 67, 869, 16, 293, 67, 529, 16, 293, 67, 3652, 16, 293, 67, 22543, 10742, 16, 293, 67, 5053, 16, 293, 67, 3562, 67, 803, 16, 293, 67, 3562...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1684, 3032, 4134, 12, 2890, 16, 293, 67, 869, 16, 293, 67, 529, 16, 293, 67, 3652, 16, 293, 67, 22543, 10742, 16, 293, 67, 5053, 16, 293, 67, 3562, 67, 803, 16, 293, 67, 3562...
self.ssl = self.metadata['url'].startswith('https:') url = self.metadata['url'][7:] path_start = url.find('/') if path_start == -1: self.host = url self.path = '/' else: self.host = url[:path_start] self.path = url[path_start:]
def __init__(self, input_file): try: # Read the configuration file config_path = os.path.expanduser('~/.zope-external-edit') self.config = Configuration(config_path)
8e7910ad15aeebcf5888219fb97f14d30975b27f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1843/8e7910ad15aeebcf5888219fb97f14d30975b27f/zopeedit.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 810, 67, 768, 4672, 775, 30, 468, 2720, 326, 1664, 585, 642, 67, 803, 273, 1140, 18, 803, 18, 12320, 1355, 2668, 98, 15865, 94, 1306, 17, 9375, 17, 461...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1001, 2738, 972, 12, 2890, 16, 810, 67, 768, 4672, 775, 30, 468, 2720, 326, 1664, 585, 642, 67, 803, 273, 1140, 18, 803, 18, 12320, 1355, 2668, 98, 15865, 94, 1306, 17, 9375, 17, 461...