rem stringlengths 1 226k | add stringlengths 0 227k | context stringlengths 6 326k | meta stringlengths 143 403 | input_ids listlengths 256 256 | attention_mask listlengths 256 256 | labels listlengths 128 128 |
|---|---|---|---|---|---|---|
def reload_scale(self, entry, scale): self.load_scale(entry['group'], entry['key'], scale) | def reload_scale(self, group, key, value, scale): self.load_scale(group, key, scale) | def reload_scale(self, entry, scale): self.load_scale(entry['group'], entry['key'], scale) | 6e5ef9d2ff04626633394808ed3d5531bb4809af /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8416/6e5ef9d2ff04626633394808ed3d5531bb4809af/awnClass.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7749,
67,
5864,
12,
2890,
16,
1241,
16,
3159,
4672,
365,
18,
945,
67,
5864,
12,
4099,
3292,
1655,
17337,
1241,
3292,
856,
17337,
3159,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7749,
67,
5864,
12,
2890,
16,
1241,
16,
3159,
4672,
365,
18,
945,
67,
5864,
12,
4099,
3292,
1655,
17337,
1241,
3292,
856,
17337,
3159,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
_fl_popup_get_bw = cfuncproto(so_libforms, "fl_popup_get_bw", cty.c_int, [cty.POINTER(FL_POPUP)], | _fl_popup_get_bw = cfuncproto(so_libforms, "fl_popup_get_bw", cty.c_int, [cty.POINTER(FL_POPUP)], | def fl_popup_entry_set_font(p1, p2, p3): """ fl_popup_entry_set_font(p1, p2, p3) """ _fl_popup_entry_set_font(p1, p2, p3) | 9942dac8ce2b35a1e43615a26fd8e7054ef805d3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2429/9942dac8ce2b35a1e43615a26fd8e7054ef805d3/xformslib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1183,
67,
16086,
67,
4099,
67,
542,
67,
5776,
12,
84,
21,
16,
293,
22,
16,
293,
23,
4672,
3536,
1183,
67,
16086,
67,
4099,
67,
542,
67,
5776,
12,
84,
21,
16,
293,
22,
16,
293,
23... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1183,
67,
16086,
67,
4099,
67,
542,
67,
5776,
12,
84,
21,
16,
293,
22,
16,
293,
23,
4672,
3536,
1183,
67,
16086,
67,
4099,
67,
542,
67,
5776,
12,
84,
21,
16,
293,
22,
16,
293,
23... |
We test out check=False:: | We test out ``check=False``:: | def quaternion_order(self, basis, check=True): """ Return the order of this quaternion order with given basis. | 1fe7e945a5e69662d3b79300c558387c31fea323 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/1fe7e945a5e69662d3b79300c558387c31fea323/quaternion_algebra.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
26774,
67,
1019,
12,
2890,
16,
10853,
16,
866,
33,
5510,
4672,
3536,
2000,
326,
1353,
434,
333,
26774,
1353,
598,
864,
10853,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
26774,
67,
1019,
12,
2890,
16,
10853,
16,
866,
33,
5510,
4672,
3536,
2000,
326,
1353,
434,
333,
26774,
1353,
598,
864,
10853,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
if module not in save_modules: | if module not in save_modules and module.startswith("test."): | def main(tests=None, testdir=None): """Execute a test suite. This also parses command-line options and modifies its behaviour accordingly. tests -- a list of strings containing test names (optional) testdir -- the directory in which to look for tests (optional) Users other than the Python test suite will certainly want to specify testdir; if it's omitted, the directory containing the Python test suite is searched for. If the tests argument is omitted, the tests listed on the command-line will be used. If that's empty, too, then all *.py files beginning with test_ will be used. """ try: opts, args = getopt.getopt(sys.argv[1:], 'vgqxs') except getopt.error, msg: print msg print __doc__ return 2 verbose = 0 quiet = 0 generate = 0 exclude = 0 single = 0 for o, a in opts: if o == '-v': verbose = verbose+1 if o == '-q': quiet = 1; verbose = 0 if o == '-g': generate = 1 if o == '-x': exclude = 1 if o == '-s': single = 1 if generate and verbose: print "-g and -v don't go together!" return 2 good = [] bad = [] skipped = [] if single: from tempfile import gettempdir filename = os.path.join(gettempdir(), 'pynexttest') try: fp = open(filename, 'r') next = string.strip(fp.read()) tests = [next] fp.close() except IOError: pass for i in range(len(args)): # Strip trailing ".py" from arguments if args[i][-3:] == '.py': args[i] = args[i][:-3] stdtests = STDTESTS[:] nottests = NOTTESTS[:] if exclude: for arg in args: if arg in stdtests: stdtests.remove(arg) nottests[:0] = args args = [] tests = tests or args or findtests(testdir, stdtests, nottests) if single: tests = tests[:1] test_support.verbose = verbose # Tell tests to be moderately quiet save_modules = sys.modules.keys() for test in tests: if not quiet: print test ok = runtest(test, generate, verbose, testdir) if ok > 0: good.append(test) elif ok == 0: bad.append(test) else: if not quiet: print "test", test, print "skipped -- an optional feature could not be imported" skipped.append(test) # Unload the newly imported modules (best effort finalization) for module in sys.modules.keys(): if module not in save_modules: test_support.unload(module) if good and not quiet: if not bad and not skipped and len(good) > 1: print "All", print count(len(good), "test"), "OK." if bad: print count(len(bad), "test"), "failed:", print string.join(bad) if skipped and not quiet: print count(len(skipped), "test"), "skipped:", print string.join(skipped) if single: alltests = findtests(testdir, stdtests, nottests) for i in range(len(alltests)): if tests[0] == alltests[i]: if i == len(alltests) - 1: os.unlink(filename) else: fp = open(filename, 'w') fp.write(alltests[i+1] + '\n') fp.close() break else: os.unlink(filename) return len(bad) > 0 | c06d9ac82ab170565f291c732dccf2160634c56a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/c06d9ac82ab170565f291c732dccf2160634c56a/regrtest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
12,
16341,
33,
7036,
16,
1842,
1214,
33,
7036,
4672,
3536,
5289,
279,
1842,
11371,
18,
225,
1220,
2546,
8940,
1296,
17,
1369,
702,
471,
23934,
2097,
14273,
15905,
18,
225,
7434,
14... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
12,
16341,
33,
7036,
16,
1842,
1214,
33,
7036,
4672,
3536,
5289,
279,
1842,
11371,
18,
225,
1220,
2546,
8940,
1296,
17,
1369,
702,
471,
23934,
2097,
14273,
15905,
18,
225,
7434,
14... |
for i in range(256): | for i in xrange(256): | def _optimize_unicode(charset, fixup): try: import array except ImportError: return charset charmap = [False]*65536 negate = 0 try: for op, av in charset: if op is NEGATE: negate = 1 elif op is LITERAL: charmap[fixup(av)] = True elif op is RANGE: for i in range(fixup(av[0]), fixup(av[1])+1): charmap[i] = True elif op is CATEGORY: # XXX: could expand category return charset # cannot compress except IndexError: # non-BMP characters return charset if negate: if sys.maxunicode != 65535: # XXX: negation does not work with big charsets return charset for i in range(65536): charmap[i] = not charmap[i] comps = {} mapping = [0]*256 block = 0 data = [] for i in range(256): chunk = tuple(charmap[i*256:(i+1)*256]) new = comps.setdefault(chunk, block) mapping[i] = new if new == block: block = block + 1 data = data + _mk_bitmap(chunk) header = [block] if MAXCODE == 65535: code = 'H' else: code = 'L' # Convert block indices to byte array of 256 bytes mapping = array.array('b', mapping).tostring() # Convert byte array to word array header = header + array.array(code, mapping).tolist() data[0:0] = header return [(BIGCHARSET, data)] | 01c9f8c35f583338e3638906ceeef9d2f29a0254 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/01c9f8c35f583338e3638906ceeef9d2f29a0254/sre_compile.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
29155,
67,
9124,
12,
9999,
16,
2917,
416,
4672,
775,
30,
1930,
526,
1335,
11308,
30,
327,
4856,
1149,
1458,
273,
306,
8381,
5772,
26,
2539,
5718,
15626,
273,
374,
775,
30,
364,
10... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
29155,
67,
9124,
12,
9999,
16,
2917,
416,
4672,
775,
30,
1930,
526,
1335,
11308,
30,
327,
4856,
1149,
1458,
273,
306,
8381,
5772,
26,
2539,
5718,
15626,
273,
374,
775,
30,
364,
10... |
self._accepted = False self._accept_pid = None self._time_accepted = None | def __init__(self, cache, callback, accept_callback=None, timeout_callback=None, error_callback=None): self._cond = threading.Condition(threading.Lock()) self._job = job_counter.next() self._cache = cache self._accepted = False self._accept_pid = None self._time_accepted = None self._ready = False self._callback = callback self._errback = error_callback self._accept_callback = accept_callback self._timeout_callback = timeout_callback cache[self._job] = self | 409811c9c25cd86bffb6fbec5abbd7fce80b765f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2024/409811c9c25cd86bffb6fbec5abbd7fce80b765f/pool.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1247,
16,
1348,
16,
2791,
67,
3394,
33,
7036,
16,
2021,
67,
3394,
33,
7036,
16,
555,
67,
3394,
33,
7036,
4672,
365,
6315,
10013,
273,
17254,
18,
3418,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1247,
16,
1348,
16,
2791,
67,
3394,
33,
7036,
16,
2021,
67,
3394,
33,
7036,
16,
555,
67,
3394,
33,
7036,
4672,
365,
6315,
10013,
273,
17254,
18,
3418,
... | |
sorted(first_elts(expect.values()))) | first_elts(sorted(expect.values()))) | def test_strict(self): for orig, expect in parse_strict_test_cases: # Test basic parsing d = do_test(orig, "GET") self.assertEqual(d, expect, "Error parsing %s" % repr(orig)) d = do_test(orig, "POST") self.assertEqual(d, expect, "Error parsing %s" % repr(orig)) | b8e0dc83ba822ee2b1cafc8b0644ed44d74d75d8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8125/b8e0dc83ba822ee2b1cafc8b0644ed44d74d75d8/test_cgi.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
13948,
12,
2890,
4672,
364,
1647,
16,
4489,
316,
1109,
67,
13948,
67,
3813,
67,
22186,
30,
468,
7766,
5337,
5811,
302,
273,
741,
67,
3813,
12,
4949,
16,
315,
3264,
7923,
365,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
13948,
12,
2890,
4672,
364,
1647,
16,
4489,
316,
1109,
67,
13948,
67,
3813,
67,
22186,
30,
468,
7766,
5337,
5811,
302,
273,
741,
67,
3813,
12,
4949,
16,
315,
3264,
7923,
365,... |
ala {'pdb':['in1.pdb', 'in2.pdb'], 'psf':'in.psf', 'o':'out.dat'} | ala {'pdb':['in1.pdb', 'in2.pdb'], 'psf':'in.psf'} | def __parse( self, argv ): """ Parse commandline options into dictionary of type C{ {<option> : <value>} } Options are recognised by a leading '-'. Option C{ -x |file_name| } is interpreted as file with additional options. The key value pairs in lst_cmd replace key value pairs in the -x file and in dic_default. @param lst_cmd: list with the command line options:: e.g. ['-pdb', 'in1.pdb', 'in2.pdb', '-o', 'out.dat'] @type lst_cmd: [str] @return: command dictionary:: ala {'pdb':['in1.pdb', 'in2.pdb'], 'psf':'in.psf', 'o':'out.dat'} @rtype: {<option> : <value>} """ argv = argv[1:] try: for cmd in argv: if (cmd[0] == '-'): # this entry is new option current_option = cmd[1:] # take all but leading "-" self[current_option] = True # default argument w/o value counter = 0 # number of values for this option else: # this entry is value for latest option if counter < 1: self[current_option] = cmd # in case, several values follow after a "-xxx" option convert dict # entry into list and add all elements (until the next "-") to it else: if counter == 1: # there is already a value assigned # convert to list self[current_option] = [ self[current_option] ] # add value to list self[current_option] = self[current_option] + [cmd] counter = counter + 1 except (KeyError, UnboundLocalError), why: raise KeyError, "Can't resolve command line options.\n \tError:"\ +str(why) | 511e05e15c415ab0fceac5d72447922a26a45e31 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/482/511e05e15c415ab0fceac5d72447922a26a45e31/Commandline.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2670,
12,
365,
16,
5261,
262,
30,
3536,
2884,
28305,
702,
1368,
3880,
434,
618,
385,
95,
288,
32,
3482,
34,
294,
411,
1132,
26114,
289,
5087,
854,
14603,
5918,
635,
279,
7676,
40... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2670,
12,
365,
16,
5261,
262,
30,
3536,
2884,
28305,
702,
1368,
3880,
434,
618,
385,
95,
288,
32,
3482,
34,
294,
411,
1132,
26114,
289,
5087,
854,
14603,
5918,
635,
279,
7676,
40... |
if proc.returncode != 0 or stdout.find("*** PASS") == -1: | if proc.returncode != 0 or (stdout is not None and stdout.find("*** PASS") == -1): | def processLeakLog(leakLogFile): """Process the leak log.""" # For the time being, don't warn (nor "info") if the log file is not there. (Bug 469523) if not os.path.exists(leakLogFile): return None | 2a8d758d6245d7de4e12f8f763bae830faf8087e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11102/2a8d758d6245d7de4e12f8f763bae830faf8087e/runxpcshelltests.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
1682,
581,
1343,
12,
298,
581,
19103,
4672,
3536,
2227,
326,
20891,
613,
12123,
468,
2457,
326,
813,
3832,
16,
2727,
1404,
1894,
261,
29561,
315,
1376,
7923,
309,
326,
613,
585,
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,
1207,
1682,
581,
1343,
12,
298,
581,
19103,
4672,
3536,
2227,
326,
20891,
613,
12123,
468,
2457,
326,
813,
3832,
16,
2727,
1404,
1894,
261,
29561,
315,
1376,
7923,
309,
326,
613,
585,
35... |
'''Try the tracker's templating_utils.''' | """Try the tracker's templating_utils.""" | def __getattr__(self, name): '''Try the tracker's templating_utils.''' if not hasattr(self.client.instance, 'templating_utils'): # backwards-compatibility raise AttributeError, name if not self.client.instance.templating_utils.has_key(name): raise AttributeError, name return self.client.instance.templating_utils[name] | 16a3ebf380b95607b344181655488d818a27791f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1906/16a3ebf380b95607b344181655488d818a27791f/templating.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
588,
1747,
972,
12,
2890,
16,
508,
4672,
3536,
7833,
326,
9745,
1807,
28923,
67,
5471,
12123,
309,
486,
3859,
12,
2890,
18,
2625,
18,
1336,
16,
296,
27380,
1776,
67,
5471,
11,
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,
1001,
588,
1747,
972,
12,
2890,
16,
508,
4672,
3536,
7833,
326,
9745,
1807,
28923,
67,
5471,
12123,
309,
486,
3859,
12,
2890,
18,
2625,
18,
1336,
16,
296,
27380,
1776,
67,
5471,
11,
46... |
os.system(script) try: print "starting pause() loop..." while 1: try: if verbose: print "call pause()..." signal.pause() if verbose: print "pause() returned" except HandlerBCalled: if verbose: print "HandlerBCalled exception caught" | signal.alarm(self.MAX_DURATION) | def force_test_exit(): # Sigh, both imports seem necessary to avoid errors. import os fork_pid = os.fork() if fork_pid: # In parent. return fork_pid # In child. import os, time try: # Wait 5 seconds longer than the expected alarm to give enough # time for the normal sequence of events to occur. This is # just a stop-gap to try to prevent the test from hanging. time.sleep(MAX_DURATION + 5) print >> sys.__stdout__, ' child should not have to kill parent' for signame in "SIGHUP", "SIGUSR1", "SIGUSR2", "SIGALRM": os.kill(pid, getattr(signal, signame)) print >> sys.__stdout__, " child sent", signame, "to", pid time.sleep(1) finally: os._exit(0) | 73dd02de154505c1bd9be384ef7bcb0fe31b6db5 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8125/73dd02de154505c1bd9be384ef7bcb0fe31b6db5/test_signal.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2944,
67,
3813,
67,
8593,
13332,
468,
348,
2031,
16,
3937,
10095,
19264,
4573,
358,
4543,
1334,
18,
1930,
1140,
12515,
67,
6610,
273,
1140,
18,
23335,
1435,
309,
12515,
67,
6610,
30,
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,
2944,
67,
3813,
67,
8593,
13332,
468,
348,
2031,
16,
3937,
10095,
19264,
4573,
358,
4543,
1334,
18,
1930,
1140,
12515,
67,
6610,
273,
1140,
18,
23335,
1435,
309,
12515,
67,
6610,
30,
468... |
result = self.__runCommand( cmd ) | result = self._runCommand( cmd ) | def getResourceUsage( self ): """Returns a dictionary containing CPUConsumed, CPULimit, WallClockConsumed and WallClockLimit for current slot. All values returned in seconds. """ if not self.jobID: return S_ERROR( 'Could not determine batch jobID from QSUB_REQNAME env var.' ) | d554f6d0ec4a7e937b2d521bff11bf4da909f113 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/d554f6d0ec4a7e937b2d521bff11bf4da909f113/BQSTimeLeft.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5070,
5357,
12,
365,
262,
30,
3536,
1356,
279,
3880,
4191,
12154,
20554,
16,
5181,
1506,
1038,
16,
678,
454,
14027,
20554,
471,
678,
454,
14027,
3039,
364,
783,
4694,
18,
225,
4826,
924,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5070,
5357,
12,
365,
262,
30,
3536,
1356,
279,
3880,
4191,
12154,
20554,
16,
5181,
1506,
1038,
16,
678,
454,
14027,
20554,
471,
678,
454,
14027,
3039,
364,
783,
4694,
18,
225,
4826,
924,... |
if word[:n] == attr and word != "__builtins__": val = getattr(object, word) | if word[:n] == attr and hasattr(thisobject, word): val = getattr(thisobject, word) | def attr_matches(self, text): """Compute matches when text contains a dot. | 311279bc75ca8640eb928be4079866f776eb390d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8125/311279bc75ca8640eb928be4079866f776eb390d/rlcompleter.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1604,
67,
8436,
12,
2890,
16,
977,
4672,
3536,
7018,
1885,
1347,
977,
1914,
279,
3928,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
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,
1604,
67,
8436,
12,
2890,
16,
977,
4672,
3536,
7018,
1885,
1347,
977,
1914,
279,
3928,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
self.glade_file = 'guzuta3.glade' elif os.path.exists('/usr/share/guzuta/guzuta3.glade'): self.glade_file = '/usr/share/guzuta/guzuta3.glade' | fname = 'guzuta3.glade' self.glade_file = fname print 'fname: ', fname | def __init__(self, read_pipe = None, write_pipe = None): # signals !!! #fname = '/usr/share/guzuta/guzuta2.glade' gtk.gdk.threads_init() self.th = None | eb129f819df25447105c78e99ec3cae5341ad816 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2759/eb129f819df25447105c78e99ec3cae5341ad816/gui.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
855,
67,
14772,
273,
599,
16,
1045,
67,
14772,
273,
599,
4672,
468,
11505,
401,
8548,
468,
12749,
273,
1173,
13640,
19,
14419,
19,
6891,
94,
322,
69,
19,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
855,
67,
14772,
273,
599,
16,
1045,
67,
14772,
273,
599,
4672,
468,
11505,
401,
8548,
468,
12749,
273,
1173,
13640,
19,
14419,
19,
6891,
94,
322,
69,
19,... |
print_compact_traceback("bug: Preview Pane's parent widget doesn't \ have a layout. Preview Pane not added to the layout.") | print_compact_traceback("bug: Preview Pane's parent widget doesn't" \ " have a layout. Preview Pane not added to the layout.") | def __init__(self, parent, name, shareWidget): """ Constructs an instance of a Thumbview. """ | b4b66c5fd8aab2a545043d6730aa32d9c4d8cfcb /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11221/b4b66c5fd8aab2a545043d6730aa32d9c4d8cfcb/ThumbView.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
982,
16,
508,
16,
7433,
4609,
4672,
3536,
14291,
87,
392,
791,
434,
279,
935,
3592,
1945,
18,
3536,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
982,
16,
508,
16,
7433,
4609,
4672,
3536,
14291,
87,
392,
791,
434,
279,
935,
3592,
1945,
18,
3536,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
s = symbols[self._operator] if s in ['*', '/', '^']: | s1 = str(ops[1]) return self.parenthesize(s0, s1, self._operator) def _is_atomic(self): return self._atomic def parenthesize(self, s0, s1, op, op_symbols=symbols, paren_symbols=('(',')')): ''' Properly add parentheses with correct operator precedence in a string of ASCII math or latex. ''' if op in [operator.mul, operator.div, operator.pow]: | def _repr_(self): ops = self._operands s0 = str(ops[0]) s = symbols[self._operator] if s in ['*', '/', '^']: if '+' in s0 or '-' in s0: s0 = '(%s)'%s0 s1 = str(ops[1]) if s in ['*', '/', ' - ']: if '+' in s1 or '-' in s1: s1 = '(%s)'%s1 return "%s%s%s"% (s0, s, s1) # TODO: Bobby -- make the latex below use logic as above to parenthesize! | 2fdffb5c5999e725b2c280928225605d30738a89 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/2fdffb5c5999e725b2c280928225605d30738a89/calculus.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
12715,
67,
12,
2890,
4672,
6727,
273,
365,
6315,
4063,
5708,
272,
20,
273,
609,
12,
4473,
63,
20,
5717,
272,
21,
273,
609,
12,
4473,
63,
21,
5717,
327,
365,
18,
13012,
7915,
554... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
12715,
67,
12,
2890,
4672,
6727,
273,
365,
6315,
4063,
5708,
272,
20,
273,
609,
12,
4473,
63,
20,
5717,
272,
21,
273,
609,
12,
4473,
63,
21,
5717,
327,
365,
18,
13012,
7915,
554... |
sys.stdout.write("Found: %s\n",publication_url) | sys.stdout.write("Found: %s\n"%publication_url) | def __init__(self,type=None,ifo=None,time=None,snr=None,chisqr=None,mass1=None,mass2=None,mchirp=None): """ """ self.type=str(type) self.ifo=str(ifo) self.time=float(time) self.snr=float(snr) self.chisqr=float(chisqr) self.mass1=float(mass1) self.mass2=float(mass2) self.mchirp=float(mchirp) | 2ecdb740cf7779b329f5e5208424d8c61de2993d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/2ecdb740cf7779b329f5e5208424d8c61de2993d/makeCheckListWiki.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
723,
33,
7036,
16,
20299,
33,
7036,
16,
957,
33,
7036,
16,
8134,
86,
33,
7036,
16,
343,
291,
27401,
33,
7036,
16,
10424,
21,
33,
7036,
16,
10424,
22,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
723,
33,
7036,
16,
20299,
33,
7036,
16,
957,
33,
7036,
16,
8134,
86,
33,
7036,
16,
343,
291,
27401,
33,
7036,
16,
10424,
21,
33,
7036,
16,
10424,
22,
... |
self.layout.set_flags(gtk.CAN_FOCUS) self.window.set_focus(self.layout) | def __init__(self): | d58c579809d9403dea67a165875ccd600372f4f3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/d58c579809d9403dea67a165875ccd600372f4f3/mirage.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... | |
c = httpslib.HTTPSConnection(srv_host, srv_port, ssl_context=ctx2) c.set_session(ses) c.request('GET', '/') ses2 = c.get_session() | c2 = httpslib.HTTPSConnection(srv_host, srv_port, ssl_context=ctx2) c2.set_session(ses) c2.request('GET', '/') ses2 = c2.get_session() | def test_HTTPSConnection_resume_session(self): pid = self.start_server(self.args) try: from M2Crypto import httpslib ctx = SSL.Context() ctx.load_verify_locations(cafile='tests/ca.pem') ctx.load_cert('tests/x509.pem') ctx.set_verify(SSL.verify_peer | SSL.verify_fail_if_no_peer_cert, 1) ctx.set_session_cache_mode(m2.SSL_SESS_CACHE_CLIENT) c = httpslib.HTTPSConnection(srv_host, srv_port, ssl_context=ctx) c.request('GET', '/') ses = c.get_session() t = ses.as_text() data = c.getresponse().read() c.close() ctx2 = SSL.Context() ctx2.load_verify_locations(cafile='tests/ca.pem') ctx2.load_cert('tests/x509.pem') ctx2.set_verify(SSL.verify_peer | SSL.verify_fail_if_no_peer_cert, 1) ctx2.set_session_cache_mode(m2.SSL_SESS_CACHE_CLIENT) c = httpslib.HTTPSConnection(srv_host, srv_port, ssl_context=ctx2) c.set_session(ses) c.request('GET', '/') ses2 = c.get_session() t2 = ses2.as_text() data = c.getresponse().read() c.close() assert t == t2, "Sessions did not match" finally: self.stop_server(pid) self.failIf(string.find(data, 's_server -quiet -www') == -1) | 1a720a5c0213dd83b1591c8f9447ce741fa77206 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8055/1a720a5c0213dd83b1591c8f9447ce741fa77206/test_ssl.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
18657,
1952,
67,
25158,
67,
3184,
12,
2890,
4672,
4231,
273,
365,
18,
1937,
67,
3567,
12,
2890,
18,
1968,
13,
775,
30,
628,
490,
22,
18048,
1930,
1062,
24760,
1103,
273,
7419... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
18657,
1952,
67,
25158,
67,
3184,
12,
2890,
4672,
4231,
273,
365,
18,
1937,
67,
3567,
12,
2890,
18,
1968,
13,
775,
30,
628,
490,
22,
18048,
1930,
1062,
24760,
1103,
273,
7419... |
if len(value) > parent.degree(): raise ValueError, "list too long" self.__value = pari(0).Mod(parent._pari_modulus())*parent._pari_one() for i in range(len(value)): self.__value = self.__value + pari(int(value[i])).Mod(parent._pari_modulus())*pari("a^%s"%i) | self.__value = (pari(value).Polrev("a") * parent._pari_one()).Mod(parent._pari_modulus()) | def __init__(self, parent, value, check=True): """ Create element of a finite field. EXAMPLES:: sage: from sage.rings.finite_rings.finite_field_ext_pari import FiniteField_ext_pari sage: k = FiniteField_ext_pari(9,'a') sage: a = k(11); a 2 sage: a.parent() Finite Field in a of size 3^2 sage: V = k.vector_space(); v = V((1,2)) sage: k(v) 2*a + 1 """ field_element.FieldElement.__init__(self, parent) self.__class__ = dynamic_FiniteField_ext_pariElement if isinstance(value, str): raise TypeError, "value must not be a string" if not check: if not value: # see comment below about this workaround self.__value = pari(0).Mod(parent._pari_modulus())*parent._pari_one() else: self.__value = value return try: if isinstance(value, pari_gen): try: # In some cases we get two different versions of # the 0 element of a finite field. This has to do # with how PARI's Mod function works -- it treats # 0 differently. In particular, if value is a a # pari t_POLMOD that is 0, modding it simply # doesn't work correctly. We fix this by changing # the value in the 0 case to the standard pari 0, # which works correctly. Note -- probably all # this code should be replaced by much faster # finite field arithmetic programmed against NTL. if not value: value = pari(0) if value.type() == "t_POLMOD": self.__value = value * parent._pari_one() else: self.__value = value.Mod(parent._pari_modulus())*parent._pari_one() except RuntimeError: raise TypeError, "no possible coercion implemented" elif isinstance(value, FiniteField_ext_pariElement): if parent != value.parent(): raise TypeError, "no coercion implemented" else: self.__value = value.__value elif isinstance(value, FreeModuleElement): if parent.vector_space() != value.parent(): raise TypeError, "e.parent must match self.vector_space" self.__value = pari(0).Mod(parent._pari_modulus())*parent._pari_one() for i in range(len(value)): self.__value = self.__value + pari(int(value[i])).Mod(parent._pari_modulus())*pari("a^%s"%i) elif isinstance(value, list): if len(value) > parent.degree(): # could do something here... raise ValueError, "list too long" self.__value = pari(0).Mod(parent._pari_modulus())*parent._pari_one() for i in range(len(value)): self.__value = self.__value + pari(int(value[i])).Mod(parent._pari_modulus())*pari("a^%s"%i) else: try: self.__value = pari(value).Mod(parent._pari_modulus())*parent._pari_one() except RuntimeError: raise TypeError, "no coercion implemented" | f688e6e1fb9cc0bcd16233f1ab988c2f891718ec /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/f688e6e1fb9cc0bcd16233f1ab988c2f891718ec/element_ext_pari.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
982,
16,
460,
16,
866,
33,
5510,
4672,
3536,
1788,
930,
434,
279,
25922,
652,
18,
225,
5675,
8900,
11386,
2866,
225,
272,
410,
30,
628,
272,
410,
18,
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,
2738,
972,
12,
2890,
16,
982,
16,
460,
16,
866,
33,
5510,
4672,
3536,
1788,
930,
434,
279,
25922,
652,
18,
225,
5675,
8900,
11386,
2866,
225,
272,
410,
30,
628,
272,
410,
18,
8... |
Return the sextic twist of this curve by D. | Return the sextic twist of this curve by D, which must be nonzero. | def sextic_twist(self, D): """ Return the sextic twist of this curve by D. | 64539823ea94664d53b5483ac22e7ceb66c96770 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/64539823ea94664d53b5483ac22e7ceb66c96770/ell_generic.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
272,
408,
335,
67,
11246,
376,
12,
2890,
16,
463,
4672,
3536,
2000,
326,
272,
408,
335,
2339,
376,
434,
333,
8882,
635,
463,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
272,
408,
335,
67,
11246,
376,
12,
2890,
16,
463,
4672,
3536,
2000,
326,
272,
408,
335,
2339,
376,
434,
333,
8882,
635,
463,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
service (which is, in turn, a wrapper around the real status checker). | service (which is, in turn, a wrapper around the real status checker). | def check_status(self, path, recurse=False, invalidate=False, summary=False, callback=False): """ Check the VCS status of the given path. This is a pass-through method to the check_status method of the DBUS service (which is, in turn, a wrapper around the real status checker). """ status = None try: pickled_status = self.status_checker.CheckStatus(path, recurse, invalidate, summary, callback, dbus_interface=INTERFACE, timeout=TIMEOUT) status = cPickle.loads(str(pickled_status)) # Test client error problems :) # raise dbus.DBusException("Test") except dbus.DBusException, ex: log.exception(ex) status = rabbitvcs.vcs.status.Status.status_error(path) | 566f258b1726126b45d514740357cd93019682b0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5119/566f258b1726126b45d514740357cd93019682b0/checkerservice.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
67,
2327,
12,
2890,
16,
589,
16,
11502,
33,
8381,
16,
11587,
33,
8381,
16,
4916,
33,
8381,
16,
1348,
33,
8381,
4672,
3536,
2073,
326,
776,
4596,
1267,
434,
326,
864,
589,
18,
22... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
67,
2327,
12,
2890,
16,
589,
16,
11502,
33,
8381,
16,
11587,
33,
8381,
16,
4916,
33,
8381,
16,
1348,
33,
8381,
4672,
3536,
2073,
326,
776,
4596,
1267,
434,
326,
864,
589,
18,
22... |
self.table = zeros( (text1_range, text2_range), typecode ) | self.table = ones( (text1_range, text2_range), typecode ) | def __init__( self, gap_open, gap_extend, default=-100, alphabet1="ACGT", alphabet2=None, gap1="-", gap2=None, text1_range=128, text2_range=None, typecode=Int ): if (text2_range == None): text2_range = text1_range if (alphabet2 == None): alphabet2 = alphabet1 if (gap2 == None): gap2 = gap1 # (scheme with gap1=gap2=None is legit) if type(alphabet1) == str: alphabet1 = [ch for ch in alphabet1] if type(alphabet2) == str: alphabet2 = [ch for ch in alphabet2] self.table = zeros( (text1_range, text2_range), typecode ) self.table *= default self.gap_open = gap_open self.gap_extend = gap_extend self.gap1 = gap1 self.gap2 = gap2 self.alphabet1 = alphabet1 self.alphabet2 = alphabet2 | c5b541a2761dd71a22571dc1ffd9f0392aa18aef /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2104/c5b541a2761dd71a22571dc1ffd9f0392aa18aef/score.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
365,
16,
9300,
67,
3190,
16,
9300,
67,
14313,
16,
805,
29711,
6625,
16,
10877,
21,
1546,
2226,
16506,
3113,
10877,
22,
33,
7036,
16,
9300,
21,
1546,
17,
3113,
9300... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
365,
16,
9300,
67,
3190,
16,
9300,
67,
14313,
16,
805,
29711,
6625,
16,
10877,
21,
1546,
2226,
16506,
3113,
10877,
22,
33,
7036,
16,
9300,
21,
1546,
17,
3113,
9300... |
if(filename == "stdout"): print("[%f - %f]") % (self.start, self.end) | if(filename == 'stdout'): print('[%f - %f]') % (self.start, self.end) | def debugPrint(self, filename): if(filename == "stdout"): print("[%f - %f]") % (self.start, self.end) for l in self.list: if(l.freturn and l.fcall): print("%f (%02d): %s(); (%.3f us)" % (l.time, l.depth, l.name, l.length*1000000)) elif(l.freturn): print("%f (%02d): %s} (%.3f us)" % (l.time, l.depth, l.name, l.length*1000000)) else: print("%f (%02d): %s() { (%.3f us)" % (l.time, l.depth, l.name, l.length*1000000)) print(" ") else: fp = open(filename, 'w') print(filename) for l in self.list: if(l.freturn and l.fcall): fp.write("%f (%02d): %s(); (%.3f us)\n" % (l.time, l.depth, l.name, l.length*1000000)) elif(l.freturn): fp.write("%f (%02d): %s} (%.3f us)\n" % (l.time, l.depth, l.name, l.length*1000000)) else: fp.write("%f (%02d): %s() { (%.3f us)\n" % (l.time, l.depth, l.name, l.length*1000000)) fp.close() | 0c52bda8f6c5785b5982bc3636b627b4ccd59c3f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5327/0c52bda8f6c5785b5982bc3636b627b4ccd59c3f/analyze_suspend.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1198,
5108,
12,
2890,
16,
1544,
4672,
309,
12,
3459,
422,
296,
10283,
11,
4672,
1172,
2668,
14451,
74,
300,
738,
74,
3864,
13,
738,
261,
2890,
18,
1937,
16,
365,
18,
409,
13,
364,
32... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1198,
5108,
12,
2890,
16,
1544,
4672,
309,
12,
3459,
422,
296,
10283,
11,
4672,
1172,
2668,
14451,
74,
300,
738,
74,
3864,
13,
738,
261,
2890,
18,
1937,
16,
365,
18,
409,
13,
364,
32... |
sourcetype=targettype, targettype=sourcetype, | allowed_source_types=allowed_target_types, allowed_target_types=allowed_source_types, | def getAllowedTypes(obj): if obj.isAbstract(): allowed_types=tuple(obj.getGenChildrenNames()) else: allowed_types=(obj.getName(),) + tuple(obj.getGenChildrenNames()) return allowed_types | b4d972cc9b9b63e78cba23e65b662ffcad5e88ea /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11941/b4d972cc9b9b63e78cba23e65b662ffcad5e88ea/ArchetypesGenerator.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
26898,
2016,
12,
2603,
4672,
309,
1081,
18,
291,
7469,
13332,
2935,
67,
2352,
33,
8052,
12,
2603,
18,
588,
7642,
4212,
1557,
10756,
469,
30,
2935,
67,
2352,
28657,
2603,
18,
17994,
9334,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
26898,
2016,
12,
2603,
4672,
309,
1081,
18,
291,
7469,
13332,
2935,
67,
2352,
33,
8052,
12,
2603,
18,
588,
7642,
4212,
1557,
10756,
469,
30,
2935,
67,
2352,
28657,
2603,
18,
17994,
9334,... |
raise self.SeeOther(self.prefix+objs[-1].path()) | try: required_permission, error = \ self.required_object_permission[obj.type] except KeyError: raise RuntimeError('Object of unexpected type %r' % obj.type) else: if required_permission and \ not user.checkPermission(required_permission, obj.permissions): obj = self.site raise self.SeeOther(self.prefix+obj.path()) | def cmd_notAuthorized(self, request, response, form, objs, user): login, passwd, perm_login = [form.getfirst(name) for name in \ ('login', 'passwd', 'perm_login')] # crypt method used below only supports string types try: passwd = str(passwd) except UnicodeEncodeError: passwd = None | 8fb7e21b1d316ce672cdc682e04ba85779517c50 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1871/8fb7e21b1d316ce672cdc682e04ba85779517c50/qSecurity.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1797,
67,
902,
15341,
12,
2890,
16,
590,
16,
766,
16,
646,
16,
12721,
16,
729,
4672,
3925,
16,
19093,
16,
4641,
67,
5819,
273,
306,
687,
18,
588,
3645,
12,
529,
13,
364,
508,
316,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1797,
67,
902,
15341,
12,
2890,
16,
590,
16,
766,
16,
646,
16,
12721,
16,
729,
4672,
3925,
16,
19093,
16,
4641,
67,
5819,
273,
306,
687,
18,
588,
3645,
12,
529,
13,
364,
508,
316,
... |
cmdrun = rosettaSetup_CommandRun(self, self.rosettaArgs) | cmdrun = rosettaSetup_CommandRun(self, self.rosettaArgs, "ROSETTA_FIXED_BACKBONE_SEQUENCE_DESIGN") | def runRosetta(self): """ Run a Rosetta simulation. """ from simulation.ROSETTA.rosetta_commandruns import rosettaSetup_CommandRun if self.rosettaArgs[0] > 0: cmdrun = rosettaSetup_CommandRun(self, self.rosettaArgs) cmdrun.run() return | 748aecc09146d619806d928ec0a973cb058fe294 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11221/748aecc09146d619806d928ec0a973cb058fe294/MWsemantics.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
54,
538,
278,
2351,
12,
2890,
4672,
3536,
1939,
279,
534,
538,
278,
2351,
14754,
18,
3536,
628,
14754,
18,
1457,
27543,
37,
18,
303,
542,
2351,
67,
3076,
20152,
1930,
721,
542,
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,
1086,
54,
538,
278,
2351,
12,
2890,
4672,
3536,
1939,
279,
534,
538,
278,
2351,
14754,
18,
3536,
628,
14754,
18,
1457,
27543,
37,
18,
303,
542,
2351,
67,
3076,
20152,
1930,
721,
542,
2... |
'cpu MHz': 'cpu_speed', 'MemTotal': 'mem_total', 'MemFree': 'mem_free', 'kernel_version': 'kernel_version', 'processor': 'processors', 'cache size': 'cpu_cache_size', 'fpu': 'fpu', 'hostname': 'hostname', 'cpus': 'cpus', 'ip': 'ip', 'os': 'os'} | 'cpu MHz': 'cpu_speed', 'MemTotal': 'mem_total', 'MemFree': 'mem_free', 'kernel_version': 'kernel_version', 'processor': 'processors', 'cache size': 'cpu_cache_size', 'fpu': 'fpu', 'hostname': 'hostname', 'cpus': 'cpus', 'ip': 'ip', 'os': 'os'} | def canonical_info(self, platform_host_info): """ Standarize host info so we can parse it easily. | 54447c13995c79aea607199f94f180dd6ff43970 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9417/54447c13995c79aea607199f94f180dd6ff43970/hostinfo.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7378,
67,
1376,
12,
2890,
16,
4072,
67,
2564,
67,
1376,
4672,
3536,
934,
464,
297,
554,
1479,
1123,
1427,
732,
848,
1109,
518,
17997,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7378,
67,
1376,
12,
2890,
16,
4072,
67,
2564,
67,
1376,
4672,
3536,
934,
464,
297,
554,
1479,
1123,
1427,
732,
848,
1109,
518,
17997,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
assert(self.debugPrint("disable()")) | assert self.notify.debugCall(id(self)) | def disable(self): assert(self.debugPrint("disable()")) self.isEnabled = 0 self.currentControls.disableAvatarControls() | 0bea4027c8db26a10f5ec9f91a7dd47cf04ae716 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7242/0bea4027c8db26a10f5ec9f91a7dd47cf04ae716/ControlManager.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4056,
12,
2890,
4672,
1815,
365,
18,
12336,
18,
4148,
1477,
12,
350,
12,
2890,
3719,
365,
18,
291,
1526,
273,
374,
365,
18,
2972,
16795,
18,
8394,
23999,
16795,
1435,
2,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4056,
12,
2890,
4672,
1815,
365,
18,
12336,
18,
4148,
1477,
12,
350,
12,
2890,
3719,
365,
18,
291,
1526,
273,
374,
365,
18,
2972,
16795,
18,
8394,
23999,
16795,
1435,
2,
-100,
-100,
-1... |
reference = self.uri.resolve(name) | reference = self.uri.path.resolve2(name) | def _get_resource(self, name): reference = self.uri.resolve(name) return get_resource(reference) | 09a7a3b8d19cf562360a7d3178cccfb44638de03 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12681/09a7a3b8d19cf562360a7d3178cccfb44638de03/zope2.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
67,
3146,
12,
2890,
16,
508,
4672,
2114,
273,
365,
18,
1650,
18,
803,
18,
10828,
22,
12,
529,
13,
327,
336,
67,
3146,
12,
6180,
13,
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,
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,
389,
588,
67,
3146,
12,
2890,
16,
508,
4672,
2114,
273,
365,
18,
1650,
18,
803,
18,
10828,
22,
12,
529,
13,
327,
336,
67,
3146,
12,
6180,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Subtitle | Section ------- | def suite(): s = DocutilsTestSupport.HtmlPublishPartsTestSuite() s.generateTests(totest) return s | 89e95c9ef49e6f34e6b535300d7e23964ce090cc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1532/89e95c9ef49e6f34e6b535300d7e23964ce090cc/test_parts.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11371,
13332,
272,
273,
3521,
5471,
4709,
6289,
18,
4353,
6024,
4305,
4709,
13587,
1435,
272,
18,
7163,
14650,
12,
3307,
395,
13,
327,
272,
282,
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,
0,
0,
0,
0,
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,
11371,
13332,
272,
273,
3521,
5471,
4709,
6289,
18,
4353,
6024,
4305,
4709,
13587,
1435,
272,
18,
7163,
14650,
12,
3307,
395,
13,
327,
272,
282,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
def write_host_file_sunos(self, ip, device): | def write_host_file_sunos(self, ip, netmask, device): | def write_host_file_sunos(self, ip, device): s = '<file name="/etc/hostname.%s">\n' % device s += "%s\n" % ip s += '</file>\n' self.addText(s) | c648f91283e4672a6d000eda65c577697a536cb1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7066/c648f91283e4672a6d000eda65c577697a536cb1/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
67,
2564,
67,
768,
67,
16924,
538,
12,
2890,
16,
2359,
16,
24172,
16,
2346,
4672,
272,
273,
2368,
768,
508,
1546,
19,
14175,
19,
10358,
7866,
87,
6,
5333,
82,
11,
738,
2346,
27... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
67,
2564,
67,
768,
67,
16924,
538,
12,
2890,
16,
2359,
16,
24172,
16,
2346,
4672,
272,
273,
2368,
768,
508,
1546,
19,
14175,
19,
10358,
7866,
87,
6,
5333,
82,
11,
738,
2346,
27... |
'help': fields.text('Action description') | 'help': fields.text('Action description', help='Optional help text for the users with a description of the target view, such as its usage and purpose.') | def process_child(node, new_node, doc): for child in node.childNodes: if child.localName=='field' and child.hasAttribute('select') and child.getAttribute('select')=='1': if child.childNodes: fld = doc.createElement('field') for attr in child.attributes.keys(): fld.setAttribute(attr, child.getAttribute(attr)) new_node.appendChild(fld) else: new_node.appendChild(child) elif child.localName in ('page','group','notebook'): process_child(child, new_node, doc) | 0beb7c04c9fa1cf3af288972e04b5eb4392cd2c5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12853/0beb7c04c9fa1cf3af288972e04b5eb4392cd2c5/ir_actions.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
67,
3624,
12,
2159,
16,
394,
67,
2159,
16,
997,
4672,
364,
1151,
316,
756,
18,
3624,
3205,
30,
309,
1151,
18,
3729,
461,
18920,
1518,
11,
471,
1151,
18,
5332,
1499,
2668,
4025,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3624,
12,
2159,
16,
394,
67,
2159,
16,
997,
4672,
364,
1151,
316,
756,
18,
3624,
3205,
30,
309,
1151,
18,
3729,
461,
18920,
1518,
11,
471,
1151,
18,
5332,
1499,
2668,
4025,
... |
chosenIndex = random.choice(bestIndices) print "Best utility is", bestUtility | chosenIndex = bestIndices[0] | def getAction(self, gameState): """ Returns the minimax action from the current gameState using self.depth and self.evaluationFunction. """ nextActions = gameState.getLegalActions(0); nextStates = [gameState.generatePacmanSuccessor(action) for action in nextActions] utilityValues = [self.maxvalue(state, self.depth-1) for state in nextStates] bestUtility = max(utilityValues) bestIndices = [index for index in range(len(utilityValues)) if utilityValues[index] == bestUtility] chosenIndex = random.choice(bestIndices) print "Best utility is", bestUtility return nextActions[chosenIndex] | f3f73bc2d88b8ce531ac067f1274442aa92e23a2 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/840/f3f73bc2d88b8ce531ac067f1274442aa92e23a2/multiAgents.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12473,
12,
2890,
16,
7920,
1119,
4672,
3536,
2860,
326,
18172,
651,
1301,
628,
326,
783,
7920,
1119,
1450,
365,
18,
5979,
471,
365,
18,
14168,
367,
2083,
18,
3536,
225,
1024,
6100,
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,
12473,
12,
2890,
16,
7920,
1119,
4672,
3536,
2860,
326,
18172,
651,
1301,
628,
326,
783,
7920,
1119,
1450,
365,
18,
5979,
471,
365,
18,
14168,
367,
2083,
18,
3536,
225,
1024,
6100,
273,
... |
switch.addstmt(cxx.Label(t._tag)) | switch.addstmt(cxx.CaseLabel(r.type.name +'::'+t._tag)) | block.addstmt(cxx.CppDirective('endif', '// ifdef DEBUG')) | af5a28651f5c6a1e3baf00de15bfc27c838f3c14 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11102/af5a28651f5c6a1e3baf00de15bfc27c838f3c14/lower.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1203,
18,
1289,
10589,
12,
71,
5279,
18,
39,
11858,
13307,
2668,
409,
430,
2187,
12084,
309,
536,
6369,
26112,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1203,
18,
1289,
10589,
12,
71,
5279,
18,
39,
11858,
13307,
2668,
409,
430,
2187,
12084,
309,
536,
6369,
26112,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
thread_desc = 0; status = py_pjsua.thread_register("worker thread", thread_desc) if status != 0: py_pjsua.perror(APP, "Error registering thread", status) else: while C_QUIT == 0: py_pjsua.handle_events(50) | global C_QUIT thread_desc = 0; status = py_pjsua.thread_register("python worker", thread_desc) if status != 0: py_pjsua.perror(THIS_FILE, "Error registering thread", status) else: while C_QUIT == 0: py_pjsua.handle_events(50) print "Worker thread quitting.." C_QUIT = 2 | def worker_thread_main(arg): thread_desc = 0; status = py_pjsua.thread_register("worker thread", thread_desc) if status != 0: py_pjsua.perror(APP, "Error registering thread", status) else: while C_QUIT == 0: py_pjsua.handle_events(50) | 255ad5714a02b66ebbc5d14e293bf49a33f9a4dc /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8531/255ad5714a02b66ebbc5d14e293bf49a33f9a4dc/pjsua_app.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4322,
67,
5930,
67,
5254,
12,
3175,
4672,
2552,
385,
67,
3500,
1285,
2650,
67,
5569,
273,
374,
31,
1267,
273,
2395,
67,
84,
2924,
11886,
18,
5930,
67,
4861,
2932,
8103,
4322,
3113,
265... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4322,
67,
5930,
67,
5254,
12,
3175,
4672,
2552,
385,
67,
3500,
1285,
2650,
67,
5569,
273,
374,
31,
1267,
273,
2395,
67,
84,
2924,
11886,
18,
5930,
67,
4861,
2932,
8103,
4322,
3113,
265... |
def getContainerNameByIdGen(self, id): return self._id2ref[id].getEvalStrGen() | def getContainerNameByIdGen(self, id, **kwArgs): return self._id2ref[id].getEvalStrGen(**kwArgs) | def getContainerNameByIdGen(self, id): return self._id2ref[id].getEvalStrGen() | 4b0c19f61ad7b72d770281f09de1f398289fc892 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8543/4b0c19f61ad7b72d770281f09de1f398289fc892/ContainerLeakDetector.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9272,
461,
5132,
7642,
12,
2890,
16,
612,
4672,
327,
365,
6315,
350,
22,
1734,
63,
350,
8009,
588,
13904,
1585,
7642,
1435,
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,
9272,
461,
5132,
7642,
12,
2890,
16,
612,
4672,
327,
365,
6315,
350,
22,
1734,
63,
350,
8009,
588,
13904,
1585,
7642,
1435,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
SOBLOBCol.__init__(self, **kw) | super(SOPickleCol, self).__init__(**kw) | def __init__(self, **kw): self.pickleProtocol = popKey(kw, 'pickleProtocol', 1) SOBLOBCol.__init__(self, **kw) | 629bd9cef417a9b39081bf7b5542b86ae165b282 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8798/629bd9cef417a9b39081bf7b5542b86ae165b282/col.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
2826,
9987,
4672,
365,
18,
20847,
5752,
273,
1843,
653,
12,
9987,
16,
296,
20847,
5752,
2187,
404,
13,
348,
5704,
6038,
914,
16186,
2738,
972,
12,
2890,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
2826,
9987,
4672,
365,
18,
20847,
5752,
273,
1843,
653,
12,
9987,
16,
296,
20847,
5752,
2187,
404,
13,
348,
5704,
6038,
914,
16186,
2738,
972,
12,
2890,
... |
result=handler.sendMessage(message['server_url'],message['parameters']) | result=HandleJobSuccess.sendMessage(message['server_url'],message['parameters']) | def execute(self): logging.debug("Executing state: QueuedMessages") ignoreUrl={} | 161ff72953a1864315ff67fee12b437ec96e23e0 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8887/161ff72953a1864315ff67fee12b437ec96e23e0/QueuedMessages.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1836,
12,
2890,
4672,
2907,
18,
4148,
2932,
22134,
919,
30,
27949,
5957,
5058,
7923,
2305,
1489,
12938,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1836,
12,
2890,
4672,
2907,
18,
4148,
2932,
22134,
919,
30,
27949,
5957,
5058,
7923,
2305,
1489,
12938,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
active.append(t) | if web and first: t.join() if t.cl: m[t.cl.name] = t.cl first = False else: active.append(t) | def LoadAllCL(ui, repo, web=True): dir = CodeReviewDir(ui, repo) m = {} files = [f for f in os.listdir(dir) if f.startswith('cl.')] if not files: return m if web: # Authenticate now, so we can use threads below MySend(None) active = [] for f in files: t = LoadCLThread(ui, repo, dir, f, web) t.start() active.append(t) for t in active: t.join() if t.cl: m[t.cl.name] = t.cl return m | 88ca6eb28666ad33c2ae2decb62eb073a093932d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5761/88ca6eb28666ad33c2ae2decb62eb073a093932d/codereview.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4444,
1595,
5017,
12,
4881,
16,
3538,
16,
3311,
33,
5510,
4672,
1577,
273,
3356,
9159,
1621,
12,
4881,
16,
3538,
13,
312,
273,
2618,
1390,
273,
306,
74,
364,
284,
316,
1140,
18,
1098,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4444,
1595,
5017,
12,
4881,
16,
3538,
16,
3311,
33,
5510,
4672,
1577,
273,
3356,
9159,
1621,
12,
4881,
16,
3538,
13,
312,
273,
2618,
1390,
273,
306,
74,
364,
284,
316,
1140,
18,
1098,
... |
self.assertMatchesRegex('"America/Alviso" isn\'t', e.FormatProblem()) | self.assertMatchesRegex('"America/Alviso" is not a common timezone', e.FormatProblem()) | def runTest(self): # success case agency = transitfeed.Agency(name='Test Agency', url='http://example.com', timezone='America/Los_Angeles', id='TA', lang='xh') self.ExpectNoProblems(agency) | e1596ac3832ed8fffff36eaccd93843ec7aaa0b3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6829/e1596ac3832ed8fffff36eaccd93843ec7aaa0b3/testtransitfeed.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
4709,
12,
2890,
4672,
468,
2216,
648,
1737,
2075,
273,
22755,
7848,
18,
2577,
2075,
12,
529,
2218,
4709,
5495,
2075,
2187,
880,
2218,
2505,
2207,
8236,
18,
832,
2187,
6371,
2218,
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,
1086,
4709,
12,
2890,
4672,
468,
2216,
648,
1737,
2075,
273,
22755,
7848,
18,
2577,
2075,
12,
529,
2218,
4709,
5495,
2075,
2187,
880,
2218,
2505,
2207,
8236,
18,
832,
2187,
6371,
2218,
2... |
Return arithmatic sequence determined by the numeric arguments and ellipsis. Best illistrated by examples. | Return arithmetic sequence determined by the numeric arguments and ellipsis. Best illustrated by examples. | def ellipsis_range(*args, **kwds): """ Return arithmatic sequence determined by the numeric arguments and ellipsis. Best illistrated by examples. Use [1,2,..,n] notation. EXAMPLES: sage: ellipsis_range(1,Ellipsis,11,100) [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 100] sage: ellipsis_range(0,2,Ellipsis,10,Ellipsis,20) [0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20] sage: ellipsis_range(0,2,Ellipsis,11,Ellipsis,20) [0, 2, 4, 6, 8, 10, 11, 13, 15, 17, 19] sage: ellipsis_range(0,2,Ellipsis,11,Ellipsis,20, step=3) [0, 2, 5, 8, 11, 14, 17, 20] sage: ellipsis_range(10,Ellipsis,0) [] TESTS: These were carefully chosen tests, only to be changed if the semantics of ellipsis ranges change. In otherwords, if they don't pass it's probably a bug in the implementation, not in the doctest. Note 10 only appears once (though it is in both ranges). sage: ellipsis_range(0,Ellipsis,10,Ellipsis,20,step=2) [0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20] Sometimes one or more ranges is emtpy. sage: ellipsis_range(100,Ellipsis,10,Ellipsis,20,step=2) [10, 12, 14, 16, 18, 20] sage: ellipsis_range(0,Ellipsis,10,Ellipsis,-20,step=2) [0, 2, 4, 6, 8, 10] sage: ellipsis_range(100,Ellipsis,10,Ellipsis,-20,step=2) [] We always start on the leftmost point of the range. sage: ellipsis_range(0,Ellipsis,10,Ellipsis,20,step=3) [0, 3, 6, 9, 10, 13, 16, 19] sage: ellipsis_range(100,Ellipsis,10,Ellipsis,20,step=3) [10, 13, 16, 19] sage: ellipsis_range(0,Ellipsis,10,Ellipsis,-20,step=3) [0, 3, 6, 9] sage: ellipsis_range(100,Ellipsis,10,Ellipsis,-20,step=3) [] sage: ellipsis_range(0,1,Ellipsis,-10) [] sage: ellipsis_range(0,1,Ellipsis,-10,step=1) [0] sage: ellipsis_range(100,0,1,Ellipsis,-10) [100] Note the duplicate 5 in the output. sage: ellipsis_range(0,Ellipsis,5,5,Ellipsis,10) [0, 1, 2, 3, 4, 5, 5, 6, 7, 8, 9, 10] Examples in which the step determines the parent of the elements: sage: [1..3, step=0.5] [1.00000000000000, 1.50000000000000, 2.00000000000000, 2.50000000000000, 3.00000000000000] sage: v = [1..5, step=1/1]; v [1, 2, 3, 4, 5] sage: parent(v[2]) Rational Field """ # Use kwds so step not absorbed into *args step_magic = 0 if len(kwds) == 0: step = 1 if Ellipsis in args: i = list(args).index(Ellipsis) if i > 1: step = args[i-1]-args[i-2] step_magic = i else: step = kwds.pop('step') if len(kwds) != 0: TypeError, "Unexpected keywords", kwds from sage.structure.sequence import Sequence S = Sequence([a for a in args if a is not Ellipsis] + [step]) universe = S.universe() args = [Ellipsis if a is Ellipsis else universe(a) for a in args] step = universe(step) skip = False last_end = None L = [] for i in range(len(args)): if skip: skip = False elif args[i] is Ellipsis: start, end = args[i-1], args[i+1] if i < 2 or args[i-2] is not Ellipsis: L.pop() if i == step_magic: L.pop() start = args[i-2] more = srange(start, end, step, universe=universe, check=False, include_endpoint=True) if len(more) > 0: if last_end == more[0]: L.pop() last_end = more[-1] L += more else: last_end = None skip = True else: L.append(args[i]) last_end = None return L | 2c6730b01cdeb311eff9f1c7d21f5de50d9e60ec /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/2c6730b01cdeb311eff9f1c7d21f5de50d9e60ec/misc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
28992,
67,
3676,
30857,
1968,
16,
2826,
25577,
4672,
3536,
2000,
30828,
3102,
11383,
635,
326,
6389,
1775,
471,
28992,
18,
25717,
277,
2906,
27008,
690,
635,
10991,
18,
225,
2672,
306,
21,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
28992,
67,
3676,
30857,
1968,
16,
2826,
25577,
4672,
3536,
2000,
30828,
3102,
11383,
635,
326,
6389,
1775,
471,
28992,
18,
25717,
277,
2906,
27008,
690,
635,
10991,
18,
225,
2672,
306,
21,... |
print "<p><a href='chart.svg'><p>Chart of all income vs expense</p><img src='all.svg'></a></p>" | print "<p><a href='all.svg'><p>Chart of all income vs expense</p><img src='all.svg'></a></p>" | def doCommand(year, inputURI="/dev/stdin"): """Fin - financial summary <command> <options> <inputURIs> Totals transactions by classes to which they are known to belong This is or was http://www.w3.org/2000/10/swap/pim/fin.py | 91a7135d80153b40118ce9cf0f73dcc5bf983d4a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3308/91a7135d80153b40118ce9cf0f73dcc5bf983d4a/fin.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
2189,
12,
6874,
16,
810,
3098,
1546,
19,
5206,
19,
21772,
6,
4672,
3536,
6187,
300,
574,
19292,
649,
4916,
225,
411,
3076,
34,
411,
2116,
34,
411,
2630,
1099,
2520,
34,
399,
352,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2189,
12,
6874,
16,
810,
3098,
1546,
19,
5206,
19,
21772,
6,
4672,
3536,
6187,
300,
574,
19292,
649,
4916,
225,
411,
3076,
34,
411,
2116,
34,
411,
2630,
1099,
2520,
34,
399,
352,
... |
return [self(i) for i in range(1, 1+2**(self.cartanType.n))] | return [self(Integer(i)) for i in range(1, 1+2**(self.cartanType.n))] | def list(self): return [self(i) for i in range(1, 1+2**(self.cartanType.n))] | 9752f8843da877b6e6780a210e994deb784dfdc1 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/9752f8843da877b6e6780a210e994deb784dfdc1/spins.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
666,
12,
2890,
4672,
327,
306,
2890,
12,
77,
13,
364,
277,
316,
1048,
12,
21,
16,
404,
15,
22,
636,
12,
2890,
18,
11848,
304,
559,
18,
82,
3719,
65,
2,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
666,
12,
2890,
4672,
327,
306,
2890,
12,
77,
13,
364,
277,
316,
1048,
12,
21,
16,
404,
15,
22,
636,
12,
2890,
18,
11848,
304,
559,
18,
82,
3719,
65,
2,
-100,
-100,
-100,
-100,
-100... |
commands.usage(argv[2:]) | run_cmd('usage') | def start_cmd(argv): cmd_arg = '' if len(argv) > 1: cmd_arg = argv[1] # change common help args to help command if cmd_arg in ('--help', '-h', '--usage', '-u', '/?'): cmd_arg = 'usage' completions = complete_command(cmd_arg) if cmd_arg and len(completions) > 0: if len(completions) == 1: # get the only completion (since in this case we have 1) cmd = completions[0] # build up the first part of the map (for illustrative purposes) cmd_map = list() if cmd_arg != cmd: cmd_map.append(cmd_arg) cmd_map.append(cmd) # map an alias to the command, and build up the map if cmd in cmd_alias_dict.keys(): alias = cmd if cmd_arg == cmd: cmd_map.append(alias) cmd = cmd_alias_dict[cmd] cmd_map.append(cmd) # show command map to avoid confusion if len(cmd_map) != 0: print 'Mapping command: %s' % ' -> '.join(cmd_map) # pass args and optarg data to command handler, which figures out # how to handle the arguments optarg_data = cmd_dict[cmd] handler = commands.CommandHandler(argv[2:], optarg_data) # use reflection to get the function pointer cmd_func = getattr(handler, cmd) cmd_func() return 0 else: print ( 'Command `%s` too ambiguous, ' 'could mean any of: %s' ) % (cmd_arg, ', '.join(completions)) else: if len(argv) == 1: print 'No command specified, showing usage.\n' else: print 'Command not recognised: %s\n' % cmd_arg commands.usage(argv[2:]) # generic error code if not returned sooner return 1 | 42ce2fdf18b769d6d568447ff569276e0f22919f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7412/42ce2fdf18b769d6d568447ff569276e0f22919f/hm.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
787,
67,
4172,
12,
19485,
4672,
225,
1797,
67,
3175,
273,
875,
309,
562,
12,
19485,
13,
405,
404,
30,
1797,
67,
3175,
273,
5261,
63,
21,
65,
225,
468,
2549,
2975,
2809,
833,
358,
280... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
67,
4172,
12,
19485,
4672,
225,
1797,
67,
3175,
273,
875,
309,
562,
12,
19485,
13,
405,
404,
30,
1797,
67,
3175,
273,
5261,
63,
21,
65,
225,
468,
2549,
2975,
2809,
833,
358,
280... |
a0, a1, a2 = self._triple b0, b1, b2 = other._triple M = self.parent()._speedup_matrix p0 = a0 * b0 p1 = (a0 + 2*a1 + 4*a2) * (b0 + 2*b1 + 4*b2) p2 = (a0 + a1 + a2) * (b0 + b1 + b2) p3 = (4*a0 + 2*a1 + a2) * (4*b0 + 2*b1 + b2) p4 = a2 * b2 q1 = p1 - p0 - 16*p4 q2 = p2 - p0 - p4 q3 = p3 - 16*p0 - p4 c0 = p0 c1 = M[0]*q1 + M[1]*q2 + M[2]*q3 c2 = M[3]*q1 + M[4]*q2 + M[5]*q3 c3 = M[6]*q1 + M[7]*q2 + M[8]*q3 c4 = p4 parent = self.parent() T = parent._poly_generator b = parent._b a = parent._a a = parent._poly_ring(a) b = parent._poly_ring(b) return SpecialCubicQuotientRingElement(parent, -b*c3 + c0 + c3*T, -b*c4 - a*c3 + c1 + c4*T, -a*c4 + c2, check=False) | a0, a1, a2 = self._triple b0, b1, b2 = other._triple M = self.parent()._speedup_matrix p0 = a0 * b0 p1 = (a0 + 2*a1 + 4*a2) * (b0 + 2*b1 + 4*b2) p2 = (a0 + a1 + a2) * (b0 + b1 + b2) p3 = (4*a0 + 2*a1 + a2) * (4*b0 + 2*b1 + b2) p4 = a2 * b2 q1 = p1 - p0 - 16*p4 q2 = p2 - p0 - p4 q3 = p3 - 16*p0 - p4 c0 = p0 c1 = M[0]*q1 + M[1]*q2 + M[2]*q3 c2 = M[3]*q1 + M[4]*q2 + M[5]*q3 c3 = M[6]*q1 + M[7]*q2 + M[8]*q3 c4 = p4 parent = self.parent() T = parent._poly_generator b = parent._b a = parent._a a = parent._poly_ring(a) b = parent._poly_ring(b) return SpecialCubicQuotientRingElement(parent, -b*c3 + c0 + c3*T, -b*c4 - a*c3 + c1 + c4*T, -a*c4 + c2, check=False) | def _mul_(self, other): # todo: cache results of toom-cook splitting, i.e. often we multiply # the same polynomial by a bunch of other things, and we can save # on part of the repetitve work | 96d650d0f0fcc7861c7aa0239ca628104a5bc252 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/96d650d0f0fcc7861c7aa0239ca628104a5bc252/monsky_washnitzer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
16411,
67,
12,
2890,
16,
1308,
4672,
468,
10621,
30,
1247,
1686,
434,
358,
362,
17,
29854,
20347,
16,
277,
18,
73,
18,
16337,
732,
10194,
468,
326,
1967,
16991,
635,
279,
25606,
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,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
16411,
67,
12,
2890,
16,
1308,
4672,
468,
10621,
30,
1247,
1686,
434,
358,
362,
17,
29854,
20347,
16,
277,
18,
73,
18,
16337,
732,
10194,
468,
326,
1967,
16991,
635,
279,
25606,
4... |
signal.signal(signal.SIGINT, signalHandler) | def _main(arglist): signal.signal(signal.SIGINT, signalHandler) try: (argp, rest) = getopt.gnu_getopt(arglist[1:], "sdfrokc:h", longopts=["state", "daemon", "full-help", "run", "runonce", "kill", "config=", "set-default-config=", "help", "list-failed", "list-saved", "purged-saved", "purge-failed", "comment-config"]) except getopt.GetoptError: print >> sys.stderr, helpMessage sys.exit(1) global _action, _runOnce, configFile, REDIRECT_TO, saved for param, argum in argp: if param == "--daemon" or param == "-d": _action = "daemon" elif param == "--run" or param == "-r": _action = "run" elif param == "--runonce" or param == "-o": _action = "run" _runOnce = True elif param =="--state" or param == "-s": _action = 'state' elif param == "--kill" or param == "-k": _action = "kill" elif param == "--config" or param == "-c": configFile = argum elif param == "--purge-failed": _action="purge-failed" elif param == "--help" or param == "-h": _action = 'help' elif param == "--full-help" or param == "-f": _action = 'fullhelp' elif param == "--set-default-config": _action ='set-default-config' elif param == "--list-failed": _action = 'list-failed' elif param == "--list-saved": _action = 'list-saved' elif param == "--purge-saved": _action = 'purge-saved' elif param == "--comment-config": _action = 'comment-config' if _action == 'comment-config': print(commentConfig) raise SystemExit elif _action == "daemon": getConfig(filename=configFile, reload=True) if os.name == u'nt' or os.name == u'dos' or os.name == u'ce': print >> sys.stderr, u"daemon mode not supported on Windows. will try to continue, but this is likely to crash" elif os.name == u'mac' or os.name == u"os2": print >> sys.stderr, u"""daemon mode may have issues on your | cb06f1645b77b7012f9195d9b9e4a000a0842687 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1664/cb06f1645b77b7012f9195d9b9e4a000a0842687/rssdler.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
5254,
12,
3175,
1098,
4672,
775,
30,
261,
3175,
84,
16,
3127,
13,
273,
225,
336,
3838,
18,
1600,
89,
67,
588,
3838,
12,
3175,
1098,
63,
21,
30,
6487,
315,
87,
2180,
3250,
71,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
5254,
12,
3175,
1098,
4672,
775,
30,
261,
3175,
84,
16,
3127,
13,
273,
225,
336,
3838,
18,
1600,
89,
67,
588,
3838,
12,
3175,
1098,
63,
21,
30,
6487,
315,
87,
2180,
3250,
71,
... | |
if _remote_login(session, password, prompt, timeout): | if _remote_login(session, username, password, prompt, timeout): | def remote_login(client, host, port, username, password, prompt, linesep="\n", timeout=10): """ Log into a remote host (guest) using SSH/Telnet/Netcat. @param client: The client to use ('ssh', 'telnet' or 'nc') @param host: Hostname or IP address @param port: Port to connect to @param username: Username (if required) @param password: Password (if required) @param prompt: Shell prompt (regular expression) @param linesep: The line separator to use when sending lines (e.g. '\\n' or '\\r\\n') @param timeout: The maximal time duration (in seconds) to wait for each step of the login procedure (i.e. the "Are you sure" prompt or the password prompt) @return: kvm_shell_session object on success and None on failure. """ if client == "ssh": cmd = ("ssh -o UserKnownHostsFile=/dev/null " "-o PreferredAuthentications=password -p %s %s@%s" % (port, username, host)) elif client == "telnet": cmd = "telnet -l %s %s %s" % (username, host, port) elif client == "nc": cmd = "nc %s %s" % (host, port) else: logging.error("Unknown remote shell client: %s" % client) return logging.debug("Trying to login with command '%s'" % cmd) session = kvm_subprocess.kvm_shell_session(cmd, linesep=linesep, prompt=prompt) if _remote_login(session, password, prompt, timeout): return session else: session.close() | 67cf4a2c5e31884cd7e37acba0dea2ecd4465154 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12268/67cf4a2c5e31884cd7e37acba0dea2ecd4465154/kvm_utils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2632,
67,
5819,
12,
2625,
16,
1479,
16,
1756,
16,
2718,
16,
2201,
16,
6866,
16,
24223,
1546,
64,
82,
3113,
2021,
33,
2163,
4672,
3536,
1827,
1368,
279,
2632,
1479,
261,
18908,
13,
1450... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2632,
67,
5819,
12,
2625,
16,
1479,
16,
1756,
16,
2718,
16,
2201,
16,
6866,
16,
24223,
1546,
64,
82,
3113,
2021,
33,
2163,
4672,
3536,
1827,
1368,
279,
2632,
1479,
261,
18908,
13,
1450... |
pos = pos - 1 found = stc.GetCharAt(pos) | found = '' | def getLastNonWhitespaceChar(self, stc, pos): """Working backward, find the closest non-whitespace character @param stc: stc of interest @param pos: boundary position from which to start looking backwards @return: tuple of the matching char and the position """ pos = pos - 1 found = stc.GetCharAt(pos) while pos > 0: check = pos - 1 c = stc.GetCharAt(check) s = stc.GetStyleAt(check) dprint("check=%d char='%s'" % (check, c)) if stc.isStyleComment(s) or stc.isStyleString(s): break if not c.isspace(): break found = c pos = check return (found, pos) | 7b68fdba1986d64604112824e5f68df509113eb4 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11522/7b68fdba1986d64604112824e5f68df509113eb4/autoindent.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7595,
3989,
9431,
2156,
12,
2890,
16,
384,
71,
16,
949,
4672,
3536,
14836,
12555,
16,
1104,
326,
9219,
1661,
17,
18777,
3351,
225,
632,
891,
384,
71,
30,
384,
71,
434,
16513,
632,
891,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7595,
3989,
9431,
2156,
12,
2890,
16,
384,
71,
16,
949,
4672,
3536,
14836,
12555,
16,
1104,
326,
9219,
1661,
17,
18777,
3351,
225,
632,
891,
384,
71,
30,
384,
71,
434,
16513,
632,
891,... |
version = '0.6', | version = '0.6.1', | def copy_scripts(self): build_scripts.copy_scripts(self) # remove the .py extension from scripts for s in self.scripts: f = util.convert_path(s) before = os.path.join(self.build_dir, os.path.basename(f)) after = os.path.splitext(before)[0] print "renaming", before, "->", after os.rename(before, after) | f01a12639a7082a953461a9a1dde024da018bf78 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7185/f01a12639a7082a953461a9a1dde024da018bf78/setup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1610,
67,
12827,
12,
2890,
4672,
1361,
67,
12827,
18,
3530,
67,
12827,
12,
2890,
13,
468,
1206,
326,
263,
2074,
2710,
628,
8873,
364,
272,
316,
365,
18,
12827,
30,
284,
273,
1709,
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,
1610,
67,
12827,
12,
2890,
4672,
1361,
67,
12827,
18,
3530,
67,
12827,
12,
2890,
13,
468,
1206,
326,
263,
2074,
2710,
628,
8873,
364,
272,
316,
365,
18,
12827,
30,
284,
273,
1709,
18,
... |
logging.debug("%s %s: %s", self.__progname, pipename, line) | logging.debug("%s[%d] %s: %s", self.__progname, self.pid, pipename, line) | def __LogOutput(self, _, line, pipename): logging.debug("%s %s: %s", self.__progname, pipename, line) | 1c2eaed434a3264c68ca8badfaf0163154afc425 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5330/1c2eaed434a3264c68ca8badfaf0163154afc425/daemon.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1343,
1447,
12,
2890,
16,
389,
16,
980,
16,
8341,
1069,
4672,
2907,
18,
4148,
27188,
87,
738,
87,
30,
738,
87,
3113,
365,
16186,
14654,
529,
16,
8341,
1069,
16,
980,
13,
2,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1343,
1447,
12,
2890,
16,
389,
16,
980,
16,
8341,
1069,
4672,
2907,
18,
4148,
27188,
87,
738,
87,
30,
738,
87,
3113,
365,
16186,
14654,
529,
16,
8341,
1069,
16,
980,
13,
2,
-10... |
if game: self.actionScoring.setEnabled(game is not None and game.roundsFinished < 4) else: self.actionScoring.setChecked(False) | self.actionScoring.setEnabled(scoring and not game.finished()) if self.actionScoring.isChecked(): self.actionScoring.setChecked(scoring and not game.finished()) | def refresh(self): """update some actions, all auxiliary windows and the statusbar""" game = self.game for action in [self.actionScoreGame, self.actionPlayGame]: action.setEnabled(not bool(game)) self.actionAbortGame.setEnabled(bool(game)) scoring = bool(game and game.isScoringGame()) self.selectorBoard.setVisible(scoring) self.selectorBoard.setEnabled(scoring) self.discardBoard.setVisible(bool(game) and not scoring) if game: self.actionScoring.setEnabled(game is not None and game.roundsFinished < 4) else: self.actionScoring.setChecked(False) for view in [self.scoringDialog, self.explainView, self.scoreTable]: if view: view.refresh(game) self.__showBalance() | dde8ac1c5e0461acbb51c71c1f63a4866b2dd3a1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1679/dde8ac1c5e0461acbb51c71c1f63a4866b2dd3a1/playfield.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4460,
12,
2890,
4672,
3536,
2725,
2690,
4209,
16,
777,
9397,
20606,
9965,
471,
326,
1267,
3215,
8395,
7920,
273,
365,
18,
13957,
364,
1301,
316,
306,
2890,
18,
1128,
7295,
12496,
16,
365... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4460,
12,
2890,
4672,
3536,
2725,
2690,
4209,
16,
777,
9397,
20606,
9965,
471,
326,
1267,
3215,
8395,
7920,
273,
365,
18,
13957,
364,
1301,
316,
306,
2890,
18,
1128,
7295,
12496,
16,
365... |
__import__("tests.%s" % t_type) test_module = sys.modules["tests.%s" % t_type] | f, p, d = imp.find_module(t_type, [subtest_dir]) test_module = imp.load_module(t_type, f, p, d) f.close() | def run_once(self, params): # Report the parameters we've received and write them as keyvals logging.debug("Test parameters:") keys = params.keys() keys.sort() for key in keys: logging.debug(" %s = %s", key, params[key]) self.write_test_keyval({key: params[key]}) | e505e040dba6b7201593b296703e476c081b4222 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12268/e505e040dba6b7201593b296703e476c081b4222/kvm.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
67,
8243,
12,
2890,
16,
859,
4672,
468,
8706,
326,
1472,
732,
8081,
5079,
471,
1045,
2182,
487,
498,
4524,
2907,
18,
4148,
2932,
4709,
1472,
2773,
13,
1311,
273,
859,
18,
2452,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
8243,
12,
2890,
16,
859,
4672,
468,
8706,
326,
1472,
732,
8081,
5079,
471,
1045,
2182,
487,
498,
4524,
2907,
18,
4148,
2932,
4709,
1472,
2773,
13,
1311,
273,
859,
18,
2452,
1... |
"""To declare an Instance-argument in an expr class, | """ To declare an Instance-argument in an expr class, | def Arg( type_expr, dflt_expr = _E_REQUIRED_ARG_, _attr_expr = None, _arglist = False, **moreopts): ### [update 061204: i think this cmt is obs, not sure:] IMPLEM _E_REQUIRED_ARG_ - do we tell _i_instance somehow? ###e see new notes at end of file about how to reform Arg into a more coherent object, useful in wider contexts... [070321] """To declare an Instance-argument in an expr class, use an assignment like this, directly in the class namespace: attr = Arg( type, optional default value expr ) Order matters (specifically, execution order of the Arg macros, or maybe only of the exprs containing them, while Python is executing a given class definition, before the metaclass's __new__ runs); those attrs which are not already defined as args in superclasses [nim] are appended to the inherited arglist, whose positions are counted from 0. (Handling anything about args in superclasses is NIM. ##e) The index of the instance made from this optional argument will be its position in the arglist (whether or not the arg was supplied or the default value expr was used). If the default value expr is not supplied, there is no default value (i.e. the arg is required). If it is supplied, it is processed through canon_expr (as if Arg was an Expr constructor), unless it's one of the special case symbols (meant only for private use by this family of macros) _E_REQUIRED_ARG_ or the other _E_ one.##doc [_attr_expr is a private option for use by ArgOrOption. So is _lvalue_flag and ###NIM _noinstance (in moreopts).] [_arglist is a private option for use by ArgList.] """ global _arg_order_counter _arg_order_counter += 1 required = (dflt_expr is _E_REQUIRED_ARG_) argpos_expr = _this_gets_replaced_with_argpos_for_current_attr( _arg_order_counter, required, _arglist ) # Implem note: # _this_gets_replaced_with_argpos_for_current_attr(...) makes a special thing to be noticed by the FormulaScanner # and replaced with the actual arg order within the class (but the same within any single attr). # ExprsMeta can do that by scanning values in order of Expr construction. # But it has to worry about two vals the same, since then two attrs have equal claim... # it does that by asserting that a given _arg_order_counter corresponds to only one attr. ########@@@@@@@nim # FYI, the other possible use for _arg_order_counter would be to assert that it only increases, # but this is not obviously true (or useful) in undoc but presently supported cases like # attr = If(cond, Arg(type1), Arg(type2)) # (which the present code treats as alternative type decls for the same arg position). ##printnim("asserting that a given _arg_order_counter corresponds to only one attr -- in a better way than ive_seen kluge below")####@@@@@ attr_expr = _attr_expr # what about current attr to use in index for arg instance and/or # in finding the arg expr in an instance (the replacement instance for _self) -- # this is None by default, since _E_ATTR (the attr we're on) shouldn't affect the index, # in this Arg macro. When we're used by other macros they can pass something else for that. return _ArgOption_helper( attr_expr, argpos_expr, type_expr, dflt_expr, _arglist = _arglist, **moreopts) | d0ffa4ebc7f1e32fb807fce132593cfedae374b0 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11221/d0ffa4ebc7f1e32fb807fce132593cfedae374b0/attr_decl_macros.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
14448,
12,
618,
67,
8638,
16,
302,
31864,
67,
8638,
273,
389,
41,
67,
14977,
67,
10973,
67,
16,
389,
1747,
67,
8638,
273,
599,
16,
389,
3175,
1098,
273,
1083,
16,
2826,
10161,
4952,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
14448,
12,
618,
67,
8638,
16,
302,
31864,
67,
8638,
273,
389,
41,
67,
14977,
67,
10973,
67,
16,
389,
1747,
67,
8638,
273,
599,
16,
389,
3175,
1098,
273,
1083,
16,
2826,
10161,
4952,
... |
except IndexError: | except KeyError: | def menu(title, items): while True: print title itemNumber = 0 itemMap = {} for item, value in items.iteritems(): itemNumber += 1 print "%d. %s" % (itemNumber, item) itemMap[itemNumber] = value try: choice = int(sys.stdin.readline()) return itemMap[choice] except ValueError: print "Not a number, you dork" except IndexError: print "Choose something on the menu!" print | c46bcecb664d7816afcdfd393bf253f6bf09672a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6757/c46bcecb664d7816afcdfd393bf253f6bf09672a/menu.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3824,
12,
2649,
16,
1516,
4672,
1323,
1053,
30,
1172,
2077,
761,
1854,
273,
374,
761,
863,
273,
2618,
364,
761,
16,
460,
316,
1516,
18,
2165,
3319,
13332,
761,
1854,
1011,
404,
1172,
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,
3824,
12,
2649,
16,
1516,
4672,
1323,
1053,
30,
1172,
2077,
761,
1854,
273,
374,
761,
863,
273,
2618,
364,
761,
16,
460,
316,
1516,
18,
2165,
3319,
13332,
761,
1854,
1011,
404,
1172,
2... |
from pypy.rpython.module.ll_os import os_open_lltypeimpl, os_open_oofakeimpl | def test_os_open(self): from pypy.rpython.module.ll_os import os_open_lltypeimpl, os_open_oofakeimpl tmpdir = str(udir.udir.join("os_open_test")) import os def wr_open(fname): return os.open(fname, os.O_WRONLY|os.O_CREAT, 0777) def f(): return wr_open(tmpdir) res = self.interpret(f, []) os.close(res) count = 0 for dir_call in enum_direct_calls(test_llinterp.typer.annotator.translator, wr_open): cfptr = dir_call.args[0] if self.type_system == 'lltype': assert self.get_callable(cfptr.value) == os_open_lltypeimpl else: assert self.get_callable(cfptr.value) == os_open_oofakeimpl count += 1 assert count == 1 | bc25f29e2f8660485e69259e850bdacb9c1fcaf2 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6934/bc25f29e2f8660485e69259e850bdacb9c1fcaf2/test_rbuiltin.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
538,
67,
3190,
12,
2890,
4672,
20213,
273,
609,
12,
1100,
481,
18,
1100,
481,
18,
5701,
2932,
538,
67,
3190,
67,
3813,
6,
3719,
1930,
1140,
1652,
12408,
67,
3190,
12,
12749,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
538,
67,
3190,
12,
2890,
4672,
20213,
273,
609,
12,
1100,
481,
18,
1100,
481,
18,
5701,
2932,
538,
67,
3190,
67,
3813,
6,
3719,
1930,
1140,
1652,
12408,
67,
3190,
12,
12749,
... | |
with self.linked_notification('MSRPChatDidStart', sender=self.chat_transport) as q: if not self.chat_transport.is_started: q.wait() | if self.chat_transport is not None: with self.linked_notification('MSRPChatDidStart', sender=self.chat_transport) as q: if not self.chat_transport.is_started: q.wait() | def new(self, callee_uri, credentials, route, audio=False, chat=False): event_names = ['SCSessionDidStart', 'SCSessionDidFail', 'SCSessionDidEnd'] with self.linked_notifications(event_names) as q: self._obj.new(callee_uri, credentials, route, audio=audio, chat=chat) while True: notification = q.wait() if notification.name == 'SCSessionDidStart': break elif notification.name == 'SCSessionDidFail': raise SessionError(notification.data.reason) elif notification.name == 'SCSessionDidEnd': if notification.data.originator == "local": raise SessionError("Session ended by local party") else: raise SessionError("Session ended by remote party") # XXX I would expect Session instance not to fire SCSessionDidStart until all the transports started # XXX otherwise I have to go into session and manually wait for different types of events # XXX the same goes for terminating - wait for MSRPChatDidEnd before firing SCSessionDidEnd with self.linked_notification('MSRPChatDidStart', sender=self.chat_transport) as q: if not self.chat_transport.is_started: q.wait() | 1faac45c6eefe3f20bc71d68cf29db123e8e25f5 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5703/1faac45c6eefe3f20bc71d68cf29db123e8e25f5/session2.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
394,
12,
2890,
16,
14425,
67,
1650,
16,
4448,
16,
1946,
16,
7447,
33,
8381,
16,
7916,
33,
8381,
4672,
871,
67,
1973,
273,
10228,
2312,
2157,
18250,
1685,
2187,
296,
2312,
2157,
18250,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
394,
12,
2890,
16,
14425,
67,
1650,
16,
4448,
16,
1946,
16,
7447,
33,
8381,
16,
7916,
33,
8381,
4672,
871,
67,
1973,
273,
10228,
2312,
2157,
18250,
1685,
2187,
296,
2312,
2157,
18250,
... |
assert not show_diff(lines, expected) | return show_diff(lines, expected) | def raise_not_found(): print "block_show_diff() lines:" print "-"*80 print "\n".join(lines) print "-"*80 raise AssertionError('Expected line not found: "%s"' % eline) | 9b8c42b4eb3cfcecca7e92f5beb4b235686afe24 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/696/9b8c42b4eb3cfcecca7e92f5beb4b235686afe24/test_utils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1002,
67,
902,
67,
7015,
13332,
1172,
315,
2629,
67,
4500,
67,
5413,
1435,
2362,
2773,
1172,
7514,
14,
3672,
1172,
1548,
82,
9654,
5701,
12,
3548,
13,
1172,
7514,
14,
3672,
1002,
12068,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1002,
67,
902,
67,
7015,
13332,
1172,
315,
2629,
67,
4500,
67,
5413,
1435,
2362,
2773,
1172,
7514,
14,
3672,
1172,
1548,
82,
9654,
5701,
12,
3548,
13,
1172,
7514,
14,
3672,
1002,
12068,
... |
def fetch(): return self.client.fetchUID(self.messages) | self.function = lambda m, u: self.client.fetchUID(m) | def fetch(): return self.client.fetchUID(self.messages) | fd0ab51569d572065ee4a73067158b7e009de90d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/fd0ab51569d572065ee4a73067158b7e009de90d/test_imap.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
365,
18,
915,
273,
3195,
312,
16,
582,
30,
365,
18,
2625,
18,
5754,
3060,
12,
81,
13,
225,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
365,
18,
915,
273,
3195,
312,
16,
582,
30,
365,
18,
2625,
18,
5754,
3060,
12,
81,
13,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
def close(f): | def close(self): | def close(f): self.flush() | 19bd1da574b4daf24452a7875d9a48aa1a95e175 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/19bd1da574b4daf24452a7875d9a48aa1a95e175/rexec.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1746,
12,
2890,
4672,
365,
18,
11330,
1435,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1746,
12,
2890,
4672,
365,
18,
11330,
1435,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
def getFileSummary(self,lfns): | def getFileSummary(self,lfns,connection=False): | def getFileSummary(self,lfns): """ Get file status summary in all the transformations """ connection = self.__getConnection(connection) res = self.__getFileIDsForLfns(lfns,connection=connection) if not res['OK']: return res fileIDs,lfnFilesIDs = res['Value'] failed = {} for lfn in lfns: if lfn not in fileIDs.values(): failed[lfn] = 'Did not exist in the Transformation database' condDict = {'FileID':fileIDs.keys()} res = self.getTransformationFiles(self,condDict=condDict,connection=connection) if not res['OK']: return res resDict = {} for fileDict in res['Value']: lfn = fileDict['LFN'] transID = fileDict['TransformationID'] if not resDict.has_key(lfn): resDict[lfn] = {} if not resDict[lfn].has_key(transID): resultDict[lfn][transID] = {} resultDict[lfn][transID] = fileDict return S_OK({'Successful':resultDict,'Failed':failedDict}) | ff9eee8a40f9ffb1a9c8f7e8807007eaf1cdc8c7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/ff9eee8a40f9ffb1a9c8f7e8807007eaf1cdc8c7/TransformationDB.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6034,
4733,
12,
2890,
16,
20850,
2387,
16,
4071,
33,
8381,
4672,
3536,
968,
585,
1267,
4916,
316,
777,
326,
19245,
3536,
1459,
273,
365,
16186,
588,
1952,
12,
4071,
13,
400,
273,
365,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6034,
4733,
12,
2890,
16,
20850,
2387,
16,
4071,
33,
8381,
4672,
3536,
968,
585,
1267,
4916,
316,
777,
326,
19245,
3536,
1459,
273,
365,
16186,
588,
1952,
12,
4071,
13,
400,
273,
365,
... |
self.conn.send.command_list_begin() | def remove(self, widget): if self.conn: page_num = self.notebook.get_current_page() if page_num == self.TAB_CURRENT: model, selected = self.current_selection.get_selected_rows() if len(selected) == len(self.currentdata): # Everything is selected, clear: self.conn.do.clear() elif len(selected) > 0: self.conn.send.command_list_begin() for path in selected: self.conn.send.deleteid(self.currentdata.get_value(model.get_iter(path), 0)) self.conn.do.command_list_end() elif page_num == self.TAB_PLAYLISTS: dialog = gtk.MessageDialog(self.window, gtk.DIALOG_MODAL, gtk.MESSAGE_WARNING, gtk.BUTTONS_YES_NO, _("Delete the selected playlist(s)?")) dialog.set_title(_("Delete Playlist(s)")) response = dialog.run() if response == gtk.RESPONSE_YES: dialog.destroy() model, selected = self.playlists_selection.get_selected_rows() iters = [model.get_iter(path) for path in selected] self.conn.send.command_list_begin() for iter in iters: self.conn.send.rm(unescape_html(self.playlistsdata.get_value(iter, 1))) self.conn.do.command_list_end() self.playlists_populate() else: dialog.destroy() elif page_num == self.TAB_STREAMS: dialog = gtk.MessageDialog(self.window, gtk.DIALOG_MODAL, gtk.MESSAGE_WARNING, gtk.BUTTONS_YES_NO, _("Delete the selected stream(s)?")) dialog.set_title(_("Delete Stream(s)")) response = dialog.run() if response == gtk.RESPONSE_YES: dialog.destroy() model, selected = self.streams_selection.get_selected_rows() iters = [model.get_iter(path) for path in selected] for iter in iters: stream_removed = False for i in range(len(self.stream_names)): if not stream_removed: if self.streamsdata.get_value(iter, 1) == escape_html(self.stream_names[i]): self.stream_names.pop(i) self.stream_uris.pop(i) stream_removed = True self.streams_populate() else: dialog.destroy() self.iterate_now() | 0da9815c248298a9268c10f25c59ea81e5bd319d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2312/0da9815c248298a9268c10f25c59ea81e5bd319d/sonata.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1206,
12,
2890,
16,
3604,
4672,
309,
365,
18,
4646,
30,
1363,
67,
2107,
273,
365,
18,
24422,
18,
588,
67,
2972,
67,
2433,
1435,
309,
1363,
67,
2107,
422,
365,
18,
28899,
67,
15487,
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,
1206,
12,
2890,
16,
3604,
4672,
309,
365,
18,
4646,
30,
1363,
67,
2107,
273,
365,
18,
24422,
18,
588,
67,
2972,
67,
2433,
1435,
309,
1363,
67,
2107,
422,
365,
18,
28899,
67,
15487,
3... | |
panel2.SetSizer(sizer2) | vboxwrap2.Add(sizer2) vboxwrap2.Add((DV_BORDER_PADDING,0)) sizer2.Add((0,DV_BORDER_PADDING)) panel2.SetSizer(vboxwrap2) | def __init__(self,parent,id,title): global DV_ICON wx.Frame.__init__(self,parent,wx.ID_ANY,title,size=(780,580),style=wx.DEFAULT_FRAME_STYLE) if os.path.lexists(DV_CONF_FILE_DIRECTORY+'lastversion.damnvid'): lastversion=open(DV_CONF_FILE_DIRECTORY+'lastversion.damnvid','r') dvversion=lastversion.readline().strip() lastversion.close() del lastversion else: dvversion='old' # This is not an arbitrary erroneous value, it's handy in the concatenation on the wx.FileDialog line below if dvversion!=DV_VERSION: # Just updated to new version, ask what to do about the preferences dlg=wx.MessageDialog(self,'DamnVid was updated to '+DV_VERSION+'.\nIf anything fails, try to uninstall DamnVid before updating it again.\n\nFrom a version to another, DamnVid\'s default preferences may vary, and their structure may change.\nIf that is the case, your current preferences may not work anymore.\nAdditionally, new versions of DamnVid often come with new or updated encoding profiles. That is why DamnVid is going to overwrite your current configuration.\nDo you want to export your current preferences, before they get overwritten? You might then try to import them back using the "Import" button in the Preferences pane.','DamnVid was successfully updated',wx.YES|wx.NO|wx.ICON_QUESTION) tmpprefs=DamnVidPrefs() checkupdates=tmpprefs.get('CheckForUpdates') if dlg.ShowModal()==wx.ID_YES: dlg.Destroy() dlg=wx.FileDialog(self,'Where do you want to export DamnVid\'s configuration?',tmpprefs.get('lastprefdir'),'DamnVid-'+dvversion+'-configuration.ini','INI files (*.ini)|*.ini|All files (*.*)|*.*',wx.FD_SAVE|wx.FD_OVERWRITE_PROMPT) if dlg.ShowModal()==wx.ID_OK: path=dlg.GetPath() f=open(path,'w') tmpprefs.ini.write(f) f.close() dlg.Destroy() else: dlg.Destroy() # Now, overwrite the preferences! del tmpprefs os.remove(DV_CONF_FILE) shutil.copyfile(DV_CURDIR+'conf'+os.sep+'conf.ini',DV_CONF_FILE) lastversion=open(DV_CONF_FILE_DIRECTORY+'lastversion.damnvid','w') lastversion.write(DV_VERSION) lastversion.close() del lastversion tmpprefs=DamnVidPrefs() tmpprefs.set('CheckForUpdates',checkupdates) tmpprefs.save() del tmpprefs self.CreateStatusBar() filemenu=wx.Menu() filemenu.Append(ID_MENU_ADD_FILE,'&Add files...','Adds damn videos from local files.') self.Bind(wx.EVT_MENU,self.onAddFile,id=ID_MENU_ADD_FILE) filemenu.Append(ID_MENU_ADD_URL,'Add &URL...','Adds a damn video from a URL.') self.Bind(wx.EVT_MENU,self.onAddURL,id=ID_MENU_ADD_URL) filemenu.AppendSeparator() filemenu.Append(ID_MENU_EXIT,'E&xit','Terminates DamnVid '+DV_VERSION+'.') self.Bind(wx.EVT_MENU,self.onExit,id=ID_MENU_EXIT) vidmenu=wx.Menu() vidmenu.Append(ID_MENU_GO,'Let\'s &go!','Processes all the videos in the list.') self.Bind(wx.EVT_MENU,self.onGo,id=ID_MENU_GO) vidmenu.AppendSeparator() self.prefmenuitem=vidmenu.Append(ID_MENU_PREFERENCES,'Preferences','Opens DamnVid\'s preferences, allowing you to customize its settings.') self.Bind(wx.EVT_MENU,self.onPrefs,id=ID_MENU_PREFERENCES) #vidmenu.Append(ID_MENU_OUTDIR,'Output directory','Opens DamnVid\'s output directory, where all the videos are saved.') #self.Bind(wx.EVT_MENU,self.onOpenOutDir,id=ID_MENU_OUTDIR) halpmenu=wx.Menu() halpmenu.Append(ID_MENU_HALP,'DamnVid &Help','Opens DamnVid\'s help.') self.Bind(wx.EVT_MENU,self.onHalp,id=ID_MENU_HALP) halpmenu.Append(ID_MENU_UPDATE,'Check for updates...','Checks if a new version of DamnVid is available.') self.Bind(wx.EVT_MENU,self.onCheckUpdates,id=ID_MENU_UPDATE) halpmenu.AppendSeparator() halpmenu.Append(ID_MENU_ABOUT,'&About DamnVid '+DV_VERSION+'...','Displays information about DamnVid.') self.Bind(wx.EVT_MENU,self.onAboutDV,id=ID_MENU_ABOUT) self.menubar=wx.MenuBar() self.menubar.Append(filemenu,'&File') self.menubar.Append(vidmenu,'&DamnVid') self.menubar.Append(halpmenu,'&Help') self.SetMenuBar(self.menubar) vbox=wx.BoxSizer(wx.VERTICAL) self.SetSizer(vbox) panel=wx.Panel(self,-1) vbox.Add(panel,1,wx.EXPAND) grid=wx.FlexGridSizer(2,2,7,7) panel1=wx.Panel(panel,-1) grid.Add(panel1,1,wx.EXPAND) panel2=wx.Panel(panel,-1) grid.Add(panel2,0) panel3=wx.Panel(panel,-1) grid.Add(panel3,0,wx.EXPAND) panel4=wx.Panel(panel,-1) grid.Add(panel4,0) panel.SetSizer(grid) hbox1=wx.BoxSizer(wx.HORIZONTAL) panel1.SetSizer(hbox1) self.list=DamnList(panel1,window=self) self.list.InsertColumn(ID_COL_VIDNAME,'Video name') self.list.SetColumnWidth(ID_COL_VIDNAME,width=180) self.list.InsertColumn(ID_COL_VIDPROFILE,'Encoding profile') self.list.SetColumnWidth(ID_COL_VIDPROFILE,width=120) self.list.InsertColumn(ID_COL_VIDSTAT,'Status') self.list.SetColumnWidth(ID_COL_VIDSTAT,width=120) self.list.InsertColumn(ID_COL_VIDPATH,'Source') self.list.SetColumnWidth(ID_COL_VIDPATH,wx.LIST_AUTOSIZE) self.list.Bind(wx.EVT_KEY_DOWN,self.onListKeyDown) il=wx.ImageList(16,16,True) self.ID_ICON_LOCAL=il.Add(wx.Bitmap(DV_IMAGES_PATH+'video.png',wx.BITMAP_TYPE_PNG)) self.ID_ICON_ONLINE=il.Add(wx.Bitmap(DV_IMAGES_PATH+'online.png',wx.BITMAP_TYPE_PNG)) self.ID_ICON_YOUTUBE=il.Add(wx.Bitmap(DV_IMAGES_PATH+'youtube.png',wx.BITMAP_TYPE_PNG)) self.ID_ICON_YOUTUBEHD=il.Add(wx.Bitmap(DV_IMAGES_PATH+'youtubehd.png',wx.BITMAP_TYPE_PNG)) self.ID_ICON_GVIDEO=il.Add(wx.Bitmap(DV_IMAGES_PATH+'googlevideo.png',wx.BITMAP_TYPE_PNG)) self.ID_ICON_VEOH=il.Add(wx.Bitmap(DV_IMAGES_PATH+'veoh.png',wx.BITMAP_TYPE_PNG)) self.ID_ICON_DAILYMOTION=il.Add(wx.Bitmap(DV_IMAGES_PATH+'dailymotion.png',wx.BITMAP_TYPE_PNG)) self.list.AssignImageList(il,wx.IMAGE_LIST_SMALL) self.list.SetDropTarget(DamnDropHandler(self)) self.list.Bind(wx.EVT_RIGHT_DOWN,self.list.onRightClick) hbox1.Add(self.list,1,wx.EXPAND) sizer2=wx.BoxSizer(wx.VERTICAL) panel2.SetSizer(sizer2) self.addByFile=wx.Button(panel2,-1,'Add Files') sizer2.Add(self.addByFile,0) self.Bind(wx.EVT_BUTTON,self.onAddFile,self.addByFile) self.addByURL=wx.Button(panel2,-1,'Add URL') sizer2.Add(self.addByURL,0) self.Bind(wx.EVT_BUTTON,self.onAddURL,self.addByURL) self.btnRename=wx.Button(panel2,-1,'Rename') sizer2.Add(self.btnRename,0) self.Bind(wx.EVT_BUTTON,self.onRename,self.btnRename) self.btnMoveUp=wx.Button(panel2,-1,'Move up') sizer2.Add(self.btnMoveUp,0) self.Bind(wx.EVT_BUTTON,self.onMoveUp,self.btnMoveUp) self.btnMoveDown=wx.Button(panel2,-1,'Move down') sizer2.Add(self.btnMoveDown,0) self.Bind(wx.EVT_BUTTON,self.onMoveDown,self.btnMoveDown) self.delSelection=wx.Button(panel2,-1,'Remove') sizer2.Add(self.delSelection,0) self.Bind(wx.EVT_BUTTON,self.onDelSelection,self.delSelection) self.delAll=wx.Button(panel2,-1,'Remove all') sizer2.Add(self.delAll,0) self.Bind(wx.EVT_BUTTON,self.onDelAll,self.delAll) self.gobutton1=wx.Button(panel2,-1,'Let\'s go!') sizer2.Add(self.gobutton1,0) self.Bind(wx.EVT_BUTTON,self.onGo,self.gobutton1) hbox3=wx.BoxSizer(wx.HORIZONTAL) panel3.SetSizer(hbox3) hbox3.Add(wx.StaticText(panel3,-1,'Current video: '),0,wx.ALIGN_CENTER_VERTICAL) self.gauge1=wx.Gauge(panel3,-1) hbox3.Add(self.gauge1,1,wx.EXPAND) #self.gobutton2=wx.Button(bottompanel,-1,'Let\'s go!') #self.Bind(wx.EVT_BUTTON,self.onGo,self.gobutton2) #grid.Add(wx.StaticText(bottompanel,-1,''),0) #grid.Add(self.gobutton2,0) #grid.Add(wx.StaticText(bottompanel,-1,'Total progress:'),0) #self.gauge2=wx.Gauge(bottompanel,-1) #grid.Add(self.gauge2,1,wx.EXPAND) hbox4=wx.BoxSizer(wx.VERTICAL) panel4.SetSizer(hbox4) self.stopbutton=wx.Button(panel4,-1,'Stop') hbox4.Add(self.stopbutton) self.stopbutton.Disable() self.Bind(wx.EVT_BUTTON,self.onStop,self.stopbutton) grid.AddGrowableRow(0,1) grid.AddGrowableCol(0,1) self.Bind(wx.EVT_CLOSE,self.onClose,self) self.Bind(DV_EVT_PROG,self.onProgress) DV_ICON=wx.Icon(DV_IMAGES_PATH+'icon.ico',wx.BITMAP_TYPE_ICO) self.SetIcon(DV_ICON) self.videos=[] self.thisbatch=0 self.thisvideo=[] self.meta={} self.prefs=DamnVidPrefs() self.converting=-1 self.isclosing=False self.SetStatusText('DamnVid '+DV_VERSION+', waiting for instructions.') if DV_FIRST_RUN: dlg=wx.MessageDialog(self,'Welcome to DamnVid '+DV_VERSION+'!\nWould you like DamnVid to check for updates every time it starts?','Welcome to DamnVid '+DV_VERSION+'!',wx.YES|wx.NO|wx.ICON_QUESTION) if dlg.ShowModal()==wx.ID_YES: self.prefs.set('CheckForUpdates','True') else: self.prefs.set('CheckForUpdates','False') if self.prefs.get('CheckForUpdates')=='True': self.onCheckUpdates(None) | d5fc42b4dfe4c6b9c1a836d48aa0371911f1644d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11142/d5fc42b4dfe4c6b9c1a836d48aa0371911f1644d/DamnVid.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
2938,
16,
350,
16,
2649,
4672,
2552,
463,
58,
67,
21745,
7075,
18,
3219,
16186,
2738,
972,
12,
2890,
16,
2938,
16,
27226,
18,
734,
67,
15409,
16,
2649,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2938,
16,
350,
16,
2649,
4672,
2552,
463,
58,
67,
21745,
7075,
18,
3219,
16186,
2738,
972,
12,
2890,
16,
2938,
16,
27226,
18,
734,
67,
15409,
16,
2649,
... |
pull_url='%s/examples'%SAGE_INCOMING_SERVER, push_url='%s/examples'%SAGE_OUTGOING_SERVER, | pull_url='%s/examples/'%SAGE_INCOMING_SERVER, push_url='%s/examples/'%SAGE_OUTGOING_SERVER, | def bundle(self, filename, options='', url=None, base=None, to=None): r""" Create an hg changeset bundle with the given filename against the repository at the given url (which is by default the 'official' Sage repository, unless push_url() is changed in a setup file). If you have internet access, it's best to just do ``hg_sage.bundle(filename)``. If you don't find a revision r that you and the person unbundling both have (by looking at ``hg_sage.log()``), then do ``hg_sage.bundle(filename, base=r)``. Use self.inspect('file.bundle') to inspect the resulting bundle. This is a file that you should probably send to William Stein (wstein@gmail.com), post to a web page, or send to sage-devel. It will be written to the current directory. INPUT: - ``filename`` - output file in which to put bundle - ``options`` - pass to hg - ``url`` - url to bundle against (default: SAGE_SERVER, or push_url()) - ``base`` - a base changeset revision number to bundle against (doesn't require internet access) """ if not base is None: url = '' options = '--base=%s %s'%(int(base), options) if url is None: url = self.__push_url | 62fb7b5aa6ceda6c6c2bd7f4ca688c1f3beaee5f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/62fb7b5aa6ceda6c6c2bd7f4ca688c1f3beaee5f/hg.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3440,
12,
2890,
16,
1544,
16,
702,
2218,
2187,
880,
33,
7036,
16,
1026,
33,
7036,
16,
358,
33,
7036,
4672,
436,
8395,
1788,
392,
22576,
22463,
3440,
598,
326,
864,
1544,
5314,
326,
335... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3440,
12,
2890,
16,
1544,
16,
702,
2218,
2187,
880,
33,
7036,
16,
1026,
33,
7036,
16,
358,
33,
7036,
4672,
436,
8395,
1788,
392,
22576,
22463,
3440,
598,
326,
864,
1544,
5314,
326,
335... |
self.head.append('\\date{%s}\n' % self.attval(node.astext())) | self.date = self.attval(node.astext()) | def visit_docinfo_item(self, node, name): if name == 'author': if not self.pdfinfo == None: if not self.pdfauthor: self.pdfauthor = self.attval(node.astext()) else: self.pdfauthor += self.author_separator + self.attval(node.astext()) if self.use_latex_docinfo: if name in ('author', 'organization', 'contact', 'address'): # We attach these to the last author. If any of them precedes # the first author, put them in a separate "author" group (for # no better semantics). if name == 'author' or not self.author_stack: self.author_stack.append([]) if name == 'address': # newlines are meaningful self.insert_newline = 1 text = self.encode(node.astext()) self.insert_newline = 0 else: text = self.attval(node.astext()) self.author_stack[-1].append(text) raise nodes.SkipNode elif name == 'date': self.head.append('\\date{%s}\n' % self.attval(node.astext())) raise nodes.SkipNode self.docinfo.append('\\textbf{%s}: &\n\t' % self.language_label(name)) if name == 'address': self.insert_newline = 1 self.docinfo.append('{\\raggedright\n') self.context.append(' } \\\\\n') else: self.context.append(' \\\\\n') self.context.append(self.docinfo) self.context.append(len(self.body)) | 31eb3ff51e8bca47f0dea2cef52a1d6ca7c0ccb9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1532/31eb3ff51e8bca47f0dea2cef52a1d6ca7c0ccb9/latex2e.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3757,
67,
2434,
1376,
67,
1726,
12,
2890,
16,
756,
16,
508,
4672,
309,
508,
422,
296,
4161,
4278,
309,
486,
365,
18,
22353,
926,
617,
422,
599,
30,
309,
486,
365,
18,
22353,
507,
795... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3757,
67,
2434,
1376,
67,
1726,
12,
2890,
16,
756,
16,
508,
4672,
309,
508,
422,
296,
4161,
4278,
309,
486,
365,
18,
22353,
926,
617,
422,
599,
30,
309,
486,
365,
18,
22353,
507,
795... |
def node_departing_assy(self, node, assy): | def node_departing_assy(self, node, assy): | def node_departing_assy(self, node, assy): #bruce 060315 assert assy is self.assy # has to be true, since we were accessed as assy.undo_manager import chunk # nonmodular, but I think this shouldn't be called too early for that import, since assy will be inited if isinstance(node, chunk.Chunk): dict1 = self.archive._changed_parent_Atoms ###IMPLEM; tracks atoms w/ changed assy or molecule or liveness/killedness | 70f9631bd05e4a3af8a5e9815ba05f8063c02129 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/70f9631bd05e4a3af8a5e9815ba05f8063c02129/undo_manager.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
756,
67,
323,
2680,
310,
67,
428,
93,
12,
2890,
16,
756,
16,
1551,
93,
4672,
225,
468,
2848,
3965,
13026,
4630,
3600,
1815,
1551,
93,
353,
365,
18,
428,
93,
468,
711,
358,
506,
638,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
756,
67,
323,
2680,
310,
67,
428,
93,
12,
2890,
16,
756,
16,
1551,
93,
4672,
225,
468,
2848,
3965,
13026,
4630,
3600,
1815,
1551,
93,
353,
365,
18,
428,
93,
468,
711,
358,
506,
638,
... |
client._request('REPORT', '%s/%s' % (PRINCIPAL_DAV_PATH, CALENDAR), body=body, headers={ 'Depth': '1' }) | client._request('REPORT', '%s/%s' % (PRINCIPAL_DAV_PATH, CALENDAR), body=body, headers={ 'Content-Type':'text/xml', 'Depth': '1' }) | def test_timerangequery_invalid_not_utc_3(): body = open(FILES_DIR+'reports/timerangequery/invalid_nonUTC3.xml').read() client._request('REPORT', '%s/%s' % (PRINCIPAL_DAV_PATH, CALENDAR), body=body, headers={ 'Depth': '1' }) assert client.response.status == 400 | 0eb233b34e19f3cc4572957bdd4dfc9d1e2048e1 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9939/0eb233b34e19f3cc4572957bdd4dfc9d1e2048e1/test_reports_with_float.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
12542,
726,
2271,
67,
5387,
67,
902,
67,
17892,
67,
23,
13332,
1417,
273,
1696,
12,
12669,
67,
4537,
6797,
20195,
19,
12542,
726,
2271,
19,
5387,
67,
5836,
11471,
23,
18,
290... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
12542,
726,
2271,
67,
5387,
67,
902,
67,
17892,
67,
23,
13332,
1417,
273,
1696,
12,
12669,
67,
4537,
6797,
20195,
19,
12542,
726,
2271,
19,
5387,
67,
5836,
11471,
23,
18,
290... |
self.session.open(WlanScan,self.iface) | self.session.openWithCallback(self.WlanScanClosed, WlanScan, self.iface) | def ok(self): if self["menulist"].getCurrent()[1] == 'edit': if self.iface == 'wlan0': from Plugins.SystemPlugins.WirelessLan.iwlibs import Wireless ifobj = Wireless(self.iface) # a Wireless NIC Object self.wlanresponse = ifobj.getStatistics() if self.wlanresponse[0] != 19: # Wlan Interface found. self.session.open(AdapterSetup,self.iface) else: # Display Wlan not available Message self.showErrorMessage() else: self.session.open(AdapterSetup,self.iface) if self["menulist"].getCurrent()[1] == 'test': self.session.open(NetworkAdapterTest,self.iface) if self["menulist"].getCurrent()[1] == 'dns': self.session.open(NameserverSetup) if self["menulist"].getCurrent()[1] == 'scanwlan': from Plugins.SystemPlugins.WirelessLan.iwlibs import Wireless ifobj = Wireless(self.iface) # a Wireless NIC Object self.wlanresponse = ifobj.getStatistics() if self.wlanresponse[0] != 19: from Plugins.SystemPlugins.WirelessLan.plugin import WlanScan self.session.open(WlanScan,self.iface) else: # Display Wlan not available Message self.showErrorMessage() if self["menulist"].getCurrent()[1] == 'wlanstatus': from Plugins.SystemPlugins.WirelessLan.iwlibs import Wireless ifobj = Wireless(self.iface) # a Wireless NIC Object self.wlanresponse = ifobj.getStatistics() if self.wlanresponse[0] != 19: from Plugins.SystemPlugins.WirelessLan.plugin import WlanStatus self.session.open(WlanStatus,self.iface) else: # Display Wlan not available Message self.showErrorMessage() if self["menulist"].getCurrent()[1] == 'lanrestart': self.session.openWithCallback(self.restartLan, MessageBox, (_("Are you sure you want to restart your network interfaces?\n\n") + self.oktext ) ) if self["menulist"].getCurrent()[1] == 'enablewlan': self.session.openWithCallback(self.enableWlan, MessageBox, _("Are you sure you want to enable WLAN support?\nConnect your Wlan USB Stick to your Dreambox and press OK.\n\n") ) if self["menulist"].getCurrent()[1] == 'enablelan': self.session.openWithCallback(self.enableLan, MessageBox, (_("Are you sure you want to enable your local network?\n\n") + self.oktext ) ) if self["menulist"].getCurrent()[1] == 'openwizard': from Plugins.SystemPlugins.NetworkWizard.NetworkWizard import NetworkWizard self.session.openWithCallback(self.AdapterSetupClosed, NetworkWizard) | 94917f32471fd6fa65d9c014107b849f58bcdd09 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6652/94917f32471fd6fa65d9c014107b849f58bcdd09/NetworkSetup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1529,
12,
2890,
4672,
309,
365,
9614,
27617,
30994,
6,
8009,
588,
3935,
1435,
63,
21,
65,
422,
296,
4619,
4278,
309,
365,
18,
31479,
422,
296,
91,
6115,
20,
4278,
628,
26849,
18,
3163,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1529,
12,
2890,
4672,
309,
365,
9614,
27617,
30994,
6,
8009,
588,
3935,
1435,
63,
21,
65,
422,
296,
4619,
4278,
309,
365,
18,
31479,
422,
296,
91,
6115,
20,
4278,
628,
26849,
18,
3163,... |
if cmd.rc != 0 or self.build_result == FAILURE: | if cmd.rc != 0: | def evaluateCommand_old(self, cmd): # FIXME: remove it, possibly res = SUCCESS if cmd.rc != 0 or self.build_result == FAILURE: # TODO: more results from b-q-i, it has discrete exit codes. res = FAILURE return res | 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,
5956,
2189,
67,
1673,
12,
2890,
16,
1797,
4672,
468,
9852,
30,
1206,
518,
16,
10016,
400,
273,
16561,
309,
1797,
18,
1310,
480,
374,
30,
468,
2660,
30,
1898,
1686,
628,
324,
17,
85,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5956,
2189,
67,
1673,
12,
2890,
16,
1797,
4672,
468,
9852,
30,
1206,
518,
16,
10016,
400,
273,
16561,
309,
1797,
18,
1310,
480,
374,
30,
468,
2660,
30,
1898,
1686,
628,
324,
17,
85,
... |
dgramservers = [UnixDatagramServer, ThreadingUnixDatagramServer, ForkingUnixDatagramServer] | dgramservers = [UnixDatagramServer, ThreadingUnixDatagramServer] if hasattr(os, 'fork') and os.name not in ('os2',): dgramservers.append(ForkingUnixDatagramServer) | def testloop(proto, servers, hdlrcls, testfunc): for svrcls in servers: addr = pickaddr(proto) if verbose: print "ADDR =", addr print "CLASS =", svrcls t = ServerThread(addr, svrcls, hdlrcls) if verbose: print "server created" t.start() if verbose: print "server running" for i in range(NREQ): time.sleep(DELAY) if verbose: print "test client", i testfunc(proto, addr) if verbose: print "waiting for server" t.join() if verbose: print "done" | 9cafab679ccd41e34ebd8c491ae71bbe38a6cc1e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/9cafab679ccd41e34ebd8c491ae71bbe38a6cc1e/test_socketserver.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
6498,
12,
9393,
16,
7084,
16,
366,
5761,
86,
6429,
16,
1842,
644,
4672,
364,
5893,
86,
6429,
316,
7084,
30,
3091,
273,
6002,
4793,
12,
9393,
13,
309,
3988,
30,
1172,
315,
14142,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6498,
12,
9393,
16,
7084,
16,
366,
5761,
86,
6429,
16,
1842,
644,
4672,
364,
5893,
86,
6429,
316,
7084,
30,
3091,
273,
6002,
4793,
12,
9393,
13,
309,
3988,
30,
1172,
315,
14142,
... |
node[target].value += cur.delta.movepointer(-pointer) | node[target].value += cur.delta | def optimize_propagate(self, node): if not isinstance(node, ComplexNode): return node | 6cb067637473fcc65aafc3c177a63524eb0caa5c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2040/6cb067637473fcc65aafc3c177a63524eb0caa5c/esotope-bfc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10979,
67,
5986,
346,
340,
12,
2890,
16,
756,
4672,
309,
486,
1549,
12,
2159,
16,
16060,
907,
4672,
327,
756,
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,
10979,
67,
5986,
346,
340,
12,
2890,
16,
756,
4672,
309,
486,
1549,
12,
2159,
16,
16060,
907,
4672,
327,
756,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
def __init__(self, about=None, meta=None, label=None, id=None, char=None, valueOf_=None, mixedclass_=None, content_=None): super(CharSet, self).__init__(about, meta, label, id, valueOf_, mixedclass_, content_, ) | def __init__(self, about=None, meta=None, label=None, id=None, char=None): super(CharSet, self).__init__(about, meta, label, id, ) | def __init__(self, about=None, meta=None, label=None, id=None, char=None, valueOf_=None, mixedclass_=None, content_=None): super(CharSet, self).__init__(about, meta, label, id, valueOf_, mixedclass_, content_, ) self.char = _cast(None, char) self.valueOf_ = valueOf_ if mixedclass_ is None: self.mixedclass_ = MixedContainer else: self.mixedclass_ = mixedclass_ if content_ is None: self.content_ = [] else: self.content_ = content_ self.valueOf_ = valueOf_ | 9c12e50d449fa27d6f8f3415ece228ae97bb0266 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14016/9c12e50d449fa27d6f8f3415ece228ae97bb0266/_nexml.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
2973,
33,
7036,
16,
2191,
33,
7036,
16,
1433,
33,
7036,
16,
612,
33,
7036,
16,
1149,
33,
7036,
4672,
2240,
12,
2156,
694,
16,
365,
2934,
972,
2738,
972... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
2973,
33,
7036,
16,
2191,
33,
7036,
16,
1433,
33,
7036,
16,
612,
33,
7036,
16,
1149,
33,
7036,
4672,
2240,
12,
2156,
694,
16,
365,
2934,
972,
2738,
972... |
def __deleteGraph( self, plotDict ): try: for key in plotDict: value = plotDict[ key ] if value and os.path.isfile( value ): gLogger.info( "Deleting plot from cache", value ) os.unlink( value ) else: gLogger.info( "Plot has already been deleted", value ) except: pass | def purgeExpired( self ): while self.alive: time.sleep( 600 ) self.__graphCache.purgeExpired() self.__dataCache.purgeExpired() | a6deac6dedb2eb21261f1c4a99a955b4a0e5c855 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/a6deac6dedb2eb21261f1c4a99a955b4a0e5c855/DataCache.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11668,
10556,
12,
365,
262,
30,
1323,
365,
18,
11462,
30,
813,
18,
19607,
12,
14707,
262,
365,
16186,
4660,
1649,
18,
26422,
10556,
1435,
365,
16186,
892,
1649,
18,
26422,
10556,
1435,
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,
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,
11668,
10556,
12,
365,
262,
30,
1323,
365,
18,
11462,
30,
813,
18,
19607,
12,
14707,
262,
365,
16186,
4660,
1649,
18,
26422,
10556,
1435,
365,
16186,
892,
1649,
18,
26422,
10556,
1435,
2... | |
add_slider(slider,label,i+1) | add_slider(slider,label,value,i+1) | def create_slider(slider_label): slider=QtGui.QSlider(QtCore.Qt.Vertical,self) label=SliderLabel(slider_label,filter_state,self) slider.setRange(-1000,2000) slider.setSingleStep(1) return (slider,label) | 5b8c7f9237714ed634ca2f4b377af716c7ab0b87 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/150/5b8c7f9237714ed634ca2f4b377af716c7ab0b87/qpaeq.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
67,
28372,
12,
28372,
67,
1925,
4672,
18442,
33,
23310,
18070,
18,
53,
21824,
12,
23310,
4670,
18,
23310,
18,
15704,
16,
2890,
13,
1433,
33,
21824,
2224,
12,
28372,
67,
1925,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
67,
28372,
12,
28372,
67,
1925,
4672,
18442,
33,
23310,
18070,
18,
53,
21824,
12,
23310,
4670,
18,
23310,
18,
15704,
16,
2890,
13,
1433,
33,
21824,
2224,
12,
28372,
67,
1925,
16,
... |
for arg, shortcut, default, type in arguments: print ' %-30s%-10s%s' % ( (shortcut and '-%s, ' % shortcut or '') + '--' + arg, type, default ) | for arg, shortcut, default, argtype in arguments: if isinstance(default, bool): print ' %s' % ( (shortcut and '-%s, ' % shortcut or '') + '--' + arg ) else: print ' %-30s%-10s%s' % ( (shortcut and '-%s, ' % shortcut or '') + '--' + arg, argtype, default ) | def print_usage(actions): """Print the usage information. (Help screen)""" actions = actions.items() actions.sort() print 'usage: %s <action> [<options>]' % sys.argv[0] print ' %s --help' % sys.argv[0] print print 'actions:' for name, (func, doc, arguments) in actions: print ' %s:' % name for line in doc.splitlines(): print ' %s' % line if arguments: print for arg, shortcut, default, type in arguments: print ' %-30s%-10s%s' % ( (shortcut and '-%s, ' % shortcut or '') + '--' + arg, type, default ) print | e790ea05a3471ea98e3e3b4628d13936fc4c387e /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/14437/e790ea05a3471ea98e3e3b4628d13936fc4c387e/script.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1172,
67,
9167,
12,
4905,
4672,
3536,
5108,
326,
4084,
1779,
18,
225,
261,
6696,
5518,
15574,
4209,
273,
4209,
18,
3319,
1435,
4209,
18,
3804,
1435,
1172,
296,
9167,
30,
738,
87,
411,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1172,
67,
9167,
12,
4905,
4672,
3536,
5108,
326,
4084,
1779,
18,
225,
261,
6696,
5518,
15574,
4209,
273,
4209,
18,
3319,
1435,
4209,
18,
3804,
1435,
1172,
296,
9167,
30,
738,
87,
411,
... |
except TypeError: | except (TypeError, AttributeError): | def cant(x, C): try: x.__class__ = C except TypeError: pass else: self.fail("shouldn't allow %r.__class__ = %r" % (x, C)) try: delattr(x, "__class__") except TypeError: pass else: self.fail("shouldn't allow del %r.__class__" % x) | e95ce49aa005020c50b0d820a37ca320fb92be85 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3187/e95ce49aa005020c50b0d820a37ca320fb92be85/test_descr.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
848,
88,
12,
92,
16,
385,
4672,
775,
30,
619,
16186,
1106,
972,
273,
385,
1335,
261,
19030,
16,
6394,
4672,
1342,
469,
30,
365,
18,
6870,
2932,
13139,
82,
1404,
1699,
738,
86,
16186,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
848,
88,
12,
92,
16,
385,
4672,
775,
30,
619,
16186,
1106,
972,
273,
385,
1335,
261,
19030,
16,
6394,
4672,
1342,
469,
30,
365,
18,
6870,
2932,
13139,
82,
1404,
1699,
738,
86,
16186,
... |
<title>$title$</title> | <title>Epydoc Log</title> | def print_times(self): pass | 74e7c31217935ae45cfdd46a469ead8c7f0b19f9 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3512/74e7c31217935ae45cfdd46a469ead8c7f0b19f9/cli.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1172,
67,
8293,
12,
2890,
4672,
1342,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1172,
67,
8293,
12,
2890,
4672,
1342,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
def __init__(self): | def __init__(self, fault_tolerance=True): | def __init__(self): self.search_paths = [] self.search_path_descriptor = [] self.loaded_submit_modules = [] | 535a260d736c97ae967159645b5294d2f2e7e0c2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/635/535a260d736c97ae967159645b5294d2f2e7e0c2/submitmoduleloader.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1652,
1001,
2738,
972,
12,
2890,
16,
12530,
67,
25456,
33,
5510,
4672,
365,
18,
3072,
67,
4481,
273,
5378,
365,
18,
3072,
67,
803,
67,
12628,
273,
5378,
365,
18,
4230,
67,
9297,
67,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1652,
1001,
2738,
972,
12,
2890,
16,
12530,
67,
25456,
33,
5510,
4672,
365,
18,
3072,
67,
4481,
273,
5378,
365,
18,
3072,
67,
803,
67,
12628,
273,
5378,
365,
18,
4230,
67,
9297,
67,
6... |
def __init__(data = None) | def __init__(data = None): | def __init__(data = None) if data == None: quickfix.DoubleField.__init__(self, 646) else quickfix.DoubleField.__init__(self, 646, data) | 484890147d4b23aac4b9d0e85e84fceab7e137c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8819/484890147d4b23aac4b9d0e85e84fceab7e137c3/quickfix_fields.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
892,
273,
599,
4672,
309,
501,
422,
599,
30,
9549,
904,
18,
5265,
974,
16186,
2738,
972,
12,
2890,
16,
5178,
26,
13,
469,
9549,
904,
18,
5265,
974,
16186,
2738,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
892,
273,
599,
4672,
309,
501,
422,
599,
30,
9549,
904,
18,
5265,
974,
16186,
2738,
972,
12,
2890,
16,
5178,
26,
13,
469,
9549,
904,
18,
5265,
974,
16186,
2738,
... |
parts = resp[left+1].split(resp[left + 1:right]) | parts = resp[left + 1:right].split(resp[left+1]) | def parse229(resp, peer): '''Parse the '229' response for a EPSV request. Raises error_proto if it does not contain '(|||port|)' Return ('host.addr.as.numbers', port#) tuple.''' if resp[:3] <> '229': raise error_reply, resp left = resp.find('(') if left < 0: raise error_proto, resp right = resp.find(')', left + 1) if right < 0: raise error_proto, resp # should contain '(|||port|)' if resp[left + 1] <> resp[right - 1]: raise error_proto, resp parts = resp[left+1].split(resp[left + 1:right]) if len(parts) <> 5: raise error_proto, resp host = peer[0] port = int(parts[3]) return host, port | 4590948b5cabeb7b3125b7083875ef03b059a81a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/4590948b5cabeb7b3125b7083875ef03b059a81a/ftplib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
3787,
29,
12,
12243,
16,
4261,
4672,
9163,
3201,
326,
296,
3787,
29,
11,
766,
364,
279,
512,
5857,
58,
590,
18,
20497,
555,
67,
9393,
309,
518,
1552,
486,
912,
7747,
20081,
96,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3787,
29,
12,
12243,
16,
4261,
4672,
9163,
3201,
326,
296,
3787,
29,
11,
766,
364,
279,
512,
5857,
58,
590,
18,
20497,
555,
67,
9393,
309,
518,
1552,
486,
912,
7747,
20081,
96,
... |
if reply <> None: | if reply != None: | def session(self): call, host_port = self.sock.recvfrom(8192) reply = self.handle(call) if reply <> None: self.sock.sendto(reply, host_port) | 1ca8397a72985f1ea6854d833361d924adeec5fa /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/1ca8397a72985f1ea6854d833361d924adeec5fa/rpc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1339,
12,
2890,
4672,
745,
16,
1479,
67,
655,
273,
365,
18,
15031,
18,
18334,
2080,
12,
28,
15561,
13,
4332,
273,
365,
18,
4110,
12,
1991,
13,
309,
4332,
480,
599,
30,
365,
18,
15031... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1339,
12,
2890,
4672,
745,
16,
1479,
67,
655,
273,
365,
18,
15031,
18,
18334,
2080,
12,
28,
15561,
13,
4332,
273,
365,
18,
4110,
12,
1991,
13,
309,
4332,
480,
599,
30,
365,
18,
15031... |
print "Total number of dummy atoms to be added:", n_da | print "Total number of dummy atoms:", n_da | def grow_density(f_obs, r_free_flags, xray_structure, params): print "Start creating DAs..." da_xray_structures = create_da_xray_structures(xray_structure = xray_structure, params = params) n_da = 0 for daxrs in da_xray_structures: n_da += daxrs.scatterers().size() print "Total number of dummy atoms to be added:", n_da # number_of_grids = len(da_xray_structures) #print "Creating %s grids with atom spacing %s, each grid is %s apart" %( # str(number_of_grids),str(params.atom_gap), str(params.overlap_interval)) xray_structure_start = xray_structure.deep_copy_scatterers() if(params.mode == "build_and_refine"): mask_params = mmtbx.masks.mask_master_params.extract() mask_params.ignore_hydrogens=True fmodel = mmtbx.f_model.manager( xray_structure = xray_structure_start, r_free_flags = r_free_flags, target_name = "ml", mask_params = mask_params, f_obs = f_obs) fmodel.update_solvent_and_scale() print "START R-work and R-free: %6.4f %6.4f"%(fmodel.r_work(), fmodel.r_free()) xray_structure_current = xray_structure_start.deep_copy_scatterers() da_sel = flex.bool(xray_structure_start.scatterers().size(), False) for i_model, da_xray_structure in enumerate(da_xray_structures): print "Model %d, adding %d dummy atoms" % (i_model, da_xray_structure.scatterers().size()) try: xray_structure_current = xray_structure_current.concatenate(da_xray_structure) da_sel.extend(flex.bool(da_xray_structure.scatterers().size(), True)) if(params.mode == "build_and_refine"): fmodel.update_xray_structure(update_f_calc=True, update_f_mask=False, xray_structure = xray_structure_current) #XXX print fmodel.r_work() #XXX assert 0 # update_f_mask=True would not work refine_da(fmodel = fmodel, selection = da_sel, params = params) xray_structure_current = fmodel.xray_structure except Exception, e: print "ERROR:", str(e) da_sel = flex.bool(xray_structure_start.scatterers().size(), False) da_sel.extend(flex.bool(xray_structure_current.scatterers().size()- xray_structure_start.scatterers().size(), True)) all_da_xray_structure = xray_structure_current.select(da_sel) ofn = params.output_file_name_prefix if(ofn is None): ofn = "DA.pdb" else: ofn = ofn+"_DA.pdb" ofn = open(ofn,"w") pdb_file_str = all_da_xray_structure.as_pdb_file() print >> ofn, pdb_file_str # if(params.mode == "build_and_refine"): map_type_obj = mmtbx.map_names(map_name_string = "2mFo-DFc") map_params = maps.map_and_map_coeff_master_params().fetch( maps.cast_map_coeff_params(map_type_obj)).extract() coeffs = maps.map_coefficients_from_fmodel(fmodel = fmodel, params = map_params.map_coefficients[0]) lbl_mgr = maps.map_coeffs_mtz_label_manager(map_params = map_params.map_coefficients[0]) mtz_dataset = coeffs.as_mtz_dataset( column_root_label = lbl_mgr.amplitudes(), label_decorator = lbl_mgr) # f_calc_da = coeffs.structure_factors_from_scatterers(xray_structure = all_da_xray_structure).f_calc() mtz_dataset.add_miller_array( miller_array = f_calc_da, column_root_label = "Fcalc_da") # mtz_object = mtz_dataset.mtz_object() output_map_file_name = "map_coeffs.mtz" if(params.output_file_name_prefix is not None): output_map_file_name = params.output_file_name_prefix+"_map_coeffs.mtz" mtz_object.write(file_name = output_map_file_name) print "Finished" | c83e5aaf0a98a33f9afd742b631944b224553620 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/696/c83e5aaf0a98a33f9afd742b631944b224553620/grow_density.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13334,
67,
18781,
12,
74,
67,
10992,
16,
436,
67,
9156,
67,
7133,
16,
619,
435,
67,
7627,
16,
859,
4672,
1172,
315,
1685,
4979,
463,
1463,
7070,
5248,
67,
92,
435,
67,
27979,
273,
75... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13334,
67,
18781,
12,
74,
67,
10992,
16,
436,
67,
9156,
67,
7133,
16,
619,
435,
67,
7627,
16,
859,
4672,
1172,
315,
1685,
4979,
463,
1463,
7070,
5248,
67,
92,
435,
67,
27979,
273,
75... |
pull_url='%s/sage-%s'%(SAGE_INCOMING_SERVER, temp_in_branch_name), push_url='%s/sage-%s'%(SAGE_OUTGOING_SERVER, temp_out_branch_name), | pull_url='%s/sage-%s/'%(SAGE_INCOMING_SERVER, temp_in_branch_name), push_url='%s/sage-%s/'%(SAGE_OUTGOING_SERVER, temp_out_branch_name), | def bundle(self, filename, options='', url=None, base=None, to=None): r""" Create an hg changeset bundle with the given filename against the repository at the given url (which is by default the 'official' Sage repository, unless push_url() is changed in a setup file). If you have internet access, it's best to just do ``hg_sage.bundle(filename)``. If you don't find a revision r that you and the person unbundling both have (by looking at ``hg_sage.log()``), then do ``hg_sage.bundle(filename, base=r)``. Use self.inspect('file.bundle') to inspect the resulting bundle. This is a file that you should probably send to William Stein (wstein@gmail.com), post to a web page, or send to sage-devel. It will be written to the current directory. INPUT: - ``filename`` - output file in which to put bundle - ``options`` - pass to hg - ``url`` - url to bundle against (default: SAGE_SERVER, or push_url()) - ``base`` - a base changeset revision number to bundle against (doesn't require internet access) """ if not base is None: url = '' options = '--base=%s %s'%(int(base), options) if url is None: url = self.__push_url | 62fb7b5aa6ceda6c6c2bd7f4ca688c1f3beaee5f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/62fb7b5aa6ceda6c6c2bd7f4ca688c1f3beaee5f/hg.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3440,
12,
2890,
16,
1544,
16,
702,
2218,
2187,
880,
33,
7036,
16,
1026,
33,
7036,
16,
358,
33,
7036,
4672,
436,
8395,
1788,
392,
22576,
22463,
3440,
598,
326,
864,
1544,
5314,
326,
335... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3440,
12,
2890,
16,
1544,
16,
702,
2218,
2187,
880,
33,
7036,
16,
1026,
33,
7036,
16,
358,
33,
7036,
4672,
436,
8395,
1788,
392,
22576,
22463,
3440,
598,
326,
864,
1544,
5314,
326,
335... |
partial_decoded = decode_filename(partial_filename) | def create_partial_patches(patches): """ Given the patches generates a set of partial patches""" shas = {} work_dir_root = None metadata = [] try: work_dir_root = tempfile.mkdtemp('-fastmode', 'tmp', os.getcwd()) print "Building patches using work dir: %s" % (work_dir_root) # Iterate through every patch set in the patch file patch_num = 1 for patch in patches: startTime = time.time() from_filename,to_filename,patch_filename,forced_updates = patch.split(",") from_filename,to_filename,patch_filename = os.path.abspath(from_filename),os.path.abspath(to_filename),os.path.abspath(patch_filename) # Each patch iteration uses its own work dir work_dir = os.path.join(work_dir_root,str(patch_num)) os.mkdir(work_dir) # Extract from mar into from dir work_dir_from = os.path.join(work_dir,"from"); os.mkdir(work_dir_from) extract_mar(from_filename,work_dir_from) from_decoded = decode_filename(from_filename) from_buildid = get_buildid(work_dir_from, from_decoded['platform']) from_shasum = sha.sha(open(from_filename).read()).hexdigest() from_size = str(os.path.getsize(to_filename)) # Extract to mar into to dir work_dir_to = os.path.join(work_dir,"to") os.mkdir(work_dir_to) extract_mar(to_filename, work_dir_to) to_decoded = decode_filename(from_filename) to_buildid = get_buildid(work_dir_to, to_decoded['platform']) to_shasum = sha.sha(open(to_filename).read()).hexdigest() to_size = str(os.path.getsize(to_filename)) mar_extract_time = time.time() partial_filename = create_partial_patch(work_dir_from, work_dir_to, patch_filename, shas, PatchInfo(work_dir, ['channel-prefs.js','update.manifest','removed-files'],['/readme.txt'])) partial_decoded = decode_filename(partial_filename) partial_buildid = to_buildid partial_shasum = sha.sha(open(partial_filename).read()).hexdigest() partial_size = str(os.path.getsize(partial_filename)) metadata.append({ 'to_filename': os.path.basename(to_filename), 'from_filename': os.path.basename(from_filename), 'partial_filename': os.path.basename(partial_filename), 'to_buildid':to_buildid, 'from_buildid':from_buildid, 'to_sha1sum':to_shasum, 'from_sha1sum':from_shasum, 'partial_sha1sum':partial_shasum, 'to_size':to_size, 'from_size':from_size, 'partial_size':partial_size, 'to_version':to_decoded['version'], 'from_version':from_decoded['version'], 'locale':partial_decoded['locale'], 'platform':partial_decoded['platform'], }) print "done with patch %s/%s time (%.2fs/%.2fs/%.2fs) (mar/patch/total)" % (str(patch_num),str(len(patches)),mar_extract_time-startTime,time.time()-mar_extract_time,time.time()-startTime) patch_num += 1 return metadata finally: # If we fail or get a ctrl-c during run be sure to clean up temp dir if (work_dir_root and os.path.exists(work_dir_root)): shutil.rmtree(work_dir_root) | f10e8ffac3129ffb7c4cb40cf1412b27e6680d51 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11102/f10e8ffac3129ffb7c4cb40cf1412b27e6680d51/make_incremental_updates.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
67,
11601,
67,
30278,
12,
30278,
4672,
3536,
16803,
326,
16482,
6026,
279,
444,
434,
4702,
16482,
8395,
699,
345,
273,
2618,
225,
1440,
67,
1214,
67,
3085,
273,
599,
1982,
273,
5378... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
11601,
67,
30278,
12,
30278,
4672,
3536,
16803,
326,
16482,
6026,
279,
444,
434,
4702,
16482,
8395,
699,
345,
273,
2618,
225,
1440,
67,
1214,
67,
3085,
273,
599,
1982,
273,
5378... | |
subDirs = res['Value']['Successful'][currentDir]['SubDirs'] files = res['Value']['Successful'][currentDir]['Files'] | subDirs = [] files = {} for surl,surlDict in res['Value']['Successful'][currentDir]['Files'].items(): pfnRes = storageElement.getPfnForProtocol(surl,'SRM2',withPort=False) surl = pfnRes['Value'] files[surl] = surlDict for surl,surlDict in res['Value']['Successful'][currentDir]['SubDirs'].items(): pfnRes = storageElement.getPfnForProtocol(surl,'SRM2',withPort=False) surl = pfnRes['Value'] subDirs.append(surl) gLogger.info("SEvsLFCAgent.execute: Successfully obtained %s sub-directories." % len(subDirs)) gLogger.info("SEvsLFCAgent.execute: Successfully obtained %s files." % len(files)) | def execute(self): | 1b9d83d531f8db0d9d33db0e1e58e4f715d8c153 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12864/1b9d83d531f8db0d9d33db0e1e58e4f715d8c153/SEvsLFCAgent.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1836,
12,
2890,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1836,
12,
2890,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
self.elc.keep_alive | self.elc.keep_alive() | def __keep_alive(self): """keeps self.elc alive by calling its keep_alive function. This is called automatically every 15 seconds by the gobject API""" self.elc.keep_alive return True | f17bf6cfd27b0e2858ae58f50da873fb5bc7c2cd /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5162/f17bf6cfd27b0e2858ae58f50da873fb5bc7c2cd/chat.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
10102,
67,
11462,
12,
2890,
4672,
3536,
10102,
87,
365,
18,
292,
71,
13714,
635,
4440,
2097,
3455,
67,
11462,
445,
18,
1220,
353,
2566,
6635,
3614,
4711,
3974,
635,
326,
314,
1612,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
10102,
67,
11462,
12,
2890,
4672,
3536,
10102,
87,
365,
18,
292,
71,
13714,
635,
4440,
2097,
3455,
67,
11462,
445,
18,
1220,
353,
2566,
6635,
3614,
4711,
3974,
635,
326,
314,
1612,... |
def fl_insert_select_items(p1, p2, p3): """ fl_insert_select_items(p1, p2, p3) -> popup_entry ref. """ retval = _fl_insert_select_items(p1, p2, p3) | def fl_insert_select_items(obj, p2, p3): """ fl_insert_select_items(obj, p2, p3) -> popup_entry """ retval = _fl_insert_select_items(obj, p2, p3) | def fl_insert_select_items(p1, p2, p3): """ fl_insert_select_items(p1, p2, p3) -> popup_entry ref. """ retval = _fl_insert_select_items(p1, p2, p3) return retval | 8765c710f695de392f6fc7c664c746ec98668b1d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2429/8765c710f695de392f6fc7c664c746ec98668b1d/xformslib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1183,
67,
6387,
67,
4025,
67,
3319,
12,
2603,
16,
293,
22,
16,
293,
23,
4672,
3536,
1183,
67,
6387,
67,
4025,
67,
3319,
12,
2603,
16,
293,
22,
16,
293,
23,
13,
317,
10431,
67,
4099... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1183,
67,
6387,
67,
4025,
67,
3319,
12,
2603,
16,
293,
22,
16,
293,
23,
4672,
3536,
1183,
67,
6387,
67,
4025,
67,
3319,
12,
2603,
16,
293,
22,
16,
293,
23,
13,
317,
10431,
67,
4099... |
self.currStep = self.getStepWithID("checklanstatusend") self.afterAsyncCode() | if self.selectedInterface in ('wlan0', 'ath0'): if self.WlanPluginInstalled == True: from Plugins.SystemPlugins.WirelessLan.Wlan import iStatus iStatus.getDataForInterface(self.selectedInterface,self.checkWlanStateCB) else: self.currStep = self.getStepWithID("checklanstatusend") self.afterAsyncCode() else: self.currStep = self.getStepWithID("checklanstatusend") self.afterAsyncCode() | def AdapterSetupEndCB(self,data): if data is True: self.currStep = self.getStepWithID("checklanstatusend") self.afterAsyncCode() | d6e258a761abb1074a1157d17b9c42b7f28959ce /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6652/d6e258a761abb1074a1157d17b9c42b7f28959ce/NetworkWizard.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
14238,
7365,
1638,
8876,
12,
2890,
16,
892,
4672,
309,
501,
353,
1053,
30,
365,
18,
17016,
4160,
273,
365,
18,
588,
4160,
1190,
734,
2932,
1893,
6115,
2327,
409,
7923,
365,
18,
5205,
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,
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,
14238,
7365,
1638,
8876,
12,
2890,
16,
892,
4672,
309,
501,
353,
1053,
30,
365,
18,
17016,
4160,
273,
365,
18,
588,
4160,
1190,
734,
2932,
1893,
6115,
2327,
409,
7923,
365,
18,
5205,
2... |
self.setDaemon(True) | self.daemon = True | def __init__(self, certfile): self.flag = None self.active = False self.server = self.EchoServer(certfile) self.port = self.server.port threading.Thread.__init__(self) self.setDaemon(True) | c048eba81671002b900e506217b944305a2b1042 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8125/c048eba81671002b900e506217b944305a2b1042/test_ssl.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
3320,
768,
4672,
365,
18,
6420,
273,
599,
365,
18,
3535,
273,
1083,
365,
18,
3567,
273,
365,
18,
19704,
2081,
12,
7593,
768,
13,
365,
18,
655,
273,
365... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
3320,
768,
4672,
365,
18,
6420,
273,
599,
365,
18,
3535,
273,
1083,
365,
18,
3567,
273,
365,
18,
19704,
2081,
12,
7593,
768,
13,
365,
18,
655,
273,
365... |
res.update({'trans_nbr':data['debit']}) | res.update({'debit':data['debit']}) | def default_get(self, cr, uid, fields, context=None): res = super(account_move_line_reconcile, self).default_get(cr, uid, fields, context=context) data = self.trans_rec_get(cr, uid, context['active_ids'], context) if 'trans_nbr' in fields: res.update({'trans_nbr':data['trans_nbr']}) if 'credit' in fields: res.update({'trans_nbr':data['credit']}) if 'debit' in fields: res.update({'trans_nbr':data['debit']}) if 'writeoff' in fields: res.update({'trans_nbr':data['writeoff']}) return res | 2deeca8f09cb50cfb2244c842522ba638a05f5ac /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/2deeca8f09cb50cfb2244c842522ba638a05f5ac/account_reconcile.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
805,
67,
588,
12,
2890,
16,
4422,
16,
4555,
16,
1466,
16,
819,
33,
7036,
4672,
400,
273,
2240,
12,
4631,
67,
8501,
67,
1369,
67,
266,
11504,
398,
16,
365,
2934,
1886,
67,
588,
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,
805,
67,
588,
12,
2890,
16,
4422,
16,
4555,
16,
1466,
16,
819,
33,
7036,
4672,
400,
273,
2240,
12,
4631,
67,
8501,
67,
1369,
67,
266,
11504,
398,
16,
365,
2934,
1886,
67,
588,
12,
... |
self.setDaemon(True) | self.daemon = True | def __init__(self, certfile): self.flag = None self.active = False self.RootedHTTPRequestHandler.root = os.path.split(CERTFILE)[0] self.port = test_support.find_unused_port() self.server = self.HTTPSServer( (HOST, self.port), self.RootedHTTPRequestHandler, certfile) threading.Thread.__init__(self) self.setDaemon(True) | 36ab947efc2091501425a5e070312bbdb73b0a9b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12029/36ab947efc2091501425a5e070312bbdb73b0a9b/test_ssl.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
3320,
768,
4672,
365,
18,
6420,
273,
599,
365,
18,
3535,
273,
1083,
365,
18,
2375,
329,
23891,
1503,
18,
3085,
273,
1140,
18,
803,
18,
4939,
12,
22367,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3320,
768,
4672,
365,
18,
6420,
273,
599,
365,
18,
3535,
273,
1083,
365,
18,
2375,
329,
23891,
1503,
18,
3085,
273,
1140,
18,
803,
18,
4939,
12,
22367,
... |
fparam_names = [p.name() for p in fdoc.parameter_list()] kwarg_name = fdoc.kwarg() and fdoc.kwarg().name() vararg_name = fdoc.vararg() and fdoc.vararg().name() | def _func_details(self, functions, cls, heading='Function Details'): """ @return: The HTML code for a function details table. This is used by L{_module_to_html} to describe the functions in a module; and by L{_class_to_html} to describe member functions. @rtype: C{string} """ functions = self._filtersort_links(functions) if len(functions) == 0: return '' str = self._table_header(heading, 'details')+'</table>\n' | 39e5af73828c8af59d5a33364eb58c056bcb1d75 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/39e5af73828c8af59d5a33364eb58c056bcb1d75/html.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
644,
67,
6395,
12,
2890,
16,
4186,
16,
2028,
16,
11053,
2218,
2083,
21897,
11,
4672,
3536,
632,
2463,
30,
1021,
3982,
981,
364,
279,
445,
3189,
1014,
18,
225,
1220,
353,
1399,
635... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
644,
67,
6395,
12,
2890,
16,
4186,
16,
2028,
16,
11053,
2218,
2083,
21897,
11,
4672,
3536,
632,
2463,
30,
1021,
3982,
981,
364,
279,
445,
3189,
1014,
18,
225,
1220,
353,
1399,
635... | |
'Slider: alpha [2--|3==4|---5]' """ return "Slider: %s [%s--|%s==%s|---%s]"%(self.label(), self.values()[0], | 'Range Slider: alpha [2--|3==4|---5]' """ return "Range Slider: %s [%s--|%s==%s|---%s]"%(self.label(), self.values()[0], | def __repr__(self): """ Return string representation of this slider. EXAMPLES: sage: range_slider(2, 5, 1/5, (3,4), 'alpha').__repr__() 'Slider: alpha [2--|3==4|---5]' """ return "Slider: %s [%s--|%s==%s|---%s]"%(self.label(), self.values()[0], self.values()[self.default_index()[0]], self.values()[self.default_index()[1]], self.values()[-1]) | 5dee6800360a6857d894611450cab0a310ea04a5 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/5dee6800360a6857d894611450cab0a310ea04a5/interact.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
12715,
972,
12,
2890,
4672,
3536,
2000,
533,
4335,
434,
333,
18442,
18,
225,
5675,
8900,
11386,
30,
272,
410,
30,
1048,
67,
28372,
12,
22,
16,
1381,
16,
404,
19,
25,
16,
261,
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,
1001,
12715,
972,
12,
2890,
4672,
3536,
2000,
533,
4335,
434,
333,
18442,
18,
225,
5675,
8900,
11386,
30,
272,
410,
30,
1048,
67,
28372,
12,
22,
16,
1381,
16,
404,
19,
25,
16,
261,
2... |
r'''\converter docbook dvi "none" "" \converter docbook html "none" ""''']) if DOCBOOK != 'none': | r'''\converter docbook dvi "" "" \converter docbook html "" ""''']) if DOCBOOK != '': | def checkDocBook(): ''' Check docbook ''' path, DOCBOOK = checkProg('SGML-tools 2.x (DocBook) or db2x scripts', ['sgmltools', 'db2dvi'], rc_entry = [ r'''\converter docbook dvi "sgmltools -b dvi $$i" "" | d5443737342903de489d527802cd2cdd38987d74 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7514/d5443737342903de489d527802cd2cdd38987d74/configure.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
1759,
9084,
13332,
9163,
2073,
997,
3618,
9163,
589,
16,
5467,
39,
28163,
273,
866,
626,
75,
2668,
30820,
1495,
17,
6642,
576,
18,
92,
261,
1759,
9084,
13,
578,
1319,
22,
92,
8873... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1759,
9084,
13332,
9163,
2073,
997,
3618,
9163,
589,
16,
5467,
39,
28163,
273,
866,
626,
75,
2668,
30820,
1495,
17,
6642,
576,
18,
92,
261,
1759,
9084,
13,
578,
1319,
22,
92,
8873... |
message = _('Remove book(s) from "%s".') % src_name | if drag_id == _DRAG_BOOK_ID: message = _('Remove book(s) from "%s".') % src_name elif drag_id == _DRAG_COLLECTION_ID: message = '' | def _drag_book_motion(self, treeview, context, x, y, *args): """Set the library statusbar text when hovering a drag-n-drop over a collection.""" src_collection, dest_collection = \ self._drag_get_src_and_dest_collections(treeview, x, y) if src_collection == dest_collection: self._library.set_status_message('') return if src_collection != _COLLECTION_ALL: src_name = self._library.backend.get_collection_name( src_collection) if dest_collection != _COLLECTION_ALL: dest_name = self._library.backend.get_collection_name( dest_collection) if dest_collection == _COLLECTION_ALL: message = _('Remove book(s) from "%s".') % src_name elif src_collection == _COLLECTION_ALL: message = _('Add book(s) to "%s".') % dest_name else: message = _('Move book(s) from "%s" to "%s".') % (src_name, dest_name) self._library.set_status_message(message) | a136d76115993531f47986c8ca471d73caebd80c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/14624/a136d76115993531f47986c8ca471d73caebd80c/library.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
15997,
67,
3618,
67,
81,
8240,
12,
2890,
16,
2151,
1945,
16,
819,
16,
619,
16,
677,
16,
380,
1968,
4672,
3536,
694,
326,
5313,
1267,
3215,
977,
1347,
15758,
310,
279,
8823,
17,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
15997,
67,
3618,
67,
81,
8240,
12,
2890,
16,
2151,
1945,
16,
819,
16,
619,
16,
677,
16,
380,
1968,
4672,
3536,
694,
326,
5313,
1267,
3215,
977,
1347,
15758,
310,
279,
8823,
17,
... |
output from :meth:`asann`) into a URL suitable for passing to the Google Chart API. | output from :meth:`asann`); convert into a URL suitable for passing to the Google Chart API. | def asgooglechartURL(seq, options={}): """*seq* is a sequence of iterables (each one assumed to be the output from :meth:`asann`) into a URL suitable for passing to the Google Chart API. Each element of the sequence corresponds to a different data series, all the series are plotted on the same chart. *Options* is a dict mapping keywords to optional attributes: option.offset: specifies the inter-chart offset, as per the -o option (see module docstring). The default is zero. option.size: specifies the chart size as a tuple (width, height). The default is (600, 500). """ import itertools # default options default_options = dict(offset=0, size=(600,500), colour=['ff0000', '000000', '0000ff', 'ff00ff'], ) default_options.update(options) options = default_options prefix = 'http://chart.apis.google.com/chart' # Read all data because we need to compute min and max years data = [list(s) for s in seq] yearmin = min(map(lambda p:p[0], itertools.chain(*data))) yearmax = max(map(lambda p:p[0], itertools.chain(*data))) data = [pad(s, yearmin, yearmax) for s in data] # Let y be the list of years for the chart legend. We include # the first year of the series, the last year, and every decade # beginning. y = map(lambda x:x[0], data[0]) for i in range(1,len(y)-1): if y[i]%10: y[i]='' xaxis = '|' + '|'.join(map(str, y)) trends = [trendlines(l) for l in data] trenddata = [t[0] for t in trends] slopes = [t[1:len(data)+1] for t in trends] coefficients = [t[len(data)+1:] for t in trends] ds = ['-999|' + chartsingle(l) for l in data] + trenddata vaxis = '||-0.5|+0.0|+0.5|' chxl = 'chxl=0:'+xaxis+'|1:'+vaxis+'|2:'+vaxis chxt = 'chxt=x,y,r' chd='chd=t:' + '|'.join(ds) chs='chs=' + 'x'.join(map(str, options['size'])) # Choose scale, and deal with offset if we have to. offset = options['offset'] scale = [-100,100]*6 if offset and len(seq) > 1: scale *= len(seq) for i in range(len(seq)): # Y range of actual data series scale[4*i+2] -= i*offset scale[4*i+3] -= i*offset # Y range of first trend scale[4*len(seq) + 8*i + 2] -= offset scale[4*len(seq) + 8*i + 3] -= offset # Y range of second trend scale[4*len(seq) + 8*i + 6] -= offset scale[4*len(seq) + 8*i + 7] -= offset chds = 'chds=' + ','.join(map(str, scale)) # red, black, blue, magenta for the underlying graphs colours = options['colour'] colours = colours[:len(data)] chm = 'chm=' + '|'.join(slope_markers(slopes, coefficients, colours)) # Replicate each colour by three (for the chart and its two trend # lines). series_colours = colours + list(itertools.chain(*([c,c] for c in colours))) chco = 'chco=' + ','.join(series_colours) # Line Style chls = 'chls=' + '|'.join(['1']*len(data) + ['1,8,2', '1']*len(data)) return prefix + '?' + '&'.join( ['cht=lxy',chds,chd,chxt,chxl,chco,chls,chm,chs]) | fcceccd589e2b05d5dde1db921d81cea9a2d7e4c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6890/fcceccd589e2b05d5dde1db921d81cea9a2d7e4c/vischeck.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
487,
9536,
11563,
1785,
12,
5436,
16,
702,
12938,
4672,
3536,
14,
5436,
14,
353,
279,
3102,
434,
27447,
261,
13798,
1245,
12034,
358,
506,
326,
876,
628,
294,
27305,
28288,
345,
1072,
68... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
487,
9536,
11563,
1785,
12,
5436,
16,
702,
12938,
4672,
3536,
14,
5436,
14,
353,
279,
3102,
434,
27447,
261,
13798,
1245,
12034,
358,
506,
326,
876,
628,
294,
27305,
28288,
345,
1072,
68... |
"""Returns a new sequence number for insertion in self._sqlTable. | """Return a new sequence number for insertion in self._sqlTable. | def _nextSequence(cls, name=None): """Returns a new sequence number for insertion in self._sqlTable. Note that if your sequences are not named tablename_primarykey_seq (ie. for table 'blapp' with primary key 'john_id', sequence name blapp_john_id_seq) you must give the full sequence name as an optional argument to _nextSequence) """ if not name: name = cls._sqlSequence if not name: # Assume it's tablename_primarykey_seq if len(cls._sqlPrimary) <> 1: raise "Could not guess sequence name for multi-primary-key" primary = cls._sqlPrimary[0] name = '%s_%s_seq' % (cls._sqlTable, primary.replace('.','_')) # Don't have . as a tablename or column name! =) curs = cls.cursor() curs.execute("SELECT nextval('%s')" % name) value = curs.fetchone()[0] curs.close() return value | 6f065d7f40e2cd8ad1cba00bf68d639f5bb58726 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1051/6f065d7f40e2cd8ad1cba00bf68d639f5bb58726/forgetSQL.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
4285,
4021,
12,
6429,
16,
508,
33,
7036,
4672,
3536,
990,
279,
394,
3102,
1300,
364,
12626,
316,
365,
6315,
4669,
1388,
18,
225,
3609,
716,
309,
3433,
8463,
854,
486,
4141,
19096,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4285,
4021,
12,
6429,
16,
508,
33,
7036,
4672,
3536,
990,
279,
394,
3102,
1300,
364,
12626,
316,
365,
6315,
4669,
1388,
18,
225,
3609,
716,
309,
3433,
8463,
854,
486,
4141,
19096,
... |
if not self.flat and n.has_parent(): | if not self.flat and n and n.has_parent(): | def __is_root(self,n): is_root = True if not self.flat and n.has_parent(): for par in n.get_parents(): if self.__is_displayed(par): is_root = False return is_root | f53d03c7f8e5adf2aca439438999460b65120b34 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/f53d03c7f8e5adf2aca439438999460b65120b34/filteredtree.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
291,
67,
3085,
12,
2890,
16,
82,
4672,
353,
67,
3085,
273,
1053,
309,
486,
365,
18,
15401,
471,
290,
471,
290,
18,
5332,
67,
2938,
13332,
364,
779,
316,
290,
18,
588,
67,
12606... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
291,
67,
3085,
12,
2890,
16,
82,
4672,
353,
67,
3085,
273,
1053,
309,
486,
365,
18,
15401,
471,
290,
471,
290,
18,
5332,
67,
2938,
13332,
364,
779,
316,
290,
18,
588,
67,
12606... |
results_for_builder['buildNumbers'] = [] results_for_builder['tests'] = {} | results_for_builder[self.BUILD_NUMBERS] = [] results_for_builder[self.TESTS] = {} | def _CreateResultsForBuilderJSON(self): results_for_builder = {} results_for_builder['buildNumbers'] = [] results_for_builder['tests'] = {} return results_for_builder | 2fd459f1f97f73b2507f449ffd0961ed35f45333 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5060/2fd459f1f97f73b2507f449ffd0961ed35f45333/json_results_generator.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1684,
3447,
1290,
1263,
2986,
12,
2890,
4672,
1686,
67,
1884,
67,
9574,
273,
2618,
1686,
67,
1884,
67,
9574,
63,
2890,
18,
20215,
67,
9931,
55,
65,
273,
5378,
1686,
67,
1884,
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,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1684,
3447,
1290,
1263,
2986,
12,
2890,
4672,
1686,
67,
1884,
67,
9574,
273,
2618,
1686,
67,
1884,
67,
9574,
63,
2890,
18,
20215,
67,
9931,
55,
65,
273,
5378,
1686,
67,
1884,
67,
... |
pass | raise NotImplementedError('Encryption is not yet supported') | def encrypt(self): """Encrypts phonebook""" # TODO implement pass | f24f12b48a571183e88090f9b172a58c7473e935 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2215/f24f12b48a571183e88090f9b172a58c7473e935/tel.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7347,
12,
2890,
4672,
3536,
4280,
20261,
7353,
3618,
8395,
468,
2660,
2348,
1342,
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,... | [
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,
7347,
12,
2890,
4672,
3536,
4280,
20261,
7353,
3618,
8395,
468,
2660,
2348,
1342,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.