rem stringlengths 2 226k | add stringlengths 0 227k | context stringlengths 8 228k | meta stringlengths 156 215 | input_ids list | attention_mask list | labels list |
|---|---|---|---|---|---|---|
step3.main() | step3.main([]) | def run_step3(): log("====> STEP 3 ====") import step3 step3.main() | 7d14dff7f9d5fee22870d0f07e518d0c68df00b4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6890/7d14dff7f9d5fee22870d0f07e518d0c68df00b4/run.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
67,
4119,
23,
13332,
613,
2932,
894,
34,
25538,
890,
422,
631,
7923,
1930,
2235,
23,
2235,
23,
18,
5254,
3816,
5717,
225,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
67,
4119,
23,
13332,
613,
2932,
894,
34,
25538,
890,
422,
631,
7923,
1930,
2235,
23,
2235,
23,
18,
5254,
3816,
5717,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
def try_to_launch_convertion(self): | def wait_tags_and_convert(self): | def try_to_launch_convertion(self): # check that all files have loaded their tags not_ready = [s for s in self.filelist.get_files() if not s["META"].tags_read] if not_ready: # retry later gobject.timeout_add(1000, self.try_to_launch_convertion) else: # start convertion self.do_convert() return False | 379396c6578d6b0d4b61f3821f039f5fb9768a5f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2369/379396c6578d6b0d4b61f3821f039f5fb9768a5f/soundconverter.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
775,
67,
869,
67,
20738,
67,
6283,
285,
12,
2890,
4672,
468,
866,
716,
777,
1390,
1240,
4203,
3675,
2342,
486,
67,
1672,
273,
306,
87,
364,
272,
316,
365,
18,
7540,
5449,
18,
588,
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,
775,
67,
869,
67,
20738,
67,
6283,
285,
12,
2890,
4672,
468,
866,
716,
777,
1390,
1240,
4203,
3675,
2342,
486,
67,
1672,
273,
306,
87,
364,
272,
316,
365,
18,
7540,
5449,
18,
588,
67... |
if("no06" not in SAFETYLIST): @argtypes(FNUM(1), FNUM(1)) def f06(self, num1, num2): return chr(num1+num2) | @argtypes(FNUM(1), FNUM(1)) def f06(self, num1, num2): return chr(num1+num2) | def f05(self, num1, num2, num3): #Note that the name of the function specifies the function number. Hex digits are capitalized """Add two longnums, resulting in a longnum""" return num1+num2 #The return must be a string, but @rettypes takes care of that for us | 1b6d56bac607a245727c486aff3e1937c50e04a9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3322/1b6d56bac607a245727c486aff3e1937c50e04a9/dc_exampledomain.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
284,
6260,
12,
2890,
16,
818,
21,
16,
818,
22,
16,
818,
23,
4672,
468,
8067,
716,
326,
508,
434,
326,
445,
11470,
326,
445,
1300,
18,
15734,
6815,
854,
12872,
1235,
3536,
986,
2795,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
284,
6260,
12,
2890,
16,
818,
21,
16,
818,
22,
16,
818,
23,
4672,
468,
8067,
716,
326,
508,
434,
326,
445,
11470,
326,
445,
1300,
18,
15734,
6815,
854,
12872,
1235,
3536,
986,
2795,
... |
assert False, \ "Each column represents an edge: -1 goes to 1." | msg += "Each column represents an edge: -1 goes to 1." assert False | def __init__(self, data=None, pos=None, loops=None, format=None, boundary=[], weighted=None, implementation='networkx', sparse=True, vertex_labels=True, **kwds): """ TESTS:: | 686dc2202d5cad031e57bede9540e945b8aab5e9 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9417/686dc2202d5cad031e57bede9540e945b8aab5e9/graph.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
501,
33,
7036,
16,
949,
33,
7036,
16,
14075,
33,
7036,
16,
740,
33,
7036,
16,
7679,
22850,
6487,
13747,
33,
7036,
16,
4471,
2218,
5185,
92,
2187,
9387,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
501,
33,
7036,
16,
949,
33,
7036,
16,
14075,
33,
7036,
16,
740,
33,
7036,
16,
7679,
22850,
6487,
13747,
33,
7036,
16,
4471,
2218,
5185,
92,
2187,
9387,
... |
Yet another example:: | Yet another example: | def coleman_integral(self, w, P, Q, algorithm = 'None'): """ INPUT: - w differential (if one of P,Q is Weierstrass, w must be odd) - P point on self - Q point on self - algorithm (optional) = None (uses Frobenius) or teichmuller (uses Teichmuller points) | 5067c9f3282b0d03ba4df2e4d4149da37b9c1331 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/5067c9f3282b0d03ba4df2e4d4149da37b9c1331/hyperelliptic_padic_field.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
276,
790,
4728,
67,
14970,
23811,
12,
2890,
16,
341,
16,
453,
16,
2238,
16,
4886,
273,
296,
7036,
11,
4672,
3536,
12943,
30,
300,
341,
15221,
2001,
261,
430,
1245,
434,
453,
16,
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,
276,
790,
4728,
67,
14970,
23811,
12,
2890,
16,
341,
16,
453,
16,
2238,
16,
4886,
273,
296,
7036,
11,
4672,
3536,
12943,
30,
300,
341,
15221,
2001,
261,
430,
1245,
434,
453,
16,
53,
... |
displayed. (type=C{int}) - C{variable_linelength}: The maximum line length used for | displayed. @type variable_linelength: C{int} @keyword variable_linelength: The maximum line length used for | def __init__(self, docmap, **kwargs): """ Construct a new HTML formatter, using the given documentation map. @param docmap: The documentation to output. @type docmap: L{DocMap} @param kwargs: Keyword arguments: - C{prj_name}: The name of the project. Defaults to none. (type=C{string}) - C{prj_url}: The target for the project hopeage link on the navigation bar. If C{prj_url} is not specified, then no hyperlink is created. (type=C{string}) - C{prj_link}: The label for the project link on the navigation bar. This link can contain arbitrary HTML code (e.g. images). By default, a label is constructed from C{prj_name}. (type=C{string}) - C{top}: The top page for the documentation. This is the default page shown main frame, when frames are enabled. C{top} can be a URL, the name of a module, the name of a class, or one of the special strings C{"trees.html"}, C{"indices.html"}, or C{"help.html"}. By default, the top-level package or module is used, if there is one; otherwise, C{"trees"} is used. (type=C{string}) - C{css}: The CSS stylesheet file. If C{css} is a file name, then the specified file's conents will be used. Otherwise, if C{css} is the name of a CSS stylesheet in L{epydoc.css}, then that stylesheet will be used. Otherwise, an error is reported. If no stylesheet is specified, then the default stylesheet is used. (type=C{string}) - C{private_css}: The CSS stylesheet file for the private API documentation. If C{css} is a file name, then the specified file's conents will be used. Otherwise, if C{css} is the name of a CSS stylesheet in L{epydoc.css}, then that stylesheet will be used. Otherwise, an error is reported. If no stylesheet is specified, then the private API documentation will use the same stylesheet as the public API documentation. (type=C{string}) - C{help}: The name of the help file. If no help file is specified, then the default help file will be used. (type=C{string}) - C{private}: Whether to create documentation for private objects. By default, private objects are documented. (type=C{boolean}) - C{frames}: Whether to create a frames-based table of contents. By default, it is produced. (type=C{boolean}) - C{show_imports}: Whether or not to display lists of imported functions and classes. By default, they are not shown. (type=C{boolean}) - C{index_parameters}: Whether or not to include function parameters in the identifier index. By default, they are not included. (type=C{boolean}) - C{variable_maxlines}: The maximum number of lines that should be displayed for the value of a variable in the variable details section. By default, 8 lines are displayed. (type=C{int}) - C{variable_linelength}: The maximum line length used for displaying the values of variables in the variable details sections. If a line is longer than this length, then it will be wrapped to the next line. The default line length is 70 characters. (type=C{int}) - C{variable_summary_linelength}: The maximum line length used for displaying the values of variables in the summary section. If a line is longer than this length, then it will be truncated. The default is 40 characters. (type=C{int}) - C{variable_tooltip_linelength}: The maximum line length used for tooltips for the values of variables. If a line is longer than this length, then it will be truncated. The default is 600 characters. (type=C{int}) - C{inheritance}: How inherited objects should be displayed. If C{inheritance='grouped'}, then inherited objects are gathered into groups; if C{inheritance='listed'}, then inherited objects are listed in a short list at the end of their group; if C{inheritance='included'}, then inherited objects are mixed in with non-inherited objects. The default is 'grouped'. (type=C{string}) """ self._docmap = docmap | 21a6d8c30a29a133335836c07a6da6e2f0b95f2a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11420/21a6d8c30a29a133335836c07a6da6e2f0b95f2a/html.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
997,
1458,
16,
2826,
4333,
4672,
3536,
14291,
279,
394,
3982,
4453,
16,
1450,
326,
864,
7323,
852,
18,
632,
891,
997,
1458,
30,
1021,
7323,
358,
876,
18,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
997,
1458,
16,
2826,
4333,
4672,
3536,
14291,
279,
394,
3982,
4453,
16,
1450,
326,
864,
7323,
852,
18,
632,
891,
997,
1458,
30,
1021,
7323,
358,
876,
18,... |
return apply(SaveAs, (), options).show() | return SaveAs(**options).show() | def asksaveasfilename(**options): "Ask for a filename to save as" return apply(SaveAs, (), options).show() | f1820d8b65cb2d1a9c6bd4654a59a5c92d015ae1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/f1820d8b65cb2d1a9c6bd4654a59a5c92d015ae1/tkFileDialog.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6827,
5688,
345,
3459,
12,
636,
2116,
4672,
315,
23663,
364,
279,
1544,
358,
1923,
487,
6,
225,
327,
7074,
1463,
12,
636,
2116,
2934,
4500,
1435,
225,
2,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6827,
5688,
345,
3459,
12,
636,
2116,
4672,
315,
23663,
364,
279,
1544,
358,
1923,
487,
6,
225,
327,
7074,
1463,
12,
636,
2116,
2934,
4500,
1435,
225,
2,
-100,
-100,
-100,
-100,
-100,
... |
tool.end_paragraph(1) body_rows = out.getvalue().split('\n')[:-2] | tool.end_paragraph(0) body_rows = out.getvalue().split('\n')[:-1] | def wrap_text_in_a_box(title='', body='', char_sep=' ', max_col=72): """Return a nicely formatted text box: ****************** ** title ** **--------------** ** body ** ****************** """ ret = '' out = StringIO() tool = AbstractFormatter(DumbWriter(out, maxcol=max_col)) for row in body.split('\n'): tool.add_flowing_data(row) tool.end_paragraph(1) body_rows = out.getvalue().split('\n')[:-2] out = StringIO() tool = AbstractFormatter(DumbWriter(out, maxcol=max_col)) tool.add_flowing_data(title) title_rows = out.getvalue().split('\n') max_len = max([len(row) for row in title_rows + body_rows]) + 6 ret += '*' * max_len + '\n' if title: for row in title_rows: ret += '** %s%s **\n' % (row, ' ' * (max_len - len(row) - 6)) ret += '**' + char_sep * (max_len - 4) + '**\n' for row in body_rows: ret += '** %s%s **\n' % (row, ' ' * (max_len - len(row) - 6)) ret += '*' * max_len + '\n' return ret | b9d5b2548c57a6ebd568af4a3e0eaa2b9f5dcc05 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1780/b9d5b2548c57a6ebd568af4a3e0eaa2b9f5dcc05/textutils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2193,
67,
955,
67,
267,
67,
69,
67,
2147,
12,
2649,
2218,
2187,
1417,
2218,
2187,
1149,
67,
10814,
2218,
2265,
943,
67,
1293,
33,
9060,
4672,
3536,
990,
279,
11562,
2357,
4955,
977,
39... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2193,
67,
955,
67,
267,
67,
69,
67,
2147,
12,
2649,
2218,
2187,
1417,
2218,
2187,
1149,
67,
10814,
2218,
2265,
943,
67,
1293,
33,
9060,
4672,
3536,
990,
279,
11562,
2357,
4955,
977,
39... |
elif PROCESSOR in ['x86', 'Power Macintosh']: algorithm = 'pari' | def number_of_partitions(n,k=None, algorithm='default'): r""" Returns the size of partitions_list(n,k). INPUT: n -- an integer k -- (default: None); if specified, instead returns the cardinality of the set of all (unordered) partitions of the positive integer n into sums with k summands. algorithm -- (default: 'default') 'default' -- if k is given use Gap. Otherwise, on x86 when n > 3000, use 'bober' On non x86 use 'pari'. 'bober' -- use Jonathon Bober's implementation 'gap' -- use GAP (VERY *slow*) 'pari' -- use PARI. Speed seems the same as GAP until $n$ is in the thousands, in which case PARI is faster. *But* PARI has a bug, e.g., on 64-bit Linux PARI-2.3.2 outputs numbpart(147007)%1000 as 536, but it should be 533!. So do not use this option. IMPLEMENTATION: Wraps GAP's NrPartitions or PARI's numbpart function. Use the function \code{partitions(n)} to return a generator over all partitions of $n$. It is possible to associate with every partition of the integer n a conjugacy class of permutations in the symmetric group on n points and vice versa. Therefore p(n) = NrPartitions(n) is the number of conjugacy classes of the symmetric group on n points. EXAMPLES: sage: v = list(partitions(5)); v [(1, 1, 1, 1, 1), (1, 1, 1, 2), (1, 2, 2), (1, 1, 3), (2, 3), (1, 4), (5,)] sage: len(v) 7 sage: number_of_partitions(5, algorithm='gap') 7 sage: number_of_partitions(5, algorithm='pari') 7 sage: number_of_partitions(5, algorithm='bober') 7 The input must be a nonnegative integer or a ValueError is raised. sage: number_of_partitions(-5) Traceback (most recent call last): ... ValueError: n (=-5) must be a nonnegative integer sage: number_of_partitions(10,2) 5 sage: number_of_partitions(10) 42 sage: number_of_partitions(3) 3 sage: number_of_partitions(10) 42 sage: number_of_partitions(3, algorithm='pari') 3 sage: number_of_partitions(10, algorithm='pari') 42 sage: number_of_partitions(40) 37338 sage: number_of_partitions(100) 190569292 sage: number_of_partitions(100000) 27493510569775696512677516320986352688173429315980054758203125984302147328114964173055050741660736621590157844774296248940493063070200461792764493033510116079342457190155718943509725312466108452006369558934464248716828789832182345009262853831404597021307130674510624419227311238999702284408609370935531629697851569569892196108480158600569421098519 A generating function for p(n) is given by the reciprocal of Euler's function: \[ \sum_{n=0}^\infty p(n)x^n = \prod_{k=1}^\infty \left(\frac {1}{1-x^k} \right). \] We use SAGE to verify that the first several coefficients do instead agree: sage: q = PowerSeriesRing(QQ, 'q', default_prec=9).gen() sage: prod([(1-q^k)^(-1) for k in range(1,9)]) ## partial product of 1 + q + 2*q^2 + 3*q^3 + 5*q^4 + 7*q^5 + 11*q^6 + 15*q^7 + 22*q^8 + O(q^9) sage: [number_of_partitions(k) for k in range(2,10)] [2, 3, 5, 7, 11, 15, 22, 30] REFERENCES: http://en.wikipedia.org/wiki/Partition_%28number_theory%29 TESTS: sage: n = 500 + randint(0,500) sage: number_of_partitions( n - (n % 385) + 369) % 385 == 0 True sage: n = 1500 + randint(0,1500) sage: number_of_partitions( n - (n % 385) + 369) % 385 == 0 True sage: n = 1000000 + randint(0,1000000) sage: number_of_partitions( n - (n % 385) + 369) % 385 == 0 True sage: n = 1000000 + randint(0,1000000) sage: number_of_partitions( n - (n % 385) + 369) % 385 == 0 True sage: n = 1000000 + randint(0,1000000) sage: number_of_partitions( n - (n % 385) + 369) % 385 == 0 True sage: n = 1000000 + randint(0,1000000) sage: number_of_partitions( n - (n % 385) + 369) % 385 == 0 True sage: n = 1000000 + randint(0,1000000) sage: number_of_partitions( n - (n % 385) + 369) % 385 == 0 True sage: n = 1000000 + randint(0,1000000) sage: number_of_partitions( n - (n % 385) + 369) % 385 == 0 True sage: n = 100000000 + randint(0,100000000) # takes a long time sage: number_of_partitions( n - (n % 385) + 369) % 385 == 0 True sage: n = 100000000 + randint(0,100000000) # takes a long time sage: number_of_partitions( n - (n % 385) + 369) % 385 == 0 True sage: n = 100000000 + randint(0,100000000) # takes a long time sage: number_of_partitions( n - (n % 385) + 369) % 385 == 0 True Another consistency test for n up to 500: sage: len([n for n in [1..500] if number_of_partitions(n) != number_of_partitions(n,algorithm='pari')]) 0 """ n = ZZ(n) if n < 0: raise ValueError, "n (=%s) must be a nonnegative integer"%n elif n == 0: return ZZ(1) global first_warning PROCESSOR = os.uname()[-1] bober_is_good = 'x86' in PROCESSOR if k is not None: algorithm = 'gap' elif algorithm == 'default': if bober_is_good: algorithm = 'bober' elif PROCESSOR in ['x86', 'Power Macintosh']: algorithm = 'pari' else: algorithm = 'gap' if algorithm == 'gap': if k is None: ans=gap.eval("NrPartitions(%s)"%(ZZ(n))) else: ans=gap.eval("NrPartitions(%s,%s)"%(ZZ(n),ZZ(k))) return ZZ(ans) if k is not None: raise ValueError, "only the GAP algorithm works if k is specified." if algorithm == 'bober': if not bober_is_good: if first_warning: print "*WARNING*: bober's implementation is broken on this platform or this size of n." first_warning=False return partitions_ext.number_of_partitions(n) elif algorithm == 'pari': if n > 3000 and 'x86_64' in PROCESSOR: if first_warning: print "*WARNING*: Pari's numbpart is very buggy on x86_64 (fixed in svn, so don't report to pari-dev)" first_warning = False return ZZ(pari(ZZ(n)).numbpart()) raise ValueError, "unknown algorithm '%s'"%algorithm | f0f9a1fa3f7057ce6c279f53361876ef7f50795f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/f0f9a1fa3f7057ce6c279f53361876ef7f50795f/combinat.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1300,
67,
792,
67,
21275,
12,
82,
16,
79,
33,
7036,
16,
4886,
2218,
1886,
11,
4672,
436,
8395,
2860,
326,
963,
434,
10060,
67,
1098,
12,
82,
16,
79,
2934,
225,
12943,
30,
290,
1493,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1300,
67,
792,
67,
21275,
12,
82,
16,
79,
33,
7036,
16,
4886,
2218,
1886,
11,
4672,
436,
8395,
2860,
326,
963,
434,
10060,
67,
1098,
12,
82,
16,
79,
2934,
225,
12943,
30,
290,
1493,
... | |
es.msg("give") | def give(self, weapon, useWeapon=False, strip=False): | 02e919b0ad47effe0963368576895a6db2c8596f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4555/02e919b0ad47effe0963368576895a6db2c8596f/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8492,
12,
2890,
16,
732,
28629,
16,
999,
3218,
28629,
33,
8381,
16,
2569,
33,
8381,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
8492,
12,
2890,
16,
732,
28629,
16,
999,
3218,
28629,
33,
8381,
16,
2569,
33,
8381,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... | |
if conf.Read() and conf.Get('UI', 'Standalone') == '1': | if conf.Read(template = True) and conf.Get('UI', 'Standalone') == '1': | def GetProfileDir(bUnicode): try: if sys.platform.startswith("win"): # read template config file conf = Config.Settings(os.path.join(GetCurrentDir(bUnicode), 'ClamWin.conf')) if conf.Read() and conf.Get('UI', 'Standalone') == '1': profileDir = GetCurrentDir(bUnicode) else: profileDir = shell.SHGetSpecialFolderPath(0, shellcon.CSIDL_APPDATA, True) profileDir = os.path.join(profileDir, '.clamwin') # change encoding to proper unicode if bUnicode: profileDir = pywintypes.Unicode(profileDir) else: profileDir = os.path.join(os.path.expanduser('~'), '.clamwin') except Exception, e: print 'Could not get the profile folder. Error: %s' % str(e) profileDir = GetCurrentDir(bUnicode) return profileDir | 20c01ec7115a79dccede20ebc9f9fb2a50d3d3ca /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3644/20c01ec7115a79dccede20ebc9f9fb2a50d3d3ca/Utils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
968,
4029,
1621,
12,
70,
16532,
4672,
775,
30,
309,
2589,
18,
9898,
18,
17514,
1918,
2932,
8082,
6,
4672,
468,
855,
1542,
642,
585,
2195,
273,
1903,
18,
2628,
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,
968,
4029,
1621,
12,
70,
16532,
4672,
775,
30,
309,
2589,
18,
9898,
18,
17514,
1918,
2932,
8082,
6,
4672,
468,
855,
1542,
642,
585,
2195,
273,
1903,
18,
2628,
12,
538,
18,
803,
18,
5... |
cmd = 'log --max-count=1' gitlog = self.gitcmd(cmd).stdout return str(gitlog.split('\n')[0]).split()[1] | cmd = 'log --pretty=format:"%H" -1' l_head_cmd = self.gitcmd(cmd) return l_head_cmd.stdout | def get_local_head(self): cmd = 'log --max-count=1' gitlog = self.gitcmd(cmd).stdout | 262f1ae410e47550d744014d4cd8740c69d1f450 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12268/262f1ae410e47550d744014d4cd8740c69d1f450/git.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
3729,
67,
1978,
12,
2890,
4672,
1797,
273,
296,
1330,
1493,
1896,
17,
1883,
33,
21,
11,
5071,
1330,
273,
365,
18,
6845,
4172,
12,
4172,
2934,
10283,
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,
336,
67,
3729,
67,
1978,
12,
2890,
4672,
1797,
273,
296,
1330,
1493,
1896,
17,
1883,
33,
21,
11,
5071,
1330,
273,
365,
18,
6845,
4172,
12,
4172,
2934,
10283,
2,
-100,
-100,
-100,
-100,... |
this = apply(_quickfix.new_BenchmarkCurveCurrency, args) | this = _quickfix.new_BenchmarkCurveCurrency(*args) | def __init__(self, *args): this = apply(_quickfix.new_BenchmarkCurveCurrency, args) try: self.this.append(this) except: self.this = this | 7e632099fd421880c8c65fb0cf610d338d115ee9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8819/7e632099fd421880c8c65fb0cf610d338d115ee9/quickfix.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
380,
1968,
4672,
333,
273,
389,
19525,
904,
18,
2704,
67,
30672,
9423,
7623,
30857,
1968,
13,
775,
30,
365,
18,
2211,
18,
6923,
12,
2211,
13,
1335,
30,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
380,
1968,
4672,
333,
273,
389,
19525,
904,
18,
2704,
67,
30672,
9423,
7623,
30857,
1968,
13,
775,
30,
365,
18,
2211,
18,
6923,
12,
2211,
13,
1335,
30,
... |
"""Test get events filtered by arguments given.""" | """Test get events filtered by arguments given. """ | def test_search_events(self): """Test get events filtered by arguments given.""" cal = self.cal1 # Test with 1 event attendee_value = 'mailto:jdoe@itaapy.com' | 4284d14984f2a4b3da93b77281110353f761aa67 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12681/4284d14984f2a4b3da93b77281110353f761aa67/test_ical.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
3072,
67,
5989,
12,
2890,
4672,
3536,
4709,
336,
2641,
5105,
635,
1775,
864,
18,
3536,
1443,
273,
365,
18,
771,
21,
468,
7766,
598,
404,
871,
27645,
20953,
67,
1132,
273,
296... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
3072,
67,
5989,
12,
2890,
4672,
3536,
4709,
336,
2641,
5105,
635,
1775,
864,
18,
3536,
1443,
273,
365,
18,
771,
21,
468,
7766,
598,
404,
871,
27645,
20953,
67,
1132,
273,
296... |
name="dihedral cos %i-%i-%i-%i (%s)" % (id + (tag,)), | name="dihedral cos %i-%i-%i-%i" % id, | def add_dihedral_cosines(self, criteria_sets): """ Adds the dihedral angles described in criteria_sets to the collection. """ result = dict((tag, []) for tag in criteria_sets.yield_tags()) for tag, match in self.molecular_graph.yield_subgraphs(criteria_sets): id = tuple([match.get_destination(source) for source in [0, 1, 2, 3]]) s0 = self.add(Select, id[0]) s1 = self.add(Select, id[1]) s2 = self.add(Select, id[2]) s3 = self.add(Select, id[3]) el = self.add(Delta, s1, s0) em = self.add(Delta, s1, s2) er = self.add(Delta, s2, s3) dll = self.add(DistanceSqr, el) dmm = self.add(DistanceSqr, em) drr = self.add(DistanceSqr, er) dlm = self.add(Dot, el, em) dmr = self.add(Dot, em, er) drl = self.add(Dot, er, el) # tin = self.add(Mul, dlm, dmr) tout = self.add(Mul, drl, dmm) t = self.add(Sub, tout, tin) noutl = self.add(Mul, dll, dmm) noutr = self.add(Mul, dmm, drr) dlm2 = self.add(Sqr, dlm) dmr2 = self.add(Sqr, dmr) nl = self.add(Sub, noutl, dlm2) nr = self.add(Sub, noutr, dmr2) n2 = self.add(Mul, nl, nr) n = self.add(Sqrt, n2) dihedral_cos = self.add( Div, t, n, name="dihedral cos %i-%i-%i-%i (%s)" % (id + (tag,)), id=id ) self.add_internal_coordinate(tag, dihedral_cos) | 1688fd6453a932f4536672a83da72a51dfe1e12e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11053/1688fd6453a932f4536672a83da72a51dfe1e12e/internal_coordinates.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
67,
3211,
28351,
67,
14445,
1465,
12,
2890,
16,
3582,
67,
4424,
4672,
3536,
15605,
326,
4314,
28351,
15479,
11893,
316,
3582,
67,
4424,
358,
326,
1849,
18,
3536,
563,
273,
2065,
124... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
67,
3211,
28351,
67,
14445,
1465,
12,
2890,
16,
3582,
67,
4424,
4672,
3536,
15605,
326,
4314,
28351,
15479,
11893,
316,
3582,
67,
4424,
358,
326,
1849,
18,
3536,
563,
273,
2065,
124... |
['CHILDREN_DOCUMENT_LIST:j_id364:1:j_id366', 'Delete'], | ['CHILDREN_DOCUMENT_LIST:j_id362:1:j_id364', 'Delete'], | def deleteItem(self, title): fl = self.fl folder_uid = self.getDocUid() state = fl.getLastJsfState() self.selectItem(title) # TODO: NXBT-77 delete action fl.post(fl.server_url + "/view_documents.faces", params=[ ['CHILDREN_DOCUMENT_LIST', 'CHILDREN_DOCUMENT_LIST'], ['CHILDREN_DOCUMENT_LIST:dataTable:0:document_checkbox_select', 'on'], ['CHILDREN_DOCUMENT_LIST:j_id364:1:j_id366', 'Delete'], ['javax.faces.ViewState', state]], description='Delete document "%s"' % title) fl.assert_('Document(s) deleted' in fl.getBody()) return self | d274ba2caaa289c470f1ee0ebee8e9d5c3bb1ee9 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11813/d274ba2caaa289c470f1ee0ebee8e9d5c3bb1ee9/pages.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1430,
1180,
12,
2890,
16,
2077,
4672,
1183,
273,
365,
18,
2242,
3009,
67,
1911,
273,
365,
18,
588,
1759,
11994,
1435,
919,
273,
1183,
18,
588,
3024,
8382,
74,
1119,
1435,
365,
18,
4025... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1430,
1180,
12,
2890,
16,
2077,
4672,
1183,
273,
365,
18,
2242,
3009,
67,
1911,
273,
365,
18,
588,
1759,
11994,
1435,
919,
273,
1183,
18,
588,
3024,
8382,
74,
1119,
1435,
365,
18,
4025... |
self.is_opaque() | def render_to_texture(self, alpha=True): """ Returns a texture constructed from this render. This may return a cached textue, if one has already been rendered. | a51633b511d9b51335bd94357b5052301638df71 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10962/a51633b511d9b51335bd94357b5052301638df71/render.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1743,
67,
869,
67,
955,
594,
12,
2890,
16,
4190,
33,
5510,
4672,
3536,
2860,
279,
11428,
15688,
628,
333,
1743,
18,
1220,
2026,
327,
279,
3472,
977,
344,
16,
309,
1245,
711,
1818,
2118... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1743,
67,
869,
67,
955,
594,
12,
2890,
16,
4190,
33,
5510,
4672,
3536,
2860,
279,
11428,
15688,
628,
333,
1743,
18,
1220,
2026,
327,
279,
3472,
977,
344,
16,
309,
1245,
711,
1818,
2118... | |
if not re.match(r"^([\w-]+)/([\w-]+)/([\w-]+)/([\w-]+)$", key): | if not re.match(r"^([\w\.-]+)/([\w\.-]+)/([\w\.-]+)/([\w\.-]+)$", key): | def testPerfExpectations(self): perf_data = LoadData() | 63c15a317b1d50109904b0b27bbdec9ad3bec431 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9392/63c15a317b1d50109904b0b27bbdec9ad3bec431/perf_expectations_unittest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
22016,
11988,
1012,
12,
2890,
4672,
14184,
67,
892,
273,
4444,
751,
1435,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
22016,
11988,
1012,
12,
2890,
4672,
14184,
67,
892,
273,
4444,
751,
1435,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
`path` is ignored for now. | def resource_href(self, path=None, **kwargs): """Return an URL to the attachment itself. | c953ab7fb4977778c7d8965692b9c709090a0585 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9317/c953ab7fb4977778c7d8965692b9c709090a0585/attachment.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1058,
67,
7547,
12,
2890,
16,
589,
33,
7036,
16,
2826,
4333,
4672,
3536,
990,
392,
1976,
358,
326,
6042,
6174,
18,
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,
1058,
67,
7547,
12,
2890,
16,
589,
33,
7036,
16,
2826,
4333,
4672,
3536,
990,
392,
1976,
358,
326,
6042,
6174,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... | |
subdir = int(sys.argv[i+1]) | subdir = sys.argv[i+1] | def getArgs(): global debug, level, inputfile, title, subdir if (len(sys.argv) == 1): showUsage() sys.exit()() else: for i in range(len(sys.argv)): if (i != 0): if (sys.argv[i] == "-d"): debug = 1 # test for debug flag elif (sys.argv[i] == "-?"): # test for help flag showUsage() # show the help sys.exit() # exit elif (sys.argv[i] == "-l"): # test for the level flag level = int(sys.argv[i+1]) # get the level i = i + 1 # increment the pointer elif (sys.argv[i] == "-D"): # test for the subdir flag subdir = int(sys.argv[i+1]) # get the subdir i = i + 1 # increment the pointer elif (sys.argv[i] == "-t"): title = 1 # test for title flag elif (sys.argv[i] == "--help"): showUsage() sys.exit() elif (sys.argv[i] == "-h"): showUsage() sys.exit() elif (sys.argv[i] == "-v"): showVersion() sys.exit() elif (sys.argv[i][0] == "-"): print "Error! Unknown option. Aborting" sys.exit() else: # get the input file name inputfile = sys.argv[i] | b79f238e321923bc627c425c399b21d3d722cf71 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6154/b79f238e321923bc627c425c399b21d3d722cf71/otlsplit.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
30169,
13332,
2552,
1198,
16,
1801,
16,
810,
768,
16,
2077,
16,
16921,
309,
261,
1897,
12,
9499,
18,
19485,
13,
422,
404,
4672,
2405,
5357,
1435,
2589,
18,
8593,
1435,
1435,
469,
30,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
30169,
13332,
2552,
1198,
16,
1801,
16,
810,
768,
16,
2077,
16,
16921,
309,
261,
1897,
12,
9499,
18,
19485,
13,
422,
404,
4672,
2405,
5357,
1435,
2589,
18,
8593,
1435,
1435,
469,
30,
3... |
if label.startswith(uace_prefix): | if label.startswith(ace_prefix): | def ToASCII(label): try: # Step 1: try ASCII label = label.encode("ascii") except UnicodeError: pass else: # Skip to step 3: UseSTD3ASCIIRules is false, so # Skip to step 8. if 0 < len(label) < 64: return label raise UnicodeError("label empty or too long") # Step 2: nameprep label = nameprep(label) # Step 3: UseSTD3ASCIIRules is false # Step 4: try ASCII try: label = label.encode("ascii") except UnicodeError: pass else: # Skip to step 8. if 0 < len(label) < 64: return label raise UnicodeError("label empty or too long") # Step 5: Check ACE prefix if label.startswith(uace_prefix): raise UnicodeError("Label starts with ACE prefix") # Step 6: Encode with PUNYCODE label = label.encode("punycode") # Step 7: Prepend ACE prefix label = ace_prefix + label # Step 8: Check size if 0 < len(label) < 64: return label raise UnicodeError("label empty or too long") | cc8c2fe72be08080ce95434d60e82e08cbffb739 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8125/cc8c2fe72be08080ce95434d60e82e08cbffb739/idna.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2974,
13756,
12,
1925,
4672,
775,
30,
468,
8693,
404,
30,
775,
11768,
1433,
273,
1433,
18,
3015,
2932,
9184,
7923,
1335,
9633,
668,
30,
1342,
469,
30,
468,
6611,
358,
2235,
890,
30,
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,
2974,
13756,
12,
1925,
4672,
775,
30,
468,
8693,
404,
30,
775,
11768,
1433,
273,
1433,
18,
3015,
2932,
9184,
7923,
1335,
9633,
668,
30,
1342,
469,
30,
468,
6611,
358,
2235,
890,
30,
26... |
self.assertRaises(ConnectionClosed, read_http, fd) fd.close() | try: result = fd.readline() assert not result, 'The remote side is expected to close the connection, but it send %r' % (result, ) except socket.error, ex: if ex[0] not in CONN_ABORTED_ERRORS: raise | def test_004_connection_close(self): fd = self.connect().makefile(bufsize=1) fd.write('GET / HTTP/1.1\r\nHost: localhost\r\n\r\n') read_http(fd) fd.write('GET / HTTP/1.1\r\nHost: localhost\r\nConnection: close\r\n\r\n') read_http(fd) fd.write('GET / HTTP/1.1\r\nHost: localhost\r\n\r\n') self.assertRaises(ConnectionClosed, read_http, fd) fd.close() | 5098521adcba1c353a948216048f6b635abcfc73 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10423/5098521adcba1c353a948216048f6b635abcfc73/wsgi_test.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
26565,
67,
4071,
67,
4412,
12,
2890,
4672,
5194,
273,
365,
18,
3612,
7675,
6540,
768,
12,
4385,
1467,
33,
21,
13,
5194,
18,
2626,
2668,
3264,
342,
2239,
19,
21,
18,
21,
64,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
26565,
67,
4071,
67,
4412,
12,
2890,
4672,
5194,
273,
365,
18,
3612,
7675,
6540,
768,
12,
4385,
1467,
33,
21,
13,
5194,
18,
2626,
2668,
3264,
342,
2239,
19,
21,
18,
21,
64,... |
for indirection in self._indirections: | for indirection in indirections: | def getNameGen(self): str = '' prevIndirection = None curIndirection = None nextIndirection = None # make sure the indirections don't go away on us for indirection in self._indirections: indirection.acquire() for i in xrange(len(self._indirections)): yield None if i > 0: prevIndirection = self._indirections[i-1] else: prevIndirection = None curIndirection = self._indirections[i] if i < len(self._indirections)-1: nextIndirection = self._indirections[i+1] else: nextIndirection = None str += curIndirection.getString(prevIndirection=prevIndirection, nextIndirection=nextIndirection) for indirection in self._indirections: yield None indirection.release() yield str | 69e4f8ce89f4ff77b26910a79c23f429f0003e58 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7242/69e4f8ce89f4ff77b26910a79c23f429f0003e58/ContainerLeakDetector.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1723,
7642,
12,
2890,
4672,
609,
273,
875,
2807,
3866,
2769,
273,
599,
662,
3866,
2769,
273,
599,
1024,
3866,
2769,
273,
599,
468,
1221,
3071,
326,
1547,
2769,
87,
2727,
1404,
1960,
1080... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1723,
7642,
12,
2890,
4672,
609,
273,
875,
2807,
3866,
2769,
273,
599,
662,
3866,
2769,
273,
599,
1024,
3866,
2769,
273,
599,
468,
1221,
3071,
326,
1547,
2769,
87,
2727,
1404,
1960,
1080... |
parenthesis = "(%s actives tasks)"%nbr_of_tasks | parenthesis = "(%s active tasks)"%nbr_of_tasks | def refresh_list(self,a=None) : #pylint: disable-msg=W0613 # Save collapsed rows self.task_ts.foreach(self.update_collapsed_row, None) #selected tasks : selected_uid = self.get_selected_task(self.task_tview) tselect = self.task_tview.get_selection() t_path = None if tselect : t_model,t_path = tselect.get_selected_rows() #pylint: disable-msg=W0612 #Scroll position : vscroll_value = self.task_tview.get_vadjustment().get_value() hscroll_value = self.task_tview.get_hadjustment().get_value() #to refresh the list we build a new treestore then replace the existing new_taskts = treetools.new_task_ts(dnd_func=self.row_dragndrop) tag_list,notag_only = self.get_selected_tags() nbr_of_tasks = 0 #We build the active tasks pane if self.workview : tasks = self.req.get_active_tasks_list(tags=tag_list,\ notag_only=notag_only,workable=True, started_only=False) for tid in tasks : self.add_task_tree_to_list(new_taskts,tid,None,selected_uid,\ treeview=False) nbr_of_tasks = len(tasks) else : #building the classical treeview active_root_tasks = self.req.get_active_tasks_list(tags=tag_list,\ notag_only=notag_only, is_root=True, started_only=False) active_tasks = self.req.get_active_tasks_list(tags=tag_list,\ notag_only=notag_only, is_root=False, started_only=False) for tid in active_root_tasks : self.add_task_tree_to_list(new_taskts, tid, None,\ selected_uid,active_tasks=active_tasks) nbr_of_tasks = len(active_tasks) #Set the title of the window : if nbr_of_tasks == 0 : parenthesis = "(no active task)" elif nbr_of_tasks == 1 : parenthesis = "(1 active task)" else : parenthesis = "(%s actives tasks)"%nbr_of_tasks self.window.set_title("Getting Things Gnome! %s"%parenthesis) self.task_tview.set_model(new_taskts) self.task_ts = new_taskts #We expand all the we close the tasks who were not saved as "expanded" self.task_tview.expand_all() self.task_tview.map_expanded_rows(self.restore_collapsed,None) # Restore sorting if not self.noteview : if self.priv["tasklist"].has_key("sort_column") and \ self.priv["tasklist"].has_key("sort_order") : if self.priv["tasklist"]["sort_column"] is not None and \ self.priv["tasklist"]["sort_order"] is not None : self.sort_tasklist_rows(self.priv["tasklist"]["sort_column"], \ self.priv["tasklist"]["sort_order"]) #We reselect the selected tasks selection = self.task_tview.get_selection() if t_path : for i in t_path : selection.select_path(i) #scroll position #We have to call that in another thread, else it will not work def restore_vscroll(old_position) : vadjust = self.task_tview.get_vadjustment() #We ensure that we will not scroll out of the window #It was bug #331285 vscroll = min(old_position,(vadjust.upper - vadjust.page_size)) vadjust.set_value(vscroll) def restore_hscroll(old_position) : hadjust = self.task_tview.get_hadjustment() hscroll = min(old_position,(hadjust.upper - hadjust.page_size)) hadjust.set_value(hscroll) gobject.idle_add(restore_vscroll,vscroll_value) gobject.idle_add(restore_hscroll,hscroll_value) | 3d12b33ff80bcaca6c7f8fbc15db1bd385d1b772 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8234/3d12b33ff80bcaca6c7f8fbc15db1bd385d1b772/browser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4460,
67,
1098,
12,
2890,
16,
69,
33,
7036,
13,
294,
468,
2074,
5671,
30,
4056,
17,
3576,
33,
59,
7677,
3437,
225,
468,
7074,
17027,
2595,
365,
18,
4146,
67,
3428,
18,
25055,
12,
289... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4460,
67,
1098,
12,
2890,
16,
69,
33,
7036,
13,
294,
468,
2074,
5671,
30,
4056,
17,
3576,
33,
59,
7677,
3437,
225,
468,
7074,
17027,
2595,
365,
18,
4146,
67,
3428,
18,
25055,
12,
289... |
dydx[0] = dy[0]/dn etc""" | dydx[0] = dy[0]/d\eta etc""" | def derivs(self, t, y): """Basic background equations of motion. dydx[0] = dy[0]/dn etc""" #get potential from function U, dUdphi, d2Udphi2 = self.potentials(y) #Set derivatives dydx = N.zeros(3) #d\phi_0/dn = y_1 dydx[0] = y[1] #dphi^prime/dn dydx[1] = -(U*y[1] + dUdphi)/(y[2]**2) #dH/dn dydx[2] = -0.5*(y[1]**2)*y[2] #Hubble flow parameter self.epsilon.append((t,-dydx[2]/y[2])) return dydx | 31f129677b3d25900e1921994acc1486138988b6 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7283/31f129677b3d25900e1921994acc1486138988b6/cosmomodels.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9630,
87,
12,
2890,
16,
268,
16,
677,
4672,
3536,
8252,
5412,
30369,
434,
21188,
18,
7732,
13437,
63,
20,
65,
273,
7732,
63,
20,
18537,
72,
64,
1066,
5527,
8395,
225,
468,
588,
8555,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9630,
87,
12,
2890,
16,
268,
16,
677,
4672,
3536,
8252,
5412,
30369,
434,
21188,
18,
7732,
13437,
63,
20,
65,
273,
7732,
63,
20,
18537,
72,
64,
1066,
5527,
8395,
225,
468,
588,
8555,
... |
def OnReportRegisterBatting(self, event): bs = statscan.BattingAccumulator() dialog = wxProgressDialog("Generating batting register", "Generating batting register", 100, self, | def RunReport(self, message, title, acc): dialog = wxProgressDialog(message, message, 100, self, | def OnReportRegisterBatting(self, event): bs = statscan.BattingAccumulator() dialog = wxProgressDialog("Generating batting register", "Generating batting register", 100, self, wxPD_APP_MODAL | wxPD_AUTO_HIDE | wxPD_CAN_ABORT | wxPD_ELAPSED_TIME | wxPD_ESTIMATED_TIME | wxPD_REMAINING_TIME) if statscan.ProcessFile(self.book, [ bs ], dialog): dialog.Show(false) | a472aff44170d13576d93aef10c05dfe716b786d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10056/a472aff44170d13576d93aef10c05dfe716b786d/chadwick.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1939,
4820,
12,
2890,
16,
883,
16,
2077,
16,
4078,
4672,
6176,
273,
7075,
5491,
6353,
12,
2150,
16,
883,
16,
2130,
16,
365,
16,
7075,
21527,
67,
7215,
67,
6720,
1013,
571,
7075,
21527,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1939,
4820,
12,
2890,
16,
883,
16,
2077,
16,
4078,
4672,
6176,
273,
7075,
5491,
6353,
12,
2150,
16,
883,
16,
2130,
16,
365,
16,
7075,
21527,
67,
7215,
67,
6720,
1013,
571,
7075,
21527,... |
b.append(deepcopy(entry)) return b | bundle.append(deepcopy(entry)) return bundle | def BuildBundle(self, metadata, system): bundlename = self.name.split('/')[-1] b = Element('Bundle', name=bundlename) for entry in self.all + self.systems.get(system, []): b.append(deepcopy(entry)) for attribute in metadata.attributes: for entry in self.attributes.get(attribute, []): b.append(deepcopy(entry)) return b | a88287c17ca88c3972086dd50d769903f139f9f9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11867/a88287c17ca88c3972086dd50d769903f139f9f9/Bundler.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3998,
3405,
12,
2890,
16,
1982,
16,
2619,
4672,
324,
1074,
14724,
273,
365,
18,
529,
18,
4939,
2668,
2473,
13,
18919,
21,
65,
324,
273,
3010,
2668,
3405,
2187,
508,
33,
70,
1074,
14724... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3998,
3405,
12,
2890,
16,
1982,
16,
2619,
4672,
324,
1074,
14724,
273,
365,
18,
529,
18,
4939,
2668,
2473,
13,
18919,
21,
65,
324,
273,
3010,
2668,
3405,
2187,
508,
33,
70,
1074,
14724... |
EVT_IDLE(self, self.OnIdle) | def __init__(self, parent, ID, label, pos = wxDefaultPosition, size = wxDefaultSize, style = 0, validator = wxDefaultValidator, name = "genbutton"): if style == 0: style = wxNO_BORDER wxControl.__init__(self, parent, ID, pos, size, style, validator, name) | 93a6749712f6d7c37f5356f322e0fd4d4f4e3623 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/93a6749712f6d7c37f5356f322e0fd4d4f4e3623/buttons.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
982,
16,
1599,
16,
1433,
16,
949,
273,
7075,
1868,
2555,
16,
963,
273,
7075,
1868,
1225,
16,
2154,
273,
374,
16,
4213,
273,
7075,
1868,
5126,
16,
508,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
982,
16,
1599,
16,
1433,
16,
949,
273,
7075,
1868,
2555,
16,
963,
273,
7075,
1868,
1225,
16,
2154,
273,
374,
16,
4213,
273,
7075,
1868,
5126,
16,
508,
... | |
q.newTextChild(q.ns(),"version","0.1") | q.newTextChild(q.ns(),"version","0.2.2") | def get_version(self,iq): iq=iq.make_result_response() q=iq.new_query("jabber:iq:version") q.newTextChild(q.ns(),"name","Jajcus' Jabber-IRC Gateway") q.newTextChild(q.ns(),"version","0.1") self.stream.send(iq) return 1 | 9793e7ebb202dfda1f86a183c46f0b8978c2746b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12751/9793e7ebb202dfda1f86a183c46f0b8978c2746b/component.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
1589,
12,
2890,
16,
18638,
4672,
24288,
33,
18638,
18,
6540,
67,
2088,
67,
2740,
1435,
1043,
33,
18638,
18,
2704,
67,
2271,
2932,
78,
378,
744,
30,
18638,
30,
1589,
7923,
1043... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
1589,
12,
2890,
16,
18638,
4672,
24288,
33,
18638,
18,
6540,
67,
2088,
67,
2740,
1435,
1043,
33,
18638,
18,
2704,
67,
2271,
2932,
78,
378,
744,
30,
18638,
30,
1589,
7923,
1043... |
self._table_name = path.replace('.', '').replace('/', '_') | self._table_name = path.replace('.', '').replace('-', '').replace('/', '_') | def _init_table(self, **kwargs): """ CREATE TABLE table (kwargs[key1] = kwargs[value1], ..., kwargs[keyN] = kwargs[valueN]) """ path = self.absolute_url(1) self._table_name = path.replace('.', '').replace('/', '_') | d20548528433ac6e2d278f96a102813b77124a9a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3287/d20548528433ac6e2d278f96a102813b77124a9a/NyGadflyContainer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2738,
67,
2121,
12,
2890,
16,
2826,
4333,
4672,
3536,
13278,
7567,
1014,
261,
4333,
63,
856,
21,
65,
273,
1205,
63,
1132,
21,
6487,
1372,
16,
1205,
63,
856,
50,
65,
273,
1205,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2738,
67,
2121,
12,
2890,
16,
2826,
4333,
4672,
3536,
13278,
7567,
1014,
261,
4333,
63,
856,
21,
65,
273,
1205,
63,
1132,
21,
6487,
1372,
16,
1205,
63,
856,
50,
65,
273,
1205,
6... |
sage: E.padic_regulator(5, 10) 4*5 + 3*5^2 + 2*5^4 + 2*5^5 + 2*5^6 + O(5^8) | sage: E.padic_regulator(5, 10) 4*5 + 3*5^2 + 2*5^4 + 2*5^5 + 2*5^6 + 2*5^8 + 3*5^9 + O(5^10) | def padic_regulator(self, p, prec=20, height=None, check_hypotheses=True): r""" Computes the cyclotomic p-adic regulator of this curve. | 909a93efffc4ae499e63b5f405fee9057e60e824 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9417/909a93efffc4ae499e63b5f405fee9057e60e824/ell_rational_field.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4627,
335,
67,
1574,
11775,
12,
2890,
16,
293,
16,
13382,
33,
3462,
16,
2072,
33,
7036,
16,
866,
67,
76,
879,
10370,
281,
281,
33,
5510,
4672,
436,
8395,
14169,
281,
326,
6143,
830,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4627,
335,
67,
1574,
11775,
12,
2890,
16,
293,
16,
13382,
33,
3462,
16,
2072,
33,
7036,
16,
866,
67,
76,
879,
10370,
281,
281,
33,
5510,
4672,
436,
8395,
14169,
281,
326,
6143,
830,
... |
self.resize(QSize(627,513).expandedTo(self.minimumSizeHint())) | self.resize(QSize(595,481).expandedTo(self.minimumSizeHint())) | def __init__(self,parent = None,name = None,modal = 0,fl = 0): QDialog.__init__(self,parent,name,modal,fl) | 7cc18611a6df93ebc9707a8878e31fb8451f8ff6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/7cc18611a6df93ebc9707a8878e31fb8451f8ff6/UserPrefsDialog.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
2938,
273,
599,
16,
529,
273,
599,
16,
17638,
273,
374,
16,
2242,
273,
374,
4672,
2238,
6353,
16186,
2738,
972,
12,
2890,
16,
2938,
16,
529,
16,
17638,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
2938,
273,
599,
16,
529,
273,
599,
16,
17638,
273,
374,
16,
2242,
273,
374,
4672,
2238,
6353,
16186,
2738,
972,
12,
2890,
16,
2938,
16,
529,
16,
17638,
... |
import sys print >>sys.stderr, method sys.stderr.flush() | def _method_handler(self): cookies = Cookie.get_cookies(self.req, Cookie.MarshalCookie, secret = HMACsalt) if 'authToken' in cookies: self.authToken = cookies['authToken'].value | 52d1b165dbb2743f3592485ee4e06bae9da1af17 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8747/52d1b165dbb2743f3592485ee4e06bae9da1af17/webhandler.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2039,
67,
4176,
12,
2890,
4672,
7237,
273,
10201,
18,
588,
67,
16240,
12,
2890,
18,
3658,
16,
10201,
18,
8105,
6151,
16,
4001,
273,
20792,
5759,
13,
309,
296,
1944,
1345,
11,
316,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2039,
67,
4176,
12,
2890,
4672,
7237,
273,
10201,
18,
588,
67,
16240,
12,
2890,
18,
3658,
16,
10201,
18,
8105,
6151,
16,
4001,
273,
20792,
5759,
13,
309,
296,
1944,
1345,
11,
316,... | |
name = self.env.config.get('intertrac', ns + '.title', 'Trac project %s' % ns) sep = target.find(':') if sep != -1: url = '%s/%s/%s' % (url, target[:sep], target[sep + 1:]) else: url = '%s/search?q=%s' % (url, urllib.quote_plus(target)) | name = intertrac_config.get(ns+'.title', 'Trac project %s' % ns) compat = intertrac_config.getbool(ns+'.compat', 'true') if compat: sep = target.find(':') if sep != -1: url = '%s/%s/%s' % (url, target[:sep], target[sep + 1:]) else: url = '%s/search?q=%s' % (url, urllib.quote_plus(target)) else: url = '%s/intertrac/%s' % (url, urllib.quote(target)) | def _make_intertrac_link(self, ns, target, label): url = self.env.config.get('intertrac', ns + '.url') if url: name = self.env.config.get('intertrac', ns + '.title', 'Trac project %s' % ns) sep = target.find(':') if sep != -1: url = '%s/%s/%s' % (url, target[:sep], target[sep + 1:]) else: url = '%s/search?q=%s' % (url, urllib.quote_plus(target)) return self._make_ext_link(url, label, '%s in %s' % (target, name)) else: return None | dad76686ab9dac287a81696f4ef94e1491d63252 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2831/dad76686ab9dac287a81696f4ef94e1491d63252/formatter.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
6540,
67,
2761,
313,
1077,
67,
1232,
12,
2890,
16,
3153,
16,
1018,
16,
1433,
4672,
880,
273,
365,
18,
3074,
18,
1425,
18,
588,
2668,
2761,
313,
1077,
2187,
3153,
397,
2418,
718,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6540,
67,
2761,
313,
1077,
67,
1232,
12,
2890,
16,
3153,
16,
1018,
16,
1433,
4672,
880,
273,
365,
18,
3074,
18,
1425,
18,
588,
2668,
2761,
313,
1077,
2187,
3153,
397,
2418,
718,
... |
("Overriding __cmp__ ", DeprecationWarning), | def test_main(): with test_support._check_py3k_warnings( ("classic (int|long) division", DeprecationWarning), ("coerce.. not supported", DeprecationWarning), ("Overriding __cmp__ ", DeprecationWarning), (".+__(get|set|del)slice__ has been removed", DeprecationWarning)): # Run all local test cases, with PTypesLongInitTest first. test_support.run_unittest(PTypesLongInitTest, OperatorsTest, ClassPropertiesAndMethods, DictProxyTests) | 2bf667759e303b2db711bb1847618fe02c0fcef5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12029/2bf667759e303b2db711bb1847618fe02c0fcef5/test_descr.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
5254,
13332,
598,
1842,
67,
13261,
6315,
1893,
67,
2074,
23,
79,
67,
12103,
12,
7566,
1106,
335,
261,
474,
96,
5748,
13,
16536,
3113,
24041,
3631,
7566,
2894,
2765,
838,
486,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
5254,
13332,
598,
1842,
67,
13261,
6315,
1893,
67,
2074,
23,
79,
67,
12103,
12,
7566,
1106,
335,
261,
474,
96,
5748,
13,
16536,
3113,
24041,
3631,
7566,
2894,
2765,
838,
486,
... | |
self.style = attrs.get("style", None) | self.negate = 0 | def start_dbxref(self, tag, attrs): self.style = attrs.get("style", None) self.dbname = None self.ids = [] self.negate = 0 | 7795919201eb3f63ba6ae6a328d1c7499aba60a2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7167/7795919201eb3f63ba6ae6a328d1c7499aba60a2/StdHandler.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
787,
67,
1966,
22044,
12,
2890,
16,
1047,
16,
3422,
4672,
365,
18,
82,
4784,
273,
374,
365,
18,
20979,
273,
599,
365,
18,
2232,
273,
5378,
365,
18,
82,
4784,
273,
374,
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,
787,
67,
1966,
22044,
12,
2890,
16,
1047,
16,
3422,
4672,
365,
18,
82,
4784,
273,
374,
365,
18,
20979,
273,
599,
365,
18,
2232,
273,
5378,
365,
18,
82,
4784,
273,
374,
2,
-100,
-100,... |
'envvar': ('envvar', 'environment variable', None), | 'envvar': ('envvar', 'environment variable; %s', None), | def desc_directive(desctype, arguments, options, content, lineno, content_offset, block_text, state, state_machine): env = state.document.settings.env node = addnodes.desc() node['desctype'] = desctype noindex = ('noindex' in options) node['noindex'] = noindex # remove backslashes to support (dummy) escapes; helps Vim's highlighting signatures = map(lambda s: s.strip().replace('\\', ''), arguments[0].split('\n')) names = [] clsname = None for i, sig in enumerate(signatures): # add a signature node for each signature in the current unit # and add a reference target for it sig = sig.strip() signode = addnodes.desc_signature(sig, '') signode['first'] = False node.append(signode) try: if desctype in ('function', 'data', 'class', 'exception', 'method', 'attribute'): name, clsname = parse_py_signature(signode, sig, desctype, env) elif desctype in ('cfunction', 'cmember', 'cmacro', 'ctype', 'cvar'): name = parse_c_signature(signode, sig, desctype) elif desctype == 'opcode': name = parse_opcode_signature(signode, sig) elif desctype == 'cmdoption': optname = parse_option_desc(signode, sig) if not noindex: targetname = 'cmdoption-' + optname signode['ids'].append(targetname) state.document.note_explicit_target(signode) env.note_index_entry('pair', 'command line option; %s' % sig, targetname, targetname) env.note_reftarget('option', optname, targetname) continue elif desctype == 'describe': signode.clear() signode += addnodes.desc_name(sig, sig) continue else: # another registered generic x-ref directive rolename, indextemplate, parse_node = additional_xref_types[desctype] if parse_node: fullname = parse_node(env, sig, signode) else: signode.clear() signode += addnodes.desc_name(sig, sig) # normalize whitespace like xfileref_role does fullname = ws_re.sub('', sig) if not noindex: targetname = '%s-%s' % (rolename, fullname) signode['ids'].append(targetname) state.document.note_explicit_target(signode) if indextemplate: indexentry = indextemplate % (fullname,) indextype = 'single' colon = indexentry.find(':') if colon != -1: indextype = indexentry[:colon].strip() indexentry = indexentry[colon+1:].strip() env.note_index_entry(indextype, indexentry, targetname, targetname) env.note_reftarget(rolename, fullname, targetname) # don't use object indexing below continue except ValueError, err: # signature parsing failed signode.clear() signode += addnodes.desc_name(sig, sig) continue # we don't want an index entry here # only add target and index entry if this is the first description of the # function name in this desc block if not noindex and name not in names: fullname = (env.currmodule and env.currmodule + '.' or '') + name # note target if fullname not in state.document.ids: signode['names'].append(fullname) signode['ids'].append(fullname) signode['first'] = (not names) state.document.note_explicit_target(signode) env.note_descref(fullname, desctype, lineno) names.append(name) env.note_index_entry('single', desc_index_text(desctype, env.currmodule, name), fullname, fullname) subnode = addnodes.desc_content() # needed for automatic qualification of members clsname_set = False if desctype == 'class' and names: env.currclass = names[0] clsname_set = True elif desctype in ('method', 'attribute') and clsname and not env.currclass: env.currclass = clsname.strip('.') clsname_set = True # needed for association of version{added,changed} directives if names: env.currdesc = names[0] state.nested_parse(content, content_offset, subnode) if clsname_set: env.currclass = None env.currdesc = None node.append(subnode) return [node] | 74fa967f9f342bfc77a258dcbfdb253ee01f1be3 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7032/74fa967f9f342bfc77a258dcbfdb253ee01f1be3/directives.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3044,
67,
22347,
12,
5489,
12387,
16,
1775,
16,
702,
16,
913,
16,
7586,
16,
913,
67,
3348,
16,
1203,
67,
955,
16,
919,
16,
919,
67,
9149,
4672,
1550,
273,
919,
18,
5457,
18,
4272,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3044,
67,
22347,
12,
5489,
12387,
16,
1775,
16,
702,
16,
913,
16,
7586,
16,
913,
67,
3348,
16,
1203,
67,
955,
16,
919,
16,
919,
67,
9149,
4672,
1550,
273,
919,
18,
5457,
18,
4272,
... |
installitems = getManifestValueForKey(manifestpath, "managed_installs") if installitems: for item in installitems: if munkicommon.stopRequested(): return {} result = processInstall(item, cataloglist, installinfo) | installitems = getManifestValueForKey(manifestpath, "managed_installs") if installitems: for item in installitems: if munkicommon.stopRequested(): return {} result = processInstall(item, cataloglist, installinfo) else: munkicommon.display_error("WARNING: manifest %s has no 'catalogs'" % manifestpath) | def processManifestForInstalls(manifestpath, installinfo, parentcatalogs=[]): """ Processes manifests to build a list of items to install. Can be recursive if manifests inlcude other manifests. Probably doesn't handle circular manifest references well... """ cataloglist = getManifestValueForKey(manifestpath, 'catalogs') if cataloglist: getCatalogs(cataloglist) else: cataloglist = parentcatalogs nestedmanifests = getManifestValueForKey(manifestpath, "included_manifests") if nestedmanifests: for item in nestedmanifests: nestedmanifestpath = getmanifest(item) if munkicommon.stopRequested(): return {} if nestedmanifestpath: listofinstalls = processManifestForInstalls(nestedmanifestpath, installinfo, cataloglist) installitems = getManifestValueForKey(manifestpath, "managed_installs") if installitems: for item in installitems: if munkicommon.stopRequested(): return {} result = processInstall(item, cataloglist, installinfo) return installinfo | 2141e264ee4667f374009c70ab3e0db6e6e6e3b1 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6241/2141e264ee4667f374009c70ab3e0db6e6e6e3b1/updatecheck.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
9121,
1290,
6410,
87,
12,
14357,
803,
16,
3799,
1376,
16,
982,
2574,
287,
14072,
33,
8526,
4672,
3536,
4389,
281,
29700,
358,
1361,
279,
666,
434,
1516,
358,
3799,
18,
4480,
506,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
9121,
1290,
6410,
87,
12,
14357,
803,
16,
3799,
1376,
16,
982,
2574,
287,
14072,
33,
8526,
4672,
3536,
4389,
281,
29700,
358,
1361,
279,
666,
434,
1516,
358,
3799,
18,
4480,
506,
... |
sage: print x | sage: x | def isotopism(p): """ Returns a Permutation object that represents an isotopism (for rows, columns or symbols of a partial latin square). Since matrices in Sage are indexed from 0, this function translates +1 to agree with the Permutation class. We also handle PermutationGroupElements: EXAMPLES: sage: from sage.combinat.matrices.latin import * sage: isotopism(5) # identity on 5 points [1, 2, 3, 4, 5] sage: G = PermutationGroup(['(1,2,3)(4,5)']) sage: g = G.gen(0) sage: isotopism(g) [2, 3, 1, 5, 4] sage: isotopism([0,3,2,1]) # 0 goes to 0, 1 goes to 3, etc. [1, 4, 3, 2] sage: isotopism( (0,1,2) ) # single cycle, presented as a tuple [2, 3, 1] sage: x = isotopism( ((0,1,2), (3,4)) ) # tuple of cycles sage: print x [2, 3, 1, 5, 4] sage: x.to_cycles() [(1, 2, 3), (4, 5)] """ # Identity isotopism on p points: if type(p) == Integer: return Permutation(range(1, p+1)) if type(p) == PermutationGroupElement: # fixme Ask the Sage mailing list about the tuple/list issue! return Permutation(list(p.tuple())) if type(p) == list: # We expect a list like [0,3,2,1] which means # that 0 goes to 0, 1 goes to 3, etc. return Permutation(map(lambda x: x+1, p)) if type(p) == tuple: # We have a single cycle: if type(p[0]) == Integer: return Permutation(tuple(map(lambda x: x+1, p))) # We have a tuple of cycles: if type(p[0]) == tuple: x = isotopism(p[0]) for i in range(1, len(p)): x = x * isotopism(p[i]) return x # Not sure what we got! raise NotImplemented | 79588eb9f6225f31a0fe90ef3cb590193d4561c1 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/79588eb9f6225f31a0fe90ef3cb590193d4561c1/latin.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
29677,
556,
6228,
12,
84,
4672,
3536,
2860,
279,
13813,
9245,
733,
716,
8686,
392,
29677,
556,
6228,
261,
1884,
2595,
16,
2168,
578,
7963,
434,
279,
4702,
30486,
8576,
2934,
7897,
16415,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
29677,
556,
6228,
12,
84,
4672,
3536,
2860,
279,
13813,
9245,
733,
716,
8686,
392,
29677,
556,
6228,
261,
1884,
2595,
16,
2168,
578,
7963,
434,
279,
4702,
30486,
8576,
2934,
7897,
16415,
... |
if item.point == point: | if item.mountpoint == point: | def mask(self, point): removed = {} for item in self.itervalues(): if item.point == point: removed[item.key] = item if removed: self.remove(removed) self._masked.setdefault(point, {}).update(removed) | 10e541ec3972dade9a1c5f2671de8acea6a52fec /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4764/10e541ec3972dade9a1c5f2671de8acea6a52fec/songs.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3066,
12,
2890,
16,
1634,
4672,
3723,
273,
2618,
364,
761,
316,
365,
18,
2165,
2372,
13332,
309,
761,
18,
4778,
1153,
422,
1634,
30,
3723,
63,
1726,
18,
856,
65,
273,
761,
309,
3723,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3066,
12,
2890,
16,
1634,
4672,
3723,
273,
2618,
364,
761,
316,
365,
18,
2165,
2372,
13332,
309,
761,
18,
4778,
1153,
422,
1634,
30,
3723,
63,
1726,
18,
856,
65,
273,
761,
309,
3723,
... |
u = u''.join(map(unichr, xrange(1024))) for encoding in ('utf-7', 'utf-8', 'utf-16', 'utf-16-le', 'utf-16-be', 'raw_unicode_escape', 'unicode_escape', 'unicode_internal'): self.assertEqual(unicode(u.encode(encoding),encoding), u) | for c in xrange(1024): u = unichr(c) for encoding in ('utf-7', 'utf-8', 'utf-16', 'utf-16-le', 'utf-16-be', 'raw_unicode_escape', 'unicode_escape', 'unicode_internal'): self.assertEqual(unicode(u.encode(encoding),encoding), u) | def test_codecs(self): # Encoding self.assertEqual(u'hello'.encode('ascii'), 'hello') self.assertEqual(u'hello'.encode('utf-7'), 'hello') self.assertEqual(u'hello'.encode('utf-8'), 'hello') self.assertEqual(u'hello'.encode('utf8'), 'hello') self.assertEqual(u'hello'.encode('utf-16-le'), 'h\000e\000l\000l\000o\000') self.assertEqual(u'hello'.encode('utf-16-be'), '\000h\000e\000l\000l\000o') self.assertEqual(u'hello'.encode('latin-1'), 'hello') | 835b243c71f5529da95aca5ca78fb9939278cffe /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/835b243c71f5529da95aca5ca78fb9939278cffe/test_unicode.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
710,
2143,
12,
2890,
4672,
468,
13400,
365,
18,
11231,
5812,
12,
89,
11,
23711,
10332,
3015,
2668,
9184,
19899,
296,
23711,
6134,
365,
18,
11231,
5812,
12,
89,
11,
23711,
10332... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
710,
2143,
12,
2890,
4672,
468,
13400,
365,
18,
11231,
5812,
12,
89,
11,
23711,
10332,
3015,
2668,
9184,
19899,
296,
23711,
6134,
365,
18,
11231,
5812,
12,
89,
11,
23711,
10332... |
rss, vmz = _psutil_osx.get_memory_info(pid) | rss, vms = _psutil_osx.get_memory_info(pid) | def get_memory_info(self, pid): """Return a tuple with the process' RSS and VMS size.""" rss, vmz = _psutil_osx.get_memory_info(pid) meminfo = namedtuple('meminfo', 'rss vms') return meminfo(rss, vms) | 0878eb26471b39c5c91e2d57b85c43bf1d52b193 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7296/0878eb26471b39c5c91e2d57b85c43bf1d52b193/_psosx.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
7858,
67,
1376,
12,
2890,
16,
4231,
4672,
3536,
990,
279,
3193,
598,
326,
1207,
11,
31481,
471,
776,
3537,
963,
12123,
18817,
16,
23731,
273,
389,
1121,
1367,
67,
538,
92,
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,
336,
67,
7858,
67,
1376,
12,
2890,
16,
4231,
4672,
3536,
990,
279,
3193,
598,
326,
1207,
11,
31481,
471,
776,
3537,
963,
12123,
18817,
16,
23731,
273,
389,
1121,
1367,
67,
538,
92,
18,... |
pat = re.compile(base_pat.replace('name', 'title'), re.DOTALL) | pat = re.compile(base_pat.replace('name', 'title'), re.DOTALL) | def add_metadata_item(src, name, val): index = src.rindex('}') return src[:index] + r'{\ '[:-1] + name + ' ' + val + '}}' | 48b99181d19bd3f7566610ff184885312a3f7ebf /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9125/48b99181d19bd3f7566610ff184885312a3f7ebf/rtf.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
67,
4165,
67,
1726,
12,
4816,
16,
508,
16,
1244,
4672,
770,
273,
1705,
18,
86,
1615,
2668,
1713,
13,
327,
1705,
10531,
1615,
65,
397,
436,
19163,
64,
5271,
30,
17,
21,
65,
397,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
67,
4165,
67,
1726,
12,
4816,
16,
508,
16,
1244,
4672,
770,
273,
1705,
18,
86,
1615,
2668,
1713,
13,
327,
1705,
10531,
1615,
65,
397,
436,
19163,
64,
5271,
30,
17,
21,
65,
397,
... |
", ".join(c.hSKI() for c in cert_map.values()) | ", ".join(c.cert.hSKI() for c in cert_map.values()) | def check_for_updates(self, gctx, parent, rc): """Parent has signaled continued existance of a resource class we already knew about, so we need to check for an updated certificate, changes in resource coverage, etc. | 22a68a4f2cc5ce6528b322b020c65ad539077af2 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/119/22a68a4f2cc5ce6528b322b020c65ad539077af2/sql.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
67,
1884,
67,
14703,
12,
2890,
16,
314,
5900,
16,
982,
16,
4519,
4672,
3536,
3054,
711,
4277,
329,
17545,
5957,
1005,
1359,
434,
279,
1058,
667,
732,
1818,
417,
2704,
2973,
16,
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,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
67,
1884,
67,
14703,
12,
2890,
16,
314,
5900,
16,
982,
16,
4519,
4672,
3536,
3054,
711,
4277,
329,
17545,
5957,
1005,
1359,
434,
279,
1058,
667,
732,
1818,
417,
2704,
2973,
16,
14... |
def __init__(self, name, type): SizeArgument.__init__(self, name, "GLsizei") | def __init__(self, name, type, gl_type): SizeArgument.__init__(self, name, gl_type) | def __init__(self, name, type): SizeArgument.__init__(self, name, "GLsizei") | 0a93dd5abe4872c4e82284847005b9da2174055d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/0a93dd5abe4872c4e82284847005b9da2174055d/build_gles2_cmd_buffer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
508,
16,
618,
4672,
6321,
1379,
16186,
2738,
972,
12,
2890,
16,
508,
16,
315,
11261,
1467,
77,
7923,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
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,
508,
16,
618,
4672,
6321,
1379,
16186,
2738,
972,
12,
2890,
16,
508,
16,
315,
11261,
1467,
77,
7923,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
thisType = type(seval(row[col])) except OverflowError: thisType = type(seval(row[col] + 'L')) thisType = type(0) except: | thisType(row[col]) break except ValueError, OverflowError: pass else: | def seval(item): """ Strips parens from item prior to calling eval in an attempt to make it safer """ return eval(item.replace('(', '').replace(')', '')) | 6083e9fc91e30426ec5fcbabb206495280cb6395 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/6083e9fc91e30426ec5fcbabb206495280cb6395/csv.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
695,
1125,
12,
1726,
4672,
3536,
3978,
7146,
30821,
628,
761,
6432,
358,
4440,
5302,
316,
392,
4395,
358,
1221,
518,
7864,
586,
3536,
327,
5302,
12,
1726,
18,
2079,
2668,
12,
2187,
875,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
695,
1125,
12,
1726,
4672,
3536,
3978,
7146,
30821,
628,
761,
6432,
358,
4440,
5302,
316,
392,
4395,
358,
1221,
518,
7864,
586,
3536,
327,
5302,
12,
1726,
18,
2079,
2668,
12,
2187,
875,
... |
return Dec_n1 | return _Dec_n1 | def compare_total(self, other): """Compares self to other using the abstract representations. | ebab68ad25421add045049bc0a87fbe7000ec3f7 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12029/ebab68ad25421add045049bc0a87fbe7000ec3f7/decimal.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3400,
67,
4963,
12,
2890,
16,
1308,
4672,
3536,
19199,
365,
358,
1308,
1450,
326,
8770,
27851,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3400,
67,
4963,
12,
2890,
16,
1308,
4672,
3536,
19199,
365,
358,
1308,
1450,
326,
8770,
27851,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
if response.opcode != OMAPI_OP_NOTIFY: | if response.opcode != OMAPI_OP_STATUS: | def del_host(self, mac): """ @type mac: str @raises ValueError: @raises OmapiError: @raises socket.error: """ # FIXME: test whether this code works msg = OmapiMessage.open("host") msg.obj.append(("hardware-address", pack_mac(mac))) msg.obj.append(("hardware-type", struct.pack("!I", 1))) response = self.query_server(msg) if response.opcode != OMAPI_OP_UPDATE: raise OmapiErrorNotFound() if response.handle == 0: raise OmapiError("received invalid handle from server") response = self.query_server(OmapiMessage.delete(response.handle)) if response.opcode != OMAPI_OP_NOTIFY: raise OmapiError("delete failed") | 8659acd1105a69776a1ed297d2f39d9d3b777c03 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8827/8659acd1105a69776a1ed297d2f39d9d3b777c03/pypureomapi.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1464,
67,
2564,
12,
2890,
16,
5318,
4672,
3536,
632,
723,
5318,
30,
609,
632,
354,
6141,
2068,
30,
632,
354,
6141,
531,
1458,
77,
668,
30,
632,
354,
6141,
2987,
18,
1636,
30,
3536,
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,
1464,
67,
2564,
12,
2890,
16,
5318,
4672,
3536,
632,
723,
5318,
30,
609,
632,
354,
6141,
2068,
30,
632,
354,
6141,
531,
1458,
77,
668,
30,
632,
354,
6141,
2987,
18,
1636,
30,
3536,
4... |
self._heraldHandler.say_herald_unknown(nick) else: | if not self._defDB.has_key(nick): self._heraldHandler.say_herald_unknown(nick) if self._defDB.has_key(nick): | def handle(self,m): """ Returns True if no other handlers should handle the message """ MessageHandler.handle(self,m) if (m.command == '353'): # 353 is the response that is giving us a # a list of who is on the channel list = m.params[-1].split() for nick in list: self._cur_nicks[nick.lower()]=nick self._heraldHandler.set_last_herald(nick) self.add_nick(nick) return True elif (m.command == 'NICK'): nick=m.params[-1] self._cur_nicks[nick]=nick old_nick=m.sender_nick() if self._cur_nicks.has_key(old_nick.lower()): del self._cur_nicks[old_nick.lower()] self.add_alias(old_nick,nick) if not self._defDB.has_def(old_nick) \ and not self._cur_nicks.has_key(nick.lower()): self._heraldHandler.say_herald(nick) return True elif (m.command == 'JOIN'): self._root.set_cur_channel(m.params[0]) nick=m.sender_nick() if self._cur_nicks.has_key(nick.lower()): return True self._cur_nicks[nick.lower()]=nick if not self._aliasDB.has_key(nick): self.add_nick(nick.lower()) self._heraldHandler.say_herald_unknown(nick) else: self._heraldHandler.say_herald(nick) return True elif (m.command == 'QUIT') or (m.command == 'PART'): old_nick = m.sender_nick() self._heraldHandler.set_last_herald(old_nick) if self._cur_nicks.has_key(old_nick.lower()): del self._cur_nicks[old_nick.lower()] return True else: if "forgetnick" == m.cmd: if m.private and \ ((self._root.check_identification and \ not m.identified) or \ not self._root.check_identification): self._root.say_no_private(m) else: self.cmd_forgetnick(m) return True elif "aka" == m.cmd: self.cmd_aka(m) return True elif "savenicks" == m.cmd: self.cmd_savenicks(m) return True else: return False | 3941d54cfcd883b3cf0b33d964a7f9624a6ae273 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9641/3941d54cfcd883b3cf0b33d964a7f9624a6ae273/JibotInterface.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
12,
2890,
16,
81,
4672,
3536,
2860,
1053,
309,
1158,
1308,
4919,
1410,
1640,
326,
883,
3536,
2350,
1503,
18,
4110,
12,
2890,
16,
81,
13,
309,
261,
81,
18,
3076,
422,
296,
4763,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
12,
2890,
16,
81,
4672,
3536,
2860,
1053,
309,
1158,
1308,
4919,
1410,
1640,
326,
883,
3536,
2350,
1503,
18,
4110,
12,
2890,
16,
81,
13,
309,
261,
81,
18,
3076,
422,
296,
4763,
... |
root = SubElement(doc, | sub = SubElement(doc, | def getXSEED(self, version=DEFAULT_XSEED_VERSION, split_stations=False): """ Returns a XML representation of all headers of a SEED volume. | 92ca6c6a5f622775d2315fbc075a01a83fec844b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10470/92ca6c6a5f622775d2315fbc075a01a83fec844b/parser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6538,
1090,
2056,
12,
2890,
16,
1177,
33,
5280,
67,
60,
1090,
2056,
67,
5757,
16,
1416,
67,
31478,
33,
8381,
4672,
3536,
2860,
279,
3167,
4335,
434,
777,
1607,
434,
279,
3174,
2056,
39... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6538,
1090,
2056,
12,
2890,
16,
1177,
33,
5280,
67,
60,
1090,
2056,
67,
5757,
16,
1416,
67,
31478,
33,
8381,
4672,
3536,
2860,
279,
3167,
4335,
434,
777,
1607,
434,
279,
3174,
2056,
39... |
elif (sg_number < 15): | elif (sg_number < 16): | def any_compatible_unit_cell(self, volume): sg_number = self.type().number() if (sg_number < 3): params = (1., 1.3, 1.7, 83, 109, 129) elif (sg_number < 15): params = (1., 1.3, 1.7, 90, 109, 90) elif (sg_number < 75): params = (1., 1.3, 1.7, 90, 90, 90) elif (sg_number < 143): params = (1., 1., 1.7, 90, 90, 90) elif (sg_number < 195): params = (1., 1., 1.7, 90, 90, 120) else: params = (1., 1., 1., 90, 90, 90) unit_cell = self.type().cb_op().inverse().apply(uctbx.unit_cell(params)) f = (volume / unit_cell.volume())**(1/3.) params = list(unit_cell.parameters()) for i in xrange(3): params[i] *= f return uctbx.unit_cell(params) | 8a1ecc067c8b0147cf54c8995046eafffc386962 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/696/8a1ecc067c8b0147cf54c8995046eafffc386962/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1281,
67,
10943,
67,
4873,
67,
3855,
12,
2890,
16,
3940,
4672,
11150,
67,
2696,
273,
365,
18,
723,
7675,
2696,
1435,
309,
282,
261,
1055,
67,
2696,
411,
282,
890,
4672,
859,
273,
261,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1281,
67,
10943,
67,
4873,
67,
3855,
12,
2890,
16,
3940,
4672,
11150,
67,
2696,
273,
365,
18,
723,
7675,
2696,
1435,
309,
282,
261,
1055,
67,
2696,
411,
282,
890,
4672,
859,
273,
261,
... |
command=None, state='enabled', width=5, args=(), **kw): | command=None, state=NORMAL, width=5, args=(), **kw): | def __init__(self, master=None, min=0, max=100, step=1, textvariable=None, var=0, vartype=0, command=None, state='enabled', width=5, args=(), **kw): '''vartype=0 - integer vartype=1 - float ''' self.min_value=min self.max_value=max self.step=step self.variable=var self.vartype=vartype if textvariable: self.text_var=textvariable else: self.text_var=StringVar() self.command=command self.state=state self.width=width apply(TFrame.__init__, (self, master), kw) self["style"]="FlatFrame" self.entry=TEntryExt(self, textvariable=self.text_var, width=self.width, style='SpinEntry') self.entry.pack(side = LEFT, expand = 1, fill = BOTH) self.button_frame=TFrame(self,style="FlatFrame") self.button_frame.pack(side = LEFT,fill = Y) self.up_button=TButton(self.button_frame, class_='Repeater', command=self.increase, image='pal_arrow_up', style='SpinUpButton') self.up_button.pack(side = TOP) self.down_button=TButton(self.button_frame, class_='Repeater', command=self.decrease, image='pal_arrow_down', style='SpinDownButton') self.down_button.pack(side = TOP) if self.vartype==1: self.variable=float(self.variable) else: self.variable=int(self.variable) self.text_var.set(str(self.variable)) self.entry.bind('<Button-4>', self.wheel_increase) self.entry.bind('<Button-5>', self.wheel_decrease) self.entry.bind('<Key-Return>', self.command) self.entry.bind('<Key-KP_Enter>', self.command) #self.entry.bind ( '<KeyPress>', self.check_input) | 6e3b5717549fe6d33a683042f42e617f4b76035f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3123/6e3b5717549fe6d33a683042f42e617f4b76035f/ttk_ext.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
4171,
33,
7036,
16,
1131,
33,
20,
16,
943,
33,
6625,
16,
2235,
33,
21,
16,
977,
6105,
33,
7036,
16,
569,
33,
20,
16,
31970,
33,
20,
16,
1296,
33,
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,
2738,
972,
12,
2890,
16,
4171,
33,
7036,
16,
1131,
33,
20,
16,
943,
33,
6625,
16,
2235,
33,
21,
16,
977,
6105,
33,
7036,
16,
569,
33,
20,
16,
31970,
33,
20,
16,
1296,
33,
7... |
if name[0] not in 'oict': | if not(name and name[0] in 'oict'): | def __getattr__(self, name): """ Called when an attribute lookup has not found the attribute in the usual places. @param name: the attribute name @return: should return the attribute value or raise an I{AttributeError} exception. """ # this is for performance reasons # it should be updated if/when adding new computed attributes if name[0] not in 'oict': raise AttributeError, name | 485d860d00359e54951dfa03a519f0dc4377794e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3287/485d860d00359e54951dfa03a519f0dc4377794e/NyAttributes.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
588,
1747,
972,
12,
2890,
16,
508,
4672,
3536,
11782,
1347,
392,
1566,
3689,
711,
486,
1392,
326,
1566,
316,
326,
25669,
12576,
18,
632,
891,
508,
30,
326,
1566,
508,
632,
2463,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
588,
1747,
972,
12,
2890,
16,
508,
4672,
3536,
11782,
1347,
392,
1566,
3689,
711,
486,
1392,
326,
1566,
316,
326,
25669,
12576,
18,
632,
891,
508,
30,
326,
1566,
508,
632,
2463,
... |
config.add_library('arpack', sources=arpack_sources) | config.add_library('arpack', sources=arpack_sources, include_dirs=[os.path.join(['ARPACK', 'SRC'])]) | def configuration(parent_package='',top_path=None): from numpy.distutils.system_info import get_info, NotFoundError from numpy.distutils.misc_util import Configuration lapack_opt = get_info('lapack_opt') if not lapack_opt: raise NotFoundError,'no lapack/blas resources found' config = Configuration('arpack', parent_package, top_path) arpack_sources=[os.path.join('ARPACK','SRC', '*.f')] arpack_sources.extend([os.path.join('ARPACK','UTIL', '*.f')]) | 8aff074eedae865f9488fa2a1bbbda60a2c79adf /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12971/8aff074eedae865f9488fa2a1bbbda60a2c79adf/setup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1664,
12,
2938,
67,
5610,
2218,
2187,
3669,
67,
803,
33,
7036,
4672,
628,
3972,
18,
4413,
5471,
18,
4299,
67,
1376,
1930,
336,
67,
1376,
16,
25576,
628,
3972,
18,
4413,
5471,
18,
23667... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1664,
12,
2938,
67,
5610,
2218,
2187,
3669,
67,
803,
33,
7036,
4672,
628,
3972,
18,
4413,
5471,
18,
4299,
67,
1376,
1930,
336,
67,
1376,
16,
25576,
628,
3972,
18,
4413,
5471,
18,
23667... |
for filename in glob.iglob(wildcard): | for filename in iglob(wildcard): | def addGlob(self, wildcard, src = None, dest = None): import glob if src is None: src = self.dist_dir if dest is None: dest = "device/" length = len(src) wildcard = os.path.join (src, wildcard) for filename in glob.iglob(wildcard): if filename[:length] == (src): filename = filename[length:] while len(filename) > 0 and (filename[0] == '/' or filename[0] == '\\'): filename = filename[1:] print "Compressing %s" % (filename,) self.zipfile.write (os.path.join (src, filename), os.path.join (dest, filename)) | f2904c97009ccd9a20d2e2473a089c5f9e0e0d75 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12354/f2904c97009ccd9a20d2e2473a089c5f9e0e0d75/setup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
13499,
12,
2890,
16,
8531,
16,
1705,
273,
599,
16,
1570,
273,
599,
4672,
1930,
4715,
309,
1705,
353,
599,
30,
1705,
273,
365,
18,
4413,
67,
1214,
309,
1570,
353,
599,
30,
1570,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
13499,
12,
2890,
16,
8531,
16,
1705,
273,
599,
16,
1570,
273,
599,
4672,
1930,
4715,
309,
1705,
353,
599,
30,
1705,
273,
365,
18,
4413,
67,
1214,
309,
1570,
353,
599,
30,
1570,
... |
date_and_hours_by_cal = [(op.production_id.date_planned, op.hour, op.workcenter_id.calendar_id.id) for op in ops] | date_and_hours_by_cal = [(op.date_planned, op.hour, op.workcenter_id.calendar_id.id) for op in ops if op.date_planned] | def _get_date_end(self, cr, uid, ids, field_name, arg, context): """ Finds ending date. @return: Dictionary of values. """ ops = self.browse(cr, uid, ids, context=context) date_and_hours_by_cal = [(op.production_id.date_planned, op.hour, op.workcenter_id.calendar_id.id) for op in ops] intervals = self.pool.get('resource.calendar').interval_get_multi(cr, uid, date_and_hours_by_cal) | 319389a88a3da7fb2e9c09b4d11b2140f33d17e4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/319389a88a3da7fb2e9c09b4d11b2140f33d17e4/mrp_operations.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
67,
712,
67,
409,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
652,
67,
529,
16,
1501,
16,
819,
4672,
3536,
4163,
87,
11463,
1509,
18,
632,
2463,
30,
16447,
434,
924,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
67,
712,
67,
409,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
652,
67,
529,
16,
1501,
16,
819,
4672,
3536,
4163,
87,
11463,
1509,
18,
632,
2463,
30,
16447,
434,
924,
18,
... |
cmd += ' && cp %s.c %s'%(name, target_c) | cmd += " && cp '%s.c' '%s'"%(name, target_c) | def cython(filename, verbose=False, compile_message=False, use_cache=False, create_local_c_file=False): if not filename.endswith('pyx'): print "File (=%s) should have extension .pyx"%filename clean_filename = sanitize(filename) base = os.path.split(os.path.splitext(clean_filename)[0])[1] abs_base = os.path.abspath(os.path.split(os.path.splitext(clean_filename)[0])[0]) build_dir = '%s/%s'%(SPYX_TMP, base) if os.path.exists(build_dir): # There is already a module here. Maybe we do not have to rebuild? # Find the name. if use_cache: prev_so = [F for F in os.listdir(build_dir) if F[-3:] == '.so'] if len(prev_so) > 0: prev_so = prev_so[0] # should have length 1 because of deletes below if os.path.getmtime(filename) <= os.path.getmtime('%s/%s'%(build_dir, prev_so)): # We do not have to rebuild. return prev_so[:-3], build_dir else: os.makedirs(build_dir) for F in os.listdir(build_dir): G = '%s/%s'%(build_dir,F) if not os.path.isdir(G): os.unlink(G) cmd = 'cd "%s"; ln -sf "%s"/* .'%(build_dir, abs_base) os.system(cmd) if compile_message: print "Compiling %s..."%filename F = open(filename).read() F, libs, includes, language, additional_source_files = pyx_preparse(F) # add the working directory to the includes so custom headers etc. work includes.append(os.path.split(os.path.splitext(filename)[0])[0]) if language == 'c++': extension = "cpp" else: extension = "c" global sequence_number if not sequence_number.has_key(base): sequence_number[base] = 0 name = '%s_%s'%(base, sequence_number[base]) # increment the sequence number so will use a different one next time. sequence_number[base] += 1 additional_source_files = ",".join(["'"+os.path.abspath(os.curdir)+"/"+fname+"'" \ for fname in additional_source_files]) pyx = '%s/%s.pyx'%(build_dir, name) open(pyx,'w').write(F) setup=""" | 6147715faf8529fcaa93cad6349f6ec10ae3ee74 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/6147715faf8529fcaa93cad6349f6ec10ae3ee74/cython.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6143,
3041,
12,
3459,
16,
3988,
33,
8381,
16,
4074,
67,
2150,
33,
8381,
16,
999,
67,
2493,
33,
8381,
16,
752,
67,
3729,
67,
71,
67,
768,
33,
8381,
4672,
309,
486,
1544,
18,
5839,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6143,
3041,
12,
3459,
16,
3988,
33,
8381,
16,
4074,
67,
2150,
33,
8381,
16,
999,
67,
2493,
33,
8381,
16,
752,
67,
3729,
67,
71,
67,
768,
33,
8381,
4672,
309,
486,
1544,
18,
5839,
1... |
hams += h | hams += g | def main(): """Main program; parse options and go.""" try: opts, args = getopt.getopt(sys.argv[1:], 'hdfg:s:p:u:r') except getopt.error, msg: usage(2, msg) if not opts: usage(2, "No options given") pck = DEFAULTDB good = [] spam = [] unknown = [] reverse = 0 do_filter = usedb = False for opt, arg in opts: if opt == '-h': usage(0) elif opt == '-g': good.append(arg) elif opt == '-s': spam.append(arg) elif opt == '-p': pck = arg elif opt == "-d": usedb = True elif opt == "-f": do_filter = True elif opt == '-u': unknown.append(arg) elif opt == '-r': reverse = 1 if args: usage(2, "Positional arguments not allowed") save = False bayes = createbayes(pck, usedb) h = Hammie(bayes) for g in good: print "Training ham (%s):" % g train(h, g, False) save = True for s in spam: print "Training spam (%s):" % s train(h, s, True) save = True if save: h.update_probabilities() if not usedb and pck: fp = open(pck, 'wb') pickle.dump(bayes, fp, 1) fp.close() if do_filter: msg = sys.stdin.read() filtered = h.filter(msg) sys.stdout.write(filtered) if unknown: (spams, hams) = (0, 0) for u in unknown: if len(unknown) > 1: print "Scoring", u s, h = score(h, u, reverse) spams += s hams += h print "Total %d spam, %d ham" % (spams, hams) | fb40d5e11ffa173b28545258d3b69341e04048ee /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9857/fb40d5e11ffa173b28545258d3b69341e04048ee/hammie.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
3536,
6376,
5402,
31,
1109,
702,
471,
1960,
12123,
775,
30,
1500,
16,
833,
273,
336,
3838,
18,
588,
3838,
12,
9499,
18,
19485,
63,
21,
30,
6487,
296,
22057,
2137,
30,
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,
2774,
13332,
3536,
6376,
5402,
31,
1109,
702,
471,
1960,
12123,
775,
30,
1500,
16,
833,
273,
336,
3838,
18,
588,
3838,
12,
9499,
18,
19485,
63,
21,
30,
6487,
296,
22057,
2137,
30,
87,
... |
rfc2822Message = None | def format(ea): if obf: return u"%s@example.com" % ea.itsUUID | 433bb42d7c684cf90fc45c06b53c33a56c1359ff /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9228/433bb42d7c684cf90fc45c06b53c33a56c1359ff/translator.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
740,
12,
24852,
4672,
309,
3768,
74,
30,
327,
582,
28385,
87,
36,
8236,
18,
832,
6,
738,
24164,
18,
1282,
5562,
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,
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,
740,
12,
24852,
4672,
309,
3768,
74,
30,
327,
582,
28385,
87,
36,
8236,
18,
832,
6,
738,
24164,
18,
1282,
5562,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... | |
archivemail.options.quiet = 1 | def testMixed(self): """archiving a mixed mailbox""" for execute in ("package", "system"): self.new_mbox = make_mbox(messages=3, hours_old=(24 * 179)) self.old_mbox = make_mbox(messages=3, hours_old=(24 * 181)) self.mbox_name = tempfile.mktemp() shutil.copyfile(self.new_mbox, self.mbox_name) append_file(self.old_mbox, self.mbox_name) if execute == "package": archivemail.options.quiet = 1 archivemail.archive(self.mbox_name) elif execute == "system": run = "./archivemail.py --quiet %s" % self.mbox_name self.assertEqual(os.system(run), 0) else: sys.exit(1) assert(os.path.exists(self.mbox_name)) assert(filecmp.cmp(self.new_mbox, self.mbox_name, shallow=0)) archive_name = self.mbox_name + "_archive.gz" assert(os.path.exists(archive_name)) self.assertEqual(os.system("gzip -d %s" % archive_name), 0) archive_name = self.mbox_name + "_archive" assert(os.path.exists(archive_name)) assert(filecmp.cmp(archive_name, self.old_mbox, shallow=0)) self.tearDown() | 7ae1b7bb3f82dbf160411305096fe282e18c5fce /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1746/7ae1b7bb3f82dbf160411305096fe282e18c5fce/test_archivemail.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
19846,
12,
2890,
4672,
3536,
991,
9288,
279,
7826,
14187,
8395,
364,
1836,
316,
7566,
5610,
3113,
315,
4299,
6,
4672,
365,
18,
2704,
67,
81,
2147,
273,
1221,
67,
81,
2147,
12,
68... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
19846,
12,
2890,
4672,
3536,
991,
9288,
279,
7826,
14187,
8395,
364,
1836,
316,
7566,
5610,
3113,
315,
4299,
6,
4672,
365,
18,
2704,
67,
81,
2147,
273,
1221,
67,
81,
2147,
12,
68... | |
@raise CannotListenError: as defined in twisted.internet.error, if it | @raise CannotListenError: as defined here L{twisted.internet.error.CannotListenError}, if it | def listenTCP(self, port, factory, backlog=5, interface=''): """Connects a given protocol factory to the given numeric TCP/IP port. | 2049631dd0aa73ddfc33a2c3c8f41078e4f4fcf8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/2049631dd0aa73ddfc33a2c3c8f41078e4f4fcf8/interfaces.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6514,
13891,
12,
2890,
16,
1756,
16,
3272,
16,
1473,
1330,
33,
25,
16,
1560,
2218,
11,
4672,
3536,
21500,
279,
864,
1771,
3272,
358,
326,
864,
6389,
9911,
19,
2579,
1756,
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,
6514,
13891,
12,
2890,
16,
1756,
16,
3272,
16,
1473,
1330,
33,
25,
16,
1560,
2218,
11,
4672,
3536,
21500,
279,
864,
1771,
3272,
358,
326,
864,
6389,
9911,
19,
2579,
1756,
18,
2,
-100,
... |
"macpath", | "macpath", "grp", | def plat_prepare(self): # update the self.excludes list to exclude platform specific # modules if sys.platform == "win32": self.excludes += ["os2", "posix", "dos", "mac", "macfs", "macfsn", "macpath", "MACFS", "pwd", "MacOS", "macostools", "EasyDialogs", "termios", "TERMIOS", "java.lang", "org.python.core", "riscos", "riscosenviron", "riscospath", "ce", "os.path" ] # special dlls which must be copied to the exe_dir, not the lib_dir names = "python pywintypes pythoncom".split() names = ["%s%d%d" % (name, sys.version_info[0], sys.version_info[1]) for name in names] if is_debug_build: names = ["%s_d" % name for name in names] self.dlls_in_exedir = ["%s.dll" for name in names] else: raise DistutilsError, "Platform %s not yet implemented" % sys.platform | 345bc20e2924a664ddbd476a0d812cd5b5f1f9aa /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1361/345bc20e2924a664ddbd476a0d812cd5b5f1f9aa/build_exe.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
29838,
67,
9366,
12,
2890,
4672,
468,
1089,
326,
365,
18,
338,
8993,
666,
358,
4433,
4072,
2923,
468,
4381,
309,
2589,
18,
9898,
422,
315,
8082,
1578,
6877,
365,
18,
338,
8993,
1011,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
29838,
67,
9366,
12,
2890,
4672,
468,
1089,
326,
365,
18,
338,
8993,
666,
358,
4433,
4072,
2923,
468,
4381,
309,
2589,
18,
9898,
422,
315,
8082,
1578,
6877,
365,
18,
338,
8993,
1011,
8... |
if self._body or self._app_iter: self.content_md5 = None | try: if self._body or self._app_iter: self.content_md5 = None except AttributeError: pass | def _body__set(self, value): if isinstance(value, unicode): raise TypeError( "You cannot set Response.body to a unicode object (use Response.unicode_body)") if not isinstance(value, str): raise TypeError( "You can only set the body to a str (not %s)" % type(value)) if self._body or self._app_iter: self.content_md5 = None self._body = value self.content_length = len(value) self._app_iter = None | 88c79e9404fab27fee4105d79caacdf2fd36f57f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12287/88c79e9404fab27fee4105d79caacdf2fd36f57f/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3432,
972,
542,
12,
2890,
16,
460,
4672,
309,
1549,
12,
1132,
16,
5252,
4672,
1002,
3580,
12,
315,
6225,
2780,
444,
2306,
18,
3432,
358,
279,
5252,
733,
261,
1202,
2306,
18,
9124,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3432,
972,
542,
12,
2890,
16,
460,
4672,
309,
1549,
12,
1132,
16,
5252,
4672,
1002,
3580,
12,
315,
6225,
2780,
444,
2306,
18,
3432,
358,
279,
5252,
733,
261,
1202,
2306,
18,
9124,... |
print "Active template id:" + template | def constructListing(self): | 350d93c2f060df2df80fdf8ed51f3ce9ae7be465 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10164/350d93c2f060df2df80fdf8ed51f3ce9ae7be465/views.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4872,
19081,
12,
2890,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4872,
19081,
12,
2890,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... | |
def __init__(self, set): | def __init__(self, set, _iterpacket=1): self._iterpacket=_iterpacket | def __init__(self, set): if type(set) is list: self.set = set elif isinstance(set, PacketList): self.set = list(set) else: self.set = [set] | 46665161f3ba1598ceedac57149027a35ad8e72d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7311/46665161f3ba1598ceedac57149027a35ad8e72d/scapy.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
444,
16,
389,
2165,
11482,
33,
21,
4672,
365,
6315,
2165,
11482,
33,
67,
2165,
11482,
309,
618,
12,
542,
13,
353,
666,
30,
365,
18,
542,
273,
444,
1327... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
444,
16,
389,
2165,
11482,
33,
21,
4672,
365,
6315,
2165,
11482,
33,
67,
2165,
11482,
309,
618,
12,
542,
13,
353,
666,
30,
365,
18,
542,
273,
444,
1327... |
print "Ratio: %e / %e, %f" % (pos_int[0].y, neg_int[0].y, __make_ratio((pos_int[0].y, neg_int[0].y))) | try: print "Ratio: %e / %e, %f" % (pos_int[0].y, neg_int[0].y, __make_ratio((pos_int[0].y, neg_int[0].y))) except ZeroDivisionError: print "Ratio: %e / %e, inf" % (pos_int[0].y, neg_int[0].y) | def __calculate_ratio(conf, cwdb, t=None): """ This function runs amorphous_reduction_sqe and calculates the ratio for the given time-independent background constant. @param conf: Object containing the data reduction configuration information. @type conf: L{hlr_utils.Configure} @param cwdb: Value of the wavelength-dependent background to run reduction with. @type cwdb: C{float} @param t: (OPTIONAL) Object that will allow the method to perform timing evaluations. @type t: C{sns_time.DiffTime} @return: The values of the integration in the positive and negative sections respectively. @rtype: C{tuple} """ import copy import dr_lib amr_config = copy.deepcopy(conf) amr_config.verbose = conf.amr_verbose amr_config.ldb_const = hlr_utils.DrParameter(cwdb, 0.0) if t is not None: t.getTime(False) if conf.verbose: print "Running amorphous_reduction_sqe" som = amorphous_reduction_sqe.run(amr_config) if t is not None: t.getTime(msg="After running amorphous_reduction_sqe ") pos_int = dr_lib.integrate_spectra(som, start=conf.et_pos_range[0], end=conf.et_pos_range[1], axis_pos=1) neg_int = dr_lib.integrate_spectra(som, start=conf.et_neg_range[0], end=conf.et_neg_range[1], axis_pos=1) if conf.verbose: print "Ratio: %e / %e, %f" % (pos_int[0].y, neg_int[0].y, __make_ratio((pos_int[0].y, neg_int[0].y))) return (pos_int[0].y, neg_int[0].y) | 7974347db646bfdcf6b5a61e939ca71a8df13ddc /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/763/7974347db646bfdcf6b5a61e939ca71a8df13ddc/find_ldb.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
11162,
67,
9847,
12,
3923,
16,
14098,
1966,
16,
268,
33,
7036,
4672,
3536,
1220,
445,
7597,
2125,
7657,
1481,
67,
1118,
4062,
67,
11410,
73,
471,
17264,
326,
7169,
364,
326,
864,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
11162,
67,
9847,
12,
3923,
16,
14098,
1966,
16,
268,
33,
7036,
4672,
3536,
1220,
445,
7597,
2125,
7657,
1481,
67,
1118,
4062,
67,
11410,
73,
471,
17264,
326,
7169,
364,
326,
864,
... |
def post_render(self, context): return self.args | def post_render(self, context): return self.resolved_args | def post_render(self, context): return self.args | 1726780ec97114a47ce2817483559c57117d5259 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3687/1726780ec97114a47ce2817483559c57117d5259/charts.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1603,
67,
5902,
12,
2890,
16,
819,
4672,
327,
365,
18,
11792,
67,
1968,
225,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
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,
1603,
67,
5902,
12,
2890,
16,
819,
4672,
327,
365,
18,
11792,
67,
1968,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
output("Configuing seattle constants...") | output("Configuring seattle constants...") | def install(prog_path): """ <Purpose> Goes through all the steps necessary to install seattle on the current system, printing status messages if not in silent mode. <Arguments> prog_path: Path to the directory in which seattle is being installed. <Exceptions> UnsupportedPythonError if the Python version is unsupported. <Side Effects> None. <Returns> None. """ global OS # Make sure we're running a supported version of Python version = sys.version.split(" ")[0].split(".") if version[0] != '2' or version[1] != '5': # If it's not Python 2.5 raise UnsupportedPythonError(version[0] + "." + version[1]) prog_path = os.path.realpath(prog_path) # First, setup seattle to run at startup output("Preparing seattle to run at startup...") startup_retval = setup_startup(prog_path) if startup_retval: output("Done!") else: output("Failed.") # Next, if it is a Windows system and we were able to find the startup folder, # customize the uninstaller if (OS == "Windows" or OS == "WindowsCE") and startup_retval: output("Creating uninstaller...") setup_uninstaller(prog_path, startup_retval) output("Done!") # Next, setup the sitecustomize.py file, if running on WindowsCE if OS == "WindowsCE": ouput("Configuring python...") setup_sitecustomize(prog_path) output("Done!") # Next, customize the constants file output("Configuing seattle constants...") setup_constants(prog_path) output("Done!") # Next, generate the node keys output("Generating node keys (may take a few minutes)...") generate_keys(prog_path) output("Done!") # If on a Linux-like system, make sure that the scripts have the right permissions if OS != "Windows" and OS != "WindowsCE": output("Setting script permissions...") setup_permissions(prog_path) output("Done!") # Everything has been installed, so start seattle output("Starting seattle...") start_seattle(prog_path) output("Started!") # Display final messages if startup_retval: # The install went smoothly. output("seattle was successfully installed and has been started!") output("If you would like to uninstall seattle at any time, just run " + get_uninstaller_name() + ".") output("After running it, you can remove the directory containing seattle.") else: # We weren't able to find the startup folder output("seattle could not be installed correctly to run at startup, but it has been started.") output("If you would like to manually run seattle at any time, just run " + get_starter_file_name() + ".") | 10036f8b4a078c5404fd385b69cac91e96f3db42 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7995/10036f8b4a078c5404fd385b69cac91e96f3db42/install.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3799,
12,
14654,
67,
803,
4672,
3536,
411,
10262,
4150,
34,
4220,
281,
3059,
777,
326,
6075,
4573,
358,
3799,
695,
4558,
298,
603,
326,
783,
2619,
16,
19171,
1267,
2743,
309,
486,
316,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3799,
12,
14654,
67,
803,
4672,
3536,
411,
10262,
4150,
34,
4220,
281,
3059,
777,
326,
6075,
4573,
358,
3799,
695,
4558,
298,
603,
326,
783,
2619,
16,
19171,
1267,
2743,
309,
486,
316,
... |
self.translation_lst.append(mod_lst[-1]) | def start(self): s = self.build.getSourceStamp() self.pofiles = {} self.translation_lst = [] for change in s.changes: files = ( change.files_added + change.files_modified + [f[1] for f in change.files_renamed] ) for f in files: mod_lst = f.split('/') fname,ext = os.path.splitext(mod_lst[-1]) if ext == '.po': if mod_lst[0] not in self.pofiles: self.pofiles[mod_lst[0]] = [] self.pofiles[mod_lst[0]].append(mod_lst[-1]) self.translation_lst.append(mod_lst[-1]) if len(self.translation_lst): commands = [] commands = ["make","install-translation"] | 5e70d2314cc0d9c49ed1e1a1e822b90d2a0d1320 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12355/5e70d2314cc0d9c49ed1e1a1e822b90d2a0d1320/buildstep.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
787,
12,
2890,
4672,
272,
273,
365,
18,
3510,
18,
588,
1830,
8860,
1435,
365,
18,
84,
792,
1449,
273,
2618,
365,
18,
10173,
67,
16923,
273,
5378,
364,
2549,
316,
272,
18,
6329,
30,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
787,
12,
2890,
4672,
272,
273,
365,
18,
3510,
18,
588,
1830,
8860,
1435,
365,
18,
84,
792,
1449,
273,
2618,
365,
18,
10173,
67,
16923,
273,
5378,
364,
2549,
316,
272,
18,
6329,
30,
1... | |
comtypes.client.GetEvents(domNode,self.domEventsObject,interface=self.MSHTMLLib.HTMLDocumentEvents2) | self._comEvents=comtypes.client.GetEvents(domNode,self.domEventsObject,interface=self.MSHTMLLib.HTMLDocumentEvents2) | def fillBuffer(self,domNode,parentID=None,position=None): debug.writeMessage("MSHTML fillBuffer: %s"%domNode.nodeName) #We don't want comments in the buffer if isinstance(domNode,ctypes.POINTER(self.MSHTMLLib.DispHTMLCommentElement)): return position #We don't want non-displayed elements in the buffer try: display=domNode.currentStyle.display except: display=None if display==u'none': return position nodeName=domNode.nodeName ID=self.getDomNodeID(domNode) #We don't want option elements in the buffer if nodeName=="OPTION": return position if position is None: position=self.text_characterCount info=self.fieldInfoTemplate.copy() info["node"]=domNode info['parent']=parentID info['range']=[position,position] children=[] if isinstance(domNode,self.MSHTMLLib.DispHTMLFrameElement) or nodeName=="IFRAME": try: children.append(domNode.contentWindow.document) except: pass elif isinstance(domNode,self.MSHTMLLib.DispHTMLDocument): try: comtypes.client.ReleaseEvents(domNode,self.domEventsObject,interface=self.MSHTMLLib.HTMLDocumentEvents2) except: pass comtypes.client.GetEvents(domNode,self.domEventsObject,interface=self.MSHTMLLib.HTMLDocumentEvents2) children.append(domNode.body) else: child=domNode.firstChild while child: children.append(child) try: child=child.nextSibling except: child=None info['children']=filter(lambda x: x,[self.getDomNodeID(x) for x in children]) text="" if nodeName=="#text": data=domNode.data if data and not data.isspace(): text=data elif isinstance(domNode,self.MSHTMLLib.DispHTMLFrameElement) or nodeName=="IFRAME": info["role"]=controlTypes.ROLE_FRAME elif isinstance(domNode,self.MSHTMLLib.DispHTMLDocument): info["role"]=controlTypes.ROLE_DOCUMENT text=domNode.title+"\n " elif nodeName=="A": info["role"]=controlTypes.ROLE_LINK elif nodeName=="TABLE": info["role"]=controlTypes.ROLE_TABLE elif nodeName=="THEAD": info["role"]=controlTypes.ROLE_TABLEHEADER elif nodeName=="TBODY": info["role"]=controlTypes.ROLE_TABLEBODY elif nodeName=="TFOOT": info["role"]=controlTypes.ROLE_TABLEFOOTER elif nodeName=="TR": info["role"]=controlTypes.ROLE_TABLEROW elif nodeName=="TD": info["role"]=controlTypes.ROLE_TABLECELL elif nodeName=="P": info["role"]=controlTypes.ROLE_PARAGRAPH elif nodeName=="UL": info["role"]=controlTypes.ROLE_LIST info["descriptionFunc"]=lambda x: _("with %s items")%x.children.length elif nodeName=="OL": info["role"]=controlTypes.ROLE_LIST info["descriptionFunc"]=lambda x: _("with %s items")%x.children.length elif nodeName=="LI": info["role"]=controlTypes.ROLE_LISTITEM info["typeString"]=_("bullet") elif nodeName=="DL": info["role"]=controlTypes.ROLE_LIST info["typeString"]=_("definition")+" "+controlTypes.speechRoleLabels[controlTypes.ROLE_LIST] info["descriptionFunc"]=lambda x: _("with %s items")%x.children.length elif nodeName=="DT": info["role"]=controlTypes.ROLE_LISTITEM info["typeString"]=_("bullet") elif nodeName=="DD": info["role"]=controlTypes.ROLE_LISTITEM info["typeString"]=_("definition") elif nodeName=="TEXTAREA": info["role"]=controlTypes.ROLE_EDITABLETEXT if domNode.children.length==0: text=" " elif nodeName=="IMG": info["role"]=controlTypes.ROLE_GRAPHIC label=domNode.getAttribute('alt') if not label: label=domNode.getAttribute('title') if not label: label=domNode.getAttribute('name') if not label: label=domNode.getAttribute('src').split('/')[-1] text=label elif nodeName in ["H1","H2","H3","H4","H5","H6"]: info["role"]=getattr(controlTypes,"ROLE_HEADING%s"%nodeName[1]) elif nodeName=="BLOCKQUOTE": info["role"]=controlTypes.ROLE_BLOCKQUOTE elif nodeName=="FORM": info["role"]=controlTypes.ROLE_FORM elif nodeName=="INPUT": inputType=domNode.getAttribute("type") if inputType=="text": info["role"]=controlTypes.ROLE_EDITABLETEXT text=domNode.getAttribute('value') or ""+" " elif inputType=="file": info["role"]=controlTypes.ROLE_EDITABLETEXT info["typeString"]=_("file upload")+" "+controlTypes.speechRoleLabels[controlTypes.ROLE_EDITABLETEXT] text=domNode.getAttribute('value')+" " elif inputType=="password": info["role"]=controlTypes.ROLE_EDITABLETEXT info["typeString"]=_("protected")+" "+controlTypes.speechRoleLabels[controlTypes.ROLE_EDITABLETEXT] text="*"*len(domNode.getAttribute('value'))+" " elif inputType in ["button","image","reset","submit"]: info["role"]=controlTypes.ROLE_BUTTON text=domNode.getAttribute('value') elif inputType=="radio": info["role"]=controlTypes.ROLE_RADIOBUTTON info["stateTextFunc"]=lambda x: IAccessibleHandler.getStateName(IAccessibleHandler.STATE_SYSTEM_CHECKED) if x.checked else _("not %s")%IAccessibleHandler.getStateName(IAccessibleHandler.STATE_SYSTEM_CHECKED) text=" " elif inputType=="checkbox": info["role"]=controlTypes.ROLE_CHECKBOX info["stateTextFunc"]=lambda x: IAccessibleHandler.getStateName(IAccessibleHandler.STATE_SYSTEM_CHECKED) if x.checked else _("not %s")%IAccessibleHandler.getStateName(IAccessibleHandler.STATE_SYSTEM_CHECKED) text=" " elif nodeName=="SELECT": info["role"]=controlTypes.ROLE_COMBOBOX itemText=comtypes.client.wrap(domNode.item(domNode.selectedIndex)).text text=itemText elif (nodeName=="BR") and (domNode.previousSibling and domNode.previousSibling.nodeName=="#text"): text="\n" else: info["typeString"]=nodeName try: accessKey=domNode.accessKey if accessKey: info["accessKey"]="alt+%s"%accessKey except: pass try: if domNode.onclick and (nodeName not in ["INPUT","A"]): info["typeString"]=_("clickable")+" "+info["typeString"] except: pass if ID and not self._IDs.has_key(ID): self.addID(ID,info) if not ID: ID=parentID if text: position=self.addText(ID,text,position=position) for child in children: position=self.fillBuffer(child,ID,position=position) return position | 7b2c6f1cd335faa498ea3b9b2a61361b9639cec4 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9340/7b2c6f1cd335faa498ea3b9b2a61361b9639cec4/MSHTML.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3636,
1892,
12,
2890,
16,
9859,
907,
16,
2938,
734,
33,
7036,
16,
3276,
33,
7036,
4672,
1198,
18,
2626,
1079,
2932,
49,
2664,
2838,
3636,
1892,
30,
738,
87,
28385,
9859,
907,
18,
2159,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3636,
1892,
12,
2890,
16,
9859,
907,
16,
2938,
734,
33,
7036,
16,
3276,
33,
7036,
4672,
1198,
18,
2626,
1079,
2932,
49,
2664,
2838,
3636,
1892,
30,
738,
87,
28385,
9859,
907,
18,
2159,... |
def __saveEntityList( self, anEntityTypeString,\ | def __saveEntityList( self, anEml, anEntityTypeString,\ | def __saveEntityList( self, anEntityTypeString,\ aSystemPath, anIDList ): | 44d8ce7a7552e0f9ae426d587cd45c327adfc1ea /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12724/44d8ce7a7552e0f9ae426d587cd45c327adfc1ea/Session.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
5688,
1943,
682,
12,
365,
16,
392,
41,
781,
16,
392,
22562,
780,
17211,
279,
3163,
743,
16,
392,
24583,
262,
30,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
5688,
1943,
682,
12,
365,
16,
392,
41,
781,
16,
392,
22562,
780,
17211,
279,
3163,
743,
16,
392,
24583,
262,
30,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
vars = [] f,g = funcs if hasattr(f, 'variables'): vars += list(f.variables()) if hasattr(g, 'variables'): vars += list(g.variables()) vars = [str(v) for v in vars] from sage.misc.misc import uniq if len(uniq(vars)) > 1: raise ValueError, "there cannot be more than one free variable in funcs" kwargs['parametric'] = True return plot(funcs, *args, **kwargs) | raise ValueError, "the number of functions and the number of free variables is not a possible combination for 2d or 3d parametric plots" | def parametric_plot(funcs, *args, **kwargs): r""" \code{parametric_plot} takes two or three functions as a list or a tuple and makes a plot with the first function giving the $x$ coordinates, the second function giving the $y$ coordinates, and the third function (if present) giving the $z$ coordinates. INPUT: funcs -- 2 or 3-tuple of functions other options -- passed to plot. EXAMPLES: We draw some 2d parametric plots: sage: t = var('t') sage: parametric_plot( (sin(t), sin(2*t)), (t, 0, 2*pi), rgbcolor=hue(0.6) ) sage: parametric_plot((1, t), (t, 0, 4)) sage: parametric_plot((t, t^2), (t, -4, 4)) We draw a 3d parametric plot: sage: parametric_plot3d( (5*cos(x), 5*sin(x), x), (-12, 12), plot_points=150, color="red") TESTS: sage: parametric_plot((x, t^2), -4, 4) Traceback (most recent call last): ... ValueError: there cannot be more than one free variable in funcs sage: parametric_plot((1, x+t), -4, 4) Traceback (most recent call last): ... ValueError: there cannot be more than one free variable in funcs """ if len(funcs) == 3: raise ValueError, "use parametric_plot3d for parametric plots in 3d dimensions." elif len(funcs) != 2: raise ValueError, "parametric plots only implemented in 2 and 3 dimensions." else: vars = [] f,g = funcs if hasattr(f, 'variables'): vars += list(f.variables()) if hasattr(g, 'variables'): vars += list(g.variables()) vars = [str(v) for v in vars] from sage.misc.misc import uniq if len(uniq(vars)) > 1: raise ValueError, "there cannot be more than one free variable in funcs" kwargs['parametric'] = True return plot(funcs, *args, **kwargs) | 90b9ecf339edef448d04d398d70a614fc66902fb /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9417/90b9ecf339edef448d04d398d70a614fc66902fb/plot.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
579,
1591,
67,
4032,
12,
17728,
16,
380,
1968,
16,
2826,
4333,
4672,
436,
8395,
521,
710,
95,
891,
1591,
67,
4032,
97,
5530,
2795,
578,
8925,
4186,
487,
279,
666,
578,
279,
3193,
471,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
579,
1591,
67,
4032,
12,
17728,
16,
380,
1968,
16,
2826,
4333,
4672,
436,
8395,
521,
710,
95,
891,
1591,
67,
4032,
97,
5530,
2795,
578,
8925,
4186,
487,
279,
666,
578,
279,
3193,
471,
... |
""" fl_unfreeze_form(pForm) | """ fl_unfreeze_form(pForm) | def fl_unfreeze_form(pForm): """ fl_unfreeze_form(pForm) All changes made in the meantime in a form are drawn at once, reverting previous freeze <pForm> : form to be re-drawn after freezing """ _fl_unfreeze_form = cfuncproto( load_so_libforms(), "fl_unfreeze_form", \ None, [cty.POINTER(FL_FORM)], \ """void fl_unfreeze_form(FL_FORM * form) """) keep_elem_refs(pForm) _fl_unfreeze_form(pForm) | bd6cf497d94f877a33a2bba90b9d74b9e4c950cb /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2429/bd6cf497d94f877a33a2bba90b9d74b9e4c950cb/library.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1183,
67,
318,
29631,
67,
687,
12,
84,
1204,
4672,
3536,
1183,
67,
318,
29631,
67,
687,
12,
84,
1204,
13,
225,
4826,
3478,
7165,
316,
326,
3722,
957,
316,
279,
646,
854,
19377,
622,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1183,
67,
318,
29631,
67,
687,
12,
84,
1204,
4672,
3536,
1183,
67,
318,
29631,
67,
687,
12,
84,
1204,
13,
225,
4826,
3478,
7165,
316,
326,
3722,
957,
316,
279,
646,
854,
19377,
622,
... |
self.__patch_dir = os.path.join(base_dir, 'patches', self.__name) | self.__series_dir = os.path.join(base_dir, 'patches', self.__name) | def __init__(self, name = None): """Takes a series name as the parameter. """ try: if name: self.__name = name else: self.__name = git.get_head_file() base_dir = git.get_base_dir() except git.GitException, ex: raise StackException, 'GIT tree not initialised: %s' % ex | 02ac3ad2d474c60c1cdcb6b45451c1077b735ca0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12366/02ac3ad2d474c60c1cdcb6b45451c1077b735ca0/stack.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
508,
273,
599,
4672,
3536,
11524,
279,
4166,
508,
487,
326,
1569,
18,
3536,
775,
30,
309,
508,
30,
365,
16186,
529,
273,
508,
469,
30,
365,
16186,
529,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
508,
273,
599,
4672,
3536,
11524,
279,
4166,
508,
487,
326,
1569,
18,
3536,
775,
30,
309,
508,
30,
365,
16186,
529,
273,
508,
469,
30,
365,
16186,
529,
... |
return Object.getName() | return Object.getName(self) | def getName(self): try: return self.layouts[XML_TYPE]['name'] except KeyError: pass return Object.getName() | 22b12f23ec40042d4f123949ab052a63c0046e6f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6341/22b12f23ec40042d4f123949ab052a63c0046e6f/et_auto_gen.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1723,
12,
2890,
4672,
775,
30,
327,
365,
18,
28283,
63,
4201,
67,
2399,
23962,
529,
3546,
1335,
4999,
30,
1342,
327,
1033,
18,
17994,
1435,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1723,
12,
2890,
4672,
775,
30,
327,
365,
18,
28283,
63,
4201,
67,
2399,
23962,
529,
3546,
1335,
4999,
30,
1342,
327,
1033,
18,
17994,
1435,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
path = self._relpath | path = self.request_path | def delete(self): """Deletes a resource at a url. If it's a collection, it must be empty.""" path = self._relpath resource = Resource.get_by_path(path) | 9869f0209db866324231063296f1d83027eb102e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14790/9869f0209db866324231063296f1d83027eb102e/views.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1430,
12,
2890,
4672,
3536,
7551,
279,
1058,
622,
279,
880,
18,
971,
518,
1807,
279,
1849,
16,
518,
1297,
506,
1008,
12123,
589,
273,
365,
18,
2293,
67,
803,
1058,
273,
2591,
18,
588,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1430,
12,
2890,
4672,
3536,
7551,
279,
1058,
622,
279,
880,
18,
971,
518,
1807,
279,
1849,
16,
518,
1297,
506,
1008,
12123,
589,
273,
365,
18,
2293,
67,
803,
1058,
273,
2591,
18,
588,
... |
self.tasklets.append(self._migrater) | self.tasklets = [self._migrater] | def ExpandNames(self): self._ExpandAndLockInstance() | 3a012b41920218e5dbe1d90b2dd4f540130de614 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7542/3a012b41920218e5dbe1d90b2dd4f540130de614/cmdlib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
16429,
1557,
12,
2890,
4672,
365,
6315,
12271,
1876,
2531,
1442,
1435,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
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,
16429,
1557,
12,
2890,
4672,
365,
6315,
12271,
1876,
2531,
1442,
1435,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
def differences(f, g): | def differences(f, g, assumptions): | def differences(f, g): """Smush the formulae. Compare them, generating patch instructions.""" global lumped | c1bfd803814d84a8ec0ae946813eb6a735cf6088 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3308/c1bfd803814d84a8ec0ae946813eb6a735cf6088/diff.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
16440,
12,
74,
16,
314,
16,
6287,
573,
4672,
3536,
9552,
1218,
326,
8013,
73,
18,
225,
11051,
2182,
16,
12516,
4729,
12509,
12123,
2552,
328,
379,
1845,
225,
2,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
16440,
12,
74,
16,
314,
16,
6287,
573,
4672,
3536,
9552,
1218,
326,
8013,
73,
18,
225,
11051,
2182,
16,
12516,
4729,
12509,
12123,
2552,
328,
379,
1845,
225,
2,
-100,
-100,
-100,
-100,
... |
searchby = self.search_terms[self.searchcombo.get_active()] | searchby = self.search_terms_mpd[self.searchcombo.get_active()] | def search(self, entry): searchby = self.search_terms[self.searchcombo.get_active()] if self.searchtext.get_text() != "": list = self.conn.do.search(searchby, self.searchtext.get_text()) self.browserdata.clear() for item in list: if item.type == 'directory': name = item.directory.split('/')[-1] self.browserdata.append([gtk.STOCK_OPEN, item.directory, escape_html(name)]) elif item.type == 'file': self.browserdata.append(['sonata', item.file, self.parse_formatting(self.libraryformat, item, True)]) self.browser.grab_focus() self.browser.scroll_to_point(0, 0) self.searchbutton.show() self.searchbutton.set_no_show_all(False) else: self.search_end(None) | 0f4a745571c204db25d0067562976a54a3803417 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2312/0f4a745571c204db25d0067562976a54a3803417/sonata.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1623,
12,
2890,
16,
1241,
4672,
1623,
1637,
273,
365,
18,
3072,
67,
10112,
67,
1291,
72,
63,
2890,
18,
3072,
25053,
18,
588,
67,
3535,
1435,
65,
309,
365,
18,
3072,
955,
18,
588,
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,
1623,
12,
2890,
16,
1241,
4672,
1623,
1637,
273,
365,
18,
3072,
67,
10112,
67,
1291,
72,
63,
2890,
18,
3072,
25053,
18,
588,
67,
3535,
1435,
65,
309,
365,
18,
3072,
955,
18,
588,
67,... |
pywikibot.output("Page %s is a redirect; skipping." % page.aslink()) | pywikibot.output("Page %s is a redirect; skipping." % page.title(asLink=True)) | def treat(self, page): try: # Show the title of the page we're working on. # Highlight the title in purple. pywikibot.output(u"\n\n>>> \03{lightpurple}%s\03{default} <<<" % page.title()) ccToolkit = CosmeticChangesToolkit(page.site(), debug = True, namespace = page.namespace(), pageTitle=page.title()) changedText = ccToolkit.change(page.get()) if changedText.strip() != page.get().strip(): if not self.acceptall: choice = pywikibot.inputChoice(u'Do you want to accept these changes?', ['Yes', 'No', 'All', 'Quit'], ['y', 'N', 'a', 'q'], 'N') if choice == 'a': self.acceptall = True elif choice == 'q': self.done = True return if self.acceptall or choice == 'y': page.put(changedText, comment=self.comment) else: pywikibot.output('No changes were necessary in %s' % page.title()) except pywikibot.NoPage: pywikibot.output("Page %s does not exist?!" % page.aslink()) except pywikibot.IsRedirectPage: pywikibot.output("Page %s is a redirect; skipping." % page.aslink()) except pywikibot.LockedPage: pywikibot.output("Page %s is locked?!" % page.aslink()) except pywikibot.EditConflict: pywikibot.output("An edit conflict has occured at %s." % page.aslink()) | 9bfea435807d0dd40e3f398a357f9bb5a2c32491 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4404/9bfea435807d0dd40e3f398a357f9bb5a2c32491/cosmetic_changes.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10116,
12,
2890,
16,
1363,
4672,
775,
30,
468,
9674,
326,
2077,
434,
326,
1363,
732,
4565,
5960,
603,
18,
468,
31386,
326,
2077,
316,
5405,
1802,
18,
2395,
11999,
495,
352,
18,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10116,
12,
2890,
16,
1363,
4672,
775,
30,
468,
9674,
326,
2077,
434,
326,
1363,
732,
4565,
5960,
603,
18,
468,
31386,
326,
2077,
316,
5405,
1802,
18,
2395,
11999,
495,
352,
18,
2844,
1... |
for typ, _s, (srow, _scol), (_erow, _rcol), line in tokens_iter: | for typ, s, (srow, _scol), (_erow, _rcol), line in tokens_iter: | def split_to_singles(source): """Get a source string, and split it into several strings, each one a "single block" which can be compiled in the "single" mode. Every string which is not the last one ends with a '\n', so to convert a line number of a sub-string to a line number of the big string, add the number of '\n' chars in the preceding strings. """ readline = ReadLiner(source) first_lines = [0] # Indices, 0-based, of the rows which start a new single. cur_indent_level = 0 # What this does is pretty simple: We split on every NEWLINE token which # is on indentation level 0 and is not followed by "else", "except" or # "finally" (in that case it should be kept with the previous "single"). # Since we get the tokens one by one, and INDENT and DEDENT tokens come # *after* the NEWLINE token, we need a bit of care, so we peek at tokens # after the NEWLINE token to decide what to do. tokens_iter = TeeIter( itertools.ifilter(lambda x: x[0] not in (tokenize.COMMENT, tokenize.NL), tokenize.generate_tokens(readline))) try: for typ, _s, (srow, _scol), (_erow, _rcol), line in tokens_iter: if typ == tokenize.NEWLINE: for typ2, s2, (_srow2, _scol2), (_erow2, _rcol2), _line2 \ in tokens_iter.tee(): if typ2 == tokenize.INDENT: cur_indent_level += 1 elif typ2 == tokenize.DEDENT: cur_indent_level -= 1 else: break else: raise AssertionError("Should have received an ENDMARKER") # Now we have the first token after INDENT/DEDENT ones. if (cur_indent_level == 0 and (typ2 != tokenize.ENDMARKER and not (typ2 == tokenize.NAME and s2 in ('else', 'except', 'finally')))): first_lines.append(srow) except tokenize.TokenError: # EOF in the middle, it's a syntax error anyway. pass line_offsets = readline.line_offsets r = [] for i, line in enumerate(first_lines): if i != len(first_lines)-1: r.append(source[line_offsets[line]:line_offsets[first_lines[i+1]]]) else: r.append(source[line_offsets[line]:]) return r | 15257589857bb4583c130efe105183d49e798942 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10932/15257589857bb4583c130efe105183d49e798942/split_to_singles.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1416,
67,
869,
67,
2470,
1040,
12,
3168,
4672,
3536,
967,
279,
1084,
533,
16,
471,
1416,
518,
1368,
11392,
2064,
16,
1517,
1245,
279,
315,
7526,
1203,
6,
1492,
848,
506,
7743,
316,
326... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1416,
67,
869,
67,
2470,
1040,
12,
3168,
4672,
3536,
967,
279,
1084,
533,
16,
471,
1416,
518,
1368,
11392,
2064,
16,
1517,
1245,
279,
315,
7526,
1203,
6,
1492,
848,
506,
7743,
316,
326... |
def findfile(file, sgroup, db=None): """ findfile(file, sgroup, db=None) -> StorageGroup object | def findfile(filename, sgroup, db=None): """ findfile(filename, sgroup, db=None) -> StorageGroup object | def findfile(file, sgroup, db=None): """ findfile(file, sgroup, db=None) -> StorageGroup object Will search through all matching storage groups, searching for file. Returns matching storage group upon success. """ db = DBCache(db) for sg in db.getStorageGroup(groupname=sgroup): # search given group if not sg.local: continue if os.access(sg.dirname+filename, os.F_OK): return sg for sg in db.getStorageGroup(): # not found, search all other groups if not sg.local: continue if os.access(sg.dirname+filename, os.F_OK): return sg return None | 05aa54f67dfab2de3ec737e9a2323781ef0270c3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13713/05aa54f67dfab2de3ec737e9a2323781ef0270c3/MythData.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1104,
768,
12,
3459,
16,
272,
1655,
16,
1319,
33,
7036,
4672,
3536,
1104,
768,
12,
3459,
16,
272,
1655,
16,
1319,
33,
7036,
13,
317,
5235,
1114,
733,
225,
9980,
1623,
3059,
777,
3607,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1104,
768,
12,
3459,
16,
272,
1655,
16,
1319,
33,
7036,
4672,
3536,
1104,
768,
12,
3459,
16,
272,
1655,
16,
1319,
33,
7036,
13,
317,
5235,
1114,
733,
225,
9980,
1623,
3059,
777,
3607,
... |
this = apply(_quickfix.new_SettlInstCode, args) | this = _quickfix.new_SettlInstCode(*args) | def __init__(self, *args): this = apply(_quickfix.new_SettlInstCode, args) try: self.this.append(this) except: self.this = this | 7e632099fd421880c8c65fb0cf610d338d115ee9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8819/7e632099fd421880c8c65fb0cf610d338d115ee9/quickfix.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
380,
1968,
4672,
333,
273,
389,
19525,
904,
18,
2704,
67,
694,
6172,
10773,
1085,
30857,
1968,
13,
775,
30,
365,
18,
2211,
18,
6923,
12,
2211,
13,
1335,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
380,
1968,
4672,
333,
273,
389,
19525,
904,
18,
2704,
67,
694,
6172,
10773,
1085,
30857,
1968,
13,
775,
30,
365,
18,
2211,
18,
6923,
12,
2211,
13,
1335,
... |
Returns the largest n so that precision information is stored about the coefficient of x^n. | Returns the largest $n$ so that precision information is stored about the coefficient of $x^n$. | def prec_degree(self): """ Returns the largest n so that precision information is stored about the coefficient of x^n. | 6021148ca8a7de024ad0e773901b47492f0cb55f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/6021148ca8a7de024ad0e773901b47492f0cb55f/polynomial_padic_capped_relative_dense.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13382,
67,
21361,
12,
2890,
4672,
3536,
2860,
326,
12756,
290,
1427,
716,
6039,
1779,
353,
4041,
2973,
326,
16554,
434,
619,
66,
82,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13382,
67,
21361,
12,
2890,
4672,
3536,
2860,
326,
12756,
290,
1427,
716,
6039,
1779,
353,
4041,
2973,
326,
16554,
434,
619,
66,
82,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
cr.close() | if cr: cr.close() | def __call__(self, serv, id, db_name, demo, lang): try: serv.actions[id]['progress'] = 0 clean = False cr = sql_db.db_connect(db_name).cursor() tools.init_db(cr) cr.commit() cr.close() pool = pooler.get_pool(db_name, demo,serv.actions[id], update_module=True) if lang and lang != 'en_US': filename = tools.config["root_path"] + "/i18n/" + lang + ".csv" tools.trans_load(db_name, filename, lang) serv.actions[id]['clean'] = True cr = sql_db.db_connect(db_name).cursor() cr.execute('select login, password, name ' \ 'from res_users ' \ 'where login <> \'root\' order by login') serv.actions[id]['users'] = cr.dictfetchall() cr.close() except Exception, e: serv.actions[id]['clean'] = False serv.actions[id]['exception'] = e from StringIO import StringIO import traceback e_str = StringIO() traceback.print_exc(file=e_str) traceback_str = e_str.getvalue() e_str.close() serv.actions[id]['traceback'] = traceback_str cr.close() | c32ca71b85b9edb66ee09155637f1715c3ce19f8 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12853/c32ca71b85b9edb66ee09155637f1715c3ce19f8/web_services.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1991,
972,
12,
2890,
16,
13515,
16,
612,
16,
1319,
67,
529,
16,
21477,
16,
3303,
4672,
775,
30,
13515,
18,
4905,
63,
350,
23962,
8298,
3546,
273,
374,
2721,
273,
1083,
4422,
273,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1991,
972,
12,
2890,
16,
13515,
16,
612,
16,
1319,
67,
529,
16,
21477,
16,
3303,
4672,
775,
30,
13515,
18,
4905,
63,
350,
23962,
8298,
3546,
273,
374,
2721,
273,
1083,
4422,
273,... |
node.append(childNode, "append") | node.append(childNode, "for") | def COMPTAIL_addFor(self, node, childNode): node.append(childNode, "append") | 0736039e87c085e2b972d4b3d8a9c39d2286f2d2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12949/0736039e87c085e2b972d4b3d8a9c39d2286f2d2/VanillaBuilder.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5423,
1856,
6575,
67,
1289,
1290,
12,
2890,
16,
756,
16,
9465,
4672,
756,
18,
6923,
12,
3624,
907,
16,
315,
6923,
7923,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5423,
1856,
6575,
67,
1289,
1290,
12,
2890,
16,
756,
16,
9465,
4672,
756,
18,
6923,
12,
3624,
907,
16,
315,
6923,
7923,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
select stock.date_planned, min(stock.id), 0 as actual_qty, sum(stock.product_qty) as planned_qty | select stock.date_planned, min(stock.id) as id, 0 as actual_qty, sum(stock.product_qty) as planned_qty | def init(self, cr): tools.drop_view_if_exists(cr, 'report_delivery_products_planned') cr.execute(""" create or replace view report_delivery_products_planned as ( select stock.date, min(stock.id), sum(stock.product_qty) as qty, 0 as planned_qty from stock_picking picking inner join stock_move stock on picking.id = stock.picking_id and picking.type = 'out' where stock.date between (select cast(date_trunc('week', current_date) as date)) and (select cast(date_trunc('week', current_date) as date) + 7) group by stock.date | d1c818f1f1c2c2310b1b2eff79c5c8c61511f900 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/d1c818f1f1c2c2310b1b2eff79c5c8c61511f900/stock.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1208,
12,
2890,
16,
4422,
4672,
8513,
18,
7285,
67,
1945,
67,
430,
67,
1808,
12,
3353,
16,
296,
6006,
67,
15703,
67,
18736,
67,
412,
10041,
6134,
4422,
18,
8837,
2932,
3660,
752,
578,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1208,
12,
2890,
16,
4422,
4672,
8513,
18,
7285,
67,
1945,
67,
430,
67,
1808,
12,
3353,
16,
296,
6006,
67,
15703,
67,
18736,
67,
412,
10041,
6134,
4422,
18,
8837,
2932,
3660,
752,
578,
... |
prefix = get_scons_prefix(self.install_dir) | is_win32 = sys.platform == "win32" or args[0] == 'bdist_wininst' prefix = get_scons_prefix(self.install_dir, is_win32) | def finalize_options(self): _install_lib.finalize_options(self) if not set_explicitly("lib", self.distribution.script_args): # They didn't explicitly specify the installation # directory for libraries... prefix = get_scons_prefix(self.install_dir) standard_dir = os.path.join(self.install_dir, "SCons") version_dir = os.path.join(prefix, "scons-0.11") standalone_dir = os.path.join(prefix, "scons") if self.version_lib: # ...but they asked for a version-specific directory. self.install_dir = version_dir elif self.standalone_lib: # ...but they asked for a standalone directory. self.install_dir = standalone_dir elif not self.standard_lib: # ...and they didn't explicitly ask for the standard # directory, so guess based on what's out there. try: e = filter(lambda x: x[:6] == "scons-", os.listdir(prefix)) except: e = None if e: # We found a path name (e.g.) /usr/lib/scons-XXX, # so pick the version-specific directory. self.install_dir = version_dir elif os.path.exists(standalone_dir) or \ not os.path.exists(standard_dir): # There's already a standalone directory, or # there's no SCons library in the standard # directory, so go with the standalone. self.install_dir = standalone_dir global installed_lib_dir installed_lib_dir = self.install_dir | c49861b430bd280a6abec78f30b02e2c02709bac /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7126/c49861b430bd280a6abec78f30b02e2c02709bac/setup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12409,
67,
2116,
12,
2890,
4672,
389,
5425,
67,
2941,
18,
30343,
67,
2116,
12,
2890,
13,
309,
486,
444,
67,
16511,
715,
2932,
2941,
3113,
365,
18,
16279,
18,
4263,
67,
1968,
4672,
468,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12409,
67,
2116,
12,
2890,
4672,
389,
5425,
67,
2941,
18,
30343,
67,
2116,
12,
2890,
13,
309,
486,
444,
67,
16511,
715,
2932,
2941,
3113,
365,
18,
16279,
18,
4263,
67,
1968,
4672,
468,... |
fwhm, interpolate=True, maskName='BAD') | fwhm, interpolate=False, maskName='BAD') for d in sdefects: nd = measAlg.Defect(d.getBBox()) defectList.append(nd) ipIsr.interpolateDefectList(exposure, defectList, fwhm) unc = ipIsr.UnmaskedNanCounterF() unc.apply(exposure.getMaskedImage()) nnans = unc.getNpix() metadata = exposure.getMetadata() metadata.set("numNans", nnans) | def process(self, clipboard): """ """ self.log.log(Log.INFO, "Doing CCD defect mask.") #grab exposure from clipboard exposure = clipboard.get(self.policy.getString("inputKeys.ccdExposure")) | 69e2e7d5b8b7ff6b6851de07da7bd94f0ab3d8ee /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6525/69e2e7d5b8b7ff6b6851de07da7bd94f0ab3d8ee/isrCcdDefectStage.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
12,
2890,
16,
20304,
4672,
3536,
3536,
365,
18,
1330,
18,
1330,
12,
1343,
18,
5923,
16,
315,
3244,
310,
385,
10160,
26640,
3066,
1199,
13,
225,
468,
2752,
70,
14620,
628,
20304,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
12,
2890,
16,
20304,
4672,
3536,
3536,
365,
18,
1330,
18,
1330,
12,
1343,
18,
5923,
16,
315,
3244,
310,
385,
10160,
26640,
3066,
1199,
13,
225,
468,
2752,
70,
14620,
628,
20304,
... |
self.locks = {} | self.locks = locks | def __init__(self,backend,parameters,refresh_cllbck) : self.backend = backend self.dic = parameters self.tasks = {} self.time = time.time() self.refresh = refresh_cllbck self.locks = {} self.tosleep = 0 | 18d0f2f91106086e9b6d4d4409260661ab393fc9 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8234/18d0f2f91106086e9b6d4d4409260661ab393fc9/datastore.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
9993,
16,
3977,
16,
9144,
67,
830,
20404,
363,
13,
294,
365,
18,
9993,
273,
4221,
365,
18,
15859,
273,
1472,
365,
18,
9416,
273,
2618,
365,
18,
957,
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,
1001,
2738,
972,
12,
2890,
16,
9993,
16,
3977,
16,
9144,
67,
830,
20404,
363,
13,
294,
365,
18,
9993,
273,
4221,
365,
18,
15859,
273,
1472,
365,
18,
9416,
273,
2618,
365,
18,
957,
27... |
def _processRandom(self, atom, sessionID): | def _processRandom(self, elem, sessionID): | def _processRandom(self, atom, sessionID): # Random atoms contain one or more <li> atoms. The # interpreter chooses one of them randomly, processes it, and # returns the result. Only the selected <li> atom is # processed. Non-<li> subatoms are ignored. listitems = [] for a in atom[2:]: if a[0] == 'li': listitems.append(a) # select and process a random listitem. random.shuffle(listitems) try: return self._processAtom(listitems[0], sessionID) except IndexError: # listitems is empty return "" | cdb5ca51cf362e7f41cc166060e200bc84fcb1e8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6428/cdb5ca51cf362e7f41cc166060e200bc84fcb1e8/Kernel.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2567,
8529,
12,
2890,
16,
3179,
16,
13737,
4672,
468,
8072,
9006,
912,
1245,
578,
1898,
411,
549,
34,
9006,
18,
225,
1021,
468,
16048,
24784,
281,
1245,
434,
2182,
20153,
16,
8488,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2567,
8529,
12,
2890,
16,
3179,
16,
13737,
4672,
468,
8072,
9006,
912,
1245,
578,
1898,
411,
549,
34,
9006,
18,
225,
1021,
468,
16048,
24784,
281,
1245,
434,
2182,
20153,
16,
8488,
... |
self.__save_stdout() try: self.cache = apt_pkg.GetCache() finally: self.__restore_stdout() | self.cache = apt_pkg.GetCache(OpProgress()) | def load(self): """ Regenerates the fake configuration and load the packages server. """ if self.loaded: return True apt_pkg.InitSystem() #print "Load:", self.status_dir shutil.rmtree(self.status_dir+'/apt/lists/') os.makedirs(self.status_dir+'/apt/lists/partial') sources_filename = self.status_dir+'/'+'apt/etc/sources.list' sources = open(sources_filename, 'w') sources_count = 0 self.packages.check_files() for f in self.packages: # we should probably clear old entries from self.packages and # take into account the recorded mtime as optimization filepath = self.packages[f] fake_uri='http://apt-dht/'+f if f.endswith('Sources'): source_line='deb-src '+dirname(fake_uri)+'/ /' else: source_line='deb '+dirname(fake_uri)+'/ /' listpath=(self.status_dir+'/apt/lists/' +apt_pkg.URItoFileName(fake_uri)) sources.write(source_line+'\n') log.msg("Sources line: " + source_line) sources_count = sources_count + 1 | 0ad382b9a8273617c2ee9891c77a2e3fb9d0f2bd /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/665/0ad382b9a8273617c2ee9891c77a2e3fb9d0f2bd/AptPackages.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1262,
12,
2890,
4672,
3536,
2526,
708,
815,
326,
10517,
1664,
471,
1262,
326,
5907,
1438,
18,
3536,
309,
365,
18,
4230,
30,
327,
1053,
279,
337,
67,
10657,
18,
2570,
3163,
1435,
468,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2890,
4672,
3536,
2526,
708,
815,
326,
10517,
1664,
471,
1262,
326,
5907,
1438,
18,
3536,
309,
365,
18,
4230,
30,
327,
1053,
279,
337,
67,
10657,
18,
2570,
3163,
1435,
468,
1... |
'backtrace']) | 'backtrace']) | def test_NULL_ptr(self): 'Ensure that a NULL PyObject* is handled gracefully' gdb_repr, gdb_output = ( self.get_gdb_repr('print 42', cmds_after_breakpoint=['set variable op=0', 'backtrace']) ) | abb1b1260395c6035f4ff47a82529a3c4d3d369c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3187/abb1b1260395c6035f4ff47a82529a3c4d3d369c/test_gdb.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
8560,
67,
6723,
12,
2890,
4672,
296,
12512,
716,
279,
3206,
4707,
921,
14,
353,
7681,
25063,
11,
314,
1966,
67,
12715,
16,
314,
1966,
67,
2844,
273,
261,
365,
18,
588,
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,
1842,
67,
8560,
67,
6723,
12,
2890,
4672,
296,
12512,
716,
279,
3206,
4707,
921,
14,
353,
7681,
25063,
11,
314,
1966,
67,
12715,
16,
314,
1966,
67,
2844,
273,
261,
365,
18,
588,
67,
... |
stopegy = 50.0*course.dist/game.optime | stopegy = 50.0*course.distance/game.optime | def no_quad_change(): # No quadrant change -- compute new average enemy distances game.quad[game.sector.i][game.sector.j] = game.ship if game.enemies: for enemy in game.enemies: finald = (w-enemy.kloc).distance() enemy.kavgd = 0.5 * (finald + enemy.kdist) enemy.kdist = finald game.enemies.sort(lambda x, y: cmp(x.kdist, y.kdist)) if not game.state.galaxy[game.quadrant.i][game.quadrant.j].supernova: attack(torps_ok=False) for enemy in game.enemies: enemy.kavgd = enemy.kdist newcnd() drawmaps(0) setwnd(message_window) | 9dc207eca02da44642a33bcd84cad07e3d574c93 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3176/9dc207eca02da44642a33bcd84cad07e3d574c93/sst.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1158,
67,
21733,
67,
3427,
13332,
468,
2631,
9474,
6890,
2549,
1493,
3671,
394,
8164,
570,
351,
93,
12491,
7920,
18,
21733,
63,
13957,
18,
5709,
280,
18,
77,
6362,
13957,
18,
5709,
280,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1158,
67,
21733,
67,
3427,
13332,
468,
2631,
9474,
6890,
2549,
1493,
3671,
394,
8164,
570,
351,
93,
12491,
7920,
18,
21733,
63,
13957,
18,
5709,
280,
18,
77,
6362,
13957,
18,
5709,
280,
... |
__version__='$Revision: 1.17 $'[11:-2] | __version__='$Revision: 1.18 $'[11:-2] | def taste(spam): "a favorable reviewer" return spam,'yum yum, I like ' + spam | dd8f0382d4a94b6d1ee97592d30969acccafcfcf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/dd8f0382d4a94b6d1ee97592d30969acccafcfcf/Publish.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
268,
14725,
12,
1752,
301,
4672,
315,
69,
18552,
429,
10725,
264,
6,
327,
24824,
11189,
93,
379,
677,
379,
16,
467,
3007,
296,
397,
24824,
225,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
268,
14725,
12,
1752,
301,
4672,
315,
69,
18552,
429,
10725,
264,
6,
327,
24824,
11189,
93,
379,
677,
379,
16,
467,
3007,
296,
397,
24824,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
file = open(filename) | try: file = open(filename) except IOError: return None | def synopsis(filename, cache={}): """Get the one-line summary out of a module file.""" mtime = os.stat(filename).st_mtime lastupdate, result = cache.get(filename, (0, None)) if lastupdate < mtime: info = inspect.getmoduleinfo(filename) file = open(filename) if info and 'b' in info[2]: # binary modules have to be imported try: module = imp.load_module('__temp__', file, filename, info[1:]) except: return None result = split(module.__doc__ or '', '\n')[0] del sys.modules['__temp__'] else: # text modules can be directly examined line = file.readline() while line[:1] == '#' or not strip(line): line = file.readline() if not line: break line = strip(line) if line[:4] == 'r"""': line = line[1:] if line[:3] == '"""': line = line[3:] if line[-1:] == '\\': line = line[:-1] while not strip(line): line = file.readline() if not line: break result = strip(split(line, '"""')[0]) else: result = None file.close() cache[filename] = (mtime, result) return result | 910c85f927547e89e28e2a4f520efb20056de06a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/910c85f927547e89e28e2a4f520efb20056de06a/pydoc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6194,
29522,
12,
3459,
16,
1247,
12938,
4672,
3536,
967,
326,
1245,
17,
1369,
4916,
596,
434,
279,
1605,
585,
12123,
13158,
273,
1140,
18,
5642,
12,
3459,
2934,
334,
67,
10838,
1142,
272... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6194,
29522,
12,
3459,
16,
1247,
12938,
4672,
3536,
967,
326,
1245,
17,
1369,
4916,
596,
434,
279,
1605,
585,
12123,
13158,
273,
1140,
18,
5642,
12,
3459,
2934,
334,
67,
10838,
1142,
272... |
raise ValueError, 'Position %d in menu already taken' % position | raise ValueError('Position %d in menu already taken' % position) | def addImageEntry(self, position, entry): """ Add the ImagingEntry entry to our menu """ assert(type(position) == int and position > 0) if position in self.menuitems: raise ValueError, 'Position %d in menu already taken' % position item = ImagingImageItem(entry) self.menuitems[position] = item | bbaae7b36f275dec72165d897802dd83d79bdc9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5988/bbaae7b36f275dec72165d897802dd83d79bdc9c/menu.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
2040,
1622,
12,
2890,
16,
1754,
16,
1241,
4672,
3536,
1436,
326,
2221,
5755,
1622,
1241,
358,
3134,
3824,
3536,
1815,
12,
723,
12,
3276,
13,
422,
509,
471,
1754,
405,
374,
13,
309... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
2040,
1622,
12,
2890,
16,
1754,
16,
1241,
4672,
3536,
1436,
326,
2221,
5755,
1622,
1241,
358,
3134,
3824,
3536,
1815,
12,
723,
12,
3276,
13,
422,
509,
471,
1754,
405,
374,
13,
309... |
_exithandlers = atexit._exithandlers atexit._exithandlers = [] | _exithandlers is traversed in reverse order so functions are executed last in, first out. """ while _exithandlers: func, targs, kargs = _exithandlers[-1] apply(func, targs, kargs) _exithandlers.remove(_exithandlers[-1]) | def handler2(*args, **kargs): print "handler2", args, kargs | 901b47b8cf3162cb062ae0268da0f00c375b5951 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/901b47b8cf3162cb062ae0268da0f00c375b5951/atexit.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1838,
22,
30857,
1968,
16,
2826,
79,
1968,
4672,
1172,
315,
4176,
22,
3113,
833,
16,
25916,
225,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1838,
22,
30857,
1968,
16,
2826,
79,
1968,
4672,
1172,
315,
4176,
22,
3113,
833,
16,
25916,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
self.layer.max_set(self.src_index, value.real) | self.max_adjustment.value = value.real | def entry_cb(self, entry, *args): if self.updating: 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,
1241,
67,
7358,
12,
2890,
16,
1241,
16,
380,
1968,
4672,
309,
365,
18,
5533,
1776,
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,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1241,
67,
7358,
12,
2890,
16,
1241,
16,
380,
1968,
4672,
309,
365,
18,
5533,
1776,
30,
327,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
'extended39': lambda x: code39.Extended39(x, **args), 'extended93': lambda x: code93.Extended93(x, **args), | 'extended39': lambda x: code39.Extended39(str(x), **args), 'extended93': lambda x: code93.Extended93(str(x), **args), | def _flowable(self, node, extra_style=None): if node.tag=='pto': return self._pto(node) if node.tag=='para': style = self.styles.para_style_get(node) if extra_style: style.__dict__.update(extra_style) result = [] for i in self._textual(node).split('\n'): result.append(platypus.Paragraph(i, style, **(utils.attr_get(node, [], {'bulletText':'str'})))) return result elif node.tag=='barCode': try: from reportlab.graphics.barcode import code128 from reportlab.graphics.barcode import code39 from reportlab.graphics.barcode import code93 from reportlab.graphics.barcode import common from reportlab.graphics.barcode import fourstate from reportlab.graphics.barcode import usps except Exception, e: self._logger.warning("Cannot use barcode renderers:", exc_info=True) return None args = utils.attr_get(node, [], {'ratio':'float','xdim':'unit','height':'unit','checksum':'int','quiet':'int','width':'unit','stop':'bool','bearers':'int','barWidth':'float','barHeight':'float'}) codes = { 'codabar': lambda x: common.Codabar(x, **args), 'code11': lambda x: common.Code11(x, **args), 'code128': lambda x: code128.Code128(x, **args), 'standard39': lambda x: code39.Standard39(x, **args), 'standard93': lambda x: code93.Standard93(x, **args), 'i2of5': lambda x: common.I2of5(x, **args), 'extended39': lambda x: code39.Extended39(x, **args), 'extended93': lambda x: code93.Extended93(x, **args), 'msi': lambda x: common.MSI(x, **args), 'fim': lambda x: usps.FIM(x, **args), 'postnet': lambda x: usps.POSTNET(x, **args), } code = 'code128' if node.get('code'): code = node.get('code').lower() return codes[code](self._textual(node)) elif node.tag=='name': self.styles.names[ node.get('id')] = node.get('value') return None elif node.tag=='xpre': style = self.styles.para_style_get(node) return platypus.XPreformatted(self._textual(node), style, **(utils.attr_get(node, [], {'bulletText':'str','dedent':'int','frags':'int'}))) elif node.tag=='pre': style = self.styles.para_style_get(node) return platypus.Preformatted(self._textual(node), style, **(utils.attr_get(node, [], {'bulletText':'str','dedent':'int'}))) elif node.tag=='illustration': return self._illustration(node) elif node.tag=='blockTable': return self._table(node) elif node.tag=='title': styles = reportlab.lib.styles.getSampleStyleSheet() style = styles['Title'] return platypus.Paragraph(self._textual(node), style, **(utils.attr_get(node, [], {'bulletText':'str'}))) elif re.match('^h([1-9]+[0-9]*)$', (node.tag or '')): styles = reportlab.lib.styles.getSampleStyleSheet() style = styles['Heading'+str(node.tag[1:])] return platypus.Paragraph(self._textual(node), style, **(utils.attr_get(node, [], {'bulletText':'str'}))) elif node.tag=='image': image_data = False if not node.get('file'): if node.get('name'): if node.get('name') in self.doc.images: self._logger.debug("Image %s read ", node.get('name')) image_data = self.doc.images[node.get('name')].read() else: self._logger.warning("Image %s not defined", node.get('name')) return False else: import base64 if self.localcontext: newtext = utils._process_text(self, node.text or '') node.text = newtext image_data = base64.decodestring(node.text) if not image_data: self._logger.debug("No inline image data") return False image = StringIO(image_data) else: self._logger.debug("Image get from file %s", node.get('file')) image = _open_image(node.get('file'), path=self.doc.path) return platypus.Image(image, mask=(250,255,250,255,250,255), **(utils.attr_get(node, ['width','height']))) elif node.tag=='spacer': if node.get('width'): width = utils.unit_get(node.get('width')) else: width = utils.unit_get('1cm') length = utils.unit_get(node.get('length')) return platypus.Spacer(width=width, height=length) elif node.tag=='section': return self.render(node) elif node.tag == 'pageNumberReset': return PageReset() elif node.tag in ('pageBreak', 'nextPage'): return platypus.PageBreak() elif node.tag=='condPageBreak': return platypus.CondPageBreak(**(utils.attr_get(node, ['height']))) elif node.tag=='setNextTemplate': return platypus.NextPageTemplate(str(node.get('name'))) elif node.tag=='nextFrame': return platypus.CondPageBreak(1000) # TODO: change the 1000 ! elif node.tag == 'setNextFrame': from reportlab.platypus.doctemplate import NextFrameFlowable return NextFrameFlowable(str(node.get('name'))) elif node.tag == 'currentFrame': from reportlab.platypus.doctemplate import CurrentFrameFlowable return CurrentFrameFlowable(str(node.get('name'))) elif node.tag == 'frameEnd': return EndFrameFlowable() elif node.tag == 'hr': width_hr=node.get('width') or '100%' color_hr=node.get('color') or 'black' thickness_hr=node.get('thickness') or 1 lineCap_hr=node.get('lineCap') or 'round' return platypus.flowables.HRFlowable(width=width_hr,color=color.get(color_hr),thickness=float(thickness_hr),lineCap=str(lineCap_hr)) else: sys.stderr.write('Warning: flowable not yet implemented: %s !\n' % (node.tag,)) return None | 38cb77aa69966a37db54a1833bebc80f3233e114 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12853/38cb77aa69966a37db54a1833bebc80f3233e114/trml2pdf.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2426,
429,
12,
2890,
16,
756,
16,
2870,
67,
4060,
33,
7036,
4672,
309,
756,
18,
2692,
18920,
21910,
4278,
327,
365,
6315,
21910,
12,
2159,
13,
309,
756,
18,
2692,
18920,
25072,
42... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2426,
429,
12,
2890,
16,
756,
16,
2870,
67,
4060,
33,
7036,
4672,
309,
756,
18,
2692,
18920,
21910,
4278,
327,
365,
6315,
21910,
12,
2159,
13,
309,
756,
18,
2692,
18920,
25072,
42... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.