rem
stringlengths
2
226k
add
stringlengths
0
227k
context
stringlengths
8
228k
meta
stringlengths
156
215
input_ids
list
attention_mask
list
labels
list
tmp_load = imp.load_module(name, file, pathname, desc)
tmp_load = imp.load_module(plugin['plugin'], file, pathname, desc)
def recheckPluginsErrors(self, plugins, plugin_api): for plugin in plugins: if plugin['error']: error = False missing = [] missing_dbus = []
0bf782abf2009bca8b621badc8eba65304b3b108 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8234/0bf782abf2009bca8b621badc8eba65304b3b108/engine.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 283, 1893, 9461, 4229, 12, 2890, 16, 4799, 16, 1909, 67, 2425, 4672, 364, 1909, 316, 4799, 30, 309, 1909, 3292, 1636, 3546, 30, 555, 273, 1083, 3315, 273, 5378, 3315, 67, 1966, 407, 27...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 283, 1893, 9461, 4229, 12, 2890, 16, 4799, 16, 1909, 67, 2425, 4672, 364, 1909, 316, 4799, 30, 309, 1909, 3292, 1636, 3546, 30, 555, 273, 1083, 3315, 273, 5378, 3315, 67, 1966, 407, 27...
self.cf.AddSaveFrame("test_save_frame",self.save_block)
self.cf["saves"]["test_save_frame"] = self.save_block
def setUp(self): """Write out a file, then read it in again""" # fill up the block with stuff items = (('_item_1','Some data'), ('_item_2','Some_underline_data'), ('_item_3','34.2332'), ('_item_4','Some very long data which we hope will overflow the single line and force printing of another line aaaaa bbbbbb cccccc dddddddd eeeeeeeee fffffffff hhhhhhhhh iiiiiiii jjjjjj'), (('_item_5','_item_6','_item_7'), ([1,2,3,4], [5,6,7,8], ['a','b','c','d'])), (('_string_1','_string_2'), ([';this string begins with a semicolon', 'this string is way way too long and should overflow onto the next line eventually if I keep typing for long enough', ';just_any_old_semicolon-starting-string'], ['a string with a final quote"', 'a string with a " and a safe\';', 'a string with a final \'']))) # save block items as well s_items = (('_sitem_1','Some save data'), ('_sitem_2','Some_underline_data'), ('_sitem_3','34.2332'), ('_sitem_4','Some very long data which we hope will overflow the single line and force printing of another line aaaaa bbbbbb cccccc dddddddd eeeeeeeee fffffffff hhhhhhhhh iiiiiiii jjjjjj'), (('_sitem_5','_sitem_6','_sitem_7'), ([1,2,3,4], [5,6,7,8], ['a','b','c','d'])), (('_string_1','_string_2'), ([';this string begins with a semicolon', 'this string is way way too long and should overflow onto the next line eventually if I keep typing for long enough', ';just_any_old_semicolon-starting-string'], ['a string with a final quote"', 'a string with a " and a safe\';', 'a string with a final \'']))) self.cf = CifFile.CifBlock(items) self.save_block = CifFile.CifBlock(s_items) self.cf.AddSaveFrame("test_save_frame",self.save_block) self.cfs = self.cf["saves"]["test_save_frame"] cif = CifFile.CifFile() cif['testblock'] = self.cf outfile = open('test.cif','w') outfile.write(str(cif)) outfile.close() self.df = CifFile.CifFile('test.cif')['testblock'] self.dfs = self.df["saves"]["test_save_frame"]
7b0eab8618df6191909c15bb7cbdefa3ffe63076 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3057/7b0eab8618df6191909c15bb7cbdefa3ffe63076/TestPyCifRW.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24292, 12, 2890, 4672, 3536, 3067, 596, 279, 585, 16, 1508, 855, 518, 316, 3382, 8395, 468, 3636, 731, 326, 1203, 598, 10769, 1516, 273, 261, 2668, 67, 1726, 67, 21, 17023, 17358, 501, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24292, 12, 2890, 4672, 3536, 3067, 596, 279, 585, 16, 1508, 855, 518, 316, 3382, 8395, 468, 3636, 731, 326, 1203, 598, 10769, 1516, 273, 261, 2668, 67, 1726, 67, 21, 17023, 17358, 501, ...
self.client.voidresp()
self.assertEqual(self.client.voidresp(), "226 transfer complete")
def test_data_connection(self): # clear text sock = self.client.transfercmd('list') self.assertNotIsInstance(sock, ssl.SSLSocket) sock.close() self.client.voidresp()
b2f55ba8031d7e661f3a018eea787a8b784a6e9e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12029/b2f55ba8031d7e661f3a018eea787a8b784a6e9e/test_ftplib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 892, 67, 4071, 12, 2890, 4672, 468, 2424, 977, 7313, 273, 365, 18, 2625, 18, 13866, 4172, 2668, 1098, 6134, 365, 18, 11231, 1248, 2520, 1442, 12, 15031, 16, 5832, 18, 1260, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 892, 67, 4071, 12, 2890, 4672, 468, 2424, 977, 7313, 273, 365, 18, 2625, 18, 13866, 4172, 2668, 1098, 6134, 365, 18, 11231, 1248, 2520, 1442, 12, 15031, 16, 5832, 18, 1260, 2...
NOTE: When polynomials are normalized in arithmetic operations
NOTE: The timing of normalization in arithmetic operations
def _mul_(self, right): r""" Multiplies self and right.
04fbc0922cf1afbc8d5e2f783cea01d23cbba31a /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/04fbc0922cf1afbc8d5e2f783cea01d23cbba31a/polynomial_padic_capped_relative_dense.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 16411, 67, 12, 2890, 16, 2145, 4672, 436, 8395, 5991, 5259, 365, 471, 2145, 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, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 16411, 67, 12, 2890, 16, 2145, 4672, 436, 8395, 5991, 5259, 365, 471, 2145, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
if isinstance(self._exp, str):
if self._is_special:
def __nonzero__(self): """Is the number non-zero?
1a63da64df2af26e1f050749c19281f1de9084fa /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/1a63da64df2af26e1f050749c19281f1de9084fa/decimal.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 26449, 972, 12, 2890, 4672, 3536, 2520, 326, 1300, 1661, 17, 7124, 35, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 26449, 972, 12, 2890, 4672, 3536, 2520, 326, 1300, 1661, 17, 7124, 35, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
private_var_docs = doc.select_variables(group=None, imported=False, value_type=value_type, public=False) if private_var_docs: out('<div class="private">\n') self.write_table_header(out, "summary continue") self.write_group_header(out, 'Private %s' % heading, "group continue") self.write_summary_line(out, private_var_docs[0], doc) for var_doc in private_var_docs[1:]: self.write_summary_line(out, var_doc, doc) out(self.TABLE_FOOTER) out('</div>\n') out('%s<br />\n' % self.PRIVATE_LINK) out('<br />\n')
out('\n<br />\n') def write_summary_group(self, out, doc, name, var_docs, grouped_inh_vars): listed_inh_vars = {} normal_vars = [] for i in range(len(var_docs)-1, -1, -1): vardoc = var_docs[i] if vardoc.is_inherited == True: base = vardoc.container if (base not in self.docindex.contained_valdocs or self._inheritance == 'listed'): listed_inh_vars.setdefault(base,[]).append(vardoc) continue elif self._inheritance == 'grouped': grouped_inh_vars.setdefault(base,[]).append(vardoc) continue normal_vars.append(vardoc) if name != '': self.write_group_header(out, name) for vardoc in normal_vars: self.write_summary_line(out, vardoc, doc) if listed_inh_vars: self.write_inheritance_list(out, doc, listed_inh_vars) def write_inheritance_list(self, out, doc, listed_inh_vars): out(' <tr>\n <td colspan="2">\n') for base in doc.mro(): if base not in listed_inh_vars: continue public_vars = [v for v in listed_inh_vars[base] if v.is_public] private_vars = [v for v in listed_inh_vars[base] if not v.is_public] if public_vars: out(' <p class="varlist">' '<span class="varlist-header">Inherited ' 'from <code>%s</code></span>:\n' % self.href(base, self.base_label(doc, base))) self.write_var_list(out, public_vars) out(' </p>\n') if private_vars: out(' <div class="private">') out(' <p class="varlist">' '<span class="varlist-header">Inherited ' 'from <code>%s</code></span> (private):\n' % self.href(base, self.base_label(doc, base))) self.write_var_list(out, private_vars) out(' </p></div>\n') out(' </td>\n </tr>\n') def write_var_list(self, out, vardocs): out(' ') out(',\n '.join(['<code>%s</code>' % self.href(v,v.name) for v in vardocs])+'\n')
def write_summary_table(self, out, heading, doc, value_type): """ Generate HTML code for a summary table, and write it to C{out}. A summary table is a table that includes a one-row description for each variable (of a given type) in a module or class.
b9a04f544e12574efdc55498e87f9f25c7c85265 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11420/b9a04f544e12574efdc55498e87f9f25c7c85265/html.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 67, 7687, 67, 2121, 12, 2890, 16, 596, 16, 11053, 16, 997, 16, 460, 67, 723, 4672, 3536, 6654, 3982, 981, 364, 279, 4916, 1014, 16, 471, 1045, 518, 358, 385, 95, 659, 5496, 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, 1045, 67, 7687, 67, 2121, 12, 2890, 16, 596, 16, 11053, 16, 997, 16, 460, 67, 723, 4672, 3536, 6654, 3982, 981, 364, 279, 4916, 1014, 16, 471, 1045, 518, 358, 385, 95, 659, 5496, 225...
self.events = []
self.events = []
def __init__(self,id,title,days): self.id=id self.title=title
7b81d7649c303a524c05ce546e3b0939b85ecafa /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/7b81d7649c303a524c05ce546e3b0939b85ecafa/xml_tv_be.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 350, 16, 2649, 16, 9810, 4672, 365, 18, 350, 33, 350, 365, 18, 2649, 33, 2649, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 350, 16, 2649, 16, 9810, 4672, 365, 18, 350, 33, 350, 365, 18, 2649, 33, 2649, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
result += "{%s}" % compress(node.body)
body = compress(node.body) if body.endswith(__semicolonSymbol): body = body[:-len(__semicolonSymbol)] result += "{%s}" % body
def __function(node): global __endsBlock if node.type == "setter": result = "set" elif node.type == "getter": result = "get" else: result = "function" name = getattr(node, "name", None) if name: result += " %s" % name params = getattr(node, "params", None) result += "(%s)" % compress(params) if params else "()" # keep expression closure format (may be micro-optimized for other code, too) if getattr(node, "expressionClosure", False): result += compress(node.body) else: result += "{%s}" % compress(node.body) __endsBlock = True return result
043efde493e39135f1bb12fa33be3bceca19645b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12949/043efde493e39135f1bb12fa33be3bceca19645b/Compressor.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 915, 12, 2159, 4672, 2552, 1001, 5839, 1768, 225, 309, 756, 18, 723, 422, 315, 18062, 6877, 563, 273, 315, 542, 6, 1327, 756, 18, 723, 422, 315, 11990, 6877, 563, 273, 315, 588, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 915, 12, 2159, 4672, 2552, 1001, 5839, 1768, 225, 309, 756, 18, 723, 422, 315, 18062, 6877, 563, 273, 315, 542, 6, 1327, 756, 18, 723, 422, 315, 11990, 6877, 563, 273, 315, 588, ...
print "in receiveWakeupCall()"
def receiveWakeupCall(self, wakeupCallItem): print "in receiveWakeupCall()"
05189c8984d81ea78f05e9f37c7ca341d9431ba2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/05189c8984d81ea78f05e9f37c7ca341d9431ba2/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6798, 59, 911, 416, 1477, 12, 2890, 16, 19891, 416, 1477, 1180, 4672, 1172, 315, 267, 6798, 59, 911, 416, 1477, 10031, 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, 0, 0, 0, 0, 0, 0, 0, 0, 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, 6798, 59, 911, 416, 1477, 12, 2890, 16, 19891, 416, 1477, 1180, 4672, 1172, 315, 267, 6798, 59, 911, 416, 1477, 10031, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
self.SetEdgeMode(stc.STC_EDGE_BACKGROUND) self.SetEdgeColumn(78)
self.SetUseAntiAliasing(True)
def __init__ (self,parent): wx.stc.StyledTextCtrl.__init__(self,parent) font = wx.Font(10, wx.MODERN, wx.NORMAL, wx.NORMAL, False, "Courier New") self.StyleSetFont(wx.stc.STC_STYLE_DEFAULT, font) self.Bind(wx.EVT_CHAR, self.OnChar) self.SetModEventMask(wx.stc.STC_MOD_INSERTTEXT | wx.stc.STC_MOD_DELETETEXT | wx.stc.STC_PERFORMED_USER) self.Bind(wx.stc.EVT_STC_CHANGE, self.OnStcChange) self.CmdKeyAssign(ord('B'), stc.STC_SCMOD_CTRL, stc.STC_CMD_ZOOMIN) self.CmdKeyAssign(ord('N'), stc.STC_SCMOD_CTRL, stc.STC_CMD_ZOOMOUT)
a80838c2381f3fc8cfc375d205893d1fbbe163d0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11200/a80838c2381f3fc8cfc375d205893d1fbbe163d0/Psycollider.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 261, 2890, 16, 2938, 4672, 7075, 18, 334, 71, 18, 24273, 1259, 1528, 12418, 16186, 2738, 972, 12, 2890, 16, 2938, 13, 3512, 273, 7075, 18, 5711, 12, 2163, 16, 7075, 18...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 261, 2890, 16, 2938, 4672, 7075, 18, 334, 71, 18, 24273, 1259, 1528, 12418, 16186, 2738, 972, 12, 2890, 16, 2938, 13, 3512, 273, 7075, 18, 5711, 12, 2163, 16, 7075, 18...
dept = self.EPS_info[0], company = self.EPS_info[1], preview = self.preview, showBorder=self.showBorder)
dept = getattr(self,'EPS_info',['Testing'])[0], company = getattr(self,'EPS_info',['','ReportLab'])[1], preview = getattr(self,'preview',1), showBorder=getattr(self,'showBorder',0))
def save(self, formats=None, verbose=None, fnRoot=None, outDir=None): "Saves copies of self in desired location and formats" ext = '' outDir = outDir or getattr(self,'outDir','.') if not os.path.isabs(outDir): outDir = os.path.join(os.path.dirname(sys.argv[0]),outDir) if not os.path.isdir(outDir): os.makedirs(outDir) fnroot = os.path.normpath(os.path.join(outDir, fnRoot or (getattr(self,'fileNamePattern',(self.__class__.__name__+'%03d')) % getattr(self,'chartId',0))))
5b38073372627f878dc0f00863aadbb4fa49e973 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/5b38073372627f878dc0f00863aadbb4fa49e973/shapes.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1923, 12, 2890, 16, 6449, 33, 7036, 16, 3988, 33, 7036, 16, 2295, 2375, 33, 7036, 16, 596, 1621, 33, 7036, 4672, 315, 13370, 13200, 434, 365, 316, 6049, 2117, 471, 6449, 6, 1110, 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, 1923, 12, 2890, 16, 6449, 33, 7036, 16, 3988, 33, 7036, 16, 2295, 2375, 33, 7036, 16, 596, 1621, 33, 7036, 4672, 315, 13370, 13200, 434, 365, 316, 6049, 2117, 471, 6449, 6, 1110, 273, ...
else: commit_string = self._editor.get_all_input_strings () self._editor.clear () self._update_ui () self.commit_string (commit_string) self._refresh_properties () return True elif key.code == keysyms.Escape: if self._editor.is_empty () and (not self._editor._py_mode) : return False else: self.reset () self._update_ui () return True
if key.code == keysyms.Escape: self.reset () self._update_ui () return True elif key.code in (keysyms.Return, keysyms.KP_Enter): commit_string = self._editor.get_all_input_strings () self.commit_string (commit_string) self._editor.clear () self._update_ui () return True
def _table_mode_process_key_event (self, key): '''Xingma Mode Process Key Event''' cond_letter_translate = lambda (c): \ self._convert_to_full_width (c) if self._full_width_letter [self._mode] else c cond_punct_translate = lambda (c): \ self._convert_to_full_width (c) if self._full_width_punct [self._mode] else c # We have to process the pinyin mode change key event here, # because we ignore all Release event below. if self._match_hotkey (key, keysyms.Shift_R, modifier.SHIFT_MASK + modifier.RELEASE_MASK) and self._ime_py: res = self._editor.r_shift () self._refresh_properties () self._update_ui () return res # process commit to preedit if self._match_hotkey (key, keysyms.Shift_R, modifier.SHIFT_MASK + modifier.RELEASE_MASK) or self._match_hotkey (key, keysyms.Shift_L, modifier.SHIFT_MASK + modifier.RELEASE_MASK): res = self._editor.l_shift () self._update_ui () return res # Match sigle char mode switch hotkey if self._match_hotkey (key, keysyms.comma, modifier.CONTROL_MASK): self.property_activate ( u"onechar" ) return True # Ignore key release event now :) if key.mask & modifier.RELEASE_MASK: return True
020920c335d9cd332820caadfe129ed724f8364a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/544/020920c335d9cd332820caadfe129ed724f8364a/table.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2121, 67, 3188, 67, 2567, 67, 856, 67, 2575, 261, 2890, 16, 498, 4672, 9163, 60, 310, 2540, 8126, 4389, 1929, 2587, 26418, 6941, 67, 13449, 67, 13929, 273, 3195, 261, 71, 4672, 52...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2121, 67, 3188, 67, 2567, 67, 856, 67, 2575, 261, 2890, 16, 498, 4672, 9163, 60, 310, 2540, 8126, 4389, 1929, 2587, 26418, 6941, 67, 13449, 67, 13929, 273, 3195, 261, 71, 4672, 52...
Options FollowSymLinks MultiViews AllowOverride None Order allow,deny Allow from all </Directory> <Directory %(wsgidir)s>
def cli_cmd_create_apache_conf(conf): """ Create Apache conf files for this site, keeping previous files in a backup copy. """ print ">>> Going to create Apache conf files..." from invenio.textutils import wrap_text_in_a_box apache_conf_dir = conf.get("Invenio", 'CFG_ETCDIR') + \ os.sep + 'apache' ## TODO: add here the distribution signatures of those distributions ## that already provide some ports.conf configuration file. for distribution_signature in ('redhat-release', 'debian_version'): if os.path.exists(os.path.sep + 'etc' + os.path.sep + distribution_signature): comment_out_listen_directive = '#' break else: comment_out_listen_directive = '' if not os.path.exists(apache_conf_dir): os.mkdir(apache_conf_dir) apache_vhost_file = apache_conf_dir + os.sep + \ 'invenio-apache-vhost.conf' apache_vhost_ssl_file = apache_conf_dir + os.sep + \ 'invenio-apache-vhost-ssl.conf' apache_vhost_body = """\
53244c6b6de2164b0461a653ffd6698c7b01b218 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12027/53244c6b6de2164b0461a653ffd6698c7b01b218/inveniocfg.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4942, 67, 4172, 67, 2640, 67, 19211, 67, 3923, 12, 3923, 4672, 3536, 1788, 24840, 2195, 1390, 364, 333, 2834, 16, 19966, 2416, 1390, 316, 279, 5114, 1610, 18, 3536, 1172, 315, 23012, 422...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4942, 67, 4172, 67, 2640, 67, 19211, 67, 3923, 12, 3923, 4672, 3536, 1788, 24840, 2195, 1390, 364, 333, 2834, 16, 19966, 2416, 1390, 316, 279, 5114, 1610, 18, 3536, 1172, 315, 23012, 422...
self.first_dialog_load = False
self.first_dialog_load = True
def __init__(self): """ Initializes everything needed for the GUI. """ gladefile = "data/wicd.glade" self.windowname = "gtkbench" self.wTree = gtk.glade.XML(gladefile)
1f1b0f9304666cbed910e2413d5ecd57cb0b5524 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/353/1f1b0f9304666cbed910e2413d5ecd57cb0b5524/gui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 3536, 10188, 3128, 7756, 3577, 364, 326, 10978, 18, 3536, 5118, 69, 536, 398, 273, 315, 892, 19, 91, 335, 72, 18, 7043, 2486, 6, 365, 18, 5668, 529, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 3536, 10188, 3128, 7756, 3577, 364, 326, 10978, 18, 3536, 5118, 69, 536, 398, 273, 315, 892, 19, 91, 335, 72, 18, 7043, 2486, 6, 365, 18, 5668, 529, ...
self._feed(isHTML=isHTML)
self._feed()
def __init__(self, markup="", parseOnlyThese=None, fromEncoding=None, markupMassage=True, smartQuotesTo=XML_ENTITIES, convertEntities=None, selfClosingTags=None, isHTML=False, builder=HTMLParserBuilder): """The Soup object is initialized as the 'root tag', and the provided markup (which can be a string or a file-like object) is fed into the underlying parser.
7300e101f39b7a1a436c6765d140c987cbc58a45 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4404/7300e101f39b7a1a436c6765d140c987cbc58a45/BeautifulSoup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 9813, 1546, 3113, 1109, 3386, 29690, 33, 7036, 16, 628, 4705, 33, 7036, 16, 9813, 18060, 410, 33, 5510, 16, 13706, 14292, 774, 33, 4201, 67, 2222, 25673, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 9813, 1546, 3113, 1109, 3386, 29690, 33, 7036, 16, 628, 4705, 33, 7036, 16, 9813, 18060, 410, 33, 5510, 16, 13706, 14292, 774, 33, 4201, 67, 2222, 25673, ...
p1 = self.lastTopicSync and topics.index(self.lastTopicSync) or 0
p1 = self.lastTopicSync and topics.index(self.lastTopicSync) or -1
def parseLine(self, data, peerid): print peerid,":",data try: dataman = self.servent.manager.datamanager # lol, we need to trim down hierarchies if self.state == STATE_DATABLOCK: terminating = False if data == "DATA FIN": try: content = yaml.load(self.datablock) if 'sig' in content: self.servent.manager.peergov.parseSignedBlob(self.dataparms[0], content) else: print content except: print ("Failed to parse:\n---\n%s\n---" % self.datablock) traceback.print_exc() sys.exit(1) self.state == STATE_IDLE else: self.datablock += data+"\n" return words = map(lambda x:x.strip(),data.split()) if words[0]=="HELO": if words[1]==self.servent.PROTOCOL_IDENTIFIER: self.protocol_verified = True self.conn.send("EHLO "+self.servent.PROTOCOL_IDENTIFIER+"\n") return elif words[0]=="EHLO": if words[1]==self.servent.PROTOCOL_IDENTIFIER: self.protocol_verified = True self.servent.manager.handleServentEvent(EVT_PEER_PROTOCOL_VERIFIED, self.peerid) return if not self.protocol_verified: print("Protocol mismatch. Terminating connection.") self.stop() return if words[0]=="SYNC": if words[1]=="AUTH": self.syncingAuthorities_lock.acquire(False) # non blocking, lock into syncAuth process if not self.authorities: with dataman.authorities_lock: authorities = dataman.authorities.keys() authorities.sort() self.authorities = authorities p1 = self.lastAuthSync and self.authorities.index(self.lastAuthSync) or 0 if words[2]=="FIN": next = self.authorities[p1+1:] if next: self.conn.send("SYNC AUTH "+next[0]+"\n") else: self.syncingAuthorities_lock.release() self.authorities = None if not "ACK" in words: self.conn.send("SYNC AUTH FIN ACK\n") else: self.servent.manager.handleServentEvent(EVT_PEER_AUTHORITIES_SYNCHRONIZED, self.peerid) return for word in words[2:]: if not word in self.authorities: dataman.addAuthority(word, trusted = False, interesting = False) p2 = self.authorities.index(words[2]) lack = "" for auth in self.authorities[p1+1:p2]: lack += auth+" " self.lastAuthSync = words[-1] if lack: self.conn.send("SYNC AUTH "+lack+"\n") else: next = self.authorities[p2+1:] if next: self.conn.send("SYNC AUTH "+next[0]+"\n") else: self.conn.send("SYNC AUTH FIN\n") return elif words[1]=="TOPC": self.syncingTopics_lock.acquire(False) # non blocking if words[2:]: authority = None nextword = 2 if "/" in words[2]: authority = dataman.getAuthority(words[2][:words[2].index("/")]) else: authority = dataman.getAuthority(words[2]) #authority fpr nextword = 3 if authority: with authority.topics_lock: topics = authority.topics.keys() topics.sort() p1 = self.lastTopicSync and topics.index(self.lastTopicSync) or 0 if words[nextword]=="FIN": next = topics[p1+1:] if next: self.lastTopicSync = next[0] self.conn.send("SYNC TOPC %s" % (next[0])) else: self.syncingTopics_lock.release() if not "ACK" in words: self.conn.send("SYNC TOPC %s FIN ACK\n" % (authority.fpr)) else: self.servent.manager.handleServentEvent(EVT_PEER_TOPIC_SYNCHRONIZED, self.peerid) # do we need this event? return for word in words[nextword:]: if not word in topics: self.conn.send("SEND TOPC %s\n" % (word)) else: self.syncTopicData(authority, word) p2 = topics.index(words[nextword]) lack = "" for topic in topics[p1+1:p2]: lack += topic+" " self.lastTopicSync = words[-1] if lack: self.conn.send("SYNC TOPC %s\n" % (lack)) else: next = topics[p2+1:] if next: self.lastTopicSync = next[0] self.conn.send("SYNC TOPC %s\n" % (next[0])) else: self.conn.send("SYNC TOPC %s FIN\n" % (authority.fpr)) return elif words[1]=="PROP": self.syncingProposals_lock.acquire(False) # non blocking if words[2:]: authority = dataman.getAuthority(words[2][:words[2].index("/")]) if authority: with authority.topics_lock: topic = authority.topics[words[2]] with topic.proposals_lock: proposals = map(lambda x:x['id'], topic.proposals[:]) proposals.sort() p1 = self.lastProposalSync and proposals.index(self.lastProposalSync) or 0 if words[3] == "FIN": next = proposals[p1+1:] if next: self.lastProposalSync = next[0] self.conn.send("SYNC PROP %s %s\n" % (words[2], next[0])) else: self.syncingProposals_lock.release() if not "ACK" in words: self.conn.send("SYNC PROP %s FIN ACK\n" % (words[2])) else: self.servent.manager.handleServentEvent(EVT_PEER_PROPOSALS_SYNCHRONIZED, self.peerid) return for word in words[3:]: if not word in proposals: self.conn.send("SEND PROP %s %s\n" % (words[2], word)) p2 = proposals.index(words[3]) lack = "" for proposal in proposals[p1+1:p2]: lack += proposal+" " self.lastProposalSync = words[-1] if lack: self.conn.send("SYNC PROP %s %s\n" % (words[2], lack)) else: next = proposals[p2+1:] if next: self.lastProposalSync = next[0] self.conn.send("SYNC PROP %s %s\n" % (words[2], next[0])) else: self.conn.send("SYNC PROP %s FIN\n" % (words[2])) return elif words[1]=="VOTE": self.syncingVotes_lock.acquire(False) # non blocking if words[2:]: authority = dataman.getAuthority(words[2][:words[2].index("/")]) if authority: with authority.topics_lock: topic = authority.topics[words[2]] with topic.votes_lock: votes = topic.votes.keys() votes.sort() p1 = self.lastVoteSync and votes.index(self.lastVoteSync) or 0 if words[3] == "FIN": next = votes[p1+1:] if next: self.lastVoteSync = next[0] self.conn.send("SYNC VOTE %s %s\n" % (words[2], next[0])) else: self.syncingVotes_lock.release() if not "ACK" in words: self.conn.send("SYNC VOTE %s FIN ACK\n" % (words[2])) else: self.servent.manager.handleServentEvent(EVT_PEER_VOTES_SYNCHRONIZED, self.peerid) return for word in words[3:]: if not word in votes: self.conn.send("SEND VOTE %s %s\n" % (words[2], word)) p2 = votes.index(words[3]) lack = "" for vote in votes[p1+1:p2]: lack += vote+" " self.lastVoteSync = words[-1] if lack: self.conn.send("SYNC VOTE %s %s\n" % (words[2], lack)) else: next = votes[p2+1:] if next: self.lastVoteSync = next[0] self.conn.send("SYNC VOTE %s %s\n" % (words[2], next[0])) else: self.conn.send("SYNC VOTE %s FIN\n" % (words[2])) return elif words[0]=="SEND": if words[1]=="TOPC": authority = dataman.getAuthority(words[2][:words[2].index("/")]) topic = authority.topics[words[2]] if topic: yamldata = open(self.servent.manager.peergov.datadir + "/" + words[2] + "/.topic", "r") data = yaml.load(yamldata.read()) yamldata.close() self.conn.send("DATA TOPC %s\n" % (words[2])); self.conn.send("%s\n" % (data)); self.conn.send("DATA FIN\n"); return if words[1]=="PROP": authority = dataman.getAuthority(words[2][:words[2].index("/")]) topic = authority.topics[words[2]] proposal = topic.getProposalById(words[3]) if proposal: yamldata = open(self.servent.manager.peergov.datadir + "/" + words[2] + "/" + words[3], "r") data = yaml.load(yamldata.read()) yamldata.close() self.conn.send("DATA PROP %s %s\n" % (words[2], words[3])); self.conn.send("%s\n" % (data)); self.conn.send("DATA FIN\n"); return if words[1]=="VOTE": authority = dataman.getAuthority(words[2][:words[2].index("/")]) topic = authority.topics[words[2]] vote = topic.votes[words[3]] if vote: yamldata = open(self.servent.manager.peergov.datadir + "/" + words[2] + "/" + words[3], "r") data = yaml.load(yamldata.read()) yamldata.close() self.conn.send("DATA VOTE %s %s\n" % (words[2], words[3])); self.conn.send("%s\n" % (data)); self.conn.send("DATA FIN\n"); return elif words[0]=="DATA": self.state = STATE_DATABLOCK self.datablock = "" self.authority = dataman.getAuthority(words[2][:words[2].index("/")]) self.dataparms = words[2:] return raise(Exception("Instruction just not recognized.")) except Exception, e: traceback.print_exc() print("Failed to parse incoming data. %s" % str(e))
5801a06c8d2b0dc8d1d3752aeff1a5ef49c41d7c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12833/5801a06c8d2b0dc8d1d3752aeff1a5ef49c41d7c/servent.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 1670, 12, 2890, 16, 501, 16, 4261, 350, 4672, 1172, 4261, 350, 10837, 2773, 16, 892, 775, 30, 1150, 301, 304, 273, 365, 18, 550, 616, 18, 4181, 18, 3404, 301, 1063, 225, 468, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 1670, 12, 2890, 16, 501, 16, 4261, 350, 4672, 1172, 4261, 350, 10837, 2773, 16, 892, 775, 30, 1150, 301, 304, 273, 365, 18, 550, 616, 18, 4181, 18, 3404, 301, 1063, 225, 468, 3...
wrapper.__doc__=f.__doc__+"\n Setting invert=True input and output get a transformation x+1 for each variable x, which shouldn't effect the calculated GB, but the algorithm"
wrapper.__doc__=f.__doc__
def wrapper(I,**kwds): prot=False if "prot" in kwds: prot=kwds["prot"] for o in if_not_option: if (o in kwds and kwds[o]) or (o not in kwds and groebner_basis.options[o]): option_set=False if not "option_set" in locals(): if option in kwds: option_set=kwds[option] else: option_set=default kwds=dict(((o,kwds[o]) for o in kwds if o!=option)) state=None if option_set: if pre: if prot: print "preprocessing for option:", option if not pass_option_set: (I,state)=pre(I) else: (I,state)=pre(I,option_set) res=f(I,**kwds) if option_set: if post: if prot: print "postprocessing for option:", option res=post(res,state)
e88e8dd5db3619640e169424c96bd19aa6773a4b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2046/e88e8dd5db3619640e169424c96bd19aa6773a4b/gbcore.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4053, 12, 45, 16, 636, 25577, 4672, 11121, 33, 8381, 309, 315, 11815, 6, 316, 17149, 30, 11121, 33, 25577, 9614, 11815, 11929, 364, 320, 316, 309, 67, 902, 67, 3482, 30, 309, 261, 83, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4053, 12, 45, 16, 636, 25577, 4672, 11121, 33, 8381, 309, 315, 11815, 6, 316, 17149, 30, 11121, 33, 25577, 9614, 11815, 11929, 364, 320, 316, 309, 67, 902, 67, 3482, 30, 309, 261, 83, ...
child = self.firstChild while child:
for child in self.children:
def _get_recursiveDescendants(self): """Recursively traverse and return the descendants of this object. This is a depth-first forward traversal. @return: The recursive descendants of this object. @rtype: generator of L{NVDAObject} """ child = self.firstChild while child: yield child for recursiveChild in child.recursiveDescendants: yield recursiveChild child = child.next
e9767beab58c489775a4f447fde63ede721f2277 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9340/e9767beab58c489775a4f447fde63ede721f2277/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 10543, 30385, 12, 2890, 4672, 3536, 12474, 10080, 471, 327, 326, 18039, 434, 333, 733, 18, 1220, 353, 279, 3598, 17, 3645, 5104, 15940, 18, 632, 2463, 30, 1021, 5904, 18039...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 10543, 30385, 12, 2890, 4672, 3536, 12474, 10080, 471, 327, 326, 18039, 434, 333, 733, 18, 1220, 353, 279, 3598, 17, 3645, 5104, 15940, 18, 632, 2463, 30, 1021, 5904, 18039...
([(0 : -1 : 1)], '5', 0.0511114075779915)
([(0 : 0 : 1)], '5', 0.0511114075779915)
def saturation(self, points, verbose=False, max_prime=0, odd_primes_only=False): """ Given a list of rational points on E, compute the saturation in E(Q) of the subgroup they generate.
cc54f3a73ad7930f2cc5ad34dd13260211d3c00c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/cc54f3a73ad7930f2cc5ad34dd13260211d3c00c/ell_rational_field.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 22824, 12, 2890, 16, 3143, 16, 3988, 33, 8381, 16, 943, 67, 16382, 33, 20, 16, 14800, 67, 683, 4485, 67, 3700, 33, 8381, 4672, 3536, 16803, 279, 666, 434, 436, 8371, 3143, 603, 512, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 22824, 12, 2890, 16, 3143, 16, 3988, 33, 8381, 16, 943, 67, 16382, 33, 20, 16, 14800, 67, 683, 4485, 67, 3700, 33, 8381, 4672, 3536, 16803, 279, 666, 434, 436, 8371, 3143, 603, 512, ...
device_rp = rbdir.append("aux") if device_rp.lstat(): local_edd = 1 else: local_edd = 0
try: device_rp = rbdir.append("aux") if device_rp.lstat(): local_edd = 1 else: local_edd = 0 except (OSError): local_edd = 1
def set_must_escape_dos_devices(self, rbdir): """If local edd or src edd, then must escape """ device_rp = rbdir.append("aux") if device_rp.lstat(): local_edd = 1 else: local_edd = 0 SetConnections.UpdateGlobal('must_escape_dos_devices', \ self.src_fsa.escape_dos_devices or local_edd) log.Log("Backup: must_escape_dos_devices = %d" % \ (self.src_fsa.escape_dos_devices or local_edd), 4)
b8a8f0407b1b2a63b2a9edd2543147cf27293aa2 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/783/b8a8f0407b1b2a63b2a9edd2543147cf27293aa2/fs_abilities.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 11926, 67, 6939, 67, 19219, 67, 12506, 12, 2890, 16, 7138, 1214, 4672, 3536, 2047, 1191, 1675, 72, 578, 1705, 1675, 72, 16, 1508, 1297, 4114, 3536, 775, 30, 2346, 67, 13832, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 11926, 67, 6939, 67, 19219, 67, 12506, 12, 2890, 16, 7138, 1214, 4672, 3536, 2047, 1191, 1675, 72, 578, 1705, 1675, 72, 16, 1508, 1297, 4114, 3536, 775, 30, 2346, 67, 13832, 2...
def rmdirRecursive(self, dir): """This is a replacement for shutil.rmtree that works better under windows. Thanks to Bear at the OSAF for the code.""" if not os.path.exists(dir): return if os.path.islink(dir): os.remove(dir) return os.chmod(dir, 0700) for name in os.listdir(dir): full_name = os.path.join(dir, name) if os.name == 'nt': if not os.access(full_name, os.W_OK): os.chmod(full_name, 0600) if os.path.isdir(full_name): self.rmdirRecursive(full_name) else: os.chmod(full_name, 0700) os.remove(full_name) os.rmdir(dir)
def doWindowsUninstall(self): debug("do windowsUninstall") if self.branch == "1.8.0": uninstexe = self.dest + "/uninstall/uninstall.exe" uninstini = self.dest + "/uninstall/uninstall.ini" debug("uninstexe: " + uninstexe) debug("uninstini: " + uninstini) if os.path.exists(uninstexe): # modify uninstall.ini to run silently debug("modifying uninstall.ini") args = "sed -i.bak 's/Run Mode=Normal/Run Mode=Silent/' " + uninstini proc = subprocess.Popen(args, shell=True) # Todo handle error proc.wait() proc = subprocess.Popen(uninstexe, shell=True) proc.wait() elif self.branch == "1.8.1" or self.branch == "1.8" or self.branch == "1.9": debug("we are in 1.8 uninstall land") uninst = self.dest + "/uninstall/uninst.exe" helper = self.dest + "/uninstall/helper.exe" debug("uninst: " + uninst) debug("helper: " + helper)
f65adeaed4c4ca2db123fccf9b312cfc203a5bae /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/13067/f65adeaed4c4ca2db123fccf9b312cfc203a5bae/mozInstall.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 10399, 31103, 12, 2890, 4672, 1198, 2932, 2896, 9965, 31103, 7923, 309, 365, 18, 7500, 422, 315, 21, 18, 28, 18, 20, 6877, 640, 8591, 14880, 273, 365, 18, 10488, 397, 2206, 28872, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 10399, 31103, 12, 2890, 4672, 1198, 2932, 2896, 9965, 31103, 7923, 309, 365, 18, 7500, 422, 315, 21, 18, 28, 18, 20, 6877, 640, 8591, 14880, 273, 365, 18, 10488, 397, 2206, 28872, ...
New document will be created if not `parent` and no `doc` is given.
New document will be created if no `parent` and no `doc` is given.
def xml(self,doc=None,parent=None): """Get the XML representation of `self`.
ca0c8dbc3ecd0b409f98dffb6e90f2f51152b2c7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12769/ca0c8dbc3ecd0b409f98dffb6e90f2f51152b2c7/vcard.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2025, 12, 2890, 16, 2434, 33, 7036, 16, 2938, 33, 7036, 4672, 3536, 967, 326, 3167, 4335, 434, 1375, 2890, 8338, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2025, 12, 2890, 16, 2434, 33, 7036, 16, 2938, 33, 7036, 4672, 3536, 967, 326, 3167, 4335, 434, 1375, 2890, 8338, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
isize = U32(read32(self.fileobj)) if U32(crc32) != U32(self.crc): raise IOError("CRC check failed %s != %s" % (hex(U32(crc32)), hex(U32(self.crc)))) elif isize != LOWU32(self.size):
isize = read32(self.fileobj) if crc32 != self.crc: raise IOError("CRC check failed %s != %s" % (hex(crc32), hex(self.crc))) elif isize != self.size:
def _read_eof(self): # We've read to the end of the file, so we have to rewind in order # to reread the 8 bytes containing the CRC and the file size. # We check the that the computed CRC and size of the # uncompressed data matches the stored values. Note that the size # stored is the true file size mod 2**32. self.fileobj.seek(-8, 1) crc32 = read32(self.fileobj) isize = U32(read32(self.fileobj)) # may exceed 2GB if U32(crc32) != U32(self.crc): raise IOError("CRC check failed %s != %s" % (hex(U32(crc32)), hex(U32(self.crc)))) elif isize != LOWU32(self.size): raise IOError, "Incorrect length of data produced"
79b4ba8fd7228bc3c477a144ed3f8a93d7b4bb27 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8546/79b4ba8fd7228bc3c477a144ed3f8a93d7b4bb27/gzip.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 896, 67, 9339, 12, 2890, 4672, 468, 1660, 8081, 855, 358, 326, 679, 434, 326, 585, 16, 1427, 732, 1240, 358, 12881, 316, 1353, 468, 358, 436, 264, 684, 326, 1725, 1731, 4191, 326,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 896, 67, 9339, 12, 2890, 4672, 468, 1660, 8081, 855, 358, 326, 679, 434, 326, 585, 16, 1427, 732, 1240, 358, 12881, 316, 1353, 468, 358, 436, 264, 684, 326, 1725, 1731, 4191, 326,...
outwords = num
nkeywords = num
def main(): """Main function """ global options long_flags =["pdffile=", "textfile=" "thesaurus=","ontology=", "output=","nkeywords=", "mode=", "help", "version"] short_flags ="f:t:k:K:o:n:m:hV" format_string = "%Y-%m-%d %H:%M:%S" outwords = 15 input_file = "" dict_file = "" output = 1 mode = 1 temp_text = tmpdir + '/bibclassify.pdftotext.' + str(os.getpid()) try: opts, args = getopt.getopt(sys.argv[1:], short_flags, long_flags) except getopt.GetoptError, err: write_message(err, sys.stderr) usage(1) if args: usage(1) try: for opt in opts: if opt == ("-h","") or opt == ("--help",""): usage(1) elif opt == ("-V","") or opt == ("--version",""): print "Version 0.1" sys.exit(1) elif opt[0] in [ "-f", "--pdffile" ]: if input_file=="": cmd = "%s -nopgbrk -q " % pdftotext + opt[1] + " " + temp_text errcode = os.system(cmd) if errcode == 0 and os.path.exists("%s" % temp_text): input_file = temp_text else: print "Error while running %s.\n" % cmd sys.exit(1) else: print "Either text of pdf file in input" sys.exit(1) elif opt[0] in [ "-t", "--textfile" ]: if input_file=="": input_file = opt[1] else: print "Either text of pdf file in input" sys.exit(1) elif opt[0] in [ "-k", "--thesaurus" ]: if dict_file=="": dict_file = opt[1] else: print "Either a text thesaurus or an ontology (in .rdf format)" sys.exit(1) elif opt[0] in [ "-K", "--ontology" ]: if dict_file=="" and opt[1].find(".rdf")!=-1: dict_file = opt[1] else: print "Either a text thesaurus or an ontology (in .rdf format)" sys.exit(1) elif opt[0] in [ "-o", "--output" ]: try: if str(opt[1]).lower().strip() == "html": output = 1 elif str(opt[1]).lower().strip() == "text": output = 0 else: write_message('Output mode (-o) can only be "HTML" or "TEXT". Using default output mode (HTML)') except: write_message('Output mode (-o) can only be "HTML" or "TEXT". Using default output mode (HTML)') elif opt[0] in [ "-m", "--mode" ]: try: if str(opt[1]).lower().strip() == "fast": mode = 1 elif str(opt[1]).lower().strip() == "slow": mode = 0 else: write_message('Processing mode (-m) can only be "FAST" or "SLOW". Using default output mode (fast)') except: write_message('Processing mode (-m) can only be "FAST" or "SLOW". Using default output mode (fast)') elif opt[0] in [ "-n", "--nkeywords" ]: try: num = int(opt[1]) if num>1: outwords = num else: write_message("Number of keywords (-nkeywords) must be an integer higher than 1. Using default value of 15...") except ValueError: write_message("Number of keywords (-n) must be an integer. Using default value of 15...") except StandardError, e: write_message(e, sys.stderr) sys.exit(1) if input_file == "" or dict_file == "": write_message("Need to enter the name of an input file AND a thesaurus file \n") usage(1) # Weak method to detect dict_file. Need to improve this (e.g. by looking inside the metadata with rdflib?) if dict_file.find(".rdf")!=-1: outcome = generate_keywords_rdf(input_file, dict_file, output, outwords, mode) # profiling: # profile(input_file, dict_file) else: # Treat as text outcome = generate_keywords(input_file, dict_file) if outwords > len(outcome): outwords = len(outcome) if output == 0: for i in range(outwords): print outcome[i] else: print "<html>" print "<head>" print "<title>Keywords</title>" print "<body>" print "<table>" print '<tr><div class="pagebox2" align="top"><small>' for i in range(outwords): print "<b>" + str(outcome[i]) + "</b><br>" print '</small></div></tr>' print "</table></body>" print "</html>" return
e370f85299a0a2ebca37fc2311af0cdcffe61261 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2594/e370f85299a0a2ebca37fc2311af0cdcffe61261/bibclassifylib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 3536, 6376, 445, 3536, 225, 2552, 702, 1525, 67, 7133, 273, 9614, 7699, 768, 1546, 16, 315, 955, 768, 1546, 315, 7915, 28659, 407, 1546, 10837, 1580, 4676, 1546, 16, 315, 28...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3536, 6376, 445, 3536, 225, 2552, 702, 1525, 67, 7133, 273, 9614, 7699, 768, 1546, 16, 315, 955, 768, 1546, 315, 7915, 28659, 407, 1546, 10837, 1580, 4676, 1546, 16, 315, 28...
tau1 = beta^(-1)_2 beta_3 (composing left to right)
tau1 = beta\^(-1)_2 beta_3 (composing left to right 000)
def tau1(T1, T2, cells_map): """ The definition of tau1 is: tau1 : T1 -> T1 tau1 = beta^(-1)_2 beta_3 (composing left to right) where beta_i : T2 -> T1 changes just the i-th coordinate of a triple. EXAMPLES: sage: from sage.combinat.matrices.latin import * sage: T1 = back_circulant(5) sage: x = isotopism( (0,1,2,3,4) ) sage: y = isotopism(5) # identity sage: z = isotopism(5) # identity sage: T2 = T1.apply_isotopism(x, y, z) sage: print is_bitrade(T1, T2) True sage: (cells_map, t1, t2, t3) = tau123(T1, T2) sage: t1 = tau1(T1, T2, cells_map) sage: print t1 [2, 3, 4, 5, 1, 7, 8, 9, 10, 6, 12, 13, 14, 15, 11, 17, 18, 19, 20, 16, 22, 23, 24, 25, 21] sage: print t1.to_cycles() [(1, 2, 3, 4, 5), (6, 7, 8, 9, 10), (11, 12, 13, 14, 15), (16, 17, 18, 19, 20), (21, 22, 23, 24, 25)] """ # The cells_map has both directions, i.e. integer to # cell and cell to integer, so the size of T1 is # just half of len(cells_map). x = (int(len(cells_map)/2) + 1) * [-1] for r in range(T1.nrows()): for c in range(T1.ncols()): e = T1[r, c] if e < 0: continue (r2, c2, e2) = beta2( (r,c,e), T1, T2) (r3, c3, e3) = beta3( (r2,c2,e2), T2, T1) x[ cells_map[(r,c)] ] = cells_map[ (r3,c3) ] x.pop(0) # remove the head of the list since we # have permutations on 1..(something). return Permutation(x)
ab415fed8cc3a85e07eb4bce2dae593f4b59885d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/ab415fed8cc3a85e07eb4bce2dae593f4b59885d/latin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12284, 21, 12, 56, 21, 16, 399, 22, 16, 5983, 67, 1458, 4672, 3536, 1021, 2379, 434, 12284, 21, 353, 30, 225, 12284, 21, 294, 399, 21, 317, 399, 21, 12284, 21, 273, 6796, 64, 66, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12284, 21, 12, 56, 21, 16, 399, 22, 16, 5983, 67, 1458, 4672, 3536, 1021, 2379, 434, 12284, 21, 353, 30, 225, 12284, 21, 294, 399, 21, 317, 399, 21, 12284, 21, 273, 6796, 64, 66, 1...
print _('You must specify an id and a metadata file')
print >>sys.stderr, _('You must specify an id and a metadata file')
def command_set_metadata(args, dbpath): parser = get_parser(_(
aab8744748b031f43fe9148ccb2cdc2e9db72d82 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9125/aab8744748b031f43fe9148ccb2cdc2e9db72d82/cli.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1296, 67, 542, 67, 4165, 12, 1968, 16, 1319, 803, 4672, 2082, 273, 336, 67, 4288, 24899, 12, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1296, 67, 542, 67, 4165, 12, 1968, 16, 1319, 803, 4672, 2082, 273, 336, 67, 4288, 24899, 12, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
s = idaapi.get_struc(id)
s = idaapi.get_struc(sid)
def DelStrucMember(id, member_offset): """ Delete structure member @param id: structure type ID @param member_offset: offset of the member @return: != 0 - ok. @note: IDA allows 'holes' between members of a structure. It treats these 'holes' as unnamed arrays of bytes. """ s = idaapi.get_struc(id) if not s: return 0 return idaapi.del_struc_member(s, member_offset)
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, 6603, 1585, 5286, 4419, 12, 350, 16, 3140, 67, 3348, 4672, 3536, 2504, 3695, 3140, 225, 632, 891, 612, 30, 3695, 618, 1599, 632, 891, 3140, 67, 3348, 30, 1384, 434, 326, 3140, 225, 632...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6603, 1585, 5286, 4419, 12, 350, 16, 3140, 67, 3348, 4672, 3536, 2504, 3695, 3140, 225, 632, 891, 612, 30, 3695, 618, 1599, 632, 891, 3140, 67, 3348, 30, 1384, 434, 326, 3140, 225, 632...
self.__textNode.parawidth = int(self.__parent.width) - self.__border * 2
self.__textNode.width = int(self.__parent.width) - self.__border * 2
def setStyle(self, font='Arial', fontsize=12, alignment='left', variant='Regular', color='000000', multiline=True, cursorWidth=None, border=0, blurOpacity=DEFAULT_BLUR_OPACITY, flashingCursor=False, cursorColor='000000', lineSpacing=0, letterSpacing=0): """ Set TextArea's graphical appearance @param font: font face @param fontsize: font size in pixels @param alignment: one among 'left', 'right', 'center' @param variant: font variant (eg: 'bold') @param color: RGB hex for text color @param multiline: boolean, whether TextArea has to wrap (undefinitely) or stop at full width @param cursorWidth: int, width of the cursor in pixels @param border: amount of offsetting pixels that words node will have from image extents @param blurOpacity: opacity that textarea gets when goes to blur state @param flashingCursor: whether the cursor should flash or not @param cursorColor: RGB hex for cursor color @param lineSpacing: linespacing property of words node @param letterSpacing: letterspacing property of words node """ self.__textNode.font = font self.__textNode.fontsize = int(fontsize) self.__textNode.alignment = alignment self.__textNode.color = color self.__textNode.variant = variant self.__textNode.linespacing = lineSpacing self.__textNode.letterspacing = letterSpacing self.__isMultiline = multiline self.__border = border self.__maxLength = -1 self.__blurOpacity = blurOpacity if multiline: self.__textNode.parawidth = int(self.__parent.width) - self.__border * 2 self.__textNode.wrapmode = 'wordchar' else: self.__textNode.parawidth = -1 self.__textNode.x = self.__border self.__textNode.y = self.__border self.__cursorNode.color = cursorColor if cursorWidth is not None: self.__cursorNode.strokewidth = cursorWidth else: w = float(fontsize) * CURSOR_WIDTH_PCT / 100.0 if w < 1: w = 1 self.__cursorNode.strokewidth = w self.__cursorNode.x1 = self.__cursorNode.x2 = self.__cursorNode.strokewidth / 2.0 self.__flashingCursor = flashingCursor if not flashingCursor: self.__cursorContainer.opacity = 1 self.__updateCursor()
f4dac22eff0d5370daf2ac6ccfa43085e55058ad /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7300/f4dac22eff0d5370daf2ac6ccfa43085e55058ad/textarea.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 18995, 12, 2890, 16, 3512, 2218, 37, 566, 287, 2187, 14869, 33, 2138, 16, 8710, 2218, 4482, 2187, 5437, 2218, 17974, 2187, 2036, 2218, 9449, 2187, 19431, 33, 5510, 16, 3347, 2384, 33, 70...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 18995, 12, 2890, 16, 3512, 2218, 37, 566, 287, 2187, 14869, 33, 2138, 16, 8710, 2218, 4482, 2187, 5437, 2218, 17974, 2187, 2036, 2218, 9449, 2187, 19431, 33, 5510, 16, 3347, 2384, 33, 70...
rol reg, reg, imm
roli reg, reg, imm
def macroop ROL_R_I
114a82fa822a0123ec295fa2299d0b3189b7ba42 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7385/114a82fa822a0123ec295fa2299d0b3189b7ba42/rotate.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11522, 556, 534, 1741, 67, 54, 67, 45, 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,...
[ 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, 11522, 556, 534, 1741, 67, 54, 67, 45, 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, ...
print 'agregando nuevamente los movimientos:'
def procesar_producto(self, cr, uid, ids, prod_id, Dict, loc_ids, inter_loc_ids, prod_loc_ids, pending=False): ''' Concepto de prueba de Humberto Arocha para procesamiento recursivo de de stock card line ''' rpp_obj = self.pool.get('report.profit.picking') sc_line_obj = self.pool.get('stock.card.line') product = Dict[prod_id] sml_x_pd_id = product['sml'] no_cump = product['no_cump'] total = product['total'] avg = product['avg'] qda = product['qda'] cont = product['cont'] seq = product['seq'] def_code = self.pool.get('product.product').browse(cr,uid,prod_id).default_code.strip() if pending: print '@'*10 print 'procesando: ',self.pool.get('product.product').browse(cr,uid,prod_id).name #~ time.sleep(10) while sml_x_pd_id: sml_id = sml_x_pd_id.pop(0) value={} if not cont: cont = True q = 0.0 subtotal = 0.0 qda = 0.0 #se debe buscar el costo inicial cr.execute('SELECT standard_price,product_qty FROM lst_cost ' \ 'WHERE default_code=%s', (def_code,)) res = cr.fetchall() if res and res[0][1]: print 'encontre costo inicccc' avg,q = res[0] else: rpp = rpp_obj.browse(cr,uid,sml_id) if rpp.location_dest_id.id == loc_ids and rpp.invoice_id.type == 'in_invoice': q = rpp.picking_qty print 'cantidad inicialxxxxx: ',q avg = rpp.invoice_price_unit else: no_cump.append(sml_id) continue #avg = 1430.96 #q = 5.0 print 'cantidad inicial: ',q print 'costo inicial: ',avg total = avg*q subtotal = avg*q qda = q seq += 1 value = { 'subtotal':subtotal, 'total':total, 'avg':avg, 'stk_bef_cor':0.0, 'stk_aft_cor':qda, 'sequence':seq } scl_id = sc_line_obj.search(cr, uid, [('stk_mov_id','=',sml_id)]) sc_line_obj.write(cr, uid, scl_id, value) print 'q inicial: ',q print 'avg: ',avg print 'qda inicial: ',qda print 'seq inicial: ',seq else: rpp = rpp_obj.browse(cr,uid,sml_id) q = rpp.picking_qty scl_id = sc_line_obj.search(cr, uid, [('stk_mov_id','=',sml_id)]) scl = sc_line_obj.browse(cr,uid,scl_id)[0] print 'viene operac: ',sml_id print 'packing: ',rpp.picking_id.name print 'seq antes operac: ',seq #VENTA if rpp.location_id.id == loc_ids and rpp.invoice_id.type == 'out_invoice': print 'validando VENTA:' qda,total,avg,no_cump,seq= \ self.validate_venta(cr, uid, ids,scl,q,total,avg,qda,no_cump,sml_x_pd_id,sml_id,seq) print 'seq despues operac: ',seq #NC COMPRA if rpp.location_id.id == loc_ids and (rpp.invoice_id.type == 'in_refund' or rpp.invoice_id.type == 'in_invoice'): print 'validando NC compra:' qda,total,avg,no_cump,seq= \ self.validate_nc_compra(cr,uid,ids,scl,q,total,avg,qda,no_cump,sml_x_pd_id,sml_id,seq) print 'seq despues operac: ',seq #COMPRA if rpp.location_dest_id.id == loc_ids and rpp.invoice_id.type == 'in_invoice': print 'procesooo compra:' q_bef = qda qda,subtotal,total,avg = self.compute_compra(cr, uid, ids,scl,q,total,avg,qda) #REALIZAR EL WRITE DE LA LINEA value = { 'subtotal':subtotal, 'total':total, 'avg':avg, 'stk_bef_cor':q_bef, 'stk_aft_cor':qda } seq=self.write_data(cr, uid, ids, scl.id, value, seq) print 'seq despues operac: ',seq if no_cump: print 'agregando nuevamente las vta:' #no_cump.append(sml_id) no_cump.extend(sml_x_pd_id) print 'no cumplioooo: ',no_cump sml_x_pd_id = no_cump print 'nueva listaaa: ',sml_x_pd_id no_cump = [] #NC VENTA if rpp.location_dest_id.id == loc_ids and rpp.invoice_id.type == 'out_refund': print 'validando NC VENTA:' qda,total,avg,no_cump,seq= \ self.validate_nc_vta(cr, uid, ids,scl,q,total,avg,qda,no_cump,sml_x_pd_id,sml_id,seq) print 'seq despues operac: ',seq if no_cump and not scl.parent_id: print 'agregando nuevamente los movimientos:' #no_cump.append(sml_id) no_cump.extend(sml_x_pd_id) print 'no cumplioooo: ',no_cump sml_x_pd_id = no_cump print 'nueva listaaa: ',sml_x_pd_id no_cump = [] #DESTINO USO INTERNO if rpp.location_id.id == loc_ids and rpp.location_dest_id.id == inter_loc_ids: print 'validando USO INTERNO:' #fixme blanquear la variables de cuenta #acc_src = None #acc_dest = None qda,total,avg,no_cump,seq= \ self.validate_venta(cr, uid, ids,scl,q,total,avg,qda,no_cump,sml_x_pd_id,sml_id,seq) print 'seq despues operac: ',seq valores = {} if not (rpp.aml_cost_id or rpp.aml_inv_id): move = scl.stk_mov_id acc_src = move.product_id.product_tmpl_id.\ property_stock_account_output.id if move.location_dest_id.account_id: acc_dest = move.location_dest_id.account_id.id acc_mov_id = self.write_aml(cr, uid, ids, scl, q, avg, acc_src, acc_dest) acc_mov_obj = self.pool.get('account.move').browse(cr,uid,acc_mov_id) for aml in acc_mov_obj.line_id: valores.update({ 'aml_cost_qty':aml.quantity or 0.0, 'aml_cost_price_unit':avg, 'aml_inv_qty':aml.quantity or 0.0, 'aml_inv_price_unit':avg}) if aml.debit: valores.update({'aml_cost_id':aml.id}) if aml.credit: valores.update({'aml_inv_id':aml.id}) sc_line_obj.write(cr, uid, scl.id, valores) #~ else: #~ id1=scl.aml_cost_id.id #~ id2=scl.aml_inv_id.id #~ if not scl.aml_cost_id.credit: #~ valores.update({'aml_cost_id':id2, 'aml_inv_id':id1}) #~ sc_line_obj.write(cr, uid, scl.id, valores) #~ #DESTINO PROCESAMIENTO if rpp.location_id.id == loc_ids and rpp.location_dest_id.id == prod_loc_ids: print 'validando PROCESAMIENTO:' #fixme blanquear la variables de cuenta #acc_src = None #acc_dest = None qda,total,avg,no_cump,seq= \ self.validate_venta(cr, uid, ids,scl,q,total,avg,qda,no_cump,sml_x_pd_id,sml_id,seq) print 'seq despues operac: ',seq valores = {} if not (rpp.aml_cost_id or rpp.aml_inv_id): move = scl.stk_mov_id acc_src = move.product_id.product_tmpl_id.\ property_stock_account_output.id if move.location_dest_id.account_id: acc_dest = move.location_dest_id.account_id.id
62ca858ba796453e95db5d16001d237fb203c2e9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7359/62ca858ba796453e95db5d16001d237fb203c2e9/stock_card.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 450, 764, 297, 67, 5896, 83, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 10791, 67, 350, 16, 9696, 16, 1515, 67, 2232, 16, 1554, 67, 1829, 67, 2232, 16, 10791, 67, 1829, 67, 2232, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 450, 764, 297, 67, 5896, 83, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 10791, 67, 350, 16, 9696, 16, 1515, 67, 2232, 16, 1554, 67, 1829, 67, 2232, 16, 10791, 67, 1829, 67, 2232, ...
data, remote = (yield multitask.recvfrom(self.sock, maxsize, timeout=interval)) if _debug: print 'received[%d] from %s\n%s'%(len(data),remote,data) self.stack.received(data, remote)
try: data, remote = (yield multitask.recvfrom(self.sock, maxsize, timeout=interval)) if _debug: print 'received[%d] from %s\n%s'%(len(data),remote,data) self.stack.received(data, remote) except multitask.Timeout: pass
def _listener(self, maxsize=1500, interval=180): '''Listen for transport messages on the signaling socket. The default maximum packet size to receive is 1500 bytes. The interval argument specifies how often should the sock be checked for close, default is 180 s. This is a generator function and should be invoked as multitask.add(u._listener()).''' try: while self.sock and self.stack: data, remote = (yield multitask.recvfrom(self.sock, maxsize, timeout=interval)) if _debug: print 'received[%d] from %s\n%s'%(len(data),remote,data) self.stack.received(data, remote) except GeneratorExit: pass except: print 'User._listener exception', (sys and sys.exc_info() or None); traceback.print_exc(); raise if _debug: print 'terminating User._listener()'
aab2af81ac31ff006c7d2fa7fb2cc9dfab0bdfbe /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8022/aab2af81ac31ff006c7d2fa7fb2cc9dfab0bdfbe/voip.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 12757, 12, 2890, 16, 22959, 33, 3600, 713, 16, 3673, 33, 18278, 4672, 9163, 14750, 364, 4736, 2743, 603, 326, 4277, 310, 2987, 18, 1021, 805, 4207, 4414, 963, 358, 6798, 353, 4711, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 12757, 12, 2890, 16, 22959, 33, 3600, 713, 16, 3673, 33, 18278, 4672, 9163, 14750, 364, 4736, 2743, 603, 326, 4277, 310, 2987, 18, 1021, 805, 4207, 4414, 963, 358, 6798, 353, 4711, ...
'Insert path')
'Insert path')
def init_menubar(self): self.mainmenu = wxMenuBar() mainwindow = self
0386dacaa4983ab8619dec87afda0aae584bc1ad /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5620/0386dacaa4983ab8619dec87afda0aae584bc1ad/main.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1208, 67, 27617, 373, 297, 12, 2890, 4672, 365, 18, 5254, 5414, 273, 7075, 4599, 5190, 1435, 2774, 5668, 273, 365, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 1208, 67, 27617, 373, 297, 12, 2890, 4672, 365, 18, 5254, 5414, 273, 7075, 4599, 5190, 1435, 2774, 5668, 273, 365, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
for uuid, task in tasks:
for row, (uuid, task) in enumerate(tasks): if row > self.display_height: break
def draw(self): win = self.win self.handle_keypress() x = 3 y = blank_line = count(2).next my, mx = win.getmaxyx() win.erase() win.bkgd(" ", curses.color_pair(1)) win.border() win.addstr(1, x, self.greet, curses.A_DIM | curses.color_pair(5)) blank_line() win.addstr(y(), x, self.format_row("UUID", "TASK", "WORKER", "TIME", "STATE"), curses.A_BOLD | curses.A_UNDERLINE) tasks = self.tasks if tasks: for uuid, task in tasks: if task.uuid: state_color = self.state_colors.get(task.state) attr = curses.A_NORMAL if task.uuid == self.selected_task: attr = curses.A_STANDOUT timestamp = datetime.fromtimestamp( task.timestamp or time.time()) timef = timestamp.strftime("%H:%M:%S") line = self.format_row(uuid, task.name, task.worker.hostname, timef, task.state) lineno = y() win.addstr(lineno, x, line, attr) if state_color: win.addstr(lineno, len(line) - STATE_WIDTH + BORDER_SPACING - 1, task.state, state_color | attr) if task.ready: task.visited = time.time()
629d17dc994d51492e8f620348f33d13de3e085a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2024/629d17dc994d51492e8f620348f33d13de3e085a/cursesmon.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3724, 12, 2890, 4672, 5657, 273, 365, 18, 8082, 365, 18, 4110, 67, 856, 1028, 1435, 619, 273, 890, 677, 273, 7052, 67, 1369, 273, 1056, 12, 22, 2934, 4285, 3399, 16, 7938, 273, 5657, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3724, 12, 2890, 4672, 5657, 273, 365, 18, 8082, 365, 18, 4110, 67, 856, 1028, 1435, 619, 273, 890, 677, 273, 7052, 67, 1369, 273, 1056, 12, 22, 2934, 4285, 3399, 16, 7938, 273, 5657, ...
wfd, wtmpfname = mkstemp(suffix='.ltx')
def checkTeXPaths(): ''' Determine the path-style needed by the TeX engine on Win32 (Cygwin) ''' windows_style_tex_paths = '' if os.name == 'nt' or sys.platform == 'cygwin': from tempfile import mkstemp fd, tmpfname = mkstemp(suffix='.ltx') # a wrapper file wfd, wtmpfname = mkstemp(suffix='.ltx') if os.name == 'nt': inpname = tmpfname.replace('\\', '/') wtmpfname = wtmpfname.replace('\\', '/') else: inpname = cmdOutput('cygpath -m ' + tmpfname) wtmpfname = cmdOutput('cygpath -m ' + wtmpfname) os.write(fd, r'''
f8404ec837a5762ddeea85959c701d39ed799f2f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7514/f8404ec837a5762ddeea85959c701d39ed799f2f/configure.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 21575, 60, 4466, 13332, 9163, 10229, 326, 589, 17, 4060, 3577, 635, 326, 28602, 60, 4073, 603, 21628, 1578, 261, 39, 4338, 8082, 13, 9163, 9965, 67, 4060, 67, 21763, 67, 4481, 273, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 21575, 60, 4466, 13332, 9163, 10229, 326, 589, 17, 4060, 3577, 635, 326, 28602, 60, 4073, 603, 21628, 1578, 261, 39, 4338, 8082, 13, 9163, 9965, 67, 4060, 67, 21763, 67, 4481, 273, ...
sizeof_wchar = ctypes.sizeof(ctypes.c_wchar)
sizeof_wchar = ctypes.sizeof(ctypes.c_wchar)
def GetLogicalDriveStringsW(): _GetLogicalDriveStringsW = ctypes.windll.kernel32.GetLogicalDriveStringsW _GetLogicalDriveStringsW.argtypes = [DWORD, LPWSTR] _GetLogicalDriveStringsW.restype = DWORD _GetLogicalDriveStringsW.errcheck = RaiseIfZero nBufferLength = (4 * 26) + 1 # "X:\\\0" from A to Z plus empty string lpBuffer = ctypes.create_unicode_buffer(u'', nBufferLength) _GetLogicalDriveStringsW(nBufferLength, lpBuffer) drive_strings = list() string_p = ctypes.addressof(lpBuffer) sizeof_wchar = ctypes.sizeof(ctypes.c_wchar) while True: string_v = ctypes.wstring_at(string_p) if string_v == u'': break drive_strings.append(string_v) string_p += (len(string_v) * sizeof_wchar) + sizeof_wchar return drive_strings
f98c5847265f8281bb0afcc54b3b41c478c6e292 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7261/f98c5847265f8281bb0afcc54b3b41c478c6e292/kernel32.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 968, 17955, 24681, 7957, 59, 13332, 389, 967, 17955, 24681, 7957, 59, 273, 6983, 18, 10094, 2906, 18, 8111, 1578, 18, 967, 17955, 24681, 7957, 59, 389, 967, 17955, 24681, 7957, 59, 18, 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, 968, 17955, 24681, 7957, 59, 13332, 389, 967, 17955, 24681, 7957, 59, 273, 6983, 18, 10094, 2906, 18, 8111, 1578, 18, 967, 17955, 24681, 7957, 59, 389, 967, 17955, 24681, 7957, 59, 18, 3...
return html.UL([html.LI(html.A(wiki.format_page_name(page), href=formatter.href.wiki(page))) for page in pages])
return tag.ul([tag.li(tag.a(wiki.format_page_name(page), href=formatter.href.wiki(page))) for page in pages if depth < 0 or depth >= page.count('/') - start])
def expand_macro(self, formatter, name, content): args, kw = parse_args(content) prefix = args and args[0] or None format = kw.get('format', '') minsize = max(int(kw.get('min', 2)), 2)
323d0e18c5ae20ddb3266c249630f97ce431aab8 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2831/323d0e18c5ae20ddb3266c249630f97ce431aab8/macros.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4542, 67, 26448, 12, 2890, 16, 4453, 16, 508, 16, 913, 4672, 833, 16, 5323, 273, 1109, 67, 1968, 12, 1745, 13, 1633, 273, 833, 471, 833, 63, 20, 65, 578, 599, 740, 273, 5323, 18, 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, 4542, 67, 26448, 12, 2890, 16, 4453, 16, 508, 16, 913, 4672, 833, 16, 5323, 273, 1109, 67, 1968, 12, 1745, 13, 1633, 273, 833, 471, 833, 63, 20, 65, 578, 599, 740, 273, 5323, 18, 5...
self.pdbg("expand_filename name has METAVER: %s" % pat)
if Opt.ParseDBG: self.pdbg("expand_filename name has METAVER: %s" % pat)
def expand_filename(self, plugin): self.pdbg("expand_filename, plugin=%s" % plugin) pat = "^%s$" % re_escape_meta.sub(r'\\\1', plugin) # if the plugin name contains metacharacters, do filename expansion subbed = False if re_plugin_meta.search(plugin) != None: self.pdbg("expand_filename name has META: %s" % pat) pat = re_plugin_meta.sub(r'.\1', pat) subbed = True if re_plugin_metaver.search(plugin) != None: self.pdbg("expand_filename name has METAVER: %s" % pat) pat = re_plugin_metaver.sub(plugin_version, pat) subbed = True if not subbed: # no expansions made return([plugin] if plugin.lower() in self.active else []) self.pdbg("expand_filename new RE pat: %s" % pat) matches = [] re_namepat = re.compile(pat, re.IGNORECASE) for p in self.active: if re_namepat.match(p): matches.append(p) self.pdbg("expand_filename: %s expands to: %s" % (plugin, p)) return(matches)
0c9007da0c07e550781c18146d5a05ade578dced /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2827/0c9007da0c07e550781c18146d5a05ade578dced/mlox.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4542, 67, 3459, 12, 2890, 16, 1909, 4672, 365, 18, 17414, 75, 2932, 12320, 67, 3459, 16, 1909, 5095, 87, 6, 738, 1909, 13, 9670, 273, 15017, 9, 87, 12911, 738, 283, 67, 6939, 67, 390...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4542, 67, 3459, 12, 2890, 16, 1909, 4672, 365, 18, 17414, 75, 2932, 12320, 67, 3459, 16, 1909, 5095, 87, 6, 738, 1909, 13, 9670, 273, 15017, 9, 87, 12911, 738, 283, 67, 6939, 67, 390...
message = tichy.phone.SMS(i,text,'out')
message = message_service.create(number=i, text=text, direction='out')
def send_message(self, emission, source, param, numbers, textbox, step_1, step_2, original_message=None): print "send message called" numbers = numbers text = textbox.textblock_get().text_get(0) try: step_2.close_extra_child(emission,source,param) except Exception,e : print e try: step_1.delete(emission,source,param) except Exception,e : print e try: if original_message != None: original_message.delete(emission, source, param) except Exception,e : print e message_service = tichy.Service('SMS') for i in numbers: message = tichy.phone.SMS(i,text,'out') print type(message) send = message_service.send(message) print type(send) send.start() print "would send message: ", text, "to :", i self.contact_objects_list.generate_single_item_obj(i,text,message) self.contact_objects_list.box.box.redraw_queue() self.contact_objects_list.box.box.show_all() self.close_keyboard()
d133114fb40f30d3b11d19c93101ad4e0146e0ea /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4712/d133114fb40f30d3b11d19c93101ad4e0146e0ea/paroli-msgs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 67, 2150, 12, 2890, 16, 801, 19710, 16, 1084, 16, 579, 16, 5600, 16, 977, 2147, 16, 2235, 67, 21, 16, 2235, 67, 22, 16, 2282, 67, 2150, 33, 7036, 4672, 1172, 315, 4661, 883, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 67, 2150, 12, 2890, 16, 801, 19710, 16, 1084, 16, 579, 16, 5600, 16, 977, 2147, 16, 2235, 67, 21, 16, 2235, 67, 22, 16, 2282, 67, 2150, 33, 7036, 4672, 1172, 315, 4661, 883, ...
expected = ['EGGS: %s' % l1, 'info: %s' % l2, 'SPAM: %s' % l3]
if __debug__: expected = ['EGGS: %s' % l1, 'info: %s' % l2, 'SPAM: %s' % l3] else: expected = ['EGGS: %s' % l1, 'SPAM: %s' % l3]
def test_log_info(self): d = asyncore.dispatcher()
b83fb66944662e981707f15a47735582452d8fbe /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12029/b83fb66944662e981707f15a47735582452d8fbe/test_asyncore.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 1330, 67, 1376, 12, 2890, 4672, 302, 273, 4326, 479, 18, 18495, 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,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 1330, 67, 1376, 12, 2890, 4672, 302, 273, 4326, 479, 18, 18495, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
testrec_expected_url = "%(siteurl)s/record/123456789/files/patata.gif" \
testrec_expected_url = "%(siteurl)s/record/123456789/files/cds.gif" \
def test_simple_fft_correct(self): """bibupload - simple FFT correct""" # define the test case: test_to_upload = """ <record> <controlfield tag="003">SzGeCERN</controlfield> <datafield tag="100" ind1=" " ind2=" "> <subfield code="a">Test, John</subfield> <subfield code="u">Test University</subfield> </datafield> <datafield tag="FFT" ind1=" " ind2=" "> <subfield code="a">http://cds.cern.ch/img/cds.gif</subfield> </datafield> </record> """ test_to_correct = """ <record> <controlfield tag="001">123456789</controlfield> <datafield tag="FFT" ind1=" " ind2=" "> <subfield code="a">http://cds.cern.ch/img/cds.gif</subfield> </datafield> </record> """
e0698ab285fb3da5dc1eee2b909e753cedbcea3b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12027/e0698ab285fb3da5dc1eee2b909e753cedbcea3b/bibupload_regression_tests.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 9647, 67, 25174, 67, 6746, 12, 2890, 4672, 3536, 70, 495, 6327, 300, 4143, 16816, 3434, 8395, 468, 4426, 326, 1842, 648, 30, 1842, 67, 869, 67, 6327, 273, 3536, 411, 3366, 34...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 9647, 67, 25174, 67, 6746, 12, 2890, 4672, 3536, 70, 495, 6327, 300, 4143, 16816, 3434, 8395, 468, 4426, 326, 1842, 648, 30, 1842, 67, 869, 67, 6327, 273, 3536, 411, 3366, 34...
return self.name
return locale.format('%f', self.name, True)
def __str__(self): if not self.object._context: return self.name digit = 2 if hasattr(self._field, 'digits') and self._field.digits: digit = self._field.digits[1] return locale.format('%.' + str(digit) + 'f', self.name, True)
f16cf978ff88ce3b744db58016d29e38fb92872c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/f16cf978ff88ce3b744db58016d29e38fb92872c/report_sxw.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 701, 972, 12, 2890, 4672, 309, 486, 365, 18, 1612, 6315, 2472, 30, 327, 2573, 18, 2139, 29909, 74, 2187, 365, 18, 529, 16, 1053, 13, 8035, 273, 576, 309, 3859, 12, 2890, 6315, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 701, 972, 12, 2890, 4672, 309, 486, 365, 18, 1612, 6315, 2472, 30, 327, 2573, 18, 2139, 29909, 74, 2187, 365, 18, 529, 16, 1053, 13, 8035, 273, 576, 309, 3859, 12, 2890, 6315, ...
backup_id = uri.strip("/").split("/")[-1]
backup_id = url.strip("/").split("/")[-1]
def api(method, url, attrs={}, headers=[]): c = Curl(url, headers) func = getattr(c, method.lower()) func(attrs) if not c.response_code == 200: if c.response_data.splitlines()[1] == "BackupAccount not subscribed": raise NotSubscribedError("user not subscribed to Backups") if c.response_data.splitlines()[1] == "BackupRecord does not exist": backup_id = uri.strip("/").split("/")[-1] raise InvalidBackupError("no such backup (%s)" % backup_id) raise Error(c.response_code, c.response_data) return json.loads(c.response_data)
d4051006105c9411bbfe1c867298a9121d59d2d0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10616/d4051006105c9411bbfe1c867298a9121d59d2d0/hub.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1536, 12, 2039, 16, 880, 16, 3422, 28793, 1607, 33, 8526, 4672, 276, 273, 26181, 12, 718, 16, 1607, 13, 1326, 273, 3869, 12, 71, 16, 707, 18, 8167, 10756, 1326, 12, 7039, 13, 225, 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, 1536, 12, 2039, 16, 880, 16, 3422, 28793, 1607, 33, 8526, 4672, 276, 273, 26181, 12, 718, 16, 1607, 13, 1326, 273, 3869, 12, 71, 16, 707, 18, 8167, 10756, 1326, 12, 7039, 13, 225, 30...
""" Set the host to be managed
""" Set the host to be managed
def do_set( self, args ): """ Set the host to be managed usage: set host <hostname> """ argss = args.split() if len( argss ) < 2: print self.do_set.__doc__ return
ac920d2d5bc4071621ea97dd251abf3ef6ffefca /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/ac920d2d5bc4071621ea97dd251abf3ef6ffefca/SystemAdministratorClientCLI.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 542, 12, 365, 16, 833, 262, 30, 3536, 1000, 326, 1479, 358, 506, 7016, 225, 4084, 30, 225, 444, 1479, 411, 10358, 34, 3536, 833, 87, 273, 833, 18, 4939, 1435, 309, 562, 12, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 542, 12, 365, 16, 833, 262, 30, 3536, 1000, 326, 1479, 358, 506, 7016, 225, 4084, 30, 225, 444, 1479, 411, 10358, 34, 3536, 833, 87, 273, 833, 18, 4939, 1435, 309, 562, 12, ...
tempdata = a2b_base64(entry.text)
tempdata = binascii.a2b_base64(entry.text)
def VerifyConfigFile(self, entry): '''Install ConfigFile Entry''' filename = entry.get('name') try: ondisk = stat(filename) except OSError: self.CondPrint('debug', "File %s doesn't exist" % (filename)) return False try: data = open(filename).read() except IOError: self.CondPrint('debug', "Failed to read %s" % (filename)) return False try: owner = getpwuid(ondisk[ST_UID])[0] group = getgrgid(ondisk[ST_GID])[0] except KeyError: self.CondPrint('debug', "Owner/Group failure for %s: %s, %s" % (filename, ondisk[ST_UID], ondisk[ST_GID])) return False perms = stat(filename)[ST_MODE] if entry.get('encoding', 'ascii') == 'base64': tempdata = a2b_base64(entry.text) else: tempdata = entry.text
6b7fe3dffd69efeeeabbce0bcd6cab97bde94cef /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11867/6b7fe3dffd69efeeeabbce0bcd6cab97bde94cef/Toolset.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8553, 13705, 12, 2890, 16, 1241, 4672, 9163, 6410, 31988, 3841, 26418, 1544, 273, 1241, 18, 588, 2668, 529, 6134, 775, 30, 603, 10863, 273, 610, 12, 3459, 13, 1335, 10002, 30, 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, 8553, 13705, 12, 2890, 16, 1241, 4672, 9163, 6410, 31988, 3841, 26418, 1544, 273, 1241, 18, 588, 2668, 529, 6134, 775, 30, 603, 10863, 273, 610, 12, 3459, 13, 1335, 10002, 30, 365, 18, ...
sock = server._get_socket_fromfd(client.get_fd(), socket.AF_INET, socket.SOCK_STREAM)
sock = socket.fromfd(client.get_fd(), socket.AF_INET, socket.SOCK_STREAM)
def setup(self, environ): protocol_version = None if not (environ.get('HTTP_CONNECTION') == 'Upgrade' and environ.get('HTTP_UPGRADE') == 'WebSocket'): return # See if they sent the new-format headers if 'HTTP_SEC_WEBSOCKET_KEY1' in environ: protocol_version = 76 if 'HTTP_SEC_WEBSOCKET_KEY2' not in environ: # That's bad. return else: protocol_version = 75
46028406d4aa92d71ff92a031d6e2631189183ee /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5908/46028406d4aa92d71ff92a031d6e2631189183ee/websocket.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 12, 2890, 16, 5473, 4672, 1771, 67, 1589, 273, 599, 309, 486, 261, 28684, 18, 588, 2668, 3693, 67, 15461, 6134, 422, 296, 10784, 11, 471, 5473, 18, 588, 2668, 3693, 67, 3079, 245...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 12, 2890, 16, 5473, 4672, 1771, 67, 1589, 273, 599, 309, 486, 261, 28684, 18, 588, 2668, 3693, 67, 15461, 6134, 422, 296, 10784, 11, 471, 5473, 18, 588, 2668, 3693, 67, 3079, 245...
return ''
if isinstance(source, unicode): source = source.encode('utf-8') return source
def get_source(self, impname): if self.source is not None: return self.source elif self.loader is not None: try: return self.loader.get_source(self.filename) except TemplateNotFound: pass return ''
859efe06de590f58899eb88dbfa81ef1b1f73c58 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/14446/859efe06de590f58899eb88dbfa81ef1b1f73c58/utils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 3168, 12, 2890, 16, 1646, 529, 4672, 309, 365, 18, 3168, 353, 486, 599, 30, 327, 365, 18, 3168, 1327, 365, 18, 6714, 353, 486, 599, 30, 775, 30, 327, 365, 18, 6714, 18, 58...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 3168, 12, 2890, 16, 1646, 529, 4672, 309, 365, 18, 3168, 353, 486, 599, 30, 327, 365, 18, 3168, 1327, 365, 18, 6714, 353, 486, 599, 30, 775, 30, 327, 365, 18, 6714, 18, 58...
cvsextrasListing = GroupPackageListing( self.groups['packager']) cvsextrasListing.packagelisting = pkg_listing cvsextrasCommitAcl = GroupPackageListingAcl( 'commit', self.approvedStatus.statuscodeid) cvsextrasCommitAcl.grouppackagelisting = \ cvsextrasListing cvsextrasBuildAcl = GroupPackageListingAcl( 'build', self.approvedStatus.statuscodeid) cvsextrasBuildAcl.grouppackagelisting = cvsextrasListing cvsextrasCheckoutAcl = GroupPackageListingAcl( 'checkout', self.approvedStatus.statuscodeid) cvsextrasCheckoutAcl.grouppackagelisting = \ cvsextrasListing
for group in ('packager', 'uberpackager'): group_pkg_listing = GroupPackageListing( self.groups[group]) group_pkg_listing.packagelisting = pkg_listing groupCommitAcl = GroupPackageListingAcl('commit', self.approvedStatus.statuscodeid) groupCommitAcl.grouppackagelisting = \ group_pkg_listing groupBuildAcl = GroupPackageListingAcl('build', self.approvedStatus.statuscodeid) groupBuildAcl.grouppackagelisting = group_pkg_listing groupCheckoutAcl = GroupPackageListingAcl( 'checkout', self.approvedStatus.statuscodeid) groupCheckoutAcl.grouppackagelisting = \ group_pkg_listing
def edit_package(self, package, **changes): '''Add a new package to the database. ''' # Check that the tg.identity is allowed to make changes to the package if not identity.in_any_group('cvsadmin'): return dict(status=False, message='User must be in cvsadmin')
a86a8e9000697afabfcf971e2f22aad26d95cc31 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9953/a86a8e9000697afabfcf971e2f22aad26d95cc31/dispatcher.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3874, 67, 5610, 12, 2890, 16, 2181, 16, 2826, 6329, 4672, 9163, 986, 279, 394, 2181, 358, 326, 2063, 18, 9163, 468, 2073, 716, 326, 18289, 18, 10781, 353, 2935, 358, 1221, 3478, 358, 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, 3874, 67, 5610, 12, 2890, 16, 2181, 16, 2826, 6329, 4672, 9163, 986, 279, 394, 2181, 358, 326, 2063, 18, 9163, 468, 2073, 716, 326, 18289, 18, 10781, 353, 2935, 358, 1221, 3478, 358, 3...
print "Running %s.test08_DuplicateKeys..." % \
print "Running %s.test09_DuplicateKeys..." % \
def test08_DuplicateKeys(self): d = self.d if verbose: print '\n', '-=' * 30 print "Running %s.test08_DuplicateKeys..." % \ self.__class__.__name__
02ec8a6bc5174b4725b144ea32bc810ca238d4fa /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8125/02ec8a6bc5174b4725b144ea32bc810ca238d4fa/test_basics.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 6840, 67, 11826, 2396, 12, 2890, 4672, 302, 273, 365, 18, 72, 309, 3988, 30, 1172, 2337, 82, 2187, 2400, 2218, 380, 5196, 1172, 315, 7051, 738, 87, 18, 3813, 5908, 67, 11826, 239...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1842, 6840, 67, 11826, 2396, 12, 2890, 4672, 302, 273, 365, 18, 72, 309, 3988, 30, 1172, 2337, 82, 2187, 2400, 2218, 380, 5196, 1172, 315, 7051, 738, 87, 18, 3813, 5908, 67, 11826, 239...
def nestedExpr(opener="(", closer=")", content=None, ignoreExpr=quotedString):
def nestedExpr(opener="(", closer=")", content=None, ignoreExpr=quotedString.copy()):
def nestedExpr(opener="(", closer=")", content=None, ignoreExpr=quotedString): """Helper method for defining nested lists enclosed in opening and closing delimiters ("(" and ")" are the default). Parameters: - opener - opening character for a nested list (default="("); can also be a pyparsing expression - closer - closing character for a nested list (default=")"); can also be a pyparsing expression - content - expression for items within the nested lists (default=None) - ignoreExpr - expression for ignoring opening and closing delimiters (default=quotedString) If an expression is not provided for the content argument, the nested expression will capture all whitespace-delimited content between delimiters as a list of separate values. Use the ignoreExpr argument to define expressions that may contain opening or closing characters that should not be treated as opening or closing characters for nesting, such as quotedString or a comment expression. Specify multiple expressions using an Or or MatchFirst. The default is quotedString, but if no expressions are to be ignored, then pass None for this argument. """ if opener == closer: raise ValueError("opening and closing strings cannot be the same") if content is None: if isinstance(opener,basestring) and isinstance(closer,basestring): if len(opener) == 1 and len(closer)==1: if ignoreExpr is not None: content = (Combine(OneOrMore(~ignoreExpr + CharsNotIn(opener+closer+ParserElement.DEFAULT_WHITE_CHARS,exact=1)) ).setParseAction(lambda t:t[0].strip())) else: content = (empty+CharsNotIn(opener+closer+ParserElement.DEFAULT_WHITE_CHARS ).setParseAction(lambda t:t[0].strip())) else: if ignoreExpr is not None: content = (Combine(OneOrMore(~ignoreExpr + ~Literal(opener) + ~Literal(closer) + CharsNotIn(ParserElement.DEFAULT_WHITE_CHARS,exact=1)) ).setParseAction(lambda t:t[0].strip())) else: content = (Combine(OneOrMore(~Literal(opener) + ~Literal(closer) + CharsNotIn(ParserElement.DEFAULT_WHITE_CHARS,exact=1)) ).setParseAction(lambda t:t[0].strip())) else: raise ValueError("opening and closing arguments must be strings if no content expression is given") ret = Forward() if ignoreExpr is not None: ret << Group( Suppress(opener) + ZeroOrMore( ignoreExpr | ret | content ) + Suppress(closer) ) else: ret << Group( Suppress(opener) + ZeroOrMore( ret | content ) + Suppress(closer) ) return ret
d1ec87c1df9a5193847e95a264ad8fd0bde150ce /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3693/d1ec87c1df9a5193847e95a264ad8fd0bde150ce/pyparsing.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4764, 4742, 12, 25098, 1546, 2932, 16, 13306, 1546, 2225, 16, 913, 33, 7036, 16, 2305, 4742, 33, 15179, 780, 18, 3530, 1435, 4672, 3536, 2276, 707, 364, 9364, 4764, 6035, 25636, 316, 108...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4764, 4742, 12, 25098, 1546, 2932, 16, 13306, 1546, 2225, 16, 913, 33, 7036, 16, 2305, 4742, 33, 15179, 780, 18, 3530, 1435, 4672, 3536, 2276, 707, 364, 9364, 4764, 6035, 25636, 316, 108...
cmd = cmd + ' ' + GetOutputDir() + '/lib/' + x[10:-4] + ".lib"
cmd = cmd + ' ' + GetOutputDir() + '/lib/' + x[len(GetOutputDir()+"/bin/"):-4] + ".lib"
def CompileLink(dll, obj, opts): if (COMPILER=="MSVC"): cmd = 'link /nologo /NOD:MFC80.LIB /NOD:MFC90.LIB /NOD:LIBCI.LIB /NOD:MSVCRTD.LIB /DEBUG ' cmd = cmd + " /nod:libc /nod:libcmtd /nod:atlthunk" if (GetOrigExt(dll) != ".exe"): cmd = cmd + " /DLL" optlevel = GetOptimizeOption(opts,OPTIMIZE) if (optlevel==1): cmd = cmd + " /MAP /MAPINFO:EXPORTS" if (optlevel==2): cmd = cmd + " /MAP:NUL " if (optlevel==3): cmd = cmd + " /MAP:NUL " if (optlevel==4): cmd = cmd + " /MAP:NUL /LTCG " cmd = cmd + " /FIXED:NO /OPT:REF /STACK:4194304 /INCREMENTAL:NO " cmd = cmd + ' /OUT:' + dll if (dll.endswith(".dll")): cmd = cmd + ' /IMPLIB:' + GetOutputDir() + '/lib/'+dll[10:-4]+".lib" for (opt, dir) in LIBDIRECTORIES: if (opt=="ALWAYS") or (opts.count(opt)): cmd = cmd + ' /LIBPATH:"' + dir + '"' for x in obj: if (x.endswith(".dll")): cmd = cmd + ' ' + GetOutputDir() + '/lib/' + x[10:-4] + ".lib" elif (x.endswith(".lib")): dname = x[:-4]+".dll" if (os.path.exists(GetOutputDir()+"/bin/" + x[10:-4] + ".dll")): exit("Error: in makepanda, specify "+dname+", not "+x) cmd = cmd + ' ' + x elif (x.endswith(".def")): cmd = cmd + ' /DEF:"' + x + '"' elif (x.endswith(".dat")): pass else: cmd = cmd + ' ' + x if (GetOrigExt(dll)==".exe"): cmd = cmd + ' panda/src/configfiles/pandaIcon.obj' for (opt, name) in LIBNAMES: if (opt=="ALWAYS") or (opts.count(opt)): cmd = cmd + ' ' + name oscmd(cmd) SetVC90CRTVersion(dll+".manifest", VC90CRTVERSION) mtcmd = 'mt -manifest ' + dll + '.manifest -outputresource:' + dll if (dll.endswith(".exe")==0): mtcmd = mtcmd + ';2' else: mtcmd = mtcmd + ';1' oscmd(mtcmd) if (COMPILER=="LINUX"): if (GetOrigExt(dll)==".exe"): cmd = 'g++ -o ' + dll + ' -L' + GetOutputDir() + '/lib -L/usr/X11R6/lib' else: if (sys.platform == "darwin"): cmd = 'g++ -undefined dynamic_lookup -dynamic -dynamiclib -o ' + dll + ' -install_name ' + GetOutputDir() + '/lib/' + os.path.basename(dll) + ' -L' + GetOutputDir() + '/lib -L/usr/X11R6/lib' else: cmd = 'g++ -shared -o ' + dll + ' -L' + GetOutputDir() + '/lib -L/usr/X11R6/lib' for x in obj: if (GetOrigExt(x) != ".dat"): base = os.path.basename(x) if (base[-3:]==".so") and (base[:3]=="lib"): cmd = cmd + ' -l' + base[3:-3] else: cmd = cmd + ' ' + x for (opt, dir) in LIBDIRECTORIES: if (opt=="ALWAYS") or (opts.count(opt)): cmd = cmd + ' -L"' + dir + '"' for (opt, name) in LIBNAMES: if (opt=="ALWAYS") or (opts.count(opt)): cmd = cmd + ' ' + name cmd = cmd + " -lpthread -ldl" if (sys.platform == "darwin"): cmd = cmd + " -isysroot " + SDK["MACOSX"] + " -Wl,-syslibroot," + SDK["MACOSX"] + " -arch ppc -arch i386" oscmd(cmd)
1f06255489a6f52ace6cfed51e58aee258516b69 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8543/1f06255489a6f52ace6cfed51e58aee258516b69/makepanda.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 16143, 2098, 12, 27670, 16, 1081, 16, 1500, 4672, 309, 261, 31075, 14668, 31713, 3537, 13464, 6, 4672, 1797, 273, 296, 1232, 342, 82, 3966, 83, 342, 50, 1212, 30, 49, 4488, 3672, 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, 16143, 2098, 12, 27670, 16, 1081, 16, 1500, 4672, 309, 261, 31075, 14668, 31713, 3537, 13464, 6, 4672, 1797, 273, 296, 1232, 342, 82, 3966, 83, 342, 50, 1212, 30, 49, 4488, 3672, 18, 1...
print "removing parent"
def set_status(self,status,donedate=None) : old_status = self.status self.can_be_deleted = False if status : self.status = status #If Done, we set the done date if status in ["Done","Dismiss"] : for c in self.get_subtasks() : c.set_status(status,donedate=donedate) #to the specified date (if any) if donedate : self.closed_date = donedate #or to today else : self.closed_date = date.today() #If we mark a task as Active and that some parent are not #Active, we break the parent/child relation #It has no sense to have an active subtask of a done parent. # (old_status check is necessary to avoid false positive a start) elif status in ["Active"] and old_status in ["Done","Dismiss"] : if self.has_parents() : for p_tid in self.get_parents() : par = self.req.get_task(p_tid) if par.is_loaded() and par.get_status != "Active" : print "removing parent" self.remove_parent(p_tid) #We dont mark the children as Active because #They might be already completed after all self.sync()
74fab08bf33071a968ec50517b7d4e5a18665527 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8234/74fab08bf33071a968ec50517b7d4e5a18665527/task.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 2327, 12, 2890, 16, 2327, 16, 72, 8184, 340, 33, 7036, 13, 294, 1592, 67, 2327, 273, 365, 18, 2327, 365, 18, 4169, 67, 2196, 67, 8600, 273, 1083, 309, 1267, 294, 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, 444, 67, 2327, 12, 2890, 16, 2327, 16, 72, 8184, 340, 33, 7036, 13, 294, 1592, 67, 2327, 273, 365, 18, 2327, 365, 18, 4169, 67, 2196, 67, 8600, 273, 1083, 309, 1267, 294, 365, 18, ...
params['apfrom'] = urllib.quote(start.encode(self.encoding()))
params['apfrom'] = start
def allpages(self, start='!', namespace=None, includeredirects=True, throttle=True): """ Yield all Pages in alphabetical order.
ee57c8c07aa680d4c3afaa4836ad14c0956f9875 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4404/ee57c8c07aa680d4c3afaa4836ad14c0956f9875/wikipedia.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 777, 7267, 12, 2890, 16, 787, 2218, 5, 2187, 1981, 33, 7036, 16, 2823, 89, 765, 329, 867, 87, 33, 5510, 16, 18304, 33, 5510, 4672, 3536, 31666, 777, 22648, 316, 10877, 1706, 1353, 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, 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, 777, 7267, 12, 2890, 16, 787, 2218, 5, 2187, 1981, 33, 7036, 16, 2823, 89, 765, 329, 867, 87, 33, 5510, 16, 18304, 33, 5510, 4672, 3536, 31666, 777, 22648, 316, 10877, 1706, 1353, 18, ...
for (dp,dn,names) in os.walk('i18n'): files.append((dp, map(lambda x: opj('bin', dp, x), names)))
def data_files(): '''Build list of data files to be installed''' files = [] if os.name == 'nt': os.chdir('bin') for (dp,dn,names) in os.walk('addons'): files.append((dp, map(lambda x: opj('bin', dp, x), names))) for (dp,dn,names) in os.walk('i18n'): files.append((dp, map(lambda x: opj('bin', dp, x), names))) os.chdir('..') for (dp,dn,names) in os.walk('doc'): files.append((dp, map(lambda x: opj(dp, x), names))) files.append(('.', [('bin/import_xml.rng')])) else: man_directory = opj('share', 'man') files.append((opj(man_directory, 'man1'), ['man/openerp-server.1'])) files.append((opj(man_directory, 'man5'), ['man/openerp_serverrc.5'])) doc_directory = opj('share', 'doc', 'openerp-server-%s' % version) files.append((doc_directory, [f for f in glob.glob('doc/*') if os.path.isfile(f)])) files.append((opj(doc_directory, 'migrate', '3.3.0-3.4.0'), [f for f in glob.glob('doc/migrate/3.3.0-3.4.0/*') if os.path.isfile(f)])) files.append((opj(doc_directory, 'migrate', '3.4.0-4.0.0'), [f for f in glob.glob('doc/migrate/3.4.0-4.0.0/*') if os.path.isfile(f)])) openerp_site_packages = opj('lib', 'python%s' % py_short_version, 'site-packages', 'openerp-server') files.append((opj(openerp_site_packages, 'i18n'), glob.glob('bin/i18n/*'))) files.append((opj(openerp_site_packages, 'addons', 'custom'), glob.glob('bin/addons/custom/*xml') + glob.glob('bin/addons/custom/*rml') + glob.glob('bin/addons/custom/*xsl'))) files.append((openerp_site_packages, [('bin/import_xml.rng')])) for addon in find_addons(): add_path = addon.replace('.', os.path.sep).replace('openerp-server', 'bin', 1) addon_path = opj('lib', 'python%s' % py_short_version, 'site-packages', add_path.replace('bin', 'openerp-server', 1)) pathfiles = [ ( addon_path, glob.glob(opj(add_path, '*xml')) + glob.glob(opj(add_path, '*csv')) + glob.glob(opj(add_path, '*sql')) ), ( opj(addon_path, 'data'), glob.glob(opj(add_path, 'data', '*xml')) ), ( opj(addon_path, 'report'), glob.glob(opj(add_path, 'report', '*xml')) + glob.glob(opj(add_path, 'report', '*rml')) + glob.glob(opj(add_path, 'report', '*sxw')) + glob.glob(opj(add_path, 'report', '*xsl')) ), ( opj(addon_path, 'security'), glob.glob(opj(add_path, 'security', '*csv')) + glob.glob(opj(add_path, 'security', '*xml')) ), ( opj(addon_path, 'rng'), glob.glob(opj(add_path, 'rng', '*rng')) ) ] files.extend(pathfiles) return files
114a2bfad8f7bffe707350dbdb33d347f9acb87b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12853/114a2bfad8f7bffe707350dbdb33d347f9acb87b/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 501, 67, 2354, 13332, 9163, 3116, 666, 434, 501, 1390, 358, 506, 5876, 26418, 1390, 273, 5378, 309, 1140, 18, 529, 422, 296, 496, 4278, 1140, 18, 343, 1214, 2668, 4757, 6134, 364, 261, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 501, 67, 2354, 13332, 9163, 3116, 666, 434, 501, 1390, 358, 506, 5876, 26418, 1390, 273, 5378, 309, 1140, 18, 529, 422, 296, 496, 4278, 1140, 18, 343, 1214, 2668, 4757, 6134, 364, 261, ...
index_name = ('%s_%s%s%s' % (table_name, column_names[0], index_unique_name, suffix))
index_name = ('%s_%s%s%s' % (table_name, column_names[0], index_unique_name, suffix)).replace('"', '').replace('.', '_')
def create_index_name(self, table_name, column_names, suffix=""): """ Generate a unique name for the index """ index_unique_name = ''
a9f4905676568fdfee2528133b17cb0108d9522e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13142/a9f4905676568fdfee2528133b17cb0108d9522e/generic.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 1615, 67, 529, 12, 2890, 16, 1014, 67, 529, 16, 1057, 67, 1973, 16, 3758, 1546, 6, 4672, 3536, 6654, 279, 3089, 508, 364, 326, 770, 3536, 770, 67, 6270, 67, 529, 273, 875, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 1615, 67, 529, 12, 2890, 16, 1014, 67, 529, 16, 1057, 67, 1973, 16, 3758, 1546, 6, 4672, 3536, 6654, 279, 3089, 508, 364, 326, 770, 3536, 770, 67, 6270, 67, 529, 273, 875, ...
err = self["packet[0]"].isValid() if err: return "Packet
for index in xrange(5): try: packet = self["packet[%u]" % index] except MissingField: if self.eof: return True else: return "Unable to get packet err = packet.isValid() if err: return "Packet
def validate(self): sync = self.stream.searchBytes("\x47", 0, 204*8) if sync is None: return "Unable to find synchronization byte" err = self["packet[0]"].isValid() if err: return "Packet #0 is invalid: %s" % err return True
14f527f130200be77a8a7fd0184e521925279026 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9327/14f527f130200be77a8a7fd0184e521925279026/mpeg_ts.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1954, 12, 2890, 4672, 3792, 273, 365, 18, 3256, 18, 3072, 2160, 31458, 92, 9462, 3113, 374, 16, 11492, 14, 28, 13, 309, 3792, 353, 599, 30, 327, 315, 3370, 358, 1104, 24488, 1160, 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, 1954, 12, 2890, 4672, 3792, 273, 365, 18, 3256, 18, 3072, 2160, 31458, 92, 9462, 3113, 374, 16, 11492, 14, 28, 13, 309, 3792, 353, 599, 30, 327, 315, 3370, 358, 1104, 24488, 1160, 6, ...
width = GetEditorOption("Folding Margin Width", 12)
width = GetEditorOption("Fold Margin Width", 12)
def DoConfigChange(self): SyntEditViewParent.DoConfigChange(self) tabSize = GetEditorOption("Tab Size", 4, 2) indentSize = GetEditorOption("Indent Size", 4, 2) bUseTabs = GetEditorOption("Use Tabs", 0) bSmartTabs = GetEditorOption("Smart Tabs", 1) ext = self.idle.IDLEExtension("AutoIndent") # Required extension.
9bd27704789838d310d82777ccb256b73e9ff71f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/992/9bd27704789838d310d82777ccb256b73e9ff71f/coloreditor.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2256, 809, 3043, 12, 2890, 4672, 16455, 496, 4666, 1767, 3054, 18, 3244, 809, 3043, 12, 2890, 13, 3246, 1225, 273, 968, 6946, 1895, 2932, 5661, 6321, 3113, 1059, 16, 576, 13, 3504, 1225,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2256, 809, 3043, 12, 2890, 4672, 16455, 496, 4666, 1767, 3054, 18, 3244, 809, 3043, 12, 2890, 13, 3246, 1225, 273, 968, 6946, 1895, 2932, 5661, 6321, 3113, 1059, 16, 576, 13, 3504, 1225,...
self.__tracker.shutter -= 1
self.__tracker.shutter -= 5
def onKeyUp(self, Event): if Event.keystring == "a": self.__tracker.threshold += 1 print "Threshold: ", self.__tracker.threshold elif Event.keystring == "y": self.__tracker.threshold -= 1 print "Threshold: ", self.__tracker.threshold elif Event.keystring == "s": self.__tracker.brightness += 5 print "Brightness: ", self.__tracker.brightness elif Event.keystring == "x": self.__tracker.brightness -= 5 print "Brightness: ", self.__tracker.brightness elif Event.keystring == "d": self.__tracker.exposure += 1 print "Exposure: ", self.__tracker.exposure elif Event.keystring == "c": self.__tracker.exposure -= 1 print "Exposure: ", self.__tracker.exposure elif Event.keystring == "f": self.__tracker.shutter += 1 print "Shutter: ", self.__tracker.shutter elif Event.keystring == "v": self.__tracker.shutter -= 1 print "Shutter: ", self.__tracker.shutter elif Event.keystring == "g": self.__tracker.gain += 1 print "Gain: ", self.__tracker.gain elif Event.keystring == "b": self.__tracker.gain -= 1 print "Gain: ", self.__tracker.gain
32c6d30b38b70a4a13cdb2c0fe854dd158aeaa21 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7300/32c6d30b38b70a4a13cdb2c0fe854dd158aeaa21/TestTracking.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 653, 1211, 12, 2890, 16, 2587, 4672, 309, 2587, 18, 856, 1080, 422, 315, 69, 6877, 365, 16186, 16543, 18, 8699, 1011, 404, 1172, 315, 7614, 30, 3104, 365, 16186, 16543, 18, 8699, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 653, 1211, 12, 2890, 16, 2587, 4672, 309, 2587, 18, 856, 1080, 422, 315, 69, 6877, 365, 16186, 16543, 18, 8699, 1011, 404, 1172, 315, 7614, 30, 3104, 365, 16186, 16543, 18, 8699, ...
print 'This script requires lldb.py to be in either ' + dbgPath, print ' or' + relPath
print 'This script requires lldb.py to be in either ' + dbgPath + ',', print relPath + ', or ' + baiPath
def setupSysPath(): """Add LLDB.framework/Resources/Python to the search paths for modules.""" # Get the directory containing the current script. scriptPath = sys.path[0] if not scriptPath.endswith('test'): print "This script expects to reside in lldb's test directory." sys.exit(-1) os.environ["LLDB_TEST"] = scriptPath pluginPath = os.path.join(scriptPath, 'plugins') base = os.path.abspath(os.path.join(scriptPath, os.pardir)) dbgPath = os.path.join(base, 'build', 'Debug', 'LLDB.framework', 'Resources', 'Python') relPath = os.path.join(base, 'build', 'Release', 'LLDB.framework', 'Resources', 'Python') lldbPath = None if os.path.isfile(os.path.join(dbgPath, 'lldb.py')): lldbPath = dbgPath elif os.path.isfile(os.path.join(relPath, 'lldb.py')): lldbPath = relPath if not lldbPath: print 'This script requires lldb.py to be in either ' + dbgPath, print ' or' + relPath sys.exit(-1) sys.path.append(lldbPath) sys.path.append(scriptPath) sys.path.append(pluginPath)
1a5447297c159889a9bef73502a1a80f3291f449 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11986/1a5447297c159889a9bef73502a1a80f3291f449/dotest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 12712, 743, 13332, 3536, 986, 29863, 2290, 18, 12303, 19, 3805, 19, 15774, 358, 326, 1623, 2953, 364, 4381, 12123, 225, 468, 968, 326, 1867, 4191, 326, 783, 2728, 18, 2728, 743, 27...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 12712, 743, 13332, 3536, 986, 29863, 2290, 18, 12303, 19, 3805, 19, 15774, 358, 326, 1623, 2953, 364, 4381, 12123, 225, 468, 968, 326, 1867, 4191, 326, 783, 2728, 18, 2728, 743, 27...
if selSense == 0:
self.bondable_pairs = [] self.ways_of_bonding = {} if selSense == 0:
def EndPick(self, event, selSense): """Pick if click. Only one chunk can be selected . """ if not self.picking: return self.picking = False
58f127e93b7fa4e2fed427821c60dc83c31baeda /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/58f127e93b7fa4e2fed427821c60dc83c31baeda/fusechunksMode.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4403, 17968, 12, 2890, 16, 871, 16, 357, 29713, 4672, 3536, 17968, 309, 4682, 18, 225, 5098, 1245, 2441, 848, 506, 3170, 263, 3536, 309, 486, 365, 18, 11503, 310, 30, 327, 365, 18, 115...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4403, 17968, 12, 2890, 16, 871, 16, 357, 29713, 4672, 3536, 17968, 309, 4682, 18, 225, 5098, 1245, 2441, 848, 506, 3170, 263, 3536, 309, 486, 365, 18, 11503, 310, 30, 327, 365, 18, 115...
src_integrand += (phidot * ((-1.5*q**2)*cterm + (2 - (q/k)**2)*dterm) * dp1dot_q)
src_integrand3 = (phidot * ((-1.5*q**2)*cterm + (2 - (q/k)**2)*k*q*dterm) * dp1dot_q)
def slowrollsrcterm(bgvars, a, potentials, integrand_elements, dp1, dp1dot, theta_terms): """Return unintegrated slow roll source term. The source term before integration is calculated here using the slow roll approximation. This function follows the revised version of Eq (5.8) in Malik 06 (astro-ph/0610864v5). Parameters ---------- bgvars: tuple Tuple of background field values in the form `(phi, phidot, H)` a: float Scale factor at the current timestep, `a = ainit*exp(n)` potentials: tuple Tuple of potential values in the form `(U, dU, dU2, dU3)` integrand_elements: tuple Contains integrand arrays in order (k, q, theta) dp1: array_like Array of known dp1 values dp1dot: array_like Array of dpdot1 values theta_terms: array_like 3-d array of integrated theta terms of shape (4, len(k), len(q)) Returns ------- src_integrand: array_like Array containing the unintegrated source terms for all k and q modes. References ---------- Malik, K. 2006, JCAP03(2007)004, astro-ph/0610864v5 """ #Unpack variables phi, phidot, H = bgvars U, dU, dU2, dU3 = potentials k = integrand_elements[0][...,N.newaxis] q = integrand_elements[1][N.newaxis, ...] #Calculate dphi(q) and dphi(k-q) dp1_q = dp1[N.newaxis,:q.shape[-1]] dp1dot_q = dp1dot[N.newaxis,q.shape[-1]] atmp, btmp, ctmp, dtmp = theta_terms aterm = atmp[0] + atmp[1]*1j bterm = btmp[0] + btmp[1]*1j cterm = ctmp[0] + ctmp[1]*1j dterm = dtmp[0] + dtmp[1]*1j #Calculate unintegrated source term #First major term: if dU3!=0.0: src_integrand = ((1/H**2) * dU3 * q**2 * dp1_q * aterm) else: src_integrand = N.zeros_like(aterm) #Second major term: src_integrand += (phidot/((a*H)**2)) * ((3*dU2*(a*q)**2 + 3.5*q**4 + 2*(k**2)*(q**2))*aterm + (-4.5 + (q/k)**2)* k * (q**3) * bterm) * dp1_q #Third major term: src_integrand += (phidot * ((-1.5*q**2)*cterm + (2 - (q/k)**2)*dterm) * dp1dot_q) #Multiply by prefactor src_integrand *= (1/(2*N.pi)**2) return src_integrand
68b420472e830d634c67f46640d7c6c4f6904618 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7283/68b420472e830d634c67f46640d7c6c4f6904618/sosource.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11816, 2693, 11254, 299, 1035, 12, 12370, 4699, 16, 279, 16, 8555, 87, 16, 5780, 7884, 67, 6274, 16, 9986, 21, 16, 9986, 21, 9811, 16, 7338, 67, 10112, 4672, 3536, 990, 640, 27423, 690...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11816, 2693, 11254, 299, 1035, 12, 12370, 4699, 16, 279, 16, 8555, 87, 16, 5780, 7884, 67, 6274, 16, 9986, 21, 16, 9986, 21, 9811, 16, 7338, 67, 10112, 4672, 3536, 990, 640, 27423, 690...
class Part(object): def __init__(self, name): self.name = name self.bit_mask = -1 self.deps = [] self.packages = [] class Package(object): def __init__(self, id): self.id = id self.class_list = [] self.part_count = 0
def __init__(self, console, depLoader, compiler): self._console = console self._depLoader = depLoader self._compiler = compiler
e13fa46bae9b46a89002191681f67bac823b3c1a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5718/e13fa46bae9b46a89002191681f67bac823b3c1a/PartBuilder.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2983, 16, 5993, 2886, 16, 5274, 4672, 365, 6315, 8698, 273, 2983, 365, 6315, 15037, 2886, 273, 5993, 2886, 365, 6315, 9576, 273, 5274, 2, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2983, 16, 5993, 2886, 16, 5274, 4672, 365, 6315, 8698, 273, 2983, 365, 6315, 15037, 2886, 273, 5993, 2886, 365, 6315, 9576, 273, 5274, 2, -100, -100, -100,...
self.assertEqual(stuff, 'c'*mapsize,
self.assertEqual(stuff, b'c'*mapsize,
def test_access_parameter(self): # Test for "access" keyword parameter mapsize = 10 open(TESTFN, "wb").write("a"*mapsize) f = open(TESTFN, "rb") m = mmap.mmap(f.fileno(), mapsize, access=mmap.ACCESS_READ) self.assertEqual(m[:], 'a'*mapsize, "Readonly memory map data incorrect.")
4abd2afa9f59296e15a041702324f90af3ab3258 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3187/4abd2afa9f59296e15a041702324f90af3ab3258/test_mmap.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 3860, 67, 6775, 12, 2890, 4672, 468, 7766, 364, 315, 3860, 6, 4932, 1569, 852, 1467, 273, 1728, 1696, 12, 16961, 19793, 16, 315, 9464, 20387, 2626, 2932, 69, 6, 14, 1458, 146...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 3860, 67, 6775, 12, 2890, 4672, 468, 7766, 364, 315, 3860, 6, 4932, 1569, 852, 1467, 273, 1728, 1696, 12, 16961, 19793, 16, 315, 9464, 20387, 2626, 2932, 69, 6, 14, 1458, 146...
pp = self.path_in_package.split(os.sep)
def add_data_dir(self,data_path): """ Recursively add files under data_path to data_files list. Argument can be either - 2-sequence (<datadir suffix>,<path to data directory>) - path to data directory where python datadir suffix defaults to package dir.
7ac6e2005976d03e25e723bacd59f27ad87e86dc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14925/7ac6e2005976d03e25e723bacd59f27ad87e86dc/misc_util.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 892, 67, 1214, 12, 2890, 16, 892, 67, 803, 4672, 3536, 31362, 527, 1390, 3613, 501, 67, 803, 358, 501, 67, 2354, 666, 18, 5067, 848, 506, 3344, 300, 576, 17, 6178, 261, 32, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 892, 67, 1214, 12, 2890, 16, 892, 67, 803, 4672, 3536, 31362, 527, 1390, 3613, 501, 67, 803, 358, 501, 67, 2354, 666, 18, 5067, 848, 506, 3344, 300, 576, 17, 6178, 261, 32, ...
self.sortLabels()
self.sortLabels(sort_type='last_value')
def makeCumulativeGraph(self): """ Prepare data for the cumulative graph """ if self.plotdata: self.plotdata.makeCumulativePlot() if self.truncated: self.otherPlot.makeCumulativePlot() if self.subplots: for label in self.subplots: self.subplots[label].makeCumulativePlot() self.sortLabels()
682c6896ec385a0c1e3a073755a73ae602c61b4f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/682c6896ec385a0c1e3a073755a73ae602c61b4f/GraphData.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 39, 11276, 4137, 12, 2890, 4672, 3536, 7730, 501, 364, 326, 15582, 2667, 3536, 225, 309, 365, 18, 4032, 892, 30, 365, 18, 4032, 892, 18, 6540, 39, 11276, 11532, 1435, 309, 365, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 39, 11276, 4137, 12, 2890, 4672, 3536, 7730, 501, 364, 326, 15582, 2667, 3536, 225, 309, 365, 18, 4032, 892, 30, 365, 18, 4032, 892, 18, 6540, 39, 11276, 11532, 1435, 309, 365, 1...
if curpage <= pagefootlimit:
if curpage <= (pagefootlimit / 2):
def handler(self, context): pageappend = "" recent = 0 if self.form.has_key("search"): searchstring = self.form['search'].value else: searchstring = "NOTHINGwillMATCHthis" if self.form.has_key("offset"): offset = int(self.form['offset'].value) else: offset = 0
922820c2babdbb88ed6d7bda19aeea95f66176c0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11694/922820c2babdbb88ed6d7bda19aeea95f66176c0/searchResults.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1838, 12, 2890, 16, 819, 4672, 1363, 6923, 273, 1408, 8399, 273, 374, 309, 365, 18, 687, 18, 5332, 67, 856, 2932, 3072, 6, 4672, 1623, 1080, 273, 365, 18, 687, 3292, 3072, 29489, 1132,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1838, 12, 2890, 16, 819, 4672, 1363, 6923, 273, 1408, 8399, 273, 374, 309, 365, 18, 687, 18, 5332, 67, 856, 2932, 3072, 6, 4672, 1623, 1080, 273, 365, 18, 687, 3292, 3072, 29489, 1132,...
warnings.simplefilter('default', RuntimeWarning)
warnings.simplefilter('default', ImportWarning)
def imp(): import notapackage
46145d31c9f34915395e6eb645a8ae62d2b65b33 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6934/46145d31c9f34915395e6eb645a8ae62d2b65b33/test_import.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1646, 13332, 1930, 486, 438, 1270, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1646, 13332, 1930, 486, 438, 1270, 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, ...
if useScons : withoutSlash += ' LD_LIBRARY_PATH=%s/lib' % clam_prefix
def runInBackgroundForAWhile(path, command, sleeptime=10, useScons='') : os.chdir(path) time.sleep( sleeptime ) withoutSlash = command[command.find('/')+1 : ] if useScons : withoutSlash += ' LD_LIBRARY_PATH=%s/lib' % clam_prefix status, dummy = commands.getstatusoutput('killall '+ withoutSlash) # print 'kill status ', status, dummy if os.access('/tmp/removeme.out', os.F_OK) : result = string.join( file('/tmp/removeme.out').readlines() ) os.remove(out) else : result = "[No output received from '%s']"%command if os.access('/tmp/removeme.err', os.F_OK) : result += string.join( file('/tmp/removeme.err').readlines() ) os.remove(err) else : result = "[No error messages received from '%s']"%command return True, result #TODO status
27c7d34336d3fa088e93c6a3f2898839ae3b6185 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1456/27c7d34336d3fa088e93c6a3f2898839ae3b6185/runTests.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 382, 8199, 1290, 37, 15151, 12, 803, 16, 1296, 16, 272, 11182, 10650, 33, 2163, 16, 999, 55, 8559, 2218, 6134, 294, 1140, 18, 343, 1214, 12, 803, 13, 813, 18, 19607, 12, 272, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 382, 8199, 1290, 37, 15151, 12, 803, 16, 1296, 16, 272, 11182, 10650, 33, 2163, 16, 999, 55, 8559, 2218, 6134, 294, 1140, 18, 343, 1214, 12, 803, 13, 813, 18, 19607, 12, 272, 1...
None, [cty.POINTER(FL_OBJECT), cty.c_int, cty.c_double],
None, [cty.POINTER(FL_OBJECT), cty.c_int, cty.c_double],
def fl_set_xyplot_xscale(obj, scale, base): """ fl_set_xyplot_xscale(obj, scale, base) """ _fl_set_xyplot_xscale(obj, scale, base)
9942dac8ce2b35a1e43615a26fd8e7054ef805d3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2429/9942dac8ce2b35a1e43615a26fd8e7054ef805d3/xformslib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1183, 67, 542, 67, 1698, 4032, 67, 92, 5864, 12, 2603, 16, 3159, 16, 1026, 4672, 3536, 1183, 67, 542, 67, 1698, 4032, 67, 92, 5864, 12, 2603, 16, 3159, 16, 1026, 13, 3536, 225, 389, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1183, 67, 542, 67, 1698, 4032, 67, 92, 5864, 12, 2603, 16, 3159, 16, 1026, 4672, 3536, 1183, 67, 542, 67, 1698, 4032, 67, 92, 5864, 12, 2603, 16, 3159, 16, 1026, 13, 3536, 225, 389, ...
closure_param.name == 'user_data'):
closure_param.name.endswith('data')):
def _handle_closure(self, param, closure_idx, closure_param): if (closure_param.type.name == 'any' and closure_param.name == 'user_data'): param.closure_name = closure_param.name param.closure_index = closure_idx return True return False
e49a883d0997127cd3a0ad7e522666f30190e792 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2770/e49a883d0997127cd3a0ad7e522666f30190e792/transformer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4110, 67, 20823, 12, 2890, 16, 579, 16, 7213, 67, 3465, 16, 7213, 67, 891, 4672, 309, 261, 20823, 67, 891, 18, 723, 18, 529, 422, 296, 2273, 11, 471, 7213, 67, 891, 18, 529, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4110, 67, 20823, 12, 2890, 16, 579, 16, 7213, 67, 3465, 16, 7213, 67, 891, 4672, 309, 261, 20823, 67, 891, 18, 723, 18, 529, 422, 296, 2273, 11, 471, 7213, 67, 891, 18, 529, 1...
self.connect("formatted_%s%s_%s" % (name_prefix, action, member_name),
self.connect("formatted_%s%s_%s" % (name_prefix, action, member_name),
def requirements_for(meth): """Returns a new dict to be used for all route creation as the route options""" opts = options.copy() if method != 'any': opts['conditions'] = {'method':[meth.upper()]} return opts
52ae2d9eaabbf5ff009086347bb090d7048fa505 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12081/52ae2d9eaabbf5ff009086347bb090d7048fa505/base.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8433, 67, 1884, 12, 27305, 4672, 3536, 1356, 279, 394, 2065, 358, 506, 1399, 364, 777, 1946, 6710, 487, 326, 1946, 702, 8395, 1500, 273, 702, 18, 3530, 1435, 309, 707, 480, 296, 2273, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8433, 67, 1884, 12, 27305, 4672, 3536, 1356, 279, 394, 2065, 358, 506, 1399, 364, 777, 1946, 6710, 487, 326, 1946, 702, 8395, 1500, 273, 702, 18, 3530, 1435, 309, 707, 480, 296, 2273, ...
return [ GeoEntity.factory( id = e['geonameId'] )[0] for e in jsonData['geonames'] ]
if 'geonames' in jsonData: return [ GeoEntity.factory( id = e['geonameId'] )[0] for e in jsonData['geonames'] ] else: return []
def getNeighbors(geo_entity): """ returns all neighbours for the given geo id (currently only implemented on a country level) @param[in] geo_entity @returns a list containing the neighbours of the given country """
68b5d283b3af11490984c7a4e9b528d4d847ec75 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6604/68b5d283b3af11490984c7a4e9b528d4d847ec75/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 27053, 12, 12376, 67, 1096, 4672, 3536, 1135, 777, 27662, 364, 326, 864, 7856, 612, 261, 2972, 715, 1338, 8249, 603, 279, 5251, 1801, 13, 632, 891, 63, 267, 65, 7856, 67, 1096, 63...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 27053, 12, 12376, 67, 1096, 4672, 3536, 1135, 777, 27662, 364, 326, 864, 7856, 612, 261, 2972, 715, 1338, 8249, 603, 279, 5251, 1801, 13, 632, 891, 63, 267, 65, 7856, 67, 1096, 63...
labelRE = re.compile(r'[^%]%\(([^\)]+)\)[sd]')
labelRE = re.compile(r'(?<!%)%\(([^\)]+)\)[sd]')
def substBitOps(code): # first convert single-bit selectors to two-index form # i.e., <n> --> <n:n> code = bitOp1ArgRE.sub(r'<\1:\1>', code) # simple case: selector applied to ID (name) # i.e., foo<a:b> --> bits(foo, a, b) code = bitOpWordRE.sub(r'bits(\1, \2, \3)', code) # if selector is applied to expression (ending in ')'), # we need to search backward for matching '(' match = bitOpExprRE.search(code) while match: exprEnd = match.start() here = exprEnd - 1 nestLevel = 1 while nestLevel > 0: if code[here] == '(': nestLevel -= 1 elif code[here] == ')': nestLevel += 1 here -= 1 if here < 0: sys.exit("Didn't find '('!") exprStart = here+1 newExpr = r'bits(%s, %s, %s)' % (code[exprStart:exprEnd+1], match.group(1), match.group(2)) code = code[:exprStart] + newExpr + code[match.end():] match = bitOpExprRE.search(code) return code
ab2bed349b356b4784e1a6c8fdf6f4a86e27f543 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6787/ab2bed349b356b4784e1a6c8fdf6f4a86e27f543/isa_parser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 27750, 5775, 8132, 12, 710, 4672, 468, 1122, 1765, 2202, 17, 3682, 11424, 358, 2795, 17, 1615, 646, 468, 277, 18, 73, 12990, 411, 82, 34, 15431, 411, 82, 30, 82, 34, 981, 273, 2831, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 27750, 5775, 8132, 12, 710, 4672, 468, 1122, 1765, 2202, 17, 3682, 11424, 358, 2795, 17, 1615, 646, 468, 277, 18, 73, 12990, 411, 82, 34, 15431, 411, 82, 30, 82, 34, 981, 273, 2831, ...
("Broken", "effect_unclassified.png"), (_("Unclassified"), "effect_unclassified.png"), (_("Delays"), "effect_delays.png"), (_("Equalizers"), "effect_equalizers.png"), (_("Modulators"), "effect_modulators.png"), (_("Filters"), "effect_filters.png"), (_("Distortion"), "effect_distortion.png"), (_("Simulators"), "effect_simulators.png"), (_("Miscellaneous"), "effect_miscellaneous.png"), (_("Chorus"), "effect_chorus.png"), (_("Phasers"), "effect_phasers.png"), (_("Flangers"), "effect_flangers.png"), (_("Oscillators"), "effect_oscillators.png"), (_("Compressors"), "effect_compressors.png"), (_("Amplifiers"), "effect_amplifiers.png")
(_("Broken"), "effect_unclassified.png"), (_("Unclassified"), "effect_unclassified.png"), (_("Amplifiers"), "effect_amplifiers.png"), (_("Chorus"), "effect_chorus.png"), (_("Compressors"), "effect_compressors.png"), (_("Delays"), "effect_delays.png"), (_("Distortions"), "effect_distortion.png"), (_("Equalizers"), "effect_equalizers.png"), (_("Filters"), "effect_filters.png"), (_("Flangers"), "effect_flangers.png"), (_("Miscellaneous"), "effect_miscellaneous.png"), (_("Modulators"), "effect_modulators.png"), (_("Oscillators"), "effect_oscillators.png"), (_("Phasers"), "effect_phasers.png"), (_("Reverbs"), "effect_reverbs.png"), (_("Simulators"), "effect_simulators.png")
def PopulateEncoders(): """ Check if the hardcoded list of encoders is available on the system. """ #HACK: we can't import gst at the top of Globals.py because #if we do, gstreamer will get to the sys.args and print it's own #message instead of ours. This will be fixed once we can use #GOption when we depend on pygobject 2.12. import gst for type in _export_formats: for element in type[2].split("!"): exists = gst.default_registry_check_feature_version(element.strip(), 0, 10, 0) if not exists: debug('Cannot find "%s" plugin, disabling encoder: "%s"' % (element.strip(), type[2])) # we know at least one of the elements doesnt exist, so skip this encode format. continue #create a dictionary using _export_template as the keys #and the current item from _export_formats as the values. d = dict(zip(_export_template, type)) EXPORT_FORMATS.append(d)
f57d918efa0311f6e78f1f7f1dbb7f129ae98df1 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/10033/f57d918efa0311f6e78f1f7f1dbb7f129ae98df1/Globals.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 22254, 25100, 414, 13332, 3536, 2073, 309, 326, 7877, 24808, 666, 434, 17755, 414, 353, 2319, 603, 326, 2619, 18, 3536, 468, 44, 3649, 30, 732, 848, 1404, 1930, 314, 334, 622, 326, 1760,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 22254, 25100, 414, 13332, 3536, 2073, 309, 326, 7877, 24808, 666, 434, 17755, 414, 353, 2319, 603, 326, 2619, 18, 3536, 468, 44, 3649, 30, 732, 848, 1404, 1930, 314, 334, 622, 326, 1760,...
self.client.set_list(defs.PANEL, defs.APPLET_LIST, awn.CONFIG_LIST_STRING, applets_list) self.client.set_list(defs.PANEL, defs.UA_LIST, awn.CONFIG_LIST_STRING, ua_list)
self.client.set_list(defs.PANEL, defs.APPLET_LIST, applets_list) self.client.set_list(defs.PANEL, defs.UA_LIST, ua_list)
def _apply (self): applets_list = [] ua_list = []
6e5ef9d2ff04626633394808ed3d5531bb4809af /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8416/6e5ef9d2ff04626633394808ed3d5531bb4809af/awnClass.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 9010, 261, 2890, 4672, 513, 20773, 67, 1098, 273, 5378, 10165, 67, 1098, 273, 5378, 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...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 9010, 261, 2890, 4672, 513, 20773, 67, 1098, 273, 5378, 10165, 67, 1098, 273, 5378, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
def test_aaaassign_role(self):
def test_assign_role(self):
def test_aaaassign_role(self): """Assign a role XXX: Do the jstree click """ self.selenium.open("/portal/admin_assignroles_html", True) self.selenium.add_selection("names", "label=user3") self.selenium.add_selection("//select[@name='roles']", 'Manager') self.selenium.type('location', "info") self.selenium.click("//input[@value='Assign role']") self.selenium.wait_for_page_to_load("3000")
ee951287ed111df3db732bd02789e35efef4597b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3287/ee951287ed111df3db732bd02789e35efef4597b/test_user_management.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 6145, 67, 4615, 12, 2890, 4672, 3536, 4910, 279, 2478, 11329, 30, 2256, 326, 525, 334, 992, 4682, 3536, 365, 18, 1786, 17327, 18, 3190, 2932, 19, 24386, 19, 3666, 67, 6145, 7...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 6145, 67, 4615, 12, 2890, 4672, 3536, 4910, 279, 2478, 11329, 30, 2256, 326, 525, 334, 992, 4682, 3536, 365, 18, 1786, 17327, 18, 3190, 2932, 19, 24386, 19, 3666, 67, 6145, 7...
"""
""" if alg=="scipy": import scipy.special ans = str(scipy.special.yv(float(nu),complex(real(z),imag(z)))) ans = ans.replace("(","") ans = ans.replace(")","") ans = ans.replace("j","*I") return sage_eval(ans)
def bessel_Y(nu,z): r""" Implements the "Y-Bessel function", or "Bessel function of the 2nd kind", with index (or "order") nu and argument z. Defn:
0fb37ff99a113a9a0b53b260456b3ff8fa211fee /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/0fb37ff99a113a9a0b53b260456b3ff8fa211fee/special.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 324, 403, 292, 67, 61, 12, 13053, 16, 94, 4672, 436, 8395, 309, 11989, 31713, 1017, 9126, 6877, 1930, 10966, 18, 9371, 4152, 273, 609, 12, 1017, 9126, 18, 9371, 18, 93, 90, 12, 5659, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 324, 403, 292, 67, 61, 12, 13053, 16, 94, 4672, 436, 8395, 309, 11989, 31713, 1017, 9126, 6877, 1930, 10966, 18, 9371, 4152, 273, 609, 12, 1017, 9126, 18, 9371, 18, 93, 90, 12, 5659, ...
def lists_of_member(hostname, user):
def lists_of_member(mlist, user): hostname = mlist.host_name
def lists_of_member(hostname, user): onlists = [] for listname in Utils.list_names(): mlist = MailList.MailList(listname, lock=0) if mlist.host_name <> hostname: continue if not mlist.isMember(user): continue onlists.append(mlist) return onlists
a7f380be49e23e0d437145d5b34c215cbecbaacf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2120/a7f380be49e23e0d437145d5b34c215cbecbaacf/options.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6035, 67, 792, 67, 5990, 12, 781, 376, 16, 729, 4672, 5199, 273, 312, 1098, 18, 2564, 67, 529, 603, 9772, 273, 5378, 364, 666, 529, 316, 6091, 18, 1098, 67, 1973, 13332, 312, 1098, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6035, 67, 792, 67, 5990, 12, 781, 376, 16, 729, 4672, 5199, 273, 312, 1098, 18, 2564, 67, 529, 603, 9772, 273, 5378, 364, 666, 529, 316, 6091, 18, 1098, 67, 1973, 13332, 312, 1098, 2...
keyInfoNS = 'http://www.w3.org/2000/09/xmldsig keyInfoNode = GetNode(userIdentityNode.getElementsByTagNameNS(keyInfoNS, 'KeyInfo'))
def verifyFromCertInfo(xmlDoc, userIdentityNode, namespace, prefix): " Use localJobID and probeName to find cert info file and insert info into XML record" # Collect data needed by certinfo reader DebugPrint(4, "DEBUG: Get JobIdentity") JobIdentityNode = GetNode(xmlDoc.getElementsByTagNameNS(namespace, 'JobIdentity')) if JobIdentityNode == None: return DebugPrint(4, "DEBUG: Get JobIdentity: OK") localJobId = GetNodeData(JobIdentityNode.getElementsByTagNameNS(namespace, 'LocalJobId')) DebugPrint(4, "DEBUG: Get localJobId: ", localJobId) usageRecord = userIdentityNode.parentNode probeName = GetNodeData(usageRecord.getElementsByTagNameNS(namespace, 'ProbeName')) DebugPrint(4, "DEBUG: Get probeName: ", probeName) # Read certinfo DebugPrint(4, "DEBUG: call readCertInfo(" + str(localJobId) + ", " + str(probeName) + ")") certInfo = readCertInfo(localJobId, probeName) DebugPrint(4, "DEBUG: call readCertInfo: OK") DebugPrint(4, "DEBUG: certInfo: " + str(certInfo)) if certInfo == None: DebugPrint(4, "DEBUG: Returning without processing certInfo") return elif (not certInfo.has_key('DN')) or (not certInfo['DN']): # Found a certinfo file, but no useful info. DebugPrint(4, "DEBUG: Certinfo with no DN: WS without delegation?") return { 'VOName': certInfo['FQAN'], 'ReportableVOName': certInfo['VO']} # Use certinfo DebugPrint(4, "DEBUG: fixing DN") certInfo['DN'] = FixDN(certInfo['DN']) # "Standard" slash format # First, find a KeyInfo node if it is there DebugPrint(4, "DEBUG: looking for KeyInfo node") keyInfoNS = 'http://www.w3.org/2000/09/xmldsig#'; keyInfoNode = GetNode(userIdentityNode.getElementsByTagNameNS(keyInfoNS, 'KeyInfo')) DNnode = GetNode(userIdentityNode.getElementsByTagNameNS(namespace, 'DN')) if DNnode and DNnode.firstChild: # Override DebugPrint(4, "DEBUG: overriding DN from certInfo") DNnode.firstChild.data = certInfo['DN'] else: DebugPrint(4, "DEBUG: creating fresh DN node") if not DNnode: DNnode = xmlDoc.createElementNS(namespace, 'DN') textNode = xmlDoc.createTextNode(certInfo['DN']) DNnode.appendChild(textNode) if not DNnode.parentNode: userIdentityNode.appendChild(DNnode) DebugPrint(4, "DEBUG: creating fresh DN node: OK") # Return VO information for insertion in a common place. DebugPrint(4, "DEBUG: returning VOName " + str(certInfo['FQAN']) + " and ReportableVOName " + str(certInfo['VO'])) return { 'VOName': certInfo['FQAN'], 'ReportableVOName': certInfo['VO']}
2abb6f512aead669f454a58e7b6bf70e0d0428a5 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/637/2abb6f512aead669f454a58e7b6bf70e0d0428a5/Gratia.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3929, 1265, 5461, 966, 12, 2902, 1759, 16, 729, 4334, 907, 16, 1981, 16, 1633, 4672, 315, 2672, 1191, 2278, 734, 471, 10695, 461, 358, 1104, 3320, 1123, 585, 471, 2243, 1123, 1368, 3167,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3929, 1265, 5461, 966, 12, 2902, 1759, 16, 729, 4334, 907, 16, 1981, 16, 1633, 4672, 315, 2672, 1191, 2278, 734, 471, 10695, 461, 358, 1104, 3320, 1123, 585, 471, 2243, 1123, 1368, 3167,...
return self.expr.parse( instring, loc, doActions ) else: raise ParseException(instring,loc,"",self)
lookup = (self,instring,loc,doActions) try: value = ParserElement.exprArgCache[ lookup ] if isinstance(value,ParseException): raise value return value except KeyError: try: ParserElement.exprArgCache[ lookup ] = value = self.expr.parse( instring, loc, doActions ) return value except ParseException, pe: ParserElement.exprArgCache[ lookup ] = pe raise
def parseImpl( self, instring, loc, doActions=True ): if self.expr is not None: return self.expr.parse( instring, loc, doActions ) else: raise ParseException(instring,loc,"",self)
b86a9b5ab840c021fb0248af229f294db3a9f5e8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12364/b86a9b5ab840c021fb0248af229f294db3a9f5e8/pyparsing.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 2828, 12, 365, 16, 316, 1080, 16, 1515, 16, 741, 6100, 33, 5510, 262, 30, 309, 365, 18, 8638, 353, 486, 599, 30, 327, 365, 18, 8638, 18, 2670, 12, 316, 1080, 16, 1515, 16, 74...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 2828, 12, 365, 16, 316, 1080, 16, 1515, 16, 741, 6100, 33, 5510, 262, 30, 309, 365, 18, 8638, 353, 486, 599, 30, 327, 365, 18, 8638, 18, 2670, 12, 316, 1080, 16, 1515, 16, 74...
def check_close(x, y):
def check_close_real(x, y, eps=1e-9): """Return true iff floats x and y "are close\"""" if abs(x) > abs(y): x, y = y, x if y == 0: return abs(x) < eps if x == 0: return abs(y) < eps return abs((x-y)/y) < eps def check_close(x, y, eps=1e-9):
def check_close(x, y): """Return true iff complexes x and y "are close\"""" return fcmp(x.real, y.real) == 0 == fcmp(x.imag, y.imag)
1be4d329953096d55ee7b70f044795d9a2f0defc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/1be4d329953096d55ee7b70f044795d9a2f0defc/test_complex.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 4412, 67, 7688, 12, 92, 16, 677, 16, 7785, 33, 21, 73, 17, 29, 4672, 3536, 990, 638, 21437, 19172, 619, 471, 677, 315, 834, 1746, 2412, 8395, 225, 309, 2417, 12, 92, 13, 4...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 4412, 67, 7688, 12, 92, 16, 677, 16, 7785, 33, 21, 73, 17, 29, 4672, 3536, 990, 638, 21437, 19172, 619, 471, 677, 315, 834, 1746, 2412, 8395, 225, 309, 2417, 12, 92, 13, 4...
diracRoot = gConfig.getValue('/LocalSite/Root')
import DIRAC diracRoot = gConfig.getValue('/LocalSite/Root',DIRAC.rootPath)
def __getRequestDBPath(self): """ Obtain the root of the requestDB from the configuration """ csSection = csSection = PathFinder.getServiceSection( "RequestManagement/RequestManager" ) root = gConfig.getValue('%s/Path' % csSection) if not root: diracRoot = gConfig.getValue('/LocalSite/Root') root = diracRoot+'/requestdb' if not os.path.exists(root): os.makedirs(root) return root
a83e3fb09e2201bebfe4619802f89d287c7dda0b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/a83e3fb09e2201bebfe4619802f89d287c7dda0b/RequestDBFile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 588, 691, 2290, 743, 12, 2890, 4672, 3536, 24850, 326, 1365, 434, 326, 590, 2290, 628, 326, 1664, 3536, 2873, 5285, 273, 2873, 5285, 273, 2666, 8441, 18, 588, 1179, 5285, 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, 1001, 588, 691, 2290, 743, 12, 2890, 4672, 3536, 24850, 326, 1365, 434, 326, 590, 2290, 628, 326, 1664, 3536, 2873, 5285, 273, 2873, 5285, 273, 2666, 8441, 18, 588, 1179, 5285, 12, 315, ...
packager.mainModule(mainModule, filename = main)
packager.mainModule(mainModule)
def makePackedApp(args): opts, args = getopt.getopt(args, 'd:m:r:s:xh') packager = Packager.Packager() root = Filename('.') main = None requires = [] versionIndependent = False for option, value in opts: if option == '-d': root = Filename.fromOsSpecific(value) elif option == '-m': main = value elif option == '-r': requires.append(value) elif option == '-s': packager.installSearch.appendDirectory(Filename.fromOsSpecific(value)) elif option == '-x': versionIndependent = True elif option == '-h': print __doc__ sys.exit(1) if not args: raise ArgumentError, "No destination app specified. Use:\npackp3d.py app.p3d" if len(args) > 1: raise ArgumentError, "Too many arguments." appFilename = Filename.fromOsSpecific(args[0]) if appFilename.getExtension() != 'p3d': raise ArgumentError, 'Application filename must end in ".p3d".' appDir = Filename(appFilename.getDirname()) appBase = appFilename.getBasenameWoExtension() if not main: main = Filename(root, 'main.py') if main.exists(): main = 'main.py' else: main = glob.glob(os.path.join(root.toOsSpecific(), '*.py')) if len(main) == 0: raise ArgumentError, 'No Python files in root directory.' elif len(main) > 1: raise ArgumentError, 'Multiple Python files in root directory; specify the main application with -m "main".' main = os.path.split(main[0])[1] main = Filename.fromOsSpecific(main) mainModule = Filename(main) mainModule.setExtension('') mainModule = mainModule.cStr().replace('/', '.') packager.installDir = appDir getModelPath().appendDirectory(root) packager.setup() packager.beginPackage(appBase, p3dApplication = True) for requireName in requires: packager.require(requireName) packager.dir(root) packager.mainModule(mainModule, filename = main) packager.endPackage(appBase, p3dApplication = True)
96b44c4e0b09fb10669c3ebc2e2aaba94a3256a7 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7242/96b44c4e0b09fb10669c3ebc2e2aaba94a3256a7/packp3d.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 4420, 329, 3371, 12, 1968, 4672, 1500, 16, 833, 273, 336, 3838, 18, 588, 3838, 12, 1968, 16, 296, 72, 30, 81, 30, 86, 30, 87, 30, 92, 76, 6134, 225, 2298, 6817, 273, 7930, 68...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 4420, 329, 3371, 12, 1968, 4672, 1500, 16, 833, 273, 336, 3838, 18, 588, 3838, 12, 1968, 16, 296, 72, 30, 81, 30, 86, 30, 87, 30, 92, 76, 6134, 225, 2298, 6817, 273, 7930, 68...
def finishSelectionChanges (self): """ Need to finish any changes to the selected item that are in progress. """ focusBlock = self.getFocusBlock() try: focusBlock.saveFocusData() except AttributeError: pass
def onNULLEventUpdateUI (self, notification): """ The NULL Event is always disabled """ notification.data ['Enable'] = False
bc19b0d33ddcda2330a97058cf61cec88d49550e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/bc19b0d33ddcda2330a97058cf61cec88d49550e/Detail.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 50, 1506, 900, 616, 1891, 5370, 261, 2890, 16, 3851, 4672, 3536, 1021, 3206, 2587, 353, 3712, 5673, 3536, 3851, 18, 892, 10228, 8317, 3546, 273, 1083, 2, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 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, 603, 50, 1506, 900, 616, 1891, 5370, 261, 2890, 16, 3851, 4672, 3536, 1021, 3206, 2587, 353, 3712, 5673, 3536, 3851, 18, 892, 10228, 8317, 3546, 273, 1083, 2, -100, -100, -100, -100, -10...
this = apply(_quickfix.new_UnderlyingStipValue, args)
this = _quickfix.new_UnderlyingStipValue(*args)
def __init__(self, *args): this = apply(_quickfix.new_UnderlyingStipValue, args) try: self.this.append(this) except: self.this = this
7e632099fd421880c8c65fb0cf610d338d115ee9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8819/7e632099fd421880c8c65fb0cf610d338d115ee9/quickfix.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 380, 1968, 4672, 333, 273, 389, 19525, 904, 18, 2704, 67, 14655, 6291, 510, 625, 620, 30857, 1968, 13, 775, 30, 365, 18, 2211, 18, 6923, 12, 2211, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 380, 1968, 4672, 333, 273, 389, 19525, 904, 18, 2704, 67, 14655, 6291, 510, 625, 620, 30857, 1968, 13, 775, 30, 365, 18, 2211, 18, 6923, 12, 2211, 13, ...
iters = [model.get_iter(path) for path in paths] ids = map (lambda i: i and model.get_value(i, tasktree.COL_TID)\ or None, iters)
iters = filter(lambda i: i != None,\ [model.get_iter(path) for path in paths]) ids = map(lambda i: model.get_value(i, tasktree.COL_TID), iters)
def get_selected_tasks(self, tv=None): """Returns a list of 'uids' of the selected tasks, and the corresponding iters
dbfc3ffad3b6f640645169e34b82432959384110 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8234/dbfc3ffad3b6f640645169e34b82432959384110/browser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 8109, 67, 9416, 12, 2890, 16, 13521, 33, 7036, 4672, 3536, 1356, 279, 666, 434, 296, 21428, 11, 434, 326, 3170, 4592, 16, 471, 326, 4656, 1400, 87, 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, 336, 67, 8109, 67, 9416, 12, 2890, 16, 13521, 33, 7036, 4672, 3536, 1356, 279, 666, 434, 296, 21428, 11, 434, 326, 3170, 4592, 16, 471, 326, 4656, 1400, 87, 2, -100, -100, -100, -100, ...
gen.WriteCommandIdTest("common/gles2_cmd_id_test.cc")
gen.WriteCommandIdTest("common/gles2_cmd_id_test_autogen.h") if gen.errors > 0: print "%d errors" % gen.errors sys.exit(1)
def main(argv): """This is the main function.""" parser = OptionParser() parser.add_option( "-g", "--generate-implementation-templates", action="store_true", help="generates files that are generally hand edited..") parser.add_option( "--generate-command-id-tests", action="store_true", help="generate tests for commands ids. Commands MUST not change ID!") parser.add_option( "-v", "--verbose", action="store_true", help="prints more output.") (options, args) = parser.parse_args(args=argv) gen = GLGenerator(options.verbose) gen.ParseGLH("common/GLES2/gl2.h") gen.WriteCommandIds("common/gles2_cmd_ids_autogen.h") gen.WriteFormat("common/gles2_cmd_format_autogen.h") gen.WriteFormatTest("common/gles2_cmd_format_test_autogen.h") gen.WriteGLES2ImplementationHeader("client/gles2_implementation_autogen.h") gen.WriteGLES2CLibImplementation("client/gles2_c_lib_autogen.h") gen.WriteCmdHelperHeader("client/gles2_cmd_helper_autogen.h") gen.WriteServiceImplementation("service/gles2_cmd_decoder_autogen.h") if options.generate_implementation_templates: gen.WriteGLES2ImplementationImpl("client/gles2_implementation_gen.h") gen.WriteServiceValidation("service/gles2_cmd_decoder_validate.h") if options.generate_command_id_tests: gen.WriteCommandIdTest("common/gles2_cmd_id_test.cc")
ba3176a8f0a18527c0af5896f9d595d866e5ceeb /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9392/ba3176a8f0a18527c0af5896f9d595d866e5ceeb/build_gles2_cmd_buffer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 19485, 4672, 3536, 2503, 353, 326, 2774, 445, 12123, 2082, 273, 18862, 1435, 2082, 18, 1289, 67, 3482, 12, 3701, 75, 3113, 5238, 7163, 17, 30810, 17, 8502, 3113, 1301, 1546, 22...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 12, 19485, 4672, 3536, 2503, 353, 326, 2774, 445, 12123, 2082, 273, 18862, 1435, 2082, 18, 1289, 67, 3482, 12, 3701, 75, 3113, 5238, 7163, 17, 30810, 17, 8502, 3113, 1301, 1546, 22...
print "<", line
print "-", line,
def pair(x0, x1): x0 += 1 if x0 >= x1: return str(x0) else: return "%d,%d" % (x0, x1)
5d5cbea13a7ce3fec0f1eaea43acaa3a9b6fb93c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/5d5cbea13a7ce3fec0f1eaea43acaa3a9b6fb93c/regrtest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3082, 12, 92, 20, 16, 619, 21, 4672, 619, 20, 1011, 404, 309, 619, 20, 1545, 619, 21, 30, 327, 609, 12, 92, 20, 13, 469, 30, 327, 2213, 72, 15529, 72, 6, 738, 261, 92, 20, 16, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3082, 12, 92, 20, 16, 619, 21, 4672, 619, 20, 1011, 404, 309, 619, 20, 1545, 619, 21, 30, 327, 609, 12, 92, 20, 13, 469, 30, 327, 2213, 72, 15529, 72, 6, 738, 261, 92, 20, 16, ...
if( key == 'References' ):
if key == 'References':
def __str__( self ): keys = self.keys() keys.sort() out = '' for key in keys: val = self[ key ] if( key == 'References' ): out = out + '\n%s\n' % key for reference in val: out = out + '%s\n' % str( reference ) out = out + '\n' elif( key == 'Examples' ): out = out + '\n%s\n' % key for example in val: out = out + '%s\n' % example elif( key == 'Abstract' ): out = out + '\n%s\n' % key out = out + '%s...\n' % val[ : 80 ] elif( type( self[ key ] ) == type( [] ) ): out = out + '\n%s\n' % key for item in val: out = out + '%s\n' % item
057a42016586e300ec42f7a5a6468a5d7f6c179c /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7167/057a42016586e300ec42f7a5a6468a5d7f6c179c/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 701, 972, 12, 365, 262, 30, 1311, 273, 365, 18, 2452, 1435, 1311, 18, 3804, 1435, 596, 273, 875, 364, 498, 316, 1311, 30, 1244, 273, 365, 63, 498, 308, 309, 498, 422, 296, 8221...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 701, 972, 12, 365, 262, 30, 1311, 273, 365, 18, 2452, 1435, 1311, 18, 3804, 1435, 596, 273, 875, 364, 498, 316, 1311, 30, 1244, 273, 365, 63, 498, 308, 309, 498, 422, 296, 8221...
about.set_version('v0.1')
about.set_version(VERSION)
def show_about_dialog(self, o): about = gtk.AboutDialog() about.set_name('FlyBack') about.set_version('v0.1') about.set_copyright('Copyright (c) 2007 Derek Anderson') about.set_comments('''FlyBack is a backup and recovery tool loosley modeled after Apple's new "Time Machine".''') about.set_license(GPL) about.set_website('http://code.google.com/p/flyback/') about.set_authors(['Derek Anderson','http://kered.org']) about.connect('response', lambda x,y: about.destroy()) about.show()
86c0cc7aefe2168fdb20f5518c4f5b0075f096ea /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/317/86c0cc7aefe2168fdb20f5518c4f5b0075f096ea/flyback.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 67, 21071, 67, 12730, 12, 2890, 16, 320, 4672, 2973, 273, 22718, 18, 24813, 6353, 1435, 2973, 18, 542, 67, 529, 2668, 42, 715, 2711, 6134, 2973, 18, 542, 67, 1589, 12, 5757, 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, 2405, 67, 21071, 67, 12730, 12, 2890, 16, 320, 4672, 2973, 273, 22718, 18, 24813, 6353, 1435, 2973, 18, 542, 67, 529, 2668, 42, 715, 2711, 6134, 2973, 18, 542, 67, 1589, 12, 5757, 13, ...
if self.domid < 0: raise VmError('Creating domain failed: name=%s' % self.info['name_label'])
log.exception(e) if not self.domid or self.domid < 0: str = 'Creating domain failed: name=%s' % self.info['name_label'] if self.domid: str += ', error=%i' % int(self.domid) raise VmError(str)
def _constructDomain(self): """Construct the domain.
58e8a64d4a838a02a995dbb286cc27bbec164a79 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6195/58e8a64d4a838a02a995dbb286cc27bbec164a79/XendDomainInfo.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 10062, 3748, 12, 2890, 4672, 3536, 7249, 326, 2461, 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, ...
[ 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, 389, 10062, 3748, 12, 2890, 4672, 3536, 7249, 326, 2461, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
" from node '%s'" % nodeinfo)
" from node '%s'" % node)
def CheckPrereq(self): """Check prerequisites.
3e91897b94b21eb8ac709a71d8a1c05efa280551 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7542/3e91897b94b21eb8ac709a71d8a1c05efa280551/cmdlib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2073, 2050, 822, 85, 12, 2890, 4672, 3536, 1564, 30328, 16608, 2997, 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, ...
[ 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, 2073, 2050, 822, 85, 12, 2890, 4672, 3536, 1564, 30328, 16608, 2997, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
def visitLambda(self, node, parent):
def visitLambda(self, node, parent, assign=0): assert not assign
def visitLambda(self, node, parent): for n in node.defaults: self.visit(n, parent) scope = LambdaScope(self.module, self.klass) if parent.nested or isinstance(parent, FunctionScope): scope.nested = 1 self.scopes[node] = scope self._do_args(scope, node.argnames) self.visit(node.code, scope) self.handle_free_vars(scope, parent)
ead21f596ce9c3f3ed3349bdf872182a1e930ca0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/ead21f596ce9c3f3ed3349bdf872182a1e930ca0/symbols.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3757, 12025, 12, 2890, 16, 756, 16, 982, 16, 2683, 33, 20, 4672, 565, 1815, 486, 2683, 225, 364, 290, 316, 756, 18, 7606, 30, 365, 18, 11658, 12, 82, 16, 982, 13, 2146, 273, 12801, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 12025, 12, 2890, 16, 756, 16, 982, 16, 2683, 33, 20, 4672, 565, 1815, 486, 2683, 225, 364, 290, 316, 756, 18, 7606, 30, 365, 18, 11658, 12, 82, 16, 982, 13, 2146, 273, 12801, ...
def gitmode(x): return x and '100755' or '100644'
def gitmode(x, l): return l and '120000' or (x and '100755' or '100644')
def gitmode(x): return x and '100755' or '100644'
bc2dbf91424b73253110ff9f2e7af369f2995f54 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11312/bc2dbf91424b73253110ff9f2e7af369f2995f54/patch.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5071, 3188, 12, 92, 4672, 327, 619, 471, 296, 6625, 21761, 11, 578, 296, 6625, 22087, 11, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5071, 3188, 12, 92, 4672, 327, 619, 471, 296, 6625, 21761, 11, 578, 296, 6625, 22087, 11, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
Return the discance between two circles.
Return the distance between between the two closest points in the circumference.
def distance(self, other): """ Return the discance between two circles. """ dist = self.pos.distance(other.pos) - self.radius - other.radius return dist if dist > 0 else 0
2cad6c7b1c5a572eeb5790739563e8546c297c5a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4543/2cad6c7b1c5a572eeb5790739563e8546c297c5a/foxgame.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3888, 12, 2890, 16, 1308, 4672, 3536, 2000, 326, 3888, 3086, 3086, 326, 2795, 9219, 3143, 316, 326, 29951, 1134, 18, 3536, 2411, 273, 365, 18, 917, 18, 8969, 12, 3011, 18, 917, 13, 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, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3888, 12, 2890, 16, 1308, 4672, 3536, 2000, 326, 3888, 3086, 3086, 326, 2795, 9219, 3143, 316, 326, 29951, 1134, 18, 3536, 2411, 273, 365, 18, 917, 18, 8969, 12, 3011, 18, 917, 13, 300...
v2param[a.parameters[0][0]].append(string.joinfields([a.parameters[0][2],'(', string.joinfields(values,','), ')'],''))
params = string.joinfields([a.parameters[0][2],'(', string.joinfields(values,','), ')'],'') v2param[a.parameters[0][0]].append(params)
def getPipelineShare(self, v1, v2): """ Returns a list of shared modules between the two versions Parameters ---------- - v1 : 'int' version number 1
0d08a982cb8d26e26f2e6ab32b89ef18e54df8fb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6341/0d08a982cb8d26e26f2e6ab32b89ef18e54df8fb/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1689, 3842, 9535, 12, 2890, 16, 331, 21, 16, 331, 22, 4672, 3536, 2860, 279, 666, 434, 5116, 4381, 3086, 326, 2795, 5244, 7012, 12181, 300, 331, 21, 294, 296, 474, 11, 1177, 1300, 404,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1689, 3842, 9535, 12, 2890, 16, 331, 21, 16, 331, 22, 4672, 3536, 2860, 279, 666, 434, 5116, 4381, 3086, 326, 2795, 5244, 7012, 12181, 300, 331, 21, 294, 296, 474, 11, 1177, 1300, 404,...
start_script = """
start_script = """
def data_files(): '''Build list of data files to be installed''' files = [] if os.name == 'nt': os.chdir('bin') for (dp,dn,names) in os.walk('addons'): files.append((dp, map(lambda x: opj('bin', dp, x), names))) os.chdir('..') for (dp,dn,names) in os.walk('doc'): files.append((dp, map(lambda x: opj(dp, x), names))) files.append(('.', [(opj('bin', 'import_xml.rng'))])) else: man_directory = opj('share', 'man') files.append((opj(man_directory, 'man1'), ['man/openerp-server.1'])) files.append((opj(man_directory, 'man5'), ['man/openerp_serverrc.5'])) doc_directory = opj('share', 'doc', 'openerp-server-%s' % version) files.append((doc_directory, [f for f in glob.glob('doc/*') if os.path.isfile(f)])) files.append((opj(doc_directory, 'migrate', '3.3.0-3.4.0'), [f for f in glob.glob('doc/migrate/3.3.0-3.4.0/*') if os.path.isfile(f)])) files.append((opj(doc_directory, 'migrate', '3.4.0-4.0.0'), [f for f in glob.glob('doc/migrate/3.4.0-4.0.0/*') if os.path.isfile(f)])) openerp_site_packages = opj('lib', 'python%s' % py_short_version, 'site-packages', 'openerp-server') files.append((openerp_site_packages, [('bin/import_xml.rng')])) for addon in find_addons(): add_path = addon.replace('.', os.path.sep).replace('openerp-server', 'bin', 1) addon_path = opj('lib', 'python%s' % py_short_version, 'site-packages', add_path.replace('bin', 'openerp-server', 1)) pathfiles = [] for root, dirs, innerfiles in os.walk(add_path): innerfiles = filter(lambda file: os.path.splitext(file)[1] not in ('.pyc', '.py', '.pyd', '.pyo'), innerfiles) if innerfiles: pathfiles.extend(((opj(addon_path, root.replace('bin/addons/', '')), map(lambda file: opj(root, file), innerfiles)),)) files.extend(pathfiles) return files
7c98dfe5745ed83e4fbc4d01619aa4606b423fd9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7397/7c98dfe5745ed83e4fbc4d01619aa4606b423fd9/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 501, 67, 2354, 13332, 9163, 3116, 666, 434, 501, 1390, 358, 506, 5876, 26418, 1390, 273, 5378, 309, 1140, 18, 529, 422, 296, 496, 4278, 1140, 18, 343, 1214, 2668, 4757, 6134, 364, 261, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 501, 67, 2354, 13332, 9163, 3116, 666, 434, 501, 1390, 358, 506, 5876, 26418, 1390, 273, 5378, 309, 1140, 18, 529, 422, 296, 496, 4278, 1140, 18, 343, 1214, 2668, 4757, 6134, 364, 261, ...
self.updateCoverArtPixmap( "" )
def infoTimerFire(self): currPlay = self.session.nav.getCurrentService() if currPlay is not None: stitle = currPlay.info().getInfoString(iServiceInformation.sTitle) if stitle == "": stitle = currPlay.info().getName().split('/')[-1]
be98c731e6b92060760fb0c5e8567dcf747235e5 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6652/be98c731e6b92060760fb0c5e8567dcf747235e5/plugin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1123, 6777, 9723, 12, 2890, 4672, 4306, 11765, 273, 365, 18, 3184, 18, 11589, 18, 588, 3935, 1179, 1435, 309, 4306, 11765, 353, 486, 599, 30, 384, 1280, 273, 4306, 11765, 18, 1376, 7675,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1123, 6777, 9723, 12, 2890, 4672, 4306, 11765, 273, 365, 18, 3184, 18, 11589, 18, 588, 3935, 1179, 1435, 309, 4306, 11765, 353, 486, 599, 30, 384, 1280, 273, 4306, 11765, 18, 1376, 7675,...
buf += "int " + fabric_mod_name + "_queue_tm_rsp(struct se_cmd *se_cmd)\n" buf += "{\n" buf += " return 0;\n" buf += "}\n\n" bufi += "int " + fabric_mod_name + "_queue_tm_rsp(struct se_cmd *);\n" if re.search('is_state_remove\)\(', fo): buf += "int " + fabric_mod_name + "_is_state_remove(struct se_cmd *se_cmd)\n" buf += "{\n" buf += " return 0;\n" buf += "}\n\n" bufi += "int " + fabric_mod_name + "_is_state_remove(struct se_cmd *);\n"
buf += "void " + fabric_mod_name + "_queue_tm_rsp(struct se_cmd *se_cmd)\n" buf += "{\n" buf += " return;\n" buf += "}\n\n" bufi += "void " + fabric_mod_name + "_queue_tm_rsp(struct se_cmd *);\n" if re.search('aborted_task\)\(', fo): buf += "void " + fabric_mod_name + "_aborted_task(struct se_cmd *se_cmd)\n" buf += "{\n" buf += " return;\n" buf += "}\n\n" bufi += "void " + fabric_mod_name + "_aborted_task(struct se_cmd *);\n"
def tcm_mod_dump_fabric_ops(proto_ident, fabric_mod_dir_var, fabric_mod_name): buf = "" bufi = "" f = fabric_mod_dir_var + "/" + fabric_mod_name + "_fabric.c" print "Writing file: " + f p = open(f, 'w') if not p: tcm_mod_err("Unable to open file: " + f) fi = fabric_mod_dir_var + "/" + fabric_mod_name + "_fabric.h" print "Writing file: " + fi pi = open(fi, 'w') if not pi: tcm_mod_err("Unable to open file: " + fi) buf = "#include <linux/slab.h>\n" buf += "#include <linux/kthread.h>\n" buf += "#include <linux/types.h>\n" buf += "#include <linux/list.h>\n" buf += "#include <linux/types.h>\n" buf += "#include <linux/string.h>\n" buf += "#include <linux/ctype.h>\n" buf += "#include <asm/unaligned.h>\n" buf += "#include <scsi/scsi.h>\n" buf += "#include <scsi/scsi_host.h>\n" buf += "#include <scsi/scsi_device.h>\n" buf += "#include <scsi/scsi_cmnd.h>\n" buf += "#include <scsi/libfc.h>\n\n" buf += "#include <target/target_core_base.h>\n" buf += "#include <target/target_core_fabric.h>\n" buf += "#include <target/target_core_configfs.h>\n\n" buf += "#include \"" + fabric_mod_name + "_base.h\"\n" buf += "#include \"" + fabric_mod_name + "_fabric.h\"\n\n" buf += "int " + fabric_mod_name + "_check_true(struct se_portal_group *se_tpg)\n" buf += "{\n" buf += " return 1;\n" buf += "}\n\n" bufi += "int " + fabric_mod_name + "_check_true(struct se_portal_group *);\n" buf += "int " + fabric_mod_name + "_check_false(struct se_portal_group *se_tpg)\n" buf += "{\n" buf += " return 0;\n" buf += "}\n\n" bufi += "int " + fabric_mod_name + "_check_false(struct se_portal_group *);\n" total_fabric_ops = len(fabric_ops) i = 0 while i < total_fabric_ops: fo = fabric_ops[i] i += 1
8b55836b9045a75a0b74cb25d8a39f3bc6e2ea50 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5327/8b55836b9045a75a0b74cb25d8a39f3bc6e2ea50/tcm_mod_builder.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1715, 81, 67, 1711, 67, 8481, 67, 23710, 67, 4473, 12, 9393, 67, 6392, 16, 21127, 67, 1711, 67, 1214, 67, 1401, 16, 21127, 67, 1711, 67, 529, 4672, 1681, 273, 1408, 1681, 77, 273, 14...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1715, 81, 67, 1711, 67, 8481, 67, 23710, 67, 4473, 12, 9393, 67, 6392, 16, 21127, 67, 1711, 67, 1214, 67, 1401, 16, 21127, 67, 1711, 67, 529, 4672, 1681, 273, 1408, 1681, 77, 273, 14...
jl.append(jobname)
jl.append(jobname)
def nfspath(dir): if dir.startswith('/.automount/'): dir = '/n/%s' % dir[12:] elif not dir.startswith('/n/'): dir = '/n/%s%s' % (socket.gethostname().split('.')[0], dir) return dir
cb130ee5c58d40fb0f6a76b31f912bddec3b6c59 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7385/cb130ee5c58d40fb0f6a76b31f912bddec3b6c59/send.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 290, 2556, 803, 12, 1214, 4672, 309, 1577, 18, 17514, 1918, 2668, 15865, 5854, 362, 592, 2473, 4672, 1577, 273, 1173, 82, 5258, 87, 11, 738, 1577, 63, 2138, 26894, 1327, 486, 1577, 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, 290, 2556, 803, 12, 1214, 4672, 309, 1577, 18, 17514, 1918, 2668, 15865, 5854, 362, 592, 2473, 4672, 1577, 273, 1173, 82, 5258, 87, 11, 738, 1577, 63, 2138, 26894, 1327, 486, 1577, 18, ...
extra.append('TAGS: %s<br />'%', '.join(tags.split(',')))
extra.append('TAGS: %s<br />'%\ prepare_string_for_xml(', '.join(tags.split(','))))
def stanza(self): 'Feeds to read calibre books on a ipod with stanza.' books = [] for record in iter(self.db): r = record[FIELD_MAP['formats']] r = r.upper() if r else '' if 'EPUB' in r or 'PDB' in r: z = record[FIELD_MAP['authors']] if not z: z = _('Unknown') authors = ' & '.join([i.replace('|', ',') for i in z.split(',')]) extra = [] rating = record[FIELD_MAP['rating']] if rating > 0: rating = ''.join(repeat('&#9733;', rating)) extra.append('RATING: %s<br />'%rating) tags = record[FIELD_MAP['tags']] if tags: extra.append('TAGS: %s<br />'%', '.join(tags.split(','))) series = record[FIELD_MAP['series']] if series: extra.append('SERIES: %s [%s]<br />'%(series, fmt_sidx(float(record[FIELD_MAP['series_index']])))) fmt = 'epub' if 'EPUB' in r else 'pdb' mimetype = guess_type('dummy.'+fmt)[0] books.append(self.STANZA_ENTRY.generate( authors=authors, record=record, FM=FIELD_MAP, port=self.opts.port, extra = ''.join(extra), mimetype=mimetype, fmt=fmt, ).render('xml').decode('utf8'))
35bc41bbbcc6f26a6b57db4b000df4d091fe127b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9125/35bc41bbbcc6f26a6b57db4b000df4d091fe127b/server.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 21650, 12, 2890, 4672, 296, 8141, 87, 358, 855, 26139, 266, 6978, 87, 603, 279, 2359, 369, 598, 21650, 1093, 6978, 87, 273, 5378, 364, 1409, 316, 1400, 12, 2890, 18, 1966, 4672, 436, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 21650, 12, 2890, 4672, 296, 8141, 87, 358, 855, 26139, 266, 6978, 87, 603, 279, 2359, 369, 598, 21650, 1093, 6978, 87, 273, 5378, 364, 1409, 316, 1400, 12, 2890, 18, 1966, 4672, 436, 2...