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 |
|---|---|---|---|---|---|---|
_io.printf ("asty near") | print "asty near" | def AsteroidNear (unit, how): num_ships=0 count=0 un = VS.getUnit (count) while (un): dd = cur.detection_distance if (unit.getSignificantDistance(un,unit)<how): if (unit.isAsteroid (un)): _io.printf ("asty near") return 1 count=count+1 if (un): un = _unit.getUnit(count) return 0 | 0196b99221f192e1640b9a18a3f627096af1b5a1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2883/0196b99221f192e1640b9a18a3f627096af1b5a1/random_encounters.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
432,
8190,
839,
24686,
261,
4873,
16,
3661,
4672,
818,
67,
3261,
87,
33,
20,
1056,
33,
20,
640,
273,
776,
55,
18,
588,
2802,
261,
1883,
13,
1323,
261,
318,
4672,
6957,
273,
662,
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,
432,
8190,
839,
24686,
261,
4873,
16,
3661,
4672,
818,
67,
3261,
87,
33,
20,
1056,
33,
20,
640,
273,
776,
55,
18,
588,
2802,
261,
1883,
13,
1323,
261,
318,
4672,
6957,
273,
662,
18,
... |
raise Killed() | return | def timeout_kill(self, accepter, timeout): while 1: try: self.kill_timer = Timer(timeout) accepter.accept() self.kill_timer.stop() except Interrupted: self.close() raise Killed() | 789552511254e06fcf2eb9751d6a1fcb66bbb4ed /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6934/789552511254e06fcf2eb9751d6a1fcb66bbb4ed/session.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2021,
67,
16418,
12,
2890,
16,
2791,
264,
16,
2021,
4672,
1323,
404,
30,
775,
30,
365,
18,
16418,
67,
12542,
273,
12290,
12,
4538,
13,
2791,
264,
18,
9436,
1435,
365,
18,
16418,
67,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2021,
67,
16418,
12,
2890,
16,
2791,
264,
16,
2021,
4672,
1323,
404,
30,
775,
30,
365,
18,
16418,
67,
12542,
273,
12290,
12,
4538,
13,
2791,
264,
18,
9436,
1435,
365,
18,
16418,
67,
... |
object = eval(expr, self.namespace) | thisobject = eval(expr, self.namespace) | def attr_matches(self, text): """Compute matches when text contains a dot. | 311279bc75ca8640eb928be4079866f776eb390d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8125/311279bc75ca8640eb928be4079866f776eb390d/rlcompleter.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1604,
67,
8436,
12,
2890,
16,
977,
4672,
3536,
7018,
1885,
1347,
977,
1914,
279,
3928,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1604,
67,
8436,
12,
2890,
16,
977,
4672,
3536,
7018,
1885,
1347,
977,
1914,
279,
3928,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
RDF.type, ICAL.rrule): | RDF.type, ICAL.sequence, ICAL.comment, ICAL.transp, ICAL.sym("class"), ICAL.categories, ICAL.organizer, ICAL.attendee, ICAL.valarm, ICAL.rrule) and \ str(s[1])[0:2] != "x:": | def exportEvent(self, sts, event): w = self._w | 04829bd0c6467d1a5ceb640d5981b3facc7553d5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3308/04829bd0c6467d1a5ceb640d5981b3facc7553d5/toIcal.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3359,
1133,
12,
2890,
16,
27099,
16,
871,
4672,
341,
273,
365,
6315,
91,
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,
1652,
3359,
1133,
12,
2890,
16,
27099,
16,
871,
4672,
341,
273,
365,
6315,
91,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
default -- integer (default: 0) position of default value in values list. | default -- object (default: 0) default value in values list | def __init__(self, values, label=None, default=None, nrows=None, ncols=None, width=None, buttons=False): r""" A drop down menu or a button bar that when pressed sets a variable to a given value. Use this in conjunction with the interact command. | 9b0588a62dad74d113388066108ab25ab411fb84 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/9b0588a62dad74d113388066108ab25ab411fb84/interact.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
924,
16,
1433,
33,
7036,
16,
805,
33,
7036,
16,
18871,
33,
7036,
16,
21330,
33,
7036,
16,
1835,
33,
7036,
16,
9502,
33,
8381,
4672,
436,
8395,
432,
364... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
924,
16,
1433,
33,
7036,
16,
805,
33,
7036,
16,
18871,
33,
7036,
16,
21330,
33,
7036,
16,
1835,
33,
7036,
16,
9502,
33,
8381,
4672,
436,
8395,
432,
364... |
return self.rexec.add_module(name) | return self.rexec.add_module(name) | def add_module(self, name): | ca6ae39a786f3d7535cba0f2aef10692eb750051 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/ca6ae39a786f3d7535cba0f2aef10692eb750051/rexec.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
67,
2978,
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,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
67,
2978,
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,
-100,
-100,
... |
Arguments: :searchwords: this can be one or more words which will be used to search in the packages' name and description for matches. If absent, all packages from all collections will be returned. :release: if the number is a valid PackageListing.collectionid, the search will be limited to that release. Otherwise (eg "0"), the search will return packages from all releases. :searchon: area of the search, should be one of: description, name, both :operator: can be either 'AND' or 'OR' | :kwarg searchwords: one or more words which will be used to search in the packages' name and description for matches. If absent, all packages from all collections will be returned. :kwarg release: if the number is a valid PackageListing.collectionid, the search will be limited to that release. Otherwise (eg "0"), the search will return packages from all releases. :kwarg searchon: area of the search, should be one of: description, name, both :kwarg operator: can be either 'AND' or 'OR' | def package(self, searchon='both', release=0, operator='AND', searchwords=''): '''Searches for packages | 3553f22d9f090d8afd52fa1af419412d539f272d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9953/3553f22d9f090d8afd52fa1af419412d539f272d/search.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2181,
12,
2890,
16,
1623,
265,
2218,
18237,
2187,
3992,
33,
20,
16,
3726,
2218,
4307,
2187,
1623,
3753,
2218,
11,
4672,
9163,
16294,
364,
5907,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2181,
12,
2890,
16,
1623,
265,
2218,
18237,
2187,
3992,
33,
20,
16,
3726,
2218,
4307,
2187,
1623,
3753,
2218,
11,
4672,
9163,
16294,
364,
5907,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
lg = self.stream.getEnd()-self.stream.tell() | lg = self.stream.getLastPos()-self.stream.tell() | def __init__(self, stream, parent): Filter.__init__(self, stream, parent) old = self.stream.tell() pos = self.stream.search("\0", 14) if pos == -1: raise Exception("Fails to find end of text") self.read("keyword", "!%us" % (pos-old), "Keyword") self.read("separator", "!B", "Null byte used to separe strings") lg = self.stream.getEnd()-self.stream.tell() self.read("text", "!%us" % lg, "Text") | 297b7d8af724b6b37a6cbf5a819250f115369691 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2280/297b7d8af724b6b37a6cbf5a819250f115369691/png.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1407,
16,
982,
4672,
4008,
16186,
2738,
972,
12,
2890,
16,
1407,
16,
982,
13,
1592,
273,
365,
18,
3256,
18,
88,
1165,
1435,
949,
273,
365,
18,
3256,
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,
1407,
16,
982,
4672,
4008,
16186,
2738,
972,
12,
2890,
16,
1407,
16,
982,
13,
1592,
273,
365,
18,
3256,
18,
88,
1165,
1435,
949,
273,
365,
18,
3256,
18... |
Logging.info("Failed to remove ", i, kw = "init") | Logging.info("Failed to remove ", i, kw = "init") | def removeWithName(names): """ Created: Unknown, KP Description: remove modules with the given names from the system path """ removethese = [] for directory in sys.path: for directoryToBeRemoved in names: if directory.find(directoryToBeRemoved) != -1: removethese.append(directory) for i in removethese: try: sys.path.remove(i) except ValueError: Logging.info("Failed to remove ", i, kw = "init") | 51eb7efbd47abaa0e8a0282a154f6aa787052985 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2877/51eb7efbd47abaa0e8a0282a154f6aa787052985/Configuration.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1206,
17557,
12,
1973,
4672,
3536,
12953,
30,
9077,
16,
1475,
52,
6507,
30,
1206,
4381,
598,
326,
864,
1257,
628,
326,
2619,
589,
3536,
2797,
546,
3392,
273,
5378,
364,
1867,
316,
2589,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1206,
17557,
12,
1973,
4672,
3536,
12953,
30,
9077,
16,
1475,
52,
6507,
30,
1206,
4381,
598,
326,
864,
1257,
628,
326,
2619,
589,
3536,
2797,
546,
3392,
273,
5378,
364,
1867,
316,
2589,
... |
>>> print IP('127.0.0.1').strCompressed() 127.0.0.1 >>> print IP('2001:0658:022a:cafe:0200::1').strCompressed() 2001:658:22a:cafe:200::1 | >>> IP('127.0.0.1').strCompressed() '127.0.0.1' >>> IP('2001:0658:022a:cafe:0200::1').strCompressed() '2001:658:22a:cafe:200::1' >>> IP('ffff:ffff:ffff:ffff:ffff:f:f:fffc/127').strCompressed() 'ffff:ffff:ffff:ffff:ffff:f:f:fffc/127' | def strCompressed(self, wantprefixlen = None): """Return a string representation in compressed format using '::' Notation. | dd4e29cb95a203b75bd7bb2e54ff00169533b10e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14367/dd4e29cb95a203b75bd7bb2e54ff00169533b10e/IPy.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
609,
16841,
12,
2890,
16,
2545,
3239,
1897,
273,
599,
4672,
3536,
990,
279,
533,
4335,
316,
8968,
740,
1450,
12680,
2288,
367,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
609,
16841,
12,
2890,
16,
2545,
3239,
1897,
273,
599,
4672,
3536,
990,
279,
533,
4335,
316,
8968,
740,
1450,
12680,
2288,
367,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
if orignal_name.upper() != original_name: | if original_name.upper() != original_name: | def case_insensitive_tests(class_): """Class decorator that nullifies tests that require a case-insensitive file system.""" if sys.platform not in ('win32', 'darwin', 'cygwin'): original_name = os.listdir('.')[0] if orignal_name.upper() != original_name: changed_name = original_name.upper() else: changed_name = original_name.lower() if os.path.exists(changed_name): return class_ return unittest.TestCase else: return class_ | c7017895c32aa689262ce9280b008dc147312f50 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12029/c7017895c32aa689262ce9280b008dc147312f50/util.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
648,
67,
31940,
67,
16341,
12,
1106,
67,
4672,
3536,
797,
7367,
716,
446,
5032,
7434,
716,
2583,
279,
648,
17,
31940,
585,
2619,
12123,
309,
2589,
18,
9898,
486,
316,
7707,
8082,
1578,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
648,
67,
31940,
67,
16341,
12,
1106,
67,
4672,
3536,
797,
7367,
716,
446,
5032,
7434,
716,
2583,
279,
648,
17,
31940,
585,
2619,
12123,
309,
2589,
18,
9898,
486,
316,
7707,
8082,
1578,
... |
break | if aindex== -1 or aDec: break elif d[ 0 ]== aindex: if not aDec: aDec= acodec.Decoder( aparams ) afr= aDec.decode( d[ 1 ] ) if afr and afr.data: self.aBitRate= afr.bitrate self.aSampleRate= afr.sample_rate self.aChannels= afr.channels if vindex== -1 or vDec: break | def _getVStreamParams( self, vindex, vparams, r ): # Decode one video frame and 1 audio frame to get stream data vDec= None for d in r: try: # Demux file into streams if d[ 0 ]== vindex: if not vDec: vDec= vcodec.Decoder( vparams ) vfr= vDec.decode( d[ 1 ] ) if vfr and vfr.data: if vfr.aspect_ratio> .0: self.pictureSize= ( int( vfr.size[ 1 ]* vfr.aspect_ratio ), vfr.size[ 1 ] ) else: self.pictureSize= vfr.size self.vBitRate= vfr.bitrate break except: self.err.append( sys.exc_info() ) break | c3a3c2f30c4310861582df4d5b48de338da7e8d1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2107/c3a3c2f30c4310861582df4d5b48de338da7e8d1/player.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
58,
1228,
1370,
12,
365,
16,
331,
1615,
16,
331,
2010,
16,
436,
262,
30,
468,
6209,
1245,
6191,
2623,
471,
404,
7447,
2623,
358,
336,
1407,
501,
331,
1799,
33,
599,
364,
30... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
58,
1228,
1370,
12,
365,
16,
331,
1615,
16,
331,
2010,
16,
436,
262,
30,
468,
6209,
1245,
6191,
2623,
471,
404,
7447,
2623,
358,
336,
1407,
501,
331,
1799,
33,
599,
364,
30... |
utils.CommaJoin(ial.nodes)) | utils.CommaJoin(ial.result)) | def _RunAllocator(self): """Run the allocator based on input opcode. | 680f0a8902924895400e60746840f81b11ec35cf /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7542/680f0a8902924895400e60746840f81b11ec35cf/cmdlib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1997,
21156,
12,
2890,
4672,
3536,
1997,
326,
26673,
2511,
603,
810,
11396,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1997,
21156,
12,
2890,
4672,
3536,
1997,
326,
26673,
2511,
603,
810,
11396,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
pass | warnings.warn('redefine is ignored') | def load(self, node, location=None): self.__node = node | 59ac3144ce9d78daac8dc16de8804297d5cb5b38 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/59ac3144ce9d78daac8dc16de8804297d5cb5b38/XMLSchema.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1262,
12,
2890,
16,
756,
16,
2117,
33,
7036,
4672,
365,
16186,
2159,
273,
756,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1262,
12,
2890,
16,
756,
16,
2117,
33,
7036,
4672,
365,
16186,
2159,
273,
756,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
class Include(XMLSchemaComponent, MarkerInterface): | class Include(XMLSchemaComponent): | def getSchema(self): """if schema is not defined, first look for a Schema class instance in parent Schema. Else if not defined resolve schemaLocation and create a new Schema class instance, and keep a hard reference. """ if not self._schema: ns = self.attributes['namespace'] schema = self._parent().getImportSchemas().get(ns) if not schema and self._parent()._parent: schema = self._parent()._parent().getImportSchemas().get(ns) if not schema: url = self.attributes.get('schemaLocation') if not url: raise SchemaError, 'namespace(%s) is unknown' %ns base_url = self._parent().getBaseUrl() reader = SchemaReader(base_url=base_url) reader._imports = self._parent().getImportSchemas() reader._includes = self._parent().getIncludeSchemas() self._schema = reader.loadFromURL(url) return self._schema or schema | 6c6678d8443cc0ac1425216db36bdd74c2f8cb7b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/13054/6c6678d8443cc0ac1425216db36bdd74c2f8cb7b/XMLSchema.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11088,
12,
2890,
4672,
3536,
430,
1963,
353,
486,
2553,
16,
1122,
2324,
364,
279,
4611,
667,
791,
316,
982,
4611,
18,
225,
16289,
309,
486,
2553,
2245,
1963,
2735,
471,
752,
279,
394,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11088,
12,
2890,
4672,
3536,
430,
1963,
353,
486,
2553,
16,
1122,
2324,
364,
279,
4611,
667,
791,
316,
982,
4611,
18,
225,
16289,
309,
486,
2553,
2245,
1963,
2735,
471,
752,
279,
394,
... |
self.packageRootFolder = root | self.sourceFolder = root | def build(self, root, resources=None, **options): """Create a package for some given root folder. | 18f917dac1d0c4373b8f3ea1de666a7605f47d91 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/18f917dac1d0c4373b8f3ea1de666a7605f47d91/buildpkg.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1361,
12,
2890,
16,
1365,
16,
2703,
33,
7036,
16,
2826,
2116,
4672,
3536,
1684,
279,
2181,
364,
2690,
864,
1365,
3009,
18,
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,
1361,
12,
2890,
16,
1365,
16,
2703,
33,
7036,
16,
2826,
2116,
4672,
3536,
1684,
279,
2181,
364,
2690,
864,
1365,
3009,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
def fastSave(self, context, widget, name): | def fastSave(self, context, widget, name, value): | def fastSave(self, context, widget, name): pass | 5a8bd231f596fa01d75d6ac9602fa7521b797293 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6366/5a8bd231f596fa01d75d6ac9602fa7521b797293/OWContexts.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4797,
4755,
12,
2890,
16,
819,
16,
3604,
16,
508,
16,
460,
4672,
1342,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
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,
4797,
4755,
12,
2890,
16,
819,
16,
3604,
16,
508,
16,
460,
4672,
1342,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
def setStatus(self, message): | def onConnecting(self, message): | def setStatus(self, message): self.loggingInView.setStatus(message) | c338c6cb7f0454c41a17991375eccbe876c2dd63 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/206/c338c6cb7f0454c41a17991375eccbe876c2dd63/login.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
30049,
12,
2890,
16,
883,
4672,
365,
18,
11167,
382,
1767,
18,
542,
1482,
12,
2150,
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,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
30049,
12,
2890,
16,
883,
4672,
365,
18,
11167,
382,
1767,
18,
542,
1482,
12,
2150,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
self.packages[pid] = self.parser.parse("%s/conf.xml"%(file)) | self.packages[pid] = self.parser.parse(confxml) | def _treatDir(self, file, mp, access): #file_access_proto, file_access_uri, file_access_port, file_access_path): pid = None try: if os.path.isdir(file): self.logger.debug("loading package metadata (xml) in %s"%(file)) l_package = self.parser.parse("%s/conf.xml"%(file)) pid = l_package.id | b0f534c1c62dee149db03723a97376f34d084a59 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5988/b0f534c1c62dee149db03723a97376f34d084a59/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
17283,
1621,
12,
2890,
16,
585,
16,
6749,
16,
2006,
4672,
468,
768,
67,
3860,
67,
9393,
16,
585,
67,
3860,
67,
1650,
16,
585,
67,
3860,
67,
655,
16,
585,
67,
3860,
67,
803,
46... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
17283,
1621,
12,
2890,
16,
585,
16,
6749,
16,
2006,
4672,
468,
768,
67,
3860,
67,
9393,
16,
585,
67,
3860,
67,
1650,
16,
585,
67,
3860,
67,
655,
16,
585,
67,
3860,
67,
803,
46... |
def fl_show_form_window(form): """ fl_show_form_window(form) -> window reference """ retval = _fl_show_form_window(form) | def fl_show_form_window(pForm): """ fl_show_form_window(pForm) -> window reference """ retval = _fl_show_form_window(pForm) | def fl_show_form_window(form): """ fl_show_form_window(form) -> window reference """ retval = _fl_show_form_window(form) return retval | 9942dac8ce2b35a1e43615a26fd8e7054ef805d3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2429/9942dac8ce2b35a1e43615a26fd8e7054ef805d3/xformslib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1183,
67,
4500,
67,
687,
67,
5668,
12,
84,
1204,
4672,
3536,
1183,
67,
4500,
67,
687,
67,
5668,
12,
84,
1204,
13,
317,
2742,
2114,
3536,
225,
5221,
273,
389,
2242,
67,
4500,
67,
687,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1183,
67,
4500,
67,
687,
67,
5668,
12,
84,
1204,
4672,
3536,
1183,
67,
4500,
67,
687,
67,
5668,
12,
84,
1204,
13,
317,
2742,
2114,
3536,
225,
5221,
273,
389,
2242,
67,
4500,
67,
687,... |
- C{?}: File not managed by Conary - C{A}: File added since last commit (or since package created if no commit) - C{M}: File modified since last commit - C{R}: File removed since last commit | - C{?}: File not managed by Conary - C{A}: File added since last commit (or since package created if no commit) - C{M}: File modified since last commit - C{R}: File removed since last commit | def getCheckoutStatus(self, targetDir): """ Create summary of changes regarding all files in a directory as a list of C{(I{status}, I{filename})} tuples where C{I{status}} is a single character describing the status of the file C{I{filename}}: - C{?}: File not managed by Conary - C{A}: File added since last commit (or since package created if no commit) - C{M}: File modified since last commit - C{R}: File removed since last commit @param targetDir: name of directory for which to fetch status. @type targetDir: string @rtype: list """ return checkin.generateStatus(self._getRepositoryClient(), dirName=targetDir) | 39bc0cb0071ce5b530979a7626224c793f13dc21 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8748/39bc0cb0071ce5b530979a7626224c793f13dc21/conaryfacade.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
18581,
1482,
12,
2890,
16,
19410,
4672,
3536,
1788,
4916,
434,
3478,
29012,
777,
1390,
316,
279,
1867,
487,
279,
666,
434,
385,
95,
12,
45,
95,
2327,
5779,
467,
95,
3459,
6792,
97... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
18581,
1482,
12,
2890,
16,
19410,
4672,
3536,
1788,
4916,
434,
3478,
29012,
777,
1390,
316,
279,
1867,
487,
279,
666,
434,
385,
95,
12,
45,
95,
2327,
5779,
467,
95,
3459,
6792,
97... |
% (source,`base`,`ext.name`))) | % (source,`base`,`ext_name`))) | def f2py_sources (self, sources, ext): | 8875658de63eec827c77c67a6ebf2c5f2434d714 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14925/8875658de63eec827c77c67a6ebf2c5f2434d714/run_f2py.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
284,
22,
2074,
67,
10141,
261,
2890,
16,
5550,
16,
1110,
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,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
284,
22,
2074,
67,
10141,
261,
2890,
16,
5550,
16,
1110,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
if sleept > 0: sleep(sleept) | if slept > 0: sleep(slept) | def lorconTX(pktNum=5,packet=None, channel=1 ,sleept=0): """ Uses lorcon to send the actual packets """ #why the hell does pktNum default = 5? #pktNum is number each packet is sent count = 0 tx.setfunctionalmode("INJECT") if tx.getchannel() != channel: try: tx.setchannel(channel) #set the channel to send packets on except pylorcon.LorconError,e: message.printError(["\nError Message from lorcon:",str(e), "Unable to set channel card does not seem to support it", "Skipping packet"]) return False while count != pktNum: try: tx.txpacket(packet) except pylorcon.LorconError,e: message.printMessage(['\nError Message from lorcon:',str(e), "Are you sure you are using the correct driver with the -d option?", "Or try ifconfig up on the card you provided and its vap."]) sys.exit(-1) count += 1 else: if sleept > 0: sleep(sleept) return | fa857b01093718726fcfae8d4894e406c4919f54 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9343/fa857b01093718726fcfae8d4894e406c4919f54/airdrop-ng.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
328,
280,
591,
16556,
12,
5465,
88,
2578,
33,
25,
16,
11482,
33,
7036,
16,
1904,
33,
21,
269,
87,
11182,
337,
33,
20,
4672,
3536,
14854,
328,
280,
591,
358,
1366,
326,
3214,
12640,
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,
328,
280,
591,
16556,
12,
5465,
88,
2578,
33,
25,
16,
11482,
33,
7036,
16,
1904,
33,
21,
269,
87,
11182,
337,
33,
20,
4672,
3536,
14854,
328,
280,
591,
358,
1366,
326,
3214,
12640,
3... |
pb = ProgressBar(self, iterations=self.nFolds) | pb = None | def test(self, learner=None): # testing if self.results and learner: learners = [learner] else: learners = self.learnDict.values() if not learners: return | 4a5d0b6408fb255b8754ad2849a498c83b9e6cc3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6366/4a5d0b6408fb255b8754ad2849a498c83b9e6cc3/OWTestLearners.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
12,
2890,
16,
884,
24834,
33,
7036,
4672,
468,
7769,
309,
365,
18,
4717,
471,
884,
24834,
30,
16094,
414,
273,
306,
298,
24834,
65,
469,
30,
16094,
414,
273,
365,
18,
21346,
5014... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1842,
12,
2890,
16,
884,
24834,
33,
7036,
4672,
468,
7769,
309,
365,
18,
4717,
471,
884,
24834,
30,
16094,
414,
273,
306,
298,
24834,
65,
469,
30,
16094,
414,
273,
365,
18,
21346,
5014... |
return offset - self.PointerToRawData + self.VirtualAddress | return offset - adjust_PointerToRawData( self.PointerToRawData ) + adjust_VirtualAddress( self.VirtualAddress, self.pe.OPTIONAL_HEADER.SectionAlignment ) | def get_rva_from_offset(self, offset): return offset - self.PointerToRawData + self.VirtualAddress | cd44c5a15607839646e8bfd332a2bfd25114fac3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4177/cd44c5a15607839646e8bfd332a2bfd25114fac3/pefile.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
4962,
69,
67,
2080,
67,
3348,
12,
2890,
16,
1384,
4672,
327,
1384,
300,
5765,
67,
4926,
774,
31733,
12,
365,
18,
4926,
774,
31733,
262,
397,
5765,
67,
6466,
1887,
12,
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,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
4962,
69,
67,
2080,
67,
3348,
12,
2890,
16,
1384,
4672,
327,
1384,
300,
5765,
67,
4926,
774,
31733,
12,
365,
18,
4926,
774,
31733,
262,
397,
5765,
67,
6466,
1887,
12,
365,
1... |
""" | """) | def make_drawer(name): texture = (name.find("_texture_") != -1) grad = (name.find("_grad_") != -1) solid = (name.find("_solid_") != -1) shade = (name.find("_shade") != -1) opaque = (name.find("_opaque") != -1) white = (name.find("_white") != -1) if grad and solid: print "#error grad and solid" if grad and white: print "#error grad and white" if shade and opaque: print "#error shade and opaque" print "static void", name, "(uintptr_t state, int x1, int y, int x2) {" if not texture: if grad: print """\ state_grad_any_2d *gs = (state_grad_any_2d *)state; state_solid_any_2d *s = &gs->solid; ALLEGRO_COLOR cur_color = s->cur_color; """ else: print """\ state_solid_any_2d *s = (state_solid_any_2d *)state; ALLEGRO_COLOR cur_color = s->cur_color; """ else: if grad: print """\ state_texture_grad_any_2d *gs = (state_texture_grad_any_2d *)state; state_texture_solid_any_2d *s = &gs->solid; ALLEGRO_COLOR cur_color = s->cur_color; """ else: print """\ state_texture_solid_any_2d *s = (state_texture_solid_any_2d *)state; """ print """\ float u = s->u; float v = s->v; """ # XXX keep target in the state # XXX still don't understand why y-1 is required print """\ ALLEGRO_BITMAP *target = al_get_target_bitmap(); x1 -= target->lock_x; x2 -= target->lock_x; y -= target->lock_y; y--; if (y < 0 || y >= target->lock_h) { return; } if (x1 < 0) { """ if texture: print """\ u += s->du_dx * -x1; v += s->dv_dx * -x1; """ if grad: print """\ cur_color.r += gs->color_dx.r * -x1; cur_color.g += gs->color_dx.g * -x1; cur_color.b += gs->color_dx.b * -x1; cur_color.a += gs->color_dx.a * -x1; """ print """\ x1 = 0; } if (x2 > target->lock_w - 1) { x2 = target->lock_w - 1; } """ print "{" if shade: print """\ int op, src_mode, dst_mode; int op_alpha, src_alpha, dst_alpha; al_get_separate_blender(&op, &src_mode, &dst_mode, &op_alpha, &src_alpha, &dst_alpha); """ print "{" if texture: print """\ const int src_format = s->texture->locked_region.format; const int src_size = al_get_pixel_size(src_format); ALLEGRO_COLOR src_color = {0, 0, 0, 0}; /* Ensure u in [0, s->w) and v in [0, s->h). */ while (u < 0) u += s->w; while (v < 0) v += s->h; u = fmodf(u, s->w); v = fmodf(v, s->h); ASSERT(0 <= u); ASSERT(u < s->w); ASSERT(0 <= v); ASSERT(v < s->h); """ print """\ const int dst_format = target->locked_region.format; uint8_t *dst_data = (uint8_t *)target->locked_region.data + y * target->locked_region.pitch + x1 * al_get_pixel_size(dst_format); """ print """\ for (; x1 <= x2; x1++) { """ if not texture: print """\ ALLEGRO_COLOR src_color = cur_color; """ else: print """\ const int src_x = _al_fast_float_to_int(u); const int src_y = _al_fast_float_to_int(v); uint8_t *src_data = (uint8_t *)s->texture->locked_region.data + (src_y - s->texture->lock_y) * s->texture->locked_region.pitch + (src_x - s->texture->lock_x) * src_size; _AL_INLINE_GET_PIXEL(src_format, src_data, src_color, false); """ if grad: print """\ SHADE_COLORS(src_color, cur_color); """ elif not white: print """\ SHADE_COLORS(src_color, s->cur_color); """ if shade: print """\ { ALLEGRO_COLOR dst_color; ALLEGRO_COLOR result; _AL_INLINE_GET_PIXEL(dst_format, dst_data, dst_color, false); _al_blend_inline(&src_color, &dst_color, op, src_mode, dst_mode, op_alpha, src_alpha, dst_alpha, &result); _AL_INLINE_PUT_PIXEL(dst_format, dst_data, result, true); } """ else: print """\ _AL_INLINE_PUT_PIXEL(dst_format, dst_data, src_color, true); """ if texture: print """\ u += s->du_dx; v += s->dv_dx; if (u < 0) u += s->w; else if (u >= s->w) u -= s->w; if (v < 0) v += s->h; else if (v >= s->h) v -= s->h; """ if grad: print """\ cur_color.r += gs->color_dx.r; cur_color.g += gs->color_dx.g; cur_color.b += gs->color_dx.b; cur_color.a += gs->color_dx.a; """ print """\ } } } } """ | 45b2735ddbc24779c2277b5afafaede5a9314d1b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14418/45b2735ddbc24779c2277b5afafaede5a9314d1b/make_scanline_drawers.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1221,
67,
9446,
264,
12,
529,
4672,
11428,
273,
261,
529,
18,
4720,
2932,
67,
955,
594,
67,
7923,
480,
300,
21,
13,
6058,
273,
261,
529,
18,
4720,
2932,
67,
9974,
67,
7923,
480,
300,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1221,
67,
9446,
264,
12,
529,
4672,
11428,
273,
261,
529,
18,
4720,
2932,
67,
955,
594,
67,
7923,
480,
300,
21,
13,
6058,
273,
261,
529,
18,
4720,
2932,
67,
9974,
67,
7923,
480,
300,... |
guzuta_debug = alpm.PM_LOG_WARNING | alpm.PM_LOG_ERROR | def __init__(self): gtk.gdk.threads_init() self.th = None self.prev_return = None | a4081b40f6e74444f607da29b08aa39587e19706 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2759/a4081b40f6e74444f607da29b08aa39587e19706/gui.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
22718,
18,
75,
2883,
18,
12495,
67,
2738,
1435,
365,
18,
451,
273,
599,
365,
18,
10001,
67,
2463,
273,
599,
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,
1001,
2738,
972,
12,
2890,
4672,
22718,
18,
75,
2883,
18,
12495,
67,
2738,
1435,
365,
18,
451,
273,
599,
365,
18,
10001,
67,
2463,
273,
599,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100... | |
authentication. | authentication. | def __init__(self, email=None, password=None, account_type='HOSTED_OR_GOOGLE', service=None, source=None, server=None, additional_headers=None): """Creates an object of type GDataService. | 2fc3c8b5e04f49e7854d86afdf5c528572665ee2 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6580/2fc3c8b5e04f49e7854d86afdf5c528572665ee2/service.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
2699,
33,
7036,
16,
2201,
33,
7036,
16,
2236,
67,
723,
2218,
8908,
2056,
67,
916,
67,
16387,
13369,
900,
2187,
1156,
33,
7036,
16,
1084,
33,
7036,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
2699,
33,
7036,
16,
2201,
33,
7036,
16,
2236,
67,
723,
2218,
8908,
2056,
67,
916,
67,
16387,
13369,
900,
2187,
1156,
33,
7036,
16,
1084,
33,
7036,
16,
... |
global notebook, waiting | def render(self, request): if request.args.has_key('email'): if request.args['email'][0] is not None : global notebook, waiting user = request.args['username'][0] passwd = request.args['password'][0] destaddr = """%s""" % request.args['email'][0] from sage.server.notebook.smtpsend import send_mail from sage.server.notebook.register import make_key, build_msg # TODO: make this come from the server settings key = make_key() listenaddr = notebook.address port = notebook.port secure = notebook.secure fromaddr = 'no-reply@%s' % listenaddr body = build_msg(key, user, listenaddr, port, secure) send_mail(self, fromaddr, destaddr, "SAGE Notebook Registration",body) waiting[key] = user # now say that the user has been registered. s = """\ | dfd2ccbcd8e060bcacdbe83b7a24432fcfe1e133 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9417/dfd2ccbcd8e060bcacdbe83b7a24432fcfe1e133/twist.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1743,
12,
2890,
16,
590,
4672,
309,
590,
18,
1968,
18,
5332,
67,
856,
2668,
3652,
11,
4672,
309,
590,
18,
1968,
3292,
3652,
3546,
63,
20,
65,
353,
486,
599,
294,
729,
273,
590,
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,
1743,
12,
2890,
16,
590,
4672,
309,
590,
18,
1968,
18,
5332,
67,
856,
2668,
3652,
11,
4672,
309,
590,
18,
1968,
3292,
3652,
3546,
63,
20,
65,
353,
486,
599,
294,
729,
273,
590,
18,
... | |
return self._executeSingleFileCatalogFunction(lfn,'setReplicaHost',catalogs=catalogs) else: return self._executeFileCatalogFunction(lfn,'setReplicaHost',catalogs=catalogs) class CatalogDirectory(CatalogBase): def getCatalogIsDirectory(self,lfn,singleFile=False,catalogs=[]): | return self._executeSingleFileCatalogFunction( lfn, 'setReplicaHost', catalogs=catalogs ) else: return self._executeFileCatalogFunction( lfn, 'setReplicaHost', catalogs=catalogs ) class CatalogDirectory( CatalogBase ): def getCatalogIsDirectory( self, lfn, singleFile=False, catalogs=[] ): | def setCatalogReplicaHost(self,lfn,singleFile=False,catalogs=[]): """ Change the registered SE for a replica in the FileCatalog 'lfn' is the replica information to change """ if singleFile: return self._executeSingleFileCatalogFunction(lfn,'setReplicaHost',catalogs=catalogs) else: return self._executeFileCatalogFunction(lfn,'setReplicaHost',catalogs=catalogs) | 9fabceb719d19d46d8b75011d2932552dbe360f9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/9fabceb719d19d46d8b75011d2932552dbe360f9/ReplicaManager.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
9769,
14222,
2594,
12,
2890,
16,
80,
4293,
16,
7526,
812,
33,
8381,
16,
2574,
287,
14072,
33,
8526,
4672,
3536,
7576,
326,
4104,
3174,
364,
279,
12335,
316,
326,
1387,
9769,
225,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
9769,
14222,
2594,
12,
2890,
16,
80,
4293,
16,
7526,
812,
33,
8381,
16,
2574,
287,
14072,
33,
8526,
4672,
3536,
7576,
326,
4104,
3174,
364,
279,
12335,
316,
326,
1387,
9769,
225,
... |
'__path__', '__name__', '__epydoc_sort__'): | '__path__', '__name__', '__epydoc_sort__', '__docformat__'): | def __init__(self, mod, verbosity=0): self._tmp_var = {} self._tmp_type = {} ObjDoc.__init__(self, mod, verbosity) | 7c104f9538e3be13dc9ef608bcda22da50b21f4e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/7c104f9538e3be13dc9ef608bcda22da50b21f4e/objdoc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
681,
16,
11561,
33,
20,
4672,
365,
6315,
5645,
67,
1401,
273,
2618,
365,
6315,
5645,
67,
723,
273,
2618,
18760,
1759,
16186,
2738,
972,
12,
2890,
16,
681... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
681,
16,
11561,
33,
20,
4672,
365,
6315,
5645,
67,
1401,
273,
2618,
365,
6315,
5645,
67,
723,
273,
2618,
18760,
1759,
16186,
2738,
972,
12,
2890,
16,
681... |
if key.find(item) == 0: | if key.endswith(item) or key.endswith(item + os.sep): | def genitem(self, item): itemlist = item.split(os.sep) | ef5445df808806b2755bef5e21a12aeeebd9c3a8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11836/ef5445df808806b2755bef5e21a12aeeebd9c3a8/pycategories.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3157,
1726,
12,
2890,
16,
761,
4672,
761,
1098,
273,
761,
18,
4939,
12,
538,
18,
10814,
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,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3157,
1726,
12,
2890,
16,
761,
4672,
761,
1098,
273,
761,
18,
4939,
12,
538,
18,
10814,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
while not os.path.isdir(":Mac:Plugins"): | while not os.path.isdir(":Mac:PlugIns"): | def gotopluginfolder(): """Go to the plugin folder, assuming we are somewhere in the Python tree""" import os while not os.path.isdir(":Mac:Plugins"): os.chdir("::") os.chdir(":Mac:Plugins") if verbose: print "current directory is", os.getcwd() | 43d9dab42c1d765ac82059ace912eb4294d765a4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/43d9dab42c1d765ac82059ace912eb4294d765a4/ConfigurePython.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2897,
4094,
5609,
13332,
3536,
5741,
358,
326,
1909,
3009,
16,
15144,
732,
854,
22234,
316,
326,
6600,
2151,
8395,
1930,
1140,
225,
1323,
486,
1140,
18,
803,
18,
291,
1214,
2932,
30,
999... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2897,
4094,
5609,
13332,
3536,
5741,
358,
326,
1909,
3009,
16,
15144,
732,
854,
22234,
316,
326,
6600,
2151,
8395,
1930,
1140,
225,
1323,
486,
1140,
18,
803,
18,
291,
1214,
2932,
30,
999... |
import re _typeprog = re.compile('^([^/:]+):') match = _typeprog.match(url) | import re _typeprog = re.compile('^([^/:]+):') match = _typeprog.match(url) | def splittype(url): global _typeprog if _typeprog is None: import re _typeprog = re.compile('^([^/:]+):') match = _typeprog.match(url) if match: scheme = match.group(1) return scheme, url[len(scheme) + 1:] return None, url | 9223cdc5dd58ba9e3dee718e56be87cfe6050ceb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/9223cdc5dd58ba9e3dee718e56be87cfe6050ceb/urllib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1416,
723,
12,
718,
4672,
2552,
389,
723,
14654,
309,
389,
723,
14654,
353,
599,
30,
1930,
283,
389,
723,
14654,
273,
283,
18,
11100,
2668,
66,
8178,
16880,
7941,
2497,
13,
225,
845,
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,
1416,
723,
12,
718,
4672,
2552,
389,
723,
14654,
309,
389,
723,
14654,
353,
599,
30,
1930,
283,
389,
723,
14654,
273,
283,
18,
11100,
2668,
66,
8178,
16880,
7941,
2497,
13,
225,
845,
2... |
wl = self.lastmax = max( (len( items[-1] ), self.lastmax) ) | wl = shared.lastmax = max( (len( items[-1] ), shared.lastmax) ) | def calc_lsize(r): """Calculate the size required on screen to display the list.""" | bcb1496c968881715634380c9e6bc4206a4388d6 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6932/bcb1496c968881715634380c9e6bc4206a4388d6/bpython.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7029,
67,
80,
1467,
12,
86,
4672,
3536,
8695,
326,
963,
1931,
603,
5518,
358,
2562,
326,
666,
12123,
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,
7029,
67,
80,
1467,
12,
86,
4672,
3536,
8695,
326,
963,
1931,
603,
5518,
358,
2562,
326,
666,
12123,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
if impure: | if alters: | def optimize_propagate(self, node): if not isinstance(node, ComplexNode): return node | b03aadd5b3cad0ef70b4d2812c22eb9f2db4fcec /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2040/b03aadd5b3cad0ef70b4d2812c22eb9f2db4fcec/esotope-bfc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10979,
67,
5986,
346,
340,
12,
2890,
16,
756,
4672,
309,
486,
1549,
12,
2159,
16,
16060,
907,
4672,
327,
756,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10979,
67,
5986,
346,
340,
12,
2890,
16,
756,
4672,
309,
486,
1549,
12,
2159,
16,
16060,
907,
4672,
327,
756,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
{'message' : 'foo', 'args' : ('foo',)}), | {'message' : 'foo', 'args' : ('foo',), 'filename' : None, 'errno' : None, 'strerror' : None}), | def testAttributes(self): # test that exception attributes are happy | 506cc189a97a468180ee18e4c4cd1b4e81242222 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/506cc189a97a468180ee18e4c4cd1b4e81242222/test_exceptions.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
2498,
12,
2890,
4672,
468,
1842,
716,
1520,
1677,
854,
5622,
2074,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1842,
2498,
12,
2890,
4672,
468,
1842,
716,
1520,
1677,
854,
5622,
2074,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
self.setupNodeWeb(job,False,dag.webPage.lastSection.lastSub,page,string.strip(cp.get(name,ifoString+'web'))+repr(times[ifoList[0]]),dag.cache) | self.setupNodeWeb(job,False,dag.webPage.lastSection.lastSub,page,string.strip(cp.get(name,ifoString+'-web'))+repr(times[ifoList[0]]),dag.cache) | def __init__(self,job,dNode,times,ifoList,name,cp,opts,dag,qeventCommand): """ job = A CondorDAGJob that can run an instance of H1H2 qevent. """ | ae8e0137e534eb18449e3875f8566797346e0caa /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3592/ae8e0137e534eb18449e3875f8566797346e0caa/fu_Condor.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
4688,
16,
72,
907,
16,
8293,
16,
20299,
682,
16,
529,
16,
4057,
16,
4952,
16,
30204,
16,
85,
2575,
2189,
4672,
3536,
1719,
273,
432,
735,
72,
280,
40,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
4688,
16,
72,
907,
16,
8293,
16,
20299,
682,
16,
529,
16,
4057,
16,
4952,
16,
30204,
16,
85,
2575,
2189,
4672,
3536,
1719,
273,
432,
735,
72,
280,
40,
... |
HTMLParser, but Beautiful Soup can nonetheless choke or lose data | sgmllib, but Beautiful Soup can nonetheless choke or lose data | def __init__(self, markup="", parseOnlyThese=None, fromEncoding=None, markupMassage=True, smartQuotesTo=XML_ENTITIES, convertEntities=None, selfClosingTags=None, isHTML=False, builder=HTMLParserBuilder): """The Soup object is initialized as the 'root tag', and the provided markup (which can be a string or a file-like object) is fed into the underlying parser. | 7300e101f39b7a1a436c6765d140c987cbc58a45 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4404/7300e101f39b7a1a436c6765d140c987cbc58a45/BeautifulSoup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
9813,
1546,
3113,
1109,
3386,
29690,
33,
7036,
16,
628,
4705,
33,
7036,
16,
9813,
18060,
410,
33,
5510,
16,
13706,
14292,
774,
33,
4201,
67,
2222,
25673,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
9813,
1546,
3113,
1109,
3386,
29690,
33,
7036,
16,
628,
4705,
33,
7036,
16,
9813,
18060,
410,
33,
5510,
16,
13706,
14292,
774,
33,
4201,
67,
2222,
25673,
... |
"""Base interface for membership events. | """Base interface for residence events. | def __call__(self, event): """Invoke the callback.""" | 915f7ac30714b8ae022b61aa0d4f518ca4012a2a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7127/915f7ac30714b8ae022b61aa0d4f518ca4012a2a/interfaces.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1991,
972,
12,
2890,
16,
871,
4672,
3536,
10969,
326,
1348,
12123,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1991,
972,
12,
2890,
16,
871,
4672,
3536,
10969,
326,
1348,
12123,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
gdata.service.GDataService.Delete(self, item.GetEditLink().href) | try: gdata.service.GDataService.Delete(self, item.GetEditLink().href) except gdata.service.RequestError, e: print 'Could not delete event: ' + e[0]['body'] | def Delete(self, entries, entry_type, delete_default): """Extends Delete to handle a list of entries. Keyword arguments: entries: List of entries to delete. entry_type: String describing the thing being deleted (e.g. album, post). delete_default: Whether or not the default action should be deletion. """ if delete_default and self.prompt_for_delete: prompt_str = '(Y/n)' elif self.prompt_for_delete: prompt_str = '(y/N)' for item in entries: if self.prompt_for_delete: delete_str = raw_input('Are you SURE you want to delete %s "%s"? %s: ' % (entry_type, item.title.text, prompt_str)) if not delete_str: delete = delete_default else: delete = delete_str.lower() == 'y' else: delete = True if delete: gdata.service.GDataService.Delete(self, item.GetEditLink().href) | b004b0929693a5b97f42ea1c918c0625e089d4ac /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2899/b004b0929693a5b97f42ea1c918c0625e089d4ac/util.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2504,
12,
2890,
16,
3222,
16,
1241,
67,
723,
16,
1430,
67,
1886,
4672,
3536,
19581,
2504,
358,
1640,
279,
666,
434,
3222,
18,
225,
18317,
1775,
30,
3222,
30,
987,
434,
3222,
358,
1430,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2504,
12,
2890,
16,
3222,
16,
1241,
67,
723,
16,
1430,
67,
1886,
4672,
3536,
19581,
2504,
358,
1640,
279,
666,
434,
3222,
18,
225,
18317,
1775,
30,
3222,
30,
987,
434,
3222,
358,
1430,... |
if acct.result != payment.APPROVED: | if pmt.result != payment.APPROVED: | def act_checkout(self): """Records a sale in the database.""" | 724f0402e17e935397d0bd6103bec8a4c9871691 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8821/724f0402e17e935397d0bd6103bec8a4c9871691/Cashier.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1328,
67,
17300,
12,
2890,
4672,
3536,
6499,
279,
272,
5349,
316,
326,
2063,
12123,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1328,
67,
17300,
12,
2890,
4672,
3536,
6499,
279,
272,
5349,
316,
326,
2063,
12123,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
c.close() | def segmentFindWithMetadata_vx(self, arg): """ Given a list of attributes to query on, the first of which is the segfind client/server communication protocol version. Corresponds to the METASEGSVX method in the LSCsegFindServer RPC protocol. | d1a0dff1d641a909e2b667172a9e8d34d645d80d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5758/d1a0dff1d641a909e2b667172a9e8d34d645d80d/LSCsegFindServer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3267,
3125,
1190,
2277,
67,
26982,
12,
2890,
16,
1501,
4672,
3536,
16803,
279,
666,
434,
1677,
358,
843,
603,
16,
326,
1122,
434,
1492,
353,
326,
2291,
4720,
1004,
19,
3567,
18279,
1771,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3267,
3125,
1190,
2277,
67,
26982,
12,
2890,
16,
1501,
4672,
3536,
16803,
279,
666,
434,
1677,
358,
843,
603,
16,
326,
1122,
434,
1492,
353,
326,
2291,
4720,
1004,
19,
3567,
18279,
1771,... | |
anydbm.open(dbfile, "c").close() ftype = whichdb.whichdb(findfile("foo.db")) | anydbm.open(os.path.splitext(dbfile)[0], "c").close() ftype = whichdb.whichdb(dbfile) | def test_anydbm_create(self): "verify that anydbm.open does *not* create a bsddb185 file" tmpdir = tempfile.mkdtemp() try: try: dbfile = os.path.join(tmpdir, "foo.db") anydbm.open(dbfile, "c").close() ftype = whichdb.whichdb(findfile("foo.db")) self.assertNotEqual(ftype, "bsddb185") finally: os.unlink(dbfile) finally: os.rmdir(tmpdir) | 1c431669b9e5c6d30296ae7c76b0a179b701bcf1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/1c431669b9e5c6d30296ae7c76b0a179b701bcf1/test_bsddb185.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
2273,
1966,
81,
67,
2640,
12,
2890,
4672,
315,
8705,
716,
1281,
1966,
81,
18,
3190,
1552,
380,
902,
14,
752,
279,
7081,
449,
70,
30489,
585,
6,
20213,
273,
13275,
18,
24816,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2273,
1966,
81,
67,
2640,
12,
2890,
4672,
315,
8705,
716,
1281,
1966,
81,
18,
3190,
1552,
380,
902,
14,
752,
279,
7081,
449,
70,
30489,
585,
6,
20213,
273,
13275,
18,
24816,
... |
elif user.posts.count() >= forum_settings.FORUM_STAR_3: | elif posts >= forum_settings.FORUM_STAR_3: | def forum_stars(user): if user.posts.count() >= forum_settings.FORUM_STAR_5: return mark_safe('<img src="%sforum/img/stars/Star_5.gif" alt="" >' % (settings.MEDIA_URL)) elif user.posts.count() >= forum_settings.FORUM_STAR_4_HALF: return mark_safe('<img src="%sforum/img/stars/Star_4_Half.gif" alt="" >' % (settings.MEDIA_URL)) elif user.posts.count() >= forum_settings.FORUM_STAR_4: return mark_safe('<img src="%sforum/img/stars/Star_4.gif" alt="" >' % (settings.MEDIA_URL)) elif user.posts.count() >= forum_settings.FORUM_STAR_3_HALF: return mark_safe('<img src="%sforum/img/stars/Star_3_Half.gif" alt="" >' % (settings.MEDIA_URL)) elif user.posts.count() >= forum_settings.FORUM_STAR_3: return mark_safe('<img src="%sforum/img/stars/Star_3.gif" alt="" >' % (settings.MEDIA_URL)) elif user.posts.count() >= forum_settings.FORUM_STAR_2_HALF: return mark_safe('<img src="%sforum/img/stars/Star_2_Half.gif" alt="" >' % (settings.MEDIA_URL)) elif user.posts.count() >= forum_settings.FORUM_STAR_2: return mark_safe('<img src="%sforum/img/stars/Star_2.gif" alt="" >' % (settings.MEDIA_URL)) elif user.posts.count() >= forum_settings.FORUM_STAR_1_HALF: return mark_safe('<img src="%sforum/img/stars/Star_1_Half.gif" alt="" >' % (settings.MEDIA_URL)) elif user.posts.count() >= forum_settings.FORUM_STAR_1: return mark_safe('<img src="%sforum/img/stars/Star_1.gif" alt="" >' % (settings.MEDIA_URL)) elif user.posts.count() >= forum_settings.FORUM_STAR_0_HALF: return mark_safe('<img src="%sforum/img/stars/Star_0_Half.gif" alt="" >' % (settings.MEDIA_URL)) else: return mark_safe('<img src="%sforum/img/stars/Star_0.gif" alt="" >' % (settings.MEDIA_URL)) | 3b86f217ff6e6ad464cca6ec2419884f35c2355f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/13701/3b86f217ff6e6ad464cca6ec2419884f35c2355f/forum_extras.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11283,
67,
334,
5913,
12,
1355,
4672,
309,
729,
18,
11660,
18,
1883,
1435,
1545,
11283,
67,
4272,
18,
7473,
2799,
67,
20943,
67,
25,
30,
327,
2267,
67,
4626,
2668,
32,
6081,
1705,
1161... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11283,
67,
334,
5913,
12,
1355,
4672,
309,
729,
18,
11660,
18,
1883,
1435,
1545,
11283,
67,
4272,
18,
7473,
2799,
67,
20943,
67,
25,
30,
327,
2267,
67,
4626,
2668,
32,
6081,
1705,
1161... |
os.popen("fontforge -script merge-gregoria-%d.pe" % i) | system("fontforge -script merge-gregoria-%d.pe" % i) | def main(): global fontName, fout header() # first let's "clean" gregoria of all these openFont("Gregoria.otf") fontName="gregoria" first_step() adjustAdditionalGlyphs() save_font("gregoria") openFont("Gregoria-Auctae.otf") fontName="gregoria-auctae" first_step() adjustAuctaeAdditionalGlyphs() save_font("gregoria-auctae") openFont("Gregoria-Deminutae.otf") fontName="gregoria-deminutae" first_step() adjustDeminutaeAdditionalGlyphs() save_font("gregoria-deminutae") # now we have our gregorio fonts with (only) the glyphs we want in it, and a table with all those glyphs # let's merge the fonts in one big gregoria.sfd mergeFonts("gregoria", "gregoria-auctae", "gregoria") mergeFonts("gregoria", "gregoria-deminutae", "gregoria") for i in range(9): mergeFonts("gregoria", "gregoria-%d" % i, "gregoria") footer() fout.close() os.popen("python squarize.py gregoria") print "Generating gregorio glyphs for gregoria.\nThis step can be extremely long (10 minutes)." os.popen("fontforge -script gregoria.pe") os.popen("fontforge -script create-gregoria.pe") for i in range(1, 12): os.popen("fontforge -script merge-gregoria-%d.pe" % i) cutGregoria() createMap() finishCreation() | 5793a8d9c69a539fd28403473bebf475356c4700 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7096/5793a8d9c69a539fd28403473bebf475356c4700/gregoria2gregorio.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
2552,
3512,
461,
16,
17382,
1446,
1435,
468,
1122,
2231,
1807,
315,
6200,
6,
314,
13430,
1155,
434,
777,
4259,
1696,
5711,
2932,
43,
13430,
1155,
18,
352,
74,
7923,
3512,
46... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
2552,
3512,
461,
16,
17382,
1446,
1435,
468,
1122,
2231,
1807,
315,
6200,
6,
314,
13430,
1155,
434,
777,
4259,
1696,
5711,
2932,
43,
13430,
1155,
18,
352,
74,
7923,
3512,
46... |
self.stats.reset() | def run(self): | 9b09cf6ef07d2ee54bff2ed908465c95a67128b1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4253/9b09cf6ef07d2ee54bff2ed908465c95a67128b1/main.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... | |
"""Write a single Fasta record to the file""" | """Write a single Fasta record to the file.""" | def write_record(self, record): """Write a single Fasta record to the file""" assert self._header_written assert not self._footer_written self._record_written = True if self.record2title : title=self.clean(record2title(record)) else : id = self.clean(record.id) description = self.clean(record.description) | 695836585d1de006c6ead2c56402229ed8c14492 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7167/695836585d1de006c6ead2c56402229ed8c14492/FastaIO.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
67,
3366,
12,
2890,
16,
1409,
4672,
3536,
3067,
279,
2202,
9545,
69,
1409,
358,
326,
585,
12123,
1815,
365,
6315,
3374,
67,
9748,
1815,
486,
365,
6315,
14723,
67,
9748,
365,
6315,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
67,
3366,
12,
2890,
16,
1409,
4672,
3536,
3067,
279,
2202,
9545,
69,
1409,
358,
326,
585,
12123,
1815,
365,
6315,
3374,
67,
9748,
1815,
486,
365,
6315,
14723,
67,
9748,
365,
6315,
... |
context=None, limit=80): | context=None, limit=None): | def name_search(self, cursor, user, name='', args=None, operator='ilike', context=None, limit=80): if args is None: args = [] args = args[:] if name: args += [(self._rec_name, operator, name)] ids = self.search(cursor, user, args, limit=limit, context=context) res = self.name_get(cursor, user, ids, context) return res | a898feca851453ee15e0f90ecea1810d7ec4721a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9266/a898feca851453ee15e0f90ecea1810d7ec4721a/orm.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
508,
67,
3072,
12,
2890,
16,
3347,
16,
729,
16,
508,
2218,
2187,
833,
33,
7036,
16,
3726,
2218,
330,
2547,
2187,
819,
33,
7036,
16,
1800,
33,
7036,
4672,
309,
833,
353,
599,
30,
833,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
508,
67,
3072,
12,
2890,
16,
3347,
16,
729,
16,
508,
2218,
2187,
833,
33,
7036,
16,
3726,
2218,
330,
2547,
2187,
819,
33,
7036,
16,
1800,
33,
7036,
4672,
309,
833,
353,
599,
30,
833,... |
if os.sep != "/": def _normpath(path): return path.replace(os.sep, "/") else: def _normpath(path): return path | def FileHeader(self): """Return the per-file header as a string.""" dt = self.date_time dosdate = (dt[0] - 1980) << 9 | dt[1] << 5 | dt[2] dostime = dt[3] << 11 | dt[4] << 5 | (dt[5] // 2) if self.flag_bits & 0x08: # Set these to zero because we write them after the file data CRC = compress_size = file_size = 0 else: CRC = self.CRC compress_size = self.compress_size file_size = self.file_size header = struct.pack(structFileHeader, stringFileHeader, self.extract_version, self.reserved, self.flag_bits, self.compress_type, dostime, dosdate, CRC, compress_size, file_size, len(self.filename), len(self.extra)) return header + self.filename + self.extra | b9626da22afbd4eb94f94fb61f1e46aebace0f47 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/b9626da22afbd4eb94f94fb61f1e46aebace0f47/zipfile.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1387,
1864,
12,
2890,
4672,
3536,
990,
326,
1534,
17,
768,
1446,
487,
279,
533,
12123,
3681,
273,
365,
18,
712,
67,
957,
16153,
712,
273,
261,
7510,
63,
20,
65,
300,
5342,
3672,
13,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1387,
1864,
12,
2890,
4672,
3536,
990,
326,
1534,
17,
768,
1446,
487,
279,
533,
12123,
3681,
273,
365,
18,
712,
67,
957,
16153,
712,
273,
261,
7510,
63,
20,
65,
300,
5342,
3672,
13,
... | |
relations.append((oid,disp)) | relations.append((oid,disp,groupCombatReaction)) | def readFromText(self,textPath): """Imports faction relations from specified text file.""" id_relations,id_eid = self.id_relations, self.id_eid aliases = self.aliases ins = bolt.CsvReader(textPath) for fields in ins: if len(fields) < 7 or fields[2][:2] != '0x': continue med,mmod,mobj,oed,omod,oobj,disp = fields[:9] mid = (GPath(aliases.get(mmod,mmod)),int(mobj[2:],16)) oid = (GPath(aliases.get(omod,omod)),int(oobj[2:],16)) disp = int(disp) relations = id_relations.get(mid) if relations is None: relations = id_relations[mid] = [] for index,entry in enumerate(relations): if entry[0] == oid: relations[index] = (oid,disp) break else: relations.append((oid,disp)) ins.close() | 81923914b6989a5d38c47e7038a12ad2760d1ff6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6682/81923914b6989a5d38c47e7038a12ad2760d1ff6/bosh.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
20876,
1528,
12,
2890,
16,
955,
743,
4672,
3536,
13347,
284,
1128,
7467,
628,
1269,
977,
585,
12123,
612,
67,
15018,
16,
350,
67,
73,
350,
273,
365,
18,
350,
67,
15018,
16,
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,
20876,
1528,
12,
2890,
16,
955,
743,
4672,
3536,
13347,
284,
1128,
7467,
628,
1269,
977,
585,
12123,
612,
67,
15018,
16,
350,
67,
73,
350,
273,
365,
18,
350,
67,
15018,
16,
365,
18,
... |
"CVSRevision":"$Revision: 1.76 $", | "CVSRevision":"$Revision: 1.77 $", | def callingparams(self): """Returns list of parameters to save with results.""" #Test whether k has been set try: self.k except (NameError, AttributeError): self.k=None try: self.mass except (NameError, AttributeError): self.mass=None #Form dictionary of inputs params = {"ystart":self.ystart, "tstart":self.tstart, "tend":self.tend, "tstep_wanted":self.tstep_wanted, "tstep_min":self.tstep_min, "k":self.k, #model dependent params "mass":self.mass, "eps":self.eps, "dxsav":self.dxsav, "solver":self.solver, "classname":self.__class__.__name__, "CVSRevision":"$Revision: 1.76 $", "datetime":datetime.datetime.now() } return params | c4876e0df6b9e7a67eae1f1fba6af29f031cc588 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7283/c4876e0df6b9e7a67eae1f1fba6af29f031cc588/cosmomodels.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4440,
2010,
12,
2890,
4672,
3536,
1356,
666,
434,
1472,
358,
1923,
598,
1686,
12123,
468,
4709,
2856,
417,
711,
2118,
444,
775,
30,
365,
18,
79,
1335,
261,
461,
668,
16,
6394,
4672,
36... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4440,
2010,
12,
2890,
4672,
3536,
1356,
666,
434,
1472,
358,
1923,
598,
1686,
12123,
468,
4709,
2856,
417,
711,
2118,
444,
775,
30,
365,
18,
79,
1335,
261,
461,
668,
16,
6394,
4672,
36... |
raise AssertionError, (msg or '%s != %s' (first, second)) | raise AssertionError, (msg or '%s != %s' % (first, second)) | def failUnlessEqual(self, first, second, msg=None): if not first == second: raise AssertionError, (msg or '%s != %s' (first, second)) | 5e3758d35a6809c31c90a4ec1d96f7b2e095b8b0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/5e3758d35a6809c31c90a4ec1d96f7b2e095b8b0/unittest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2321,
984,
2656,
5812,
12,
2890,
16,
1122,
16,
2205,
16,
1234,
33,
7036,
4672,
309,
486,
1122,
422,
2205,
30,
1002,
12068,
16,
261,
3576,
578,
1995,
87,
480,
738,
87,
11,
261,
3645,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2321,
984,
2656,
5812,
12,
2890,
16,
1122,
16,
2205,
16,
1234,
33,
7036,
4672,
309,
486,
1122,
422,
2205,
30,
1002,
12068,
16,
261,
3576,
578,
1995,
87,
480,
738,
87,
11,
261,
3645,
... |
except ValueError, IndexError: | except (ValueError, IndexError): | def _check_duration(option, opt, value): try: if value[-1].isdigit(): return int(value) else: return int(value[:-1]) * _time_units[value[-1]] except ValueError, IndexError: raise OptionValueError( 'option %s: invalid duration: %r' % (opt, value)) | b3cda98dd19062aa2cd267f08e7a3334aaaae9fb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8546/b3cda98dd19062aa2cd267f08e7a3334aaaae9fb/test_optparse.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1893,
67,
8760,
12,
3482,
16,
2153,
16,
460,
4672,
775,
30,
309,
460,
18919,
21,
8009,
291,
11052,
13332,
327,
509,
12,
1132,
13,
469,
30,
327,
509,
12,
1132,
10531,
17,
21,
571... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
8760,
12,
3482,
16,
2153,
16,
460,
4672,
775,
30,
309,
460,
18919,
21,
8009,
291,
11052,
13332,
327,
509,
12,
1132,
13,
469,
30,
327,
509,
12,
1132,
10531,
17,
21,
571... |
if not isRequestTypeEmpty(requestType)['Value']: | if not self.isRequestTypeEmpty(requestType)['Value']: | def isRequestEmpty(self): """ Check whether all sub-requests are complete """ requestTypes = self.getSubRequestTypes()['Value'] for requestType in requestTypes: if not isRequestTypeEmpty(requestType)['Value']: return S_OK(0) return S_OK(1) | 4664c75dc38724d7de7e05549542e93ba0aeca11 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12864/4664c75dc38724d7de7e05549542e93ba0aeca11/RequestContainer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
353,
691,
1921,
12,
2890,
4672,
3536,
2073,
2856,
777,
720,
17,
11420,
854,
3912,
3536,
590,
2016,
273,
365,
18,
588,
1676,
691,
2016,
1435,
3292,
620,
3546,
364,
27179,
316,
590,
2016,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
691,
1921,
12,
2890,
4672,
3536,
2073,
2856,
777,
720,
17,
11420,
854,
3912,
3536,
590,
2016,
273,
365,
18,
588,
1676,
691,
2016,
1435,
3292,
620,
3546,
364,
27179,
316,
590,
2016,
... |
self.assertEquals(unittest.wait(d), "End") | self.assertEquals(util.wait(d), "End") | def _cbDoWait(self, result): self.assertEquals(result, "Beginning") d = defer.succeed("End") self.assertEquals(unittest.wait(d), "End") | d7098ebcbaad74554c2ff539e2dfb62ac775b6d1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/d7098ebcbaad74554c2ff539e2dfb62ac775b6d1/test_util.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
7358,
3244,
5480,
12,
2890,
16,
563,
4672,
365,
18,
11231,
8867,
12,
2088,
16,
315,
8149,
2093,
7923,
302,
273,
2220,
18,
87,
5286,
5288,
2932,
1638,
7923,
365,
18,
11231,
8867,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
7358,
3244,
5480,
12,
2890,
16,
563,
4672,
365,
18,
11231,
8867,
12,
2088,
16,
315,
8149,
2093,
7923,
302,
273,
2220,
18,
87,
5286,
5288,
2932,
1638,
7923,
365,
18,
11231,
8867,
1... |
if not isinstance(prec, (int, long, Integer)): raise TypeError, "prec must be an integer" elif isinstance(prec, (int, long)): prec = Integer(prec) | def Zq(q, prec = 20, type = 'capped-abs', modulus = None, names=None, print_mode=None, halt = 40, zp_name = None, check = True): r""" Return an unramified extension of $\Z_p$. INPUT: q -- prime power prec -- integer (default: 20) type -- string (default: 'capped-abs'); see the documentation for Zp modulus -- polynomial (default: None) names -- tuple print_mode -- string (default: None); see the documentation for Zp halt -- integer (default: 40): only applicable for type='lazy' zp_name -- string (default: None): a name for the underlying Zp's prime check -- bool (default: True): whether to verify that the input is valid. OUTPUT: -- an unramified extension of Z_p EXAMPLES: sage: k.<a> = Zq(4); k Unramified Extension of 2-adic Ring with capped absolute precision 20 in a defined by (1 + O(2^20))*x^2 + (1 + O(2^20))*x + (1 + O(2^20)) sage: k.<a> = Zq(3^10); k Unramified Extension of 3-adic Ring with capped absolute precision 20 in a defined by (1 + O(3^20))*x^10 + (2 + O(3^20))*x^6 + (2 + O(3^20))*x^5 + (2 + O(3^20))*x^4 + (1 + O(3^20))*x + (2 + O(3^20)) """ if check: if names is None: raise TypeError, "You must specify the name of the generator." if isinstance(names, (list, tuple)): names = names[0] if not isinstance(prec, (int, long, Integer)): raise TypeError, "prec must be an integer" elif isinstance(prec, (int, long)): prec = Integer(prec) if not (modulus is None or isinstance(modulus, Polynomial)): raise TypeError, "modulus must be a polynomial" if not isinstance(names, str): names = str(names) #raise TypeError, "names must be a string" if not isinstance(halt, (int, long, Integer)): raise TypeError, "halt must be an integer" elif isinstance(halt, (int, long)): halt = Integer(halt) q = Integer(q) F = q.factor() if len(F) != 1: raise ValueError, "q must be a prime power" if F[0][1] == 1: return Zp(q, prec, type, print_mode, halt, names, check) base = Zp(F[0][0], prec, type, print_mode, halt, zp_name, check = False) if modulus is None: from sage.rings.finite_field import FiniteField as GF if zp_name is None: zp_name = (str(F[0][0]),) modulus = PolynomialRing(base, 'x')(GF(q, names).modulus().change_ring(ZZ)) return ExtensionFactory(base, modulus, prec, print_mode, halt, names, check, unram = True) | 3d6a2f6640c9f91d771a4d25cd85172364acd9a1 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/3d6a2f6640c9f91d771a4d25cd85172364acd9a1/factory.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2285,
85,
12,
85,
16,
13382,
273,
4200,
16,
618,
273,
296,
5909,
1845,
17,
5113,
2187,
24770,
273,
599,
16,
1257,
33,
7036,
16,
1172,
67,
3188,
33,
7036,
16,
18389,
273,
8063,
16,
99... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2285,
85,
12,
85,
16,
13382,
273,
4200,
16,
618,
273,
296,
5909,
1845,
17,
5113,
2187,
24770,
273,
599,
16,
1257,
33,
7036,
16,
1172,
67,
3188,
33,
7036,
16,
18389,
273,
8063,
16,
99... | |
return http.Response(stream="saved") | return HTMLResponse(stream="saved") | def render(self, ctx): self.worksheet.revert_to_last_saved_state() self.worksheet.quit() return http.Response(stream="saved") | 39855fabbbbe971c1c1d64566b1625e9c1c6d482 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/39855fabbbbe971c1c1d64566b1625e9c1c6d482/twist.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1743,
12,
2890,
16,
1103,
4672,
365,
18,
1252,
8118,
18,
266,
1097,
67,
869,
67,
2722,
67,
14077,
67,
2019,
1435,
365,
18,
1252,
8118,
18,
27176,
1435,
327,
1062,
18,
1064,
12,
3256,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1743,
12,
2890,
16,
1103,
4672,
365,
18,
1252,
8118,
18,
266,
1097,
67,
869,
67,
2722,
67,
14077,
67,
2019,
1435,
365,
18,
1252,
8118,
18,
27176,
1435,
327,
1062,
18,
1064,
12,
3256,
... |
all_builds.append([age_ctime, hosts[host], "<a href='%s?function=View+Host;host=%s;tree=%s;compiler=%s | if revision: all_builds.append([age_ctime, hosts[host], "<a href='%s?function=View+Host;host=%s;tree=%s;compiler=%s | def status_cmp(a, b): bstat = build_status_vals(b) astat = build_status_vals(a) | 967e16b8636e65d67b0a71635be86dd31c637fde /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7314/967e16b8636e65d67b0a71635be86dd31c637fde/build.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1267,
67,
9625,
12,
69,
16,
324,
4672,
324,
5642,
273,
1361,
67,
2327,
67,
4524,
12,
70,
13,
3364,
270,
273,
1361,
67,
2327,
67,
4524,
12,
69,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1267,
67,
9625,
12,
69,
16,
324,
4672,
324,
5642,
273,
1361,
67,
2327,
67,
4524,
12,
70,
13,
3364,
270,
273,
1361,
67,
2327,
67,
4524,
12,
69,
13,
2,
-100,
-100,
-100,
-100,
-100,
... |
guide = getSingletonDDBObject(views.guide) (mode, location) = guide.getLocation() if mode == 'template': self.switchTemplate(location, baseURL=config.get(prefs.CHANNEL_GUIDE_URL)) elif mode == 'url': controller.frame.selectURL(location, \ controller.frame.mainDisplay) else: raise StandardError("DTV: Invalid guide load mode '%s'" % mode) | if controller.frame.getDisplay(controller.frame.mainDisplay) is self.display: guide = getSingletonDDBObject(views.guide) (mode, location) = guide.getLocation() if mode == 'template': self.switchTemplate(location, baseURL=config.get(prefs.CHANNEL_GUIDE_URL)) elif mode == 'url': controller.frame.selectURL(location, \ controller.frame.mainDisplay) else: raise StandardError("DTV: Invalid guide load mode '%s'" % mode) | def goToGuide(self): guide = getSingletonDDBObject(views.guide) # Does the Guide want to implement itself as a redirection to # a URL? (mode, location) = guide.getLocation() | 719b292d267ba0a37d6b146b8cb07209c863e490 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12354/719b292d267ba0a37d6b146b8cb07209c863e490/app.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1960,
774,
17424,
12,
2890,
4672,
7343,
273,
31662,
40,
2290,
921,
12,
7061,
18,
12118,
13,
468,
9637,
326,
13018,
2545,
358,
2348,
6174,
487,
279,
19611,
358,
468,
279,
1976,
35,
261,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1960,
774,
17424,
12,
2890,
4672,
7343,
273,
31662,
40,
2290,
921,
12,
7061,
18,
12118,
13,
468,
9637,
326,
13018,
2545,
358,
2348,
6174,
487,
279,
19611,
358,
468,
279,
1976,
35,
261,
... |
if "copy-resources" in jobTriggers or "api" in jobTriggers: | if "copy-resources" in jobTriggers or "api" in jobTriggers or "lint-check" in jobTriggers: | def run(self): config = self._job job = self._job require = config.get("require", {}) use = config.get("use", {}) | f5d4ca3e2e1dc0f3d07bc854aac0f88163180ebf /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5718/f5d4ca3e2e1dc0f3d07bc854aac0f88163180ebf/Generator.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
4672,
642,
273,
365,
6315,
4688,
1719,
565,
273,
365,
6315,
4688,
2583,
273,
642,
18,
588,
2932,
6528,
3113,
2618,
13,
999,
377,
273,
642,
18,
588,
2932,
1202,
3113,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
4672,
642,
273,
365,
6315,
4688,
1719,
565,
273,
365,
6315,
4688,
2583,
273,
642,
18,
588,
2932,
6528,
3113,
2618,
13,
999,
377,
273,
642,
18,
588,
2932,
1202,
3113,
26... |
env.AppendUnique(CCFLAGS=['-ggdb'+level], CPPDEFINES=['DEBUG', '_DEBUG']) | if env['platform'] == 'windows': env.AppendUnique(CCFLAGS=['-g'], CPPDEFINES=['DEBUG', '_DEBUG']) else: env.AppendUnique(CCFLAGS=['-ggdb'+level], CPPDEFINES=['DEBUG', '_DEBUG']) | def string_opt(key, default): if args.has_key(key): env[key] = args[key] else: env[key] = default | b46833f21ed6f2a79a9ab87b5f0be4ae1322bd4b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1030/b46833f21ed6f2a79a9ab87b5f0be4ae1322bd4b/rts.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
533,
67,
3838,
12,
856,
16,
805,
4672,
309,
833,
18,
5332,
67,
856,
12,
856,
4672,
1550,
63,
856,
65,
273,
833,
63,
856,
65,
469,
30,
1550,
63,
856,
65,
273,
805,
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,
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,
533,
67,
3838,
12,
856,
16,
805,
4672,
309,
833,
18,
5332,
67,
856,
12,
856,
4672,
1550,
63,
856,
65,
273,
833,
63,
856,
65,
469,
30,
1550,
63,
856,
65,
273,
805,
2,
-100,
-100,
... |
dnacof = numpy.array(ndimage.center_of_mass(dnaproc)) | dnacof = np.array(ndimage.center_of_mass(dnaproc)) | def imgfeaturesdna(imageproc, dnaproc, isfield=False): """ values = imgfeaturesdna(imageproc, dnaproc, isfield=False) calculates object features for imageproc where imageproc contains the pre-processed fluorescence image, and dnaproc the pre-processed dna fluorescence image. Pre-processed means that the image has been cropped and had pixels of interest selected (via a threshold, for instance). use dnaproc=None to exclude features based on the dna image. Parameters ---------- * imageproc: pre-processed image * dnaproc: pre-processed DNA image * isfield: whether to calculate only field level features (default: False) Features calculated include: - Number of objects - Euler number of the image (# of objects - # of holes) - Average of the object sizes - Variance of the object sizes - Ratio of the largest object to the smallest - Average of the object distances from the COF [unless isfield] - Variance of the object distances from the COF [unless isfield] - Ratio of the largest object distance to the smallest - DNA: average of the object distances to the DNA COF [unless isfield] - DNA: variance of the object distances to the DNA COF [unless isfield] - DNA: ratio of the largest object distance to the smallest - DNA/Image: distance of the DNA COF to the image COF [unless isfield] - DNA/Image: ratio of the DNA image area to the image area - DNA/Image: fraction of image that overlaps with DNA """ names = [] slfnames = [] bwimage=(imageproc > 0) imagelabeled,obj_number = ndimage.label(bwimage) values = [obj_number] if obj_number == 0: if dnaproc is not None: return numpy.zeros(14) return numpy.zeros(8) euler_nr = bweuler(bwimage) values.append(euler_nr) cof = None if not isfield: cof = numpy.array(ndimage.center_of_mass(imageproc)) dnacof=None if dnaproc is not None: dnacof = numpy.array(ndimage.center_of_mass(dnaproc)) # Find the maximum and minimum object sizes, and the distance # of each object to the center of fluorescence obj_distances = [] obj_dnadistances = [] moment_length = obj_number + 1 img_moment00 = zeros(moment_length); img_moment10 = zeros(moment_length); img_moment01 = zeros(moment_length); obj_sizes = zeros(moment_length); r,c=imageproc.shape try: from scipy import weave from scipy.weave import converters code=''' for (int x = 0; x != c; ++x) { for (int y = 0; y != r; ++y) { unsigned moment_array_index = imagelabeled(y,x); img_moment00(moment_array_index) += imageproc(y,x); img_moment10(moment_array_index) += (x * imageproc(y,x)); img_moment01(moment_array_index) += (y * imageproc(y,x)); ++obj_sizes(moment_array_index); } } ''' weave.inline(code, ['r','c','imageproc','imagelabeled','obj_sizes','img_moment00','img_moment01','img_moment10'], type_converters=converters.blitz) except: img_moment00 = zeros(moment_length); img_moment10 = zeros(moment_length); img_moment01 = zeros(moment_length); obj_sizes = zeros(moment_length); for x in xrange(c): for y in xrange(r): moment_array_index = imagelabeled[y,x] img_moment00[moment_array_index] += imageproc[y,x]; img_moment10[moment_array_index] += (x * imageproc[y,x]); img_moment01[moment_array_index] += (y * imageproc[y,x]); obj_sizes[moment_array_index] += 1 obj_sizes = numpy.array(obj_sizes[1:]) # Ignore object 0, i.e. background obj_size_avg = obj_sizes.mean() obj_size_var = obj_sizes.var() obj_size_ratio = obj_sizes.max()/obj_sizes.min() values.append(obj_size_avg) values.append(obj_size_var) values.append(obj_size_ratio) if not isfield: for i in xrange(1,obj_number + 1): obj_m00 = float(img_moment00[i]); obj_m10 = float(img_moment10[i]); obj_m01 = float(img_moment01[i]); obj_center = numpy.array([obj_m01,obj_m10],float)/obj_m00; obj_distance = _norm2(obj_center - cof) obj_distances.append(obj_distance) if dnaproc is not None: obj_dnadistance = _norm2(obj_center - dnacof) obj_dnadistances.append(obj_dnadistance) obj_distances = numpy.array(obj_distances) obj_dist_avg = obj_distances.mean() ; obj_dist_var = obj_distances.var() mindist = obj_distances.min() if mindist != 0: obj_dist_ratio = obj_distances.max()/mindist else: obj_dist_ratio = 0 values.append(obj_dist_avg) values.append(obj_dist_var) values.append(obj_dist_ratio) if dnaproc is not None: obj_dnadistances = numpy.array(obj_dnadistances) obj_dnadist_avg = obj_dnadistances.mean() obj_dnadist_var = obj_dnadistances.var() obj_dnamindist=obj_dnadistances.min() if obj_dnamindist != 0: obj_dnadist_ratio = obj_dnadistances.max()/obj_dnamindist else: obj_dnadist_ratio = 0 ; values.append(obj_dnadist_avg) values.append(obj_dnadist_var) values.append(obj_dnadist_ratio) if dnaproc is not None: dna_area = (dnaproc > 0).sum() image_area = (imageproc > 0).sum() # what fraction of the image fluorescence area overlaps the dna image? image_overlap = ( (imageproc > 0) & (dnaproc > 0) ).sum() if image_area == 0: dna_image_area_ratio = 0 image_dna_overlap = 0 else: dna_image_area_ratio = dna_area/image_area ; image_dna_overlap = image_overlap/image_area ; if not isfield: dna_image_distance = _norm2(cof-dnacof) values.append(dna_image_distance) values.append(dna_image_area_ratio) values.append(image_dna_overlap) return values | ef2235c7c3556f9c48c1260e7e35c3b83e4d8e0b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12199/ef2235c7c3556f9c48c1260e7e35c3b83e4d8e0b/imgfeatures.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3774,
7139,
5176,
69,
12,
2730,
9381,
16,
302,
2322,
303,
71,
16,
353,
1518,
33,
8381,
4672,
3536,
924,
273,
3774,
7139,
5176,
69,
12,
2730,
9381,
16,
302,
2322,
303,
71,
16,
353,
15... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3774,
7139,
5176,
69,
12,
2730,
9381,
16,
302,
2322,
303,
71,
16,
353,
1518,
33,
8381,
4672,
3536,
924,
273,
3774,
7139,
5176,
69,
12,
2730,
9381,
16,
302,
2322,
303,
71,
16,
353,
15... |
Choice_boolean_False, | Choice_boolean_True, | def debug_pref_autodelete_empty_groups(): from debug_prefs import debug_pref, Choice_boolean_True, Choice_boolean_False res = debug_pref("autodelete empty groups?", Choice_boolean_False, ## SOON: Choice_boolean_True, non_debug = True, ## prefs_key = True # not sure it's safe enough for this yet ) return res | b5670c1cd5d04d458cf3e6533accf399ddf9948a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11221/b5670c1cd5d04d458cf3e6533accf399ddf9948a/master_model_updater.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1198,
67,
25724,
67,
5854,
369,
929,
67,
5531,
67,
4650,
13332,
628,
1198,
67,
1484,
2556,
1930,
1198,
67,
25724,
16,
16432,
67,
6494,
67,
5510,
16,
16432,
67,
6494,
67,
8381,
400,
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,
1198,
67,
25724,
67,
5854,
369,
929,
67,
5531,
67,
4650,
13332,
628,
1198,
67,
1484,
2556,
1930,
1198,
67,
25724,
16,
16432,
67,
6494,
67,
5510,
16,
16432,
67,
6494,
67,
8381,
400,
273... |
self.body.append('{\\small ') | self.fallbacks['legend'] = PreambleCmds.legend self.body.append('\\begin{DUlegend}') | def visit_legend(self, node): # DUlegend command incompatible with flush* aligning: # ! LaTeX Error: There's no line here to end. ## self.fallbacks['legend'] = PreambleCmds.legend ## self.body.append('\DUlegend{') self.body.append('{\\small ') | fb3336a6d5cf7ea080d0ead3a5384f168a9030c0 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1278/fb3336a6d5cf7ea080d0ead3a5384f168a9030c0/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3757,
67,
16292,
12,
2890,
16,
756,
4672,
468,
463,
57,
16292,
1296,
24430,
598,
3663,
14,
5689,
310,
30,
468,
282,
401,
21072,
21575,
60,
1068,
30,
6149,
1807,
1158,
980,
2674,
358,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3757,
67,
16292,
12,
2890,
16,
756,
4672,
468,
463,
57,
16292,
1296,
24430,
598,
3663,
14,
5689,
310,
30,
468,
282,
401,
21072,
21575,
60,
1068,
30,
6149,
1807,
1158,
980,
2674,
358,
6... |
self.replyToAddress.fullName = value | if self.replyToAddress: self.replyToAddress.fullName = value | def fset(self, value): self.replyToAddress.fullName = value | f368abdd7cb773f9ab5ef9e88bd1637612f221bb /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9228/f368abdd7cb773f9ab5ef9e88bd1637612f221bb/mail.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
30141,
12,
2890,
16,
460,
4672,
365,
18,
10629,
774,
1887,
18,
2854,
461,
273,
460,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
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,
30141,
12,
2890,
16,
460,
4672,
365,
18,
10629,
774,
1887,
18,
2854,
461,
273,
460,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
func = name[10:] | func = name[12:] | def nameFixup(name, classe, type, file): # avoid a desastrous clash listname = classe + "List" ll = len(listname) l = len(classe) if name[0:l] == listname: func = name[l:] func = string.lower(func[0:1]) + func[1:] elif name[0:16] == "virNetworkDefine": func = name[3:] func = string.lower(func[0:1]) + func[1:] elif name[0:19] == "virNetworkCreateXML": func = name[3:] func = string.lower(func[0:1]) + func[1:] elif name[0:16] == "virNetworkLookup": func = name[3:] func = string.lower(func[0:1]) + func[1:] elif name[0:18] == "virInterfaceDefine": func = name[3:] func = string.lower(func[0:1]) + func[1:] elif name[0:21] == "virInterfaceCreateXML": func = name[3:] func = string.lower(func[0:1]) + func[1:] elif name[0:18] == "virInterfaceLookup": func = name[3:] func = string.lower(func[0:1]) + func[1:] elif name[0:15] == "virSecretDefine": func = name[3:] func = string.lower(func[0:1]) + func[1:] elif name[0:15] == "virSecretLookup": func = name[3:] func = string.lower(func[0:1]) + func[1:] elif name[0:20] == "virStoragePoolDefine": func = name[3:] func = string.lower(func[0:1]) + func[1:] elif name[0:23] == "virStoragePoolCreateXML": func = name[3:] func = string.lower(func[0:1]) + func[1:] elif name[0:20] == "virStoragePoolLookup": func = name[3:] func = string.lower(func[0:1]) + func[1:] elif name[0:19] == "virStorageVolDefine": func = name[3:] func = string.lower(func[0:1]) + func[1:] elif name[0:19] == "virStorageVolLookup": func = name[3:] func = string.lower(func[0:1]) + func[1:] elif name[0:12] == "virDomainGet": func = name[12:] func = string.lower(func[0:1]) + func[1:] elif name[0:9] == "virDomain": func = name[9:] func = string.lower(func[0:1]) + func[1:] elif name[0:13] == "virNetworkGet": func = name[13:] func = string.lower(func[0:1]) + func[1:] elif name[0:10] == "virNetwork": func = name[10:] func = string.lower(func[0:1]) + func[1:] elif name[0:15] == "virInterfaceGet": func = name[13:] func = string.lower(func[0:1]) + func[1:] elif name[0:12] == "virInterface": func = name[10:] func = string.lower(func[0:1]) + func[1:] elif name[0:12] == 'virSecretGet': func = name[12:] func = string.lower(func[0:1]) + func[1:] elif name[0:9] == 'virSecret': func = name[9:] func = string.lower(func[0:1]) + func[1:] elif name[0:12] == 'virStreamNew': func = "newStream" elif name[0:9] == 'virStream': func = name[9:] func = string.lower(func[0:1]) + func[1:] elif name[0:17] == "virStoragePoolGet": func = name[17:] func = string.lower(func[0:1]) + func[1:] elif name[0:14] == "virStoragePool": func = name[14:] func = string.lower(func[0:1]) + func[1:] elif name[0:16] == "virStorageVolGet": func = name[16:] func = string.lower(func[0:1]) + func[1:] elif name[0:13] == "virStorageVol": func = name[13:] func = string.lower(func[0:1]) + func[1:] elif name[0:13] == "virNodeDevice": if name[13:16] == "Get": func = string.lower(name[16]) + name[17:] elif name[13:19] == "Lookup" or name[13:19] == "Create": func = string.lower(name[3]) + name[4:] else: func = string.lower(name[13]) + name[14:] elif name[0:7] == "virNode": func = name[7:] func = string.lower(func[0:1]) + func[1:] elif name[0:10] == "virConnect": func = name[10:] func = string.lower(func[0:1]) + func[1:] elif name[0:3] == "xml": func = name[3:] func = string.lower(func[0:1]) + func[1:] else: func = name if func == "iD": func = "ID" if func == "uUID": func = "UUID" if func == "uUIDString": func = "UUIDString" if func == "oSType": func = "OSType" if func == "xMLDesc": func = "XMLDesc" return func | 1e87ecd12ed8f56c7cab69c531be69b5bfa1f1f2 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11279/1e87ecd12ed8f56c7cab69c531be69b5bfa1f1f2/generator.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
508,
8585,
416,
12,
529,
16,
23268,
307,
16,
618,
16,
585,
4672,
468,
4543,
279,
2832,
689,
303,
407,
927,
961,
666,
529,
273,
23268,
307,
397,
315,
682,
6,
6579,
273,
562,
12,
1098,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
508,
8585,
416,
12,
529,
16,
23268,
307,
16,
618,
16,
585,
4672,
468,
4543,
279,
2832,
689,
303,
407,
927,
961,
666,
529,
273,
23268,
307,
397,
315,
682,
6,
6579,
273,
562,
12,
1098,... |
p_navtrail = """<a href="/submit">%(submit)s</a>""" % {'submit' : _("Submit")} | p_navtrail = """<a href="/submit" class="navtrail">%(submit)s</a>""" % {'submit' : _("Submit")} | def action(req, c=cdsname, ln=cdslang, doctype=""): # load the right message language _ = gettext_set_language(ln) nbCateg = 0 snameCateg = [] lnameCateg = [] actionShortDesc = [] indir = [] actionbutton = [] statustext = [] t = "" ln = wash_language(ln) # get user ID: try: uid = getUid(req) uid_email = get_email(uid) except Error, e: return errorMsg(e, req, c, ln) #parses database to get all data ## first, get the list of categories doctype_categs = get_categories_of_doctype(doctype) for doctype_categ in doctype_categs: nbCateg = nbCateg+1 snameCateg.append(doctype_categ[0]) lnameCateg.append(doctype_categ[1]) ## Now get the details of the document type: doctype_details = get_doctype_details(doctype) if doctype_details is None: ## Doctype doesn't exist - raise error: return errorMsg (_("Unable to find document type.") + str(doctype), req) else: docFullDesc = doctype_details[0] docShortDesc = doctype_details[1] description = doctype_details[4] ## Get the details of the actions supported by this document-type: doctype_actions = get_actions_on_submission_page_for_doctype(doctype) for doctype_action in doctype_actions: ## Get the details of this action: action_details = get_action_details(doctype_action[0]) if action_details is not None: actionShortDesc.append(doctype_action[0]) indir.append(action_details[1]) actionbutton.append(action_details[4]) statustext.append(action_details[5]) ## Send the gathered information to the template so that the doctype's ## home-page can be displayed: t = websubmit_templates.tmpl_action_page( ln=ln, uid=uid, guest=(uid_email == "" or uid_email == "guest"), pid = os.getpid(), now = time.time(), doctype = doctype, description = description, docfulldesc = docFullDesc, snameCateg = snameCateg, lnameCateg = lnameCateg, actionShortDesc = actionShortDesc, indir = indir, # actionbutton = actionbutton, statustext = statustext, ) p_navtrail = """<a href="/submit">%(submit)s</a>""" % {'submit' : _("Submit")} return page(title = docFullDesc, body=t, navtrail=p_navtrail, description="submit documents", keywords="submit", uid=uid, language=ln, req=req, navmenuid='submit' ) | 3e4796b3f0059dd6a6d19d554434683ac5ac782f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12027/3e4796b3f0059dd6a6d19d554434683ac5ac782f/websubmit_engine.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1301,
12,
3658,
16,
276,
33,
71,
2377,
529,
16,
7211,
33,
4315,
2069,
539,
16,
24909,
1546,
6,
4672,
468,
1262,
326,
2145,
883,
2653,
389,
273,
24972,
67,
542,
67,
4923,
12,
2370,
13... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1301,
12,
3658,
16,
276,
33,
71,
2377,
529,
16,
7211,
33,
4315,
2069,
539,
16,
24909,
1546,
6,
4672,
468,
1262,
326,
2145,
883,
2653,
389,
273,
24972,
67,
542,
67,
4923,
12,
2370,
13... |
- ``plot_points`` - (default: 5) the minimal number of plot points. | - ``plot_points`` - (default: 5) the minimal number of plot points. (Note however that in any actual plot a number is passed to this, with default value 200.) | def generate_plot_points(f, xrange, plot_points=5, adaptive_tolerance=0.01, adaptive_recursion=5, randomize = True): r""" Calculate plot points for a function f in the interval xrange. The adaptive refinement algorithm for plotting a function f. See the docstring for plot for a description of the algorithm. INPUT: - ``f`` - a function of one variable - ``p1, p2`` - two points to refine between - ``plot_points`` - (default: 5) the minimal number of plot points. - ``adaptive_recursion`` - (default: 5) how many levels of recursion to go before giving up when doing adaptive refinement. Setting this to 0 disables adaptive refinement. - ``adaptive_tolerance`` - (default: 0.01) how large a difference should be before the adaptive refinement code considers it significant. See the documentation for plot() for more information. OUTPUT: - a list of points (x, f(x)) in the interval xrange, which aproximate the function f. TESTS:: sage: from sage.plot.plot import generate_plot_points sage: generate_plot_points(sin, (0, pi), plot_points=2, adaptive_recursion=0) [(0.0, 0.0), (3.1415926535897931, 1.2246...e-16)] sage: generate_plot_points(sin(x).function(x), (-pi, pi), randomize=False) [(-3.1415926535897931, -1.2246...e-16), (-2.748893571891069, -0.3826834323650898...), (-2.3561944901923448, -0.707106781186547...), (-2.1598449493429825, -0.831469612302545...), (-1.9634954084936207, -0.92387953251128674), (-1.7671458676442586, -0.98078528040323043), (-1.5707963267948966, -1.0), (-1.3744467859455345, -0.98078528040323043), (-1.1780972450961724, -0.92387953251128674), (-0.98174770424681035, -0.831469612302545...), (-0.78539816339744828, -0.707106781186547...), (-0.39269908169872414, -0.38268343236508978), (0.0, 0.0), (0.39269908169872414, 0.38268343236508978), (0.78539816339744828, 0.707106781186547...), (0.98174770424681035, 0.831469612302545...), (1.1780972450961724, 0.92387953251128674), (1.3744467859455345, 0.98078528040323043), (1.5707963267948966, 1.0), (1.7671458676442586, 0.98078528040323043), (1.9634954084936207, 0.92387953251128674), (2.1598449493429825, 0.831469612302545...), (2.3561944901923448, 0.707106781186547...), (2.748893571891069, 0.3826834323650898...), (3.1415926535897931, 1.2246...e-16)] This shows that lowering adaptive_tolerance and raising adaptive_recursion both increase the number of subdivision points:: sage: x = var('x') sage: f(x) = sin(1/x) sage: [len(generate_plot_points(f, (-pi, pi), adaptive_tolerance=i)) for i in [0.01, 0.001, 0.0001]] [42, 67, 104] sage: [len(generate_plot_points(f, (-pi, pi), adaptive_recursion=i)) for i in [5, 10, 15]] [34, 144, 897] """ x, data = var_and_list_of_values(xrange, plot_points) xmin = data[0] xmax = data[-1] delta = float(xmax-xmin) / plot_points random = current_randstate().python_random().random exceptions = 0; msg='' exception_indices = [] for i in range(len(data)): xi = data[i] # Slightly randomize the interior sample points if # randomize is true if randomize and i > 0 and i < plot_points-1: xi += delta*(random() - 0.5) try: data[i] = (float(xi), float(f(xi))) if str(data[i][1]) in ['nan', 'NaN', 'inf', '-inf']: sage.misc.misc.verbose("%s\nUnable to compute f(%s)"%(msg, x),1) exceptions += 1 exception_indices.append(i) except (ZeroDivisionError, TypeError, ValueError, OverflowError), msg: sage.misc.misc.verbose("%s\nUnable to compute f(%s)"%(msg, x),1) if i == 0: for j in range(1, 99): xj = xi + delta*j/100.0 try: data[i] = (float(xj), float(f(xj))) # nan != nan if data[i][1] != data[i][1]: continue break except (ZeroDivisionError, TypeError, ValueError, OverflowError), msg: pass else: exceptions += 1 exception_indices.append(i) elif i == plot_points-1: for j in range(1, 99): xj = xi - delta*j/100.0 try: data[i] = (float(xj), float(f(xj))) # nan != nan if data[i][1] != data[i][1]: continue break except (ZeroDivisionError, TypeError, ValueError, OverflowError), msg: pass else: exceptions += 1 exception_indices.append(i) else: exceptions += 1 exception_indices.append(i) exceptions += 1 exception_indices.append(i) data = [data[i] for i in range(len(data)) if i not in exception_indices] # adaptive refinement i, j = 0, 0 adaptive_tolerance = delta * float(adaptive_tolerance) adaptive_recursion = int(adaptive_recursion) while i < len(data) - 1: for p in adaptive_refinement(f, data[i], data[i+1], adaptive_tolerance=adaptive_tolerance, adaptive_recursion=adaptive_recursion): data.insert(i+1, p) i += 1 i += 1 if (len(data) == 0 and exceptions > 0) or exceptions > 10: sage.misc.misc.verbose("WARNING: When plotting, failed to evaluate function at %s points."%exceptions, level=0) sage.misc.misc.verbose("Last error message: '%s'"%msg, level=0) return data | 53bc30b3387bfc0f18049d2b64fd1492c7912453 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9417/53bc30b3387bfc0f18049d2b64fd1492c7912453/plot.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2103,
67,
4032,
67,
4139,
12,
74,
16,
12314,
16,
3207,
67,
4139,
33,
25,
16,
5855,
688,
67,
25456,
33,
20,
18,
1611,
16,
5855,
688,
67,
31347,
33,
25,
16,
2744,
554,
273,
1053,
467... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2103,
67,
4032,
67,
4139,
12,
74,
16,
12314,
16,
3207,
67,
4139,
33,
25,
16,
5855,
688,
67,
25456,
33,
20,
18,
1611,
16,
5855,
688,
67,
31347,
33,
25,
16,
2744,
554,
273,
1053,
467... |
False | (False, Graph on 9 vertices) | def genus(self, set_embedding=True, on_embedding=None, minimal=True, circular=False, ordered=True): """ Returns the minimal genus of the graph. The genus of a compact surface is the number of handles it has. The genus of a graph is the minimal genus of the surface it can be embedded into. Note -- This function uses Euler's formula and thus it is necessary to consider only connected graphs. INPUT: set_embedding (boolean) -- whether or not to store an embedding attribute of the computed (minimal) genus of the graph. (Default is True). on_embedding (dict) -- a combinatorial embedding to compute the genus of the graph on. Note that this must be a valid embedding for the graph. The dictionary structure is given by: { vertex1: [neighbor1, neighbor2, neighbor3], vertex2: [neighbor] } where there is a key for each vertex in the graph and a (clockwise) ordered list of each vertex's neighbors as values. on_embedding takes precedence over a stored _embedding attribute if minimal is set to False. minimal (boolean) -- whether or not to compute the minimal genus of the graph (i.e., testing all embeddings). If minimal is False, then either the graph must have an _embedding attribute or the on_embedding parameter must not be None. circular (boolean) -- whether or not to compute the genus preserving a planar embedding of the boundary. (Default is False). ordered (boolean) -- if circular is True, then whether or not the boundary order may be permuted. (Default is True, which means the boundary order is preserved.) EXAMPLES: sage: (graphs.PetersenGraph()).genus() 1 sage: (graphs.CubeGraph(3)).genus() 0 sage: K23 = graphs.CompleteBipartiteGraph(2,3) sage: K23.genus() 0 sage: K33 = graphs.CompleteBipartiteGraph(3,3) sage: K33.genus() 1 Using the circular argument, we can compute the minimal genus preserving a planar, ordered boundary: sage: cube = graphs.CubeGraph(3) sage: cube.set_boundary(['001','110']) sage: cube.genus() 0 sage: cube.is_circular_planar() False sage: cube.genus(circular=True) #long time 1 """ if not self.is_connected(): raise TypeError("Graph must be connected to use Euler's Formula to compute minimal genus.") from sage.combinat.all import CyclicPermutationsOfPartition | 9e73e499a477e88d972fff46e3e5bb762eaf4130 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/9e73e499a477e88d972fff46e3e5bb762eaf4130/graph.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3157,
407,
12,
2890,
16,
444,
67,
23744,
33,
5510,
16,
603,
67,
23744,
33,
7036,
16,
16745,
33,
5510,
16,
15302,
33,
8381,
16,
5901,
33,
5510,
4672,
3536,
2860,
326,
16745,
3157,
407,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3157,
407,
12,
2890,
16,
444,
67,
23744,
33,
5510,
16,
603,
67,
23744,
33,
7036,
16,
16745,
33,
5510,
16,
15302,
33,
8381,
16,
5901,
33,
5510,
4672,
3536,
2860,
326,
16745,
3157,
407,
... |
from_here=from_here, to_there=to_there, | def __init__(self, fft_map=None, unit_cell=None, raw_map=None, from_here=None, to_there=None, periodic=False, positive_iso_level=None, iso_level_positive_range_fraction=None, negative_iso_level=None, iso_level_negative_range_fraction=None, wires=True, **kwds): if fft_map is not None: unit_cell = fft_map.unit_cell() super(map_viewer, self).__init__(unit_cell=unit_cell, from_here=from_here, to_there=to_there, light_position=(-1, 1, 1, 0), **kwds) assert (fft_map is not None or (unit_cell is not None and raw_map is not None)) assert (positive_iso_level is not None or iso_level_positive_range_fraction is not None) assert (bool(negative_iso_level is not None) ^ bool(iso_level_negative_range_fraction is None)) if fft_map is not None: self.rho = fft_map.real_map() else: self.rho = raw_map density_stats = maptbx.statistics(self.rho) self.min_density = density_stats.min() self.max_density = density_stats.max() if positive_iso_level is not None: self.positive_iso_level = positive_iso_level else: self.positive_iso_level = ( iso_level_positive_range_fraction*self.max_density) if (negative_iso_level is None and iso_level_negative_range_fraction is not None): negative_iso_level = ( iso_level_negative_range_fraction*self.min_density) self.negative_iso_level = negative_iso_level | 71cf9b7262aee546e28184245876057920ea0e4b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/696/71cf9b7262aee546e28184245876057920ea0e4b/map_viewer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
15741,
67,
1458,
33,
7036,
16,
2836,
67,
3855,
33,
7036,
16,
1831,
67,
1458,
33,
7036,
16,
628,
67,
14852,
33,
7036,
16,
358,
67,
18664,
33,
7036,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
15741,
67,
1458,
33,
7036,
16,
2836,
67,
3855,
33,
7036,
16,
1831,
67,
1458,
33,
7036,
16,
628,
67,
14852,
33,
7036,
16,
358,
67,
18664,
33,
7036,
16,
... | |
elif os.path.exists ("/etc/redhat-release"): logger.log(message + "Red Hat/Fedora/derived distribution") distro = RedHatOrFedora() | def __init__(self): self.packageDb = JhBuildPackageDb() | 0dd3608ec4f8de774b47e575500368cd85c0602a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10139/0dd3608ec4f8de774b47e575500368cd85c0602a/distro.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
365,
18,
5610,
4331,
273,
804,
76,
3116,
2261,
4331,
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,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
365,
18,
5610,
4331,
273,
804,
76,
3116,
2261,
4331,
1435,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... | |
'name':'Auction'+lot.name, | 'name':lot.auction_id.name, | def lots_invoice(self, cr, uid, ids,context): """(buyer invoice Create an invoice for selected lots (IDS) to BUYER_ID. Set created invoice to the ACTION state. PRE: ACTION: False: no action xxxxx: set the invoice state to ACTION | 83af9d311c1190113a797464e4f3eac921eb3569 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7339/83af9d311c1190113a797464e4f3eac921eb3569/auction.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
328,
6968,
67,
16119,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
2472,
4672,
3536,
12,
70,
16213,
9179,
1788,
392,
9179,
364,
3170,
328,
6968,
261,
19516,
13,
358,
10937,
61,
654,
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,
328,
6968,
67,
16119,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
2472,
4672,
3536,
12,
70,
16213,
9179,
1788,
392,
9179,
364,
3170,
328,
6968,
261,
19516,
13,
358,
10937,
61,
654,
67,... |
refs = getattr( klas, '_DBCOOK_references', {} ) | refs = getattr_local_instance_only( klas, '_DBCOOK_references', {} ) | def get_DBCOOK_references( klas): refs = getattr( klas, '_DBCOOK_references', {} ) klas._DBCOOK_references = refs return refs | f869ff3ce62cfb04d0fe05c7673b1d2307728721 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10808/f869ff3ce62cfb04d0fe05c7673b1d2307728721/builder.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
2290,
3865,
3141,
67,
14353,
12,
417,
9521,
4672,
9047,
273,
3869,
67,
3729,
67,
1336,
67,
3700,
12,
417,
9521,
16,
2070,
2290,
3865,
3141,
67,
14353,
2187,
2618,
262,
417,
95... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
336,
67,
2290,
3865,
3141,
67,
14353,
12,
417,
9521,
4672,
9047,
273,
3869,
67,
3729,
67,
1336,
67,
3700,
12,
417,
9521,
16,
2070,
2290,
3865,
3141,
67,
14353,
2187,
2618,
262,
417,
95... |
CLIENT_BUNDLE = Option('only configure the given bundle', default=False, | CLIENT_BUNDLE = Option('only configure the given bundle', default='', | def parse(self, argv, do_getopt=True): '''Parse options''' ret = {} if do_getopt: try: opts, args = getopt.getopt(argv, self.buildGetopt(), []) except getopt.GetoptError, err: self.helpExit(err) if '-h' in argv: self.helpExit('', 0) self['args'] = args for key in self.keys(): if key == 'args': continue option = self[key] if do_getopt: option.parse(opts, []) else: option.parse([], argv) if hasattr(option, '_value'): val = option.value self[key] = val | 9bc7d3cdd3d3bb8dc36442ef6129468711f426e8 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11867/9bc7d3cdd3d3bb8dc36442ef6129468711f426e8/Options.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
12,
2890,
16,
5261,
16,
741,
67,
588,
3838,
33,
5510,
4672,
9163,
3201,
702,
26418,
325,
273,
2618,
309,
741,
67,
588,
3838,
30,
775,
30,
1500,
16,
833,
273,
336,
3838,
18,
588... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
12,
2890,
16,
5261,
16,
741,
67,
588,
3838,
33,
5510,
4672,
9163,
3201,
702,
26418,
325,
273,
2618,
309,
741,
67,
588,
3838,
30,
775,
30,
1500,
16,
833,
273,
336,
3838,
18,
588... |
def send(self, data): if self.timeout!=0.0: wait_writer(self.fileno(), timeout=self.timeout, timeout_exc=timeout) try: return self.fd.send(data) except SSL.WantWriteError: return 0 except SSL.WantReadError: return 0 except SSL.SysCallError, e: if e[0] == -1 and data == "": return 0 | def send(self, data, timeout=timeout_default): if timeout is timeout_default: timeout = self.timeout while True: try: return self.fd.send(data) except SSL.WantWriteError, ex: if self.timeout==0.0: raise timeout(str(ex)) else: wait_writer(self.fileno(), timeout=timeout, timeout_exc=_socket.timeout) except SSL.WantReadError, ex: if self.timeout==0.0: raise timeout(str(ex)) else: wait_reader(self.fileno(), timeout=timeout, timeout_exc=_socket.timeout) except SSL.SysCallError, e: if e[0] == -1 and data == "": return 0 raise sslerror(SysCallError_code_mapping.get(ex.args[0], ex.args[0]), ex.args[1]) except SSL.Error, ex: raise sslerror(str(ex)) | def send(self, data): if self.timeout!=0.0: wait_writer(self.fileno(), timeout=self.timeout, timeout_exc=timeout) try: return self.fd.send(data) except SSL.WantWriteError: return 0 except SSL.WantReadError: return 0 except SSL.SysCallError, e: if e[0] == -1 and data == "": # errors when writing empty strings are expected # and can be ignored return 0 | 1c036d1c5e5b7b0034cfc3b66d1faf4cbfa052df /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10423/1c036d1c5e5b7b0034cfc3b66d1faf4cbfa052df/socket.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1366,
12,
2890,
16,
501,
4672,
309,
365,
18,
4538,
5,
33,
20,
18,
20,
30,
2529,
67,
6299,
12,
2890,
18,
7540,
5764,
9334,
2021,
33,
2890,
18,
4538,
16,
2021,
67,
10075,
33,
4538,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1366,
12,
2890,
16,
501,
4672,
309,
365,
18,
4538,
5,
33,
20,
18,
20,
30,
2529,
67,
6299,
12,
2890,
18,
7540,
5764,
9334,
2021,
33,
2890,
18,
4538,
16,
2021,
67,
10075,
33,
4538,
1... |
(table_tag, row_class, url, (cl.is_popup and ' onclick="opener.dismissRelatedLookupPopup(window, %s); return false;"' % my_result or ''), conditional_escape(result_repr), table_tag)) | (table_tag, row_class, url, (cl.is_popup and ' onclick="opener.checkboxDismissRelatedLookupPopup(window, %s); return false;"' % my_result or ''), conditional_escape(result_repr), table_tag)) | def my_items_for_result(cl, result, form): ''' defines onclick function in book's change_list (returns _unicode_() instead of id ) ''' first = True cl_pk = cl.lookup_opts.pk.attname for field_name in cl.list_display: row_class = '' try: field = cl.lookup_opts.get_field(field_name) except models.FieldDoesNotExist: try: if callable(field_name): attr = field_name value = attr(result) elif hasattr(cl.model_admin, field_name) and \ not field_name == '__str__' and not field_name == '__unicode__': attr = getattr(cl.model_admin, field_name) value = attr(result) else: attr = getattr(result, field_name) if callable(attr): value = attr() else: value = attr allow_tags = getattr(attr, 'allow_tags', False) boolean = getattr(attr, 'boolean', False) if boolean: allow_tags = True result_repr = _boolean_icon(value) else: result_repr = smart_unicode(value) except (AttributeError, ObjectDoesNotExist): result_repr = EMPTY_CHANGELIST_VALUE else: if not allow_tags: result_repr = escape(result_repr) else: result_repr = mark_safe(result_repr) else: field_val = getattr(result, field.attname) if isinstance(field.rel, models.ManyToOneRel): if field_val is not None: result_repr = escape(getattr(result, field.name)) else: result_repr = EMPTY_CHANGELIST_VALUE elif isinstance(field, models.DateField) or isinstance(field, models.TimeField): if field_val: (date_format, datetime_format, time_format) = get_date_formats() if isinstance(field, models.DateTimeField): result_repr = capfirst(dateformat.format(field_val, datetime_format)) elif isinstance(field, models.TimeField): result_repr = capfirst(dateformat.time_format(field_val, time_format)) else: result_repr = capfirst(dateformat.format(field_val, date_format)) else: result_repr = EMPTY_CHANGELIST_VALUE row_class = ' class="nowrap"' elif isinstance(field, models.BooleanField) or isinstance(field, models.NullBooleanField): result_repr = _boolean_icon(field_val) elif isinstance(field, models.DecimalField): if field_val is not None: result_repr = ('%%.%sf' % field.decimal_places) % field_val else: result_repr = EMPTY_CHANGELIST_VALUE elif field.flatchoices: result_repr = dict(field.flatchoices).get(field_val, EMPTY_CHANGELIST_VALUE) else: result_repr = escape(field_val) if force_unicode(result_repr) == '': result_repr = mark_safe(' ') if (first and not cl.list_display_links) or field_name in cl.list_display_links: table_tag = {True:'th', False:'td'}[first] first = False url = cl.url_for_result(result) if cl.to_field: attr = str(cl.to_field) else: attr = cl_pk value = result.serializable_value(attr) result_id = repr(force_unicode(value))[1:] ######### my representation for books in author my_result = repr(force_unicode(result))[1:] yield mark_safe(u'<%s%s><a href="%s"%s>%s</a></%s>' % \ (table_tag, row_class, url, (cl.is_popup and ' onclick="opener.dismissRelatedLookupPopup(window, %s); return false;"' % my_result or ''), conditional_escape(result_repr), table_tag)) else: if form and field_name in form.fields: form_field_name = form[field_name] result_repr = mark_safe(force_unicode(form_field_name.errors) + force_unicode(form_field_name)) else: result_repr = conditional_escape(result_repr) yield mark_safe(u'<td%s>%s</td>' % (row_class, result_repr)) if form: yield mark_safe(force_unicode(form[cl.model._meta.pk.name])) | 48d10d63c40de7107af9667c0ab376229bd58992 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4508/48d10d63c40de7107af9667c0ab376229bd58992/admin_view.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3399,
67,
3319,
67,
1884,
67,
2088,
12,
830,
16,
563,
16,
646,
4672,
9163,
11164,
22324,
445,
316,
6978,
1807,
2549,
67,
1098,
261,
6154,
389,
9124,
67,
1435,
3560,
434,
612,
262,
9163... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3399,
67,
3319,
67,
1884,
67,
2088,
12,
830,
16,
563,
16,
646,
4672,
9163,
11164,
22324,
445,
316,
6978,
1807,
2549,
67,
1098,
261,
6154,
389,
9124,
67,
1435,
3560,
434,
612,
262,
9163... |
def add_rfs(self, index): | def add_rfs(self, index, mir_rorp = None): | def add_rfs(self, index): """Given index, add the rfs in that same directory | 436aec66e6fdd1266fc463d51093160023e5b352 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/783/436aec66e6fdd1266fc463d51093160023e5b352/restore.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
67,
86,
2556,
12,
2890,
16,
770,
16,
312,
481,
67,
86,
280,
84,
273,
599,
4672,
3536,
6083,
770,
16,
527,
326,
436,
2556,
316,
716,
1967,
1867,
2,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
527,
67,
86,
2556,
12,
2890,
16,
770,
16,
312,
481,
67,
86,
280,
84,
273,
599,
4672,
3536,
6083,
770,
16,
527,
326,
436,
2556,
316,
716,
1967,
1867,
2,
-100,
-100,
-100,
-100,
-100,
... |
password = get_password(opts) | prompt='Please, enter new user password.\nPassword: ' password = get_password(opts, prompt=prompt) | def user(command, uri, *aliases, **opts): force = opts['FORCE'] cmd = CMD.get(command) if cmd == CMD_ADD: password = get_password(opts) u = User_ctl(opts['DB_URI'], multi_rpc(opts)) u.add(uri, aliases, password, ID_ORIG, force) elif cmd == CMD_RM: u = User_ctl(opts['DB_URI'], multi_rpc(opts)) u.rm(uri, ID_ORIG, force) elif cmd == CMD_SHOW: cols, fformat, limit, rsep, lsep, astab = show_opts(opts) u = User_ctl(opts['DB_URI'], multi_rpc(opts)) ret, desc = u.show(uri, cols, fformat, limit) tabprint(ret, desc, rsep, lsep, astab) else: raise Error (EINVAL, command) | b10ab4a9d70f6c8ed96d350dbc8142336c7e926e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2855/b10ab4a9d70f6c8ed96d350dbc8142336c7e926e/ctlctl.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
729,
12,
3076,
16,
2003,
16,
380,
13831,
16,
2826,
4952,
4672,
2944,
273,
1500,
3292,
27817,
3546,
1797,
273,
18052,
18,
588,
12,
3076,
13,
309,
1797,
422,
18052,
67,
8355,
30,
6866,
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,
729,
12,
3076,
16,
2003,
16,
380,
13831,
16,
2826,
4952,
4672,
2944,
273,
1500,
3292,
27817,
3546,
1797,
273,
18052,
18,
588,
12,
3076,
13,
309,
1797,
422,
18052,
67,
8355,
30,
6866,
2... |
print 'Setting DNS : ' + dns | if self.verbose: print 'Setting DNS : ' + dns | def SetDNS(self, dns1=None, dns2=None, dns3=None, dns_dom=None, search_dom=None): """ Set the DNS of the system to the specified DNS servers. | 5220203bda89fa8116d8aebd86370c88b2a198bc /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12280/5220203bda89fa8116d8aebd86370c88b2a198bc/wnettools.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1000,
11602,
12,
2890,
16,
6605,
21,
33,
7036,
16,
6605,
22,
33,
7036,
16,
6605,
23,
33,
7036,
16,
6605,
67,
9859,
33,
7036,
16,
1623,
67,
9859,
33,
7036,
4672,
3536,
1000,
326,
8858... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1000,
11602,
12,
2890,
16,
6605,
21,
33,
7036,
16,
6605,
22,
33,
7036,
16,
6605,
23,
33,
7036,
16,
6605,
67,
9859,
33,
7036,
16,
1623,
67,
9859,
33,
7036,
4672,
3536,
1000,
326,
8858... |
probe.log("MAPPING_TIMEOUT mapped_ip=%s" % probe.mapped_ip) | probe.log("MAPPING_TIMEOUT") | def run(self): # Advance state of probes that are ready for probe in self.probes: now = time.time() if not probe.next_ts <= now: continue if probe.waiting: # Last ping timed out, so back off a TTL if probe.mapping_tries == probe.max_mapping_tries: probe.mapped = True probe.max_ttl -= 1 probe.log("MAPPED mapped_ip=%s max_ttl=%s" % (probe.mapped_ip, probe.max_ttl)) else: probe.log("MAPPING_TIMEOUT mapped_ip=%s" % probe.mapped_ip) probe.mapping_tries += 1 elif not probe.mapped: # If probe isn't mapped, advance TTL and send a ping probe.max_ttl += 1 probe.waiting = True # Schedule a timeout handler probe.next_ts = now + probe.timeout probe.ping_ts = now probe.seq += 1 # Send the ping! probe.log("PING ip=%s id=%s seq=%s ttl=%s" % (probe.ip, self.pid, probe.seq, probe.max_ttl)) self.ping(probe.ip, id=self.pid, seq=probe.seq, ttl=probe.max_ttl) # Process incoming data while True: now = time.time() rlist, wlist, xlist = select.select([self.sock, sys.stdin], [], [], 0.01) if not rlist: break if sys.stdin in rlist: line = sys.stdin.readline() if self.state == STATE_COMMAND: line = line.strip().upper() if line.startswith == 'PING': # TODO: allow registration of pings' remotely pass if self.sock in rlist: # Should never need more than ~50 bytes data, paddr = self.sock.recvfrom(256) paddr = paddr[0] icmpHeader = data[20:24] ptype, pcode, checksum = struct.unpack( "bbH", icmpHeader ) if ptype == 0: # ICMP Echo Reply body = data[24:40] pid, pseq, tstamp = struct.unpack( "HhL", body ) probe = self.get_probe(paddr) if probe: tstamp = data[28:36] et = int(time.time() * 1000.0) [st] = struct.unpack("L", tstamp) ms = (et - st) if not probe.mapped: probe.mapped = True probe.log("MAPPED mapped_ip=%s max_ttl=%s" % (probe.mapped_ip, probe.max_ttl)) probe.log("PONG type=echo_reply id=%s seq=%s ms=%s" % (pid, pseq, ms)) probe.next_ts = now + probe.interval probe.waiting = False elif ptype == 11 and pcode == 0: # ICMP Time Exceeded original_ip_header, original_data = data[28:48], data[48:56] dest_addr = util.ip(original_ip_header[16:20]) probe = self.get_probe(dest_addr) if not probe: return # Original datagram is included after the IP header otype, ocode, ochecksum, oid, oseq = struct.unpack( "bbHHh", original_data ) ms = int((now - probe.ping_ts) * 1000.0) probe.log("PONG type=time_exceeded id=%s seq=%s addr=%s ms=%s" % (oid, oseq, paddr, ms)) if probe.mapped: # Just schedule the next regular ping probe.next_ts = now + probe.interval probe.waiting = False if not probe.mapped: # Set new max_ttl, if necessary, and continue mapping probe.max_ttl = max(oseq, probe.max_ttl) probe.next_ts = now probe.waiting = False probe.mapped_ip = paddr # In case this was a retry, reset the counter probe.mapping_tries = 0 | 3c34263318a1e65a32d41818db27c10826efef4c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13481/3c34263318a1e65a32d41818db27c10826efef4c/probe.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
4672,
468,
4052,
5882,
919,
434,
3137,
281,
716,
854,
5695,
364,
10695,
316,
365,
18,
7748,
281,
30,
2037,
273,
813,
18,
957,
1435,
309,
486,
10695,
18,
4285,
67,
3428,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
4672,
468,
4052,
5882,
919,
434,
3137,
281,
716,
854,
5695,
364,
10695,
316,
365,
18,
7748,
281,
30,
2037,
273,
813,
18,
957,
1435,
309,
486,
10695,
18,
4285,
67,
3428,... |
LOG('Zope', WARNING, 'Successfully rebuilt global product registry') | try: if hasattr(ob, '_register') and hasattr(ob, '_zclass_'): ob._register() if hasattr(ob, 'objectItems'): m = list(ob.objectItems()) items.extend(m) if hasattr(ob, 'propertysheets'): ps = ob.propertysheets if (hasattr(ps, 'methods') and hasattr(ps.methods, 'objectItems')): m = list(ps.methods.objectItems()) items.extend(m) except: LOG('Zope', WARNING, 'Broken objects exist in product %s.' % product.id) idx = idx + 1 LOG('Zope', INFO, 'Successfully rebuilt global product registry') | def checkGlobalRegistry(self, rebuild=1): """Check the global (product) registry for problems, which can be caused by disk-based products being deleted and other things that Zope cannot know about. If rebuild is true, the global registry will be rebuilt automatically if a problem is found. | 8b47dcb4d7182cde7f464983d969a7e5b5d45ee3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/8b47dcb4d7182cde7f464983d969a7e5b5d45ee3/Application.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
5160,
4243,
12,
2890,
16,
13419,
33,
21,
4672,
3536,
1564,
326,
2552,
261,
5896,
13,
4023,
364,
9688,
16,
1492,
848,
506,
15848,
635,
4234,
17,
12261,
10406,
3832,
4282,
471,
1308,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
5160,
4243,
12,
2890,
16,
13419,
33,
21,
4672,
3536,
1564,
326,
2552,
261,
5896,
13,
4023,
364,
9688,
16,
1492,
848,
506,
15848,
635,
4234,
17,
12261,
10406,
3832,
4282,
471,
1308,
... |
import maxdb _maxdb = maxdb del maxdb | import maxdb as _maxdb | def SybaseConnection(*args, **kw): _warn('SybaseConnection is deprecated; use connectionForURI("sybase://...") or "from sqlobject.sybase import builder; SybaseConnection = builder()"') _sybase.builder()(*args, **kw) | 014eeb8d3d7c0716aa5bcee8199f0e6399edfd82 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6718/014eeb8d3d7c0716aa5bcee8199f0e6399edfd82/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
16455,
1969,
1952,
30857,
1968,
16,
2826,
9987,
4672,
389,
8935,
2668,
10876,
1969,
1952,
353,
6849,
31,
999,
1459,
1290,
3098,
2932,
9009,
1969,
2207,
7070,
13,
578,
315,
2080,
4744,
383,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
16455,
1969,
1952,
30857,
1968,
16,
2826,
9987,
4672,
389,
8935,
2668,
10876,
1969,
1952,
353,
6849,
31,
999,
1459,
1290,
3098,
2932,
9009,
1969,
2207,
7070,
13,
578,
315,
2080,
4744,
383,... |
changelog = ticket.get_changelog(db=db) autonum = 0 | def quote_original(author, original, link): if not 'comment' in req.args: # i.e. the comment was not yet edited req.hdf['ticket.comment'] = '\n'.join( ['Replying to [%s %s]:' % (link, author)] + ['> %s' % line for line in original.splitlines()] + ['']) | 10e669f9ff9c4495cefc3e7943da30e0dc2d287f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/10e669f9ff9c4495cefc3e7943da30e0dc2d287f/web_ui.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3862,
67,
8830,
12,
4161,
16,
2282,
16,
1692,
4672,
309,
486,
296,
3469,
11,
316,
1111,
18,
1968,
30,
468,
277,
18,
73,
18,
326,
2879,
1703,
486,
4671,
18532,
1111,
18,
26428,
3292,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3862,
67,
8830,
12,
4161,
16,
2282,
16,
1692,
4672,
309,
486,
296,
3469,
11,
316,
1111,
18,
1968,
30,
468,
277,
18,
73,
18,
326,
2879,
1703,
486,
4671,
18532,
1111,
18,
26428,
3292,
... | |
arrival_cols[3].contents[0], | get_col1(arrival_row, 'time$'), | def parse_connection(self, departure_row, arrival_row): departure_cols = departure_row.findAll('td', recursive=False) arrival_cols = arrival_row.findAll('td', recursive=False) | 6b018c8fab3f81686d4ba4af67f0bd492f6318a3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2719/6b018c8fab3f81686d4ba4af67f0bd492f6318a3/ghafasclient.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
67,
4071,
12,
2890,
16,
26000,
594,
67,
492,
16,
2454,
5162,
67,
492,
4672,
26000,
594,
67,
6842,
273,
26000,
594,
67,
492,
18,
4720,
1595,
2668,
4465,
2187,
5904,
33,
8381,
13,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
67,
4071,
12,
2890,
16,
26000,
594,
67,
492,
16,
2454,
5162,
67,
492,
4672,
26000,
594,
67,
6842,
273,
26000,
594,
67,
492,
18,
4720,
1595,
2668,
4465,
2187,
5904,
33,
8381,
13,
... |
if special_char: encoded_char = special_char.decode(locale_encoding) temp_mod_name = 'test_imp_helper_' + encoded_char test_package_name = 'test_imp_helper_package_' + encoded_char init_file_name = os.path.join(test_package_name, '__init__.py') try: with open(temp_mod_name + '.py', 'w') as file: file.write('a = 1\n') file, filename, info = imp.find_module(temp_mod_name) self.assertNotEquals(None, file) self.assertTrue(filename[:-3].endswith(temp_mod_name)) self.assertEquals('.py', info[0]) self.assertEquals('U', info[1]) self.assertEquals(imp.PY_SOURCE, info[2]) | if not special_char: self.skipTest("can't run this test with %s as preferred encoding" % locale_encoding) decoded_char = special_char.decode(locale_encoding) temp_mod_name = 'test_imp_helper_' + decoded_char test_package_name = 'test_imp_helper_package_' + decoded_char init_file_name = os.path.join(test_package_name, '__init__.py') try: with open(temp_mod_name + '.py', 'w') as file: file.write('a = 1\n') file, filename, info = imp.find_module(temp_mod_name) self.assertNotEquals(None, file) self.assertTrue(filename[:-3].endswith(temp_mod_name)) self.assertEquals('.py', info[0]) self.assertEquals('U', info[1]) self.assertEquals(imp.PY_SOURCE, info[2]) | def test_issue5604(self): # Test cannot cover imp.load_compiled function. # Martin von Loewis note what shared library cannot have non-ascii # character because init_xxx function cannot be compiled # and issue never happens for dynamic modules. # But sources modified to follow generic way for processing pathes. | 28ec079c105aa61ff111341f47ebf944e16a8271 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8125/28ec079c105aa61ff111341f47ebf944e16a8271/test_imp.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
13882,
4313,
3028,
12,
2890,
4672,
468,
7766,
2780,
5590,
1646,
18,
945,
67,
19397,
445,
18,
468,
490,
485,
267,
331,
265,
3176,
359,
291,
4721,
4121,
5116,
5313,
2780,
1240,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
13882,
4313,
3028,
12,
2890,
4672,
468,
7766,
2780,
5590,
1646,
18,
945,
67,
19397,
445,
18,
468,
490,
485,
267,
331,
265,
3176,
359,
291,
4721,
4121,
5116,
5313,
2780,
1240,
... |
debug(" effective request-host %s (even with added " "initial dot) does not end end with %s", erhn, domain) | _debug(" effective request-host %s (even with added " "initial dot) does not end end with %s", erhn, domain) | def set_ok_domain(self, cookie, request): if self.is_blocked(cookie.domain): debug(" domain %s is in user block-list", cookie.domain) return False if self.is_not_allowed(cookie.domain): debug(" domain %s is not in user allow-list", cookie.domain) return False if cookie.domain_specified: req_host, erhn = eff_request_host(request) domain = cookie.domain if self.strict_domain and (domain.count(".") >= 2): # XXX This should probably be compared with the Konqueror # (kcookiejar.cpp) and Mozilla implementations, but it's a # losing battle. i = domain.rfind(".") j = domain.rfind(".", 0, i) if j == 0: # domain like .foo.bar tld = domain[i+1:] sld = domain[j+1:i] if sld.lower() in ("co", "ac", "com", "edu", "org", "net", "gov", "mil", "int", "aero", "biz", "cat", "coop", "info", "jobs", "mobi", "museum", "name", "pro", "travel", "eu") and len(tld) == 2: # domain like .co.uk debug(" country-code second level domain %s", domain) return False if domain.startswith("."): undotted_domain = domain[1:] else: undotted_domain = domain embedded_dots = (undotted_domain.find(".") >= 0) if not embedded_dots and domain != ".local": debug(" non-local domain %s contains no embedded dot", domain) return False if cookie.version == 0: if (not erhn.endswith(domain) and (not erhn.startswith(".") and not ("."+erhn).endswith(domain))): debug(" effective request-host %s (even with added " "initial dot) does not end end with %s", erhn, domain) return False if (cookie.version > 0 or (self.strict_ns_domain & self.DomainRFC2965Match)): if not domain_match(erhn, domain): debug(" effective request-host %s does not domain-match " "%s", erhn, domain) return False if (cookie.version > 0 or (self.strict_ns_domain & self.DomainStrictNoDots)): host_prefix = req_host[:-len(domain)] if (host_prefix.find(".") >= 0 and not IPV4_RE.search(req_host)): debug(" host prefix %s for domain %s contains a dot", host_prefix, domain) return False return True | e3485b205e7bc77f437c4e5fc2d8b00eefb7fc77 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/e3485b205e7bc77f437c4e5fc2d8b00eefb7fc77/cookielib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
67,
601,
67,
4308,
12,
2890,
16,
3878,
16,
590,
4672,
309,
365,
18,
291,
67,
23156,
12,
8417,
18,
4308,
4672,
1198,
2932,
282,
2461,
738,
87,
353,
316,
729,
1203,
17,
1098,
3113... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
67,
601,
67,
4308,
12,
2890,
16,
3878,
16,
590,
4672,
309,
365,
18,
291,
67,
23156,
12,
8417,
18,
4308,
4672,
1198,
2932,
282,
2461,
738,
87,
353,
316,
729,
1203,
17,
1098,
3113... |
for f in os.listdir('.'): if f[-15:]=='.module.damnvid': if os.path.lexists('modules/'+f): os.remove('modules/'+f) os.rename(f,'modules/'+f) addFile('modules'+os.sep+f) if f[-3:] == '.py': addModule(f) | for d in required_dirs: addDir(d) | def addModule(f, recursive=True): if OSNAME != 'posix' or not goodFile(f): return if os.path.isdir(f): for i in os.listdir(f): if os.path.isdir(f + os.sep + i) and recursive: addDir(f + os.sep + i) addModule(f + os.sep + i, recursive=recursive) elif i[-3:] == '.py': addModule(f + os.sep + i, recursive=recursive) elif f[-3:] == '.py': try: py_compile.compile(f) if os.path.exists(f+'o'): addFile(f+'o') addFile(f) elif os.path.exists(f+'c'): addFile(f+'c') addFile(f) addFile(f) except: print >> sys.stderr, 'Error while compyling', f addFile(f) | 94652ffc633e3e937358a57a9c4c87aff3211d3a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11142/94652ffc633e3e937358a57a9c4c87aff3211d3a/build-required-files.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
3120,
12,
74,
16,
5904,
33,
5510,
4672,
309,
5932,
1985,
480,
296,
24463,
11,
578,
486,
7494,
812,
12,
74,
4672,
327,
309,
1140,
18,
803,
18,
291,
1214,
12,
74,
4672,
364,
277,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3120,
12,
74,
16,
5904,
33,
5510,
4672,
309,
5932,
1985,
480,
296,
24463,
11,
578,
486,
7494,
812,
12,
74,
4672,
327,
309,
1140,
18,
803,
18,
291,
1214,
12,
74,
4672,
364,
277,
... |
>>> context = Context.from_request(req, 'source', 'branches/blah/foo.py', 123) | >>> context = Context.from_request(req, 'source', '/branches/blah/foo.py', 123) | def render_summary(self, req, config, build, step, category): assert category == 'coverage' | 5bc70454bfc3d736144870055b656c6286ec5b82 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4547/5bc70454bfc3d736144870055b656c6286ec5b82/coverage.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1743,
67,
7687,
12,
2890,
16,
1111,
16,
642,
16,
1361,
16,
2235,
16,
3150,
4672,
1815,
3150,
422,
296,
16356,
11,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1743,
67,
7687,
12,
2890,
16,
1111,
16,
642,
16,
1361,
16,
2235,
16,
3150,
4672,
1815,
3150,
422,
296,
16356,
11,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
assert_almost_equal(np.log(x), y) | assert_almost_equal_spec(np.log(x), y) | def test_special_values(self): xl = [] yl = [] | c60575349b5810b393eb3092a591ac429325074c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/14925/c60575349b5810b393eb3092a591ac429325074c/test_umath.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
9371,
67,
2372,
12,
2890,
4672,
15643,
273,
5378,
677,
80,
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,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
9371,
67,
2372,
12,
2890,
4672,
15643,
273,
5378,
677,
80,
273,
5378,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
if not opts['pull'] and other.dev() != -1: | if other.dev() != -1: | def __del__(self): if self.dir_: self.rmtree(self.dir_, True) | 6e7ed14559a2a63f5f2919dad73a4dc35906302e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11312/6e7ed14559a2a63f5f2919dad73a4dc35906302e/commands.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
3771,
972,
12,
2890,
4672,
309,
365,
18,
1214,
67,
30,
365,
18,
86,
17371,
12,
2890,
18,
1214,
67,
16,
1053,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
3771,
972,
12,
2890,
4672,
309,
365,
18,
1214,
67,
30,
365,
18,
86,
17371,
12,
2890,
18,
1214,
67,
16,
1053,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
self.__Update(True) | if self.__channel: self.__Close() else: self.__Update(True) | def Detach(self): """Closes this channel. | 1c2eaed434a3264c68ca8badfaf0163154afc425 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5330/1c2eaed434a3264c68ca8badfaf0163154afc425/daemon.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
17867,
12,
2890,
4672,
3536,
18545,
333,
1904,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
17867,
12,
2890,
4672,
3536,
18545,
333,
1904,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
f.write(" return JS_TRUE;\n"); | f.write(" return JS_TRUE;\n") | def pfail(msg): raise UserError( member.iface.name + '.' + member.name + ": " "parameter " + param.name + ": " + msg) | 85ee3e89273f0ac0b9295128759b8ada04a837bb /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11102/85ee3e89273f0ac0b9295128759b8ada04a837bb/qsgen.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
293,
6870,
12,
3576,
4672,
1002,
2177,
668,
12,
3140,
18,
31479,
18,
529,
397,
2611,
397,
3140,
18,
529,
397,
6398,
315,
315,
6775,
315,
397,
579,
18,
529,
397,
6398,
315,
397,
1234,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
293,
6870,
12,
3576,
4672,
1002,
2177,
668,
12,
3140,
18,
31479,
18,
529,
397,
2611,
397,
3140,
18,
529,
397,
6398,
315,
315,
6775,
315,
397,
579,
18,
529,
397,
6398,
315,
397,
1234,
... |
boto.log.info('Deleting %s(%s) for %s' % (snap, snap.date, self.name) | boto.log.info('Deleting %s(%s) for %s' % (snap, snap.date, self.name)) | def trim_snapshots(self, delete=False): """ Trim the number of snapshots for this volume. This method always keeps the oldest snapshot. It then uses the parameters passed in to determine how many others should be kept. | c9154c14c8723dff293d45df5086709d7c992139 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1098/c9154c14c8723dff293d45df5086709d7c992139/volume.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2209,
67,
26918,
12,
2890,
16,
1430,
33,
8381,
4672,
3536,
7105,
326,
1300,
434,
12808,
364,
333,
3940,
18,
225,
1220,
707,
3712,
20948,
326,
17067,
4439,
18,
225,
2597,
1508,
4692,
326,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2209,
67,
26918,
12,
2890,
16,
1430,
33,
8381,
4672,
3536,
7105,
326,
1300,
434,
12808,
364,
333,
3940,
18,
225,
1220,
707,
3712,
20948,
326,
17067,
4439,
18,
225,
2597,
1508,
4692,
326,... |
in=master - master relative to which the widget is placed. | in=master - master relative to which the widget is placed in_=master - see 'in' option description | def place_configure(self, cnf={}, **kw): """Place a widget in the parent widget. Use as options: in=master - master relative to which the widget is placed. x=amount - locate anchor of this widget at position x of master y=amount - locate anchor of this widget at position y of master relx=amount - locate anchor of this widget between 0.0 and 1.0 relative to width of master (1.0 is right edge) rely=amount - locate anchor of this widget between 0.0 and 1.0 relative to height of master (1.0 is bottom edge) anchor=NSEW (or subset) - position anchor according to given direction width=amount - width of this widget in pixel height=amount - height of this widget in pixel relwidth=amount - width of this widget between 0.0 and 1.0 relative to width of master (1.0 is the same width as the master) relheight=amount - height of this widget between 0.0 and 1.0 relative to height of master (1.0 is the same height as the master) bordermode="inside" or "outside" - whether to take border width of master widget into account """ for k in ['in_']: if kw.has_key(k): kw[k[:-1]] = kw[k] del kw[k] self.tk.call( ('place', 'configure', self._w) + self._options(cnf, kw)) | 604f95edacc880af4fb9513d8bd9b523258c8994 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3187/604f95edacc880af4fb9513d8bd9b523258c8994/Tkinter.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3166,
67,
14895,
12,
2890,
16,
23118,
28793,
2826,
9987,
4672,
3536,
6029,
279,
3604,
316,
326,
982,
3604,
18,
2672,
487,
702,
30,
316,
33,
7525,
300,
4171,
3632,
358,
1492,
326,
3604,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3166,
67,
14895,
12,
2890,
16,
23118,
28793,
2826,
9987,
4672,
3536,
6029,
279,
3604,
316,
326,
982,
3604,
18,
2672,
487,
702,
30,
316,
33,
7525,
300,
4171,
3632,
358,
1492,
326,
3604,
... |
r""" The all 1's sequence. INPUT: n -- non negative integer OUTPUT: integer -- function value EXAMPLES: sage: a = sloane.A000012; a | def __init__(self): r""" | def _eval(self, n): return Integer(2*n+1) | 7b02e5455d5d52d6dcc7f2314cdd56803031a1c6 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/7b02e5455d5d52d6dcc7f2314cdd56803031a1c6/sloane_functions.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
8622,
12,
2890,
16,
290,
4672,
327,
2144,
12,
22,
14,
82,
15,
21,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
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,
389,
8622,
12,
2890,
16,
290,
4672,
327,
2144,
12,
22,
14,
82,
15,
21,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
for default in defaultFeedURLs: if isinstance(default, tuple) and isinstance(default[1], list): defaultFolder = default c_folder = folder.ChannelFolder(defaultFolder[0]) for url, autodownload in defaultFolder[1]: d_feed = feed.Feed(url, initiallyAutoDownloadable=autodownload) d_feed.set_folder(c_folder) | for default in default_video_feeds: self._add_default(default, u"video") | def _install_default_feeds(self): logging.info("Adding default feeds") | 6342be3c51e45e3f900a6bf37f53bb67b265ea13 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12354/6342be3c51e45e3f900a6bf37f53bb67b265ea13/theme.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
5425,
67,
1886,
67,
7848,
87,
12,
2890,
4672,
2907,
18,
1376,
2932,
13962,
805,
27684,
7923,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
5425,
67,
1886,
67,
7848,
87,
12,
2890,
4672,
2907,
18,
1376,
2932,
13962,
805,
27684,
7923,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
self.setAcceptHoverEvents(True) | def __init__(self, parent, interface, textposition = None): QGraphicsEllipseItem.__init__(self, parent) assert issubclass(parent.__class__, DiagramItem) self.parent = parent self.connectors = [] # Underlying object self.interface = interface self.buildItem() self.highlight = False self.text.setPlainText(interface.name) if textposition is None: textposition = SlotItem.TEXT_RIGHT self.textposition = textposition # Events are handled by parent item self.setAcceptHoverEvents(True) | b8aa04b5425fcf8dab76799a61b52048578dda8c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13237/b8aa04b5425fcf8dab76799a61b52048578dda8c/gui.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
982,
16,
1560,
16,
977,
3276,
273,
599,
4672,
2238,
17558,
4958,
10472,
1180,
16186,
2738,
972,
12,
2890,
16,
982,
13,
1815,
14664,
12,
2938,
16186,
1106,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
982,
16,
1560,
16,
977,
3276,
273,
599,
4672,
2238,
17558,
4958,
10472,
1180,
16186,
2738,
972,
12,
2890,
16,
982,
13,
1815,
14664,
12,
2938,
16186,
1106,
... | |
return """<a href="%s">Back To the Calendar</a>"""%url def displayAuth(self,request): if request.auth: if request.postpath and request.postpath[0]=="post": return PostForm(self) elif request.postpath and request.postpath[0]=="event": return """<a href="%s/%s/%s/%s/%s">Delete</a>""" % ( request.sibLink("%s/delete"%self.password), request.postpath[1], request.postpath[2], request.postpath[3], request.postpath[4])+"<br>"+self.backToCalendar(request) elif request.postpath and request.postpath[0]=="delete": year,month,day,ind=map(int,request.postpath[1:5]) try: del self.events[year][month][day][ind] self.savePickle() except IndexError: pass return self.backToCalendar(request) else: return """<a href="%s/post">Post an Event</a>"""%(self.password) else: if request.postpath and request.postpath[0]=="event": return self.backToCalendar(request) | def backToCalendar(self,request): url="/"+string.join(request.prepath,"/") if request.auth: return """<a href="%s">Back To the Calendar</a>"""%(url+"/"+self.password) else: return """<a href="%s">Back To the Calendar</a>"""%url | b508ccb48d151365a9e848f61248f21f87fc5e1d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/b508ccb48d151365a9e848f61248f21f87fc5e1d/cal.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1473,
774,
7335,
12,
2890,
16,
2293,
4672,
880,
1546,
4898,
15,
1080,
18,
5701,
12,
2293,
18,
1484,
803,
10837,
4898,
13,
309,
590,
18,
1944,
30,
327,
3536,
32,
69,
3897,
11613,
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,
1473,
774,
7335,
12,
2890,
16,
2293,
4672,
880,
1546,
4898,
15,
1080,
18,
5701,
12,
2293,
18,
1484,
803,
10837,
4898,
13,
309,
590,
18,
1944,
30,
327,
3536,
32,
69,
3897,
11613,
87,
... | |
for i in results: if type(i) == type({}): raise Fault(i['faultCode'], i['faultString']) elif type(i) == type([]): yield i[0] | def __init__(self, results): self.results = results def __getitem__(self, i): item = self.results[i] if type(item) == type({}): raise Fault(item['faultCode'], item['faultString']) elif type(item) == type([]): return item[0] | def MultiCallIterator(results): """Iterates over the results of a multicall. Exceptions are thrown in response to xmlrpc faults.""" for i in results: if type(i) == type({}): raise Fault(i['faultCode'], i['faultString']) elif type(i) == type([]): yield i[0] else: raise ValueError,\ "unexpected type in multicall result" | 12237b3a19336636ae40f687fab2e3fdd7c35b4b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/12237b3a19336636ae40f687fab2e3fdd7c35b4b/xmlrpclib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5991,
1477,
3198,
12,
4717,
4672,
3536,
22051,
1879,
326,
1686,
434,
279,
1778,
335,
454,
18,
12781,
854,
6718,
316,
766,
358,
31811,
12530,
87,
12123,
225,
1652,
1001,
2738,
972,
12,
28... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5991,
1477,
3198,
12,
4717,
4672,
3536,
22051,
1879,
326,
1686,
434,
279,
1778,
335,
454,
18,
12781,
854,
6718,
316,
766,
358,
31811,
12530,
87,
12123,
225,
1652,
1001,
2738,
972,
12,
28... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.