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 errcheck(result, func, arguments): if result < 0: errno = ctypes.get_errno() raise OSError(errno, os.strerror(errno)) return result libc = ctypes.CDLL(ctypes.util.find_library("c"), use_errno=True) libc.inotify_init.argtypes = [] libc.inotify_init.errcheck = errcheck libc.inotify_init1.argtypes = [ctypes.c_int] libc.inotify_init1.errcheck = errcheck libc.inotify_add_watch.argtypes = [ctypes.c_int, ctypes.c_char_p, ctypes.c_uint32] libc.inotify_add_watch.errcheck = errcheck libc.inotify_rm_watch.argtypes = [ctypes.c_int, ctypes.c_int] libc.inotify_rm_watch.errcheck = errcheck | def errcheck(result, func, arguments): if result < 0: errno = ctypes.get_errno() raise OSError(errno, os.strerror(errno)) return result | cd4adef5bbe7c15f648d858e0fd291f85642892b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13731/cd4adef5bbe7c15f648d858e0fd291f85642892b/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
393,
1893,
12,
2088,
16,
1326,
16,
1775,
4672,
309,
563,
411,
374,
30,
8402,
273,
6983,
18,
588,
67,
19088,
1435,
1002,
10002,
12,
19088,
16,
1140,
18,
701,
1636,
12,
19088,
3719,
225,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
393,
1893,
12,
2088,
16,
1326,
16,
1775,
4672,
309,
563,
411,
374,
30,
8402,
273,
6983,
18,
588,
67,
19088,
1435,
1002,
10002,
12,
19088,
16,
1140,
18,
701,
1636,
12,
19088,
3719,
225,... | |
tf.close() | tf.close() | def createPackedInputSandbox(sandbox_files,inws,name): """Put all sandbox_files into tarball called name and write it into to the input workspace. This function is called by Ganga client at the submission time. Arguments: 'sandbox_files': a list of File or FileBuffer objects. 'inws': a InputFileWorkspace object Return: a list containing a path to the tarball """ | 3975c813beb1813bd20f0bfbca2b9570fe12bca8 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1488/3975c813beb1813bd20f0bfbca2b9570fe12bca8/Sandbox.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
4420,
329,
1210,
17881,
12,
27004,
67,
2354,
16,
267,
4749,
16,
529,
4672,
3536,
6426,
777,
15202,
67,
2354,
1368,
29441,
2566,
508,
471,
1045,
518,
1368,
358,
326,
810,
6003,
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,
752,
4420,
329,
1210,
17881,
12,
27004,
67,
2354,
16,
267,
4749,
16,
529,
4672,
3536,
6426,
777,
15202,
67,
2354,
1368,
29441,
2566,
508,
471,
1045,
518,
1368,
358,
326,
810,
6003,
18,
... |
if not f in self.cexecuted: | if not self.cexecuted.has_key(f): | def canonicalize_filenames(self): for filename, lineno in self.c.keys(): if filename == '<string>': # Can't do anything useful with exec'd strings, so skip them. continue f = self.canonical_filename(filename) if not f in self.cexecuted: self.cexecuted[f] = {} self.cexecuted[f][lineno] = 1 self.c = {} | 6554c74cd9574cf89b8acd0a0333651afacbfa8e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11312/6554c74cd9574cf89b8acd0a0333651afacbfa8e/coverage.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
25839,
67,
19875,
12,
2890,
4672,
364,
1544,
16,
7586,
316,
365,
18,
71,
18,
2452,
13332,
309,
1544,
422,
2368,
1080,
1870,
30,
468,
4480,
1404,
741,
6967,
5301,
598,
1196,
14271,
2064,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
25839,
67,
19875,
12,
2890,
4672,
364,
1544,
16,
7586,
316,
365,
18,
71,
18,
2452,
13332,
309,
1544,
422,
2368,
1080,
1870,
30,
468,
4480,
1404,
741,
6967,
5301,
598,
1196,
14271,
2064,
... |
Return the quartic twist of this curve by D. | Return the quartic twist of this curve by D, which must be nonzero. | def quartic_twist(self, D): """ Return the quartic twist of this curve by D. | 317b135e24525174c25bb62d554be485f9c82093 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/317b135e24525174c25bb62d554be485f9c82093/ell_generic.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
719,
485,
335,
67,
11246,
376,
12,
2890,
16,
463,
4672,
3536,
2000,
326,
719,
485,
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,
719,
485,
335,
67,
11246,
376,
12,
2890,
16,
463,
4672,
3536,
2000,
326,
719,
485,
335,
2339,
376,
434,
333,
8882,
635,
463,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
if isinstance(property_uri, (list, tuple, QuerySet)): result_prop_uri = property_uri | if isinstance(property_uri, (list, tuple, QuerySet)): result_prop_uri = property_uri | def get_property_uris(self, prop, rdfMeta=None): if not rdfMeta: rdfMeta = self.rdfMeta() rdfprops = rdfMeta[prop] # -- get the value of this property dbval = getattr(self, rdfprops["property"]) if "property" in rdfprops else getattr(self, prop) # --- if this is a relation type of property if hasattr(dbval, 'all') and callable(dbval.all): rval = self.objects_as_rdf_list(dbval.all()) # --- if this is a literal ? else: rval = self.property_to_string(prop) # -- property property_uri = rdfMeta[prop]["uri"] # -- repack | d6c797f4a2089543ac6cb76bfb9c014053f177e3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11435/d6c797f4a2089543ac6cb76bfb9c014053f177e3/rdf.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
4468,
67,
23510,
12,
2890,
16,
2270,
16,
9160,
2781,
33,
7036,
4672,
309,
486,
9160,
2781,
30,
9160,
2781,
273,
365,
18,
19299,
2781,
1435,
9160,
9693,
273,
9160,
2781,
63,
59... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
4468,
67,
23510,
12,
2890,
16,
2270,
16,
9160,
2781,
33,
7036,
4672,
309,
486,
9160,
2781,
30,
9160,
2781,
273,
365,
18,
19299,
2781,
1435,
9160,
9693,
273,
9160,
2781,
63,
59... |
op.add_option('-d', '--debug', dest='debug', action='store_true', | op.add_option('-g', '--debug', dest='debug', action='store_true', | def run_tests(tests, test_dir, lib_dir): pb = None if not OPTIONS.hide_progress and not OPTIONS.show_cmd: try: from progressbar import ProgressBar pb = ProgressBar('', len(tests), 13) except ImportError: pass failures = [] complete = False doing = 'before starting' try: for i, test in enumerate(tests): doing = 'on %s'%test.path ok, out, err = run_test(test, lib_dir) doing = 'after %s'%test.path if not ok: failures.append(test.path) if OPTIONS.tinderbox: if ok: print('TEST-PASS | trace-test.py | %s'%test.path) else: lines = [ _ for _ in out.split('\n') + err.split('\n') if _ != '' ] if len(lines) >= 1: msg = lines[-1] else: msg = '' print('TEST-UNEXPECTED-FAIL | trace-test.py | %s: %s'% (test.path, msg)) n = i + 1 if pb: pb.label = '[%3d|%3d|%3d]'%(n - len(failures), len(failures), n) pb.update(n) complete = True except KeyboardInterrupt: pass if pb: pb.finish() if failures: if OPTIONS.write_failures: try: out = open(OPTIONS.write_failures, 'w') for test in failures: out.write(os.path.relpath(test, test_dir) + '\n') out.close() except IOError: sys.stderr.write("Exception thrown trying to write failure file '%s'\n"% OPTIONS.write_failures) traceback.print_exc() sys.stderr.write('---\n') print('FAILURES:') for test in failures: if OPTIONS.show_failed: print(' ' + subprocess.list2cmdline(get_test_cmd(test, lib_dir))) else: print(' ' + test) else: print('PASSED ALL' + ('' if complete else ' (partial run -- interrupted by user %s)'%doing)) | 7bf18187bf331c61553e8ba72d890bd5fd4cc385 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11102/7bf18187bf331c61553e8ba72d890bd5fd4cc385/trace-test.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
67,
16341,
12,
16341,
16,
1842,
67,
1214,
16,
2561,
67,
1214,
4672,
6386,
273,
599,
309,
486,
16726,
18,
11248,
67,
8298,
471,
486,
16726,
18,
4500,
67,
4172,
30,
775,
30,
628,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
16341,
12,
16341,
16,
1842,
67,
1214,
16,
2561,
67,
1214,
4672,
6386,
273,
599,
309,
486,
16726,
18,
11248,
67,
8298,
471,
486,
16726,
18,
4500,
67,
4172,
30,
775,
30,
628,
... |
if pkg["name"] != name: | if rpm["name"] != name: | def checkDeps(rpms): # Add all packages in. resolver = RpmResolver() for pkg in rpms: resolver.addPkg(pkg) # Check for obsoletes. for name in resolver.obsoletes_list.deps.keys(): for (flag, version, rpm) in resolver.obsoletes_list.deps[name]: for pkg in searchDep(name, flag, version, resolver.mydeps.get(name, [])): if pkg["name"] != name: print "Warning:", pkg.getFilename(), "is obsoleted by", \ depString(name, flag, version), "from", rpm.getFilename() # Check all requires. for name in resolver.requires_list.deps.keys(): if name.startswith("rpmlib("): continue for (flag, version, rpm) in resolver.requires_list.deps[name]: if not resolver.searchDependency(name, flag, version): print "Warning:", rpm.getFilename(), \ "did not find a package for:", \ depString(name, flag, version) # Check all conflicts. for name in resolver.conflicts_list.deps.keys(): for (flag, version, rpm) in resolver.conflicts_list.deps[name]: for pkg in resolver.searchDependency(name, flag, version): print "Warning:", rpm.getFilename(), "contains a conflict", \ depString(name, flag, version), "with", pkg.getFilename() # Check for fileconflicts. for dirname in resolver.filenames_list.path.keys(): for basename in resolver.filenames_list.path[dirname].keys(): s = resolver.filenames_list.path[dirname][basename] if len(s) < 2: continue filename = dirname + basename for j in xrange(len(s) - 1): (rpm1, i1) = s[j] for k in xrange(j + 1, len(s)): (rpm2, i2) = s[k] if not S_ISREG(rpm1["filemodes"][i1]) or \ not S_ISREG(rpm2["filemodes"][i2]): continue if rpm1["filemd5s"][i1] != rpm2["filemd5s"][i2]: print "fileconflict for", filename, "in", \ rpm1.getFilename(), rpm2.getFilename() | 1fec9a43376b6b9bfe41360a3ad6f07af8f8af71 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1143/1fec9a43376b6b9bfe41360a3ad6f07af8f8af71/oldpyrpm.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
14430,
12,
13832,
959,
4672,
468,
1436,
777,
5907,
316,
18,
5039,
273,
534,
7755,
4301,
1435,
364,
3475,
316,
8715,
959,
30,
5039,
18,
1289,
11264,
12,
10657,
13,
468,
2073,
364,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
14430,
12,
13832,
959,
4672,
468,
1436,
777,
5907,
316,
18,
5039,
273,
534,
7755,
4301,
1435,
364,
3475,
316,
8715,
959,
30,
5039,
18,
1289,
11264,
12,
10657,
13,
468,
2073,
364,
... |
if hasattr( left, "radius" ): | if hasattr(left, "radius"): | def __call__( self, left, right ): """pygame.sprite.collide_circle_radio(ratio)(left, right): return bool collision detection between two sprites, using scaled circles. | d9760f3e4782abb02dd98080337626eefdad67ee /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1298/d9760f3e4782abb02dd98080337626eefdad67ee/sprite.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1991,
972,
12,
365,
16,
2002,
16,
2145,
262,
30,
3536,
2074,
13957,
18,
1752,
796,
18,
1293,
8130,
67,
18970,
67,
17006,
12,
9847,
21433,
4482,
16,
2145,
4672,
327,
1426,
17740,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1991,
972,
12,
365,
16,
2002,
16,
2145,
262,
30,
3536,
2074,
13957,
18,
1752,
796,
18,
1293,
8130,
67,
18970,
67,
17006,
12,
9847,
21433,
4482,
16,
2145,
4672,
327,
1426,
17740,
... |
if v: | print v if v is not None: | def get_all_keys(self, headers=None, **params): """ A lower-level method for listing contents of a bucket. This closely models the actual S3 API and requires you to manually handle the paging of results. For a higher-level method that handles the details of paging for you, you can use the list method. @type maxkeys: int @param maxkeys: The maximum number of keys to retrieve @type prefix: string @param prefix: The prefix of the keys you want to retrieve @type marker: string @param marker: The "marker" of where you are in the result set @type delimiter: string @param delimiter: "If this optional, Unicode string parameter is included with your request, then keys that contain the same string between the prefix and the first occurrence of the delimiter will be rolled up into a single result element in the CommonPrefixes collection. These rolled-up keys are not returned elsewhere in the response." | ab75072a7d8b8462fc6ae179a49f86427823f303 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1098/ab75072a7d8b8462fc6ae179a49f86427823f303/bucket.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
454,
67,
2452,
12,
2890,
16,
1607,
33,
7036,
16,
2826,
2010,
4672,
3536,
432,
2612,
17,
2815,
707,
364,
11591,
2939,
434,
279,
2783,
18,
225,
1220,
1219,
1786,
93,
3679,
326,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
454,
67,
2452,
12,
2890,
16,
1607,
33,
7036,
16,
2826,
2010,
4672,
3536,
432,
2612,
17,
2815,
707,
364,
11591,
2939,
434,
279,
2783,
18,
225,
1220,
1219,
1786,
93,
3679,
326,
... |
transport = Transport() | if type == "https": transport = SafeTransport() else: transport = Transport() | def __init__(self, uri, transport=None): # establish a "logical" server connection | 80ead46c3b0b9513bc116e8fe08faa2f91145a91 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/80ead46c3b0b9513bc116e8fe08faa2f91145a91/xmlrpclib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
2003,
16,
4736,
33,
7036,
4672,
468,
18312,
279,
315,
20300,
6,
1438,
1459,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
2003,
16,
4736,
33,
7036,
4672,
468,
18312,
279,
315,
20300,
6,
1438,
1459,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
log.msg("Downloading %s\n" % (PackageName) ) | log.msg("Downloading %s.%s\n" % (PackageName, LINE_OVERWRITE_FULL) ) | def run(request, response, func=find_first_match): '''Get items from the request Queue, process them with func(), put the results along with the Thread's name into the response Queue. Stop running when item is None.''' while 1: tuple_item_key = request.get() if tuple_item_key is None: break (key, item) = tuple_item_key (url, file, download_size, checksum) = stripper(item) thread_name = threading.currentThread().getName() if key == 'Update': temp_file = file.split("_") PackageName = temp_file[0] PackageName += " - " + temp_file[len(temp_file) - 1] del temp_file #INFO: We pass None as a filename here because we don't want to do a tree search of # update files. Update files are changed daily and there is no point in doing a search of # them in the cache_dir response.put(func(cache_dir, None) ) #INFO: exit_status here would be False because for updates there's no need to do a # find_first_match # This is more with the above statement where None is passed as the filename exit_status = response.get() if exit_status == False: log.msg("Downloading %s\n" % (PackageName) ) if FetcherInstance.download_from_web(url, file, download_path) == True: log.success("\r%s done.%s\n" % (PackageName, LINE_OVERWRITE_FULL) ) if ArgumentOptions.zip_it: if FetcherInstance.compress_the_file(ArgumentOptions.zip_update_file, file) != True: log.err("Couldn't archive %s to file %s.%s\n" % (file, ArgumentOptions.zip_update_file, LINE_OVERWRITE_MID) ) sys.exit(1) else: log.verbose("%s added to archive %s.%s\n" % (file, ArgumentOptions.zip_update_file, LINE_OVERWRITE_FULL) ) os.unlink(os.path.join(download_path, file) ) else: errlist.append(file) elif key == 'Upgrade': PackageName = file.split("_")[0] response.put(func(cache_dir, file) ) #INFO: find_first_match() returns False or a file name with absolute path full_file_path = response.get() #INFO: If we find the file in the local cache_dir, we'll execute this block. if full_file_path != False: # We'll first check for its md5 checksum if ArgumentOptions.disable_md5check is False: if FetcherInstance.md5_check(full_file_path, checksum) is True: log.verbose("md5checksum correct for package %s.%s\n" % (PackageName, LINE_OVERWRITE_FULL) ) if ArgumentOptions.deb_bugs: bug_fetched = 0 log.verbose("Fetching bug reports for package %s.%s\n" % (PackageName, LINE_OVERWRITE_FULL) ) if FetchBugReportsDebian.FetchBugsDebian(PackageName): log.verbose("Fetched bug reports for package %s.%s\n" % (PackageName, LINE_OVERWRITE_FULL) ) bug_fetched = 1 else: log.verbose("Couldn't fetch bug reports for package %s.%s\n" % (PackageName, LINE_OVERWRITE_MID) ) if ArgumentOptions.zip_it: if FetcherInstance.compress_the_file(ArgumentOptions.zip_upgrade_file, full_file_path) is True: log.success("%s copied from local cache directory %s.%s\n" % (PackageName, cache_dir, LINE_OVERWRITE_MID) ) else: log.err("Couldn't add %s to archive %s.%s\n" % (file, ArgumentOptions.zip_upgrade_file, LINE_OVERWRITE_MID) ) sys.exit(1) #INFO: If no zip option enabled, simply copy the downloaded package file # along with the downloaded bug reports. else: try: shutil.copy(full_file_path, download_path) log.success("%s copied from local cache directory %s.%s\n" % (PackageName, cache_dir, LINE_OVERWRITE_MID) ) except shutil.Error: log.verbose("%s already available in %s. Skipping copy!!!%s\n\n" % (file, download_path, LINE_OVERWRITE_MID) ) if bug_fetched == 1: for x in os.listdir(os.curdir): if (x.startswith(PackageName) and x.endswith(pypt_bug_file_format) ): shutil.move(x, download_path) log.verbose("Moved %s file to %s folder.%s\n" % (x, download_path, LINE_OVERWRITE_FULL) ) #INFO: Damn!! The md5chesum didn't match :-( # The file is corrupted and we need to download a new copy from the internet else: log.verbose("%s MD5 checksum mismatch. Skipping file.%s\n" % (file, LINE_OVERWRITE_FULL) ) log.msg("Downloading %s - %d KB%s\n" % (PackageName, download_size/1024, LINE_OVERWRITE_FULL) ) if FetcherInstance.download_from_web(url, file, download_path) == True: log.success("\r%s done.%s\n" % (PackageName, LINE_OVERWRITE_FULL) ) #Add to cache_dir if possible if ArgumentOptions.cache_dir: try: shutil.copy(file, cache_dir) log.verbose("%s copied to local cache directory %s.%s\n" % (file, ArgumentOptions.cache_dir, LINE_OVERWRITE_MID) ) except shutil.Error: log.verbose("Couldn't copy %s to %s.%s\n\n" % (file, ArgumentOptions.cache_dir, LINE_OVERWRITE_FULL) ) #Fetch bug reports if ArgumentOptions.deb_bugs: if FetchBugReportsDebian.FetchBugsDebian(PackageName): log.verbose("Fetched bug reports for package %s.%s\n" % (PackageName, LINE_OVERWRITE_MID) ) else: log.verbose("Couldn't fetch bug reports for package %s.%s\n" % (PackageName, LINE_OVERWRITE_MID) ) if ArgumentOptions.zip_it: if FetcherInstance.compress_the_file(ArgumentOptions.zip_upgrade_file, file) != True: log.err("Couldn't archive %s to file %s.%s\n" % (file, ArgumentOptions.zip_upgrade_file, LINE_OVERWRITE_SMALL) ) sys.exit(1) else: log.verbose("%s added to archive %s.%s\n" % (file, ArgumentOptions.zip_upgrade_file, LINE_OVERWRITE_SMALL) ) os.unlink(os.path.join(download_path, file) ) #INFO: You're and idiot. # You should NOT disable md5checksum for any files else: if ArgumentOptions.deb_bugs: bug_fetched = 0 if FetchBugReportsDebian.FetchBugsDebian(PackageName): log.verbose("Fetched bug reports for package %s.%s\n" % (PackageName, LINE_OVERWRITE_MID) ) bug_fetched = 1 else: log.verbose("Couldn't fetch bug reports for package %s.%s\n" % (PackageName, LINE_OVERWRITE_MID) ) #FIXME: Don't know why this was really required. If this has no changes, delete it. #file = full_file_path.split("/") #file = file[len(file) - 1] #file = download_path + "/" + file if ArgumentOptions.zip_it: if FetcherInstance.compress_the_file(ArgumentOptions.zip_upgrade_file, file) != True: log.err("Couldn't archive %s to file %s.%s\n" % (file, ArgumentOptions.zip_upgrade_file, LINE_OVERWRITE_SMALL) ) sys.exit(1) else: log.verbose("%s added to archive %s.%s\n" % (file, ArgumentOptions.zip_upgrade_file, LINE_OVERWRITE_SMALL) ) os.unlink(os.path.join(download_path, file) ) else: # Since zip file option is not enabled let's copy the file to the target folder try: shutil.copy(full_file_path, download_path) log.success("%s copied from local cache directory %s.%s\n" % (file, cache_dir, LINE_OVERWRITE_SMALL) ) except shutil.Error: log.verbose("%s already available in dest_dir. Skipping copy!!!%s\n\n" % (file, LINE_OVERWRITE_SMALL) ) # And also the bug reports if bug_fetched == 1: for x in os.listdir(os.curdir): if (x.startswith(PackageName) and x.endswith(pypt_bug_file_format) ): shutil.move(x, download_path) log.verbose("Moved %s file to %s folder.%s\n" % (x, download_path, LINE_OVERWRITE_MID) ) else: #INFO: This block gets executed if the file is not found in local cache_dir or cache_dir is None # We go ahead and try to download it from the internet log.verbose("%s not available in local cache %s.%s\n" % (file, ArgumentOptions.cache_dir, LINE_OVERWRITE_MID) ) log.msg("Downloading %s - %d KB%s\n" % (PackageName, download_size/1024, LINE_OVERWRITE_FULL) ) if FetcherInstance.download_from_web(url, file, download_path) == True: #INFO: This block gets executed if md5checksum is allowed if ArgumentOptions.disable_md5check is False: if FetcherInstance.md5_check(file, checksum) is True: if ArgumentOptions.cache_dir: try: shutil.copy(file, ArgumentOptions.cache_dir) log.verbose("%s copied to local cache directory %s.%s\n" % (file, ArgumentOptions.cache_dir, LINE_OVERWRITE_MID) ) except shutil.Error: log.verbose("%s already available in %s. Skipping copy!!!%s\n\n" % (file, ArgumentOptions.cache_dir, LINE_OVERWRITE_MID) ) if ArgumentOptions.deb_bugs: if FetchBugReportsDebian.FetchBugsDebian(PackageName): log.verbose("Fetched bug reports for package %s.%s\n" % (PackageName, LINE_OVERWRITE_MID) ) else: log.verbose("Couldn't fetch bug reports for package %s.%s\n" % (PackageName, LINE_OVERWRITE_MID) ) if ArgumentOptions.zip_it: if FetcherInstance.compress_the_file(ArgumentOptions.zip_upgrade_file, file) != True: log.err("Couldn't archive %s to file %s.%s\n" % (file, ArgumentOptions.zip_upgrade_file, LINE_OVERWRITE_SMALL) ) sys.exit(1) else: log.verbose("%s added to archive %s.%s\n" % (file, ArgumentOptions.zip_upgrade_file, LINE_OVERWRITE_SMALL) ) os.unlink(os.path.join(download_path, file) ) else: if ArgumentOptions.deb_bugs: if FetchBugReportsDebian.FetchBugsDebian(PackageName): log.verbose("Fetched bug reports for package %s.%s\n" % (PackageName, LINE_OVERWRITE_MID) ) else: log.verbose("Couldn't fetch bug reports for package %s.%s\n" % (PackageName, LINE_OVERWRITE_MID) ) if ArgumentOptions.zip_it: if FetcherInstance.compress_the_file(ArgumentOptions.zip_upgrade_file, file) != True: log.err("Couldn't archive %s to file %s.%s\n" % (file, ArgumentOptions.zip_upgrade_file, LINE_OVERWRITE_SMALL) ) sys.exit(1) else: log.verbose("%s added to archive %s.%s\n" % (file, ArgumentOptions.zip_upgrade_file, LINE_OVERWRITE_SMALL) ) os.unlink(os.path.join(download_path, file) ) log.success("\r%s done.%s\n" % (PackageName, LINE_OVERWRITE_FULL) ) else: #log.err("Couldn't find %s\n" % (PackageName) ) errlist.append(PackageName) else: raise FetchDataKeyError | f9cf927078f9b55d9b348831720ac6187f897284 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12499/f9cf927078f9b55d9b348831720ac6187f897284/pypt_core.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2293,
16,
766,
16,
1326,
33,
4720,
67,
3645,
67,
1916,
4672,
9163,
967,
1516,
628,
326,
590,
7530,
16,
1207,
2182,
598,
1326,
9334,
1378,
326,
1686,
7563,
598,
326,
4884,
180... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2293,
16,
766,
16,
1326,
33,
4720,
67,
3645,
67,
1916,
4672,
9163,
967,
1516,
628,
326,
590,
7530,
16,
1207,
2182,
598,
1326,
9334,
1378,
326,
1686,
7563,
598,
326,
4884,
180... |
'now': datetime.datetime.now().isoformat(' '), | 'now': datetime.datetime.now().isoformat(' ')[0:-7] + '+0000', | def write_infos(self, modules): import release self.buffer.write("# Translation of %(project)s.\n" \ "# This file contains the translation of the following modules:\n" \ "%(modules)s" \ "#\n" \ "msgid \"\"\n" \ "msgstr \"\"\n" \ '''"Project-Id-Version: %(project)s %(version)s\\n"\n''' \ '''"Report-Msgid-Bugs-To: %(bugmail)s\\n"\n''' \ '''"POT-Creation-Date: %(now)s\\n"\n''' \ '''"PO-Revision-Date: %(now)s\\n"\n''' \ '''"Last-Translator: <>\\n"\n''' \ '''"Language-Team: \\n"\n''' \ '''"MIME-Version: 1.0\\n"\n''' \ '''"Content-Type: text/plain; charset=UTF-8\\n"\n''' \ '''"Content-Transfer-Encoding: \\n"\n''' \ '''"Plural-Forms: \\n"\n''' \ "\n" | c3cea6e6c2e847862ef84de55d56dd5fa5610e3b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12853/c3cea6e6c2e847862ef84de55d56dd5fa5610e3b/translate.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
67,
18227,
12,
2890,
16,
4381,
4672,
1930,
3992,
365,
18,
4106,
18,
2626,
2932,
7,
17427,
434,
8975,
4406,
13,
87,
8403,
82,
6,
521,
6619,
1220,
585,
1914,
326,
4794,
434,
326,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
18227,
12,
2890,
16,
4381,
4672,
1930,
3992,
365,
18,
4106,
18,
2626,
2932,
7,
17427,
434,
8975,
4406,
13,
87,
8403,
82,
6,
521,
6619,
1220,
585,
1914,
326,
4794,
434,
326,
... |
@param address: any address in the breakpoint range | @param ea: any address in the breakpoint range | def SetBptCnd(ea, cnd): """ Set breakpoint condition @param address: any address in the breakpoint range @param cnd: breakpoint condition @return: success """ bpt = idaapi.bpt_t() if not idaapi.get_bpt(ea, bpt): return False bpt.condition = cnd return idaapi.update_bpt(bpt) | e44bdcd4de27699ae0ecbd6c9dc2f42ebbbc110e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3410/e44bdcd4de27699ae0ecbd6c9dc2f42ebbbc110e/idc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1000,
38,
337,
39,
4880,
12,
24852,
16,
276,
4880,
4672,
3536,
1000,
18820,
2269,
225,
632,
891,
24164,
30,
1281,
1758,
316,
326,
18820,
1048,
632,
891,
276,
4880,
30,
18820,
2269,
225,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1000,
38,
337,
39,
4880,
12,
24852,
16,
276,
4880,
4672,
3536,
1000,
18820,
2269,
225,
632,
891,
24164,
30,
1281,
1758,
316,
326,
18820,
1048,
632,
891,
276,
4880,
30,
18820,
2269,
225,
... |
:returns: :class:`celery.result.AsyncResult`. | :returns :class:`celery.result.AsyncResult`: | def delay_task(task_name, *args, **kwargs): """Delay a task for execution by the ``celery`` daemon. :param task_name: the name of a task registered in the task registry. :param \*args: positional arguments to pass on to the task. :param \*\*kwargs: keyword arguments to pass on to the task. :raises celery.exceptions.NotRegistered: exception if no such task has been registered in the task registry. :returns: :class:`celery.result.AsyncResult`. Example >>> r = delay_task("update_record", name="George Costanza", age=32) >>> r.ready() True >>> r.result "Record was updated" """ return apply_async(tasks[task_name], args, kwargs) | d789a8f203274d33dba847c85f5b19a934ff74df /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2024/d789a8f203274d33dba847c85f5b19a934ff74df/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4624,
67,
4146,
12,
4146,
67,
529,
16,
380,
1968,
16,
2826,
4333,
4672,
3536,
6763,
279,
1562,
364,
4588,
635,
326,
12176,
2183,
627,
10335,
8131,
18,
225,
294,
891,
1562,
67,
529,
30,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4624,
67,
4146,
12,
4146,
67,
529,
16,
380,
1968,
16,
2826,
4333,
4672,
3536,
6763,
279,
1562,
364,
4588,
635,
326,
12176,
2183,
627,
10335,
8131,
18,
225,
294,
891,
1562,
67,
529,
30,... |
return _('Factors of %d') % ( self.level_multiple[self.curlevel-1] ) def setLevel(self, n): self.curlevel = n | return _('Factors of %d') % ( self.level_multiple[self.cur_sublevel-1] ) def setLevel(self, level, sublevel): self.curlevel = level self.cur_sublevel = sublevel | def getTitle(self): return _('Factors of %d') % ( self.level_multiple[self.curlevel-1] ) | af34e64d38be11ba68a4418286816d4e15a20114 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11306/af34e64d38be11ba68a4418286816d4e15a20114/gnumch.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10786,
12,
2890,
4672,
327,
389,
2668,
23535,
434,
738,
72,
6134,
738,
261,
365,
18,
2815,
67,
9622,
63,
2890,
18,
1397,
2815,
17,
21,
65,
262,
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,
0,
0,
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,
10786,
12,
2890,
4672,
327,
389,
2668,
23535,
434,
738,
72,
6134,
738,
261,
365,
18,
2815,
67,
9622,
63,
2890,
18,
1397,
2815,
17,
21,
65,
262,
2,
-100,
-100,
-100,
-100,
-100,
-100,
... |
'onclick="toggle(\'%s\'); return false;">-</a>\\2' % | 'onclick="return toggle(\'%s\');">-</a>\\2' % | def mark_def(self, s, name): replacement = ('<a name="%s"></a><div id="%s-def">\\1' '<a class="py-toggle" href="#" id="%s-toggle" ' 'onclick="toggle(\'%s\'); return false;">-</a>\\2' % (name, name, name, name)) return re.sub('(.*) (<span class="py-line">.*)\Z', replacement, s) | cd4d6e5fbca5f698866ebe3598f5c2ca592983e0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11420/cd4d6e5fbca5f698866ebe3598f5c2ca592983e0/html_colorize.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2267,
67,
536,
12,
2890,
16,
272,
16,
508,
4672,
6060,
273,
7707,
32,
69,
508,
11613,
87,
13762,
69,
4438,
2892,
612,
11613,
87,
17,
536,
6441,
1695,
21,
11,
2368,
69,
667,
1546,
207... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2267,
67,
536,
12,
2890,
16,
272,
16,
508,
4672,
6060,
273,
7707,
32,
69,
508,
11613,
87,
13762,
69,
4438,
2892,
612,
11613,
87,
17,
536,
6441,
1695,
21,
11,
2368,
69,
667,
1546,
207... |
sender, conn = sender | def _pongHandler(sender, id=node.id, host=node.host, port=node.port, table=self.table): sender, conn = sender if id != 20 * ' ' and id != sender['id'].data: # whoah, got response from different peer than we were expecting pass else: sender['host'] = host sender['port'] = port n = Node().initWithDict(sender) table.insertNode(n) return | 30d0bd614dd718bb2c3fd331b3c1fd56786a02aa /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/665/30d0bd614dd718bb2c3fd331b3c1fd56786a02aa/khashmir.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
500,
75,
1503,
12,
15330,
16,
612,
33,
2159,
18,
350,
16,
1479,
33,
2159,
18,
2564,
16,
1756,
33,
2159,
18,
655,
16,
1014,
33,
2890,
18,
2121,
4672,
309,
612,
480,
4200,
380,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
500,
75,
1503,
12,
15330,
16,
612,
33,
2159,
18,
350,
16,
1479,
33,
2159,
18,
2564,
16,
1756,
33,
2159,
18,
655,
16,
1014,
33,
2890,
18,
2121,
4672,
309,
612,
480,
4200,
380,
... | |
ttfont = self.setupFont(font, fontsize * scale_bias) | ttfont = self.setupFont(font, fontsize) | def truetypeText(self, xy, string, **kwargs): scale_bias = 4 fill = kwargs.get('fill') font = kwargs.get('font') fontsize = kwargs.get('fontsize', 11) | b648335863326a7794f99ca7f1c81399a501eb5e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/81/b648335863326a7794f99ca7f1c81399a501eb5e/DiagramDraw.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
433,
89,
5872,
1528,
12,
2890,
16,
7668,
16,
533,
16,
2826,
4333,
4672,
3159,
67,
13931,
273,
1059,
3636,
273,
1205,
18,
588,
2668,
5935,
6134,
3512,
273,
1205,
18,
588,
2668,
5776,
61... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
433,
89,
5872,
1528,
12,
2890,
16,
7668,
16,
533,
16,
2826,
4333,
4672,
3159,
67,
13931,
273,
1059,
3636,
273,
1205,
18,
588,
2668,
5935,
6134,
3512,
273,
1205,
18,
588,
2668,
5776,
61... |
msg = 'No Candidate Sites in Mask' | msg = 'No Candidate Sites in Mask' | def checkJob(self,job): """This method controls the checking of the job. """ self.log.verbose('Job %s will be processed' % (job)) #First check whether the job has an input data requirement result = self.jobDB.getInputData(job) if not result['OK']: self.log.warn('Failed to get input data from JobDB for %s' % (job)) self.log.error(result['Message']) | 6a41e53ca0e8385ad60a7fc3b43a5923a12510f3 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12864/6a41e53ca0e8385ad60a7fc3b43a5923a12510f3/JobSchedulingAgent.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
2278,
12,
2890,
16,
4688,
4672,
3536,
2503,
707,
11022,
326,
6728,
434,
326,
1719,
18,
3536,
365,
18,
1330,
18,
11369,
2668,
2278,
738,
87,
903,
506,
5204,
11,
738,
261,
4688,
371... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2278,
12,
2890,
16,
4688,
4672,
3536,
2503,
707,
11022,
326,
6728,
434,
326,
1719,
18,
3536,
365,
18,
1330,
18,
11369,
2668,
2278,
738,
87,
903,
506,
5204,
11,
738,
261,
4688,
371... |
self.roomsmodel.append([room, users, users]) | self.roomsmodel.append([room, users, 0]) | def SetRoomList(self, msg): if self.autojoin: self.autojoin = 0 if self.joinedrooms.keys(): list = self.joinedrooms.keys() else: list = self.frame.np.config.sections["server"]["autojoin"] | bd22d9a79d709d993463602575ff87e47daaa60e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8738/bd22d9a79d709d993463602575ff87e47daaa60e/chatrooms.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1000,
13646,
682,
12,
2890,
16,
1234,
4672,
225,
309,
365,
18,
6079,
5701,
30,
365,
18,
6079,
5701,
273,
374,
309,
365,
18,
5701,
329,
13924,
87,
18,
2452,
13332,
666,
273,
365,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1000,
13646,
682,
12,
2890,
16,
1234,
4672,
225,
309,
365,
18,
6079,
5701,
30,
365,
18,
6079,
5701,
273,
374,
309,
365,
18,
5701,
329,
13924,
87,
18,
2452,
13332,
666,
273,
365,
18,
... |
Individual.__getattr__ = ind_getInfo2 | Individual.__getattr__ = Individual.info | def ind_getInfo3(self, field): if field == 'this': return self.__dict__['this'] else: return self.info(field) | 11ebaaa64ca7a29581921643e7054787bddf7835 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/401/11ebaaa64ca7a29581921643e7054787bddf7835/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1547,
67,
588,
966,
23,
12,
2890,
16,
652,
4672,
309,
652,
422,
296,
2211,
4278,
327,
365,
16186,
1576,
972,
3292,
2211,
3546,
469,
30,
327,
365,
18,
1376,
12,
1518,
13,
225,
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,
1547,
67,
588,
966,
23,
12,
2890,
16,
652,
4672,
309,
652,
422,
296,
2211,
4278,
327,
365,
16186,
1576,
972,
3292,
2211,
3546,
469,
30,
327,
365,
18,
1376,
12,
1518,
13,
225,
2,
-100... |
value = theDuration.strftime (self.durationFormat) | if theDuration is not None: value = self.formattedDuration (theDuration, '') else: value = 'hh:mm' | def loadAttributeIntoWidget(self, item, widget): """" Update the widget display based on the value in the attribute. """ try: theDuration = item.duration except AttributeError: value = '?' else: value = theDuration.strftime (self.durationFormat) widget.SetValue (value) | 3f9d10450d98d9f910b82730307316ba3d4cf615 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/3f9d10450d98d9f910b82730307316ba3d4cf615/Detail.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1262,
1499,
5952,
4609,
12,
2890,
16,
761,
16,
3604,
4672,
3536,
6,
2315,
326,
3604,
2562,
2511,
603,
326,
460,
316,
326,
1566,
18,
3536,
775,
30,
326,
5326,
273,
761,
18,
8760,
1335,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1262,
1499,
5952,
4609,
12,
2890,
16,
761,
16,
3604,
4672,
3536,
6,
2315,
326,
3604,
2562,
2511,
603,
326,
460,
316,
326,
1566,
18,
3536,
775,
30,
326,
5326,
273,
761,
18,
8760,
1335,
... |
if t._checked == True: return if not t: raise BoardCoordOutOfRangeExcepton, "Tile coordinate (%d,%d) out of bounds"%(x,y) | if not t: return if t._checked: return | def reveal(self,player,x,y, list=[]): if list==[]: first=True else: first=False t = self.get_tile(x,y) if t._checked == True: return if not t: raise BoardCoordOutOfRangeExcepton, "Tile coordinate (%d,%d) out of bounds"%(x,y) t._checked = True if t.uncovered == 0: t.uncovered = player list.append(t) if t.adjacency==0: for a in self.get_adjacent_tiles(x, y): self.reveal(player,*a.pos,list=list) if first: for l in self.tiles: for t in l: t._checked = False | 76b80045ff8fc568b5b27e58828689805a12f2d7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14104/76b80045ff8fc568b5b27e58828689805a12f2d7/game.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
283,
24293,
12,
2890,
16,
14872,
16,
92,
16,
93,
16,
666,
33,
8526,
4672,
309,
666,
631,
8526,
30,
1122,
33,
5510,
469,
30,
1122,
33,
8381,
268,
273,
365,
18,
588,
67,
15368,
12,
9... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
283,
24293,
12,
2890,
16,
14872,
16,
92,
16,
93,
16,
666,
33,
8526,
4672,
309,
666,
631,
8526,
30,
1122,
33,
5510,
469,
30,
1122,
33,
8381,
268,
273,
365,
18,
588,
67,
15368,
12,
9... |
iter = model.get_iter_root() while iter: | __iter = model.get_iter_root() while __iter: | def get_selected_operations(self): """Return a list of the IDs of the selected operations in the tree view""" r = [] model = self.tree_store.get_model() iter = model.get_iter_root() while iter: #print "debug: get_selected_operations: iter id = '%s', value='%s'" % (model[iter][2], model[iter][1]) if True == model[iter][1]: r.append(model[iter][2]) iter = model.iter_next(iter) return r | 9d492cae068d04dccea7b824cceed2984729452a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7853/9d492cae068d04dccea7b824cceed2984729452a/GUI.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
8109,
67,
17542,
12,
2890,
4672,
3536,
990,
279,
666,
434,
326,
7115,
434,
326,
3170,
5295,
316,
326,
2151,
1476,
8395,
436,
273,
5378,
938,
273,
365,
18,
3413,
67,
2233,
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,
336,
67,
8109,
67,
17542,
12,
2890,
4672,
3536,
990,
279,
666,
434,
326,
7115,
434,
326,
3170,
5295,
316,
326,
2151,
1476,
8395,
436,
273,
5378,
938,
273,
365,
18,
3413,
67,
2233,
18,
... |
96889010407L 96889010407 | 96889010407 | def cardinality(self): r""" Returns the number of words of length n from alphabet. | dcebd36667c37501e3ed85d2815782c98473a1c8 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9417/dcebd36667c37501e3ed85d2815782c98473a1c8/words.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
14379,
12,
2890,
4672,
436,
8395,
2860,
326,
1300,
434,
4511,
434,
769,
290,
628,
10877,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
14379,
12,
2890,
4672,
436,
8395,
2860,
326,
1300,
434,
4511,
434,
769,
290,
628,
10877,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
def archive_db(): print "STATUS: archiving old database" archive_db = "psql template1 postgres -qc " \ " 'ALTER DATABASE %s RENAME TO %s;';" \ " createdb -U postgres %s > /dev/null; " % \ (database, archived_database, database) | def archive_db(database, archived_database): print "Status: archiving old database" archive_db = " dropdb -U postgres %s; > /dev/null 2>&1" \ " psql template1 postgres -qc " \ " 'ALTER DATABASE %s RENAME TO %s;';" \ " createdb -U postgres %s > /dev/null; " % \ (archived_database, database, archived_database, database) | def archive_db(): print "STATUS: archiving old database" archive_db = "psql template1 postgres -qc " \ " 'ALTER DATABASE %s RENAME TO %s;';" \ " createdb -U postgres %s > /dev/null; " % \ (database, archived_database, database) exit_status = os.system(archive_db) if exit_status: print "ERROR: unable to archive database. Upgrade failed" sys.exit(1) print "STATUS: %s has been archived. now named %s" % (database, archived_database) | af98851618b632afb0a950644c796b7c633ace40 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7598/af98851618b632afb0a950644c796b7c633ace40/upgrade-db.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5052,
67,
1966,
12,
6231,
16,
23276,
67,
6231,
4672,
225,
1172,
315,
1482,
30,
6637,
9288,
1592,
2063,
6,
5052,
67,
1966,
273,
315,
3640,
1966,
300,
57,
1603,
14107,
738,
87,
31,
405,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5052,
67,
1966,
12,
6231,
16,
23276,
67,
6231,
4672,
225,
1172,
315,
1482,
30,
6637,
9288,
1592,
2063,
6,
5052,
67,
1966,
273,
315,
3640,
1966,
300,
57,
1603,
14107,
738,
87,
31,
405,
... |
return cmp(map(int, a.split('.')), map(int, b.split('.'))) | aa = a.split('.') bb = b.split('.') for index in range(min(len(aa), len(bb))): result = cmp(int(aa[index]), int(bb[index])) if result != 0: return result return 0 | def CompareVersions(a, b): if (a.find('.') < 0) or (b.find('.') < 0): return -1 return cmp(map(int, a.split('.')), map(int, b.split('.'))) | 1331841a3d5d1a886c5e30836daef2c3d23ecce2 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/14747/1331841a3d5d1a886c5e30836daef2c3d23ecce2/util.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11051,
5940,
12,
69,
16,
324,
4672,
309,
261,
69,
18,
4720,
2668,
1093,
13,
411,
374,
13,
578,
261,
70,
18,
4720,
2668,
1093,
13,
411,
374,
4672,
327,
300,
21,
540,
12391,
273,
279,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11051,
5940,
12,
69,
16,
324,
4672,
309,
261,
69,
18,
4720,
2668,
1093,
13,
411,
374,
13,
578,
261,
70,
18,
4720,
2668,
1093,
13,
411,
374,
4672,
327,
300,
21,
540,
12391,
273,
279,
... |
conn.settimeout(5) | conn.settimeout(10) | def _recv(self): data = '' conn = socket.socket(socket.AF_INET, socket.SOCK_STREAM) conn.connect(self.__addr) conn.settimeout(5) conn.send('++read' + self.__term) while data.find(self.__term) < 0: data += conn.recv(1024) conn.close() return data[:data.find(self.__term)] | c9fb5cb45e19096da2005d67889aea2b141a7f0e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/14654/c9fb5cb45e19096da2005d67889aea2b141a7f0e/synth_agent.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
18334,
12,
2890,
4672,
501,
273,
875,
1487,
273,
2987,
18,
7814,
12,
7814,
18,
6799,
67,
18819,
16,
2987,
18,
3584,
3507,
67,
13693,
13,
1487,
18,
3612,
12,
2890,
16186,
4793,
13,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
18334,
12,
2890,
4672,
501,
273,
875,
1487,
273,
2987,
18,
7814,
12,
7814,
18,
6799,
67,
18819,
16,
2987,
18,
3584,
3507,
67,
13693,
13,
1487,
18,
3612,
12,
2890,
16186,
4793,
13,... |
lex = shlex.shlex(StringIO(s)) | lex = shlex.shlex(io.StringIO(s)) | def oldSplit(self, s): ret = [] lex = shlex.shlex(StringIO(s)) tok = lex.get_token() while tok: ret.append(tok) tok = lex.get_token() return ret | 826980d93aa913cc6fc217b1207fb7d5fd98aad3 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8125/826980d93aa913cc6fc217b1207fb7d5fd98aad3/test_shlex.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1592,
5521,
12,
2890,
16,
272,
4672,
325,
273,
5378,
5275,
273,
27180,
18,
674,
4149,
12,
1594,
18,
780,
4294,
12,
87,
3719,
946,
273,
5275,
18,
588,
67,
2316,
1435,
1323,
946,
30,
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,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1592,
5521,
12,
2890,
16,
272,
4672,
325,
273,
5378,
5275,
273,
27180,
18,
674,
4149,
12,
1594,
18,
780,
4294,
12,
87,
3719,
946,
273,
5275,
18,
588,
67,
2316,
1435,
1323,
946,
30,
3... |
self.__p = int(parent.residue_characteristic()) | self.__p = integer.Integer(parent.residue_characteristic()) | def __init__(self, parent, x, big_oh=infinity, ordp=None, construct=False): r""" INPUT: parent -- a p-adic field. x -- anything that can be coerced to a p-adic number. big_oh -- is such that, e.g. 3^(-1) + 1 + 2 * 3 + (3^2) has big_oh equal to 2. """ field_element.FieldElement.__init__(self, parent) if construct: self.__parent = parent (self.__p, self.__unit, self.__ordp, self.__prec) = x return | 2524dc6cf63145fc327980456b747492a7ca7be7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9417/2524dc6cf63145fc327980456b747492a7ca7be7/padic.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
982,
16,
619,
16,
5446,
67,
16699,
33,
267,
7850,
16,
4642,
84,
33,
7036,
16,
4872,
33,
8381,
4672,
436,
8395,
12943,
30,
982,
1493,
279,
293,
17,
2033... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
619,
16,
5446,
67,
16699,
33,
267,
7850,
16,
4642,
84,
33,
7036,
16,
4872,
33,
8381,
4672,
436,
8395,
12943,
30,
982,
1493,
279,
293,
17,
2033... |
def retry_command(cmd, retries, timeout, sleeptime): | def retry_command(cmd, retries, timeout, sleeptime, stdout_regexp=None, stderr_regexp=None, fail_if_match=False): | def retry_command(cmd, retries, timeout, sleeptime): # Which iteration we're on i = 0 # Current return code rc = False while True: i += 1 rc = run_with_timeout(cmd, timeout) if rc: break if retries > 0 and i >= retries: log.info("Number of retries exceeded maximum (%i), giving up.", retries) break if sleeptime: log.info("Sleeping for %i.", sleeptime) time.sleep(sleeptime) return rc | c43e77b901baa29ea327693e697bb61fd7622486 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6206/c43e77b901baa29ea327693e697bb61fd7622486/retry.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3300,
67,
3076,
12,
4172,
16,
9453,
16,
2021,
16,
272,
11182,
10650,
16,
3909,
67,
17745,
33,
7036,
16,
4514,
67,
17745,
33,
7036,
16,
2321,
67,
430,
67,
1916,
33,
8381,
4672,
468,
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,
3300,
67,
3076,
12,
4172,
16,
9453,
16,
2021,
16,
272,
11182,
10650,
16,
3909,
67,
17745,
33,
7036,
16,
4514,
67,
17745,
33,
7036,
16,
2321,
67,
430,
67,
1916,
33,
8381,
4672,
468,
2... |
return t + data[9] - time.timezone | return t - data[9] - time.timezone | def mktime_tz(data): """Turn a 10-tuple as returned by parsedate_tz() into a UTC timestamp. Minor glitch: this first interprets the first 8 elements as a local time and then compensates for the timezone difference; this may yield a slight error around daylight savings time switch dates. Not enough to worry about for common use. """ t = time.mktime(data[:8] + (0,)) return t + data[9] - time.timezone | 9aa8e8179b2162a324553202bc68d6aa11f490ac /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/9aa8e8179b2162a324553202bc68d6aa11f490ac/rfc822.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
21977,
67,
12994,
12,
892,
4672,
3536,
15858,
279,
1728,
17,
8052,
487,
2106,
635,
1109,
712,
67,
12994,
1435,
1368,
279,
9951,
2858,
18,
225,
29007,
5118,
1437,
30,
333,
1122,
10634,
87... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
21977,
67,
12994,
12,
892,
4672,
3536,
15858,
279,
1728,
17,
8052,
487,
2106,
635,
1109,
712,
67,
12994,
1435,
1368,
279,
9951,
2858,
18,
225,
29007,
5118,
1437,
30,
333,
1122,
10634,
87... |
self.colorkey(1) | if self["key_green"].getBoolean(): self.colorkey(1) | def keyGreen(self): self.colorkey(1) | 71dcc2c21cb3488861444e6f4e82a25b77df70ed /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6652/71dcc2c21cb3488861444e6f4e82a25b77df70ed/AudioSelection.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
498,
21453,
12,
2890,
4672,
365,
18,
1293,
778,
402,
12,
21,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
498,
21453,
12,
2890,
4672,
365,
18,
1293,
778,
402,
12,
21,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
sage: latex(r(2)) | sage: latex(r(2)) | def _latex_(self): r""" Return LaTeX representation of this R object. | 42a77e19371576e2f0fa4a64916832f43f940a8c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/42a77e19371576e2f0fa4a64916832f43f940a8c/r.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
26264,
67,
12,
2890,
4672,
436,
8395,
2000,
21072,
21575,
60,
4335,
434,
333,
534,
733,
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,
... | [
1,
1,
1,
1,
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,
389,
26264,
67,
12,
2890,
4672,
436,
8395,
2000,
21072,
21575,
60,
4335,
434,
333,
534,
733,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
if krawly == m.j or m.i == 0: | if krawlj == m.j or m.i == 0: | def movebaddy(enemy): "Tactical movement for the bad guys." next = coord(); look = coord() irun = False # This should probably be just (game.quadrant in game.state.kcmdr) + (game.state.kscmdr==game.quadrant) if game.skill >= SKILL_EXPERT: nbaddys = (((game.quadrant in game.state.kcmdr)*2 + (game.state.kscmdr==game.quadrant)*2+game.klhere*1.23+game.irhere*1.5)/2.0) else: nbaddys = (game.quadrant in game.state.kcmdr) + (game.state.kscmdr==game.quadrant) dist1 = enemy.kdist mdist = int(dist1 + 0.5); # Nearest integer distance # If SC, check with spy to see if should hi-tail it if enemy.type==IHS and \ (enemy.kpower <= 500.0 or (game.condition=="docked" and not damaged(DPHOTON))): irun = True motion = -QUADSIZE else: # decide whether to advance, retreat, or hold position forces = enemy.kpower+100.0*len(game.enemies)+400*(nbaddys-1) if not game.shldup: forces += 1000; # Good for enemy if shield is down! if not damaged(DPHASER) or not damaged(DPHOTON): if damaged(DPHASER): # phasers damaged forces += 300.0 else: forces -= 0.2*(game.energy - 2500.0) if damaged(DPHOTON): # photon torpedoes damaged forces += 300.0 else: forces -= 50.0*game.torps else: # phasers and photon tubes both out! forces += 1000.0 motion = 0 if forces <= 1000.0 and game.condition != "docked": # Typical situation motion = ((forces + randreal(200))/150.0) - 5.0 else: if forces > 1000.0: # Very strong -- move in for kill motion = (1.0 - randreal())**2 * dist1 + 1.0 if game.condition=="docked" and (game.options & OPTION_BASE): # protected by base -- back off ! motion -= game.skill*(2.0-randreal()**2) if idebug: proutn("=== MOTION = %d, FORCES = %1.2f, " % (motion, forces)) # don't move if no motion if motion==0: return # Limit motion according to skill if abs(motion) > game.skill: if motion < 0: motion = -game.skill else: motion = game.skill # calculate preferred number of steps if motion < 0: nsteps = -motion else: nsteps = motion if motion > 0 and nsteps > mdist: nsteps = mdist; # don't overshoot if nsteps > QUADSIZE: nsteps = QUADSIZE; # This shouldn't be necessary if nsteps < 1: nsteps = 1; # This shouldn't be necessary if idebug: proutn("NSTEPS = %d:" % nsteps) # Compute preferred values of delta X and Y m = game.sector - enemy.kloc if 2.0 * abs(m.i) < abs(m.j): m.i = 0 if 2.0 * abs(m.j) < abs(game.sector.i-enemy.kloc.i): m.j = 0 if m.i != 0: if m.i*motion < 0: m.i = -1 else: m.i = 1 if m.j != 0: if m.j*motion < 0: m.j = -1 else: m.j = 1 next = enemy.kloc # main move loop for ll in range(nsteps): if idebug: proutn(" %d" % (ll+1)) # Check if preferred position available look = next + m if m.i < 0: krawlx = 1 else: krawlx = -1 if m.j < 0: krawly = 1 else: krawly = -1 success = False attempts = 0; # Settle mysterious hang problem while attempts < 20 and not success: attempts += 1 if look.i < 0 or look.i >= QUADSIZE: if motion < 0 and tryexit(enemy, look, irun): return if krawlx == m.i or m.j == 0: break look.i = next.i + krawlx krawlx = -krawlx elif look.j < 0 or look.j >= QUADSIZE: if motion < 0 and tryexit(enemy, look, irun): return if krawly == m.j or m.i == 0: break look.j = next.j + krawly krawly = -krawly elif (game.options & OPTION_RAMMING) and game.quad[look.i][look.j] != IHDOT: # See if enemy should ram ship if game.quad[look.i][look.j] == game.ship and \ (enemy.type == IHC or enemy.type == IHS): collision(rammed=True, enemy=enemy) return if krawlx != m.i and m.j != 0: look.i = next.i + krawlx krawlx = -krawlx elif krawly != m.j and m.i != 0: look.j = next.j + krawly krawly = -krawly else: break; # we have failed else: success = True if success: next = look if idebug: proutn(`next`) else: break; # done early if idebug: skip(1) if enemy.move(next): if not damaged(DSRSENS) or game.condition == "docked": proutn(_("*** %s from Sector %s") % (cramen(enemy.type), enemy.kloc)) if enemy.kdist < dist1: proutn(_(" advances to ")) else: proutn(_(" retreats to ")) prout("Sector %s." % next) | 9166a6df132fa18c32881b2019e1fcc41716a3ab /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3176/9166a6df132fa18c32881b2019e1fcc41716a3ab/sst.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3635,
70,
31934,
12,
275,
351,
93,
4672,
315,
56,
621,
1706,
26017,
364,
326,
5570,
3058,
1900,
1199,
1024,
273,
2745,
5621,
2324,
273,
2745,
1435,
277,
2681,
273,
1083,
468,
1220,
1410,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3635,
70,
31934,
12,
275,
351,
93,
4672,
315,
56,
621,
1706,
26017,
364,
326,
5570,
3058,
1900,
1199,
1024,
273,
2745,
5621,
2324,
273,
2745,
1435,
277,
2681,
273,
1083,
468,
1220,
1410,... |
plugin_api.AddToolbarItem(self.tb_button) | plugin_api.add_toolbar_item(self.button) | def activate(self, plugin_api): self.menu_item = gtk.MenuItem("Start task in Hamster") self.menu_item.connect('activate', self.browser_cb, plugin_api) self.tb_button=gtk.ToolButton() self.tb_button.set_label("Start") self.tb_button.set_icon_name('hamster-applet') self.tb_button.set_tooltip_text("Start a new activity in Hamster Time Tracker based on the selected task") self.tb_button.connect('clicked', self.browser_cb, plugin_api) # add a menu item to the menu bar plugin_api.AddMenuItem(self.menu_item) # saves the separator's index to later remove it self.separator = plugin_api.AddToolbarItem(gtk.SeparatorToolItem()) # add a item (button) to the ToolBar plugin_api.AddToolbarItem(self.tb_button) | 7172602e6dde54005cdbf7139d595e8248bd20d0 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7036/7172602e6dde54005cdbf7139d595e8248bd20d0/hamster.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10235,
12,
2890,
16,
1909,
67,
2425,
4672,
365,
18,
5414,
67,
1726,
273,
22718,
18,
12958,
2932,
1685,
1562,
316,
670,
301,
8190,
7923,
365,
18,
5414,
67,
1726,
18,
3612,
2668,
10014,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10235,
12,
2890,
16,
1909,
67,
2425,
4672,
365,
18,
5414,
67,
1726,
273,
22718,
18,
12958,
2932,
1685,
1562,
316,
670,
301,
8190,
7923,
365,
18,
5414,
67,
1726,
18,
3612,
2668,
10014,
... |
if country.adminarea_set.filter(active=True).filter(Q(name=data.capitalize())|Q(abbrev=data.upper())).count() != 1: | if country.adminarea_set.filter(active=True).filter(Q(name=data)|Q(abbrev=data)|Q(name=data.capitalize())|Q(abbrev=data.upper())).count() != 1: | def clean_state(self): data = self.cleaned_data.get('state') if self._local_only: country = self._default_country else: country = self.fields['country'].clean(self.data['country']) if country.adminarea_set.filter(active=True).count() > 0: if not data or data == selection and not self._billing_data_optional: raise forms.ValidationError( self._local_only and _('This field is required.') \ or _('State is required for your country.')) if country.adminarea_set.filter(active=True).filter(Q(name=data.capitalize())|Q(abbrev=data.upper())).count() != 1: raise forms.ValidationError(_('Invalid state or province.')) return data | ee4e1486c68d9e1c6870b61b5e55c294fb67e2aa /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/13656/ee4e1486c68d9e1c6870b61b5e55c294fb67e2aa/forms.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2721,
67,
2019,
12,
2890,
4672,
501,
273,
365,
18,
6200,
329,
67,
892,
18,
588,
2668,
2019,
6134,
309,
365,
6315,
3729,
67,
3700,
30,
5251,
273,
365,
6315,
1886,
67,
9082,
469,
30,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2721,
67,
2019,
12,
2890,
4672,
501,
273,
365,
18,
6200,
329,
67,
892,
18,
588,
2668,
2019,
6134,
309,
365,
6315,
3729,
67,
3700,
30,
5251,
273,
365,
6315,
1886,
67,
9082,
469,
30,
5... |
{'summary': 'Yo é'}]} | { 'title': 'Yo é', 'summary': 'Yo é' }]} | def test_blog_entries(self, mock_feedparser_parse): mock_feedparser_parse.return_value = { 'entries': [ {'summary': 'Yo é'}]} entries = mysite.customs.feed._blog_entries() self.assertEqual(entries[0]['unicode_text'], u'Yo \xe9') | f50ea125e2e5610b3ed4d02dbf938f738eeffad7 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11976/f50ea125e2e5610b3ed4d02dbf938f738eeffad7/tests.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
11439,
67,
8219,
12,
2890,
16,
5416,
67,
7848,
4288,
67,
2670,
4672,
5416,
67,
7848,
4288,
67,
2670,
18,
2463,
67,
1132,
273,
288,
296,
8219,
4278,
306,
288,
296,
2649,
4278,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
11439,
67,
8219,
12,
2890,
16,
5416,
67,
7848,
4288,
67,
2670,
4672,
5416,
67,
7848,
4288,
67,
2670,
18,
2463,
67,
1132,
273,
288,
296,
8219,
4278,
306,
288,
296,
2649,
4278,... |
for x in ipath: cmd = cmd + ' -I"' + dotdots + x + '"' | for x in ipath: cmd = cmd + ' -I' + dotdots + x | def Interrogate(ipath=0, opts=0, outd=0, outc=0, src=0, module=0, library=0, files=0): if ((ipath==0)|(opts==0)|(outd==0)|(outc==0)|(src==0)|(module==0)|(library==0)|(files==0)): sys.exit("syntax error in Interrogate directive") ALLIN.append(outd) ipath = [PREFIX+"/tmp"] + ipath + [PREFIX+"/include"] outd = PREFIX+"/pandac/input/"+outd outc = PREFIX+"/tmp/"+outc paths = xpaths(src+"/",files,"") dep = CxxCalcDependenciesAll(paths, ipath) dotdots = "" for i in range(0,src.count("/")+1): dotdots = dotdots + "../" building = 0 for x in opts: if (x[:9]=="BUILDING_"): building = x[9:] if (older(outc, dep) or older(outd, dep)): if (COMPILER=="MSVC7"): cmd = '"' + dotdots + PREFIX+'/bin/interrogate.exe"' cmd = cmd + ' -DCPPPARSER -D__STDC__=1 -D__cplusplus -longlong __int64 -D_X86_ -DWIN32_VC -D_WIN32' cmd = cmd + ' -D"_declspec(param)=" -D_near -D_far -D__near -D__far -D__stdcall' if (OPTIMIZE==1): cmd = cmd + ' ' if (OPTIMIZE==2): cmd = cmd + ' ' if (OPTIMIZE==3): cmd = cmd + ' -DFORCE_INLINING' if (OPTIMIZE==4): cmd = cmd + ' -DFORCE_INLINING' cmd = cmd + ' -S"' + dotdots + PREFIX+'/include/parser-inc"' cmd = cmd + ' -I"' + dotdots + PREFIX+'/python/include"' if (COMPILER=="LINUXA"): cmd = '"' + dotdots + PREFIX + '/bin/interrogate"' cmd = cmd + ' -DCPPPARSER -D__STDC__=1 -D__cplusplus -D__i386__ -D__const=const' if (OPTIMIZE==1): cmd = cmd + ' ' if (OPTIMIZE==2): cmd = cmd + ' ' if (OPTIMIZE==3): cmd = cmd + ' ' if (OPTIMIZE==4): cmd = cmd + ' ' cmd = cmd + ' -S"' + dotdots + PREFIX+'/include/parser-inc" -S"/usr/include"' cmd = cmd + ' -I"' + dotdots + PREFIX+'/python/include"' cmd = cmd + ' -oc "' + dotdots + outc + '" -od "' + dotdots + outd + '"' cmd = cmd + ' -fnames -string -refcount -assert -python' for x in ipath: cmd = cmd + ' -I"' + dotdots + x + '"' if (building): cmd = cmd + " -DBUILDING_"+building if (opts.count("WITHINPANDA")): cmd = cmd + " -DWITHIN_PANDA" for pkg in PACKAGES: if (PkgSelected(opts,pkg)): cmd = cmd + ' -I"' + dotdots + THIRDPARTY + pkg.lower() + "/include" + '"' cmd = cmd + ' -module "' + module + '" -library "' + library + '"' if ((COMPILER=="MSVC7") and opts.count("DXSDK")): cmd = cmd + ' -I"' + DIRECTXSDK + '/include"' if ((COMPILER=="MSVC7") and opts.count("MAYA5")): cmd = cmd + ' -I"' + Maya5SDK + 'include"' if ((COMPILER=="MSVC7") and opts.count("MAYA6")): cmd = cmd + ' -I"' + Maya6SDK + 'include"' for x in files: cmd = cmd + ' ' + x oslocalcmd(src, cmd) updatefiledate(outd) updatefiledate(outc) | e743cb25c4127c99b6bf2de385cf618b18e32531 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7242/e743cb25c4127c99b6bf2de385cf618b18e32531/makepanda.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5294,
15283,
12,
625,
421,
33,
20,
16,
1500,
33,
20,
16,
596,
72,
33,
20,
16,
596,
71,
33,
20,
16,
1705,
33,
20,
16,
1605,
33,
20,
16,
5313,
33,
20,
16,
1390,
33,
20,
4672,
309... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5294,
15283,
12,
625,
421,
33,
20,
16,
1500,
33,
20,
16,
596,
72,
33,
20,
16,
596,
71,
33,
20,
16,
1705,
33,
20,
16,
1605,
33,
20,
16,
5313,
33,
20,
16,
1390,
33,
20,
4672,
309... |
self._write(self.write_term_index, directory, 'term-index.html', indices) | self._write(self.write_link_index, directory, 'term-index.html', indices, 'Term Definition Index', 'term-index.html', 'term') | def write(self, directory=None): """ Write the documentation to the given directory. | 5c410b5b6e25df3bdbc6da266f7773518165cb02 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/5c410b5b6e25df3bdbc6da266f7773518165cb02/html.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
12,
2890,
16,
1867,
33,
7036,
4672,
3536,
2598,
326,
7323,
358,
326,
864,
1867,
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,
1045,
12,
2890,
16,
1867,
33,
7036,
4672,
3536,
2598,
326,
7323,
358,
326,
864,
1867,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
self.model["card"] = zdc.ObjectView(card) | self.model["card"] = [zdc.ObjectView(card)] | def act_confirm(self): import zebra, zdc #@TODO: make a .fromDict or .consult for zdc.RecordObjects # for now, we'll assume this is okay, since the classes have # already validated everything in here: bill = zikebase.Contact(); bill._data = self.billData ship = zikebase.Contact(); ship._data = self.shipData card = zikeshop.Card(); card._data = self.cardData | 8f9da0ecdf1f4ffe43c7c8552ad5e88ade81637e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8821/8f9da0ecdf1f4ffe43c7c8552ad5e88ade81637e/checkout.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1328,
67,
10927,
12,
2890,
4672,
1930,
26637,
15397,
16,
998,
7201,
468,
36,
6241,
30,
1221,
279,
263,
2080,
5014,
578,
263,
8559,
406,
364,
998,
7201,
18,
2115,
4710,
468,
364,
2037,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1328,
67,
10927,
12,
2890,
4672,
1930,
26637,
15397,
16,
998,
7201,
468,
36,
6241,
30,
1221,
279,
263,
2080,
5014,
578,
263,
8559,
406,
364,
998,
7201,
18,
2115,
4710,
468,
364,
2037,
... |
class DocstringTestCase(unittest.TestCase): | class DocstringTestCase(SecureTestCase): | def getModuleObjects(folder, rootName, typ): "Get a list of all function objects defined *somewhere* in a package." folders = [folder] + subFoldersOfFolder(folder) objects = [] for f in folders: sys.path.insert(0, f) os.chdir(f) pattern = os.path.join('*.py') prefix = f[string.find(f, rootName):] prefix = string.replace(prefix, os.sep, '.') modNames = glob.glob(pattern) modNames = filter(lambda m:string.find(m, '__init__.py') == -1, modNames) # Make module names fully qualified. for i in range(len(modNames)): modNames[i] = prefix + '.' + modNames[i][:string.find(modNames[i], '.')] for mName in modNames: module = __import__(mName) # Get the 'real' (leaf) module # (__import__ loads only the top-level one). if string.find(mName, '.') != -1: for part in string.split(mName, '.')[1:]: module = getattr(module, part) # Find the objects in the module's content. modContentNames = dir(module) # Handle modules. if typ == types.ModuleType: if string.find(module.__name__, 'reportlab') > -1: objects.append((mName, module)) continue for n in modContentNames: obj = eval(mName + '.' + n) # Handle functions and classes. if typ in (types.FunctionType, types.ClassType): if type(obj) == typ: objects.append((mName, obj)) # Handle methods. elif typ == types.MethodType: if type(obj) == types.ClassType: for m in dir(obj): a = getattr(obj, m) if type(a) == typ: cName = obj.__name__ objects.append(("%s.%s" % (mName, cName), a)) del sys.path[0] return objects | b5a2e28469e8eb9f8edf3d66ca5ecf2c5f7f3905 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3878/b5a2e28469e8eb9f8edf3d66ca5ecf2c5f7f3905/test_docstrings.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11251,
4710,
12,
5609,
16,
1365,
461,
16,
3815,
4672,
315,
967,
279,
666,
434,
777,
445,
2184,
2553,
380,
87,
362,
359,
14852,
14,
316,
279,
2181,
1199,
225,
9907,
273,
306,
5609,
65,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11251,
4710,
12,
5609,
16,
1365,
461,
16,
3815,
4672,
315,
967,
279,
666,
434,
777,
445,
2184,
2553,
380,
87,
362,
359,
14852,
14,
316,
279,
2181,
1199,
225,
9907,
273,
306,
5609,
65,
... |
FakeProxyHandler.digest_auth_handler.set_qop("auth") | self.digest_auth_handler.set_qop("auth") | def test_proxy_with_bad_password_raises_httperror(self): self._digest_auth_handler.add_password(self.REALM, self.URL, self.USER, self.PASSWD+"bad") FakeProxyHandler.digest_auth_handler.set_qop("auth") self.assertRaises(urllib2.HTTPError, self.opener.open, self.URL) | f03c42f0ab4b4fc0705e2717a89af1254820fed3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8546/f03c42f0ab4b4fc0705e2717a89af1254820fed3/test_urllib2_localnet.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
5656,
67,
1918,
67,
8759,
67,
3664,
67,
354,
6141,
67,
2505,
1636,
12,
2890,
4672,
365,
6315,
10171,
67,
1944,
67,
4176,
18,
1289,
67,
3664,
12,
2890,
18,
31052,
49,
16,
36... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
5656,
67,
1918,
67,
8759,
67,
3664,
67,
354,
6141,
67,
2505,
1636,
12,
2890,
4672,
365,
6315,
10171,
67,
1944,
67,
4176,
18,
1289,
67,
3664,
12,
2890,
18,
31052,
49,
16,
36... |
def test_chainHandling(self): """PDBModel chain handling and writing test""" | def test_chainBreaks(self): """PDBModel chain break handling and writing test""" | def test_chainHandling(self): """PDBModel chain handling and writing test""" self.m4 = B.PDBModel( T.testRoot()+'/com/1BGS_original.pdb') self.assertEqual( self.m4.lenChains(), 9 ) self.assertEqual( self.m4.lenChains( breaks=1 ), 138 ) self.m4.writePdb( self.fout_pdb, ter=2 ) | d1c3d5f9c43c1af7d5e068db8407753d7aed3a40 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/482/d1c3d5f9c43c1af7d5e068db8407753d7aed3a40/PDBModel.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
5639,
26806,
12,
2890,
4672,
3536,
52,
2290,
1488,
2687,
898,
5057,
471,
7410,
1842,
8395,
365,
18,
81,
24,
273,
605,
18,
52,
2290,
1488,
12,
399,
18,
3813,
2375,
1435,
6797,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5639,
26806,
12,
2890,
4672,
3536,
52,
2290,
1488,
2687,
898,
5057,
471,
7410,
1842,
8395,
365,
18,
81,
24,
273,
605,
18,
52,
2290,
1488,
12,
399,
18,
3813,
2375,
1435,
6797,... |
if self._sampleNum < 60*60: | if self._memSampleNum < 60*60: | def _nextMemSample(self): curUsage = self._getValue() self._usage.append(curUsage) maxUsage = self._maxUsage[-1] if curUsage>maxUsage: maxUsage = curUsage lastMaxChangeTime = time.time() self._textNode1.text = ("Last increase in maximum: " +time.strftime("%H:%M:%S", time.localtime(lastMaxChangeTime))) self._maxUsage.append(maxUsage) self._sampleNum += 1 if self._sampleNum % 60 == 0: lastMinuteAverage = sum(self._usage[-60:])/60 self._minutesUsage.append(lastMinuteAverage) self._minutesMaxUsage.append(maxUsage) | 5db631b9081e9af0ba5615613d6fbe26fed5b363 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7300/5db631b9081e9af0ba5615613d6fbe26fed5b363/AVGAppStarter.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
4285,
3545,
8504,
12,
2890,
4672,
662,
5357,
273,
365,
6315,
24805,
1435,
365,
6315,
9167,
18,
6923,
12,
1397,
5357,
13,
943,
5357,
273,
365,
6315,
1896,
5357,
18919,
21,
65,
309,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
4285,
3545,
8504,
12,
2890,
4672,
662,
5357,
273,
365,
6315,
24805,
1435,
365,
6315,
9167,
18,
6923,
12,
1397,
5357,
13,
943,
5357,
273,
365,
6315,
1896,
5357,
18919,
21,
65,
309,
... |
if po.arch != installed_pkg.arch and (isMultiLibArch(po.arch) or isMultiLibArch(installed_pkg.arch)): | if (po.arch != installed_pkg.arch and (rpmUtils.arch.isMultiLibArch(po.arch) or rpmUtils.arch.isMultiLibArch(installed_pkg.arch))): | def installLocal(self, pkg, po=None, updateonly=False): """ handles installs/updates of rpms provided on the filesystem in a local dir (ie: not from a repo) | ec1fb3b9c8487a021e86a34d3a3b0d580a5ac49e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5445/ec1fb3b9c8487a021e86a34d3a3b0d580a5ac49e/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3799,
2042,
12,
2890,
16,
3475,
16,
8275,
33,
7036,
16,
1089,
3700,
33,
8381,
4672,
3536,
7372,
31011,
19,
14703,
434,
8715,
959,
2112,
603,
326,
6496,
316,
279,
1191,
1577,
261,
1385,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3799,
2042,
12,
2890,
16,
3475,
16,
8275,
33,
7036,
16,
1089,
3700,
33,
8381,
4672,
3536,
7372,
31011,
19,
14703,
434,
8715,
959,
2112,
603,
326,
6496,
316,
279,
1191,
1577,
261,
1385,
... |
debug(" domain %s is in user block-list", cookie.domain) | _debug(" domain %s is in user block-list", cookie.domain) | def set_ok_domain(self, cookie, request): if self.is_blocked(cookie.domain): debug(" domain %s is in user block-list", cookie.domain) return False if self.is_not_allowed(cookie.domain): debug(" domain %s is not in user allow-list", cookie.domain) return False if cookie.domain_specified: req_host, erhn = eff_request_host(request) domain = cookie.domain if self.strict_domain and (domain.count(".") >= 2): # XXX This should probably be compared with the Konqueror # (kcookiejar.cpp) and Mozilla implementations, but it's a # losing battle. i = domain.rfind(".") j = domain.rfind(".", 0, i) if j == 0: # domain like .foo.bar tld = domain[i+1:] sld = domain[j+1:i] if sld.lower() in ("co", "ac", "com", "edu", "org", "net", "gov", "mil", "int", "aero", "biz", "cat", "coop", "info", "jobs", "mobi", "museum", "name", "pro", "travel", "eu") and len(tld) == 2: # domain like .co.uk debug(" country-code second level domain %s", domain) return False if domain.startswith("."): undotted_domain = domain[1:] else: undotted_domain = domain embedded_dots = (undotted_domain.find(".") >= 0) if not embedded_dots and domain != ".local": debug(" non-local domain %s contains no embedded dot", domain) return False if cookie.version == 0: if (not erhn.endswith(domain) and (not erhn.startswith(".") and not ("."+erhn).endswith(domain))): debug(" effective request-host %s (even with added " "initial dot) does not end end with %s", erhn, domain) return False if (cookie.version > 0 or (self.strict_ns_domain & self.DomainRFC2965Match)): if not domain_match(erhn, domain): debug(" effective request-host %s does not domain-match " "%s", erhn, domain) return False if (cookie.version > 0 or (self.strict_ns_domain & self.DomainStrictNoDots)): host_prefix = req_host[:-len(domain)] if (host_prefix.find(".") >= 0 and not IPV4_RE.search(req_host)): debug(" host prefix %s for domain %s contains a dot", host_prefix, domain) return False return True | feb0a3bdbccc7b45bc8b960aa4c3434838b52d05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/feb0a3bdbccc7b45bc8b960aa4c3434838b52d05/cookielib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
67,
601,
67,
4308,
12,
2890,
16,
3878,
16,
590,
4672,
309,
365,
18,
291,
67,
23156,
12,
8417,
18,
4308,
4672,
389,
4148,
2932,
282,
2461,
738,
87,
353,
316,
729,
1203,
17,
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,
444,
67,
601,
67,
4308,
12,
2890,
16,
3878,
16,
590,
4672,
309,
365,
18,
291,
67,
23156,
12,
8417,
18,
4308,
4672,
389,
4148,
2932,
282,
2461,
738,
87,
353,
316,
729,
1203,
17,
1098,... |
print "str: %s" % self.description | if self.verbose: print "str: %s" % self.description | def unserializeExtra(self,data): print "found %d extra bytes." % len(data) | 5ec5c46b0b6b12f6dd38c8d54dc0815bac382b0e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8136/5ec5c46b0b6b12f6dd38c8d54dc0815bac382b0e/pyemf.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10954,
7800,
12,
2890,
16,
892,
4672,
1172,
315,
7015,
738,
72,
2870,
1731,
1199,
738,
562,
12,
892,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10954,
7800,
12,
2890,
16,
892,
4672,
1172,
315,
7015,
738,
72,
2870,
1731,
1199,
738,
562,
12,
892,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
musicianship.play_instrument( char, instrument, result ) | skills.musicianship.play_instrument( char, instrument, result ) | def response( char, args, target ): if not char.socket.hastag( 'peacemaking_instrument' ): return 0 # you can only target chars if not target.char: return 1 instrument = wolfpack.finditem( char.socket.gettag( 'peacemaking_instrument' ) ) if not instrument: return 0 if skills.skilltable[ PEACEMAKING ][ skills.UNHIDE ] and char.hidden: char.removefromview() char.hidden = False char.update() char.socket.deltag( 'peacemaking_instrument' ) char.socket.settag( 'skill_delay', int( wolfpack.time.currenttime() + PEACE_DELAY ) ) # if target him/her self : standard (regional) mode # anyone including npcs can re-target and start fight peace_range = skills.musicianship.bard_range( char ) if char == target.char: result = char.checkskill( MUSICIANSHIP, 0, 1000 ) musicianship.play_instrument( char, instrument, result ) # fail to play well if not result: char.socket.clilocmessage( 500612, "", 0x3b2, 3 ) return 1 result = char.checkskill( PEACEMAKING, 0, 1000 ) # fail on peacemaking if not result: char.socket.clilocmessage( 500613, "", 0x3b2, 3 ) return 1 char.socket.clilocmessage( 500615, "", 0x3b2, 3 ) creatures = wolfpack.chars( char.pos.x, char.pos.y, char.pos.map, peace_range ) for creature in creatures: if char.canreach( creature, peace_range ): # stop combat # player chars if creature.socket: creature.socket.clilocmessage( 500616, "", 0x3b2, 3 ) # target on an npc - effect will go some duration else: if char.canreach( target.char, peace_range ): char.socket.clilocmessage( 500618, "", 0x3b2, 3 ) return 1 if not target.char.npc: return 1 # bard difficulty - later, we should get these from the xml defs. loskill = 0 hiskill = 1000 result = char.checkskill( MUSICIANSHIP, loskill, hiskill ) musicianship.play_instrument( char, instrument, result ) if not result: char.socket.clilocmessage( 500612, "", 0x3b2, 3 ) return 1 result = char.checkskill( PEACEMAKING, loskill, hiskill ) if not result: char.socket.clilocmessage( 500613, "", 0x3b2, 3 ) return 1 # FIXME : duration ( 5 sec ~ 65 sec ) duration = 5000 + char.skill[ PEACEMAKING ] * 60 # stop combat # if npc, do not start combat for the duration while not attacked creature.settag( 'peacemaking', 1 ) creature.addtimer( duration, release, [] ) return 1 | ad2fb5c1af41304c615892963957d7cff3e3439e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/ad2fb5c1af41304c615892963957d7cff3e3439e/peacemaking.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
766,
12,
1149,
16,
833,
16,
1018,
262,
30,
309,
486,
1149,
18,
7814,
18,
76,
689,
346,
12,
296,
347,
623,
19718,
67,
22818,
11,
262,
30,
327,
374,
468,
1846,
848,
1338,
1018,
5230,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
766,
12,
1149,
16,
833,
16,
1018,
262,
30,
309,
486,
1149,
18,
7814,
18,
76,
689,
346,
12,
296,
347,
623,
19718,
67,
22818,
11,
262,
30,
327,
374,
468,
1846,
848,
1338,
1018,
5230,
... |
pbuffer(True,define_buffer) | pbufferStr(define_buffer + "\n") | def parseSource(sfile, vars_dict): i = 0; #line counter in_v_comment = False; #Flag for lines inside a verilog comment block in_p_block = False; #Flag for lines inside a preprocessor block #Run through the file character by character using a DFA state = DEFAULT # State variable err_code = NOERR # Code variable for syntax errors pre_seg_begin_line = 0 # Line number of a preprocessor section start v_com_begin_line = 0 # Line number of a Verilog block comment start pre_expr_begin_line = 0 # Line number of a preprocessor expression start line_count = 0 # Current line number char_count = 0 # Current character number (in line) pre_seg_buffer = "" # Character buffer for preprocessor segments pre_expr_buffer = "" # Character buffer for preprocessor expressions define_buffer = "" # Character buffer for DEFINE statements sfile.seek(0) char = sfile.read(1) while char and state != ERROR: # DEFAULT if state == DEFAULT: if char == "/": state = DEF_FOUND_FSLASH pbuffer(False,char) elif char == "%": state = PRE_COM elif char == "`": state = DEFINE pbuffer(False,char) elif char == "<": state = DEF_FOUND_LCARET else: pbuffer(False,char) # DEF_FOUND_FSLASH elif state == DEF_FOUND_FSLASH: if char == "*": state = V_COM v_com_begin_line = line_count pbuffer(False,char) elif char == "/": state = V_COM_LINE pbuffer(False,char) else: state = DEFAULT pbuffer(False,char) # V_COM_LINE elif state == V_COM_LINE: if char == "\n": state = DEFAULT pbuffer(False,char) # V_COM elif state == V_COM: if char == "*": state = V_COM_FOUND_AST pbuffer(False,char) # V_COM_FOUND_AST elif state == V_COM_FOUND_AST: if char == "/": state = DEFAULT elif not char == "*": state = V_COM pbuffer(False,char) # DEFINE elif state == DEFINE: if char == "\n": state = DEFAULT parseDefine(define_buffer,vars_dict) pbuffer(True,define_buffer) define_buffer = "" else: define_buffer = define_buffer + char # DEF_FOUND_LCARET elif state == DEF_FOUND_LCARET: if char == "?": state = PRE_SEG pre_seg_begin_line = line_count else: state = DEFAULT pbuffer(False, "<" + char) # have to put a < because prev state didn't write one # PRE_COM elif state == PRE_COM: if char == "\n": state = DEFAULT # PRE_SEG elif state == PRE_SEG: if char == "{": state = PRE_EXPR pre_expr_begin_line = line_count elif char == "<": state = PRE_FOUND_LCARET elif char == "?": state = PRE_FOUND_QUEST else: pre_seg_buffer = pre_seg_buffer + char # PRE_EXPR elif state == PRE_EXPR: if char == "}": state = PRE_SEG if pre_expr_buffer != "": parsePreExpr(pre_expr_buffer,pre_seg_buffer,vars_dict) pre_expr_buffer = "" elif char == "\n": state = ERROR err_code = NEWLINE_IN_PRE_EXPR else: pre_expr_buffer = pre_expr_buffer + char # PRE_FOUND_QUEST elif state == PRE_FOUND_QUEST: if char == ">": state = DEFAULT parsePreSeg(pre_seg_buffer, vars_dict) pre_seg_buffer = "" else: state = PRE_SEG pre_seg_buffer = pre_seg_buffer + "?" + char # PRE_FOUND_LCARET elif state == PRE_FOUND_LCARET: if char == "?": state = ERROR err_code = DUP_PRE_BEGIN else: state = PRE_SEG pre_seg_buffer = pre_seg_buffer + "<" + char # Update line count and char count if state != ERROR: char_count = char_count + 1 if char == "\n": line_count = line_count + 1 char_count = 0 # Read the next character char = sfile.read(1) #end while #Check to make sure EOF did not occur in an invalid state if state == V_COM: err_code = UNCLOSED_V_COM elif state == PRE_EXPR: err_code = UNCLOSED_PRE_EXPR elif state == PRE_FOUND_LCARET: err_code = UNCLOSED_PRE_EXPR elif state == PRE_FOUND_QUEST: err_code = UNCLOSED_PRE_SEG #If an error occured, report it if err_code != NOERR: if err_code == UNCLOSED_V_COM: print "Error: Unclosed Verilog block comment (beginning at line " + `v_com_begin_line` + ")\n" sys.exit(1) elif err_code == NEWLINE_IN_PRE_EXPR: print "Error: Newline occurred in preprocessor expression: at line " + `line_count` +"\n" sys.exit(1) elif err_code == UNCLOSED_PRE_EXPR: print "Error: Unclosed preprocessor expression (beginning at line " + `pre_expr_begin_line` + ")\n" sys.exit(1) elif err_code == DUP_PRE_BEGIN: print "Error: Nested preprocessor tags: at line " + `line_count` + "\n" sys.exit(1) elif err_code == UNCLOSED_PRE_SEG: print "Error: Unclosed preprocessor tags (beginning at line " + `pre_seg_begin_line` + ")\n" sys.exit(1) | bc7caa6020ce9c0d3efd9e0dbbc8e121c4373dda /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3352/bc7caa6020ce9c0d3efd9e0dbbc8e121c4373dda/preprocessor.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
1830,
12,
87,
768,
16,
4153,
67,
1576,
4672,
225,
277,
273,
374,
31,
5375,
468,
1369,
3895,
316,
67,
90,
67,
3469,
273,
1083,
31,
282,
468,
4678,
364,
2362,
4832,
279,
1924,
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,
1109,
1830,
12,
87,
768,
16,
4153,
67,
1576,
4672,
225,
277,
273,
374,
31,
5375,
468,
1369,
3895,
316,
67,
90,
67,
3469,
273,
1083,
31,
282,
468,
4678,
364,
2362,
4832,
279,
1924,
21... |
if op1.sign == -1: result.sign = -1 | if op1.sign == 1: result.sign = 1 | def __add__(self, other, context=None): """Returns self + other. | ce77754a7a9856b4ea3aec633c8021212c8039a7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/ce77754a7a9856b4ea3aec633c8021212c8039a7/decimal.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1289,
972,
12,
2890,
16,
1308,
16,
819,
33,
7036,
4672,
3536,
1356,
365,
397,
1308,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1289,
972,
12,
2890,
16,
1308,
16,
819,
33,
7036,
4672,
3536,
1356,
365,
397,
1308,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
description= "Create a "+name, category = "PGL Object Generator", nodemodule = "objectgenerator", nodeclass = name+'Node', **kargs) | description= "Create a "+name, category = "PGL Object Generator", nodemodule = "objectgenerator", nodeclass = name+'Node', **kargs) | def generate_factory(name, **kargs): return Factory( name= name, description= "Create a "+name, category = "PGL Object Generator", nodemodule = "objectgenerator", nodeclass = name+'Node', **kargs) | 2a6da979b8a59c13d5a15249a32414ef9a1f6adb /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/799/2a6da979b8a59c13d5a15249a32414ef9a1f6adb/__wralea__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2103,
67,
6848,
12,
529,
16,
2826,
79,
1968,
4672,
327,
7822,
12,
508,
33,
508,
16,
2477,
33,
315,
1684,
279,
13773,
529,
16,
3150,
273,
315,
52,
11261,
1033,
10159,
3113,
756,
2978,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2103,
67,
6848,
12,
529,
16,
2826,
79,
1968,
4672,
327,
7822,
12,
508,
33,
508,
16,
2477,
33,
315,
1684,
279,
13773,
529,
16,
3150,
273,
315,
52,
11261,
1033,
10159,
3113,
756,
2978,
... |
except AttributeError: fp_size = None | def do_grep(self, fp): """ Do a full grep. | 73b5557e048342a519cecab38c11b31b4cc2dac6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10903/73b5557e048342a519cecab38c11b31b4cc2dac6/grin.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
67,
11556,
84,
12,
2890,
16,
4253,
4672,
3536,
2256,
279,
1983,
23366,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
67,
11556,
84,
12,
2890,
16,
4253,
4672,
3536,
2256,
279,
1983,
23366,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... | |
info = document.toxml(encoding='utf-16') obj.info = info | obj.info = document | def create_elem(): elem = document.createElement(self.tag_name) parent = document.getElementsByTagName(self.parent)[0] parent.appendChild(elem) return elem | 5cbe331c0791d5ce5030fc48987fd5072a9a9db7 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9125/5cbe331c0791d5ce5030fc48987fd5072a9a9db7/meta.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
67,
10037,
13332,
3659,
273,
1668,
18,
2640,
1046,
12,
2890,
18,
2692,
67,
529,
13,
982,
273,
1668,
18,
588,
3471,
10401,
12,
2890,
18,
2938,
25146,
20,
65,
982,
18,
6923,
1763,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
67,
10037,
13332,
3659,
273,
1668,
18,
2640,
1046,
12,
2890,
18,
2692,
67,
529,
13,
982,
273,
1668,
18,
588,
3471,
10401,
12,
2890,
18,
2938,
25146,
20,
65,
982,
18,
6923,
1763,
... |
self.indiType = self.data and self.methods.get(self.data.domain[self.selectedAttr].name, (0, ""))[0] or 0 | if self.data: attr = self.data.domain[self.selectedAttr] self.indiType, value = self.methods.get(attr.name, False) or (-1, "") if self.indiType >= 0: if attr.varType == orange.VarTypes.Discrete: self.indiValueCtrl.setCurrentItem(value) else: self.indiValueCtrl.setText(value) | def setIndiType(self): self.indiType = self.data and self.methods.get(self.data.domain[self.selectedAttr].name, (0, ""))[0] or 0 | 5a20988f1aa69f170b9d5db9340463971696fdfe /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6366/5a20988f1aa69f170b9d5db9340463971696fdfe/OWImpute.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
382,
3211,
559,
12,
2890,
4672,
309,
365,
18,
892,
30,
1604,
273,
365,
18,
892,
18,
4308,
63,
2890,
18,
8109,
3843,
65,
365,
18,
728,
77,
559,
16,
460,
273,
365,
18,
5163,
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,
444,
382,
3211,
559,
12,
2890,
4672,
309,
365,
18,
892,
30,
1604,
273,
365,
18,
892,
18,
4308,
63,
2890,
18,
8109,
3843,
65,
365,
18,
728,
77,
559,
16,
460,
273,
365,
18,
5163,
18,... |
else | else: | def __init__(data = None) if data == None: quickfix.StringField.__init__(self, 568) else quickfix.StringField.__init__(self, 568, 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,
13,
309,
501,
422,
599,
30,
9549,
904,
18,
780,
974,
16186,
2738,
972,
12,
2890,
16,
1381,
9470,
13,
469,
30,
9549,
904,
18,
780,
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,
1,
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,
13,
309,
501,
422,
599,
30,
9549,
904,
18,
780,
974,
16186,
2738,
972,
12,
2890,
16,
1381,
9470,
13,
469,
30,
9549,
904,
18,
780,
974,
16186,
2738... |
info = None | def createFields(self): # This stupid shit gets the LSB, not the MSB... self.info("Note info: 0x%02X" % self.stream.readBits(self.absolute_address, 8, LITTLE_ENDIAN)) yield RealBit(self, "is_extended") info = None if self["is_extended"].value: info = NoteInfo(self, "info") yield info if info["has_note"].value: yield Enum(UInt8(self, "note"), NOTE_NAME) else: yield Enum(Bits(self, "note", 7), NOTE_NAME) | c99931bfecc0c1d1ea8ca2bff60774c9102dc066 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9327/c99931bfecc0c1d1ea8ca2bff60774c9102dc066/xm.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
2314,
12,
2890,
4672,
468,
1220,
384,
416,
350,
699,
305,
5571,
326,
511,
14541,
16,
486,
326,
9238,
38,
2777,
365,
18,
1376,
2932,
8067,
1123,
30,
374,
92,
9,
3103,
60,
6,
738,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2314,
12,
2890,
4672,
468,
1220,
384,
416,
350,
699,
305,
5571,
326,
511,
14541,
16,
486,
326,
9238,
38,
2777,
365,
18,
1376,
2932,
8067,
1123,
30,
374,
92,
9,
3103,
60,
6,
738,... | |
str='No MIB info for %s (distant parent %s)' % (oid, mibNode) | str='No MIB info for %s (closest parent %s)' % (oid, mibNode.name) | def oidToInstanceName(mibView, oid): oid, label, suffix = mibView.getNodeNameByOid(tuple(oid)) modName, symName, __suffix = mibView.getNodeLocation(oid) mibNode, = mibView.mibBuilder.importSymbols( modName, symName ) if hasattr(mibNode, 'getColumnInitializer'): # table column __modName, __symName, __s = mibView.getNodeLocation(oid[:-1]) rowNode, = mibView.mibBuilder.importSymbols(__modName, __symName) return (symName, modName), rowNode.getIndicesFromInstId(suffix) elif not suffix or suffix == (0,): # scalar/identifier return (symName, modName), suffix else: raise NoSuchInstanceError( str='No MIB info for %s (distant parent %s)' % (oid, mibNode) ) | d1a4bbb6950ea6d7df3f385cc62df9731e497a70 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/587/d1a4bbb6950ea6d7df3f385cc62df9731e497a70/mibvar.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7764,
774,
22520,
12,
81,
495,
1767,
16,
7764,
4672,
7764,
16,
1433,
16,
3758,
273,
312,
495,
1767,
18,
588,
18948,
858,
19105,
12,
8052,
12,
839,
3719,
681,
461,
16,
5382,
461,
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,
7764,
774,
22520,
12,
81,
495,
1767,
16,
7764,
4672,
7764,
16,
1433,
16,
3758,
273,
312,
495,
1767,
18,
588,
18948,
858,
19105,
12,
8052,
12,
839,
3719,
681,
461,
16,
5382,
461,
16,
... |
self.add_row(path[0]) | self.add_row(os.path.join(defs.HOME_THEME_DIR, path[0])) | def extract_file(self, fname): tar = tarfile.open(fname, "r:gz") filelist = tar.getmembers() theme_found = False thumb_found = False for f in filelist: path = os.path.split(f.name) if path[1] == self.AWN_CONFIG: theme_found = True if path[1] == self.AWN_THUMB: thumb_found = True if theme_found and thumb_found: if hasattr(tar, 'extractall'): tar.extractall(defs.HOME_THEME_DIR) #new in python 2.5 else: [tar.extract(f, defs.HOME_THEME_DIR) for f in tar.getnames()] tar.close() self.add_row(path[0]) message = "Theme Successfully Added" message2 = "" success = gtk.MessageDialog(parent=None, flags=0, type=gtk.MESSAGE_WARNING, buttons=gtk.BUTTONS_OK, message_format=message) icon_path = os.path.join(defs.HOME_THEME_DIR, path[0], self.AWN_CUSTOM_ICONS) if os.path.exists(icon_path): message2 = "Custom icons included can be found at:\n " + os.path.join(defs.HOME_THEME_DIR, path[0], self.AWN_CUSTOM_ICONS) success.format_secondary_text(message2) success.run() success.destroy() return True else: return False | fbbad571f1ee3b50f3b4afce97428d348e7cce32 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8416/fbbad571f1ee3b50f3b4afce97428d348e7cce32/awnTheme.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2608,
67,
768,
12,
2890,
16,
5299,
4672,
8232,
273,
25857,
18,
3190,
12,
12749,
16,
315,
86,
30,
9764,
7923,
26204,
273,
8232,
18,
588,
7640,
1435,
5006,
67,
7015,
273,
1083,
11156,
67... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2608,
67,
768,
12,
2890,
16,
5299,
4672,
8232,
273,
25857,
18,
3190,
12,
12749,
16,
315,
86,
30,
9764,
7923,
26204,
273,
8232,
18,
588,
7640,
1435,
5006,
67,
7015,
273,
1083,
11156,
67... |
nic = InstanceCatalog.InstanceCatalog() | nic = InstanceCatalog() | def makeCatalogFromQuery(self, result): if os.environ.has_key("CATALOG_DESCRIPTION_PATH"): catalogDescriptionPath = os.environ["CATALOG_DESCRIPTION_PATH"] else: raise Exception("Environment variable CATALOG_DESCRIPTION_PATH not set to location of the catalog description files") nic = InstanceCatalog.InstanceCatalog() nic.catalogDescription = CatalogDescription.CatalogDescription( catalogDescriptionPath+"requiredMetadata.dat", catalogDescriptionPath+"requiredSchemaFields.dat", catalogDescriptionPath+"requiredDerivedFields.dat", catalogDescriptionPath+"outputFormat.dat") nic.metadata.catalogDescription = nic.catalogDescription nic.catalogType = self.filetypes data = {} for k in self.cdm.objectTypes['POINT'].keys(): data[k] = [] for s in result: for k in self.cdm.objectTypes['POINT'].keys(): | 11976c942f9ebf4a51cb090a8c8fcb77b4828536 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/91/11976c942f9ebf4a51cb090a8c8fcb77b4828536/queryDB.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1221,
9769,
1265,
1138,
12,
2890,
16,
563,
4672,
309,
1140,
18,
28684,
18,
5332,
67,
856,
2932,
14130,
18683,
67,
15911,
67,
4211,
6,
4672,
6222,
3291,
743,
273,
1140,
18,
28684,
9614,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1221,
9769,
1265,
1138,
12,
2890,
16,
563,
4672,
309,
1140,
18,
28684,
18,
5332,
67,
856,
2932,
14130,
18683,
67,
15911,
67,
4211,
6,
4672,
6222,
3291,
743,
273,
1140,
18,
28684,
9614,
... |
assert allclose(struve(v, z), value, atol=err), (v, z) | assert_tol_equal(struve(v, z), value, rtol=0, atol=err), (v, z) | def test_vs_series(self): """Check Struve function versus its power series""" for v in [-20, -10, -7.99, -3.4, -1, 0, 1, 3.4, 12.49, 16]: for z in [1, 10, 19, 21, 30]: value, err = self._series(v, z) assert allclose(struve(v, z), value, atol=err), (v, z) | 9bfb2390def95a96da5a56f3a02a6b962e87c293 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12971/9bfb2390def95a96da5a56f3a02a6b962e87c293/test_basic.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
6904,
67,
10222,
12,
2890,
4672,
3536,
1564,
3978,
89,
537,
445,
14690,
407,
2097,
7212,
4166,
8395,
364,
331,
316,
23059,
3462,
16,
300,
2163,
16,
300,
27,
18,
2733,
16,
300... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
6904,
67,
10222,
12,
2890,
4672,
3536,
1564,
3978,
89,
537,
445,
14690,
407,
2097,
7212,
4166,
8395,
364,
331,
316,
23059,
3462,
16,
300,
2163,
16,
300,
27,
18,
2733,
16,
300... |
self.app = app | self.rootapp = rootapp self.apps = apps | def __init__(self, app): trace("ISAPISimpleHandler.__init__") self.app = app | 742beb9f59a980a41b87dc069bb870643ade7d03 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4963/742beb9f59a980a41b87dc069bb870643ade7d03/isapi_wsgi.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
595,
4672,
2606,
2932,
5127,
2557,
5784,
1503,
16186,
2738,
972,
7923,
365,
18,
2910,
273,
595,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
595,
4672,
2606,
2932,
5127,
2557,
5784,
1503,
16186,
2738,
972,
7923,
365,
18,
2910,
273,
595,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
src_piece = self.locs[src] | src_piece = self[src] | def move(self, sym, src, dst, options): """a (parsed) move is: (piece, src, dst, options), where dict options may contain the following keys: promote (None, R, Q, B, N), capture (True, False), hybrid, i.e. 'going to hybrid' (True, False), check (None, check, mate). all keys except 'promote' may be ignored""" src_piece = self.locs[src] if src_piece == E: raise IllegalMove, ("source position %s is empty" % str(src)) (src_sym, src_col) = src_piece if src_col != self.turn: raise IllegalMove, "attempt to move enemy's piece" movingPiece = pieceObjects[sym] NotImplemented | 3776bd3cb848913021c849d965c97d087e6dc8c1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5164/3776bd3cb848913021c849d965c97d087e6dc8c1/board.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3635,
12,
2890,
16,
5382,
16,
1705,
16,
3046,
16,
702,
4672,
3536,
69,
261,
10817,
13,
3635,
353,
30,
261,
30100,
16,
1705,
16,
3046,
16,
702,
3631,
1625,
2065,
702,
2026,
912,
326,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3635,
12,
2890,
16,
5382,
16,
1705,
16,
3046,
16,
702,
4672,
3536,
69,
261,
10817,
13,
3635,
353,
30,
261,
30100,
16,
1705,
16,
3046,
16,
702,
3631,
1625,
2065,
702,
2026,
912,
326,
... |
def haselement(self,mycat,mypkg,ename): "boolean -- is the specified cat/pkg listed in this package's elements file?" mycmp=mycat+"/"+mypkg for x in self.getelements(ename): if x == mycmp: return 1 return 0 def hasprovide(self,mycat,mypkg): return self.haselement(mycat,mypkg,"PROVIDE") def getprovides(self): "get a list of virtual packages provided by this package." return self.getelements("PROVIDE") def setprovides(self,mylist=None,oldprovides=None): "set virtual packages provided by this package, and also update virtual links" if not mylist: mylist=self.getelements("PROVIDE") if not oldprovides: oldprovides=self.getelements("PROVIDE") for x in mylist: if x not in oldprovides: mypsplit=string.split(x,"/") mylink=dblink(mypsplit[0],mypsplit[1]) myvirts=plink.getvirtuals() if self.cat+"/"+self.pkg in myvirts: myvirts.remove(self.cat+"/"+self.pkg) mylink.setvirtuals(myvirts) for x in oldprovides: if x not in mylist: mypsplit=string.split(x,"/") mylink=dblink(mypsplit[0],mypsplit[1]) myvirts=plink.getvirtuals() if not self.cat+"/"+self.pkg in myvirts: myvirts.append(self.cat+"/"+self.pkg) mylink.setvirtuals(myvirts) return self.setelements(mylist,"PROVIDE") def isprovide(self): return os.path.exists(self.dbdir+"/PROVIDE") def hasvirtual(self,mycat,mypkg): return self.haselement(mycat,mypkg,"VIRTUAL") def getvirtuals(self): "get a list of packages providing this virtual package." return self.getelements("VIRTUAL") def setvirtuals(self,mylist): "set a list of packages providing this virtual package." return self.setelements(mylist,"VIRTUAL") def isvirtual(self): "is this a virtual package? boolean." return os.path.exists(self.dbdir+"/VIRTUAL") | def isregular(self): "Is this a regular package (does it have a CATEGORY file? A dblink can be virtual *and* regular)" return os.path.exists(self.dbdir+"/CATEGORY") | def haselement(self,mycat,mypkg,ename): "boolean -- is the specified cat/pkg listed in this package's elements file?" mycmp=mycat+"/"+mypkg for x in self.getelements(ename): if x == mycmp: return 1 return 0 | e2aa1d10ca9e8b9fc4c5050206871cfb8f47522d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2807/e2aa1d10ca9e8b9fc4c5050206871cfb8f47522d/portage.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
711,
2956,
12,
2890,
16,
4811,
2574,
16,
81,
879,
14931,
16,
1069,
4672,
315,
6494,
1493,
353,
326,
1269,
6573,
19,
10657,
12889,
316,
333,
2181,
1807,
2186,
585,
7225,
3399,
9625,
33,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
711,
2956,
12,
2890,
16,
4811,
2574,
16,
81,
879,
14931,
16,
1069,
4672,
315,
6494,
1493,
353,
326,
1269,
6573,
19,
10657,
12889,
316,
333,
2181,
1807,
2186,
585,
7225,
3399,
9625,
33,
... |
self.out.write("void %s::SendContents(Bridge* b)\n" % classname) | self.out.write("void %s::SendContents(Bridge* b) const\n" % classname) | def sendcontents_im(self, obj, statics): classname = classize(obj.attr['id'].value) self.out.write("void %s::SendContents(Bridge* b)\n" % classname) self.out.write("{\n") for attr in statics: self.out.write(' Send%s(b);\n' % classize(attr.name)) parent = obj.attr['parents'].value[0] self.out.write(" %s::SendContents(b);\n" % classize(parent)) self.out.write("}\n\n") | 9735567828cceff0576f75d0dc23ff6b13b4f601 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12931/9735567828cceff0576f75d0dc23ff6b13b4f601/gen_cc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1366,
3980,
67,
381,
12,
2890,
16,
1081,
16,
760,
87,
4672,
7479,
273,
667,
554,
12,
2603,
18,
1747,
3292,
350,
29489,
1132,
13,
365,
18,
659,
18,
2626,
2932,
6459,
738,
87,
2866,
38... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1366,
3980,
67,
381,
12,
2890,
16,
1081,
16,
760,
87,
4672,
7479,
273,
667,
554,
12,
2603,
18,
1747,
3292,
350,
29489,
1132,
13,
365,
18,
659,
18,
2626,
2932,
6459,
738,
87,
2866,
38... |
resp, subs = s.xhdr('subject', first + '-' + last) | resp, subs = s.xhdr('subject', '{0}-{1}'.format(first, last)) | def quit(self): """Process a QUIT command and close the socket. Returns: - resp: server response if successful""" | eb96c4e975fd746fcc8b85f47c3592472b8d6b15 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3187/eb96c4e975fd746fcc8b85f47c3592472b8d6b15/nntplib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9706,
12,
2890,
4672,
3536,
2227,
279,
10110,
1285,
1296,
471,
1746,
326,
2987,
18,
225,
2860,
30,
300,
1718,
30,
1438,
766,
309,
6873,
8395,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
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,
9706,
12,
2890,
4672,
3536,
2227,
279,
10110,
1285,
1296,
471,
1746,
326,
2987,
18,
225,
2860,
30,
300,
1718,
30,
1438,
766,
309,
6873,
8395,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
self._write_namespace(namespace, shlib) | self._write_namespace(namespace, shlibs) | def _write_repository(self, namespace, shlib, includes=set()): attrs = [ ('version', '1.0'), ('xmlns', 'http://www.gtk.org/introspection/core/1.0'), ('xmlns:c', 'http://www.gtk.org/introspection/c/1.0'), ('xmlns:glib', 'http://www.gtk.org/introspection/glib/1.0'), ] with self.tagcontext('repository', attrs): for include in includes: self._write_include(include) self._write_namespace(namespace, shlib) | 9045f204f1f911867c2dae885904f13f83b9ddab /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2770/9045f204f1f911867c2dae885904f13f83b9ddab/girwriter.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2626,
67,
9071,
12,
2890,
16,
1981,
16,
699,
2941,
16,
6104,
33,
542,
1435,
4672,
3422,
273,
306,
7707,
1589,
2187,
296,
21,
18,
20,
19899,
7707,
16741,
2187,
296,
2505,
2207,
559... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2626,
67,
9071,
12,
2890,
16,
1981,
16,
699,
2941,
16,
6104,
33,
542,
1435,
4672,
3422,
273,
306,
7707,
1589,
2187,
296,
21,
18,
20,
19899,
7707,
16741,
2187,
296,
2505,
2207,
559... |
def __add__(self, s): """ Returns the sum of two streams. EXAMPLES:: sage: from sage.combinat.species.stream import Stream sage: s = Stream(ZZ) sage: ss = s + s sage: [ss[i] for i in range(10)] [0, 2, -2, 4, -4, 6, -6, 8, -8, 10] """ if not isinstance(s, Stream_class): raise TypeError, "s must be a Stream" return Stream((a+b for (a,b) in itertools.izip(self,s))) def __mul__(self, s): """ Returns the product of two streams. EXAMPLES: We can use a stream to represent the polynomial 1+x and use it to compute the coefficients of (1+x)2. :: sage: from sage.combinat.species.stream import Stream sage: s = Stream([1,1,0]) sage: ss = s*s sage: [ss[i] for i in range(5)] [1, 2, 1, 0, 0] """ if not isinstance(s, Stream_class): raise TypeError, "s must be a Stream" return Stream((self._times_naive(s, n) for n in _integers_from(0))) def _times_naive(self, s, n): """ Returns the nth entry in the product of self and s via the naive multiplication algorithm. Note that this requires that all entries for self and s in range(n+1) be computed. EXAMPLES:: sage: from sage.combinat.species.stream import Stream sage: s = Stream([1,1,0]) sage: s._times_naive(s, 0) 1 sage: s._times_naive(s, 1) 2 sage: s._times_naive(s, 2) 1 """ t = 0 for k in range(n+1): sk = self[k] if sk == 0: continue t += sk * s[n-k] return t | def __add__(self, s): """ Returns the sum of two streams. | ebfc2d1b32c8b0153b7c6921bae684dee1185427 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9417/ebfc2d1b32c8b0153b7c6921bae684dee1185427/stream.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1289,
972,
12,
2890,
16,
272,
4672,
3536,
2860,
326,
2142,
434,
2795,
8205,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1289,
972,
12,
2890,
16,
272,
4672,
3536,
2860,
326,
2142,
434,
2795,
8205,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... | |
autocomplete="off" onkeypress="upArrow(this, event)"><br> | autocomplete="off"><br> | def make_repost_button(environ): url = request.construct_url(environ) if environ['REQUEST_METHOD'] == 'GET': return ('<button onclick="window.location.href=%r">' 'Re-GET Page</button><br>' % url) else: # @@: I'd like to reconstruct this, but I can't because # the POST body is probably lost at this point, and # I can't get it back :( return None # @@: Use or lose the following code block """ fields = [] for name, value in request.parse_formvars( environ, include_get_vars=False).items(): if hasattr(value, 'filename'): # @@: Arg, we'll just submit the body, and leave out # the filename :( value = value.value fields.append( '<input type="hidden" name="%s" value="%s">' % (html_quote(name), html_quote(value))) return ''' | b236391d16e3eae856284a48117e19a19e9b54f1 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12946/b236391d16e3eae856284a48117e19a19e9b54f1/evalexception.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1221,
67,
266,
2767,
67,
5391,
12,
28684,
4672,
880,
273,
590,
18,
10062,
67,
718,
12,
28684,
13,
309,
5473,
3292,
5519,
67,
5327,
3546,
422,
296,
3264,
4278,
327,
7707,
32,
5391,
2232... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1221,
67,
266,
2767,
67,
5391,
12,
28684,
4672,
880,
273,
590,
18,
10062,
67,
718,
12,
28684,
13,
309,
5473,
3292,
5519,
67,
5327,
3546,
422,
296,
3264,
4278,
327,
7707,
32,
5391,
2232... |
self.session.gotoLocation() | self.view.send.gotoLocation() | def on_location_editing_done(self, location): self.session.gotoLocation() | 4fadf73203be069e1abb0745e50de808e949d82c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9377/4fadf73203be069e1abb0745e50de808e949d82c/gnomoire.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
67,
3562,
67,
4619,
310,
67,
8734,
12,
2890,
16,
2117,
4672,
365,
18,
3184,
18,
75,
6302,
2735,
1435,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
67,
3562,
67,
4619,
310,
67,
8734,
12,
2890,
16,
2117,
4672,
365,
18,
3184,
18,
75,
6302,
2735,
1435,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
self.fps = nsteps / (end_time - start_time + .001 ) | duration = min(1.5, time.time() - start_time + .001) self.fps = nsteps / duration | def animateView(self, q2, s2, p2, z2, animate=True): "Animate current view to quat (viewpoint) q2, scale s2, pov p2, and zoom factor z2" # Check User Preference "General | Standard Views: Animate" if not animate or not env.prefs[animateStandardViews_prefs_key]: self.quat = Q(q2) self.pov = V(p2[0], p2[1], p2[2]) self.zoomFactor = z2 self.scale = s2 self.gl_update() return # Disable standard view actions on toolbars/menus. self.win.enableViews(False) wxyz1 = V(self.quat.w, self.quat.x, self.quat.y, self.quat.z) s1 = self.scale pov1 = V(self.pov[0], self.pov[1], self.pov[2]) z1 = self.zoomFactor wxyz2 = V(q2.w, q2.x, q2.y, q2.z) pov2 = V(p2[0], p2[1], p2[2]) # The rotation path may turn either the "short way" (less than 180) or the "long way" (more than 180). # Long paths can be prevented by negating one end (if the dot product is negative). if dot(wxyz1, wxyz2) < 0: wxyz2 = V(-q2.w, -q2.x, -q2.y, -q2.z) off = wxyz2 -wxyz1 | 5fb22f777c91adb971bce1f786163070dfd13fc4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/5fb22f777c91adb971bce1f786163070dfd13fc4/GLPane.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
14671,
1767,
12,
2890,
16,
1043,
22,
16,
272,
22,
16,
293,
22,
16,
998,
22,
16,
14671,
33,
5510,
4672,
315,
979,
4988,
783,
1476,
358,
25847,
261,
1945,
1153,
13,
1043,
22,
16,
3159,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
14671,
1767,
12,
2890,
16,
1043,
22,
16,
272,
22,
16,
293,
22,
16,
998,
22,
16,
14671,
33,
5510,
4672,
315,
979,
4988,
783,
1476,
358,
25847,
261,
1945,
1153,
13,
1043,
22,
16,
3159,... |
for key in request.session['shares'].iterkeys(): try: session_key = "S:%s if share_connectors.has_key(session_key): share_connectors.get(session_key).seppuku() del share_connectors[session_key] except: logger.error(traceback.format_exc()) | try: for key in request.session['shares'].iterkeys(): try: session_key = "S:%s if share_connectors.has_key(session_key): share_connectors.get(session_key).seppuku() del share_connectors[session_key] except: logger.error(traceback.format_exc()) except KeyError: pass | def logout(request, **kwargs): conn = None try: conn = kwargs["conn"] except: logger.error(traceback.format_exc()) return handlerInternalError("Connection is not available. Please contact your administrator.") for key in request.session['shares'].iterkeys(): try: session_key = "S:%s#%s#%s" % (request.session.session_key,request.session['server'], key) if share_connectors.has_key(session_key): share_connectors.get(session_key).seppuku() del share_connectors[session_key] except: logger.error(traceback.format_exc()) try: del request.session['shares'] except KeyError: logger.error(traceback.format_exc()) try: session_key = "S:%s#%s" % (request.session.session_key,request.session['server']) if connectors.has_key(session_key): conn.seppuku() del connectors[session_key] except: logger.error(traceback.format_exc()) try: del request.session['server'] except KeyError: logger.error(traceback.format_exc()) try: del request.session['host'] except KeyError: logger.error(traceback.format_exc()) try: del request.session['port'] except KeyError: logger.error(traceback.format_exc()) try: del request.session['username'] except KeyError: logger.error(traceback.format_exc()) try: del request.session['password'] except KeyError: logger.error(traceback.format_exc()) try: del request.session['sessionUuid'] except KeyError: logger.error(traceback.format_exc()) try: del request.session['groupId'] except KeyError: logger.error(traceback.format_exc()) try: del request.session['experimenter'] except KeyError: logger.error(traceback.format_exc()) pass try: del request.session['imageInBasket'] except KeyError: logger.error(traceback.format_exc()) try: del request.session['nav'] except KeyError: logger.error(traceback.format_exc()) request.session.set_expiry(1) return HttpResponseRedirect("/%s/" % (settings.WEBCLIENT_ROOT_BASE)) | ad77f06d874b17f64116bf1142bc099dabd5d3da /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12409/ad77f06d874b17f64116bf1142bc099dabd5d3da/views.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12735,
12,
2293,
16,
2826,
4333,
4672,
1487,
273,
599,
775,
30,
1487,
273,
1205,
9614,
4646,
11929,
1335,
30,
1194,
18,
1636,
12,
21696,
18,
2139,
67,
10075,
10756,
327,
1838,
20980,
293... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12735,
12,
2293,
16,
2826,
4333,
4672,
1487,
273,
599,
775,
30,
1487,
273,
1205,
9614,
4646,
11929,
1335,
30,
1194,
18,
1636,
12,
21696,
18,
2139,
67,
10075,
10756,
327,
1838,
20980,
293... |
if not self.abort: self.parent.gauge1.SetValue(0.0) self.parent.thisvideo.append(self.parent.videos[self.parent.converting]) self.filename=REGEX_FILE_CLEANUP_FILENAME.sub('',self.parent.meta[self.parent.videos[self.parent.converting]]['name']) self.profile=int(self.parent.meta[self.parent.videos[self.parent.converting]]['profile']) self.outdir=self.parent.prefs.getp(self.profile,'Outdir') if self.outdir[-1:]==os.sep: self.outdir=self.outdir[0:-1] if not os.path.lexists(self.outdir): os.makedirs(self.outdir) elif not os.path.isdir(self.outdir): os.remove(self.outdir) os.makedirs(self.outdir) self.outdir=self.outdir+os.sep if os.path.lexists(self.uri): self.stream=self.uri | self.parent.gauge1.SetValue(0.0) self.parent.thisvideo.append(self.parent.videos[self.parent.converting]) self.filename=REGEX_FILE_CLEANUP_FILENAME.sub('',self.parent.meta[self.parent.videos[self.parent.converting]]['name']) self.profile=int(self.parent.meta[self.parent.videos[self.parent.converting]]['profile']) self.outdir=self.parent.prefs.getp(self.profile,'Outdir') if self.outdir[-1:]==os.sep: self.outdir=self.outdir[0:-1] if not os.path.lexists(self.outdir): os.makedirs(self.outdir) elif not os.path.isdir(self.outdir): os.remove(self.outdir) os.makedirs(self.outdir) self.outdir=self.outdir+os.sep if os.path.lexists(self.uri): self.stream=self.uri else: self.stream='-' if self.profile==-1: try: failed=False if self.stream=='-': src=DamnURLPicker(self.uris) total=int(src.info()['Content-Length']) try: tmpuri=src.info()['Content-Disposition'][src.info()['Content-Disposition'].find('filename=')+9:] except: tmpuri='video.avi' else: total=int(os.lstat(self.stream).st_size) src=open(self.stream,'rb') tmpuri=self.stream if REGEX_URI_EXTENSION_EXTRACT.search(tmpuri): ext='.'+REGEX_URI_EXTENSION_EXTRACT.sub('\\1',tmpuri) else: ext='.avi' self.filename=self.getfinalfilename(self.outdir,self.filename,ext) dst=open(self.outdir+self.filename+ext,'wb') keepgoing=True copied=0.0 self.parent.SetStatusText('Copying '+self.parent.meta[self.parent.videos[self.parent.converting]]['name']+' to '+self.filename+ext+'...') while keepgoing and not self.abort: i=src.read(256) if len(i): dst.write(i) copied+=256.0 else: copied=total keepgoing=False self.parent.gauge1.SetValue(min((100.0,copied/total*100.0))) except: failed=True self.grabberrun=False if self.abort or failed: self.parent.meta[self.parent.videos[self.parent.converting]]['status']='Failure.' self.parent.list.SetStringItem(self.parent.converting,ID_COL_VIDSTAT,'Failure.') | def run(self): self.abort=False if True:#for self.uri in self.uris: self.uri=self.uris[0] if not self.abort: self.parent.gauge1.SetValue(0.0) self.parent.thisvideo.append(self.parent.videos[self.parent.converting]) self.filename=REGEX_FILE_CLEANUP_FILENAME.sub('',self.parent.meta[self.parent.videos[self.parent.converting]]['name']) self.profile=int(self.parent.meta[self.parent.videos[self.parent.converting]]['profile']) self.outdir=self.parent.prefs.getp(self.profile,'Outdir') if self.outdir[-1:]==os.sep: self.outdir=self.outdir[0:-1] if not os.path.lexists(self.outdir): os.makedirs(self.outdir) elif not os.path.isdir(self.outdir): os.remove(self.outdir) os.makedirs(self.outdir) self.outdir=self.outdir+os.sep if os.path.lexists(self.uri): self.stream=self.uri # It's a file stream, ffmpeg will take care of it else: self.stream='-' # It's another stream, spawn a downloader thread to take care of it and feed the content to ffmpeg via stdin if self.profile==-1: # Do not encode, just copy try: failed=False if self.stream=='-': # Spawn a downloader src=urllib.urlopen(self.uri) total=int(src.info()['Content-Length']) try: tmpuri=src.info()['Content-Disposition'][src.info()['Content-Disposition'].find('filename=')+9:] except: tmpuri='video.avi' # And pray for the best! else: # Just copy the file, lol total=int(os.lstat(self.stream).st_size) src=open(self.stream,'rb') tmpuri=self.stream if REGEX_URI_EXTENSION_EXTRACT.search(tmpuri): ext='.'+REGEX_URI_EXTENSION_EXTRACT.sub('\\1',tmpuri) else: ext='.avi' # And pray for the best again! self.filename=self.getfinalfilename(self.outdir,self.filename,ext) dst=open(self.outdir+self.filename+ext,'wb') keepgoing=True copied=0.0 self.parent.SetStatusText('Copying '+self.parent.meta[self.parent.videos[self.parent.converting]]['name']+' to '+self.filename+ext+'...') while keepgoing and not self.abort: i=src.read(256) if len(i): dst.write(i) copied+=256.0 else: copied=total keepgoing=False self.parent.gauge1.SetValue(min((100.0,copied/total*100.0))) except: failed=True self.grabberrun=False if self.abort or failed: self.parent.meta[self.parent.videos[self.parent.converting]]['status']='Failure.' self.parent.list.SetStringItem(self.parent.converting,ID_COL_VIDSTAT,'Failure.') else: self.parent.meta[self.parent.videos[self.parent.converting]]['status']='Success!' self.parent.list.SetStringItem(self.parent.converting,ID_COL_VIDSTAT,'Success!') self.parent.go(aborted=self.abort) return os_exe_ext='' if os.name=='nt': os_exe_ext='.exe' self.passes=1 cmd=[DV_BIN_PATH+'ffmpeg'+os_exe_ext,'-i','?DAMNVID_VIDEO_STREAM?','-y','-title',self.parent.meta[self.parent.videos[self.parent.converting]]['name'],'-comment','Converted by DamnVid '+DV_VERSION+'.','-deinterlace','-passlogfile',DV_TMP_PATH+'pass'] for i in DV_PREFERENCES.keys(): if i[0:25]=='damnvid-profile:encoding_': i=i[16:] pref=self.parent.prefs.getp(self.profile,i) if pref: if type(DV_PREFERENCES['damnvid-profile:'+i]['kind']) is types.StringType: if DV_PREFERENCES['damnvid-profile:'+i]['kind'][0]=='%': pref=str(round(float(pref),0)) # Round if i=='encoding_pass': pref='?DAMNVID_VIDEO_PASS?' cmd.extend(['-'+i[9:],pref]) vidformat=self.parent.prefs.getp(self.profile,'Encoding_f') self.vcodec=self.parent.prefs.getp(self.profile,'Encoding_vcodec') self.totalpasses=self.parent.prefs.getp(self.profile,'Encoding_pass') if not self.totalpasses: self.totalpasses=1 else: self.totalpasses=int(self.totalpasses) if vidformat and DV_FILE_EXT.has_key(vidformat): ext='.'+DV_FILE_EXT[vidformat] else: if self.vcodec and DV_FILE_EXT_BY_CODEC.has_key(self.vcodec): ext='.'+DV_FILE_EXT_BY_CODEC[self.vcodec] else: ext='.avi' self.filename=self.getfinalfilename(self.outdir,self.filename,ext) self.filenamenoext=self.filename self.tmpfilename=self.gettmpfilename(DV_TMP_PATH,self.filenamenoext,ext) cmd.append('?DAMNVID_OUTPUT_FILE?') self.filename=self.filenamenoext+ext self.duration=None self.parent.SetStatusText('Converting '+self.parent.meta[self.parent.videos[self.parent.converting]]['name']+' to '+self.filename+'...') while int(self.passes)<=int(self.totalpasses) and not self.abort: if self.passes!=1: self.stream=DV_TMP_PATH+self.tmpfilename self.tmpfilename=self.gettmpfilename(DV_TMP_PATH,self.filenamenoext,ext) tmpf=open('stderr.txt','a') tmpf.write('\n\n--------\n\n') self.process=DamnSpawner(self.cmd2str(cmd),stderr=subprocess.PIPE,stdin=subprocess.PIPE,cwd=os.path.dirname(DV_TMP_PATH)) if self.stream=='-': self.feeder=DamnDownloader(self.uri,self.process.stdin) self.feeder.start() curline='' while self.process.poll()==None and not self.abort: c=self.process.stderr.read(1) tmpf.write(c) curline+=c if c=="\r" or c=="\n": self.parseLine(curline) curline='' self.passes+=1 tmpf.close() self.parent.gauge1.SetValue(100.0) result=self.process.poll() # The process is complete, but .poll() still returns the process's return code time.sleep(.25) # Wait a bit self.grabberrun=False # That'll make the DamnConverterGrabber wake up just in case if result and os.path.lexists(DV_TMP_PATH+self.tmpfilename): os.remove(DV_TMP_PATH+self.tmpfilename) # Delete the output file if ffmpeg has exitted with a bad return code for i in os.listdir(os.path.dirname(DV_TMP_PATH)): if i[0:8]=='damnvid-': i=i[8:] if i==self.tmpfilename and not result: try: os.rename(DV_TMP_PATH+i,self.outdir+self.filename) except: # Maybe the file still isn't unlocked, it happens... Wait moar and retry try: time.sleep(2) os.rename(DV_TMP_PATH+i,self.outdir+self.filename) except: # Now this is really bad, alert the user dlg=wx.MessageDialog(None,'DamnVid successfully converted the file but something prevents it from moving it to the output directory.\nAll hope is not lost, you can still move the file by yourself. It is here:\n'+DV_TMP_PATH+i,'Cannot move file!',wx.OK|wx.ICON_EXCLAMATION) dlg.SetIcon(DV_ICON) dlg.ShowModal() dlg.Destroy() else: try: os.remove(DV_TMP_PATH+i) except: pass if not result: self.parent.meta[self.parent.videos[self.parent.converting]]['status']='Success!' self.parent.list.SetStringItem(self.parent.converting,ID_COL_VIDSTAT,'Success!') self.parent.go(aborted=self.abort) return self.parent.meta[self.parent.videos[self.parent.converting]]['status']='Failure.' self.parent.list.SetStringItem(self.parent.converting,ID_COL_VIDSTAT,'Failure.') self.parent.go(aborted=self.abort) | 7ad6098b40f1a39c4d76402fede5772f656b7b13 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11142/7ad6098b40f1a39c4d76402fede5772f656b7b13/DamnVid.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
4672,
365,
18,
18623,
33,
8381,
309,
1053,
27363,
1884,
365,
18,
1650,
316,
365,
18,
23510,
30,
365,
18,
1650,
33,
2890,
18,
23510,
63,
20,
65,
365,
18,
2938,
18,
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,
1086,
12,
2890,
4672,
365,
18,
18623,
33,
8381,
309,
1053,
27363,
1884,
365,
18,
1650,
316,
365,
18,
23510,
30,
365,
18,
1650,
33,
2890,
18,
23510,
63,
20,
65,
365,
18,
2938,
18,
75,... |
self.parser.openElements.pop() | if self.parser.openElements[-1] == name: self.parser.openElements.pop() else: self.parser.parseError() | def endTagTitleStyleScript(self, name): self.parser.openElements.pop() | 9968d62be9415e0f0c75be992d56b7adab3b89d3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4487/9968d62be9415e0f0c75be992d56b7adab3b89d3/parser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
29765,
4247,
2885,
3651,
12,
2890,
16,
508,
4672,
309,
365,
18,
4288,
18,
3190,
3471,
18919,
21,
65,
422,
508,
30,
365,
18,
4288,
18,
3190,
3471,
18,
5120,
1435,
469,
30,
365,
18,
42... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
29765,
4247,
2885,
3651,
12,
2890,
16,
508,
4672,
309,
365,
18,
4288,
18,
3190,
3471,
18919,
21,
65,
422,
508,
30,
365,
18,
4288,
18,
3190,
3471,
18,
5120,
1435,
469,
30,
365,
18,
42... |
def eval(self, *args, **kwds): | def eval(self, code, globals=None, locals=None, synchronize=True, *args, **kwds): | def eval(self, *args, **kwds): """ Evaluates a command inside the R interpreter and returns the output as a string. EXAMPLES: sage: r.eval('1+1') '[1] 2' | 27b9dddb1083d54aec9102ed84a9441f2f76eb42 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/27b9dddb1083d54aec9102ed84a9441f2f76eb42/r.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5302,
12,
2890,
16,
981,
16,
10941,
33,
7036,
16,
8985,
33,
7036,
16,
16978,
33,
5510,
16,
380,
1968,
16,
2826,
25577,
4672,
3536,
10271,
815,
279,
1296,
4832,
326,
534,
16048,
471,
11... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5302,
12,
2890,
16,
981,
16,
10941,
33,
7036,
16,
8985,
33,
7036,
16,
16978,
33,
5510,
16,
380,
1968,
16,
2826,
25577,
4672,
3536,
10271,
815,
279,
1296,
4832,
326,
534,
16048,
471,
11... |
HandlerAPI.DeliverToList(self, msg, newdata=msgdata) | HandlerAPI.DeliverToList(self, msg, msgdata) | def __handlepost(self, record, value, comment): # For backwards compatibility with pre 2.0beta3 if len(record) == 5: ptime, sender, subject, reason, filename = record msgdata = {} else: # New format of record ptime, sender, subject, reason, filename, msgdata = record path = os.path.join(mm_cfg.DATA_DIR, filename) rejection = None if value == 0: # Approved try: fp = open(path) except IOError: # we lost the message text file. clean up our housekeeping # and raise an exception. raise Errors.LostHeldMessage(path) msg = Message.Message(fp) msgdata['approved'] = 1 # ignore return value HandlerAPI.DeliverToList(self, msg, newdata=msgdata) elif value == 1: # Rejected rejection = 'Refused' if not self.dont_respond_to_post_requests: self.__refuse('Posting of your message titled "%s"' % subject, sender, comment or '[No reason given]') else: assert value == 2 # Discarded rejection = 'Discarded' # Log the rejection def strquote(s): return string.replace(s, '%', '%%') | 18950fcd77ad9afe6dbee3c2be29fd019aabcd9a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2120/18950fcd77ad9afe6dbee3c2be29fd019aabcd9a/ListAdmin.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
4110,
2767,
12,
2890,
16,
1409,
16,
460,
16,
2879,
4672,
468,
2457,
12727,
8926,
598,
675,
576,
18,
20,
5758,
23,
309,
562,
12,
3366,
13,
422,
1381,
30,
293,
957,
16,
5793,
16,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
4110,
2767,
12,
2890,
16,
1409,
16,
460,
16,
2879,
4672,
468,
2457,
12727,
8926,
598,
675,
576,
18,
20,
5758,
23,
309,
562,
12,
3366,
13,
422,
1381,
30,
293,
957,
16,
5793,
16,... |
tc = 1.0/max(abs(vals.real)) T = arange(0,8*tc,8*tc / float(N)) | tc = 1.0/max(abs(real(vals))) T = arange(0,10*tc,10*tc / float(N)) | def impulse(system, X0=None, T=None, N=None): if isinstance(system, lti): sys = system else: sys = lti(*system) if X0 is None: B = sys.B else: B = sys.B + X0 if N is None: N = 100 if T is None: vals = linalg.eigvals(sys.A) tc = 1.0/max(abs(vals.real)) T = arange(0,8*tc,8*tc / float(N)) h = zeros(T.shape, sys.A.typecode()) for k in range(len(h)): eA = Mat(linalg.expm(sys.A*T[k])) B,C = map(Mat, (B,sys.C)) h[k] = squeeze(C*eA*B) return T, h | 268e9b5bffbd8a297de272073e03dd07dffaa5bc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/268e9b5bffbd8a297de272073e03dd07dffaa5bc/ltisys.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1646,
24667,
12,
4299,
16,
1139,
20,
33,
7036,
16,
399,
33,
7036,
16,
423,
33,
7036,
4672,
309,
1549,
12,
4299,
16,
20197,
4672,
2589,
273,
2619,
469,
30,
2589,
273,
20197,
30857,
4299... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1646,
24667,
12,
4299,
16,
1139,
20,
33,
7036,
16,
399,
33,
7036,
16,
423,
33,
7036,
4672,
309,
1549,
12,
4299,
16,
20197,
4672,
2589,
273,
2619,
469,
30,
2589,
273,
20197,
30857,
4299... |
if type_datum is UnicodeType: | type_datum = type(datum) if type_datum == UnicodeType: | def SearchableText(self): """All fields marked as 'searchable' are concatenated together here for indexing purpose""" data = [] charset = self.getCharset() for field in self.Schema().fields(): if not field.searchable: continue method = field.getAccessor(self) try: datum = method(mimetype="text/plain") except TypeError: # retry in case typeerror was raised because accessor doesn't # handle the mimetype argument try: datum = method() except: continue | f0ae295d4e54409254bff207c9403071e6554fe7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12165/f0ae295d4e54409254bff207c9403071e6554fe7/BaseObject.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5167,
429,
1528,
12,
2890,
4672,
3536,
1595,
1466,
9350,
487,
296,
3072,
429,
11,
854,
22080,
9475,
2674,
364,
14403,
13115,
8395,
501,
273,
5378,
4856,
273,
365,
18,
588,
9652,
1435,
36... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5167,
429,
1528,
12,
2890,
4672,
3536,
1595,
1466,
9350,
487,
296,
3072,
429,
11,
854,
22080,
9475,
2674,
364,
14403,
13115,
8395,
501,
273,
5378,
4856,
273,
365,
18,
588,
9652,
1435,
36... |
except EOFError: typ, dat = None, [None] | except: typ, dat = 'NO', ['%s: %s' % sys.exc_info()[:2]] | def logout(self): """Shutdown connection to server. | 30d7469fec69eeeae9057b22a126d4a00278147c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/30d7469fec69eeeae9057b22a126d4a00278147c/imaplib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12735,
12,
2890,
4672,
3536,
10961,
1459,
358,
1438,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12735,
12,
2890,
4672,
3536,
10961,
1459,
358,
1438,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
class TopVirusesDetected(reports.Graph): | class TopWebVirusesDetected(reports.Graph): | def get_plot(self, end_date, report_days, host=None, user=None, email=None): ed = DateFromMx(end_date) one_week = DateFromMx(end_date - mx.DateTime.DateTimeDelta(report_days)) | 105b5e27bf63d007da247194879b178db12c5076 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/87/105b5e27bf63d007da247194879b178db12c5076/untangle_base_virus.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
4032,
12,
2890,
16,
679,
67,
712,
16,
2605,
67,
9810,
16,
1479,
33,
7036,
16,
729,
33,
7036,
16,
2699,
33,
7036,
4672,
1675,
273,
2167,
1265,
49,
92,
12,
409,
67,
712,
13,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
4032,
12,
2890,
16,
679,
67,
712,
16,
2605,
67,
9810,
16,
1479,
33,
7036,
16,
729,
33,
7036,
16,
2699,
33,
7036,
4672,
1675,
273,
2167,
1265,
49,
92,
12,
409,
67,
712,
13,... |
"Could not find example root directory. Do you have the " \ | "Could not find example root directory. Do you have the" \ | def test_get_test_path(): assert os.path.isdir(get_example_path('')), \ "Could not find example root directory. Do you have the " \ + " whole repository structure checked out?" | 51cce200bcae1cb17e93d25a05a967a88116f114 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7711/51cce200bcae1cb17e93d25a05a967a88116f114/jmitest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
588,
67,
3813,
67,
803,
13332,
1815,
1140,
18,
803,
18,
291,
1214,
12,
588,
67,
8236,
67,
803,
2668,
6134,
3631,
521,
315,
4445,
486,
1104,
3454,
1365,
1867,
18,
2256,
1846,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
588,
67,
3813,
67,
803,
13332,
1815,
1140,
18,
803,
18,
291,
1214,
12,
588,
67,
8236,
67,
803,
2668,
6134,
3631,
521,
315,
4445,
486,
1104,
3454,
1365,
1867,
18,
2256,
1846,
... |
guess = self.add(bank, 077777 & ~bugger) | guess = self._add(bank, 077777 & ~bugger) | def __init__(self, context): self.context = context # Assembler context. self.objectCode = {} | 17f6f0cbe742001a56ee33de28087b87c16288b2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8152/17f6f0cbe742001a56ee33de28087b87c16288b2/binary.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
819,
4672,
365,
18,
2472,
273,
819,
2868,
468,
2970,
5747,
749,
819,
18,
365,
18,
1612,
1085,
273,
2618,
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,
1001,
2738,
972,
12,
2890,
16,
819,
4672,
365,
18,
2472,
273,
819,
2868,
468,
2970,
5747,
749,
819,
18,
365,
18,
1612,
1085,
273,
2618,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
(cSuccess, cResult), (sSuccess, sResult) = util.deferredResult(d) self.failIf(cSuccess) self.failIf(sSuccess) errors = log.flushErrors(SSL.Error) | def afterLost(((cSuccess, cResult), (sSuccess, sResult))): self.failIf(cSuccess) self.failIf(sSuccess) return d.addCallback(afterLost) | def testRefusedAnonymousClientConnection(self): onServerLost = defer.Deferred() onClientLost = defer.Deferred() self.loopback(sslverify.OpenSSLCertificateOptions(privateKey=self.sKey, certificate=self.sCert, verify=True, caCerts=[self.sCert], requireCertificate=True), sslverify.OpenSSLCertificateOptions(requireCertificate=False), onServerLost=onServerLost, onClientLost=onClientLost) | 6305a011c61d2e3075143d6d1aac62b453e35f67 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8962/6305a011c61d2e3075143d6d1aac62b453e35f67/test_sslverify.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
1957,
3668,
18792,
1227,
1952,
12,
2890,
4672,
603,
2081,
19024,
273,
2220,
18,
16886,
1435,
603,
1227,
19024,
273,
2220,
18,
16886,
1435,
365,
18,
6498,
823,
12,
8157,
8705,
18,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
1957,
3668,
18792,
1227,
1952,
12,
2890,
4672,
603,
2081,
19024,
273,
2220,
18,
16886,
1435,
603,
1227,
19024,
273,
2220,
18,
16886,
1435,
365,
18,
6498,
823,
12,
8157,
8705,
18,
3... |
return html2unicode(s, language = incode) | return unicodeName(s, language = incode) | def interwikiFormat(links, incode): """Create a suitable string to start a wikipedia page consisting of interwikilinks given as a dictionary of code:pagename in the argument. """ s = [] ar = links.keys() ar.sort() if mylang in config.interwiki_englishfirst: if 'en' in ar: del ar[ar.index('en')] ar[:0]=['en'] for code in ar: try: s.append(links[code].aslink()) except AttributeError: s.append('[[%s:%s]]' % (code, links[code])) s=config.interwiki_langs_separator.join(s) + '\r\n' return html2unicode(s, language = incode) | b62f0c7652f84c145d97d46d58d9c2d64f35ee08 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4404/b62f0c7652f84c145d97d46d58d9c2d64f35ee08/wikipedia.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1554,
13044,
1630,
12,
7135,
16,
316,
710,
4672,
3536,
1684,
279,
10631,
533,
358,
787,
279,
21137,
1363,
23570,
434,
1554,
11999,
330,
754,
87,
864,
487,
279,
3880,
434,
981,
30,
9095,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1554,
13044,
1630,
12,
7135,
16,
316,
710,
4672,
3536,
1684,
279,
10631,
533,
358,
787,
279,
21137,
1363,
23570,
434,
1554,
11999,
330,
754,
87,
864,
487,
279,
3880,
434,
981,
30,
9095,
... |
sync_open = sync_open sync_read = sync_read sync_close = sync_close | def producer_stalled (self): return not ( self.async_closed or len (self.async_buffers) > 0 ) | d682bff8b8919db3c121c9b1fc5bed856eb8f68b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2577/d682bff8b8919db3c121c9b1fc5bed856eb8f68b/synchronized.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12608,
67,
334,
4502,
261,
2890,
4672,
327,
486,
261,
365,
18,
3810,
67,
12204,
578,
562,
261,
2890,
18,
3810,
67,
28101,
13,
405,
374,
262,
225,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12608,
67,
334,
4502,
261,
2890,
4672,
327,
486,
261,
365,
18,
3810,
67,
12204,
578,
562,
261,
2890,
18,
3810,
67,
28101,
13,
405,
374,
262,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,... | |
def unicode_internal_decode( unistr,errors='strict'): """None """ if type(unistr) == unicode: return unistr,len(unistr) else: return unicode(unistr),len(unistr) | def utf_16_be_encode( obj,errors='strict'): """None """ res = PyUnicode_EncodeUTF16(obj,len(obj),errors,'big') res = ''.join(res) return res, len(res) | 43ce23feb40aadc6a6a9c31d19c968e0351f9245 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/43ce23feb40aadc6a6a9c31d19c968e0351f9245/inprogress__codecs.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7718,
67,
2313,
67,
2196,
67,
3015,
12,
1081,
16,
4324,
2218,
13948,
11,
4672,
3536,
7036,
3536,
400,
273,
4707,
16532,
67,
5509,
5159,
2313,
12,
2603,
16,
1897,
12,
2603,
3631,
4324,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7718,
67,
2313,
67,
2196,
67,
3015,
12,
1081,
16,
4324,
2218,
13948,
11,
4672,
3536,
7036,
3536,
400,
273,
4707,
16532,
67,
5509,
5159,
2313,
12,
2603,
16,
1897,
12,
2603,
3631,
4324,
... | |
dir.Append(Function(VideoItem(PlayVideo,video.text,thumb=R(ICON),art=R(ART)),link = video.get("href"))) | dir.Append(Function(VideoItem(PlayVideo,video.text),link = video.get("href"))) | def ParseSearchResults(sender, query=None): dir = MediaContainer(viewGroup="InfoList") results = HTML.ElementFromURL('http://www.khanacademy.org/search?page_search_query='+query).xpath("//section[@class='videos']//dt/a") if results == []: return MessageContainer('No Results','No video file could be found for the following query: '+query) for video in results: dir.Append(Function(VideoItem(PlayVideo,video.text,thumb=R(ICON),art=R(ART)),link = video.get("href"))) return dir | f4c8dcb66d81d6ad90a3b46a428caddbc823b2dd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14350/f4c8dcb66d81d6ad90a3b46a428caddbc823b2dd/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2884,
2979,
3447,
12,
15330,
16,
843,
33,
7036,
4672,
225,
1577,
273,
6128,
2170,
12,
1945,
1114,
1546,
17914,
7923,
225,
1686,
273,
3982,
18,
1046,
1265,
1785,
2668,
2505,
2207,
5591,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2884,
2979,
3447,
12,
15330,
16,
843,
33,
7036,
4672,
225,
1577,
273,
6128,
2170,
12,
1945,
1114,
1546,
17914,
7923,
225,
1686,
273,
3982,
18,
1046,
1265,
1785,
2668,
2505,
2207,
5591,
1... |
def __init__(self, out=None): | def __init__(self, out=None, encoding="iso-8859-1"): | def __init__(self, out=None): if out is None: import sys out = sys.stdout handler.ContentHandler.__init__(self) self._out = out | d2e8ed58c83ecc5390d6cf99651b791350b04e61 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/d2e8ed58c83ecc5390d6cf99651b791350b04e61/saxutils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
596,
33,
7036,
16,
2688,
1546,
9699,
17,
17258,
17,
21,
6,
4672,
309,
596,
353,
599,
30,
1930,
2589,
596,
273,
2589,
18,
10283,
1838,
18,
1350,
1503,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1001,
2738,
972,
12,
2890,
16,
596,
33,
7036,
16,
2688,
1546,
9699,
17,
17258,
17,
21,
6,
4672,
309,
596,
353,
599,
30,
1930,
2589,
596,
273,
2589,
18,
10283,
1838,
18,
1350,
1503,
1... |
output(u'Image deleted before getting the Hash. Skipping...') | output(u'File deleted before getting the Hash. Skipping...') | def getHash(self): """ Function that return the Hash of an image in oder to understand if two Images are the same or not. """ if self.exists(): params = { 'action' :'query', 'titles' :self.title(), 'prop' :'imageinfo', 'iiprop' :'sha1', } # First of all we need the Hash that identify an image data = query.GetData(params, useAPI = True, encodeTitle = False) pageid = data['query']['pages'].keys()[0] try: hash_found = data['query']['pages'][pageid][u'imageinfo'][0][u'sha1'] except (KeyError, IndexError): if self.exists(): raise NoHash('No Hash found in the APIs! Maybe the regex to catch it is wrong or someone has changed the APIs structure.') else: output(u'Image deleted before getting the Hash. Skipping...') return None else: return hash_found else: output(u'Image deleted before getting the Hash. Skipping...') return None | b4e6dbf405f65d45e84baeb5508d02d04da189c0 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4404/b4e6dbf405f65d45e84baeb5508d02d04da189c0/wikipedia.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
16075,
12,
2890,
4672,
3536,
4284,
716,
327,
326,
2474,
434,
392,
1316,
316,
320,
765,
358,
22413,
309,
2795,
23022,
854,
326,
1967,
578,
486,
18,
3536,
309,
365,
18,
1808,
13332,
859,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
16075,
12,
2890,
4672,
3536,
4284,
716,
327,
326,
2474,
434,
392,
1316,
316,
320,
765,
358,
22413,
309,
2795,
23022,
854,
326,
1967,
578,
486,
18,
3536,
309,
365,
18,
1808,
13332,
859,
... |
if dep1[0] == 'T' or dep1[0:2] == 'IT': return depUpdateRules[dep2][dep1] return depUpdateRules[dep1][dep2] | dep1_required = isRequiredDep(dep1) dep1_direct = isDirectDep(dep1) dep1_lib = isLibDep(dep1) dep2_required = isRequiredDep(dep2) dep2_direct = isDirectDep(dep2) dep2_lib = isLibDep(dep2) selectedDep = False if dep1 == dep2: newDep = dep1 selectedDep = True if not selectedDep: if dep1_required and not dep2_required: newDep = dep1 selectedDep = True elif not dep1_required and dep2_required: newDep = dep2 selectedDep = True if not selectedDep: if dep1_direct and not dep2_direct: newDep = dep1 selectedDep = True elif not dep1_direct and dep2_direct: newDep = dep2 selectedDep = True if not selectedDep: if dep1_lib and not dep2_lib: newDep = dep1 selectedDep = True elif not dep1_lib and dep2_lib: newDep = dep2 selectedDep = True assert(selectedDep) return newDep | def updatePackageDep(dep1, dep2): if dep1[0] == 'T' or dep1[0:2] == 'IT': return depUpdateRules[dep2][dep1] return depUpdateRules[dep1][dep2] | 14ce9fd4920947e5f8b1813e1f49ee4adffd7eaf /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1130/14ce9fd4920947e5f8b1813e1f49ee4adffd7eaf/TrilinosDependencies.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
2261,
16316,
12,
15037,
21,
16,
5993,
22,
4672,
565,
5993,
21,
67,
4718,
273,
14967,
16316,
12,
15037,
21,
13,
5993,
21,
67,
7205,
273,
353,
5368,
16316,
12,
15037,
21,
13,
5993,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
2261,
16316,
12,
15037,
21,
16,
5993,
22,
4672,
565,
5993,
21,
67,
4718,
273,
14967,
16316,
12,
15037,
21,
13,
5993,
21,
67,
7205,
273,
353,
5368,
16316,
12,
15037,
21,
13,
5993,... |
interncolumns = ("process_id", "coinc_def_id", "time_slide_id") | interncolumns = ("process_id", "coinc_def_id", "time_slide_id", "instruments") | def __init__(self, **kwargs): for name, value in kwargs.items(): setattr(self, name, value) | 000180bdcfe2998f4dda83d9ae557ed3d6f0b3aa /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3589/000180bdcfe2998f4dda83d9ae557ed3d6f0b3aa/lsctables.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
2826,
4333,
4672,
364,
508,
16,
460,
316,
1205,
18,
3319,
13332,
9241,
12,
2890,
16,
508,
16,
460,
13,
2,
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,
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,
1001,
2738,
972,
12,
2890,
16,
2826,
4333,
4672,
364,
508,
16,
460,
316,
1205,
18,
3319,
13332,
9241,
12,
2890,
16,
508,
16,
460,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
database doesn't exist). | database doesn't exist). defaults to 0. | def newdb(request): """Create a new database. Accepts POST requests only. If the database already exists: - if overwrite is 1, replaces the database completely with a new one (deleting all the contents). - otherwise, returns an error. Supported parameters: - `db_name`: contains the name of the database. - `fields`: the field parameters (see the client for documentation for now: major FAIL, FIXME) - `overwrite`: if 1, the database already exists, instead of returning an error, remove it and create it anew. (doesn't affect behaviour if database doesn't exist). """ params = validate_params(request.POST, { 'db_name': (1, 1, '^\w+$', None), 'fields': (1, 1, None, None), 'overwrite': (0, 1, '^[01]$', [0]), }) db_name = params['db_name'][0] db_path = os.path.realpath(get_db_path(db_name)) if os.path.exists(db_path): if not params['overwrite']: raise DatabaseExistsError("The path for '%s' is already in use" % db_path) else: shutil.rmtree(db_path) if not os.path.exists(os.path.dirname(db_path)): os.makedirs(os.path.dirname(db_path)) db = xappy.IndexerConnection(db_path) try: try: # Set up the field actions from fields config = simplejson.loads(params['fields'][0]) # FIXME -perhaps we should validate here? for settings in config: validate_dict_entries(settings, valid_field_config_keys, 'Invalid field setting parameter(s): %s') field_name = settings.get('field_name', None) if field_name is None: raise ValidationError("Missing field_name parameter") field_type = settings.get('type', 'text') if field_type not in ('text', 'date', 'float', 'geo'): raise ValidationError("Unknown field_type parameter %s" % field_type) if settings.get('store', False): db.add_field_action(field_name, xappy.FieldActions.STORE_CONTENT) #spelling_word_source = settings.get('spelling_word_source', False) #collapsible = settings.get('collapsible', False) #sortable = settings.get('sortable', False) #range_searchable = settings.get('range_searchable', False) #is_document_weight = settings.get('is_document_weight', False) noindex = settings.get('noindex', False) freetext_params = settings.get('freetext', None) exacttext_params = settings.get('exacttext', None) if (freetext_params is not None and exacttext_params is not None): raise ValidationError( "Field settings for %s specify both 'freetext' and " "'exacttext' for a single field - at most one may be " "specified") if freetext_params is not None and noindex: raise ValidationError( "Field settings for %s specify both 'freetext' and " "'noindex' for a single field - at most one may be " "specified") if exacttext_params is not None and noindex: raise ValidationError( "Field settings for %s specify both 'exacttext' and " "'noindex' for a single field - at most one may be " "specified") if (freetext_params is not None or exacttext_params is not None): if field_type != 'text': raise ValidationError( "Text searching options specified, but field type " "is not text") if freetext_params is not None or ( field_type == 'text' and freetext_params is None and exacttext_params is None and not noindex): if freetext_params is None: freetext_params = {} validate_dict_entries(freetext_params, valid_freetext_options, 'Invalid freetext option(s): %s') opts = {} lang = freetext_params.get('language', None) if lang is not None: opts['language'] = lang opts['weight'] = freetext_params.get('term_frequency_multiplier', 1) phrase = freetext_params.get('enable_phrase_search', True) if not phrase: opts['nopos'] = True index_groups = freetext_params.get('index_groups', ['_FIELD_INDEX', '_GENERAL_INDEX']) db.add_field_action(field_name, xappy.FieldActions.INDEX_FREETEXT, **opts) if exacttext_params is not None: #FIXME - implement raise ValidationError("exacttext not yet implemented") geo_params = settings.get('geo', None) if geo_params is not None and noindex: raise ValidationError( "Field settings for %s specify both 'geo' and " "'noindex' for a single field - at most one may be " "specified") if geo_params is not None: if field_type != 'geo': raise ValidationError( "Text searching options specified, but field type " "is not text") if geo_params is not None or ( field_type == 'geo' and geo_params is None and not noindex): if geo_params is None: geo_params = {} validate_dict_entries(geo_params, valid_geo_options, 'Invalid freetext option(s): %s') bounding_box_search = geo_params.get('enable_bounding_box_search', True) range_search = geo_params.get('enable_range_search', True) # Geolocation action (for sorting by distance). db.add_field_action(field_name, xappy.FieldActions.GEOLOCATION) if bounding_box_search or range_search: pass # FIXME - need to do something to index these. db.flush() finally: db.close() except: del db shutil.rmtree(db_path) dircache.reset() raise dircache.reset() return {'ok': 1} | 3260c6ea689f17a1576be97ccd98b27460457131 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9909/3260c6ea689f17a1576be97ccd98b27460457131/search.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
394,
1966,
12,
2293,
4672,
3536,
1684,
279,
394,
2063,
18,
225,
27158,
5485,
3285,
1338,
18,
225,
971,
326,
2063,
1818,
1704,
30,
300,
309,
6156,
353,
404,
16,
12878,
326,
2063,
14416,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1966,
12,
2293,
4672,
3536,
1684,
279,
394,
2063,
18,
225,
27158,
5485,
3285,
1338,
18,
225,
971,
326,
2063,
1818,
1704,
30,
300,
309,
6156,
353,
404,
16,
12878,
326,
2063,
14416,
... |
if __debug__: onScreenDebug.render() | onScreenDebug.render() | def igLoop(self, state): if __debug__: # We render the watch variables for the onScreenDebug as soon # as we reasonably can before the renderFrame(). onScreenDebug.render() | f86c6e322c7a566a9780a7fa8a58bfb11a1e2b39 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8543/f86c6e322c7a566a9780a7fa8a58bfb11a1e2b39/ShowBase.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
18158,
6452,
12,
2890,
16,
919,
4672,
309,
1001,
4148,
972,
30,
468,
1660,
1743,
326,
4267,
3152,
364,
326,
603,
7956,
2829,
487,
17136,
468,
487,
732,
3971,
6906,
848,
1865,
326,
1743,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
18158,
6452,
12,
2890,
16,
919,
4672,
309,
1001,
4148,
972,
30,
468,
1660,
1743,
326,
4267,
3152,
364,
326,
603,
7956,
2829,
487,
17136,
468,
487,
732,
3971,
6906,
848,
1865,
326,
1743,
... |
def _posHprBroadcast(self, task=DummyTask): | def _posHprBroadcast(self, task=None): | def _posHprBroadcast(self, task=DummyTask): # TODO: we explicitly stagger the initial task timing in # startPosHprBroadcast; we should at least make an effort to keep # this task accurately aligned with its period and starting time. self.d_broadcastPosHpr() task.setDelay(self.__broadcastPeriod) return Task.again | c1f013a2c877e639a2da7ee3915e0a8cf22af867 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7242/c1f013a2c877e639a2da7ee3915e0a8cf22af867/DistributedSmoothNodeBase.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
917,
44,
683,
15926,
12,
2890,
16,
1562,
33,
7036,
4672,
468,
2660,
30,
732,
8122,
384,
7594,
326,
2172,
1562,
15538,
316,
468,
16013,
44,
683,
15926,
31,
732,
1410,
622,
4520,
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,
389,
917,
44,
683,
15926,
12,
2890,
16,
1562,
33,
7036,
4672,
468,
2660,
30,
732,
8122,
384,
7594,
326,
2172,
1562,
15538,
316,
468,
16013,
44,
683,
15926,
31,
732,
1410,
622,
4520,
12... |
column.set_sort_column_id(next_column) | if sort_name is not None: column.set_sort_column_id(next_column+1) else: column.set_sort_column_id(next_column) | def new( self): if not hasattr( self, 'callback'): self.callback = None | d04c533b5d76014416b59855c0d2055d4c8f86c1 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12778/d04c533b5d76014416b59855c0d2055d4c8f86c1/gui.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
394,
12,
365,
4672,
309,
486,
3859,
12,
365,
16,
296,
3394,
11,
4672,
365,
18,
3394,
273,
599,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
394,
12,
365,
4672,
309,
486,
3859,
12,
365,
16,
296,
3394,
11,
4672,
365,
18,
3394,
273,
599,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
with io.open(support.TESTFN, self.write_mode, buffering=0) as raw: | with self.open(support.TESTFN, self.write_mode, buffering=0) as raw: | def test_threads(self): try: # Write out many bytes from many threads and test they were # all flushed. N = 1000 contents = bytes(range(256)) * N sizes = cycle([1, 19]) n = 0 queue = deque() while n < len(contents): size = next(sizes) queue.append(contents[n:n+size]) n += size del contents # We use a real file object because it allows us to # exercise situations where the GIL is released before # writing the buffer to the raw streams. This is in addition # to concurrency issues due to switching threads in the middle # of Python code. with io.open(support.TESTFN, self.write_mode, buffering=0) as raw: bufio = self.tp(raw, 8) errors = [] def f(): try: while True: try: s = queue.popleft() except IndexError: return bufio.write(s) except Exception as e: errors.append(e) raise threads = [threading.Thread(target=f) for x in range(20)] for t in threads: t.start() time.sleep(0.02) # yield for t in threads: t.join() self.assertFalse(errors, "the following exceptions were caught: %r" % errors) bufio.close() with io.open(support.TESTFN, "rb") as f: s = f.read() for i in range(256): self.assertEquals(s.count(bytes([i])), N) finally: support.unlink(support.TESTFN) | 540d576d7a9562b3f2b22d53da6ef10922fb5986 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12029/540d576d7a9562b3f2b22d53da6ef10922fb5986/test_io.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
12495,
12,
2890,
4672,
775,
30,
468,
2598,
596,
4906,
1731,
628,
4906,
7403,
471,
1842,
2898,
4591,
468,
777,
22604,
18,
423,
273,
4336,
2939,
273,
1731,
12,
3676,
12,
5034,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
12495,
12,
2890,
4672,
775,
30,
468,
2598,
596,
4906,
1731,
628,
4906,
7403,
471,
1842,
2898,
4591,
468,
777,
22604,
18,
423,
273,
4336,
2939,
273,
1731,
12,
3676,
12,
5034,
... |
else: moveOffset = scale * self.assy.o.right moveOffset += scale * self.assy.o.down | else: moveOffset = initial_offset_for_other_pastables moveOffset += scale * self.assy.o.right moveOffset += scale * self.assy.o.down self._initial_paste_offset_for_other_pastables = moveOffset | of def filterChunks | 8b748f35206882452325a1386b28bfd7edbaaa4f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11221/8b748f35206882452325a1386b28bfd7edbaaa4f/ops_copy.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
434,
1652,
1034,
14975,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
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,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
434,
1652,
1034,
14975,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
self.eventprocessor.logMessage(_("Queued upload request: %s") % str(vars(msg)), 5) | self.eventprocessor.logMessage(_("Queued upload request: User %s, %s") % (user, str(vars(msg))), 5) | def QueueUpload(self, msg): """ Peer remotely(?) queued a download (upload here) """ user = None for i in self.peerconns: if i.conn is msg.conn.conn: user = i.username if user is None: return addr = msg.conn.addr[0] if not self.fileIsQueued(user, msg.file): friend = user in [i[0] for i in self.eventprocessor.userlist.userlist] if friend and self.eventprocessor.config.sections["transfers"]["friendsnolimits"]: limits = 0 else: limits = 1 checkuser, reason = self.eventprocessor.CheckUser(user, addr) if not checkuser: self.queue.put(slskmessages.QueueFailed(conn = msg.conn.conn, file = msg.file, reason = reason)) elif limits and self.queueLimitReached(user): uploadslimit = self.eventprocessor.config.sections["transfers"]["queuelimit"] limitmsg = "User limit of %i megabytes exceeded" %(uploadslimit) self.queue.put(slskmessages.QueueFailed(conn = msg.conn.conn, file = msg.file, reason = limitmsg)) elif limits and self.fileLimitReached(user): filelimit = self.eventprocessor.config.sections["transfers"]["filelimit"] limitmsg = "User limit of %i files exceeded" %(filelimit) self.queue.put(slskmessages.QueueFailed(conn = msg.conn.conn, file = msg.file, reason = limitmsg)) elif self.fileIsShared(user, msg.file): self.uploads.append(Transfer(user = user, filename = msg.file, path = os.path.dirname(msg.file.replace('\\', os.sep)), status = "Queued", timequeued = time.time(), size = self.getFileSize(msg.file))) self.uploadspanel.update(self.uploads[-1]) self.addQueued(user, msg.file) else: self.queue.put(slskmessages.QueueFailed(conn = msg.conn.conn, file = msg.file, reason = "File not shared" )) self.eventprocessor.logMessage(_("Queued upload request: %s") % str(vars(msg)), 5) self.checkUploadQueue() | e9ab064556a6a654dda329fc639c9e7883afe3e8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8738/e9ab064556a6a654dda329fc639c9e7883afe3e8/transfers.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7530,
4777,
12,
2890,
16,
1234,
4672,
3536,
10669,
26693,
2357,
3680,
13,
12234,
279,
4224,
261,
6327,
2674,
13,
3536,
729,
273,
599,
364,
277,
316,
365,
18,
12210,
591,
2387,
30,
309,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7530,
4777,
12,
2890,
16,
1234,
4672,
3536,
10669,
26693,
2357,
3680,
13,
12234,
279,
4224,
261,
6327,
2674,
13,
3536,
729,
273,
599,
364,
277,
316,
365,
18,
12210,
591,
2387,
30,
309,
... |
if not bober_is_good: if first_warning: print "*WARNING*: bober's implementation is broken on this platform or this size of n." first_warning=False | def number_of_partitions(n,k=None, algorithm='default'): r""" Returns the size of partitions_list(n,k). INPUT: n -- an integer k -- (default: None); if specified, instead returns the cardinality of the set of all (unordered) partitions of the positive integer n into sums with k summands. algorithm -- (default: 'default') 'default' -- if k is given use Gap. Otherwise, on x86 when n > 3000, use 'bober' On non x86 use 'pari'. 'bober' -- use Jonathon Bober's implementation 'gap' -- use GAP (VERY *slow*) 'pari' -- use PARI. Speed seems the same as GAP until $n$ is in the thousands, in which case PARI is faster. *But* PARI has a bug, e.g., on 64-bit Linux PARI-2.3.2 outputs numbpart(147007)%1000 as 536, but it should be 533!. So do not use this option. IMPLEMENTATION: Wraps GAP's NrPartitions or PARI's numbpart function. Use the function \code{partitions(n)} to return a generator over all partitions of $n$. It is possible to associate with every partition of the integer n a conjugacy class of permutations in the symmetric group on n points and vice versa. Therefore p(n) = NrPartitions(n) is the number of conjugacy classes of the symmetric group on n points. EXAMPLES: sage: v = list(partitions(5)); v [(1, 1, 1, 1, 1), (1, 1, 1, 2), (1, 2, 2), (1, 1, 3), (2, 3), (1, 4), (5,)] sage: len(v) 7 sage: number_of_partitions(5, algorithm='gap') 7 sage: number_of_partitions(5, algorithm='pari') 7 sage: number_of_partitions(5, algorithm='bober') 7 The input must be a nonnegative integer or a ValueError is raised. sage: number_of_partitions(-5) Traceback (most recent call last): ... ValueError: n (=-5) must be a nonnegative integer sage: number_of_partitions(10,2) 5 sage: number_of_partitions(10) 42 sage: number_of_partitions(3) 3 sage: number_of_partitions(10) 42 sage: number_of_partitions(3, algorithm='pari') 3 sage: number_of_partitions(10, algorithm='pari') 42 sage: number_of_partitions(40) 37338 sage: number_of_partitions(100) 190569292 sage: number_of_partitions(100000) 27493510569775696512677516320986352688173429315980054758203125984302147328114964173055050741660736621590157844774296248940493063070200461792764493033510116079342457190155718943509725312466108452006369558934464248716828789832182345009262853831404597021307130674510624419227311238999702284408609370935531629697851569569892196108480158600569421098519 A generating function for p(n) is given by the reciprocal of Euler's function: \[ \sum_{n=0}^\infty p(n)x^n = \prod_{k=1}^\infty \left(\frac {1}{1-x^k} \right). \] We use SAGE to verify that the first several coefficients do instead agree: sage: q = PowerSeriesRing(QQ, 'q', default_prec=9).gen() sage: prod([(1-q^k)^(-1) for k in range(1,9)]) ## partial product of 1 + q + 2*q^2 + 3*q^3 + 5*q^4 + 7*q^5 + 11*q^6 + 15*q^7 + 22*q^8 + O(q^9) sage: [number_of_partitions(k) for k in range(2,10)] [2, 3, 5, 7, 11, 15, 22, 30] REFERENCES: http://en.wikipedia.org/wiki/Partition_%28number_theory%29 TESTS: sage: n = 500 + randint(0,500) sage: number_of_partitions( n - (n % 385) + 369) % 385 == 0 True sage: n = 1500 + randint(0,1500) sage: number_of_partitions( n - (n % 385) + 369) % 385 == 0 True sage: n = 1000000 + randint(0,1000000) sage: number_of_partitions( n - (n % 385) + 369) % 385 == 0 True sage: n = 1000000 + randint(0,1000000) sage: number_of_partitions( n - (n % 385) + 369) % 385 == 0 True sage: n = 1000000 + randint(0,1000000) sage: number_of_partitions( n - (n % 385) + 369) % 385 == 0 True sage: n = 1000000 + randint(0,1000000) sage: number_of_partitions( n - (n % 385) + 369) % 385 == 0 True sage: n = 1000000 + randint(0,1000000) sage: number_of_partitions( n - (n % 385) + 369) % 385 == 0 True sage: n = 1000000 + randint(0,1000000) sage: number_of_partitions( n - (n % 385) + 369) % 385 == 0 True sage: n = 100000000 + randint(0,100000000) # takes a long time sage: number_of_partitions( n - (n % 385) + 369) % 385 == 0 True sage: n = 100000000 + randint(0,100000000) # takes a long time sage: number_of_partitions( n - (n % 385) + 369) % 385 == 0 True sage: n = 100000000 + randint(0,100000000) # takes a long time sage: number_of_partitions( n - (n % 385) + 369) % 385 == 0 True Another consistency test for n up to 500: sage: len([n for n in [1..500] if number_of_partitions(n) != number_of_partitions(n,algorithm='pari')]) 0 """ n = ZZ(n) if n < 0: raise ValueError, "n (=%s) must be a nonnegative integer"%n elif n == 0: return ZZ(1) global first_warning PROCESSOR = os.uname()[-1] bober_is_good = 'x86' in PROCESSOR if k is not None: algorithm = 'gap' elif algorithm == 'default': if bober_is_good: algorithm = 'bober' elif PROCESSOR in ['x86', 'Power Macintosh']: algorithm = 'pari' else: algorithm = 'gap' if algorithm == 'gap': if k is None: ans=gap.eval("NrPartitions(%s)"%(ZZ(n))) else: ans=gap.eval("NrPartitions(%s,%s)"%(ZZ(n),ZZ(k))) return ZZ(ans) if k is not None: raise ValueError, "only the GAP algorithm works if k is specified." if algorithm == 'bober': if not bober_is_good: if first_warning: print "*WARNING*: bober's implementation is broken on this platform or this size of n." first_warning=False return partitions_ext.number_of_partitions(n) elif algorithm == 'pari': if n > 3000 and 'x86_64' in PROCESSOR: if first_warning: print "*WARNING*: Pari's numbpart is very buggy on x86_64 (fixed in svn, so don't report to pari-dev)" first_warning = False return ZZ(pari(ZZ(n)).numbpart()) raise ValueError, "unknown algorithm '%s'"%algorithm | f0f9a1fa3f7057ce6c279f53361876ef7f50795f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/f0f9a1fa3f7057ce6c279f53361876ef7f50795f/combinat.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1300,
67,
792,
67,
21275,
12,
82,
16,
79,
33,
7036,
16,
4886,
2218,
1886,
11,
4672,
436,
8395,
2860,
326,
963,
434,
10060,
67,
1098,
12,
82,
16,
79,
2934,
225,
12943,
30,
290,
1493,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1300,
67,
792,
67,
21275,
12,
82,
16,
79,
33,
7036,
16,
4886,
2218,
1886,
11,
4672,
436,
8395,
2860,
326,
963,
434,
10060,
67,
1098,
12,
82,
16,
79,
2934,
225,
12943,
30,
290,
1493,
... | |
sage: G.derived_series() | sage: G.derived_series() | def derived_series(self): """ Return the derived series of this group as a list of permutation groups. | 1658b04d4cf7d534376d011a40bb52f192eac894 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/1658b04d4cf7d534376d011a40bb52f192eac894/permgroup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10379,
67,
10222,
12,
2890,
4672,
3536,
2000,
326,
10379,
4166,
434,
333,
1041,
487,
279,
666,
434,
17440,
3252,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10379,
67,
10222,
12,
2890,
4672,
3536,
2000,
326,
10379,
4166,
434,
333,
1041,
487,
279,
666,
434,
17440,
3252,
18,
2,
-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.