rem
stringlengths
2
226k
add
stringlengths
0
227k
context
stringlengths
8
228k
meta
stringlengths
156
215
input_ids
list
attention_mask
list
labels
list
<reference anonymous="1" refid="id1"> text <reference anonymous="1" refuri="http://external"> external <target anonymous="1" id="id1"> <target anonymous="1" id="id2" refuri="http://external"> """
I'm known as "d". <target id="e" name="e" refname="d"> <target id="id1" refname="d"> <target id="f" name="f" refname="d"> """ def unknown_visit(self, node): pass def visit_target(self, node): if node.hasattr('refuri'): attname = 'refuri' call_if_named = self.document.note_external_target elif node.hasattr('refname'): attname = 'refname' call_if_named = self.document.note_indirect_target elif node.hasattr('refid'): attname = 'refid' call_if_named = None else: return attval = node[attname] index = node.parent.index(node) for i in range(index - 1, -1, -1): sibling = node.parent[i] if not isinstance(sibling, nodes.target) \ or sibling.hasattr('refuri') \ or sibling.hasattr('refname') \ or sibling.hasattr('refid'): break sibling[attname] = attval if sibling.hasattr('name') and call_if_named: call_if_named(sibling) class AnonymousHyperlinks(Transform): """ Link anonymous references to targets. Given:: <paragraph> <reference anonymous="1"> internal <reference anonymous="1"> external <target anonymous="1" id="id1"> <target anonymous="1" id="id2" refuri="http://external"> Corresponding references are linked via "refid" or resolved via "refuri":: <paragraph> <reference anonymous="1" refid="id1"> text <reference anonymous="1" refuri="http://external"> external <target anonymous="1" id="id1"> <target anonymous="1" id="id2" refuri="http://external"> """ default_priority = 440 def apply(self):
def resolve_anonymous(self): """ Link anonymous references to targets. Given::
6e8a47c861efb09c2916f5c6494703c2497717ae /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1278/6e8a47c861efb09c2916f5c6494703c2497717ae/references.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2245, 67, 19070, 12, 2890, 4672, 3536, 4048, 13236, 5351, 358, 5774, 18, 225, 16803, 2866, 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, 2245, 67, 19070, 12, 2890, 4672, 3536, 4048, 13236, 5351, 358, 5774, 18, 225, 16803, 2866, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
try: Popen(["busybox", "renice", self.cpu, p.pid], stdout=PIPE, bufsize=-1) except: print "Renice failed"
print "Renice failed"
def renice(self, p): """ renice process """ if os.name != "nt" and self.cpu: try: Popen(["renice", self.cpu, p.pid], stdout=PIPE, bufsize=-1) except: try: Popen(["busybox", "renice", self.cpu, p.pid], stdout=PIPE, bufsize=-1) except: print "Renice failed"
c863a81d061aecf9e36dcd56ffafbcbbe27dfa38 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9838/c863a81d061aecf9e36dcd56ffafbcbbe27dfa38/pyunrar.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1654, 1812, 12, 2890, 16, 293, 4672, 3536, 1654, 1812, 1207, 3536, 309, 1140, 18, 529, 480, 315, 496, 6, 471, 365, 18, 11447, 30, 775, 30, 14339, 3816, 6, 1187, 1812, 3113, 365, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1654, 1812, 12, 2890, 16, 293, 4672, 3536, 1654, 1812, 1207, 3536, 309, 1140, 18, 529, 480, 315, 496, 6, 471, 365, 18, 11447, 30, 775, 30, 14339, 3816, 6, 1187, 1812, 3113, 365, 18, ...
-- string: a string to find in the \Sage source code. -- extra1, ..., extra5: additional strings to require. NOTE: The extraN parameters are present only because search_src(string, *extras, interact=None)
- ``string`` - a string to find in the Sage source code. - ``extra1``, ..., ``extra5`` - additional strings to require, passed as arguments to grep .. note:: The ``extraN`` parameters are present only because ``search_src(string, *extras, interact=None)``
def search_src(string, extra1='', extra2='', extra3='', extra4='', extra5='', interact=True): r""" Search \Sage library source code for lines containing \code{string}. The search is not case sensitive. INPUT: -- string: a string to find in the \Sage source code. -- extra1, ..., extra5: additional strings to require. NOTE: The extraN parameters are present only because search_src(string, *extras, interact=None) is not parsed correctly by Python 2.6; see http://bugs.python.org/issue1909. EXAMPLES: sage: print search_src(" fetch(", "def", interact=False) # random # long matrix/matrix0.pyx: cdef fetch(self, key): matrix/matrix0.pxd: cdef fetch(self, key) sage: print search_src(" fetch(", "def", interact=False) # random # long matrix/matrix0.pyx: cdef fetch(self, key): matrix/matrix0.pxd: cdef fetch(self, key) sage: print search_src(" fetch(", "def", "pyx", interact=False) # random # long matrix/matrix0.pyx: cdef fetch(self, key): """ cmd = 'sage -grep "%s"' % string for extra in [ extra1, extra2, extra3, extra4, extra5 ]: if not extra: continue cmd += '| grep "%s"' % extra old_banner = os.environ.has_key('SAGE_BANNER') if old_banner: old_banner = os.environ['SAGE_BANNER'] os.environ['SAGE_BANNER'] = "no" r = os.popen(cmd).read() if old_banner == False: del os.environ['SAGE_BANNER'] else: os.environ['SAGE_BANNER'] = old_banner if not interact: return r from sage.server.support import EMBEDDED_MODE if EMBEDDED_MODE: # I.e., running from the notebook print format_search_as_html('Source Code', r, string + extra) else: from sage.misc.all import pager pager()(r)
86690287bdd90597f2ca529e792048095ab48b5c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9417/86690287bdd90597f2ca529e792048095ab48b5c/sagedoc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1623, 67, 4816, 12, 1080, 16, 2870, 21, 2218, 2187, 2870, 22, 2218, 2187, 2870, 23, 2218, 2187, 2870, 24, 2218, 2187, 2870, 25, 2218, 2187, 16592, 33, 5510, 4672, 436, 8395, 5167, 521, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1623, 67, 4816, 12, 1080, 16, 2870, 21, 2218, 2187, 2870, 22, 2218, 2187, 2870, 23, 2218, 2187, 2870, 24, 2218, 2187, 2870, 25, 2218, 2187, 16592, 33, 5510, 4672, 436, 8395, 5167, 521, ...
assert(os.path.exists(assemblyFile2+".seqStore"))
def main(runName): print >>STDERR, "I read the output from MatchExtender.\n"; print >>STDERR, "Start reading checkpoint ...." t0 = time.time() obj = AtacDriver(runName) t1 = time.time() print >>STDERR, "Read checkpoint in %d seconds." % (t1-t0) t0=t1 # The following are required: assert(obj.globals.has_key('assemblyId1')) assert(obj.globals.has_key('assemblyId2')) assert(obj.globals.has_key('assemblyFile1')) assert(obj.globals.has_key('assemblyFile2')) assemblyId1 = obj.globals['assemblyId1'] assemblyId2 = obj.globals['assemblyId2'] assemblyFile1 = obj.globals["assemblyFile1"] assemblyFile2 = obj.globals["assemblyFile2"] assert(os.path.exists(assemblyFile1)) assert(os.path.exists(assemblyFile2)) if(not os.path.exists(assemblyFile2+".idxStore")): IdxStore.createIndexedFasta( assemblyFile2, assemblyId2, 1) if(not os.path.exists(assemblyFile2+".idxStore")): IdxStore.createIndexedFasta( assemblyFile2, assemblyId2, 1) assert(os.path.exists(assemblyFile1+".seqStore")) assert(os.path.exists(assemblyFile1+".idxStore")) assert(os.path.exists(assemblyFile2+".seqStore")) assert(os.path.exists(assemblyFile2+".idxStore")) # CMM Since we made a private copy of the assembly fasta files, we need to # clean up the private copies of the assemblies. if not obj.globals.has_key('matchesFile'): print >>STDERR, "We need to make the raw matches." if(not obj.globals.has_key('rawMatchMerSize')): obj.globals['rawMatchMerSize'] = 20 if(not obj.globals.has_key('rawMatchMerMaxDegeneracy')): obj.globals['rawMatchMerMaxDegeneracy'] = 1 if(not obj.globals.has_key('rawMatchMinFillSize')): obj.globals['rawMatchMinSize'] = obj.globals['rawMatchMerSize'] # Many 2*rawMatchMerSize-1 matches are due to isolated single # nucleotide mutations in otherwise perfect repeats. if(not obj.globals.has_key('globalMatchMinSize')): obj.globals['globalMatchMinSize'] = 2*int(obj.globals['rawMatchMerSize']) if(not obj.globals.has_key('globalPerfectRunMinLen')): obj.globals['globalPerfectRunMinLen'] = 100 if(not obj.globals.has_key('globalPerfectRunMaxGapLen')): obj.globals['globalPerfectRunMaxGapLen'] = 100000 if(not obj.globals.has_key('intraRunGapIsolatedMismatchLen')): obj.globals['intraRunGapIsolatedMismatchLen'] = 20 obj.runOld() t1 = time.time() print >>STDERR, "Ran in %d seconds." % (t1-t0) t0=t1 del obj.globals['inpname'] del obj.globals['outname'] obj.checkpoint(runName+".ckpLast") t1 = time.time() print >>STDERR, "Wrote checkpoint in %d seconds." % (t1-t0)
b0320aafbfa4ffff8c6908c5f59785ef879bfba8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2088/b0320aafbfa4ffff8c6908c5f59785ef879bfba8/AtacDriver.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 2681, 461, 4672, 225, 1172, 1671, 882, 25617, 16, 315, 45, 855, 326, 876, 628, 4639, 2482, 2345, 8403, 82, 14432, 1172, 1671, 882, 25617, 16, 315, 1685, 6453, 9776, 1372, 1199,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 2681, 461, 4672, 225, 1172, 1671, 882, 25617, 16, 315, 45, 855, 326, 876, 628, 4639, 2482, 2345, 8403, 82, 14432, 1172, 1671, 882, 25617, 16, 315, 1685, 6453, 9776, 1372, 1199,...
Get a computer UUID using the MAC Adress
Get a computer UUID using the MAC Address
def getComputerByMac(self, MACAddress): """ Get a computer UUID using the MAC Adress """ d = self.callRemote("getComputerByMac", MACAddress) d.addErrback(self.onErrorRaise, "Imaging:getComputerByMac", MACAddress) return d
c88d6015272efd6640c6a6102c10459c065827c2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5988/c88d6015272efd6640c6a6102c10459c065827c2/imaging.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 7703, 264, 858, 9990, 12, 2890, 16, 14246, 1887, 4672, 3536, 968, 279, 26579, 5866, 1450, 326, 14246, 5267, 3536, 302, 273, 365, 18, 1991, 5169, 2932, 588, 7703, 264, 858, 9990, 311...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 7703, 264, 858, 9990, 12, 2890, 16, 14246, 1887, 4672, 3536, 968, 279, 26579, 5866, 1450, 326, 14246, 5267, 3536, 302, 273, 365, 18, 1991, 5169, 2932, 588, 7703, 264, 858, 9990, 311...
""" n_atoms = len(chunk.ladder.axis_rail.baseatoms) axis_atoms = [None] * n_atoms for j in range(0, n_atoms): axis_atoms[j] = chunk.ladder.axis_rail.baseatoms[j] """
def compute_memo(self, chunk): """ If drawing chunks in this display mode can be optimized by precomputing some info from chunk's appearance, compute that info and return it.
b1ebc18235e7277b694101dcc54ad73acd9efbc1 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11221/b1ebc18235e7277b694101dcc54ad73acd9efbc1/DnaCylinderChunks.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3671, 67, 19521, 12, 2890, 16, 2441, 4672, 3536, 971, 16327, 6055, 316, 333, 2562, 1965, 848, 506, 15411, 635, 675, 13406, 310, 2690, 1123, 628, 2441, 1807, 9788, 1359, 16, 3671, 716, 11...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3671, 67, 19521, 12, 2890, 16, 2441, 4672, 3536, 971, 16327, 6055, 316, 333, 2562, 1965, 848, 506, 15411, 635, 675, 13406, 310, 2690, 1123, 628, 2441, 1807, 9788, 1359, 16, 3671, 716, 11...
return win32functions.IsWindowVisible(handle)
return win32functions.IsWindowVisible(handle)
def isvisible(handle): return win32functions.IsWindowVisible(handle)
2bdae3a49fa9ad42a9628b8679eff4c2bbdb85df /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6953/2bdae3a49fa9ad42a9628b8679eff4c2bbdb85df/handleprops.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 8613, 12, 4110, 4672, 327, 5657, 1578, 10722, 18, 2520, 3829, 6207, 12, 4110, 13, 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...
[ 1, 1, 1, 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, 353, 8613, 12, 4110, 4672, 327, 5657, 1578, 10722, 18, 2520, 3829, 6207, 12, 4110, 13, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
raise MDError, _('Error moving final %s to old dir %s' % (output_final_dir, output_old_dir))
raise MDError, _('Error moving final %s to old dir %s' % ( output_final_dir, output_old_dir))
def doFinalMove(self): """move the just-created repodata from .repodata to repodata also make sure to preserve any files we didn't mess with in the metadata dir""" output_final_dir = os.path.join(self.conf.outputdir, self.conf.finaldir) output_old_dir = os.path.join(self.conf.outputdir, self.conf.olddir) if os.path.exists(output_final_dir): try: os.rename(output_final_dir, output_old_dir) except: raise MDError, _('Error moving final %s to old dir %s' % (output_final_dir, output_old_dir))
473cb91d36b5c88e3a55fa60404eb172a1c6e32b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9557/473cb91d36b5c88e3a55fa60404eb172a1c6e32b/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 7951, 7607, 12, 2890, 4672, 3536, 8501, 326, 2537, 17, 4824, 2071, 18229, 628, 263, 266, 7832, 396, 358, 2071, 18229, 2546, 1221, 3071, 358, 9420, 1281, 1390, 732, 10242, 1404, 12755,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 7951, 7607, 12, 2890, 4672, 3536, 8501, 326, 2537, 17, 4824, 2071, 18229, 628, 263, 266, 7832, 396, 358, 2071, 18229, 2546, 1221, 3071, 358, 9420, 1281, 1390, 732, 10242, 1404, 12755,...
self._handle.ui.write('%s: %s "%s"', buildId, self.statusNames.get(buildStatus['status'], self.statusNames[-1]), buildStatus['message'])
self._handle.ui.write('%s: %s "%s"', buildId, self.statusNames.get(buildStatus['status'], self.statusNames[-1]), buildStatus['message'])
def watchImages(self, buildIds, timeout = 0, interval = 5, quiet=False): interval = 10 st = time.time() timedOut = False dropped = 0 finalStatus = {}
f8b69d130c557f89d010e0ec728eb1c58d9ad4b9 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8748/f8b69d130c557f89d010e0ec728eb1c58d9ad4b9/rbuilderfacade.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4267, 8946, 12, 2890, 16, 1361, 2673, 16, 2021, 273, 374, 16, 3673, 273, 1381, 16, 10902, 33, 8381, 4672, 3673, 273, 1728, 384, 273, 813, 18, 957, 1435, 7491, 1182, 273, 1083, 14611, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4267, 8946, 12, 2890, 16, 1361, 2673, 16, 2021, 273, 374, 16, 3673, 273, 1381, 16, 10902, 33, 8381, 4672, 3673, 273, 1728, 384, 273, 813, 18, 957, 1435, 7491, 1182, 273, 1083, 14611, 2...
self.direct_reference = direct_reference
self.direct_reference = True
def ParseDepsFile(self, direct_reference): """No DEPS to parse for a .gclient file.""" self.direct_reference = direct_reference self.deps_parsed = True
46a593e4b7539d470d2ea176378716f7116158b5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6076/46a593e4b7539d470d2ea176378716f7116158b5/gclient.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2884, 14430, 812, 12, 2890, 16, 2657, 67, 6180, 4672, 3536, 2279, 2030, 5857, 358, 1109, 364, 279, 263, 75, 2625, 585, 12123, 365, 18, 7205, 67, 6180, 273, 1053, 365, 18, 14877, 67, 10...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2884, 14430, 812, 12, 2890, 16, 2657, 67, 6180, 4672, 3536, 2279, 2030, 5857, 358, 1109, 364, 279, 263, 75, 2625, 585, 12123, 365, 18, 7205, 67, 6180, 273, 1053, 365, 18, 14877, 67, 10...
if is_win64(): return ['-O0']
if is_win64(): return ['-O0']
def get_flags_opt(self):
8a0ae9f4540d8644e66668a6198faa3a6a8577a5 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/14925/8a0ae9f4540d8644e66668a6198faa3a6a8577a5/gnu.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 7133, 67, 3838, 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, ...
[ 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, 336, 67, 7133, 67, 3838, 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, ...
warning = 'Following columns cannot be exported since you select to be import compatible.\n%s' %('\n'.join(warning_fields))
warning = 'Following columns cannot be exported since you select to be import compatible.\n%s' %('\n'.join(warning_fields))
def export_data(self, cr, uid, ids, fields_to_export, context=None): if not context: context = {} imp_comp = context.get('import_comp',False) cols = self._columns.copy() for f in self._inherit_fields: cols.update({f: self._inherit_fields[f][2]}) fields_to_export = map(lambda x: x.split('/'), fields_to_export) fields_export = fields_to_export+[] warning = '' warning_fields = [] for field in fields_export: if imp_comp and len(field)>1: warning_fields.append('/'.join(map(lambda x:x in cols and cols[x].string or x,field))) elif len (field) <=1: if imp_comp and cols.get(field and field[0],False): if ((isinstance(cols[field[0]], fields.function) and not cols[field[0]].store) \ or isinstance(cols[field[0]], fields.related)\ or isinstance(cols[field[0]], fields.one2many)): warning_fields.append('/'.join(map(lambda x:x in cols and cols[x].string or x,field))) datas = [] if imp_comp and len(warning_fields): warning = 'Following columns cannot be exported since you select to be import compatible.\n%s' %('\n'.join(warning_fields)) cr.rollback() return {'warning' : warning} for row in self.browse(cr, uid, ids, context): datas += self.__export_row(cr, uid, row, fields_to_export, context) return {'datas':datas}
19c6bf3cbf9c418ef8f4c3664582e8a20fbf6749 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/19c6bf3cbf9c418ef8f4c3664582e8a20fbf6749/orm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3359, 67, 892, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 1466, 67, 869, 67, 6530, 16, 819, 33, 7036, 4672, 309, 486, 819, 30, 819, 273, 2618, 1646, 67, 2919, 273, 819, 18, 588, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3359, 67, 892, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 1466, 67, 869, 67, 6530, 16, 819, 33, 7036, 4672, 309, 486, 819, 30, 819, 273, 2618, 1646, 67, 2919, 273, 819, 18, 588, 2...
result += res[i][1] if not res[i][2]:
result += i[1] if not i[2]:
def create_dialog_widgets_table(data): """Creates a table for the widgets in a dialog."""
03dd1fa87e7ed6a1aae10ff4e922ba7db9cd3ff8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9355/03dd1fa87e7ed6a1aae10ff4e922ba7db9cd3ff8/wiki_grabber.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 12730, 67, 18148, 67, 2121, 12, 892, 4672, 3536, 2729, 279, 1014, 364, 326, 10965, 316, 279, 6176, 12123, 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, 752, 67, 12730, 67, 18148, 67, 2121, 12, 892, 4672, 3536, 2729, 279, 1014, 364, 326, 10965, 316, 279, 6176, 12123, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
try:
if '__classcall_private__' in cls.__dict__: return cls.__classcall_private__(cls, *args, **options) elif hasattr(cls, "__classcall__"):
... def __init__(self):
32244223035d4bd18fdcd495d0939acf52e277a3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/32244223035d4bd18fdcd495d0939acf52e277a3/classcall_metaclass.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1372, 4202, 1652, 1001, 2738, 972, 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...
[ 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, 1372, 4202, 1652, 1001, 2738, 972, 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, -1...
self.r_cb_plugged()
self.r_cb_plugged
def cb_plugged(self, *a): if self.r_cb_plugged: self.r_cb_plugged()
a64fc8e7305587ee4244fa04687392fd115fdd3a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2233/a64fc8e7305587ee4244fa04687392fd115fdd3a/vimembed.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2875, 67, 22045, 2423, 12, 2890, 16, 380, 69, 4672, 309, 365, 18, 86, 67, 7358, 67, 22045, 2423, 30, 365, 18, 86, 67, 7358, 67, 22045, 2423, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2875, 67, 22045, 2423, 12, 2890, 16, 380, 69, 4672, 309, 365, 18, 86, 67, 7358, 67, 22045, 2423, 30, 365, 18, 86, 67, 7358, 67, 22045, 2423, 1435, 2, -100, -100, -100, -100, -100, -1...
scheme mechanism. Available options are:
scheme mechanism. Available options include:
def tix_option_get(self, name): """Gets the options manitained by the Tix scheme mechanism. Available options are:
723293cb49f479a41dc893d72c2d6502587d52cb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/723293cb49f479a41dc893d72c2d6502587d52cb/Tix.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 268, 697, 67, 3482, 67, 588, 12, 2890, 16, 508, 4672, 3536, 3002, 225, 326, 702, 225, 3161, 305, 8707, 225, 635, 225, 326, 225, 399, 697, 4355, 12860, 18, 15633, 702, 854, 30, 2, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 268, 697, 67, 3482, 67, 588, 12, 2890, 16, 508, 4672, 3536, 3002, 225, 326, 702, 225, 3161, 305, 8707, 225, 635, 225, 326, 225, 399, 697, 4355, 12860, 18, 15633, 702, 854, 30, 2, -10...
revision = info[0]
self.revision = info[0]
def __init__(self, info): revision = info[0]
b4a388374ab7b9e463fb6b78e96c496b0106d8c2 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8747/b4a388374ab7b9e463fb6b78e96c496b0106d8c2/calllog.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1123, 4672, 6350, 273, 1123, 63, 20, 65, 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, 1001, 2738, 972, 12, 2890, 16, 1123, 4672, 6350, 273, 1123, 63, 20, 65, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
if cb_callback(*args, **kwargs):
if cb_callback(*(args + cb_args), **cb_kwargs):
def emit(self, *args, **kwargs): retval = False for cb_callback, cb_args, cb_kwargs, cb_once, cb_weak in self._callbacks[:]: if cb_weak: cb_callback = cb_callback._get_callback() cb_args, cb_kwargs = unweakref_data((cb_args, cb_kwargs)) else: cb_kwargs = cb_kwargs.copy()
73f962bfb5271cef0f36e7c66e23b0a1faaeec40 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11722/73f962bfb5271cef0f36e7c66e23b0a1faaeec40/callback.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3626, 12, 2890, 16, 380, 1968, 16, 2826, 4333, 4672, 5221, 273, 1083, 364, 2875, 67, 3394, 16, 2875, 67, 1968, 16, 2875, 67, 4333, 16, 2875, 67, 8243, 16, 2875, 67, 26008, 316, 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, 3626, 12, 2890, 16, 380, 1968, 16, 2826, 4333, 4672, 5221, 273, 1083, 364, 2875, 67, 3394, 16, 2875, 67, 1968, 16, 2875, 67, 4333, 16, 2875, 67, 8243, 16, 2875, 67, 26008, 316, 365, ...
if(res[i][2] == ""):
if not res[i][2]:
def create_dialog_widgets_table(data) : """Creates a table for the widgets in a dialog."""
a6feb1e5c52929a2b7bcc20a424e929b737f2517 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9355/a6feb1e5c52929a2b7bcc20a424e929b737f2517/wiki_grabber.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 12730, 67, 18148, 67, 2121, 12, 892, 13, 294, 3536, 2729, 279, 1014, 364, 326, 10965, 316, 279, 6176, 12123, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 12730, 67, 18148, 67, 2121, 12, 892, 13, 294, 3536, 2729, 279, 1014, 364, 326, 10965, 316, 279, 6176, 12123, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
sqlSub += "WHERE dataset=:dataset AND type=:type AND status=:fileStatus GROUP BY destinationDBlock,PandaID"
sqlSub += "WHERE dataset=:dataset AND type IN (:type1,:type2) AND status=:fileStatus GROUP BY destinationDBlock,PandaID"
def getFilesInUseForAnal(self,outDataset): comment = ' /* DBProxy.getFilesInUseForAnal */' sqlSub = "SELECT /*+ index(tab FILESTABLE4_DATASET_IDX) */ destinationDBlock,PandaID FROM ATLAS_PANDA.filesTable4 tab " sqlSub += "WHERE dataset=:dataset AND type=:type AND status=:fileStatus GROUP BY destinationDBlock,PandaID" sqlPan = "SELECT jobStatus FROM ATLAS_PANDA.jobsArchived4 WHERE PandaID=:PandaID" sqlDis = "SELECT distinct dispatchDBlock FROM ATLAS_PANDA.filesTable4 " sqlDis += "WHERE PandaID=:PandaID AND type=:type" sqlLfn = "SELECT /*+ index(tab FILESTABLE4_DISPDBLOCK_IDX) */ lfn,PandaID FROM ATLAS_PANDA.filesTable4 tab " sqlLfn += "WHERE dispatchDBlock=:dispatchDBlock AND type=:type" nTry=3 for iTry in range(nTry): inputFilesList = [] try: # start transaction self.conn.begin() # get sub datasets varMap = {} varMap[':dataset'] = outDataset varMap[':type'] = 'output' varMap[':fileStatus'] = 'unknown' _logger.debug("getFilesInUseForAnal : %s %s" % (sqlSub,str(varMap))) self.cur.arraysize = 10000 retS = self.cur.execute(sqlSub+comment, varMap) res = self.cur.fetchall() subDSpandaIDmap = {} checkedPandaIDs = {} for subDataset,pandaID in res: if not checkedPandaIDs.has_key(pandaID): # check status varMap = {} varMap[':PandaID'] = pandaID retP = self.cur.execute(sqlPan+comment, varMap) resP = self.cur.fetchall() # append if len(resP) != 0: checkedPandaIDs[pandaID] = resP[0][0] else: checkedPandaIDs[pandaID] = 'running' # reuse failed files if checkedPandaIDs[pandaID] == 'failed': continue # collect PandaIDs if not subDSpandaIDmap.has_key(subDataset): subDSpandaIDmap[subDataset] = [] subDSpandaIDmap[subDataset].append(pandaID) # loop over all sub datasets for subDataset,activePandaIDs in subDSpandaIDmap.iteritems(): # get dispatchDBlocks pandaID = activePandaIDs[0] varMap = {} varMap[':PandaID'] = pandaID varMap[':type'] = 'input' _logger.debug("getFilesInUseForAnal : %s %s" % (sqlDis,str(varMap))) self.cur.arraysize = 10000 retD = self.cur.execute(sqlDis+comment, varMap) resD = self.cur.fetchall() # get LFNs for disDataset, in resD: # use new style only if not disDataset.startswith('user_disp.'): continue varMap = {} varMap[':dispatchDBlock'] = disDataset varMap[':type'] = 'input' _logger.debug("getFilesInUseForAnal : %s %s" % (sqlLfn,str(varMap))) self.cur.arraysize = 100000 retL = self.cur.execute(sqlLfn+comment, varMap) resL = self.cur.fetchall() # append for lfn,filePandaID in resL: # skip files used by finished/failed jobs if filePandaID in activePandaIDs: inputFilesList.append(lfn) # commit if not self._commit(): raise RuntimeError, 'Commit error' _logger.debug("getFilesInUseForAnal : %s" % len(inputFilesList)) return inputFilesList except: # roll back self._rollback() if iTry+1 < nTry: _logger.debug("inputFilesList retry : %s" % iTry) time.sleep(random.randint(10,20)) continue type, value, traceBack = sys.exc_info() _logger.error("inputFilesList(%s) : %s %s" % (outDataset,type,value)) return []
b481654abffb5066a3efe8b5c7134336ce31b6f9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7525/b481654abffb5066a3efe8b5c7134336ce31b6f9/OraDBProxy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 18262, 15435, 1290, 979, 287, 12, 2890, 16, 659, 10656, 4672, 2879, 273, 296, 1748, 2383, 3886, 18, 588, 2697, 15435, 1290, 979, 287, 1195, 11, 1847, 1676, 225, 273, 315, 4803, 1748, 15,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 18262, 15435, 1290, 979, 287, 12, 2890, 16, 659, 10656, 4672, 2879, 273, 296, 1748, 2383, 3886, 18, 588, 2697, 15435, 1290, 979, 287, 1195, 11, 1847, 1676, 225, 273, 315, 4803, 1748, 15,...
attr = Arg( type, optional default value )
attr = Arg( type, optional default value expr )
def Arg( type_expr, dflt_expr = _E_REQUIRED_ARG_, _attr_expr = None): ###IMPLEM _E_REQUIRED_ARG_ - do we tell _i_instance somehow? """To declare an Instance-argument in an expr class, use an assignment like this, directly in the class namespace: attr = Arg( type, optional default value ) Order matters (specifically, execution order of the Arg macros, or maybe only of the exprs containing them, while Python is executing a given class definition, before the metaclass's __new__ runs); those attrs which are not already defined as args in superclasses are appended to the inherited arglist, whose positions are counted from 0. (Handling anything about args in superclasses is NIM. ##e) The index of the instance made from this optional argument will be its position in the arglist (whether or not the arg was supplied or the default value was used). If the default value is not supplied, there is no default value (i.e. the arg is required). [_attr_expr is a private option for use by ArgOrOption.] """ global _arg_order_counter _arg_order_counter += 1 required = (dflt_expr is _E_REQUIRED_ARG_) argpos_expr = _this_gets_replaced_with_argpos_for_current_attr( _arg_order_counter, required ) # Implem note: # _this_gets_replaced_with_argpos_for_current_attr(...) makes a special thing to be noticed by the FormulaScanner # and replaced with the actual arg order within the class (but the same within any single attr). # ExprsMeta can do that by scanning values in order of Expr construction. # But it has to worry about two vals the same, since then two attrs have equal claim... # it does that by asserting that a given _arg_order_counter corresponds to only one attr. ########@@@@@@@nim # FYI, the other possible use for _arg_order_counter would be to assert that it only increases, # but this is not obviously true (or useful) in undoc but presently supported cases like # attr = If(cond, Arg(type1), Arg(type2)) # (which the present code treats as alternative type decls for the same arg position). ##printnim("asserting that a given _arg_order_counter corresponds to only one attr -- in a better way than ive_seen kluge below")####@@@@@ attr_expr = _attr_expr # what about current attr to use in index for arg instance and/or # in finding the arg expr in an instance (the replacement instance for _self) -- # this is None by default, since _E_ATTR (the attr we're on) shouldn't affect the index, # in this Arg macro. When we're used by other macros they can pass something else for that. return _ArgOption_helper( attr_expr, argpos_expr, type_expr, dflt_expr)
510b509e2851455f40f6d09c56cf2bbd030a4bf6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/510b509e2851455f40f6d09c56cf2bbd030a4bf6/Exprs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14448, 12, 618, 67, 8638, 16, 302, 31864, 67, 8638, 273, 389, 41, 67, 14977, 67, 10973, 67, 16, 389, 1747, 67, 8638, 273, 599, 4672, 11849, 9883, 26817, 389, 41, 67, 14977, 67, 10973, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 14448, 12, 618, 67, 8638, 16, 302, 31864, 67, 8638, 273, 389, 41, 67, 14977, 67, 10973, 67, 16, 389, 1747, 67, 8638, 273, 599, 4672, 11849, 9883, 26817, 389, 41, 67, 14977, 67, 10973, ...
if name.find("-expected.") != -1 and mode == "w":
if name.find("-expected.") != -1 and mode.find("w") != -1:
def _wrapper(name, mode, encoding): if name.find("-expected.") != -1 and mode == "w": # we don't want to actually write new baselines, so stub these out name.replace('\\', '/') file_list.append(name) return original_open(os.devnull, mode, encoding) return original_open(name, mode, encoding)
e8f296ad2d638c67326f8a2430258749d928107a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9392/e8f296ad2d638c67326f8a2430258749d928107a/run_webkit_tests_unittest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8376, 12, 529, 16, 1965, 16, 2688, 4672, 309, 508, 18, 4720, 2932, 17, 3825, 1199, 13, 480, 300, 21, 471, 1965, 18, 4720, 2932, 91, 7923, 480, 300, 21, 30, 468, 732, 2727, 1404,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 8376, 12, 529, 16, 1965, 16, 2688, 4672, 309, 508, 18, 4720, 2932, 17, 3825, 1199, 13, 480, 300, 21, 471, 1965, 18, 4720, 2932, 91, 7923, 480, 300, 21, 30, 468, 732, 2727, 1404,...
brush = styles.GetGradientBrush(self.dayWidth, eventColors.selectedGradientLeft, eventColors.selectedGradientRight)
bitmap = styles.GetGradientBitmap(self.parent.dayWidth, eventColors.selectedGradientLeft, eventColors.selectedGradientRight) brush = wx.Brush(wx.WHITE) brush.SetStipple(bitmap)
def DrawCells(self, dc): styles = self.parent
3d4f057eda6d5060c01e3a0bb53dc9c14200c4f5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/3d4f057eda6d5060c01e3a0bb53dc9c14200c4f5/CalendarCanvas.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10184, 10505, 12, 2890, 16, 6744, 4672, 225, 5687, 273, 365, 18, 2938, 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, 10184, 10505, 12, 2890, 16, 6744, 4672, 225, 5687, 273, 365, 18, 2938, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
def __init__(self, locale_time=LocaleTime()):
def __init__(self, locale_time=None):
def __init__(self, locale_time=LocaleTime()): """Init inst with non-locale regexes and store LocaleTime object.""" #XXX: Does 'Y' need to worry about having less or more than 4 digits? base = super(TimeRE, self) base.__init__({ # The " \d" option is to make %c from ANSI C work 'd': r"(?P<d>3[0-1]|[1-2]\d|0[1-9]|[1-9]| [1-9])", 'H': r"(?P<H>2[0-3]|[0-1]\d|\d)", 'I': r"(?P<I>1[0-2]|0[1-9]|[1-9])", 'j': r"(?P<j>36[0-6]|3[0-5]\d|[1-2]\d\d|0[1-9]\d|00[1-9]|[1-9]\d|0[1-9]|[1-9])", 'm': r"(?P<m>1[0-2]|0[1-9]|[1-9])", 'M': r"(?P<M>[0-5]\d|\d)", 'S': r"(?P<S>6[0-1]|[0-5]\d|\d)", 'U': r"(?P<U>5[0-3]|[0-4]\d|\d)", 'w': r"(?P<w>[0-6])", # W is set below by using 'U' 'y': r"(?P<y>\d\d)", 'Y': r"(?P<Y>\d\d\d\d)"}) base.__setitem__('W', base.__getitem__('U')) self.locale_time = locale_time
b584f2160eb2f36682342896c38f3ece08e4254d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/b584f2160eb2f36682342896c38f3ece08e4254d/_strptime.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2573, 67, 957, 33, 7036, 4672, 3536, 2570, 1804, 598, 1661, 17, 6339, 28522, 471, 1707, 6458, 950, 733, 12123, 468, 15639, 30, 9637, 296, 61, 11, 1608, 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, 2738, 972, 12, 2890, 16, 2573, 67, 957, 33, 7036, 4672, 3536, 2570, 1804, 598, 1661, 17, 6339, 28522, 471, 1707, 6458, 950, 733, 12123, 468, 15639, 30, 9637, 296, 61, 11, 1608, 3...
self.pause_time = 0
self.pause_time = pause_time
def __init__(self, conference_bridge, file_name, volume=100, loop_count=1, pause_time=0): self.conference_bridge = conference_bridge self.file_name = file_name self.volume = volume self.loop_count = loop_count self.pause_time = 0 self._current_loop = 0 self._lock = Lock() self._state = 'stopped' self._wave_file = None if not os.path.exists(file_name): raise ValueError("File not found: %s" % file_name)
1f90446d4bdaaeb810290984a408d8569cc8fbfb /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5703/1f90446d4bdaaeb810290984a408d8569cc8fbfb/util.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 356, 1134, 67, 18337, 16, 585, 67, 529, 16, 3940, 33, 6625, 16, 2798, 67, 1883, 33, 21, 16, 11722, 67, 957, 33, 20, 4672, 365, 18, 591, 1134, 67, 183...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 356, 1134, 67, 18337, 16, 585, 67, 529, 16, 3940, 33, 6625, 16, 2798, 67, 1883, 33, 21, 16, 11722, 67, 957, 33, 20, 4672, 365, 18, 591, 1134, 67, 183...
"""ScrolledListBox - Listbox with scrollbars."""
"""ScrolledListBox - Listbox with automatic scrollbars."""
def __init__(self, master, cnf={}, **kw): TixWidget.__init__(self, master, 'tixScrolledHList', ['options'], cnf, kw) self.subwidget_list['hlist'] = _dummyHList(self, 'hlist') self.subwidget_list['vsb'] = _dummyScrollbar(self, 'vsb') self.subwidget_list['hsb'] = _dummyScrollbar(self, 'hsb')
b7b32601281f25ffed50f8187c78a3802fa14039 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/b7b32601281f25ffed50f8187c78a3802fa14039/Tix.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 4171, 16, 23118, 28793, 2826, 9987, 4672, 399, 697, 4609, 16186, 2738, 972, 12, 2890, 16, 4171, 16, 296, 88, 697, 1541, 25054, 44, 682, 2187, 10228, 2116, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4171, 16, 23118, 28793, 2826, 9987, 4672, 399, 697, 4609, 16186, 2738, 972, 12, 2890, 16, 4171, 16, 296, 88, 697, 1541, 25054, 44, 682, 2187, 10228, 2116, ...
else staticLibsOption
else cls.staticLibsOption
def getLinkFlags(cls, platform, linkMode, distroRoot): configScript = cls.getConfigScript(platform, linkMode, distroRoot) if configScript is not None: libsOption = ( cls.dynamicLibsOption if cls.isSystemLibrary(platform, linkMode) else staticLibsOption ) if libsOption is not None: return '`%s %s`' % (configScript, libsOption) if cls.isSystemLibrary(platform, linkMode): return '-l%s' % cls.getLibName(platform) elif distroRoot is None: raise ValueError( 'Library "%s" is not a system library and no alternative ' 'location is available.' % cls.makeName ) else: if linkMode == 'SYS_DYN': return '-L%s/lib -l%s' % (distroRoot, cls.getLibName(platform)) elif linkMode == '3RD_STA': return ' '.join( [ '%s/lib/lib%s.a' % ( distroRoot, cls.getLibName(platform) ) ] + [ librariesByName[name].getLinkFlags( platform, linkMode, distroRoot ) for name in cls.dependsOn ] ) else: raise ValueError('Invalid link mode "%s"' % linkMode)
66dee5e3f355949f8f880440fb98cf43f9d13159 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5450/66dee5e3f355949f8f880440fb98cf43f9d13159/probe_defs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15545, 5094, 12, 6429, 16, 4072, 16, 1692, 2309, 16, 27450, 2375, 4672, 642, 3651, 273, 2028, 18, 588, 809, 3651, 12, 9898, 16, 1692, 2309, 16, 27450, 2375, 13, 309, 642, 3651, 353, 48...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 15545, 5094, 12, 6429, 16, 4072, 16, 1692, 2309, 16, 27450, 2375, 4672, 642, 3651, 273, 2028, 18, 588, 809, 3651, 12, 9898, 16, 1692, 2309, 16, 27450, 2375, 13, 309, 642, 3651, 353, 48...
self.NewChannelWindow(*params)
def TextCommand(self,cmdstring,window): if not cmdstring: raise "Empty command"
a066cf60529e05c65674deb80bc13740dbb69da5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2718/a066cf60529e05c65674deb80bc13740dbb69da5/wxserver.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3867, 2189, 12, 2890, 16, 4172, 1080, 16, 5668, 4672, 309, 486, 1797, 1080, 30, 1002, 315, 1921, 1296, 6, 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, 3867, 2189, 12, 2890, 16, 4172, 1080, 16, 5668, 4672, 309, 486, 1797, 1080, 30, 1002, 315, 1921, 1296, 6, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
scripts = ['spkg-debian-maybe'],
scripts = [],
def compile_command_list(ext_modules, deps): """ Computes a list of commands needed to compile and link the extension modules given in 'ext_modules' """ queue_compile_high = [] queue_compile_med = [] queue_compile_low = [] for m in ext_modules: new_sources = [] for f in m.sources: if f.endswith('.pyx'): dep_file, dep_time = deps.newest_dep(f) dest_file = "%s/%s"%(SITE_PACKAGES, f) dest_time = deps.timestamp(dest_file) if dest_time < dep_time: if dep_file == f: print "Building modified file %s."%f queue_compile_high.append([compile_command, (f,m)]) elif dep_file == (f[:-4] + '.pxd'): print "Building %s because it depends on %s."%(f, dep_file) queue_compile_med.append([compile_command, (f,m)]) else: print "Building %s because it depends on %s."%(f, dep_file) queue_compile_low.append([compile_command, (f,m)]) new_sources.append(process_filename(f, m)) m.sources = new_sources return queue_compile_high + queue_compile_med + queue_compile_low
03e562331a272652c9474e8a48c898de8f3f17b4 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/03e562331a272652c9474e8a48c898de8f3f17b4/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4074, 67, 3076, 67, 1098, 12, 408, 67, 6400, 16, 8740, 4672, 3536, 14169, 281, 279, 666, 434, 4364, 3577, 358, 4074, 471, 1692, 326, 2710, 4381, 864, 316, 296, 408, 67, 6400, 11, 3536,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4074, 67, 3076, 67, 1098, 12, 408, 67, 6400, 16, 8740, 4672, 3536, 14169, 281, 279, 666, 434, 4364, 3577, 358, 4074, 471, 1692, 326, 2710, 4381, 864, 316, 296, 408, 67, 6400, 11, 3536,...
cwd = os.getcwd()
cwd = ''
def _freezeFromChangesets(self): ret = [] cwd = os.getcwd() for f in self._fromChangesets: if not f.fileName: continue fn = f.fileName if not fn.startswith('/'): fn = util.joinPaths(cwd, fn) ret.append(fn) return ret
3a14faf6eb1573456c9b8d413500cdb5844bf4a3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8747/3a14faf6eb1573456c9b8d413500cdb5844bf4a3/database.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 29631, 1265, 7173, 2413, 12, 2890, 4672, 325, 273, 5378, 7239, 273, 875, 364, 284, 316, 365, 6315, 2080, 7173, 2413, 30, 309, 486, 284, 18, 17812, 30, 1324, 2295, 273, 284, 18, 17...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 29631, 1265, 7173, 2413, 12, 2890, 4672, 325, 273, 5378, 7239, 273, 875, 364, 284, 316, 365, 6315, 2080, 7173, 2413, 30, 309, 486, 284, 18, 17812, 30, 1324, 2295, 273, 284, 18, 17...
Return True if this group is elementary abelian. An elementary abelian group is a finite Abelian group, where every nontrivial element has order p, where p is a prime.
Return ``True`` if this group is elementary abelian. An elementary abelian group is a finite abelian group, where every nontrivial element has order `p`, where `p` is a prime.
def is_elementary_abelian(self): """ Return True if this group is elementary abelian. An elementary abelian group is a finite Abelian group, where every nontrivial element has order p, where p is a prime.
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, 353, 67, 2956, 814, 67, 873, 2779, 12, 2890, 4672, 3536, 2000, 1053, 309, 333, 1041, 353, 930, 814, 1223, 292, 2779, 18, 1922, 930, 814, 1223, 292, 2779, 1041, 353, 279, 25922, 9771, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 67, 2956, 814, 67, 873, 2779, 12, 2890, 4672, 3536, 2000, 1053, 309, 333, 1041, 353, 930, 814, 1223, 292, 2779, 18, 1922, 930, 814, 1223, 292, 2779, 1041, 353, 279, 25922, 9771, 2...
layout.set_font_description(pango.FontDescription("Sans Bold "+str(int(screenH/54.0))))
layout.set_font_description(pango.FontDescription( "Sans Bold "+str(int(screenH/54.0))))
def _draw(self, widget): 'Render `widget`.' if not widget.window or not widget.window.is_viewable(): return False ccontext = widget.window.cairo_create() screenW, screenH = widget.window.get_size() if widget is self.preview and self.pres.window and self.pres.window.is_viewable(): #Scale if the presentation window size is available win_sz = self.pres.window.get_size() width = int(float(preview_height)*win_sz[0]/win_sz[1]) screenW = screenW*win_sz[0]/width screenH = screenH*win_sz[1]/preview_height ccontext.scale(float(width)/win_sz[0], float(preview_height)/win_sz[1]) elif widget is self.pres: self.preview.queue_draw() slide = exposong.slidelist.slidelist.get_active_item() if widget is self.pres and (self._background or self._black or self._logo) \ or not slide: #When there's no text to render, just draw the background self._set_background(widget, ccontext, (screenW, screenH)) else: if slide.draw(widget) is not NotImplemented: return True self._set_background(widget, ccontext, (screenW, screenH)) txcol = c2dec(config.getcolor("screen", "text_color")) screenCenterY = screenH/2 # Header text # TODO # Footer text ftext = slide.footer_text() if ftext is not NotImplemented: ftext = str(ftext) if isinstance(ftext, (unicode, str)) and len(ftext): layout = ccontext.create_layout() layout.set_text(ftext) layout.set_alignment(pango.ALIGN_CENTER) layout.set_width(int(screenW*pango.SCALE * 0.97)) layout.set_font_description(pango.FontDescription("Sans Bold "+str(int(screenH/54.0)))) footer_height = layout.get_pixel_size()[1] ccontext.set_source_rgba(txcol[0], txcol[1], txcol[2], 1.0) ccontext.move_to(screenW * 0.015, screenH - footer_height) ccontext.show_layout(layout) screenH -= footer_height screenCenterY -= footer_height/2 # Body Text layout = ccontext.create_layout() size = 16 layout.set_text(str(slide.body_text())) layout.set_alignment(pango.ALIGN_CENTER) layout.set_width(int(screenW*pango.SCALE * 0.97)) layout.set_font_description(pango.FontDescription("Sans Bold "+str(size))) min_sz = 0 max_sz = config.getfloat("screen", "max_font_size") #Loop through until the text is between 78% of the height and 94%, or #until we get a number that is not a multiple of 4 (2,6,10,14, etc) to #make it simpler... TODO Double check that it doesn't overflow while True: if layout.get_pixel_size()[0] > screenW*0.97 \ or layout.get_pixel_size()[1] > screenH*0.94: max_sz = size size = (min_sz + max_sz) / 2 elif size % 4 != 0 or max_sz - min_sz < 3: break elif layout.get_pixel_size()[1] < screenH*0.78: min_sz = size if(max_sz): size = (min_sz + max_sz) / 2 else: size = size * 2 else: break layout.set_font_description(pango.FontDescription("Sans Bold "+str(size))) if config.getcolor("screen", "text_shadow"): shcol = c2dec(config.getcolor("screen", "text_shadow")) ccontext.set_source_rgba(shcol[0], shcol[1], shcol[2], shcol[3]) ccontext.move_to(screenW * 0.015 + size*0.1, screenCenterY - layout.get_pixel_size()[1]/2.0 + size*0.1) ccontext.show_layout(layout) ccontext.set_source_rgba(txcol[0], txcol[1], txcol[2], 1.0) ccontext.move_to(screenW * 0.015,screenCenterY - layout.get_pixel_size()[1]/2.0) ccontext.show_layout(layout) #Draw notification if widget is self.pres and self._notification: layout = ccontext.create_layout() layout.set_text(self._notification) notify_sz = int(screenH/12.0) layout.set_font_description(pango.FontDescription("Sans Bold "+str(notify_sz))) while layout.get_pixel_size()[0] > screenW*0.6: notify_sz = int(notify_sz*0.89) layout.set_font_description(pango.FontDescription("Sans Bold "+str(notify_sz))) sbounds = widget.window.get_size() nbounds = layout.get_pixel_size() pad = notify_sz/14.0 ccontext.rectangle(sbounds[0]-nbounds[0]-pad*2, sbounds[1]-nbounds[1]-pad*2, sbounds[0], sbounds[1]) ccontext.set_source_rgb(config.getcolor("screen", "notify_bg")[0], config.getcolor("screen", "notify_bg")[1], config.getcolor("screen", "notify_bg")[2]) ccontext.fill() ccontext.set_source_rgb(1.0, 1.0, 1.0) ccontext.move_to(sbounds[0]-nbounds[0]-pad, sbounds[1]-nbounds[1]-pad) ccontext.show_layout(layout) return True
8d23729024fa76f4a1017ef684bb5b59fc46d99c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5029/8d23729024fa76f4a1017ef684bb5b59fc46d99c/screen.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 9446, 12, 2890, 16, 3604, 4672, 296, 3420, 1375, 6587, 68, 1093, 309, 486, 3604, 18, 5668, 578, 486, 3604, 18, 5668, 18, 291, 67, 1945, 429, 13332, 327, 1083, 225, 276, 2472, 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, 389, 9446, 12, 2890, 16, 3604, 4672, 296, 3420, 1375, 6587, 68, 1093, 309, 486, 3604, 18, 5668, 578, 486, 3604, 18, 5668, 18, 291, 67, 1945, 429, 13332, 327, 1083, 225, 276, 2472, 273,...
if t_movies.has_key("year") and int(t_movies["year"]) < 1986: t_movies[i] = None self.Movie.mapper.table.insert().execute(t_movies)
if t_movies.has_key("year") and (t_movies["year"]==None or int(t_movies["year"]) < 1986): t_movies["year"] = None def add_movie(self, t_movies, t_languages=None, t_tags=None): self.clean_t_movies(t_movies) objectstore.clear()
def add_movie(self, t_movies, t_languages=None, t_tags=None): # remove empty fields (insert default value instead - mostly "NULL") for i in t_movies.keys(): if t_movies[i] == '': t_movies.pop(i) for i in ["color","cond","layers","region","media_num"]: if t_movies[i] == -1: t_movies.pop(i) for i in ["volume_id","collection_id"]: if t_movies.has_key(i) and int(t_movies[i]) == 0: t_movies[i] = None if t_movies.has_key("year") and int(t_movies["year"]) < 1986: t_movies[i] = None
4b0c89054066122c9a487231e3cc72eebb555d01 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2687/4b0c89054066122c9a487231e3cc72eebb555d01/sql.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 8683, 13120, 12, 2890, 16, 268, 67, 8683, 29028, 16, 268, 67, 14045, 33, 7036, 16, 268, 67, 4156, 33, 7036, 4672, 468, 1206, 1008, 1466, 261, 6387, 805, 460, 3560, 300, 23958,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 8683, 13120, 12, 2890, 16, 268, 67, 8683, 29028, 16, 268, 67, 14045, 33, 7036, 16, 268, 67, 4156, 33, 7036, 4672, 468, 1206, 1008, 1466, 261, 6387, 805, 460, 3560, 300, 23958,...
if layer_defn.GetFieldCount() != 16:
if layer_defn.GetFieldCount() != 15:
def test_ogr2ogr_20(): if test_cli_utilities.get_ogr2ogr_path() is None: return 'skip' if not ogrtest.have_geos(): return 'skip' gml_drv = ogr.GetDriverByName('GML') if gml_drv is None: return 'skip' expected_fields = [ 'a', 'A_1', 'a_1_2', 'aaaaaAAAAA', 'aAaaaAAA_1', 'aaaaaAAAAB', 'aaaaaAAA_2', 'aaaaaAAA_3', 'aaaaaAAA_4', 'aaaaaAAA_5', 'aaaaaAAA_6', 'aaaaaAAA_7', 'aaaaaAAA_8', 'aaaaaAAA_9', 'aaaaaAAA10', '' ] gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + ' tmp data/flds.gml') ds = ogr.Open('tmp/Fields.shp') if ds is None: return 'fail' layer_defn = ds.GetLayer(0).GetLayerDefn() if layer_defn.GetFieldCount() != 16: gdaltest.post_reason('Unexpected field count: ' + str(ds.GetLayer(0).GetLayerDefn().GetFieldCount()) ) ds.Destroy() ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/Fields.shp') return 'fail' error_occured = False for i in range( layer_defn.GetFieldCount() ): if layer_defn.GetFieldDefn( i ).GetNameRef() != expected_fields[i]: print 'Expected ', expected_fields[i],',but got',layer_defn.GetFieldDefn( i ).GetNameRef() error_occured = True ds.Destroy() ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/Fields.shp') if error_occured: return 'fail' return 'success'
177ffd16a6f2da58876a744c1018aea601409d81 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10289/177ffd16a6f2da58876a744c1018aea601409d81/test_ogr2ogr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 717, 86, 22, 717, 86, 67, 3462, 13332, 309, 1842, 67, 4857, 67, 1367, 1961, 18, 588, 67, 717, 86, 22, 717, 86, 67, 803, 1435, 353, 599, 30, 327, 296, 7457, 11, 225, 309, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 717, 86, 22, 717, 86, 67, 3462, 13332, 309, 1842, 67, 4857, 67, 1367, 1961, 18, 588, 67, 717, 86, 22, 717, 86, 67, 803, 1435, 353, 599, 30, 327, 296, 7457, 11, 225, 309, ...
new_inode = Inode(type=type, size=0, links=1)
new_inode = Inode(type=type, size=0) if type == TYPE_DIRECTORY: new_inode["links"] = 2 elif type == TYPE_REGULAR_FILE: new_inode["links"] = 1
def create_node(self, path, type): #pdb.set_trace() node_dirname, node_basename = os.path.split(path) parent_dirname, parent_basename = os.path.split(node_dirname) parent_dirent = self.get_dir_entry(node_dirname) parent_inode_struct = self.get_inode_struct(parent_dirent["inode"]) for dirent in self.read_directory(parent_dirent["inode"]): if dirent["name"].rstrip("\0") == node_basename: raise ClfsError(EEXIST) new_dirent = DirEntry(name=node_basename, inode=self.claim_free_cluster()) # write the new dirent at the end of the parent directory assert new_dirent.size == self.write_inode_data( parent_dirent["inode"], parent_inode_struct["size"], new_dirent.pack(),) # initialize the new inode #pdb.set_trace() new_inode = Inode(type=type, size=0, links=1) assert (new_inode.size, new_inode.size) == self.write_to_chain( new_dirent["inode"], 0, 0, new_inode.pack())
a84a2929a18f9791e9b3c2a51556bedfe767a67c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4811/a84a2929a18f9791e9b3c2a51556bedfe767a67c/clfs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 2159, 12, 2890, 16, 589, 16, 618, 4672, 468, 17414, 18, 542, 67, 5129, 1435, 756, 67, 12287, 16, 756, 67, 13909, 273, 1140, 18, 803, 18, 4939, 12, 803, 13, 982, 67, 12287, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2159, 12, 2890, 16, 589, 16, 618, 4672, 468, 17414, 18, 542, 67, 5129, 1435, 756, 67, 12287, 16, 756, 67, 13909, 273, 1140, 18, 803, 18, 4939, 12, 803, 13, 982, 67, 12287, ...
if certsreqs == ssl.CERT_NONE: certtype = "CERT_NONE" elif certsreqs == ssl.CERT_OPTIONAL: certtype = "CERT_OPTIONAL" elif certsreqs == ssl.CERT_REQUIRED: certtype = "CERT_REQUIRED"
certtype = { ssl.CERT_NONE: "CERT_NONE", ssl.CERT_OPTIONAL: "CERT_OPTIONAL", ssl.CERT_REQUIRED: "CERT_REQUIRED", }[certsreqs]
def tryProtocolCombo (server_protocol, client_protocol, expectedToWork, certsreqs=None):
f08683542eada763321715f558eac5b2baec28e9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12029/f08683542eada763321715f558eac5b2baec28e9/test_ssl.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 775, 5752, 16156, 261, 3567, 67, 8373, 16, 1004, 67, 8373, 16, 2665, 774, 2421, 16, 13870, 25782, 33, 7036, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 775, 5752, 16156, 261, 3567, 67, 8373, 16, 1004, 67, 8373, 16, 2665, 774, 2421, 16, 13870, 25782, 33, 7036, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
"shareable": vdi.attributes["shareable"].value, "read_only": vdi.attributes["read_only"].value,
"sharable": bool(vdi.attributes["sharable"].value), "read_only": bool(vdi.attributes["read_only"].value),
def create_vdi(self, vdi): log(DEBUG, "create_vdi")
f299219ba026e05c81968d43a23b22a8ed9c3b22 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6195/f299219ba026e05c81968d43a23b22a8ed9c3b22/xenapi_create.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 90, 3211, 12, 2890, 16, 331, 3211, 4672, 613, 12, 9394, 16, 315, 2640, 67, 90, 3211, 7923, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 90, 3211, 12, 2890, 16, 331, 3211, 4672, 613, 12, 9394, 16, 315, 2640, 67, 90, 3211, 7923, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
return self._dispatch_cmd(handler, argv)
try: return self._dispatch_cmd(handler, argv) except KeyboardInterrupt: return self.onecmd(["KeyboardInterrupt"])
def onecmd(self, argv): if not argv: return self.emptyline() self.lastcmd = argv cmdname = self._get_canonical_cmd_name(argv[0]) if cmdname: handler = self._get_cmd_handler(cmdname) if handler: return self._dispatch_cmd(handler, argv) return self.default(argv)
a4de1f68842eab8a5a87df757010038669af74f4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10333/a4de1f68842eab8a5a87df757010038669af74f4/cmdln.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1245, 4172, 12, 2890, 16, 5261, 4672, 309, 486, 5261, 30, 327, 365, 18, 5531, 1369, 1435, 365, 18, 2722, 4172, 273, 5261, 1797, 529, 273, 365, 6315, 588, 67, 18288, 67, 4172, 67, 529, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1245, 4172, 12, 2890, 16, 5261, 4672, 309, 486, 5261, 30, 327, 365, 18, 5531, 1369, 1435, 365, 18, 2722, 4172, 273, 5261, 1797, 529, 273, 365, 6315, 588, 67, 18288, 67, 4172, 67, 529, ...
raise getopt.error, 'need exactly two args'
raise getopt.GetoptError('need exactly two args', None)
def demo(): import sys import getopt options, args = getopt.getopt(sys.argv[1:], 'r') if len(args) != 2: raise getopt.error, 'need exactly two args' dd = dircmp(args[0], args[1]) if ('-r', '') in options: dd.report_full_closure() else: dd.report()
06fec1306502af20977d3b53fd400b62850c3518 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/06fec1306502af20977d3b53fd400b62850c3518/filecmp.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 21477, 13332, 1930, 2589, 1930, 336, 3838, 702, 16, 833, 273, 336, 3838, 18, 588, 3838, 12, 9499, 18, 19485, 63, 21, 30, 6487, 296, 86, 6134, 309, 562, 12, 1968, 13, 480, 576, 30, 10...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 21477, 13332, 1930, 2589, 1930, 336, 3838, 702, 16, 833, 273, 336, 3838, 18, 588, 3838, 12, 9499, 18, 19485, 63, 21, 30, 6487, 296, 86, 6134, 309, 562, 12, 1968, 13, 480, 576, 30, 10...
"pydot","asyncore","asynchat", "reportlab", "vobject"],
"pydot","asyncore","asynchat", "reportlab", "vobject", "HTMLParser"],
def data_files(): '''Build list of data files to be installed''' files = [] if os.name == 'nt': os.chdir('bin') for (dp,dn,names) in os.walk('addons'): files.append((dp, map(lambda x: opj('bin', dp, x), names))) for (dp,dn,names) in os.walk('i18n'): files.append((dp, map(lambda x: opj('bin', dp, x), names))) os.chdir('..') for (dp,dn,names) in os.walk('doc'): files.append((dp, map(lambda x: opj(dp, x), names))) files.append(('.', [('bin/import_xml.rng')])) else: man_directory = opj('share', 'man') files.append((opj(man_directory, 'man1'), ['man/openerp-server.1'])) files.append((opj(man_directory, 'man5'), ['man/openerp_serverrc.5'])) doc_directory = opj('share', 'doc', 'openerp-server-%s' % version) files.append((doc_directory, [f for f in glob.glob('doc/*') if os.path.isfile(f)])) files.append((opj(doc_directory, 'migrate', '3.3.0-3.4.0'), [f for f in glob.glob('doc/migrate/3.3.0-3.4.0/*') if os.path.isfile(f)])) files.append((opj(doc_directory, 'migrate', '3.4.0-4.0.0'), [f for f in glob.glob('doc/migrate/3.4.0-4.0.0/*') if os.path.isfile(f)])) openerp_site_packages = opj('lib', 'python%s' % py_short_version, 'site-packages', 'openerp-server') files.append((opj(openerp_site_packages, 'i18n'), glob.glob('bin/i18n/*'))) files.append((opj(openerp_site_packages, 'addons', 'custom'), glob.glob('bin/addons/custom/*xml') + glob.glob('bin/addons/custom/*rml') + glob.glob('bin/addons/custom/*xsl'))) files.append((openerp_site_packages, [('bin/import_xml.rng')])) for addon in find_addons(): add_path = addon.replace('.', os.path.sep).replace('openerp-server', 'bin', 1) addon_path = opj('lib', 'python%s' % py_short_version, 'site-packages', add_path.replace('bin', 'openerp-server', 1)) pathfiles = [ ( addon_path, glob.glob(opj(add_path, '*xml')) + glob.glob(opj(add_path, '*csv')) + glob.glob(opj(add_path, '*sql')) ), ( opj(addon_path, 'data'), glob.glob(opj(add_path, 'data', '*xml')) ), ( opj(addon_path, 'report'), glob.glob(opj(add_path, 'report', '*xml')) + glob.glob(opj(add_path, 'report', '*rml')) + glob.glob(opj(add_path, 'report', '*sxw')) + glob.glob(opj(add_path, 'report', '*xsl')) ), ( opj(addon_path, 'security'), glob.glob(opj(add_path, 'security', '*csv')) + glob.glob(opj(add_path, 'security', '*xml')) ), ( opj(addon_path, 'rng'), glob.glob(opj(add_path, 'rng', '*rng')) ) ] files.extend(pathfiles) return files
a59436ed99b7aed0364e503f64f30419a1fb2b43 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12853/a59436ed99b7aed0364e503f64f30419a1fb2b43/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 501, 67, 2354, 13332, 9163, 3116, 666, 434, 501, 1390, 358, 506, 5876, 26418, 1390, 273, 5378, 309, 1140, 18, 529, 422, 296, 496, 4278, 1140, 18, 343, 1214, 2668, 4757, 6134, 364, 261, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 501, 67, 2354, 13332, 9163, 3116, 666, 434, 501, 1390, 358, 506, 5876, 26418, 1390, 273, 5378, 309, 1140, 18, 529, 422, 296, 496, 4278, 1140, 18, 343, 1214, 2668, 4757, 6134, 364, 261, ...
def wrap_conn (self):
def wrap_conn(self):
def wrap_conn (self): try: self.sslconn = ssl.wrap_socket(self.sock, server_side=True, certfile=self.server.certificate, ssl_version=self.server.protocol, ca_certs=self.server.cacerts, cert_reqs=self.server.certreqs, ciphers=self.server.ciphers) except ssl.SSLError: # XXX Various errors can have happened here, for example # a mismatching protocol version, an invalid certificate, # or a low-level bug. This should be made more discriminating. if self.server.chatty: handle_error("\n server: bad connection attempt from " + str(self.sock.getpeername()) + ":\n") self.close() self.running = False self.server.stop() return False else: return True
3945c867d60b1d53299799dd09b6753dcd0a9546 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8546/3945c867d60b1d53299799dd09b6753dcd0a9546/test_ssl.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2193, 67, 4646, 12, 2890, 4672, 775, 30, 365, 18, 8157, 4646, 273, 5832, 18, 4113, 67, 7814, 12, 2890, 18, 15031, 16, 1438, 67, 5564, 33, 5510, 16, 3320, 768, 33, 2890, 18, 3567, 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, 2193, 67, 4646, 12, 2890, 4672, 775, 30, 365, 18, 8157, 4646, 273, 5832, 18, 4113, 67, 7814, 12, 2890, 18, 15031, 16, 1438, 67, 5564, 33, 5510, 16, 3320, 768, 33, 2890, 18, 3567, 18,...
cmd = "xm create %s"%fn
cmd = "/usr/sbin/xm create %s"%fn
def instantiateVm(self, instance): # FIXME: this is NOT the right way to get out hostId self.hostId = instance.hostId
787afd97a19dbc056f066117a0e80a968ac780eb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5161/787afd97a19dbc056f066117a0e80a968ac780eb/xenpv.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10275, 22143, 12, 2890, 16, 791, 4672, 468, 9852, 30, 333, 353, 4269, 326, 2145, 4031, 358, 336, 596, 1479, 548, 365, 18, 2564, 548, 273, 791, 18, 2564, 548, 2, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10275, 22143, 12, 2890, 16, 791, 4672, 468, 9852, 30, 333, 353, 4269, 326, 2145, 4031, 358, 336, 596, 1479, 548, 365, 18, 2564, 548, 273, 791, 18, 2564, 548, 2, -100, -100, -100, -100,...
width=80,
width=79,
def __init__ (self, indent_increment=2, max_help_position=24, width=80, short_first=1): HelpFormatter.__init__( self, indent_increment, max_help_position, width, short_first)
4e9e7a61404ea168ffa30f5ef5203d3e0cb3d172 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/4e9e7a61404ea168ffa30f5ef5203d3e0cb3d172/optparse.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 261, 2890, 16, 3504, 67, 15016, 33, 22, 16, 943, 67, 5201, 67, 3276, 33, 3247, 16, 1835, 33, 7235, 16, 3025, 67, 3645, 33, 21, 4672, 11288, 5074, 16186, 2738, 972, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 16, 3504, 67, 15016, 33, 22, 16, 943, 67, 5201, 67, 3276, 33, 3247, 16, 1835, 33, 7235, 16, 3025, 67, 3645, 33, 21, 4672, 11288, 5074, 16186, 2738, 972, 1...
href = node['refuri'].replace('
href = node['refuri'].replace('
def visit_reference(self, node): # BUG: hash_char '#' is troublesome in LaTeX. # mbox and other environments do not like the '#'. hash_char = '\\#' if 'refuri' in node: href = node['refuri'].replace('#',hash_char) elif 'refid' in node: href = hash_char + node['refid'] elif 'refname' in node: href = hash_char + self.document.nameids[node['refname']] else: raise AssertionError('Unknown reference.') self.body.append('\\href{%s}{' % href.replace('%', '\\%')) if self._reference_label and 'refuri' not in node: self.body.append('\\%s{%s}}' % (self._reference_label, href.replace(hash_char, ''))) raise nodes.SkipNode
e8dcf1770f4ff007c4e6b16fccea67acc1d4608d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1278/e8dcf1770f4ff007c4e6b16fccea67acc1d4608d/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3757, 67, 6180, 12, 2890, 16, 756, 4672, 468, 10937, 43, 30, 1651, 67, 3001, 6501, 353, 23432, 19314, 1742, 316, 21072, 21575, 60, 18, 468, 312, 2147, 471, 1308, 15900, 741, 486, 3007, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3757, 67, 6180, 12, 2890, 16, 756, 4672, 468, 10937, 43, 30, 1651, 67, 3001, 6501, 353, 23432, 19314, 1742, 316, 21072, 21575, 60, 18, 468, 312, 2147, 471, 1308, 15900, 741, 486, 3007, ...
if len(args) != len(self.llist): raise TypeError("Wrong number of args, foo'!")
def __call__(self, *args): if len(args) != len(self.llist): raise TypeError("Wrong number of args, foo'!")
a4fd5e81870ad5263f09f53b5a0799cd6718eb97 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/a4fd5e81870ad5263f09f53b5a0799cd6718eb97/eco.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 380, 1968, 4672, 309, 562, 12, 1968, 13, 480, 562, 12, 2890, 18, 80, 1098, 4672, 1002, 3580, 2932, 13634, 1300, 434, 833, 16, 8431, 11, 4442, 13, 2, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 380, 1968, 4672, 309, 562, 12, 1968, 13, 480, 562, 12, 2890, 18, 80, 1098, 4672, 1002, 3580, 2932, 13634, 1300, 434, 833, 16, 8431, 11, 4442, 13, 2, -1...
if 'X11BASE' in os.environ: X11BASE=os.environ['X11BASE'] else: X11BASE="/no/suggested/x11dir"
X11BASE=os.environ.get('X11BASE','/no/suggested/x11dir')
def config_x11(self): print print " ============= begin play/x11 configuration ==============" print from string import replace self.fatality=0
3e57eacb3bdd4984e988078fd79531a50bce71e4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/3e57eacb3bdd4984e988078fd79531a50bce71e4/setup_xplt.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 642, 67, 92, 2499, 12, 2890, 4672, 1172, 1172, 315, 225, 422, 1432, 12275, 2376, 6599, 19, 92, 2499, 1664, 422, 14468, 6, 1172, 628, 533, 1930, 1453, 365, 18, 30709, 560, 33, 20, 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, 642, 67, 92, 2499, 12, 2890, 4672, 1172, 1172, 315, 225, 422, 1432, 12275, 2376, 6599, 19, 92, 2499, 1664, 422, 14468, 6, 1172, 628, 533, 1930, 1453, 365, 18, 30709, 560, 33, 20, 2, ...
term._titlebox.set_from_icon_name(APP_NAME + '_active_broadcast_group', gtk.ICON_SIZE_MENU)
term._titlebox.set_from_icon_name('_active_broadcast_group', gtk.ICON_SIZE_MENU)
def on_vte_focus_in(self, vte, event): for term in self.terminator.term_list: idx = self.terminator.term_list.index(term) if term != self and term._group != None and term._group == self._group: # Not active, group is not none, and in active's group if self.terminator.groupsend == 0: term._titlebox.set_foreground_color(gtk.gdk.color_parse (self.conf.title_ia_txt_color)) term._titlebox.set_background_color(gtk.gdk.color_parse (self.conf.title_ia_bg_color)) term._titlebox.set_from_icon_name(APP_NAME + '_receive_off', gtk.ICON_SIZE_MENU) else: term._titlebox.set_foreground_color(gtk.gdk.color_parse (self.conf.title_rx_txt_color)) term._titlebox.set_background_color(gtk.gdk.color_parse (self.conf.title_rx_bg_color)) term._titlebox.set_from_icon_name(APP_NAME + '_receive_on', gtk.ICON_SIZE_MENU) elif term != self and term._group == None or term._group != self._group: # Not active, group is not none, not in active's group if self.terminator.groupsend == 2: term._titlebox.set_foreground_color(gtk.gdk.color_parse (self.conf.title_rx_txt_color)) term._titlebox.set_background_color(gtk.gdk.color_parse (self.conf.title_rx_bg_color)) term._titlebox.set_from_icon_name(APP_NAME + '_receive_on', gtk.ICON_SIZE_MENU) else: term._titlebox.set_foreground_color(gtk.gdk.color_parse (self.conf.title_ia_txt_color)) term._titlebox.set_background_color(gtk.gdk.color_parse (self.conf.title_ia_bg_color)) term._titlebox.set_from_icon_name(APP_NAME + '_receive_off', gtk.ICON_SIZE_MENU) else: term._titlebox.set_foreground_color(gtk.gdk.color_parse (self.conf.title_tx_txt_color)) term._titlebox.set_background_color(gtk.gdk.color_parse (self.conf.title_tx_bg_color)) if self.terminator.groupsend == 2: term._titlebox.set_from_icon_name(APP_NAME + '_active_broadcast_all', gtk.ICON_SIZE_MENU) elif self.terminator.groupsend == 1: term._titlebox.set_from_icon_name(APP_NAME + '_active_broadcast_group', gtk.ICON_SIZE_MENU) else: term._titlebox.set_from_icon_name(APP_NAME + '_active_broadcast_off', gtk.ICON_SIZE_MENU) return
03f5ea40d449d1481bd80eb4e3e2f3005c8217dc /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1032/03f5ea40d449d1481bd80eb4e3e2f3005c8217dc/terminatorterm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 90, 736, 67, 13923, 67, 267, 12, 2890, 16, 331, 736, 16, 871, 4672, 364, 2481, 316, 365, 18, 9505, 639, 18, 6408, 67, 1098, 30, 2067, 273, 365, 18, 9505, 639, 18, 6408, 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, 603, 67, 90, 736, 67, 13923, 67, 267, 12, 2890, 16, 331, 736, 16, 871, 4672, 364, 2481, 316, 365, 18, 9505, 639, 18, 6408, 67, 1098, 30, 2067, 273, 365, 18, 9505, 639, 18, 6408, 67...
opcodes = diff2._get_opcodes(['A', 'B b'], ['A', 'B B'],
opcodes = Diff._get_opcodes(['A', 'B b'], ['A', 'B B'],
def test_case_changes(self): opcodes = diff2._get_opcodes(['A', 'B b'], ['A', 'B B'], ignore_case=0) self.assertEqual(('equal', 0, 1, 0, 1), opcodes.next()) self.assertEqual(('replace', 1, 2, 1, 2), opcodes.next())
f0e6a3afeb9f648f246fa50a5aac86386a0128b9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/f0e6a3afeb9f648f246fa50a5aac86386a0128b9/diff.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 3593, 67, 6329, 12, 2890, 4672, 1061, 7000, 273, 13008, 6315, 588, 67, 556, 7000, 12, 3292, 37, 2187, 296, 38, 324, 17337, 10228, 37, 2187, 296, 38, 605, 17337, 2305, 67, 359...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3593, 67, 6329, 12, 2890, 4672, 1061, 7000, 273, 13008, 6315, 588, 67, 556, 7000, 12, 3292, 37, 2187, 296, 38, 324, 17337, 10228, 37, 2187, 296, 38, 605, 17337, 2305, 67, 359...
return "%i-%02i-%02i 00:00:00" % (dt.year, dt.month, dt.day)
return "%i-%02i-%02i 00:00:00" % (date.year, date.month, date.day)
def date_trunc(_type, date): if _type == 'second': return date try: date = mx.DateTime.strptime(date, '%Y-%m-%d %H:%M:%S') except: return None if _type == 'year': return "%i-01-01 00:00:00" % dt.year elif _type == 'month': return "%i-%02i-01 00:00:00" % (dt.year, dt.month) elif _type == 'day': return "%i-%02i-%02i 00:00:00" % (dt.year, dt.month, dt.day)
b557f2b913375e34db813504994392fa7b97f509 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9266/b557f2b913375e34db813504994392fa7b97f509/database.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1509, 67, 23558, 24899, 723, 16, 1509, 4672, 309, 389, 723, 422, 296, 8538, 4278, 327, 1509, 775, 30, 1509, 273, 7938, 18, 5096, 18, 701, 10650, 12, 712, 16, 1995, 61, 6456, 81, 6456, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1509, 67, 23558, 24899, 723, 16, 1509, 4672, 309, 389, 723, 422, 296, 8538, 4278, 327, 1509, 775, 30, 1509, 273, 7938, 18, 5096, 18, 701, 10650, 12, 712, 16, 1995, 61, 6456, 81, 6456, ...
if not str(msg).startswith(expected): self.fail("Message %r, expected %r" % (str(msg), expected))
if test_support.check_impl_detail(): if not str(msg).startswith(expected): self.fail("Message %r, expected %r" % (str(msg), expected))
def raises(exc, expected, callable, *args): try: callable(*args) except exc, msg: if not str(msg).startswith(expected): self.fail("Message %r, expected %r" % (str(msg), expected)) else: self.fail("Expected %s" % exc)
36f4733acef5aa12ca3417779ae3f11e59199f70 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12029/36f4733acef5aa12ca3417779ae3f11e59199f70/test_descr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14183, 12, 10075, 16, 2665, 16, 4140, 16, 380, 1968, 4672, 775, 30, 4140, 30857, 1968, 13, 1335, 3533, 16, 1234, 30, 225, 309, 1842, 67, 13261, 18, 1893, 67, 11299, 67, 8992, 13332, 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, 14183, 12, 10075, 16, 2665, 16, 4140, 16, 380, 1968, 4672, 775, 30, 4140, 30857, 1968, 13, 1335, 3533, 16, 1234, 30, 225, 309, 1842, 67, 13261, 18, 1893, 67, 11299, 67, 8992, 13332, 30...
cursor.execute("SELECT * FROM profiles WHERE userid = %s" % userid)
cursor.execute("SELECT * FROM profiles WHERE userid = %s", (userid))
def getLoginName(self, cursor, userid): if userid not in self.loginNameCache: cursor.execute("SELECT * FROM profiles WHERE userid = %s" % userid) loginName = cursor.fetchall()
63f7bce156a2ed5a10227f95c07a9ae105efaf62 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/63f7bce156a2ed5a10227f95c07a9ae105efaf62/bugzilla2trac.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 25128, 461, 12, 2890, 16, 3347, 16, 6709, 4672, 309, 6709, 486, 316, 365, 18, 5819, 461, 1649, 30, 3347, 18, 8837, 2932, 4803, 380, 4571, 11788, 4852, 6709, 273, 738, 87, 3113, 261, 83...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 25128, 461, 12, 2890, 16, 3347, 16, 6709, 4672, 309, 6709, 486, 316, 365, 18, 5819, 461, 1649, 30, 3347, 18, 8837, 2932, 4803, 380, 4571, 11788, 4852, 6709, 273, 738, 87, 3113, 261, 83...
return self.extdef_for_os_function_returning_int('setpgrp')
name = 'setpgrp' if sys.platform.startswith('freebsd'): c_func = self.llexternal(name, [rffi.INT, rffi.INT], rffi.INT) def c_func_llimpl(): res = rffi.cast(rffi.LONG, c_func(0, 0)) if res == -1: raise OSError(rposix.get_errno(), "%s failed" % name) c_func_llimpl.func_name = name + '_llimpl' return extdef([], None, llimpl=c_func_llimpl, export_name='ll_os.ll_os_' + name) else: return self.extdef_for_os_function_returning_int(name)
def register_os_setpgrp(self): return self.extdef_for_os_function_returning_int('setpgrp')
68f885085ea62649ab452a26b881e1c625e87135 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6934/68f885085ea62649ab452a26b881e1c625e87135/ll_os.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1744, 67, 538, 67, 542, 84, 17532, 12, 2890, 4672, 327, 365, 18, 408, 536, 67, 1884, 67, 538, 67, 915, 67, 2463, 310, 67, 474, 2668, 542, 84, 17532, 6134, 2, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1744, 67, 538, 67, 542, 84, 17532, 12, 2890, 4672, 327, 365, 18, 408, 536, 67, 1884, 67, 538, 67, 915, 67, 2463, 310, 67, 474, 2668, 542, 84, 17532, 6134, 2, -100, -100, -100, -100, ...
self.log.warn('Failed to escape string '+key)
self.log.warn( 'Failed to escape string ' + key )
def setHeartBeatData(self,jobID,staticDataDict, dynamicDataDict): """ Add the job's heart beat data to the database """
99c1bc850ba087890925b3180df206f65bb1d4b3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/99c1bc850ba087890925b3180df206f65bb1d4b3/JobDB.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 5256, 485, 1919, 270, 751, 12, 2890, 16, 4688, 734, 16, 3845, 751, 5014, 16, 5976, 751, 5014, 4672, 3536, 1436, 326, 1719, 1807, 3904, 485, 23795, 501, 358, 326, 2063, 3536, 2, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 5256, 485, 1919, 270, 751, 12, 2890, 16, 4688, 734, 16, 3845, 751, 5014, 16, 5976, 751, 5014, 4672, 3536, 1436, 326, 1719, 1807, 3904, 485, 23795, 501, 358, 326, 2063, 3536, 2, -1...
html = """"""
html = """ <thead> <tr> <th>Stat</th> <th>Value</th> <tbody>"""
def gen_html(self, stats_xml): """ generates html snippet from xml stats """ from xml.etree.ElementTree import (ElementTree as ET, Element, SubElement, dump, XML) mapping = {'onlineAgentCount': 'Online Workers', 'offlineAgentCount': 'Offline Workers', 'totalAgentCount': 'Total Workers', 'onlineProcessorCount': 'Online CPUs', 'workingProcessorCount': 'Working CPUs', 'workingAgentPercentage': 'Working %'} # html = """ # <thead> # <tr> # <th>Online Workers</th> # <th>Offline Workers</th> # <th>Total Workers</th> # <th>Online Processors</th> # <th>Working Processors</th> # <th>Working MHz</th> # <th>Percent Working</th> # </tr> # </thead> # <tbody> # """ # html = """""" # build StringIO object tree = ET() tree.parse(StringIO(stats_xml)) root = tree.getroot() for i, elem in enumerate(root.getchildren()): if elem.tag in ('onlineAgentCount', 'offlineAgentCount', 'totalAgentCount', 'onlineProcessorCount', 'workingProcessorCount', 'workingAgentPercentage'): html += """ <tr> <td id='key'>%s</td> <td>%s</td> </tr> """ % (mapping[elem.tag], elem.text)
62bfdc6f615b331ca5296f36f6e0e17912a8ca7b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/62bfdc6f615b331ca5296f36f6e0e17912a8ca7b/web_server.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3157, 67, 2620, 12, 2890, 16, 3177, 67, 2902, 4672, 3536, 6026, 1729, 13016, 628, 2025, 3177, 225, 3536, 225, 628, 2025, 18, 31303, 18, 1046, 2471, 1930, 261, 1046, 2471, 487, 4518, 16, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3157, 67, 2620, 12, 2890, 16, 3177, 67, 2902, 4672, 3536, 6026, 1729, 13016, 628, 2025, 3177, 225, 3536, 225, 628, 2025, 18, 31303, 18, 1046, 2471, 1930, 261, 1046, 2471, 487, 4518, 16, ...
'store all intermidiate results (remove store_steps'
'store all intermediate results (remove store_steps'
def zero(p): try: use_dtype = p.type.dtype except: use_dtype = theano.config.floatX return tensor.TensorConstant(tensor.TensorType(\ dtype=use_dtype, broadcastable=[]), safe_asarray._asarray(0,dtype = use_dtype))
f2d65b5f1543549d0ee82f56a5380a255723c639 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12438/f2d65b5f1543549d0ee82f56a5380a255723c639/scan.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3634, 12, 84, 4672, 775, 30, 999, 67, 8972, 273, 293, 18, 723, 18, 8972, 1335, 30, 999, 67, 8972, 273, 326, 31922, 18, 1425, 18, 5659, 60, 327, 8171, 18, 16914, 6902, 12, 13720, 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, 3634, 12, 84, 4672, 775, 30, 999, 67, 8972, 273, 293, 18, 723, 18, 8972, 1335, 30, 999, 67, 8972, 273, 326, 31922, 18, 1425, 18, 5659, 60, 327, 8171, 18, 16914, 6902, 12, 13720, 18, ...
self.gridlayout38 = QtGui.QGridLayout(self.groupBox17) self.gridlayout38.setMargin(9) self.gridlayout38.setSpacing(6) self.gridlayout38.setObjectName("gridlayout38")
self.gridlayout34 = QtGui.QGridLayout(self.groupBox17) self.gridlayout34.setMargin(9) self.gridlayout34.setSpacing(6) self.gridlayout34.setObjectName("gridlayout34")
def setupUi(self, UserPrefsDialog): UserPrefsDialog.setObjectName("UserPrefsDialog") UserPrefsDialog.resize(QtCore.QSize(QtCore.QRect(0,0,917,661).size()).expandedTo(UserPrefsDialog.minimumSizeHint()))
752b48c67dcf97437d2cb83fa267b09487665da0 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11221/752b48c67dcf97437d2cb83fa267b09487665da0/UserPrefsDialog.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 13943, 12, 2890, 16, 2177, 1386, 2556, 6353, 4672, 2177, 1386, 2556, 6353, 18, 542, 16707, 2932, 1299, 1386, 2556, 6353, 7923, 2177, 1386, 2556, 6353, 18, 15169, 12, 23310, 4670, 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, 3875, 13943, 12, 2890, 16, 2177, 1386, 2556, 6353, 4672, 2177, 1386, 2556, 6353, 18, 542, 16707, 2932, 1299, 1386, 2556, 6353, 7923, 2177, 1386, 2556, 6353, 18, 15169, 12, 23310, 4670, 18,...
self.majorVersion = parts[0] self.minorVersion = parts[1]
self.majorVersion = int(parts[0]) self.minorVersion = int(parts[1])
def __init__(self, command, version): Vendor.__init__(self, 'gcc', version, command, '.o') parts = version.split('.') self.majorVersion = parts[0] self.minorVersion = parts[1]
5f19f0532c2e73a38922e727a4f248c24f7d01cc /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7493/5f19f0532c2e73a38922e727a4f248c24f7d01cc/cpp.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1296, 16, 1177, 4672, 776, 5227, 16186, 2738, 972, 12, 2890, 16, 296, 75, 952, 2187, 1177, 16, 1296, 16, 2418, 83, 6134, 2140, 273, 1177, 18, 4939, 2668,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1296, 16, 1177, 4672, 776, 5227, 16186, 2738, 972, 12, 2890, 16, 296, 75, 952, 2187, 1177, 16, 1296, 16, 2418, 83, 6134, 2140, 273, 1177, 18, 4939, 2668,...
self.error(row + 2, 1, ERROR_TIMETABLE_MODEL)
self.error(row + 3, 1, ERROR_TIMETABLE_MODEL)
def import_school_timetable(self, sh, row): num_errors = len(self.errors) data = {} data['title'] = self.getRequiredTextFromCell(sh, row, 1) data['__name__'] = self.getRequiredTextFromCell(sh, row+1, 1) data['school_year'] = self.getRequiredTextFromCell(sh, row+2, 1) data['model'] = self.getRequiredTextFromCell(sh, row+3, 1) if num_errors < len(self.errors): return
48da1590ea5d360d59116b4b1dfa5088bb935dd9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7127/48da1590ea5d360d59116b4b1dfa5088bb935dd9/importer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1930, 67, 28204, 1371, 67, 8584, 278, 429, 12, 2890, 16, 699, 16, 1027, 4672, 818, 67, 4324, 273, 562, 12, 2890, 18, 4324, 13, 501, 273, 2618, 501, 3292, 2649, 3546, 273, 365, 18, 58...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1930, 67, 28204, 1371, 67, 8584, 278, 429, 12, 2890, 16, 699, 16, 1027, 4672, 818, 67, 4324, 273, 562, 12, 2890, 18, 4324, 13, 501, 273, 2618, 501, 3292, 2649, 3546, 273, 365, 18, 58...
roundtrip(suite, open(filename).read())
roundtrip(parser.suite, open(filename).read())
def roundtrip_fromfile(filename): roundtrip(suite, open(filename).read())
cf2a4ce35af64d007368c63c4fe081ac90fe06bf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/cf2a4ce35af64d007368c63c4fe081ac90fe06bf/test_parser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3643, 25125, 67, 2080, 768, 12, 3459, 4672, 3643, 25125, 12, 4288, 18, 30676, 16, 1696, 12, 3459, 2934, 896, 10756, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3643, 25125, 67, 2080, 768, 12, 3459, 4672, 3643, 25125, 12, 4288, 18, 30676, 16, 1696, 12, 3459, 2934, 896, 10756, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
return gettext.get_lang(core.Language.objects.get(code=accept_lang))
lang_obj = get_lang_obj(accept_lang) return gettext.get_lang(lang_obj)
def get_lang_from_http_header(request): """If the user's browser sends a list of preferred languages in the HTTP_ACCEPT_LANGUAGE header, parse it into a list. Then walk through the list, and for each entry, we check whether we have a matching pootle translation project. If so, we return it. If nothing is found, return None.""" accept = request.META.get('HTTP_ACCEPT_LANGUAGE', '') for accept_lang, unused in trans_real.parse_accept_lang_header(accept): if accept_lang == '*': return gettext.get_default_translation() # TODO: This will fail for language codes such as af-ZA. # We should split such codes into two components # ('af' and 'ZA') and also check whether we have # a project matching the first component ('af'). try: return gettext.get_lang(core.Language.objects.get(code=accept_lang)) except core.Language.DoesNotExist: pass except core.Project.DoesNotExist: pass return None
0cd5525b991b466e0881b015a5ac741e1060120a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11388/0cd5525b991b466e0881b015a5ac741e1060120a/user_lang_discovery.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 4936, 67, 2080, 67, 2505, 67, 3374, 12, 2293, 4672, 3536, 2047, 326, 729, 1807, 4748, 9573, 279, 666, 434, 9119, 8191, 316, 326, 2239, 67, 21417, 67, 15547, 1446, 16, 1109, 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, 336, 67, 4936, 67, 2080, 67, 2505, 67, 3374, 12, 2293, 4672, 3536, 2047, 326, 729, 1807, 4748, 9573, 279, 666, 434, 9119, 8191, 316, 326, 2239, 67, 21417, 67, 15547, 1446, 16, 1109, 51...
if (lfcPerm['DN'] in clientInfo['AllDNs']): if groupMatch:
if ( lfcPerm['DN'] in clientInfo['AllDNs'] ): if groupMatch:
def __verifyOperationPermission(self,path): res = self.__getClientCertInfo() if not res['OK']: if res['Message'] == "Can't find a valid proxy": return S_OK(True) return res clientInfo = res['Value']
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, 1001, 8705, 2988, 5041, 12, 2890, 16, 803, 4672, 400, 273, 365, 16186, 588, 1227, 5461, 966, 1435, 309, 486, 400, 3292, 3141, 3546, 30, 309, 400, 3292, 1079, 3546, 422, 315, 2568, 1404, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 8705, 2988, 5041, 12, 2890, 16, 803, 4672, 400, 273, 365, 16186, 588, 1227, 5461, 966, 1435, 309, 486, 400, 3292, 3141, 3546, 30, 309, 400, 3292, 1079, 3546, 422, 315, 2568, 1404, ...
- ``prec`` - precision, default: None. Providing a precision can
- ``prec`` - precision, default: ``None``. Providing a precision can
def wigner_9j(j_1, j_2, j_3, j_4, j_5, j_6, j_7, j_8, j_9, prec=None): r""" Calculate the Wigner 9j symbol `Wigner9j(j_1,j_2,j_3,j_4,j_5,j_6,j_7,j_8,j_9)`. INPUT: - ``j_1``, ..., ``j_9`` - integer or half integer - ``prec`` - precision, default: None. Providing a precision can drastically speed up the calculation. OUTPUT: rational number times the square root of a rational number (if prec=None), or real number if a precision is given EXAMPLES: A couple of examples and test cases, note that for speed reasons a precision is given:: sage: wigner_9j(1,1,1, 1,1,1, 1,1,0 ,prec=64) # ==1/18 0.0555555555555555555 sage: wigner_9j(1,1,1, 1,1,1, 1,1,1) 0 sage: wigner_9j(1,1,1, 1,1,1, 1,1,2 ,prec=64) # ==1/18 0.0555555555555555556 sage: wigner_9j(1,2,1, 2,2,2, 1,2,1 ,prec=64) # ==-1/150 -0.00666666666666666667 sage: wigner_9j(3,3,2, 2,2,2, 3,3,2 ,prec=64) # ==157/14700 0.0106802721088435374 sage: wigner_9j(3,3,2, 3,3,2, 3,3,2 ,prec=64) # ==3221*sqrt(70)/(246960*sqrt(105)) - 365/(3528*sqrt(70)*sqrt(105)) 0.00944247746651111739 sage: wigner_9j(3,3,1, 3.5,3.5,2, 3.5,3.5,1 ,prec=64) # ==3221*sqrt(70)/(246960*sqrt(105)) - 365/(3528*sqrt(70)*sqrt(105)) 0.0110216678544351364 sage: wigner_9j(100,80,50, 50,100,70, 60,50,100 ,prec=1000)*1.0 1.05597798065761e-7 sage: wigner_9j(30,30,10, 30.5,30.5,20, 30.5,30.5,10 ,prec=1000)*1.0 # ==(80944680186359968990/95103769817469)*sqrt(1/682288158959699477295) 0.0000325841699408828 sage: wigner_9j(64,62.5,114.5, 61.5,61,112.5, 113.5,110.5,60, prec=1000)*1.0 -3.41407910055520e-39 sage: wigner_9j(15,15,15, 15,3,15, 15,18,10, prec=1000)*1.0 -0.0000778324615309539 sage: wigner_9j(1.5,1,1.5, 1,1,1, 1.5,1,1.5) 0 It is an error to have arguments that are not integer or half integer values or do not fulfil the triangle relation:: sage: wigner_9j(0.5,0.5,0.5, 0.5,0.5,0.5, 0.5,0.5,0.5,prec=64) Traceback (most recent call last): ... ValueError: j values must be integer or half integer and fulfil the triangle relation sage: wigner_9j(1,1,1, 0.5,1,1.5, 0.5,1,2.5,prec=64) Traceback (most recent call last): ... ValueError: j values must be integer or half integer and fulfil the triangle relation ALGORITHM: This function uses the algorithm of [Edmonds74] to calculate the value of the 3j symbol exactly. Note that the formula contains alternating sums over large factorials and is therefore unsuitable for finite precision arithmetic and only useful for a computer algebra system [Rasch03]. REFERENCES: - [Edmonds74] 'Angular Momentum in Quantum Mechanics', A. R. Edmonds, Princeton University Press (1974) - [Rasch03] 'Efficient Storage Scheme for Pre-calculated Wigner 3j, 6j and Gaunt Coefficients', J. Rasch and A. C. H. Yu, SIAM J. Sci. Comput. Volume 25, Issue 4, pp. 1416-1428 (2003) """ imin = 0 imax = min(j_1 + j_9, j_2 + j_6, j_4 + j_8) sumres = 0 for kk in range(imin, imax + 1): sumres = sumres + (2 * kk + 1) * \ racah(j_1, j_2, j_9, j_6, j_3, kk, prec) * \ racah(j_4, j_6, j_8, j_2, j_5, kk, prec) * \ racah(j_1, j_4, j_9, j_8, j_7, kk, prec) return sumres
c6a90d820f57455b2ff6063db98cb5e6f7a11f83 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/c6a90d820f57455b2ff6063db98cb5e6f7a11f83/wigner.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 341, 724, 264, 67, 29, 78, 12, 78, 67, 21, 16, 525, 67, 22, 16, 525, 67, 23, 16, 525, 67, 24, 16, 525, 67, 25, 16, 525, 67, 26, 16, 525, 67, 27, 16, 525, 67, 28, 16, 525, 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, 341, 724, 264, 67, 29, 78, 12, 78, 67, 21, 16, 525, 67, 22, 16, 525, 67, 23, 16, 525, 67, 24, 16, 525, 67, 25, 16, 525, 67, 26, 16, 525, 67, 27, 16, 525, 67, 28, 16, 525, 6...
if abs(wx-0.25) > 1.0E-5 or abs(wy-0.45) > 1.0E-5:
if abs(wx-0.5*(xmin+xmax)) > 1.0E-5 or abs(wy-0.5*(ymin+ymax)) > 1.0E-5:
def main(): # Test if device initialization screwed around with the preset # compression parameter. compression2 = plgcompression() sys.stdout.write("Output various PLplot parameters\n") sys.stdout.write("compression parameter = %d\n" % compression2) if compression2 != compression1: sys.stderr.write("plgcompression test failed\n") plend() sys.exit(1) # Test if device initialization screwed around with any of the # preset familying values. (fam2, num2, bmax2) = plgfam() sys.stdout.write("family parameters: fam, num, bmax = %d %d %d\n" % (fam2, num2, bmax2)) if fam2 != fam1 or num2 != num1 or bmax2 != bmax1: sys.stderr.write("plgfam test failed\n") plend() sys.exit(1) # Test if device initialization screwed around with any of the # preset page values. (xp2, yp2, xleng2, yleng2, xoff2, yoff2) = plgpage() sys.stdout.write("page parameters: xp, yp, xleng, yleng, xoff, yoff = %f %f %d %d %d %d\n" % (xp2, yp2, xleng2, yleng2, xoff2, yoff2)) if xp2 != xp1 or yp2 != yp1 or xleng2 != xleng1 or yleng2 != yleng1 or xoff2 != xoff1 or yoff2 != yoff1: sys.stderr.write("plgpage test failed\n") plend() sys.exit(1) # Exercise plscolor, plscol0, plscmap1, and plscmap1a to make sure # they work without any obvious error messages. plscolor(1) plscol0(1, 255, 0, 0) r1 = [0, 255] g1 = [255, 0] b1 = [0, 0] a1 = [1.0, 1.0] plscmap1(r1,g1,b1) plscmap1a(r1,g1,b1,a1) level2 = plglevel() sys.stdout.write("level parameter = %d\n" % level2) if level2 != 1: sys.stderr.write("plglevel test failed.\n") plend(); sys.exit(1); pladv(0) plvpor(0.01, 0.99, 0.02, 0.49) (xmin, xmax, ymin, ymax) = plgvpd() sys.stdout.write("plvpor: xmin, xmax, ymin, ymax = %f %f %f %f \n" % (xmin, xmax, ymin, ymax)) if xmin != 0.01 or xmax != 0.99 or ymin != 0.02 or ymax != 0.49: sys.stderr.write("plgvpd test failed\n") plend() sys.exit(1) plwind(0.2, 0.3, 0.4, 0.5) (xmin, xmax, ymin, ymax) = plgvpw() sys.stdout.write("plwind: xmin, xmax, ymin, ymax = %f %f %f %f \n" % (xmin, xmax, ymin, ymax)) if xmin != 0.2 or xmax != 0.3 or ymin != 0.4 or ymax != 0.5: sys.stderr.write("plgvpw test failed\n") plend() sys.exit(1) # Get world coordinates for 0.5,0.5 which is in the middle of # the window. (wx, wy, win) = plcalc_world(0.5,0.5) sys.stdout.write("world parameters: wx, wy, win = %f %f %d \n" % (wx, wy, win)) if abs(wx-0.25) > 1.0E-5 or abs(wy-0.45) > 1.0E-5: sys.stderr.write("plcalc_world test failed\n") # Temporary comment out because this test always fails for some # reason which is still being investigated. #plend() #sys.exit(1) # Retrieve and print the name of the output file (if any) fnam = plgfnam() sys.stdout.write("Output file name is %s\n" % fnam) # Set and get the number of digits used to display axis labels # Note digits is currently ignored in pls[xyz]ax and # therefore it does not make sense to test the returned value. plsxax(3,0) (digmax, digits) = plgxax() sys.stdout.write("x axis parameters: digmax, digits = %d %d \n" % (digmax, digits)) if digmax != 3: sys.stderr.write("plgxax test failed\n") plend() sys.exit(1) plsyax(4,0) (digmax, digits) = plgyax() sys.stdout.write("y axis parameters: digmax, digits = %d %d \n" % (digmax, digits)) if digmax != 4: sys.stderr.write("plgyax test failed\n") plend() sys.exit(1) plszax(5,0) (digmax, digits) = plgzax() sys.stdout.write("z axis parameters: digmax, digits = %d %d \n" % (digmax, digits)) if digmax != 5: sys.stderr.write("plgzax test failed\n") plend() sys.exit(1) plsdidev(0.05, PL_NOTSET, 10.0, 20.0) (mar, aspect, jx, jy) = plgdidev() sys.stdout.write("device-space window parameters: mar, aspect, jx, jy = %f %f %f %f \n" % (mar, aspect, jx, jy)) if mar != 0.05 or jx != 10.0 or jy != 20.0: sys.stderr.write("plgdidev test failed\n") # Temporary comment out because this test always fails for some # reason which is still being investigated. #plend() #sys.exit(1) plsdiori(1.0) ori = plgdiori() sys.stdout.write("ori parameter = %f \n" % ori) if ori != 1.0 : sys.stderr.write("plgdiori test failed\n") plend() sys.exit(1) plsdiplt(0.1, 0.2, 0.9, 0.8) (xmin, ymin, xmax, ymax) = plgdiplt() sys.stdout.write("plot-space window parameters: xmin, ymin, xmax, ymax = %f %f %f %f \n" % (xmin, ymin, xmax, ymax)) if xmin != 0.1 or xmax != 0.9 or ymin != 0.2 or ymax != 0.8: sys.stderr.write("plgdiplt test failed\n") plend() sys.exit(1) plsdiplz(0.1, 0.1, 0.9, 0.9) (zxmin, zymin, zxmax, zymax) = plgdiplt() sys.stdout.write("zoomed plot-space window parameters: xmin, ymin, xmax, ymax = %f %f %f %f \n" % (zxmin, zymin, zxmax, zymax)) if zxmin != xmin+(xmax-xmin)*0.1 or zxmax != xmin+(xmax-xmin)*0.9 or zymin != ymin+(ymax-ymin)*0.1 or zymax != ymin+(ymax-ymin)*0.9: sys.stderr.write("plsdiplz test failed\n") plend() sys.exit(1) plscolbg(10,20,30) (r, g, b) = plgcolbg() sys.stdout.write("background colour parameters: r, g, b = %d %d %d \n" % (r, g, b)) if r != 10 or g != 20 or b != 30: sys.stderr.write("plgcolbg test failed\n") plend() sys.exit(1) plscolbga(20, 30, 40, 0.5) (r, g, b, a) = plgcolbga() sys.stdout.write("background/transparency colour parameters: r, g, b, a = %d %d %d %f \n" % (r, g, b, a)) if r != 20 or g != 30 or b != 40 or a != 0.5: sys.stderr.write("plgcolbga test failed\n") plend() sys.exit(1) # Restore defaults #plcol0(1)
eca0d8caa9b346bfbf211d43603b21cd30e6a6dc /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2933/eca0d8caa9b346bfbf211d43603b21cd30e6a6dc/xw31.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 225, 468, 7766, 309, 2346, 10313, 888, 16052, 329, 6740, 598, 326, 12313, 468, 9154, 1569, 18, 9154, 22, 273, 886, 75, 23766, 1435, 2589, 18, 10283, 18, 2626, 2932, 1447, 11...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 225, 468, 7766, 309, 2346, 10313, 888, 16052, 329, 6740, 598, 326, 12313, 468, 9154, 1569, 18, 9154, 22, 273, 886, 75, 23766, 1435, 2589, 18, 10283, 18, 2626, 2932, 1447, 11...
self.fd = open(self.logfile, 'w+')
self.fd = open(self.logfile, 'a+')
def __init__(self, options): self.verbose = options.verbose self.logfile = options.logfile if self.logfile: self.fd = open(self.logfile, 'w+')
c19ca9e4b9959cb9a24640d98ee7a852eaeeb02a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7261/c19ca9e4b9959cb9a24640d98ee7a852eaeeb02a/crash_logger.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 702, 4672, 365, 18, 11369, 273, 702, 18, 11369, 365, 18, 28806, 273, 702, 18, 28806, 309, 365, 18, 28806, 30, 365, 18, 8313, 273, 1696, 12, 2890, 18, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 702, 4672, 365, 18, 11369, 273, 702, 18, 11369, 365, 18, 28806, 273, 702, 18, 28806, 309, 365, 18, 28806, 30, 365, 18, 8313, 273, 1696, 12, 2890, 18, 2...
return device["info.product"]
return device["pci.subsys_vendor"]
def _get_device_name(self, device):
47fab57a6729659d98af499e8f13a43a74eb5416 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11281/47fab57a6729659d98af499e8f13a43a74eb5416/network_tray.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 5964, 67, 529, 12, 2890, 16, 2346, 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, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 5964, 67, 529, 12, 2890, 16, 2346, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
def longtitude(self):
def longitude(self):
def longtitude(self): "(float) Get the longtitude value of the geo-tag. See also .location()" lat, lon = self.location() return lon
c1aac4ac97f51905783a45e0e6a75cb6a4106ed8 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10620/c1aac4ac97f51905783a45e0e6a75cb6a4106ed8/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9192, 12, 2890, 4672, 7751, 5659, 13, 968, 326, 1525, 88, 3540, 460, 434, 326, 7856, 17, 2692, 18, 2164, 2546, 263, 3562, 10031, 2516, 16, 4281, 273, 365, 18, 3562, 1435, 327, 4281, 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, 9192, 12, 2890, 4672, 7751, 5659, 13, 968, 326, 1525, 88, 3540, 460, 434, 326, 7856, 17, 2692, 18, 2164, 2546, 263, 3562, 10031, 2516, 16, 4281, 273, 365, 18, 3562, 1435, 327, 4281, 2,...
def info(msg): if verbose: sys.stderr.write('info: ' + str(msg) + '\n') def warn(msg): sys.stderr.write('warning: ' + str(msg) + '\n') def error(msg): sys.exit('error: ' + str(msg)) class Configuration: def __init__(self, cfiles): self.__IMAPHOST = 'imapserver' self.__IMAPPORT = 'imapport' self.__IMAPUSER = 'imapuser' self.__IMAPPASSWORD = 'imappassword' self.__IMAPFILTER = 'imapfilter' self.__IMAPSSL = 'imapssl' self.__MAILDIR = 'maildir' self.__cparser = ConfigParser.ConfigParser() if type(cfiles) != types.ListType: cfiles = [cfiles] def expand_user(path): return os.path.expanduser(path) self.__cparser.read(map(expand_user, cfiles)) def get_accounts(self): """Return list of all accounts. """ return self.__cparser.sections() def get_host(self, account): """Return imap host. """ try: return self.__cparser.get(account, self.__IMAPHOST) except: error('host for account %s not configured!' % account) def get_port(self, account): """Return optional imap port. default return value: 993 """ try: return int(self.__cparser.get(account, self.__IMAPPORT)) except: return 993 def get_username(self, account): """Return imap username. """ try: return self.__cparser.get(account, self.__IMAPUSER) except: error('username for account %s not configured!' % account) def get_password(self, account): """Return imap password. """ try: return self.__cparser.get(account, self.__IMAPPASSWORD) except: error('password for account %s not configured!' % account) def get_maildir(self, account): """Return maildir path. """ try: return self.__cparser.get(account, self.__MAILDIR) except: error('maildir for account %s not configured!' % account) def get_imapfilter(self, account): """Return optional imap filter string. default return value: None """ try: return self.__cparser.get(account, self.__IMAPFILTER) except: return None def use_imapssl(self, account): """Return True or False for optional parameter 'imapssl'. default return value: True """ try: if str.lower(self.__cparser.get(account, self.__IMAPSSL)) == 'false': return False else: return True except: return True
class Log: def __call__(self): return self def __init__(self): self.__logger = logging.getLogger('imapbackup') self.__formatter = logging.Formatter('%(asctime)s %(message)s') self.__handlers = [] def __add_handler(self, handler): self.__logger.addHandler(handler) self.__handlers.append(handler) def set_log_level(self, mode): """Set the logging level. Use logger.INFO, logger.WARN, logger.ERROR, ... """ self.__logger.setLevel(mode) def remove_all_handlers(self): """Remove all registered log handlers. """ for h in self.__handlers: self.__logger.removeHandler(h) self.__handlers = [] def log_to_file(self, fname, exclusive=False): """Make the logger to log to a file. If the parameter 'exclusive' is True, than all other log handlers are removed. """ if fname not in (''): if exclusive: self.remove_all_handlers() handler = logging.FileHandler(os.path.expanduser(fname)) handler.setFormatter(self.__formatter) self.__add_handler(handler) def log_to_syslog(self, exclusive=False): """Make the logger to log to syslog. If the parameter 'exclusive' is True, than all other log handlers are removed. """ if exclusive: self.remove_all_handlers() handler = logging.handlers.SysLogHandler() handler.setFormatter(self.__formatter) self.__add_handler(handler) def debug(self, msg): self.__logger.debug(msg) def info(self, msg): self.__logger.info(msg) def warn(self, msg): self.__logger.warn(msg) def error(self, msg): self.__logger.error(msg) def critical(self, msg): self.__logger.critical(msg) sys.exit() Log = Log()
def info(msg): if verbose: sys.stderr.write('info: ' + str(msg) + '\n')
37e720541da9eb3d7c758e4ba3bba9e24328637d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2245/37e720541da9eb3d7c758e4ba3bba9e24328637d/imapbackup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1123, 12, 3576, 4672, 309, 3988, 30, 2589, 18, 11241, 18, 2626, 2668, 1376, 30, 296, 397, 609, 12, 3576, 13, 397, 2337, 82, 6134, 225, 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, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1123, 12, 3576, 4672, 309, 3988, 30, 2589, 18, 11241, 18, 2626, 2668, 1376, 30, 296, 397, 609, 12, 3576, 13, 397, 2337, 82, 6134, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100...
debug("starting f")
debug("starting a DebugMode call")
def f(): debug("starting f") for x in no_recycling: x[0] = None
eb53591765096ad2bc502d432f6b4532fdb1f6c3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12438/eb53591765096ad2bc502d432f6b4532fdb1f6c3/debugmode.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 284, 13332, 1198, 2932, 18526, 279, 4015, 2309, 745, 7923, 364, 619, 316, 1158, 67, 266, 2431, 830, 310, 30, 619, 63, 20, 65, 273, 599, 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, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 284, 13332, 1198, 2932, 18526, 279, 4015, 2309, 745, 7923, 364, 619, 316, 1158, 67, 266, 2431, 830, 310, 30, 619, 63, 20, 65, 273, 599, 2, -100, -100, -100, -100, -100, -100, -100, -10...
self.log.info( "== Processing job %s == " % jobId )
self.log.info( "== Processing job %s == " % jobId )
def execute( self ): #Get jobs from DB result = self.jobDB.selectJobs( { 'Status': self.__jobStates } ) if not result[ 'OK' ]: gLogger.error( "Cannot retrieve jobs in states %s" % self.__jobStates ) return result jobsList = result[ 'Value' ] for i in range( len( jobsList ) ): jobsList[i] = int( jobsList[i] ) jobsList.sort() self.log.info( "Got %s jobs for this iteration" % len( jobsList ) ) if not jobsList: return S_OK() #Check jobs that are already being optimized newJobsList = self._optimizingJobs.addJobs( jobsList ) if not newJobsList: return S_OK() #Get attrs of jobs to be optimized result = self.jobDB.getAttributesForJobList( newJobsList ) if not result[ 'OK' ]: gLogger.error( "Cannot retrieve attributes for %s jobs %s" % len( newJobsList ) ) return result jobsToProcess = result[ 'Value' ] for jobId in jobsToProcess: self.log.info( "== Processing job %s == " % jobId ) jobAttrs = jobsToProcess[ jobId ] result = self.__dispatchJob( jobId, jobAttrs, False ) if not result[ 'OK' ]: gLogger.error( "There was a problem optimizing job", "JID %s: %s" % ( jobId, result[ 'Message' ] ) ) return S_OK()
76604cb547c24d2712e0393bdd8c3d7348989097 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/76604cb547c24d2712e0393bdd8c3d7348989097/ThreadedMightyOptimizer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1836, 12, 365, 262, 30, 468, 967, 6550, 628, 2383, 563, 273, 365, 18, 4688, 2290, 18, 4025, 7276, 12, 225, 288, 296, 1482, 4278, 365, 16186, 4688, 7629, 225, 289, 262, 309, 486, 563, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 365, 262, 30, 468, 967, 6550, 628, 2383, 563, 273, 365, 18, 4688, 2290, 18, 4025, 7276, 12, 225, 288, 296, 1482, 4278, 365, 16186, 4688, 7629, 225, 289, 262, 309, 486, 563, ...
cursor.execute('LOCK TABLE ir_sequence')
cursor.execute('LOCK TABLE "' + self._table + '"')
def get_id(self, cursor, user, sequence_id, test='id=%s', context=None): cursor.execute('LOCK TABLE ir_sequence') return super(SequenceStrict, self).get_id(cursor, user, sequence_id, test=test, context=context)
d2b5a3b79854eba80a6d70ee54965cd4f92d6491 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9266/d2b5a3b79854eba80a6d70ee54965cd4f92d6491/sequence.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 350, 12, 2890, 16, 3347, 16, 729, 16, 3102, 67, 350, 16, 1842, 2218, 350, 5095, 87, 2187, 819, 33, 7036, 4672, 3347, 18, 8837, 2668, 6589, 7567, 2491, 397, 365, 6315, 2121, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 350, 12, 2890, 16, 3347, 16, 729, 16, 3102, 67, 350, 16, 1842, 2218, 350, 5095, 87, 2187, 819, 33, 7036, 4672, 3347, 18, 8837, 2668, 6589, 7567, 2491, 397, 365, 6315, 2121, ...
'account_id': a,
'account_id': account_id,
def action_invoice_create(self, cr, uid, ids, group=False, context=None): """ Creates invoice(s) for repair order. @param group: It is set to true when group invoice is to be generated. @return: Invoice Ids. """ res = {} invoices_group = {} inv_line_obj = self.pool.get('account.invoice.line') inv_obj = self.pool.get('account.invoice') repair_line_obj = self.pool.get('mrp.repair.line') repair_fee_obj = self.pool.get('mrp.repair.fee') for repair in self.browse(cr, uid, ids, context=context): res[repair.id] = False if repair.state in ('draft','cancel') or repair.invoice_id: continue if not (repair.partner_id.id and repair.partner_invoice_id.id): raise osv.except_osv(_('No partner !'),_('You have to select a Partner Invoice Address in the repair form !')) comment = repair.quotation_notes if (repair.invoice_method != 'none'): if group and repair.partner_invoice_id.id in invoices_group: inv_id = invoices_group[repair.partner_invoice_id.id] invoice = inv_obj.browse(cr, uid, inv_id) invoice_vals = { 'name': invoice.name +', '+repair.name, 'origin': invoice.origin+', '+repair.name, 'comment':(comment and (invoice.comment and invoice.comment+"\n"+comment or comment)) or (invoice.comment and invoice.comment or ''), } inv_obj.write(cr, uid, [inv_id], invoice_vals, context=context) else: if not repair.partner_id.property_account_receivable: raise osv.except_osv(_('Error !'), _('No account defined for partner "%s".') % repair.partner_id.name ) account_id = repair.partner_id.property_account_receivable.id inv = { 'name': repair.name, 'origin':repair.name, 'type': 'out_invoice', 'account_id': account_id, 'partner_id': repair.partner_id.id, 'address_invoice_id': repair.address_id.id, 'currency_id': repair.pricelist_id.currency_id.id, 'comment': repair.quotation_notes, 'fiscal_position': repair.partner_id.property_account_position.id } inv_id = inv_obj.create(cr, uid, inv) invoices_group[repair.partner_invoice_id.id] = inv_id self.write(cr, uid, repair.id, {'invoiced': True, 'invoice_id': inv_id})
8ee7af483dc8860e76ca1e7c8fb3e4cbb01f0bed /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/8ee7af483dc8860e76ca1e7c8fb3e4cbb01f0bed/mrp_repair.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1301, 67, 16119, 67, 2640, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 1041, 33, 8381, 16, 819, 33, 7036, 4672, 3536, 10210, 9179, 12, 87, 13, 364, 20994, 1353, 18, 632, 891, 1041, 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, 1301, 67, 16119, 67, 2640, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 1041, 33, 8381, 16, 819, 33, 7036, 4672, 3536, 10210, 9179, 12, 87, 13, 364, 20994, 1353, 18, 632, 891, 1041, 3...
base_elements = [ base_iter.next() ]
def __iter__(self): """ EXAMPLES: sage: MS = MatrixSpace(GF(2),2) sage: a = list(MS) sage: len(a) 16 sage: a[0] [0 0] [0 0]
de8285019206ca92837bb1f94cd33f51c3b07d22 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/de8285019206ca92837bb1f94cd33f51c3b07d22/matrix_space.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2165, 972, 12, 2890, 4672, 3536, 5675, 8900, 11386, 30, 272, 410, 30, 9238, 273, 7298, 3819, 12, 43, 42, 12, 22, 3631, 22, 13, 272, 410, 30, 279, 273, 666, 12, 3537, 13, 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, 1001, 2165, 972, 12, 2890, 4672, 3536, 5675, 8900, 11386, 30, 272, 410, 30, 9238, 273, 7298, 3819, 12, 43, 42, 12, 22, 3631, 22, 13, 272, 410, 30, 279, 273, 666, 12, 3537, 13, 272, ...
if not self._graph.is_tree(): raise RuntimeError("Cannot use tree layout on this graph: self.is_tree() returns False.") n = self._graph.order()
n = len(self._nodelist)
def set_pos(self): """ Sets the position plotting parameters for this GraphPlot. EXAMPLES: This function is called implicitly by the code below: sage: g = Graph({0:[1,2], 2:[3], 4:[0,1]}) sage: g.graphplot(save_pos=True, layout='circular') GraphPlot object for Graph on 5 vertices
370b7a5eaf23c26fe84819ffd9a1c767d14c7d8b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/370b7a5eaf23c26fe84819ffd9a1c767d14c7d8b/graph_plot.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 917, 12, 2890, 4672, 3536, 11511, 326, 1754, 20947, 1472, 364, 333, 5601, 11532, 18, 225, 5675, 8900, 11386, 30, 1220, 445, 353, 2566, 24682, 635, 326, 981, 5712, 30, 272, 410, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 444, 67, 917, 12, 2890, 4672, 3536, 11511, 326, 1754, 20947, 1472, 364, 333, 5601, 11532, 18, 225, 5675, 8900, 11386, 30, 1220, 445, 353, 2566, 24682, 635, 326, 981, 5712, 30, 272, 410, ...
def fl_get_counter_bounds(ob, min, max): """ fl_get_counter_bounds(ob, min, max) """ _fl_get_counter_bounds(ob, min, max)
def fl_get_counter_bounds(pObject, min_bound, max_bound): """ fl_get_counter_bounds(pObject, min_bound, max_bound) """ _fl_get_counter_bounds(pObject, min_bound, max_bound)
def fl_get_counter_bounds(ob, min, max): """ fl_get_counter_bounds(ob, min, max) """ _fl_get_counter_bounds(ob, min, max)
9942dac8ce2b35a1e43615a26fd8e7054ef805d3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2429/9942dac8ce2b35a1e43615a26fd8e7054ef805d3/xformslib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1183, 67, 588, 67, 7476, 67, 10576, 12, 84, 921, 16, 1131, 67, 3653, 16, 943, 67, 3653, 4672, 3536, 1183, 67, 588, 67, 7476, 67, 10576, 12, 84, 921, 16, 1131, 67, 3653, 16, 943, 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, 1183, 67, 588, 67, 7476, 67, 10576, 12, 84, 921, 16, 1131, 67, 3653, 16, 943, 67, 3653, 4672, 3536, 1183, 67, 588, 67, 7476, 67, 10576, 12, 84, 921, 16, 1131, 67, 3653, 16, 943, 67...
self.assertEqual(all[1], (sub2_path, ["link"], ["tmp3"]))
self.assertEqual(all[1], sub2_tree)
def test_traversal(self): import os from os.path import join
bdae60942f53ae9ccd2a45cbf2f4b752564aedde /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8125/bdae60942f53ae9ccd2a45cbf2f4b752564aedde/test_os.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 31750, 287, 12, 2890, 4672, 1930, 1140, 628, 1140, 18, 803, 1930, 1233, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 31750, 287, 12, 2890, 4672, 1930, 1140, 628, 1140, 18, 803, 1930, 1233, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
instance._p_changed = 1
def set(self, instance, value, **kwargs): if not kwargs.has_key('mime_type'): kwargs['mime_type'] = None
a2a548380985300f23c238b6fe586e2bdc9a3922 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12165/a2a548380985300f23c238b6fe586e2bdc9a3922/Field.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 12, 2890, 16, 791, 16, 460, 16, 2826, 4333, 4672, 309, 486, 1205, 18, 5332, 67, 856, 2668, 11757, 67, 723, 11, 4672, 1205, 3292, 11757, 67, 723, 3546, 273, 599, 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, 444, 12, 2890, 16, 791, 16, 460, 16, 2826, 4333, 4672, 309, 486, 1205, 18, 5332, 67, 856, 2668, 11757, 67, 723, 11, 4672, 1205, 3292, 11757, 67, 723, 3546, 273, 599, 2, -100, -100, -...
QToolTip.add(self.rohf_radiobtn,self.__tr("Restricted Open-shell Hartree-Fock. Spin-paired electrons are assigned to doubly-occupied spatial orbitals, while electrons with unpaired spins are provided unique spatial orbitals."))
QToolTip.add(self.rohf_radiobtn,self.__tr("Restricted Open-shell Hartree-Fock"))
def languageChange(self): self.setCaption(self.__tr("GAMESS Properties")) self.psetslbl_2_2.setText(self.__tr("Name :")) self.textLabel1_2_3.setText(self.__tr("Calculate :")) self.textLabel1_3.setText(self.__tr("Description :")) self.textLabel1_3_2.setText(self.__tr("Color :")) self.name_linedit.setText(QString.null) QToolTip.add(self.name_linedit,self.__tr("The name of the GAMESS jig.")) QWhatsThis.add(self.name_linedit,self.__tr("The name of the GAMESS jig.")) self.runtyp_combox.clear() self.runtyp_combox.insertItem(self.__tr("Energy")) self.runtyp_combox.insertItem(self.__tr("Optimization")) self.runtyp_combox.setCurrentItem(0) self.comment_linedit.setText(QString.null) self.choose_color_btn.setText(self.__tr("Choose...")) QToolTip.add(self.choose_color_btn,self.__tr("Change color")) self.scftyp_btngrp.setTitle(self.__tr("Electronic Structure Properties")) self.rhf_radiobtn.setText(self.__tr("RHF")) QToolTip.add(self.rhf_radiobtn,self.__tr("Restricted Hartree-Fock. All electrons are paired and each spatial orbital is doubly occupied. Cannot be used with multiplicities greater than 1.")) QWhatsThis.add(self.rhf_radiobtn,self.__tr("Restricted Hartree-Fock. All electrons are paired and each spatial orbital is doubly occupied. Cannot be used with multiplicities greater than 1.")) self.uhf_radiobtn.setText(self.__tr("UHF")) QToolTip.add(self.uhf_radiobtn,self.__tr("Unrestricted Hartree-Fock. All electrons are unpaired and spatial (spin) orbitals are uniquely defined for each electron. More time consuming, but more accurate, than ROHF. ")) QWhatsThis.add(self.uhf_radiobtn,self.__tr("Unrestricted Hartree-Fock. All electrons are unpaired and spatial (spin) orbitals are uniquely defined for each electron. More time consuming, but more accurate, than ROHF. ")) self.rohf_radiobtn.setText(self.__tr("ROHF")) QToolTip.add(self.rohf_radiobtn,self.__tr("Restricted Open-shell Hartree-Fock. Spin-paired electrons are assigned to doubly-occupied spatial orbitals, while electrons with unpaired spins are provided unique spatial orbitals.")) QWhatsThis.add(self.rohf_radiobtn,self.__tr("Restricted Open-shell Hartree-Fock. Spin-paired electrons are assigned to doubly-occupied spatial orbitals, while electrons with unpaired spins are provided unique spatial orbitals.")) self.textLabel1_4.setText(self.__tr("Charge:")) QToolTip.add(self.icharg_spinbox,self.__tr("The total charge of the structure to be treated quantum mechanically.")) QWhatsThis.add(self.icharg_spinbox,self.__tr("The total charge of the structure to be treated quantum mechanically.")) self.textLabel1_2_2.setText(self.__tr("Multiplicity:")) self.multi_combox.clear() self.multi_combox.insertItem(self.__tr("1")) self.multi_combox.insertItem(self.__tr("2")) self.multi_combox.insertItem(self.__tr("3")) self.multi_combox.insertItem(self.__tr("4")) self.multi_combox.insertItem(self.__tr("5")) self.multi_combox.insertItem(self.__tr("6")) self.multi_combox.insertItem(self.__tr("7")) QToolTip.add(self.multi_combox,self.__tr("N + 1, where N is the number of unpaired electrons.")) QWhatsThis.add(self.multi_combox,self.__tr("N + 1, where N is the number of unpaired electrons.")) self.groupBox8.setTitle(self.__tr("System Memory and Usage")) self.textLabel2_2.setText(self.__tr("Memory :")) self.textLabel1.setText(self.__tr("MB")) self.dirscf_checkbox.setText(self.__tr("DirectSCF")) QToolTip.add(self.dirscf_checkbox,self.__tr("Check this box to run the calculation in RAM and avoid hard disk usage for integral storage.")) QWhatsThis.add(self.dirscf_checkbox,self.__tr("Check this box to run the calculation in RAM and avoid hard disk usage for integral storage.")) self.groupBox2.setTitle(self.__tr("Electron Correlation Method")) self.textLabel6.setText(self.__tr("Basis Set :")) self.gbasis_combox.clear() self.gbasis_combox.insertItem(self.__tr("AM1")) self.gbasis_combox.insertItem(self.__tr("PM3")) self.gbasis_combox.insertItem(self.__tr("STO-3G")) self.gbasis_combox.insertItem(self.__tr("STO-6G")) self.gbasis_combox.insertItem(self.__tr("3-21G")) self.gbasis_combox.insertItem(self.__tr("3-21G*")) self.gbasis_combox.insertItem(self.__tr("6-31G")) self.gbasis_combox.insertItem(self.__tr("6-31G(d)")) self.gbasis_combox.insertItem(self.__tr("6-31G(d,p)")) self.gbasis_combox.insertItem(self.__tr("6-31+G(d)")) self.gbasis_combox.insertItem(self.__tr("6-31+G(d,p)")) self.gbasis_combox.insertItem(self.__tr("6-31++G(d)")) self.gbasis_combox.insertItem(self.__tr("6-31++G(d,p)")) self.gbasis_combox.insertItem(self.__tr("6-311G")) self.gbasis_combox.insertItem(self.__tr("6-311G(d)")) self.gbasis_combox.insertItem(self.__tr("6-311G(d,p)")) self.gbasis_combox.insertItem(self.__tr("6-311+G(d,p)")) self.gbasis_combox.insertItem(self.__tr("6-311++G(d,p)")) self.gbasis_combox.setCurrentItem(0) QToolTip.add(self.gbasis_combox,self.__tr("Select from among the standard Gaussian-type basis sets and semi-empirical parameters in GAMESS.")) QWhatsThis.add(self.gbasis_combox,self.__tr("Select from among the standard Gaussian-type basis sets and semi-empirical parameters in GAMESS.")) self.checkBox10_3_2.setText(self.__tr("Read $HESS Group")) self.checkBox10_2_2_2.setText(self.__tr("Read $VEC Group")) QToolTip.add(self.checkBox10_2_2_2,self.__tr("Only if Hf basis same as CI basis","Only if Hf basis same as CI basis")) QWhatsThis.add(self.checkBox10_2_2_2,self.__tr("Only if Hf basis same as CI basis")) self.checkBox35.setText(self.__tr("Frequencies")) self.ecm_btngrp.setTitle(QString.null) self.none_radiobtn.setText(self.__tr("None")) QToolTip.add(self.none_radiobtn,self.__tr("Select this button to neglect electron correlation in the calculation.")) QWhatsThis.add(self.none_radiobtn,self.__tr("Select this button to neglect electron correlation in the calculation.")) self.dft_radiobtn.setText(self.__tr("DFT")) QToolTip.add(self.dft_radiobtn,self.__tr("Select this button to perform a density functional theory calculation.")) QWhatsThis.add(self.dft_radiobtn,self.__tr("Select this button to perform a density functional theory calculation.")) self.mp2_radiobtn.setText(self.__tr("MP2")) QToolTip.add(self.mp2_radiobtn,self.__tr("Select this button to perform a Second-Order Moeller Plesset calculation.")) QWhatsThis.add(self.mp2_radiobtn,self.__tr("Select this button to perform a Second-Order Moeller Plesset calculation.")) self.dfttyp_label.setText(self.__tr("Functional:")) self.gridsize_label.setText(self.__tr("Grid Size:")) self.dfttyp_combox.clear() self.dfttyp_combox.insertItem(self.__tr("SLATER (E)")) self.dfttyp_combox.insertItem(self.__tr("BECKE (E)")) self.dfttyp_combox.insertItem(self.__tr("GILL (E)")) self.dfttyp_combox.insertItem(self.__tr("PBE (E)")) self.dfttyp_combox.insertItem(self.__tr("VWN (C)")) self.dfttyp_combox.insertItem(self.__tr("LYP (C)")) self.dfttyp_combox.insertItem(self.__tr("OP (C)")) self.dfttyp_combox.insertItem(self.__tr("SVWN/LDA (E+C)")) self.dfttyp_combox.insertItem(self.__tr("SLYP (E+C)")) self.dfttyp_combox.insertItem(self.__tr("SOP (E+C)")) self.dfttyp_combox.insertItem(self.__tr("BVWN (E+C)")) self.dfttyp_combox.insertItem(self.__tr("BLYP (E+C)")) self.dfttyp_combox.insertItem(self.__tr("BOP (E+C)")) self.dfttyp_combox.insertItem(self.__tr("GVWN (E+C)")) self.dfttyp_combox.insertItem(self.__tr("GLYP (E+C)")) self.dfttyp_combox.insertItem(self.__tr("GOP (E+C)")) self.dfttyp_combox.insertItem(self.__tr("PBEVWN (E+C)")) self.dfttyp_combox.insertItem(self.__tr("PBELYP (E+C)")) self.dfttyp_combox.insertItem(self.__tr("PBEOP (E+C)")) self.dfttyp_combox.insertItem(self.__tr("BHHLYP (H)")) self.dfttyp_combox.insertItem(self.__tr("B3LYP (H)")) QToolTip.add(self.dfttyp_combox,self.__tr("Select an available density functional in GAMESS.")) QWhatsThis.add(self.dfttyp_combox,self.__tr("Select an available density functional in GAMESS.")) self.gridsize_combox.clear() self.gridsize_combox.insertItem(self.__tr("Coarse")) self.gridsize_combox.insertItem(self.__tr("Default")) self.gridsize_combox.insertItem(self.__tr("Fine")) self.gridsize_combox.insertItem(self.__tr("Army Grade")) self.gridsize_combox.setCurrentItem(1) QToolTip.add(self.gridsize_combox,self.__tr("Select the grid spacing for the DFT calculation.")) QWhatsThis.add(self.gridsize_combox,self.__tr("Select the grid spacing for the DFT calculation.")) self.core_electrons_checkbox.setText(self.__tr("Core electrons?")) QToolTip.add(self.core_electrons_checkbox,self.__tr("Check this box to include both the valence and core electrons in the MP2 calculation.")) QWhatsThis.add(self.core_electrons_checkbox,self.__tr("Check this box to include both the valence and core electrons in the MP2 calculation.")) self.groupBox3.setTitle(self.__tr("Convergence Criteria")) self.textLabel3.setText(self.__tr("Energy and Density:")) self.density_conv_combox.clear() self.density_conv_combox.insertItem(self.__tr("Coarse")) self.density_conv_combox.insertItem(self.__tr("Medium")) self.density_conv_combox.insertItem(self.__tr("Fine")) self.density_conv_combox.insertItem(self.__tr("Very Fine")) self.density_conv_combox.setCurrentItem(1) QToolTip.add(self.density_conv_combox,self.__tr("Selects the accuracy of the electron density convergence for the energy calculation.")) QWhatsThis.add(self.density_conv_combox,self.__tr("Selects the accuracy of the electron density convergence for the energy calculation.")) self.rmsd_lbl.setText(self.__tr("RMSD:")) self.rmsd_combox.clear() self.rmsd_combox.insertItem(self.__tr("Coarse")) self.rmsd_combox.insertItem(self.__tr("Medium")) self.rmsd_combox.insertItem(self.__tr("Fine")) self.rmsd_combox.insertItem(self.__tr("Very Fine")) self.rmsd_combox.setCurrentItem(1) self.iterations_lbl.setText(self.__tr("Iterations :")) self.edit_input_file_cbox.setText(self.__tr("Open Input File in text editor")) self.run_job_btn.setText(self.__tr("Save and Run")) QToolTip.add(self.run_job_btn,self.__tr("Save GAMESS parameters and launch job.")) self.save_btn.setText(self.__tr("Save")) self.cancel_btn.setText(self.__tr("Cancel")) QToolTip.add(self.cancel_btn,self.__tr("Closes this window.")) QWhatsThis.add(self.cancel_btn,self.__tr("Closes this window."))
24f41dc8e19de3c29875b1970aa782574333c759 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/24f41dc8e19de3c29875b1970aa782574333c759/GamessPropDialog.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2653, 3043, 12, 2890, 4672, 365, 18, 542, 21158, 12, 2890, 16186, 313, 2932, 43, 1642, 1260, 6183, 6, 3719, 365, 18, 84, 542, 2069, 3083, 67, 22, 67, 22, 18, 542, 1528, 12, 2890, 161...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2653, 3043, 12, 2890, 4672, 365, 18, 542, 21158, 12, 2890, 16186, 313, 2932, 43, 1642, 1260, 6183, 6, 3719, 365, 18, 84, 542, 2069, 3083, 67, 22, 67, 22, 18, 542, 1528, 12, 2890, 161...
if not mods and not globalvar.always: wikipedia.output(u'No changes needed' ) else: if mods: wikipedia.output(u"Changes to be made: %s" % mods) oldtext = pl.get() newtext = wikipedia.replaceLanguageLinks(oldtext, new, site = pl.site()) if globalvar.debug: wikipedia.showDiff(oldtext, newtext) if newtext != oldtext:
if not mods and not globalvar.always: wikipedia.output(u'No changes needed' ) else: if mods: wikipedia.output(u"Changes to be made: %s" % mods) oldtext = pl.get() newtext = wikipedia.replaceLanguageLinks(oldtext, new, site = pl.site()) if globalvar.debug: wikipedia.showDiff(oldtext, newtext) if newtext != oldtext: ask = False if removing and removing != [pl.site()]: self.problem('Found incorrect link to %s in %s'% (",".join([x.lang for x in removing]), pl.aslink(forceInterwiki = True))) ask = True if globalvar.force:
def replaceLinks(self, pl, new, bot): """ Returns True if saving was successful. """ if globalvar.localonly: # In this case only continue on the Page we started with if pl != self.pl(): return False
f26dba898937f97d67f00514b2025aca590f3b24 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4404/f26dba898937f97d67f00514b2025aca590f3b24/interwiki.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1453, 7100, 12, 2890, 16, 886, 16, 394, 16, 2512, 4672, 3536, 2860, 1053, 309, 12392, 1703, 6873, 18, 3536, 309, 2552, 1401, 18, 3729, 3700, 30, 468, 657, 333, 648, 1338, 1324, 603, 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1453, 7100, 12, 2890, 16, 886, 16, 394, 16, 2512, 4672, 3536, 2860, 1053, 309, 12392, 1703, 6873, 18, 3536, 309, 2552, 1401, 18, 3729, 3700, 30, 468, 657, 333, 648, 1338, 1324, 603, 32...
class MultiDictTextMixin(object):
class MultiDictTestMixin(object):
def clear(self): d = self.dict_class() with Assert.raises(TypeError): d.clear()
0b9c52c9b9cdc937cda78d52fe1b2dd8bec233f6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13697/0b9c52c9b9cdc937cda78d52fe1b2dd8bec233f6/datastructures.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2424, 12, 2890, 4672, 302, 273, 365, 18, 1576, 67, 1106, 1435, 598, 5452, 18, 354, 6141, 12, 19030, 4672, 302, 18, 8507, 1435, 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, 2424, 12, 2890, 4672, 302, 273, 365, 18, 1576, 67, 1106, 1435, 598, 5452, 18, 354, 6141, 12, 19030, 4672, 302, 18, 8507, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
if atoms[index].value == 'import':
atom = atoms[index] assert isinstance(atom, TokenObject) if atom.value == 'import':
def build_import_from(builder, nb): """ import_from: 'from' dotted_name 'import' ('*' | '(' import_as_names [','] ')' | import_as_names) import_as_names: import_as_name (',' import_as_name)* [','] import_as_name: NAME [NAME NAME] """ atoms = get_atoms(builder, nb) index = 1 # skip from while atoms[index].name == builder.parser.tokens['DOT']: index += 1 level = index - 1 if atoms[index].value == 'import': # from . import x from_name = "" incr = 0 else: incr, from_name = parse_dotted_names(atoms[index:], builder) index += (incr + 1) # skip 'import' token = atoms[index] assert isinstance(token, TokenObject) # XXX if token.name == builder.parser.tokens['STAR']: names = [('*', None)] else: if token.name == builder.parser.tokens['LPAR']: # mutli-line imports tokens = slicecut( atoms, index+1, -1 ) else: tokens = atoms[index:] if tokens[-1].name == builder.parser.tokens['COMMA']: raise SyntaxError, "trailing comma not allowed without" \ "surrounding parentheses" index = 0 l = len(tokens) names = [] while index < l: token = tokens[index] assert isinstance(token, TokenObject) name = token.get_value() as_name = None index += 1 if index < l: token = tokens[index] assert isinstance(token, TokenObject) if token.get_value() == 'as': token = tokens[index+1] assert isinstance(token, TokenObject) as_name = token.get_value() index += 2 names.append((name, as_name)) if index < l: # case ',' index += 1 builder.push(ast.From(from_name, names, level, atoms[0].lineno))
32ef32ee13147f639363a79fa30d4524795c8c54 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6934/32ef32ee13147f639363a79fa30d4524795c8c54/astbuilder.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 67, 5666, 67, 2080, 12, 9574, 16, 4264, 4672, 3536, 1930, 67, 2080, 30, 296, 2080, 11, 20965, 67, 529, 296, 5666, 11, 7707, 4035, 571, 7321, 1930, 67, 345, 67, 1973, 306, 2187, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 67, 5666, 67, 2080, 12, 9574, 16, 4264, 4672, 3536, 1930, 67, 2080, 30, 296, 2080, 11, 20965, 67, 529, 296, 5666, 11, 7707, 4035, 571, 7321, 1930, 67, 345, 67, 1973, 306, 2187, ...
soup = BeautifulSoup(html, convertEntities=BeautifulSoup.XHTML_ENTITIES)
soup = BeautifulSoup(html)
def sanitize_html(html='<p>No comment</p>', encoding=None, allow_tags=[], allow_attributes=[], blacklist_tags=[], blacklist_attributes=[], trusted_source=False): """Parses HTML and tries to sanitize it using white list. This method is a mishmash of code from Django snippets (http://www.djangosnippets.org/snippets/169) and the HTML sanitization of Universal Feed Parser. It explicitly looks for valid hrefs to prevent scripts lurking in there. Unfortunately, style, either as a tag or attribute, can contain malicious script through executable CSS definitions. So sanitized HTML cannot be colored or highlighted using styles. Args: html: HTML to be sanitized. allow_tags: limit all tags to just this list allow_attributes: limit all tags to just this list allow_styling: should only be TRUE if you trust source Returns: Sanitized version of html Raises: DangerousHTMLError if the supplied HTML has dangerous elements. """ if not allow_tags: allow_tags = acceptable_tags if not allow_attributes: allow_attributes = acceptable_attributes allow_tags = [tag for tag in allow_tags if tag not in blacklist_tags] allow_attributes = [tag for tag in allow_attributes if tag not in blacklist_tags] if trusted_source: allow_attributes += attributes_for_trusted_source allow_tags += tags_for_trusted_source if isinstance(html, unicode): # and not encoding: logging.debug("Sanitizing unicode input.") soup = BeautifulSoup(html, convertEntities=BeautifulSoup.XHTML_ENTITIES) else: if not encoding: encoding = 'latin-1' logging.debug("Sanitizing string input, assuming %s", encoding) soup = BeautifulSoup(html.decode(encoding, 'ignore'), convertEntities=BeautifulSoup.XHTML_ENTITIES) for comment in soup.findAll( text = lambda text: isinstance(text, Comment)): comment.extract() for tag in soup.findAll(True): if tag.name not in allow_tags: tag.hidden = True if tag.name in danger_elements: raise DangerousHTMLError(html) ok_attrs = [] for attr, val in tag.attrs: if attr == 'href' and not href_matcher.match(val) and not trusted_source: continue if attr in allow_attributes: if attr in js_possible_attributes: if javascript_matcher.match(val): raise DangerousHTMLError(html) ok_attrs += [(attr, val)] tag.attrs = ok_attrs return soup.renderContents().decode('utf-8')
e427cfd71650be10c46f922ecfde711607cee068 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4578/e427cfd71650be10c46f922ecfde711607cee068/sanitizer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8881, 67, 2620, 12, 2620, 2218, 32, 84, 34, 2279, 2879, 1757, 84, 1870, 16, 2688, 33, 7036, 16, 1699, 67, 4156, 22850, 6487, 1699, 67, 4350, 22850, 6487, 11709, 67, 4156, 22850, 6487, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 8881, 67, 2620, 12, 2620, 2218, 32, 84, 34, 2279, 2879, 1757, 84, 1870, 16, 2688, 33, 7036, 16, 1699, 67, 4156, 22850, 6487, 1699, 67, 4350, 22850, 6487, 11709, 67, 4156, 22850, 6487, ...
ChoiceParam('tab_highlight_style',
IndexChoiceParam('tab_highlight_style',
def action(self, index=-1, multiplier=1): self.mode.stc.ConvertEOLs(EOLModeSelect.modes[index]) Publisher().sendMessage('resetStatusBar')
6b014b8f8d82c3b9710161ca3927349a68c99cd6 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11522/6b014b8f8d82c3b9710161ca3927349a68c99cd6/fundamental.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1301, 12, 2890, 16, 770, 29711, 21, 16, 15027, 33, 21, 4672, 365, 18, 3188, 18, 334, 71, 18, 2723, 5842, 87, 12, 5842, 2309, 3391, 18, 19282, 63, 1615, 5717, 21932, 7675, 4661, 1079, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1301, 12, 2890, 16, 770, 29711, 21, 16, 15027, 33, 21, 4672, 365, 18, 3188, 18, 334, 71, 18, 2723, 5842, 87, 12, 5842, 2309, 3391, 18, 19282, 63, 1615, 5717, 21932, 7675, 4661, 1079, ...
maildir_train(h, os.path.join(path, "cur"), is_spam, force)
maildir_train(h, os.path.join(path, "cur"), is_spam, force, removetrained)
def train(h, path, is_spam, force, trainnew): if not os.path.exists(path): raise ValueError("Nonexistent path: %s" % path) elif os.path.isfile(path): mbox_train(h, path, is_spam, force) elif os.path.isdir(os.path.join(path, "cur")): maildir_train(h, os.path.join(path, "cur"), is_spam, force) if trainnew: maildir_train(h, os.path.join(path, "new"), is_spam, force) elif os.path.isdir(path): mhdir_train(h, path, is_spam, force) else: raise ValueError("Unable to determine mailbox type: " + path)
0927af8f2c4fb18ef58c0b4fef71b468f866dfb6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6126/0927af8f2c4fb18ef58c0b4fef71b468f866dfb6/mboxtrain.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4691, 12, 76, 16, 589, 16, 353, 67, 1752, 301, 16, 2944, 16, 4691, 2704, 4672, 309, 486, 1140, 18, 803, 18, 1808, 12, 803, 4672, 1002, 2068, 2932, 3989, 19041, 589, 30, 738, 87, 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, 4691, 12, 76, 16, 589, 16, 353, 67, 1752, 301, 16, 2944, 16, 4691, 2704, 4672, 309, 486, 1140, 18, 803, 18, 1808, 12, 803, 4672, 1002, 2068, 2932, 3989, 19041, 589, 30, 738, 87, 6, ...
def name( self ): return ""
def __init__(self, context, request): BaseWidget.__init__(self, context, request) self.__required = self.required self.required = False self.__name = self.name self.name = ""
def name( self ): return ""
f6012772394aefb0a3f85d606cc4c925cce88638 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12236/f6012772394aefb0a3f85d606cc4c925cce88638/checkboxwidget.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 508, 12, 365, 262, 30, 327, 1408, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 508, 12, 365, 262, 30, 327, 1408, 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, ...
fd, name = tempfile.mkstemp() fileobj = os.fdopen(fd, "w+b") try:
with TemporaryFile("w+b") as fileobj:
def writerAssertEqual(self, input, expected_result): fd, name = tempfile.mkstemp() fileobj = os.fdopen(fd, "w+b") try: writer = csv.writer(fileobj, dialect = self.dialect) writer.writerows(input) fileobj.seek(0) self.assertEqual(fileobj.read(), expected_result) finally: fileobj.close() os.unlink(name)
2837440cd7e82f53ee7e194e97a8b6ffcc4e97cf /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8125/2837440cd7e82f53ee7e194e97a8b6ffcc4e97cf/test_csv.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2633, 8213, 5812, 12, 2890, 16, 810, 16, 2665, 67, 2088, 4672, 598, 22791, 812, 2932, 91, 15, 70, 7923, 487, 17041, 30, 2633, 273, 6101, 18, 6299, 12, 768, 2603, 16, 10864, 273, 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, 2633, 8213, 5812, 12, 2890, 16, 810, 16, 2665, 67, 2088, 4672, 598, 22791, 812, 2932, 91, 15, 70, 7923, 487, 17041, 30, 2633, 273, 6101, 18, 6299, 12, 768, 2603, 16, 10864, 273, 365, ...
system('killall netserver')
utils.system('killall netserver')
def server_stop(self): # this should really just kill the pid I forked, but ... system('killall netserver')
fa3ed9b2c1dd96bae4c885a4b8c02e4d4944d614 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10349/fa3ed9b2c1dd96bae4c885a4b8c02e4d4944d614/netperf2.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1438, 67, 5681, 12, 2890, 4672, 468, 333, 1410, 8654, 2537, 8673, 326, 4231, 467, 12515, 329, 16, 1496, 1372, 2619, 2668, 16418, 454, 2901, 3567, 6134, 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, 0, 0, 0, 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, 1438, 67, 5681, 12, 2890, 4672, 468, 333, 1410, 8654, 2537, 8673, 326, 4231, 467, 12515, 329, 16, 1496, 1372, 2619, 2668, 16418, 454, 2901, 3567, 6134, 2, -100, -100, -100, -100, -100, -...
''' Open the database and set the current user.
"""Open the database and set the current user.
def opendb(self, username): ''' Open the database and set the current user.
4381ee4898d6957dcf5870cef670761c11e9b531 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/4381ee4898d6957dcf5870cef670761c11e9b531/client.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1061, 409, 70, 12, 2890, 16, 2718, 4672, 9163, 3502, 326, 2063, 471, 444, 326, 783, 729, 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, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1061, 409, 70, 12, 2890, 16, 2718, 4672, 9163, 3502, 326, 2063, 471, 444, 326, 783, 729, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
import nonportable
def run_network_test(name, args): logstream.write("INFO: Running: "+name+"\n") # Run the tests (testout, testerr) = exec_repy_script(name, "restrictions.default", args) # Check for output if testout != "" or testerr != "": logstream.write("FAILURE: Out:\n"+testout+"\n\nErr:\n"+testerr+"\n")
b40d882832032078d68af84327942d639520dda9 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7272/b40d882832032078d68af84327942d639520dda9/run_tests.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 67, 5185, 67, 3813, 12, 529, 16, 833, 4672, 613, 3256, 18, 2626, 2932, 5923, 30, 20480, 30, 13773, 529, 9078, 64, 82, 7923, 468, 1939, 326, 7434, 261, 3813, 659, 16, 1842, 370, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 5185, 67, 3813, 12, 529, 16, 833, 4672, 613, 3256, 18, 2626, 2932, 5923, 30, 20480, 30, 13773, 529, 9078, 64, 82, 7923, 468, 1939, 326, 7434, 261, 3813, 659, 16, 1842, 370, ...
result = mod_obj._get_id(cr, uid, module, wizard) id = mod_obj.read(cr, uid, [result], ['res_id'])[0]['res_id'] return act_obj.read(cr, uid, [id])[0]
result = obj_model._get_id(cr, uid, module, wizard) id = obj_model.read(cr, uid, [result], ['res_id'])[0]['res_id'] return obj_act.read(cr, uid, [id])[0]
def launch_wizard(self, cr, uid, ids, context=None): """ Search for a wizard to launch according to the type. If type is manual. just confirm the order. """ obj_payment_order = self.pool.get('payment.order') obj_model = self.pool.get('ir.model.data') obj_act = self.pool.get('ir.actions.act_window') order= obj_payment_order.browse(cr, uid, context['active_id'], context) t = order.mode and order.mode.type.code or 'manual' if t == 'manual' : obj_payment_order.set_done(cr,uid,context['active_id'],context) return {}
7a830f90045fe231d8b77a88d7d1d93e64cf9bbb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/7a830f90045fe231d8b77a88d7d1d93e64cf9bbb/account_payment_pay.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8037, 67, 31837, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 819, 33, 7036, 4672, 3536, 5167, 364, 279, 24204, 358, 8037, 4888, 358, 326, 618, 18, 971, 618, 353, 11297, 18, 2537, 6932,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 8037, 67, 31837, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 819, 33, 7036, 4672, 3536, 5167, 364, 279, 24204, 358, 8037, 4888, 358, 326, 618, 18, 971, 618, 353, 11297, 18, 2537, 6932,...
if not meta.has_key("function"): meta["function"] = "<unknown>"
meta.setdefault("filename", "<unknown>") meta.setdefault("function", "<unknown>") meta.setdefault("line", "<unknown>")
def record(self): if not self.state: return
cff3d69e21f1f1466b90e44c037ea61211f4c84a /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8641/cff3d69e21f1f1466b90e44c037ea61211f4c84a/Diagnostic.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1409, 12, 2890, 4672, 309, 486, 365, 18, 2019, 30, 327, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1409, 12, 2890, 4672, 309, 486, 365, 18, 2019, 30, 327, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
sql_lyr = ds.ExecuteSQL( "select proj4text from spatial_ref_sys" )
sql_lyr = ds.ExecuteSQL( "select * from spatial_ref_sys" )
dst_feat = ogr.Feature( feature_def = lyr.GetLayerDefn() )
6bc5de742d925cd22b0a58488f118deef6a9c6f4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10290/6bc5de742d925cd22b0a58488f118deef6a9c6f4/ogr_sqlite.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 3046, 67, 29735, 273, 320, 3197, 18, 4595, 12, 2572, 67, 536, 273, 18519, 86, 18, 967, 4576, 3262, 82, 1435, 262, 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, 3046, 67, 29735, 273, 320, 3197, 18, 4595, 12, 2572, 67, 536, 273, 18519, 86, 18, 967, 4576, 3262, 82, 1435, 262, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
with self._lock:
with phil:
def close(self): """ Close this HDF5 file. All open objects will be invalidated. """ with self._lock: self.fid.close()
b1a598a2d723040490bcce9fa07057de259dfbab /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10380/b1a598a2d723040490bcce9fa07057de259dfbab/highlevel.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1746, 12, 2890, 4672, 3536, 3527, 333, 21673, 25, 585, 18, 225, 4826, 1696, 2184, 903, 506, 28711, 18, 3536, 598, 1844, 330, 30, 365, 18, 27268, 18, 4412, 1435, 2, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1746, 12, 2890, 4672, 3536, 3527, 333, 21673, 25, 585, 18, 225, 4826, 1696, 2184, 903, 506, 28711, 18, 3536, 598, 1844, 330, 30, 365, 18, 27268, 18, 4412, 1435, 2, -100, -100, -100, -1...
(dir, pattern) = map (native_path, words[1:3])
dir = native_path(words[1]) pattern_list = map (native_path, words[2:])
def read_template (self): """Read and parse the manifest template file named by 'self.template' (usually "MANIFEST.in"). Process all file specifications (include and exclude) in the manifest template and add the resulting filenames to 'self.files'."""
d1aa01cb91ac9abec6e7ba7ff3f8be6778f9dbda /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/d1aa01cb91ac9abec6e7ba7ff3f8be6778f9dbda/sdist.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 67, 3202, 261, 2890, 4672, 3536, 1994, 471, 1109, 326, 5643, 1542, 585, 4141, 635, 296, 2890, 18, 3202, 11, 261, 407, 3452, 315, 9560, 30050, 18, 267, 20387, 225, 4389, 777, 585, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 855, 67, 3202, 261, 2890, 4672, 3536, 1994, 471, 1109, 326, 5643, 1542, 585, 4141, 635, 296, 2890, 18, 3202, 11, 261, 407, 3452, 315, 9560, 30050, 18, 267, 20387, 225, 4389, 777, 585, ...
return '<table width="100%%"><tr>%s</tr></table>' % result
return '<table width="100%%" summary="list"><tr>%s</tr></table>' % result
def multicolumn(self, list, format, cols=4): """Format a list of items into a multi-column list.""" result = '' rows = (len(list)+cols-1)/cols for col in range(cols): result = result + '<td width="%d%%" valign=top>' % (100/cols) for i in range(rows*col, rows*col+rows): if i < len(list): result = result + format(list[i]) + '<br>\n' result = result + '</td>' return '<table width="100%%"><tr>%s</tr></table>' % result
a4fcd52f4f95532fd0ceb2f9cf6a5f3a4f820142 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/a4fcd52f4f95532fd0ceb2f9cf6a5f3a4f820142/pydoc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1778, 12463, 755, 12, 2890, 16, 666, 16, 740, 16, 5347, 33, 24, 4672, 3536, 1630, 279, 666, 434, 1516, 1368, 279, 3309, 17, 2827, 666, 12123, 563, 273, 875, 2595, 273, 261, 1897, 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, 1778, 12463, 755, 12, 2890, 16, 666, 16, 740, 16, 5347, 33, 24, 4672, 3536, 1630, 279, 666, 434, 1516, 1368, 279, 3309, 17, 2827, 666, 12123, 563, 273, 875, 2595, 273, 261, 1897, 12, ...
grasp_pose = create_goal_pose(x, y, HOVER_Z, gripper_rot)
grasp_pose = create_goal_pose(x, y, HOVER_Z, get_gripper_pose(gripper_rot))
def perform_grasp(x, y, z=None, gripper_rot = np.pi / 2., grasp=None, is_place=False, is_grasp=True, collide = True, return_pose=True, zeros = None, cm=None, apm=None): print "Performing grasp (%1.2f, %1.2f), rotation: %1.2f" % (x, y, gripper_rot) gripper_rot = normalize_rot(gripper_rot) if cm is None: cm = ControllerManager(armc) if apm is None: apm = ArmPerceptionMonitor(ARM, percept_mon_list=PERCEPT_GRASP_LIST) if grasp is None: grasp = get_grasp_model(x, y, gripper_rot) #apm.datasets = grasp[2] #apm.models = grasp[3] #apm.model_zeros = grasp[4] #print "Model zeros:", grasp[4] print "Beginning grasp" # Move to grasp position print "Moving to initial grasp position" # cm.command_joint_trajectory([grasp[1]], SETUP_VELOCITY, blocking = True) # print "Moving to final grasp position" grasp_pose = create_goal_pose(x, y, HOVER_Z, gripper_rot) cm.move_arm_pose_biased(grasp_pose, JOINTS_BIAS, SETUP_VELOCITY, blocking = False) if not is_place and is_grasp: # open gripper print "Opening gripper" cm.command_gripper(0.08, -1.0, False) cm.gripper_action_client.wait_for_result(rospy.Duration(2.0)) cm.wait_joint_trajectory_done() rospy.sleep(0.1) #if zeros is None: zeros = apm.get_zeros(0.6) print "Current zeros:", zeros goal_pose = create_goal_pose(x, y, HOVER_Z - GRASP_DIST, gripper_rot) class Collision(): def __init__(self): self.collided = False # start gathering data def on_collision(self): print "Collision!" self.collided = True while not cm.check_joint_trajectory_done(): cm.joint_action_client.cancel_all_goals() rospy.sleep(0.01) if rospy.is_shutdown(): return None col = Collision() def rotate_acceleration(data): return data data -= zeros["accelerometer"] a = gripper_rot data[1] = np.cos(a) * data[1] - np.sin(a) * data[2] data[2] = np.sin(a) * data[1] + np.cos(a) * data[2] data += zeros["accelerometer"] return data transforms = { "accelerometer" : rotate_acceleration } apm.begin_monitoring(models = grasp[3], model_zeros = grasp[4], contingency=col.on_collision, window_size=MONITOR_WINDOW, current_zeros=zeros, std_dev_default=STD_DEV, std_dev_dict = STD_DEV_DICT, tol_thresh_dict = TOL_THRESH_DICT, noise_dev_default=NOISE_DEV, collide=collide, transform_dict = transforms) # move arm down print "Moving arm down" downward_grasp(cm, goal_pose, block = False) if z is None: while not cm.check_joint_trajectory_done(): if col.collided: cm.joint_action_client.cancel_all_goals() rospy.sleep(0.01) if rospy.is_shutdown(): return None else: while not cm.check_joint_trajectory_done(): if col.collided: cm.joint_action_client.cancel_all_goals() wrist_pose = cm.get_current_wrist_pose_stamped("torso_lift_link") p = wrist_pose.pose.position o = wrist_pose.pose.orientation affector_pos = transform_in_frame([p.x, p.y, p.z], [o.x, o.y, o.z, o.w], GRIPPER_POINT) if affector_pos[2] <= z: print "Reached z position" print "Affector position:", affector_pos while not cm.check_joint_trajectory_done(): cm.joint_action_client.cancel_all_goals() rospy.sleep(0.01) break rospy.sleep(0.01) if rospy.is_shutdown(): return None print "Finished moving arm" avg_list = apm.end_monitoring() rospy.sleep(0.1) if not is_place and is_grasp: print "Closing gripper" cm.command_gripper(0.0, 30.0, True) print "Gripper closed" elif is_place: print "Opening gripper" cm.command_gripper(0.08, -1.0, True) print "Gripper opened" if return_pose and is_grasp: print "Moving back to grasp position" cm.move_arm_pose_biased(grasp_pose, JOINTS_BIAS, SETUP_VELOCITY, blocking = True) #upward_lift(cm, grasp_pose, block=True) print "Grasp complete!" return grasp, avg_list, col.collided, zeros
adf62e7b2cb1725833144625d553bfc8a1186987 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8117/adf62e7b2cb1725833144625d553bfc8a1186987/simple_grasp_learner.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3073, 67, 3197, 28264, 12, 92, 16, 677, 16, 998, 33, 7036, 16, 314, 21335, 457, 67, 8342, 273, 1130, 18, 7259, 342, 576, 12990, 3821, 28264, 33, 7036, 16, 353, 67, 964, 33, 8381, 16,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3073, 67, 3197, 28264, 12, 92, 16, 677, 16, 998, 33, 7036, 16, 314, 21335, 457, 67, 8342, 273, 1130, 18, 7259, 342, 576, 12990, 3821, 28264, 33, 7036, 16, 353, 67, 964, 33, 8381, 16,...
data = "Suppose there isn't a 16-ton weight?"*100
data = "Suppose there isn't a 16-ton weight?"*5
def test_send(self): s = capture_server() s.start() time.sleep(1) # Give server time to initialize
bf39ad29cb2f85c8d9ad145d6d09e299836e87de /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3187/bf39ad29cb2f85c8d9ad145d6d09e299836e87de/test_asyncore.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 4661, 12, 2890, 4672, 272, 273, 7477, 67, 3567, 1435, 272, 18, 1937, 1435, 813, 18, 19607, 12, 21, 13, 468, 22374, 1438, 813, 358, 4046, 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, 1842, 67, 4661, 12, 2890, 4672, 272, 273, 7477, 67, 3567, 1435, 272, 18, 1937, 1435, 813, 18, 19607, 12, 21, 13, 468, 22374, 1438, 813, 358, 4046, 2, -100, -100, -100, -100, -100, -100...
self.wr(" <path style='fill:none; stroke:red' d='M %i %i " % (x,y))
self.wr(" <path style='fill:none; stroke:red' d='M %f %f " % (x,y))
def startPath(self, lon, lat, date): x, y = self.deg_to_px(lon, lat) self.last = (lon, lat, date) self.walking = 0.0 self.wr(" <path style='fill:none; stroke:red' d='M %i %i " % (x,y))
b4599eb989298f6ab49fec9a0e4b4327fab4f9be /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3308/b4599eb989298f6ab49fec9a0e4b4327fab4f9be/day.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 787, 743, 12, 2890, 16, 4281, 16, 2516, 16, 1509, 4672, 619, 16, 677, 273, 365, 18, 9923, 67, 869, 67, 4430, 12, 9379, 16, 2516, 13, 365, 18, 2722, 273, 261, 9379, 16, 2516, 16, 15...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 787, 743, 12, 2890, 16, 4281, 16, 2516, 16, 1509, 4672, 619, 16, 677, 273, 365, 18, 9923, 67, 869, 67, 4430, 12, 9379, 16, 2516, 13, 365, 18, 2722, 273, 261, 9379, 16, 2516, 16, 15...
if mimetype!="text/html" and data is not None and data != '' ::
if mimetype!="text/html" and data is not None and data != '' :
def getPreview(self, mimetype="text/html"): data = self.annotations[self.key]['html'] if mimetype!="text/html" and data is not None and data != '' :: transforms = getToolByName(self.context, 'portal_transforms') filename = self.context.getPrimaryField().getAccessor(self.context)().filename+".html" return str(transforms.convertTo(mimetype, data.encode('utf-8'), mimetype="text/html", filename = filename)).decode('utf-8') return data
ba6b8426f1982999d4b036b3c95ee7d265bd804b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7443/ba6b8426f1982999d4b036b3c95ee7d265bd804b/adapters.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 11124, 12, 2890, 16, 12595, 1546, 955, 19, 2620, 6, 4672, 501, 273, 365, 18, 14670, 63, 2890, 18, 856, 23962, 2620, 3546, 309, 12595, 5, 1546, 955, 19, 2620, 6, 471, 501, 353, 4...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 11124, 12, 2890, 16, 12595, 1546, 955, 19, 2620, 6, 4672, 501, 273, 365, 18, 14670, 63, 2890, 18, 856, 23962, 2620, 3546, 309, 12595, 5, 1546, 955, 19, 2620, 6, 471, 501, 353, 4...
aboutInfo = about.getImageVersionString() if aboutInfo.startswith("dev-"): self.ImageVersion = 'Experimental' else: self.ImageVersion = 'Stable' self.language = language.getLanguage()[:2] DreamInfoHandler.__init__(self, self.statusCallback, blocking = False, neededTag = 'ALL_TAGS', neededFlag = self.ImageVersion, language = self.language) self.directory = resolveFilename(SCOPE_METADIR)
def __init__(self, session, plugin_path, args = None): Screen.__init__(self, session) self.session = session self.skin_path = plugin_path aboutInfo = about.getImageVersionString() if aboutInfo.startswith("dev-"): self.ImageVersion = 'Experimental' else: self.ImageVersion = 'Stable' self.language = language.getLanguage()[:2] # getLanguage returns e.g. "fi_FI" for "language_country"
018534fa7bf9be0885b2ffc753d8d6fc5b56143c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6652/018534fa7bf9be0885b2ffc753d8d6fc5b56143c/plugin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1339, 16, 1909, 67, 803, 16, 833, 273, 599, 4672, 10146, 16186, 2738, 972, 12, 2890, 16, 1339, 13, 365, 18, 3184, 273, 1339, 365, 18, 7771, 267, 67, 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, 1001, 2738, 972, 12, 2890, 16, 1339, 16, 1909, 67, 803, 16, 833, 273, 599, 4672, 10146, 16186, 2738, 972, 12, 2890, 16, 1339, 13, 365, 18, 3184, 273, 1339, 365, 18, 7771, 267, 67, 80...
action_map = {GAMCreated: 'created', GAMExists: 'exists', GAMChanged: 'changed', GAMDeleted: 'deleted', GAMEndExist: 'endExist', GAMMoved: 'moved'}
action_map = {} if 'fam' not in available and 'gamin' not in available: pass else: action_map = {GAMCreated: 'created', GAMExists: 'exists', GAMChanged: 'changed', GAMDeleted: 'deleted', GAMEndExist: 'endExist', GAMMoved: 'moved'}
def __init__(self, request_id, filename, code): Event.__init__(self, request_id, filename, code) action_map = {GAMCreated: 'created', GAMExists: 'exists', GAMChanged: 'changed', GAMDeleted: 'deleted', GAMEndExist: 'endExist', GAMMoved: 'moved'} if code in action_map: self.action = action_map[code]
6ec4573ccd6f67234b81a8aa9a6dc1ca024a21d6 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11867/6ec4573ccd6f67234b81a8aa9a6dc1ca024a21d6/FileMonitor.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 590, 67, 350, 16, 1544, 16, 981, 4672, 2587, 16186, 2738, 972, 12, 2890, 16, 590, 67, 350, 16, 1544, 16, 981, 13, 1301, 67, 1458, 273, 2618, 309, 296, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 590, 67, 350, 16, 1544, 16, 981, 4672, 2587, 16186, 2738, 972, 12, 2890, 16, 590, 67, 350, 16, 1544, 16, 981, 13, 1301, 67, 1458, 273, 2618, 309, 296, ...