rem stringlengths 1 226k | add stringlengths 0 227k | context stringlengths 6 326k | meta stringlengths 143 403 | input_ids listlengths 256 256 | attention_mask listlengths 256 256 | labels listlengths 128 128 |
|---|---|---|---|---|---|---|
param = query.__param_tuple__ | def display_properties(self, properties=None, layout='circular', query=None, graph6=None, \ num_vertices=None, num_edges=None, num_cycles=None, num_hamiltonian_cycles=None, \ eulerian=None, planar=None, perfect=None, lovasz_number=None, \ complement_graph6=None, aut_grp_size=None, num_orbits=None, \ num_fixed_points=None, vertex_transitive=None, edge_transitive=None, \ degree_sequence=None, min_degree=None, max_degree=None, \ average_degree=None, degrees_sd=None, regular=None, \ vertex_connectivity=None, edge_connectivity=None, \ num_components=None, girth=None, radius=None, diameter=None, \ clique_number=None, independence_number=None, num_cut_vertices=None, \ min_vertex_cover_size=None, num_spanning_trees=None, \ induced_subgraphs=None, spectrum=None, min_eigenvalue=None, \ max_eigenvalue=None, eigenvalues_sd=None, energy=None): r""" Displays the results of a query in a table, including all specified properties and an image for each graph. INPUT: query -- (String) A sqlite query for graphs.db (See examples below). The query string currently must lower case and begin with: 'SELECT graph_data.graph6' properties -- (List) A list of strings that are the exact name (as the following parameters) of the properties to display with the results. layout -- (String) The layout option for the graph image. Options include: 'circular' -- plots the graph with vertices evenly distributed on a circle 'spring' -- uses the traditional spring layout aut_grp_size -- (Integer) The desired size of the automorphism group. (List) Format: [<String>,<Integer>] WHERE the first entry represents an inequality: '=','>','<','>=','<=' average_degree -- (Real) The desired average degree. (List) Format: [<String>,<Real>] WHERE the first entry represents an inequality: '=','>','<','>=','<=' clique_number -- (Integer) The desired clique number. (List) Format: [<String>,<Integer>] WHERE the first entry represents an inequality: '=','>','<','>=','<=' complement_graph6 -- (String) A graph6 string isomorphic to the desired complement graph. (List) A list of graph6 strings. Will search for graphs with complement isomorphic to any string in the list. degree_sequence -- (Integer) The desired sequence of degrees. (Ordered highest to lowest). degrees_sd -- (Real) The desired standard deviation of degrees. (List) Format: [<String>,<Real>] WHERE the first entry represents an inequality: '=','>','<','>=','<=' diameter -- (Real) The desired diameter. (List) Format: [<String>,<Real>] WHERE the first entry represents an inequality: '=','>','<','>=','<=' edge_connectivity -- (Integer) The desired edge connectivity. (List) Format: [<String>,<Integer>] WHERE the first entry represents an inequality: '=','>','<','>=','<=' edge_transitive -- (Boolean) eigenvalues_sd -- (Real) The desired standard deviation of eigenvalues. (List) Format: [<String>,<Real>] WHERE the first entry represents an inequality: '=','>','<','>=','<=' energy -- (Real) The desired energy. (List) Format: [<String>,<Real>] WHERE the first entry represents an inequality: '=','>','<','>=','<=' eulerian -- (Boolean) girth -- (Integer) The desired girth. (List) Format: [<String>,<Integer>] WHERE the first entry represents an inequality: '=','>','<','>=','<=' graph6 -- (String) A graph6 string isomorphic to the desired graph. (List) A list of graph6 strings. Will search for graphs isomorphic to any string in the list. independence_number -- (Integer) The desired independence number. (List) Format: [<String>,<Integer>] WHERE the first entry represents an inequality: '=','>','<','>=','<=' induced_subgraphs -- (String) graph6 string isomorphic to desired subgraph. (List) Format options: 1. ['one_of',<String>,...,<String>] Will search for graphs containing a subgraph isomorphic to any of the graph6 strings in the list. 2. ['all_of',<String>,...,<String>] Will search for graphs containing a subgraph isomorphic to each of the graph6 strings in the list. lovasz_number -- (Real) The desired lovasz number. (List) Format: [<String>,<Real>] WHERE the first entry represents an inequality: '=','>','<','>=','<=' max_degree -- (Integer) The desired maximum degree. (List) Format: [<String>,<Integer>] WHERE the first entry represents an inequality: '=','>','<','>=','<=' max_eigenvalue -- (Real) The desired maximum eigenvalue. (List) Format: [<String>,<Real>] WHERE the first entry represents an inequality: '=','>','<','>=','<=' min_degree -- (Integer) The desired minimum degree. (List) Format: [<String>,<Integer>] WHERE the first entry represents an inequality: '=','>','<','>=','<=' min_eigenvalue -- (Real) The desired minimum eigenvalue. (List) Format: [<String>,<Real>] WHERE the first entry represents an inequality: '=','>','<','>=','<=' min_vertex_cover_size -- (Integer) The desired minimum vertex cover size. (List) Format: [<String>,<Integer>] WHERE the first entry represents an inequality: '=','>','<','>=','<=' num_components -- (Integer) The desired number of components. (List) Format: [<String>,<Integer>] WHERE the first entry represents an inequality: '=','>','<','>=','<=' num_cut_vertices -- (Integer) The desired number of cut vertices. (List) Format: [<String>,<Integer>] WHERE the first entry represents an inequality: '=','>','<','>=','<=' num_cycles -- (Integer) The desired number of cycles. (List) Format: [<String>,<Integer>] WHERE the first entry represents an inequality: '=','>','<','>=','<=' num_edges -- (Integer) The desired number of edges. (List) Format: [<String>,<Integer>] WHERE the first entry represents an inequality: '=','>','<','>=','<=' num_fixed_points -- (Integer) The desired number of fixed points. (List) Format: [<String>,<Integer>] WHERE the first entry represents an inequality: '=','>','<','>=','<=' num_hamiltonian_cycles -- (Integer) The desired number of hamiltonian cycles. (List) Format: [<String>,<Integer>] WHERE the first entry represents an inequality: '=','>','<','>=','<=' num_orbits -- (Integer) The desired number of orbits. (List) Format: [<String>,<Integer>] WHERE the first entry represents an inequality: '=','>','<','>=','<=' num_spanning_trees -- (Integer) The desired number of spanning trees. (List) Format: [<String>,<Integer>] WHERE the first entry represents an inequality: '=','>','<','>=','<=' num_vertices -- (Integer) The desired number of vertices. (List) Format: [<String>,<Integer>] WHERE the first entry represents an inequality: '=','>','<','>=','<=' perfect -- (Boolean) planar -- (Boolean) radius -- (Integer) The desired radius. (List) Format: [<String>,<Integer>] WHERE the first entry represents an inequality: '=','>','<','>=','<=' regular -- (Boolean) spectrum -- (String) The desired spectrum. (Ordered highest to lowest, delimited by ', ' and rounded to 6 decimal places). vertex_connectivity -- (Integer) The desired vertex connectivity. (List) Format: [<String>,<Integer>] WHERE the first entry represents an inequality: '=','>','<','>=','<=' vertex_transitive -- (Boolean) EXAMPLES: The basics: sage.: graphs_query.display_properties(properties=['num_vertices','lovasz_number',\ ... 'girth','radius','diameter'], num_vertices=5,\ ... lovasz_number=3.0, girth=4, radius=2, diameter=3) sage.: graphs_query.display_properties(properties=['num_hamiltonian_cycles','regular',\ ... 'perfect','num_cycles','num_edges','spectrum'], \ ... layout='spring', num_hamiltonian_cycles=2,\ ... regular=True, perfect=False) sage.: graphs_query.display_properties(properties=['min_degree','max_degree',\ ... 'degrees_sd','average_degree','regular',\ ... 'induced_subgraphs'],layout='spring',\ ... degree_sequence=433211) Using Inequalities: sage.: graphs_query.display_properties(properties=['energy','spectrum','eigenvalues_sd',\ ... 'complement_graph6'], layout='circular', \ ... min_eigenvalue=['=',-1], eigenvalues_sd=['<=',1], \ ... energy=['>',5]) The query string: sage.: graphs_query.display_properties(properties=['eulerian','perfect','planar','regular',\ ... 'edge_transitive','vertex_transitive','num_cycles','degree_sequence',\ ... 'induced_subgraphs','num_vertices','max_degree'], layout='spring', \ ... query='SELECT graph_data.graph6 \ ... FROM graph_data WHERE num_vertices<=4 \ ... and num_edges>3') sage.: graphs_query.display_properties(query='SELECT graph_data.graph6 FROM graph_data \ ... INNER JOIN degrees on graph_data.graph_id=degrees.graph_id \ ... WHERE num_vertices>6 and eulerian=1 and regular=0 and planar=1 \ ... and num_cycles<=2', properties=['clique_number','independence_number']) sage.: graphs_query.display_properties(query="SELECT graph_data.graph6 \ ... FROM graph_data INNER JOIN misc on \ ... misc.graph_id=graph_data.graph_id WHERE \ ... misc.induced_subgraphs regexp '.*E~~w.*'", \ ... properties=['induced_subgraphs']) """ from sage.plot.plot import plot | eff23c93d1a7100c66dd3933d688f81e84b5bffd /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/eff23c93d1a7100c66dd3933d688f81e84b5bffd/graph_database.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2562,
67,
4738,
12,
2890,
16,
1790,
33,
7036,
16,
3511,
2218,
11614,
9559,
2187,
843,
33,
7036,
16,
2667,
26,
33,
7036,
16,
521,
818,
67,
17476,
33,
7036,
16,
818,
67,
8746,
33,
7036... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2562,
67,
4738,
12,
2890,
16,
1790,
33,
7036,
16,
3511,
2218,
11614,
9559,
2187,
843,
33,
7036,
16,
2667,
26,
33,
7036,
16,
521,
818,
67,
17476,
33,
7036,
16,
818,
67,
8746,
33,
7036... | |
writer = io.StringIO(encoding=encoding) | use_encoding = "utf-8" if encoding is None else encoding writer = io.StringIO(encoding=use_encoding) | def toprettyxml(self, indent="\t", newl="\n", encoding=None): # indent = the indentation string to prepend, per level # newl = the newline string to append writer = io.StringIO(encoding=encoding) if self.nodeType == Node.DOCUMENT_NODE: # Can pass encoding only to document, to put it into XML header self.writexml(writer, "", indent, newl, encoding) else: self.writexml(writer, "", indent, newl) if encoding is None: return writer.getvalue() else: return writer.buffer.getvalue() | 1db07efeadb72a42f142fcce25692aa3a036b146 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12029/1db07efeadb72a42f142fcce25692aa3a036b146/minidom.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
358,
19073,
2902,
12,
2890,
16,
3504,
1546,
64,
88,
3113,
394,
80,
1546,
64,
82,
3113,
2688,
33,
7036,
4672,
468,
3504,
273,
326,
12018,
533,
358,
8254,
16,
1534,
1801,
468,
394,
80,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
358,
19073,
2902,
12,
2890,
16,
3504,
1546,
64,
88,
3113,
394,
80,
1546,
64,
82,
3113,
2688,
33,
7036,
4672,
468,
3504,
273,
326,
12018,
533,
358,
8254,
16,
1534,
1801,
468,
394,
80,
... |
avg = sum(diskFree)/len(diskFree) avgp = 100 * avg / diskTotal[0] | avg = round(sum(diskFree)/len(diskFree), 2) avgp = round(100 * avg / diskTotal[0], 2) | def get_graph(self, end_date, report_days, host=None, user=None, email=None): if email or host or user: return None | 76334c6b3cd698e75ba1c275cbedf6be7e3e6aea /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/87/76334c6b3cd698e75ba1c275cbedf6be7e3e6aea/untangle_server.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
4660,
12,
2890,
16,
679,
67,
712,
16,
2605,
67,
9810,
16,
1479,
33,
7036,
16,
729,
33,
7036,
16,
2699,
33,
7036,
4672,
309,
2699,
578,
1479,
578,
729,
30,
327,
599,
2,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
4660,
12,
2890,
16,
679,
67,
712,
16,
2605,
67,
9810,
16,
1479,
33,
7036,
16,
729,
33,
7036,
16,
2699,
33,
7036,
4672,
309,
2699,
578,
1479,
578,
729,
30,
327,
599,
2,
-10... |
nslist = [inst['Name'] for inst in nsinsts] | nslist = [inst['Name'].strip('/') for inst in nsinsts] | def EnumNamespaces(req, url): conn = _frontMatter(req, url, '') nsinsts = [] try: for nsclass in ['CIM_Namespace', '__Namespace']: for interopns in ['Interop', 'interop', 'root', 'root/cimv2']: try: nsinsts = conn.EnumerateInstanceNames(nsclass, namespace = interopns) except pywbem.cim_http.AuthError, arg: raise apache.SERVER_RETURN, apache.HTTP_UNAUTHORIZED except pywbem.CIMError, arg: if arg[0] in [pywbem.CIM_ERR_INVALID_NAMESPACE, pywbem.CIM_ERR_NOT_SUPPORTED, pywbem.CIM_ERR_INVALID_CLASS]: continue else: raise if len(nsinsts) == 0: continue break if len(nsinsts) == 0: continue break except pywbem.CIMError, arg: ht = _printHead('Error') details = _code2string(arg[0]) ht+= '<i>'+details[0]+': '+details[1]+': '+cgi.escape(arg[1])+'</i>' return ht + '</body></html>' ht = _printHead('Namespaces','CIM Namespaces in '+url, req) if len(nsinsts) == 0: ht+= '<h1>Error</h1>' ht+= 'Unable to enumerate Namespaces. Return to the ' ht+= '<a href="'+_baseScript(req)+'">Login page</a> and specify a ' ht+= 'Namespace.' if req.conn.last_reply is not None: ht+= '<pre>'+cgi.escape(req.conn.last_reply)+'</pre>' return ht + '</body></html>' urlargs = {} urlargs['url'] = url nslist = [inst['Name'] for inst in nsinsts] if interopns not in nslist: # Pegasus didn't get the memo that namespaces aren't hierarchical # This will fall apart if there exists a namespace # <interopns>/<interopns> # Maybe we should check the Server: HTTP header instead. nslist = [interopns+'/'+subns for subns in nslist] nslist.append(interopns) nslist.sort() nsd = None if 'root/PG_InterOp' in nslist: nsd = dict([(x, 0) for x in nslist]) caps = conn.EnumerateInstances('PG_ProviderCapabilities', namespace='root/PG_InterOp', PropertyList=['Namespaces']) for cap in caps: for _ns in cap['Namespaces']: try: nsd[_ns] += 1 except KeyError: pass ht+= '<table border=0>' for nsname in nslist: urlargs['ns'] = nsname urlargs['instOnly'] = 'false' ht+= '<tr><td>'+_makeHref(req, 'EnumClassNames', urlargs, nsname) ht+= '</td><td> ' if nsd and nsd[nsname] > 0: urlargs['instOnly'] = 'true' ht+= _makeHref(req, 'EnumClassNames', urlargs, '%s Instrumented Classes' % nsd[nsname]) ht+= '</td></tr>' ht+= '</table>' return ht + '</body></html>' | 24574ed02a4b3e4d6c5c7556ecdd9fccf443fb74 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1450/24574ed02a4b3e4d6c5c7556ecdd9fccf443fb74/yawn.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6057,
13180,
12,
3658,
16,
880,
4672,
1487,
273,
389,
10211,
49,
9293,
12,
3658,
16,
880,
16,
28707,
3153,
8591,
87,
273,
5378,
775,
30,
364,
290,
1017,
459,
316,
10228,
39,
3445,
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,
6057,
13180,
12,
3658,
16,
880,
4672,
1487,
273,
389,
10211,
49,
9293,
12,
3658,
16,
880,
16,
28707,
3153,
8591,
87,
273,
5378,
775,
30,
364,
290,
1017,
459,
316,
10228,
39,
3445,
67,
... |
if dir.find(sysdir + '/') == 0: | if dir.startswith(sysdir + '/'): | def check(self, pkg): | 751ad2065972e4fb64b6d623b68426f04b14bc0a /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/10341/751ad2065972e4fb64b6d623b68426f04b14bc0a/LibraryPolicyCheck.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
12,
2890,
16,
3475,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
12,
2890,
16,
3475,
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... |
'iclass=%s'%wins[0].get_class_group.get_res_class()) | 'iclass=%s'%wins[0].get_class_group().get_res_class()) | def action_compiz_scale_windows(self, widget, event): wins = self.get_unminimized_windows() if not wins: return print len(wins) if len(wins) == 1: self.windows[wins[0]].action_select_window(widget, event) return if self.globals.settings['show_only_current_desktop']: path = 'scale/allscreens/initiate_key' else: path = 'scale/allscreens/initiate_all_key' try: compiz_call(path, 'activate','root', self.root_xid,'match', \ 'iclass=%s'%wins[0].get_class_group.get_res_class()) except: return # A new button enter signal is sent when compiz is called, # a delay is therefor needed. gobject.timeout_add(self.globals.settings['popup_delay'] + 200, self.hide_list) | 8e00a7e5b5b3c89cce94ef2f6ad5d6e30282f889 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7075/8e00a7e5b5b3c89cce94ef2f6ad5d6e30282f889/groupbutton.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1301,
67,
2919,
452,
67,
5864,
67,
13226,
12,
2890,
16,
3604,
16,
871,
4672,
31307,
273,
365,
18,
588,
67,
318,
1154,
381,
1235,
67,
13226,
1435,
309,
486,
31307,
30,
327,
1172,
562,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1301,
67,
2919,
452,
67,
5864,
67,
13226,
12,
2890,
16,
3604,
16,
871,
4672,
31307,
273,
365,
18,
588,
67,
318,
1154,
381,
1235,
67,
13226,
1435,
309,
486,
31307,
30,
327,
1172,
562,
... |
MAXVERSIONS = [("MAX5", "SOFTWARE\\Autodesk\\3DSMAX\\5.0\\MAX-1:409", "uninstallpath", "Cstudio\\Sdk"), ("MAX6", "SOFTWARE\\Autodesk\\3DSMAX\\6.0", "installdir", "maxsdk\\cssdk\\include"), ("MAX7", "SOFTWARE\\Autodesk\\3DSMAX\\7.0", "Installdir", "maxsdk\\include\\CS")] for version,key1,key2,subdir in MAXVERSIONS: | MAXVERSIONINFO = [("MAX6", "SOFTWARE\\Autodesk\\3DSMAX\\6.0", "installdir", "maxsdk\\cssdk\\include"), ("MAX7", "SOFTWARE\\Autodesk\\3DSMAX\\7.0", "Installdir", "maxsdk\\include\\CS"), ("MAX8", "SOFTWARE\\Autodesk\\3DSMAX\\8.0", "Installdir", "maxsdk\\include\\CS"), ] for version,key1,key2,subdir in MAXVERSIONINFO: | def parseopts(args): global COMPILER,OPTIMIZE,OMIT,INSTALLER,GENMAN,SLAVEBUILD global VERSION,COMPRESSOR,DIRECTXSDK,VERBOSE,SLAVEFILE,THREADCOUNT longopts = [ "help","package-info","compiler=","directx-sdk=","slavebuild=", "optimize=","everything","nothing","installer","quiet","verbose", "version=","lzma","no-python","slaves=","threads="] anything = 0 for pkg in PACKAGES: longopts.append("no-"+pkg.lower()) for pkg in PACKAGES: longopts.append("use-"+pkg.lower()) try: opts, extras = getopt.getopt(args, "", longopts) for option,value in opts: if (option=="--help"): raise "usage" elif (option=="--package-info"): raise "package-info" elif (option=="--compiler"): COMPILER=value elif (option=="--directx-sdk"): DIRECTXSDK=value elif (option=="--optimize"): OPTIMIZE=value elif (option=="--quiet"): VERBOSE-=1 elif (option=="--verbose"): VERBOSE+=1 elif (option=="--installer"): INSTALLER=1 elif (option=="--genman"): GENMAN=1 elif (option=="--everything"): OMIT=[] elif (option=="--nothing"): OMIT=PACKAGES[:] elif (option=="--slaves"): SLAVEFILE=value elif (option=="--threads"): THREADCOUNT=int(value) elif (option=="--slavebuild"): SLAVEBUILD=value elif (option=="--version"): VERSION=value if (len(VERSION.split(".")) != 3): raise "usage" elif (option=="--lzma"): COMPRESSOR="lzma" else: for pkg in PACKAGES: if (option=="--use-"+pkg.lower()): if (OMIT.count(pkg)): OMIT.remove(pkg) break for pkg in PACKAGES: if (option=="--no-"+pkg.lower()): if (OMIT.count(pkg)==0): OMIT.append(pkg) break anything = 1 except "package-info": packageInfo() except: usage(0) if (anything==0): usage(0) if (OPTIMIZE=="1"): OPTIMIZE=1 elif (OPTIMIZE=="2"): OPTIMIZE=2 elif (OPTIMIZE=="3"): OPTIMIZE=3 elif (OPTIMIZE=="4"): OPTIMIZE=4 else: usage("Invalid setting for OPTIMIZE") if (COMPILERS.count(COMPILER)==0): usage("Invalid setting for COMPILER: "+COMPILER) | c92b9d824116f0d2cc2e67ded17a2f353593d4fb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8543/c92b9d824116f0d2cc2e67ded17a2f353593d4fb/makepanda.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
4952,
12,
1968,
4672,
2552,
5423,
1102,
14668,
16,
15620,
3445,
15641,
16,
1872,
1285,
16,
28865,
654,
16,
16652,
9560,
16,
55,
2534,
3412,
20215,
2552,
8456,
16,
4208,
22526,
916,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
4952,
12,
1968,
4672,
2552,
5423,
1102,
14668,
16,
15620,
3445,
15641,
16,
1872,
1285,
16,
28865,
654,
16,
16652,
9560,
16,
55,
2534,
3412,
20215,
2552,
8456,
16,
4208,
22526,
916,
... |
if for_stat == True: | if for_stat: | def _genCacheOpcodes(self, fusepath, for_stat=False): ''' Method encapsulating cache operations and determination of whether or not to use a cached copy, an nfs copy, update the cache, or raise an enoent. | a6d9cd0d8a6113b58070216ec182ebfa2f368118 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10739/a6d9cd0d8a6113b58070216ec182ebfa2f368118/cachemanager.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
4507,
1649,
51,
18108,
12,
2890,
16,
19552,
803,
16,
364,
67,
5642,
33,
8381,
4672,
9163,
2985,
22106,
27967,
1247,
5295,
471,
6328,
367,
434,
2856,
578,
486,
358,
999,
279,
3472,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
4507,
1649,
51,
18108,
12,
2890,
16,
19552,
803,
16,
364,
67,
5642,
33,
8381,
4672,
9163,
2985,
22106,
27967,
1247,
5295,
471,
6328,
367,
434,
2856,
578,
486,
358,
999,
279,
3472,
... |
if not parsed: print "SHELL: D'oh! The .bb files haven't been parsed yet. Next time call 'parse' before building stuff. This time I'll do it for 'ya." self.parse( None ) | self._checkParsed() | def which( self, params ): """Computes the providers for a given providee""" item = params[0] | d0f9b4561cda2df828b4828cd97f219bd81e6c59 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2672/d0f9b4561cda2df828b4828cd97f219bd81e6c59/shell.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1492,
12,
365,
16,
859,
262,
30,
3536,
10743,
326,
9165,
364,
279,
864,
5615,
73,
8395,
761,
273,
859,
63,
20,
65,
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,
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,
1492,
12,
365,
16,
859,
262,
30,
3536,
10743,
326,
9165,
364,
279,
864,
5615,
73,
8395,
761,
273,
859,
63,
20,
65,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
gap.eval('RequirePackage("HAP")') | load_hap() | def homology(self, n, p = 0): r""" Computes the group homology $H_n(G, F)$, where $F = Z$ if $p=0$ and $F = Z/pZ$ if $p >0$ is a prime. Wraps HAP's GroupHomology function, written by Graham Ellis. | f94ee0fd2259e59f9680be18b9e7c8204f75ddc9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/f94ee0fd2259e59f9680be18b9e7c8204f75ddc9/permgroup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13995,
4676,
12,
2890,
16,
290,
16,
293,
273,
374,
4672,
436,
8395,
14169,
281,
326,
1041,
13995,
4676,
271,
44,
67,
82,
12,
43,
16,
478,
21877,
16,
1625,
271,
42,
273,
2285,
8,
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,
13995,
4676,
12,
2890,
16,
290,
16,
293,
273,
374,
4672,
436,
8395,
14169,
281,
326,
1041,
13995,
4676,
271,
44,
67,
82,
12,
43,
16,
478,
21877,
16,
1625,
271,
42,
273,
2285,
8,
309,... |
subject = descr_lines[0] while pos < end and descr_lines[pos] == '': | while pos < end: | def __parse_description(descr): """Parse the patch description and return the new description and author information (if any). """ subject = body = '' authname = authemail = None descr_lines = [line.strip() for line in descr.split('\n')] if not descr_lines: raise CmdException, "Empty patch description" pos = 1 end = len(descr_lines) # get the subject subject = descr_lines[0] # ignore the empty lines after subject while pos < end and descr_lines[pos] == '': pos += 1 # check for a "From:" line if pos < end and re.match('from:\s+', descr_lines[pos], re.I): auth = re.findall('^.*?:\s+(.*)$', descr_lines[pos])[0] authname, authemail = name_email(auth) pos += 1 # ignore the empty lines while pos < end and descr_lines[pos] == '': pos += 1 # get the body body = reduce(lambda x, y: x + '\n' + y, descr_lines[pos:], '').strip() return (subject + '\n\n' + body, authname, authemail) | 0543bc5f5a7aa71bcb94062fc3ce019f4d274f1d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12366/0543bc5f5a7aa71bcb94062fc3ce019f4d274f1d/imprt.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2670,
67,
3384,
12,
28313,
4672,
3536,
3201,
326,
4729,
2477,
471,
327,
326,
394,
2477,
471,
2869,
1779,
261,
430,
1281,
2934,
3536,
3221,
273,
1417,
273,
875,
1357,
529,
273,
1357... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2670,
67,
3384,
12,
28313,
4672,
3536,
3201,
326,
4729,
2477,
471,
327,
326,
394,
2477,
471,
2869,
1779,
261,
430,
1281,
2934,
3536,
3221,
273,
1417,
273,
875,
1357,
529,
273,
1357... |
tempProj = proj[:i] + rev + proj[j:] | tempProj = proj[:i+1] + rev + proj[j+1:] | def fixIntersectingPairs(proj, projVal, attrInfo): changed = 1 while changed: changed = 0 for i in range(len(projVal)-1): if changed: continue for j in range(i+2, len(projVal)-1): if changed: continue val1, exists1 = getAttributePairValue(proj[i], proj[j], attrInfo) val2, exists2 = getAttributePairValue(proj[i+1], proj[j+1], attrInfo) if exists1 and exists2 and (val1 + val2 > projVal[i] + projVal[j]): projVal[i] = val1 projVal[j] = val2 rev = proj[i:j] rev.reverse() tempProj = proj[:i] + rev + proj[j:] proj = tempProj changed = 1 # we rotated the projection. start checking from the begining return proj, projVal | 6b4362052758b6cff2c7ba5d483e9157a64e8be1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6366/6b4362052758b6cff2c7ba5d483e9157a64e8be1/OWVisAttrSelection.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2917,
22541,
310,
10409,
12,
17995,
16,
10296,
3053,
16,
1604,
966,
4672,
3550,
273,
404,
1323,
3550,
30,
3550,
273,
374,
364,
277,
316,
1048,
12,
1897,
12,
17995,
3053,
24950,
21,
4672,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2917,
22541,
310,
10409,
12,
17995,
16,
10296,
3053,
16,
1604,
966,
4672,
3550,
273,
404,
1323,
3550,
30,
3550,
273,
374,
364,
277,
316,
1048,
12,
1897,
12,
17995,
3053,
24950,
21,
4672,... |
getRecipeStores = os.popen("/bin/sh -c '. " + file +" 2> /dev/null; for i in \"${getRecipeStores[@]}\"; do echo $i; done'").read().strip('\n').split('\n') | getRecipeStores = os.popen("/bin/bash -c '. " + file +" 2> /dev/null; for i in \"${getRecipeStores[@]}\"; do echo $i; done'").read().strip('\n').split('\n') | def getCompileOptions() : import os goboUserSettings = getGoboVariable('goboUserSettings') goboSettings = getGoboVariable('goboSettings') goboPrograms = getGoboVariable('goboPrograms') goboCompileDefaults = goboPrograms+'/Compile/Current/Resources/Defaults/Settings/' compileSettingsFiles = [ goboUserSettings + "/Compile/Compile.conf", goboSettings + "/Compile/Compile.conf", goboCompileDefaults+"/Compile/Compile.conf" ] try : compileRecipeDirs = os.environ['compileRecipeDirs'].strip('\n').split() except : for file in compileSettingsFiles : compileRecipeDirs = os.popen("/bin/sh -c '. " +file+" 2> /dev/null; for i in \"${compileRecipeDirs[@]}\"; do echo $i; done'").read().strip('\n').split('\n') if compileRecipeDirs and compileRecipeDirs[0] : break try : getRecipeStores = os.environ['getRecipeStores'].strip('\n').split('\n') except : for file in compileSettingsFiles : getRecipeStores = os.popen("/bin/sh -c '. " + file +" 2> /dev/null; for i in \"${getRecipeStores[@]}\"; do echo $i; done'").read().strip('\n').split('\n') if getRecipeStores and getRecipeStores[0] : break #import sys #sys.stderr.write(str(compileRecipeDirs)) #sys.stderr.write(str(getRecipeStores)) import os.path return (map(os.path.expanduser,compileRecipeDirs), getRecipeStores) | e668b5802456f5dcdab7591814f8c4cc25c74d98 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5186/e668b5802456f5dcdab7591814f8c4cc25c74d98/PythonUtils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
9937,
1320,
1435,
294,
1930,
1140,
225,
20062,
83,
1299,
2628,
273,
7162,
947,
83,
3092,
2668,
75,
947,
83,
1299,
2628,
6134,
20062,
83,
2628,
273,
7162,
947,
83,
3092,
2668,
75,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
9937,
1320,
1435,
294,
1930,
1140,
225,
20062,
83,
1299,
2628,
273,
7162,
947,
83,
3092,
2668,
75,
947,
83,
1299,
2628,
6134,
20062,
83,
2628,
273,
7162,
947,
83,
3092,
2668,
75,
... |
gc.disable() | def choose_image_update2(self): gc.disable() self.stop_art_update = False # Retrieve all images from amazon: artist_search = self.remote_artistentry.get_text() album_search = self.remote_albumentry.get_text() if len(artist_search) == 0 and len(album_search) == 0: gobject.idle_add(self.choose_image_no_artist_or_album_dialog) return filename = os.path.expanduser("~/.covers/temp/<imagenum>.jpg") if os.path.exists(os.path.dirname(filename)): removeall(os.path.dirname(filename)) if not os.path.exists(os.path.dirname(filename)): os.mkdir(os.path.dirname(filename)) imgfound = self.download_image_to_filename(artist_search, album_search, filename, True, True) self.change_cursor(None) if self.chooseimage_visible: if not imgfound: gobject.idle_add(self.choose_image_no_art_found) self.allow_art_search = True self.call_gc_collect = True gc.enable() | cf641a3be7814ac8c28fad1ecb9dab568ab225cc /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2312/cf641a3be7814ac8c28fad1ecb9dab568ab225cc/sonata.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9876,
67,
2730,
67,
2725,
22,
12,
2890,
4672,
365,
18,
5681,
67,
485,
67,
2725,
273,
1083,
468,
10708,
777,
4602,
628,
3750,
30,
15469,
67,
3072,
273,
365,
18,
7222,
67,
25737,
4099,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9876,
67,
2730,
67,
2725,
22,
12,
2890,
4672,
365,
18,
5681,
67,
485,
67,
2725,
273,
1083,
468,
10708,
777,
4602,
628,
3750,
30,
15469,
67,
3072,
273,
365,
18,
7222,
67,
25737,
4099,
... | |
self.assertEquals(FLAGS.x, 74565) | self.assertEquals(FLAGS.x, 0x12345) | def test_flags(self): | 193f7d1add8b9e20126216b0be246c4b21a1a7dc /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7924/193f7d1add8b9e20126216b0be246c4b21a1a7dc/gflags_unittest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
7133,
12,
2890,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
7133,
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,
-10... |
else: return value | return value | def process(value): # pymssql will return SMALLDATETIME values as datetime.datetime(), truncate it back to datetime.date() if value and isinstance(value, datetime.datetime): return value.date() else: return value | 46720f0bbcf78a609cbcc1b7af55a8f4fb4ec319 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1074/46720f0bbcf78a609cbcc1b7af55a8f4fb4ec319/mssql.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
12,
1132,
4672,
468,
2395,
959,
4669,
903,
327,
17918,
22968,
924,
487,
3314,
18,
6585,
9334,
10310,
518,
1473,
358,
3314,
18,
712,
1435,
309,
460,
471,
1549,
12,
1132,
16,
3314,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1207,
12,
1132,
4672,
468,
2395,
959,
4669,
903,
327,
17918,
22968,
924,
487,
3314,
18,
6585,
9334,
10310,
518,
1473,
358,
3314,
18,
712,
1435,
309,
460,
471,
1549,
12,
1132,
16,
3314,
... |
self.listbox = wxCheckListBox(self, -1, choices=[to_locale(c[0]) | self.listbox = wxCheckListBox(self, -1, choices=[to_wx(c[0]) | def __init__(self, parent, teacher_title, period_key, choices, resources): title = _("Activity Selection") wxDialog.__init__(self, parent, -1, title, style=DEFAULT_DLG_STYLE) | 37c07bb93a6574354abfe8f76b9c44829e138f97 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7127/37c07bb93a6574354abfe8f76b9c44829e138f97/wxclient.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
982,
16,
6489,
27779,
67,
2649,
16,
3879,
67,
856,
16,
7246,
16,
2703,
4672,
2077,
273,
389,
2932,
6193,
12977,
7923,
7075,
6353,
16186,
2738,
972,
12,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
982,
16,
6489,
27779,
67,
2649,
16,
3879,
67,
856,
16,
7246,
16,
2703,
4672,
2077,
273,
389,
2932,
6193,
12977,
7923,
7075,
6353,
16186,
2738,
972,
12,
2... |
self.failUnless(e[0] == 'objects are not aligned', e) | self.failUnless(e[0].split()[1:4] == ['are', 'not', 'aligned'], e) | def not_aligned(self, x, y): z = dot(x,y) try: tz = eval_outputs([z]) except ValueError, e: self.failUnless(e[0] == 'objects are not aligned', e) return self.fail() | aee05365ada1998b19c50977836921109f92a850 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12438/aee05365ada1998b19c50977836921109f92a850/_test_tensor.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
486,
67,
20677,
12,
2890,
16,
619,
16,
677,
4672,
998,
273,
3928,
12,
92,
16,
93,
13,
775,
30,
6016,
273,
5302,
67,
12295,
3816,
94,
5717,
1335,
2068,
16,
425,
30,
365,
18,
6870,
9... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
486,
67,
20677,
12,
2890,
16,
619,
16,
677,
4672,
998,
273,
3928,
12,
92,
16,
93,
13,
775,
30,
6016,
273,
5302,
67,
12295,
3816,
94,
5717,
1335,
2068,
16,
425,
30,
365,
18,
6870,
9... |
self.outstream.write(">%s %s\n" % (id, description)) | self.outstream.write(">%s %s%s" % (id, description,os.linesep)) | def write(self, record): id = record.id description = record.description self.outstream.write(">%s %s\n" % (id, description)) | 842c7d3d15f376ed24a8bb00f08fad9db98860e9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7167/842c7d3d15f376ed24a8bb00f08fad9db98860e9/generic.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
12,
2890,
16,
1409,
4672,
612,
273,
1409,
18,
350,
2477,
273,
1409,
18,
3384,
225,
365,
18,
659,
3256,
18,
2626,
2932,
9822,
87,
738,
87,
64,
82,
6,
738,
261,
350,
16,
2477,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1045,
12,
2890,
16,
1409,
4672,
612,
273,
1409,
18,
350,
2477,
273,
1409,
18,
3384,
225,
365,
18,
659,
3256,
18,
2626,
2932,
9822,
87,
738,
87,
64,
82,
6,
738,
261,
350,
16,
2477,
... |
if isinstance(atoms[-1], TokenObject) and atoms[-1].name == tok.COMMA: | last_token = atoms[-1] if isinstance(last_token, TokenObject) and last_token.name == tok.COMMA: | def build_print_stmt(builder, nb): """ print_stmt: 'print' ( '>>' test [ (',' test)+ [','] ] | [ test (',' test)* [','] ] ) """ atoms = get_atoms(builder, nb) l = len(atoms) items = [] dest = None start = 1 if l > 1: if isinstance(atoms[1], TokenObject) and atoms[1].name == tok.RIGHTSHIFT: dest = atoms[2] # skip following comma start = 4 for index in range(start, l, 2): items.append(atoms[index]) if isinstance(atoms[-1], TokenObject) and atoms[-1].name == tok.COMMA: builder.push(ast.Print(items, dest)) else: builder.push(ast.Printnl(items, dest)) | e9b09762c21706bd72240d2078b80f33f96fbc08 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/e9b09762c21706bd72240d2078b80f33f96fbc08/astbuilder.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1361,
67,
1188,
67,
10589,
12,
9574,
16,
4264,
4672,
3536,
1172,
67,
10589,
30,
296,
1188,
11,
261,
11279,
1870,
1842,
306,
261,
17023,
1842,
27921,
306,
2187,
3546,
308,
571,
306,
1842,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1361,
67,
1188,
67,
10589,
12,
9574,
16,
4264,
4672,
3536,
1172,
67,
10589,
30,
296,
1188,
11,
261,
11279,
1870,
1842,
306,
261,
17023,
1842,
27921,
306,
2187,
3546,
308,
571,
306,
1842,... |
main_result.toolbar(text="Scan this directory",icon="examine.png", link=query_type(family="Load Data", report="ScanFS", path=query['open_tree'], case=query['case']), pane='popup' ) | def pane_cb(path,tmp): query['order']='Filename' | 9f8757c699830af8106f5e465eb99eea756fea34 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5568/9f8757c699830af8106f5e465eb99eea756fea34/DiskForensics.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13618,
67,
7358,
12,
803,
16,
5645,
4672,
843,
3292,
1019,
3546,
2218,
5359,
11,
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,
13618,
67,
7358,
12,
803,
16,
5645,
4672,
843,
3292,
1019,
3546,
2218,
5359,
11,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... | |
self.engine.processFrame(StompFrame('SUBSCRIBE', headers={'destination': '/foo/bar'})) | self.engine.process_frame(StompFrame('SUBSCRIBE', headers={'destination': '/foo/bar'})) | def test_subscribe_noack(self): """ Test subscribing to topics and queues w/ no ACK. """ self._connect() self.engine.processFrame(StompFrame('SUBSCRIBE', headers={'destination': '/queue/bar'})) assert self.conn in self.qm.queues['/queue/bar'] self.engine.processFrame(StompFrame('SUBSCRIBE', headers={'destination': '/foo/bar'})) assert self.conn in self.tm.topics['/foo/bar'] | f9d8d8c4b602e4da62a32eac4e04f31994d99e97 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10258/f9d8d8c4b602e4da62a32eac4e04f31994d99e97/test_engine.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
9174,
67,
2135,
484,
12,
2890,
4672,
3536,
7766,
10189,
310,
358,
11204,
471,
11897,
341,
19,
1158,
26069,
18,
3536,
365,
6315,
3612,
1435,
365,
18,
8944,
18,
2567,
3219,
12,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
9174,
67,
2135,
484,
12,
2890,
4672,
3536,
7766,
10189,
310,
358,
11204,
471,
11897,
341,
19,
1158,
26069,
18,
3536,
365,
6315,
3612,
1435,
365,
18,
8944,
18,
2567,
3219,
12,
... |
str += '<br>\n' | str += '<br>\n\n' | def _func_details(self, functions, cls, heading='Function Details'): """Return a detailed description of the functions in a class or module.""" functions = self._sort(functions) if len(functions) == 0: return '' str = self._table_header(heading, 'details')+'</table>' | 493b240e73d87b9805c2fa61669017035e0ae245 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/493b240e73d87b9805c2fa61669017035e0ae245/html.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
644,
67,
6395,
12,
2890,
16,
4186,
16,
2028,
16,
11053,
2218,
2083,
21897,
11,
4672,
3536,
990,
279,
6864,
2477,
434,
326,
4186,
316,
279,
667,
578,
1605,
12123,
4186,
273,
365,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
644,
67,
6395,
12,
2890,
16,
4186,
16,
2028,
16,
11053,
2218,
2083,
21897,
11,
4672,
3536,
990,
279,
6864,
2477,
434,
326,
4186,
316,
279,
667,
578,
1605,
12123,
4186,
273,
365,
6... |
'amount': fields.float('Total', readonly=True, select=True), | def init(self, cr): tools.drop_view_if_exists(cr, 'report_sales_by_margin_pos') cr.execute(""" create or replace view report_sales_by_margin_pos as ( select min(pol.id) as id, po.user_id as user_id, pt.name as product_name, to_char(date_trunc('day',po.date_order),'YYYY-MM-DD')::text as date_order, sum(pol.qty) as qty, pt.list_price-pt.standard_price as net_margin_per_qty, (pt.list_price-pt.standard_price) *sum(pol.qty) as total from product_template as pt, product_product as pp, pos_order_line as pol, pos_order as po where pol.product_id = pp.product_tmpl_id and pp.product_tmpl_id = pt.id and po.id = pol.order_id | 05caefc880abb2a70158b14885ef72a9ddd4f32d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/05caefc880abb2a70158b14885ef72a9ddd4f32d/pos.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,
87,
5408,
67,
1637,
67,
10107,
67,
917,
6134,
4422,
18,
8837,
2932,
3660,
75... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
87,
5408,
67,
1637,
67,
10107,
67,
917,
6134,
4422,
18,
8837,
2932,
3660,
75... | |
t,v,tb = None | tb = None | def GetTypeLibsForSpec(arg): """Given an argument on the command line (either a file name or a library description) return a list of actual typelibs to use. """ typelibs = [] try: try: tlb = pythoncom.LoadTypeLib(arg) spec = selecttlb.TypelibSpec(None, 0,0,0) spec.FromTypelib(tlb, arg) typelibs.append((tlb, spec)) except pythoncom.com_error: # See if it is a description tlbs = selecttlb.FindTlbsWithDescription(arg) if len(tlbs)==0: print "Could not locate a type library matching '%s'" % (arg) for spec in tlbs: tlb = pythoncom.LoadRegTypeLib(spec.clsid, spec.major, spec.minor, spec.lcid) # We have a typelib, but it may not be exactly what we specified # (due to automatic version matching of COM). So we query what we really have! attr = tlb.GetLibAttr() spec.major = attr[3] spec.minor = attr[4] spec.lcid = attr[1] typelibs.append((tlb, spec)) return typelibs except pythoncom.com_error: t,v,tb=sys.exc_info() sys.stderr.write ("Unable to load type library from '%s' - %s\n" % (arg, v)) t,v,tb = None # Storing tb in a local is a cycle! sys.exit(1) | 652b4a2bb25b526cc79f58c49c582266231f5d25 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/677/652b4a2bb25b526cc79f58c49c582266231f5d25/makepy.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
29511,
5664,
28388,
1990,
12,
3175,
4672,
3536,
6083,
392,
1237,
603,
326,
1296,
980,
261,
73,
2927,
279,
585,
508,
578,
279,
5313,
2477,
13,
327,
279,
666,
434,
3214,
3815,
30575,
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,
29511,
5664,
28388,
1990,
12,
3175,
4672,
3536,
6083,
392,
1237,
603,
326,
1296,
980,
261,
73,
2927,
279,
585,
508,
578,
279,
5313,
2477,
13,
327,
279,
666,
434,
3214,
3815,
30575,
87,
... |
yield auth | yield unicode(i), auth | ... def getQueriables(self): | 0b5a80dbe559677fdc2dc2a5a562b124abbb5018 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9520/0b5a80dbe559677fdc2dc2a5a562b124abbb5018/vocabulary.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1372,
377,
1652,
336,
928,
264,
77,
1538,
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,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1372,
377,
1652,
336,
928,
264,
77,
1538,
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,
... |
self.modules.register("bibtex", dict) for db in dict["arg"].split(","): self.modules["bibtex"].add_db(db) | if dict["arg"]: self.modules.register("bibtex", dict) for db in dict["arg"].split(","): self.modules["bibtex"].add_db(db) | def h_bibliography (self, dict): """ Called when the macro \\bibliography is found. This method actually registers the module bibtex (if not already done) and registers the databases. """ self.modules.register("bibtex", dict) for db in dict["arg"].split(","): self.modules["bibtex"].add_db(db) | a89c6e69e246c08c08ac0a0d07ecc8fff1d254d1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10102/a89c6e69e246c08c08ac0a0d07ecc8fff1d254d1/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
366,
67,
70,
495,
549,
15669,
261,
2890,
16,
2065,
4672,
3536,
11782,
1347,
326,
11522,
1736,
70,
495,
549,
15669,
353,
1392,
18,
1220,
707,
6013,
10285,
326,
1605,
25581,
21763,
261,
43... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
366,
67,
70,
495,
549,
15669,
261,
2890,
16,
2065,
4672,
3536,
11782,
1347,
326,
11522,
1736,
70,
495,
549,
15669,
353,
1392,
18,
1220,
707,
6013,
10285,
326,
1605,
25581,
21763,
261,
43... |
self.CCC = os.popen('$(WXCONFIG) --cxx', 'r').read()[:-1] | self.CCC = os.popen('%(WXCONFIG)s --cxx' % self.__dict__, 'r').read()[:-1] | def doFixups(self): # This is called after the config files have been evaluated # so we can do some sanity checking... if sys.platform != 'win32': if not self.CCC: self.CCC = os.popen('$(WXCONFIG) --cxx', 'r').read()[:-1] if not self.CCC: print "Warning: C++ compiler not specified (CCC). Assuming c++" self.CCC = 'c++' if not self.CC: self.CCC = os.popen('$(WXCONFIG) --cc', 'r').read()[:-1] if not self.CC: print "Warning: C compiler not specified (CC). Assuming cc" self.CC = 'cc' | 352f281a242bba9357d00180aa9f4141f40cf5f4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/352f281a242bba9357d00180aa9f4141f40cf5f4/build.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
8585,
18294,
12,
2890,
4672,
468,
1220,
353,
2566,
1839,
326,
642,
1390,
1240,
2118,
12697,
468,
1427,
732,
848,
741,
2690,
16267,
6728,
2777,
309,
2589,
18,
9898,
480,
296,
8082,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
8585,
18294,
12,
2890,
4672,
468,
1220,
353,
2566,
1839,
326,
642,
1390,
1240,
2118,
12697,
468,
1427,
732,
848,
741,
2690,
16267,
6728,
2777,
309,
2589,
18,
9898,
480,
296,
8082,
1... |
total_sales = 0 all_variations = ProductVariation.objects.filter(parent=product) for variation in all_variations: total_sales += variation.product.total_sold variation_items.append(variation.product) | variation_items, total_sales = _get_all_variations(product) | def add_toolbar_context(sender, context={}, **kwargs): user = threadlocals.get_current_user() if user and user.is_staff: request_path = context['request'].META['PATH_INFO'] slug = request_path.split('/')[-2] total_sales = 0 show_sales = False variation_items = [] try: product = Product.objects.get(slug=slug) show_sales = True subtypes = product.get_subtypes() if 'ConfigurableProduct' in subtypes: total_sales = 0 all_variations = ProductVariation.objects.filter(parent=product) for variation in all_variations: total_sales += variation.product.total_sold variation_items.append(variation.product) else: total_sales = product.total_sold except: pass st = {} st['st_satchmo_version'] = get_version() newq = Order.objects.filter(status__exact = 'New') st['st_new_order_ct'] = newq.count() amounts = newq.values_list('total', flat=True) if amounts: newtotal = reduce(operator.add, amounts) else: newtotal = 0 st['st_new_order_total'] = newtotal st['st_total_sold'] = total_sales st['st_show_sales'] = show_sales st['st_variations'] = variation_items week = datetime.datetime.today()-datetime.timedelta(days=7) day = datetime.datetime.today()-datetime.timedelta(days=1) hours = datetime.datetime.today()-datetime.timedelta(hours=1) cartweekq = Cart.objects.filter(date_time_created__gte=week) cartdayq = Cart.objects.filter(date_time_created__gte=day) carthourq = Cart.objects.filter(date_time_created__gte=hours) st['st_cart_7d_ct'] = cartweekq.count() st['st_cart_1d_ct'] = cartdayq.count() st['st_cart_1h_ct'] = carthourq.count() st['st_contacts_ct'] = Contact.objects.all().count() st['st_contacts_7d_ct'] = Contact.objects.filter(create_date__gte=week).count() # edits = [] # st['st_edits'] = edits context.update(st) | 80bb68c88e458b018c82b6900b903fd969ccc16a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13656/80bb68c88e458b018c82b6900b903fd969ccc16a/listeners.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
67,
18849,
67,
2472,
12,
15330,
16,
819,
28793,
2826,
4333,
4672,
729,
273,
2650,
17977,
18,
588,
67,
2972,
67,
1355,
1435,
309,
729,
471,
729,
18,
291,
67,
31096,
30,
590,
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,
527,
67,
18849,
67,
2472,
12,
15330,
16,
819,
28793,
2826,
4333,
4672,
729,
273,
2650,
17977,
18,
588,
67,
2972,
67,
1355,
1435,
309,
729,
471,
729,
18,
291,
67,
31096,
30,
590,
67,
... |
- ``i`` - round (0 <= i <= n) | - ``i`` - round (`0 \leq i \leq n`) | def key_schedule_polynomials(self, i): """ Return polynomials for the `i`-th round of the key schedule. | e9de4dc45b78ee371d827176c047af2a011b3044 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9417/e9de4dc45b78ee371d827176c047af2a011b3044/sr.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
498,
67,
10676,
67,
3915,
13602,
87,
12,
2890,
16,
277,
4672,
3536,
2000,
16991,
87,
364,
326,
1375,
77,
68,
17,
451,
3643,
434,
326,
498,
4788,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
498,
67,
10676,
67,
3915,
13602,
87,
12,
2890,
16,
277,
4672,
3536,
2000,
16991,
87,
364,
326,
1375,
77,
68,
17,
451,
3643,
434,
326,
498,
4788,
18,
2,
-100,
-100,
-100,
-100,
-100,
... |
sortedKeys = self.__sortedLODNames index = sortedKeys.index(str(lodName)) self.__LODNode.node().setSwitch(index, inDist, outDist) | self.__LODNode.node().setSwitch(self.getLODIndex(lodName), inDist, outDist) def getLODIndex(self, lodName): """getLODIndex(self) safe method (but expensive) for retrieving the child index """ return list(self.__LODNode.getChildren()).index(self.getLOD(lodName)) | def setLOD(self, lodName, inDist=0, outDist=0): """setLOD(self, string) Set the switch distance for given LOD """ # save the switch distance info self.switches[lodName] = [inDist, outDist] # add the switch distance info | 1b72f25020241a796ba63f0262db132574458b5a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7242/1b72f25020241a796ba63f0262db132574458b5a/Actor.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
48,
1212,
12,
2890,
16,
328,
369,
461,
16,
316,
5133,
33,
20,
16,
596,
5133,
33,
20,
4672,
3536,
542,
48,
1212,
12,
2890,
16,
533,
13,
1000,
326,
1620,
3888,
364,
864,
511,
12... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
48,
1212,
12,
2890,
16,
328,
369,
461,
16,
316,
5133,
33,
20,
16,
596,
5133,
33,
20,
4672,
3536,
542,
48,
1212,
12,
2890,
16,
533,
13,
1000,
326,
1620,
3888,
364,
864,
511,
12... |
cr.execute('SELECT id, number_next, prefix, suffix, padding FROM ir_sequence WHERE '+test+' AND active=%s FOR UPDATE', (sequence_id, True)) | assert test in ('code','id') cr.execute('SELECT id, number_next, prefix, suffix, padding FROM ir_sequence WHERE '+test+'=%s AND active=%s FOR UPDATE', (sequence_id, True)) | def get_id(self, cr, uid, sequence_id, test='id=%s', context=None): try: cr.execute('SELECT id, number_next, prefix, suffix, padding FROM ir_sequence WHERE '+test+' AND active=%s FOR UPDATE', (sequence_id, True)) res = cr.dictfetchone() if res: cr.execute('UPDATE ir_sequence SET number_next=number_next+number_increment WHERE id=%s AND active=%s', (res['id'], True)) if res['number_next']: return self._process(res['prefix']) + '%%0%sd' % res['padding'] % res['number_next'] + self._process(res['suffix']) else: return self._process(res['prefix']) + self._process(res['suffix']) finally: cr.commit() return False | 712389da82ed665ca558685a819b37cc0a3b1e80 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/712389da82ed665ca558685a819b37cc0a3b1e80/ir_sequence.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
350,
12,
2890,
16,
4422,
16,
4555,
16,
3102,
67,
350,
16,
1842,
2218,
350,
5095,
87,
2187,
819,
33,
7036,
4672,
775,
30,
1815,
1842,
316,
7707,
710,
17023,
350,
6134,
4422,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
350,
12,
2890,
16,
4422,
16,
4555,
16,
3102,
67,
350,
16,
1842,
2218,
350,
5095,
87,
2187,
819,
33,
7036,
4672,
775,
30,
1815,
1842,
316,
7707,
710,
17023,
350,
6134,
4422,
... |
if isinstance(entry, unicode): entry = entry.encode('iso-8859-15', 'replace') | def processItem(self, channel, item): | 7e8c46334cc4019c9bcf6237e64fd6e87ec8b82b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12996/7e8c46334cc4019c9bcf6237e64fd6e87ec8b82b/Entries.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
1180,
12,
2890,
16,
1904,
16,
761,
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,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
1180,
12,
2890,
16,
1904,
16,
761,
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,
... | |
db = site._p_jar._db t = threading.Thread(target=send_emails, args=(db, site_path, group, userids, roles, loc, location)) t.start() | add_job(db_callback, site_path, group, userids, roles, loc, location) | def start_sending_emails(site, group, userids, roles, loc, location): """ start the thread to send the emails the thread gets the db, the path to the current site and all the other arguments required to send each email """ site_path = ofs_path(site) db = site._p_jar._db t = threading.Thread(target=send_emails, args=(db, site_path, group, userids, roles, loc, location)) t.start() | 618091655fb1c32bed603863c28ef85acc7675b2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3287/618091655fb1c32bed603863c28ef85acc7675b2/send_group_emails_thread.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
787,
67,
87,
2846,
67,
22762,
12,
4256,
16,
1041,
16,
31892,
16,
4900,
16,
1515,
16,
2117,
4672,
3536,
787,
326,
2650,
358,
1366,
326,
14255,
326,
2650,
5571,
326,
1319,
16,
326,
589,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
67,
87,
2846,
67,
22762,
12,
4256,
16,
1041,
16,
31892,
16,
4900,
16,
1515,
16,
2117,
4672,
3536,
787,
326,
2650,
358,
1366,
326,
14255,
326,
2650,
5571,
326,
1319,
16,
326,
589,
... |
def exitShell( params ): """Leave the BitBake Shell""" sys.exit(0) | try: global history_file readline.read_history_file( history_file ) except IOError: pass def cleanup(): if debug: print "(writing command history)" try: global history_file readline.write_history_file( history_file ) except: print "BBSHELL: Unable to save command history" | def exitShell( params ): """Leave the BitBake Shell""" sys.exit(0) | 8422609cbe7d5543b3d08e4f1478861097544b53 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2672/8422609cbe7d5543b3d08e4f1478861097544b53/shell.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
775,
30,
2552,
4927,
67,
768,
12023,
18,
896,
67,
8189,
67,
768,
12,
4927,
67,
768,
262,
1335,
8340,
30,
1342,
225,
1652,
6686,
13332,
309,
1198,
30,
1172,
7751,
14345,
1296,
4927,
2225,
775... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
775,
30,
2552,
4927,
67,
768,
12023,
18,
896,
67,
8189,
67,
768,
12,
4927,
67,
768,
262,
1335,
8340,
30,
1342,
225,
1652,
6686,
13332,
309,
1198,
30,
1172,
7751,
14345,
1296,
4927,
2225,
775... |
self.data_file = None | def __init__(self, handle): activity.Activity.__init__(self, handle) self.data_file = None self.max_participants = 1 | 8b3134e082eb3e50149ea7f88b746b58649abe1c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6697/8b3134e082eb3e50149ea7f88b746b58649abe1c/terminal.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1640,
4672,
5728,
18,
6193,
16186,
2738,
972,
12,
2890,
16,
1640,
13,
225,
365,
18,
1896,
67,
2680,
27620,
273,
404,
2,
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,
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,
1001,
2738,
972,
12,
2890,
16,
1640,
4672,
5728,
18,
6193,
16186,
2738,
972,
12,
2890,
16,
1640,
13,
225,
365,
18,
1896,
67,
2680,
27620,
273,
404,
2,
-100,
-100,
-100,
-100,
-100,
-10... | |
raise Socks4Error((ord(resp[1]),_socks4errors[ord(resp[1])-90])) | raise Socks4Error((ord(resp[1]), _socks4errors[ord(resp[1])-90])) | def __negotiatesocks4(self,destaddr,destport): """__negotiatesocks4(self,destaddr,destport) Negotiates a connection through a SOCKS4 server. """ # Check if the destination address provided is an IP address rmtrslv = False try: ipaddr = socket.inet_aton(destaddr) except socket.error: # It's a DNS name. Check where it should be resolved. if self.__proxy[3]==True: ipaddr = "\x00\x00\x00\x01" rmtrslv = True else: ipaddr = socket.inet_aton(socket.gethostbyname(destaddr)) # Construct the request packet req = "\x04\x01" + self.__decode(struct.pack(">H",destport)) + ipaddr # The username parameter is considered userid for SOCKS4 if self.__proxy[4] != None: req = req + self.__proxy[4] req = req + "\x00" # DNS name if remote resolving is required # NOTE: This is actually an extension to the SOCKS4 protocol # called SOCKS4A and may not be supported in all cases. if rmtrslv==True: req = req + destaddr + "\x00" self.sendall(req) # Get the response from the server resp = self.__recvall(8) if resp[0] != "\x00": # Bad data self.close() raise GeneralProxyError((1,_generalerrors[1])) if resp[1] != "\x5A": # Server returned an error self.close() if ord(resp[1]) in (91,92,93): self.close() raise Socks4Error((ord(resp[1]),_socks4errors[ord(resp[1])-90])) else: raise Socks4Error((94,_socks4errors[4])) # Get the bound address/port self.__proxysockname = (socket.inet_ntoa(resp[4:]),struct.unpack(">H",bytes(resp[2:4],'utf8'))[0]) if rmtrslv != None: self.__proxypeername = (socket.inet_ntoa(ipaddr),destport) else: self.__proxypeername = (destaddr,destport) | 6a596ed40071091ac51048087179560e15823043 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12748/6a596ed40071091ac51048087179560e15823043/socks.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
14518,
352,
16020,
20641,
24,
12,
2890,
16,
10488,
4793,
16,
10488,
655,
4672,
3536,
972,
14518,
352,
16020,
20641,
24,
12,
2890,
16,
10488,
4793,
16,
10488,
655,
13,
423,
27445,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
14518,
352,
16020,
20641,
24,
12,
2890,
16,
10488,
4793,
16,
10488,
655,
4672,
3536,
972,
14518,
352,
16020,
20641,
24,
12,
2890,
16,
10488,
4793,
16,
10488,
655,
13,
423,
27445,
1... |
return "%s = %s" %(key, quote(str(value))) | if value is None: return '%s = NULL' % key elif type(value) in [int, long]: return '%s = %d' % (key, value) elif type(value) is float: return '%s = %f' % (key, value) else: return "%s = %s" %(key, quote(str(value))) | def _set_eq_(key, value): return "%s = %s" %(key, quote(str(value))) | 839b8e878ac6eabaa4ef26f03ea9120ae835f30a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2501/839b8e878ac6eabaa4ef26f03ea9120ae835f30a/write.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
542,
67,
11253,
67,
12,
856,
16,
460,
4672,
309,
460,
353,
599,
30,
327,
1995,
87,
273,
3206,
11,
738,
498,
1327,
618,
12,
1132,
13,
316,
306,
474,
16,
1525,
14542,
327,
1995,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
542,
67,
11253,
67,
12,
856,
16,
460,
4672,
309,
460,
353,
599,
30,
327,
1995,
87,
273,
3206,
11,
738,
498,
1327,
618,
12,
1132,
13,
316,
306,
474,
16,
1525,
14542,
327,
1995,
... |
for argument,value in argsDict.items(): if type(value) == types.StringType: execString = "%s, %s='%s'" % (execString,argument,value) | for argument, value in argsDict.items(): if type( value ) == types.StringType: execString = "%s, %s='%s'" % ( execString, argument, value ) | def _executeStorageElementFunction(self,storageElementName,pfn,method,argsDict={}): """ A simple wrapper around the storage element functionality """ # First check the supplied pfn(s) are the correct format. if type(pfn) in types.StringTypes: pfns = {pfn:False} elif type(pfn) == types.ListType: pfns = {} for url in pfn: pfns[url] = False elif type(pfn) == types.DictType: pfns = pfn.copy() else: errStr = "ReplicaManager._executeStorageElementFunction: Supplied pfns must be string or list of strings or a dictionary." gLogger.error(errStr) return S_ERROR(errStr) # Check we have some pfns if not pfns: errMessage = "ReplicaManager._executeStorageElementFunction: No pfns supplied." gLogger.error(errMessage) return S_ERROR(errMessage) gLogger.debug("ReplicaManager._executeStorageElementFunction: Attempting to perform '%s' operation with %s pfns." % (method,len(pfns))) # Check we can instantiate the storage element correctly storageElement = StorageElement(storageElementName) res = storageElement.isValid(method) if not res['OK']: errStr = "ReplicaManager._executeStorageElementFunction: Failed to instantiate Storage Element" gLogger.error(errStr, "for performing %s at %s." % (method,storageElementName)) return res # Generate the execution string if argsDict: execString = "res = storageElement.%s(pfns" % method for argument,value in argsDict.items(): if type(value) == types.StringType: execString = "%s, %s='%s'" % (execString,argument,value) else: execString = "%s, %s=%s" % (execString,argument,value) execString = "%s)" % execString else: execString = "res = storageElement.%s(pfns)" % method # Execute the execute string try: exec(execString) except AttributeError,errMessage: exceptStr = "ReplicaManager._executeStorageElementFunction: Exception while perfoming %s." % method gLogger.exception(exceptStr,str(errMessage)) return S_ERROR(exceptStr) # Return the output if not res['OK']: errStr = "ReplicaManager._executeStorageElementFunction: Completely failed to perform %s." % method gLogger.error(errStr,'%s : %s' % (storageElementName,res['Message'])) return res | 9fabceb719d19d46d8b75011d2932552dbe360f9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/9fabceb719d19d46d8b75011d2932552dbe360f9/ReplicaManager.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
8837,
3245,
1046,
2083,
12,
2890,
16,
5697,
30584,
16,
84,
4293,
16,
2039,
16,
1968,
5014,
12938,
4672,
3536,
432,
4143,
4053,
6740,
326,
2502,
930,
14176,
3536,
468,
5783,
866,
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,
389,
8837,
3245,
1046,
2083,
12,
2890,
16,
5697,
30584,
16,
84,
4293,
16,
2039,
16,
1968,
5014,
12938,
4672,
3536,
432,
4143,
4053,
6740,
326,
2502,
930,
14176,
3536,
468,
5783,
866,
326... |
self._seq = None | def __init__(self,verbose=0): # the sequencing stuff presumes access to a sequencer. # this may be set with setSequencer(); if a <seq> tag # is encountered and it has not been set, a default # sequencer will be provided. self._seq = None if _xmllib_newStyle: xmllib.XMLParser.__init__(self,verbose=verbose) else: xmllib.XMLParser.__init__(self) # set up handlers for various tags self.elements = { 'b': (self.start_b, self.end_b), 'u': (self.start_u, self.end_u), 'i': (self.start_i, self.end_i), 'super': (self.start_super, self.end_super), 'sub': (self.start_sub, self.end_sub), 'font': (self.start_font, self.end_font), 'greek': (self.start_greek, self.end_greek), 'para': (self.start_para, self.end_para) } | 1b9abe8d391589993f643e550b62e8d7886861cc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3878/1b9abe8d391589993f643e550b62e8d7886861cc/paraparser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
11369,
33,
20,
4672,
468,
326,
26401,
15495,
10769,
4075,
6411,
2006,
358,
279,
26401,
23568,
18,
468,
333,
2026,
506,
444,
598,
444,
1761,
372,
23568,
562... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
11369,
33,
20,
4672,
468,
326,
26401,
15495,
10769,
4075,
6411,
2006,
358,
279,
26401,
23568,
18,
468,
333,
2026,
506,
444,
598,
444,
1761,
372,
23568,
562... | |
'mail.identity.id1.htmlSigFormat' : False, 'mail.identity.id1.htmlSigText' : "Tinderbox is soo 90ies", | def rmtree_onerror(func, path, exc_info): """ Error handler for ``shutil.rmtree``. If the error is due to an access error (read only file) it attempts to add write permission and then retries. If the error is for another reason it re-raises the error. Usage : ``shutil.rmtree(path, onerror=rmtree_onerror)`` """ import stat if not os.access(path, os.W_OK): # Is the error an access error ? os.chmod(path, stat.S_IWUSR) func(path) else: raise | 4fffb0beffde8d57e81cf4db0832788cc5aa4bf8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11044/4fffb0beffde8d57e81cf4db0832788cc5aa4bf8/runtest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
17941,
67,
265,
1636,
12,
644,
16,
589,
16,
3533,
67,
1376,
4672,
3536,
1068,
1838,
364,
12176,
674,
1367,
18,
86,
17371,
68,
8338,
225,
971,
326,
555,
353,
6541,
358,
392,
2006,
555,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
17941,
67,
265,
1636,
12,
644,
16,
589,
16,
3533,
67,
1376,
4672,
3536,
1068,
1838,
364,
12176,
674,
1367,
18,
86,
17371,
68,
8338,
225,
971,
326,
555,
353,
6541,
358,
392,
2006,
555,
... | |
"help","package-info","compiler=","directx-sdk=","thirdparty=", | "help","package-info","prefix=","compiler=","directx-sdk=","thirdparty=", | def parseopts(args): global COMPILER,OPTIMIZE,OMIT,THIRDPARTY,INSTALLER,COPYEXTRAS,VERSION1,VERSION2,VERSION3,COMPRESSOR global DirectXSDK,VERBOSE longopts = [ "help","package-info","compiler=","directx-sdk=","thirdparty=", "optimize=","everything","nothing","installer","quiet","verbose", "complete","default","v1=","v2=","v3=","lzma"] anything = 0 for pkg in PACKAGES: longopts.append("no-"+pkg.lower()) for pkg in PACKAGES: longopts.append("use-"+pkg.lower()) try: opts, extras = getopt.getopt(args, "", longopts) for option,value in opts: if (option=="--help"): raise "usage" if (option=="--package-info"): raise "package-info" if (option=="--compiler"): COMPILER=value if (option=="--directx-sdk"): DirectXSDK=value if (option=="--thirdparty"): THIRDPARTY=value if (option=="--optimize"): OPTIMIZE=value if (option=="--quiet"): VERBOSE-=1 if (option=="--verbose"): VERBOSE+=1 if (option=="--installer"): INSTALLER=1 if (option=="--complete"): COMPLETE=1 if (option=="--everything"): OMIT=[] if (option=="--nothing"): OMIT=PACKAGES[:] if (option=="--v1"): VERSION1=int(value) if (option=="--v2"): VERSION2=int(value) if (option=="--v3"): VERSION3=int(value) if (option=="--lzma"): COMPRESSOR="lzma" for pkg in PACKAGES: if (option=="--use-"+pkg.lower()): if (OMIT.count(pkg)): OMIT.delete(pkg) for pkg in PACKAGES: if (option=="--no-"+pkg.lower()): if (OMIT.count(pkg)==0): OMIT.append(pkg) anything = 1 except "package-info": packageInfo() except: usage(0) if (anything==0): usage(0) if (OPTIMIZE=="1"): OPTIMIZE=1 elif (OPTIMIZE=="2"): OPTIMIZE=2 elif (OPTIMIZE=="3"): OPTIMIZE=3 elif (OPTIMIZE=="4"): OPTIMIZE=4 else: usage("Invalid setting for OPTIMIZE"); if (COMPILERS.count(COMPILER)==0): usage("Invalid setting for COMPILER: "+COMPILER); | aa9700942409f59dfc63d4542d0bad0a01230726 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7242/aa9700942409f59dfc63d4542d0bad0a01230726/makepanda.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
4952,
12,
1968,
4672,
2552,
5423,
1102,
14668,
16,
15620,
3445,
15641,
16,
1872,
1285,
16,
2455,
7937,
40,
2778,
5538,
16,
28865,
654,
16,
24875,
22639,
55,
16,
5757,
21,
16,
5757,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
4952,
12,
1968,
4672,
2552,
5423,
1102,
14668,
16,
15620,
3445,
15641,
16,
1872,
1285,
16,
2455,
7937,
40,
2778,
5538,
16,
28865,
654,
16,
24875,
22639,
55,
16,
5757,
21,
16,
5757,... |
print "Save(\"gregorio-%d.sfd\");" % current_font_number print "Quit(0);" | fout.write("Save(\"gregorio-%d.sfd\");\n" % current_font_number) fout.write("Quit(0);\n") | def footers(): print "Save(\"gregorio-%d.sfd\");" % current_font_number print "Quit(0);" | da8d78f38ceb134d9ac1ea0c840479a1eadd3f2b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7096/da8d78f38ceb134d9ac1ea0c840479a1eadd3f2b/sqarize.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
14200,
414,
13332,
17382,
18,
2626,
2932,
4755,
23031,
2810,
280,
1594,
6456,
72,
18,
87,
8313,
2412,
20472,
82,
6,
738,
783,
67,
5776,
67,
2696,
13,
17382,
18,
2626,
2932,
25365,
12,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
14200,
414,
13332,
17382,
18,
2626,
2932,
4755,
23031,
2810,
280,
1594,
6456,
72,
18,
87,
8313,
2412,
20472,
82,
6,
738,
783,
67,
5776,
67,
2696,
13,
17382,
18,
2626,
2932,
25365,
12,
... |
self.provider.close() | def test_getPosters_When_next_provider_returns_posters_Then_cache_and_return_first_poster_and_add_remaining_to_work_queue(self): httpUrls = [ 'http://www.gstatic.com/hostedimg/1f4337d461f1431c_large', 'http://www.gstatic.com/hostedimg/50edad09a73fa0ed_large', 'http://www.gstatic.com/hostedimg/d915322b880dcaf2_large', 'http://www.gstatic.com/hostedimg/998ad397414e3727_large', 'http://www.gstatic.com/hostedimg/ba55ddda30df5f96_large', 'http://www.gstatic.com/hostedimg/7f0a19596a92fad1_large', 'http://www.gstatic.com/hostedimg/8edb2dfe5ba34685_large', 'http://www.gstatic.com/hostedimg/ffdb442e9f46a3c3_large'] when(self.nextProvider).getPosters(any(Program)).thenReturn(httpUrls) # Test posters = self.provider.getPosters(self.program) # Verify log.debug('Posters= %s' % posters) self.assertEquals(1, len(posters)) while len(posters) < len(httpUrls): time.sleep(1) log.debug('Images downloaded: %d' % len(posters)) self.provider.close() | 4d6bf491ed6074306cd1beb4079a1902ae44a491 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12279/4d6bf491ed6074306cd1beb4079a1902ae44a491/test_fanart.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
588,
3349,
414,
67,
9434,
67,
4285,
67,
6778,
67,
6154,
67,
2767,
414,
67,
20112,
67,
2493,
67,
464,
67,
2463,
67,
3645,
67,
2767,
264,
67,
464,
67,
1289,
67,
17956,
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,
588,
3349,
414,
67,
9434,
67,
4285,
67,
6778,
67,
6154,
67,
2767,
414,
67,
20112,
67,
2493,
67,
464,
67,
2463,
67,
3645,
67,
2767,
264,
67,
464,
67,
1289,
67,
17956,
67,
... | |
Multivariate polynomials also coerce: | sage: Q, q = FiniteField_ext_pari(5^7, 'q').objgen() sage: L = GF(5) sage: LL.<xx> = L[] sage: Q(xx^2 + 2*xx + 4) q^2 + 2*q + 4 Multivariate polynomials only coerce if constant: | def __call__(self, x): r""" Coerce x into the finite field. INPUT: x -- object | 5c9f17a7ae7db46040eafbff2d7aa9efa9bfb829 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/5c9f17a7ae7db46040eafbff2d7aa9efa9bfb829/finite_field_ext_pari.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1991,
972,
12,
2890,
16,
619,
4672,
436,
8395,
7695,
2765,
619,
1368,
326,
25922,
652,
18,
225,
12943,
30,
619,
1493,
733,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1991,
972,
12,
2890,
16,
619,
4672,
436,
8395,
7695,
2765,
619,
1368,
326,
25922,
652,
18,
225,
12943,
30,
619,
1493,
733,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
c = Client("version", []) self._ConnectList(c, node_list) return c.GetResults() | return self._MultiNodeCall(node_list, "version", []) | def call_version(self, node_list): """Query node version. | 9a525d83b2a75f44cc1171e7d715b5bee7a76756 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7542/9a525d83b2a75f44cc1171e7d715b5bee7a76756/rpc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
745,
67,
1589,
12,
2890,
16,
756,
67,
1098,
4672,
3536,
1138,
756,
1177,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
745,
67,
1589,
12,
2890,
16,
756,
67,
1098,
4672,
3536,
1138,
756,
1177,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
s.tk.call( s.f.plf._w, CMD, 'plvsta' ) | s.cmd( 'plvsta' ) | def plvsta(s): | 5e1e7ef2c61ed08af7184e16b0bac6bebfbe213e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2933/5e1e7ef2c61ed08af7184e16b0bac6bebfbe213e/Plframe.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
886,
90,
334,
69,
12,
87,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
886,
90,
334,
69,
12,
87,
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,
-... |
parts = node['parts'] | def latex_visit_inheritance_diagram(self, node): """ Output the graph for LaTeX. This will insert a PDF. """ graph = node['graph'] parts = node['parts'] graph_hash = get_graph_hash(node) name = 'inheritance%s' % graph_hash dotcode = graph.generate_dot(name, parts, env=self.builder.env, graph_attrs={'size': '"6.0,6.0"'}) render_dot_latex(self, node, dotcode, [], 'inheritance') raise nodes.SkipNode | b90ca05941e1fd53e0d69ced376e466dab659f67 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5532/b90ca05941e1fd53e0d69ced376e466dab659f67/inheritance_diagram.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
25079,
67,
11658,
67,
6018,
1359,
67,
12264,
1940,
12,
2890,
16,
756,
4672,
3536,
3633,
326,
2667,
364,
21072,
21575,
60,
18,
225,
1220,
903,
2243,
279,
12667,
18,
3536,
2667,
273,
756,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
25079,
67,
11658,
67,
6018,
1359,
67,
12264,
1940,
12,
2890,
16,
756,
4672,
3536,
3633,
326,
2667,
364,
21072,
21575,
60,
18,
225,
1220,
903,
2243,
279,
12667,
18,
3536,
2667,
273,
756,
... | |
t += '\n<blockquote type="cite">\n' | t += '\n<blockquote type="cite">\n\n' | def renderCitationsIn(self, page, t): inblock = 0 blocklines = [] blockend=0 lines = string.split(t, '\n') t = "" for i in range(len(lines)): m = re.match(r'^\s*>\s?(.*)$', lines[i]) if(m): if(not inblock): t += string.join(lines[blockend:i],'\n') t += '\n<blockquote type="cite">\n' inblock = 1 blocklines.append(m.group(1)) elif(inblock): inblock = 0 blockend=i t += self.renderCitationsIn(page,string.join(blocklines, '\n')) t += '\n\n</blockquote>\n' blocklines = [] t += string.join(lines[blockend:], '\n') return t | 5d7a2b6826c32b60881c01b8918fbe6c3951a618 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5225/5d7a2b6826c32b60881c01b8918fbe6c3951a618/PageTypes.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1743,
39,
18282,
382,
12,
2890,
16,
1363,
16,
268,
4672,
316,
2629,
273,
374,
1203,
3548,
273,
5378,
1203,
409,
33,
20,
2362,
273,
533,
18,
4939,
12,
88,
16,
2337,
82,
6134,
268,
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,
1743,
39,
18282,
382,
12,
2890,
16,
1363,
16,
268,
4672,
316,
2629,
273,
374,
1203,
3548,
273,
5378,
1203,
409,
33,
20,
2362,
273,
533,
18,
4939,
12,
88,
16,
2337,
82,
6134,
268,
273... |
for i in range(0,l-1): | for i in range(0, l - 1): | def xcorrEvents(starttime, endtime, network_id='*', station_id='*', location_id='', channel_id='EHE', phase='P', time_window=(-10, 40), winlen=10.0): """ """ # get all events betwenn start and end time event_list = client.event.getList(datetime = (starttime, endtime)) for event in event_list: print "EVENT:", event['datetime'] # request event resource res = client.event.getXMLResource(event['resource_name']) # fetch all picks with given phase pick_list = res.xpath("/event/pick[phaseHint='%s']" % phase) # cycle through picks streams = [] for pick in pick_list: temp = {} # XXX: ignoring location code for now dt = UTCDateTime(str(pick.time.value)) sid = pick.waveform.attrib['stationCode'] nid = pick.waveform.attrib['networkCode'] or 'BW' print ' Pick:', nid, sid, dt # get station PAZ paz = getStationPAZ(nid, sid, dt) if not paz: print "!!! Missing PAZ for %s.%s for %s" % (nid, sid, dt) continue # get waveforms try: stream = client.waveform.getWaveform(nid, sid, location_id, channel_id, dt+time_window[0], dt+time_window[1]) except: msg = "!!! Error fetching waveform for %s.%s.%s.%s for %s" print msg % (nid, sid, location_id, channel_id, dt) continue # trim to time window stream.trim(dt+time_window[0], dt+time_window[1]) for trace in stream: # calculate zero mean trace.data = trace.data - trace.data.mean() # instrument correction trace.data = seisSim(trace.data, trace.stats.sampling_rate, paz, inst_sim=None, water_level=50.0) print ' Trace:', trace # append streams.append(stream) # cross correlation over all prepared streams l = len(streams) if l<2: print "Need at least 2 stations" continue print "XCORR:" for i in range(0,l-1): tr1 = streams[i][0] for j in range(i+1,l): tr2 = streams[j][0] print ' ', tr1.getId(), ' x ', tr2.getId(), ' = ', # check samling rate for both traces if tr1.stats.sampling_rate != tr2.stats.sampling_rate: print print "!!! Sampling rate are not equal!" continue if tr1.stats.npts != tr2.stats.npts: print print "!!! Number of samples in time window are not equal!" continue # devide by 2.0 as in eventcluster line 604: param = windowlen/2 winlen = int(winlen / float(tr1.stats.sampling_rate) / 2.0) shift, coe = xcorr(tr1.data.astype('float32'), tr2.data.astype('float32'), winlen) print "%.4lf" % coe print print | eaae164587ff3e53e5bb057afc519a3a6dac28e5 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10470/eaae164587ff3e53e5bb057afc519a3a6dac28e5/eventcluster.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
619,
17515,
3783,
12,
1937,
957,
16,
31361,
16,
2483,
67,
350,
2218,
14,
2187,
13282,
67,
350,
2218,
14,
2187,
2117,
67,
350,
2218,
2187,
1904,
67,
350,
2218,
41,
3900,
2187,
6855,
221... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
619,
17515,
3783,
12,
1937,
957,
16,
31361,
16,
2483,
67,
350,
2218,
14,
2187,
13282,
67,
350,
2218,
14,
2187,
2117,
67,
350,
2218,
2187,
1904,
67,
350,
2218,
41,
3900,
2187,
6855,
221... |
if cache.has_key(path): return cache[path] cache[path] = ret = os.stat(path) | ret = cache.get(path, None) if ret is None: cache[path] = ret = _os.stat(path) | def stat(path): """Stat a file, possibly out of the cache.""" if cache.has_key(path): return cache[path] cache[path] = ret = os.stat(path) return ret | 0149e84af280523f74bc2bccb6505eb12cf5bf9c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/0149e84af280523f74bc2bccb6505eb12cf5bf9c/statcache.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
610,
12,
803,
4672,
3536,
5000,
279,
585,
16,
10016,
596,
434,
326,
1247,
12123,
325,
273,
1247,
18,
588,
12,
803,
16,
599,
13,
309,
325,
353,
599,
30,
1247,
63,
803,
65,
273,
325,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
610,
12,
803,
4672,
3536,
5000,
279,
585,
16,
10016,
596,
434,
326,
1247,
12123,
325,
273,
1247,
18,
588,
12,
803,
16,
599,
13,
309,
325,
353,
599,
30,
1247,
63,
803,
65,
273,
325,
... |
logging.error("Cannot set memory lock: %s" % | logging.error("Cannot set memory lock: %s", | def Mlockall(): """Lock current process' virtual address space into RAM. This is equivalent to the C call mlockall(MCL_CURRENT|MCL_FUTURE), see mlock(2) for more details. This function requires ctypes module. """ if ctypes is None: logging.warning("Cannot set memory lock, ctypes module not found") return libc = ctypes.cdll.LoadLibrary("libc.so.6") if libc is None: logging.error("Cannot set memory lock, ctypes cannot load libc") return # Some older version of the ctypes module don't have built-in functionality # to access the errno global variable, where function error codes are stored. # By declaring this variable as a pointer to an integer we can then access # its value correctly, should the mlockall call fail, in order to see what # the actual error code was. libc.__errno_location.restype = ctypes.POINTER(ctypes.c_int) if libc.mlockall(_MCL_CURRENT | _MCL_FUTURE): logging.error("Cannot set memory lock: %s" % os.strerror(libc.__errno_location().contents.value)) return logging.debug("Memory lock set") | 6ed0bbce33b8a134d0e22dd72fd111e07fc9bef9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7542/6ed0bbce33b8a134d0e22dd72fd111e07fc9bef9/utils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
490,
739,
454,
13332,
3536,
2531,
783,
1207,
11,
5024,
1758,
3476,
1368,
30327,
18,
225,
1220,
353,
7680,
358,
326,
385,
745,
312,
739,
454,
12,
49,
5017,
67,
15487,
96,
49,
5017,
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,
490,
739,
454,
13332,
3536,
2531,
783,
1207,
11,
5024,
1758,
3476,
1368,
30327,
18,
225,
1220,
353,
7680,
358,
326,
385,
745,
312,
739,
454,
12,
49,
5017,
67,
15487,
96,
49,
5017,
67,
... |
print >> out, "}" | if (prefix_scope != "") : print >> out, "}" | def run (args, out=sys.stdout, log=sys.stderr) : pdb_files = [] sources = [] force_new_annotation = False master_phil = libtbx.phil.parse(""" show_all_params = False .type = bool show_histograms = False .type = bool format = *phenix phenix_bonds pymol refmac .type = choice quiet = False .type = bool | 9558adbefa8067b6d42f27f0bcb5bd99ad6b8ebe /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/696/9558adbefa8067b6d42f27f0bcb5bd99ad6b8ebe/secondary_structure.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
261,
1968,
16,
596,
33,
9499,
18,
10283,
16,
613,
33,
9499,
18,
11241,
13,
294,
10892,
67,
2354,
273,
5378,
5550,
273,
5378,
2944,
67,
2704,
67,
11495,
273,
1083,
4171,
67,
844,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
261,
1968,
16,
596,
33,
9499,
18,
10283,
16,
613,
33,
9499,
18,
11241,
13,
294,
10892,
67,
2354,
273,
5378,
5550,
273,
5378,
2944,
67,
2704,
67,
11495,
273,
1083,
4171,
67,
844,
... |
print "umask: ", oct(self.options.umask) | umask = self.options.umask if not umask: umask = os.umask(0777) os.umask(umask) print "umask: ", oct(umask) | def show_options(self): print "zdctl/zdrun options:" print "schemafile: ", repr(self.options.schemafile) print "configfile: ", repr(self.options.configfile) print "interactive: ", repr(self.options.interactive) print "default_to_interactive:", print repr(self.options.default_to_interactive) print "zdrun: ", repr(self.options.zdrun) print "python: ", repr(self.options.python) print "program: ", repr(self.options.program) print "backofflimit:", repr(self.options.backofflimit) print "daemon: ", repr(self.options.daemon) print "forever: ", repr(self.options.forever) print "sockname: ", repr(self.options.sockname) print "exitcodes: ", repr(self.options.exitcodes) print "user: ", repr(self.options.user) print "umask: ", oct(self.options.umask) print "directory: ", repr(self.options.directory) print "logfile: ", repr(self.options.logfile) print "hang_around: ", repr(self.options.hang_around) | 2cea6fb27fc85082865b8560d5696495eacd7567 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9782/2cea6fb27fc85082865b8560d5696495eacd7567/zdctl.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2405,
67,
2116,
12,
2890,
4672,
1172,
315,
94,
72,
12930,
19,
94,
72,
2681,
702,
2773,
1172,
315,
4821,
768,
30,
225,
3104,
8480,
12,
2890,
18,
2116,
18,
4821,
768,
13,
1172,
315,
14... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2405,
67,
2116,
12,
2890,
4672,
1172,
315,
94,
72,
12930,
19,
94,
72,
2681,
702,
2773,
1172,
315,
4821,
768,
30,
225,
3104,
8480,
12,
2890,
18,
2116,
18,
4821,
768,
13,
1172,
315,
14... |
if pkgname in self.deps[arch]: continue | def parse_primary(self, data, arch): if arch not in self.packages: self.packages[arch] = set() if arch not in self.deps: self.deps[arch] = dict() if arch not in self.provides: self.provides[arch] = dict() for pkg in data.getchildren(): if not pkg.tag.endswith('package'): continue pkgname = pkg.find(self.xp + 'name').text self.packages[arch].add(pkgname) | 0b088cc9ad16c4b7f5e63117fa380318a37ee697 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11867/0b088cc9ad16c4b7f5e63117fa380318a37ee697/Packages.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
67,
8258,
12,
2890,
16,
501,
16,
6637,
4672,
309,
6637,
486,
316,
365,
18,
10308,
30,
365,
18,
10308,
63,
991,
65,
273,
444,
1435,
309,
6637,
486,
316,
365,
18,
14877,
30,
365,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
67,
8258,
12,
2890,
16,
501,
16,
6637,
4672,
309,
6637,
486,
316,
365,
18,
10308,
30,
365,
18,
10308,
63,
991,
65,
273,
444,
1435,
309,
6637,
486,
316,
365,
18,
14877,
30,
365,... | |
def findnode(self, expr, node): | def findnode(self, expr, node, **kwargs): | def findnode(self, expr, node): return xpath.findnode(expr, node, context=self, **kwargs) | f67309126dd67672334bc0d10cb7eb33efb2f8d5 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12365/f67309126dd67672334bc0d10cb7eb33efb2f8d5/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1104,
2159,
12,
2890,
16,
3065,
16,
756,
16,
2826,
4333,
4672,
327,
6748,
18,
4720,
2159,
12,
8638,
16,
756,
16,
819,
33,
2890,
16,
2826,
4333,
13,
2,
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,
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,
1104,
2159,
12,
2890,
16,
3065,
16,
756,
16,
2826,
4333,
4672,
327,
6748,
18,
4720,
2159,
12,
8638,
16,
756,
16,
819,
33,
2890,
16,
2826,
4333,
13,
2,
-100,
-100,
-100,
-100,
-100,
-... |
writeExpedLists(enwiktsite, expedListPeople) | updateUserTexts(enwiktsite) | def main(): global expedListPeople | cae84285ccba76e48bebaac64e326424071706fd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12839/cae84285ccba76e48bebaac64e326424071706fd/aperfectbot.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
2552,
1329,
18073,
11227,
11763,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
2552,
1329,
18073,
11227,
11763,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
msvcr71_path = lib_path + '/msvcr71' environ['DBMSVCR71'] = msvcr71_path | msvcr71_mp = lib_mp + '/msvcr71' environ['DBMSVCR71'] = msvcr71_mp | def set_environment_variables(msys, options): """Set the environment variables used by the scripts""" environ = msys.environ msys_root = msys.msys_root prefix = options.prefix if not prefix: prefix = environ.get('PREFIX', '') if prefix: prefix = msys.windows_to_msys(prefix) else: prefix = default_msys_prefix environ['PREFIX'] = prefix path = environ['PATH'] environ['PATH'] = "%s:%s/bin" % (path, prefix) environ['BDCONF'] = as_flag(options.configure and not options.clean_only) environ['BDCOMP'] = as_flag(options.compile and not options.clean_only) environ['BDINST'] = as_flag(options.install and options.compile and not options.clean_only) environ['BDSTRIP'] = as_flag(options.compile and options.install and options.strip and not options.clean_only) environ['BDCLEAN'] = as_flag(options.clean or options.clean_only) environ.pop('INCLUDE', None) # INCLUDE causes problems with MIXER. lib_path = prefix + '/lib' msvcr71_path = '' if options.msvcr71: # Hide the msvcrt.dll import libraries with those for msvcr71.dll. # Their subdirectory is in the same directory as the SDL library. msvcr71_path = lib_path + '/msvcr71' environ['DBMSVCR71'] = msvcr71_path environ['LDFLAGS'] = merge_strings(environ.get('LDFLAGS', ''), as_linker_lib_path(lib_path), as_linker_lib_path(msvcr71_path), sep=' ') # For dependency headers. include_path = prefix + '/include' environ['CPATH'] = merge_strings(include_path, environ.get('CPATH', ''), sep=';') | 6cc175b4d62b091cb925208acc4e34512909ee4f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1298/6cc175b4d62b091cb925208acc4e34512909ee4f/msys_build_deps.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
67,
10274,
67,
7528,
12,
959,
1900,
16,
702,
4672,
3536,
694,
326,
3330,
3152,
1399,
635,
326,
8873,
8395,
225,
5473,
273,
4086,
1900,
18,
28684,
4086,
1900,
67,
3085,
273,
4086,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
67,
10274,
67,
7528,
12,
959,
1900,
16,
702,
4672,
3536,
694,
326,
3330,
3152,
1399,
635,
326,
8873,
8395,
225,
5473,
273,
4086,
1900,
18,
28684,
4086,
1900,
67,
3085,
273,
4086,
... |
logging.error("Can't open cache file %s [%s]" % (filename, str(err)) | logging.error("Can't open cache file %s [%s]" % (filename, str(err))) | def open(self, filename=None, mode='r', bufsize=-1): """ open the cache for reading/writing | 5472d81b544d91bb8ed18749dbc35faa8b726c7b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/888/5472d81b544d91bb8ed18749dbc35faa8b726c7b/caching.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1696,
12,
2890,
16,
1544,
33,
7036,
16,
1965,
2218,
86,
2187,
1681,
1467,
29711,
21,
4672,
3536,
1696,
326,
1247,
364,
6453,
19,
14345,
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,
1696,
12,
2890,
16,
1544,
33,
7036,
16,
1965,
2218,
86,
2187,
1681,
1467,
29711,
21,
4672,
3536,
1696,
326,
1247,
364,
6453,
19,
14345,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
self._children[1].dev_path) | self._children[1].dev_path, self.size) | def _FastAssemble(self): """Assemble the drbd device from zero. | f069addf353513ae981a6139ad9f223cbba71542 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7542/f069addf353513ae981a6139ad9f223cbba71542/bdev.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
12305,
1463,
10045,
12,
2890,
4672,
3536,
1463,
10045,
326,
5081,
16410,
2346,
628,
3634,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
12305,
1463,
10045,
12,
2890,
4672,
3536,
1463,
10045,
326,
5081,
16410,
2346,
628,
3634,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
if _arguments.has_key('errn'): | if _arguments.get('errn', 0): | def quit(self, _no_object=None, _attributes={}, **_arguments): """quit: Quit the Terminal application Keyword argument _attributes: AppleEvent attribute dictionary """ _code = 'core' _subcode = 'quit' | d883fe0f8edb19c1db13af7f62ca177c49791de6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/d883fe0f8edb19c1db13af7f62ca177c49791de6/Terminal_Suite.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9706,
12,
2890,
16,
389,
2135,
67,
1612,
33,
7036,
16,
389,
4350,
28793,
2826,
67,
7099,
4672,
3536,
27176,
30,
4783,
305,
326,
18778,
2521,
18317,
1237,
389,
4350,
30,
1716,
1802,
1133,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9706,
12,
2890,
16,
389,
2135,
67,
1612,
33,
7036,
16,
389,
4350,
28793,
2826,
67,
7099,
4672,
3536,
27176,
30,
4783,
305,
326,
18778,
2521,
18317,
1237,
389,
4350,
30,
1716,
1802,
1133,... |
ns.update({'linkThrough': self.user.checkPermission( 'r', item.permissions) and field_type.linkThrough}) | ns.update( {'linkThrough': self.user.checkPermission( 'r', item.permissions) and field_type.linkThrough, 'field_suffix': '%s:%s' % \ (item.fields['id'].convertToString(item.id), name)} ) | def showFieldInIndex(self, item, name, allow_edit=1): '''Return representation of field in stream''' stream = item.stream field_type = stream.indexFields[name] stream_perms = self.user.getPermissions(stream.permissions) perms = self.user.getPermissions(field_type.indexPermissions) if allow_edit and 'w' in stream_perms and 'w' in perms: template_type = 'edit' elif 'r' in perms: template_type = 'view' else: return '' template_type = 'index-' + template_type ns = self.fieldGlobalNamespace.copy() ns.update({'linkThrough': self.user.checkPermission( 'r', item.permissions) and field_type.linkThrough}) return field_type.show(item, name, template_type, self.edit.getFieldTemplate, ns) # XXX namespace | a6402ab4576e6afcfb61108f12f6f17aab8914a5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1871/a6402ab4576e6afcfb61108f12f6f17aab8914a5/qEdit.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2405,
974,
382,
1016,
12,
2890,
16,
761,
16,
508,
16,
1699,
67,
4619,
33,
21,
4672,
9163,
990,
4335,
434,
652,
316,
1407,
26418,
1407,
273,
761,
18,
3256,
652,
67,
723,
273,
1407,
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,
2405,
974,
382,
1016,
12,
2890,
16,
761,
16,
508,
16,
1699,
67,
4619,
33,
21,
4672,
9163,
990,
4335,
434,
652,
316,
1407,
26418,
1407,
273,
761,
18,
3256,
652,
67,
723,
273,
1407,
18... |
self.longTypes = set(('ACTI','ALCH','AMMO','FURN','MISC','MSTT','PROJ','WEAP','CONT','DOOR','LIGH','STAT', 'DEBR','EXPL','MGEF','SCPT','SPEL','SOUN','NPC_','WATR','TXST','ENCH','FLST','IPDS','STAT','NOTE','QUST')) | self.longTypes = set(('ACTI','ALCH','AMMO','ARMO','BOOK','CONT','CREA','DEBR','DIAL', 'DOOR','ENCH','EXPL','FACT','FLOR','FLST','FURN','INFO','INGR', 'IPDS','KEYM','LIGH','MGEF','MISC','MSTT','NOTE','NPC_','PROJ', 'QUST','SCPT','SOUN','SPEL','STAT','TERM','TXST','WATR','WEAP')) | def initPatchFile(self,patchFile,loadMods): """Prepare to handle specified patch mod. All functions are called after this.""" Patcher.initPatchFile(self,patchFile,loadMods) self.id_data = {} #--Names keyed by long fid. self.srcClasses = set() #--Record classes actually provided by src mods/files. self.sourceMods = self.getConfigChecked() self.isActive = len(self.sourceMods) != 0 #--Type Fields recAttrs_class = self.recAttrs_class = {} for recClass in (MreActi,MreAlch,MreAmmo,MreFurn,MreMisc,MreMstt,MreProj,MreWeap): recAttrs_class[recClass] = ('destructable',) for recClass in (MreCont,MreDoor,MreTerm): recAttrs_class[recClass] = ('destructable','script',) for recClass in (MreLigh,): recAttrs_class[recClass] = ('script',) for recClass in (MreStat,): recAttrs_class[recClass] = ('model',) self.longTypes = set(('ACTI','ALCH','AMMO','FURN','MISC','MSTT','PROJ','WEAP','CONT','DOOR','LIGH','STAT', 'DEBR','EXPL','MGEF','SCPT','SPEL','SOUN','NPC_','WATR','TXST','ENCH','FLST','IPDS','STAT','NOTE','QUST')) | 6073e968e057113196b5f851cf9eca178ed7ea76 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6682/6073e968e057113196b5f851cf9eca178ed7ea76/bosh.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1208,
7332,
812,
12,
2890,
16,
2272,
812,
16,
945,
1739,
87,
4672,
3536,
7543,
358,
1640,
1269,
4729,
681,
18,
4826,
4186,
854,
2566,
1839,
333,
12123,
12042,
264,
18,
2738,
7332,
812,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
7332,
812,
12,
2890,
16,
2272,
812,
16,
945,
1739,
87,
4672,
3536,
7543,
358,
1640,
1269,
4729,
681,
18,
4826,
4186,
854,
2566,
1839,
333,
12123,
12042,
264,
18,
2738,
7332,
812,
... |
ALGORITHM: These are simple functions of the b invariants. | ALGORITHM: These are simple functions of the b-invariants. | def c_invariants(self): """ The c-invariants of this elliptic curve. | 09e345b25236d5bd15eecd86cc093a836e7ba6db /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/09e345b25236d5bd15eecd86cc093a836e7ba6db/ell_generic.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
276,
67,
267,
15886,
12,
2890,
4672,
3536,
1021,
276,
17,
267,
15886,
434,
333,
415,
549,
21507,
8882,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
276,
67,
267,
15886,
12,
2890,
4672,
3536,
1021,
276,
17,
267,
15886,
434,
333,
415,
549,
21507,
8882,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
if not self or not keys: | if not keys: | def intersection(self, keys): """ Return the intersection of the segmentlists associated with the keys in keys. """ if not self or not keys: return segmentlist() it = iter(keys) seglist = self[it.next()] for value in map(self.__getitem__, it): seglist &= value return seglist | 81ea853af8e4fbb043ac0514c34e9c62ff7369b9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3589/81ea853af8e4fbb043ac0514c34e9c62ff7369b9/segments.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7619,
12,
2890,
16,
1311,
4672,
3536,
2000,
326,
7619,
434,
326,
3267,
9772,
3627,
598,
326,
1311,
316,
1311,
18,
3536,
309,
486,
1311,
30,
327,
3267,
1098,
1435,
518,
273,
1400,
12,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7619,
12,
2890,
16,
1311,
4672,
3536,
2000,
326,
7619,
434,
326,
3267,
9772,
3627,
598,
326,
1311,
316,
1311,
18,
3536,
309,
486,
1311,
30,
327,
3267,
1098,
1435,
518,
273,
1400,
12,
2... |
else: | else: | def on_add_new_tag(self, widget=None, tid=None, tryagain = False): if not tid: self.tids_to_addtag = self.get_selected_tasks() else: self.tids_to_addtag = [tid] | af74a98ec19f37511107740256b5e851bc105fab /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/af74a98ec19f37511107740256b5e851bc105fab/browser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
67,
1289,
67,
2704,
67,
2692,
12,
2890,
16,
3604,
33,
7036,
16,
11594,
33,
7036,
16,
775,
23095,
273,
1083,
4672,
309,
486,
11594,
30,
365,
18,
88,
2232,
67,
869,
67,
1289,
2692... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
67,
1289,
67,
2704,
67,
2692,
12,
2890,
16,
3604,
33,
7036,
16,
11594,
33,
7036,
16,
775,
23095,
273,
1083,
4672,
309,
486,
11594,
30,
365,
18,
88,
2232,
67,
869,
67,
1289,
2692... |
Draw.Text("This dataref can't be used for animation") | Draw.Text("This is not a valid dataref") | def drawdataref(datarefs, indices, eventbase, boneno, x, y): dataref=datarefs[boneno] valid=True mbutton=Draw.Menu('sim/%t|'+'/...|'.join(firstlevel)+'/...', DONTCARE+eventbase, x+4, y, CONTROLSIZE, CONTROLSIZE, -1, 'Pick the dataref from a list', datarefmenucallback) bbutton=Draw.String('', DATAREF_B+eventbase, x+4+CONTROLSIZE, y, PANELWIDTH-2*PANELINDENT-CONTROLSIZE, CONTROLSIZE, dataref, 100, 'Full name of the dataref used to animate this object') ibutton=None tbutton=None ref=dataref.split('/') if len(ref)<=1 or ref[0]=='sim': try: thing=hierarchy for i in range(len(ref)): thing=thing[ref[i]] n=thing+0 # check is a leaf - ie numeric if not n: BGL.glRasterPos2d(x+4, y-21) Draw.Text("This dataref can't be used for animation") valid=False elif n==1: indices[boneno]=None else: if indices[boneno]==None or indices[boneno]>=n: indices[boneno]=0 Draw.Label("Part number:", x, y-26, 120, CONTROLSIZE) ibutton=Draw.Number('', INDICES_B+eventbase, x+108, y-26, 50, CONTROLSIZE, indices[boneno], 0, n-1, 'The part number / array index') except: BGL.glRasterPos2d(x+4, y-21) Draw.Text("This is not a valid dataref") valid=False else: if indices[boneno]!=None: val=1 else: val=0 tbutton=Draw.Toggle('Part number', INDICES_T+eventbase, x+4, y-26, 104, CONTROLSIZE, val, 'Whether this is an array dataref') if val: ibutton=Draw.Number('', INDICES_B+eventbase, x+108, y-26, 50, CONTROLSIZE, indices[boneno], 0, 729, 'The part number / array index') return (valid, mbutton,bbutton,ibutton,tbutton) | 41ec1c2655a325b4ea4136d5c1ee7cf29022441f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/10896/41ec1c2655a325b4ea4136d5c1ee7cf29022441f/XPlaneAnimObject.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3724,
892,
1734,
12,
892,
9316,
16,
4295,
16,
871,
1969,
16,
324,
265,
5764,
16,
619,
16,
677,
4672,
225,
501,
1734,
33,
892,
9316,
63,
18688,
5764,
65,
923,
33,
5510,
225,
4903,
264... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3724,
892,
1734,
12,
892,
9316,
16,
4295,
16,
871,
1969,
16,
324,
265,
5764,
16,
619,
16,
677,
4672,
225,
501,
1734,
33,
892,
9316,
63,
18688,
5764,
65,
923,
33,
5510,
225,
4903,
264... |
"""Generator a text representation of a message. | """Generates a text representation of a message. | def _handle_message(self, msg): s = StringIO() g = self.clone(s) # The payload of a message/rfc822 part should be a multipart sequence # of length 1. The zeroth element of the list should be the Message # object for the subpart. Extract that object, stringify it, and # write it out. # Except, it turns out, when it's a string instead, which happens when # and only when HeaderParser is used on a message of mime type # message/rfc822. Such messages are generated by, for example, # Groupwise when forwarding unadorned messages. (Issue 7970.) So # in that case we just emit the string body. payload = msg.get_payload() if isinstance(payload, list): g.flatten(msg.get_payload(0), unixfrom=False) payload = s.getvalue() self._fp.write(payload) | 74ed5a6c8e84164baa77c94afbdf7b2ff748edf4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3187/74ed5a6c8e84164baa77c94afbdf7b2ff748edf4/generator.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
4110,
67,
2150,
12,
2890,
16,
1234,
4672,
272,
273,
15777,
1435,
314,
273,
365,
18,
14056,
12,
87,
13,
468,
1021,
2385,
434,
279,
883,
19,
16784,
24532,
1087,
1410,
506,
279,
1026... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4110,
67,
2150,
12,
2890,
16,
1234,
4672,
272,
273,
15777,
1435,
314,
273,
365,
18,
14056,
12,
87,
13,
468,
1021,
2385,
434,
279,
883,
19,
16784,
24532,
1087,
1410,
506,
279,
1026... |
name = object.__name__ | realname = object.__name__ name = name or realname | def docclass(self, object, funcs={}, classes={}): """Produce HTML documentation for a class object.""" name = object.__name__ bases = object.__bases__ contents = '' | 54a838fe1421d6e6829cabc42e7f398722140804 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/54a838fe1421d6e6829cabc42e7f398722140804/pydoc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
997,
1106,
12,
2890,
16,
733,
16,
15630,
28793,
3318,
12938,
4672,
3536,
25884,
3982,
7323,
364,
279,
667,
733,
12123,
2863,
529,
273,
733,
16186,
529,
972,
508,
273,
508,
578,
2863,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
997,
1106,
12,
2890,
16,
733,
16,
15630,
28793,
3318,
12938,
4672,
3536,
25884,
3982,
7323,
364,
279,
667,
733,
12123,
2863,
529,
273,
733,
16186,
529,
972,
508,
273,
508,
578,
2863,
529... |
standards = [('README', 'README.txt'), 'setup.py'] | standards = [('README', 'README.txt'), self.distribution.script_name] | def add_defaults (self): """Add all the default files to self.filelist: - README or README.txt - setup.py - test/test*.py - all pure Python modules mentioned in setup script - all C sources listed as part of extensions or C libraries in the setup script (doesn't catch C headers!) Warns if (README or README.txt) or setup.py are missing; everything else is optional. """ | d3b76a8fbfc2af2d01ce48c323c9f76c0947af49 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/d3b76a8fbfc2af2d01ce48c323c9f76c0947af49/sdist.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
67,
7606,
261,
2890,
4672,
3536,
986,
777,
326,
805,
1390,
358,
365,
18,
7540,
5449,
30,
300,
10746,
958,
578,
10746,
958,
18,
5830,
300,
3875,
18,
2074,
300,
1842,
19,
3813,
1114... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
7606,
261,
2890,
4672,
3536,
986,
777,
326,
805,
1390,
358,
365,
18,
7540,
5449,
30,
300,
10746,
958,
578,
10746,
958,
18,
5830,
300,
3875,
18,
2074,
300,
1842,
19,
3813,
1114... |
'fi' : lambda v: dh_yearBC( v, u'%d eaa' ), | 'fi' : lambda v: dh_yearBC( v, u'%d eaa.' ), | def MakeParameter( decoder, param ): newValue = decoder[1](param) if len(decoder) == 4 and len(newValue) < decoder[3]: # force parameter length by taking the first digit in the list and repeating it required number of times # This converts "205" into "0205" for "%4d" newValue = decoder[0][0] * (decoder[3]-len(newValue)) + newValue return newValue | 9c89f2d41aa715a883a13e3d4522c33979f1a94a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4404/9c89f2d41aa715a883a13e3d4522c33979f1a94a/date.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4344,
1662,
12,
8320,
16,
579,
262,
30,
6129,
273,
8320,
63,
21,
29955,
891,
13,
309,
562,
12,
21070,
13,
422,
1059,
471,
562,
12,
2704,
620,
13,
411,
8320,
63,
23,
14542,
468,
2944,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4344,
1662,
12,
8320,
16,
579,
262,
30,
6129,
273,
8320,
63,
21,
29955,
891,
13,
309,
562,
12,
21070,
13,
422,
1059,
471,
562,
12,
2704,
620,
13,
411,
8320,
63,
23,
14542,
468,
2944,... |
bridgeDll.releaseJavaObject(source) | bridgeDll.releaseJavaObject(vmID,event) | def internal_event_stateChange(vmID,event,source,oldState,newState): queueHandler.queueFunction(queueHandler.eventQueue,event_stateChange,vmID,source,oldState,newState) bridgeDll.releaseJavaObject(source) | 748d23167873589da4dc30858c6ec1b80dd9043d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9340/748d23167873589da4dc30858c6ec1b80dd9043d/JABHandler.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2713,
67,
2575,
67,
2019,
3043,
12,
3489,
734,
16,
2575,
16,
3168,
16,
1673,
1119,
16,
2704,
1119,
4672,
2389,
1503,
18,
4000,
2083,
12,
4000,
1503,
18,
2575,
3183,
16,
2575,
67,
2019,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2713,
67,
2575,
67,
2019,
3043,
12,
3489,
734,
16,
2575,
16,
3168,
16,
1673,
1119,
16,
2704,
1119,
4672,
2389,
1503,
18,
4000,
2083,
12,
4000,
1503,
18,
2575,
3183,
16,
2575,
67,
2019,... |
return self([R.random_element(bound) for _ in xrange(degree+1)]) | return self([R.random_element(*args, **kwds) for _ in xrange(degree+1)]) | def random_element(self, degree, bound=0): """ Return a random polynomial. INPUT: degree -- an integer bound -- an integer (default: 0, which tries to spread choice across ring, if implemented) | ced0954b16d84a882d8d9cf307561cead174d11c /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/ced0954b16d84a882d8d9cf307561cead174d11c/polynomial_ring.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2744,
67,
2956,
12,
2890,
16,
10782,
16,
2489,
33,
20,
4672,
3536,
2000,
279,
2744,
16991,
18,
225,
12943,
30,
10782,
1493,
392,
3571,
2489,
1493,
392,
3571,
261,
1886,
30,
374,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2744,
67,
2956,
12,
2890,
16,
10782,
16,
2489,
33,
20,
4672,
3536,
2000,
279,
2744,
16991,
18,
225,
12943,
30,
10782,
1493,
392,
3571,
2489,
1493,
392,
3571,
261,
1886,
30,
374,
16,
14... |
print "barrier: new client tag=%s, name=%s" % \ (tag, name) | self.report("new client tag=%s, name=%s" % (tag, name)) | def master_welcome(self, connection): (client, addr) = connection name = None | bb655f3af134dd0fb185950c28aa4391201eb99d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12268/bb655f3af134dd0fb185950c28aa4391201eb99d/barrier.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4171,
67,
91,
16312,
12,
2890,
16,
1459,
4672,
261,
2625,
16,
3091,
13,
273,
1459,
508,
273,
599,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4171,
67,
91,
16312,
12,
2890,
16,
1459,
4672,
261,
2625,
16,
3091,
13,
273,
1459,
508,
273,
599,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
img = Image(imgname, width=printWidth*0.95, height=printHeight*0.95) | img = Image(imgname, width=printWidth*0.90, height=printHeight*0.90) | def renderTable(self, table): """ method that checks if a table can be rendered by reportlab. this is done, b/c large tables cause problems. if a large table is detected, it is rendered on a doublesize canvas and - on success - embedded as an scaled down image. """ | 442c211dd1dd7d424d7dbd07df420a4df660573f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12390/442c211dd1dd7d424d7dbd07df420a4df660573f/rlwriter.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1743,
1388,
12,
2890,
16,
1014,
4672,
3536,
707,
716,
4271,
309,
279,
1014,
848,
506,
7935,
635,
2605,
7411,
18,
333,
353,
2731,
16,
324,
19,
71,
7876,
4606,
4620,
9688,
18,
309,
279,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1743,
1388,
12,
2890,
16,
1014,
4672,
3536,
707,
716,
4271,
309,
279,
1014,
848,
506,
7935,
635,
2605,
7411,
18,
333,
353,
2731,
16,
324,
19,
71,
7876,
4606,
4620,
9688,
18,
309,
279,
... |
jump(i0, i1) """ self.optimize_loop(ops, expected) | jump(i0, i1, i22) """ expected = """ [i0, i1, i22] i3 = int_mul(i22, i1) i4 = int_lt(i3, 10) guard_true(i4) [] i5 = int_gt(i3, 2) guard_true(i5) [] jump(i0, i1, i22) """ self.optimize_loop(ops, expected, preamble) | def test_mul_ovf_before(self): ops = """ [i0, i1] i2 = int_and(i0, 255) i22 = int_add(i2, 1) i3 = int_mul_ovf(i22, i1) guard_no_overflow() [] i4 = int_lt(i3, 10) guard_true(i4) [] i5 = int_gt(i3, 2) guard_true(i5) [] i6 = int_lt(i1, 0) guard_false(i6) [] jump(i0, i1) """ expected = """ [i0, i1] i2 = int_and(i0, 255) i22 = int_add(i2, 1) i3 = int_mul_ovf(i22, i1) guard_no_overflow() [] i4 = int_lt(i3, 10) guard_true(i4) [] i5 = int_gt(i3, 2) guard_true(i5) [] jump(i0, i1) """ self.optimize_loop(ops, expected) | addc2b77177b49468137a20034ac27db7b4ba464 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6934/addc2b77177b49468137a20034ac27db7b4ba464/test_optimizeopt.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
16411,
67,
1527,
74,
67,
5771,
12,
2890,
4672,
6727,
273,
3536,
306,
77,
20,
16,
277,
21,
65,
277,
22,
273,
509,
67,
464,
12,
77,
20,
16,
4561,
13,
277,
3787,
273,
509,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
16411,
67,
1527,
74,
67,
5771,
12,
2890,
4672,
6727,
273,
3536,
306,
77,
20,
16,
277,
21,
65,
277,
22,
273,
509,
67,
464,
12,
77,
20,
16,
4561,
13,
277,
3787,
273,
509,
... |
output(sys.exc_info()[1]) | err = sys.exc_info()[1] output(str(err)) | def parse(file): scanner = ASDLScanner() parser = ASDLParser() buf = open(file).read() tokens = scanner.tokenize(buf) try: return parser.parse(tokens) except ASDLSyntaxError: output(sys.exc_info()[1]) lines = buf.split("\n") output(lines[err.lineno - 1]) # lines starts at 0, files at 1 | b0dae87f1237dc0a4098d9cdd8f8d6ac77f7b6e3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3187/b0dae87f1237dc0a4098d9cdd8f8d6ac77f7b6e3/asdl.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
12,
768,
4672,
7683,
273,
5355,
8914,
11338,
1435,
2082,
273,
5355,
8914,
2678,
1435,
225,
1681,
273,
1696,
12,
768,
2934,
896,
1435,
2430,
273,
7683,
18,
2316,
554,
12,
4385,
13,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
12,
768,
4672,
7683,
273,
5355,
8914,
11338,
1435,
2082,
273,
5355,
8914,
2678,
1435,
225,
1681,
273,
1696,
12,
768,
2934,
896,
1435,
2430,
273,
7683,
18,
2316,
554,
12,
4385,
13,
... |
('L,Characteristics', 'L,TimeDateStamp', 'H,MajorVersion', 'H,MinorVersion', | ('I,Characteristics', 'I,TimeDateStamp', 'H,MajorVersion', 'H,MinorVersion', | def __init__(self, **args): for key, value in args.items(): setattr(self, key, value) | b1bfd27bf7c329d36f68dc5f4ed5adda7c025501 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4177/b1bfd27bf7c329d36f68dc5f4ed5adda7c025501/pefile.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
2826,
1968,
4672,
364,
498,
16,
460,
316,
833,
18,
3319,
13332,
9241,
12,
2890,
16,
498,
16,
460,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
2826,
1968,
4672,
364,
498,
16,
460,
316,
833,
18,
3319,
13332,
9241,
12,
2890,
16,
498,
16,
460,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
if "location" in headers: newurl = headers["location"] elif "uri" in headers: newurl = headers["uri"] else: return newurl = urlparse.urljoin(req.get_full_url(), newurl) | def redirect_request(self, req, fp, code, msg, headers): """Return a Request or None in response to a redirect. | 0389295dcdc72df81a037d2712afea600aad9445 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/0389295dcdc72df81a037d2712afea600aad9445/urllib2.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3136,
67,
2293,
12,
2890,
16,
1111,
16,
4253,
16,
981,
16,
1234,
16,
1607,
4672,
3536,
990,
279,
1567,
578,
599,
316,
766,
358,
279,
3136,
18,
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,
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,
3136,
67,
2293,
12,
2890,
16,
1111,
16,
4253,
16,
981,
16,
1234,
16,
1607,
4672,
3536,
990,
279,
1567,
578,
599,
316,
766,
358,
279,
3136,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
... | |
else: | elif not urlparse(tag['href'])[0]: | def parse_tag(self, tag, parent_css): try: tagname = tag.name.lower() except AttributeError: if not isinstance(tag, HTMLConverter.IGNORED_TAGS): self.add_text(tag, parent_css, {}) return tag_css, tag_pseudo_css = self.tag_css(tag, parent_css=parent_css) try: # Skip element if its display attribute is set to none if tag_css['display'].lower() == 'none' or \ tag_css['visibility'].lower() == 'hidden': return except KeyError: pass end_page = self.process_page_breaks(tag, tagname, tag_css) if tagname in ["title", "script", "meta", 'del', 'frameset']: pass elif tagname == 'a' and self.link_levels >= 0: if tag.has_key('href') and not self.link_exclude.match(tag['href']): path = munge_paths(self.target_prefix, tag['href'])[0] ext = os.path.splitext(path)[1] if ext: ext = ext[1:].lower() if os.access(path, os.R_OK): if ext in ['png', 'jpg', 'bmp', 'jpeg']: self.process_image(path, tag_css) else: text = self.get_text(tag, limit=1000) if not text.strip(): text = "Link" self.add_text(text, tag_css, {}, force_span_use=True) self.links.append(self.create_link(self.current_para.contents, tag)) if tag.has_key('id') or tag.has_key('name'): key = 'name' if tag.has_key('name') else 'id' self.targets[self.target_prefix+tag[key]] = self.current_block else: self.logger.warn('Could not follow link to '+tag['href']) elif tag.has_key('name') or tag.has_key('id'): self.process_anchor(tag, tag_css, tag_pseudo_css) elif tagname == 'img': if tag.has_key('src'): path = munge_paths(self.target_prefix, tag['src'])[0] if os.access(path, os.R_OK): width, height = None, None try: width = int(tag['width']) height = int(tag['height']) except: pass dropcaps = tag.has_key('class') and tag['class'] == 'libprs500_dropcaps' self.process_image(path, tag_css, width, height, dropcaps=dropcaps) else: self.logger.warn('Could not find image: '+tag['src']) else: self.logger.debug("Failed to process: %s", str(tag)) elif tagname in ['style', 'link']: ncss, npcss = {}, {} if tagname == 'style': for c in tag.contents: if isinstance(c, NavigableString): css, pcss = self.parse_css(str(c)) ncss.update(css) npcss.update(pcss) elif tag.has_key('type') and tag['type'] == "text/css" \ and tag.has_key('href'): path = munge_paths(self.target_prefix, tag['href'])[0] try: f = open(path, 'rb') src = f.read() f.close() match = self.PAGE_BREAK_PAT.search(src) if match and not re.match('avoid', match.group(1), re.IGNORECASE): self.page_break_found = True ncss, npcss = self.parse_css(src) except IOError: self.logger.warn('Could not read stylesheet: '+tag['href']) if ncss: update_css(ncss, self.css) self.css.update(self.override_css) if npcss: update_css(npcss, self.pseudo_css) self.pseudo_css.update(self.override_pcss) elif tagname == 'pre': self.end_current_para() self.end_current_block() self.current_block = self.book.create_text_block() ts = self.current_block.textStyle.copy() self.current_block.textStyle = ts self.current_block.textStyle.attrs['parindent'] = '0' if tag.contents: c = tag.contents[0] if isinstance(c, NavigableString): c = unicode(c).replace('\r\n', '\n').replace('\r', '\n') if c.startswith('\n'): c = c[1:] tag.contents[0] = NavigableString(c) tag.contents[0].setup(tag) self.process_children(tag, tag_css, tag_pseudo_css) self.end_current_block() elif tagname in ['ul', 'ol', 'dl']: self.list_level += 1 if tagname == 'ol': old_counter = self.list_counter self.list_counter = 1 prev_bs = self.current_block.blockStyle self.end_current_block() attrs = self.current_block.blockStyle.attrs attrs = attrs.copy() attrs['sidemargin'] = self.list_indent*self.list_level bs = self.book.create_block_style(**attrs) self.current_block = self.book.create_text_block( blockStyle=bs, textStyle=self.unindented_style) self.process_children(tag, tag_css, tag_pseudo_css) self.end_current_block() self.current_block.blockStyle = prev_bs self.list_level -= 1 if tagname == 'ol': self.list_counter = old_counter elif tagname in ['li', 'dt', 'dd']: margin = self.list_indent*self.list_level if tagname == 'dd': margin += 80 if int(self.current_block.blockStyle.attrs['sidemargin']) != margin: self.end_current_block() attrs = self.current_block.blockStyle.attrs attrs = attrs.copy() attrs['sidemargin'] = margin attrs['blockwidth'] = int(attrs['blockwidth']) + margin bs = self.book.create_block_style(**attrs) self.current_block = self.book.create_text_block( blockStyle=bs, textStyle=self.unindented_style) | 2e52d6dfe34d581cf37a65a4b03909a18d938c95 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9125/2e52d6dfe34d581cf37a65a4b03909a18d938c95/convert_from.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
67,
2692,
12,
2890,
16,
1047,
16,
982,
67,
5212,
4672,
775,
30,
25586,
273,
1047,
18,
529,
18,
8167,
1435,
1335,
6394,
30,
309,
486,
1549,
12,
2692,
16,
3982,
5072,
18,
3047,
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,
1109,
67,
2692,
12,
2890,
16,
1047,
16,
982,
67,
5212,
4672,
775,
30,
25586,
273,
1047,
18,
529,
18,
8167,
1435,
1335,
6394,
30,
309,
486,
1549,
12,
2692,
16,
3982,
5072,
18,
3047,
3... |
self.failUnless(within_tol(y1, y2, eps)) | self.failUnless(within_tol(pdist_y, right_y, eps)) | def test_pdist_canberra_ticket_711(self): "Tests pdist(X, 'canberra') to see if Canberra gives the right result as reported in Scipy bug report 711." eps = 1e-10 pdist_y = pdist(([3.3], [3.4]), "canberra") right_y = array([ 0.01492537]) print np.abs(pdist_y-right_y).max() self.failUnless(within_tol(y1, y2, eps)) | 42524e25d90cfdb0f6e35b82865271d230022b9b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5882/42524e25d90cfdb0f6e35b82865271d230022b9b/test_distance.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
84,
4413,
67,
4169,
744,
354,
67,
16282,
67,
27,
2499,
12,
2890,
4672,
315,
14650,
293,
4413,
12,
60,
16,
296,
4169,
744,
354,
6134,
358,
2621,
309,
4480,
744,
354,
14758,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
84,
4413,
67,
4169,
744,
354,
67,
16282,
67,
27,
2499,
12,
2890,
4672,
315,
14650,
293,
4413,
12,
60,
16,
296,
4169,
744,
354,
6134,
358,
2621,
309,
4480,
744,
354,
14758,
... |
"--revision", revision] | "--revision", revision=='HEAD' and 'COMMITTED' or revision] | def _checkoutUpstreamRevision(self, revision): """ Concretely do the checkout of the upstream revision. """ | 9272b4c59f9eef30eff20e7991a58d76f39b245d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5981/9272b4c59f9eef30eff20e7991a58d76f39b245d/svn.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
17300,
1211,
3256,
7939,
12,
2890,
16,
6350,
4672,
3536,
735,
71,
1349,
2357,
741,
326,
13926,
434,
326,
13505,
6350,
18,
3536,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
17300,
1211,
3256,
7939,
12,
2890,
16,
6350,
4672,
3536,
735,
71,
1349,
2357,
741,
326,
13926,
434,
326,
13505,
6350,
18,
3536,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
THUMB_WIDTH = 75 THUMB_HEIGHT = 100 | def numberTranslate(self): hundredsNumber = 0 thousandsNumber = 0 hundredsString = "" thousandsString = "" resultString = "" self.suffix = '' | a2251a4a5989848b289a600eef15a83f23c98365 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9125/a2251a4a5989848b289a600eef15a83f23c98365/catalog.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1300,
12818,
12,
2890,
4672,
366,
1074,
15422,
1854,
273,
374,
286,
24810,
1854,
273,
374,
366,
1074,
15422,
780,
273,
1408,
286,
24810,
780,
273,
1408,
563,
780,
273,
1408,
365,
18,
847... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1300,
12818,
12,
2890,
4672,
366,
1074,
15422,
1854,
273,
374,
286,
24810,
1854,
273,
374,
366,
1074,
15422,
780,
273,
1408,
286,
24810,
780,
273,
1408,
563,
780,
273,
1408,
365,
18,
847... | |
assert all(array(conjugate(transpose(B)), mB.H)) | assert all(array(conjugate(transpose(B)) == mB.H)) | def test_basic(self): from scipy import linalg A = array([[1., 2.], [3., 4.]]) mA = matrix(A) assert allclose(linalg.inv(A), mA.I) assert all(array(transpose(A) == mA.T)) assert all(array(transpose(A) == mA.H)) assert all(A == mA.A) B = A + 2j*A mB = matrix(B) assert allclose(linalg.inv(B), mB.I) assert all(array(transpose(B) == mB.T)) assert all(array(conjugate(transpose(B)), mB.H)) | 1add63fa4c2e4b1af420d79aadee9525b074c688 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14925/1add63fa4c2e4b1af420d79aadee9525b074c688/test_matrix.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
13240,
12,
2890,
4672,
628,
10966,
1930,
11818,
225,
432,
273,
526,
3816,
63,
21,
12990,
576,
18,
6487,
306,
23,
12990,
1059,
18,
65,
5717,
312,
37,
273,
3148,
12,
37,
13,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
13240,
12,
2890,
4672,
628,
10966,
1930,
11818,
225,
432,
273,
526,
3816,
63,
21,
12990,
576,
18,
6487,
306,
23,
12990,
1059,
18,
65,
5717,
312,
37,
273,
3148,
12,
37,
13,
... |
if datatype is not None: x = datatype.encode(x) line.append('%s=%s' % (key, quote_plus(x))) | if x is None: line.append(key) else: if datatype: x = datatype.encode(x) line.append('%s=%s' % (key, quote_plus(x))) | def encode_query(query, schema=None): """This method encodes a query as defined by the "application/x-www-form-urlencoded" content type (see http://www.w3.org/TR/REC-html40/interact/forms.html#h-17.13.4.1 for details) The value expected is a dictonary like {'a': 1, 'b': 2}. The value returned is a byte string like "a=1&b=2". """ if schema is None: schema = {} line = [] for key in query: value = query[key] key = quote_plus(key) # XXX As of the application/x-www-form-urlencoded content type, # it has not sense to have a parameter without a value, so # "?a&b=1" should be the same as "?b=1" (check the spec). # But for the tests defined by RFC2396 to pass, we must preserve # these empty parameters. if value is None: line.append(key) continue # A list datatype = schema.get(key) if isinstance(value, list): for x in value: if datatype is not None: x = datatype.encode(x) line.append('%s=%s' % (key, quote_plus(x))) continue # A singleton if datatype is not None: value = datatype.encode(value) line.append('%s=%s' % (key, quote_plus(value))) return '&'.join(line) | 26f419a19ced0bc7df994eee451427f2120595db /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12681/26f419a19ced0bc7df994eee451427f2120595db/generic.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2017,
67,
2271,
12,
2271,
16,
1963,
33,
7036,
4672,
3536,
2503,
707,
16834,
279,
843,
487,
2553,
635,
326,
315,
3685,
19,
92,
17,
5591,
17,
687,
17,
19690,
6,
913,
618,
261,
5946,
10... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2017,
67,
2271,
12,
2271,
16,
1963,
33,
7036,
4672,
3536,
2503,
707,
16834,
279,
843,
487,
2553,
635,
326,
315,
3685,
19,
92,
17,
5591,
17,
687,
17,
19690,
6,
913,
618,
261,
5946,
10... |
atts['height'] = im.size[1] | atts['height'] = str(im.size[1]) | def visit_image(self, node): atts = {} atts['src'] = node['uri'] if node.has_key('width'): atts['width'] = node['width'] if node.has_key('height'): atts['height'] = node['height'] if node.has_key('scale'): if Image and not (node.has_key('width') and node.has_key('height')): try: im = Image.open(str(atts['src'])) except (IOError, # Source image can't be found or opened UnicodeError): # PIL doesn't like Unicode paths. pass else: if not atts.has_key('width'): atts['width'] = im.size[0] if not atts.has_key('height'): atts['height'] = im.size[1] del im if atts.has_key('width'): atts['width'] = int(round(node['width'] * (float(node['scale']) / 100))) if atts.has_key('height'): atts['height'] = int(round(node['height'] * (float(node['scale']) / 100))) style = [] for att_name in 'width', 'height': if atts.has_key(att_name): if re.match(r'^[0-9.]+$', atts[att_name]): # Interpret unitless values as pixels. atts[att_name] += 'px' style.append('%s: %s;' % (att_name, atts[att_name])) del atts[att_name] if style: atts['style'] = ' '.join(style) atts['alt'] = node.get('alt', atts['src']) if node.has_key('align'): atts['align'] = self.attval(node['align']) atts['class'] = 'align-%s' % atts['align'] if (isinstance(node.parent, nodes.TextElement) or (isinstance(node.parent, nodes.reference) and not isinstance(node.parent.parent, nodes.TextElement))): # Inline context or surrounded by <a>...</a>. suffix = '' else: suffix = '\n' self.body.append(self.emptytag(node, 'img', suffix, **atts)) | 74187d35705e75fdc5a551ca0f4977e1ec495b3a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5620/74187d35705e75fdc5a551ca0f4977e1ec495b3a/html4css1.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3757,
67,
2730,
12,
2890,
16,
756,
4672,
15687,
273,
2618,
15687,
3292,
4816,
3546,
273,
756,
3292,
1650,
3546,
309,
756,
18,
5332,
67,
856,
2668,
2819,
11,
4672,
15687,
3292,
2819,
3546... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3757,
67,
2730,
12,
2890,
16,
756,
4672,
15687,
273,
2618,
15687,
3292,
4816,
3546,
273,
756,
3292,
1650,
3546,
309,
756,
18,
5332,
67,
856,
2668,
2819,
11,
4672,
15687,
3292,
2819,
3546... |
node = self.curNode self.lastEvent[1] = [(END_ELEMENT, node), None] self.lastEvent = self.lastEvent[1] self.curNode = self.curNode.parentNode | self.lastEvent[1] = [(END_ELEMENT, self.pop()), None] self.lastEvent = self.lastEvent[1] | def endElementNS(self, name, tagName): node = self.curNode self.lastEvent[1] = [(END_ELEMENT, node), None] self.lastEvent = self.lastEvent[1] #self.events.append((END_ELEMENT, node)) self.curNode = self.curNode.parentNode | 37ce29a4b515f0f3d5c14c4ccb2c320ae150df99 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/37ce29a4b515f0f3d5c14c4ccb2c320ae150df99/pulldom.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
14840,
3156,
12,
2890,
16,
508,
16,
7196,
4672,
756,
273,
365,
18,
1397,
907,
365,
18,
2722,
1133,
63,
21,
65,
273,
306,
12,
4415,
67,
10976,
16,
756,
3631,
599,
65,
365,
18,
2722,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
14840,
3156,
12,
2890,
16,
508,
16,
7196,
4672,
756,
273,
365,
18,
1397,
907,
365,
18,
2722,
1133,
63,
21,
65,
273,
306,
12,
4415,
67,
10976,
16,
756,
3631,
599,
65,
365,
18,
2722,
... |
format = self.getformat() | def __neg__(self): format = self.getformat() csc = self.tocsc() res = -csc return eval('%s_matrix'%format)(res) | b14552c4a5780327bf9ca40b82d78bbf0d40722e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/b14552c4a5780327bf9ca40b82d78bbf0d40722e/Sparse.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
14518,
972,
12,
2890,
4672,
276,
1017,
273,
365,
18,
1391,
1017,
1435,
400,
273,
300,
71,
1017,
327,
5302,
29909,
87,
67,
5667,
11,
9,
2139,
21433,
455,
13,
2,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
14518,
972,
12,
2890,
4672,
276,
1017,
273,
365,
18,
1391,
1017,
1435,
400,
273,
300,
71,
1017,
327,
5302,
29909,
87,
67,
5667,
11,
9,
2139,
21433,
455,
13,
2,
-100,
-100,
-100,
... | |
autogenargs='-- --disable-print') | autogenargs='--disable-print') | def sfcvsroot(project): return ':pserver:anonymous@cvs.%s.sourceforge.net:/cvsroot/%s' % \ (project, project) | 2743f663caa8782db959f2cfc81c527f05e2ac39 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4596/2743f663caa8782db959f2cfc81c527f05e2ac39/moduleinfo.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
272,
7142,
6904,
3085,
12,
4406,
4672,
327,
4290,
84,
3567,
30,
19070,
36,
71,
6904,
7866,
87,
18,
3168,
1884,
908,
18,
2758,
27824,
71,
6904,
3085,
5258,
87,
11,
738,
521,
261,
4406,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
272,
7142,
6904,
3085,
12,
4406,
4672,
327,
4290,
84,
3567,
30,
19070,
36,
71,
6904,
7866,
87,
18,
3168,
1884,
908,
18,
2758,
27824,
71,
6904,
3085,
5258,
87,
11,
738,
521,
261,
4406,
... |
self.hiddentemplates = self.loadHiddenTemplates() self.licenses_found = self.image.getTemplates() | def smartDetection(self): """ The bot instead of checking if there's a simple template in the image's description, checks also if that template is a license or something else. In this sense this type of check is smart. """ self.seems_ok = False self.license_found = None self.hiddentemplates = self.loadHiddenTemplates() self.licenses_found = self.image.getTemplates() self.whiteTemplatesFound = False regex_find_licenses = re.compile(r'(?<!\{)\{\{(?:[Tt]emplate:|)([^{]+?)[|\n<}]', re.DOTALL) templatesInTheImageRaw = regex_find_licenses.findall(self.imageCheckText) if self.licenses_found == [] and templatesInTheImageRaw != []: raise wikipedia.Error("APIs seems down. No templates found with them but actually there are templates used in the image's page!") self.allLicenses = list() if self.list_licenses == []: raise wikipedia.Error(u'No licenses allowed provided, add that option to the code to make the script working correctly') # Found the templates ONLY in the image's description for template_selected in templatesInTheImageRaw: for templateReal in self.licenses_found: if self.convert_to_url(template_selected).lower().replace('template%3a', '') == \ self.convert_to_url(templateReal.title()).lower().replace('template%3a', ''): if templateReal not in self.allLicenses: # don't put the same template, twice. self.allLicenses.append(templateReal) if self.licenses_found != []: self.templateInList() if self.license_found == None and self.allLicenses != list(): # If only iterlist = self.AllLicenses if I remove something # from iterlist it will be remove from self.AllLicenses too iterlist = list(self.allLicenses) for template in iterlist: try: template.pageAPInfo() except wikipedia.IsRedirectPage: template = template.getRedirectTarget() except wikipedia.NoPage: self.allLicenses.remove(template) if self.allLicenses != list(): self.license_found = self.allLicenses[0].title() self.some_problem = False # If it has "some_problem" it must check # the additional settings. # if self.settingsData, use addictional settings if self.settingsData != None: self.findAdditionalProblems() | 19613395653f4262c95f1f3bd01b519e31607ee1 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4404/19613395653f4262c95f1f3bd01b519e31607ee1/checkimages.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13706,
10214,
12,
2890,
4672,
3536,
1021,
2512,
3560,
434,
6728,
309,
1915,
1807,
279,
4143,
1542,
316,
326,
1316,
1807,
2477,
16,
4271,
2546,
309,
716,
1542,
353,
279,
8630,
578,
5943,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13706,
10214,
12,
2890,
4672,
3536,
1021,
2512,
3560,
434,
6728,
309,
1915,
1807,
279,
4143,
1542,
316,
326,
1316,
1807,
2477,
16,
4271,
2546,
309,
716,
1542,
353,
279,
8630,
578,
5943,
... | |
import os, fcntl | import os try: import fcntl except ImportError: fcntl = None | def export_add(self, x, y): return x + y | d003c43ab6402143b0c9b884504e62d599849740 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/d003c43ab6402143b0c9b884504e62d599849740/SimpleXMLRPCServer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3359,
67,
1289,
12,
2890,
16,
619,
16,
677,
4672,
327,
619,
397,
677,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3359,
67,
1289,
12,
2890,
16,
619,
16,
677,
4672,
327,
619,
397,
677,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
ar = ARMA(data.endog, constant=False, order=(9,0)) ar.fit() | ar = ARMA(data.endog) ar.fit(trend='nc', order=(9,0)) | def Q(x): cholQ = np.array([[x[1],0],[0,x[2]]]) return np.dot(cholQ,cholQ.T) | 3f0ccb720bd60c3732850d8827f15d2f4f538f23 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12658/3f0ccb720bd60c3732850d8827f15d2f4f538f23/kalmanf.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2238,
12,
92,
4672,
462,
355,
53,
273,
1130,
18,
1126,
3816,
63,
92,
63,
21,
6487,
20,
6487,
63,
20,
16,
92,
63,
22,
13563,
5717,
327,
1130,
18,
9811,
12,
343,
355,
53,
16,
343,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2238,
12,
92,
4672,
462,
355,
53,
273,
1130,
18,
1126,
3816,
63,
92,
63,
21,
6487,
20,
6487,
63,
20,
16,
92,
63,
22,
13563,
5717,
327,
1130,
18,
9811,
12,
343,
355,
53,
16,
343,
... |
itemimg.props.x = centered_x | itemimg.translate(centered_x, y1); | def init(self, index, select_area, callback): height = 90 x = select_area[0] + (select_area[2] - select_area[0]) / 2 y1 = select_area[1] + height * index + 2 y2 = select_area[1] + height * (index + 1) + 1 | 9897a893ff1748d099c36f5671c7802639bc3311 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11306/9897a893ff1748d099c36f5671c7802639bc3311/module.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1208,
12,
2890,
16,
770,
16,
2027,
67,
5036,
16,
1348,
4672,
2072,
273,
8566,
619,
282,
273,
2027,
67,
5036,
63,
20,
65,
397,
261,
4025,
67,
5036,
63,
22,
65,
300,
2027,
67,
5036,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
770,
16,
2027,
67,
5036,
16,
1348,
4672,
2072,
273,
8566,
619,
282,
273,
2027,
67,
5036,
63,
20,
65,
397,
261,
4025,
67,
5036,
63,
22,
65,
300,
2027,
67,
5036,
... |
errorOut = temp.getvalue() if not successRe.search(errorOut): self.fail("unexpected stderr output: %r" % errorOut) | errorOut = temp.getvalue() if not successRe.search(errorOut): self.fail("unexpected stderr output: %r" % errorOut) | def verifyStderr(self, method, successRe): """ Call method() while capturing sys.stderr output internally and call self.fail() if successRe.search() does not match the stderr output. This is used to test for uncatchable exceptions. """ stdErr = sys.stderr sys.stderr = StringIO() try: method() finally: temp = sys.stderr sys.stderr = stdErr errorOut = temp.getvalue() if not successRe.search(errorOut): self.fail("unexpected stderr output: %r" % errorOut) | 0060e41a3ce7bcb66b7a9a39fd4f3dd2f5a6f82a /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3187/0060e41a3ce7bcb66b7a9a39fd4f3dd2f5a6f82a/test_compare.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3929,
31781,
12,
2890,
16,
707,
16,
2216,
426,
4672,
3536,
3049,
707,
1435,
1323,
28789,
2589,
18,
11241,
876,
12963,
471,
745,
365,
18,
6870,
1435,
309,
2216,
426,
18,
3072,
1435,
1552,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3929,
31781,
12,
2890,
16,
707,
16,
2216,
426,
4672,
3536,
3049,
707,
1435,
1323,
28789,
2589,
18,
11241,
876,
12963,
471,
745,
365,
18,
6870,
1435,
309,
2216,
426,
18,
3072,
1435,
1552,... |
sage: show(plot(sin,-4,4), axes=False) | sage.: show(plot(sin,-4,4), axes=False) | def show(self, xmin=None, xmax=None, ymin=None, ymax=None, figsize=DEFAULT_FIGSIZE, filename=None, dpi=DEFAULT_DPI, axes=True, axes_label=None,frame=False, **args): """ Show this graphics image with the default image viewer. EXAMPLES: sage: c = circle((1,1), 1, rgbcolor=(1,0,0)) sage.: c.show(xmin=-1, xmax=3, ymin=-1, ymax=3) | 761365abc27393b9133c187a8ff5330d7dcae6b9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9890/761365abc27393b9133c187a8ff5330d7dcae6b9/plot.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2405,
12,
2890,
16,
13777,
33,
7036,
16,
14016,
33,
7036,
16,
15763,
33,
7036,
16,
15275,
33,
7036,
16,
14697,
33,
5280,
67,
5236,
4574,
16,
1544,
33,
7036,
16,
16361,
33,
5280,
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,
2405,
12,
2890,
16,
13777,
33,
7036,
16,
14016,
33,
7036,
16,
15763,
33,
7036,
16,
15275,
33,
7036,
16,
14697,
33,
5280,
67,
5236,
4574,
16,
1544,
33,
7036,
16,
16361,
33,
5280,
67,
... |
logger.info("adding %d files for package %s" % (len(repopkg.files), dbpkg.pkgname)) | logger.info("adding %d files for package %s" % (len(repopkg.files), dbpkg.pkgname)) | def populate_files(dbpkg, repopkg, force=False): if not force: if not dbpkg.files_last_update or not dbpkg.last_update: pass elif dbpkg.files_last_update > dbpkg.last_update: return # only delete files if we are reading a DB that contains them if 'files' in repopkg.__dict__: dbpkg.packagefile_set.all().delete() logger.info("adding %d files for package %s" % (len(repopkg.files), dbpkg.pkgname)) for x in repopkg.files: dbpkg.packagefile_set.create(path=x) dbpkg.files_last_update = datetime.now() dbpkg.save() | fcc6d98bc438ea917c757ee1a565a5dba625f333 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11256/fcc6d98bc438ea917c757ee1a565a5dba625f333/reporead.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6490,
67,
2354,
12,
1966,
10657,
16,
2071,
556,
14931,
16,
2944,
33,
8381,
4672,
309,
486,
2944,
30,
309,
486,
1319,
10657,
18,
2354,
67,
2722,
67,
2725,
578,
486,
1319,
10657,
18,
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,
6490,
67,
2354,
12,
1966,
10657,
16,
2071,
556,
14931,
16,
2944,
33,
8381,
4672,
309,
486,
2944,
30,
309,
486,
1319,
10657,
18,
2354,
67,
2722,
67,
2725,
578,
486,
1319,
10657,
18,
272... |
key_up | key_up: | def kbPatch(exe): """Patch the Robot Odyssey engine's keyboard decoder.""" # Robot Odyssey has a bug that makes it rather difficult to play # on an AT keyboard, particularly one without a numeric keypad: # While the AT-style ("gray") arrow keys do work for basic # movement, the game can't detect shift-arrow combinations. So, # you can't take single-pixel steps. This makes Robot Odyssey # totally unplayable on a laptop unless you have some kind of # keyboard remapper running externally. # # To understand the problem, we can take a closer look at the # game's keyboard handler. To poll the keyboard, the basic steps # are: # # 1. The game first uses BIOS interrupt 16h to first check # for a key in the keyboard buffer (AH=1), then to retrieve # a key if one exists (AH=0). It also pokes at the BIOS data # area (segment 40h) directly, in order to turn off numlock, # turn on caps lock, and drain the keyboard buffer. # # 2. This function returns with the value of AX from Int 16h # preserved. This means we have a scan code in AH, and a # character code in AL. Now we're in the game's keyboard # mapping function, which we'll be patching here. # # 3. This function stores a translated key in a global variable. # If there are no keys down, it stores zero. For most keys, # it stores an ASCII value. But there are several special # cases: Arrow keys, Shift-Arrow keys, and Insert/Delete. # # This arrow key remapping is of the form: # # if (input_scancode == LEFT) { # if (al == 0) { # output_scancode = TRANSLATED_SHIFT_LEFT; # } else { # output_scancode = TRANSLATED_LEFT; # } # } else { # ... # } # # So, they're relying on the fact that an un-shifted arrow has # no ASCII equivalent, while a shift-arrow on the numpad turns # into a number key when the BIOS translates it. # # This is a clever hack, but it won't do for gray arrow keys. # Instead, we'd rather look at the actual status of the shift # keys. We can get this from the BIOS data area, but that won't # work in a Windows DOS box. Instead, we call a BIOS interrupt. # # This will increase the code size a bit, but we can make room by # removing support for very old legacy scancodes. # XXX: This patcher works on Robot Odyssey, but it does not # work on Gertrude's Secrets, since that game uses different # internal keycode values. # This is the original keyboard handler snippet that we'll be # replacing, starting right after the BIOS polling function # returns, and ending at a point where the translated key is # expected to be in AL. This section has been carefully chosen # to avoid any non-relative addresses. origMapperLen = 137 origMapperPrefix = unhex(""" 75 03 E9 81 00 80 FC 88 74 34 80 FC 4D 74 2B 80 FC 86 74 3A 80 FC 50 74 31 80 FC 87 74 40 80 FC 4B 74 37 80 FC 85 74 46 80 FC 48 74 3D 80 FC 52 74 48 80 FC 53 74 49 EB 54 90 3C 00 74 06 """) kbMapper = exe.find(origMapperPrefix) if not kbMapper: raise CodeMismatchError() print "Found keyboard mapper. Patching..." patch = asm(""" ; On entry: ; ; AH = BIOS Scancode ; AL = ASCII Key ; Z=0 if a key is waiting, ; Z=1 if there is no key. jz no_key cmp ah, 0x48 jz key_up cmp ah, 0x50 jz key_down cmp ah, 0x4B jz key_left cmp ah, 0x4D jz key_right cmp ah, 0x52 ; NB: I don't think these are used by Robot Odyssey, jz key_insert ; but they're used by the shape editor in cmp ah, 0x53 ; Gertrude's Secrets. jz key_delete ; Other key: Leave it in ASCII. Normally we'd be done now... ; However, while we're here, we'll apply another bug fix. ; The game is expecting all keyboard input to be in uppercase. ; It does this by forcing Caps Lock to be on, using the BIOS ; data area. However, this isn't supported by the Windows XP ; DOS box. We can work around this by doing a toupper() on all ; characters here. cmp al, 'a' jb done cmp al, 'z' ja done xor al, 0x20 jmp done | 759308781d42ac356f2dd3c5f6dc2d3cd3ef278d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6757/759308781d42ac356f2dd3c5f6dc2d3cd3ef278d/robot_odyssey_patcher.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9182,
7332,
12,
14880,
4672,
3536,
7332,
326,
19686,
352,
531,
72,
1900,
307,
93,
4073,
1807,
16263,
8320,
12123,
225,
468,
19686,
352,
531,
72,
1900,
307,
93,
711,
279,
7934,
716,
7297,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9182,
7332,
12,
14880,
4672,
3536,
7332,
326,
19686,
352,
531,
72,
1900,
307,
93,
4073,
1807,
16263,
8320,
12123,
225,
468,
19686,
352,
531,
72,
1900,
307,
93,
711,
279,
7934,
716,
7297,... |
if end <= 3: locale_index.write(line[:end] + empty_value) elif line.find("_") <= 3: if line.find("_") > 0: locale_index.write(line[:end] + empty_value) locale_index.write(footer) brkitr_index.write(footer) coll_index.write(footer) rbnf_index.write(footer) locale_index.close() brkitr_index.close() coll_index.close() rbnf_index.close() | if end <= 3 or (line.find("_") <= 3 and line.find("_") > 0): locales.add(line[:end]) ShowMissing(brkitrs, locales, "brkitr", dat_list_file_path) ShowMissing(colls, locales, "coll", dat_list_file_path) ShowMissing(rbnfs, locales, "rbnf", dat_list_file_path) WriteIndex(os.path.join(TMP_DAT_PATH, res_index), locales, CLDR_VERSION) WriteIndex(os.path.join(TMP_DAT_PATH, "brkitr", res_index), brkitrs) WriteIndex(os.path.join(TMP_DAT_PATH, "coll", res_index), colls) WriteIndex(os.path.join(TMP_DAT_PATH, "rbnf", res_index), rbnfs) | def GenResIndex(dat_list_file_path): res_index = "res_index.txt" header_locale = "res_index:table(nofallback) {\n CLDRVersion { " header_locale += CLDR_VERSION + " }\n InstalledLocales {\n" header = "res_index:table(nofallback) {\nInstalledLocales {\n" footer = " }\n}" empty_value = " {\"\"}\n" # key-value pair for all locale entries locale_index = open(os.path.join(TMP_DAT_PATH, res_index), "w") locale_index.write(header_locale) brkitr_index = open(os.path.join(TMP_DAT_PATH, "brkitr", res_index), "w") brkitr_index.write(header) coll_index = open(os.path.join(TMP_DAT_PATH, "coll", res_index), "w") coll_index.write(header) rbnf_index = open(os.path.join(TMP_DAT_PATH, "rbnf", res_index), "w") rbnf_index.write(header) for line in open(dat_list_file_path, "r"): if line.find("root.") >= 0: continue if line.find("res_index") >= 0: continue if line.find("_.res") >= 0: continue; start = line.find("brkitr/") if start >= 0: end = line.find(".res") if end > 0: brkitr_index.write(line[line.find("/")+1:end] + empty_value) elif line.find("coll/") >= 0: start = line.find("coll/") end = line.find(".res") if end > 0: coll_index.write(line[line.find("/")+1:end] + empty_value) elif line.find("rbnf/") >= 0: start = line.find("rbnf/") end = line.find(".res") if end > 0: rbnf_index.write(line[line.find("/")+1:end] + empty_value) elif line.find(".res") >= 0: # We need to determine the resource is locale resource or misc resource. # To determine the locale resource, we assume max script length is 3. end = line.find(".res") if end <= 3: locale_index.write(line[:end] + empty_value) elif line.find("_") <= 3: if line.find("_") > 0: locale_index.write(line[:end] + empty_value) locale_index.write(footer) brkitr_index.write(footer) coll_index.write(footer) rbnf_index.write(footer) locale_index.close() brkitr_index.close() coll_index.close() rbnf_index.close() # Call genrb to generate new res_index.res. InvokeIcuTool("genrb", TMP_DAT_PATH, [res_index]) InvokeIcuTool("genrb", os.path.join(TMP_DAT_PATH, "brkitr"), [res_index]) InvokeIcuTool("genrb", os.path.join(TMP_DAT_PATH, "coll"), [res_index]) InvokeIcuTool("genrb", os.path.join(TMP_DAT_PATH, "rbnf"), [res_index]) | e8aab5e9f14e1c3a670fbea64057a2a5f5c35245 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10672/e8aab5e9f14e1c3a670fbea64057a2a5f5c35245/icu_dat_generator.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10938,
607,
1016,
12,
3404,
67,
1098,
67,
768,
67,
803,
4672,
400,
67,
1615,
273,
315,
455,
67,
1615,
18,
5830,
6,
1446,
67,
6339,
273,
315,
455,
67,
1615,
30,
2121,
12,
82,
792,
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,
10938,
607,
1016,
12,
3404,
67,
1098,
67,
768,
67,
803,
4672,
400,
67,
1615,
273,
315,
455,
67,
1615,
18,
5830,
6,
1446,
67,
6339,
273,
315,
455,
67,
1615,
30,
2121,
12,
82,
792,
7... |
for k in p: heapq.heappush(self._eventHeap,(p[k],)+k) for count in range(self._focusEventQueue.qsize()): item=self._focusEventQueue.get_nowait() heapq.heappush(self._eventHeap,item) | for k,v in p.iteritems(): heapq.heappush(self._eventHeap,(v,)+k) f=self._focusEventCache self._focusEventCache={} for k,v in sorted(f.iteritems())[-4:]: heapq.heappush(self._eventHeap,(v,)+k) | def flushEvents(self): """Returns a list of winEvents (tuples of eventID,window,objectID,childID) that have been added, though due to limiting, it will not necessarily be all the winEvents that were originally added. They are definitely garenteed to be in the correct order though. """ p=self._propertyChangeEventCache self._propertyChangeEventCache={} for k in p: heapq.heappush(self._eventHeap,(p[k],)+k) for count in range(self._focusEventQueue.qsize()): item=self._focusEventQueue.get_nowait() heapq.heappush(self._eventHeap,item) e=self._eventHeap self._eventHeap=[] r=[] for count in range(len(e)): r.append(heapq.heappop(e)[1:]) return r | ba2fe53680524e1bab37462f0299c0b086dd30b8 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9340/ba2fe53680524e1bab37462f0299c0b086dd30b8/IAccessibleHandler.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3663,
3783,
12,
2890,
4672,
3536,
1356,
279,
666,
434,
5657,
3783,
261,
17705,
434,
871,
734,
16,
5668,
16,
1612,
734,
16,
3624,
734,
13,
716,
1240,
2118,
3096,
16,
11376,
6541,
358,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3663,
3783,
12,
2890,
4672,
3536,
1356,
279,
666,
434,
5657,
3783,
261,
17705,
434,
871,
734,
16,
5668,
16,
1612,
734,
16,
3624,
734,
13,
716,
1240,
2118,
3096,
16,
11376,
6541,
358,
1... |
m[:] = 'c'*mapsize self.assertEqual(m[:], 'c'*mapsize, | m[:] = b'c'*mapsize self.assertEqual(m[:], b'c'*mapsize, | def test_access_parameter(self): # Test for "access" keyword parameter mapsize = 10 open(TESTFN, "wb").write("a"*mapsize) f = open(TESTFN, "rb") m = mmap.mmap(f.fileno(), mapsize, access=mmap.ACCESS_READ) self.assertEqual(m[:], 'a'*mapsize, "Readonly memory map data incorrect.") | d5ab51392e332ac6a7a37b2fca62a82b1aee9ec7 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8125/d5ab51392e332ac6a7a37b2fca62a82b1aee9ec7/test_mmap.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
3860,
67,
6775,
12,
2890,
4672,
468,
7766,
364,
315,
3860,
6,
4932,
1569,
852,
1467,
273,
1728,
1696,
12,
16961,
19793,
16,
315,
9464,
20387,
2626,
2932,
69,
6,
14,
1458,
146... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3860,
67,
6775,
12,
2890,
4672,
468,
7766,
364,
315,
3860,
6,
4932,
1569,
852,
1467,
273,
1728,
1696,
12,
16961,
19793,
16,
315,
9464,
20387,
2626,
2932,
69,
6,
14,
1458,
146... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.