rem stringlengths 1 226k | add stringlengths 0 227k | context stringlengths 6 326k | meta stringlengths 143 403 | input_ids listlengths 256 256 | attention_mask listlengths 256 256 | labels listlengths 128 128 |
|---|---|---|---|---|---|---|
assert res.code == 200, (res.code, res) | assert res.status == 200, (res.status, res) | def __exit__(self, exc_type, exc_value, traceback): if self.result: print self.result if exc_type is None: assert False, 'expecting exception %s' % self.klass.__name__ elif issubclass(exc_type, self.klass): for (k, v) in self.kwargs.items(): if getattr(exc_value, k, None)!=v: return False return True | dab938f43cc9e2d9b6c4311724fbb11ba5f93070 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3443/dab938f43cc9e2d9b6c4311724fbb11ba5f93070/test_client.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
8593,
972,
12,
2890,
16,
3533,
67,
723,
16,
3533,
67,
1132,
16,
10820,
4672,
309,
365,
18,
2088,
30,
1172,
365,
18,
2088,
309,
3533,
67,
723,
353,
599,
30,
1815,
1083,
16,
296,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
8593,
972,
12,
2890,
16,
3533,
67,
723,
16,
3533,
67,
1132,
16,
10820,
4672,
309,
365,
18,
2088,
30,
1172,
365,
18,
2088,
309,
3533,
67,
723,
353,
599,
30,
1815,
1083,
16,
296,... |
self.OpenFile("C:\\Documents and Settings\\golinvauxb\\Bureau\\____FOR SCWIN USERS____\\STUFF TO TRY\\test808.sc") self.OpenFile("C:\\Documents and Settings\\golinvauxb\\Bureau\\____FOR SCWIN USERS____\\STUFF TO TRY\\test1.sc") self.OpenFile("C:\\Documents and Settings\\golinvauxb\\Bureau\\____FOR SCWIN USERS____\\STUFF TO TRY\\midi in test.sc") | self.OpenFile("C:\\SOMEWHERE\\test.sc") | def __init__ (self,parent,ID,title,pos=wx.DefaultPosition,size=wx.DefaultSize, style = wx.DEFAULT_FRAME_STYLE | wx.VSCROLL | wx.HSCROLL, name = "frame"): wx.MDIParentFrame.__init__(self,parent,ID,title,pos,size,style) self.winCount = 0 | a80838c2381f3fc8cfc375d205893d1fbbe163d0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11200/a80838c2381f3fc8cfc375d205893d1fbbe163d0/Psycollider.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
261,
2890,
16,
2938,
16,
734,
16,
2649,
16,
917,
33,
27226,
18,
1868,
2555,
16,
1467,
33,
27226,
18,
1868,
1225,
16,
2154,
273,
7075,
18,
5280,
67,
15072,
67,
15066,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
261,
2890,
16,
2938,
16,
734,
16,
2649,
16,
917,
33,
27226,
18,
1868,
2555,
16,
1467,
33,
27226,
18,
1868,
1225,
16,
2154,
273,
7075,
18,
5280,
67,
15072,
67,
15066,
... |
'dns_client.py NAME [TYPE=A [SERVER [SERVER ...]]', | 'dns_client.py NAME [TYPE=A [SERVER ...]]', | def resolved_NS (request_NS): try: ns1 = request_NS.dns_resources[0] except: resolved (None) return recursive_lookup ((ns1), resolved) | 31878e3cb55b5a8f9908c961bc29c9d5d10b55b4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2577/31878e3cb55b5a8f9908c961bc29c9d5d10b55b4/dns_client.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4640,
67,
3156,
261,
2293,
67,
3156,
4672,
775,
30,
3153,
21,
273,
590,
67,
3156,
18,
14926,
67,
4683,
63,
20,
65,
1335,
30,
4640,
261,
7036,
13,
327,
225,
5904,
67,
8664,
14015,
238... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4640,
67,
3156,
261,
2293,
67,
3156,
4672,
775,
30,
3153,
21,
273,
590,
67,
3156,
18,
14926,
67,
4683,
63,
20,
65,
1335,
30,
4640,
261,
7036,
13,
327,
225,
5904,
67,
8664,
14015,
238... |
self.dialogAskString('agentguid', 'The guid of the agent', None) self.dialogAskString('xmppserver', 'The dns-address of the xmpp server', None) self.dialogAskPassword('password', 'The password for the agent on the xmpp server', None) self.dialogAskString('agentcontrollerguid', 'The guid of the agentcontroller', None) | self.dialogAskString('agentguid', 'The guid of the agent', 'agent1') self.dialogAskString('xmppserver', 'The dns-address of the xmpp server', 'dmachine.office.aserver.com') self.dialogAskPassword('password', 'The password for the agent on the xmpp server', 'test') self.dialogAskString('agentcontrollerguid', 'The guid of the agentcontroller', 'agentcontroller') self.dialogAskInteger('cron_interval', 'The time between cron executes', 60) | def ask(self): self.dialogAskString('agentguid', 'The guid of the agent', None) self.dialogAskString('xmppserver', 'The dns-address of the xmpp server', None) self.dialogAskPassword('password', 'The password for the agent on the xmpp server', None) self.dialogAskString('agentcontrollerguid', 'The guid of the agentcontroller', None) | ae0e152f649f42e04a06d77f7459058c2f7bee8e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/511/ae0e152f649f42e04a06d77f7459058c2f7bee8e/agent_extension.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6827,
12,
2890,
4672,
365,
18,
12730,
23663,
780,
2668,
5629,
14066,
2187,
296,
1986,
9875,
434,
326,
4040,
2187,
599,
13,
365,
18,
12730,
23663,
780,
2668,
92,
24109,
3567,
2187,
296,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6827,
12,
2890,
4672,
365,
18,
12730,
23663,
780,
2668,
5629,
14066,
2187,
296,
1986,
9875,
434,
326,
4040,
2187,
599,
13,
365,
18,
12730,
23663,
780,
2668,
92,
24109,
3567,
2187,
296,
1... |
authorization = PrivateAccess | def test_render(self): view = self.createView() request = RequestStub(authenticated_user=self.person) result = view.render(request) self.assertEquals(request.code, 200) | def _traverse(self, name, request): if self.period is None: return TimetableTraverseView(self.context, name) else: tt = self.context.getCompositeTimetable(self.period, name) if tt is None: raise KeyError(self.period, name) return TimetableView(tt, (self.period, name)) | 3cd13be2add709d2150b864d90414df5d3e5307f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7127/3cd13be2add709d2150b864d90414df5d3e5307f/test_timetable.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2033,
2476,
12,
2890,
16,
508,
16,
590,
4672,
309,
365,
18,
6908,
353,
599,
30,
327,
12652,
278,
429,
29654,
1767,
12,
2890,
18,
2472,
16,
508,
13,
469,
30,
3574,
273,
365,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2033,
2476,
12,
2890,
16,
508,
16,
590,
4672,
309,
365,
18,
6908,
353,
599,
30,
327,
12652,
278,
429,
29654,
1767,
12,
2890,
18,
2472,
16,
508,
13,
469,
30,
3574,
273,
365,
18,
... |
def test_copy(self): try: os.unlink(TESTFN2) except: pass macostools.copy(test_support.TESTFN, TESTFN2) self.assertEqual(self.compareData(), '') | if sys.maxint < 2**32: def test_copy(self): try: os.unlink(TESTFN2) except: pass macostools.copy(test_support.TESTFN, TESTFN2) self.assertEqual(self.compareData(), '') | def test_copy(self): try: os.unlink(TESTFN2) except: pass macostools.copy(test_support.TESTFN, TESTFN2) self.assertEqual(self.compareData(), '') | ab3f5cbabd1a8ed8ac3b0e595f31826d5f320a6a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8546/ab3f5cbabd1a8ed8ac3b0e595f31826d5f320a6a/test_macostools.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
3530,
12,
2890,
4672,
775,
30,
1140,
18,
318,
1232,
12,
16961,
19793,
22,
13,
1335,
30,
1342,
5318,
669,
8192,
18,
3530,
12,
3813,
67,
13261,
18,
16961,
19793,
16,
22130,
197... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
3530,
12,
2890,
4672,
775,
30,
1140,
18,
318,
1232,
12,
16961,
19793,
22,
13,
1335,
30,
1342,
5318,
669,
8192,
18,
3530,
12,
3813,
67,
13261,
18,
16961,
19793,
16,
22130,
197... |
return None if self.__current_realm is None: self.__current_realm = realm else: self.__current_realm = realm | def get_authorization(self, req, chal): try: realm = chal['realm'] nonce = chal['nonce'] algorithm = chal.get('algorithm', 'MD5') # mod_digest doesn't send an opaque, even though it isn't # supposed to be optional opaque = chal.get('opaque', None) except KeyError: return None | 52a17becbcc8bba8d4750926c58f6ac6e41464b7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/52a17becbcc8bba8d4750926c58f6ac6e41464b7/urllib2.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
12218,
12,
2890,
16,
1111,
16,
462,
287,
4672,
775,
30,
11319,
273,
462,
287,
3292,
24056,
3546,
7448,
273,
462,
287,
3292,
12824,
3546,
4886,
273,
462,
287,
18,
588,
2668,
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,
336,
67,
12218,
12,
2890,
16,
1111,
16,
462,
287,
4672,
775,
30,
11319,
273,
462,
287,
3292,
24056,
3546,
7448,
273,
462,
287,
3292,
12824,
3546,
4886,
273,
462,
287,
18,
588,
2668,
12... | |
params.get('sort')) | sort_order, reverse) | def onReview(self, **params): """Present a list of message for (re)training.""" # Train/discard sumbitted messages. self._writePreamble("Review") id = '' numTrained = 0 numDeferred = 0 if params.get('go') != 'Refresh': for key, value in params.items(): if key.startswith('classify:'): id = key.split(':')[2] if value == 'spam': targetCorpus = state.spamCorpus elif value == 'ham': targetCorpus = state.hamCorpus elif value == 'discard': targetCorpus = None try: state.unknownCorpus.removeMessage(\ state.unknownCorpus[id]) except KeyError: pass # Must be a reload. else: # defer targetCorpus = None numDeferred += 1 if targetCorpus: sourceCorpus = None if state.unknownCorpus.get(id) is not None: sourceCorpus = state.unknownCorpus elif state.hamCorpus.get(id) is not None: sourceCorpus = state.hamCorpus elif state.spamCorpus.get(id) is not None: sourceCorpus = state.spamCorpus if sourceCorpus is not None: try: # fromCache is a fix for sf #851785. # See the comments in Corpus.py targetCorpus.takeMessage(id, sourceCorpus, fromCache=True) if numTrained == 0: self.write("<p><b>Training... ") self.flush() numTrained += 1 except KeyError: pass # Must be a reload. | f1f77b16dcda31d063fdd507c35a621a6b08fa85 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6126/f1f77b16dcda31d063fdd507c35a621a6b08fa85/ProxyUI.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
9159,
12,
2890,
16,
2826,
2010,
4672,
3536,
6351,
279,
666,
434,
883,
364,
261,
266,
13,
17584,
12123,
468,
2197,
267,
19,
31992,
2142,
3682,
2344,
2743,
18,
365,
6315,
2626,
52,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
9159,
12,
2890,
16,
2826,
2010,
4672,
3536,
6351,
279,
666,
434,
883,
364,
261,
266,
13,
17584,
12123,
468,
2197,
267,
19,
31992,
2142,
3682,
2344,
2743,
18,
365,
6315,
2626,
52,
... |
logMsg = time.strftime(self.timeFormat) + " " + msg + "\n" | logMsg = time.strftime(self.timeFormat) + " " + msg | def log(self, msg): logMsg = time.strftime(self.timeFormat) + " " + msg + "\n" print(logMsg) if (self.logFile): self.logFile.write(logMsg) | 9c458ec8307d6f497f1ed381dfe6fee33d1fd7d2 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5718/9c458ec8307d6f497f1ed381dfe6fee33d1fd7d2/qxtest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
613,
12,
2890,
16,
1234,
4672,
613,
3332,
273,
813,
18,
701,
9982,
12,
2890,
18,
957,
1630,
13,
397,
315,
315,
397,
1234,
1172,
12,
1330,
3332,
13,
309,
261,
2890,
18,
1330,
812,
467... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
613,
12,
2890,
16,
1234,
4672,
613,
3332,
273,
813,
18,
701,
9982,
12,
2890,
18,
957,
1630,
13,
397,
315,
315,
397,
1234,
1172,
12,
1330,
3332,
13,
309,
261,
2890,
18,
1330,
812,
467... |
return group.get_absolute_url() | return add_domain(group.get_absolute_url()) | def link(self, group): return group.get_absolute_url() | 5412698f45ad54c7a697bfc8cf736b7625491018 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1600/5412698f45ad54c7a697bfc8cf736b7625491018/feeds.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1692,
12,
2890,
16,
1041,
4672,
327,
1041,
18,
588,
67,
12547,
67,
718,
1435,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
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,
1692,
12,
2890,
16,
1041,
4672,
327,
1041,
18,
588,
67,
12547,
67,
718,
1435,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
contents = self.doctree( inspect.getclasstree(classes, 1), object.__name__) + '\n' for item in classes: contents = contents + self.document(item) + '\n' result = result + self.section('CLASSES', contents) | classlist = map(lambda (key, value): value, classes) contents = [self.formattree( inspect.getclasstree(classlist, 1), name)] for key, value in classes: contents.append(self.document(value, key)) result = result + self.section('CLASSES', join(contents, '\n')) | def docmodule(self, object): """Produce text documentation for a given module object.""" result = '' | 37f7b38eb6247564c00c8a355ab12268e8486c4e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/37f7b38eb6247564c00c8a355ab12268e8486c4e/pydoc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
997,
2978,
12,
2890,
16,
733,
4672,
3536,
25884,
977,
7323,
364,
279,
864,
1605,
733,
12123,
563,
273,
875,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
997,
2978,
12,
2890,
16,
733,
4672,
3536,
25884,
977,
7323,
364,
279,
864,
1605,
733,
12123,
563,
273,
875,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
def _cmp_(self, other): return cmp(self._triple, other._triple) | def __cmp__(self, other): """ EXAMPLES: sage: B.<t> = PolynomialRing(Integers(125)) sage: x, t = monsky_washnitzer.SpecialCubicQuotientRing(t^3 - t + B(1/4)).gens() sage: x == t False sage: x == x True sage: x == x + x - x True """ return cmp(self._triple, other._triple) | def _cmp_(self, other): return cmp(self._triple, other._triple) | 3d9221d83c0b71f0c5e7c5b3bb71dd775c236375 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/3d9221d83c0b71f0c5e7c5b3bb71dd775c236375/monsky_washnitzer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
9625,
67,
12,
2890,
16,
1308,
4672,
327,
9411,
12,
2890,
6315,
313,
2444,
16,
1308,
6315,
313,
2444,
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,
389,
9625,
67,
12,
2890,
16,
1308,
4672,
327,
9411,
12,
2890,
6315,
313,
2444,
16,
1308,
6315,
313,
2444,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
r = oopoint(startDictData + [(oov, x[oovar_indexes[i]:oovar_indexes[i+1]].copy()) for i, oov in enumerate(optVars)]) | r = oopoint(startDictData + [(oov, atleast_1d(x)[oovar_indexes[i]:oovar_indexes[i+1]].copy()) for i, oov in enumerate(optVars)]) | def vector2point(x): if all(x==p._FDtranslator['prevX']): return p._FDtranslator['prevVal'] # without copy() ipopt and probably others can replace it by noise after closing r = oopoint(startDictData + [(oov, x[oovar_indexes[i]:oovar_indexes[i+1]].copy()) for i, oov in enumerate(optVars)]) p._FDtranslator['prevVal'] = r p._FDtranslator['prevX'] = copy(x) | 906ab1a7f93146950c9b66d8fb79377c2fbb66b9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6196/906ab1a7f93146950c9b66d8fb79377c2fbb66b9/FDmisc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3806,
22,
1153,
12,
92,
4672,
309,
777,
12,
92,
631,
84,
6315,
16894,
17879,
3292,
10001,
60,
3546,
4672,
327,
293,
6315,
16894,
17879,
3292,
10001,
3053,
3546,
225,
468,
2887,
1610,
143... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3806,
22,
1153,
12,
92,
4672,
309,
777,
12,
92,
631,
84,
6315,
16894,
17879,
3292,
10001,
60,
3546,
4672,
327,
293,
6315,
16894,
17879,
3292,
10001,
3053,
3546,
225,
468,
2887,
1610,
143... |
check = 1 + (int(vat[1:8]) % 23) | check = 1 + (int(check_value) % 23) | def check_vat_es(self, vat): ''' Check Spain VAT number. ''' if len(vat) != 9: return False | 3de195d3730638334f30e9d665f903ccad28a417 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/3de195d3730638334f30e9d665f903ccad28a417/partner.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
67,
25012,
67,
281,
12,
2890,
16,
17359,
4672,
9163,
2073,
5878,
530,
776,
789,
1300,
18,
9163,
309,
562,
12,
25012,
13,
480,
2468,
30,
327,
1083,
2,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
67,
25012,
67,
281,
12,
2890,
16,
17359,
4672,
9163,
2073,
5878,
530,
776,
789,
1300,
18,
9163,
309,
562,
12,
25012,
13,
480,
2468,
30,
327,
1083,
2,
-100,
-100,
-100,
-100,
-100,... |
print "ignorado" | def select(self, event): # wxGlade: Movinator.<event_handler> print self.previous_cell, (event.GetRow(), event.GetCol()), state.last_visible, state.first_visible if self.ignore_select: print "ignorado" self.ignore_select = False event.Skip() return | 61e85a19eab6040b0d3364c60a9ea0b7878c41ef /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2517/61e85a19eab6040b0d3364c60a9ea0b7878c41ef/movinator.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2027,
12,
2890,
16,
871,
4672,
468,
7075,
21308,
2486,
30,
490,
1527,
4240,
22782,
2575,
67,
4176,
34,
1172,
365,
18,
11515,
67,
3855,
16,
261,
2575,
18,
967,
1999,
9334,
871,
18,
967,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2027,
12,
2890,
16,
871,
4672,
468,
7075,
21308,
2486,
30,
490,
1527,
4240,
22782,
2575,
67,
4176,
34,
1172,
365,
18,
11515,
67,
3855,
16,
261,
2575,
18,
967,
1999,
9334,
871,
18,
967,... | |
k = float(parts[j].replace("D","E")) | k = float(parts[j+1].replace("D","E")) | def parse(self,fupdate=0.05,cupdate=0.002): """Extract information from the logfile.""" inputfile = open(self.filename,"r") if self.progress: inputfile.seek(0,2) #go to end of file nstep=inputfile.tell() inputfile.seek(0) self.progress.initialize(nstep) oldstep=0 for line in inputfile: if self.progress and random.random()<cupdate: step = inputfile.tell() if step!=oldstep: self.progress.update(step,"Unsupported Information") oldstep = step if line[1:8]=="NAtoms=": | 13e537248ddb75f848e1674430c14291192c833b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8167/13e537248ddb75f848e1674430c14291192c833b/g03parser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
12,
2890,
16,
74,
2725,
33,
20,
18,
6260,
16,
71,
2725,
33,
20,
18,
24908,
4672,
3536,
4976,
1779,
628,
326,
15204,
12123,
810,
768,
273,
1696,
12,
2890,
18,
3459,
10837,
86,
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,
1109,
12,
2890,
16,
74,
2725,
33,
20,
18,
6260,
16,
71,
2725,
33,
20,
18,
24908,
4672,
3536,
4976,
1779,
628,
326,
15204,
12123,
810,
768,
273,
1696,
12,
2890,
18,
3459,
10837,
86,
7... |
with _check_py3k_warnings(("struct integer overflow masking is deprecated", DeprecationWarning), quiet=True): | with check_warnings(quiet=True): | def test_issue4228(self): # Packing a long may yield either 32 or 64 bits with _check_py3k_warnings(("struct integer overflow masking is deprecated", DeprecationWarning), quiet=True): x = struct.pack('L', -1)[:4] self.assertEqual(x, '\xff'*4) | cf4e55b3ee923710c21aaf00bea79427a57ea0bf /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12029/cf4e55b3ee923710c21aaf00bea79427a57ea0bf/test_struct.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
13882,
24,
3787,
28,
12,
2890,
4672,
468,
7930,
310,
279,
1525,
2026,
2824,
3344,
3847,
578,
5178,
4125,
598,
866,
67,
12103,
12,
20380,
33,
5510,
4672,
619,
273,
1958,
18,
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,
1842,
67,
13882,
24,
3787,
28,
12,
2890,
4672,
468,
7930,
310,
279,
1525,
2026,
2824,
3344,
3847,
578,
5178,
4125,
598,
866,
67,
12103,
12,
20380,
33,
5510,
4672,
619,
273,
1958,
18,
2... |
moves = listToMoves (self.board, mvstrs, type=None, validate=True, ignoreErrors=False) | try: moves = listToMoves (self.board, mvstrs, type=None, validate=True, ignoreErrors=False) except ParsingError, e: log.debug("Ignored line from analyzer due to error: %s" % e, repr(self)) return | def __parseLine (self, line): parts = whitespaces.split(line.strip()) if parts[0] == "pong": self.lastpong = int(parts[1]) return # Illegal Move if parts[0].lower().find("illegal") >= 0: if parts[-2] == "sd" and parts[-1].isdigit(): print >> self.engine, "depth", parts[-1] return # A Move (Perhaps) if self.board: if parts[0] == "move": movestr = parts[1] # Old Variation elif d_plus_dot_expr.match(parts[0]) and parts[1] == "...": movestr = parts[2] else: movestr = False if movestr: self.changeLock.acquire() try: if self.forced: # If engine was set in pause just before the engine sent its # move, we ignore it. However the engine has to know that we # ignored it, and thus we step it one back print >> self.engine, "undo" else: try: move = parseAny(self.board, movestr) except ParsingError, e: raise PlayerIsDead, e if validate(self.board, move): self.board = None self.returnQueue.put(move) return raise PlayerIsDead, "Board didn't validate after move" finally: self.changeLock.release() self.movecon.acquire() self.movecon.notifyAll() self.movecon.release() # Analyzing if self.forced: if parts[:4] == ["0","0","0","0"]: # Crafty doesn't analyze until it is out of book print >> self.engine, "book off" return match = anare.match(line) if match: score, moves = match.groups() if "mat" in score.lower(): # Will look either like -Mat 3 or Mat3 scoreval = MATE_VALUE - int("".join(c for c in score if c.isdigit())) if score.startswith('-'): scoreval = -scoreval else: scoreval = int(score) mvstrs = movere.findall(moves) # We ignore errors to get the most parsable moves available. # ParsingErrors may happen when parsing "old" lines from # analyzing engines, which haven't yet noticed their new tasks moves = listToMoves (self.board, mvstrs, type=None, validate=True, ignoreErrors=False) # Don't emit if we weren't able to parse moves, or if we have a move # to kill the opponent king - as it confuses many engines if moves and not self.board.board.opIsChecked(): self.emit("analyze", moves, scoreval) return # Offers draw if parts[0:2] == ["offer", "draw"]: self.emit("accept", Offer(DRAW_OFFER)) return # Resigns if "resign" in parts: self.emit("offer", Offer(RESIGNATION)) return #if parts[0].lower() == "error": # return #Tell User Error if parts[0] == "tellusererror": log.warn("Ignoring tellusererror: %s\n" % " ".join(parts[1:])) return # Tell Somebody if parts[0][:4] == "tell" and \ parts[0][4:] in ("others", "all", "ics", "icsnoalias"): # Crafty sometimes only resign to ics :S #if parts[1] == "resign": # self.emit("offer", Offer(RESIGNATION)) # log.warn("Interpreted tellics as a wish to resign") #else: log.log("Ignoring tell %s: %s\n" % (parts[0][4:], " ".join(parts[1:]))) return if "feature" in parts: # We skip parts before 'feature', as some engines give us lines like # White (1) : feature setboard=1 analyze...e="GNU Chess 5.07" done=1 parts = parts[parts.index("feature"):] for i, pair in enumerate(parts[1:]): # As "parts" is split with no thoughs on quotes or double quotes # we need to do some extra handling. if pair.find("=") < 0: continue key, value = pair.split("=",1) if value[0] in ('"',"'") and value[-1] in ('"',"'"): value = value[1:-1] # If our pair was unfinished, like myname="GNU, we search the # rest of the pairs for a quotating mark. elif value[0] in ('"',"'"): rest = value[1:] + " " + " ".join(parts[2+i:]) i = rest.find('"') j = rest.find("'") if i + j == -2: log.warn("Missing endquotation in %s feature", repr(self)) value = rest elif min(i, j) != -1: value = rest[:min(i, j)] else: l = max(i, j) value = rest[:l] else: # All nonquoted values are ints value = int(value) if key == "done": if value == 1: self.emit("readyForOptions") self.emit("readyForMoves") self.returnQueue.put("ready") elif value == 0: log.log("Adds %d seconds timeout\n" % TIME_OUT_SECOND, self.defname) # This'll buy you some more time self.timeout = time.time()+TIME_OUT_SECOND self.returnQueue.put("not ready") return self.features[key] = value | d6ab727ed8a6d6215057071e31fd958ac8303ada /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5339/d6ab727ed8a6d6215057071e31fd958ac8303ada/CECPEngine.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2670,
1670,
261,
2890,
16,
980,
4672,
2140,
273,
28186,
18,
4939,
12,
1369,
18,
6406,
10756,
225,
309,
2140,
63,
20,
65,
422,
315,
500,
75,
6877,
365,
18,
2722,
500,
75,
273,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2670,
1670,
261,
2890,
16,
980,
4672,
2140,
273,
28186,
18,
4939,
12,
1369,
18,
6406,
10756,
225,
309,
2140,
63,
20,
65,
422,
315,
500,
75,
6877,
365,
18,
2722,
500,
75,
273,
5... |
self.is_immediate = False | def __init__(self, original_name, name, info, return_type, original_args, args_for_cmds, cmd_args, init_args, num_pointer_args): self.name = name self.original_name = original_name self.info = info self.type_handler = info.type_handler self.return_type = return_type self.original_args = original_args self.num_pointer_args = num_pointer_args self.can_auto_generate = num_pointer_args == 0 and return_type == "void" self.cmd_args = cmd_args self.init_args = init_args self.args_for_cmds = args_for_cmds self.type_handler.InitFunction(self) self.is_immediate = False | 85c6d6739a81098c35cb35c3430f038ed4f5ddab /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9392/85c6d6739a81098c35cb35c3430f038ed4f5ddab/build_gles2_cmd_buffer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
2282,
67,
529,
16,
508,
16,
1123,
16,
327,
67,
723,
16,
2282,
67,
1968,
16,
833,
67,
1884,
67,
24680,
16,
1797,
67,
1968,
16,
1208,
67,
1968,
16,
818... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2282,
67,
529,
16,
508,
16,
1123,
16,
327,
67,
723,
16,
2282,
67,
1968,
16,
833,
67,
1884,
67,
24680,
16,
1797,
67,
1968,
16,
1208,
67,
1968,
16,
818... | |
if cur == "disabled": | if state == "disabled": | def aggregate_state(states): if not states: return "ok" state = states[0] for rstate in state[1:]: if rstate == "ok": if cur == "disabled": state = "ok" continue if cur == "down": state = "degraded" continue continue if rstate == "disabled": continue if rstate == "down": if cur == "ok": state = "degraded" continue if cur == "disabled": state = "down" continue continue return state | d3e6084d9361c300b1e2c9e6cdc0b3ae768c608e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13049/d3e6084d9361c300b1e2c9e6cdc0b3ae768c608e/virtualserver.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7047,
67,
2019,
12,
7992,
4672,
309,
486,
5493,
30,
327,
315,
601,
6,
919,
273,
5493,
63,
20,
65,
364,
436,
2019,
316,
919,
63,
21,
30,
14542,
309,
436,
2019,
422,
315,
601,
6877,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7047,
67,
2019,
12,
7992,
4672,
309,
486,
5493,
30,
327,
315,
601,
6,
919,
273,
5493,
63,
20,
65,
364,
436,
2019,
316,
919,
63,
21,
30,
14542,
309,
436,
2019,
422,
315,
601,
6877,
... |
APLOG_ERR = syslog.LOG_ERR | APLOG_ERR = syslog.LOG_ERR | def init(): """ This function is called by the server at startup time """ return CallBack() | 3de9a0d15ba9eb7275476985ecfc3381876d7703 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10002/3de9a0d15ba9eb7275476985ecfc3381876d7703/apache.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1208,
13332,
3536,
1220,
445,
353,
2566,
635,
326,
1438,
622,
11850,
813,
3536,
225,
327,
3049,
2711,
1435,
225,
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,
1208,
13332,
3536,
1220,
445,
353,
2566,
635,
326,
1438,
622,
11850,
813,
3536,
225,
327,
3049,
2711,
1435,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
ws = Workspace.objects.get(pk = ws_pk) | ws = DAMWorkspace.objects.get(pk = ws_pk) | def test_set_description(self): ws_pk = 1 params = self.get_final_parameters({'description':'test_'}) response = self.client.post('/api/workspace/%s/set_description/'%ws_pk, params) self.assertTrue(response.content == '') ws = Workspace.objects.get(pk = ws_pk) self.assertTrue(ws.description == 'test_') | 774c03fcc85d5555c72b71c04da9a7d1a510e957 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4589/774c03fcc85d5555c72b71c04da9a7d1a510e957/tests.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
542,
67,
3384,
12,
2890,
4672,
225,
4945,
67,
5465,
273,
404,
859,
273,
365,
18,
588,
67,
6385,
67,
3977,
12590,
11,
3384,
11,
2497,
3813,
4623,
6792,
766,
273,
365,
18,
26... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
542,
67,
3384,
12,
2890,
4672,
225,
4945,
67,
5465,
273,
404,
859,
273,
365,
18,
588,
67,
6385,
67,
3977,
12590,
11,
3384,
11,
2497,
3813,
4623,
6792,
766,
273,
365,
18,
26... |
sc_menu_id = self.pool.get('ir.ui.view_sc').create(cr, uid, sc_data, context) | sc_menu_id = self.pool.get('ir.ui.view_sc').create(cr, uid, sc_data, new_context) | def create_shortcut(self, cr, uid, values, context={}): dataobj = self.pool.get('ir.model.data') menu_id = dataobj._get_id(cr, uid, 'base', 'menu_administration_shortcut', context) shortcut_menu_id = int(dataobj.read(cr, uid, menu_id, ['res_id'], context)['res_id']) action_id = self.pool.get('ir.actions.act_window').create(cr, uid, values, context) menu_data = {'name':values['name'], 'sequence':10, 'action':'ir.actions.act_window,'+str(action_id), 'parent_id':shortcut_menu_id, 'icon':'STOCK_JUSTIFY_FILL'} menu_id = self.pool.get('ir.ui.menu').create(cr, uid, menu_data) sc_data= {'name':values['name'], 'sequence': 1,'res_id': menu_id } sc_menu_id = self.pool.get('ir.ui.view_sc').create(cr, uid, sc_data, context) | 195b06cede819bfcd7f7f9d85cdb7c3442f6ce16 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12853/195b06cede819bfcd7f7f9d85cdb7c3442f6ce16/ir_ui_menu.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
67,
24744,
12,
2890,
16,
4422,
16,
4555,
16,
924,
16,
819,
12938,
4672,
501,
2603,
273,
365,
18,
6011,
18,
588,
2668,
481,
18,
2284,
18,
892,
6134,
3824,
67,
350,
273,
501,
2603... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
24744,
12,
2890,
16,
4422,
16,
4555,
16,
924,
16,
819,
12938,
4672,
501,
2603,
273,
365,
18,
6011,
18,
588,
2668,
481,
18,
2284,
18,
892,
6134,
3824,
67,
350,
273,
501,
2603... |
media_source = phonon.Phonon.MediaSource(file) | media_source = phonon.Phonon.MediaSource(file_) | def play(self, index): if index.isValid(): selected_row = index.row() elif self.playlist_model.rowCount() > 0: # TODO - be smarter selected_row = 0 else: # TODO - should we do something better here? return file_index = self.playlist_model.createIndex( selected_row, PlaylistModel.FILE) self.playlist_model.setData( file_index, None, PlaylistModel.ActiveTrackRole) file = self.playlist_model.data(file_index).toString() self.current_index = file_index media_source = phonon.Phonon.MediaSource(file) self.media_object.setCurrentSource(media_source) self.media_object.play() | e8609d83f298adae3e6d51ef7f906875e3a29757 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5116/e8609d83f298adae3e6d51ef7f906875e3a29757/player.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6599,
12,
2890,
16,
770,
4672,
309,
770,
18,
26810,
13332,
3170,
67,
492,
273,
770,
18,
492,
1435,
1327,
365,
18,
1601,
1098,
67,
2284,
18,
492,
1380,
1435,
405,
374,
30,
468,
2660,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6599,
12,
2890,
16,
770,
4672,
309,
770,
18,
26810,
13332,
3170,
67,
492,
273,
770,
18,
492,
1435,
1327,
365,
18,
1601,
1098,
67,
2284,
18,
492,
1380,
1435,
405,
374,
30,
468,
2660,
... |
try: from ctypes import Value except ImportError: Value = None try: from ctypes import copy as ctypes_copy except ImportError: ctypes_copy = None | def latin(s): return s.encode('latin') | fd8326704a001f539cb22d3f1c0abda08bf99805 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3187/fd8326704a001f539cb22d3f1c0abda08bf99805/test_multiprocessing.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
30486,
12,
87,
4672,
327,
272,
18,
3015,
2668,
26578,
6134,
225,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
30486,
12,
87,
4672,
327,
272,
18,
3015,
2668,
26578,
6134,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... | |
getattr(self.pool.get('document.directory.content'), 'process_write_'+self.node.content.extension[1:])(cr, self.uid, self.node, self.getvalue()) | try: getattr(self.pool.get('document.directory.content'), 'process_write_'+self.node.content.extension[1:])(cr, self.uid, self.node, self.getvalue()) finally: cr.commit() cr.close() | def close(self, *args, **kwargs): db,pool = pooler.get_db_and_pool(self.dbname) cr = db.cursor() getattr(self.pool.get('document.directory.content'), 'process_write_'+self.node.content.extension[1:])(cr, self.uid, self.node, self.getvalue()) StringIO.StringIO.close(self, *args, **kwargs) cr.commit() cr.close() | 6af4fbbbed7122479be3045eb3d28d580277818d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7397/6af4fbbbed7122479be3045eb3d28d580277818d/abstracted_fs.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1746,
12,
2890,
16,
380,
1968,
16,
2826,
4333,
4672,
1319,
16,
6011,
273,
2845,
264,
18,
588,
67,
1966,
67,
464,
67,
6011,
12,
2890,
18,
20979,
13,
4422,
273,
1319,
18,
9216,
1435,
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,
1746,
12,
2890,
16,
380,
1968,
16,
2826,
4333,
4672,
1319,
16,
6011,
273,
2845,
264,
18,
588,
67,
1966,
67,
464,
67,
6011,
12,
2890,
18,
20979,
13,
4422,
273,
1319,
18,
9216,
1435,
7... |
("fixed", 15, urwid.ListBox([ Attr(urwid.Button(btn_text, ResultSetter(btn_result)), "button", "focused button") for btn_text, btn_result in buttons_and_results ])), | ("fixed", 15, urwid.ListBox(button_widgets)), | def esc(w, size, key): self.quit_event_loop = [False] | bf797c79a7724bcc0e7b4a6f37b018477c01fd80 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12738/bf797c79a7724bcc0e7b4a6f37b018477c01fd80/debugger.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2904,
12,
91,
16,
963,
16,
498,
4672,
365,
18,
27176,
67,
2575,
67,
6498,
273,
306,
8381,
65,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2904,
12,
91,
16,
963,
16,
498,
4672,
365,
18,
27176,
67,
2575,
67,
6498,
273,
306,
8381,
65,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
Register the current process and params to an xml document | Register the current process and params to an XML document. Any additional keyword arguments are passed to append_process(). Returns the new row from the process table. | def register_to_xmldoc(xmldoc, program, options, version = None, cvs_date = None): """ Register the current process and params to an xml document """ process = append_process(xmldoc, program = program, version = version, cvs_entry_time = cvs_date) params = map(lambda key:(key, 'lstring', options.__dict__[key]), filter(lambda x: options.__dict__[x], options.__dict__)) append_process_params(xmldoc, process, params) return process.process_id | d81ca20304d0aa8b3730743424e82902385f1845 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5758/d81ca20304d0aa8b3730743424e82902385f1845/process.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1744,
67,
869,
67,
2902,
2434,
12,
2902,
2434,
16,
5402,
16,
702,
16,
1177,
273,
599,
16,
276,
6904,
67,
712,
273,
599,
4672,
3536,
5433,
326,
783,
1207,
471,
859,
358,
392,
3167,
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,
1744,
67,
869,
67,
2902,
2434,
12,
2902,
2434,
16,
5402,
16,
702,
16,
1177,
273,
599,
16,
276,
6904,
67,
712,
273,
599,
4672,
3536,
5433,
326,
783,
1207,
471,
859,
358,
392,
3167,
16... |
print "***A" | def FillinConAttr(self, attr): if (self.contype == "smi"): if (self.port == ""): print "***A" raise InvalidDomainError("No port specified") attr.extend([ "smi", str(self.port) ]) elif (self.contype == "lan"): if (self.address == ""): print "***B" raise InvalidDomainError("No address specified") attr.append("lan") if (self.port != ""): attr.extend(["-p", self.port]) if (self.username != ""): attr.extend(["-U", self.username]) if (self.password != ""): attr.extend(["-P", self.password]) if (self.authtype != ""): attr.extend(["-A", self.authtype]) if (self.privilege != ""): attr.extend(["-L", self.privilege]) if (self.auth_alg != ""): attr.extend(["-Ra", self.auth_alg]) if (self.integ_alg != ""): attr.extend(["-Ri", self.integ_alg]) if (self.conf_alg != ""): attr.extend(["-Rc", self.conf_alg]) if (self.bmc_key != ""): attr.extend(["-Rk", self.bmc_key]) if (self.lookup_uses_priv): attr.append("-Rl") for h in self.hacks: attr.extend(["-H", h]) if (self.address2 != ""): attr.append("-s") if (self.port2 != ""): attr.extend(["-p2", self.port2]) attr.append(self.address) if (self.address2 != ""): attr.append(self.address2) else: print "***C" raise InvalidDomainError("Invalid connection type: " + self.contype) | 9a494271213765e6cd1c2cecaa81860143e9e82a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3867/9a494271213765e6cd1c2cecaa81860143e9e82a/_domain.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
14192,
267,
442,
3843,
12,
2890,
16,
1604,
4672,
309,
261,
2890,
18,
591,
723,
422,
315,
4808,
77,
6,
4672,
309,
261,
2890,
18,
655,
422,
1408,
4672,
1002,
1962,
3748,
668,
2932,
2279,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
14192,
267,
442,
3843,
12,
2890,
16,
1604,
4672,
309,
261,
2890,
18,
591,
723,
422,
315,
4808,
77,
6,
4672,
309,
261,
2890,
18,
655,
422,
1408,
4672,
1002,
1962,
3748,
668,
2932,
2279,... | |
def set_property(name, what): self.device.props[CRD_INTFACE][name] = what | def set_property(name, what, iface=CRD_INTFACE): self.device.props[iface][name] = what | def set_property(name, what): self.device.props[CRD_INTFACE][name] = what | 8b4cd4ed260c8bf0bdebc3c47e1725618cdfe280 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12036/8b4cd4ed260c8bf0bdebc3c47e1725618cdfe280/middleware.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
67,
4468,
12,
529,
16,
4121,
4672,
365,
18,
5964,
18,
9693,
63,
5093,
40,
67,
3217,
11300,
6362,
529,
65,
273,
4121,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
67,
4468,
12,
529,
16,
4121,
4672,
365,
18,
5964,
18,
9693,
63,
5093,
40,
67,
3217,
11300,
6362,
529,
65,
273,
4121,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
item.name = textentries[ key ] | if textentries[ key ] == '': item.name = str('') else: item.name = textentries[ key ] | def iteminfo_response( player, args, choice ): socket = player.socket item = args[0] if choice.button == 0 or not item or not socket: return True textentries = choice.text keys = textentries.keys() for key in keys: if key == 1: item.name = textentries[ key ] elif key == 2: item.id = int( hex2dec( textentries[ key ] ) ) elif key == 3: item.pos = unicode( textentries[key] ) elif key == 4: item.color = int( hex2dec( textentries[ key ] ) ) elif key == 5: item.amount = int( hex2dec( textentries[ key ] ) ) #elif key == 6: # item.weight = float( textentries[ key ] ) elif key == 7: try: item.layer = int( hex2dec( textentries[ key ] ) ) except: pass #elif key == 8: # item.type = int( hex2dec( textentries[ key ] ) ) elif key == 9: item.maxhealth = int( hex2dec( textentries[ key ] ) ) elif key == 10: item.health = int( hex2dec( textentries[ key ] ) ) elif key == 11: item.decay = str2bool( textentries[ key ] ) elif key == 12: item.newbie = int( hex2dec( textentries[ key ] ) ) elif key == 13: item.movable = int( hex2dec( textentries[ key ] ) ) elif key == 14: item.visible = int( hex2dec( textentries[ key ] ) ) elif key == 15: if textentries[ key ] == '': value = None else: value = int( hex2dec( textentries[key] ) ) setTag(player, item, 'price', value) #elif key == 16: # item.restock = int( hex2dec( textentries[ key ] ) ) elif key == 17: if textentries[ key ] == '': value = None else: value = int( hex2dec( textentries[key] ) ) setTag(player, item, 'timeunused', value) elif key == 18: if textentries[ key ] == '': value = None else: value = int( hex2dec( textentries[key] ) ) setTag(player, item, 'charges', value) elif key == 19: if textentries[ key ] == '': value = None else: value = int( hex2dec( textentries[key] ) ) setTag(player, item, 'maxcharges', value) elif key == 20: if textentries[ key ] == '': value = None else: value = int( hex2dec( textentries[key] ) ) setTag(player, item, 'req_str', value) elif key == 21: if textentries[ key ] == '': value = None else: value = int( hex2dec( textentries[key] ) ) setTag(player, item, 'req_dex', value) elif key == 22: if textentries[ key ] == '': value = None else: value = int( hex2dec( textentries[key] ) ) setTag(player, item, 'req_int', value) elif key == 23: if textentries[ key ] == '': value = None else: value = int( hex2dec( textentries[key] ) ) setTag(player, item, 'boni_str', value) elif key == 24: if textentries[ key ] == '': value = None else: value = int( hex2dec( textentries[key] ) ) setTag(player, item, 'boni_dex', value) elif key == 25: if textentries[ key ] == '': value = None else: value = int( hex2dec( textentries[key] ) ) setTag(player, item, 'boni_int', value) elif key == 26: if textentries[ key ] == '': value = None else: value = int( hex2dec( textentries[key] ) ) setTag(player, item, 'speed', value) elif key == 27: if textentries[ key ] == '': value = None else: value = textentries[key] setTag(player, item, 'resname', value) elif key == 28: if textentries[ key ] == '': value = None else: value = textentries[key] setTag(player, item, 'resname2', value) elif key == 29: if textentries[ key ] == '': value = None else: value = int( hex2dec( textentries[key] ) ) setTag(player, item, 'exceptional', value) elif key == 30: if textentries[ key ] == '': value = None else: value = int( hex2dec( textentries[key] ) ) setTag(player, item, 'res_physical', value) elif key == 31: if textentries[ key ] == '': value = None else: value = int( hex2dec( textentries[key] ) ) setTag(player, item, 'res_fire', value) elif key == 32: if textentries[ key ] == '': value = None else: value = int( hex2dec( textentries[key] ) ) setTag(player, item, 'res_cold', value) elif key == 33: if textentries[ key ] == '': value = None else: value = int( hex2dec( textentries[key] ) ) setTag(player, item, 'res_poison', value) elif key == 34: if textentries[ key ] == '': value = None else: value = int( hex2dec( textentries[key] ) ) setTag(player, item, 'res_energy', value) elif key == 35: if textentries[ key ] == '': value = None else: value = int( hex2dec( textentries[key] ) ) setTag(player, item, 'dmg_physical', value) elif key == 36: if textentries[ key ] == '': value = None else: value = int( hex2dec( textentries[key] ) ) setTag(player, item, 'dmg_fire', value) elif key == 37: if textentries[ key ] == '': value = None else: value = int( hex2dec( textentries[key] ) ) setTag(player, item, 'dmg_cold', value) elif key == 38: if textentries[ key ] == '': value = None else: value = int( hex2dec( textentries[key] ) ) setTag(player, item, 'dmg_poison', value) elif key == 39: if textentries[ key ] == '': value = None else: value = int( hex2dec( textentries[key] ) ) setTag(player, item, 'dmg_energy', value) elif key == 40: if textentries[ key ] == '': value = None else: value = int( hex2dec( textentries[key] ) ) setTag(player, item, 'mindamage', value) elif key == 41: if textentries[ key ] == '': value = None else: value = int( hex2dec( textentries[key] ) ) setTag(player, item, 'maxdamage', value) if choice.button == 1: iteminfo( socket, item ) item.update() return True | d5323692a349a48b69afac9c2651f9c1c55fb5c6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/d5323692a349a48b69afac9c2651f9c1c55fb5c6/info.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
761,
1376,
67,
2740,
12,
7291,
16,
833,
16,
6023,
262,
30,
2987,
273,
7291,
18,
7814,
761,
273,
833,
63,
20,
65,
309,
6023,
18,
5391,
422,
374,
578,
486,
761,
578,
486,
2987,
30,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
761,
1376,
67,
2740,
12,
7291,
16,
833,
16,
6023,
262,
30,
2987,
273,
7291,
18,
7814,
761,
273,
833,
63,
20,
65,
309,
6023,
18,
5391,
422,
374,
578,
486,
761,
578,
486,
2987,
30,
3... |
" mv $${html}.new $${html}; " + "done") | "done; true") | def Doxygen(env, doxyfile = "Doxyfile", extra_sources = []): # ARGHHH !!! without the [:] we are changing the target list # ||| WITHIN THE DOXYGEN BUILDER docs = env.Doxygen(doxyfile)[:] xmlnode = None htmlnode = None tagnode = None for doc in docs: if isinstance(doc,SCons.Node.FS.Dir): continue if doc.name == 'xml.stamp' : xmlnode = doc if doc.name == 'html.stamp' : htmlnode = doc if doc.name == 'search.idx' : continue if os.path.splitext(doc.name)[1] == '.stamp' : continue # ignore other file stamps # otherwise it must be the tag file tagnode = doc if tagnode: # Postprocess the tag file to remove the (broken) namespace # references env.AddPostAction( docs, SCons.Action.Action("xsltproc --nonet -o %(target)s.temp %(template)s %(target)s && mv %(target)s.temp %(target)s" % { 'target': tagnode.abspath, 'template': os.path.join(basedir,"tagmunge.xsl") })) if htmlnode and env.get('DOXY_HTML_XSL'): xslfile = env.File(env['DOXY_HTML_XSL']) reltopdir = '../' * len(htmlnode.dir.abspath[len(env.Dir('#').abspath)+1:].split('/')) if reltopdir : reltopdir = reltopdir[:-1] else : reltopdir = '.' env.AddPostAction( docs, SCons.Action.Action(("for html in %s/*.html; do " + " echo $$html;" + " sed -e 's/id=\"current\"/class=\"current\"/' $${html}" + " | tidy -ascii -q --show-warnings no --fix-uri no " + " | xsltproc --nonet --html --stringparam topdir %s -o $${html}.new %s - 2>&1" + " | grep '^-'" + " | grep -v 'ID .* already defined';" + " mv $${html}.new $${html}; " + "done") % (htmlnode.dir.abspath, reltopdir, xslfile.abspath))) for doc in docs: env.Depends(doc, xslfile) if xmlnode: xrefs = [] for type in env.get("DOXY_XREF_TYPES",[ "bug", "todo" ]): xref = os.path.join(xmlnode.dir.abspath,type+".xml") xref_pp = env.Command(xref+'i', [ xref, os.path.join(basedir,'xrefxtract.xslt'), xmlnode ], [ "test -s $SOURCE && xsltproc --nonet -o $TARGET" + " --stringparam module $MODULE" + " --stringparam type $TYPE" + " ${SOURCES[1]} $SOURCE || touch $TARGET" ], MODULE = xmlnode.dir.dir.dir.abspath[ len(env.Dir('#').abspath)+1:], TYPE = type) env.SideEffect(xref, xmlnode) env.AddPreAction(docs, "rm -f %s" % (xref,)) env.AddPostAction(docs, "test -r %s || touch %s" % (xref,xref)) xrefs.extend(xref_pp) docs.extend(xrefs) if extra_sources and htmlnode: env.Depends(docs, [ env.CopyToDir( source=source, target=htmlnode.dir ) for source in extra_sources ]) if extra_sources and xmlnode: env.Depends(docs, [ env.CopyToDir( source=source, target=xmlnode.dir ) for source in extra_sources ]) if not htmlnode and not xmlnode: env.Depends(docs, extra_sources) for doc in docs : env.Alias('all_docs', doc) env.Clean('all_docs', doc) env.Clean('all', doc) l = len(env.Dir('#').abspath) if htmlnode: env.Alias('install_all', env.Command('$DOCINSTALLDIR' + htmlnode.dir.abspath[l:], htmlnode.dir, [ SCons.Defaults.Copy('$TARGET','$SOURCE') ])) if tagnode: env.Alias('install_all', env.Install( '$DOCINSTALLDIR' + tagnode.dir.abspath[l:], tagnode )) return docs | e9351d2afbcdedbfb10ac426849a8472b23a7a68 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2548/e9351d2afbcdedbfb10ac426849a8472b23a7a68/SENFSCons.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2256,
1698,
4507,
12,
3074,
16,
741,
1698,
768,
273,
315,
3244,
1698,
768,
3113,
2870,
67,
10141,
273,
5378,
4672,
468,
13984,
17500,
44,
401,
8548,
2887,
326,
306,
26894,
732,
854,
1277... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2256,
1698,
4507,
12,
3074,
16,
741,
1698,
768,
273,
315,
3244,
1698,
768,
3113,
2870,
67,
10141,
273,
5378,
4672,
468,
13984,
17500,
44,
401,
8548,
2887,
326,
306,
26894,
732,
854,
1277... |
for cmd in config('ALL', 'before'): f.write('%s\n' % cmd) | for cmd in config('ALL', 'before'): exp = re.findall(r'export (\S+)=(\S+)', cmd) if exp: f.write('setenv %s %s\n' % (exp[0][0], exp[0][1])) else: f.write('%s\n' % cmd) | def write_env(bld, cwd, cname): # write out env.csh for people who haven't yet learned bash env_name = os.path.join(cwd, 'env.csh') f = open(env_name, 'w') for cmd in config('ALL', 'before'): f.write('%s\n' % cmd) print >> f, "setenv LD_LIBRARY_PATH " + bld.libdir + ":$LD_LIBRARY_PATH" try: if os.environ['PYTHONPATH']: print >> f, "setenv PYTHONPATH " + os.environ['PYTHONPATH'] except: pass print >> f, "setenv PATH %s:$PATH" % bld.bindir print >> f, "\n# Need this to recompile MPM in its directory." print >> f, "setenv MEMOSA_CONFNAME %s" % cname f.close() # write out env.sh env_name = os.path.join(cwd, 'env.sh') f = open(env_name, 'w') for cmd in config('ALL', 'before'): f.write('%s\n' % cmd) print >> f, "export LD_LIBRARY_PATH=" + bld.libdir + ":$LD_LIBRARY_PATH" try: if os.environ['PYTHONPATH']: print >> f, "export PYTHONPATH=" + os.environ['PYTHONPATH'] except: pass print >> f, "export PATH=%s:$PATH" % bld.bindir print >> f, "\n# Need this to recompile MPM in its directory." print >> f, "export MEMOSA_CONFNAME=%s" % cname f.close() return env_name | a5007a3ab5f62ac54c5e9c16690c8526cad323ba /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5963/a5007a3ab5f62ac54c5e9c16690c8526cad323ba/build_utils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
67,
3074,
12,
70,
1236,
16,
7239,
16,
18290,
4672,
468,
1045,
596,
1550,
18,
71,
674,
364,
16951,
10354,
15032,
1404,
4671,
16094,
329,
24817,
1550,
67,
529,
273,
1140,
18,
803,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
67,
3074,
12,
70,
1236,
16,
7239,
16,
18290,
4672,
468,
1045,
596,
1550,
18,
71,
674,
364,
16951,
10354,
15032,
1404,
4671,
16094,
329,
24817,
1550,
67,
529,
273,
1140,
18,
803,
... |
xml_line += _refextract_markup_reportnumber_as_marcxml(prev_report_num, prev_misc_txt) | xml_line += \ markup_reportnum_as_marcxml(prev_report_num, prev_misc_txt) | def convert_processed_reference_line_to_marc_xml(line_marker, line): """Given a processed reference line, convert it to MARC XML. @param line_marker: (string) - the marker for the reference line (e.g. [1]). @param line: (string) - the processed reference line, in which the recognised citations have been tagged. @return: (tuple) - + xml_line (string) - the reference line with all of its identified citations marked up into the various subfields. + count_misc (integer) - number of sections of miscellaneous found in the line + count_title (integer) - number of title-citations found in the line + count_reportnum (integer) - number of report numbers found in the line + count_url (integer) - number of URLs found in the line """ count_misc = count_title = count_reportnum = count_url = 0 xml_line = "" previously_cited_item = None processed_line = line ## Now display the marker in marked-up XML: xml_line += _refextract_markup_reference_line_marker_as_marcxml(line_marker) ## 2. Loop through remaining identified segments in line and tag them ## into MARC XML segments: cur_misc_txt = u"" ## a marker to hold gathered miscellaneous text before ## a citation tag_match = sre_tagged_citation.search(processed_line) while tag_match is not None: ## found a tag - process it: tag_match_start = tag_match.start() tag_match_end = tag_match.end() tag_type = tag_match.group(1) if tag_type == "TITLE": ## This tag is an identified journal TITLE. It should be followed ## by VOLUME, YEAR and PAGE tags. cur_misc_txt += processed_line[0:tag_match_start] ## extract the title from the line: idx_closing_tag = processed_line.find(CFG_REFEXTRACT_MARKER_CLOSING_TITLE, tag_match_end) ## Sanity check - did we find a closing TITLE tag? if idx_closing_tag == -1: ## no closing </cds.TITLE> tag found - strip the opening tag ## and move past it processed_line = processed_line[tag_match_end:] else: ## Closing tag was found: title_text = processed_line[tag_match_end:idx_closing_tag] ## Now trim this matched title and its tags from the start of the line: processed_line = processed_line[idx_closing_tag+len(CFG_REFEXTRACT_MARKER_CLOSING_TITLE):] ## Was this title followed by the tags of recognised VOLUME, YEAR and PAGE objects? numeration_match = sre_recognised_numeration_for_title.match(processed_line) if numeration_match is not None: ## recognised numeration immediately after the title - extract it: reference_volume = numeration_match.group(2) reference_year = numeration_match.group(3) reference_page = numeration_match.group(4) ## Skip past the matched numeration in the working line: processed_line = processed_line[numeration_match.end():] if previously_cited_item is None: ## There is no previously cited item - this should be added as the previously ## cited item: previously_cited_item = { 'type' : "TITLE", 'misc_txt' : cur_misc_txt, 'title' : title_text, 'volume' : reference_volume, 'year' : reference_year, 'page' : reference_page, } ## Now empty the miscellaneous text and title components: cur_misc_txt = "" title_text = "" reference_volume = "" reference_year = "" reference_page = "" elif (previously_cited_item is not None) and \ (previously_cited_item['type'] == "REPORTNUMBER") and \ (len(cur_misc_txt.lower().replace("arxiv", "").strip(".,:;- []")) == 0): ## This TITLE belongs with the REPORT NUMBER before it - add them both into ## the same datafield tag (REPORT NUMBER first, TITLE second): prev_report_num = previously_cited_item['report_num'] prev_misc_txt = previously_cited_item['misc_txt'].lstrip(".;, ").rstrip() xml_line += \ _refextract_markup_title_followed_by_report_number_as_marcxml(title_text, reference_volume, reference_year, reference_page, prev_report_num, prev_misc_txt) ## Increment the stats counters: | afd852f45332d11ac027b8d47ce1a922ce7f2cc6 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12027/afd852f45332d11ac027b8d47ce1a922ce7f2cc6/refextract.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1765,
67,
11005,
67,
6180,
67,
1369,
67,
869,
67,
3684,
71,
67,
2902,
12,
1369,
67,
11145,
16,
980,
4672,
3536,
6083,
279,
5204,
2114,
980,
16,
1765,
518,
358,
490,
27206,
3167,
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,
1765,
67,
11005,
67,
6180,
67,
1369,
67,
869,
67,
3684,
71,
67,
2902,
12,
1369,
67,
11145,
16,
980,
4672,
3536,
6083,
279,
5204,
2114,
980,
16,
1765,
518,
358,
490,
27206,
3167,
18,
... |
got_tag, got_val = row if PROP_TYPE(got_tag) == PT_ERROR: ret = "" if got_val == mapi.MAPI_E_NOT_FOUND: pass elif got_val == mapi.MAPI_E_NOT_ENOUGH_MEMORY: ret = self._GetPropFromStream(prop_id) else: tag_name = mapiutil.GetPropTagName(prop_id) err_string = mapiutil.GetScodeString(got_val) print "Warning - failed to get property %s: %s" % (tag_name, err_string) else: ret = got_val return ret | return GetPotentiallyLargeStringProp(self.mapi_object, prop_id, row) | def _GetPotentiallyLargeStringProp(self, prop_id, row): got_tag, got_val = row if PROP_TYPE(got_tag) == PT_ERROR: ret = "" if got_val == mapi.MAPI_E_NOT_FOUND: pass # No property for this message. elif got_val == mapi.MAPI_E_NOT_ENOUGH_MEMORY: # Too big for simple properties - get via a stream ret = self._GetPropFromStream(prop_id) else: tag_name = mapiutil.GetPropTagName(prop_id) err_string = mapiutil.GetScodeString(got_val) print "Warning - failed to get property %s: %s" % (tag_name, err_string) else: ret = got_val return ret | 87b375923b49a3ad5f3cf876e06b33ba862470e6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6126/87b375923b49a3ad5f3cf876e06b33ba862470e6/msgstore.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
967,
18411,
11220,
20020,
780,
4658,
12,
2890,
16,
2270,
67,
350,
16,
1027,
4672,
2363,
67,
2692,
16,
2363,
67,
1125,
273,
1027,
309,
16258,
67,
2399,
12,
13212,
67,
2692,
13,
422... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
967,
18411,
11220,
20020,
780,
4658,
12,
2890,
16,
2270,
67,
350,
16,
1027,
4672,
2363,
67,
2692,
16,
2363,
67,
1125,
273,
1027,
309,
16258,
67,
2399,
12,
13212,
67,
2692,
13,
422... |
self.out.append(self.context.pop()) | self.out.append('\\end{figure}\n') | def depart_figure(self, node): self.out.append(self.context.pop()) | fafce8a16ab34eb7a78359425703089e74d6bb63 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1278/fafce8a16ab34eb7a78359425703089e74d6bb63/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
26000,
67,
19675,
12,
2890,
16,
756,
4672,
365,
18,
659,
18,
6923,
12,
2890,
18,
2472,
18,
5120,
10756,
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,
26000,
67,
19675,
12,
2890,
16,
756,
4672,
365,
18,
659,
18,
6923,
12,
2890,
18,
2472,
18,
5120,
10756,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
with autoincrement fields that require they not be present. so, | with autoincrement fields that require they not be present. So, | def visit_insert(self, insert): """inserts are required to have the primary keys be explicitly present. mapper will by default not put them in the insert statement to comply with autoincrement fields that require they not be present. so, put them all in for all primary key columns.""" for c in insert.table.primary_key: if not self.parameters.has_key(c.key): self.parameters[c.key] = None return ansisql.ANSICompiler.visit_insert(self, insert) | 046703498161bc3cd3851e24e20ce87796440d31 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1074/046703498161bc3cd3851e24e20ce87796440d31/firebird.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3757,
67,
6387,
12,
2890,
16,
2243,
4672,
3536,
6387,
87,
854,
1931,
358,
1240,
326,
3354,
1311,
506,
8122,
3430,
18,
5815,
903,
635,
805,
486,
1378,
2182,
316,
326,
2243,
3021,
358,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3757,
67,
6387,
12,
2890,
16,
2243,
4672,
3536,
6387,
87,
854,
1931,
358,
1240,
326,
3354,
1311,
506,
8122,
3430,
18,
5815,
903,
635,
805,
486,
1378,
2182,
316,
326,
2243,
3021,
358,
5... |
self.pe_resources = [] return | def __init__(self, stream): Filter.__init__(self, "exe_file", "EXE file", stream, None) | 7edbe76831badb20cc540e17002d28b285ceae63 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2280/7edbe76831badb20cc540e17002d28b285ceae63/exe.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1407,
4672,
4008,
16186,
2738,
972,
12,
2890,
16,
315,
14880,
67,
768,
3113,
315,
2294,
41,
585,
3113,
1407,
16,
599,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1407,
4672,
4008,
16186,
2738,
972,
12,
2890,
16,
315,
14880,
67,
768,
3113,
315,
2294,
41,
585,
3113,
1407,
16,
599,
13,
2,
-100,
-100,
-100,
-100,
-100... | |
subtypeSpec = Integer.subtypeSpec+constraint.ValueSizeConstraint(1, 255) | subtypeSpec = OctetString.subtypeSpec+constraint.ValueSizeConstraint(1, 255) | def smiSetPendingError(self, err): self.pendingError = err | f83660fd7894127935470722eba989014ecdde11 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/587/f83660fd7894127935470722eba989014ecdde11/SNMPv2-TC.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3029,
77,
694,
8579,
668,
12,
2890,
16,
393,
4672,
365,
18,
9561,
668,
273,
393,
225,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
3029,
77,
694,
8579,
668,
12,
2890,
16,
393,
4672,
365,
18,
9561,
668,
273,
393,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
gump.addText( 255, 320, "Delete page", 0x834 ) | gump.addText( 255, 320, tr("Delete page"), 0x834 ) | def details(self, player): char = wolfpack.findchar(self.serial) if not char: return # Assign the page to the viewer if not self.assigned: # Requeue an old page the gm is assigned to global pages page = pages.findassigned(player.serial) if page: page.assigned = None player.socket.sysmessage('You requeue your previous page.', 0x846) player.log(LOG_MESSAGE, "%s requeues gm page from %s (%s).\n" % (player.name, char.name, self.account)) player.log(LOG_MESSAGE, "%s assigns gm page from %s (%s) to himself.\n" % (player.name, char.name, self.account)) self.assigned = player.serial player.socket.sysmessage('You assign the gm page to yourself.', 0x846) assigned = self.assigned == player.serial if not assigned and self.assigned: player.socket.sysmessage('This page is already assigned to someone else.', 0x846) return gump = wolfpack.gumps.cGump() # Background gump.addBackground( 0xE10, 440, 440 ) gump.addResizeGump( 195, 360, 0xBB8, 205, 20 ) gump.addCheckerTrans( 15, 15, 410, 410 ) | d8b7b7c1b9e926bd4732e104ef67fe1e1cc770bf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/d8b7b7c1b9e926bd4732e104ef67fe1e1cc770bf/pages.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3189,
12,
2890,
16,
7291,
4672,
1149,
273,
341,
355,
74,
2920,
18,
4720,
3001,
12,
2890,
18,
8818,
13,
225,
309,
486,
1149,
30,
327,
225,
468,
12093,
326,
1363,
358,
326,
14157,
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,
3189,
12,
2890,
16,
7291,
4672,
1149,
273,
341,
355,
74,
2920,
18,
4720,
3001,
12,
2890,
18,
8818,
13,
225,
309,
486,
1149,
30,
327,
225,
468,
12093,
326,
1363,
358,
326,
14157,
309,
... |
q = 'subject_key:"%s"' % url_quote(str_to_key(path_info).lower().replace('_', ' ')) | key = str_to_key(path_info).lower().replace('_', ' ') q = 'subject_key:"%s"' % url_quote(key) | def GET(self, path_info): rows = 10 offset = 0 if not path_info: return 'subjects page goes here' m = re_subject_types.match(path_info) if m: subject_type = subject_types[m.group(1)] q = '%s_key:"%s"' % (subject_type, url_quote(str_to_key(m.group(2)).lower().replace('_', ' '))) else: subject_type = 'subject' q = 'subject_key:"%s"' % url_quote(str_to_key(path_info).lower().replace('_', ' ')) # q = ' AND '.join('subject_key:"%s"' % url_quote(key.lower().replace('_', ' ')) for key in path_info.split('+')) solr_select = solr_select_url + "?version=2.2&q.op=AND&q=%s&fq=&start=%d&rows=%d&fl=key,author_name,author_key,title,edition_count,ia&qt=standard&wt=json" % (q, offset, rows) facet_fields = ["author_facet", "language", "publish_year", "publisher_facet", "subject_facet", "person_facet", "place_facet", "time_facet"] solr_select += "&sort=edition_count+desc" solr_select += "&facet=true&facet.mincount=1&f.author_facet.facet.sort=count&f.publish_year.facet.limit=-1&facet.limit=20&" + '&'.join("facet.field=" + f for f in facet_fields) print solr_select reply = json.load(urllib.urlopen(solr_select)) facets = reply['facet_counts']['facet_fields'] def get_facet(f, limit=None): return list(web.group(facets[f][:limit * 2] if limit else facets[f], 2)) def get_author(a, c): k, n = eval(a) return web.storage(key='/authors/' + k, name=n, count=c) | c8aeedc702019e38f659618d664878518b32e736 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3913/c8aeedc702019e38f659618d664878518b32e736/code.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4978,
12,
2890,
16,
589,
67,
1376,
4672,
2595,
273,
1728,
1384,
273,
374,
309,
486,
589,
67,
1376,
30,
327,
296,
7857,
87,
1363,
13998,
2674,
11,
312,
273,
283,
67,
7857,
67,
2352,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4978,
12,
2890,
16,
589,
67,
1376,
4672,
2595,
273,
1728,
1384,
273,
374,
309,
486,
589,
67,
1376,
30,
327,
296,
7857,
87,
1363,
13998,
2674,
11,
312,
273,
283,
67,
7857,
67,
2352,
1... |
self.insertBase() | def setBase(self,base): 'Set the base URL for the returned document.' if base[-1:] != '/': base=base+'/' self.base=base self.insertBase() | e297f298ed9fdc5408019efd9ae51038da5333df /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/e297f298ed9fdc5408019efd9ae51038da5333df/HTTPResponse.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
26435,
12,
2890,
16,
1969,
4672,
296,
694,
326,
1026,
1976,
364,
326,
2106,
1668,
1093,
309,
1026,
18919,
21,
26894,
480,
2023,
30,
1026,
33,
1969,
6797,
2473,
365,
18,
1969,
33,
1969,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
26435,
12,
2890,
16,
1969,
4672,
296,
694,
326,
1026,
1976,
364,
326,
2106,
1668,
1093,
309,
1026,
18919,
21,
26894,
480,
2023,
30,
1026,
33,
1969,
6797,
2473,
365,
18,
1969,
33,
1969,
... | |
journal+=string.lower(l[19:72]) | journal+=l[19:72].lower() | def _get_journal(inl): # JRNL AUTH L.CHEN,M.DOI,F.S.MATHEWS,A.Y.CHISTOSERDOV, 2BBK 7 journal="" for l in inl: if re.search("\AJRNL",l): journal+=string.lower(l[19:72]) journal=re.sub("\s\s+"," ",journal) return journal | 8ddf606a834a8cc06f52daec7b4ce067280da302 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7167/8ddf606a834a8cc06f52daec7b4ce067280da302/parse_pdb_header.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
67,
22644,
12,
267,
80,
4672,
468,
27974,
24924,
3639,
12790,
282,
511,
18,
1792,
1157,
16,
49,
18,
3191,
45,
16,
42,
18,
55,
18,
49,
3275,
41,
2651,
16,
37,
18,
61,
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,
389,
588,
67,
22644,
12,
267,
80,
4672,
468,
27974,
24924,
3639,
12790,
282,
511,
18,
1792,
1157,
16,
49,
18,
3191,
45,
16,
42,
18,
55,
18,
49,
3275,
41,
2651,
16,
37,
18,
61,
18,
... |
if '<p>There is no record of Bug' in bugdata: | if not raw: | def get_bug(self, id): url = "%s/cgi-bin/bugreport.cgi?bug=%d;mbox=yes" % (self.url,id) try: bugdata = utils.web.getUrl(url) except Exception, e: s = 'Could not parse data returned by %s: %s' % (self.description, e) raise BugtrackerError, s if '<p>There is no record of Bug' in bugdata: raise BugNotFoundError try: data = {'package': 'unknown','title': 'unknown','severity':'unknown','status':'Open'} for m in bugdata.split("\n\n\nFrom"): self.parse_mail(id, m, data) except Exception, e: s = 'Could not parse data returned by %s bugtracker: %s' % (self.description, e) raise BugtrackerError, s return [(id, data['package'], data['title'], data['severity'], data['status'], '', "%s/%s" % (self.url, id))] | 738ebb1d8de446f20b5c581d2c049dfbc467db16 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3104/738ebb1d8de446f20b5c581d2c049dfbc467db16/plugin.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
925,
12,
2890,
16,
612,
4672,
880,
273,
2213,
87,
19,
19062,
17,
4757,
19,
925,
6006,
18,
19062,
35,
925,
5095,
72,
31,
81,
2147,
33,
9707,
6,
738,
261,
2890,
18,
718,
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,
336,
67,
925,
12,
2890,
16,
612,
4672,
880,
273,
2213,
87,
19,
19062,
17,
4757,
19,
925,
6006,
18,
19062,
35,
925,
5095,
72,
31,
81,
2147,
33,
9707,
6,
738,
261,
2890,
18,
718,
16,... |
self.stream.flush() | if self.stream: self.stream.flush() | def flush(self): """ Flushes the stream. """ self.stream.flush() | 120074002b993ddf937b6dde904b054052a7d26b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8125/120074002b993ddf937b6dde904b054052a7d26b/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3663,
12,
2890,
4672,
3536,
11624,
281,
326,
1407,
18,
3536,
365,
18,
3256,
18,
11330,
1435,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3663,
12,
2890,
4672,
3536,
11624,
281,
326,
1407,
18,
3536,
365,
18,
3256,
18,
11330,
1435,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
if not target.startswith("http:") and target[0] != '/': | if not (":" in target[:10]) and target[0] != '/': | def link(text, target): if not target.startswith("http:") and target[0] != '/': target = defaults.checkmk_web_uri + "/" + target return "<a target=\"main\" class=link href=\"%s\">%s</a>" % (target, htmllib.attrencode(text)) | 6f6527ffd73bc59751c7ee2616194525a4c4383d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5589/6f6527ffd73bc59751c7ee2616194525a4c4383d/sidebar.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1692,
12,
955,
16,
1018,
4672,
1377,
309,
486,
7566,
2773,
316,
1018,
10531,
2163,
5717,
471,
1018,
63,
20,
65,
480,
2023,
30,
1018,
273,
3467,
18,
1893,
24816,
67,
4875,
67,
1650,
397... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1692,
12,
955,
16,
1018,
4672,
1377,
309,
486,
7566,
2773,
316,
1018,
10531,
2163,
5717,
471,
1018,
63,
20,
65,
480,
2023,
30,
1018,
273,
3467,
18,
1893,
24816,
67,
4875,
67,
1650,
397... |
return "\tSysFreeString(%s);\n" % self.arg.name | return "\tSysFreeString(%s); % (self.arg.name,) + \ ArgFormatterPythonCOM.GetBuildForInterfacePostCode(self) | def GetBuildForInterfacePostCode(self): return "\tSysFreeString(%s);\n" % self.arg.name | 4c27f40473b5b722f79480adc904ddb09a7a6377 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/677/4c27f40473b5b722f79480adc904ddb09a7a6377/makegwparse.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
968,
3116,
1290,
1358,
3349,
1085,
12,
2890,
4672,
327,
1548,
88,
12712,
9194,
780,
9275,
87,
20472,
82,
6,
738,
365,
18,
3175,
18,
529,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
968,
3116,
1290,
1358,
3349,
1085,
12,
2890,
4672,
327,
1548,
88,
12712,
9194,
780,
9275,
87,
20472,
82,
6,
738,
365,
18,
3175,
18,
529,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
self._canvas.after(10) | self._canvas.after(self._delay) | def _goto(self, x1, y1): x0, y0 = start = self._position self._position = map(float, (x1, y1)) if self._filling: self._path.append(self._position) if self._drawing: if self._tracing: dx = float(x1 - x0) dy = float(y1 - y0) distance = hypot(dx, dy) nhops = int(distance) item = self._canvas.create_line(x0, y0, x0, y0, width=self._width, capstyle="round", fill=self._color) try: for i in range(1, 1+nhops): x, y = x0 + dx*i/nhops, y0 + dy*i/nhops self._canvas.coords(item, x0, y0, x, y) self._draw_turtle((x,y)) self._canvas.update() self._canvas.after(10) # in case nhops==0 self._canvas.coords(item, x0, y0, x1, y1) self._canvas.itemconfigure(item, arrow="none") except Tkinter.TclError: # Probably the window was closed! return else: item = self._canvas.create_line(x0, y0, x1, y1, width=self._width, capstyle="round", fill=self._color) self._items.append(item) self._draw_turtle() | e3a25838db0ac392aa9e68379e167635f8e67a43 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/e3a25838db0ac392aa9e68379e167635f8e67a43/turtle.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
75,
6302,
12,
2890,
16,
619,
21,
16,
677,
21,
4672,
619,
20,
16,
677,
20,
273,
787,
273,
365,
6315,
3276,
365,
6315,
3276,
273,
852,
12,
5659,
16,
261,
92,
21,
16,
677,
21,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
75,
6302,
12,
2890,
16,
619,
21,
16,
677,
21,
4672,
619,
20,
16,
677,
20,
273,
787,
273,
365,
6315,
3276,
365,
6315,
3276,
273,
852,
12,
5659,
16,
261,
92,
21,
16,
677,
21,
... |
return | return True if not actions.has_key( item.baseid ): menu = findmenu('COOKING') if menu: menu.send(char, [item.serial]) return True | def onUse( char, item ): if not item.getoutchar() == char: char.socket.clilocmessage( 1042001 ) # That must be in your pack for you to use it. return True if not actions.has_key( item.baseid ): menu = findmenu('COOKING') if menu: menu.send(char, [item.serial]) return True # simply open the sack if item.baseid in ["1039", "1045"]: item.id += 0x1 item.baseid = 1046 item.update() return char.socket.attachtarget( "skills.cooking.%s" % actions[ item.baseid ], [item.serial] ) return True | 2560473745d010abf6a40661fdfbbbff87b1fdc2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/2560473745d010abf6a40661fdfbbbff87b1fdc2/cooking.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
3727,
12,
1149,
16,
761,
262,
30,
309,
486,
761,
18,
588,
659,
3001,
1435,
422,
1149,
30,
1149,
18,
7814,
18,
830,
330,
504,
2150,
12,
21856,
6976,
21,
262,
468,
12466,
1297,
50... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3727,
12,
1149,
16,
761,
262,
30,
309,
486,
761,
18,
588,
659,
3001,
1435,
422,
1149,
30,
1149,
18,
7814,
18,
830,
330,
504,
2150,
12,
21856,
6976,
21,
262,
468,
12466,
1297,
50... |
print "Alas! I die!" | def __del__(self): if hasattr(self, '_db'): self.close() print "Alas! I die!" | 1de7c8be15a8da187d4fe31519b2ca404d151dd9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10477/1de7c8be15a8da187d4fe31519b2ca404d151dd9/connections.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
3771,
972,
12,
2890,
4672,
309,
3859,
12,
2890,
16,
2070,
1966,
11,
4672,
365,
18,
4412,
1435,
225,
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,
1001,
3771,
972,
12,
2890,
4672,
309,
3859,
12,
2890,
16,
2070,
1966,
11,
4672,
365,
18,
4412,
1435,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... | |
wikipedia.output(u"Skipping link %s to an ignored page"%page2) | wikipedia.output(u"Skipping link %s to an ignored page" % page2.aslink()) | def workDone(self, counter): """This is called by a worker to tell us that the promised work was completed as far as possible. The only argument is an instance of a counter class, that has methods minus() and plus() to keep counts of the total work todo.""" # Loop over all the pages that should have been taken care of for pl in self.pending: # Mark the page as done self.done[pl] = pl.site() | 4d7ba3f854c114b045d9f577b22ebb0c3c17a151 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4404/4d7ba3f854c114b045d9f577b22ebb0c3c17a151/interwiki.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1440,
7387,
12,
2890,
16,
3895,
4672,
3536,
2503,
353,
2566,
635,
279,
4322,
358,
9276,
584,
716,
326,
3012,
5918,
1440,
1703,
5951,
487,
10247,
487,
3323,
18,
1021,
1338,
1237,
353,
392... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1440,
7387,
12,
2890,
16,
3895,
4672,
3536,
2503,
353,
2566,
635,
279,
4322,
358,
9276,
584,
716,
326,
3012,
5918,
1440,
1703,
5951,
487,
10247,
487,
3323,
18,
1021,
1338,
1237,
353,
392... |
def __init__(self, atoms, restart=None, logfile='-', maxstep=.2, | def __init__(self, atoms, restart='restart.pickle', logfile='-', maxstep=.2, | def __init__(self, atoms, restart=None, logfile='-', maxstep=.2, trajectory=None, c1=.23, c2=0.46, alpha=10., stpmax=50.): """Minimize a function using the BFGS algorithm. | 5202d2ea23df9b8b7532814f2fa9c37b0c580692 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5572/5202d2ea23df9b8b7532814f2fa9c37b0c580692/bfgslinesearch.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
9006,
16,
7870,
2218,
19164,
18,
20847,
2187,
15204,
2218,
17,
2187,
943,
4119,
33,
18,
22,
16,
27016,
33,
7036,
16,
276,
21,
33,
18,
4366,
16,
276,
22... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
9006,
16,
7870,
2218,
19164,
18,
20847,
2187,
15204,
2218,
17,
2187,
943,
4119,
33,
18,
22,
16,
27016,
33,
7036,
16,
276,
21,
33,
18,
4366,
16,
276,
22... |
p = subprocess.Popen(cmd, shell=True, stdout=logfile, \ stderr=subprocess.STDOUT) | p = subprocess.Popen(cmd, shell=True, stdout=logfile, stderr=subprocess.STDOUT) | def start(self, test): cmd = "/usr/bin/vmstat %d" % self.interval logfile = open(os.path.join(test.profdir, "vmstat"), 'w') p = subprocess.Popen(cmd, shell=True, stdout=logfile, \ stderr=subprocess.STDOUT) self.pid = p.pid | bf512cf47af95fdd929614e2a4415216353e0463 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12268/bf512cf47af95fdd929614e2a4415216353e0463/vmstat.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
787,
12,
2890,
16,
1842,
4672,
1797,
273,
2206,
13640,
19,
4757,
19,
3489,
5642,
738,
72,
6,
738,
365,
18,
6624,
15204,
273,
1696,
12,
538,
18,
803,
18,
5701,
12,
3813,
18,
16121,
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,
787,
12,
2890,
16,
1842,
4672,
1797,
273,
2206,
13640,
19,
4757,
19,
3489,
5642,
738,
72,
6,
738,
365,
18,
6624,
15204,
273,
1696,
12,
538,
18,
803,
18,
5701,
12,
3813,
18,
16121,
12... |
def __pp_dict(self, items, doublespace, depth, exclude, is_last): | def __pp_dict(self, dict, doublespace, depth, exclude, is_last): items = dict.items() items.sort() | def __pp_dict(self, items, doublespace, depth, exclude, is_last): line1 = (is_last and ' ') or '|' s = '' for item in items: line2 = ((item is items[-1]) and ' ') or '|' joiner = '\n %s %s ' % (line1, line2) if doublespace: s += '\n %s |' % line1 s += '\n %s +- ' % line1 valstr = self.__pp_val(item[1], doublespace, depth, exclude) s += joiner.join(('%s => %s' % (item[0], valstr)).split('\n')) return s | 72bfb5c1aa1e4c00e8752f4b7415c8e1c94c74e3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/72bfb5c1aa1e4c00e8752f4b7415c8e1c94c74e3/apidoc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
11858,
67,
1576,
12,
2890,
16,
2065,
16,
31446,
909,
16,
3598,
16,
4433,
16,
353,
67,
2722,
4672,
1516,
273,
2065,
18,
3319,
1435,
1516,
18,
3804,
1435,
980,
21,
273,
261,
291,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
11858,
67,
1576,
12,
2890,
16,
2065,
16,
31446,
909,
16,
3598,
16,
4433,
16,
353,
67,
2722,
4672,
1516,
273,
2065,
18,
3319,
1435,
1516,
18,
3804,
1435,
980,
21,
273,
261,
291,
... |
return self.db.nameList | return self.db.findByNames(nameList) | def findByNames(self, nameList): return self.db.nameList | 50d7f027d58d203665007207a2b15fdd532a1d83 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8747/50d7f027d58d203665007207a2b15fdd532a1d83/database.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6224,
1557,
12,
2890,
16,
508,
682,
4672,
327,
365,
18,
1966,
18,
529,
682,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6224,
1557,
12,
2890,
16,
508,
682,
4672,
327,
365,
18,
1966,
18,
529,
682,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
data_id = False | def process_liness(self, datas, prefix, current_module, model_name, fields_def, position=0): line = datas[position] row = {} translate = {} todo = [] warning = [] data_id = False data_res_id = False is_xml_id = False is_db_id = False ir_model_data_obj = self.pool.get('ir.model.data') # # Import normal fields # for i in range(len(fields)): if i >= len(line): raise Exception(_('Please check that all your lines have %d columns.') % (len(fields),)) if not line[i]: continue | efd0cb9412db0c0bcc806b9b089c26c097a70bff /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12853/efd0cb9412db0c0bcc806b9b089c26c097a70bff/orm.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
67,
80,
6336,
12,
2890,
16,
5386,
16,
1633,
16,
783,
67,
2978,
16,
938,
67,
529,
16,
1466,
67,
536,
16,
1754,
33,
20,
4672,
980,
273,
5386,
63,
3276,
65,
1027,
273,
2618,
420... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
67,
80,
6336,
12,
2890,
16,
5386,
16,
1633,
16,
783,
67,
2978,
16,
938,
67,
529,
16,
1466,
67,
536,
16,
1754,
33,
20,
4672,
980,
273,
5386,
63,
3276,
65,
1027,
273,
2618,
420... | |
def __init__(self, tag_name, api_key, api_secret, session_key): | def __init__(self, tag_name, api_key, api_secret, session_key=""): | def __init__(self, tag_name, api_key, api_secret, session_key): _Search.__init__(self, "tag", {"tag": tag_name}, api_key, api_secret, session_key) | 8d8063afe8067477accae5bef5e470a4a3cbfa5d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9926/8d8063afe8067477accae5bef5e470a4a3cbfa5d/pylast.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1047,
67,
529,
16,
1536,
67,
856,
16,
1536,
67,
5875,
16,
1339,
67,
856,
1546,
6,
4672,
225,
389,
2979,
16186,
2738,
972,
12,
2890,
16,
315,
2692,
3113... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1047,
67,
529,
16,
1536,
67,
856,
16,
1536,
67,
5875,
16,
1339,
67,
856,
1546,
6,
4672,
225,
389,
2979,
16186,
2738,
972,
12,
2890,
16,
315,
2692,
3113... |
except KeyError: | except IndexError: | def next_chain_id(suggest_chain_id): if suggest_chain_id != "": try: self.struct[suggest_chain_id] except KeyError: return suggest_chain_id for chain_id in "ABCDEFGHIJKLMNOPQRSTUVWXYZ": try: self.struct[chain_id] except KeyError: return chain_id | 9d8a841c203e73e58c0201cbce892f595442be7e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10674/9d8a841c203e73e58c0201cbce892f595442be7e/StructureBuilder.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1024,
67,
5639,
67,
350,
12,
87,
8679,
67,
5639,
67,
350,
4672,
309,
19816,
67,
5639,
67,
350,
480,
1408,
30,
775,
30,
365,
18,
1697,
63,
87,
8679,
67,
5639,
67,
350,
65,
1335,
101... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1024,
67,
5639,
67,
350,
12,
87,
8679,
67,
5639,
67,
350,
4672,
309,
19816,
67,
5639,
67,
350,
480,
1408,
30,
775,
30,
365,
18,
1697,
63,
87,
8679,
67,
5639,
67,
350,
65,
1335,
101... |
for x in range(0,10): for y in range(0,5): grid[x][y] = Square(x,y,True,True) for x in range(10,20): for y in range(15,20): grid[x][y] = Square(x,y,True,False) | def main(): """this function is called when the program starts. it initializes everything it needs, then runs in a loop until the function returns.""" | 4a823c22c1dbbd46877f561e7b1537702b8ee136 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4962/4a823c22c1dbbd46877f561e7b1537702b8ee136/main.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
3536,
2211,
445,
353,
2566,
1347,
326,
5402,
2542,
18,
518,
11643,
7756,
518,
4260,
16,
1508,
7597,
316,
279,
2798,
3180,
326,
445,
1135,
12123,
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,
0,
0,
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,
2774,
13332,
3536,
2211,
445,
353,
2566,
1347,
326,
5402,
2542,
18,
518,
11643,
7756,
518,
4260,
16,
1508,
7597,
316,
279,
2798,
3180,
326,
445,
1135,
12123,
2,
-100,
-100,
-100,
-100,
-... | |
if mem_layer.GetFeatureCount() != 13: gdaltest.post_reason( 'GetFeatureCount() returned %d instead of 11' % mem_layer.GetFeatureCount() ) | expected_feature_number = 13 if mem_layer.GetFeatureCount() != expected_feature_number: gdaltest.post_reason( 'GetFeatureCount() returned %d instead of %d' % (mem_layer.GetFeatureCount(), expected_feature_number) ) | def polygonize_1(): try: x = gdal.Polygonize gdaltest.have_ng = 1 except: gdaltest.have_ng = 0 return 'skip' src_ds = gdal.Open('data/polygonize_in.grd') src_band = src_ds.GetRasterBand(1) # Create a memory OGR datasource to put results in. mem_drv = ogr.GetDriverByName( 'Memory' ) mem_ds = mem_drv.CreateDataSource( 'out' ) mem_layer = mem_ds.CreateLayer( 'poly', None, ogr.wkbPolygon ) fd = ogr.FieldDefn( 'DN', ogr.OFTInteger ) mem_layer.CreateField( fd ) # run the algorithm. result = gdal.Polygonize( src_band, src_band.GetMaskBand(), mem_layer, 0 ) # Confirm we get the set of expected features in the output layer. if mem_layer.GetFeatureCount() != 13: gdaltest.post_reason( 'GetFeatureCount() returned %d instead of 11' % mem_layer.GetFeatureCount() ) return 'fail' expect = [ 107, 123, 115, 115, 140, 148, 123, 140, 156, 100, 101, 102, 103] tr = ogrtest.check_features_against_list( mem_layer, 'DN', expect ) # check at least one geometry. if tr: mem_layer.SetAttributeFilter( 'dn = 156' ) feat_read = mem_layer.GetNextFeature() if ogrtest.check_feature_geometry( feat_read, 'POLYGON ((440720 3751200,440720 3751020,440900 3751020,440900 3751200,440720 3751200),(440780 3751140,440840 3751140,440840 3751080,440780 3751080,440780 3751140))' ) != 0: tr = 0 feat_read.Destroy() if tr: return 'success' else: return 'fail' | c1869ef10f655bdbdc30181fad40cad235bd4e6e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10290/c1869ef10f655bdbdc30181fad40cad235bd4e6e/polygonize.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7154,
554,
67,
21,
13332,
225,
775,
30,
619,
273,
15551,
287,
18,
11787,
554,
15551,
2390,
395,
18,
21516,
67,
3368,
273,
404,
1335,
30,
15551,
2390,
395,
18,
21516,
67,
3368,
273,
374... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7154,
554,
67,
21,
13332,
225,
775,
30,
619,
273,
15551,
287,
18,
11787,
554,
15551,
2390,
395,
18,
21516,
67,
3368,
273,
404,
1335,
30,
15551,
2390,
395,
18,
21516,
67,
3368,
273,
374... |
[compile.In(rng_R, value=numpy.random.RandomState(55), update=post_r, mutable=True)], | [compile.In(rng_R, value=numpy.random.RandomState(utt.fetch_seed()), update=post_r, mutable=True)], | def test_permutation_helper(self): """Test that raw_random.permutation_helper generates the same results as numpy, and that the 'ndim_added' keyword behaves correctly.""" # permutation_helper needs "ndim_added=1", because its output # is one dimension more than its "shape" argument (and there's # no way to determine that automatically). # Check the working case, over two calls to see if the random # state is correctly updated. rf = RandomFunction(permutation_helper, tensor.imatrix, 8, ndim_added=1) rng_R = random_state_type() post_r, out = rf(rng_R, (7,), 8) | d5701303093e5943cc4df89bc18c7fecc19b0be2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12438/d5701303093e5943cc4df89bc18c7fecc19b0be2/test_raw_random.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
12160,
9245,
67,
4759,
12,
2890,
4672,
3536,
4709,
716,
1831,
67,
9188,
18,
12160,
9245,
67,
4759,
6026,
326,
1967,
1686,
487,
3972,
16,
471,
716,
326,
296,
82,
3509,
67,
966... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
12160,
9245,
67,
4759,
12,
2890,
4672,
3536,
4709,
716,
1831,
67,
9188,
18,
12160,
9245,
67,
4759,
6026,
326,
1967,
1686,
487,
3972,
16,
471,
716,
326,
296,
82,
3509,
67,
966... |
running = False | break | def DefineSign(welcomesite, SignPage): Page = wikipedia.Page(welcomesite, SignPage) SignText = Page.get() reg = "\* (.*?)\n" list_sign = re.findall(reg, SignText) return list_sign | bf50a20b7e53b37ac1a5a7ffeb2895c56bcf1f38 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4404/bf50a20b7e53b37ac1a5a7ffeb2895c56bcf1f38/welcome.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13184,
2766,
12,
91,
292,
10127,
1137,
16,
4383,
1964,
4672,
3460,
273,
21137,
18,
1964,
12,
91,
292,
10127,
1137,
16,
4383,
1964,
13,
4383,
1528,
273,
3460,
18,
588,
1435,
960,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13184,
2766,
12,
91,
292,
10127,
1137,
16,
4383,
1964,
4672,
3460,
273,
21137,
18,
1964,
12,
91,
292,
10127,
1137,
16,
4383,
1964,
13,
4383,
1528,
273,
3460,
18,
588,
1435,
960,
273,
1... |
if os.path.isdir (name): | if os.path.isdir (name) or name == '': | def mkpath (name, mode=0777, verbose=0, dry_run=0): """Create a directory and any missing ancestor directories. If the directory already exists, return silently. Raise DistutilsFileError if unable to create some directory along the way (eg. some sub-path exists, but is a file rather than a directory). If 'verbose' is true, print a one-line summary of each mkdir to stdout.""" global PATH_CREATED # XXX what's the better way to handle verbosity? print as we create # each directory in the path (the current behaviour), or only announce # the creation of the whole path? (quite easy to do the latter since # we're not using a recursive algorithm) name = os.path.normpath (name) if os.path.isdir (name): return if PATH_CREATED.get (name): return (head, tail) = os.path.split (name) tails = [tail] # stack of lone dirs to create while head and tail and not os.path.isdir (head): #print "splitting '%s': " % head, (head, tail) = os.path.split (head) #print "to ('%s','%s')" % (head, tail) tails.insert (0, tail) # push next higher dir onto stack #print "stack of tails:", tails # now 'head' contains the deepest directory that already exists # (that is, the child of 'head' in 'name' is the highest directory # that does *not* exist) for d in tails: #print "head = %s, d = %s: " % (head, d), head = os.path.join (head, d) if PATH_CREATED.get (head): continue if verbose: print "creating", head if not dry_run: try: os.mkdir (head) except os.error, (errno, errstr): raise DistutilsFileError, "%s: %s" % (head, errstr) PATH_CREATED[head] = 1 | 96182d7b68cfb2226af0c0e701b9d35d1aa59603 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/96182d7b68cfb2226af0c0e701b9d35d1aa59603/util.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5028,
803,
261,
529,
16,
1965,
33,
20,
14509,
16,
3988,
33,
20,
16,
10299,
67,
2681,
33,
20,
4672,
3536,
1684,
279,
1867,
471,
1281,
3315,
9731,
6402,
18,
225,
971,
326,
1867,
1818,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5028,
803,
261,
529,
16,
1965,
33,
20,
14509,
16,
3988,
33,
20,
16,
10299,
67,
2681,
33,
20,
4672,
3536,
1684,
279,
1867,
471,
1281,
3315,
9731,
6402,
18,
225,
971,
326,
1867,
1818,
... |
test = self.Test('.test_'+target,target2+suffix) | test = self.Test('.test_'+target,target2) | def Result(self,target,source,flow=None,suffix=vpsuffix,**kw): if not flow: # two arguments flow = source source = target target2 = os.path.join(self.resdir,target) plot = apply(self.Plot,(target2,source,flow),kw) target2 = target2 + suffix self.Default (plot), self.view.append(self.View(target + '.view',plot)) self.prnt.append(self.Print(target + '.print',plot)) locked = os.path.join(self.figdir,target+suffix) self.InstallAs(locked,target2) lock2 = self.Command(target2+'@',locked,symlink) self.Alias(target + '.lock',lock2) self.lock.append(lock2) self.Command(target + '.flip',target2+suffix, '%s $SOURCE %s' % (xtpen,locked)) test = self.Test('.test_'+target,target2+suffix) self.test.append(test) self.Alias(target + '.test',test) return plot | d6dc2dd024d6841662380c1fb7734e02d0b06e9d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3143/d6dc2dd024d6841662380c1fb7734e02d0b06e9d/rsfproj.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3438,
12,
2890,
16,
3299,
16,
3168,
16,
2426,
33,
7036,
16,
8477,
33,
90,
1121,
2609,
16,
636,
9987,
4672,
309,
486,
4693,
30,
468,
2795,
1775,
4693,
273,
1084,
1084,
273,
1018,
1018,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3438,
12,
2890,
16,
3299,
16,
3168,
16,
2426,
33,
7036,
16,
8477,
33,
90,
1121,
2609,
16,
636,
9987,
4672,
309,
486,
4693,
30,
468,
2795,
1775,
4693,
273,
1084,
1084,
273,
1018,
1018,
... |
[(0 : 1 : 0), (4 : 1 : 1), (1 : 0 : 1), (4 : 4 : 1)] | [(0 : 1 : 0), (1 : 0 : 1), (4 : 1 : 1), (4 : 4 : 1)] | def points(self): r""" All the points on this elliptic curve. The list of points is cached so subsequent calls are free. | c3f20f06eecd6a15c5eb91262ba753b725cf98c7 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/c3f20f06eecd6a15c5eb91262ba753b725cf98c7/ell_finite_field.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3143,
12,
2890,
4672,
436,
8395,
4826,
326,
3143,
603,
333,
415,
549,
21507,
8882,
18,
225,
1021,
666,
434,
3143,
353,
3472,
1427,
10815,
4097,
854,
4843,
18,
2,
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,
3143,
12,
2890,
4672,
436,
8395,
4826,
326,
3143,
603,
333,
415,
549,
21507,
8882,
18,
225,
1021,
666,
434,
3143,
353,
3472,
1427,
10815,
4097,
854,
4843,
18,
2,
-100,
-100,
-100,
-100,
... |
<ul> | <ul class="nomargin-top"> | def write_standard_fields(self, out, doc): """ Write HTML code containing descriptions of any standard markup fields that are defined by the given L{APIDoc} object (such as C{@author} and C{@todo} fields). | ead96d86090e18fdeec64a06319b925d20efd2b2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11420/ead96d86090e18fdeec64a06319b925d20efd2b2/html.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
67,
10005,
67,
2821,
12,
2890,
16,
596,
16,
997,
4672,
3536,
2598,
3982,
981,
4191,
15550,
434,
1281,
4529,
9813,
1466,
716,
854,
2553,
635,
326,
864,
511,
95,
2203,
734,
504,
97... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
67,
10005,
67,
2821,
12,
2890,
16,
596,
16,
997,
4672,
3536,
2598,
3982,
981,
4191,
15550,
434,
1281,
4529,
9813,
1466,
716,
854,
2553,
635,
326,
864,
511,
95,
2203,
734,
504,
97... |
if not isinstance(a_self.content, LLAbstractContainer): return None | def handle_highlevel_operation(self, op, ll_func, *args_a): # parse the oopspec and fill in the arguments operation_name, args = ll_func.oopspec.split('(', 1) assert args.endswith(')') args = args[:-1] + ',' # trailing comma to force tuple syntax argnames = ll_func.func_code.co_varnames[:len(args_a)] d = dict(zip(argnames, args_a)) argtuple = eval(args, d) args_a = [] for a in argtuple: if not isinstance(a, LLAbstractValue): a = LLAbstractValue(const(a)) args_a.append(a) # end of rather XXX'edly hackish parsing | 3279785af29c9ed8bea5c3bdcca67a8f397bbfb6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/3279785af29c9ed8bea5c3bdcca67a8f397bbfb6/llabstractinterp.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
67,
8766,
2815,
67,
7624,
12,
2890,
16,
1061,
16,
6579,
67,
644,
16,
380,
1968,
67,
69,
4672,
468,
1109,
326,
320,
556,
2793,
471,
3636,
316,
326,
1775,
1674,
67,
529,
16,
833,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
67,
8766,
2815,
67,
7624,
12,
2890,
16,
1061,
16,
6579,
67,
644,
16,
380,
1968,
67,
69,
4672,
468,
1109,
326,
320,
556,
2793,
471,
3636,
316,
326,
1775,
1674,
67,
529,
16,
833,... | |
'''Bind key data''' return self.build_hk(entry, metadata) | '''Bind data''' if entry.get('name').endswith('ssh_known_hosts'): return self.build_skn(entry, metadata) else: return self.build_hk(entry, metadata) | def HandleEntry(self, entry, metadata): '''Bind key data''' return self.build_hk(entry, metadata) | 1e598c1483530efd904cbf9c5f1c9b4e98052834 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11867/1e598c1483530efd904cbf9c5f1c9b4e98052834/SSHbase.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5004,
1622,
12,
2890,
16,
1241,
16,
1982,
4672,
9163,
3357,
498,
501,
26418,
327,
365,
18,
3510,
67,
76,
79,
12,
4099,
16,
1982,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5004,
1622,
12,
2890,
16,
1241,
16,
1982,
4672,
9163,
3357,
498,
501,
26418,
327,
365,
18,
3510,
67,
76,
79,
12,
4099,
16,
1982,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
except RuntimeError: | except (RuntimeError, AssertionError): | def __init__(self, source, frame=None, start=0, stop=None, step=1, zero=False): if isinstance(source, str): self.opened = True self.source = CInOutput(source, action=INPUT, append=False, zero=zero) try: self.netcdf_file = netcdf_file(source) except RuntimeError: self.netcdf_file = None else: self.opened = False self.source = source self.netcdf_file = None | 4f8362ede9af0bac1073cd7f517e39413f3781c9 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8914/4f8362ede9af0bac1073cd7f517e39413f3781c9/xyz_netcdf.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1084,
16,
2623,
33,
7036,
16,
787,
33,
20,
16,
2132,
33,
7036,
16,
2235,
33,
21,
16,
3634,
33,
8381,
4672,
309,
1549,
12,
3168,
16,
609,
4672,
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,
1001,
2738,
972,
12,
2890,
16,
1084,
16,
2623,
33,
7036,
16,
787,
33,
20,
16,
2132,
33,
7036,
16,
2235,
33,
21,
16,
3634,
33,
8381,
4672,
309,
1549,
12,
3168,
16,
609,
4672,
365,
1... |
if 'single' in self.server_types: | if 'single' in server_types: | def run_server(self, application, options): server_type = options.server_type | 0be839568d456e96389fafa94bc53826e172b444 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/888/0be839568d456e96389fafa94bc53826e172b444/flup_frontend.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
67,
3567,
12,
2890,
16,
2521,
16,
702,
4672,
1438,
67,
723,
273,
702,
18,
3567,
67,
723,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
67,
3567,
12,
2890,
16,
2521,
16,
702,
4672,
1438,
67,
723,
273,
702,
18,
3567,
67,
723,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
recipe.schedule = self.interval.value() if recipe.schedule < 0.1: recipe.schedule = 1/24. | def do_schedule(self, *args): recipe = self.recipes.currentIndex() if not recipe.isValid(): return recipe = self._model.data(recipe, Qt.UserRole) recipes = load_recipes() if self.schedule.checkState() == Qt.Checked: if recipe in recipes: recipe = recipes[recipes.index(recipe)] else: recipe.last_downloaded = datetime.fromordinal(1) recipes.append(recipe) recipe.schedule = self.interval.value() if recipe.schedule < 0.1: recipe.schedule = 1/24. if recipe.needs_subscription and not config['recipe_account_info_%s'%recipe.id]: error_dialog(self, _('Must set account information'), _('This recipe requires a username and password')).exec_() self.schedule.setCheckState(Qt.Unchecked) return else: if recipe in recipes: recipes.remove(recipe) save_recipes(recipes) self.emit(SIGNAL('new_schedule(PyQt_PyObject)'), recipes) | 0bb41a00a5980da0882a88d2286bdcc7eee40e69 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9125/0bb41a00a5980da0882a88d2286bdcc7eee40e69/scheduler.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
67,
10676,
12,
2890,
16,
380,
1968,
4672,
16100,
273,
365,
18,
266,
3449,
281,
18,
2972,
1016,
1435,
309,
486,
16100,
18,
26810,
13332,
327,
16100,
273,
365,
6315,
2284,
18,
892,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
67,
10676,
12,
2890,
16,
380,
1968,
4672,
16100,
273,
365,
18,
266,
3449,
281,
18,
2972,
1016,
1435,
309,
486,
16100,
18,
26810,
13332,
327,
16100,
273,
365,
6315,
2284,
18,
892,
... | |
prefFile = os.path.join(os.path.expanduser("~"), "Library", "Application Support", "Gitso") if os.path.exists(prefFile) != True: os.makedirs(prefFile, 0700) prefFile = os.path.join(prefFile, "hosts") | prefFile = os.path.join(os.path.expanduser("~"), "Library", "Application Support", "Gitso") if os.path.exists(prefFile) != True: os.makedirs(prefFile, 0700) prefFile = os.path.join(prefFile, "hosts") | def CloseAbout(self, event): self.Close() | 7c208c280de616131da047841b9467ec2d6c656e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3659/7c208c280de616131da047841b9467ec2d6c656e/Gitso.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3527,
24813,
12,
2890,
16,
871,
4672,
365,
18,
4605,
1435,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
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,
1652,
3527,
24813,
12,
2890,
16,
871,
4672,
365,
18,
4605,
1435,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
forBlock = builder.BLOCK__build(tokenizer, compilerContext.blockId++) | forBlock = builder.BLOCK__build(tokenizer, compilerContext.blockId) compilerContext.blockId += 1 | def Statement(tokenizer, compilerContext): """Parses a Statement.""" tokenType = tokenizer.get(True) builder = compilerContext.builder # Cases for statements ending in a right curly return early, avoiding the # common semicolon insertion magic after this switch. if tokenType == FUNCTION: # DECLARED_FORM extends funDecls of compilerContext, STATEMENT_FORM doesn'tokenizer. if compilerContext.stmtStack.length > 1: kind = STATEMENT_FORM else: kind = DECLARED_FORM return FunctionDefinition(tokenizer, compilerContext, True, kind) elif tokenType == LEFT_CURLY: node = Statements(tokenizer, compilerContext) tokenizer.mustMatch(RIGHT_CURLY) return node elif tokenType == IF: node = builder.IF__build(tokenizer) builder.IF__setCondition(node, ParenExpression(tokenizer, compilerContext)) compilerContext.stmtStack.push(node) builder.IF__setThenPart(node, Statement(tokenizer, compilerContext)) if tokenizer.match(ELSE): builder.IF__setElsePart(node, Statement(tokenizer, compilerContext)) compilerContext.stmtStack.pop() builder.IF__finish(node) return node elif tokenType == SWITCH: # This allows CASEs after a DEFAULT, which is in the standard. node = builder.SWITCH__build(tokenizer) builder.SWITCH__setDiscriminant(node, ParenExpression(tokenizer, compilerContext)) compilerContext.stmtStack.push(node) tokenizer.mustMatch(LEFT_CURLY) tokenType = tokenizer.get() while tokenType != RIGHT_CURLY: if tokenType == DEFAULT: if node.defaultIndex >= 0: raise SyntaxError("More than one switch default", tokenizer) childNode = builder.DEFAULT__build(tokenizer) builder.SWITCH__setDefaultIndex(node, node.cases.length) tokenizer.mustMatch(COLON) builder.DEFAULT__initializeStatements(childNode, tokenizer) while ((tokenType=tokenizer.peek(True)) != CASE and tokenType != DEFAULT and tokenType != RIGHT_CURLY) builder.DEFAULT__addStatement(childNode, Statement(tokenizer, compilerContext)) builder.DEFAULT__finish(childNode) break elif tokenType == CASE: childNode = builder.CASE__build(tokenizer) builder.CASE__setLabel(childNode, Expression(tokenizer, compilerContext, COLON)) tokenizer.mustMatch(COLON) builder.CASE__initializeStatements(childNode, tokenizer) while ((tokenType=tokenizer.peek(True)) != CASE and tokenType != DEFAULT and tokenType != RIGHT_CURLY) builder.CASE__addStatement(childNode, Statement(tokenizer, compilerContext)) builder.CASE__finish(childNode) break else: raise SyntaxError("Invalid switch case", tokenizer) builder.SWITCH__addCase(node, childNode) tokenType = tokenizer.get() compilerContext.stmtStack.pop() builder.SWITCH__finish(node) return node elif tokenType == FOR: node = builder.FOR__build(tokenizer) if tokenizer.match(IDENTIFIER) and tokenizer.token.value == "each": builder.FOR__rebuildForEach(node) tokenizer.mustMatch(LEFT_PAREN) tokenType = tokenizer.peek() if tokenType != SEMICOLON: compilerContext.inForLoopInit = True if tokenType == VAR or tokenType == CONST: tokenizer.get() childNode = Variables(tokenizer, compilerContext) elif tokenType == LET: tokenizer.get() if tokenizer.peek() == LEFT_PAREN: childNode = LetBlock(tokenizer, compilerContext, False) else: # Let in for head, we need to add an implicit block # around the rest of the for. forBlock = builder.BLOCK__build(tokenizer, compilerContext.blockId++) compilerContext.stmtStack.push(forBlock) childNode = Variables(tokenizer, compilerContext, forBlock) else: childNode = Expression(tokenizer, compilerContext) compilerContext.inForLoopInit = False if childNode and tokenizer.match(IN): builder.FOR__rebuildForIn(node) builder.FOR__setObject(node, Expression(tokenizer, compilerContext), forBlock) if childNode.type == VAR or childNode.type == LET: if len(childNode) != 1: raise SyntaxError("Invalid for..in left-hand side", tokenizer) builder.FOR__setIterator(node, childNode[0], childNode, forBlock) else: builder.FOR__setIterator(node, childNode, null, forBlock) else: builder.FOR__setSetup(node, childNode) tokenizer.mustMatch(SEMICOLON) if node.isEach: raise SyntaxError("Invalid for each..in loop") builder.FOR__setCondition(node, (tokenizer.peek() == SEMICOLON) ? null : Expression(tokenizer, compilerContext)) tokenizer.mustMatch(SEMICOLON) builder.FOR__setUpdate(node, (tokenizer.peek() == RIGHT_PAREN) ? null : Expression(tokenizer, compilerContext)) tokenizer.mustMatch(RIGHT_PAREN) builder.FOR__setBody(node, nest(tokenizer, compilerContext, node, Statement)) if forBlock: builder.BLOCK__finish(forBlock) compilerContext.stmtStack.pop() builder.FOR__finish(node) return node elif tokenType == WHILE: node = builder.WHILE__build(tokenizer) builder.WHILE__setCondition(node, ParenExpression(tokenizer, compilerContext)) builder.WHILE__setBody(node, nest(tokenizer, compilerContext, node, Statement)) builder.WHILE__finish(node) return node elif tokenType == DO: node = builder.DO__build(tokenizer) builder.DO__setBody(node, nest(tokenizer, compilerContext, node, Statement, WHILE)) builder.DO__setCondition(node, ParenExpression(tokenizer, compilerContext)) builder.DO__finish(node) if not compilerContext.ecmaStrictMode: # <script language="JavaScript"> (without version hints) may need # automatic semicolon insertion without a newline after do-while. # See http://bugzilla.mozilla.org/show_bug.cgi?id=238945. tokenizer.match(SEMICOLON) return node # NO RETURN elif tokenType == BREAK or tokenType == CONTINUE: if tokenType == BREAK: node = builder.BREAK__build(tokenizer) else: node = builder.CONTINUE__build(tokenizer) if tokenizer.peekOnSameLine() == IDENTIFIER: tokenizer.get() if tokenType == BREAK: builder.BREAK__setLabel(node, tokenizer.token.value) else: builder.CONTINUE__setLabel(node, tokenizer.token.value) ss = compilerContext.stmtStack i = ss.length label = node.label if label: while True: i -= 1 if i < 0: raise SyntaxError("Label not found", tokenizer) if ss[i].label == label: break # # Both break and continue to label need to be handled specially # within a labeled loop, so that they target that loop. If not in # a loop, then break targets its labeled statement. Labels can be # nested so we skip all labels immediately enclosing the nearest # non-label statement. # while i < ss.length - 1 and ss[i+1].type == LABEL: i++ if i < ss.length - 1 and ss[i+1].isLoop: i++ elif tokenType == CONTINUE: raise SyntaxError("Invalid continue", tokenizer) else: while True: i -= 1 if i < 0: raise SyntaxError("Invalid " + ((tokenType == BREAK) ? "break" : "continue")) if ss[i].isLoop or (tokenType == BREAK and ss[i].type == SWITCH): break if tokenType == BREAK: builder.BREAK__setTarget(node, ss[i]) builder.BREAK__finish(node) else: builder.CONTINUE__setTarget(node, ss[i]) builder.CONTINUE__finish(node) # NO RETURN elif tokenType == TRY: node = builder.TRY__build(tokenizer) builder.TRY__setTryBlock(node, Block(tokenizer, compilerContext)) while tokenizer.match(CATCH): childNode = builder.CATCH__build(tokenizer) tokenizer.mustMatch(LEFT_PAREN) nextTokenType = tokenizer.get() if nextTokenType == LEFT_BRACKET or nextTokenType == LEFT_CURLY: # Destructured catch identifiers. tokenizer.unget() builder.CATCH__setVarName(childNode, DestructuringExpression(tokenizer, compilerContext, True)) elif nextTokenType == IDENTIFIER: builder.CATCH__setVarName(childNode, tokenizer.token.value) else: raise SyntaxError("Missing identifier in catch", tokenizer) if tokenizer.match(IF): if compilerContext.ecma3OnlyMode: raise SyntaxError("Illegal catch guard", tokenizer) if node.catchClauses.length and not node.catchClauses.top().guard: raise SyntaxError("Guarded catch after unguarded", tokenizer) builder.CATCH__setGuard(childNode, Expression(tokenizer, compilerContext)) else: builder.CATCH__setGuard(childNode, null) tokenizer.mustMatch(RIGHT_PAREN) builder.CATCH__setBlock(childNode, Block(tokenizer, compilerContext)) builder.CATCH__finish(childNode) builder.TRY__addCatch(node, childNode) builder.TRY__finishCatches(node) if tokenizer.match(FINALLY): builder.TRY__setFinallyBlock(node, Block(tokenizer, compilerContext)) if not node.catchClauses.length and not node.finallyBlock: raise SyntaxError("Invalid try statement", tokenizer) builder.TRY__finish(node) return node elif tokenType == CATCH or tokenType == FINALLY: raise SyntaxError(tokens[tokenType] + " without preceding try") elif tokenType == THROW: node = builder.THROW__build(tokenizer) builder.THROW__setException(node, Expression(tokenizer, compilerContext)) builder.THROW__finish(node) # NO RETURN elif tokenType == RETURN: node = returnOrYield(tokenizer, compilerContext) # NO RETURN elif tokenType == WITH: node = builder.WITH__build(tokenizer) builder.WITH__setObject(node, ParenExpression(tokenizer, compilerContext)) builder.WITH__setBody(node, nest(tokenizer, compilerContext, node, Statement)) builder.WITH__finish(node) return node elif tokenType == VAR or tokenType == CONST: node = Variables(tokenizer, compilerContext) # NO RETURN elif tokenType == LET: if tokenizer.peek() == LEFT_PAREN: node = LetBlock(tokenizer, compilerContext, True) else node = Variables(tokenizer, compilerContext) # NO RETURN elif tokenType == DEBUGGER: node = builder.DEBUGGER__build(tokenizer) # NO RETURN elif tokenType == NEWLINE or tokenType == SEMICOLON: node = builder.SEMICOLON__build(tokenizer) builder.SEMICOLON__setExpression(node, null) builder.SEMICOLON__finish(tokenizer) return node else: if tokenType == IDENTIFIER: tokenType = tokenizer.peek() # Labeled statement. if tokenType == COLON: label = tokenizer.token.value ss = compilerContext.stmtStack for (i = ss.length-1; i >= 0; --i) { if (ss[i].label == label) raise SyntaxError("Duplicate label") } tokenizer.get() node = builder.LABEL__build(tokenizer) builder.LABEL__setLabel(node, label) builder.LABEL__setStatement(node, nest(tokenizer, compilerContext, node, Statement)) builder.LABEL__finish(node) return node # Expression statement. # We unget the current token to parse the expression as a whole. node = builder.SEMICOLON__build(tokenizer) tokenizer.unget() builder.SEMICOLON__setExpression(node, Expression(tokenizer, compilerContext)) node.end = node.expression.end builder.SEMICOLON__finish(node) # NO RETURN MagicalSemicolon(tokenizer) return node | e84674e67dd665fd11d61644e7a7afffaad25771 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12949/e84674e67dd665fd11d61644e7a7afffaad25771/Parser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8056,
12,
2316,
1824,
16,
5274,
1042,
4672,
3536,
6656,
279,
8056,
12123,
225,
22302,
273,
10123,
18,
588,
12,
5510,
13,
2089,
273,
5274,
1042,
18,
9574,
225,
468,
385,
3304,
364,
6317,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8056,
12,
2316,
1824,
16,
5274,
1042,
4672,
3536,
6656,
279,
8056,
12123,
225,
22302,
273,
10123,
18,
588,
12,
5510,
13,
2089,
273,
5274,
1042,
18,
9574,
225,
468,
385,
3304,
364,
6317,
... |
[y is even, y > 0] | [y > 0, y is even] | def forget(*args): """ Forget the given assumption, or call with no arguments to forget all assumptions. Here an assumption is some sort of symbolic constraint. INPUT: - ``*args`` - assumptions (default: forget all assumptions) EXAMPLES: We define and forget multiple assumptions:: sage: var('x,y,z') (x, y, z) sage: assume(x>0, y>0, z == 1, y>0) sage: list(sorted(assumptions(), lambda x,y:cmp(str(x),str(y)))) [x > 0, y > 0, z == 1] sage: forget(x>0, z==1) sage: assumptions() [y > 0] sage: assume(y, 'even') sage: assumptions() [y is even, y > 0] sage: cos(y*pi).simplify() 1 sage: forget() sage: cos(y*pi).simplify() cos(pi*y) sage: assumptions() [] """ if len(args) == 0: _forget_all() return for x in preprocess_assumptions(args): if isinstance(x, (tuple, list)): assume(*x) else: try: x.forget() except KeyError: raise TypeError, "forget not defined for objects of type '%s'"%type(x) | 59c6dc1cd198ba76045cc6f64d8e4472bb741930 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/59c6dc1cd198ba76045cc6f64d8e4472bb741930/assumptions.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13776,
30857,
1968,
4672,
3536,
2457,
588,
326,
864,
24743,
16,
578,
745,
598,
1158,
1775,
358,
13776,
777,
6287,
573,
18,
225,
13743,
392,
24743,
353,
2690,
1524,
434,
16754,
4954,
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,
13776,
30857,
1968,
4672,
3536,
2457,
588,
326,
864,
24743,
16,
578,
745,
598,
1158,
1775,
358,
13776,
777,
6287,
573,
18,
225,
13743,
392,
24743,
353,
2690,
1524,
434,
16754,
4954,
18,
... |
if not isinstance(right, DivisorGroup): | if not isinstance(right, DivisorGroup_generic): | def __cmp__(self, right): if not isinstance(right, DivisorGroup): return -1 return cmp(self.__scheme, right.__scheme) | 16abbe5dda43ae7d1757a14e70aa04b1cf5d92bb /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/16abbe5dda43ae7d1757a14e70aa04b1cf5d92bb/divisor_group.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
9625,
972,
12,
2890,
16,
2145,
4672,
309,
486,
1549,
12,
4083,
16,
21411,
12385,
1114,
67,
13540,
4672,
327,
300,
21,
327,
9411,
12,
2890,
16186,
9068,
16,
2145,
16186,
9068,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
9625,
972,
12,
2890,
16,
2145,
4672,
309,
486,
1549,
12,
4083,
16,
21411,
12385,
1114,
67,
13540,
4672,
327,
300,
21,
327,
9411,
12,
2890,
16186,
9068,
16,
2145,
16186,
9068,
13,
... |
sl0 = [slice(None)]*nd sl1 = [slice(None)]*nd sl0[axis] = slice(start,stop,step) sl1[axis] = slice(start+1,stop+1,step) | sl0 = tupleset(all, axis, slice(start, stop, step)) sl1 = tupleset(all, axis, slice(start+1, stop+1, step)) | def _basic_simps(y,start,stop,x,dx,axis): nd = len(y.shape) slice0 = [slice(None)]*nd slice1 = [slice(None)]*nd slice2 = [slice(None)]*nd if start is None: start = 0 step = 2 slice0[axis] = slice(start,stop,step) slice1[axis] = slice(start+1,stop+1,step) slice2[axis] = slice(start+2,stop+2,step) if x is None: # Even spaced Simpson's rule. result = add.reduce(dx/3.0* (y[slice0]+4*y[slice1]+y[slice2]), axis) else: # Account for possibly different spacings. # Simpson's rule changes a bit. h = diff(x,axis=axis) sl0 = [slice(None)]*nd sl1 = [slice(None)]*nd sl0[axis] = slice(start,stop,step) sl1[axis] = slice(start+1,stop+1,step) h0 = h[sl0] h1 = h[sl1] hsum = h0 + h1 hprod = h0 * h1 h0divh1 = h0 / h1 result = add.reduce(hsum/6.0*(y[slice0]*(2-1.0/h0divh1) + \ y[slice1]*hsum*hsum/hprod + \ y[slice2]*(2-h0divh1)),axis) return result | 704696cd1cef533b4e608563919a4d4ce035a41b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/704696cd1cef533b4e608563919a4d4ce035a41b/quadrature.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
13240,
67,
9812,
1121,
12,
93,
16,
1937,
16,
5681,
16,
92,
16,
13437,
16,
4890,
4672,
5346,
273,
562,
12,
93,
18,
4867,
13,
2788,
20,
273,
306,
6665,
12,
7036,
13,
5772,
4880,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
13240,
67,
9812,
1121,
12,
93,
16,
1937,
16,
5681,
16,
92,
16,
13437,
16,
4890,
4672,
5346,
273,
562,
12,
93,
18,
4867,
13,
2788,
20,
273,
306,
6665,
12,
7036,
13,
5772,
4880,
... |
self._compression = compression or UNCOMPRESSED | self._compression = compression or UNCOMPRESSED | def __init__(self, compression=PALMDOC, imagemax=None, prefer_author_sort=False): | d05c344b6e0d2bc137d49b6cd923dc1320639ced /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9125/d05c344b6e0d2bc137d49b6cd923dc1320639ced/writer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
9154,
33,
26497,
49,
19693,
16,
8902,
351,
651,
33,
7036,
16,
13256,
67,
4161,
67,
3804,
33,
8381,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
9154,
33,
26497,
49,
19693,
16,
8902,
351,
651,
33,
7036,
16,
13256,
67,
4161,
67,
3804,
33,
8381,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
res_ids = [x[0] for x in target_obj.search(cursor, user, [ ('rec_name', domain[i][1], domain[i][2]), ], context=context)] | res_ids = target_obj.search(cursor, user, [ ('rec_name', domain[i][1], domain[i][2]), ], context=context) | def _rec_get(ids, table, parent): if not ids: return [] ids2 = table.search(cursor, user, [(parent, 'in', ids), (parent, '!=', False)], context=context) return ids + _rec_get(ids2, table, parent) | e9c2b550fc0d26cc7e5d5bf94d05709e5992c457 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9266/e9c2b550fc0d26cc7e5d5bf94d05709e5992c457/modelsql.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3927,
67,
588,
12,
2232,
16,
1014,
16,
982,
4672,
309,
486,
3258,
30,
327,
5378,
3258,
22,
273,
1014,
18,
3072,
12,
9216,
16,
729,
16,
306,
12,
2938,
16,
296,
267,
2187,
3258,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3927,
67,
588,
12,
2232,
16,
1014,
16,
982,
4672,
309,
486,
3258,
30,
327,
5378,
3258,
22,
273,
1014,
18,
3072,
12,
9216,
16,
729,
16,
306,
12,
2938,
16,
296,
267,
2187,
3258,
... |
dfr.addBoth(self.queue_update) | def update_data(self): # trigger an update of the data | 33c4e02b67de97e209014fc7a7607c9eea544eaa /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11626/33c4e02b67de97e209014fc7a7607c9eea544eaa/lolcats_storage.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
67,
892,
12,
2890,
4672,
468,
3080,
392,
1089,
434,
326,
501,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
67,
892,
12,
2890,
4672,
468,
3080,
392,
1089,
434,
326,
501,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... | |
oFile.status = 'U' oFile.csumvalue = lfnInfo['Checksum'] fileChunk.append(oFile) | oFile.status = 'U' oFile.csumvalue = lfnInfo['Checksum'] fileChunk.append( oFile ) | def addFile(self, lfn): res = self.__checkArgumentFormat(lfn) if not res['OK']: return res lfns = res['Value'] created = self.__openSession() failed = {} successful = {} baseDirs = [] for lfn in lfns.keys(): baseDir = os.path.dirname(lfn) if baseDir in baseDirs: continue baseDirs.append(baseDir) res = self.__executeOperation(baseDir,'exists') # If we failed to find out whether the directory exists if not res['OK']: continue # If the directory exists if res['Value']: continue #Make the directories recursively if needed res = self.__makeDirs(baseDir) # If we failed to make the directory for the file if not res['OK']: continue lfc.lfc_umask(0000) for lfnList in breakListIntoChunks(sortList(lfns.keys()),1000): fileChunk = [] for lfn in lfnList: lfnInfo = lfns[lfn] pfn = lfnInfo['PFN'] size = lfnInfo['Size'] se = lfnInfo['SE'] guid = lfnInfo['GUID'] checksum = lfnInfo['Checksum'] res = self.__checkAddFile(lfn,pfn,size,se,guid,checksum) if not res['OK']: failed[lfn] = res['Message'] lfnList.remove(lfn) elif not res['Value']: successful[lfn] = True lfnList.remove(lfn) else: oFile = lfc.lfc_filereg() oFile.lfn = "%s/%s" % (self.prefix,lfn) oFile.sfn = pfn oFile.size = size oFile.mode = 0664 oFile.server = se oFile.guid = guid oFile.csumtype = 'AD' oFile.status = 'U' oFile.csumvalue = lfnInfo['Checksum'] fileChunk.append(oFile) if not fileChunk: continue value, errCodes = lfc.lfc_registerfiles(fileChunk) if (value != 0) or (len(errCodes) != len(lfnList)): for lfn in lfnList: failed[lfn] = lfc.sstrerror(lfc.cvar.serrno) continue for index in range(len(errCodes)): lfn = lfnList[index] errCode = errCodes[index] if errCode == 0: successful[lfn] = True elif errCode == 17: failed[lfn] = "The supplied GUID is already used" res = self.__getLfnForGUID(guid) if res['OK']: failed[lfn] = "The supplied GUID is already used by %s" % res['Value'] else: failed[lfn] = lfc.sstrerror(errCode) if created: self.__closeSession() resDict = {'Failed':failed,'Successful':successful} return S_OK(resDict) | 6280f3782654b93320f684f56a83a6624459bcec /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/6280f3782654b93320f684f56a83a6624459bcec/LcgFileCatalogClient.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
18671,
12,
2890,
16,
328,
4293,
4672,
400,
273,
365,
16186,
1893,
1379,
1630,
12,
80,
4293,
13,
309,
486,
400,
3292,
3141,
3546,
30,
327,
400,
18594,
2387,
273,
400,
3292,
620,
3546,
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,
18671,
12,
2890,
16,
328,
4293,
4672,
400,
273,
365,
16186,
1893,
1379,
1630,
12,
80,
4293,
13,
309,
486,
400,
3292,
3141,
3546,
30,
327,
400,
18594,
2387,
273,
400,
3292,
620,
3546,
2... |
return S_OK(True) | return S_OK( True ) | def __problematicExists(self,prognosis,lfn,pfn,storageElement): """ Determine whether the file already exists in the problematics table. """ req = "SELECT FileID FROM Problematics WHERE Prognosis ='%s' AND LFN = '%s' AND PFN = '%s' AND SE = '%s';" % (prognosis,lfn,pfn,storageElement) res = self._query(req) if not res['OK']: return res if res['Value']: return S_OK(True) else: return S_OK(False) | c0ad35468416f798369c9462d5f8a11a19686a43 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/c0ad35468416f798369c9462d5f8a11a19686a43/DataIntegrityDB.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
18968,
2126,
4002,
12,
2890,
16,
685,
1600,
538,
291,
16,
80,
4293,
16,
84,
4293,
16,
5697,
1046,
4672,
3536,
225,
10229,
2856,
326,
585,
1818,
1704,
316,
326,
6199,
270,
2102,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
18968,
2126,
4002,
12,
2890,
16,
685,
1600,
538,
291,
16,
80,
4293,
16,
84,
4293,
16,
5697,
1046,
4672,
3536,
225,
10229,
2856,
326,
585,
1818,
1704,
316,
326,
6199,
270,
2102,
1... |
self._writer.end_element('hmtl') | self._writer.end_element('html') | def _write_end(self): self._writer.end_element('body') self._writer.end_element('hmtl') | 628175334e03ed24218d0b383e9e5ea8193857dd /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6988/628175334e03ed24218d0b383e9e5ea8193857dd/robotdiff.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2626,
67,
409,
12,
2890,
4672,
365,
6315,
6299,
18,
409,
67,
2956,
2668,
3432,
6134,
365,
6315,
6299,
18,
409,
67,
2956,
2668,
76,
1010,
80,
6134,
2,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
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,
2626,
67,
409,
12,
2890,
4672,
365,
6315,
6299,
18,
409,
67,
2956,
2668,
3432,
6134,
365,
6315,
6299,
18,
409,
67,
2956,
2668,
76,
1010,
80,
6134,
2,
-100,
-100,
-100,
-100,
-100,... |
res = run_sql("SELECT id,proc,status FROM schTASK WHERE status NOT LIKE 'DONE' AND status NOT LIKE '%%DELETED%%' AND (status='RUNNING' OR status='ABOUT TO STOP' OR status='ABOUT TO SLEEP' OR status='SLEEPING' OR status='CONTINUING')") | res = run_sql("SELECT id,proc,status FROM schTASK WHERE status NOT LIKE 'DONE' AND status NOT LIKE '%_DELETED' AND (status='RUNNING' OR status='ABOUT TO STOP' OR status='ABOUT TO SLEEP' OR status='SLEEPING' OR status='CONTINUING')") | def stop(verbose=True): """ * Stop bibsched * Send stop signal to all the running tasks * wait for all the tasks to stop * return """ if verbose: print "Stopping BibSched if running" halt(verbose, soft=True) run_sql("UPDATE schTASK SET status='WAITING' WHERE status='SCHEDULED'") res = run_sql("SELECT id,proc,status FROM schTASK WHERE status NOT LIKE 'DONE' AND status NOT LIKE '%%DELETED%%' AND (status='RUNNING' OR status='ABOUT TO STOP' OR status='ABOUT TO SLEEP' OR status='SLEEPING' OR status='CONTINUING')") if verbose: print "Stopping all running BibTasks" for task_id, proc, status in res: if status == 'SLEEPING': bibsched_send_signal(proc, task_id, signal.SIGCONT) bibsched_set_status(task_id, 'ABOUT TO STOP') while run_sql("SELECT id FROM schTASK WHERE status NOT LIKE 'DONE' AND status NOT LIKE '%%DELETED%%' AND (status='RUNNING' OR status='ABOUT TO STOP' OR status='ABOUT TO SLEEP' OR status='SLEEPING' OR status='CONTINUING')"): if verbose: sys.stdout.write('.') sys.stdout.flush() time.sleep(1) if verbose: print "\nStopped" Log("BibSched and all BibTasks stopped") return | 922c08a14e972e6a7226a6ee86353b7525cbe24d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12027/922c08a14e972e6a7226a6ee86353b7525cbe24d/bibsched.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2132,
12,
11369,
33,
5510,
4672,
3536,
380,
5131,
25581,
87,
2049,
380,
2479,
2132,
4277,
358,
777,
326,
3549,
4592,
380,
2529,
364,
777,
326,
4592,
358,
2132,
380,
327,
3536,
309,
3988,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2132,
12,
11369,
33,
5510,
4672,
3536,
380,
5131,
25581,
87,
2049,
380,
2479,
2132,
4277,
358,
777,
326,
3549,
4592,
380,
2529,
364,
777,
326,
4592,
358,
2132,
380,
327,
3536,
309,
3988,... |
segment_code = segment[0] segment_value = segment[1] segment_value = segment_value.replace(" \n", " ") segment_value = segment_value.replace("\n", " ") out += "%(code)s%(value)s" % { 'code' : segment[0], 'value' : segment[1], } | segment[1] = segment[1].replace(" \n", " ") segment[1] = segment[1].replace("\n", " ") out += "%(code)s%(value)s" % { 'code' : segment[0], 'value' : segment[1] } | def print_field(field_lines, alephmarc=0): """Create the lines of a record relating to a given field, and return these lines as a string. @param field_lines: A list of lists, whereby each item in the top-level list is an instance of a field (e.g. a "datafield" or "controlfield"). @param alephmarc: an integer flag to tell the function whether or not the record being created is a pure text MARC record, or an ALEPH MARC record. @return: A string containing the record lines for the given field """ if type(field_lines) not in (list, tuple): return "" out = "" if alephmarc == 0: ## creating a text-marc record for line in field_lines: ## create line in text-marc mode: for segment in line: segment_code = segment[0] segment_value = segment[1] ## Is there a newline in this segment? If yes, replace it ## with a space or simply remove it if it was preceeded ## by whitespace: segment_value = segment_value.replace(" \n", " ") segment_value = segment_value.replace("\n", " ") out += "%(code)s%(value)s" % { 'code' : segment[0], 'value' : segment[1], } out += "\n" else: ## creating an aleph-marc record for line in field_lines: cur_line_len = 0 glue_count = 0 num_linesegments = len(line) if num_linesegments > 1: line_leader_len = len(line[0][1]) printable_line = "" i = 1 while i < num_linesegments: segment_code = line[i][0] segment_value = line[i][1] ## Is there a newline in this segment? If yes, replace it ## with a space or simply remove it if it was preceeded ## by whitespace: segment_value = segment_value.replace(" \n", " ") segment_value = segment_value.replace("\n", " ") cur_segment_len = len(segment_code) + len(segment_value) if (line_leader_len + cur_line_len + cur_segment_len + 2 \ + len(str(glue_count))) > (CFG_MAXLEN_ALEPH_LINE - 25): ## adding this segment makes the line too long. It ## must be printed now with the ALEPH $$9 glue. ## How much of the current line can be printed? space_remaining = (CFG_MAXLEN_ALEPH_LINE - 25) - \ (line_leader_len + cur_line_len + 3) \ - len(segment_code) if space_remaining > 0: ## there is space to add some of this line printable_line += segment_code + \ segment_value[0:space_remaining] segment_value = segment_value[space_remaining:] ## print this line: out += """%(sys)s$$9%(glue_count)s""" \ """%(printable_line)s\n""" \ % { 'sys' : line[0][1], 'glue_count' : str(glue_count), 'printable_line' : printable_line, } ## update glue count, and reset printable line glue_count += 1 printable_line = "" cur_line_len = 0 else: ## Including this line segment, the line fits within a ## maximum line length, so add it: printable_line += segment_code + segment_value cur_line_len += (len(segment_code) + len(segment_value)) i += 1 ## Now add to the display string, any of the line ## that remains in printable line: if len(printable_line) > 0: if glue_count > 0: out += """%(sys)s$$9%(glue_count)s""" \ """%(printable_line)s\n""" \ % { 'sys' : line[0][1], 'glue_count' : str(glue_count), 'printable_line' : printable_line } else: out += """%(sys)s%(printable_line)s\n""" \ % { 'sys' : line[0][1], 'printable_line' : printable_line } elif num_linesegments == 1: ## strange - only a SYS? out += "%(sys)s\n" % { 'sys' : line[0][1] } return out | e95478c3ee27b532d4805b1e7909f63c09dee59e /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12027/e95478c3ee27b532d4805b1e7909f63c09dee59e/xmlmarc2textmarclib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1172,
67,
1518,
12,
1518,
67,
3548,
16,
279,
298,
844,
3684,
71,
33,
20,
4672,
3536,
1684,
326,
2362,
434,
279,
1409,
1279,
1776,
358,
279,
864,
652,
16,
471,
327,
4259,
2362,
487,
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,
1172,
67,
1518,
12,
1518,
67,
3548,
16,
279,
298,
844,
3684,
71,
33,
20,
4672,
3536,
1684,
326,
2362,
434,
279,
1409,
1279,
1776,
358,
279,
864,
652,
16,
471,
327,
4259,
2362,
487,
2... |
('set_inf', [Mpfr, Sign], None), ('set_nan', [Mpfr], None), ('swap', [Mpfr, Mpfr], None), | ('set_inf', [IMpfr, Sign], None), ('set_nan', [IMpfr], None), ('swap', [IMpfr, IMpfr], None), | def error_on_failure(result, func, args): if result: raise ValueError("call failed") return result | b450c0023d8375a0580fdd1ed0db290a5d5cd85a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7048/b450c0023d8375a0580fdd1ed0db290a5d5cd85a/pympfr.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
555,
67,
265,
67,
12251,
12,
2088,
16,
1326,
16,
833,
4672,
309,
563,
30,
1002,
2068,
2932,
1991,
2535,
7923,
327,
563,
225,
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,
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,
555,
67,
265,
67,
12251,
12,
2088,
16,
1326,
16,
833,
4672,
309,
563,
30,
1002,
2068,
2932,
1991,
2535,
7923,
327,
563,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
netList = () | netList = [] rasd = Ovf.getDict(virtualHardware, configId)['children'] ovfNetDeviceList = [] for resource in rasd: if resource['name'] == 'Item': if resource['rasd:ResourceType'] == '10': ovfNetDeviceList.append(resource) for netDevice in ovfNetDeviceList: netAttach = 'default' if netDevice.has_key('rasd:Connection'): netConnect = netDevice['rasd:Connection'] netList.append(dict(interfaceType = 'network', sourceName = netConnect)) | def getOvfNetworks(virtualHardware, configId=None): """ Retrieves network interface information for the virtual machine from the Ovf file. @param virtualHardware: Ovf VirtualSystem Node @type virtualHardware: DOM Element @param configId: configuration name @type configId: String @return: list of dictionaries, seeL{Interface Elements<networkElement>} @rtype: list @todo: stubbed function, needs work """ netList = () | feabfe6e1539a4763b1205dcb915475b86c71db5 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9789/feabfe6e1539a4763b1205dcb915475b86c71db5/OvfLibvirt.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
17971,
90,
74,
19999,
12,
12384,
44,
14519,
16,
642,
548,
33,
7036,
4672,
3536,
20507,
2483,
1560,
1779,
364,
326,
5024,
5228,
628,
326,
531,
90,
74,
585,
18,
225,
632,
891,
5024,
44,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
17971,
90,
74,
19999,
12,
12384,
44,
14519,
16,
642,
548,
33,
7036,
4672,
3536,
20507,
2483,
1560,
1779,
364,
326,
5024,
5228,
628,
326,
531,
90,
74,
585,
18,
225,
632,
891,
5024,
44,
... |
logger.info(" ERROR: 3dpack.dat; "+i) | logger.info("ERROR: 3dpack.dat; "+i) | def verify(): all_errors_found = 0 | 9e249a6dacfafcde61ac83d5cd8becc030ac159f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13644/9e249a6dacfafcde61ac83d5cd8becc030ac159f/eagle3d.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3929,
13332,
777,
67,
4324,
67,
7015,
273,
374,
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... | [
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,
3929,
13332,
777,
67,
4324,
67,
7015,
273,
374,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
def getConfiguration(self): """ Returns the configuration dict generated by config.py. """ return self._config def getHttp(self): """ Returns the http dict generated by environ and wsgi variables. """ return self._http def getData(self): """ Returns the data dict generated during the course of handling a PyBlosxom request. """ return self._data configuration = property(getConfiguration) config = configuration conf = configuration http = property(getHttp) data = property(getData) def addHttp(self, d): """ Takes in a dict and adds/overrides values in the existing http dict with the new values. @param d: the dict with the new keys/values to add @type d: dict """ self._http.update(d) def addData(self, d): """ Takes in a dict and adds/overrides values in the existing data dict with the new values. @param d: the dict with the new keys/values to add @type d: dict """ self._data.update(d) def addConfiguration(self, newdict): """ Takes in a dict and adds/overrides values in the existing configuration dict with the new values. @param newdict: the dict with the new keys/values to add @type newdict: dict """ self._configuration.update(newdict) | def getForm(self): """ Returns the form data submitted by the client. The L{form<cgi.FieldStorage>} instance is created only when requested to prevent overhead and unnecessary consumption of the input stream. | 461e927d0802a68e1473ae50f46bc9f462da2fd1 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11836/461e927d0802a68e1473ae50f46bc9f462da2fd1/pyblosxom.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11221,
12,
2890,
4672,
3536,
2860,
326,
646,
501,
9638,
635,
326,
1004,
18,
1021,
511,
95,
687,
32,
19062,
18,
974,
3245,
26114,
791,
353,
2522,
1338,
1347,
3764,
358,
5309,
23188,
471,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11221,
12,
2890,
4672,
3536,
2860,
326,
646,
501,
9638,
635,
326,
1004,
18,
1021,
511,
95,
687,
32,
19062,
18,
974,
3245,
26114,
791,
353,
2522,
1338,
1347,
3764,
358,
5309,
23188,
471,
... | |
if self.debug: log.msg('sendfile sending %s' % filename) | log.debug('sendfile sending %s' % filename) | def sendFile(self, fp): '''queues up a file object for sending out over the wire''' filename = _getFPName(fp) self.fp = fp | cdcaf038ab7a8d9d6eba20fa49c93c98c9d905a0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/cdcaf038ab7a8d9d6eba20fa49c93c98c9d905a0/jdftp.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1366,
812,
12,
2890,
16,
4253,
4672,
9163,
18924,
731,
279,
585,
733,
364,
5431,
596,
1879,
326,
6636,
26418,
1544,
273,
389,
588,
30246,
461,
12,
7944,
13,
365,
18,
7944,
273,
4253,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1366,
812,
12,
2890,
16,
4253,
4672,
9163,
18924,
731,
279,
585,
733,
364,
5431,
596,
1879,
326,
6636,
26418,
1544,
273,
389,
588,
30246,
461,
12,
7944,
13,
365,
18,
7944,
273,
4253,
2... |
def beforeTest(self, result): warnings.simplefilter("ignore") def afterTest(self, result): warnings.resetwarnings() | setup( name='NoWarnings plugin', version='1.0', author='Wolf', author_email='wolf@geek.net', description='A nose plugin to squelch warnings', license='GPL', py_modules=['nowarnings'], entry_points={ 'nose.plugins.0.10': [ 'nowarnings = nowarnings:NoWarnings' ] } ) | def beforeTest(self, result): # Suppress warnings during tests to reduce noise warnings.simplefilter("ignore") | 8fb7a833cc89fc3cacb8678221d972c04a9f49ac /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1036/8fb7a833cc89fc3cacb8678221d972c04a9f49ac/setup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1865,
4709,
12,
2890,
16,
563,
4672,
468,
4598,
5599,
4982,
7434,
358,
5459,
10825,
5599,
18,
9647,
2188,
2932,
6185,
7923,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1865,
4709,
12,
2890,
16,
563,
4672,
468,
4598,
5599,
4982,
7434,
358,
5459,
10825,
5599,
18,
9647,
2188,
2932,
6185,
7923,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
self.assert_(self._box.get_string(keys[0]) == self._template % 0) | self.assertEqual(self._box.get_string(keys[0]), self._template % 0) | def test_add(self): # Add copies of a sample message keys = [] keys.append(self._box.add(self._template % 0)) self.assertEqual(len(self._box), 1) keys.append(self._box.add(mailbox.Message(_sample_message))) self.assertEqual(len(self._box), 2) keys.append(self._box.add(email.message_from_string(_sample_message))) self.assertEqual(len(self._box), 3) keys.append(self._box.add(StringIO.StringIO(_sample_message))) self.assertEqual(len(self._box), 4) keys.append(self._box.add(_sample_message)) self.assertEqual(len(self._box), 5) self.assert_(self._box.get_string(keys[0]) == self._template % 0) for i in (1, 2, 3, 4): self._check_sample(self._box[keys[i]]) | 7731c36bc6f787ca91b8429603fe004822f1f2d8 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3187/7731c36bc6f787ca91b8429603fe004822f1f2d8/test_mailbox.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
1289,
12,
2890,
4672,
468,
1436,
13200,
434,
279,
3296,
883,
1311,
273,
5378,
1311,
18,
6923,
12,
2890,
6315,
2147,
18,
1289,
12,
2890,
6315,
3202,
738,
374,
3719,
365,
18,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
1289,
12,
2890,
4672,
468,
1436,
13200,
434,
279,
3296,
883,
1311,
273,
5378,
1311,
18,
6923,
12,
2890,
6315,
2147,
18,
1289,
12,
2890,
6315,
3202,
738,
374,
3719,
365,
18,
1... |
rational arithmetic, even if the base ring is an inexact p-adic ring. | rational arithmetic, even if the base ring is an inexact `p`-adic ring. | def hecke_matrix(self, m, n, use_recurrence = False, exact_arith = False): r""" Calculate the matrix of the `T_m` operator in the basis of this space, truncated to an `n \times n` matrix. Conventions are that operators act on the left on column vectors (this is the opposite of the conventions of the sage.modules.matrix_morphism class!) Uses naive q-expansion arguments if use_recurrence=False and uses the Kolberg style recurrences if use_recurrence=True. | 5b50c3339818e8a868ad7b1df7babc30ebee69a1 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9417/5b50c3339818e8a868ad7b1df7babc30ebee69a1/genus0.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
366,
762,
73,
67,
5667,
12,
2890,
16,
312,
16,
290,
16,
999,
67,
266,
17131,
273,
1083,
16,
5565,
67,
297,
483,
273,
1083,
4672,
436,
8395,
9029,
326,
3148,
434,
326,
1375,
56,
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,
366,
762,
73,
67,
5667,
12,
2890,
16,
312,
16,
290,
16,
999,
67,
266,
17131,
273,
1083,
16,
5565,
67,
297,
483,
273,
1083,
4672,
436,
8395,
9029,
326,
3148,
434,
326,
1375,
56,
67,
... |
OWGUI.rubber(self.indiInterBox) | OWGUI.appendRadioButton(box, self, "discretization", self.indiDiscretizationMethods[-1], insertInto = hbbox) OWGUI.rubber(hbbox) | def __init__(self, parent=None, signalManager=None, name="Interactive Discretization"): OWWidget.__init__(self, parent, signalManager, name) self.showBaseLine=1 self.showLookaheadLine=1 self.showTargetClassProb=1 self.showRug=1 self.snap=1 self.measure=0 self.targetClass=0 self.discretization = self.classDiscretization = self.indiDiscretization = 1 self.intervals = self.classIntervals = self.indiIntervals = 3 self.outputOriginalClass = True self.indiData = [] self.indiLabels = [] self.resetIndividuals = 0 self.selectedAttr = 0 self.customSplits = ["", "", ""] self.autoApply = True self.dataChanged = False self.autoSynchronize = True self.pointsChanged = False | 9a3bb5d5397a9a71bb0ca6aaa8a1203ab70bcd43 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6366/9a3bb5d5397a9a71bb0ca6aaa8a1203ab70bcd43/OWInteractiveDiscretization.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
982,
33,
7036,
16,
4277,
1318,
33,
7036,
16,
508,
1546,
26442,
3035,
71,
1349,
1588,
6,
4672,
18233,
4609,
16186,
2738,
972,
12,
2890,
16,
982,
16,
4277,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
982,
33,
7036,
16,
4277,
1318,
33,
7036,
16,
508,
1546,
26442,
3035,
71,
1349,
1588,
6,
4672,
18233,
4609,
16186,
2738,
972,
12,
2890,
16,
982,
16,
4277,... |
<separator/> <menuitem action="New Page"/> <menuitem action="New Child Page"/> <menuitem action="New Folder"/> <menuitem action="Attach File"/> | def _get_ui(self): """Returns the UI XML""" # NOTE: I use a dummy menubar popup_menus so that I can have # accelerators on the menus. It is a hack. | 2414fb05747095e498fcda291babe364bcf5b6ea /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4738/2414fb05747095e498fcda291babe364bcf5b6ea/three_pane_viewer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
67,
4881,
12,
2890,
4672,
3536,
1356,
326,
6484,
3167,
8395,
225,
468,
5219,
30,
467,
999,
279,
9609,
21247,
373,
297,
10431,
67,
26065,
1427,
716,
467,
848,
1240,
468,
15153,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
67,
4881,
12,
2890,
4672,
3536,
1356,
326,
6484,
3167,
8395,
225,
468,
5219,
30,
467,
999,
279,
9609,
21247,
373,
297,
10431,
67,
26065,
1427,
716,
467,
848,
1240,
468,
15153,
... | |
obj1 = _get_relation(active_model, ['one2many']) obj2 = _get_relation(active_model, ['one2many', 'many2many']) obj3 = _get_relation(active_model, ['many2one']) | obj0 = model_obj.browse(cr, uid, active_model_id, context=context) obj1 = _get_relation(active_model_id, ['one2many']) obj2 = _get_relation(active_model_id, ['one2many', 'many2many']) obj3 = _get_relation(active_model_id, ['many2one']) | def _get_relation(model, ttypes): obj = [] field_ids = fields_obj.search(cr, uid, [('model','=',model),('ttype','in', ttypes)]) for field in fields_obj.browse(cr, uid, field_ids, context=context): for ttype in ttypes: if ttype in ('one2many', 'many2many'): obj += _get_relation(field.relation, [ttype]) if field.model_id.model != active_model and field.model_id.id not in obj: obj.append((field.relation_field, field.model_id)) return obj | 8166cedceb0edc65ee8718fcb28479e1c65e4a60 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12853/8166cedceb0edc65ee8718fcb28479e1c65e4a60/wizard_share.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
67,
5488,
12,
2284,
16,
268,
2352,
4672,
1081,
273,
5378,
652,
67,
2232,
273,
1466,
67,
2603,
18,
3072,
12,
3353,
16,
4555,
16,
306,
2668,
2284,
17023,
33,
2187,
2284,
3631,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5488,
12,
2284,
16,
268,
2352,
4672,
1081,
273,
5378,
652,
67,
2232,
273,
1466,
67,
2603,
18,
3072,
12,
3353,
16,
4555,
16,
306,
2668,
2284,
17023,
33,
2187,
2284,
3631,
... |
eventlet.sleep(.5) | evt.wait() | def server(): # accept the connection in another greenlet sock, addr = listener.accept() sock = bufsized(sock) eventlet.sleep(.5) | 017d7871a7559eeb90cb911e57dd5974ec41f4ed /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10078/017d7871a7559eeb90cb911e57dd5974ec41f4ed/greenio_test.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1438,
13332,
468,
2791,
326,
1459,
316,
4042,
10004,
1810,
7313,
16,
3091,
273,
2991,
18,
9436,
1435,
7313,
273,
1681,
87,
1235,
12,
15031,
13,
871,
1810,
18,
19607,
10604,
25,
13,
2,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1438,
13332,
468,
2791,
326,
1459,
316,
4042,
10004,
1810,
7313,
16,
3091,
273,
2991,
18,
9436,
1435,
7313,
273,
1681,
87,
1235,
12,
15031,
13,
871,
1810,
18,
19607,
10604,
25,
13,
2,
... |
elif not os.path.isdir(self.dbHome): | elif not isdir(self.dbHome): | def _create(self, **kwds): | a8cb141ba664367fbbfe606cc3e624222072641f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9228/a8cb141ba664367fbbfe606cc3e624222072641f/DBRepository.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2640,
12,
2890,
16,
2826,
25577,
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,
389,
2640,
12,
2890,
16,
2826,
25577,
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,
-10... |
dataPath = os.path.realpath( "%s/%s" % ( rootPath, dataPath ) ) | dataPath = os.path.realpath( "%s/%s" % ( gConfig.getValue( '/LocalSite/InstancePath', rootPath ), dataPath ) ) | def initializeDataLoggingHandler( serviceInfo ): global dataPath global logDB logDB = DataLoggingDB() monitoringSection = PathFinder.getServiceSection( "DataManagement/DataLogging" ) #Get data location retDict = gConfig.getOption( "%s/DataLocation" % monitoringSection ) if not retDict[ 'OK' ]: return retDict dataPath = retDict[ 'Value' ].strip() if "/" != dataPath[0]: dataPath = os.path.realpath( "%s/%s" % ( rootPath, dataPath ) ) gLogger.info( "Data will be written into %s" % dataPath ) try: os.makedirs( dataPath ) except: pass try: testFile = "%s/mon.jarl.test" % dataPath fd = file( testFile, "w" ) fd.close() os.unlink( testFile ) except IOError: gLogger.fatal( "Can't write to %s" % dataPath ) return S_ERROR( "Data location is not writable" ) return S_OK() | 4797b8c582dfd807acec37afc8310baba2b3d395 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/4797b8c582dfd807acec37afc8310baba2b3d395/DataLoggingHandler.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4046,
751,
7735,
1503,
12,
1156,
966,
262,
30,
225,
2552,
501,
743,
2552,
613,
2290,
613,
2290,
273,
1910,
7735,
2290,
1435,
225,
16309,
5285,
273,
2666,
8441,
18,
588,
1179,
5285,
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,
4046,
751,
7735,
1503,
12,
1156,
966,
262,
30,
225,
2552,
501,
743,
2552,
613,
2290,
613,
2290,
273,
1910,
7735,
2290,
1435,
225,
16309,
5285,
273,
2666,
8441,
18,
588,
1179,
5285,
12,
... |
def skip_test(pagesize, bits, cmd, pre, desc): | def skip_test(pagesize, bits, cmd, **env): | def skip_test(pagesize, bits, cmd, pre, desc): """ Skip a test, print test information, and log that it was skipped. """ global tot_tests, tot_skip R["total"][pagesize][bits] += 1 R["skip"][pagesize][bits] += 1 if desc != "": print desc, if pre != "": print pre, print "%s (%s: %i):\tSKIPPED" % (cmd, pretty_page_size(pagesize), bits) | 637db55c57379f6e4c69d320ca16f9b05c873e3f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3715/637db55c57379f6e4c69d320ca16f9b05c873e3f/run_tests.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2488,
67,
3813,
12,
7267,
554,
16,
4125,
16,
1797,
16,
2826,
3074,
4672,
3536,
6611,
279,
1842,
16,
1172,
1842,
1779,
16,
471,
613,
716,
518,
1703,
9700,
18,
3536,
2552,
9997,
67,
1634... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2488,
67,
3813,
12,
7267,
554,
16,
4125,
16,
1797,
16,
2826,
3074,
4672,
3536,
6611,
279,
1842,
16,
1172,
1842,
1779,
16,
471,
613,
716,
518,
1703,
9700,
18,
3536,
2552,
9997,
67,
1634... |
"./chainloader 10 /bin/cat /proc/self/maps 10<%s" | "exec ./chainloader 10 /bin/cat /proc/self/maps 10<%s" | def test_non_executable_stack(self): proc = subprocess.Popen( ["bash", "-c", "./chainloader 10 /bin/cat /proc/self/maps 10<%s" % self._get_ld_so()], stdout=subprocess.PIPE) stdout, stderr = proc.communicate() self.assertEquals(proc.wait(), 0) self.assertEquals(self.stack_flags(stdout), ["rw-p"]) | ac104130c72d18149b3977c379c51cf0885aebba /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1008/ac104130c72d18149b3977c379c51cf0885aebba/test.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
5836,
67,
17751,
67,
3772,
12,
2890,
4672,
5418,
273,
6652,
18,
52,
3190,
12,
8247,
28734,
3113,
3701,
71,
3113,
315,
4177,
263,
19,
5639,
6714,
1728,
342,
4757,
19,
2574,
34... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
5836,
67,
17751,
67,
3772,
12,
2890,
4672,
5418,
273,
6652,
18,
52,
3190,
12,
8247,
28734,
3113,
3701,
71,
3113,
315,
4177,
263,
19,
5639,
6714,
1728,
342,
4757,
19,
2574,
34... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.