rem stringlengths 2 226k | add stringlengths 0 227k | context stringlengths 8 228k | meta stringlengths 156 215 | input_ids list | attention_mask list | labels list |
|---|---|---|---|---|---|---|
self[0][0].parent().is_atomic_repr())) | self.base_ring().is_atomic_repr())) | def _repr_(self): cr = self._cr() if len(self) == 0: return str(self.__unit) try: atomic = ((isinstance(self[0][0], (int, long)) or \ self[0][0].parent().is_atomic_repr())) except AttributeError: atomic = False s = '' mul = ' * ' if cr: mul += '\n' for i in range(len(self)): t = str(self[i][0]) n = self[i][1] if (n>1 or len(self) > 1 or self.__unit != 1) and not atomic and ('+' in t or '-' in t or ' ' in t): t = '(%s)'%t if n != 1: t += '^%s'%n s += t if i < len(self)-1: s += mul if self.__unit != 1: if atomic: u = str(self.__unit) else: u = '(%s)'%self.__unit s = u + mul + s return s | 366d01f87cfaf5726fd23f49c23799fb32b771dd /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/366d01f87cfaf5726fd23f49c23799fb32b771dd/factorization.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
12715,
67,
12,
2890,
4672,
4422,
273,
365,
6315,
3353,
1435,
309,
562,
12,
2890,
13,
422,
374,
30,
327,
609,
12,
2890,
16186,
4873,
13,
775,
30,
7960,
273,
14015,
291,
1336,
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,
389,
12715,
67,
12,
2890,
4672,
4422,
273,
365,
6315,
3353,
1435,
309,
562,
12,
2890,
13,
422,
374,
30,
327,
609,
12,
2890,
16186,
4873,
13,
775,
30,
7960,
273,
14015,
291,
1336,
12,
... |
cfunc_none_string = cty.CFUNCTYPE(None, STRING) | def fl_enumerate_fonts(py_output, shortform): """ fl_enumerate_fonts(py_output, shortform) -> ID num """ cfunc_none_string = cty.CFUNCTYPE(None, STRING) c_output = cfunc_none_string(py_output) retval = _fl_enumerate_fonts(c_output, shortform) _cfunc_refs[tmpval1] = c_output return retval | 8765c710f695de392f6fc7c664c746ec98668b1d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2429/8765c710f695de392f6fc7c664c746ec98668b1d/xformslib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1183,
67,
7924,
12600,
67,
22052,
12,
2074,
67,
2844,
16,
3025,
687,
4672,
3536,
1183,
67,
7924,
12600,
67,
22052,
12,
2074,
67,
2844,
16,
3025,
687,
13,
317,
1599,
818,
3536,
225,
276... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1183,
67,
7924,
12600,
67,
22052,
12,
2074,
67,
2844,
16,
3025,
687,
4672,
3536,
1183,
67,
7924,
12600,
67,
22052,
12,
2074,
67,
2844,
16,
3025,
687,
13,
317,
1599,
818,
3536,
225,
276... | |
Construct a new HTML outputter, using the given L{DocMap} object. | Construct a new HTML formatter, using the given documentation map. | def __init__(self, docmap, **kwargs): """ Construct a new HTML outputter, using the given L{DocMap} object. @param docmap: The documentation to output. @type docmap: L{DocMap} @param kwargs: Keyword arguments: - C{prj_name}: The name of the project. Defaults to none. (type=C{string}) - C{prj_url}: The target for the project hopeage link on the navigation bar. If C{prj_url} is not specified, then no hyperlink is created. (type=C{string}) - C{prj_link}: The label for the project link on the navigation bar. This link can contain arbitrary HTML code (e.g. images). By default, a label is constructed from C{prj_name}. (type=C{string}) - C{top}: The top page for the documentation. This is the default page shown main frame, when frames are enabled. C{top} can be a URL, the name of a module, the name of a class, or one of the special strings C{"trees.html"}, C{"indices.html"}, or C{"help.html"}. By default, the top-level package or module is used, if there is one; otherwise, C{"trees"} is used. (type=C{string}) - C{css}: The CSS stylesheet file. If C{css} is a file name, then the specified file's conents will be used. Otherwise, if C{css} is the name of a CSS stylesheet in L{epydoc.css}, then that stylesheet will be used. Otherwise, an error is reported. If no stylesheet is specified, then the default stylesheet is used. (type=C{string}) - C{private_css}: The CSS stylesheet file for the private API documentation. If C{css} is a file name, then the specified file's conents will be used. Otherwise, if C{css} is the name of a CSS stylesheet in L{epydoc.css}, then that stylesheet will be used. Otherwise, an error is reported. If no stylesheet is specified, then the private API documentation will use the same stylesheet as the public API documentation. (type=C{string}) - C{help}: The name of the help file. If no help file is specified, then the default help file will be used. (type=C{string}) - C{private}: Whether to create documentation for private objects. By default, private objects are documented. (type=C{boolean}) - C{frames}: Whether to create a frames-based table of contents. By default, it is produced. (type=C{boolean}) - C{show_imports}: Whether or not to display lists of imported functions and classes. By default, they are not shown. (type=C{boolean}) - C{index_parameters}: Whether or not to include function parameters in the identifier index. By default, they are not included. (type=C{boolean}) - C{variable_maxlines}: The maximum number of lines that should be displayed for the value of a variable in the variable details section. By default, 8 lines are displayed. (type=C{int}) - C{variable_linelength}: The maximum line length used for displaying the values of variables in the variable details sections. If a line is longer than this length, then it will be wrapped to the next line. The default line length is 70 characters. (type=C{int}) """ self._docmap = docmap | ff8a7768302f9a81d34b7d6002d78ad59f4ed37f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/ff8a7768302f9a81d34b7d6002d78ad59f4ed37f/html.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
997,
1458,
16,
2826,
4333,
4672,
3536,
14291,
279,
394,
3982,
4453,
16,
1450,
326,
864,
7323,
852,
18,
632,
891,
997,
1458,
30,
1021,
7323,
358,
876,
18,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
997,
1458,
16,
2826,
4333,
4672,
3536,
14291,
279,
394,
3982,
4453,
16,
1450,
326,
864,
7323,
852,
18,
632,
891,
997,
1458,
30,
1021,
7323,
358,
876,
18,... |
print ">>> Preparing part configuration..." | print ">>> Preparing part configuration..." | def generateScript(): global classes global modules global verbose global quiet # # INITIALIZATION PHASE # # Class paths classPaths = getJobConfig("classPath") # Script names buildScript = getJobConfig("buildScript") sourceScript = getJobConfig("sourceScript") apiScript = getJobConfig("apiScript") # Dynamic dependencies dynLoadDeps = getJobConfig("require", {}) dynRunDeps = getJobConfig("use", {}) # Variants data # TODO: Variants for source -> Not possible userVariants = getJobConfig("variants", {}) # Part support (has priority) userParts = getJobConfig("parts", {}) # Build relevant post processing buildProcess = getJobConfig("buildProcess", []) userInclude = getJobConfig("include", []) userExclude = getJobConfig("exclude", []) collapseParts = getJobConfig("collapseParts", []) optimizeLatency = getJobConfig("optimizeLatency") if len(userParts) > 0: execMode = "parts" else: execMode = "normal" # # SCAN PHASE # # Scan for classes and modules scanClassPaths(classPaths) scanModules() # # PREPROCESS PHASE: INCLUDE/EXCLUDE # # Auto include all when nothing defined if execMode == "normal" and len(userInclude) == 0: print " - Automatically including all available classes" userInclude.append("*") print ">>> Preparing include/exclude configuration..." smartInclude, explicitInclude = _splitIncludeExcludeList(userInclude) smartExclude, explicitExclude = _splitIncludeExcludeList(userExclude) # Configuration feedback if not quiet: print " - Including %s items smart, %s items explicit" % (len(smartInclude), len(explicitInclude)) print " - Excluding %s items smart, %s items explicit" % (len(smartExclude), len(explicitExclude)) if len(userExclude) > 0: print " - Warning: Excludes may break code!" if len(explicitInclude) > 0: print " - Warning: Explicit included classes may not work" # Resolve modules/regexps print " - Resolving modules/regexps..." smartInclude = resolveComplexDefs(smartInclude) explicitInclude = resolveComplexDefs(explicitInclude) smartExclude = resolveComplexDefs(smartExclude) explicitExclude = resolveComplexDefs(explicitExclude) # # PREPROCESS PHASE: VIEWS # if execMode == "parts": print print ">>> Preparing part configuration..." # Build bitmask ids for parts if verbose: print print " - Assigning bits to parts..." # References partId -> bitId of that part partBits = {} partPos = 0 for partId in userParts: partBit = 1<<partPos if verbose: print " - Part #%s => %s" % (partId, partBit) partBits[partId] = partBit partPos += 1 # Resolving modules/regexps print " - Resolving part modules/regexps..." partClasses = {} for partId in userParts: partClasses[partId] = resolveComplexDefs(userParts[partId]) # # EXECUTION PHASE # sets = _computeVariantCombinations(userVariants) for pos, variants in enumerate(sets): print print "----------------------------------------------------------------------------" print " PROCESSING VARIANT SET %s/%s" % (pos+1, len(sets)) print "----------------------------------------------------------------------------" if not quiet and len(variants) > 0: for entry in variants: print " - %s = %s" % (entry["id"], entry["value"]) print "----------------------------------------------------------------------------" # Detect dependencies print ">>> Resolving application dependencies..." includeDict = resolveDependencies(smartInclude, smartExclude, dynLoadDeps, dynRunDeps, variants) # Explicit include/exclude if len(explicitInclude) > 0 or len(explicitExclude) > 0: print ">>> Processing explicitely configured includes/excludes..." for entry in explicitInclude: includeDict[entry] = True for entry in explicitExclude: if includeDict.has_key(entry): del includeDict[entry] # Detect optionals if verbose: optionals = getOptionals(includeDict) if len(optionals) > 0: print ">>> These optional classes may be useful:" for entry in optionals: print " - %s" % entry if apiScript != None: storeApiScript(includeDict, apiScript, dynLoadDeps, dynRunDeps) if buildScript != None: if execMode == "parts": processParts(partClasses, partBits, includeDict, dynLoadDeps, dynRunDeps, variants, collapseParts, optimizeLatency, buildScript, buildProcess) else: sys.stdout.write(">>> Compiling classes:") sys.stdout.flush() packageFileName = buildScript + "_$variants_$process.js" packageSize = storeCompiledPackage(includeDict, packageFileName, dynLoadDeps, dynRunDeps, variants, buildProcess) print " - Done: %s" % packageSize | e3364bd2416dfe75fd85aeea0ded427372ef3d08 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5718/e3364bd2416dfe75fd85aeea0ded427372ef3d08/generator2.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2103,
3651,
13332,
2552,
3318,
2552,
4381,
2552,
3988,
2552,
10902,
282,
468,
468,
12584,
15154,
2689,
15490,
4429,
468,
225,
468,
1659,
2953,
667,
4466,
273,
13024,
809,
2932,
1106,
743,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2103,
3651,
13332,
2552,
3318,
2552,
4381,
2552,
3988,
2552,
10902,
282,
468,
468,
12584,
15154,
2689,
15490,
4429,
468,
225,
468,
1659,
2953,
667,
4466,
273,
13024,
809,
2932,
1106,
743,
... |
deps = tuple(set(deps)) | deps = tuple(sorted(set(deps), key=str)) | def _get_rec_deps(self, callers, attribs = ['source_deps']): """Returns recursive dependencies (libs + bundles). Usefull to get all include path for example. """ if self in callers: cycle = [prj.name for prj in callers[callers.index(self):]] msg = " -> ".join(cycle + [self.name]) raise RacyProjectError(self, ('Cyclic dependency on {prj.name}: ' + msg ) ) db = self.projects_db | f3a6c89f11d506abdf34f3333daaa486c7eff01a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8002/f3a6c89f11d506abdf34f3333daaa486c7eff01a/project.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
67,
3927,
67,
14877,
12,
2890,
16,
19932,
16,
11460,
273,
10228,
3168,
67,
14877,
3546,
4672,
3536,
1356,
5904,
5030,
261,
21571,
397,
11408,
2934,
2672,
2854,
358,
336,
777,
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,
389,
588,
67,
3927,
67,
14877,
12,
2890,
16,
19932,
16,
11460,
273,
10228,
3168,
67,
14877,
3546,
4672,
3536,
1356,
5904,
5030,
261,
21571,
397,
11408,
2934,
2672,
2854,
358,
336,
777,
2... |
sage: hash(repr(SR(3/1))) | sage: hash(repr(SR(3/1))) | def __hash__(self): """ Returns the hash of this symbolic expression. | 626141ba9c3cbca78019d790e9a4dc37c42794e6 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/626141ba9c3cbca78019d790e9a4dc37c42794e6/calculus.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2816,
972,
12,
2890,
4672,
3536,
2860,
326,
1651,
434,
333,
16754,
2652,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2816,
972,
12,
2890,
4672,
3536,
2860,
326,
1651,
434,
333,
16754,
2652,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
name, system_id, public_id, has_internal_subset = value if public_id is None: data.append('<!DOCTYPE %s SYSTEM "%s">' % (name, system_id)) elif system_id is None: data.append('<!DOCTYPE %s PUBLIC "%s">' % (name, public_id)) else: data.append('<!DOCTYPE %s PUBLIC "%s"\n "%s">' % (name, public_id, system_id)) | data.append(value) | def stream_to_str(stream, encoding='UTF-8'): data = [] for event, value, line in stream: if event == TEXT: value = XMLContent.encode(value) data.append(value) elif event == START_ELEMENT: ns_uri, name, attributes = value data.append(get_start_tag(ns_uri, name, attributes)) elif event == END_ELEMENT: ns_uri, name = value data.append(get_end_tag(ns_uri, name)) elif event == COMMENT: data.append('<!--%s-->' % value) elif event == XML_DECL: version, encoding, standalone = value if standalone is None: data.append('<?xml version="%s" encoding="%s"?>' % (version, encoding)) else: data.append( '<?xml version="%s" encoding="%s" standalone="%s"?>' % (version, encoding, standalone)) elif event == DOCUMENT_TYPE: name, system_id, public_id, has_internal_subset = value if public_id is None: data.append('<!DOCTYPE %s SYSTEM "%s">' % (name, system_id)) elif system_id is None: # XXX Special case for HTML (not good XML) data.append('<!DOCTYPE %s PUBLIC "%s">' % (name, public_id)) else: data.append('<!DOCTYPE %s PUBLIC "%s"\n "%s">' % (name, public_id, system_id)) elif event == CDATA: data.append('<![CDATA[%s]]>' % value) else: raise NotImplementedError, 'unknown event "%s"' % event return ''.join(data) | b50a9dc0fa878b767e43f475667b21b0bbade3ed /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12681/b50a9dc0fa878b767e43f475667b21b0bbade3ed/xml.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1407,
67,
869,
67,
701,
12,
3256,
16,
2688,
2218,
5159,
17,
28,
11,
4672,
501,
273,
5378,
364,
871,
16,
460,
16,
980,
316,
1407,
30,
309,
871,
422,
9204,
30,
460,
273,
3167,
1350,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1407,
67,
869,
67,
701,
12,
3256,
16,
2688,
2218,
5159,
17,
28,
11,
4672,
501,
273,
5378,
364,
871,
16,
460,
16,
980,
316,
1407,
30,
309,
871,
422,
9204,
30,
460,
273,
3167,
1350,
... |
if (tokenType == LEFT_BRACKET || tokenType == LEFT_CURLY) { // Pass in s if we need to add each pattern matched into // its varDecls, else pass in compilerContext. | if (tokenType == LEFT_BRACKET or tokenType == LEFT_CURLY) { | * Lets at the def toplevel are just vars, at least in | 58afad4d3cade0a037f53f0a04cb23589df417b1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12949/58afad4d3cade0a037f53f0a04cb23589df417b1/Parser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
380,
511,
2413,
622,
326,
1652,
28999,
854,
2537,
4153,
16,
622,
4520,
316,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
380,
511,
2413,
622,
326,
1652,
28999,
854,
2537,
4153,
16,
622,
4520,
316,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
checkQt() | checkQt (options) | def main(): # Options for qmake DEFINES = "" CONFIG = "" # Setup command line parser parser = OptionParser(version="%prog 0.4") parser.add_option("--dsp", action="store_true", dest="dsp", help="also Generate Visual Studio project files") parser.add_option("--nocolor", action="store_true", dest="nocolor", help="disable color output support on this script") parser.add_option("--python-includes", dest="py_incpath", help="Python include path") parser.add_option("--python-libraries", dest="py_libpath", help="Python library path") parser.add_option("--qt-directory", dest="qt_dir", help="Base directory of Qt") parser.add_option("--static", action="store_true", dest="staticlink", help="Build wokfpack using static libraries") parser.add_option("--enable-debug", action="store_true", dest="enable_debug", help="Enables basic debugging support.") parser.add_option("--enable-aidebug", action="store_true", dest="enable_aidebug", help="Enabled debugging of NPC AI.") parser.add_option("--enable-mysql", action="store_true", dest="enable_mysql", help="Enables MySQL support.") parser.add_option("--enable-translation", action="store_true", dest="enable_translation", help="Enable non-English language support.") (options, args) = parser.parse_args() if options.nocolor or sys.platform == "win32": nocolor() pyIncSearch = True pyLibSearch = True if sys.platform == "darwin": pyLibSearch = False # Neat Header #headerbuffer = " " #sys.stdout.write( " \n" ) #sys.stdout.write( headerbuffer + red( " ) (\_ ") + "\n" ) #sys.stdout.write( headerbuffer + red( " (( _/{ \"-; ") + "\n" ) #sys.stdout.write( headerbuffer + red( " )).-\" {{ ;\"` ") + "\n" ) #sys.stdout.write( "Running Wolfpack Configuration: " ) #sys.stdout.write( red( " ( ( ;._ \\\\ " ) + "\n" ) #sys.stdout.write( headerbuffer + green( "****************\n" ) ) # Check QT Settings checkQt() # Check Python Settings checkPython( options, pyIncSearch, pyLibSearch ) if options.enable_mysql: CONFIG += "mysql " DEFINES += "MYSQL_DRIVER " sys.stdout.write("Checking MySQL Configuration:\n") checkMySQL(options) sys.stdout.write("\n") if not options.enable_translation: DEFINES += "QT_NO_TRANSLATION " # Create config.pri global py_libpath global py_libfile global py_incpath global qt_qmake global mysql_libpath global mysql_libfile global mysql_incpath config = file("config.pri", "w") config.write("# WARNING: This file was automatically generated by configure.py\n") config.write("# any changes to this file will be lost!\n\n") # Build Python LIBS and Includes if sys.platform == "darwin": # MacPython is build as a Framework, not a library :/ PY_LIBDIR = distutils.sysconfig.get_config_vars("LINKFORSHARED")[0] PY_LIBDIR += " -flat_namespace" else: PY_LIBDIR = buildLibLine( py_libpath, py_libfile ) config.write("PY_LIBDIR = %s\n" % PY_LIBDIR) config.write("PY_INCDIR = %s\n" % py_incpath ) # Build MySQL Libs and Includes MySQL_LIBDIR = buildLibLine( mysql_libpath, mysql_libfile ) config.write("MySQL_INCDIR = %s\n" % mysql_incpath ) config.write("MySQL_LIBDIR = %s\n" % MySQL_LIBDIR ) # if --debug if options.enable_debug: DEFINES += "_DEBUG " CONFIG += "debug warn_on " else: CONFIG += "release warn_off " # if --aidebug if options.enable_aidebug: DEFINES += "_AIDEBUG " config.write("DEFINES += %s\n" % DEFINES) config.write("CONFIG += %s\n" % CONFIG) config.write("LIBS += $$PY_LIBDIR $$MySQL_LIBDIR \n") config.write("INCLUDEPATH += $$PY_INCDIR $$MySQL_INCDIR \n") config.close() sys.stdout.write("Generating makefile... ") sys.stdout.flush() os.spawnv(os.P_WAIT, qt_qmake, [qt_qmake, "wolfpack.pro"]) if options.dsp: sys.stdout.write("Generating Visual Studio project files... \n") os.spawnv(os.P_WAIT, qt_qmake, [qt_qmake, "wolfpack.pro", "-t vcapp"]) sys.stdout.write(bold(green("Done\n"))) sys.stdout.write(bold("Configure finished. Please run 'make' now.\n")) sys.stdout.write("To reconfigure, run /usr/bin/gmake confclean and configure.py\n") sys.stdout.write("\n") | 78484cd2a4d87b0d0e002bff43e1f469895e77f6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/78484cd2a4d87b0d0e002bff43e1f469895e77f6/configure.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
468,
5087,
364,
1043,
6540,
25957,
3740,
55,
273,
1408,
9128,
273,
1408,
468,
10939,
1296,
980,
2082,
2082,
273,
18862,
12,
1589,
11613,
14654,
374,
18,
24,
7923,
2082,
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,
2774,
13332,
468,
5087,
364,
1043,
6540,
25957,
3740,
55,
273,
1408,
9128,
273,
1408,
468,
10939,
1296,
980,
2082,
2082,
273,
18862,
12,
1589,
11613,
14654,
374,
18,
24,
7923,
2082,
18,
... |
return self.encoder(u"äää") | return self.encoder(list(values)[0]) | def __getitem__(self, key): values = self.event.attrs.get(key, None) if not values: return self.encoder(u"") return self.encoder(u"äää")#list(values)[0]) | 5abcfb3e44c4dcbfb4d9236e596878c48a9a754f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/14361/5abcfb3e44c4dcbfb4d9236e596878c48a9a754f/templates.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
31571,
972,
12,
2890,
16,
498,
4672,
924,
273,
365,
18,
2575,
18,
7039,
18,
588,
12,
856,
16,
599,
13,
309,
486,
924,
30,
327,
365,
18,
16480,
12,
89,
3660,
13,
327,
365,
18,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
31571,
972,
12,
2890,
16,
498,
4672,
924,
273,
365,
18,
2575,
18,
7039,
18,
588,
12,
856,
16,
599,
13,
309,
486,
924,
30,
327,
365,
18,
16480,
12,
89,
3660,
13,
327,
365,
18,... |
def update_cache(files = [], force = False): | def update_cache(files = None, force = False): | def update_cache(files = [], force = False): """Update the cache information for the given files """ cache_files = __tree_status(files) # everything is up-to-date if len(cache_files) == 0: return False # check for unresolved conflicts if not force and [x for x in cache_files if x[0] not in ['M', 'N', 'A', 'D']]: raise GitException, 'Updating cache failed: unresolved conflicts' # update the cache add_files = [x[1] for x in cache_files if x[0] in ['N', 'A']] rm_files = [x[1] for x in cache_files if x[0] in ['D']] m_files = [x[1] for x in cache_files if x[0] in ['M']] if add_files and __run('git-update-index --add --', add_files) != 0: raise GitException, 'Failed git-update-index --add' if rm_files and __run('git-update-index --force-remove --', rm_files) != 0: raise GitException, 'Failed git-update-index --rm' if m_files and __run('git-update-index --', m_files) != 0: raise GitException, 'Failed git-update-index' return True | 9216b6023d6840c457172b375e14443189f7ef89 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12366/9216b6023d6840c457172b375e14443189f7ef89/git.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
67,
2493,
12,
2354,
273,
599,
16,
2944,
273,
1083,
4672,
3536,
1891,
326,
1247,
1779,
364,
326,
864,
1390,
3536,
1247,
67,
2354,
273,
1001,
3413,
67,
2327,
12,
2354,
13,
225,
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,
1089,
67,
2493,
12,
2354,
273,
599,
16,
2944,
273,
1083,
4672,
3536,
1891,
326,
1247,
1779,
364,
326,
864,
1390,
3536,
1247,
67,
2354,
273,
1001,
3413,
67,
2327,
12,
2354,
13,
225,
468... |
((100-hr_timesheet_invoice_factor.factor)/100)) \ | ((100-hr_timesheet_invoice_factor.factor)/100)),0.0) \ | def _ca_to_invoice_calc(self, cr, uid, ids, name, arg, context={}): res = {} res2 = {} ids2 = self.search(cr, uid, [('parent_id', 'child_of', ids)]) if ids2: # Amount uninvoiced hours to invoice at sale price acc_set = ",".join(map(str, ids2)) cr.execute("""SELECT account_analytic_account.id, \ sum (product_template.list_price * \ account_analytic_line.unit_amount * \ ((100-hr_timesheet_invoice_factor.factor)/100)) \ AS ca_to_invoice \ FROM product_template \ join product_product \ on product_template.id = product_product.product_tmpl_id \ JOIN account_analytic_line \ on account_analytic_line.product_id = product_product.id \ JOIN account_analytic_journal \ on account_analytic_line.journal_id = account_analytic_journal.id \ JOIN account_analytic_account \ on account_analytic_account.id = account_analytic_line.account_id \ JOIN hr_timesheet_invoice_factor \ on hr_timesheet_invoice_factor.id = account_analytic_account.to_invoice \ WHERE account_analytic_account.id IN (%s) \ AND account_analytic_line.invoice_id is null \ AND account_analytic_line.to_invoice IS NOT NULL \ and account_analytic_journal.type in ('purchase','general') \ GROUP BY account_analytic_account.id;"""%acc_set) for account_id, sum in cr.fetchall(): res[account_id] = round(sum,2) | 7bdb0009b6979becdbaa1f5e28e549e35f8b82f9 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/7bdb0009b6979becdbaa1f5e28e549e35f8b82f9/account_analytic_analysis.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
5353,
67,
869,
67,
16119,
67,
12448,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
508,
16,
1501,
16,
819,
12938,
4672,
400,
273,
2618,
400,
22,
273,
2618,
3258,
22,
273,
365,
18,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
5353,
67,
869,
67,
16119,
67,
12448,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
508,
16,
1501,
16,
819,
12938,
4672,
400,
273,
2618,
400,
22,
273,
2618,
3258,
22,
273,
365,
18,... |
console.stdoutln("HTML: Saving %s" % path) | console.stdoutln("HTML: Saving %s" % path) | def write_all_files(self): """Writes analysis details of each TLS group. """ title = "Chain %s Partitioned by %d TLS Groups" % (self.chain_id, self.ntls) path = "%s_CHAIN%s_ANALYSIS.html" % (self.struct_id, self.chain_id) | 80aaf2a14dfcc5b684aad61f8ca72e81b353162c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10674/80aaf2a14dfcc5b684aad61f8ca72e81b353162c/html.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
67,
454,
67,
2354,
12,
2890,
4672,
3536,
8368,
6285,
3189,
434,
1517,
8098,
1041,
18,
3536,
2077,
273,
315,
3893,
738,
87,
12598,
329,
635,
738,
72,
8098,
14712,
6,
738,
261,
289... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
67,
454,
67,
2354,
12,
2890,
4672,
3536,
8368,
6285,
3189,
434,
1517,
8098,
1041,
18,
3536,
2077,
273,
315,
3893,
738,
87,
12598,
329,
635,
738,
72,
8098,
14712,
6,
738,
261,
289... |
def __init__(self, queue): | def __init__(self, queue, render): | def __init__(self, queue): threading.Thread.__init__(self) self.queue = queue | 0b588b6558655c350e5625a4b6113395b7461e97 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10805/0b588b6558655c350e5625a4b6113395b7461e97/gtkhtml_demo.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
2389,
16,
1743,
4672,
17254,
18,
3830,
16186,
2738,
972,
12,
2890,
13,
365,
18,
4000,
273,
2389,
225,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
2389,
16,
1743,
4672,
17254,
18,
3830,
16186,
2738,
972,
12,
2890,
13,
365,
18,
4000,
273,
2389,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Example: | Example:: | def XrefsTo(ea, flags=0): """ Return all references to address 'ea' @param ea: Reference address @param flags: any of idaapi.XREF_* flags Example: for xref in XrefsTo(here(), 0): print xref.type, XrefTypeName(xref.type), \ 'from', hex(xref.frm), 'to', hex(xref.to) """ xref = idaapi.xrefblk_t() if xref.first_to(ea, flags): yield _copy_xref(xref) while xref.next_to(): yield _copy_xref(xref) | e51eb69e3a7021de0aac2cd4c19107a57c80c4da /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4773/e51eb69e3a7021de0aac2cd4c19107a57c80c4da/idautils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1139,
9316,
774,
12,
24852,
16,
2943,
33,
20,
4672,
3536,
2000,
777,
5351,
358,
1758,
296,
24852,
11,
225,
632,
891,
24164,
30,
6268,
1758,
632,
891,
2943,
30,
1281,
434,
612,
69,
2425... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1139,
9316,
774,
12,
24852,
16,
2943,
33,
20,
4672,
3536,
2000,
777,
5351,
358,
1758,
296,
24852,
11,
225,
632,
891,
24164,
30,
6268,
1758,
632,
891,
2943,
30,
1281,
434,
612,
69,
2425... |
class SongList(Collection): fields = ( db_audiostore.remus_audio_objects_au_id, ) order_by = ( db_audiostore.remus_albums_alb_name, db_audiostore.remus_audio_objects_au_track_number, ) def __init__(self, parent): super(SongList, self).__init__(parent) def name(self): return "songlist" | def name(self): return "--".join(self.songtuple) | 94ef7893d5420c833293379b7ff14f3df7e583b2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2515/94ef7893d5420c833293379b7ff14f3df7e583b2/as_collection.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
508,
12,
2890,
4672,
327,
5238,
9654,
5701,
12,
2890,
18,
816,
4521,
2268,
13,
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... | [
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
508,
12,
2890,
4672,
327,
5238,
9654,
5701,
12,
2890,
18,
816,
4521,
2268,
13,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... | |
if not raw and code[q-1] == '\\': | if code[q-1] == '\\': | def strip_string_literals(code, state=None): r""" Returns a string with all literal quotes replaced with labels and a dict of labels for re-subsitution. This makes parsing much easier. EXAMPLES: sage: from sage.misc.preparser import strip_string_literals sage: s, literals, state = strip_string_literals(r'''['a', "b", 'c', "d\""]''') sage: s '[%(L1)s, %(L2)s, %(L3)s, %(L4)s]' sage: literals {'L4': '"d\\""', 'L2': '"b"', 'L3': "'c'", 'L1': "'a'"} sage: print s % literals ['a', "b", 'c', "d\""] sage: print strip_string_literals(r'-"\\\""-"\\"-')[0] -%(L1)s-%(L2)s- Triple-quotes are handled as well. sage: s, literals, state = strip_string_literals("[a, '''b''', c, '']") sage: s '[a, %(L1)s, c, %(L2)s]' sage: print s % literals [a, '''b''', c, ''] Comments are subsituted too: sage: s, literals, state = strip_string_literals("code '#' # ccc 't'"); s 'code %(L1)s #%(L2)s' sage: s % literals "code '#' # ccc 't'" A state is returned so one can break strings across multiple calls to this function: sage: s, literals, state = strip_string_literals('s = "some'); s 's = %(L1)s' sage: s, literals, state = strip_string_literals('thing" * 5', state); s '%(L1)s * 5' """ new_code = [] literals = {} counter = 0 start = q = 0 if state is None: in_quote = False raw = False else: in_quote, raw = state while True: sig_q = code.find("'", q) dbl_q = code.find('"', q) hash_q = code.find('#', q) q = min(sig_q, dbl_q) if q == -1: q = max(sig_q, dbl_q) if not in_quote and hash_q != -1 and (q == -1 or hash_q < q): # it's a comment newline = code.find('\n', hash_q) if newline == -1: newline = len(code) counter += 1 label = "L%s" % counter literals[label] = code[hash_q+1:newline] new_code.append(code[start:hash_q].replace('%','%%')) new_code.append("#%%(%s)s" % label) start = q = newline elif q == -1: if in_quote: counter += 1 label = "L%s" % counter literals[label] = code[start:] new_code.append("%%(%s)s" % label) else: new_code.append(code[start:].replace('%','%%')) break elif in_quote: if not raw and code[q-1] == '\\': k = 2 while code[q-k] == '\\': k += 1 if k % 2 == 0: q += 1 if code[q:q+len(in_quote)] == in_quote: counter += 1 label = "L%s" % counter literals[label] = code[start:q+len(in_quote)] new_code.append("%%(%s)s" % label) q += len(in_quote) start = q in_quote = False else: q += 1 else: raw = q>0 and code[q-1] in 'rR' if len(code) >= q+3 and (code[q+1] == code[q] == code[q+2]): in_quote = code[q]*3 else: in_quote = code[q] new_code.append(code[start:q].replace('%', '%%')) start = q q += len(in_quote) return "".join(new_code), literals, (in_quote, raw) | 4c126d261314d7f192093d4142f8479a23988a69 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/4c126d261314d7f192093d4142f8479a23988a69/preparser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2569,
67,
1080,
67,
80,
11235,
12,
710,
16,
919,
33,
7036,
4672,
436,
8395,
2860,
279,
533,
598,
777,
7158,
10681,
8089,
598,
3249,
471,
279,
2065,
434,
3249,
364,
283,
17,
22284,
305,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2569,
67,
1080,
67,
80,
11235,
12,
710,
16,
919,
33,
7036,
4672,
436,
8395,
2860,
279,
533,
598,
777,
7158,
10681,
8089,
598,
3249,
471,
279,
2065,
434,
3249,
364,
283,
17,
22284,
305,... |
x.filterdown() | x.filterdowngrid() | def filterdowngrid(self): ''' To filter grid details downwards to subcomponents ''' for x in self.components.all(): x.grid_id=self.grid_id if x.components: x.filterdown() x.save() | bbd2faac6e5e79a92a53ff2abf759ee26ffca539 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7019/bbd2faac6e5e79a92a53ff2abf759ee26ffca539/models.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1034,
2378,
5222,
12,
2890,
4672,
9163,
2974,
1034,
3068,
3189,
2588,
6397,
358,
720,
8119,
9163,
364,
619,
316,
365,
18,
8119,
18,
454,
13332,
619,
18,
5222,
67,
350,
33,
2890,
18,
52... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1034,
2378,
5222,
12,
2890,
4672,
9163,
2974,
1034,
3068,
3189,
2588,
6397,
358,
720,
8119,
9163,
364,
619,
316,
365,
18,
8119,
18,
454,
13332,
619,
18,
5222,
67,
350,
33,
2890,
18,
52... |
""" | """ | def fl_create_roundbutton(type, x, y, w, h, label): """ fl_create_roundbutton(type, x, y, w, h, label) -> object """ retval = _fl_create_roundbutton(type, x, y, w, h, label) return retval | 9942dac8ce2b35a1e43615a26fd8e7054ef805d3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2429/9942dac8ce2b35a1e43615a26fd8e7054ef805d3/xformslib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1183,
67,
2640,
67,
2260,
5391,
12,
723,
16,
619,
16,
677,
16,
341,
16,
366,
16,
1433,
4672,
3536,
1183,
67,
2640,
67,
2260,
5391,
12,
723,
16,
619,
16,
677,
16,
341,
16,
366,
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,
1183,
67,
2640,
67,
2260,
5391,
12,
723,
16,
619,
16,
677,
16,
341,
16,
366,
16,
1433,
4672,
3536,
1183,
67,
2640,
67,
2260,
5391,
12,
723,
16,
619,
16,
677,
16,
341,
16,
366,
16,
... |
package_dir = {idlelib:'.'}, | package_dir = {idlelib: package_dir}, | def _bytecode_filenames(self, files): files = [n for n in files if n.endswith('.py')] return install_lib._bytecode_filenames(self,files) | a3c4ce3d80ef72974f6f47d101fc7671bea4c55b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/a3c4ce3d80ef72974f6f47d101fc7671bea4c55b/setup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1637,
16651,
67,
19875,
12,
2890,
16,
1390,
4672,
1390,
273,
306,
82,
364,
290,
316,
1390,
309,
290,
18,
5839,
1918,
2668,
18,
2074,
6134,
65,
327,
3799,
67,
2941,
6315,
1637,
166... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1637,
16651,
67,
19875,
12,
2890,
16,
1390,
4672,
1390,
273,
306,
82,
364,
290,
316,
1390,
309,
290,
18,
5839,
1918,
2668,
18,
2074,
6134,
65,
327,
3799,
67,
2941,
6315,
1637,
166... |
def ReadWarnfile(filename, sa): | def readWarnfile(filename, sa): | def ReadWarnfile(filename, sa): import warnfile reader = warnfile.WarnfileReader(filename) # we won't use removeHints hints = reader.getHints()[0] for pagename in hints.iterkeys(): pl = wikipedia.Page(wikipedia.getSite(), pagename) # The WarnfileReader gives us a list of pagelinks, but titletranslate.py expects a list of strings, so we convert it back. # TODO: This is a quite ugly hack, in the future we should maybe make titletranslate expect a list of pagelinks. hintStrings = [] for hint in hints[pagename]: #lang = hintStrings.append('%s:%s' % (hint.site().language(), hint.linkname())) sa.add(pl, hints = hintStrings) | 751270d193b1da9c6a74d55a37cb042040bf1e63 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4404/751270d193b1da9c6a74d55a37cb042040bf1e63/interwiki.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
3160,
768,
12,
3459,
16,
7864,
4672,
1930,
1894,
768,
2949,
273,
1894,
768,
18,
3160,
768,
2514,
12,
3459,
13,
468,
732,
8462,
1404,
999,
1206,
13368,
13442,
273,
2949,
18,
588,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
3160,
768,
12,
3459,
16,
7864,
4672,
1930,
1894,
768,
2949,
273,
1894,
768,
18,
3160,
768,
2514,
12,
3459,
13,
468,
732,
8462,
1404,
999,
1206,
13368,
13442,
273,
2949,
18,
588,
1... |
def catalyse(self, dna,linear=True) : """RE.catalyse(dna) -> tuple of DNA. | def catalyse(self, dna, linear=True) : """RE.catalyse(dna, linear=True) -> tuple of DNA. RE.catalyze(dna, linear=True) -> tuple of DNA. | def catalyse(self, dna,linear=True) : """RE.catalyse(dna) -> tuple of DNA. | 512a51d75f45fc23887dc67bb266c4f8cc3f48c8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7167/512a51d75f45fc23887dc67bb266c4f8cc3f48c8/Restriction.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
276,
3145,
93,
307,
12,
2890,
16,
31702,
16,
12379,
33,
5510,
13,
294,
3536,
862,
18,
2574,
3450,
307,
12,
5176,
69,
13,
317,
3193,
434,
463,
11277,
18,
2,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
276,
3145,
93,
307,
12,
2890,
16,
31702,
16,
12379,
33,
5510,
13,
294,
3536,
862,
18,
2574,
3450,
307,
12,
5176,
69,
13,
317,
3193,
434,
463,
11277,
18,
2,
-100,
-100,
-100,
-100,
-1... |
result = self._decoded_text | def read(self, n=None): if n is None: n = -1 decoder = self._decoder or self._get_decoder() result = self._decoded_text if n < 0: result += decoder.decode(self.buffer.read(), True) self._decoded_text = "" self._snapshot = None return result else: while len(result) < n: input_chunk, decoded = self._read_chunk() result += decoded if not input_chunk: break self._decoded_text = result[n:] return result[:n] | 2e00b1ed3eaf2ada4c0cb16b188516bd10ad5f0c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8125/2e00b1ed3eaf2ada4c0cb16b188516bd10ad5f0c/io.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
12,
2890,
16,
290,
33,
7036,
4672,
309,
290,
353,
599,
30,
290,
273,
300,
21,
8320,
273,
365,
6315,
21070,
578,
365,
6315,
588,
67,
21070,
1435,
309,
290,
411,
374,
30,
563,
101... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
12,
2890,
16,
290,
33,
7036,
4672,
309,
290,
353,
599,
30,
290,
273,
300,
21,
8320,
273,
365,
6315,
21070,
578,
365,
6315,
588,
67,
21070,
1435,
309,
290,
411,
374,
30,
563,
101... | |
except Exception,e: | except sre_constants.error,e: | def __init__( self, quoteChar, escChar=None, escQuote=None, multiline=False, unquoteResults=True, endQuoteChar=None): """ Defined with the following parameters: - quoteChar - string of one or more characters defining the quote delimiting string - escChar - character to escape quotes, typically backslash (default=None) - escQuote - special quote sequence to escape an embedded quote string (such as SQL's "" to escape an embedded ") (default=None) - multiline - boolean indicating whether quotes can span multiple lines (default=False) - unquoteResults - boolean indicating whether the matched text should be unquoted (default=True) - endQuoteChar - string of one or more characters defining the end of the quote delimited string (default=None => same as quoteChar) """ super(QuotedString,self).__init__() # remove white space from quote chars - wont work anyway quoteChar = quoteChar.strip() if len(quoteChar) == 0: warnings.warn("quoteChar cannot be the empty string",SyntaxWarning,stacklevel=2) raise SyntaxError() if endQuoteChar is None: endQuoteChar = quoteChar else: endQuoteChar = endQuoteChar.strip() if len(endQuoteChar) == 0: warnings.warn("endQuoteChar cannot be the empty string",SyntaxWarning,stacklevel=2) raise SyntaxError() self.quoteChar = quoteChar self.quoteCharLen = len(quoteChar) self.firstQuoteChar = quoteChar[0] self.endQuoteChar = endQuoteChar self.endQuoteCharLen = len(endQuoteChar) self.escChar = escChar self.escQuote = escQuote self.unquoteResults = unquoteResults if multiline: self.flags = re.MULTILINE | re.DOTALL self.pattern = r'%s([^%s%s]' % \ ( re.escape(self.quoteChar), _escapeRegexRangeChars(self.endQuoteChar[0]), (escChar is not None and _escapeRegexRangeChars(escChar) or '') ) else: self.flags = 0 self.pattern = r'%s([^%s\n\r%s]' % \ ( re.escape(self.quoteChar), _escapeRegexRangeChars(self.endQuoteChar[0]), (escChar is not None and _escapeRegexRangeChars(escChar) or '') ) if len(self.endQuoteChar) > 1: self.pattern += ( '|(' + ')|('.join(["%s[^%s]" % (re.escape(self.endQuoteChar[:i]), _escapeRegexRangeChars(self.endQuoteChar[i])) for i in range(len(self.endQuoteChar)-1,0,-1)]) + ')' ) if escQuote: self.pattern += (r'|(%s)' % re.escape(escQuote)) if escChar: self.pattern += (r'|(%s.)' % re.escape(escChar)) self.escCharReplacePattern = re.escape(self.escChar)+"(.)" self.pattern += (r')*%s' % re.escape(self.endQuoteChar)) try: self.re = re.compile(self.pattern, self.flags) self.reString = self.pattern except Exception,e: warnings.warn("invalid pattern (%s) passed to Regex" % self.pattern, SyntaxWarning, stacklevel=2) raise | 3e4524be972baf4cdf6bf31384101eaa0a8d06b9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12364/3e4524be972baf4cdf6bf31384101eaa0a8d06b9/pyparsing.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
365,
16,
3862,
2156,
16,
2904,
2156,
33,
7036,
16,
2904,
10257,
33,
7036,
16,
19431,
33,
8381,
16,
25611,
3447,
33,
5510,
16,
679,
10257,
2156,
33,
7036,
4672,
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,
1001,
2738,
972,
12,
365,
16,
3862,
2156,
16,
2904,
2156,
33,
7036,
16,
2904,
10257,
33,
7036,
16,
19431,
33,
8381,
16,
25611,
3447,
33,
5510,
16,
679,
10257,
2156,
33,
7036,
4672,
353... |
if not srcdir: env.Dir('$OBJ_DIR').addRepository(env.Dir('$CHROME_SRC_DIR')) | env.Dir('$OBJ_DIR').addRepository(env.Dir('$CHROME_SRC_DIR')) | def GenerateSConscript(output_filename, spec, build_file): """ Generates a SConscript file for a specific target. This generates a SConscript file suitable for building any or all of the target's configurations. A SConscript file may be called multiple times to generate targets for multiple configurations. Consequently, it needs to be ready to build the target for any requested configuration, and therefore contains information about the settings for all configurations (generated into the SConscript file at gyp configuration time) as well as logic for selecting (at SCons build time) the specific configuration being built. The general outline of a generated SConscript file is: -- Header -- Import 'env'. This contains a $CONFIG_NAME construction variable that specifies what configuration to build (e.g. Debug, Release). -- Configurations. This is a dictionary with settings for the different configurations (Debug, Release) under which this target can be built. The values in the dictionary are themselves dictionaries specifying what construction variables should added to the local copy of the imported construction environment (Append), should be removed (FilterOut), and should outright replace the imported values (Replace). -- Clone the imported construction environment and update with the proper configuration settings. -- Initialize the lists of the targets' input files and prerequisites. -- Target-specific actions and rules. These come after the input file and prerequisite initializations because the outputs of the actions and rules may affect the input file list (process_outputs_as_sources) and get added to the list of prerequisites (so that they're guaranteed to be executed before building the target). -- Call the Builder for the target itself. -- Arrange for any copies to be made into installation directories. -- Set up the gyp_target_{name} Alias (phony Node) for the target as the primary handle for building all of the target's pieces. -- Use env.Require() to make sure the prerequisites (explicitly specified, but also including the actions and rules) are built before the target itself. -- Return the gyp_target_{name} Alias to the calling SConstruct file so it can be added to the list of default targets. """ gyp_dir = os.path.split(output_filename)[0] if not gyp_dir: gyp_dir = '.' gyp_dir = os.path.abspath(gyp_dir) component_name = os.path.splitext(os.path.basename(build_file))[0] target_name = spec['target_name'] fp = open(output_filename, 'w') fp.write(header) fp.write('\nImport("env")\n') # fp.write('\n') fp.write('configurations = {\n') for config_name, config in spec['configurations'].iteritems(): fp.write(' \'%s\' : {\n' % config_name) fp.write(' \'Append\' : dict(\n') GenerateConfig(fp, spec, config, ' '*12) fp.write(' ),\n') fp.write(' \'FilterOut\' : dict(\n' ) for key, var in config.get('scons_remove', {}).iteritems(): fp.write(' %s = %s,\n' % (key, repr(var))) fp.write(' ),\n') fp.write(' \'Replace\' : dict(\n' ) scons_settings = config.get('scons_settings', {}) for key in sorted(scons_settings.keys()): val = pprint.pformat(scons_settings[key]) fp.write(' %s = %s,\n' % (key, val)) if 'c++' in spec.get('link_languages', []): fp.write(' %s = %s,\n' % ('LINK', repr('$CXX'))) fp.write(' ),\n') fp.write(' },\n') fp.write('}\n') # fp.write('\n') fp.write('env = env.Clone(COMPONENT_NAME=%s,\n' % repr(component_name)) fp.write(' TARGET_NAME=%s)\n' % repr(target_name)) fp.write('\n') fp.write('config = configurations[env[\'CONFIG_NAME\']]\n') fp.write('env.Append(**config[\'Append\'])\n') fp.write('env.FilterOut(**config[\'FilterOut\'])\n') fp.write('env.Replace(**config[\'Replace\'])\n') # sources = spec.get('sources') if sources: pre = '\ninput_files = ChromeFileList([\n ' WriteList(fp, map(repr, sources), preamble=pre, postamble=',\n])\n') else: fp.write('\ninput_files = []\n') fp.write('\n') fp.write('target_files = []\n') prerequisites = spec.get('scons_prerequisites', []) fp.write('prerequisites = %s\n' % pprint.pformat(prerequisites)) actions = spec.get('actions', []) for action in actions: a = ['cd', gyp_dir, '&&'] + action['action'] message = action.get('message') if message: message = repr(message) fp.write(_command_template % { 'inputs' : pprint.pformat(action.get('inputs', [])), 'outputs' : pprint.pformat(action.get('outputs', [])), 'action' : pprint.pformat(a), 'message' : message, }) if action.get('process_outputs_as_sources'): fp.write('input_files.extend(_outputs)\n') fp.write('prerequisites.extend(_outputs)\n') rules = spec.get('rules', []) for rule in rules: name = rule['rule_name'] a = ['cd', gyp_dir, '&&'] + rule['action'] message = rule.get('message') if message: message = repr(message) fp.write(_rule_template % { 'inputs' : pprint.pformat(rule.get('inputs', [])), 'outputs' : pprint.pformat(rule.get('outputs', [])), 'action' : pprint.pformat(a), 'extension' : rule['extension'], 'name' : name, 'message' : message, }) if rule.get('process_outputs_as_sources'): fp.write(' input_files.Replace(%s_file, _outputs)\n' % name) fp.write('prerequisites.extend(_outputs)\n') SConsTypeWriter[spec.get('type')](fp, spec) copies = spec.get('copies', []) for copy in copies: destdir = copy['destination'] files = copy['files'] fmt = '\n_outputs = env.Install(%s,\n %s\n)\n' fp.write(fmt % (repr(destdir), pprint.pformat(files))) fp.write('prerequisites.extend(_outputs)\n') fmt = "\ngyp_target = env.Alias('gyp_target_%s', target_files)\n" fp.write(fmt % target_name) dependencies = spec.get('scons_dependencies', []) if dependencies: WriteList(fp, dependencies, preamble='env.Requires(gyp_target, [\n ', postamble='\n])\n') fp.write('env.Requires(gyp_target, prerequisites)\n') fp.write('Return("gyp_target")\n') fp.close() | d5e348af99a107d50b8232ecf9ef17caa46ba00d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6220/d5e348af99a107d50b8232ecf9ef17caa46ba00d/scons.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6654,
55,
442,
4263,
12,
2844,
67,
3459,
16,
857,
16,
1361,
67,
768,
4672,
3536,
31902,
279,
348,
442,
4263,
585,
364,
279,
2923,
1018,
18,
225,
1220,
6026,
279,
348,
442,
4263,
585,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
55,
442,
4263,
12,
2844,
67,
3459,
16,
857,
16,
1361,
67,
768,
4672,
3536,
31902,
279,
348,
442,
4263,
585,
364,
279,
2923,
1018,
18,
225,
1220,
6026,
279,
348,
442,
4263,
585,
... |
fs = 2 | fs = 16 | def plot(arg, inp, out, meta): """Read data from `inp` and create a plot of the stations specified in the list `arg`. Plot is written to `out`. Metadata (station name, location) is takem from the `meta` file (usually v2.inv). """ import struct BAD = -9999 table = asdict(arg, inp) if meta: meta = get_meta(table, meta) title = [] for id11,d in meta.items(): title.append('%s %+06.2f%+07.2f %s' % (id11, d['lat'], d['lon'], d['name'])) title = '\n'.join(title) minyear = 9999 maxyear = -9999 highest = -9999 lowest = 9999 for _,lines in table.items(): for row in lines: year = int(row[12:16]) minyear = min(minyear, year) maxyear = max(maxyear, year) data = struct.unpack('5s'*12, row[16:-1]) for datum in map(int, data): if datum == BAD: continue highest = max(highest, datum) lowest = min(lowest, datum) if highest == -9999: raise Error('No data found for %s' % (', '.join(table))) # The data should be such that a station cannot have entirely # invalid data. At least one year should have at least one valid # datum. assert highest > -9999 assert lowest < 9999 highest /= 10.0 lowest /= 10.0 limyear = maxyear + 1 # Bounds of the box that displays data. In SVG viewBox format. databox = (minyear, lowest, limyear-minyear, highest-lowest) plotwidth = databox[2] plotheight = databox[3] out.write("""<svg width='1000px' height='750px' viewBox='0 0 %d %d' xmlns="http://www.w3.org/2000/svg" version="1.1">\n""" % (plotwidth+12, plotheight+20)) # Style out.write("""<defs> <style type="text/css"> path { stroke-width: 0.1; fill: none } path.singleton { stroke-width: 0.2; stroke-linecap: round } g#axes path { stroke-width:0.1; fill:none; stroke: #888 } g#axes text { fill: black; font-family: Verdana } g#title text { fill: black; font-family: Verdana } | 56f4bc366ef894f5205cbf82b6b8d1525a03fba4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6890/56f4bc366ef894f5205cbf82b6b8d1525a03fba4/stationplot.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3207,
12,
3175,
16,
12789,
16,
596,
16,
2191,
4672,
3536,
1994,
501,
628,
1375,
31647,
68,
471,
752,
279,
3207,
434,
326,
29719,
1269,
316,
326,
666,
1375,
3175,
8338,
225,
15211,
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,
3207,
12,
3175,
16,
12789,
16,
596,
16,
2191,
4672,
3536,
1994,
501,
628,
1375,
31647,
68,
471,
752,
279,
3207,
434,
326,
29719,
1269,
316,
326,
666,
1375,
3175,
8338,
225,
15211,
353,
... |
return 1 | def handle_consolidated_field(self, body, tagname): """ Attempt to handle a consolidated :Parameters: section, which should contain a single list. Any standard format for it?? """ # Check that it contains a bulleted list. if len(body) != 1 or body[0].tagname != 'bullet_list': print 'a' return 0 | 9bb834811b14945b262cba20f7d0a66312ef45ee /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11420/9bb834811b14945b262cba20f7d0a66312ef45ee/restructuredtext.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
67,
8559,
7953,
690,
67,
1518,
12,
2890,
16,
1417,
16,
25586,
4672,
3536,
12864,
358,
1640,
279,
21785,
690,
294,
2402,
30,
2442,
16,
1492,
1410,
912,
279,
2202,
666,
18,
225,
55... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
67,
8559,
7953,
690,
67,
1518,
12,
2890,
16,
1417,
16,
25586,
4672,
3536,
12864,
358,
1640,
279,
21785,
690,
294,
2402,
30,
2442,
16,
1492,
1410,
912,
279,
2202,
666,
18,
225,
55... | |
def atimes_runner(self, command): | def atimes_runner(self, *args): | def _age_atimes(self, filetimes, age): """ Age files' atimes to be at least age old. Only adjust if the given filetimes dict says it isn't that old, and return a new dict of filetimes with the ages adjusted. """ adjusted = {} now = time.time() for filename, entry in filetimes.iteritems(): if now - entry[0] < age: entry = entry[0] - age, entry[1] st = self._utime(filename, entry[0], entry[1]) adjusted[filename] = entry return adjusted | de8ed355fef3c5fd7a14c435783f5e59145a2f2b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7381/de8ed355fef3c5fd7a14c435783f5e59145a2f2b/fabricate.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
410,
67,
270,
4485,
12,
2890,
16,
661,
10869,
16,
9388,
4672,
3536,
432,
908,
1390,
11,
622,
4485,
358,
506,
622,
4520,
9388,
1592,
18,
5098,
5765,
309,
326,
864,
661,
10869,
2065... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
410,
67,
270,
4485,
12,
2890,
16,
661,
10869,
16,
9388,
4672,
3536,
432,
908,
1390,
11,
622,
4485,
358,
506,
622,
4520,
9388,
1592,
18,
5098,
5765,
309,
326,
864,
661,
10869,
2065... |
self.engine.log_level = settings.logging.pjsip_level if (self.logger.pjsip_to_stdout or settings.logging.trace_pjsip) else 0 | self.engine._obj.log_level = settings.logging.pjsip_level if (self.logger.pjsip_to_stdout or settings.logging.trace_pjsip) else 0 | def cmd_trace(self, *args): """:trace sip|pjsip|notifications \t Toggle the debug messages of given category""" if not args: raise UserCommandError('Please provide an argument\n%s' % self.cmd_trace.__doc__) args = [complete_word(x, ['sip', 'pjsip', 'msrp', 'notifications']) for x in args] for arg in args: if arg == 'sip': self.logger.sip_to_stdout = not self.logger.sip_to_stdout settings = SIPSimpleSettings() self.engine.trace_sip = self.logger.sip_to_stdout or settings.logging.trace_sip print "SIP tracing to console is now %s" % ("activated" if self.logger.sip_to_stdout else "deactivated") elif arg == 'pjsip': self.logger.pjsip_to_stdout = not self.logger.pjsip_to_stdout settings = SIPSimpleSettings() self.engine.log_level = settings.logging.pjsip_level if (self.logger.pjsip_to_stdout or settings.logging.trace_pjsip) else 0 print "PJSIP tracing to console is now %s" % ("activated, log level=%s" % self.engine.log_level if self.logger.pjsip_to_stdout else "deactivated") elif arg == 'notifications': logstate.EngineTracer().toggle() print "Notifications tracing to console is now %s" % ("activated" if logstate.EngineTracer().started() else "deactivated") | 2ccb54291cdc229fb74ddab2c4ef63e38f741c0f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5703/2ccb54291cdc229fb74ddab2c4ef63e38f741c0f/sip_session.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1797,
67,
5129,
12,
2890,
16,
380,
1968,
4672,
3536,
30,
5129,
10341,
96,
84,
2924,
625,
96,
15286,
521,
88,
399,
9891,
326,
1198,
2743,
434,
864,
3150,
8395,
309,
486,
833,
30,
1002,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5129,
12,
2890,
16,
380,
1968,
4672,
3536,
30,
5129,
10341,
96,
84,
2924,
625,
96,
15286,
521,
88,
399,
9891,
326,
1198,
2743,
434,
864,
3150,
8395,
309,
486,
833,
30,
1002,
... |
print "Truncated server response, will try later..." self.locked = False return | try: status = lines[0] except: print "Truncated server response, will try later..." self.locked = False return interval = None | def submit_song_helper(self, old = False): if self.already_submitted == True or self.broken == True: return | 5b94557f563f23e69b10109f319e52ad38bc4aa0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4764/5b94557f563f23e69b10109f319e52ad38bc4aa0/qlscrobbler.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4879,
67,
816,
75,
67,
4759,
12,
2890,
16,
1592,
273,
1083,
4672,
309,
365,
18,
17583,
67,
31575,
422,
1053,
578,
365,
18,
70,
19906,
422,
1053,
30,
327,
2,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4879,
67,
816,
75,
67,
4759,
12,
2890,
16,
1592,
273,
1083,
4672,
309,
365,
18,
17583,
67,
31575,
422,
1053,
578,
365,
18,
70,
19906,
422,
1053,
30,
327,
2,
-100,
-100,
-100,
-100,
-... |
version, msgcount, masteridx, transidx = unpack('<4i', buf[4:20]) ii = '<ii' | version, msgcount, masteridx, transidx = unpack('<4I', buf[4:20]) ii = '<II' | def _parse(self, fp): """Override this method to support alternative .mo formats.""" # We need to & all 32 bit unsigned integers with 0xffffffff for # portability to 64 bit machines. MASK = 0xffffffff unpack = struct.unpack filename = getattr(fp, 'name', '') # Parse the .mo file header, which consists of 5 little endian 32 # bit words. self._catalog = catalog = {} buf = fp.read() buflen = len(buf) # Are we big endian or little endian? magic = unpack('<i', buf[:4])[0] & MASK if magic == self.LE_MAGIC: version, msgcount, masteridx, transidx = unpack('<4i', buf[4:20]) ii = '<ii' elif magic == self.BE_MAGIC: version, msgcount, masteridx, transidx = unpack('>4i', buf[4:20]) ii = '>ii' else: raise IOError(0, 'Bad magic number', filename) # more unsigned ints msgcount &= MASK masteridx &= MASK transidx &= MASK # Now put all messages from the .mo file buffer into the catalog # dictionary. for i in xrange(0, msgcount): mlen, moff = unpack(ii, buf[masteridx:masteridx+8]) moff &= MASK mend = moff + (mlen & MASK) tlen, toff = unpack(ii, buf[transidx:transidx+8]) toff &= MASK tend = toff + (tlen & MASK) if mend < buflen and tend < buflen: tmsg = buf[toff:tend] catalog[buf[moff:mend]] = tmsg else: raise IOError(0, 'File is corrupt', filename) # See if we're looking at GNU .mo conventions for metadata if mlen == 0 and tmsg.lower().startswith('project-id-version:'): # Catalog description for item in tmsg.split('\n'): item = item.strip() if not item: continue k, v = item.split(':', 1) k = k.strip().lower() v = v.strip() self._info[k] = v if k == 'content-type': self._charset = v.split('charset=')[1] # advance to next entry in the seek tables masteridx += 8 transidx += 8 | 6627c4faaeb7c84f8e47c11f191c9656045912af /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/6627c4faaeb7c84f8e47c11f191c9656045912af/gettext.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2670,
12,
2890,
16,
4253,
4672,
3536,
6618,
333,
707,
358,
2865,
10355,
263,
8683,
6449,
12123,
468,
1660,
1608,
358,
473,
777,
3847,
2831,
9088,
12321,
598,
374,
28857,
364,
468,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2670,
12,
2890,
16,
4253,
4672,
3536,
6618,
333,
707,
358,
2865,
10355,
263,
8683,
6449,
12123,
468,
1660,
1608,
358,
473,
777,
3847,
2831,
9088,
12321,
598,
374,
28857,
364,
468,
1... |
print 'Now run make to build the target:', target | if odir: print 'Now run make in', odir, print 'to build the target:', base_target else: print 'Now run make to build the target:', base_target | def main(): # overridable context prefix = PREFIX # settable with -p option exec_prefix = None # settable with -P option extensions = [] path = sys.path # output files frozen_c = 'frozen.c' config_c = 'config.c' target = 'a.out' # normally derived from script name makefile = 'Makefile' # parse command line try: opts, args = getopt.getopt(sys.argv[1:], 'e:p:P:') except getopt.error, msg: usage('getopt error: ' + str(msg)) # proces option arguments for o, a in opts: if o == '-e': extensions.append(a) if o == '-p': prefix = a if o == '-P': exec_prefix = a # default exec_prefix if exec_prefix is None: exec_prefix = EXEC_PREFIX if exec_prefix is None: exec_prefix = prefix # locations derived from options binlib = os.path.join(exec_prefix, 'lib/python1.4/config') incldir = os.path.join(prefix, 'include/python1.4') config_c_in = os.path.join(binlib, 'config.c.in') frozenmain_c = os.path.join(binlib, 'frozenmain.c') getpath_c = os.path.join(binlib, 'getpath.c') supp_sources = [frozenmain_c, getpath_c] makefile_in = os.path.join(binlib, 'Makefile') defines = ['-DPYTHONPATH=\\"$(PYTHONPATH)\\"'] includes = ['-I' + incldir, '-I' + binlib] # sanity check of directories and files for dir in [prefix, exec_prefix, binlib, incldir] + extensions: if not os.path.exists(dir): usage('needed directory %s not found' % dir) if not os.path.isdir(dir): usage('%s: not a directory' % dir) for file in [config_c_in, makefile_in] + supp_sources: if not os.path.exists(file): usage('needed file %s not found' % file) if not os.path.isfile(file): usage('%s: not a plain file' % file) for dir in extensions: setup = os.path.join(dir, 'Setup') if not os.path.exists(setup): usage('needed file %s not found' % setup) if not os.path.isfile(setup): usage('%s: not a plain file' % setup) # check that enough arguments are passed if not args: usage('at least one filename argument required') # check that the script name ends in ".py" if args[0][-3:] != ".py": usage('the script name must have a .py suffix') # check that file arguments exist for arg in args: if not os.path.exists(arg): usage('argument %s not found' % arg) if not os.path.isfile(arg): usage('%s: not a plain file' % arg) # process non-option arguments scriptfile = args[0] modules = args[1:] # derive target name from script name base = os.path.basename(scriptfile) base, ext = os.path.splitext(base) if base: if base != scriptfile: target = base else: target = base + '.bin' # Actual work starts here... dict = findmodules.findmodules(scriptfile, modules, path) names = dict.keys() names.sort() print "Modules being frozen:" for name in names: print '\t', name backup = frozen_c + '~' try: os.rename(frozen_c, backup) except os.error: backup = None outfp = open(frozen_c, 'w') try: makefreeze.makefreeze(outfp, dict) finally: outfp.close() if backup: if cmp.cmp(backup, frozen_c): sys.stderr.write('%s not changed, not written\n' % frozen_c) os.rename(backup, frozen_c) builtins = [] unknown = [] mods = dict.keys() mods.sort() for mod in mods: if dict[mod] == '<builtin>': builtins.append(mod) elif dict[mod] == '<unknown>': unknown.append(mod) addfiles = [] if unknown: addfiles, addmods = \ checkextensions.checkextensions(unknown, extensions) for mod in addmods: unknown.remove(mod) builtins = builtins + addmods if unknown: sys.stderr.write('Warning: unknown modules remain: %s\n' % string.join(unknown)) builtins.sort() infp = open(config_c_in) backup = config_c + '~' try: os.rename(config_c, backup) except os.error: backup = None outfp = open(config_c, 'w') try: makeconfig.makeconfig(infp, outfp, builtins) finally: outfp.close() infp.close() if backup: if cmp.cmp(backup, config_c): sys.stderr.write('%s not changed, not written\n' % config_c) os.rename(backup, config_c) cflags = defines + includes + ['$(OPT)'] libs = [] for n in 'Modules', 'Python', 'Objects', 'Parser': n = 'lib%s.a' % n n = os.path.join(binlib, n) libs.append(n) makevars = parsesetup.getmakevars(makefile_in) somevars = {} for key in makevars.keys(): somevars[key] = makevars[key] somevars['CFLAGS'] = string.join(cflags) # override files = ['$(OPT)', '$(LDFLAGS)', config_c, frozen_c] + \ supp_sources + addfiles + libs + \ ['$(MODLIBS)', '$(LIBS)', '$(SYSLIBS)'] backup = makefile + '~' try: os.rename(makefile, backup) except os.error: backup = None outfp = open(makefile, 'w') try: makemakefile.makemakefile(outfp, somevars, files, target) finally: outfp.close() if backup: if not cmp.cmp(backup, makefile): print 'previous Makefile saved as', backup else: sys.stderr.write('%s not changed, not written\n' % makefile) os.rename(backup, makefile) # Done! print 'Now run make to build the target:', target | 96c4dd95cfdd3ed761c7030de047839419689a68 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/96c4dd95cfdd3ed761c7030de047839419689a68/freeze.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
468,
5713,
27621,
819,
1633,
273,
17154,
1082,
202,
7,
444,
2121,
598,
300,
84,
1456,
1196,
67,
3239,
273,
599,
202,
202,
7,
444,
2121,
598,
300,
52,
1456,
4418,
273,
5378... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
468,
5713,
27621,
819,
1633,
273,
17154,
1082,
202,
7,
444,
2121,
598,
300,
84,
1456,
1196,
67,
3239,
273,
599,
202,
202,
7,
444,
2121,
598,
300,
52,
1456,
4418,
273,
5378... |
logging.getLogger('schema').info("Table '%s': added column '%s' with definition=%s" % (self._table, k, logs[k])) | self.__schema.debug("Table '%s': added column '%s' with definition=%s", self._table, k, logs[k]) | def _auto_init(self, cr, context={}): store_compute = False logger = netsvc.Logger() create = False todo_end = [] self._field_create(cr, context=context) if getattr(self, '_auto', True): cr.execute("SELECT relname FROM pg_class WHERE relkind IN ('r','v') AND relname=%s", (self._table,)) if not cr.rowcount: cr.execute('CREATE TABLE "%s" (id SERIAL NOT NULL, PRIMARY KEY(id)) WITHOUT OIDS' % (self._table,)) cr.execute("COMMENT ON TABLE \"%s\" IS '%s'" % (self._table, self._description.replace("'", "''"))) create = True | 2601e23d09b38f3de363ad11deafc4840b5020b5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12853/2601e23d09b38f3de363ad11deafc4840b5020b5/orm.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
6079,
67,
2738,
12,
2890,
16,
4422,
16,
819,
12938,
4672,
1707,
67,
9200,
273,
1083,
1194,
273,
21954,
4227,
18,
3328,
1435,
752,
273,
1083,
10621,
67,
409,
273,
5378,
365,
6315,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6079,
67,
2738,
12,
2890,
16,
4422,
16,
819,
12938,
4672,
1707,
67,
9200,
273,
1083,
1194,
273,
21954,
4227,
18,
3328,
1435,
752,
273,
1083,
10621,
67,
409,
273,
5378,
365,
6315,
... |
msg = user + ' try to login without success' | msg = user + ' has tried to login without success' | def LogAuthLogin(sender, user, successful, **kwargs): if successful: msg = user.username + ' has login with success' else: msg = user + ' try to login without success' info(msg) | 24e863b9ac9ab02a614a05fea038364c93faa7b0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11208/24e863b9ac9ab02a614a05fea038364c93faa7b0/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1827,
1730,
5358,
12,
15330,
16,
729,
16,
6873,
16,
2826,
4333,
4672,
309,
6873,
30,
1234,
273,
729,
18,
5053,
397,
296,
711,
3925,
598,
2216,
11,
469,
30,
1234,
273,
729,
397,
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,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1827,
1730,
5358,
12,
15330,
16,
729,
16,
6873,
16,
2826,
4333,
4672,
309,
6873,
30,
1234,
273,
729,
18,
5053,
397,
296,
711,
3925,
598,
2216,
11,
469,
30,
1234,
273,
729,
397,
296,
... |
self.sleeping = True | def auth_failed(msg="Authentication failed."): if not self._closed: self.attempted_logins += 1 if self.attempted_logins >= self.max_login_attempts: msg = "530 " + msg + " Disconnecting." self.respond(msg) self.log(msg) self.close_when_done() else: self.respond("530 " + msg) self.log(msg) self.sleeping = False | b89ca03de8ef4f30169d72d3120ee291481d5964 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9392/b89ca03de8ef4f30169d72d3120ee291481d5964/ftpserver.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1357,
67,
7307,
12,
3576,
1546,
6492,
2535,
1199,
4672,
309,
486,
365,
6315,
12204,
30,
365,
18,
11764,
329,
67,
1330,
2679,
1011,
404,
309,
365,
18,
11764,
329,
67,
1330,
2679,
1545,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1357,
67,
7307,
12,
3576,
1546,
6492,
2535,
1199,
4672,
309,
486,
365,
6315,
12204,
30,
365,
18,
11764,
329,
67,
1330,
2679,
1011,
404,
309,
365,
18,
11764,
329,
67,
1330,
2679,
1545,
... | |
if job.inputdata and job.inputdata.type == 'DQ2_COPY' and not config['ENABLE_DQ2COPY']: | if job.inputdata and job.inputdata._name in [ 'DQ2Dataset' ] and job.inputdata.type == 'DQ2_COPY' and not config['ENABLE_DQ2COPY']: | def master_configure(self): | 7f341e085957ad0b484271ea00fdb08f92ac62a7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1488/7f341e085957ad0b484271ea00fdb08f92ac62a7/Athena.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4171,
67,
14895,
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,
4171,
67,
14895,
12,
2890,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
return ans context._raise_error(Inexact) context._raise_error(Rounded) return context._raise_error(Overflow, 'above Emax', ans._sign) | ans = ans._rescale(Etop, context=context) else: Emax = context.Emax if ans_adjusted > Emax: if not ans: ans._exp = Emax context._raise_error(Clamped) return ans context._raise_error(Inexact) context._raise_error(Rounded) return context._raise_error(Overflow, 'above Emax', ans._sign) | def _fixexponents(self, prec=None, rounding=None, folddown=None, context=None): """Fix the exponents and return a copy with the exponent in bounds.""" if self._isinfinity(): return self if context is None: context = getcontext() if prec is None: prec = context.prec if folddown is None: folddown = context._clamp Emin, Emax = context.Emin, context.Emax Etop = context.Etop() ans = Decimal(self) if ans.adjusted() < Emin: Etiny = context.Etiny() if ans._exp < Etiny: if not ans: ans._exp = Etiny context._raise_error(Clamped) return ans ans = ans._rescale(Etiny, context=context) #It isn't zero, and exp < Emin => subnormal context._raise_error(Subnormal) if context.flags[Inexact]: context._raise_error(Underflow) else: if ans: #Only raise subnormal if non-zero. context._raise_error(Subnormal) elif folddown and ans._exp > Etop: context._raise_error(Clamped) ans = ans._rescale(Etop, context=context) elif ans.adjusted() > Emax: if not ans: ans._exp = Emax context._raise_error(Clamped) return ans context._raise_error(Inexact) context._raise_error(Rounded) return context._raise_error(Overflow, 'above Emax', ans._sign) return ans | 55342e783760513207a56d5a31fa49e579a96cd3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/55342e783760513207a56d5a31fa49e579a96cd3/decimal.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
904,
24045,
87,
12,
2890,
16,
13382,
33,
7036,
16,
13885,
33,
7036,
16,
28420,
449,
995,
33,
7036,
16,
819,
33,
7036,
4672,
3536,
8585,
326,
9100,
87,
471,
327,
279,
1610,
598,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
904,
24045,
87,
12,
2890,
16,
13382,
33,
7036,
16,
13885,
33,
7036,
16,
28420,
449,
995,
33,
7036,
16,
819,
33,
7036,
4672,
3536,
8585,
326,
9100,
87,
471,
327,
279,
1610,
598,
... |
self.saveAsHandout() | return self.saveAsHandout() | def save(self): "Save the PDF document." | f1978dc295686f0bc28de276ebf41b91d67e5b87 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/f1978dc295686f0bc28de276ebf41b91d67e5b87/pythonpoint.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1923,
12,
2890,
4672,
315,
4755,
326,
12667,
1668,
1199,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1923,
12,
2890,
4672,
315,
4755,
326,
12667,
1668,
1199,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
'repoinfo': all_repositories.get(reponame), | 'repoinfo': all_repositories.get(reponame or ''), | def process_request(self, req): go_to_preselected = req.args.get('preselected') if go_to_preselected: req.redirect(go_to_preselected) | 0ccadb9baff2d356a9c6fdeab7b6b749eba7f1a2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9317/0ccadb9baff2d356a9c6fdeab7b6b749eba7f1a2/browser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
67,
2293,
12,
2890,
16,
1111,
4672,
1960,
67,
869,
67,
12202,
292,
828,
273,
1111,
18,
1968,
18,
588,
2668,
12202,
292,
828,
6134,
309,
1960,
67,
869,
67,
12202,
292,
828,
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,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
67,
2293,
12,
2890,
16,
1111,
4672,
1960,
67,
869,
67,
12202,
292,
828,
273,
1111,
18,
1968,
18,
588,
2668,
12202,
292,
828,
6134,
309,
1960,
67,
869,
67,
12202,
292,
828,
30,
... |
fgtemp.remove(pt) return coarsedict | fgtemp.remove(rpt) return coarsedict, fgtemp | def map_grids(coarsegrid,finegrid,coarseres=4.0): """ takes the two grids (lists of lat/lon tuples) and returns a dictionary where the points in the coarse grid are the keys and lists of tuples of points in the fine grid are the values """ fgtemp = finegrid coarsedict = {} for cpt in coarsegrid: flist = [] for fpt in fgtemp: if (cpt[0]-fpt[0])*(cpt[0]-fpt[0]) <= coarseres/2 and \ (cpt[1]-fpt[1])*(cpt[1]-fpt[1])*abs(sin(fpt[1])) <= coarseres/2: flist.append(fpt) coarsedict[cpt] = flist for rpt in flist: fgtemp.remove(pt) return coarsedict | 82d9b847712430a808c0151d33158a9f2c80ba8b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/82d9b847712430a808c0151d33158a9f2c80ba8b/skylocutils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
852,
67,
5222,
87,
12,
2894,
24378,
5222,
16,
74,
558,
5222,
16,
2894,
297,
550,
281,
33,
24,
18,
20,
4672,
3536,
5530,
326,
2795,
3068,
87,
261,
9772,
434,
2516,
19,
9379,
10384,
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,
852,
67,
5222,
87,
12,
2894,
24378,
5222,
16,
74,
558,
5222,
16,
2894,
297,
550,
281,
33,
24,
18,
20,
4672,
3536,
5530,
326,
2795,
3068,
87,
261,
9772,
434,
2516,
19,
9379,
10384,
13... |
if self.debug > 0: print 'found that atoms != self.atoms' | log.debug('found that atoms != self.atoms') | def calculation_required(self, atoms=None, quantities=None): ''' determines if a calculation is needed. | 97d65b7f6de853ae8bd02694f63966f3dfe9ab9e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1380/97d65b7f6de853ae8bd02694f63966f3dfe9ab9e/jacapo.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11096,
67,
4718,
12,
2890,
16,
9006,
33,
7036,
16,
10251,
1961,
33,
7036,
4672,
9163,
12949,
309,
279,
11096,
353,
3577,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
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,
11096,
67,
4718,
12,
2890,
16,
9006,
33,
7036,
16,
10251,
1961,
33,
7036,
4672,
9163,
12949,
309,
279,
11096,
353,
3577,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
verbose=True | verbose=True, apcorrected=False | def verify_asdm(asdmname, withPointing): print "Verifying asdm ", asdmname if(not os.path.exists(asdmname)): print "asdm ", asdmname, " doesn't exist." raise Exception # test for the existence of all obligatory tables allTables = [ "Antenna.xml", "ASDM.xml", # "CalData.xml", # "CalDelay.xml", # "CalReduction.xml", "ConfigDescription.xml", "CorrelatorMode.xml", "DataDescription.xml", "ExecBlock.xml", "Feed.xml", "Field.xml", #"FocusModel.xml", #"Focus.xml", "Main.xml", "PointingModel.xml", "Polarization.xml", "Processor.xml", "Receiver.xml", "SBSummary.xml", "Scan.xml", "Source.xml", "SpectralWindow.xml", "State.xml", "Station.xml", "Subscan.xml", "SwitchCycle.xml" ] isOK = True for fileName in allTables: filePath = asdmname+'/'+fileName if(not os.path.exists(filePath)): print "ASDM table file ", filePath, " doesn't exist." isOK = False else: # test if well formed rval = os.system('xmllint --noout '+filePath) if(rval !=0): print "Table ", filePath, " is not a well formed XML document." isOK = False print "Note: xml validation not possible since ASDM DTDs (schemas) not yet online." if(not os.path.exists(asdmname+"/ASDMBinary")): print "ASDM binary directory "+asdmname+"/ASDMBinary doesn't exist." isOK = False if(withPointing and not os.path.exists(asdmname+"/Pointing.bin")): print "ASDM binary file "+asdmname+"/Pointing.bin doesn't exist." isOK = False if (not isOK): raise Exception | dd2d873de8a365f467a0029c648468193fcab7e4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2098/dd2d873de8a365f467a0029c648468193fcab7e4/test_task_exportasdm.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3929,
67,
345,
10956,
12,
345,
10956,
529,
16,
598,
2148,
310,
4672,
1172,
315,
8097,
310,
487,
10956,
3104,
487,
10956,
529,
309,
12,
902,
1140,
18,
803,
18,
1808,
12,
345,
10956,
529... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3929,
67,
345,
10956,
12,
345,
10956,
529,
16,
598,
2148,
310,
4672,
1172,
315,
8097,
310,
487,
10956,
3104,
487,
10956,
529,
309,
12,
902,
1140,
18,
803,
18,
1808,
12,
345,
10956,
529... |
print testtar | def path(path): return test_support.findfile(path) | 19e906aa91afba4fb8dc22a7a2b8b43308916a6d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/19e906aa91afba4fb8dc22a7a2b8b43308916a6d/test_tarfile.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
589,
12,
803,
4672,
327,
1842,
67,
13261,
18,
4720,
768,
12,
803,
13,
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,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
589,
12,
803,
4672,
327,
1842,
67,
13261,
18,
4720,
768,
12,
803,
13,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... | |
Calculates the Clebsch-Gordan coefficient `< j_1 m_1 \; j_2 m_2 | j_3 m_3 >`. | Calculates the Clebsch-Gordan coefficient `\langle j_1 m_1 \; j_2 m_2 | j_3 m_3 \rangle`. The reference for this function is [Edmonds74]_. | def clebsch_gordan(j_1, j_2, j_3, m_1, m_2, m_3, prec=None): r""" Calculates the Clebsch-Gordan coefficient `< j_1 m_1 \; j_2 m_2 | j_3 m_3 >`. INPUT: - ``j_1``, ``j_2``, ``j_3``, ``m_1``, ``m_2``, ``m_3`` - integer or half integer - ``prec`` - precision, default: None. Providing a precision can drastically speed up the calculation. OUTPUT: rational number times the square root of a rational number (if prec=None), or real number if a precision is given EXAMPLES:: sage: simplify(clebsch_gordan(3/2,1/2,2, 3/2,1/2,2)) 1 sage: clebsch_gordan(1.5,0.5,1, 1.5,-0.5,1) 1/2*sqrt(3) sage: clebsch_gordan(3/2,1/2,1, -1/2,1/2,0) -sqrt(1/6)*sqrt(3) NOTES: The Clebsch-Gordan coefficient will be evaluated via its relation to Wigner 3j symbols: .. math:: < j_1 m_1 \; j_2 m_2 | j_3 m_3 > =(-1)^{j_1-j_2+m_3} \sqrt{2j_3+1} \; Wigner3j(j_1,j_2,j_3,m_1,m_2,-m_3) See also the documentation on Wigner 3j symbols which exhibit much higher symmetry relations than the Clebsch-Gordan coefficient. REFERENCES: - [Edmonds74] 'Angular Momentum in Quantum Mechanics', A. R. Edmonds, Princeton University Press (1974) - [Rasch03] 'Efficient Storage Scheme for Pre-calculated Wigner 3j, 6j and Gaunt Coefficients', J. Rasch and A. C. H. Yu, SIAM J. Sci. Comput. Volume 25, Issue 4, pp. 1416-1428 (2003) AUTHORS: - Jens Rasch (2009-03-24): initial version """ res = (-1) ** (int(j_1 - j_2 + m_3)) * (2 * j_3 + 1).sqrt(prec) * \ wigner_3j(j_1, j_2, j_3, m_1, m_2, -m_3, prec) return res | c6a90d820f57455b2ff6063db98cb5e6f7a11f83 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/c6a90d820f57455b2ff6063db98cb5e6f7a11f83/wigner.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1619,
2038,
343,
67,
75,
517,
304,
12,
78,
67,
21,
16,
525,
67,
22,
16,
525,
67,
23,
16,
312,
67,
21,
16,
312,
67,
22,
16,
312,
67,
23,
16,
13382,
33,
7036,
4672,
436,
8395,
26... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1619,
2038,
343,
67,
75,
517,
304,
12,
78,
67,
21,
16,
525,
67,
22,
16,
525,
67,
23,
16,
312,
67,
21,
16,
312,
67,
22,
16,
312,
67,
23,
16,
13382,
33,
7036,
4672,
436,
8395,
26... |
cursor.execute('SELECT id FROM "'+self._table+'" ' \ 'WHERE id IN (' + str_d + ') ' + domain1, ids + domain2) if not cursor.rowcount == len({}.fromkeys(ids)): raise ExceptORM('AccessError', 'You try to bypass an access rule ' \ '(Document type: %s).' % self._description) cursor.execute('DELETE FROM inherit ' \ 'WHERE (obj_type = %s AND obj_id IN ('+str_d+')) ' \ 'OR (inst_type = %s AND inst_id IN ('+str_d+'))', ((self._name,) + tuple(ids) + (self._name,) + tuple(ids))) cursor.execute('DELETE FROM "'+self._table+'" ' \ 'WHERE id IN (' + str_d + ') ' + domain1, ids + domain2) | for i in range((len(ids) / ID_MAX) + \ ((len(ids) % ID_MAX) and 1 or 0)): sub_ids = ids[ID_MAX * i:ID_MAX * (i + 1)] str_d = string.join(('%d',) * len(sub_ids), ',') if domain1: cursor.execute('SELECT id FROM "'+self._table+'" ' \ 'WHERE id IN (' + str_d + ') ' + domain1, sub_ids + domain2) if not cursor.rowcount == len({}.fromkeys(ids)): raise ExceptORM('AccessError', 'You try to bypass an access rule ' \ '(Document type: %s).' % self._description) cursor.execute('DELETE FROM inherit ' \ 'WHERE (obj_type = %s AND obj_id IN ('+str_d+')) ' \ 'OR (inst_type = %s AND inst_id IN ('+str_d+'))', ((self._name,) + tuple(sub_ids) + \ (self._name,) + tuple(sub_ids))) if domain: cursor.execute('DELETE FROM "'+self._table+'" ' \ 'WHERE id IN (' + str_d + ') ' + domain1, sub_ids + domain2) else: cursor.execute('DELETE FROM "'+self._table+'" ' \ 'WHERE id IN (' + str_d + ')', sub_ids) | def unlink(self, cursor, user, ids, context=None): if context is None: context = {} if not ids: return True if isinstance(ids, (int, long)): ids = [ids] delta = context.get('read_delta', False) if delta and self._log_access: cursor.execute( "SELECT (now() - min(write_date)) <= '%s'::interval " \ "FROM \"%s\" WHERE id in (%s)" % \ (delta, self._table, ",".join([str(x) for x in ids]))) res = cursor.fetchone() if res and res[0]: raise ExceptORM('ConcurrencyException', 'This record was modified in the meanwhile') | d2982e9d7e25c035d2927255b703c7aaacc4b2e6 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9266/d2982e9d7e25c035d2927255b703c7aaacc4b2e6/orm.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,
819,
353,
599,
30,
819,
273,
2618,
309,
486,
3258,
30,
327,
1053,
309,
1549,
12,
2232,
16,
261,
474,
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,
8255,
12,
2890,
16,
3347,
16,
729,
16,
3258,
16,
819,
33,
7036,
4672,
309,
819,
353,
599,
30,
819,
273,
2618,
309,
486,
3258,
30,
327,
1053,
309,
1549,
12,
2232,
16,
261,
474,
16,
... |
logging.debug('failed to set locale to pootle default (%s); loading system default', lang) | logging.debug('Failed to set locale to Pootle default (%s); loading system default', lang) | def process_request(self, request): #FIXME: some languages like arabic don't have a language only # locale for no good reason. we need a function to pick default # locale for these lang = translation.to_locale(translation.get_language()) try: locale.setlocale(locale.LC_ALL, (lang, 'UTF-8')) except: logging.debug('failed to set locale to %s; using Pootle default', lang) lang = translation.to_locale(settings.LANGUAGE_CODE) try: locale.setlocale(locale.LC_ALL, (lang, 'UTF-8')) except: logging.debug('failed to set locale to pootle default (%s); loading system default', lang) locale.setlocale(locale.LC_ALL, '') | 9aa4eb1286e25787033b477004ad1c38542b0d6f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11388/9aa4eb1286e25787033b477004ad1c38542b0d6f/setlocale.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
67,
2293,
12,
2890,
16,
590,
4672,
468,
25810,
30,
2690,
8191,
3007,
279,
20727,
335,
2727,
1404,
1240,
279,
2653,
1338,
468,
2573,
364,
1158,
7494,
3971,
18,
732,
1608,
279,
445,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
67,
2293,
12,
2890,
16,
590,
4672,
468,
25810,
30,
2690,
8191,
3007,
279,
20727,
335,
2727,
1404,
1240,
279,
2653,
1338,
468,
2573,
364,
1158,
7494,
3971,
18,
732,
1608,
279,
445,
... |
self._releaseObject(object) | self._releaseObject(object) | def ignore(self, event, object): """ ignore(self, string, DirectObject) Make this object no longer respond to this event. It is safe to call even if it was not already accepting """ if Messenger.notify.getDebug(): Messenger.notify.debug(`object` + '\n now ignoring: ' + `event`) | 740aca460fb6f6b0ac98020067810164a9874ae8 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8543/740aca460fb6f6b0ac98020067810164a9874ae8/Messenger.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2305,
12,
2890,
16,
871,
16,
733,
4672,
3536,
2305,
12,
2890,
16,
533,
16,
9908,
921,
13,
4344,
333,
733,
1158,
7144,
6846,
358,
333,
871,
18,
2597,
353,
4183,
358,
745,
5456,
309,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2305,
12,
2890,
16,
871,
16,
733,
4672,
3536,
2305,
12,
2890,
16,
533,
16,
9908,
921,
13,
4344,
333,
733,
1158,
7144,
6846,
358,
333,
871,
18,
2597,
353,
4183,
358,
745,
5456,
309,
5... |
def fl_set_menu(ob, menustr): """ fl_set_menu(ob, menustr) """ _fl_set_menu(ob, menustr) | def fl_set_menu(pObject, menustr): """ fl_set_menu(pObject, menustr) """ _fl_set_menu(pObject, menustr) | def fl_set_menu(ob, menustr): """ fl_set_menu(ob, menustr) """ _fl_set_menu(ob, menustr) | 9942dac8ce2b35a1e43615a26fd8e7054ef805d3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2429/9942dac8ce2b35a1e43615a26fd8e7054ef805d3/xformslib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1183,
67,
542,
67,
5414,
12,
84,
921,
16,
21374,
313,
4672,
3536,
1183,
67,
542,
67,
5414,
12,
84,
921,
16,
21374,
313,
13,
3536,
225,
389,
2242,
67,
542,
67,
5414,
12,
84,
921,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1183,
67,
542,
67,
5414,
12,
84,
921,
16,
21374,
313,
4672,
3536,
1183,
67,
542,
67,
5414,
12,
84,
921,
16,
21374,
313,
13,
3536,
225,
389,
2242,
67,
542,
67,
5414,
12,
84,
921,
16... |
if result: | if result is not None: | def generated_target_ps_real(is_suffix, type, properties): result = '' found = False while type and not found: result = __prefixes_suffixes[is_suffix].find (['<target-type>' + type] + properties) # Note that if the string is empty (""), but not null, we consider # suffix found. Setting prefix or suffix to empty string is fine. if result: found = True type = __types [type]['base'] if not result: result = '' return result | da5e6aa76933b34eb8b27818acd63d48dd74fcbf /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9981/da5e6aa76933b34eb8b27818acd63d48dd74fcbf/type.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4374,
67,
3299,
67,
1121,
67,
7688,
12,
291,
67,
8477,
16,
618,
16,
1790,
4672,
225,
563,
273,
875,
1392,
273,
1083,
1323,
618,
471,
486,
1392,
30,
563,
273,
1001,
17777,
67,
8477,
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,
4374,
67,
3299,
67,
1121,
67,
7688,
12,
291,
67,
8477,
16,
618,
16,
1790,
4672,
225,
563,
273,
875,
1392,
273,
1083,
1323,
618,
471,
486,
1392,
30,
563,
273,
1001,
17777,
67,
8477,
2... |
print >> sys.stderr, "--ifo-time option not implemented in the "+name +" executable. skipping..." | print >> sys.stderr, "--ifo-times option not implemented in the "+name +" executable. skipping..." | def initialise(opts, name, version): """ Create suffix and prefix that will be used to name the output files. @param opts : the user arguments (user_tag, gps_end_time and gps_start_time are used). @param name: name of the calling function/executable @return prefix @return suffix """ # compose prefix prefix = name try: if opts.ifo_times: prefix = opts.ifo_times +"-"+ prefix except: print >> sys.stderr, "--ifo-time option not implemented in the "+name +" executable. skipping..." pass try: if opts.ifo_tag: prefix = prefix + "_" + opts.ifo_tag except: print >> sys.stderr, "--ifo-tag option not implemented in the "+name +" executable. skipping..." pass try: if opts.user_tag: prefix = prefix + "_" + opts.user_tag except: print >> sys.stderr, "--user-tag option not implemented in the "+name +" executable. skipping..." pass # compose suffix try: if opts.gps_start_time and opts.gps_end_time : suffix = "-"+str(int(opts.gps_start_time))+"-"+str(int(math.ceil(opts.gps_end_time))-int(opts.gps_start_time)) else: suffix = "-unspecified-gpstime" except: suffix = "-unspecified-gpstime" print >> sys.stderr, "--gps-start-time and/or --gps-end-time option not implemented in the "+\ name +" executable. skipping..." pass opts.prefix = prefix opts.suffix = suffix opts.name = name opts.version = version # make sure output_path is set correctly if opts.output_path is not None: opts.output_path = opts.output_path +'/' # create output file if required if not os.path.exists( opts.output_path ): os.mkdir (opts.output_path) if not os.path.exists( opts.output_path+"Images" ): os.mkdir (opts.output_path+"Images") else: if not os.path.exists( "Images" ): os.mkdir( "Images") return opts | 41139e3fe6f183ffb75cdd826d9a736dff8d4b0d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3592/41139e3fe6f183ffb75cdd826d9a736dff8d4b0d/InspiralUtils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
21301,
12,
4952,
16,
508,
16,
1177,
4672,
3536,
1788,
3758,
471,
1633,
716,
903,
506,
1399,
358,
508,
326,
876,
1390,
18,
225,
632,
891,
1500,
294,
326,
729,
1775,
261,
1355,
67,
2692,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
21301,
12,
4952,
16,
508,
16,
1177,
4672,
3536,
1788,
3758,
471,
1633,
716,
903,
506,
1399,
358,
508,
326,
876,
1390,
18,
225,
632,
891,
1500,
294,
326,
729,
1775,
261,
1355,
67,
2692,... |
4\cdot{}7^{-2} + 5\cdot{}7^{-1} + 5\cdot{}+ 6\cdot{}7^{1} + O(7^{2}) | 4\cdot{}7^{-2} + 5\cdot{}7^{-1} + 5+ 6\cdot{}7^{1} + O(7^{2}) | def _latex_(self): r""" Return latex representation of self. | 0a78b8ad44824bebf04fcf5aaeaee224d0569ba6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9890/0a78b8ad44824bebf04fcf5aaeaee224d0569ba6/magma.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
26264,
67,
12,
2890,
4672,
436,
8395,
2000,
25079,
4335,
434,
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,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
26264,
67,
12,
2890,
4672,
436,
8395,
2000,
25079,
4335,
434,
365,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
if self.outs: | if self.outs and self.outs.fileno() != -1: | def close(self): if self.ins != self.outs: if self.outs: self.outs.close() if self.ins: self.ins.close() | 589b981d7d8ff8631ab148a37a1dfa160b0462f8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7311/589b981d7d8ff8631ab148a37a1dfa160b0462f8/scapy.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1746,
12,
2890,
4672,
309,
365,
18,
2679,
480,
365,
18,
20125,
30,
309,
365,
18,
20125,
471,
365,
18,
20125,
18,
7540,
5764,
1435,
480,
300,
21,
30,
365,
18,
20125,
18,
4412,
1435,
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,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1746,
12,
2890,
4672,
309,
365,
18,
2679,
480,
365,
18,
20125,
30,
309,
365,
18,
20125,
471,
365,
18,
20125,
18,
7540,
5764,
1435,
480,
300,
21,
30,
365,
18,
20125,
18,
4412,
1435,
3... |
name = 'pr2_move_base' rospy.init_node(name) | name = 'pr2_move_base' rospy.init_node(name) | def execute_cb(goal): rospy.loginfo("Received a goal") if not set_tilt_profile([1.05, -.7, 1.05], [0.0, 1.8, 2.0125 + .3]): server.set_aborted(MoveBaseResult(), "Couldn't set the profile on the laser") return configure_laser() configure_head() move_base_client.send_goal(goal, None, None, feedback_cb) while not move_base_client.wait_for_result(rospy.Duration(0.1)): if server.is_preempt_requested(): if server.is_new_goal_available(): goal = server.accept_new_goal() move_base_client.send_goal(goal, None, None, feedback_cb) else: move_base_client.cancel_goal() terminal_state = move_base_client.get_state() result = move_base_client.get_result() if terminal_state == GoalStatus.PREEMPTED: server.set_preempted(result) elif terminal_state == GoalStatus.SUCCEEDED: server.set_succeeded(result) elif terminal_state == GoalStatus.ABORTED: server.set_aborted(result) else: server.set_aborted(result, "Unknown result from move_base") | 122c6f7455ce682a4e43ae2b05805de7bdb5d781 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9426/122c6f7455ce682a4e43ae2b05805de7bdb5d781/pr2_move_base.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1836,
67,
7358,
12,
27354,
4672,
721,
30884,
18,
1330,
1376,
2932,
8872,
279,
17683,
7923,
309,
486,
444,
67,
29419,
67,
5040,
3816,
21,
18,
6260,
16,
225,
300,
18,
27,
16,
404,
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,
1836,
67,
7358,
12,
27354,
4672,
721,
30884,
18,
1330,
1376,
2932,
8872,
279,
17683,
7923,
309,
486,
444,
67,
29419,
67,
5040,
3816,
21,
18,
6260,
16,
225,
300,
18,
27,
16,
404,
18,
... |
done[name] = value | try: value = string.atoi(value) except ValueError: pass done[name] = string.strip(value) | undef_rx = re.compile("/[*] #undef ([A-Z][A-Z0-9_]+) [*]/\n") | 175a16d03fdd40de648d8083b534641563a5982a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/175a16d03fdd40de648d8083b534641563a5982a/sysconfig.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
640,
536,
67,
20122,
273,
283,
18,
11100,
2932,
19,
63,
14,
65,
468,
318,
536,
23265,
37,
17,
62,
6362,
37,
17,
62,
20,
17,
29,
67,
7941,
306,
14,
18537,
64,
82,
7923,
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,
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,
640,
536,
67,
20122,
273,
283,
18,
11100,
2932,
19,
63,
14,
65,
468,
318,
536,
23265,
37,
17,
62,
6362,
37,
17,
62,
20,
17,
29,
67,
7941,
306,
14,
18537,
64,
82,
7923,
2,
-100,
-100,
-... |
if prefix and callinfo.use == 'encoded': | if request and prefix and callinfo.use == 'encoded': | def _getTypeCodes(self, callinfo): """Returns typecodes representing input and output messages callinfo -- WSDLTools.SOAPCallInfo instance describing an operation. """ prefix = None self._resetPrefixDict() if callinfo.use == 'encoded': prefix = self._getPrefix(callinfo.namespace) requestTC = self._getTypeCode(parameters=callinfo.getInParameters(), literal=(callinfo.use=='literal')) | f30acd78efc327c3bd71be26111e21f2788ce6c0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/f30acd78efc327c3bd71be26111e21f2788ce6c0/ServiceProxy.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
559,
6295,
12,
2890,
16,
745,
1376,
4672,
3536,
1356,
618,
7000,
5123,
810,
471,
876,
2743,
745,
1376,
1493,
225,
30567,
10348,
18,
27952,
1477,
966,
791,
16868,
392,
1674,
18,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
559,
6295,
12,
2890,
16,
745,
1376,
4672,
3536,
1356,
618,
7000,
5123,
810,
471,
876,
2743,
745,
1376,
1493,
225,
30567,
10348,
18,
27952,
1477,
966,
791,
16868,
392,
1674,
18,... |
for log in build.getLogs(): l = "" if self.logCompression == "bzip2": compressedLog = bz2.compress(log.getText()) l = base64.encodestring(compressedLog) logEncoding = "base64"; elif self.logCompression == "gzip": compressedLog = zlib.compress(log.getText()) l = base64.encodestring(compressedLog) logEncoding = "base64"; else: l = log.getText() tinderboxLogs += l | for bs in build.getSteps(): shortText = ' '.join(bs.getText()) + '\n' if not re.match(".*[^\s].*", shortText): continue if re.match(".+TinderboxPrint.*", shortText): shortText = shortText.replace("TinderboxPrint", "Tinderbox Print") logs = bs.getLogs() tinderboxLogs += "======== BuildStep started ========\n" tinderboxLogs += shortText tinderboxLogs += "=== Output ===\n" for log in logs: logText = log.getTextWithHeaders() for line in logText.splitlines(): if re.match(".+TinderboxPrint.*", line): line = line.replace("TinderboxPrint", "Tinderbox Print") tinderboxLogs += line + "\n" tinderboxLogs += "=== Output ended ===\n" tinderboxLogs += "======== BuildStep ended ========\n" if self.logCompression == "bzip2": cLog = bz2.compress(tinderboxLogs) tinderboxLogs = base64.encodestring(cLog) logEncoding = "base64" elif self.logCompression == "gzip": cLog = zlib.compress(tinderboxLogs) tinderboxLogs = base64.encodestring(cLog) logEncoding = "base64" | def buildMessage(self, name, build, results): text = "" res = "" # shortform t = "tinderbox:" | e3be32ffc0962a6cc59e94dbca304e0850df7f70 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/13067/e3be32ffc0962a6cc59e94dbca304e0850df7f70/tinderbox.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1361,
1079,
12,
2890,
16,
508,
16,
1361,
16,
1686,
4672,
977,
273,
1408,
400,
273,
1408,
468,
3025,
687,
268,
273,
315,
88,
14055,
2147,
2773,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1361,
1079,
12,
2890,
16,
508,
16,
1361,
16,
1686,
4672,
977,
273,
1408,
400,
273,
1408,
468,
3025,
687,
268,
273,
315,
88,
14055,
2147,
2773,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
if type and filename: | if type is not None and filename: | def check_for_local_images(self): self.set_default_icon_for_art() self.misc_img_in_dir = None self.single_img_in_dir = None type, filename = self.get_local_image() if type and filename: if type == self.ART_LOCATION_MISC: self.misc_img_in_dir = filename filename = self.musicdir[self.profile_num] + songdir + "/" + filename elif type == self.ART_LOCATION_SINGLE: self.single_img_in_dir = filename filename = self.musicdir[self.profile_num] + songdir + "/" + filename gobject.idle_add(self.set_image_for_cover, filename) return True return False | 0517ce1541d3a9603f7d0151f097f5273349ab69 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2312/0517ce1541d3a9603f7d0151f097f5273349ab69/sonata.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
67,
1884,
67,
3729,
67,
7369,
12,
2890,
4672,
365,
18,
542,
67,
1886,
67,
3950,
67,
1884,
67,
485,
1435,
365,
18,
23667,
67,
6081,
67,
267,
67,
1214,
273,
599,
365,
18,
7526,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
67,
1884,
67,
3729,
67,
7369,
12,
2890,
4672,
365,
18,
542,
67,
1886,
67,
3950,
67,
1884,
67,
485,
1435,
365,
18,
23667,
67,
6081,
67,
267,
67,
1214,
273,
599,
365,
18,
7526,
... |
result['row'] = render_to_string('dashboard/menu/includes/group_row.html', { 'group': group | result['new_row'] = render_to_string('dashboard/menu/includes/group_row.html', { 'group': group, 'MEDIA_URL': settings.MEDIA_URL | def add_sidegroup(request, object_type, object_id): if not request.is_ajax() or request.method != 'POST': raise Http404 result = {} try: model = get_model('core', object_type) instance = get_object_or_404(model, id=object_id) group = SideDishGroup() setattr(group, object_type, instance) group.save() result['success'] = True result['row'] = render_to_string('dashboard/menu/includes/group_row.html', { 'group': group }) except: result['success'] = False return HttpResponse(json.dumps(result)) | 328a077e300166d058ea7a6db12edc4e22a14b23 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9903/328a077e300166d058ea7a6db12edc4e22a14b23/views.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
67,
5564,
1655,
12,
2293,
16,
733,
67,
723,
16,
733,
67,
350,
4672,
309,
486,
590,
18,
291,
67,
12813,
1435,
578,
590,
18,
2039,
480,
296,
3798,
4278,
1002,
2541,
11746,
563,
27... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
67,
5564,
1655,
12,
2293,
16,
733,
67,
723,
16,
733,
67,
350,
4672,
309,
486,
590,
18,
291,
67,
12813,
1435,
578,
590,
18,
2039,
480,
296,
3798,
4278,
1002,
2541,
11746,
563,
27... |
options.external_api.extend(val.replace(',', ' ').split()) | options.external_api.extend(_str_to_list(val)) | def parse_configfiles(configfiles, options, names): configparser = ConfigParser.ConfigParser() # ConfigParser.read() silently ignores errors, so open the files # manually (since we want to notify the user of any errors). for configfile in configfiles: fp = open(configfile, 'r') # may raise IOError. configparser.readfp(fp, configfile) fp.close() for optname in configparser.options('epydoc'): val = configparser.get('epydoc', optname, vars=os.environ).strip() optname = optname.lower().strip() if optname in ('modules', 'objects', 'values', 'module', 'object', 'value'): names.extend(val.replace(',', ' ').split()) elif optname == 'target': options.target = val elif optname == 'output': if val.lower() not in ACTIONS: raise ValueError('"%s" expected one of: %s' % (optname, ', '.join(ACTIONS))) options.action = val.lower() elif optname == 'verbosity': options.verbosity = _str_to_int(val, optname) elif optname == 'debug': options.debug = _str_to_bool(val, optname) elif optname in ('simple-term', 'simple_term'): options.simple_term = _str_to_bool(val, optname) # Generation options elif optname == 'docformat': options.docformat = val elif optname == 'parse': options.parse = _str_to_bool(val, optname) elif optname == 'introspect': options.introspect = _str_to_bool(val, optname) elif optname == 'exclude': options.exclude.append(val) elif optname in ('exclude-parse', 'exclude_parse'): options.exclude_parse.append(val) elif optname in ('exclude-introspect', 'exclude_introspect'): options.exclude_introspect.append(val) elif optname == 'inheritance': if val.lower() not in INHERITANCE_STYLES: raise ValueError('"%s" expected one of: %s.' % (optname, ', '.join(INHERITANCE_STYLES))) options.inerhitance = val.lower() elif optname =='private': options.private = _str_to_bool(val, optname) elif optname =='imports': options.imports = _str_to_bool(val, optname) elif optname == 'sourcecode': options.include_source_code = _str_to_bool(val, optname) elif optname in ('include-log', 'include_log'): options.include_log = _str_to_bool(val, optname) # Output options elif optname == 'name': options.prj_name = val elif optname == 'css': options.css = val elif optname == 'url': options.prj_url = val elif optname == 'link': options.prj_link = val elif optname == 'top': options.top_page = val elif optname == 'help': options.help_file = val elif optname =='frames': options.show_frames = _str_to_bool(val, optname) elif optname in ('separate-classes', 'separate_classes'): options.list_classes_separately = _str_to_bool(val, optname) # External API elif optname in ('external-api', 'external_api'): options.external_api.extend(val.replace(',', ' ').split()) elif optname in ('external-api-file', 'external_api_file'): options.external_api_file.append(val) elif optname in ('external-api-root', 'external_api_root'): options.external_api_root.append(val) # Graph options elif optname == 'graph': graphtypes = val.replace(',', '').split() for graphtype in graphtypes: if graphtype not in GRAPH_TYPES + ('all',): raise ValueError('"%s" expected one of: all, %s.' % (optname, ', '.join(GRAPH_TYPES))) options.graphs.extend(graphtypes) elif optname == 'dotpath': options.dotpath = val elif optname in ('graph-font', 'graph_font'): options.graph_font = val elif optname in ('graph-font-size', 'graph_font_size'): options.graph_font_size = _str_to_int(val, optname) elif optname == 'pstat': options.pstat_files.extend(val.replace(',', ' ').split()) # Return value options elif optname in ('failon', 'fail-on', 'fail_on'): if val.lower().strip() in ('error', 'errors'): options.fail_on = log.ERROR elif val.lower().strip() in ('warning', 'warnings'): options.fail_on = log.WARNING elif val.lower().strip() in ('docstring_warning', 'docstring_warnings'): options.fail_on = log.DOCSTRING_WARNING else: raise ValueError("%r expected one of: error, warning, " "docstring_warning" % optname) else: raise ValueError('Unknown option %s' % optname) | b8bbe37f0a46f6985916613876bf15a2933e7bf4 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3512/b8bbe37f0a46f6985916613876bf15a2933e7bf4/cli.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
67,
1425,
2354,
12,
1425,
2354,
16,
702,
16,
1257,
4672,
642,
4288,
273,
25076,
18,
809,
2678,
1435,
468,
25076,
18,
896,
1435,
22274,
17868,
1334,
16,
1427,
1696,
326,
1390,
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,
1425,
2354,
12,
1425,
2354,
16,
702,
16,
1257,
4672,
642,
4288,
273,
25076,
18,
809,
2678,
1435,
468,
25076,
18,
896,
1435,
22274,
17868,
1334,
16,
1427,
1696,
326,
1390,
468,
... |
handler = WcRotatingFileHandler(logfile, mode, maxBytes, backupCount) | handler = RotatingFileHandler(logfile, mode, maxBytes, backupCount) | def get_access_handler (): """return a handler for access logging""" logfile = get_log_file("%s-access.log"%Name) mode = 'a' maxBytes = 1024*1024*2 # 2 MB backupCount = 5 # number of files to generate handler = WcRotatingFileHandler(logfile, mode, maxBytes, backupCount) # log only the message handler.setFormatter(logging.Formatter("%(message)s")) return handler | cd61b5d0732d9cf7c5fc78fcf0449f7ed23e9a73 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3948/cd61b5d0732d9cf7c5fc78fcf0449f7ed23e9a73/log.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
3860,
67,
4176,
1832,
30,
3536,
2463,
279,
1838,
364,
2006,
2907,
8395,
15204,
273,
336,
67,
1330,
67,
768,
27188,
87,
17,
3860,
18,
1330,
28385,
461,
13,
1965,
273,
296,
69,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3860,
67,
4176,
1832,
30,
3536,
2463,
279,
1838,
364,
2006,
2907,
8395,
15204,
273,
336,
67,
1330,
67,
768,
27188,
87,
17,
3860,
18,
1330,
28385,
461,
13,
1965,
273,
296,
69,
... |
if self.oSocket.session_reused(): | if not self.oSocket.session_reused(): | def handshake( self ): creds = self.oSocketInfo.doServerHandshake() if self.oSocket.session_reused(): gLogger.debug( "New session connecting to server at %s" % str( self.stServerAddress ) ) for key in creds.keys(): self.peerCredentials[ key ] = creds[ key ] | e35ee8718f01fed132926556ba3ee535e74be7e3 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12864/e35ee8718f01fed132926556ba3ee535e74be7e3/SSLTransport.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11942,
12,
365,
262,
30,
12534,
273,
365,
18,
83,
4534,
966,
18,
2896,
2081,
14545,
1435,
309,
486,
365,
18,
83,
4534,
18,
3184,
67,
266,
3668,
13332,
314,
3328,
18,
4148,
12,
315,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11942,
12,
365,
262,
30,
12534,
273,
365,
18,
83,
4534,
966,
18,
2896,
2081,
14545,
1435,
309,
486,
365,
18,
83,
4534,
18,
3184,
67,
266,
3668,
13332,
314,
3328,
18,
4148,
12,
315,
1... |
str += I+'<th '+WIDTH+' class="navbar"> ' str += ' <a class="navbar" href="'+`pkg`+'.html">' str += 'Package</a> </th>\n' | str += I+'<th '+WIDTH+' class="navbar"> ' str += self._uid_to_href(pkg, 'Package', 'navbar') str += ' </th>\n' | def _navbar(self, where=None, top=0): """ @return: The HTML code for a navigation bar on the given type of page. The navigation bar typically looks like:: [ Package Module Class Tree Index Help ] @rtype: C{string} @param where: An identifier indicating what page we're creating a navigation bar for. This is either a UID (for an object documentation page); or one of the strings C{'tree'}, C{'index'}, and C{'help'}. @type where: C{UID} or C{string} @param top: Whether this is the navigation bar at the top of the page. @type top: C{boolean} """ str = self._start_of('Navbar') str += '<table class="navbar" border="0" width="100%"' str += ' cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">\n' str += ' <tr valign="center">\n' #str += ' <td width="100%">\n' #str += ' <table border="0" cellpadding="0" cellspacing="0">\n' #str += ' <tr valign="center">\n' | 7e1af2abc702612461ceeb001b4b551d49cb71d3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/7e1af2abc702612461ceeb001b4b551d49cb71d3/html.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
11589,
3215,
12,
2890,
16,
1625,
33,
7036,
16,
1760,
33,
20,
4672,
3536,
632,
2463,
30,
1021,
3982,
981,
364,
279,
10394,
4653,
603,
326,
864,
618,
434,
1363,
18,
225,
1021,
10394... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
11589,
3215,
12,
2890,
16,
1625,
33,
7036,
16,
1760,
33,
20,
4672,
3536,
632,
2463,
30,
1021,
3982,
981,
364,
279,
10394,
4653,
603,
326,
864,
618,
434,
1363,
18,
225,
1021,
10394... |
messageObject = utils.getChandlerTransportMessage() | m = Mail.MailMessage(view=self.repository.view) | def __createMessageText(self): #XXX: Tnis needs to be base 64 encoded sendStr = "%s%s%s" % (self.url, constants.SHARING_DIVIDER, self.collectionName) | 6259a34016a317d71ffe809f51fffa702adfa3a5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/6259a34016a317d71ffe809f51fffa702adfa3a5/sharing.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2640,
1079,
1528,
12,
2890,
4672,
468,
15639,
30,
399,
82,
291,
4260,
358,
506,
1026,
5178,
3749,
1366,
1585,
273,
2213,
87,
9,
87,
9,
87,
6,
738,
261,
2890,
18,
718,
16,
6810,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1001,
2640,
1079,
1528,
12,
2890,
4672,
468,
15639,
30,
399,
82,
291,
4260,
358,
506,
1026,
5178,
3749,
1366,
1585,
273,
2213,
87,
9,
87,
9,
87,
6,
738,
261,
2890,
18,
718,
16,
6810,... |
mp = False | def kernel_inventory(): # get the data from SMOLT but modify it for how RHTS expects to see it # Eventually we'll switch over to SMOLT properly. data = {} data['VIRT_IOMMU'] = False ########################################## # check for virtual iommu/vt-d capability # if this passes, assume we pick up sr-iov for free if check_for_virt_iommu(): data['VIRT_IOMMU'] = True ########################################## # determine which stroage controller has a disk behind it path = "/sys/block" virt_pat = re.compile('virtual') floppy_pat = re.compile('fd[0-9]') sr_pat = re.compile('sr[0-9]') for block in glob.glob( os.path.join(path, '*')): #skip read only/floppy devices if sr_pat.search(block) or floppy_pat.search(block): continue #skip block devices that don't point to a device if not os.path.islink(block + "/device"): continue sysfs_link = os.readlink(block + "/device") #skip virtual devices if virt_pat.search(sysfs_link): continue #cheap way to create an absolute path, there is probably a better way sysfs_path = sysfs_link.replace('../..','/sys') #start abusing hal to give us the info we want cmd = 'hal-find-by-property --key linux.sysfs_path --string %s' % sysfs_path status,udi = commands.getstatusoutput(cmd) if status: print "DISK_CONTROLLER: hal-find-by-property failed: %d" % status continue while udi: cmd = 'hal-get-property --udi %s --key info.linux.driver 2>/dev/null' % udi status, driver = commands.getstatusoutput(cmd) if status == 0 and driver != "sd" and driver != "sr": #success data['DISK_CONTROLLER'] = driver break #get the parent and try again cmd = 'hal-get-property --udi %s --key info.parent' % udi status,udi = commands.getstatusoutput(cmd) if status: print "DISK_CONTROLLER: hal-get-property failed: %d" % status break if not udi: print "DISK_CONTROLLER: can not determine driver for %s" %block ########################################## # determine if machine is using multipath or not #ok, I am really lazy #remove the default blacklist in /etc/multipath.conf os.system("sed -i '/^blacklist/,/^}$/d' /etc/multipath.conf") #restart multipathd to see what it detects #this spits out errors if the root device is on a #multipath device, I guess ignore for now and hope the code #correctly figures things out os.system("service multipathd restart") #the multipath commands will display the topology if it #exists otherwise nothing #filter out vbds and single device paths status, mpaths = commands.getstatusoutput("multipath -ll") if status: print "MULTIPATH: multipath -ll failed with %d" % status else: count = 0 mp = False mpath_pat = re.compile(" dm-[0-9]* ") sd_pat = re.compile(" sd[a-z]") for line in mpaths.split('\n'): #reset when a new section starts if mpath_pat.search(line): # found at least one mp instance, declare success if count > 1: mp = True break count = 0 #a hit! increment to indicate this if sd_pat.search(line): count = count + 1 if mp == True: data['DISK_MULTIPATH'] = True else: data['DISK_MULTIPATH'] = False return data | c92627e1785c8d79a6a0302f9cedfc2a8ec13038 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14755/c92627e1785c8d79a6a0302f9cedfc2a8ec13038/push-inventory.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5536,
67,
26024,
13332,
468,
336,
326,
501,
628,
12014,
1741,
56,
1496,
5612,
518,
364,
3661,
534,
5062,
55,
10999,
358,
2621,
518,
468,
2587,
3452,
732,
5614,
1620,
1879,
358,
12014,
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,
5536,
67,
26024,
13332,
468,
336,
326,
501,
628,
12014,
1741,
56,
1496,
5612,
518,
364,
3661,
534,
5062,
55,
10999,
358,
2621,
518,
468,
2587,
3452,
732,
5614,
1620,
1879,
358,
12014,
17... | |
"document_path": document_path} | "document_path": document_path, "etag": etag} | def _delete_document(self, trans, uri, check_etag): username, domain = uri.user.username, uri.user.domain self._normalize_document_path(uri) doc_type = self.app_mapping[uri.application_id] document_path = uri.doc_selector.document_path query = """SELECT etag FROM %(table)s WHERE username = %%(username)s AND domain = %%(domain)s AND doc_type= %%(doc_type)s AND doc_uri = %%(document_path)s""" % { "table": Config.xcap_table} params = {"username": username, "domain" : domain, "doc_type": doc_type, "document_path": document_path} trans.execute(query, params) result = trans.fetchall() if result: etag = result[0][0] check_etag(etag) query = """DELETE FROM %(table)s WHERE username = %%(username)s AND domain = %%(domain)s AND doc_type= %%(doc_type)s AND doc_uri = %%(document_path)s""" % { "table": Config.xcap_table} params = {"username": username, "domain" : domain, "doc_type": doc_type, "document_path": document_path} trans.execute(query, params) return StatusResponse(200, old_etag=etag) else: return StatusResponse(404) | 363fbe847be74b30c3dd87fd84965db60c2cbd1b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3446/363fbe847be74b30c3dd87fd84965db60c2cbd1b/database.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3733,
67,
5457,
12,
2890,
16,
906,
16,
2003,
16,
866,
67,
20788,
4672,
2718,
16,
2461,
273,
2003,
18,
1355,
18,
5053,
16,
2003,
18,
1355,
18,
4308,
365,
6315,
12237,
67,
5457,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3733,
67,
5457,
12,
2890,
16,
906,
16,
2003,
16,
866,
67,
20788,
4672,
2718,
16,
2461,
273,
2003,
18,
1355,
18,
5053,
16,
2003,
18,
1355,
18,
4308,
365,
6315,
12237,
67,
5457,
6... |
print "\n" | print "\n" + COMMAND_PROMPT, readline.redisplay() | def main(): | 5ff7b3b6722adf0535960e4a3538deb96c66b426 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11436/5ff7b3b6722adf0535960e4a3538deb96c66b426/crossfire_server.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
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,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
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,
-100,
-100,
-100,
-100,
... |
if on == 1 and sn != 2: return self._fix_nan(context) if sn == 1 and on != 2: return other._fix_nan(context) | if on == 1 and sn == 0: return self._fix(context) if sn == 1 and on == 0: return other._fix(context) | def max_mag(self, other, context=None): """Compares the values numerically with their sign ignored.""" other = _convert_other(other, raiseit=True) | 708d58179d164087c039ff0548b36d67930df48b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8546/708d58179d164087c039ff0548b36d67930df48b/decimal.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
943,
67,
4527,
12,
2890,
16,
1308,
16,
819,
33,
7036,
4672,
3536,
19199,
326,
924,
6389,
1230,
598,
3675,
1573,
5455,
12123,
1308,
273,
389,
6283,
67,
3011,
12,
3011,
16,
1002,
305,
33... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
943,
67,
4527,
12,
2890,
16,
1308,
16,
819,
33,
7036,
4672,
3536,
19199,
326,
924,
6389,
1230,
598,
3675,
1573,
5455,
12123,
1308,
273,
389,
6283,
67,
3011,
12,
3011,
16,
1002,
305,
33... |
self.priv["tasklist"]["columns"].insert(self.TASKLIST_COL_TITLE, title_col) | self.priv["tasklist"]["columns"].insert( self.TASKLIST_COL_TITLE, title_col) | def __create_task_tview(self): | 451ea29e3924785bc6c6b8648aa6459b292a0db4 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7036/451ea29e3924785bc6c6b8648aa6459b292a0db4/browser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2640,
67,
4146,
67,
88,
1945,
12,
2890,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2640,
67,
4146,
67,
88,
1945,
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,
... |
def __init__(self, name, descr=None, type=None, default=None): | def __init__(self, name, descr=None, type=None, value=None): | def __init__(self, name, descr=None, type=None, default=None): """ Construct the documentation for a variable or parameter. | d3395d508175517a8a8289ffc33bd81b4ee231c2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/d3395d508175517a8a8289ffc33bd81b4ee231c2/objdoc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
508,
16,
18426,
33,
7036,
16,
618,
33,
7036,
16,
460,
33,
7036,
4672,
3536,
14291,
326,
7323,
364,
279,
2190,
578,
1569,
18,
2,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
508,
16,
18426,
33,
7036,
16,
618,
33,
7036,
16,
460,
33,
7036,
4672,
3536,
14291,
326,
7323,
364,
279,
2190,
578,
1569,
18,
2,
-100,
-100,
-100,
-100,
... |
def _find_remote_branch_online_if_necessary(self, buildscript, | def find_remote_branch_online_if_necessary(self, buildscript, | def _find_remote_branch_online_if_necessary(self, buildscript, remote_name, branch_name): """Try to find the given branch first, locally, then remotely, and state the availability in the return value.""" wanted_ref = remote_name + '/' + branch_name if self._execute_git_predicate( ['git', 'show-ref', wanted_ref]): return True buildscript.execute(['git', 'fetch'], cwd=self.get_checkoutdir(), extra_env=get_git_extra_env()) return self._execute_git_predicate( ['git', 'show-ref', wanted_ref]) | f3dca446ec51b04ec85ec73c7ed97895744dff87 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4596/f3dca446ec51b04ec85ec73c7ed97895744dff87/git.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1104,
67,
7222,
67,
7500,
67,
21026,
67,
430,
67,
82,
4128,
12,
2890,
16,
1361,
4263,
16,
2632,
67,
529,
16,
3803,
67,
529,
4672,
3536,
7833,
358,
1104,
326,
864,
3803,
1122,
16,
137... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1104,
67,
7222,
67,
7500,
67,
21026,
67,
430,
67,
82,
4128,
12,
2890,
16,
1361,
4263,
16,
2632,
67,
529,
16,
3803,
67,
529,
4672,
3536,
7833,
358,
1104,
326,
864,
3803,
1122,
16,
137... |
self.message_state(_('Invalid form !')) | self.message_state(_('Invalid form!')) | def sig_save(self, widget=None): if self.screen.save_current(): self.message_state(_('Document saved !')) return True else: self.message_state(_('Invalid form !')) return False | 17ba126a41533e2e51514c632a82c095ab003071 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9151/17ba126a41533e2e51514c632a82c095ab003071/form.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3553,
67,
5688,
12,
2890,
16,
3604,
33,
7036,
4672,
309,
365,
18,
9252,
18,
5688,
67,
2972,
13332,
365,
18,
2150,
67,
2019,
24899,
2668,
2519,
5198,
401,
26112,
327,
1053,
469,
30,
365... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3553,
67,
5688,
12,
2890,
16,
3604,
33,
7036,
4672,
309,
365,
18,
9252,
18,
5688,
67,
2972,
13332,
365,
18,
2150,
67,
2019,
24899,
2668,
2519,
5198,
401,
26112,
327,
1053,
469,
30,
365... |
if options.ids_file is not None: | if read_id and options.ids_file is not None: | def main(): options = read_cmd_options() config = read_config() save_pattern = config.get('default', 'save-filename-pattern') if options.ex_data_filename is not None: solutions, dimensions, id_num_digits = \ process_exam_data(options.ex_data_filename) else: solutions = [] dimensions = [] if options.output_dir is not None: save_pattern = os.path.join(options.output_dir, save_pattern) if options.answers_filename is not None: answers_file = options.answers_filename else: answers_file = 'camgrade-answers.txt' if options.output_dir is not None: answers_file = os.path.join(options.output_dir, answers_file) im_id = options.start_id valid_student_ids = None if options.ids_file is not None: ids_file = open(options.ids_file) valid_student_ids = [line.strip() for line in ids_file] ids_file.close() fps = 8.0 pygame.init() window = pygame.display.set_mode((640,480)) pygame.display.set_caption("camgrade") screen = pygame.display.get_surface() profiler = PerformanceProfiler() # Initialize options imageproc_options = imageproc.ExamCapture.get_default_options() imageproc_options['infobits'] = True if id_num_digits > 0: imageproc_options['read-id'] = True imageproc_options['id-num-digits'] = id_num_digits # Initialize capture source camera = None if options.proc_file is not None: imageproc_options['capture-from-file'] = True imageproc_options['capture-proc-file'] = options.proc_file elif options.raw_file is not None: imageproc_options['capture-from-file'] = True imageproc_options['capture-raw-file'] = options.raw_file else: camera = init(select_camera(options, config)) # Program main loop while True: profiler.count_capture() image = imageproc.ExamCapture(camera, dimensions, imageproc_options) image.detect() success = image.success if success: model = decode_model_2x31(image.bits) if model is not None: exam = Exam(image, model, solutions[model], valid_student_ids, im_id, options.save_stats) exam.grade() exam.draw_answers() else: success = False events = pygame.event.get() for event in events: if event.type == QUIT or \ (event.type == KEYDOWN and event.key == 27): sys.exit(0) elif event.type == KEYDOWN: if event.key == ord('p') and options.debug: imageproc_options['show-image-proc'] = \ not imageproc_options['show-image-proc'] elif event.key == ord('l') and options.debug: imageproc_options['show-lines'] = \ not imageproc_options['show-lines'] show_image(image.image_drawn, screen) if success: continue_waiting = True while continue_waiting: event = pygame.event.wait() if event.type == QUIT: sys.exit(0) elif event.type == KEYDOWN: if event.key == 27: sys.exit(0) elif event.key == 8: continue_waiting = False elif event.key == 32: stats = profiler.finish_exam(exam) exam.save_image(save_pattern) exam.save_answers(answers_file, stats) if options.debug: exam.save_debug_images(save_pattern) im_id += 1 continue_waiting = False elif event.key == ord('i'): exam.invalidate_id() show_image(exam.image.image_drawn, screen) elif event.key == 9 and options.ids_file is not None: if len(exam.student_id_filter) == 0: exam.try_next_student_id() else: exam.reset_student_id_editor() profiler.count_student_id_change() show_image(exam.image.image_drawn, screen) elif event.key >= ord('0') and event.key <= ord('9') \ and options.ids_file is not None: exam.filter_student_id(chr(event.key)) profiler.count_student_id_change() show_image(exam.image.image_drawn, screen) elif event.key == ord('p') and options.debug: imageproc_options['show-image-proc'] = \ not imageproc_options['show-image-proc'] continue_waiting = False elif event.key == ord('l') and options.debug: imageproc_options['show-lines'] = \ not imageproc_options['show-lines'] continue_waiting = False elif event.type == MOUSEBUTTONDOWN and event.button == 1: cell = cell_clicked(exam.image, event.pos) if cell is not None: question, answer = cell exam.toggle_answer(question, answer) show_image(exam.image.image_drawn, screen) dump_camera_buffer(camera) else: pygame.time.delay(int(1000 * 1.0/fps)) | ecdbd9b1f488bfe4f23522574c917d71da040b96 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12267/ecdbd9b1f488bfe4f23522574c917d71da040b96/camgrade.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
702,
273,
855,
67,
4172,
67,
2116,
1435,
642,
273,
855,
67,
1425,
1435,
1923,
67,
4951,
273,
642,
18,
588,
2668,
1886,
2187,
296,
5688,
17,
3459,
17,
4951,
6134,
225,
309,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
702,
273,
855,
67,
4172,
67,
2116,
1435,
642,
273,
855,
67,
1425,
1435,
1923,
67,
4951,
273,
642,
18,
588,
2668,
1886,
2187,
296,
5688,
17,
3459,
17,
4951,
6134,
225,
309,... |
Ordinarily, they do, but if handling a default route expressed as | Ordinarily they do, but if handling a default route expressed as | def __nonzero__(self): """All IPy objects should evaluate to true in boolean context. Ordinarily, they do, but if handling a default route expressed as 0.0.0.0/0, the __len__() of the object becomes 0, which is used as the boolean value of the object. """ return 1 | beeb5ca0480c8d1ae505244beb56772f807ba70e /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/14367/beeb5ca0480c8d1ae505244beb56772f807ba70e/IPy.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
26449,
972,
12,
2890,
4672,
3536,
1595,
2971,
93,
2184,
1410,
5956,
358,
638,
316,
1250,
819,
18,
2965,
72,
267,
10243,
2898,
741,
16,
1496,
309,
5057,
279,
805,
1946,
26863,
487,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
26449,
972,
12,
2890,
4672,
3536,
1595,
2971,
93,
2184,
1410,
5956,
358,
638,
316,
1250,
819,
18,
2965,
72,
267,
10243,
2898,
741,
16,
1496,
309,
5057,
279,
805,
1946,
26863,
487,
... |
print "Plugins", Plugins self.settings.dummy = ConfigNothing() | def __call__(self, *args, **kwargs): self.fnc(*self.args) | 68c456f12b1e72cf982997d4d528281734021a85 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6652/68c456f12b1e72cf982997d4d528281734021a85/AudioSelection.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1991,
972,
12,
2890,
16,
380,
1968,
16,
2826,
4333,
4672,
365,
18,
4293,
71,
30857,
2890,
18,
1968,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1991,
972,
12,
2890,
16,
380,
1968,
16,
2826,
4333,
4672,
365,
18,
4293,
71,
30857,
2890,
18,
1968,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... | |
assert_equal(cephes.exp10(2),100.0) | assert_approx_equal(cephes.exp10(2),100.0) | def check_exp10(self): assert_equal(cephes.exp10(2),100.0) | e5297972670d13fef142a7671dfa40ec1089de07 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/e5297972670d13fef142a7671dfa40ec1089de07/test_basic.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
67,
2749,
2163,
12,
2890,
4672,
1815,
67,
9729,
12,
311,
844,
281,
18,
2749,
2163,
12,
22,
3631,
6625,
18,
20,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
67,
2749,
2163,
12,
2890,
4672,
1815,
67,
9729,
12,
311,
844,
281,
18,
2749,
2163,
12,
22,
3631,
6625,
18,
20,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
if not rep_err: | if rep_err: | def handle_exception(exc_info, conf, error_stream, html=True): """ You can also use exception handling outside of a web context, like:: import sys import paste import paste.error_middleware try: do stuff except: paste.error_middleware.exception_handler( sys.exc_info(), paste.CONFIG, sys.stderr, html=False) If you want to report, but not fully catch the exception, call ``raise`` after ``exception_handler``, which (when given no argument) will reraise the exception. """ reported = False exc_data = collector.collect_exception(*exc_info) extra_data = '' if conf.get('error_email'): rep = reporter.EmailReporter( to_addresses=conf['error_email'], from_address=conf.get('error_email_from', 'errors@localhost'), smtp_server=conf.get('smtp_server', 'localhost'), subject_prefix=conf.get('error_subject_prefix', '')) rep_err = send_report(rep, exc_data, html=html) if not rep_err: extra_data += rep_err reported = True if conf.get('error_log'): rep = reporter.LogReporter( filename=conf['error_log']) rep_err = send_report(rep, exc_data, html=html) if not rep_err: extra_data += rep_err reported = True if conf.get('show_exceptions_in_error_log', True): rep = reporter.FileReporter( file=error_stream) rep_err = send_report(rep, exc_data, html=html) if not rep_err: extra_data += rep_err reported = True else: error_stream.write('Error - %s: %s\n' % ( exc_data.exception_type, exc_data.exception_value)) if html: if conf.get('debug', False): error_html = formatter.format_html(exc_data, include_hidden_frames=True) return_error = error_template( error_html, extra_data) extra_data = '' reported = True else: error_message = conf.get('error_message') return_error = error_template( error_message or ''' An error occurred. See the error logs for more information. (Turn debug on to display exception reports here) ''', '') else: return_error = None if not reported and error_stream: err_report = formatter.format_text(exc_data, show_hidden_frames=True) err_report += '\n' + '-'*60 + '\n' error_stream.write(err_report) if extra_data: error_stream.write(extra_data) return return_error | edfa568c3c0d14678c4445912ce23b14afdb4c21 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2097/edfa568c3c0d14678c4445912ce23b14afdb4c21/errormiddleware.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
67,
4064,
12,
10075,
67,
1376,
16,
2195,
16,
555,
67,
3256,
16,
1729,
33,
5510,
4672,
3536,
4554,
848,
2546,
999,
1520,
5057,
8220,
434,
279,
3311,
819,
16,
3007,
2866,
225,
1930... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
67,
4064,
12,
10075,
67,
1376,
16,
2195,
16,
555,
67,
3256,
16,
1729,
33,
5510,
4672,
3536,
4554,
848,
2546,
999,
1520,
5057,
8220,
434,
279,
3311,
819,
16,
3007,
2866,
225,
1930... |
type2 = subtree2.root.ret | try: type2 = subtree2.root.ret except AttributeError: type2 = subtree2.ret | def cxTypedTreeOnePoint(ind1, ind2): """ Randomly select in each individual and exchange each subtree with the point as root between each individual. Since the node are strongly typed, the operator then make sure the the type of second node correspond to the type of the first node. It it doesn't it randomly select another point in the second individual and try again. It tries up to 5 times before returning the unmodified individuals. """ child1 = copy.deepcopy(ind1) child2 = copy.deepcopy(ind2) # choose the crossover point in each individual try: index1 = random.randint(1, child1.size-1) index2 = random.randint(1, child2.size-1) except ValueError: return child1, child2 subtree1 = child1.search_subtree_dfs(index1) type1 = subtree1.root.ret subtree2 = child2.search_subtree_dfs(index2) type2 = subtree2.root.ret # try to mate the trees # if not crossover point is found after MAX_CX_TRY # the children are returned without modifications. tries = 0 MAX_CX_TRY = 5 while not (type1 is type2) and tries != MAX_CX_TRY: index2 = random.randint(1, child2.size-1) subtree2 = child2.search_subtree_dfs(index2) type2 = subtree2.root.ret tries += 1 if type1 is type2: sub1 = ind1.search_subtree_dfs(index1) sub2 = ind2.search_subtree_dfs(index2) child1.set_subtree_dfs(index1, sub2) child2.set_subtree_dfs(index2, sub1) try: del child1.fitness.values del child2.fitness.values except AttributeError: pass return child1, child2 | bd5e0d2d09dc8596d272cdba3c321be2af2a3ce4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7315/bd5e0d2d09dc8596d272cdba3c321be2af2a3ce4/toolbox.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9494,
11985,
2471,
3335,
2148,
12,
728,
21,
16,
1547,
22,
4672,
3536,
8072,
715,
2027,
316,
1517,
7327,
471,
7829,
1517,
12773,
598,
326,
1634,
487,
1365,
3086,
1517,
7327,
18,
7897,
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,
9494,
11985,
2471,
3335,
2148,
12,
728,
21,
16,
1547,
22,
4672,
3536,
8072,
715,
2027,
316,
1517,
7327,
471,
7829,
1517,
12773,
598,
326,
1634,
487,
1365,
3086,
1517,
7327,
18,
7897,
326... |
thr.Thread.__init__(self) | DamnThread.__init__(self) | def __init__(self, parent, uris, thengo=False, feedback=True, allownonmodules=True): thr.Thread.__init__(self) self.uris = [] if type(uris) not in (type(()), type([])): uris = [uris] for i in uris: self.uris.append(DamnUnicode(i)) self.parent = parent self.thengo = thengo self.feedback = feedback self.done = False self.result = None self.allownonmodules = allownonmodules Damnlog('DamnVideoLoader spawned with parameters: parent =',parent,'; thengo?',thengo,'; feedback?',feedback,'; allow non-modules?',allownonmodules) | 371889325452e864707c025214d1b8c204b791d0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11142/371889325452e864707c025214d1b8c204b791d0/DamnVid.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
982,
16,
21476,
16,
1508,
3240,
33,
8381,
16,
10762,
33,
5510,
16,
1699,
5836,
6400,
33,
5510,
4672,
463,
301,
82,
3830,
16186,
2738,
972,
12,
2890,
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,
1001,
2738,
972,
12,
2890,
16,
982,
16,
21476,
16,
1508,
3240,
33,
8381,
16,
10762,
33,
5510,
16,
1699,
5836,
6400,
33,
5510,
4672,
463,
301,
82,
3830,
16186,
2738,
972,
12,
2890,
13,
... |
replace_chars = ( '/', '?', ':', '!', '<', '>', '&', '*', '|') | replace_chars = ( '/', '?', ':', '!', '<', '>', '&', '*', '|', '"') | def add_episode_from_channel( self, channel, episode): replace_chars = ( '/', '?', ':', '!', '<', '>', '&', '*', '|') | 804585b3b62436e9a2021b1b3970069b23327332 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12778/804585b3b62436e9a2021b1b3970069b23327332/libipodsync.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
67,
29687,
67,
2080,
67,
4327,
12,
365,
16,
1904,
16,
17054,
4672,
1453,
67,
7549,
273,
261,
2023,
16,
13023,
2187,
4290,
2187,
11817,
2187,
2368,
2187,
7481,
16,
5183,
2187,
14609,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
67,
29687,
67,
2080,
67,
4327,
12,
365,
16,
1904,
16,
17054,
4672,
1453,
67,
7549,
273,
261,
2023,
16,
13023,
2187,
4290,
2187,
11817,
2187,
2368,
2187,
7481,
16,
5183,
2187,
14609,... |
pass | pass | def replace(s, old, new, maxsplit=0): """replace (str, old, new[, maxsplit]) -> string Return a copy of string str with all occurrences of substring old replaced by new. If the optional argument maxsplit is given, only the first maxsplit occurrences are replaced. """ return s.replace(old, new, maxsplit) | 41e1b79f8a54a22203727f5ced66902108fda7d7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/41e1b79f8a54a22203727f5ced66902108fda7d7/string.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1453,
12,
87,
16,
1592,
16,
394,
16,
943,
4939,
33,
20,
4672,
3536,
2079,
261,
701,
16,
1592,
16,
394,
63,
16,
943,
4939,
5717,
317,
533,
225,
2000,
279,
1610,
434,
533,
609,
598,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1453,
12,
87,
16,
1592,
16,
394,
16,
943,
4939,
33,
20,
4672,
3536,
2079,
261,
701,
16,
1592,
16,
394,
63,
16,
943,
4939,
5717,
317,
533,
225,
2000,
279,
1610,
434,
533,
609,
598,
... |
StyledTextCtrls.PythonStyledTextCtrlMix.__init__(self, wId, -1) | StyledTextCtrls.PythonStyledTextCtrlMix.__init__(self, wId, ()) | def __init__(self, parent, wId): StyledTextCtrls.wxStyledTextCtrl.__init__(self, parent, wId, style = wxCLIP_CHILDREN) StyledTextCtrls.CallTipCodeHelpSTCMix.__init__(self) StyledTextCtrls.PythonStyledTextCtrlMix.__init__(self, wId, -1) | 5ad21a150f4933abf1d43fc72ecf4bb2d6645cee /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/5ad21a150f4933abf1d43fc72ecf4bb2d6645cee/ShellEditor.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
982,
16,
341,
548,
4672,
934,
93,
1259,
1528,
39,
313,
3251,
18,
27226,
24273,
1259,
1528,
12418,
16186,
2738,
972,
12,
2890,
16,
982,
16,
341,
548,
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,
1001,
2738,
972,
12,
2890,
16,
982,
16,
341,
548,
4672,
934,
93,
1259,
1528,
39,
313,
3251,
18,
27226,
24273,
1259,
1528,
12418,
16186,
2738,
972,
12,
2890,
16,
982,
16,
341,
548,
16,
... |
c = Column(name or self.name, self.type, fk, self.default, key = name or self.key, primary_key = self.primary_key, nullable=self.nullable, hidden=self.hidden) | c = Column(name or self.name, self.type, fk, self.default, key = name or self.key, primary_key = self.primary_key, nullable = self.nullable, hidden = self.hidden) | def _make_proxy(self, selectable, name = None): """creates a copy of this Column, initialized the way this Column is""" if self.foreign_key is None: fk = None else: fk = self.foreign_key.copy() c = Column(name or self.name, self.type, fk, self.default, key = name or self.key, primary_key = self.primary_key, nullable=self.nullable, hidden=self.hidden) c.table = selectable c._orig = self.original if not c.hidden: selectable.columns[c.key] = c if self.primary_key: selectable.primary_key.append(c) c._impl = self.engine.columnimpl(c) if fk is not None: c._init_items(fk) return c | f70f641dd69e98251089453b8fc5a94799c4a12d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1074/f70f641dd69e98251089453b8fc5a94799c4a12d/schema.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
6540,
67,
5656,
12,
2890,
16,
26208,
16,
508,
273,
599,
4672,
3536,
19787,
279,
1610,
434,
333,
4753,
16,
6454,
326,
4031,
333,
4753,
353,
8395,
309,
365,
18,
12774,
67,
856,
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,
6540,
67,
5656,
12,
2890,
16,
26208,
16,
508,
273,
599,
4672,
3536,
19787,
279,
1610,
434,
333,
4753,
16,
6454,
326,
4031,
333,
4753,
353,
8395,
309,
365,
18,
12774,
67,
856,
353,... |
null = ZopePageTemplate( | MACROS['linkpanel'] = MACROS['links'] MACROS['navpanel'] = MACROS['hierarchylinks'] nullmacro = ZopePageTemplate( | def addErrorTo(text,error): return """<div class="error">%s</div>\n%s""" % (error,text) | 825ff76e6fd5d7e5eff1e567f301967d56ff6e21 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5225/825ff76e6fd5d7e5eff1e567f301967d56ff6e21/Views.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9501,
774,
12,
955,
16,
1636,
4672,
327,
3536,
32,
2892,
667,
1546,
1636,
24038,
87,
1757,
2892,
5333,
82,
9,
87,
8395,
738,
261,
1636,
16,
955,
13,
225,
2,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
9501,
774,
12,
955,
16,
1636,
4672,
327,
3536,
32,
2892,
667,
1546,
1636,
24038,
87,
1757,
2892,
5333,
82,
9,
87,
8395,
738,
261,
1636,
16,
955,
13,
225,
2,
-100,
-100,
-100,
-100,
-... |
if not alive: continue | if not alive(): continue | def _stop_all_backends(self): """ Notify all backends registered via Router.add_backend that they should stop. This method cannot guarantee that backends **will** stop in a timely manner. """ | 6a9d6c93742e37d36ac0d047ecb8c9fd38322ca8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11809/6a9d6c93742e37d36ac0d047ecb8c9fd38322ca8/router.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
5681,
67,
454,
67,
823,
5839,
12,
2890,
4672,
3536,
10918,
777,
18015,
4104,
3970,
9703,
18,
1289,
67,
9993,
716,
2898,
1410,
2132,
18,
1220,
707,
2780,
18779,
716,
18015,
2826,
201... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
389,
5681,
67,
454,
67,
823,
5839,
12,
2890,
4672,
3536,
10918,
777,
18015,
4104,
3970,
9703,
18,
1289,
67,
9993,
716,
2898,
1410,
2132,
18,
1220,
707,
2780,
18779,
716,
18015,
2826,
201... |
pid = Importer.store_project(self, "") | pid = Importer.store_project(self, "F/") | def run(self, path): items = {} f = open(path) self.cursor = self.conn.cursor() for line in f: en, fy = line.rstrip().split(" | ") items[en] = { "fy" : fy } pid = Importer.store_project(self, "") self.store_phrases(pid, items) | 65ea60b66b8aeb6a0727492a47a5c8b1c411e8b7 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3042/65ea60b66b8aeb6a0727492a47a5c8b1c411e8b7/import_step1.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
16,
589,
4672,
1516,
273,
2618,
284,
273,
1696,
12,
803,
13,
365,
18,
9216,
273,
365,
18,
4646,
18,
9216,
1435,
364,
980,
316,
284,
30,
570,
16,
28356,
273,
980,
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,
1086,
12,
2890,
16,
589,
4672,
1516,
273,
2618,
284,
273,
1696,
12,
803,
13,
365,
18,
9216,
273,
365,
18,
4646,
18,
9216,
1435,
364,
980,
316,
284,
30,
570,
16,
28356,
273,
980,
18,
... |
if d.widget == 'String': pass | if d.widget == 'String': widget = StringWidget(visible=visible) | def schema_update(self, REQUEST, RESPONSE=None): """ update a schema schema """ | 705b8a31042adcac3f929c23d99b6bfcd018194a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1807/705b8a31042adcac3f929c23d99b6bfcd018194a/SchemaEditor.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1963,
67,
2725,
12,
2890,
16,
12492,
16,
20645,
33,
7036,
4672,
3536,
1089,
279,
1963,
1963,
3536,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1963,
67,
2725,
12,
2890,
16,
12492,
16,
20645,
33,
7036,
4672,
3536,
1089,
279,
1963,
1963,
3536,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
self.search_box = searchbox.SearchBox() | def __init__(self, title, rect): widgetset.MainWindow.__init__(self, title, rect) self.main_area_holder = WidgetHolder() self.splitter = widgetset.Splitter() self.splitter.set_left(tablist.TabListBox()) self.splitter.set_right(self.main_area_holder) hbox = widgetset.HBox() self.search_box = searchbox.SearchBox() self.videobox = videobox.VideoBox() hbox.pack_start(self.search_box) hbox.pack_end(self.videobox, expand=True) self.controls_hbox = hbox | c1762463eaeefebdb017f6297c26ac02218b4363 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12354/c1762463eaeefebdb017f6297c26ac02218b4363/window.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
2077,
16,
4917,
4672,
3604,
542,
18,
6376,
3829,
16186,
2738,
972,
12,
2890,
16,
2077,
16,
4917,
13,
225,
365,
18,
5254,
67,
5036,
67,
4505,
273,
11103,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2077,
16,
4917,
4672,
3604,
542,
18,
6376,
3829,
16186,
2738,
972,
12,
2890,
16,
2077,
16,
4917,
13,
225,
365,
18,
5254,
67,
5036,
67,
4505,
273,
11103,
... | |
this = apply(_quickfix.new_MessageStoreExceptionWrapper, args) | this = _quickfix.new_MessageStoreExceptionWrapper(*args) | def __init__(self, *args): this = apply(_quickfix.new_MessageStoreExceptionWrapper, args) try: self.this.append(this) except: self.this = this | 7e632099fd421880c8c65fb0cf610d338d115ee9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8819/7e632099fd421880c8c65fb0cf610d338d115ee9/quickfix.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
380,
1968,
4672,
333,
273,
389,
19525,
904,
18,
2704,
67,
1079,
21151,
3611,
30857,
1968,
13,
775,
30,
365,
18,
2211,
18,
6923,
12,
2211,
13,
1335,
30,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
380,
1968,
4672,
333,
273,
389,
19525,
904,
18,
2704,
67,
1079,
21151,
3611,
30857,
1968,
13,
775,
30,
365,
18,
2211,
18,
6923,
12,
2211,
13,
1335,
30,
... |
AbelianGroup( 3, [0, 3, 4]) | Abelian Group isomorphic to Z x Z/3Z x Z/4Z | def _gap_init_(self): r""" Return string that defines corresponding abelian group in GAP. | 474e9cd21e5543c10385340d5e9747ad7d0f1773 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9890/474e9cd21e5543c10385340d5e9747ad7d0f1773/abelian_group.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
14048,
67,
2738,
67,
12,
2890,
4672,
436,
8395,
2000,
533,
716,
11164,
4656,
1223,
292,
2779,
1041,
316,
611,
2203,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
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,
14048,
67,
2738,
67,
12,
2890,
4672,
436,
8395,
2000,
533,
716,
11164,
4656,
1223,
292,
2779,
1041,
316,
611,
2203,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
args.append( rowObject.findAttribute(keyColumn)) | args.append(self.quote_value(rowObject.findAttribute(keyColumn), type)) | def updateRowSQL(self, rowObject): """build SQL to update my current state. """ args = [] tableInfo = self.schema[rowObject.rowTableName] # build update attributes for column, type in tableInfo.rowColumns: if not getKeyColumn(rowObject.__class__, column): args.append(rowObject.findAttribute(column)) # build where clause for keyColumn, type in tableInfo.rowKeyColumns: args.append( rowObject.findAttribute(keyColumn)) | 3d1177b78afa568866d5353481d56f6ca39d9790 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/3d1177b78afa568866d5353481d56f6ca39d9790/sqlreflector.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
1999,
3997,
12,
2890,
16,
1027,
921,
4672,
3536,
3510,
3063,
358,
1089,
3399,
783,
919,
18,
3536,
833,
273,
5378,
25926,
273,
365,
18,
4821,
63,
492,
921,
18,
492,
7147,
65,
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,
1089,
1999,
3997,
12,
2890,
16,
1027,
921,
4672,
3536,
3510,
3063,
358,
1089,
3399,
783,
919,
18,
3536,
833,
273,
5378,
25926,
273,
365,
18,
4821,
63,
492,
921,
18,
492,
7147,
65,
468,... |
dotted_req_host = "."+req_host | req_host = "."+req_host | def domain_return_ok(self, domain, request): # Liberal check of. This is here as an optimization to avoid # having to load lots of MSIE cookie files unless necessary. req_host, erhn = eff_request_host(request) if not req_host.startswith("."): dotted_req_host = "."+req_host if not erhn.startswith("."): dotted_erhn = "."+erhn if not (dotted_req_host.endswith(domain) or dotted_erhn.endswith(domain)): #debug(" request domain %s does not match cookie domain %s", # req_host, domain) return False | bab4143348f2185c1a9a778a281ef84d46307842 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/bab4143348f2185c1a9a778a281ef84d46307842/cookielib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2461,
67,
2463,
67,
601,
12,
2890,
16,
2461,
16,
590,
4672,
468,
10560,
11612,
866,
434,
18,
225,
1220,
353,
2674,
487,
392,
14850,
358,
4543,
468,
7999,
358,
1262,
328,
6968,
434,
490... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2461,
67,
2463,
67,
601,
12,
2890,
16,
2461,
16,
590,
4672,
468,
10560,
11612,
866,
434,
18,
225,
1220,
353,
2674,
487,
392,
14850,
358,
4543,
468,
7999,
358,
1262,
328,
6968,
434,
490... |
table:style-name="table-default.cell-A4"> | table:style-name="table-default.cell-A2"> | def test_table_thead_tbody(self): """Test <thead> tag with <tbody>""" html = """<html xmlns="http://www.w3.org/1999/xhtml"> <table> <thead> <tr> <th>Cell1</th> <th>Cell2</th> </tr> </thead> <tbody> <tr> <td>Cell3</td> <td>Cell4</td> </tr> </tbody> </table> </html> """ odt = xhtml2odt(html) # remove namespaces odt = re.sub('(xmlns:[a-z0-9=:".-]+\s+)*', '', str(odt)) # remove comments odt = re.sub('(<!--[a-z0-9=-]+-->)*', '', odt) print odt assert re.search(r""" <table:table \s+ table:style-name="table-default"> \s* <table:table-column \s+ table:number-columns-repeated="2"/> \s* <table:table-header-rows> \s* <table:table-row> \s* | 3cc3d03720f39c36a6c4059ab97c21fe3ef8f42c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7063/3cc3d03720f39c36a6c4059ab97c21fe3ef8f42c/test_tables.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
2121,
67,
24604,
67,
20779,
12,
2890,
4672,
3536,
4709,
411,
24604,
34,
1047,
598,
411,
20779,
2984,
3660,
1729,
273,
3536,
32,
2620,
12302,
1546,
2505,
2207,
5591,
18,
91,
23,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
2121,
67,
24604,
67,
20779,
12,
2890,
4672,
3536,
4709,
411,
24604,
34,
1047,
598,
411,
20779,
2984,
3660,
1729,
273,
3536,
32,
2620,
12302,
1546,
2505,
2207,
5591,
18,
91,
23,... |
info = str(result["Value"]) info = info.replace("(","[") info = info.replace(")","]") | info = result["Value"] | def __getLoggingInfo(self,id): print "LoggingInfo:",id result = RPC.getJobLoggingInfo(id) if result["OK"]: | fbaa2914725f02e53a67e2973cb3c2b561ff705e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12767/fbaa2914725f02e53a67e2973cb3c2b561ff705e/JobMonitor.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
588,
7735,
966,
12,
2890,
16,
350,
4672,
1172,
315,
7735,
966,
2773,
16,
350,
563,
273,
8295,
18,
588,
2278,
7735,
966,
12,
350,
13,
309,
563,
9614,
3141,
11929,
30,
2,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
588,
7735,
966,
12,
2890,
16,
350,
4672,
1172,
315,
7735,
966,
2773,
16,
350,
563,
273,
8295,
18,
588,
2278,
7735,
966,
12,
350,
13,
309,
563,
9614,
3141,
11929,
30,
2,
-100,
-... |
return Exception.__str__(self) + " " + self.get_error_message() | if self.get_error_message() is None: return Exception.__str__(self) else: return Exception.__str__(self) + " " + self.get_error_message() | def __str__(self): return Exception.__str__(self) + " " + self.get_error_message() | e8a0109538b79471154739ee341b941170cf76f9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8293/e8a0109538b79471154739ee341b941170cf76f9/libvir.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
701,
972,
12,
2890,
4672,
327,
1185,
16186,
701,
972,
12,
2890,
13,
397,
315,
315,
397,
365,
18,
588,
67,
1636,
67,
2150,
1435,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
701,
972,
12,
2890,
4672,
327,
1185,
16186,
701,
972,
12,
2890,
13,
397,
315,
315,
397,
365,
18,
588,
67,
1636,
67,
2150,
1435,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
unittest2.TestCase.__init__(self) | FrameworkTestCase.__init__(self) | def __init__(self, fn): unittest2.TestCase.__init__(self) self.fn = fn try: self.name = fn.__module__.split(".", 1)[-1] + "." + fn.__name__ except AttributeError: self.name = str(fn) | 2abd69230f00f31fac225af8d31bd8cdd03fdcab /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6121/2abd69230f00f31fac225af8d31bd8cdd03fdcab/test_framework.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
2295,
4672,
13472,
4709,
2449,
16186,
2738,
972,
12,
2890,
13,
365,
18,
4293,
273,
2295,
775,
30,
365,
18,
529,
273,
2295,
16186,
2978,
25648,
4939,
2932,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2295,
4672,
13472,
4709,
2449,
16186,
2738,
972,
12,
2890,
13,
365,
18,
4293,
273,
2295,
775,
30,
365,
18,
529,
273,
2295,
16186,
2978,
25648,
4939,
2932,
... |
"Xapian::Query((Zfoo:(pos=1) AND (out:(pos=2) OR outsid:(pos=2) OR Zoutsid:(pos=2))))") | "Xapian::Query((Zfoo:(pos=1) AND (out:(pos=2) OR outsid:(pos=2) OR Zo:(pos=2))))") | def __call__(self, term): return (not term.startswith('a')) | 3898ed01cfd3c25f03738c7b1b98a884dee056a3 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/569/3898ed01cfd3c25f03738c7b1b98a884dee056a3/smoketest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1991,
972,
12,
2890,
16,
2481,
4672,
327,
261,
902,
2481,
18,
17514,
1918,
2668,
69,
26112,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1991,
972,
12,
2890,
16,
2481,
4672,
327,
261,
902,
2481,
18,
17514,
1918,
2668,
69,
26112,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
wtmpfname = wtmpfname.replace('\\', '/') | def checkTeXPaths(): ''' Determine the path-style needed by the TeX engine on Win32 (Cygwin) ''' windows_style_tex_paths = '' if os.name == 'nt' or sys.platform == 'cygwin': from tempfile import mkstemp fd, tmpfname = mkstemp(suffix='.ltx') # a wrapper file wfd, wtmpfname = mkstemp(suffix='.ltx') if os.name == 'nt': inpname = tmpfname.replace('\\', '/') wtmpfname = wtmpfname.replace('\\', '/') else: inpname = cmdOutput('cygpath -m ' + tmpfname) wtmpfname = cmdOutput('cygpath -m ' + wtmpfname) os.write(fd, r''' | f8404ec837a5762ddeea85959c701d39ed799f2f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7514/f8404ec837a5762ddeea85959c701d39ed799f2f/configure.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
21575,
60,
4466,
13332,
9163,
10229,
326,
589,
17,
4060,
3577,
635,
326,
28602,
60,
4073,
603,
21628,
1578,
261,
39,
4338,
8082,
13,
9163,
9965,
67,
4060,
67,
21763,
67,
4481,
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,
866,
21575,
60,
4466,
13332,
9163,
10229,
326,
589,
17,
4060,
3577,
635,
326,
28602,
60,
4073,
603,
21628,
1578,
261,
39,
4338,
8082,
13,
9163,
9965,
67,
4060,
67,
21763,
67,
4481,
273,
... | |
def cmp(f1, f2, shallow=1, use_statcache=0): | def cmp(f1, f2, shallow=1, use_statcache=None): | def cmp(f1, f2, shallow=1, use_statcache=0): """Compare two files. Arguments: f1 -- First file name f2 -- Second file name shallow -- Just check stat signature (do not read the files). defaults to 1. use_statcache -- obsolete argument. Return value: True if the files are the same, False otherwise. This function uses a cache for past comparisons and the results, with a cache invalidation mechanism relying on stale signatures. """ s1 = _sig(os.stat(f1)) s2 = _sig(os.stat(f2)) if s1[0] != stat.S_IFREG or s2[0] != stat.S_IFREG: return False if shallow and s1 == s2: return True if s1[1] != s2[1]: return False result = _cache.get((f1, f2)) if result and (s1, s2) == result[:2]: return result[2] outcome = _do_cmp(f1, f2) _cache[f1, f2] = s1, s2, outcome return outcome | f5b022eb9948eeaedcb020e056816f26af05f2be /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/f5b022eb9948eeaedcb020e056816f26af05f2be/filecmp.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9411,
12,
74,
21,
16,
284,
22,
16,
18501,
33,
21,
16,
999,
67,
5642,
2493,
33,
7036,
4672,
3536,
8583,
2795,
1390,
18,
225,
13599,
30,
225,
284,
21,
1493,
5783,
585,
508,
225,
284,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9411,
12,
74,
21,
16,
284,
22,
16,
18501,
33,
21,
16,
999,
67,
5642,
2493,
33,
7036,
4672,
3536,
8583,
2795,
1390,
18,
225,
13599,
30,
225,
284,
21,
1493,
5783,
585,
508,
225,
284,
... |
if True in map(lambda x in state, ['h', 's', 'S', 'T', 'w']): | if True in map(lambda x: x in state, ['h', 's', 'S', 'T', 'w']): | def parseJobState(self, state): if True in map(lambda x in state, ['h', 's', 'S', 'T', 'w']): return Job.QUEUED if True in map(lambda x in state, ['r', 't']): return Job.RUNNING return Job.READY | cb403baa4c61f0d5c1cea99708dd8cc658b66bb0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8443/cb403baa4c61f0d5c1cea99708dd8cc658b66bb0/sge.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
2278,
1119,
12,
2890,
16,
919,
4672,
309,
1053,
316,
852,
12,
14661,
619,
30,
619,
316,
919,
16,
10228,
76,
2187,
296,
87,
2187,
296,
55,
2187,
296,
56,
2187,
296,
91,
3546,
46... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2278,
1119,
12,
2890,
16,
919,
4672,
309,
1053,
316,
852,
12,
14661,
619,
30,
619,
316,
919,
16,
10228,
76,
2187,
296,
87,
2187,
296,
55,
2187,
296,
56,
2187,
296,
91,
3546,
46... |
_tryorder = ("netscape", "windows-default") | _tryorder = ["netscape", "windows-default"] | def open_new(self, url): self.open(url) | 51532a4d6777fc242823c5c68189a4dcbe5bda46 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/51532a4d6777fc242823c5c68189a4dcbe5bda46/webbrowser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1696,
67,
2704,
12,
2890,
16,
880,
4672,
365,
18,
3190,
12,
718,
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,
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,
1696,
67,
2704,
12,
2890,
16,
880,
4672,
365,
18,
3190,
12,
718,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.