rem
stringlengths
1
226k
add
stringlengths
0
227k
context
stringlengths
6
326k
meta
stringlengths
143
403
input_ids
listlengths
256
256
attention_mask
listlengths
256
256
labels
listlengths
128
128
self.breakpoints.discard(pb)
self.breakpoints.discard(bp)
def remove_breakpoints(self, *bps): for bp in bps: if hasattr(bp,"atmt_state"): bp = bp.atmt_state self.breakpoints.discard(pb)
2e422593cd8df4ad9a7f37e3ebe7aac39f8ee274 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7311/2e422593cd8df4ad9a7f37e3ebe7aac39f8ee274/automaton.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1206, 67, 8820, 4139, 12, 2890, 16, 380, 70, 1121, 4672, 364, 9107, 316, 324, 1121, 30, 309, 3859, 12, 17152, 10837, 270, 1010, 67, 2019, 6, 4672, 9107, 273, 9107, 18, 270, 1010, 67, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1206, 67, 8820, 4139, 12, 2890, 16, 380, 70, 1121, 4672, 364, 9107, 316, 324, 1121, 30, 309, 3859, 12, 17152, 10837, 270, 1010, 67, 2019, 6, 4672, 9107, 273, 9107, 18, 270, 1010, 67, ...
translation = service.execute( cr.dbname, uid, 'ir.translation', '_get_source', self.name2, 'xsl', lang, node.text)
translation = ir_translation_obj._get_source(cr, uid, self.name2, 'xsl', lang, node.text)
def translate(doc, lang): for node in doc.xpath('//*[@t]'): translation = service.execute( cr.dbname, uid, 'ir.translation', '_get_source', self.name2, 'xsl', lang, node.text) if translation: node.text = translation
d69ca9424e26ef0b783f5357de564f252ace2b84 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/d69ca9424e26ef0b783f5357de564f252ace2b84/interface.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4204, 12, 2434, 16, 3303, 4672, 364, 756, 316, 997, 18, 18644, 2668, 759, 14, 14782, 88, 3864, 4672, 4794, 273, 9482, 67, 10173, 67, 2603, 6315, 588, 67, 3168, 12, 3353, 16, 4555, 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, 4204, 12, 2434, 16, 3303, 4672, 364, 756, 316, 997, 18, 18644, 2668, 759, 14, 14782, 88, 3864, 4672, 4794, 273, 9482, 67, 10173, 67, 2603, 6315, 588, 67, 3168, 12, 3353, 16, 4555, 16, ...
rec = c.next()
rec = self.cur.next()
def finish_test(self, secDB, txn=None): # 'Blues' should not be in the secondary database vals = secDB.pget('Blues', txn=txn) assert vals == None, vals
c5cf731a4deb710892c9083a468a6d173d791456 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/c5cf731a4deb710892c9083a468a6d173d791456/test_associate.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4076, 67, 3813, 12, 2890, 16, 1428, 2290, 16, 7827, 33, 7036, 4672, 468, 296, 4802, 3610, 11, 1410, 486, 506, 316, 326, 9946, 2063, 5773, 273, 1428, 2290, 18, 84, 588, 2668, 4802, 3610...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4076, 67, 3813, 12, 2890, 16, 1428, 2290, 16, 7827, 33, 7036, 4672, 468, 296, 4802, 3610, 11, 1410, 486, 506, 316, 326, 9946, 2063, 5773, 273, 1428, 2290, 18, 84, 588, 2668, 4802, 3610...
self.containers = tuple(categories) self.n = len(categories)
self.containers = tuple(categories) self.n = len(self.containers)
def __init__(self, categories): """ categories is an iterable of containers defining the categories. (Recall that containers are collections that support the "in" operator.) Objects will be mapped to the integer index of the container that contains them. """ self.containers = tuple(categories) # need to assert an order self.n = len(categories)
80d301493a2ea6c45ae6c0c1b6a48b516b0ba221 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3592/80d301493a2ea6c45ae6c0c1b6a48b516b0ba221/rate.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 6477, 4672, 3536, 6477, 353, 392, 6087, 434, 8475, 9364, 326, 6477, 18, 261, 426, 1991, 716, 8475, 854, 6980, 716, 2865, 326, 315, 267, 6, 3726, 12998, 8...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 6477, 4672, 3536, 6477, 353, 392, 6087, 434, 8475, 9364, 326, 6477, 18, 261, 426, 1991, 716, 8475, 854, 6980, 716, 2865, 326, 315, 267, 6, 3726, 12998, 8...
elif node.type in [ "block", "assignment", "call", "operation", "definitionList", "return", "break", "continue", "delete", "accessor", "instantiation", "throw", "variable" ]:
elif node.type in [ "group", "block", "assignment", "call", "operation", "definitionList", "return", "break", "continue", "delete", "accessor", "instantiation", "throw", "variable" ]:
def compileNode(node): global pretty global indent ##################################################################################################################### # Recover styling ##################################################################################################################### if pretty: # Recover exclicit breaks if node.get("breakBefore", False) and not node.isFirstChild(True): sep() # Additional explicit break before complex blocks if node.hasParent() and not node.isFirstChild(True) and node.parent.type in [ "block", "file"] and node.isComplex(): sep() ##################################################################################################################### # Insert comments before ##################################################################################################################### if pretty: if node.getChild("commentsBefore", False) != None: commentCounter = 0 commentsBefore = node.getChild("commentsBefore") isFirst = node.isFirstChild() previous = node.getPreviousSibling(False, True) if previous and previous.type in [ "case", "default" ]: inCase = True else: inCase = False inOperation = node.parent.type in [ "first", "second", "third" ] and node.parent.parent.type == "operation" for child in commentsBefore.children: docComment = child.get("detail") in [ "javadoc", "qtdoc" ] headComment = child.get("detail") == "header" areaComment = child.get("detail") == "area" divComment = child.get("detail") == "divider" blockComment = child.get("detail") == "block" singleLineBlock = child.get("detail") != "inline" and child.get("multiline") == False if not child.isFirstChild(): pass elif inCase: pass elif singleLineBlock: if child.get("begin"): sep() else: space() elif areaComment and not isFirst: area() elif divComment and not isFirst: divide() elif not isFirst: sep() elif inOperation: sep() elif not headComment: line() # reindenting first text = child.get("text") if child.get("detail") == "qtdoc": text = comment.qt2javadoc(text) write(comment.indent(text, INDENTSPACES * indent)) if singleLineBlock: if child.get("detail") in [ "javadoc", "qtdoc" ]: line() elif child.get("end"): sep() else: space() # separator after divider/head comments and after block comments which are not for documentation elif headComment or areaComment or divComment or blockComment: sep() else: line() ##################################################################################################################### # Opening... ##################################################################################################################### # # OPEN: FINALLY ################################## if node.type == "finally": write("finally") # # OPEN: DELETE ################################## elif node.type == "delete": write("delete") space() # # OPEN: THROW ################################## elif node.type == "throw": write("throw") space() # # OPEN: NEW ################################## elif node.type == "instantiation": write("new") space() # # OPEN: RETURN ################################## elif node.type == "return": write("return") if node.hasChildren(): space() # # OPEN: DEFINITION LIST ################################## elif node.type == "definitionList": write("var") space() # # OPEN: BREAK ################################## elif node.type == "break": write("break") if node.get("label", False): space() write(node.get("label", False)) # # OPEN: CONTINUE ################################## elif node.type == "continue": write("continue") if node.get("label", False): space() write(node.get("label", False)) # # OPEN: FUNCTION ################################## elif node.type == "function": write("function") functionName = node.get("name", False) if functionName != None: space() write(functionName) # # OPEN: IDENTIFIER ################################## elif node.type == "identifier": name = node.get("name", False) if name != None: write(name) # # OPEN: DEFINITION ################################## elif node.type == "definition": if node.parent.type != "definitionList": write("var") space() write(node.get("identifier")) # # OPEN: CONSTANT ################################## elif node.type == "constant": if node.get("constantType") == "string": if node.get("detail") == "singlequotes": write("'") else: write('"') write(node.get("value")) if node.get("detail") == "singlequotes": write("'") else: write('"') else: write(node.get("value")) # # OPEN: COMMENT ################################## elif node.type == "comment": if pretty: # insert a space before and no newline in the case of after comments if node.get("connection") == "after": noline() space() write(node.get("text")) # new line after inline comment (for example for syntactical reasons) if node.get("detail") == "inline": line() else: space() # # OPEN: RIGHT ################################## elif node.type == "right": if node.parent.type == "accessor": write(".") # # OPEN: ASSIGNMENT ################################## elif node.type == "assignment": if node.parent.type == "definition": oper = node.get("operator", False) realNode = node.parent.parent # be compact in for-loops compact = realNode.hasParent() and realNode.parent.type in [ "first", "second", "third" ] and realNode.parent.parent.type == "loop" and realNode.parent.parent.get("loopType") == "FOR" compileToken(oper, compact) # # OPEN: KEY ################################## elif node.type == "key": if node.parent.type == "accessor": write("[") # # OPEN: GROUP ################################## elif node.type == "group": write("(") # # OPEN: VOID ################################## elif node.type == "void": write("void") write("(") # # OPEN: ARRAY ################################## elif node.type == "array": write("[") if node.hasChildren(True): space(False) # # OPEN: PARAMS ################################## elif node.type == "params": noline() write("(") # # OPEN: CASE ################################## elif node.type == "case": if pretty: # force double new lines if not node.isFirstChild() and not node.getPreviousSibling(True).type == "case": sep() minus() line() write("case") space() # # OPEN: DEFAULT ################################## elif node.type == "default": if pretty: minus() # force double new lines if not node.getPreviousSibling(True).type == "case": sep() write("default") write(":") if pretty: plus() line() # # OPEN: TRY ################################## elif node.type == "switch": # Additional new line before each switch/try if not node.isFirstChild(True) and not node.getChild("commentsBefore", False): prev = node.getPreviousSibling(False, True) # No separation after case statements if prev != None and prev.type in [ "case", "default" ]: pass else: sep() if node.get("switchType") == "catch": write("try") elif node.get("switchType") == "case": write("switch") # # OPEN: CATCH ################################## elif node.type == "catch": if pretty: # If this statement block or the previous try were not complex, be not complex here, too if not node.getChild("statement").getChild("block").isComplex() and not node.parent.getChild("statement").getChild("block").isComplex(): noline() space() write("catch") # # OPEN: MAP ################################## elif node.type == "map": par = node.parent if pretty: postProcessMap(node) if pretty: # No break before return statement if node.hasParent() and node.parent.type == "expression" and node.parent.parent.type == "return": pass elif node.isComplex(): line() write("{") if pretty: if node.isComplex(): line() plus() elif node.hasChildren(True): space() # # OPEN: KEYVALUE ################################## elif node.type == "keyvalue": keyString = node.get("key") keyQuote = node.get("quote", False) if keyQuote != None: # print "USE QUOTATION" if keyQuote == "doublequotes": keyString = '"' + keyString + '"' else: keyString = "'" + keyString + "'" elif keyString in config.JSPROTECTED or not KEY.match(keyString): print "Warning: Auto protect key: %s" % keyString keyString = "\"" + keyString + "\"" if pretty and not node.isFirstChild(True) and not node.hasChild("commentsBefore") and node.getChild("value").isComplex(): sep() write(keyString) space(False) # Fill with spaces # Do this only if the parent is complex (many entries) # But not if the value itself is complex if pretty and node.parent.isComplex() and node.parent.get("alignValues"): write(" " * (node.parent.get("maxKeyLength") - len(keyString))) write(":") space(False) # # OPEN: BLOCK ################################## elif node.type == "block": if pretty: if node.isComplex(): line() else: space() write("{") if pretty: if node.hasChildren(): plus() line() # # OPEN: LOOP ################################## elif node.type == "loop": # Additional new line before each loop if not node.isFirstChild(True) and not node.getChild("commentsBefore", False): prev = node.getPreviousSibling(False, True) # No separation after case statements if prev != None and prev.type in [ "case", "default" ]: pass elif node.hasChild("elseStatement") or node.getChild("statement").hasBlockChildren(): sep() else: line() loopType = node.get("loopType") if loopType == "IF": write("if") space(False) elif loopType == "WHILE": write("while") space(False) elif loopType == "FOR": write("for") space(False) elif loopType == "DO": write("do") space(False) elif loopType == "WITH": write("with") space(False) else: print "Warning: Unknown loop type: %s" % loopType # # OPEN: ELSE ################################## elif node.type == "elseStatement": if node.hasChild("commentsBefore"): pass elif pretty: if not node.hasChild("block") and not node.hasChild("loop"): pass elif not node.isComplex(): noline() space() write("else") # This is a elseStatement without a block around (a set of {}) if not node.hasChild("block"): space() # # OPEN: EXPRESSION ################################## elif node.type == "expression": if node.parent.type == "loop": loopType = node.parent.get("loopType") # only do-while loops if loopType == "DO": if pretty: stmnt = node.parent.getChild("statement") compact = stmnt.hasChild("block") and not stmnt.getChild("block").isComplex() if compact: noline() space() write("while") if pretty: space() # open expression block of IF/WHILE/DO-WHILE/FOR statements write("(") elif node.parent.type == "catch": # open expression block of CATCH statement write("(") elif node.parent.type == "switch" and node.parent.get("switchType") == "case": # open expression block of SWITCH statement write("(") # # OPEN: FIRST ################################## elif node.type == "first": # for loop if node.parent.type == "loop" and node.parent.get("loopType") == "FOR": write("(") # operation elif node.parent.type == "operation": # operation (var a = -1) if node.parent.get("left", False) == True: compileToken(node.parent.get("operator"), True) # # OPEN: SECOND ################################## elif node.type == "second": # for loop if node.parent.type == "loop" and node.parent.get("loopType") == "FOR": if not node.parent.hasChild("first"): write("(;") # operation elif node.parent.type == "operation": if node.isComplex(): # (?: hook operation) if node.parent.get("operator") == "HOOK": sep() else: line() # # OPEN: THIRD ################################## elif node.type == "third": # for loop if node.parent.type == "loop" and node.parent.get("loopType") == "FOR": if not node.parent.hasChild("second"): if node.parent.hasChild("first"): write(";") space(False) else: write("(;;") # operation elif node.parent.type == "operation": # (?: hook operation) if node.parent.get("operator") == "HOOK": if node.isComplex(): sep() # # OPEN: STATEMENT ################################## elif node.type == "statement": # for loop if node.parent.type == "loop" and node.parent.get("loopType") == "FOR": if node.parent.get("forVariant") == "iter": if not node.parent.hasChild("first") and not node.parent.hasChild("second") and not node.parent.hasChild("third"): write("(;;"); elif not node.parent.hasChild("second") and not node.parent.hasChild("third"): write(";") write(")") if not node.hasChild("block"): space(False) ##################################################################################################################### # Children content ##################################################################################################################### if node.hasChildren(): for child in node.children: if not node.type in [ "commentsBefore", "commentsAfter" ]: compileNode(child) ##################################################################################################################### # Closing node ##################################################################################################################### # # CLOSE: IDENTIFIER ################################## if node.type == "identifier": if node.hasParent() and node.parent.type == "variable" and not node.isLastChild(True): write(".") elif node.hasParent() and node.parent.type == "label": write(":") # # CLOSE: ACCESSOR ################################## elif node.type == "accessor": if node.hasParent() and node.parent.type == "variable" and not node.isLastChild(True): write(".") # # CLOSE: KEYVALUE ################################## elif node.type == "keyvalue": if node.hasParent() and node.parent.type == "map" and not node.isLastChild(True): noline() write(",") if pretty: commentNode(node) if node.getChild("value").isComplex(): sep() elif node.parent.isComplex(): line() else: space() # # CLOSE: DEFINITION ################################## elif node.type == "definition": if node.hasParent() and node.parent.type == "definitionList" and not node.isLastChild(True): write(",") if pretty: commentNode(node) if node.hasComplexChildren(): line() else: space() # # CLOSE: LEFT ################################## elif node.type == "left": if node.hasParent() and node.parent.type == "assignment": oper = node.parent.get("operator", False) if node.parent.parent.type == "statementList": realNode = node.parent.parent else: realNode = node.parent # be compact in for-loops compact = realNode.hasParent() and realNode.parent.type in [ "first", "second", "third" ] and realNode.parent.parent.type == "loop" and realNode.parent.parent.get("loopType") == "FOR" compileToken(oper, compact) # # CLOSE: KEY ################################## elif node.type == "key": if node.hasParent() and node.parent.type == "accessor": write("]") # # CLOSE: GROUP ################################## elif node.type == "group": if node.getChildrenLength(True) == 1: noline() write(")") # # CLOSE: VOID ################################## elif node.type == "void": if node.getChildrenLength(True) == 1: noline() write(")") # # CLOSE: ARRAY ################################## elif node.type == "array": if node.hasChildren(True): space(False) write("]") # # CLOSE: PARAMS ################################## elif node.type == "params": write(")") # # CLOSE: MAP ################################## elif node.type == "map": if pretty: if node.isComplex(): line() minus() elif node.hasChildren(True): space() write("}") # # CLOSE: SWITCH ################################## elif node.type == "switch": if node.get("switchType") == "case": if pretty: minus() minus() line() write("}") if pretty: commentNode(node) line() # Force a additinal line feed after each switch/try if pretty and not node.isLastChild(): sep() # # CLOSE: CASE ################################## elif node.type == "case": write(":") if pretty: commentNode(node) plus() line() # # CLOSE: BLOCK ################################## elif node.type == "block": if pretty and node.hasChildren(): minus() line() write("}") if pretty: commentNode(node) if node.hasChildren(): # Newline afterwards if node.parent.type == "body" and node.parent.parent.type == "function": # But only when this isn't a function block inside a assignment if node.parent.parent.parent.type in [ "right", "params" ]: pass elif node.parent.parent.parent.type == "value" and node.parent.parent.parent.parent.type == "keyvalue": pass else: line() else: line() # # CLOSE: LOOP ################################## elif node.type == "loop": if node.get("loopType") == "DO": semicolon() if pretty: commentNode(node) # Force a additinal line feed after each loop if not node.isLastChild(): if node.hasChild("elseStatement"): sep() elif node.getChild("statement").hasBlockChildren(): sep() else: line() # # CLOSE: FUNCTION ################################## elif node.type == "function": if pretty: commentNode(node) if not node.isLastChild() and node.hasParent() and node.parent.type in [ "block", "file" ]: sep() # # CLOSE: EXPRESSION ################################## elif node.type == "expression": if node.parent.type == "loop": write(")") # e.g. a if-construct without a block {} if node.parent.getChild("statement").hasChild("block"): pass elif node.parent.type == "loop" and node.parent.get("loopType") == "DO": pass else: space(False) elif node.parent.type == "catch": write(")") elif node.parent.type == "switch" and node.parent.get("switchType") == "case": write(")") if pretty: commentNode(node) line() write("{") if pretty: plus() plus() # # CLOSE: FIRST ################################## elif node.type == "first": # for loop if node.parent.type == "loop" and node.parent.get("loopType") == "FOR": if node.parent.get("forVariant") == "iter": write(";") if node.parent.hasChild("second"): space(False) # operation elif node.parent.type == "operation" and node.parent.get("left", False) != True: oper = node.parent.get("operator") if node.parent.parent.type == "statementList": realNode = node.parent.parent else: realNode = node.parent compact = realNode.hasParent() and realNode.parent.type in [ "first", "second", "third" ] and realNode.parent.parent.type == "loop" and realNode.parent.parent.get("loopType") == "FOR" compileToken(oper, compact) # # CLOSE: SECOND ################################## elif node.type == "second": # for loop if node.parent.type == "loop" and node.parent.get("loopType") == "FOR": write(";") if node.parent.hasChild("third"): space(False) # operation elif node.parent.type == "operation": # (?: hook operation) if node.parent.get("operator") == "HOOK": noline() space(False) write(":") space(False) # # CLOSE: OTHER ################################## if node.hasParent() and not node.type in [ "comment", "commentsBefore", "commentsAfter" ]: # Add comma dividers between statements in these parents if node.parent.type in [ "array", "params", "statementList" ]: if not node.isLastChild(True): write(",") if pretty: commentNode(node) if node.isComplex(): line() else: space() # Semicolon handling elif node.type in [ "block", "assignment", "call", "operation", "definitionList", "return", "break", "continue", "delete", "accessor", "instantiation", "throw", "variable" ]: # Default semicolon handling if node.parent.type in [ "block", "file" ]: semicolon() if pretty: commentNode(node) line() if node.isComplex() and not node.isLastChild(): sep() # Special handling for switch statements elif node.parent.type == "statement" and node.parent.parent.type == "switch" and node.parent.parent.get("switchType") == "case": semicolon() if pretty: commentNode(node) line() if node.isComplex() and not node.isLastChild(): sep() # Special handling for loops (e.g. if) without blocks {} elif node.parent.type in [ "statement", "elseStatement" ] and not node.parent.hasChild("block") and node.parent.parent.type == "loop": semicolon() if pretty: commentNode(node) line() if node.isComplex() and not node.isLastChild(): sep() # # CLOSE: OTHER ################################## if pretty: # Rest of the after comments (not inserted previously) commentNode(node)
84557024125298e112658377a9b18f2301787c72 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5718/84557024125298e112658377a9b18f2301787c72/compiler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4074, 907, 12, 2159, 4672, 225, 2552, 7517, 2552, 3504, 377, 28256, 10140, 5516, 1970, 468, 868, 3165, 16253, 2456, 28256, 10140, 5516, 1970, 225, 309, 7517, 30, 468, 868, 3165, 4687, 335,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4074, 907, 12, 2159, 4672, 225, 2552, 7517, 2552, 3504, 377, 28256, 10140, 5516, 1970, 468, 868, 3165, 16253, 2456, 28256, 10140, 5516, 1970, 225, 309, 7517, 30, 468, 868, 3165, 4687, 335,...
job.lock_status = None
def RunTask(self, job): # pylint: disable-msg=W0221 """Job executor.
9bdab6219839d70dcea52ad9ffa3b4b449794854 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7542/9bdab6219839d70dcea52ad9ffa3b4b449794854/jqueue.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1939, 2174, 12, 2890, 16, 1719, 4672, 468, 7601, 30, 4056, 17, 3576, 33, 59, 3103, 5340, 3536, 2278, 6601, 18, 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, 1939, 2174, 12, 2890, 16, 1719, 4672, 468, 7601, 30, 4056, 17, 3576, 33, 59, 3103, 5340, 3536, 2278, 6601, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
msg, args, exc_info, func):
msg, args, exc_info, func=None):
def __init__(self, name, level, pathname, lineno, msg, args, exc_info, func): """ Initialize a logging record with interesting information. """ ct = time.time() self.name = name self.msg = msg # # The following statement allows passing of a dictionary as a sole # argument, so that you can do something like # logging.debug("a %(a)d b %(b)s", {'a':1, 'b':2}) # Suggested by Stefan Behnel. # Note that without the test for args[0], we get a problem because # during formatting, we test to see if the arg is present using # 'if self.args:'. If the event being logged is e.g. 'Value is %d' # and if the passed arg fails 'if self.args:' then no formatting # is done. For example, logger.warn('Value is %d', 0) would log # 'Value is %d' instead of 'Value is 0'. # For the use case of passing a dictionary, this should not be a # problem. if args and (len(args) == 1) and args[0] and (type(args[0]) == types.DictType): args = args[0] self.args = args self.levelname = getLevelName(level) self.levelno = level self.pathname = pathname try: self.filename = os.path.basename(pathname) self.module = os.path.splitext(self.filename)[0] except: self.filename = pathname self.module = "Unknown module" self.exc_info = exc_info self.exc_text = None # used to cache the traceback text self.lineno = lineno self.funcName = func self.created = ct self.msecs = (ct - long(ct)) * 1000 self.relativeCreated = (self.created - _startTime) * 1000 if logThreads and thread: self.thread = thread.get_ident() self.threadName = threading.currentThread().getName() else: self.thread = None self.threadName = None if logProcesses and hasattr(os, 'getpid'): self.process = os.getpid() else: self.process = None
4d224b6ba82c953ab5215f2e9ad13f2003771e85 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3187/4d224b6ba82c953ab5215f2e9ad13f2003771e85/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 508, 16, 1801, 16, 9806, 16, 7586, 16, 1234, 16, 833, 16, 3533, 67, 1376, 16, 1326, 33, 7036, 4672, 3536, 9190, 279, 2907, 1409, 598, 26122, 1779, 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, 508, 16, 1801, 16, 9806, 16, 7586, 16, 1234, 16, 833, 16, 3533, 67, 1376, 16, 1326, 33, 7036, 4672, 3536, 9190, 279, 2907, 1409, 598, 26122, 1779, 18, ...
('two', '(compound, (argument, list))',))
('two', '(compound, (argument, list))', 'compound', 'argument', 'list',))
def f5((compound, first), two): pass
4ab7adbd944c72b9f308e940524ca31a10e52bd8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/4ab7adbd944c72b9f308e940524ca31a10e52bd8/test_grammar.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 284, 25, 12443, 22585, 16, 1122, 3631, 2795, 4672, 1342, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 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, 284, 25, 12443, 22585, 16, 1122, 3631, 2795, 4672, 1342, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
test.close()
def compare_missing(a, b): return b[0] - a[0]
34099b403124601d9cd4bde0846a637bf8952cea /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12659/34099b403124601d9cd4bde0846a637bf8952cea/gentest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3400, 67, 7337, 12, 69, 16, 324, 4672, 327, 324, 63, 20, 65, 300, 279, 63, 20, 65, 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...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3400, 67, 7337, 12, 69, 16, 324, 4672, 327, 324, 63, 20, 65, 300, 279, 63, 20, 65, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
self.offline_or_drain = (self.op.offline == True or self.op.drained == True) self.deoffline_or_drain = (self.op.offline == False or self.op.drained == False)
def CheckArguments(self): self.op.node_name = _ExpandNodeName(self.cfg, self.op.node_name) all_mods = [self.op.offline, self.op.master_candidate, self.op.drained] if all_mods.count(None) == 3: raise errors.OpPrereqError("Please pass at least one modification", errors.ECODE_INVAL) if all_mods.count(True) > 1: raise errors.OpPrereqError("Can't set the node into more than one" " state at the same time", errors.ECODE_INVAL)
21232d04ea6caba31434824ecc9dbf29274cfc64 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7542/21232d04ea6caba31434824ecc9dbf29274cfc64/cmdlib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2073, 4628, 12, 2890, 4672, 365, 18, 556, 18, 2159, 67, 529, 273, 389, 12271, 18948, 12, 2890, 18, 7066, 16, 365, 18, 556, 18, 2159, 67, 529, 13, 777, 67, 22760, 273, 306, 2890, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2073, 4628, 12, 2890, 4672, 365, 18, 556, 18, 2159, 67, 529, 273, 389, 12271, 18948, 12, 2890, 18, 7066, 16, 365, 18, 556, 18, 2159, 67, 529, 13, 777, 67, 22760, 273, 306, 2890, 18, ...
else:
else:
def list_identify_VA_albums(self, list): for i in range(len(list)-1): if i + self.NUM_ARTISTS_FOR_VA > len(list)-1: break VA = False for j in range(1, self.NUM_ARTISTS_FOR_VA + 1): if self.library_get_data(list[i], 'album').lower() != self.library_get_data(list[i+j], 'album').lower() \ or self.library_get_data(list[i], 'year') != self.library_get_data(list[i+j], 'year'): break if j == self.NUM_ARTISTS_FOR_VA - 1: VA = True if VA == True: album = self.library_get_data(list[i], 'album') artist = self.VAstr year = self.library_get_data(list[i], 'year') list[i] = self.library_set_data(album=album, artist=artist, year=year) j = 1 while i+j <= len(list)-1: if self.library_get_data(list[i], 'album').lower() == self.library_get_data(list[i+j], 'album').lower() \ and self.library_get_data(list[i], 'year') == self.library_get_data(list[i+j], 'year'): list.pop(i+j) else: break return list
f8375efca8ecf98b4487f6afa47ae77900e371c2 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2312/f8375efca8ecf98b4487f6afa47ae77900e371c2/main.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 666, 67, 31079, 67, 27722, 67, 25090, 87, 12, 2890, 16, 666, 4672, 364, 277, 316, 1048, 12, 1897, 12, 1098, 24950, 21, 4672, 309, 277, 397, 365, 18, 6069, 67, 4928, 5511, 55, 67, 747...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 666, 67, 31079, 67, 27722, 67, 25090, 87, 12, 2890, 16, 666, 4672, 364, 277, 316, 1048, 12, 1897, 12, 1098, 24950, 21, 4672, 309, 277, 397, 365, 18, 6069, 67, 4928, 5511, 55, 67, 747...
u = self.w.getLinkURL(make_link_node(parser.InterwikiLink, u'Physics', u'wiktionary:Physics'))
u = self.w.getLinkURL(make_link_node(parser.InterwikiLink, u'Physics', u'wiktionary:Physics'), u'Bla')
def make_link_node(cls, target, full_target=None): link = cls() link.target = target link.full_target = full_target or target if link.full_target[0] == ':': link.full_target = link.full_target[1:] link.colon = True else: link.colon = False return link
651456b8e8660e24e74d881d810eb1936fb22bea /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12391/651456b8e8660e24e74d881d810eb1936fb22bea/test_mwapidb.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 67, 1232, 67, 2159, 12, 6429, 16, 1018, 16, 1983, 67, 3299, 33, 7036, 4672, 1692, 273, 2028, 1435, 1692, 18, 3299, 273, 1018, 1692, 18, 2854, 67, 3299, 273, 1983, 67, 3299, 578, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 67, 1232, 67, 2159, 12, 6429, 16, 1018, 16, 1983, 67, 3299, 33, 7036, 4672, 1692, 273, 2028, 1435, 1692, 18, 3299, 273, 1018, 1692, 18, 2854, 67, 3299, 273, 1983, 67, 3299, 578, ...
pushing(macroname, "a", depth + len(stack))
def subconvert(self, endchar=None, depth=0): stack = [] line = self.line if DEBUG and endchar: self.err_write( "subconvert(%s)\n line = %s\n" % (`endchar`, `line[:20]`)) while line: if line[0] == endchar and not stack: if DEBUG: self.err_write("subconvert() --> %s\n" % `line[1:21]`) self.line = line return line m = _comment_rx.match(line) if m: text = m.group(1) if text: self.write("(COMMENT\n- %s \n)COMMENT\n-\\n\n" % encode(text)) line = line[m.end():] continue m = _begin_env_rx.match(line) if m: # re-write to use the macro handler line = r"\%s %s" % (m.group(1), line[m.end():]) continue m = _end_env_rx.match(line) if m: # end of environment envname = m.group(1) if envname == "document": # special magic for n in stack[1:]: if n not in self.autoclosing: raise LaTeXFormatError( "open element on stack: " + `n`) # should be more careful, but this is easier to code: stack = [] self.write(")document\n") elif stack and envname == stack[-1]: self.write(")%s\n" % envname) del stack[-1] popping(envname, "a", len(stack) + depth) else: self.err_write("stack: %s\n" % `stack`) raise LaTeXFormatError( "environment close for %s doesn't match" % envname) line = line[m.end():] continue m = _begin_macro_rx.match(line) if m: # start of macro macroname = m.group(1) if macroname == "verbatim": # really magic case! pos = string.find(line, "\\end{verbatim}") text = line[m.end(1):pos] self.write("(verbatim\n") self.write("-%s\n" % encode(text)) self.write(")verbatim\n") line = line[pos + len("\\end{verbatim}"):] continue numbered = 1 opened = 0 if macroname[-1] == "*": macroname = macroname[:-1] numbered = 0 if macroname in self.autoclosing and macroname in stack: while stack[-1] != macroname: top = stack.pop() if top and top not in self.discards: self.write(")%s\n-\\n\n" % top) popping(top, "b", len(stack) + depth) if macroname not in self.discards: self.write("-\\n\n)%s\n-\\n\n" % macroname) popping(macroname, "c", len(stack) + depth - 1) del stack[-1] # if macroname in self.discards: self.push_output(StringIO.StringIO()) else: self.push_output(self.ofp) # params, optional, empty, environ = self.start_macro(macroname) if not numbered: self.write("Anumbered TOKEN no\n") # rip off the macroname if params: line = line[m.end(1):] elif empty: line = line[m.end(1):] else: line = line[m.end():] # # Very ugly special case to deal with \item[]. The catch # is that this needs to occur outside the for loop that # handles attribute parsing so we can 'continue' the outer # loop. # if optional and type(params[0]) is TupleType: # the attribute name isn't used in this special case pushing(macroname, "a", depth + len(stack)) stack.append(macroname) self.write("(%s\n" % macroname) m = _start_optional_rx.match(line) if m: self.line = line[m.end():] line = self.subconvert("]", depth + len(stack)) line = "}" + line continue # handle attribute mappings here: for attrname in params: if optional: optional = 0 if type(attrname) is StringType: m = _optional_rx.match(line) if m: line = line[m.end():] self.write("A%s TOKEN %s\n" % (attrname, encode(m.group(1)))) elif type(attrname) is TupleType: # This is a sub-element; but place the and attribute # we found on the stack (\section-like); the # content of the macro will become the content # of the attribute element, and the macro will # have to be closed some other way (such as # auto-closing). pushing(macroname, "b", len(stack) + depth) stack.append(macroname) self.write("(%s\n" % macroname) macroname = attrname[0] m = _start_group_rx.match(line) if m: line = line[m.end():] elif type(attrname) is ListType: # A normal subelement: <macroname><attrname>...</>... attrname = attrname[0] if not opened: opened = 1 self.write("(%s\n" % macroname) pushing(macroname, "c", len(stack) + depth) self.write("(%s\n" % attrname) pushing(attrname, "sub-elem", len(stack) + depth + 1) self.line = skip_white(line)[1:] line = self.subconvert("}", len(stack) + depth + 1)[1:] popping(attrname, "sub-elem", len(stack) + depth + 1) self.write(")%s\n" % attrname) else: m = _parameter_rx.match(line) if not m: raise LaTeXFormatError( "could not extract parameter %s for %s: %s" % (attrname, macroname, `line[:100]`)) value = m.group(1) if _token_rx.match(value): dtype = "TOKEN" else: dtype = "CDATA" self.write("A%s %s %s\n" % (attrname, dtype, encode(value))) line = line[m.end():] if params and type(params[-1]) is StringType \ and (not empty) and not environ: # attempt to strip off next '{' m = _start_group_rx.match(line) if not m: raise LaTeXFormatError( "non-empty element '%s' has no content: %s" % (macroname, line[:12])) line = line[m.end():] if not opened: self.write("(%s\n" % macroname) pushing(macroname, "d", len(stack) + depth) if empty: line = "}" + line stack.append(macroname) self.pop_output() continue if line[0] == endchar and not stack: if DEBUG: self.err_write("subconvert() --> %s\n" % `line[1:21]`) self.line = line[1:] return self.line if line[0] == "}": # end of macro or group macroname = stack[-1] conversion = self.table.get(macroname) if macroname \ and macroname not in self.discards \ and type(conversion) is not StringType: # otherwise, it was just a bare group self.write(")%s\n" % stack[-1]) popping(macroname, "d", len(stack) + depth - 1) del stack[-1] line = line[1:] continue if line[0] == "{": pushing("", "e", len(stack) + depth) stack.append("") line = line[1:] continue if line[0] == "\\" and line[1] in ESCAPED_CHARS: self.write("-%s\n" % encode(line[1])) line = line[2:] continue if line[:2] == r"\\": self.write("(BREAK\n)BREAK\n") line = line[2:] continue m = _text_rx.match(line) if m: text = encode(m.group()) self.write("-%s\n" % text) line = line[m.end():] continue # special case because of \item[] if line[0] == "]": self.write("-]\n") line = line[1:] continue # avoid infinite loops extra = "" if len(line) > 100: extra = "..." raise LaTeXFormatError("could not identify markup: %s%s" % (`line[:100]`, extra)) while stack and stack[-1] in self.autoclosing: self.write("-\\n\n") self.write(")%s\n" % stack[-1]) popping(stack.pop(), "e", len(stack) + depth - 1) if stack: raise LaTeXFormatError("elements remain on stack: " + string.join(stack, ", ")) # otherwise we just ran out of input here...
4d4002103873ffbe4b2e60e91858abf806dc1397 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/4d4002103873ffbe4b2e60e91858abf806dc1397/latex2esis.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 720, 6283, 12, 2890, 16, 679, 3001, 33, 7036, 16, 3598, 33, 20, 4672, 2110, 273, 5378, 980, 273, 365, 18, 1369, 309, 6369, 471, 679, 3001, 30, 365, 18, 370, 67, 2626, 12, 315, 1717, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 720, 6283, 12, 2890, 16, 679, 3001, 33, 7036, 16, 3598, 33, 20, 4672, 2110, 273, 5378, 980, 273, 365, 18, 1369, 309, 6369, 471, 679, 3001, 30, 365, 18, 370, 67, 2626, 12, 315, 1717, ...
resource_name, user) self.textviewStdOutImproved.write(msg) def updateEventListFromSeishub(self, starttime, endtime):
resource_name, account, user) self.textviewStdOutImproved.write(msg) def getEventListFromSeishub(self, starttime, endtime):
def getEventFromSeishub(self, resource_name): #document = xml.xpath(".//document_id") #document_id = document[self.seishubEventCurrent].text # Hack to show xml resource as document id resource_url = self.server['BaseUrl'] + "/xml/seismology/event/" + \ resource_name resource_req = urllib2.Request(resource_url) auth = base64.encodestring('%s:%s' % ("obspyck", "obspyck"))[:-1] resource_req.add_header("Authorization", "Basic %s" % auth) fp = urllib2.urlopen(resource_req) resource_xml = parse(fp) fp.close() if resource_xml.xpath(u".//event_type/user"): user = resource_xml.xpath(u".//event_type/user")[0].text else: user = None
1986fdf15775d8e69ddb4aa68e743f10f4f038b0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10470/1986fdf15775d8e69ddb4aa68e743f10f4f038b0/obspyck.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9832, 1265, 1761, 1468, 373, 12, 2890, 16, 1058, 67, 529, 4672, 468, 5457, 273, 2025, 18, 18644, 2932, 18, 759, 5457, 67, 350, 7923, 468, 5457, 67, 350, 273, 1668, 63, 2890, 18, 307, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9832, 1265, 1761, 1468, 373, 12, 2890, 16, 1058, 67, 529, 4672, 468, 5457, 273, 2025, 18, 18644, 2932, 18, 759, 5457, 67, 350, 7923, 468, 5457, 67, 350, 273, 1668, 63, 2890, 18, 307, ...
if v.value not in val_set])
if (v.value not in (None, UNKNOWN) and v.value not in val_set)])
def reachable_valdocs(*root): val_queue = list(root) val_set = Set(root) while val_queue: val_doc = val_queue.pop() val_set.add(val_doc) val_queue.extend([v for v in val_doc.valdoc_links() if v not in val_set]) val_queue.extend([v.value for v in val_doc.vardoc_links() if v.value not in val_set]) return val_set
2826553433741e57071d94e9fab4087f29d624c2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11420/2826553433741e57071d94e9fab4087f29d624c2/apidoc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 19234, 67, 1125, 8532, 30857, 3085, 4672, 1244, 67, 4000, 273, 666, 12, 3085, 13, 1244, 67, 542, 273, 1000, 12, 3085, 13, 1323, 1244, 67, 4000, 30, 1244, 67, 2434, 273, 1244, 67, 4000,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 19234, 67, 1125, 8532, 30857, 3085, 4672, 1244, 67, 4000, 273, 666, 12, 3085, 13, 1244, 67, 542, 273, 1000, 12, 3085, 13, 1323, 1244, 67, 4000, 30, 1244, 67, 2434, 273, 1244, 67, 4000,...
self.queue_keeper[song_id] = {"label": song, "text": text}
self.queue_keeper[song_id] = {"requester": requester, "label": song, "text": text}
def add(self, requester, song_id, text): # We want to ignore songs we've already seen, but they don't # always come the same way. for stored_id, song in self.queue_keeper.items(): # Since the album is what generally gets lost, look for the front. if song["text"].startswith(text) or text.startswith(song["text"]): return song = gtk.Label("%s requested %s" % (requester, text)) self._queue_box.add(song) self._queue_box.set_child_packing(song, 0, 1, 0, gtk.PACK_START) song.show() self.queue_keeper[song_id] = {"label": song, "text": text}
6b6bee13086fc6a9b3edfdb00be39e2f831b717b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11006/6b6bee13086fc6a9b3edfdb00be39e2f831b717b/gui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 12, 2890, 16, 19961, 16, 17180, 67, 350, 16, 977, 4672, 468, 1660, 2545, 358, 2305, 272, 7260, 732, 8081, 1818, 5881, 16, 1496, 2898, 2727, 1404, 468, 3712, 12404, 326, 1967, 4031, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 12, 2890, 16, 19961, 16, 17180, 67, 350, 16, 977, 4672, 468, 1660, 2545, 358, 2305, 272, 7260, 732, 8081, 1818, 5881, 16, 1496, 2898, 2727, 1404, 468, 3712, 12404, 326, 1967, 4031, ...
x |--> -x^2 + 2
-x^2 + 2
def equify(f, variables = None): """ Returns the equation rewritten as a symbolic function to give negative values when True, positive when False. EXAMPLES:: sage: from sage.plot.contour_plot import equify sage: var('x, y') (x, y) sage: equify(x^2 < 2) x |--> x^2 - 2 sage: equify(x^2 > 2) x |--> -x^2 + 2 sage: equify(x*y > 1) (x, y) |--> -x*y + 1 sage: equify(y > 0, (x,y)) (x, y) |--> -y """ import operator from sage.calculus.all import symbolic_expression op = f.operator() if variables == None: variables = f.variables() if op is operator.gt or op is operator.ge: s = symbolic_expression(f.rhs() - f.lhs()).function(*variables) return s else: s = symbolic_expression(f.lhs() - f.rhs()).function(*variables) return s
422030c04c64e1e92f77f462e4c47004d776f0d0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/422030c04c64e1e92f77f462e4c47004d776f0d0/contour_plot.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1298, 1164, 12, 74, 16, 3152, 273, 599, 4672, 3536, 2860, 326, 15778, 26768, 487, 279, 16754, 445, 358, 8492, 6092, 924, 1347, 1053, 16, 6895, 1347, 1083, 18, 225, 5675, 8900, 11386, 286...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1298, 1164, 12, 74, 16, 3152, 273, 599, 4672, 3536, 2860, 326, 15778, 26768, 487, 279, 16754, 445, 358, 8492, 6092, 924, 1347, 1053, 16, 6895, 1347, 1083, 18, 225, 5675, 8900, 11386, 286...
if any([is_Expression(func), is_RealNumber(func), is_Integer(func)]): return self.gen_transform(**{ self.indep_var: func, self.dep_vars[0]: params[0], self.dep_vars[1]: params[1]
if params is not None and (is_Expression(func) or is_RealNumber(func) or is_Integer(func)): return self.transform(**{ self.dep_var: func, self.indep_vars[0]: params[0], self.indep_vars[1]: params[1]
def to_cartesian(self, func, params): """ Returns a 3-tuple of functions, parameterized over ``params``, that represents the cartesian coordinates of the value of ``func``.
6a6b82f7e5f5e44ecfe79fc9e370831de7c2ec87 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/6a6b82f7e5f5e44ecfe79fc9e370831de7c2ec87/plot3d.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 358, 67, 11848, 13404, 12, 2890, 16, 1326, 16, 859, 4672, 3536, 2860, 279, 890, 17, 8052, 434, 4186, 16, 17629, 1879, 12176, 2010, 68, 9191, 716, 8686, 326, 24549, 5513, 434, 326, 460, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 358, 67, 11848, 13404, 12, 2890, 16, 1326, 16, 859, 4672, 3536, 2860, 279, 890, 17, 8052, 434, 4186, 16, 17629, 1879, 12176, 2010, 68, 9191, 716, 8686, 326, 24549, 5513, 434, 326, 460, ...
self.closed_pane = self.builder.get_object("closed_pane")
def _init_widget_aliases(self): self.window = self.builder.get_object("MainWindow") self.tagpopup = self.builder.get_object("tag_context_menu") self.nonworkviewtag_cb = self.builder.get_object("nonworkviewtag_mi") self.taskpopup = self.builder.get_object("task_context_menu") self.defertopopup = self.builder.get_object("defer_to_context_menu") self.ctaskpopup = self.builder.get_object("closed_task_context_menu") self.editbutton = self.builder.get_object("edit_b") self.edit_mi = self.builder.get_object("edit_mi") self.donebutton = self.builder.get_object("done_b") self.done_mi = self.builder.get_object("done_mi") self.deletebutton = self.builder.get_object("delete_b") self.delete_mi = self.builder.get_object("delete_mi") self.newtask = self.builder.get_object("new_task_b") self.newsubtask = self.builder.get_object("new_subtask_b") self.new_subtask_mi = self.builder.get_object("new_subtask_mi") self.dismissbutton = self.builder.get_object("dismiss_b") self.dismiss_mi = self.builder.get_object("dismiss_mi") self.about = self.builder.get_object("about_dialog") self.main_pane = self.builder.get_object("main_pane") self.menu_view_workview = self.builder.get_object("view_workview") self.toggle_workview = self.builder.get_object("workview_toggle") self.quickadd_entry = self.builder.get_object("quickadd_field") self.closed_pane = self.builder.get_object("closed_pane") self.toolbar = self.builder.get_object("task_toolbar") self.quickadd_pane = self.builder.get_object("quickadd_pane") self.sidebar = self.builder.get_object("sidebar_vbox") self.sidebar_container = self.builder.get_object("sidebar-scroll") self.closed_pane.add(self.ctask_tv)
2d967e251c1fdc5d4dcb6c664e27f6c266affeb8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8234/2d967e251c1fdc5d4dcb6c664e27f6c266affeb8/browser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2738, 67, 6587, 67, 13831, 12, 2890, 4672, 365, 18, 5668, 2398, 273, 365, 18, 9574, 18, 588, 67, 1612, 2932, 6376, 3829, 7923, 365, 18, 2692, 16086, 6647, 273, 365, 18, 9574, 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, 2738, 67, 6587, 67, 13831, 12, 2890, 4672, 365, 18, 5668, 2398, 273, 365, 18, 9574, 18, 588, 67, 1612, 2932, 6376, 3829, 7923, 365, 18, 2692, 16086, 6647, 273, 365, 18, 9574, 18, ...
t = time.clock()
def parse_stream(self, stream): t = time.clock() self._setup_handlers() self._parser = expat.ParserCreate() self._parser.StartElementHandler = self._start_element_handler self._parser.EndElementHandler = self._end_element_handler self._stream = stream self._progress = util.ProgressFactory("Loading XML...", self._stream_length) try: try: self._parser.ParseFile(stream) except expat.ExpatError, e: raise finally: self._progress.kill() self._remove_handlers() self._parser.StartElementHandler = None self._parser.EndElementHandler = None del self._parser print "Time:", time.clock() - t return self
017d126e2d2fcd0421ced5f36356bc7bd3af4a40 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9927/017d126e2d2fcd0421ced5f36356bc7bd3af4a40/gamera_xml.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 3256, 12, 2890, 16, 1407, 4672, 365, 6315, 8401, 67, 11046, 1435, 365, 6315, 4288, 273, 1329, 270, 18, 2678, 1684, 1435, 365, 6315, 4288, 18, 1685, 1046, 1503, 273, 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, 1109, 67, 3256, 12, 2890, 16, 1407, 4672, 365, 6315, 8401, 67, 11046, 1435, 365, 6315, 4288, 273, 1329, 270, 18, 2678, 1684, 1435, 365, 6315, 4288, 18, 1685, 1046, 1503, 273, 365, 6315, ...
end = start + self.slice_size + 8 * (self.patterns.max_length-1)
end = start + self.slice_size
def findMagic(self, offset): """ Find all 'magic_str' strings in stream in offset interval: offset..(offset+self.slice_size).
935dfdf556fb67c08b35251619e3e699fb33fe3c /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9327/935dfdf556fb67c08b35251619e3e699fb33fe3c/search.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 19289, 12, 2890, 16, 1384, 4672, 3536, 4163, 777, 296, 11179, 67, 701, 11, 2064, 316, 1407, 316, 1384, 3673, 30, 1384, 838, 12, 3348, 15, 2890, 18, 6665, 67, 1467, 2934, 2, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 19289, 12, 2890, 16, 1384, 4672, 3536, 4163, 777, 296, 11179, 67, 701, 11, 2064, 316, 1407, 316, 1384, 3673, 30, 1384, 838, 12, 3348, 15, 2890, 18, 6665, 67, 1467, 2934, 2, -100,...
`id(self)`, `self.fp`)
`id(self)`, `self.fp`)
def __repr__(self): return '<%s at %s whose fp = %s>' % (self.__class__.__name__, `id(self)`, `self.fp`)
70e89305cf7cc2bdb9acab85803dfa4b07ed1b45 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/70e89305cf7cc2bdb9acab85803dfa4b07ed1b45/urllib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 12715, 972, 12, 2890, 4672, 327, 2368, 9, 87, 622, 738, 87, 8272, 4253, 273, 738, 87, 1870, 738, 261, 2890, 16186, 1106, 972, 16186, 529, 972, 16, 1375, 350, 12, 2890, 13, 9191, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 12715, 972, 12, 2890, 4672, 327, 2368, 9, 87, 622, 738, 87, 8272, 4253, 273, 738, 87, 1870, 738, 261, 2890, 16186, 1106, 972, 16186, 529, 972, 16, 1375, 350, 12, 2890, 13, 9191, ...
op_status = library_books.AddFile(file)
op_status = lib_books.AddFile(file)
def upload_books(self, files, names, on_card=None, end_session=True, metadata=None): ''' Upload a list of books to the device. If a file already exists on the device, it should be replaced. This method should raise a L{FreeSpaceError} if there is not enough free space on the device. The text of the FreeSpaceError must contain the word "card" if C{on_card} is not None otherwise it must contain the word "memory". :files: A list of paths and/or file-like objects. :names: A list of file names that the books should have once uploaded to the device. len(names) == len(files) :return: A list of 3-element tuples. The list is meant to be passed to L{add_books_to_metadata}. :metadata: If not None, it is a list of :class:`MetaInformation` objects. The idea is to use the metadata to determine where on the device to put the book. len(metadata) == len(files). Apart from the regular cover (path to cover), there may also be a thumbnail attribute, which should be used in preference. The thumbnail attribute is of the form (width, height, cover_data as jpeg). '''
462b2e6c44751baac6b573b9a8450f4512d05312 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9125/462b2e6c44751baac6b573b9a8450f4512d05312/driver.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3617, 67, 12567, 12, 2890, 16, 1390, 16, 1257, 16, 603, 67, 3327, 33, 7036, 16, 679, 67, 3184, 33, 5510, 16, 1982, 33, 7036, 4672, 9163, 9414, 279, 666, 434, 6978, 87, 358, 326, 2346...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3617, 67, 12567, 12, 2890, 16, 1390, 16, 1257, 16, 603, 67, 3327, 33, 7036, 16, 679, 67, 3184, 33, 5510, 16, 1982, 33, 7036, 4672, 9163, 9414, 279, 666, 434, 6978, 87, 358, 326, 2346...
list.DeleteAllItems()
def showItems(self, index, keyword, items): list = self.dirlevels.GetList(index) if list is None: list = self.dirlevels.AppendList(self.mode.settings.list_width, keyword) list.DeleteAllItems() names = {} for item in items: #dprint(item) names[str(item[keyword]).decode('utf-8')] = 1 names = names.keys() names.sort() for name in names: #dprint(item) index = list.InsertStringItem(sys.maxint, name)
b39f3056935c6ee8729f5d59b7e07992f7a25e2a /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11522/b39f3056935c6ee8729f5d59b7e07992f7a25e2a/mpd_major_mode.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 3126, 12, 2890, 16, 770, 16, 4932, 16, 1516, 4672, 666, 273, 365, 18, 1214, 12095, 18, 967, 682, 12, 1615, 13, 309, 666, 353, 599, 30, 666, 273, 365, 18, 1214, 12095, 18, 5736,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 3126, 12, 2890, 16, 770, 16, 4932, 16, 1516, 4672, 666, 273, 365, 18, 1214, 12095, 18, 967, 682, 12, 1615, 13, 309, 666, 353, 599, 30, 666, 273, 365, 18, 1214, 12095, 18, 5736,...
real_names[name] = documenter.fullname
real_names[name] = real_name
def append_row(*column_texts): row = nodes.row('') for text in column_texts: node = nodes.paragraph('') vl = ViewList() vl.append(text, '<autosummary>') state.nested_parse(vl, 0, node) row.append(nodes.entry('', node)) body.append(row)
3a354f0d4df60d311e3b2e1bbb359aefb9c33f16 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7032/3a354f0d4df60d311e3b2e1bbb359aefb9c33f16/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 714, 67, 492, 30857, 2827, 67, 26256, 4672, 1027, 273, 2199, 18, 492, 2668, 6134, 364, 977, 316, 1057, 67, 26256, 30, 756, 273, 2199, 18, 22445, 2668, 6134, 19755, 273, 4441, 682, 1435, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 714, 67, 492, 30857, 2827, 67, 26256, 4672, 1027, 273, 2199, 18, 492, 2668, 6134, 364, 977, 316, 1057, 67, 26256, 30, 756, 273, 2199, 18, 22445, 2668, 6134, 19755, 273, 4441, 682, 1435, ...
classAdJob = ClassAd('[ %s ]' % jdl)
classAdJob = ClassAd(jdl)
def rescheduleJob (self, jobID): """ Reschedule the given job to run again from scratch. Retain the already defined parameters in the parameter Attic """ # Check Verified Flag result = self.getJobAttributes( jobID, ['Status','MinorStatus','VerifiedFlag','RescheduleCounter', 'Owner','OwnerDN','OwnerGroup','DIRACSetup'] ) if result['OK']: resultDict = result['Value'] else: return S_ERROR('JobDB.getJobAttributes: can not retrieve job attributes')
1173a18240b121fd4610f883f738304e570ed5a4 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12864/1173a18240b121fd4610f883f738304e570ed5a4/JobDB.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 400, 2847, 2278, 261, 2890, 16, 28913, 4672, 3536, 1124, 2847, 326, 864, 1719, 358, 1086, 3382, 628, 15289, 18, 17100, 530, 326, 1818, 2553, 1472, 316, 326, 1569, 6020, 335, 3536, 468, 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, 400, 2847, 2278, 261, 2890, 16, 28913, 4672, 3536, 1124, 2847, 326, 864, 1719, 358, 1086, 3382, 628, 15289, 18, 17100, 530, 326, 1818, 2553, 1472, 316, 326, 1569, 6020, 335, 3536, 468, 2...
mir_rorp.setfile(cls.rf_cache.get_fp(base_index + index))
fp = cls.rf_cache.get_fp(base_index + index, mir_rorp) mir_rorp.setfile(fp)
def attach_files(cls, src_iter, mirror_rp, inc_rp, compare_time): """Attach data to all the files that need checking
2d12170c71173faea5e9a7c8db1c027545e5f9f1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6202/2d12170c71173faea5e9a7c8db1c027545e5f9f1/compare.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3306, 67, 2354, 12, 6429, 16, 1705, 67, 2165, 16, 15593, 67, 13832, 16, 7290, 67, 13832, 16, 3400, 67, 957, 4672, 3536, 4761, 501, 358, 777, 326, 1390, 716, 1608, 6728, 2, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3306, 67, 2354, 12, 6429, 16, 1705, 67, 2165, 16, 15593, 67, 13832, 16, 7290, 67, 13832, 16, 3400, 67, 957, 4672, 3536, 4761, 501, 358, 777, 326, 1390, 716, 1608, 6728, 2, -100, -100, ...
""" fl_popup_set_title(p1, p2) -> popup ref.
""" fl_popup_set_title(p1, p2) -> popup
def fl_popup_set_title(p1, p2): """ fl_popup_set_title(p1, p2) -> popup ref. """ retval = _fl_popup_set_title(p1, p2) 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, 16086, 67, 542, 67, 2649, 12, 84, 21, 16, 293, 22, 4672, 3536, 1183, 67, 16086, 67, 542, 67, 2649, 12, 84, 21, 16, 293, 22, 13, 317, 10431, 3536, 225, 5221, 273, 389, 224...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1183, 67, 16086, 67, 542, 67, 2649, 12, 84, 21, 16, 293, 22, 4672, 3536, 1183, 67, 16086, 67, 542, 67, 2649, 12, 84, 21, 16, 293, 22, 13, 317, 10431, 3536, 225, 5221, 273, 389, 224...
bootargs = ia64bootargs
extraargs.extend(ia64bootargs)
def doCreateIsos(self): """Create isos from the various split directories."""
4e8d70bf9fa3bbca0112014aab29f696ee748b84 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8489/4e8d70bf9fa3bbca0112014aab29f696ee748b84/pungi.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 1684, 2520, 538, 12, 2890, 4672, 3536, 1684, 353, 538, 628, 326, 11191, 1416, 6402, 12123, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 1684, 2520, 538, 12, 2890, 4672, 3536, 1684, 353, 538, 628, 326, 11191, 1416, 6402, 12123, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
handlers={'eval': eval_scheme_handler, 'shift': shift_scheme_handler}) start_isrc = inputsource(find_file('sampleresource.txt'), resolver=resolver)
handlers={'eval': eval_scheme_handler, 'shift': shift_scheme_handler}) start_isrc = inputsource(find_file('sampleresource.txt'), resolver=resolver)
def shift_scheme_handler(uri, base=None): if base: uri = base+uri uri = uri[6:] return ''.join([ chr(ord(c)+1) for c in uri])
e94b1b8a021f867b7746a43d9d0cf735d5c5c8e5 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/14078/e94b1b8a021f867b7746a43d9d0cf735d5c5c8e5/test_irihelpers.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4654, 67, 9068, 67, 4176, 12, 1650, 16, 1026, 33, 7036, 4672, 309, 1026, 30, 2003, 273, 1026, 15, 1650, 2003, 273, 2003, 63, 26, 26894, 327, 875, 18, 5701, 3816, 4513, 12, 517, 12, 7...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4654, 67, 9068, 67, 4176, 12, 1650, 16, 1026, 33, 7036, 4672, 309, 1026, 30, 2003, 273, 1026, 15, 1650, 2003, 273, 2003, 63, 26, 26894, 327, 875, 18, 5701, 3816, 4513, 12, 517, 12, 7...
This will re-generate the search indexes for a tracker. This will typically happen automatically.
This will re-generate the search indexes for a tracker. This will typically happen automatically.
def do_reindex(self, args): ""'''Usage: reindex Re-generate a tracker's search indexes.
eb552e06b9df2d7c4092851c8b0de350e72c3daf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/eb552e06b9df2d7c4092851c8b0de350e72c3daf/admin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 266, 1615, 12, 2890, 16, 833, 4672, 1408, 26418, 5357, 30, 17492, 868, 17, 7163, 279, 9745, 1807, 1623, 5596, 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, 741, 67, 266, 1615, 12, 2890, 16, 833, 4672, 1408, 26418, 5357, 30, 17492, 868, 17, 7163, 279, 9745, 1807, 1623, 5596, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
def test_marc_many_tags_partial_phrase_query(self):
def test_many_marc_tags_partial_phrase_query(self):
def test_marc_many_tags_partial_phrase_query(self): """websearch - many MARC tags, partial phrase query (245)""" self.assertEqual([], test_web_page_content(weburl + '/search?of=id&p=245%3A%27and%27', expected_text="[1, 8, 9, 14, 15, 20, 22, 24, 28, 33, 47, 48, 49, 51, 53, 64, 69, 71, 79, 82, 83, 85, 91]"))
df9d506b1fdd40cebe817285783085a8a3e7529f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2139/df9d506b1fdd40cebe817285783085a8a3e7529f/websearch_regression_tests.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 9353, 67, 3684, 71, 67, 4156, 67, 11601, 67, 9429, 67, 2271, 12, 2890, 4672, 3536, 4875, 3072, 300, 4906, 490, 27206, 2342, 16, 4702, 13045, 843, 261, 3247, 25, 15574, 365, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 9353, 67, 3684, 71, 67, 4156, 67, 11601, 67, 9429, 67, 2271, 12, 2890, 4672, 3536, 4875, 3072, 300, 4906, 490, 27206, 2342, 16, 4702, 13045, 843, 261, 3247, 25, 15574, 365, 1...
a p-adic ring, an error will be raised.
a `p`-adic ring, an error will be raised.
def eigenfunctions(self, n, F = None, exact_arith=True): """ Calculate approximations to eigenfunctions of self. These are the eigenfunctions of self.hecke_matrix(p, n), which are approximations to the true eigenfunctions. Returns a list of OverconvergentModularFormElement objects, in increasing order of slope.
51aabb4f4c1d25de708da4cd9e8295aeb8a186e7 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/51aabb4f4c1d25de708da4cd9e8295aeb8a186e7/genus0.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 16719, 10722, 12, 2890, 16, 290, 16, 478, 273, 599, 16, 5565, 67, 297, 483, 33, 5510, 4672, 3536, 9029, 26962, 1012, 358, 16719, 10722, 434, 365, 18, 8646, 854, 326, 16719, 10722, 434, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 16719, 10722, 12, 2890, 16, 290, 16, 478, 273, 599, 16, 5565, 67, 297, 483, 33, 5510, 4672, 3536, 9029, 26962, 1012, 358, 16719, 10722, 434, 365, 18, 8646, 854, 326, 16719, 10722, 434, ...
self.setupNodeWeb(job,self.id,page,False)
self.id = ifo + repr(time) self.setupNodeWeb(job,self.id,False)
def __init__(self,job,time,cp,qcache,ifo,name): """ job = A CondorDAGJob that can run an instance of qscan. """ pipeline.CondorDAGNode.__init__(self,job) self.add_var_arg(repr(time)) qscanConfig = string.strip(cp.get(name[1], ifo[0] + 'config-file')) self.add_file_arg(qscanConfig) self.add_file_arg(qcache) self.add_var_arg(string.strip(cp.get(name[1], ifo + 'output'))) self.setupNodeWeb(job,self.id,page,False)
7284b34939e8ed924c566d12e2acd24b2050b2c4 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5758/7284b34939e8ed924c566d12e2acd24b2050b2c4/fu_Condor.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 4688, 16, 957, 16, 4057, 16, 85, 2493, 16, 20299, 16, 529, 4672, 3536, 1719, 273, 432, 735, 72, 280, 40, 1781, 2278, 716, 848, 1086, 392, 791, 434, 104...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4688, 16, 957, 16, 4057, 16, 85, 2493, 16, 20299, 16, 529, 4672, 3536, 1719, 273, 432, 735, 72, 280, 40, 1781, 2278, 716, 848, 1086, 392, 791, 434, 104...
url='http://modular.math.washington.edu/sage/hg/sage-main',
url='%s/sage-main'%SAGE_SERVER,
def bundle(self, filename, options='', url=None): """ Create an hg changeset bundle with the given filename against the repository at the given url (which is by default the 'official' SAGE repository).
a54d9083e85670d57dc67d9bd674febac505ee8d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9890/a54d9083e85670d57dc67d9bd674febac505ee8d/hg.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3440, 12, 2890, 16, 1544, 16, 702, 2218, 2187, 880, 33, 7036, 4672, 3536, 1788, 392, 22576, 22463, 3440, 598, 326, 864, 1544, 5314, 326, 3352, 622, 326, 864, 880, 261, 12784, 353, 635, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3440, 12, 2890, 16, 1544, 16, 702, 2218, 2187, 880, 33, 7036, 4672, 3536, 1788, 392, 22576, 22463, 3440, 598, 326, 864, 1544, 5314, 326, 3352, 622, 326, 864, 880, 261, 12784, 353, 635, ...
screen_render.take_focuses(IDENTITY, 0, 0, focuses)
screen_render.take_focuses( 0, 0, screen_render.width, screen_render.height, IDENTITY, 0, 0, focuses)
def take_focuses(focuses): """ Adds a list of rectangular focus regions to the focuses list. """ screen_render.take_focuses(IDENTITY, 0, 0, focuses)
fc0f7cecc49ee6b4508f3074442f8e3b82709254 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10962/fc0f7cecc49ee6b4508f3074442f8e3b82709254/render.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4862, 67, 13923, 281, 12, 13923, 281, 4672, 3536, 15605, 279, 666, 434, 4917, 13077, 7155, 10085, 358, 326, 7155, 281, 666, 18, 3536, 225, 5518, 67, 5902, 18, 22188, 67, 13923, 281, 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, 4862, 67, 13923, 281, 12, 13923, 281, 4672, 3536, 15605, 279, 666, 434, 4917, 13077, 7155, 10085, 358, 326, 7155, 281, 666, 18, 3536, 225, 5518, 67, 5902, 18, 22188, 67, 13923, 281, 12, ...
if profilers.present(): profilers.stop(self) profilers.report(self)
def execute(self, testdir = None, iterations = 1, filesize='100M', type='write', pattern='random'): cmd = os.path.join(self.srcdir, 'src/spew') if not testdir: testdir = self.tmpdir tmpfile = os.path.join(testdir, 'spew-test.%d' % os.getpid()) results = os.path.join(self.resultsdir, 'stdout') args = '--%s -i %d -p %s -b 2k -B 2M %s %s' % \ (type, iterations, pattern, filesize, tmpfile) cmd += ' ' + args
f6978e3defa9f694551fee7e8c33682787098e97 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10349/f6978e3defa9f694551fee7e8c33682787098e97/spew.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1836, 12, 2890, 16, 1842, 1214, 273, 599, 16, 11316, 273, 404, 16, 14104, 2218, 6625, 49, 2187, 618, 2218, 2626, 2187, 1936, 2218, 9188, 11, 4672, 1797, 273, 1140, 18, 803, 18, 5701, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 12, 2890, 16, 1842, 1214, 273, 599, 16, 11316, 273, 404, 16, 14104, 2218, 6625, 49, 2187, 618, 2218, 2626, 2187, 1936, 2218, 9188, 11, 4672, 1797, 273, 1140, 18, 803, 18, 5701, 1...
return lista else: return []
return lista
def takesettings(self, settings): pos = 0 if settings != None: x = wikipedia.Page(self.site, settings) lista = list() try: testo = x.get() rxp = "<------- ------->\n\*[Nn]ame=['\"](.*?)['\"]\n\*([Ff]ind|[Ff]indonly)=(.*?)\n\*[Ii]magechanges=(.*?)\n\*[Ss]ummary=['\"](.*?)['\"]\n\*[Hh]ead=['\"](.*?)['\"]\n\*[Tt]ext ?= ?['\"](.*?)['\"]\n\*[Mm]ex ?= ?['\"]?(.*?)['\"]?$" r = re.compile(rxp, re.UNICODE|re.M) number = 1 while 1: m = r.search(testo, pos) if m == None: if lista == list(): wikipedia.output(u"You've set wrongly your settings, please take a look to the relative page. (run without them)") lista = None else: break else: pos = m.end() name = str(m.group(1)) find_tipe = str(m.group(2)) find = str(m.group(3)) imagechanges = str(m.group(4)) summary = str(m.group(5)) head = str(m.group(6)) text = str(m.group(7)) mexcatched = str(m.group(8)) tupla = [number, name, find_tipe, find, imagechanges, summary, head, text, mexcatched] lista += [tupla] number += 1 except wikipedia.NoPage: lista = None return lista else: return []
23430a1853a736b93721471c6a328b8d8b02fad0 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4404/23430a1853a736b93721471c6a328b8d8b02fad0/checkimages.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5530, 278, 1256, 12, 2890, 16, 1947, 4672, 949, 273, 374, 309, 1947, 480, 599, 30, 619, 273, 21137, 18, 1964, 12, 2890, 18, 4256, 16, 1947, 13, 17822, 273, 666, 1435, 775, 30, 1842, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5530, 278, 1256, 12, 2890, 16, 1947, 4672, 949, 273, 374, 309, 1947, 480, 599, 30, 619, 273, 21137, 18, 1964, 12, 2890, 18, 4256, 16, 1947, 13, 17822, 273, 666, 1435, 775, 30, 1842, ...
renwin.StereoRenderOff()
iren.GetRenderWindow().StereoRenderOff()
def set_stereo_mode(self, on=True, mode="CrystalEyes"): """set_stereo_mode(on = [_True_, False], type = [_"CrystalEyes"_, "RedBlue", "Interlaced", "Left", "Right", "Dresden"] """ iren = self.iren renwin = iren.GetRenderWindow() if on: renwin.StereoRenderOn() exec("renwin.SetStereoTypeTo"+mode+"()") else: renwin.StereoRenderOff() iren.Render()
aebed9d98ec54bc8a1c5961fd6686f014ca2a21d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5000/aebed9d98ec54bc8a1c5961fd6686f014ca2a21d/data_viewer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 334, 822, 83, 67, 3188, 12, 2890, 16, 603, 33, 5510, 16, 1965, 1546, 12893, 31365, 41, 9707, 6, 4672, 3536, 542, 67, 334, 822, 83, 67, 3188, 12, 265, 273, 306, 67, 5510, 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, 444, 67, 334, 822, 83, 67, 3188, 12, 2890, 16, 603, 33, 5510, 16, 1965, 1546, 12893, 31365, 41, 9707, 6, 4672, 3536, 542, 67, 334, 822, 83, 67, 3188, 12, 265, 273, 306, 67, 5510, 6...
d = self.get_minmax_data()
def ymax(self, ymax=None): """ EXAMPLES: sage: g = line([(-1,1), (3,2)]) sage: g.ymax() 2.0 sage: g.ymax(10) sage: g.ymax() 10.0 """ d = self.get_minmax_data() if ymax is None: return d['ymax'] self._minmax_data['ymax'] = float(ymax)
38e84fc4c8a2973b3412d548ce99e19dd9db26fb /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/38e84fc4c8a2973b3412d548ce99e19dd9db26fb/plot.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15275, 12, 2890, 16, 15275, 33, 7036, 4672, 3536, 5675, 8900, 11386, 30, 272, 410, 30, 314, 273, 980, 3816, 19236, 21, 16, 21, 3631, 261, 23, 16, 22, 13, 5717, 272, 410, 30, 314, 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, 15275, 12, 2890, 16, 15275, 33, 7036, 4672, 3536, 5675, 8900, 11386, 30, 272, 410, 30, 314, 273, 980, 3816, 19236, 21, 16, 21, 3631, 261, 23, 16, 22, 13, 5717, 272, 410, 30, 314, 18,...
intermidiate results. If not given, or ``0``, ``scan`` will return
intermediate results. If not given, or ``0``, ``scan`` will return
def scan( fn , sequences = None , outputs_info = None , non_sequences = None , n_steps = None , truncate_gradient = -1 , go_backwards = False , mode = None , name = None ): """ This function constructs and applies a Scan op to the provided arguments. :param fn: ``fn`` is a function that describes the operations involved in one step of ``scan``. ``fn`` should construct variables describing the output of one iteration step. It should expect as input theano variables representing all the time slices of the input sequences and outputs, and all other arguments given to scan as ``non_sequences``. The order in which scan passes this variables to ``fn`` is the following : * all time slices of the first sequence * all time slices of the second sequence * ... * all time slices of the last sequence * all time slices of the first output * all time slices of the second otuput * ... * all time slices of the last output * all other arguments (the list given as `non_sequences` to scan) The order of the sequences is the same as the one in the list `sequences` given to scan. The order of the outputs is the sane as the order of ``output_info``. For any sequence or output the order of the time slices is the same as the order of the time taps provided. For example if one writes the following : .. code-block:: python scan(fn, sequences = [ dict( Sequence1, taps = [-3,2,-1]) , Sequence2 , dict( Sequence3, taps = 3) ] , outputs_info = [ dict( Output1, taps = [-3,-5]) , dict( Output2, taps = None) , Output3 ] , non_sequences = [ Argument1, Argument 2]) ``fn`` should expect the following arguments in this given order: #. ``Sequence1[t-3]`` #. ``Sequence1[t+2]`` #. ``Sequence1[t-1]`` #. ``Sequence2[t]`` #. ``Sequence3[t+3]`` #. ``Output1[t-3]`` #. ``Output1[t-5]`` #. ``Output3[t-1]`` #. ``Argument1`` #. ``Argument2`` The list of ``non_sequences`` can also contain shared variables used in the function, though ``scan`` is able to figure those out on its own so they can be skipped. For the clarity of the code we recommand though to provide them to scan. The function is expected to return two things. One is a list of outputs ordered in the same order as ``outputs_info``, with the difference that there should be only one output variable per output initial state (even if no tap value is used). Secondly `fn` should return an update dictionary ( that tells how to update any shared variable after each iteration ste). The dictionary can optionally be given as a list of tuples. There is no constraint on the order of these two list, ``fn`` can return either ``(outputs_list, update_dictionary)`` or ``(update_dictionary, outputs_list)`` or just one of the two (in case the other is empty). :param sequences: ``sequences`` is the list of Theano variables or dictionaries describing the sequences ``scan`` has to iterate over. If a sequence is given as wrapped in a dictionary a set of optional information can be provided about the sequence. The dictionary should have the following keys: * ``input`` (*mandatory*) -- Theano variable representing the sequence. * ``taps`` -- Temporal taps of the sequence required by ``fn``. They are provided as a list of integers, where a value ``k`` impiles that at iteration step ``t`` scan will pass to ``fn`` the slice ``t+k``. Default value is ``[0]`` Any Theano variable in the list ``sequences`` is automatically wrapped into a dictionary where ``taps`` is set to ``[0]`` :param outputs_info: ``outputs_info`` is the list of Theano variables or dictionaries describing the initial state of the outputs computed recurrently. When this initial states are given as dictionary optional information can be provided about the output corresponding to these initial states. The dictionary should have the following keys: * ``initial`` -- Theano variable that represents the initial state of a given output. In case the output is not computed recursively (think of a map) and does not require a initial state this field can be skiped. Given that only the previous time step of the output is used by ``fn`` the initial state should have the same shape as the output. If multiple time taps are used, the initial state should have one extra dimension that should cover all the possible taps. For example if we use ``-5``, ``-2`` and ``-1`` as past taps, at step 0, ``fn`` will require (by an abuse of notation) ``output[-5]``, ``output[-2]`` and ``output[-1]``. This will be given by the initial state, which in this case should have the shape (5,)+output.shape. If this variable containing the initial state is called ``init_y`` then ``init_y[0]`` *corresponds to* ``output[-5]``. ``init_y[1]`` *correponds to* ``output[-4]``, ``init_y[2]`` corresponds to ``output[-3]``, ``init_y[3]`` coresponds to ``output[-2]``, ``init_y[4]`` corresponds to ``output[-1]``. While this order might seem strange, it comes natural from splitting an array at a given point. Assume that we have a array ``x``, and we choose ``k`` to be time step ``0``. Then our initial state would be ``x[:k]``, while the output will be ``x[k:]``. Looking at this split, elements in ``x[:k]`` are ordered exactly like those in ``init_y``. * ``taps`` -- Temporal taps of the output that will be pass to ``fn``. They are provided as a list of *negative* integers, where a value ``k`` implies that at iteration step ``t`` scan will pass to ``fn`` the slice ``t+k``. * ``inplace`` -- One of the Theano variables provided as ``sequences``. ``scan`` will try to compute this output *in place* of the provided input *iff* it respects the following constraints: * There is no other output that is denied to be computed in place for whatever reason. * ``fn`` is not using past taps of the input sequence that will get overwritten by the output * ``return_steps`` -- Integer representing the number of steps to return for the current steps. For example, if ``k`` is provided, ``scan`` will return ``output[-k:]``. This is meant as a hint, based on ``k`` and the past taps of the outputs used, scan can be smart about the amount of memory it requires to store intermidiate results. If not given, or ``0``, ``scan`` will return all computed steps. * ``store_steps`` -- Integer representing the number of intermidiate steps ``scan`` should use for a given output. Use this key only if you really know what you are doing. In general is recommendat to let scan decide for you the ammount of memory it should use. ``scan`` will follow this logic if partial information is given: * If an output is not wrapped in a dictionary, ``scan`` will wrap it in one assuming that you use only the last step of the output (i.e. it makes your tap value list equal to [-1]) and that it is not computed inplace. * If you wrap an output in a dictionary and you do not provide any taps but you provide an initial state it will assume that you are using only a tap value of -1. * If you wrap an output in a dictionary but you do not provide any initial state, it assumes that you are not using any form of taps. * If you provide a ``None`` instead of a variable or a dictionary ``scan`` assumes that you will not use any taps for this output (like for example in case of a map) If ``outputs_info`` is an empty list or None, ``scan`` assumes that no tap is used for any of the otuputs. If information is provided just for a subset of the outputs an exception is raised (because there is no convention on how scan should map the provided information to the outputs of ``fn``) :param non_sequences: ``non_sequences`` is the list of arguments that are passed to ``fn`` at each steps. Once can opt to exclude shared variables used in ``fn`` from this list. :param n_steps: ``n_steps`` is the number of steps to iterate given as an int or Theano scalar. If any of the input sequences do not have enough elements, scan will produce a warning and run only for the maximal amount of steps it can. If the *value is 0* the outputs will have *0 rows*. If the value is negative, ``scan`` run backwards in time. If the ``go_backwards`` flag is already set and also ``n_steps`` is negative, ``scan`` will run forward in time. If n stpes is not provided, or evaluates to ``None``, ``inf`` or ``NaN``, ``scan`` will figure out the amount of steps it should run given its input sequences. :param truncate_gradient: ``truncate_gradient`` is the number of steps to use in truncated BPTT. If you compute gradients through a scan op, they are computed using backpropagation through time. By providing a different value then -1, you choose to use truncated BPTT instead of classical BPTT, where you go for only ``truncate_gradient`` number of steps back in time. :param go_backwards: ``go_backwards`` is a flag indicating if ``scan`` should go backwards through the sequences. If you think of each sequence as indexed by time, making this flag True would mean that ``scan`` goes back in time, namely that for any sequence it starts from the end and goes towards 0. :param name: When profiling ``scan`` it is crucial to provide a name for any instance of ``scan``. The profiler will produce an overall profile of your code as well as profiles for doing one iteration step for each instance of ``scan``. The ``name`` of the instance is how you differentiate between all these profiles. :param mode: It is recommended to leave this argument to None, especially when profiling ``scan`` (otherwise the results are not going to be accurate). If you prefer the computations of one step os ``scan`` to be done differently then the entire function set this parameters (see ``theano.function`` for details about possible values and their meaning). :rtype: tuple :return: tuple of the form (outputs, updates); ``outputs`` is either a Theano variable or a list of Theano variables representing the outputs of ``scan`` (in the same order as in ``outputs_info``). ``updates`` is a dictionary specifying the update rules for all shared variables used in the scan operation. This dictionary should be passed to ``theano.function`` when you compile your function. """ # General observation : this code is executed only once, at creation # of the computational graph, so we don't yet need to be smart about # anything ( to speed things up) # check if inputs are just single variables instead of lists if not (type(sequences) in (list, tuple)) and sequences != None: seqs = [sequences] elif sequences == None: seqs = [] else: seqs = sequences if not (type(outputs_info) in (list,tuple)) and outputs_info != None: outs_info = [outputs_info] elif outputs_info == None: outs_info = [] else: outs_info = outputs_info if ( not (type(non_sequences) in (list,tuple)) and non_sequences != None): non_seqs = [non_sequences] elif non_sequences == None: non_seqs = [] else: non_seqs = non_sequences # If we provided a known number of steps ( before compilation) # and if that number is 1 or -1, then we can skip the Scan Op, # and just apply the inner function once # To do that we check here to see the nature of n_steps if type(n_steps) in (float,int): n_fixed_steps = int(n_steps) else: # also check if this value happens to be a constant, # then we could do the same try : n_fixed_steps = opt.get_constant_value(n_steps) except: n_fixed_steps = None # compute number of sequences and number of outputs n_seqs = len(seqs) n_outs = len(outs_info) # initialize the inplace map, sequences map and # outputs map ''' Details: The scan op identifies different properties attached to input tensors by their order in the input list. These maps ( inplace, sequence_taps, output_taps, store_steps, return_steps) go from the index of an input to its properties. Note that inputs are always first, followed by outputs. Since we always know the number of inputs we index the outputs from 0 ( so sometimes you will need to do something like outputs_taps[i-n_ins] ''' inplace_map = {} sequences_taps = {} outputs_taps = {} # Assume that for any output we want to store everythin that it produces store_steps = [] return_steps = {} # wrap sequences in a dictionary if they are not already dictionaries # in the same pass create a sequences_taps dictionary for i in xrange(n_seqs): if not type(seqs[i]) == dict : # if it is not a dictionary make it into one seqs[i] = dict(input=seqs[i], taps=[0]) # see if taps values are provided as a list elif seqs[i].get('taps',None): # users can optionally provide the past value (if is just # one) as a number instead of a list. Wrap it in a list # to have a uniform way of dealing with inputs later on if not type(seqs[i]['taps']) in (tuple,list): seqs[i]['taps'] = [seqs[i]['taps']] else: # See if the user actually provided the None value to taps, # which would indicate that the sequence was provided but # not used by the internal function; Only if the user has # not provided anything add the defaul [0] # Possible reason to provide a squence and not use it is # if you want to compute the output # inplace of this input; it is a very unlikely behaviour but # we do want to cover it for completeness if not seqs[i].has_key('taps'): seqs[i][taps] = [0] # Now that our input is well behaved, collect the taps in the # sequences_taps map that we will use later in the body of scan # since inputs will be just tensors there if seqs[i].get('taps',None): sequences_taps[i] = seqs[i]['taps'] # wrap outputs info in a dictionary if they are not already # in one and in the same pass create a init_outs_taps dictionary and a inplace map for i in xrange(n_outs): if outs_info[i]: # If output is a dictionary, collect the number of steps the # user would like scan to return if type(outs_info[i]) == dict: if outs_info[i].get('return_steps', None): return_steps[i] = outs_info[i]['return_steps'] # If you provide the number of steps to store internally, # (not advocated in the user documentation), then also # make sure you are returning only those number of steps if outs_info[i].get('store_steps', None): store_steps += [outs_info[i].get('store_steps',None)] return_steps[i] = outs_info[i].get('store_steps',None) else: store_steps += [0] else: store_steps += [0] # trying to collect taps of the output if not type(outs_info[i]) == dict: # by default any output has a tap value of -1 outs_info[i] = dict(initial=outs_info[i], taps = [-1]) # if there is no initial state but there are taps # then return an error because it makes no sense elif (not outs_info[i].get('initial',None)) and \ (outs_info[i].get('taps',None)): raise ValueError('If you are using slices of an output you need to '\ 'provide a initial state for it', outs_info[i]) # if there is an intial state but no tap, we will add the default value # for taps, namely [-1] ( previous value); not that this will happen # even though you have provided for taps the value None, which is a bit # strange (why would one provide an initial state but tell scan not to # use it ? ), just that in that case we will throw in a warning message # pointing out this inconsistency elif outs_info[i].get('initial',None) and \ ( not outs_info[i].get('taps',None)): if outs_info[i].has_key('taps'): warning('You are providing a initial state for an output and then ' 'tell scan not to use it. Why? Scan will overwrite this setting' ' and use the previous value of the provided initial state. If' ' this is not what you wanted, check your code and do not ' 'provide the initial state') outs_info[i]['taps'] = [-1] else: # if the output is a None then replace it with an empty dictionary for # easing up dealing with this case later one ( we can directly call .has_key # and things like this outs_info[i] = dict() store_steps += [0] if outs_info[i].get('taps', None): # Create a separate outputs_taps dictionary with all the outputs taps; This # is how the Scan Op expects this information, separeted from the variables outputs_taps[i] = outs_info[i]['taps'] if outs_info[i].get('inplace', None): # The same is true for the inplace info; it has to go into a separate # dictionary based on index; Note that the input we're replacing should also # come as an index, therefore we have to look for it at this point found = None for k in xrange(n_seqs): if seqs[k].get('input', None) == outs_info[i].get('inplace',None): found = k if found != None: # NOTE : inplace_map is identical to destroy_map, i.e. it tells what # output is computed inplace of what input !! inplace_map[i] = found else: raise ValueError('Asked to compute in place of a non-input variable',\ outs_info[i].get('inplace', None)) # create theano inputs for the recursive function # note : this is a first batch of possible inputs that will # be compiled in a dummy function; we used this dummy # function to detect shared variables and their updates # and to construct a new and complete list of inputs and outputs args = [] # list of arguments dummy_notshared_ins = 0 # number of arguments corresponding to input seqs dummy_notshared_init_outs = 0 # number of arguments corresponding to output seqs slice_to_seqs = [] # for each slice index of the corresponding input # go through sequences picking up time slices as needed for i,seq in enumerate(seqs): # Note that you can have something like no taps for # a sequence, though is highly unlikely in practice if seq.get('taps', None): # go through the indicated slice mintap = numpy.min(seq['taps']) for k in seq['taps']: # create one slice of the input ''' Later on, if we decide not to use scan because we are going for just one step, it makes things easier if we compute the correct outputs here. This way we can use the output of the lambda expression directly to replace the output of scan. If not we need to use copies, that will be replaced at each frame by the corresponding slice ''' if n_fixed_steps not in [1,-1]: nw_slice = seq['input'][0].type() elif n_fixed_steps == 1: nw_slice = seq['input'][k-mintap] else: nw_slice = seq['input'][-1+mintap-k] # Add names to slices for debugging and pretty printing .. # that is if the input already has a name if seq['input'].name: if seq['taps'][k] > 0: nw_slice.name = seq['input'].name + '[t+%d]'%seq['taps'][k] elif seq['taps'][k] == 0: nw_slice.name = seq['input'].name + '[t]' else: nw_slice.name = seq['input'].name + '[t%d]'%seq['taps'][k] args.append(nw_slice) # Specify to whom this slice belongs slice_to_seqs.append(i) # Any slice is not a shared variable, even though the sequence # from where we pick the slices is shared, therefore we should # increase the number of notshared inputs to the dummy function # by the number of slices dummy_notshared_ins += len(seq['taps']) # go through outputs picking up time slices as needed for i,init_out in enumerate(outs_info): # Note that our convention dictates that if an output uses # just the previous time step, as a initial state we will only provide # a tensor of the same dimension as one time step; This makes code # much cleaner for those who do not use taps. Otherwise they would # always had to shape_pad_left the initial state .. which is ugly if init_out.get('taps', None) == [-1]: if n_fixed_steps in [-1,1]: args += [init_out['initial']] else: args += [init_out['initial'].type()] # Added name to slices for debugging and pretty printing if init_out['initial'].name: args[-1].name = init_out['initial'].name+'[t-1]' # we need to specify in slice_seqs to which output this # slice belongs; Because we might get confused afterwards # if a number is an index of a sequence or an output, and # because we do not want to create yet another list, we will # add the number of sequences + the current output. This makes # decoding easy and spares us from writing a lot of lines slice_to_seqs += [ i+n_seqs ] dummy_notshared_init_outs += 1 elif init_out.get('taps',None): if numpy.any(numpy.array(init_out.get('taps',[])) > 0): # Make sure we do not have requests for future values of a sequence # we can not provide such values raise ValueError('Can not use future taps of outputs', init_out) # go through the taps minstep = abs(numpy.min(init_out['taps'])) for k in init_out['taps']: # create a new slice if n_fixed_steps in [1,-1]: nw_slice = init_out['initial'][k+minstep] else: nw_slice = init_out['initial'][0].type() # give it a name or debugging and pretty printing if init_out['initial'].name: if k > 0: nw_slice.name = init_out['initial'].name + '[t+%d]'%k elif k == 0: nw_slice.name = init_out['initial'].name + '[t]' else: nw_slice.name = init_out['initial'].name + '[t%d]'%k args.append(nw_slice) # indicate the output index + n_seqs ( see above why) slice_to_seqs.append(i + n_seqs) # add as many slices as there are taps dummy_notshared_init_outs += len(init_out['taps']) #NOTE: there is another case, in which we do not want to provide any previous # value of the output to the inner case; in this case we do not have to do # anything .. # remove shared variables from the non sequences list # such that we can compile the function ( the user has the option to add them when # writing scan, because in some situations this might make the code more readable) notshared_other_args = [] for non_seq in non_seqs: if not isinstance(non_seq, SharedVariable): notshared_other_args += [non_seq] # add only the not shared variables to the arguments of the dummy # function [ a function should not get shared variables as input ] dummy_args = [] for arg in args: if not isinstance(arg, SharedVariable): dummy_args += [arg] dummy_args += notshared_other_args # arguments for the lambda expression that gives us the output # of the inner function args += non_seqs # when we apply the lambda expression we get a mixture of update rules # and outputs that needs to be separated outputs_updates = fn(*args) # The code that follows tries to be as flexible as possible allowing the # user to return the output and updates in any order, and giving the updates # however he wants ( as a dictionary or a list o pairs ..) # Is there a way to compress all this by writing it in a more python/functional way? outputs = [] updates = {} # we will try now to separate the outputs from the updates if not type(outputs_updates) in (list,tuple): if type(outputs_updates) == dict : # we have just an update dictionary updates = outputs_updates else: outputs = [outputs_updates] else: elem0 = outputs_updates[0] elem1 = outputs_updates[1] t_el0 = type(elem0) t_el1 = type(elem1) if t_el0 == dict or ( t_el0 in (list,tuple) and type(elem0[0]) in (list,tuple)): # elem0 is the updates dictionary / list updates = elem0 outputs = elem1 if not type(outputs) in (list,tuple): outputs = [outputs] elif ( type(elem1) == dict) or \ ( type(elem1) in (list,tuple) and type(elem1[0]) in (list,tuple)): # elem1 is the updates dictionary / list updates = elem1 outputs = elem0 if not type(outputs) in (list,tuple): outputs = [outputs] else : if type(outputs_updates) in (list,tuple) and \ (type(outputs_updates[0]) in (list,tuple)): outputs = [] updates = outputs_updates else: outputs = outputs_updates updates = {} # in case you return a tuple .. convert it to a list (there are certain # operation that are not permited on tuples, like element assignment) outputs = list(outputs) # If you return numbers (highly unlikely) this will not go well for theano # We need to convert them to Theano constants for i,out in enumerate(outputs): outputs[i] = tensor.as_tensor(out) # We can now compile a dummy function just to see what shared variable # we have and what are their update rules (note that the user has # the option not to pass the shared variable to scan, so we need to # pick them manually and add them to scan) # make the compilation as fast as possible by not applying any optimization # or conversion to C [ note this region is not important for performance # so we can do stuff as unoptimal as we wish ] if n_fixed_steps in [-1,1]: ''' We do have a special case here, namely is so might happen that whatever we have in dummy_args is not sufficient to compile the function( i.e. missing inputs). Furthermore we might not even need to compile the function here for this special case. But due to the way I wrote the code is easier to have a compiled function here that I can ignore later. Plus it is easier this way to take care of shared variables with non-default updates. Therefore only for this case I need to use gof.graph.inputs to look for the real inputs so that I can compile the function. RP ''' dummy_f = function(filter(lambda x: isinstance(x, gof.Variable) and \ not isinstance(x,SharedVariable) and not isinstance(x,gof.Constant), \ gof.graph.inputs(dummy_args)), outputs, updates = updates, mode = compile.mode.Mode(linker='py',optimizer=None)) else: dummy_f = function(filter(lambda x: isinstance(x, gof.Variable) and \ not isinstance(x,SharedVariable) and not isinstance(x,gof.Constant), \ dummy_args), outputs, updates = updates, mode = compile.mode.Mode(linker='py',optimizer=None)) # We now look at what outputs our function returns inner_fn_outs = [ out.variable for out in dummy_f.maker.outputs] update_map = {} shared_outs = [] shared_non_seqs = [] givens = {} # if the number of outputs to the function does not match the number of # assumed outputs until now (provided by the initial case) there can be # only one explanation that we now how to deal with. Namely no information # is provided for any outputs which will indicate that we deal with a map, # i.e. we never use previous values of outputs if len(inner_fn_outs) != n_outs: if outs_info == []: # We know how to deal with this case, assume that none of the outputs # are required to have any sort of time taps # we just need to update the number of actual outputs n_outs = len(inner_fn_outs) # other updates : for i in xrange(n_outs): outs_info += [ dict() ] # we also need to re-initialize the store_steps list to match the # number of outputs store_steps = [ 0 for i in xrange(n_outs)] else: # Otherwise there is a bit of confusion, since Scan works on the index of # a sequence /output. There are maybe corner cases that could be added here # or defult behaviour ( like always add the extra outputs at the end !?) # But I did not bother implementing this, I leave it to the user to clearly # express what he/she wants to do raise ValueError('Scan is totally lost. Make sure that you indicate for each' ' output what taps you want to use, or None, if you do not want to' ' use any !') inner_fn_inputs=[input.variable for input in \ dummy_f.maker.expanded_inputs[:dummy_notshared_ins+dummy_notshared_init_outs]] # Keep track of the range (place) where you insert shared variables with updates # Because we will not be able to compute the gradient with respect to those variables # inner_fn_notshared_ins_idx is from where these shared variables with updates start inner_fn_notshared_ins_idx = dummy_notshared_ins + dummy_notshared_init_outs # Because scan is particularly sensitive at the order in which it gets its # arguments, we need to separete the shared variables that act as outputs # from those that are not outputs of the network as well n_extended_outs = n_outs # Skip the slices that we've added to the inner_fn which will be the first elements # of f.maker.epanded_inputs and which we know that are not shared fromIdx = dummy_notshared_ins + dummy_notshared_init_outs copy_map = {} for input in dummy_f.maker.expanded_inputs[fromIdx:] : # If input is a shared variable that gets updated, then # this shared variable will be an output of our inner function if isinstance(input.variable, SharedVariable) and input.update: # Create a copy of it new_var = input.variable.type() if input.variable.name: new_var.name = input.variable.name + '_copy' copy_map[new_var] = input.variable inner_fn_inputs.append(new_var) # add it to the slices at the end slice_to_seqs += [ n_extended_outs ] inner_fn_outs += [input.update] update_map[ input.variable ] = n_extended_outs # We know that we only have access to the last step outputs_taps[ n_extended_outs ] = [-1] n_extended_outs += 1 # we shouldn't try to store more then the last step # this might not even be a tensor ! ( RandomState ) store_steps += [1] return_steps[n_extended_outs -1] = 1 shared_outs += [input.variable] givens[input.variable] = inner_fn_inputs[-1] # inner_fn_shared_ins_idx stores where we stop having shared variables with updates inner_fn_shared_ins_idx = len(inner_fn_inputs) - inner_fn_notshared_ins_idx # Now that we took out the shared variables that have an update rule # we need to take care of all the other shared variables for input in dummy_f.maker.expanded_inputs[fromIdx:] : # make sure that we do not add the same shared variable twice if isinstance(input.variable, SharedVariable) and not input.update: shared_non_seqs += [input.variable] new_var = input.variable.type() if input.variable.name: new_var.name = input.variable.name + '_copy' inner_fn_inputs += [new_var] slice_to_seqs += [ n_extended_outs] givens[input.variable] = inner_fn_inputs[-1] copy_map[inner_fn_inputs[-1]] = input.variable elif not isinstance(input.variable, SharedVariable): # also add the normal tensor that are non sequences at the # end of the inputs intertwingled with the shared variables inner_fn_inputs.append(input.variable) # If we haven't provided a number of steps nor did we provide a sequence # scan will not know how long to iterate if (n_steps == None or n_steps == numpy.inf or n_steps == numpy.nan) and n_seqs == 0 : raise ValueError('Scan does not know for how many steps to iterate. ' 'You need to provide the number of steps through the ' ' ``n_steps`` argument if you do not iterate over any sequence') # We can now create the Scan Op Object if n_fixed_steps not in [1,-1]: if n_steps != None: n_steps = tensor.as_tensor(n_steps) else: n_steps = gof.Constant(gof.generic, 'unknown', '?_steps') local_op = Scan( (inner_fn_inputs,inner_fn_outs, givens, slice_to_seqs ), n_seqs, n_extended_outs, inplace_map, sequences_taps, outputs_taps, n_steps,truncate_gradient, # n_outs, inner_fn_notshared_ins_idx and inner_fn_shared_ins_idx are used by the gradient # to figure out where in the input are shared variables with updates, for whom I can't compute # a gradient n_outs, inner_fn_notshared_ins_idx, inner_fn_shared_ins_idx, go_backwards, store_steps, return_steps, mode, name = name ) # Shortcut for attaching this property to the Scan op local_op.copy_map = copy_map # Call the object on the input sequences, initial values for outs, # and non sequences for seq in seqs : if not seq.get('input', None): raiseValue('All input sequences should provide') unwrapped_seqs = [ seq.get('input',tensor.as_tensor(0.)) for seq in seqs ] unwrapped_outs = [ out.get('initial',tensor.as_tensor(0.)) for out in outs_info ] values = local_op( *( [n_steps] + unwrapped_seqs + unwrapped_outs + shared_outs + notshared_other_args + shared_non_seqs)) else: # If we do not actually need scan for pos, inner_out in enumerate(inner_fn_outs): if isinstance(inner_out.type, tensor.TensorType) and store_steps[pos] != 1: inner_fn_outs[pos] = tensor.unbroadcast( tensor.shape_padleft(inner_out),0) values = inner_fn_outs if not type(values) in (tuple, list): values = [values] # take out the updates of shared variable and build the dictionary # that tells what to update and with what value for val in update_map.keys(): update_map[val] = values [ update_map[val] ] # Now we need to check the values returned # if it just one strip the list around it if n_outs == 1: # if we need to return just one step or several steps # note that when we return one step we have two cases, in # the first one store_steps is set to 1, case in which we don't # need to take a slice of the output (is already of the right # dimension) and case 2 when we store more then one step, # and we actually need to take a slice if return_steps.has_key(0): if return_steps[0] > 1: values = values[0][-return_steps[0]:] else: if store_steps[0] == 1: values = values[0] else: values = values[0][-1] else: values = values[0] else: values = values[:n_outs] for idx,val in enumerate(values): if return_steps.has_key(idx): if return_steps[idx] > 1: values[idx] = val[-return_steps[idx]:] else: if store_steps[idx] == 1: values[idx] = val else: values[idx] = val[-1] return (values, update_map)
f2d65b5f1543549d0ee82f56a5380a255723c639 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12438/f2d65b5f1543549d0ee82f56a5380a255723c639/scan.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4135, 12, 2295, 269, 8463, 540, 273, 599, 269, 6729, 67, 1376, 1377, 273, 599, 269, 1661, 67, 17190, 377, 273, 599, 269, 290, 67, 8986, 6647, 273, 599, 269, 10310, 67, 20219, 273, 300,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4135, 12, 2295, 269, 8463, 540, 273, 599, 269, 6729, 67, 1376, 1377, 273, 599, 269, 1661, 67, 17190, 377, 273, 599, 269, 290, 67, 8986, 6647, 273, 599, 269, 10310, 67, 20219, 273, 300,...
port=0):
port=ftplib.FTP_PORT):
def __init__(self, host, username='', password='', acct='', passive=1, port=0): self._host=host self._port=port self._username=username self._password=password self._acct=acct self._passive=passive self._conn=FtpConnection() self._initconn()
c8cffff10ef78cf492bbfb8f8336fa90bf4133c6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2304/c8cffff10ef78cf492bbfb8f8336fa90bf4133c6/ftpfs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1479, 16, 2718, 2218, 2187, 2201, 2218, 2187, 20774, 2218, 2187, 23697, 33, 21, 16, 1756, 33, 1222, 6673, 18, 17104, 67, 6354, 4672, 365, 6315, 2564, 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, 1, 1, 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, 1479, 16, 2718, 2218, 2187, 2201, 2218, 2187, 20774, 2218, 2187, 23697, 33, 21, 16, 1756, 33, 1222, 6673, 18, 17104, 67, 6354, 4672, 365, 6315, 2564, 33, ...
file.Write( "error::Error GLES2DecoderImpl::Handle%s(\n" % func.name) file.Write( " uint32 immediate_data_size, const gles2::%s& c) {\n" % func.name) args = func.GetCmdArgs() id_arg = args[0] bucket_arg = args[1] id_arg.WriteGetCode(file) bucket_arg.WriteGetCode(file) id_arg.WriteValidationCode(file) file.Write(" GLint len = 0;\n") file.Write(" %s(%s, %s, &len);\n" % ( func.GetInfo('get_len_func'), id_arg.name, func.GetInfo('get_len_enum'))) file.Write(" Bucket* bucket = CreateBucket(%s);\n" % bucket_arg.name) file.Write(" bucket->SetSize(len + 1);\n"); file.Write( " %s(%s, len + 1, &len, bucket->GetDataAs<GLchar*>(0, len + 1));\n" % (func.GetGLFunctionName(), id_arg.name)) file.Write(" return error::kNoError;\n") file.Write("}\n") file.Write("\n")
pass
def WriteServiceImplementation(self, func, file): """Overrriden from TypeHandler.""" file.Write( "error::Error GLES2DecoderImpl::Handle%s(\n" % func.name) file.Write( " uint32 immediate_data_size, const gles2::%s& c) {\n" % func.name) args = func.GetCmdArgs() id_arg = args[0] bucket_arg = args[1] id_arg.WriteGetCode(file) bucket_arg.WriteGetCode(file) id_arg.WriteValidationCode(file) file.Write(" GLint len = 0;\n") file.Write(" %s(%s, %s, &len);\n" % ( func.GetInfo('get_len_func'), id_arg.name, func.GetInfo('get_len_enum'))) file.Write(" Bucket* bucket = CreateBucket(%s);\n" % bucket_arg.name) file.Write(" bucket->SetSize(len + 1);\n"); file.Write( " %s(%s, len + 1, &len, bucket->GetDataAs<GLchar*>(0, len + 1));\n" % (func.GetGLFunctionName(), id_arg.name)) file.Write(" return error::kNoError;\n") file.Write("}\n") file.Write("\n")
9fa7a2b02d77ec300c60a11cdfaf23fc9c50a619 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/9fa7a2b02d77ec300c60a11cdfaf23fc9c50a619/build_gles2_cmd_buffer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2598, 1179, 13621, 12, 2890, 16, 1326, 16, 585, 4672, 3536, 22042, 1691, 275, 628, 1412, 1503, 12123, 585, 18, 3067, 12, 315, 1636, 2866, 668, 611, 11386, 22, 7975, 2828, 2866, 3259, 9, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2598, 1179, 13621, 12, 2890, 16, 1326, 16, 585, 4672, 3536, 22042, 1691, 275, 628, 1412, 1503, 12123, 585, 18, 3067, 12, 315, 1636, 2866, 668, 611, 11386, 22, 7975, 2828, 2866, 3259, 9, ...
properties = dict(reply_to=self.args[0],
properties = dict(reply_to=reply_to or self.args[0],
def quick_reply(self, ctx, title, content): if not iusers.IA(ctx).get('uid'): raise WebException("You must login first") properties = dict(reply_to=self.args[0], owner_id=iusers.IA(ctx)['uid'], creation=datetime.now(), modification=datetime.now(), title=title, body=content, parsed_body=content ) d = idb.ITopicsDatabase(idb.IS(ctx)).addPost(properties) return d
daf36f2d2577605366a791ba66c109612a6ed904 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2507/daf36f2d2577605366a791ba66c109612a6ed904/topic.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9549, 67, 10629, 12, 2890, 16, 1103, 16, 2077, 16, 913, 4672, 309, 486, 277, 5577, 18, 15188, 12, 5900, 2934, 588, 2668, 1911, 11, 4672, 1002, 2999, 503, 2932, 6225, 1297, 3925, 1122, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9549, 67, 10629, 12, 2890, 16, 1103, 16, 2077, 16, 913, 4672, 309, 486, 277, 5577, 18, 15188, 12, 5900, 2934, 588, 2668, 1911, 11, 4672, 1002, 2999, 503, 2932, 6225, 1297, 3925, 1122, ...
validproducts = self._valid_cart_products(cart)
allvalid = False validproducts = self._valid_products(order.orderitem_set)
def calc(self, order): # Use the order details and the discount specifics to calculate the actual discount discounted = {} if self.validProducts.count() == 0: allvalid = True else: validproducts = self._valid_cart_products(cart)
8c795bf9422fa9c3b95f1c704168895e2826c9d9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/171/8c795bf9422fa9c3b95f1c704168895e2826c9d9/models.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7029, 12, 2890, 16, 1353, 4672, 468, 2672, 326, 1353, 3189, 471, 326, 12137, 2923, 87, 358, 4604, 326, 3214, 12137, 12137, 329, 273, 2618, 309, 365, 18, 877, 13344, 18, 1883, 1435, 422, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7029, 12, 2890, 16, 1353, 4672, 468, 2672, 326, 1353, 3189, 471, 326, 12137, 2923, 87, 358, 4604, 326, 3214, 12137, 12137, 329, 273, 2618, 309, 365, 18, 877, 13344, 18, 1883, 1435, 422, ...
context)[0][1] + \ ' (partner: ' + pline.partner_id.name + ').') continue
context)[0][1] + '\n' \ 'on line: ' + pline.name)
def _create_dta(obj, cr, uid, data, context): v={} v['uid'] = str(uid) v['creation_date']= time.strftime('%y%m%d') log=Log() dta='' pool = pooler.get_pool(cr.dbname) payment_obj = pool.get('payment.order') attachment_obj = pool.get('ir.attachment') payment = payment_obj.browse(cr, uid, data['id'], context=context) if not payment.mode or payment.mode.type.code != 'dta': return {'note':'No payment mode or payment type code invalid.'} bank = payment.mode.bank_id if not bank: return {'note':'No bank account for the company.'} v['comp_bank_name']= bank.bank and bank.bank.name or False v['comp_bank_clearing'] = bank.bank.clearing if not v['comp_bank_clearing']: return {'note': 'You must provide a Clearing Number for your bank account.'} user = pool.get('res.users').browse(cr,uid,[uid])[0] company= user.company_id #XXX dirty code use get_addr co_addr= company.partner_id.address[0] v['comp_country'] = co_addr.country_id and co_addr.country_id.name or '' v['comp_street'] = co_addr.street or '' v['comp_zip'] = co_addr.zip v['comp_city'] = co_addr.city v['comp_name'] = co_addr.name v['comp_dta'] = '' #XXX not mandatory in pratice v['comp_bank_number'] = bank.acc_number or '' v['comp_bank_iban'] = bank.iban or '' if not v['comp_bank_iban'] : return {'note':'No iban number for the company bank account.'} dta_line_obj = pool.get('account.dta.line') res_partner_bank_obj = pool.get('res.partner.bank') seq= 1 amount_tot = 0 amount_currency_tot = 0 for pline in payment.line_ids: if not pline.bank_id: log.add('\nNo partner bank defined. (partner: ' + \ pline.partner_id.name + ', entry:' + \ pline.move_line_id.name + ').') continue if not pline.bank_id.bank: log.add('\nNo bank defined on the bank account. (partner: ' + \ pline.partner_id.name + ', entry:' + \ pline.move_line_id.name + ').') v['sequence'] = str(seq).rjust(5).replace(' ', '0') v['amount_to_pay']= str(pline.amount_currency).replace('.', ',') v['number'] = pline.name v['currency'] = pline.currency.code v['partner_bank_name'] = pline.bank_id.bank and pline.bank_id.bank.name \ or False v['partner_bank_clearing'] = pline.bank_id.bank.clearing or False if not v['partner_bank_name'] : log.add('\nPartner bank account not well defined, please provide a name ' 'for the associated bank (partner: ' + pline.partner_id.name + \ ', bank:' + res_partner_bank_obj.name_get(cr, uid, [pline.bank_id.id], context)[0][1] + ').') continue v['partner_bank_iban']= pline.bank_id.iban or False v['partner_bank_number']= pline.bank_id.acc_number \ and pline.bank_id.acc_number.replace('.','').replace('-','') \ or False v['partner_post_number']= pline.bank_id.post_number \ and pline.bank_id.post_number.replace('.', '').replace('-', '') \ or False v['partner_bvr'] = pline.bank_id.bvr_number or '' if v['partner_bvr']: v['partner_bvr'] = v['partner_bvr'].replace('-','') if len(v['partner_bvr']) < 9: v['partner_bvr'] = v['partner_bvr'][:2] + '0' * \ (9 - len(v['partner_bvr'])) + v['partner_bvr'][2:] if pline.bank_id.bank: v['partner_bank_city'] = pline.bank_id.bank.city or False v['partner_bank_street'] = pline.bank_id.bank.street or '' v['partner_bank_zip'] = pline.bank_id.bank.zip or '' v['partner_bank_country'] = pline.bank_id.bank.country and \ pline.bank_id.bank.country.name or '' v['partner_bank_code'] = pline.bank_id.bank.bic v['reference'] = pline.move_line_id.ref v['partner_name'] = pline.partner_id and pline.partner_id.name or '' if pline.partner_id and pline.partner_id.address \ and pline.partner_id.address[0]: v['partner_street'] = pline.partner_id.address[0].street v['partner_city']= pline.partner_id.address[0].city v['partner_zip']= pline.partner_id.address[0].zip # If iban => country=country code for space reason elec_pay = pline.bank_id.state #Bank type if elec_pay == 'iban': v['partner_country']= pline.partner_id.address[0].country_id \ and pline.partner_id.address[0].country_id.code+'-' \ or '' else: v['partner_country']= pline.partner_id.address[0].country_id \ and pline.partner_id.address[0].country_id.name \ or '' else: v['partner_street'] ='' v['partner_city']= '' v['partner_zip']= '' v['partner_country']= '' log.add('\nNo address for the partner: '+pline.partner_id.name) date_value = mx.DateTime.strptime(pline.value_date, '%Y-%m-%d') \ or mx.DateTime.now() v['date_value'] = date_value.strftime("%y%m%d") # si compte iban -> iban (836) # si payment structure -> bvr (826) # si non -> (827) if elec_pay == 'dta_iban': # If iban => country=country code for space reason v['comp_country'] = co_addr.country_id and co_addr.country_id.code+'-' or '' record_type = record_gt836 if not v['partner_bank_iban']: log.add('\nNo iban number for the partner bank:' + \ res_partner_bank_obj.name_get(cr, uid, [pline.bank_id.id], context)[0][1] + \ ' (partner: ' + pline.partner_id.name + ').') continue if v['partner_bank_code'] : # bank code is swift (BIC address) v['option_id_bank']= 'A' v['partner_bank_ident']= v['partner_bank_code'] elif v['partner_bank_city']: v['option_id_bank']= 'D' v['partner_bank_ident']= v['partner_bank_name'] \ + ' ' + v['partner_bank_street'] \ + ' ' + v['partner_bank_zip'] \ + ' ' + v['partner_bank_city'] \ + ' ' + v['partner_bank_country'] else: log.add("\nYou must provide the bank city " "or the bic code for the partner bank:" + \ res_partner_bank_obj.name_get(cr, uid, [pline.bank_id.id], context)[0][1] + \ ' (partner: ' + pline.partner_id.name + ').') continue elif elec_pay == 'bvrbank' or elec_pay == 'bvrpost': from tools import mod10r if v['reference']: v['reference'] = v['reference'].replace(' ', '').rjust(27).replace(' ', '0') if not v['reference'] \ or mod10r(v['reference'][:-1]) != v['reference']: log.add('\nYou must provide a valid BVR reference number.' ' (payment line ' + pline.name +')') continue if not v['partner_bvr']: log.add("\nYou must provide a BVR number " "on the partner bank:" + \ res_partner_bank_obj.name_get(cr, uid, [pline.bank_id.id], context)[0][1] + \ ' (partner: ' + pline.partner_id.name + ').') continue record_type = record_gt826 elif elec_pay == 'bvbank': if not v['partner_bank_number'] : if v['partner_bank_iban'] : v['partner_bank_number']= v['partner_bank_iban'] else: log.add('\nYou must provide a bank number in the partner bank.' ' (payment line '+ pline.name +')') continue if not v['partner_bank_clearing']: log.add('\nPartner bank must have a Clearing Number' 'for a BV Bank operation. (payment line '+ pline.name +')') continue v['partner_bank_number'] = '/C/'+v['partner_bank_number'] record_type = record_gt827 elif elec_pay == 'bvpost': if not v['partner_post_number']: log.add('\nYou must provide a post number in the partner bank.' ' (payment line '+ pline.name +')') continue v['partner_bank_clearing']= '' v['partner_bank_number'] = '/C/'+v['partner_post_number'] record_type = record_gt827 else: log.add('\nBank type not supported. (partner:'+ pline.partner_id.name + \ ', bank:' + \ res_partner_bank_obj.name_get(cr, uid, [pline.bank_id.id], context)[0][1] + \ ', type:' + elec_pay + ')') continue try: dta_line = record_type(v).generate() except Exception,e : log.add('\nERROR:'+ str(e)+' (payment line '+ pline.name + ')') raise continue #logging log.add('Payment line : %s, Amount paid : %d %s, ' 'Value date : %s, State : Paid.' % \ (pline.name, pline.amount, v['currency'], date_value and \ date_value.strftime("%Y-%m-%d") or 'Empty date'), error=False) dta = dta + dta_line amount_tot += pline.amount amount_currency_tot += pline.amount_currency seq += 1 # segment total v['amount_total'] = str(amount_currency_tot).replace('.',',') v['sequence'] = str(seq).rjust(5).replace(' ','0') try: if dta : dta = dta + record_gt890(v).generate() except Exception,e : log.add('\n'+ str(e) + 'CORRUPTED FILE !\n') raise log.add("\n--\nSummary :\nTotal amount paid : %.2f" \ % (amount_tot,), error=False) if not log.error: dta_data= base64.encodestring(dta) payment_obj.set_done(cr, uid, data['id'], context) attachment_obj.create(cr, uid, { 'name': 'DTA', 'datas': dta_data, 'datas_fname': 'DTA.txt', 'res_model': 'payment.order', 'res_id': data['id'], }, context=context) else: dta_data= False return {'note':log(), 'dta': dta_data}
37f9126996ca14fd28e570694117dd491f10c960 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7339/37f9126996ca14fd28e570694117dd491f10c960/dta_wizard.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2640, 67, 72, 2351, 12, 2603, 16, 4422, 16, 4555, 16, 501, 16, 819, 4672, 331, 12938, 331, 3292, 1911, 3546, 273, 609, 12, 1911, 13, 331, 3292, 17169, 67, 712, 3546, 33, 813, 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, 2640, 67, 72, 2351, 12, 2603, 16, 4422, 16, 4555, 16, 501, 16, 819, 4672, 331, 12938, 331, 3292, 1911, 3546, 273, 609, 12, 1911, 13, 331, 3292, 17169, 67, 712, 3546, 33, 813, 18...
'amount': float(line[39:48]) + (float(line[48:49]) / 100),
'amount': float(line[39:47]) + (float(line[47:49]) / 100),
def _import(obj, cursor, user, data, context): pool = pooler.get_pool(cursor.dbname) statement_line_obj = pool.get('account.bank.statement.line') statement_reconcile_obj = pool.get('account.bank.statement.reconcile') move_line_obj = pool.get('account.move.line') property_obj = pool.get('ir.property') model_fields_obj = pool.get('ir.model.fields') attachment_obj = pool.get('ir.attachment') file = data['form']['file'] statement_id = data['id'] records = [] total_amount = 0 total_cost = 0 find_total = False for lines in base64.decodestring(file).split("\n"): # Manage files without carriage return while lines: (line, lines) = (lines[:128], lines[128:]) record = {} if line[0:3] in ('999', '995'): if find_total: raise wizard.except_wizard('Error', 'Too much total record found!') find_total = True if lines: raise wizard.except_wizard('Error', 'Record found after total record!') amount = float(line[39:50]) + (float(line[50:51]) / 100) cost = float(line[69:77]) + (float(line[77:78]) / 100) if line[2] == '5': amount *= -1 cost *= -1 if round(amount - total_amount, 2) >= 0.01 \ or round(cost - total_cost, 2) >= 0.01: raise wizard.except_wizard('Error', 'Total record different from the computed!') if int(line[51:63]) != len(records): raise wizard.except_wizard('Error', 'Number record different from the computed!') else: record = { 'reference': line[12:39], 'amount': float(line[39:48]) + (float(line[48:49]) / 100), 'date': time.strftime('%Y-%m-%d', time.strptime(line[65:71], '%y%m%j')), 'cost': float(line[96:99]) + (float(line[99:100]) / 100), } if record['reference'] != mod10r(record['reference'][:-1]): raise wizard.except_wizard('Error', 'Recursive mod10 is invalid for reference: %s' % \ record['reference']) if line[2] == '5': record['amount'] *= -1 record['cost'] *= -1 total_amount += record['amount'] total_cost += record['cost'] records.append(record) model_fields_ids = model_fields_obj.search(cursor, user, [ ('name', 'in', ['property_account_receivable', 'property_account_payable']), ('model', '=', 'res.partner'), ], context=context) property_ids = property_obj.search(cursor, user, [ ('fields_id', 'in', model_fields_ids), ('res_id', '=', False), ], context=context) account_receivable = False account_payable = False for property in property_obj.browse(cursor, user, property_ids, context=context): if property.fields_id.name == 'property_account_receivable': account_receivable = int(property.value.split(',')[1]) elif property.fields_id.name == 'property_account_payable': account_payable = int(property.value.split(',')[1]) for record in records: # Remove the 11 first char because it can be adherent number # TODO check if 11 is the right number reference = record['reference'][11:-1].lstrip('0') values = { 'name': 'BVR', 'date': record['date'], 'amount': record['amount'], 'ref': reference, 'type': (record['amount'] >= 0 and 'customer') or 'supplier', 'statement_id': statement_id, } line_ids = move_line_obj.search(cursor, user, [ ('ref', '=', reference), ('reconcile_id', '=', False), ('account_id.type', 'in', ['receivable', 'payable']), ], order='date DESC, id DESC', context=context) line2reconcile = False partner_id = False account_id = False for line in move_line_obj.browse(cursor, user, line_ids, context=context): if line.partner_id.id: partner_id = line.partner_id.id if record['amount'] >= 0: if round(record['amount'] - line.debit, 2) < 0.01: line2reconcile = line.id account_id = line.account_id.id break else: if round(line.credit + record['amount'], 2) < 0.01: line2reconcile = line.id account_id = line.account_id.id break if not account_id: if record['amount'] >= 0: account_id = account_receivable else: account_id = account_payable values['account_id'] = account_id values['partner_id'] = partner_id if line2reconcile: values['reconcile_id'] = statement_reconcile_obj.create(cursor, user, { 'line_ids': [(6, 0, [line2reconcile])], }, context=context) statement_line_obj.create(cursor, user, values, context=context) attachment_obj.create(cursor, user, { 'name': 'BVR', 'datas': file, 'datas_fname': 'BVR.txt', 'res_model': 'account.bank.statement', 'res_id': statement_id, }, context=context) return {}
d6e163f03515c2c155d5bfbaed6150363e4ccd64 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7339/d6e163f03515c2c155d5bfbaed6150363e4ccd64/bvr_import.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5666, 12, 2603, 16, 3347, 16, 729, 16, 501, 16, 819, 4672, 2845, 273, 2845, 264, 18, 588, 67, 6011, 12, 9216, 18, 20979, 13, 3021, 67, 1369, 67, 2603, 273, 2845, 18, 588, 2668, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 5666, 12, 2603, 16, 3347, 16, 729, 16, 501, 16, 819, 4672, 2845, 273, 2845, 264, 18, 588, 67, 6011, 12, 9216, 18, 20979, 13, 3021, 67, 1369, 67, 2603, 273, 2845, 18, 588, 2668, ...
'size': number_to_human_size(build['size']),
'size': format_byte_size(build['size']),
def update_params(self, d): super(SourceDownloadsWidget, self).update_params(d) sources = [] releases = [] dist_tags = {}
f5b8611e785fc5e833d2b257dd05231893aa71b5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12732/f5b8611e785fc5e833d2b257dd05231893aa71b5/downloads.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 67, 2010, 12, 2890, 16, 302, 4672, 2240, 12, 1830, 22141, 4609, 16, 365, 2934, 2725, 67, 2010, 12, 72, 13, 5550, 273, 5378, 14824, 273, 5378, 2411, 67, 4156, 273, 2618, 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, 1089, 67, 2010, 12, 2890, 16, 302, 4672, 2240, 12, 1830, 22141, 4609, 16, 365, 2934, 2725, 67, 2010, 12, 72, 13, 5550, 273, 5378, 14824, 273, 5378, 2411, 67, 4156, 273, 2618, 2, -100, ...
if debug_thumbview: print "debug: MMKitView.drawModel, model is %r" % (self.model,)
def drawModel(self): """The method for element drawing """ if debug_thumbview: print "debug: MMKitView.drawModel, model is %r" % (self.model,) #bruce 060412 if self.model: if isinstance(self.model, molecule): self.model.draw(self, None) else: ## assembly self.model.draw(self)
522da8d64b3b30f194fe5f73e8708c462e3e532d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11221/522da8d64b3b30f194fe5f73e8708c462e3e532d/ThumbView.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3724, 1488, 12, 2890, 4672, 3536, 1986, 707, 364, 930, 16327, 3536, 468, 2848, 3965, 13026, 3028, 2138, 309, 365, 18, 2284, 30, 309, 1549, 12, 2890, 18, 2284, 16, 13661, 4672, 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, 3724, 1488, 12, 2890, 4672, 3536, 1986, 707, 364, 930, 16327, 3536, 468, 2848, 3965, 13026, 3028, 2138, 309, 365, 18, 2284, 30, 309, 1549, 12, 2890, 18, 2284, 16, 13661, 4672, 365, 18, ...
self.__pari_prime = None
self._pari_prime = None
def is_prime(self): """ Return True if this ideal is prime.
e007a9d9dedee1de94c0b698d8a1c5dcf36277c4 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9417/e007a9d9dedee1de94c0b698d8a1c5dcf36277c4/number_field_ideal.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 67, 16382, 12, 2890, 4672, 3536, 2000, 1053, 309, 333, 23349, 353, 17014, 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, 353, 67, 16382, 12, 2890, 4672, 3536, 2000, 1053, 309, 333, 23349, 353, 17014, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
if self.allowaddfolder or request.get('allowaddfolder', False) :
if self.allowaddfolder :
def __call__(self): context = aq_inner(self.context) request = aq_inner(self.request) session = request.get('SESSION', None) self.showbreadcrumbs = request.get('showbreadcrumbs', self.showbreadcrumbs) self.setScopeInfos(context, request, self.showbreadcrumbs) # use self.multiselect = False (or multiselect = False in request) # when multiselect is False window is closed on insert self.multiselect = request.get('multiselect', self.multiselect) # to force close on insert even in multiselect mode self.forcecloseoninsert = request.get('forcecloseoninsert', self.forcecloseoninsert) if not self.multiselect : self.forcecloseoninsert = 1 # use self.types (or types in request) to specify portal_types in catalog request self.types = request.get('types', self.types) # use self.typeupload (or typeupload in request) to specify portal_type for upload self.typeupload = request.get('typeupload', self.typeupload) # use self.typefolder (or typefolder in request) to specify portal_type used to create folder self.typefolder = request.get('typefolder', self.typefolder) # use self.typeview (or typeview in request) to specify typeview ('file' or 'image' for now, 'selection' in future) self.typeview = request.get('typeview', self.typeview) if self.typeview == 'image' : self.typecss = 'float' # use self.browse=False (or browse=False in request) to disallow browsing self.browse = request.get('browse', self.browse)
f4eca98c32960596a5695a7c4bdb0bbbbc2d131f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9052/f4eca98c32960596a5695a7c4bdb0bbbbc2d131f/finder.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 4672, 225, 819, 273, 279, 85, 67, 7872, 12, 2890, 18, 2472, 13, 590, 273, 279, 85, 67, 7872, 12, 2890, 18, 2293, 13, 1339, 273, 590, 18, 588, 2668, 7042, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 4672, 225, 819, 273, 279, 85, 67, 7872, 12, 2890, 18, 2472, 13, 590, 273, 279, 85, 67, 7872, 12, 2890, 18, 2293, 13, 1339, 273, 590, 18, 588, 2668, 7042, ...
version = '0.5.4',
version = '0.5.5dev',
def read(*rnames): text = open(os.path.join(os.path.dirname(__file__), *rnames)).read() return xml.sax.saxutils.escape(text)
d55264731c49b50b3b587686537a05f4962e1337 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/108/d55264731c49b50b3b587686537a05f4962e1337/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 30857, 86, 1973, 4672, 977, 273, 1696, 12, 538, 18, 803, 18, 5701, 12, 538, 18, 803, 18, 12287, 12, 972, 768, 972, 3631, 380, 86, 1973, 13, 2934, 896, 1435, 327, 2025, 18, 87, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 30857, 86, 1973, 4672, 977, 273, 1696, 12, 538, 18, 803, 18, 5701, 12, 538, 18, 803, 18, 12287, 12, 972, 768, 972, 3631, 380, 86, 1973, 13, 2934, 896, 1435, 327, 2025, 18, 87, ...
self.event_handler.on_modified(DirModifiedEvent(src_path))
self.event_handler.dispatch(DirModifiedEvent(src_path))
def process_IN_CLOSE_WRITE(self, event): src_path = absolute_path(event.pathname) if event.dir: self.event_handler.on_modified(DirModifiedEvent(src_path)) else: self.event_handler.on_modified(FileModifiedEvent(src_path))
9f22e4386dce9dfe71c86c825c933e6e5d39ddc1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14346/9f22e4386dce9dfe71c86c825c933e6e5d39ddc1/inotify_observer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 706, 67, 13384, 67, 11677, 12, 2890, 16, 871, 4672, 1705, 67, 803, 273, 4967, 67, 803, 12, 2575, 18, 28336, 13, 309, 871, 18, 1214, 30, 365, 18, 2575, 67, 4176, 18, 10739, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 706, 67, 13384, 67, 11677, 12, 2890, 16, 871, 4672, 1705, 67, 803, 273, 4967, 67, 803, 12, 2575, 18, 28336, 13, 309, 871, 18, 1214, 30, 365, 18, 2575, 67, 4176, 18, 10739, ...
self.onProgress('PASS', passes)
self._onProgress('PASS', passes)
def multiBuild(self, story, filename=None, canvasmaker=canvas.Canvas, maxPasses = 10): """Makes multiple passes until all indexing flowables are happy.""" self._indexingFlowables = [] #scan the story and keep a copy for thing in story: if thing.isIndexing(): self._indexingFlowables.append(thing) #print 'scanned story, found these indexing flowables:\n' #print self._indexingFlowables
a0ecc20d1f8b5567092fd97c182df828a6780b12 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3878/a0ecc20d1f8b5567092fd97c182df828a6780b12/doctemplate.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3309, 3116, 12, 2890, 16, 17285, 16, 1544, 33, 7036, 16, 5953, 29261, 33, 15424, 18, 12971, 16, 943, 6433, 281, 273, 1728, 4672, 3536, 14534, 3229, 11656, 3180, 777, 14403, 4693, 1538, 8...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3309, 3116, 12, 2890, 16, 17285, 16, 1544, 33, 7036, 16, 5953, 29261, 33, 15424, 18, 12971, 16, 943, 6433, 281, 273, 1728, 4672, 3536, 14534, 3229, 11656, 3180, 777, 14403, 4693, 1538, 8...
output.write(input.read())
return output.write(input.read())
def encode(input, output, encoding): """Encode common content-transfer-encodings (base64, quopri, uuencode).""" if encoding == 'base64': import base64 return base64.encode(input, output) if encoding == 'quoted-printable': import quopri return quopri.encode(input, output, 0) if encoding in ('uuencode', 'x-uuencode', 'uue', 'x-uue'): import uu return uu.encode(input, output) if encoding in ('7bit', '8bit'): output.write(input.read()) if encodetab.has_key(encoding): pipethrough(input, encodetab[encoding], output) else: raise ValueError, \ 'unknown Content-Transfer-Encoding: %s' % encoding
5e55de729b6e8cba458451f5ef30e127e22d9791 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/5e55de729b6e8cba458451f5ef30e127e22d9791/mimetools.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2017, 12, 2630, 16, 876, 16, 2688, 4672, 3536, 5509, 2975, 913, 17, 13866, 17, 1331, 369, 899, 261, 1969, 1105, 16, 719, 556, 566, 16, 582, 89, 3015, 13, 12123, 309, 2688, 422, 296, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2017, 12, 2630, 16, 876, 16, 2688, 4672, 3536, 5509, 2975, 913, 17, 13866, 17, 1331, 369, 899, 261, 1969, 1105, 16, 719, 556, 566, 16, 582, 89, 3015, 13, 12123, 309, 2688, 422, 296, ...
return float (line[2])
return float (line[2].replace (',', '.'))
def _sort_key (self, line): return float (line[2])
6b4eab1b405337555d382121eefe060ba9f02634 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/13309/6b4eab1b405337555d382121eefe060ba9f02634/sysstat.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3804, 67, 856, 261, 2890, 16, 980, 4672, 327, 1431, 261, 1369, 63, 22, 5717, 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, 389, 3804, 67, 856, 261, 2890, 16, 980, 4672, 327, 1431, 261, 1369, 63, 22, 5717, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
self.selenium.click('//input[@value="Go"]')
self.selenium.click('//input[@value="Search"]')
def check_result(user): "Check if the user is alone in the result list" #Also check if the the results are right assert self.selenium.get_text(\ '//div[@class="datatable"]/table/tbody/tr[last()]/td[2]') ==\ user
e20928fec6a73df2afb989567ec1386e80c253fe /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3287/e20928fec6a73df2afb989567ec1386e80c253fe/test_user_management.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 2088, 12, 1355, 4672, 315, 1564, 309, 326, 729, 353, 24068, 316, 326, 563, 666, 6, 468, 1067, 2048, 866, 309, 326, 326, 1686, 854, 2145, 1815, 365, 18, 1786, 17327, 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, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 2088, 12, 1355, 4672, 315, 1564, 309, 326, 729, 353, 24068, 316, 326, 563, 666, 6, 468, 1067, 2048, 866, 309, 326, 326, 1686, 854, 2145, 1815, 365, 18, 1786, 17327, 18, 588, ...
z.write(file[0], None, ZIP_STORED)
z.write(file[0], os.path.basename(file[0]), ZIP_STORED)
def Create(self, filename): ''' Creates the map at the given location @param filename: Location of the map file that should be created ''' print "Creating map file ..." # Open the zip file z = ZipFile(filename, "w") for file in self.__files: # Make sure we have a list if not isinstance(file, list): # ... or at least a filename string if not isinstance(file, str): continue # Convert string to list (default = compress) file = [file, True]
3f39086f75fe49cce14cac74c7a0932a21dee3b1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6105/3f39086f75fe49cce14cac74c7a0932a21dee3b1/map_generator.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1788, 12, 2890, 16, 1544, 4672, 9163, 10210, 326, 852, 622, 326, 864, 2117, 632, 891, 1544, 30, 7050, 434, 326, 852, 585, 716, 1410, 506, 2522, 9163, 1172, 315, 11092, 852, 585, 18483, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1788, 12, 2890, 16, 1544, 4672, 9163, 10210, 326, 852, 622, 326, 864, 2117, 632, 891, 1544, 30, 7050, 434, 326, 852, 585, 716, 1410, 506, 2522, 9163, 1172, 315, 11092, 852, 585, 18483, ...
"sqlite3": ",".join("?" * len(self.dbcolumnnames)),
"sqlite": ",".join("?" * len(self.dbcolumnnames)),
def _end_of_columns(self): table.Table._end_of_columns(self) # dbcolumnnames and types have the "not loaded" columns # removed if self.loadcolumns is not None: self.dbcolumnnames = [name for name in self.columnnames if name in self.loadcolumns] self.dbcolumntypes = [name for i, name in enumerate(self.columntypes) if self.columnnames[i] in self.loadcolumns] else: self.dbcolumnnames = self.columnnames self.dbcolumntypes = self.columntypes
f198debabd35b89e66412408db06e90705201425 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3589/f198debabd35b89e66412408db06e90705201425/dbtables.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 409, 67, 792, 67, 5112, 12, 2890, 4672, 1014, 18, 1388, 6315, 409, 67, 792, 67, 5112, 12, 2890, 13, 468, 1319, 2827, 1973, 471, 1953, 1240, 326, 315, 902, 4203, 6, 2168, 468, 37...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 409, 67, 792, 67, 5112, 12, 2890, 4672, 1014, 18, 1388, 6315, 409, 67, 792, 67, 5112, 12, 2890, 13, 468, 1319, 2827, 1973, 471, 1953, 1240, 326, 315, 902, 4203, 6, 2168, 468, 37...
self.job._execute_code.expect_call(arg, namespace2, namespace2)
self.job._execute_code.expect_call(arg, namespace2)
def test_run(self): self.construct_server_job()
aeee8b4525dce759db07cbe16cbd0ae13d07253d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12268/aeee8b4525dce759db07cbe16cbd0ae13d07253d/server_job_unittest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 2681, 12, 2890, 4672, 365, 18, 10062, 67, 3567, 67, 4688, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 2681, 12, 2890, 4672, 365, 18, 10062, 67, 3567, 67, 4688, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
self.bpmlabel.set_markup("<span foreground='
self.bpmlabel.set_markup("<span foreground='
def __init__(self, project, projectview, mainview): """ Creates a new instance of TimeLineBar Parameters: project -- reference to Project (Project.py). projectview -- reference to RecordingView (RecordingView.py). mainview -- reference to MainApp (JokosherApp.py). """ gtk.Frame.__init__(self) self.project = project self.projectview = projectview self.mainview = mainview self.timeline = TimeLine.TimeLine(self.project, self, mainview) self.Updating = False # add click / bpm / signature box self.clickbutton = gtk.ToggleButton() self.clicktip = gtk.Tooltips() clickimg = gtk.Image() clickimg.set_from_file(os.path.join(Globals.IMAGE_PATH, "icon_click.png")) self.clickbutton.set_image(clickimg)
647c80d879efcdc6e9b0fa5fe5aa2ebfe31a3865 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/10033/647c80d879efcdc6e9b0fa5fe5aa2ebfe31a3865/TimeLineBar.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1984, 16, 1984, 1945, 16, 2774, 1945, 4672, 3536, 10210, 279, 394, 791, 434, 2647, 1670, 5190, 225, 7012, 30, 1984, 1493, 2114, 358, 5420, 261, 4109, 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, 1984, 16, 1984, 1945, 16, 2774, 1945, 4672, 3536, 10210, 279, 394, 791, 434, 2647, 1670, 5190, 225, 7012, 30, 1984, 1493, 2114, 358, 5420, 261, 4109, 18, ...
def __init__(self, context, key): View.__init__(self, context) self.key = key
def __init__(self, context, key): View.__init__(self, context) self.key = key
3cd13be2add709d2150b864d90414df5d3e5307f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7127/3cd13be2add709d2150b864d90414df5d3e5307f/test_timetable.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 819, 16, 498, 4672, 4441, 16186, 2738, 972, 12, 2890, 16, 819, 13, 365, 18, 856, 273, 498, 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, 1001, 2738, 972, 12, 2890, 16, 819, 16, 498, 4672, 4441, 16186, 2738, 972, 12, 2890, 16, 819, 13, 365, 18, 856, 273, 498, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
errwrite = GetStdHandle(STD_ERROR_HANDLE)
errwrite = _subprocess.GetStdHandle(_subprocess.STD_ERROR_HANDLE)
def _get_handles(self, stdin, stdout, stderr): """Construct and return tuple with IO objects: p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite """ if stdin is None and stdout is None and stderr is None: return (None, None, None, None, None, None)
a2936cfa0989988f3e9f9ce6aec7d5657a2f73ba /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8546/a2936cfa0989988f3e9f9ce6aec7d5657a2f73ba/subprocess.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 24111, 12, 2890, 16, 8801, 16, 3909, 16, 4514, 4672, 3536, 7249, 471, 327, 3193, 598, 1665, 2184, 30, 293, 22, 71, 896, 16, 293, 22, 71, 2626, 16, 276, 22, 84, 896, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 24111, 12, 2890, 16, 8801, 16, 3909, 16, 4514, 4672, 3536, 7249, 471, 327, 3193, 598, 1665, 2184, 30, 293, 22, 71, 896, 16, 293, 22, 71, 2626, 16, 276, 22, 84, 896, 1...
register()
register()
def unregister(): clear_properties() bpy.types.VIEW3D_PT_view3d_meshdisplay.remove(menu_func)
aa427a2112b4de889547ea097a849d1b1bb0e3f1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11963/aa427a2112b4de889547ea097a849d1b1bb0e3f1/space_view3d_index_visualiser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10232, 13332, 2424, 67, 4738, 1435, 324, 2074, 18, 2352, 18, 12145, 23, 40, 67, 1856, 67, 1945, 23, 72, 67, 15557, 5417, 18, 4479, 12, 5414, 67, 644, 13, 282, 2, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10232, 13332, 2424, 67, 4738, 1435, 324, 2074, 18, 2352, 18, 12145, 23, 40, 67, 1856, 67, 1945, 23, 72, 67, 15557, 5417, 18, 4479, 12, 5414, 67, 644, 13, 282, 2, -100, -100, -100, -1...
else
else:
def __init__(data = None) if data == None: quickfix.CharField.__init__(self, 532) else quickfix.CharField.__init__(self, 532, data)
484890147d4b23aac4b9d0e85e84fceab7e137c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8819/484890147d4b23aac4b9d0e85e84fceab7e137c3/quickfix_fields.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 892, 273, 599, 13, 309, 501, 422, 599, 30, 9549, 904, 18, 2156, 974, 16186, 2738, 972, 12, 2890, 16, 1381, 1578, 13, 469, 30, 9549, 904, 18, 2156, 974, 16186, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 892, 273, 599, 13, 309, 501, 422, 599, 30, 9549, 904, 18, 2156, 974, 16186, 2738, 972, 12, 2890, 16, 1381, 1578, 13, 469, 30, 9549, 904, 18, 2156, 974, 16186, 27...
self.sound.setVolume(self.volume) self.sound.setTime(t) self.sound.setLoop(self.loop) self.sound.play()
if self.sound != None: self.sound.setVolume(self.volume) self.sound.setTime(t) self.sound.setLoop(self.loop) self.sound.play()
def privStep(self, t): if self.state == CInterval.SPaused: # Restarting from a pause. self.sound.setVolume(self.volume) self.sound.setTime(t) self.sound.setLoop(self.loop) self.sound.play() self.state = CInterval.SStarted self.currT = t
35772498f919cfb13cbf596f3c359a1af9d2b936 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7242/35772498f919cfb13cbf596f3c359a1af9d2b936/SoundInterval.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6015, 4160, 12, 2890, 16, 268, 4672, 309, 365, 18, 2019, 422, 385, 4006, 18, 3118, 69, 3668, 30, 468, 20709, 310, 628, 279, 11722, 18, 309, 365, 18, 29671, 480, 599, 30, 365, 18, 296...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6015, 4160, 12, 2890, 16, 268, 4672, 309, 365, 18, 2019, 422, 385, 4006, 18, 3118, 69, 3668, 30, 468, 20709, 310, 628, 279, 11722, 18, 309, 365, 18, 29671, 480, 599, 30, 365, 18, 296...
if len(resultDict) >= numTasks:
if len( resultDict ) >= numTasks:
def getTasksForSubmission(self,transName,numTasks=1,site='',statusList=['Created'],older=None,newer=None,connection=False): """ Select tasks with the given status (and site) for submission """ res = self._getConnectionTransID(connection,transName) if not res['OK']: return res connection = res['Value']['Connection'] transID = res['Value']['TransformationID'] condDict = {"TransformationID":transID} if statusList: condDict["ExternalStatus"] = statusList if site: numTasks=0 res = self.getTransformationTasks(condDict=condDict,older=older, newer=newer, timeStamp='CreationTime', orderAttribute=None, limit=numTasks,inputVector=True,connection=connection) if not res['OK']: return res tasks = res['Value'] # Prepare Site->SE resolution mapping selSEs = [] if site: res = getSEsForSite(site) if not res['OK']: return res selSEs = res['Value'] # Now prepare the tasks resultDict = {} for taskDict in tasks: if len(resultDict) >= numTasks: break taskDict['Status'] = taskDict.pop('ExternalStatus') taskDict['InputData'] = taskDict.pop('InputVector') taskDict.pop('LastUpdateTime') taskDict.pop('CreationTime') taskDict.pop('ExternalID') taskID = taskDict['TaskID'] se = taskDict['TargetSE'] resultDict[taskID] = taskDict if not site: if taskDict['InputData']: res = getSitesForSE(se,'LCG') if not res['OK']: continue usedSite = res['Value'] if len(usedSite) == 1: usedSite = usedSite[0] else: usedSite = 'ANY' resultDict[taskID]['Site'] = usedSite elif site and (se in selSEs): resultDict[taskID]['Site'] = usedSite else: resultDict.pop(taskID) gLogger.warn("Can not find corresponding site for se",se) return S_OK(resultDict)
9ad007ea503b29694fc081c1646b7c5ecd07b1f2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/9ad007ea503b29694fc081c1646b7c5ecd07b1f2/TransformationDB.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 6685, 1290, 17865, 12, 2890, 16, 2338, 461, 16, 2107, 6685, 33, 21, 16, 4256, 2218, 2187, 2327, 682, 33, 3292, 6119, 17337, 1498, 33, 7036, 16, 2704, 264, 33, 7036, 16, 4071, 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, 1, 1, 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, 6685, 1290, 17865, 12, 2890, 16, 2338, 461, 16, 2107, 6685, 33, 21, 16, 4256, 2218, 2187, 2327, 682, 33, 3292, 6119, 17337, 1498, 33, 7036, 16, 2704, 264, 33, 7036, 16, 4071, 33, ...
def getUserAdditionalRoles(self, name): """ Returns a list with an user additional roles. """ r = [] for x in self.getAssignedUsers(): if x['username'] == name: for y in x['roles']: wg = self.getWorkgroupByLocation(y[1]) if wg: if wg[3] != y[0]: r.append(y) else: r.append(y) return r
def getUserAllRoles(self, name): """ Returns a list with all user roles (including local in all portal). """ for x in self.getAssignedUsers(): if x['username'] == name: return x['roles'] return []
030f7d260e6e9cc0e77d3cf31eac166b19215501 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3287/030f7d260e6e9cc0e77d3cf31eac166b19215501/CHMSite.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4735, 1595, 6898, 12, 2890, 16, 508, 4672, 3536, 2860, 279, 666, 598, 777, 729, 4900, 261, 31348, 1191, 316, 777, 11899, 2934, 3536, 364, 619, 316, 365, 18, 588, 20363, 6588, 13332, 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, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4735, 1595, 6898, 12, 2890, 16, 508, 4672, 3536, 2860, 279, 666, 598, 777, 729, 4900, 261, 31348, 1191, 316, 777, 11899, 2934, 3536, 364, 619, 316, 365, 18, 588, 20363, 6588, 13332, 309,...
task.get_text(),
str(task.get_text()),
def __init__(self, title, text, subtasks, status ): self.title = title self.text = text self.subtasks = subtasks self.status = status
f467ae04ecf7905cdcd19f03b5d19579867fa723 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8234/f467ae04ecf7905cdcd19f03b5d19579867fa723/browser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2077, 16, 977, 16, 720, 9416, 16, 1267, 262, 30, 365, 18, 2649, 565, 273, 2077, 365, 18, 955, 377, 273, 977, 365, 18, 1717, 9416, 273, 720, 9416, 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, 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, 2077, 16, 977, 16, 720, 9416, 16, 1267, 262, 30, 365, 18, 2649, 565, 273, 2077, 365, 18, 955, 377, 273, 977, 365, 18, 1717, 9416, 273, 720, 9416, 365, ...
queue = [(self, destination)] queueSem = threading.Semaphore() threads = [] for i in xrange(numThreads): thread = DownloaderThread(queue, queueSem) threads.append(thread) thread.start() for thread in threads: thread.join()
DownloaderPool([(self, destination)], numThreads)
def download(self, destination, numThreads=5):
8b8cb24e56a503e1911722dbae68cb7469a4a3a5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/454/8b8cb24e56a503e1911722dbae68cb7469a4a3a5/MiniSVN.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4224, 12, 2890, 16, 2929, 16, 818, 13233, 33, 25, 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, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4224, 12, 2890, 16, 2929, 16, 818, 13233, 33, 25, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
PREFIX := $(CURDIR)/debian/tmp/usr/local
PREFIX := $(CURDIR)/debian/tmp/usr
def buildPackage(project, version, installTop): '''Writes out the necessary files such as specification, control, etc. then builds a binary distribution package based on the local system. This routine with returns the name of the package that was built. ''' dist = context.host() name = context.cwdProject() if dist == 'Darwin': pm = PackageMaker(project, version, installTop) pm.build() im = ImageMaker(project, version, pm.packageRootFolder) return im.build() elif dist == 'Fedora': specname = project.name + '.spec' specfile = open(specname,'w') specfile.write('Name: ' + p.name.replace(os.sep,'_') + '\n') specfile.write('Distribution: Fedora\n') specfile.write('Release: 0\n') specfile.write('Summary: None\n') specfile.write('License: Unknown\n') specfile.write('\n%description\n' + p.descr + '\n') specfile.write('Packager: ' + p.maintainer.fullname \ + ' <' + p.maintainer.email + '>\n') specfile.write('''\n%build
f8a9169a4d2f50920cf9b456587e7430e95b584e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1360/f8a9169a4d2f50920cf9b456587e7430e95b584e/buildpkg.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 2261, 12, 4406, 16, 1177, 16, 3799, 3401, 4672, 9163, 8368, 596, 326, 4573, 1390, 4123, 487, 7490, 16, 3325, 16, 5527, 18, 1508, 10736, 279, 3112, 7006, 2181, 2511, 603, 326, 1191,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 2261, 12, 4406, 16, 1177, 16, 3799, 3401, 4672, 9163, 8368, 596, 326, 4573, 1390, 4123, 487, 7490, 16, 3325, 16, 5527, 18, 1508, 10736, 279, 3112, 7006, 2181, 2511, 603, 326, 1191,...
print repr(J) print repr(P)
def test_iter(): J = judy.JudyIntObjectMap() P = { } random.seed(0) k = [random.randint(0, 10000) for i in xrange(10)] v = ['a', ['a'], [{},{'a':'b'}], 'k', u'arni', 1.00001, 7, 2, 1, 10] for K, V in zip(k, v): J[K] = V P[K] = V A = list(J) B = sorted(list(P)) assert(A == B) A = list(J.iterkeys()) B = sorted(list(P.iterkeys())) assert(A == B) A = sorted(J.itervalues()) B = sorted(P.itervalues()) assert(A == B) print sorted(zip(k, v)) A = list(J.iteritems()) B = sorted(P.iteritems()) print 'A', A print 'B', B assert(A == B)
def test_print(): J = judy.JudyIntObjectMap() P = { } random.seed(0) k = [random.randint(0, 10000) for i in xrange(10)] v = ['a', ['a'], [{},{'a':'b'}], 'k', u'arni', 1.00001, 7, 2, 1, 10] for K, V in zip(k, v): J[K] = V P[K] = V for i in xrange(10000000): buffer = cStringIO.StringIO() print >> buffer, repr(J) print >> buffer, repr(P) print repr(J) print repr(P)
78574ec1d2170ae35756e018780c1fcfa3d72bc4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7037/78574ec1d2170ae35756e018780c1fcfa3d72bc4/test.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 1188, 13332, 804, 273, 525, 1100, 93, 18, 46, 1100, 93, 1702, 921, 863, 1435, 453, 273, 288, 289, 225, 2744, 18, 12407, 12, 20, 13, 417, 273, 306, 9188, 18, 7884, 474, 12, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 1188, 13332, 804, 273, 525, 1100, 93, 18, 46, 1100, 93, 1702, 921, 863, 1435, 453, 273, 288, 289, 225, 2744, 18, 12407, 12, 20, 13, 417, 273, 306, 9188, 18, 7884, 474, 12, ...
return if 'OVERRIDES' not in dir(config): del config.OVERRIDES
elif 'OVERRIDES' in dir(config): del config.OVERRIDES
def getPLCDefaults(data, config): ''' Get PLC wide defaults from _default system slice. Adds them to config class. ''' for slice in data.get('slivers'): if slice['name'] == config.PLC_SLICE_PREFIX+"_default": attr_dict = {} for attr in slice.get('attributes'): attr_dict[attr['tagname']] = attr['value'] if len(attr_dict): logger.verbose("Found default slice overrides.\n %s" % attr_dict) config.OVERRIDES = attr_dict return if 'OVERRIDES' not in dir(config): del config.OVERRIDES
72136191e3387c336b998e2b81442dbcca9275cf /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6995/72136191e3387c336b998e2b81442dbcca9275cf/nm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1689, 13394, 7019, 12, 892, 16, 642, 4672, 9163, 968, 453, 13394, 14812, 3467, 628, 389, 1886, 2619, 2788, 18, 225, 15605, 2182, 358, 642, 667, 18, 9163, 364, 2788, 316, 501, 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, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1689, 13394, 7019, 12, 892, 16, 642, 4672, 9163, 968, 453, 13394, 14812, 3467, 628, 389, 1886, 2619, 2788, 18, 225, 15605, 2182, 358, 642, 667, 18, 9163, 364, 2788, 316, 501, 18, 588, ...
for job in task.jobs : if job.runningJob['scheduler'] is not None: scheduler = job.runningJob['scheduler'] break if scheduler is not None : self.schedConfig['name'] = scheduler
if not self.schedConfig.has_key('name') : for job in task.jobs : if job.runningJob['scheduler'] is not None: self.schedConfig['name'] = job.runningJob['scheduler']
def __init__(self, bossLiteSession, schedulerConfig, task=None): """ initialize the scheduler API instance
13d0a57e03b91e8038495daf978f700957ed1989 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8886/13d0a57e03b91e8038495daf978f700957ed1989/BossLiteAPISched.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 324, 8464, 20291, 2157, 16, 8129, 809, 16, 1562, 33, 7036, 4672, 3536, 4046, 326, 8129, 1491, 791, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 324, 8464, 20291, 2157, 16, 8129, 809, 16, 1562, 33, 7036, 4672, 3536, 4046, 326, 8129, 1491, 791, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
remote_source = self._encode_remote_paths(remote_source)
remote_source = self._encode_remote_paths(remote_source, escape=False)
def get_file(self, source, dest, delete_dest=False, preserve_perm=True, preserve_symlinks=False): """ Copy files from the remote host to a local path.
3224c2001b763d14722a89ae85fc6ae9c44bcae5 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12268/3224c2001b763d14722a89ae85fc6ae9c44bcae5/abstract_ssh.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 768, 12, 2890, 16, 1084, 16, 1570, 16, 1430, 67, 10488, 33, 8381, 16, 9420, 67, 12160, 33, 5510, 16, 9420, 67, 21278, 87, 33, 8381, 4672, 3536, 5631, 1390, 628, 326, 2632, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 336, 67, 768, 12, 2890, 16, 1084, 16, 1570, 16, 1430, 67, 10488, 33, 8381, 16, 9420, 67, 12160, 33, 5510, 16, 9420, 67, 21278, 87, 33, 8381, 4672, 3536, 5631, 1390, 628, 326, 2632, 1...
f = os.popen("%s -f -xml" % (self.qstat))
f = os.popen("%s -f -u \* -xml" % (self.qstat))
def findjobs(self): "Collect info in all jobs in queue."
f8a363b0438faf8356f432ca5c92780841bc0ab3 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9736/f8a363b0438faf8356f432ca5c92780841bc0ab3/sge.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 10088, 12, 2890, 4672, 315, 10808, 1123, 316, 777, 6550, 316, 2389, 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, ...
[ 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, 1104, 10088, 12, 2890, 4672, 315, 10808, 1123, 316, 777, 6550, 316, 2389, 1199, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
return "'%s'" % s.replace("'", "'\\''")
if os.sys.platform == 'OpenVMS': return '"%s"' % s else: return "'%s'" % s.replace("'", "'\\''")
def shellquote(s): return "'%s'" % s.replace("'", "'\\''")
1b9b4c8c4ab3ad9e7708755a6769376d0a104d56 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11312/1b9b4c8c4ab3ad9e7708755a6769376d0a104d56/util.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5972, 6889, 12, 87, 4672, 327, 22288, 87, 4970, 738, 272, 18, 2079, 29823, 3113, 2491, 10471, 4970, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 5972, 6889, 12, 87, 4672, 327, 22288, 87, 4970, 738, 272, 18, 2079, 29823, 3113, 2491, 10471, 4970, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
key = user, passwd, host, port
key = user, host, port, '/'.join(dirs)
def connect_ftp(self, user, passwd, host, port, dirs): key = user, passwd, host, port if key in self.cache: self.timeout[key] = time.time() + self.delay else: self.cache[key] = ftpwrapper(user, passwd, host, port, dirs) self.timeout[key] = time.time() + self.delay self.check_cache() return self.cache[key]
115c90b3e2e4f0458f58409d3c250b8bf842c84b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/115c90b3e2e4f0458f58409d3c250b8bf842c84b/urllib2.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3077, 67, 11727, 12, 2890, 16, 729, 16, 19093, 16, 1479, 16, 1756, 16, 7717, 4672, 498, 273, 729, 16, 1479, 16, 1756, 16, 2023, 18, 5701, 12, 8291, 13, 309, 498, 316, 365, 18, 2493, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3077, 67, 11727, 12, 2890, 16, 729, 16, 19093, 16, 1479, 16, 1756, 16, 7717, 4672, 498, 273, 729, 16, 1479, 16, 1756, 16, 2023, 18, 5701, 12, 8291, 13, 309, 498, 316, 365, 18, 2493, ...
while self.producer_fifo or self.ac_out_buffer:
while (self.producer_fifo or self.ac_out_buffer) and not self._closed:
def flush(self): """Flush everything in the output buffer.""" while self.producer_fifo or self.ac_out_buffer: self.initiate_send()
06eaca2904e635a9ca113cd82d4b9a6d551d128d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6126/06eaca2904e635a9ca113cd82d4b9a6d551d128d/Dibbler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3663, 12, 2890, 4672, 3536, 8207, 7756, 316, 326, 876, 1613, 12123, 377, 1323, 261, 2890, 18, 11776, 2750, 67, 74, 20299, 578, 365, 18, 1077, 67, 659, 67, 4106, 13, 471, 486, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3663, 12, 2890, 4672, 3536, 8207, 7756, 316, 326, 876, 1613, 12123, 377, 1323, 261, 2890, 18, 11776, 2750, 67, 74, 20299, 578, 365, 18, 1077, 67, 659, 67, 4106, 13, 471, 486, 365, 6315...
import atexit atexit.register(self.__exitfunc)
def __init__(self): Thread.__init__(self, name="MainThread") self._Thread__started = True _active_limbo_lock.acquire() _active[_get_ident()] = self _active_limbo_lock.release() import atexit atexit.register(self.__exitfunc)
c10bb0a47cfcb0ac9fc4e001e0ec3cebe0cbb32e /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8125/c10bb0a47cfcb0ac9fc4e001e0ec3cebe0cbb32e/threading.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 4884, 16186, 2738, 972, 12, 2890, 16, 508, 1546, 6376, 3830, 7923, 365, 6315, 3830, 972, 14561, 273, 1053, 389, 3535, 67, 7091, 1075, 67, 739, 18, 1077, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4672, 4884, 16186, 2738, 972, 12, 2890, 16, 508, 1546, 6376, 3830, 7923, 365, 6315, 3830, 972, 14561, 273, 1053, 389, 3535, 67, 7091, 1075, 67, 739, 18, 1077, ...
["svn_delta.i"], libraries=['svn_fs', 'svn_swig_py', 'swigpy'],
["../svn_delta.i"], libraries=['svn_delta', 'svn_swig_py', 'swigpy'],
def swig_sources(self, sources): swig = self.find_swig() swig_cmd = [swig, "-c", "-python"] for dir in self.include_dirs: swig_cmd.append("-I" + dir)
b818e4b2ca6de863c52c5cbadd50b467e2b8cdce /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6036/b818e4b2ca6de863c52c5cbadd50b467e2b8cdce/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1352, 360, 67, 10141, 12, 2890, 16, 5550, 4672, 1352, 360, 273, 365, 18, 4720, 67, 5328, 360, 1435, 1352, 360, 67, 4172, 273, 306, 5328, 360, 16, 3701, 71, 3113, 3701, 8103, 11929, 364...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1352, 360, 67, 10141, 12, 2890, 16, 5550, 4672, 1352, 360, 273, 365, 18, 4720, 67, 5328, 360, 1435, 1352, 360, 67, 4172, 273, 306, 5328, 360, 16, 3701, 71, 3113, 3701, 8103, 11929, 364...
cachefile = os.path.join(cachedir, '.'.join([s for s in cachefile if s]))
cachefile = os.path.join(cachedir, '.'.join([s for s in cachefile if s]))
def scache(s): "return a shared version of a string" return _scache.setdefault(s, s)
4a8d8af9a778314e085474978405a659540b0c1c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11312/4a8d8af9a778314e085474978405a659540b0c1c/cvsps.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 888, 807, 12, 87, 4672, 315, 2463, 279, 5116, 1177, 434, 279, 533, 6, 327, 389, 1017, 807, 18, 542, 1886, 12, 87, 16, 272, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 888, 807, 12, 87, 4672, 315, 2463, 279, 5116, 1177, 434, 279, 533, 6, 327, 389, 1017, 807, 18, 542, 1886, 12, 87, 16, 272, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100...
" foo -> bar -> baz [color = red]\n" " hoge -> fuga [dir = none]\n" "}\n") tree = parse(tokenize(str)) nodelist, edgelist = ScreenNodeBuilder.build(tree) assert_pos = {'foo': (0, 0), 'bar': (1, 0), 'baz': (2, 0), 'hoge': (0, 1), 'fuga': (1, 1)}
" A -> B -> C [color = red]\n" " D -> E [dir = none]\n" "}\n") tree = parse(tokenize(str)) nodelist, edgelist = ScreenNodeBuilder.build(tree) assert_pos = {'A': (0, 0), 'B': (1, 0), 'C': (2, 0), 'D': (0, 1), 'E': (1, 1)}
def test_edge_attribute(): # empty diagram str = ("diagram {\n" " foo -> bar -> baz [color = red]\n" " hoge -> fuga [dir = none]\n" "}\n") tree = parse(tokenize(str)) nodelist, edgelist = ScreenNodeBuilder.build(tree) assert_pos = {'foo': (0, 0), 'bar': (1, 0), 'baz': (2, 0), 'hoge': (0, 1), 'fuga': (1, 1)} for node in nodelist: assert node.xy == assert_pos[node.id] for edge in edgelist: if edge.node1.id == 'hoge': assert edge.dir == 'none' assert edge.color == None else: assert edge.dir == 'forward' assert edge.color == 'red'
37d15913646c539dab125b1c383ced5555d40089 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/81/37d15913646c539dab125b1c383ced5555d40089/test_parser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 7126, 67, 4589, 13332, 468, 1008, 19750, 609, 273, 7566, 12264, 1940, 18890, 82, 6, 315, 225, 432, 317, 605, 317, 385, 306, 3266, 273, 1755, 13944, 82, 6, 315, 225, 463, 317,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 7126, 67, 4589, 13332, 468, 1008, 19750, 609, 273, 7566, 12264, 1940, 18890, 82, 6, 315, 225, 432, 317, 605, 317, 385, 306, 3266, 273, 1755, 13944, 82, 6, 315, 225, 463, 317,...
if not flavorList or self.exactFlavors:
self.acrossLabelsPerTrove[name] = True if not flavorItems or self.exactFlavors:
def addQuery(self, troveTup, labelPath, flavorList): name = troveTup[0] self.map[name] = [troveTup, labelPath] self.exactFlavorMap[name] = flavorList
a7b181180c87f3f2da48cfc25d9da64b76052710 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8747/a7b181180c87f3f2da48cfc25d9da64b76052710/findtrove.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24087, 12, 2890, 16, 23432, 537, 56, 416, 16, 1433, 743, 16, 19496, 682, 4672, 508, 273, 23432, 537, 56, 416, 63, 20, 65, 365, 18, 1458, 63, 529, 65, 273, 306, 88, 303, 537, 56, 41...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 24087, 12, 2890, 16, 23432, 537, 56, 416, 16, 1433, 743, 16, 19496, 682, 4672, 508, 273, 23432, 537, 56, 416, 63, 20, 65, 365, 18, 1458, 63, 529, 65, 273, 306, 88, 303, 537, 56, 41...
if proxyDict[ 'tempFile' ]: self._unlinkFiles( proxyLocation )
File.deleteMultiProxy( proxyDict )
def getDelegatedProxy( self, proxyChain, lifeTime = 604800, useDNAsUserName = False ): """ Get delegated proxy from MyProxy server return S_OK( X509Chain ) / S_ERROR """ #TODO: Set the proxy coming in proxyString to be the proxy to use
df15ed11edbd52df1976835531c973853f23587e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12864/df15ed11edbd52df1976835531c973853f23587e/MyProxy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2343, 13451, 690, 3886, 12, 365, 16, 2889, 3893, 16, 17140, 950, 273, 1666, 3028, 17374, 16, 999, 8609, 1463, 15296, 273, 1083, 262, 30, 3536, 968, 30055, 2889, 628, 8005, 3886, 1438, 32...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2343, 13451, 690, 3886, 12, 365, 16, 2889, 3893, 16, 17140, 950, 273, 1666, 3028, 17374, 16, 999, 8609, 1463, 15296, 273, 1083, 262, 30, 3536, 968, 30055, 2889, 628, 8005, 3886, 1438, 32...
print(' done ' + str(t[-1] - t[-2]))
def compute_dynamic_mfile(self,max_order=2):
514a4eb4923886a55a87265469efdacb7da9d613 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10534/514a4eb4923886a55a87265469efdacb7da9d613/compiler_dynare.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3671, 67, 14507, 67, 81, 768, 12, 2890, 16, 1896, 67, 1019, 33, 22, 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, ...
[ 1, 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, 3671, 67, 14507, 67, 81, 768, 12, 2890, 16, 1896, 67, 1019, 33, 22, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
self.ExpandNode(rootnode) if isinstance(self.toplevel[0], SimpleNode): self.ExpandNode(self.toplevel[0])
self._InitialExpand(rootnode)
def InitializeTree(self): self.DeleteAllItems() if len(self.toplevel) == 1: rootitem = self.AddRoot(self.toplevel[0].label) rootnode = self.toplevel[0] else: rootitem = self.AddRoot("") rootnode = SimpleNode("", self.toplevel) self.SetItemNode(rootitem, rootnode) self.ExpandNode(rootnode) if isinstance(self.toplevel[0], SimpleNode): self.ExpandNode(self.toplevel[0])
9699d6b26710ed3d156458c833cee77186e63aeb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11441/9699d6b26710ed3d156458c833cee77186e63aeb/dirtree.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9190, 2471, 12, 2890, 4672, 365, 18, 2613, 1595, 3126, 1435, 309, 562, 12, 2890, 18, 3669, 2815, 13, 422, 404, 30, 1365, 1726, 273, 365, 18, 986, 2375, 12, 2890, 18, 3669, 2815, 63, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9190, 2471, 12, 2890, 4672, 365, 18, 2613, 1595, 3126, 1435, 309, 562, 12, 2890, 18, 3669, 2815, 13, 422, 404, 30, 1365, 1726, 273, 365, 18, 986, 2375, 12, 2890, 18, 3669, 2815, 63, ...
start_time = timer()
def __profile(*args, **kw): start_time = timer() profiler = hpy() profiler.setref() start = profiler.heap().size + 12 try: return function(*args, **kw) finally: total = timer() - start_time kstones = secs_to_kstones(total) memory = profiler.heap().size - start stats[name] = {'time': total, 'stones': kstones, 'memory': profiler.heap().size}
ab959dbd28aa3c850d128dd879ef2a7758916747 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8505/ab959dbd28aa3c850d128dd879ef2a7758916747/profiler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 5040, 30857, 1968, 16, 2826, 9987, 4672, 16583, 273, 366, 2074, 1435, 16583, 18, 542, 1734, 1435, 787, 273, 16583, 18, 25506, 7675, 1467, 397, 2593, 775, 30, 327, 445, 30857, 1968, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 5040, 30857, 1968, 16, 2826, 9987, 4672, 16583, 273, 366, 2074, 1435, 16583, 18, 542, 1734, 1435, 787, 273, 16583, 18, 25506, 7675, 1467, 397, 2593, 775, 30, 327, 445, 30857, 1968, ...
typ, val, tb = sys.exc_info()
typ, val, tb = excinfo = sys.exc_info() sys.last_type, sys.last_value, sys.last_traceback = excinfo
def print_exception(): flush_stdout() efile = sys.stderr typ, val, tb = sys.exc_info() tbe = traceback.extract_tb(tb) print >>efile, '\nTraceback (most recent call last):' exclude = ("run.py", "rpc.py", "threading.py", "Queue.py", "RemoteDebugger.py", "bdb.py") cleanup_traceback(tbe, exclude) traceback.print_list(tbe, file=efile) lines = traceback.format_exception_only(typ, val) for line in lines: print>>efile, line,
924f6164215f59e04fa8aa62ed62ce8a50991267 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/924f6164215f59e04fa8aa62ed62ce8a50991267/run.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1172, 67, 4064, 13332, 3663, 67, 10283, 1435, 425, 768, 273, 2589, 18, 11241, 3815, 16, 1244, 16, 8739, 273, 3533, 1376, 273, 2589, 18, 10075, 67, 1376, 1435, 2589, 18, 2722, 67, 723, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1172, 67, 4064, 13332, 3663, 67, 10283, 1435, 425, 768, 273, 2589, 18, 11241, 3815, 16, 1244, 16, 8739, 273, 3533, 1376, 273, 2589, 18, 10075, 67, 1376, 1435, 2589, 18, 2722, 67, 723, ...
return HttpResponseRedirect(url)
return HttpResponseRedirect(url)
def change_active_group(request, **kwargs): try: conn = kwargs["conn"] except: logger.error(traceback.format_exc()) return handlerInternalError("Connection is not available. Please contact your administrator.") url = None try: url = kwargs["url"] except: logger.error(traceback.format_exc()) active_group = request.REQUEST['active_group'] if conn.changeActiveGroup(active_group): request.session.modified = True try: del request.session['imageInBasket'] request.session['nav']["basket"] = 0 except KeyError: logger.error(traceback.format_exc()) return HttpResponseRedirect(url) else: error = 'You cannot change your group becuase the data is currently processing. You can force it by logging out and logging in again.' url = reverse("webindex")+ ("?error=%s" % error) if request.session.get('nav')['experimenter'] is not None: url += "&experimenter=%s" % request.session.get('nav')['experimenter'] return HttpResponseRedirect(url)
6c2f59e4d45ed6e823d3420ab707f6b63e429c38 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12409/6c2f59e4d45ed6e823d3420ab707f6b63e429c38/views.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2549, 67, 3535, 67, 1655, 12, 2293, 16, 2826, 4333, 4672, 775, 30, 1487, 273, 1205, 9614, 4646, 11929, 1335, 30, 1194, 18, 1636, 12, 21696, 18, 2139, 67, 10075, 10756, 327, 1838, 20980, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2549, 67, 3535, 67, 1655, 12, 2293, 16, 2826, 4333, 4672, 775, 30, 1487, 273, 1205, 9614, 4646, 11929, 1335, 30, 1194, 18, 1636, 12, 21696, 18, 2139, 67, 10075, 10756, 327, 1838, 20980, ...
contents = [self.formattree( inspect.getclasstree(classlist, 1), name, cdict)]
contents = [ self.formattree(inspect.getclasstree(classlist, 1), name)]
def docmodule(self, object, name=None, mod=None): """Produce HTML documentation for a module object.""" name = object.__name__ # ignore the passed-in name parts = split(name, '.') links = [] for i in range(len(parts)-1): links.append( '<a href="%s.html"><font color="#ffffff">%s</font></a>' % (join(parts[:i+1], '.'), parts[i])) linkedname = join(links + parts[-1:], '.') head = '<big><big><strong>%s</strong></big></big>' % linkedname try: path = inspect.getabsfile(object) filelink = '<a href="file:%s">%s</a>' % (path, path) except TypeError: filelink = '(built-in)' info = [] if hasattr(object, '__version__'): version = str(object.__version__) if version[:11] == '$' + 'Revision: ' and version[-1:] == '$': version = strip(version[11:-1]) info.append('version %s' % self.escape(version)) if hasattr(object, '__date__'): info.append(self.escape(str(object.__date__))) if info: head = head + ' (%s)' % join(info, ', ') result = self.heading( head, '#ffffff', '#7799ee', '<a href=".">index</a><br>' + filelink)
829253c953a1561afa1fc68f3f1f063bd3197494 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/829253c953a1561afa1fc68f3f1f063bd3197494/pydoc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 997, 2978, 12, 2890, 16, 733, 16, 508, 33, 7036, 16, 681, 33, 7036, 4672, 3536, 25884, 3982, 7323, 364, 279, 1605, 733, 12123, 508, 273, 733, 16186, 529, 972, 468, 2305, 326, 2275, 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, 997, 2978, 12, 2890, 16, 733, 16, 508, 33, 7036, 16, 681, 33, 7036, 4672, 3536, 25884, 3982, 7323, 364, 279, 1605, 733, 12123, 508, 273, 733, 16186, 529, 972, 468, 2305, 326, 2275, 17,...
@unittest2.expectedFailure
def test_data_type_and_expr_with_dsym(self): """Lookup objective-c data types and evaluate expressions.""" self.buildDsym() self.data_type_and_expr_objc()
8f7f9e03d7238e4d458588efbba63de7c9c2a9a1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11986/8f7f9e03d7238e4d458588efbba63de7c9c2a9a1/TestObjCMethods.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 892, 67, 723, 67, 464, 67, 8638, 67, 1918, 67, 2377, 2942, 12, 2890, 4672, 3536, 6609, 13072, 17, 71, 501, 1953, 471, 5956, 8041, 12123, 365, 18, 3510, 40, 8117, 1435, 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, 1842, 67, 892, 67, 723, 67, 464, 67, 8638, 67, 1918, 67, 2377, 2942, 12, 2890, 4672, 3536, 6609, 13072, 17, 71, 501, 1953, 471, 5956, 8041, 12123, 365, 18, 3510, 40, 8117, 1435, 365, ...
def init_twee (self, source): "initializes a Tiddler from Twee source code"
def initTwee (self, source): """Initializes a Tiddler from Twee source code."""
def __cmp__ (self, other): "compares a Tiddler to another" return self.text == other.text
6c1969959d8e0961fa5075dac2f76e60b7f2c5fe /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11433/6c1969959d8e0961fa5075dac2f76e60b7f2c5fe/tiddlywiki.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 9625, 972, 261, 2890, 16, 1308, 4672, 315, 2919, 4807, 279, 399, 1873, 749, 358, 4042, 6, 327, 365, 18, 955, 422, 1308, 18, 955, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 9625, 972, 261, 2890, 16, 1308, 4672, 315, 2919, 4807, 279, 399, 1873, 749, 358, 4042, 6, 327, 365, 18, 955, 422, 1308, 18, 955, 225, 2, -100, -100, -100, -100, -100, -100, -100,...
key = '"%s"' % key
key = __string(node[0])
def __property_init(node): key = compress(node[0]) value = compress(node[1]) if type(key) in [int,float]: pass # Protect keywords and special characters elif key in keywords or not __simpleProperty.match(key): key = '"%s"' % key return "%s:%s" % (key, value)
5ec17a00289ddf7ff08e9a6893012ffa7b9d4497 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12949/5ec17a00289ddf7ff08e9a6893012ffa7b9d4497/Compressor.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 4468, 67, 2738, 12, 2159, 4672, 498, 273, 8099, 12, 2159, 63, 20, 5717, 460, 273, 8099, 12, 2159, 63, 21, 5717, 225, 309, 618, 12, 856, 13, 316, 306, 474, 16, 5659, 14542, 1342...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4468, 67, 2738, 12, 2159, 4672, 498, 273, 8099, 12, 2159, 63, 20, 5717, 460, 273, 8099, 12, 2159, 63, 21, 5717, 225, 309, 618, 12, 856, 13, 316, 306, 474, 16, 5659, 14542, 1342...
node.parent = self
self.setup_child(node)
def __setitem__(self, key, item): if isinstance(key, UnicodeType) or isinstance(key, StringType): self.attributes[str(key)] = item elif isinstance(key, IntType): item.parent = self self.children[key] = item elif isinstance(key, SliceType): assert key.step is None, 'cannot handle slice with stride' for node in item: node.parent = self self.children[key.start:key.stop] = item else: raise TypeError, ('element index must be an integer, a slice, or ' 'an attribute name string')
15f0677b9e2a7853acb68d231866daa3c3d2a8f4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5620/15f0677b9e2a7853acb68d231866daa3c3d2a8f4/nodes.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 542, 1726, 972, 12, 2890, 16, 498, 16, 761, 4672, 309, 1549, 12, 856, 16, 9633, 559, 13, 578, 1549, 12, 856, 16, 31570, 4672, 365, 18, 4350, 63, 701, 12, 856, 25887, 273, 761, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 542, 1726, 972, 12, 2890, 16, 498, 16, 761, 4672, 309, 1549, 12, 856, 16, 9633, 559, 13, 578, 1549, 12, 856, 16, 31570, 4672, 365, 18, 4350, 63, 701, 12, 856, 25887, 273, 761, ...
r2 = re.compile('.*"t"\:\s+"([^"]+)".*').search(page) if not r2: r2 = re.compile('.*&t=([^&]+)').search(page) if r2: d = {'video_id': vid, 't': r2.group(1), 'fmt': fmt_id} next = 'http://www.youtube.com/get_video?video_id=%(video_id)s&t=%(t)s&eurl=&el=&ps=&asv=&fmt=%(fmt)s' % d log('YouTube link resolved: %s => %s', url, next) return next
url = fmt_id_url_map.get(fmt_id, None) if url is None: url = default_url
def get_real_download_url(url, preferred_fmt_id=18): vid = get_youtube_id(url) if vid is not None: page = None url = 'http://www.youtube.com/watch?v=' + vid while page is None: req = util.http_request(url, method='GET') if 'location' in req.msg: url = req.msg['location'] else: page = req.read() # Try to find the best video format available for this video # (http://forum.videohelp.com/topic336882-1800.html#1912972) r3 = re.compile('.*"fmt_map"\:\s+"([^"]+)".*').search(page) if not r3: r3 = re.compile('&fmt_map=([^&]+).*').search(page) if r3: formats_available = urllib.unquote(r3.group(1)).replace('\\/', '/').split(',') else: formats_available = [] if gpodder.ui.diablo: # Hardcode fmt_id 5 for Maemo (for performance reasons) - we could # also use 13 and 17 here, but the quality is very low then. There # seems to also be a 6, but I could not find a video with that yet. fmt_id = 5 elif gpodder.ui.fremantle: # This provides good quality video, seems to be always available # and is playable fluently in Media Player if preferred_fmt_id == 5: fmt_id = 5 else: fmt_id = 18 else: # As a fallback, use fmt_id 18 (seems to be always available) fmt_id = 18 # This will be set to True if the search below has already "seen" # our preferred format, but has not yet found a suitable available # format for the given video. seen_preferred = False for id, wanted, description in supported_formats: # If we see our preferred format, accept formats below if id == preferred_fmt_id: seen_preferred = True # If the format is available and preferred (or lower), # use the given format for our fmt_id if wanted in formats_available and seen_preferred: log('Found available YouTube format: %s (fmt_id=%d)', \ description, id) fmt_id = id break r2 = re.compile('.*"t"\:\s+"([^"]+)".*').search(page) if not r2: r2 = re.compile('.*&t=([^&]+)').search(page) if r2: d = {'video_id': vid, 't': r2.group(1), 'fmt': fmt_id} next = 'http://www.youtube.com/get_video?video_id=%(video_id)s&t=%(t)s&eurl=&el=&ps=&asv=&fmt=%(fmt)s' % d log('YouTube link resolved: %s => %s', url, next) return next return url
7e50609f8949ee88100a09773a91684b35f3195f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12778/7e50609f8949ee88100a09773a91684b35f3195f/youtube.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 7688, 67, 7813, 67, 718, 12, 718, 16, 9119, 67, 8666, 67, 350, 33, 2643, 4672, 18339, 273, 336, 67, 31749, 67, 350, 12, 718, 13, 309, 18339, 353, 486, 599, 30, 1363, 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, 336, 67, 7688, 67, 7813, 67, 718, 12, 718, 16, 9119, 67, 8666, 67, 350, 33, 2643, 4672, 18339, 273, 336, 67, 31749, 67, 350, 12, 718, 13, 309, 18339, 353, 486, 599, 30, 1363, 273, ...
os.chdir("/home/vmiklos/git/current")
os.chdir("/home/ftp/pub/frugalware/frugalware-current/.git")
def callback(patch, merge, ref): global config if merge: repo = os.getcwd().split('/')[-2] try: repo.split('-')[1] except IndexError: # this is some not frugalware-foo repo, just skip it return if ref != "refs/heads/master": return repo = os.getcwd().split("/")[-1] if repo == ".git": repo = os.getcwd().split("/")[-2] if repo not in config.repos: return server = xmlrpclib.Server(config.server_url) author = readfrompipe('git show --pretty=format:"%an <%ae>" ' + patch).split("\n")[0] for i in readfrompipe("git diff-tree -r --name-only " + patch).split("\n")[1:]: if re.match("^source/[^/]+/[^/]+/FrugalBuild$", i): for j in tobuild(i): repo = repo.replace("frugalware-", "") # hardwiring this is ugly repo = repo.replace(os.readlink("/pub/frugalware/frugalware-stable").split('-')[1], "stable") server.request_build(config.server_user, config.server_pass, "git://%s/%s/%s" % (repo, j, unaccent(author)))
e94d9df22d394a7bb7df856d936b90ff8077831a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11989/e94d9df22d394a7bb7df856d936b90ff8077831a/synchook.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1348, 12, 2272, 16, 2691, 16, 1278, 4672, 2552, 642, 225, 309, 2691, 30, 3538, 273, 1140, 18, 588, 11089, 7675, 4939, 2668, 2473, 13, 18919, 22, 65, 775, 30, 3538, 18, 4939, 2668, 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, 1348, 12, 2272, 16, 2691, 16, 1278, 4672, 2552, 642, 225, 309, 2691, 30, 3538, 273, 1140, 18, 588, 11089, 7675, 4939, 2668, 2473, 13, 18919, 22, 65, 775, 30, 3538, 18, 4939, 2668, 17, ...
return bkk.browse(gui)
return addProxy(bkk.browse(gui))
def browseBK(gui=True): """
d3c64e66523ae3fa8c555f7718b369d43ab8654d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1488/d3c64e66523ae3fa8c555f7718b369d43ab8654d/BOOT.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 21670, 38, 47, 12, 20292, 33, 5510, 4672, 3536, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 21670, 38, 47, 12, 20292, 33, 5510, 4672, 3536, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
self.file.query_info_async(callback, "standard")
self.file.query_info_async("standard", callback)
def callback(file, result): try: info = file.query_info_finish(result) self.failUnless(isinstance(info, gio.FileInfo)) self.failUnless(info.get_name(), "file.txt") finally: loop.quit()
38f3debf5568e8078dc41e2f6979c0dce6a19075 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8659/38f3debf5568e8078dc41e2f6979c0dce6a19075/test_gio.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1348, 12, 768, 16, 563, 4672, 775, 30, 1123, 273, 585, 18, 2271, 67, 1376, 67, 13749, 12, 2088, 13, 365, 18, 6870, 984, 2656, 12, 291, 1336, 12, 1376, 16, 314, 1594, 18, 11995, 3719,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1348, 12, 768, 16, 563, 4672, 775, 30, 1123, 273, 585, 18, 2271, 67, 1376, 67, 13749, 12, 2088, 13, 365, 18, 6870, 984, 2656, 12, 291, 1336, 12, 1376, 16, 314, 1594, 18, 11995, 3719,...
check if it's already installed (neither uninstallable nor uninstalled)
check if it's already installed (either 'to install', 'to upgrade' or 'installed')
def _already_installed(self, cr, uid, context=None): """ For each module (boolean fields in a res.config.installer), check if it's already installed (neither uninstallable nor uninstalled) and if it is, check it by default """ modules = self.pool.get('ir.module.module')
26ed95e7729fc93370ca8d9b34e4ed41797f482e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/26ed95e7729fc93370ca8d9b34e4ed41797f482e/res_config.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 17583, 67, 13435, 12, 2890, 16, 4422, 16, 4555, 16, 819, 33, 7036, 4672, 3536, 2457, 1517, 1605, 261, 6494, 1466, 316, 279, 400, 18, 1425, 18, 20163, 3631, 866, 309, 518, 1807, 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, 17583, 67, 13435, 12, 2890, 16, 4422, 16, 4555, 16, 819, 33, 7036, 4672, 3536, 2457, 1517, 1605, 261, 6494, 1466, 316, 279, 400, 18, 1425, 18, 20163, 3631, 866, 309, 518, 1807, 18...