rem stringlengths 2 226k | add stringlengths 0 227k | context stringlengths 8 228k | meta stringlengths 156 215 | input_ids list | attention_mask list | labels list |
|---|---|---|---|---|---|---|
prog = "ps2pdffoo" args = (prog, '-sPAPERSIZE=a4', '-', '-') | prog = 'ps2pdf' args = (prog, '-', '-') | def __init__(self, cr, uid, ids, data): try: import pydot except Exception,e: print 'Import Error for pydot, you will not be able to render workflows' print 'Consider Installing PyDot or dependencies: http://dkbza.org/pydot.html' raise e self.done = False | 243322713b4956ba132e8ff8e40617bbd74c40ea /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7397/243322713b4956ba132e8ff8e40617bbd74c40ea/print_instance.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
501,
4672,
775,
30,
1930,
2395,
9811,
1335,
1185,
16,
73,
30,
1172,
296,
5010,
1068,
364,
2395,
9811,
16,
1846,
903,
486,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
501,
4672,
775,
30,
1930,
2395,
9811,
1335,
1185,
16,
73,
30,
1172,
296,
5010,
1068,
364,
2395,
9811,
16,
1846,
903,
486,
... |
end = re.search(r'<tr><td colspan="2"><br><h2>Variables</h2></td></tr>', text) | end = re.search(r'<tr><td colspan="2">(?:<br>)?<h2>Variables</h2></td></tr>', text) | def getFunctionList(namespaceList): functionList = [] for namespace in namespaceList: text = open(path + '/' + namespace[0]).read() # start of function section in the namespace file start = re.search(r'<tr><td colspan="2"><br><h2>Functions</h2></td></tr>', text) if not start: continue # no functions in this namespace # end of function section in the namespace file end = re.search(r'<tr><td colspan="2"><br><h2>Variables</h2></td></tr>', text) if not end: end = re.search(r'<hr><a name="_details"></a><h2>Detailed Description</h2>', text) # extract the function section from the namespace file text = text[start.regs[0][0]:end.regs[0][0]] # split at the function signatures to get sections for each individual function functionPieces = re.split(r'</a> \([^)]*\)</td></tr>', text) for f in functionPieces: # the rightmost hyperlink contains the function name and link address f = f[f.rfind('<a class="el" href='):] functionList += re.findall(r'<a class="el" href="([^"]+)">([^<]+)$', f) return functionList | 70d4222879e48190040c86800ae957ba2d971a99 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12582/70d4222879e48190040c86800ae957ba2d971a99/makeFunctionIndex.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
18697,
682,
12,
4937,
682,
4672,
445,
682,
273,
5378,
364,
1981,
316,
1981,
682,
30,
977,
273,
1696,
12,
803,
397,
2023,
397,
1981,
63,
20,
65,
2934,
896,
1435,
468,
787,
434,
445,
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,
18697,
682,
12,
4937,
682,
4672,
445,
682,
273,
5378,
364,
1981,
316,
1981,
682,
30,
977,
273,
1696,
12,
803,
397,
2023,
397,
1981,
63,
20,
65,
2934,
896,
1435,
468,
787,
434,
445,
2... |
self.msgText("redDelayHandler, stopping now!\n") | if (self.debugLevel >= LowDebug) : self.msgText("redDelayHandler, stopping now!\n") | def redDelayHandler(self, event) : self.msgText("redDelayHandler, stopping now!\n") self.redDelayTimer.stop() self.doStop() return | 637586c522dc4614e3aa55f7046de00d6eaa8ae0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1660/637586c522dc4614e3aa55f7046de00d6eaa8ae0/RobotThrottle2.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1755,
6763,
1503,
12,
2890,
16,
871,
13,
294,
309,
261,
2890,
18,
4148,
2355,
1545,
23629,
2829,
13,
294,
365,
18,
3576,
1528,
2932,
1118,
6763,
1503,
16,
17008,
2037,
24440,
82,
7923,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1755,
6763,
1503,
12,
2890,
16,
871,
13,
294,
309,
261,
2890,
18,
4148,
2355,
1545,
23629,
2829,
13,
294,
365,
18,
3576,
1528,
2932,
1118,
6763,
1503,
16,
17008,
2037,
24440,
82,
7923,
... |
server_response = atom.service.AtomService.Get(self, uri, extra_headers) | server_response = self.handler.Get(self, uri, extra_headers) | def Get(self, uri, extra_headers=None, redirects_remaining=4, encoding='UTF-8', converter=None): """Query the GData API with the given URI | c6f5c407589126fc84499bf29cb17f4d244b2562 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5609/c6f5c407589126fc84499bf29cb17f4d244b2562/service.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
968,
12,
2890,
16,
2003,
16,
2870,
67,
2485,
33,
7036,
16,
18064,
67,
17956,
33,
24,
16,
2688,
2218,
5159,
17,
28,
2187,
6027,
33,
7036,
4672,
3536,
1138,
326,
611,
751,
1491,
598,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
968,
12,
2890,
16,
2003,
16,
2870,
67,
2485,
33,
7036,
16,
18064,
67,
17956,
33,
24,
16,
2688,
2218,
5159,
17,
28,
2187,
6027,
33,
7036,
4672,
3536,
1138,
326,
611,
751,
1491,
598,
3... |
print ' foreignkeys:', forkey print ' remote_side:', prop.remote_side | print ' foreignkeys:', ', '.join( str(s) for s in forkey ) print ' remote_side:', ', '.join( str(s) for s in prop.remote_side ) | def join_via( keys, mapper, must_alias =None): '''from Query.join_via, input root mapper, return last mapper/table alias and link properly recursive /self-referential joins cases: - table vs inher-join (parent/child) - plain vs polymunion (parent/child) ''' #XXX TODO: add inheritance-joins clause = None c = None self_table = None #must be also aliased if explicitly required, e.g. x1.in == x2.out (and x1,x2 both are instances of some X) if must_alias: self_table = must_alias.table if not self_table: self_table = base_mapper(mapper).mapped_table.alias() #? local_table ? select_table? must_alias.table = self_table else: self_table = mapper.select_table self_colequivalents = None xmappers = [mapper] #mapper === parent ymappers = [base_mapper(mapper) ] for key in keys: | dd3bb0da32b52165c8d13f052bd8ea013f730892 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/10808/dd3bb0da32b52165c8d13f052bd8ea013f730892/expression.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1233,
67,
21985,
12,
1311,
16,
5815,
16,
1297,
67,
4930,
273,
7036,
4672,
9163,
2080,
2770,
18,
5701,
67,
21985,
16,
810,
1365,
5815,
16,
327,
1142,
5815,
19,
2121,
2308,
471,
1692,
82... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1233,
67,
21985,
12,
1311,
16,
5815,
16,
1297,
67,
4930,
273,
7036,
4672,
9163,
2080,
2770,
18,
5701,
67,
21985,
16,
810,
1365,
5815,
16,
327,
1142,
5815,
19,
2121,
2308,
471,
1692,
82... |
<dl><dt>Raises:</dt> | <dl><dt>Raises:</dt></dl> <ul> | def arg_name_to_html(self, func_doc, arg_name): """ A helper function used to format an argument name, for use in the argument description list under a routine's details entry. This just wraps strong & code tags around the arg name; and if the arg name is associated with a type, then adds it parenthetically after the name. """ s = '<strong class="pname"><code>%s</code></strong>' % arg_name if arg_name in func_doc.arg_types: typ = func_doc.arg_types[arg_name] typ_html = self.docstring_to_html(typ, func_doc, 10) s += " (<code>%s</code>)" % typ_html return s | 4382b7be56c79a38bd4608e2a346a95750170342 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11420/4382b7be56c79a38bd4608e2a346a95750170342/html.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1501,
67,
529,
67,
869,
67,
2620,
12,
2890,
16,
1326,
67,
2434,
16,
1501,
67,
529,
4672,
3536,
432,
4222,
445,
1399,
358,
740,
392,
1237,
508,
16,
364,
999,
316,
326,
1237,
2477,
666... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1501,
67,
529,
67,
869,
67,
2620,
12,
2890,
16,
1326,
67,
2434,
16,
1501,
67,
529,
4672,
3536,
432,
4222,
445,
1399,
358,
740,
392,
1237,
508,
16,
364,
999,
316,
326,
1237,
2477,
666... |
tmpfile.write(license) tmpfile.write("\n") tmpfile.write(source.read()) | codecs.getwriter("utf_8_sig") wrapped = codecs.getwriter("utf_8_sig")(tmpfile) wrapped.write(license) wrapped.write("\n") wrapped.write(source.read()) | def _add_license(root, license_path="license.txt"): """ Read a license from license_path and append it to all files under root whose extension is in _license_exts. """ if not os.path.isfile(license_path): return lfile = open(license_path) license = lfile.read() lfile.close() license_files = [] for base, dirs, files in os.walk(root): license_files.extend( [ os.path.join(base, f) for f in files if f.endswith(_license_exts)] ) for f in license_files: source = open(f) tmpfd, tmppath = tempfile.mkstemp(".tmp", "dfbuild.") tmpfile = os.fdopen(tmpfd, "w") tmpfile.write(license) tmpfile.write("\n") tmpfile.write(source.read()) source.close() tmpfile.close() shutil.copy(tmppath, f) os.unlink(tmppath) | a77870b469735fe398272ef691b916f5ce81aa12 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10925/a77870b469735fe398272ef691b916f5ce81aa12/dfbuild.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1289,
67,
12687,
12,
3085,
16,
8630,
67,
803,
1546,
12687,
18,
5830,
6,
4672,
3536,
2720,
279,
8630,
628,
8630,
67,
803,
471,
714,
518,
358,
777,
1390,
3613,
1365,
8272,
2710,
353... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1289,
67,
12687,
12,
3085,
16,
8630,
67,
803,
1546,
12687,
18,
5830,
6,
4672,
3536,
2720,
279,
8630,
628,
8630,
67,
803,
471,
714,
518,
358,
777,
1390,
3613,
1365,
8272,
2710,
353... |
+ path.join(self.exePath, masterIniSubpath)) | + path.join(path.dirname(self.exePath), masterIniSubpath)) | def _getCurrentBuildId(self): master = open(path.join(self.exePath, masterIniSubpath)) if not master: raise Configuration("Unable to open " + path.join(self.exePath, masterIniSubpath)) masterContents = master.readlines() master.close() reBuildid = re.compile('BuildID\s*=\s*"(\d{10})"') for line in masterContents: match = re.match(reBuildid, line) if match: return match.group(1) raise Configuration("BuildID not found in " + path.join(self.exePath, masterIniSubpath)) | bac2ac4d506e26446e2b5b3732bf82fd78d255c2 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12156/bac2ac4d506e26446e2b5b3732bf82fd78d255c2/PerfConfigurator.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
3935,
3116,
548,
12,
2890,
4672,
4171,
273,
1696,
12,
803,
18,
5701,
12,
2890,
18,
14880,
743,
16,
4171,
22129,
1676,
803,
3719,
309,
486,
4171,
30,
1002,
4659,
2932,
3370,
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,
389,
588,
3935,
3116,
548,
12,
2890,
4672,
4171,
273,
1696,
12,
803,
18,
5701,
12,
2890,
18,
14880,
743,
16,
4171,
22129,
1676,
803,
3719,
309,
486,
4171,
30,
1002,
4659,
2932,
3370,
3... |
usageParam = usage[len(usageName):].lstrip('(').rstrip(')') | usageParam = usage[len(usageName)+2:].lstrip('(').rstrip(')') | def write_latex(self, out): # first handle glocal functions for entry in [x for x in self.content if x['type'] == 'global_function' and not x['ignore'] and not x['hidden'] \ and 'test' not in x['Name']]: print >> out, '\\newcommand{\\%sRef}{' % self.latexName(entry['Name'].replace('simuPOP::', '', 1)) if entry.has_key('Usage') and entry['Usage'] != '': func_name = entry['Usage'].split('(')[0] func_body = entry['Usage'][len(func_name):].lstrip('(').rstrip(')') print >> out, '\\par\n\\begin{funcdesc}{%s}{%s}\n\\par' % \ (self.latex_text(func_name), self.latex_text(func_body)) else: print >> out, '\\par\n\\begin{funcdesc}{%s}{}\n\\par' % self.latexName(entry['Name'].replace('simuPOP::', '', 1)) if entry.has_key('Description') and entry['Description'] != '': print >> out, r'\MakeUppercase %s\par' % self.latex_text(entry['Description']) if entry.has_key('Details') and entry['Details'] != '': #print >> out, '\\par\n\\strong{Details}\n\\par' print >> out, '\n\\par %s\n' % self.latex_text(entry['Details']) if entry.has_key('Arguments') and entry['Arguments'] != '': for arg in entry['Arguments']: print >> out, r'{\leftskip 0.3in \parindent=-0.3in \emph{%s: }\MakeUppercase %s\par}' \ % (self.latex_text(arg['Name']), self.latex_text(arg['Description'])) if entry.has_key('note') and entry['note'] != '': print >> out, '\\par\n\\strong{Note: }' print >> out, ' %s\n' % self.latex_text(entry['note']) if entry.has_key('ExampleFile') and entry['ExampleFile'] is not None: label = os.path.split(cons['ExampleFile'])[-1].split('_')[-1] title = self.latex_text(cons['ExampleTitle']) print >> out, '\\lstinputlisting[caption={%s},label={%s}]{%s}' % \ (title, label, entry['ExampleFile'].replace('\\', '/')) print >> out, '\\end{funcdesc}\n}\n' # then python modules modules = sets.Set( [x['module'] for x in self.content if x['type'] == 'module' and not x['ignore'] and not x['hidden']]) for module in modules: # class object mod = [x for x in self.content if x['type'] == 'docofmodule_' + module][0] print >> out, '\\newcommand{\\%sRef}{' % module print >> out, '\n\\subsection{Module \\texttt{%s}\index{module!%s}' % (module, module) print >> out, '}\n\\par %s' % self.latex_formatted_text(mod['Description']) # module functions funcs = [x for x in self.content if x['type'] == 'module' and x['module'] == module and not x['ignore'] and not x['hidden']] # sort it funcs.sort(lambda x, y: cmp(x['Name'], y['Name'])) # print all functions print >> out, '\\par\n\\strong{Module Functions}\n\\par' #print >> out, '\\begin{description}' for mem in funcs: if mem.has_key('Usage') and mem['Usage'] != '': func_name = mem['Usage'].split('(')[0] func_body = mem['Usage'][len(func_name):].lstrip('(').rstrip(')') print >> out, '\\begin{funcdesc}{%s}{%s}\n' % (self.latex_text(func_name), self.latex_text(func_body)) else: print >> out, '\\begin{funcdesc}{%s}{}\n' % mem['Name'] if mem.has_key('Description') and mem['Description'] != '': print >> out, r' %s' % self.latex_formatted_text(mem['Description']) if mem.has_key('Details') and mem['Details'] != '': print >> out, '%s' % self.latex_formatted_text(mem['Details']) if mem.has_key('note') and mem['note'] != '': print >> out, '\\par\n\\strong{Note: }%s\\par' % self.latex_text(mem['note']) print >> out, '\\end{funcdesc}\n' print >> out, '}\n' # then classes for entry in [x for x in self.content if x['type'] == 'class' and not x['ignore'] and not x['hidden']]: print >> out, '\\newcommand{\\%sRef}{' % self.latexName(entry['Name'].replace('simuPOP::', '', 1)) classname = self.latex_text(entry['Name'].replace('simuPOP::', '', 1)) print >> out, '\n\\subsection{Class \\texttt{%s}\index{class!%s}' % (classname, classname) if entry.has_key('funcForm') or entry.has_key('Applicability'): annotation = ' (' if entry.has_key('funcForm'): annotation += 'Function form: %s\index{function!%s}' % ( self.latex_text(entry['funcForm']), self.latex_text(entry['funcForm'])) if entry.has_key('Applicability'): if entry.has_key('funcForm'): annotation += ', ' annotation += 'Applicable to %s' % self.latex_text(entry['Applicability']) print >> out, annotation + ')' print >> out, '}\n' if entry.has_key('Description') and entry['Description'] != '': print >> out, '\\par \\MakeUppercase %s' % self.latex_text(entry['Description']) if entry.has_key('Details') and entry['Details'].strip() != '': #print >> out, '\\par\n\\strong{Details}\n\\par' print >> out, '\n\\par\\MakeUppercase %s' % self.latex_text(entry['Details']) if entry.has_key('note') and entry['note'] != '': print >> out, '\\par\n\\strong{Note: }\n\\par' print >> out, '%s' % self.latex_text(entry['note']) # only use the first constructor constructor = [x for x in self.content if x['type'] == 'constructorofclass_' + entry['Name'] and not x['ignore'] and not x['hidden']] if len(constructor) == 0: print >> out, '}\n' continue elif len(constructor) > 1: print "Warning: multiple constructors: %s" % entry['Name'] cons = constructor[0] # #print >> out, '\\par\n\\strong{Initialization}\n\\par' if cons.has_key('Description') and cons['Description'] != '': print >> out, r'\MakeUppercase %s\par' % self.latex_text(cons['Description']) if cons.has_key('Usage') and cons['Usage'] != '': usage = self.latex_text(cons['Usage']) usageName = usage.split('(')[0] usageParam = usage[len(usageName):].lstrip('(').rstrip(')') print >> out, r'\begin{classdesc}{%s}{%s}' % (usageName, usageParam) else: print >> out, r'\begin{classdesc}{%s}{}' % entry['Name'] if cons.has_key('Details') and cons['Details'] != '': print >> out, '%s\\par\n' % self.latex_text(cons['Details']) else: print >> out, '\\hspace{0pt}\\par\n' if cons.has_key('Arguments') and len(cons['Arguments']) > 0: print >> out, '\\par\n\n' cons['Arguments'].sort(lambda x, y: cmp(x['Name'], y['Name'])) for arg in cons['Arguments']: #print >> out, r'{\emph{%s: }\MakeUppercase %s\par}' \ print >> out, r'{\leftskip 0.3in \parindent=-0.3in \emph{%s: }\MakeUppercase %s\par}' \ % (self.latex_text(arg['Name']), self.latex_text(arg['Description'])) if cons.has_key('note') and cons['note'] != '': print >> out, '\\par\n\\strong{Note} ' print >> out, '%s' % self.latex_text(cons['note']) members = [x for x in self.content if x['type'] == 'memberofclass_' + entry['Name'] and \ not x['ignore'] and not x['hidden'] and not '~' in x['Name'] and not '__' in x['Name']] for mem in members: # change pop()->population() in simulator.h # change ind()->individual() in population.h if mem['Name'] == 'simuPOP::simulator::pop': mem['Name'] = 'simuPOP::simulator::population' mem['Usage'] = mem['Usage'].replace('pop(', 'population(') if mem['Name'] == 'simuPOP::population::ind': mem['Name'] = 'simuPOP::population::individual' mem['Usage'] = mem['Usage'].replace('ind(', 'individual(') members.sort(lambda x, y: cmp(x['Name'], y['Name'])) if len(members) == 0: print >> out, '\\end{classdesc}\n}\n' continue for mem in members: if mem.has_key('Usage') and mem['Usage'] != '': usage = self.latex_text(mem['Usage']) assert usage.startswith('x.') usageName = usage.split('(')[0][2:] usageParam = usage[len(usageName):].lstrip('(').rstrip(')') print >> out, r'\begin{methoddesc}{%s}{%s}' % (usageName, usageParam) else: print >> out, r'\begin{methoddesc}{%s}{}' % mem['Name'].split(':')[-1] if mem.has_key('Description') and mem['Description'].strip() != '': print >> out, r'\MakeUppercase %s' % self.latex_text(mem['Description']) if mem.has_key('Details') and mem['Details'] != '': # if we have short description, use a separate paragraph for details. if mem.has_key('Description') and mem['Description'] != '': print >> out, '\\par\n%s\\par' % self.latex_text(mem['Details']) # otherwise, use details as description else: print >> out, '%s' % self.latex_text(mem['Details']) if mem.has_key('Arguments') and mem['Arguments'] != '': mem['Arguments'].sort(lambda x, y: cmp(x['Name'], y['Name'])) for arg in mem['Arguments']: print >> out, r'{\leftskip 0.3in \parindent=-0.3in \emph{%s: }\MakeUppercase %s\par}' % \ (self.latex_text(arg['Name']), self.latex_text(arg['Description'])) if mem.has_key('note') and mem['note'] != '': print >> out, '\\par\n\\strong{Note:} %s\\par' % self.latex_text(mem['note']) print >> out, r'\end{methoddesc}' if cons.has_key('ExampleFile') and cons['ExampleFile'] is not None: print >> out, '\\strong{Example}\n' # ../log/ref_xxx.log => xxx.log label = os.path.split(cons['ExampleFile'])[-1].split('_')[-1] title = self.latex_text(cons['ExampleTitle']) print >> out, '\\lstinputlisting[caption={%s},label={%s}]{%s}' % \ (title, label, cons['ExampleFile'].replace('\\', '/')) print >> out, '\\end{classdesc}\n}\n' | 15605ab6b8c60c77a6f60bbbdc7040a384f6f9ed /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/401/15605ab6b8c60c77a6f60bbbdc7040a384f6f9ed/doxy2swig.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
67,
26264,
12,
2890,
16,
596,
4672,
468,
1122,
1640,
314,
3729,
4186,
364,
1241,
316,
306,
92,
364,
619,
316,
365,
18,
1745,
309,
619,
3292,
723,
3546,
422,
296,
6347,
67,
915,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
67,
26264,
12,
2890,
16,
596,
4672,
468,
1122,
1640,
314,
3729,
4186,
364,
1241,
316,
306,
92,
364,
619,
316,
365,
18,
1745,
309,
619,
3292,
723,
3546,
422,
296,
6347,
67,
915,
... |
config.add_subpackage('*') | config.add_subpackage('family') config.add_subpackage('robust') | def configuration(parent_package='',top_path=None, package_name='models'): from numpy.distutils.misc_util import Configuration config = Configuration(package_name,parent_package,top_path) config.add_subpackage('*') config.add_data_dir('tests') try: from scipy.stats.models.bspline_module import mod n, s, d = weave_ext(mod) config.add_extension(n, s, **d) except ImportError: pass return config | f032188f011d0b0a70691edd0032af9dd5e24f22 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12971/f032188f011d0b0a70691edd0032af9dd5e24f22/setupscons.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1664,
12,
2938,
67,
5610,
2218,
2187,
3669,
67,
803,
33,
7036,
16,
2181,
67,
529,
2218,
7665,
11,
4672,
628,
3972,
18,
4413,
5471,
18,
23667,
67,
1367,
1930,
4659,
642,
273,
4659,
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,
1664,
12,
2938,
67,
5610,
2218,
2187,
3669,
67,
803,
33,
7036,
16,
2181,
67,
529,
2218,
7665,
11,
4672,
628,
3972,
18,
4413,
5471,
18,
23667,
67,
1367,
1930,
4659,
642,
273,
4659,
12,
... |
try: logFile.pushDescriptor('cook') logBuildEnvironment(logFile, sourceVersion, policyTroves, recipeObj.macros, cfg) except: logFile.close() raise | else: try: logFile.pushDescriptor('cook') logBuildEnvironment(logFile, sourceVersion, policyTroves, recipeObj.macros, cfg) except: logFile.close() raise | def _cookPackageObject(repos, cfg, loader, sourceVersion, prep=True, macros={}, resume = None, ignoreDeps=False, logBuild=False, crossCompile=None, enforceManagedPolicy=False, requireCleanSources = False, downloadOnly = False, redirectStdin = False): """Builds the package for cookPackageObject. Parameter meanings are described there. """ recipeClass = loader.getRecipe() fullName = recipeClass.name lcache = lookaside.RepositoryCache(repos, cfg=cfg) srcdirs = [] if not requireCleanSources: if recipeClass._sourcePath is not None: srcdirs.append(recipeClass._sourcePath) srcdirs.append(cfg.sourceSearchDir % {'pkgname': recipeClass.name}) recipeObj = recipeClass(cfg, lcache, srcdirs, macros, crossCompile) recipeObj.cookType = loader.cookType for k, v in cfg.environment.items(): os.environ[k] = v % recipeObj.macros recipeObj.setRepos(repos) recipeObj.isatty(sys.stdout.isatty() and sys.stdin.isatty()) recipeObj.sourceVersion = sourceVersion builddir = util.normpath(cfg.buildPath) + "/" + recipeObj.name use.track(True) if recipeObj._trackedFlags is not None: use.setUsed(recipeObj._trackedFlags) policyTroves = _loadPolicy(recipeObj, cfg, enforceManagedPolicy) _callSetup(cfg, recipeObj) log.info('Building %s=%s[%s]' % ( recipeClass.name, sourceVersion.branch().label(), use.usedFlagsToFlavor(recipeClass.name))) if not downloadOnly: # no point in checking/recording buildreqs when we're not building. recipeObj.checkBuildRequirements(cfg, sourceVersion, raiseError=not (ignoreDeps or prep)) bldInfo = buildinfo.BuildInfo(builddir) recipeObj.buildinfo = bldInfo destdir = '' maindir = '' if not resume: destdir = '' if os.path.exists(builddir): log.info('Cleaning your old build tree') util.rmtree(builddir) else: try: bldInfo.read() if 'destdir' in bldInfo: destdir = bldInfo.destdir if 'maindir' in bldInfo: maindir = bldInfo.maindir except: pass bldDir = os.path.join(builddir, recipeObj.mainDir()) try: util.mkdirChain(bldDir) except OSError, e: raise errors.ConaryError("Error creating %s: %s" % (e.filename, e.strerror)) if not destdir: destdir = builddir + '/_ROOT_' util.mkdirChain(destdir) if recipeObj._recipeType == recipe.RECIPE_TYPE_INFO: logBuild = False if logBuild: # turn on logging of this trove. Logs are packaged as part # of :debuginfo component logPath = destdir + recipeObj.macros.buildlogpath xmlLogPath = destdir + recipeObj.macros.buildxmlpath # during the build, keep the log file in the same dir as buildinfo. # that will make it more accessible for debugging. At the end of # the build, copy to the correct location tmpLogPath = builddir + '/' + os.path.basename(logPath) tmpXmlLogPath = builddir + '/' + os.path.basename(xmlLogPath) # these files alone are not enough to make us build a package recipeObj._autoCreatedFileCount += 2 # subscribeLogPath is never packaged, and is not compressed subscribeLogPath = builddir + '/subscribedLog' recipeObj._setSubscribeLogPath(subscribeLogPath) util.mkdirChain(os.path.dirname(logPath)) # touch the logPath files so that the build process expects # files to be there for packaging file(logPath, 'w') file(xmlLogPath, 'w') file(subscribeLogPath, 'w') try: logFile = logger.startLog(tmpLogPath, tmpXmlLogPath, subscribeLogPath, withStdin = not redirectStdin) recipeObj._setLogFile(logFile) except OSError, err: if err.args[0] == 'out of pty devices': log.warning('*** No ptys found -- not logging build ***') logBuild = False # don't worry about cleaning up the touched log file -- # it's in the build dir and will be erased when the build # is finished else: raise try: logFile.pushDescriptor('cook') logBuildEnvironment(logFile, sourceVersion, policyTroves, recipeObj.macros, cfg) except: logFile.close() raise try: logBuild and logFile.pushDescriptor('build') bldInfo.begin() bldInfo.destdir = destdir if maindir: recipeObj.mainDir(maindir) if resume is True: resume = bldInfo.lastline recipeObj.macros.builddir = builddir recipeObj.macros.destdir = destdir logBuild and logFile.pushDescriptor('unpackSources') recipeObj.unpackSources(resume, downloadOnly=downloadOnly) logBuild and logFile.popDescriptor('unpackSources') # if we're only extracting or downloading, continue to the next recipe class. if prep or downloadOnly: logBuild and logFile.close() return recipeObj cwd = os.getcwd() try: os.chdir(builddir + '/' + recipeObj.mainDir()) logBuild and logFile.pushDescriptor('doBuild') recipeObj.doBuild(builddir, resume=resume) logBuild and logFile.popDescriptor('doBuild') if resume and resume != "policy" and \ recipeObj.resumeList[-1][1] != False: log.info('Finished Building %s Lines %s, Not Running Policy', recipeClass.name, resume) logBuild and logFile.close() return log.info('Processing %s', recipeClass.name) logBuild and logFile.pushDescriptor('policy') output = logBuild and logFile or sys.stdout if not resume and recipeObj.getType() is not recipe.RECIPE_TYPE_CAPSULE: # test suite policy does not work well with restart, and # is generally useful mainly when cooking into repo, where # restart is not allowed recipeObj.doProcess('TESTSUITE', logFile = output) recipeObj.doProcess('DESTDIR_PREPARATION', logFile = output) recipeObj.doProcess('DESTDIR_MODIFICATION', logFile = output) # cannot restart after the beginning of policy.PACKAGE_CREATION bldInfo.stop() use.track(False) recipeObj.doProcess('PACKAGE_CREATION', logFile = output) _initializeOldMetadata(repos, recipeObj, logFile = output) recipeObj.doProcess('PACKAGE_MODIFICATION', logFile = output) recipeObj.doProcess('ENFORCEMENT', logFile = output) recipeObj.doProcess('ERROR_REPORTING', logFile = output) logBuild and logFile.popDescriptor('policy') finally: os.chdir(cwd) grpName = recipeClass.name bldList = recipeObj.getPackages() if (recipeObj.getType() is not recipe.RECIPE_TYPE_CAPSULE and (not bldList or sum(len(x) for x in bldList) <= recipeObj._autoCreatedFileCount)): # no components in packages, or no explicit files in components log.error('No files were found to add to package %s' %recipeClass.name) logBuild and logFile.close() return except Exception, msg: if logBuild: logFile.pushDescriptor('EXCEPTION') logFile.write('%s\n' % msg) logFile.write(''.join(traceback.format_exception(*sys.exc_info()))) logFile.write('\n') logFile.popDescriptor('EXCEPTION') logFile.close() if cfg.debugRecipeExceptions: traceback.print_exception(*sys.exc_info()) debugger.post_mortem(sys.exc_info()[2]) raise if logBuild: logFile.popDescriptor('build') logFile.popDescriptor('cook') logFile.close() if logBuild and recipeObj._autoCreatedFileCount > 0: if os.path.exists(logPath): os.unlink(logPath) if os.path.exists(xmlLogPath): os.unlink(xmlLogPath) if not cfg.cleanAfterCook: # leave the easily accessible copy in place in # builddir shutil.copy2(tmpLogPath, logPath) shutil.copy2(tmpXmlLogPath, xmlLogPath) else: os.rename(tmpLogPath, logPath) os.rename(tmpXmlLogPath, xmlLogPath) # update contents on the buildlog, since they changed buildlogpath = recipeObj.macros.buildlogpath buildxmlpath = recipeObj.macros.buildxmlpath recipeObj.autopkg.updateFileContents( recipeObj.macros.buildlogpath, logPath) recipeObj.autopkg.updateFileContents( recipeObj.macros.buildxmlpath, xmlLogPath) recipeObj.autopkg.pathMap[buildlogpath].tags.set("buildlog") recipeObj.autopkg.pathMap[buildxmlpath].tags.set("xmlbuildlog") return bldList, recipeObj, builddir, destdir, policyTroves | 9a5bbecffed5dac8e30d87e354cc6925dd8b698e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8747/9a5bbecffed5dac8e30d87e354cc6925dd8b698e/cook.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
29854,
2261,
921,
12,
15564,
16,
2776,
16,
4088,
16,
1084,
1444,
16,
13237,
33,
5510,
16,
24302,
28793,
10774,
273,
599,
16,
2305,
14430,
33,
8381,
16,
613,
3116,
33,
8381,
16,
68... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
29854,
2261,
921,
12,
15564,
16,
2776,
16,
4088,
16,
1084,
1444,
16,
13237,
33,
5510,
16,
24302,
28793,
10774,
273,
599,
16,
2305,
14430,
33,
8381,
16,
613,
3116,
33,
8381,
16,
68... |
body = "<HTML><BODY><br>web.Server Traceback \n\n" + html.PRE(io.getvalue()) + "\n\n</body></html>" | body = "<HTML><BODY><br>web.Server Traceback \n\n" + html.PRE(io.getvalue()) + "\n\n</body></html>\n" | def process(self): "Process a request." # Log the request to a file. print self # cache the client information, we'll need this later to be pickled and # sent with the request so CGIs will work remotely self.client = self.transport.getPeer() # set various default headers self.setHeader('server', version) self.setHeader('date', date_time_string()) self.setHeader('content-type', "text/html") self.setHeader('connection', 'close') try: # Argument processing args = self.args if self.method == "POST": mfd = 'multipart/form-data' key, pdict = cgi.parse_header(self.getHeader('content-type')) if key == 'application/x-www-form-urlencoded': args.update( cgi.parse_qs(self.content)) | e3c1f9b79756e940cfaeb62057bd297dbbd0abc8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/e3c1f9b79756e940cfaeb62057bd297dbbd0abc8/server.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
12,
2890,
4672,
315,
2227,
279,
590,
1199,
468,
1827,
326,
590,
358,
279,
585,
18,
1172,
365,
225,
468,
1247,
326,
1004,
1779,
16,
732,
5614,
1608,
333,
5137,
358,
506,
6002,
125... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
12,
2890,
4672,
315,
2227,
279,
590,
1199,
468,
1827,
326,
590,
358,
279,
585,
18,
1172,
365,
225,
468,
1247,
326,
1004,
1779,
16,
732,
5614,
1608,
333,
5137,
358,
506,
6002,
125... |
ignored.append('^%s$' % escape(sfrelname)) ignored.append('^%s$' % escape(sfrelname+'.old')) ignored.append('^%s$' % escape(sfrelname+'.journal')) | ignored.append('^%s$' % re.escape(sfrelname)) ignored.append('^%s$' % re.escape(sfrelname+'.old')) ignored.append('^%s$' % re.escape(sfrelname+'.journal')) | def _prepareTargetRepository(self): """ Create the base directory if it doesn't exist, and execute ``darcs initialize`` if needed. """ | 5e5b4967e89c99046884bacd6b13974d01087474 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5981/5e5b4967e89c99046884bacd6b13974d01087474/darcs.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
9366,
2326,
3305,
12,
2890,
4672,
3536,
1788,
326,
1026,
1867,
309,
518,
3302,
1404,
1005,
16,
471,
1836,
12176,
72,
297,
2143,
4046,
10335,
309,
3577,
18,
3536,
2,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
9366,
2326,
3305,
12,
2890,
4672,
3536,
1788,
326,
1026,
1867,
309,
518,
3302,
1404,
1005,
16,
471,
1836,
12176,
72,
297,
2143,
4046,
10335,
309,
3577,
18,
3536,
2,
-100,
-100,
-100... |
ord(salt[7]), | ord(salt[0]), ord(salt[1]), ord(salt[2]), ord(salt[3]), ord(salt[4]), ord(salt[5]), | def __getDecryptionKey(self, privKey, snmpEngineBoots, snmpEngineTime, salt): snmpEngineBoots, snmpEngineTime, salt = ( long(snmpEngineBoots), long(snmpEngineTime), str(salt) ) | 6c6728a9fa75cbf5dad50de60795de1d16d64891 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/587/6c6728a9fa75cbf5dad50de60795de1d16d64891/aes.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
588,
1799,
4346,
653,
12,
2890,
16,
22849,
16,
15366,
4410,
15817,
87,
16,
15366,
4410,
950,
16,
4286,
4672,
15366,
4410,
15817,
87,
16,
15366,
4410,
950,
16,
4286,
273,
261,
1525,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
588,
1799,
4346,
653,
12,
2890,
16,
22849,
16,
15366,
4410,
15817,
87,
16,
15366,
4410,
950,
16,
4286,
4672,
15366,
4410,
15817,
87,
16,
15366,
4410,
950,
16,
4286,
273,
261,
1525,... |
r""" Central binomial coefficients: $n \choose \lfloor \frac {n}{ 2} \rfloor$. INPUT: n -- non negative integer OUTPUT: integer -- function value EXAMPLES: sage: a = sloane.A001405;a Central binomial coefficients: C(n,floor(n/2)). sage: a(0) 1 sage: a(2) 2 sage: a(12) 924 sage: a.list(12) [1, 1, 2, 3, 6, 10, 20, 35, 70, 126, 252, 462] AUTHOR: -- Jaap Spies (2007-01-26) """ def __init__(self): | def __init__(self): r""" Central binomial coefficients: $n \choose \lfloor \frac {n}{ 2} \rfloor$. INPUT: n -- non negative integer OUTPUT: integer -- function value EXAMPLES: sage: a = sloane.A001405;a Central binomial coefficients: C(n,floor(n/2)). sage: a(0) 1 sage: a(2) 2 sage: a(12) 924 sage: a.list(12) [1, 1, 2, 3, 6, 10, 20, 35, 70, 126, 252, 462] AUTHOR: -- Jaap Spies (2007-01-26) """ | def _eval(self, n): return arith.binomial(2*n,n) | 7b02e5455d5d52d6dcc7f2314cdd56803031a1c6 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/7b02e5455d5d52d6dcc7f2314cdd56803031a1c6/sloane_functions.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
8622,
12,
2890,
16,
290,
4672,
327,
419,
483,
18,
4757,
11496,
12,
22,
14,
82,
16,
82,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
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,
389,
8622,
12,
2890,
16,
290,
4672,
327,
419,
483,
18,
4757,
11496,
12,
22,
14,
82,
16,
82,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
set_instead_of_inc=incsubt.op.set_instead_of_inc)( | set_instead_of_inc=incsubt.set_instead_of_inc)( | def local_gpu_incsubtensor(node): if node.op == gpu_from_host: host_output = node.inputs[0] if host_output.owner and type(host_output.owner.op) == tensor.IncSubtensor: incsubt = host_output.owner.op x, y = host_output.owner.inputs[0:2] coords = host_output.owner.inputs[2:] return [GpuIncSubtensor(incsubt.idx_list, inplace=incsubt.inplace, set_instead_of_inc=incsubt.op.set_instead_of_inc)( gpu_from_host(x), gpu_from_host(y), *coords)] if type(node.op) == tensor.IncSubtensor: x, y = node.inputs[0:2] assert isinstance(x.type, tensor.TensorType) assert isinstance(y.type, tensor.TensorType) coords = node.inputs[2:] go_gpu = False if x.owner and x.owner.op == host_from_gpu: go_gpu = True gpu_x, = x.owner.inputs else: gpu_x = gpu_from_host(x) if y.owner and y.owner.op == host_from_gpu: go_gpu = True gpu_y, = y.owner.inputs else: gpu_y = gpu_from_host(y) if go_gpu: return [host_from_gpu(GpuIncSubtensor( node.op.idx_list, inplace=node.op.inplace, set_instead_of_inc=node.op.set_instead_of_inc)( gpu_x, gpu_y, *coords))] return False | baff091a9c7f02f9e29b9e26663b4f811794e65b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12438/baff091a9c7f02f9e29b9e26663b4f811794e65b/opt.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1191,
67,
23162,
67,
9523,
1717,
13720,
12,
2159,
4672,
309,
756,
18,
556,
422,
21810,
67,
2080,
67,
2564,
30,
1479,
67,
2844,
273,
756,
18,
10029,
63,
20,
65,
309,
1479,
67,
2844,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1191,
67,
23162,
67,
9523,
1717,
13720,
12,
2159,
4672,
309,
756,
18,
556,
422,
21810,
67,
2080,
67,
2564,
30,
1479,
67,
2844,
273,
756,
18,
10029,
63,
20,
65,
309,
1479,
67,
2844,
1... |
logging.warning( 'Adding a default profile on the system (this is mandatory).') | logging.warning('''Adding a default %s profile on the system ''' '''(this is mandatory).''' % styles.stylize(styles.ST_NAME, 'Users')) | def checkDefaultProfile(self): """If no profile exists on the system, create a default one with system group "users".""" | 3482744910e32cde6e9d054b800a2d84b6cd8199 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/3482744910e32cde6e9d054b800a2d84b6cd8199/profiles.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
1868,
4029,
12,
2890,
4672,
3536,
2047,
1158,
3042,
1704,
603,
326,
2619,
16,
752,
279,
805,
1245,
598,
2619,
1041,
315,
5577,
6,
12123,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
1868,
4029,
12,
2890,
4672,
3536,
2047,
1158,
3042,
1704,
603,
326,
2619,
16,
752,
279,
805,
1245,
598,
2619,
1041,
315,
5577,
6,
12123,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
self.hamster=dbus.SessionBus().get_object(tmp_dbus[0], tmp_dbus[1]) | dbus.SessionBus().get_object(tmp_dbus[0], tmp_dbus[1]) | def recheckPluginsErrors(self, plugins, plugin_api): for plugin in plugins: if plugin['error']: error = False missing = [] missing_dbus = [] | 0bf782abf2009bca8b621badc8eba65304b3b108 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8234/0bf782abf2009bca8b621badc8eba65304b3b108/engine.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
283,
1893,
9461,
4229,
12,
2890,
16,
4799,
16,
1909,
67,
2425,
4672,
364,
1909,
316,
4799,
30,
309,
1909,
3292,
1636,
3546,
30,
555,
273,
1083,
3315,
273,
5378,
3315,
67,
1966,
407,
27... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
283,
1893,
9461,
4229,
12,
2890,
16,
4799,
16,
1909,
67,
2425,
4672,
364,
1909,
316,
4799,
30,
309,
1909,
3292,
1636,
3546,
30,
555,
273,
1083,
3315,
273,
5378,
3315,
67,
1966,
407,
27... |
self.assertEqual(sprite.spritecollide(s1, ag2, dokill = False, collided = sprite.collide_circle_ratio(0.5)),[s2,s3]) | self.assertTrue ( unordered_equality ( sprite.spritecollide(s1, ag2, dokill = False, collided = sprite.collide_circle_ratio(0.5)), [s2,s3] )) | def test_spritecollide(self): | db8df1b888c4afedef92c66bbb60a73971be1b37 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1298/db8df1b888c4afedef92c66bbb60a73971be1b37/sprite_test.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
1752,
583,
18997,
8130,
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,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
1752,
583,
18997,
8130,
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,
-10... |
osd.clearscreen() osd.drawstring('File "%s" not found!' % filename, 30, 280) osd.update() time.sleep(2.0) menuwidget.refresh() | if DEBUG: print "xmms file_not_found %s " % (filename,) if xmms.is_running(): globals.rc.post_event(globals.rc.RIGHT) else: skin.PopupBox('File "%s" not found!' % filename) time.sleep(3.0) menuwidget.refresh() | def file_not_found(self, filename): osd.clearscreen() osd.drawstring('File "%s" not found!' % filename, 30, 280) osd.update() time.sleep(2.0) menuwidget.refresh() | 4b13cbf3e9089683f6d67d3615270789a70b7b47 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/4b13cbf3e9089683f6d67d3615270789a70b7b47/xmmsaudioplayer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
585,
67,
902,
67,
7015,
12,
2890,
16,
1544,
4672,
1140,
72,
18,
8507,
9252,
1435,
1140,
72,
18,
9446,
1080,
2668,
812,
2213,
87,
6,
486,
1392,
5124,
738,
1544,
16,
5196,
16,
576,
367... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
585,
67,
902,
67,
7015,
12,
2890,
16,
1544,
4672,
1140,
72,
18,
8507,
9252,
1435,
1140,
72,
18,
9446,
1080,
2668,
812,
2213,
87,
6,
486,
1392,
5124,
738,
1544,
16,
5196,
16,
576,
367... |
self.w_sys = sys | self.make_builtins() self.make_sys() | def initialize(self): import __builtin__, types self.builtin = __builtin__ self.w_builtins.update(__builtin__.__dict__) for n, c in self.w_builtins.iteritems(): if isinstance(c, types.ClassType) and issubclass(c, Exception): setattr(self, 'w_' + c.__name__, c) self.w_None = None self.w_True = True self.w_False = False self.w_sys = sys | 7e600ae6ec193211d3074364dd438624a960052b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/7e600ae6ec193211d3074364dd438624a960052b/trivial.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4046,
12,
2890,
4672,
1930,
1001,
24553,
972,
16,
1953,
365,
18,
24553,
273,
1001,
24553,
972,
365,
18,
91,
67,
12406,
2679,
18,
2725,
12,
972,
24553,
972,
16186,
1576,
972,
13,
364,
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,
4046,
12,
2890,
4672,
1930,
1001,
24553,
972,
16,
1953,
365,
18,
24553,
273,
1001,
24553,
972,
365,
18,
91,
67,
12406,
2679,
18,
2725,
12,
972,
24553,
972,
16186,
1576,
972,
13,
364,
2... |
def tsv_filter(filename): '''iterate over lines in tsv file, printing | def tsv_each(filename): '''iterate over lines in tsv file''' f = open(filename, 'r') fields = None for line in f: if line.startswith('#'): continue data = [x.strip() for x in line.decode('utf-8').split('\t')] if not fields: fields = data else: yield dict(zip(fields, data)) f.close() | cf79f3d1b6f8579c7834f8fe39574909752c93a2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13764/cf79f3d1b6f8579c7834f8fe39574909752c93a2/createdb.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
22731,
67,
13798,
12,
3459,
4672,
9163,
18793,
1879,
2362,
316,
22731,
585,
26418,
284,
273,
1696,
12,
3459,
16,
296,
86,
6134,
1466,
273,
599,
364,
980,
316,
284,
30,
309,
980,
18,
17... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
22731,
67,
13798,
12,
3459,
4672,
9163,
18793,
1879,
2362,
316,
22731,
585,
26418,
284,
273,
1696,
12,
3459,
16,
296,
86,
6134,
1466,
273,
599,
364,
980,
316,
284,
30,
309,
980,
18,
17... | |
class Max(object): def __cmp__(self, other): if self is other: return 0 else: return 1 MAX = Max() | # def my_instantiate(): | b96a14f3481fa11c4e42c1adbd461732361d9a2c /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6934/b96a14f3481fa11c4e42c1adbd461732361d9a2c/normalizecalls.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
468,
1652,
3399,
67,
24628,
3840,
13332,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
468,
1652,
3399,
67,
24628,
3840,
13332,
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,
... | |
DeprecationWarning, 2) | DeprecationWarning, 3) | def nested(*managers): """Support multiple context managers in a single with-statement. Code like this: with nested(A, B, C) as (X, Y, Z): <body> is equivalent to this: with A as X: with B as Y: with C as Z: <body> """ warn("With-statements now directly support multiple context managers", DeprecationWarning, 2) exits = [] vars = [] exc = (None, None, None) try: for mgr in managers: exit = mgr.__exit__ enter = mgr.__enter__ vars.append(enter()) exits.append(exit) yield vars except: exc = sys.exc_info() finally: while exits: exit = exits.pop() try: if exit(*exc): exc = (None, None, None) except: exc = sys.exc_info() if exc != (None, None, None): # Don't rely on sys.exc_info() still containing # the right information. Another exception may # have been raised and caught by an exit method raise exc[0], exc[1], exc[2] | 7333125b7eedd3a445515c7acc9d29b35e8a5636 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8125/7333125b7eedd3a445515c7acc9d29b35e8a5636/contextlib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4764,
30857,
29757,
4672,
3536,
6289,
3229,
819,
21103,
316,
279,
2202,
598,
17,
11516,
18,
225,
3356,
3007,
333,
30,
225,
598,
4764,
12,
37,
16,
605,
16,
385,
13,
487,
261,
60,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4764,
30857,
29757,
4672,
3536,
6289,
3229,
819,
21103,
316,
279,
2202,
598,
17,
11516,
18,
225,
3356,
3007,
333,
30,
225,
598,
4764,
12,
37,
16,
605,
16,
385,
13,
487,
261,
60,
16,
... |
self.gridlayout38.addWidget(self.historyHeight_spinbox,2,1,1,1) | self.gridlayout34.addWidget(self.historyHeight_spinbox,2,1,1,1) | def setupUi(self, UserPrefsDialog): UserPrefsDialog.setObjectName("UserPrefsDialog") UserPrefsDialog.resize(QtCore.QSize(QtCore.QRect(0,0,917,661).size()).expandedTo(UserPrefsDialog.minimumSizeHint())) | 752b48c67dcf97437d2cb83fa267b09487665da0 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11221/752b48c67dcf97437d2cb83fa267b09487665da0/UserPrefsDialog.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3875,
13943,
12,
2890,
16,
2177,
1386,
2556,
6353,
4672,
2177,
1386,
2556,
6353,
18,
542,
16707,
2932,
1299,
1386,
2556,
6353,
7923,
2177,
1386,
2556,
6353,
18,
15169,
12,
23310,
4670,
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,
3875,
13943,
12,
2890,
16,
2177,
1386,
2556,
6353,
4672,
2177,
1386,
2556,
6353,
18,
542,
16707,
2932,
1299,
1386,
2556,
6353,
7923,
2177,
1386,
2556,
6353,
18,
15169,
12,
23310,
4670,
18,... |
for day in week: if day == 0: s = '' else: s = `day` print _center(s, width), | print week(theweek, width), def week(theweek, width): """Returns a single week in a string (no newline).""" days = [] for day in theweek: if day == 0: s = '' else: s = '%2i' % day days.append(_center(s, width)) return ' '.join(days) | def prweek(week, width): """Print a single week (no newline).""" for day in week: if day == 0: s = '' else: s = `day` print _center(s, width), | ad3bc44d52b9b9c1f1c7449d0991138fed5fe978 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/ad3bc44d52b9b9c1f1c7449d0991138fed5fe978/calendar.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
846,
10741,
12,
10741,
16,
1835,
4672,
3536,
5108,
279,
2202,
4860,
261,
2135,
9472,
13,
12123,
1172,
4860,
12,
451,
359,
3317,
16,
1835,
3631,
225,
1652,
4860,
12,
451,
359,
3317,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
846,
10741,
12,
10741,
16,
1835,
4672,
3536,
5108,
279,
2202,
4860,
261,
2135,
9472,
13,
12123,
1172,
4860,
12,
451,
359,
3317,
16,
1835,
3631,
225,
1652,
4860,
12,
451,
359,
3317,
16,
... |
return result | return result | def unlink(self, cursor, user, ids, context=None): if not context: context = {} for trans_obj in self.read(cursor, user, ids, ['name','type','res_id'], context=context): self._get_source.clear_cache(cursor.dbname, user, trans_obj['name'], trans_obj['type'], lang=context.get('lang','en_US')) self._get_ids.clear_cache(cursor.dbname, user, trans_obj['name'], trans_obj['type'], context.get('lang','en_US'), [trans_obj['res_id']]) result = super(ir_translation, self).unlink(cursor, user, ids, context=context) return result | e05d255c010e8bb660d81c16909ed44b5961cd32 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/e05d255c010e8bb660d81c16909ed44b5961cd32/ir_translation.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8255,
12,
2890,
16,
3347,
16,
729,
16,
3258,
16,
819,
33,
7036,
4672,
309,
486,
819,
30,
819,
273,
2618,
364,
906,
67,
2603,
316,
365,
18,
896,
12,
9216,
16,
729,
16,
3258,
16,
102... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8255,
12,
2890,
16,
3347,
16,
729,
16,
3258,
16,
819,
33,
7036,
4672,
309,
486,
819,
30,
819,
273,
2618,
364,
906,
67,
2603,
316,
365,
18,
896,
12,
9216,
16,
729,
16,
3258,
16,
102... |
self.close(client) | client.close() | def slide_change(self, slidemanager, page_number, slide, notes, pclient=None): """Event fired when the current slide has changed""" if not slidemanager: return #Scale slide to fit the client with slide = pygame.transform.scale( slide, self.get_aspect_size(self.client_size, slide.get_size())) #Convert slide to JPEG (use PIL instead of pygame, which needs version >=1.8 f = cStringIO.StringIO() pil_img = Image.fromstring('RGB', slide.get_size(), pygame.image.tostring(slide, 'RGB')) pil_img.save(f, 'JPEG', quality=15) slide_jpg = f.getvalue() f.close() | 6e7a15fdf9831aa2fc2676b69a41f0da4b5370f6 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3598/6e7a15fdf9831aa2fc2676b69a41f0da4b5370f6/remotebase.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12701,
67,
3427,
12,
2890,
16,
12701,
4181,
16,
1363,
67,
2696,
16,
12701,
16,
10913,
16,
293,
2625,
33,
7036,
4672,
3536,
1133,
15950,
1347,
326,
783,
12701,
711,
3550,
8395,
309,
486,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12701,
67,
3427,
12,
2890,
16,
12701,
4181,
16,
1363,
67,
2696,
16,
12701,
16,
10913,
16,
293,
2625,
33,
7036,
4672,
3536,
1133,
15950,
1347,
326,
783,
12701,
711,
3550,
8395,
309,
486,
... |
print "__cmp__:", args | def __cmp__(self, *args): print "__cmp__:", args return 0 | d88a7f2a50eed4a8ee26d87c1ff250611b0feaed /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8125/d88a7f2a50eed4a8ee26d87c1ff250611b0feaed/test_class.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
9625,
972,
12,
2890,
16,
380,
1968,
4672,
327,
374,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
9625,
972,
12,
2890,
16,
380,
1968,
4672,
327,
374,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... | |
z = pow(z, 2) | z = math.pow(z, 2) | def func(x, y): z = x + y / 2.1 * x z = math.fmod(z, 60.0) z = pow(z, 2) z = -z return int(z) | 75542d2102071f5b1b7406968a7981f3121f3b03 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6934/75542d2102071f5b1b7406968a7981f3121f3b03/test_typed.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1326,
12,
92,
16,
677,
4672,
998,
273,
619,
397,
677,
342,
576,
18,
21,
380,
619,
998,
273,
4233,
18,
74,
1711,
12,
94,
16,
4752,
18,
20,
13,
998,
273,
4233,
18,
23509,
12,
94,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1326,
12,
92,
16,
677,
4672,
998,
273,
619,
397,
677,
342,
576,
18,
21,
380,
619,
998,
273,
4233,
18,
74,
1711,
12,
94,
16,
4752,
18,
20,
13,
998,
273,
4233,
18,
23509,
12,
94,
1... |
("t1", [("t1", None)], "import ni"), | ("t1", [("t1", None)], "import t1"), | def runtest(hier, code): root = tempfile.mktemp() mkhier(root, hier) savepath = sys.path[:] codefile = tempfile.mktemp() f = open(codefile, "w") f.write(code) f.close() try: sys.path.insert(0, root) if verbose: print "sys.path =", sys.path try: execfile(codefile, globals(), {}) except: traceback.print_exc() finally: sys.path[:] = savepath try: cleanout(root) except (os.error, IOError): pass os.remove(codefile) | 215ea46f7bd97de04acf462f88480d4d2978e8f8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/215ea46f7bd97de04acf462f88480d4d2978e8f8/test_pkg.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
3813,
12,
76,
2453,
16,
981,
4672,
1365,
273,
13275,
18,
24816,
5814,
1435,
5028,
76,
2453,
12,
3085,
16,
366,
2453,
13,
1923,
803,
273,
2589,
18,
803,
10531,
65,
981,
768,
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,
1086,
3813,
12,
76,
2453,
16,
981,
4672,
1365,
273,
13275,
18,
24816,
5814,
1435,
5028,
76,
2453,
12,
3085,
16,
366,
2453,
13,
1923,
803,
273,
2589,
18,
803,
10531,
65,
981,
768,
273,
... |
def _refextract_markup_reference_line_marker_as_marcxml(marker_text): | def markup_refline_marker_as_marcxml(marker_text): | def _refextract_markup_reference_line_marker_as_marcxml(marker_text): """Given a reference line marker, return a string containing the MARC XML version of the marker. E.g. for the line marker "[1]", return the following MARC XML string: <datafield tag="999" ind1="C" ind2="5"> <subfield code="o">[1]</subfield> </datafield> @param marker_text: (string) the reference line marker to be marked up as MARC XML @return: (string) MARC XML representation of the marker line. """ xml_line = \ | afd852f45332d11ac027b8d47ce1a922ce7f2cc6 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12027/afd852f45332d11ac027b8d47ce1a922ce7f2cc6/refextract.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9813,
67,
1734,
1369,
67,
11145,
67,
345,
67,
3684,
71,
2902,
12,
11145,
67,
955,
4672,
3536,
6083,
279,
2114,
980,
5373,
16,
327,
279,
533,
4191,
326,
490,
27206,
3167,
1177,
434,
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,
9813,
67,
1734,
1369,
67,
11145,
67,
345,
67,
3684,
71,
2902,
12,
11145,
67,
955,
4672,
3536,
6083,
279,
2114,
980,
5373,
16,
327,
279,
533,
4191,
326,
490,
27206,
3167,
1177,
434,
326... |
insertValueList.append( '(%s,%s,%s)' % (jobID, e_name, e_value)) cmd = 'REPLACE JobParameters (JobID,Name,Value) VALUES %s' % ', '.join(insertValueList) | insertValueList.append( '(%s,%s,%s)' % ( jobID, e_name, e_value ) ) cmd = 'REPLACE JobParameters (JobID,Name,Value) VALUES %s' % ', '.join( insertValueList ) | def setJobParameters(self,jobID,parameters): """ Set parameters specified by a list of name/value pairs for the job JobID """ | 99c1bc850ba087890925b3180df206f65bb1d4b3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/99c1bc850ba087890925b3180df206f65bb1d4b3/JobDB.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
2278,
2402,
12,
2890,
16,
4688,
734,
16,
3977,
4672,
3536,
1000,
1472,
1269,
635,
279,
666,
434,
508,
19,
1132,
5574,
364,
326,
1719,
22137,
3536,
2,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
2278,
2402,
12,
2890,
16,
4688,
734,
16,
3977,
4672,
3536,
1000,
1472,
1269,
635,
279,
666,
434,
508,
19,
1132,
5574,
364,
326,
1719,
22137,
3536,
2,
-100,
-100,
-100,
-100,
-100,
... |
mynode = Player.getElementByID("mynode2") self.assert_(mynode.fillcolor == "0f3f7f") | mynode = Player.getElementByID("mynode2") self.assert_(mynode.fillcolor == "0f3f7f") | def usePlugin2(): node = Player.createNode('<colornode fillcolor="0f3f7f" id="mynode2" />') Player.getElementByID("container").appendChild(node) | 168943ca8d5553461c58bed57aff22cbc60be62c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7300/168943ca8d5553461c58bed57aff22cbc60be62c/PluginTest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
999,
3773,
22,
13332,
756,
273,
19185,
18,
2640,
907,
2668,
32,
3266,
2159,
3636,
3266,
1546,
20,
74,
23,
74,
27,
74,
6,
612,
1546,
81,
878,
390,
22,
6,
13452,
13,
19185,
18,
21336,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
999,
3773,
22,
13332,
756,
273,
19185,
18,
2640,
907,
2668,
32,
3266,
2159,
3636,
3266,
1546,
20,
74,
23,
74,
27,
74,
6,
612,
1546,
81,
878,
390,
22,
6,
13452,
13,
19185,
18,
21336,
... |
is_implicit_VR = False is_little_endian = True | self._is_implicit_VR = False self._is_little_endian = True | def __init__(self, fp, stop_when=None, force=False): """Read the preambleand meta info, prepare iterator for remainder | 727d6ae2a1279c66f6d759d063ea5c9068af9d10 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5900/727d6ae2a1279c66f6d759d063ea5c9068af9d10/filereader.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
4253,
16,
2132,
67,
13723,
33,
7036,
16,
2944,
33,
8381,
4672,
3536,
1994,
326,
27841,
464,
2191,
1123,
16,
2911,
2775,
364,
10022,
2,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
4253,
16,
2132,
67,
13723,
33,
7036,
16,
2944,
33,
8381,
4672,
3536,
1994,
326,
27841,
464,
2191,
1123,
16,
2911,
2775,
364,
10022,
2,
-100,
-100,
-100,
... |
status.append (repr(self.addr)) return '<%s at % def add_channel (self, map=None): | status.append(repr(self.addr)) return '<%s at % def add_channel(self, map=None): | def __repr__ (self): status = [self.__class__.__module__+"."+self.__class__.__name__] if self.accepting and self.addr: status.append ('listening') elif self.connected: status.append ('connected') if self.addr is not None: try: status.append ('%s:%d' % self.addr) except TypeError: status.append (repr(self.addr)) return '<%s at %#x>' % (' '.join (status), id (self)) | f7eb0d3f501f2e379b8719bda476d318d1e79160 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/f7eb0d3f501f2e379b8719bda476d318d1e79160/asyncore.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
12715,
972,
261,
2890,
4672,
1267,
273,
306,
2890,
16186,
1106,
972,
16186,
2978,
972,
9078,
1199,
15,
2890,
16186,
1106,
972,
16186,
529,
972,
65,
309,
365,
18,
9436,
310,
471,
36... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
12715,
972,
261,
2890,
4672,
1267,
273,
306,
2890,
16186,
1106,
972,
16186,
2978,
972,
9078,
1199,
15,
2890,
16186,
1106,
972,
16186,
529,
972,
65,
309,
365,
18,
9436,
310,
471,
36... |
raise util.Abort("[ui] username is not configured in .hgrc") | user = ui.config("ui", "username") if not user: raise util.Abort("[ui] username is not configured in .hgrc") userline = FindContributor(ui, repo, user, warn=False) if not userline: raise util.Abort("cannot find %s in CONTRIBUTORS" % (user,)) return userline def FindContributor(ui, repo, user, warn=True): | def CheckContributor(ui, repo): user = ui.config("ui", "username") if not user: raise util.Abort("[ui] username is not configured in .hgrc") try: f = open(repo.root + '/CONTRIBUTORS', 'r') except: raise util.Abort("cannot open %s: %s" % (repo.root+'/CONTRIBUTORS', ExceptionDetail())) for line in f.readlines(): if line.rstrip() == user.rstrip(): return raise util.Abort("cannot find %s in CONTRIBUTORS" % (user,)) | 552488c0a2c9ad31e3e6aba82b8e2a038e34c4ef /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5761/552488c0a2c9ad31e3e6aba82b8e2a038e34c4ef/codereview.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2073,
442,
19293,
12,
4881,
16,
3538,
4672,
729,
273,
5915,
18,
1425,
2932,
4881,
3113,
315,
5053,
7923,
309,
486,
729,
30,
729,
273,
5915,
18,
1425,
2932,
4881,
3113,
315,
5053,
7923,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2073,
442,
19293,
12,
4881,
16,
3538,
4672,
729,
273,
5915,
18,
1425,
2932,
4881,
3113,
315,
5053,
7923,
309,
486,
729,
30,
729,
273,
5915,
18,
1425,
2932,
4881,
3113,
315,
5053,
7923,
... |
'old': 'oldfile.txt', 'new': 'newfile.txt'}) | 'old': '/static/upload/oldfile.txt', 'new': '/static/upload/newfile.txt'}) | def patching(): #?mode=addfolder&path=/&name=new_directory self.response = self.client.get('', {'mode': 'rename', 'old': 'oldfile.txt', 'new': 'newfile.txt'}) | 9e4515155641162b4734bc23173fb8517537c1f1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3536/9e4515155641162b4734bc23173fb8517537c1f1/views.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4729,
310,
13332,
468,
35,
3188,
33,
1289,
5609,
10,
803,
33,
19,
10,
529,
33,
2704,
67,
5149,
365,
18,
2740,
273,
365,
18,
2625,
18,
588,
2668,
2187,
13666,
3188,
4278,
296,
18539,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4729,
310,
13332,
468,
35,
3188,
33,
1289,
5609,
10,
803,
33,
19,
10,
529,
33,
2704,
67,
5149,
365,
18,
2740,
273,
365,
18,
2625,
18,
588,
2668,
2187,
13666,
3188,
4278,
296,
18539,
... |
assert_equals(handler.minargs, count) assert_equals(handler.maxargs, count) | assert_equals(handler.arguments._arg_limit_checker.minargs, count) assert_equals(handler.arguments._arg_limit_checker.maxargs, count) | def test_arg_limits_no_defaults_or_varargs(self): for count in [ 0, 1, 3 ]: method = handlers['a_%d' % count] handler = _JavaHandler(LibraryMock(), method.__name__, method) assert_equals(handler.minargs, count) assert_equals(handler.maxargs, count) | 8b659c9e9c7549540d64388e738f2ffc0c359175 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6988/8b659c9e9c7549540d64388e738f2ffc0c359175/test_handlers.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
3175,
67,
14270,
67,
2135,
67,
7606,
67,
280,
67,
1401,
1968,
12,
2890,
4672,
364,
1056,
316,
306,
374,
16,
404,
16,
890,
308,
30,
707,
273,
4919,
3292,
69,
10185,
72,
11,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
3175,
67,
14270,
67,
2135,
67,
7606,
67,
280,
67,
1401,
1968,
12,
2890,
4672,
364,
1056,
316,
306,
374,
16,
404,
16,
890,
308,
30,
707,
273,
4919,
3292,
69,
10185,
72,
11,
... |
self.book_on_device(None, None, reset=True) | self.book_on_device(None, reset=True) | def books_deleted(self, job): ''' Called once deletion is done on the device ''' for view in (self.memory_view, self.card_a_view, self.card_b_view): view.model().deletion_done(job, job.failed) if job.failed: self.device_job_exception(job) return | 4f7f7214c13da75ff2dfc4ef0d00da56ad43fdcb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9125/4f7f7214c13da75ff2dfc4ef0d00da56ad43fdcb/device.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6978,
87,
67,
8600,
12,
2890,
16,
1719,
4672,
9163,
11782,
3647,
10899,
353,
2731,
603,
326,
2346,
9163,
364,
1476,
316,
261,
2890,
18,
7858,
67,
1945,
16,
365,
18,
3327,
67,
69,
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,
6978,
87,
67,
8600,
12,
2890,
16,
1719,
4672,
9163,
11782,
3647,
10899,
353,
2731,
603,
326,
2346,
9163,
364,
1476,
316,
261,
2890,
18,
7858,
67,
1945,
16,
365,
18,
3327,
67,
69,
67,
... |
if not os.path.exists(self.log): return False f = open(self.log) try: for l in f: if "notice Broker running" in l: self._log_ready = True return True return False finally: f.close() | self._log_ready = find_in_file("notice Broker running", self.log) | def log_ready(self): """Return true if the log file exists and contains a broker ready message""" if self._log_ready: return True if not os.path.exists(self.log): return False f = open(self.log) try: for l in f: if "notice Broker running" in l: self._log_ready = True return True return False finally: f.close() | 124af79b9cde765a028e009cfb786b43b720d282 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/197/124af79b9cde765a028e009cfb786b43b720d282/brokertest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
613,
67,
1672,
12,
2890,
4672,
3536,
990,
638,
309,
326,
613,
585,
1704,
471,
1914,
279,
8625,
5695,
883,
8395,
309,
365,
6315,
1330,
67,
1672,
30,
327,
1053,
309,
486,
1140,
18,
803,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
613,
67,
1672,
12,
2890,
4672,
3536,
990,
638,
309,
326,
613,
585,
1704,
471,
1914,
279,
8625,
5695,
883,
8395,
309,
365,
6315,
1330,
67,
1672,
30,
327,
1053,
309,
486,
1140,
18,
803,
... |
for pkg in packages.itervalues(): if pkg["name"] in distroverpkg: releasever = pkg["version"] break | def main(): import getopt global cachedir if len(sys.argv) <= 1: usage() return 0 (_, hostname, kernelversion, _, arch) = os.uname() archlist = None owner = None if os.geteuid() == 0: owner = 1 homedir = os.environ.get("HOME", "") if homedir and not owner: cachedir = homedir + "/.pyrpm/cache/" if not os.path.isdir(cachedir): print "Created the directory %s to cache files locally." % cachedir makeDirs(cachedir) verbose = 2 ignoresymlinks = 0 configfiles = [] distroverpkg = ("fedora-release", "redhat-release") #assumeyes = 0 repo = [] strict = 0 nodigest = 0 payload = 1 wait = 0 verify = 1 small = 0 explode = 0 diff = 0 extract = 0 excludes = "" checksrpms = 0 rpmdbpath = "/var/lib/rpm/" withdb = 0 reposdirs = [] checkarch = 0 checkfileconflicts = 0 runorderer = 0 specifyarch = 0 buildroot = "" checkrpmdb = 0 checkoldkernel = 0 numkeepkernels = 3 checkdeps = 0 baseurl = None createrepo = 0 groupfile = "comps.xml" mercurial = 0 pyrex = 0 releasever = "" updaterpms = 0 exactarch = 1 # XXX: should be set via yum.conf testmirrors = 0 try: (opts, args) = getopt.getopt(sys.argv[1:], "c:hqvy?", ["help", "verbose", "quiet", "arch=", "archlist=", "releasever=", "distroverpkg", "strict", "ignoresymlinks", "digest", "nodigest", "payload", "nopayload", "wait", "noverify", "small", "explode", "diff", "extract", "excludes=", "nofileconflicts", "fileconflicts", "runorderer", "updaterpms", "reposdir=", "disablereposdir", "enablerepos", "checksrpms", "checkarch", "rpmdbpath=", "dbpath=", "withdb", "cachedir=", "checkrpmdb", "checkoldkernel", "numkeepkernels=", "checkdeps", "buildroot=", "installroot=", "root=", "version", "baseurl=", "createrepo", "groupfile=", "mercurial", "pyrex", "testmirrors"]) except getopt.GetoptError, msg: print "Error:", msg return 1 for (opt, val) in opts: if opt in ("-?", "-h", "--help"): usage() return 0 elif opt in ("-v", "--verbose"): verbose += 1 elif opt in ("-q", "--quiet"): verbose = 0 elif opt == "--ignoresymlinks": ignoresymlinks = 1 elif opt == "-c": configfiles.append(val) elif opt == "--arch": arch = val specifyarch = 1 elif opt == "--archlist": archlist = val.split(",") arch = archlist[0] archlist = archlist[1:] specifyarch = 1 elif opt == "--releasever": releasever = val elif opt == "--distroverpkg": distroverpkg = val.split(",") elif opt == "-y": #assumeyes = 1 pass elif opt == "--strict": strict = 1 elif opt == "--digest": nodigest = 0 elif opt == "--nodigest": nodigest = 1 elif opt == "--payload": payload = 1 elif opt == "--nopayload": payload = 0 elif opt == "--nofileconflicts": checkfileconflicts = 0 elif opt == "--fileconflicts": checkfileconflicts = 1 elif opt == "--runorderer": runorderer = 1 elif opt == "--updaterpms": updaterpms = 1 elif opt == "--wait": wait = 1 elif opt == "--noverify": verify = 0 elif opt == "--small": small = 1 elif opt == "--explode": explode = 1 elif opt == "--diff": diff = 1 elif opt == "--extract": extract = 1 elif opt == "--excludes": excludes += " " + val elif opt == "--checksrpms": checksrpms = 1 elif opt == "--checkarch": checkarch = 1 elif opt in ("--rpmdbpath", "--dbpath"): rpmdbpath = val if rpmdbpath[-1:] != "/": rpmdbpath += "/" elif opt == "--withdb": withdb = 1 elif opt == "--cachedir": cachedir = val if cachedir[-1:] != "/": cachedir += "/" elif opt == "--checkrpmdb": checkrpmdb = 1 elif opt == "--checkoldkernel": checkoldkernel = 1 elif opt == "--numkeepkernels": numkeepkernels = int(val) elif opt == "--checkdeps": checkdeps = 1 elif opt in ("--buildroot", "--installroot", "--root"): #if val[:1] != "/": # print "buildroot should start with a /" # return 1 buildroot = os.path.abspath(val) elif opt == "--version": print sys.argv[0], "version:", __version__ return 0 elif opt == "--baseurl": baseurl = val elif opt == "--reposdir": if val not in reposdirs: reposdirs.append(val) elif opt == "--disablereposdir": reposdirs = [] elif opt == "--enablerepos": configfiles.append("/etc/yum.conf") reposdirs.extend(["/etc/yum.repos.d", "/etc/yum/repos.d"]) elif opt == "--createrepo": createrepo = 1 elif opt == "--groupfile": groupfile = val elif opt == "--mercurial": mercurial = 1 elif opt == "--pyrex": pyrex = 1 elif opt == "--testmirrors": testmirrors = 1 # Select of what we want todo here: if diff: diff = diffTwoSrpms(args[0], args[1], explode) if diff != "": print diff elif extract: db = None if withdb: db = RpmDB(buildroot, rpmdbpath) for a in args: extractRpm(a, buildroot, owner, db) elif checksrpms: checkSrpms(ignoresymlinks) elif checkarch: checkArch(args[0], ignoresymlinks) elif checkrpmdb: if readRpmdb(rpmdbpath, distroverpkg, releasever, configfiles, buildroot, arch, archlist, specifyarch, verbose, checkfileconflicts, reposdirs): return 1 elif checkoldkernel: mykernelpkgs = kernelpkgs[:] for i in kernelpkgs: mykernelpkgs.append(i + "-devel") ver = kernelversion for s in ("bigmem", "enterprise", "smp", "hugemem", "PAE", "guest", "hypervisor", "xen0", "xenU", "xen"): if ver.endswith(s): ver = ver[:-len(s)] # also remove all lower case letters at the end now? try: (v, r) = ver.split("-", 1) except ValueError: print "Failed to read version and release of the", \ "currently running kernel." (v, r) = (None, None) (packages, keyring, maxtid, pkgdata, swapendian) = \ readPackages(buildroot, rpmdbpath, verbose, 0, importanttags) kernels = [] for pkg in packages.itervalues(): if pkg["name"] in mykernelpkgs: kernels.append(pkg) kernels.sort(pkgCompare) kernels.reverse() (vr, removekern) = ([], []) for pkg in kernels: if (pkg["version"], pkg["release"]) not in vr: vr.append( (pkg["version"], pkg["release"]) ) if (len(vr) > numkeepkernels and (v, r) != (pkg["version"], pkg["release"])): removekern.append(pkg) if verbose > 2: print "You have the following kernels installed:" for pkg in kernels: print pkg.getFilename() print "The following older kernels should be removed:" for pkg in removekern: print pkg.getFilename2() elif createrepo: for a in args: if not os.path.isdir(a): print "Createrepo needs a directory name:", a break repo = RpmRepo([a], excludes, verbose) repo.createRepo(baseurl, ignoresymlinks, groupfile) elif mercurial: createMercurial(verbose) elif pyrex: Python2Pyrex() elif testmirrors: testMirrors(verbose, args) elif updaterpms: arch_hash = setMachineDistance(arch, archlist) # Read all packages in rpmdb. if verbose > 2: time1 = time.clock() if verbose > 1: print "Reading the rpmdb in %s." % rpmdbpath (packages, keyring, maxtid, pkgdata, swapendian) = \ readPackages(buildroot, rpmdbpath, verbose, 0, importanttags) # Set releasever based on all rpmdb packages. # XXX: This should be: # for pkgname in distroverpkg: # if packages.has_key(pkgname): # releasever = packages[pkgname]["version"] for pkg in packages.itervalues(): if pkg["name"] in distroverpkg: releasever = pkg["version"] break if verbose > 2: time2 = time.clock() print "Needed", time2 - time1, "seconds to read the rpmdb", \ "(%d rpm packages)." % len(packages.keys()) # If no config file specified, default to /etc/yum.conf and also # the default directories for additional yum repos. if not configfiles: configfiles.append("/etc/yum.conf") if not reposdirs: reposdirs = ["/etc/yum.repos.d", "/etc/yum/repos.d"] # Read all repositories. if verbose > 2: time1 = time.clock() repos = readRepos(releasever, configfiles, arch, buildroot, 1, 0, reposdirs, verbose, fast=0) if repos == None: return 1 if verbose > 2: time2 = time.clock() numrpms = 0 for r in repos: numrpms += len(r.pkglist.keys()) print "Needed", time2 - time1, "seconds to read the repos", \ "(%d rpm packages)." % numrpms # For timing purposes also read filelists: if verbose > 2: time1 = time.clock() for repo in repos: repo.importFilelist() if verbose > 2: time2 = time.clock() print "Needed", time2 - time1, "secs to read the repo filelists." # Sort repo packages to only keep the newest. if verbose > 2: time1 = time.clock() pkglist = [] for r in repos: pkglist.extend(r.pkglist.values()) pkglist = getPkgsNewest(pkglist, arch, arch_hash, verbose, exactarch) if verbose > 2: time2 = time.clock() print "Needed", time2 - time1, "seconds to sort the repos." # XXX: Here we should also look at Obsoletes: # Select rpms to update: if verbose > 2: time1 = time.clock() h = {} # Read all packages from rpmdb, then add all newer packages # from the repositories. for rpm in packages.itervalues(): if rpm["name"] == "gpg-pubkey": continue rarch = rpm["arch"] if not exactarch: rarch = buildarchtranslate.get(rarch, rarch) h.setdefault( (rpm["name"], rarch) , []).append(rpm) for rpm in pkglist: rarch = rpm["arch"] if not exactarch: rarch = buildarchtranslate.get(rarch, rarch) key = (rpm["name"], rarch) if h.has_key(key): h[key].append(rpm) # Now select which rpms to install/erase: installrpms = [] eraserpms = [] for r in h.itervalues(): if r[0].isInstallonly(): # XXX check if there is a newer "kernel" around continue newest = selectNewestRpm(r, arch_hash, verbose) if newest == r[0]: continue eraserpms.append(r[0]) installrpms.append(newest) # Check noarch constraints. #if None: # for rpms in h.itervalues(): # newest = selectNewestRpm(rpms, arch_hash, verbose) # if newest["arch"] == "noarch": # for r in rpms: # if r != newest: # pkgs.remove(r) # else: # for r in rpms: # if r["arch"] == "noarch": # pkgs.remove(r) #installrpms = getPkgsNewest(rtree.getPkgs(), arch, arch_hash, # verbose, 0) #checkDeps(installrpms, checkfileconflicts, runorderer) if verbose > 2: time2 = time.clock() print "Needed", time2 - time1, "seconds to check for updates." if verbose > 1: if not installrpms: print "No package updates found." for rpm in installrpms: print "Updating to %s." % rpm.getFilename() else: keepdata = 1 hdrtags = rpmtag if verify == 0 and nodigest == 1: keepdata = 0 if small: hdrtags = importanttags if configfiles and verbose > 2: time1 = time.clock() repos = readRepos(releasever, configfiles, arch, buildroot, 0, 1, reposdirs, verbose) if configfiles and verbose > 2: time2 = time.clock() print "Needed", time2 - time1, "seconds to read the repos." if repos == None: return 1 headerend = {} for r in repos: for p in r.pkglist.itervalues(): args.append(p.filename) if p["rpm:header-range:end"]: headerend[p.filename] = p["rpm:header-range:end"] time1 = time.clock() checkarchs = [] for a in args: a = Uri2Filename(a) b = [a] if not a.endswith(".rpm") and not isUrl(a) and os.path.isdir(a): b = findRpms(a, ignoresymlinks) for a in b: #print a rpm = verifyRpm(a, verify, strict, payload, nodigest, hdrtags, keepdata, headerend.get(a)) if rpm == None: continue #f = rpm["filenames"] #if f: # print rpm.getFilename() # print f if checkdeps or strict or wait: if (rpm["name"] in kernelpkgs and not rpm.issrc and rpm["arch"] not in checkarchs): checkarchs.append(rpm["arch"]) repo.append(rpm) # python-only del rpm # python-only-end if verbose > 2: time2 = time.clock() print "Needed", time2 - time1, "seconds to read", len(repo), \ "rpm packages." if strict: for rpm in repo: rpm.filenames = rpm.getFilenames() checkDirs(repo) checkSymlinks(repo) checkScripts(repo) if strict or checkdeps: if specifyarch: checkarchs = [arch,] if checkarchs: for arch in checkarchs: time1 = time.clock() print "Check as if kernel has the", \ "architecture \"%s\" now:" % arch arch_hash = setMachineDistance(arch, archlist) installrpms = getPkgsNewest(repo, arch, arch_hash, verbose, 0, 1) if strict: checkProvides(installrpms) checkDeps(installrpms, checkfileconflicts, runorderer, verbose) time2 = time.clock() print "Needed", time2 - time1, "sec to check this tree." else: print "No arch defined to check, are kernels missing?" if wait: print "Ready." time.sleep(30) return 0 | e88bd7c78ae123c185f17919515d68d29510e836 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1143/e88bd7c78ae123c185f17919515d68d29510e836/oldpyrpm.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
1930,
336,
3838,
2552,
3472,
481,
309,
562,
12,
9499,
18,
19485,
13,
1648,
404,
30,
4084,
1435,
327,
374,
261,
67,
16,
5199,
16,
5536,
1589,
16,
389,
16,
6637,
13,
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,
2774,
13332,
1930,
336,
3838,
2552,
3472,
481,
309,
562,
12,
9499,
18,
19485,
13,
1648,
404,
30,
4084,
1435,
327,
374,
261,
67,
16,
5199,
16,
5536,
1589,
16,
389,
16,
6637,
13,
273,
... | |
if type(parameters) in StringTypes: | if type( parameters ) in StringTypes: | def getTransformationParameters(self,transName,parameters,connection=False): """ Get the requested parameters for a supplied transformation """ if type(parameters) in StringTypes: parameters = [parameters] extraParams = False for param in parameters: if not param in self.TRANSPARAMS: extraParams = True res = self.getTransformation(transName,extraParams=extraParams,connection=connection) if not res['OK']: return res transParams = res['Value'] paramDict = {} for reqParam in parameters: if not reqParam in transParams.keys(): return S_ERROR("Parameter %s not defined for transformation" % reqParam) paramDict[reqParam] = transParams[reqParam] if len(paramDict) == 1: return S_OK(paramDict[reqParam]) return S_OK(paramDict) | 9ad007ea503b29694fc081c1646b7c5ecd07b1f2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/9ad007ea503b29694fc081c1646b7c5ecd07b1f2/TransformationDB.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
15292,
2402,
12,
2890,
16,
2338,
461,
16,
3977,
16,
4071,
33,
8381,
4672,
3536,
968,
326,
3764,
1472,
364,
279,
4580,
8620,
3536,
309,
618,
12,
1472,
262,
316,
514,
2016,
30,
1472... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
15292,
2402,
12,
2890,
16,
2338,
461,
16,
3977,
16,
4071,
33,
8381,
4672,
3536,
968,
326,
3764,
1472,
364,
279,
4580,
8620,
3536,
309,
618,
12,
1472,
262,
316,
514,
2016,
30,
1472... |
if makeBaseUnit(self, unit): | if self.makeBaseUnit(unit): | def makeBaseUnits(self): changed = False for unit in self.units.keys(): if makeBaseUnit(self, unit): changed = True break if changed: self.makeBaseUnits() return changed | 72d93bcb552dc6baa0c752f05e531f26427b9e6c /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9145/72d93bcb552dc6baa0c752f05e531f26427b9e6c/Number.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1221,
2171,
7537,
12,
2890,
4672,
3550,
273,
1083,
364,
2836,
316,
365,
18,
7705,
18,
2452,
13332,
309,
365,
18,
6540,
2171,
2802,
12,
4873,
4672,
3550,
273,
1053,
898,
309,
3550,
30,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1221,
2171,
7537,
12,
2890,
4672,
3550,
273,
1083,
364,
2836,
316,
365,
18,
7705,
18,
2452,
13332,
309,
365,
18,
6540,
2171,
2802,
12,
4873,
4672,
3550,
273,
1053,
898,
309,
3550,
30,
... |
security.declarePublic('getEditAccessor') | security.declarePrivate('getEditAccessor') | def getAccessor(self, instance): """Return the accessor method for getting data out of this field""" if self.accessor: return getattr(instance, self.accessor, None) return None | 589c8a00edeed82af11646c142742440f2908f59 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12165/589c8a00edeed82af11646c142742440f2908f59/Field.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
8235,
12,
2890,
16,
791,
4672,
3536,
990,
326,
9789,
707,
364,
8742,
501,
596,
434,
333,
652,
8395,
309,
365,
18,
3860,
280,
30,
327,
3869,
12,
1336,
16,
365,
18,
3860,
280,
16,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
8235,
12,
2890,
16,
791,
4672,
3536,
990,
326,
9789,
707,
364,
8742,
501,
596,
434,
333,
652,
8395,
309,
365,
18,
3860,
280,
30,
327,
3869,
12,
1336,
16,
365,
18,
3860,
280,
16,... |
person_id = person['person_id'] key_id = self['key_id'] assert person_id in [self['person_id']] | rows = self.api.db.selectall("SELECT key_id FROM keys WHERE key = %(key)s", self) key_ids = [row['key_id'] for row in rows] assert key_ids assert self['key_id'] in key_ids | def set_primary_key(self, person, commit = True): | 6a15f46cfce003d21ee8ba0bee213df66250e60e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7598/6a15f46cfce003d21ee8ba0bee213df66250e60e/Keys.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
67,
8258,
67,
856,
12,
2890,
16,
6175,
16,
3294,
273,
1053,
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,
... | [
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,
444,
67,
8258,
67,
856,
12,
2890,
16,
6175,
16,
3294,
273,
1053,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
if self.htmlfile.referrer is not None: name = self.htmlfile_map[self.htmlfile.referrer.path] add_item(href, fragment, text, target) | add_item(href, fragment, text, referrer) | def elem_to_link(elem, href, counter): text = (u''.join(elem.xpath('string()'))).strip() if not text: return None, None, None t = elem.xpath('descendant-or-self::a[@href]') if t: _href = 'content/' + t[0].get('href', '') parts = _href.split('#') _href = parts[0] frag = None if len(parts) == 1 else parts[-1] else: _href = href id = elem.get('id', 'calibre_chapter_%d'%counter) elem.set('id', id) frag = id return text, _href, frag | 731b76779ba537b235d76b1af732665956c4d2f2 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9125/731b76779ba537b235d76b1af732665956c4d2f2/html.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3659,
67,
869,
67,
1232,
12,
10037,
16,
3897,
16,
3895,
4672,
977,
273,
261,
89,
6309,
18,
5701,
12,
10037,
18,
18644,
2668,
1080,
11866,
3719,
2934,
6406,
1435,
309,
486,
977,
30,
327... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3659,
67,
869,
67,
1232,
12,
10037,
16,
3897,
16,
3895,
4672,
977,
273,
261,
89,
6309,
18,
5701,
12,
10037,
18,
18644,
2668,
1080,
11866,
3719,
2934,
6406,
1435,
309,
486,
977,
30,
327... |
result = getTextOfPage(root, 'localimporttest.mod1.C.html') | result = getTextOfPage(root, 'basic.mod.C.html') | def test_edit(): system = processPackage('localimporttest') root = server.EditingPyDoctorResource(system) ob = system.allobjects['localimporttest.mod1.C'] docstring = root.currentDocstringForObject(ob) assert docstring == ob.docstring newDocstring = '"""This *is* a docstring"""' performEdit(root, ob, newDocstring) docstring = root.currentDocstringForObject(ob) assert docstring == eval(newDocstring) assert ob.docstring != docstring result = getTextOfPage(root, 'localimporttest.mod1.C.html') assert eval(newDocstring) in result result = getTextOfPage(root, 'localimporttest.mod1.html') assert eval(newDocstring) in result | d3bf21f55d5f937ae38dd7eb7acb68f0d293f3e8 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5471/d3bf21f55d5f937ae38dd7eb7acb68f0d293f3e8/test_server.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
4619,
13332,
2619,
273,
1207,
2261,
2668,
3729,
5666,
3813,
6134,
1365,
273,
1438,
18,
28029,
9413,
3244,
30206,
1420,
12,
4299,
13,
225,
3768,
273,
2619,
18,
287,
383,
489,
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,
1842,
67,
4619,
13332,
2619,
273,
1207,
2261,
2668,
3729,
5666,
3813,
6134,
1365,
273,
1438,
18,
28029,
9413,
3244,
30206,
1420,
12,
4299,
13,
225,
3768,
273,
2619,
18,
287,
383,
489,
87... |
del self.references[len(self.references)-1] | del self.references[len(self.references)-1] | def doReplacements(self, new_text): """ Returns the text which is generated by applying all replacements to the given text. """ | 5ce396273c43ed3fd2b8edb1839c08165aac5b9f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4404/5ce396273c43ed3fd2b8edb1839c08165aac5b9f/standardize_notes.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
28440,
12,
2890,
16,
394,
67,
955,
4672,
3536,
2860,
326,
977,
1492,
353,
4374,
635,
13650,
777,
11413,
358,
326,
864,
977,
18,
3536,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
28440,
12,
2890,
16,
394,
67,
955,
4672,
3536,
2860,
326,
977,
1492,
353,
4374,
635,
13650,
777,
11413,
358,
326,
864,
977,
18,
3536,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
c = Codecker() c.setDefaultFormat(PT_CN) ae(c.getDefaultFormat(), PT_CN) | ar = self.assertRaises | def testNullCodec(self): ae = self.assertEquals c = Codecker() c.setDefaultFormat(PT_CN) ae(c.getDefaultFormat(), PT_CN) n = NullCodec() ae = self.assertEquals ae(n.encode('frobozulate'), None) ae(n.decode('frobozulate'), None) p = RTPPacket(PT_CN, '\x00', ts=None) ae(c.decode(p), None) ae(c.encode(None), None) ae(c.encode('\x00'), None) | e301f0ccc0d33a0778f764e171ee0a89e3a67adf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1265/e301f0ccc0d33a0778f764e171ee0a89e3a67adf/test_codecs.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
2041,
11008,
12,
2890,
4672,
14221,
273,
365,
18,
11231,
8867,
419,
273,
365,
18,
11231,
12649,
6141,
290,
273,
4112,
11008,
1435,
14221,
273,
365,
18,
11231,
8867,
14221,
12,
82,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2041,
11008,
12,
2890,
4672,
14221,
273,
365,
18,
11231,
8867,
419,
273,
365,
18,
11231,
12649,
6141,
290,
273,
4112,
11008,
1435,
14221,
273,
365,
18,
11231,
8867,
14221,
12,
82,
... |
import os | def initialize(context): import os context.registerClass( XWFVirtualMailingListArchive, permission='Add XWF Virtual Mailing List Archive', constructors=(manage_addXWFVirtualMailingListArchiveForm, manage_addXWFVirtualMailingListArchive) ) | a7a0210bc2dcadcfd49005a5cbd9fda863643c8d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6274/a7a0210bc2dcadcfd49005a5cbd9fda863643c8d/XWFVirtualMailingListArchive.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4046,
12,
2472,
4672,
819,
18,
4861,
797,
12,
1139,
59,
42,
6466,
6759,
310,
682,
7465,
16,
4132,
2218,
986,
1139,
59,
42,
7269,
11542,
310,
987,
13124,
2187,
19874,
28657,
12633,
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,
4046,
12,
2472,
4672,
819,
18,
4861,
797,
12,
1139,
59,
42,
6466,
6759,
310,
682,
7465,
16,
4132,
2218,
986,
1139,
59,
42,
7269,
11542,
310,
987,
13124,
2187,
19874,
28657,
12633,
67,
... | |
if 'ID' in name and centers and _isIntegers(centers) and unit is None: | if 'ID' in name and centers is not None and _isIntegers(centers) and unit is None: | def axis( name, centers = None, unit = None, boundaries = None): """ create an axis axis( name, centers, unit = None ) """ if centers is not None and len(centers) < 1: raise ValueError , "Invalid axis %s" % (centers, ) if 'ID' in name and centers and _isIntegers(centers) and unit is None: return IDaxis( name, centers ) if centers is None: return paxis( name, unit, boundaries = boundaries ) return paxis( name, unit, centers = centers ) | a11c7757438a889ac9be8e7354dbc460824e9bd6 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6231/a11c7757438a889ac9be8e7354dbc460824e9bd6/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2654,
12,
508,
16,
17723,
273,
599,
16,
2836,
273,
599,
16,
15054,
273,
599,
4672,
3536,
752,
392,
2654,
225,
2654,
12,
508,
16,
17723,
16,
2836,
273,
599,
262,
3536,
309,
17723,
353,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2654,
12,
508,
16,
17723,
273,
599,
16,
2836,
273,
599,
16,
15054,
273,
599,
4672,
3536,
752,
392,
2654,
225,
2654,
12,
508,
16,
17723,
16,
2836,
273,
599,
262,
3536,
309,
17723,
353,
... |
f2 = self.tar.extractfile("/S-SPARSE-WITH-NULLS") | f2 = self.tar.extractfile("S-SPARSE-WITH-NULLS") | def test_sparse(self): """Test sparse member extraction. """ if self.sep != "|": f1 = self.tar.extractfile("S-SPARSE") f2 = self.tar.extractfile("/S-SPARSE-WITH-NULLS") self.assert_(f1.read() == f2.read(), "_FileObject failed on sparse file member") | f5c7f8e836a4001fab1d192135cbbf25d1421a34 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/f5c7f8e836a4001fab1d192135cbbf25d1421a34/test_tarfile.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
17472,
12,
2890,
4672,
3536,
4709,
9387,
3140,
18752,
18,
3536,
309,
365,
18,
10814,
480,
11747,
6877,
284,
21,
273,
365,
18,
11718,
18,
8004,
768,
2932,
55,
17,
55,
21045,
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,
1842,
67,
17472,
12,
2890,
4672,
3536,
4709,
9387,
3140,
18752,
18,
3536,
309,
365,
18,
10814,
480,
11747,
6877,
284,
21,
273,
365,
18,
11718,
18,
8004,
768,
2932,
55,
17,
55,
21045,
7... |
r = Renderable(Sprite(10, 10), Resources.load_shader('data/shaders/unlit.shader'), [Resources.load_texture('data/images/aim.png')], Pass.flares) | r = Renderable(Sprite(10, 10), Resources.load_shader('data/shaders/unlit.shader'), [Resources.load_texture('data/images/aim.png')], Pass.overlay) | def cross_hairs(ship): r = Renderable(Sprite(10, 10), Resources.load_shader('data/shaders/unlit.shader'), [Resources.load_texture('data/images/aim.png')], Pass.flares) n = BillboardNode(ship.node) n.renderables.append(r) n.model.translate(0, 0, 50) return n | 7e9441ce0d25dba36d2f7d801d494676fd25343a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4896/7e9441ce0d25dba36d2f7d801d494676fd25343a/factories.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6828,
67,
76,
1826,
87,
12,
3261,
4672,
436,
273,
6987,
429,
12,
3389,
796,
12,
2163,
16,
1728,
3631,
8128,
18,
945,
67,
674,
1143,
2668,
892,
19,
674,
361,
414,
19,
318,
24235,
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,
6828,
67,
76,
1826,
87,
12,
3261,
4672,
436,
273,
6987,
429,
12,
3389,
796,
12,
2163,
16,
1728,
3631,
8128,
18,
945,
67,
674,
1143,
2668,
892,
19,
674,
361,
414,
19,
318,
24235,
18,
... |
scriptLines.append(ln.strip()) | scriptLines.append(ln) | def runOneTest(FILENAME, SUBST, OUTPUT, TESTNAME, CLANG, CLANGCC, useValgrind=False, useDGCompat=False, useScript=None, output=sys.stdout): OUTPUT = os.path.abspath(OUTPUT) if useValgrind: VG_OUTPUT = '%s.vg'%(OUTPUT,) os.system('rm -f %s.*'%(VG_OUTPUT)) VALGRIND = 'valgrind -q --tool=memcheck --leak-check=full --trace-children=yes --log-file=%s.%%p'%(VG_OUTPUT) CLANG = '%s %s'%(VALGRIND, CLANG) CLANGCC = '%s %s'%(VALGRIND, CLANGCC) # Create the output directory if it does not already exist. mkdir_p(os.path.dirname(OUTPUT)) # FIXME #ulimit -t 40 # FIXME: Load script once # FIXME: Support "short" script syntax if useScript: scriptFile = useScript else: # See if we have a per-dir test script. dirScriptFile = os.path.join(os.path.dirname(FILENAME), 'test.script') if os.path.exists(dirScriptFile): scriptFile = dirScriptFile else: scriptFile = FILENAME # Verify the script contains a run line. for ln in open(scriptFile): if 'RUN:' in ln: break else: print >>output, "******************** TEST '%s' HAS NO RUN LINE! ********************"%(TESTNAME,) output.flush() return TestStatus.NoRunLine FILENAME = os.path.abspath(FILENAME) SCRIPT = OUTPUT + '.script' if kSystemName == 'Windows': SCRIPT += '.bat' TEMPOUTPUT = OUTPUT + '.tmp' substitutions = [('%s',SUBST), ('%S',os.path.dirname(SUBST)), ('%llvmgcc','llvm-gcc -emit-llvm -w'), ('%llvmgxx','llvm-g++ -emit-llvm -w'), ('%prcontext','prcontext.tcl'), ('%t',TEMPOUTPUT), (' clang ', ' ' + CLANG + ' '), (' clang-cc ', ' ' + CLANGCC + ' ')] # Collect the test lines from the script. scriptLines = [] xfailLines = [] for ln in open(scriptFile): if 'RUN:' in ln: # Isolate the command to run. index = ln.index('RUN:') ln = ln[index+4:] # Strip whitespace and append. scriptLines.append(ln.strip()) elif 'XFAIL' in ln: xfailLines.append(ln) # FIXME: Support something like END, in case we need to process large # files. # Validate interior lines for '&&', a lovely historical artifact. for i in range(len(scriptLines) - 1): ln = scriptLines[i] if not ln.endswith('&&'): print >>output, "MISSING \'&&\': %s" % ln print >>output, "FOLLOWED BY : %s" % scriptLines[i + 1] return TestStatus.Fail # Strip off '&&' scriptLines[i] = ln[:-2] # Apply substitutions to the script. def processLine(ln): # Apply substitutions for a,b in substitutions: ln = ln.replace(a,b) if useDGCompat: ln = re.sub(r'\{(.*)\}', r'"\1"', ln) return ln scriptLines = map(processLine, scriptLines) if xfailLines: print >>output, "XFAILED '%s':"%(TESTNAME,) output.writelines(xfailLines) # Write script file f = open(SCRIPT,'w') f.write(' &&\n'.join(scriptLines)) f.close() outputFile = open(OUTPUT,'w') p = None try: if kSystemName == 'Windows': command = ['cmd','/c', SCRIPT] else: command = ['/bin/sh', SCRIPT] p = subprocess.Popen(command, cwd=os.path.dirname(FILENAME), stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, env=kChildEnv) out,err = p.communicate() outputFile.write(out) outputFile.write(err) SCRIPT_STATUS = p.wait() # Detect Ctrl-C in subprocess. if SCRIPT_STATUS == -signal.SIGINT: raise KeyboardInterrupt except KeyboardInterrupt: raise outputFile.close() if xfailLines: SCRIPT_STATUS = not SCRIPT_STATUS if useValgrind: if kSystemName == 'Windows': raise NotImplementedError,'Cannot run valgrind on windows' else: VG_OUTPUT = capture(['/bin/sh','-c','cat %s.*'%(VG_OUTPUT)]) VG_STATUS = len(VG_OUTPUT) else: VG_STATUS = 0 if SCRIPT_STATUS or VG_STATUS: print >>output, "******************** TEST '%s' FAILED! ********************"%(TESTNAME,) print >>output, "Command: " output.writelines(scriptLines) if not SCRIPT_STATUS: print >>output, "Output:" else: print >>output, "Incorrect Output:" cat(OUTPUT, output) if VG_STATUS: print >>output, "Valgrind Output:" print >>output, VG_OUTPUT print >>output, "******************** TEST '%s' FAILED! ********************"%(TESTNAME,) output.flush() if xfailLines: return TestStatus.XPass else: return TestStatus.Fail if xfailLines: return TestStatus.XFail else: return TestStatus.Pass | e52cdfb3b95c44d3fc43138351ed076c2dc60d52 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11986/e52cdfb3b95c44d3fc43138351ed076c2dc60d52/TestRunner.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
3335,
4709,
12,
16080,
16,
10025,
882,
16,
11550,
16,
22130,
1985,
16,
385,
10571,
16,
385,
10571,
6743,
16,
999,
3053,
3197,
728,
33,
8381,
16,
999,
40,
43,
13322,
33,
8381,
16,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
3335,
4709,
12,
16080,
16,
10025,
882,
16,
11550,
16,
22130,
1985,
16,
385,
10571,
16,
385,
10571,
6743,
16,
999,
3053,
3197,
728,
33,
8381,
16,
999,
40,
43,
13322,
33,
8381,
16,... |
source_size = os.stat(self.source).st_size target_size = self.backend.get_device_size(self.target) * 512 if target_size < source_size: | if self.device_size < self.total_size: | def validatePage(_self): if self.reverse: missing_device_title = _("Missing source device") missing_device_msg = _("Please select a source device") missing_file_title = _("Missing target image") missing_file_msg = _("Please specify a target image") else: missing_device_title = _("Missing target device") missing_device_msg = _("Please select a target device") missing_file_title = _("Missing source image") missing_file_msg = _("Please specify a source image or download one by " "clicking the 'Download it' button") | d38f0df8a76f96e4ecb3e1cb9c1d6f11ea43a38c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1208/d38f0df8a76f96e4ecb3e1cb9c1d6f11ea43a38c/ufo_dd.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1954,
1964,
24899,
2890,
4672,
309,
365,
18,
9845,
30,
3315,
67,
5964,
67,
2649,
273,
389,
2932,
4841,
1084,
2346,
7923,
3315,
67,
5964,
67,
3576,
273,
389,
2932,
8496,
2027,
279,
1084,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1954,
1964,
24899,
2890,
4672,
309,
365,
18,
9845,
30,
3315,
67,
5964,
67,
2649,
273,
389,
2932,
4841,
1084,
2346,
7923,
3315,
67,
5964,
67,
3576,
273,
389,
2932,
8496,
2027,
279,
1084,
... |
categories = self.browse(cursor, user, ids, context=context) res = [] for category in categories: if category.parent: name = category.parent.name+' / '+ category.name | res = {} def _name(category): if category.id in res: return res[category.id] elif category.parent: return _name(category.parent) + ' / ' + category.name | def name_get(self, cursor, user, ids, context=None): if not ids: return [] categories = self.browse(cursor, user, ids, context=context) res = [] for category in categories: if category.parent: name = category.parent.name+' / '+ category.name else: name = category.name res.append((category.id, name)) return res | 573278b55ac53f382ecb70a3c65a72d48664fb89 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9269/573278b55ac53f382ecb70a3c65a72d48664fb89/category.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
508,
67,
588,
12,
2890,
16,
3347,
16,
729,
16,
3258,
16,
819,
33,
7036,
4672,
309,
486,
3258,
30,
327,
5378,
400,
273,
2618,
1652,
389,
529,
12,
4743,
4672,
309,
3150,
18,
350,
316,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
508,
67,
588,
12,
2890,
16,
3347,
16,
729,
16,
3258,
16,
819,
33,
7036,
4672,
309,
486,
3258,
30,
327,
5378,
400,
273,
2618,
1652,
389,
529,
12,
4743,
4672,
309,
3150,
18,
350,
316,
... |
print "Trying to disconnect." | def disconnect(self, conf=None): """ Disconnect from the server, if connected. """ print "Trying to disconnect." if self._sock is None: return try: self._sock.close() except socket.error: pass self._sock = None self._buffer.clear() | 608ea866c93b48cfb63ce30c03d8223d8ea4aa43 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2733/608ea866c93b48cfb63ce30c03d8223d8ea4aa43/connection.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9479,
12,
2890,
16,
2195,
33,
7036,
4672,
3536,
23957,
628,
326,
1438,
16,
309,
5840,
18,
3536,
309,
365,
6315,
15031,
353,
599,
30,
327,
775,
30,
365,
6315,
15031,
18,
4412,
1435,
133... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
9479,
12,
2890,
16,
2195,
33,
7036,
4672,
3536,
23957,
628,
326,
1438,
16,
309,
5840,
18,
3536,
309,
365,
6315,
15031,
353,
599,
30,
327,
775,
30,
365,
6315,
15031,
18,
4412,
1435,
133... | |
self.log.info( 'Reference %s for TaskQueueID %s' % ( glite_id, taskQueueID ) ) | self.log.info( 'Reference %s for TaskQueue %s' % ( glite_id, taskQueueID ) ) | def parseJobSubmitStdout(self, proxy, cmd, taskQueueID): """ Parse Job Submit stdout to return pilot reference """ start = time.time() self.log.verbose( 'Executing Job Submit for TaskQueueID:', taskQueueID ) | 4fc45f848c73ccd70e55d2692551954ac266f79d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12864/4fc45f848c73ccd70e55d2692551954ac266f79d/TaskQueueDirector.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
2278,
11620,
27334,
12,
2890,
16,
2889,
16,
1797,
16,
1562,
3183,
734,
4672,
3536,
2884,
3956,
17320,
3909,
358,
327,
293,
22797,
2114,
3536,
787,
273,
813,
18,
957,
1435,
365,
18,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
2278,
11620,
27334,
12,
2890,
16,
2889,
16,
1797,
16,
1562,
3183,
734,
4672,
3536,
2884,
3956,
17320,
3909,
358,
327,
293,
22797,
2114,
3536,
787,
273,
813,
18,
957,
1435,
365,
18,... |
shutil.copy(old_filename, filename) | logger.info('copying cache from %s to %s' % (old_filename, filename)) try: shutil.copy(old_filename, filename) except: for suffix in ['.bak', '.dat', '.dir']: shutil.copy(old_filename + suffix, filename + suffix) | def _open_shelf(self, protocol=None, writeback=False, pid=None): """ """ SESSION_PREFIX = 'setpkg_session_' if 'SETPKG_SESSION' in os.environ: filename = os.environ['SETPKG_SESSION'] # see if our pid differs from the existing if pid: old_pid = filename.rsplit('_')[-1] if pid != old_pid: # make a unique copy for us old_filename = filename filename = os.path.join(tempfile.gettempdir(), (SESSION_PREFIX + pid)) #logger.info('copying new cache: %s' % filename) shutil.copy(old_filename, filename) | aeeb2244b45b5b316a0a8409efd395e7ca2025d6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14112/aeeb2244b45b5b316a0a8409efd395e7ca2025d6/setpkg.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3190,
67,
674,
19079,
12,
2890,
16,
1771,
33,
7036,
16,
1045,
823,
33,
8381,
16,
4231,
33,
7036,
4672,
3536,
3536,
10307,
67,
6307,
273,
296,
542,
10657,
67,
3184,
4623,
309,
296,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3190,
67,
674,
19079,
12,
2890,
16,
1771,
33,
7036,
16,
1045,
823,
33,
8381,
16,
4231,
33,
7036,
4672,
3536,
3536,
10307,
67,
6307,
273,
296,
542,
10657,
67,
3184,
4623,
309,
296,... |
params.update(qual_req.get_as_params()) | def register_hit_type(self, title, description, reward, duration, keywords=None, approval_delay=None, qual_req=None): """ Register a new HIT Type \ttitle, description are strings \treward is a Price object \tduration can be a timedelta, or an object castable to an int """ params = dict( Title=title, Description=description, AssignmentDurationInSeconds= self.duration_as_seconds(duration), ) params.update(MTurkConnection.get_price_as_price(reward).get_as_params('Reward')) params.update(qual_req.get_as_params()) | b1167b16b50a9615814503655db0db6e6af4b8e1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1098/b1167b16b50a9615814503655db0db6e6af4b8e1/connection.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1744,
67,
15989,
67,
723,
12,
2890,
16,
2077,
16,
2477,
16,
19890,
16,
3734,
16,
7093,
33,
7036,
16,
23556,
67,
10790,
33,
7036,
16,
4544,
67,
3658,
33,
7036,
4672,
3536,
5433,
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,
1744,
67,
15989,
67,
723,
12,
2890,
16,
2077,
16,
2477,
16,
19890,
16,
3734,
16,
7093,
33,
7036,
16,
23556,
67,
10790,
33,
7036,
16,
4544,
67,
3658,
33,
7036,
4672,
3536,
5433,
279,
... | |
file.Write(" cmd.header.size * 4);\n") | file.Write(" cmd.header.size * 4u);\n") file.Write(" EXPECT_EQ(static_cast<char*>(next_cmd),\n") file.Write(" reinterpret_cast<char*>(&cmd) + sizeof(cmd));\n"); | def WriteImmediateFormatTest(self, func, file): """Overrriden from TypeHandler.""" file.Write("TEST(GLES2FormatTest, %s) {\n" % func.name) file.Write(" int8 buf[256] = { 0, };\n") file.Write(" %s& cmd = *static_cast<%s*>(static_cast<void*>(&buf));\n" % (func.name, func.name)) file.Write(" static const char* const test_str = \"test string\";\n") file.Write(" void* next_cmd = cmd.Set(\n") file.Write(" &cmd") all_but_last_arg = func.GetCmdArgs()[:-1] value = 11 for arg in all_but_last_arg: file.Write(",\n static_cast<%s>(%d)" % (arg.type, value)) value += 1 file.Write(",\n test_str);\n") value = 11 file.Write(" EXPECT_EQ(%s::kCmdId, cmd.header.command);\n" % func.name) file.Write(" EXPECT_EQ(sizeof(cmd) + // NOLINT\n") file.Write(" RoundSizeToMultipleOfEntries(strlen(test_str)),\n") file.Write(" cmd.header.size * 4);\n") for arg in all_but_last_arg: file.Write(" EXPECT_EQ(static_cast<%s>(%d), cmd.%s);\n" % (arg.type, value, arg.name)) value += 1 file.Write(" // TODO(gman): check that string got copied.\n") file.Write("}\n") file.Write("\n") | d294ef3a7f91afdc1e5f9f570da7b8ef4b5bd8b7 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9392/d294ef3a7f91afdc1e5f9f570da7b8ef4b5bd8b7/build_gles2_cmd_buffer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2598,
22651,
1630,
4709,
12,
2890,
16,
1326,
16,
585,
4672,
3536,
22042,
1691,
275,
628,
1412,
1503,
12123,
585,
18,
3067,
2932,
16961,
12,
43,
11386,
22,
1630,
4709,
16,
738,
87,
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,
2598,
22651,
1630,
4709,
12,
2890,
16,
1326,
16,
585,
4672,
3536,
22042,
1691,
275,
628,
1412,
1503,
12123,
585,
18,
3067,
2932,
16961,
12,
43,
11386,
22,
1630,
4709,
16,
738,
87,
13,
... |
attacker.message(self.getMessage('forgive_many', { 'vname' : client.exactName, 'attackers' : string.join(forgave, ', ') })) | attacker.message(self.getMessage('forgive_many', { 'vname' : v.exactName, 'attackers' : string.join(forgave, ', ') })) | def cmd_forgiveall(self, data, client, cmd=None): """\ - forgive all attackers' tk points """ v = self.getClientTkInfo(client) if len(v.attackers) > 0: forgave = [] for cid,points in v.attackers.items(): if v.isGrudged(cid): continue | b0b452aac1ec4a190327e23b482879e82244de73 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12909/b0b452aac1ec4a190327e23b482879e82244de73/tk.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1797,
67,
1884,
75,
688,
454,
12,
2890,
16,
501,
16,
1004,
16,
1797,
33,
7036,
4672,
3536,
64,
300,
364,
75,
688,
777,
13843,
414,
11,
13030,
3143,
3536,
331,
273,
365,
18,
588,
1227... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1797,
67,
1884,
75,
688,
454,
12,
2890,
16,
501,
16,
1004,
16,
1797,
33,
7036,
4672,
3536,
64,
300,
364,
75,
688,
777,
13843,
414,
11,
13030,
3143,
3536,
331,
273,
365,
18,
588,
1227... |
def shouldBreak(self,iff=True): | def shouldBreak(self,iff=True, test=None): | def shouldBreak(self,iff=True): #check easy early out if self.disabled: return False if not self.iff or not iff: return False | 3541d8d2ba2ad7bc9c6e220d903f141fed6f302d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7242/3541d8d2ba2ad7bc9c6e220d903f141fed6f302d/PythonUtil.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1410,
7634,
12,
2890,
16,
3048,
33,
5510,
16,
1842,
33,
7036,
4672,
468,
1893,
12779,
11646,
596,
309,
365,
18,
9278,
30,
327,
1083,
309,
486,
365,
18,
3048,
578,
486,
21437,
30,
327,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1410,
7634,
12,
2890,
16,
3048,
33,
5510,
16,
1842,
33,
7036,
4672,
468,
1893,
12779,
11646,
596,
309,
365,
18,
9278,
30,
327,
1083,
309,
486,
365,
18,
3048,
578,
486,
21437,
30,
327,
... |
return "InstanceMethod(%r, %r, \n\t%s)" % (self.name, self.klass, prettify(self.instance)) | return "InstanceMethod(%r, %r, \n\0%s)" % (self.name, self.klass, prettify(self.instance)) | def getSource(self): return "InstanceMethod(%r, %r, \n\t%s)" % (self.name, self.klass, prettify(self.instance)) | 8fe5bd8521c56292cbda81a5e16ab51d100d5840 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/8fe5bd8521c56292cbda81a5e16ab51d100d5840/aot.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7889,
12,
2890,
4672,
327,
315,
1442,
1305,
9275,
86,
16,
738,
86,
16,
521,
82,
64,
88,
9,
87,
2225,
738,
261,
2890,
18,
529,
16,
365,
18,
22626,
16,
675,
748,
1164,
12,
2890,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7889,
12,
2890,
4672,
327,
315,
1442,
1305,
9275,
86,
16,
738,
86,
16,
521,
82,
64,
88,
9,
87,
2225,
738,
261,
2890,
18,
529,
16,
365,
18,
22626,
16,
675,
748,
1164,
12,
2890,
18,
... |
val = parse(str, errors, warnings) | val = parse(str, errors) warnings = [e for e in errors if not e.is_fatal()] errors = [e for e in errors if e.is_fatal()] | def pparse(str, show_warnings=1, show_errors=1, stream=sys.stderr): """ Pretty-parse the string. This parses the string, and catches any warnings or errors produced. Any warnings and errors are displayed, and the resulting DOM parse structure is returned. @param str: The string to parse. @type str: C{string} @param show_warnings: Whether or not to display warnings generated by parsing C{str}. @type show_warnings: C{boolean} @param show_errors: Whether or not to display errors generated by parsing C{str}. @type show_errors: C{boolean} @param stream: The stream that warnings and errors should be written to. @type stream: C{stream} @return: a DOM document encoding the contents of C{str}. @rtype: L{xml.dom.minidom.Document} @raise SyntaxError: If any fatal errors were encountered. """ errors = [] warnings = [] confused = 0 try: val = parse(str, errors, warnings) except: confused = 1 if not show_warnings: warnings = [] warnings.sort() errors.sort() if warnings: print >>stream, '='*SCRWIDTH print >>stream, "WARNINGS" print >>stream, '-'*SCRWIDTH for warning in warnings: print >>stream, warning.as_warning() print >>stream, '='*SCRWIDTH if errors and show_errors: if not warnings: print >>stream, '='*SCRWIDTH print >>stream, "ERRORS" print >>stream, '-'*SCRWIDTH for error in errors: print >>stream, error print >>stream, '='*SCRWIDTH if confused: raise elif errors: raise SyntaxError('Encountered Errors') else: return val | 7bf7c136593a0f12e906094a55f7b8f591c5abaf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/7bf7c136593a0f12e906094a55f7b8f591c5abaf/epytext.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
293,
2670,
12,
701,
16,
2405,
67,
12103,
33,
21,
16,
2405,
67,
4324,
33,
21,
16,
1407,
33,
9499,
18,
11241,
4672,
3536,
22328,
17,
2670,
326,
533,
18,
225,
1220,
8940,
326,
533,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
293,
2670,
12,
701,
16,
2405,
67,
12103,
33,
21,
16,
2405,
67,
4324,
33,
21,
16,
1407,
33,
9499,
18,
11241,
4672,
3536,
22328,
17,
2670,
326,
533,
18,
225,
1220,
8940,
326,
533,
16,
... |
res = self.removeStorageDirectory(storageDirectory,storageElement,recursive=True,singleDirectory=True) if not res['OK']: gLogger.error("Failed to remove storage directory",res['Message']) return res gLogger.info("Successfully removed %d files from %s at %s" % (res['Value']['FilesRemoved'],directory,storageElement)) | res = self.removeStorageDirectory( storageDirectory, storageElement, recursive=True, singleDirectory=True ) if not res['OK']: gLogger.error( "Failed to remove storage directory", res['Message'] ) return res gLogger.info( "Successfully removed %d files from %s at %s" % ( res['Value']['FilesRemoved'], directory, storageElement ) ) | def __removeStorageDirectory(self,directory,storageElement): gLogger.info('Removing the contents of %s at %s' % (directory,storageElement)) res = self.getPfnForLfn([directory],storageElement) if not res['OK']: gLogger.error("Failed to get PFN for directory",res['Message']) return res for directory, error in res['Value']['Failed'].items(): gLogger.error('Failed to obtain directory PFN from LFN','%s %s' % (directory,error)) if res['Value']['Failed']: return S_ERROR('Failed to obtain directory PFN from LFNs') storageDirectory = res['Value']['Successful'].values()[0] res = self.getStorageFileExists(storageDirectory,storageElement,singleFile=True) if not res['OK']: gLogger.error("Failed to obtain existance of directory",res['Message']) return res exists = res['Value'] if not exists: gLogger.info("The directory %s does not exist at %s " % (directory,storageElement)) return S_OK() res = self.removeStorageDirectory(storageDirectory,storageElement,recursive=True,singleDirectory=True) if not res['OK']: gLogger.error("Failed to remove storage directory",res['Message']) return res gLogger.info("Successfully removed %d files from %s at %s" % (res['Value']['FilesRemoved'],directory,storageElement)) return S_OK() | 9fabceb719d19d46d8b75011d2932552dbe360f9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/9fabceb719d19d46d8b75011d2932552dbe360f9/ReplicaManager.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
4479,
3245,
2853,
12,
2890,
16,
5149,
16,
5697,
1046,
4672,
314,
3328,
18,
1376,
2668,
18939,
326,
2939,
434,
738,
87,
622,
738,
87,
11,
738,
261,
5149,
16,
5697,
1046,
3719,
400... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4479,
3245,
2853,
12,
2890,
16,
5149,
16,
5697,
1046,
4672,
314,
3328,
18,
1376,
2668,
18939,
326,
2939,
434,
738,
87,
622,
738,
87,
11,
738,
261,
5149,
16,
5697,
1046,
3719,
400... |
if not options.skip_cvs: if not options.skip_ldap: do_cvs_checkout(LDAPCSDK_DIRS, LDAPCSDK_CO_TAG, options.cvsroot, options.cvs, '') if os.path.exists(os.path.join(topsrcdir, 'mozilla', 'extensions')): do_cvs_checkout(EXTENSION_DIRS, EXTENSION_CO_TAG, options.cvsroot, options.cvs, 'mozilla') else: print >>sys.stderr, "Warning: mozilla/extensions does not exist, built-in extensions could not be checked out." pass | if not options.skip_ldap: do_cvs_checkout(LDAPCSDK_DIRS, LDAPCSDK_CO_TAG, options.cvsroot, options.cvs, '') | def fixup_repo_options(options): """ Check options.comm_repo and options.mozilla_repo values; populate mozilla_repo if needed. options.comm_repo and options.mozilla_repo are normally None. This is fine-- our "hg pull" commands will omit the repo URL. The exception is the initial checkout, which does an "hg clone" for Mozilla. That command requires a repository URL. """ if (options.comm_repo is None and not os.path.exists(os.path.join(topsrcdir, '.hg'))): o.print_help() print print "*** The -m option is required for the initial checkout." sys.exit(2) # Handle special case: initial checkout of Mozilla. if (options.mozilla_repo is None and not os.path.exists(os.path.join(topsrcdir, 'mozilla'))): options.mozilla_repo = DEFAULT_MOZILLA_REPO # Handle special case: initial checkout of inspector. if (options.inspector_repo is None and not os.path.exists(os.path.join(topsrcdir, 'mozilla', 'extensions', 'inspector'))): options.inspector_repo = DEFAULT_INSPECTOR_REPO | 5e26eee8a47e5fe451b10b8e7bff4e035d4462d2 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11044/5e26eee8a47e5fe451b10b8e7bff4e035d4462d2/client.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2917,
416,
67,
7422,
67,
2116,
12,
2116,
4672,
3536,
2073,
702,
18,
5702,
67,
7422,
471,
702,
18,
8683,
15990,
67,
7422,
924,
31,
6490,
27513,
67,
7422,
309,
3577,
18,
225,
702,
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,
2917,
416,
67,
7422,
67,
2116,
12,
2116,
4672,
3536,
2073,
702,
18,
5702,
67,
7422,
471,
702,
18,
8683,
15990,
67,
7422,
924,
31,
6490,
27513,
67,
7422,
309,
3577,
18,
225,
702,
18,
... |
exit( 2 ) if not cliParams.releasesToBuild: usage() exit( 2 ) | def usage(): Script.showHelp() exit( 2 ) | dd3f705359d354a930e4bae539baa68051aa2d10 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/dd3f705359d354a930e4bae539baa68051aa2d10/dirac-distribution.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4084,
13332,
7739,
18,
4500,
6696,
1435,
2427,
12,
576,
262,
225,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4084,
13332,
7739,
18,
4500,
6696,
1435,
2427,
12,
576,
262,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... | |
self.myImage.hide() self.explode() base.disableParticles() self.engineSound.stop() self.MusicSound.setVolume(0.5) | self.myImage.hide() base.disableParticles() self.engineSound.stop() self.MusicSound.setVolume(0.5) | def evtHit(self, entry): #Function that controls the event when the airplane hit something | 582ad02b5f51a576d9969a615e9d4f9ba467cba2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4878/582ad02b5f51a576d9969a615e9d4f9ba467cba2/Gaivota.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6324,
13616,
12,
2890,
16,
1241,
4672,
468,
2083,
716,
11022,
326,
871,
1347,
326,
23350,
21314,
6800,
5943,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
6324,
13616,
12,
2890,
16,
1241,
4672,
468,
2083,
716,
11022,
326,
871,
1347,
326,
23350,
21314,
6800,
5943,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
'name' : getattr(menu_item, menu.identifier_field), 'uri' : getattr(menu_item, menu.uri_field), | 'name' : getattr(menu_item, menu.identifier_field.name), 'uri' : getattr(menu_item, menu.uri_field.name), | def _menu_item_to_dict(self, cursor, user, menu_item, menu): """ :param menu_item: BR of the menu item :param menu: BR of the menu set """ return { 'name' : getattr(menu_item, menu.identifier_field), 'uri' : getattr(menu_item, menu.uri_field), } | c6ef06ebfcffb9242bd52da2cd8929a88c5ebb42 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2593/c6ef06ebfcffb9242bd52da2cd8929a88c5ebb42/cms.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
5414,
67,
1726,
67,
869,
67,
1576,
12,
2890,
16,
3347,
16,
729,
16,
3824,
67,
1726,
16,
3824,
4672,
3536,
294,
891,
3824,
67,
1726,
30,
22427,
434,
326,
3824,
761,
294,
891,
382... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5414,
67,
1726,
67,
869,
67,
1576,
12,
2890,
16,
3347,
16,
729,
16,
3824,
67,
1726,
16,
3824,
4672,
3536,
294,
891,
3824,
67,
1726,
30,
22427,
434,
326,
3824,
761,
294,
891,
382... |
tableWhitelist = self.getParam('tableWhitelist') tableBlacklist = self.getParam('tableBlacklist') retcolsWhitelist = self.getParam('retcolsWhitelist') retcolsBlacklist = self.getParam('retcolsBlacklist') | if len(self.param) == 1: paramValue = tuple((paramValue, )) | def check(self, data, *args, **keywords): cacheCaseSensitive = self.getParam('cacheCaseSensitive') param = self.getParam('param') | 2d6b03ec5735bdc3185b3b5ecbcfa402ac08edae /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5428/2d6b03ec5735bdc3185b3b5ecbcfa402ac08edae/ListBW.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
12,
2890,
16,
501,
16,
380,
1968,
16,
2826,
11771,
4672,
1247,
2449,
14220,
273,
365,
18,
588,
786,
2668,
2493,
2449,
14220,
6134,
579,
273,
365,
18,
588,
786,
2668,
891,
6134,
2,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
12,
2890,
16,
501,
16,
380,
1968,
16,
2826,
11771,
4672,
1247,
2449,
14220,
273,
365,
18,
588,
786,
2668,
2493,
2449,
14220,
6134,
579,
273,
365,
18,
588,
786,
2668,
891,
6134,
2,... |
import sys, time | import sys | def purge(base_dirs, gigs, ignore, max_age, dry_run=False): """Delete directories under `base_dirs` until `gigs` GB are free. Delete any directories older than max_age. Will not delete directories listed in the ignore list.""" gigs *= 1024 * 1024 * 1024 dirs = [] for base_dir in base_dirs: if os.path.exists(base_dir): for d in os.listdir(base_dir): if d in ignore: continue p = os.path.join(base_dir, d) if not os.path.isdir(p): continue mtime = os.path.getmtime(p) dirs.append( (mtime, p) ) dirs.sort() while dirs: mtime, d = dirs.pop(0) # If we're newer than max_age, and don't need any more free space, # we're all done here if (not max_age) or (mtime > max_age): if freespace(base_dirs[0]) >= gigs: break print "Deleting", d if not dry_run: try: clobber_path=d+clobber_suffix if os.path.exists(clobber_path): rmdirRecursive(clobber_path) # Prevent repeated moving. if d.endswith(clobber_suffix): rmdirRecursive(d) else: shutil.move(d, clobber_path) rmdirRecursive(clobber_path) except: print >>sys.stderr, "Couldn't purge %s properly. Skipping." % d | 621dbb2354aca94162e1303b717350efc6e68c96 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6206/621dbb2354aca94162e1303b717350efc6e68c96/purge_builds.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11668,
12,
1969,
67,
8291,
16,
314,
360,
87,
16,
2305,
16,
943,
67,
410,
16,
10299,
67,
2681,
33,
8381,
4672,
3536,
2613,
6402,
3613,
1375,
1969,
67,
8291,
68,
3180,
1375,
75,
360,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11668,
12,
1969,
67,
8291,
16,
314,
360,
87,
16,
2305,
16,
943,
67,
410,
16,
10299,
67,
2681,
33,
8381,
4672,
3536,
2613,
6402,
3613,
1375,
1969,
67,
8291,
68,
3180,
1375,
75,
360,
8... |
traceback.print_stack(stack, file=s) if PRINT_LOCALVARS: s.write("Locals by frame, innermost last%s" % os.linesep) for frame in stack: s.write(os.linesep) s.write("Frame %s in %s at line %s%s" % (frame.f_code.co_name, frame.f_code.co_filename, frame.f_lineno, os.linesep)) | s.write('Traceback:') s.write(os.linesep) for frame, fname, lineno, method, lines, i in reversed(stack): s.write(' File %r, line %d, in %s' % (fname, lineno, method)) s.write(os.linesep) s.write(' %s' % lines[0].lstrip()) if PRINT_LOCALVARS: | def _stack_format (stack): """ Format a stack trace to a message. @return: formatted stack message @rtype: string """ s = StringIO.StringIO() traceback.print_stack(stack, file=s) if PRINT_LOCALVARS: s.write("Locals by frame, innermost last%s" % os.linesep) for frame in stack: s.write(os.linesep) s.write("Frame %s in %s at line %s%s" % (frame.f_code.co_name, frame.f_code.co_filename, frame.f_lineno, os.linesep)) for key, value in frame.f_locals.items(): s.write("\t%20s = " % key) # be careful not to cause a new error in the error output try: s.write(str(value)) s.write(os.linesep) except: s.write("error in str() call%s" % os.linesep) return s.getvalue() | faf1ea81ce85e52a6f731442dc751ffe1189caab /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3948/faf1ea81ce85e52a6f731442dc751ffe1189caab/log.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3772,
67,
2139,
261,
3772,
4672,
3536,
4077,
279,
2110,
2606,
358,
279,
883,
18,
225,
632,
2463,
30,
4955,
2110,
883,
632,
86,
723,
30,
533,
3536,
272,
273,
15777,
18,
780,
4294,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3772,
67,
2139,
261,
3772,
4672,
3536,
4077,
279,
2110,
2606,
358,
279,
883,
18,
225,
632,
2463,
30,
4955,
2110,
883,
632,
86,
723,
30,
533,
3536,
272,
273,
15777,
18,
780,
4294,
... |
data = self.get_data(rva) | data = self.get_data(rva, Structure(self.__IMAGE_IMPORT_DESCRIPTOR_format__).sizeof() ) | def parse_import_directory(self, rva, size): """Walk and parse the import directory.""" import_descs = [] while True: try: # If the RVA is invalid all would blow up. Some EXEs seem to be # specially nasty and have an invalid RVA. data = self.get_data(rva) except PEFormatError, e: self.__warnings.append( 'Error parsing the Import directory at RVA: 0x%x' % ( rva ) ) break import_desc = self.__unpack_data__( self.__IMAGE_IMPORT_DESCRIPTOR_format__, data, file_offset = self.get_offset_from_rva(rva) ) # If the structure is all zeores, we reached the end of the list if not import_desc or import_desc.all_zeroes(): break rva += import_desc.sizeof() try: import_data = self.parse_imports( import_desc.OriginalFirstThunk, import_desc.FirstThunk, import_desc.ForwarderChain) except PEFormatError, excp: self.__warnings.append( 'Error parsing the Import directory. ' + 'Invalid Import data at RVA: 0x%x' % ( rva ) ) break #raise excp if not import_data: continue dll = self.get_string_at_rva(import_desc.Name) if dll: import_descs.append( ImportDescData( struct = import_desc, imports = import_data, dll = dll)) return import_descs | 1d5b4f161f415406d1d384dc2319874979bcdef8 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/213/1d5b4f161f415406d1d384dc2319874979bcdef8/pefile.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
67,
5666,
67,
5149,
12,
2890,
16,
5633,
69,
16,
963,
4672,
3536,
9463,
471,
1109,
326,
1930,
1867,
12123,
225,
1930,
67,
5569,
87,
273,
225,
5378,
1323,
1053,
30,
775,
30,
468,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
67,
5666,
67,
5149,
12,
2890,
16,
5633,
69,
16,
963,
4672,
3536,
9463,
471,
1109,
326,
1930,
1867,
12123,
225,
1930,
67,
5569,
87,
273,
225,
5378,
1323,
1053,
30,
775,
30,
468,
... |
self.in_para = True | self.in_para = True | def populate(self, tb): self.create_line() open_containers = collections.deque() self.in_para = False for i in tb.content: if isinstance(i, basestring): self.process_text(i) elif i is None: if len(open_containers) > 0: for a, b in open_containers.pop(): if callable(a): a(*b) else: setattr(self, a, b) elif i.name == 'P': open_containers.append((('in_para', False),)) self.in_para = True elif i.name == 'CR': if self.in_para: self.end_line() self.create_line() else: self.end_line() delta = self.current_style.parskip if isinstance(self.lines[-1], ParSkip): delta += self.current_style.baselineskip self.lines.append(ParSkip(delta)) self.first_line = True elif i.name == 'Span': open_containers.append((('current_style', self.current_style.copy()),)) self.current_style.update(i.attrs) elif i.name == 'CharButton': open_containers.append(((self.end_link, []),)) self.create_link(i.attrs['refobj']) elif i.name == 'Italic': open_containers.append((('current_style', self.current_style.copy()),)) self.current_style.update(fontstyle=QFont.StyleItalic) elif i.name == 'Plot': plot = Plot(i, self.font_loader.dpi) if self.current_line is None: self.create_line() if not self.current_line.can_add_plot(plot): self.end_line() self.create_line() self.current_line.add_plot(plot) elif i.name in ['Sup', 'Sub']: if self.current_line is None: self.create_line() self.current_line.valign = i.name open_containers.append(((self.close_valign, []),)) elif i.name == 'Space': self.current_line.add_space(i.attrs['xsize']) elif i.name == 'EmpLine': if i.attrs: open_containers.append((('current_style', self.current_style.copy()),)) self.current_style.update(i.attrs) else: self.logger.warning('Unhandled TextTag %s'%(i.name,)) if not i.self_closing: open_containers.append([]) | 7d41e55dca63f9cf8c624b6a2e102e77d191e8fc /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9125/7d41e55dca63f9cf8c624b6a2e102e77d191e8fc/text.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6490,
12,
2890,
16,
8739,
4672,
365,
18,
2640,
67,
1369,
1435,
1696,
67,
20596,
273,
6980,
18,
323,
1857,
1435,
365,
18,
267,
67,
25072,
273,
1083,
364,
277,
316,
8739,
18,
1745,
30,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6490,
12,
2890,
16,
8739,
4672,
365,
18,
2640,
67,
1369,
1435,
1696,
67,
20596,
273,
6980,
18,
323,
1857,
1435,
365,
18,
267,
67,
25072,
273,
1083,
364,
277,
316,
8739,
18,
1745,
30,
... |
bb.msg.warn(1, None, ''.join(args)) | bb.msg.warn(None, ''.join(args)) | def warn(*args): bb.msg.warn(1, None, ''.join(args)) | 867b01c3ca37b37a578183f671d4fd2fbbed4fd4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8123/867b01c3ca37b37a578183f671d4fd2fbbed4fd4/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1894,
30857,
1968,
4672,
7129,
18,
3576,
18,
8935,
12,
7036,
16,
875,
18,
5701,
12,
1968,
3719,
225,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1894,
30857,
1968,
4672,
7129,
18,
3576,
18,
8935,
12,
7036,
16,
875,
18,
5701,
12,
1968,
3719,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
self.new_text('title',node.getAttribute('name')), | title_xhtml, | def x_article(self,node): description_xhtml = self.new_node('div',klass='description') brief_xhtml = self.new_node('span', self.x(self.get_child(self.get_child(node,tag='articleinfo'), tag='articlepurpose' )), klass='brief' ) body_item = self.get_child(node,tag='title').nextSibling download_item = None while body_item: item = self.x(body_item) if item: download_i = self.get_child(item,tag='boostbook:download') if download_i: download_item = download_i else: description_xhtml.appendChild(item) body_item = body_item.nextSibling return self.new_node( 'item', self.new_text('title',node.getAttribute('name')), self.new_text('pubDate',node.getAttribute('last-revision')), self.new_text('boostbook:purpose',brief_xhtml.toxml('utf-8')), download_item, self.new_text('description',description_xhtml.toxml('utf-8')) ) | 4415874f7fdad5e50be1da2502f114026629a2d9 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9849/4415874f7fdad5e50be1da2502f114026629a2d9/bbook2rss.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
619,
67,
11480,
12,
2890,
16,
2159,
4672,
2477,
67,
26341,
273,
365,
18,
2704,
67,
2159,
2668,
2892,
2187,
22626,
2218,
3384,
6134,
324,
17802,
67,
26341,
273,
365,
18,
2704,
67,
2159,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
619,
67,
11480,
12,
2890,
16,
2159,
4672,
2477,
67,
26341,
273,
365,
18,
2704,
67,
2159,
2668,
2892,
2187,
22626,
2218,
3384,
6134,
324,
17802,
67,
26341,
273,
365,
18,
2704,
67,
2159,
... |
print 'Usage: %s < ce name> [< ce name>]' %(Script.scriptName) DIRAC.exit(2) | print 'Usage: %s < ce name> [< ce name>]' % ( Script.scriptName ) DIRAC.exit( 2 ) | def usage(): print 'Usage: %s < ce name> [< ce name>]' %(Script.scriptName) DIRAC.exit(2) | 34fa442d048f1227d559bfc78370585cfba9e77f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/34fa442d048f1227d559bfc78370585cfba9e77f/dirac-admin-ce-info.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4084,
13332,
1172,
296,
5357,
30,
738,
87,
411,
5898,
508,
34,
306,
32,
5898,
508,
34,
3864,
738,
261,
7739,
18,
4263,
461,
262,
18544,
2226,
18,
8593,
12,
576,
262,
225,
2,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4084,
13332,
1172,
296,
5357,
30,
738,
87,
411,
5898,
508,
34,
306,
32,
5898,
508,
34,
3864,
738,
261,
7739,
18,
4263,
461,
262,
18544,
2226,
18,
8593,
12,
576,
262,
225,
2,
-100,
-1... |
self.restore_files() | self.restore_files() | def reset_files(self): | ca6ae39a786f3d7535cba0f2aef10692eb750051 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/ca6ae39a786f3d7535cba0f2aef10692eb750051/rexec.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2715,
67,
2354,
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,
2715,
67,
2354,
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... |
o.write("To: %s\r\n" % ','.join(to_email)) | o.write("To: %s\n" % ','.join(to_email)) | def sendmailme(to_email, msg, email_subject=None, from_email=None, html=True, sendmail=SENDMAIL): """ Quick and dirty, pipe a message to sendmail. Can only work on UNIX type systems with sendmail. Will need the path to sendmail - defaults to the 'SENDMAIL' constant. ``to_email`` can be a single email address, *or* a list of addresses. *Assumes* you are sending an html email created by ``createhtmlmail``. If this isn't the case then set ``html=False``. """ if not isinstance(to_email, list): to_email = [to_email] o = os.popen("%(a)s -t -f %(b)s" % {'a':sendmail, 'b':from_email},"w") o.write("To: %s\r\n" % ','.join(to_email)) if from_email: o.write("From: %s\r\n" % from_email) if not html and email_subject: o.write("Subject: %s\r\n" % email_subject) o.write("\r\n") o.write("%s\r\n" % msg) o.close() | ded8e8d2c7e2d693b382726a6d565ddb6855e3b7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7008/ded8e8d2c7e2d693b382726a6d565ddb6855e3b7/cgiutils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1366,
4408,
3501,
12,
869,
67,
3652,
16,
1234,
16,
2699,
67,
7857,
33,
7036,
16,
628,
67,
3652,
33,
7036,
16,
1729,
33,
5510,
16,
1366,
4408,
33,
21675,
18191,
4672,
3536,
19884,
471,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1366,
4408,
3501,
12,
869,
67,
3652,
16,
1234,
16,
2699,
67,
7857,
33,
7036,
16,
628,
67,
3652,
33,
7036,
16,
1729,
33,
5510,
16,
1366,
4408,
33,
21675,
18191,
4672,
3536,
19884,
471,
... |
space_available = maxWidth - (currentWidth + spaceWidth + wordWidth) if space_available > 0 or len(cLine)==0: | newWidth = currentWidth + spaceWidth + wordWidth if newWidth<=maxWidth or len(cLine)==0: | def breakLines(self, width): """ Returns a broken line structure. There are two cases A) For the simple case of a single formatting input fragment the output is A fragment specifier with kind = 0 fontName, fontSize, leading, textColor lines= A list of lines Each line has two items. 1) unused width in points 2) word list | 753058fb29c9fc34ce3c17955b30b1c279a9da66 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/753058fb29c9fc34ce3c17955b30b1c279a9da66/paragraph.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
898,
5763,
12,
2890,
16,
1835,
4672,
3536,
2860,
279,
12933,
980,
3695,
18,
6149,
854,
2795,
6088,
225,
432,
13,
2457,
326,
4143,
648,
434,
279,
2202,
10407,
810,
5481,
326,
876,
353,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
898,
5763,
12,
2890,
16,
1835,
4672,
3536,
2860,
279,
12933,
980,
3695,
18,
6149,
854,
2795,
6088,
225,
432,
13,
2457,
326,
4143,
648,
434,
279,
2202,
10407,
810,
5481,
326,
876,
353,
... |
col = [ self[s+k] for k in range(shape[i]) ] | col = [ self[s+k].value for k in range(shape[i]) ] | def to_tableau(self): """ Returns the Tableau object corresponding to self. | 1b5943a3f27dd182eda880fabcbc4e031b49f2d7 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/1b5943a3f27dd182eda880fabcbc4e031b49f2d7/tensor_product.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
358,
67,
2121,
8377,
12,
2890,
4672,
3536,
2860,
326,
3555,
8377,
733,
4656,
358,
365,
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,... | [
1,
1,
1,
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,
358,
67,
2121,
8377,
12,
2890,
4672,
3536,
2860,
326,
3555,
8377,
733,
4656,
358,
365,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
axis.draw_labels(dc) | axis.draw_labels(dc) | def draw(self,dc=None): #if not len(self.line_list) or len(self.image_list): # return # resize if necessary #print 'draw' | df79b98c303a560c1ce3becb40a1d8ef0365b9f5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/df79b98c303a560c1ce3becb40a1d8ef0365b9f5/wxplt.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3724,
12,
2890,
16,
7201,
33,
7036,
4672,
468,
430,
486,
562,
12,
2890,
18,
1369,
67,
1098,
13,
578,
562,
12,
2890,
18,
2730,
67,
1098,
4672,
468,
565,
327,
468,
7041,
309,
4573,
468... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3724,
12,
2890,
16,
7201,
33,
7036,
4672,
468,
430,
486,
562,
12,
2890,
18,
1369,
67,
1098,
13,
578,
562,
12,
2890,
18,
2730,
67,
1098,
4672,
468,
565,
327,
468,
7041,
309,
4573,
468... |
onClick="javascript:window.open("%s/manage_main", "manage_main").focus()" | onClick="javascript:window.open('%s/manage_main', 'manage_main').focus()" | def tutorialShowLesson(self, id, REQUEST): """ Navigate management frame to a given lesson's screen. """ url=self.lessonURL(id, REQUEST) if not url: return """\ | f33d10f51344a7fa68e575fe90f4f7f71f1e3d10 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/f33d10f51344a7fa68e575fe90f4f7f71f1e3d10/TutorialTopic.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
268,
22378,
5706,
15313,
265,
12,
2890,
16,
612,
16,
12492,
4672,
3536,
423,
20698,
11803,
2623,
358,
279,
864,
22766,
1807,
5518,
18,
3536,
880,
33,
2890,
18,
23818,
1785,
12,
350,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
268,
22378,
5706,
15313,
265,
12,
2890,
16,
612,
16,
12492,
4672,
3536,
423,
20698,
11803,
2623,
358,
279,
864,
22766,
1807,
5518,
18,
3536,
880,
33,
2890,
18,
23818,
1785,
12,
350,
16,
... |
self.parser.parseError(_("Unexpected end tag token (" + name + ") in the frameset phase.")) | self.parser.parseError(_(u"Unexpected end tag token (" + name + u") in the frameset phase. Ignored.")) | def endTagOther(self, name): self.parser.parseError(_("Unexpected end tag token (" + name + ") in the frameset phase.")) | 0bf97576c038bea022065520abf38c5ff3c96688 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/10463/0bf97576c038bea022065520abf38c5ff3c96688/html5parser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
29765,
8290,
12,
2890,
16,
508,
4672,
365,
18,
4288,
18,
2670,
668,
24899,
2932,
7762,
679,
1047,
1147,
7566,
397,
508,
397,
9369,
316,
326,
7793,
278,
6855,
1199,
3719,
2,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
29765,
8290,
12,
2890,
16,
508,
4672,
365,
18,
4288,
18,
2670,
668,
24899,
2932,
7762,
679,
1047,
1147,
7566,
397,
508,
397,
9369,
316,
326,
7793,
278,
6855,
1199,
3719,
2,
-100,
-100,
... |
def GenerateNote(view): | def GenerateNote(view, tzinfo=None): | def GenerateNote(view): """ Generate one Note item """ note = pim.Note(view=view) note.displayName = random.choice(TITLES) delta = timedelta(days=random.randint(0, 5), hours=random.randint(0, 24)) note.createdOn = datetime.now() + delta return note | 7713aa38e29f26998048109963d046607527df00 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/7713aa38e29f26998048109963d046607527df00/GenerateItems.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6654,
8067,
12,
1945,
16,
15732,
33,
7036,
4672,
3536,
6654,
1245,
3609,
761,
3536,
4721,
273,
293,
381,
18,
8067,
12,
1945,
33,
1945,
13,
4721,
18,
5417,
461,
273,
2744,
18,
11569,
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,
6654,
8067,
12,
1945,
16,
15732,
33,
7036,
4672,
3536,
6654,
1245,
3609,
761,
3536,
4721,
273,
293,
381,
18,
8067,
12,
1945,
33,
1945,
13,
4721,
18,
5417,
461,
273,
2744,
18,
11569,
12... |
connection = self._getConnection( connection ) | def removeReplica( self, lfns, connection = False ): connection = self._getConnection( connection ) """ Remove replica from catalog """ successful = {} failed = {} for lfn, info in lfns.items(): res = self._checkInfo( info, ['PFN', 'SE'] ) if not res['OK']: failed[lfn] = res['Message'] lfns.pop( lfn ) res = self._deleteReplicas( lfns, connection = connection ) if not res['OK']: for lfn in lfns.keys(): failed[lfn] = res['Message'] else: failed.update( res['Value']['Failed'] ) successful.update( res['Value']['Successful'] ) return S_OK( {'Successful':successful, 'Failed':failed} ) | 730c8c8e8acbd225fa02fcc8d670bcbd786db665 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/730c8c8e8acbd225fa02fcc8d670bcbd786db665/FileManagerBase.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1206,
14222,
12,
365,
16,
18594,
2387,
16,
1459,
273,
1083,
262,
30,
3536,
3581,
12335,
628,
6222,
3536,
6873,
273,
2618,
2535,
273,
2618,
364,
328,
4293,
16,
1123,
316,
18594,
2387,
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,
1206,
14222,
12,
365,
16,
18594,
2387,
16,
1459,
273,
1083,
262,
30,
3536,
3581,
12335,
628,
6222,
3536,
6873,
273,
2618,
2535,
273,
2618,
364,
328,
4293,
16,
1123,
316,
18594,
2387,
18,... | |
DocServer(address, callback).serve_forever() | DocServer(port, callback).serve_until_quit() except (KeyboardInterrupt, select.error): pass print 'server stopped' def gui(): """Graphical interface (starts web server and pops up a control window).""" class GUI: def __init__(self, window, port=7464): self.window = window self.server = None self.scanner = None import Tkinter self.server_frm = Tkinter.Frame(window) self.title_lbl = Tkinter.Label(self.server_frm, text='Starting server...\n ') self.open_btn = Tkinter.Button(self.server_frm, text='open browser', command=self.open, state='disabled') self.quit_btn = Tkinter.Button(self.server_frm, text='quit serving', command=self.quit, state='disabled') self.search_frm = Tkinter.Frame(window) self.search_lbl = Tkinter.Label(self.search_frm, text='Search for') self.search_ent = Tkinter.Entry(self.search_frm) self.search_ent.bind('<Return>', self.search) self.stop_btn = Tkinter.Button(self.search_frm, text='stop', pady=0, command=self.stop, state='disabled') if sys.platform == 'win32': self.stop_btn.pack(side='right') self.window.title('pydoc') self.window.protocol('WM_DELETE_WINDOW', self.quit) self.title_lbl.pack(side='top', fill='x') self.open_btn.pack(side='left', fill='x', expand=1) self.quit_btn.pack(side='right', fill='x', expand=1) self.server_frm.pack(side='top', fill='x') self.search_lbl.pack(side='left') self.search_ent.pack(side='right', fill='x', expand=1) self.search_frm.pack(side='top', fill='x') self.search_ent.focus_set() self.result_lst = Tkinter.Listbox(window, font=('helvetica', 8), height=6) self.result_lst.bind('<Button-1>', self.select) self.result_lst.bind('<Double-Button-1>', self.goto) self.result_scr = Tkinter.Scrollbar(window, orient='vertical', command=self.result_lst.yview) self.result_lst.config(yscrollcommand=self.result_scr.set) self.result_frm = Tkinter.Frame(window) self.goto_btn = Tkinter.Button(self.result_frm, text='go to selected', command=self.goto) self.hide_btn = Tkinter.Button(self.result_frm, text='hide results', command=self.hide) self.goto_btn.pack(side='left', fill='x', expand=1) self.hide_btn.pack(side='right', fill='x', expand=1) self.window.update() self.minwidth = self.window.winfo_width() self.minheight = self.window.winfo_height() self.bigminheight = (self.server_frm.winfo_reqheight() + self.search_frm.winfo_reqheight() + self.result_lst.winfo_reqheight() + self.result_frm.winfo_reqheight()) self.bigwidth, self.bigheight = self.minwidth, self.bigminheight self.expanded = 0 self.window.wm_geometry('%dx%d' % (self.minwidth, self.minheight)) self.window.wm_minsize(self.minwidth, self.minheight) import threading threading.Thread(target=serve, args=(port, self.ready)).start() def ready(self, server): self.server = server self.title_lbl.config( text='Python documentation server at\n' + server.url) self.open_btn.config(state='normal') self.quit_btn.config(state='normal') def open(self, event=None): import webbrowser webbrowser.open(self.server.url) def quit(self, event=None): if self.server: self.server.quit = 1 self.window.quit() def search(self, event=None): key = self.search_ent.get() self.stop_btn.pack(side='right') self.stop_btn.config(state='normal') self.search_lbl.config(text='Searching for "%s"...' % key) self.search_ent.forget() self.search_lbl.pack(side='left') self.result_lst.delete(0, 'end') self.goto_btn.config(state='disabled') self.expand() import threading if self.scanner: self.scanner.quit = 1 self.scanner = ModuleScanner() threading.Thread(target=self.scanner.run, args=(key, self.update, self.done)).start() def update(self, path, modname, desc): if modname[-9:] == '.__init__': modname = modname[:-9] + ' (package)' self.result_lst.insert('end', modname + ' - ' + (desc or '(no description)')) def stop(self, event=None): if self.scanner: self.scanner.quit = 1 self.scanner = None def done(self): self.scanner = None self.search_lbl.config(text='Search for') self.search_lbl.pack(side='left') self.search_ent.pack(side='right', fill='x', expand=1) if sys.platform != 'win32': self.stop_btn.forget() self.stop_btn.config(state='disabled') def select(self, event=None): self.goto_btn.config(state='normal') def goto(self, event=None): selection = self.result_lst.curselection() if selection: import webbrowser modname = split(self.result_lst.get(selection[0]))[0] webbrowser.open(self.server.url + modname + '.html') def collapse(self): if not self.expanded: return self.result_frm.forget() self.result_scr.forget() self.result_lst.forget() self.bigwidth = self.window.winfo_width() self.bigheight = self.window.winfo_height() self.window.wm_geometry('%dx%d' % (self.minwidth, self.minheight)) self.window.wm_minsize(self.minwidth, self.minheight) self.expanded = 0 def expand(self): if self.expanded: return self.result_frm.pack(side='bottom', fill='x') self.result_scr.pack(side='right', fill='y') self.result_lst.pack(side='top', fill='both', expand=1) self.window.wm_geometry('%dx%d' % (self.bigwidth, self.bigheight)) self.window.wm_minsize(self.minwidth, self.bigminheight) self.expanded = 1 def hide(self, event=None): self.stop() self.collapse() import Tkinter try: gui = GUI(Tkinter.Tk()) Tkinter.mainloop() | def server_activate(self): self.base.server_activate(self) if self.callback: self.callback() | bb384e153d6614fce08e58bada5e06402dc8b3e4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/bb384e153d6614fce08e58bada5e06402dc8b3e4/pydoc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1438,
67,
10014,
12,
2890,
4672,
365,
18,
1969,
18,
3567,
67,
10014,
12,
2890,
13,
309,
365,
18,
3394,
30,
365,
18,
3394,
1435,
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,
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,
1438,
67,
10014,
12,
2890,
4672,
365,
18,
1969,
18,
3567,
67,
10014,
12,
2890,
13,
309,
365,
18,
3394,
30,
365,
18,
3394,
1435,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
options['prj_name'] = self._name_entry.get() or None | options['modules'] = self._module_list.get(0, 'end') options['prj_name'] = self._name_entry.get() or '' | def _getopts(self): options = {} options['prj_name'] = self._name_entry.get() or None options['prj_url'] = self._url_entry.get() or None options['outdir'] = self._out_entry.get() or 'html' if self._css_var.get() == '-other-': options['css'] = self._css_entry.get() or 'default' else: options['css'] = self._css_var.get() or 'default' return options | 4cf6d74130c32443c10897614b39d1c2c512796c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11420/4cf6d74130c32443c10897614b39d1c2c512796c/gui.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
4952,
12,
2890,
4672,
702,
273,
2618,
702,
3292,
6400,
3546,
273,
365,
6315,
2978,
67,
1098,
18,
588,
12,
20,
16,
296,
409,
6134,
702,
3292,
683,
78,
67,
529,
3546,
273,
36... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
4952,
12,
2890,
4672,
702,
273,
2618,
702,
3292,
6400,
3546,
273,
365,
6315,
2978,
67,
1098,
18,
588,
12,
20,
16,
296,
409,
6134,
702,
3292,
683,
78,
67,
529,
3546,
273,
36... |
metaio.StripTableName(SnglInspiralTable.tableName), | def __init__(self, n = 0): ILWD.__init__(self, "coinc_event", "coinc_event_id", n) | cb13bf67b34b7d030f9d7a44289447cbf8bc41cc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5758/cb13bf67b34b7d030f9d7a44289447cbf8bc41cc/lsctables.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
290,
273,
374,
4672,
467,
48,
16006,
16186,
2738,
972,
12,
2890,
16,
315,
12645,
71,
67,
2575,
3113,
315,
12645,
71,
67,
2575,
67,
350,
3113,
290,
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,
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,
290,
273,
374,
4672,
467,
48,
16006,
16186,
2738,
972,
12,
2890,
16,
315,
12645,
71,
67,
2575,
3113,
315,
12645,
71,
67,
2575,
67,
350,
3113,
290,
13,
... | |
@match(r'^(?:last\s+)?commit(?:\s+(\d+))?(?:\s+(\S+))?(\s+full)?$') | @match(r'^(?:last\s+)?commit(?:\s+(\d+))?(?:(?:\s+to)?\s+(\S+?))?(\s+full)?$') | def setup(self): self.branches = {} for repository in self.repositories: path = urlparse(repository)[2].split('/') self.branches[(path[-1] or path[-2]).lower()] = Branch.open(repository) | 935d72b67cc0f4e734708d40a03c0890c5ea5700 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12048/935d72b67cc0f4e734708d40a03c0890c5ea5700/bzr.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3875,
12,
2890,
4672,
365,
18,
18078,
273,
2618,
364,
3352,
316,
365,
18,
26626,
30,
589,
273,
15185,
12,
9071,
25146,
22,
8009,
4939,
2668,
2473,
13,
365,
18,
18078,
63,
12,
803,
1891... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3875,
12,
2890,
4672,
365,
18,
18078,
273,
2618,
364,
3352,
316,
365,
18,
26626,
30,
589,
273,
15185,
12,
9071,
25146,
22,
8009,
4939,
2668,
2473,
13,
365,
18,
18078,
63,
12,
803,
1891... |
self._log_files[f], filename) | (self._log_files[f], filename)) | def cleanup(self): out = open('xia-files.txt', 'w') for f in self._temporary_files: try: os.remove(f) out.write('Deleted: %s\n' % f) except exceptions.Exception, e: out.write('Failed to delete: %s (%s)\n' % \ (f, str(e))) | 6dd91f777348ee58b722b55c90f97a0f8f00a132 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3290/6dd91f777348ee58b722b55c90f97a0f8f00a132/Files.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6686,
12,
2890,
4672,
596,
273,
1696,
2668,
92,
1155,
17,
2354,
18,
5830,
2187,
296,
91,
6134,
364,
284,
316,
365,
6315,
31143,
67,
2354,
30,
775,
30,
1140,
18,
4479,
12,
74,
13,
596... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6686,
12,
2890,
4672,
596,
273,
1696,
2668,
92,
1155,
17,
2354,
18,
5830,
2187,
296,
91,
6134,
364,
284,
316,
365,
6315,
31143,
67,
2354,
30,
775,
30,
1140,
18,
4479,
12,
74,
13,
596... |
('animate_std_views', 'int', animateStandardViews_prefs_key, True), | ('animate_std_views', 'boolean', animateStandardViews_prefs_key, True), | def _compute_default_bondVaneColor(): ord_pi_for_color = 0.5 # was ord_pi, when we let the color vary with ord_pi; # if we later want that, then define two colors here and use them as endpoints of a range color = ave_colors(ord_pi_for_color, blue, gray) return ave_colors(0.8, color, black) | d3f2d632f3fef803f77d6bd77c2b72d2be39d498 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/d3f2d632f3fef803f77d6bd77c2b72d2be39d498/prefs_constants.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
9200,
67,
1886,
67,
26425,
58,
8806,
2957,
13332,
4642,
67,
7259,
67,
1884,
67,
3266,
273,
374,
18,
25,
468,
1703,
4642,
67,
7259,
16,
1347,
732,
2231,
326,
2036,
23674,
598,
4642... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
9200,
67,
1886,
67,
26425,
58,
8806,
2957,
13332,
4642,
67,
7259,
67,
1884,
67,
3266,
273,
374,
18,
25,
468,
1703,
4642,
67,
7259,
16,
1347,
732,
2231,
326,
2036,
23674,
598,
4642... |
self.job_post(webbrowser.open_new, (SUPPORT_URL, )) | self.job_post(open_new, (SUPPORT_URL, )) | def do_support(self, event): self.job_post(webbrowser.open_new, (SUPPORT_URL, )) | 10ca0d8a9841497794134a4525061e8e56c6cafb /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1662/10ca0d8a9841497794134a4525061e8e56c6cafb/winpdb.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
67,
13261,
12,
2890,
16,
871,
4672,
365,
18,
4688,
67,
2767,
12,
4875,
11213,
18,
3190,
67,
2704,
16,
261,
13272,
6354,
67,
1785,
16,
8623,
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,
741,
67,
13261,
12,
2890,
16,
871,
4672,
365,
18,
4688,
67,
2767,
12,
4875,
11213,
18,
3190,
67,
2704,
16,
261,
13272,
6354,
67,
1785,
16,
8623,
2,
-100,
-100,
-100,
-100,
-100,
-100,
... |
self.nonce_count += 1 | if nonce == self.last_nonce: self.nonce_count += 1 else: self.nonce_count = 1 self.last_nonce = nonce | def get_authorization(self, req, chal): try: realm = chal['realm'] nonce = chal['nonce'] qop = chal.get('qop') algorithm = chal.get('algorithm', 'MD5') # mod_digest doesn't send an opaque, even though it isn't # supposed to be optional opaque = chal.get('opaque', None) except KeyError: return None | 261542f78181852691a61ca584d187ebae7a7a4b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12029/261542f78181852691a61ca584d187ebae7a7a4b/urllib2.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
12218,
12,
2890,
16,
1111,
16,
462,
287,
4672,
775,
30,
11319,
273,
462,
287,
3292,
24056,
3546,
7448,
273,
462,
287,
3292,
12824,
3546,
1043,
556,
273,
462,
287,
18,
588,
266... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
12218,
12,
2890,
16,
1111,
16,
462,
287,
4672,
775,
30,
11319,
273,
462,
287,
3292,
24056,
3546,
7448,
273,
462,
287,
3292,
12824,
3546,
1043,
556,
273,
462,
287,
18,
588,
266... |
NSIS_path = r'"C:\\Program Files\\NSIS\\makensis.exe"' | NSIS_path = r'"C:\\Program Files\\NSIS\\Unicode\\makensis.exe"' | def package_finish(self): # a standard map of strings for replacing in the templates substitution_strings = { 'version' : '.'.join(self.args['version']), 'version_short' : '.'.join(self.args['version'][:-1]), 'version_dashes' : '-'.join(self.args['version']), 'final_exe' : self.final_exe(), 'grid':self.args['grid'], 'grid_caps':self.args['grid'].upper(), # escape quotes becase NSIS doesn't handle them well 'flags':self.flags_list().replace('"', '$\\"'), 'channel':self.channel(), 'channel_oneword':self.channel_oneword(), 'channel_unique':self.channel_unique(), } | 58e42b6f045a077671622d34a513327c7ff60c8b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4269/58e42b6f045a077671622d34a513327c7ff60c8b/viewer_manifest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2181,
67,
13749,
12,
2890,
4672,
468,
279,
4529,
852,
434,
2064,
364,
13993,
316,
326,
5539,
12785,
67,
10219,
273,
288,
296,
1589,
11,
294,
2611,
18,
5701,
12,
2890,
18,
1968,
3292,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2181,
67,
13749,
12,
2890,
4672,
468,
279,
4529,
852,
434,
2064,
364,
13993,
316,
326,
5539,
12785,
67,
10219,
273,
288,
296,
1589,
11,
294,
2611,
18,
5701,
12,
2890,
18,
1968,
3292,
1... |
redirR = wikipedia.getSite().redirectRegex() | site = wikipedia.getSite() redirR = site.redirectRegex() | def get_redirects_from_dump(self, alsoGetPageTitles = False): ''' Loads a local XML dump file, looks at all pages which have the redirect flag set, and finds out where they're pointing at. Returns a dictionary where the redirect names are the keys and the redirect targets are the values. ''' xmlFilename = self.xmlFilename dict = {} # open xml dump and read page titles out of it dump = xmlreader.XmlDump(xmlFilename) redirR = wikipedia.getSite().redirectRegex() readPagesCount = 0 if alsoGetPageTitles: pageTitles = set() for entry in dump.parse(): readPagesCount += 1 # always print status message after 10000 pages if readPagesCount % 10000 == 0: wikipedia.output(u'%i pages read...' % readPagesCount) if self.namespace and self.namespace != entry.namespace: continue if alsoGetPageTitles: pageTitles.add(entry.title.replace(' ', '_')) | 0d8b4e200b3e7dff752ec1360432df70c2750c8c /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4404/0d8b4e200b3e7dff752ec1360432df70c2750c8c/redirect.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
22715,
67,
2080,
67,
8481,
12,
2890,
16,
2546,
967,
1964,
25088,
273,
1083,
4672,
9163,
4444,
87,
279,
1191,
3167,
4657,
585,
16,
10192,
622,
777,
4689,
1492,
1240,
326,
3136,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
22715,
67,
2080,
67,
8481,
12,
2890,
16,
2546,
967,
1964,
25088,
273,
1083,
4672,
9163,
4444,
87,
279,
1191,
3167,
4657,
585,
16,
10192,
622,
777,
4689,
1492,
1240,
326,
3136,
... |
kwargs = kwargs."end=".TOF_end | kwargs = kwargs+", end="+TOF_end | def determine_time_indep_bkg(config, data_som): """Step 4. Determine the sample dependent, time independent background B by fitting a line to predetermined end points of ItdDXY(TOF) using function 3.43.""" kwargs = "" if not config.TOF_start==None: kwargs = "start=".TOF_start if not config.TOF_end==None: kwargs = kwargs."end=".TOF_end import hlr_weighted_average return hlr_weighted_average.weighted_average(data_som, kwargs) | 29efc361c4183443dc2b83ffa4d0ef8288a4d580 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/763/29efc361c4183443dc2b83ffa4d0ef8288a4d580/amorphous_reduction.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4199,
67,
957,
67,
267,
15037,
67,
70,
14931,
12,
1425,
16,
501,
67,
87,
362,
4672,
3536,
4160,
1059,
18,
10229,
326,
3296,
10460,
16,
813,
14807,
5412,
605,
635,
23591,
279,
980,
358,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4199,
67,
957,
67,
267,
15037,
67,
70,
14931,
12,
1425,
16,
501,
67,
87,
362,
4672,
3536,
4160,
1059,
18,
10229,
326,
3296,
10460,
16,
813,
14807,
5412,
605,
635,
23591,
279,
980,
358,... |
add_preference('scaler' 'xds') | add_preference('scaler', 'xds') | def Integrater(): '''Return an Integrater implementation.''' # FIXME this should take an indexer as an argument... integrater = None preselection = get_preferences().get('integrater') if not integrater and (not preselection or preselection == 'xds'): try: integrater = XDSIntegrater() Admin.write('Using XDS Integrater') add_preference('scaler' 'xds') except NotAvailableError, e: if preselection == 'xds': raise RuntimeError, \ 'preselected integrater xds not available' pass if not integrater and (not preselection or preselection == 'mosflm'): try: integrater = Mosflm.Mosflm() Admin.write('Using Mosflm Integrater') add_preference('scaler' 'ccp4') except NotAvailableError, e: if preselection == 'mosflm': raise RuntimeError, \ 'preselected integrater xds not available' pass if not integrater: raise RuntimeError, 'no integrater implementations found' return integrater | fb7b017d0f57c5666f0a8ef0eaac0eeea055a14b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3290/fb7b017d0f57c5666f0a8ef0eaac0eeea055a14b/IntegraterFactory.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
15285,
2045,
13332,
9163,
990,
392,
225,
15285,
2045,
4471,
1093,
6309,
225,
468,
9852,
333,
1410,
4862,
392,
12635,
487,
392,
1237,
2777,
225,
11301,
2045,
273,
599,
4075,
292,
794,
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,
15285,
2045,
13332,
9163,
990,
392,
225,
15285,
2045,
4471,
1093,
6309,
225,
468,
9852,
333,
1410,
4862,
392,
12635,
487,
392,
1237,
2777,
225,
11301,
2045,
273,
599,
4075,
292,
794,
273,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.