rem stringlengths 2 226k | add stringlengths 0 227k | context stringlengths 8 228k | meta stringlengths 156 215 | input_ids list | attention_mask list | labels list |
|---|---|---|---|---|---|---|
try: | if hasattr(self, "_npkeys"): | def nef_partitions(self, keep_symmetric=False, keep_products=True, keep_projections=True, hodge_numbers=False): r""" Return the sequence of NEF-partitions for this polytope. INPUT: - ``keep_symmetric`` - (default: False) if True, "-s" option will be passed to nef.x in order to keep symmetric partitions; - ``keep_products`` - (default: True) if True, "-D" option will be passed to nef.x in order to keep product partitions; - ``keep_projections`` - (default: True) if True, "-P" option will be passed to nef.x in order to keep projection partitions; - ``hodge_numbers`` - (default: False) if False, "-p" option will be passed to nef.x in order to skip Hodge numbers computation, which takes a lot of time. EXAMPLES: NEF-partitions of the 4-dimensional octahedron:: sage: o = lattice_polytope.octahedron(4) sage: o.nef_partitions() [ [1, 1, 0, 0, 1, 1, 0, 0] (direct product), [1, 1, 1, 0, 1, 0, 0, 0], [1, 1, 1, 0, 1, 1, 0, 0], [1, 1, 1, 0, 1, 1, 1, 0] (direct product), [1, 1, 1, 1, 0, 0, 0, 0], [1, 1, 1, 1, 1, 0, 0, 0], [1, 1, 1, 1, 1, 1, 0, 0], [1, 1, 1, 1, 1, 1, 1, 0] (projection) ] Now we omit projections:: sage: o.nef_partitions(keep_projections=False) [ [1, 1, 0, 0, 1, 1, 0, 0] (direct product), [1, 1, 1, 0, 1, 0, 0, 0], [1, 1, 1, 0, 1, 1, 0, 0], [1, 1, 1, 0, 1, 1, 1, 0] (direct product), [1, 1, 1, 1, 0, 0, 0, 0], [1, 1, 1, 1, 1, 0, 0, 0], [1, 1, 1, 1, 1, 1, 0, 0] ] At present, Hodge numbers cannot be computed for a given NEF-partition:: sage: o.nef_partitions()[1].hodge_numbers() Traceback (most recent call last): ... NotImplementedError: use nef_partitions(hodge_numbers=True)! But they can be obtained from nef.x for all partitions at once. Partitions will be exactly the same:: sage: o.nef_partitions(hodge_numbers=True) [ [1, 1, 0, 0, 1, 1, 0, 0] (direct product), [1, 1, 1, 0, 1, 0, 0, 0], [1, 1, 1, 0, 1, 1, 0, 0], [1, 1, 1, 0, 1, 1, 1, 0] (direct product), [1, 1, 1, 1, 0, 0, 0, 0], [1, 1, 1, 1, 1, 0, 0, 0], [1, 1, 1, 1, 1, 1, 0, 0], [1, 1, 1, 1, 1, 1, 1, 0] (projection) ] Now it is possible to get Hodge numbers:: sage: o.nef_partitions(hodge_numbers=True)[1].hodge_numbers() [20] Since NEF-partitions are cached, Hodge numbers are accessible after the first request, even if you do not specify hodge_numbers anymore:: sage: o.nef_partitions()[1].hodge_numbers() [20] We illustrate removal of symmetric partitions on a diamond:: sage: o = lattice_polytope.octahedron(2) sage: o.nef_partitions() [ [1, 0, 1, 0] (direct product), [1, 1, 0, 0], [1, 1, 1, 0] (projection) ] sage: o.nef_partitions(keep_symmetric=True) [ [1, 1, 0, 1] (projection), [1, 0, 1, 1] (projection), [1, 0, 0, 1], [0, 1, 1, 1] (projection), [0, 1, 0, 1] (direct product), [0, 0, 1, 1], [1, 1, 1, 0] (projection) ] NEF-partitions can be computed only for reflexive polytopes:: sage: m = matrix(ZZ, [[1, 0, 0, -1, 0, 0], ... [0, 1, 0, 0, -1, 0], ... [0, 0, 2, 0, 0, -1]]) ... sage: p = LatticePolytope(m) sage: p.nef_partitions() Traceback (most recent call last): ... ValueError: The given polytope is not reflexive! Polytope: A lattice polytope: 3-dimensional, 6 vertices. """ if not self.is_reflexive(): raise ValueError, ("The given polytope is not reflexive!\n" + "Polytope: %s") % self keys = "-N -V" if keep_symmetric: keys += " -s" if keep_products: keys += " -D" if keep_projections: keys += " -P" if not hodge_numbers: keys += " -p" try: oldkeys = self._npkeys if oldkeys == keys: return self._nef_partitions if not (hodge_numbers and oldkeys.find("-p") != -1 or keep_symmetric and oldkeys.find("-s") == -1 or not keep_symmetric and oldkeys.find("-s") != -1 or keep_projections and oldkeys.find("-P") == -1 or keep_products and oldkeys.find("-D") == -1): # Select only necessary partitions return Sequence([p for p in self._nef_partitions if (keep_projections or not p._is_projection) and (keep_products or not p._is_product)], cr=True) except AttributeError: pass self._read_nef_partitions(self.nef_x(keys)) self._npkeys = keys return self._nef_partitions | 45a4272f5baf753bad055e0b21a3fd03c2bc9b98 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/45a4272f5baf753bad055e0b21a3fd03c2bc9b98/lattice_polytope.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1073,
74,
67,
21275,
12,
2890,
16,
3455,
67,
8117,
6899,
33,
8381,
16,
3455,
67,
18736,
33,
5510,
16,
3455,
67,
19183,
87,
33,
5510,
16,
366,
369,
908,
67,
13851,
33,
8381,
4672,
436... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1073,
74,
67,
21275,
12,
2890,
16,
3455,
67,
8117,
6899,
33,
8381,
16,
3455,
67,
18736,
33,
5510,
16,
3455,
67,
19183,
87,
33,
5510,
16,
366,
369,
908,
67,
13851,
33,
8381,
4672,
436... |
i("F3 6F", "REP OUTS DX,r/mo16","Output (E)CX words from DS:[(E)SI] to port DX.") i("F3 6F", "REP OUTS DX,r/mo32", "Output (E)CX doublewords from DS:[(E)SI] to port DX.") | i("F3 6F", "REP OUTS DX,r/m16","Output (E)CX words from DS:[(E)SI] to port DX.") i("F3 6F", "REP OUTS DX,r/m32", "Output (E)CX doublewords from DS:[(E)SI] to port DX.") | def OpText(self): retVal = '' for typ,val in self.Instruction.InstructionDef: if typ == OPCODE: retVal += val + " " elif typ == COMMA: retVal += val elif typ == REGISTER: retVal += val elif typ == OPERAND: if val in immediate: retVal += "%08X" % self.Immediate elif val in displacement: retVal += "%08X" % self.Displacement elif val in ('r8','r16','r32','mm','xmm','/digit','REG'): retVal += self.ModRM.RegOpString(val) elif val in ('r/m8','r/m16','r/m32'): retVal += self.ModRM.RMString(val) else: # should check for other types retVal += val else: raise RuntimeError("Invalid op type[%s %s]" % (typ,val)) return retVal | 312a8fabcc59e1083e8333fb9fdbe374744676e3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11637/312a8fabcc59e1083e8333fb9fdbe374744676e3/x86inst.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6066,
1528,
12,
2890,
4672,
12197,
273,
875,
364,
3815,
16,
1125,
316,
365,
18,
11983,
18,
11983,
3262,
30,
309,
3815,
422,
531,
3513,
2712,
30,
12197,
1011,
1244,
397,
315,
315,
1327,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6066,
1528,
12,
2890,
4672,
12197,
273,
875,
364,
3815,
16,
1125,
316,
365,
18,
11983,
18,
11983,
3262,
30,
309,
3815,
422,
531,
3513,
2712,
30,
12197,
1011,
1244,
397,
315,
315,
1327,
... |
system(os.path.join(self.srcdir, 'doc/examples', script) + args) | system(os.path.join(self.srcdir, 'doc/examples', script) \ + ' ' + args) | def client(self, script, server_host = 'localhost', args = 'CPU'): # run some client stuff stdout_path = os.path.join(self.resultsdir, script + '.stdout') stderr_path = os.path.join(self.resultsdir, script + '.stderr') | 4e4e0c87d07e070c4a714fb7e19bd368eabac3c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12268/4e4e0c87d07e070c4a714fb7e19bd368eabac3c3/netperf2.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1004,
12,
2890,
16,
2728,
16,
1438,
67,
2564,
273,
296,
13014,
2187,
833,
273,
296,
15222,
11,
4672,
468,
1086,
2690,
1004,
10769,
3909,
67,
803,
273,
1140,
18,
803,
18,
5701,
12,
2890... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1004,
12,
2890,
16,
2728,
16,
1438,
67,
2564,
273,
296,
13014,
2187,
833,
273,
296,
15222,
11,
4672,
468,
1086,
2690,
1004,
10769,
3909,
67,
803,
273,
1140,
18,
803,
18,
5701,
12,
2890... |
logging.getLogger('document.storage').debug('Cannot save file indexed content:', exc_info=True) | logging.getLogger('document.storage').warning('Cannot save file indexed content:', exc_info=True) elif self.mode in ('a', 'a+' ): try: par = self._get_parent() cr = pooler.get_db(par.context.dbname).cursor() fsize = os.stat(fname).st_size cr.execute("UPDATE ir_attachment SET file_size = %s " \ " WHERE id = %s", (fsize, par.file_id)) par.content_length = fsize par.content_type = mime cr.commit() cr.close() except Exception: logging.getLogger('document.storage').warning('Cannot save file appended content:', exc_info=True) | def close(self): # TODO: locking in init, close() fname = self.__file.name self.__file.close() if self._need_index: par = self._get_parent() cr = pooler.get_db(par.context.dbname).cursor() icont = '' mime = '' filename = par.path if isinstance(filename, (tuple, list)): filename = '/'.join(filename) try: mime, icont = cntIndex.doIndex(None, filename=filename, content_type=None, realfname=fname) except Exception: logging.getLogger('document.storage').debug('Cannot index file:', exc_info=True) pass | 31d45716ca29df2809d98d6aed3e9a5eb64d20d9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/31d45716ca29df2809d98d6aed3e9a5eb64d20d9/document_storage.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1746,
12,
2890,
4672,
468,
2660,
30,
18887,
316,
1208,
16,
1746,
1435,
5299,
273,
365,
16186,
768,
18,
529,
365,
16186,
768,
18,
4412,
1435,
225,
309,
365,
6315,
14891,
67,
1615,
30,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1746,
12,
2890,
4672,
468,
2660,
30,
18887,
316,
1208,
16,
1746,
1435,
5299,
273,
365,
16186,
768,
18,
529,
365,
16186,
768,
18,
4412,
1435,
225,
309,
365,
6315,
14891,
67,
1615,
30,
7... |
cond1.acquire() cond2.acquire() | def notlambda1(this): cond1.acquire() cond2.acquire() plog("INFO", "Committing jobs...") this.run_all_jobs = True self.schedule_low_prio(notlambda2) cond1.notify() cond1.release() | 04282d1d6496f2be8e8fa3e21f7ef8bdc957fbe1 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3762/04282d1d6496f2be8e8fa3e21f7ef8bdc957fbe1/bwauthority.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
486,
14661,
21,
12,
2211,
4672,
293,
1330,
2932,
5923,
3113,
315,
5580,
1787,
6550,
7070,
13,
333,
18,
2681,
67,
454,
67,
10088,
273,
1053,
365,
18,
10676,
67,
821,
67,
29112,
83,
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,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
486,
14661,
21,
12,
2211,
4672,
293,
1330,
2932,
5923,
3113,
315,
5580,
1787,
6550,
7070,
13,
333,
18,
2681,
67,
454,
67,
10088,
273,
1053,
365,
18,
10676,
67,
821,
67,
29112,
83,
12,
... | |
Works with trig funcitons too. | Works with trig functions too. | def minpoly(self, bits=None, degree=None, epsilon=0): """ Return the minimal polynomial of self, if possible. INPUT: bits -- the number of bits to use in numerical approx degree -- the expected algebraic degree epsilon -- return without error as long as f(self) < epsilon, in the case that the result cannot be proven. All of the above parameters are optional, with epsilon=0, bits and degree tested up to 1000 and 24 by default respectively. If these are known, it will be faster to give them explicitly. OUTPUT: The minimal polynomial of self. This is proved symbolically if epsilon=0 (default). If the minimal polynomial could not be found, two distinct kinds of errors are raised. If no reasonable candidate was found with the given bit/degree parameters, a ValueError will be raised. If a reasonable candidate was found but (perhaps due to limits in the underlying symbolic package) was unable to be proved correct, a NotImplementedError will be raised. ALGORITHM: Use the PARI algdep command on a numerical approximation of self to get a candidate minpoly f. Approximate f(self) to higher precision and if the result is still close enough to 0 then evaluate f(self) symbolically, attempting to prove vanishing. If this fails, and epsilon is non-zero, return f as long as f(self) < epsilon. Otherwise raise an error. NOTE: Failure of this function does not prove self is not algebraic. EXAMPLES: First some simple examples: sage: sqrt(2).minpoly() x^2 - 2 sage: a = 2^(1/3) sage: a.minpoly() x^3 - 2 sage: (sqrt(2)-3^(1/3)).minpoly() x^6 - 6*x^4 + 6*x^3 + 12*x^2 + 36*x + 1 Sometimes it fails. sage: sin(1).minpoly() Traceback (most recent call last): ... ValueError: Could not find minimal polynomial (1000 bits, degree 24). Note that simplification may be necessary. sage: a = sqrt(2)+sqrt(3)+sqrt(5) sage: f = a.minpoly(); f x^8 - 40*x^6 + 352*x^4 - 960*x^2 + 576 sage: f(a) (sqrt(5) + sqrt(3) + sqrt(2))^2*((sqrt(5) + sqrt(3) + sqrt(2))^2*((sqrt(5) + sqrt(3) + sqrt(2))^2*((sqrt(5) + sqrt(3) + sqrt(2))^2 - 40) + 352) - 960) + 576 sage: f(a).simplify_radical() 0 | 95d4116dc08be1313dcb2570b97350591717733d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/95d4116dc08be1313dcb2570b97350591717733d/calculus.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1131,
16353,
12,
2890,
16,
4125,
33,
7036,
16,
10782,
33,
7036,
16,
12263,
33,
20,
4672,
3536,
2000,
326,
16745,
16991,
434,
365,
16,
309,
3323,
18,
225,
12943,
30,
4125,
565,
1493,
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,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1131,
16353,
12,
2890,
16,
4125,
33,
7036,
16,
10782,
33,
7036,
16,
12263,
33,
20,
4672,
3536,
2000,
326,
16745,
16991,
434,
365,
16,
309,
3323,
18,
225,
12943,
30,
4125,
565,
1493,
32... |
if k != end.start(0): | if endbracket.match(rawdata, k) is None: | def parse_endtag(self, i): rawdata = self.rawdata end = endbracket.search(rawdata, i+1) if not end: return -1 res = tagfind.match(rawdata, i+2) if not res: self.syntax_error('no name specified in end tag') tag = '' k = i+2 else: tag = res.group(0) k = res.end(0) if k != end.start(0): self.syntax_error('garbage in end tag') self.finish_endtag(tag) return end.end(0) | 6ab07a6994f604145de2212d52c2267c7ebfeb5c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/6ab07a6994f604145de2212d52c2267c7ebfeb5c/xmllib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
67,
409,
2692,
12,
2890,
16,
277,
4672,
1831,
892,
273,
365,
18,
1899,
892,
679,
273,
679,
21025,
18,
3072,
12,
1899,
892,
16,
277,
15,
21,
13,
309,
486,
679,
30,
327,
300,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
67,
409,
2692,
12,
2890,
16,
277,
4672,
1831,
892,
273,
365,
18,
1899,
892,
679,
273,
679,
21025,
18,
3072,
12,
1899,
892,
16,
277,
15,
21,
13,
309,
486,
679,
30,
327,
300,
2... |
sqlORList.append( "`%s%s`.`%s` = %s" % ( tableType, typeName, keyName, keyValue ) ) | sqlORList.append( "`%s`.`%s` = %s" % ( tableName, keyName, keyValue ) ) | def __queryType( self, typeName, startTime, endTime, condDict, valueFields, groupFields, tableType ): cmd = "SELECT" sqlValues = [] sqlLinkList = [] #Calculate fields to retrieve for vTu in valueFields: if vTu[0] in self.dbCatalog[ typeName ][ 'keys' ]: sqlValues.append( "`key%s`.`value`" % ( vTu[0] ) ) List.appendUnique( sqlLinkList, "`%s%s`.`%s` = `key%s`.`id`" % ( tableType, typeName, vTu[0], vTu[0] ) ) else: sqlValues.append( "`%s%s`.`%s`" % ( tableType, typeName, vTu[0] ) ) if vTu[1]: if not groupFields: return S_OK( "Can't do a %s function without specifying grouping fields" ) sqlValues[-1] = "%s(%s)" % ( vTu[1], sqlValues[-1] ) cmd += " %s" % ", ".join( sqlValues ) #Calculate tables needed keysInRequestedFields = [ value[0] for value in valueFields ] sqlFromList = [ "`%s%s`" % ( tableType, typeName ) ] for key in self.dbCatalog[ typeName ][ 'keys' ]: if key in condDict or key in groupFields or key in keysInRequestedFields: sqlFromList.append( "`key%s`" % key ) cmd += " FROM %s" % ", ".join( sqlFromList ) #Calculate time conditions sqlTimeCond = [] if startTime: sqlTimeCond.append( "`%s%s`.`startTime` >= '%s'" % ( tableType, typeName, startTime.strftime( "%Y-%m-%d %H:%M:%S" ) ) ) if endTime: if tableType == "bucket": endTimeSQLVar = "startTime" else: endTimeSQLVar = "endTime" sqlTimeCond.append( "`%s%s`.`%s` <= '%s'" % ( tableType, typeName, endTimeSQLVar, endTime.strftime( "%Y-%m-%d %H:%M:%S" ) ) ) cmd += " WHERE %s" % " AND ".join( sqlTimeCond ) #Calculate conditions sqlCondList = [] for keyName in condDict: sqlORList = [] if keyName in self.dbCatalog[ typeName ][ 'keys' ]: List.appendUnique( sqlLinkList, "`%s%s`.`%s` = `key%s`.`id`" % ( tableType, typeName, keyName, keyName ) ) if type( condDict[ keyName ] ) not in ( types.ListType, types.TupleType ): condDict[ keyName ] = [ condDict[ keyName ] ] for keyValue in condDict[ keyName ]: retVal = self._escapeString( keyValue ) if not retVal[ 'OK' ]: return retVal keyValue = retVal[ 'Value' ] if keyName in self.dbCatalog[ typeName ][ 'keys' ]: sqlORList.append( "`key%s`.`value` = %s" % ( keyName, keyValue ) ) else: sqlORList.append( "`%s%s`.`%s` = %s" % ( tableType, typeName, keyName, keyValue ) ) sqlCondList.append( "( %s )" % " OR ".join( sqlORList ) ) if sqlCondList: cmd += " AND %s" % " AND ".join( sqlCondList ) #Calculate grouping sqlGroupList = [] if groupFields: for field in groupFields: if field in self.dbCatalog[ typeName ][ 'keys' ]: List.appendUnique( sqlLinkList, "`%s%s`.`%s` = `key%s`.`id`" % ( tableType, typeName, field, field ) ) sqlGroupList.append( "`key%s`.`value`" % field ) else: sqlGroupList.append( "`%s%s`.`%s`" % ( tableType, typeName, field ) ) if sqlLinkList: cmd += " AND %s" % " AND ".join( sqlLinkList ) if sqlGroupList: cmd += " GROUP BY %s" % ", ".join( sqlGroupList ) return self._query( cmd ) | 7663d95782c4987a99eb5394bb9f465c2ab982d5 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12864/7663d95782c4987a99eb5394bb9f465c2ab982d5/AccountingDB.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2271,
559,
12,
365,
16,
8173,
16,
8657,
16,
13859,
16,
6941,
5014,
16,
460,
2314,
16,
1041,
2314,
16,
1014,
559,
262,
30,
1797,
273,
315,
4803,
6,
1847,
1972,
273,
5378,
1847,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2271,
559,
12,
365,
16,
8173,
16,
8657,
16,
13859,
16,
6941,
5014,
16,
460,
2314,
16,
1041,
2314,
16,
1014,
559,
262,
30,
1797,
273,
315,
4803,
6,
1847,
1972,
273,
5378,
1847,
... |
sep.setSizePolicy(QSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding)) | sep.setSizePolicy(QSizePolicy(QSizePolicy.Expanding, QSizePolicy.Fixed)) | def __init__(self, canvasDlg, *args): apply(QDialog.__init__,(self,) + args) self.canvasDlg = canvasDlg if (int(qVersion()[0]) >= 3): if sys.platform == "darwin": self.setCaption("Preferences") else: self.setCaption("Canvas Options") else: if sys.platform == "darwin": self.setCaption("Qt Preferences") else: self.setCaption("Qt Canvas Options") #self.controlArea = QVBoxLayout (self) self.topLayout = QVBoxLayout( self, 10 ) self.resize(500,450) | 88d5ca5daa088f5e7b2395a03616a49942be66ce /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6366/88d5ca5daa088f5e7b2395a03616a49942be66ce/orngDlgs.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
5953,
40,
23623,
16,
380,
1968,
4672,
2230,
12,
53,
6353,
16186,
2738,
972,
16,
12,
2890,
16,
13,
397,
833,
13,
365,
18,
15424,
40,
23623,
273,
5953,
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,
1001,
2738,
972,
12,
2890,
16,
5953,
40,
23623,
16,
380,
1968,
4672,
2230,
12,
53,
6353,
16186,
2738,
972,
16,
12,
2890,
16,
13,
397,
833,
13,
365,
18,
15424,
40,
23623,
273,
5953,
4... |
exceptions += 1 exception_indices.append(i) | def generate_plot_points(f, xrange, plot_points=5, adaptive_tolerance=0.01, adaptive_recursion=5, randomize = True): r""" Calculate plot points for a function f in the interval xrange. The adaptive refinement algorithm for plotting a function f. See the docstring for plot for a description of the algorithm. INPUT: - ``f`` - a function of one variable - ``p1, p2`` - two points to refine between - ``plot_points`` - (default: 5) the minimal number of plot points. - ``adaptive_recursion`` - (default: 5) how many levels of recursion to go before giving up when doing adaptive refinement. Setting this to 0 disables adaptive refinement. - ``adaptive_tolerance`` - (default: 0.01) how large a difference should be before the adaptive refinement code considers it significant. See the documentation for plot() for more information. OUTPUT: - a list of points (x, f(x)) in the interval xrange, which aproximate the function f. TESTS:: sage: from sage.plot.plot import generate_plot_points sage: generate_plot_points(sin, (0, pi), plot_points=2, adaptive_recursion=0) [(0.0, 0.0), (3.1415926535897931, 1.2246...e-16)] sage: generate_plot_points(sin(x).function(x), (-pi, pi), randomize=False) [(-3.1415926535897931, -1.2246...e-16), (-2.748893571891069, -0.3826834323650898...), (-2.3561944901923448, -0.707106781186547...), (-2.1598449493429825, -0.831469612302545...), (-1.9634954084936207, -0.92387953251128674), (-1.7671458676442586, -0.98078528040323043), (-1.5707963267948966, -1.0), (-1.3744467859455345, -0.98078528040323043), (-1.1780972450961724, -0.92387953251128674), (-0.98174770424681035, -0.831469612302545...), (-0.78539816339744828, -0.707106781186547...), (-0.39269908169872414, -0.38268343236508978), (0.0, 0.0), (0.39269908169872414, 0.38268343236508978), (0.78539816339744828, 0.707106781186547...), (0.98174770424681035, 0.831469612302545...), (1.1780972450961724, 0.92387953251128674), (1.3744467859455345, 0.98078528040323043), (1.5707963267948966, 1.0), (1.7671458676442586, 0.98078528040323043), (1.9634954084936207, 0.92387953251128674), (2.1598449493429825, 0.831469612302545...), (2.3561944901923448, 0.707106781186547...), (2.748893571891069, 0.3826834323650898...), (3.1415926535897931, 1.2246...e-16)] This shows that lowering adaptive_tolerance and raising adaptive_recursion both increase the number of subdivision points:: sage: x = var('x') sage: f(x) = sin(1/x) sage: [len(generate_plot_points(f, (-pi, pi), adaptive_tolerance=i)) for i in [0.01, 0.001, 0.0001]] [42, 67, 104] sage: [len(generate_plot_points(f, (-pi, pi), adaptive_recursion=i)) for i in [5, 10, 15]] [34, 144, 897] """ x, data = var_and_list_of_values(xrange, plot_points) xmin = data[0] xmax = data[-1] delta = float(xmax-xmin) / plot_points random = current_randstate().python_random().random exceptions = 0; msg='' exception_indices = [] for i in range(len(data)): xi = data[i] # Slightly randomize the interior sample points if # randomize is true if randomize and i > 0 and i < plot_points-1: xi += delta*(random() - 0.5) try: data[i] = (float(xi), float(f(xi))) if str(data[i][1]) in ['nan', 'NaN', 'inf', '-inf']: sage.misc.misc.verbose("%s\nUnable to compute f(%s)"%(msg, x),1) exceptions += 1 exception_indices.append(i) except (ZeroDivisionError, TypeError, ValueError, OverflowError), msg: sage.misc.misc.verbose("%s\nUnable to compute f(%s)"%(msg, x),1) if i == 0: for j in range(1, 99): xj = xi + delta*j/100.0 try: data[i] = (float(xj), float(f(xj))) # nan != nan if data[i][1] != data[i][1]: continue break except (ZeroDivisionError, TypeError, ValueError, OverflowError), msg: pass else: exceptions += 1 exception_indices.append(i) elif i == plot_points-1: for j in range(1, 99): xj = xi - delta*j/100.0 try: data[i] = (float(xj), float(f(xj))) # nan != nan if data[i][1] != data[i][1]: continue break except (ZeroDivisionError, TypeError, ValueError, OverflowError), msg: pass else: exceptions += 1 exception_indices.append(i) else: exceptions += 1 exception_indices.append(i) exceptions += 1 exception_indices.append(i) data = [data[i] for i in range(len(data)) if i not in exception_indices] # adaptive refinement i, j = 0, 0 adaptive_tolerance = delta * float(adaptive_tolerance) adaptive_recursion = int(adaptive_recursion) while i < len(data) - 1: for p in adaptive_refinement(f, data[i], data[i+1], adaptive_tolerance=adaptive_tolerance, adaptive_recursion=adaptive_recursion): data.insert(i+1, p) i += 1 i += 1 if (len(data) == 0 and exceptions > 0) or exceptions > 10: sage.misc.misc.verbose("WARNING: When plotting, failed to evaluate function at %s points."%exceptions, level=0) sage.misc.misc.verbose("Last error message: '%s'"%msg, level=0) return data | 5a18232fc0cdbd019cc9c3bfc626cafbc7bf6b83 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/5a18232fc0cdbd019cc9c3bfc626cafbc7bf6b83/plot.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2103,
67,
4032,
67,
4139,
12,
74,
16,
12314,
16,
3207,
67,
4139,
33,
25,
16,
5855,
688,
67,
25456,
33,
20,
18,
1611,
16,
5855,
688,
67,
31347,
33,
25,
16,
2744,
554,
273,
1053,
467... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2103,
67,
4032,
67,
4139,
12,
74,
16,
12314,
16,
3207,
67,
4139,
33,
25,
16,
5855,
688,
67,
25456,
33,
20,
18,
1611,
16,
5855,
688,
67,
31347,
33,
25,
16,
2744,
554,
273,
1053,
467... | |
'str-constant-old-prefix=', | 'define-prefix=', | def do_val(self, val, prefix, last): name = (val.getAttribute('suffix') or val.getAttribute('name')).replace('_', '') self.h("""\ | 78883759218488c6c51b43db3259b8dda944ce93 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7593/78883759218488c6c51b43db3259b8dda944ce93/qt4-constants-gen.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
67,
1125,
12,
2890,
16,
1244,
16,
1633,
16,
1142,
4672,
508,
273,
261,
1125,
18,
588,
1499,
2668,
8477,
6134,
578,
1244,
18,
588,
1499,
2668,
529,
6134,
2934,
2079,
2668,
67,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
67,
1125,
12,
2890,
16,
1244,
16,
1633,
16,
1142,
4672,
508,
273,
261,
1125,
18,
588,
1499,
2668,
8477,
6134,
578,
1244,
18,
588,
1499,
2668,
529,
6134,
2934,
2079,
2668,
67,
2187... |
self._baseObjRef = ContainerRef(Indirection(evalStr='simbase.__dict__')) for i in self._nameContainerGen(simbase.__dict__, self._baseObjRef): | ref = ContainerRef(Indirection(evalStr='simbase.__dict__')) self._id2baseStartRef[id(simbase.__dict__)] = ref for i in self._addContainerGen(simbase.__dict__, ref): | def __init__(self, name, leakDetector): Job.__init__(self, name) self._leakDetector = leakDetector self._id2ref = self._leakDetector._id2ref self.notify = self._leakDetector.notify ContainerLeakDetector.addPrivateObj(self.__dict__) | 2144050758ff193ad2f7bd973df523fae0d7fd5c /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8543/2144050758ff193ad2f7bd973df523fae0d7fd5c/ContainerLeakDetector.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
508,
16,
20891,
12594,
4672,
3956,
16186,
2738,
972,
12,
2890,
16,
508,
13,
365,
6315,
298,
581,
12594,
273,
20891,
12594,
365,
6315,
350,
22,
1734,
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,
1001,
2738,
972,
12,
2890,
16,
508,
16,
20891,
12594,
4672,
3956,
16186,
2738,
972,
12,
2890,
16,
508,
13,
365,
6315,
298,
581,
12594,
273,
20891,
12594,
365,
6315,
350,
22,
1734,
273,
... |
if self->element: y += element->vgap | y += vgap | static def gul_box_top_down(LandWidget *self): # A hidden box needs no layout since it gets assigned no space. A box # without layout is fully affected by the layout of its parent - but does # not allow the layout algorithm to run on its children. if self->box.flags & (GUL_HIDDEN | GUL_NO_LAYOUT): return D(printf("Box (%s[%p]): %d[%d] x %d[%d] at %d/%d\n", self->vt->name, self, self->box.w, self->box.cols, self->box.h, self->box.rows, self->box.x, self->box.y);) if self->box.cols == 0 or self->box.rows == 0: D(printf(" empty.\n");) return int minw = min_width(self) int minh = min_height(self) if self->box.max_width and minw > self->box.max_width: ERR("Fatal: Minimum width of children (%d) " "exceeds available space (%d).", minw, self->box.max_width) if self->box.max_height and minh > self->box.max_height: ERR("Fatal: Minimum height of children (%d) " "exceeds available space (%d).", minh, self->box.max_height) LandWidgetThemeElement *element = self->element int available_width = self->box.w - minw int available_height = self->box.h - minh int want_width = expanding_columns(self) int want_height = expanding_rows(self) D(printf(" Children: %d (%d exp) x %d (%d exp)\n", self->box.cols, want_width, self->box.rows, want_height); printf(" %d x %d\n", minw, minh);) int i, j # Adjust column positions and widths. int x = self->box.x if self->element: x += element->il int share = 0 if want_width: share = available_width / want_width available_width -= share * want_width D(printf(" Columns:");) for i = 0; i < self->box.cols; i++: int cw = column_min_width(self, i) int cx = x if is_column_expanding(self, i): cw += share # The first columns may get an extra pixel, in case we can't # evenly share. if available_width: cw += 1 available_width -= 1 D(printf(" <->%d", cw);) else: D(printf(" [-]%d", cw);) x += cw if self->element: x += element->hgap # Place all rows in the column accordingly for j = 0; j < self->box.rows; j++: LandWidget *c = lookup_box_in_grid(self, i, j) if c and c->box.row == j: # Prevent recursive layout updates. The layout algorithm itself # is recursive already. Maybe this needs to be re-thought (i.e. # make child widgets update their layout in resize handlers # independently, and this function gets non-recursive instead). int f = land_widget_layout_freeze(c) # Multi-row cells already were handled. if c->box.col == i: int dx = cx - c->box.x int dw = cw - c->box.w land_widget_move(c, dx, 0) land_widget_size(c, dw, 0) else: int dw = cw - c->box.w land_widget_size(c, dw, 0) if f: land_widget_layout_unfreeze(c) D(printf("\n");) D(printf(" Rows:");) # Adjust row positions and heights. int y = self->box.y if self->element: y += element->it share = 0 if want_height: share = available_height / want_height available_height -= share * want_height for j = 0; j < self->box.rows; j++: int ch = row_min_height(self, j) int cy = y if (is_row_expanding(self, j)): ch += share # The first rows may get an extra pixel, in case we can't # evenly share. if available_height: ch += 1 available_height -= 1 D(printf(" <->%d", ch);) else: D(printf(" [-]%d", ch);) y += ch if self->element: y += element->vgap # Place all columns in the row accordingly. for i = 0; i < self->box.cols; i++: LandWidget *c = lookup_box_in_grid(self, i, j) if c and c->box.col == i: int f = land_widget_layout_freeze(c) # Multi-column cells already were handled. if c->box.row == j: int dy = cy - c->box.y int dh = ch - c->box.h land_widget_move(c, 0, dy) land_widget_size(c, 0, dh) else: int dh = ch - c->box.h land_widget_size(c, 0, dh) if f: land_widget_layout_unfreeze(c) D(printf("\n");) if land_widget_is(self, LAND_WIDGET_ID_CONTAINER): LandWidgetContainer *container = LAND_WIDGET_CONTAINER(self) if container->children: LandListItem *li = container->children->first for ; li; li = li->next: LandWidget *c = li->data gul_box_top_down(c) | 7bb29d12dcca2d1a8ae72f0162e9f8766b3ed40c /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/930/7bb29d12dcca2d1a8ae72f0162e9f8766b3ed40c/gul.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
760,
1652,
314,
332,
67,
2147,
67,
3669,
67,
2378,
12,
29398,
4609,
380,
2890,
4672,
468,
432,
5949,
3919,
4260,
1158,
3511,
3241,
518,
5571,
6958,
1158,
3476,
18,
432,
3919,
468,
2887,
3511,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
760,
1652,
314,
332,
67,
2147,
67,
3669,
67,
2378,
12,
29398,
4609,
380,
2890,
4672,
468,
432,
5949,
3919,
4260,
1158,
3511,
3241,
518,
5571,
6958,
1158,
3476,
18,
432,
3919,
468,
2887,
3511,
... |
print "No medical images found on given directory" | utils.debug("No medical images found on given directory") | def ImportMedicalImages(self, directory): # OPTION 1: DICOM? patients_groups = dcm.GetDicomGroups(directory) | effbb9a2aa1544431774c17b256fffff9cfdd9f2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10228/effbb9a2aa1544431774c17b256fffff9cfdd9f2/control.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6164,
13265,
1706,
8946,
12,
2890,
16,
1867,
4672,
468,
7845,
404,
30,
30530,
35,
9670,
5828,
67,
4650,
273,
27456,
18,
967,
40,
335,
362,
3621,
12,
5149,
13,
2,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6164,
13265,
1706,
8946,
12,
2890,
16,
1867,
4672,
468,
7845,
404,
30,
30530,
35,
9670,
5828,
67,
4650,
273,
27456,
18,
967,
40,
335,
362,
3621,
12,
5149,
13,
2,
-100,
-100,
-100,
-100... |
if isinstance(item, str): | if isinstance(item, str) or isinstance(item, unicode): | def getoverlay(item): if not config.OVERLAY_DIR: return '' if isinstance(item, str): # it's a directory, return it directory = os.path.abspath(item) for media in config.REMOVABLE_MEDIA: if directory.startswith(media.mountdir): directory = directory[len(media.mountdir):] return os.path.join(config.OVERLAY_DIR, 'disc', media.id + directory) return os.path.join(config.OVERLAY_DIR, directory[1:]) directory = item.dir if item.media: directory = directory[len(item.media.mountdir):] if len(directory) and directory[0] == '/': directory = directory[1:] return os.path.join(config.OVERLAY_DIR, 'disc', item.media.id, directory) else: if len(directory) and directory[0] == '/': directory = directory[1:] return os.path.join(config.OVERLAY_DIR, directory) | 5ddc170f3e82f5f738bc196eee62f17c141c85b4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/5ddc170f3e82f5f738bc196eee62f17c141c85b4/vfs.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
17312,
12,
1726,
4672,
309,
486,
642,
18,
12959,
7868,
67,
4537,
30,
327,
875,
225,
309,
1549,
12,
1726,
16,
609,
13,
578,
1549,
12,
1726,
16,
5252,
4672,
468,
518,
1807,
279,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
17312,
12,
1726,
4672,
309,
486,
642,
18,
12959,
7868,
67,
4537,
30,
327,
875,
225,
309,
1549,
12,
1726,
16,
609,
13,
578,
1549,
12,
1726,
16,
5252,
4672,
468,
518,
1807,
279,
1... |
try: pending_sockets = bind_list + send_sockets_pending log.debug("%s: Waiting on %d sockets", exit.nickname, len(pending_sockets)) while len(pending_sockets) > 0: ready, ignore, me = \ select.select(pending_sockets, [], [], 60) log.debug("%s: %d sockets are ready.", exit.nickname, len(ready)) for s in ready: if s in bind_list: | pending_sockets = bind_list + send_sockets_pending while len(pending_sockets) > 0: ready, ignore, me = select.select(pending_sockets, [], [], 5) if len(ready) == 0: log.debug("%s: select() timeout (accept/SOCKS stage)!", exit.nickname) break for s in ready: if s in bind_list: pending_sockets.remove(s) recv_sock, peer = s.accept() recv_sockets.append(recv_sock) peer_ip, ignore = recv_sock.getpeername() ignore, listen_port = recv_sock.getsockname() log.debug("%s: accepted connection from %s on port %d.", exit.nickname, peer_ip, listen_port) else: status = s.complete_handshake() if status == socks4socket.SOCKS4_CONNECTED: log.debug("SOCKS4 connect successful!") send_sockets.append(s) | def exit_test(self, router): tests = {} results = [] test_ports = [] recv_sockets = [] self.test_exit = router exit = router.router # FIXME | edf3e1ef6dbdfa62fde9e97a9acdba9c0ebf2af5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9986/edf3e1ef6dbdfa62fde9e97a9acdba9c0ebf2af5/torbel.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2427,
67,
3813,
12,
2890,
16,
4633,
4672,
7434,
273,
2618,
1686,
273,
5378,
1842,
67,
4363,
273,
5378,
10665,
67,
7814,
87,
273,
5378,
365,
18,
3813,
67,
8593,
273,
4633,
2427,
273,
46... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2427,
67,
3813,
12,
2890,
16,
4633,
4672,
7434,
273,
2618,
1686,
273,
5378,
1842,
67,
4363,
273,
5378,
10665,
67,
7814,
87,
273,
5378,
365,
18,
3813,
67,
8593,
273,
4633,
2427,
273,
46... |
help(module) or call help('modulename').''' | help(module) or call help('modulename').''' % sys.version[:3] | def __repr__(self): return '''To get help on a Python object, call help(object). | 0062bfa031ffe28127bb5a6f4ed85ad6b4e0e2fb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/0062bfa031ffe28127bb5a6f4ed85ad6b4e0e2fb/pydoc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
12715,
972,
12,
2890,
4672,
327,
9163,
774,
336,
2809,
603,
279,
6600,
733,
16,
745,
2809,
12,
1612,
2934,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
12715,
972,
12,
2890,
4672,
327,
9163,
774,
336,
2809,
603,
279,
6600,
733,
16,
745,
2809,
12,
1612,
2934,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
where prov.depId = reqs.depId | on prov.depId = reqs.depId | def _removeTrove(self, name, version, flavor, markOnly = False): #if name.startswith('group-') and not name.endswith(':source'): #raise errors.CommitError('Marking a group as removed is not implemented') cu = self.db.cursor() | e2dfd6d38dc51b58a06c0f95eec6cc7ed0f1865d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8747/e2dfd6d38dc51b58a06c0f95eec6cc7ed0f1865d/trovestore.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
4479,
56,
303,
537,
12,
2890,
16,
508,
16,
1177,
16,
19496,
16,
2267,
3386,
273,
1083,
4672,
468,
430,
508,
18,
17514,
1918,
2668,
1655,
17,
6134,
471,
486,
508,
18,
5839,
1918,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4479,
56,
303,
537,
12,
2890,
16,
508,
16,
1177,
16,
19496,
16,
2267,
3386,
273,
1083,
4672,
468,
430,
508,
18,
17514,
1918,
2668,
1655,
17,
6134,
471,
486,
508,
18,
5839,
1918,
... |
fd, destination_path = tempfile.mkstemp(prefix=uid, suffix=extension, dir=destination_dir) | fd, destination_path = tempfile.mkstemp(prefix=uid + '_', suffix=extension, dir=destination_dir) | def retrieve(self, uid, user_id, extension): """Place the file associated to a given entry into a directory where the user can read it. The caller is reponsible for deleting this file. | ba0a546d53bb10aa8540f9725488c8f7d0dde250 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9394/ba0a546d53bb10aa8540f9725488c8f7d0dde250/filestore.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4614,
12,
2890,
16,
4555,
16,
729,
67,
350,
16,
2710,
4672,
3536,
6029,
326,
585,
3627,
358,
279,
864,
1241,
1368,
279,
1867,
1625,
326,
729,
848,
855,
518,
18,
1021,
4894,
353,
283,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4614,
12,
2890,
16,
4555,
16,
729,
67,
350,
16,
2710,
4672,
3536,
6029,
326,
585,
3627,
358,
279,
864,
1241,
1368,
279,
1867,
1625,
326,
729,
848,
855,
518,
18,
1021,
4894,
353,
283,
... |
r'(?P<%s><(?:font color="|span style="color: ) for c in colors.items() ] | r'(?P<%s><(?:font color="|span style="color: ) for c in colors.items() ] | def rules(cls): colors = dict(comment='FF8000', lang='0000BB', keyword='007700', string='DD0000') # rules check for <font> for PHP 4 or <span> for PHP 5 color_rules = [ r'(?P<%s><(?:font color="|span style="color: )#%s">)' % c for c in colors.items() ] return color_rules + [ r'(?P<font><font.*?>)', r'(?P<endfont></font>)' ] | c4383fe7f52e581fd7efd65ae9315ec01aec83a8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2831/c4383fe7f52e581fd7efd65ae9315ec01aec83a8/php.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2931,
12,
6429,
4672,
5740,
273,
2065,
12,
3469,
2218,
2246,
26021,
2187,
3303,
2218,
2787,
9676,
2187,
4932,
2218,
713,
4700,
713,
2187,
533,
2218,
5698,
2787,
6134,
468,
2931,
866,
364,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2931,
12,
6429,
4672,
5740,
273,
2065,
12,
3469,
2218,
2246,
26021,
2187,
3303,
2218,
2787,
9676,
2187,
4932,
2218,
713,
4700,
713,
2187,
533,
2218,
5698,
2787,
6134,
468,
2931,
866,
364,
... |
name = model.name | iconview_name = model.id | def edsm_delete_state(self, state): iconview = state.iconView() if iconview: iconview.takeItem(state) model = state._model if isinstance(state, IconViewSubgraphIcon): name = model.name for iconview in self.iconviews(1): if iconview.name() == name: iconview.clear() self.edsm_tabs.removePage(iconview) model.discard() self.emit_graph_changed() | f458993bb9d05b9647afaa3c7fdc3e962993b349 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2527/f458993bb9d05b9647afaa3c7fdc3e962993b349/edsm_editor.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1675,
4808,
67,
3733,
67,
2019,
12,
2890,
16,
919,
4672,
4126,
1945,
273,
919,
18,
3950,
1767,
1435,
309,
4126,
1945,
30,
4126,
1945,
18,
22188,
1180,
12,
2019,
13,
938,
273,
919,
6315... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1675,
4808,
67,
3733,
67,
2019,
12,
2890,
16,
919,
4672,
4126,
1945,
273,
919,
18,
3950,
1767,
1435,
309,
4126,
1945,
30,
4126,
1945,
18,
22188,
1180,
12,
2019,
13,
938,
273,
919,
6315... |
cS = matrixmultiply( matrixmultiply(transpose(evec_L), S_orig), evec_L) det = determinant(evec_L) if int(det) != 1: cS = -cS | cS = matrixmultiply(matrixmultiply(RL, S0), RLt) | def calc_TLS_center_of_reaction(T_orig, L_orig, S_orig, origin): """Calculate new tensors based on the center for reaction. This method returns a dictionary of the calculations: T^: T tensor in the coordinate system of L L^: L tensor in the coordinate system of L S^: S tensor in the coordinate system of L COR: Center of Reaction T',S',L': T,L,S tensors in origonal coordinate system with the origin shifted to the center of reaction. """ ## LSMALL is the smallest magnitude of L before it is considered 0.0 LSMALL = 1e-6 rdict = {} ## set the L tensor eigenvalues and eigenvectors (eval_L, evec_L) = eigenvectors(L_orig) rdict["L1_eigen_val"] = eval_L[0] rdict["L2_eigen_val"] = eval_L[1] rdict["L3_eigen_val"] = eval_L[2] rdict["L1_eigen_vec"] = evec_L[0] rdict["L2_eigen_vec"] = evec_L[1] rdict["L3_eigen_vec"] = evec_L[2] ## transpose the original the evec_L so it can be used ## to rotate the other tensors evec_L = transpose(evec_L) ## carrot-L tensor (tensor WRT principal axes of L) cL = zeros([3,3], Float) cL[0,0] = eval_L[0] cL[1,1] = eval_L[1] cL[2,2] = eval_L[2] rdict["L^"] = cL ## carrot-T tensor (T tensor WRT principal axes of L) cT = matrixmultiply( matrixmultiply(transpose(evec_L), T_orig), evec_L) rdict["T^"] = cT ## carrot-S tensor (S tensor WRT principal axes of L) cS = matrixmultiply( matrixmultiply(transpose(evec_L), S_orig), evec_L) ## correct for left-handed libration eigenvectors det = determinant(evec_L) if int(det) != 1: cS = -cS rdict["S^"] = cS ## ^rho: the origin-shift vector in the coordinate system of L cL1122 = cL[1,1] + cL[2,2] cL2200 = cL[2,2] + cL[0,0] cL0011 = cL[0,0] + cL[1,1] if cL1122>LSMALL: crho0 = (cS[1,2]-cS[2,1]) / cL1122 else: crho0 = 0.0 if cL2200>LSMALL: crho1 = (cS[2,0]-cS[0,2]) / cL2200 else: crho1 = 0.0 if cL0011>LSMALL: crho2 = (cS[0,1]-cS[1,0]) / cL0011 else: crho2 = 0.0 crho = array([crho0, crho1, crho2], Float) rdict["RHO^"] = crho ## rho: the origin-shift vector in orthogonal coordinates rho = matrixmultiply(evec_L, crho) rdict["RHO"] = rho rdict["COR"] = origin + rho.copy() ## set up the origin shift matrix PRHO WRT orthogonal axes PRHO = array([ [ 0.0, rho[2], -rho[1]], [-rho[2], 0.0, rho[0]], [ rho[1], -rho[0], 0.0] ], Float) ## set up the origin shift matrix cPRHO WRT libration axes cPRHO = array([ [ 0.0, crho[2], -crho[1]], [-crho[2], 0.0, crho[0]], [ crho[1], -crho[0], 0.0] ], Float) ## calculate tranpose of cPRHO, ans cS cSt = transpose(cS) cPRHOt = transpose(cPRHO) ## calculate S'^ = S^ + L^*pRHOt cSp = cS + matrixmultiply(cL, cPRHOt) rdict["S'^"] = cSp ## L'^ = L^ = cL rdict["L'^"] = cL ## calculate T'^ = cT + cPRHO*S^ + cSt*cPRHOt + cPRHO*cL*cPRHOt * cTp = cT + \ matrixmultiply(cPRHO, cS) + \ matrixmultiply(cSt, cPRHOt) + \ matrixmultiply(matrixmultiply(cPRHO, cL), cPRHOt) rdict["T'^"] = cTp ## transpose of PRHO and S PRHOt = transpose(PRHO) St = transpose(S_orig) ## calculate S' = S + L*PRHOt Sp = S_orig + matrixmultiply(L_orig, PRHOt) rdict["S'"] = Sp ## calculate T' = T + PRHO*S + St*PRHOT + PRHO*L*PRHOt Tp = T_orig + \ matrixmultiply(PRHO, S_orig) + \ matrixmultiply(St, PRHOt) + \ matrixmultiply(matrixmultiply(PRHO, L_orig), PRHOt) rdict["T'"] = Tp ## L' is just L rdict["L'"] = L_orig.copy() ## now calculate the TLS motion description using 3 non ## intersecting screw axes, with one ## libration axis 1 shift in the L coordinate system if cL[0,0]>LSMALL: cL1rho = array([0.0, -cSp[0,2]/cL[0,0], cSp[0,1]/cL[0,0]], Float) else: cL1rho = zeros(3, Float) ## libration axis 2 shift in the L coordinate system if cL[1,1]>LSMALL: cL2rho = array([cSp[1,2]/cL[1,1], 0.0, -cSp[1,0]/cL[1,1]], Float) else: cL2rho = zeros(3, Float) ## libration axis 2 shift in the L coordinate system if cL[2,2]>LSMALL: cL3rho = array([-cSp[2,1]/cL[2,2], cSp[2,0]/cL[2,2], 0.0], Float) else: cL3rho = zeros(3, Float) ## libration axes shifts in the origional orthogonal ## coordinate system rdict["L1_rho"] = matrixmultiply(evec_L, cL1rho) rdict["L2_rho"] = matrixmultiply(evec_L, cL2rho) rdict["L3_rho"] = matrixmultiply(evec_L, cL3rho) ## calculate screw pitches (A*R / R*R) = (A/R) if cL[0,0]>LSMALL: rdict["L1_pitch"] = cS[0,0]/cL[0,0] else: rdict["L1_pitch"] = 0.0 if cL[1,1]>LSMALL: rdict["L2_pitch"] = cS[1,1]/cL[1,1] else: rdict["L2_pitch"] = 0.0 if cL[2,2]>LSMALL: rdict["L3_pitch"] = cS[2,2]/cL[2,2] else: rdict["L3_pitch"] = 0.0 ## now calculate the reduction in T for the screw rotation axes cTred = cT.copy() for i in (0, 1, 2): for k in (0, 1, 2): if i==k: continue if cL[k,k]>LSMALL: cTred[i,i] -= (cS[k,i]**2) / cL[k,k] for i in (0, 1, 2): for j in (0, 1, 2): for k in (0, 1, 2): if j==i: continue if cL[k,k]>LSMALL: cTred[i,j] -= (cS[k,i]*cS[k,j]) / cL[k,k] ## rotate the newly calculated reduced-T tensor from the carrot ## coordinate system (coordinate system of L) back to the structure ## coordinate system rdict["rT'"] = matrixmultiply( transpose(evec_L), matrixmultiply(cTred, evec_L)) return rdict | 742140185bc8b6b74df991525abcac33bdc82b5f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10674/742140185bc8b6b74df991525abcac33bdc82b5f/TLS.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7029,
67,
9905,
67,
5693,
67,
792,
67,
266,
1128,
12,
56,
67,
4949,
16,
511,
67,
4949,
16,
348,
67,
4949,
16,
4026,
4672,
3536,
8695,
394,
25122,
2511,
603,
326,
4617,
364,
12836,
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,
7029,
67,
9905,
67,
5693,
67,
792,
67,
266,
1128,
12,
56,
67,
4949,
16,
511,
67,
4949,
16,
348,
67,
4949,
16,
4026,
4672,
3536,
8695,
394,
25122,
2511,
603,
326,
4617,
364,
12836,
18... |
dt = "%04d-%02d-%02d %02d:%02d:%02d" % (int(m.group(1)), int(m.group(2)), int(m.group(3)), int(m.group(4)), int(m.group(5)), int(m.group(6))) | dt = "%04d-%02d-%02d %02d:%02d:%02d" % (int(m.group(1)), int(m.group(2)), int(m.group(3)), int(m.group(4)), int(m.group(5)), int(m.group(6))) | def epochdate(timestamp, short=False): """ This function converts an ISO timestamp into seconds since epoch Set short to False when the timestamp is in the YYYY-MM-DDTHH:MM:SSZZZ:ZZ format Set short to True when the timestamp is in the YYYYMMDDTHHMMSSZZZZZ format """ try: # Split date/time and timezone information m = parse_iso8601.search(timestamp) if m is None: logger.warn("ERROR: Unable to match \"%s\" to ISO 8601" % timestamp) return None else: dt = "%04d-%02d-%02d %02d:%02d:%02d" % (int(m.group(1)), int(m.group(2)), int(m.group(3)), int(m.group(4)), int(m.group(5)), int(m.group(6))) tz = m.group(8) # my_time = datetime.datetime.strptime(dt, "%Y-%m-%d %H:%M:%S") my_time = datetime.datetime(*(time.strptime(dt, "%Y-%m-%d %H:%M:%S")[0:6])) if tz.upper() != 'Z': # no zulu time, has zone offset my_offset = datetime.timedelta(hours=int(m.group(9)),minutes=int(m.group(10))) # adjust for time zone offset if tz[0] == '-': my_time = my_time + my_offset else: my_time = my_time - my_offset # Turn my_time into Epoch format return int(calendar.timegm(my_time.timetuple())) except: logger.warn("ERROR: Unable to parse timestamp \"%s\"" % timestamp) return None | ec3dc9cdead2489da3b7ab87ae68c419675b0329 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9868/ec3dc9cdead2489da3b7ab87ae68c419675b0329/utils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7632,
712,
12,
5508,
16,
3025,
33,
8381,
4672,
3536,
1220,
445,
7759,
392,
9351,
2858,
1368,
3974,
3241,
7632,
1000,
3025,
358,
1083,
1347,
326,
2858,
353,
316,
326,
26699,
17,
8206,
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,
7632,
712,
12,
5508,
16,
3025,
33,
8381,
4672,
3536,
1220,
445,
7759,
392,
9351,
2858,
1368,
3974,
3241,
7632,
1000,
3025,
358,
1083,
1347,
326,
2858,
353,
316,
326,
26699,
17,
8206,
17,... |
raise RmakeError('\n'.join(err)) | raise errors.RmakeError('\n'.join(err)) | def startChrootSession(self, jobId, troveSpec, command, superUser=False, chrootHost=None, chrootPath=None): job = self.client.getJob(jobId, withTroves=False) if not troveSpec: troveTups = list(job.iterTroveList(True)) if len(troveTups) > 1: raise RmakeError('job has more than one trove in it, must specify trovespec to chroot into') | 4bb9219987653f910477d83f91da57ad18a0098c /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8749/4bb9219987653f910477d83f91da57ad18a0098c/helper.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
787,
782,
3085,
2157,
12,
2890,
16,
13845,
16,
23432,
537,
1990,
16,
1296,
16,
2240,
1299,
33,
8381,
16,
462,
3085,
2594,
33,
7036,
16,
462,
3085,
743,
33,
7036,
4672,
1719,
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,
787,
782,
3085,
2157,
12,
2890,
16,
13845,
16,
23432,
537,
1990,
16,
1296,
16,
2240,
1299,
33,
8381,
16,
462,
3085,
2594,
33,
7036,
16,
462,
3085,
743,
33,
7036,
4672,
1719,
273,
365,
... |
def show(self, wwidth, hheight): | def show(self): | def show(self, wwidth, hheight): # setting window in all desktops self.get_widget('window-root').stick() | 6be2eec8b415f57c057fc60a1f8f6ad060fa3ee9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11147/6be2eec8b415f57c057fc60a1f8f6ad060fa3ee9/guake.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2405,
12,
2890,
4672,
468,
3637,
2742,
316,
777,
21304,
87,
365,
18,
588,
67,
6587,
2668,
5668,
17,
3085,
16063,
334,
1200,
1435,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2405,
12,
2890,
4672,
468,
3637,
2742,
316,
777,
21304,
87,
365,
18,
588,
67,
6587,
2668,
5668,
17,
3085,
16063,
334,
1200,
1435,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
nodes = [] nodes.append(self.expr) if self.locals is not None: nodes.append(self.locals) if self.globals is not None: nodes.append(self.globals) return tuple(nodes) | nodelist = [] nodelist.append(self.expr) if self.locals is not None: nodelist.append(self.locals) if self.globals is not None: nodelist.append(self.globals) return tuple(nodelist) | def getChildNodes(self): nodes = [] nodes.append(self.expr) if self.locals is not None: nodes.append(self.locals) if self.globals is not None: nodes.append(self.globals) return tuple(nodes) | f9790adb2bf17d408a715f552f9ea1f6de672d26 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/f9790adb2bf17d408a715f552f9ea1f6de672d26/ast.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
23895,
12,
2890,
4672,
2199,
273,
5378,
2199,
18,
6923,
12,
2890,
18,
8638,
13,
309,
365,
18,
17977,
353,
486,
599,
30,
5411,
2199,
18,
6923,
12,
2890,
18,
17977,
13,
309,
365,
18,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
23895,
12,
2890,
4672,
2199,
273,
5378,
2199,
18,
6923,
12,
2890,
18,
8638,
13,
309,
365,
18,
17977,
353,
486,
599,
30,
5411,
2199,
18,
6923,
12,
2890,
18,
17977,
13,
309,
365,
18,
1... |
fieldnames = list(op.args[0].concretetype.TO._names) index = fieldnames.index(op.args[1].value) | index = self._getindexhelper(op.args[1].value, op.args[0].concretetype.TO) | def getfield(self, op): tmpvar = self.db.repr_tmpvar() struct, structtype = self.db.repr_argwithtype(op.args[0]) fieldnames = list(op.args[0].concretetype.TO._names) index = fieldnames.index(op.args[1].value) targetvar = self.db.repr_arg(op.result) targettype = self.db.repr_arg_type(op.result) if targettype != "void": self.codewriter.getelementptr(tmpvar, structtype, struct, ("uint", index)) self.codewriter.load(targetvar, targettype, tmpvar) else: self.codewriter.comment("***Skipping operation getfield()***") | 533a861d711f14f9669bd3fb9b45281a19ebc9d9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/533a861d711f14f9669bd3fb9b45281a19ebc9d9/opwriter.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
1518,
12,
2890,
16,
1061,
4672,
1853,
1401,
273,
365,
18,
1966,
18,
12715,
67,
5645,
1401,
1435,
1958,
16,
1958,
723,
273,
365,
18,
1966,
18,
12715,
67,
3175,
1918,
723,
12,
556,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1518,
12,
2890,
16,
1061,
4672,
1853,
1401,
273,
365,
18,
1966,
18,
12715,
67,
5645,
1401,
1435,
1958,
16,
1958,
723,
273,
365,
18,
1966,
18,
12715,
67,
3175,
1918,
723,
12,
556,
... |
raise NotAvailable | raise decode.NotAvailable | def draw(self, dc, region): dc.BeginDrawing() x, y, w, h = region.GetBox() page_job = self._page_job try: if page_job is None: raise decode.NotAvailable page_width, page_height = self.page_size if x >= page_width: raise NotAvailable if x + w > page_width: w = page_width - x if y >= page_height: raise NotAvailable if y + h > page_height: h = page_height - y data = page_job.render( self.render_mode, (0, 0, page_width, page_height), (x, y, w, h), PIXEL_FORMAT, 1 ) image = wx.EmptyImage(w, h) image.SetData(data) dc.DrawRectangle(x, y, w, h) dc.DrawBitmap(image.ConvertToBitmap(), x, y) except decode.NotAvailable, ex: pass dc.EndDrawing() | d2cc2cc3c1a43480fef3f6b5e58ff0e3b91a92ec /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3683/d2cc2cc3c1a43480fef3f6b5e58ff0e3b91a92ec/smooth.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3724,
12,
2890,
16,
6744,
16,
3020,
4672,
6744,
18,
8149,
26885,
1435,
619,
16,
677,
16,
341,
16,
366,
273,
3020,
18,
967,
3514,
1435,
1363,
67,
4688,
273,
365,
6315,
2433,
67,
4688,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3724,
12,
2890,
16,
6744,
16,
3020,
4672,
6744,
18,
8149,
26885,
1435,
619,
16,
677,
16,
341,
16,
366,
273,
3020,
18,
967,
3514,
1435,
1363,
67,
4688,
273,
365,
6315,
2433,
67,
4688,
... |
if hasattr(sys, "maxsize"): self.assertRaises((OverflowError, MemoryError), lambda: wstring_at(u"foo", sys.maxsize)) self.assertRaises((OverflowError, MemoryError), lambda: string_at("foo", sys.maxsize)) | self.assertRaises((OverflowError, MemoryError, SystemError), lambda: wstring_at(u"foo", sys.maxint - 1)) self.assertRaises((OverflowError, MemoryError, SystemError), lambda: string_at("foo", sys.maxint - 1)) | def test_overflow(self): # string_at and wstring_at must use the Python calling # convention (which acquires the GIL and checks the Python # error flag). Provoke an error and catch it; see also issue # #3554: <http://bugs.python.org/issue3554> if hasattr(sys, "maxsize"): self.assertRaises((OverflowError, MemoryError), lambda: wstring_at(u"foo", sys.maxsize)) self.assertRaises((OverflowError, MemoryError), lambda: string_at("foo", sys.maxsize)) | 6d2014ee590aafd90143167bd465b6fb1ab7cf6f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8546/6d2014ee590aafd90143167bd465b6fb1ab7cf6f/test_memfunctions.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
11512,
12,
2890,
4672,
468,
533,
67,
270,
471,
341,
1080,
67,
270,
1297,
999,
326,
6600,
4440,
468,
15797,
261,
12784,
1721,
4138,
326,
611,
2627,
471,
4271,
326,
6600,
468,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
11512,
12,
2890,
4672,
468,
533,
67,
270,
471,
341,
1080,
67,
270,
1297,
999,
326,
6600,
4440,
468,
15797,
261,
12784,
1721,
4138,
326,
611,
2627,
471,
4271,
326,
6600,
468,
... |
for l in [0, 1, 4, 16, 63, 64, 65, 2047, 2048, 2049, 2050, 16*1024-8, 64*1024, 1024*1024-4]: | self.send_cmd("DROPQ") self.read_reply() for l in [0, 1, 4, 16, 63, 64, 65, 2047, 2048, 2049, 2050, 6505, 16*1024-8, 64*1024, 1024*1024-4]: | def test_single_task_life_cycle(self): submitted = [] failures = {} s = self.socket for l in [0, 1, 4, 16, 63, 64, 65, 2047, 2048, 2049, 2050, 16*1024-8, 64*1024, 1024*1024-4]: if l > self.params['max_input_size']: continue data = " " * l s.send('SUBMIT "%s"\n' % data) parts = self.read_reply() if parts[0] == "ERR": print "At data length %d" % l, print "Error: %s" % ": ".join(parts[1:]) failures.setdefault("SUBMIT", []).append(data) continue submitted.append(parts[1]) for cmd in ['SUBMIT']: if not cmd in failures: self.successes[cmd] = 1 if failures: return 1 return 0 | 8d78dd858a80f2058ef60cd62e8a36d8ffeb80f9 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/255/8d78dd858a80f2058ef60cd62e8a36d8ffeb80f9/test_netschedule_smoke.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
7526,
67,
4146,
67,
10256,
73,
67,
13946,
12,
2890,
4672,
9638,
273,
5378,
11720,
273,
2618,
272,
273,
365,
18,
7814,
365,
18,
4661,
67,
4172,
2932,
18768,
53,
7923,
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,
1842,
67,
7526,
67,
4146,
67,
10256,
73,
67,
13946,
12,
2890,
4672,
9638,
273,
5378,
11720,
273,
2618,
272,
273,
365,
18,
7814,
365,
18,
4661,
67,
4172,
2932,
18768,
53,
7923,
365,
18,... |
_format_results(sys.stdin, sys.stdout) | unixbench.format_results(sys.stdin, sys.stdout) | def _format_results(report, keyval): for i in range(9): report.next() for line in report: if not line.strip(): break words = line.split() key = '_'.join(words[:-6]) value = words[-6] print >> keyval, '%s=%s' % (key, value) for line in report: if 'FINAL SCORE' in line: print >> keyval, 'score=%s\n' % line.split()[-1] break | f6b475aee14766a1d794cb5f0587e1b784504429 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10349/f6b475aee14766a1d794cb5f0587e1b784504429/unixbench.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2139,
67,
4717,
12,
6006,
16,
498,
1125,
4672,
364,
277,
316,
1048,
12,
29,
4672,
2605,
18,
4285,
1435,
364,
980,
316,
2605,
30,
309,
486,
980,
18,
6406,
13332,
898,
225,
4511,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2139,
67,
4717,
12,
6006,
16,
498,
1125,
4672,
364,
277,
316,
1048,
12,
29,
4672,
2605,
18,
4285,
1435,
364,
980,
316,
2605,
30,
309,
486,
980,
18,
6406,
13332,
898,
225,
4511,
... |
_sCoordinateUnit = inUnit _sCoordinateUnits = inUnit + 's' | self._sCoordinateUnit = inUnit self._sCoordinateUnits = inUnit + 's' | def setCoordinateUnit( inUnit ): """ Set the unit(s) (of measure) for the coordinates of the generated atom's position. """ _sCoordinateUnit = inUnit _sCoordinateUnits = inUnit + 's' | 497455a9f0ac7d32cef71e80824c858b8a8ded5b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11221/497455a9f0ac7d32cef71e80824c858b8a8ded5b/AtomGeneratorDialog.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
13503,
2802,
12,
316,
2802,
262,
30,
3536,
1000,
326,
2836,
12,
87,
13,
261,
792,
6649,
13,
364,
326,
5513,
434,
326,
4374,
3179,
1807,
1754,
18,
3536,
365,
6315,
87,
13503,
2802,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
13503,
2802,
12,
316,
2802,
262,
30,
3536,
1000,
326,
2836,
12,
87,
13,
261,
792,
6649,
13,
364,
326,
5513,
434,
326,
4374,
3179,
1807,
1754,
18,
3536,
365,
6315,
87,
13503,
2802,... |
signedEncrypted = out def _check_6_decryptVerify(self): | def _check_decryptVerify(self): | def check_5_signEncrypt(self): global signedEncrypted s = SMIME.SMIME() buf = BIO.MemoryBuffer(cleartext) s.load_key('signer_key.pem', 'signer.pem') p7 = s.sign(buf) x509 = X509.load_cert('recipient.pem') sk = X509.X509_Stack() sk.push(x509) s.set_x509_stack(sk) s.set_cipher(SMIME.Cipher('des_ede3_cbc')) tmp = BIO.MemoryBuffer() s.write(tmp, p7) p7 = s.encrypt(tmp) # XXX Hmm, how to get PKCS7_SIGNED_ENVELOPED? assert p7.type() == SMIME.PKCS7_ENVELOPED, p7.type() out = BIO.MemoryBuffer() s.write(out, p7) signedEncrypted = out | 8d88bcc39abdc6db218e3a485dc691c215692d64 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8055/8d88bcc39abdc6db218e3a485dc691c215692d64/test_smime.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
67,
25,
67,
2977,
13129,
12,
2890,
4672,
2552,
6726,
14678,
225,
272,
273,
12014,
3114,
18,
7303,
3114,
1435,
225,
1681,
273,
605,
4294,
18,
6031,
1892,
12,
2131,
485,
408,
13,
22... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
67,
25,
67,
2977,
13129,
12,
2890,
4672,
2552,
6726,
14678,
225,
272,
273,
12014,
3114,
18,
7303,
3114,
1435,
225,
1681,
273,
605,
4294,
18,
6031,
1892,
12,
2131,
485,
408,
13,
22... |
if os.path.exists(file): | if os.path.lexists(file): | def list_files(self): # browser cache if self.options["cache"][1]: dirs = [ os.path.expanduser(self.profile_dir + "cache4/"), \ os.path.expanduser(self.profile_dir + "opcache/") ] for dirname in dirs: for filename in FileUtilities.children_in_directory(dirname, False): yield filename | 18478f728f52d5b096698cd1aacebf770b66e683 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7853/18478f728f52d5b096698cd1aacebf770b66e683/CleanerBackend.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
666,
67,
2354,
12,
2890,
4672,
468,
4748,
1247,
309,
365,
18,
2116,
9614,
2493,
6,
6362,
21,
14542,
7717,
273,
306,
1140,
18,
803,
18,
12320,
1355,
12,
2890,
18,
5040,
67,
1214,
397,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
666,
67,
2354,
12,
2890,
4672,
468,
4748,
1247,
309,
365,
18,
2116,
9614,
2493,
6,
6362,
21,
14542,
7717,
273,
306,
1140,
18,
803,
18,
12320,
1355,
12,
2890,
18,
5040,
67,
1214,
397,
... |
if R_ILLEGAL_NS_CHAR.search(options.namespace): convertedNamespace = R_ILLEGAL_NS_CHAR.sub("_", options.namespace) console.log("WARNING: Converted illegal characters in namespace (from %s to %s)" % (options.namespace, convertedNamespace)) options.namespace = convertedNamespace | if R_ILLEGAL_NS_CHAR.search(options.namespace): convertedNamespace = R_ILLEGAL_NS_CHAR.sub("_", options.namespace) console.log("WARNING: Converted illegal characters in namespace (from %s to %s)" % (options.namespace, convertedNamespace)) options.namespace = convertedNamespace | def main(): parser = optparse.OptionParser() parser.set_usage('''\ | 39cb331f854b5dd7fe0583f1d4519557d74fe103 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5718/39cb331f854b5dd7fe0583f1d4519557d74fe103/create-application.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
2082,
273,
2153,
2670,
18,
1895,
2678,
1435,
225,
2082,
18,
542,
67,
9167,
2668,
6309,
64,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
2082,
273,
2153,
2670,
18,
1895,
2678,
1435,
225,
2082,
18,
542,
67,
9167,
2668,
6309,
64,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
Graphics object consisting of 11 graphics primitives | Graphics object consisting of 17 graphics primitives | def plot(self, **options): """ Returns the plot of self as a directed graph. EXAMPLES: sage: C = CrystalOfLetters(['A', 5]) sage: show_default(False) #do not show the plot by default sage: C.plot() Graphics object consisting of 11 graphics primitives | 075d528b9cbf6eb4390cc7dd45b0a2046b635928 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/075d528b9cbf6eb4390cc7dd45b0a2046b635928/crystals.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3207,
12,
2890,
16,
2826,
2116,
4672,
3536,
2860,
326,
3207,
434,
365,
487,
279,
20830,
2667,
18,
225,
5675,
8900,
11386,
30,
272,
410,
30,
385,
273,
14998,
31365,
951,
24181,
5432,
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,
3207,
12,
2890,
16,
2826,
2116,
4672,
3536,
2860,
326,
3207,
434,
365,
487,
279,
20830,
2667,
18,
225,
5675,
8900,
11386,
30,
272,
410,
30,
385,
273,
14998,
31365,
951,
24181,
5432,
12,
... |
self.log.warn(result['Message']) | self.log.warn( result['Message'] ) | 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... |
for name in node.declares: | for child in node.variables: name = child.name | def __optimizeScope(node, translate, pos): if debug: print "Optimize scope at line: %s" % node.line parent = getattr(node, "parent", None) if parent and parent.type == "function": for i, param in enumerate(parent.params): pos, translate[param] = __encode(pos) parent.params[i] = translate[param] for name in node.declares: if not name in translate: pos, translate[name] = __encode(pos) __optimizeNode(node, translate, True) return pos | 3306be54999c7dcaa2416eae6a84c65516faeb62 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12949/3306be54999c7dcaa2416eae6a84c65516faeb62/LocalVariables.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
29155,
3876,
12,
2159,
16,
4204,
16,
949,
4672,
309,
1198,
30,
1172,
315,
6179,
10153,
2146,
622,
980,
30,
738,
87,
6,
738,
756,
18,
1369,
225,
982,
273,
3869,
12,
2159,
16,
31... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
29155,
3876,
12,
2159,
16,
4204,
16,
949,
4672,
309,
1198,
30,
1172,
315,
6179,
10153,
2146,
622,
980,
30,
738,
87,
6,
738,
756,
18,
1369,
225,
982,
273,
3869,
12,
2159,
16,
31... |
return | return None | def get_flags(self, name): """Return flag value information for a specific flag """ ft = self.get_flag_type(name) if not ft: return | 300fb2765185efafb3b379ccaa2a91896f528a36 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5050/300fb2765185efafb3b379ccaa2a91896f528a36/base.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
7133,
12,
2890,
16,
508,
4672,
3536,
990,
2982,
460,
1779,
364,
279,
2923,
2982,
3536,
11038,
273,
365,
18,
588,
67,
6420,
67,
723,
12,
529,
13,
309,
486,
11038,
30,
327,
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,
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,
12,
2890,
16,
508,
4672,
3536,
990,
2982,
460,
1779,
364,
279,
2923,
2982,
3536,
11038,
273,
365,
18,
588,
67,
6420,
67,
723,
12,
529,
13,
309,
486,
11038,
30,
327,
2,... |
self._fields[i] = getbookkeeper().valueoftype(val) | self._fields[i] = getbookkeeper().immutablevbalue(val) | def update_fields(self, _fields): for i, val in _fields.iteritems(): self._fields[i] = getbookkeeper().valueoftype(val) | 71088ec41d25fd9967f6f1c0a06eeea7585c2828 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/71088ec41d25fd9967f6f1c0a06eeea7585c2828/bltregistry.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
67,
2821,
12,
2890,
16,
389,
2821,
4672,
364,
277,
16,
1244,
316,
389,
2821,
18,
2165,
3319,
13332,
365,
6315,
2821,
63,
77,
65,
273,
336,
3618,
79,
9868,
7675,
381,
5146,
90,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
67,
2821,
12,
2890,
16,
389,
2821,
4672,
364,
277,
16,
1244,
316,
389,
2821,
18,
2165,
3319,
13332,
365,
6315,
2821,
63,
77,
65,
273,
336,
3618,
79,
9868,
7675,
381,
5146,
90,
... |
basic_inv = linalg.inverse | basic_inv = linalg.inv | def bench_random(self,level=5): import numpy.linalg as linalg basic_inv = linalg.inverse print print ' Finding matrix inverse' print ' ==================================' print ' | contiguous | non-contiguous ' print '----------------------------------------------' print ' size | scipy | basic | scipy | basic' | 6d9ca1f8115ef767febee897444a5bce02675b41 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/6d9ca1f8115ef767febee897444a5bce02675b41/test_basic.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
22499,
67,
9188,
12,
2890,
16,
2815,
33,
25,
4672,
1930,
3972,
18,
80,
11521,
487,
11818,
5337,
67,
5768,
273,
11818,
18,
5768,
1172,
1172,
296,
6647,
4163,
310,
3148,
8322,
11,
1172,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
22499,
67,
9188,
12,
2890,
16,
2815,
33,
25,
4672,
1930,
3972,
18,
80,
11521,
487,
11818,
5337,
67,
5768,
273,
11818,
18,
5768,
1172,
1172,
296,
6647,
4163,
310,
3148,
8322,
11,
1172,
... |
>>> int(bool(it.next())) 1 | >>> it.next() True | def item(self): """Get the iterator value | c2450cd2db47fce45ceeda283ccc45145d72ec81 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9778/c2450cd2db47fce45ceeda283ccc45145d72ec81/tales.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
761,
12,
2890,
4672,
3536,
967,
326,
2775,
460,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
761,
12,
2890,
4672,
3536,
967,
326,
2775,
460,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
return ('%s:long=%s' % (name, val))[:-1] | value = '%s:long=%s' % (name, val) if value[-1] == 'L': value = value[:-1] return value | def marshal_long(name, val): return ('%s:long=%s' % (name, val))[:-1] | 9a32cdef1fbbcc33899b06a19e17245c74962f83 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/9a32cdef1fbbcc33899b06a19e17245c74962f83/client.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10893,
67,
5748,
12,
529,
16,
1244,
4672,
460,
273,
1995,
87,
30,
5748,
5095,
87,
11,
738,
261,
529,
16,
1244,
13,
309,
460,
18919,
21,
65,
422,
296,
48,
4278,
460,
273,
460,
10531,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10893,
67,
5748,
12,
529,
16,
1244,
4672,
460,
273,
1995,
87,
30,
5748,
5095,
87,
11,
738,
261,
529,
16,
1244,
13,
309,
460,
18919,
21,
65,
422,
296,
48,
4278,
460,
273,
460,
10531,
... |
def plot_fourier_series_partial_sum(self,N,L,xmin,xmax): | def fourier_series_partial_sum_hann(self,N,L): r""" Returns the Hann-filtered partial sum (named after von Hann, not Hamming) \[ f(x) \sim \frac{a_0}{2} + \sum_{n=1}^N H_N(n)*[a_n\cos(\frac{n\pi x}{L}) + b_n\sin(\frac{n\pi x}{L})], \] as a string, where $H_N(x) = (1+\cos(\pi x/N))/2$. This is a "smoother" partial sum - the Gibbs phenomenon is mollified. EXAMPLE: sage: f = lambda x:x^2 sage: f = Piecewise([[(-1,1),f]]) sage: f.fourier_series_partial_sum_hann(3,1) '1/3 + ((1+cos(pi*1/3))*(0.5*(-4/(pi^2)))*cos(1*pi*x/1) + (1+cos(pi*1/3))*0.0*sin(1*pi*x/1)) + ((1+cos(pi*2/3))*(0.5*(1/(pi^2)))*cos(2*pi*x/1) + (1+cos(pi*2/3))*0.0*sin(2*pi*x/1))' sage: f1 = lambda x:-1 sage: f2 = lambda x:2 sage: f = Piecewise([[(0,pi/2),f1],[(pi/2,pi),f2]]) sage: f.fourier_series_partial_sum_hann(3,pi) '1/4 + ((1+cos(pi*1/3))*(0.5*(-3/pi))*cos(1*pi*x/pi) + (1+cos(pi*1/3))*(0.5*(1/pi))*sin(1*pi*x/pi)) + ((1+cos(pi*2/3))*0.0*cos(2*pi*x/pi) + (1+cos(pi*2/3))*(0.5*(-3/pi))*sin(2*pi*x/pi))' """ a0 = self.fourier_series_cosine_coefficient(0,L) A = ["(1+cos(pi*%s/%s))*"%(n,N)+str((0.5)*self.fourier_series_cosine_coefficient(n,L))+"*cos(%s*pi*x/%s)"%(n,L) for n in range(1,N)] B = ["(1+cos(pi*%s/%s))*"%(n,N)+str((0.5)*self.fourier_series_sine_coefficient(n,L))+"*sin(%s*pi*x/%s)"%(n,L) for n in range(1,N)] FS = ["("+A[i] +" + " + B[i]+")" for i in range(0,N-1)] sumFS = str(a0/2)+" + " for s in FS: sumFS = sumFS+s+ " + " return sumFS[:-3] def fourier_series_partial_sum_filtered(self,N,L,F): r""" Returns the "filtered" partial sum \[ f(x) \sim \frac{a_0}{2} + \sum_{n=1}^N F_n*[a_n\cos(\frac{n\pi x}{L}) + b_n\sin(\frac{n\pi x}{L})], \] as a string, where $F = [F_1,F_2, ..., F_{N}]$ is a list of length $N$ consisting of real numbers. This can be used to plot FS solutions to the heat and wave PDEs. EXAMPLE: sage: f = lambda x:x^2 sage: f = Piecewise([[(-1,1),f]]) sage: f.fourier_series_partial_sum_filtered(3,1,[1,1,1]) '1/3 + ((1*(-4/(pi^2)))*cos(1*pi*x/1) + 0*sin(1*pi*x/1)) + ((1*(1/(pi^2)))*cos(2*pi*x/1) + 0*sin(2*pi*x/1))' sage: f1 = lambda x:-1 sage: f2 = lambda x:2 sage: f = Piecewise([[(0,pi/2),f1],[(pi/2,pi),f2]]) sage: f.fourier_series_partial_sum_filtered(3,pi,[1,1,1]) '1/4 + ((1*(-3/pi))*cos(1*pi*x/pi) + (1*(1/pi))*sin(1*pi*x/pi)) + (0*cos(2*pi*x/pi) + (1*(-3/pi))*sin(2*pi*x/pi))' """ a0 = self.fourier_series_cosine_coefficient(0,L) A = [str((F[n])*self.fourier_series_cosine_coefficient(n,L))+"*cos(%s*pi*x/%s)"%(n,L) for n in range(1,N)] B = [str((F[n])*self.fourier_series_sine_coefficient(n,L))+"*sin(%s*pi*x/%s)"%(n,L) for n in range(1,N)] FS = ["("+A[i] +" + " + B[i]+")" for i in range(0,N-1)] sumFS = str(a0/2)+" + " for s in FS: sumFS = sumFS+s+ " + " return sumFS[:-3] def plot_fourier_series_partial_sum(self,N,L,xmin,xmax, **kwds): | def plot_fourier_series_partial_sum(self,N,L,xmin,xmax): r""" Plots the partial sum \[ f(x) \sim \frac{a_0}{2} + \sum_{n=1}^N [a_n\cos(\frac{n\pi x}{L}) + b_n\sin(\frac{n\pi x}{L})], \] over xmin < x < xmin. | 6ad12cbbc3df53e6e43cd9bd6f3ab9f7f7cb39df /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/6ad12cbbc3df53e6e43cd9bd6f3ab9f7f7cb39df/piecewise.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12792,
2453,
67,
10222,
67,
11601,
67,
1364,
67,
76,
1072,
12,
2890,
16,
50,
16,
48,
4672,
436,
8395,
2860,
326,
670,
1072,
17,
12071,
4702,
2142,
261,
13188,
1839,
331,
265,
670,
1072... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
12792,
2453,
67,
10222,
67,
11601,
67,
1364,
67,
76,
1072,
12,
2890,
16,
50,
16,
48,
4672,
436,
8395,
2860,
326,
670,
1072,
17,
12071,
4702,
2142,
261,
13188,
1839,
331,
265,
670,
1072... |
sum=0 for i in range(12): | oddsum=0 evensum=0 total=0 eanvalue=partner.ean13 reversevalue = eanvalue[::-1] finalean=reversevalue[1:] for i in range(len(finalean)): | def _check_ean_key(self, cr, uid, ids): for partner in self.browse(cr, uid, ids): if not partner.ean13: continue if len(partner.ean13) <> 13: return False try: int(partner.ean13) except: return False sum=0 for i in range(12): if is_pair(i): sum += int(partner.ean13[i]) else: sum += 3 * int(partner.ean13[i]) check = int(math.ceil(sum / 10.0) * 10 - sum) if check != int(partner.ean13[12]): return False return True | 5b647eb30c82b1f3eed3a549ecc08069f0858647 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/5b647eb30c82b1f3eed3a549ecc08069f0858647/product.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1893,
67,
73,
304,
67,
856,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
4672,
364,
19170,
316,
365,
18,
25731,
12,
3353,
16,
4555,
16,
3258,
4672,
309,
486,
19170,
18,
73,
304,
3437... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1893,
67,
73,
304,
67,
856,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
4672,
364,
19170,
316,
365,
18,
25731,
12,
3353,
16,
4555,
16,
3258,
4672,
309,
486,
19170,
18,
73,
304,
3437... |
return instances if len(instances) > 0 else [] | return instances | def get_by_attribute(cls, attributes, context = None): """ Retrieve all `instances` from the data store that have the specified `attributes` and are of `rdf:type` of the resource class | 719a76109b843155799b801eaaaf23bf6479036a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13812/719a76109b843155799b801eaaaf23bf6479036a/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
1637,
67,
4589,
12,
6429,
16,
1677,
16,
819,
273,
599,
4672,
3536,
10708,
777,
1375,
10162,
68,
628,
326,
501,
1707,
716,
1240,
326,
1269,
1375,
4350,
68,
471,
854,
434,
1375,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
1637,
67,
4589,
12,
6429,
16,
1677,
16,
819,
273,
599,
4672,
3536,
10708,
777,
1375,
10162,
68,
628,
326,
501,
1707,
716,
1240,
326,
1269,
1375,
4350,
68,
471,
854,
434,
1375,... |
return content[content.find(content)+len(content):].split(separator)[0] | return content[content.find(start)+len(start):].split(stop)[0] | def extract(content, start, stop) : return content[content.find(content)+len(content):].split(separator)[0] | ea1d3bce4354246f56cb454ef7b7f21875873162 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1456/ea1d3bce4354246f56cb454ef7b7f21875873162/diff_audio_files.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2608,
12,
1745,
16,
787,
16,
2132,
13,
294,
327,
913,
63,
1745,
18,
4720,
12,
1745,
27921,
1897,
12,
1745,
4672,
8009,
4939,
12,
11287,
25146,
20,
65,
2,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2608,
12,
1745,
16,
787,
16,
2132,
13,
294,
327,
913,
63,
1745,
18,
4720,
12,
1745,
27921,
1897,
12,
1745,
4672,
8009,
4939,
12,
11287,
25146,
20,
65,
2,
-100,
-100,
-100,
-100,
-100,
... |
arch = get_cpu_arch() if (arch == 'i386'): self.setup_i386() else: raise UnknownError, 'Architecture %s not supported by oprofile wrapper' % arch | def initialize(self): arch = get_cpu_arch() if (arch == 'i386'): self.setup_i386() else: raise UnknownError, 'Architecture %s not supported by oprofile wrapper' % arch | 12d7c6f6f3194a7d54363e50008e6aa254ab5605 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12268/12d7c6f6f3194a7d54363e50008e6aa254ab5605/oprofile.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4046,
12,
2890,
4672,
6637,
273,
336,
67,
11447,
67,
991,
1435,
309,
261,
991,
422,
296,
77,
23,
5292,
11,
4672,
365,
18,
8401,
67,
77,
23,
5292,
1435,
469,
30,
1002,
9077,
668,
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,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4046,
12,
2890,
4672,
6637,
273,
336,
67,
11447,
67,
991,
1435,
309,
261,
991,
422,
296,
77,
23,
5292,
11,
4672,
365,
18,
8401,
67,
77,
23,
5292,
1435,
469,
30,
1002,
9077,
668,
16,
... | |
Hatari-console allows you to invoke Hatari remote configuration facilities from console while Hatari is running and use TAB completion on their names. The supported facilities are:""" | Hatari-console allows you to control Hatari through its control socket from the provided console prompt, while Hatari is running. All control commands support TAB completion on their names and options. The supported control facilities are:""" | def show_help(): print """ | af694616eb9446ff0ed1e6f507b3726ffcea53a8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8501/af694616eb9446ff0ed1e6f507b3726ffcea53a8/hatari-console.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2405,
67,
5201,
13332,
1172,
3536,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2405,
67,
5201,
13332,
1172,
3536,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
global DEBUG | def poll (timeout=0.0, map=None): global DEBUG if map is None: map = socket_map if map: r = []; w = []; e = [] for fd, obj in map.items(): if obj.readable(): r.append (fd) if obj.writable(): w.append (fd) r,w,e = select.select (r,w,e, timeout) if DEBUG: print r,w,e for fd in r: try: obj = map[fd] except KeyError: continue try: obj.handle_read_event() except ExitNow: raise ExitNow except: obj.handle_error() for fd in w: try: obj = map[fd] except KeyError: continue try: obj.handle_write_event() except ExitNow: raise ExitNow except: obj.handle_error() | fbd5797eb7aa2f2e291a11081f5c5160614fdd45 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/fbd5797eb7aa2f2e291a11081f5c5160614fdd45/asyncore.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7672,
261,
4538,
33,
20,
18,
20,
16,
852,
33,
7036,
4672,
309,
852,
353,
599,
30,
852,
273,
2987,
67,
1458,
309,
852,
30,
436,
273,
5378,
31,
341,
273,
5378,
31,
425,
273,
5378,
36... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
7672,
261,
4538,
33,
20,
18,
20,
16,
852,
33,
7036,
4672,
309,
852,
353,
599,
30,
852,
273,
2987,
67,
1458,
309,
852,
30,
436,
273,
5378,
31,
341,
273,
5378,
31,
425,
273,
5378,
36... | |
log.log(8,'audit',__('Releasing scheduler layout lock.')) | log.log(8,'audit',_('Releasing scheduler layout lock.')) | def nextLayout(self): "Return the next valid layout" | 93ee3f9539e14683ecbaefc8fb8d5483c91ccd22 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5464/93ee3f9539e14683ecbaefc8fb8d5483c91ccd22/XiboClient.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1024,
3744,
12,
2890,
4672,
315,
990,
326,
1024,
923,
3511,
6,
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,
... | [
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,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1024,
3744,
12,
2890,
4672,
315,
990,
326,
1024,
923,
3511,
6,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
def ping(self): self.bot.write("pong") def help(self): self.bot.write("I'm a bot that shows information from the \x02Warzone 2100\x02 lobby server. I was created by %s. For information about commands you can try: \"commands\"" % (__author__)) def info(self): return self.help() def commands(self): self.bot.write("ping: pong, help/info: general information about this bot, list: show which games are currenly being hosted") def list(self): | def ping(self, nick, channel): self.bot.write("%s: pong" % (nick), [channel]) def help(self, nick, channel): self.bot.write("%s: I'm a bot that shows information from the \x02Warzone 2100\x02 lobby server. I was created by %s. For information about commands you can try: \"commands\"" % (nick, __author__), [channel]) info = help def commands(self, nick, channel): self.bot.write("%s: ping: pong, help/info: general information about this bot, list: show which games are currenly being hosted" % (nick), [channel]) def list(self, nick, channel): | def ping(self): self.bot.write("pong") | 6461dd0208bc3d2856de5d207bdcfcc2cae75010 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/13981/6461dd0208bc3d2856de5d207bdcfcc2cae75010/ircbot.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10087,
12,
2890,
4672,
365,
18,
4819,
18,
2626,
2932,
500,
75,
7923,
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,... | [
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,
10087,
12,
2890,
4672,
365,
18,
4819,
18,
2626,
2932,
500,
75,
7923,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
changed = self.change_category(article, oldCat, newCat, | changed = self.change_category(doc, oldCat, newCat, | def move_contents(self, oldCatTitle, newCatTitle, editSummary): """The worker function that moves pages out of oldCat into newCat""" while True: try: oldCat = catlib.Category(self.site, self.catprefix + oldCatTitle) newCat = catlib.Category(self.site, self.catprefix + newCatTitle) | cb36ac80e54d6a59b2f69eb19baf8fbcec2dfa0b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4404/cb36ac80e54d6a59b2f69eb19baf8fbcec2dfa0b/category_redirect.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3635,
67,
3980,
12,
2890,
16,
1592,
11554,
4247,
16,
394,
11554,
4247,
16,
3874,
4733,
4672,
3536,
1986,
4322,
445,
716,
13934,
4689,
596,
434,
1592,
11554,
1368,
394,
11554,
8395,
1323,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3635,
67,
3980,
12,
2890,
16,
1592,
11554,
4247,
16,
394,
11554,
4247,
16,
3874,
4733,
4672,
3536,
1986,
4322,
445,
716,
13934,
4689,
596,
434,
1592,
11554,
1368,
394,
11554,
8395,
1323,
... |
'CALLABLEMETHODS SEQUENCEMETHODS1 MAPPINGMETHODS ' 'SEQUENCEMETHODS2 NUMBERMETHODS CLASSES'), | 'CALLABLEMETHODS SEQUENCEMETHODS MAPPINGMETHODS ' 'NUMBERMETHODS CLASSES'), | 'METHODS': ('typesmethods', 'class def CLASSES TYPES'), | 395ed245893fafd75f4402ab4cb6f67a2c9a686a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8546/395ed245893fafd75f4402ab4cb6f67a2c9a686a/pydoc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
296,
25750,
4278,
7707,
2352,
5163,
2187,
296,
1106,
1652,
29859,
20230,
3463,
55,
19899,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
296,
25750,
4278,
7707,
2352,
5163,
2187,
296,
1106,
1652,
29859,
20230,
3463,
55,
19899,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Damnlog('Binding',element,'to display hand cursor, and launchdir =',launchdir,'; launchfile =',launchfile) | Damnlog('Binding', element, 'to display hand cursor, and launchdir =', launchdir, '; launchfile =', launchfile) | def bindAndCursor(self, element, launchdir=None, launchfile=None): Damnlog('Binding',element,'to display hand cursor, and launchdir =',launchdir,'; launchfile =',launchfile) element.Bind(wx.EVT_ENTER_WINDOW, DamnCurry(self.handCursor, element)) element.Bind(wx.EVT_LEAVE_WINDOW, DamnCurry(self.normalCursor, element)) if launchfile is not None: element.Bind(wx.EVT_LEFT_UP, DamnCurry(DamnLaunchFile,launchfile)) elif launchdir is not None: element.Bind(wx.EVT_LEFT_UP, DamnCurry(DamnOpenFileManager,launchdir)) return element | 2e4d33b2a8b84c7e2a1d15176545dae986a39d07 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11142/2e4d33b2a8b84c7e2a1d15176545dae986a39d07/DamnVid.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1993,
1876,
6688,
12,
2890,
16,
930,
16,
8037,
1214,
33,
7036,
16,
8037,
768,
33,
7036,
4672,
463,
301,
82,
1330,
2668,
5250,
2187,
930,
16,
296,
869,
2562,
948,
3347,
16,
471,
8037,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1993,
1876,
6688,
12,
2890,
16,
930,
16,
8037,
1214,
33,
7036,
16,
8037,
768,
33,
7036,
4672,
463,
301,
82,
1330,
2668,
5250,
2187,
930,
16,
296,
869,
2562,
948,
3347,
16,
471,
8037,
... |
print rex | def doiskip(pagetext): saltos=getautoskip() print saltos for salto in saltos: rex=ur'\{\{\s*['+salto[0].upper()+salto[0].lower()+']'+salto[1:]+'(\}\}|\|)' print rex if re.search(rex, pagetext): return True return False | 3544c7266aabc57fb0ad9f13cc0f9f47b922333d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4404/3544c7266aabc57fb0ad9f13cc0f9f47b922333d/imagecopy.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
291,
1834,
12,
9095,
27830,
4672,
4286,
538,
33,
588,
21996,
1834,
1435,
1172,
4286,
538,
364,
12814,
869,
316,
4286,
538,
30,
28929,
33,
295,
8314,
23241,
23241,
87,
14,
3292,
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,
741,
291,
1834,
12,
9095,
27830,
4672,
4286,
538,
33,
588,
21996,
1834,
1435,
1172,
4286,
538,
364,
12814,
869,
316,
4286,
538,
30,
28929,
33,
295,
8314,
23241,
23241,
87,
14,
3292,
15,
... | |
load_kvm_modules(self.srcdir) | load_kvm_modules(module_dir=self.srcdir, extra_modules=self.extra_modules) | def __load_modules(self): load_kvm_modules(self.srcdir) | 3dcad885121086abc623ffe7a8c72ae8797c4750 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12268/3dcad885121086abc623ffe7a8c72ae8797c4750/build.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
945,
67,
6400,
12,
2890,
4672,
1262,
67,
79,
3489,
67,
6400,
12,
2890,
18,
4816,
1214,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
945,
67,
6400,
12,
2890,
4672,
1262,
67,
79,
3489,
67,
6400,
12,
2890,
18,
4816,
1214,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
""" | """ | def dialogTest(): root = Tk() d = MyDialog(root) print( d.result) | 40047a1c9ed8d584d35aa7d0f9270b2ff1ae18e9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/479/40047a1c9ed8d584d35aa7d0f9270b2ff1ae18e9/preferences.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6176,
4709,
13332,
1365,
273,
399,
79,
1435,
302,
273,
8005,
6353,
12,
3085,
13,
1172,
12,
302,
18,
2088,
13,
282,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6176,
4709,
13332,
1365,
273,
399,
79,
1435,
302,
273,
8005,
6353,
12,
3085,
13,
1172,
12,
302,
18,
2088,
13,
282,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
o.write( png ) | o.write( png.read() ) | def run(sts): ets = sts + mx.DateTime.RelativeDateTime(days=1) interval = mx.DateTime.RelativeDateTime(minutes=5) n0r = gdal.Open('../../htdocs/docs/nexrad_composites/reflect_ramp.png', 0) n0rct = n0r.GetRasterBand(1).GetRasterColorTable().Clone() maxn0r = None now = sts while (now < ets): fp = now.strftime("/mnt/a1/ARCHIVE/data/%Y/%m/%d/GIS/uscomp/n0r_%Y%m%d%H%M.png") if (not os.path.isfile(fp)): print "MISSING:", fp now += interval continue n0r = gdal.Open(fp, 0) n0rd = numpy.ravel( n0r.ReadAsArray() ) if (maxn0r is None): maxn0r = n0rd maxn0r = numpy.where( n0rd > maxn0r, n0rd, maxn0r) now += interval out_driver = gdal.GetDriverByName("gtiff") outdataset = out_driver.Create('max.tiff', n0r.RasterXSize, n0r.RasterYSize, n0r.RasterCount, GDT_Byte) # Set output color table to match input outdataset.GetRasterBand(1).SetRasterColorTable( n0rct ) outdataset.GetRasterBand(1).WriteArray( numpy.resize(maxn0r, (n0r.RasterYSize, n0r.RasterXSize)) ) del outdataset os.system("convert max.tiff max.png") fp = sts.strftime("/mnt/a1/ARCHIVE/data/%Y/%m/%d/GIS/uscomp/max_n0r_0z0z_%Y%m%d") shutil.copyfile("max.png", fp+".png") shutil.copyfile("/home/ldm/data/gis/images/4326/USCOMP/n0r_0.wld", fp+".wld") os.remove("max.tiff") os.remove("max.png") | e2ae33d3ea0b06969b76c40d01ad172683d7c008 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11189/e2ae33d3ea0b06969b76c40d01ad172683d7c008/max_reflect.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
334,
87,
4672,
225,
2413,
273,
27099,
397,
7938,
18,
5096,
18,
8574,
5096,
12,
9810,
33,
21,
13,
3673,
273,
7938,
18,
5096,
18,
8574,
5096,
12,
17916,
33,
25,
13,
225,
290,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
334,
87,
4672,
225,
2413,
273,
27099,
397,
7938,
18,
5096,
18,
8574,
5096,
12,
9810,
33,
21,
13,
3673,
273,
7938,
18,
5096,
18,
8574,
5096,
12,
17916,
33,
25,
13,
225,
290,... |
hooks.suite(), regression.suite()) | hooks.suite(), regression.suite(), dump.suite()) | def test_main(): run_unittest(dbapi.suite(), types.suite(), userfunctions.suite(), py25tests.suite(), factory.suite(), transactions.suite(), hooks.suite(), regression.suite()) | b9803421d231fc66489eafb45f6ae440010cacfc /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8546/b9803421d231fc66489eafb45f6ae440010cacfc/test_sqlite.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
5254,
13332,
1086,
67,
4873,
3813,
12,
1966,
2425,
18,
30676,
9334,
1953,
18,
30676,
9334,
729,
10722,
18,
30676,
9334,
2395,
2947,
16341,
18,
30676,
9334,
3272,
18,
30676,
9334,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
5254,
13332,
1086,
67,
4873,
3813,
12,
1966,
2425,
18,
30676,
9334,
1953,
18,
30676,
9334,
729,
10722,
18,
30676,
9334,
2395,
2947,
16341,
18,
30676,
9334,
3272,
18,
30676,
9334,... |
return Header(s, charset, header_name=header_name) | return Header(s, charset, header_name=header_name, continuation_ws=continuation_ws) | def uheader(mlist, s, header_name=None): # Get the charset to encode the string in. If this is us-ascii, we'll use # iso-8859-1 instead, just to get a little extra coverage, and because the # Header class tries us-ascii first anyway. charset = Utils.GetCharSet(mlist.preferred_language) if charset == 'us-ascii': charset = 'iso-8859-1' charset = Charset(charset) # Convert the string to unicode so Header will do the 3-charset encoding. # If s is a byte string and there are funky characters in it that don't # match the charset, we might as well replace them now. if not _isunicode(s): codec = charset.input_codec or 'ascii' s = unicode(s, codec, 'replace') # We purposefully leave no space b/w prefix and subject! return Header(s, charset, header_name=header_name) | 516bc8f473a0c70c14d21ba67fc6df6c00ff533e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2120/516bc8f473a0c70c14d21ba67fc6df6c00ff533e/CookHeaders.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
582,
3374,
12,
781,
376,
16,
272,
16,
1446,
67,
529,
33,
7036,
4672,
468,
968,
326,
4856,
358,
2017,
326,
533,
316,
18,
225,
971,
333,
353,
584,
17,
9184,
16,
732,
5614,
999,
468,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
582,
3374,
12,
781,
376,
16,
272,
16,
1446,
67,
529,
33,
7036,
4672,
468,
968,
326,
4856,
358,
2017,
326,
533,
316,
18,
225,
971,
333,
353,
584,
17,
9184,
16,
732,
5614,
999,
468,
... |
For method docs, see each method's docstrings. In general, there is a method of the same name to perform each SMTP command, and there is a method called 'sendmail' that will do an entire mail transaction. """ | See each method's docstrings for details. In general, there is a method of the same name to perform each SMTP command. There is also a method called 'sendmail' that will do an entire mail transaction. """ | def quotedata(data): """Quote data for email. Double leading '.', and change Unix newline '\n', or Mac '\r' into Internet CRLF end-of-line. """ return re.sub(r'(?m)^\.', '..', re.sub(r'(?:\r\n|\n|\r(?!\n))', CRLF, data)) | 38138a69a9ce81026584c5df54a7d656104103d9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/38138a69a9ce81026584c5df54a7d656104103d9/smtplib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9298,
396,
12,
892,
4672,
3536,
10257,
501,
364,
2699,
18,
225,
3698,
7676,
2611,
16,
471,
2549,
9480,
9472,
2337,
82,
2187,
578,
13217,
2337,
86,
11,
1368,
21352,
21791,
679,
17,
792,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
9298,
396,
12,
892,
4672,
3536,
10257,
501,
364,
2699,
18,
225,
3698,
7676,
2611,
16,
471,
2549,
9480,
9472,
2337,
82,
2187,
578,
13217,
2337,
86,
11,
1368,
21352,
21791,
679,
17,
792,
... |
s = len(p0f_base[0][0]) | s = len(pb[0][0]) | def p0f(pkt): """Passive OS fingerprinting: which OS emitted this TCP SYN ? | a4748330cdeee14b47436674b40b324010163fc4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7311/a4748330cdeee14b47436674b40b324010163fc4/scapy.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
293,
20,
74,
12,
5465,
88,
4672,
3536,
6433,
688,
5932,
12115,
310,
30,
1492,
5932,
17826,
333,
9911,
7068,
50,
692,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
293,
20,
74,
12,
5465,
88,
4672,
3536,
6433,
688,
5932,
12115,
310,
30,
1492,
5932,
17826,
333,
9911,
7068,
50,
692,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
self.theQtyFPN = convertFullIDToFullPN( self.theFullID(), 'Value' ) self.theConcFPN = convertFullIDToFullPN( self.theFullID(), 'Concentration' ) | self.theSession = pluginmanager.theSession | def __init__( self, dirname, data, pluginmanager, root=None ): OsogoPluginWindow.__init__( self, dirname, data, pluginmanager, root ) | 30bce103d9f34982fce5f0fc5e1245ea73d045a1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12724/30bce103d9f34982fce5f0fc5e1245ea73d045a1/VariableWindow.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
365,
16,
4283,
16,
225,
501,
16,
1909,
4181,
16,
1365,
33,
7036,
262,
30,
225,
31799,
717,
83,
3773,
3829,
16186,
2738,
972,
12,
365,
16,
4283,
16,
501,
16,
1909... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1001,
2738,
972,
12,
365,
16,
4283,
16,
225,
501,
16,
1909,
4181,
16,
1365,
33,
7036,
262,
30,
225,
31799,
717,
83,
3773,
3829,
16186,
2738,
972,
12,
365,
16,
4283,
16,
501,
16,
1909... |
workspace = Workspace.objects.get(pk = 1) | workspace = DAMWorkspace.objects.get(pk = 1) | def test_get_single(self): variant_pk = 1 variant = Variant.objects.get(pk = variant_pk) workspace = Workspace.objects.get(pk = 1) params = self.get_final_parameters({'workspace_id': workspace.pk}) response = self.client.get('/api/variant/%s/get/'%variant.pk, params) resp_dict = json.loads(response.content) self.assertTrue(resp_dict['id'] == variant_pk) self.assertTrue(resp_dict['name'] == variant.name) self.assertTrue(resp_dict['caption'] == variant.caption) self.assertTrue(resp_dict['media_type'] == variant.media_type.name) self.assertTrue(resp_dict['auto_generated'] == variant.auto_generated) | 774c03fcc85d5555c72b71c04da9a7d1a510e957 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4589/774c03fcc85d5555c72b71c04da9a7d1a510e957/tests.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
588,
67,
7526,
12,
2890,
4672,
5437,
67,
5465,
273,
404,
5437,
273,
17122,
18,
6911,
18,
588,
12,
5465,
273,
5437,
67,
5465,
13,
6003,
273,
463,
2192,
8241,
18,
6911,
18,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
588,
67,
7526,
12,
2890,
4672,
5437,
67,
5465,
273,
404,
5437,
273,
17122,
18,
6911,
18,
588,
12,
5465,
273,
5437,
67,
5465,
13,
6003,
273,
463,
2192,
8241,
18,
6911,
18,
5... |
directives: one of " | directives: one of " | def parseElements(text, fname, lineno, scopes): """Remove any closed scopes, return a list of element names and list of new unclosed scopes | fee12dff4ac48a4ff072b7e0d98ac8d6c653fbdf /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9355/fee12dff4ac48a4ff072b7e0d98ac8d6c653fbdf/wmliterator.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
3471,
12,
955,
16,
5299,
16,
7586,
16,
8124,
4672,
3536,
3288,
1281,
4375,
8124,
16,
327,
279,
666,
434,
930,
1257,
471,
666,
434,
394,
6301,
13783,
8124,
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,
1109,
3471,
12,
955,
16,
5299,
16,
7586,
16,
8124,
4672,
3536,
3288,
1281,
4375,
8124,
16,
327,
279,
666,
434,
930,
1257,
471,
666,
434,
394,
6301,
13783,
8124,
2,
-100,
-100,
-100,
-1... |
def __init__(self, type, name, args **kwargs): DllFunction.__init__(self, type, name, args **kwargs) | def __init__(self, type, name, args, **kwargs): DllFunction.__init__(self, type, name, args, **kwargs) | def __init__(self, type, name, args **kwargs): DllFunction.__init__(self, type, name, args **kwargs) self.functions = [] | 0d923051e4851cb834a9985b9c001be6a9a6f0b4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12828/0d923051e4851cb834a9985b9c001be6a9a6f0b4/opengl32.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
618,
16,
508,
16,
833,
16,
2826,
4333,
4672,
463,
2906,
2083,
16186,
2738,
972,
12,
2890,
16,
618,
16,
508,
16,
833,
16,
2826,
4333,
13,
365,
18,
10722... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1001,
2738,
972,
12,
2890,
16,
618,
16,
508,
16,
833,
16,
2826,
4333,
4672,
463,
2906,
2083,
16186,
2738,
972,
12,
2890,
16,
618,
16,
508,
16,
833,
16,
2826,
4333,
13,
365,
18,
10722... |
def gethistory(self, tablenm, nodeid): | def getjournal(self, tablenm, nodeid): | def gethistory(self, tablenm, nodeid): rslt = [] tblid = self.tables.find(name=tablenm) if tblid == -1: return rslt q = self.hist.select(tableid=tblid, nodeid=int(nodeid)) i = 0 userclass = self.getclass('user') for row in q: try: params = marshal.loads(row.params) except ValueError: print "history couldn't unmarshal %r" % row.params params = {} usernm = userclass.get(str(row.user), 'username') dt = date.Date(time.gmtime(row.date)) rslt.append((i, dt, usernm, _actionnames[row.action], params)) i += 1 return rslt | abbc2c6f076f533f0b88cea6324a837392869dc1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/abbc2c6f076f533f0b88cea6324a837392869dc1/back_metakit.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
22644,
12,
2890,
16,
3246,
1897,
81,
16,
756,
350,
4672,
22841,
273,
5378,
10142,
350,
273,
365,
18,
9373,
18,
4720,
12,
529,
33,
7032,
1897,
81,
13,
309,
10142,
350,
422,
300,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
22644,
12,
2890,
16,
3246,
1897,
81,
16,
756,
350,
4672,
22841,
273,
5378,
10142,
350,
273,
365,
18,
9373,
18,
4720,
12,
529,
33,
7032,
1897,
81,
13,
309,
10142,
350,
422,
300,
... |
qu1[-1] = '(' + qu1[-1] + ' OR ' \ '%s.%s IS NULL)' % \ (table._table, arg[0]) | qu1.append('(%s.%s = false)' % \ (table._table, arg[0])) | def _rec_get(ids, table, parent): if not ids: return [] ids2 = table.search(cursor, user, [(parent, 'in', ids), (parent, '!=', False)], context=context) return ids + _rec_get(ids2, table, parent) | 74267e3f4ebaefed2078fa2ad692d305059fb9cf /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9266/74267e3f4ebaefed2078fa2ad692d305059fb9cf/orm.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3927,
67,
588,
12,
2232,
16,
1014,
16,
982,
4672,
309,
486,
3258,
30,
327,
5378,
3258,
22,
273,
1014,
18,
3072,
12,
9216,
16,
729,
16,
306,
12,
2938,
16,
296,
267,
2187,
3258,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3927,
67,
588,
12,
2232,
16,
1014,
16,
982,
4672,
309,
486,
3258,
30,
327,
5378,
3258,
22,
273,
1014,
18,
3072,
12,
9216,
16,
729,
16,
306,
12,
2938,
16,
296,
267,
2187,
3258,
... |
base, ext = os.path.splitext(fn) | ext = os.path.splitext(fn)[1] | def _xcodeFiles(base): for fn in os.listdir(base): base, ext = os.path.splitext(fn) if ext == '.xcode': yield XCODE_20, os.path.join(base, fn, 'project.pbxproj') elif ext == '.xcodeproj': yield XCODE_21, os.path.join(base, fn, 'project.pbxproj') | 70229f6e2050aab7e19460648ab83d8b08e3b9d5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/70229f6e2050aab7e19460648ab83d8b08e3b9d5/ArchiveGraph.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
92,
710,
2697,
12,
1969,
4672,
364,
2295,
316,
1140,
18,
1098,
1214,
12,
1969,
4672,
1110,
273,
1140,
18,
803,
18,
4939,
408,
12,
4293,
25146,
21,
65,
309,
1110,
422,
2418,
92,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
92,
710,
2697,
12,
1969,
4672,
364,
2295,
316,
1140,
18,
1098,
1214,
12,
1969,
4672,
1110,
273,
1140,
18,
803,
18,
4939,
408,
12,
4293,
25146,
21,
65,
309,
1110,
422,
2418,
92,
... |
self.__logger = LogFactory.create_for(self.__class__.__name__) | def __init__(self, musics, listener, random=False): self.__timer = e32.Ao_timer() self.__listener = listener self.__should_stop = False self.__current_index = 0 self.__random = random self.__update_play_mode = False self.is_playing = False self.is_new = True self.__logger = LogFactory.create_for(self.__class__.__name__) if musics: self.__linear_musics = musics self.__random_musics = musics[:] shuffle(self.__random_musics) if random: self.__musics = self.__random_musics else: self.__musics = self.__linear_musics self.current_music = self.__musics[0] self.log_music_list() else: self.current_music = None | 43a0f8d3d71fafa93f66b7de5c6311692b8b2ccd /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5169/43a0f8d3d71fafa93f66b7de5c6311692b8b2ccd/aspyplayer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
312,
407,
2102,
16,
2991,
16,
2744,
33,
8381,
4672,
365,
16186,
12542,
273,
425,
1578,
18,
37,
83,
67,
12542,
1435,
365,
16186,
12757,
273,
2991,
365,
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,
1001,
2738,
972,
12,
2890,
16,
312,
407,
2102,
16,
2991,
16,
2744,
33,
8381,
4672,
365,
16186,
12542,
273,
425,
1578,
18,
37,
83,
67,
12542,
1435,
365,
16186,
12757,
273,
2991,
365,
16... | |
if cache.has_key(path) and cache[path] != info: module = reload(module) | if cache.get(path) == info: continue module = reload(module) | def freshimport(name, cache={}): """Import a module, reloading it if the source file has changed.""" topmodule = __import__(name) module = None for component in split(name, '.'): if module == None: module = topmodule path = split(name, '.')[0] else: module = getattr(module, component) path = path + '.' + component if hasattr(module, '__file__'): file = module.__file__ if os.path.exists(file): info = (file, os.path.getmtime(file), os.path.getsize(file)) if cache.has_key(path) and cache[path] != info: module = reload(module) file = module.__file__ if os.path.exists(file): info = (file, os.path.getmtime(file), os.path.getsize(file)) cache[path] = info return module | ba2fd5afdf80ef597de19078ea045e40b2b1540c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/ba2fd5afdf80ef597de19078ea045e40b2b1540c/pydoc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12186,
5666,
12,
529,
16,
1247,
12938,
4672,
3536,
5010,
279,
1605,
16,
7749,
310,
518,
309,
326,
1084,
585,
711,
3550,
12123,
1760,
2978,
273,
1001,
5666,
972,
12,
529,
13,
1605,
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,
12186,
5666,
12,
529,
16,
1247,
12938,
4672,
3536,
5010,
279,
1605,
16,
7749,
310,
518,
309,
326,
1084,
585,
711,
3550,
12123,
1760,
2978,
273,
1001,
5666,
972,
12,
529,
13,
1605,
273,
... |
bondIndex = cAlphaViewer.renderer.getBondIndex(atom.getHashKey(), nextAtom.getHashKey()) | bondIndex = self.CalphaViewer.renderer.getBondIndex(atom.getHashKey(), nextAtom.getHashKey()) | def removeSelectedAtoms(self): cAlphaViewer = self.app.viewers['calpha'] print 'helices', self.currentChainModel.helices.keys() print 'orphan strands', self.currentChainModel.orphanStrands.keys() print self.currentChainModel.secelList.keys() for resIndex in self.currentChainModel.getSelection(): res = self.currentChainModel[resIndex] atom = res.getAtom('CA') if not atom: continue if atom.getSelected(): #Check if it is in a Secel secel = self.currentChainModel.getSecelByIndex(resIndex) if secel.label != 'no-label': self.currentChainModel.removeSecel(secel) prevAtom = self.currentChainModel[resIndex-1].getAtom('CA') nextAtom = self.currentChainModel[resIndex+1].getAtom('CA') if prevAtom: #print 'There is a previous atom' bondIndex = cAlphaViewer.renderer.getBondIndex(atom.getHashKey(), prevAtom.getHashKey()) if bondIndex: #print 'removing bond before' cAlphaViewer.renderer.deleteBond(bondIndex) if nextAtom: #print 'There is a next atom' bondIndex = cAlphaViewer.renderer.getBondIndex(atom.getHashKey(), nextAtom.getHashKey()) if bondIndex: #print 'removing bond after' cAlphaViewer.renderer.deleteBond(bondIndex) res.clearAtom('CA') #print res.getAtomNames() #print 'removing atom w/ resNum of:', atom.getResSeq() cAlphaViewer.renderer.deleteAtom(atom.getHashKey()) del atom cAlphaViewer.emitModelChanged() print 'helices', self.currentChainModel.helices.keys() print 'orphan strands', self.currentChainModel.orphanStrands.keys() print self.currentChainModel.secelList.keys() | 9fefa88d897047cb33ba1b9c7ca873fe31bb572c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4399/9fefa88d897047cb33ba1b9c7ca873fe31bb572c/structure_editor.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1206,
7416,
14280,
12,
2890,
4672,
276,
9690,
18415,
273,
365,
18,
2910,
18,
1945,
414,
3292,
771,
2762,
3546,
1172,
296,
76,
292,
1242,
2187,
365,
18,
2972,
3893,
1488,
18,
76,
292,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1206,
7416,
14280,
12,
2890,
4672,
276,
9690,
18415,
273,
365,
18,
2910,
18,
1945,
414,
3292,
771,
2762,
3546,
1172,
296,
76,
292,
1242,
2187,
365,
18,
2972,
3893,
1488,
18,
76,
292,
1... |
self.logSys.debug("Log rotation detected") | self.logSys.debug("Log rotation detected for " + self.logPath) | def setFilePos(self, file): """ Sets the file position. We must take care of log file rotation and reset the position to 0 in that case. Use the log message timestamp in order to detect this. """ line = file.readline() if self.lastDate < self.getTime(line): self.logSys.debug("Date " + `self.lastDate` + " is " + "smaller than " + `self.getTime(line)`) self.logSys.debug("Log rotation detected") self.lastPos = 0 self.logSys.debug("Setting file position to " + `self.lastPos`) file.seek(self.lastPos) | 6f6742266c57d0ad83146b06b3e39c6964091d20 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12171/6f6742266c57d0ad83146b06b3e39c6964091d20/logreader.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
19658,
1616,
12,
2890,
16,
585,
4672,
3536,
11511,
326,
585,
1754,
18,
1660,
1297,
4862,
7671,
434,
613,
585,
6752,
471,
2715,
326,
1754,
358,
374,
316,
716,
648,
18,
2672,
326,
613,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
19658,
1616,
12,
2890,
16,
585,
4672,
3536,
11511,
326,
585,
1754,
18,
1660,
1297,
4862,
7671,
434,
613,
585,
6752,
471,
2715,
326,
1754,
358,
374,
316,
716,
648,
18,
2672,
326,
613,
8... |
_htmlEntityMap = dict(zip("gt lt amp nbsp quot".split(),"><& '")) | _htmlEntityMap = dict(zip("gt lt amp nbsp quot".split(),'><& "')) | def checkUnindent(s,l,t): if l >= len(s): return curCol = col(l,s) if not(indentStack and curCol < indentStack[-1] and curCol <= indentStack[-2]): raise ParseException(s,l,"not an unindent") indentStack.pop() | e0ca9c3ec38d75e110aa3bc15e2e5ca4c5cae61d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3693/e0ca9c3ec38d75e110aa3bc15e2e5ca4c5cae61d/pyparsing.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
984,
9355,
12,
87,
16,
80,
16,
88,
4672,
309,
328,
1545,
562,
12,
87,
4672,
327,
662,
914,
273,
645,
12,
80,
16,
87,
13,
309,
486,
12,
9355,
2624,
471,
662,
914,
411,
3504,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
984,
9355,
12,
87,
16,
80,
16,
88,
4672,
309,
328,
1545,
562,
12,
87,
4672,
327,
662,
914,
273,
645,
12,
80,
16,
87,
13,
309,
486,
12,
9355,
2624,
471,
662,
914,
411,
3504,
... |
referencenode = nodes.reference( referencename + match.group(self.groups.initial.refend), referencename) | referencenode = nodes.reference(referencename + match.group('refend'), referencename) | def reference(self, match, lineno, anonymous=None): referencename = match.group(self.groups.initial.refname) refname = normalize_name(referencename) referencenode = nodes.reference( referencename + match.group(self.groups.initial.refend), referencename) if anonymous: referencenode['anonymous'] = 1 self.document.note_anonymous_ref(referencenode) else: referencenode['refname'] = refname self.document.note_refname(referencenode) string = match.string matchstart = match.start(self.groups.initial.whole) matchend = match.end(self.groups.initial.whole) return (string[:matchstart], [referencenode], string[matchend:], []) | 9aa86b66cf632d24cd8412c352ecb461084727da /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1278/9aa86b66cf632d24cd8412c352ecb461084727da/states.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2114,
12,
2890,
16,
845,
16,
7586,
16,
13236,
33,
7036,
4672,
8884,
1331,
1069,
273,
845,
18,
1655,
12,
2890,
18,
4650,
18,
6769,
18,
1734,
529,
13,
1278,
529,
273,
3883,
67,
529,
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,
2114,
12,
2890,
16,
845,
16,
7586,
16,
13236,
33,
7036,
4672,
8884,
1331,
1069,
273,
845,
18,
1655,
12,
2890,
18,
4650,
18,
6769,
18,
1734,
529,
13,
1278,
529,
273,
3883,
67,
529,
12... |
tuple(range(self.n_Hrepresentation())))) | None)) | def face_lattice(self): """ Computes the face-lattice poset. Elements are tuples of (vertices, facets) - i.e. this keeps track of both the vertices in each face, and all the facets containing them. | 622daa79aeaf0089718b03ba696d3335735098f3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/622daa79aeaf0089718b03ba696d3335735098f3/polyhedra.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7945,
67,
80,
24966,
12,
2890,
4672,
3536,
14169,
281,
326,
7945,
17,
80,
24966,
949,
278,
18,
17219,
854,
10384,
434,
261,
17476,
16,
21681,
13,
300,
277,
18,
73,
18,
333,
20948,
3298... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7945,
67,
80,
24966,
12,
2890,
4672,
3536,
14169,
281,
326,
7945,
17,
80,
24966,
949,
278,
18,
17219,
854,
10384,
434,
261,
17476,
16,
21681,
13,
300,
277,
18,
73,
18,
333,
20948,
3298... |
f.write(str + "\n") | for i in args: f.write("%s INFO %s" % (time.asctime(), repr(i))) f.write("\n") | def log(str): f = open(filename, "a") f.write(str + "\n") f.close() | f3afe560631d9d334226a2eb6c1776f74093d1f8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11836/f3afe560631d9d334226a2eb6c1776f74093d1f8/tools.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
613,
12,
701,
4672,
284,
273,
1696,
12,
3459,
16,
315,
69,
7923,
364,
277,
316,
833,
30,
284,
18,
2626,
27188,
87,
9286,
738,
87,
6,
738,
261,
957,
18,
345,
21261,
9334,
8480,
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,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
613,
12,
701,
4672,
284,
273,
1696,
12,
3459,
16,
315,
69,
7923,
364,
277,
316,
833,
30,
284,
18,
2626,
27188,
87,
9286,
738,
87,
6,
738,
261,
957,
18,
345,
21261,
9334,
8480,
12,
... |
sys.stdout.write(" ? " + dirname + " has no " + | sys.stdout.write(" ? " + dirname + " - has no " + | def get_info(name): """ Get info for a locally installed campaign. If expects a direct path to the info.cfg file. """ if not os.path.exists(name): return None, None p = wmlparser.Parser(None) p.parse_file(name) info = wmldata.DataSub("WML") p.parse_top(info) uploads = info.get_or_create_sub("info").get_text_val("uploads", "") version = info.get_or_create_sub("info").get_text_val("version", "") return uploads, version | 2f63e47f8260b9331767ef9c983bda3eb6df2759 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9355/2f63e47f8260b9331767ef9c983bda3eb6df2759/campaigns_client.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
1376,
12,
529,
4672,
3536,
968,
1123,
364,
279,
13760,
5876,
8965,
18,
971,
10999,
279,
2657,
589,
358,
326,
1123,
18,
7066,
585,
18,
3536,
309,
486,
1140,
18,
803,
18,
1808,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1376,
12,
529,
4672,
3536,
968,
1123,
364,
279,
13760,
5876,
8965,
18,
971,
10999,
279,
2657,
589,
358,
326,
1123,
18,
7066,
585,
18,
3536,
309,
486,
1140,
18,
803,
18,
1808,
... |
date = time.strptime(date_parts[1], '%Y/%m/%d %H:%M:%S') | date_without_plus = date_parts[1].split("+"); date = time.strptime(date_without_plus[0].strip(), '%Y-%m-%d %H:%M:%S') | def main(): """ Calls the parse_args function based on the command-line inputs and handles parsed arguments. """ (opts, args) = parse_args(sys.argv) # Handle parsed options. if opts.svn_log or opts.git_log: # Grab the correct log file based on what was specified. log_file = opts.svn_log if opts.git_log: log_file = opts.git_log # Check to be sure the specified log path exists. if os.path.exists(log_file): # Iterate through log file lines to parse out the revision history, adding Event # entries to a list as we go. event_list = [] file_handle = open(log_file, 'r') line = file_handle.readline() while len(line) > 0: # The svn_sep indicates a new revision history to parse. if line.startswith(svn_sep): # Extract author and date from revision line. Here is a sample revision line: # r9 | michael.ogawa | 2008-06-19 10:23:25 -0500 (Thu, 19 Jun 2008) | 3 lines. rev_line = file_handle.readline() # The last line of the file is an svn_sep line, so if we try to retreive the # revision line and get an empty string, we know we are at the end of the file # and can break out of the loop. if rev_line is '' or len(rev_line) < 2: break; rev_parts = rev_line.split(' | ') author = rev_parts[1] date_parts = rev_parts[2].split(" ") date = date_parts[0] + " " + date_parts[1] date = time.strptime(date, '%Y-%m-%d %H:%M:%S') date = int(time.mktime(date))*1000 # Skip the 'Changed paths:' line and start reading in the changed filenames. file_handle.readline() path = file_handle.readline() while len(path) > 1: ch_path = None if opts.svn_log: ch_path = path[5:].split(" (from")[0].replace("\n", "") else: # git uses quotes if filename contains unprintable characters ch_path = path[2:].replace("\n", "").replace("\"", "") event_list.append(Event(ch_path, date, author)) path = file_handle.readline() line = file_handle.readline() file_handle.close() # Generate standard event xml file from event_list. create_event_xml(event_list, log_file, opts.output_log) else: print "Please specify an existing path." if opts.cvs_log: log_file = opts.cvs_log # Check to be sure the specified log path exists. if os.path.exists(log_file): event_list = [] filename = "" file_handle = open(log_file, 'r') line = file_handle.readline() while len(line) > 0: # The cvs_sep indicates a new revision history to parse. if line.startswith(cvs_sep): #Read the revision number rev_line = file_handle.readline() # Extract author and date from revision line. rev_line = file_handle.readline() if(rev_line.lower().find("date:") == 0): rev_parts = rev_line.split('; ') date_parts = rev_parts[0].split(": ") date = time.strptime(date_parts[1], '%Y/%m/%d %H:%M:%S') date = int(time.mktime(date))*1000 author = rev_parts[1].split(": ")[1] event_list.append(Event(filename, date, author)) line = file_handle.readline() if(str(line) == ""): break elif(line.lower().find("rcs file: ") >= 0): rev_line = line.split(": "); filename = rev_line[1].strip().split(',')[0] file_handle.close() # Generate standard event xml file from event_list. create_event_xml(event_list, log_file, opts.output_log) else: print "Please specify an existing path." if opts.vss_log: log_file = opts.vss_log if os.path.exists(log_file): event_list = [] file_handle = open(log_file, 'r') filename = "" author = "" mdy = "" t = "" # The VSS report can have multiple lines for each entry, where the values # are continued within a column range. for line in file_handle.readlines(): if line.startswith(' '): # Handle a continuation line filename += line[0:20].strip() author += line[22:31].strip() else: if mdy: filename = filename.replace("$", "") date = datetime.strptime(mdy + ' ' + t[:-1]+t[-1].upper()+'M', "%m/%d/%y %I:%M%p") date = int(time.mktime(date.timetuple())*1000) event_list.append(Event(filename, date, author.lower())) filename = line[0:20].strip() author = line[21:31].strip() mdy = line[32:40].strip() t = line[42:48].strip() create_event_xml(event_list, log_file, opts.output_log) if opts.starteam_log: log_file = opts.starteam_log if os.path.exists(log_file): import re event_list = [] file_handle = open(log_file, 'r') folder = None filename = None # The Starteam log can have multiple lines for each entry for line in file_handle.readlines(): m = re.compile("^Folder: (\w*) \(working dir: (.*)\)$").match(line) if m: folder = m.group(2) #print "parsing folder %s @ %s" % (m.group(1), folder) continue m = re.compile("^History for: (.*)$").match(line) if m: filename = m.group(1) #print "parsing file %s" % filename continue m = re.compile("^Author: (.*) Date: (.*) \w+$").match(line) if m: author = m.group(1) date = datetime.strptime(m.group(2), "%m/%d/%y %I:%M:%S %p") date = int(time.mktime(date.timetuple())*1000) event_list.append(Event(os.path.join(folder, filename), date, author)) #print "%s check in at %s" % (author, date) continue create_event_xml(event_list, log_file, opts.output_log) if opts.wikiswarm_log: log_file = opts.wikiswarm_log # Check to be sure the specified log path exists. if os.path.exists(log_file): event_list = [] file_handle = open(log_file, 'r') line = file_handle.readline() for rev_line in file_handle.readlines(): if rev_line is '': continue rev_parts = rev_line.split('|') #rev_id = rev_parts[0].strip()# Don't really need this, it's mainly for the ouputter filename = rev_parts[1].strip() author = rev_parts[2].strip() date = rev_parts[3].strip()+'000' # Padd to convert seconds into milliseconds event_list.append(Event(filename, date, author)) continue # Generate standard event xml file from event_list. create_event_xml(event_list, log_file, opts.output_log) if opts.mercurial_log: # author: Stefan Scherfke # contact: stefan.scherfke at uni-oldenburg.de log_file = opts.mercurial_log if os.path.exists(log_file): event_list = [] file_handle = open(log_file, 'r') state = 0 user = '' date = '' files = [] for line in file_handle.readlines(): if state == 0: author = line[:-1] state += 1 elif state == 1: date = line[:line.find('.')] + '000' state += 1 elif state == 2: files = line[:-1].split(' ') for filename in files: event_list.append(Event(filename, date, author.lower())) state += 1 elif state == 3: state = 0 else: print 'Error: undifined state' create_event_xml(event_list, log_file, opts.output_log) if opts.darcs_log: log_file = opts.darcs_log if os.path.exists(log_file): event_list = [] file_handle = open(log_file, 'r') user = '' date = '' for line in file_handle.readlines(): line = line.rstrip() if len(line) == 0: continue elif line[0] != ' ': date = line[:29].strip() author = line[30:].strip() if date[7:9] == ' ': date = date.replace(' ', ' 0') date = int(time.mktime(time.strptime(date, '%a %b %d %H:%M:%S %Z %Y')))*1000 parts = author.split('<') if len(parts) == 2: author = parts[0].strip() elif line[0] == ' ' and len(line) > 4: if line[4:8] == 'M ./' or line[4:8] == 'A ./' or line[4:8] == 'R ./': filename = line.lstrip('MAR ./') filename = filename.rstrip(' +-123456789') event_list.append(Event(filename, date, author)) continue else: continue else: continue create_event_xml(event_list, log_file, opts.output_log) if opts.perforce_path: import re event_list = [] changelists = run_marshal('p4 -G changelists "' + opts.perforce_path + '"') file_key_re = re.compile("^depotFile") for changelist in changelists: files = run_marshal('p4 -G describe -s "' + changelist['change'] + '"') for file in files: for key_name, file_name in file.iteritems(): if file_key_re.match(key_name): event_list.append(Event(file_name, int(changelist['time'] + '000'), changelist['user'])) create_event_xml(event_list, 'depot', opts.output_log) | a56dffaae5c63c5cdb47e0af4990bd15680d3510 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5287/a56dffaae5c63c5cdb47e0af4990bd15680d3510/convert_logs.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
3536,
23665,
326,
1109,
67,
1968,
445,
2511,
603,
326,
1296,
17,
1369,
4540,
471,
7372,
2707,
1775,
18,
3536,
261,
4952,
16,
833,
13,
273,
1109,
67,
1968,
12,
9499,
18,
19... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
3536,
23665,
326,
1109,
67,
1968,
445,
2511,
603,
326,
1296,
17,
1369,
4540,
471,
7372,
2707,
1775,
18,
3536,
261,
4952,
16,
833,
13,
273,
1109,
67,
1968,
12,
9499,
18,
19... |
'expected': {'testminus': array(-1)}, | 'expected': {'testminus': mlarr(-1)}, | def _rt_check_case(name, expected, format): mat_stream = StringIO() savemat(mat_stream, expected, format=format) mat_stream.seek(0) _check_case(name, [mat_stream], expected) | fe9ca17b08307388f64d4152ff758a527f5587c8 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12971/fe9ca17b08307388f64d4152ff758a527f5587c8/test_mio.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3797,
67,
1893,
67,
3593,
12,
529,
16,
2665,
16,
740,
4672,
4834,
67,
3256,
273,
15777,
1435,
4087,
351,
270,
12,
7373,
67,
3256,
16,
2665,
16,
740,
33,
2139,
13,
4834,
67,
3256... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3797,
67,
1893,
67,
3593,
12,
529,
16,
2665,
16,
740,
4672,
4834,
67,
3256,
273,
15777,
1435,
4087,
351,
270,
12,
7373,
67,
3256,
16,
2665,
16,
740,
33,
2139,
13,
4834,
67,
3256... |
'HTTP_USER_AGENT', 'HTTP_COOKIE'): | 'HTTP_USER_AGENT', 'HTTP_COOKIE', 'HTTP_REFERER'): | def run_cgi(self): """Execute a CGI script.""" path = self.path dir, rest = self.cgi_info | 05f321ba4102125df222f42079d9ef0c9bec4db7 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12029/05f321ba4102125df222f42079d9ef0c9bec4db7/CGIHTTPServer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
67,
19062,
12,
2890,
4672,
3536,
5289,
279,
385,
13797,
2728,
12123,
589,
273,
365,
18,
803,
1577,
16,
3127,
273,
365,
18,
19062,
67,
1376,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
67,
19062,
12,
2890,
4672,
3536,
5289,
279,
385,
13797,
2728,
12123,
589,
273,
365,
18,
803,
1577,
16,
3127,
273,
365,
18,
19062,
67,
1376,
2,
-100,
-100,
-100,
-100,
-100,
-100,
... |
pkgconfig = env['pkg-config'] or 'PKG_CONFIG_PATH=%s:%s/pkgconfig:/usr/lib/qt4/lib/pkgconfig:/opt/qt4/lib/pkgconfig:/usr/lib/qt4/lib:/opt/qt4/lib pkg-config --silence-errors' % (qtlibs, qtlibs) | if not 'PKG_CONFIG_PATH' in os.environ: os.environ['PKG_CONFIG_PATH'] = '%s:%s/pkgconfig:/usr/lib/qt4/lib/pkgconfig:/opt/qt4/lib/pkgconfig:/usr/lib/qt4/lib:/opt/qt4/lib pkg-config --silence-errors' % (qtlibs, qtlibs) pkgconfig = env['pkg-config'] or 'pkg-config' | def find_bin(lst, var): for f in lst: try: ret = self.find_program(f, path_list=paths) except self.errors.ConfigurationError: pass else: env[var]=ret break | b55c1d59f878c7412d2521b084fb2b6bc6eef85d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2886/b55c1d59f878c7412d2521b084fb2b6bc6eef85d/qt4.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1104,
67,
4757,
12,
16923,
16,
569,
4672,
364,
284,
316,
9441,
30,
775,
30,
325,
273,
365,
18,
4720,
67,
12890,
12,
74,
16,
589,
67,
1098,
33,
4481,
13,
1335,
365,
18,
4324,
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,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1104,
67,
4757,
12,
16923,
16,
569,
4672,
364,
284,
316,
9441,
30,
775,
30,
325,
273,
365,
18,
4720,
67,
12890,
12,
74,
16,
589,
67,
1098,
33,
4481,
13,
1335,
365,
18,
4324,
18,
17... |
self.schedule = schedule | self._schedule = schedule | def setSchedule(self, schedule): """Sets the connector schedule. | 961821a20ae2dbd3026d4f99905a647760874cd0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6393/961821a20ae2dbd3026d4f99905a647760874cd0/connectormanager.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
6061,
12,
2890,
16,
4788,
4672,
3536,
2785,
326,
8703,
4788,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
444,
6061,
12,
2890,
16,
4788,
4672,
3536,
2785,
326,
8703,
4788,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
print "Before/After error?" | print "After error?" | def redo(self): print "\nBefore error?" #TODO: Fix segmentation fault!!! atom = self.viewer.renderer.addAtom(self.chosenAtom) #Segmentation fault here if I click undo then redo print "Before/After error?" self.chosenAtom = atom print "After error?" self.currentChainModel[self.resSeqNum].addAtomObject(self.chosenAtom) self.currentChainModel[self.resSeqNum].setCAlphaColorToDefault() if self.resSeqNum - 1 in self.currentChainModel.residueRange(): prevCAlpha = self.currentChainModel[self.resSeqNum - 1].getAtom('CA') if prevCAlpha: print "adding a bond before" self.bondBefore=PDBBond() self.bondBefore.setAtom0Ix(prevCAlpha.getHashKey()) self.bondBefore.setAtom1Ix(self.chosenAtom.getHashKey()) if self.resSeqNum + 1 in self.currentChainModel.residueRange(): nextCAlpha = self.currentChainModel[self.resSeqNum + 1].getAtom('CA') if nextCAlpha: print "adding a bond after" self.bondAfter = PDBBond() self.bondAfter.setAtom0Ix(nextCAlpha.getHashKey()) self.bondAfter.setAtom1Ix(self.chosenAtom.getHashKey()) if self.bondBefore: self.viewer.renderer.addBond(self.bondBefore) if self.bondAfter: self.viewer.renderer.addBond(self.bondAfter) self.viewer.emitModelChanged() self.structureEditor.atomJustAdded = self.chosenAtom | 9db7b9c590275f962e65bcd3c870a9a8dd2cd0c1 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4399/9db7b9c590275f962e65bcd3c870a9a8dd2cd0c1/structure_editor.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
24524,
12,
2890,
4672,
1172,
1548,
82,
4649,
555,
7225,
468,
6241,
30,
12139,
25192,
12530,
25885,
3179,
273,
365,
18,
25256,
18,
14374,
18,
1289,
3641,
12,
2890,
18,
343,
8918,
3641,
13... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
24524,
12,
2890,
4672,
1172,
1548,
82,
4649,
555,
7225,
468,
6241,
30,
12139,
25192,
12530,
25885,
3179,
273,
365,
18,
25256,
18,
14374,
18,
1289,
3641,
12,
2890,
18,
343,
8918,
3641,
13... |
self.parser.parseError() | def endTagImply(self, name): if self.parser.elementInScope(name): self.closeCell() self.parser.processEndTag(name) else: self.parser.parseError() # sometimes innerHTML case | c99be0308665402e7cb00c7eb826e40689138f80 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10463/c99be0308665402e7cb00c7eb826e40689138f80/parser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
29765,
1170,
1283,
12,
2890,
16,
508,
4672,
309,
365,
18,
4288,
18,
2956,
382,
3876,
12,
529,
4672,
365,
18,
4412,
4020,
1435,
365,
18,
4288,
18,
2567,
25633,
12,
529,
13,
469,
30,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
29765,
1170,
1283,
12,
2890,
16,
508,
4672,
309,
365,
18,
4288,
18,
2956,
382,
3876,
12,
529,
4672,
365,
18,
4412,
4020,
1435,
365,
18,
4288,
18,
2567,
25633,
12,
529,
13,
469,
30,
4... | |
sage: acre = units.area.acre sage: type(acre) <class 'sage.symbolic.units.UnitExpression'> | sage: acre = units.area.acre sage: type(acre) <class 'sage.symbolic.units.UnitExpression'> | def unit_derivations_expr(v): """ Given derived units name, returns the corresponding units expression. For example, given 'acceleration' output the symbolic expression length/time^2. INPUT: - `v` -- string, name of a unit type such as 'area', 'volume', etc. OUTPUT: - symbolic expression EXAMPLES:: sage: sage.symbolic.units.unit_derivations_expr('volume') length^3 sage: sage.symbolic.units.unit_derivations_expr('electric_potential') length^2*mass/(current*time^3) If the unit name is unknown, a KeyError is raised:: sage: sage.symbolic.units.unit_derivations_expr('invalid') Traceback (most recent call last): ... KeyError: 'invalid' """ v = str(v) Z = unit_derivations[v] if isinstance(Z,str): d = dict([(x,str_to_unit(x)) for x in vars_in_str(Z)]) from sage.misc.all import sage_eval Z = sage_eval(Z, d) unit_derivations[v] = Z return Z | d9145e61c2e167a847618a21778e0e532a04af5d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/d9145e61c2e167a847618a21778e0e532a04af5d/units.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2836,
67,
20615,
1012,
67,
8638,
12,
90,
4672,
3536,
16803,
10379,
4971,
508,
16,
1135,
326,
4656,
4971,
2652,
18,
225,
2457,
3454,
16,
864,
296,
30737,
7067,
11,
876,
326,
16754,
2652,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2836,
67,
20615,
1012,
67,
8638,
12,
90,
4672,
3536,
16803,
10379,
4971,
508,
16,
1135,
326,
4656,
4971,
2652,
18,
225,
2457,
3454,
16,
864,
296,
30737,
7067,
11,
876,
326,
16754,
2652,
... |
f=urllib.urlopen("http://www.tvsite.be/ndl/zender.asp?move=full&channel=%s&dag=%s"%(title,date)) | f=urllib.urlopen("http://www.tvsite.be/ndl/zender.asp?move=full&channel=%s&dag=%s"%(title,date)) | def __init__(self,id,title,days): self.id=id self.title=title | 7b81d7649c303a524c05ce546e3b0939b85ecafa /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/7b81d7649c303a524c05ce546e3b0939b85ecafa/xml_tv_be.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
350,
16,
2649,
16,
9810,
4672,
365,
18,
350,
33,
350,
365,
18,
2649,
33,
2649,
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,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
350,
16,
2649,
16,
9810,
4672,
365,
18,
350,
33,
350,
365,
18,
2649,
33,
2649,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
return util.copy_file (infile, outfile, preserve_mode, preserve_times, not self.force, link, self.verbose >= level, self.dry_run) | return file_util.copy_file( infile, outfile, preserve_mode, preserve_times, not self.force, link, self.verbose >= level, self.dry_run) | def copy_file (self, infile, outfile, preserve_mode=1, preserve_times=1, link=None, level=1): """Copy a file respecting verbose, dry-run and force flags. (The former two default to whatever is in the Distribution object, and the latter defaults to false for commands that don't define it.)""" | 29124ff4f2b7e598801ef380184fcd2cd9d113d6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/29124ff4f2b7e598801ef380184fcd2cd9d113d6/cmd.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1610,
67,
768,
261,
2890,
16,
14568,
16,
8756,
16,
9420,
67,
3188,
33,
21,
16,
9420,
67,
8293,
33,
21,
16,
1692,
33,
7036,
16,
1801,
33,
21,
4672,
3536,
2951,
279,
585,
8762,
310,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1610,
67,
768,
261,
2890,
16,
14568,
16,
8756,
16,
9420,
67,
3188,
33,
21,
16,
9420,
67,
8293,
33,
21,
16,
1692,
33,
7036,
16,
1801,
33,
21,
4672,
3536,
2951,
279,
585,
8762,
310,
... |
version = "0.0.0", | version = version, | def filter_images (image): return image.startswith ("plugin-") or image.startswith ("category-") | 34d4d1b1514147374bfb4a847869aeefd8636be4 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1272/34d4d1b1514147374bfb4a847869aeefd8636be4/setup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1034,
67,
7369,
261,
2730,
4672,
327,
1316,
18,
17514,
1918,
7566,
4094,
17,
7923,
578,
1316,
18,
17514,
1918,
7566,
4743,
17,
7923,
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,
0,
0,
0,
0,
0,
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,
1034,
67,
7369,
261,
2730,
4672,
327,
1316,
18,
17514,
1918,
7566,
4094,
17,
7923,
578,
1316,
18,
17514,
1918,
7566,
4743,
17,
7923,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
Parses all of the percent directives found at the top of a file and returns the input text of self with all of them removed. | Returns a string which consists of the input text of this cell with the percent directives at the top removed. As it's doing this, it computes a list of all the directives and which system (if any) the cell should be run under. | def parse_percent_directives(self): """ Parses all of the percent directives found at the top of a file and returns the input text of self with all of them removed. | d4083f2c70b742b2d1f732f7e2e03085dcc0c5ff /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/d4083f2c70b742b2d1f732f7e2e03085dcc0c5ff/cell.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
67,
8849,
67,
30850,
12,
2890,
4672,
3536,
2280,
2420,
777,
434,
326,
5551,
13877,
1392,
622,
326,
1760,
434,
279,
585,
471,
1135,
326,
810,
977,
434,
365,
598,
777,
434,
2182,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
67,
8849,
67,
30850,
12,
2890,
4672,
3536,
2280,
2420,
777,
434,
326,
5551,
13877,
1392,
622,
326,
1760,
434,
279,
585,
471,
1135,
326,
810,
977,
434,
365,
598,
777,
434,
2182,
3... |
id = self.hash(self, *args) print "%r hashes to %r" % (args, id) | id = self.hash(*args) | def get(self, *args): """Retrieve the item associated with some set of arguments. If the item doesn't exist in the cache, this calls miss() with the same arguments to generate the item, and adds it to the cache. | f42431cec6442b5e0961fb9327f5695e31a55b7b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9478/f42431cec6442b5e0961fb9327f5695e31a55b7b/Cache.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
12,
2890,
16,
380,
1968,
4672,
3536,
5767,
326,
761,
3627,
598,
2690,
444,
434,
1775,
18,
971,
326,
761,
3302,
1404,
1005,
316,
326,
1247,
16,
333,
4097,
12543,
1435,
598,
326,
19... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
336,
12,
2890,
16,
380,
1968,
4672,
3536,
5767,
326,
761,
3627,
598,
2690,
444,
434,
1775,
18,
971,
326,
761,
3302,
1404,
1005,
316,
326,
1247,
16,
333,
4097,
12543,
1435,
598,
326,
19... |
print "op", output_path | def renderMath(latex, output_path=None, output_mode='png', render_engine='blahtexml'): """ @param latex: LaTeX code @type latex: unicode @param output_mode: one of the values 'png' or 'mathml'. mathml only works with blahtexml as render_engine @type output_mode: str @param render_engine: one of the value 'blahtexml' or 'texvc' @type render_engine: str @returns: either path to generated png or mathml string @rtype: basestring """ assert output_mode in ("png", "mathml") assert render_engine in ("texvc", "blahtexml") assert isinstance(latex, unicode), 'latex must be of type unicode' if output_mode == 'png' and not output_path: log.error('math rendering with output_mode png requires an output_path') raise Exception("output path required") removeTmpDir = False if output_mode == 'mathml' and not output_path: output_path = tempfile.mkdtemp() removeTmpDir = True print "op", output_path output_path = os.path.abspath(output_path) result = None if render_engine == 'blahtexml': result = _renderMathBlahtex(latex, output_path=output_path, output_mode=output_mode) if not result and output_mode == 'png': result = _renderMathTexvc(latex, output_path=output_path, output_mode=output_mode) if removeTmpDir: shutil.rmtree(output_path) return result | 5b0bee71417577bb7619ad5a13f118e9b6d9c685 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12391/5b0bee71417577bb7619ad5a13f118e9b6d9c685/math_utils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1743,
10477,
12,
26264,
16,
876,
67,
803,
33,
7036,
16,
876,
67,
3188,
2218,
6446,
2187,
1743,
67,
8944,
2218,
3083,
30024,
338,
781,
11,
4672,
3536,
632,
891,
25079,
30,
21072,
21575,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1743,
10477,
12,
26264,
16,
876,
67,
803,
33,
7036,
16,
876,
67,
3188,
2218,
6446,
2187,
1743,
67,
8944,
2218,
3083,
30024,
338,
781,
11,
4672,
3536,
632,
891,
25079,
30,
21072,
21575,
... | |
pagetitle = page.title() wikipedia.output(u'\n>>>> %s <<<<' % pagetitle) if self.prefix: pagetitle = page.titleWithoutNamespace() pagemove = (u'%s%s' % (self.prefix, pagetitle)) | wikipedia.output(u'\n>>>> %s <<<<' % page.title()) pagetitle = page.titleWithoutNamespace() namesp = page.site().namespace(page.namespace()) if self.appendAll == True: pagemove = (u'%s%s%s' % (self.pagestart, pagetitle, self.pageend)) if self.noNamespace == False and namesp: pagemove = (u'%s:%s' % (namesp, pagemove)) elif self.regexAll == True: pagemove = self.regex.sub(self.replacePattern, pagetitle) if self.noNamespace == False and namesp: pagemove = (u'%s:%s' % (namesp, pagemove)) if self.addprefix: pagemove = (u'%s%s' % (self.addprefix, pagetitle)) if self.addprefix or self.appendAll == True or self.regexAll == True: | def treat(self,page): pagetitle = page.title() wikipedia.output(u'\n>>>> %s <<<<' % pagetitle) if self.prefix: pagetitle = page.titleWithoutNamespace() pagemove = (u'%s%s' % (self.prefix, pagetitle)) if self.always == False: ask2 = wikipedia.input(u'Change the page title to "%s"? [(Y)es, (N)o, (Q)uit]' % pagemove) if ask2 in ['y', 'Y']: self.moveOne(page,pagemove,self.delete) elif ask2 in ['q', 'Q']: sys.exit() elif ask2 in ['n', 'N']: pass else: self.treat(page) else: self.moveOne(page,pagemove,self.delete) elif self.appendAll == False: ask = wikipedia.input('What do you want to do: (c)hange page name, (a)ppend to page name, (n)ext page or (q)uit?') if ask in ['c', 'C']: pagemove = wikipedia.input(u'New page name:') self.moveOne(page,pagemove,self.delete) elif ask in ['a', 'A']: self.pagestart = wikipedia.input(u'Append This to the start:') self.pageend = wikipedia.input(u'Append This to the end:') if page.title() == page.titleWithoutNamespace(): pagemove = (u'%s%s%s' % (self.pagestart, page.title(), self.pageend)) else: ask2 = wikipedia.input(u'Do you want to remove the namespace prefix "%s:"? [(Y)es, (N)o]'% page.site().namespace(page.namespace())) if ask2 in ['y', 'Y']: pagemove = (u'%s%s%s' % (self.pagestart, page. titleWithoutNamespace(), self.pageend)) else: pagemove = (u'%s%s%s' % (self.pagestart, page.title(), self.pageend)) ask2 = wikipedia.input(u'Change the page title to "%s"? [(Y)es, (N)o, (A)ll, (Q)uit]' % pagemove) if ask2 in ['y', 'Y']: self.moveOne(page,pagemove,self.delete) elif ask2 in ['a', 'A']: self.appendAll = True self.moveOne(page,pagemove,self.delete) elif ask2 in ['q', 'Q']: sys.exit() elif ask2 in ['n', 'N']: pass else: self.treat(page) elif ask in ['n', 'N']: pass elif ask in ['q', 'Q']: sys.exit() else: self.treat(page) else: pagemove = (u'%s%s%s' % (self.pagestart, page.title(), self.pageend)) if self.always == False: ask2 = wikipedia.input(u'Change the page title to "%s"? [(Y)es, (N)o, (Q)uit]' % pagemove) if ask2 in ['y', 'Y']: self.moveOne(page,pagemove,self.delete) elif ask2 in ['q', 'Q']: sys.exit() elif ask2 in ['n', 'N']: pass else: self.treat(page) else: self.moveOne(page,pagemove,self.delete) | bd3514937b98bef29f1bfde1f2a14a9940dcaf84 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4404/bd3514937b98bef29f1bfde1f2a14a9940dcaf84/movepages.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10116,
12,
2890,
16,
2433,
4672,
21137,
18,
2844,
12,
89,
8314,
82,
9778,
9778,
738,
87,
14360,
32,
11,
738,
1363,
18,
2649,
10756,
4262,
278,
1280,
273,
1363,
18,
2649,
8073,
3402,
14... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
10116,
12,
2890,
16,
2433,
4672,
21137,
18,
2844,
12,
89,
8314,
82,
9778,
9778,
738,
87,
14360,
32,
11,
738,
1363,
18,
2649,
10756,
4262,
278,
1280,
273,
1363,
18,
2649,
8073,
3402,
14... |
approximately satisfied by the number `z`. Note that the returned polynomial need not be irreducible, and indeed usually won't be if `z` is a good approximation to an algebraic number of degree less than `degree`. You can specify the number of known bits or digits with ``known_bits=k`` or ``known_digits=k``; Pari is then told to compute the result using `0.8k` of these bits/digits. (The Pari documentation recommends using a factor between .6 and .9, but internally defaults to .8.) Or, you can specify the precision to use directly with ``use_bits=k`` or ``use_digits=k``. If none of these are specified, then the precision is taken from the input value. A height bound may specified to indicate the maximum coefficient size of the returned polynomial; if a sufficiently small polyomial is not found then ``None`` wil be returned. If ``proof=True`` then the result is returned only if it can be proved correct (i.e. the only possible minimal polynomial satisfying the height bound, or no such polynomial exists). Otherwise a ``ValueError`` is raised indicating that higher precision is required. ALGORITHM: Uses LLL for real/complex inputs, PARI C-library algdep command otherwise. | approximately satisfied by the number `z`. Note that the returned polynomial need not be irreducible, and indeed usually won't be if `z` is a good approximation to an algebraic number of degree less than `degree`. You can specify the number of known bits or digits of `z` with ``known_bits=k`` or ``known_digits=k``. PARI is then told to compute the result using `0.8k` of these bits/digits. Or, you can specify the precision to use directly with ``use_bits=k`` or ``use_digits=k``. If none of these are specified, then the precision is taken from the input value. A height bound may be specified to indicate the maximum coefficient size of the returned polynomial; if a sufficiently small polynomial is not found, then ``None`` will be returned. If ``proof=True`` then the result is returned only if it can be proved correct (i.e. the only possible minimal polynomial satisfying the height bound, or no such polynomial exists). Otherwise a ``ValueError`` is raised indicating that higher precision is required. ALGORITHM: Uses LLL for real/complex inputs, PARI C-library ``algdep`` command otherwise. | def algdep(z, degree, known_bits=None, use_bits=None, known_digits=None, use_digits=None, height_bound=None, proof=False): """ Returns a polynomial of degree at most `degree` which is approximately satisfied by the number `z`. Note that the returned polynomial need not be irreducible, and indeed usually won't be if `z` is a good approximation to an algebraic number of degree less than `degree`. You can specify the number of known bits or digits with ``known_bits=k`` or ``known_digits=k``; Pari is then told to compute the result using `0.8k` of these bits/digits. (The Pari documentation recommends using a factor between .6 and .9, but internally defaults to .8.) Or, you can specify the precision to use directly with ``use_bits=k`` or ``use_digits=k``. If none of these are specified, then the precision is taken from the input value. A height bound may specified to indicate the maximum coefficient size of the returned polynomial; if a sufficiently small polyomial is not found then ``None`` wil be returned. If ``proof=True`` then the result is returned only if it can be proved correct (i.e. the only possible minimal polynomial satisfying the height bound, or no such polynomial exists). Otherwise a ``ValueError`` is raised indicating that higher precision is required. ALGORITHM: Uses LLL for real/complex inputs, PARI C-library algdep command otherwise. Note that ``algebraic_dependency`` is a synonym for ``algdep``. INPUT: - ``z`` - real, complex, or `p`-adic number - ``degree`` - an integer - ``height_bound`` - an integer (default ``None``) specifying the maximum coefficient size for the returned polynomial - ``proof`` - a boolean (default ``False``), requres height_bound to be set EXAMPLES:: sage: algdep(1.888888888888888, 1) 9*x - 17 sage: algdep(0.12121212121212,1) 33*x - 4 sage: algdep(sqrt(2),2) x^2 - 2 This example involves a complex number. :: sage: z = (1/2)*(1 + RDF(sqrt(3)) *CC.0); z 0.500000000000000 + 0.866025403784439*I sage: p = algdep(z, 6); p x^3 + 1 sage: p.factor() (x + 1) * (x^2 - x + 1) sage: z^2 - z + 1 0 This example involves a `p`-adic number. :: sage: K = Qp(3, print_mode = 'series') sage: a = K(7/19); a 1 + 2*3 + 3^2 + 3^3 + 2*3^4 + 2*3^5 + 3^8 + 2*3^9 + 3^11 + 3^12 + 2*3^15 + 2*3^16 + 3^17 + 2*3^19 + O(3^20) sage: algdep(a, 1) 19*x - 7 These examples show the importance of proper precision control. We compute a 200-bit approximation to sqrt(2) which is wrong in the 33'rd bit. :: sage: z = sqrt(RealField(200)(2)) + (1/2)^33 sage: p = algdep(z, 4); p 227004321085*x^4 - 216947902586*x^3 - 99411220986*x^2 + 82234881648*x - 211871195088 sage: factor(p) 227004321085*x^4 - 216947902586*x^3 - 99411220986*x^2 + 82234881648*x - 211871195088 sage: algdep(z, 4, known_bits=32) x^2 - 2 sage: algdep(z, 4, known_digits=10) x^2 - 2 sage: algdep(z, 4, use_bits=25) x^2 - 2 sage: algdep(z, 4, use_digits=8) x^2 - 2 Using the ``height_bound`` and ``proof`` parameters, we can see that `pi` is not the root of an integer polynomial of degree at most 5 and coefficients bounded above by 10. :: sage: algdep(pi.n(), 5, height_bound=10, proof=True) is None True For stronger results, we need more precicion. :: sage: algdep(pi.n(), 5, height_bound=100, proof=True) is None Traceback (most recent call last): ... ValueError: insufficient precision for non-existence proof sage: algdep(pi.n(200), 5, height_bound=100, proof=True) is None True sage: algdep(pi.n(), 10, height_bound=10, proof=True) is None Traceback (most recent call last): ... ValueError: insufficient precision for non-existence proof sage: algdep(pi.n(200), 10, height_bound=10, proof=True) is None True We can also use ``proof=True`` to get positive results. :: sage: a = sqrt(2) + sqrt(3) + sqrt(5) sage: algdep(a.n(), 8, height_bound=1000, proof=True) Traceback (most recent call last): ... ValueError: insufficient precision for uniqueness proof sage: f = algdep(a.n(1000), 8, height_bound=1000, proof=True); f x^8 - 40*x^6 + 352*x^4 - 960*x^2 + 576 sage: f(a).expand() 0 """ if proof and not height_bound: raise ValueError, "height_bound must be given for proof=True" x = ZZ['x'].gen() if isinstance(z, (int, long, integer.Integer)): if height_bound and abs(z) >= height_bound: return None return x - ZZ(z) degree = ZZ(degree) if isinstance(z, (sage.rings.rational.Rational)): if height_bound and max(abs(z.denominator()), abs(z.numerator())) >= height_bound: return None return z.denominator()*x - z.numerator() if isinstance(z, float): z = sage.rings.real_mpfr.RR(z) elif isinstance(z, complex): z = sage.rings.complex_field.CC(z) if isinstance(z, (sage.rings.real_mpfr.RealNumber, sage.rings.complex_number.ComplexNumber)): log2_10 = 3.32192809488736 prec = z.prec() - 6 if known_digits is not None: known_bits = known_digits * log2_10 if known_bits is not None: use_bits = known_bits * 0.8 if use_digits is not None: use_bits = use_digits * log2_10 if use_bits is not None: prec = int(use_bits) is_complex = isinstance(z, sage.rings.complex_number.ComplexNumber) n = degree+1 from sage.matrix.all import matrix M = matrix(ZZ, n, n+1+int(is_complex)) r = ZZ(1) << prec M[0, 0] = 1 M[0,-1] = r for k in range(1, degree+1): M[k,k] = 1 r *= z if is_complex: M[k, -1] = r.real().round() M[k, -2] = r.imag().round() else: M[k, -1] = r.round() LLL = M.LLL(delta=.75) coeffs = LLL[0][:n] if height_bound: def norm(v): # norm on an integer vector invokes Integer.sqrt() which tries to factor... from sage.rings.real_mpfi import RIF return v.change_ring(RIF).norm() if max(abs(a) for a in coeffs) > height_bound: if proof: # Given an LLL reduced basis $b_1, ..., b_n$, we only # know that $|b_1| <= 2^((n-1)/2) |x|$ for non-zero $x \in L$. if norm(LLL[0]) <= 2**((n-1)/2) * n.sqrt() * height_bound: raise ValueError, "insufficient precision for non-existence proof" return None elif proof and norm(LLL[1]) < 2**((n-1)/2) * max(norm(LLL[0]), n.sqrt()*height_bound): raise ValueError, "insufficient precision for uniqueness proof" if coeffs[degree] < 0: coeffs = -coeffs f = list(coeffs) elif proof or height_bound: raise NotImplementedError, "proof and height bound only implemented for real and complex numbers" else: y = pari(z) f = y.algdep(degree) return x.parent()(f) | b5ed948d4508215af6091ab48ef3eea7f0de520e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/b5ed948d4508215af6091ab48ef3eea7f0de520e/arith.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11989,
15037,
12,
94,
16,
10782,
16,
4846,
67,
6789,
33,
7036,
16,
999,
67,
6789,
33,
7036,
16,
4846,
67,
16649,
33,
7036,
16,
999,
67,
16649,
33,
7036,
16,
2072,
67,
3653,
33,
7036,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11989,
15037,
12,
94,
16,
10782,
16,
4846,
67,
6789,
33,
7036,
16,
999,
67,
6789,
33,
7036,
16,
4846,
67,
16649,
33,
7036,
16,
999,
67,
16649,
33,
7036,
16,
2072,
67,
3653,
33,
7036,... |
''' % sys.argv[0] | ''' % (sys.argv[0], sys.argv[0]) | def notify_dbus(args): args = args.split(':') return [NOTIFIER_DBUS, '-i', 'gtk-dialog-info', '-t', '5000', ':'.join(args[1:]), args[0]] | 14da08bac7ac13ea77967c1541da37bee26defda /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9967/14da08bac7ac13ea77967c1541da37bee26defda/irssi-notify-listener.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5066,
67,
1966,
407,
12,
1968,
4672,
833,
273,
833,
18,
4939,
2668,
2497,
13,
327,
306,
4400,
10591,
67,
2290,
3378,
16,
2400,
77,
2187,
296,
4521,
79,
17,
12730,
17,
1376,
2187,
2400,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5066,
67,
1966,
407,
12,
1968,
4672,
833,
273,
833,
18,
4939,
2668,
2497,
13,
327,
306,
4400,
10591,
67,
2290,
3378,
16,
2400,
77,
2187,
296,
4521,
79,
17,
12730,
17,
1376,
2187,
2400,... |
if not writable and log: self.log.warn('RegistrationModule is disabled because the password ' 'store does not support writing.') return writable | ignore_case = auth.LoginModule(self.env).ignore_case if log: if not writable: self.log.warn('RegistrationModule is disabled because the ' 'password store does not support writing.') if ignore_case: self.log.warn('RegistrationModule is disabled because ' 'ignore_auth_case is enabled in trac.ini. ' 'This setting needs disabled to support ' 'registration.') return writable and not ignore_case | def _write_check(self, log=False): writable = AccountManager(self.env).supports('set_password') if not writable and log: self.log.warn('RegistrationModule is disabled because the password ' 'store does not support writing.') return writable | ed2fa81df34112036ca8fe7aa46b9e8240ab4733 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6208/ed2fa81df34112036ca8fe7aa46b9e8240ab4733/web_ui.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2626,
67,
1893,
12,
2890,
16,
613,
33,
8381,
4672,
9691,
273,
6590,
1318,
12,
2890,
18,
3074,
2934,
28064,
2668,
542,
67,
3664,
6134,
309,
486,
9691,
471,
613,
30,
365,
18,
1330,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2626,
67,
1893,
12,
2890,
16,
613,
33,
8381,
4672,
9691,
273,
6590,
1318,
12,
2890,
18,
3074,
2934,
28064,
2668,
542,
67,
3664,
6134,
309,
486,
9691,
471,
613,
30,
365,
18,
1330,
... |
retval.append(folder.Maildir.MaildirFolder(self.root, foldername, self.getsep())) | retval.append(folder.Maildir.MaildirFolder(self.root, foldername, self.getsep())) | def _getfolders_scandir(self, root, extension = None): self.debug("_GETFOLDERS_SCANDIR STARTING. root = %s, extension = %s" \ % (root, extension)) # extension willl only be non-None when called recursively when # getsep() returns '/'. retval = [] | 6c1d5a0d27876b9187748468a3d76e07a916f0b0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5335/6c1d5a0d27876b9187748468a3d76e07a916f0b0/Maildir.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
16064,
67,
1017,
23230,
12,
2890,
16,
1365,
16,
2710,
273,
599,
4672,
365,
18,
4148,
2932,
67,
3264,
17357,
55,
67,
2312,
1258,
4537,
10485,
1360,
18,
1365,
273,
738,
87,
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,
389,
588,
16064,
67,
1017,
23230,
12,
2890,
16,
1365,
16,
2710,
273,
599,
4672,
365,
18,
4148,
2932,
67,
3264,
17357,
55,
67,
2312,
1258,
4537,
10485,
1360,
18,
1365,
273,
738,
87,
16,... |
sectname = "formatter_%s" % form | sectname = "formatter_%s" % string.strip(form) | def _create_formatters(cp): """Create and return formatters""" flist = cp.get("formatters", "keys") if not len(flist): return {} flist = string.split(flist, ",") formatters = {} for form in flist: sectname = "formatter_%s" % form opts = cp.options(sectname) if "format" in opts: fs = cp.get(sectname, "format", 1) else: fs = None if "datefmt" in opts: dfs = cp.get(sectname, "datefmt", 1) else: dfs = None c = logging.Formatter if "class" in opts: class_name = cp.get(sectname, "class") if class_name: c = _resolve(class_name) f = c(fs, dfs) formatters[form] = f return formatters | 2d5c058ac52657a9315c0e130b4789b70f4305f6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2d5c058ac52657a9315c0e130b4789b70f4305f6/config.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2640,
67,
2139,
5432,
12,
4057,
4672,
3536,
1684,
471,
327,
19151,
8395,
284,
1098,
273,
3283,
18,
588,
2932,
2139,
5432,
3113,
315,
2452,
7923,
309,
486,
562,
12,
74,
1098,
4672,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2640,
67,
2139,
5432,
12,
4057,
4672,
3536,
1684,
471,
327,
19151,
8395,
284,
1098,
273,
3283,
18,
588,
2932,
2139,
5432,
3113,
315,
2452,
7923,
309,
486,
562,
12,
74,
1098,
4672,
... |
IntField("sip", 0), | IPField("sip", "127.0.0.1"), | def __new__(cls, name, bases, dct): f = dct["fields_desc"] f = [ ByteEnumField("next_payload",None,ISAKMP_payload_type), ByteField("res",0), ShortField("length",None), ] + f dct["fields_desc"] = f return super(ISAKMP_payload_metaclass, cls).__new__(cls, name, bases, dct) | 4b24620d1449c11b1d9d58835e5d7fa39c59b20c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7311/4b24620d1449c11b1d9d58835e5d7fa39c59b20c/scapy.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2704,
972,
12,
6429,
16,
508,
16,
8337,
16,
18253,
4672,
284,
273,
18253,
9614,
2821,
67,
5569,
11929,
284,
273,
306,
3506,
3572,
974,
2932,
4285,
67,
7648,
3113,
7036,
16,
5127,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2704,
972,
12,
6429,
16,
508,
16,
8337,
16,
18253,
4672,
284,
273,
18253,
9614,
2821,
67,
5569,
11929,
284,
273,
306,
3506,
3572,
974,
2932,
4285,
67,
7648,
3113,
7036,
16,
5127,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.