rem stringlengths 2 226k | add stringlengths 0 227k | context stringlengths 8 228k | meta stringlengths 156 215 | input_ids list | attention_mask list | labels list |
|---|---|---|---|---|---|---|
... print "Error !" | ... print("Error!") | def longest_path(self, s = None, t = None, weighted = False, algorithm = "MILP", solver = None, verbose = 0): r""" Returns a longest path of ``self``. | 1ce3f98f3b3a6c76baa509a4ebc0110ea7853d74 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/1ce3f98f3b3a6c76baa509a4ebc0110ea7853d74/generic_graph.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12163,
67,
803,
12,
2890,
16,
272,
273,
599,
16,
268,
273,
599,
16,
13747,
273,
1083,
16,
4886,
273,
315,
49,
2627,
52,
3113,
12776,
273,
599,
16,
3988,
273,
374,
4672,
436,
8395,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12163,
67,
803,
12,
2890,
16,
272,
273,
599,
16,
268,
273,
599,
16,
13747,
273,
1083,
16,
4886,
273,
315,
49,
2627,
52,
3113,
12776,
273,
599,
16,
3988,
273,
374,
4672,
436,
8395,
28... |
class results(list): ''' when given an election object this processes,counts and outputs the results ''' def calculateVotes(self,election): import operator print (election) for f in election: print(f) | def calculatewinner(self): self.calculateVotes() d = self loser = min (d,key = lambda a: d.get(a)) leader = max(d,key = lambda a: d.get(a)) leaderVoteCount = self[leader] if leaderVoteCount > self.NoVotesCast // 2 : print (str(leader) + ' is the winner') return leader else: if loser == 'None': print ('No clear winner of this election.') print (self.election) raise Exception( 'No winner for the election.') print (str(loser) + ' is knocked out of the race') e = self.election e.transferVote(loser) self = results(e) self.calculatewinner() | def electionTest(self): e = election() v = Vote() v.castVote(1) e.submit(v) assert e[0] == v, 'vote not counted' assert len(e) == 1, '# votes wrong' w = Vote() w.castVote(2) w.castVote(3) e.submit(w) assert e[0] == v, 'vote not counted' assert e[1] == w, 'vote not counted' assert len(e) == 2, '# votes wrong' e.transferVote(1) # votes for '1' will now be ignored. assert len(e) == 2, '# votes wrong' assert v.getVotes() == [] assert w.getVotes() == [2,3], 'w should not change' e.transferVote(2) # votes for '2' will now be ignored. assert w.getVotes() == [3], 'w not changed' x = Vote() x.castVote(3) x.castVote(2) e.submit(x) e.submit(w) assert e.getNumberOfVoters == 4 , 'vote count fails' r = results() | bc00b905b2d1ad3045574793ea984bc0c9e1542b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13778/bc00b905b2d1ad3045574793ea984bc0c9e1542b/transferableVoting.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
25526,
4709,
12,
2890,
4672,
425,
273,
25526,
1435,
331,
273,
27540,
1435,
331,
18,
4155,
19338,
12,
21,
13,
425,
18,
9297,
12,
90,
13,
1815,
425,
63,
20,
65,
422,
331,
16,
296,
2591... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
25526,
4709,
12,
2890,
4672,
425,
273,
25526,
1435,
331,
273,
27540,
1435,
331,
18,
4155,
19338,
12,
21,
13,
425,
18,
9297,
12,
90,
13,
1815,
425,
63,
20,
65,
422,
331,
16,
296,
2591... |
def __init__(data = None) | def __init__(data = None): | def __init__(data = None) if data == None: quickfix.DoubleField.__init__(self, 271) else quickfix.DoubleField.__init__(self, 271, data) | 484890147d4b23aac4b9d0e85e84fceab7e137c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8819/484890147d4b23aac4b9d0e85e84fceab7e137c3/quickfix_fields.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
892,
273,
599,
4672,
309,
501,
422,
599,
30,
9549,
904,
18,
5265,
974,
16186,
2738,
972,
12,
2890,
16,
576,
11212,
13,
469,
9549,
904,
18,
5265,
974,
16186,
2738,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
892,
273,
599,
4672,
309,
501,
422,
599,
30,
9549,
904,
18,
5265,
974,
16186,
2738,
972,
12,
2890,
16,
576,
11212,
13,
469,
9549,
904,
18,
5265,
974,
16186,
2738,
... |
''' Utilities for templating ''' | """ Utilities for templating """ | def next(self): try: self._sequence[self.end] except IndexError: return None return Batch(self.client, self._sequence, self._size, self.end - self.overlap, 0, self.orphan, self.overlap) | 16a3ebf380b95607b344181655488d818a27791f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1906/16a3ebf380b95607b344181655488d818a27791f/templating.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1024,
12,
2890,
4672,
775,
30,
365,
6315,
6178,
63,
2890,
18,
409,
65,
1335,
10195,
30,
327,
599,
327,
5982,
12,
2890,
18,
2625,
16,
365,
6315,
6178,
16,
365,
6315,
1467,
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,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1024,
12,
2890,
4672,
775,
30,
365,
6315,
6178,
63,
2890,
18,
409,
65,
1335,
10195,
30,
327,
599,
327,
5982,
12,
2890,
18,
2625,
16,
365,
6315,
6178,
16,
365,
6315,
1467,
16,
365,
18... |
arena=sendcached.sendcached_arena, scope=sendcached.sendcached_scope, | arena=cache.cache_arena, scope=cache.cache_scope, | def test_put_cache_complex(self): """Test if put_cache() works for a more complex, practical scenario: | 26cdd567d6dc43a37f820bd8425f39ba67660582 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/888/26cdd567d6dc43a37f820bd8425f39ba67660582/test_cache.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
458,
67,
2493,
67,
14259,
12,
2890,
4672,
3536,
4709,
309,
1378,
67,
2493,
1435,
6330,
364,
279,
1898,
7233,
16,
23122,
1706,
10766,
30,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
458,
67,
2493,
67,
14259,
12,
2890,
4672,
3536,
4709,
309,
1378,
67,
2493,
1435,
6330,
364,
279,
1898,
7233,
16,
23122,
1706,
10766,
30,
2,
-100,
-100,
-100,
-100,
-100,
-100,
... |
print 'succ rate :', self.succRate, ', succ perf :', self.succPerf | def __calculSuccessRates(self): """ Update succRate & succPerf values, according to the current optima list and problem instance """ total = self.runsNb success = 0 successIndex = [] for point in self.optima: if self.__success(point): success += 1 successIndex.append(point.index) self.succRate = float(success) / float(total) if success != 0: self.succPerf = r.mean(successIndex)*float(total) / float(success) print 'succ rate :', self.succRate, ', succ perf :', self.succPerf | f155da14d5bb0e7a54487b2399f31d6573b8fb23 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2996/f155da14d5bb0e7a54487b2399f31d6573b8fb23/ometahtest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
12780,
4510,
20836,
12,
2890,
4672,
3536,
2315,
21043,
4727,
473,
21043,
22016,
924,
16,
4888,
358,
326,
783,
5213,
69,
666,
471,
6199,
791,
3536,
2078,
273,
365,
18,
20152,
22816,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
12780,
4510,
20836,
12,
2890,
4672,
3536,
2315,
21043,
4727,
473,
21043,
22016,
924,
16,
4888,
358,
326,
783,
5213,
69,
666,
471,
6199,
791,
3536,
2078,
273,
365,
18,
20152,
22816,
... | |
def delete(self, id, ticket, method=None, package='node', store_type='workspace', store_id='SpacesStore', **kwargs): | def delete(self, id, method=None, package='node', store_type='workspace', store_id='SpacesStore', **kwargs): | def delete(self, id, ticket, method=None, package='node', store_type='workspace', store_id='SpacesStore', **kwargs): self._build_url(package, store_type, store_id, id, method, **kwargs) request = RESTRequest(self.url, method='DELETE', ticket=ticket) try: urllib2.urlopen(request) except urllib2.HTTPError, e: if e.code is not 204: raise e return None | 8d0171682262bad5b80c787206c898c457577733 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4571/8d0171682262bad5b80c787206c898c457577733/cmis.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1430,
12,
2890,
16,
612,
16,
707,
33,
7036,
16,
2181,
2218,
2159,
2187,
1707,
67,
723,
2218,
14915,
2187,
1707,
67,
350,
2218,
12077,
2257,
2187,
2826,
4333,
4672,
365,
6315,
3510,
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,
1430,
12,
2890,
16,
612,
16,
707,
33,
7036,
16,
2181,
2218,
2159,
2187,
1707,
67,
723,
2218,
14915,
2187,
1707,
67,
350,
2218,
12077,
2257,
2187,
2826,
4333,
4672,
365,
6315,
3510,
67,
... |
bucket_name, key_name = str_value.split('/') | bucket_name, key_name = str_value.split('/', 1) | def from_string(self, str_value, obj): if not str_value: return None try: bucket_name, key_name = str_value.split('/') if obj: s3 = obj.manager.get_s3_connection() bucket = s3.get_bucket(bucket_name) key = bucket.get_key(key_name) if not key: key = bucket.new_key(key_name) return key except: raise ValueError | 4ed3a9d248a250e075661bf3f1ae2873980282a9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1098/4ed3a9d248a250e075661bf3f1ae2873980282a9/checker.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
628,
67,
1080,
12,
2890,
16,
609,
67,
1132,
16,
1081,
4672,
309,
486,
609,
67,
1132,
30,
327,
599,
775,
30,
2783,
67,
529,
16,
498,
67,
529,
273,
609,
67,
1132,
18,
4939,
2668,
19,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
628,
67,
1080,
12,
2890,
16,
609,
67,
1132,
16,
1081,
4672,
309,
486,
609,
67,
1132,
30,
327,
599,
775,
30,
2783,
67,
529,
16,
498,
67,
529,
273,
609,
67,
1132,
18,
4939,
2668,
19,... |
self.scaledArr = self.dataArr.astype(num.Float32) | def redisplay(self): """Starting from the data array, redisplay the data. """ dataShapeXY = self.dataArr.shape[::-1] # create scaled array self.scaledArr = self.dataArr.astype(num.Float32) # offset so minimum display value = scaling function minimum input # note: this form of equation reuses the input array for output offset = self.scaleFuncMinInput - self.dataDispMin num.add(self.scaledArr, offset, self.scaledArr) num.maximum(self.scaledArr, self.scaleFuncMinInput, self.scaledArr) offsetDispRange = [self.dataDispMin + offset, self.dataDispMax + offset] # apply scaling function, if any if self.scaleFunc: self.scaledArr = self.scaleFunc(self.scaledArr) if self.scaledArr.type() == num.Float64: print "damn numarray, anyway" self.scaledArr = self.scaledArr.astype(num.Float32) self.scaledDispMin, self.scaledDispMax = self.scaleFunc(offsetDispRange) else: self.scaledDispMin, self.scaledDispMax = offsetDispRange print "self.scaledDispMin = %r; self.scaledDispMax = %r" % (self.scaledDispMin, self.scaledDispMax) # create image with scaled data self.scaledIm = Image.frombuffer("F", dataShapeXY, self.scaledArr.tostring()) | f6acf1b41d9f8bc361017b632a5be4b62e606910 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6236/f6acf1b41d9f8bc361017b632a5be4b62e606910/GrayImageDispWdg.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5813,
1601,
12,
2890,
4672,
3536,
11715,
628,
326,
501,
526,
16,
5813,
1601,
326,
501,
18,
3536,
501,
8500,
8546,
273,
365,
18,
892,
5715,
18,
4867,
63,
2866,
17,
21,
65,
225,
468,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5813,
1601,
12,
2890,
4672,
3536,
11715,
628,
326,
501,
526,
16,
5813,
1601,
326,
501,
18,
3536,
501,
8500,
8546,
273,
365,
18,
892,
5715,
18,
4867,
63,
2866,
17,
21,
65,
225,
468,
7... | |
if HTML_Doc._SPECIAL_METHODS.has_key(fname): | if SPECIAL_METHODS.has_key(fname): | def _func_details(self, functions, cls, heading='Function Details'): """Return a detailed description of the functions in a class or module.""" functions = self._sort(functions) if len(functions) == 0: return '' str = self._table_header(heading, 'details')+'</table>' | b1b93a7c8720ea1ae0c715da86bbf6fe1dbf094a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/b1b93a7c8720ea1ae0c715da86bbf6fe1dbf094a/html.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
644,
67,
6395,
12,
2890,
16,
4186,
16,
2028,
16,
11053,
2218,
2083,
21897,
11,
4672,
3536,
990,
279,
6864,
2477,
434,
326,
4186,
316,
279,
667,
578,
1605,
12123,
4186,
273,
365,
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,
389,
644,
67,
6395,
12,
2890,
16,
4186,
16,
2028,
16,
11053,
2218,
2083,
21897,
11,
4672,
3536,
990,
279,
6864,
2477,
434,
326,
4186,
316,
279,
667,
578,
1605,
12123,
4186,
273,
365,
6... |
self.assertEqual(-0x7fffffff, -2147483647) | if platform_long_is_32_bits: self.assertEqual(-0x7fffffff, -2147483647) else: self.assertEqual(-0x7fffffffffffffff, -9223372036854775807) | def test_hex_baseline(self): # Baseline tests self.assertEqual(0x0, 0) self.assertEqual(0x10, 16) self.assertEqual(0x7fffffff, 2147483647) # Ditto with a minus sign and parentheses self.assertEqual(-(0x0), 0) self.assertEqual(-(0x10), -16) self.assertEqual(-(0x7fffffff), -2147483647) # Ditto with a minus sign and NO parentheses self.assertEqual(-0x0, 0) self.assertEqual(-0x10, -16) self.assertEqual(-0x7fffffff, -2147483647) | dcfdceb9a21881b58f0278dda92a7cdce6782614 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/dcfdceb9a21881b58f0278dda92a7cdce6782614/test_hexoct.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
7118,
67,
27818,
12,
2890,
4672,
468,
605,
345,
3027,
7434,
365,
18,
11231,
5812,
12,
20,
92,
20,
16,
374,
13,
365,
18,
11231,
5812,
12,
20,
92,
2163,
16,
2872,
13,
365,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
7118,
67,
27818,
12,
2890,
4672,
468,
605,
345,
3027,
7434,
365,
18,
11231,
5812,
12,
20,
92,
20,
16,
374,
13,
365,
18,
11231,
5812,
12,
20,
92,
2163,
16,
2872,
13,
365,
... |
def install_openalea(pkgs): | def install_openalea(): | def install_openalea(pkgs): """ Install the base packages """ pkgs = ["openalea.deploygui",] if("win" in sys.platform): pkgs += ["qt4",] for pkg in pkgs: install_pkg(pkg) | 5dcdad43444da1314349fa4cd342024c30f8367a /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4914/5dcdad43444da1314349fa4cd342024c30f8367a/ez_alea_setup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3799,
67,
3190,
5349,
69,
13332,
3536,
10284,
326,
1026,
5907,
3536,
225,
16922,
273,
8247,
3190,
5349,
69,
18,
12411,
20292,
3113,
65,
225,
309,
2932,
8082,
6,
316,
2589,
18,
9898,
4672... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3799,
67,
3190,
5349,
69,
13332,
3536,
10284,
326,
1026,
5907,
3536,
225,
16922,
273,
8247,
3190,
5349,
69,
18,
12411,
20292,
3113,
65,
225,
309,
2932,
8082,
6,
316,
2589,
18,
9898,
4672... |
2 of 4 in test_doctest4.txt | 2 of 2 in test_doctest4.txt | def test_testfile(): r""" | b1a9f2772ba21f268a8164908714e5a106be50d1 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8546/b1a9f2772ba21f268a8164908714e5a106be50d1/test_doctest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
3813,
768,
13332,
436,
8395,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
3813,
768,
13332,
436,
8395,
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,
-1... |
def configLine(self, line): | def configLine(self, line, file = "override"): | def configLine(self, line): | 2e7ae4267d23089a895b538ccc58ade88a57bac5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8747/2e7ae4267d23089a895b538ccc58ade88a57bac5/conarycfg.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
642,
1670,
12,
2890,
16,
980,
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,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
642,
1670,
12,
2890,
16,
980,
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,... |
return _guiClass.determine_choices(self, locals) | return Class.determine_choices(self, locals) | def determine_choices(self, locals): from gamera import core self.klass = core.Point return _guiClass.determine_choices(self, locals) | f5d4e3d597188d03306f89255f12e2f9db0d51c9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9927/f5d4e3d597188d03306f89255f12e2f9db0d51c9/args_gui.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4199,
67,
11937,
12,
2890,
16,
8985,
4672,
628,
314,
11229,
1930,
2922,
365,
18,
22626,
273,
2922,
18,
2148,
327,
389,
20292,
797,
18,
24661,
67,
11937,
12,
2890,
16,
8985,
13,
2,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4199,
67,
11937,
12,
2890,
16,
8985,
4672,
628,
314,
11229,
1930,
2922,
365,
18,
22626,
273,
2922,
18,
2148,
327,
389,
20292,
797,
18,
24661,
67,
11937,
12,
2890,
16,
8985,
13,
2,
-100... |
inputFileName = hdf5DataStoreDir + os.sep + "input.mmp" env.history.message(self.cmdname + ": Writing input.mmp file to HDF5 data store directory.") all_atoms = {} self.part.writemmpfile(inputFileName, add_atomids_to_dict = all_atoms) | if (launchNV1): inputFileName = hdf5DataStoreDir + os.sep + "input.mmp" env.history.message(self.cmdname + ": Writing input.mmp file to HDF5 data store directory.") all_atoms = {} self.part.writemmpfile(inputFileName, add_atomids_to_dict = all_atoms) | def run_using_old_movie_obj_to_hold_sim_params(self, movie): self._movie = movie # general kluge for old-code compat # (lots of our methods still use this and modify it) # note, this movie object (really should be a simsetup object?) # does not yet know a proper alist (or any alist, I hope) [bruce 050404] self.errcode = self.set_options_errQ( ) # set movie alist, output filenames, sim executable pathname (verify it exists) #obs comment [about the options arg i removed?? or smth else?] # options include everything that affects the run except the set of atoms and the part if self.errcode: # used to be a local var 'r' # bruce 051115 comment: more than one reason this can happen; # one is sim executable missing return self.sim_input_file = self.sim_input_filename() # might get name from options or make up a temporary filename if (self.mflag == 1 and self.useGromacs): if (not self.verifyGromacsPlugin()): self.errcode = FAILURE_ALREADY_DOCUMENTED return if (self.background): if (not self.verifyNanoVision1Plugin()): self.errcode = FAILURE_ALREADY_DOCUMENTED return self.set_waitcursor(True) progressBar = self.win.statusBar().progressBar | 0d723b48183c53759eeb7acb5b16b25588d30624 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11221/0d723b48183c53759eeb7acb5b16b25588d30624/runSim.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
67,
9940,
67,
1673,
67,
8683,
13120,
67,
2603,
67,
869,
67,
21056,
67,
9812,
67,
2010,
12,
2890,
16,
21360,
4672,
365,
6315,
8683,
13120,
273,
21360,
468,
7470,
15290,
21627,
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,
1086,
67,
9940,
67,
1673,
67,
8683,
13120,
67,
2603,
67,
869,
67,
21056,
67,
9812,
67,
2010,
12,
2890,
16,
21360,
4672,
365,
6315,
8683,
13120,
273,
21360,
468,
7470,
15290,
21627,
364,
... |
reactor.callLater(nextUpdate, self.update) log.debug("Scheduling first update in %.1f seconds.", nextUpdate) | if nextUpdate > 0: log.debug("Scheduling first update in %.1f seconds.", nextUpdate) reactor.callLater(nextUpdate, self.update) else: log.notice("Export file is not up-to-date. Trying again in 10 minutes.") reactor.callLater(10 * 60, self.update) | def __init__(self, zone, filename, status, *args, **kwargs): server.DNSServerFactory.__init__(self, *args, **kwargs) self.el = ExitList(filename, status) | 0e66f7ef61dbd94ae2d4ebcc5d508da539ac15e7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9986/0e66f7ef61dbd94ae2d4ebcc5d508da539ac15e7/dnsel.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
4157,
16,
1544,
16,
1267,
16,
380,
1968,
16,
2826,
4333,
4672,
1438,
18,
11602,
2081,
1733,
16186,
2738,
972,
12,
2890,
16,
380,
1968,
16,
2826,
4333,
13... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
4157,
16,
1544,
16,
1267,
16,
380,
1968,
16,
2826,
4333,
4672,
1438,
18,
11602,
2081,
1733,
16186,
2738,
972,
12,
2890,
16,
380,
1968,
16,
2826,
4333,
13... |
(CFG_SITE_URL, CFG_WEBBASKET_CATEGORIES['GROUP'], group, bskid, ln, cgi.escape(basket)) | (CFG_SITE_URL, CFG_WEBBASKET_CATEGORIES['GROUP'], group, bskid, ln, cgi.escape(basket)) | def create_webbasket_navtrail(uid, category="", topic="", group=0, bskid=0, public_basket=False, search_baskets=False, add_to_basket=False, ln=CFG_SITE_LANG): """Create the navtrail for navigation withing WebBasket. @param uid: user id (int) @param category: selected category (see CFG_WEBBASKET_CATEGORIES) @param topic: selected topic (str) @param group: selected group (int) @param bskid: selected basket id (int) @param ln: language""" _ = gettext_set_language(ln) out = """<a class="navtrail" href="%s/youraccount/display?ln=%s">%s</a>""" % \ (CFG_SITE_URL, ln, _("Your Account")) out += " > " out += """<a class="navtrail" href="%s/yourbaskets/display?ln=%s">%s</a>""" % \ (CFG_SITE_URL, ln, _("Your Baskets")) if public_basket: out += " > " out += """<a class="navtrail" href="%s/yourbaskets/list_public_baskets?ln=%s">%s</a>""" % \ (CFG_SITE_URL, ln, _("List of public baskets")) if bskid: basket = db.get_basket_name(bskid) if basket: out += " > " out += """<a class="navtrail" href="%s/yourbaskets/display_public?bskid=%i&ln=%s">%s</a>""" % \ (CFG_SITE_URL, bskid, ln, cgi.escape(basket)) elif search_baskets: out += " > " out += """<a class="navtrail" href="%s/yourbaskets/search?ln=%s">%s</a>""" % \ (CFG_SITE_URL, ln, _("Search baskets")) elif add_to_basket: out += " > " out += """<a class="navtrail" href="%s/yourbaskets/add?ln=%s">%s</a>""" % \ (CFG_SITE_URL, ln, _("Add to basket")) else: if category == CFG_WEBBASKET_CATEGORIES['PRIVATE']: out += " > " out += """<a class="navtrail" href="%s/yourbaskets/display?category=%s&ln=%s">%s</a>""" % \ (CFG_SITE_URL, CFG_WEBBASKET_CATEGORIES['PRIVATE'], ln, _("Personal baskets")) if topic: topic_names = map(lambda x: x[0], db.get_personal_topics_infos(uid)) if topic in topic_names: out += " > " out += """<a class="navtrail" href="%s/yourbaskets/display?category=%s&topic=%s&ln=%s">%s</a>""" % \ (CFG_SITE_URL, CFG_WEBBASKET_CATEGORIES['PRIVATE'], cgi.escape(topic), ln, cgi.escape(topic)) if bskid: basket = db.get_basket_name(bskid) if basket: out += " > " out += """<a class="navtrail" href="%s/yourbaskets/display?category=%s&topic=%s&bskid=%i&ln=%s">%s</a>""" % \ (CFG_SITE_URL, CFG_WEBBASKET_CATEGORIES['PRIVATE'], cgi.escape(topic), bskid, ln, cgi.escape(basket)) elif category == CFG_WEBBASKET_CATEGORIES['GROUP']: out += " > " out += """<a class="navtrail" href="%s/yourbaskets/display?category=%s&ln=%s">%s</a>""" % \ (CFG_SITE_URL, CFG_WEBBASKET_CATEGORIES['GROUP'], ln, _("Group baskets")) if group: group_names = map(lambda x: x[0] == group and x[1], db.get_group_infos(uid)) if group_names and group_names[0]: out += " > " out += """<a class="navtrail" href="%s/yourbaskets/display?category=%s&group=%i&ln=%s">%s</a>""" % \ (CFG_SITE_URL, CFG_WEBBASKET_CATEGORIES['GROUP'], group, ln, cgi.escape(group_names[0])) if bskid: basket = db.get_basket_name(bskid) if basket: out += " > " out += """<a class="navtrail" href="%s/yourbaskets/display?category=%s&topic=%s&bskid=%i&ln=%s">%s</a>""" % \ (CFG_SITE_URL, CFG_WEBBASKET_CATEGORIES['GROUP'], group, bskid, ln, cgi.escape(basket)) elif category == CFG_WEBBASKET_CATEGORIES['EXTERNAL']: out += " > " out += """<a class="navtrail" href="%s/yourbaskets/display?category=%s&ln=%s">%s</a>""" % \ (CFG_SITE_URL, category, ln, _("Public baskets")) if bskid: basket = db.get_basket_name(bskid) if basket: out += " > " out += """<a class="navtrail" href="%s/yourbaskets/display?category=%s&topic=%s&bskid=%i&ln=%s">%s</a>""" % \ (CFG_SITE_URL, category, group, bskid, ln, cgi.escape(basket)) return out | 565773a9948c9da197cae151dd3ebd72a14db852 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12027/565773a9948c9da197cae151dd3ebd72a14db852/webbasket.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
67,
4875,
26219,
67,
11589,
15565,
12,
1911,
16,
3150,
1546,
3113,
3958,
1546,
3113,
1041,
33,
20,
16,
7081,
79,
350,
33,
20,
16,
1071,
67,
26219,
33,
8381,
16,
1623,
67,
70,
83... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
67,
4875,
26219,
67,
11589,
15565,
12,
1911,
16,
3150,
1546,
3113,
3958,
1546,
3113,
1041,
33,
20,
16,
7081,
79,
350,
33,
20,
16,
1071,
67,
26219,
33,
8381,
16,
1623,
67,
70,
83... |
def __init__(self): | def __init__( self ): | def __init__(self): """ This class stores the two wrapper functions for interacting with the StorageElement: _executeStorageElementFunction(storageElementName,pfn,method,argsDict={}) Is a wrapper around the available StorageElement() functions. The 'storageElementName', 'pfn' and 'method' arguments must be provided: 'storageElementName' is the DIRAC SE name to be accessed e.g. CERN-DST. 'pfn' contains a single pfn string or a list or dictionary containing the required files. 'method' is the name of the StorageElement() method to be invoked. 'argsDict' contains aditional arguments that are requred for the method. | 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,
1001,
2738,
972,
12,
365,
262,
30,
3536,
1220,
667,
9064,
326,
2795,
4053,
4186,
364,
16592,
310,
598,
326,
5235,
1046,
30,
225,
389,
8837,
3245,
1046,
2083,
12,
5697,
30584,
16,
84,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
365,
262,
30,
3536,
1220,
667,
9064,
326,
2795,
4053,
4186,
364,
16592,
310,
598,
326,
5235,
1046,
30,
225,
389,
8837,
3245,
1046,
2083,
12,
5697,
30584,
16,
84,
4... |
command, text = text, "" | command, _ = text, "" | def messageHandler(self, cnx, message): text = message.getBody() user = message.getFrom() | a23eae2dbbf5672ff35a507fa474dfad18015566 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3020/a23eae2dbbf5672ff35a507fa474dfad18015566/gtalk.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
883,
1503,
12,
2890,
16,
29492,
16,
883,
4672,
977,
273,
883,
18,
588,
2250,
1435,
729,
273,
883,
18,
588,
1265,
1435,
2,
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,
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,
883,
1503,
12,
2890,
16,
29492,
16,
883,
4672,
977,
273,
883,
18,
588,
2250,
1435,
729,
273,
883,
18,
588,
1265,
1435,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
if value != '' and StringContainsOnly(value, 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789$./_'): | if unquoted.match(value): | def _EncodeString(self, value): """Encodes a string to be placed in the project file output, mimicing Xcode behavior. """ | b65c2437877b1ec50d44faa8c9ccc62b2eb09121 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6220/b65c2437877b1ec50d44faa8c9ccc62b2eb09121/xcodeproj_file.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
5509,
780,
12,
2890,
16,
460,
4672,
3536,
19771,
279,
533,
358,
506,
15235,
316,
326,
1984,
585,
876,
16,
20369,
14774,
1139,
710,
6885,
18,
3536,
2,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
5509,
780,
12,
2890,
16,
460,
4672,
3536,
19771,
279,
533,
358,
506,
15235,
316,
326,
1984,
585,
876,
16,
20369,
14774,
1139,
710,
6885,
18,
3536,
2,
-100,
-100,
-100,
-100,
-100,
... |
_flag = True | def _get_menu_hierarchy(self, window_name, object_name): _menu_hierarchy = re.split(';', object_name) # Get handle of menu obj = self._get_object(window_name, _menu_hierarchy[0]) # Navigate all sub-menu under a menu for _menu in _menu_hierarchy[1:]: _flag = False for _child in self._list_objects(obj): if obj == _child: # if the given object and child object matches continue if self._match_name_to_acc(_menu, _child): obj = _child _flag = True break if not _flag: raise LdtpServerException ( "Menu item %s doesn't exist in hierarchy" % _menu) return obj | 43924f2ba30b8adb9b55c5c34c99a33f800d4022 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11266/43924f2ba30b8adb9b55c5c34c99a33f800d4022/utils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
67,
5414,
67,
17937,
12,
2890,
16,
2742,
67,
529,
16,
733,
67,
529,
4672,
389,
5414,
67,
17937,
273,
283,
18,
4939,
2668,
31,
2187,
733,
67,
529,
13,
468,
968,
1640,
434,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
67,
5414,
67,
17937,
12,
2890,
16,
2742,
67,
529,
16,
733,
67,
529,
4672,
389,
5414,
67,
17937,
273,
283,
18,
4939,
2668,
31,
2187,
733,
67,
529,
13,
468,
968,
1640,
434,
... | |
def Stop(self, widget = None): '''Stop recording/playing (whichever is happening)''' | def Stop(self, widget=None): """ Stops the current record/playback (whichever is happening) operation. Parameters: widget -- reserved for GTK callbacks, don't use it explicitly. """ | def Stop(self, widget = None): '''Stop recording/playing (whichever is happening)''' | d98c0166f58a20c11dd843ed644fda9b8e03dc8b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10033/d98c0166f58a20c11dd843ed644fda9b8e03dc8b/JokosherApp.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5131,
12,
2890,
16,
3604,
273,
599,
4672,
9163,
4947,
14949,
19,
1601,
310,
261,
3350,
335,
580,
502,
353,
5865,
310,
2506,
6309,
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,
5131,
12,
2890,
16,
3604,
273,
599,
4672,
9163,
4947,
14949,
19,
1601,
310,
261,
3350,
335,
580,
502,
353,
5865,
310,
2506,
6309,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
"""Read and parse a list of filenames.""" | """Read and parse a filename or a list of filenames. Files that cannot be opened are silently ignored; this is designed so that you can specifiy a list of potential configuration file locations (e.g. current directory, user's home directory, systemwide directory), and all existing configuration files in the list will be read. A single filename may also be given. """ | def read(self, filenames): """Read and parse a list of filenames.""" if type(filenames) is type(''): filenames = [filenames] for file in filenames: fp = open(file) self.__read(fp) fp.close() | 6a8d84b0c1508d0a3f10f716f3faf3863b41f758 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/6a8d84b0c1508d0a3f10f716f3faf3863b41f758/ConfigParser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
12,
2890,
16,
9066,
4672,
225,
3536,
1994,
471,
1109,
279,
1544,
578,
279,
666,
434,
9066,
18,
225,
6471,
716,
2780,
506,
10191,
854,
22274,
5455,
31,
333,
353,
26584,
1427,
716,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
12,
2890,
16,
9066,
4672,
225,
3536,
1994,
471,
1109,
279,
1544,
578,
279,
666,
434,
9066,
18,
225,
6471,
716,
2780,
506,
10191,
854,
22274,
5455,
31,
333,
353,
26584,
1427,
716,
... |
res.append(n) | if n != 1: res.append(n) | def fact(n): if n < 1: raise error # fact() argument should be >= 1 if n == 1: return [] # special case res = [] # Treat even factors special, so we can use i = i+2 later while n%2 == 0: res.append(2) n = n/2 # Try odd numbers up to sqrt(n) limit = sqrt(n+1) i = 3 while i <= limit: if n%i == 0: res.append(i) n = n/i limit = sqrt(n+1) else: i = i+2 res.append(n) return res | 8d9a4634a08e030e231002276778ab4b68e95a4d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/8d9a4634a08e030e231002276778ab4b68e95a4d/fact.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5410,
12,
82,
4672,
309,
290,
411,
404,
30,
1002,
555,
202,
7,
5410,
1435,
1237,
1410,
506,
1545,
404,
309,
290,
422,
404,
30,
327,
5378,
202,
7,
4582,
648,
400,
273,
5378,
468,
2656... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5410,
12,
82,
4672,
309,
290,
411,
404,
30,
1002,
555,
202,
7,
5410,
1435,
1237,
1410,
506,
1545,
404,
309,
290,
422,
404,
30,
327,
5378,
202,
7,
4582,
648,
400,
273,
5378,
468,
2656... |
(handle, filename) = tempfile.mkstemp() | (handle, filename) = tempfile.mkstemp("regulartest") | def test_getsize(self): import tempfile | 38dabae58530e228c33d3584d903daf1ef808f7e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7853/38dabae58530e228c33d3584d903daf1ef808f7e/FileUtilities.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
588,
1467,
12,
2890,
4672,
1930,
13275,
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,
1842,
67,
588,
1467,
12,
2890,
4672,
1930,
13275,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
"ProdMgrConfiguration/ConfigBlock" | "ProdAgentConfiguration/ConfigBlock" | def load(self, improvNode): """ _load_ | 2e75e0b77d8fd3fb6b9c99147ca9e6610aa64f55 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8887/2e75e0b77d8fd3fb6b9c99147ca9e6610aa64f55/Configuration.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1262,
12,
2890,
16,
13069,
90,
907,
4672,
3536,
389,
945,
67,
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... | [
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,
1262,
12,
2890,
16,
13069,
90,
907,
4672,
3536,
389,
945,
67,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
return 'FG:'+str(starsystem) | return 'SS:'+str(starsystem) | def MakeStarSystemFGKey (starsystem): return 'FG:'+str(starsystem) | d980c04c99a3b53d40a9df904239d6c2956d09ec /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2883/d980c04c99a3b53d40a9df904239d6c2956d09ec/fg_util.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4344,
18379,
3163,
42,
43,
653,
261,
10983,
4299,
4672,
327,
296,
42,
43,
2497,
15,
701,
12,
10983,
4299,
13,
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,
4344,
18379,
3163,
42,
43,
653,
261,
10983,
4299,
4672,
327,
296,
42,
43,
2497,
15,
701,
12,
10983,
4299,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
cty.c_int, [cty.POINTER(FL_OBJECT)], | cty.c_int, [cty.POINTER(FL_OBJECT)], | def fl_set_counter_min_repeat(ob, millisec): """ fl_set_counter_min_repeat(ob, millisec) """ _fl_set_counter_min_repeat(ob, millisec) | 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,
542,
67,
7476,
67,
1154,
67,
9374,
12,
947,
16,
9817,
4672,
3536,
1183,
67,
542,
67,
7476,
67,
1154,
67,
9374,
12,
947,
16,
9817,
13,
3536,
225,
389,
2242,
67,
542,
67,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1183,
67,
542,
67,
7476,
67,
1154,
67,
9374,
12,
947,
16,
9817,
4672,
3536,
1183,
67,
542,
67,
7476,
67,
1154,
67,
9374,
12,
947,
16,
9817,
13,
3536,
225,
389,
2242,
67,
542,
67,
7... |
label = builder.enter_next_block([signed_kind], args_gv) | label = builder.enter_next_block([signed_kind, signed_kind], args_gv) | # def f(x, y) | b35f75177afb43e727dffc43fa04ad88fdb0b837 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6934/b35f75177afb43e727dffc43fa04ad88fdb0b837/rgenop_tests.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
468,
1652,
284,
12,
92,
16,
677,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
468,
1652,
284,
12,
92,
16,
677,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
status_file.write('%s %d %d %d %f %d\n' % (stat_version,next_i,expired_file_count,total_file_count, total_time)) | status_file.write('%s %d %d %d %f\n' % (stat_version, next_i, expired_file_count, total_file_count, total_time)) | def filesession_cleanup(data): # There is a small chance that a the cleanup for a given session file # may occur at the exact time that the session is being accessed by # another request. It is possible under certain circumstances for that # session file to be saved in another request only to immediately deleted # by the cleanup. To avoid this race condition, a session is allowed a # grace_period before it is considered for deletion by the cleanup. # As long as the grace_period is longer that the time it takes to complete # the request (which should normally be less than 1 second), the session will # not be mistakenly deleted by the cleanup. By doing this we also avoid the # need to lock individual sessions and bypass any potential deadlock # situations. req = data['req'] sessdir = data['sessdir'] fast_cleanup = data['fast_cleanup'] verify_cleanup = data['verify_cleanup'] timeout = data['timeout'] grace_period = data['grace_period'] cleanup_time_limit = data['cleanup_time_limit'] req.log_error('FileSession cleanup: (fast=%s, verify=%s) ...' % (fast_cleanup,verify_cleanup), apache.APLOG_NOTICE) lockfile = os.path.join(sessdir,'.mp_sess.lck') try: lockfp = os.open(lockfile, os.O_CREAT | os.O_EXCL | os.O_WRONLY, 0660) except: req.log_error('FileSession cleanup: another process is already running.' % (fast_cleanup,verify_cleanup), apache.APLOG_NOTICE) return try: status_file = file(os.path.join(sessdir, 'fs_status.txt'), 'r') d = status_file.readline() status_file.close() if not d.startswith(FS_STAT_VERSION): raise Exception, 'wrong status file version' parts = d.split() stat_version = parts[0] next_i = int(parts[1]) expired_file_count = int(parts[2]) total_file_count = int(parts[3]) total_time = float(parts[4]) except: stat_version = FS_STAT_VERSION next_i = 0 expired_file_count = 0 total_file_count = 0 total_time = 0.0 try: start_time = time.time() filelist = os.listdir(sessdir) dir_index = range(0,256)[next_i:] for i in dir_index: path = '%s/%s' % (sessdir,'%02x' % i) if not os.path.exists(path): continue filelist = os.listdir(path) total_file_count += len(filelist) for f in filelist: try: filename = os.path.join(path,f) if fast_cleanup: accessed = os.stat(filename).st_mtime if time.time() - accessed < (timeout + grace_period): continue if fast_cleanup and not verify_cleanup: delete_session = True else: try: fp = file(filename) dict = cPickle.load(fp) if (time.time() - dict['_accessed']) > (dict['_timeout'] + grace_period): delete_session = True else: delete_session = False finally: fp.close() if delete_session: os.unlink(filename) expired_file_count += 1 except: s = cStringIO.StringIO() traceback.print_exc(file=s) s = s.getvalue() req.log_error('FileSession cleanup error: %s' % (s), apache.APLOG_NOTICE) next_i = (i + 1) % 256 time_used = time.time() - start_time if (cleanup_time_limit > 0) and (time_used > cleanup_time_limit): break total_time += time.time() - start_time if next_i == 0: # next_i can only be 0 when the full cleanup has run to completion req.log_error("FileSession cleanup: deleted %d of %d in %.4f seconds" % (expired_file_count, total_file_count, total_time), apache.APLOG_NOTICE) expired_file_count = 0 total_file_count = 0 total_time = 0.0 else: req.log_error("FileSession cleanup incomplete: next cleanup will start at index %d (%02x)" % (next_i,), apache.APLOG_NOTICE) status_file = file(os.path.join(sessdir, 'fs_status.txt'), 'w') status_file.write('%s %d %d %d %f %d\n' % (stat_version,next_i,expired_file_count,total_file_count, total_time)) status_file.close() try: os.unlink(lockfile) except: pass finally: os.close(lockfp) | 4ff6855b6656236505cece21a979b885aa774e8d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10002/4ff6855b6656236505cece21a979b885aa774e8d/Session.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1390,
893,
67,
16732,
12,
892,
4672,
468,
6149,
353,
279,
5264,
17920,
716,
279,
326,
6686,
364,
279,
864,
1339,
585,
468,
2026,
3334,
622,
326,
5565,
813,
716,
326,
1339,
353,
3832,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1390,
893,
67,
16732,
12,
892,
4672,
468,
6149,
353,
279,
5264,
17920,
716,
279,
326,
6686,
364,
279,
864,
1339,
585,
468,
2026,
3334,
622,
326,
5565,
813,
716,
326,
1339,
353,
3832,
1... |
self.logger.debug(self.ex_ents) | self.logger.debug(ex_ents) | def VerifyDirectory(self, entry, modlist): '''Verify Directory Entry''' while len(entry.get('perms', '')) < 4: entry.set('perms', '0' + entry.get('perms', '')) try: ondisk = os.stat(entry.get('name')) except OSError: entry.set('current_exists', 'false') self.logger.debug("%s %s does not exist" % (entry.tag, entry.get('name'))) return False try: owner = str(ondisk[ST_UID]) group = str(ondisk[ST_GID]) except (OSError, KeyError): self.logger.error('User/Group resolution failed for path %s' % (entry.get('name'))) owner = 'root' group = '0' finfo = os.stat(entry.get('name')) perms = oct(finfo[ST_MODE])[-4:] if entry.get('mtime', '-1') != '-1': mtime = str(finfo[ST_MTIME]) else: mtime = '-1' pTrue = ((owner == str(normUid(entry))) and (group == str(normGid(entry))) and (perms == entry.get('perms')) and (mtime == entry.get('mtime', '-1'))) | 3d29375196c124405db4d256dc8368f39e9160d1 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11867/3d29375196c124405db4d256dc8368f39e9160d1/POSIX.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8553,
2853,
12,
2890,
16,
1241,
16,
681,
1098,
4672,
9163,
8097,
8930,
3841,
26418,
1323,
562,
12,
4099,
18,
588,
2668,
15969,
2187,
875,
3719,
411,
1059,
30,
1241,
18,
542,
2668,
15969,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8553,
2853,
12,
2890,
16,
1241,
16,
681,
1098,
4672,
9163,
8097,
8930,
3841,
26418,
1323,
562,
12,
4099,
18,
588,
2668,
15969,
2187,
875,
3719,
411,
1059,
30,
1241,
18,
542,
2668,
15969,... |
log.debug("%s: Found root language content for: [%s]", self, short_code) | log.debug("Carrier: Found root language content for: [%s]", short_code) | def _find_translation(self, language_code=None): if not language_code: language_code = get_language() c = self.translations.filter(languagecode__exact = language_code) ct = c.count() | 24ac1d029df1b76c09c08a92b49a0939a13c8c6d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/171/24ac1d029df1b76c09c08a92b49a0939a13c8c6d/models.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
4720,
67,
10173,
12,
2890,
16,
2653,
67,
710,
33,
7036,
4672,
309,
486,
2653,
67,
710,
30,
2653,
67,
710,
273,
336,
67,
4923,
1435,
225,
276,
273,
365,
18,
13457,
18,
2188,
12,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
4720,
67,
10173,
12,
2890,
16,
2653,
67,
710,
33,
7036,
4672,
309,
486,
2653,
67,
710,
30,
2653,
67,
710,
273,
336,
67,
4923,
1435,
225,
276,
273,
365,
18,
13457,
18,
2188,
12,
... |
DEFAULT_SIMOPTS = ("--minimize", "--dump-as-text") | DEFAULT_SIMOPTS = ("--minimize", "--dump-as-text", "FOO.mmp") | def structureComparisonBondlengthsBondangles(self): # TODO: handle multiple-frame xyz files from animations lac = LengthAngleComparison(self.testname + ".mmp") lac.compare(self.testname + ".xyz", self.testname + ".xyzcmp") | d4548954f0b2ec61c249ce8e1b4af97c07a52a78 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/d4548954f0b2ec61c249ce8e1b4af97c07a52a78/tests.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3695,
16059,
9807,
14907,
9807,
12356,
12,
2890,
4672,
468,
2660,
30,
1640,
3229,
17,
3789,
14779,
1390,
628,
25536,
328,
1077,
273,
11311,
8467,
16059,
12,
2890,
18,
3813,
529,
397,
3552,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3695,
16059,
9807,
14907,
9807,
12356,
12,
2890,
4672,
468,
2660,
30,
1640,
3229,
17,
3789,
14779,
1390,
628,
25536,
328,
1077,
273,
11311,
8467,
16059,
12,
2890,
18,
3813,
529,
397,
3552,... |
"There seems to have been a 'changedpage' module in the works for RSS 1.0 that provides " | "There was a 'changedpage' module in the works for RSS 1.0 that would have provided " | def render_form(self, context): return tag('form', action = Link.RSSLink(self.statsPage.target).getURL(context), )[place('formContent')] | e120357d04e309e11983eb82926ae0ec6afed137 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9478/e120357d04e309e11983eb82926ae0ec6afed137/Feed.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1743,
67,
687,
12,
2890,
16,
819,
4672,
327,
1047,
2668,
687,
2187,
1301,
273,
4048,
18,
31211,
2098,
12,
2890,
18,
5296,
1964,
18,
3299,
2934,
588,
1785,
12,
2472,
3631,
262,
63,
964,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1743,
67,
687,
12,
2890,
16,
819,
4672,
327,
1047,
2668,
687,
2187,
1301,
273,
4048,
18,
31211,
2098,
12,
2890,
18,
5296,
1964,
18,
3299,
2934,
588,
1785,
12,
2472,
3631,
262,
63,
964,... |
this = apply(_quickfix.new_NoUndlyInstrumentParties, args) | this = _quickfix.new_NoUndlyInstrumentParties(*args) | def __init__(self, *args): this = apply(_quickfix.new_NoUndlyInstrumentParties, args) try: self.this.append(this) except: self.this = this | 7e632099fd421880c8c65fb0cf610d338d115ee9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8819/7e632099fd421880c8c65fb0cf610d338d115ee9/quickfix.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
380,
1968,
4672,
333,
273,
389,
19525,
904,
18,
2704,
67,
2279,
984,
72,
715,
19228,
1988,
606,
30857,
1968,
13,
775,
30,
365,
18,
2211,
18,
6923,
12,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
380,
1968,
4672,
333,
273,
389,
19525,
904,
18,
2704,
67,
2279,
984,
72,
715,
19228,
1988,
606,
30857,
1968,
13,
775,
30,
365,
18,
2211,
18,
6923,
12,
... |
self._num_files = len(self.class_list) + 2*len(self.module_list) + 12 | self._num_files = len(self.class_list) + 2*len(self.module_list) + 13 | def __init__(self, docindex, **kwargs): """ Construct a new HTML writer, using the given documentation index. @param docmap: The documentation index. @type prj_name: C{string} @keyword prj_name: The name of the project. Defaults to none. @type prj_url: C{string} @keyword prj_url: The target for the project hopeage link on the navigation bar. If C{prj_url} is not specified, then no hyperlink is created. @type prj_link: C{string} @keyword prj_link: The label for the project link on the navigation bar. This link can contain arbitrary HTML code (e.g. images). By default, a label is constructed from C{prj_name}. @type top_page: C{string} @keyword top_page: The top page for the documentation. This is the default page shown main frame, when frames are enabled. C{top} can be a URL, the name of a module, the name of a class, or one of the special strings C{"trees.html"}, C{"indices.html"}, or C{"help.html"}. By default, the top-level package or module is used, if there is one; otherwise, C{"trees"} is used. @type css: C{string} @keyword css: The CSS stylesheet file. If C{css} is a file name, then the specified file's conents will be used. Otherwise, if C{css} is the name of a CSS stylesheet in L{epydoc.docwriter.html_css}, then that stylesheet will be used. Otherwise, an error is reported. If no stylesheet is specified, then the default stylesheet is used. @type help_file: C{string} @keyword help_file: The name of the help file. If no help file is specified, then the default help file will be used. @type show_private: C{boolean} @keyword show_private: Whether to create documentation for private objects. By default, private objects are documented. @type show_frames: C{boolean}) @keyword show_frames: Whether to create a frames-based table of contents. By default, it is produced. @type show_imports: C{boolean} @keyword show_imports: Whether or not to display lists of imported functions and classes. By default, they are not shown. @type variable_maxlines: C{int} @keyword variable_maxlines: The maximum number of lines that should be displayed for the value of a variable in the variable details section. By default, 8 lines are displayed. @type variable_linelength: C{int} @keyword variable_linelength: The maximum line length used for displaying the values of variables in the variable details sections. If a line is longer than this length, then it will be wrapped to the next line. The default line length is 70 characters. @type variable_summary_linelength: C{int} @keyword variable_summary_linelength: The maximum line length used for displaying the values of variables in the summary section. If a line is longer than this length, then it will be truncated. The default is 40 characters. @type variable_tooltip_linelength: C{int} @keyword variable_tooltip_linelength: The maximum line length used for tooltips for the values of variables. If a line is longer than this length, then it will be truncated. The default is 600 characters. @type property_function_linelength: C{int} @keyword property_function_linelength: The maximum line length used to dispaly property functions (C{fget}, C{fset}, and C{fdel}) that contain something other than a function object. The default length is 40 characters. @type inheritance: C{string} @keyword inheritance: How inherited objects should be displayed. If C{inheritance='grouped'}, then inherited objects are gathered into groups; if C{inheritance='listed'}, then inherited objects are listed in a short list at the end of their group; if C{inheritance='included'}, then inherited objects are mixed in with non-inherited objects. The default is 'grouped'. @type include_sourcecode: C{boolean} @param include_sourcecode: If true, then generate colorized source code files for each python module. """ self.docindex = docindex # Process keyword arguments. self._show_private = kwargs.get('show_private', 1) """Should private docs be included?""" self._prj_name = kwargs.get('prj_name', None) """The project's name (for the project link in the navbar)""" self._prj_url = kwargs.get('prj_url', None) """URL for the project link in the navbar""" self._prj_link = kwargs.get('prj_link', None) """HTML code for the project link in the navbar""" self._top_page = kwargs.get('top_page', None) """The 'main' page""" | 5c410b5b6e25df3bdbc6da266f7773518165cb02 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/5c410b5b6e25df3bdbc6da266f7773518165cb02/html.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
997,
1615,
16,
2826,
4333,
4672,
3536,
14291,
279,
394,
3982,
2633,
16,
1450,
326,
864,
7323,
770,
18,
225,
632,
891,
997,
1458,
30,
1021,
7323,
770,
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,
997,
1615,
16,
2826,
4333,
4672,
3536,
14291,
279,
394,
3982,
2633,
16,
1450,
326,
864,
7323,
770,
18,
225,
632,
891,
997,
1458,
30,
1021,
7323,
770,
18,... |
a.set_license(_("GNU General Public License version 3 or later.\nSee http://www.gnu.org/licenses/gpl-3.0.txt")) a.set_name(APP_NAME) a.set_website("http://bleachbit.sourceforge.net") a.run() a.hide() | dialog.set_license(_("GNU General Public License version 3 or later.\nSee http://www.gnu.org/licenses/gpl-3.0.txt")) dialog.set_name(APP_NAME) dialog.set_website("http://bleachbit.sourceforge.net") dialog.run() dialog.hide() | def about(self, event): """Create and show the about dialog""" gtk.about_dialog_set_url_hook(lambda dialog, link, user_data: open_url(link)) a = gtk.AboutDialog() a.set_comments(_("Program to clean unnecessary files")) a.set_copyright("Copyright (c) 2008 by Andrew Ziem") try: a.set_license(open(license_filename).read()) except: a.set_license(_("GNU General Public License version 3 or later.\nSee http://www.gnu.org/licenses/gpl-3.0.txt")) a.set_name(APP_NAME) a.set_website("http://bleachbit.sourceforge.net") a.run() a.hide() | ae6ba50f95259c1c2cc0062ebd36d3fef0dce685 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7853/ae6ba50f95259c1c2cc0062ebd36d3fef0dce685/GUI.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2973,
12,
2890,
16,
871,
4672,
3536,
1684,
471,
2405,
326,
2973,
6176,
8395,
22718,
18,
21071,
67,
12730,
67,
542,
67,
718,
67,
4476,
12,
14661,
6176,
16,
1692,
16,
729,
67,
892,
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,
2973,
12,
2890,
16,
871,
4672,
3536,
1684,
471,
2405,
326,
2973,
6176,
8395,
22718,
18,
21071,
67,
12730,
67,
542,
67,
718,
67,
4476,
12,
14661,
6176,
16,
1692,
16,
729,
67,
892,
30,
... |
node = self.tree.openElements.pop() while node.name != "p": | self.endTagP(impliedTagToken("p", "EndTag")) else: self.tree.generateImpliedEndTags("p") if self.tree.openElements[-1].name != "p": self.parser.parseError("unexpected-end-tag", {"name": "p"}) | def endTagP(self, token): if not self.tree.elementInScope("p"): self.startTagCloseP(impliedTagToken("p", "StartTag")) self.parser.parseError("unexpected-end-tag", {"name": "p"}) self.endTagP(impliedTagToken("p", "EndTag")) else: self.tree.generateImpliedEndTags("p") if self.tree.openElements[-1].name != "p": self.parser.parseError("unexpected-end-tag", {"name": "p"}) node = self.tree.openElements.pop() while node.name != "p": node = self.tree.openElements.pop() | d34b631d2e45870e85a6b7e5f824aa96f5632111 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9368/d34b631d2e45870e85a6b7e5f824aa96f5632111/html5parser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
29765,
52,
12,
2890,
16,
1147,
4672,
309,
486,
365,
18,
3413,
18,
2956,
382,
3876,
2932,
84,
6,
4672,
365,
18,
1937,
1805,
4605,
52,
12,
381,
3110,
1805,
1345,
2932,
84,
3113,
315,
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,
29765,
52,
12,
2890,
16,
1147,
4672,
309,
486,
365,
18,
3413,
18,
2956,
382,
3876,
2932,
84,
6,
4672,
365,
18,
1937,
1805,
4605,
52,
12,
381,
3110,
1805,
1345,
2932,
84,
3113,
315,
3... |
status.append ('listening') | status.append('listening') | def __repr__ (self): status = [self.__class__.__module__+"."+self.__class__.__name__] if self.accepting and self.addr: status.append ('listening') elif self.connected: status.append ('connected') if self.addr is not None: try: status.append ('%s:%d' % self.addr) except TypeError: status.append (repr(self.addr)) return '<%s at %#x>' % (' '.join (status), id (self)) | 79991224d1b5f3a4ab074ddac83ef59addf853be /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/79991224d1b5f3a4ab074ddac83ef59addf853be/asyncore.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
12715,
972,
261,
2890,
4672,
1267,
273,
306,
2890,
16186,
1106,
972,
16186,
2978,
972,
9078,
1199,
15,
2890,
16186,
1106,
972,
16186,
529,
972,
65,
309,
365,
18,
9436,
310,
471,
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,
1001,
12715,
972,
261,
2890,
4672,
1267,
273,
306,
2890,
16186,
1106,
972,
16186,
2978,
972,
9078,
1199,
15,
2890,
16186,
1106,
972,
16186,
529,
972,
65,
309,
365,
18,
9436,
310,
471,
36... |
return Dec_n1 | return _Dec_n1 | def compare_total(self, other): """Compares self to other using the abstract representations. | ebab68ad25421add045049bc0a87fbe7000ec3f7 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12029/ebab68ad25421add045049bc0a87fbe7000ec3f7/decimal.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3400,
67,
4963,
12,
2890,
16,
1308,
4672,
3536,
19199,
365,
358,
1308,
1450,
326,
8770,
27851,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3400,
67,
4963,
12,
2890,
16,
1308,
4672,
3536,
19199,
365,
358,
1308,
1450,
326,
8770,
27851,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
if prevIterPoint.isFeas(): | if bestPoint.isFeas(): | def restoreProb(): p.Aeq, p.beq, p.nbeq = Aeq_r, beq_r, nbeq_r #if nEQ != 0: restore lb, ub | 26845e7bdedc47100b28276b20c816ac82b36a68 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6196/26845e7bdedc47100b28276b20c816ac82b36a68/ralg_oo.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5217,
9152,
13332,
293,
18,
37,
11253,
16,
293,
18,
2196,
85,
16,
293,
18,
82,
2196,
85,
273,
432,
11253,
67,
86,
16,
506,
85,
67,
86,
16,
290,
2196,
85,
67,
86,
468,
430,
290,
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,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5217,
9152,
13332,
293,
18,
37,
11253,
16,
293,
18,
2196,
85,
16,
293,
18,
82,
2196,
85,
273,
432,
11253,
67,
86,
16,
506,
85,
67,
86,
16,
290,
2196,
85,
67,
86,
468,
430,
290,
2... |
strport = 'tls:%s:privateKey=%s:certKey=%s'%(port, private_pem, public_pem) else: strport = 'tcp:%s'%port | strport = 'tls:%s:interface=%s:privateKey=%s:certKey=%s'%(port, address, private_pem, public_pem) else: strport = 'tcp:%s:interface=%s'%(port, address) | def run(port): ## Create the config file if secure: if not os.path.exists(private_pem) or not os.path.exists(public_pem): print "In order to use an SECURE encrypted notebook, you must first run notebook.setup()." print "Now running notebook.setup()" notebook_setup() if not os.path.exists(private_pem) or not os.path.exists(public_pem): print "Failed to setup notebook. Please try notebook.setup() again manually." strport = 'tls:%s:privateKey=%s:certKey=%s'%(port, private_pem, public_pem) else: strport = 'tcp:%s'%port | 8c65ab69e35febf212f07b67de06c99c49cbf041 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/8c65ab69e35febf212f07b67de06c99c49cbf041/run_notebook.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
655,
4672,
7541,
1788,
326,
642,
585,
309,
8177,
30,
309,
486,
1140,
18,
803,
18,
1808,
12,
1152,
67,
20313,
13,
578,
486,
1140,
18,
803,
18,
1808,
12,
482,
67,
20313,
4672... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
655,
4672,
7541,
1788,
326,
642,
585,
309,
8177,
30,
309,
486,
1140,
18,
803,
18,
1808,
12,
1152,
67,
20313,
13,
578,
486,
1140,
18,
803,
18,
1808,
12,
482,
67,
20313,
4672... |
elif self.try_link(" | elif self.try_link(" | fpedef = "-DFPU_HPUX" | ac6a0577676678ec29e46db4c128bc775fbaa1fd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/ac6a0577676678ec29e46db4c128bc775fbaa1fd/config_pygist.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
284,
347,
536,
273,
3701,
4577,
18061,
67,
2500,
57,
60,
6,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
284,
347,
536,
273,
3701,
4577,
18061,
67,
2500,
57,
60,
6,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
try: import ic except ImportError: | from ctypes import cdll from ctypes.util import find_library sc = cdll.LoadLibrary(find_library("SystemConfiguration")) if not sc: | def getproxies_internetconfig(): """Return a dictionary of scheme -> proxy server URL mappings. | e866d1c661942e5befcca467d598edfcf9eac2fd /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12029/e866d1c661942e5befcca467d598edfcf9eac2fd/urllib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
20314,
606,
67,
267,
14726,
1425,
13332,
3536,
990,
279,
3880,
434,
4355,
317,
2889,
1438,
1976,
7990,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
336,
20314,
606,
67,
267,
14726,
1425,
13332,
3536,
990,
279,
3880,
434,
4355,
317,
2889,
1438,
1976,
7990,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
The name of a tear-down function. This is called after running the | A tear-down function. This is called after running the | def DocTestSuite(module=None, globs=None, extraglobs=None, test_finder=None, **options): """ Convert doctest tests for a module to a unittest test suite. This converts each documentation string in a module that contains doctest tests to a unittest test case. If any of the tests in a doc string fail, then the test case fails. An exception is raised showing the name of the file containing the test and a (sometimes approximate) line number. The `module` argument provides the module to be tested. The argument can be either a module or a module name. If no argument is given, the calling module is used. A number of options may be provided as keyword arguments: package The name of a Python package. Text-file paths will be interpreted relative to the directory containing this package. The package may be supplied as a package object or as a dotted package name. setUp The name of a set-up function. This is called before running the tests in each file. The setUp function will be passed a DocTest object. The setUp function can access the test globals as the globs attribute of the test passed. tearDown The name of a tear-down function. This is called after running the tests in each file. The tearDown function will be passed a DocTest object. The tearDown function can access the test globals as the globs attribute of the test passed. globs A dictionary containing initial global variables for the tests. optionflags A set of doctest option flags expressed as an integer. """ if test_finder is None: test_finder = DocTestFinder() module = _normalize_module(module) tests = test_finder.find(module, globs=globs, extraglobs=extraglobs) if globs is None: globs = module.__dict__ if not tests: # Why do we want to do this? Because it reveals a bug that might # otherwise be hidden. raise ValueError(module, "has no tests") tests.sort() suite = unittest.TestSuite() for test in tests: if len(test.examples) == 0: continue if not test.filename: filename = module.__file__ if filename[-4:] in (".pyc", ".pyo"): filename = filename[:-1] test.filename = filename suite.addTest(DocTestCase(test, **options)) return suite | a2fc7ec80aea43768c11c50922a665a08b3885c0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/a2fc7ec80aea43768c11c50922a665a08b3885c0/doctest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3521,
4709,
13587,
12,
2978,
33,
7036,
16,
4715,
87,
33,
7036,
16,
7582,
346,
1295,
87,
33,
7036,
16,
1842,
67,
15356,
33,
7036,
16,
2826,
2116,
4672,
3536,
4037,
31263,
395,
7434,
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,
3521,
4709,
13587,
12,
2978,
33,
7036,
16,
4715,
87,
33,
7036,
16,
7582,
346,
1295,
87,
33,
7036,
16,
1842,
67,
15356,
33,
7036,
16,
2826,
2116,
4672,
3536,
4037,
31263,
395,
7434,
364... |
self.message += ' renewed until %s'%time.strftime('%Y-%m-%d:%H:%M',localtime(slice['expires'])) | self.message += ' renewed until %s'%time.strftime('%Y-%m-%d:%H:%M',time.localtime(slice['expires'])) | def call(self, auth, slice_id_or_name, slice_fields): | 6798ac364c684f81f2aadd9d79014c129167eaff /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7598/6798ac364c684f81f2aadd9d79014c129167eaff/UpdateSlice.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
745,
12,
2890,
16,
1357,
16,
2788,
67,
350,
67,
280,
67,
529,
16,
2788,
67,
2821,
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,
... | [
1,
1,
1,
1,
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,
745,
12,
2890,
16,
1357,
16,
2788,
67,
350,
67,
280,
67,
529,
16,
2788,
67,
2821,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
context.reopen() context.stayOpen = 1 | def check_foaf_ssl(self, req, client, requested_uri): # 1.1. Extract URI subjectAltNames from client cert... pdebug(DEBUG_MESSAGE, 'Parsing SSL client cert...', req) if req.subprocess_env.has_key('SSL_CLIENT_CERT'): cert = req.subprocess_env['SSL_CLIENT_CERT'] cert = "-----BEGIN CERTIFICATE-----\n" + cert + \ "\n-----END CERTIFICATE-----\n" else: cert = req.ssl_var_lookup('SSL_CLIENT_CERT') | 28bb7747823c110a3a066f0e6a659974eae6f2a5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10424/28bb7747823c110a3a066f0e6a659974eae6f2a5/proxy.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
67,
617,
1727,
67,
8157,
12,
2890,
16,
1111,
16,
1004,
16,
3764,
67,
1650,
4672,
468,
404,
18,
21,
18,
8152,
3699,
3221,
10655,
1557,
628,
1004,
3320,
2777,
293,
4148,
12,
9394,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
67,
617,
1727,
67,
8157,
12,
2890,
16,
1111,
16,
1004,
16,
3764,
67,
1650,
4672,
468,
404,
18,
21,
18,
8152,
3699,
3221,
10655,
1557,
628,
1004,
3320,
2777,
293,
4148,
12,
9394,
... | |
logger.info("rc_entry: " + rc_entry[0]) | def checkViewer(description, progs, rc_entry = [], path = []): ''' The same as checkProgAlternatives, but for viewers ''' if len(rc_entry) > 1 and len(rc_entry) != len(progs) + 1: logger.error("rc entry should have one item or item for each prog and not_found.") sys.exit(2) alt_rc_entry = [] for idx in range(len(progs)): if len(rc_entry) == 1: logger.info("rc_entry: " + rc_entry[0]) rcs = rc_entry[0].split('\n') alt = addViewerAlternatives(rcs) alt_rc_entry.insert(0, alt) elif len(rc_entry) > 1: logger.info("rc_entry: " + rc_entry[idx]) rcs = rc_entry[idx].split('\n') alt = addViewerAlternatives(rcs) alt_rc_entry.insert(idx, alt) return checkProgAlternatives(description, progs, rc_entry, alt_rc_entry, path, not_found = 'auto') | 95c34cc714d39e09b86893e4755136a687981142 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7514/95c34cc714d39e09b86893e4755136a687981142/configure.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
18415,
12,
3384,
16,
450,
564,
16,
4519,
67,
4099,
273,
5378,
16,
589,
273,
5378,
4672,
9163,
1021,
1967,
487,
866,
626,
75,
22111,
16,
1496,
364,
1476,
414,
9163,
309,
562,
12,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
18415,
12,
3384,
16,
450,
564,
16,
4519,
67,
4099,
273,
5378,
16,
589,
273,
5378,
4672,
9163,
1021,
1967,
487,
866,
626,
75,
22111,
16,
1496,
364,
1476,
414,
9163,
309,
562,
12,
... | |
def grid_location(self, x, y): """Return a tuple of column and row which identify the cell at which the pixel at position X and Y inside the master widget is located.""" return self._getints( self.tk.call( 'grid', 'location', self._w, x, y)) or None location = grid_location | location = grid_location = Misc.grid_location | def grid_location(self, x, y): """Return a tuple of column and row which identify the cell at which the pixel at position X and Y inside the master widget is located.""" return self._getints( self.tk.call( 'grid', 'location', self._w, x, y)) or None | d9445eda28dd2b7dffaa35eb6abc6c10eaa02457 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/d9445eda28dd2b7dffaa35eb6abc6c10eaa02457/Tkinter.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3068,
67,
3562,
12,
2890,
16,
619,
16,
677,
4672,
3536,
990,
279,
3193,
434,
1057,
471,
1027,
1492,
9786,
326,
2484,
622,
1492,
326,
4957,
622,
1754,
1139,
471,
1624,
4832,
326,
4171,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3068,
67,
3562,
12,
2890,
16,
619,
16,
677,
4672,
3536,
990,
279,
3193,
434,
1057,
471,
1027,
1492,
9786,
326,
2484,
622,
1492,
326,
4957,
622,
1754,
1139,
471,
1624,
4832,
326,
4171,
... |
assert_arrays_equal(actual, desired) | self.assertRavelEqual(actual, desired) | def test_rotate_ctm(self): angle = pi/4. path = agg.CompiledPath() path.rotate_ctm(angle) actual = path.get_ctm() desired = agg.rotation_matrix(angle) assert_arrays_equal(actual, desired) | 3d92c0ab4a3a1dfa3f396a7b42d8cc8314558496 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/13166/3d92c0ab4a3a1dfa3f396a7b42d8cc8314558496/compiled_path_test_case.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
20342,
67,
299,
81,
12,
2890,
4672,
5291,
273,
4790,
19,
24,
18,
589,
273,
10421,
18,
20733,
743,
1435,
589,
18,
20342,
67,
299,
81,
12,
4341,
13,
3214,
273,
589,
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,
1842,
67,
20342,
67,
299,
81,
12,
2890,
4672,
5291,
273,
4790,
19,
24,
18,
589,
273,
10421,
18,
20733,
743,
1435,
589,
18,
20342,
67,
299,
81,
12,
4341,
13,
3214,
273,
589,
18,
588,
... |
sage: print cells_map_as_square(T1.filled_cells_map(), max(T1.nrows(), T1.ncols())) [ 1 -1 2 3] | sage: cells_map_as_square(T1.filled_cells_map(), max(T1.nrows(), T1.ncols())) [ 1 2 -1 3] | def cells_map_as_square(cells_map, n): """ Returns a LatinSquare with cells numbered from {1, 2, ... } to given the dictionary cells_map. NOTE: The value n should be the maximum of the number of rows and columns of the original partial latin square EXAMPLES: sage: from sage.combinat.matrices.latin import * sage: (a, b, c, G) = alternating_group_bitrade_generators(1) sage: (T1, T2) = bitrade_from_group(a, b, c, G) sage: print T1 [ 0 -1 3 1] [-1 1 0 2] [ 1 3 2 -1] [ 2 0 -1 3] There are 12 filled cells in T: sage: print cells_map_as_square(T1.filled_cells_map(), max(T1.nrows(), T1.ncols())) [ 1 -1 2 3] [-1 4 5 6] [ 7 8 9 -1] [10 11 -1 12] """ assert n > 1 L = LatinSquare(n, n) for r in range(n): for c in range(n): try: L[r, c] = cells_map[ (r,c) ] except KeyError: # There is no cell (r,c) so skip it L[r, c] = -1 return L | 79588eb9f6225f31a0fe90ef3cb590193d4561c1 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/79588eb9f6225f31a0fe90ef3cb590193d4561c1/latin.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5983,
67,
1458,
67,
345,
67,
19719,
12,
14741,
67,
1458,
16,
290,
4672,
3536,
2860,
279,
11134,
267,
22255,
598,
5983,
1300,
329,
628,
288,
21,
16,
576,
16,
1372,
289,
358,
864,
326,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5983,
67,
1458,
67,
345,
67,
19719,
12,
14741,
67,
1458,
16,
290,
4672,
3536,
2860,
279,
11134,
267,
22255,
598,
5983,
1300,
329,
628,
288,
21,
16,
576,
16,
1372,
289,
358,
864,
326,
... |
link = Link(`uid`, uid.module()) | link = Link(uid.name(), uid.module()) | def _extract_index(self): """ @return: A dictionary mapping from terms to lists of source documents. @rtype: C{dictionary} """ index = {} for (uid, doc) in self._docmap.items(): if (not self._show_private) and self._is_private(`uid`): continue if uid.is_function(): link = Link(`uid`, uid.module()) elif uid.is_method(): link = Link(`uid`, uid.cls()) else: link = Link(`uid`, uid) | 7e1af2abc702612461ceeb001b4b551d49cb71d3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/7e1af2abc702612461ceeb001b4b551d49cb71d3/html.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
8004,
67,
1615,
12,
2890,
4672,
3536,
632,
2463,
30,
432,
3880,
2874,
628,
6548,
358,
6035,
434,
1084,
7429,
18,
632,
86,
723,
30,
385,
95,
15556,
97,
3536,
770,
273,
2618,
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,
389,
8004,
67,
1615,
12,
2890,
4672,
3536,
632,
2463,
30,
432,
3880,
2874,
628,
6548,
358,
6035,
434,
1084,
7429,
18,
632,
86,
723,
30,
385,
95,
15556,
97,
3536,
770,
273,
2618,
364,
... |
req.write(pageheaderonly(title=msg_search_results[ln], | req.write(pageheaderonly(title=title_message, | def page_start(req, of, cc, as, ln, uid): "Start page according to given output format." if of.startswith('x'): # we are doing XML output: req.content_type = "text/xml" req.send_http_header() req.write("""<?xml version="1.0" encoding="UTF-8"?>\n""") if of.startswith("xm"): req.write("""<collection xmlns="http://www.loc.gov/MARC21/slim">\n""") else: req.write("""<collection>\n""") elif of.startswith('t') or str(of[0:3]).isdigit(): # we are doing plain text output: req.content_type = "text/plain" req.send_http_header() elif of == "id": pass # nothing to do, we shall only return list of recIDs else: # we are doing HTML output: req.content_type = "text/html" req.send_http_header() req.write(pageheaderonly(title=msg_search_results[ln], navtrail=create_navtrail_links(cc, as, ln, 1), description="%s %s." % (cc, msg_search_results[ln]), keywords="CDSware, WebSearch, %s" % cc, uid=uid, language=ln, urlargs=req.args)) req.write("""<div class="pagebody">""") | 75cfad8f655c28a4bd4d8f86f722f5319631907d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12027/75cfad8f655c28a4bd4d8f86f722f5319631907d/search_engine.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1363,
67,
1937,
12,
3658,
16,
434,
16,
4946,
16,
487,
16,
7211,
16,
4555,
4672,
315,
1685,
1363,
4888,
358,
864,
876,
740,
1199,
309,
434,
18,
17514,
1918,
2668,
92,
11,
4672,
468,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1363,
67,
1937,
12,
3658,
16,
434,
16,
4946,
16,
487,
16,
7211,
16,
4555,
4672,
315,
1685,
1363,
4888,
358,
864,
876,
740,
1199,
309,
434,
18,
17514,
1918,
2668,
92,
11,
4672,
468,
7... |
lpdwSize = DWORD(0) _QueryFullProcessImageNameA(hProcess, dwFlags, None, ctypes.byref(lpdwSize)) if lpdwSize.value == 0: raise ctypes.WinError() lpExeName = ctypes.create_string_buffer('', lpdwSize.value + 1) success = _QueryFullProcessImageNameA(hProcess, dwFlags, lpExeName, ctypes.byref(lpdwSize)) if not success: raise ctypes.WinError() | dwSize = MAX_PATH while 1: lpdwSize = DWORD(dwSize) lpExeName = ctypes.create_string_buffer('', lpdwSize.value + 1) success = _QueryFullProcessImageNameA(hProcess, dwFlags, lpExeName, ctypes.byref(lpdwSize)) if success and 0 < lpdwSize.value < dwSize: break error = GetLastError() if error != ERROR_INSUFFICIENT_BUFFER: raise ctypes.WinError(error) dwSize = dwSize + 256 if dwSize > 0x1000: raise ctypes.WinError(error) | def QueryFullProcessImageNameA(hProcess, dwFlags = 0): _QueryFullProcessImageNameA = windll.kernel32.QueryFullProcessImageNameA _QueryFullProcessImageNameA.argtypes = [HANDLE, DWORD, LPSTR, PDWORD] _QueryFullProcessImageNameA.restype = bool lpdwSize = DWORD(0) _QueryFullProcessImageNameA(hProcess, dwFlags, None, ctypes.byref(lpdwSize)) if lpdwSize.value == 0: raise ctypes.WinError() lpExeName = ctypes.create_string_buffer('', lpdwSize.value + 1) success = _QueryFullProcessImageNameA(hProcess, dwFlags, lpExeName, ctypes.byref(lpdwSize)) if not success: raise ctypes.WinError() return lpExeName.value | b0245edfa9e50c7caf2ea7a3da6fbcd88689a78d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7261/b0245edfa9e50c7caf2ea7a3da6fbcd88689a78d/kernel32.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2770,
5080,
2227,
2040,
461,
37,
12,
76,
2227,
16,
12394,
5094,
273,
374,
4672,
389,
1138,
5080,
2227,
2040,
461,
37,
273,
17064,
2906,
18,
8111,
1578,
18,
1138,
5080,
2227,
2040,
461,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2770,
5080,
2227,
2040,
461,
37,
12,
76,
2227,
16,
12394,
5094,
273,
374,
4672,
389,
1138,
5080,
2227,
2040,
461,
37,
273,
17064,
2906,
18,
8111,
1578,
18,
1138,
5080,
2227,
2040,
461,
... |
return self.tk.call(self._w, 'info', 'anchor') | return self.tk.call(self._w, 'info', 'anchor') | def info_anchor(self): | 86af7ef7e3f4448abc89aa941517a84075d99a38 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/86af7ef7e3f4448abc89aa941517a84075d99a38/Tix.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1123,
67,
16215,
12,
2890,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1123,
67,
16215,
12,
2890,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
if self.closed: raise ValueError, "I/O operation on closed file" | _complain_ifclosed(self.closed) | def readline(self, length=None): if self.closed: raise ValueError, "I/O operation on closed file" if self.buflist: self.buf += ''.join(self.buflist) self.buflist = [] i = self.buf.find('\n', self.pos) if i < 0: newpos = self.len else: newpos = i+1 if length is not None: if self.pos + length < newpos: newpos = self.pos + length r = self.buf[self.pos:newpos] self.pos = newpos return r | 9e62ff287bf9e4c39fb9654b0bb0f3c9b523d459 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/9e62ff287bf9e4c39fb9654b0bb0f3c9b523d459/StringIO.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12023,
12,
2890,
16,
769,
33,
7036,
4672,
389,
832,
7446,
67,
430,
12204,
12,
2890,
18,
12204,
13,
309,
365,
18,
4385,
1098,
30,
365,
18,
4385,
1011,
875,
18,
5701,
12,
2890,
18,
438... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12023,
12,
2890,
16,
769,
33,
7036,
4672,
389,
832,
7446,
67,
430,
12204,
12,
2890,
18,
12204,
13,
309,
365,
18,
4385,
1098,
30,
365,
18,
4385,
1011,
875,
18,
5701,
12,
2890,
18,
438... |
template = self.pool.get('email.template').browse(cr, uid, context['active_id'], ctx) | template = self.pool.get('email.template').browse(cr, uid, context['template_id'], ctx) | def on_change_ref(self, cr, uid, ids, rel_model_ref, context=None): if context is None: context = {} if not rel_model_ref: return {} vals = {} if context == {}: context = self.context template = self.pool.get('email.template').browse(cr, uid, context['active_id'], context) #Search translated template lang = get_value(cr, uid, rel_model_ref, template.lang, template, context) if lang: ctx = context.copy() ctx.update({'lang':lang}) template = self.pool.get('email.template').browse(cr, uid, context['active_id'], ctx) vals['to'] = get_value(cr, uid, rel_model_ref, template.def_to, template, context) vals['cc'] = get_value(cr, uid, rel_model_ref, template.def_cc, template, context) vals['bcc'] = get_value(cr, uid, rel_model_ref, template.def_bcc, template, context) vals['subject'] = get_value(cr, uid, rel_model_ref, template.def_subject, template, context) vals['body_text'] = get_value(cr, uid, rel_model_ref, template.def_body_text, template, context) vals['body_html'] = get_value(cr, uid, rel_model_ref, template.def_body_html, template, context) vals['report'] = get_value(cr, uid, rel_model_ref, template.file_name, template, context) return {'value':vals} | cd97a6597003594b6958e306479584b11a7550bd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/cd97a6597003594b6958e306479584b11a7550bd/email_template.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
67,
3427,
67,
1734,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
1279,
67,
2284,
67,
1734,
16,
819,
33,
7036,
4672,
309,
819,
353,
599,
30,
819,
273,
2618,
309,
486,
1279,
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,
603,
67,
3427,
67,
1734,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
1279,
67,
2284,
67,
1734,
16,
819,
33,
7036,
4672,
309,
819,
353,
599,
30,
819,
273,
2618,
309,
486,
1279,
67,
... |
<pForm> : form whose object has to be focused <pObject> : object to be focused | @params: <pForm> : pointer to form whose object has to be focused <pObject> : pointer to object to be focused | def fl_set_focus_object(pForm, pObject): """ fl_set_focus_object(pForm, pObject) Sets the input focus in form to object pObject. <pForm> : form whose object has to be focused <pObject> : object to be focused """ _fl_set_focus_object = cfuncproto( load_so_libforms(), "fl_set_focus_object", \ None, [cty.POINTER(FL_FORM), cty.POINTER(FL_OBJECT)], \ """void fl_set_focus_object(FL_FORM * form, FL_OBJECT * obj) """) keep_elem_refs(pForm, pObject) _fl_set_focus_object(pForm, pObject) | bd6cf497d94f877a33a2bba90b9d74b9e4c950cb /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2429/bd6cf497d94f877a33a2bba90b9d74b9e4c950cb/library.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1183,
67,
542,
67,
13923,
67,
1612,
12,
84,
1204,
16,
293,
921,
4672,
3536,
1183,
67,
542,
67,
13923,
67,
1612,
12,
84,
1204,
16,
293,
921,
13,
11511,
326,
810,
7155,
316,
646,
358,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1183,
67,
542,
67,
13923,
67,
1612,
12,
84,
1204,
16,
293,
921,
4672,
3536,
1183,
67,
542,
67,
13923,
67,
1612,
12,
84,
1204,
16,
293,
921,
13,
11511,
326,
810,
7155,
316,
646,
358,
... |
log.msg('Removing stale pidfile %s' % pidfile) | log.msg('Removing stale pidfile %s' % pidfile, isError=True) | def checkPID(pidfile): if os.path.exists(pidfile): try: pid = int(open(pidfile).read()) except ValueError: sys.exit('Pidfile %s contains non-numeric value' % pidfile) try: os.kill(pid, 0) except OSError, why: if why[0] == errno.ESRCH: # The pid doesnt exists. log.msg('Removing stale pidfile %s' % pidfile) os.remove(pidfile) else: sys.exit("Can't check status of PID %s from pidfile %s: %s" % (pid, pidfile, why[1])) else: sys.exit("""\ | 18fb49d213ae3ef1708827a123a1a8aa2ae00010 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/18fb49d213ae3ef1708827a123a1a8aa2ae00010/twistd.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
16522,
12,
6610,
768,
4672,
309,
1140,
18,
803,
18,
1808,
12,
6610,
768,
4672,
775,
30,
4231,
273,
509,
12,
3190,
12,
6610,
768,
2934,
896,
10756,
1335,
2068,
30,
2589,
18,
8593,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
16522,
12,
6610,
768,
4672,
309,
1140,
18,
803,
18,
1808,
12,
6610,
768,
4672,
775,
30,
4231,
273,
509,
12,
3190,
12,
6610,
768,
2934,
896,
10756,
1335,
2068,
30,
2589,
18,
8593,
... |
self.__pari_prime = [] | self._pari_prime = [] | def is_prime(self): """ Return True if this ideal is prime. | 7188bde5dd23ba549d366751fa805d8005f39b9b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/7188bde5dd23ba549d366751fa805d8005f39b9b/number_field_ideal.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
353,
67,
16382,
12,
2890,
4672,
3536,
2000,
1053,
309,
333,
23349,
353,
17014,
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,
353,
67,
16382,
12,
2890,
4672,
3536,
2000,
1053,
309,
333,
23349,
353,
17014,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
-1.50000000000000*(cos(2*pi/3) + 1)*sin(2*x)/pi + 0.500000000000000*(cos(pi/3) + 1)*sin(x)/pi - 1.50000000000000*(cos(pi/3) + 1)*cos(x)/pi + 1/4 | -1.50000000000000*(cos(2*pi/3) + 1)*sin(2*x)/pi + 1.50000000000000*(cos(pi/3) + 1)*sin(x)/pi - 1.50000000000000*(cos(pi/3) + 1)*cos(x)/pi - 1/4 | def fourier_series_partial_sum_hann(self,N,L): r""" Returns the Hann-filtered partial sum (named after von Hann, not Hamming) \[ f(x) \sim \frac{a_0}{2} + \sum_{n=1}^N H_N(n)*[a_n\cos(\frac{n\pi x}{L}) + b_n\sin(\frac{n\pi x}{L})], \] as a string, where $H_N(x) = (1+\cos(\pi x/N))/2$. This is a "smoother" partial sum - the Gibbs phenomenon is mollified. | 07280a8b6fa4d850d9f2f5771eb969f4ee406c9c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/07280a8b6fa4d850d9f2f5771eb969f4ee406c9c/piecewise.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12792,
2453,
67,
10222,
67,
11601,
67,
1364,
67,
76,
1072,
12,
2890,
16,
50,
16,
48,
4672,
436,
8395,
2860,
326,
670,
1072,
17,
12071,
4702,
2142,
261,
13188,
1839,
331,
265,
670,
1072... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12792,
2453,
67,
10222,
67,
11601,
67,
1364,
67,
76,
1072,
12,
2890,
16,
50,
16,
48,
4672,
436,
8395,
2860,
326,
670,
1072,
17,
12071,
4702,
2142,
261,
13188,
1839,
331,
265,
670,
1072... |
message = chgset.message or '--' if self.wiki_format_messages: message = wiki_to_html(message, self.env, req, escape_newlines=True) else: message = html.PRE(message) | def _changeset_title(rev): if restricted: return 'Changeset %s for %s' % (rev, path) else: return 'Changeset %s' % rev | acd9e25573f65bec86a5d3b8264eb729b139ba36 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/acd9e25573f65bec86a5d3b8264eb729b139ba36/changeset.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
6329,
278,
67,
2649,
12,
9083,
4672,
309,
15693,
30,
327,
296,
29743,
738,
87,
364,
738,
87,
11,
738,
261,
9083,
16,
589,
13,
469,
30,
327,
296,
29743,
738,
87,
11,
738,
5588,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
389,
6329,
278,
67,
2649,
12,
9083,
4672,
309,
15693,
30,
327,
296,
29743,
738,
87,
364,
738,
87,
11,
738,
261,
9083,
16,
589,
13,
469,
30,
327,
296,
29743,
738,
87,
11,
738,
5588,
... | |
self.inplace = 0 | self.inplace = None | def initialize_options(self): self.extensions = None self.package = None self.py_modules = None self.build_src = None self.build_lib = None self.build_base = None self.force = None self.inplace = 0 self.package_dir = None self.f2pyflags = None self.swigflags = None return | 58618b0bb463a22a8938dad2a47ce9dda31f7c13 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14925/58618b0bb463a22a8938dad2a47ce9dda31f7c13/build_src.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4046,
67,
2116,
12,
2890,
4672,
365,
18,
9489,
273,
599,
365,
18,
5610,
273,
599,
365,
18,
2074,
67,
6400,
273,
599,
365,
18,
3510,
67,
4816,
273,
599,
365,
18,
3510,
67,
2941,
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,
4046,
67,
2116,
12,
2890,
4672,
365,
18,
9489,
273,
599,
365,
18,
5610,
273,
599,
365,
18,
2074,
67,
6400,
273,
599,
365,
18,
3510,
67,
4816,
273,
599,
365,
18,
3510,
67,
2941,
273,
... |
prob_yx = zeros((len(xs), len(classes)), Float32) | prob_yx = numpy.zeros((len(xs), len(classes))) | def _calc_p_class_given_x(xs, classes, features, alphas): """_calc_p_class_given_x(xs, classes, features, alphas) -> matrix Calculate P(y|x), where y is the class and x is an instance from the training set. Return a XSxCLASSES matrix of probabilities. """ prob_yx = zeros((len(xs), len(classes)), Float32) # Calculate log P(y, x). for feature, alpha in map(None, features, alphas): for (x, y), f in feature.items(): prob_yx[x][y] += alpha * f # Take an exponent to get P(y, x) prob_yx = exp(prob_yx) # Divide out the probability over each class, so we get P(y|x). for i in range(len(xs)): z = sum(prob_yx[i]) prob_yx[i] = prob_yx[i] / z #prob_yx = [] #for i in range(len(xs)): # z = 0.0 # Normalization factor for this x, over all classes. # probs = [0.0] * len(classes) # for j in range(len(classes)): # log_p = 0.0 # log of the probability of f(x, y) # for k in range(len(features)): # log_p += alphas[k] * features[k].get((i, j), 0.0) # probs[j] = math.exp(log_p) # z += probs[j] # # Normalize the probabilities for this x. # probs = map(lambda x, z=z: x/z, probs) # prob_yx.append(probs) return prob_yx | 75c1a403a0975d2d2e7dd990ee2ec03a93c5d080 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7167/75c1a403a0975d2d2e7dd990ee2ec03a93c5d080/MaxEntropy.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
12448,
67,
84,
67,
1106,
67,
10822,
67,
92,
12,
13713,
16,
3318,
16,
4467,
16,
524,
26377,
4672,
3536,
67,
12448,
67,
84,
67,
1106,
67,
10822,
67,
92,
12,
13713,
16,
3318,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
12448,
67,
84,
67,
1106,
67,
10822,
67,
92,
12,
13713,
16,
3318,
16,
4467,
16,
524,
26377,
4672,
3536,
67,
12448,
67,
84,
67,
1106,
67,
10822,
67,
92,
12,
13713,
16,
3318,
16,
... |
if options.verbose: print "Checking base channel", parent | if options.verbose: print timestamp(), "Checking base channel", parent | def main(): if options.demo: key = False current_channels = {} current_channel_labels = ['rhel-x86_64-server-5'] else: # Login to Satellite server key = login(options.user, options.password) # Build existing channel list current_channels = client.channel.list_all_channels(key) current_channel_labels = [] for channel in current_channels: current_channel_labels.append(channel['label']) if options.debug: print "DEBUG: Channels on current Satellite server:", current_channel_labels if client.api.get_version() < 5.1: # TODO: Haven't tested with Spacewalk, not sure how it is reported print "This script uses features not available with Satellite versions older than 5.1" sys.exit(1) if not options.client_actions_only: # This begins the server actions section if not os.path.exists(options.localdir): try: os.makedirs(options.localdir) except: print "Error: Unable to create %s" % (options.localdir) raise if (not options.delete) and (not options.no_rsync): # Sync local Dell repo with public Dell repo returncode = get_dell_repo(DELL_REPO_URL, options.localdir) if not returncode == 0: print "rsync process exited with returncode:", returncode # Build child channels based on dell repo as needed systems = build_channel_list(options.localdir, SYSTEM_VENDOR_ID) systems['platform_independent'] = PLATFORM_INDEPENDENT # Iterate through list of supported RHEL versions and archs, create parent channels if needed channels = {} print "Checking base channels on Satellite server" for parent in SUPPORTED_CHANNELS: if options.verbose: print "Checking base channel", parent # Check each supported base channel, skip if it does not exist on Satellite server if parent not in current_channel_labels: if options.verbose: print "-%s is not a current base channel, skipping." % (parent) continue else: channels[parent] = SUPPORTED_CHANNELS[parent] channels[parent]['child_channels'] = [] # Initialize key for child channels if options.verbose: print "+%s found on Satellite server, checking child channels." % (parent) if channels[parent]['arch'] == 'i386': # This is because Satellite stores x86 as 'ia32' arch = 'channel-ia32' else: arch = 'channel-' + channels[parent]['arch'] subdir = channels[parent]['subdir'] print " Checking child channels for %s" % parent for system in systems: # use system name plus parent to create a unique child channel c_label = DELL_INFO['label'] + '-' + system + '-' + parent c_name = DELL_INFO['name'] + ' on ' + systems[system] + ' for ' + parent c_summary = DELL_INFO['summary'] + ' on ' + systems[system] + ' running ' + parent c_arch = arch c_dir = options.localdir + system + '/' + subdir if options.verbose: print " Checking child channel:", c_label if channel_exists(key, c_label, current_channels): if options.delete: # Delete child channels if requested if options.demo: print "Deleting channel:", c_label else: delete_channel(key, c_label) else: if options.debug: print "DEBUG: checking for dir:", c_dir if options.verbose: print "Child channel already exists:", c_label if os.path.isdir(c_dir): channels[parent]['child_channels'].append(system) else: if not options.delete: # Build child channels if needed if options.debug: print "DEBUG: checking for dir:", c_dir if os.path.isdir(c_dir): channels[parent]['child_channels'].append(system) if options.debug: print "DEBUG: %s exists for %s, creating channel" % (subdir, system) if options.demo: if options.verbose: print "Creating child channel:", c_label else: create_channel(key, c_label, c_name, c_summary, c_arch, parent) else: if options.debug: print "DEBUG: %s does not exists for %s" % (subdir, system) if (not options.delete) and (not options.no_packages): # Iterate through channels, pushing rpms from the local repo as needed # TODO: check if rpm is already uploaded and orphaned or part of another channel if options.debug: print "DEBUG: Channel mapping:", channels print "Syncing rpms as needed" for parent in channels: print " Syncing rpms for child channels in %s" % parent for child in channels[parent]['child_channels']: dir = options.localdir + child + '/' + channels[parent]['subdir'] channel = DELL_INFO['label'] + '-' + child + '-' + parent if options.verbose: print " Syncing rpms to child channel", channel if options.debug: print "DEBUG: Looking for rpms in", dir rpms = gen_rpm_list(dir) # Get all packages in child channel existing_packages = client.channel.software.list_all_packages(key, channel) if options.debug: print "DEBUG: Existing packages in", channel, existing_packages for rpm in rpms: if options.debug: print "DEBUG: Working on:", rpm # Strip off '.rpm' at end of file to match against existing entries rpm_name = rpm.split('.rpm')[0] # Now strip off any preceeding paths rpm_name = rpm_name.split('/')[-1] # Iterate through existing packages, and skip existing ones if options.verbose: print "Checking if %s is already on the Satellite server in %s" % (rpm_name, channel) for package in existing_packages: existing_rpm_name = reconstruct_name(package) if options.debug: print "DEBUG: Checking match for %s and %s" % (rpm_name, existing_rpm_name) if existing_rpm_name == rpm_name: # This means the intended rpm is already in Satellite, so skip if options.verbose: print "- %s already in Satellite, skipping" % (rpm_name) break else: if options.verbose: print "+ %s is not in Satellite, adding" % (rpm_name) if options.debug: print "DEBUG: Calling: push_rpm(",rpm, channel, options.user, options.password, options.satserver, ")" returncode = push_rpm(rpm, channel, options.user, options.password, options.satserver) if not returncode == 0: print "rhnpush process exited with returncode:", returncode if returncode == 255: print "You may force package uploads with --force" sys.exit(1) print "Completed uploading rpms." if (not options.server_actions_only) and (not options.demo) and (not options.delete): # This is the client actions section print "Subscribing registered systems to the %s channel" % (PLATFORM_INDEPENDENT) client_systems = subscribe_clients(key) print "Scheduling software installation and actions on clients" client_systems = schedule_actions(key, client_systems) print "Waiting for client actions to complete" client_systems = get_action_results(key, client_systems) print "All actions completed.\n" show_client_results(client_systems) if not options.demo: logout(key) | 07e2421549e748ccb09a392c60834eaea3e54917 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3457/07e2421549e748ccb09a392c60834eaea3e54917/dell-satellite-sync.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
309,
702,
18,
27928,
30,
498,
273,
1083,
783,
67,
9114,
273,
2618,
783,
67,
4327,
67,
5336,
273,
10228,
30138,
292,
17,
92,
5292,
67,
1105,
17,
3567,
17,
25,
3546,
469,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
309,
702,
18,
27928,
30,
498,
273,
1083,
783,
67,
9114,
273,
2618,
783,
67,
4327,
67,
5336,
273,
10228,
30138,
292,
17,
92,
5292,
67,
1105,
17,
3567,
17,
25,
3546,
469,
... |
article_text = unicode(article_text, 'utf8') | def send_article(self, title): | 4ee0d74a6dff83ef0a4952778622d746798925a0 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6694/4ee0d74a6dff83ef0a4952778622d746798925a0/server.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1366,
67,
11480,
12,
2890,
16,
2077,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1366,
67,
11480,
12,
2890,
16,
2077,
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... | |
"""Returns the complement sequence. | """Returns the complement sequence. New Seq object. | def complement(self): """Returns the complement sequence. """ if seq.alphabet in (IUPAC.ambiguous_dna, IUPAC.unambiguous_dna): d = ambiguous_dna_complement elif seq.alphabet in (IUPAC.ambiguous_rna, IUPAC.unambiguous_rna): d = ambiguous_rna_complement elif 'U' in self.data: d = ambiguous_rna_complement else: d = ambiguous_dna_complement before = ''.join(d.keys()) after = ''.join(d.values()) ttable = maketrans(before, after) #Much faster on really long sequences than the previous loop based one. #thx to Michael Palmer, University of Waterloo s = self.data.translate(ttable) return Seq(s, self.alphabet) | 6e6c0cae5f1ae5dfcf2df97f8282731973c2b62e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7167/6e6c0cae5f1ae5dfcf2df97f8282731973c2b62e/Seq.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
17161,
12,
2890,
4672,
3536,
1356,
326,
17161,
3102,
18,
1166,
14367,
733,
18,
3536,
309,
3833,
18,
287,
8907,
316,
261,
45,
3079,
2226,
18,
2536,
10623,
67,
5176,
69,
16,
467,
3079,
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,
17161,
12,
2890,
4672,
3536,
1356,
326,
17161,
3102,
18,
1166,
14367,
733,
18,
3536,
309,
3833,
18,
287,
8907,
316,
261,
45,
3079,
2226,
18,
2536,
10623,
67,
5176,
69,
16,
467,
3079,
2... |
uchunks = [unicode(s, str(charset)) for s, charset in self._chunks] return u''.join(uchunks) | uchunks = [] lastcs = None for s, charset in self._chunks: nextcs = charset if uchunks: if lastcs is not None: if nextcs is None or nextcs == 'us-ascii': uchunks.append(USPACE) nextcs = None elif nextcs is not None and nextcs <> 'us-ascii': uchunks.append(USPACE) lastcs = nextcs uchunks.append(unicode(s, str(charset))) return UEMPTYSTRING.join(uchunks) | def __unicode__(self): """Helper for the built-in unicode function.""" # charset item is a Charset instance so we need to stringify it. uchunks = [unicode(s, str(charset)) for s, charset in self._chunks] return u''.join(uchunks) | 5013c6348604e6a7f138fcc27199aca35dbf7b96 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/5013c6348604e6a7f138fcc27199aca35dbf7b96/Header.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
9124,
972,
12,
2890,
4672,
3536,
2276,
364,
326,
6650,
17,
267,
5252,
445,
12123,
468,
4856,
761,
353,
279,
12080,
791,
1427,
732,
1608,
358,
7077,
518,
18,
582,
14691,
273,
306,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
9124,
972,
12,
2890,
4672,
3536,
2276,
364,
326,
6650,
17,
267,
5252,
445,
12123,
468,
4856,
761,
353,
279,
12080,
791,
1427,
732,
1608,
358,
7077,
518,
18,
582,
14691,
273,
306,
... |
return [event for event in self.events if (event.inside_period(time_period) and event.category.visible)] | def include_event(event): if not event.inside_period(time_period): return False if event.category != None and event.category.visible == False: return False return True return [event for event in self.events if include_event(event)] | def get_events(self, time_period): return [event for event in self.events if (event.inside_period(time_period) and event.category.visible)] | 7d9a2221798d05601cd32c59efcc3d1b1e084a44 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5252/7d9a2221798d05601cd32c59efcc3d1b1e084a44/data_file.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
5989,
12,
2890,
16,
813,
67,
6908,
4672,
327,
306,
2575,
364,
871,
316,
365,
18,
5989,
309,
261,
2575,
18,
28091,
67,
6908,
12,
957,
67,
6908,
13,
471,
871,
18,
4743,
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,
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,
336,
67,
5989,
12,
2890,
16,
813,
67,
6908,
4672,
327,
306,
2575,
364,
871,
316,
365,
18,
5989,
309,
261,
2575,
18,
28091,
67,
6908,
12,
957,
67,
6908,
13,
471,
871,
18,
4743,
18,
... |
context['commands'] = [] context['contains'] = [] import pmxbot.pmxbot as p p.run(configInput = context['config'], start=False) for typ, name, f, doc, channels, exclude, rate in sorted(p._handler_registry, key=lambda x: x[1]): if typ == 'command': aliases = sorted([x[1] for x in p._handler_registry if x[0] == 'alias' and x[2] == f]) context['commands'].append((name, doc, aliases)) elif typ == 'contains': context['contains'].append((name, doc)) | if not self.run: self.commands = [] self.contains = [] import pmxbot.pmxbot as p p.run(configInput = context['config'], start=False) for typ, name, f, doc, channels, exclude, rate in sorted(p._handler_registry, key=lambda x: x[1]): if typ == 'command': aliases = sorted([x[1] for x in p._handler_registry if x[0] == 'alias' and x[2] == f]) self.commands.append((name, doc, aliases)) elif typ == 'contains': self.contains.append((name, doc)) self.run = True context['commands'] = self.commands context['contains'] = self.contains | def default(self): page = jenv.get_template('help.html') context = get_context() context['commands'] = [] context['contains'] = [] import pmxbot.pmxbot as p p.run(configInput = context['config'], start=False) for typ, name, f, doc, channels, exclude, rate in sorted(p._handler_registry, key=lambda x: x[1]): if typ == 'command': aliases = sorted([x[1] for x in p._handler_registry if x[0] == 'alias' and x[2] == f]) context['commands'].append((name, doc, aliases)) elif typ == 'contains': context['contains'].append((name, doc)) return page.render(**context) | c95eef754eedf5f78410e7b070e7b6288ccdccbf /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/999/c95eef754eedf5f78410e7b070e7b6288ccdccbf/viewer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
805,
12,
2890,
4672,
1363,
273,
525,
3074,
18,
588,
67,
3202,
2668,
5201,
18,
2620,
6134,
819,
273,
336,
67,
2472,
1435,
309,
486,
365,
18,
2681,
30,
365,
18,
7847,
273,
5378,
365,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
805,
12,
2890,
4672,
1363,
273,
525,
3074,
18,
588,
67,
3202,
2668,
5201,
18,
2620,
6134,
819,
273,
336,
67,
2472,
1435,
309,
486,
365,
18,
2681,
30,
365,
18,
7847,
273,
5378,
365,
1... |
self.assertRaises(ValueError, time.strftime, '', (1900, 1, 0, 0, 0, 0, 0, 1, -1)) | self.assertRaises(ValueError, time.strftime, '', (1900, 1, -1, 0, 0, 0, 0, 1, -1)) | def test_strftime_bounds_checking(self): # Make sure that strftime() checks the bounds of the various parts #of the time tuple. | edeb1885f91a6433a3787bea947b8430d9b2e390 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/edeb1885f91a6433a3787bea947b8430d9b2e390/test_time.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
701,
9982,
67,
10576,
67,
24609,
12,
2890,
4672,
468,
4344,
3071,
716,
10405,
1435,
4271,
326,
4972,
434,
326,
11191,
2140,
468,
792,
326,
813,
3193,
18,
2,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
701,
9982,
67,
10576,
67,
24609,
12,
2890,
4672,
468,
4344,
3071,
716,
10405,
1435,
4271,
326,
4972,
434,
326,
11191,
2140,
468,
792,
326,
813,
3193,
18,
2,
-100,
-100,
-100,
... |
'production_id': fields.many2one('mrp.production', 'Production Order', select=True), | 'production_id': fields.many2one('mrp.production', 'Production Order', select=True, ondelete='cascade'), | def force_production(self, cr, uid, ids, *args): pick_obj = self.pool.get('stock.picking') pick_obj.force_assign(cr, uid, [prod.picking_id.id for prod in self.browse(cr, uid, ids)]) return True | d40f9441011a00140e65d320440f17a2c119850e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/d40f9441011a00140e65d320440f17a2c119850e/mrp.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2944,
67,
17273,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
380,
1968,
4672,
6002,
67,
2603,
273,
365,
18,
6011,
18,
588,
2668,
15381,
18,
11503,
310,
6134,
6002,
67,
2603,
18,
5734,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2944,
67,
17273,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
380,
1968,
4672,
6002,
67,
2603,
273,
365,
18,
6011,
18,
588,
2668,
15381,
18,
11503,
310,
6134,
6002,
67,
2603,
18,
5734,
... |
if verbose: print "server created" | if verbose: print("server created") | def run_servers(self, proto, servers, hdlrcls, testfunc): for svrcls in servers: addr = self.pickaddr(proto) if verbose: print "ADDR =", addr print "CLASS =", svrcls t = ServerThread(addr, svrcls, hdlrcls) if verbose: print "server created" t.start() if verbose: print "server running" for i in range(NREQ): t.ready.wait(10*DELAY) self.assert_(t.ready.isSet(), "Server not ready within a reasonable time") if verbose: print "test client", i testfunc(proto, addr) if verbose: print "waiting for server" t.join() if verbose: print "done" | 2b349b353f0fe7010c2517283dafe8b753cd52f5 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8125/2b349b353f0fe7010c2517283dafe8b753cd52f5/test_socketserver.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
67,
14247,
12,
2890,
16,
3760,
16,
7084,
16,
366,
5761,
86,
6429,
16,
1842,
644,
4672,
364,
5893,
86,
6429,
316,
7084,
30,
3091,
273,
365,
18,
11503,
4793,
12,
9393,
13,
309,
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,
1086,
67,
14247,
12,
2890,
16,
3760,
16,
7084,
16,
366,
5761,
86,
6429,
16,
1842,
644,
4672,
364,
5893,
86,
6429,
316,
7084,
30,
3091,
273,
365,
18,
11503,
4793,
12,
9393,
13,
309,
3... |
print '\tuntagged responses: %s' % `self.untagged_responses` | _dump_ur(self.untagged_responses) | def noop(self): """Send NOOP command. | b10c0e30e74484a3863b7dcd5a9fd8e9e5849364 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/b10c0e30e74484a3863b7dcd5a9fd8e9e5849364/imaplib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
17065,
12,
2890,
4672,
3536,
3826,
3741,
3665,
1296,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
17065,
12,
2890,
4672,
3536,
3826,
3741,
3665,
1296,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
newpackage.close() os.system( "%s %s/%s" % ( os.environ.get( "EDITOR" ), fulldirname, filename ) ) def pasteBinCommand( params ): """Send a command + output buffer to http://pastebin.com""" index = params[0] contents = processCommand.memoryOutput.buffer( int( index ) ) status, error, location = sendToPastebin( contents ) if status == 302: print "SHELL: Pasted to %s" % location else: print "ERROR: %s %s" % ( response.status, response.reason ) def pasteLogCommand( params ): """Send the last event exception error log (if there is one) to http://pastebin.com""" if last_exception is None: print "SHELL: No Errors yet (Phew)..." else: reason, event = last_exception.args print "SHELL: Reason for the last error: '%s'" % reason if ':' in reason: msg, filename = reason.split( ':' ) filename = filename.strip() print "SHELL: Pasting log file to pastebin..." status, error, location = sendToPastebin( open( filename ).read() ) if status == 302: print "SHELL: Pasted to %s" % location else: print "ERROR: %s %s" % ( response.status, response.reason ) def parseCommand( params ): """(Re-)parse .bb files and calculate the dependency graph""" cooker.status = cooker.ParsingStatus() ignore = data.getVar("ASSUME_PROVIDED", make.cfg, 1) or "" cooker.status.ignored_dependencies = set( ignore.split() ) cooker.handleCollections( data.getVar("BBFILE_COLLECTIONS", make.cfg, 1) ) make.collect_bbfiles( cooker.myProgressCallback ) cooker.buildDepgraph() global parsed parsed = True print def printCommand( params ): """Print the contents of an outer BitBake environment variable""" var = params[0] value = data.getVar( var, make.cfg, 1 ) print value def pythonCommand( params ): """Enter the expert mode - an interactive BitBake Python Interpreter""" sys.ps1 = "EXPERT BB>>> " sys.ps2 = "EXPERT BB... " import code python = code.InteractiveConsole( dict( globals() ) ) python.interact( "SHELL: Expert Mode - BitBake Python %s\nType 'help' for more information, press CTRL-D to switch back to BBSHELL." % sys.version ) def setVarCommand( params ): """Set an outer BitBake environment variable""" var, value = params data.setVar( var, value, make.cfg ) print "OK" def rebuildCommand( params ): """Clean and rebuild a .bb file or a providee""" buildCommand( params, "clean" ) buildCommand( params, "build" ) def shellCommand( params ): """Execute a shell command and dump the output""" print commands.getoutput( " ".join( params ) ) def statusCommand( params ): print "-" * 78 print "build cache = '%s'" % cooker.build_cache print "build cache fail = '%s'" % cooker.build_cache_fail print "building list = '%s'" % cooker.building_list print "build path = '%s'" % cooker.build_path print "consider_msgs_cache = '%s'" % cooker.consider_msgs_cache print "build stats = '%s'" % cooker.stats if last_exception is not None: print "last_exception = '%s'" % repr( last_exception.args ) print "memory output contents = '%s'" % processCommand.memoryOutput._buffer def testCommand( params ): """Just for testing...""" print "testCommand called with '%s'" % params def whichCommand( params ): """Computes the providers for a given providee""" item = params[0] if not parsed: print "SHELL: D'oh! The .bb files haven't been parsed yet. Next time call 'parse' before building stuff. This time I'll do it for 'ya." parseCommand( None ) preferred = data.getVar( "PREFERRED_PROVIDER_%s" % item, make.cfg, 1 ) if not preferred: preferred = item try: lv, lf, pv, pf = cooker.findBestProvider( preferred ) except KeyError: lv, lf, pv, pf = (None,)*4 try: providers = cooker.status.providers[item] except KeyError: print "SHELL: ERROR: Nothing provides", preferred else: for provider in providers: if provider == pf: provider = " (***) %s" % provider else: provider = " %s" % provider print provider | newpackage.close() os.system( "%s %s/%s" % ( os.environ.get( "EDITOR" ), fulldirname, filename ) ) new.usage = "<directory> <filename>" def pasteBin( self, params ): """Send a command + output buffer to http://pastebin.com""" index = params[0] contents = self._shell.myout.buffer( int( index ) ) status, error, location = sendToPastebin( contents ) if status == 302: print "SHELL: Pasted to %s" % location else: print "ERROR: %s %s" % ( response.status, response.reason ) pasteBin.usage = "<index>" def pasteLog( self, params ): """Send the last event exception error log (if there is one) to http://pastebin.com""" if last_exception is None: print "SHELL: No Errors yet (Phew)..." else: reason, event = last_exception.args print "SHELL: Reason for the last error: '%s'" % reason if ':' in reason: msg, filename = reason.split( ':' ) filename = filename.strip() print "SHELL: Pasting log file to pastebin..." status, error, location = sendToPastebin( open( filename ).read() ) if status == 302: print "SHELL: Pasted to %s" % location else: print "ERROR: %s %s" % ( response.status, response.reason ) def parse( self, params ): """(Re-)parse .bb files and calculate the dependency graph""" cooker.status = cooker.ParsingStatus() ignore = data.getVar("ASSUME_PROVIDED", make.cfg, 1) or "" cooker.status.ignored_dependencies = set( ignore.split() ) cooker.handleCollections( data.getVar("BBFILE_COLLECTIONS", make.cfg, 1) ) make.collect_bbfiles( cooker.myProgressCallback ) cooker.buildDepgraph() global parsed parsed = True print def print_( self, params ): """Print the contents of an outer BitBake environment variable""" var = params[0] value = data.getVar( var, make.cfg, 1 ) print value print_.usage = "<variable>" def python( self, params ): """Enter the expert mode - an interactive BitBake Python Interpreter""" sys.ps1 = "EXPERT BB>>> " sys.ps2 = "EXPERT BB... " import code interpreter = code.InteractiveConsole( dict( globals() ) ) interpreter.interact( "SHELL: Expert Mode - BitBake Python %s\nType 'help' for more information, press CTRL-D to switch back to BBSHELL." % sys.version ) def setVar( self, params ): """Set an outer BitBake environment variable""" var, value = params data.setVar( var, value, make.cfg ) print "OK" setVar.usage = "<variable> <value>" def rebuild( self, params ): """Clean and rebuild a .bb file or a providee""" self.build( params, "clean" ) self.build( params, "build" ) rebuild.usage = "<providee>" def shell( self, params ): """Execute a shell command and dump the output""" if params != "": print commands.getoutput( " ".join( params ) ) shell.usage = "<...>" def status( self, params ): """<just for testing>""" print "-" * 78 print "build cache = '%s'" % cooker.build_cache print "build cache fail = '%s'" % cooker.build_cache_fail print "building list = '%s'" % cooker.building_list print "build path = '%s'" % cooker.build_path print "consider_msgs_cache = '%s'" % cooker.consider_msgs_cache print "build stats = '%s'" % cooker.stats if last_exception is not None: print "last_exception = '%s'" % repr( last_exception.args ) print "memory output contents = '%s'" % self._shell.myout._buffer def test( self, params ): """<just for testing>""" print "testCommand called with '%s'" % params def which( self, params ): """Computes the providers for a given providee""" item = params[0] if not parsed: print "SHELL: D'oh! The .bb files haven't been parsed yet. Next time call 'parse' before building stuff. This time I'll do it for 'ya." self.parse( None ) preferred = data.getVar( "PREFERRED_PROVIDER_%s" % item, make.cfg, 1 ) if not preferred: preferred = item try: lv, lf, pv, pf = cooker.findBestProvider( preferred ) except KeyError: lv, lf, pv, pf = (None,)*4 try: providers = cooker.status.providers[item] except KeyError: print "SHELL: ERROR: Nothing provides", preferred else: for provider in providers: if provider == pf: provider = " (***) %s" % provider else: provider = " %s" % provider print provider which.usage = "<providee>" | def newCommand( params ): """Create a new .bb file and open the editor""" dirname, filename = params packages = '/'.join( data.getVar( "BBFILES", make.cfg, 1 ).split('/')[:-2] ) fulldirname = "%s/%s" % ( packages, dirname ) if not os.path.exists( fulldirname ): print "SHELL: Creating '%s'" % fulldirname os.mkdir( fulldirname ) if os.path.exists( fulldirname ) and os.path.isdir( fulldirname ): if os.path.exists( "%s/%s" % ( fulldirname, filename ) ): print "SHELL: ERROR: %s/%s already exists" % ( fulldirname, filename ) return False print "SHELL: Creating '%s/%s'" % ( fulldirname, filename ) newpackage = open( "%s/%s" % ( fulldirname, filename ), "w" ) print >>newpackage,"""DESCRIPTION = "" | 7fcc19b62c3ddf0e33c8e5678f4643e048fc34c6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2672/7fcc19b62c3ddf0e33c8e5678f4643e048fc34c6/shell.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
394,
2189,
12,
859,
262,
30,
3536,
1684,
279,
394,
263,
9897,
585,
471,
1696,
326,
4858,
8395,
4283,
16,
1544,
273,
859,
5907,
273,
2023,
18,
5701,
12,
501,
18,
588,
1537,
12,
315,
9... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
394,
2189,
12,
859,
262,
30,
3536,
1684,
279,
394,
263,
9897,
585,
471,
1696,
326,
4858,
8395,
4283,
16,
1544,
273,
859,
5907,
273,
2023,
18,
5701,
12,
501,
18,
588,
1537,
12,
315,
9... |
self.assertEqual(d.keys(), []) | self.assertEqual(set(d.keys()), set()) | def test_keys(self): d = {} self.assertEqual(d.keys(), []) d = {'a': 1, 'b': 2} k = d.keys() self.assert_('a' in d) self.assert_('b' in d) | 3028aa4ab8a013864a3be3a9864bf8c0e60ce63b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8125/3028aa4ab8a013864a3be3a9864bf8c0e60ce63b/test_dict.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
2452,
12,
2890,
4672,
302,
273,
2618,
365,
18,
11231,
5812,
12,
542,
12,
72,
18,
2452,
1435,
3631,
444,
10756,
302,
273,
13666,
69,
4278,
404,
16,
296,
70,
4278,
576,
97,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
2452,
12,
2890,
4672,
302,
273,
2618,
365,
18,
11231,
5812,
12,
542,
12,
72,
18,
2452,
1435,
3631,
444,
10756,
302,
273,
13666,
69,
4278,
404,
16,
296,
70,
4278,
576,
97,
4... |
oscmd("rpm -E '%_arch' > built/tmp/architecture.txt") | oscmd("rpm -E '%_target_cpu' > built/tmp/architecture.txt") | def MakeInstallerLinux(): import compileall PYTHONV=os.path.basename(PYTHONSDK) if (os.path.isdir("linuxroot")): oscmd("chmod -R 755 linuxroot") if (os.path.exists("/usr/bin/dpkg-deb")): oscmd("dpkg --print-architecture > built/tmp/architecture.txt") if (os.path.exists("/usr/bin/rpmbuild")): oscmd("rpm -E '%_arch' > built/tmp/architecture.txt") ARCH=ReadFile("built/tmp/architecture.txt").strip() oscmd("rm -rf linuxroot data.tar.gz control.tar.gz panda3d.spec "+ARCH) oscmd("mkdir -p linuxroot/usr/bin") oscmd("mkdir -p linuxroot/usr/include") oscmd("mkdir -p linuxroot/usr/share/panda3d") oscmd("mkdir -p linuxroot/usr/lib/"+PYTHONV+"/lib-dynload") oscmd("mkdir -p linuxroot/usr/lib/"+PYTHONV+"/site-packages") oscmd("mkdir -p linuxroot/etc/ld.so.conf.d") oscmd("sed -e 's@$THIS_PRC_DIR/[.][.]@/usr/share/panda3d@' < built/etc/Config.prc > linuxroot/etc/Config.prc") oscmd("cp built/etc/Confauto.prc linuxroot/etc/Confauto.prc") oscmd("cp --recursive built/include linuxroot/usr/include/panda3d") oscmd("cp --recursive direct linuxroot/usr/share/panda3d/direct") oscmd("cp --recursive built/pandac linuxroot/usr/share/panda3d/pandac") oscmd("cp --recursive built/Pmw linuxroot/usr/share/panda3d/Pmw") oscmd("cp built/direct/__init__.py linuxroot/usr/share/panda3d/direct/__init__.py") oscmd("cp --recursive SceneEditor linuxroot/usr/share/panda3d/SceneEditor") oscmd("cp --recursive built/models linuxroot/usr/share/panda3d/models") oscmd("cp --recursive samples linuxroot/usr/share/panda3d/samples") oscmd("cp doc/LICENSE linuxroot/usr/share/panda3d/LICENSE") oscmd("cp doc/LICENSE linuxroot/usr/include/panda3d/LICENSE") oscmd("cp doc/ReleaseNotes linuxroot/usr/share/panda3d/ReleaseNotes") oscmd("echo '/usr/lib/panda3d' > linuxroot/etc/ld.so.conf.d/panda3d.conf") oscmd("echo '/usr/share/panda3d' > linuxroot/usr/lib/"+PYTHONV+"/site-packages/panda3d.pth") oscmd("cp built/bin/* linuxroot/usr/bin/") for base in os.listdir("built/lib"): oscmd("ln -sf /usr/lib/"+base+" linuxroot/usr/lib/"+PYTHONV+"/lib-dynload/"+base) oscmd("cp built/lib/"+base+" linuxroot/usr/lib/"+base) for base in os.listdir("linuxroot/usr/share/panda3d/direct/src"): if ((base != "extensions") and (base != "extensions_native")): compileall.compile_dir("linuxroot/usr/share/panda3d/direct/src/"+base) compileall.compile_dir("linuxroot/usr/share/panda3d/Pmw") compileall.compile_dir("linuxroot/usr/share/panda3d/SceneEditor") oscmd("chmod -R 555 linuxroot/usr/share/panda3d") if (os.path.exists("/usr/bin/dpkg-deb")): txt = INSTALLER_DEB_FILE[1:].replace("VERSION",str(VERSION)).replace("PYTHONV",PYTHONV) oscmd("mkdir -p linuxroot/DEBIAN") oscmd("cd linuxroot ; (find usr -type f -exec md5sum {} \;) > DEBIAN/md5sums") oscmd("cd linuxroot ; (find etc -type f -exec md5sum {} \;) >> DEBIAN/md5sums") WriteFile("linuxroot/DEBIAN/conffiles","/etc/Config.prc\n") WriteFile("linuxroot/DEBIAN/control",txt) oscmd("dpkg-deb -b linuxroot panda3d_"+VERSION+"_"+ARCH+".deb") oscmd("chmod -R 755 linuxroot") if (os.path.exists("/usr/bin/rpmbuild")): txt = INSTALLER_SPEC_FILE[1:].replace("VERSION",VERSION).replace("PANDASOURCE",PANDASOURCE) WriteFile("panda3d.spec", txt) oscmd("rpmbuild --define '_rpmdir "+PANDASOURCE+"' -bb panda3d.spec") oscmd("mv "+ARCH+"/panda3d-"+VERSION+"-1."+ARCH+".rpm .") oscmd("chmod -R 755 linuxroot") oscmd("rm -rf linuxroot data.tar.gz control.tar.gz panda3d.spec "+ARCH) | eb8752d6d837ef9b3fcd4b0c5d3fa2fd8241f80c /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8543/eb8752d6d837ef9b3fcd4b0c5d3fa2fd8241f80c/makepanda.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4344,
18678,
19475,
13332,
1930,
4074,
454,
12191,
20131,
58,
33,
538,
18,
803,
18,
13909,
12,
16235,
20131,
22625,
13,
309,
261,
538,
18,
803,
18,
291,
1214,
2932,
20132,
3085,
6,
3719,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4344,
18678,
19475,
13332,
1930,
4074,
454,
12191,
20131,
58,
33,
538,
18,
803,
18,
13909,
12,
16235,
20131,
22625,
13,
309,
261,
538,
18,
803,
18,
291,
1214,
2932,
20132,
3085,
6,
3719,... |
sage: print B.is_completable() | sage: B.is_completable() | def is_completable(self): """ Returns True if the partial latin square can be completed to a latin square. | 494f2bd1cd82ea9dcc25f8e258b7375812aed1c9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/494f2bd1cd82ea9dcc25f8e258b7375812aed1c9/latin.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
353,
67,
7806,
429,
12,
2890,
4672,
3536,
2860,
1053,
309,
326,
4702,
30486,
8576,
848,
506,
5951,
358,
279,
30486,
8576,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
353,
67,
7806,
429,
12,
2890,
4672,
3536,
2860,
1053,
309,
326,
4702,
30486,
8576,
848,
506,
5951,
358,
279,
30486,
8576,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
http://www.cs.berkeley.edu/~fateman/papers/polysbyGMP.pdf The idea is to encode dense univariate polynomials as big integers, instead of sequences of coefficients. The paper argues that because integer multiplication is so cheap, that encoding 2 polynomials to big numbers and then decoding the result might be faster than popular multiplication algorithms. | {\tt http://www.cs.berkeley.edu/~fateman/papers/polysbyGMP.pdf} The idea is to encode dense univariate polynomials as big integers, instead of sequences of coefficients. The paper argues that because integer multiplication is so cheap, that encoding 2 polynomials to big numbers and then decoding the result might be faster than popular multiplication algorithms. | def _mul_fateman(self,right): """ Returns the product of two polynomials using Kronecker's trick to do the multiplication. This could be used used over a generic base ring. | d2d5420f5bab58a96e1b1d8acc01545348ff6e21 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9417/d2d5420f5bab58a96e1b1d8acc01545348ff6e21/polynomial_element.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
16411,
67,
74,
340,
4728,
12,
2890,
16,
4083,
4672,
3536,
2860,
326,
3017,
434,
2795,
16991,
87,
1450,
1475,
86,
476,
363,
264,
1807,
28837,
358,
741,
326,
23066,
18,
225,
1220,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
16411,
67,
74,
340,
4728,
12,
2890,
16,
4083,
4672,
3536,
2860,
326,
3017,
434,
2795,
16991,
87,
1450,
1475,
86,
476,
363,
264,
1807,
28837,
358,
741,
326,
23066,
18,
225,
1220,
3... |
self.vertices=[event.pos] elif distance(event.pos,self.vertices[0]) < 15: | self.vertices=[event.pos] self.safe = False elif distance(event.pos,self.vertices[0]) < 15 and self.safe: | def handleEvents(self,event): #look for default events, and if none are handled then try the custom events if not super(PolygonTool,self).handleEvents(event): if event.type == MOUSEBUTTONDOWN: if event.button == 1: if not self.vertices: self.vertices=[event.pos] elif distance(event.pos,self.vertices[0]) < 15: self.vertices.append(self.vertices[0]) #connect the polygon self.game.world.add.complexPoly(self.vertices, dynamic=True, density=1.0, restitution=0.16, friction=0.5) self.vertices = None else: self.vertices.append(event.pos) elif event.button == 3: if not self.vertices: self.vertices=[event.pos] elif distance(event.pos,self.vertices[0]) < 15: #self.vertices.append(self.vertices[0]) #connect the polygon gons = decomposePoly(self.vertices) for g in gons: self.game.world.add.convexPoly(g, dynamic=True, density=1.0, restitution=0.16, friction=0.5) self.vertices = None else: self.vertices.append(event.pos) | 56b86d85ae9158c58552fe0c65801d79dbe2e91c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7607/56b86d85ae9158c58552fe0c65801d79dbe2e91c/tools.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
3783,
12,
2890,
16,
2575,
4672,
468,
7330,
364,
805,
2641,
16,
471,
309,
6555,
854,
7681,
1508,
775,
326,
1679,
2641,
309,
486,
2240,
12,
11787,
6364,
16,
2890,
2934,
4110,
3783,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
3783,
12,
2890,
16,
2575,
4672,
468,
7330,
364,
805,
2641,
16,
471,
309,
6555,
854,
7681,
1508,
775,
326,
1679,
2641,
309,
486,
2240,
12,
11787,
6364,
16,
2890,
2934,
4110,
3783,
... |
assert sys.getrefcount(key) == 5 assert sys.getrefcount(a[key]) == 2 assert a[key] == 123.0 | assert_equal(sys.getrefcount(key),5) assert_equal(sys.getrefcount(a[key]),2) assert_equal(a[key],123.0) | def check_set_double_exists(self,level=5): a = UserDict() key = 10.0 a[key] = 100.0 inline_tools.inline('a[key] = 123.0;',['a','key']) first = sys.getrefcount(key) inline_tools.inline('a[key] = 123.0;',['a','key']) second = sys.getrefcount(key) assert first == second # !! I think the following should be 3 assert sys.getrefcount(key) == 5 assert sys.getrefcount(a[key]) == 2 assert a[key] == 123.0 | 1a2e32f8d57897230b5265290279639d73dda37e /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12971/1a2e32f8d57897230b5265290279639d73dda37e/test_scxx_object.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
67,
542,
67,
9056,
67,
1808,
12,
2890,
16,
2815,
33,
25,
4672,
279,
273,
2177,
5014,
1435,
498,
273,
1728,
18,
20,
279,
63,
856,
65,
273,
2130,
18,
20,
6370,
67,
6642,
18,
100... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
67,
542,
67,
9056,
67,
1808,
12,
2890,
16,
2815,
33,
25,
4672,
279,
273,
2177,
5014,
1435,
498,
273,
1728,
18,
20,
279,
63,
856,
65,
273,
2130,
18,
20,
6370,
67,
6642,
18,
100... |
if obj.role == controlTypes.ROLE_DOCUMENT and controlTypes.STATE_BUSY in obj.states and winUser.isWindowVisible(obj.windowHandle): | if obj.role == controlTypes.ROLE_DOCUMENT and controlTypes.STATE_BUSY in obj.states and winUser.isWindowVisible(obj.windowHandle) and obj.isInForeground: | def event_stateChange(self, obj, nextHandler): if obj.role == controlTypes.ROLE_DOCUMENT and controlTypes.STATE_BUSY in obj.states and winUser.isWindowVisible(obj.windowHandle): statusBar = api.getStatusBar() if statusBar: statusText = api.getStatusBarText(statusBar) speech.cancelSpeech() speech.speakMessage(controlTypes.speechStateLabels[controlTypes.STATE_BUSY]) speech.speakMessage(statusText) return nextHandler() | 12a9b1af7d740fe59cb2822906bc5bc8279db56e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9340/12a9b1af7d740fe59cb2822906bc5bc8279db56e/firefox.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
871,
67,
2019,
3043,
12,
2890,
16,
1081,
16,
1024,
1503,
4672,
309,
1081,
18,
4615,
422,
3325,
2016,
18,
16256,
67,
18450,
471,
3325,
2016,
18,
7998,
67,
3000,
7474,
316,
1081,
18,
799... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
871,
67,
2019,
3043,
12,
2890,
16,
1081,
16,
1024,
1503,
4672,
309,
1081,
18,
4615,
422,
3325,
2016,
18,
16256,
67,
18450,
471,
3325,
2016,
18,
7998,
67,
3000,
7474,
316,
1081,
18,
799... |
return content.replace(ur"\ufeff", " ") | return content.replace(ur"\u00A0", " ") | def normalizeWhiteSpace(content): return content.replace(ur"\ufeff", " ") | 1a8f40d576f781968f9fd530c4b6b10c8d913b94 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5718/1a8f40d576f781968f9fd530c4b6b10c8d913b94/textutil.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3883,
23108,
12,
1745,
4672,
327,
913,
18,
2079,
12,
295,
12691,
89,
713,
37,
20,
3113,
315,
9369,
282,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3883,
23108,
12,
1745,
4672,
327,
913,
18,
2079,
12,
295,
12691,
89,
713,
37,
20,
3113,
315,
9369,
282,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
""" """ | def set_data(self, data): self.data.seek(0) self.data.truncate() self.data.write(data) self.mtime = datetime.now() | b08e990e0a2a8a91e72c210bc40741ade0cfd5f5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12681/b08e990e0a2a8a91e72c210bc40741ade0cfd5f5/memory.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
67,
892,
12,
2890,
16,
501,
4672,
365,
18,
892,
18,
16508,
12,
20,
13,
365,
18,
892,
18,
27201,
1435,
365,
18,
892,
18,
2626,
12,
892,
13,
365,
18,
10838,
273,
3314,
18,
3338,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
444,
67,
892,
12,
2890,
16,
501,
4672,
365,
18,
892,
18,
16508,
12,
20,
13,
365,
18,
892,
18,
27201,
1435,
365,
18,
892,
18,
2626,
12,
892,
13,
365,
18,
10838,
273,
3314,
18,
3338,... | |
""" S = self.__heilbronn_operator(self, [[-d,0, 0,d]], 1) | We test that the sign issue at sage: M = Newforms(Gamma1(13),names = 'a')[0].modular_symbols(sign=0) sage: M.diamond_bracket_operator(4) Hecke module morphism defined by the matrix [ 0 0 1 -1] [-1 -1 0 1] [-1 -1 0 0] [ 0 -1 1 -1] Domain: Modular Symbols subspace of dimension 4 of Modular Symbols space ... Codomain: Modular Symbols subspace of dimension 4 of Modular Symbols space ... """ S = self.__heilbronn_operator(self, [[d,0, 0,d]], 1) | def diamond_bracket_operator(self, d): r""" Return the diamond bracket d operator on this modular symbols space. | f02dc4ba1010038b70da3890d95dbe397d7752b5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/f02dc4ba1010038b70da3890d95dbe397d7752b5/ambient.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4314,
301,
1434,
67,
21025,
67,
9497,
12,
2890,
16,
302,
4672,
436,
8395,
2000,
326,
4314,
301,
1434,
9843,
302,
3726,
603,
333,
681,
2490,
7963,
3476,
18,
2,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
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,
4314,
301,
1434,
67,
21025,
67,
9497,
12,
2890,
16,
302,
4672,
436,
8395,
2000,
326,
4314,
301,
1434,
9843,
302,
3726,
603,
333,
681,
2490,
7963,
3476,
18,
2,
-100,
-100,
-100,
-100,
-... |
self.REQUEST['BODY'] = ENTITY_IN_TITLE | self.REQUEST['BODY'] = ENTITY_IN_TITLE | def test_EntityInTitle(self): self.REQUEST['BODY'] = ENTITY_IN_TITLE d = self.d d.PUT(self.REQUEST, self.RESPONSE) self.assertEqual( d.title, '&Auuml;rger' ) | 4ba55f1aa121a811326cd140231498cebdb64e8b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1843/4ba55f1aa121a811326cd140231498cebdb64e8b/test_Document.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
1943,
382,
4247,
12,
2890,
4672,
365,
18,
5519,
3292,
16691,
3546,
273,
17020,
67,
706,
67,
14123,
302,
273,
365,
18,
72,
302,
18,
4762,
12,
2890,
18,
5519,
16,
365,
18,
14... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
1943,
382,
4247,
12,
2890,
4672,
365,
18,
5519,
3292,
16691,
3546,
273,
17020,
67,
706,
67,
14123,
302,
273,
365,
18,
72,
302,
18,
4762,
12,
2890,
18,
5519,
16,
365,
18,
14... |
execute(['rm', '/tmp/backup.1.ldif', '/tmp/backup.2.ldif']) | execute(['sudo', 'rm', '/tmp/backup.1.ldif', '/tmp/backup.2.ldif']) | def compare_delete_backups(mode): test_message('''comparing backups of system files after tests for side-effects alterations.''') if mode == 'unix': for file in system_files: if os.path.exists('/etc/%s' % file): log_and_exec(['/usr/bin/colordiff', '/etc/%s' % file, '/tmp/%s.bak.%s' % (file.replace('/', '_'), bkp_ext)], False, comment="should not display any diff (system has been cleaned).", verb = True) execute(['rm', '/tmp/%s.bak.%s' % (file.replace('/', '_'), bkp_ext)]) elif mode == 'ldap': execute(['slapcat', '-l', '/tmp/backup.2.ldif']) log_and_exec(['/usr/bin/colordiff', '/tmp/backup.1.ldif', '/tmp/backup.2.ldif'], False, comment="should not display any diff (system has been cleaned).", verb = True) execute(['rm', '/tmp/backup.1.ldif', '/tmp/backup.2.ldif']) else: logging.error('backup mode not understood.') test_message('''system config files backup comparison finished successfully.''') | 07cb13c975b820cb15074a8378ec89357e5846f4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/07cb13c975b820cb15074a8378ec89357e5846f4/core.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3400,
67,
3733,
67,
9572,
87,
12,
3188,
4672,
1842,
67,
2150,
2668,
6309,
832,
12583,
22091,
434,
2619,
1390,
1839,
7434,
364,
4889,
17,
13867,
87,
10182,
1012,
1093,
11,
6134,
225,
309,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3400,
67,
3733,
67,
9572,
87,
12,
3188,
4672,
1842,
67,
2150,
2668,
6309,
832,
12583,
22091,
434,
2619,
1390,
1839,
7434,
364,
4889,
17,
13867,
87,
10182,
1012,
1093,
11,
6134,
225,
309,... |
txt.append(arr[6]) | def interface(req,c=cdsname,ln=cdslang, doctype="", act="", startPg=1, indir="", access="",mainmenu="",fromdir="",file="",nextPg="",nbPg="",curpage=1): ln = wash_language(ln) sys.stdout = req # get user ID: try: uid = getUid(req) uid_email = get_email(uid) except MySQLdb.Error, e: return errorMsg(e.value,req) # variable initialisation t = "" field = [] fieldhtml = [] level = [] fullDesc = [] text = [] check = [] select = [] radio = [] upload = [] txt = [] noPage = [] # Preliminary tasks # check that the user is logged in if uid_email == "" or uid_email == "guest": warningMsg("<center><font color=red>Sorry, you must log in to perform this action. Please use the top right menu to do so.</font></center>",req) # check we have minimum fields if doctype=="" or act=="" or access=="": return errorMsg("invalid parameter",req) # retrieve the action and doctype data if indir == "": res = run_sql("select dir from sbmACTION where sactname=%s",(act,)) if len(res) == 0: return errorMsg("cannot find submission directory",req) else: row = res[0] indir = row[0] res = run_sql("SELECT ldocname FROM sbmDOCTYPE WHERE sdocname=%s",(doctype,)) if len(res) == 0: return errorMsg("unknown document type",req) else: docname = res[0][0] docname = string.replace(docname," "," ") res = run_sql("SELECT lactname FROM sbmACTION WHERE sactname=%s",(act,)) if len(res) == 0: return errorMsg("unknown action",req) else: actname = res[0][0] actname = string.replace(actname," "," ") subname = "%s%s" % (act,doctype) res = run_sql("SELECT nbpg FROM sbmIMPLEMENT WHERE subname=%s", (subname,)) if len(res) == 0: return errorMsg("can't figure number of pages",req) else: nbpages = res[0][0] #Get current page if startPg != "" and (curpage=="" or curpage==0): curpage = startPg # retrieve the name of the file in which the reference of # the submitted document will be stored res = run_sql("SELECT value FROM sbmPARAMETERS WHERE doctype=%s and name='edsrn'", (doctype,)) if len(res) == 0: edsrn = "" else: edsrn = res[0][0] # This defines the path to the directory containing the action data curdir = "%s/%s/%s/%s" % (storage,indir,doctype,access) # if this submission comes from another one ($fromdir is then set) # We retrieve the previous submission directory and put it in the proper one if fromdir != "": olddir = "%s/%s/%s/%s" % (storage,fromdir,doctype,access) if os.path.exists(olddir): os.rename(olddir,curdir) # If the submission directory still does not exist, we create it if not os.path.exists(curdir): try: os.makedirs(curdir) except: return errorMsg("can't create submission directory",req) # retrieve the original main menu url ans save it in the "mainmenu" file if mainmenu != "": fp = open("%s/mainmenu" % curdir,"w") fp.write(mainmenu) fp.close() # and if the file containing the URL to the main menu exists # we retrieve it and store it in the $mainmenu variable if os.path.exists("%s/mainmenu" % curdir): fp = open("%s/mainmenu" % curdir,"r"); mainmenu = fp.read() fp.close() else: mainmenu = "%s/submit.py" %urlpath # various authentication related tasks... if uid_email != "guest" and uid_email != "": #First save the username (email address) in the SuE file. This way bibconvert will be able to use it if needed fp = open("%s/SuE" % curdir,"w") fp.write(uid_email) fp.close() # is user authorized to perform this action? (auth_code, auth_message) = acc_authorize_action(uid, "submit",verbose=0,doctype=doctype, act=act) if acc_isRole("submit",doctype=doctype,act=act) and auth_code != 0: return warningMsg("<center><font color=red>%s</font></center>" % auth_message, req) # then we update the "journal of submission" res = run_sql("SELECT * FROM sbmSUBMISSIONS WHERE doctype=%s and action=%s and id=%s and email=%s", (doctype,act,access,uid_email,)) if len(res) == 0: run_sql("INSERT INTO sbmSUBMISSIONS values (%s,%s,%s,'pending',%s,'',NOW(),NOW())", (uid_email,doctype,act,access,)) else: run_sql("UPDATE sbmSUBMISSIONS SET md=NOW() WHERE doctype=%s and action=%s and id=%s and email=%s", (doctype,act,access,uid_email,)) # Save the form fields entered in the previous submission page # If the form was sent with the GET method form = req.form value = "" # we parse all the form variables for key in form.keys(): formfields = form[key] if re.search("\[\]",key): filename = key.replace("[]","") else: filename = key # the field is an array if isinstance(formfields,types.ListType): fp = open("%s/%s" % (curdir,filename),"w") for formfield in formfields: #stripslashes(value) value = specialchars(formfield) fp.write(value+"\n") fp.close() # the field is a normal string elif isinstance(formfields,types.StringTypes) and formfields != "": value = formfields fp = open("%s/%s" % (curdir,filename),"w") fp.write(specialchars(value)) fp.close() # the field is a file elif hasattr(formfields,"filename"): if not os.path.exists("%s/files/%s" % (curdir,key)): try: os.makedirs("%s/files/%s" % (curdir,key)) except: return errorMsg("can't create submission directory",req) filename = formfields.filename if filename != "": # This may be dangerous if the file size is bigger than the available memory data = formfields.file.read() fp = open("%s/files/%s/%s" % (curdir,key,filename),"w") fp.write(data) fp.close() fp = open("%s/lastuploadedfile" % curdir,"w") fp.write(filename) fp.close() fp = open("%s/%s" % (curdir,key),"w") fp.write(filename) fp.close() # if the found field is the reference of the document # we save this value in the "journal of submissions" if uid_email != "" and uid_email != "guest": if key == edsrn: run_sql("UPDATE sbmSUBMISSIONS SET reference=%s WHERE doctype=%s and id=%s and email=%s", (value,doctype,access,uid_email,)) # Now deal with the cookies # If the fields must be saved as a cookie, we do so # In this case, the value of the field will be retrieved and # displayed as the default value of the field next time the user # does a submission if value!="": res = run_sql("SELECT cookie FROM sbmFIELDDESC WHERE name=%s", (key,)) if len(res) > 0: if res[0][0] == 1: setCookie(key,value,uid) # create interface # top menu t=t+"<FORM method=\"POST\" action=\"submit.py\" onSubmit=\"return tester();\">" t=t+"<center><TABLE cellspacing=0 cellpadding=0 border=0><TR>" t=t+" <TD class=submitHeader><B>%s </B></TD>" % docname t=t+" <TD class=submitHeader><small> %s </small></TD>" % actname t=t+""" <TD valign=bottom> <TABLE cellspacing=0 cellpadding=0 border=0 width=100%> <TR><TD class=submitEmptyPage> </TD>""" for i in range(1,nbpages+1): if i == int(curpage): t=t+"<TD class=submitCurrentPage><small> page:%s </small></TD>" % curpage else: t=t+"<TD class=submitPage><small> <A HREF='' onClick=\"if (tester2() == 1){document.forms[0].curpage.value=%s;document.forms[0].submit();return false;} else { return false; }\">%s</A> </small></TD>" % (i,i) t=t+"<TD class=submitEmptyPage> </TD></TR></TABLE></TD>\n" t=t+"<TD class=submitHeader align=right> <A HREF='' onClick=\"window.open('summary.py?doctype=%s&act=%s&access=%s&indir=%s','summary','scrollbars=yes,menubar=no,width=500,height=250');return false;\"><font color=white><small>SUMMARY(2)</small></font></A> </TD>\n" % (doctype,act,access,indir) t=t+"</TR>" # main cell t=t+"<TR><TD colspan=5 class=submitHeader><TABLE border=0 cellspacing=0 cellpadding=15 width=\"100%\" class=submitBody><TR><TD><BR>" # display the static form fields t=t+"<INPUT type=\"hidden\" name=\"file\" value=\"%s\">\n" % file t=t+"<INPUT type=\"hidden\" name=\"nextPg\" value=\"%s\">\n" % nextPg t=t+"<INPUT type=\"hidden\" name=\"access\" value=\"%s\">\n" % access t=t+"<INPUT type=\"hidden\" name=\"curpage\" value=\"%s\">\n" % curpage t=t+"<INPUT type=\"hidden\" name=\"nbPg\" value=\"%s\">\n" % nbPg t = t +"<INPUT type=\"hidden\" name=\"doctype\" value=\"%s\">\n" % doctype t=t+"<INPUT type=\"hidden\" name=\"act\" value=\"%s\">\n" % act t=t+"<INPUT type=\"hidden\" name=\"indir\" value=\"%s\">\n" % indir t=t+"<INPUT type=\"hidden\" name=\"mode\" value=\"U\">\n" t=t+"<INPUT type=\"hidden\" name=\"step\" value=\"0\">\n" # For each field to be displayed on the page subname = "%s%s" % (act,doctype) res = run_sql("SELECT * FROM sbmFIELD WHERE subname=%s and pagenb=%s ORDER BY fieldnb,fieldnb", (subname,curpage,)) nbFields = 0 for arr in res: # We retrieve its HTML description res3 = run_sql("SELECT * FROM sbmFIELDDESC WHERE name=%s", (arr[3],)) arr3 = res3[0] if arr3[8]==None: val="" else: val=arr3[8] # we also retrieve and add the javascript code of the checking function, if needed if arr[7] != '': res2 = run_sql("SELECT chdesc FROM sbmCHECKS WHERE chname=%s", (arr[7],)) t=t+"<SCRIPT LANGUAGE=\"JavaScript1.1\" TYPE=\"text/javascript\">\n"; t=t+res2[0][0] t=t+"</SCRIPT>\n" # If the field is a textarea if arr3[3] == 'T': text="<TEXTAREA name=\"%s\" rows=%s cols=%s>%s</TEXTAREA>" % (arr[3],arr3[5],arr3[6],val) # If the field is a file upload elif arr3[3] == 'F': text="<INPUT TYPE=file name=\"%s\" size=%s maxlength=%s>" % (arr[3],arr3[4],arr3[7]); # If the field is a text input elif arr3[3] == 'I': text="<INPUT name=\"%s\" size=%s value=\"%s\">" % (arr[3],arr3[4],val) # If the field is a hidden input elif arr3[3] == 'H': text="<INPUT type=\"hidden\" name=\"%s\" value=\"%s\">" % (arr[3],val) # If the field is user-defined elif arr3[3] == 'D': text=arr3[9] # If the field is a select box elif arr3[3] == 'S': text=arr3[9] # If the field is an evaluated script # the execed code should set variable text elif arr3[3] == 'R': co = compile(arr3[9].replace("\r\n","\n"),"<string>","exec") exec(co) # If the field type is not recognized else: text="%s: unknown field type" % arr[1] # we now determine the exact type of the created field if arr3[3] not in [ 'D','R']: field.append(arr[3]) level.append(arr[5]) fullDesc.append(arr[4]) txt.append(arr[6]) check.append(arr[7]) # If the field is not user-defined, we try to determine its type # (select, radio, file upload...) # check whether it is a select field or not if re.search("SELECT",text,re.IGNORECASE) != None: select.append(1) else: select.append(0) # checks whether it is a radio field or not if re.search("TYPE=radio",text,re.IGNORECASE) != None: radio.append(1) else: radio.append(0) # checks whether it is a file upload or not if re.search("TYPE=file",text,re.IGNORECASE) != None: upload.append(1) else: upload.append(0) # if the field description contains the "<COMBO>" string, replace # it by the category selected on the document page submission page combofile = "combo%s" % doctype if os.path.exists("%s/%s" % (curdir,combofile)): f = open("%s/%s" % (curdir,combofile),"r") combo = f.read() f.close() else: combo="" text = text.replace("<COMBO>",combo) # if there is a <YYYY> tag in it, replace it by the current year year = time.strftime("%Y"); text = text.replace("<YYYY>",year) fieldhtml.append(text) # increment the fields counter nbFields = nbFields + 1 else: select.append(0) radio.append(0) upload.append(0) # field.append(value) - initial version, not working with JS, taking a submitted value field.append(arr[3]) level.append(arr[5]) txt.append(arr[6]) fullDesc.append(arr[4]) txt.append(arr[6]) check.append(arr[7]) fieldhtml.append(text) nbFields = nbFields+1 # now displays the html form field(s) t+="%s\n" % fullDesc[nbFields-1] t+=text+"\n" # if there is a file upload field, we change the encoding type t=t+"<SCRIPT LANGUAGE=\"JavaScript1.1\" TYPE=\"text/javascript\">\n" for i in range(0,nbFields): if upload[i] == 1: t=t+"document.forms[0].encoding = \"multipart/form-data\";\n" # we don't want the form to be submitted if the user enters 'Return' t=t+"function tester(){return false;}\n" # tests if mandatory fields are well filled t=t+"function tester2(){\n" for i in range(0,nbFields): if re.search("%s\[\]"%field[i],fieldhtml[i]): fieldname = "%s[]" % field[i] else: fieldname = field[i] t=t+" el = document.forms[0].elements['%s'];;;;;\n" % fieldname # If the field must be checked we call the checking function if check[i] != "": t=t+"if (%s(el.value)== 0){\n" % check[i] t=t+" el.focus();\n" t=t+" return 0;\n" t=t+"}\n" # If the field is mandatory, we check a value has been selected if level[i] == 'M': if select[i] != 0: # If the field is a select box t=t+"if ((el.selectedIndex == -1)||(el.selectedIndex == 0)){\n" t=t+" alert(\"The field `%s` is Mandatory.\\n Please make a choice in the 'Select:' box\");\n" % txt[i] t=t+" return 0;\n" t=t+"}\n" elif radio[i] != 0: # If the field is a radio buttonset t=t+"var check=0;\n" t=t+"for (var j=0;j<el.length;j++){\n" t=t+" if (el.options[j].checked){check++;}\n" t=t+"}\n" t=t+"if (check == 0){\n" t=t+" alert(\"Please press a button.\");\n" t=t+" return 0;\n" t=t+"}\n" else: # If the field is a text input t=t+"if (el.value == ''){\n" t=t+" alert(\"The field `%s` is Mandatory. Please fill it in.\");\n" % txt[i] t=t+" return 0;\n" t=t+"}\n" t=t+"return 1;\n" t=t+"}\n" t=t+"</SCRIPT><BR> <BR> </TD></TR></TABLE></TD></TR>\n" # Display the navigation cell # Display "previous page" navigation arrows t=t+"<TR><TD colspan=5><TABLE border=0 cellpadding=0 cellspacing=0 width=\"100%\"><TR>\n" if int(curpage) != 1: t=t+" <TD class=submitHeader align=left> \n" t=t+" <A HREF='' onClick=\"if (tester2() == 1){document.forms[0].curpage.value=%s;document.forms[0].submit();return false;} else { return false; }\">" % (int(curpage)-1) t=t+" <IMG SRC=\"%s/left-trans.gif\" alt=\"previous page\" border=0>\n" % images t=t+" <strong><font color=white>previous page</A></font></strong></TD>\n" else: t=t+" <TD class=submitHeader> </TD>\n" # Display the submission number t=t+" <TD class=submitHeader align=center><small>Submission no(1): %s</small></TD>\n" % access # Display the "next page" navigation arrow if int(curpage) != int(nbpages): t=t+" <TD class=submitHeader align=right>\n" t=t+" <A HREF='' onClick=\"if (tester2()){document.forms[0].curpage.value=%s;document.forms[0].submit();return false;} else {return false;}; return false;\">\n" % (int(curpage)+1) t=t+" <strong><font color=white> next page</font></strong>\n" t=t+" <IMG SRC=\"%s/right-trans.gif\" alt=\"next page\" border=0></A> " % images else: t=t+" <TD class=submitHeader> </TD>\n" t=t+"</TR></TABLE></TD></TR></TABLE></center></FORM>" # # # # # # # # # # # # # # # # # # # # # # # # # # Fill the fields with the previously saved values # # # # # # # # # # # # # # # # # # # # # # # # # t=t+"<SCRIPT LANGUAGE=\"JavaScript1.1\" TYPE=\"text/javascript\">\n" t=t+"<!-- Fill the fields in with the previous saved values-->\n" # For each actual form field for i in range(0,nbFields): if re.search("%s\[\]"%field[i],fieldhtml[i]): fieldname = "%s[]" % field[i] else: fieldname = field[i] text = '' # If a file exists with the name of the field we extract the saved value if os.path.exists("%s/%s" % (curdir,field[i])): file = open("%s/%s" % (curdir,field[i]),"r"); text = file.read() text = re.compile("[\n\r]*$").sub("",text) text = re.compile("\n").sub("\\n",text) text = re.compile("\r").sub("",text) file.close() # Or if a cookie is set # If a cookie is found corresponding to the name of the current # field, we set the value of the field to the cookie's value elif getCookie(field[i],uid) != None: value = getCookie(field[i],uid) value = re.compile("\r").sub("",value) value = re.compile("\n").sub("\\n",value) text = value # If the value isn't empty if text != '': if select[i] != 0: # If the field is a SELECT element values = text.split("\n") tmp="" for val in values: if tmp != "": tmp = tmp + " || " tmp = tmp + "el.options[j].value == \"%s\" || el.options[j].text == \"%s\"" % (val,val) if tmp != "": t=t+"\n<!--SELECT field found-->\n" t=t+"el = document.forms[0].elements['%s'];\n" % fieldname t=t+"for (var j=0;j<el.length;j++){\n" t=t+" if (%s){\n" % tmp t=t+" el.options[j].selected = true;}}\n" elif radio[i] != 0: # If the field is a RADIO element t=t+"\n<!--RADIO field found-->\n" t=t+"el = document.forms[0].elements['%s'];\n" % fieldname t=t+"if (el.value == \"%s\"){\n" % text t=t+" el.checked=true;}\n" elif upload[i] == 0: # If the field is not an upload element t=t+"\n<!--INPUT field found-->\n" t=t+"el = document.forms[0].elements['%s'];\n" % fieldname text = text.replace('"','\"') text = text.replace("\n","\\n") t=t+"el.value=\"%s\";\n" % text t=t+"<!--End Fill in section-->\n" # JS function finish # This function tests each mandatory field in the whole submission and checks whether # the field has been correctly filled in or not # This function is called when the user presses the "End # Submission" button if int(curpage) == int(nbpages): t=t+"\n\nfunction finish() {\n" subname = "%s%s" % (act,doctype) res = run_sql("SELECT * FROM sbmFIELD WHERE subname=%s and pagenb!=%s", (subname,curpage,)) nbFields=0 message = "" select = [] radio = [] upload = [] field = [] level = [] txt = [] for arr in res: if arr[5] == "M": res2 = run_sql("SELECT * FROM sbmFIELDDESC WHERE name=%s", (arr[3],)); row2 = res2[0] if row2[3] in ['D','R']: if row2[3] == "D": text = row2[9] else: text = eval(row2[9]) formfields = text.split(">") for formfield in formfields: match = re.match("name=([^ <>]+)",formfield,re.IGNORECASE) if match != None: names = match.groups for value in names: if value != "": value = re.compile("[\"']+").sub("",value) field.append(value) level.append(arr[5]) txt.append(arr[6]) noPage.append(arr[1]) check.append(arr[7]) nbFields = nbFields+1 else: noPage.append(arr[1]) field.append(arr[3]) level.append(arr[5]) txt.append(arr[6]) check.append(arr[7]) nbFields = nbFields+1 # tests each mandatory field for i in range (0,nbFields): res = 1 if not os.path.exists("%s/%s" % (curdir,field[i])): res=0 else: file = open("%s/%s" % (curdir,field[i]),"r") text = file.read() if text == '': res=0 else: if text == "Select:": res=0 if res==0: message = " alert (\"The field '%s' is mandatory.\\nGoing back to page %s\");\n" % (txt[i],noPage[i]) message = message + " document.forms[0].curpage.value=\"%s\";\n" % noPage[i] message = message + " document.forms[0].submit();\n" if message != "": t=t+message else: t=t+"if (tester2()){\n"; t=t+" document.forms[0].action=\"submit.py\";\n" t=t+" document.forms[0].step.value=1;\n" t=t+" document.forms[0].submit();\n" t=t+" } \n" t=t+" else \n" t=t+" { \n" t=t+" return false;\n" t=t+" }\n" t=t+"}\n" t=t+""" | 1a2a2b9a7f6ea9890c018ad6b59eda21169c84a3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12027/1a2a2b9a7f6ea9890c018ad6b59eda21169c84a3/websubmit_engine.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1560,
12,
3658,
16,
71,
33,
71,
2377,
529,
16,
2370,
33,
4315,
2069,
539,
16,
24909,
1546,
3113,
1328,
1546,
3113,
787,
27265,
33,
21,
16,
316,
1214,
1546,
3113,
2006,
1546,
3113,
5254... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1560,
12,
3658,
16,
71,
33,
71,
2377,
529,
16,
2370,
33,
4315,
2069,
539,
16,
24909,
1546,
3113,
1328,
1546,
3113,
787,
27265,
33,
21,
16,
316,
1214,
1546,
3113,
2006,
1546,
3113,
5254... | |
self.message = message | self.msg = message | def __init__(self, message=None, missing=freeze([]), invalid=freeze([])): self.message = message self.missing = missing self.invalid = invalid | 3b883d64e67d642447dde195503c9177aec71cc4 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12681/3b883d64e67d642447dde195503c9177aec71cc4/context.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
883,
33,
7036,
16,
3315,
33,
29631,
3816,
65,
3631,
2057,
33,
29631,
3816,
22643,
30,
365,
18,
3576,
273,
883,
365,
18,
7337,
273,
3315,
365,
18,
5387,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
883,
33,
7036,
16,
3315,
33,
29631,
3816,
65,
3631,
2057,
33,
29631,
3816,
22643,
30,
365,
18,
3576,
273,
883,
365,
18,
7337,
273,
3315,
365,
18,
5387,
... |
print "warning: group %s not found, using gid 0" % gid | print "Warning: group %s not found, using gid 0." % gid | def transform(self, buildroot): # "gid=0" if no /etc/group exists at all. if not os.path.isfile(buildroot + "/etc/group"): for gid in self.ugid.keys(): self.ugid[gid] = 0 if gid != "root": print "warning: group %s not found, using gid 0" % gid return # Parse /etc/group if glibc is not yet installed. if buildroot or not os.path.isfile(buildroot + "/sbin/ldconfig"): gidhash = parseFile(buildroot + "/etc/group", self.ugid) for gid in self.ugid.keys(): if gidhash.has_key(gid): self.ugid[gid] = gidhash[gid] else: print "warning: group %s not found, using gid 0" % gid self.ugid[gid] = 0 return # Normal lookup of users via glibc. for gid in self.ugid.keys(): if gid == "root": self.ugid[gid] = 0 else: try: self.ugid[gid] = grp.getgrnam(gid)[2] except: print "warning: group %s not found, using gid 0" % gid self.ugid[gid] = 0 | 13be26721e21a4e961a8227db7d74cd35a0477dd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1143/13be26721e21a4e961a8227db7d74cd35a0477dd/oldpyrpm.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2510,
12,
2890,
16,
1361,
3085,
4672,
468,
315,
15780,
33,
20,
6,
309,
1158,
342,
14175,
19,
1655,
1704,
622,
777,
18,
309,
486,
1140,
18,
803,
18,
291,
768,
12,
3510,
3085,
397,
220... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2510,
12,
2890,
16,
1361,
3085,
4672,
468,
315,
15780,
33,
20,
6,
309,
1158,
342,
14175,
19,
1655,
1704,
622,
777,
18,
309,
486,
1140,
18,
803,
18,
291,
768,
12,
3510,
3085,
397,
220... |
def doFileCopyAndEventIdConvert(self,cp,inputxmlfile): if not os.path.isfile("LOCAL_XML_COPY/" + inputxmlfile.split('/')[-1]): shutil.copy(inputxmlfile,'LOCAL_XML_COPY') convert_process = call(cp.get('condor','pylal_conv_eventid') + " LOCAL_XML_COPY/" + inputxmlfile.split('/')[-1], shell=True) if convert_process != 0: print >> sys.stderr, "ligolw_conv_inspid could not be run on file " + inputxmlfile.split('/')[-1] sys.exit(1) else: print "The file " + inputxmlfile.split('/')[-1] + " already exist in LOCAL_XML_COPY. It will not be overwritten" return "LOCAL_XML_COPY/" + inputxmlfile.split('/')[-1] | def doFileCopyAndEventIdConvert(self,cp,inputxmlfilelist): newfilelist = [] for inputxmlfile in inputxmlfilelist: if not os.path.isfile("LOCAL_XML_COPY/" + inputxmlfile.split('/')[-1]): shutil.copy(inputxmlfile,'LOCAL_XML_COPY') convert_process = call(cp.get('condor','pylal_conv_eventid') + " LOCAL_XML_COPY/" + inputxmlfile.split('/')[-1], shell=True) if convert_process != 0: print >> sys.stderr, "ligolw_conv_inspid could not be run on file " + inputxmlfile.split('/')[-1] sys.exit(1) else: print "The file " + inputxmlfile.split('/')[-1] + " already exist in LOCAL_XML_COPY. It will not be overwritten" newfilelist.append("LOCAL_XML_COPY/" + inputxmlfile.split('/')[-1]) return newfilelist | def doFileCopyAndEventIdConvert(self,cp,inputxmlfile): if not os.path.isfile("LOCAL_XML_COPY/" + inputxmlfile.split('/')[-1]): shutil.copy(inputxmlfile,'LOCAL_XML_COPY') convert_process = call(cp.get('condor','pylal_conv_eventid') + " LOCAL_XML_COPY/" + inputxmlfile.split('/')[-1], shell=True) if convert_process != 0: print >> sys.stderr, "ligolw_conv_inspid could not be run on file " + inputxmlfile.split('/')[-1] sys.exit(1) else: print "The file " + inputxmlfile.split('/')[-1] + " already exist in LOCAL_XML_COPY. It will not be overwritten" return "LOCAL_XML_COPY/" + inputxmlfile.split('/')[-1] | 2b6b935e59ed05e1e6dc17ea3ebff4d8c7a7542c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5758/2b6b935e59ed05e1e6dc17ea3ebff4d8c7a7542c/fu_utils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
812,
2951,
1876,
21973,
2723,
12,
2890,
16,
4057,
16,
2630,
2902,
768,
4672,
309,
486,
1140,
18,
803,
18,
291,
768,
2932,
14922,
67,
4201,
67,
24875,
4898,
397,
810,
2902,
768,
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,
741,
812,
2951,
1876,
21973,
2723,
12,
2890,
16,
4057,
16,
2630,
2902,
768,
4672,
309,
486,
1140,
18,
803,
18,
291,
768,
2932,
14922,
67,
4201,
67,
24875,
4898,
397,
810,
2902,
768,
18... |
self.assertEqual(10, len(l)) | self.assertEqual(10, len(l)) | def testArray(self): with JSContext() as ctxt: array = ctxt.eval(""" var array = new Array(); for (i=0; i<10; i++) { array[i] = 10-i; } array; """) self.assert_(isinstance(array, _PyV8.JSArray)) self.assertEqual(10, len(array)) self.assert_(5 in array) self.assertFalse(15 in array) l = list(array) self.assertEqual(10, len(l)) for i in xrange(10): self.assertEqual(10-i, array[i]) self.assertEqual(10-i, l[i]) array[5] = 0 self.assertEqual(0, array[5]) del array[5] self.assertRaises(IndexError, lambda: array[5]) ctxt.locals.array1 = JSArray(5) ctxt.locals.array2 = JSArray([1, 2, 3, 4, 5]) for i in xrange(len(ctxt.locals.array2)): ctxt.locals.array1[i] = ctxt.locals.array2[i] * 10 ctxt.eval(""" var sum = 0; for (i=0; i<array1.length; i++) sum += array1[i] for (i=0; i<array2.length; i++) sum += array2[i] """) self.assertEqual(165, ctxt.locals.sum) ctxt.locals.array3 = [1, 2, 3, 4, 5] self.assert_(ctxt.eval('array3[1] === 2')) self.assert_(ctxt.eval('array3[9] === undefined')) | 39238494c6380764c75b46d3d726c011640ecf54 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5828/39238494c6380764c75b46d3d726c011640ecf54/PyV8.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
1076,
12,
2890,
4672,
598,
6756,
1042,
1435,
487,
14286,
30,
526,
273,
14286,
18,
8622,
2932,
3660,
569,
526,
273,
394,
1510,
5621,
225,
364,
261,
77,
33,
20,
31,
277,
32,
2163,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1076,
12,
2890,
4672,
598,
6756,
1042,
1435,
487,
14286,
30,
526,
273,
14286,
18,
8622,
2932,
3660,
569,
526,
273,
394,
1510,
5621,
225,
364,
261,
77,
33,
20,
31,
277,
32,
2163,
... |
currentCommand = self.win.commandSequencer.currentCommand if not currentCommand.command_has_its_own_PM: currentCommand.Done() | if not USE_COMMAND_STACK: currentCommand = self.win.commandSequencer.currentCommand if not currentCommand.command_has_its_own_PM: currentCommand.Done() | def close(self): """ Closes the Property Manager. Overrides PM_Dialog.close. """ #First exit temporary modes (e.g. Pan mode) if any. currentCommand = self.win.commandSequencer.currentCommand if not currentCommand.command_has_its_own_PM: currentCommand.Done() if not KEEP_SIGNALS_ALWAYS_CONNECTED: self.connect_or_disconnect_signals(False) self.enable_or_disable_gui_actions(bool_enable = True) PM_Dialog.close(self) | f3ab584f75e46498ffa38b750b5d22ce7ad1eedb /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11221/f3ab584f75e46498ffa38b750b5d22ce7ad1eedb/EditCommand_PM.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1746,
12,
2890,
4672,
3536,
22442,
2420,
326,
4276,
8558,
18,
531,
9857,
23544,
67,
6353,
18,
4412,
18,
3536,
468,
3759,
2427,
6269,
12382,
261,
73,
18,
75,
18,
12913,
1965,
13,
309,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1746,
12,
2890,
4672,
3536,
22442,
2420,
326,
4276,
8558,
18,
531,
9857,
23544,
67,
6353,
18,
4412,
18,
3536,
468,
3759,
2427,
6269,
12382,
261,
73,
18,
75,
18,
12913,
1965,
13,
309,
1... |
navtrail_previous_links = bibformatadminlib.getnavtrail(''' > <a class=navtrail href="%s/admin/bibformat/bibformatadmin.py/kb_manage?ln=%s">%s</a>''' % (config.weburl, ln, _("Manage Knowledge Bases"))) | navtrail_previous_links = bibformatadminlib.getnavtrail(''' > <a class="navtrail" href="%s/admin/bibformat/bibformatadmin.py/kb_manage?ln=%s">%s</a>''' % (config.weburl, ln, _("Manage Knowledge Bases"))) | def kb_add(req, ln=config.cdslang, sortby="to"): """ Adds a new kb """ ln = wash_language(ln) _ = gettext_set_language(ln) navtrail_previous_links = bibformatadminlib.getnavtrail(''' > <a class=navtrail href="%s/admin/bibformat/bibformatadmin.py/kb_manage?ln=%s">%s</a>''' % (config.weburl, ln, _("Manage Knowledge Bases"))) try: uid = getUid(req) except MySQLdb.Error, e: return error_page(req) (auth_code, auth_msg) = check_user(req, 'cfgbibformat') if not auth_code: kb_id = bibformatadminlib.add_kb() redirect_to_url(req, "kb_show_attributes?ln=%(ln)s&kb=%(kb)s" % {'ln':ln, 'kb':kb_id, 'sortby':sortby}) else: navtrail_previous_links = bibformatadminlib.getnavtrail(''' > <a class=navtrail href="%s/admin/bibformat/bibformatadmin.py/kb_manage?ln=%s">%s</a>''' % (config.weburl, ln, _("Manage Knowledge Bases"))) return page_not_authorized(req=req, text=auth_msg, navtrail=navtrail_previous_links) | f08fe81d00d74f462e6a931c4d621a61c821b5b1 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12027/f08fe81d00d74f462e6a931c4d621a61c821b5b1/bibformatadmin.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9182,
67,
1289,
12,
3658,
16,
7211,
33,
1425,
18,
4315,
2069,
539,
16,
1524,
1637,
1546,
869,
6,
4672,
3536,
15605,
279,
394,
9182,
3536,
7211,
273,
341,
961,
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,
9182,
67,
1289,
12,
3658,
16,
7211,
33,
1425,
18,
4315,
2069,
539,
16,
1524,
1637,
1546,
869,
6,
4672,
3536,
15605,
279,
394,
9182,
3536,
7211,
273,
341,
961,
67,
4923,
12,
2370,
13,
... |
"""The delimiter betweeen an option and its argument.""" | """Append the delimiter betweeen an option and its argument to body.""" | def visit_option_argument(self, node): """The delimiter betweeen an option and its argument.""" self.body.append(node.get('delimiter', ' ')) | da660f25d47961c2f86ed3793ea7182dde6086e2 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1532/da660f25d47961c2f86ed3793ea7182dde6086e2/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3757,
67,
3482,
67,
3446,
12,
2890,
16,
756,
4672,
3536,
5736,
326,
5654,
2701,
91,
1340,
275,
392,
1456,
471,
2097,
1237,
358,
1417,
12123,
365,
18,
3432,
18,
6923,
12,
2159,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3757,
67,
3482,
67,
3446,
12,
2890,
16,
756,
4672,
3536,
5736,
326,
5654,
2701,
91,
1340,
275,
392,
1456,
471,
2097,
1237,
358,
1417,
12123,
365,
18,
3432,
18,
6923,
12,
2159,
18,
588,... |
parts.append(create_html_link(req.uri, argd, lang_namelong, {'class': "langinfo"})) | args = req.uri + make_canonical_urlargd(argd, {}) | def tmpl_language_selection_box(self, req, language=cdslang): """Take URLARGS and LANGUAGE and return textual language selection box for the given page. | 1dc3d48ecf12700c20359582505fd5a9491d0626 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12027/1dc3d48ecf12700c20359582505fd5a9491d0626/webstyle_templates.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10720,
67,
4923,
67,
10705,
67,
2147,
12,
2890,
16,
1111,
16,
2653,
33,
4315,
2069,
539,
4672,
3536,
13391,
1976,
22439,
471,
24748,
471,
327,
25774,
2653,
4421,
3919,
364,
326,
864,
136... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10720,
67,
4923,
67,
10705,
67,
2147,
12,
2890,
16,
1111,
16,
2653,
33,
4315,
2069,
539,
4672,
3536,
13391,
1976,
22439,
471,
24748,
471,
327,
25774,
2653,
4421,
3919,
364,
326,
864,
136... |
def _getTid(self, oid, pos): self._file.seek(pos) h = self._file.read(16) assert oid == h[:8] return h[8:] | def getTid(self, oid): self._lock_acquire() try: result = self._get_cached_tid(oid) if result is None: pos = self._lookup_pos(oid) result = self._getTid(oid, pos) return result finally: self._lock_release() | f595f7e744ab4563b9c1110f57e46dca888b385d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/10048/f595f7e744ab4563b9c1110f57e46dca888b385d/FileStorage.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3181,
350,
12,
2890,
16,
7764,
4672,
365,
6315,
739,
67,
1077,
1039,
1435,
775,
30,
563,
273,
365,
6315,
588,
67,
7097,
67,
18081,
12,
839,
13,
309,
563,
353,
599,
30,
949,
273,
365,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3181,
350,
12,
2890,
16,
7764,
4672,
365,
6315,
739,
67,
1077,
1039,
1435,
775,
30,
563,
273,
365,
6315,
588,
67,
7097,
67,
18081,
12,
839,
13,
309,
563,
353,
599,
30,
949,
273,
365,... | |
if os.name == 'posix': | if os.name == 'posix' and sys.version_info >= (2, 6): | def findSources(path): """ Analyzes the directory tree from path and return a dict with filename and path. """ if not path.endswith(os.sep): path += os.sep file_dict = {} # also follow all symlinks under POSIX OSes if os.name == 'posix': file_list = os.walk(path, followlinks=True) else: file_list = os.walk(path) for root, dirs, files in file_list: if root.find("svn") == -1: file_dict[root.replace(path, "")] = {"dirs": [], "files": []} for dir in dirs: # TODO: place the directory name in a constant file. if dir.find("svn") == -1 and dir != "images" and dir != "obj" and dir != "doc": file_dict[root.replace(path, "")]["dirs"].append(dir) for file in files: if file.endswith(const.EXTENSION_FILTER) and file != "buildrev.h": file_dict[root.replace(path, "")]["files"].append(file) return file_dict | 51a6640441a96bcfd40f9029ed8b9db9ca97c215 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9114/51a6640441a96bcfd40f9029ed8b9db9ca97c215/codelite.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1104,
8628,
12,
803,
4672,
3536,
1922,
4647,
281,
326,
1867,
2151,
628,
589,
471,
327,
279,
2065,
598,
1544,
471,
589,
18,
3536,
309,
486,
589,
18,
5839,
1918,
12,
538,
18,
10814,
4672... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1104,
8628,
12,
803,
4672,
3536,
1922,
4647,
281,
326,
1867,
2151,
628,
589,
471,
327,
279,
2065,
598,
1544,
471,
589,
18,
3536,
309,
486,
589,
18,
5839,
1918,
12,
538,
18,
10814,
4672... |
if not USE_ZIPIMPORT or name != "site": | if not self.use_zipimport or name != "site": | def findDependencies(self): self.message("Finding module dependencies", 1) import modulefinder mf = modulefinder.ModuleFinder(excludes=self.excludeModules) if USE_ZIPIMPORT: # zipimport imports zlib, must add it manually mf.import_hook("zlib") # manually add our own site.py site = mf.add_module("site") site.__code__ = self._getSiteCode() mf.scan_code(site.__code__, site) | e70e521fdbde28d61def7b676b664ba7bea66ab2 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8125/e70e521fdbde28d61def7b676b664ba7bea66ab2/bundlebuilder.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1104,
8053,
12,
2890,
4672,
365,
18,
2150,
2932,
21358,
1605,
5030,
3113,
404,
13,
1930,
1605,
15356,
14749,
273,
1605,
15356,
18,
3120,
8441,
12,
338,
8993,
33,
2890,
18,
10157,
7782,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1104,
8053,
12,
2890,
4672,
365,
18,
2150,
2932,
21358,
1605,
5030,
3113,
404,
13,
1930,
1605,
15356,
14749,
273,
1605,
15356,
18,
3120,
8441,
12,
338,
8993,
33,
2890,
18,
10157,
7782,
1... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.