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 is_integral_domain(self, proof = True): r""" If this function returns ``True`` then self is definitely an integral domain. If it returns ``False``, then either self is definitely not an integral domain or this function was unable to determine whether or not self is an integral domain. Use ``self.defining_ideal().is_prime()`` to find out for sure whether this quotient ring is really not an integral domain, of if Sage is unable to determine the answer. EXAMPLES:: sage: R = Integers(8) sage: R.is_integral_domain() | def is_integral_domain(self, proof=True): r""" With ``proof`` equal to ``True`` (the default), this function may raise a ``NotImplementedError``. When ``proof`` is ``False``, if ``True`` is returned, then self is definitely an integral domain. If the function returns ``False``, then either self is not an integral domain or it was unable to determine whether or not self is an integral domain. EXAMPLES:: sage: R.<x,y> = QQ[] sage: R.quo(x^2 - y).is_integral_domain() True sage: R.quo(x^2 - y^2).is_integral_domain() | def is_integral_domain(self, proof = True): r""" If this function returns ``True`` then self is definitely an integral domain. If it returns ``False``, then either self is definitely not an integral domain or this function was unable to determine whether or not self is an integral domain. Use ``self.defining_ideal().is_prime()`` to find out for sure whether this quotient ring is really not an integral domain, of if Sage is unable to determine the answer. EXAMPLES:: sage: R = Integers(8) sage: R.is_integral_domain() False sage: R.<a,b,c> = ZZ['a','b','c'] sage: I = R.ideal(a,b) sage: Q = R.quotient_ring(I) sage: Q.is_integral_domain() Traceback (most recent call last): ... NotImplementedError """ if proof: return self.defining_ideal().is_prime() else: try: return self.defining_ideal.is_prime() except AttributeError: return False except NotImplementedError: return False | 3a0b55fb00691c840d0a3ab2771849c160e71b93 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/3a0b55fb00691c840d0a3ab2771849c160e71b93/quotient_ring.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
353,
67,
14970,
23811,
67,
4308,
12,
2890,
16,
14601,
33,
5510,
4672,
436,
8395,
3423,
12176,
24207,
10335,
3959,
358,
12176,
5510,
10335,
225,
261,
5787,
805,
3631,
333,
445,
2026,
1002,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
353,
67,
14970,
23811,
67,
4308,
12,
2890,
16,
14601,
33,
5510,
4672,
436,
8395,
3423,
12176,
24207,
10335,
3959,
358,
12176,
5510,
10335,
225,
261,
5787,
805,
3631,
333,
445,
2026,
1002,
... |
assert stderr != "" | self.assertEquals(stderr, "chainloader: error: mmap\n") | def test_fd_chainloader_invalid_elf(self): proc = subprocess.Popen(["sh", "-c", "./chainloader 10 10</dev/zero"], stderr=subprocess.PIPE) stdout, stderr = proc.communicate() self.assertEquals(proc.wait(), 127) assert stderr != "" | ac104130c72d18149b3977c379c51cf0885aebba /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1008/ac104130c72d18149b3977c379c51cf0885aebba/test.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
8313,
67,
5639,
6714,
67,
5387,
67,
19079,
12,
2890,
4672,
5418,
273,
6652,
18,
52,
3190,
3816,
6,
674,
3113,
3701,
71,
3113,
25165,
5639,
6714,
1728,
1728,
1757,
5206,
19,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
8313,
67,
5639,
6714,
67,
5387,
67,
19079,
12,
2890,
4672,
5418,
273,
6652,
18,
52,
3190,
3816,
6,
674,
3113,
3701,
71,
3113,
25165,
5639,
6714,
1728,
1728,
1757,
5206,
19,
7... |
self.socket.setsockopt( socket.SOL_SOCKET, socket.SO_REUSEADDR, self.socket.getsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR) | 1) | self.set_reuse_addr() | def __init__(self, localaddr, remoteaddr): self._localaddr = localaddr self._remoteaddr = remoteaddr asyncore.dispatcher.__init__(self) self.create_socket(socket.AF_INET, socket.SOCK_STREAM) # try to re-use a server port if possible self.socket.setsockopt( socket.SOL_SOCKET, socket.SO_REUSEADDR, self.socket.getsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR) | 1) self.bind(localaddr) self.listen(5) print >> DEBUGSTREAM, \ '%s started at %s\n\tLocal addr: %s\n\tRemote addr:%s' % ( self.__class__.__name__, time.ctime(time.time()), localaddr, remoteaddr) | d936b8a52f7f33f8ebd7f76a39aabf0ae157083e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/d936b8a52f7f33f8ebd7f76a39aabf0ae157083e/smtpd.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1191,
4793,
16,
26693,
684,
3069,
4672,
365,
6315,
3729,
4793,
273,
1191,
4793,
365,
6315,
2764,
352,
684,
3069,
273,
26693,
684,
3069,
4326,
479,
18,
1849... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1191,
4793,
16,
26693,
684,
3069,
4672,
365,
6315,
3729,
4793,
273,
1191,
4793,
365,
6315,
2764,
352,
684,
3069,
273,
26693,
684,
3069,
4326,
479,
18,
1849... |
if self.senders[x].has_key("prefix") and \ self.senders[x]["prefix"] == prefix: | if self.senders[x].get("prefix") == prefix: | def prefix2user(self, prefix): """Find user that is associated with the random prefix; which is the only way to identify the source. Return None if no user.""" # The data structures aren't setup very efficiently. for x in self.senders: if self.senders[x].has_key("prefix") and \ self.senders[x]["prefix"] == prefix: #xprint "DATA:Prefix=%02x%02x%02x its %s" %\ # (tuple(map(ord, prefix)) + (x, )) return self.senders[x] return None | 921d0c687216eaddc9f64b9b1d3618b8e47dfe0f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2496/921d0c687216eaddc9f64b9b1d3618b8e47dfe0f/sumiget.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1633,
22,
1355,
12,
2890,
16,
1633,
4672,
3536,
3125,
729,
716,
353,
3627,
598,
326,
2744,
1633,
31,
1492,
353,
326,
1338,
4031,
358,
9786,
326,
1084,
18,
2000,
599,
309,
1158,
729,
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,
1633,
22,
1355,
12,
2890,
16,
1633,
4672,
3536,
3125,
729,
716,
353,
3627,
598,
326,
2744,
1633,
31,
1492,
353,
326,
1338,
4031,
358,
9786,
326,
1084,
18,
2000,
599,
309,
1158,
729,
12... |
self.fail("Incorrect content-type for PROPFIND response (%s != %s)" % (response.code, responsecode.MULTI_STATUS)) | self.fail("Incorrect content-type for PROPFIND response (%r not in %r)" % (content_type, (MimeType("text", "xml"), MimeType("application", "xml")))) | def check_result(response): response = IResponse(response) | 6554fadb02bdcfb091a06546480d31265db18bba /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/6554fadb02bdcfb091a06546480d31265db18bba/test_prop.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
67,
2088,
12,
2740,
4672,
766,
273,
467,
1064,
12,
2740,
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,
... | [
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,
866,
67,
2088,
12,
2740,
4672,
766,
273,
467,
1064,
12,
2740,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
out = self.bot.say | def d_PrivateMsg(self, nick, _1, _2, _3, text): | f495d1c3dc56755f0f2b9a23907dc8933deeca0f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12372/f495d1c3dc56755f0f2b9a23907dc8933deeca0f/dtella_dc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
302,
67,
6014,
3332,
12,
2890,
16,
10909,
16,
389,
21,
16,
389,
22,
16,
389,
23,
16,
977,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
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,
302,
67,
6014,
3332,
12,
2890,
16,
10909,
16,
389,
21,
16,
389,
22,
16,
389,
23,
16,
977,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... | |
rowcount = cursor.rowcount() | rowcount = cursor.rowcount | def write(self, cursor, user, ids, values, context=None): super(ModelSQL, self).write(cursor, user, ids, values, context=context) | b38b7ccd172c296274dd9157c722278595633164 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9266/b38b7ccd172c296274dd9157c722278595633164/modelsql.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
12,
2890,
16,
3347,
16,
729,
16,
3258,
16,
924,
16,
819,
33,
7036,
4672,
2240,
12,
1488,
3997,
16,
365,
2934,
2626,
12,
9216,
16,
729,
16,
3258,
16,
924,
16,
819,
33,
2472,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
12,
2890,
16,
3347,
16,
729,
16,
3258,
16,
924,
16,
819,
33,
7036,
4672,
2240,
12,
1488,
3997,
16,
365,
2934,
2626,
12,
9216,
16,
729,
16,
3258,
16,
924,
16,
819,
33,
2472,
1... |
stdout_thread.set_daemon(True) | stdout_thread.daemon = True | def _communicate(self, input): stdout = None # Return stderr = None # Return | 6d5e506a8c5e3ddfcec4cbf34d71227a30035789 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12029/6d5e506a8c5e3ddfcec4cbf34d71227a30035789/subprocess.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
5702,
318,
2659,
12,
2890,
16,
810,
4672,
3909,
273,
599,
468,
2000,
4514,
273,
599,
468,
2000,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
5702,
318,
2659,
12,
2890,
16,
810,
4672,
3909,
273,
599,
468,
2000,
4514,
273,
599,
468,
2000,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
eval(fnname)(a) | eval(fnname)(data) | def main(): # Print a warning if you haven't downloaded all of the regression test files # or an error if all of the regression test files are not included in filenames[] regfile = open(os.path.join("..", "data", "regressionfiles.txt"), "r") regfilenames = [os.sep.join(x.strip().split("/")) for x in regfile.readlines()] regfile.close() missing = 0 for x in regfilenames: if not os.path.isfile(os.path.join("..", "data", x)): missing += 1 elif os.path.join("..", "data", x) not in flatten(filenames): print "\nERROR: The regression file %s is present, but not included in " \ "the 'filenames' variable.\n\nPlease add a new glob statement." % x sys.exit(1) if missing > 0: print "\nWARNING: You are missing %d regression file(s).\n" \ " Run wget.sh in the ../data directory to update.\n" % missing try: raw_input("(Press ENTER to continue or CTRL+C to exit)") except KeyboardInterrupt: print "\n" sys.exit(0) failures = errors = total = 0 for i in range(len(names)): print "Are the %s files ccopened and parsed correctly?" % names[i] for filename in filenames[i]: total += 1 print " %s..." % filename, try: a = ccopen(filename) except: errors += 1 print "ccopen error" else: if type(a) == type(dummyfiles[i]): try: a.logger.setLevel(logging.ERROR) a.parse() except KeyboardInterrupt: sys.exit(1) except: print "parse error" errors += 1 else: fnname = "test" + normalisefilename("_".join(filename.split(os.sep)[2:])) if fnname in globals(): # If there is a test that matches... try: eval(fnname)(a) # Run the test except AssertionError: print "test failed" failures += 1 else: print "parsed and tested" else: print "parsed" else: print "ccopen failed" failures += 1 print print "Total: %d Failed: %d Errors: %d" % (total, failures, errors) | 00882cef71e9e6a84f847d916236b67e639fba83 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8167/00882cef71e9e6a84f847d916236b67e639fba83/regression.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
468,
3038,
279,
3436,
309,
1846,
15032,
1404,
13549,
777,
434,
326,
23215,
1842,
1390,
468,
578,
392,
555,
309,
777,
434,
326,
23215,
1842,
1390,
854,
486,
5849,
316,
9066,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
468,
3038,
279,
3436,
309,
1846,
15032,
1404,
13549,
777,
434,
326,
23215,
1842,
1390,
468,
578,
392,
555,
309,
777,
434,
326,
23215,
1842,
1390,
854,
486,
5849,
316,
9066,
... |
return self.x,self.y | def taille(self): """width and height of a jpeg file""" self.LoadPIL() self.x,self.y=self.f.size return self.x,self.y | 1486920227c98c64d19f6a2b81c6df951b7c06d4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12328/1486920227c98c64d19f6a2b81c6df951b7c06d4/imagizer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5798,
298,
12,
2890,
4672,
3536,
2819,
471,
2072,
434,
279,
29726,
585,
8395,
365,
18,
2563,
1102,
48,
1435,
365,
18,
92,
16,
2890,
18,
93,
33,
2890,
18,
74,
18,
1467,
327,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5798,
298,
12,
2890,
4672,
3536,
2819,
471,
2072,
434,
279,
29726,
585,
8395,
365,
18,
2563,
1102,
48,
1435,
365,
18,
92,
16,
2890,
18,
93,
33,
2890,
18,
74,
18,
1467,
327,
365,
18,
... | |
prefixes[string.join(parts[:i], '.')] = 1 | prefixes[DOT.join(parts[:i])] = 1 | def filterpackages(self): prefixes = {} for name in self.packages.keys(): parts = name.split('.') for i in range(1, len(parts)): prefixes[string.join(parts[:i], '.')] = 1 #print prefixes for name, value in self.packages.items(): if value is not None: continue | c48a7c510b5ae370d8c9f07ece10dffd627964cc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6753/c48a7c510b5ae370d8c9f07ece10dffd627964cc/compile.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1034,
10308,
12,
2890,
4672,
9419,
273,
2618,
364,
508,
316,
365,
18,
10308,
18,
2452,
13332,
2140,
273,
508,
18,
4939,
2668,
1093,
13,
364,
277,
316,
1048,
12,
21,
16,
562,
12,
6019,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1034,
10308,
12,
2890,
4672,
9419,
273,
2618,
364,
508,
316,
365,
18,
10308,
18,
2452,
13332,
2140,
273,
508,
18,
4939,
2668,
1093,
13,
364,
277,
316,
1048,
12,
21,
16,
562,
12,
6019,
... |
... print("%s->%s" % (s, s.find()), end=' ') | ... print(" %s->%s" % (s, s.find()), end='') | ... def __str__(self): | 944a38a57407e7641b7c63f5341e83cbe0da7480 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12029/944a38a57407e7641b7c63f5341e83cbe0da7480/test_generators.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1372,
377,
1652,
1001,
701,
972,
12,
2890,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1372,
377,
1652,
1001,
701,
972,
12,
2890,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
"""Calls f() and handle all OperationErrors. | """Calls f() and handles all OperationErrors. | def run_toplevel(f, *fargs, **fkwds): """Calls f() and handle all OperationErrors. Intended use is to run the main program or one interactive statement. run_protected() handles details like forwarding exceptions to sys.excepthook(), catching SystemExit, printing a newline after sys.stdout if needed, etc. """ try: # run it f(*fargs, **fkwds) # we arrive here if no exception is raised. stdout cosmetics... try: stdout = sys.stdout softspace = stdout.softspace except AttributeError: pass # Don't crash if user defined stdout doesn't have softspace else: if softspace: stdout.write('\n') except SystemExit, e: # exit if we catch a w_SystemExit exitcode = e.code if exitcode is None: exitcode = 0 else: try: exitcode = int(exitcode) except: # not an integer: print it to stderr try: stderr = sys.stderr except AttributeError: pass # too bad else: print >> stderr, exitcode exitcode = 1 raise SystemExit(exitcode) except: etype, evalue, etraceback = sys.exc_info() try: # extra debugging info in case the code below goes very wrong if DEBUG and hasattr(sys, 'stderr'): s = getattr(etype, '__name__', repr(etype)) print >> sys.stderr, "debug: exception-type: ", s print >> sys.stderr, "debug: exception-value:", str(evalue) tbentry = etraceback if tbentry: while tbentry.tb_next: tbentry = tbentry.tb_next lineno = tbentry.tb_lineno filename = tbentry.tb_frame.f_code.co_filename print >> sys.stderr, "debug: exception-tb: %s:%d" % ( filename, lineno) # set the sys.last_xxx attributes sys.last_type = etype sys.last_value = evalue sys.last_traceback = etraceback # call sys.excepthook hook = getattr(sys, 'excepthook', originalexcepthook) hook(etype, evalue, etraceback) return False # done except: try: stderr = sys.stderr except AttributeError: pass # too bad else: print >> stderr, 'Error calling sys.excepthook:' originalexcepthook(*sys.exc_info()) print >> stderr print >> stderr, 'Original exception was:' # we only get here if sys.excepthook didn't do its job originalexcepthook(etype, evalue, etraceback) return False return True # success | 6d0346c7b97f286b8270216647b717f8e11ac35d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6934/6d0346c7b97f286b8270216647b717f8e11ac35d/app_main.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
67,
3669,
2815,
12,
74,
16,
380,
74,
1968,
16,
2826,
74,
25577,
4672,
3536,
10125,
284,
1435,
471,
7372,
777,
4189,
4229,
18,
657,
8140,
999,
353,
358,
1086,
326,
2774,
5402,
578... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3669,
2815,
12,
74,
16,
380,
74,
1968,
16,
2826,
74,
25577,
4672,
3536,
10125,
284,
1435,
471,
7372,
777,
4189,
4229,
18,
657,
8140,
999,
353,
358,
1086,
326,
2774,
5402,
578... |
plot_title_size = prefs.get('plot_title_size',text_size) plot_title_padding = prefs.get('plot_text_padding',text_padding) plot_title_size_point = pixelToPoint(plot_title_size,dpi) stats_flag = prefs.get('statistics_line',False) | plot_title_size = prefs.get( 'plot_title_size', text_size ) plot_title_padding = prefs.get( 'plot_text_padding', text_padding ) plot_title_size_point = pixelToPoint( plot_title_size, dpi ) stats_flag = prefs.get( 'statistics_line', False ) | def draw(self): prefs = self.prefs dpi = self.ax_contain.figure.get_dpi() # Update palette palette = prefs.get('colors',{}) if palette: self.palette.addPalette(palette) xlabel = prefs.get('xlabel','') ylabel = prefs.get('ylabel','') xticks_flag = prefs.get('xticks',True) yticks_flag = prefs.get('yticks',True) text_size = prefs['text_size'] text_padding = prefs['text_padding'] label_text_size = prefs.get('label_text_size',text_size) label_text_size_point = pixelToPoint(label_text_size,dpi) tick_text_size = prefs.get('tick_text_size',text_size) tick_text_size_point = pixelToPoint(tick_text_size,dpi) ytick_length = prefs.get('ytick_length',7*tick_text_size) plot_title = prefs.get('plot_title','') if not plot_title or plot_title == 'NoTitle': plot_title_size = 0 plot_title_padding = 0 else: plot_title_size = prefs.get('plot_title_size',text_size) plot_title_padding = prefs.get('plot_text_padding',text_padding) plot_title_size_point = pixelToPoint(plot_title_size,dpi) stats_flag = prefs.get('statistics_line',False) stats_line = '' stats_line_space = 0. if stats_flag: stats_line = self.gdata.getStatString() stats_line_size = label_text_size stats_line_padding = label_text_size*2. stats_line_space = stats_line_size+stats_line_padding | 34ec1e9add6e7beaae414fa998b4771d25b40ccb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/34ec1e9add6e7beaae414fa998b4771d25b40ccb/PlotBase.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3724,
12,
2890,
4672,
225,
15503,
273,
365,
18,
1484,
2556,
16361,
273,
365,
18,
651,
67,
28744,
18,
19675,
18,
588,
67,
72,
7259,
1435,
225,
468,
2315,
12127,
12127,
273,
15503,
18,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3724,
12,
2890,
4672,
225,
15503,
273,
365,
18,
1484,
2556,
16361,
273,
365,
18,
651,
67,
28744,
18,
19675,
18,
588,
67,
72,
7259,
1435,
225,
468,
2315,
12127,
12127,
273,
15503,
18,
5... |
print "Loading qt4 tool..." | def generate(env): """Add Builders and construction variables for qt to an Environment.""" print "Loading qt4 tool..." def locateQt4Command(env, command, qtdir) : suffixes = [ '-qt4', '-qt4.exe', '4', '4.exe', '', '.exe', ] for suffix in suffixes : fullpath = os.path.join(qtdir,'bin',command + suffix) if os.access(fullpath, os.X_OK) : return fullpath fullpath = env.Detect([command+'-qt4', command+'4', command]) if not (fullpath is None) : return fullpath raise "Qt4 command '" + command + "' not found. Tried: " + fullpath1 + " and "+ fullpath2 CLVar = SCons.Util.CLVar Action = SCons.Action.Action Builder = SCons.Builder.Builder splitext = SCons.Util.splitext env['QTDIR'] = _detect(env) # TODO: 'Replace' should be 'SetDefault' | 7abe307abd340fdb7f549d1c6a0b56e33880c691 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1456/7abe307abd340fdb7f549d1c6a0b56e33880c691/qt4.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2103,
12,
3074,
4672,
3536,
986,
3998,
414,
471,
16171,
3152,
364,
25672,
358,
392,
7518,
12123,
225,
1652,
10627,
23310,
24,
2189,
12,
3074,
16,
1296,
16,
25672,
1214,
13,
294,
18333,
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,
2103,
12,
3074,
4672,
3536,
986,
3998,
414,
471,
16171,
3152,
364,
25672,
358,
392,
7518,
12123,
225,
1652,
10627,
23310,
24,
2189,
12,
3074,
16,
1296,
16,
25672,
1214,
13,
294,
18333,
2... | |
print "* received swapped protocol data, cowardly ignored" | self.logger.warning("* received swapped protocol data, cowardly ignored") | def key_press(self, reply): if reply.category != record.FromServer: return if reply.client_swapped: print "* received swapped protocol data, cowardly ignored" return if not len(reply.data) or ord(reply.data[0]) < 2: # not an event return data = reply.data key = '' mod = '' while len(data): event, data = rq.EventField(None).parse_binary_value(data, self.record_dpy.display, None, None) if event.type in [X.KeyPress, X.KeyRelease]: keysym = self.local_dpy.keycode_to_keysym(event.detail, 0) | fa0655e1ae6cde8f63a5339560d53588ae2a1b54 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4183/fa0655e1ae6cde8f63a5339560d53588ae2a1b54/listenkdb.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
498,
67,
1028,
12,
2890,
16,
4332,
4672,
309,
4332,
18,
4743,
480,
1409,
18,
1265,
2081,
30,
327,
309,
4332,
18,
2625,
67,
22270,
1845,
30,
365,
18,
4901,
18,
8551,
2932,
14,
5079,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
498,
67,
1028,
12,
2890,
16,
4332,
4672,
309,
4332,
18,
4743,
480,
1409,
18,
1265,
2081,
30,
327,
309,
4332,
18,
2625,
67,
22270,
1845,
30,
365,
18,
4901,
18,
8551,
2932,
14,
5079,
7... |
res = self.__removeDirs(subDir) | res = self.__removeDirs( subDir ) | def __removeDirs(self,path): """ Black magic contained within... """ res = self.__getDirectoryContents(path) if not res['OK']: return res subDirs = res['Value']['SubDirs'] files = res['Value']['Files'] for subDir in subDirs.keys(): res = self.__removeDirs(subDir) if not res['OK']: return res if files: return S_ERROR("Directory not empty") return self.__removeDirectory(path) | 6280f3782654b93320f684f56a83a6624459bcec /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/6280f3782654b93320f684f56a83a6624459bcec/LcgFileCatalogClient.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
4479,
9872,
12,
2890,
16,
803,
4672,
3536,
22467,
8146,
7542,
3470,
2777,
3536,
400,
273,
365,
16186,
588,
2853,
6323,
12,
803,
13,
309,
486,
400,
3292,
3141,
3546,
30,
327,
400,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4479,
9872,
12,
2890,
16,
803,
4672,
3536,
22467,
8146,
7542,
3470,
2777,
3536,
400,
273,
365,
16186,
588,
2853,
6323,
12,
803,
13,
309,
486,
400,
3292,
3141,
3546,
30,
327,
400,
... |
EXPECT_CALL(*gl_, %(gl_func_name)s(1, Pointee(0))) .Times(1); | def WriteImmediateServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """ | 9fa7a2b02d77ec300c60a11cdfaf23fc9c50a619 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/9fa7a2b02d77ec300c60a11cdfaf23fc9c50a619/build_gles2_cmd_buffer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2598,
22651,
1179,
2802,
4709,
12,
2890,
16,
1326,
16,
585,
4672,
3536,
22042,
1691,
275,
628,
1412,
1503,
12123,
923,
67,
3813,
273,
3536,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2598,
22651,
1179,
2802,
4709,
12,
2890,
16,
1326,
16,
585,
4672,
3536,
22042,
1691,
275,
628,
1412,
1503,
12123,
923,
67,
3813,
273,
3536,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... | |
for attribute in range(count): name = self._read_string() nc_type = self._unpack_int() n = self._unpack_int() attributes[name] = self._read_values(n, nc_type) | for attr in range(count): name = self._unpack_string() attributes[name] = self._read_values() | def _att_array(self): """Read a dict with attributes.""" assert self.read(4) in [ZERO, NC_ATTRIBUTE] count = self._unpack_int() | 6baf98193f837d72fbae3df06c37414e7729f005 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5735/6baf98193f837d72fbae3df06c37414e7729f005/pupynere.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
4558,
67,
1126,
12,
2890,
4672,
3536,
1994,
279,
2065,
598,
1677,
12123,
1815,
365,
18,
896,
12,
24,
13,
316,
306,
24968,
16,
423,
39,
67,
11616,
65,
1056,
273,
365,
6315,
17309,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
389,
4558,
67,
1126,
12,
2890,
4672,
3536,
1994,
279,
2065,
598,
1677,
12123,
1815,
365,
18,
896,
12,
24,
13,
316,
306,
24968,
16,
423,
39,
67,
11616,
65,
1056,
273,
365,
6315,
17309,
... |
sizer.Layout() | self.SetSizer(sizer) | def __init__(self, *a, **kw): self._maze = kw['maze'] del kw['maze'] wx.Dialog.__init__(self, *a, **kw) | 706ec845784be22e3473d535d3584cecd76d0ba8 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10214/706ec845784be22e3473d535d3584cecd76d0ba8/maze.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
380,
69,
16,
2826,
9987,
4672,
365,
6315,
81,
1561,
73,
273,
5323,
3292,
81,
1561,
73,
3546,
1464,
5323,
3292,
81,
1561,
73,
3546,
7075,
18,
6353,
16186,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
380,
69,
16,
2826,
9987,
4672,
365,
6315,
81,
1561,
73,
273,
5323,
3292,
81,
1561,
73,
3546,
1464,
5323,
3292,
81,
1561,
73,
3546,
7075,
18,
6353,
16186,... |
this = apply(_quickfix.new_CashMargin, args) | this = _quickfix.new_CashMargin(*args) | def __init__(self, *args): this = apply(_quickfix.new_CashMargin, args) try: self.this.append(this) except: self.this = this | 7e632099fd421880c8c65fb0cf610d338d115ee9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8819/7e632099fd421880c8c65fb0cf610d338d115ee9/quickfix.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
380,
1968,
4672,
333,
273,
389,
19525,
904,
18,
2704,
67,
39,
961,
9524,
30857,
1968,
13,
775,
30,
365,
18,
2211,
18,
6923,
12,
2211,
13,
1335,
30,
365... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
380,
1968,
4672,
333,
273,
389,
19525,
904,
18,
2704,
67,
39,
961,
9524,
30857,
1968,
13,
775,
30,
365,
18,
2211,
18,
6923,
12,
2211,
13,
1335,
30,
365... |
<input type="hidden" name="indir" value="%(indir)s" /> | def tmpl_page_endaction(self, ln, file, nextPg, startPg, access, curpage, nbPg, nbpages, doctype, act, docname, actname, mainmenu, finished, function_content, next_action): """ Produces the pages after all the fields have been submitted. | 8e8323878b5650395d21eed3f35d991f8cf39161 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12027/8e8323878b5650395d21eed3f35d991f8cf39161/websubmit_templates.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10720,
67,
2433,
67,
409,
1128,
12,
2890,
16,
7211,
16,
585,
16,
1024,
27265,
16,
787,
27265,
16,
2006,
16,
662,
2433,
16,
4264,
27265,
16,
4264,
7267,
16,
24909,
16,
1328,
16,
997,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10720,
67,
2433,
67,
409,
1128,
12,
2890,
16,
7211,
16,
585,
16,
1024,
27265,
16,
787,
27265,
16,
2006,
16,
662,
2433,
16,
4264,
27265,
16,
4264,
7267,
16,
24909,
16,
1328,
16,
997,
... | |
fn = os.path.join(fn, os.pardir, os.pardir, "Doc", "index.html") | fn = os.path.join(fn, os.pardir, os.pardir, "pythlp.chm") | def help_dialog(self, event=None): fn=os.path.join(os.path.abspath(os.path.dirname(__file__)),'help.txt') textView.TextViewer(self.top,'Help',fn) | 9baf0ac17b9f9ff6c7fc52d076da5301553ecd6c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/9baf0ac17b9f9ff6c7fc52d076da5301553ecd6c/EditorWindow.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2809,
67,
12730,
12,
2890,
16,
871,
33,
7036,
4672,
2295,
33,
538,
18,
803,
18,
5701,
12,
538,
18,
803,
18,
5113,
803,
12,
538,
18,
803,
18,
12287,
12,
972,
768,
972,
13,
3631,
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,
2809,
67,
12730,
12,
2890,
16,
871,
33,
7036,
4672,
2295,
33,
538,
18,
803,
18,
5701,
12,
538,
18,
803,
18,
5113,
803,
12,
538,
18,
803,
18,
12287,
12,
972,
768,
972,
13,
3631,
11,... |
max_db_ver = (4, 6) | max_db_ver = (4, 5) | def detect_modules(self): # Ensure that /usr/local is always used add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') | 62dc454321204d2dfa851adc7efcff3158ea875f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8125/62dc454321204d2dfa851adc7efcff3158ea875f/setup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5966,
67,
6400,
12,
2890,
4672,
468,
7693,
716,
342,
13640,
19,
3729,
353,
3712,
1399,
527,
67,
1214,
67,
869,
67,
1098,
12,
2890,
18,
9576,
18,
12083,
67,
8291,
16,
1173,
13640,
19,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5966,
67,
6400,
12,
2890,
4672,
468,
7693,
716,
342,
13640,
19,
3729,
353,
3712,
1399,
527,
67,
1214,
67,
869,
67,
1098,
12,
2890,
18,
9576,
18,
12083,
67,
8291,
16,
1173,
13640,
19,
... |
self.tree.clearActiveFormattingElements() def endTagBr(self, token): self.parser.parseError("unexpected-end-tag-treated-as", {"originalName": "br", "newName": "br element"}) self.tree.reconstructActiveFormattingElements() self.tree.insertElement(impliedTagToken("br", "StartTag")) self.tree.openElements.pop() def endTagOther(self, token): for node in self.tree.openElements[::-1]: if node.name == token["name"]: self.tree.generateImpliedEndTags(exclude=token["name"]) if self.tree.openElements[-1].name != token["name"]: self.parser.parseError("unexpected-end-tag", {"name": token["name"]}) while self.tree.openElements.pop() != node: pass break else: if (node.nameTuple in specialElements | scopingElements): self.parser.parseError("unexpected-end-tag", {"name": token["name"]}) | while element.name != token["name"]: element = self.tree.openElements.pop() self.tree.clearActiveFormattingElements() def endTagBr(self, token): self.parser.parseError("unexpected-end-tag-treated-as", {"originalName": "br", "newName": "br element"}) self.tree.reconstructActiveFormattingElements() self.tree.insertElement(impliedTagToken("br", "StartTag")) self.tree.openElements.pop() def endTagOther(self, token): for node in self.tree.openElements[::-1]: if node.name == token["name"]: self.tree.generateImpliedEndTags(exclude=token["name"]) if self.tree.openElements[-1].name != token["name"]: self.parser.parseError("unexpected-end-tag", {"name": token["name"]}) while self.tree.openElements.pop() != node: pass | def endTagAppletMarqueeObject(self, token): if self.tree.elementInScope(token["name"]): self.tree.generateImpliedEndTags() if self.tree.openElements[-1].name != token["name"]: self.parser.parseError("end-tag-too-early", {"name": token["name"]}) | 7b800000ab5eed9d02fde3c4b884769a0bfbf17a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4487/7b800000ab5eed9d02fde3c4b884769a0bfbf17a/html5parser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
29765,
23696,
49,
297,
1857,
73,
921,
12,
2890,
16,
1147,
4672,
309,
365,
18,
3413,
18,
2956,
382,
3876,
12,
2316,
9614,
529,
11929,
4672,
365,
18,
3413,
18,
7163,
2828,
2092,
1638,
34... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
29765,
23696,
49,
297,
1857,
73,
921,
12,
2890,
16,
1147,
4672,
309,
365,
18,
3413,
18,
2956,
382,
3876,
12,
2316,
9614,
529,
11929,
4672,
365,
18,
3413,
18,
7163,
2828,
2092,
1638,
34... |
print "No skin to read..." | print "[SKIN] No skin to read..." | def readSkin(screen, skin, names, desktop): if not isinstance(names, list): names = [names] name = "<embedded-in-'%s'>" % screen.__class__.__name__ # try all skins, first existing one have priority global dom_screens for n in names: myscreen, path = dom_screens.get(n, (None,None)) if myscreen is not None: # use this name for debug output name = n break # otherwise try embedded skin if myscreen is None: myscreen = getattr(screen, "parsedSkin", None) # try uncompiled embedded skin if myscreen is None and getattr(screen, "skin", None): print "Looking for embedded skin" skin = screen.skin if (isinstance(skin, tuple)): # for now skin = skin[0] myscreen = screen.parsedSkin = xml.etree.cElementTree.fromstring(skin) #assert myscreen is not None, "no skin for screen '" + repr(names) + "' found!" if myscreen is None: print "No skin to read..." emptySkin = "<screen></screen>" myscreen = screen.parsedSkin = xml.etree.cElementTree.fromstring(emptySkin) screen.skinAttributes = [ ] skin_path_prefix = getattr(screen, "skin_path", path) collectAttributes(screen.skinAttributes, myscreen, skin_path_prefix, ignore=["name"]) screen.additionalWidgets = [ ] screen.renderer = [ ] visited_components = set() # now walk all widgets for widget in myscreen.findall("widget"): get_attr = widget.attrib.get # ok, we either have 1:1-mapped widgets ('old style'), or 1:n-mapped # widgets (source->renderer). wname = get_attr('name') wsource = get_attr('source') if wname is None and wsource is None: print "widget has no name and no source!" continue if wname: #print "Widget name=", wname visited_components.add(wname) # get corresponding 'gui' object try: attributes = screen[wname].skinAttributes = [ ] except: raise SkinError("component with name '" + wname + "' was not found in skin of screen '" + name + "'!") #print "WARNING: component with name '" + wname + "' was not found in skin of screen '" + name + "'!" | ac65d1659e41f6a0153f32ba8d61ca77bb63cade /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6652/ac65d1659e41f6a0153f32ba8d61ca77bb63cade/skin.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
26827,
12,
9252,
16,
18705,
16,
1257,
16,
21304,
4672,
309,
486,
1549,
12,
1973,
16,
666,
4672,
1257,
273,
306,
1973,
65,
225,
508,
273,
3532,
20722,
17,
267,
6627,
9,
87,
28533,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
26827,
12,
9252,
16,
18705,
16,
1257,
16,
21304,
4672,
309,
486,
1549,
12,
1973,
16,
666,
4672,
1257,
273,
306,
1973,
65,
225,
508,
273,
3532,
20722,
17,
267,
6627,
9,
87,
28533,
... |
self.assertRaises(ValueError, u"%c".__mod__, (sys.maxunicode+1,)) | self.assertRaises(OverflowError, u"%c".__mod__, (sys.maxunicode+1,)) | def test_formatting(self): string_tests.MixinStrUnicodeUserStringTest.test_formatting(self) # Testing Unicode formatting strings... self.assertEqual(u"%s, %s" % (u"abc", "abc"), u'abc, abc') self.assertEqual(u"%s, %s, %i, %f, %5.2f" % (u"abc", "abc", 1, 2, 3), u'abc, abc, 1, 2.000000, 3.00') self.assertEqual(u"%s, %s, %i, %f, %5.2f" % (u"abc", "abc", 1, -2, 3), u'abc, abc, 1, -2.000000, 3.00') self.assertEqual(u"%s, %s, %i, %f, %5.2f" % (u"abc", "abc", -1, -2, 3.5), u'abc, abc, -1, -2.000000, 3.50') self.assertEqual(u"%s, %s, %i, %f, %5.2f" % (u"abc", "abc", -1, -2, 3.57), u'abc, abc, -1, -2.000000, 3.57') self.assertEqual(u"%s, %s, %i, %f, %5.2f" % (u"abc", "abc", -1, -2, 1003.57), u'abc, abc, -1, -2.000000, 1003.57') if not sys.platform.startswith('java'): self.assertEqual(u"%r, %r" % (u"abc", "abc"), u"u'abc', 'abc'") self.assertEqual(u"%(x)s, %(y)s" % {'x':u"abc", 'y':"def"}, u'abc, def') self.assertEqual(u"%(x)s, %(\xfc)s" % {'x':u"abc", u'\xfc':"def"}, u'abc, def') | 44f527fea4c73038322c7c6647e20e47c2ccdd88 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/44f527fea4c73038322c7c6647e20e47c2ccdd88/test_unicode.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
2139,
1787,
12,
2890,
4672,
533,
67,
16341,
18,
14439,
1585,
16532,
1299,
780,
4709,
18,
3813,
67,
2139,
1787,
12,
2890,
13,
468,
7766,
310,
9633,
10407,
2064,
2777,
365,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
2139,
1787,
12,
2890,
4672,
533,
67,
16341,
18,
14439,
1585,
16532,
1299,
780,
4709,
18,
3813,
67,
2139,
1787,
12,
2890,
13,
468,
7766,
310,
9633,
10407,
2064,
2777,
365,
18,
... |
poolable = have_pysqlite and sqlite_version >= 30301 | poolable = have_pysqlite and os.name == 'nt' and sqlite_version >= 30301 | def to_sql(cls, table): return _to_sql(table) | 7f64c451e6657945d130e677d6df5df376785f48 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/7f64c451e6657945d130e677d6df5df376785f48/sqlite_backend.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
358,
67,
4669,
12,
6429,
16,
1014,
4672,
327,
389,
869,
67,
4669,
12,
2121,
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,
... | [
1,
1,
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,
358,
67,
4669,
12,
6429,
16,
1014,
4672,
327,
389,
869,
67,
4669,
12,
2121,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
support.verbose = old_verbose | def test_main(verbose=False): if skip_expected: raise unittest.SkipTest("No SSL support") if support.verbose: plats = { 'Linux': platform.linux_distribution, 'Mac': platform.mac_ver, 'Windows': platform.win32_ver, } for name, func in plats.items(): plat = func() if plat and plat[0]: plat = '%s %r' % (name, plat) break else: plat = repr(platform.platform()) print("test_ssl: testing with %r %r" % (ssl.OPENSSL_VERSION, ssl.OPENSSL_VERSION_INFO)) print(" under %s" % plat) for filename in [ CERTFILE, SVN_PYTHON_ORG_ROOT_CERT, BYTES_CERTFILE, ONLYCERT, ONLYKEY, BYTES_ONLYCERT, BYTES_ONLYKEY, BADCERT, BADKEY, EMPTYCERT]: if not os.path.exists(filename): raise support.TestFailed("Can't read certificate file %r" % filename) tests = [ContextTests, BasicSocketTests] if support.is_resource_enabled('network'): tests.append(NetworkedTests) if _have_threads: thread_info = support.threading_setup() if thread_info and support.is_resource_enabled('network'): tests.append(ThreadedTests) old_verbose = support.verbose try: support.verbose = True support.run_unittest(*tests) finally: support.verbose = old_verbose if _have_threads: support.threading_cleanup(*thread_info) | c48ada47c892b16a90ed478ce9293fad08bbe836 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12029/c48ada47c892b16a90ed478ce9293fad08bbe836/test_ssl.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
5254,
12,
11369,
33,
8381,
4672,
309,
2488,
67,
3825,
30,
1002,
2836,
3813,
18,
6368,
4709,
2932,
2279,
7419,
2865,
7923,
225,
309,
2865,
18,
11369,
30,
886,
2323,
273,
288,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5254,
12,
11369,
33,
8381,
4672,
309,
2488,
67,
3825,
30,
1002,
2836,
3813,
18,
6368,
4709,
2932,
2279,
7419,
2865,
7923,
225,
309,
2865,
18,
11369,
30,
886,
2323,
273,
288,
... | |
self.assertTrue((got == expected).all()) | maxdiff = numpy.abs(numpy.max(got - expected)) maxdiffrel = numpy.abs(numpy.max(diff/got)) if (maxdiff > 0): print "maxdiff " + str(maxdiff) print "maxdiffrel " + str(maxdiffrel) self.assertTrue((diff == 0).all()) | def _comp(self, imagename, mode, outfile, expected, epsilon, polithresh=''): immath(imagename=imagename, outfile=outfile, mode=mode, polithresh=polithresh) self.assertTrue(os.path.exists(outfile)) ia.open(outfile) got = ia.getchunk() ia.done() diff = expected - got if (epsilon == 0): self.assertTrue((got == expected).all()) else: self.assertTrue((numpy.abs(diff)/got < epsilon).all()) | b4127a7c97cca4ccf8139b5fd2a1953bd6e56824 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2098/b4127a7c97cca4ccf8139b5fd2a1953bd6e56824/test_immath.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2919,
12,
2890,
16,
8902,
1069,
16,
1965,
16,
8756,
16,
2665,
16,
12263,
16,
2952,
483,
1955,
2218,
11,
4672,
709,
15949,
12,
15374,
1069,
33,
15374,
1069,
16,
8756,
33,
26050,
16... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2919,
12,
2890,
16,
8902,
1069,
16,
1965,
16,
8756,
16,
2665,
16,
12263,
16,
2952,
483,
1955,
2218,
11,
4672,
709,
15949,
12,
15374,
1069,
33,
15374,
1069,
16,
8756,
33,
26050,
16... |
logging.info("Caffeine has detected that the process '" + proc + "' is running, and will auto-activate") self.setActivated(True) self.preventedForProcess = True | if self.preventedForProcess or not self.getActivated(): logging.info("Caffeine has detected that the process '" + proc + "' is running, and will auto-activate") self.setActivated(True) self.preventedForProcess = True else: logging.info("Caffeine has detected that the process '"+ proc + "' is running, but will NOT auto-activate"+ " as Caffeine has already been activated for a different"+ " reason.") | def _check_for_process(self): activate = False for proc in self.ProcMan.get_process_list(): if utils.isProcessRunning(proc): activate = True logging.info("Caffeine has detected that the process '" + proc + "' is running, and will auto-activate") self.setActivated(True) | d5c757b1e653ea388747f0c001fe995367c777f4 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7152/d5c757b1e653ea388747f0c001fe995367c777f4/core.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1893,
67,
1884,
67,
2567,
12,
2890,
4672,
10235,
273,
1083,
364,
5418,
316,
365,
18,
15417,
5669,
18,
588,
67,
2567,
67,
1098,
13332,
309,
2990,
18,
291,
2227,
7051,
12,
9381,
467... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1893,
67,
1884,
67,
2567,
12,
2890,
4672,
10235,
273,
1083,
364,
5418,
316,
365,
18,
15417,
5669,
18,
588,
67,
2567,
67,
1098,
13332,
309,
2990,
18,
291,
2227,
7051,
12,
9381,
467... |
network_info["port"] = int(port) | port = int(port) | def onCommandServer(e): port = 6667 if len(e.args): host = e.args[0] if ':' in host: host, port = host.rsplit(':', 1) network_info["port"] = int(port) elif len(e.args) > 1: port = e.args[1] network_info["port"] = int(port) else: host = None if 'm' in e.switches: network = None else: network = e.network server(server=host, port=port, network=network, connect='o' not in e.switches) | 9a996b755903024766b9e063f7a5f7475a7c42e7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10693/9a996b755903024766b9e063f7a5f7475a7c42e7/irc_script.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
2189,
2081,
12,
73,
4672,
1756,
273,
1666,
6028,
27,
225,
309,
562,
12,
73,
18,
1968,
4672,
1479,
273,
425,
18,
1968,
63,
20,
65,
309,
3921,
316,
1479,
30,
1479,
16,
1756,
273,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
2189,
2081,
12,
73,
4672,
1756,
273,
1666,
6028,
27,
225,
309,
562,
12,
73,
18,
1968,
4672,
1479,
273,
425,
18,
1968,
63,
20,
65,
309,
3921,
316,
1479,
30,
1479,
16,
1756,
273,
... |
If you type next rubik.solve(state) and wait a long time, SAGE will return the correct answer, 'R*U'. You can also check this another (but similar) way using the \code{word_problem} method (eg, G = rubik.group(); | sage: rubik.solve(state) 'R*U' You can also check this another (but similar) way using the \code{word_problem} method (eg, G = rubik.group(); | def solve(self,state): r""" Solves the cube in the \code{state}, given as a dictionary as in \code{legal}. This uses GAP's \code{EpimorphismFromFreeGroup} and \code{PreImagesRepresentative}. | 13312bf3cf559432f574e5759a133255677df6ba /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9417/13312bf3cf559432f574e5759a133255677df6ba/cubegroup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12439,
12,
2890,
16,
2019,
4672,
436,
8395,
348,
355,
3324,
326,
18324,
316,
326,
521,
710,
95,
2019,
5779,
864,
487,
279,
3880,
487,
316,
521,
710,
95,
2013,
5496,
225,
1220,
4692,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12439,
12,
2890,
16,
2019,
4672,
436,
8395,
348,
355,
3324,
326,
18324,
316,
326,
521,
710,
95,
2019,
5779,
864,
487,
279,
3880,
487,
316,
521,
710,
95,
2013,
5496,
225,
1220,
4692,
61... |
return 1 | return True | def _do_cmp(f1, f2): bufsize = BUFSIZE fp1 = open(f1, 'rb') fp2 = open(f2, 'rb') while 1: b1 = fp1.read(bufsize) b2 = fp2.read(bufsize) if b1 != b2: return 0 if not b1: return 1 | 96a007422f48d730fd5c8fff2baba32db87faf76 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/96a007422f48d730fd5c8fff2baba32db87faf76/filecmp.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2896,
67,
9625,
12,
74,
21,
16,
284,
22,
4672,
1681,
1467,
273,
10937,
42,
4574,
4253,
21,
273,
1696,
12,
74,
21,
16,
296,
6731,
6134,
4253,
22,
273,
1696,
12,
74,
22,
16,
296... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2896,
67,
9625,
12,
74,
21,
16,
284,
22,
4672,
1681,
1467,
273,
10937,
42,
4574,
4253,
21,
273,
1696,
12,
74,
21,
16,
296,
6731,
6134,
4253,
22,
273,
1696,
12,
74,
22,
16,
296... |
if self.volunteer: | if self.volunteer and self.volunteer.accepted is not None: | def is_volunteer(self): if self.volunteer: return self.volunteer.accepted return False | da0bb769ef6aab4dbdf03b8f51ec01369dba39ee /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12856/da0bb769ef6aab4dbdf03b8f51ec01369dba39ee/domain.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
353,
67,
15416,
318,
736,
264,
12,
2890,
4672,
309,
365,
18,
15416,
318,
736,
264,
471,
365,
18,
15416,
318,
736,
264,
18,
23847,
353,
486,
599,
30,
327,
365,
18,
15416,
318,
736,
26... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
353,
67,
15416,
318,
736,
264,
12,
2890,
4672,
309,
365,
18,
15416,
318,
736,
264,
471,
365,
18,
15416,
318,
736,
264,
18,
23847,
353,
486,
599,
30,
327,
365,
18,
15416,
318,
736,
26... |
pyobj.Actor = sub = GTD('urn:test', 'IfElseActor')(None).pyclass() klass = 'myclass' name = 'whatever' sub.Gui = 'foo' sub.Parameter = 'bar' sub.set_attribute_class(klass) sub.set_attribute_name(name) | ps = ParsedSoap(MSG) pyobj0 = ps.Parse(pyobj.typecode) sub0 = pyobj0.Actor self.failUnless(sub0.get_attribute_class() == klass, 'bad attribute class') self.failUnless(sub0.get_attribute_name() == name, 'bad attribute name') pyobj.Actor = sub1 = GTD('urn:test', 'IfElseActor')(None).pyclass() sub1.Gui = 'foo' sub1.Parameter = 'bar' sub1.set_attribute_class(klass) sub1.set_attribute_name(name) | def test_local_type_substitution(self): self.types_module pyobj = GED('urn:test', 'test').pyclass() # derived type pyobj.Actor = sub = GTD('urn:test', 'IfElseActor')(None).pyclass() klass = 'myclass' name = 'whatever' | 217e56e70a75a35c110e489a17e27fc4358a676f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/217e56e70a75a35c110e489a17e27fc4358a676f/test_DerivedTypes.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
3729,
67,
723,
67,
1717,
14278,
12,
2890,
4672,
365,
18,
2352,
67,
2978,
2395,
2603,
273,
611,
2056,
2668,
321,
30,
3813,
2187,
296,
3813,
16063,
2074,
1106,
1435,
468,
10379,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3729,
67,
723,
67,
1717,
14278,
12,
2890,
4672,
365,
18,
2352,
67,
2978,
2395,
2603,
273,
611,
2056,
2668,
321,
30,
3813,
2187,
296,
3813,
16063,
2074,
1106,
1435,
468,
10379,
... |
mobjs = white_space.split(mylines[pos]) for i in mobjs: newarray.append(i) | mobjs = white_space.split(myline) cur_array += mobjs | def parse_spec(mylines): myspec={} pos=0 colon=re.compile(":") trailing_comment=re.compile("#.*\n") newline=re.compile("\n") leading_white_space=re.compile("^\s+") white_space=re.compile("\s+") while pos<len(mylines): # Force the line to be clean # Remove Comments ( anything following # ) mylines[pos]=trailing_comment.sub("",mylines[pos]) # Remove newline character \n mylines[pos]=newline.sub("",mylines[pos]) # Remove leading white space mylines[pos]=leading_white_space.sub("",mylines[pos]) # Skip any blank lines if len(mylines[pos])<=1: pos += 1 continue msearch=colon.search(mylines[pos]) # If semicolon found assume its a new key # This may cause problems if : are used for key values but works for now if msearch: # Split on the first semicolon creating two strings in the array mobjs mobjs = colon.split(mylines[pos],1) # Start a new array using the first element of mobjs newarray=[mobjs[0]] if mobjs[1]: # split on white space creating additional array elements subarray=mobjs[1].split() if len(subarray)>0: if len(subarray)==1: # Store as a string if only one element is found. # this is to keep with original catalyst behavior # eventually this may go away if catalyst just works # with arrays. newarray.append(subarray[0]) else: newarray.append(mobjs[1].split()) # Else add on to the last key we were working on else: mobjs = white_space.split(mylines[pos]) for i in mobjs: newarray.append(i) pos += 1 if len(newarray)==2: myspec[newarray[0]]=newarray[1] else: myspec[newarray[0]]=newarray[1:] for x in myspec.keys(): # Convert myspec[x] to an array of strings newarray=[] if type(myspec[x])!=types.StringType: for y in myspec[x]: if type(y)==types.ListType: newarray.append(y[0]) if type(y)==types.StringType: newarray.append(y) myspec[x]=newarray # Delete empty key pairs if len(myspec[x])==0: print "\n\tWARNING: No value set for key: "+x print "\tdeleting key: "+x+"\n" del myspec[x] #print myspec return myspec | dbce1700b1e7db04d685467cc36da0e0c1a84ad8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7327/dbce1700b1e7db04d685467cc36da0e0c1a84ad8/catalyst_support.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
67,
2793,
12,
4811,
3548,
4672,
312,
1900,
705,
12938,
949,
33,
20,
13336,
33,
266,
18,
11100,
2932,
2773,
13,
7341,
67,
3469,
33,
266,
18,
11100,
2932,
7,
4509,
64,
82,
7923,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
67,
2793,
12,
4811,
3548,
4672,
312,
1900,
705,
12938,
949,
33,
20,
13336,
33,
266,
18,
11100,
2932,
2773,
13,
7341,
67,
3469,
33,
266,
18,
11100,
2932,
7,
4509,
64,
82,
7923,
... |
absPath = appProt+'://'+self.convertToUnixPath(os.path.normpath(os.path.join(\ os.path.dirname(appFilename), modFilename))) else: absPath = name + ModuleModel.ext | absPath = appProt+'://'+self.convertToUnixPath(os.path.normpath( os.path.join(os.path.dirname(appFilename), modFilename))) else: absPath = self.modules[name][2] | def moduleFilename(self, name): """ Return absolute filename of the given module """ if not self.modules.has_key(name): raise 'No such module in application: '+name | c274a0d248176849f9cee500eb808dacee91824d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/c274a0d248176849f9cee500eb808dacee91824d/PythonEditorModels.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1605,
5359,
12,
2890,
16,
508,
4672,
3536,
2000,
4967,
1544,
434,
326,
864,
1605,
3536,
309,
486,
365,
18,
6400,
18,
5332,
67,
856,
12,
529,
4672,
1002,
296,
2279,
4123,
1605,
316,
252... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1605,
5359,
12,
2890,
16,
508,
4672,
3536,
2000,
4967,
1544,
434,
326,
864,
1605,
3536,
309,
486,
365,
18,
6400,
18,
5332,
67,
856,
12,
529,
4672,
1002,
296,
2279,
4123,
1605,
316,
252... |
self.assertTrue(hunk.type == HOST_HOSTNAME_REMOVE) | self.assertTrue(isinstance(hunk, HostHostnameRemoveHunk)) | def test_hostname_remove(self): a = Host() b = Host() a.hostnames = ["a"] b.hostnames = [] diff = host_diff(a, b) self.assertTrue(len(diff) > 0) for hunk in diff: self.assertTrue(hunk.type == HOST_HOSTNAME_REMOVE) | e100fe985a91dc50454e1b16bae62fa0d722a5a7 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6331/e100fe985a91dc50454e1b16bae62fa0d722a5a7/ndifftest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
10358,
67,
4479,
12,
2890,
4672,
279,
273,
4893,
1435,
324,
273,
4893,
1435,
279,
18,
2564,
1973,
273,
8247,
69,
11929,
324,
18,
2564,
1973,
273,
5378,
3122,
273,
1479,
67,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
10358,
67,
4479,
12,
2890,
4672,
279,
273,
4893,
1435,
324,
273,
4893,
1435,
279,
18,
2564,
1973,
273,
8247,
69,
11929,
324,
18,
2564,
1973,
273,
5378,
3122,
273,
1479,
67,
5... |
'nooutput', | >>> def f(x): | 3a3817f506801e4a1e62d8cd52e1c8aa0feb2993 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/3a3817f506801e4a1e62d8cd52e1c8aa0feb2993/doctest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4080,
1652,
284,
12,
92,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4080,
1652,
284,
12,
92,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... | |
def __init__(self, live_time_program, verbose = False): | def __init__(self, live_time_program, search = "excesspower", verbose = False): | def __init__(self, live_time_program, verbose = False): """ Compute and record some summary information about the database. Call this after all the data has been inserted, and before you want any of this information. """ | d91a25c77854f6b019c6271bea25c100e6b4609f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5758/d91a25c77854f6b019c6271bea25c100e6b4609f/SnglBurstUtils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
8429,
67,
957,
67,
12890,
16,
1623,
273,
315,
338,
614,
12238,
3113,
3988,
273,
1083,
4672,
3536,
8155,
471,
1409,
2690,
4916,
1779,
2973,
326,
2063,
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,
1001,
2738,
972,
12,
2890,
16,
8429,
67,
957,
67,
12890,
16,
1623,
273,
315,
338,
614,
12238,
3113,
3988,
273,
1083,
4672,
3536,
8155,
471,
1409,
2690,
4916,
1779,
2973,
326,
2063,
18,
... |
if 'megacache' in config and config['megacache']: | if config['megacache']: | def __init__(self, make_upload, downloader, choker, numpieces, totalup, config, ratelimiter, merkle_torrent, sched = None, coordinator = None, helper = None, mylistenport = None, use_g2g = False, infohash=None): self.downloader = downloader self.make_upload = make_upload self.choker = choker self.numpieces = numpieces self.config = config self.ratelimiter = ratelimiter self.rate_capped = False self.sched = sched self.totalup = totalup self.rate_capped = False self.connections = {} self.external_connection_made = 0 self.merkle_torrent = merkle_torrent self.use_g2g = use_g2g # 2fastbt_ self.coordinator = coordinator self.helper = helper self.round = 0 self.mylistenport = mylistenport self.infohash = infohash self.overlay_enabled = 0 if 'overlay' in self.config: self.overlay_enabled = self.config['overlay'] print >>sys.stderr,"connecter: Enabling/Disabling overlay",self.overlay_enabled self.ut_pex_enabled = 0 if 'ut_pex_max_addrs_from_peer' in self.config: self.ut_pex_max_addrs_from_peer = self.config['ut_pex_max_addrs_from_peer'] self.ut_pex_enabled = self.ut_pex_max_addrs_from_peer > 0 self.ut_pex_previous_conns = [] # last value of 'added' field for all peers if DEBUG: if self.ut_pex_enabled: print >>sys.stderr,"connecter: Enabling uTorrent PEX",self.ut_pex_max_addrs_from_peer else: print >>sys.stderr,"connecter: Disabling uTorrent PEX" | 78f849b14d073cf9a3f39184b70c3b3ce2e74b51 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9686/78f849b14d073cf9a3f39184b70c3b3ce2e74b51/Connecter.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1221,
67,
6327,
16,
28122,
16,
462,
601,
264,
16,
818,
31016,
16,
2078,
416,
16,
642,
16,
15183,
292,
4340,
16,
30235,
67,
13039,
547,
16,
23964,
273,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1221,
67,
6327,
16,
28122,
16,
462,
601,
264,
16,
818,
31016,
16,
2078,
416,
16,
642,
16,
15183,
292,
4340,
16,
30235,
67,
13039,
547,
16,
23964,
273,
... |
return self.open_https(newurl) | return self.open_https(newurl, data) | def retry_https_basic_auth(self, url, realm, data=None): host, selector = splithost(url) i = host.find('@') + 1 host = host[i:] user, passwd = self.get_user_passwd(host, realm, i) if not (user or passwd): return None host = user + ':' + passwd + '@' + host newurl = '//' + host + selector return self.open_https(newurl) | b04c3ea26c2b7a16aa28a9a9ae2f16482c17396d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b04c3ea26c2b7a16aa28a9a9ae2f16482c17396d/urllib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3300,
67,
4528,
67,
13240,
67,
1944,
12,
2890,
16,
880,
16,
11319,
16,
501,
33,
7036,
4672,
1479,
16,
3451,
273,
6121,
483,
669,
12,
718,
13,
277,
273,
1479,
18,
4720,
2668,
36,
6134... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4528,
67,
13240,
67,
1944,
12,
2890,
16,
880,
16,
11319,
16,
501,
33,
7036,
4672,
1479,
16,
3451,
273,
6121,
483,
669,
12,
718,
13,
277,
273,
1479,
18,
4720,
2668,
36,
6134... |
} def SaveSubtopic(self, topic_num, subtopic_num, subtopic_name, subtopic_description) : """ $DB->Exec("UPDATE subtopic SET subtopic_name=" . wsq($subtopic_name) . ", subtopic_description=" . wsq($subtopic_description) . " WHERE topic_num=$topic_num AND subtopic_num=$subtopic_num") }""" pass | """ pass def SaveSubtopic(self, topic_num, subtopic_num, subtopic_name, subtopic_description) : """ $DB->Exec("UPDATE subtopic SET subtopic_name=" . wsq($subtopic_name) . ", subtopic_description=" . wsq($subtopic_description) . " WHERE topic_num=$topic_num AND subtopic_num=$subtopic_num") }""" pass | def Subtopics(self, topic_num) : my %subtopics = () my $sql = "SELECT topic.topic_num, topic_name, topic_description, subtopic_num, subtopic_name, subtopic_description from subtopic, topic WHERE subtopic.topic_num = topic.topic_num" $sql .= " AND topic.topic_num = $topic_num" if ($topic_num) my $recordset = $DB->Recordset($sql) while (@row = $recordset->fetchrow) { $topicnum = strip($row[0]) $topicname = strip($row[1]) $topicdesc = strip($row[2]) $subtopicnum = strip($row[3]) $subtopicname = strip($row[4]) $subtopicdesc = strip($row[5]) $key = $topicnum . '.' . $subtopicnum $subtopics{$key}{topicnum} = $topicnum $subtopics{$key}{topicname} = $topicname $subtopics{$key}{topicdesc} = $topicdesc $subtopics{$key}{num} = $subtopicnum $subtopics{$key}{name} = $subtopicname $subtopics{$key}{description} = $subtopicdesc } return %subtopics | 29a6ea4f096502e912843ce3e87d9bd38a4b7e4a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1319/29a6ea4f096502e912843ce3e87d9bd38a4b7e4a/DataLayer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2592,
17905,
12,
2890,
16,
3958,
67,
2107,
13,
294,
3399,
738,
1717,
17905,
273,
1832,
3399,
271,
4669,
273,
315,
4803,
3958,
18,
10476,
67,
2107,
16,
3958,
67,
529,
16,
3958,
67,
3384... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2592,
17905,
12,
2890,
16,
3958,
67,
2107,
13,
294,
3399,
738,
1717,
17905,
273,
1832,
3399,
271,
4669,
273,
315,
4803,
3958,
18,
10476,
67,
2107,
16,
3958,
67,
529,
16,
3958,
67,
3384... |
if not cellWidget.label.hasScaledContents(): | if (not cellWidget.label.hasScaledContents() and not cellWidget._playing): | def updateStatus(self, info): """ updateStatus(info: tuple) -> None Updates the status of the button based on the input info """ (sheet, row, col, cellWidget) = info if cellWidget: if not cellWidget.label.hasScaledContents(): self.setEnabled(True) originalWidth = cellWidget.originalPix.width() self.setValue(cellWidget.label.pixmap().width()*100/originalWidth) else: self.setEnabled(False) self.setValue(100) | d96b63cb396a2915af62ff39127f0fc0aa595749 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6341/d96b63cb396a2915af62ff39127f0fc0aa595749/imageviewer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
1482,
12,
2890,
16,
1123,
4672,
3536,
1089,
1482,
12,
1376,
30,
3193,
13,
317,
599,
15419,
326,
1267,
434,
326,
3568,
2511,
603,
326,
810,
1123,
225,
3536,
261,
8118,
16,
1027,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1482,
12,
2890,
16,
1123,
4672,
3536,
1089,
1482,
12,
1376,
30,
3193,
13,
317,
599,
15419,
326,
1267,
434,
326,
3568,
2511,
603,
326,
810,
1123,
225,
3536,
261,
8118,
16,
1027,
1... |
combo.append_text(_("Scroll wheel changes song;\n" "Shift and scroll adjusts volume")) | combo.append_text(_("Scroll wheel changes song\n" "Shift and scroll wheel adjusts volume")) | def __init__(self, activator, watcher): super(Preferences, self).__init__() self.set_border_width(12) self.set_title(_("Tray Icon Preferences") + " - Quod Libet") vbox = gtk.VBox(spacing=12) | da87138270a0dcb7d6dba339b4163c561804aefd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4764/da87138270a0dcb7d6dba339b4163c561804aefd/trayicon.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
5981,
639,
16,
9527,
4672,
2240,
12,
12377,
16,
365,
2934,
972,
2738,
972,
1435,
365,
18,
542,
67,
8815,
67,
2819,
12,
2138,
13,
365,
18,
542,
67,
2649... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
5981,
639,
16,
9527,
4672,
2240,
12,
12377,
16,
365,
2934,
972,
2738,
972,
1435,
365,
18,
542,
67,
8815,
67,
2819,
12,
2138,
13,
365,
18,
542,
67,
2649... |
raise ValueError("Expected frequency letters %s" + " do not match observed %s" % (e_freq_table.keys(), obs_freq.keys() - [gap_char])) | raise ValueError("Expected frequency letters %s " "do not match observed %s" \ % (e_freq_table.keys(), obs_freq.keys() - [gap_char])) | def _get_column_info_content(self, obs_freq, e_freq_table, log_base, random_expected): """Calculate the information content for a column. | 3ca20d0ac01b7b9601c932ff40960f12b94dbb48 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7167/3ca20d0ac01b7b9601c932ff40960f12b94dbb48/AlignInfo.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
67,
2827,
67,
1376,
67,
1745,
12,
2890,
16,
7160,
67,
10212,
16,
425,
67,
10212,
67,
2121,
16,
613,
67,
1969,
16,
2744,
67,
3825,
4672,
3536,
8695,
326,
1779,
913,
364,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
67,
2827,
67,
1376,
67,
1745,
12,
2890,
16,
7160,
67,
10212,
16,
425,
67,
10212,
67,
2121,
16,
613,
67,
1969,
16,
2744,
67,
3825,
4672,
3536,
8695,
326,
1779,
913,
364,
279... |
self.immediate = True | def vobuRead(self, src): """Invoked by the source element after reading a complete VOBU.""" | a5d2c683afc915429bd5a22cf8058cdcd70f657a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5222/a5d2c683afc915429bd5a22cf8058cdcd70f657a/manager.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
331,
947,
89,
1994,
12,
2890,
16,
1705,
4672,
3536,
26215,
635,
326,
1084,
930,
1839,
6453,
279,
3912,
776,
51,
3000,
12123,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
331,
947,
89,
1994,
12,
2890,
16,
1705,
4672,
3536,
26215,
635,
326,
1084,
930,
1839,
6453,
279,
3912,
776,
51,
3000,
12123,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... | |
self.error(row + 1, 1, ERROR_INVALID_SCHOOL_YEAR) | self.error(row + 2, 1, ERROR_INVALID_SCHOOL_YEAR) | def import_school_timetable(self, sh, row): num_errors = len(self.errors) data = {} data['title'] = self.getRequiredTextFromCell(sh, row, 1) data['__name__'] = self.getRequiredTextFromCell(sh, row+1, 1) data['school_year'] = self.getRequiredTextFromCell(sh, row+2, 1) data['model'] = self.getRequiredTextFromCell(sh, row+3, 1) if num_errors < len(self.errors): return | 48da1590ea5d360d59116b4b1dfa5088bb935dd9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7127/48da1590ea5d360d59116b4b1dfa5088bb935dd9/importer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1930,
67,
28204,
1371,
67,
8584,
278,
429,
12,
2890,
16,
699,
16,
1027,
4672,
818,
67,
4324,
273,
562,
12,
2890,
18,
4324,
13,
501,
273,
2618,
501,
3292,
2649,
3546,
273,
365,
18,
58... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1930,
67,
28204,
1371,
67,
8584,
278,
429,
12,
2890,
16,
699,
16,
1027,
4672,
818,
67,
4324,
273,
562,
12,
2890,
18,
4324,
13,
501,
273,
2618,
501,
3292,
2649,
3546,
273,
365,
18,
58... |
if event.eventtype() == 'bannedfromchan': if len(event.arguments()) < 1: self.error(1, 'length of arguments should be greater than 0 for a '+event.eventtype()+' event', debug=True) return for bridge in self.bridges: if connection.server != bridge.irc_server or event.arguments()[0].lower() != bridge.irc_room: continue if event.target() == self.nickname: self.error(say_levels.error, 'the nickname "'+event.target()+'" is banned from the IRC chan of bridge "'+str(bridge)+'"') raise Exception('[Error] the nickname "'+event.target()+'" is banned from the IRC chan of bridge "'+str(bridge)+'"') else: try: banned = bridge.get_participant(event.target()) if banned.irc_connection != 'bannedfromchan': banned.irc_connection = 'bannedfromchan' self.error(2, debug_str, debug=True) bridge.say(say_levels.warning, 'the nickname "'+event.target()+'" is banned from the IRC chan', log=True) else: self.error(1, 'ignoring '+event.eventtype(), debug=True) except Bridge.NoSuchParticipantException: self.error(1, 'no such participant. WTF ?', debug=True) return return | def _irc_event_handler(self, connection, event): """[Internal] Manage IRC events""" # Answer ping if event.eventtype() == 'ping': connection.pong(connection.get_server_name()) return # Events we always want to ignore if 'all' in event.eventtype() or 'motd' in event.eventtype() or event.eventtype() in ['nicknameinuse', 'nickcollision', 'erroneusnickname']: return if event.eventtype() in ['pong', 'privnotice', 'ctcp', 'nochanmodes', 'notexttosend', 'currenttopic', 'topicinfo', '328', 'pubnotice', '042', 'umode', 'welcome', 'yourhost', 'created', 'myinfo', 'featurelist', 'luserclient', 'luserop', 'luserchannels', 'luserme', 'n_local', 'n_global', 'endofnames', 'luserunknown', 'luserconns']: self.error(1, 'ignoring IRC '+event.eventtype(), debug=True) return nickname = None if event.source() and '!' in event.source(): nickname = event.source().split('!')[0] # A string representation of the event event_str = '\nconnection='+connection.__str__()+'\neventtype='+event.eventtype()+'\nsource='+repr(event.source())+'\ntarget='+repr(event.target())+'\narguments='+repr(event.arguments()) debug_str = 'Received IRC event.'+event_str printed_event = False if event.eventtype() in ['pubmsg', 'action', 'privmsg', 'quit', 'part', 'nick', 'kick']: if nickname == None: return handled = False if event.eventtype() in ['quit', 'part'] and nickname == self.nickname: return if event.eventtype() in ['quit', 'part', 'nick', 'kick']: if connection.real_nickname != self.nickname: self.error(1, 'ignoring IRC '+event.eventtype()+' not received on bot connection', debug=True) return else: self.error(2, debug_str, debug=True) printed_event = True if event.eventtype() == 'kick' and len(event.arguments()) < 1: self.error(say_levels.debug, 'at least 1 argument is needed for a '+event.eventtype()+' event', no_debug_add=event_str) return if event.eventtype() in ['pubmsg', 'action']: if connection.real_nickname != self.nickname: self.error(1, 'ignoring IRC '+event.eventtype()+' not received on bot connection', debug=True) return if nickname == self.nickname: self.error(1, 'ignoring IRC '+event.eventtype()+' sent by self', debug=True) return # TODO: lock self.bridges for thread safety for bridge in self.bridges: if connection.server != bridge.irc_server: continue try: from_ = bridge.get_participant(nickname) except Bridge.NoSuchParticipantException: continue # Private message if event.eventtype() == 'privmsg': if event.target() == None: return try: to_ = bridge.get_participant(event.target().split('!')[0]) self.error(2, debug_str, debug=True) from_.say_on_xmpp_to(to_.nickname, event.arguments()[0]) return except Bridge.NoSuchParticipantException: if event.target().split('!')[0] == self.nickname: # Message is for the bot self.error(2, debug_str, debug=True) connection.privmsg(from_.nickname, self.respond(event.arguments()[0])) return else: continue # kick handling if event.eventtype() == 'kick': if event.target().lower() == bridge.irc_room: try: kicked = bridge.get_participant(event.arguments()[0]) if isinstance(kicked.irc_connection, irclib.ServerConnection): kicked.irc_connection.join(bridge.irc_room) else: if len(event.arguments()) > 1: bridge.remove_participant('irc', kicked.nickname, 'Kicked by '+nickname+' with reason: '+event.arguments()[1]) else: bridge.remove_participant('irc', kicked.nickname, 'Kicked by '+nickname+' (no reason was given)') return except Bridge.NoSuchParticipantException: self.error(say_levels.debug, 'a participant that was not here has been kicked ? WTF ?', no_debug_add=event_str) return else: continue # Leaving events if event.eventtype() == 'quit' or event.eventtype() == 'part' and event.target().lower() == bridge.irc_room: if len(event.arguments()) > 0: leave_message = event.arguments()[0] elif event.eventtype() == 'quit': leave_message = 'Left server.' elif event.eventtype() == 'part': leave_message = 'Left channel.' else: leave_message = '' bridge.remove_participant('irc', from_.nickname, leave_message) handled = True continue # Nickname change if event.eventtype() == 'nick': from_.change_nickname(event.target(), 'xmpp') handled = True continue # Chan message if event.eventtype() in ['pubmsg', 'action']: if bridge.irc_room == event.target().lower() and bridge.irc_server == connection.server: self.error(2, debug_str, debug=True) message = event.arguments()[0] if event.eventtype() == 'action': action = True else: action = False from_.say_on_xmpp(message, action=action) return else: continue if handled: return # Handle bannedfromchan if event.eventtype() == 'bannedfromchan': if len(event.arguments()) < 1: self.error(1, 'length of arguments should be greater than 0 for a '+event.eventtype()+' event', debug=True) return for bridge in self.bridges: if connection.server != bridge.irc_server or event.arguments()[0].lower() != bridge.irc_room: continue if event.target() == self.nickname: self.error(say_levels.error, 'the nickname "'+event.target()+'" is banned from the IRC chan of bridge "'+str(bridge)+'"') raise Exception('[Error] the nickname "'+event.target()+'" is banned from the IRC chan of bridge "'+str(bridge)+'"') else: try: banned = bridge.get_participant(event.target()) if banned.irc_connection != 'bannedfromchan': banned.irc_connection = 'bannedfromchan' self.error(2, debug_str, debug=True) bridge.say(say_levels.warning, 'the nickname "'+event.target()+'" is banned from the IRC chan', log=True) else: self.error(1, 'ignoring '+event.eventtype(), debug=True) except Bridge.NoSuchParticipantException: self.error(1, 'no such participant. WTF ?', debug=True) return return if event.eventtype() in ['disconnect', 'kill', 'error']: if len(event.arguments()) > 0 and event.arguments()[0] == 'Connection reset by peer': self.error(2, debug_str, debug=True) else: self.error(say_levels.debug, debug_str, send_to_admins=True) return if event.eventtype() in ['cannotsendtochan', 'notonchannel', 'inviteonlychan']: self.error(2, debug_str, debug=True) bridges = self.iter_bridges(irc_room=event.arguments()[0], irc_server=connection.server) if len(bridges) > 1: raise Exception, 'more than one bridge for one irc chan, WTF ?' bridge = bridges[0] if connection.real_nickname == self.nickname: bridge._join_irc_failed(event.eventtype()) else: p = bridge.get_participant(connection.real_nickname) p._close_irc_connection('') p.irc_connection = event.eventtype() return # Ignore events not received on bot connection if connection.real_nickname != self.nickname: self.error(1, 'ignoring IRC '+event.eventtype()+' not received on bridge connection', debug=True) return # Joining events if event.eventtype() in ['namreply', 'join']: if event.eventtype() == 'namreply': bridge = self.get_bridge(irc_room=event.arguments()[1].lower(), irc_server=connection.server) for nickname in re.split('(?:^[&@\+%]?|(?: [&@\+%]?)*)', event.arguments()[2].strip()): if nickname == '' or nickname == self.nickname: continue bridge.add_participant('irc', nickname) return elif event.eventtype() == 'join': bridge = self.get_bridge(irc_room=event.target().lower(), irc_server=connection.server) bridge.add_participant('irc', nickname) return # Mode event if event.eventtype() == 'mode': if len(event.arguments()) < 2: self.error(2, debug_str, debug=True) self.error(1, '2 arguments are needed for a '+event.eventtype()+' event', debug=True) return if event.arguments()[1] != self.nickname or not 'o' in event.arguments()[0]: self.error(1, 'ignoring IRC mode "'+event.arguments()[0]+'" for "'+event.arguments()[1]+'"', debug=True) return self.error(2, debug_str, debug=True) bridges = self.iter_bridges(irc_room=event.target(), irc_server=connection.server) if len(bridges) > 1: raise Exception, 'more than one bridge for one irc chan, WTF ?' bridge = bridges[0] if re.search('\+[^\-]*o', event.arguments()[0]): # bot is channel operator bridge.irc_op = True self.error(say_levels.notice, 'bot has IRC operator privileges in '+event.target()) elif re.search('\-[^\+]*o', event.arguments()[0]): # bot lost channel operator privileges if bridge.irc_op: self.error(say_levels.notice, 'bot lost IRC operator privileges in '+event.target(), send_to_admins=True) bridge.irc_op = False return # Unhandled events if not printed_event: self.error(say_levels.debug, 'The following IRC event was not handled:'+event_str+'\n', send_to_admins=True) else: self.error(1, 'event not handled', debug=True) self._send_message_to_admins(say_levels.debug, 'The following IRC event was not handled:'+event_str) | 99f4d3a822a337055af5fb73bbb4815a3735fb52 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9915/99f4d3a822a337055af5fb73bbb4815a3735fb52/bot.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
481,
71,
67,
2575,
67,
4176,
12,
2890,
16,
1459,
16,
871,
4672,
3536,
63,
3061,
65,
24247,
467,
11529,
2641,
8395,
225,
468,
21019,
10087,
309,
871,
18,
2575,
723,
1435,
422,
296,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
481,
71,
67,
2575,
67,
4176,
12,
2890,
16,
1459,
16,
871,
4672,
3536,
63,
3061,
65,
24247,
467,
11529,
2641,
8395,
225,
468,
21019,
10087,
309,
871,
18,
2575,
723,
1435,
422,
296,... | |
def execute(self, testdir = None, iterations = 1, filesize='200G'): cmd = os.path.join(self.srcdir + 'src/spew') | def execute(self, testdir = None, iterations = 1, filesize='100M'): cmd = os.path.join(self.srcdir, 'src/spew') | def execute(self, testdir = None, iterations = 1, filesize='200G'): cmd = os.path.join(self.srcdir + 'src/spew') if not testdir: testdir = self.testdir tmpfile = os.path.join(testdir, 'spew-test.%d' % os.getpid()) results = os.path.join(self.resultsdir, tmpfile) args = '-q -i %d -p random -b 2k -B 2M %s %s' % \ (iterations, filesize, tmpfile) | 8670821cf0548751769fd75344b8252a3392e195 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12268/8670821cf0548751769fd75344b8252a3392e195/spew.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1836,
12,
2890,
16,
1842,
1214,
273,
599,
16,
11316,
273,
404,
16,
14104,
2218,
6625,
49,
11,
4672,
1797,
273,
1140,
18,
803,
18,
5701,
12,
2890,
18,
4816,
1214,
16,
296,
4816,
19,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1836,
12,
2890,
16,
1842,
1214,
273,
599,
16,
11316,
273,
404,
16,
14104,
2218,
6625,
49,
11,
4672,
1797,
273,
1140,
18,
803,
18,
5701,
12,
2890,
18,
4816,
1214,
16,
296,
4816,
19,
8... |
trace ("intact") | message_focus ("UNCHANGED - left intact / not syncing") | def trace (message): if classname == trace_type and peer_object_id in trace_ids: message_verbose('TRACE>>'+message) | be959d0158ffaff6d50158269f03ba7f2c1da56f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7598/be959d0158ffaff6d50158269f03ba7f2c1da56f/RefreshPeer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2606,
261,
2150,
4672,
309,
7479,
422,
2606,
67,
723,
471,
4261,
67,
1612,
67,
350,
316,
2606,
67,
2232,
30,
883,
67,
11369,
2668,
23827,
34,
1870,
15,
2150,
13,
2,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2606,
261,
2150,
4672,
309,
7479,
422,
2606,
67,
723,
471,
4261,
67,
1612,
67,
350,
316,
2606,
67,
2232,
30,
883,
67,
11369,
2668,
23827,
34,
1870,
15,
2150,
13,
2,
-100,
-100,
-100,
... |
def compress(self, timedelta): now = datetime.datetime.now() oldNumConvs = len(self._conversations) oldConvs = self._conversations self._conversations = [ conv for conv in self._conversations if (now - conv.time) < timedelta ] newNumConvs = len(self._conversations) if oldNumConvs != newNumConvs: _moduleLogger.debug("Compressed conversations from %s to %s" % (oldNumConvs, newNumConvs)) else: _moduleLogger.debug("Did not compress, %s" % (newNumConvs)) | def compress(self, timedelta): now = datetime.datetime.now() oldNumConvs = len(self._conversations) oldConvs = self._conversations self._conversations = [ conv for conv in self._conversations if (now - conv.time) < timedelta ] newNumConvs = len(self._conversations) if oldNumConvs != newNumConvs: _moduleLogger.debug("Compressed conversations from %s to %s" % (oldNumConvs, newNumConvs)) else: _moduleLogger.debug("Did not compress, %s" % (newNumConvs)) | 4f32f7a5b10392a945a30f48891a5828af8b5395 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13096/4f32f7a5b10392a945a30f48891a5828af8b5395/conversations.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8099,
12,
2890,
16,
10661,
4672,
2037,
273,
3314,
18,
6585,
18,
3338,
1435,
1592,
2578,
442,
6904,
273,
562,
12,
2890,
6315,
591,
20494,
13,
1592,
442,
6904,
273,
365,
6315,
591,
20494,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8099,
12,
2890,
16,
10661,
4672,
2037,
273,
3314,
18,
6585,
18,
3338,
1435,
1592,
2578,
442,
6904,
273,
562,
12,
2890,
6315,
591,
20494,
13,
1592,
442,
6904,
273,
365,
6315,
591,
20494,
... | |
self.proj_text_view.show() proj_scrollwin = gtk.ScrolledWindow() proj_scrollwin.set_size_request(0, 300) | def create_projprop(self): projpane = gtk.VBox(spacing=10) projpane.set_border_width(10) self.notebook.append_page(projpane, gtk.Label('Coordinate System')) | 0a9f3291528240d019f1755ce071bd15e36e112d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11090/0a9f3291528240d019f1755ce071bd15e36e112d/gvrasterpropdlg.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
67,
17995,
5986,
12,
2890,
4672,
10296,
29009,
273,
22718,
18,
58,
3514,
12,
14080,
33,
2163,
13,
10296,
29009,
18,
542,
67,
8815,
67,
2819,
12,
2163,
13,
365,
18,
24422,
18,
6923... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
752,
67,
17995,
5986,
12,
2890,
4672,
10296,
29009,
273,
22718,
18,
58,
3514,
12,
14080,
33,
2163,
13,
10296,
29009,
18,
542,
67,
8815,
67,
2819,
12,
2163,
13,
365,
18,
24422,
18,
6923... | |
success = success and compile_dir(dir, maxlevels, ddir, force) | if not compile_dir(dir, maxlevels, ddir, force, rx): success = 0 | def main(): """Script main program.""" import getopt try: opts, args = getopt.getopt(sys.argv[1:], 'lfd:') except getopt.error, msg: print msg print "usage: compileall [-l] [-f] [-d destdir] [directory ...]" print "-l: don't recurse down" print "-f: force rebuild even if timestamps are up-to-date" print "-d destdir: purported directory name for error messages" print "if no directory arguments, -l sys.path is assumed" sys.exit(2) maxlevels = 10 ddir = None force = 0 for o, a in opts: if o == '-l': maxlevels = 0 if o == '-d': ddir = a if o == '-f': force = 1 if ddir: if len(args) != 1: print "-d destdir require exactly one directory argument" sys.exit(2) success = 1 try: if args: for dir in args: success = success and compile_dir(dir, maxlevels, ddir, force) else: success = compile_path() except KeyboardInterrupt: print "\n[interrupt]" success = 0 return success | 12b6457e24924ff60cf89fd19a584185a5d6c256 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/12b6457e24924ff60cf89fd19a584185a5d6c256/compileall.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
3536,
3651,
2774,
5402,
12123,
1930,
336,
3838,
775,
30,
1500,
16,
833,
273,
336,
3838,
18,
588,
3838,
12,
9499,
18,
19485,
63,
21,
30,
6487,
296,
80,
8313,
2497,
13,
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,
2774,
13332,
3536,
3651,
2774,
5402,
12123,
1930,
336,
3838,
775,
30,
1500,
16,
833,
273,
336,
3838,
18,
588,
3838,
12,
9499,
18,
19485,
63,
21,
30,
6487,
296,
80,
8313,
2497,
13,
1335... |
timestamp_field.sql_format), | timestamp_field.sql_format, self.create_date.string), | def init(self, cursor, module_name): super(ModelSQL, self).init(cursor, module_name) | 8bfad5bfeff068bf9fa8b516c81804ff5b36bbb7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9266/8bfad5bfeff068bf9fa8b516c81804ff5b36bbb7/modelsql.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1208,
12,
2890,
16,
3347,
16,
1605,
67,
529,
4672,
2240,
12,
1488,
3997,
16,
365,
2934,
2738,
12,
9216,
16,
1605,
67,
529,
13,
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,
1208,
12,
2890,
16,
3347,
16,
1605,
67,
529,
4672,
2240,
12,
1488,
3997,
16,
365,
2934,
2738,
12,
9216,
16,
1605,
67,
529,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
CoincDatabaseConnection.commit() | def __init__(self, *attrs): table.Table.__init__(self, *attrs) self.cursor = CoincDatabaseConnection.cursor() self.cursor.execute("CREATE TABLE coinc_event (coinc_def_id INTEGER, time_slide_id INTEGER, nevents INTEGER, coinc_event_id INTEGER UNIQUE PRIMARY KEY)") CoincDatabaseConnection.commit() | bda9934b4450fe05001a0bec22c8b186ac2c3c12 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5758/bda9934b4450fe05001a0bec22c8b186ac2c3c12/SnglBurstUtils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
380,
7039,
4672,
1014,
18,
1388,
16186,
2738,
972,
12,
2890,
16,
380,
7039,
13,
365,
18,
9216,
273,
28932,
71,
4254,
1952,
18,
9216,
1435,
365,
18,
9216,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
380,
7039,
4672,
1014,
18,
1388,
16186,
2738,
972,
12,
2890,
16,
380,
7039,
13,
365,
18,
9216,
273,
28932,
71,
4254,
1952,
18,
9216,
1435,
365,
18,
9216,... | |
Returns a list of all curves with conductor between Nmin and Nmax-1, inclusive, in the database. | Returns a list of all curves with given conductors. | def list(self, conductors): """ Returns a list of all curves with conductor between Nmin and Nmax-1, inclusive, in the database. INPUT: - ``conductors`` - list or generator of ints OUTPUT: - list of EllipticCurve objects. | c505e04eee8babcf64b9ccd5039fa569f6981a5b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/c505e04eee8babcf64b9ccd5039fa569f6981a5b/cremona.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
666,
12,
2890,
16,
356,
1828,
1383,
4672,
3536,
2860,
279,
666,
434,
777,
24106,
598,
864,
356,
1828,
1383,
18,
225,
12943,
30,
282,
300,
12176,
591,
1828,
1383,
10335,
300,
666,
578,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
666,
12,
2890,
16,
356,
1828,
1383,
4672,
3536,
2860,
279,
666,
434,
777,
24106,
598,
864,
356,
1828,
1383,
18,
225,
12943,
30,
282,
300,
12176,
591,
1828,
1383,
10335,
300,
666,
578,
... |
def testatomcoords_more(self): """Are atomcoords consistent with geovalues?""" coords = self.data.atomcoords self.assertEquals(len(self.data.geovalues),len(coords)-1,"len(atomcoords)-1 is %d but len(geovalues) is %d" % (len(coords)-1,len(self.data.geovalues))) | def testatomcoords_more(self): """Are atomcoords consistent with geovalues?""" coords = self.data.atomcoords self.assertEquals(len(self.data.geovalues),len(coords)-1,"len(atomcoords)-1 is %d but len(geovalues) is %d" % (len(coords)-1,len(self.data.geovalues))) | 196d54aadea7aa579e51c5df9efcab6301253fad /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8167/196d54aadea7aa579e51c5df9efcab6301253fad/testGeoOpt.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
7466,
9076,
67,
10161,
12,
2890,
4672,
3536,
4704,
3179,
9076,
11071,
598,
8244,
1527,
746,
35,
8395,
6074,
273,
365,
18,
892,
18,
7466,
9076,
365,
18,
11231,
8867,
12,
1897,
12,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
7466,
9076,
67,
10161,
12,
2890,
4672,
3536,
4704,
3179,
9076,
11071,
598,
8244,
1527,
746,
35,
8395,
6074,
273,
365,
18,
892,
18,
7466,
9076,
365,
18,
11231,
8867,
12,
1897,
12,
... | |
res = rm.getCatalogDirectoryReplicas(path,True) | res = catalog.getCatalogDirectoryReplicas(path,singleFile=True) | def addDirectory(self,path,force=False): """ Adds all the files stored in a given directory in file catalog """ gLogger.info("TransformationDB.addDirectory: Attempting to populate %s." % path) res = self.__getReplicaManager() if not res['OK']: return res rm = res['Value'] start = time.time() res = rm.getCatalogDirectoryReplicas(path,True) if not res['OK']: gLogger.error("TransformationDB.addDirectory: Failed to get replicas. %s" % res['Message']) return res gLogger.info("TransformationDB.addDirectory: Obtained %s replicas in %s seconds." % (path,time.time()-start)) fileTuples = [] for lfn,replicaDict in res['Value'].items(): for se,pfn in replicaDict.items(): fileTuples.append((lfn,pfn,0,se,'IGNORED-GUID','IGNORED-CHECKSUM')) if fileTuples: res = self.addFile(fileTuples,force=force) if not res['OK']: return res if not res['Value']['Successful']: return S_ERROR("Failed to add any files to database") return S_OK() | f54588da43d82256d4f9d1d4714acd11b51e64c2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/f54588da43d82256d4f9d1d4714acd11b51e64c2/TransformationDB.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
2853,
12,
2890,
16,
803,
16,
5734,
33,
8381,
4672,
3536,
15605,
777,
326,
1390,
4041,
316,
279,
864,
1867,
316,
585,
6222,
3536,
314,
3328,
18,
1376,
2932,
15292,
2290,
18,
1289,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
2853,
12,
2890,
16,
803,
16,
5734,
33,
8381,
4672,
3536,
15605,
777,
326,
1390,
4041,
316,
279,
864,
1867,
316,
585,
6222,
3536,
314,
3328,
18,
1376,
2932,
15292,
2290,
18,
1289,
... |
u = urllib2.urlopen("ftp://ftp.mirror.nl/pub/mirror/gnu/", timeout=60) | u = _urlopen_with_retry(self.FTP_HOST, timeout=60) | def test_ftp_Value(self): u = urllib2.urlopen("ftp://ftp.mirror.nl/pub/mirror/gnu/", timeout=60) self.assertEqual(u.fp.fp._sock.gettimeout(), 60) | 6534a4ed2b25b245b424847a6f61ed4524fa5f72 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8125/6534a4ed2b25b245b424847a6f61ed4524fa5f72/test_urllib2net.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
11727,
67,
620,
12,
2890,
4672,
582,
273,
389,
295,
18589,
67,
1918,
67,
9620,
12,
2890,
18,
17104,
67,
8908,
16,
2021,
33,
4848,
13,
365,
18,
11231,
5812,
12,
89,
18,
7944... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1842,
67,
11727,
67,
620,
12,
2890,
4672,
582,
273,
389,
295,
18589,
67,
1918,
67,
9620,
12,
2890,
18,
17104,
67,
8908,
16,
2021,
33,
4848,
13,
365,
18,
11231,
5812,
12,
89,
18,
7944... |
ret_val = os.popen(self.config['lock_command']).readlines() | if self.ignoreFirstTransition: self.ignoreFirstTransition = False else: self.logger.log_line('screen is locked') ret_val = os.popen(self.config['lock_command']).readlines() | def go_gone(self): #The Doctor is out ret_val = os.popen(self.config['lock_command']).readlines() | 9a1cf9a78d090d32d2560ad5753e4fd5088dcde3 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/61/9a1cf9a78d090d32d2560ad5753e4fd5088dcde3/proximity.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1960,
67,
75,
476,
12,
2890,
4672,
468,
1986,
2256,
30206,
353,
596,
325,
67,
1125,
273,
1140,
18,
84,
3190,
12,
2890,
18,
1425,
3292,
739,
67,
3076,
3546,
2934,
896,
3548,
1435,
2,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1960,
67,
75,
476,
12,
2890,
4672,
468,
1986,
2256,
30206,
353,
596,
325,
67,
1125,
273,
1140,
18,
84,
3190,
12,
2890,
18,
1425,
3292,
739,
67,
3076,
3546,
2934,
896,
3548,
1435,
2,
... |
xmin = self.axisScaleDiv(xAxis).lBound() xmax = self.axisScaleDiv(xAxis).hBound() | if QWT_VERSION < 0x050200: xmin = self.axisScaleDiv(xAxis).lBound() xmax = self.axisScaleDiv(xAxis).hBound() else: xmin = self.axisScaleDiv(xAxis).lowerBound() xmax = self.axisScaleDiv(xAxis).upperBound() | def gracePlot(self, saveall="", pause=0.2): """Clone the plot into Grace for very high quality hard copy output. | 6f03bbbb422c60c614fe1273bf968db3efcf71df /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5650/6f03bbbb422c60c614fe1273bf968db3efcf71df/qplt.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13658,
11532,
12,
2890,
16,
1923,
454,
1546,
3113,
11722,
33,
20,
18,
22,
4672,
3536,
10930,
326,
3207,
1368,
611,
9963,
364,
8572,
3551,
9312,
7877,
1610,
876,
18,
2,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
13658,
11532,
12,
2890,
16,
1923,
454,
1546,
3113,
11722,
33,
20,
18,
22,
4672,
3536,
10930,
326,
3207,
1368,
611,
9963,
364,
8572,
3551,
9312,
7877,
1610,
876,
18,
2,
-100,
-100,
-100,
... |
elif ord ('e') == keypress: if config["collection"]["editable"]: invokeEditor (editor, filename) curses.reset_prog_mode () curses.curs_set(1) curses.curs_set(0) fresh_page = True curr_loc_info = None elif ord ('d') == keypress: if os.path.isfile (config["pyui"]["documentation_root"]): current_directory = os.getcwd () hyltMain (meta_screen,config["pyui"]["documentation_root"]) os.chdir (current_directory) elif ord ('?') == keypress: if os.path.isfile (config["pyui"]["keyboard_reference"]): current_directory = os.getcwd () hyltMain (meta_screen,config["pyui"]["keyboard_reference"]) os.chdir (current_directory) | def hyltMain (meta_screen, starting_filename): """The core Hylt functionality. Contains the main input and display loops, lots of initialization, and so on. """ curses.curs_set(0) # Remember: Parameters are in the order of (y, x). meta_y, meta_x = meta_screen.getmaxyx() core_state = {"y": meta_y, "x": meta_x} # Change to the base path. if "" != os.path.dirname (starting_filename): os.chdir (os.path.dirname (starting_filename)) core_state["curr_base_path"] = "" # There are three windows: a top status bar, a primary screen, and a bottom # status bar. There is also the main screen, of course. Create them. top = meta_screen.subwin (1, meta_x, 0, 0) main = meta_screen.subwin (meta_y - 2, meta_x, 1, 0) bottom = meta_screen.subwin (1, meta_x, meta_y - 1, 0) # Read in the configuration. config = core_state["config"] = generateConfiguration () editor = config["pyui"]["editor"] # Okay. History's actually a bad name for this right now, but it'll have # to do. This is a list of pages; it normally tracks history, but can # also track search results. At the beginning, the only element in the # history is the starting page; others will be added, subtracted, etc. core_state["history"] = [] historyAdd(core_state, os.path.basename (starting_filename)) core_state["history_position"] = 0 fresh_page = True done = False curses.def_prog_mode () main_needs_redraw = True while not done: current_loc = core_state["history"][core_state["history_position"]] if fresh_page: filename = current_loc["filename"] core_state["curr_base_path"] = os.path.dirname (filename) readHyltFile (filename, core_state) | b9db2ec645f31a0c66de35fc3bd2ab6043c88e17 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2254/b9db2ec645f31a0c66de35fc3bd2ab6043c88e17/hylt.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4855,
5618,
6376,
261,
3901,
67,
9252,
16,
5023,
67,
3459,
4672,
3536,
1986,
2922,
14881,
5618,
14176,
18,
225,
8398,
326,
2774,
810,
471,
2562,
14075,
16,
328,
6968,
434,
10313,
16,
471... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4855,
5618,
6376,
261,
3901,
67,
9252,
16,
5023,
67,
3459,
4672,
3536,
1986,
2922,
14881,
5618,
14176,
18,
225,
8398,
326,
2774,
810,
471,
2562,
14075,
16,
328,
6968,
434,
10313,
16,
471... | |
filename -- where to keep the database | filename -- where to load the database from TODO: once the tutorial is finished in SQLDatabase, copy it here | def complement(self): q = SQLQuery(self.__database__) q.__query_string__ = re.sub(' WHERE ',' WHERE NOT ( ',self.__query_string__) q.__query_string__ += ' )' q.__param_tuple__ = self.__param_tuple__ return q | 85d02cb25b26fc015382d67ed0b0b5b5529e5568 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9417/85d02cb25b26fc015382d67ed0b0b5b5529e5568/database.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
17161,
12,
2890,
4672,
1043,
273,
3063,
1138,
12,
2890,
16186,
6231,
972,
13,
1043,
16186,
2271,
67,
1080,
972,
273,
283,
18,
1717,
2668,
4852,
3316,
4852,
4269,
261,
2265,
2890,
16186,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
17161,
12,
2890,
4672,
1043,
273,
3063,
1138,
12,
2890,
16186,
6231,
972,
13,
1043,
16186,
2271,
67,
1080,
972,
273,
283,
18,
1717,
2668,
4852,
3316,
4852,
4269,
261,
2265,
2890,
16186,
... |
log.info("fetch OK (code=%d)"%rc) | def _fetchPhysical(self, physical, url): #urllib.urlretrieve(d[lf], phy) # urlretrieve dies on interrupt signals # Use curl: fail silently, silence output, write to file tries = 1 maxTries = 3 pid = None while pid is None: try: pid = os.spawnv(os.P_NOWAIT, '/usr/bin/curl', ['curl', "-f", "-s", "-o", physical, url]) except OSError, e: if not (e.errno == 513): raise pass #retry on ERESTARTNOINTR rc = None while rc is None: try: log.info("rc is %s" % (str(rc))) (p,rc) = os.waitpid(pid,0) rc = os.WEXITSTATUS(rc) log.info("fetch OK (code=%d)"%rc) except OSError, e: if not (e.errno == 4): raise log.info("Retry, got errno 4 (interrupted syscall)") continue if rc != 0: raise StandardError("error fetching %s (curl code=%d)" % (url, rc)) | 8eac62fba42c57a2e2bd315961da837c0339d598 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5203/8eac62fba42c57a2e2bd315961da837c0339d598/swamp_common.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
5754,
18136,
12,
2890,
16,
11640,
16,
880,
4672,
468,
718,
2941,
18,
718,
17466,
12,
72,
63,
20850,
6487,
1844,
93,
13,
468,
880,
17466,
27890,
603,
13123,
11505,
468,
2672,
3363,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5754,
18136,
12,
2890,
16,
11640,
16,
880,
4672,
468,
718,
2941,
18,
718,
17466,
12,
72,
63,
20850,
6487,
1844,
93,
13,
468,
880,
17466,
27890,
603,
13123,
11505,
468,
2672,
3363,
... | |
nevents[i] = nevents[i] * (600.0/6370.0) | nevents[i] = nevents[i] * ( 600.0 / 6370.0 ) mean_events = mean(nevents) std_events = std(nevents) * ( 6370.0 / 600.0 ) ** ( 0.5 ) | def histslides(slide_trigs, zerolag_trigs = None, ifolist = None, scalebkg = None): """ function to make a histogram of the number of triggers per time slide @param slide_trigs: dictionary of time slide triggers @param zerolag_trigs: coincInspiralTable @param ifolist: list of ifos """ nevents = [] slides = [] for slide in slide_trigs: if ifolist: nevents.append( len(slide["coinc_trigs"].coinctype(ifolist)) ) else: nevents.append( len(slide["coinc_trigs"]) ) slides.append(slide["slide_num"]) if scalebkg: for i in range(len(nevents)): nevents[i] = nevents[i] * (600.0/6370.0) hist(nevents) figtext(0.13,0.8, " mean = %6.3e" % mean(nevents)) figtext(0.13,0.75,"sigma = %6.3e" % std(nevents)) if zerolag_trigs: hold(True) if ifolist: nfgevents = len(zerolag_trigs.coinctype(ifolist)) else: nfgevents = len(zerolag_trigs) figtext(0.13,0.70,"zero lag = %6.3e" % nfgevents ) axvline(nfgevents,color='r',linewidth=2) xlabel('Number of triggers',size='x-large') title_text = 'Histogram of number coincident ' if ifolist: for ifo in ifolist: title_text += ifo + ' ' title_text += 'triggers per time slide' title(title_text, size='x-large') | 167dfd436313712719844238c6f6ab3a6a6af498 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5758/167dfd436313712719844238c6f6ab3a6a6af498/viz.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
366,
1486,
80,
4369,
12,
26371,
67,
313,
360,
87,
16,
24910,
355,
346,
67,
313,
360,
87,
273,
599,
16,
309,
355,
376,
273,
599,
16,
3159,
70,
14931,
273,
599,
4672,
3536,
445,
358,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
366,
1486,
80,
4369,
12,
26371,
67,
313,
360,
87,
16,
24910,
355,
346,
67,
313,
360,
87,
273,
599,
16,
309,
355,
376,
273,
599,
16,
3159,
70,
14931,
273,
599,
4672,
3536,
445,
358,
... |
out_file.write(bytes(out_data)) | out_file.write(self.fix_bytes(out_data)) | def encrypt_file(self, in_file_path, out_file_path, password = None): #If a password is provided, generate new salt and create key and iv if password is not None: self.new_salt() self.create_key_from_password(password) else: self._salt = None #If key and iv are not provided are established above, bail out. if self._key is None or self._iv is None: return False #Initialize encryption using key and iv key_expander_256 = key_expander.KeyExpander(256) expanded_key = key_expander_256.expand(self._key) aes_cipher_256 = aes_cipher.AESCipher(expanded_key) aes_cbc_256 = cbc_mode.CBCMode(aes_cipher_256, 16) aes_cbc_256.set_iv(self._iv) #Get filesize of original file for storage in encrypted file try: filesize = os.stat(in_file_path)[6] except: return False | 7c4a4f3dfd7aff8d908d4cdab9ca31748b265e97 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13669/7c4a4f3dfd7aff8d908d4cdab9ca31748b265e97/demo.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7347,
67,
768,
12,
2890,
16,
316,
67,
768,
67,
803,
16,
596,
67,
768,
67,
803,
16,
2201,
273,
599,
4672,
468,
2047,
279,
2201,
353,
2112,
16,
2103,
394,
4286,
471,
752,
498,
471,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7347,
67,
768,
12,
2890,
16,
316,
67,
768,
67,
803,
16,
596,
67,
768,
67,
803,
16,
2201,
273,
599,
4672,
468,
2047,
279,
2201,
353,
2112,
16,
2103,
394,
4286,
471,
752,
498,
471,
4... |
class TextTreeItem(TreeItem): def __init__(self, fontName='font_small', *args, **kwargs): super(TextTreeItem, self).__init__(*args, **kwargs) | if model is not None: for r in model.rectangles: self.add(r) | def visibleChildren(self, level): ls = [] | e7b8a86b0b71ac3ea112ebbd9c2164e51fb322eb /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2102/e7b8a86b0b71ac3ea112ebbd9c2164e51fb322eb/comics.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6021,
4212,
12,
2890,
16,
1801,
4672,
7180,
273,
5378,
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,... | [
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,
6021,
4212,
12,
2890,
16,
1801,
4672,
7180,
273,
5378,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
if cursor.fetchone(): | if cursor.fetchone()[0] == 0: | def delete(self, version=None, db=None): assert self.exists, 'Cannot delete non-existent page' if not db: db = self.env.get_db_cnx() handle_ta = True else: handle_ta = False | af765e82307ede2f644d0db7e3a6841545b2943b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2831/af765e82307ede2f644d0db7e3a6841545b2943b/model.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1430,
12,
2890,
16,
1177,
33,
7036,
16,
1319,
33,
7036,
4672,
1815,
365,
18,
1808,
16,
296,
4515,
1430,
1661,
17,
19041,
1363,
11,
309,
486,
1319,
30,
1319,
273,
365,
18,
3074,
18,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1430,
12,
2890,
16,
1177,
33,
7036,
16,
1319,
33,
7036,
4672,
1815,
365,
18,
1808,
16,
296,
4515,
1430,
1661,
17,
19041,
1363,
11,
309,
486,
1319,
30,
1319,
273,
365,
18,
3074,
18,
5... |
ROBIN_DEBUG=[('ROBIN_DEBUG',None)] ROBIN_DEBUG=[] | MACROS=[('ROBIN_DEBUG',None)] MACROS=[] | def BIGENDIAN(macname,value=None): 'define a macro if bigendian' return sys.byteorder=='big' and [(macname,value)] or [] | f43fb40f8f2a84ee29fb78f853c6b109499dffdd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3878/f43fb40f8f2a84ee29fb78f853c6b109499dffdd/setup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
18855,
30597,
12,
5821,
529,
16,
1132,
33,
7036,
4672,
296,
11255,
279,
11522,
309,
5446,
22910,
11,
327,
2589,
18,
7229,
1019,
18920,
14002,
11,
471,
306,
12,
5821,
529,
16,
1132,
25887... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
18855,
30597,
12,
5821,
529,
16,
1132,
33,
7036,
4672,
296,
11255,
279,
11522,
309,
5446,
22910,
11,
327,
2589,
18,
7229,
1019,
18920,
14002,
11,
471,
306,
12,
5821,
529,
16,
1132,
25887... |
def _get_by_checksum(self, build): result = self.store.find(StormBuild, Cast(StormBuild.checksum, "TEXT") == build.log_checksum()) return result.one() | def _get_by_checksum(self, build): result = self.store.find(StormBuild, Cast(StormBuild.checksum, "TEXT") == build.log_checksum()) return result.one() | 036dd452ed5b7aec2cc376742d5db64fd375dda1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7314/036dd452ed5b7aec2cc376742d5db64fd375dda1/sqldb.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
67,
1637,
67,
15149,
12,
2890,
16,
1361,
4672,
563,
273,
365,
18,
2233,
18,
4720,
12,
510,
535,
3116,
16,
19782,
12,
510,
535,
3116,
18,
15149,
16,
315,
5151,
7923,
422,
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,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
67,
1637,
67,
15149,
12,
2890,
16,
1361,
4672,
563,
273,
365,
18,
2233,
18,
4720,
12,
510,
535,
3116,
16,
19782,
12,
510,
535,
3116,
18,
15149,
16,
315,
5151,
7923,
422,
13... | |
if lineitem.product.is_discountable and (allvalid or lineitem.product.id in validproducts): | if lineitem.product.is_discountable and (allvalid or lineitem.product.slug in validproducts): | def calc(self, order): # Use the order details and the discount specifics to calculate the actual discount discounted = {} if self.validProducts.count() == 0: allvalid = True else: validproducts = self._valid_cart_products(cart) | 8c22680028f2fcf09bb07124d4b6cf4f874bd25c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/13656/8c22680028f2fcf09bb07124d4b6cf4f874bd25c/models.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7029,
12,
2890,
16,
1353,
4672,
468,
2672,
326,
1353,
3189,
471,
326,
12137,
2923,
87,
358,
4604,
326,
3214,
12137,
12137,
329,
273,
2618,
309,
365,
18,
877,
13344,
18,
1883,
1435,
422,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7029,
12,
2890,
16,
1353,
4672,
468,
2672,
326,
1353,
3189,
471,
326,
12137,
2923,
87,
358,
4604,
326,
3214,
12137,
12137,
329,
273,
2618,
309,
365,
18,
877,
13344,
18,
1883,
1435,
422,
... |
''' % masterfile + (create_makefile and ''' | ''' % masterfile + ((create_makefile or create_batch) and ''' | def inner_main(args): d = {} if not sys.stdout.isatty() or not color_terminal(): nocolor() print bold('Welcome to the Sphinx quickstart utility.') print ''' | 35b9921582ff30eb1b7c343cfcf45cc41208a045 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7032/35b9921582ff30eb1b7c343cfcf45cc41208a045/quickstart.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3443,
67,
5254,
12,
1968,
4672,
302,
273,
2618,
225,
309,
486,
2589,
18,
10283,
18,
291,
270,
4098,
1435,
578,
486,
2036,
67,
15979,
13332,
30601,
355,
280,
1435,
225,
1172,
13068,
2668,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3443,
67,
5254,
12,
1968,
4672,
302,
273,
2618,
225,
309,
486,
2589,
18,
10283,
18,
291,
270,
4098,
1435,
578,
486,
2036,
67,
15979,
13332,
30601,
355,
280,
1435,
225,
1172,
13068,
2668,... |
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 | 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 | 32b7e3e34ee2ff937faae0230b8ebf39b731bf5b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9417/32b7e3e34ee2ff937faae0230b8ebf39b731bf5b/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,
... | |
self.pitcherText.Show(True) self.players[-1].Show(True) | self.players[-1].Enable(True) | def LoadLineup(self, doc, team): gameiter = doc.GetState() self.origPlayers = [] self.origPositions = [] | 1ce370d591759f025f0321cd0b6b7e50dd7124c5 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/10056/1ce370d591759f025f0321cd0b6b7e50dd7124c5/dialoglineup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4444,
1670,
416,
12,
2890,
16,
997,
16,
5927,
4672,
7920,
2165,
273,
997,
18,
967,
1119,
1435,
365,
18,
4949,
1749,
3907,
273,
5378,
365,
18,
4949,
11024,
273,
5378,
2,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4444,
1670,
416,
12,
2890,
16,
997,
16,
5927,
4672,
7920,
2165,
273,
997,
18,
967,
1119,
1435,
365,
18,
4949,
1749,
3907,
273,
5378,
365,
18,
4949,
11024,
273,
5378,
2,
-100,
-100,
-10... |
for pattern in self.config['ignores']: if fnmatch.fnmatch(user, pattern): return True | if self.config.has_key('ignores'): for pattern in self.config['ignores']: if fnmatch.fnmatch(user, pattern): return True | def isIgnored(self, user): """Check if an user is ignored | 4b4836d770a05fc7089f53ef17c4cd6c5fb14fba /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14781/4b4836d770a05fc7089f53ef17c4cd6c5fb14fba/pyfibot.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
353,
15596,
12,
2890,
16,
729,
4672,
3536,
1564,
309,
392,
729,
353,
5455,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
353,
15596,
12,
2890,
16,
729,
4672,
3536,
1564,
309,
392,
729,
353,
5455,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
if category: | if category and category != _('<No addition>', formatted=False): | def do_edit(pagename, request): _ = request.getText if not request.user.may.write(pagename): Page(request, pagename).send_page(request, msg = _('You are not allowed to edit this page.')) return valideditors = ['text', 'gui',] editor = '' if request.user.valid: editor = request.user.editor_default if editor not in valideditors: editor = request.cfg.editor_default editorparam = request.form.get('editor', [editor])[0] if editorparam == "guipossible": lasteditor = editor elif editorparam == "textonly": editor = lasteditor = 'text' else: editor = lasteditor = editorparam if request.cfg.editor_force: editor = request.cfg.editor_default # if it is still nothing valid, we just use the text editor if editor not in valideditors: editor = 'text' savetext = request.form.get('savetext', [None])[0] rev = int(request.form.get('rev', ['0'])[0]) comment = request.form.get('comment', [u''])[0] category = request.form.get('category', [None])[0] rstrip = int(request.form.get('rstrip', ['0'])[0]) trivial = int(request.form.get('trivial', ['0'])[0]) if request.form.has_key('button_switch'): if editor == 'text': editor = 'gui' else: # 'gui' editor = 'text' # load right editor class if editor == 'gui': from MoinMoin.PageGraphicalEditor import PageGraphicalEditor pg = PageGraphicalEditor(request, pagename) else: # 'text' from MoinMoin.PageEditor import PageEditor pg = PageEditor(request, pagename) # Edit was canceled if request.form.has_key('button_cancel'): pg.sendCancel(savetext or "", rev) return # is invoked without savetext start editing if savetext is None: pg.sendEditor() return # convert input from Graphical editor if lasteditor == 'gui': from MoinMoin.converter.text_html_text_x_moin import convert savetext = convert(request, pagename, savetext) # XXX error handling # IMPORTANT: normalize text from the form. This should be done in # one place before we manipulate the text. savetext = pg.normalizeText(savetext, stripspaces=rstrip) # Add category # TODO: this code does not work with extended links, and is doing # things behind your back, and in general not needed. Either we have # a full interface for categories (add, delete) or just add them by # markup. if category: # strip trailing whitespace savetext = savetext.rstrip() # Add category separator if last non-empty line contains # non-categories. lines = filter(None, savetext.splitlines()) if lines: #TODO: this code is broken, will not work for extended links #categories, e.g ["category hebrew"] categories = lines[-1].split() if categories: confirmed = wikiutil.filterCategoryPages(request, categories) if len(confirmed) < len(categories): # This was not a categories line, add separator savetext += u'\n----\n' # Add new category if savetext and savetext[-1] != u'\n': savetext += ' ' savetext += category + u'\n' # Should end with newline! # Clean comment - replace CR, LF, TAB by whitespace, delete control chars # TODO: move this to config, create on first call then return cached. remap_chars = { ord(u'\t'): u' ', ord(u'\r'): u' ', ord(u'\n'): u' ', } control_chars = u'\x00\x01\x02\x03\x04\x05\x06\x07\x08\x0b\x0c\x0e\x0f' \ '\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f' for c in control_chars: remap_chars[c] = None comment = comment.translate(remap_chars) # Preview, spellcheck or spellcheck add new words if (request.form.has_key('button_preview') or request.form.has_key('button_spellcheck') or request.form.has_key('button_newwords')): pg.sendEditor(preview=savetext, comment=comment) # Preview with mode switch elif request.form.has_key('button_switch'): pg.sendEditor(preview=savetext, comment=comment, staytop=1) # Save new text else: try: savemsg = pg.saveText(savetext, rev, trivial=trivial, comment=comment) except pg.EditConflict, msg: # Handle conflict and send editor # TODO: conflict messages are duplicated from PageEditor, # refactor to one place only. conflict_msg = _('Someone else changed this page while you were editing!') pg.set_raw_body(savetext, modified=1) if pg.mergeEditConflict(rev): conflict_msg = _("""Someone else saved this page while you were editing! | b285d73fb1cd798e0ace2d2209f46309ed4936c4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/888/b285d73fb1cd798e0ace2d2209f46309ed4936c4/wikiaction.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
67,
4619,
12,
9095,
1069,
16,
590,
4672,
389,
273,
590,
18,
588,
1528,
225,
309,
486,
590,
18,
1355,
18,
24877,
18,
2626,
12,
9095,
1069,
4672,
3460,
12,
2293,
16,
4262,
1069,
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,
741,
67,
4619,
12,
9095,
1069,
16,
590,
4672,
389,
273,
590,
18,
588,
1528,
225,
309,
486,
590,
18,
1355,
18,
24877,
18,
2626,
12,
9095,
1069,
4672,
3460,
12,
2293,
16,
4262,
1069,
2... |
'name': fields.char('Description',size=64), | 'name': fields.char('Description',size=64,required=True), | def copy(self, cr, uid, id, default=None, context={}): if not default: default = {} default.update( {'state':'draft', 'id':False, 'history_line':[],'log_ids':[]}) return super(crm_case, self).copy(cr, uid, id, default, context) | 281b70321a5783950c27b8f244b0d503102260f9 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/281b70321a5783950c27b8f244b0d503102260f9/crm.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1610,
12,
2890,
16,
4422,
16,
4555,
16,
612,
16,
805,
33,
7036,
16,
819,
12938,
4672,
309,
486,
805,
30,
805,
273,
2618,
805,
18,
2725,
12,
13666,
2019,
11,
2497,
17153,
2187,
296,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1610,
12,
2890,
16,
4422,
16,
4555,
16,
612,
16,
805,
33,
7036,
16,
819,
12938,
4672,
309,
486,
805,
30,
805,
273,
2618,
805,
18,
2725,
12,
13666,
2019,
11,
2497,
17153,
2187,
296,
3... |
SetOutputFileName('_CarbonEvt.c') | SetOutputFileName('_CarbonEvtmodule.c') | # def outputFreeIt(self, name): | 15ea67d1a694a01faf3ea06f840879b7105c1480 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/15ea67d1a694a01faf3ea06f840879b7105c1480/CarbonEvtsupport.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
468,
202,
536,
876,
9194,
7193,
12,
2890,
16,
508,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
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,
468,
202,
536,
876,
9194,
7193,
12,
2890,
16,
508,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
for kernel in ['linux-2.6.18', 'linux-2.6.26']: run_command(['python', 'scons.py', kernel]) | kernels = ['liblinux2.6.18.so', 'liblinux2.6.26.so'] run_command(['python', 'scons.py'] + kernels) | def build_nsc(): # XXX: Detect gcc major version(s) available to build supported stacks for kernel in ['linux-2.6.18', 'linux-2.6.26']: run_command(['python', 'scons.py', kernel]) | 3ff0c03e146b0c5b9e5e360b296d85724392112e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9391/3ff0c03e146b0c5b9e5e360b296d85724392112e/build.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1361,
67,
82,
1017,
13332,
468,
11329,
30,
13796,
314,
952,
7888,
1177,
12,
87,
13,
2319,
358,
1361,
3260,
19838,
282,
5536,
87,
273,
10228,
2941,
20132,
22,
18,
26,
18,
2643,
18,
2048... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1361,
67,
82,
1017,
13332,
468,
11329,
30,
13796,
314,
952,
7888,
1177,
12,
87,
13,
2319,
358,
1361,
3260,
19838,
282,
5536,
87,
273,
10228,
2941,
20132,
22,
18,
26,
18,
2643,
18,
2048... |
try_run(result) | zh_exec(result) | def commandline(): """zhpy, the python language in chinese | 1ca64bbfc11a424ae9f3f8505163ddb8299946f4 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1969/1ca64bbfc11a424ae9f3f8505163ddb8299946f4/commandline.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
28305,
13332,
3536,
23121,
2074,
16,
326,
5790,
2653,
316,
462,
25331,
225,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
28305,
13332,
3536,
23121,
2074,
16,
326,
5790,
2653,
316,
462,
25331,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
workitem_ids = self.search(cr, uid, [('state', '=', 'todo'), | camp_obj = self.pool.get('marketing.campaign') camp_ids = camp_obj.search(cr, uid, [('state','=','running')], context=context) for camp in camp_obj.browse(cr, uid, camp_ids, context=context): if camp.mode in ('test_realtime','active'): workitem_ids = self.search(cr, uid, [('state', '=', 'todo'), | def process_all(self, cr, uid, context={}): workitem_ids = self.search(cr, uid, [('state', '=', 'todo'), ('date','<=', time.strftime('%Y-%m-%d %H:%M:%S'))]) if workitem_ids: self.process(cr, uid, workitem_ids, context) | 4760a832f354437350b06aae5ddce4f88aa00f51 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/4760a832f354437350b06aae5ddce4f88aa00f51/marketing_campaign.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
67,
454,
12,
2890,
16,
4422,
16,
4555,
16,
819,
12938,
4672,
20787,
67,
2603,
273,
365,
18,
6011,
18,
588,
2668,
3355,
21747,
18,
14608,
6134,
20787,
67,
2232,
273,
20787,
67,
26... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
67,
454,
12,
2890,
16,
4422,
16,
4555,
16,
819,
12938,
4672,
20787,
67,
2603,
273,
365,
18,
6011,
18,
588,
2668,
3355,
21747,
18,
14608,
6134,
20787,
67,
2232,
273,
20787,
67,
26... |
def Generate(factory, filename): ext = filename.split('.')[-1] if ext != 'rpc': raise RpcGenError('Unrecognized file extension: %s' % ext) print >>sys.stderr, 'Reading \"%s\"' % filename fp = open(filename, 'r') entities = Parse(factory, fp) fp.close() header_file = factory.HeaderFilename(filename) impl_file = factory.CodeFilename(filename) print >>sys.stderr, '... creating "%s"' % header_file header_fp = open(header_file, 'w') print >>header_fp, factory.HeaderPreamble(filename) for entry in entities: entry.PrintForwardDeclaration(header_fp) print >>header_fp, '' for entry in entities: entry.PrintTags(header_fp) entry.PrintDeclaration(header_fp) print >>header_fp, factory.HeaderPostamble(filename) header_fp.close() print >>sys.stderr, '... creating "%s"' % impl_file impl_fp = open(impl_file, 'w') print >>impl_fp, factory.BodyPreamble(filename) for entry in entities: entry.PrintCode(impl_fp) impl_fp.close() | class Usage(RpcGenError): def __init__(self, argv0): RpcGenError.__init__("usage: %s input.rpc [[output.h] output.c]" % argv0) class CommandLine: def __init__(self, argv): self.filename = None self.header_file = None self.impl_file = None self.factory = CCodeGenerator() if len(argv) < 2 or len(argv) > 4: raise Usage(argv[0]) self.filename = argv[1].replace('\\', '/') if len(argv) == 3: self.impl_file = argv[2].replace('\\', '/') if len(argv) == 4: self.header_file = argv[2].replace('\\', '/') self.impl_file = argv[3].replace('\\', '/') if not self.filename: raise Usage(argv[0]) if not self.impl_file: self.impl_file = self.factory.CodeFilename(self.filename) if not self.header_file: self.header_file = self.factory.HeaderFilename(self.impl_file) if not self.impl_file.endswith('.c'): raise RpcGenError("can only generate C implementation files") if not self.header_file.endswith('.h'): raise RpcGenError("can only generate C header files") def run(self): filename = self.filename header_file = self.header_file impl_file = self.impl_file factory = self.factory print >>sys.stderr, 'Reading \"%s\"' % filename fp = open(filename, 'r') entities = Parse(factory, fp) fp.close() print >>sys.stderr, '... creating "%s"' % header_file header_fp = open(header_file, 'w') print >>header_fp, factory.HeaderPreamble(filename) for entry in entities: entry.PrintForwardDeclaration(header_fp) print >>header_fp, '' for entry in entities: entry.PrintTags(header_fp) entry.PrintDeclaration(header_fp) print >>header_fp, factory.HeaderPostamble(filename) header_fp.close() print >>sys.stderr, '... creating "%s"' % impl_file impl_fp = open(impl_file, 'w') print >>impl_fp, factory.BodyPreamble(filename, header_file) for entry in entities: entry.PrintCode(impl_fp) impl_fp.close() | def Generate(factory, filename): ext = filename.split('.')[-1] if ext != 'rpc': raise RpcGenError('Unrecognized file extension: %s' % ext) print >>sys.stderr, 'Reading \"%s\"' % filename fp = open(filename, 'r') entities = Parse(factory, fp) fp.close() header_file = factory.HeaderFilename(filename) impl_file = factory.CodeFilename(filename) print >>sys.stderr, '... creating "%s"' % header_file header_fp = open(header_file, 'w') print >>header_fp, factory.HeaderPreamble(filename) # Create forward declarations: allows other structs to reference # each other for entry in entities: entry.PrintForwardDeclaration(header_fp) print >>header_fp, '' for entry in entities: entry.PrintTags(header_fp) entry.PrintDeclaration(header_fp) print >>header_fp, factory.HeaderPostamble(filename) header_fp.close() print >>sys.stderr, '... creating "%s"' % impl_file impl_fp = open(impl_file, 'w') print >>impl_fp, factory.BodyPreamble(filename) for entry in entities: entry.PrintCode(impl_fp) impl_fp.close() | fbb181d1aaa0cbc22ac8c1ce91a8f2216be95ed9 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/13048/fbb181d1aaa0cbc22ac8c1ce91a8f2216be95ed9/event_rpcgen.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6654,
12,
6848,
16,
1544,
4672,
1110,
273,
1544,
18,
4939,
2668,
1093,
13,
18919,
21,
65,
309,
1110,
480,
296,
7452,
4278,
1002,
18564,
7642,
668,
2668,
19648,
585,
2710,
30,
738,
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,
6654,
12,
6848,
16,
1544,
4672,
1110,
273,
1544,
18,
4939,
2668,
1093,
13,
18919,
21,
65,
309,
1110,
480,
296,
7452,
4278,
1002,
18564,
7642,
668,
2668,
19648,
585,
2710,
30,
738,
87,
... |
gramVBV = sc.linalg.cholesky( gramVBV ) sc.linalg.inv( gramVBV, overwrite_a = True ) | gramVBV = sla.cholesky( gramVBV ) sla.inv( gramVBV, overwrite_a = True ) | def b_orthonormalize( B, blockVectorV, blockVectorBV = None, retInvR = False ): """Internal.""" if blockVectorBV is None: if B is not None: blockVectorBV = B( blockVectorV ) else: blockVectorBV = blockVectorV # Shared data!!! gramVBV = sc.dot( blockVectorV.T, blockVectorBV ) gramVBV = sc.linalg.cholesky( gramVBV ) sc.linalg.inv( gramVBV, overwrite_a = True ) # gramVBV is now R^{-1}. blockVectorV = sc.dot( blockVectorV, gramVBV ) if B is not None: blockVectorBV = sc.dot( blockVectorBV, gramVBV ) if retInvR: return blockVectorV, blockVectorBV, gramVBV else: return blockVectorV, blockVectorBV | 5f61fdba999c7e17262a23ebb66743e391dade3e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12971/5f61fdba999c7e17262a23ebb66743e391dade3e/lobpcg.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
324,
67,
280,
3041,
1687,
554,
12,
605,
16,
1203,
5018,
58,
16,
1203,
5018,
38,
58,
273,
599,
16,
325,
3605,
54,
273,
1083,
262,
30,
3536,
3061,
12123,
309,
1203,
5018,
38,
58,
353,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
324,
67,
280,
3041,
1687,
554,
12,
605,
16,
1203,
5018,
58,
16,
1203,
5018,
38,
58,
273,
599,
16,
325,
3605,
54,
273,
1083,
262,
30,
3536,
3061,
12123,
309,
1203,
5018,
38,
58,
353,
... |
inds_per_worker = num_inds gene_pool = [[random.randint(0,1) for i in range(gene_len)] for n in range(int(n_workers*num_inds))] | def perform_ga(randseed, mut_rate, num_gens, cross_rate, ind_set): random.seed(randseed) num_inds = len(ind_set) for gen in range(num_gens): fitness = [fitness_func(ind) for ind in ind_set] max_fit = reduce(lambda x, y: max(x,y), fitness) new_ind_set = [] for i in range(num_inds/2): parent1 = select(fitness, ind_set) parent2 = select(fitness, ind_set) if random.random() < cross_rate: child1, child2 = crossover(parent1, parent2) mutate(child1, mut_rate) mutate(child2, mut_rate) new_ind_set.append(child1) new_ind_set.append(child2) else: new_ind_set.append(parent1) new_ind_set.append(parent2) ind_set = new_ind_set return [max_fit, new_ind_set] | c5dfdb97b7ecc1ec38557419c461038864eac523 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8868/c5dfdb97b7ecc1ec38557419c461038864eac523/genetic_alg.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3073,
67,
15833,
12,
7884,
12407,
16,
4318,
67,
5141,
16,
818,
67,
23730,
16,
6828,
67,
5141,
16,
1547,
67,
542,
4672,
2744,
18,
12407,
12,
7884,
12407,
13,
818,
67,
15882,
273,
562,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3073,
67,
15833,
12,
7884,
12407,
16,
4318,
67,
5141,
16,
818,
67,
23730,
16,
6828,
67,
5141,
16,
1547,
67,
542,
4672,
2744,
18,
12407,
12,
7884,
12407,
13,
818,
67,
15882,
273,
562,
... | |
os.path.join(folder,'final.mpg'), | os.path.join(folder,'final.vob'), | def processJob(job): """Starts processing a MythBurn job, expects XML nodes to be passed as input.""" global wantIntro, wantMainMenu, wantChapterMenu, wantDetailsPage global themeDOM, themeName, themeFonts media=job.getElementsByTagName("media") if media.length==1: themeName=job.attributes["theme"].value #Check theme exists if not validateTheme(themeName): fatalError("Failed to validate theme (%s)" % themeName) #Get the theme XML themeDOM = getThemeConfigurationXML(themeName) #Pre generate all the fonts we need loadFonts(themeDOM) #Update the global flags nodes=themeDOM.getElementsByTagName("intro") wantIntro = (nodes.length > 0) nodes=themeDOM.getElementsByTagName("menu") wantMainMenu = (nodes.length > 0) nodes=themeDOM.getElementsByTagName("submenu") wantChapterMenu = (nodes.length > 0) nodes=themeDOM.getElementsByTagName("detailspage") wantDetailsPage = (nodes.length > 0) write( "wantIntro: %d, wantMainMenu: %d, wantChapterMenu:%d, wantDetailsPage: %d" \ % (wantIntro, wantMainMenu, wantChapterMenu, wantDetailsPage)) if videomode=="ntsc": format=dvdNTSC dpi=dvdNTSCdpi elif videomode=="pal": format=dvdPAL dpi=dvdPALdpi else: fatalError("Unknown videomode is set (%s)" % videomode) write( "Final DVD Video format will be " + videomode) #Ensure the destination dvd folder is empty if doesFileExist(os.path.join(getTempPath(),"dvd")): deleteAllFilesInFolder(os.path.join(getTempPath(),"dvd")) #Loop through all the files files=media[0].getElementsByTagName("file") filecount=0 if files.length > 0: write( "There are %s files to process" % files.length) if debug_secondrunthrough==False: #Delete all the temporary files that currently exist deleteAllFilesInFolder(getTempPath()) #If User wants to, copy remote files to a tmp dir if copyremoteFiles==True: if debug_secondrunthrough==False: localCopyFolder=os.path.join(getTempPath(),"localcopy") #If it already exists destroy it to remove previous debris if os.path.exists(localCopyFolder): #Remove all the files first deleteAllFilesInFolder(localCopyFolder) #Remove the folder os.rmdir (localCopyFolder) os.makedirs(localCopyFolder) files=copyRemote(files,getTempPath()) #First pass through the files to be recorded - sense check #we dont want to find half way through this long process that #a file does not exist, or is the wrong format!! for node in files: filecount+=1 #Generate a temp folder name for this file folder=getItemTempPath(filecount) if debug_secondrunthrough==False: #If it already exists destroy it to remove previous debris if os.path.exists(folder): #Remove all the files first deleteAllFilesInFolder(folder) subtitlefolder = os.path.join(folder, "stream.d") if os.path.exists(subtitlefolder): deleteAllFilesInFolder(subtitlefolder) os.rmdir(subtitlefolder) previewfolder = os.path.join(folder, "preview") if os.path.exists(previewfolder): deleteAllFilesInFolder(previewfolder) os.rmdir(previewfolder) #Remove the folder os.rmdir (folder) os.makedirs(folder) #Do the pre-process work preProcessFile(node,folder,filecount) if debug_secondrunthrough==False: #Loop through all the files again but this time do more serious work! filecount=0 for node in files: filecount+=1 folder=getItemTempPath(filecount) #Process this file processFile(node,folder,filecount) #We can only create the menus after the videos have been processed #and the commercials cut out so we get the correct run time length #for the chapter marks and thumbnails. #create the DVD menus... if wantMainMenu: createMenu(format, dpi, files.length) #Submenus are visible when you select the chapter menu while the recording is playing if wantChapterMenu: createChapterMenu(format, dpi, files.length) #Details Page are displayed just before playing each recording if wantDetailsPage: createDetailsPage(format, dpi, files.length) #DVD Author file if not wantMainMenu and not wantChapterMenu: createDVDAuthorXMLNoMenus(format, files.length) elif not wantMainMenu: createDVDAuthorXMLNoMainMenu(format, files.length) else: createDVDAuthorXML(format, files.length) #Check all the files will fit onto a recordable DVD if mediatype == DVD_DL: # dual layer performMPEG2Shrink(files, dvdrsize[1]) else: #single layer performMPEG2Shrink(files, dvdrsize[0]) filecount=0 for node in files: filecount+=1 folder=getItemTempPath(filecount) #Multiplex this file #(This also removes non-required audio feeds inside mpeg streams #(through re-multiplexing) we only take 1 video and 1 or 2 audio streams) pid=multiplexMPEGStream(os.path.join(folder,'stream.mv2'), os.path.join(folder,'stream0'), os.path.join(folder,'stream1'), os.path.join(folder,'final.mpg'), calcSyncOffset(filecount)) #Now all the files are completed and ready to be burnt runDVDAuthor() #Delete dvdauthor work files if debug_keeptempfiles==False: filecount=0 for node in files: filecount+=1 folder=getItemTempPath(filecount) if os.path.exists(os.path.join(folder, "stream.mv2")): os.remove(os.path.join(folder,'stream.mv2')) if os.path.exists(os.path.join(folder, "stream0.mp2")): os.remove(os.path.join(folder,'stream0.mp2')) if os.path.exists(os.path.join(folder, "stream1.mp2")): os.remove(os.path.join(folder,'stream1.mp2')) if os.path.exists(os.path.join(folder, "stream0.ac3")): os.remove(os.path.join(folder,'stream0.ac3')) if os.path.exists(os.path.join(folder, "stream1.ac3")): os.remove(os.path.join(folder,'stream1.ac3')) #Get DVD title from first processed file #Get the XML containing information about this item infoDOM = xml.dom.minidom.parse( os.path.join(getItemTempPath(1),"info.xml") ) #Error out if its the wrong XML if infoDOM.documentElement.tagName != "fileinfo": fatalError("The info.xml file (%s) doesn't look right" % os.path.join(folder,"info.xml")) title = expandItemText(infoDOM,"%title",1,0,0,0,0) # convert to ascii and truncate to 32 chars title = unicodedata.normalize('NFKD', title).encode('ASCII', 'ignore') title = title[:32] #Create the DVD ISO image if docreateiso == True or mediatype == FILE: CreateDVDISO(title) #Burn the DVD ISO image if doburn == True and mediatype != FILE: BurnDVDISO(title) #Move the created iso image to the given location if mediatype == FILE and savefilename != "": write("Moving ISO image to: %s" % savefilename) try: os.rename(os.path.join(getTempPath(), 'mythburn.iso'), savefilename) except: f1 = open(os.path.join(getTempPath(), 'mythburn.iso'), 'rb') f2 = open(savefilename, 'wb') data = f1.read(1024 * 1024) while data: f2.write(data) data = f1.read(1024 * 1024) f1.close() f2.close() os.unlink(os.path.join(getTempPath(), 'mythburn.iso')) else: write( "Nothing to do! (files)") else: write( "Nothing to do! (media)") return | fe2a3bbe33f9454e9fa98bae37d53582fd2d4bb8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13713/fe2a3bbe33f9454e9fa98bae37d53582fd2d4bb8/mythburn.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
2278,
12,
4688,
4672,
3536,
11203,
4929,
279,
8005,
451,
38,
321,
1719,
16,
10999,
3167,
2199,
358,
506,
2275,
487,
810,
12123,
2552,
2545,
1702,
303,
16,
2545,
6376,
4599,
16,
254... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
2278,
12,
4688,
4672,
3536,
11203,
4929,
279,
8005,
451,
38,
321,
1719,
16,
10999,
3167,
2199,
358,
506,
2275,
487,
810,
12123,
2552,
2545,
1702,
303,
16,
2545,
6376,
4599,
16,
254... |
return "lib%s%s" %( libname, self._shared_lib_ext ) | return "%s%s" %( libname, self._shared_lib_ext ) | def shared_library_filename (self, libname): """Return the shared library filename corresponding to the specified library name.""" return "lib%s%s" %( libname, self._shared_lib_ext ) | 4207ce83bd9d24b7f69e624e870b5e90d11bf1fe /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/4207ce83bd9d24b7f69e624e870b5e90d11bf1fe/msvccompiler.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5116,
67,
12083,
67,
3459,
261,
2890,
16,
2561,
529,
4672,
3536,
990,
326,
5116,
5313,
1544,
4656,
358,
326,
1269,
5313,
508,
12123,
327,
315,
2941,
9,
87,
9,
87,
6,
8975,
2561,
529,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5116,
67,
12083,
67,
3459,
261,
2890,
16,
2561,
529,
4672,
3536,
990,
326,
5116,
5313,
1544,
4656,
358,
326,
1269,
5313,
508,
12123,
327,
315,
2941,
9,
87,
9,
87,
6,
8975,
2561,
529,
... |
screen_size = (600, 1024) dpi = 167 fbase = 12 fsizes = [7.5, 9, 10, 12, 15.5, 20, 22, 24] | screen_size = (584, 978) | def __init__(self, *args, **kwargs): _Plugin.__init__(self, *args, **kwargs) self.width, self.height = self.screen_size fsizes = list(self.fsizes) self.fkey = list(self.fsizes) self.fsizes = [] for (name, num), size in izip(FONT_SIZES, fsizes): self.fsizes.append((name, num, float(size))) self.fnames = dict((name, sz) for name, _, sz in self.fsizes if name) self.fnums = dict((num, sz) for _, num, sz in self.fsizes if num) | 43333568dd434d57c8032a6bdf31aa869bf1cf36 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9125/43333568dd434d57c8032a6bdf31aa869bf1cf36/profiles.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
380,
1968,
16,
2826,
4333,
4672,
389,
3773,
16186,
2738,
972,
12,
2890,
16,
380,
1968,
16,
2826,
4333,
13,
365,
18,
2819,
16,
365,
18,
4210,
273,
365,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
380,
1968,
16,
2826,
4333,
4672,
389,
3773,
16186,
2738,
972,
12,
2890,
16,
380,
1968,
16,
2826,
4333,
13,
365,
18,
2819,
16,
365,
18,
4210,
273,
365,
... |
SystemFolderName = "[SystemFolder64]" | SystemFolderName = "[System64Folder]" | # Target files (.def and .a) go in PCBuild directory | df9f98d85aaae346f6c58fbea0bbe2c5f162fdc8 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3187/df9f98d85aaae346f6c58fbea0bbe2c5f162fdc8/msi.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
468,
5916,
1390,
261,
18,
536,
471,
263,
69,
13,
1960,
316,
26300,
3116,
1867,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
468,
5916,
1390,
261,
18,
536,
471,
263,
69,
13,
1960,
316,
26300,
3116,
1867,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
f.write("%s.%d" % (os.getenv("HOSTNAME"), os.getpid())) | f.write("%s %d\n" % (socket.getfqdn(), os.getpid())) | def lock(self): if not os.path.isdir(self.privateDir()): try: os.mkdir(self.privateDir()) except: # Maybe it was just created (race condition)? if not os.path.isdir(self.privateDir()): raise f = atomicCreate(self.lockFile(), "w") f.write("%s.%d" % (os.getenv("HOSTNAME"), os.getpid())) f.close() self.watchdog = LockWatchdog(self.lockFile()) self.watchdog.start() return True | e11f8939fad583db7f6a11b9fd1180b889a77ba3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9870/e11f8939fad583db7f6a11b9fd1180b889a77ba3/WikiDump.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2176,
12,
2890,
4672,
309,
486,
1140,
18,
803,
18,
291,
1214,
12,
2890,
18,
1152,
1621,
1435,
4672,
775,
30,
1140,
18,
26686,
12,
2890,
18,
1152,
1621,
10756,
1335,
30,
468,
14024,
518... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2176,
12,
2890,
4672,
309,
486,
1140,
18,
803,
18,
291,
1214,
12,
2890,
18,
1152,
1621,
1435,
4672,
775,
30,
1140,
18,
26686,
12,
2890,
18,
1152,
1621,
10756,
1335,
30,
468,
14024,
518... |
default['name'] = campaign_id.name + ' (Copy)' | default['name'] = campaign_id.name + ' (Copy)' | def copy(self, cr, uid, id, default=None, context={}): if not default: default = {} campaign_id = self.browse(cr, uid, id) if not default.get('name', False): default['name'] = campaign_id.name + ' (Copy)' default.update({'date_start': False, 'date': False, 'project_id': False, 'proposition_ids': []}) camp_copy_id = super(dm_campaign, self).copy(cr, uid, id, default, context) prop_ids = [x.id for x in campaign_id.proposition_ids] for proposition in campaign_id.proposition_ids: default = {'camp_id': camp_copy_id} prop_copy = self.pool.get('dm.campaign.proposition').copy(cr, uid, proposition.id, default, context) return camp_copy_id | 7ee897432c7e7d5a5c8e889fc429c3c1b66627fd /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7339/7ee897432c7e7d5a5c8e889fc429c3c1b66627fd/dm_campaign.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1610,
12,
2890,
16,
4422,
16,
4555,
16,
612,
16,
805,
33,
7036,
16,
819,
12938,
4672,
309,
486,
805,
30,
805,
273,
2618,
8965,
67,
350,
273,
365,
18,
25731,
12,
3353,
16,
4555,
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,
1610,
12,
2890,
16,
4422,
16,
4555,
16,
612,
16,
805,
33,
7036,
16,
819,
12938,
4672,
309,
486,
805,
30,
805,
273,
2618,
8965,
67,
350,
273,
365,
18,
25731,
12,
3353,
16,
4555,
16,
... |
>>> post.comments.append(author='myself', content='Bla bla') | >>> post.comments.append(author='myself', content='Bla bla', ... time=datetime.now()) | def _to_json(self, value): if isinstance(value, Schema): return value.unwrap() return dict(value) | 28425a662c4cd6db57c590ed9aced7ea9268b782 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9373/28425a662c4cd6db57c590ed9aced7ea9268b782/schema.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
869,
67,
1977,
12,
2890,
16,
460,
4672,
309,
1549,
12,
1132,
16,
4611,
4672,
327,
460,
18,
318,
4113,
1435,
327,
2065,
12,
1132,
13,
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,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
869,
67,
1977,
12,
2890,
16,
460,
4672,
309,
1549,
12,
1132,
16,
4611,
4672,
327,
460,
18,
318,
4113,
1435,
327,
2065,
12,
1132,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
if updated: | def updateRateAndETA(self,length): now = clock() updated = False self.currentSize = self.currentSize + length if self.lastUpdated < now - self.UPDATE_CLIENT_INTERVAL: self.blockTimes.append((now, self.currentSize)) #Only keep the last 100 packets if len(self.blockTimes)>100: self.blockTimes.pop(0) updated = True self.lastUpdated = now if updated: self.updateClient() | b4a40ffd0c80903294d330ba38f0ce0c351918bf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12354/b4a40ffd0c80903294d330ba38f0ce0c351918bf/download.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
4727,
1876,
31370,
12,
2890,
16,
2469,
4672,
2037,
273,
7268,
1435,
3526,
273,
1083,
365,
18,
2972,
1225,
273,
365,
18,
2972,
1225,
397,
769,
309,
365,
18,
2722,
7381,
411,
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,
1089,
4727,
1876,
31370,
12,
2890,
16,
2469,
4672,
2037,
273,
7268,
1435,
3526,
273,
1083,
365,
18,
2972,
1225,
273,
365,
18,
2972,
1225,
397,
769,
309,
365,
18,
2722,
7381,
411,
2037,
... | |
[(0, 1, None), (0, 10, None), (0, 19, None), (1, 0, None), (1, 8, None), (1, 2, None), (2, 1, None), (2, 3, None), (2, 6, None), (3, 2, None), (3, 19, None), (3, 4, None), (4, 17, None), (4, 3, None), (4, 5, None), (5, 4, None), (5, 6, None), (5, 15, None), (6, 2, None), (6, 5, None), (6, 7, None), (7, 8, None), (7, 14, None), (7, 6, None), (8, 1, None), (8, 9, None), (8, 7, None), (9, 8, None), (9, 10, None), (9, 13, None), (10, 0, None), (10, 9, None), (10, 11, None), (11, 10, None), (11, 12, None), (11, 18, None), (12, 16, None), (12, 11, None), (12, 13, None), (13, 9, None), (13, 12, None), (13, 14, None), (14, 15, None), (14, 13, None), (14, 7, None), (15, 16, None), (15, 5, None), (15, 14, None), (16, 17, None), (16, 12, None), (16, 15, None), (17, 16, None), (17, 18, None), (17, 4, None), (18, 19, None), (18, 17, None), (18, 11, None), (19, 0, None), (19, 18, None), (19, 3, None)] | [(0, 1, None), (0, 10, None), (0, 19, None), (1, 0, None), (1, 2, None), (1, 8, None), (2, 1, None), (2, 3, None), (2, 6, None), (3, 2, None), (3, 4, None), (3, 19, None), (4, 3, None), (4, 5, None), (4, 17, None), (5, 4, None), (5, 6, None), (5, 15, None), (6, 2, None), (6, 5, None), (6, 7, None), (7, 6, None), (7, 8, None), (7, 14, None), (8, 1, None), (8, 7, None), (8, 9, None), (9, 8, None), (9, 10, None), (9, 13, None), (10, 0, None), (10, 9, None), (10, 11, None), (11, 10, None), (11, 12, None), (11, 18, None), (12, 11, None), (12, 13, None), (12, 16, None), (13, 9, None), (13, 12, None), (13, 14, None), (14, 7, None), (14, 13, None), (14, 15, None), (15, 5, None), (15, 14, None), (15, 16, None), (16, 12, None), (16, 15, None), (16, 17, None), (17, 4, None), (17, 16, None), (17, 18, None), (18, 11, None), (18, 17, None), (18, 19, None), (19, 0, None), (19, 3, None), (19, 18, None)] | def edges(self, labels=True, sort=True): """ Return a list of edges. Each edge is a triple (u,v,l) where the edge is from u to v, with label l. | 110ad8af7371c78db0bef38792a9972850391fa4 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/110ad8af7371c78db0bef38792a9972850391fa4/graph.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5231,
12,
2890,
16,
3249,
33,
5510,
16,
1524,
33,
5510,
4672,
3536,
2000,
279,
666,
434,
5231,
18,
8315,
3591,
353,
279,
14543,
261,
89,
16,
90,
16,
80,
13,
1625,
326,
3591,
353,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5231,
12,
2890,
16,
3249,
33,
5510,
16,
1524,
33,
5510,
4672,
3536,
2000,
279,
666,
434,
5231,
18,
8315,
3591,
353,
279,
14543,
261,
89,
16,
90,
16,
80,
13,
1625,
326,
3591,
353,
628... |
def __init__(self, position, numInputs, numOutputs, label, moduleInstance): | def __init__(self, position, numInputs, numOutputs, labelList, moduleInstance): | def __init__(self, position, numInputs, numOutputs, label, moduleInstance): # parent constructor coRectangle.__init__(self, position, (0,0)) # we'll fill this out later self._size = (0,0) self._numInputs = numInputs self.inputLines = [None] * self._numInputs self._numOutputs = numOutputs # be careful with list concatenation! self.outputLines = [[] for i in range(self._numOutputs)] self._label = label self.moduleInstance = moduleInstance self.draggedPort = None self.enteredPort = None self.selected = False | e82a3df9d69221463a75b9cf3dc0cf9e5e1aefa5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4494/e82a3df9d69221463a75b9cf3dc0cf9e5e1aefa5/canvasObject.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1754,
16,
818,
10059,
16,
818,
13856,
16,
1433,
682,
16,
1605,
1442,
4672,
468,
982,
3885,
1825,
19463,
16186,
2738,
972,
12,
2890,
16,
1754,
16,
261,
20... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1754,
16,
818,
10059,
16,
818,
13856,
16,
1433,
682,
16,
1605,
1442,
4672,
468,
982,
3885,
1825,
19463,
16186,
2738,
972,
12,
2890,
16,
1754,
16,
261,
20... |
verbose('logfile: %s' % synctool_lib.LOGFILE) | verbose('logfile: %s' % synctool_config.LOGFILE) | def get_options(): global RUN_TASKS progname = os.path.basename(sys.argv[0]) synctool_lib.DRY_RUN = True # set default dry-run diff_file = None single_file = None if len(sys.argv) <= 1: return (diff_file, single_file) try: opts, args = getopt.getopt(sys.argv[1:], 'hc:d:1:tfvq', ['help', 'conf=', 'diff=', 'single=', 'tasks', 'fix', 'verbose', 'quiet', 'unix', 'masterlog']) except getopt.error, (reason): print '%s: %s' % (progname, reason) usage() sys.exit(1) except getopt.GetoptError, (reason): print '%s: %s' % (progname, reason) usage() sys.exit(1) except: usage() sys.exit(1) errors = 0 for opt, arg in opts: if opt in ('-h', '--help', '-?'): usage() sys.exit(1) if opt in ('-c', '--conf'): synctool_config.CONF_FILE = arg continue | 1f16bff0f2df8b7bfe6c1f2f49b5b86ea1d80ca4 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/13401/1f16bff0f2df8b7bfe6c1f2f49b5b86ea1d80ca4/synctool.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
2116,
13332,
2552,
15484,
67,
15580,
55,
225,
11243,
529,
273,
1140,
18,
803,
18,
13909,
12,
9499,
18,
19485,
63,
20,
5717,
225,
6194,
299,
1371,
67,
2941,
18,
6331,
61,
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,
336,
67,
2116,
13332,
2552,
15484,
67,
15580,
55,
225,
11243,
529,
273,
1140,
18,
803,
18,
13909,
12,
9499,
18,
19485,
63,
20,
5717,
225,
6194,
299,
1371,
67,
2941,
18,
6331,
61,
67,
... |
if self.attrs['use_name_for_id'] == 'true': | if (self.attrs['use_name_for_id'] == 'true' and self.SatisfiesOutputCondition()): | def EndParsing(self): super(type(self), self).EndParsing() | df2c3c3e306e513fd62fa1a1effb83985fe4ee5c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/df2c3c3e306e513fd62fa1a1effb83985fe4ee5c/message.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4403,
13963,
12,
2890,
4672,
2240,
12,
723,
12,
2890,
3631,
365,
2934,
1638,
13963,
1435,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
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,
4403,
13963,
12,
2890,
4672,
2240,
12,
723,
12,
2890,
3631,
365,
2934,
1638,
13963,
1435,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
self.active_desktop.rearrange() | def on_new_client(self, screen, client): #data = ClientData(self.active_desktop, client) #...attach_data_to(client, data) self.active_desktop.add_client(client) # TODO: focus it? self.active_desktop.rearrange() | a3dd52e8142bf465fe2f898277e402fc2adecbe1 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10761/a3dd52e8142bf465fe2f898277e402fc2adecbe1/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
67,
2704,
67,
2625,
12,
2890,
16,
5518,
16,
1004,
4672,
468,
892,
273,
2445,
751,
12,
2890,
18,
3535,
67,
31949,
16,
1004,
13,
468,
2777,
7331,
67,
892,
67,
869,
12,
2625,
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,
603,
67,
2704,
67,
2625,
12,
2890,
16,
5518,
16,
1004,
4672,
468,
892,
273,
2445,
751,
12,
2890,
18,
3535,
67,
31949,
16,
1004,
13,
468,
2777,
7331,
67,
892,
67,
869,
12,
2625,
16,
... | |
return S_ERROR( "Object %s has to be of type X509" % str( X509Obj ) ) | return S_ERROR( "Object %s has to be of type X509" % str( x509Obj ) ) | def setCertificate( self, x509Obj ): if type( x509Obj ) != GSI.crypto.X509Type: return S_ERROR( "Object %s has to be of type X509" % str( X509Obj ) ) self.__certObj = x509Obj self.__valid = True return S_OK() | 7cb26387718161a38e434b34c6381bc19eb1407f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/7cb26387718161a38e434b34c6381bc19eb1407f/X509Certificate.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
4719,
12,
365,
16,
619,
5995,
2675,
262,
30,
309,
618,
12,
619,
5995,
2675,
262,
480,
31046,
18,
18489,
18,
60,
5995,
559,
30,
327,
348,
67,
3589,
12,
315,
921,
738,
87,
711,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4719,
12,
365,
16,
619,
5995,
2675,
262,
30,
309,
618,
12,
619,
5995,
2675,
262,
480,
31046,
18,
18489,
18,
60,
5995,
559,
30,
327,
348,
67,
3589,
12,
315,
921,
738,
87,
711,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.