rem stringlengths 2 226k | add stringlengths 0 227k | context stringlengths 8 228k | meta stringlengths 156 215 | input_ids list | attention_mask list | labels list |
|---|---|---|---|---|---|---|
sage: g = networkx.Graph({0:[1,2,3], 2:[5]}); g <networkx.base.Graph object at 0x9297870> | sage: g = networkx.Graph({0:[1,2,3], 2:[5]}) | def __init__(self, data=None, pos=None, **kwds): """ Create a graph object. INPUT: data -- can be any of the following: 1. A NetworkX graph 2. A dictionary of dictionaries 3. A dictionary of lists 4. A numpy matrix or ndarray 5. A pygraphviz agraph 6. A scipy sparse matrix | 2ebd36bafafb67bf005da138a71b9ce99d893add /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9890/2ebd36bafafb67bf005da138a71b9ce99d893add/graph.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
501,
33,
7036,
16,
949,
33,
7036,
16,
2826,
25577,
4672,
3536,
1788,
279,
2667,
733,
18,
225,
12943,
30,
501,
1493,
848,
506,
1281,
434,
326,
3751,
30,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
501,
33,
7036,
16,
949,
33,
7036,
16,
2826,
25577,
4672,
3536,
1788,
279,
2667,
733,
18,
225,
12943,
30,
501,
1493,
848,
506,
1281,
434,
326,
3751,
30,
... |
return http.Response(stream = s) | return HTMLResponse(stream = s) | def render(self, ctx): if self.worksheet.owner() != self.username: s = message('You must be the owner of this worksheet to configure it.') else: s = notebook.html_worksheet_settings(self.worksheet, self.username) return http.Response(stream = s) | 86a4ed9cb0aba48a11523b820246bf1c9d9e7be2 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/86a4ed9cb0aba48a11523b820246bf1c9d9e7be2/twist.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1743,
12,
2890,
16,
1103,
4672,
309,
365,
18,
1252,
8118,
18,
8443,
1435,
480,
365,
18,
5053,
30,
272,
273,
883,
2668,
6225,
1297,
506,
326,
3410,
434,
333,
13622,
358,
5068,
518,
1093... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
12,
2890,
16,
1103,
4672,
309,
365,
18,
1252,
8118,
18,
8443,
1435,
480,
365,
18,
5053,
30,
272,
273,
883,
2668,
6225,
1297,
506,
326,
3410,
434,
333,
13622,
358,
5068,
518,
1093... |
[ 3 0 -1 0 -1 0 0 0 -1] [ 0 3 0 0 -1 0 -1 0 -1] [-1 0 2 0 0 0 0 -1 0] [ 0 0 0 3 0 -1 -1 0 -1] [-1 -1 0 0 2 0 0 0 0] [ 0 0 0 -1 0 2 0 -1 0] [ 0 -1 0 -1 0 0 2 0 0] [ 0 0 -1 0 0 -1 0 3 -1] [-1 -1 0 -1 0 0 0 -1 4] sage: M.determinant() 0 """ M = self.am() | [ 3 -1 -1 -1] [-1 2 -1 0] [-1 -1 2 0] [-1 0 0 1] """ if weighted: M = self.weighted_adjacency_matrix() else: M = self.am() | def kirchhoff_matrix(self): """ Returns the Kirchhoff matrix (a.k.a. the Laplacian) of the graph. | 928e3f8dd0a83c7962a3f00f910838348623d97d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9417/928e3f8dd0a83c7962a3f00f910838348623d97d/graph.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
417,
481,
343,
76,
3674,
67,
5667,
12,
2890,
4672,
3536,
2860,
326,
1475,
481,
343,
76,
3674,
3148,
261,
69,
18,
79,
18,
69,
18,
326,
21072,
30538,
2779,
13,
434,
326,
2667,
18,
2,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
417,
481,
343,
76,
3674,
67,
5667,
12,
2890,
4672,
3536,
2860,
326,
1475,
481,
343,
76,
3674,
3148,
261,
69,
18,
79,
18,
69,
18,
326,
21072,
30538,
2779,
13,
434,
326,
2667,
18,
2,
... |
if self.debug > 0: print 'returning total energy' print nc.variables['TotalEnergy'][:] | def get_potential_energy(self,atoms=None,force_consistent=False): ''' return the potential energy. ''' if self.calculation_required(atoms): if self.debug > 0: print 'calculation required for energy' self.calculate() else: if self.debug > 0: print 'no calculation required for energy' nc = netCDF(self.get_nc(),'r') try: if force_consistent: e = nc.variables['TotalFreeEnergy'][-1] else: if self.debug > 0: print 'returning total energy' print nc.variables['TotalEnergy'][:] e = nc.variables['TotalEnergy'][-1] nc.close() return e except (TypeError,KeyError): raise RuntimeError('Error in calculating the total energy\n' + 'Check ascii out file for error messages') | e111e7f7da49e775bf6f578ffb8369e435e7a68c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5735/e111e7f7da49e775bf6f578ffb8369e435e7a68c/jacapo.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
26451,
67,
15358,
12,
2890,
16,
14937,
33,
7036,
16,
5734,
67,
16952,
33,
8381,
4672,
9163,
327,
326,
8555,
12929,
18,
9163,
309,
365,
18,
29916,
67,
4718,
12,
14937,
4672,
30... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
26451,
67,
15358,
12,
2890,
16,
14937,
33,
7036,
16,
5734,
67,
16952,
33,
8381,
4672,
9163,
327,
326,
8555,
12929,
18,
9163,
309,
365,
18,
29916,
67,
4718,
12,
14937,
4672,
30... | |
create_results_log(results, logdir, missing, summary=summary, coverdir=coverdir) if counts_file: try: marshal.dump( (results.counts, results.modules), open(counts_file, 'wb')) except IOError, err: _err_exit("Cannot save counts file %s because: %s" % \ (`counts_file`, err)) elif report: old_counts, old_modules = marshal.load(open(counts_file, 'rb')) results = CoverageResults(old_counts, old_modules) create_results_log(results, logdir, missing, summary=summary, coverdir=coverdir) else: assert 0, "Should never get here" | results.write_results(missing, summary=summary, coverdir=coverdir) | def main(argv = None): import getopt if argv is None: argv = sys.argv try: opts, prog_argv = getopt.getopt(argv[1:], "tcrRf:d:msC:", ["help", "version", "trace", "count", "report", "no-report", "file=", "logdir=", "missing", "ignore-module=", "ignore-dir=", "coverdir="]) except getopt.error, msg: print >> sys.stderr, "%s: %s" % (sys.argv[0], msg) print >> sys.stderr, "Try `%s --help' for more information" \ % sys.argv[0] sys.exit(1) trace = 0 count = 0 report = 0 no_report = 0 counts_file = None logdir = "." missing = 0 ignore_modules = [] ignore_dirs = [] coverdir = None summary = 0 for opt, val in opts: if opt == "--help": usage(sys.stdout) sys.exit(0) if opt == "--version": sys.stdout.write("trace 2.0\n") sys.exit(0) if opt == "-t" or opt == "--trace": trace = 1 continue if opt == "-c" or opt == "--count": count = 1 continue if opt == "-r" or opt == "--report": report = 1 continue if opt == "-R" or opt == "--no-report": no_report = 1 continue if opt == "-f" or opt == "--file": counts_file = val continue if opt == "-d" or opt == "--logdir": logdir = val continue if opt == "-m" or opt == "--missing": missing = 1 continue if opt == "-C" or opt == "--coverdir": coverdir = val continue if opt == "-s" or opt == "--summary": summary = 1 continue if opt == "--ignore-module": ignore_modules.append(val) continue if opt == "--ignore-dir": for s in string.split(val, os.pathsep): s = os.path.expandvars(s) # should I also call expanduser? (after all, could use $HOME) s = string.replace(s, "$prefix", os.path.join(sys.prefix, "lib", "python" + sys.version[:3])) s = string.replace(s, "$exec_prefix", os.path.join(sys.exec_prefix, "lib", "python" + sys.version[:3])) s = os.path.normpath(s) ignore_dirs.append(s) continue assert 0, "Should never get here" if len(prog_argv) == 0: _err_exit("missing name of file to run") if count + trace + report > 1: _err_exit("can only specify one of --trace, --count or --report") if count + trace + report == 0: _err_exit("must specify one of --trace, --count or --report") if report and counts_file is None: _err_exit("--report requires a --file") if report and no_report: _err_exit("cannot specify both --report and --no-report") if logdir is not None: # warn if the directory doesn't exist, but keep on going # (is this the correct behaviour?) if not os.path.isdir(logdir): sys.stderr.write( "trace: WARNING, --logdir directory %s is not available\n" % `logdir`) sys.argv = prog_argv progname = prog_argv[0] if eval(sys.version[:3])>1.3: sys.path[0] = os.path.split(progname)[0] # ??? # everything is ready ignore = Ignore(ignore_modules, ignore_dirs) if trace: t = Trace(ignore) try: run(t.trace, 'execfile(' + `progname` + ')') except IOError, err: _err_exit("Cannot run file %s because: %s" % \ (`sys.argv[0]`, err)) elif count: t = Coverage(ignore) try: run(t.trace, 'execfile(' + `progname` + ')') except IOError, err: _err_exit("Cannot run file %s because: %s" % \ (`sys.argv[0]`, err)) except SystemExit: pass results = t.results() # Add another lookup from the program's file name to its import name # This give the right results, but I'm not sure why ... results.modules[progname] = os.path.splitext(progname)[0] if counts_file: # add in archived data, if available try: old_counts, old_modules = marshal.load(open(counts_file, 'rb')) except IOError: pass else: results.update(CoverageResults(old_counts, old_modules)) if not no_report: create_results_log(results, logdir, missing, summary=summary, coverdir=coverdir) if counts_file: try: marshal.dump( (results.counts, results.modules), open(counts_file, 'wb')) except IOError, err: _err_exit("Cannot save counts file %s because: %s" % \ (`counts_file`, err)) elif report: old_counts, old_modules = marshal.load(open(counts_file, 'rb')) results = CoverageResults(old_counts, old_modules) create_results_log(results, logdir, missing, summary=summary, coverdir=coverdir) else: assert 0, "Should never get here" | dc6ad8d207ed136b6b1c7c8a4e6aa0c126e7bc61 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/dc6ad8d207ed136b6b1c7c8a4e6aa0c126e7bc61/trace.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
12,
19485,
273,
599,
4672,
1930,
336,
3838,
225,
309,
5261,
353,
599,
30,
5261,
273,
2589,
18,
19485,
775,
30,
1500,
16,
11243,
67,
19485,
273,
336,
3838,
18,
588,
3838,
12,
1948... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
12,
19485,
273,
599,
4672,
1930,
336,
3838,
225,
309,
5261,
353,
599,
30,
5261,
273,
2589,
18,
19485,
775,
30,
1500,
16,
11243,
67,
19485,
273,
336,
3838,
18,
588,
3838,
12,
1948... |
""" Return the (path, rev, chg) tuple corresponding to the previous revision for that node. | """Return the change event corresponding to the previous revision. This returns a `(path, rev, chg)` tuple. | def get_previous(self): """ Return the (path, rev, chg) tuple corresponding to the previous revision for that node. """ skip = True for p in self.get_history(2): if skip: skip = False else: return p | 0091f73d9ddb2e28de9da1a025ba0c0cfaf2b458 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/0091f73d9ddb2e28de9da1a025ba0c0cfaf2b458/api.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
11515,
12,
2890,
4672,
3536,
990,
326,
2549,
871,
4656,
358,
326,
2416,
6350,
18,
225,
1220,
1135,
279,
1375,
12,
803,
16,
5588,
16,
462,
75,
22025,
3193,
18,
3536,
2488,
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,
336,
67,
11515,
12,
2890,
4672,
3536,
990,
326,
2549,
871,
4656,
358,
326,
2416,
6350,
18,
225,
1220,
1135,
279,
1375,
12,
803,
16,
5588,
16,
462,
75,
22025,
3193,
18,
3536,
2488,
273,... |
configMode = config.Nims[slotid].configMode.value | configMode = nim.configMode.value | def getSatListForNim(self, slotid): list = [] if self.nim_slots[slotid].isCompatible("DVB-S"): #print "slotid:", slotid | c811a6c46840ab5901d08849eb2fc19acdf1baae /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6652/c811a6c46840ab5901d08849eb2fc19acdf1baae/NimManager.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1322,
270,
682,
1290,
50,
381,
12,
2890,
16,
4694,
350,
4672,
666,
273,
5378,
309,
365,
18,
82,
381,
67,
18875,
63,
14194,
350,
8009,
291,
14599,
2932,
30199,
38,
17,
55,
6,
4672,
46... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1322,
270,
682,
1290,
50,
381,
12,
2890,
16,
4694,
350,
4672,
666,
273,
5378,
309,
365,
18,
82,
381,
67,
18875,
63,
14194,
350,
8009,
291,
14599,
2932,
30199,
38,
17,
55,
6,
4672,
46... |
c = tk.Checkbutton(right_frame,text=str(44),variable=option12) | c = tk.Checkbutton(right_frame,text=str(44),variable=option13) | def validedChanges(): """Check for a least one selected kana portion (display of a message if not the case), catch parameters, then close the window.""" if not 1 in temp_list: tkMessageBox.showinfo(str(65),str(66)) | 3a6dad7a323fbc7f6f42fe577c64863117677d29 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3073/3a6dad7a323fbc7f6f42fe577c64863117677d29/tkinter_gui.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1244,
13898,
7173,
13332,
3536,
1564,
364,
279,
4520,
1245,
3170,
417,
13848,
14769,
261,
5417,
434,
279,
883,
309,
486,
326,
648,
3631,
1044,
1472,
16,
1508,
1746,
326,
2742,
12123,
309,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1244,
13898,
7173,
13332,
3536,
1564,
364,
279,
4520,
1245,
3170,
417,
13848,
14769,
261,
5417,
434,
279,
883,
309,
486,
326,
648,
3631,
1044,
1472,
16,
1508,
1746,
326,
2742,
12123,
309,
... |
sage: sr = mq.SR(1,2,1,4) | sage: sr = mq.SR(1, 2, 1, 4) | def SR(n=1,r=1,c=1,e=4, star=False, **kwargs): """ Return a small scale variant of the AES polynomial system constructor subject to the following conditions: INPUT: n -- the number of rounds (default: 1) r -- the number of rows in the state array (default: 1) c -- the number of columns in the state array (default: 1) e -- the exponent of the finite extension field (default: 4) star -- determines if SR* or SR should be constructed (default: False) aes_mode -- as the SR key schedule specification differs slightly from the AES key schedule this parameter controls which schedule to use (default: True) gf2 -- generate polynomial systems over $\GF(2)$ rather than over $\GF(2^n)$ (default: False) order -- a string to specify the term ordering of the variables postfix -- a string which is appended after the variable name (default: '') allow_zero_inversions -- a boolean to controll whether zero inversions raise an exception (default: False) correct_only -- only include correct inversion polynomials (default: False, GF2 only) biaffine_only -- only include bilinear and biaffine inversion polynomials (default: True, GF2 only) EXAMPLES: sage: sr = mq.SR(1,1,1,4) sage: ShiftRows = sr.shift_rows_matrix() sage: MixColumns = sr.mix_columns_matrix() sage: Lin = sr.lin_matrix() sage: M = MixColumns * ShiftRows * Lin sage: print sr.hex_str_matrix(M) 5 1 C 5 2 2 1 F A 4 4 1 1 8 3 3 sage: sr = mq.SR(1,2,1,4) sage: ShiftRows = sr.shift_rows_matrix() sage: MixColumns = sr.mix_columns_matrix() sage: Lin = sr.lin_matrix() sage: M = MixColumns * ShiftRows * Lin sage: print sr.hex_str_matrix(M) F 3 7 F A 2 B A A A 5 6 8 8 4 9 7 8 8 2 D C C 3 4 6 C C 5 E F F A 2 B A F 3 7 F 8 8 4 9 A A 5 6 D C C 3 7 8 8 2 5 E F F 4 6 C C sage: sr = mq.SR(1,2,2,4) sage: ShiftRows = sr.shift_rows_matrix() sage: MixColumns = sr.mix_columns_matrix() sage: Lin = sr.lin_matrix() sage: M = MixColumns * ShiftRows * Lin sage: print sr.hex_str_matrix(M) F 3 7 F 0 0 0 0 0 0 0 0 A 2 B A A A 5 6 0 0 0 0 0 0 0 0 8 8 4 9 7 8 8 2 0 0 0 0 0 0 0 0 D C C 3 4 6 C C 0 0 0 0 0 0 0 0 5 E F F A 2 B A 0 0 0 0 0 0 0 0 F 3 7 F 8 8 4 9 0 0 0 0 0 0 0 0 A A 5 6 D C C 3 0 0 0 0 0 0 0 0 7 8 8 2 5 E F F 0 0 0 0 0 0 0 0 4 6 C C 0 0 0 0 A 2 B A F 3 7 F 0 0 0 0 0 0 0 0 8 8 4 9 A A 5 6 0 0 0 0 0 0 0 0 D C C 3 7 8 8 2 0 0 0 0 0 0 0 0 5 E F F 4 6 C C 0 0 0 0 0 0 0 0 F 3 7 F A 2 B A 0 0 0 0 0 0 0 0 A A 5 6 8 8 4 9 0 0 0 0 0 0 0 0 7 8 8 2 D C C 3 0 0 0 0 0 0 0 0 4 6 C C 5 E F F 0 0 0 0 """ if not kwargs.get("gf2",False): return SR_gf2n(n,r,c,e,star,**kwargs) else: return SR_gf2(n,r,c,e,star,**kwargs) | 26b5b14a2a46b23848ccefac3b41425cf353e86a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/26b5b14a2a46b23848ccefac3b41425cf353e86a/sr.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
19145,
12,
82,
33,
21,
16,
86,
33,
21,
16,
71,
33,
21,
16,
73,
33,
24,
16,
10443,
33,
8381,
16,
2826,
4333,
4672,
3536,
2000,
279,
5264,
3159,
5437,
434,
326,
15986,
16991,
2619,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
19145,
12,
82,
33,
21,
16,
86,
33,
21,
16,
71,
33,
21,
16,
73,
33,
24,
16,
10443,
33,
8381,
16,
2826,
4333,
4672,
3536,
2000,
279,
5264,
3159,
5437,
434,
326,
15986,
16991,
2619,
3... |
@route("/datenspuren/(?P<id>([^/](?!(atom|json)))*)(?P<mode>/(comment|rate|reply))?") | @route("/datenspuren/(?P<id>([^/](?!(atom|json)))+)(?P<mode>/(comment|rate|reply))?") | def datenspur_file(web, id, filename, mode): try: # FIXME wrap db queries into one episode = Episode.find().filter_by(link = filename).\ filter(Episode.category.endswith(id)).\ order_by(Episode.date).one() comments = Comment.find().filter_by(episode = episode.id).all() files = File.find().filter_by(episode = episode.id).all() ratings = Rating.find().filter_by(episode = episode.id).all() trackbacks = Trackback.find().filter_by(episode = episode.id).\ order_by(Trackback.date).all() except Exception as e: return notfound(str(e)) if mode is None: mode = "" if len(mode): mode = mode[1:] opts = {} opts.update(create_session(web, mode)) opts.update(do_the_comments(web, mode, comments)) opts.update(do_the_ratings(web, mode, ratings)) return template("datenspur.tpl", css = "episode", episode = episode, episodes = {episode.id: episode}, site = "datenspuren/" + id, trackbacks = trackbacks, files = files, **opts ) | 8b496058f4e85c66a2fbd50bad220b4db1ba6243 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11349/8b496058f4e85c66a2fbd50bad220b4db1ba6243/routes.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1150,
773,
12688,
67,
768,
12,
4875,
16,
612,
16,
1544,
16,
1965,
4672,
775,
30,
468,
9852,
2193,
1319,
6218,
1368,
1245,
17054,
273,
512,
84,
11802,
18,
4720,
7675,
2188,
67,
1637,
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,
1150,
773,
12688,
67,
768,
12,
4875,
16,
612,
16,
1544,
16,
1965,
4672,
775,
30,
468,
9852,
2193,
1319,
6218,
1368,
1245,
17054,
273,
512,
84,
11802,
18,
4720,
7675,
2188,
67,
1637,
12... |
return(p) def read_PacketList(self): """return a PacketList() of all packets in the pcap file """ return PacketList(self.read_all(), self.filename) | return PacketList(res,name = os.path.basename(self.filename)) | def read_all(self): """return a list of all packets in the pcap file """ res=[] p = self.read_packet() while p != None: res.append(p) return(p) | c8bb4ffbf1fe5b0fc994675b25b0d3a55bdab83d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7311/c8bb4ffbf1fe5b0fc994675b25b0d3a55bdab83d/scapy.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
67,
454,
12,
2890,
4672,
3536,
2463,
279,
666,
434,
777,
12640,
316,
326,
293,
5909,
585,
3536,
400,
33,
8526,
293,
273,
365,
18,
896,
67,
11482,
1435,
1323,
293,
480,
599,
30,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
67,
454,
12,
2890,
4672,
3536,
2463,
279,
666,
434,
777,
12640,
316,
326,
293,
5909,
585,
3536,
400,
33,
8526,
293,
273,
365,
18,
896,
67,
11482,
1435,
1323,
293,
480,
599,
30,
... |
extract_old_files(files, out_path) | self.extract_old_files(files, out_path) | def extract_files(self, out_path, files = None): if files is None: files = self.files if self.disc_type == 'adD': extract_old_files(files, out_path) elif self.disc_type == 'adE': extract_new_files(files, out_path) elif self.disc_type == 'adEbig': extract_new_files(files, out_path) else: extract_old_files(files, out_path) | 25f0ef7dc7411ab5a651cc7127ed79f5bcd54fc3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3059/25f0ef7dc7411ab5a651cc7127ed79f5bcd54fc3/ADF2INF.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2608,
67,
2354,
12,
2890,
16,
596,
67,
803,
16,
1390,
273,
599,
4672,
225,
309,
1390,
353,
599,
30,
225,
1390,
273,
365,
18,
2354,
225,
309,
365,
18,
2251,
71,
67,
723,
422,
296,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2608,
67,
2354,
12,
2890,
16,
596,
67,
803,
16,
1390,
273,
599,
4672,
225,
309,
1390,
353,
599,
30,
225,
1390,
273,
365,
18,
2354,
225,
309,
365,
18,
2251,
71,
67,
723,
422,
296,
3... |
'~/gangadir/robot/report/${runid}.txt', | '~/gangadir_robot/robot/report/${runid}.txt', | def _initconfig(): config=Ganga.Utility.Config.makeConfig('Robot','Parameters for the Robot to run repetitive tests',is_open=True) config.addOption('Driver_Run',['submit', 20, 'finish', 'extract', 'report'], 'List of action names and sleep periods (seconds)') config.addOption('Driver_Repeat',False, 'boolean indicating if the run should repeat indefinitely') config.addOption('Driver_Action_submit', 'GangaRobot.Lib.Core.CoreSubmitter.CoreSubmitter', 'GangaRobot.Framework.Action.IAction class names for submit action in Driver_Run') config.addOption('Driver_Action_finish', 'GangaRobot.Lib.Core.CoreFinisher.CoreFinisher', 'GangaRobot.Framework.Action.IAction class names for finish action in Driver_Run') config.addOption('Driver_Action_extract', 'GangaRobot.Lib.Core.CoreExtractor.CoreExtractor', 'GangaRobot.Framework.Action.IAction class names for extract action in Driver_Run') config.addOption('Driver_Action_report', 'GangaRobot.Lib.Core.CoreReporter.CoreReporter', 'GangaRobot.Framework.Action.IAction class names for report action in Driver_Run') config.addOption('BaseFinisher_Timeout',3600, 'Timeout (seconds) for waiting for jobs to finish') config.addOption('BaseExtractor_XmlFile', '~/gangadir/robot/extract/${runid}.xml', 'Filename for XML extract data, ${runid} is replaced by current run id') config.addOption('BaseReporter_TextFile', '~/gangadir/robot/report/${runid}.txt', 'Filename for TEXT report data, ${runid} is replaced by current run id') config.addOption('BaseReporter_HtmlFile', '~/gangadir/robot/report/${runid}.html', 'Filename for HTML report data, ${runid} is replaced by current run id') config.addOption('CoreSubmitter_Patterns', ['GangaRobot/exports/local-echo-jobs.txt'], 'Exported job file patterns. Can contain Unix-style glob pathname patterns (relative patterns are evaluated against the current working directory and the Ganga python root, i.e. ganga/python/)') config.addOption('CoreReporter_ExtractUrl','', 'URL for links to extract data (if empty no link is created)') config.addOption('FileEmailer_Host','localhost:25','SMTP host and port') config.addOption('FileEmailer_Type','html', 'Email type \'html\' (i.e. html + plain) or \'text\' (i.e. plain)') config.addOption('FileEmailer_From','', 'From address for email, e.g. sender@domain.org') config.addOption('FileEmailer_Recipients','', 'Recepient list for email, e.g. recipient1@domain.org, recipient2@domain.org (if empty no email is sent)') config.addOption('FileEmailer_Subject','Ganga Robot: ${runid}.', 'Subject for email, ${runid} is replaced by current run id') config.addOption('FileEmailer_TextFile','', 'Filename for TEXT email body, ${runid} is replaced by current run id') config.addOption('FileEmailer_HtmlFile','', 'Filename for HTML email body, ${runid} is replaced by current run id') config.addOption('ExceptionBehaviour','Fatal','Changes behaviour of robot when exception is thrown. Options are Continue, Break, and Fatal (Default)') | 0f49cad3a2f03a9d7a8890adee85e27f34516cdd /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1488/0f49cad3a2f03a9d7a8890adee85e27f34516cdd/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2738,
1425,
13332,
642,
33,
43,
539,
69,
18,
6497,
18,
809,
18,
6540,
809,
2668,
20605,
17023,
2402,
364,
326,
19686,
352,
358,
1086,
22265,
3720,
7434,
2187,
291,
67,
3190,
33,
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,
389,
2738,
1425,
13332,
642,
33,
43,
539,
69,
18,
6497,
18,
809,
18,
6540,
809,
2668,
20605,
17023,
2402,
364,
326,
19686,
352,
358,
1086,
22265,
3720,
7434,
2187,
291,
67,
3190,
33,
5... |
def reset (self): | def reset (self, **kw): | def reset (self): """Reset this instance to the state it was when created. | 20892067b88dfe8ab7683ea413a981c7c20fff77 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7171/20892067b88dfe8ab7683ea413a981c7c20fff77/domutils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2715,
261,
2890,
16,
2826,
9987,
4672,
3536,
7013,
333,
791,
358,
326,
919,
518,
1703,
1347,
2522,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2715,
261,
2890,
16,
2826,
9987,
4672,
3536,
7013,
333,
791,
358,
326,
919,
518,
1703,
1347,
2522,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
context={'language': req_user.language.code}), | context={'language': req_user.language and \ req_user.language.code or "en_US"}), | def _callback(self, cursor, cron): try: args = (cron['args'] or []) and eval(cron['args']) obj = self.pool.get(cron['model']) if not obj and hasattr(obj, cron['function']): return False fct = getattr(obj, cron['function']) fct(cursor, cron['user'], *args) except Exception, error: cursor.rollback() | bc56bf47f3ba62d60e43ead2354144a6b63ee70d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9266/bc56bf47f3ba62d60e43ead2354144a6b63ee70d/cron.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3394,
12,
2890,
16,
3347,
16,
9998,
4672,
775,
30,
833,
273,
261,
18041,
3292,
1968,
3546,
578,
5378,
13,
471,
5302,
12,
18041,
3292,
1968,
19486,
1081,
273,
365,
18,
6011,
18,
58... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3394,
12,
2890,
16,
3347,
16,
9998,
4672,
775,
30,
833,
273,
261,
18041,
3292,
1968,
3546,
578,
5378,
13,
471,
5302,
12,
18041,
3292,
1968,
19486,
1081,
273,
365,
18,
6011,
18,
58... |
if nText!='' and nText[0]!=' ': | if (nText!='' and nText[0]!=' ') or hasattr(f,'cbDefn'): | def breakLines(self, width): """ Returns a broken line structure. There are two cases A) For the simple case of a single formatting input fragment the output is A fragment specifier with kind = 0 fontName, fontSize, leading, textColor lines= A list of lines Each line has two items. 1) unused width in points 2) word list | e1c823dc115a67670281d6b96de3035f53bf7b2a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/e1c823dc115a67670281d6b96de3035f53bf7b2a/paragraph.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
898,
5763,
12,
2890,
16,
1835,
4672,
3536,
2860,
279,
12933,
980,
3695,
18,
6149,
854,
2795,
6088,
225,
432,
13,
2457,
326,
4143,
648,
434,
279,
2202,
10407,
810,
5481,
326,
876,
353,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
898,
5763,
12,
2890,
16,
1835,
4672,
3536,
2860,
279,
12933,
980,
3695,
18,
6149,
854,
2795,
6088,
225,
432,
13,
2457,
326,
4143,
648,
434,
279,
2202,
10407,
810,
5481,
326,
876,
353,
... |
_logger.debug("set cloud for %s" % job.taskID) | _logger.debug("%s set cloud for %s" % (self.timestamp,job.taskID)) | def _correctLFN(self): lfnMap = {} valMap = {} prodError = {} missingDS = {} jobsWaiting = [] jobsFailed = [] jobsProcessed = [] allLFNs = {} allGUIDs = {} cloudMap = {} replicaMap = {} for job in self.jobs: if self.onlyTA: _logger.debug("%s start TA session %s" % (self.timestamp,job.taskID)) # check if sitename is known if job.computingSite != 'NULL' and (not job.computingSite in self.siteMapper.siteSpecList.keys()): job.jobStatus = 'failed' job.ddmErrorCode = ErrorCode.EC_Setupper job.ddmErrorDiag = "computingSite:%s is unknown" % job.computingSite # append job for downstream process jobsProcessed.append(job) # error message for TA if self.onlyTA: _logger.error("%s %s" % (self.timestamp,job.ddmErrorDiag)) continue # ignore no prodDBlock jobs or container dataset if job.prodDBlock == 'NULL': # set cloud if panda_config.enableDynamicTA and job.prodSourceLabel in ['managed','validation'] \ and job.cloud in ['NULL',''] and (not job.taskID in [None,'NULL',0]): # look into map to check if it is already gotten if not cloudMap.has_key(job.taskID): # instantiate TaskAssigner cloudResolver = TaskAssigner.TaskAssigner(self.taskBuffer,self.siteMapper, job.taskID,job.prodSourceLabel) # check cloud _logger.debug("check cloud for %s" % job.taskID) retCloud = cloudResolver.checkCloud() _logger.debug("checkCloud() -> %s" % retCloud) # failed if retCloud == None: _logger.error("failed to check cloud for %s" % job.taskID) # append job to waiting list jobsWaiting.append(job) continue # to be set elif retCloud == "": # collect LFN/GUID tmpLFNs = [] tmpGUIDs = [] # set cloud _logger.debug("set cloud for %s" % job.taskID) retCloud = cloudResolver.setCloud(tmpLFNs,tmpGUIDs,metadata=job.metadata) _logger.debug("setCloud() -> %s" % retCloud) if retCloud == None: _logger.error("failed to set cloud for %s" % job.taskID) # append job to waiting list jobsWaiting.append(job) continue # append to map cloudMap[job.taskID] = retCloud # set cloud job.cloud = cloudMap[job.taskID] # message for TA if self.onlyTA: _logger.debug("%s set %s:%s" % (self.timestamp,job.taskID,job.cloud)) # append job to processed list jobsProcessed.append(job) continue # collect datasets datasets = [] for file in job.Files: if file.type == 'input' and file.dispatchDBlock == 'NULL' \ and file.GUID == 'NULL': #and (file.GUID == 'NULL' or re.search('\.(\d+)$',file.lfn) == None): datasets.append(file.dataset) # get LFN list for dataset in datasets: if not dataset in lfnMap.keys(): prodError[dataset] = '' lfnMap[dataset] = {} # get LFNs time.sleep(1) for iDDMTry in range(3): _logger.debug(('listFilesInDataset',dataset)) status,out = ddm.DQ2.main('listFilesInDataset',dataset) if out.find("DQUnknownDatasetException") != -1: break elif status != 0 or out.find("DQ2 internal server exception") != -1 \ or out.find("An error occurred on the central catalogs") != -1 \ or out.find("MySQL server has gone away") != -1 \ or out == '()': time.sleep(60) else: break if status != 0 or out.startswith('Error'): _logger.error(out) prodError[dataset] = 'could not get file list of prodDBlock %s' % dataset _logger.error(prodError[dataset]) # doesn't exist in DQ2 if out.find('DQUnknownDatasetException') != -1: missingDS[dataset] = "DS:%s not found in DQ2" % dataset else: # make map (key: LFN w/o attemptNr, value: LFN with attemptNr) items = {} try: exec "items = %s[0]" % out for guid,vals in items.iteritems(): valMap[vals['lfn']] = {'guid' : guid, 'fsize' : vals['filesize'], 'md5sum' : vals['checksum'], 'chksum' : vals['checksum']} genLFN = re.sub('\.\d+$','',vals['lfn']) if lfnMap[dataset].has_key(genLFN): # get attemptNr newAttNr = 0 newMat = re.search('\.(\d+)$',vals['lfn']) if newMat != None: newAttNr = int(newMat.group(1)) oldAttNr = 0 oldMat = re.search('\.(\d+)$',lfnMap[dataset][genLFN]) if oldMat != None: oldAttNr = int(oldMat.group(1)) # compare if newAttNr > oldAttNr: lfnMap[dataset][genLFN] = vals['lfn'] else: lfnMap[dataset][genLFN] = vals['lfn'] except: prodError[dataset] = 'could not convert HTTP-res to map for prodDBlock %s' % dataset _logger.error(prodError[dataset]) _logger.error(out) # get replica locations if self.onlyTA and prodError[dataset] == '' and (not replicaMap.has_key(dataset)): for iDDMTry in range(3): _logger.debug(('listDatasetReplicas',dataset)) status,out = ddm.DQ2.main('listDatasetReplicas',dataset,0,None,False) if status != 0 or out.find("DQ2 internal server exception") != -1 \ or out.find("An error occurred on the central catalogs") != -1 \ or out.find("MySQL server has gone away") != -1 \ or out == '()': time.sleep(60) else: break if status != 0 or out.startswith('Error'): prodError[dataset] = 'could not get locations for %s' % dataset _logger.error(prodError[dataset]) _logger.error(out) else: tmpRepSites = {} try: # convert res to map exec "tmpRepSites = %s" % out replicaMap[dataset] = tmpRepSites except: prodError[dataset] = 'could not convert HTTP-res to replica map for %s' % dataset _logger.error(prodError[dataset]) _logger.error(out) # error isFailed = False # check for failed for dataset in datasets: if missingDS.has_key(dataset): job.jobStatus = 'failed' job.ddmErrorCode = ErrorCode.EC_GUID job.ddmErrorDiag = missingDS[dataset] # set missing for tmpFile in job.Files: if tmpFile.dataset == dataset: tmpFile.status = 'missing' # append jobsFailed.append(job) isFailed = True # message for TA if self.onlyTA: _logger.error("%s %s" % (self.timestamp,missingDS[dataset])) else: _logger.debug("%s %s failed with %s" % (self.timestamp,job.PandaID,missingDS[dataset])) break if isFailed: continue # check for waiting for dataset in datasets: if prodError[dataset] != '': # append job to waiting list jobsWaiting.append(job) isFailed = True # message for TA if self.onlyTA: _logger.error("%s %s" % (self.timestamp,prodError[dataset])) break if isFailed: continue # set cloud if panda_config.enableDynamicTA and job.prodSourceLabel in ['managed','validation'] \ and job.cloud in ['NULL',''] and (not job.taskID in [None,'NULL',0]): # look into map to check if it is already gotten if not cloudMap.has_key(job.taskID): # instantiate TaskAssigner cloudResolver = TaskAssigner.TaskAssigner(self.taskBuffer,self.siteMapper, job.taskID,job.prodSourceLabel) # check cloud _logger.debug("check cloud for %s" % job.taskID) retCloud = cloudResolver.checkCloud() _logger.debug("checkCloud() -> %s" % retCloud) # failed if retCloud == None: _logger.error("failed to check cloud for %s" % job.taskID) # append job to waiting list jobsWaiting.append(job) continue # to be set elif retCloud == "": # collect LFN/GUID tmpLFNs = [] tmpGUIDs = [] tmpReLoc = {} for dataset in datasets: # get LFNs eachDSLFNs = lfnMap[dataset].values() tmpLFNs += eachDSLFNs # get GUIDs for oneLFN in eachDSLFNs: tmpGUIDs.append(valMap[oneLFN]['guid']) # locations tmpReLoc[dataset] = replicaMap[dataset] # set cloud _logger.debug("set cloud for %s" % job.taskID) retCloud = cloudResolver.setCloud(tmpLFNs,tmpGUIDs,tmpReLoc,metadata=job.metadata) _logger.debug("setCloud() -> %s" % retCloud) if retCloud == None: _logger.error("failed to set cloud for %s" % job.taskID) # append job to waiting list jobsWaiting.append(job) continue # append to map cloudMap[job.taskID] = retCloud # set cloud job.cloud = cloudMap[job.taskID] # message for TA if self.onlyTA: _logger.debug("%s set %s:%s" % (self.timestamp,job.taskID,job.cloud)) # replace generic LFN with real LFN replaceList = [] isFailed = False for file in job.Files: if file.type == 'input' and file.dispatchDBlock == 'NULL' \ and file.GUID == 'NULL': #and (file.GUID == 'NULL' or re.search('\.(\d+)$',file.lfn) == None): # get LFN w/o attemptNr basename = re.sub('\.\d+$','',file.lfn) if basename == file.lfn: # replace if basename in lfnMap[file.dataset].keys(): file.lfn = lfnMap[file.dataset][basename] replaceList.append((basename,file.lfn)) # set GUID if file.lfn in valMap: file.GUID = valMap[file.lfn]['guid'] file.fsize = valMap[file.lfn]['fsize'] file.md5sum = valMap[file.lfn]['md5sum'] file.checksum = valMap[file.lfn]['chksum'] # remove white space if file.md5sum != None: file.md5sum = file.md5sum.strip() if file.checksum != None: file.checksum = file.checksum.strip() else: # append job to waiting list errMsg = "GUID for %s not found in DQ2" % file.lfn _logger.debug(errMsg) file.status = 'missing' job.jobStatus = 'failed' job.ddmErrorCode = ErrorCode.EC_GUID job.ddmErrorDiag = errMsg jobsFailed.append(job) isFailed = True break # add to allLFNs/allGUIDs if not allLFNs.has_key(job.cloud): allLFNs[job.cloud] = [] if not allGUIDs.has_key(job.cloud): allGUIDs[job.cloud] = [] allLFNs[job.cloud].append(file.lfn) allGUIDs[job.cloud].append(file.GUID) # modify jobParameters if not isFailed: for patt,repl in replaceList: job.jobParameters = re.sub('%s ' % patt, '%s ' % repl, job.jobParameters) # append job to processed list jobsProcessed.append(job) # return if TA only if self.onlyTA: _logger.debug("%s end TA sessions" % self.timestamp) return # get missing LFNs from source LRC/LFC missLFNs = {} for cloudKey in allLFNs.keys(): # use BNL by default dq2URL = self.siteMapper.getSite('BNL_ATLAS_1').dq2url dq2SE = [] # use cloud's source if self.siteMapper.checkCloud(cloudKey): tmpSrcID = self.siteMapper.getCloud(cloudKey)['source'] tmpSrcSite = self.siteMapper.getSite(tmpSrcID) # get LRC/LFC URL if not tmpSrcSite.lfchost in [None,'']: # LFC dq2URL = 'lfc://'+tmpSrcSite.lfchost+':/grid/atlas/' if tmpSrcSite.se != None: for tmpSrcSiteSE in tmpSrcSite.se.split(','): match = re.search('.+://([^:/]+):*\d*/*',tmpSrcSiteSE) if match != None: dq2SE.append(match.group(1)) else: # LRC dq2URL = tmpSrcSite.dq2url dq2SE = [] # get missing files tmpMissLFNs = brokerage.broker_util.getMissLFNsFromLRC(allLFNs[cloudKey],dq2URL,allGUIDs[cloudKey],dq2SE) # append if not missLFNs.has_key(cloudKey): missLFNs[cloudKey] = [] missLFNs[cloudKey] += tmpMissLFNs _logger.debug('missLFNs %s' % missLFNs) # check if files in source LRC/LFC tmpJobList = tuple(jobsProcessed) for job in tmpJobList: # check only production/test jobs if not job.prodSourceLabel in ['managed','test','software']: continue missingFlag = False for file in job.Files: if file.type == 'input': if missLFNs.has_key(job.cloud) and file.lfn in missLFNs[job.cloud]: # set file status file.status = 'missing' # remove job not to process further if not missingFlag: missingFlag = True jobsProcessed.remove(job) # revert for oJob in self.jobs: if oJob.PandaID == job.PandaID: jobsWaiting.append(oJob) break # send jobs to jobsWaiting self.taskBuffer.keepJobs(jobsWaiting) # update failed job self.taskBuffer.updateJobs(jobsFailed,True) # remove waiting/failed jobs self.jobs = jobsProcessed # delete huge variables del lfnMap del valMap del prodError del jobsWaiting del jobsProcessed del allLFNs del allGUIDs del cloudMap del missLFNs | 4e25ff459b78e50b61ea2614281204d0c39c6fc9 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7525/4e25ff459b78e50b61ea2614281204d0c39c6fc9/Setupper.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
6746,
9105,
50,
12,
2890,
4672,
328,
4293,
863,
273,
2618,
1244,
863,
273,
2618,
10791,
668,
273,
2618,
3315,
3948,
273,
2618,
6550,
15946,
282,
273,
5378,
6550,
2925,
565,
273,
537... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6746,
9105,
50,
12,
2890,
4672,
328,
4293,
863,
273,
2618,
1244,
863,
273,
2618,
10791,
668,
273,
2618,
3315,
3948,
273,
2618,
6550,
15946,
282,
273,
5378,
6550,
2925,
565,
273,
537... |
self.make_main() self.make_osname() | self.make_main() self.make_osname() | def make_initial_modules(self): | b9c951d8cedeec531cce217b5117b5d471b1e468 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/b9c951d8cedeec531cce217b5117b5d471b1e468/rexec.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1221,
67,
6769,
67,
6400,
12,
2890,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1221,
67,
6769,
67,
6400,
12,
2890,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
m = re.search("\.ctors\s+PROGBITS\s+[0-9a-f]+\s+[0-9a-f]+\s+([0-9a-f]+)", line) if m: return int(m.group(1), 16) | f = line.split() if len(f) != 11: continue if f[1] == ".ctors" and f[2] == "PROGBITS": return int(f[5], 16) / int(f[10]) - 2; if f[1] == ".init_array" and f[2] == "PROGBITS": return int(f[5], 16) / int(f[10]); | def count_ctors(filename): proc = subprocess.Popen(['readelf', '-W', '-S', filename], stdout=subprocess.PIPE) for line in proc.stdout: m = re.search("\.ctors\s+PROGBITS\s+[0-9a-f]+\s+[0-9a-f]+\s+([0-9a-f]+)", line) if m: return int(m.group(1), 16) | d60250658edf4863271766fbb3f5b0fc984d3369 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6206/d60250658edf4863271766fbb3f5b0fc984d3369/count_ctors.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1056,
67,
299,
1383,
12,
3459,
4672,
5418,
273,
6652,
18,
52,
3190,
12,
3292,
896,
19079,
2187,
2400,
59,
2187,
2400,
55,
2187,
1544,
6487,
3909,
33,
1717,
2567,
18,
27602,
13,
225,
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,
1056,
67,
299,
1383,
12,
3459,
4672,
5418,
273,
6652,
18,
52,
3190,
12,
3292,
896,
19079,
2187,
2400,
59,
2187,
2400,
55,
2187,
1544,
6487,
3909,
33,
1717,
2567,
18,
27602,
13,
225,
36... |
GtkScrolledWindow.__init__ (self) self.set_policy (POLICY_AUTOMATIC, POLICY_AUTOMATIC) | gtk.ScrolledWindow.__init__ (self) self.set_policy (gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC) | def __init__ (self, driver, app): """ Constructor. """ GtkScrolledWindow.__init__ (self) self.set_policy (POLICY_AUTOMATIC, POLICY_AUTOMATIC) self.app = app # copy options (dict function does not exist in Python 2.1 :( ) self.opts = {} for name,val in app.options.items(): self.opts[name] = val # remove all options known to the driver for sect in driver.optSections: for opt in sect.optList: if self.opts.has_key (opt.name): del self.opts[opt.name] # short cut if len(self.opts) == 0: return # list all remaining options here self.list = GtkCList(2, ["Option", "Value"]) for name,val in self.opts.items(): self.list.append ([str(name),str(val)]) self.list.set_column_justification (1, JUSTIFY_RIGHT) self.list.columns_autosize() self.list.show() self.vbox = GtkVBox() self.vbox.pack_start (self.list, TRUE, TRUE, 0) self.removeButton = GtkButton ("Remove") self.removeButton.show() self.removeButton.connect ("clicked", self.removeSelection) self.vbox.pack_start (self.removeButton, FALSE, FALSE, 0) self.vbox.show() self.add_with_viewport (self.vbox) | ec17e2ee5c945ddc11ff8bcc0cdc586ae535e76d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4580/ec17e2ee5c945ddc11ff8bcc0cdc586ae535e76d/driconf.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
261,
2890,
16,
3419,
16,
595,
4672,
3536,
11417,
18,
3536,
22718,
18,
1541,
25054,
3829,
16186,
2738,
972,
261,
2890,
13,
365,
18,
542,
67,
5086,
261,
4521,
79,
18,
26... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
261,
2890,
16,
3419,
16,
595,
4672,
3536,
11417,
18,
3536,
22718,
18,
1541,
25054,
3829,
16186,
2738,
972,
261,
2890,
13,
365,
18,
542,
67,
5086,
261,
4521,
79,
18,
26... |
print "warning: getItemIndexForItemID: item not found!" | self.notify.warning("getItemIndexForItemID: item not found!") | def getItemIndexForItemID(self, itemID): assert self.notify.debugStateCall(self) #for i in range(len(self["items"])): # print "buttontext[", i,"]", self["items"][i]["text"] | 920a7f21df18e5c883bde48bca63565ecae09673 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7242/920a7f21df18e5c883bde48bca63565ecae09673/DirectScrolledList.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8143,
1016,
1290,
1180,
734,
12,
2890,
16,
761,
734,
4672,
1815,
365,
18,
12336,
18,
4148,
1119,
1477,
12,
2890,
13,
468,
1884,
277,
316,
1048,
12,
1897,
12,
2890,
9614,
3319,
11929,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8143,
1016,
1290,
1180,
734,
12,
2890,
16,
761,
734,
4672,
1815,
365,
18,
12336,
18,
4148,
1119,
1477,
12,
2890,
13,
468,
1884,
277,
316,
1048,
12,
1897,
12,
2890,
9614,
3319,
11929,
3... |
totalAvg = (totalcpu/totaltime) | def enforce_cpu_quota(readfobj, cpulimit, frequency, childpid): global totaltime, totalcpu elapsedtime, percentused = get_time_and_cpu_percent(readfobj) # They get a free pass (likely their first or last time) if elapsedtime == 0.0: return # Increment total time totaltime += elapsedtime # Increment CPU use if ((totalcpu/totaltime) >= cpulimit): totalcpu += percentused*elapsedtime # Don't apply max function, allow the average to drop else: # Set a minimum for percentused, enfore a use it or lose it policy totalcpu += max(percentused, cpulimit)*elapsedtime # Update rolling info if len(rollingCPU) == ROLLING_PERIOD: rollingCPU.pop(0) rollingIntervals.pop(0) rollingCPU.append(percentused*elapsedtime) rollingIntervals.append(elapsedtime) # Caclulate Averages add = lambda x, y: x+y rollingTotalCPU = reduce(add, rollingCPU) rollingTotalTime = reduce(add, rollingIntervals) rollingAvg = rollingTotalCPU/rollingTotalTime totalAvg = (totalcpu/totaltime) # Determine which average to use if rollingAvg > totalAvg: punishableAvg = rollingAvg stoptime = (rollingTotalTime / frequency) * (rollingAvg - cpulimit) * 2 else: punishableAvg = totalAvg stoptime = (totalAvg - cpulimit) * totaltime * 2 #print (totalcpu/totaltime), percentused, elapsedtime, totaltime, totalcpu #print totaltime, ",", (totalcpu/totaltime), "," , rollingAvg, ",", percentused #print totaltime , "," ,rollingAvg, ",", totalAvg, ",", percentused # If average CPU use is fine, then continue #if (totalcpu/totaltime) <= cpulimit: if punishableAvg <= cpulimit: time.sleep(frequency) # If we don't sleep, this process burns cpu doing nothing return # They must be punished by stopping os.kill(childpid, signal.SIGSTOP) # we'll stop them for at least long enough to even out the damage # why does this formula work? Where does *2 come from? # I checked and sleep is sleeping the full time... # I've verified the os.times() data tracks perfectly... # I've tried it will different publishing frequencies and it works... # this formula works for different cpulimits as well # for very low sleep rates, this doesn't work. The time is way over. # for high sleep rates, this works fine. # Old Stop Time #stoptime = (((percentused-cpulimit) / cpulimit)-1) * elapsedtime * 2 # New stoptime # Determine how far over the limit the average, and punish progressively # Also, unsure about the *2 but it does seem to work.... #stoptime = ((totalcpu/totaltime) - cpulimit) * totaltime * 2 #stoptime = (punishableAvg - cpulimit) * totaltime * 2 # Sanity Check # There is no reason to punish a process for more than # frequency / cpulimit # BECAUSE that means that if a process uses 100% during a sampling interval, # the resulting stop+use interval should average to the CPU limit # stoptime = min(frequency/cpulimit, stoptime) #print "Stopping: ", stoptime time.sleep(stoptime) # And now they can start back up! os.kill(childpid, signal.SIGCONT) # If stoptime < frequency, then we would over-sample if we don't sleep if (stoptime < frequency): time.sleep(frequency-stoptime) | 7ff0ca7b57e36cdb016614eadef35a451a1870ef /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7995/7ff0ca7b57e36cdb016614eadef35a451a1870ef/nonportable.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12980,
67,
11447,
67,
23205,
12,
896,
27936,
16,
3283,
332,
1038,
16,
8670,
16,
1151,
6610,
4672,
2552,
2078,
957,
16,
2078,
11447,
225,
9613,
957,
16,
5551,
3668,
273,
336,
67,
957,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12980,
67,
11447,
67,
23205,
12,
896,
27936,
16,
3283,
332,
1038,
16,
8670,
16,
1151,
6610,
4672,
2552,
2078,
957,
16,
2078,
11447,
225,
9613,
957,
16,
5551,
3668,
273,
336,
67,
957,
6... | |
res = self.db.seManager.findSE(seName) | res = self.db.seManager.findSE( seName ) | def removeFile(self,lfns,connection=False): connection = self._getConnection(connection) """ Remove file from the catalog """ successful = {} failed = {} res = self._findFiles(lfns,['DirID','FileID','Size'],connection=connection) successful = {} for lfn,error in res['Value']['Failed'].items(): if error == 'No such file or directory': successful[lfn] = True else: failed[lfn] = error fileIDLfns = {} lfns = res['Value']['Successful'] for lfn,lfnDict in lfns.items(): fileIDLfns[lfnDict['FileID']] = lfn | 26c5008a7adbc1c761e2409bed59b7710e5f2c74 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/26c5008a7adbc1c761e2409bed59b7710e5f2c74/FileManagerBase.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1206,
812,
12,
2890,
16,
20850,
2387,
16,
4071,
33,
8381,
4672,
1459,
273,
365,
6315,
588,
1952,
12,
4071,
13,
3536,
3581,
585,
628,
326,
6222,
3536,
6873,
273,
2618,
2535,
273,
2618,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
812,
12,
2890,
16,
20850,
2387,
16,
4071,
33,
8381,
4672,
1459,
273,
365,
6315,
588,
1952,
12,
4071,
13,
3536,
3581,
585,
628,
326,
6222,
3536,
6873,
273,
2618,
2535,
273,
2618,
... |
try: l = poller.wait(len(selectables), timeout) except select.error, e: if e[0] == errno.EINTR: return else: raise | l = poller.wait(len(selectables), timeout) | def doPoll(self, timeout, reads=reads, writes=writes, selectables=selectables, select=select, log=log): """Poll the poller for new events.""" if timeout is None: timeout = 1000 else: timeout = int(timeout * 1000) # convert seconds to milliseconds | 69b415ae585525f317df67e24d75e098005da1a1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/69b415ae585525f317df67e24d75e098005da1a1/epollreactor.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
19085,
12,
2890,
16,
2021,
16,
6838,
33,
11904,
16,
7262,
33,
13284,
16,
2027,
1538,
33,
4025,
1538,
16,
2027,
33,
4025,
16,
613,
33,
1330,
4672,
3536,
19085,
326,
24525,
364,
394... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
19085,
12,
2890,
16,
2021,
16,
6838,
33,
11904,
16,
7262,
33,
13284,
16,
2027,
1538,
33,
4025,
1538,
16,
2027,
33,
4025,
16,
613,
33,
1330,
4672,
3536,
19085,
326,
24525,
364,
394... |
if (var_visible != VISIBLE_BARREL_ONLY) { // (Never VISIBLE_NOTHING here.) | if (//false && /// May skip the endcap entirely to see just the barrel. visibility_type != VISIBLE_BARREL_ONLY) { // (Never VISIBLE_NOTHING here.) | #ifdef N_CONST_XFORMS // Get transforms from a fixed-sized block of uniform (constant) memory. // The GL_EXT_bindable_uniform extension allows sharing this through a VBO. for (i = 0; i <= 1; i++) endpts[i] = transforms[int(transform_id)] * endpts[i]; | 1bbb39314caa7d2a53dada43541c0768abeeb445 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11221/1bbb39314caa7d2a53dada43541c0768abeeb445/cylinder_shader.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
468,
430,
536,
423,
67,
26411,
67,
60,
4983,
55,
368,
968,
13680,
628,
279,
5499,
17,
87,
1235,
1203,
434,
10823,
261,
14384,
13,
3778,
18,
368,
1021,
10252,
67,
4142,
67,
4376,
429,
67,
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,
468,
430,
536,
423,
67,
26411,
67,
60,
4983,
55,
368,
968,
13680,
628,
279,
5499,
17,
87,
1235,
1203,
434,
10823,
261,
14384,
13,
3778,
18,
368,
1021,
10252,
67,
4142,
67,
4376,
429,
67,
2... |
res = self.__getFileReplicas(fileIDs.keys(),allStatus=allStatus,connection=connection) | res = self.__getFileReplicas( fileIDs.keys(), allStatus = allStatus, connection = connection ) | def getReplicas(self,lfns,allStatus=False,connection=False): """ Get replicas for the files specified by the lfn list """ gLogger.info("TransformationDB.getReplicas: Attempting to get replicas for %s files." % len(lfns)) connection = self.__getConnection(connection) res = self.__getFileIDsForLfns(lfns,connection=connection) if not res['OK']: return res fileIDs,lfnFilesIDs = res['Value'] failed = {} successful = {} for lfn in lfns: if not lfn in fileIDs.values(): failed[lfn] = 'File does not exist' if fileIDs: res = self.__getFileReplicas(fileIDs.keys(),allStatus=allStatus,connection=connection) if not res['OK']: return res for fileID in fileIDs.keys(): # To catch the case where a file has no replicas replicas = {} if fileID in res['Value'].keys(): replicas = res['Value'][fileID] successful[fileIDs[fileID]] = replicas resDict = {'Successful':successful,'Failed':failed} return S_OK(resDict) | 9ad007ea503b29694fc081c1646b7c5ecd07b1f2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/9ad007ea503b29694fc081c1646b7c5ecd07b1f2/TransformationDB.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5561,
10528,
12,
2890,
16,
20850,
2387,
16,
454,
1482,
33,
8381,
16,
4071,
33,
8381,
4672,
3536,
968,
21545,
364,
326,
1390,
1269,
635,
326,
328,
4293,
666,
3536,
314,
3328,
18,
1376,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5561,
10528,
12,
2890,
16,
20850,
2387,
16,
454,
1482,
33,
8381,
16,
4071,
33,
8381,
4672,
3536,
968,
21545,
364,
326,
1390,
1269,
635,
326,
328,
4293,
666,
3536,
314,
3328,
18,
1376,
... |
env['ENV']['DOX_DOT_PATH'] = dot | env['ENV']['DOX_DOT_PATH'] = os.path.split(dot)[0] | def result(self, deps_results=True): prj = self env = self.env | e82e4e37224123647eb970a55552a035bf52fb71 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8002/e82e4e37224123647eb970a55552a035bf52fb71/doxygenproject.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
563,
12,
2890,
16,
8740,
67,
4717,
33,
5510,
4672,
27378,
273,
365,
1550,
273,
365,
18,
3074,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
563,
12,
2890,
16,
8740,
67,
4717,
33,
5510,
4672,
27378,
273,
365,
1550,
273,
365,
18,
3074,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
parts = ['..'] * (len(source_parts) - 1) + target_parts | parts = ['..'] * len(source_parts) + target_parts | def relative_path(source, target): """ Build and return a path to `target`, relative to `source`. If there is no common prefix, return the absolute path to `target`. """ source_parts = os.path.abspath(source or '').split(os.sep) target_parts = os.path.abspath(target).split(os.sep) # Check first 2 parts because '/dir'.split('/') == ['', 'dir']: if source_parts[:2] != target_parts[:2]: # Nothing in common between paths. # Return absolute path, using '/' for URLs: return '/'.join(target_parts) source_parts.reverse() target_parts.reverse() while (source_parts and target_parts and source_parts[-1] == target_parts[-1]): # Remove path components in common: source_parts.pop() target_parts.pop() target_parts.reverse() parts = ['..'] * (len(source_parts) - 1) + target_parts return '/'.join(parts) | c671dae11dd30e5905773560da977c13315a40aa /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5620/c671dae11dd30e5905773560da977c13315a40aa/utils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3632,
67,
803,
12,
3168,
16,
1018,
4672,
3536,
3998,
471,
327,
279,
589,
358,
1375,
3299,
9191,
3632,
358,
1375,
3168,
8338,
225,
971,
1915,
353,
1158,
2975,
1633,
16,
327,
326,
4967,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3632,
67,
803,
12,
3168,
16,
1018,
4672,
3536,
3998,
471,
327,
279,
589,
358,
1375,
3299,
9191,
3632,
358,
1375,
3168,
8338,
225,
971,
1915,
353,
1158,
2975,
1633,
16,
327,
326,
4967,
... |
parser.add_option("-u", "--username", dest="username", default=None, help="The username to be used when connecting.", metavar="<username>") | parser.add_option("-u", "--username", dest="username", default=username, help="The username to be used when connecting.", metavar="<username>") | def main(): """Main program function: Grabs command-line arguments, starts up threads, and runs the program.""" # Grab command line arguments and the command to run (if any) usage = 'usage: %prog [options] "[command1]" "[command2]" ...' parser = OptionParser(usage=usage, version=__version__) parser.disable_interspersed_args() parser.add_option("-f", "--file", dest="hostfile", default=None, help="Location of the file containing the host list.", metavar="<file>") parser.add_option("-o", "--outfile", dest="outfile", default=None, help="Location of the file where the results will be saved.", metavar="<file>") parser.add_option("-a", "--authfile", dest="authfile", default=None, help="Location of the file containing the credentials to be used for connections (format is \"username:password\").", metavar="<file>") parser.add_option("-t", "--threads", dest="max_threads", default=10, type="int", help="Number of threads to spawn for simultaneous connection attempts [default: 10].", metavar="<int>") parser.add_option("-u", "--username", dest="username", default=None, help="The username to be used when connecting.", metavar="<username>") parser.add_option("-P", "--password", dest="password", default=None, help="The password to be used when connecting (not recommended--use an authfile unless the username and password are transient", metavar="<password>") parser.add_option("-q", "--quiet", action="store_false", dest="verbose", default=True, help="Don't print status messages to stdout (only print errors).") parser.add_option("-c", "--copy-file", dest="copy_file", default=None, help="Location of the file to copy to and optionally execute (-x) on hosts.", metavar="<file>") parser.add_option("-D", "--dest", dest="destination", default="/tmp/", help="Path where the file should be copied on the remote host (default: /tmp/).", metavar="<path>") parser.add_option("-x", "--execute", action="store_true", dest="execute", default=False, help="Execute the copied file (just like executing a given command).") parser.add_option("-r", "--remove", action="store_true", dest="remove", default=False, help="Remove (clean up) the SFTP'd file after execution.") parser.add_option("-T", "--timeout", dest="timeout", default=30, help="Timeout (in seconds) before giving up on an SSH connection (default: 30)", metavar="<seconds>") parser.add_option("-s", "--sudo", action="store_true", dest="sudo", default=False, help="Use sudo to execute the command (default: as root).") parser.add_option("-U", "--sudouser", dest="run_as", default="root", help="Run the command (via sudo) as this user.", metavar="<username>") (options, args) = parser.parse_args() # Check to make sure we were passed at least one command line argument try: sys.argv[1] except: print "\nError: At a minimum you must supply an input hostfile (-f)" parser.print_help() sys.exit(2) commands = False return_code = 0 ## Assume anything passed to us beyond the command line switches are commands to be executed if len(args) > 0: commands = args # Assign the options to more readable variables username = options.username password = options.password local_filepath = options.copy_file remote_filepath = options.destination execute = options.execute remove = options.remove sudo = options.sudo max_threads = options.max_threads timeout = options.timeout run_as = options.run_as verbose = options.verbose outfile = options.outfile if options.hostfile == None: print "Error: You must supply a file (-f <file>) containing the host list to check." print "Use the -h option to see usage information." sys.exit(2) if options.outfile is None and options.verbose is False: print "Error: You have not specified any mechanism to output results." print "Please don't use quite mode (-q) without an output file (-o <file>)." sys.exit(2) if local_filepath is not None and commands is not False: print "Error: You can either run commands or execute a file. Not both." sys.exit(2) # Read in the host list to check hostlist = open(options.hostfile).read() if options.authfile is not None: credentials = open(options['authfile']).readline() username, password = credentials.split(":") # Get the username and password to use when checking hosts if options.username == None: username = raw_input('Username: ') if options.password == None: password = getpass.getpass('Password: ') hostlist_list = [] try: # This wierd little sequence of loops allows us to hit control-C in the middle of program execution and get immediate results for host in hostlist.split("\n"): # Turn the hostlist into an actual list if host != "": hostlist_list.append(host) output_queue = sshpt(hostlist_list, username, password, max_threads, timeout, commands, local_filepath, remote_filepath, execute, remove, sudo, run_as, verbose, outfile) output_queue.join() # Just to be safe we wait for the OutputThread to finish before moving on except KeyboardInterrupt: print 'caught KeyboardInterrupt, exiting...' return_code = 1 # Return code should be 1 if the user issues a SIGINT (control-C) # Clean up stopSSHQueue() stopOutputThread() sys.exit(return_code) except Exception, detail: print 'caught Exception...' print detail return_code = 2 # Clean up stopSSHQueue() stopOutputThread() sys.exit(return_code) | bbbaae0cb282baab885b674fec3ce3757842a85d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11566/bbbaae0cb282baab885b674fec3ce3757842a85d/sshpt.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
3536,
6376,
5402,
445,
30,
225,
10812,
2038,
1296,
17,
1369,
1775,
16,
2542,
731,
7403,
16,
471,
7597,
326,
5402,
12123,
225,
468,
17150,
1296,
980,
1775,
471,
326,
1296,
35... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
3536,
6376,
5402,
445,
30,
225,
10812,
2038,
1296,
17,
1369,
1775,
16,
2542,
731,
7403,
16,
471,
7597,
326,
5402,
12123,
225,
468,
17150,
1296,
980,
1775,
471,
326,
1296,
35... |
^ \s* \d+ \.? \s+ (-?Mat\d+ | [-\d\.]+) \s+ [\d\.]+ \s+ [\d\.]+ \s+ (.+) \s* $ | ^ \s* \d+ [+\-\.]? \s+ (-?Mat\s*\d+ | [-\d\.]+) \s+ [\d\.]+ \s+ [\d\.]+ \s+ (.+) \s* $ | def isdigits (strings): for s in strings: s = s.replace(".","") if s.startswith("-"): if not s[1:].isdigit(): return False else: if not s.isdigit(): return False return True | f1b90bd91b98b61b4ae44a534251bf927d8fdf28 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5339/f1b90bd91b98b61b4ae44a534251bf927d8fdf28/CECPEngine.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
353,
16649,
261,
10219,
4672,
364,
272,
316,
2064,
30,
272,
273,
272,
18,
2079,
2932,
1199,
16,
3660,
13,
309,
272,
18,
17514,
1918,
2932,
10951,
4672,
309,
486,
272,
63,
21,
30,
8009,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
353,
16649,
261,
10219,
4672,
364,
272,
316,
2064,
30,
272,
273,
272,
18,
2079,
2932,
1199,
16,
3660,
13,
309,
272,
18,
17514,
1918,
2932,
10951,
4672,
309,
486,
272,
63,
21,
30,
8009,... |
self._handle = handle | self._handle = handle | def __init__(self, handle=None, colwidth=15, maxwidth=80): """TaggingConsumer(handle=sys.stdout, colwidth=15, maxwidth=80)""" # I can't assign sys.stdout to handle in the argument list. # If I do that, handle will be assigned the value of sys.stdout # the first time this function is called. This will fail if # the user has assigned sys.stdout to some other file, which may # be closed or invalid at a later time. if handle is None: handle = sys.stdout | 68f69ea2c3788fd96c3354b61da3b387e196046b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7167/68f69ea2c3788fd96c3354b61da3b387e196046b/ParserSupport.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1640,
33,
7036,
16,
645,
2819,
33,
3600,
16,
943,
2819,
33,
3672,
4672,
3536,
1805,
1998,
5869,
12,
4110,
33,
9499,
18,
10283,
16,
645,
2819,
33,
3600,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1640,
33,
7036,
16,
645,
2819,
33,
3600,
16,
943,
2819,
33,
3672,
4672,
3536,
1805,
1998,
5869,
12,
4110,
33,
9499,
18,
10283,
16,
645,
2819,
33,
3600,
... |
categories=element.tags, | categories=element.tags if hasattr(element, "tags") else None, | def generate_feed(self, elements, context, filename=None, feed_type='atom'): """Generate a feed with the list of articles provided | 3b7c546136d6987414e8d93804de18b5e86810e5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14457/3b7c546136d6987414e8d93804de18b5e86810e5/generators.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2103,
67,
7848,
12,
2890,
16,
2186,
16,
819,
16,
1544,
33,
7036,
16,
4746,
67,
723,
2218,
7466,
11,
4672,
3536,
4625,
279,
4746,
598,
326,
666,
434,
15828,
2112,
2,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2103,
67,
7848,
12,
2890,
16,
2186,
16,
819,
16,
1544,
33,
7036,
16,
4746,
67,
723,
2218,
7466,
11,
4672,
3536,
4625,
279,
4746,
598,
326,
666,
434,
15828,
2112,
2,
-100,
-100,
-100,
... |
text=expandItemText(infoDOM,textnode.attributes["value"].value, itemnum, page, itemsonthispage,chapternumber,chapterlist) textImage=Image.new("RGBA",picture.size) textDraw=ImageDraw.Draw(textImage) if text>"": paintText(textDraw, | text = expandItemText(infoDOM,textnode.attributes["value"].value, itemnum, page, itemsonthispage,chapternumber,chapterlist) textImage = Image.new("RGBA",picture.size) textDraw = ImageDraw.Draw(textImage) if text > "": paintText(textDraw, textImage, | def drawThemeItem(page, itemsonthispage, itemnum, menuitem, bgimage, draw, bgimagemask, drawmask, highlightcolor, spumuxdom, spunode, numberofitems, chapternumber, chapterlist): """Draws text and graphics onto a dvd menu, called by createMenu and createChapterMenu""" #Get the XML containing information about this item infoDOM = xml.dom.minidom.parse( os.path.join(getItemTempPath(itemnum),"info.xml") ) #Error out if its the wrong XML if infoDOM.documentElement.tagName != "fileinfo": fatalError("The info.xml file (%s) doesn't look right" % os.path.join(getItemTempPath(itemnum),"info.xml")) #boundarybox holds the max and min dimensions for this item so we can auto build a menu highlight box boundarybox=9999,9999,0,0 wantHighlightBox = True #Loop through all the nodes inside this menu item for node in menuitem.childNodes: #Process each type of item to add it onto the background image if node.nodeName=="graphic": #Overlay graphic image onto background #if this graphic item is a movie thumbnail then we dont process it here if node.attributes["filename"].value == "%movie": #this is a movie item but we must still update the boundary box boundarybox=checkBoundaryBox(boundarybox, node) else: imagefilename = expandItemText(infoDOM,node.attributes["filename"].value, itemnum, page, itemsonthispage, chapternumber, chapterlist) if doesFileExist(imagefilename) == False: if imagefilename == node.attributes["filename"].value: imagefilename = getThemeFile(themeName, node.attributes["filename"].value) if doesFileExist(imagefilename): picture = Image.open(imagefilename,"r").resize((getScaledAttribute(node, "w"), getScaledAttribute(node, "h"))) picture = picture.convert("RGBA") #see if an image mask exists imagemaskfilename = None if node.hasAttribute("mask"): if node.attribute["mask"].value <> "": imagemaskfilename = getThemeFile(themeName, node.attributes["mask"].value) if imagemaskfilename <> None and doesFileExist(imagemaskfilename): maskpicture = Image.open(imagemaskfilename,"r").resize((getScaledAttribute(node, "w"), getScaledAttribute(node, "h"))) maskpicture = maskpicture.convert("RGBA") bgimage.paste(picture, (getScaledAttribute(node, "x"), getScaledAttribute(node, "y")), maskpicture) del maskpicture else: bgimage.paste(picture, (getScaledAttribute(node, "x"), getScaledAttribute(node, "y")), picture) del picture write( "Added image %s" % imagefilename) boundarybox=checkBoundaryBox(boundarybox, node) else: write( "Image file does not exist '%s'" % imagefilename) elif node.nodeName=="text": #Apply some text to the background, including wordwrap if required. text=expandItemText(infoDOM,node.attributes["value"].value, itemnum, page, itemsonthispage,chapternumber,chapterlist) if text>"": paintText( draw, getScaledAttribute(node, "x"), getScaledAttribute(node, "y"), getScaledAttribute(node, "w"), getScaledAttribute(node, "h"), text, themeFonts[int(node.attributes["font"].value)], node.attributes["colour"].value, node.attributes["align"].value ) boundarybox=checkBoundaryBox(boundarybox, node) del text elif node.nodeName=="previous": if page>1: #Overlay previous graphic button onto background imagefilename = getThemeFile(themeName, node.attributes["filename"].value) if not doesFileExist(imagefilename): fatalError("Cannot find image for previous button (%s)." % imagefilename) maskimagefilename = getThemeFile(themeName, node.attributes["mask"].value) if not doesFileExist(maskimagefilename): fatalError("Cannot find mask image for previous button (%s)." % maskimagefilename) picture=Image.open(imagefilename,"r").resize((getScaledAttribute(node, "w"), getScaledAttribute(node, "h"))) picture=picture.convert("RGBA") bgimage.paste(picture, (getScaledAttribute(node, "x"), getScaledAttribute(node, "y")), picture) del picture write( "Added previous button image %s" % imagefilename) picture=Image.open(maskimagefilename,"r").resize((getScaledAttribute(node, "w"), getScaledAttribute(node, "h"))) picture=picture.convert("RGBA") bgimagemask.paste(picture, (getScaledAttribute(node, "x"), getScaledAttribute(node, "y")), picture) del picture write( "Added previous button mask image %s" % imagefilename) button = spumuxdom.createElement("button") button.setAttribute("name","previous") button.setAttribute("x0","%s" % getScaledAttribute(node, "x")) button.setAttribute("y0","%s" % getScaledAttribute(node, "y")) button.setAttribute("x1","%s" % (getScaledAttribute(node, "x") + getScaledAttribute(node, "w"))) button.setAttribute("y1","%s" % (getScaledAttribute(node, "y") + getScaledAttribute(node, "h"))) spunode.appendChild(button) elif node.nodeName=="next": if itemnum < numberofitems: #Overlay next graphic button onto background imagefilename = getThemeFile(themeName, node.attributes["filename"].value) if not doesFileExist(imagefilename): fatalError("Cannot find image for next button (%s)." % imagefilename) maskimagefilename = getThemeFile(themeName, node.attributes["mask"].value) if not doesFileExist(maskimagefilename): fatalError("Cannot find mask image for next button (%s)." % maskimagefilename) picture = Image.open(imagefilename,"r").resize((getScaledAttribute(node, "w"), getScaledAttribute(node, "h"))) picture = picture.convert("RGBA") bgimage.paste(picture, (getScaledAttribute(node, "x"), getScaledAttribute(node, "y")), picture) del picture write( "Added next button image %s " % imagefilename) picture=Image.open(maskimagefilename,"r").resize((getScaledAttribute(node, "w"), getScaledAttribute(node, "h"))) picture=picture.convert("RGBA") bgimagemask.paste(picture, (getScaledAttribute(node, "x"), getScaledAttribute(node, "y")), picture) del picture write( "Added next button mask image %s" % imagefilename) button = spumuxdom.createElement("button") button.setAttribute("name","next") button.setAttribute("x0","%s" % getScaledAttribute(node, "x")) button.setAttribute("y0","%s" % getScaledAttribute(node, "y")) button.setAttribute("x1","%s" % (getScaledAttribute(node, "x") + getScaledAttribute(node, "w"))) button.setAttribute("y1","%s" % (getScaledAttribute(node, "y") + getScaledAttribute(node, "h"))) spunode.appendChild(button) elif node.nodeName=="titlemenu": if itemnum < numberofitems: #Overlay next graphic button onto background imagefilename = getThemeFile(themeName, node.attributes["filename"].value) if not doesFileExist(imagefilename): fatalError("Cannot find image for titlemenu button (%s)." % imagefilename) maskimagefilename = getThemeFile(themeName, node.attributes["mask"].value) if not doesFileExist(maskimagefilename): fatalError("Cannot find mask image for titlemenu button (%s)." % maskimagefilename) picture = Image.open(imagefilename,"r").resize((getScaledAttribute(node, "w"), getScaledAttribute(node, "h"))) picture = picture.convert("RGBA") bgimage.paste(picture, (getScaledAttribute(node, "x"), getScaledAttribute(node, "y")), picture) del picture write( "Added titlemenu button image %s " % imagefilename) picture=Image.open(maskimagefilename,"r").resize((getScaledAttribute(node, "w"), getScaledAttribute(node, "h"))) picture=picture.convert("RGBA") bgimagemask.paste(picture, (getScaledAttribute(node, "x"), getScaledAttribute(node, "y")), picture) del picture write( "Added titlemenu button mask image %s" % imagefilename) button = spumuxdom.createElement("button") button.setAttribute("name","titlemenu") button.setAttribute("x0","%s" % getScaledAttribute(node, "x")) button.setAttribute("y0","%s" % getScaledAttribute(node, "y")) button.setAttribute("x1","%s" % (getScaledAttribute(node, "x") + getScaledAttribute(node, "w"))) button.setAttribute("y1","%s" % (getScaledAttribute(node, "y") + getScaledAttribute(node, "h"))) spunode.appendChild(button) elif node.nodeName=="button": wantHighlightBox = False #Overlay item graphic/text button onto background imagefilename = getThemeFile(themeName, node.attributes["filename"].value) if not doesFileExist(imagefilename): fatalError("Cannot find image for menu button (%s)." % imagefilename) maskimagefilename = getThemeFile(themeName, node.attributes["mask"].value) if not doesFileExist(maskimagefilename): fatalError("Cannot find mask image for menu button (%s)." % maskimagefilename) picture=Image.open(imagefilename,"r").resize((getScaledAttribute(node, "w"), getScaledAttribute(node, "h"))) picture=picture.convert("RGBA") bgimage.paste(picture, (getScaledAttribute(node, "x"), getScaledAttribute(node, "y")), picture) del picture # if we have some text paint that over the image textnode = node.getElementsByTagName("textnormal") if textnode.length > 0: textnode = textnode[0] text=expandItemText(infoDOM,textnode.attributes["value"].value, itemnum, page, itemsonthispage,chapternumber,chapterlist) if text>"": paintText( draw, getScaledAttribute(textnode, "x"), getScaledAttribute(textnode, "y"), getScaledAttribute(textnode, "w"), getScaledAttribute(textnode, "h"), text, themeFonts[int(textnode.attributes["font"].value)], textnode.attributes["colour"].value, textnode.attributes["align"].value ) boundarybox=checkBoundaryBox(boundarybox, node) del text write( "Added button image %s" % imagefilename) picture=Image.open(maskimagefilename,"r").resize((getScaledAttribute(node, "w"), getScaledAttribute(node, "h"))) picture=picture.convert("RGBA") bgimagemask.paste(picture, (getScaledAttribute(node, "x"), getScaledAttribute(node, "y")),picture) #del picture # if we have some text paint that over the image textnode = node.getElementsByTagName("textselected") if textnode.length > 0: textnode = textnode[0] text=expandItemText(infoDOM,textnode.attributes["value"].value, itemnum, page, itemsonthispage,chapternumber,chapterlist) textImage=Image.new("RGBA",picture.size) textDraw=ImageDraw.Draw(textImage) if text>"": paintText(textDraw, getScaledAttribute(node, "x") - getScaledAttribute(textnode, "x"), getScaledAttribute(node, "y") - getScaledAttribute(textnode, "y"), getScaledAttribute(textnode, "w"), getScaledAttribute(textnode, "h"), text, themeFonts[int(textnode.attributes["font"].value)], "white", textnode.attributes["align"].value ) #convert the RGB image to a 1 bit image (width, height) = textImage.size for y in range(height): for x in range(width): if textImage.getpixel((x,y)) < (100, 100, 100, 255): textImage.putpixel((x,y), (0, 0, 0, 0)) else: textImage.putpixel((x,y), (255, 255, 255, 255)) bgimagemask.paste(textnode.attributes["colour"].value, (getScaledAttribute(textnode, "x"), getScaledAttribute(textnode, "y")), textImage) boundarybox=checkBoundaryBox(boundarybox, node) del text, textImage, textDraw del picture elif node.nodeName=="#text" or node.nodeName=="#comment": #Do nothing assert True else: write( "Dont know how to process %s" % node.nodeName) if drawmask == None: return #Draw the mask for this item if wantHighlightBox == True: # Make the boundary box bigger than the content to avoid over writing it boundarybox=boundarybox[0]-1,boundarybox[1]-1,boundarybox[2]+1,boundarybox[3]+1 drawmask.rectangle(boundarybox,outline=highlightcolor) # Draw another line to make the box thicker - PIL does not support linewidth boundarybox=boundarybox[0]-1,boundarybox[1]-1,boundarybox[2]+1,boundarybox[3]+1 drawmask.rectangle(boundarybox,outline=highlightcolor) node = spumuxdom.createElement("button") #Fiddle this for chapter marks.... if chapternumber>0: node.setAttribute("name","%s" % chapternumber) else: node.setAttribute("name","%s" % itemnum) node.setAttribute("x0","%d" % int(boundarybox[0])) node.setAttribute("y0","%d" % int(boundarybox[1])) node.setAttribute("x1","%d" % int(boundarybox[2] + 1)) node.setAttribute("y1","%d" % int(boundarybox[3] + 1)) spunode.appendChild(node) | c82d8a0c4a33fc669861191621297cdbb83d3d9b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/13713/c82d8a0c4a33fc669861191621297cdbb83d3d9b/mythburn.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3724,
8335,
1180,
12,
2433,
16,
761,
816,
2211,
2433,
16,
761,
2107,
16,
3824,
1726,
16,
7611,
2730,
16,
3724,
16,
7611,
15374,
351,
835,
16,
3724,
4455,
16,
8839,
3266,
16,
1694,
379,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
8335,
1180,
12,
2433,
16,
761,
816,
2211,
2433,
16,
761,
2107,
16,
3824,
1726,
16,
7611,
2730,
16,
3724,
16,
7611,
15374,
351,
835,
16,
3724,
4455,
16,
8839,
3266,
16,
1694,
379,... |
try: self.imagePathsByKey.sync() except RuntimeError, re: pass | def getPosters(self, program): posters = [] key = self.createKey('getPosters', program) if key in self.imagePathsByKey: posters = self.imagePathsByKey[key] if not posters and self.nextProvider: posters = self.nextProvider.getPosters(program) if posters: # cache returned poster self.imagePathsByKey[key] = posters # TODO: Figure out if this is detrimental to performance -- sync on update # Sometimes throws RuntimeError if iterating while changing. try: self.imagePathsByKey.sync() except RuntimeError, re: pass return posters | 1b57f163bd86bf1c476bb381e338779085973d19 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12279/1b57f163bd86bf1c476bb381e338779085973d19/fanart.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
14150,
414,
12,
2890,
16,
5402,
4672,
1603,
414,
273,
5378,
498,
273,
365,
18,
2640,
653,
2668,
588,
3349,
414,
2187,
5402,
13,
309,
498,
316,
365,
18,
2730,
4466,
14560,
30,
1603,
414... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
14150,
414,
12,
2890,
16,
5402,
4672,
1603,
414,
273,
5378,
498,
273,
365,
18,
2640,
653,
2668,
588,
3349,
414,
2187,
5402,
13,
309,
498,
316,
365,
18,
2730,
4466,
14560,
30,
1603,
414... | |
self.__CheckExit() | pass | def __HandlePipeClosed(self, _): """Called when I/O pipe to process is closed. | 7bf65bd4973515660943e355acab20a63a2e0e66 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5330/7bf65bd4973515660943e355acab20a63a2e0e66/daemon.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
3259,
11546,
7395,
12,
2890,
16,
389,
4672,
3536,
8185,
1347,
467,
19,
51,
6010,
358,
1207,
353,
4375,
18,
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,
3259,
11546,
7395,
12,
2890,
16,
389,
4672,
3536,
8185,
1347,
467,
19,
51,
6010,
358,
1207,
353,
4375,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
if os.path.isdir(os.path.join(base_dir, d)) and \ d not in ignore: dirs.append(os.path.join(base_dir, d)) dirs.sort(mtime_sort) | if d in ignore: continue p = os.path.join(base_dir, d) if not os.path.isdir(p): continue mtime = os.path.getmtime(p) dirs.append( (mtime, p) ) | def purge(base_dirs, gigs, ignore, dry_run=False): """Delete directories under `base_dirs` until `gigs` GB are free Will not delete directories listed in the ignore list.""" gigs *= 1024 * 1024 * 1024 if freespace(base_dirs[0]) >= gigs: return dirs = [] for base_dir in base_dirs: if os.path.exists(base_dir): for d in os.listdir(base_dir): if os.path.isdir(os.path.join(base_dir, d)) and \ d not in ignore: dirs.append(os.path.join(base_dir, d)) dirs.sort(mtime_sort) while dirs and freespace(base_dirs[0]) < gigs: d = dirs.pop(0) print "Deleting", d if not dry_run: try: clobber_path=d+clobber_suffix if os.path.exists(clobber_path): rmdirRecursive(clobber_path) # Prevent repeated moving. if d.endswith(clobber_suffix): rmdirRecursive(d) else: shutil.move(d, clobber_path) rmdirRecursive(clobber_path) except: print >>sys.stderr, "Couldn't purge %s properly. Skipping." % d | 840d2588455f3e57400ead43648bc5ee7a196968 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6206/840d2588455f3e57400ead43648bc5ee7a196968/purge_builds.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11668,
12,
1969,
67,
8291,
16,
314,
360,
87,
16,
2305,
16,
10299,
67,
2681,
33,
8381,
4672,
3536,
2613,
6402,
3613,
1375,
1969,
67,
8291,
68,
3180,
1375,
75,
360,
87,
68,
25069,
854,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11668,
12,
1969,
67,
8291,
16,
314,
360,
87,
16,
2305,
16,
10299,
67,
2681,
33,
8381,
4672,
3536,
2613,
6402,
3613,
1375,
1969,
67,
8291,
68,
3180,
1375,
75,
360,
87,
68,
25069,
854,
... |
sr.showMsg("Taking test exposure at focus %.0f %sm" % \ (focPos, RO.StringUtil.MuStr)) | sr.showMsg("Taking test exposure at focus %0.0f %s" % \ (focPos, MicronStr)) | def run(self, sr): """Take the series of focus exposures. """ self.initAll() # open slitviewer window if self.imageViewerTLName: self.tuiModel.tlSet.makeVisible(self.imageViewerTLName) self.sr.master.winfo_toplevel().lift() # fake data for debug mode # iteration #, FWHM self.debugIterFWHM = (1, 2.0) self.getInstInfo() self.extraSetup() | bdc20e03649e5a498573c69cad551b250ac0bc28 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6236/bdc20e03649e5a498573c69cad551b250ac0bc28/BaseFocusScript.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
16,
9133,
4672,
3536,
13391,
326,
4166,
434,
7155,
431,
917,
1823,
18,
3536,
365,
18,
2738,
1595,
1435,
225,
468,
1696,
2020,
305,
25256,
2742,
309,
365,
18,
2730,
18415,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
16,
9133,
4672,
3536,
13391,
326,
4166,
434,
7155,
431,
917,
1823,
18,
3536,
365,
18,
2738,
1595,
1435,
225,
468,
1696,
2020,
305,
25256,
2742,
309,
365,
18,
2730,
18415,... |
path = get_example_path() os.chdir(path) | def test_simulation_with_algebraic_variables(self): """Run a simulation with a model with algebraic variables""" path = get_example_path() os.chdir(path) | 2ddcc83dfd83d78f91307a8c14edc98fc9c1ea0a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7711/2ddcc83dfd83d78f91307a8c14edc98fc9c1ea0a/test_sundials.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
9812,
6234,
67,
1918,
67,
287,
29087,
335,
67,
7528,
12,
2890,
4672,
3536,
1997,
279,
14754,
598,
279,
938,
598,
524,
29087,
335,
3152,
8395,
589,
273,
336,
67,
8236,
67,
803... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1842,
67,
9812,
6234,
67,
1918,
67,
287,
29087,
335,
67,
7528,
12,
2890,
4672,
3536,
1997,
279,
14754,
598,
279,
938,
598,
524,
29087,
335,
3152,
8395,
589,
273,
336,
67,
8236,
67,
803... | |
sequence2ast(tree) | parser.sequence2ast(tree) | def check_bad_tree(tree, label): print print label try: sequence2ast(tree) except parser.ParserError: print "caught expected exception for invalid tree" pass else: print "test failed: did not properly detect invalid tree:" pprint.pprint(tree) | 5f08a0aae00652b1d3df57237760c23a0aae4c16 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/5f08a0aae00652b1d3df57237760c23a0aae4c16/test_parser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
67,
8759,
67,
3413,
12,
3413,
16,
1433,
4672,
1172,
1172,
1433,
775,
30,
2082,
18,
6178,
22,
689,
12,
3413,
13,
1335,
2082,
18,
2678,
668,
30,
1172,
315,
27611,
2665,
1520,
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,
866,
67,
8759,
67,
3413,
12,
3413,
16,
1433,
4672,
1172,
1172,
1433,
775,
30,
2082,
18,
6178,
22,
689,
12,
3413,
13,
1335,
2082,
18,
2678,
668,
30,
1172,
315,
27611,
2665,
1520,
364,
... |
if 'default-list' not in self._preso._styles_added: self._preso._styles_added['default-list'] = 1 | style = bl.style_name if style not in self._preso._styles_added: self._preso._styles_added[style] = 1 | def add_bullet_list(self, bl): """ note that this pushes the cur_element, but doesn't pop it. You'll need to do that """ # text:list doesn't like being a child of text:p if self.cur_element is None: self.add_text_frame() self.push_element() self.cur_element.node.attrib['presentation:class'] = 'outline' self.cur_element._text_box.append(bl.node) bl.node.parent = self.cur_element._text_box if 'default-list' not in self._preso._styles_added: self._preso._styles_added['default-list'] = 1 self._preso._auto_styles.append(et.fromstring(bl.default_styles())[0]) self.cur_element = bl | dd47297f38aa72cafcca6d091006423d6973c407 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5620/dd47297f38aa72cafcca6d091006423d6973c407/preso.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
67,
70,
19994,
67,
1098,
12,
2890,
16,
2811,
4672,
3536,
4721,
716,
333,
27351,
326,
662,
67,
2956,
16,
1496,
3302,
1404,
1843,
518,
18,
4554,
5614,
1608,
358,
741,
716,
3536,
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,
527,
67,
70,
19994,
67,
1098,
12,
2890,
16,
2811,
4672,
3536,
4721,
716,
333,
27351,
326,
662,
67,
2956,
16,
1496,
3302,
1404,
1843,
518,
18,
4554,
5614,
1608,
358,
741,
716,
3536,
468... |
class WrappingOptionMenu (GtkButton): """ Something that looks similar to a GtkOptionMenu ... | class WrappingOptionMenu (gtk.Button): """ Something that looks similar to a gtk.OptionMenu ... | def __init__ (self, label, justify=JUSTIFY_LEFT, wrap=TRUE, width=0, height=0): """ Constructor. """ GtkCheckButton.__init__ (self) checkHBox = GtkHBox() checkLabel = GtkLabel(label) checkLabel.set_justify (justify) checkLabel.set_line_wrap (wrap) checkLabel.set_usize (width, height) checkLabel.show() checkHBox.pack_start (checkLabel, FALSE, FALSE, 0) checkHBox.show() self.add (checkHBox) | ec17e2ee5c945ddc11ff8bcc0cdc586ae535e76d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4580/ec17e2ee5c945ddc11ff8bcc0cdc586ae535e76d/driconf.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
261,
2890,
16,
1433,
16,
31455,
33,
46,
5996,
12096,
67,
10066,
16,
2193,
33,
18724,
16,
1835,
33,
20,
16,
2072,
33,
20,
4672,
3536,
11417,
18,
3536,
22132,
1564,
3616... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
261,
2890,
16,
1433,
16,
31455,
33,
46,
5996,
12096,
67,
10066,
16,
2193,
33,
18724,
16,
1835,
33,
20,
16,
2072,
33,
20,
4672,
3536,
11417,
18,
3536,
22132,
1564,
3616... |
self.client = HgWebClient(repository.path) | self.client = HgWebClient(repository.path, repository.username, repository.password) | def __init__(self, repository): SCMTool.__init__(self, repository) if repository.path.startswith('http'): self.client = HgWebClient(repository.path) else: self.client = HgClient(repository.path) | 8ecb712c6b259fedef8b6a85171331d9edc4bf5f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1600/8ecb712c6b259fedef8b6a85171331d9edc4bf5f/hg.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
3352,
4672,
8795,
49,
6364,
16186,
2738,
972,
12,
2890,
16,
3352,
13,
309,
3352,
18,
803,
18,
17514,
1918,
2668,
2505,
11,
4672,
365,
18,
2625,
273,
670,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3352,
4672,
8795,
49,
6364,
16186,
2738,
972,
12,
2890,
16,
3352,
13,
309,
3352,
18,
803,
18,
17514,
1918,
2668,
2505,
11,
4672,
365,
18,
2625,
273,
670,... |
return with_mode(NO_CONVERSION, r.do_call)('rbind', mat) | return r.do_call('rbind', mat) | def rmatrix(mat): ''' VERY IMPORTANT convert a Python 2d list to r matrix format that can be passed to functions like image directly. ''' return with_mode(NO_CONVERSION, r.do_call)('rbind', mat) | 0731ae08adccf41d053f6aa3359994cd77496a34 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/401/0731ae08adccf41d053f6aa3359994cd77496a34/simuRPy.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
436,
5667,
12,
7373,
4672,
9163,
6422,
61,
21840,
6856,
1765,
279,
6600,
576,
72,
666,
358,
436,
3148,
740,
716,
848,
506,
2275,
358,
4186,
3007,
1316,
5122,
18,
9163,
225,
327,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
436,
5667,
12,
7373,
4672,
9163,
6422,
61,
21840,
6856,
1765,
279,
6600,
576,
72,
666,
358,
436,
3148,
740,
716,
848,
506,
2275,
358,
4186,
3007,
1316,
5122,
18,
9163,
225,
327,
436,
1... |
if H<=maxHeight: | if H<=maxHeight-_FUZZ: | def func(x): W, H = _listWrapOn(self._content,x*availWidth,self.canv) W /= x H /= x return W, H | 026f7cbb1263946fbcc0b345557c6f44c85e0949 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/026f7cbb1263946fbcc0b345557c6f44c85e0949/flowables.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1326,
12,
92,
4672,
678,
16,
670,
273,
389,
1098,
2964,
1398,
12,
2890,
6315,
1745,
16,
92,
14,
842,
671,
2384,
16,
2890,
18,
4169,
90,
13,
678,
9531,
619,
670,
9531,
619,
327,
678,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1326,
12,
92,
4672,
678,
16,
670,
273,
389,
1098,
2964,
1398,
12,
2890,
6315,
1745,
16,
92,
14,
842,
671,
2384,
16,
2890,
18,
4169,
90,
13,
678,
9531,
619,
670,
9531,
619,
327,
678,
... |
if hdrtype < Header.SEPARATOR: | time0 = header.time if hdrtype < Header.SEPARATOR: | def parseMessages(self): '''Parses complete messages until connection closed. Raises ConnectionLost exception.''' CHANNEL_MASK = 0x3F while True: hdrsize = ord((yield self.stream.read(1))[0]) # read header size byte channel = hdrsize & CHANNEL_MASK if channel == 0: # we need one more byte # if _debug: print 'need one more bytes' channel = 64 + ord((yield self.stream.read(1))[0]) elif channel == 1: # we need two more bytes # if _debug: print 'need two more bytes' data = (yield self.stream.read(2)) channel = 64 + ord(data[0]) + 256 * ord(data[1]) | 210091ee02f88f01bb87e064716a0c59d2356c04 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10498/210091ee02f88f01bb87e064716a0c59d2356c04/rtmp.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
5058,
12,
2890,
4672,
9163,
6656,
3912,
2743,
3180,
1459,
4375,
18,
20497,
4050,
19024,
1520,
1093,
6309,
27417,
67,
11704,
273,
374,
92,
23,
42,
1323,
1053,
30,
7723,
1467,
273,
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,
1109,
5058,
12,
2890,
4672,
9163,
6656,
3912,
2743,
3180,
1459,
4375,
18,
20497,
4050,
19024,
1520,
1093,
6309,
27417,
67,
11704,
273,
374,
92,
23,
42,
1323,
1053,
30,
7723,
1467,
273,
4... |
try: | if isinstance(obj, gdk.Pixbuf): | def __init__(self, obj, mipmap_level=0): try: obj = helpers.gdkpixbuf2numpy(obj) except: # it was already an array (eg. when creating the mipmap) pass try: r, g, b = obj except: pass else: obj = numpy.zeros((N, N, 3), dtype='uint8') obj[:,:,:] = r, g, b | 21297efb2740fbd7e9f8ec26a2486ee8cfdcd77a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7129/21297efb2740fbd7e9f8ec26a2486ee8cfdcd77a/backgroundsurface.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1081,
16,
312,
625,
1458,
67,
2815,
33,
20,
4672,
309,
1549,
12,
2603,
16,
314,
2883,
18,
21816,
4385,
4672,
1081,
273,
9246,
18,
75,
2883,
14861,
4385,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1081,
16,
312,
625,
1458,
67,
2815,
33,
20,
4672,
309,
1549,
12,
2603,
16,
314,
2883,
18,
21816,
4385,
4672,
1081,
273,
9246,
18,
75,
2883,
14861,
4385,
... |
def title_index_teardown(tc): | TITLEINDEX3_MACRO_TEST_CASES = u""" ============================== TitleIndex, group format [[TitleIndex(Wiki,format=group)]] ------------------------------ <p> <ul class="titleindex"><li><strong>Wiki </strong><ul><li><strong>End/</strong><ul><li><a href="/wiki/WikiEnd/First">WikiEnd/First</a></li><li><a href="/wiki/WikiEnd/Second">WikiEnd/Second</a></li></ul></li><li><strong>Start</strong><ul><li><a href="/wiki/WikiStart">WikiStart</a></li><li><strong>/</strong><ul><li><a href="/wiki/WikiStart/First">WikiStart/First</a></li><li><a href="/wiki/WikiStart/Second">WikiStart/Second</a></li><li><a href="/wiki/WikiStart/Third">WikiStart/Third</a></li></ul></li></ul></li></ul></li></ul> </p> ------------------------------ ============================== TitleIndex, hierarchy format [[TitleIndex(WikiStart/, format=hierarchy)]] ------------------------------ <p> <ul class="titleindex"><li><a href="/wiki/WikiStart/First">WikiStart</a><ul><li><a href="/wiki/WikiStart/Second">Second</a></li><li><a href="/wiki/WikiStart/Third">Third</a></li></ul></li></ul> </p> ------------------------------ """ def titleindex3_setup(tc): now = datetime.now(utc) def add_page(name): w = WikiPage(tc.env) w.name = name w.text = '--' w.save('joe', 'the page ' + name, '::1', now) add_page('WikiStart/First') add_page('WikiStart/Second') add_page('WikiStart/Third') add_page('WikiEnd/First') add_page('WikiEnd/Second') def titleindex3_teardown(tc): | def title_index_teardown(tc): tc.env.reset_db() | 5cb7060a9c0d51f76a97f0260d605523f67158c3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2831/5cb7060a9c0d51f76a97f0260d605523f67158c3/macros.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
29406,
9199,
23,
67,
10875,
1457,
67,
16961,
67,
13415,
55,
273,
582,
8395,
28562,
14468,
10984,
1016,
16,
1041,
740,
12167,
4247,
1016,
12,
25438,
16,
2139,
33,
1655,
13,
13563,
12146,
16982,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
29406,
9199,
23,
67,
10875,
1457,
67,
16961,
67,
13415,
55,
273,
582,
8395,
28562,
14468,
10984,
1016,
16,
1041,
740,
12167,
4247,
1016,
12,
25438,
16,
2139,
33,
1655,
13,
13563,
12146,
16982,
... |
and self.selected_index + 1 < len (self.entries) | and self.selected_index + 1 < len (self._entries) | def can_select_next (self): return self.selected_index != -1 \ and self.selected_index + 1 < len (self.entries) | ed500b819555108af67057bd24de252315b598d2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2233/ed500b819555108af67057bd24de252315b598d2/edit.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
848,
67,
4025,
67,
4285,
261,
2890,
4672,
327,
365,
18,
8109,
67,
1615,
480,
300,
21,
521,
471,
365,
18,
8109,
67,
1615,
397,
404,
411,
562,
261,
2890,
6315,
8219,
13,
225,
2,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
848,
67,
4025,
67,
4285,
261,
2890,
4672,
327,
365,
18,
8109,
67,
1615,
480,
300,
21,
521,
471,
365,
18,
8109,
67,
1615,
397,
404,
411,
562,
261,
2890,
6315,
8219,
13,
225,
2,
-100,
... |
{ 'name': 'all', 'query_string': 'q=bug', 'count': 2 }, | { 'name': 'any', 'query_string': 'q=bug&language=', 'count': 2 }, | def test_get_possible_facets(self): project1 = Project.create_dummy(language='c') project2 = Project.create_dummy(language='d') project3 = Project.create_dummy(language='e') Bug.create_dummy(project=project1, description='bug', good_for_newcomers=True) Bug.create_dummy(project=project2, description='bug') Bug.create_dummy(project=project3, description='bAg') query = mysite.search.controllers.Query( terms=['bug'], terms_string='bug', active_facet_options={'language': 'c'}) possible_facets = query.get_possible_facets() self.assertEqual( possible_facets['language']['options'], [ { 'name': 'all', 'query_string': 'q=bug', 'count': 2 }, { 'name': 'c', 'query_string': 'q=bug&language=c', 'count': 1 }, { 'name': 'd', 'query_string': 'q=bug&language=d', 'count': 1 }, # e is excluded because its bug ('bAg') doesn't match the term 'bug' ] ) self.assertEqual( possible_facets['toughness']['options'], [ { 'name': 'all', 'count': 2 }, { 'name': 'bitesize', 'count': 1 }, ] ) | a35d9cb0088dc8954841b6a6810c5266efe0a501 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11976/a35d9cb0088dc8954841b6a6810c5266efe0a501/tests.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
588,
67,
12708,
67,
11639,
2413,
12,
2890,
4672,
1984,
21,
273,
5420,
18,
2640,
67,
21050,
12,
4923,
2218,
71,
6134,
1984,
22,
273,
5420,
18,
2640,
67,
21050,
12,
4923,
2218,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
12708,
67,
11639,
2413,
12,
2890,
4672,
1984,
21,
273,
5420,
18,
2640,
67,
21050,
12,
4923,
2218,
71,
6134,
1984,
22,
273,
5420,
18,
2640,
67,
21050,
12,
4923,
2218,... |
gump.addText(50, 389, tr("Back"), 0x480) | gump.addText(50, 389, tr("Back"), enabbledhue) | def details(self, player, arguments): if self.parent.gumptype != 0: player.socket.closegump(self.parent.gumptype, 0xFFFF) | 0d89a4bc8e80f0d0c5ebc39da765d50080b61588 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/0d89a4bc8e80f0d0c5ebc39da765d50080b61588/makemenus.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3189,
12,
2890,
16,
7291,
16,
1775,
4672,
309,
365,
18,
2938,
18,
75,
379,
27672,
480,
374,
30,
7291,
18,
7814,
18,
4412,
75,
2801,
12,
2890,
18,
2938,
18,
75,
379,
27672,
16,
374,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3189,
12,
2890,
16,
7291,
16,
1775,
4672,
309,
365,
18,
2938,
18,
75,
379,
27672,
480,
374,
30,
7291,
18,
7814,
18,
4412,
75,
2801,
12,
2890,
18,
2938,
18,
75,
379,
27672,
16,
374,
... |
def run( self, local=0 ): """ run function test @param local: transfer local variables to global and perform other tasks only when run locally @type local: 1|0 @return: 1 @rtype: int """ | def prepare(self): | def process_all( self, file_dic, keep_hetatoms=0 ): """ Process PDB files in file_dic. The PDB is read from: - L{TemplateSearcher.F_NR} | 3c67395bc83ba0fdd19fdd2ce8fa8bd5278f16c9 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/482/3c67395bc83ba0fdd19fdd2ce8fa8bd5278f16c9/TemplateCleaner.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
67,
454,
12,
365,
16,
585,
67,
15859,
16,
3455,
67,
76,
278,
14937,
33,
20,
262,
30,
3536,
4389,
21601,
1390,
316,
585,
67,
15859,
18,
1021,
21601,
353,
855,
628,
30,
300,
511,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
67,
454,
12,
365,
16,
585,
67,
15859,
16,
3455,
67,
76,
278,
14937,
33,
20,
262,
30,
3536,
4389,
21601,
1390,
316,
585,
67,
15859,
18,
1021,
21601,
353,
855,
628,
30,
300,
511,... |
if not self.name: self.name = "Mesh" | def __init__(self, list=None): if list is not None: for property in list: getattr(self, "set_%s" % property[0])(property[1:]) if not self.name: self.name = "Mesh" | 26a568ddb62579e291dad3cf21632bef9bd72772 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6757/26a568ddb62579e291dad3cf21632bef9bd72772/Mesh.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
666,
33,
7036,
4672,
309,
666,
353,
486,
599,
30,
364,
1272,
316,
666,
30,
3869,
12,
2890,
16,
315,
542,
10185,
87,
6,
738,
1272,
63,
20,
5717,
12,
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,
666,
33,
7036,
4672,
309,
666,
353,
486,
599,
30,
364,
1272,
316,
666,
30,
3869,
12,
2890,
16,
315,
542,
10185,
87,
6,
738,
1272,
63,
20,
5717,
12,
4... | |
actions.append([id, proc, runtime, status, progress]) | actions.append([id, proc, runtime, (status !="" and status or ''), (progress !="" and progress or '')]) | def perform_runwebcoll(colID, ln, confirm=0, callback='yes'): """form to delete an output format not in use. colID - the collection id of the current collection. fmtID - the format id to delete.""" subtitle = """<a name="11"></a>Webcoll Status""" output = "" colID = int(colID) col_dict = dict(get_def_name('', "collection")) output += """<br><b>Last updates:</b><br>""" collection_table_update_time = "" collection_web_update_time = "" res = run_sql("SHOW TABLE STATUS LIKE 'collection'") if res: collection_table_update_time = str(res[0][11])[0:len(collection_table_update_time) - 3] output += "Collection table last updated: %s<br>" % collection_table_update_time try: file = open("%s/collections/1/last-updated-ln=en.html" % cachedir) collection_web_update_time = str(file.readline()) output += "Collection webpage last updated: %s<br>" % collection_web_update_time file.close() except StandardError, e: pass import datetime import time tabletime = time.strptime(collection_table_update_time, "%Y-%m-%d %H:%M:%S") webtime = time.strptime(collection_web_update_time, "%d %b %Y %H:%M:%S %Z") if tabletime > webtime: output += """<br><b><span class="info">Warning: The collections has been modified since last time Webcoll was executed, to process the changes, Webcoll must be executed.</span></b><br>""" header = ['ID', 'Name', 'Time', 'Status', 'Progress'] actions = [] output += """<br><b>Last BibSched tasks:</b><br>""" res = run_sql("select id, proc, host, user, runtime, sleeptime, arguments, status, progress from schTASK where proc='webcoll' and runtime< now() ORDER by runtime") if len(res) > 0: (id, proc, host, user, runtime, sleeptime, arguments, status, progress) = res[len(res) - 1] webcoll__update_time = runtime actions.append([id, proc, runtime, status, progress]) else: actions.append(['', 'webcoll', '', '', 'Not executed yet']) res = run_sql("select id, proc, host, user, runtime, sleeptime, arguments, status, progress from schTASK where proc='bibindex' and runtime< now() ORDER by runtime") if len(res) > 0: (id, proc, host, user, runtime, sleeptime, arguments, status, progress) = res[len(res) - 1] actions.append([id, proc, runtime, status, progress]) else: actions.append(['', 'bibindex', '', '', 'Not executed yet']) output += tupletotable(header=header, tuple=actions) output += """<br><b>Next scheduled BibSched run:</b><br>""" actions = [] res = run_sql("select id, proc, host, user, runtime, sleeptime, arguments, status, progress from schTASK where proc='webcoll' and runtime > now() ORDER by runtime") webcoll_future = "" if len(res) > 0: (id, proc, host, user, runtime, sleeptime, arguments, status, progress) = res[0] webcoll__update_time = runtime actions.append([id, proc, runtime, status, progress]) webcoll_future = "yes" else: actions.append(['', 'webcoll', '', '', 'Not scheduled']) res = run_sql("select id, proc, host, user, runtime, sleeptime, arguments, status, progress from schTASK where proc='bibindex' and runtime > now() ORDER by runtime") bibindex_future = "" if len(res) > 0: (id, proc, host, user, runtime, sleeptime, arguments, status, progress) = res[0] actions.append([id, proc, runtime, status, progress]) bibindex_future = "yes" else: actions.append(['', 'bibindex', '', '', 'Not scheduled']) output += tupletotable(header=header, tuple=actions) if webcoll_future == "": output += """<br><b><span class="info">Warning: Webcoll is not scheduled for a future run by bibsched, any updates to the collection will not be processed.</span></b><br>""" if bibindex_future == "": output += """<br><b><span class="info">Warning: Bibindex is not scheduled for a future run by bibsched, any updates to the records will not be processed.</span></b><br>""" try: body = [output, extra] except NameError: body = [output] if callback: return perform_index(colID, ln, "perform_runwebcoll", addadminbox(subtitle, body)) else: return addadminbox(subtitle, body) | 1f0231159c61e0df959c94ae682b24a31ae4ef28 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12027/1f0231159c61e0df959c94ae682b24a31ae4ef28/websearchadminlib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3073,
67,
2681,
4875,
12910,
12,
1293,
734,
16,
7211,
16,
6932,
33,
20,
16,
1348,
2218,
9707,
11,
4672,
3536,
687,
358,
1430,
392,
876,
740,
486,
316,
999,
18,
645,
734,
300,
326,
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,
3073,
67,
2681,
4875,
12910,
12,
1293,
734,
16,
7211,
16,
6932,
33,
20,
16,
1348,
2218,
9707,
11,
4672,
3536,
687,
358,
1430,
392,
876,
740,
486,
316,
999,
18,
645,
734,
300,
326,
18... |
or field['name'] == 'owner': | or field['name'] in ('owner', 'reporter'): | def _render_view(self, req, db, milestone): milestone_groups = [] available_groups = [] component_group_available = False ticket_fields = TicketSystem(self.env).get_ticket_fields() | fae6f2999e8131d3ee9fb62a17c8e0532950c8e0 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2831/fae6f2999e8131d3ee9fb62a17c8e0532950c8e0/roadmap.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
5902,
67,
1945,
12,
2890,
16,
1111,
16,
1319,
16,
28664,
4672,
28664,
67,
4650,
273,
5378,
2319,
67,
4650,
273,
5378,
1794,
67,
1655,
67,
5699,
273,
1083,
9322,
67,
2821,
273,
220... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
5902,
67,
1945,
12,
2890,
16,
1111,
16,
1319,
16,
28664,
4672,
28664,
67,
4650,
273,
5378,
2319,
67,
4650,
273,
5378,
1794,
67,
1655,
67,
5699,
273,
1083,
9322,
67,
2821,
273,
220... |
"Looks up and returns the value of a SAX2 property." | def getProperty(self, name): "Looks up and returns the value of a SAX2 property." raise SAXNotRecognizedException("Property '%s' not recognized" % name) | c5252b9fd6d85186c0b2dd684b36bb5006dca568 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/c5252b9fd6d85186c0b2dd684b36bb5006dca568/expatreader.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3911,
12,
2890,
16,
508,
4672,
1002,
10168,
1248,
5650,
9367,
503,
2932,
1396,
1995,
87,
11,
486,
16332,
6,
738,
508,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
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,
3911,
12,
2890,
16,
508,
4672,
1002,
10168,
1248,
5650,
9367,
503,
2932,
1396,
1995,
87,
11,
486,
16332,
6,
738,
508,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... | |
return matrix_integer_sparse.Matrix_sparse_integer return matrix_sparse.Matrix_pid_sparse | return matrix_integer_sparse.Matrix_integer_sparse return matrix_pid_sparse.Matrix_pid_sparse | def _get_matrix_class(self): if self.is_dense(): if isinstance(self.base_ring(), integer_ring.IntegerRing): return matrix_integer_dense.Matrix_integer_dense return matrix_pid.Matrix_pid else: if isinstance(self.base_ring(), integer_ring.IntegerRing): return matrix_integer_sparse.Matrix_sparse_integer return matrix_sparse.Matrix_pid_sparse | 1ca99689abda06679ffa5a695efe9764c08ae61f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9890/1ca99689abda06679ffa5a695efe9764c08ae61f/matrix_space.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
67,
5667,
67,
1106,
12,
2890,
4672,
309,
365,
18,
291,
67,
25942,
13332,
309,
1549,
12,
2890,
18,
1969,
67,
8022,
9334,
3571,
67,
8022,
18,
4522,
10369,
4672,
327,
3148,
67,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
67,
5667,
67,
1106,
12,
2890,
4672,
309,
365,
18,
291,
67,
25942,
13332,
309,
1549,
12,
2890,
18,
1969,
67,
8022,
9334,
3571,
67,
8022,
18,
4522,
10369,
4672,
327,
3148,
67,
... |
class _AsyncJobPollError(Exception): pass | def send_exception(self, *args): # the arguments and the same as for greenlet.throw return self.send(None, args) | 59b59acd2339640b7dab05c6761583e5d949185f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10078/59b59acd2339640b7dab05c6761583e5d949185f/coros.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1366,
67,
4064,
12,
2890,
16,
380,
1968,
4672,
468,
326,
1775,
471,
326,
1967,
487,
364,
10004,
1810,
18,
12849,
327,
365,
18,
4661,
12,
7036,
16,
833,
13,
2,
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,
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,
1366,
67,
4064,
12,
2890,
16,
380,
1968,
4672,
468,
326,
1775,
471,
326,
1967,
487,
364,
10004,
1810,
18,
12849,
327,
365,
18,
4661,
12,
7036,
16,
833,
13,
2,
-100,
-100,
-100,
-100,
... | |
inputKeys: { ccdExposure: isrExposure""" + str(snap) + """ } outputKeys: { sdqaCcdExposure: isrExposure""" + str(snap) + """ | stagePolicy: { inputKeys: { ccdExposure: isrExposure""" + str(snap) + """ } outputKeys: { sdqaCcdExposure: isrExposure""" + str(snap) + """ } | def ccdAssemblyProcess(f): for snap in (0, 1): print >>f, """ appStage: { name: ccdAssemblyCcdList""" + str(snap) + """ parallelClass: lsst.datarel.ObjectListStageParallel eventTopic: None stagePolicy: { inputKeys: {""" for channelX in (0, 1): for channelY in (0, 1, 2, 3, 4, 5, 6, 7): channelId = "%d%d" % (channelX, channelY) channelSnap = "%d%d_%d" % (channelX, channelY, snap) print >>f, " object: isrExposure" + channelSnap print >>f, """ } outputKeys: { objectList: exposureList""" + str(snap) + """ } } } appStage: { name: ccdAssemblyIsrCcdAssembly""" + str(snap) + """ parallelClass: lsst.ip.pipeline.IsrCcdAssemblyStageParallel eventTopic: None inputKeys: { exposureList: exposureList""" + str(snap) + """ } outputKeys: { assembledCcdExposure: isrExposure""" + str(snap) + """ } } appStage: { name: ccdAssemblyIsrCcdDefect""" + str(snap) + """ parallelClass: lsst.ip.pipeline.IsrCcdDefectStageParallel eventTopic: None inputKeys: { ccdExposure: isrExposure""" + str(snap) + """ } outputKeys: { ccdExposure: isrExposure""" + str(snap) + """ } } appStage: { name: ccdAssemblyIsrCcdSdqa""" + str(snap) + """ parallelClass: lsst.ip.pipeline.IsrCcdSdqaStageParallel eventTopic: None inputKeys: { ccdExposure: isrExposure""" + str(snap) + """ } outputKeys: { sdqaCcdExposure: isrExposure""" + str(snap) + """ } } appStage: { name: ccdAssemblySdqaCcd""" + str(snap) + """ parallelClass: lsst.sdqa.pipeline.IsrSdqaStageParallel eventTopic: None inputKeys: { exposureKey: isrExposure""" + str(snap) + """ } parameters: @PT1Pipe/ISR-sdqaCcd.paf outputKeys: { isrPersistableSdqaRatingVectorKey: sdqaRatingVector""" + str(snap) + """ } }""" print >>f, """ appStage: { name: ccdAssemblyOutput parallelClass: lsst.pex.harness.IOStage.OutputStageParallel eventTopic: None stagePolicy: { parameters: { butler: @PT1Pipe/butlerUpdate.paf outputItems: { sdqaRatingVector0: { datasetType: sdqaCcd datasetId: { fromJobIdentity: "visit" "raft" "sensor" set: { snap: 0 } } } sdqaRatingVector1: { datasetType: sdqaCcd datasetId: { fromJobIdentity: "visit" "raft" "sensor" set: { snap: 1 } } } } } } }""" print >>f, """ appStage: { name: ccdAssemblyFixup parallelClass: lsst.datarel.FixupStageParallel eventTopic: None stagePolicy: { inputKeys: { isrCcdExposure0: isrExposure0 isrCcdExposure1: isrExposure1 } parameters: { pipeline: CcdAssembly } outputKeys: { isrCcdExposure0: isrCcdExposure0 isrCcdExposure1: isrCcdExposure1 } } }""" | 303dfdf62e16f4c3c6657c8635b2192f2d5ed3f4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6538/303dfdf62e16f4c3c6657c8635b2192f2d5ed3f4/createImSimPipe.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
276,
4315,
24368,
2227,
12,
74,
4672,
364,
10915,
316,
261,
20,
16,
404,
4672,
1172,
1671,
74,
16,
3536,
595,
8755,
30,
288,
508,
30,
276,
4315,
24368,
39,
4315,
682,
8395,
397,
609,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
276,
4315,
24368,
2227,
12,
74,
4672,
364,
10915,
316,
261,
20,
16,
404,
4672,
1172,
1671,
74,
16,
3536,
595,
8755,
30,
288,
508,
30,
276,
4315,
24368,
39,
4315,
682,
8395,
397,
609,
... |
return self._bind(('bind', className), sequence, func, add) | return self._bind(('bind', className), sequence, func, add, 0) | def bind_class(self, className, sequence=None, func=None, add=None): return self._bind(('bind', className), sequence, func, add) | 48044b41c45fe4093db593d53822db0a1eb635ae /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/48044b41c45fe4093db593d53822db0a1eb635ae/Tkinter.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1993,
67,
1106,
12,
2890,
16,
2658,
16,
3102,
33,
7036,
16,
1326,
33,
7036,
16,
527,
33,
7036,
4672,
327,
365,
6315,
4376,
12,
2668,
4376,
2187,
2658,
3631,
3102,
16,
1326,
16,
527,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1993,
67,
1106,
12,
2890,
16,
2658,
16,
3102,
33,
7036,
16,
1326,
33,
7036,
16,
527,
33,
7036,
4672,
327,
365,
6315,
4376,
12,
2668,
4376,
2187,
2658,
3631,
3102,
16,
1326,
16,
527,
... |
('Aiuto', None, '_Aiuto', None, 'Aiuto...', 'aiuto_apri'), | ('Help', None, '_Aiuto', None, 'Aiuto...', 'aiuto_apri'), | def create_menu(self): w = [ ('Acquario', None, '_Acquario'), ('Calcoli', None, '_Calcoli', '<control>C', 'Calcoli...', 'calcoli_apri'), ('Vasche', None, '_Vasche', '<control>V', 'Vasche...', 'vasca_apri'), ('Test', None, '_Test', '<control>T', 'Test', 'test_apri'), ('Pesci', None, '_Pesci', '<control>P', 'Pesci...', 'pesci_apri'), ('Piante', None, '_Piante', '<control>I', 'Piante...', 'piante_apri'), ('Database', None, '_Database', '<control>D', 'Database...'), ('Quit', gtk.STOCK_QUIT, '_Quit', None, 'Esci da Py-Acqua', 'exit'), ('Impostazioni', None, '_Impostazioni'), #('Grafico', None, '_Grafico', None, 'Grafico...'), ('Tips Tricks', None, '_Tips Tricks', None, 'Tips and Tricks...', 'tips_apri'), ('Fertilizzante', None, '_Fertilizzante', None, 'fertilizzante...', 'fertilizzante_apri'), ('Filtro', None, '_Filtro', None, 'filtro...', 'filtro_apri'), ('Calendario', None, '_Calendario', None, 'Calendario...', 'calendario_apri'), ('Inserisci', None, '_Inserisci', None, 'Inserisci...', 'inserisci_apri'), ('Allarmi', None, '_Allarmi', None, 'Allarmi...', 'allarmi_apri'), ('Aiuto', None, '_Aiuto'), ('Info', gtk.STOCK_ABOUT,'_Informazioni',None, 'Riguardo Py-Acqua', 'informazioni_apri'), ('Aiuto', None, '_Aiuto', None, 'Aiuto...', 'aiuto_apri'), ] ui = """<ui> <menubar name='Menubar'> <menu action='Acquario'> <menuitem action='Calcoli'/> <menuitem action='Vasche'/> <menuitem action='Test'/> <menuitem action='Pesci'/> <menuitem action='Piante'/> <menuitem action='Database'/> <separator/> <menuitem action='Quit'/> </menu> <menu action='Impostazioni'> <menuitem action='Tips Tricks'/> <menuitem action='Fertilizzante'/> <menuitem action='Filtro'/> <menuitem action='Calendario'/> <menuitem action='Inserisci'/> <menuitem action='Allarmi'/> </menu> <menu name='AboutMenu' action='Aiuto'> <menuitem action='Info'/> <menuitem action='Aiuto'/> </menu> </menubar></ui>""" ag = gtk.ActionGroup('WindowActions') actions = fix_actions(w, self) # Aggiungiamo le varie azioni.. (vedi # gtk.ActionGroup.add_actions) ag.add_actions(actions) self.ui = gtk.UIManager() self.ui.insert_action_group(ag, 0) self.ui.add_ui_from_string(ui) self.add_accel_group(self.ui.get_accel_group()) self.ui.get_widget('/Menubar/AboutMenu').set_right_justified(True) | 98364a9b1d1eacaf7227501cc8025b716126133c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2406/98364a9b1d1eacaf7227501cc8025b716126133c/gui.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
67,
5414,
12,
2890,
4672,
341,
273,
306,
7707,
9988,
372,
25124,
2187,
599,
16,
2070,
9988,
372,
25124,
19899,
7707,
3005,
1293,
77,
2187,
202,
7036,
16,
202,
202,
11,
67,
3005,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
67,
5414,
12,
2890,
4672,
341,
273,
306,
7707,
9988,
372,
25124,
2187,
599,
16,
2070,
9988,
372,
25124,
19899,
7707,
3005,
1293,
77,
2187,
202,
7036,
16,
202,
202,
11,
67,
3005,
1... |
y = scipy.stats.stdev(LITTLE) | y = scipy.stats.std(LITTLE) | def check_stdLITTLE(self): y = scipy.stats.stdev(LITTLE) assert_approx_equal(y,2.738612788e-8) | 0d3c2bdf977aa7a5fa412dd330df792dac70eeac /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/0d3c2bdf977aa7a5fa412dd330df792dac70eeac/test_stats.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
67,
5084,
15716,
56,
900,
12,
2890,
4672,
677,
273,
10966,
18,
5296,
18,
5084,
12,
15716,
56,
900,
13,
1815,
67,
26742,
67,
9729,
12,
93,
16,
22,
18,
9036,
5292,
14260,
5482,
73... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
866,
67,
5084,
15716,
56,
900,
12,
2890,
4672,
677,
273,
10966,
18,
5296,
18,
5084,
12,
15716,
56,
900,
13,
1815,
67,
26742,
67,
9729,
12,
93,
16,
22,
18,
9036,
5292,
14260,
5482,
73... |
species_map={'O':1, 'Si':2}, cel_angstrom=False, pos_angstrom=False): self.pos = pos self.cel = cel self.force = force self.energy = energy self.stress = stress | species_map={'O':1, 'Si':2}, cel_angstrom=False, pos_angstrom=False, rydberg=True): | def __init__(self, basename=None, pos='pos.in', cel='cel.in', force='force.in', energy='energy.in', stress='stress.in', step_name='', species_map={'O':1, 'Si':2}, cel_angstrom=False, pos_angstrom=False): self.pos = pos self.cel = cel self.force = force self.energy = energy self.stress = stress if basename is not None: basename = os.path.splitext(basename)[0] pos = '%s.pos' % basename cel = '%s.cel' % basename energy = '%s.ene' % basename stress = '%s.str' % basename self.step_name = step_name self.species_map = species_map self.cel_angstrom = cel_angstom self.pos_angstrom = pos_angstrom self.it = 0 | aa058d12f01c015ff4496d1d7d2c6865e46f4066 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8914/aa058d12f01c015ff4496d1d7d2c6865e46f4066/sio2.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
4882,
33,
7036,
16,
949,
2218,
917,
18,
267,
2187,
25357,
2218,
2183,
18,
267,
2187,
2944,
2218,
5734,
18,
267,
2187,
12929,
2218,
15358,
18,
267,
2187,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
4882,
33,
7036,
16,
949,
2218,
917,
18,
267,
2187,
25357,
2218,
2183,
18,
267,
2187,
2944,
2218,
5734,
18,
267,
2187,
12929,
2218,
15358,
18,
267,
2187,
... |
def found_terminator (self): | if DEBUG: def push(self, data): log(">>", repr(data)) asynchat.async_chat.push(self, data) def found_terminator(self): | def found_terminator (self): """ This method is called by asynchronous engine when it finds command terminator in the input stream """ # Take the complete line line = self.data | ce2710566fb00079a9c5574c6244943702ea0800 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8076/ce2710566fb00079a9c5574c6244943702ea0800/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
309,
6369,
30,
1652,
1817,
12,
2890,
16,
501,
4672,
613,
2932,
34,
2984,
16,
8480,
12,
892,
3719,
487,
2515,
270,
18,
3810,
67,
10880,
18,
6206,
12,
2890,
16,
501,
13,
282,
1652,
1392,
67,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
309,
6369,
30,
1652,
1817,
12,
2890,
16,
501,
4672,
613,
2932,
34,
2984,
16,
8480,
12,
892,
3719,
487,
2515,
270,
18,
3810,
67,
10880,
18,
6206,
12,
2890,
16,
501,
13,
282,
1652,
1392,
67,... |
break | return | def read_from_server(server_address): while (True): # if this server is not connected break try: this_server = server[server_address] except KeyError: print "stopping read thread server: "+server_address break frame = NATFrame() # read from the socket try: frame.initFromSocket(this_server['socket']) except Exception, e: if ("socket" not in str(type(e))) and "Socket" not in str(e) and ("Header" not in str(e)): raise if "socket" in str(e): print "Socket Error reading from server: "+server_address elif "Header" in str(e): print "Header Size Error reading from server: "+server_address drop_server(server_address) break if TRACE: print "server sent: "+frame.toString() client_address = frame.frameMACAddress client_connected = True try: this_client = client[client_address][server_address] except KeyError: print "Client: "+client_address+" requested by server: "+server_address+" is not connected" client_connected = False # is the client connected to this server? if client_connected: # is this a data frame if frame.frameMesgType == DATA_FORWARD and frame.frameContentLength != 0: buffer = this_client['to_client_buff'] buffer.append(frame.frameContent) # is this a CONN_TERM frame elif frame.frameMesgType == CONN_TERM: print "Server terminated connection between:\n\tServer: "+server_address+"\n\tClient: "+client_address drop_client(client_address,server_address) # is this a CONN_BUFF_SIZE message elif frame.frameMesgType == CONN_BUF_SIZE: this_client['buff_size_lock'].acquire() this_client['server_buff_size'] = int(frame.frameContent) this_client['buff_size_lock'].release() sleep(SAMPLE_TIME) | 1e267b4ee87b89ef2ed59bca32de64d9bb119be5 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7995/1e267b4ee87b89ef2ed59bca32de64d9bb119be5/forwarder.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
67,
2080,
67,
3567,
12,
3567,
67,
2867,
4672,
1323,
261,
5510,
4672,
225,
468,
309,
333,
1438,
353,
486,
5840,
327,
775,
30,
333,
67,
3567,
273,
1438,
63,
3567,
67,
2867,
65,
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,
855,
67,
2080,
67,
3567,
12,
3567,
67,
2867,
4672,
1323,
261,
5510,
4672,
225,
468,
309,
333,
1438,
353,
486,
5840,
327,
775,
30,
333,
67,
3567,
273,
1438,
63,
3567,
67,
2867,
65,
13... |
security.declareProtected(view, 'checkPermissionParticipateInMeeting') | def saveProperties(self, REQUEST=None, **kwargs): """ """ if not self.checkPermissionEditObject(): raise EXCEPTION_NOTAUTHORIZED, EXCEPTION_NOTAUTHORIZED_MSG | 8ef4364c572e84fa3c4af32b7b1ba2f42e335fa3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3287/8ef4364c572e84fa3c4af32b7b1ba2f42e335fa3/meeting.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1923,
2297,
12,
2890,
16,
12492,
33,
7036,
16,
2826,
4333,
4672,
3536,
3536,
309,
486,
365,
18,
1893,
5041,
4666,
921,
13332,
1002,
23136,
67,
4400,
28383,
16,
23136,
67,
4400,
28383,
67... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1923,
2297,
12,
2890,
16,
12492,
33,
7036,
16,
2826,
4333,
4672,
3536,
3536,
309,
486,
365,
18,
1893,
5041,
4666,
921,
13332,
1002,
23136,
67,
4400,
28383,
16,
23136,
67,
4400,
28383,
67... | |
path = os.path.expanduser("~/.config/Contacts") filename = os.path.join(path, unescape(self.vcard.fn.value) + ".vcf") | filename = os.path.join(self.new_parent.contact_dir, unescape(self.vcard.fn.value) + ".vcf") | def save(self): new_vcard = vobject.vCard() new_vcard.add("prodid").value = "Arkadas 1.0" if has_child(self.vcard, "uid"): new_vcard.add("uid").value = uuid() | 83a200d579bb831f8f76d2d58f83b385981056c5 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2651/83a200d579bb831f8f76d2d58f83b385981056c5/arkadas.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1923,
12,
2890,
4672,
394,
67,
90,
3327,
273,
331,
1612,
18,
90,
6415,
1435,
394,
67,
90,
3327,
18,
1289,
2932,
685,
14044,
20387,
1132,
273,
315,
686,
79,
361,
345,
404,
18,
20,
6,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1923,
12,
2890,
4672,
394,
67,
90,
3327,
273,
331,
1612,
18,
90,
6415,
1435,
394,
67,
90,
3327,
18,
1289,
2932,
685,
14044,
20387,
1132,
273,
315,
686,
79,
361,
345,
404,
18,
20,
6,
... |
if self.debug: environ['wsgi.errors'].write( '=> paste.errordocuments: -> %r\n'%url[0][0] ) | def change_response(status, headers, exc_info=None): status_code = status.split(' ') try: code = int(status_code[0]) except ValueError, TypeError: raise Exception( 'StatusBasedForward middleware ' 'received an invalid status code %s'%repr(status_code[0]) ) message = ' '.join(status_code[1:]) new_url = self.mapper( code, message, environ, self.global_conf, **self.params ) if not (new_url == None or isinstance(new_url, str)): raise TypeError( 'Expected the url to internally ' 'redirect to in the StatusBasedForward mapper' 'to be a string or None, not %s'%repr(new_url) ) if new_url: url.append([new_url, status]) else: return start_response(status, headers, exc_info) | 2476741eff1920c9216c32de8b4c82867f573da9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2097/2476741eff1920c9216c32de8b4c82867f573da9/errordocument.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2549,
67,
2740,
12,
2327,
16,
1607,
16,
3533,
67,
1376,
33,
7036,
4672,
225,
1267,
67,
710,
273,
1267,
18,
4939,
2668,
8624,
775,
30,
981,
273,
509,
12,
2327,
67,
710,
63,
20,
5717,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2549,
67,
2740,
12,
2327,
16,
1607,
16,
3533,
67,
1376,
33,
7036,
4672,
225,
1267,
67,
710,
273,
1267,
18,
4939,
2668,
8624,
775,
30,
981,
273,
509,
12,
2327,
67,
710,
63,
20,
5717,
... | |
pickle -- the pickle to explain, as a string (default: None) file -- a filename of a pickle (default: None) compress -- if False, don't attempt to decompress the pickle | - ``pickle`` -- the pickle to explain, as a string (default: None) - ``file`` -- a filename of a pickle (default: None) - ``compress`` -- if False, don't attempt to decompress the pickle | def explain_pickle(pickle=None, file=None, compress=True, **kwargs): r""" Explain a pickle. (That is, produce source code such that evaluating the code is equivalent to loading the pickle.) Feeding the result of explain_pickle to sage_eval should be totally equivalent to loading the pickle with cPickle. INPUTS: pickle -- the pickle to explain, as a string (default: None) file -- a filename of a pickle (default: None) compress -- if False, don't attempt to decompress the pickle (default: True) in_current_sage -- if True, produce potentially simpler code that is tied to the current version of Sage. (default: False) default_assumptions -- if True, produce potentially simpler code that assumes that generic unpickling code will be used. This code may not actually work. (default: False) eval -- if True, then evaluate the resulting code and return the evaluated result. (default: False) preparse -- if True, then produce code to be evaluated with Sage's preparser; if False, then produce standard Python code; if None, then produce code that will work either with or without the preparser. (default: True) pedantic -- if True, then carefully ensures that the result has at least as much sharing as the result of cPickle (it may have more, for immutable objects). (default: False) Exactly one of pickle (a string containing a pickle) or file (the filename of a pickle) must be provided. EXAMPLES: sage: explain_pickle(dumps({('a', 'b'): [1r, 2r]})) {('a', 'b'):[1r, 2r]} sage: explain_pickle(dumps(RR(pi)), in_current_sage=True) from sage.rings.real_mpfr import __create__RealNumber_version0 from sage.rings.real_mpfr import __create__RealField_version0 __create__RealNumber_version0(__create__RealField_version0(53r, False, 'RNDN'), '3.4gvml245kc0@0', 32r) sage: s = 'hi' sage: explain_pickle(dumps((s, s))) ('hi', 'hi') sage: explain_pickle(dumps((s, s)), pedantic=True) si = 'hi' (si, si) sage: explain_pickle(dumps(5r)) 5r sage: explain_pickle(dumps(5r), preparse=False) 5 sage: explain_pickle(dumps(5r), preparse=None) int(5) sage: explain_pickle(dumps(22/7)) pg_make_rational = unpickle_global('sage.rings.rational', 'make_rational') pg_make_rational('m/7') sage: explain_pickle(dumps(22/7), in_current_sage=True) from sage.rings.rational import make_rational make_rational('m/7') sage: explain_pickle(dumps(22/7), default_assumptions=True) from sage.rings.rational import make_rational make_rational('m/7') """ if pickle is not None: p = pickle elif file is not None: p = open(file).read() else: raise ValueError, "Either pickle or file must be specified" if compress: try: p = comp.decompress(p) except Exception, msg1: try: p = comp_other.decompress(p) except Exception, msg2: # Maybe data is uncompressed? pass return explain_pickle_string(p, **kwargs) | 3bed29c45c1270055cd235e22fd02f632971b39e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/3bed29c45c1270055cd235e22fd02f632971b39e/explain_pickle.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
19765,
67,
20847,
12,
20847,
33,
7036,
16,
585,
33,
7036,
16,
8099,
33,
5510,
16,
2826,
4333,
4672,
436,
8395,
1312,
7446,
279,
13379,
18,
225,
261,
18163,
353,
16,
11402,
1084,
981,
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,
19765,
67,
20847,
12,
20847,
33,
7036,
16,
585,
33,
7036,
16,
8099,
33,
5510,
16,
2826,
4333,
4672,
436,
8395,
1312,
7446,
279,
13379,
18,
225,
261,
18163,
353,
16,
11402,
1084,
981,
4... |
def render_wireframe(self): | def render_wireframe(self, rgbcolor = (0,0,1)): | def render_wireframe(self): """ For polytopes in 2 or 3 dimensions, returns the edges as a list of lines. | 352c4b2bdc8922987d0ba54010741ec804088e5f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/352c4b2bdc8922987d0ba54010741ec804088e5f/polyhedra.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1743,
67,
14538,
3789,
12,
2890,
16,
6917,
3266,
273,
261,
20,
16,
20,
16,
21,
3719,
30,
3536,
2457,
7573,
3669,
281,
316,
576,
578,
890,
5769,
16,
1135,
326,
5231,
487,
279,
666,
43... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1743,
67,
14538,
3789,
12,
2890,
16,
6917,
3266,
273,
261,
20,
16,
20,
16,
21,
3719,
30,
3536,
2457,
7573,
3669,
281,
316,
576,
578,
890,
5769,
16,
1135,
326,
5231,
487,
279,
666,
43... |
data = pyqtProperty(Preprocessor_featureSelection, | data = _pyqtProperty(Preprocessor_featureSelection, | def getFeatureSelection(self): return Preprocessor_featureSelection(measure=self.MEASURES[self.measureInd][1], filter=self.FILTERS[self.selectBy], limit=self.bestP if self.selectBy else self.bestN) | e07f8cc72f7b3b07eca503cffe3f1edeef0a5948 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6366/e07f8cc72f7b3b07eca503cffe3f1edeef0a5948/OWPreprocess.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
17961,
6233,
12,
2890,
4672,
327,
2962,
8700,
67,
7238,
6233,
12,
10772,
33,
2890,
18,
28964,
55,
63,
2890,
18,
10772,
3866,
6362,
21,
6487,
1034,
33,
2890,
18,
11126,
55,
63,
2890,
18... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
17961,
6233,
12,
2890,
4672,
327,
2962,
8700,
67,
7238,
6233,
12,
10772,
33,
2890,
18,
28964,
55,
63,
2890,
18,
10772,
3866,
6362,
21,
6487,
1034,
33,
2890,
18,
11126,
55,
63,
2890,
18... |
set([2, 3, 4, 37, 8, 342, 11, 14, 816, 52, 21, 406, 93]) | set([2, 3, 4, 37, 406, 8, 11, 14, 816, 52, 21, 342, 93]) | def integral_points(self, mw_base='auto', both_signs=False, verbose=False): """ Computes all integral points (up to sign) on this elliptic curve. | aaebf313d910a24c25d5a21ddc8c2c225c85c319 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/aaebf313d910a24c25d5a21ddc8c2c225c85c319/ell_rational_field.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
21423,
67,
4139,
12,
2890,
16,
14721,
67,
1969,
2218,
6079,
2187,
3937,
67,
2977,
87,
33,
8381,
16,
3988,
33,
8381,
4672,
3536,
14169,
281,
777,
21423,
3143,
261,
416,
358,
1573,
13,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
21423,
67,
4139,
12,
2890,
16,
14721,
67,
1969,
2218,
6079,
2187,
3937,
67,
2977,
87,
33,
8381,
16,
3988,
33,
8381,
4672,
3536,
14169,
281,
777,
21423,
3143,
261,
416,
358,
1573,
13,
6... |
Must be called before parseString when the input grammar contains elements that | Must be called before parseString when the input grammar contains elements that | def parseWithTabs( self ): """Overrides default behavior to expand <TAB>s to spaces before parsing the input string. Must be called before parseString when the input grammar contains elements that match <TAB> characters.""" self.keepTabs = True return self | f734f22ba11a967624c3b1351b79174f1d17c2ac /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3554/f734f22ba11a967624c3b1351b79174f1d17c2ac/pyparsing.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
1190,
17348,
12,
365,
262,
30,
3536,
13084,
805,
6885,
358,
4542,
411,
28899,
34,
87,
358,
7292,
1865,
5811,
326,
810,
533,
18,
6753,
506,
2566,
1865,
23659,
1347,
326,
810,
6473,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
1190,
17348,
12,
365,
262,
30,
3536,
13084,
805,
6885,
358,
4542,
411,
28899,
34,
87,
358,
7292,
1865,
5811,
326,
810,
533,
18,
6753,
506,
2566,
1865,
23659,
1347,
326,
810,
6473,
... |
CreateControl(False, readOnly, parentWidget, id, parentBlock, font) | CreateControl(False, True, parentWidget, id, parentBlock, font) | def CreateControl(self, forEditing, readOnly, parentWidget, id, parentBlock, font): return super(StaticStringAttributeEditor, self).\ CreateControl(False, readOnly, parentWidget, id, parentBlock, font) | 7ba47930d43298aa76a00d48d3b970b296e46fb1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/7ba47930d43298aa76a00d48d3b970b296e46fb1/AttributeEditors.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1788,
3367,
12,
2890,
16,
364,
28029,
16,
15075,
16,
982,
4609,
16,
612,
16,
982,
1768,
16,
3512,
4672,
327,
2240,
12,
5788,
780,
1499,
6946,
16,
365,
2934,
64,
1788,
3367,
12,
8381,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1788,
3367,
12,
2890,
16,
364,
28029,
16,
15075,
16,
982,
4609,
16,
612,
16,
982,
1768,
16,
3512,
4672,
327,
2240,
12,
5788,
780,
1499,
6946,
16,
365,
2934,
64,
1788,
3367,
12,
8381,
... |
label = config.get("medium_label") partsel = config.get("medium_search") if partsel == "nodevice": partsel = "" elif partsel == "device": partsel = "partition" format = not command.uiask(":noformat.active") self.mediumbuilder.make(btype, device, label, partsel, format, command.uiask(":larchboot.active")) | label = config.get("medium_label") partsel = config.get("medium_search") if partsel == "nodevice": partsel = "" elif partsel == "device": partsel = "partition" format = not command.uiask(":noformat.active") larchboot = command.uiask(":larchboot.active") self.mediumbuilder.make(btype, device, label, partsel, format, larchboot) | def makedevice(self): iso = config.get("medium_iso") != "" | 77998e6c89d33de0ee8e438e96e158d8ddcbbe18 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3177/77998e6c89d33de0ee8e438e96e158d8ddcbbe18/mediumpage.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1221,
5964,
12,
2890,
4672,
8702,
273,
642,
18,
588,
2932,
19011,
67,
9699,
7923,
480,
1408,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1221,
5964,
12,
2890,
4672,
8702,
273,
642,
18,
588,
2932,
19011,
67,
9699,
7923,
480,
1408,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
if not self.tabnanny(filename): return | def run_module_event(self, event): """Run the module after setting up the environment. | 82522fd1a23bf57b7f9de4560fca2a4714bc5143 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/82522fd1a23bf57b7f9de4560fca2a4714bc5143/ScriptBinding.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
67,
2978,
67,
2575,
12,
2890,
16,
871,
4672,
3536,
1997,
326,
1605,
1839,
3637,
731,
326,
3330,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
67,
2978,
67,
2575,
12,
2890,
16,
871,
4672,
3536,
1997,
326,
1605,
1839,
3637,
731,
326,
3330,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... | |
sizer_flow.Add(10, 10, 1, wxEXPAND, 0) | def __do_layout(self): # begin wxGlade: SerialConfigDialog.__do_layout # end wxGlade sizer_2 = wxBoxSizer(wxVERTICAL) sizer_3 = wxBoxSizer(wxHORIZONTAL) sizer_basics = wxStaticBoxSizer(wxStaticBox(self, -1, "Basics"), wxVERTICAL) sizer_5 = wxBoxSizer(wxHORIZONTAL) sizer_5.Add(self.label_2, 1, wxALL|wxALIGN_CENTER_VERTICAL, 4) sizer_5.Add(self.combo_box_port, 1, 0, 0) sizer_basics.Add(sizer_5, 0, wxRIGHT|wxEXPAND, 0) if self.show & SHOW_BAUDRATE: sizer_baudrate = wxBoxSizer(wxHORIZONTAL) sizer_baudrate.Add(self.label_1, 1, wxALL|wxALIGN_CENTER_VERTICAL, 4) sizer_baudrate.Add(self.choice_baudrate, 1, wxALIGN_RIGHT, 0) sizer_basics.Add(sizer_baudrate, 0, wxEXPAND, 0) sizer_2.Add(sizer_basics, 0, wxEXPAND, 0) if self.show & SHOW_FORMAT: sizer_8 = wxBoxSizer(wxHORIZONTAL) sizer_7 = wxBoxSizer(wxHORIZONTAL) sizer_6 = wxBoxSizer(wxHORIZONTAL) sizer_format = wxStaticBoxSizer(wxStaticBox(self, -1, "Data Format"), wxVERTICAL) sizer_6.Add(self.label_3, 1, wxALL|wxALIGN_CENTER_VERTICAL, 4) sizer_6.Add(self.choice_databits, 1, wxALIGN_RIGHT, 0) sizer_format.Add(sizer_6, 0, wxEXPAND, 0) sizer_7.Add(self.label_4, 1, wxALL|wxALIGN_CENTER_VERTICAL, 4) sizer_7.Add(self.choice_stopbits, 1, wxALIGN_RIGHT, 0) sizer_format.Add(sizer_7, 0, wxEXPAND, 0) sizer_8.Add(self.label_5, 1, wxALL|wxALIGN_CENTER_VERTICAL, 4) sizer_8.Add(self.choice_parity, 1, wxALIGN_RIGHT, 0) sizer_format.Add(sizer_8, 0, wxEXPAND, 0) sizer_2.Add(sizer_format, 0, wxEXPAND, 0) if self.show & SHOW_TIMEOUT: sizer_timeout = wxStaticBoxSizer(wxStaticBox(self, -1, "Timeout"), wxHORIZONTAL) sizer_timeout.Add(self.checkbox_timeout, 0, wxALL|wxALIGN_CENTER_VERTICAL, 4) sizer_timeout.Add(self.text_ctrl_timeout, 0, 0, 0) sizer_timeout.Add(self.label_6, 0, wxALL|wxALIGN_CENTER_VERTICAL, 4) sizer_2.Add(sizer_timeout, 0, 0, 0) if self.show & SHOW_FLOW: sizer_flow = wxStaticBoxSizer(wxStaticBox(self, -1, "Flow Control"), wxHORIZONTAL) sizer_flow.Add(self.checkbox_rtscts, 0, wxALL|wxALIGN_CENTER_VERTICAL, 4) sizer_flow.Add(self.checkbox_xonxoff, 0, wxALL|wxALIGN_CENTER_VERTICAL, 4) sizer_flow.Add(10, 10, 1, wxEXPAND, 0) sizer_2.Add(sizer_flow, 0, wxEXPAND, 0) sizer_3.Add(self.button_ok, 0, 0, 0) sizer_3.Add(self.button_cancel, 0, 0, 0) sizer_2.Add(sizer_3, 0, wxALL|wxALIGN_RIGHT, 4) self.SetAutoLayout(1) self.SetSizer(sizer_2) sizer_2.Fit(self) sizer_2.SetSizeHints(self) self.Layout() | 5fad5ad84821f4f4663c749bd7ada085af0a808c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10955/5fad5ad84821f4f4663c749bd7ada085af0a808c/wxSerialConfigDialog.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2896,
67,
6741,
12,
2890,
4672,
468,
2376,
7075,
21308,
2486,
30,
7366,
809,
6353,
16186,
2896,
67,
6741,
468,
679,
7075,
21308,
2486,
272,
1824,
67,
22,
273,
7075,
3514,
20512,
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,
1001,
2896,
67,
6741,
12,
2890,
4672,
468,
2376,
7075,
21308,
2486,
30,
7366,
809,
6353,
16186,
2896,
67,
6741,
468,
679,
7075,
21308,
2486,
272,
1824,
67,
22,
273,
7075,
3514,
20512,
12... | |
sys.exit('%r doesn\'t seem to be a Subversion working copy') | sys.exit('%r doesn\'t seem to be a Subversion working copy' % opts.target_dir) | def do_export(self, subcmd, opts, *args): """${cmd_name}: export the mirror list as text file | 60c0965429edee712e1311e05ec40b5375fb8230 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10990/60c0965429edee712e1311e05ec40b5375fb8230/mirrordoctor.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
67,
6530,
12,
2890,
16,
720,
4172,
16,
1500,
16,
380,
1968,
4672,
3536,
18498,
4172,
67,
529,
6713,
3359,
326,
15593,
666,
487,
977,
585,
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,
741,
67,
6530,
12,
2890,
16,
720,
4172,
16,
1500,
16,
380,
1968,
4672,
3536,
18498,
4172,
67,
529,
6713,
3359,
326,
15593,
666,
487,
977,
585,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
if trip.has_key('return_transport_type'): | if trip.has_key('outgoing_transport_type'): | def build_stats(trip_list, type, statyear=False): # TODO break this apart and/or do similar things in subroutines # TODO build more year metadata # TODO don't do as much work for front page # TODO cache? stats = {'countries': {}, 'cities': {}, 'years': {}, 'months': {}, 'home': { 'trips': 0, 'duration':0, }, 'away': { 'trips': 0, 'duration':0, }, 'future': 0, 'types': {}, 'ordered': {}, 'trips': 0, } if not trip_list: return stats for trip in trip_list: # skip if not a past trip if trip['status'] != "Past": if trip['status'] == "Ongoing": stats['current'] = trip['city']['name'] else: stats['future'] += 1 continue if statyear and trip['startdate'].year != int(statyear): stats['years'][trip['startdate'].year] = { 'duration': 0, 'trips': 0, 'away':{}, 'home':{}, } continue # else: # logging.info(" + count this trip") stats['trips'] += 1 # how long (simple version...) # TODO never double count date duration = trip['finishdate'] - trip['startdate'] trip['duration'] = duration.days # build country data country = trip['city']['country'] display = country inline = country # special casing! if not country.find("United"): # TODO there's something wrong here... inline = "the "+country # TODO and this should be a hash anyway if not country.find("Hong Kong"): display = "Hong Kong" inline = "Hong Kong" # stuff info into the data structure if not country in stats['countries']: stats['countries'][country] = { 'duration': 0, 'trips': 0, 'display':display, 'inline':inline, 'code':trip['city']['country_code'], 'rgb':md5.new(country).hexdigest()[0:6]} stats['countries'][country]['duration'] += duration.days stats['countries'][country]['trips'] += 1 if type != "front": if trip.has_key('return_transport_type'): # TODO remove if not trip['return_transport_type'] in stats['types']: stats['types'][trip['return_transport_type']] = {'trips':0, 'journeys':0, } stats['types'][trip['return_transport_type']]['trips'] += 0.5 if trip.has_key('return_transport_type'): # TODO remove if not trip['outgoing_transport_type'] in stats['types']: stats['types'][trip['outgoing_transport_type']] = {'trips':0, 'journeys':0, } stats['types'][trip['outgoing_transport_type']]['trips'] += 0.5 # if (country == home_country): # stats['home']['trips'] += 1; # stats['home']['duration'] += duration.days # else: # stats['away']['trips'] += 1; # stats['away']['duration'] += duration.days # build city data city = trip['city']['name'] rgb = trip['city']['rgb'] if not city in stats['cities']: stats['cities'][city] = { 'duration': 0, 'trips': 0, 'dist_to':0, 'dist_from':0, 'rgb':rgb, 'country':country, 'id':trip['city']['woeid'], 'trip_list': [], 'code':trip['city']['country_code'] } stats['cities'][city]['duration'] += duration.days stats['cities'][city]['trips'] += 1 if type != "front": stats['cities'][city]['trip_list'].append(trip) # build year data year = trip['startdate'].year # initialise data structure's if not year in stats['years']: stats['years'][year] = { 'duration': 0, 'trips': 0, 'away':{}, 'home':{}, 'distance': 0, } if year == trip['finishdate'].year: stats['years'][year]['duration'] += duration.days stats['years'][year]['trips'] += 1 if type == "detail": stats['years'][year]['distance'] += (trip['distance']['out']+trip['distance']['return']) else: if trip['finishdate'].year - year == 1: # spans a single year boundary, and is therefore Sane # if there's *anyone* who has a trip spanning two, they can bloody # well write this themselves. Otherwise, assume they mean they're # living there now. Onwards... year_end = datetime(year, 12, 31) stats['years'][year]['duration'] += (year_end-trip['startdate']).days stats['years'][year]['trips'] += 1 if type == "detail": stats['years'][year]['distance'] += trip['distance']['out'] # redefine year from year-start to year-end year = trip['finishdate'].year year_start = datetime(year, 1, 1) if not year in stats['years']: stats['years'][year] = { 'duration': 0, 'trips': 0, 'away':{}, 'home':{}, 'distance': 0, } # for now we don't count trips in both years. change? # we do count trip days and distance in the end year stats['years'][year]['duration'] += (trip['finishdate']-year_start).days if type == "detail": stats['years'][year]['distance'] += trip['distance']['return'] if type != "front": # do we care about finish months? month = trip['startdate'].month if not stats['months'].has_key(month): stats['months'][month] = {'trips':0, 'duration':0, 'cities':[]} stats['months'][month]['trips'] += 1 stats['months'][month]['duration'] += duration.days stats['months'][month]['cities'].append(trip) # do we want to supply full-blown cross-cut stats? maybe later... # END TRIP LOOP # reorder final stats stats['ordered']['years'] = sorted(stats['years']) stats['ordered']['years'].reverse() stats['ordered']['types'] = sorted(stats['types'], lambda x, y: (int(stats['types'][y]['trips']))-(int(stats['types'][x]['trips']))) stats['ordered']['years_by_trip'] = sorted(stats['years'], lambda x, y: (stats['years'][y]['trips'])-(stats['years'][x]['trips'])) stats['ordered']['years_by_days'] = sorted(stats['years'], lambda x, y: (stats['years'][y]['duration'])-(stats['years'][x]['duration'])) if not statyear: stats['ordered']['years_by_dist'] = sorted(stats['years'], lambda x, y: (stats['years'][y]['distance'])-(stats['years'][x]['distance'])) stats['ordered']['countries'] = sorted(stats['countries'], lambda x, y: (stats['countries'][y]['duration'])-(stats['countries'][x]['duration'])) stats['ordered']['cities'] = sorted(stats['cities'], lambda x, y: (stats['cities'][y]['duration'])-(stats['cities'][x]['duration'])) if (statyear and not int(statyear) in stats['ordered']['years']): logging.info("no entries for year '%'" % statyear) return False; # colours if type != "front": rgb = stats['countries'][stats['ordered']['countries'][0]]['rgb'] raw = colors.hex('#'+rgb) saturated = raw.saturate(1); lightened = saturated.lighten(0.5); desaturated = lightened.desaturate(0.8); stats['rgb'] = hex_from(lightened) stats['rgb_start'] = hex_from(desaturated) # scale country stats for map (including colours) top_country = stats['ordered']['countries'][0] top_duration = stats['countries'][top_country]['duration'] r = stats['rgb'][0:2]; g = stats['rgb'][2:4]; b = stats['rgb'][4:6] for country in stats['countries'].keys(): scaled = 100*stats['countries'][country]['duration']/top_duration satscale = (float(100-scaled)/100)*0.8 satcolor = lightened.desaturate(satscale) # ligscale = (float(100-scaled)/100)*0.9 # ligcolor = saturated.lighten(ligscale) stats['countries'][country]['scaled'] = scaled stats['countries'][country]['rgb_scaled'] = hex_from(satcolor) # scale transport types if len(stats['types'].keys()): # TODO remove top_type = stats['ordered']['types'][0] top_trip = int(stats['types'][top_type]['trips']) for type in stats['types'].keys(): stats['types'][type]['scaled'] = 240*int(stats['types'][type]['trips'])/top_trip stats['types'][type]['journeys'] = int((stats['types'][type]['trips']*2)) # scale years top_year_by_days = stats['ordered']['years_by_days'][0] top_year_days = stats['years'][top_year_by_days]['duration'] if not statyear: top_year_by_dist = stats['ordered']['years_by_dist'][0] top_year_dist = stats['years'][top_year_by_dist]['distance'] # scale years (for front page too) top_year_by_trip = stats['ordered']['years_by_trip'][0] top_year_trips = stats['years'][top_year_by_trip]['trips'] if type != "front": # width per trip scaling for years trips_per_block = 1 while 90*trips_per_block/top_year_trips < 10: trips_per_block += 1 stats['top_year_trips'] = top_year_trips stats['trips_per_block'] = trips_per_block stats['block_width'] = 90*trips_per_block/top_year_trips for year in stats['years']: if year == top_year_by_days: # TODO do this in template (the data's there...) stats['away']['days'] = (stats['years'][top_year_by_days]['duration'])/3.66 stats['home']['days'] = (366-stats['years'][top_year_by_days]['duration'])/3.66 stats['years'][year]['away']['days'] = (stats['years'][top_year_by_days]['duration'])/3.66 stats['years'][year]['home']['days'] = (366-stats['years'][top_year_by_days]['duration'])/3.66 # raw scaling stats['years'][year]['duration_scaled'] = int(240*stats['years'][year]['duration']/top_year_days) stats['years'][year]['trips_scaled'] = int(240*stats['years'][year]['trips']/top_year_trips) if not statyear and type == 'detail': stats['years'][year]['dist_scaled'] = int(240*stats['years'][year]['distance']/top_year_dist) # block scaling stats['years'][year]['trips_blocks'] = float(stats['years'][year]['trips'])/stats['trips_per_block'] stats['years'][year]['trips_blocks_l'] = [True] * (stats['years'][year]['trips']/stats['trips_per_block']) stats['years'][year]['trips_blocks_r'] = int((stats['years'][year]['trips_blocks']-len(stats['years'][year]['trips_blocks_l']))*stats['block_width']) return stats | 1dc0a1565dbc8b50ddb12b506f8145f68074f64d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11110/1dc0a1565dbc8b50ddb12b506f8145f68074f64d/main.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1361,
67,
5296,
12,
25125,
67,
1098,
16,
618,
16,
610,
6874,
33,
8381,
4672,
468,
2660,
898,
333,
513,
485,
471,
19,
280,
741,
7281,
9198,
316,
720,
7028,
1465,
468,
2660,
1361,
1898,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1361,
67,
5296,
12,
25125,
67,
1098,
16,
618,
16,
610,
6874,
33,
8381,
4672,
468,
2660,
898,
333,
513,
485,
471,
19,
280,
741,
7281,
9198,
316,
720,
7028,
1465,
468,
2660,
1361,
1898,
... |
if not firstItem: res += ",\n" | if ('js_target' in c and len(c['js_target']) > 0): try: os.makedirs(c['js_target']) except OSError: pass shutil.copyfile('source/class/%s.js' % clazz.replace('.','/'), "%s/%s.src.js" % (c['js_target'],clazz)) | def main(dist, scan): res = "" structurize = False firstCategory = True for category in os.listdir(scan): if category in [".svn", ".DS_Store"]: continue ext = os.path.splitext(category)[1] if ext == ".html" or ext == ".js": continue if not firstCategory: res += "}," res += "{" res += "\"classname\":\""+category+"\",\"tests\":[\n" firstItem = True lastbasename = None for item in os.listdir(os.path.join(scan, category)): if item == ".svn": continue if os.path.splitext(item)[1] != ".html": continue title = item[:item.find(".")] if "_" in title: nr = title[title.find("_")+1:] basename = title[:title.find("_")] else: nr = 0 basename = title title = title.replace("_", " ") if structurize: if lastbasename != basename: firstItem = True if lastbasename != None: res += "\n]},\n" res += "{" res += "\"classname\":\""+basename+"\",\"desc\":\"Folder %s\",\"tests\":[\n" % basename if not firstItem: res += ",\n" res += '{\"nr\":"%s",\"title\":"%s",\"name\":"%s"}' % (nr, title, item) lastbasename = basename firstItem = False if structurize: if lastbasename != None: res += "\n]}\n" res += "\n]\n" firstCategory = False res += "}" distdir = os.path.dirname(dist) if not os.path.exists(distdir): os.makedirs(distdir) content = basic % res outputFile = codecs.open(dist, encoding="utf-8", mode="w", errors="replace") outputFile.write(content) outputFile.flush() outputFile.close() | a444ba5dd52fe79e230a6b635c98d2eb5f790204 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5718/a444ba5dd52fe79e230a6b635c98d2eb5f790204/genjson.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
12,
4413,
16,
4135,
4672,
400,
273,
1408,
1958,
295,
554,
273,
1083,
225,
1122,
4457,
273,
1053,
364,
3150,
316,
1140,
18,
1098,
1214,
12,
9871,
4672,
309,
3150,
316,
8247,
18,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
12,
4413,
16,
4135,
4672,
400,
273,
1408,
1958,
295,
554,
273,
1083,
225,
1122,
4457,
273,
1053,
364,
3150,
316,
1140,
18,
1098,
1214,
12,
9871,
4672,
309,
3150,
316,
8247,
18,
3... |
irq.name = match_obj.group(2) irq.fullname = "softirq-" + irq.name | irq.name = "%s-%s" % (match_obj.group(2),irq.process_id) irq.fullname = "softirq-%s" % match_obj.group(2) | def sortedDictValues(adict): items = adict.items() items.sort() return [value for key, value in items] | 555c0cf12d305b82bd76ac01b17e8bf212ffff79 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11526/555c0cf12d305b82bd76ac01b17e8bf212ffff79/listirqinfo.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3115,
5014,
1972,
12,
361,
933,
4672,
1516,
273,
1261,
933,
18,
3319,
1435,
1516,
18,
3804,
1435,
327,
306,
1132,
364,
498,
16,
460,
316,
1516,
65,
225,
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,
3115,
5014,
1972,
12,
361,
933,
4672,
1516,
273,
1261,
933,
18,
3319,
1435,
1516,
18,
3804,
1435,
327,
306,
1132,
364,
498,
16,
460,
316,
1516,
65,
225,
2,
-100,
-100,
-100,
-100,
-100... |
self.connections.append(connection) index = len(self.connections) if alias is not None and type(alias) in StringTypes: self.aliases[alias] = index return index | self._connections.append(connection) self.current_index = len(self._connections) if isinstance(alias, basestring): self._aliases[alias] = self.current_index return self.current_index | def register(self, connection, alias=None): """Registers given connection with optional alias and returns its index. Given connection is set to be the current connection. Alias must be a string. The index of the first connection after initialization or close_all or empty_cache is 1, second is 2, etc. """ self.current = connection self.connections.append(connection) index = len(self.connections) if alias is not None and type(alias) in StringTypes: self.aliases[alias] = index return index | 02a3ef9147675cde8422ffbe96a90d929365bddb /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6988/02a3ef9147675cde8422ffbe96a90d929365bddb/connectioncache.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1744,
12,
2890,
16,
1459,
16,
2308,
33,
7036,
4672,
3536,
10277,
864,
1459,
598,
3129,
2308,
471,
1135,
2097,
770,
18,
225,
16803,
1459,
353,
444,
358,
506,
326,
783,
1459,
18,
11873,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1744,
12,
2890,
16,
1459,
16,
2308,
33,
7036,
4672,
3536,
10277,
864,
1459,
598,
3129,
2308,
471,
1135,
2097,
770,
18,
225,
16803,
1459,
353,
444,
358,
506,
326,
783,
1459,
18,
11873,
... |
return S_OK({}) | return S_OK( {} ) | def getExtraConditions(self,site): """ Get extra conditions allowing site throttling """ # Find Site job limits grid,siteName,country = site.split('.') siteSection = '/Resources/Sites/%s/%s' % (grid,site) result = gConfig.getSections('%s/JobLimits' % siteSection) if not result['OK']: return result sections = result['Value'] limitDict = {} resultDict = {} if sections: for section in sections: result = gConfig.getOptionsDict('%s/JobLimits/%s' % (siteSection,section) ) if not result['OK']: return result optionDict = result['Value'] if optionDict: limitDict[section] = [] for k,v in optionDict.items(): limitDict[section].append((k,int(v))) if not limitDict: return S_OK({}) # Check if the site exceeding the given limits fields = limitDict.keys() for field in fields: for key,value in limitDict[field]: result = jobDB.getCounters('Jobs',['Status'],{'Site':site,field:key}) if not result['OK']: return result count = 0 if result['Value']: for countDict,number in result['Value']: if countDict['Status'] == "Running": count = number break if count > value: if not resultDict.has_key(field): resultDict[field] = [] resultDict[field].append(key) | 059c4744ef6766e0575a5cd4d6f09d892a66a7df /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/059c4744ef6766e0575a5cd4d6f09d892a66a7df/MatcherHandler.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
24973,
8545,
12,
2890,
16,
4256,
4672,
3536,
968,
2870,
4636,
15632,
2834,
30700,
3536,
468,
4163,
9063,
1719,
8181,
3068,
16,
4256,
461,
16,
9082,
273,
2834,
18,
4939,
2668,
1093,
13,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
24973,
8545,
12,
2890,
16,
4256,
4672,
3536,
968,
2870,
4636,
15632,
2834,
30700,
3536,
468,
4163,
9063,
1719,
8181,
3068,
16,
4256,
461,
16,
9082,
273,
2834,
18,
4939,
2668,
1093,
13,
2... |
current_move = self.copy(cr, uid, move.id, {'state': move.state}) | current_move = self.copy(cr, uid, move.id, {'state': move.state}) | def action_split(self, cr, uid, ids, quantity, split_by_qty=1, prefix=False, with_lot=True, context=None): ''' Split Stock Move lines into production lot which specified split by quantity. @ param cr: the database cursor @ param uid: the user id @ param ids: ids of stock move object to be splited @ param split_by_qty : specify split by qty @ param prefix : specify prefix of production lot @ param with_lot : if true, prodcution lot will assign for split line otherwise not. @ param context: context arguments | 18be8e52469417aa8e0ec02e033c0942d0ad805f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/18be8e52469417aa8e0ec02e033c0942d0ad805f/stock.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1301,
67,
4939,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
10457,
16,
1416,
67,
1637,
67,
85,
4098,
33,
21,
16,
1633,
33,
8381,
16,
598,
67,
23372,
33,
5510,
16,
819,
33,
7036,
46... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1301,
67,
4939,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
10457,
16,
1416,
67,
1637,
67,
85,
4098,
33,
21,
16,
1633,
33,
8381,
16,
598,
67,
23372,
33,
5510,
16,
819,
33,
7036,
46... |
def groupby(self): | def group_by(self): | def groupby(self): return Query(self.G) \ .groupby(lambda s: s[0]) \ .select(lambda (key, items): (key, items.tolist())) \ .todict() | f134b825431ac82f3dbba76e7a945a0e195d27cf /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14315/f134b825431ac82f3dbba76e7a945a0e195d27cf/pyquery.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1041,
67,
1637,
12,
2890,
4672,
327,
2770,
12,
2890,
18,
43,
13,
521,
263,
1655,
1637,
12,
14661,
272,
30,
272,
63,
20,
5717,
521,
263,
4025,
12,
14661,
261,
856,
16,
1516,
4672,
261... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1041,
67,
1637,
12,
2890,
4672,
327,
2770,
12,
2890,
18,
43,
13,
521,
263,
1655,
1637,
12,
14661,
272,
30,
272,
63,
20,
5717,
521,
263,
4025,
12,
14661,
261,
856,
16,
1516,
4672,
261... |
lapack_libs = self.get_libs('lapack_libs', ['lapack']) for d in lib_dirs: lapack = self.check_libs(d,lapack_libs,[]) if lapack is not None: info = lapack break else: return atlas_libs = self.get_libs('atlas_libs', ['f77blas', 'cblas', 'atlas']) | atlas_libs = self.get_libs('atlas_libs', ['lapack','f77blas', 'cblas', 'atlas']) | def calc_info(self): lib_dirs = self.get_lib_dirs() include_dirs = self.get_include_dirs() | 5e3b7826da1bb357993e68d8af77480fced1f4fb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14925/5e3b7826da1bb357993e68d8af77480fced1f4fb/system_info.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7029,
67,
1376,
12,
2890,
4672,
2561,
67,
8291,
273,
365,
18,
588,
67,
2941,
67,
8291,
1435,
2341,
67,
8291,
273,
365,
18,
588,
67,
6702,
67,
8291,
1435,
2,
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,
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,
7029,
67,
1376,
12,
2890,
4672,
2561,
67,
8291,
273,
365,
18,
588,
67,
2941,
67,
8291,
1435,
2341,
67,
8291,
273,
365,
18,
588,
67,
6702,
67,
8291,
1435,
2,
-100,
-100,
-100,
-100,
-... |
>>> map(k('::'), ('abc', kp('abc'))) | >>> map(k('{x}'), ('abc', kp('abc'))) | def __call__(self, *args): """call the k object | 887ebe3916a71237281e14989d294c41eb5cb0e5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/65/887ebe3916a71237281e14989d294c41eb5cb0e5/q.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1991,
972,
12,
2890,
16,
380,
1968,
4672,
3536,
1991,
326,
417,
733,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1991,
972,
12,
2890,
16,
380,
1968,
4672,
3536,
1991,
326,
417,
733,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
relations = RpmRelations(self.config, self.erases, OP_ERASE) order2 = relations.genOrder() if order2 == None: return None order2.reverse() order.extend(order2) | if len(self.erases) == 1: order.extend(self.erases) else: relations = RpmRelations(self.config, self.erases, OP_ERASE) order2 = relations.genOrder() if order2 == None: return None order2.reverse() order.extend(order2) | def genOrder(self): """Return an ordered list of RpmPackage's, first installs, then erases. | 71efa249ff5aea27b24aa609a6dea3b07bf3af0c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1143/71efa249ff5aea27b24aa609a6dea3b07bf3af0c/orderer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3157,
2448,
12,
2890,
4672,
3536,
990,
392,
5901,
666,
434,
534,
7755,
2261,
1807,
16,
1122,
31011,
16,
1508,
6445,
3304,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3157,
2448,
12,
2890,
4672,
3536,
990,
392,
5901,
666,
434,
534,
7755,
2261,
1807,
16,
1122,
31011,
16,
1508,
6445,
3304,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
self.listc.ClearAll() | self.listc.DeleteAllItems() | def ClearAll(self, event): items = self.events.items() for it in items: idx = it[0] ev = it[1] del self.events[idx] ev.delete() self.listc.ClearAll() self.numevents = 0 return | a36af21f2774b7126c51763d64fc394bb3c9707a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3867/a36af21f2774b7126c51763d64fc394bb3c9707a/_sel.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10121,
1595,
12,
2890,
16,
871,
4672,
1516,
273,
365,
18,
5989,
18,
3319,
1435,
364,
518,
316,
1516,
30,
2067,
273,
518,
63,
20,
65,
2113,
273,
518,
63,
21,
65,
1464,
365,
18,
5989,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10121,
1595,
12,
2890,
16,
871,
4672,
1516,
273,
365,
18,
5989,
18,
3319,
1435,
364,
518,
316,
1516,
30,
2067,
273,
518,
63,
20,
65,
2113,
273,
518,
63,
21,
65,
1464,
365,
18,
5989,
... |
return option in self.__sections[section] | return (option in self.__sections[section] or option in self.__defaults) | def has_option(self, section, option): """Check for the existence of a given option in a given section.""" if not section or section == "DEFAULT": return option in self.__defaults elif not self.has_section(section): return 0 else: option = self.optionxform(option) return option in self.__sections[section] | c2ff9051d2dace414d5ec928fa3e41edd9297992 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/c2ff9051d2dace414d5ec928fa3e41edd9297992/ConfigParser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
711,
67,
3482,
12,
2890,
16,
2442,
16,
1456,
4672,
3536,
1564,
364,
326,
15782,
434,
279,
864,
1456,
316,
279,
864,
2442,
12123,
309,
486,
2442,
578,
2442,
422,
315,
5280,
6877,
327,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
711,
67,
3482,
12,
2890,
16,
2442,
16,
1456,
4672,
3536,
1564,
364,
326,
15782,
434,
279,
864,
1456,
316,
279,
864,
2442,
12123,
309,
486,
2442,
578,
2442,
422,
315,
5280,
6877,
327,
1... |
def findT1File(fontName,ext='.pfb'): | def _searchT1Dirs(n): | def findT1File(fontName,ext='.pfb'): from reportlab.rl_config import T1SearchPath assert T1SearchPath!=[], "No Type-1 font search path" if sys.platform in ('linux2',) and ext=='.pfb': ext = '' n = _findFNR(fontName)+ext for d in T1SearchPath: f = os.path.join(d,n) if os.path.isfile(f): return f return None | 310be394f7c2a2b8843f5053515eb2cb0a21a047 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/310be394f7c2a2b8843f5053515eb2cb0a21a047/_fontdata.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3072,
56,
21,
9872,
12,
82,
4672,
628,
2605,
7411,
18,
1321,
67,
1425,
1930,
399,
21,
2979,
743,
1815,
399,
21,
2979,
743,
5,
22850,
6487,
315,
2279,
1412,
17,
21,
3512,
1623,
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,
389,
3072,
56,
21,
9872,
12,
82,
4672,
628,
2605,
7411,
18,
1321,
67,
1425,
1930,
399,
21,
2979,
743,
1815,
399,
21,
2979,
743,
5,
22850,
6487,
315,
2279,
1412,
17,
21,
3512,
1623,
5... |
_string = p.sub(r"\\begin{\1}", _string) | string = p.sub(r"\\begin{\1}", string) | def transform(string): """ convert/transform one line """ global frame_opened, enum_item_level # nasty thing to do global frame_header, frame_footer, next_frame_footer preamble = "" # for enumeration/itemize environment commands # handle itemizing/enumerations p = re.compile("^([\*\#]+).*$") m = p.match(string) if (m == None): my_enum_item_level = "" else: my_enum_item_level = m.group(1) # trivial: old level = new level if (my_enum_item_level == enum_item_level): pass else: # find common part common = -1 while (len(enum_item_level) > common + 1) and \ (len(my_enum_item_level) > common + 1) and \ (enum_item_level[common+1] == my_enum_item_level[common+1]): common = common + 1 # close enum_item_level environments from back to front for i in range(len(enum_item_level)-1, common, -1): if (enum_item_level[i] == "*"): preamble = preamble + "\\end{itemize}\n" elif (enum_item_level[i] == "#"): preamble = preamble + "\\end{enumerate}\n" # open my_enum_item_level environments from front to back for i in range(common+1, len(my_enum_item_level)): if (my_enum_item_level[i] == "*"): preamble = preamble + "\\begin{itemize}\n" elif (my_enum_item_level[i] == "#"): preamble = preamble + "\\begin{enumerate}\n" enum_item_level = my_enum_item_level # now, substitute item markers p = re.compile("^([\*\#]+)(.*)$") _string = p.sub(r" \\item\2", string) string = _string # header and footer definitions p = re.compile("^@FRAMEHEADER=(.*)$", re.VERBOSE) m = p.match(string) if (m != None): #print m.group(1) frame_header = m.group(1) string = "" p = re.compile("^@FRAMEFOOTER=(.*)$", re.VERBOSE) m = p.match(string) if (m != None): #print m.group(1) next_frame_footer = m.group(1) string = "" # detect manual closing of frames p = re.compile(r"(?:^\s*\\end{\s*frame\s*})|(?:^\[\s*frame\s*\]>)") if (frame_opened == 1): if (len(p.findall(string)) > 0): frame_opened = 0 # headings (3) to frames p = re.compile("^====\s*(.*?)\s*====(.*)", re.VERBOSE) if (frame_opened == 0): _string = p.sub(r"\\begin{frame}\2\n \\frametitle{\1}\n <---FRAMEHEADER---> \n", string) else: _string = p.sub(r" <---FRAMEFOOTER---> \n \\end{frame}\n\n\\begin{frame}\2\n \\frametitle{\1}\n <---FRAMEHEADER---> \n", string) if (string != _string): frame_opened = 1 # headings (2) to subsections string = _string p = re.compile("^===\s*(.*?)\s*===(.*)", re.VERBOSE) if (frame_opened == 1): _string = p.sub(r" <---FRAMEFOOTER---> \n \\end{frame}\n\\subsection\2{\1}\n\n", string) else: _string = p.sub(r"\n\\subsection\2{\1}\n\n", string) if (string != _string): frame_opened = 0 # headings (1) to sections string = _string p = re.compile("^==\s*(.*?)\s*==(.*)", re.VERBOSE) if (frame_opened == 1): _string = p.sub(r" <---FRAMEFOOTER---> \n \\end{frame}\n\n\\section\2{\1}\n\n", string) else: _string = p.sub(r"\n\n\\section\2{\1}\n\n", string) if (string != _string): frame_opened = 0 _string = _string.replace("<---FRAMEHEADER--->", frame_header) _string = _string.replace("<---FRAMEFOOTER--->", frame_footer) if (_string.find("\\end{frame}") != -1): frame_footer = next_frame_footer # latex environments, the users takes full responsibility # for closing ALL opened environments # exampe: # <[block]{block title} # message # [block]> # -> open p = re.compile("^<\[([^{}]*?)\]", re.VERBOSE) _string = p.sub(r"\\begin{\1}", _string) # -> close p = re.compile("^\[([^{}]*?)\]>", re.VERBOSE) _string = p.sub(r"\\end{\1}", _string) # columns p = re.compile("^\[\[\[(.*?)\]\]\]", re.VERBOSE) _string = p.sub(r"\\column{\1}", _string) # bold font p = re.compile("'''(.*?)'''", re.VERBOSE) _string = p.sub(r"\\textbf{\1}", _string) # italic font p = re.compile("''(.*?)''", re.VERBOSE) _string = p.sub(r"\\emph{\1}", _string) # typewriter font p = re.compile("@(.*?)@", re.VERBOSE) _string = p.sub(r"\\texttt{\1}", _string) # alerts p = re.compile("!(.*?)!", re.VERBOSE) _string = p.sub(r"\\alert{\1}", _string) # colors p = re.compile("_([^_\\\\]*?)_([^_]*?[^_\\\\])_", re.VERBOSE) _string = p.sub(r"\\textcolor{\1}{\2}", _string) # footnotes p = re.compile("\(\(\((.*?)\)\)\)", re.VERBOSE) _string = p.sub(r"\\footnote{\1}", _string) # figures/images p = re.compile("\<\<\<(.*?),(.*?)\>\>\>", re.VERBOSE) _string = p.sub(r"\\includegraphics[\2]{\1}", _string) p = re.compile("\<\<\<(.*?)\>\>\>", re.VERBOSE) _string = p.sub(r"\\includegraphics{\1}", _string) # substitutions p = re.compile("(\s)-->(\s)", re.VERBOSE) _string = p.sub(r"\1$\\rightarrow$\2", _string) p = re.compile("(\s)<--(\s)", re.VERBOSE) _string = p.sub(r"\1$\\leftarrow$\2", _string) p = re.compile("(\s)==>(\s)", re.VERBOSE) _string = p.sub(r"\1$\\Rightarrow$\2", _string) p = re.compile("(\s)<==(\s)", re.VERBOSE) _string = p.sub(r"\1$\\Leftarrow$\2", _string) p = re.compile("(\s):-\)(\s)", re.VERBOSE) _string = p.sub(r"\1\\smiley\2", _string) p = re.compile("(\s):-\((\s)", re.VERBOSE) _string = p.sub(r"\1\\frownie\2", _string) # to be continued ... return preamble + _string | 1947325dce6126afe82562ecb94d6cdf480ca241 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/14466/1947325dce6126afe82562ecb94d6cdf480ca241/wiki2beamer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2510,
12,
1080,
4672,
3536,
1765,
19,
6547,
1245,
980,
3536,
2552,
2623,
67,
25304,
16,
2792,
67,
1726,
67,
2815,
565,
468,
290,
689,
93,
7757,
358,
741,
2552,
2623,
67,
3374,
16,
2623... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2510,
12,
1080,
4672,
3536,
1765,
19,
6547,
1245,
980,
3536,
2552,
2623,
67,
25304,
16,
2792,
67,
1726,
67,
2815,
565,
468,
290,
689,
93,
7757,
358,
741,
2552,
2623,
67,
3374,
16,
2623... |
break | more_mods.extend(olmods_found) log.msg("Found these modules that failed last time: %s" % \ ','.join(olmods_found)) break | def start(self): #TODO FIX: # need to change the static slave path self.logfiles = {} # builddir = self.build.builder.builddir if not self.args.get('addonsdir'): if self.build.builder.properties.get('addons_dir'): self.args['addonsdir'] = self.build.builder.properties['addons_dir'] else: self.args['addonsdir'] = '../addons/' if not self.args.get('port'): self.args['port'] = self.get_free_port() if not self.args.get('dbname'): self.args['dbname'] = self.build.builder.builddir.replace('/', '_') | 5b87ee2bb8c3c2a290e86c2b7d2df34519e53335 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12355/5b87ee2bb8c3c2a290e86c2b7d2df34519e53335/buildstep.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
787,
12,
2890,
4672,
468,
6241,
8563,
30,
468,
1608,
358,
2549,
326,
760,
11735,
589,
365,
18,
1330,
2354,
273,
2618,
468,
25666,
330,
449,
481,
273,
365,
18,
3510,
18,
9574,
18,
70,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
787,
12,
2890,
4672,
468,
6241,
8563,
30,
468,
1608,
358,
2549,
326,
760,
11735,
589,
365,
18,
1330,
2354,
273,
2618,
468,
25666,
330,
449,
481,
273,
365,
18,
3510,
18,
9574,
18,
70,
... |
sage: E=EllipticCurve('14a1') | sage: E = EllipticCurve('14a1') | def has_nonsplit_multiplicative_reduction(self): r""" Return True if there is non-split multiplicative reduction. | e5919ce2ed8be2ebf365206bac58d89cf855be71 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/e5919ce2ed8be2ebf365206bac58d89cf855be71/ell_local_data.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
711,
67,
5836,
4939,
67,
7027,
28884,
67,
1118,
4062,
12,
2890,
4672,
436,
8395,
2000,
1053,
309,
1915,
353,
1661,
17,
4939,
3309,
28884,
225,
20176,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
711,
67,
5836,
4939,
67,
7027,
28884,
67,
1118,
4062,
12,
2890,
4672,
436,
8395,
2000,
1053,
309,
1915,
353,
1661,
17,
4939,
3309,
28884,
225,
20176,
18,
2,
-100,
-100,
-100,
-100,
-100,... |
return dynamic.Dispatch(dispatch, userName, CDispatch, typeinfo, UnicodeToString=UnicodeToString,clsctx=clsctx) | if WrapperClass is None: WrapperClass = CDispatch return dynamic.Dispatch(dispatch, userName, WrapperClass, typeinfo, UnicodeToString=UnicodeToString,clsctx=clsctx) | def __WrapDispatch(dispatch, userName = None, resultCLSID = None, typeinfo = None, \ UnicodeToString = NeedUnicodeConversions, clsctx = pythoncom.CLSCTX_SERVER): """ Helper function to return a makepy generated class for a CLSID if it exists, otherwise cope by using CDispatch. """ if resultCLSID is None: try: typeinfo = dispatch.GetTypeInfo() resultCLSID = str(typeinfo.GetTypeAttr()[0]) except pythoncom.com_error: pass if resultCLSID is not None: try: return CLSIDToClass.GetClass(resultCLSID)(dispatch) except KeyError: # We dont know this CLSID yet # Attempt to load generated module support # This may load the module, and make it available try: import gencache if gencache.GetModuleForCLSID(resultCLSID) is not None: try: return CLSIDToClass.GetClass(resultCLSID)(dispatch) except KeyError: # still dont know it? pass except ImportError: # no gencache avail - thats OK! pass # Return a "dynamic" object - best we can do! return dynamic.Dispatch(dispatch, userName, CDispatch, typeinfo, UnicodeToString=UnicodeToString,clsctx=clsctx) | 2e823b44c0979d6ba6b0fa47b639235b9ca3b286 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/992/2e823b44c0979d6ba6b0fa47b639235b9ca3b286/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2964,
5325,
12,
10739,
16,
12065,
273,
599,
16,
563,
39,
3045,
734,
273,
599,
16,
618,
1376,
273,
599,
16,
521,
9633,
5808,
273,
12324,
16532,
29287,
16,
2028,
5900,
273,
5790,
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,
1001,
2964,
5325,
12,
10739,
16,
12065,
273,
599,
16,
563,
39,
3045,
734,
273,
599,
16,
618,
1376,
273,
599,
16,
521,
9633,
5808,
273,
12324,
16532,
29287,
16,
2028,
5900,
273,
5790,
8... |
return self._update(req,connection) def __deleteTransformationTask(self,transID,taskID,connection=False): | return self._update( req, connection ) def __deleteTransformationTask( self, transID, taskID, connection = False ): | def __deleteTransformationTasks(self,transID,connection=False): """ Delete all the tasks from the TransformationTasks table for transformation with TransformationID """ req = "DELETE FROM TransformationTasks WHERE TransformationID=%d" % transID return self._update(req,connection) | 9ad007ea503b29694fc081c1646b7c5ecd07b1f2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/9ad007ea503b29694fc081c1646b7c5ecd07b1f2/TransformationDB.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
3733,
15292,
6685,
12,
2890,
16,
2338,
734,
16,
4071,
33,
8381,
4672,
3536,
2504,
777,
326,
4592,
628,
326,
21274,
6685,
1014,
364,
8620,
598,
21274,
734,
3536,
1111,
273,
315,
646... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3733,
15292,
6685,
12,
2890,
16,
2338,
734,
16,
4071,
33,
8381,
4672,
3536,
2504,
777,
326,
4592,
628,
326,
21274,
6685,
1014,
364,
8620,
598,
21274,
734,
3536,
1111,
273,
315,
646... |
flag=wx.ALIGN_RIGHT | wx.GROW | wx.ALL) def _init_coll_buttonsSizer_Items(self, parent): parent.AddWindow(self.panel1, 1, border=0, flag=wx.GROW) parent.AddWindow(self.btnOK, 0, border=10, flag=wx.ALL | wx.ALIGN_RIGHT) parent.AddWindow(self.btnCancel, 0, border=10, flag=wx.ALL | wx.ALIGN_RIGHT) | flag=wx.ALIGN_RIGHT | wx.ALL) | def _init_coll_mainSizer_Items(self, parent): # generated method, don't edit | ab8bf7166b70d1f1fb97cbc0de6889b353768dec /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4325/ab8bf7166b70d1f1fb97cbc0de6889b353768dec/PyInterpreterChooser.plug-in.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2738,
67,
12910,
67,
5254,
20512,
67,
3126,
12,
2890,
16,
982,
4672,
468,
4374,
707,
16,
2727,
1404,
3874,
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,
389,
2738,
67,
12910,
67,
5254,
20512,
67,
3126,
12,
2890,
16,
982,
4672,
468,
4374,
707,
16,
2727,
1404,
3874,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
TERMIOS.ECHOCTL|TERMIOS.ECHOKE|TERMIOS.ISIG|TERMIOS.IEXTEN) | TERMIOS.ISIG|TERMIOS.IEXTEN) for flag in ('ECHOCTL', 'ECHOKE'): if hasattr(TERMIOS, flag): lflag &= ~getattr(TERMIOS, flag) | def _reconfigurePort(self): """Set commuication parameters on opened port.""" if self.fd is None: raise SerialException("Can only operate on a valid port handle") vmin = vtime = 0 #timeout is done via select try: iflag, oflag, cflag, lflag, ispeed, ospeed, cc = termios.tcgetattr(self.fd) except termios.error, msg: #if a port is nonexistent but has a /dev file, it'll fail here raise SerialException("Could not configure port: %s" % msg) #set up raw mode / no echo / binary cflag |= (TERMIOS.CLOCAL|TERMIOS.CREAD) lflag &= ~(TERMIOS.ICANON|TERMIOS.ECHO|TERMIOS.ECHOE|TERMIOS.ECHOK|TERMIOS.ECHONL| TERMIOS.ECHOCTL|TERMIOS.ECHOKE|TERMIOS.ISIG|TERMIOS.IEXTEN) #|TERMIOS.ECHOPRT oflag &= ~(TERMIOS.OPOST) iflag &= ~(TERMIOS.INLCR|TERMIOS.IGNCR|TERMIOS.ICRNL|TERMIOS.IGNBRK) if hasattr(TERMIOS, 'IUCLC'): iflag &= ~TERMIOS.IUCLC #setup baudrate try: ispeed = ospeed = getattr(TERMIOS,'B%s' % (self._baudrate)) except AttributeError: raise ValueError('Invalid baud rate: %r' % self._baudrate) #setup char len cflag &= ~TERMIOS.CSIZE if self._bytesize == 8: cflag |= TERMIOS.CS8 elif self._bytesize == 7: cflag |= TERMIOS.CS7 elif self._bytesize == 6: cflag |= TERMIOS.CS6 elif self._bytesize == 5: cflag |= TERMIOS.CS5 else: raise ValueError('Invalid char len: %r' % self._bytesize) #setup stopbits if self._stopbits == STOPBITS_ONE: cflag &= ~(TERMIOS.CSTOPB) elif self._stopbits == STOPBITS_TWO: cflag |= (TERMIOS.CSTOPB) else: raise ValueError('Invalid stopit specification: %r' % self._stopbits) #setup parity iflag &= ~(TERMIOS.INPCK|TERMIOS.ISTRIP) if self._parity == PARITY_NONE: cflag &= ~(TERMIOS.PARENB|TERMIOS.PARODD) elif self._parity == PARITY_EVEN: cflag &= ~(TERMIOS.PARODD) cflag |= (TERMIOS.PARENB) elif self._parity == PARITY_ODD: cflag |= (TERMIOS.PARENB|TERMIOS.PARODD) else: raise ValueError('Invalid parity: %r' % self._parity) #setup flow control #xonxoff if hasattr(TERMIOS, 'IXANY'): if self._xonxoff: iflag |= (TERMIOS.IXON|TERMIOS.IXOFF) #|TERMIOS.IXANY) else: iflag &= ~(TERMIOS.IXON|TERMIOS.IXOFF|TERMIOS.IXANY) else: if self._xonxoff: iflag |= (TERMIOS.IXON|TERMIOS.IXOFF) else: iflag &= ~(TERMIOS.IXON|TERMIOS.IXOFF) #rtscts if hasattr(TERMIOS, 'CRTSCTS'): if self._rtscts: cflag |= (TERMIOS.CRTSCTS) else: cflag &= ~(TERMIOS.CRTSCTS) elif hasattr(TERMIOS, 'CNEW_RTSCTS'): #try it with alternate constant name if self._rtscts: cflag |= (TERMIOS.CNEW_RTSCTS) else: cflag &= ~(TERMIOS.CNEW_RTSCTS) #XXX should there be a warning if setting up rtscts (and xonxoff etc) fails?? #buffer #vmin "minimal number of characters to be read. = for non blocking" if vmin < 0 or vmin > 255: raise ValueError('Invalid vmin: %r ' % vmin) cc[TERMIOS.VMIN] = vmin #vtime if vtime < 0 or vtime > 255: raise ValueError('Invalid vtime: %r' % vtime) cc[TERMIOS.VTIME] = vtime #activate settings termios.tcsetattr(self.fd, TERMIOS.TCSANOW, [iflag, oflag, cflag, lflag, ispeed, ospeed, cc]) | 1ee47886ddcef4338e2a7a24fe61428746041280 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10955/1ee47886ddcef4338e2a7a24fe61428746041280/serialposix.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
266,
14895,
2617,
12,
2890,
4672,
3536,
694,
1543,
89,
829,
1472,
603,
10191,
1756,
12123,
309,
365,
18,
8313,
353,
599,
30,
1002,
7366,
503,
2932,
2568,
1338,
20829,
603,
279,
923,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
266,
14895,
2617,
12,
2890,
4672,
3536,
694,
1543,
89,
829,
1472,
603,
10191,
1756,
12123,
309,
365,
18,
8313,
353,
599,
30,
1002,
7366,
503,
2932,
2568,
1338,
20829,
603,
279,
923,... |
e = sys.executable if getattr(sys, 'froze', False) else sys.argv[0] | e = sys.executable if getattr(sys, 'frozen', False) else sys.argv[0] | def run_gui(opts, args, actions, listener, app): initialize_file_icon_provider() if not dynamic.get('welcome_wizard_was_run', False): from calibre.gui2.wizard import wizard wizard().exec_() dynamic.set('welcome_wizard_was_run', True) main = Main(listener, opts, actions) sys.excepthook = main.unhandled_exception if len(args) > 1: args[1] = os.path.abspath(args[1]) main.add_filesystem_book(args[1]) ret = app.exec_() if getattr(main, 'run_wizard_b4_shutdown', False): from calibre.gui2.wizard import wizard wizard().exec_() if getattr(main, 'restart_after_quit', False): e = sys.executable if getattr(sys, 'froze', False) else sys.argv[0] print 'Restarting with:', e, sys.argv if hasattr(sys, 'frameworks_dir'): app = os.path.dirname(os.path.dirname(sys.frameworks_dir)) import subprocess subprocess.Popen('sleep 3s; open '+app, shell=True) else: os.execvp(e, sys.argv) else: if iswindows: try: main.system_tray_icon.hide() except: pass return ret | 2aa725abe0e6011f31a7108b54681deb7c514edd /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9125/2aa725abe0e6011f31a7108b54681deb7c514edd/main.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
67,
20292,
12,
4952,
16,
833,
16,
4209,
16,
2991,
16,
595,
4672,
4046,
67,
768,
67,
3950,
67,
6778,
1435,
309,
486,
5976,
18,
588,
2668,
91,
16312,
67,
31837,
67,
17416,
67,
26... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
67,
20292,
12,
4952,
16,
833,
16,
4209,
16,
2991,
16,
595,
4672,
4046,
67,
768,
67,
3950,
67,
6778,
1435,
309,
486,
5976,
18,
588,
2668,
91,
16312,
67,
31837,
67,
17416,
67,
26... |
results = results + \ _("You have been successfully subscribed to %s.") % \ (mlist.real_name) PrintResults(mlist, results, doc, language) def PrintResults(mlist, results, doc, lang=None): if lang is None: lang = mlist.preferred_language | rname = mlist.real_name results += _("You have been successfully subscribed to %(rname)s.") print_results(mlist, results, doc, lang) def print_results(mlist, results, doc, lang): | def process_form(mlist, doc): form = cgi.FieldStorage() error = 0 results = '' # Preliminaries done, actual processing of the form input below. if form.has_key("language"): language = form["language"].value else: language = mlist.preferred_language os.environ['LANG'] = language if form.has_key("UserOptions") or \ form.has_key("info") and \ not form.has_key("email"): # then # Go to user options section. if not form.has_key("info"): doc.AddItem(Header(2, _("Error"))) doc.AddItem(Bold(_("You must supply your email address."))) doc.AddItem(mlist.GetMailmanFooter()) print doc.Format(bgcolor="#ffffff") return addr = form['info'].value member = mlist.FindUser(addr) if not member: doc.AddItem(Header(2, _("Error"))) doc.AddItem(Bold(_("%s has no subscribed addr <i>%s</i>.") % (mlist.real_name, addr))) doc.AddItem(mlist.GetMailmanFooter()) print doc.Format(bgcolor="#ffffff") return call_script(mlist, member, 'options') # should never get here! assert 0 if not form.has_key("email"): error = 1 results = results + _("You must supply a valid email address.<br>") # # define email so we don't get a NameError below # with if email == mlist.GetListEmail() -scott # email = "" else: email = form["email"].value remote = remote_addr() if email == mlist.GetListEmail(): error = 1 if remote: remote = _("Web site ") + remote else: remote = _("unidentified origin") badremote = "\n\tfrom " + remote syslog("mischief", "Attempt to self subscribe %s:%s" % (email, badremote)) results = results + _("You must not subscribe a list to itself!<br>") if not form.has_key("pw") or not form.has_key("pw-conf"): error = 1 results = (results + _("You must supply a valid password, and confirm it.<br>")) else: pw = form["pw"].value pwc = form["pw-conf"].value if not error and pw <> pwc: error = 1 results = results + _("Your passwords did not match.<br>") if form.has_key("digest"): try: digest = int(form['digest'].value) except ValueError: # TBD: Hmm, this shouldn't happen digest = 0 else: digest = mlist.digest_is_default if not mlist.digestable: digest = 0 elif not mlist.nondigestable: digest = 1 if not error: try: if mlist.FindUser(email): raise Errors.MMAlreadyAMember, email if digest: digesting = " digest" else: digesting = "" mlist.AddMember(email, pw, digest, remote, language) # # check for all the errors that mlist.AddMember can throw # options on the web page for this cgi # except Errors.MMBadEmailError: results = results + (_("Mailman won't accept the given email " "address as a valid address. (Does it " "have an @ in it???)<p>")) except Errors.MMListError: results = results + (_("The list is not fully functional, and " "can not accept subscription requests.<p>")) except Errors.MMSubscribeNeedsConfirmation: results = results + (_("Confirmation from your email address is " "required, to prevent anyone from " "subscribing you without permission. " "Instructions are being " "sent to you at %s. Please note your " "subscription will not start until you " "confirm your subscription.") % email) except Errors.MMNeedApproval, x: results = results + (_("Subscription was <em>deferred</em> " "because %s. Your request has been " "forwarded to the list administrator. " "You will receive email informing you " "of the moderator's decision when they " "get to your request.<p>") % x) except Errors.MMHostileAddress: results = results + (_("Your subscription is not allowed because " "the email address you gave is insecure.<p>")) except Errors.MMAlreadyAMember: results = results + _("You are already subscribed!<p>") # # these shouldn't happen, but if someone's futzing with the cgi # they might -scott # except Errors.MMCantDigestError: results = results + \ _("No one can subscribe to the digest of this list!") except Errors.MMMustDigestError: results = results + \ _("This list only supports digest subscriptions!") else: results = results + \ _("You have been successfully subscribed to %s.") % \ (mlist.real_name) PrintResults(mlist, results, doc, language) | b121e4076f4c5d170d07eefd6361b44bbafc2f9f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2120/b121e4076f4c5d170d07eefd6361b44bbafc2f9f/subscribe.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
67,
687,
12,
781,
376,
16,
997,
4672,
646,
273,
276,
10052,
18,
974,
3245,
1435,
555,
273,
374,
1686,
273,
875,
225,
468,
453,
2878,
381,
267,
5646,
2731,
16,
3214,
4929,
434,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
67,
687,
12,
781,
376,
16,
997,
4672,
646,
273,
276,
10052,
18,
974,
3245,
1435,
555,
273,
374,
1686,
273,
875,
225,
468,
453,
2878,
381,
267,
5646,
2731,
16,
3214,
4929,
434,
... |
if (ignore.count(srcfile)): return([]); | if (ignore.count(srcfile)): return([]) | def CxxCalcDependencies(srcfile, ipath, ignore): if (CxxDependencyCache.has_key(srcfile)): return CxxDependencyCache[srcfile] if (ignore.count(srcfile)): return([]); dep = {} dep[srcfile] = 1 includes = CxxGetIncludes(srcfile) for include in includes: if (CxxIgnoreHeader.has_key(include)==0): header = CxxFindHeader(srcfile, include, ipath) if (header==0): print "CAUTION: header file "+include+" cannot be found." else: if (ignore.count(header)==0): hdeps = CxxCalcDependencies(header, ipath, [srcfile]+ignore) for x in hdeps: dep[x] = 1 result = dep.keys(); CxxDependencyCache[srcfile] = result return result | 4a71a3ad56d88a79d9aba6c9d9fa1abc8c3a885e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8543/4a71a3ad56d88a79d9aba6c9d9fa1abc8c3a885e/makepanda.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
385,
5279,
25779,
8053,
12,
4816,
768,
16,
277,
803,
16,
2305,
4672,
309,
261,
39,
5279,
7787,
1649,
18,
5332,
67,
856,
12,
4816,
768,
3719,
30,
327,
385,
5279,
7787,
1649,
63,
4816,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
385,
5279,
25779,
8053,
12,
4816,
768,
16,
277,
803,
16,
2305,
4672,
309,
261,
39,
5279,
7787,
1649,
18,
5332,
67,
856,
12,
4816,
768,
3719,
30,
327,
385,
5279,
7787,
1649,
63,
4816,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.