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
if self.backGround:
if Matrix.backGround:
def seqsBetterThan(self,limit): "Return sequences scoring better than limit" if self.backGround: raise ValueError("Can't use markov background") self.initWeights() ret=[] # Found sequences better than limit
1ab29babb8e2ffca776b9343b520bf25610b6ad4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11674/1ab29babb8e2ffca776b9343b520bf25610b6ad4/Matrix.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 19472, 38, 11214, 9516, 12, 2890, 16, 3595, 4672, 315, 990, 8463, 22958, 7844, 2353, 1800, 6, 309, 7298, 18, 823, 43, 2260, 30, 1002, 2068, 2932, 2568, 1404, 999, 2267, 1527, 5412, 7923,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 19472, 38, 11214, 9516, 12, 2890, 16, 3595, 4672, 315, 990, 8463, 22958, 7844, 2353, 1800, 6, 309, 7298, 18, 823, 43, 2260, 30, 1002, 2068, 2932, 2568, 1404, 999, 2267, 1527, 5412, 7923,...
and not string.strip(nodes[0].data):
and not nodes[0].data.strip():
def handle_appendix(doc, fragment): # must be called after simplfy() if document is multi-rooted to begin with docelem = get_documentElement(fragment) toplevel = docelem.tagName == "manual" and "chapter" or "section" appendices = 0 nodes = [] for node in docelem.childNodes: if appendices: nodes.append(node) elif node.nodeType == ELEMENT: appnodes = node.getElementsByTagName("appendix") if appnodes: appendices = 1 parent = appnodes[0].parentNode parent.removeChild(appnodes[0]) parent.normalize() if nodes: map(docelem.removeChild, nodes) docelem.appendChild(doc.createTextNode("\n\n\n")) back = doc.createElement("back-matter") docelem.appendChild(back) back.appendChild(doc.createTextNode("\n")) while nodes and nodes[0].nodeType == TEXT \ and not string.strip(nodes[0].data): del nodes[0] map(back.appendChild, nodes) docelem.appendChild(doc.createTextNode("\n"))
3c171d1b9f1420a6bbce02f1511ffb6b621863ef /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/3c171d1b9f1420a6bbce02f1511ffb6b621863ef/docfixer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 67, 6923, 697, 12, 2434, 16, 5481, 4672, 468, 1297, 506, 2566, 1839, 9330, 74, 93, 1435, 309, 1668, 353, 3309, 17, 3085, 329, 358, 2376, 598, 997, 10037, 273, 336, 67, 5457, 1046...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 67, 6923, 697, 12, 2434, 16, 5481, 4672, 468, 1297, 506, 2566, 1839, 9330, 74, 93, 1435, 309, 1668, 353, 3309, 17, 3085, 329, 358, 2376, 598, 997, 10037, 273, 336, 67, 5457, 1046...
print "timed_run.py: exception trying to kill process: %d (%s)" % (e.errno, e.strerror)
print "\ntimed_run.py: exception trying to kill process: %d (%s)\n" % (e.errno, e.strerror)
def alarm_handler(signum, frame): global pid global prefix try: print "%s EXIT STATUS: TIMED OUT (%s seconds)" % (prefix, sys.argv[1]) flushkill(pid, signal.SIGKILL) except OSError, e: print "timed_run.py: exception trying to kill process: %d (%s)" % (e.errno, e.strerror) pass flushexit(exitTimeout)
40e51f168a1d4c5be0da376001bba226401d3f3c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11102/40e51f168a1d4c5be0da376001bba226401d3f3c/timed_run.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13721, 67, 4176, 12, 2977, 379, 16, 2623, 4672, 2552, 4231, 2552, 1633, 775, 30, 1172, 2213, 87, 28407, 7136, 30, 8721, 40, 8210, 6142, 87, 3974, 2225, 738, 261, 3239, 16, 2589, 18, 19...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13721, 67, 4176, 12, 2977, 379, 16, 2623, 4672, 2552, 4231, 2552, 1633, 775, 30, 1172, 2213, 87, 28407, 7136, 30, 8721, 40, 8210, 6142, 87, 3974, 2225, 738, 261, 3239, 16, 2589, 18, 19...
if kw and cnf: cnf = _cnfmerge((cnf, kw)) elif kw: cnf = kw opts = () for k, v in cnf.items(): opts = opts + ('-'+k, v) return opts
if kw and cnf: cnf = _cnfmerge((cnf, kw)) elif kw: cnf = kw opts = () for k, v in cnf.items(): opts = opts + ('-'+k, v) return opts
def _options(self, cnf, kw ):
0049f0036898e656085d5c214ba07642a9c25a6e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/0049f0036898e656085d5c214ba07642a9c25a6e/Tix.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2116, 12, 2890, 16, 23118, 16, 5323, 262, 30, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 389, 2116, 12, 2890, 16, 23118, 16, 5323, 262, 30, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
if values['rate'] == round(1/values['factor'], 6) or \ values['factor'] == round(1/values['rate'], 6):
if values['rate'] == round(1.0/values['factor'], 6) or \ values['factor'] == round(1.0/values['rate'], 6):
def check_factor_and_rate(values): factor = None rate = None
1c3eb8968b62e8d0dd32434c2ed5ad19c170cb2e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9285/1c3eb8968b62e8d0dd32434c2ed5ad19c170cb2e/uom.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 6812, 67, 464, 67, 5141, 12, 2372, 4672, 5578, 273, 599, 4993, 273, 599, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 866, 67, 6812, 67, 464, 67, 5141, 12, 2372, 4672, 5578, 273, 599, 4993, 273, 599, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
'\\usepackage{rotfloat}\n' '\\floatstyle{ruled}\n' '\\newfloat{algorithm}{tbp}{loa}\n' '\\floatname{algorithm}{Algorithm}\n'])
'\\usepackage{rotfloat}', '\\floatstyle{ruled}', '\\newfloat{algorithm}{tbp}{loa}', '\\floatname{algorithm}{Algorithm}'])
def revert_rotfloat(document): " Revert sideways custom floats. " i = 0 while 1: # whitespace intended (exclude \\begin_inset FloatList) i = find_token(document.body, "\\begin_inset Float ", i) if i == -1: return line = document.body[i] r = re.compile(r'\\begin_inset Float (.*)$') m = r.match(line) if m == None: document.warning("Unable to match line " + str(i) + " of body!") i += 1 continue floattype = m.group(1) if floattype == "figure" or floattype == "table": i = i + 1 continue j = find_end_of_inset(document.body, i) if j == -1: document.warning("Malformed lyx document: Missing '\\end_inset'.") i = i + 1 continue if get_value(document.body, 'sideways', i, j) != "false": l = find_default_layout(document, i + 1, j) if l == -1: document.warning("Malformed LyX document: Missing `\\begin_layout' in Float inset.") return document.body[j] = '\\begin_layout Standard\n\\begin_inset ERT\nstatus collapsed\n\n' \ '\\begin_layout Standard\n\n\n\\backslash\n' \ 'end{sideways' + floattype + '}\n\\end_layout\n\n\\end_inset\n' del document.body[i+1:l-1] document.body[i] = '\\begin_inset ERT\nstatus collapsed\n\n' \ '\\begin_layout Standard\n\n\n\\backslash\n' \ 'begin{sideways' + floattype + '}\n\\end_layout\n\n\\end_inset\n\n\\end_layout\n\n' if floattype == "algorithm": add_to_preamble(document, ['% Commands inserted by lyx2lyx for sideways algorithm float', '\\usepackage{rotfloat}\n' '\\floatstyle{ruled}\n' '\\newfloat{algorithm}{tbp}{loa}\n' '\\floatname{algorithm}{Algorithm}\n']) else: document.warning("Cannot create preamble definition for custom float" + floattype + ".") i = i + 1 continue i = i + 1
180b205049dc7c7bb0b5142048d5c55bb59f2922 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7514/180b205049dc7c7bb0b5142048d5c55bb59f2922/lyx_1_6.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15226, 67, 8342, 5659, 12, 5457, 4672, 315, 868, 1097, 4889, 3052, 1679, 19172, 18, 315, 277, 273, 374, 1323, 404, 30, 468, 7983, 12613, 261, 10157, 1736, 10086, 67, 267, 542, 5450, 682,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15226, 67, 8342, 5659, 12, 5457, 4672, 315, 868, 1097, 4889, 3052, 1679, 19172, 18, 315, 277, 273, 374, 1323, 404, 30, 468, 7983, 12613, 261, 10157, 1736, 10086, 67, 267, 542, 5450, 682,...
return self.tk.call(self._w, 'getmode', entrypath)
return self.tk.call(self._w, 'getmode', entrypath)
def getmode(self, entrypath):
86af7ef7e3f4448abc89aa941517a84075d99a38 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/86af7ef7e3f4448abc89aa941517a84075d99a38/Tix.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 3188, 12, 2890, 16, 1241, 803, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 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, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 3188, 12, 2890, 16, 1241, 803, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
simulationElement=self.cimRecord(root,ref)
simulationElement=self.cimRecord(root)
def q2cim(self,ref,docType):
2937a8963dfa97f0c5ac52221d0e5b3e2f073c4f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7019/2937a8963dfa97f0c5ac52221d0e5b3e2f073c4f/Translator.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1043, 22, 71, 381, 12, 2890, 16, 1734, 16, 2434, 559, 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, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1043, 22, 71, 381, 12, 2890, 16, 1734, 16, 2434, 559, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
else
else:
def __init__(data = None) if data == None: quickfix.StringField.__init__(self, 229) else quickfix.StringField.__init__(self, 229, 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, 780, 974, 16186, 2738, 972, 12, 2890, 16, 576, 5540, 13, 469, 30, 9549, 904, 18, 780, 974, 16186, 2738,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 780, 974, 16186, 2738, 972, 12, 2890, 16, 576, 5540, 13, 469, 30, 9549, 904, 18, 780, 974, 16186, 2738,...
calls = [(self.tree.add_node, "ADDING"), (self.tree.refresh_node, "UPDATING"), (self.tree.del_node, "REMOVING")] for call, name in calls: start = time.time() for index in xrange(2000): node = DummyNode("stress" + str(index)) call(node) end = time.time() test.test_validity() if call != self.tree.del_node: self.assertTrue(view.is_displayed('stress0')) try: self.tree.get_main_view().get_node("stress0") except Exception, e: print e print "\n%s 2000 NODES: %f" % (name, end - start)
nodes_id = [] start = time.time() for index in xrange(BIG_NUMBER): node = DummyNode("stress" + str(index)) nodes_id.append(node.get_id()) self.tree.add_node(node) end = time.time() test.test_validity() print "\nADDING %d NODES: %f" % (BIG_NUMBER, end - start) start = time.time() for node_id in nodes_id: self.tree.refresh_node(node_id) end = time.time() test.test_validity() print "\nUPDATING %d NODES: %f" % (BIG_NUMBER, end - start) start = time.time() for node_id in nodes_id: self.tree.del_node(node_id) end = time.time() test.test_validity() print "\nDELETING %d NODES: %f" % (BIG_NUMBER, end - start)
def test_speed(self): ''' Performance tests. Patches that reduce performance too much are not acceptable ''' view = self.tree.get_viewtree(refresh = False) test = TreeTester(view) calls = [(self.tree.add_node, "ADDING"), (self.tree.refresh_node, "UPDATING"), (self.tree.del_node, "REMOVING")] for call, name in calls: start = time.time() for index in xrange(2000): node = DummyNode("stress" + str(index)) call(node) end = time.time() test.test_validity() if call != self.tree.del_node: #the stress0 node is in the view(per the following assert), # but accessing the view from the tree says it's not there. # If you comment the try-except statement, liblarch # complains that it can't remove a node which hasn't # been added. self.assertTrue(view.is_displayed('stress0')) try: self.tree.get_main_view().get_node("stress0") except Exception, e: #we let the test continue even if the node is not found print e print "\n%s 2000 NODES: %f" % (name, end - start)
ce701fa256cdf16403fa76a6ffa95c56d207f498 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/ce701fa256cdf16403fa76a6ffa95c56d207f498/test_liblarch.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 13871, 12, 2890, 4672, 9163, 11217, 1359, 7434, 18, 12042, 281, 716, 5459, 9239, 4885, 9816, 854, 486, 14206, 9163, 1476, 273, 365, 18, 3413, 18, 588, 67, 1945, 3413, 12, 9144,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 13871, 12, 2890, 4672, 9163, 11217, 1359, 7434, 18, 12042, 281, 716, 5459, 9239, 4885, 9816, 854, 486, 14206, 9163, 1476, 273, 365, 18, 3413, 18, 588, 67, 1945, 3413, 12, 9144,...
self.cursor().execute("""
cur.execute("""
def force_last_new(self, channel): old = self.__get__("""SELECT COUNT(*) FROM episodes WHERE channel_id = ? AND state IN (?, ?)""", (channel.id, self.STATE_DOWNLOADED, self.STATE_DELETED)) log('old episodes in (%d)%s: %d', channel.id, channel.url, old)
8b4bdc092a652d553b2313fed64d96bca4185538 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12778/8b4bdc092a652d553b2313fed64d96bca4185538/dbsqlite.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2944, 67, 2722, 67, 2704, 12, 2890, 16, 1904, 4672, 1592, 273, 365, 16186, 588, 972, 2932, 3660, 4803, 12666, 24099, 4571, 5529, 27134, 4852, 1904, 67, 350, 273, 692, 4116, 919, 2120, 13...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2944, 67, 2722, 67, 2704, 12, 2890, 16, 1904, 4672, 1592, 273, 365, 16186, 588, 972, 2932, 3660, 4803, 12666, 24099, 4571, 5529, 27134, 4852, 1904, 67, 350, 273, 692, 4116, 919, 2120, 13...
f = theano.function([], c)
f = theano.function([], c, mode=mode_with_gpu)
def test_opt_gpujoin_onlyajoin(): # from a bug in normal sampling _a = numpy.asarray([[1,2],[3,4]],dtype='float32') _b = numpy.asarray([[5,6,7],[8,9,10]],dtype='float32') a = theano.shared(_a) b = theano.shared(_b) c = tensor.join(1,a,b) f = theano.function([], c) #theano.printing.debugprint(f) f() graph_nodes = f.maker.env.toposort() assert isinstance(graph_nodes[-1].op, cuda.HostFromGpu) assert isinstance(graph_nodes[-2].op, cuda.GpuJoin) assert numpy.all(f() == numpy.concatenate([_a,_b], axis=1))
80dbd1aeb6bbbcb08694dcb5b0499b1b01333111 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12438/80dbd1aeb6bbbcb08694dcb5b0499b1b01333111/test_opt.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 3838, 67, 23162, 5701, 67, 3700, 4365, 885, 13332, 468, 628, 279, 7934, 316, 2212, 11558, 389, 69, 273, 3972, 18, 345, 1126, 3816, 63, 21, 16, 22, 6487, 63, 23, 16, 24, 65,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3838, 67, 23162, 5701, 67, 3700, 4365, 885, 13332, 468, 628, 279, 7934, 316, 2212, 11558, 389, 69, 273, 3972, 18, 345, 1126, 3816, 63, 21, 16, 22, 6487, 63, 23, 16, 24, 65,...
self.setText("By the rules, %s and %s should now exchange their seats. " % \ (swappers[0].name, swappers[1].name)) yesAnswer = QPushButton("&Exchange") self.addButton(yesAnswer, QMessageBox.YesRole) noAnswer = QPushButton("&Keep seat") self.addButton(noAnswer, QMessageBox.NoRole)
self.setText(m18n("By the rules, %1 and %2 should now exchange their seats. ", swappers[0].name, swappers[1].name)) self.yesAnswer = QPushButton(m18n("&Exchange")) self.addButton(self.yesAnswer, QMessageBox.YesRole) self.noAnswer = QPushButton(m18n("&Keep seat")) self.addButton(self.noAnswer, QMessageBox.NoRole) def exec_(self): """I do not understand the logic of the exec return value. The yes button returns 0 and the no button returns 1. According to the C++ doc, the return value is an opaque value that should not be used.""" return self.clickedButton() == self.yesAnswer
def __init__(self, swappers): QMessageBox.__init__(self) self.setWindowTitle(m18n("Swap Seats") + ' - Kajongg') self.setText("By the rules, %s and %s should now exchange their seats. " % \ (swappers[0].name, swappers[1].name)) yesAnswer = QPushButton("&Exchange") self.addButton(yesAnswer, QMessageBox.YesRole) noAnswer = QPushButton("&Keep seat") self.addButton(noAnswer, QMessageBox.NoRole)
69b6ca2068411d67a963550c06f3723fa9686f74 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1679/69b6ca2068411d67a963550c06f3723fa9686f74/playfield.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1352, 2910, 414, 4672, 30728, 16186, 2738, 972, 12, 2890, 13, 365, 18, 542, 3829, 4247, 12, 81, 2643, 82, 2932, 12521, 3265, 2323, 7923, 397, 296, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1352, 2910, 414, 4672, 30728, 16186, 2738, 972, 12, 2890, 13, 365, 18, 542, 3829, 4247, 12, 81, 2643, 82, 2932, 12521, 3265, 2323, 7923, 397, 296, 300, 1...
k = len(G.rows())
def permutation_automorphism_group(self,mode=None): r""" If $C$ is an $[n,k,d]$ code over $F$, this function computes the subgroup $Aut(C) \subset S_n$ of all permutation automorphisms of $C$. If mode="verbose" then code-theoretic data is printed out at several stages of the computation. Combines an idea of mine with an improvement suggested by Cary Huffman. EXAMPLES: sage: MS = MatrixSpace(GF(2),4,8) sage: G = MS([[1,0,0,0,1,1,1,0],[0,1,1,1,0,0,0,0],[0,0,0,0,0,0,0,1],[0,0,0,0,0,1,0,0]]) sage: C = LinearCode(G) sage: C Linear code of length 8, dimension 4 over Finite Field of size 2 sage: G = C.permutation_automorphism_group() sage: G.order() 144 A less easy example involves showing that the permutation automorphism group of the extended ternary Golay code is the Mathieu group $M_{11}$. sage: C = ExtendedTernaryGolayCode() sage: M11 = MathieuGroup(11) sage: M11.order() 7920 sage: G = C.permutation_automorphism_group() # this should take < 5 seconds sage: G.is_isomorphic(M11) # this should take < 5 seconds True WARNING: - *Ugly code, which should be replaced by a call to Robert Miller's nice program.* """ F = self.base_ring() q = F.order() G = self.gen_mat() n = len(G.columns()) k = len(G.rows()) # G is always full rank Gp = gap("SymmetricGroup(%s)"%n) # initializing G in gap Sn = SymmetricGroup(n) wts = self.spectrum() # bottleneck 1 Gstr = str(gap(G)) gap.eval("C:=GeneratorMatCode("+Gstr+",GF("+str(q)+"))") gap.eval("eltsC:=Elements(C)") nonzerowts = [i for i in range(len(wts)) if wts[i]!=0] if mode=="verbose": print "\n Minimum distance: %s \n Weight distribution: \n %s"%(nonzerowts[1],wts) stop = 0 # only stop if all gens are autos for i in range(1,len(nonzerowts)): if stop == 1: break wt = nonzerowts[i] if mode=="verbose": size = Gp.Size() print "\n Using the %s codewords of weight %s \n Supergroup size: \n %s\n "%(wts[wt],wt,size) gap.eval("Cwt:=Filtered(eltsC,c->WeightCodeword(c)=%s)"%wt) # bottleneck 2 (repeated gap.eval("matCwt:=List(Cwt,c->VectorCodeword(c))") # for each i until stop = 1) A = gap("MatrixAutomorphisms(matCwt)") #print "A = ",A, "\n Gp = ", Gp, "\n strGp = ", str(Gp) G2 = gap("Intersection2(%s,%s)"%(str(A).replace("\n",""),str(Gp).replace("\n",""))) # bottleneck 3 Gp = G2 if Gp.Size()==1: return PermutationGroup([()]) autgp_gens = Gp.GeneratorsOfGroup() gens = [Sn(str(x).replace("\n","")) for x in autgp_gens] stop = 1 # get ready to stop for x in gens: # if one of these gens is not an auto then don't stop if not(self.is_permutation_automorphism(x)): stop = 0 break G = PermutationGroup(gens) return G
3a7625918ca06799454663aea3e731edc0d084bf /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/3a7625918ca06799454663aea3e731edc0d084bf/linear_code.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17440, 67, 5854, 362, 7657, 6228, 67, 1655, 12, 2890, 16, 3188, 33, 7036, 4672, 436, 8395, 971, 271, 39, 8, 353, 392, 271, 63, 82, 16, 79, 16, 72, 65, 8, 981, 1879, 271, 42, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17440, 67, 5854, 362, 7657, 6228, 67, 1655, 12, 2890, 16, 3188, 33, 7036, 4672, 436, 8395, 971, 271, 39, 8, 353, 392, 271, 63, 82, 16, 79, 16, 72, 65, 8, 981, 1879, 271, 42, 8, 1...
copies.setdefault(rev, {})
def display(fn, rev, states, prevstates): counts = {'-': 0, '+': 0} filerevmatches = {} if incrementing or not opts['all']: a, b = prevstates, states else: a, b = states, prevstates for change, l in difflinestates(a, b): if incrementing or not opts['all']: r = rev else: r = prev[fn] cols = [fn, str(r)] if opts['line_number']: cols.append(str(l.linenum)) if opts['all']: cols.append(change) if opts['user']: cols.append(trimuser(ui, getchange(r)[1], rev, ucache)) if opts['files_with_matches']: c = (fn, rev) if c in filerevmatches: continue filerevmatches[c] = 1 else: cols.append(l.line) ui.write(sep.join(cols), eol) counts[change] += 1 return counts['+'], counts['-']
561887363fdcb8884009df0b4688ceef81cab63f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11312/561887363fdcb8884009df0b4688ceef81cab63f/commands.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2562, 12, 4293, 16, 5588, 16, 5493, 16, 2807, 7992, 4672, 6880, 273, 13666, 17, 4278, 374, 16, 15126, 4278, 374, 97, 661, 822, 90, 8436, 273, 2618, 309, 5504, 310, 578, 486, 1500, 3292...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2562, 12, 4293, 16, 5588, 16, 5493, 16, 2807, 7992, 4672, 6880, 273, 13666, 17, 4278, 374, 16, 15126, 4278, 374, 97, 661, 822, 90, 8436, 273, 2618, 309, 5504, 310, 578, 486, 1500, 3292...
self.assertIs(item1.sprite.batch, render.batch) self.assertIs(item2.sprite.batch, render.batch) self.assertIs(item3.sprite.batch, render.batch)
item.add_to_batch = Mock() render.on_add_item(item) self.assertEquals( item.add_to_batch.call_args, ((render.batch, render.groups), {}) )
def test_AddItemToWorldAddsItToRenderBatchToo(self): item1, item2, item3 = WorldItem(), WorldItem(), WorldItem() arena = Arena(None, None) application = Mock() application.arena = arena render = Render(arena) render.images = dict(WorldItem=[_dummy_image]) WorldItem.images = [_dummy_image]
9c6cdc092ad6bb3cf4cc778fd1f4474bddf45be6 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2482/9c6cdc092ad6bb3cf4cc778fd1f4474bddf45be6/render-test.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 986, 1180, 774, 18071, 3655, 7193, 774, 3420, 4497, 10703, 12, 2890, 4672, 761, 21, 16, 761, 22, 16, 761, 23, 273, 21820, 1180, 9334, 21820, 1180, 9334, 21820, 1180, 1435, 854,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 986, 1180, 774, 18071, 3655, 7193, 774, 3420, 4497, 10703, 12, 2890, 4672, 761, 21, 16, 761, 22, 16, 761, 23, 273, 21820, 1180, 9334, 21820, 1180, 9334, 21820, 1180, 1435, 854,...
client.connect(source,target)
monitor_client.connect(source,target)
def connect(source, target) : client.connect(source,target) time.sleep( connect_wait_time )
7966e22855b4c00c398506a8416f929e50d01492 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1456/7966e22855b4c00c398506a8416f929e50d01492/jack_bus_connect.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3077, 12, 3168, 16, 1018, 13, 294, 6438, 67, 2625, 18, 3612, 12, 3168, 16, 3299, 13, 813, 18, 19607, 12, 3077, 67, 7048, 67, 957, 262, 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, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3077, 12, 3168, 16, 1018, 13, 294, 6438, 67, 2625, 18, 3612, 12, 3168, 16, 3299, 13, 813, 18, 19607, 12, 3077, 67, 7048, 67, 957, 262, 225, 2, -100, -100, -100, -100, -100, -100, -10...
self.properties = module.getProperties()
self.properties = module.getProxyProperties()
def __init__(self, name, supername, bases, methods, module=None, issuperproxy = 1): self.bases = bases self.name = name self.supername, self.pySupername = supername self.methods = methods self.issuperproxy = 0 #issuperproxy
add81462e56708bdbbc5e2b4afece1347b0e7c07 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6753/add81462e56708bdbbc5e2b4afece1347b0e7c07/proxies.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 508, 16, 2240, 529, 16, 8337, 16, 2590, 16, 1605, 33, 7036, 16, 353, 9565, 5656, 273, 404, 4672, 365, 18, 18602, 273, 8337, 365, 18, 529, 273, 508, 365...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 508, 16, 2240, 529, 16, 8337, 16, 2590, 16, 1605, 33, 7036, 16, 353, 9565, 5656, 273, 404, 4672, 365, 18, 18602, 273, 8337, 365, 18, 529, 273, 508, 365...
r'''
r"""
def NKStarGraph(self,n,k): r''' Returns the (n,k)-star graph.
964210a5192f4b56729c7c92c3aa648c59e61bea /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9417/964210a5192f4b56729c7c92c3aa648c59e61bea/graph_generators.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 423, 47, 18379, 4137, 12, 2890, 16, 82, 16, 79, 4672, 436, 8395, 2860, 326, 261, 82, 16, 79, 24950, 10983, 2667, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 423, 47, 18379, 4137, 12, 2890, 16, 82, 16, 79, 4672, 436, 8395, 2860, 326, 261, 82, 16, 79, 24950, 10983, 2667, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
tmp[..., :3] = s
print tmp.shape, s.shape tmp[..., :3] = s[..., :3]
def with_transform(images, matrices, weights=None, order=1, oshape=None, save_tiff=False, method='interpolate'): """Stack images after performing coordinate transformations. Parameters ---------- images : list of ndarray Images to be stacked. matrices : list of (3,3) ndarray Coordinate transformation matrices. weights : list of float Weight of each input image. By default, all images are weighted equally. The merging algorithm takes into account whether images overlap. order : int Order of the interpolant used by the scaling algorithm. Linear, by default. oshape : tuple of int Output shape. If not specified, the output shape is auto determined to include all images. save_tiff : bool Whether to save copies of the warped images. False by default. method : {'interpolate', 'polygon'} Use standard interpolation (default) or polygon interpolation. Note: Polygon interpolation is currently disabled. Notes ----- For each image, a 3x3 coordinate transformation matrix, ``A``, must be given. Each coordinate, ``c = [x,y,1]^T``, in the source image is then translated to its position in the destination image, ``d = A*c``. After warping the images, they are combined according to the given weights. Note that the overlap of frames is taken into account. For example, in areas where only one image occurs, the pixels of that image will carry a weight of one, whereas in other areas it may be less, depending on the overlap of other images. """ nr_images = len(images) if weights is None: weights = np.ones(nr_images, dtype=sc.ftype) / nr_images if not (len(images) == len(matrices) == len(weights)): raise ValueError("Number of images, transformation matrices and " "weights should match.") images = [np.atleast_2d(i) for i in images] affine_matrices = [np.atleast_2d(m) for m in matrices] reshape = (oshape is None) if reshape: all_tf_cnrs = np.empty((0,2)) for img, tf_matrix in zip(images, matrices): rows, cols = img.shape[:2] tf_cnrs = _tf_corners(rows, cols, tf_matrix) all_tf_cnrs = np.vstack((all_tf_cnrs, tf_cnrs)) # Calculate bounding box [(x0,y0),(x1,y1)] bbox_top_left = np.floor(all_tf_cnrs.min(axis=0)) bbox_bottom_right = np.ceil(all_tf_cnrs.max(axis=0)) oshape = np.array(images[0].shape) oshape[:2][::-1] = np.absolute(bbox_bottom_right - bbox_top_left).astype(int) + 1 sources = [] boundaries = [] for n, (img, tf_matrix, weight) in \ enumerate(zip(images, affine_matrices, weights)): if reshape: tf_matrix = tf_matrix.copy() tf_matrix[:2,2] -= bbox_top_left boundaries.append(_tf_corners(img.shape[0] + 1, img.shape[1] + 1, tf_matrix))
721050ab9ef5d422edd491606feacb33a10087be /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12843/721050ab9ef5d422edd491606feacb33a10087be/stack.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 598, 67, 6547, 12, 7369, 16, 16415, 16, 5376, 33, 7036, 16, 1353, 33, 21, 16, 320, 4867, 33, 7036, 16, 1923, 67, 88, 3048, 33, 8381, 16, 707, 2218, 18676, 340, 11, 4672, 3536, 2624, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 598, 67, 6547, 12, 7369, 16, 16415, 16, 5376, 33, 7036, 16, 1353, 33, 21, 16, 320, 4867, 33, 7036, 16, 1923, 67, 88, 3048, 33, 8381, 16, 707, 2218, 18676, 340, 11, 4672, 3536, 2624, ...
downDir = cacheCfg['downloads']
downDir = self._config.absPath(cacheCfg['downloads'])
def runCollectEnvironmentInfo(self): letConfig = self._job.get('let',{}) self._console.info("Environment information") self._console.indent() platformInfo = util.getPlatformInfo() self._console.info("Platform: %s %s" % (platformInfo[0], platformInfo[1])) self._console.info("Python version: %s" % sys.version) if 'QOOXDOO_PATH' in letConfig: qxPath = letConfig['QOOXDOO_PATH'] self._console.info("qooxdoo path: %s" % qxPath) versionFile = open(os.path.join(qxPath, "version.txt")) version = versionFile.read() self._console.info("Framework version: %s" % version.strip()) #TODO: Improve this check classFile = os.path.join(qxPath, "framework", "source", "class", "qx", "Class.js") self._console.info("Kit looks OK: %s" % os.path.isfile(classFile) )
df4d368393bb0c574d76764b688d0e8013877bd2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5718/df4d368393bb0c574d76764b688d0e8013877bd2/Generator.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 10808, 5494, 966, 12, 2890, 4672, 2231, 809, 273, 365, 6315, 4688, 18, 588, 2668, 1810, 2187, 2916, 13, 225, 365, 6315, 8698, 18, 1376, 2932, 5494, 1779, 7923, 365, 6315, 8698, 18,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 10808, 5494, 966, 12, 2890, 4672, 2231, 809, 273, 365, 6315, 4688, 18, 588, 2668, 1810, 2187, 2916, 13, 225, 365, 6315, 8698, 18, 1376, 2932, 5494, 1779, 7923, 365, 6315, 8698, 18,...
if product_obj.uos_id.category_id.id <> uos2.category_id.id:
if product_obj.uos_id.category_id.id != uos2.category_id.id:
def product_id_change(self, cr, uid, ids, pricelist, product, qty=0, uom=False, qty_uos=0, uos=False, name='', partner_id=False, lang=False, update_tax=True, date_order=False, packaging=False, fiscal_position=False, flag=False): if not partner_id: raise osv.except_osv(_('No Customer Defined !'), _('You have to select a customer in the sale form !\nPlease set one customer before choosing a product.')) warning={} product_uom_obj = self.pool.get('product.uom') partner_obj = self.pool.get('res.partner') product_obj = self.pool.get('product.product') if partner_id: lang = partner_obj.browse(cr, uid, partner_id).lang context = {'lang': lang, 'partner_id': partner_id}
fa29dc7d9e6d87f49bc3316e2b56fa977448ad6c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/fa29dc7d9e6d87f49bc3316e2b56fa977448ad6c/sale.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3017, 67, 350, 67, 3427, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 846, 335, 5449, 16, 3017, 16, 26667, 33, 20, 16, 582, 362, 33, 8381, 16, 26667, 67, 89, 538, 33, 20, 16, 582, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3017, 67, 350, 67, 3427, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 846, 335, 5449, 16, 3017, 16, 26667, 33, 20, 16, 582, 362, 33, 8381, 16, 26667, 67, 89, 538, 33, 20, 16, 582, ...
return msg
return msg
def new_link_to(self, request, text=None, querystr=dict(), anchor=None, **kw): if self.page_name == inc_name: # Let's see if we've a link to nonexisting page if getattr(self, '_macro_Include_nonexisting', False): # Modify editlinks with template selection if kw.get('css_class', '') == "include-edit-link": msg = '' if template: querystr['template'] = template else: orig_page = macro.request.page.page_name msg = wr('<form method="GET" action="%s">', actionname(request, orig_page)) msg += wr('<select name="template">') msg += wr('<option value="">%s</option>', _("No template"))
81ed67f1c61c84c9bd91e0cfdde7818b6062d240 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/888/81ed67f1c61c84c9bd91e0cfdde7818b6062d240/Include.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 394, 67, 1232, 67, 869, 12, 2890, 16, 590, 16, 977, 33, 7036, 16, 843, 701, 33, 1576, 9334, 6984, 33, 7036, 16, 2826, 9987, 4672, 225, 309, 365, 18, 2433, 67, 529, 422, 7290, 67, 5...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 394, 67, 1232, 67, 869, 12, 2890, 16, 590, 16, 977, 33, 7036, 16, 843, 701, 33, 1576, 9334, 6984, 33, 7036, 16, 2826, 9987, 4672, 225, 309, 365, 18, 2433, 67, 529, 422, 7290, 67, 5...
parser = html_fromstring
parser = lxml.doctestcompare.html_fromstring
def get_parser(self, want, got, optionflags): NOPARSE_MARKUP = self.doctest.OPTIONFLAGS_BY_NAME.get( "NOPARSE_MARKUP", 0) PARSE_HTML = self.doctest.OPTIONFLAGS_BY_NAME.get( "PARSE_HTML", 0) PARSE_XML = self.doctest.OPTIONFLAGS_BY_NAME.get( "PARSE_XML", 0) parser = None if NOPARSE_MARKUP & optionflags: return None if PARSE_HTML & optionflags: parser = lxml.doctestcompare.html_fromstring elif PARSE_XML & optionflags: parser = lxml.etree.XML elif (want.strip().lower().startswith('<html') and got.strip().startswith('<html')): parser = html_fromstring elif (self._looks_like_markup(want) and self._looks_like_markup(got)): parser = self.get_default_parser() return parser
1c499328a887c7d4e4576db3c0b01502a8eadb0d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9695/1c499328a887c7d4e4576db3c0b01502a8eadb0d/testing.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 4288, 12, 2890, 16, 2545, 16, 2363, 16, 1456, 7133, 4672, 3741, 21045, 67, 12693, 3079, 273, 365, 18, 2896, 299, 395, 18, 7425, 17836, 67, 6486, 67, 1985, 18, 588, 12, 315, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 4288, 12, 2890, 16, 2545, 16, 2363, 16, 1456, 7133, 4672, 3741, 21045, 67, 12693, 3079, 273, 365, 18, 2896, 299, 395, 18, 7425, 17836, 67, 6486, 67, 1985, 18, 588, 12, 315, ...
i18n.set_language(lang) doc.set_language(lang)
def subscription_prompt(mlist, doc, cookie, userdesc): email = userdesc.address password = userdesc.password digest = userdesc.digest lang = userdesc.language name = Utils.uncanonstr(userdesc.fullname, lang) title = _('Confirm subscription request') doc.SetTitle(title) i18n.set_language(lang) doc.set_language(lang) form = Form(mlist.GetScriptURL('confirm', 1)) table = Table(border=0, width='100%') table.AddRow([Center(Bold(FontAttr(title, size='+1')))]) table.AddCellInfo(table.GetCurrentRowIndex(), 0, colspan=2, bgcolor=mm_cfg.WEB_HEADER_COLOR) listname = mlist.real_name # This is the normal, no-confirmation required results text. # # We do things this way so we don't have to reformat this paragraph, which # would mess up translations. If you modify this text for other reasons, # please refill the paragraph, and clean up the logic. result = _("""Your confirmation is required in order to complete the subscription request to the mailing list <em>%(listname)s</em>. Your subscription settings are shown below; make any necessary changes and hit <em>Subscribe</em> to complete the confirmation process. Once you've confirmed your subscription request, you will be shown your account options page which you can use to further customize your membership options. <p>Note: your password will be emailed to you once your subscription is confirmed. You can change it by visiting your personal options page. <p>Or hit <em>Cancel and discard</em> to cancel this subscription request.""") + '<p><hr>' if mlist.subscribe_policy in (2, 3): # Confirmation is required result = _("""Your confirmation is required in order to continue with the subscription request to the mailing list <em>%(listname)s</em>. Your subscription settings are shown below; make any necessary changes and hit <em>Subscribe to list ...</em> to complete the confirmation process. Once you've confirmed your subscription request, the moderator must approve or reject your membership request. You will receive notice of their decision. <p>Note: your password will be emailed to you once your subscription is confirmed. You can change it by visiting your personal options page. <p>Or, if you've changed your mind and do not want to subscribe to this mailing list, you can hit <em>Cancel my subscription request</em>.""") + '<p><hr>' table.AddRow([result]) table.AddCellInfo(table.GetCurrentRowIndex(), 0, colspan=2) table.AddRow([Label(_('Your email address:')), email]) table.AddRow([Label(_('Your real name:')), TextBox('realname', name)])
a9a355a696ea873dcc885619736f4038cc9d34d2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2120/a9a355a696ea873dcc885619736f4038cc9d34d2/confirm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4915, 67, 13325, 12, 781, 376, 16, 997, 16, 3878, 16, 729, 5569, 4672, 2699, 273, 729, 5569, 18, 2867, 2201, 273, 729, 5569, 18, 3664, 5403, 273, 729, 5569, 18, 10171, 3303, 273, 729, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4915, 67, 13325, 12, 781, 376, 16, 997, 16, 3878, 16, 729, 5569, 4672, 2699, 273, 729, 5569, 18, 2867, 2201, 273, 729, 5569, 18, 3664, 5403, 273, 729, 5569, 18, 10171, 3303, 273, 729, ...
f = open(outfilename, 'wb') try: self.implementation.dump(ctx, f, 2) finally: f.close()
self.dump_context(ctx, outfilename)
def handle_page(self, pagename, ctx, templatename='page.html', outfilename=None, event_arg=None): ctx['current_page_name'] = pagename self.add_sidebars(pagename, ctx)
cdadc99ab2dd8971ed0e5e0767efa974f9b3ea03 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7032/cdadc99ab2dd8971ed0e5e0767efa974f9b3ea03/html.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 67, 2433, 12, 2890, 16, 4262, 1069, 16, 1103, 16, 13988, 270, 1069, 2218, 2433, 18, 2620, 2187, 596, 3459, 33, 7036, 16, 871, 67, 3175, 33, 7036, 4672, 1103, 3292, 2972, 67, 2433...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1640, 67, 2433, 12, 2890, 16, 4262, 1069, 16, 1103, 16, 13988, 270, 1069, 2218, 2433, 18, 2620, 2187, 596, 3459, 33, 7036, 16, 871, 67, 3175, 33, 7036, 4672, 1103, 3292, 2972, 67, 2433...
if another_path.startswith(path):
if is_under_dir(path, another_path):
def __invalidate_path(self, path): with self.__status_tree_lock: for another_path in self.__status_tree.keys(): if another_path.startswith(path): del self.__status_tree[another_path]
9a514c51a3fd2c730abf2805e3bd545fbc40ca9b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5119/9a514c51a3fd2c730abf2805e3bd545fbc40ca9b/statuschecker.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 5387, 340, 67, 803, 12, 2890, 16, 589, 4672, 598, 365, 16186, 2327, 67, 3413, 67, 739, 30, 364, 4042, 67, 803, 316, 365, 16186, 2327, 67, 3413, 18, 2452, 13332, 309, 353, 67, 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, 1001, 5387, 340, 67, 803, 12, 2890, 16, 589, 4672, 598, 365, 16186, 2327, 67, 3413, 67, 739, 30, 364, 4042, 67, 803, 316, 365, 16186, 2327, 67, 3413, 18, 2452, 13332, 309, 353, 67, 9...
self.selection = self.item
if self.item is not None: self.selection = self.item
def synchronizeWidget(self, useHints=False): super(HTMLDetailArea, self).synchronizeWidget(useHints) self.selection = self.item
28605a8213a2f8559d4b40c08d40befb8025fccb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/28605a8213a2f8559d4b40c08d40befb8025fccb/Detail.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 16978, 4609, 12, 2890, 16, 999, 13368, 33, 8381, 4672, 2240, 12, 4870, 6109, 5484, 16, 365, 2934, 87, 2600, 554, 4609, 12, 1202, 13368, 13, 365, 18, 10705, 273, 365, 18, 1726, 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, 16978, 4609, 12, 2890, 16, 999, 13368, 33, 8381, 4672, 2240, 12, 4870, 6109, 5484, 16, 365, 2934, 87, 2600, 554, 4609, 12, 1202, 13368, 13, 365, 18, 10705, 273, 365, 18, 1726, 2, -100,...
EXAMPLES: sage: K = Qp(13,7)
The content is returned to maximum precision: since it's only defined up to a unit, we can choose p^k as the representative. Returns an error if the base ring is actually a field: this is probably not a function you want to be using then, since any nonzero answer will be correct. The content of the exact zero polynomial is zero. EXAMPLES: sage: K = Zp(13,7)
def content(self): """ Returns the content of self.
37c2d50783adc632bddb826d28bfc634cd62a57e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/37c2d50783adc632bddb826d28bfc634cd62a57e/polynomial_padic_capped_relative_dense.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 913, 12, 2890, 4672, 3536, 2860, 326, 913, 434, 365, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 913, 12, 2890, 4672, 3536, 2860, 326, 913, 434, 365, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
title = title % offer.param description = description % offer.param
param = offer.param if offer.type == TAKEBACK_OFFER and \ self.gamemodel.players[1-self.color].__type__ is not REMOTE: param = self.gamemodel.ply - offer.param title = title % param description = description % param
def offer (self, offer): title, description, takesParam = OFFER_MESSAGES[offer.type] if takesParam: title = title % offer.param description = description % offer.param def responsecb (dialog, response): if response == gtk.RESPONSE_YES: self.emit("accept", offer) else: self.emit("decline", offer) self._message(title, description, gtk.MESSAGE_QUESTION, gtk.BUTTONS_YES_NO, responsecb)
7fb30f0671ceb0f606fb88b47b3085848bcef0d5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5339/7fb30f0671ceb0f606fb88b47b3085848bcef0d5/Human.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10067, 261, 2890, 16, 10067, 4672, 2077, 16, 2477, 16, 5530, 786, 273, 531, 9303, 67, 26195, 63, 23322, 18, 723, 65, 309, 5530, 786, 30, 579, 273, 10067, 18, 891, 309, 10067, 18, 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, 10067, 261, 2890, 16, 10067, 4672, 2077, 16, 2477, 16, 5530, 786, 273, 531, 9303, 67, 26195, 63, 23322, 18, 723, 65, 309, 5530, 786, 30, 579, 273, 10067, 18, 891, 309, 10067, 18, 723, ...
if type(commandlist) == type(()): stringstoadd = [commandlist[idx][0]] else: stringstoadd = [commandlist[idx]]
command = commandlist[idx] if type(command) == type(()): command = command[0] stringstoadd = [command]
def GetArgv(optionlist=None, commandlist=None, addoldfile=1, addnewfile=1, addfolder=1, id=ARGV_ID): d = GetNewDialog(id, -1) if not d: print "Can't get DLOG resource with id =", id return
4227340a8bad85ccbc649c9eb7648c9f3229f58d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/4227340a8bad85ccbc649c9eb7648c9f3229f58d/EasyDialogs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 968, 4117, 90, 12, 3482, 1098, 33, 7036, 16, 1296, 1098, 33, 7036, 16, 527, 1673, 768, 33, 21, 16, 527, 2704, 768, 33, 21, 16, 527, 5609, 33, 21, 16, 612, 33, 10973, 58, 67, 734, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 968, 4117, 90, 12, 3482, 1098, 33, 7036, 16, 1296, 1098, 33, 7036, 16, 527, 1673, 768, 33, 21, 16, 527, 2704, 768, 33, 21, 16, 527, 5609, 33, 21, 16, 612, 33, 10973, 58, 67, 734, ...
strict_allowed_paths = ["/","flashConduit","/help","/contact","favicon.ico","/add_guest_account",
strict_allowed_paths = ["/","flashConduit","/about","/help","/contact","favicon.ico","/add_guest_account",
def is_testmode(): return cherrypy.config.get("TESTMODE",False)
5ac80e17dd6d1d7b4216c35bf8a4d9b8964095eb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5854/5ac80e17dd6d1d7b4216c35bf8a4d9b8964095eb/controllers.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 67, 3813, 3188, 13332, 327, 462, 370, 28398, 18, 1425, 18, 588, 2932, 16961, 7038, 3113, 8381, 13, 282, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 67, 3813, 3188, 13332, 327, 462, 370, 28398, 18, 1425, 18, 588, 2932, 16961, 7038, 3113, 8381, 13, 282, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
g1 = open('out1','w') g2 = open('out2','w') print >> g1,'atoms.r',atoms.r print >> g2,'atoms.r_old',atoms.r_old ITR = atoms.ITR
ITR = self.ITR
def step(self, f): atoms = self.atoms self.ni = atoms.nimages-2 # try: atoms.imax # except: atoms.imax=0 # if(not self.ni):atoms.imax=1 g = open('out','w') atoms.r = npy.zeros((self.ni, atoms.natoms, self.dim), 'd') for i in range(1, atoms.nimages-1): atoms.r[i-1] = atoms.images[i].get_positions() print >> g,'atoms.r',atoms.r atoms.f = npy.zeros((self.ni, atoms.natoms, self.dim), 'd') for i in range(1, atoms.nimages-1): atoms.f[i-1] = atoms.images[i].get_forces() print >> g,'atoms.f',atoms.f try: atoms.start except:atoms.start=0 if(not atoms.start): atoms.start = 1 atoms.a = npy.zeros(self.memory+1, 'd') self.ptmp = atoms self.maxstep = npy.sqrt(self.maxstep * self.ni) atoms.lbfgsinit = 0 try: atoms.lbfgsinit except:atoms.lbfgsinit=0 if(not atoms.lbfgsinit): atoms.lbfgsinit = 1 atoms.Ho = npy.ones((self.ni, atoms.natoms, self.dim), 'd') if (not self.min=='line'):atoms.Ho = atoms.Ho * self.alpha atoms.ITR = 1 atoms.s = [1.] atoms.y = [1.] atoms.rho = [1.] else: a1 = abs (npy.vdot(atoms.f, atoms.f_old)) a2 = npy.vdot(atoms.f_old, atoms.f_old) print 'a1,a2 created',a1,a2 if(self.min=='line'): if(a1<=0.5* a2 and a2!=0): reset_flag = 0 else: reset_flag = 1 else: reset_flag = 0 if(reset_flag==0): g1 = open('out1','w') g2 = open('out2','w') print >> g1,'atoms.r',atoms.r print >> g2,'atoms.r_old',atoms.r_old ITR = atoms.ITR#correctly generated if(ITR > self.memory): atoms.s.pop(1) atoms.y.pop(1) atoms.rho.pop(1) ITR=self.memory atoms.s.append(atoms.r - atoms.r_old)#!!atoms.r is not updating # boundry cond # for i in range(atoms.ni): # if(method=='min'):i=0 # try: # DBC(atoms.s[ITR][i],atoms.p[i].Box) #need to make matrix for box # except: # print "Box not found." # if(method=='min'):break atoms.y.append(-(atoms.f-atoms.f_old)) atoms.rho.append(1/npy.vdot(atoms.y[ITR],atoms.s[ITR])) atoms.ITR += 1 else:
f1d52cfd851a7584be9609c1169d9c87bae506fb /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5735/f1d52cfd851a7584be9609c1169d9c87bae506fb/glbfgs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2235, 12, 2890, 16, 284, 4672, 9006, 273, 365, 18, 14937, 365, 18, 15834, 273, 9006, 18, 82, 7369, 17, 22, 468, 775, 30, 9006, 18, 381, 651, 468, 1335, 30, 9006, 18, 381, 651, 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, 2235, 12, 2890, 16, 284, 4672, 9006, 273, 365, 18, 14937, 365, 18, 15834, 273, 9006, 18, 82, 7369, 17, 22, 468, 775, 30, 9006, 18, 381, 651, 468, 1335, 30, 9006, 18, 381, 651, 33, ...
startstr = '(class C *const) this = ')
substrs = ['C *const) this = '])
def class_types(self): """Test 'frame variable this' when stopped on a class constructor.""" exe = os.path.join(os.getcwd(), "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
0de8ea7a099daefe35f4c0d95d064d331c66ff61 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11986/0de8ea7a099daefe35f4c0d95d064d331c66ff61/TestClassTypes.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 667, 67, 2352, 12, 2890, 4672, 3536, 4709, 296, 3789, 2190, 333, 11, 1347, 9627, 603, 279, 667, 3885, 12123, 15073, 273, 1140, 18, 803, 18, 5701, 12, 538, 18, 588, 11089, 9334, 315, 69...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 667, 67, 2352, 12, 2890, 4672, 3536, 4709, 296, 3789, 2190, 333, 11, 1347, 9627, 603, 279, 667, 3885, 12123, 15073, 273, 1140, 18, 803, 18, 5701, 12, 538, 18, 588, 11089, 9334, 315, 69...
log.info(">>>>> STARTING QUERY >>>>>")
self.log.info(">>>>> STARTING QUERY >>>>>")
def cursor_execute(self, execute, cursor, statement, parameters, context, executemany): now = time.time() try: log.info(">>>>> STARTING QUERY >>>>>") return execute(cursor, statement, parameters, context) finally: total = time.time() - now try: log.info(format_sql("Query: %s" % statement % parameters)) except TypeError: log.info(format_sql("Query: %s %s" % (statement, parameters))) log.info("<<<<< TOTAL TIME: %f <<<<<" % total)
080d913f88b76ee2e8bdf6f4daddb219a5c8e4af /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4230/080d913f88b76ee2e8bdf6f4daddb219a5c8e4af/timerproxy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3347, 67, 8837, 12, 2890, 16, 1836, 16, 3347, 16, 3021, 16, 1472, 16, 819, 16, 28743, 351, 2273, 4672, 2037, 273, 813, 18, 957, 1435, 775, 30, 365, 18, 1330, 18, 1376, 2932, 9778, 23...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3347, 67, 8837, 12, 2890, 16, 1836, 16, 3347, 16, 3021, 16, 1472, 16, 819, 16, 28743, 351, 2273, 4672, 2037, 273, 813, 18, 957, 1435, 775, 30, 365, 18, 1330, 18, 1376, 2932, 9778, 23...
print 'additional import for %s: from %s import %s' % (test.filename, p1, p2) print ' (%s): %r' % (pkg_name, test.globs[p2])
def loadTestsFromModule(self, module): if not self.matches(module.__name__): npd.log.debug("Doctest doesn't want module %s", module) return try: tests = self.finder.find(module) except AttributeError: # nose allows module.__test__ = False; doctest does not and # throws AttributeError return if not tests: return tests.sort() module_file = src(module.__file__) for test in tests: if not test.examples: continue if not test.filename: test.filename = module_file
bcaa1793226b8dab929d8ccc786c23854f5886e0 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/14925/bcaa1793226b8dab929d8ccc786c23854f5886e0/noseclasses.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1262, 14650, 1265, 3120, 12, 2890, 16, 1605, 4672, 309, 486, 365, 18, 8436, 12, 2978, 16186, 529, 972, 4672, 1130, 72, 18, 1330, 18, 4148, 2932, 3244, 299, 395, 3302, 1404, 2545, 1605, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1262, 14650, 1265, 3120, 12, 2890, 16, 1605, 4672, 309, 486, 365, 18, 8436, 12, 2978, 16186, 529, 972, 4672, 1130, 72, 18, 1330, 18, 4148, 2932, 3244, 299, 395, 3302, 1404, 2545, 1605, ...
self.fontName.set(configuredFont) if configuredFont in fonts: currentFontIndex=fonts.index(configuredFont)
lc_configuredFont = configuredFont.lower() self.fontName.set(lc_configuredFont) lc_fonts = [s.lower() for s in fonts] if lc_configuredFont in lc_fonts: currentFontIndex = lc_fonts.index(lc_configuredFont)
def LoadFontCfg(self): ##base editor font selection list fonts=list(tkFont.families(self)) fonts.sort() for font in fonts: self.listFontName.insert(END,font) configuredFont=idleConf.GetOption('main','EditorWindow','font', default='courier') self.fontName.set(configuredFont) if configuredFont in fonts: currentFontIndex=fonts.index(configuredFont) self.listFontName.see(currentFontIndex) self.listFontName.select_set(currentFontIndex) self.listFontName.select_anchor(currentFontIndex) ##font size dropdown fontSize=idleConf.GetOption('main','EditorWindow','font-size', default='12') self.optMenuFontSize.SetMenu(('7','8','9','10','11','12','13','14', '16','18','20','22'),fontSize ) ##fontWeight self.fontBold.set(idleConf.GetOption('main','EditorWindow', 'font-bold',default=0,type='bool')) ##font sample self.SetFontSample()
9a7f0a776ed190c8cf21d45d6af99e1c1e7b268c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/9a7f0a776ed190c8cf21d45d6af99e1c1e7b268c/configDialog.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4444, 5711, 8198, 12, 2890, 4672, 7541, 1969, 4858, 3512, 4421, 666, 16450, 33, 1098, 12, 16099, 5711, 18, 74, 14319, 12, 2890, 3719, 16450, 18, 3804, 1435, 364, 3512, 316, 16450, 30, 36...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4444, 5711, 8198, 12, 2890, 4672, 7541, 1969, 4858, 3512, 4421, 666, 16450, 33, 1098, 12, 16099, 5711, 18, 74, 14319, 12, 2890, 3719, 16450, 18, 3804, 1435, 364, 3512, 316, 16450, 30, 36...
def invariant_generators(self): """ Wraps Singular's invariant_algebra_reynolds and invariant_ring in finvar.lib, with help from Simon King and Martin Albrecht. Computes generators for the polynomial ring F[x1,...,xn]^G, where G in GL(n,F) is a finite matrix group. In the "good characteristic" case the polynomials returned form a minimal generating set for the algebra of G-invariant polynomials. In the "bad" case, the polynomials returned are primary and secondary invariants, forming a not necessarily minimal generating set for the algebra of G-invariant polynomials. EXAMPLES: sage: F = GF(7); MS = MatrixSpace(F,2,2) sage: gens = [MS([[0,1],[-1,0]]),MS([[1,1],[2,3]])] sage: G = MatrixGroup(gens) sage: G.invariant_generators() [x1^7*x2 - x1*x2^7, x1^12 - 2*x1^9*x2^3 - x1^6*x2^6 + 2*x1^3*x2^9 + x2^12, x1^18 + 2*x1^15*x2^3 + 3*x1^12*x2^6 + 3*x1^6*x2^12 - 2*x1^3*x2^15 + x2^18] sage: q = 4; a = 2 sage: MS = MatrixSpace(QQ, 2, 2) sage: gen1 = [[1/a,(q-1)/a],[1/a, -1/a]]; gen2 = [[1,0],[0,-1]]; gen3 = [[-1,0],[0,1]] sage: G = MatrixGroup([MS(gen1),MS(gen2),MS(gen3)]) sage: G.order() 12 sage: G.invariant_generators() [x1^2 + 3*x2^2, x1^6 + 15*x1^4*x2^2 + 15*x1^2*x2^4 + 33*x2^6] sage: F = GF(5); MS = MatrixSpace(F,2,2) sage: gens = [MS([[1,2],[-1,1]]),MS([[1,1],[-1,1]])] sage: G = MatrixGroup(gens) sage: G.invariant_generators() [x1^20 + x1^16*x2^4 + x1^12*x2^8 + x1^8*x2^12 + x1^4*x2^16 + x2^20, x1^20*x2^4 + x1^16*x2^8 + x1^12*x2^12 + x1^8*x2^16 + x1^4*x2^20] AUTHORS: David Joyner, Simon King and Martin Albrecht. REFERENCES: 1. Singular reference manual 2. B. Sturmfels, "Algorithms in invariant theory", Springer-Verlag, 1993. 3. S. King, "Minimal Generating Sets of non-modular invariant rings of finite groups", arXiv:math.AC/0703035 """ from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing from sage.interfaces.singular import singular gens = self.gens() n = len((gens[0].matrix()).rows()) F = self.base_ring() q = F.characteristic() singular.LIB("finvar.lib") VarNames=','.join(('x%s'%(i+1) for i in range(n))) R = singular.ring(q,'(%s)'%VarNames,'dp') A = [singular.matrix(n,n,str((x.matrix()).list())) for x in gens] Lgens = ','.join((x.name() for x in A)) PR = PolynomialRing(F,n,["x%s"%i for i in range(1,n+1)]) if q == 0 or (q > 0 and self.order()%q != 0): ReyName = singular._next_var_name() singular.eval('list %s=group_reynolds((%s))'%(ReyName,Lgens)) IRName = singular._next_var_name() singular.eval('matrix %s = invariant_algebra_reynolds(%s[1])'%(IRName,ReyName)) return [PR(singular(IRName+'[1,%s]'%n)) for n in range(1,1+singular('ncols('+IRName+')'))] if self.order()%q == 0: PName = singular._next_var_name() SName = singular._next_var_name() singular.eval('matrix %s,%s=invariant_ring(%s)'%(PName,SName,Lgens)) return [PR(singular(PName+'[1,%s]'%n)) for n in range(1,1+singular('ncols('+PName+')'))]+[PR(singular(SName+'[1,%s]'%n)) for n in range(2,1+singular('ncols('+SName+')'))]
def _latex_(self): r""" EXAMPLES: sage: F = GF(5); MS = MatrixSpace(F,2,2) sage: gens = [MS([[1,2],[-1,1]]),MS([[1,1],[0,1]])] sage: G = MatrixGroup(gens) sage: latex(G) \left\langle \left(\begin{array}{rr} 1 & 2 \\ 4 & 1 \end{array}\right), \left(\begin{array}{rr} 1 & 1 \\ 0 & 1 \end{array}\right) \right\rangle """ gens = ', '.join([latex(x) for x in self.gens()]) return '\\left\\langle %s \\right\\rangle'%gens
55b419924a8f997848f1d92ebc9dbc2744f4893d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/55b419924a8f997848f1d92ebc9dbc2744f4893d/matrix_group.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 26264, 67, 12, 2890, 4672, 436, 8395, 5675, 8900, 11386, 30, 272, 410, 30, 478, 273, 611, 42, 12, 25, 1769, 9238, 273, 7298, 3819, 12, 42, 16, 22, 16, 22, 13, 272, 410, 30, 31...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 26264, 67, 12, 2890, 4672, 436, 8395, 5675, 8900, 11386, 30, 272, 410, 30, 478, 273, 611, 42, 12, 25, 1769, 9238, 273, 7298, 3819, 12, 42, 16, 22, 16, 22, 13, 272, 410, 30, 31...
P1 = P[0]; P2 = P[1]
P1 = P[0] P2 = P[1] if is_Integer(P1) and is_Integer(P2): R = PolynomialRing(self.value_ring(), 'x') P1 = R(P1) P2 = R(P2) return JacobianMorphism_divisor_class_field(self, tuple([P1,P2])) if is_Integer(P1) and is_Polynomial(P2): R = PolynomialRing(self.value_ring(), 'x') P1 = R(P1) return JacobianMorphism_divisor_class_field(self, tuple([P1,P2])) if is_Integer(P2) and is_Polynomial(P1): R = PolynomialRing(self.value_ring(), 'x') P2 = R(P2) return JacobianMorphism_divisor_class_field(self, tuple([P1,P2]))
def __call__(self, P): r""" Returns a rational point P in the abstract Homset J(K), given: 0. A point P in J = Jac(C), returning P; 1. A point P on the curve C such that J = Jac(C), where C is an odd degree model, returning [P - oo]; 2. A pair of points (P, Q) on the curve C such that J = Jac(C), returning [P-Q]; 2. A list of polynomials (a,b) such that `b^2 + h*b - f = 0 mod a`, returning [(a(x),y-b(x))]. EXAMPLES:: sage: P.<x> = PolynomialRing(QQ) sage: f = x^5 - x + 1; h = x sage: C = HyperellipticCurve(f,h,'u,v') sage: P = C(0,1,1) sage: J = C.jacobian() sage: Q = J(QQ)(P) sage: for i in range(6): i*Q (1) (u, v - 1) (u^2, v + u - 1) (u^2, v + 1) (u, v + 1) (1) """ if isinstance(P,(int,long,Integer)) and P == 0: R = PolynomialRing(self.value_ring(), 'x') return JacobianMorphism_divisor_class_field(self, (R(1),R(0))) elif isinstance(P,(list,tuple)): if len(P) == 1 and P[0] == 0: R = PolynomialRing(self.value_ring(), 'x') return JacobianMorphism_divisor_class_field(self, (R(1),R(0))) elif len(P) == 2: P1 = P[0]; P2 = P[1] if is_Polynomial(P1) and is_Polynomial(P2): return JacobianMorphism_divisor_class_field(self, tuple(P)) if is_SchemeMorphism(P1) and is_SchemeMorphism(P2): return self(P1) - self(P2) raise TypeError, "Argument P (= %s) must have length 2."%P elif isinstance(P,JacobianMorphism_divisor_class_field) and self == P.parent(): return P elif is_SchemeMorphism(P): x0 = P[0]; y0 = P[1] R, x = PolynomialRing(self.value_ring(), 'x').objgen() return self((x-x0,R(y0))) raise TypeError, "Argument P (= %s) does not determine a divisor class"%P
3c7548eff8877d91a91d25ec17c295df9e019cd7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/3c7548eff8877d91a91d25ec17c295df9e019cd7/jacobian_homset.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 453, 4672, 436, 8395, 2860, 279, 436, 8371, 1634, 453, 316, 326, 8770, 670, 362, 542, 804, 12, 47, 3631, 864, 30, 225, 374, 18, 432, 1634, 453, 316, 80...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 453, 4672, 436, 8395, 2860, 279, 436, 8371, 1634, 453, 316, 326, 8770, 670, 362, 542, 804, 12, 47, 3631, 864, 30, 225, 374, 18, 432, 1634, 453, 316, 80...
cc = self.mc.chessboard_n_cols cr = self.mc.chessboard_n_rows
cc = self.board.n_cols cr = self.board.n_rows
def l2(p0, p1): return math.sqrt(sum([(c0 - c1) ** 2 for (c0, c1) in zip(p0, p1)]))
3916d801996e0c6fea3b2c413207374e214af942 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10767/3916d801996e0c6fea3b2c413207374e214af942/cameracheck.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 328, 22, 12, 84, 20, 16, 293, 21, 4672, 327, 4233, 18, 24492, 12, 1364, 3816, 12, 71, 20, 300, 276, 21, 13, 2826, 576, 364, 261, 71, 20, 16, 276, 21, 13, 316, 3144, 12, 84, 20, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 328, 22, 12, 84, 20, 16, 293, 21, 4672, 327, 4233, 18, 24492, 12, 1364, 3816, 12, 71, 20, 300, 276, 21, 13, 2826, 576, 364, 261, 71, 20, 16, 276, 21, 13, 316, 3144, 12, 84, 20, ...
round -- number of round to create variable strings for
nr -- number of round to create variable strings for
def varstrs(self, name, round, rc = None, e = None): """ Return a list of strings representing variables in self.
cd82551727ddbae04c5b28f55b59ec14654a84ab /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/cd82551727ddbae04c5b28f55b59ec14654a84ab/sr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 569, 24432, 12, 2890, 16, 508, 16, 3643, 16, 4519, 273, 599, 16, 425, 273, 599, 4672, 3536, 2000, 279, 666, 434, 2064, 5123, 3152, 316, 365, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 569, 24432, 12, 2890, 16, 508, 16, 3643, 16, 4519, 273, 599, 16, 425, 273, 599, 4672, 3536, 2000, 279, 666, 434, 2064, 5123, 3152, 316, 365, 18, 2, -100, -100, -100, -100, -100, -100, ...
Subversion's bindings use specially formatted strings to refer to objects, so by subclassing `str` we allow instances to be used directly in place of regular pools.
Instances of this type return their associated `pool when called.
def history_cb(path, rev, pool): if authz.has_permission(path): history.append((path, rev))
c9263c6155dde638ad3fc97a6ac57e24d18c7b72 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/c9263c6155dde638ad3fc97a6ac57e24d18c7b72/svn_fs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4927, 67, 7358, 12, 803, 16, 5588, 16, 2845, 4672, 309, 18686, 18, 5332, 67, 9827, 12, 803, 4672, 4927, 18, 6923, 12443, 803, 16, 5588, 3719, 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, 4927, 67, 7358, 12, 803, 16, 5588, 16, 2845, 4672, 309, 18686, 18, 5332, 67, 9827, 12, 803, 4672, 4927, 18, 6923, 12443, 803, 16, 5588, 3719, 2, -100, -100, -100, -100, -100, -100, -10...
self.SendScintilla(win32con.EM_REPLACESEL, 0, buff.buffer_info()[0]);
self.SendScintilla(SCI_REPLACESEL, 0, buff.buffer_info()[0]);
def ReplaceSel(self, str): buff = array.array('c', str + "\0") self.SendScintilla(win32con.EM_REPLACESEL, 0, buff.buffer_info()[0]); buff = None
5f8118f1d956052ce1a5d2a5ce41dcb4e8be3bcb /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/677/5f8118f1d956052ce1a5d2a5ce41dcb4e8be3bcb/control.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6910, 1877, 12, 2890, 16, 609, 4672, 6139, 273, 526, 18, 1126, 2668, 71, 2187, 609, 397, 1548, 20, 7923, 365, 18, 3826, 1541, 474, 10745, 12, 2312, 45, 67, 21726, 1090, 48, 16, 374, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6910, 1877, 12, 2890, 16, 609, 4672, 6139, 273, 526, 18, 1126, 2668, 71, 2187, 609, 397, 1548, 20, 7923, 365, 18, 3826, 1541, 474, 10745, 12, 2312, 45, 67, 21726, 1090, 48, 16, 374, ...
return ret
return ret
def _wordinfoget(self, word): ret = self.wordinfo.get(word) if not ret: r = self.db.get(word) if r: ret = self.WordInfoClass() ret.__setstate__(r) self.wordinfo[word] = ret return ret
30b0b12c7d9195252665961bd6f5b3c9ccc6946a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9857/30b0b12c7d9195252665961bd6f5b3c9ccc6946a/storage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1095, 1376, 588, 12, 2890, 16, 2076, 4672, 325, 273, 365, 18, 1095, 1376, 18, 588, 12, 1095, 13, 309, 486, 325, 30, 436, 273, 365, 18, 1966, 18, 588, 12, 1095, 13, 309, 436, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1095, 1376, 588, 12, 2890, 16, 2076, 4672, 325, 273, 365, 18, 1095, 1376, 18, 588, 12, 1095, 13, 309, 486, 325, 30, 436, 273, 365, 18, 1966, 18, 588, 12, 1095, 13, 309, 436, 3...
s += '(' + `co.co_consts[oparg]` + ')'
s += '(' + `co.co_consts_w[oparg]` + ')'
def reprargstring(self): """ return a string representation of any arguments. (empty for no args)""" oparg = self.oparg if oparg is None: return '' co = self.disresult.code op = self.op s = repr(oparg).rjust(5) + " " if op in hasconst: s += '(' + `co.co_consts[oparg]` + ')' elif op in hasname: s += '(' + co.co_names[oparg] + ')' elif op in hasjrel: s += '(to ' + repr(self.index + oparg) + ')' elif op in haslocal: s += '(' + co.co_varnames[oparg] + ')' elif op in hascompare: s += '(' + cmp_op[oparg] + ')' elif op in hasfree: #if free is None: free = co.co_cellvars + co.co_freevars s += '(' + free[oparg] + ')' return s
8ea78f1ef4bc4add1052310aa048d639cdad5a57 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/8ea78f1ef4bc4add1052310aa048d639cdad5a57/pydis.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8480, 1968, 371, 12, 2890, 4672, 3536, 327, 279, 533, 4335, 434, 1281, 1775, 18, 261, 5531, 364, 1158, 833, 15574, 1061, 3175, 273, 365, 18, 556, 3175, 309, 1061, 3175, 353, 599, 30, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8480, 1968, 371, 12, 2890, 4672, 3536, 327, 279, 533, 4335, 434, 1281, 1775, 18, 261, 5531, 364, 1158, 833, 15574, 1061, 3175, 273, 365, 18, 556, 3175, 309, 1061, 3175, 353, 599, 30, 3...
restore_laser() set_tilt_profile([0.0, 0.0], [0.0, 1.0])
restore_laser() set_tilt_profile([0.0, 0.0], [0.0, 1.0])
def on_shutdown(): restore_laser() set_tilt_profile([0.0, 0.0], [0.0, 1.0])
122c6f7455ce682a4e43ae2b05805de7bdb5d781 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9426/122c6f7455ce682a4e43ae2b05805de7bdb5d781/pr2_move_base.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 15132, 13332, 5217, 67, 9521, 264, 1435, 444, 67, 29419, 67, 5040, 3816, 20, 18, 20, 16, 374, 18, 20, 6487, 306, 20, 18, 20, 16, 404, 18, 20, 5717, 225, 2, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 603, 67, 15132, 13332, 5217, 67, 9521, 264, 1435, 444, 67, 29419, 67, 5040, 3816, 20, 18, 20, 16, 374, 18, 20, 6487, 306, 20, 18, 20, 16, 404, 18, 20, 5717, 225, 2, -100, -100, -10...
for ev in instr.events: if (ev.file!=None) and (not os.path.exists(ev.file)) and (not ev.file in unknownfiles): unknownfiles.append(ev.file) if len(unknownfiles)>0 or len(unknownimages)>0:
for event in instr.events: if (event.file!=None) and (not os.path.exists(event.file)) and (not event.file in unknownfiles): unknownfiles.append(event.file) if len(unknownfiles) > 0 or len(unknownimages) > 0:
def ValidateProject(self): """ Checks that the project is valid - i.e. that of the files and images that it references can be found.
e2b4f4a534dc5054c26a7ac44730cd6e0c158de4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10033/e2b4f4a534dc5054c26a7ac44730cd6e0c158de4/Project.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3554, 4109, 12, 2890, 4672, 3536, 13074, 716, 326, 1984, 353, 923, 300, 277, 18, 73, 18, 716, 434, 326, 1390, 471, 4602, 716, 518, 5351, 848, 506, 1392, 18, 2, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3554, 4109, 12, 2890, 4672, 3536, 13074, 716, 326, 1984, 353, 923, 300, 277, 18, 73, 18, 716, 434, 326, 1390, 471, 4602, 716, 518, 5351, 848, 506, 1392, 18, 2, -100, -100, -100, -100, ...
def pathstrip(path, strip): pathlen = len(path) i = 0 if strip == 0: return '', path.rstrip() count = strip while count > 0: i = path.find('/', i) if i == -1: raise PatchError(_("unable to strip away %d of %d dirs from %s") % (count, strip, path)) i += 1 while i < pathlen - 1 and path[i] == '/': i += 1 count -= 1 return path[:i].lstrip(), path[i:].rstrip()
def pathstrip(path, strip): pathlen = len(path) i = 0 if strip == 0: return '', path.rstrip() count = strip while count > 0: i = path.find('/', i) if i == -1: raise PatchError(_("unable to strip away %d of %d dirs from %s") % (count, strip, path)) i += 1 # consume '//' in the path while i < pathlen - 1 and path[i] == '/': i += 1 count -= 1 return path[:i].lstrip(), path[i:].rstrip()
0fecf29716c2fd64456160d6c83971ec2677ae6a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11312/0fecf29716c2fd64456160d6c83971ec2677ae6a/patch.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 589, 6406, 12, 803, 16, 2569, 4672, 589, 1897, 273, 562, 12, 803, 13, 277, 273, 374, 309, 2569, 422, 374, 30, 327, 10226, 589, 18, 86, 6406, 1435, 1056, 273, 2569, 1323, 1056, 405, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 589, 6406, 12, 803, 16, 2569, 4672, 589, 1897, 273, 562, 12, 803, 13, 277, 273, 374, 309, 2569, 422, 374, 30, 327, 10226, 589, 18, 86, 6406, 1435, 1056, 273, 2569, 1323, 1056, 405, 3...
self.re_assign = re.compile(r'([^<|^!|^>])\s*(=+)\s*')
self.re_assign = re.compile(r'(\S+[^<|^!|^>])\s*(=+)\s*(\S+)')
def __init__(self, name): self.output = open(name, "w") self.prev_line = ''
8373f7b2a6666c9bb3bf966d4dc7a0cc8567d40a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9982/8373f7b2a6666c9bb3bf966d4dc7a0cc8567d40a/pp.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 508, 4672, 365, 18, 2844, 273, 1696, 12, 529, 16, 315, 91, 7923, 365, 18, 10001, 67, 1369, 273, 875, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 508, 4672, 365, 18, 2844, 273, 1696, 12, 529, 16, 315, 91, 7923, 365, 18, 10001, 67, 1369, 273, 875, 2, -100, -100, -100, -100, -100, -100, -100, -100, ...
"arg_count, 1, sizeof(%s), %d)) {\n" %
"immediate_data_size, 1, sizeof(%s), %d)) {\n" %
def WriteImmediateValidationCode(self, func, file): """Overrriden from TypeHandler.""" file.Write(" if (!CheckImmediateDataSize<%s>(" "arg_count, 1, sizeof(%s), %d)) {\n" % (func.name, func.info.data_type, func.info.count)) file.Write(" return parse_error::kParseOutOfBounds;\n") file.Write(" }\n")
3975916c448229deb7fa73586d80d6aebe8671fa /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5060/3975916c448229deb7fa73586d80d6aebe8671fa/build_gles2_cmd_buffer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2598, 22651, 4354, 1085, 12, 2890, 16, 1326, 16, 585, 4672, 3536, 22042, 1691, 275, 628, 1412, 1503, 12123, 585, 18, 3067, 2932, 225, 309, 16051, 1564, 22651, 29414, 32, 9, 87, 34, 2932,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2598, 22651, 4354, 1085, 12, 2890, 16, 1326, 16, 585, 4672, 3536, 22042, 1691, 275, 628, 1412, 1503, 12123, 585, 18, 3067, 2932, 225, 309, 16051, 1564, 22651, 29414, 32, 9, 87, 34, 2932,...
if lot.bord_vnd_id.tax_id:
if lot.author_right:
def compute_buyer_costs(self, cr, uid, ids): amount_total = {} lots = self.browse(cr, uid, ids)
b91faa7f89ba1d7a30b53fb44aa73fd4b8f32aad /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7339/b91faa7f89ba1d7a30b53fb44aa73fd4b8f32aad/auction.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3671, 67, 70, 16213, 67, 12398, 87, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 4672, 3844, 67, 4963, 273, 2618, 328, 6968, 273, 365, 18, 25731, 12, 3353, 16, 4555, 16, 3258, 13, 2, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 70, 16213, 67, 12398, 87, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 4672, 3844, 67, 4963, 273, 2618, 328, 6968, 273, 365, 18, 25731, 12, 3353, 16, 4555, 16, 3258, 13, 2, -100...
etree.parse(fp)
etree.parse(fp, parser=parser)
def xml(self, cmd, **kwargs): # NOTE: darcs is currently encoding agnostic and will print # patch metadata byte-for-byte, even in the XML changelog. etree = ElementTree() fp = self._run(cmd, **kwargs) etree.parse(fp) self.checkexit(fp.close()) return etree.getroot()
b005c4b531de8b6dfee3883e6adc879d5cde8077 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11312/b005c4b531de8b6dfee3883e6adc879d5cde8077/darcs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2025, 12, 2890, 16, 1797, 16, 2826, 4333, 4672, 468, 5219, 30, 302, 297, 2143, 353, 4551, 2688, 279, 1600, 669, 335, 471, 903, 1172, 468, 4729, 1982, 1160, 17, 1884, 17, 7229, 16, 5456...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2025, 12, 2890, 16, 1797, 16, 2826, 4333, 4672, 468, 5219, 30, 302, 297, 2143, 353, 4551, 2688, 279, 1600, 669, 335, 471, 903, 1172, 468, 4729, 1982, 1160, 17, 1884, 17, 7229, 16, 5456...
prefix = ''
prefix = ''
def visit_image(self, node): """ Need to intervene in the case of inline images. We need MoinMoin to give us the actual src line to the image and then we can feed this to the default html4css1 writer. NOTE: Since the writer can't "open" this image the scale attribute doesn't work without directly specifying the height or width (or both).
3f473347735fdabda7d5d4043a84471e4233f689 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/888/3f473347735fdabda7d5d4043a84471e4233f689/rst.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3757, 67, 2730, 12, 2890, 16, 756, 4672, 3536, 12324, 358, 1554, 3995, 73, 316, 326, 648, 434, 6370, 4602, 18, 1660, 1608, 490, 885, 49, 885, 358, 8492, 584, 326, 3214, 1705, 980, 358,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3757, 67, 2730, 12, 2890, 16, 756, 4672, 3536, 12324, 358, 1554, 3995, 73, 316, 326, 648, 434, 6370, 4602, 18, 1660, 1608, 490, 885, 49, 885, 358, 8492, 584, 326, 3214, 1705, 980, 358,...
myatoi = string.atoi list = string.split(s, '%')
myatoi = int list = s.split('%')
def unquote(s): """unquote('abc%20def') -> 'abc def'.""" mychr = chr myatoi = string.atoi list = string.split(s, '%') res = [list[0]] myappend = res.append del list[0] for item in list: if item[1:2]: try: myappend(mychr(myatoi(item[:2], 16)) + item[2:]) except: myappend('%' + item) else: myappend('%' + item) return string.join(res, "")
2a3596c7d04c9635576a712f85db07ce4de4bff2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2a3596c7d04c9635576a712f85db07ce4de4bff2/urllib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 25611, 12, 87, 4672, 3536, 318, 6889, 2668, 18947, 9, 3462, 536, 6134, 317, 296, 18947, 1652, 11, 12123, 3399, 15182, 273, 4513, 3399, 270, 11359, 273, 509, 666, 273, 272, 18, 4939, 2990...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 25611, 12, 87, 4672, 3536, 318, 6889, 2668, 18947, 9, 3462, 536, 6134, 317, 296, 18947, 1652, 11, 12123, 3399, 15182, 273, 4513, 3399, 270, 11359, 273, 509, 666, 273, 272, 18, 4939, 2990...
try: old_svn_rev = get_svn_revision(self.svn_dir) except: old_svn_rev = -1
def fetch_pjsip_from_svn(self): self.svn_dir = os.path.join(self.pjsip_build_dir or self.build_temp, "pjsip") try: old_svn_rev = get_svn_revision(self.svn_dir) except: old_svn_rev = -1 if not os.path.exists(self.svn_dir): log.info("Fetching PJSIP from SVN repository") distutils_exec_process(["svn", "co", "-r", self.pjsip_svn_revision, self.pjsip_svn_repo, self.svn_dir], True, input='t\n') else: log.info("PJSIP SVN tree found, updating from SVN repository") try: distutils_exec_process(["svn", "up", "-r", self.pjsip_svn_revision, self.svn_dir], True, input='t\n') except DistutilsError, e: log.info("Error updating PJSIP from SVN, continuing with existing tree:") log.info(str(e)) new_svn_rev = get_svn_revision(self.svn_dir) print "Using SVN revision %d" % new_svn_rev return old_svn_rev != new_svn_rev
f66921d569d7c76a2b9f8a45d57c79e901d90df7 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5703/f66921d569d7c76a2b9f8a45d57c79e901d90df7/setup_pjsip.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2158, 67, 84, 2924, 625, 67, 2080, 67, 31505, 12, 2890, 4672, 365, 18, 31505, 67, 1214, 273, 1140, 18, 803, 18, 5701, 12, 2890, 18, 84, 2924, 625, 67, 3510, 67, 1214, 578, 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, 2158, 67, 84, 2924, 625, 67, 2080, 67, 31505, 12, 2890, 4672, 365, 18, 31505, 67, 1214, 273, 1140, 18, 803, 18, 5701, 12, 2890, 18, 84, 2924, 625, 67, 3510, 67, 1214, 578, 365, 18, ...
print cherrypy.config print application.config
def index(self): raise cherrypy.InternalRedirect('/slides/list')
b4fc62a81882e9df648f35f5624c4f608efa50ca /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/364/b4fc62a81882e9df648f35f5624c4f608efa50ca/web.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 770, 12, 2890, 4672, 1002, 462, 370, 28398, 18, 3061, 5961, 2668, 19, 2069, 4369, 19, 1098, 6134, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 770, 12, 2890, 4672, 1002, 462, 370, 28398, 18, 3061, 5961, 2668, 19, 2069, 4369, 19, 1098, 6134, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
order, e.g. 'A Name', 'Second', 'a lower case name', 'one more'].
order, e.g. ['A Name', 'Second', 'a lower case name', 'one more'].
def list_directory(self, path, pattern=None, pattern_type='simple', absolute=False): """Returns items from a directory, optionally filtered with `pattern`. File and directory names are returned in case-sensitive alphabetical order, e.g. 'A Name', 'Second', 'a lower case name', 'one more']. Implicit directories '.' and '..' are not returned. The returned items are automatically logged. By default, the file and directory names are returned relative to the given path (e.g. 'file.txt'). If you want them be returned in the absolute format (e.g. '/home/robot/file.txt'), set the `absolute` argument value to 'True', 'Yes' or 'absolute' (case-insensitive). If no `pattern` is given, all item names are returned. If `pattern` is given, only names matching it are returned. `pattern_type` defines how the given pattern is interpreted, as explained below. - If `pattern_type` contains the string 'simple' (case-insensitive), the `pattern` is considered a simple pattern and items returned only if they match it. This is the default. (1) - If `pattern_type` contains either the string 'regular expression' or 'regexp' (case-insensitive), the `pattern` is considered a regular expression and only items matching it returned. (2) - Otherwise the pattern is considered a literal string and items returned, if they contain the string. 1) Simple pattern matching is similar as matching files in a shell, and it is always case-sensitive. The special characters are listed below. '*' - matches everything '?' - matches any single character '[chars]' - matches any character inside square brackets (e.g. '[abc]' matches either 'a', 'b' or 'c') '[!chars]' - matches any character not inside square brackets Simple pattern matching is implemented using the Python 'fnmatch' module's 'fnmatchcase' method. For more information, see its documentation at http://docs.python.org/lib/module-fnmatch.html. 2) Regular expression check is done using the Python 're' module, which has a pattern syntax derived from Perl and thus also very similar to the one in Java. See the following documents for more details about regexps in general and their Python implementation in particular. 're' Module Documentation: http://docs.python.org/lib/module-re.html Regular Expression HOWTO: http://www.amk.ca/python/howto/regex/ Note that if you want to use flags (e.g. re.IGNORECASE), you have to embed them into the pattern (e.g. '(?i)pattern'). Note also that a backslash is an escape character in Robot Framework test data, and possible backslashes in patterns must thus be escaped with another backslash (e.g. '\\\\d\\\\w+'). """ items = self._list_dir(path, pattern, pattern_type, absolute) for item in items: self._info(item) return items
a2152145a7e713b7a988a154a7b296b361d56338 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6988/a2152145a7e713b7a988a154a7b296b361d56338/OperatingSystem.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 666, 67, 5149, 12, 2890, 16, 589, 16, 1936, 33, 7036, 16, 1936, 67, 723, 2218, 9647, 2187, 4967, 33, 8381, 4672, 3536, 1356, 1516, 628, 279, 1867, 16, 8771, 5105, 598, 1375, 4951, 8338...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 5149, 12, 2890, 16, 589, 16, 1936, 33, 7036, 16, 1936, 67, 723, 2218, 9647, 2187, 4967, 33, 8381, 4672, 3536, 1356, 1516, 628, 279, 1867, 16, 8771, 5105, 598, 1375, 4951, 8338...
self.__set_field('log', value)
self._set_field('log', value)
def set_log(self, value, backup = False): self.__set_field('log', value) self.__update_log_ref(value)
8fe7e9f08ae6fe49cec66a8034e8495cbf77c6f3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12366/8fe7e9f08ae6fe49cec66a8034e8495cbf77c6f3/stack.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 1330, 12, 2890, 16, 460, 16, 5114, 273, 1083, 4672, 365, 6315, 542, 67, 1518, 2668, 1330, 2187, 460, 13, 365, 16186, 2725, 67, 1330, 67, 1734, 12, 1132, 13, 2, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 1330, 12, 2890, 16, 460, 16, 5114, 273, 1083, 4672, 365, 6315, 542, 67, 1518, 2668, 1330, 2187, 460, 13, 365, 16186, 2725, 67, 1330, 67, 1734, 12, 1132, 13, 2, -100, -100, -...
include_dirs = [os.path.join(python_inc, "python-evas")]
def pkgconfig(*packages, **kw): flag_map = {'-I': 'include_dirs', '-L': 'library_dirs', '-l': 'libraries'} pkgs = ' '.join(packages) cmdline = 'pkg-config --libs --cflags %s' % pkgs status, output = commands.getstatusoutput(cmdline) if status != 0: raise ValueError("could not find pkg-config module: %s" % pkgs) for token in output.split(): kw.setdefault(flag_map.get(token[:2]), []).append(token[2:]) return kw
baa097a382a284a8099c74596d31b6767f0eb318 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12343/baa097a382a284a8099c74596d31b6767f0eb318/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3475, 1425, 30857, 10308, 16, 2826, 9987, 4672, 2982, 67, 1458, 273, 13666, 17, 45, 4278, 296, 6702, 67, 8291, 2187, 2400, 48, 4278, 296, 12083, 67, 8291, 2187, 2400, 80, 4278, 296, 3141...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3475, 1425, 30857, 10308, 16, 2826, 9987, 4672, 2982, 67, 1458, 273, 13666, 17, 45, 4278, 296, 6702, 67, 8291, 2187, 2400, 48, 4278, 296, 12083, 67, 8291, 2187, 2400, 80, 4278, 296, 3141...
f.write('\t"imageUrl" : "'+levels[curLevel]+"/"+baseFileName+".jpg"+'",\n')
if (specialx64 == None): f.write('\t"imageUrl" : "'+levels[curLevel]+"/"+baseFileName+".jpg"+'",\n')
def writeTile(imgName, polys, curLevel, i,j, f): """Write the tile info in the file f""" baseFileName = imgName+"_%.2d_%.2d_" % (i,j) +levels[curLevel] wcs=astWCS.WCS(levels[curLevel]+"/"+baseFileName+".hhh") f.write('{\n') if curLevel==0: f.write('\t"credits" : "Copyright (C) 2008 Brian McLean, STScI Digitized Sky Survey",\n') f.write('\t"infoUrl" : "http://stdatu.stsci.edu/cgi-bin/dss_form",\n') naxis1 = wcs.header.get('NAXIS1') naxis2 = wcs.header.get('NAXIS2') f.write('\t"imageUrl" : "'+levels[curLevel]+"/"+baseFileName+".jpg"+'",\n') writePolys(polys, wcs, f) pos10 = wcs.pix2wcs(1,0) pos01 = wcs.pix2wcs(0,1) pos0 = wcs.pix2wcs(0,0) f.write('\t"minResolution" : %f' % max(abs(pos10[0]-pos0[0]), abs(pos01[1]-pos0[1]))) if curLevel<len(levels)-1: f.write(',\n') f.write('\t"subTiles" :\n\t[\n') if curLevel%2==0: if getIntersectPoly(baseFileName, curLevel+1, 2*i, 2*j)!=None: f.write('\t\t"'+imgName+"_%.2d_%.2d_" % (2*i,2*j) +levels[curLevel+1]+'.json",\n') if getIntersectPoly(baseFileName, curLevel+1, 2*i+1, 2*j)!=None: f.write('\t\t"'+imgName+"_%.2d_%.2d_" % (2*i+1,2*j) +levels[curLevel+1]+'.json",\n') if getIntersectPoly(baseFileName, curLevel+1, 2*i+1, 2*j+1)!=None: f.write('\t\t"'+imgName+"_%.2d_%.2d_" % (2*i+1,2*j+1) +levels[curLevel+1]+'.json",\n') if getIntersectPoly(baseFileName, curLevel+1, 2*i, 2*j+1)!=None: f.write('\t\t"'+imgName+"_%.2d_%.2d_" % (2*i,2*j+1) +levels[curLevel+1]+'.json",\n') else: polys2 = getIntersectPoly(baseFileName, curLevel+1, 2*i, 2*j) if polys2!=None: writeTile(imgName, polys2, curLevel+1, 2*i,2*j, f) f.write(",\n") polys2 = getIntersectPoly(baseFileName, curLevel+1, 2*i+1, 2*j) if polys2!=None: writeTile(imgName, polys2, curLevel+1, 2*i+1,2*j, f) f.write(",\n") polys2 = getIntersectPoly(baseFileName, curLevel+1, 2*i+1, 2*j+1) if polys2!=None: writeTile(imgName, polys2, curLevel+1, 2*i+1,2*j+1, f) f.write(",\n") polys2 = getIntersectPoly(baseFileName, curLevel+1, 2*i, 2*j+1) if polys2!=None: writeTile(imgName, polys2, curLevel+1, 2*i,2*j+1, f) f.write(",\n") f.seek(-2, os.SEEK_CUR) f.write('\n\t]\n') else: f.write('\n') f.write('}')
24efca606fc152cb442e933ed3ac644aee5a1ba4 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7604/24efca606fc152cb442e933ed3ac644aee5a1ba4/dssheaderToJSON.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 9337, 12, 6081, 461, 16, 2952, 1900, 16, 662, 2355, 16, 277, 16, 78, 16, 284, 4672, 3536, 3067, 326, 4769, 1123, 316, 326, 585, 284, 8395, 1026, 4771, 273, 3774, 461, 9078, 10185...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 9337, 12, 6081, 461, 16, 2952, 1900, 16, 662, 2355, 16, 277, 16, 78, 16, 284, 4672, 3536, 3067, 326, 4769, 1123, 316, 326, 585, 284, 8395, 1026, 4771, 273, 3774, 461, 9078, 10185...
if s[end] == ' ':
if s[end] in string.whitespace:
def split_quoted (s): """Split a string up according to Unix shell-like rules for quotes and backslashes. In short: words are delimited by spaces, as long as those spaces are not escaped by a backslash, or inside a quoted string. Single and double quotes are equivalent, and the quote characters can be backslash-escaped. The backslash is stripped from any two-character escape sequence, leaving only the escaped character. The quote characters are stripped from any quoted string. Returns a list of words. """ # This is a nice algorithm for splitting up a single string, since it # doesn't require character-by-character examination. It was a little # bit of a brain-bender to get it working right, though... s = string.strip(s) words = [] pos = 0 while s: m = _wordchars_re.match(s, pos) end = m.end() if end == len(s): words.append(s[:end]) break if s[end] == ' ': # unescaped, unquoted space: now words.append(s[:end]) # we definitely have a word delimiter s = string.lstrip(s[end:]) pos = 0 elif s[end] == '\\': # preserve whatever is being escaped; # will become part of the current word s = s[:end] + s[end+1:] pos = end+1 else: if s[end] == "'": # slurp singly-quoted string m = _squote_re.match(s, end) elif s[end] == '"': # slurp doubly-quoted string m = _dquote_re.match(s, end) else: raise RuntimeError, \ "this can't happen (bad char '%c')" % s[end] if m is None: raise ValueError, \ "bad string (mismatched %s quotes?)" % s[end] (beg, end) = m.span() s = s[:beg] + s[beg+1:end-1] + s[end:] pos = m.end() - 2 if pos >= len(s): words.append(s) break return words
6fbfe8b89b393c2b12ccbaffdb9baa355884d19c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/6fbfe8b89b393c2b12ccbaffdb9baa355884d19c/util.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1416, 67, 15179, 261, 87, 4672, 3536, 5521, 279, 533, 731, 4888, 358, 9480, 5972, 17, 5625, 2931, 364, 10681, 471, 1473, 13675, 18, 225, 657, 3025, 30, 4511, 854, 18609, 635, 7292, 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, 1416, 67, 15179, 261, 87, 4672, 3536, 5521, 279, 533, 731, 4888, 358, 9480, 5972, 17, 5625, 2931, 364, 10681, 471, 1473, 13675, 18, 225, 657, 3025, 30, 4511, 854, 18609, 635, 7292, 16, ...
color:
color:
def css(color='default'): r""" Return the CSS header used by the SAGE Notebook. INPUT: color -- string or pair of html colors, e.g., 'gmail' 'grey' \code{('#ff0000', '#0000ff')} EXAMPLES: sage: import sage.server.notebook.css as c sage: type(c.css()) <type 'str'> """ s = r"""
bfe748ad41bd04bbc56623b01251298d4ae7ebe5 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/bfe748ad41bd04bbc56623b01251298d4ae7ebe5/css.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3747, 12, 3266, 2218, 1886, 11, 4672, 436, 8395, 2000, 326, 6765, 1446, 1399, 635, 326, 348, 2833, 3609, 3618, 18, 225, 12943, 30, 2036, 1493, 533, 578, 3082, 434, 1729, 5740, 16, 425, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3747, 12, 3266, 2218, 1886, 11, 4672, 436, 8395, 2000, 326, 6765, 1446, 1399, 635, 326, 348, 2833, 3609, 3618, 18, 225, 12943, 30, 2036, 1493, 533, 578, 3082, 434, 1729, 5740, 16, 425, ...
The names 'default' and 'default-push' have a special meaning. They are the locations used when pulling and pushing respectively unless a location is specified. When cloning a repository, the clone source is written as 'default' in .hg/hgrc.
The path names ``default`` and ``default-push`` have a special meaning. When performing a push or pull operation, they are used as fallbacks if no location is specified on the command-line. When ``default-push`` is set, it will be used for push and ``default`` will be used for pull; otherwise ``default`` is used as the fallback for both. When cloning a repository, the clone source is written as ``default`` in ``.hg/hgrc``. Note that ``default`` and ``default-push`` apply to all inbound (e.g. ``hg incoming``) and outbound (e.g. ``hg outgoing``, ``hg email`` and ``hg bundle``) operations.
def paths(ui, repo, search=None): """show aliases for remote repositories Show definition of symbolic path name NAME. If no name is given, show definition of all available names. Path names are defined in the [paths] section of /etc/mercurial/hgrc and $HOME/.hgrc. If run inside a repository, .hg/hgrc is used, too. The names 'default' and 'default-push' have a special meaning. They are the locations used when pulling and pushing respectively unless a location is specified. When cloning a repository, the clone source is written as 'default' in .hg/hgrc. See 'hg help urls' for more information. """ if search: for name, path in ui.configitems("paths"): if name == search: ui.write("%s\n" % url.hidepassword(path)) return ui.warn(_("not found!\n")) return 1 else: for name, path in ui.configitems("paths"): ui.write("%s = %s\n" % (name, url.hidepassword(path)))
e87140580c177b111e376b6eaef73e6466ffb700 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11312/e87140580c177b111e376b6eaef73e6466ffb700/commands.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2953, 12, 4881, 16, 3538, 16, 1623, 33, 7036, 4672, 3536, 4500, 6900, 364, 2632, 14531, 225, 9674, 2379, 434, 16754, 589, 508, 6048, 18, 971, 1158, 508, 353, 864, 16, 2405, 2379, 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, 2953, 12, 4881, 16, 3538, 16, 1623, 33, 7036, 4672, 3536, 4500, 6900, 364, 2632, 14531, 225, 9674, 2379, 434, 16754, 589, 508, 6048, 18, 971, 1158, 508, 353, 864, 16, 2405, 2379, 434, ...
- list of strings (unit names)
- list of strings (unit names)
def vars_in_str(s): """ Given a string like 'mass/(length*time)', return the list ['mass', 'length', 'time']. INPUT: - `s` -- string OUTPUT: - list of strings (unit names) EXAMPLES:: sage: sage.symbolic.units.vars_in_str('mass/(length*time)') ['mass', 'length', 'time'] """ return re.findall('[a-z|_]+', s)
ed891e5784edd8a5e4d544f1ef837edc82b93924 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/ed891e5784edd8a5e4d544f1ef837edc82b93924/units.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4153, 67, 267, 67, 701, 12, 87, 4672, 3536, 16803, 279, 533, 3007, 296, 10424, 19, 12, 2469, 14, 957, 13, 2187, 327, 326, 666, 10228, 10424, 2187, 296, 2469, 2187, 296, 957, 29489, 225...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4153, 67, 267, 67, 701, 12, 87, 4672, 3536, 16803, 279, 533, 3007, 296, 10424, 19, 12, 2469, 14, 957, 13, 2187, 327, 326, 666, 10228, 10424, 2187, 296, 2469, 2187, 296, 957, 29489, 225...
edges += self.incoming return [edge.other_end(self) for edge in edges]
edges += self.incoming adjacent = [] seen = set() for edge in edges: if edge not in seen: adjacent.append(edge.end) seen.add(edge) return adjacent
def get_adjacent(self, outgoing=True, incoming=False): """Returns a list of all adjacent nodes.""" edges = [] if outgoing: edges += self.outgoing if incoming: edges += self.incoming return [edge.other_end(self) for edge in edges]
2fb21e12bb5f17eaca727c9d781cb252f37e6507 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3401/2fb21e12bb5f17eaca727c9d781cb252f37e6507/base.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 13829, 25897, 12, 2890, 16, 12902, 33, 5510, 16, 6935, 33, 8381, 4672, 3536, 1356, 279, 666, 434, 777, 16335, 2199, 12123, 5231, 273, 5378, 309, 12902, 30, 5231, 1011, 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, 336, 67, 13829, 25897, 12, 2890, 16, 12902, 33, 5510, 16, 6935, 33, 8381, 4672, 3536, 1356, 279, 666, 434, 777, 16335, 2199, 12123, 5231, 273, 5378, 309, 12902, 30, 5231, 1011, 365, 18, ...
return
return 0, 0
def write_results_file(self, path, lines, lnotab, lines_hit): """Return a coverage results file in path."""
bbca8da3ca5191d68c4cd8777b8ba8632c0cff44 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/bbca8da3ca5191d68c4cd8777b8ba8632c0cff44/trace.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 67, 4717, 67, 768, 12, 2890, 16, 589, 16, 2362, 16, 328, 902, 378, 16, 2362, 67, 15989, 4672, 3536, 990, 279, 11196, 1686, 585, 316, 589, 12123, 2, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 67, 4717, 67, 768, 12, 2890, 16, 589, 16, 2362, 16, 328, 902, 378, 16, 2362, 67, 15989, 4672, 3536, 990, 279, 11196, 1686, 585, 316, 589, 12123, 2, -100, -100, -100, -100, -100, ...
for i in chars: output += i
for line in lines: if len(line) > length: chars = [] words = line.split(' ') if len(words) == 1: pass else: pass for i in line: chars.append(i) extras = len(chars)/length for i in range(0, len(chars)+extras, length): chars.insert(i, '\n') for i in chars: output += i else: output += line
def forcewrap(value, arg): """ Inserts newline characters every so many characters. This filter is dumb and inserts newlines unintelligently. Argument: Number of characters to insert a newline after """ from django.utils.encoding import force_unicode try: length = int(arg) except ValueError: return value chars = [] # List of chars for i in range(len(value)): # Put the chars into a list chars.append(value[i]) extras = len(chars)/length # compute how many newlines will be inserted into the string for i in range(0, len(chars)+extras, length): # Insert newlines chars.insert(i, '\n') output = "" for i in chars: # rebuild a string from the list of chars. output += i return output
04a717d21fd690d33b7de3173c22873ee90d6b81 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5838/04a717d21fd690d33b7de3173c22873ee90d6b81/imageboard_extras.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2944, 4113, 12, 1132, 16, 1501, 4672, 3536, 8040, 87, 9472, 3949, 3614, 1427, 4906, 3949, 18, 1220, 1034, 353, 302, 3592, 471, 15607, 19181, 640, 474, 1165, 360, 23351, 18, 225, 5067, 30...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2944, 4113, 12, 1132, 16, 1501, 4672, 3536, 8040, 87, 9472, 3949, 3614, 1427, 4906, 3949, 18, 1220, 1034, 353, 302, 3592, 471, 15607, 19181, 640, 474, 1165, 360, 23351, 18, 225, 5067, 30...
query_data = [ { 'canned_query': 'open', } ]
query_objs = gt.googlequery_set.all() query_data = [] for query_obj in query_objs: one_query = { 'max_results': 10000, 'canned_query': 'open', 'label': query_obj.label } query_data.append(one_query)
def generate_current_bug_atom(self): query_data = [ { 'canned_query': 'open', } ] queries = [] for kwargs in query_data: queries.append(create_google_query(**kwargs)) return self.generate_bug_atom_from_queries(queries)
c53d4d553834745e957284827686c8ef406b8af3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11976/c53d4d553834745e957284827686c8ef406b8af3/google.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 67, 2972, 67, 925, 67, 7466, 12, 2890, 4672, 843, 67, 18093, 273, 9879, 18, 9536, 2271, 67, 542, 18, 454, 1435, 843, 67, 892, 273, 5378, 364, 843, 67, 2603, 316, 843, 67, 18093...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 67, 2972, 67, 925, 67, 7466, 12, 2890, 4672, 843, 67, 18093, 273, 9879, 18, 9536, 2271, 67, 542, 18, 454, 1435, 843, 67, 892, 273, 5378, 364, 843, 67, 2603, 316, 843, 67, 18093...
item = yield inner, lookup
item = yield collect_inner, lookup
def _collect(_inner, ip): lookup = self.whois.lookup(ip) try: while not lookup.was_source: item = yield inner, lookup except: channel.rethrow() else: channel.send(ip, item)
a3445adbfc335f066cc3fdeb24153538018edddc /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/14361/a3445adbfc335f066cc3fdeb24153538018edddc/whois.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 14676, 24899, 7872, 16, 2359, 4672, 3689, 273, 365, 18, 3350, 19606, 18, 8664, 12, 625, 13, 775, 30, 1323, 486, 3689, 18, 17416, 67, 3168, 30, 761, 273, 2824, 3274, 67, 7872, 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, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 14676, 24899, 7872, 16, 2359, 4672, 3689, 273, 365, 18, 3350, 19606, 18, 8664, 12, 625, 13, 775, 30, 1323, 486, 3689, 18, 17416, 67, 3168, 30, 761, 273, 2824, 3274, 67, 7872, 16, ...
self._test_urls(urls, self._extra_handlers(), urllib2.urlopen)
self._test_urls(urls, self._extra_handlers(), retry=True)
def test_file(self): TESTFN = test_support.TESTFN f = open(TESTFN, 'w') try: f.write('hi there\n') f.close() urls = [ 'file:'+sanepathname2url(os.path.abspath(TESTFN)), ('file:///nonsensename/etc/passwd', None, urllib2.URLError), ] self._test_urls(urls, self._extra_handlers(), urllib2.urlopen) finally: os.remove(TESTFN)
6a5a177cba3aa36e53438901a1a52149b9010e92 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8546/6a5a177cba3aa36e53438901a1a52149b9010e92/test_urllib2net.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 768, 12, 2890, 4672, 22130, 19793, 273, 1842, 67, 13261, 18, 16961, 19793, 284, 273, 1696, 12, 16961, 19793, 16, 296, 91, 6134, 775, 30, 284, 18, 2626, 2668, 12266, 1915, 64, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 768, 12, 2890, 4672, 22130, 19793, 273, 1842, 67, 13261, 18, 16961, 19793, 284, 273, 1696, 12, 16961, 19793, 16, 296, 91, 6134, 775, 30, 284, 18, 2626, 2668, 12266, 1915, 64, ...
PersonAdoptPracticeFormSet = inlineformset_factory( Person,PersonAdoptPractice,extra=3) if request.method == 'POST': if(id): person = Person.objects.get(id = id) form = PersonForm(request.POST, instance = person) formset = PersonAdoptPracticeFormSet(request.POST, request.FILES, instance = person) else: form = PersonForm(request.POST) formset = PersonAdoptPracticeFormSet(request.POST, request.FILES) if form.is_valid() and formset.is_valid(): saved_person = form.save() person = Person.objects.get(pk=saved_person.id) formset = PersonAdoptPracticeFormSet(request.POST, request.FILES, instance=person) formset.save() return HttpResponse('') else: errors = form.errors.as_text() for form_person in formset.forms: if(form_person.errors): errors = errors + '\n' + form_person.errors.as_text() return HttpResponse(errors, status=201) else: if(id): person = Person.objects.get(id=id) form = PersonForm(instance = person) formset = PersonAdoptPracticeFormSet(instance = person) else: form = PersonForm() formset = PersonAdoptPracticeFormSet() villages = get_user_villages(request) form.fields['village'].queryset = villages.order_by('village_name') form.fields['group'].queryset = PersonGroups.objects.filter(village__in = villages).distinct().order_by('group_name') return HttpResponse(form.as_table() + formset.as_table())
PersonAdoptPracticeFormSet = inlineformset_factory( Person,PersonAdoptPractice,extra=3) if request.method == 'POST': if(id): person = Person.objects.get(id = id) form = PersonForm(request.POST, instance = person) formset = PersonAdoptPracticeFormSet(request.POST, request.FILES, instance = person) else: form = PersonForm(request.POST) formset = PersonAdoptPracticeFormSet(request.POST, request.FILES) if form.is_valid() and formset.is_valid(): saved_person = form.save() person = Person.objects.get(pk=saved_person.id) formset = PersonAdoptPracticeFormSet(request.POST, request.FILES, instance=person) formset.save() return HttpResponse('') else: errors = form.errors.as_text() for form_person in formset.forms: if(form_person.errors): errors = errors + '\n' + form_person.errors.as_text() return HttpResponse(errors, status=201) else: if(id): person = Person.objects.get(id=id) form = PersonForm(instance = person) formset = PersonAdoptPracticeFormSet(instance = person) else: form = PersonForm() formset = PersonAdoptPracticeFormSet() villages = get_user_villages(request) form.fields['village'].queryset = villages.order_by('village_name') form.fields['group'].queryset = PersonGroups.objects.filter(village__in = villages).distinct().order_by('group_name') return HttpResponse(form.as_table() + formset.as_table())
def save_person_online(request, id): PersonAdoptPracticeFormSet = inlineformset_factory( Person,PersonAdoptPractice,extra=3) if request.method == 'POST': if(id): person = Person.objects.get(id = id) form = PersonForm(request.POST, instance = person) formset = PersonAdoptPracticeFormSet(request.POST, request.FILES, instance = person) else: form = PersonForm(request.POST) formset = PersonAdoptPracticeFormSet(request.POST, request.FILES) if form.is_valid() and formset.is_valid(): saved_person = form.save() person = Person.objects.get(pk=saved_person.id) formset = PersonAdoptPracticeFormSet(request.POST, request.FILES, instance=person) formset.save() return HttpResponse('') else: errors = form.errors.as_text() for form_person in formset.forms: if(form_person.errors): errors = errors + '\n' + form_person.errors.as_text() return HttpResponse(errors, status=201) else: if(id): person = Person.objects.get(id=id) form = PersonForm(instance = person) formset = PersonAdoptPracticeFormSet(instance = person) else: form = PersonForm() formset = PersonAdoptPracticeFormSet() villages = get_user_villages(request) form.fields['village'].queryset = villages.order_by('village_name') form.fields['group'].queryset = PersonGroups.objects.filter(village__in = villages).distinct().order_by('group_name') return HttpResponse(form.as_table() + formset.as_table())
7759d6eb08a7e6568691e648ed314450c8afa48e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11995/7759d6eb08a7e6568691e648ed314450c8afa48e/views.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1923, 67, 12479, 67, 21026, 12, 2293, 16, 612, 4672, 11573, 1871, 3838, 52, 14266, 1812, 1204, 694, 273, 6370, 687, 542, 67, 6848, 12, 11573, 16, 8346, 1871, 3838, 52, 14266, 1812, 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, 1923, 67, 12479, 67, 21026, 12, 2293, 16, 612, 4672, 11573, 1871, 3838, 52, 14266, 1812, 1204, 694, 273, 6370, 687, 542, 67, 6848, 12, 11573, 16, 8346, 1871, 3838, 52, 14266, 1812, 16, ...
class FrozenMappingSetType(BaseMappingSetType): __slots__ = () def __init__(self, iter=(), **opts): if self.__class__ == FrozenMappingSetType: raise NotImplementedError("FrozenMappingSetType is an abstract class") self._hashcode = None super(FrozenMappingSetType, self).__init__(iter, **opts) def __hash__(self): r = self._hashcode if r is None: self._hashcode = r = self._generate_hash() return r
def create_frozen_type(mobj=None): mapobj = {} class FrozenMappingSetType(BaseFrozenMappingSetType): __slots__ = () def __init__(self, iter=(), **opts): akey = self._adaptkey if mobj is None: dictcls = opts.get('dictcls', dict) mapobj[id(self)] = [dictcls(), None] mapobj.setdefault(id(self), [mobj, None])[0].update(akey(k) for k in iter) super(FrozenMappingSetType, self).__init__(iter, **opts) def __len__(self): return len(mapobj[id(self)][0]) def __contains__(self, el): return mapobj[id(self)][0].__contains__(el) def __eq__(self, obj): return set(mapobj[id(self)][0]) == set(obj) def __nonzero__(self): return bool(mapobj[id(self)][0]) def __str__(self): return str(tuple(mapobj[id(self)][0].iterkeys())) def __iter__(self): return mapobj[id(self)][0].__iter__() def __getitem__(self, key): return mapobj[id(self)][0].__getitem__(key) def get(self, key, d=None): return mapobj[id(self)][0].get(key, d) def keys(self): return mapobj[id(self)][0].keys() def iterkeys(self): return mapobj[id(self)][0].iterkeys() def values(self): return mapobj[id(self)][0].values() def itervalues(self): return mapobj[id(self)][0].itervalues() def items(self): return mapobj[id(self)][0].items() def iteritems(self): return mapobj[id(self)][0].iteritems() def new(self, iter=()): return self.__class__(iter, dictcls=mapobj[id(self)][0].__class__) def __hash__(self): varlist = mapobj[id(self)] dictobj, r = varlist if r is None: varlist[1] = r = self._generate_hash() return r return FrozenMappingSetType FrozenMappingSetType = create_frozen_type()
# End def #}}}
5692ed97988b844b3fc73c0ff916ecbd137ea54b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2635/5692ed97988b844b3fc73c0ff916ecbd137ea54b/mappingset.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 468, 4403, 1652, 468, 9090, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 468, 4403, 1652, 468, 9090, 97, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
fp = MyURLopener().open(url).fp
fp = urllib2.urlopen(url).fp
def appendURL(self, url, included=0): """Append packages from the database with the given URL. Only the first database should specify included=0, so the global information (maintainer, description) get stored.""" if url in self._urllist: return self._urllist.append(url) fp = MyURLopener().open(url).fp dict = plistlib.Plist.fromFile(fp) # Test here for Pimp version, etc if not included: self._version = dict.get('Version', '0.1') if self._version != PIMP_VERSION: sys.stderr.write("Warning: database version %s does not match %s\n" % (self._version, PIMP_VERSION)) self._maintainer = dict.get('Maintainer', '') self._description = dict.get('Description', '') self._appendPackages(dict['Packages']) others = dict.get('Include', []) for url in others: self.appendURL(url, included=1)
47e5987256e6faf99bc8e474fd8351aa39808785 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/47e5987256e6faf99bc8e474fd8351aa39808785/pimp.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 714, 1785, 12, 2890, 16, 880, 16, 5849, 33, 20, 4672, 3536, 5736, 5907, 628, 326, 2063, 598, 326, 864, 1976, 18, 5098, 326, 1122, 2063, 1410, 4800, 5849, 33, 20, 16, 1427, 326, 2552, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1785, 12, 2890, 16, 880, 16, 5849, 33, 20, 4672, 3536, 5736, 5907, 628, 326, 2063, 598, 326, 864, 1976, 18, 5098, 326, 1122, 2063, 1410, 4800, 5849, 33, 20, 16, 1427, 326, 2552, ...
if shouldround and numdigits > len(other.int) + prec + 1 -len(tmp.int): extend = prec + 2 -len(tmp.int) if extend <= 0: extend = 1 tmp.int.extend([0]*extend) tmp.exp -= extend other.int[:] = [0]*(len(tmp.int)-1)+[1] other.exp = tmp.exp return op1, op2 tmp.int.extend([0] * numdigits) tmp.exp = tmp.exp - numdigits numdigits = len(op1.int) - len(op2.int) if numdigits < 0: numdigits = -numdigits tmp = op1 else: tmp = op2 tmp.int[0:0] = [0] * numdigits
if shouldround and numdigits > prec + 1: tmp_len = len(str(tmp.int)) other_len = len(str(other.int)) if numdigits > (other_len + prec + 1 - tmp_len): extend = prec + 2 - tmp_len if extend <= 0: extend = 1 tmp.int *= 10 ** extend tmp.exp -= extend other.int = 1 other.exp = tmp.exp return op1, op2 tmp.int *= 10 ** numdigits tmp.exp -= numdigits
def _normalize(op1, op2, shouldround = 0, prec = 0): """Normalizes op1, op2 to have the same exp and length of coefficient. Done during addition. """ # Yes, the exponent is a long, but the difference between exponents # must be an int-- otherwise you'd get a big memory problem. numdigits = int(op1.exp - op2.exp) if numdigits < 0: numdigits = -numdigits tmp = op2 other = op1 else: tmp = op1 other = op2 if shouldround and numdigits > len(other.int) + prec + 1 -len(tmp.int): # If the difference in adjusted exps is > prec+1, we know # other is insignificant, so might as well put a 1 after the precision. # (since this is only for addition.) Also stops MemoryErrors. extend = prec + 2 -len(tmp.int) if extend <= 0: extend = 1 tmp.int.extend([0]*extend) tmp.exp -= extend other.int[:] = [0]*(len(tmp.int)-1)+[1] other.exp = tmp.exp return op1, op2 tmp.int.extend([0] * numdigits) tmp.exp = tmp.exp - numdigits numdigits = len(op1.int) - len(op2.int) # numdigits != 0 => They have the same exponent, but not the same length # of the coefficient. if numdigits < 0: numdigits = -numdigits tmp = op1 else: tmp = op2 tmp.int[0:0] = [0] * numdigits return op1, op2
636a6b100fe6083388bc5315758326078abe65b4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/636a6b100fe6083388bc5315758326078abe65b4/decimal.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 12237, 12, 556, 21, 16, 1061, 22, 16, 1410, 2260, 273, 374, 16, 13382, 273, 374, 4672, 3536, 26265, 1061, 21, 16, 1061, 22, 358, 1240, 326, 1967, 1329, 471, 769, 434, 16554, 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, 12237, 12, 556, 21, 16, 1061, 22, 16, 1410, 2260, 273, 374, 16, 13382, 273, 374, 4672, 3536, 26265, 1061, 21, 16, 1061, 22, 358, 1240, 326, 1967, 1329, 471, 769, 434, 16554, 18, ...
def __init__(self, parent, message = 'Choose a file', defaultDir = '.', defaultFile = '', style = wxOPEN, wildcard = '*.py; *.txt', pos = wxDefaultPosition):
def __init__(self, parent, message = 'Choose a file', defaultDir = '.', defaultFile = '', wildcard = '*.py; *.txt', style = wxOPEN, pos = wxDefaultPosition):
def __init__(self, parent, message = 'Choose a file', defaultDir = '.', defaultFile = '', style = wxOPEN, wildcard = '*.py; *.txt', pos = wxDefaultPosition): self._init_ctrls(parent) self.SetStyle(style) self.SetWildcard(wildcard)
1464f619e4cc365f25751a4ef0b073567530f350 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/1464f619e4cc365f25751a4ef0b073567530f350/FileDlg.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 982, 16, 883, 273, 296, 24529, 279, 585, 2187, 805, 1621, 273, 2611, 16, 805, 812, 273, 10226, 8531, 273, 19962, 2074, 31, 380, 18, 5830, 2187, 2154, 273...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 982, 16, 883, 273, 296, 24529, 279, 585, 2187, 805, 1621, 273, 2611, 16, 805, 812, 273, 10226, 8531, 273, 19962, 2074, 31, 380, 18, 5830, 2187, 2154, 273...
1.0839233273386946 + 0.27175258531951174*I
1.08392332733869 + 0.271752585319511*I
def tanh(self): """ EXAMPLES: sage: (1+I).tanh() 1.0839233273386946 + 0.27175258531951174*I """ return self.parent()(self._pari_().tanh())
193380da4580283517e8b5d85f0bf8d1c6d47fce /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9890/193380da4580283517e8b5d85f0bf8d1c6d47fce/complex_number.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17126, 76, 12, 2890, 4672, 3536, 5675, 8900, 11386, 30, 272, 410, 30, 261, 21, 15, 45, 2934, 88, 304, 76, 1435, 404, 18, 6840, 5520, 4366, 1578, 27, 3707, 5292, 29, 397, 374, 18, 532...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17126, 76, 12, 2890, 4672, 3536, 5675, 8900, 11386, 30, 272, 410, 30, 261, 21, 15, 45, 2934, 88, 304, 76, 1435, 404, 18, 6840, 5520, 4366, 1578, 27, 3707, 5292, 29, 397, 374, 18, 532...
cc = "/usr/ccs/bin/cc"
cc = "/usr/bin/cc"
def Boot(): global BuildLocal BuildLocal += " -boot -keep -DM3CC_TARGET=" + Config Version = "1" # This information is duplicated from the config files. # TBD: put it only in one place. # The older bootstraping method does get that right. vms = StringTagged(Config, "VMS") if Config == "ALPHA32_VMS": cc = "cc" cflags = " " elif Config == "ALPHA64_VMS": cc = "cc" cflags = "/pointer_size=64 " elif StringTagged(Config, "SOLARIS") or Config == "SOLsun": cc = "/usr/ccs/bin/cc" cflags = "-g -mt -xldscope=symbolic " else: cc = { "SOLgnu" : "/usr/sfw/bin/gcc", }.get(Config) or "gcc" cflags = { "I386_INTERIX" : "-g ", # gcc -fPIC generates incorrect code on Interix "SOLgnu" : "-g ", # -fPIC? }.get(Config) or "-g -fPIC " cflags = cflags + ({ "AMD64_LINUX" : " -m64 -mno-align-double ", "AMD64_DARWIN" : " -arch x86_64 ", "PPC64_DARWIN" : " -arch ppc64 ", "ARM_DARWIN" : " -march=armv6 -mcpu=arm1176jzf-s ", "LINUXLIBC6" : " -m32 -mno-align-double ", "MIPS64_OPENBSD" : " -mabi=64 ", "SOLgnu" : " -m32 -mcpu=v9 ", "I386_SOLARIS" : " -xarch=pentium_pro -Kpic ", "AMD64_SOLARIS" : " -xarch=amd64 -Kpic ", "SOLsun" : " -xarch=v8plus -xcode=pic32 ", "SPARC32_SOLARIS" : " -xarch=v8plus -xcode=pic32 ", "SPARC64_SOLARIS" : " -xarch=v9 -xcode=pic32 ", "SPARC32_LINUX" : " -m32 -mcpu=v9 -munaligned-doubles ", "SPARC64_LINUX" : " -m64 -munaligned-doubles ", }.get(Config) or " ") Link = "$(CC) $(CFLAGS) *.mo *.io *.o " if StringTagged(Target, "DARWIN"): pass elif StringTagged(Target, "SOLARIS") or Target.startswith("SOL"): Link = Link + " -lrt -lm -lnsl -lsocket -lpthread " elif StringTagged(Target, "HPUX"): Link = Link + " -lrt -lm " elif StringTagged(Target, "INTERIX"): Link = Link + " -lm " else: Link = Link + " -lm -lpthread " # not in Link Compile = "$(CC) $(CFLAGS) " if not StringTagged(Config, "VMS"): Compile = Compile + " -c " AssembleOnTarget = not vms AssembleOnHost = not AssembleOnTarget if StringTagged(Target, "VMS") and AssembleOnTarget: Assemble = "macro /alpha " # not right, come back to it later elif StringTagged(Target, "SOLARIS") or Target.startswith("SOL"): Assemble = "/usr/ccs/bin/as " else: Assemble = "as " if Target != "PPC32_OPENBSD" and Target != "PPC_LINUX": # "Tag" not right for LINUX due to LINUXLIBC6 # "Tag" not right for BSD or 64 either. if Target.find("LINUX") != -1 or Target.find("BSD") != -1: if Target.find("64") != -1 or (StringTagged(Target, "ALPHA") and not StringTagged(Target, "ALPHA32")): Assemble = Assemble + " --64" else: Assemble = Assemble + " --32" Assemble = (Assemble + ({ "AMD64_DARWIN" : " -arch x86_64 ", "PPC64_DARWIN" : " -arch ppc64 ", "ARM_DARWIN" : " -arch armv6 ", # -s puts symbols where linker won't automatically strip them "I386_SOLARIS" : " -s ", "AMD64_SOLARIS" : " -s -xarch=amd64 ", "SOLgnu" : " -s -xarch=v8plus ", "SOLsun" : " -s -xarch=v8plus ", "SPARC32_SOLARIS" : " -s -xarch=v8plus ", "SPARC64_SOLARIS" : " -s -xarch=v9 ", }.get(Target) or "")) GnuPlatformPrefix = { "ARM_DARWIN" : "arm-apple-darwin8-", "ALPHA32_VMS" : "alpha-dec-vms-", "ALPHA64_VMS" : "alpha64-dec-vms-", }.get(Target) or "" if not vms: cc = GnuPlatformPrefix + cc Link = GnuPlatformPrefix + Link if (not vms) or AssembleOnHost: Assemble = GnuPlatformPrefix + Assemble # # squeeze runs of spaces and spaces at ends # cflags = re.sub(" +", " ", cflags) cflags = re.sub(" +$", "", cflags) cflags = re.sub("^ +", "", cflags) Compile = re.sub(" +", " ", Compile) Compile = re.sub(" +$", "", Compile) Compile = re.sub("^ +", "", Compile) Link = re.sub(" +", " ", Link) Link = re.sub(" +$", "", Link) Assemble = re.sub(" +", " ", Assemble) Assemble = re.sub(" +$", "", Assemble) BootDir = "./cm3-boot-" + Target + "-" + Version P = [ "m3cc", "import-libs", "m3core", "libm3", "sysutils", "m3middle", "m3quake", "m3objfile", "m3linker", "m3back", "m3front", "cm3" ] #DoPackage(["", "realclean"] + P) or sys.exit(1) DoPackage(["", "buildlocal"] + P) or sys.exit(1) try: shutil.rmtree(BootDir) except: pass try: os.mkdir(BootDir) except: pass # # This would probably be a good use of XSL (xml style sheets) # Make = open(os.path.join(BootDir, "make.sh"), "wb") VmsMake = open(os.path.join(BootDir, "vmsmake.com"), "wb") VmsLink = open(os.path.join(BootDir, "vmslink.opt"), "wb") Makefile = open(os.path.join(BootDir, "Makefile"), "wb") UpdateSource = open(os.path.join(BootDir, "updatesource.sh"), "wb") Objects = [ ] Makefile.write(".SUFFIXES:\nall: cm3\n\n") for a in [UpdateSource, Make]: a.write("#!/bin/sh\n\nset -e\nset -x\n\n") for a in [Makefile]: a.write("# edit up here\n\n") a.write("CC ?= " + cc + "\n") a.write("CFLAGS ?= " + cflags + "\n") a.write("Compile=" + Compile + "\n") a.write("Assemble=" + Assemble + "\n") a.write("Link=" + Link + "\n") a.write("\n\n# no more editing should be needed\n\n") for a in [Make]: a.write("# edit up here\n\n") a.write("CC=${CC:-" + cc + "}\n") a.write("CFLAGS=${CFLAGS:-" + cflags + "}\n") a.write("Compile=" + Compile + "\n") a.write("Assemble=" + Assemble + "\n") a.write("Link=" + Link + "\n") a.write("\n\n# no more editing should be needed\n\n") for q in P: dir = GetPackagePath(q) for a in os.listdir(os.path.join(Root, dir, Config)): ext_c = a.endswith(".c") ext_h = a.endswith(".h") ext_s = a.endswith(".s") ext_ms = a.endswith(".ms") ext_is = a.endswith(".is") if not (ext_c or ext_h or ext_s or ext_ms or ext_is): continue fullpath = os.path.join(Root, dir, Config, a) if ext_h or ext_c or not vms or AssembleOnTarget: CopyFile(fullpath, BootDir) if ext_h: continue Object = GetObjectName(a) Objects += [Object] if vms: if ext_c: VmsMake.write("$ " + Compile + " " + a + "\n") else: if AssembleOnHost: # must have cross assembler a = Assemble + " " + fullpath + " -o " + BootDir + "/" + Object print(a) os.system(a) else: VmsMake.write("$ " + Assemble + " " + a + "\n") VmsLink.write(Object + "/SELECTIVE_SEARCH\n") continue Makefile.write("Objects += " + Object + "\n" + Object + ": " + a + "\n\t") if ext_c: Command = "Compile" else: Command = "Assemble" for b in [Make, Makefile]: b.write("$(" + Command + ") " + a + " -o " + Object + "\n") Makefile.write("cm3: $(Objects)\n\t") VmsMake.write("$ set file/attr=(rfm=var,rat=none) *.mo\n") VmsMake.write("$ set file/attr=(rfm=var,rat=none) *.io\n") VmsMake.write("$ link /executable=cm3.exe vmslink/options\n") for a in [Make, Makefile]: a.write("$(Link) -o cm3\n") for a in [ # # Add to this list as needed. # Adding more than necessary is ok -- assume the target system has no changes, # so we can replace whatever is there. # "m3-libs/libm3/src/os/POSIX/OSConfigPosix.m3", "m3-libs/libm3/src/random/m3makefile", "m3-libs/m3core/src/m3makefile", "m3-libs/m3core/src/Uwaitpid.quake", "m3-libs/m3core/src/thread.quake", "m3-libs/m3core/src/C/m3makefile", "m3-libs/m3core/src/C/" + Target + "/m3makefile", "m3-libs/m3core/src/C/Common/m3makefile", "m3-libs/m3core/src/Csupport/m3makefile", "m3-libs/m3core/src/float/m3makefile", "m3-libs/m3core/src/runtime/m3makefile", "m3-libs/m3core/src/runtime/common/m3makefile", "m3-libs/m3core/src/runtime/common/Compiler.tmpl", "m3-libs/m3core/src/runtime/common/m3text.h", "m3-libs/m3core/src/runtime/common/RTError.h", "m3-libs/m3core/src/runtime/common/RTMachine.i3", "m3-libs/m3core/src/runtime/common/RTProcess.h", "m3-libs/m3core/src/runtime/common/RTSignalC.c", "m3-libs/m3core/src/runtime/common/RTSignalC.h", "m3-libs/m3core/src/runtime/common/RTSignalC.i3", "m3-libs/m3core/src/runtime/common/RTSignal.i3", "m3-libs/m3core/src/runtime/common/RTSignal.m3", "m3-libs/m3core/src/runtime/" + Target + "/m3makefile", "m3-libs/m3core/src/runtime/" + Target + "/RTMachine.m3", "m3-libs/m3core/src/runtime/" + Target + "/RTSignal.m3", "m3-libs/m3core/src/runtime/" + Target + "/RTThread.m3", "m3-libs/m3core/src/text/TextLiteral.i3", "m3-libs/m3core/src/thread/m3makefile", "m3-libs/m3core/src/thread/PTHREAD/m3makefile", "m3-libs/m3core/src/thread/PTHREAD/ThreadPThread.m3", "m3-libs/m3core/src/thread/PTHREAD/ThreadPThreadC.i3", "m3-libs/m3core/src/thread/PTHREAD/ThreadPThreadC.c", "m3-libs/m3core/src/time/POSIX/m3makefile", "m3-libs/m3core/src/unix/m3makefile", "m3-libs/m3core/src/unix/Common/m3makefile", "m3-libs/m3core/src/unix/Common/m3unix.h", "m3-libs/m3core/src/unix/Common/Udir.i3", "m3-libs/m3core/src/unix/Common/UdirC.c", "m3-libs/m3core/src/unix/Common/Usignal.i3", "m3-libs/m3core/src/unix/Common/Ustat.i3", "m3-libs/m3core/src/unix/Common/UstatC.c", "m3-libs/m3core/src/unix/Common/UtimeC.c", "m3-libs/m3core/src/unix/Common/Uucontext.i3", "m3-sys/cminstall/src/config-no-install/SOLgnu", "m3-sys/cminstall/src/config-no-install/SOLsun", "m3-sys/cminstall/src/config-no-install/Solaris.common", "m3-sys/cminstall/src/config-no-install/Unix.common", "m3-sys/cminstall/src/config-no-install/cm3cfg.common", "m3-sys/cminstall/src/config-no-install/" + Target, "m3-sys/m3cc/src/m3makefile", "m3-sys/m3cc/src/gcc/m3cg/parse.c", "m3-sys/m3middle/src/Target.i3", "m3-sys/m3middle/src/Target.m3", "scripts/python/pylib.py", "m3-libs/m3core/src/C/" + Target + "/Csetjmp.i3", "m3-libs/m3core/src/C/" + Target + "/m3makefile", "m3-libs/m3core/src/C/Common/Csetjmp.i3", "m3-libs/m3core/src/C/Common/Csignal.i3", "m3-libs/m3core/src/C/Common/Cstdio.i3", "m3-libs/m3core/src/C/Common/Cstring.i3", "m3-libs/m3core/src/C/Common/m3makefile", ]: source = os.path.join(Root, a) if FileExists(source): name = GetLastPathElement(a) reldir = RemoveLastPathElement(a) destdir = os.path.join(BootDir, reldir) dest = os.path.join(destdir, name) try: os.makedirs(destdir) except: pass CopyFile(source, dest) for b in [UpdateSource, Make]: b.write("mkdir -p /dev2/cm3/" + reldir + "\n") b.write("cp " + a + " /dev2/cm3/" + a + "\n") for a in [UpdateSource, Make, Makefile, VmsMake, VmsLink]: a.close() # write entirely new custom makefile for NT # We always have object files so just compile and link in one fell swoop. if StringTagged(Config, "NT") or Config == "NT386": DeleteFile("updatesource.sh") DeleteFile("make.sh") Makefile = open(os.path.join(BootDir, "Makefile"), "wb") Makefile.write("cm3.exe: *.io *.mo *.c\r\n" + " cl -Zi -MD *.c -link *.mo *.io -out:cm3.exe user32.lib kernel32.lib wsock32.lib comctl32.lib gdi32.lib advapi32.lib netapi32.lib\r\n") Makefile.close() if vms or StringTagged(Config, "NT") or Config == "NT386": _MakeZip(BootDir[2:]) else: _MakeTGZ(BootDir[2:])
12dc7cdfd926e12acbaed3b5701306030430b814 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9328/12dc7cdfd926e12acbaed3b5701306030430b814/pylib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 26254, 13332, 225, 2552, 3998, 2042, 3998, 2042, 1011, 315, 300, 7137, 300, 10102, 300, 16125, 23, 6743, 67, 16374, 1546, 397, 1903, 225, 4049, 273, 315, 21, 6, 225, 468, 1220, 1779, 353...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 26254, 13332, 225, 2552, 3998, 2042, 3998, 2042, 1011, 315, 300, 7137, 300, 10102, 300, 16125, 23, 6743, 67, 16374, 1546, 397, 1903, 225, 4049, 273, 315, 21, 6, 225, 468, 1220, 1779, 353...
while currentAddr <= maxAddr and currentAddr >= prevAddr:
while currentAddr < maxAddr and currentAddr > prevAddr:
def get_memory_map(self, minAddr = None, maxAddr = None): """ Produces a memory map to the process address space. Optionally restrict the map to the given address range.
015d670d265cb2758bfa6d6c506d4c7735582b07 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7261/015d670d265cb2758bfa6d6c506d4c7735582b07/system.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 7858, 67, 1458, 12, 2890, 16, 1131, 3178, 273, 599, 16, 943, 3178, 273, 599, 4672, 3536, 22934, 279, 3778, 852, 358, 326, 1207, 1758, 3476, 18, 20720, 13108, 326, 852, 358, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 7858, 67, 1458, 12, 2890, 16, 1131, 3178, 273, 599, 16, 943, 3178, 273, 599, 4672, 3536, 22934, 279, 3778, 852, 358, 326, 1207, 1758, 3476, 18, 20720, 13108, 326, 852, 358, 32...
logging.info(u'No changes were needed on %s' \
pywikibot.output(u'No changes were needed on %s' \
def userPut(self, page, oldtext, newtext): """ Print differences, ask user for confirmation, and puts the page if needed.
0d1a3d110fc864396d05a24b41e5e3506e8eb770 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9005/0d1a3d110fc864396d05a24b41e5e3506e8eb770/bot.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 729, 6426, 12, 2890, 16, 1363, 16, 1592, 955, 16, 394, 955, 4672, 3536, 3038, 16440, 16, 6827, 729, 364, 14296, 16, 471, 8200, 326, 1363, 309, 3577, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 729, 6426, 12, 2890, 16, 1363, 16, 1592, 955, 16, 394, 955, 4672, 3536, 3038, 16440, 16, 6827, 729, 364, 14296, 16, 471, 8200, 326, 1363, 309, 3577, 18, 2, -100, -100, -100, -100, -100...
INPUT: - ``d`` - state array or something coercible to a state array
def sub_bytes(self, d): r""" Perform the non-linear transform on ``d``. :: sage: sr = mq.SR(2, 1, 2, 8, gf2=True) sage: k = sr.base_ring() sage: A = Matrix(k, 1, 2 , [k(1), k.gen()]) sage: sr.sub_bytes(A) [ a^6 + a^5 + a^4 + a^3 + a^2 a^6 + a^5 + a^4 + a^2 + a + 1] INPUT: - ``d`` - state array or something coercible to a state array """ d = self.state_array(d) return Matrix(self.base_ring(), d.nrows(), d.ncols(), [self.sub_byte(b) for b in d.list()])
64b5e0e9186de5235119791631990329cc9aecfa /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/64b5e0e9186de5235119791631990329cc9aecfa/sr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 720, 67, 3890, 12, 2890, 16, 302, 4672, 436, 8395, 11217, 326, 1661, 17, 12379, 2510, 603, 12176, 72, 68, 8338, 225, 493, 225, 272, 410, 30, 9133, 273, 18327, 18, 10090, 12, 22, 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, 720, 67, 3890, 12, 2890, 16, 302, 4672, 436, 8395, 11217, 326, 1661, 17, 12379, 2510, 603, 12176, 72, 68, 8338, 225, 493, 225, 272, 410, 30, 9133, 273, 18327, 18, 10090, 12, 22, 16, ...
self.write(cr, uid, ids, {'state':'draft'})
return self.write(cr, uid, ids, {'state':'draft'})
def action_cancel_draft(self, cr, uid, ids, context={}): self.write(cr, uid, ids, {'state':'draft'})
26c4b0782490355b93d65f86521608008340ed94 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7339/26c4b0782490355b93d65f86521608008340ed94/user_ctg.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1301, 67, 10996, 67, 17153, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 819, 12938, 4672, 365, 18, 2626, 12, 3353, 16, 4555, 16, 3258, 16, 13666, 2019, 11, 2497, 17153, 11, 6792, 2, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1301, 67, 10996, 67, 17153, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 819, 12938, 4672, 365, 18, 2626, 12, 3353, 16, 4555, 16, 3258, 16, 13666, 2019, 11, 2497, 17153, 11, 6792, 2, ...
PangoMatrix = struct__PangoMatrix
PangoMatrix = struct__PangoMatrix
def load_lib(name): libname = ctypes.util.find_library(name) if not libname: raise OSError("Could not find library '%s'" % name) else: return CDLL(libname)
92bb4862df49194567fad21ea00d921ffc62dd6a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10761/92bb4862df49194567fad21ea00d921ffc62dd6a/pango.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1262, 67, 2941, 12, 529, 4672, 2561, 529, 273, 6983, 18, 1367, 18, 4720, 67, 12083, 12, 529, 13, 309, 486, 2561, 529, 30, 1002, 10002, 2932, 4445, 486, 1104, 5313, 1995, 87, 4970, 738,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1262, 67, 2941, 12, 529, 4672, 2561, 529, 273, 6983, 18, 1367, 18, 4720, 67, 12083, 12, 529, 13, 309, 486, 2561, 529, 30, 1002, 10002, 2932, 4445, 486, 1104, 5313, 1995, 87, 4970, 738,...
'in_love', 'indignant', 'interested', 'invisible', 'jealous',
'in love', 'indignant', 'interested', 'invisible', 'jealous',
def _build_element(self, element, nsmap): values = self.values if 'unknown' in values and len(values) > 1: raise BuilderError("Cannot have any other activities if the `unknown' activity is specified") for note in self.notes: note.to_element(parent=element, nsmap=nsmap) XMLMultipleChoiceElement._build_element(self, element, nsmap)
2b13c4f2db9ad707dc51dfa32589c77d42fd9437 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5703/2b13c4f2db9ad707dc51dfa32589c77d42fd9437/rpid.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3510, 67, 2956, 12, 2890, 16, 930, 16, 3153, 1458, 4672, 924, 273, 365, 18, 2372, 309, 296, 8172, 11, 316, 924, 471, 562, 12, 2372, 13, 405, 404, 30, 1002, 5008, 668, 2932, 4515...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3510, 67, 2956, 12, 2890, 16, 930, 16, 3153, 1458, 4672, 924, 273, 365, 18, 2372, 309, 296, 8172, 11, 316, 924, 471, 562, 12, 2372, 13, 405, 404, 30, 1002, 5008, 668, 2932, 4515...
file.write(_escape_cdata(node.tail, encoding))
file.write(_encode(_escape_cdata(node.tail), encoding))
def _write(self, file, node, encoding, namespaces): # write XML to file tag = node.tag if tag is Comment: file.write("<!-- %s -->" % _escape_cdata(node.text, encoding)) elif tag is ProcessingInstruction: file.write("<?%s?>" % _escape_cdata(node.text, encoding)) else: items = list(node.items()) xmlns_items = [] # new namespaces in this scope try: if isinstance(tag, QName) or tag[:1] == "{": tag, xmlns = fixtag(tag, namespaces) if xmlns: xmlns_items.append(xmlns) except TypeError: _raise_serialization_error(tag) file.write("<" + _encode(tag, encoding)) if items or xmlns_items: items.sort() # lexical order for k, v in items: try: if isinstance(k, QName) or k[:1] == "{": k, xmlns = fixtag(k, namespaces) if xmlns: xmlns_items.append(xmlns) except TypeError: _raise_serialization_error(k) try: if isinstance(v, QName): v, xmlns = fixtag(v, namespaces) if xmlns: xmlns_items.append(xmlns) except TypeError: _raise_serialization_error(v) file.write(" %s=\"%s\"" % (_encode(k, encoding), _escape_attrib(v, encoding))) for k, v in xmlns_items: file.write(" %s=\"%s\"" % (_encode(k, encoding), _escape_attrib(v, encoding))) if node.text or len(node): file.write(">") if node.text: file.write(_escape_cdata(node.text, encoding)) for n in node: self._write(file, n, encoding, namespaces) file.write("</" + _encode(tag, encoding) + ">") else: file.write(" />") for k, v in xmlns_items: del namespaces[v] if node.tail: file.write(_escape_cdata(node.tail, encoding))
e4cfaf8f7bb5d21848fb232e3757979401720c1d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12029/e4cfaf8f7bb5d21848fb232e3757979401720c1d/ElementTree.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2626, 12, 2890, 16, 585, 16, 756, 16, 2688, 16, 7728, 4672, 468, 1045, 3167, 358, 585, 1047, 273, 756, 18, 2692, 309, 1047, 353, 9821, 30, 585, 18, 2626, 2932, 5586, 413, 738, 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, 389, 2626, 12, 2890, 16, 585, 16, 756, 16, 2688, 16, 7728, 4672, 468, 1045, 3167, 358, 585, 1047, 273, 756, 18, 2692, 309, 1047, 353, 9821, 30, 585, 18, 2626, 2932, 5586, 413, 738, 8...
return ln scriptLines = map(processLine, scriptLines)
return ln.strip() scriptLines = map(processLine, scriptLines) for i in range(len(scriptLines) - 1): ln = scriptLines[i] if not ln.endswith('&&'): print >>output, "MISSING \'&&\': %s" % ln print >>output, "FOLLOWED BY : %s" % scriptLines[i + 1] return TestStatus.Fail scriptLines[i] = ln[:-2]
def processLine(ln): # Apply substitutions for a,b in substitutions: ln = ln.replace(a,b)
e52cdfb3b95c44d3fc43138351ed076c2dc60d52 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11986/e52cdfb3b95c44d3fc43138351ed076c2dc60d52/TestRunner.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 1670, 12, 2370, 4672, 468, 5534, 23368, 364, 279, 16, 70, 316, 23368, 30, 7211, 273, 7211, 18, 2079, 12, 69, 16, 70, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 1670, 12, 2370, 4672, 468, 5534, 23368, 364, 279, 16, 70, 316, 23368, 30, 7211, 273, 7211, 18, 2079, 12, 69, 16, 70, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
MDiGConfig.MDiGConfig.migration_is_allowed = True
config.MDiGConfig.migration_is_allowed = True
def do_migration(args): if len(args) == 0: MDiGConfig.MDiGConfig.migration_is_allowed = True mdig_config = config.get_config() if not mdig_config.migration_occurred: print "Nothing to migrate within mdig.conf" print "Use 'mdig.py migrate old_repo_dir grassdb' to manually migrate a repository" elif len(args) == 1: import mdig.migrate print "Migrating repository %s" % args[0] mdig.migrate.migrate_repository(args[0]) elif len(args) == 2: import mdig.migrate print "Old repository: %s" % args[0] print "GRASSDB destination: %s" % args[1] mdig.migrate.migrate_old_repository(args[0],args[1]) else: print "Syntax error, just use 'mdig.py migrate <grassdb>'; or" print "Use 'mdig.py migrate <grassdb>' to manually " + \ "migrate a repository." print "Use 'mdig.py migrate <old_repo_dir> <grassdb>' to manually " + \ "migrate an old style repository." sys.exit(0)
c22a8ac1e03674fc59fdff540e6ae0c2d85dd773 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10332/c22a8ac1e03674fc59fdff540e6ae0c2d85dd773/mdig.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 15746, 12, 1968, 4672, 309, 562, 12, 1968, 13, 422, 374, 30, 642, 18, 6188, 77, 43, 809, 18, 15746, 67, 291, 67, 8151, 273, 1053, 3481, 360, 67, 1425, 273, 642, 18, 588, 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, 741, 67, 15746, 12, 1968, 4672, 309, 562, 12, 1968, 13, 422, 374, 30, 642, 18, 6188, 77, 43, 809, 18, 15746, 67, 291, 67, 8151, 273, 1053, 3481, 360, 67, 1425, 273, 642, 18, 588, 6...
ctrl.SplitHorizontally(window1, window2, sp)
splitMeth = ctrl.SplitHorizontally else: return if window1 and window2: splitMeth(window1, window2, sp) elif window1 or window2: if window1: ctrl.Initialize(window1) else: ctrl.Initialize(window2)
def splitWindow(self, window1, window2): ctrl = self.control sm = ctrl.GetSplitMode() sp = ctrl.GetSashPosition()
6f23f8e79c8794e46587dcfdb5a3aa7271320162 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/6f23f8e79c8794e46587dcfdb5a3aa7271320162/ContainerCompanions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1416, 3829, 12, 2890, 16, 2742, 21, 16, 2742, 22, 4672, 6414, 273, 365, 18, 7098, 3029, 273, 6414, 18, 967, 5521, 2309, 1435, 1694, 273, 6414, 18, 967, 55, 961, 2555, 1435, 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, 1416, 3829, 12, 2890, 16, 2742, 21, 16, 2742, 22, 4672, 6414, 273, 365, 18, 7098, 3029, 273, 6414, 18, 967, 5521, 2309, 1435, 1694, 273, 6414, 18, 967, 55, 961, 2555, 1435, 2, -100, ...
except AttributeError:
except (AttributeError, TypeError):
def getData(self): """Called by Directive docheck() method to fetch the data required for evaluating the directive rule.
24ef0c0765017bf7bc64e2babec585d4cc584573 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3643/24ef0c0765017bf7bc64e2babec585d4cc584573/http.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4303, 12, 2890, 4672, 3536, 8185, 635, 31081, 741, 1893, 1435, 707, 358, 2158, 326, 501, 1931, 364, 26704, 326, 8655, 1720, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 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, 4303, 12, 2890, 4672, 3536, 8185, 635, 31081, 741, 1893, 1435, 707, 358, 2158, 326, 501, 1931, 364, 26704, 326, 8655, 1720, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
else
else:
def __init__(data = None) if data == None: quickfix.IntField.__init__(self, 686) else quickfix.IntField.__init__(self, 686, 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, 1702, 974, 16186, 2738, 972, 12, 2890, 16, 1666, 5292, 13, 469, 30, 9549, 904, 18, 1702, 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, 1702, 974, 16186, 2738, 972, 12, 2890, 16, 1666, 5292, 13, 469, 30, 9549, 904, 18, 1702, 974, 16186, 27...
if getattr(datatype, 'index', False):
if getattr(datatype, 'index', None) is not None:
def _index_init(self): """Initialize csv values index list""" for column in self.columns: datatype = self.schema[column] if getattr(datatype, 'index', False): indexes.append(Index()) else: indexes.append(None)
37ef5ea1106df29445103dbfffc86e1779a16240 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12681/37ef5ea1106df29445103dbfffc86e1779a16240/itools_csv.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1615, 67, 2738, 12, 2890, 4672, 3536, 7520, 6101, 924, 770, 666, 8395, 364, 1057, 316, 365, 18, 5112, 30, 11172, 273, 365, 18, 4821, 63, 2827, 65, 309, 3869, 12, 21540, 16, 296, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1615, 67, 2738, 12, 2890, 4672, 3536, 7520, 6101, 924, 770, 666, 8395, 364, 1057, 316, 365, 18, 5112, 30, 11172, 273, 365, 18, 4821, 63, 2827, 65, 309, 3869, 12, 21540, 16, 296, ...
ec = elvinConnection() log.log( "<eddieElvin>eddieElvin.connect(), Connected to Elvin server", 6 )
ec = elvinConnection( url=ELVINURL, scope=ELVINSCOPE ) log.log( "<eddieElvin4>eddieElvin.connect(), Connected to Elvin server, url='%s' scope='%s'" % (ELVINURL, ELVINSCOPE), 6 )
def connect(self):
aa32b1c20f46510b6908631b429ef7410713743a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3643/aa32b1c20f46510b6908631b429ef7410713743a/eddieElvin4.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3077, 12, 2890, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3077, 12, 2890, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
if ds_o is None:
if ds_o is None or ds_o == 'NULL':
def Open( self, filename, update = 0 ): ds_o = _gdal.OGR_Dr_Open( self._o, filename, update ) if ds_o is None: return None else: return DataSource( ds_o )
3168cde22e4a9933a110dc046a57cda148cf2a16 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10290/3168cde22e4a9933a110dc046a57cda148cf2a16/ogr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3502, 12, 365, 16, 1544, 16, 1089, 273, 374, 262, 30, 3780, 67, 83, 273, 389, 19016, 287, 18, 51, 6997, 67, 8956, 67, 3678, 12, 365, 6315, 83, 16, 1544, 16, 1089, 262, 309, 3780, 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, 3502, 12, 365, 16, 1544, 16, 1089, 273, 374, 262, 30, 3780, 67, 83, 273, 389, 19016, 287, 18, 51, 6997, 67, 8956, 67, 3678, 12, 365, 6315, 83, 16, 1544, 16, 1089, 262, 309, 3780, 6...
newColor = QColor(0,0,0) if colorIndex != -1: newColor.setHsv(self.coloringScaledData[colorIndex][i], 255, 255)
if colorIndex != -1: if self.rawdata.domain[colorIndex].varType == orange.VarTypes.Continuous: newColor.setHsv(self.coloringScaledData[colorIndex][i], 255, 255) else: newColor = classColors[colorIndices[self.rawdata[i][colorIndex].value]] else: newColor = QColor(0,0,0)
def updateData(self, xAttr, yAttr, colorAttr, shapeAttr = "", sizeShapeAttr = "", showColorLegend = 0, **args): self.removeDrawingCurves() # my function, that doesn't delete selection curves self.removeMarkers() self.tips.removeAll() #self.enableLegend(0) self.removeTooltips() self.tooltipData = []
326d5b5a80b59e5ee64c17b7148d78faa6ffbb54 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6366/326d5b5a80b59e5ee64c17b7148d78faa6ffbb54/OWScatterPlotGraph.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 751, 12, 2890, 16, 619, 3843, 16, 677, 3843, 16, 2036, 3843, 16, 2179, 3843, 273, 23453, 963, 8500, 3843, 273, 23453, 2405, 2957, 16812, 273, 374, 16, 2826, 1968, 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, 1089, 751, 12, 2890, 16, 619, 3843, 16, 677, 3843, 16, 2036, 3843, 16, 2179, 3843, 273, 23453, 963, 8500, 3843, 273, 23453, 2405, 2957, 16812, 273, 374, 16, 2826, 1968, 4672, 365, 18, ...
self.checkbuttonPublicEvent,
self.checkbuttonPublishEvent, self.checkbuttonSysop, self.entrySysopPassword,
def on_togglebuttonShowMap_clicked(self, event): buttons_deactivate = [self.buttonClearAll, self.buttonClearOrigMag, self.buttonClearFocMec, self.buttonDoHyp2000, self.buttonDo3dloc, self.buttonDoNLLoc, self.buttonCalcMag, self.comboboxNLLocModel, self.buttonDoFocmec, self.togglebuttonShowFocMec, self.buttonNextFocMec, self.togglebuttonShowWadati, self.buttonGetNextEvent, self.buttonSendEvent, self.buttonUpdateEventList, self.checkbuttonPublicEvent, self.buttonDeleteEvent, self.buttonPreviousStream, self.buttonNextStream, self.comboboxStreamName, self.labelStreamNumber, self.comboboxPhaseType, self.togglebuttonFilter, self.comboboxFilterType, self.checkbuttonZeroPhase, self.labelHighpass, self.labelLowpass, self.spinbuttonHighpass, self.spinbuttonLowpass, self.togglebuttonSpectrogram, self.checkbuttonSpectrogramLog] state = self.togglebuttonShowMap.get_active() for button in buttons_deactivate: button.set_sensitive(not state) if state: self.delAxes() self.fig.clear() self.drawEventMap() self.multicursor.visible = False self.toolbar.pan() self.toolbar.zoom() self.toolbar.update() self.canv.draw() self.textviewStdOutImproved.write("http://maps.google.de/maps" + \ "?f=q&q=%.6f,%.6f" % (self.dictOrigin['Latitude'], self.dictOrigin['Longitude'])) else: self.delEventMap() self.fig.clear() self.drawAxes() self.toolbar.update() self.drawSavedPicks() self.multicursorReinit() self.updatePlot() self.updateStreamLabels() self.canv.draw()
08072571b11b984a33e9ee53ba52401ff881eaff /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10346/08072571b11b984a33e9ee53ba52401ff881eaff/obspyck.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 14401, 5391, 5706, 863, 67, 7475, 329, 12, 2890, 16, 871, 4672, 9502, 67, 323, 10014, 273, 306, 2890, 18, 5391, 9094, 1595, 16, 365, 18, 5391, 9094, 4741, 11372, 16, 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, 603, 67, 14401, 5391, 5706, 863, 67, 7475, 329, 12, 2890, 16, 871, 4672, 9502, 67, 323, 10014, 273, 306, 2890, 18, 5391, 9094, 1595, 16, 365, 18, 5391, 9094, 4741, 11372, 16, 365, 18, ...
'prependpath': prependpath
'prependpath': prependpath, 'include': self.include,
def __init__(self, filename=_default_jhbuildrc): self._config = { '__file__': _defaults_file, 'addpath': addpath, 'prependpath': prependpath }
9f97cb52d1241253bac24ff6151350cb49d74b5e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4596/9f97cb52d1241253bac24ff6151350cb49d74b5e/config.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1544, 33, 67, 1886, 67, 78, 76, 3510, 1310, 4672, 365, 6315, 1425, 273, 288, 4940, 768, 972, 4278, 389, 7606, 67, 768, 16, 296, 1289, 803, 4278, 225, 5...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1544, 33, 67, 1886, 67, 78, 76, 3510, 1310, 4672, 365, 6315, 1425, 273, 288, 4940, 768, 972, 4278, 389, 7606, 67, 768, 16, 296, 1289, 803, 4278, 225, 5...
return self.mon.event_pending()
return len(self.events) > 0 or self.mon.event_pending()
def pending(self): return self.mon.event_pending()
c56ea4ee3fa882b74fcffc2680d79f3e442382e8 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11867/c56ea4ee3fa882b74fcffc2680d79f3e442382e8/FileMonitor.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4634, 12, 2890, 4672, 327, 365, 18, 2586, 18, 2575, 67, 9561, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4634, 12, 2890, 4672, 327, 365, 18, 2586, 18, 2575, 67, 9561, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
self._comp_valaddeds()
if self._valaddeds is None: self._comp_valaddeds()
def newton_polygon(self): r""" Returns a list of vertices of the Newton polygon of this polynomial.
481070b963b607f79661819f7f681871284a9c3e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/481070b963b607f79661819f7f681871284a9c3e/polynomial_padic_capped_relative_dense.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 394, 1917, 67, 20917, 12, 2890, 4672, 436, 8395, 2860, 279, 666, 434, 6928, 434, 326, 1166, 1917, 7154, 434, 333, 16991, 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, 394, 1917, 67, 20917, 12, 2890, 4672, 436, 8395, 2860, 279, 666, 434, 6928, 434, 326, 1166, 1917, 7154, 434, 333, 16991, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
out.write("\";\nchar *HGDate = \"")
out.write("\";\nwchar_t *HGDate = L\"")
def main(): if (len(sys.argv) < 2): print "Output file not specifed!" sys.exit(1) out = open(sys.argv[1], "wb") out.write("char *HGVersion = \"") out.flush() id = tempfile.TemporaryFile() subprocess.Popen("hg id", stdout=id).wait() id.seek(0) out.write(string.split(id.readline(), "\n")[0]) out.flush() out.write("\";\nchar *HGDate = \"") out.flush() subprocess.Popen('hg parents --template "{date|date}"', stdout=out).wait() out.flush() out.write('";\n') out.close()
14af06975546f7acaf80592693584fc501ea38c0 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6977/14af06975546f7acaf80592693584fc501ea38c0/version.cpp.maker.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 309, 261, 1897, 12, 9499, 18, 19485, 13, 411, 576, 4672, 1172, 315, 1447, 585, 486, 857, 430, 329, 4442, 2589, 18, 8593, 12, 21, 13, 225, 596, 273, 1696, 12, 9499, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 309, 261, 1897, 12, 9499, 18, 19485, 13, 411, 576, 4672, 1172, 315, 1447, 585, 486, 857, 430, 329, 4442, 2589, 18, 8593, 12, 21, 13, 225, 596, 273, 1696, 12, 9499, 18, 1...
def __init__(self, sock, mode, closer):
def __init__(self, sock, mode):
def __init__(self, sock, mode, closer): if mode not in ("r", "w", "rw"): raise ValueError("invalid mode: %r" % mode) io.RawIOBase.__init__(self) self._sock = sock self._mode = mode self._closer = closer self._reading = "r" in mode self._writing = "w" in mode closer.makefile_open()
d76d382dfd07a08af0416bfb9e5ed3d6263b3698 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12029/d76d382dfd07a08af0416bfb9e5ed3d6263b3698/socket.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 7313, 16, 1965, 4672, 309, 1965, 486, 316, 7566, 86, 3113, 315, 91, 3113, 315, 21878, 6, 4672, 1002, 2068, 2932, 5387, 1965, 30, 738, 86, 6, 738, 1965, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 7313, 16, 1965, 4672, 309, 1965, 486, 316, 7566, 86, 3113, 315, 91, 3113, 315, 21878, 6, 4672, 1002, 2068, 2932, 5387, 1965, 30, 738, 86, 6, 738, 1965, ...
def GetMemberName(id, member_offset):
def GetMemberNames(sid, member_offset):
def GetMemberName(id, member_offset): """ Get name of a member of a structure @param id: structure type ID @param member_offset: member offset. The offset can be any offset in the member. For example, is a member is 4 bytes long and starts at offset 2, then 2,3,4,5 denote the same structure member. @return: None if bad structure type ID is passed or no such member in the structure otherwise returns name of the specified member. """ s = idaapi.get_struc(id) if not s: return None m = idaapi.get_member(s, member_offset) if not m: return None return idaapi.get_member_name(m.id)
4f22943d42ee1d5013421d280b3bd776bee83fb9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3410/4f22943d42ee1d5013421d280b3bd776bee83fb9/idc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 968, 4419, 1557, 12, 7453, 16, 3140, 67, 3348, 4672, 3536, 968, 508, 434, 279, 3140, 434, 279, 3695, 225, 632, 891, 612, 30, 3695, 618, 1599, 632, 891, 3140, 67, 3348, 30, 3140, 1384, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 968, 4419, 1557, 12, 7453, 16, 3140, 67, 3348, 4672, 3536, 968, 508, 434, 279, 3140, 434, 279, 3695, 225, 632, 891, 612, 30, 3695, 618, 1599, 632, 891, 3140, 67, 3348, 30, 3140, 1384, ...