rem stringlengths 2 226k | add stringlengths 0 227k | context stringlengths 8 228k | meta stringlengths 156 215 | input_ids list | attention_mask list | labels list |
|---|---|---|---|---|---|---|
checkProg('a SVG -> EPS converter', ['rsvg-convert -f ps -o $$o $$i'], | checkProg('a SVG -> EPS converter', ['rsvg-convert -f ps -o $$o $$i', 'inkscape --file=$$p/$$i --export-area-drawing --without-gui --export-eps=$$p/$$o'], | def checkConverterEntries(): ''' Check all converters (\converter entries) ''' checkProg('the pdflatex program', ['pdflatex $$i'], rc_entry = [ r'\converter pdflatex pdf2 "%%" "latex"' ]) checkProg('XeTeX', ['xelatex $$i'], rc_entry = [ r'\converter xetex pdf4 "%%" "latex"' ]) ''' If we're running LyX in-place then tex2lyx will be found in ../src/tex2lyx. Add this directory to the PATH temporarily and search for tex2lyx. Use PATH to avoid any problems with paths-with-spaces. ''' path_orig = os.environ["PATH"] os.environ["PATH"] = os.path.join('..', 'src', 'tex2lyx') + \ os.pathsep + path_orig checkProg('a LaTeX/Noweb -> LyX converter', ['tex2lyx', 'tex2lyx' + version_suffix], rc_entry = [r'''\converter latex lyx "%% -f $$i $$o" "" | bf820ca57821669cd0086d95db4aa73e2b51efce /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7514/bf820ca57821669cd0086d95db4aa73e2b51efce/configure.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
5072,
5400,
13332,
9163,
2073,
777,
19414,
17938,
15747,
3222,
13,
9163,
866,
626,
75,
2668,
5787,
8169,
26264,
5402,
2187,
10228,
7699,
26264,
5366,
77,
17337,
4519,
67,
4099,
273,
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,
866,
5072,
5400,
13332,
9163,
2073,
777,
19414,
17938,
15747,
3222,
13,
9163,
866,
626,
75,
2668,
5787,
8169,
26264,
5402,
2187,
10228,
7699,
26264,
5366,
77,
17337,
4519,
67,
4099,
273,
3... |
self.putsequences() | self.putsequences(sequences) | def removefromallsequences(self, list): if hasattr(self, 'last') and self.last in list: del self.last sequences = self.getsequences() changed = 0 for name, seq in sequences.items(): for n in list: if n in seq: seq.remove(n) changed = 1 if not seq: del sequences[name] if changed: self.putsequences() | ffcb40cf10e6aa35a847278a0fbaf18402a5790d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/ffcb40cf10e6aa35a847278a0fbaf18402a5790d/mhlib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1206,
2080,
454,
17190,
12,
2890,
16,
666,
4672,
309,
3859,
12,
2890,
16,
296,
2722,
6134,
471,
365,
18,
2722,
316,
666,
30,
1464,
365,
18,
2722,
8463,
273,
365,
18,
588,
17190,
1435,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1206,
2080,
454,
17190,
12,
2890,
16,
666,
4672,
309,
3859,
12,
2890,
16,
296,
2722,
6134,
471,
365,
18,
2722,
316,
666,
30,
1464,
365,
18,
2722,
8463,
273,
365,
18,
588,
17190,
1435,
... |
@param content: The content for which proccessing has ended. @type content: L{Object} | @param content: The content to set nil. @type content: L{Content} | def setnil(self, node, content): """ Set the value of the I{node} to nill when nillable. @param node: A I{nil} node. @type node: L{Element} @param content: The content for which proccessing has ended. @type content: L{Object} """ if content.type.nillable: node.setnil() | b32e18cba5f033e50e0cf3ace265b9a572aa984e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1242/b32e18cba5f033e50e0cf3ace265b9a572aa984e/marshaller.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
20154,
12,
2890,
16,
756,
16,
913,
4672,
3536,
1000,
326,
460,
434,
326,
467,
95,
2159,
97,
358,
515,
80,
1347,
515,
80,
429,
18,
632,
891,
756,
30,
432,
467,
95,
20154,
97,
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,
444,
20154,
12,
2890,
16,
756,
16,
913,
4672,
3536,
1000,
326,
460,
434,
326,
467,
95,
2159,
97,
358,
515,
80,
1347,
515,
80,
429,
18,
632,
891,
756,
30,
432,
467,
95,
20154,
97,
7... |
crm_case c left join project_task t on t.case_id = c.id left join project_project p on p.id = t.project_id | crm_case c left join project_project p on p.id = c.project_id | def init(self, cr): cr.execute(""" create or replace view report_crm_case_announce_user as ( select min(c.id) as id, c.user_id, c.name as name, count(*) as nbr, p.id as project_id from crm_case c left join project_task t on t.case_id = c.id left join project_project p on p.id = t.project_id where c.section_id = p.section_annouce_id group by c.user_id, c.name, p.id )""") | 63aca3f99a9c76ca2e99c049a801f7d6f1039030 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7339/63aca3f99a9c76ca2e99c049a801f7d6f1039030/portal_project.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1208,
12,
2890,
16,
4422,
4672,
4422,
18,
8837,
2932,
3660,
752,
578,
1453,
1476,
2605,
67,
3353,
81,
67,
3593,
67,
1072,
8386,
67,
1355,
487,
261,
2027,
1131,
12,
71,
18,
350,
13,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1208,
12,
2890,
16,
4422,
4672,
4422,
18,
8837,
2932,
3660,
752,
578,
1453,
1476,
2605,
67,
3353,
81,
67,
3593,
67,
1072,
8386,
67,
1355,
487,
261,
2027,
1131,
12,
71,
18,
350,
13,
4... |
status.addFloat64(rot) | status.addFloat64(rot[i]) | def sendGameStatus(): px,py,pz = ballBody.getPosition() prot = ballBody.getRotation() r1,r2,r3,r4 = row1.getZ(), row2.getZ(), row3.getZ(), row4.getZ() o1,o2,o3,o4 = rrow1.getZ(), rrow2.getZ(), rrow3.getZ(), rrow4.getZ() rot = [] for i in range(0,4): rot[i] = kicker[i].getH() status = PyDatagram() status.addUint16(PACKET_SET) status.addFloat64(px) status.addFloat64(py) status.addFloat64(pz) for r in range(9): #just to be explicit status.addFloat64(prot[i]) status.addFloat64(r1) status.addFloat64(r2) status.addFloat64(r3) status.addFloat64(r4) status.addFloat64(o1) status.addFloat64(o2) status.addFloat64(o3) status.addFloat64(o4) for i in range(0,4): status.addFloat64(rot) toAll(status, activeConnections) | 73d04275d5aecffbeaa4958b270fc22e07a236dc /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12834/73d04275d5aecffbeaa4958b270fc22e07a236dc/kickern.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1366,
12496,
1482,
13332,
10318,
16,
2074,
16,
84,
94,
273,
26503,
2250,
18,
588,
2555,
1435,
11121,
377,
273,
26503,
2250,
18,
588,
14032,
1435,
225,
436,
21,
16,
86,
22,
16,
86,
23,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1366,
12496,
1482,
13332,
10318,
16,
2074,
16,
84,
94,
273,
26503,
2250,
18,
588,
2555,
1435,
11121,
377,
273,
26503,
2250,
18,
588,
14032,
1435,
225,
436,
21,
16,
86,
22,
16,
86,
23,
... |
r""" Double factorial numbers: $(2n-1)!! = 1 \cdot 3 \cdot 5 \cdots (2n-1)$. INPUT: n -- non negative integer OUTPUT: integer -- function value EXAMPLES: sage: a = sloane.A001147;a Double factorial numbers: (2n-1)!! = 1.3.5....(2n-1). sage: a(0) 1 sage: a.offset 0 sage: a(8) 2027025 sage: a(20) 319830986772877770815625 sage: a.list(9) [1, 1, 3, 15, 105, 945, 10395, 135135, 2027025] AUTHOR: -- Jaap Spies (2007-01-24) """ def __init__(self): | def __init__(self): r""" Double factorial numbers: $(2n-1)!! = 1 \cdot 3 \cdot 5 \cdots (2n-1)$. INPUT: n -- non negative integer OUTPUT: integer -- function value EXAMPLES: sage: a = sloane.A001147;a Double factorial numbers: (2n-1)!! = 1.3.5....(2n-1). sage: a(0) 1 sage: a.offset 0 sage: a(8) 2027025 sage: a(20) 319830986772877770815625 sage: a.list(9) [1, 1, 3, 15, 105, 945, 10395, 135135, 2027025] AUTHOR: -- Jaap Spies (2007-01-24) """ | def _eval(self, n): return (2**n)*arith.factorial(n) | 69a199217d612e1c590af73e16003812c85b93ec /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/69a199217d612e1c590af73e16003812c85b93ec/sloane_functions.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
8622,
12,
2890,
16,
290,
4672,
327,
261,
22,
636,
82,
17653,
297,
483,
18,
6812,
649,
12,
82,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
8622,
12,
2890,
16,
290,
4672,
327,
261,
22,
636,
82,
17653,
297,
483,
18,
6812,
649,
12,
82,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
test.support.run_unittest(BytesTest) test.support.run_unittest(ByteArrayTest) test.support.run_unittest(AssortedBytesTest) test.support.run_unittest(BytesAsStringTest) test.support.run_unittest(ByteArrayAsStringTest) test.support.run_unittest(ByteArraySubclassTest) test.support.run_unittest(BytearrayPEP3137Test) | test.support.run_unittest( BytesTest, AssortedBytesTest, BytesAsStringTest, ByteArrayTest, ByteArrayAsStringTest, ByteArraySubclassTest, BytearrayPEP3137Test) | def test_main(): test.support.run_unittest(BytesTest) test.support.run_unittest(ByteArrayTest) test.support.run_unittest(AssortedBytesTest) test.support.run_unittest(BytesAsStringTest) test.support.run_unittest(ByteArrayAsStringTest) test.support.run_unittest(ByteArraySubclassTest) test.support.run_unittest(BytearrayPEP3137Test) | 46399683efe4cf122f307e8ee3fd34da9b5a4543 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8125/46399683efe4cf122f307e8ee3fd34da9b5a4543/test_bytes.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
5254,
13332,
1842,
18,
13261,
18,
2681,
67,
4873,
3813,
12,
5985,
4709,
16,
4725,
24726,
2160,
4709,
16,
5985,
8092,
4709,
16,
7964,
4709,
16,
7964,
8092,
4709,
16,
7964,
1676,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
5254,
13332,
1842,
18,
13261,
18,
2681,
67,
4873,
3813,
12,
5985,
4709,
16,
4725,
24726,
2160,
4709,
16,
5985,
8092,
4709,
16,
7964,
4709,
16,
7964,
8092,
4709,
16,
7964,
1676,... |
return self.request.response.redirect(aq_parent(aq_inner(self.context)).absolute_url()) | return self.request.response.redirect(aq_parent(aq_inner(context)).absolute_url()) | def __call__(self): | f088cb946e301737ef8c848c7891dfbdfe4abf56 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12197/f088cb946e301737ef8c848c7891dfbdfe4abf56/comments.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1991,
972,
12,
2890,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1991,
972,
12,
2890,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
parent.invokeFactory(self.getGroupWorkspaceContainerType(), self.getGroupWorkspacesFolderId()) | pt.constructContent( type_name = self.getGroupWorkspaceContainerType(), container = parent, id = self.getGroupWorkspacesFolderId(), ) | def createGrouparea(self, id): """Create a space in the portal for the given group, much like member home folders.""" parent = self.aq_inner.aq_parent workspaces = self.getGroupWorkspacesFolder() pt = getToolByName( self, 'portal_types' ) | ff2240175dc1dd6bafb910f16f835fe6df598950 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1807/ff2240175dc1dd6bafb910f16f835fe6df598950/GroupsTool.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
1114,
5036,
12,
2890,
16,
612,
4672,
3536,
1684,
279,
3476,
316,
326,
11899,
364,
326,
864,
1041,
16,
9816,
3007,
3140,
6382,
9907,
12123,
982,
273,
365,
18,
69,
85,
67,
7872,
18,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
1114,
5036,
12,
2890,
16,
612,
4672,
3536,
1684,
279,
3476,
316,
326,
11899,
364,
326,
864,
1041,
16,
9816,
3007,
3140,
6382,
9907,
12123,
982,
273,
365,
18,
69,
85,
67,
7872,
18,... |
cannot_use_because(modname, 'of dependency failure') | cannot_use_because(modname, 'dependency failure') | def cannot_use_because(mod, reason): not_using_because.setdefault(reason, []).append(mod) | 3c3ca9050f2ffbb9bb3417e2d71142e9550936df /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9556/3c3ca9050f2ffbb9bb3417e2d71142e9550936df/configure.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2780,
67,
1202,
67,
26274,
12,
1711,
16,
3971,
4672,
486,
67,
9940,
67,
26274,
18,
542,
1886,
12,
10579,
16,
5378,
2934,
6923,
12,
1711,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2780,
67,
1202,
67,
26274,
12,
1711,
16,
3971,
4672,
486,
67,
9940,
67,
26274,
18,
542,
1886,
12,
10579,
16,
5378,
2934,
6923,
12,
1711,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
return addSemicolon("%s?%s:%s" % (compress(condition), compress(thenPart), compress(elsePart)) | return addSemicolon("%s?%s:%s" % (compress(condition), compress(thenPart), compress(elsePart))) | def __hook(node): """aka ternary operator""" condition = node.condition thenPart = node.thenPart elsePart = node.elsePart if condition.type == "not": [thenPart,elsePart] = [elsePart,thenPart] condition = condition[0] return addSemicolon("%s?%s:%s" % (compress(condition), compress(thenPart), compress(elsePart)) | 726eaaa605d8a434b181432f25457ab34071e24b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12949/726eaaa605d8a434b181432f25457ab34071e24b/Compressor.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
4476,
12,
2159,
4672,
3536,
581,
69,
268,
24265,
3726,
8395,
2269,
273,
756,
18,
4175,
1508,
1988,
273,
756,
18,
15991,
1988,
469,
1988,
273,
756,
18,
12107,
1988,
225,
309,
2269,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4476,
12,
2159,
4672,
3536,
581,
69,
268,
24265,
3726,
8395,
2269,
273,
756,
18,
4175,
1508,
1988,
273,
756,
18,
15991,
1988,
469,
1988,
273,
756,
18,
12107,
1988,
225,
309,
2269,
... |
"all the tests where not iterated over") | "all the tests were not iterated over") | def runTest(self): "test a serial job" | ad65c7cdcfec7b5f31dabf737fe6535a8d4b7ba8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7126/ad65c7cdcfec7b5f31dabf737fe6535a8d4b7ba8/JobTests.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
4709,
12,
2890,
4672,
315,
3813,
279,
2734,
1719,
6,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
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,
1086,
4709,
12,
2890,
4672,
315,
3813,
279,
2734,
1719,
6,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
self.filelabel.set_text(self.curr_mpdpath.split('/')[-1]) | self.filelabel.set_text(os.path.basename(self.curr_mpdpath)) | def toggle_path(self, button): self.use_mpdpaths = not self.use_mpdpaths if self.use_mpdpaths: self.filelabel.set_text(self.curr_mpdpath) else: self.filelabel.set_text(self.curr_mpdpath.split('/')[-1]) self.set_expandbutton_state(button) | 705b68f6c82a30940d8de05b4e0de872a0284033 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2312/705b68f6c82a30940d8de05b4e0de872a0284033/tagedit.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10486,
67,
803,
12,
2890,
16,
3568,
4672,
365,
18,
1202,
67,
1291,
72,
4481,
273,
486,
365,
18,
1202,
67,
1291,
72,
4481,
309,
365,
18,
1202,
67,
1291,
72,
4481,
30,
365,
18,
7540,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10486,
67,
803,
12,
2890,
16,
3568,
4672,
365,
18,
1202,
67,
1291,
72,
4481,
273,
486,
365,
18,
1202,
67,
1291,
72,
4481,
309,
365,
18,
1202,
67,
1291,
72,
4481,
30,
365,
18,
7540,
... |
self.symbolFillColorButton.setText(color.name()) self.symbolFillColorButton.setPalette(QtGui.QPalette(color)) | style = QtCore.QString('QPushButton self.symbolFillColorButton.setStyleSheet(style) | def setSymbolFillColor(self): currentColor = self.symbolFillColorButton.palette().color(QtGui.QPalette.Background) color = QtGui.QColorDialog.getColor(currentColor, self) if color.isValid(): self.symbolFillColorButton.setText(color.name()) self.symbolFillColorButton.setPalette(QtGui.QPalette(color)) self.currentSymbolFillColor = color | d178cede323e2b0ade1d755598a2733854f66a60 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2961/d178cede323e2b0ade1d755598a2733854f66a60/plotconfig.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
5335,
8026,
2957,
12,
2890,
4672,
783,
2957,
273,
365,
18,
7175,
8026,
2957,
3616,
18,
26474,
7675,
3266,
12,
23310,
18070,
18,
53,
25863,
18,
8199,
13,
2036,
273,
23425,
18,
53,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
5335,
8026,
2957,
12,
2890,
4672,
783,
2957,
273,
365,
18,
7175,
8026,
2957,
3616,
18,
26474,
7675,
3266,
12,
23310,
18070,
18,
53,
25863,
18,
8199,
13,
2036,
273,
23425,
18,
53,
... |
self.body.append('<a class="toc-backref" href=" % node['refid']) context = '</a>' self.context.append('%s</h%s>\n' % (context, self.section_level)) | atts['class'] = 'toc-backref' atts['href'] = ' self.body.append(self.starttag({}, 'a', '', **atts) self.context.append('</a></h%s>\n' % (self.section_level)) | def visit_title(self, node): """Only 6 section levels are supported by HTML.""" if isinstance(node.parent, nodes.topic): self.body.append( self.starttag(node, 'p', '', CLASS='topic-title')) self.context.append('</p>\n') elif self.section_level == 0: # document title self.head.append('<title>%s</title>\n' % self.encode(node.astext())) self.body.append(self.starttag(node, 'h1', '', CLASS='title')) self.context.append('</h1>\n') else: self.body.append( self.starttag(node, 'h%s' % self.section_level, '')) context = '' if node.hasattr('refid'): self.body.append('<a class="toc-backref" href="#%s">' % node['refid']) context = '</a>' self.context.append('%s</h%s>\n' % (context, self.section_level)) | 8bfeee50a564f0a8940368f504f66d76ef7cb4b3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8194/8bfeee50a564f0a8940368f504f66d76ef7cb4b3/html4css1.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3757,
67,
2649,
12,
2890,
16,
756,
4672,
3536,
3386,
1666,
2442,
7575,
854,
3260,
635,
3982,
12123,
309,
1549,
12,
2159,
18,
2938,
16,
2199,
18,
10476,
4672,
365,
18,
3432,
18,
6923,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3757,
67,
2649,
12,
2890,
16,
756,
4672,
3536,
3386,
1666,
2442,
7575,
854,
3260,
635,
3982,
12123,
309,
1549,
12,
2159,
18,
2938,
16,
2199,
18,
10476,
4672,
365,
18,
3432,
18,
6923,
1... |
'Sigma' | 'Sigma', | def _sys_init_(self, system): return self._name | 751928e11d27b0af0a83067c762941a266aacd75 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9417/751928e11d27b0af0a83067c762941a266aacd75/calculus.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
9499,
67,
2738,
67,
12,
2890,
16,
2619,
4672,
327,
365,
6315,
529,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
9499,
67,
2738,
67,
12,
2890,
16,
2619,
4672,
327,
365,
6315,
529,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
self.popup.ok_button.setEnabled(True) | self.popup.ok_button.setEnabled(True) | def run(): for parameter in save_list: if parameter.type == KeywordModel.TYPE: for choice in parameter.getUserData()['key_index_choices']: self.plot_data_fetcher.setParameter(parameter, context_data) parameter.getUserData()['key_index'] = choice # because setParameter overwrites this value self.plot_data_fetcher.fetchContent() self.savePlot(self.plot_data_fetcher.data) else: self.plot_data_fetcher.setParameter(parameter, context_data) self.plot_data_fetcher.fetchContent() self.savePlot(self.plot_data_fetcher.data) | ea81291531705a5a4d2fa714658335833c1c859b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10268/ea81291531705a5a4d2fa714658335833c1c859b/plotgenerator.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
13332,
364,
1569,
316,
1923,
67,
1098,
30,
309,
1569,
18,
723,
422,
18317,
1488,
18,
2399,
30,
364,
6023,
316,
1569,
18,
588,
19265,
1435,
3292,
856,
67,
1615,
67,
11937,
3546,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
13332,
364,
1569,
316,
1923,
67,
1098,
30,
309,
1569,
18,
723,
422,
18317,
1488,
18,
2399,
30,
364,
6023,
316,
1569,
18,
588,
19265,
1435,
3292,
856,
67,
1615,
67,
11937,
3546,
3... |
self.valueOf_ = get_all_text_(node) if node.text is not None: obj_ = self.mixedclass_(MixedContainer.CategoryText, MixedContainer.TypeNone, '', node.text) self.content_.append(obj_) | def build(self, node): self.buildAttributes(node, node.attrib, []) self.valueOf_ = get_all_text_(node) if node.text is not None: obj_ = self.mixedclass_(MixedContainer.CategoryText, MixedContainer.TypeNone, '', node.text) self.content_.append(obj_) for child in node: nodeName_ = Tag_pattern_.match(child.tag).groups()[-1] self.buildChildren(child, nodeName_) | 9c12e50d449fa27d6f8f3415ece228ae97bb0266 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14016/9c12e50d449fa27d6f8f3415ece228ae97bb0266/_nexml.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1361,
12,
2890,
16,
756,
4672,
365,
18,
3510,
2498,
12,
2159,
16,
756,
18,
14588,
16,
5378,
13,
364,
1151,
316,
756,
30,
7553,
67,
273,
4034,
67,
4951,
27799,
1916,
12,
3624,
18,
269... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1361,
12,
2890,
16,
756,
4672,
365,
18,
3510,
2498,
12,
2159,
16,
756,
18,
14588,
16,
5378,
13,
364,
1151,
316,
756,
30,
7553,
67,
273,
4034,
67,
4951,
27799,
1916,
12,
3624,
18,
269... | |
def ddpop(self): self.formatter.end_paragraph(0) | def ddpop(self, bl=0): self.formatter.end_paragraph(bl) | def ddpop(self): self.formatter.end_paragraph(0) if self.list_stack: if self.list_stack[-1][0] == 'dd': | ca70a838e955928c5208fa315199c70645f91161 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/ca70a838e955928c5208fa315199c70645f91161/htmllib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6957,
5120,
12,
2890,
16,
2811,
33,
20,
4672,
365,
18,
12354,
18,
409,
67,
22445,
12,
3083,
13,
309,
365,
18,
1098,
67,
3772,
30,
309,
365,
18,
1098,
67,
3772,
18919,
21,
6362,
20,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6957,
5120,
12,
2890,
16,
2811,
33,
20,
4672,
365,
18,
12354,
18,
409,
67,
22445,
12,
3083,
13,
309,
365,
18,
1098,
67,
3772,
30,
309,
365,
18,
1098,
67,
3772,
18919,
21,
6362,
20,
... |
self.connect('destroy', self.destroyed) def got_response(self, widget, response): | self.connect('destroy', destroyed) def got_response(widget, response): | def destroyed(widget): rox.toplevel_unref() if self.changed(): self.options.save() | 9a54743e6b78e61343dedb7055a797ed3f51e8b1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4591/9a54743e6b78e61343dedb7055a797ed3f51e8b1/OptionsBox.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
17689,
12,
6587,
4672,
721,
92,
18,
3669,
2815,
67,
318,
1734,
1435,
309,
365,
18,
6703,
13332,
365,
18,
2116,
18,
5688,
1435,
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,
17689,
12,
6587,
4672,
721,
92,
18,
3669,
2815,
67,
318,
1734,
1435,
309,
365,
18,
6703,
13332,
365,
18,
2116,
18,
5688,
1435,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
fileTableName = re.sub('jobsArchived','filesTable',table) | fileTableName = re.sub('jobsArchived','filesTable_ARCH',table) | def peekJobLog(self,pandaID): comment = ' /* DBProxy.peekJobLog */' _logger.debug("peekJob : %s" % pandaID) # return None for NULL PandaID if pandaID in ['NULL','','None',None]: return None sql1_0 = "SELECT %s FROM %s " sql1_1 = "WHERE PandaID=:PandaID AND modificationTime>(CURRENT_DATE-30) " # select varMap = {} varMap[':PandaID'] = pandaID nTry=3 for iTry in range(nTry): try: # get list of archived tables tables = self.getArchiveTables() # select for table in tables: # start transaction self.conn.begin() # select sql = sql1_0 % (JobSpec.columnNames(),table) + sql1_1 self.cur.arraysize = 10 self.cur.execute(sql+comment, varMap) res = self.cur.fetchall() # commit if not self._commit(): raise RuntimeError, 'Commit error' if len(res) != 0: # Job job = JobSpec() job.pack(res[0]) # Files # start transaction self.conn.begin() # select fileTableName = re.sub('jobsArchived','filesTable',table) sqlFile = "SELECT %s " % FileSpec.columnNames() sqlFile+= "FROM %s " % fileTableName sqlFile+= "WHERE PandaID=:PandaID" self.cur.arraysize = 10000 self.cur.execute(sqlFile+comment, varMap) resFs = self.cur.fetchall() # metadata job.metadata = None sqlMeta = "SELECT metaData FROM ATLAS_PANDA.metaTable WHERE PandaID=:PandaID" self.cur.execute(sqlMeta+comment, varMap) for clobMeta, in self.cur: job.metadata = clobMeta.read() break # job parameters job.jobParameters = None sqlJobP = "SELECT jobParameters FROM ATLAS_PANDA.jobParamsTable WHERE PandaID=:PandaID" varMap = {} varMap[':PandaID'] = job.PandaID self.cur.execute(sqlJobP+comment, varMap) for clobJobP, in self.cur: job.jobParameters = clobJobP.read() break # commit if not self._commit(): raise RuntimeError, 'Commit error' # set files for resF in resFs: file = FileSpec() file.pack(resF) job.addFile(file) return job _logger.debug("peekJobLog() : PandaID %s not found" % pandaID) return None except: # roll back self._rollback() if iTry+1 < nTry: _logger.error("peekJobLog : %s %s %s" % (pandaID,type,value)) time.sleep(random.randint(10,20)) continue type, value, traceBack = sys.exc_info() _logger.error("peekJobLog : %s %s" % (type,value)) # return None return None | 23213e61ab8dd53c22fecb26ec5cecc346fd3333 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7525/23213e61ab8dd53c22fecb26ec5cecc346fd3333/OraDBProxy.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8032,
2278,
1343,
12,
2890,
16,
84,
464,
69,
734,
4672,
2879,
273,
296,
1748,
2383,
3886,
18,
347,
3839,
2278,
1343,
1195,
11,
389,
4901,
18,
4148,
2932,
347,
3839,
2278,
294,
738,
87,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8032,
2278,
1343,
12,
2890,
16,
84,
464,
69,
734,
4672,
2879,
273,
296,
1748,
2383,
3886,
18,
347,
3839,
2278,
1343,
1195,
11,
389,
4901,
18,
4148,
2932,
347,
3839,
2278,
294,
738,
87,... |
os.system(cmd) if self.lib_ranlib: | failure = os.system(cmd) if failure: raise FortranBuildError,\ 'failure during build (exit status = %s)'%failure if self.lib_ranlib and not skip_ranlib: | def create_static_lib(self, object_files, library_name, output_dir='', debug=None): lib_file = os.path.join(output_dir, self.lib_prefix+library_name+self.lib_suffix) objects = string.join(object_files) if objects: cmd = '%s%s %s' % (self.lib_ar,lib_file,objects) print yellow_text(cmd) os.system(cmd) if self.lib_ranlib: # Digital compiler does not have ranlib (?). cmd = '%s %s' %(self.lib_ranlib,lib_file) print yellow_text(cmd) os.system(cmd) | efb1608fe16ebd999c51b4509f4072366caff768 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14925/efb1608fe16ebd999c51b4509f4072366caff768/build_flib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
67,
3845,
67,
2941,
12,
2890,
16,
733,
67,
2354,
16,
5313,
67,
529,
16,
876,
67,
1214,
2218,
2187,
1198,
33,
7036,
4672,
2561,
67,
768,
273,
1140,
18,
803,
18,
5701,
12,
2844,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3845,
67,
2941,
12,
2890,
16,
733,
67,
2354,
16,
5313,
67,
529,
16,
876,
67,
1214,
2218,
2187,
1198,
33,
7036,
4672,
2561,
67,
768,
273,
1140,
18,
803,
18,
5701,
12,
2844,
... |
data.parameter = str(value.toString()) | def setData(self, index, value, role=Qt.EditRole): """change data in the model""" if not index.isValid(): return False try: dirty = False column = index.column() item = index.internalPointer() data = item.content if role == Qt.EditRole: if isinstance(data, Ruleset) and column == 0: name = str(value.toString()) oldName = data.name data.rename(english.get(name, name)) dirty |= oldName!= data.name elif isinstance(data, Ruleset) and column == 3: if data.description != unicode(value.toString()): dirty = True data.description = unicode(value.toString()) elif isinstance(data, Rule): ruleset = item.ruleset() if column == 0: name = str(value.toString()) if data.name != english.get(name, name): dirty = True data.name = english.get(name, name) elif column == 1: if data.parType is int: if data.parameter != value.toInt()[0]: dirty = True data.parameter = value.toInt()[0] elif data.parType is bool: return False elif data.parType is str: if data.parameter != str(value.toString()): dirty = True data.parameter = str(value.toString()) else: newval = value.toInt()[0] if data.parameter != str(value.toString()): dirty = True data.parameter = str(value.toString()) elif column == 2: if data.score.unit != value.toInt()[0]: dirty = True data.score.unit = value.toInt()[0] elif column == 3: if data.definition != str(value.toString()): dirty = True data.definition = str(value.toString()) else: logException('rule column %d not implemented' % column) return False else: return False elif role == Qt.CheckStateRole: if isinstance(data, Rule) and column ==1: if data.parType is bool: newValue = value == Qt.Checked if data.parameter != newValue: dirty = True data.parameter = newValue else: return False if dirty: self.emit(SIGNAL("dataChanged(QModelIndex,QModelIndex)"), index, index) return True except BaseException: return False | 399779fc0a9c6b4c84875954abca3dc34e5f66cc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1679/399779fc0a9c6b4c84875954abca3dc34e5f66cc/rulesetselector.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7929,
12,
2890,
16,
770,
16,
460,
16,
2478,
33,
23310,
18,
4666,
2996,
4672,
3536,
3427,
501,
316,
326,
938,
8395,
309,
486,
770,
18,
26810,
13332,
327,
1083,
775,
30,
9603,
273,
1083,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7929,
12,
2890,
16,
770,
16,
460,
16,
2478,
33,
23310,
18,
4666,
2996,
4672,
3536,
3427,
501,
316,
326,
938,
8395,
309,
486,
770,
18,
26810,
13332,
327,
1083,
775,
30,
9603,
273,
1083,... | |
if ptrTargets.has_key(pathId): ptrTargets[pathId] = target | def restoreFile(fileObj, contents, root, target, journal, opJournal): opJournal.backup(target) | 67d47ccb49ca3204ea6fc5dec25b537048096261 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8747/67d47ccb49ca3204ea6fc5dec25b537048096261/update.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5217,
812,
12,
768,
2675,
16,
2939,
16,
1365,
16,
1018,
16,
13001,
16,
1061,
16336,
4672,
1061,
16336,
18,
9572,
12,
3299,
13,
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,
5217,
812,
12,
768,
2675,
16,
2939,
16,
1365,
16,
1018,
16,
13001,
16,
1061,
16336,
4672,
1061,
16336,
18,
9572,
12,
3299,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... | |
httpd = Lighttpd('c:/cygwin/tmp') | if (options.root is None) != (options.port is None): raise 'Either port or root is missing (need both, or neither)' httpd = Lighttpd('c:/cygwin/tmp', port=options.port, root=options.root) | def Stop(self, force=False): if not force and not self.IsRunning(): return | 2da95da3c557c70318900db9a9e06876dedf3e94 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9392/2da95da3c557c70318900db9a9e06876dedf3e94/http_server.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5131,
12,
2890,
16,
2944,
33,
8381,
4672,
309,
486,
2944,
471,
486,
365,
18,
2520,
7051,
13332,
327,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5131,
12,
2890,
16,
2944,
33,
8381,
4672,
309,
486,
2944,
471,
486,
365,
18,
2520,
7051,
13332,
327,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
from types import UnicodeType | def _do_query(self, q): from types import UnicodeType db = self._get_db() if type(q) is UnicodeType: q = q.encode(db.charset) db.query(q) self._do_get_result() return self.rowcount | 720a72604996e00d1f20fbf0fe062a3ca9927286 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10477/720a72604996e00d1f20fbf0fe062a3ca9927286/cursors.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2896,
67,
2271,
12,
2890,
16,
1043,
4672,
1319,
273,
365,
6315,
588,
67,
1966,
1435,
309,
618,
12,
85,
13,
353,
9633,
559,
30,
1043,
273,
1043,
18,
3015,
12,
1966,
18,
9999,
13,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2896,
67,
2271,
12,
2890,
16,
1043,
4672,
1319,
273,
365,
6315,
588,
67,
1966,
1435,
309,
618,
12,
85,
13,
353,
9633,
559,
30,
1043,
273,
1043,
18,
3015,
12,
1966,
18,
9999,
13,... | |
pass | from string import upper key = upper(event.keysym) if key == 'BACKSPACE' or key == 'LEFT': self.undo() elif key == 'RIGHT': self.redo() elif key == 'D': print 'Current position:' print self.board elif key == 'M': print 'All legal moves:' for patch in self.board.iterMove(('*', ), ('*', ), ('*', )): print patch | def keyRelease(self, event): pass | 62c88dc184b9451cbab757871822ad8127d8ecc6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5164/62c88dc184b9451cbab757871822ad8127d8ecc6/gboard.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
498,
7391,
12,
2890,
16,
871,
4672,
1342,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
498,
7391,
12,
2890,
16,
871,
4672,
1342,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
if self.numberOfBoxes>1: tx=tx+((self.numberOfBoxes-1)*self.boxSpacing) | if self.numberOfBoxes>1: tx=tx+((self.numberOfBoxes-1)*self.boxSpacing) | def _getDrawingDimensions(self): #find width of boxes+spacers tx=(self.numberOfBoxes*self.boxWidth) if self.numberOfBoxes>1: tx=tx+((self.numberOfBoxes-1)*self.boxSpacing) #add padding tx=tx+self.leftPadding+self.rightPadding #find height of grid+triangles ty=self.boxHeight+self.triangleHeight #add padding (and offset) ty=ty+self.topPadding+self.bottomPadding+self.sourceLabelOffset+self.sourceLabelFontSize #print (tx, ty) return (tx,ty) | 1a4c1fa27e25d7181b12cb1772c1e32db9507de6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3878/1a4c1fa27e25d7181b12cb1772c1e32db9507de6/slidebox.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
26885,
10796,
12,
2890,
4672,
468,
4720,
1835,
434,
14356,
15,
1752,
1077,
414,
2229,
28657,
2890,
18,
2696,
951,
29521,
14,
2890,
18,
2147,
2384,
13,
309,
365,
18,
2696,
951,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
26885,
10796,
12,
2890,
4672,
468,
4720,
1835,
434,
14356,
15,
1752,
1077,
414,
2229,
28657,
2890,
18,
2696,
951,
29521,
14,
2890,
18,
2147,
2384,
13,
309,
365,
18,
2696,
951,
... |
sage: region_plot([x^2+y^2<4, x>-1], (x, -2, 2), (y, -2, 2), incol='lightblue', bordercol='gray', plot_points=200).show(aspect_ratio=1) | sage: region_plot([x^2+y^2<4, x>-1], (x, -2, 2), (y, -2, 2), incol='lightblue', bordercol='gray', plot_points=200).show(aspect_ratio=1) | def region_plot(f, xrange, yrange, plot_points, incol, outcol, bordercol): r""" ``region_plot`` takes a boolean function of two variables, `f(x,y)` and plots the region where f is True over the specified ``xrange`` and ``yrange`` as demonstrated below. ``region_plot(f, (xmin, xmax), (ymin, ymax), ...)`` INPUT: - ``f`` -- a boolean function of two variables - ``(xmin, xmax)`` -- 2-tuple, the range of ``x`` values OR 3-tuple ``(x,xmin,xmax)`` - ``(ymin, ymax)`` -- 2-tuple, the range of ``y`` values OR 3-tuple ``(y,ymin,ymax)`` - ``plot_points`` -- integer (default: 100); number of points to plot in each direction of the grid - ``incol`` -- a color (default: ``'blue'``), the color inside the region - ``outcol`` -- a color (default: ``'white'``), the color of the outside of the region - ``bordercol`` -- a color (default: ``None``), the color of the border (``incol`` if not specified) EXAMPLES: Here we plot a simple function of two variables:: sage: x,y = var('x,y') sage: region_plot(cos(x^2+y^2) <= 0, (x, -3, 3), (y, -3, 3)) Here we play with the colors:: sage: region_plot(x^2+y^3 < 2, (x, -2, 2), (y, -2, 2), incol='lightblue', bordercol='gray') An even more complicated plot:: sage: region_plot(sin(x)*sin(y) >= 1/4, (x,-10,10), (y,-10,10), incol='yellow', bordercol='black', plot_points=250) A disk centered at the origin:: sage: region_plot(x^2+y^2<1, (x,-1,1), (y,-1,1)).show(aspect_ratio=1) A plot with more than one condition:: sage: region_plot([x^2+y^2<1, x<y], (x,-2,2), (y,-2,2)) Since it doesn't look very good, let's increase plot_points:: sage: region_plot([x^2+y^2<1, x<y], (x,-2,2), (y,-2,2), plot_points=400).show(aspect_ratio=1) #long time The first quadrant of the unit circle:: sage: region_plot([y>0, x>0, x^2+y^2<1], (-1.1, 1.1), (-1.1, 1.1), plot_points = 400).show(aspect_ratio=1) Here is another plot:: sage: region_plot(x*(x-1)*(x+1)+y^2<0, (x, -3, 2), (y, -3, 3), incol='lightblue', bordercol='gray', plot_points=50) If we want to keep only the region where x is positive:: sage: region_plot([x*(x-1)*(x+1)+y^2<0, x>-1], (x, -3, 2), (y, -3, 3), incol='lightblue', bordercol='gray', plot_points=50) Here we have a cut circle:: sage: region_plot([x^2+y^2<4, x>-1], (x, -2, 2), (y, -2, 2), incol='lightblue', bordercol='gray', plot_points=200).show(aspect_ratio=1) #long time """ from sage.plot.plot import Graphics from sage.plot.misc import setup_for_eval_on_grid if not isinstance(f, (list, tuple)): f = [f] variables = reduce(lambda g1, g2: g1.union(g2), [set(g.variables()) for g in f], set([])) f = [equify(g, variables) for g in f] g, ranges = setup_for_eval_on_grid(f, [xrange, yrange], plot_points) xrange,yrange=[r[:2] for r in ranges] xy_data_arrays = map(lambda g: [[g(x, y) for x in xsrange(*ranges[0], include_endpoint=True)] for y in xsrange(*ranges[1], include_endpoint=True)], g) xy_data_array = map(lambda *rows: map(lambda *vals: mangle_neg(vals), *rows), *xy_data_arrays) from matplotlib.colors import ListedColormap incol = rgbcolor(incol) outcol = rgbcolor(outcol) cmap = ListedColormap([incol, outcol]) cmap.set_over(outcol) cmap.set_under(incol) g = Graphics() g.add_primitive(ContourPlot(xy_data_array, xrange,yrange, dict(plot_points=plot_points, contours=[-1e307, 0, 1e307], cmap=cmap, fill=True))) if bordercol is not None: bordercol = rgbcolor(bordercol) g.add_primitive(ContourPlot(xy_data_array, xrange, yrange, dict(plot_points=plot_points, contours=[0], cmap=[bordercol], fill=False))) return g | 193e4ecc8643b94b550be6610365db125959929a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/193e4ecc8643b94b550be6610365db125959929a/contour_plot.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3020,
67,
4032,
12,
74,
16,
12314,
16,
677,
3676,
16,
3207,
67,
4139,
16,
316,
1293,
16,
596,
1293,
16,
5795,
1293,
4672,
436,
8395,
12176,
6858,
67,
4032,
10335,
5530,
279,
1250,
445,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3020,
67,
4032,
12,
74,
16,
12314,
16,
677,
3676,
16,
3207,
67,
4139,
16,
316,
1293,
16,
596,
1293,
16,
5795,
1293,
4672,
436,
8395,
12176,
6858,
67,
4032,
10335,
5530,
279,
1250,
445,... |
return res | print 'ascii error' return res | def tr(s): res = '' for c in s: if trans.has_key(c): res = res + trans[c] else: res = res + c try: return res.encode('ascii','replace') except: return res | 6a7c815ad435701fa16c87253fc864e5ce882af6 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7397/6a7c815ad435701fa16c87253fc864e5ce882af6/dta_wizard.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
433,
12,
87,
4672,
400,
273,
875,
364,
276,
316,
272,
30,
309,
906,
18,
5332,
67,
856,
12,
71,
4672,
400,
273,
400,
397,
906,
63,
71,
65,
469,
30,
400,
273,
400,
397,
276,
775,
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,
433,
12,
87,
4672,
400,
273,
875,
364,
276,
316,
272,
30,
309,
906,
18,
5332,
67,
856,
12,
71,
4672,
400,
273,
400,
397,
906,
63,
71,
65,
469,
30,
400,
273,
400,
397,
276,
775,
3... |
xml_menu = gtk.glade.XML(get_abspath("glade/goghglade.glade"), root="brush_list_menu") xml_menu.signal_autoconnect(self) self.brush_list_menu = xml_menu.get_widget("brush_list_menu") self.delete_brush_menu_item = xml_menu.get_widget("delete_brush_menu_item") self.rename_brush_menu_item = xml_menu.get_widget("rename_brush_menu_item") | self.xml_menu = gtk.glade.XML(get_abspath("glade/goghglade.glade"), root="brush_list_menu") self.xml_menu.signal_autoconnect(self) | def __init__(self, brush_manager): self.brush_manager = brush_manager | 12c59abc60af1ac8a39bea57767f2c91deef4cf2 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/704/12c59abc60af1ac8a39bea57767f2c91deef4cf2/brushmanagementdialog.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
5186,
1218,
67,
4181,
4672,
365,
18,
2848,
1218,
67,
4181,
273,
5186,
1218,
67,
4181,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
5186,
1218,
67,
4181,
4672,
365,
18,
2848,
1218,
67,
4181,
273,
5186,
1218,
67,
4181,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
raise ValueError("__package__ not set to a string") base = package.rsplit('.', level)[0] | raise ValueError("'package' not set to a string") try: dot_rindex = package.rindex('.', level)[0] base = package[:dot_rindex] except ValueError: base = package | def _resolve_name(name, package, level): """Return the absolute name of the module to be imported.""" level -= 1 try: if package.count('.') < level: raise ValueError("attempted relative import beyond top-level " "package") except AttributeError: raise ValueError("__package__ not set to a string") base = package.rsplit('.', level)[0] if name: return "%s.%s" % (base, name) else: return base | 507944ee06f81bb6192f63ac37f984cf127d93f9 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3187/507944ee06f81bb6192f63ac37f984cf127d93f9/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
10828,
67,
529,
12,
529,
16,
2181,
16,
1801,
4672,
3536,
990,
326,
4967,
508,
434,
326,
1605,
358,
506,
9101,
12123,
1801,
3947,
404,
775,
30,
309,
2181,
18,
1883,
2668,
1093,
13,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
10828,
67,
529,
12,
529,
16,
2181,
16,
1801,
4672,
3536,
990,
326,
4967,
508,
434,
326,
1605,
358,
506,
9101,
12123,
1801,
3947,
404,
775,
30,
309,
2181,
18,
1883,
2668,
1093,
13,... |
if not self.connected: return | def disconnect(self, message="", volontary=False): """Hang up the connection. | 8445c04d75ea5033ea75d46637922a54ab654cec /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9915/8445c04d75ea5033ea75d46637922a54ab654cec/irclib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9479,
12,
2890,
16,
883,
1546,
3113,
6626,
1580,
814,
33,
8381,
4672,
3536,
44,
539,
731,
326,
1459,
18,
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,
9479,
12,
2890,
16,
883,
1546,
3113,
6626,
1580,
814,
33,
8381,
4672,
3536,
44,
539,
731,
326,
1459,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... | |
if isinstance(x, polynomial_element.Polynomial): return number_field_element.NumberFieldElement(self, x) | def _coerce_non_number_field_element_in(self, x): """ Coerce a non-number field element x into this number field. | 460ae5fce710fa3555d88b087536805b6b8cccfe /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/460ae5fce710fa3555d88b087536805b6b8cccfe/number_field.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2894,
2765,
67,
5836,
67,
2696,
67,
1518,
67,
2956,
67,
267,
12,
2890,
16,
619,
4672,
3536,
7695,
2765,
279,
1661,
17,
2696,
652,
930,
619,
1368,
333,
1300,
652,
18,
2,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2894,
2765,
67,
5836,
67,
2696,
67,
1518,
67,
2956,
67,
267,
12,
2890,
16,
619,
4672,
3536,
7695,
2765,
279,
1661,
17,
2696,
652,
930,
619,
1368,
333,
1300,
652,
18,
2,
-100,
-1... | |
sigma_mm = self(energy) | sigma_mm = self.retarded(energy) | def get_lambda(self, energy): """Return the lambda (aka Gamma) defined by i(S-S^d). | 05af04f616019b732e7a1e562da3690888ffe5d5 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1380/05af04f616019b732e7a1e562da3690888ffe5d5/selfenergy.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
14661,
12,
2890,
16,
12929,
4672,
3536,
990,
326,
3195,
261,
581,
69,
25409,
13,
2553,
635,
277,
12,
55,
17,
55,
66,
72,
2934,
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,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
14661,
12,
2890,
16,
12929,
4672,
3536,
990,
326,
3195,
261,
581,
69,
25409,
13,
2553,
635,
277,
12,
55,
17,
55,
66,
72,
2934,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
self.yOffset - 20, | self.yOffset, | def DrawCells(self, dc): self._doDrawingCalculations() self.canvasItemList = [] # Delegate the drawing of each day startDay = self.blockItem.rangeStart + \ DateTime.RelativeDateTime(days=-6, weekday=(DateTime.Sunday, 0)) | 676715d0ad0f95352cb1b42279dfde6411efbad9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/676715d0ad0f95352cb1b42279dfde6411efbad9/CalendarCanvas.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10184,
10505,
12,
2890,
16,
6744,
4672,
365,
6315,
2896,
26885,
4844,
1012,
1435,
365,
18,
15424,
1180,
682,
273,
5378,
225,
468,
27687,
326,
16327,
434,
1517,
2548,
787,
4245,
273,
365,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10184,
10505,
12,
2890,
16,
6744,
4672,
365,
6315,
2896,
26885,
4844,
1012,
1435,
365,
18,
15424,
1180,
682,
273,
5378,
225,
468,
27687,
326,
16327,
434,
1517,
2548,
787,
4245,
273,
365,
... |
raise SkipTest( 'test is broken, relies on order of test execution and numeric ids') accepted = support.add_comment('Accepted Comment', node_id=3, | session = Session() nodes = session.query(Node).all() node = nodes[7] session.close() accepted = support.add_comment('Accepted Comment', node_id=node.id, | def test_moderation(support): raise SkipTest( 'test is broken, relies on order of test execution and numeric ids') accepted = support.add_comment('Accepted Comment', node_id=3, displayed=False) rejected = support.add_comment('Rejected comment', node_id=3, displayed=False) # Make sure the moderation_callback is called. assert called == True # Make sure the user must be a moderator. raises(UserNotAuthorizedError, support.accept_comment, accepted['id']) raises(UserNotAuthorizedError, support.reject_comment, accepted['id']) support.accept_comment(accepted['id'], moderator=True) support.reject_comment(rejected['id'], moderator=True) comments = support.get_data(3)['comments'] assert len(comments) == 1 comments = support.get_data(3, moderator=True)['comments'] assert len(comments) == 1 | b4284e15aa755b6013eab52eba86fe564730d347 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7032/b4284e15aa755b6013eab52eba86fe564730d347/test_websupport.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
1711,
7067,
12,
13261,
4672,
1339,
273,
3877,
1435,
2199,
273,
1339,
18,
2271,
12,
907,
2934,
454,
1435,
756,
273,
2199,
63,
27,
65,
1339,
18,
4412,
1435,
8494,
273,
2865,
18... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
1711,
7067,
12,
13261,
4672,
1339,
273,
3877,
1435,
2199,
273,
1339,
18,
2271,
12,
907,
2934,
454,
1435,
756,
273,
2199,
63,
27,
65,
1339,
18,
4412,
1435,
8494,
273,
2865,
18... |
topgroup.add_actions([('Quit', gtk.STOCK_QUIT, '_Quit me!', None, 'Quit the Program', self.quit_cb), | topgroup.add_actions([('Quit', gtk.STOCK_QUIT, None, None, 'Quit the Program', self.quit_cb), | def __init__(self): # Create the toplevel window | 519576c119f92e6ac065e98706ed8525727550b6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2237/519576c119f92e6ac065e98706ed8525727550b6/khagan.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
468,
1788,
326,
28999,
2742,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
468,
1788,
326,
28999,
2742,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
In case you want only log the length, use keyword `Get Length` from BuiltIn library. | If you only want to log the size, use keyword `Get Length` from the BuiltIn library. | def log_dictionary(self, dictionary, level='INFO'): """Logs given `dictionary's` length and content with given `level` Valid levels are TRACE, DEBUG, INFO (default), and WARN. In case you want only log the length, use keyword `Get Length` from BuiltIn library. """ print '*%s* ' % (_validate_log_level(level)), if len(dictionary) == 0: print 'Dictionary is empty' elif len(dictionary) == 1: print "Dictionary has one item '%s: %s'" % (dictionary.items()[0]) else: print "Dictionary length is '%s'" % (len(dictionary)) for key in self.get_dictionary_keys(dictionary): print '%s: %s' % (key, dictionary[key]) | de39b6e29004a5333c4bba068a24007a666cf2eb /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6988/de39b6e29004a5333c4bba068a24007a666cf2eb/Collections.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
613,
67,
15556,
12,
2890,
16,
3880,
16,
1801,
2218,
5923,
11,
4672,
3536,
7777,
864,
1375,
15556,
1807,
68,
769,
471,
913,
598,
864,
1375,
2815,
68,
225,
2364,
7575,
854,
12734,
16,
63... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
613,
67,
15556,
12,
2890,
16,
3880,
16,
1801,
2218,
5923,
11,
4672,
3536,
7777,
864,
1375,
15556,
1807,
68,
769,
471,
913,
598,
864,
1375,
2815,
68,
225,
2364,
7575,
854,
12734,
16,
63... |
html = "%d / %d " % (status_count_subset.get(6, 0), | html = "%d / %d " % (status_count_subset.get(good, 0), | def status_html(db, box_data, shade): """ status_count: dict mapping from status (integer key) to count eg. { 'GOOD' : 4, 'FAIL' : 1 } """ status_count_subset = box_data.status_count.copy() test_na = db.status_idx['TEST_NA'] running = db.status_idx['RUNNING'] status_count_subset[test_na] = 0 # Don't count TEST_NA status_count_subset[running] = 0 # Don't count RUNNING html = "%d / %d " % (status_count_subset.get(6, 0), sum(status_count_subset.values())) if test_na in box_data.status_count.keys(): html += ' (%d N/A)' % box_data.status_count[test_na] if running in box_data.status_count.keys(): html += ' (%d running)' % box_data.status_count[running] if box_data.reasons_list: reasons_list = box_data.reasons_list aggregated_reasons_list = \ reason_qualifier.aggregate_reason_fields(reasons_list) for reason in aggregated_reasons_list: ## a bit of more postprocessing ## to look nicer in a cell ## in future: to do subtable within the cell reason = reason.replace('<br>','\n') reason = reason.replace('<','[').replace('>',']') reason = reason.replace('|','\n').replace('&',' AND ') reason = reason.replace('\n','<br>') html += '<br>' + reason tooltip = "" for status in sorted(box_data.status_count.keys(), reverse = True): status_word = db.status_word[status] tooltip += "%d %s " % (box_data.status_count[status], status_word) return (html,tooltip) | eac120ffe3ffb3f3634e05410ec690c60690ed5b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12268/eac120ffe3ffb3f3634e05410ec690c60690ed5b/display.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1267,
67,
2620,
12,
1966,
16,
3919,
67,
892,
16,
699,
2486,
4672,
3536,
1267,
67,
1883,
30,
2065,
2874,
628,
1267,
261,
7745,
498,
13,
358,
1056,
9130,
18,
288,
296,
16387,
1212,
11,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1267,
67,
2620,
12,
1966,
16,
3919,
67,
892,
16,
699,
2486,
4672,
3536,
1267,
67,
1883,
30,
2065,
2874,
628,
1267,
261,
7745,
498,
13,
358,
1056,
9130,
18,
288,
296,
16387,
1212,
11,
... |
return dict([(a["id"], "%s (%s)" % (a['email_id'], a['name'])) for a in self.read(cr, uid, ids, ['name', 'email_id'], context=context)]) | return [(a["id"], "%s (%s)" % (a['email_id'], a['name'])) for a in self.read(cr, uid, ids, ['name', 'email_id'], context=context)] | def name_get(self, cr, uid, ids, context=None): return dict([(a["id"], "%s (%s)" % (a['email_id'], a['name'])) for a in self.read(cr, uid, ids, ['name', 'email_id'], context=context)]) | 9dad4a098e637ab9e45ef7b483634d0571cfda52 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/9dad4a098e637ab9e45ef7b483634d0571cfda52/email_template_account.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
508,
67,
588,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
819,
33,
7036,
4672,
327,
2065,
3816,
12,
69,
9614,
350,
6,
6487,
2213,
87,
6142,
87,
2225,
738,
261,
69,
3292,
3652,
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,
508,
67,
588,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
819,
33,
7036,
4672,
327,
2065,
3816,
12,
69,
9614,
350,
6,
6487,
2213,
87,
6142,
87,
2225,
738,
261,
69,
3292,
3652,
67,
... |
self.max_adjustment.set_value(self.layer.max_get(self.src_index)) self.max_entry.set_text(str(self.layer.max_get(self.src_index))) nodata = self.layer.nodata_get(self.src_index) | self.max_entry.set_text(str(new_max)) nodata = self.layer.nodata_get(idx) | def gui_refresh(self, *args): if self.layer is None: return | 30093beb2981ba47380749a3f1c597965f66f39e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11090/30093beb2981ba47380749a3f1c597965f66f39e/gvrasterpropdlg.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13238,
67,
9144,
12,
2890,
16,
380,
1968,
4672,
309,
365,
18,
6363,
353,
599,
30,
327,
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,
13238,
67,
9144,
12,
2890,
16,
380,
1968,
4672,
309,
365,
18,
6363,
353,
599,
30,
327,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
self._id = changeid | def __init__(self, repo, changeid): """changeid is a revision number, node, or tag""" self._repo = repo self._id = changeid | 5fde7534a11ea9e7fff05a74aed2f6ace16f849e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11312/5fde7534a11ea9e7fff05a74aed2f6ace16f849e/context.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
3538,
16,
2549,
350,
4672,
3536,
3427,
350,
353,
279,
6350,
1300,
16,
756,
16,
578,
1047,
8395,
365,
6315,
7422,
273,
3538,
365,
6315,
350,
273,
2549,
35... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
3538,
16,
2549,
350,
4672,
3536,
3427,
350,
353,
279,
6350,
1300,
16,
756,
16,
578,
1047,
8395,
365,
6315,
7422,
273,
3538,
365,
6315,
350,
273,
2549,
35... | |
v = cimarron.skin.VBox(parent=self.window) h1 = cimarron.skin.HBox(parent=v) h2 = cimarron.skin.HBox(parent=v) | v = cimarron.skin.VBox(parent=self.window, expand=True, fill=True) h1 = cimarron.skin.HBox(parent=v, expand=False, fill=True) h2 = cimarron.skin.HBox(parent=v, expand=False, fill=False) | def __init__(self, **kw): super(ReceiptWindow, self).__init__(**kw) self.window.title = "Receipt Generation" self.trans = Transaction() self.target=Receipt(date=today()) self.trans.track(self.target) | eac7a5dc4687150d3201de8722496c96412771c7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2219/eac7a5dc4687150d3201de8722496c96412771c7/receipt.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
2826,
9987,
4672,
2240,
12,
15636,
3829,
16,
365,
2934,
972,
2738,
972,
12,
636,
9987,
13,
365,
18,
5668,
18,
2649,
273,
315,
15636,
23234,
6,
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,
1001,
2738,
972,
12,
2890,
16,
2826,
9987,
4672,
2240,
12,
15636,
3829,
16,
365,
2934,
972,
2738,
972,
12,
636,
9987,
13,
365,
18,
5668,
18,
2649,
273,
315,
15636,
23234,
6,
365,
18,
... |
i = self.childNodes.index(refchild) | for i, childNode in enumerate(self.childNodes): if childNode is oldchild: break else: raise ValueError, oldchild | def replaceChild(self, newchild, oldchild): """ Replace an existing node with a new node. It must be the case that oldchild is a child of this node; if not, ValueError is raised. newchild is returned. """ i = self.childNodes.index(refchild) self.childNodes[i].parentNode = None self.childNodes[i] = newchild newchild.parentNode = self self._verifyChildren(i) return newchild | 7d923a14cd75879abfbac18fd6b00ef126fb1f9f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5758/7d923a14cd75879abfbac18fd6b00ef126fb1f9f/ligolw.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1453,
1763,
12,
2890,
16,
394,
3624,
16,
1592,
3624,
4672,
3536,
6910,
392,
2062,
756,
598,
279,
394,
756,
18,
2597,
1297,
506,
326,
648,
716,
1592,
3624,
353,
279,
1151,
434,
333,
756... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1453,
1763,
12,
2890,
16,
394,
3624,
16,
1592,
3624,
4672,
3536,
6910,
392,
2062,
756,
598,
279,
394,
756,
18,
2597,
1297,
506,
326,
648,
716,
1592,
3624,
353,
279,
1151,
434,
333,
756... |
else: | elif vfs.exists('%s/documents' % target): | def inspect_documents(target): index = target.open('index').read() docs = target.open('documents').read() n = len(index) / 8 for i in range(n): base = i * 8 pointer = decode_link(index[base:base+4]) if pointer is None: continue print 'DOC', i size = decode_uint32(index[base+4:base+8]) doc = docs[pointer:pointer+size] while doc: first_byte = decode_byte(doc[0]) doc = doc[1:] fn, is_stored = first_byte & 127, first_byte & 128 if is_stored: value, doc = decode_string(doc) print '%s (STORED)' % fn, repr(value) else: n_terms, doc = decode_vint(doc) values = [] for j in range(n_terms): value, doc = decode_string(doc) values.append(value) print '%s (NOT STORED)' % fn, values print | 727f6d1de61aa5c9da4ffa0959a762b9eb8ce9de /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12681/727f6d1de61aa5c9da4ffa0959a762b9eb8ce9de/icatalog-inspect.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5334,
67,
24795,
12,
3299,
4672,
770,
273,
1018,
18,
3190,
2668,
1615,
16063,
896,
1435,
3270,
273,
1018,
18,
3190,
2668,
24795,
16063,
896,
1435,
225,
290,
273,
562,
12,
1615,
13,
342,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5334,
67,
24795,
12,
3299,
4672,
770,
273,
1018,
18,
3190,
2668,
1615,
16063,
896,
1435,
3270,
273,
1018,
18,
3190,
2668,
24795,
16063,
896,
1435,
225,
290,
273,
562,
12,
1615,
13,
342,
... |
bernoulli = bernoulli_gen(a=0,b=1,name='bernoulli',shapes="pr",extradoc=""" | def _entropy(self, pr): return -pr*log(pr)-(1-pr)*log(1-pr) bernoulli = bernoulli_gen(b=1,name='bernoulli',shapes="pr",extradoc=""" | def _stats(self, pr): return binom_gen._stats(self, 1, pr) | e30c53e4e1f48dd6cf050ad084549d4fe72837b5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/e30c53e4e1f48dd6cf050ad084549d4fe72837b5/distributions.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
5296,
12,
2890,
16,
846,
4672,
327,
4158,
362,
67,
4507,
6315,
5296,
12,
2890,
16,
404,
16,
846,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
5296,
12,
2890,
16,
846,
4672,
327,
4158,
362,
67,
4507,
6315,
5296,
12,
2890,
16,
404,
16,
846,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
"""Moves the review cursor to the bottom line of the current navigator object""" | def script_review_bottom(self,keyPress,nextScript): """Moves the review cursor to the bottom line of the current navigator object""" obj=api.getNavigatorObject() if isinstance(obj,NVDAObjects.baseType.NVDAObject): obj.script_text_review_bottom(keyPress,None) else: audio.speakMessage(_("no navigator object")) | c6388e71ad509ca538ed8be17f21eeb912f2f689 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9340/c6388e71ad509ca538ed8be17f21eeb912f2f689/_default.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2728,
67,
16041,
67,
9176,
12,
2890,
16,
856,
11840,
16,
4285,
3651,
4672,
1081,
33,
2425,
18,
588,
22817,
921,
1435,
309,
1549,
12,
2603,
16,
11679,
9793,
4710,
18,
1969,
559,
18,
116... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2728,
67,
16041,
67,
9176,
12,
2890,
16,
856,
11840,
16,
4285,
3651,
4672,
1081,
33,
2425,
18,
588,
22817,
921,
1435,
309,
1549,
12,
2603,
16,
11679,
9793,
4710,
18,
1969,
559,
18,
116... | |
r = Renderer() r.setOption( "gl:mode", StringData( "deferred" ) ) r.setOption( "gl:searchPath:shader", StringData( os.path.dirname( __file__ ) + "/shaders" ) ) r.worldBegin() | r = Renderer() r.setOption( "gl:mode", StringData( "immediate" ) ) r.setOption( "gl:searchPath:shader", StringData( os.path.dirname( __file__ ) + "/shaders" ) ) r.display( os.path.dirname( __file__ ) + "/output/testStackBug.tif", "tiff", "rgba", {} ) r.worldBegin() | def testStackBug( self ) : # This should produce a yellow sphere in between two red spheres. r = Renderer() r.setOption( "gl:mode", StringData( "deferred" ) ) r.setOption( "gl:searchPath:shader", StringData( os.path.dirname( __file__ ) + "/shaders" ) ) r.worldBegin() #w = SceneViewer( "scene", r.scene() ) r.shader( "surface", "rgbColor", { "red" : FloatData( 1 ), "green" : FloatData( 0 ), "blue" : FloatData( 0 ) } ) r.concatTransform( M44f.createTranslated( V3f( 0, 0, -5 ) ) ) r.attributeBegin() | 686f08c6e1e459dbc1884fe646a6bd99017df827 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9042/686f08c6e1e459dbc1884fe646a6bd99017df827/Renderer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
2624,
19865,
12,
365,
262,
294,
225,
468,
1220,
1410,
11402,
279,
20614,
20041,
316,
3086,
2795,
1755,
272,
844,
11737,
18,
225,
436,
273,
17589,
1435,
436,
18,
542,
1895,
12,
315,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2624,
19865,
12,
365,
262,
294,
225,
468,
1220,
1410,
11402,
279,
20614,
20041,
316,
3086,
2795,
1755,
272,
844,
11737,
18,
225,
436,
273,
17589,
1435,
436,
18,
542,
1895,
12,
315,... |
diffs = [value for value in L2 if not L1.count(value) > 0 ] default = 'Following values were not found from first list: ' default += ', '.join(diffs) _verify_condition(len(diffs) == 0, default, msg, values) | diffs = ', '.join([ str(item) for item in L2 if item not in L1 ]) default = 'Following values were not found from first list: ' + diffs _verify_condition(diffs == '', default, msg, values) | def list_should_contain_sub_list(self, L1, L2, msg=None, values=True): """Fails if not all of the elements in L2 are found in L1. The order of values and the number of values are not taken into acount. See the use of 'msg' and 'values' from the 'List Should Be Equal' keyword. """ diffs = [value for value in L2 if not L1.count(value) > 0 ] default = 'Following values were not found from first list: ' default += ', '.join(diffs) _verify_condition(len(diffs) == 0, default, msg, values) | 2f5075140c0afeaf5bda26b5924aceb3478d1a14 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7408/2f5075140c0afeaf5bda26b5924aceb3478d1a14/Collections.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
666,
67,
13139,
67,
28744,
67,
1717,
67,
1098,
12,
2890,
16,
511,
21,
16,
511,
22,
16,
1234,
33,
7036,
16,
924,
33,
5510,
4672,
3536,
30800,
309,
486,
777,
434,
326,
2186,
316,
511,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
666,
67,
13139,
67,
28744,
67,
1717,
67,
1098,
12,
2890,
16,
511,
21,
16,
511,
22,
16,
1234,
33,
7036,
16,
924,
33,
5510,
4672,
3536,
30800,
309,
486,
777,
434,
326,
2186,
316,
511,
... |
file = logConf.get('file', "rundeps.dot") | file = depsLogConf.get('file', "rundeps.dot") | def depsToDotFile(logConf, gr): if logConf.get('format', None): format = mode = None format = logConf.get('format') if format.find('/')>-1: format, mode = format.split('/',1) # e.g. 'dot/span-tree-only' if format == 'dot': classRoot = logConf.get('root') # get the spanning tree from the root node st, op = gr.breadth_first_search(root=classRoot) # and create a new graph from it gr1 = graph.digraph() st_nodes = set(st.keys() + st.values()) # add nodes # - rather gr.add_nodes(st), go through indiviudal nodes for coloring for cid in st_nodes: if cid == None: # None is introduced in st continue fsize = self._classes[cid]['size'] if fsize > 20000: color = "red" elif fsize > 5000: color = "green" else: color = "blue" gr1.add_node(cid, attrs=[("color", color)]) # add edges # - rather gr.add_spanning_tree(st), go through individual edges for coloring for v in st.iteritems(): if None in v: # drop edges with a None node continue v2, v1 = v if gr.has_edge(v1,v2): gr1.add_edge(v1, v2, attrs=gr.get_edge_attributes(v1, v2)) else: gr1.add_edge(v1, v2, ) if not mode or not mode == "span-tree-only": # add additional dependencies for v1 in st_nodes: # that are not covered by the span tree for v2 in st_nodes: if gr.has_edge(v1, v2): gr1.add_edge(v1, v2, attrs=gr.get_edge_attributes(v1, v2)) # write dot file if dset == "loadtime": file = logConf.get('file', "loaddeps.dot") elif dset == "runtime": file = logConf.get('file', "rundeps.dot") else: file = logConf.get('file', "deps.dot") dot = gr1.write(fmt='dotwt') self._console.info("Writing dependency graph to file: %s" % file) open(file, 'w').write(dot) return | c18752e3a6a20f73f8cace28d0b3ee01558d13f0 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5718/c18752e3a6a20f73f8cace28d0b3ee01558d13f0/Generator.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8740,
774,
10412,
812,
12,
1330,
3976,
16,
3821,
4672,
309,
613,
3976,
18,
588,
2668,
2139,
2187,
599,
4672,
740,
273,
1965,
273,
599,
740,
273,
613,
3976,
18,
588,
2668,
2139,
6134,
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,
8740,
774,
10412,
812,
12,
1330,
3976,
16,
3821,
4672,
309,
613,
3976,
18,
588,
2668,
2139,
2187,
599,
4672,
740,
273,
1965,
273,
599,
740,
273,
613,
3976,
18,
588,
2668,
2139,
6134,
3... |
self.titleFont = wxFont(16, wxSWISS, wxNORMAL, | self.titleFont = wxFont(16, wxSWISS, wxNORMAL, | def OnInit(self): self.titleFont = wxFont(16, wxSWISS, wxNORMAL, wxNORMAL, false, "Arial") #create splitter window self.twoPane = wxSplitterWindow(self, -1) self.twoPane.SetMinimumPaneSize(100) # prevent unsplitting #create main UI elements self.titleText = wxStaticText(self, -1, self.model.displayName) self.titleText.SetFont(self.titleFont) self.urlTextArea = wxTextCtrl(self, -1, "",style=wxTE_PROCESS_ENTER) self.addURLButton = wxButton(self, 10, "Add") self.addURLButton.SetSize((45, -1)) self.addURLButton.SetToolTipString(_("Add me")) #self.addURLButton.SetDefault() self.RSSIndexView = wxZaoBaoIndexView(self.twoPane, -1, style=wxLC_REPORT|wxSUNKEN_BORDER|wxLC_SINGLE_SEL) self.RSSItemView = wxZaoBaoItemView(self.twoPane, -1,path=self.model.path + os.sep) self.RSSIndexView.setItemView(self.RSSItemView) self.twoPane.SplitHorizontally(self.RSSIndexView, self.RSSItemView) self.twoPane.SetSashPosition(250) self.__do_layout() self.__doMenus() | 5c86baf06c63bdcf84fd1a01c5bb09b741e40c14 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/5c86baf06c63bdcf84fd1a01c5bb09b741e40c14/ZaoBaoViewer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2755,
2570,
12,
2890,
4672,
365,
18,
2649,
5711,
273,
7075,
5711,
12,
2313,
16,
7075,
18746,
25689,
16,
7075,
15480,
16,
7075,
15480,
16,
629,
16,
315,
37,
566,
287,
7923,
225,
468,
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,
2755,
2570,
12,
2890,
4672,
365,
18,
2649,
5711,
273,
7075,
5711,
12,
2313,
16,
7075,
18746,
25689,
16,
7075,
15480,
16,
7075,
15480,
16,
629,
16,
315,
37,
566,
287,
7923,
225,
468,
26... |
def test_miro_bugzilla_detects_closedness(self, mock_xml_opener): | def test_old_miro_bugzilla_detects_closedness(self, mock_xml_opener): | def test_miro_bugzilla_detects_closedness(self, mock_xml_opener): cooked_xml = open(os.path.join( settings.MEDIA_ROOT, 'sample-data', 'miro-2294-2009-08-06.xml')).read().replace( 'NEW', 'CLOSED') mock_xml_opener.return_value = lxml.etree.XML(cooked_xml) | 17efed81e69d5308ace945d00c2e68f26cc3efe1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11976/17efed81e69d5308ace945d00c2e68f26cc3efe1/tests.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
1673,
67,
9197,
303,
67,
925,
15990,
67,
16518,
87,
67,
12204,
4496,
12,
2890,
16,
5416,
67,
2902,
67,
25098,
4672,
15860,
329,
67,
2902,
273,
1696,
12,
538,
18,
803,
18,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
1673,
67,
9197,
303,
67,
925,
15990,
67,
16518,
87,
67,
12204,
4496,
12,
2890,
16,
5416,
67,
2902,
67,
25098,
4672,
15860,
329,
67,
2902,
273,
1696,
12,
538,
18,
803,
18,
5... |
normal="SumEventStamped", selected="SumEventStamped-Reversed", | normal="EventStamped", selected="EventStampedSelected", | def makeStates(self): states = [ BitmapInfo(stateName="SumEvent.Unstamped", normal=attributeEditors.IconAttributeEditor.noImage, selected=attributeEditors.IconAttributeEditor.noImage, rollover="EventTicklerRollover", rolloverselected="EventTicklerRolloverSelected", mousedown="EventTicklerMousedown"), BitmapInfo(stateName="SumEvent.Stamped", normal="SumEventStamped", selected="SumEventStamped-Reversed", rollover="EventTicklerRollover", rolloverselected="EventTicklerRolloverSelected", mousedown="EventTicklerMousedown"), BitmapInfo(stateName="SumEvent.Tickled", normal="EventTickled", selected="EventTickledSelected", rollover="EventTicklerRollover", rolloverselected="EventTicklerRolloverSelected", mousedown="EventTicklerMousedown"), ] return states | af425b7896d6f0178da77c37da1bec0eb96d300a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/af425b7896d6f0178da77c37da1bec0eb96d300a/summaryblocks.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1221,
7629,
12,
2890,
4672,
5493,
273,
306,
14764,
966,
12,
2019,
461,
1546,
3495,
1133,
18,
984,
14317,
329,
3113,
2212,
33,
4589,
4666,
1383,
18,
5554,
1499,
6946,
18,
2135,
2040,
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,
1221,
7629,
12,
2890,
4672,
5493,
273,
306,
14764,
966,
12,
2019,
461,
1546,
3495,
1133,
18,
984,
14317,
329,
3113,
2212,
33,
4589,
4666,
1383,
18,
5554,
1499,
6946,
18,
2135,
2040,
16,
... |
text="<INPUT TYPE=file name=\"%s\" size=\"%s\" maxlength=\"%s\">" % (field['name'],field['size'], field['maxlength']); | text = """<input type="file" name="%s" size="%s"%s>""" \ % (field['name'], field['size'], "%s" \ % ((field['maxlength'] in (0, None) and " ") or (""" maxlength="%s\"""" % field['maxlength'])) ) | def tmpl_submit_field(self, ln, field): """ Produces the HTML code for the specified field | 2e80be6df7a769b14235c7209f19168ebd5891f8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12027/2e80be6df7a769b14235c7209f19168ebd5891f8/websubmit_templates.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10720,
67,
9297,
67,
1518,
12,
2890,
16,
7211,
16,
652,
4672,
3536,
22934,
326,
3982,
981,
364,
326,
1269,
652,
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,
10720,
67,
9297,
67,
1518,
12,
2890,
16,
7211,
16,
652,
4672,
3536,
22934,
326,
3982,
981,
364,
326,
1269,
652,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
additional_data = dict.fromkeys([p.name for p in graph], {'id': 0, 'state': 'uninstalled', 'dbdemo': False, 'installed_version': None}) cr.execute('SELECT name, id, state, demo AS dbdemo, latest_version AS installed_version' ' FROM ir_module_module' ' WHERE name in (%s)' % (','.join(['%s'] * len(graph))), additional_data.keys() ) additional_data.update(dict([(x.pop('name'), x) for x in cr.dictfetchall()])) for package in graph: for k, v in additional_data[package.name].items(): setattr(package, k, v) | def load_module_graph(cr, graph, status=None, perform_checks=True, **kwargs): # **kwargs is passed directly to convert_xml_import if not status: status = {} status = status.copy() package_todo = [] statusi = 0 pool = pooler.get_pool(cr.dbname) # update the graph with values from the database (if exist) ## First, we set the default values for each package in graph additional_data = dict.fromkeys([p.name for p in graph], {'id': 0, 'state': 'uninstalled', 'dbdemo': False, 'installed_version': None}) ## Then we get the values from the database cr.execute('SELECT name, id, state, demo AS dbdemo, latest_version AS installed_version' ' FROM ir_module_module' ' WHERE name in (%s)' % (','.join(['%s'] * len(graph))), additional_data.keys() ) ## and we update the default values with values from the database additional_data.update(dict([(x.pop('name'), x) for x in cr.dictfetchall()])) for package in graph: for k, v in additional_data[package.name].items(): setattr(package, k, v) migrations = MigrationManager(cr, graph) has_updates = False modobj = None for package in graph: status['progress'] = (float(statusi)+0.1) / len(graph) m = package.name mid = package.id migrations.migrate_module(package, 'pre') register_class(m) logger.notifyChannel('init', netsvc.LOG_INFO, 'module %s: loading objects' % m) modules = pool.instanciate(m, cr) if modobj is None: modobj = pool.get('ir.module.module') if modobj and perform_checks: modobj.check(cr, 1, [mid]) idref = {} status['progress'] = (float(statusi)+0.4) / len(graph) mode = 'update' if hasattr(package, 'init') or package.state == 'to install': mode = 'init' if hasattr(package, 'init') or hasattr(package, 'update') or package.state in ('to install', 'to upgrade'): has_updates = True init_module_objects(cr, m, modules) for kind in ('init', 'update'): for filename in package.data.get('%s_xml' % kind, []): | aa70e5588a3ce204d7ec88cdfe822b32c8d23485 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/aa70e5588a3ce204d7ec88cdfe822b32c8d23485/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1262,
67,
2978,
67,
4660,
12,
3353,
16,
2667,
16,
1267,
33,
7036,
16,
3073,
67,
12366,
33,
5510,
16,
2826,
4333,
4672,
468,
2826,
4333,
353,
2275,
5122,
358,
1765,
67,
2902,
67,
5666,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1262,
67,
2978,
67,
4660,
12,
3353,
16,
2667,
16,
1267,
33,
7036,
16,
3073,
67,
12366,
33,
5510,
16,
2826,
4333,
4672,
468,
2826,
4333,
353,
2275,
5122,
358,
1765,
67,
2902,
67,
5666,
... | |
global htmlhelp_handle | def FinalizeHelp(): if htmlhelp_handle is not None: import win32help global htmlhelp_handle try: #frame = win32ui.GetMainFrame().GetSafeHwnd() frame = 0 win32help.HtmlHelp(frame, None, win32help.HH_UNINITIALIZE, htmlhelp_handle) except win32help.error: print "Failed to finalize htmlhelp!" htmlhelp_handle = None | 8973bc99ff023103f6d1ce8b7c74b3832d6cbbc2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/992/8973bc99ff023103f6d1ce8b7c74b3832d6cbbc2/help.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
30740,
6696,
13332,
309,
1729,
5201,
67,
4110,
353,
486,
599,
30,
1930,
5657,
1578,
5201,
775,
30,
468,
3789,
273,
5657,
1578,
4881,
18,
967,
6376,
3219,
7675,
967,
9890,
44,
91,
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,
30740,
6696,
13332,
309,
1729,
5201,
67,
4110,
353,
486,
599,
30,
1930,
5657,
1578,
5201,
775,
30,
468,
3789,
273,
5657,
1578,
4881,
18,
967,
6376,
3219,
7675,
967,
9890,
44,
91,
4880,
... | |
getter = getattr(self._rs, 'get%s' % METHOD_MAP[sqltype]) v = getter(col) converter = TO_PY_MAP.get(sqltype) | v = self._rs.getObject(col) converter = _converters.get(sqltype) | def fetchone(self): #raise if not rs if not self._rs.next(): return None row = [] for col in range(1, self._meta.getColumnCount() + 1): sqltype = self._meta.getColumnType(col) getter = getattr(self._rs, 'get%s' % METHOD_MAP[sqltype]) v = getter(col) converter = TO_PY_MAP.get(sqltype) if converter: v = converter(v) row.append(v) return tuple(row) | 32c64c47c7ded57e1edbb1468253d5817e4a13de /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7993/32c64c47c7ded57e1edbb1468253d5817e4a13de/dbapi2.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
29214,
12,
2890,
4672,
468,
11628,
309,
486,
3597,
309,
486,
365,
6315,
5453,
18,
4285,
13332,
327,
599,
1027,
273,
5378,
364,
645,
316,
1048,
12,
21,
16,
365,
6315,
3901,
18,
588,
149... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
29214,
12,
2890,
4672,
468,
11628,
309,
486,
3597,
309,
486,
365,
6315,
5453,
18,
4285,
13332,
327,
599,
1027,
273,
5378,
364,
645,
316,
1048,
12,
21,
16,
365,
6315,
3901,
18,
588,
149... |
def on_vte_size_allocate(self): pass def on_vte_notify_enter(self): pass def close_term(self): | def on_vte_size_allocate(self, widget, allocation): self.titlebar.update_terminal_size(self.vte.get_column_count(), self.vte.get_row_count()) pass def on_vte_notify_enter(self, term, event): pass def close_term(self, widget): | def on_vte_size_allocate(self): pass | 00df787535a91e7c5465ba34bd0530d24e661d21 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6502/00df787535a91e7c5465ba34bd0530d24e661d21/terminal.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
67,
90,
736,
67,
1467,
67,
16247,
12,
2890,
4672,
1342,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
603,
67,
90,
736,
67,
1467,
67,
16247,
12,
2890,
4672,
1342,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
def draw(self): radius, axis, turn, n, color = self.args | def draw(self, **mods): radius, axis, turn, n, color = self.args color = mods.get('color',color) | def draw(self): radius, axis, turn, n, color = self.args # axis is for x, theta starts 0, at top (y), so y = cos(theta), z = sin(theta) glDisable(GL_LIGHTING) ### not doing this makes it take the color from the prior object glColor3fv(color) glBegin(GL_LINE_STRIP) points = self.points() for p in points: ##glNormal3fv(-DX) #####WRONG? with lighting: doesn't help, anyway. probably we have to draw ribbon edges as tiny rects. # without lighting, probably has no effect. glVertex3fv(p) glEnd() glEnable(GL_LIGHTING) | 04ed8f2bd084f471db071e497663a58ef4b1f8b9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/04ed8f2bd084f471db071e497663a58ef4b1f8b9/testdraw.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3724,
12,
2890,
16,
2826,
22760,
4672,
5725,
16,
2654,
16,
7005,
16,
290,
16,
2036,
273,
365,
18,
1968,
225,
2036,
273,
15546,
18,
588,
2668,
3266,
2187,
3266,
13,
468,
2654,
353,
364,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3724,
12,
2890,
16,
2826,
22760,
4672,
5725,
16,
2654,
16,
7005,
16,
290,
16,
2036,
273,
365,
18,
1968,
225,
2036,
273,
15546,
18,
588,
2668,
3266,
2187,
3266,
13,
468,
2654,
353,
364,... |
print >> table_def, 'extern ZB_fillTriangleFunc %s;' % (getFname(ops + [j])) | print >> table_def, 'extern "C" ZB_fillTriangleFunc %s;' % (getFname(ops + [j])) | def writeExterns(ops): i = len(ops) numOps = len(FullOptions[i]) if i + 1 == len(FullOptions): # The last level: write out the actual function names. for j in range(numOps): print >> table_def, 'extern ZB_fillTriangleFunc %s;' % (getFname(ops + [j])) else: # Intermediate levels: recurse. for j in range(numOps): writeExterns(ops + [j]) | 4b48520ada32c0dd2b4bb46d66f3be242ff6e368 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8543/4b48520ada32c0dd2b4bb46d66f3be242ff6e368/ztriangle.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
29764,
87,
12,
4473,
4672,
277,
273,
562,
12,
4473,
13,
818,
8132,
273,
562,
12,
5080,
1320,
63,
77,
5717,
225,
309,
277,
397,
404,
422,
562,
12,
5080,
1320,
4672,
468,
1021,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
29764,
87,
12,
4473,
4672,
277,
273,
562,
12,
4473,
13,
818,
8132,
273,
562,
12,
5080,
1320,
63,
77,
5717,
225,
309,
277,
397,
404,
422,
562,
12,
5080,
1320,
4672,
468,
1021,
1... |
return self.isDownloaded() or (self.getFeedURL() == 'dtv:manualFeed' and self.getState() != 'downloading') | return self.getState() in ('newly-downloaded', 'expiring') | def showSaveButton(self): return self.isDownloaded() or (self.getFeedURL() == 'dtv:manualFeed' and self.getState() != 'downloading') | aa7e1c4029afe68278a72cf4a65b4c12e9c32f86 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12354/aa7e1c4029afe68278a72cf4a65b4c12e9c32f86/item.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2405,
4755,
3616,
12,
2890,
4672,
327,
365,
18,
291,
4164,
4230,
1435,
578,
261,
2890,
18,
588,
8141,
1785,
1435,
422,
296,
7510,
90,
30,
19840,
8141,
11,
471,
365,
18,
588,
1119,
1435... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2405,
4755,
3616,
12,
2890,
4672,
327,
365,
18,
291,
4164,
4230,
1435,
578,
261,
2890,
18,
588,
8141,
1785,
1435,
422,
296,
7510,
90,
30,
19840,
8141,
11,
471,
365,
18,
588,
1119,
1435... |
self.revision = revision def view_diff_previous_revision(self, data=None): return (len(self.paths) == 1) def show_changes_previous_revision(self, data=None): return (len(self.paths) == 1) | self.revisions = revisions def view_diff_over_revisions(self, data=None): return True def show_changes_over_revisions(self, data=None): return True | def __init__(self, vcs_client, paths, revision): self.vcs_client = vcs_client self.paths = paths self.revision = revision | 254cf90c673c32fc3faafcde068598e8de07eeee /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5119/254cf90c673c32fc3faafcde068598e8de07eeee/log.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
20255,
67,
2625,
16,
2953,
16,
6350,
4672,
365,
18,
18982,
67,
2625,
273,
20255,
67,
2625,
365,
18,
4481,
273,
2953,
365,
18,
13057,
273,
6350,
2,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
20255,
67,
2625,
16,
2953,
16,
6350,
4672,
365,
18,
18982,
67,
2625,
273,
20255,
67,
2625,
365,
18,
4481,
273,
2953,
365,
18,
13057,
273,
6350,
2,
-100,
... |
"""Import full names from text file or other mod.""" def AppendToMenu(self,menu,window,data): Link.AppendToMenu(self,menu,window,data) menuItem = wx.MenuItem(menu,self.id,_('Names...')) menu.AppendItem(menuItem) menuItem.Enable(len(self.data)==1) def Execute(self,event): message = (_("Import record names from a text file. This will replace existing names and is not reversible!")) if not balt.askContinue(self.window,message,'bash.fullNames.import.continue', _('Import Names')): return fileName = GPath(self.data[0]) fileInfo = bosh.modInfos[fileName] textName = fileName.root+_('_Names.csv') textDir = bosh.dirs['patches'] textPath = balt.askOpen(self.window,_('Import names from:'), textDir,textName, 'Mod/Text File|*Names.csv;*.esp;*.esm') if not textPath: return (textDir,textName) = textPath.headTail ext = textName.cext if ext not in ('.esp','.esm','.csv'): balt.showError(self.window,_('Source file must be mod (.esp or .esm) or csv file.')) return progress = balt.Progress(_("Import Names")) renamed = None try: fullNames = bosh.FullNames() progress(0.1,_("Reading %s.") % (textName.s,)) if ext == '.csv': fullNames.readFromText(textPath) else: srcInfo = bosh.ModInfo(textDir,textName) fullNames.readFromMod(srcInfo) progress(0.2,_("Applying to %s.") % (fileName.s,)) renamed = fullNames.writeToMod(fileInfo) progress(1.0,_("Done.")) finally: progress = progress.Destroy() if not renamed: balt.showOk(self.window,_("No changes required.")) else: buff = cStringIO.StringIO() format = '%s: %s >> %s\n' for eid in sorted(renamed.keys()): full,newFull = renamed[eid] buff.write(format % (eid,full,newFull)) balt.showLog(self.window,buff.getvalue(),_('Objects Renamed'),icons=bashBlue) | """Import full names from text file or other mod.""" def AppendToMenu(self,menu,window,data): Link.AppendToMenu(self,menu,window,data) menuItem = wx.MenuItem(menu,self.id,_('Names...')) menu.AppendItem(menuItem) menuItem.Enable(len(self.data)==1) def Execute(self,event): message = (_("Import record names from a text file. This will replace existing names and is not reversible!")) if not balt.askContinue(self.window,message,'bash.fullNames.import.continue', _('Import Names')): return fileName = GPath(self.data[0]) fileInfo = bosh.modInfos[fileName] textName = fileName.root+_('_Names.csv') textDir = bosh.dirs['patches'] textPath = balt.askOpen(self.window,_('Import names from:'), textDir,textName, 'Mod/Text File|*Names.csv;*.esp;*.esm') if not textPath: return (textDir,textName) = textPath.headTail ext = textName.cext if ext not in ('.esp','.esm','.csv'): balt.showError(self.window,_('Source file must be mod (.esp or .esm) or csv file.')) return progress = balt.Progress(_("Import Names")) renamed = None try: fullNames = bosh.FullNames() progress(0.1,_("Reading %s.") % (textName.s,)) if ext == '.csv': fullNames.readFromText(textPath) else: srcInfo = bosh.ModInfo(textDir,textName) fullNames.readFromMod(srcInfo) progress(0.2,_("Applying to %s.") % (fileName.s,)) renamed = fullNames.writeToMod(fileInfo) progress(1.0,_("Done.")) finally: progress = progress.Destroy() if not renamed: balt.showOk(self.window,_("No changes required.")) else: buff = cStringIO.StringIO() format = '%s: %s >> %s\n' for eid in sorted(renamed.keys()): full,newFull = renamed[eid] buff.write(format % (eid,full,newFull)) balt.showLog(self.window,buff.getvalue(),_('Objects Renamed'),icons=bashBlue) | def Execute(self,event): fileName = GPath(self.data[0]) fileInfo = bosh.modInfos[fileName] textName = fileName.root+_('_Names.csv') textDir = bosh.dirs['patches'] textDir.makedirs() #--File dialog textPath = balt.askSave(self.window,_('Export names to:'), textDir,textName, '*Names.csv') if not textPath: return (textDir,textName) = textPath.headTail #--Export progress = balt.Progress(_("Export Names")) try: fullNames = bosh.FullNames() readProgress = SubProgress(progress,0.1,0.8) readProgress.setFull(len(self.data)) for index,fileName in enumerate(map(GPath,self.data)): fileInfo = bosh.modInfos[fileName] readProgress(index,_("Reading %s.") % (fileName.s,)) fullNames.readFromMod(fileInfo) progress(0.8,_("Exporting to %s.") % (textName.s,)) fullNames.writeToText(textPath) progress(1.0,_("Done.")) finally: progress = progress.Destroy() | 3ac43907fa076fea1e8d682219e2b28fc7419f7b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6682/3ac43907fa076fea1e8d682219e2b28fc7419f7b/basher.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7903,
12,
2890,
16,
2575,
4672,
3968,
273,
611,
743,
12,
2890,
18,
892,
63,
20,
5717,
12538,
273,
324,
17636,
18,
1711,
7655,
63,
17812,
65,
977,
461,
273,
3968,
18,
3085,
15,
67,
26... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7903,
12,
2890,
16,
2575,
4672,
3968,
273,
611,
743,
12,
2890,
18,
892,
63,
20,
5717,
12538,
273,
324,
17636,
18,
1711,
7655,
63,
17812,
65,
977,
461,
273,
3968,
18,
3085,
15,
67,
26... |
while self._list[-1]._is_exact_zero(): | while len(self._list) > 0 and self._list[-1]._is_exact_zero(): | def _comp_list(self): if self.degree() == -1 and self._valbase == infinity: self._list = [] return self._list polylist = self._poly.list() polylen = len(polylist) self._list = [self.base_ring()(polylist[i], absprec = self._relprecs[i]) << self._valbase for i in range(polylen)] \ + [self.base_ring()(0, absprec = self._relprecs[i] + self._valbase) for i in range(polylen, len(self._relprecs))] while self._list[-1]._is_exact_zero(): self._list.pop() | 750165612fa05fdf045b00f45fc83a5f8d404781 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9417/750165612fa05fdf045b00f45fc83a5f8d404781/polynomial_padic_capped_relative_dense.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2919,
67,
1098,
12,
2890,
4672,
309,
365,
18,
21361,
1435,
422,
300,
21,
471,
365,
6315,
1125,
1969,
422,
27272,
30,
365,
6315,
1098,
273,
5378,
327,
365,
6315,
1098,
7573,
1098,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2919,
67,
1098,
12,
2890,
4672,
309,
365,
18,
21361,
1435,
422,
300,
21,
471,
365,
6315,
1125,
1969,
422,
27272,
30,
365,
6315,
1098,
273,
5378,
327,
365,
6315,
1098,
7573,
1098,
... |
elif key == '=': arg = parser.get_token() this_key = attrdef.split('=')[0] attrs[this_key] = arg | def table_extension(key, parser, attrs, wiki_parser=self): _ = wiki_parser._ msg = '' if key[0] in "0123456789": token = parser.get_token() if token != '%': wanted = '%' msg = _('Expected "%(wanted)s" after "%(key)s", got "%(token)s"') % { 'wanted': wanted, 'key': key, 'token': token} else: try: dummy = int(key) except ValueError: msg = _('Expected an integer "%(key)s" before "%(token)s"') % { 'key': key, 'token': token} else: attrs['width'] = '"%s%%"' % key elif key == '-': arg = parser.get_token() try: dummy = int(arg) except ValueError: msg = _('Expected an integer "%(arg)s" after "%(key)s"') % { 'arg': arg, 'key': key} else: attrs['colspan'] = '"%s"' % arg elif key == '|': arg = parser.get_token() try: dummy = int(arg) except ValueError: msg = _('Expected an integer "%(arg)s" after "%(key)s"') % { 'arg': arg, 'key': key} else: attrs['rowspan'] = '"%s"' % arg elif key == '(': attrs['align'] = '"left"' elif key == ':': attrs['align'] = '"center"' elif key == ')': attrs['align'] = '"right"' elif key == '^': attrs['valign'] = '"top"' elif key == 'v': attrs['valign'] = '"bottom"' elif key == '#': arg = parser.get_token() try: if len(arg) != 6: raise ValueError dummy = int(arg, 16) except ValueError: msg = _('Expected a color value "%(arg)s" after "%(key)s"') % { 'arg': arg, 'key': key} else: attrs['bgcolor'] = '"#%s"' % arg elif key == '=': arg = parser.get_token() this_key = attrdef.split('=')[0] attrs[this_key] = arg else: msg = "" #print "key: %s\nattrs: %s" % (key, str(attrs)) return self.formatter.rawHTML(msg) | b76788c6a1d0fa19a22bca07f6c6fcd9b5fa1644 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/888/b76788c6a1d0fa19a22bca07f6c6fcd9b5fa1644/wiki.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1014,
67,
6447,
12,
856,
16,
2082,
16,
3422,
16,
9050,
67,
4288,
33,
2890,
4672,
389,
273,
9050,
67,
4288,
6315,
1234,
273,
875,
309,
498,
63,
20,
65,
316,
315,
26684,
6877,
1147,
27... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1014,
67,
6447,
12,
856,
16,
2082,
16,
3422,
16,
9050,
67,
4288,
33,
2890,
4672,
389,
273,
9050,
67,
4288,
6315,
1234,
273,
875,
309,
498,
63,
20,
65,
316,
315,
26684,
6877,
1147,
27... | |
maxAddr = MemoryAddresses.align_address_to_page_end(maxAddr) | if maxAddr != MemoryAddresses.align_address_to_page_start(maxAddr): maxAddr = MemoryAddresses.align_address_to_page_end(maxAddr) | def get_memory_map(self, minAddr = None, maxAddr = None): """ Produces a memory map to the process address space. Optionally restrict the map to the given address range. | 1d16042fea16e7021c3a55ff6dbd1cbff3df4f26 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7261/1d16042fea16e7021c3a55ff6dbd1cbff3df4f26/system.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
7858,
67,
1458,
12,
2890,
16,
1131,
3178,
273,
599,
16,
943,
3178,
273,
599,
4672,
3536,
22934,
279,
3778,
852,
358,
326,
1207,
1758,
3476,
18,
20720,
13108,
326,
852,
358,
32... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
336,
67,
7858,
67,
1458,
12,
2890,
16,
1131,
3178,
273,
599,
16,
943,
3178,
273,
599,
4672,
3536,
22934,
279,
3778,
852,
358,
326,
1207,
1758,
3476,
18,
20720,
13108,
326,
852,
358,
32... |
return keys | def _list_keys(self,path): s3path = self._s3path(path) + self._separator if s3path == "/": s3path = "" i = len(s3path) keys = [] isDir = False for k in self._s3bukt.list(prefix=s3path,delimiter=self._separator): if not isDir: isDir = True # Skip over the entry for the directory itself, if it exists if k.name[i:] != "": k.name = k.name[i:] if not isinstance(k.name,unicode): k.name = k.name.decode("utf8") keys.append(k) if not isDir: if s3path != self._prefix: if self.isfile(path): raise ResourceInvalidError(path,msg="that's not a directory: %(path)s") raise ResourceNotFoundError(path) return keys | 8ef6d26a6a9b6416ad98420a072855a138f4fecc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5579/8ef6d26a6a9b6416ad98420a072855a138f4fecc/s3fs.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1098,
67,
2452,
12,
2890,
16,
803,
4672,
272,
23,
803,
273,
365,
6315,
87,
23,
803,
12,
803,
13,
397,
365,
6315,
11287,
309,
272,
23,
803,
422,
4016,
30,
272,
23,
803,
273,
14... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1098,
67,
2452,
12,
2890,
16,
803,
4672,
272,
23,
803,
273,
365,
6315,
87,
23,
803,
12,
803,
13,
397,
365,
6315,
11287,
309,
272,
23,
803,
422,
4016,
30,
272,
23,
803,
273,
14... | |
users_obj.write(cr, uid, [3],{ | users_obj.write(cr, uid, [uid],{ | def action_set(self, cr, uid, ids, context=None): res=self.read(cr,uid,ids)[0] users_obj = self.pool.get('res.users') group_obj=self.pool.get('res.groups') if 'view' in res and res['view'] and res['view']=='extended': group_ids=group_obj.search(cr,uid,[('name','=','Extended View')]) if group_ids and len(group_ids): users_obj.write(cr, uid, [3],{ 'groups_id':[(4,group_ids[0])] }, context=context) return { 'view_type': 'form', "view_mode": 'form', 'res_model': 'ir.module.module.configuration.wizard', 'type': 'ir.actions.act_window', 'target':'new', } | d0f2779470216b7708348b97f1e3b453dc79f5f5 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12853/d0f2779470216b7708348b97f1e3b453dc79f5f5/res_user.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1301,
67,
542,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
819,
33,
7036,
4672,
400,
33,
2890,
18,
896,
12,
3353,
16,
1911,
16,
2232,
25146,
20,
65,
3677,
67,
2603,
273,
365,
18,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1301,
67,
542,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
819,
33,
7036,
4672,
400,
33,
2890,
18,
896,
12,
3353,
16,
1911,
16,
2232,
25146,
20,
65,
3677,
67,
2603,
273,
365,
18,
6... |
data = self.numData50 | data = self.numData | def raise__init__1(self): '''raise: both arguments of init must be given''' data = self.numData50 ArrayStore(data) | 4f7397e773983ae72bd3ffebc2d43ad44a277e2e /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2720/4f7397e773983ae72bd3ffebc2d43ad44a277e2e/storage.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1002,
972,
2738,
972,
21,
12,
2890,
4672,
9163,
11628,
30,
3937,
1775,
434,
1208,
1297,
506,
864,
26418,
501,
273,
365,
18,
2107,
751,
1510,
2257,
12,
892,
13,
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,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1002,
972,
2738,
972,
21,
12,
2890,
4672,
9163,
11628,
30,
3937,
1775,
434,
1208,
1297,
506,
864,
26418,
501,
273,
365,
18,
2107,
751,
1510,
2257,
12,
892,
13,
2,
-100,
-100,
-100,
-10... |
migrateappname.migrateSupport('Democracy Player', 'Miro') | def __init__(self): migrateappname.migrateSupport('Democracy Player', 'Miro') self.started = False self.cursorDisplayCount = 0 if not errorOnImport: self.delegate = UIBackendDelegate() | d5aa79151169eaedf5aa705ba099a23d62bf464d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12354/d5aa79151169eaedf5aa705ba099a23d62bf464d/pybridge.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
365,
18,
14561,
273,
1083,
365,
18,
9216,
4236,
1380,
273,
374,
309,
486,
555,
1398,
5010,
30,
365,
18,
22216,
273,
6484,
7172,
9586,
1435,
2,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
365,
18,
14561,
273,
1083,
365,
18,
9216,
4236,
1380,
273,
374,
309,
486,
555,
1398,
5010,
30,
365,
18,
22216,
273,
6484,
7172,
9586,
1435,
2,
-100,
-1... | |
environment['DCACHE_RA_BUFFER'] = config['DCACHE_RA_BUFFER'] | environment['DCACHE_RA_BUFFER'] = str(config['DCACHE_RA_BUFFER']) | def master_prepare( self, app, appconfig ): """Prepare the master job""" job = app._getParent() # Returns job or subjob object | 406d7fbeb21ff68c0aa5819147c95fc35803b87b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1488/406d7fbeb21ff68c0aa5819147c95fc35803b87b/AthenaLocalRTHandler.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4171,
67,
9366,
12,
365,
16,
595,
16,
595,
1425,
262,
30,
3536,
7543,
326,
4171,
1719,
8395,
225,
1719,
273,
595,
6315,
588,
3054,
1435,
468,
2860,
1719,
578,
720,
4688,
733,
2,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4171,
67,
9366,
12,
365,
16,
595,
16,
595,
1425,
262,
30,
3536,
7543,
326,
4171,
1719,
8395,
225,
1719,
273,
595,
6315,
588,
3054,
1435,
468,
2860,
1719,
578,
720,
4688,
733,
2,
-100,
... |
- ``algorithm`` - string (default: 'recursive') specifying which algorithm to be used when computing the iterated palindromic closure. It must be one of the two following values: - ``'definition'`` means that the iterated right palindromic closure is computed using the definition. - ``'recursive'`` is based on an efficient formula that recursively computes the iterated right palindromic closure without having to recompute the longest `f`-palindromic suffix at each iteration [2]. | - ``algorithm`` - string (default: ``'recursive'``) specifying which algorithm to be used when computing the iterated palindromic closure. It must be one of the two following values: - ``'definition'`` - computed using the definition - ``'recursive'`` - computation based on an efficient formula that recursively computes the iterated right palindromic closure without having to recompute the longest `f`-palindromic suffix at each iteration [2]. | def iterated_right_palindromic_closure(self, f=None, algorithm='recursive'): r""" Returns the iterated (`f`-)palindromic closure of self. INPUT: | f1dc5cf58b77c7cbd5be67cea6663f26bdaf2e73 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/f1dc5cf58b77c7cbd5be67cea6663f26bdaf2e73/word.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
29873,
67,
4083,
67,
15081,
728,
520,
335,
67,
20823,
12,
2890,
16,
284,
33,
7036,
16,
4886,
2218,
10543,
11,
4672,
436,
8395,
2860,
326,
29873,
21863,
74,
68,
17,
13,
15081,
728,
520,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
29873,
67,
4083,
67,
15081,
728,
520,
335,
67,
20823,
12,
2890,
16,
284,
33,
7036,
16,
4886,
2218,
10543,
11,
4672,
436,
8395,
2860,
326,
29873,
21863,
74,
68,
17,
13,
15081,
728,
520,... |
return tuple(temp_list) | retval = tuple(temp_list) | def _copy(self, obj): """ <Purpose> Create a deep copy of an object without using the python 'copy' module. Using copy.deepcopy() doesn't work because builtins like id and hasattr aren't available when this is called. <Arguments> self obj The object to make a deep copy of. <Exceptions> TypeError If an object is encountered that we don't know how to make a copy of. NamespaceViolationError If an unexpected error occurs while copying. This isn't the greatest solution, but in general the idea is we just need to abort the wrapped function call. <Side Effects> A new reference is created to every non-simple type of object. That is, everything except objects of type str, unicode, int, etc. <Returns> The deep copy of obj. """ try: # types.InstanceType is included because the user can provide an instance # of a class of their own in the list of callback args to settimer. if _is_in(type(obj), [str, unicode, int, long, float, complex, bool, types.NoneType, types.FunctionType, types.LambdaType, types.MethodType, types.InstanceType]): return obj elif _is_in(type(obj), [tuple, list, set, frozenset]): temp_list = [] for item in obj: temp_list.append(self._copy(item)) if type(obj) is tuple: return tuple(temp_list) elif type(obj) is set: return set(temp_list) elif type(obj) is frozenset: return frozenset(temp_list) else: return temp_list elif type(obj) is dict: temp_dict = {} for key in obj: temp_dict[key] = self._copy(obj[key]) return temp_dict # We don't copy certain objects. This is because copying an emulated file # object, for example, will cause the destructor of the original one to # be invoked, which will close the actual underlying file. As the object # is wrapped and the client does not have access to it, it's safe to not # wrap it. elif isinstance(obj, (NamespaceObjectWrapper, emulfile.emulated_file, emulcomm.emulated_socket, thread.LockType, virtual_namespace.VirtualNamespace)): return obj else: raise TypeError("_copy is not implemented for objects of type " + str(type(obj))) except Exception, e: self._handle_violation("_copy failed on " + str(obj) + " with message " + str(e)) | 759752687cec6068c546f27a7dc8f1af0bc14d0a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7272/759752687cec6068c546f27a7dc8f1af0bc14d0a/namespace.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3530,
12,
2890,
16,
1081,
4672,
3536,
411,
10262,
4150,
34,
1788,
279,
4608,
1610,
434,
392,
733,
2887,
1450,
326,
5790,
296,
3530,
11,
1605,
18,
11637,
1610,
18,
16589,
3530,
1435,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3530,
12,
2890,
16,
1081,
4672,
3536,
411,
10262,
4150,
34,
1788,
279,
4608,
1610,
434,
392,
733,
2887,
1450,
326,
5790,
296,
3530,
11,
1605,
18,
11637,
1610,
18,
16589,
3530,
1435,... |
for p in Partitions_n(self.n-1): | for p in Partitions_n(self.n-1)._fast_iterator(): | def iterator(self): """ An iterator a list of the partitions of n. | c339b0af2602bc983b2e5e6ac27d3f0d8092f9d0 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/c339b0af2602bc983b2e5e6ac27d3f0d8092f9d0/partition.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2775,
12,
2890,
4672,
3536,
1922,
2775,
279,
666,
434,
326,
10060,
434,
290,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2775,
12,
2890,
4672,
3536,
1922,
2775,
279,
666,
434,
326,
10060,
434,
290,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
sys.stdout.write(prompt) sys.stdout.flush() key = sys.stdin.readline() | key = input(prompt) | def __call__(self): self.__setup() prompt = 'Hit Return for more, or q (and Return) to quit: ' lineno = 0 while 1: try: for i in range(lineno, lineno + self.MAXLINES): print(self.__lines[i]) except IndexError: break else: lineno += self.MAXLINES key = None while key is None: sys.stdout.write(prompt) sys.stdout.flush() key = sys.stdin.readline() if key not in ('', 'q'): key = None if key == 'q': break | 3d06e6204a440b6db12be80d8d17cfdafacb6eca /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12029/3d06e6204a440b6db12be80d8d17cfdafacb6eca/site.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1991,
972,
12,
2890,
4672,
365,
16186,
8401,
1435,
6866,
273,
296,
13616,
2000,
364,
1898,
16,
578,
1043,
261,
464,
2000,
13,
358,
9706,
30,
296,
7586,
273,
374,
1323,
404,
30,
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,
1001,
1991,
972,
12,
2890,
4672,
365,
16186,
8401,
1435,
6866,
273,
296,
13616,
2000,
364,
1898,
16,
578,
1043,
261,
464,
2000,
13,
358,
9706,
30,
296,
7586,
273,
374,
1323,
404,
30,
7... |
result += self.close_tag(None) | def format(self, text, out, escape_newlines=False): self.out = out self._open_tags = [] self._list_stack = [] | 0d3b7c933ce40b65066e2a8648277a602ab8beda /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2831/0d3b7c933ce40b65066e2a8648277a602ab8beda/formatter.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
740,
12,
2890,
16,
977,
16,
596,
16,
4114,
67,
31276,
33,
8381,
4672,
365,
18,
659,
273,
596,
365,
6315,
3190,
67,
4156,
273,
5378,
365,
6315,
1098,
67,
3772,
273,
5378,
2,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
740,
12,
2890,
16,
977,
16,
596,
16,
4114,
67,
31276,
33,
8381,
4672,
365,
18,
659,
273,
596,
365,
6315,
3190,
67,
4156,
273,
5378,
365,
6315,
1098,
67,
3772,
273,
5378,
2,
-100,
-10... | |
def select_subtitle_file(self, iteminfo, sub_path, handle_successful_select): | def select_subtitle_file(self, iteminfo, sub_path, handle_successful_select): | def select_subtitle_file(self, iteminfo, sub_path, handle_successful_select): def handle_ok(): handle_successful_select() def handle_err(): app.playback_manager.stop() filenames = [filename for lang, filename in self.get_subtitles().values()] if sub_path not in filenames: sub_path = copy_subtitle_file(sub_path, iteminfo.video_path) self.select_file(iteminfo, handle_ok, handle_err, sub_path) | 90d78f34101089c93e086221fa2b38445513600e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12354/90d78f34101089c93e086221fa2b38445513600e/gstreamerrenderer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2027,
67,
1717,
2649,
67,
768,
12,
2890,
16,
761,
1376,
16,
720,
67,
803,
16,
1640,
67,
18418,
67,
4025,
4672,
1652,
1640,
67,
601,
13332,
1640,
67,
18418,
67,
4025,
1435,
1652,
1640,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
67,
1717,
2649,
67,
768,
12,
2890,
16,
761,
1376,
16,
720,
67,
803,
16,
1640,
67,
18418,
67,
4025,
4672,
1652,
1640,
67,
601,
13332,
1640,
67,
18418,
67,
4025,
1435,
1652,
1640,
... |
def __init__(self, cmap={}, inputFile=None, N_nodes=None): | def __init__(self, cmap=None, inputFile=None, N_nodes=None): if cmap is None: cmap = {} | def __init__(self, cmap={}, inputFile=None, N_nodes=None): self._comm = [] for community in cmap: self._addCommunity(cmap[community]) if inputFile is not None: self._parseStrings(inputFile) self._sortBySize() | c2c75f8e7416c6272a9fe1426d0234bcacc54bac /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/768/c2c75f8e7416c6272a9fe1426d0234bcacc54bac/communities.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
11136,
33,
7036,
16,
22014,
33,
7036,
16,
423,
67,
4690,
33,
7036,
4672,
309,
11136,
353,
599,
30,
11136,
273,
2618,
225,
365,
6315,
5702,
273,
5378,
364... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
11136,
33,
7036,
16,
22014,
33,
7036,
16,
423,
67,
4690,
33,
7036,
4672,
309,
11136,
353,
599,
30,
11136,
273,
2618,
225,
365,
6315,
5702,
273,
5378,
364... |
ld t1, ds, [scale, index, base], disp | ld t1, ds, [1, t0, t7], disp | def macroop AND_R_P | 7cd92ac6ddc118e2e8a1d0ca9acca93165ec36d7 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7385/7cd92ac6ddc118e2e8a1d0ca9acca93165ec36d7/logical.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11522,
556,
4116,
67,
54,
67,
52,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11522,
556,
4116,
67,
54,
67,
52,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
self.assertEqual(suite, ['load_tests', '/foo/test_directory2 module tests']) | self.assertEqual(suite, ['load_tests', os.path.join('/foo', 'test_directory2') + ' module tests']) | def loadTestsFromModule(module, use_load_tests): if use_load_tests: raise self.failureException('use_load_tests should be False for packages') return module.path + ' module tests' | d53d085ada3f33aeb0d45a69c323b8930583c7b4 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8546/d53d085ada3f33aeb0d45a69c323b8930583c7b4/test_unittest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1262,
14650,
1265,
3120,
12,
2978,
16,
999,
67,
945,
67,
16341,
4672,
309,
999,
67,
945,
67,
16341,
30,
1002,
365,
18,
12251,
503,
2668,
1202,
67,
945,
67,
16341,
1410,
506,
1083,
364,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1262,
14650,
1265,
3120,
12,
2978,
16,
999,
67,
945,
67,
16341,
4672,
309,
999,
67,
945,
67,
16341,
30,
1002,
365,
18,
12251,
503,
2668,
1202,
67,
945,
67,
16341,
1410,
506,
1083,
364,... |
if not runningJob.valid(['submissionNumber']) : | if not runningJob.valid(['submission']) : | def setRunningInstance(self, runningJob): """ set currently running job """ | 85d4c726291aab6bf5dcc31a4f61491a52b8d516 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8886/85d4c726291aab6bf5dcc31a4f61491a52b8d516/Job.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
7051,
1442,
12,
2890,
16,
3549,
2278,
4672,
3536,
444,
4551,
3549,
1719,
3536,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
7051,
1442,
12,
2890,
16,
3549,
2278,
4672,
3536,
444,
4551,
3549,
1719,
3536,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
where.append(('name','like',nodename)) | where.append(('name','=',nodename)) | def directory_list_for_child(self,nodename,parent=False): pool = pooler.get_pool(self.cr.dbname) where = [] if nodename: nodename = self.get_translation(nodename, self.context['lang']) where.append(('name','like',nodename)) if (self.object and self.object.type=='directory') or not self.object2: where.append(('parent_id','=',self.object and self.object.id or False)) else: where.append(('parent_id','=',False)) if self.object: where.append(('ressource_parent_type_id','=',self.object.ressource_type_id.id)) else: where.append(('ressource_parent_type_id','=',False)) | 1ef4bfec1ded630a1d4663031259aa959d8ba296 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/1ef4bfec1ded630a1d4663031259aa959d8ba296/document.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1867,
67,
1098,
67,
1884,
67,
3624,
12,
2890,
16,
19888,
1069,
16,
2938,
33,
8381,
4672,
2845,
273,
2845,
264,
18,
588,
67,
6011,
12,
2890,
18,
3353,
18,
20979,
13,
1625,
273,
5378,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1867,
67,
1098,
67,
1884,
67,
3624,
12,
2890,
16,
19888,
1069,
16,
2938,
33,
8381,
4672,
2845,
273,
2845,
264,
18,
588,
67,
6011,
12,
2890,
18,
3353,
18,
20979,
13,
1625,
273,
5378,
... |
line(out, indent + 1, 'PyDict_SetItemString(%sType.tp_dict, "%s", make_descriptor(&%sType));', | line(out, indent + 1, 'PyDict_SetItemString(%s$$Type.tp_dict, "%s", make_descriptor(&%s$$Type));', | def python(env, out_h, out, cls, superCls, names, superNames, constructors, methods, protectedMethods, fields, instanceFields, mapping, sequence, declares, typeset, excludes, moduleName): line(out_h) line(out_h, 0, '#include <Python.h>') line(out_h) indent = 0 for name in names[:-1]: line(out_h, indent, 'namespace %s {', name) indent += 1 line(out_h, indent, 'extern PyTypeObject %sType;', names[-1]) line(out_h) line(out_h, indent, 'class t_%s {', names[-1]) line(out_h, indent, 'public:') line(out_h, indent + 1, 'PyObject_HEAD') line(out_h, indent + 1, '%s object;', names[-1]) line(out_h, indent + 1, 'static PyObject *wrap_Object(const %s&);', names[-1]) line(out_h, indent + 1, 'static PyObject *wrap_jobject(const jobject&);') line(out_h, indent + 1, 'static void install(PyObject *module);') line(out_h, indent + 1, 'static void initialize(PyObject *module);') line(out_h, indent, '};') iterator = findClass('java/util/Iterator') enumeration = findClass('java/util/Enumeration') while indent: indent -= 1 line(out_h, indent, '}') line(out) line(out, 0, '#include "structmember.h"') line(out, 0, '#include "functions.h"') line(out, 0, '#include "macros.h"') for inner in cls.getDeclaredClasses(): if inner in typeset and not inner in declares: if Modifier.isStatic(inner.getModifiers()): line(out, 0, '#include "%s.h"', inner.getName().replace('.', '/')) for method in methods: if method.getName() == 'pythonExtension': isExtension = True break else: isExtension = False line(out) indent = 0 for name in names[:-1]: line(out, indent, 'namespace %s {', name) indent += 1 if not isExtension: line(out, indent, 'static PyObject *t_%s_cast_(PyTypeObject *type, PyObject *arg);', names[-1]) line(out, indent, 'static PyObject *t_%s_instance_(PyTypeObject *type, PyObject *arg);', names[-1]) if constructors: line(out, indent, 'static int t_%s_init_(t_%s *self, PyObject *args, PyObject *kwds);', names[-1], names[-1]) constructorName = 't_%s_init_' %(names[-1]) else: constructorName = 'abstract_init' if superCls: superMethods = set([method.getName() for method in superCls.getMethods()]) else: superMethods = () allMethods = {} extMethods = {} propMethods = {} if methods: for method in methods: modifiers = method.getModifiers() name = method.getName() params = method.getParameterTypes() superMethod = None isNative = Modifier.isNative(modifiers) isStatic = Modifier.isStatic(modifiers) if (isExtension and not isStatic and superCls and isNative): superMethod = find_method(superCls, name, params) if isExtension and isNative and not isStatic: extMethods.setdefault(name, []).append(method) if superMethod or not (isExtension and isNative and not isStatic): allMethods.setdefault(name, []).append(method) if not (isExtension and isNative): nameLen = len(name) paramsLen = len(params) if nameLen > 3 and paramsLen == 0 and name.startswith('get'): propMethods.setdefault(name[3].lower() + name[4:], []).append(method) elif nameLen > 3 and paramsLen == 1 and name.startswith('set'): propMethods.setdefault(name[3].lower() + name[4:], []).append(method) elif nameLen > 2 and paramsLen == 0 and name.startswith('is'): propMethods.setdefault(name[2].lower() + name[3:], []).append(method) properties = set([name for name in propMethods.iterkeys() if name not in allMethods]) propMethods = [(name, propMethods[name]) for name in properties] sort(propMethods, key=lambda x: x[0]) extMethods = extMethods.items() sort(extMethods, key=lambda x: x[0]) allMethods = allMethods.items() sort(allMethods, key=lambda x: x[0]) iteratorMethod = None iteratorExt = False nextMethod = None nextExt = False nextElementMethod = None nextElementExt = False mappingMethod = None if mapping: mappingName, mappingSig = mapping.split(':') sequenceLenMethod = None sequenceGetMethod = None if sequence: sequenceLenName, sequenceLenSig = sequence[0].split(':') sequenceGetName, sequenceGetSig = sequence[1].split(':') for name, methods in allMethods: args, x, cardinality = methodargs(methods, superMethods) sort(methods, key=lambda x: len(x.getParameterTypes())) method = methods[0] modifiers = method.getModifiers() if name == 'iterator' and iteratorMethod is None: if (not method.getParameterTypes() and iterator.isAssignableFrom(method.getReturnType())): iteratorMethod = method elif name == 'next' and nextMethod is None: if (not method.getParameterTypes() and not method.getReturnType().isPrimitive()): nextMethod = method elif name == 'nextElement' and nextElementMethod is None: if (not method.getParameterTypes() and not method.getReturnType().isPrimitive()): nextElementMethod = method elif mapping and name == mappingName and mappingMethod is None: if signature(method) == mappingSig: mappingMethod = (method, cardinality) elif sequence and name == sequenceLenName and sequenceLenMethod is None: if signature(method) == sequenceLenSig: sequenceLenMethod = (method, cardinality) elif sequence and name == sequenceGetName and sequenceGetMethod is None: if signature(method) == sequenceGetSig: sequenceGetMethod = (method, cardinality) elif isExtension and name == 'clone' and Modifier.isNative(modifiers): args, x, cardinality = ', PyObject *arg', ', arg', 1 if Modifier.isStatic(modifiers): line(out, indent, 'static PyObject *t_%s_%s(PyTypeObject *type%s);', names[-1], name, args) else: line(out, indent, 'static PyObject *t_%s_%s(t_%s *self%s);', names[-1], name, names[-1], args) for name, methods in extMethods: args, x, cardinality = methodargs(methods, superMethods) sort(methods, key=lambda x: len(x.getParameterTypes())) method = methods[0] modifiers = method.getModifiers() if name == 'iterator' and iteratorMethod is None: if (not method.getParameterTypes() and iterator.isAssignableFrom(method.getReturnType())): iteratorMethod = method iteratorExt = True elif name == 'next' and nextMethod is None: if (not method.getParameterTypes() and not method.getReturnType().isPrimitive()): nextMethod = method nextExt = True elif name == 'nextElement' and nextElementMethod is None: if (not method.getParameterTypes() and not method.getReturnType().isPrimitive()): nextElementMethod = method nextElementExt = True if isExtension: count = 0 for name, methods in extMethods: for method in methods: line(out, indent, 'static %s JNICALL t_%s_%s%d(JNIEnv *jenv, jobject jobj%s);', jniname(method.getReturnType()), names[-1], name, count, jniargs(method.getParameterTypes())) count += 1 line(out, indent, 'static PyObject *t_%s_get__self(t_%s *self, void *data);', names[-1], names[-1]) if instanceFields: for field in instanceFields: fieldName = field.getName() if fieldName not in properties: line(out, indent, 'static PyObject *t_%s_get__%s(t_%s *self, void *data);', names[-1], fieldName, names[-1]) if not Modifier.isFinal(field.getModifiers()): line(out, indent, 'static int t_%s_set__%s(t_%s *self, PyObject *arg, void *data);', names[-1], field.getName(), names[-1]) line(out) for fieldName, methods in propMethods: getter = False setter = False for method in methods: methodName = method.getName() if not getter and (methodName.startswith('get') or methodName.startswith('is')): getter = True line(out, indent, 'static PyObject *t_%s_get__%s(t_%s *self, void *data);', names[-1], fieldName, names[-1]) elif not setter and methodName.startswith('set'): setter = True line(out, indent, 'static int t_%s_set__%s(t_%s *self, PyObject *arg, void *data);', names[-1], fieldName, names[-1]) if instanceFields or propMethods or isExtension: line(out, indent, 'static PyGetSetDef t_%s__fields_[] = {', names[-1]) for field in instanceFields: fieldName = field.getName() if fieldName not in properties: if Modifier.isFinal(field.getModifiers()): line(out, indent + 1, 'DECLARE_GET_FIELD(t_%s, %s),', names[-1], fieldName) else: line(out, indent + 1, 'DECLARE_GETSET_FIELD(t_%s, %s),', names[-1], fieldName) for fieldName, methods in propMethods: getter = False setter = False for method in methods: methodName = method.getName() if not getter and (methodName.startswith('get') or methodName.startswith('is')): getter = True elif not setter and methodName.startswith('set'): setter = True if getter and setter: op = 'GETSET' elif getter: op = 'GET' elif setter: op = 'SET' line(out, indent + 1, 'DECLARE_%s_FIELD(t_%s, %s),', op, names[-1], fieldName) if isExtension: line(out, indent + 1, 'DECLARE_GET_FIELD(t_%s, self),', names[-1]) line(out, indent + 1, '{ NULL, NULL, NULL, NULL, NULL }') line(out, indent, '};') line(out) line(out, indent, 'static PyMethodDef t_%s__methods_[] = {', names[-1]) if not isExtension: line(out, indent + 1, 'DECLARE_METHOD(t_%s, cast_, METH_O | METH_CLASS),', names[-1]) line(out, indent + 1, 'DECLARE_METHOD(t_%s, instance_, METH_O | METH_CLASS),', names[-1]) for name, methods in allMethods: modifiers = methods[0].getModifiers() if len(methods) == 1 and not name in superMethods: count = len(methods[0].getParameterTypes()) if count == 0: args = 'METH_NOARGS' elif count == 1: args = 'METH_O' else: args = 'METH_VARARGS' elif isExtension and name == 'clone' and Modifier.isNative(modifiers): args = 'METH_O' else: args = 'METH_VARARGS' if Modifier.isStatic(modifiers): args += ' | METH_CLASS' line(out, indent + 1, 'DECLARE_METHOD(t_%s, %s, %s),', names[-1], name, args) line(out, indent + 1, '{ NULL, NULL, 0, NULL }') line(out, indent, '};') if instanceFields or propMethods or isExtension: tp_getset = 't_%s__fields_' %(names[-1]) else: tp_getset = '0' if iteratorMethod: if iteratorExt: tp_iter = 'get_extension_iterator' else: tp_iter = 'get_iterator<t_%s>' %(names[-1]) tp_iternext = '0' elif nextMethod and iterator.isAssignableFrom(cls): tp_iter = 'PyObject_SelfIter' returnName = typename(nextMethod.getReturnType(), cls, False) ns, sep, n = rpartition(returnName, '::') if nextExt: tp_iternext = 'get_extension_next' else: tp_iternext = '(get_iterator_next<%s%st_%s,%s>)' %(ns, sep, n, returnName) elif nextElementMethod and enumeration.isAssignableFrom(cls): tp_iter = 'PyObject_SelfIter' returnName = typename(nextElementMethod.getReturnType(), cls, False) ns, sep, n = rpartition(returnName, '::') if nextElementExt: tp_iternext = 'get_extension_nextElement' else: tp_iternext = '(get_enumeration_nextElement<%s%st_%s,%s>)' %(ns, sep, n, returnName) elif nextMethod: tp_iter = 'PyObject_SelfIter' returnName = typename(nextMethod.getReturnType(), cls, False) ns, sep, n = rpartition(returnName, '::') if nextExt: tp_iternext = 'get_extension_next' else: tp_iternext = '(get_next<t_%s,%s%st_%s,%s>)' %(names[-1], ns, sep, n, returnName) else: tp_iter = '0' tp_iternext = '0' if mappingMethod: method, cardinality = mappingMethod if cardinality > 1: getName = 't_%s_%s_map_' %(names[-1], method.getName()) line(out, indent, 'static PyObject *%s(t_%s *self, PyObject *key);', getName, names[-1]) else: getName = 't_%s_%s' %(names[-1], method.getName()) line(out) line(out, indent, 'static PyMappingMethods t_%s_as_mapping = {', names[-1]) line(out, indent + 1, '0,') line(out, indent + 1, '(binaryfunc) %s,', getName) line(out, indent + 1, '0,') line(out, indent, '};') tp_as_mapping = '&t_%s_as_mapping' %(names[-1]) else: tp_as_mapping = '0' if sequenceLenMethod or sequenceGetMethod: if sequenceLenMethod: method, cardinality = sequenceLenMethod lenName = 't_%s_%s_seq_' %(names[-1], method.getName()) line(out, indent, 'static int %s(t_%s *self);', lenName, names[-1]) else: lenName = '0' if sequenceGetMethod: method, cardinality = sequenceGetMethod getName = 't_%s_%s_seq_' %(names[-1], method.getName()) line(out, indent, 'static PyObject *%s(t_%s *self, int n);', getName, names[-1]) else: getName = '0' line(out) line(out, indent, 'static PySequenceMethods t_%s_as_sequence = {', names[-1]) if python_ver < '2.5.0': line(out, indent + 1, '(inquiry) %s,', lenName) line(out, indent + 1, '0,') line(out, indent + 1, '0,') line(out, indent + 1, '(intargfunc) %s', getName) line(out, indent, '};') else: line(out, indent + 1, '(lenfunc) %s,', lenName) line(out, indent + 1, '0,') line(out, indent + 1, '0,') line(out, indent + 1, '(ssizeargfunc) %s', getName) line(out, indent, '};') tp_as_sequence = '&t_%s_as_sequence' %(names[-1]) else: tp_as_sequence = '0' line(out) line(out, indent, 'DECLARE_TYPE(%s, t_%s, %s, %s, %s, %s, %s, %s, %s, %s);', names[-1], names[-1], '::'.join(superNames), names[-1], constructorName, tp_iter, tp_iternext, tp_getset, tp_as_mapping, tp_as_sequence) line(out) line(out, indent, 'void t_%s::install(PyObject *module)', names[-1]) line(out, indent, '{') if isExtension: line(out, indent + 1, 'INSTALL_EXTENSION(%s, module);', names[-1]) else: line(out, indent + 1, 'INSTALL_TYPE(%s, module);', names[-1]) for inner in cls.getDeclaredClasses(): if inner in typeset: if Modifier.isStatic(inner.getModifiers()): innerName = inner.getName().split('.')[-1] line(out, indent + 1, 'PyDict_SetItemString(%sType.tp_dict, "%s", make_descriptor(&%sType));', names[-1], innerName[len(names[-1])+1:], innerName) line(out, indent, '}') line(out) line(out, indent, 'void t_%s::initialize(PyObject *module)', names[-1]) line(out, indent, '{') line(out, indent + 1, 'PyDict_SetItemString(%sType.tp_dict, "class_", make_descriptor(%s::initializeClass));', names[-1], names[-1]) line(out, indent + 1, 'PyDict_SetItemString(%sType.tp_dict, "wrapfn_", make_descriptor(t_%s::wrap_jobject));', names[-1], names[-1]) if isExtension: line(out, indent + 1, 'jclass cls = %s::initializeClass();', names[-1]); elif fields: line(out, indent + 1, '%s::initializeClass();', names[-1]); if isExtension: count = 0 line(out, indent + 1, 'JNINativeMethod methods[] = {') for name, methods in extMethods: for method in methods: line(out, indent + 2, '{ "%s", "%s", (void *) t_%s_%s%d },', name, signature(method), names[-1], name, count) count += 1 line(out, indent + 1, '};') line(out, indent + 1, 'env->registerNatives(cls, methods, %d);', count) for field in fields: fieldType = field.getType() fieldName = field.getName() value = '%s::%s' %(names[-1], fieldName) if fieldName in RESERVED: value += '$' value = fieldValue(cls, value, fieldType) line(out, indent + 1, 'PyDict_SetItemString(%sType.tp_dict, "%s", make_descriptor(%s));', names[-1], fieldName, value) line(out, indent, '}') if not isExtension: line(out) line(out, indent, 'static PyObject *t_%s_cast_(PyTypeObject *type, PyObject *arg)', names[-1]) line(out, indent, '{') line(out, indent + 1, 'if (!(arg = castCheck(arg, %s::initializeClass(), 1)))', names[-1]) line(out, indent + 2, 'return NULL;') line(out, indent + 1, 'return t_%s::wrap_Object(%s(((t_%s *) arg)->object.this$));', names[-1], names[-1], names[-1]) line(out, indent, '}') line(out, indent, 'static PyObject *t_%s_instance_(PyTypeObject *type, PyObject *arg)', names[-1]) line(out, indent, '{') line(out, indent + 1, 'if (!castCheck(arg, %s::initializeClass(), 0))', names[-1]) line(out, indent + 2, 'Py_RETURN_FALSE;') line(out, indent + 1, 'Py_RETURN_TRUE;') line(out, indent, '}') if constructors: line(out) line(out, indent, 'static int t_%s_init_(t_%s *self, PyObject *args, PyObject *kwds)', names[-1], names[-1]) line(out, indent, '{') if len(constructors) > 1: currLen = -1 line(out, indent + 1, 'switch (PyTuple_GET_SIZE(args)) {') withErr = False for constructor in constructors: params = constructor.getParameterTypes() if len(params) != currLen: if currLen >= 0: withErr = True line(out, indent + 2, 'goto err;') currLen = len(params) line(out, indent + 1, '%scase %d:', HALF_INDENT, currLen) construct(out, indent + 2, cls, True, constructor, names) line(out, indent + 1, '%sdefault:', HALF_INDENT) if withErr: line(out, indent + 1, '%serr:', HALF_INDENT) line(out, indent + 2, 'PyErr_SetArgsError((PyObject *) self, "__init__", args);') line(out, indent + 2, 'return -1;') line(out, indent + 1, '}') else: construct(out, indent + 1, cls, False, constructors[0], names) if constructors[0].getParameterTypes(): line(out, indent + 1, 'else') line(out, indent + 1, '{') line(out, indent + 2, 'PyErr_SetArgsError((PyObject *) self, "__init__", args);') line(out, indent + 2, 'return -1;') line(out, indent + 1, '}') if isExtension: line(out) line(out, indent + 1, 'Py_INCREF((PyObject *) self);') line(out, indent + 1, 'self->object.pythonExtension((jlong) (Py_intptr_t) (void *) self);') line(out) line(out, indent + 1, 'return 0;') line(out, indent , '}') for name, methods in allMethods: line(out) modifiers = methods[0].getModifiers() if isExtension and name == 'clone' and Modifier.isNative(modifiers): declargs, args, cardinality = ', PyObject *arg', ', arg', 1 else: declargs, args, cardinality = methodargs(methods, superMethods) static = Modifier.isStatic(modifiers) if static: line(out, indent, 'static PyObject *t_%s_%s(PyTypeObject *type%s)', names[-1], name, declargs) else: line(out, indent, 'static PyObject *t_%s_%s(t_%s *self%s)', names[-1], name, names[-1], declargs) line(out, indent, '{') if len(methods) > 1: currLen = -1 line(out, indent + 1, 'switch (PyTuple_GET_SIZE(args)) {') for method in methods: params = method.getParameterTypes() if len(params) != currLen: if currLen >= 0: line(out, indent + 2, 'break;') currLen = len(params) line(out, indent + 1, '%scase %d:', HALF_INDENT, currLen) call(out, indent + 2, cls, True, method, names, cardinality, isExtension) line(out, indent + 1, '}') else: call(out, indent + 1, cls, False, methods[0], names, cardinality, isExtension) if args: line(out) if name in superMethods: if static: line(out, indent + 1, 'return callSuper(type, "%s"%s, %d);', name, args, cardinality) else: line(out, indent + 1, 'return callSuper(&%sType, (PyObject *) self, "%s"%s, %d);', names[-1], name, args, cardinality) else: line(out, indent + 1, 'PyErr_SetArgsError(%s, "%s"%s);', static and 'type' or '(PyObject *) self', name, args) line(out, indent + 1, 'return NULL;') line(out, indent, '}') if isExtension: count = 0 for name, methods in extMethods: for method in methods: line(out) line(out, indent, 'static %s JNICALL t_%s_%s%d(JNIEnv *jenv, jobject jobj%s)', jniname(method.getReturnType()), names[-1], name, count, jniargs(method.getParameterTypes())) count += 1 line(out, indent, '{') extension(env, out, indent + 1, cls, names, name, count, method) line(out, indent, '}') line(out) line(out, indent, 'static PyObject *t_%s_get__self(t_%s *self, void *data)', names[-1], names[-1]) line(out, indent, '{') indent += 1 line(out, indent, 'jlong ptr;') line(out, indent, 'OBJ_CALL(ptr = self->object.pythonExtension());') line(out, indent, 'PyObject *obj = (PyObject *) (Py_intptr_t) ptr;') line(out) line(out, indent, 'if (obj != NULL)') line(out, indent, '{') line(out, indent + 1, 'Py_INCREF(obj);') line(out, indent + 1, 'return obj;') line(out, indent, '}') line(out, indent, 'else') line(out, indent + 1, 'Py_RETURN_NONE;') indent -= 1 line(out, indent, '}') if instanceFields: for field in instanceFields: fieldName = field.getName() if fieldName not in properties: line(out) fieldType = field.getType() typeName = typename(fieldType, cls, False) line(out, indent, 'static PyObject *t_%s_get__%s(t_%s *self, void *data)', names[-1], fieldName, names[-1]) line(out, indent, '{') line(out, indent + 1, '%s value%s;', typeName, not fieldType.isPrimitive() and '((jobject) NULL)' or '') line(out, indent + 1, 'OBJ_CALL(value = self->object._get_%s());', fieldName) line(out, indent + 1, returnValue(cls, fieldType, 'value')) line(out, indent, '}') if not Modifier.isFinal(field.getModifiers()): line(out, indent, 'static int t_%s_set__%s(t_%s *self, PyObject *arg, void *data)', names[-1], fieldName, names[-1]) line(out, indent, '{') line(out, indent + 1, '%s value%s;', typeName, not fieldType.isPrimitive() and '((jobject) NULL)' or '') sig, check, x = parseArgs([fieldType], cls) line(out, indent + 1, 'if (!parseArg(arg, "%s"%s, &value))', sig, check) line(out, indent + 1, '{') line(out, indent + 2, 'INT_CALL(self->object._set_%s(value));', fieldName) line(out, indent + 2, 'return 0;') line(out, indent + 1, '}') line(out, indent + 1, 'PyErr_SetArgsError((PyObject *) self, "%s", arg);', fieldName) line(out, indent + 1, 'return -1;') line(out, indent, '}') if propMethods: for fieldName, methods in propMethods: line(out) getter = None setters = [] sort(methods, key=lambda x: x.getName()) for method in methods: methodName = method.getName() if not getter and (methodName.startswith('get') or methodName.startswith('is')): getter = method elif methodName.startswith('set'): setters.append(method) if getter: methodName = getter.getName() returnType = getter.getReturnType() typeName = typename(returnType, cls, False) line(out, indent, 'static PyObject *t_%s_get__%s(t_%s *self, void *data)', names[-1], fieldName, names[-1]) line(out, indent, '{') line(out, indent + 1, '%s value%s;', typeName, not returnType.isPrimitive() and '((jobject) NULL)' or '') line(out, indent + 1, 'OBJ_CALL(value = self->object.%s());', methodName) line(out, indent + 1, returnValue(cls, returnType, 'value')) line(out, indent, '}') if setters: line(out, indent, 'static int t_%s_set__%s(t_%s *self, PyObject *arg, void *data)', names[-1], fieldName, names[-1]) line(out, indent, '{') methodName = setters[0].getName() for method in setters: argType = method.getParameterTypes()[0] typeName = typename(argType, cls, False) line(out, indent + 1, '{') line(out, indent + 2, '%s value%s;', typeName, not argType.isPrimitive() and '((jobject) NULL)' or '') sig, check, x = parseArgs([argType], cls) line(out, indent + 2, 'if (!parseArg(arg, "%s"%s, &value))', sig, check) line(out, indent + 2, '{') line(out, indent + 3, 'INT_CALL(self->object.%s(value));', methodName) line(out, indent + 3, 'return 0;') line(out, indent + 2, '}') line(out, indent + 1, '}') line(out, indent + 1, 'PyErr_SetArgsError((PyObject *) self, "%s", arg);', fieldName) line(out, indent + 1, 'return -1;') line(out, indent, '}') if mappingMethod: method, cardinality = mappingMethod if cardinality > 1: methodName = method.getName() getName = 't_%s_%s_map_' %(names[-1], methodName) line(out) line(out, indent, 'static PyObject *%s(t_%s *self, PyObject *arg)', getName, names[-1]) line(out, indent, '{') call(out, indent + 1, cls, False, method, names, 1, isExtension) line(out) line(out, indent + 1, 'PyErr_SetArgsError((PyObject *) self, "%s", arg);', methodName) line(out, indent + 1, 'return NULL;') line(out, indent, '}') if sequenceLenMethod: method, cardinality = sequenceLenMethod methodName = method.getName() lenName = 't_%s_%s_seq_' %(names[-1], methodName) line(out) line(out, indent, 'static int %s(t_%s *self)', lenName, names[-1]) line(out, indent, '{') line(out, indent + 1, '%s len;', typename(method.getReturnType(), cls, False)) line(out, indent + 1, 'INT_CALL(len = self->object.%s());', methodName) line(out, indent + 1, 'return (int) len;') line(out, indent, '}') if sequenceGetMethod: method, cardinality = sequenceGetMethod methodName = method.getName() returnType = method.getReturnType() getName = 't_%s_%s_seq_' %(names[-1], methodName) line(out) line(out, indent, 'static PyObject *%s(t_%s *self, int n)', getName, names[-1]) line(out, indent, '{') line(out, indent + 1, '%s result%s;', typename(returnType, cls, False), not returnType.isPrimitive() and '((jobject) NULL)' or '') line(out, indent + 1, 'OBJ_CALL(result = self->object.%s((%s) n));', methodName, typename(method.getParameterTypes()[0], cls, False)) line(out, indent + 1, returnValue(cls, returnType, 'result')) line(out, indent, '}') while indent: indent -= 1 line(out, indent, '}') | bd30bad5d125561664588e92bf20684eef823d24 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4005/bd30bad5d125561664588e92bf20684eef823d24/python.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5790,
12,
3074,
16,
596,
67,
76,
16,
596,
16,
2028,
16,
2240,
20822,
16,
1257,
16,
2240,
1557,
16,
19874,
16,
2590,
16,
4750,
4712,
16,
1466,
16,
791,
2314,
16,
2874,
16,
3102,
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,
5790,
12,
3074,
16,
596,
67,
76,
16,
596,
16,
2028,
16,
2240,
20822,
16,
1257,
16,
2240,
1557,
16,
19874,
16,
2590,
16,
4750,
4712,
16,
1466,
16,
791,
2314,
16,
2874,
16,
3102,
16,
... |
util.redirect(RESPONSE, 'atse_editor', | util.redirect(RESPONSE, schema_template, | def atse_update(self, schema_id, fielddata, REQUEST, RESPONSE=None): """ update a single field""" | 9b0c0ef734f88dbdf55f2ae8fbea0706d81ca338 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1807/9b0c0ef734f88dbdf55f2ae8fbea0706d81ca338/SchemaEditor.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
622,
307,
67,
2725,
12,
2890,
16,
1963,
67,
350,
16,
7314,
292,
449,
396,
16,
225,
12492,
16,
20645,
33,
7036,
4672,
3536,
1089,
279,
2202,
652,
8395,
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,
622,
307,
67,
2725,
12,
2890,
16,
1963,
67,
350,
16,
7314,
292,
449,
396,
16,
225,
12492,
16,
20645,
33,
7036,
4672,
3536,
1089,
279,
2202,
652,
8395,
2,
-100,
-100,
-100,
-100,
-100,
... |
for j in range(no_of_cols): if data_matrix[i][j] == 0: | for j in cols_to_be_checked: if data_matrix[i][j] in NA_set: | def remove_rows_with_too_many_NAs(cls, data_matrix, row_cutoff, debug=0): """ 2008-05-08 become classmethod """ sys.stderr.write("Removing rows with too many NAs...") no_of_rows, no_of_cols = data_matrix.shape rows_with_too_many_NAs_set = Set() strain_index2no_of_NAs = {} for i in range(no_of_rows): no_of_NAs = 0.0 for j in range(no_of_cols): if data_matrix[i][j] == 0: no_of_NAs += 1 NA_ratio = no_of_NAs/no_of_cols strain_index2no_of_NAs[i] = NA_ratio if NA_ratio >= row_cutoff: rows_with_too_many_NAs_set.add(i) if debug: print print 'rows_with_too_many_NAs_set' print rows_with_too_many_NAs_set sys.stderr.write("%s strains removed, done.\n"%len(rows_with_too_many_NAs_set)) return rows_with_too_many_NAs_set, strain_index2no_of_NAs | 9c37de4822440ddecb9d7de412265d707bdb9dbc /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9645/9c37de4822440ddecb9d7de412265d707bdb9dbc/FilterStrainSNPMatrix.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1206,
67,
3870,
67,
1918,
67,
16431,
67,
9353,
67,
50,
1463,
12,
6429,
16,
501,
67,
5667,
16,
1027,
67,
16131,
16,
1198,
33,
20,
4672,
3536,
4044,
28,
17,
6260,
17,
6840,
12561,
667,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1206,
67,
3870,
67,
1918,
67,
16431,
67,
9353,
67,
50,
1463,
12,
6429,
16,
501,
67,
5667,
16,
1027,
67,
16131,
16,
1198,
33,
20,
4672,
3536,
4044,
28,
17,
6260,
17,
6840,
12561,
667,... |
del self.controllers del self.list del self.editor | self.controllers = None self.list = None self.editor = None | def destroy(self): self.modimages = None self.list.Enable(false) self.list.destroy() self.tree.Enable(false) self.tree.destroy() unqDct = {} for contr in self.controllers.values(): unqDct[contr] = None for contr in unqDct.keys(): contr.destroy() del self.controllers del self.list del self.editor | c218bc51f8efdb964a9645c01c8461b0962bd20d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/c218bc51f8efdb964a9645c01c8461b0962bd20d/Explorer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5546,
12,
2890,
4672,
365,
18,
1711,
7369,
273,
599,
365,
18,
1098,
18,
8317,
12,
5743,
13,
365,
18,
1098,
18,
11662,
1435,
365,
18,
3413,
18,
8317,
12,
5743,
13,
365,
18,
3413,
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,
5546,
12,
2890,
4672,
365,
18,
1711,
7369,
273,
599,
365,
18,
1098,
18,
8317,
12,
5743,
13,
365,
18,
1098,
18,
11662,
1435,
365,
18,
3413,
18,
8317,
12,
5743,
13,
365,
18,
3413,
18,
... |
def device_get: | def device_get(): | def device_get: warnings.warn("device_get() is deprecated and will be removed", DeprecationWarning) # XXX | 5df7ade55af2177fa9ebc189cf6ec79995c0ce0a /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5978/5df7ade55af2177fa9ebc189cf6ec79995c0ce0a/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2346,
67,
588,
13332,
5599,
18,
8935,
2932,
5964,
67,
588,
1435,
353,
6849,
471,
903,
506,
3723,
3113,
24041,
13,
468,
11329,
225,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2346,
67,
588,
13332,
5599,
18,
8935,
2932,
5964,
67,
588,
1435,
353,
6849,
471,
903,
506,
3723,
3113,
24041,
13,
468,
11329,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
instruc = instruc.replace(","," ") instruc = instruc.lower() instruc = instruc.split(" ") | instruc = sanitize(instruc) | def parse_jump(instruc = "", word_buf = ""): if instruc == "" or word_buf == "": print "ERROR: someone accidentally the code in parse_jump" return "-1" instruc = instruc.replace(","," ") instruc = instruc.lower() instruc = instruc.split(" ") #instruc is now a list ins = instruc[0] regS = instruc[1] if ins == "jsr": word_buf += "1" imm = int(regS) if imm > 2^10 or imm < -(2^10) + 1: print "ERROR: Immediate value " + str(imm) +" is out of range." print "IMM in JSR IMM must be greater than -(2^10) + 1 and less than 2^10" return "-1" if imm < 0: imm *= -1 imm = "1" + int2bin(imm, 10) else: imm = int2bin(imm, 11) word_buf += imm elif ins == "jsrr": word_buf += "0" word_buf += "00" word_buf += reg2bin(regS) word_buf += "000000" elif ins == "jmpr": word_buf += "0" word_buf += "00" word_buf += reg2bin(regS) word_buf += "000000" elif ins == "jmp": word_buf += "1" imm = int(regS) if imm > 2^10 or imm < -(2^10) + 1: print "ERROR: Immediate value " + str(imm) +" is out of range." print "IMM in JMP IMM must be greater than -(2^10) + 1 and less than 2^10" return "-1" if imm < 0: imm *= -1 imm = "1" + int2bin(imm, 10) else: imm = int2bin(imm, 11) word_buf += imm else: print "ERROR: Someone accidentally'd the code in parse_jump" return "-1" return word_buf | c9041b22a5fae24347e6995b51cec7b258f41bc2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4891/c9041b22a5fae24347e6995b51cec7b258f41bc2/assembler.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
67,
24574,
12,
267,
701,
5286,
273,
23453,
2076,
67,
4385,
273,
1408,
4672,
309,
16170,
5286,
422,
1408,
578,
2076,
67,
4385,
422,
1408,
30,
1172,
315,
3589,
30,
18626,
25961,
1230... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
67,
24574,
12,
267,
701,
5286,
273,
23453,
2076,
67,
4385,
273,
1408,
4672,
309,
16170,
5286,
422,
1408,
578,
2076,
67,
4385,
422,
1408,
30,
1172,
315,
3589,
30,
18626,
25961,
1230... |
new_id = ir_values_obj.copy(cr, uid, iv.id, default={'res_id': res}, context=context) | ir_values_obj.copy(cr, uid, iv.id, default={'res_id': res}, context=context) | def copy(self, cr, uid, id, default=None, context=None): ir_values_obj = self.pool.get('ir.values') res = super(ir_ui_menu, self).copy(cr, uid, id, context=context) datas=self.read(cr,uid,[res],['name'])[0] rex=re.compile('\([0-9]+\)') concat=rex.findall(datas['name']) if concat: next_num=eval(concat[0])+1 datas['name']=rex.sub(('(%d)'%next_num),datas['name']) else: datas['name']=datas['name']+'(1)' self.write(cr,uid,[res],{'name':datas['name']}) ids = ir_values_obj.search(cr, uid, [ ('model', '=', 'ir.ui.menu'), ('res_id', '=', id), ]) for iv in ir_values_obj.browse(cr, uid, ids): new_id = ir_values_obj.copy(cr, uid, iv.id, default={'res_id': res}, context=context) return res | 6d599c6ccacd0e726e8a4f18711c6b64c5e8465c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/6d599c6ccacd0e726e8a4f18711c6b64c5e8465c/ir_ui_menu.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1610,
12,
2890,
16,
4422,
16,
4555,
16,
612,
16,
805,
33,
7036,
16,
819,
33,
7036,
4672,
9482,
67,
2372,
67,
2603,
273,
365,
18,
6011,
18,
588,
2668,
481,
18,
2372,
6134,
400,
273,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1610,
12,
2890,
16,
4422,
16,
4555,
16,
612,
16,
805,
33,
7036,
16,
819,
33,
7036,
4672,
9482,
67,
2372,
67,
2603,
273,
365,
18,
6011,
18,
588,
2668,
481,
18,
2372,
6134,
400,
273,
... |
def test_01_zeros(self): | def test_01_00_zeros(self): | def test_01_zeros(self): """A label matrix of all zeros has no hole""" image = np.zeros((10,10),dtype=int) output = morph.fill_labeled_holes(image) self.assertTrue(np.all(output==0)) | ce5e9d1063501880b12c41ae88c1e8afb2836a37 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2870/ce5e9d1063501880b12c41ae88c1e8afb2836a37/test_cpmorphology.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
1611,
67,
713,
67,
22008,
12,
2890,
4672,
3536,
37,
1433,
3148,
434,
777,
4922,
711,
1158,
19922,
8395,
1316,
273,
1130,
18,
22008,
12443,
2163,
16,
2163,
3631,
8972,
33,
474,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1611,
67,
713,
67,
22008,
12,
2890,
4672,
3536,
37,
1433,
3148,
434,
777,
4922,
711,
1158,
19922,
8395,
1316,
273,
1130,
18,
22008,
12443,
2163,
16,
2163,
3631,
8972,
33,
474,
... |
def __init__(self, protocol, port, authToken, repos): | def __init__(self, protocol, port, authToken, repos, remoteIp): | def __init__(self, protocol, port, authToken, repos): self.repos = repos self.protocol = protocol self.port = port self.authToken = authToken self.url = None | 9d3883b3886bc9cc306454389985ba0218243587 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8747/9d3883b3886bc9cc306454389985ba0218243587/proxy.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1771,
16,
1756,
16,
24050,
16,
13686,
16,
2632,
5273,
4672,
365,
18,
15564,
273,
13686,
365,
18,
8373,
273,
1771,
365,
18,
655,
273,
1756,
365,
18,
1944,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1771,
16,
1756,
16,
24050,
16,
13686,
16,
2632,
5273,
4672,
365,
18,
15564,
273,
13686,
365,
18,
8373,
273,
1771,
365,
18,
655,
273,
1756,
365,
18,
1944,... |
self.db.indexer.add_text((self.classname, nodeid, 'content'), self.get(nodeid, 'content'), mime_type) | if props['content'].indexme: self.db.indexer.add_text((self.classname, nodeid, 'content'), self.get(nodeid, 'content'), mime_type) | def import_files(self, dirname, nodeid): ''' Import the "content" property as a file ''' source = self.exportFilename(dirname, nodeid) | afc7f43b776f280240ac48bfe71ebc04033c1e87 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1906/afc7f43b776f280240ac48bfe71ebc04033c1e87/hyperdb.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1930,
67,
2354,
12,
2890,
16,
4283,
16,
756,
350,
4672,
9163,
6164,
326,
315,
1745,
6,
1272,
487,
279,
585,
9163,
1084,
273,
365,
18,
6530,
5359,
12,
12287,
16,
756,
350,
13,
2,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1930,
67,
2354,
12,
2890,
16,
4283,
16,
756,
350,
4672,
9163,
6164,
326,
315,
1745,
6,
1272,
487,
279,
585,
9163,
1084,
273,
365,
18,
6530,
5359,
12,
12287,
16,
756,
350,
13,
2,
-100... |
if check_date(arguments['from'], "T00:00:00Z") == "": | if check_date(arguments['from']) == "": | def check_args(arguments): "Check OAI arguments" out_args = { "verb" : "", "metadataPrefix" : "", "from" : "", "until" : "", "set" : "", "identifier" : "", "resumptionToken" : "" } out = "" | 10676a48ebef3971b64d13cba0d73641169dfb2d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12027/10676a48ebef3971b64d13cba0d73641169dfb2d/oai_repository.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
67,
1968,
12,
7099,
4672,
315,
1564,
531,
18194,
1775,
6,
225,
596,
67,
1968,
273,
288,
315,
16629,
6,
2398,
294,
23453,
315,
4165,
2244,
6,
282,
294,
23453,
315,
2080,
6,
2398,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
67,
1968,
12,
7099,
4672,
315,
1564,
531,
18194,
1775,
6,
225,
596,
67,
1968,
273,
288,
315,
16629,
6,
2398,
294,
23453,
315,
4165,
2244,
6,
282,
294,
23453,
315,
2080,
6,
2398,
... |
key += os.stat(url)[stat.ST_MTIME] | key += str(os.stat(url)[stat.ST_MTIME]) | def load(url, size=None, cache=False, vfs_save=False): """ Load a bitmap and return the image object. If width and height are given, the image is scaled to that. Setting only width or height will keep aspect ratio. If vfs_save is true, the so scaled bitmap will be stored in the vfs for future use. """ if size == None: width, height = None, None else: width, height = size try: # maybe the image is an image object from PIL image = mevas.imagelib.new(url.size, url.tostring(), url.mode) # scale the image if needed if width != None or height != None: image = resizebitmap(image, width, height) return image except: # no, it is not pass if url.find('/') == -1 and url.find('.') == -1: # this looks like a 'theme' image surl = theme_engine.get_theme().get_image(url) if surl: url = surl if cache: # first check the cache if width != None or height != None: key = 'scaled://%s-%s-%s' % (url, width, height) else: key = url key += os.stat(url)[stat.ST_MTIME] s = cache[key] if s: return s if vfs_save and (width == None or height == None): vfs_save = False # not in cache, load it filename = os.path.abspath(url) if vfs_save: vfs_save = vfs.getoverlay('%s.raw-%sx%s' % (filename, width, height)) try: if os.stat(vfs_save)[stat.ST_MTIME] > \ os.stat(filename)[stat.ST_MTIME]: f = open(vfs_save, 'r') image = mevas.imagelib.new((width, height), f.read(), 'RGBA') f.close() if cache: cache[key] = image return image except: pass if not os.path.isfile(filename): filename = os.path.join(config.IMAGE_DIR, url[8:]) if not os.path.isfile(filename): log.error('osd.py: Bitmap file "%s" doesnt exist!' % filename) return None try: try: image = mevas.imagelib.open(filename) except Exception, e: log.info('imagelib load problem: %s - trying Imaging' % e) i = Image.open(filename) image = mevas.imagelib.new(i.tostring(), i.size, i.mode) except: log.exception('Unknown Problem while loading image %s' % String(url)) return None # scale the image if needed if width != None or height != None: image = resizebitmap(image, width, height) if vfs_save: f = vfs.open(vfs_save, 'w') f.write(image.get_raw_data('RGBA')) f.close() if cache: cache[key] = image return image | a569de2baae8b10eeb5cdd24f2a3f55adebae91c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/a569de2baae8b10eeb5cdd24f2a3f55adebae91c/imagelib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1262,
12,
718,
16,
963,
33,
7036,
16,
1247,
33,
8381,
16,
20682,
67,
5688,
33,
8381,
4672,
3536,
4444,
279,
9389,
471,
327,
326,
1316,
733,
18,
971,
1835,
471,
2072,
854,
864,
16,
32... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1262,
12,
718,
16,
963,
33,
7036,
16,
1247,
33,
8381,
16,
20682,
67,
5688,
33,
8381,
4672,
3536,
4444,
279,
9389,
471,
327,
326,
1316,
733,
18,
971,
1835,
471,
2072,
854,
864,
16,
32... |
def simplex_with_xn(cache, xn,Star): | def simplex_with_xn(cache, xn, Star): | def simplex_with_xn(cache, xn,Star): for simplex in Star: bl = [numpy.linalg.det(a) for a in inside(cache, xn,simplex)] if reduce(lambda x,y: x and y, [i<0 for i in bl]) or reduce(lambda x,y: x and y, [i>0 for i in bl]): return simplex return None | 45c3545d7cec5ecfb8951397d1a6a5002a7e27f7 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6366/45c3545d7cec5ecfb8951397d1a6a5002a7e27f7/orngPade.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4143,
92,
67,
1918,
67,
22695,
12,
2493,
16,
619,
82,
16,
934,
297,
4672,
364,
4143,
92,
316,
934,
297,
30,
2811,
273,
306,
15974,
18,
80,
11521,
18,
8238,
12,
69,
13,
364,
279,
31... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4143,
92,
67,
1918,
67,
22695,
12,
2493,
16,
619,
82,
16,
934,
297,
4672,
364,
4143,
92,
316,
934,
297,
30,
2811,
273,
306,
15974,
18,
80,
11521,
18,
8238,
12,
69,
13,
364,
279,
31... |
file_stat = self.stat() | file_stat = self.stat(request) | def renderGET(self, request): | 0841773dc53e1cf69531c583f0bd8229a67bc31b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2515/0841773dc53e1cf69531c583f0bd8229a67bc31b/webdav.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1743,
3264,
12,
2890,
16,
590,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1743,
3264,
12,
2890,
16,
590,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
@register.inclusion_tag("shared_javascript.html") | @register.inclusion_tag(("shared_javascript.html", "../shared_javascript.html")) | def reports_navigation(coach_email, current_report="classreport"): return {'coach_email': coach_email, 'current_report': current_report } | 0f07c344864f199248f8978bf545cf3e0ae21a2a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12010/0f07c344864f199248f8978bf545cf3e0ae21a2a/templatetags.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10557,
67,
19537,
12,
2894,
497,
67,
3652,
16,
783,
67,
6006,
1546,
1106,
6006,
6,
4672,
327,
13666,
2894,
497,
67,
3652,
4278,
1825,
497,
67,
3652,
16,
296,
2972,
67,
6006,
4278,
783,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
10557,
67,
19537,
12,
2894,
497,
67,
3652,
16,
783,
67,
6006,
1546,
1106,
6006,
6,
4672,
327,
13666,
2894,
497,
67,
3652,
4278,
1825,
497,
67,
3652,
16,
296,
2972,
67,
6006,
4278,
783,... |
mkdir(entry.get('name')) | os.mkdir(entry.get('name')) | def InstallDirectory(self, entry): '''Install Directory Entry''' self.CondPrint('verbose', "Installing Directory %s" % (entry.get('name'))) try: fmode = lstat(entry.get('name')) if not S_ISDIR(fmode[ST_MODE]): self.CondPrint("debug", "Found a non-directory entry at %s" % (entry.get('name'))) try: unlink(entry.get('name')) except OSError: self.CondPrint('verbose', "Failed to unlink %s" % (entry.get('name'))) return False else: self.CondPrint("debug", "Found a pre-existing directory at %s" % (entry.get('name'))) exists = True except OSError: # stat failed exists = False | 6b7fe3dffd69efeeeabbce0bcd6cab97bde94cef /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11867/6b7fe3dffd69efeeeabbce0bcd6cab97bde94cef/Toolset.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10284,
2853,
12,
2890,
16,
1241,
4672,
9163,
6410,
8930,
3841,
26418,
365,
18,
12441,
5108,
2668,
11369,
2187,
315,
6410,
310,
8930,
738,
87,
6,
738,
261,
4099,
18,
588,
2668,
529,
11,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10284,
2853,
12,
2890,
16,
1241,
4672,
9163,
6410,
8930,
3841,
26418,
365,
18,
12441,
5108,
2668,
11369,
2187,
315,
6410,
310,
8930,
738,
87,
6,
738,
261,
4099,
18,
588,
2668,
529,
11,
... |
linker_so=('%s -mcygwin -mdll -static' % | linker_so=('%s -mcygwin -mdll' % | def __init__ (self, verbose=0, dry_run=0, force=0): | 03d5858241a734abfb9fdaf095d79a8774bc9053 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/03d5858241a734abfb9fdaf095d79a8774bc9053/cygwinccompiler.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
261,
2890,
16,
3988,
33,
20,
16,
10299,
67,
2681,
33,
20,
16,
2944,
33,
20,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
261,
2890,
16,
3988,
33,
20,
16,
10299,
67,
2681,
33,
20,
16,
2944,
33,
20,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.