rem
stringlengths
1
226k
add
stringlengths
0
227k
context
stringlengths
6
326k
meta
stringlengths
143
403
input_ids
listlengths
256
256
attention_mask
listlengths
256
256
labels
listlengths
128
128
self.jewelmenu.addAction(act) self.piecemenu = QMenu('Body Slots', self)
self.swapjewelmenu.addAction(act) self.swappiecemenu = QMenu('Body Slots', self)
def initMenu(self): self.rf_menu = QMenu('&Recent Files') self.connect(self.rf_menu, SIGNAL("triggered(QAction*)"), self.loadRecentFile) self.filemenu = QMenu('&File', self) self.filemenu.addAction('&New', self.newFile, QKeySequence(Qt.CTRL+Qt.Key_N)) self.filemenu.addAction('&Open...', self.openFile, QKeySequence(Qt.CTRL+Qt.Key_O)) self.filemenu.addAction('&Save', self.saveFile, QKeySequence(Qt.CTRL+Qt.Key_S)) self.filemenu.addAction('Save &As...', self.saveAsFile) self.filemenu.addSeparator() self.filemenu.addAction('&Load Item...', self.loadItem, QKeySequence(Qt.CTRL+Qt.SHIFT+Qt.Key_L)) self.filemenu.addAction('&Save Item...', self.saveItem, QKeySequence(Qt.CTRL+Qt.SHIFT+Qt.Key_S)) self.filemenu.addSeparator() self.filemenu.addAction('Export &Quickbars...', self.openCraftBars) self.filemenu.addAction('Export &UI XML (Beta)...', self.generateUIXML) self.filemenu.addSeparator() self.filemenu.addMenu(self.rf_menu) self.filemenu.addSeparator() self.filemenu.addAction('E&xit', self.close, QKeySequence(Qt.CTRL+Qt.Key_X)) self.menuBar().addMenu(self.filemenu)
4871e7b90ac3ae938def5bc89e9ea84b3a33c81a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6671/4871e7b90ac3ae938def5bc89e9ea84b3a33c81a/ScWindow.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1208, 4599, 12, 2890, 4672, 365, 18, 5809, 67, 5414, 273, 2238, 4599, 2668, 10, 17076, 6471, 6134, 365, 18, 3612, 12, 2890, 18, 5809, 67, 5414, 16, 12057, 1013, 2932, 10668, 329, 12, 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, 1208, 4599, 12, 2890, 4672, 365, 18, 5809, 67, 5414, 273, 2238, 4599, 2668, 10, 17076, 6471, 6134, 365, 18, 3612, 12, 2890, 18, 5809, 67, 5414, 16, 12057, 1013, 2932, 10668, 329, 12, 5...
self.config.WriteInt('DefaultSizeY', sizeY)
self.config.WriteInt('DefaultSizeY', sizeY)
def SetDefaultWindowSize(self, sizeX, sizeY): self.config.SetPath("/WindowSettings") self.config.WriteInt('DefaultSizeX', sizeX) self.config.WriteInt('DefaultSizeY', sizeY)
cc443dd98e01d739acfd83b09946a7583c28ee2f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/14712/cc443dd98e01d739acfd83b09946a7583c28ee2f/Psycollider.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1000, 1868, 3829, 1225, 12, 2890, 16, 963, 60, 16, 963, 61, 4672, 365, 18, 1425, 18, 694, 743, 2932, 19, 3829, 2628, 7923, 365, 18, 1425, 18, 3067, 1702, 2668, 1868, 1225, 60, 2187, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1000, 1868, 3829, 1225, 12, 2890, 16, 963, 60, 16, 963, 61, 4672, 365, 18, 1425, 18, 694, 743, 2932, 19, 3829, 2628, 7923, 365, 18, 1425, 18, 3067, 1702, 2668, 1868, 1225, 60, 2187, ...
def main(): random.seed(1) board = Board() for game in range(GAMES): board.reset() for x in range(1000): if board.finished: break pos = board.random_move() board.play_move(pos) print 'MOVES', MOVES
def computer_move(board): global treedepth treedepth = 0 pos = board.random_move() if pos == PASS: return PASS history = board.history[:] tree = UCTNode() tree.unexplored = board.useful_moves() for game in range(GAMES): node = tree nboard = Board() nboard.replay(history) node.play(nboard) return tree.best_visited().pos
e50c90e49a6204f87f5ffa1463e313de25a5c846 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4470/e50c90e49a6204f87f5ffa1463e313de25a5c846/go.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 26579, 67, 8501, 12, 3752, 4672, 2552, 2151, 5979, 2151, 5979, 273, 374, 949, 273, 11094, 18, 9188, 67, 8501, 1435, 309, 949, 422, 17882, 30, 327, 17882, 4927, 273, 11094, 18, 8189, 1053...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 26579, 67, 8501, 12, 3752, 4672, 2552, 2151, 5979, 2151, 5979, 273, 374, 949, 273, 11094, 18, 9188, 67, 8501, 1435, 309, 949, 422, 17882, 30, 327, 17882, 4927, 273, 11094, 18, 8189, 1053...
_libsmbios_c.smbios_struct_get_string_from_offset.errcheck = errorOnNullPtrFN(lambda r,f,a: exceptions.Exception( _("String from offset %d doesnt exist") % a[1]))
_libsmbios_c.smbios_struct_get_string_from_offset.errcheck = errorOnNullPtrFN(lambda r,f,a: exceptions.IndexError( _("String from offset %d doesnt exist") % a[1]))
def _strerror(obj): return Exception(_libsmbios_c.smbios_table_strerror(obj))
bbacbb6956bc8829b39d091ca0d609c97edd215e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/40/bbacbb6956bc8829b39d091ca0d609c97edd215e/smbios.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 701, 1636, 12, 2603, 4672, 327, 1185, 24899, 21571, 1627, 7441, 67, 71, 18, 87, 1627, 7441, 67, 2121, 67, 701, 1636, 12, 2603, 3719, 282, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 701, 1636, 12, 2603, 4672, 327, 1185, 24899, 21571, 1627, 7441, 67, 71, 18, 87, 1627, 7441, 67, 2121, 67, 701, 1636, 12, 2603, 3719, 282, 2, -100, -100, -100, -100, -100, -100, -1...
urldata, pd, fn = getdata(d)
urldata = getdata(d)
def init(urls, d, cache = True): urldata = {} if cache: urldata, pd, fn = getdata(d) for url in urls: if url not in urldata: ud = FetchData(url, d) for m in methods: if m.supports(url, ud, d): ud.init(m, d) ud.setup_localpath(d) break urldata[url] = ud if cache: pd.setValue("BB_URLDATA", fn, pickle.dumps(urldata, 0)) return urldata
89853852ed422e5be7e488ea2389fc7760f97d29 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8123/89853852ed422e5be7e488ea2389fc7760f97d29/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1208, 12, 10518, 16, 302, 16, 1247, 273, 1053, 4672, 880, 892, 273, 2618, 225, 309, 1247, 30, 880, 892, 273, 336, 892, 12, 72, 13, 225, 364, 880, 316, 6903, 30, 309, 880, 486, 316, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1208, 12, 10518, 16, 302, 16, 1247, 273, 1053, 4672, 880, 892, 273, 2618, 225, 309, 1247, 30, 880, 892, 273, 336, 892, 12, 72, 13, 225, 364, 880, 316, 6903, 30, 309, 880, 486, 316, ...
if hasattr(entry, 'modified_parsed'):
if getattr(entry, 'modified_parsed'):
def parse_modified_date(entry): """ Find out modified date of feed entry. """ if hasattr(entry, 'modified_parsed'): return parse_time(entry.modified_parsed) if hasattr(entry, 'modified'): return parse_time(entry.modified) return datetime.now()
4bd38dea2d963602388ae6313cc503d0c096d2c7 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6072/4bd38dea2d963602388ae6313cc503d0c096d2c7/parse.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 7342, 67, 712, 12, 4099, 4672, 3536, 4163, 596, 4358, 1509, 434, 4746, 1241, 18, 3536, 225, 309, 3869, 12, 4099, 16, 296, 7342, 67, 10817, 11, 4672, 327, 1109, 67, 957, 12, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 7342, 67, 712, 12, 4099, 4672, 3536, 4163, 596, 4358, 1509, 434, 4746, 1241, 18, 3536, 225, 309, 3869, 12, 4099, 16, 296, 7342, 67, 10817, 11, 4672, 327, 1109, 67, 957, 12, ...
- ``pdflatex`` - bool (default: False): use pdflatex.
- ``pdflatex`` - bool (default: True): use pdflatex. This option is deprecated. Use ``engine`` option instead. See below. - ``engine`` - 'latex', 'pdflatex', or 'xelatex' (default: 'pdflatex')
def png(x, filename, density=150, debug=False, do_in_background=False, tiny=False, pdflatex=True): """ Create a png image representation of ``x`` and save to the given filename. INPUT: - ``x`` - object to be displayed - ``filename`` - file in which to save the image - ``density`` - integer (default: 150) - ``debug`` - bool (default: False): print verbose output - ``do_in_background`` - bool (default: False): create the file in the background. - ``tiny`` - bool (default: False): use 'tiny' font - ``pdflatex`` - bool (default: False): use pdflatex. EXAMPLES:: sage: from sage.misc.latex import png sage: png(ZZ[x], SAGE_TMP + "zz.png", do_in_background=False) # random - error if no latex """ import sage.plot.all if sage.plot.all.is_Graphics(x): x.save(filename) return # if not graphics: create a string of latex code to write in a file s = _latex_file_([x], math_left='$\\displaystyle', math_right='$', title='', debug=debug, tiny=tiny, extra_preamble='\\textheight=2\\textheight') # path name for permanent png output abs_path_to_png = os.path.abspath(filename) # temporary directory to store stuff tmp = tmp_dir('sage_viewer') tex_file = os.path.join(tmp, "sage.tex") png_file = os.path.join(tmp, "sage.png") # write latex string to file open(tex_file,'w').write(s) # run latex on the file, producing png output to png_file e = _run_latex_(tex_file, density=density, debug=debug, png=True, do_in_background=do_in_background, pdflatex=pdflatex) if e.find("Error") == -1: # if no errors, copy png_file to the appropriate place shutil.copy(png_file, abs_path_to_png) else: print "Latex error" if debug: return s return
cb479d7b1046f03bed1e0b94d39ef8da9d356f4e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/cb479d7b1046f03bed1e0b94d39ef8da9d356f4e/latex.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14476, 12, 92, 16, 1544, 16, 12142, 33, 23014, 16, 1198, 33, 8381, 16, 741, 67, 267, 67, 9342, 33, 8381, 16, 24405, 33, 8381, 16, 8169, 26264, 33, 5510, 4672, 3536, 1788, 279, 14476, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14476, 12, 92, 16, 1544, 16, 12142, 33, 23014, 16, 1198, 33, 8381, 16, 741, 67, 267, 67, 9342, 33, 8381, 16, 24405, 33, 8381, 16, 8169, 26264, 33, 5510, 4672, 3536, 1788, 279, 14476, ...
</dl>
</ul>
def arg_name_to_html(self, func_doc, arg_name): """ A helper function used to format an argument name, for use in the argument description list under a routine's details entry. This just wraps strong & code tags around the arg name; and if the arg name is associated with a type, then adds it parenthetically after the name. """ s = '<strong class="pname"><code>%s</code></strong>' % arg_name if arg_name in func_doc.arg_types: typ = func_doc.arg_types[arg_name] typ_html = self.docstring_to_html(typ, func_doc, 10) s += " (<code>%s</code>)" % typ_html return s
a0087d4a151fbc748003be35f0418624fa61376a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/a0087d4a151fbc748003be35f0418624fa61376a/html.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1501, 67, 529, 67, 869, 67, 2620, 12, 2890, 16, 1326, 67, 2434, 16, 1501, 67, 529, 4672, 3536, 432, 4222, 445, 1399, 358, 740, 392, 1237, 508, 16, 364, 999, 316, 326, 1237, 2477, 666...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1501, 67, 529, 67, 869, 67, 2620, 12, 2890, 16, 1326, 67, 2434, 16, 1501, 67, 529, 4672, 3536, 432, 4222, 445, 1399, 358, 740, 392, 1237, 508, 16, 364, 999, 316, 326, 1237, 2477, 666...
'company_id': fields.many2one('res.company', 'Company', required=True), 'create_uid': fields.many2one('res.users', 'Responsible'), 'name' : fields.char('Name', size=64, readonly=True, states={'draft':[('readonly',False)]}),
'company_id':fields.many2one('res.company', 'Company', required=True), 'create_uid': fields.many2one('res.users', 'Responsible'), 'name': fields.char('Name', size=64, readonly=True, states={'draft': [('readonly',False)]}),
def create_forecast(self,cr, uid, ids, context={}): product_obj = self.pool.get('product.product') forecast_obj=self.pool.get('stock.sale.forecast') mod_obj =self.pool.get('ir.model.data') for f in self.browse(cr, uid, ids, context): prod_categ_obj=self.pool.get('product.category') template_obj=self.pool.get('product.template') categ_ids = f.product_categ_id1.id and [f.product_categ_id1.id] or [] prod_categ_ids=prod_categ_obj.search(cr,uid,[('parent_id','child_of',categ_ids)]) templates_ids = template_obj.search(cr,uid,[('categ_id','in',prod_categ_ids)]) products_ids = product_obj.search(cr,uid,[('product_tmpl_id','in',templates_ids)]) if len(products_ids)==0: raise osv.except_osv(_('Error !'), _('No products in selected category !')) copy = f.copy_forecast for p in product_obj.browse(cr, uid, products_ids,{}): if len(forecast_obj.search(cr, uid, [('product_id','=',p.id) , \ ('period_id','=',f.period_id1.id), \ ('user_id','=',uid), \ ('warehouse_id','=',f.warehouse_id1.id)]))== 0: forecast_qty = 0.0
6a21b5d661b74602c870fac41f3c8c42e8bc6c33 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/6a21b5d661b74602c870fac41f3c8c42e8bc6c33/stock_planning.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 1405, 4155, 12, 2890, 16, 3353, 16, 4555, 16, 3258, 16, 819, 12938, 4672, 3017, 67, 2603, 273, 365, 18, 6011, 18, 588, 2668, 5896, 18, 5896, 6134, 18763, 67, 2603, 33, 2890, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 1405, 4155, 12, 2890, 16, 3353, 16, 4555, 16, 3258, 16, 819, 12938, 4672, 3017, 67, 2603, 273, 365, 18, 6011, 18, 588, 2668, 5896, 18, 5896, 6134, 18763, 67, 2603, 33, 2890, ...
fields = b.fields_desc[:]
fields = b.fields_desc
def __new__(cls, name, bases, dct): fields = None for b in bases: if hasattr(b,"fields_desc"): fields = b.fields_desc[:] break if fields is None: raise Scapy_Exception("No fields_desc in superclasses")
2a2c2accb91694cf9d6ca69c81c74f9ec393ba8d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7311/2a2c2accb91694cf9d6ca69c81c74f9ec393ba8d/scapy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2704, 972, 12, 6429, 16, 508, 16, 8337, 16, 18253, 4672, 1466, 273, 599, 364, 324, 316, 8337, 30, 309, 3859, 12, 70, 10837, 2821, 67, 5569, 6, 4672, 1466, 273, 324, 18, 2821, 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, 1001, 2704, 972, 12, 6429, 16, 508, 16, 8337, 16, 18253, 4672, 1466, 273, 599, 364, 324, 316, 8337, 30, 309, 3859, 12, 70, 10837, 2821, 67, 5569, 6, 4672, 1466, 273, 324, 18, 2821, 6...
wiki.append_page(wiki_stub)
def create_stub(icon_name, head_text, tail_text): head_label = gtk.Label(head_text) head_label_a = gtk.Alignment(0.5, 1, 0, 0) head_label_a.add(head_label) icon = Icon(icon_name=icon_name, icon_size=gtk.ICON_SIZE_LARGE_TOOLBAR) tail_label = gtk.Label(tail_text) tail_label_a = gtk.Alignment(0.5, 0, 0, 0) tail_label_a.add(tail_label) stub = gtk.VBox() stub.pack_start(head_label_a) stub.pack_start(icon, False) stub.pack_start(tail_label_a) return stub
0b6264fc7a880dbda83a23ff109f94fe6c9d363c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5598/0b6264fc7a880dbda83a23ff109f94fe6c9d363c/library.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 12847, 12, 3950, 67, 529, 16, 910, 67, 955, 16, 5798, 67, 955, 4672, 910, 67, 1925, 273, 22718, 18, 2224, 12, 1978, 67, 955, 13, 910, 67, 1925, 67, 69, 273, 22718, 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 12847, 12, 3950, 67, 529, 16, 910, 67, 955, 16, 5798, 67, 955, 4672, 910, 67, 1925, 273, 22718, 18, 2224, 12, 1978, 67, 955, 13, 910, 67, 1925, 67, 69, 273, 22718, 18, 115...
cls = Spawn_IntervalAction
cls = Spawn_Action
def spawn(action_1, action_2): """Returns an action that runs action_1 and action_2 in paralel. The returned action will be instance of the most narrow class posible in InstantAction, IntervalAction, Action """ if (isinstance(action_1,InstantAction) and isinstance(action_2, InstantAction)): cls = Spawn_InstantAction if (isinstance(action_1,IntervalAction) and isinstance(action_2, IntervalAction)): cls = Spawn_IntervalAction else: cls = Spawn_IntervalAction return cls(action_1, action_2)
1a427d099ece9839af6f85a7a4ee2eb33e8aef97 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7473/1a427d099ece9839af6f85a7a4ee2eb33e8aef97/base_actions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12560, 12, 1128, 67, 21, 16, 1301, 67, 22, 4672, 3536, 1356, 392, 1301, 716, 7597, 1301, 67, 21, 471, 1301, 67, 22, 316, 779, 287, 292, 18, 1021, 2106, 1301, 903, 506, 791, 434, 326,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12560, 12, 1128, 67, 21, 16, 1301, 67, 22, 4672, 3536, 1356, 392, 1301, 716, 7597, 1301, 67, 21, 471, 1301, 67, 22, 316, 779, 287, 292, 18, 1021, 2106, 1301, 903, 506, 791, 434, 326,...
(?P<simple>%s)_
(?P<simple>%(simplename)s)_
def build_table_row(self, rowdata, tableline): row = nodes.row() for cell in rowdata: if cell is None: continue morerows, morecols, offset, cellblock = cell attributes = {} if morerows: attributes['morerows'] = morerows if morecols: attributes['morecols'] = morecols entry = nodes.entry(**attributes) row += entry if ''.join(cellblock): self.nested_parse(cellblock, input_offset=tableline+offset, node=entry) return row
9fe47ec4311156cad473d8ed8bf0dba5fd73c14e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1532/9fe47ec4311156cad473d8ed8bf0dba5fd73c14e/states.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 67, 2121, 67, 492, 12, 2890, 16, 1027, 892, 16, 3246, 80, 3027, 4672, 1027, 273, 2199, 18, 492, 1435, 364, 2484, 316, 1027, 892, 30, 309, 2484, 353, 599, 30, 1324, 312, 8922, 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, 1361, 67, 2121, 67, 492, 12, 2890, 16, 1027, 892, 16, 3246, 80, 3027, 4672, 1027, 273, 2199, 18, 492, 1435, 364, 2484, 316, 1027, 892, 30, 309, 2484, 353, 599, 30, 1324, 312, 8922, 5...
assert len(g.maker.env.toposort()) == 2
assert len(f.maker.env.toposort()) == 2
def assert_optimizer_worked(expr): f = theano.function([x,y], expr, mode='FAST_RUN') if 0: for i, node in enumerate(f.maker.env.toposort()): print i, node f(x_val, y_val) assert len(f.maker.env.toposort()) == 4
fca1efac3ae0e6880c8ab2745e6d5a4cda34166c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12438/fca1efac3ae0e6880c8ab2745e6d5a4cda34166c/test_nnet.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1815, 67, 29594, 67, 1252, 329, 12, 8638, 4672, 284, 273, 326, 31922, 18, 915, 3816, 92, 16, 93, 6487, 3065, 16, 1965, 2218, 2046, 882, 67, 15238, 6134, 309, 374, 30, 364, 277, 16, 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, 1815, 67, 29594, 67, 1252, 329, 12, 8638, 4672, 284, 273, 326, 31922, 18, 915, 3816, 92, 16, 93, 6487, 3065, 16, 1965, 2218, 2046, 882, 67, 15238, 6134, 309, 374, 30, 364, 277, 16, 7...
0.99812906992595840 + 0.00000000000000000052001876663675507*I 0.99812906992595840 + 0.00000000000000000052001876674058408*I
0.998129069925956 + 0.0000000000000000123489424448887*I 0.998129069925956 + 0.00000000000000000052001876674058408*I
def eta(self, omit_frac=False): r""" Return the value of the Dedekind $\eta$ function on self, intelligently computed using $\SL(2,\Z)$ transformations.
293427b47ee2bb564117092226099ed44acd171f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9417/293427b47ee2bb564117092226099ed44acd171f/complex_number.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14251, 12, 2890, 16, 14088, 67, 22187, 33, 8381, 4672, 436, 8395, 2000, 326, 460, 434, 326, 1505, 323, 9224, 271, 64, 1066, 8, 445, 603, 365, 16, 509, 1165, 360, 23351, 8470, 1450, 271...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14251, 12, 2890, 16, 14088, 67, 22187, 33, 8381, 4672, 436, 8395, 2000, 326, 460, 434, 326, 1505, 323, 9224, 271, 64, 1066, 8, 445, 603, 365, 16, 509, 1165, 360, 23351, 8470, 1450, 271...
self.staticText6 = wxStaticText(id=wxID_STCSTYLEEDITDLGSTATICTEXT6, label='Style', name='staticText6', parent=self, pos=wxPoint(8, 56), size=wxSize(40, 13), style=0) self.staticText8 = wxStaticText(id=wxID_STCSTYLEEDITDLGSTATICTEXT8,
self.staticText6 = wx.StaticText(id=wxID_STCSTYLEEDITDLGSTATICTEXT6, label='Style', name='staticText6', parent=self, pos=wx.Point(8, 56), size=wx.Size(40, 13), style=0) self.staticText8 = wx.StaticText(id=wxID_STCSTYLEEDITDLGSTATICTEXT8,
def _init_ctrls(self, prnt): # generated method, don't edit wxDialog.__init__(self, id=wxID_STCSTYLEEDITDLG, name='STCStyleEditDlg', parent=prnt, pos=wxPoint(583, 291), size=wxSize(459, 482), style=wxWANTS_CHARS | wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER, title=self.stc_title) self._init_utils() self.SetClientSize(wxSize(451, 455)) self.SetAutoLayout(True) self.SetSizeHints(425, 400, -1, -1) self.Center(wxBOTH) EVT_SIZE(self, self.OnStcstyleeditdlgSize)
1e19321bfb8d6ff348cd85bdad3a1a4c2f517fa0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/1e19321bfb8d6ff348cd85bdad3a1a4c2f517fa0/STCStyleEditor.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2738, 67, 16277, 87, 12, 2890, 16, 846, 496, 4672, 468, 4374, 707, 16, 2727, 1404, 3874, 7075, 6353, 16186, 2738, 972, 12, 2890, 16, 612, 33, 27226, 734, 67, 882, 39, 15066, 10776...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2738, 67, 16277, 87, 12, 2890, 16, 846, 496, 4672, 468, 4374, 707, 16, 2727, 1404, 3874, 7075, 6353, 16186, 2738, 972, 12, 2890, 16, 612, 33, 27226, 734, 67, 882, 39, 15066, 10776...
S = [[5,pari('x^2-3*x+1')]] + S
S = [[5,pari('x^2-x+1')]] + S
def enumerate_totallyreal_fields_prim(n, B, a = [], verbose=0, return_seqs=False, \ phc=False, keep_fields=False, t_2=False): r""" This function enumerates primitive totally real fields of degree $n>1$ with discriminant $d \leq B$; optionally one can specify the first few coefficients, where the sequence $a$ corresponds to a polynomial by $$ a[d]*x^n + ... + a[0]*x^(n-d) $$ if length(a) = d+1, so in particular always a[d] = 1. If verbose == 1 (or 2), then print to the screen (really) verbosely; if verbose is a string, then print verbosely to the file specified by verbose. If return_seqs, then return the polynomials as sequences (for easier exporting to a file). If keep_fields, then keep fields up to B*log(B); if keep_fields is an integer, then keep fields up to that integer. If t_2 = T, then keep only polynomials with t_2 norm >= T. NOTE: This is guaranteed to give all primitive such fields, and seems in practice to give many imprimitive ones. INPUT: n -- integer, the degree B -- integer, the discriminant bound a -- list (default: []), the coefficient list to begin with verbose -- boolean or string (default: False) phc -- boolean or integer (default: False) OUTPUT: the list of fields with entries [d,f], where d is the discriminant and f is a defining polynomial, sorted by discriminant. EXAMPLES: In this first simple example, we compute the totally real quadratic fields of discriminant <= 50. sage: enumerate_totallyreal_fields_prim(2,50) [[5, x^2 - x - 1], [8, x^2 - 2], [12, x^2 - 3], [13, x^2 - x - 3], [17, x^2 - x - 4], [21, x^2 - x - 5], [24, x^2 - 6], [28, x^2 - 7], [29, x^2 - x - 7], [33, x^2 - x - 8], [37, x^2 - x - 9], [40, x^2 - 10], [41, x^2 - x - 10], [44, x^2 - 11]] sage: [ d for d in range(5,50) if (is_squarefree(d) and d%4 == 1) or (d%4 == 0 and is_squarefree(d/4)) ] [5, 8, 12, 13, 17, 20, 21, 24, 28, 29, 33, 37, 40, 41, 44] Next, we compute all totally real quintic fields of discriminant <= 10^5. sage: enumerate_totallyreal_fields_prim(5,10^5) [[14641, x^5 - x^4 - 4*x^3 + 3*x^2 + 3*x - 1], [24217, x^5 - 5*x^3 - x^2 + 3*x + 1], [36497, x^5 - 2*x^4 - 3*x^3 + 5*x^2 + x - 1], [38569, x^5 - 5*x^3 + 4*x - 1], [65657, x^5 - x^4 - 5*x^3 + 2*x^2 + 5*x + 1], [70601, x^5 - x^4 - 5*x^3 + 2*x^2 + 3*x - 1], [81509, x^5 - x^4 - 5*x^3 + 3*x^2 + 5*x - 2], [81589, x^5 - 6*x^3 + 8*x - 1], [89417, x^5 - 6*x^3 - x^2 + 8*x + 3]] We see that there are 9 such fields (up to isomorphism!). NOTES: This function uses Hunter's algorithm [C, Section 9.3] and modifications due to Takeuchi [T] and the author [V]. We enumerate polynomials f(x) = x^n + a[n-1]*x^(n-1) + ... + a[0]. Hunter's theorem gives bounds on a[n-1] and a[n-2]; then given a[n-1] and a[n-2], one can recursively compute bounds on a[n-3], ..., a[0] using the fact that the polynomial is totally real by looking at the zeros of successive derivatives and applying Rolle's theorem! See [T] for more details. REFERENCES: [C] Henri Cohen, Advanced topics in computational number theory, Graduate Texts in Mathematics, vol. 193, Springer-Verlag, New York, 2000. [T] Kisao Takeuchi, Totally real algebraic number fields of degree 9 with small discriminant, Saitama Math. J. 17 (1999), 63--85 (2000). [V] John Voight, Enumeration of totally real number fields of bounded root discriminant, to appear in Lect. Notes in Comp. Sci. AUTHORS: - John Voight (2007-09-03) """ if not isinstance(n, Integer): try: n = Integer(n) except: raise TypeError, "cannot coerce n (= %s) to an integer"%n if (n < 1): raise ValueError, "n must be at least 1." # Initialize T = tr_data(n,B,a) S = [] dB_odlyzko = odlyzko_bound_totallyreal(n) dB = math.ceil(40000*dB_odlyzko**n) counts = [0,0,0,0] if keep_fields: if type(keep_fields) == bool: keepB = int(math.floor(B*math.log(B))) else: keepB = keep_fields if t_2: k0 = len(a) t_2val = a[k0-2]**2-2*a[k0-3] # Trivial case if n == 1: if return_seqs: return [[0,0,0,0],[[1,[-1,1]]]] else: return [[1,pari('x-1')]] if verbose: saveout = sys.stdout if type(verbose) == str: fsock = open(verbose, 'w') sys.stdout = fsock # Else, print to screen f_out = [0]*n + [1] if verbose == 2: T.incr(f_out,verbose,phc=phc) else: T.incr(f_out,phc=phc) while f_out[n] <> 0: if verbose: print "==>", f_out, nf = pari(f_out).Polrev() d = nf.poldisc() counts[0] += 1 if d > 0 and nf.polsturm_full() == n: da = int_has_small_square_divisor(Integer(d)) if d > dB or d <= B*da: counts[1] += 1 if nf.polisirreducible(): counts[2] += 1 [zk,d] = nf.nfbasis_d() if d <= B or (type(keep_fields) == Integer and keep_fields == 0) or \ (keep_fields and d <= keepB): if verbose: print "has discriminant", d, # Find a minimal lattice element counts[3] += 1 ng = pari([nf,zk]).polredabs() # Check if K is contained in the list. found = False ind = bisect.bisect_left(S, [d,ng]) while ind < len(S) and S[ind][0] == d: if S[ind][1] == ng: if verbose: print "but is not new" found = True break ind += 1 ngt2 = ng[n-1]**2-2*ng[n-2] if not found and (type(t_2) == bool and (not t_2 or ngt2 >= t_2val)) or \ (type(t_2) == Integer and ngt2 >= t_2): if verbose: print "and is new!" S.insert(ind, [d,ng]) else: if verbose: print "has discriminant", abs(d), "> B" else: if verbose: print "is not irreducible" else: if verbose: print "has discriminant", abs(d), "with no large enough square divisor" else: if verbose: if d == 0: print "is not squarefree" else: print "is not totally real" if verbose == 2: T.incr(f_out,verbose=verbose,phc=phc) else: T.incr(f_out,phc=phc) # In the application of Smyth's theorem above, we exclude finitely # many possibilities which we must now throw back in. if n == 2 and B >= 5 and (type(t_2) == bool and (not t_2 or 5 >= t_2val)) or \ (type(t_2) == Integer and 5 >= t_2): S = [[5,pari('x^2-3*x+1')]] + S elif n == 3 and B >= 49 and (type(t_2) == bool and (not t_2 or 5 >= t_2val)) or \ (type(t_2) == Integer and 5 >= t_2): S = [[49,pari('x^3-x^2-2*x+1')]] + S # The polynomials with n = 4 define imprimitive number fields. # Now check for isomorphic fields weed_fields(S) # Output. if verbose: print "="*80 print "Polynomials tested:", counts[0] print "Polynomials with sssd poldisc:", counts[1] print "Irreducible polynomials:", counts[2] print "Polynomials with nfdisc <= B:", counts[3] for i in range(len(S)): print S[i] if type(verbose) == str: fsock.close() sys.stdout = saveout if return_seqs: return [counts,[[s[0],s[1].reverse().Vec()] for s in S]] else: return S
4682d1d87dbaa3e7a12be2c96c8cda13cf832ae1 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/4682d1d87dbaa3e7a12be2c96c8cda13cf832ae1/totallyreal.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4241, 67, 3307, 1230, 7688, 67, 2821, 67, 30438, 12, 82, 16, 605, 16, 279, 273, 5378, 16, 3988, 33, 20, 16, 327, 67, 22437, 33, 8381, 16, 521, 1844, 71, 33, 8381, 16, 3455, 67, 282...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4241, 67, 3307, 1230, 7688, 67, 2821, 67, 30438, 12, 82, 16, 605, 16, 279, 273, 5378, 16, 3988, 33, 20, 16, 327, 67, 22437, 33, 8381, 16, 521, 1844, 71, 33, 8381, 16, 3455, 67, 282...
r' "(^"|.)*" ' t.value = Token( 'quotedstring', t.value[1:-1] )
r' "(^"|.)*" | \'(^\'|.)*\' ' t.value = Token( 'quotedstring', t.value )
def t_quotedstring(t): r' "(^"|.)*" ' t.value = Token( 'quotedstring', t.value[1:-1] ) return t
6a7c0bacfb050a5b1cc72f10f0d586f625efce58 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12724/6a7c0bacfb050a5b1cc72f10f0d586f625efce58/emparser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 268, 67, 15179, 1080, 12, 88, 4672, 436, 11, 7751, 66, 6, 96, 12998, 7388, 571, 7164, 12, 66, 3730, 96, 12998, 14, 3730, 296, 268, 18, 1132, 273, 3155, 12, 296, 15179, 1080, 2187, 26...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 268, 67, 15179, 1080, 12, 88, 4672, 436, 11, 7751, 66, 6, 96, 12998, 7388, 571, 7164, 12, 66, 3730, 96, 12998, 14, 3730, 296, 268, 18, 1132, 273, 3155, 12, 296, 15179, 1080, 2187, 26...
self.photo = ""
self.photo = QUESTION_MARK()
def __init__(self, name="cache"): AbstractDocument.__init__(self, name) self.title = u"" self.firstname = u"" self.lastname = u"" self.pseudo = u"" self.photo = "" self.email = u"" self.birthday = time.localtime() self.language = u"" self.address = u"" self.postcode = 0 self.city = u"" self.country = u"" self.description = u"" self.download_repo = unicode(DOWNLOAD_REPO) self.hobbies = [] # dictionary of file. {att_name : att_value} self.custom_attributes = {} # {root: DirContainers} self.files = {} # dictionary of peers. {pseudo : PeerDescriptor} self.peers = {}
5679c4db82eac1c29cb1495c8e81c2aaa1a597c0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2522/5679c4db82eac1c29cb1495c8e81c2aaa1a597c0/document.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 508, 1546, 2493, 6, 4672, 4115, 2519, 16186, 2738, 972, 12, 2890, 16, 508, 13, 365, 18, 2649, 273, 582, 3660, 365, 18, 26576, 273, 582, 3660, 365, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 508, 1546, 2493, 6, 4672, 4115, 2519, 16186, 2738, 972, 12, 2890, 16, 508, 13, 365, 18, 2649, 273, 582, 3660, 365, 18, 26576, 273, 582, 3660, 365, 18, ...
colspan += 2
def show_view(view, show_heading = False, show_buttons = True, show_footer = True): # Parse display options display_options = html.var("display_options", "") # assume all missing options as active (upper case) for c in "HTBFCEOZRSIX": if c not in display_options and c.lower() not in display_options: display_options += c html.display_options = display_options # [1] Datasource datasource = multisite_datasources[view["datasource"]] tablename = datasource["table"] # [2] Layout layout = multisite_layouts[view["layout"]] # User can override the layout settings via HTML variables (buttons) # which are safed persistently. This is known as "view options" vo = view_options(view["name"]) num_columns = vo.get("num_columns", view.get("num_columns", 1)) browser_reload = vo.get("refresh", view.get("browser_reload", None)) if browser_reload and 'R' in display_options: html.set_browser_reload(browser_reload) # [3] Filters show_filters = [ multisite_filters[fn] for fn in view["show_filters"] ] hide_filters = [ multisite_filters[fn] for fn in view["hide_filters"] ] hard_filters = [ multisite_filters[fn] for fn in view["hard_filters"] ] for varname, value in view["hard_filtervars"]: # shown filters are set, if form is fresh and variable not supplied in URL if not html.var("filled_in") and not html.has_var(varname): html.set_var(varname, value) filterheaders = "" only_sites = None for filt in show_filters + hide_filters + hard_filters: header = filt.filter(tablename) if header.startswith("Sites:"): only_sites = header.strip().split(" ")[1:] else: filterheaders += header query = filterheaders + view.get("add_headers", "") # [4] Sorting sorters = [ (multisite_sorters[sn], reverse) for sn, reverse in view["sorters"] ] # [5] Grouping group_painters = [ (multisite_painters[n], v) for n, v in view["group_painters"] ] # [6] Columns painters = [ (multisite_painters[n], v) for n, v in view["painters"] ] # Now compute this list of all columns we need to query via Livestatus. # Those are: (1) columns used by the sorters in use, (2) columns use by # column- and group-painters in use and - note - (3) columns used to # satisfy external references (filters) of views we link to. The last bit # is the trickiest. Also compute this list of view options use by the # painters columns = [] painter_options = [] for s, r in sorters: columns += s["columns"] for p, v in (group_painters + painters): columns += p["columns"] painter_options += p.get("options", []) if v: linkview = html.available_views.get(v) if linkview: for ef in linkview["hide_filters"]: f = multisite_filters[ef] columns += f.link_columns painter_options = list(set(painter_options)) painter_options.sort() # Add key columns, needed for executing commands columns += datasource["keys"] # Make column list unique and remove (implicit) site column colset = set(columns) if "site" in colset: colset.remove("site") columns = list(colset) # Fetch data. Some views show data only after pressing [Search] if (not view["mustsearch"]) or html.var("search"): # names for additional columns (through Stats: headers) add_columns = datasource.get("add_columns", []) columns, rows = query_data(datasource, columns, add_columns, query, only_sites, get_limit()) sort_data(rows, sorters) else: columns, rows = [], [] # html.write("<pre>%s</pre>" % pprint.pformat((columns, rows))) # Show heading (change between "preview" mode and full page mode) if show_heading: # Show/Hide the header with page title, MK logo, etc. if 'H' in display_options: html.body_start(view_title(view)) if 'T' in display_options: html.top_heading(view_title(view)) has_done_actions = False if show_buttons and 'B' in display_options: show_context_links(view, hide_filters) need_navi = show_buttons and ('F' in display_options or 'C' in display_options or 'O' in display_options or 'E' in display_options) if need_navi: html.write("<table class=navi><tr>\n") colspan = 0 # Filter-button if 'F' in display_options and len(show_filters) > 0 and not html.do_actions(): filter_isopen = html.var("search", "") == "" and view["mustsearch"] toggle_button("table_filter", filter_isopen, "Filter", ["filter"]) html.write("<td class=minigap></td>\n") colspan += 2 # Command-button if 'C' in display_options and len(rows) > 0 and config.may("act") and not html.do_actions(): toggle_button("table_actions", False, "Commands") html.write("<td class=minigap></td>\n") colspan += 2 # Painter-Options if len(painter_options) > 0 and config.may("painter_options"): toggle_button("painter_options", False, "Display") html.write("<td class=minigap></td>\n") colspan += 2 # Buttons for view options if 'O' in display_options: if config.user_may(config.user, "view_option_columns"): for col in config.view_option_columns: uri = html.makeuri([("num_columns", col)]) if col == num_columns: addclass = " selected" else: addclass = "" html.write('<td class="left w30%s"><a href="%s">%s</a></td>\n' % (addclass, uri, col)) html.write("<td class=minigap></td>\n") colspan += 2 if 'R' in display_options and config.user_may(config.user, "view_option_refresh"): for ref in config.view_option_refreshes: uri = html.makeuri([("refresh", ref)]) if ref == browser_reload or (not ref and not browser_reload): addclass = " selected" else: addclass = "" if ref: reftext = "%d s" % ref else: reftext = "&#8734;" html.write('<td class="left w40%s"><a href="%s">%s</a></td>\n' % (addclass, uri, reftext)) html.write("<td class=minigap></td>\n") colspan += 2 html.write("<td class=gap></td>\n") colspan += 1 # Customize/Edit view button if 'E' in display_options and config.may("edit_views"): backurl = htmllib.urlencode(html.makeuri([])) html.write('<td class="right" onmouseover="hover_tab(this);" onmouseout="unhover_tab(this);">') if view["owner"] == html.req.user: html.write('<a href="edit_view.py?load_view=%s&back=%s">Edit</a>\n' % (view["name"], backurl)) else: html.write('<a href="edit_view.py?clonefrom=%s&load_view=%s&back=%s">Edit</a>\n' % (view["owner"], view["name"], backurl)) html.write('</td>') colspan += 1 html.write("</tr>") # Filter form if 'F' in display_options and len(show_filters) > 0 and not html.do_actions(): show_filter_form(filter_isopen, show_filters, colspan) # Actions if 'C' in display_options and len(rows) > 0: if html.do_actions() and html.transaction_valid(): # submit button pressed, no reload try: html.write("<tr class=form><td class=whiteborder colspan=%d>" % colspan) # Create URI with all actions variables removed backurl = html.makeuri([]) has_done_actions = do_actions(datasource["infos"][0], rows, backurl) html.write("</td></tr>") except MKUserError, e: html.show_error(e.message) html.write("</td></tr>") html.add_user_error(e.varname, e.message) show_action_form(True, datasource, colspan) else: show_action_form(False, datasource, colspan) if 'O' in display_options and len(painter_options) > 0 and config.may("painter_options"): show_painter_options(painter_options, colspan) # Ende des Bereichs mit den Tabs html.write("</table>\n") # class=navi if not has_done_actions: # Limit exceeded? Show warning count = len(rows) limit = get_limit() if limit != None and count == limit + 1: text = "Your query produced more then %d results. " % limit if html.var("limit", "soft") == "soft" and config.may("ignore_soft_limit"): text += '<a href="%s">Repeat query and allow more results.</a>' % html.makeuri([("limit", "hard")]) elif html.var("limit") == "hard" and config.may("ignore_hard_limit"): text += '<a href="%s">Repeat query without limit.</a>' % html.makeuri([("limit", "none")]) html.show_warning(text) del rows[-1] layout["render"]((columns, rows), view, group_painters, painters, num_columns) # Play alarm sounds, if critical events have been displayed if 'S' in display_options and view.get("play_sounds"): play_alarm_sounds() # In multi site setups error messages of single sites do not block the # output and raise now exception. We simply print error messages here: if config.show_livestatus_errors: for sitename, info in html.live.deadsites.items(): html.show_error("<b>%s - Livestatus error</b><br>%s" % (info["site"]["alias"], info["exception"])) if show_footer: html.bottom_focuscode() if 'Z' in display_options: html.bottom_footer() if 'H' in display_options: html.body_end()
5988dc68b2c4439ac451c483e6643ca4800ad36f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5589/5988dc68b2c4439ac451c483e6643ca4800ad36f/views.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 67, 1945, 12, 1945, 16, 2405, 67, 19948, 273, 1083, 16, 2405, 67, 16016, 273, 1053, 16, 2405, 67, 14723, 273, 1053, 4672, 468, 2884, 2562, 702, 2562, 67, 2116, 273, 1729, 18, 140...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1945, 12, 1945, 16, 2405, 67, 19948, 273, 1083, 16, 2405, 67, 16016, 273, 1053, 16, 2405, 67, 14723, 273, 1053, 4672, 468, 2884, 2562, 702, 2562, 67, 2116, 273, 1729, 18, 140...
for pattern in [' at 0x[0-9a-f]{6,}(>+)$', ' at [0-9A-F]{8,}(>+)$']: if re.search(pattern, repr(Exception)): return re.sub(pattern, '\\1', text)
if _re_stripid.search(repr(Exception)): return _re_stripid.sub(r'\1', text)
def stripid(text): """Remove the hexadecimal id from a Python object representation.""" # The behaviour of %p is implementation-dependent; we check two cases. for pattern in [' at 0x[0-9a-f]{6,}(>+)$', ' at [0-9A-F]{8,}(>+)$']: if re.search(pattern, repr(Exception)): return re.sub(pattern, '\\1', text) return text
329f78b99c88d5af01f611c24d7a874c19c04b3c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/329f78b99c88d5af01f611c24d7a874c19c04b3c/pydoc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2569, 350, 12, 955, 4672, 3536, 3288, 326, 20070, 612, 628, 279, 6600, 733, 4335, 12123, 468, 1021, 14273, 434, 738, 84, 353, 4471, 17, 10891, 31, 732, 866, 2795, 6088, 18, 309, 389, 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, 2569, 350, 12, 955, 4672, 3536, 3288, 326, 20070, 612, 628, 279, 6600, 733, 4335, 12123, 468, 1021, 14273, 434, 738, 84, 353, 4471, 17, 10891, 31, 732, 866, 2795, 6088, 18, 309, 389, 2...
dw <address> [process] - show memory contents as words dw <address-address> [process] - show memory contents as words
[~thread] dw <register> - show memory contents as words [~thread] dw <register-register> - show memory contents as words [~thread] dw <register> <size> - show memory contents as words [~process] dw <address> - show memory contents as words [~process] dw <address-address> - show memory contents as words [~process] dw <address> <size> - show memory contents as words
def do_dw(self, arg): """ dw <address> [process] - show memory contents as words dw <address-address> [process] - show memory contents as words """ self.print_memory_display(arg, winappdbg.HexDump.hexblock_word)
95edb553305e95a1ded0ce46aa595556f55c8dbe /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7261/95edb553305e95a1ded0ce46aa595556f55c8dbe/pdebug.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 22512, 12, 2890, 16, 1501, 4672, 3536, 306, 98, 5930, 65, 12394, 411, 4861, 34, 300, 2405, 3778, 2939, 487, 4511, 306, 98, 5930, 65, 12394, 411, 4861, 17, 4861, 34, 300, 2405,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 22512, 12, 2890, 16, 1501, 4672, 3536, 306, 98, 5930, 65, 12394, 411, 4861, 34, 300, 2405, 3778, 2939, 487, 4511, 306, 98, 5930, 65, 12394, 411, 4861, 17, 4861, 34, 300, 2405,...
print " A file with this location/name does not yet exist,\n I'm about to generate it...\n"
print "\n No backup needed.\n A file with this location/name does not yet exist,\n I'm about to generate a new config file!\n"
def backupFile(self, _file): print "\n--BACKUP/CREATE CONFIGFILE--------------------------------------\n" print " Trying to backup the original "+_file+"..." try: _stamp = time.strftime("-%d_%b_%Y_%H.%M.%S", time.gmtime()) _fname = _file+_stamp+".xml" shutil.copy(_file, _fname) print " Backup success, "+_file+" copied to : %s" % _fname print " If you need to abort setup, you can restore by renaming the backup file." self.testExit() except: print " A file with this location/name does not yet exist,\n I'm about to generate it...\n" self.testExit()
663a009dd909344bb96c5868a270766b7baa29ed /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12909/663a009dd909344bb96c5868a270766b7baa29ed/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5114, 812, 12, 2890, 16, 389, 768, 4672, 1172, 1548, 82, 413, 8720, 3079, 19, 9344, 9128, 3776, 2443, 13093, 64, 82, 6, 1172, 315, 565, 6161, 310, 358, 5114, 326, 2282, 13773, 67, 768,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5114, 812, 12, 2890, 16, 389, 768, 4672, 1172, 1548, 82, 413, 8720, 3079, 19, 9344, 9128, 3776, 2443, 13093, 64, 82, 6, 1172, 315, 565, 6161, 310, 358, 5114, 326, 2282, 13773, 67, 768,...
self._progress = progress
self._progress = percent
def progress(self, percent, message=''): percent = min(1.0, percent) message = '%s' % message if self._progress_mode == 'list': if message: print '[%3d%%] %s' % (100*percent, message) elif self._progress_mode == 'bar': dots = int((self.TERM_WIDTH/2-5)*percent) background = '-'*(self.TERM_WIDTH/2-5) if len(message) > self.TERM_WIDTH/2: message = message[:self.TERM_WIDTH/2-3]+'...'
9f5ef4a6c6e2fceea4bb3f6245dfa453e15327e8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11420/9f5ef4a6c6e2fceea4bb3f6245dfa453e15327e8/cli.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4007, 12, 2890, 16, 5551, 16, 883, 2218, 11, 4672, 5551, 273, 1131, 12, 21, 18, 20, 16, 5551, 13, 883, 273, 1995, 87, 11, 738, 883, 225, 309, 365, 6315, 8298, 67, 3188, 422, 296, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4007, 12, 2890, 16, 5551, 16, 883, 2218, 11, 4672, 5551, 273, 1131, 12, 21, 18, 20, 16, 5551, 13, 883, 273, 1995, 87, 11, 738, 883, 225, 309, 365, 6315, 8298, 67, 3188, 422, 296, 1...
elif mode == 2:
elif whence == 2:
def seek(self, pos, mode = 0): """Seek to specified position into the chunk. Default position is 0 (start of chunk). If the file is not seekable, this will result in an error.
5a7366b04bc08ce390da13b10c3438b378eab380 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/5a7366b04bc08ce390da13b10c3438b378eab380/chunk.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6520, 12, 2890, 16, 949, 16, 1965, 273, 374, 4672, 3536, 16134, 358, 1269, 1754, 1368, 326, 2441, 18, 2989, 1754, 353, 374, 261, 1937, 434, 2441, 2934, 971, 326, 585, 353, 486, 6520, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6520, 12, 2890, 16, 949, 16, 1965, 273, 374, 4672, 3536, 16134, 358, 1269, 1754, 1368, 326, 2441, 18, 2989, 1754, 353, 374, 261, 1937, 434, 2441, 2934, 971, 326, 585, 353, 486, 6520, 4...
return [], tree, []
return [], [tree], []
def getnodes(tree): ''' walk tree to get list of branches and list of leaves Parameters ---------- tree : list of tuples tree as defined for RU2NMNL Returns ------- branch : list list of all branch names leaves : list list of all leaves names ''' if type(tree) == tuple: name, subtree = tree ab = [name] al = [] #degenerate branches if len(subtree) == 1: adeg = [name] else: adeg = [] for st in subtree: b, l, d = getnodes(st) ab.extend(b) al.extend(l) adeg.extend(d) return ab, al, adeg return [], tree, []
9c5fff34ffccf856c501965fc5adda55ae71eb98 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12658/9c5fff34ffccf856c501965fc5adda55ae71eb98/treewalkerclass.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 4690, 12, 3413, 4672, 9163, 5442, 2151, 358, 336, 666, 434, 11483, 471, 666, 434, 15559, 225, 7012, 12181, 2151, 294, 666, 434, 10384, 2151, 487, 2553, 364, 534, 57, 22, 50, 49, 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, 336, 4690, 12, 3413, 4672, 9163, 5442, 2151, 358, 336, 666, 434, 11483, 471, 666, 434, 15559, 225, 7012, 12181, 2151, 294, 666, 434, 10384, 2151, 487, 2553, 364, 534, 57, 22, 50, 49, 2...
r = self.s.recv(1500) if len(r) < 16: raise RPCProtocolError("Received small packet (%d bytes)"%len(r)) rcmd, rtag, retcode = struct.unpack(">IIq", r[:16]) data = r[16:] if rcmd != cmd: raise RPCProtocolError("Received bad command (expected %d, got %d)"%(cmd,rcmd)) if rtag != tag: raise RPCProtocolError("Received bad tag (expected %d, got %d)"%(tag,rtag)) if len(data) != 0: return retcode, data else: return retcode
while True: r = self.s.recv(1500) if len(r) < 16: raise RPCProtocolError("Received small packet (%d bytes)"%len(r)) rcmd, rtag, retcode = struct.unpack(">IIq", r[:16]) data = r[16:] if rcmd != cmd: raise RPCProtocolError("Received bad command (expected %d, got %d)"%(cmd,rcmd)) if rtag != tag: print "RPC: Received bad tag (expected %d, got %d)"%(tag,rtag) continue if len(data) != 0: return retcode, data else: return retcode
def rpc(self, cmd, data=""): tag = self.tag self.tag += 1 hdr = struct.pack(">II", cmd, tag) self.s.send(hdr + data) r = self.s.recv(1500) if len(r) < 16: raise RPCProtocolError("Received small packet (%d bytes)"%len(r)) rcmd, rtag, retcode = struct.unpack(">IIq", r[:16]) data = r[16:] if rcmd != cmd: raise RPCProtocolError("Received bad command (expected %d, got %d)"%(cmd,rcmd)) if rtag != tag: raise RPCProtocolError("Received bad tag (expected %d, got %d)"%(tag,rtag)) if len(data) != 0: return retcode, data else: return retcode
716024bd61d14d3306fa8115fb0c395f8a2796b1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12735/716024bd61d14d3306fa8115fb0c395f8a2796b1/netrpc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6724, 12, 2890, 16, 1797, 16, 501, 1546, 6, 4672, 1047, 273, 365, 18, 2692, 365, 18, 2692, 1011, 404, 7723, 273, 1958, 18, 2920, 2932, 34, 6954, 3113, 1797, 16, 1047, 13, 365, 18, 87...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6724, 12, 2890, 16, 1797, 16, 501, 1546, 6, 4672, 1047, 273, 365, 18, 2692, 365, 18, 2692, 1011, 404, 7723, 273, 1958, 18, 2920, 2932, 34, 6954, 3113, 1797, 16, 1047, 13, 365, 18, 87...
prod.add_create_constant(query_id, 'result', '(%s %s %s)' % (m.name(), op_strs[0], op_strs[1]))
prod.add_create_constant(query_id, 'res', '(%s %s %s)' % (m.name(), op_strs[0], op_strs[1]))
def HandleMath(maths, head, base_prod, var_map, rule_index, state_name): # build a map of result variables to the calculation index # that generated it result_vars = {} # var -> index for i, m in enumerate(maths): assert m.num_terms() == 3, 'Math condition only has %d terms' % m.num_terms() rvar = m.term(2) assert rvar.type() == 'variable', 'Math result not variable' assert rvar not in result_vars, 'Two math results share the same variable' result_vars[rvar] = i # resolve interdependencies among calculations deps = {} # index -> [index] for i, m in enumerate(maths): for t in [0,1]: if m.term(t).type() == 'variable' and m.term(t) in result_vars: deps.setdefault(i, []).append(result_vars[m.term(t)]) else: deps.setdefault(i, []).append(-1) # create intermediate productions int_prods = [] for i, m in enumerate(maths): math_code = 'math-%d-%d' % (rule_index, i) # make a production to create the <s> ^math.math-x-y structure mk_struct_prod = SoarProd(name_gen.get_name('elaborate*%s-make-%s-struct' % (SoarifyStr(str(head)), math_code)), state_name) math_id = mk_struct_prod.get_or_make_id_chain(['math'])[0] mk_struct_prod.add_create_id(math_id, math_code) int_prods.append(mk_struct_prod) # make the production for the actual operator prod_name = name_gen.get_name(base_prod.get_name() + SoarifyStr(str(m))) prod = base_prod.copy(prod_name) var_map1 = var_map.copy(prod.get_name_gen()) # add conditions to bind the ids for the operands ops = [] for j, d in enumerate(deps[i]): if d >= 0: # have to get this operand from an intermediate result ops.append((GetMathRes(maths, prod, var_map1, deps, d, rule_index), 1)) else: if m.term(j).type() == 'variable': # get this from a regular condition assert m.term(j).name() in var_map1 ops.append((var_map1.get_var(m.term(j).name()), 1)) else: # constant ops.append((str(m.term(j)), 0)) # make an action to put this op,op,result triplet on the state math_id = prod.get_or_make_id_chain_existing(['math', math_code])[0] query_id = prod.add_create_id(math_id, 'query') op_strs = [] for j in [0,1]: if ops[j][1] == 1: # id prod.add_create_bound_id(query_id, 'op%d' % j, ops[j][0]) op_strs.append('<%s>' % ops[j][0]) else: # const prod.add_create_constant(query_id, 'op%d' % j, ops[j][0]) op_strs.append(ops[j][0]) prod.add_create_constant(query_id, 'result', '(%s %s %s)' % (m.name(), op_strs[0], op_strs[1])) int_prods.append(prod) # modify body of base production to test for necessary calculations used = [] for v, i in result_vars.items(): GetMathRes(maths, base_prod, var_map, deps, i, rule_index, used) return int_prods
3ed030c0f8b645fb31395a56ef0d9e6970b322bd /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7008/3ed030c0f8b645fb31395a56ef0d9e6970b322bd/RuleParser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5004, 10477, 12, 15949, 87, 16, 910, 16, 1026, 67, 17672, 16, 569, 67, 1458, 16, 1720, 67, 1615, 16, 919, 67, 529, 4672, 225, 468, 1361, 279, 852, 434, 563, 3152, 358, 326, 11096, 77...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5004, 10477, 12, 15949, 87, 16, 910, 16, 1026, 67, 17672, 16, 569, 67, 1458, 16, 1720, 67, 1615, 16, 919, 67, 529, 4672, 225, 468, 1361, 279, 852, 434, 563, 3152, 358, 326, 11096, 77...
len(self.dsage_server.get_jobs_by_username('test')),
len(self.dsage_server.get_jobs_by_username('test', 'new')),
def testget_jobs_by_username(self): self.assertEquals( type(self.dsage_server.get_jobs_by_username('yqiang')), list) self.assertEquals( len(self.dsage_server.get_jobs_by_username('test')), 0)
469618d1d013f658bf4f499fe41bf7bd0e7075b7 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/469618d1d013f658bf4f499fe41bf7bd0e7075b7/test_server.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 588, 67, 10088, 67, 1637, 67, 5053, 12, 2890, 4672, 365, 18, 11231, 8867, 12, 618, 12, 2890, 18, 2377, 410, 67, 3567, 18, 588, 67, 10088, 67, 1637, 67, 5053, 2668, 93, 85, 77, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 588, 67, 10088, 67, 1637, 67, 5053, 12, 2890, 4672, 365, 18, 11231, 8867, 12, 618, 12, 2890, 18, 2377, 410, 67, 3567, 18, 588, 67, 10088, 67, 1637, 67, 5053, 2668, 93, 85, 77, ...
sql = 'SELECT directory.name, host.id, host.country, host_category_url.url, site.private, host.private '
sql += 'SELECT directory.name AS dname, host.id, host.country, host_category_url.url, site.private, host.private '
def _do_query_directories(): sql = 'SELECT directory.name, host.id, host.country, host_category_url.url, site.private, host.private ' sql += 'FROM directory, host_category_dir, host_category, host_category_url, host, site, category_directory ' sql += 'WHERE host_category_dir.host_category_id = host_category.id ' # join criteria sql += 'AND host_category_url.host_category_id = host_category.id ' # join criteria sql += 'AND host_category.host_id = host.id ' # join criteria sql += 'AND host.site_id = site.id ' # join criteria sql += 'AND host_category_dir.directory_id = directory.id ' # join criteria sql += 'AND category_directory.directory_id = directory.id ' # join criteria (dir for this category) sql += 'AND category_directory.category_id = host_category.category_id ' # join criteria sql += 'AND host_category_dir.up2date ' sql += 'AND NOT host_category_url.private ' sql += 'AND host.user_active AND site.user_active ' sql += 'AND host.admin_active AND site.admin_active ' sql += 'ORDER BY directory.name ' # now add the always_up2date host_categories sql += 'UNION ' sql = 'SELECT directory.name, host.id, host.country, host_category_url.url, site.private, host.private ' sql += 'FROM directory, host_category, host_category_url, host, site, category_directory ' sql += 'WHERE host_category_url.host_category_id = host_category.id ' # join criteria sql += 'AND host_category.host_id = host.id ' # join criteria sql += 'AND host.site_id = site.id ' # join criteria sql += 'AND category_directory.directory_id = directory.id ' # join criteria (dir for this category) sql += 'AND category_directory.category_id = host_category.category_id ' # join criteria sql += 'AND host_category.always_up2date ' sql += 'AND NOT host_category_url.private ' sql += 'AND host.user_active AND site.user_active ' sql += 'AND host.admin_active AND site.admin_active ' sql += 'ORDER BY directory.name ' directory = Directory.select()[0] result = directory._connection.queryAll(sql) return result
61345d6ce9284b00a2c71e45013ed103d0df9ea8 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/13031/61345d6ce9284b00a2c71e45013ed103d0df9ea8/mirrorlist.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2896, 67, 2271, 67, 15121, 13332, 1847, 1011, 296, 4803, 1867, 18, 529, 5355, 302, 529, 16, 1479, 18, 350, 16, 1479, 18, 9082, 16, 1479, 67, 4743, 67, 718, 18, 718, 16, 2834, 18...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2896, 67, 2271, 67, 15121, 13332, 1847, 1011, 296, 4803, 1867, 18, 529, 5355, 302, 529, 16, 1479, 18, 350, 16, 1479, 18, 9082, 16, 1479, 67, 4743, 67, 718, 18, 718, 16, 2834, 18...
Decode file/path string. Return `nodes.reprunicode` object. Convert to Unicode without the UnicodeDecode error of the implicit 'ascii:strict' decoding.
Ensure `path` is Unicode. Return `nodes.reprunicode` object. Decode file/path string in a failsave manner if not already done.
def decode_path(path): """ Decode file/path string. Return `nodes.reprunicode` object. Convert to Unicode without the UnicodeDecode error of the implicit 'ascii:strict' decoding. """ # see also http://article.gmane.org/gmane.text.docutils.user/2905 try: path = path.decode(sys.getfilesystemencoding(), 'strict') except AttributeError: # default value None has no decode method return nodes.reprunicode(path) except UnicodeDecodeError: try: path = path.decode('utf-8', 'strict') except UnicodeDecodeError: path = path.decode('ascii', 'replace') return nodes.reprunicode(path)
cc8f40b5dfeac3906f219b38c889dce26e3336dc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1532/cc8f40b5dfeac3906f219b38c889dce26e3336dc/utils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2495, 67, 803, 12, 803, 4672, 3536, 7693, 1375, 803, 68, 353, 9633, 18, 2000, 1375, 4690, 18, 12715, 9124, 68, 733, 18, 225, 6209, 585, 19, 803, 533, 316, 279, 2321, 5688, 21296, 309, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2495, 67, 803, 12, 803, 4672, 3536, 7693, 1375, 803, 68, 353, 9633, 18, 2000, 1375, 4690, 18, 12715, 9124, 68, 733, 18, 225, 6209, 585, 19, 803, 533, 316, 279, 2321, 5688, 21296, 309, ...
except util.TracError:
except TracError:
def process_request(self, req): req.perm.assert_permission(perm.LOG_VIEW)
234d1cbd40911d7fa7755656880ea911f8f1d19a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/234d1cbd40911d7fa7755656880ea911f8f1d19a/Browser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 2293, 12, 2890, 16, 1111, 4672, 1111, 18, 12160, 18, 11231, 67, 9827, 12, 12160, 18, 4842, 67, 12145, 13, 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, 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, 1207, 67, 2293, 12, 2890, 16, 1111, 4672, 1111, 18, 12160, 18, 11231, 67, 9827, 12, 12160, 18, 4842, 67, 12145, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
print id(A) print A
def __str__(self): context=getattr(self, 'aq_parent', None) if context is None: return self.__name__ return "(%s: %s of %s)" % (uid(self), self.aq_self, context)
d0e91377c6facafac5dc0acc57312f54bde08f69 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/d0e91377c6facafac5dc0acc57312f54bde08f69/test_AqAlg.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 701, 972, 12, 2890, 4672, 819, 33, 588, 1747, 12, 2890, 16, 296, 69, 85, 67, 2938, 2187, 599, 13, 309, 819, 353, 599, 30, 327, 365, 16186, 529, 972, 327, 7751, 9, 87, 30, 738...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 701, 972, 12, 2890, 4672, 819, 33, 588, 1747, 12, 2890, 16, 296, 69, 85, 67, 2938, 2187, 599, 13, 309, 819, 353, 599, 30, 327, 365, 16186, 529, 972, 327, 7751, 9, 87, 30, 738...
for j in range(numdacs / 4): self.set('pol_dacrack%d' % (j+1), polarity[j]) self._setdacbounds = True
def __init__(self, name, address, reset=False, numdacs=8, polarity=['BIP', 'BIP', 'BIP', 'BIP']): ''' Initialzes the IVVI, and communicates with the wrapper
45538a17e355af61b9cbfd09b009ce740b47007f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6471/45538a17e355af61b9cbfd09b009ce740b47007f/IVVI.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 508, 16, 1758, 16, 2715, 33, 8381, 16, 818, 72, 28965, 33, 28, 16, 2952, 20498, 33, 3292, 38, 2579, 2187, 296, 38, 2579, 2187, 296, 38, 2579, 2187, 296...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 508, 16, 1758, 16, 2715, 33, 8381, 16, 818, 72, 28965, 33, 28, 16, 2952, 20498, 33, 3292, 38, 2579, 2187, 296, 38, 2579, 2187, 296, 38, 2579, 2187, 296...
if module_path_prefix: binding_module_prefix = module_path_prefix.split('.') else: binding_module_prefix = []
binding_module_prefix_elts = module_prefix_elts[:]
def GenerateAllPython (schema_location=None, namespace=None, module_path_prefix=[], _process_builtins=False): modules = set() if module_path_prefix: binding_module_prefix = module_path_prefix.split('.') else: binding_module_prefix = [] pyxb.namespace.XMLSchema.setModulePath('pyxb.binding.datatypes') if namespace is None: if schema_location is None: raise Exception('No input provided') schema = xs.schema.CreateFromLocation(schema_location) namespace = schema.targetNamespace() nsdep = pyxb.namespace.NamespaceDependencies(namespace) for ns_set in nsdep.namespaceOrder(): pyxb.namespace.ResolveSiblingNamespaces(ns_set) siblings = nsdep.siblingNamespaces() print 'Sibling namesspaces: %s' % (siblings,) used_modules = {} component_namespace_map = {} namespace_component_map = {} for sns in siblings: if (pyxb.namespace.XMLSchema == sns) and (not _process_builtins): continue for c in sns.components(): if (isinstance(c, xs.structures.ElementDeclaration) and c._scopeIsGlobal()) or c.isTypeDefinition(): assert c._schema() is not None, '%s has no schema' % (c._schema(),) assert c._schema().targetNamespace() == sns component_namespace_map[c] = sns namespace_component_map.setdefault(sns, set()).add(c) all_components = component_namespace_map.keys() namespace_module_map = {} unique_in_bindings = set([NamespaceGroupModule._GroupPrefix]) for ns_scc in nsdep.namespaceOrder(): namespace_modules = [] nsg_head = None for ns in ns_scc: if not (ns in namespace_component_map): continue nsm = NamespaceModule(ns, binding_module_prefix, ns_scc, namespace_component_map.get(ns, ns.components())) modules.add(nsm) namespace_module_map[ns] = nsm assert ns == nsm.namespace() if nsg_head is None: nsg_head = nsm.namespaceGroupHead() if nsm.namespace().prefix() is not None: assert nsm.namespace().prefix() is not None, 'No prefix for %s' % (ns,) print 'Prefix store namespace %s' % (nsm.namespace().prefix(),) nsm.setBaseModule(utility.MakeUnique(nsm.namespace().prefix(), unique_in_bindings)) else: print 'None store no prefix' nsm.setBaseModule(None) print '%s stores in %s' % (ns, nsm.modulePath()) namespace_modules.append(nsm) if (nsg_head is not None) and nsg_head.namespaceGroupMulti(): ngm = NamespaceGroupModule(namespace_modules, binding_module_prefix) modules.add(ngm) [ _nsm.setNamespaceGroupModule(ngm) for _nsm in namespace_modules ] assert namespace_module_map[nsg_head.namespace()].namespaceGroupModule() == ngm print 'Group headed by %s stores in %s' % (nsg_head, ngm.modulePath()) schema_module_map = {} for sc_scc in nsdep.schemaOrder(): scg_head = sc_scc[0] nsm = NamespaceModule.ForNamespace(scg_head.targetNamespace()) sgm = None if (nsm is not None) and (nsm.namespaceGroupModule() is not None): sgm = SchemaGroupModule(nsm, sc_scc) modules.add(sgm) print 'Schema group stores in %s: %s' % (sgm.modulePath(), ' '.join([ _s.schemaLocationTag() for _s in sc_scc])) for sc in sc_scc: schema_module_map[sc] = sgm component_graph = utility.Graph() for c in all_components: component_graph.addNode(c) deps = c.dependentComponents() for target in deps: if target in all_components: component_graph.addEdge(c, target) if len(component_graph.sccOrder()) != len(component_graph.nodes()): raise pyxb.SchemaValidationError('Dependency loop in component graph.') component_order = [ _scc[0] for _scc in component_graph.sccOrder() ] element_declarations = [] type_definitions = [] for c in component_order: if isinstance(c, xs.structures.ElementDeclaration) and c._scopeIsGlobal(): nsm = namespace_module_map[component_namespace_map.get(c)] print 'binding %s' % (c.expandedName(),) nsm.bindComponent(c, SchemaGroupModule.ForSchema(c._schema())) element_declarations.append(c) else: type_definitions.append(c) simple_type_definitions = [] complex_type_definitions = [] for td in type_definitions: nsm = namespace_module_map.get(component_namespace_map[td]) assert nsm is not None, 'No namespace module for %s type %s scope %s namespace %s' % (td.expandedName(), type(td), td._scope(), component_namespace_map[td]) module_context = nsm.bindComponent(td, schema_module_map.get(td._schema(), None)) if isinstance(td, xs.structures.SimpleTypeDefinition): _PrepareSimpleTypeDefinition(td, nsm, module_context) simple_type_definitions.append(td) elif isinstance(td, xs.structures.ComplexTypeDefinition): _PrepareComplexTypeDefinition(td, nsm, module_context) complex_type_definitions.append(td) else: assert False, 'Unexpected component type %s' % (type(td),) for std in simple_type_definitions: GenerateSTD(std) for ctd in complex_type_definitions: GenerateCTD(ctd) for ed in element_declarations: GenerateED(ed) return modules
5eacb77c8998fd31b68477e0ec37388e9983b97b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7171/5eacb77c8998fd31b68477e0ec37388e9983b97b/generate.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6654, 1595, 15774, 261, 4821, 67, 3562, 33, 7036, 16, 1981, 33, 7036, 16, 1605, 67, 803, 67, 3239, 22850, 6487, 389, 2567, 67, 12406, 2679, 33, 8381, 4672, 4381, 273, 444, 1435, 225, 5...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6654, 1595, 15774, 261, 4821, 67, 3562, 33, 7036, 16, 1981, 33, 7036, 16, 1605, 67, 803, 67, 3239, 22850, 6487, 389, 2567, 67, 12406, 2679, 33, 8381, 4672, 4381, 273, 444, 1435, 225, 5...
outfile.write(i.serialize())
print "done"
def main(): # parse command line options try: opts, args = getopt.getopt(sys.argv[1:], "hv", ["help", "verbose"]) except getopt.error, msg: print msg print "for help use --help" sys.exit(2) for i in opts: print "opts:"+i[0] for i in args: print "args:"+i files = args for f in files: print "file:"+f try: allContacts=parse_vcf(f) except IOError: print "errore: file not found" sys.exit(2) myContacts=dedupe(allContacts) outfile = open("rubrica_parsata.vcf","w+") print "stampalo" for i in myContacts: #print i.serialize() outfile.write(i.serialize()) outfile.write(i.serialize())
921643f318dc11d3c2f19f00340948525a62789b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6937/921643f318dc11d3c2f19f00340948525a62789b/nodupe.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 468, 1109, 1296, 980, 702, 775, 30, 1500, 16, 833, 273, 336, 3838, 18, 588, 3838, 12, 9499, 18, 19485, 63, 21, 30, 6487, 315, 76, 90, 3113, 8247, 5201, 3113, 315, 11369, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 468, 1109, 1296, 980, 702, 775, 30, 1500, 16, 833, 273, 336, 3838, 18, 588, 3838, 12, 9499, 18, 19485, 63, 21, 30, 6487, 315, 76, 90, 3113, 8247, 5201, 3113, 315, 11369, ...
""" fl_create_slider(type, x, y, w, h, label) -> object ref.
""" fl_create_slider(type, x, y, w, h, label) -> object
def fl_create_slider(type, x, y, w, h, label): """ fl_create_slider(type, x, y, w, h, label) -> object ref. """ retval = _fl_create_slider(type, x, y, w, h, label) return retval
8765c710f695de392f6fc7c664c746ec98668b1d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2429/8765c710f695de392f6fc7c664c746ec98668b1d/xformslib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1183, 67, 2640, 67, 28372, 12, 723, 16, 619, 16, 677, 16, 341, 16, 366, 16, 1433, 4672, 3536, 1183, 67, 2640, 67, 28372, 12, 723, 16, 619, 16, 677, 16, 341, 16, 366, 16, 1433, 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, 1183, 67, 2640, 67, 28372, 12, 723, 16, 619, 16, 677, 16, 341, 16, 366, 16, 1433, 4672, 3536, 1183, 67, 2640, 67, 28372, 12, 723, 16, 619, 16, 677, 16, 341, 16, 366, 16, 1433, 13, ...
Select all modules inside teh self.selectionBox
Select all modules inside the self.selectionBox
def selectModules(self): """ selectModules() -> None Select all modules inside teh self.selectionBox """ path = QtGui.QPainterPath() path.addRect(self.selectionBox.sceneBoundingRect()) self.scene().setSelectionArea(path)
f7eb561ac3721bb02db65488dc0a8513c9ef2746 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6341/f7eb561ac3721bb02db65488dc0a8513c9ef2746/graphics_view.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2027, 7782, 12, 2890, 4672, 3536, 2027, 7782, 1435, 317, 599, 6766, 777, 4381, 4832, 326, 365, 18, 10705, 3514, 225, 3536, 589, 273, 23425, 18, 53, 15775, 743, 1435, 589, 18, 1289, 6120,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2027, 7782, 12, 2890, 4672, 3536, 2027, 7782, 1435, 317, 599, 6766, 777, 4381, 4832, 326, 365, 18, 10705, 3514, 225, 3536, 589, 273, 23425, 18, 53, 15775, 743, 1435, 589, 18, 1289, 6120,...
_(u'a unicode string')
def main(): global default_keywords try: opts, args = getopt.getopt( sys.argv[1:], 'ad:DEhk:Kno:p:S:Vvw:x:X:', ['extract-all', 'default-domain=', 'escape', 'help', 'keyword=', 'no-default-keywords', 'add-location', 'no-location', 'output=', 'output-dir=', 'style=', 'verbose', 'version', 'width=', 'exclude-file=', 'docstrings', 'no-docstrings', ]) except getopt.error as msg: usage(1, msg) # for holding option values class Options: # constants GNU = 1 SOLARIS = 2 # defaults extractall = 0 # FIXME: currently this option has no effect at all. escape = 0 keywords = [] outpath = '' outfile = 'messages.pot' writelocations = 1 locationstyle = GNU verbose = 0 width = 78 excludefilename = '' docstrings = 0 nodocstrings = {} options = Options() locations = {'gnu' : options.GNU, 'solaris' : options.SOLARIS, } # parse options for opt, arg in opts: if opt in ('-h', '--help'): usage(0) elif opt in ('-a', '--extract-all'): options.extractall = 1 elif opt in ('-d', '--default-domain'): options.outfile = arg + '.pot' elif opt in ('-E', '--escape'): options.escape = 1 elif opt in ('-D', '--docstrings'): options.docstrings = 1 elif opt in ('-k', '--keyword'): options.keywords.append(arg) elif opt in ('-K', '--no-default-keywords'): default_keywords = [] elif opt in ('-n', '--add-location'): options.writelocations = 1 elif opt in ('--no-location',): options.writelocations = 0 elif opt in ('-S', '--style'): options.locationstyle = locations.get(arg.lower()) if options.locationstyle is None: usage(1, _('Invalid value for --style: %s') % arg) elif opt in ('-o', '--output'): options.outfile = arg elif opt in ('-p', '--output-dir'): options.outpath = arg elif opt in ('-v', '--verbose'): options.verbose = 1 elif opt in ('-V', '--version'): print(_('pygettext.py (xgettext for Python) %s') % __version__) sys.exit(0) elif opt in ('-w', '--width'): try: options.width = int(arg) except ValueError: usage(1, _('--width argument must be an integer: %s') % arg) elif opt in ('-x', '--exclude-file'): options.excludefilename = arg elif opt in ('-X', '--no-docstrings'): fp = open(arg) try: while 1: line = fp.readline() if not line: break options.nodocstrings[line[:-1]] = 1 finally: fp.close() # calculate escapes make_escapes(options.escape) # calculate all keywords options.keywords.extend(default_keywords) # initialize list of strings to exclude if options.excludefilename: try: fp = open(options.excludefilename) options.toexclude = fp.readlines() fp.close() except IOError: print(_( "Can't read --exclude-file: %s") % options.excludefilename, file=sys.stderr) sys.exit(1) else: options.toexclude = [] # resolve args to module lists expanded = [] for arg in args: if arg == '-': expanded.append(arg) else: expanded.extend(getFilesForName(arg)) args = expanded # slurp through all the files eater = TokenEater(options) for filename in args: if filename == '-': if options.verbose: print(_('Reading standard input')) fp = sys.stdin closep = 0 else: if options.verbose: print(_('Working on %s') % filename) fp = open(filename) closep = 1 try: eater.set_filename(filename) try: tokenize.tokenize(fp.readline, eater) except tokenize.TokenError as e: print('%s: %s, line %d, column %d' % ( e.args[0], filename, e.args[1][0], e.args[1][1]), file=sys.stderr) finally: if closep: fp.close() # write the output if options.outfile == '-': fp = sys.stdout closep = 0 else: if options.outpath: options.outfile = os.path.join(options.outpath, options.outfile) fp = open(options.outfile, 'w') closep = 1 try: eater.write(fp) finally: if closep: fp.close()
f7bd964fb5364e6cf8feac5f088e214b4f4e9478 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8546/f7bd964fb5364e6cf8feac5f088e214b4f4e9478/pygettext.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 2552, 805, 67, 11771, 775, 30, 1500, 16, 833, 273, 336, 3838, 18, 588, 3838, 12, 2589, 18, 19485, 63, 21, 30, 6487, 296, 361, 30, 1639, 76, 79, 30, 47, 2135, 30, 84, 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, 2774, 13332, 2552, 805, 67, 11771, 775, 30, 1500, 16, 833, 273, 336, 3838, 18, 588, 3838, 12, 2589, 18, 19485, 63, 21, 30, 6487, 296, 361, 30, 1639, 76, 79, 30, 47, 2135, 30, 84, 3...
_ShutdownInstanceDisks(instance, self.cfg)
_ShutdownInstanceDisks(self, instance)
def Exec(self, feedback_fn): """Reboot the instance.
b9bddb6bdf7ac5841c732845ce0122c64bb026b1 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7542/b9bddb6bdf7ac5841c732845ce0122c64bb026b1/cmdlib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3889, 12, 2890, 16, 10762, 67, 4293, 4672, 3536, 31569, 326, 791, 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...
[ 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, 3889, 12, 2890, 16, 10762, 67, 4293, 4672, 3536, 31569, 326, 791, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
if type(value) != _LISTTYPE:
if value is not None and type(value) != _LISTTYPE:
def set(self, nodeid, **propvalues): isnew = 0 if propvalues.has_key('#ISNEW'): isnew = 1 del propvalues['#ISNEW'] if not isnew: self.fireAuditors('set', nodeid, propvalues) if not propvalues: return propvalues if propvalues.has_key('id'): raise KeyError, '"id" is reserved' if self.db.journaltag is None: raise hyperdb.DatabaseError, 'Database open read-only' view = self.getview(1) # node must exist & not be retired id = int(nodeid) ndx = view.find(id=id) if ndx < 0: raise IndexError, "%s has no node %s" % (self.classname, nodeid) row = view[ndx] if row._isdel: raise IndexError, "%s has no node %s" % (self.classname, nodeid) oldnode = self.uncommitted.setdefault(id, {}) changes = {}
abbc2c6f076f533f0b88cea6324a837392869dc1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/abbc2c6f076f533f0b88cea6324a837392869dc1/back_metakit.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 12, 2890, 16, 756, 350, 16, 2826, 5986, 2372, 4672, 353, 2704, 273, 374, 309, 2270, 2372, 18, 5332, 67, 856, 2668, 7, 5127, 12917, 11, 4672, 353, 2704, 273, 404, 1464, 2270, 2372,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 12, 2890, 16, 756, 350, 16, 2826, 5986, 2372, 4672, 353, 2704, 273, 374, 309, 2270, 2372, 18, 5332, 67, 856, 2668, 7, 5127, 12917, 11, 4672, 353, 2704, 273, 404, 1464, 2270, 2372,...
There are no rational points with x-cordinate 3.
There are no rational points with x-coordinate 3.
def lift_x(self, x, all=False): """ Given the x-coordinate of a point on the curve, use the defining polynomial to find all affine points on this curve with the given x-coordinate. EXAMPLES: sage: E = EllipticCurve('37a'); E Elliptic Curve defined by y^2 + y = x^3 - x over Rational Field sage: E.lift_x(1) (1 : 0 : 1) sage: E.lift_x(2) (2 : 2 : 1) sage: E.lift_x(1/4, all=True) [(1/4 : -3/8 : 1), (1/4 : -5/8 : 1)] There are no rational points with x-cordinate 3. sage: E.lift_x(3) Traceback (most recent call last): ... ValueError: No point with x-coordinate 3 on Elliptic Curve defined by y^2 + y = x^3 - x over Rational Field However, there are two such points in $E(\R)$: sage: E.change_ring(RR).lift_x(3, all=True) [(3.00000000000000 : 4.42442890089805 : 1.00000000000000), (3.00000000000000 : -5.42442890089805 : 1.00000000000000)] And of course it always works in $E(\C)$: sage: E.change_ring(RR).lift_x(.5, all=True) [] sage: E.change_ring(CC).lift_x(.5) (0.500000000000000 : -0.500000000000000 + 0.353553390593274*I : 1.00000000000000) We can perform these operations over finite fields too: sage: E = E.change_ring(GF(17)); E Elliptic Curve defined by y^2 + y = x^3 + 16*x over Finite Field of size 17 sage: E.lift_x(7) (7 : 11 : 1) sage: E.lift_x(3) Traceback (most recent call last): ... ValueError: No point with x-coordinate 3 on Elliptic Curve defined by y^2 + y = x^3 + 16*x over Finite Field of size 17 Note that there is only one lift with x-coordinate 10 in $E(\F_{17})$. sage: E.lift_x(10, all=True) [(10 : 8 : 1)] We can lift over more exotic rings too. sage: E = EllipticCurve('37a'); sage: E.lift_x(pAdicField(17, 5)(6)) (6 + O(17^5) : 2 + 16*17 + 16*17^2 + 16*17^3 + 16*17^4 + O(17^5) : 1 + O(17^5)) sage: K.<t> = PowerSeriesRing(QQ, 't', 5) sage: E.lift_x(1+t) (1 + t : 2*t - t^2 + 5*t^3 - 21*t^4 + O(t^5) : 1) sage: K.<a> = GF(16) sage: E = E.change_ring(K) sage: E.lift_x(a^3) (a^3 : a^3 + a : 1) AUTHOR: Robert Bradshaw, 2007-04-24 TEST: sage: E = EllipticCurve('37a').short_weierstrass_model().change_ring(GF(17)) sage: E.lift_x(3, all=True) [] sage: E.lift_x(7, all=True) [(7 : 3 : 1), (7 : 14 : 1)] """ a1, a2, a3, a4, a6 = self.ainvs() f = ((x + a2) * x + a4) * x + a6 K = self.base_ring() x += K(0) one = x.parent()(1) if a1.is_zero() and a3.is_zero(): if f.is_square(): if all: ys = f.sqrt(all=True) return [self.point([x, y, one], check=False) for y in ys] else: return self.point([x, f.sqrt(), one], check=False) else: b = (a1*x + a3) D = b*b + 4*f if K.characteristic() == 2: R = PolynomialRing(K, 'y') F = R([-f,b,1]) ys = F.roots(multiplicities=False) if all: return [self.point([x, y, one], check=False) for y in ys] elif len(ys) > 0: return self.point([x, ys[0], one], check=False) elif D.is_square(): if all: return [self.point([x, (-b+d)/2, one], check=False) for d in D.sqrt(all=True)] else: return self.point([x, (-b+D.sqrt())/2, one], check=False) if all: return [] else: raise ValueError, "No point with x-coordinate %s on %s"%(x, self)
4f0514b45a47cdf92a6d781876aa0dd2f3653f54 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/4f0514b45a47cdf92a6d781876aa0dd2f3653f54/ell_generic.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 28080, 67, 92, 12, 2890, 16, 619, 16, 777, 33, 8381, 4672, 3536, 16803, 326, 619, 17, 29191, 434, 279, 1634, 603, 326, 8882, 16, 999, 326, 9364, 16991, 358, 1104, 777, 28381, 3143, 603...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 28080, 67, 92, 12, 2890, 16, 619, 16, 777, 33, 8381, 4672, 3536, 16803, 326, 619, 17, 29191, 434, 279, 1634, 603, 326, 8882, 16, 999, 326, 9364, 16991, 358, 1104, 777, 28381, 3143, 603...
self.file.write(line)
self.__write(line)
def read_lines_to_eof(self): """Internal: read lines until EOF.""" while 1: line = self.fp.readline() if not line: self.done = -1 break self.file.write(line)
4511768299263013e8a65822bca79ed7fc692617 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/4511768299263013e8a65822bca79ed7fc692617/cgi.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 67, 3548, 67, 869, 67, 9339, 12, 2890, 4672, 3536, 3061, 30, 855, 2362, 3180, 6431, 12123, 1323, 404, 30, 980, 273, 365, 18, 7944, 18, 896, 1369, 1435, 309, 486, 980, 30, 365, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 67, 3548, 67, 869, 67, 9339, 12, 2890, 4672, 3536, 3061, 30, 855, 2362, 3180, 6431, 12123, 1323, 404, 30, 980, 273, 365, 18, 7944, 18, 896, 1369, 1435, 309, 486, 980, 30, 365, 1...
LEVELS = { 1: { 'aliens': [Alien(110) for x in range(4)],
def instanciate_levels(): return { 1: { 'aliens': [Alien(110) for x in range(4)],
def _calculate_destination(self, mouse_pos): """ Figure out the destination coords for the bullet, starting from the center of the screen through the point the player click, to the edge of the screen. """ dx,dy = mouse_pos
598c713050b0105831acbfc64205fe57c57f11a6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13800/598c713050b0105831acbfc64205fe57c57f11a6/spaceswarm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 11162, 67, 10590, 12, 2890, 16, 7644, 67, 917, 4672, 3536, 18818, 596, 326, 2929, 6074, 364, 326, 31650, 16, 5023, 628, 326, 4617, 434, 326, 5518, 3059, 326, 1634, 326, 7291, 4682, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 389, 11162, 67, 10590, 12, 2890, 16, 7644, 67, 917, 4672, 3536, 18818, 596, 326, 2929, 6074, 364, 326, 31650, 16, 5023, 628, 326, 4617, 434, 326, 5518, 3059, 326, 1634, 326, 7291, 4682, ...
class TrapLong(int): def __index__(self): return self
def __index__(self): return self
737315e05a662226311b5fc5c833c831a9bf7a94 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12029/737315e05a662226311b5fc5c833c831a9bf7a94/test_index.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1615, 972, 12, 2890, 4672, 327, 365, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1615, 972, 12, 2890, 4672, 327, 365, 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...
nodenetwork.update(optional_vals)
nodenetwork.update(update_fields)
def call(self, auth, nodenetwork_id_or_hostname, optional_vals=None): if filter(lambda field: field not in self.update_fields, optional_vals):
432c25cdba91732f8c08cb9ebb86c68817c99bba /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7598/432c25cdba91732f8c08cb9ebb86c68817c99bba/AdmUpdateNodeNetwork.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 745, 12, 2890, 16, 1357, 16, 14003, 275, 1572, 67, 350, 67, 280, 67, 10358, 16, 3129, 67, 4524, 33, 7036, 4672, 309, 1034, 12, 14661, 652, 30, 652, 486, 316, 365, 18, 2725, 67, 2821,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 745, 12, 2890, 16, 1357, 16, 14003, 275, 1572, 67, 350, 67, 280, 67, 10358, 16, 3129, 67, 4524, 33, 7036, 4672, 309, 1034, 12, 14661, 652, 30, 652, 486, 316, 365, 18, 2725, 67, 2821,...
res = DIDLLite.Resource(self.location, 'http-get:*:video/x-m4a:*')
res = DIDLLite.Resource(self.location, 'http-get:*:video/mp4:*')
def __init__(self, parent_id, id, title=None, url=None, duration=None, size=None): self.parentid = parent_id self.update_id = 0 self.id = id self.location = url self.name = title
0675254bb05ff51f5bd2c6709b8830325d52b7f5 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11626/0675254bb05ff51f5bd2c6709b8830325d52b7f5/ted_storage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 982, 67, 350, 16, 612, 16, 2077, 33, 7036, 16, 880, 33, 7036, 16, 3734, 33, 7036, 16, 963, 33, 7036, 4672, 365, 18, 31232, 273, 982, 67, 350, 365, 18...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 982, 67, 350, 16, 612, 16, 2077, 33, 7036, 16, 880, 33, 7036, 16, 3734, 33, 7036, 16, 963, 33, 7036, 4672, 365, 18, 31232, 273, 982, 67, 350, 365, 18...
customMsgBox(self, '%s:\n%s\n%s' % sys.exc_info(), 'error')
customMsgBox(self, '%s:\n%s\n%s' % sys.exc_info(), 'error')
def on_file_create(self, event): if self.project <> None: go_ahead = true dlg = wxFileDialog (self, 'Create new file', self.project.directory, '', '*.txt', wxSAVE|wxOVERWRITE_PROMPT) if dlg.ShowModal() == wxID_OK: file = dlg.GetPath() else: go_ahead = false dlg.Destroy()
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, 603, 67, 768, 67, 2640, 12, 2890, 16, 871, 4672, 309, 365, 18, 4406, 2813, 599, 30, 1960, 67, 11617, 273, 638, 25840, 273, 7075, 812, 6353, 261, 2890, 16, 296, 1684, 394, 585, 2187, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 768, 67, 2640, 12, 2890, 16, 871, 4672, 309, 365, 18, 4406, 2813, 599, 30, 1960, 67, 11617, 273, 638, 25840, 273, 7075, 812, 6353, 261, 2890, 16, 296, 1684, 394, 585, 2187, ...
return self.vformat(b['display']['composite_template'], [], kwargs)
if key in self.composite_values: return self.composite_values[key] self.composite_values[key] = 'RECURSIVE_COMPOSITE FIELD (S2D) ' + key self.composite_values[key] = \ self.vformat(b['display']['composite_template'], [], kwargs) return self.composite_values[key]
def get_value(self, key, args, kwargs): try: b = self.book.get_user_metadata(key, False) key = key.lower() if b is not None and b['datatype'] == 'composite': return self.vformat(b['display']['composite_template'], [], kwargs) if kwargs[key]: return self.sanitize(kwargs[key.lower()]) return '' except: return ''
8a94c2194eada809060d3918d501f7029c0947ff /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9125/8a94c2194eada809060d3918d501f7029c0947ff/save_to_disk.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 1132, 12, 2890, 16, 498, 16, 833, 16, 1205, 4672, 775, 30, 324, 273, 365, 18, 3618, 18, 588, 67, 1355, 67, 4165, 12, 856, 16, 1083, 13, 498, 273, 498, 18, 8167, 1435, 309,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 1132, 12, 2890, 16, 498, 16, 833, 16, 1205, 4672, 775, 30, 324, 273, 365, 18, 3618, 18, 588, 67, 1355, 67, 4165, 12, 856, 16, 1083, 13, 498, 273, 498, 18, 8167, 1435, 309,...
if not (uid.is_module() or uid.is_class()): continue n += 1
if (uid.is_module() or uid.is_class()): if self._create_private_docs: n += 1 elif uid.is_public(): n += 1
def num_files(self): """ @return: The number of files that this C{HTMLFormatter} will generate. @rtype: C{int} """ # Basic files (index.html, tree, indices, help, css, toc, # toc-everything, frames, base directory index.html, base # directory css) if self._create_private_docs: n = 12 else: n = 8
dad6dd09c82d3878a78d977cc13da79d4420db2b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/dad6dd09c82d3878a78d977cc13da79d4420db2b/html.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 818, 67, 2354, 12, 2890, 4672, 3536, 632, 2463, 30, 1021, 1300, 434, 1390, 716, 333, 385, 95, 4870, 5074, 97, 903, 2103, 18, 632, 86, 723, 30, 385, 95, 474, 97, 3536, 468, 7651, 1390...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 818, 67, 2354, 12, 2890, 4672, 3536, 632, 2463, 30, 1021, 1300, 434, 1390, 716, 333, 385, 95, 4870, 5074, 97, 903, 2103, 18, 632, 86, 723, 30, 385, 95, 474, 97, 3536, 468, 7651, 1390...
EditDesc(cl.name, closed="checked")
if not cl.original_author: EditDesc(cl.name, closed="checked")
def submit(ui, repo, *pats, **opts): """submit change to remote repository Submits change to remote repository. Bails out if the local repository is not in sync with the remote one. """ CheckContributor(ui, repo) repo.ui.quiet = True if not opts["no_incoming"] and Incoming(ui, repo, opts): return "local repository out of date; must sync before submit" cl, err = CommandLineCL(ui, repo, pats, opts) if err != "": return err about = "" if cl.reviewer: about += "R=" + JoinComma([CutDomain(s) for s in cl.reviewer]) + "\n" if opts.get('tbr'): tbr = SplitCommaSpace(opts.get('tbr')) cl.reviewer = Add(cl.reviewer, tbr) about += "TBR=" + JoinComma([CutDomain(s) for s in tbr]) + "\n" if cl.cc: about += "CC=" + JoinComma([CutDomain(s) for s in cl.cc]) + "\n" if not cl.reviewer: return "no reviewers listed in CL" if not cl.local: return "cannot submit non-local CL" # upload, to sync current patch and also get change number if CL is new. cl.Upload(ui, repo) about += "%s%s\n" % (server_url_base, cl.name) # submit changes locally date = opts.get('date') if date: opts['date'] = util.parsedate(date) opts['message'] = cl.desc.rstrip() + "\n\n" + about m = match.exact(repo.root, repo.getcwd(), cl.files) node = repo.commit(opts['message'], opts.get('user'), opts.get('date'), m) if not node: return "nothing changed" log = repo.changelog rev = log.rev(node) parents = log.parentrevs(rev) if (rev-1 not in parents and (parents == (nullrev, nullrev) or len(log.heads(log.node(parents[0]))) > 1 and (parents[1] == nullrev or len(log.heads(log.node(parents[1]))) > 1))): repo.rollback() return "local repository out of date (created new head); must sync before submit" # push changes to remote. # if it works, we're committed. # if not, roll back other = getremote(ui, repo, opts) r = repo.push(other, False, None) if r == 0: repo.rollback() return "local repository out of date; must sync before submit" # we're committed. upload final patch, close review, add commit message changeURL = short(node) url = other.url() m = re.match("^https?://([^@/]+@)?([^.]+)\.googlecode\.com/hg/", url) if m: changeURL = "http://code.google.com/p/%s/source/detail?r=%s" % (m.group(2), changeURL) else: print >>sys.stderr, "URL: ", url pmsg = "*** Submitted as " + changeURL + " ***\n\n" + opts['message'] PostMessage(cl.name, pmsg, send_mail="checked") EditDesc(cl.name, closed="checked") cl.Delete(ui, repo)
552488c0a2c9ad31e3e6aba82b8e2a038e34c4ef /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5761/552488c0a2c9ad31e3e6aba82b8e2a038e34c4ef/codereview.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4879, 12, 4881, 16, 3538, 16, 380, 84, 2323, 16, 2826, 4952, 4672, 3536, 9297, 2549, 358, 2632, 3352, 225, 2592, 22679, 2549, 358, 2632, 3352, 18, 605, 15208, 596, 309, 326, 1191, 3352, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4879, 12, 4881, 16, 3538, 16, 380, 84, 2323, 16, 2826, 4952, 4672, 3536, 9297, 2549, 358, 2632, 3352, 225, 2592, 22679, 2549, 358, 2632, 3352, 18, 605, 15208, 596, 309, 326, 1191, 3352, ...
speed('fastest')
speed("fastest") fill(1) for i in range(4): circle(50,90) right(90) forward(30) right(90) color("yellow") fill(0) left(90) up() forward(30)
def demo2(): # exercises some new and improved features speed('fast') width(3) # draw a segmented half-circle setheading(towards(0,0)) x,y = position() r = (x**2+y**2)**.5/2.0 right(90) pendown = True for i in range(18): if pendown: up() pendown = False else: down() pendown = True circle(r,10) sleep(2) reset() left(90) # draw a series of triangles l = 10 color("green") width(3) left(180) sp = 5 for i in range(-2,16): if i > 0: color(1.0-0.05*i,0,0.05*i) fill(1) color("green") for j in range(3): forward(l) left(120) l += 10 left(15) if sp > 0: sp = sp-1 speed(speeds[sp]) color(0.25,0,0.75) fill(0) color("green") left(130) up() forward(90) color("red") speed('fastest') down(); # create a second turtle and make the original pursue and catch it turtle=Turtle() turtle.reset() turtle.left(90) turtle.speed('normal') turtle.up() turtle.goto(280,40) turtle.left(24) turtle.down() turtle.speed('fast') turtle.color("blue") turtle.width(2) speed('fastest') # turn default turtle towards new turtle object setheading(towards(turtle)) while ( abs(position()[0]-turtle.position()[0])>4 or abs(position()[1]-turtle.position()[1])>4): turtle.forward(3.5) turtle.left(0.6) # turn default turtle towards new turtle object setheading(towards(turtle)) forward(4) write("CAUGHT! ", move=True)
06c68b800ca3e31d2551923083ce8294ab94cb24 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/06c68b800ca3e31d2551923083ce8294ab94cb24/turtle.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 21477, 22, 13332, 468, 431, 12610, 6141, 2690, 394, 471, 13069, 2155, 4467, 8632, 2668, 8076, 6134, 1835, 12, 23, 13, 225, 468, 3724, 279, 3267, 329, 8816, 17, 18970, 444, 19948, 12, 310...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 21477, 22, 13332, 468, 431, 12610, 6141, 2690, 394, 471, 13069, 2155, 4467, 8632, 2668, 8076, 6134, 1835, 12, 23, 13, 225, 468, 3724, 279, 3267, 329, 8816, 17, 18970, 444, 19948, 12, 310...
'Raises a Fault if the method does not exist.'))
'Raises a Fault if the method does not exist'), [[ARRAY, STRING]])
def __init__(self, add_system_methods=1, max_request=50000): self.funcs={} self.max_request=max_request if add_system_methods: self.register_function(self.funcs.keys, 'system.listMethods', 'Lists the names of registered methods') # using lambdas to keep the method signature accurate self.register_function(lambda method: self._methodSignature(method), 'system.methodSignature', ('Returns the signature of method requested. '\ 'Raises a Fault if the method does not exist.')) self.register_function(lambda method: self._methodHelp(method), 'system.methodHelp', ("Gives help for the method requested. "\ "Raises a Fault if the method does not exist."))
df3e41bbe839635191ae04035d59c51dc75a9a4a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2304/df3e41bbe839635191ae04035d59c51dc75a9a4a/xmlrpchandler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 527, 67, 4299, 67, 5163, 33, 21, 16, 943, 67, 2293, 33, 25, 2787, 4672, 365, 18, 17728, 12938, 365, 18, 1896, 67, 2293, 33, 1896, 67, 2293, 309, 527, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 527, 67, 4299, 67, 5163, 33, 21, 16, 943, 67, 2293, 33, 25, 2787, 4672, 365, 18, 17728, 12938, 365, 18, 1896, 67, 2293, 33, 1896, 67, 2293, 309, 527, ...
def tearDown(self): shutil.rmtree(self.tmpdir)
def setUp(self): self.tmpdir = self.mktemp() os.mkdir(self.tmpdir) os.mkdir(os.path.join(self.tmpdir, 'ned')) open(os.path.join(self.tmpdir, 'file.txt'), 'w').write('wobble\n') self.root = osfs.OSDirectory(self.tmpdir)
3697019bf3c55ab7b309fd15522a7702500b94f8 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12595/3697019bf3c55ab7b309fd15522a7702500b94f8/test_vfs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24292, 12, 2890, 4672, 365, 18, 5645, 1214, 273, 365, 18, 24816, 5814, 1435, 1140, 18, 26686, 12, 2890, 18, 5645, 1214, 13, 1140, 18, 26686, 12, 538, 18, 803, 18, 5701, 12, 2890, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 365, 18, 5645, 1214, 273, 365, 18, 24816, 5814, 1435, 1140, 18, 26686, 12, 2890, 18, 5645, 1214, 13, 1140, 18, 26686, 12, 538, 18, 803, 18, 5701, 12, 2890, 18, ...
Separates out the command-line option volume range into distinct numbers @param vol_range: volume range as x:y @return: vol_start = x, vol_end = y """ parts = vol_range.split(":")
Separates out the command-line option volume range into distinct numbers @param vol_range: volume range as x:y @return: vol_start = x, vol_end = y """ parts = vol_range.split(":")
def parseVolRange(self, vol_range): """
046a3ba382598b894441b09841ad1e310d49cc37 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7241/046a3ba382598b894441b09841ad1e310d49cc37/Recon.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 17431, 2655, 12, 2890, 16, 6626, 67, 3676, 4672, 3536, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 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, 1109, 17431, 2655, 12, 2890, 16, 6626, 67, 3676, 4672, 3536, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
t_ref = lltype.malloc(TIME_TP.TO, flavor='raw')
t_ref = lltype.malloc(TIME_TP.TO, 1, flavor='raw')
def ctime(space, w_seconds=None): """ctime([seconds]) -> string Convert a time in seconds since the Epoch to a string in local time. This is equivalent to asctime(localtime(seconds)). When the time tuple is not present, current time as returned by localtime() is used.""" seconds = _get_inttime(space, w_seconds) t_ref = lltype.malloc(TIME_TP.TO, flavor='raw') t_ref[0] = seconds p = c_ctime(t_ref) lltype.free(t_ref, flavor='raw') if not p: raise OperationError(space.w_ValueError, space.wrap("unconvertible time")) return space.wrap(rffi.charp2str(p)[:-1]) # get rid of new line
e722617a4c2cee80614fd18b396c12b01307e480 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6934/e722617a4c2cee80614fd18b396c12b01307e480/interp_time.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 276, 957, 12, 2981, 16, 341, 67, 7572, 33, 7036, 4672, 3536, 21261, 3816, 7572, 5717, 317, 533, 225, 4037, 279, 813, 316, 3974, 3241, 326, 512, 6127, 358, 279, 533, 316, 1191, 813, 18,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 276, 957, 12, 2981, 16, 341, 67, 7572, 33, 7036, 4672, 3536, 21261, 3816, 7572, 5717, 317, 533, 225, 4037, 279, 813, 316, 3974, 3241, 326, 512, 6127, 358, 279, 533, 316, 1191, 813, 18,...
Returs a list of Cell instances.
Return a list of Cell instances.
def get_in_region(self, x1, y1, x2, y2): '''Return cells (in [column][row]) that are within the pixel bounds specified by the bottom-left (x1, y1) and top-right (x2, y2) corners.
018ff9abe98551c7883ae614cde727dc57df9d62 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7473/018ff9abe98551c7883ae614cde727dc57df9d62/tiles.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 267, 67, 6858, 12, 2890, 16, 619, 21, 16, 677, 21, 16, 619, 22, 16, 677, 22, 4672, 9163, 990, 5983, 261, 267, 306, 2827, 6362, 492, 5717, 716, 854, 3470, 326, 4957, 4972, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 267, 67, 6858, 12, 2890, 16, 619, 21, 16, 677, 21, 16, 619, 22, 16, 677, 22, 4672, 9163, 990, 5983, 261, 267, 306, 2827, 6362, 492, 5717, 716, 854, 3470, 326, 4957, 4972, ...
return
i += 1 continue
def convert_latexcommand_index(document): "Convert from LatexCommand form to collapsable form." i = 0 r1 = re.compile('name "(.*)"') while True: i = find_token(document.body, "\\begin_inset CommandInset index", i) if i == -1: return if document.body[i + 1] != "LatexCommand index": # Might also be index_print return j = find_end_of_inset(document.body, i + 2) if j == -1: document.warning("Unable to find end of index inset at line " + i + "!") i += 2 continue m = r1.match(document.body[i + 2]) if m == None: document.warning("Unable to match: " + document.body[i+2]) # this can happen with empty index insets! linelist = [""] else: fullcontent = m.group(1) linelist = latex2lyx(fullcontent) #document.warning(fullcontent) linelist = ["\\begin_inset Index", "status collapsed", "\\begin_layout Standard", ""] + \ linelist + ["\\end_layout"] document.body[i : j] = linelist i += len(linelist) - (j - i)
3d018a6d942ca600ff7215966e0065b92df84bcd /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7514/3d018a6d942ca600ff7215966e0065b92df84bcd/lyx_1_6.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1765, 67, 26264, 3076, 67, 1615, 12, 5457, 4672, 315, 2723, 628, 11134, 338, 2189, 646, 358, 9262, 87, 429, 646, 1199, 277, 273, 374, 436, 21, 273, 283, 18, 11100, 2668, 529, 315, 7444...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1765, 67, 26264, 3076, 67, 1615, 12, 5457, 4672, 315, 2723, 628, 11134, 338, 2189, 646, 358, 9262, 87, 429, 646, 1199, 277, 273, 374, 436, 21, 273, 283, 18, 11100, 2668, 529, 315, 7444...
if sys.platform == 'sunos4':
if platform == 'sunos4':
def detect_modules(self): # Ensure that /usr/local is always used if '/usr/local/lib' not in self.compiler.library_dirs: self.compiler.library_dirs.append('/usr/local/lib') if '/usr/local/include' not in self.compiler.include_dirs: self.compiler.include_dirs.append( '/usr/local/include' )
1cfa0e8295f3d8749eba860c3e99f12d18bfbee3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/1cfa0e8295f3d8749eba860c3e99f12d18bfbee3/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5966, 67, 6400, 12, 2890, 4672, 468, 7693, 716, 342, 13640, 19, 3729, 353, 3712, 1399, 309, 1173, 13640, 19, 3729, 19, 2941, 11, 486, 316, 365, 18, 9576, 18, 12083, 67, 8291, 30, 365, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5966, 67, 6400, 12, 2890, 4672, 468, 7693, 716, 342, 13640, 19, 3729, 353, 3712, 1399, 309, 1173, 13640, 19, 3729, 19, 2941, 11, 486, 316, 365, 18, 9576, 18, 12083, 67, 8291, 30, 365, ...
return record_dict
return record_dict
def _create_record(self, model, fields): record_dict = {} for field_name, expression in fields.items(): field_value = self._eval_field(model, field_name, expression) record_dict[field_name] = field_value return record_dict
e05850f9e1a2a186155d8016b54b4394e5897dad /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/e05850f9e1a2a186155d8016b54b4394e5897dad/yaml_import.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2640, 67, 3366, 12, 2890, 16, 938, 16, 1466, 4672, 1409, 67, 1576, 273, 2618, 364, 652, 67, 529, 16, 2652, 316, 1466, 18, 3319, 13332, 652, 67, 1132, 273, 365, 6315, 8622, 67, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2640, 67, 3366, 12, 2890, 16, 938, 16, 1466, 4672, 1409, 67, 1576, 273, 2618, 364, 652, 67, 529, 16, 2652, 316, 1466, 18, 3319, 13332, 652, 67, 1132, 273, 365, 6315, 8622, 67, 1...
class TestProgram:
class TestProgram(object):
def run(self, test): "Run the given test case or test suite." result = self._makeResult() startTime = time.time() test(result) stopTime = time.time() timeTaken = stopTime - startTime result.printErrors() self.stream.writeln(result.separator2) run = result.testsRun self.stream.writeln("Ran %d test%s in %.3fs" % (run, run != 1 and "s" or "", timeTaken)) self.stream.writeln() if not result.wasSuccessful(): self.stream.write("FAILED (") failed, errored = map(len, (result.failures, result.errors)) if failed: self.stream.write("failures=%d" % failed) if errored: if failed: self.stream.write(", ") self.stream.write("errors=%d" % errored) self.stream.writeln(")") else: self.stream.writeln("OK") return result
dae1a6a4889a67d29c7e1638472625cc4ca3cdf3 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8546/dae1a6a4889a67d29c7e1638472625cc4ca3cdf3/unittest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 16, 1842, 4672, 315, 1997, 326, 864, 1842, 648, 578, 1842, 11371, 1199, 563, 273, 365, 6315, 6540, 1253, 1435, 8657, 273, 813, 18, 957, 1435, 1842, 12, 2088, 13, 2132, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 16, 1842, 4672, 315, 1997, 326, 864, 1842, 648, 578, 1842, 11371, 1199, 563, 273, 365, 6315, 6540, 1253, 1435, 8657, 273, 813, 18, 957, 1435, 1842, 12, 2088, 13, 2132, ...
def handle_error(self):
def handle_error(self, request, client_address):
def handle_error(self): print '-'*40 import traceback traceback.print_exc() print '-'*40
818a69aac79a346a82543304173f88259bfbee1b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10522/818a69aac79a346a82543304173f88259bfbee1b/SSLServer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 67, 1636, 12, 2890, 16, 590, 16, 1004, 67, 2867, 4672, 1172, 4014, 14, 7132, 1930, 10820, 10820, 18, 1188, 67, 10075, 1435, 1172, 4014, 14, 7132, 2, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 67, 1636, 12, 2890, 16, 590, 16, 1004, 67, 2867, 4672, 1172, 4014, 14, 7132, 1930, 10820, 10820, 18, 1188, 67, 10075, 1435, 1172, 4014, 14, 7132, 2, -100, -100, -100, -100, -100, ...
File /r dist\*.*
!define PY2EXE_DIR "%(py2exe_dir)s" File /r "${PY2EXE_DIR}\*"
def py2exe(dist_dir, dist_build): sys.argv[1:2] = ['py2exe'] sys.argv.append ( "--verbose" ) print sys.argv setup(name=APP_TITLE, version=APP_VERSION, description='Find Subtitles for your Videos', author='Ivan Garcia', author_email='contact@ivangarcia.org', url='http://www.subdownloader.net', #includes=['FileManagement', 'cli', 'gui', 'languages', 'modules'], package_dir={'subdownloader':'.'}, zipfile = None, data_files=[ ('gui/images', ['gui/images/splash.png']),#glob.glob('gui/images/*.png')+glob.glob('gui/images/*.ico')+glob.glob('gui/images/*.jpg')+['gui/images/subd_splash.gif']), #('gui/images/flags', glob.glob('gui/images/flags/*.gif')), ('languages/lm', glob.glob('languages/lm/*.lm')), ('', ['README']) ], windows=[{ 'script':'run.py', 'icon_resources':[(1, 'gui/images/icon32.ico')]}], #console=[{'script':'run.py -cli'}], options = { 'py2exe' : {'compressed': 1, 'optimize' : 2, 'includes' : [ 'sip', 'subdownloader.modules.configuration.*', ], 'excludes' : ["Tkconstants", "Tkinter", "tcl", "_imagingtk", "ImageTk", "FixTk" ], 'dist_dir' : dist_dir, #'bundle_files': 1, } } )
51953b6f227877aa63affb8f5c02deb1c7384cb9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1108/51953b6f227877aa63affb8f5c02deb1c7384cb9/windows_installer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2395, 22, 14880, 12, 4413, 67, 1214, 16, 2411, 67, 3510, 4672, 2589, 18, 19485, 63, 21, 30, 22, 65, 273, 10228, 2074, 22, 14880, 3546, 2589, 18, 19485, 18, 6923, 261, 5238, 11369, 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, 2395, 22, 14880, 12, 4413, 67, 1214, 16, 2411, 67, 3510, 4672, 2589, 18, 19485, 63, 21, 30, 22, 65, 273, 10228, 2074, 22, 14880, 3546, 2589, 18, 19485, 18, 6923, 261, 5238, 11369, 6, ...
_('Ticket Comment History'))
_("Ticket Comment History"))
def get_text(version): try: text = history[version]['value'] return text and text.splitlines() or [] except KeyError: raise ResourceNotFound(_('No version %(version)d for comment ' '%(cnum)d on ticket #%(ticket)s', version=version, cnum=cnum, ticket=ticket.id))
8a7505f666e8590328936fd32f0bc362d6e2a6a0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2831/8a7505f666e8590328936fd32f0bc362d6e2a6a0/web_ui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 955, 12, 1589, 4672, 775, 30, 977, 273, 4927, 63, 1589, 23962, 1132, 3546, 327, 977, 471, 977, 18, 4939, 3548, 1435, 578, 5378, 1335, 4999, 30, 1002, 2591, 2768, 24899, 2668, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 955, 12, 1589, 4672, 775, 30, 977, 273, 4927, 63, 1589, 23962, 1132, 3546, 327, 977, 471, 977, 18, 4939, 3548, 1435, 578, 5378, 1335, 4999, 30, 1002, 2591, 2768, 24899, 2668, ...
ki[0,0] = s0 ki[1,0] = s1 ki[2,0] = s2 ki[3,0] = s3
ki[0, 0] = s0 ki[1, 0] = s1 ki[2, 0] = s2 ki[3, 0] = s3
def key_schedule(self, kj, i): """ Return $k_i$ for a given $i$ and $k_j$ with $j = i-1$. TESTS: sage: sr = mq.SR(10,4,4,8, star=True, allow_zero_inversions=True) sage: ki = sr.state_array() sage: for i in range(10): ... ki = sr.key_schedule(ki,i+1) sage: print sr.hex_str_matrix(ki) B4 3E 23 6F EF 92 E9 8F 5B E2 51 18 CB 11 CF 8E """ if i < 0: raise TypeError, "i must be >= i"
cd82551727ddbae04c5b28f55b59ec14654a84ab /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/cd82551727ddbae04c5b28f55b59ec14654a84ab/sr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 498, 67, 10676, 12, 2890, 16, 417, 78, 16, 277, 4672, 3536, 2000, 271, 79, 67, 77, 8, 364, 279, 864, 271, 77, 8, 471, 271, 79, 67, 78, 8, 598, 271, 78, 273, 277, 17, 21, 8, 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, 498, 67, 10676, 12, 2890, 16, 417, 78, 16, 277, 4672, 3536, 2000, 271, 79, 67, 77, 8, 364, 279, 864, 271, 77, 8, 471, 271, 79, 67, 78, 8, 598, 271, 78, 273, 277, 17, 21, 8, 18,...
self.lookupFunctionNames ()
self.lookupFunctionNames (props)
def initFromStrings (self, lines, props):
16c76ad61122d4de2a1adf56a24d755d2c6f00b3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11834/16c76ad61122d4de2a1adf56a24d755d2c6f00b3/profile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1208, 1265, 7957, 261, 2890, 16, 2362, 16, 3458, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1208, 1265, 7957, 261, 2890, 16, 2362, 16, 3458, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
for i in range(len(longopts)): if longopts[i].startswith(opt): break else:
possibilities = [o for o in longopts if o.startswith(opt)] if not possibilities:
def long_has_args(opt, longopts): for i in range(len(longopts)): if longopts[i].startswith(opt): break else: raise GetoptError('option --%s not recognized' % opt, opt) # opt is a prefix of longopts[i]; find j s.t. opt is a prefix of # each possibility in longopts[i:j] j = i+1 while j < len(longopts) and longopts[j].startswith(opt): j += 1 possibilities = longopts[i:j] # Is there an exact match? if opt in possibilities: return 0, opt elif opt + '=' in possibilities: return 1, opt # No exact match, so better be unique. if len(possibilities) > 1: # XXX since possibilities contains all valid continuations, might be # nice to work them into the error msg raise GetoptError('option --%s not a unique prefix' % opt, opt) assert len(possibilities) == 1 unique_match = possibilities[0] has_arg = unique_match.endswith('=') if has_arg: unique_match = unique_match[:-1] return has_arg, unique_match
d31b6328e180af4b10e2c942a1437d5b8cb2c2e6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/d31b6328e180af4b10e2c942a1437d5b8cb2c2e6/getopt.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1525, 67, 5332, 67, 1968, 12, 3838, 16, 1525, 4952, 4672, 28550, 273, 306, 83, 364, 320, 316, 1525, 4952, 309, 320, 18, 17514, 1918, 12, 3838, 25887, 309, 486, 28550, 30, 1002, 968, 38...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1525, 67, 5332, 67, 1968, 12, 3838, 16, 1525, 4952, 4672, 28550, 273, 306, 83, 364, 320, 316, 1525, 4952, 309, 320, 18, 17514, 1918, 12, 3838, 25887, 309, 486, 28550, 30, 1002, 968, 38...
security.declareProtected(permissions.ModifyPortalContent,
security.declareProtected(CMFCorePermissions.ModifyPortalContent,
def keys(self): return self._names
67576cc5acaaf506c58ee3fea91da40c0a6516a2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12165/67576cc5acaaf506c58ee3fea91da40c0a6516a2/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1311, 12, 2890, 4672, 327, 365, 6315, 1973, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1311, 12, 2890, 4672, 327, 365, 6315, 1973, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
localeSet = [localeSet]
if localeSet is None or len(localeSet.strip()) == 0: localeSet = [] else: localeSet = [localeSet]
def setLocaleSet(self, localeSet=None, fallback=True): """ Resets the c{I18nManager locale set c{List}.
d8acc1b66d38723b5679ad798b6a7188975dc6ce /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9228/d8acc1b66d38723b5679ad798b6a7188975dc6ce/i18nmanager.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 19848, 694, 12, 2890, 16, 2573, 694, 33, 7036, 16, 5922, 33, 5510, 4672, 3536, 1124, 2413, 326, 276, 95, 45, 2643, 82, 1318, 2573, 444, 276, 95, 682, 5496, 2, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 19848, 694, 12, 2890, 16, 2573, 694, 33, 7036, 16, 5922, 33, 5510, 4672, 3536, 1124, 2413, 326, 276, 95, 45, 2643, 82, 1318, 2573, 444, 276, 95, 682, 5496, 2, -100, -100, -100, -100, ...
if name and line.startswith("{"): infunc=True
if name1 and line.startswith("{"): infunc=1 continue if name2 and line.startswith("{"): infunc=2
def testSourceChecks(self): "Check various source code issues" # We expect a coding style where the functions are named # Object_method, are at the start of the line and have a first # parameter named self. if not os.path.exists("src/apsw.c"): return
f0f139ca1c73176ffc374f8eb6f63ed6e2cd34b3 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/993/f0f139ca1c73176ffc374f8eb6f63ed6e2cd34b3/tests.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 1830, 4081, 12, 2890, 4672, 315, 1564, 11191, 1084, 981, 8296, 6, 468, 1660, 4489, 279, 14848, 2154, 1625, 326, 4186, 854, 4141, 468, 1033, 67, 2039, 16, 854, 622, 326, 787, 434, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 1830, 4081, 12, 2890, 4672, 315, 1564, 11191, 1084, 981, 8296, 6, 468, 1660, 4489, 279, 14848, 2154, 1625, 326, 4186, 854, 4141, 468, 1033, 67, 2039, 16, 854, 622, 326, 787, 434, ...
"PEIM" : ["Peim.h", "DebugLib"],
"PEIM" : ["Peim.h", "DebugLib.h"],
#ifndef _AUTOGENH_${Guid}
286abb1038f54ccc0309eebeb13ebd34344e7508 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/914/286abb1038f54ccc0309eebeb13ebd34344e7508/GenC.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 468, 430, 82, 536, 389, 18909, 16652, 44, 67, 18498, 22549, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 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, 468, 430, 82, 536, 389, 18909, 16652, 44, 67, 18498, 22549, 97, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
print "best: %s cutoff: %s" % (best_10, cutoff)
self.msg("Removing secondary nameservers slower than %0.2fms" % (cutoff))
def DisableDistantServers(self, multiplier=TOO_DISTANT_MULTIPLIER): """Disable servers who's fastest duration is multiplier * average of best 10.""" self.RemoveBrokenServers(delete_unwanted=True) secondaries = self.secondaries best_10 = util.CalculateListAverage([x.fastest_check_duration for x in secondaries[:10]]) cutoff = best_10 * multiplier print "best: %s cutoff: %s" % (best_10, cutoff) for ns in secondaries: if ns.fastest_check_duration > cutoff: self.remove(ns) print "DISTANT: Fastest: %0.2f Avg: %0.2f: %s" % (ns.fastest_check_duration, ns.check_average, ns)
ffb2e75f3eef302a02db34f2f6888839f7696295 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4170/ffb2e75f3eef302a02db34f2f6888839f7696295/nameserver_list.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10639, 5133, 970, 11913, 12, 2890, 16, 15027, 33, 4296, 51, 67, 2565, 15379, 67, 24683, 2053, 654, 4672, 3536, 11879, 7084, 10354, 1807, 4797, 395, 3734, 353, 15027, 380, 8164, 434, 3796, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10639, 5133, 970, 11913, 12, 2890, 16, 15027, 33, 4296, 51, 67, 2565, 15379, 67, 24683, 2053, 654, 4672, 3536, 11879, 7084, 10354, 1807, 4797, 395, 3734, 353, 15027, 380, 8164, 434, 3796, ...
keywords = {'soap_methodName':methodName}
def render(self, request): """Handle a SOAP command.""" data = request.content.read() headers = request.getAllHeaders()
1be05576959fad5334cba2f7a2ddba581a3ebca1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11626/1be05576959fad5334cba2f7a2ddba581a3ebca1/soap_service.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 12, 2890, 16, 590, 4672, 3536, 3259, 279, 16434, 1296, 12123, 501, 273, 590, 18, 1745, 18, 896, 1435, 1607, 273, 590, 18, 588, 1595, 3121, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 12, 2890, 16, 590, 4672, 3536, 3259, 279, 16434, 1296, 12123, 501, 273, 590, 18, 1745, 18, 896, 1435, 1607, 273, 590, 18, 588, 1595, 3121, 1435, 2, -100, -100, -100, -100, -100, ...
for e in log.flushErrors():
for e in twisted.python.log.flushErrors():
def _runTearDown(self, ignored=None): cleanupDeferred = 0 try: d = self.tearDown() if d is not None and isinstance(d, defer.Deferred): d.addErrback(self.deferredError) d.addBoth(self.cleanup) cleanupDeferred = 1 except: testResult.addError(self, self._exc_info()) for e in log.flushErrors(): self.testResult.addError(self, e) if not cleanupDeferred: self.cleanup()
7bc8f9d76b0e495d6867d9fc98d06d7db2d04f5b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/7bc8f9d76b0e495d6867d9fc98d06d7db2d04f5b/unittest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2681, 56, 2091, 4164, 12, 2890, 16, 5455, 33, 7036, 4672, 6686, 16886, 273, 374, 775, 30, 302, 273, 365, 18, 736, 297, 4164, 1435, 309, 302, 353, 486, 599, 471, 1549, 12, 72, 16...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2681, 56, 2091, 4164, 12, 2890, 16, 5455, 33, 7036, 4672, 6686, 16886, 273, 374, 775, 30, 302, 273, 365, 18, 736, 297, 4164, 1435, 309, 302, 353, 486, 599, 471, 1549, 12, 72, 16...
if ret == 1 : if out.find("No output files to be retrieved") != -1 : job.runningJob.warning.append("No output files") if out.find("Output files already retrieved") != -1 : job.runningJob.warning.append("Already retrieved") if out.find("Output not yet Ready") != -1 : job.runningJob.errors.append("Not yet Ready") if ret == 0 and out.find("result: success") == -1 : job.runningJob.errors.append( out ) if job.runningJob.errors is None or job.runningJob.errors == [] : self.logging.debug("Output of %s successfully retrieved" % str(job.runningJob['schedulerId']))
if ret == 1 and \ ( out.find("No output files to be retrieved") != -1 or \ out.find("Output files already retrieved") != -1 ) : self.logging.debug("Purge of %s successfully" % str(obj.runningJob['schedulerId'])) else : obj.runningJob.errors.append(out)
def purgeService( self, obj ): """ Purge job (even bulk) from wms """
db5bc68a73a296563e8769af888171214d3df710 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8886/db5bc68a73a296563e8769af888171214d3df710/SchedulerGLite.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11668, 1179, 12, 365, 16, 1081, 262, 30, 3536, 14466, 908, 1719, 261, 16728, 8280, 13, 628, 341, 959, 3536, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11668, 1179, 12, 365, 16, 1081, 262, 30, 3536, 14466, 908, 1719, 261, 16728, 8280, 13, 628, 341, 959, 3536, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
"CVSRevision":"$Revision: 1.90 $",
"CVSRevision":"$Revision: 1.91 $",
def callingparams(self): """Returns list of parameters to save with results.""" #Test whether k has been set try: self.k except (NameError, AttributeError): self.k=None try: self.mass except (NameError, AttributeError): self.mass=None #Form dictionary of inputs params = {"ystart":self.ystart, "tstart":self.tstart, "tend":self.tend, "tstep_wanted":self.tstep_wanted, "tstep_min":self.tstep_min, "k":self.k, #model dependent params "mass":self.mass, "eps":self.eps, "dxsav":self.dxsav, "solver":self.solver, "classname":self.__class__.__name__, "CVSRevision":"$Revision: 1.90 $", "datetime":datetime.datetime.now() } return params
c888b8fd53c9a7c2b62273bb9c068770404d5ebc /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7283/c888b8fd53c9a7c2b62273bb9c068770404d5ebc/cosmomodels.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4440, 2010, 12, 2890, 4672, 3536, 1356, 666, 434, 1472, 358, 1923, 598, 1686, 12123, 468, 4709, 2856, 417, 711, 2118, 444, 775, 30, 365, 18, 79, 1335, 261, 461, 668, 16, 6394, 4672, 36...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4440, 2010, 12, 2890, 4672, 3536, 1356, 666, 434, 1472, 358, 1923, 598, 1686, 12123, 468, 4709, 2856, 417, 711, 2118, 444, 775, 30, 365, 18, 79, 1335, 261, 461, 668, 16, 6394, 4672, 36...
self.added_non_placeholder = True
def complete_current(self): if self.current_speech: self.current_speech.complete() self.all_stuff.append(self.current_speech) self.added_non_placeholder = True self.current_speech = None if self.current_division: self.all_stuff.append(self.current_division) self.added_non_placeholder = True self.current_division = None if self.current_heading: self.all_stuff.append(self.current_heading) self.added_non_placeholder = True self.current_heading = None # If it looks as if adding a placeholder would be useful # (i.e. the previous element's time is no longer accurate, # add that here. if len(self.all_stuff) > 0: last = self.all_stuff[-1] if self.current_time != last.time or self.current_column != last.colnum: self.add_placeholder() else: if self.current_time or self.current_column: self.add_placeholder()
afa10808c735fe43318a2856f3a993afbab25469 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8428/afa10808c735fe43318a2856f3a993afbab25469/parse.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3912, 67, 2972, 12, 2890, 4672, 309, 365, 18, 2972, 67, 87, 12510, 30, 365, 18, 2972, 67, 87, 12510, 18, 6226, 1435, 365, 18, 454, 67, 334, 3809, 18, 6923, 12, 2890, 18, 2972, 67, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3912, 67, 2972, 12, 2890, 4672, 309, 365, 18, 2972, 67, 87, 12510, 30, 365, 18, 2972, 67, 87, 12510, 18, 6226, 1435, 365, 18, 454, 67, 334, 3809, 18, 6923, 12, 2890, 18, 2972, 67, ...
from spambayes.Options import options
from spambayes.Options import options, get_pathname_option
def bool(val): return not not val
3aad957dbdd745d6aaa0fe2bd5e5c1b45503d405 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6126/3aad957dbdd745d6aaa0fe2bd5e5c1b45503d405/message.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1426, 12, 1125, 4672, 327, 486, 486, 1244, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1426, 12, 1125, 4672, 327, 486, 486, 1244, 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...
- ``dep_vars`` - A list of dependent variables (the parameters will be
- ``indep_vars`` - A list of independent variables (the parameters will be
def __init__(self, indep_var, dep_vars): """ INPUT:
ae9bf5e0d28a56cbf9d189e5545c9a8340d806de /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/ae9bf5e0d28a56cbf9d189e5545c9a8340d806de/plot3d.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 316, 15037, 67, 1401, 16, 5993, 67, 4699, 4672, 3536, 12943, 30, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 316, 15037, 67, 1401, 16, 5993, 67, 4699, 4672, 3536, 12943, 30, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
elif re.match('^h([1-9]+[0-9]*)$', (node.text or '')):
elif re.match('^h([1-9]+[0-9]*)$', (node.tag or '')):
def _flowable(self, node, extra_style=None): if node.tag=='para': style = self.styles.para_style_get(node) if extra_style: style.__dict__.update(extra_style) result = [] for i in self._textual(node).split('\n'): result.append(platypus.Paragraph(i, style, **(utils.attr_get(node, [], {'bulletText':'str'})))) return result elif node.tag=='barCode': try: from reportlab.graphics.barcode import code128 from reportlab.graphics.barcode import code39 from reportlab.graphics.barcode import code93 from reportlab.graphics.barcode import common from reportlab.graphics.barcode import fourstate from reportlab.graphics.barcode import usps except Exception, e: return None args = utils.attr_get(node, [], {'ratio':'float','xdim':'unit','height':'unit','checksum':'int','quiet':'int','width':'unit','stop':'bool','bearers':'int','barWidth':'float','barHeight':'float'}) codes = { 'codabar': lambda x: common.Codabar(x, **args), 'code11': lambda x: common.Code11(x, **args), 'code128': lambda x: code128.Code128(x, **args), 'standard39': lambda x: code39.Standard39(x, **args), 'standard93': lambda x: code93.Standard93(x, **args), 'i2of5': lambda x: common.I2of5(x, **args), 'extended39': lambda x: code39.Extended39(x, **args), 'extended93': lambda x: code93.Extended93(x, **args), 'msi': lambda x: common.MSI(x, **args), 'fim': lambda x: usps.FIM(x, **args), 'postnet': lambda x: usps.POSTNET(x, **args), } code = 'code128' if node.get('code'): code = node.get('code').lower() return codes[code](self._textual(node)) elif node.tag=='name': self.styles.names[ node.get('id')] = node.get('value') return None elif node.tag=='xpre': style = self.styles.para_style_get(node) return platypus.XPreformatted(self._textual(node), style, **(utils.attr_get(node, [], {'bulletText':'str','dedent':'int','frags':'int'}))) elif node.tag=='pre': style = self.styles.para_style_get(node) return platypus.Preformatted(self._textual(node), style, **(utils.attr_get(node, [], {'bulletText':'str','dedent':'int'}))) elif node.tag=='illustration': return self._illustration(node) elif node.tag=='blockTable': return self._table(node) elif node.tag=='title': styles = reportlab.lib.styles.getSampleStyleSheet() style = styles['Title'] return platypus.Paragraph(self._textual(node), style, **(utils.attr_get(node, [], {'bulletText':'str'}))) elif re.match('^h([1-9]+[0-9]*)$', (node.text or '')): styles = reportlab.lib.styles.getSampleStyleSheet() style = styles['Heading'+str(node.get[1:])] return platypus.Paragraph(self._textual(node), style, **(utils.attr_get(node, [], {'bulletText':'str'}))) elif node.tag=='image': if not node.get('file'): if node.get('name'): image_data = self.doc.images[node.get('name')].read() else: import base64 if self.localcontext: newtext = utils._process_text(self, node.text or '') node.text = newtext image_data = base64.decodestring(node.text) if not image_data: return False image = cStringIO.StringIO(image_data) return platypus.Image(image, mask=(250,255,250,255,250,255), **(utils.attr_get(node, ['width','height']))) else: return platypus.Image(node.get('file'), mask=(250,255,250,255,250,255), **(utils.attr_get(node, ['width','height']))) from reportlab.lib.utils import ImageReader name = str(node.get('file')) img = ImageReader(name) (sx,sy) = img.getSize() args = {} for tag in ('width','height'): if node.get(tag): args[tag] = utils.unit_get(node.get(tag)) if ('width' in args) and (not 'height' in args): args['height'] = sy * args['width'] / sx elif ('height' in args) and (not 'width' in args): args['width'] = sx * args['height'] / sy elif ('width' in args) and ('height' in args): if (float(args['width'])/args['height'])>(float(sx)>sy): args['width'] = sx * args['height'] / sy else: args['height'] = sy * args['width'] / sx return platypus.Image(name, mask=(250,255,250,255,250,255), **args) elif node.tag=='spacer': if node.get('width'): width = utils.unit_get(node.get('width')) else: width = utils.unit_get('1cm') length = utils.unit_get(node.get('length')) return platypus.Spacer(width=width, height=length) elif node.tag=='section': return self.render(node) elif node.tag == 'pageNumberReset': return PageReset() elif node.tag in ('pageBreak', 'nextPage'): return platypus.PageBreak() elif node.tag=='condPageBreak': return platypus.CondPageBreak(**(utils.attr_get(node, ['height']))) elif node.tag=='setNextTemplate': return platypus.NextPageTemplate(str(node.get('name'))) elif node.tag=='nextFrame': return platypus.CondPageBreak(1000) # TODO: change the 1000 ! elif node.tag == 'setNextFrame': from reportlab.platypus.doctemplate import NextFrameFlowable return NextFrameFlowable(str(node.get('name'))) elif node.tag == 'currentFrame': from reportlab.platypus.doctemplate import CurrentFrameFlowable return CurrentFrameFlowable(str(node.get('name'))) elif node.tag == 'frameEnd': return EndFrameFlowable() elif node.tag == 'hr': width_hr=node.get('width') or '100%' color_hr=node.get('color') or 'black' thickness_hr=node.get('thickness') or 1 lineCap_hr=node.get('lineCap') or 'round' return platypus.flowables.HRFlowable(width=width_hr,color=color.get(color_hr),thickness=float(thickness_hr),lineCap=str(lineCap_hr)) else: sys.stderr.write('Warning: flowable not yet implemented: %s !\n' % (node.tag,)) return None
27afff2a8facd783e250d2142a946410d82ad815 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12853/27afff2a8facd783e250d2142a946410d82ad815/trml2pdf.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2426, 429, 12, 2890, 16, 756, 16, 2870, 67, 4060, 33, 7036, 4672, 309, 756, 18, 2692, 18920, 25072, 4278, 2154, 273, 365, 18, 10218, 18, 25072, 67, 4060, 67, 588, 12, 2159, 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, 389, 2426, 429, 12, 2890, 16, 756, 16, 2870, 67, 4060, 33, 7036, 4672, 309, 756, 18, 2692, 18920, 25072, 4278, 2154, 273, 365, 18, 10218, 18, 25072, 67, 4060, 67, 588, 12, 2159, 13, ...
if not ymin:
if ymin is None:
def __init__(self, v, xmin=None, xmax=None, ymin=None, ymax=None, **kwds): w = [] for x in v: if not isinstance(x, plot.Graphics): x = plot.plot(x, xmin=xmin, xmax=xmax) w.append(x) if len(w) == 0: w = [plot.Graphics()] self.__frames = w G = w[0] if not xmin: xmin = G.xmin() if not xmax: xmax = G.xmax() if not ymin: ymin = G.ymin() if not ymax: ymax = G.ymax() self.__xmin = xmin self.__xmax = xmax self.__ymin = ymin self.__ymax = ymax self.__kwds = kwds
19460269dfcd07f506370e6e0e306f3d8cf06dce /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/19460269dfcd07f506370e6e0e306f3d8cf06dce/animate.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 331, 16, 13777, 33, 7036, 16, 14016, 33, 7036, 16, 15763, 33, 7036, 16, 15275, 33, 7036, 16, 2826, 25577, 4672, 341, 273, 5378, 364, 619, 316, 331, 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, 1001, 2738, 972, 12, 2890, 16, 331, 16, 13777, 33, 7036, 16, 14016, 33, 7036, 16, 15763, 33, 7036, 16, 15275, 33, 7036, 16, 2826, 25577, 4672, 341, 273, 5378, 364, 619, 316, 331, 30, ...
object.__setattr__(cls, attr_name, value)
type.__setattr__(cls, attr_name, value)
def __setattr__(cls, attr_name, value): # normal processing for private attributes if attr_name.startswith('_'): object.__setattr__(cls, attr_name, value) return # no '_': must be SimObject param param = cls.lookup_param(attr_name) if not param: raise AttributeError, \ "Class %s has no parameter %s" % (cls.__name__, attr_name) # It's ok: set attribute by delegating to 'object' class. # Note the use of param.make_value() to verify/canonicalize # the assigned value object.__setattr__(cls, attr_name, param.make_value(value))
d6b939ae76aebaaee22e1fac38b6cce222d0371f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7385/d6b939ae76aebaaee22e1fac38b6cce222d0371f/m5configbase.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 542, 1747, 972, 12, 6429, 16, 1604, 67, 529, 16, 460, 4672, 468, 2212, 4929, 364, 3238, 1677, 309, 1604, 67, 529, 18, 17514, 1918, 2668, 4623, 4672, 618, 16186, 542, 1747, 972, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 542, 1747, 972, 12, 6429, 16, 1604, 67, 529, 16, 460, 4672, 468, 2212, 4929, 364, 3238, 1677, 309, 1604, 67, 529, 18, 17514, 1918, 2668, 4623, 4672, 618, 16186, 542, 1747, 972, 1...
expires = time.time() + timeout
expires = None if timeout is not None: expires = time.time() + timeout
def wait(self,timeout=None): expires = time.time() + timeout return kernel.siguntil, self.ready, expires
4fc86a77dbd6ea96c7f2cf1f57ae9f7b4c6d0a8b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6207/4fc86a77dbd6ea96c7f2cf1f57ae9f7b4c6d0a8b/Kernel.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2529, 12, 2890, 16, 4538, 33, 7036, 4672, 7368, 273, 599, 309, 2021, 353, 486, 599, 30, 7368, 273, 813, 18, 957, 1435, 397, 2021, 327, 5536, 18, 7340, 12198, 16, 365, 18, 1672, 16, 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, 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, 2529, 12, 2890, 16, 4538, 33, 7036, 4672, 7368, 273, 599, 309, 2021, 353, 486, 599, 30, 7368, 273, 813, 18, 957, 1435, 397, 2021, 327, 5536, 18, 7340, 12198, 16, 365, 18, 1672, 16, 7...
print " --show-changes For modifications, show the old " print " file info below new" print " --all Combine tags to display most information about the changeset"
print " --show-changes For modifications, show the old " print " file info below new" print " --all Combine tags to display most information about the changeset" print " --recurse-repository Search repositories for information about referenced but not" print " included troves"
def usage(): print "conary showcs <changeset> [trove[=version]]" print " Accepts all common display options. Also," print " --show-changes For modifications, show the old " print " file info below new" print " --all Combine tags to display most information about the changeset" print ""
0bc435f0ac3ac18fa0c6982931c2e3c4b857b049 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8747/0bc435f0ac3ac18fa0c6982931c2e3c4b857b049/showchangeset.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4084, 13332, 1172, 315, 591, 814, 2405, 2143, 282, 411, 6329, 278, 34, 306, 88, 303, 537, 63, 33, 1589, 65, 4279, 1172, 315, 225, 27158, 777, 2975, 2562, 702, 18, 225, 8080, 10837, 117...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4084, 13332, 1172, 315, 591, 814, 2405, 2143, 282, 411, 6329, 278, 34, 306, 88, 303, 537, 63, 33, 1589, 65, 4279, 1172, 315, 225, 27158, 777, 2975, 2562, 702, 18, 225, 8080, 10837, 117...
if ext == '.cc':
if ext in ('.cc', '.mm', '.c', '.m'):
def WalkDirectory(root_path, actions): for path, dirs, files in os.walk(root_path): if '.svn' in dirs: dirs.remove('.svn') for file in files: ext = os.path.splitext(file)[1] if ext == '.cc': GrepForActions(os.path.join(path, file), actions)
89622004872be7f7ddaa24fa1694f76c7b9539b6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9392/89622004872be7f7ddaa24fa1694f76c7b9539b6/extract_actions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7564, 2853, 12, 3085, 67, 803, 16, 4209, 4672, 364, 589, 16, 7717, 16, 1390, 316, 1140, 18, 11348, 12, 3085, 67, 803, 4672, 309, 2418, 31505, 11, 316, 7717, 30, 7717, 18, 4479, 2668, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7564, 2853, 12, 3085, 67, 803, 16, 4209, 4672, 364, 589, 16, 7717, 16, 1390, 316, 1140, 18, 11348, 12, 3085, 67, 803, 4672, 309, 2418, 31505, 11, 316, 7717, 30, 7717, 18, 4479, 2668, ...
print '(Use --debug to get a full option listing)'
print '(Use --verbose to get a full option listing)'
def usage(self, errNo=1): if not self.parser: self.setParser(self.mainHandler.getParser(self.commands[0])) self.parser.print_help() if log.getVerbosity() > log.DEBUG: print print '(Use --debug to get a full option listing)' return errNo
58a1490f738b392d643c24771657134a4d2ce89f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8747/58a1490f738b392d643c24771657134a4d2ce89f/options.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4084, 12, 2890, 16, 393, 2279, 33, 21, 4672, 309, 486, 365, 18, 4288, 30, 365, 18, 542, 2678, 12, 2890, 18, 5254, 1503, 18, 588, 2678, 12, 2890, 18, 7847, 63, 20, 22643, 365, 18, 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, 4084, 12, 2890, 16, 393, 2279, 33, 21, 4672, 309, 486, 365, 18, 4288, 30, 365, 18, 542, 2678, 12, 2890, 18, 5254, 1503, 18, 588, 2678, 12, 2890, 18, 7847, 63, 20, 22643, 365, 18, 4...
""" fl_add_scrollbutton(type, x, y, w, h, label) -> object ref.
""" fl_add_scrollbutton(type, x, y, w, h, label) -> object
def fl_add_scrollbutton(type, x, y, w, h, label): """ fl_add_scrollbutton(type, x, y, w, h, label) -> object ref. """ retval = _fl_add_scrollbutton(type, x, y, w, h, label) return retval
8765c710f695de392f6fc7c664c746ec98668b1d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2429/8765c710f695de392f6fc7c664c746ec98668b1d/xformslib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1183, 67, 1289, 67, 12033, 5391, 12, 723, 16, 619, 16, 677, 16, 341, 16, 366, 16, 1433, 4672, 3536, 1183, 67, 1289, 67, 12033, 5391, 12, 723, 16, 619, 16, 677, 16, 341, 16, 366, 16...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1183, 67, 1289, 67, 12033, 5391, 12, 723, 16, 619, 16, 677, 16, 341, 16, 366, 16, 1433, 4672, 3536, 1183, 67, 1289, 67, 12033, 5391, 12, 723, 16, 619, 16, 677, 16, 341, 16, 366, 16...
if hasattr(self,saveLogger):
if hasattr(self,'saveLogger'):
def save(self, formats=None, verbose=None, fnRoot=None, outDir=None): from reportlab import rl_config "Saves copies of self in desired location and formats" ext = '' if not fnRoot: fnRoot = getattr(self,'fileNamePattern',(self.__class__.__name__+'%03d')) chartId = getattr(self,'chartId',0) if callable(fnRoot): fnRoot = fnRoot(chartId) else: try: fnRoot = fnRoot % getattr(self,'chartId',0) except TypeError, err: if str(err) != 'not all arguments converted': raise
af6c6dab559d71c5c08c6e5f46105c799fd65c94 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/af6c6dab559d71c5c08c6e5f46105c799fd65c94/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, 628, 2605, 7411, 1930, 11618, 67, 1425, 315, 13370, 13200, 434, 365, 31...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1923, 12, 2890, 16, 6449, 33, 7036, 16, 3988, 33, 7036, 16, 2295, 2375, 33, 7036, 16, 596, 1621, 33, 7036, 4672, 628, 2605, 7411, 1930, 11618, 67, 1425, 315, 13370, 13200, 434, 365, 31...
rledata = binascii.rlecode_hqx(self.data) self.ofp.write(rledata)
rledata = binascii.rlecode_hqx(self.data) self.ofp.write(rledata)
def close(self):
cada31e8208b1e7201f5afc9f9782089bec7ebe3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/cada31e8208b1e7201f5afc9f9782089bec7ebe3/binhex.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1746, 12, 2890, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1746, 12, 2890, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
tarball = autotest_utils.unmap_url(self.bindir, tarball, self.tmpdir)
tarball = utils.unmap_url(self.bindir, tarball, self.tmpdir)
def setup(self, tarball = 'pi_tests.tar.bz2'): autotest_utils.check_glibc_ver('2.5') tarball = autotest_utils.unmap_url(self.bindir, tarball, self.tmpdir) autotest_utils.extract_tarball_to_dir(tarball, self.srcdir) os.chdir(self.srcdir) utils.system('make')
3f5e10801acf76041806fdfa6bd3e73ec815dd60 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10349/3f5e10801acf76041806fdfa6bd3e73ec815dd60/pi_tests.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 12, 2890, 16, 29441, 273, 296, 7259, 67, 16341, 18, 11718, 18, 25292, 22, 11, 4672, 2059, 352, 395, 67, 5471, 18, 1893, 67, 75, 2941, 71, 67, 502, 2668, 22, 18, 25, 6134, 29441...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 29441, 273, 296, 7259, 67, 16341, 18, 11718, 18, 25292, 22, 11, 4672, 2059, 352, 395, 67, 5471, 18, 1893, 67, 75, 2941, 71, 67, 502, 2668, 22, 18, 25, 6134, 29441...
self.statusicon.set_from_stock('sonata_pause')
self.statusicon.set_from_file(self.find_path('sonata_pause.png'))
def handle_change_status(self): # Called when one of the following items are changed: # 1. Current playlist (song added, removed, etc) # 2. Repeat/random/xfade/volume # 3. Currently selected song in playlist # 4. Status (playing/paused/stopped) # 5. Playlistqueue if self.status == None: # clean up and bail out self.update_progressbar() self.update_cursong() self.update_wintitle() self.update_album_art() self.update_statusbar() return
df11b4bbe442a5157537daa280f590f96906e0fc /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2312/df11b4bbe442a5157537daa280f590f96906e0fc/sonata.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 67, 3427, 67, 2327, 12, 2890, 4672, 468, 11782, 1347, 1245, 434, 326, 3751, 1516, 854, 3550, 30, 468, 225, 404, 18, 6562, 16428, 261, 816, 75, 3096, 16, 3723, 16, 5527, 13, 468, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 67, 3427, 67, 2327, 12, 2890, 4672, 468, 11782, 1347, 1245, 434, 326, 3751, 1516, 854, 3550, 30, 468, 225, 404, 18, 6562, 16428, 261, 816, 75, 3096, 16, 3723, 16, 5527, 13, 468, ...
Option.set(self, _val)
return _val
def set(self, value): _val = value.lower() if _val in ("yes", "no", "new"): Option.set(self, _val) else: raise OptionValueError(self, value, self.class_description)
092f01b48ed42c60558ac679f8ab88ea5a6f5fbc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/092f01b48ed42c60558ac679f8ab88ea5a6f5fbc/configuration.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 12, 2890, 16, 460, 4672, 389, 1125, 273, 460, 18, 8167, 1435, 309, 389, 1125, 316, 7566, 9707, 3113, 315, 2135, 3113, 315, 2704, 6, 4672, 327, 389, 1125, 469, 30, 1002, 2698, 2361...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 444, 12, 2890, 16, 460, 4672, 389, 1125, 273, 460, 18, 8167, 1435, 309, 389, 1125, 316, 7566, 9707, 3113, 315, 2135, 3113, 315, 2704, 6, 4672, 327, 389, 1125, 469, 30, 1002, 2698, 2361...
statusdict = {RPC_REQUEST_ID:callID,RPC_REQUEST_STATUS:status,RPC_RESULT:retvalue}
statusdict = {RPC_REQUEST_STATUS:status,RPC_RESULT:retvalue} if callID != None: statusdict[RPC_REQUEST_ID] = callID
def new_rpc(conn_id, sock): # If anything fails, close the socket try: # Get the RPC object rpc_dict = RPC_decode(sock) # DEBUG print getruntime(),"RPC Request:",rpc_dict # Get the RPC call id if RPC_REQUEST_ID in rpc_dict: callID = rpc_dict[RPC_REQUEST_ID] else: callID = 0 # Get the requested function if RPC_FUNCTION in rpc_dict: request = rpc_dict[RPC_FUNCTION] else: request = None # Get the value, this is the parameter to the function if RPC_PARAM in rpc_dict: value = rpc_dict[RPC_PARAM] else: value = None # Determine if there are remaining RPC requests if RPC_ADDI_REQ in rpc_dict: additional = rpc_dict[RPC_ADDI_REQ] else: additional = False # If the request exists, call the function if request in RPC_FUNCTIONS: func = RPC_FUNCTIONS[request] # Give the function the conn_id, and the value to the request # Store the status, and the return value status,retvalue = func(conn_id,value) # No request made, it has failed else: status = False retvalue = None # Send the status of the request statusdict = {RPC_REQUEST_ID:callID,RPC_REQUEST_STATUS:status,RPC_RESULT:retvalue} # DEBUG # print "RPC Response:",statusdict # Encode the RPC response dictionary response = RPC_encode(statusdict) # Send the response sock.send(response) # Check if there is more RPC calls if additional: # Recurse new_rpc(conn_id, sock) else: # Wait for the client to receive the response sleep(WAIT_INTERVAL) # Close the socket _safe_close(sock) except Exception, e: print "Exception in RPC Layer:",str(e) # Something went wrong... _safe_close(sock)
e3dc312b8230075bb3de5f288eaa2936b99fd577 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7995/e3dc312b8230075bb3de5f288eaa2936b99fd577/forwarder_rpc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 394, 67, 7452, 12, 4646, 67, 350, 16, 7313, 4672, 468, 971, 6967, 6684, 16, 1746, 326, 2987, 775, 30, 468, 968, 326, 8295, 733, 6724, 67, 1576, 273, 8295, 67, 3922, 12, 15031, 13, 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, 394, 67, 7452, 12, 4646, 67, 350, 16, 7313, 4672, 468, 971, 6967, 6684, 16, 1746, 326, 2987, 775, 30, 468, 968, 326, 8295, 733, 6724, 67, 1576, 273, 8295, 67, 3922, 12, 15031, 13, 22...
check_call(shlex.split(cmd % {'file': file}))
cmd = cmd.split(' ') cmd.append(file) check_call(cmd)
def vcs_add_file(config, file): logging.debug("Adding %s" % path) cmd = config["vcs_add"] if "vcs_add" in config else DARCS_ADD check_call(shlex.split(cmd % {'file': file}))
a7e08cef125a289cadd5348fcf3aaabad28d18d4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5132/a7e08cef125a289cadd5348fcf3aaabad28d18d4/musdex.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 20255, 67, 1289, 67, 768, 12, 1425, 16, 585, 4672, 2907, 18, 4148, 2932, 13962, 738, 87, 6, 738, 589, 13, 1797, 273, 642, 9614, 18982, 67, 1289, 11929, 309, 315, 18982, 67, 1289, 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, 20255, 67, 1289, 67, 768, 12, 1425, 16, 585, 4672, 2907, 18, 4148, 2932, 13962, 738, 87, 6, 738, 589, 13, 1797, 273, 642, 9614, 18982, 67, 1289, 11929, 309, 315, 18982, 67, 1289, 6, ...
id_set = ",".join(map(str, ids))
id_set = ",".join(map(str, ids))
def _product_margin(self, cr, uid, ids, field_name, arg, context): # need to check with new requirement id_set = ",".join(map(str, ids)) cr.execute(""" SELECT s.id, COALESCE(SUM(l.price_unit*l.product_uos_qty*(100-l.discount)/100.0 - t.standard_price * l.product_uos_qty) - i.amount_untaxed,0)::decimal(16,2) AS amount FROM sale_order s LEFT OUTER JOIN sale_order_line l ON (s.id=l.order_id) LEFT JOIN product_product p ON (p.id=l.product_id) LEFT JOIN product_template t ON (t.id=p.product_tmpl_id) LEFT JOIN stock_picking sp on (s.id = sp.sale_id) LEFT JOIN picking_invoice_rel r on (sp.id = r.picking_id) LEFT JOIN account_invoice i on (i.id = r.invoice_id) WHERE s.id IN ("""+id_set+""") GROUP BY s.id,i.amount_untaxed """) res = dict(cr.fetchall()) return res
f406e7d84af9a0c496d1e43ca2f949d236c298f1 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7339/f406e7d84af9a0c496d1e43ca2f949d236c298f1/sale_margin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5896, 67, 10107, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 652, 67, 529, 16, 1501, 16, 819, 4672, 468, 1608, 358, 866, 598, 394, 12405, 612, 67, 542, 273, 5753, 18, 5701, 12, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5896, 67, 10107, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 652, 67, 529, 16, 1501, 16, 819, 4672, 468, 1608, 358, 866, 598, 394, 12405, 612, 67, 542, 273, 5753, 18, 5701, 12, ...
if DEBUG: log.debug('fp: %s, old: %s, new: %s\n' % (fav.priority, oldprio, newprio)) log.debug('skipping: %s\n' % fav.name)
_debug_('fp: %s, old: %s, new: %s\n' % (fav.priority, oldprio, newprio)) _debug_('skipping: %s\n' % fav.name)
def adjustPriority(self, favname, mod=0): save = [] mod = int(mod) (status, me) = getFavorite(favname) oldprio = int(me.priority) newprio = oldprio + mod if DEBUG: log.debug('ap: mod=%s\n' % mod) sr = self.getScheduledRecordings() favs = sr.getFavorites().values() sys.stderr.write('adjusting prio of '+favname+'\n') for fav in favs: fav.priority = int(fav.priority) if fav.name == me.name: if DEBUG: log.debug('MATCH') fav.priority = newprio log.debug('moved prio of %s: %s => %s\n' % (fav.name, oldprio, newprio)) continue if mod < 0: if fav.priority < newprio or fav.priority > oldprio: if DEBUG: log.debug('fp: %s, old: %s, new: %s\n' % (fav.priority, oldprio, newprio)) log.debug('skipping: %s\n' % fav.name) continue fav.priority = fav.priority + 1 if DEBUG: log.debug('moved prio of %s: %s => %s\n' % (fav.name, fav.priority-1, fav.priority)) if mod > 0: if fav.priority > newprio or fav.priority < oldprio: if DEBUG: log.debug('skipping: %s\n' % fav.name) continue fav.priority = fav.priority - 1 if DEBUG: log.debug('moved prio of %s: %s => %s\n' % (fav.name, fav.priority+1, fav.priority)) sr.setFavoritesList(favs) self.saveScheduledRecordings(sr)
dbf3be6baca9b3de2bbdcffda6a49e6878cff42d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/dbf3be6baca9b3de2bbdcffda6a49e6878cff42d/recordserver.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5765, 8183, 12, 2890, 16, 18180, 529, 16, 681, 33, 20, 4672, 1923, 273, 5378, 681, 273, 509, 12, 1711, 13, 261, 2327, 16, 1791, 13, 273, 2812, 9444, 1137, 12, 19731, 529, 13, 1592, 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, 5765, 8183, 12, 2890, 16, 18180, 529, 16, 681, 33, 20, 4672, 1923, 273, 5378, 681, 273, 509, 12, 1711, 13, 261, 2327, 16, 1791, 13, 273, 2812, 9444, 1137, 12, 19731, 529, 13, 1592, 2...
def add(self,sessionID, socketType, host, port):
def add(self,sessionID, socketType, host, port, fromip):
def add(self,sessionID, socketType, host, port): if not self.l.has_key(sessionID): self.l[sessionID] = sessionItem(sessionID, socketType, host, port) self.l[sessionID].start()
26cb64b565e8083f8e89fa56b53f252b8bdb0cb0 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2243/26cb64b565e8083f8e89fa56b53f252b8bdb0cb0/pyhstopd.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 12, 2890, 16, 17255, 16, 2987, 559, 16, 1479, 16, 1756, 16, 628, 625, 4672, 309, 486, 365, 18, 80, 18, 5332, 67, 856, 12, 17255, 4672, 365, 18, 80, 63, 17255, 65, 273, 1339, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 12, 2890, 16, 17255, 16, 2987, 559, 16, 1479, 16, 1756, 16, 628, 625, 4672, 309, 486, 365, 18, 80, 18, 5332, 67, 856, 12, 17255, 4672, 365, 18, 80, 63, 17255, 65, 273, 1339, 1...
cmd = ["rts2-target", "-e", "-p", str(int(a[7]) * 100), a[0]]
prior = int(a[9]) * 100 if (prior <= 0): prior = 1 cmd = ["rts2-target", "-b", "0", "-e", "-p", str(prior), a[0]]
def parse_script(scr): ret = '' s = scr.split(',') for se in s: fil = se.split('-') ret += 'filter=' + fil[0] + ' '; if (fil[2] > 1): ret += 'for ' + fil[2] + ' { E ' + fil[1] + ' }' else: ret += 'E ' + fil[1] ret += ' ' return ret
ccf2a957e8d7ce06f85a4f6d76da652affe8c7fe /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6334/ccf2a957e8d7ce06f85a4f6d76da652affe8c7fe/flwo_cat.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 4263, 12, 24638, 4672, 325, 273, 875, 272, 273, 11991, 18, 4939, 12, 2187, 6134, 364, 695, 316, 272, 30, 661, 273, 695, 18, 4939, 2668, 17, 6134, 325, 1011, 296, 2188, 2218, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 4263, 12, 24638, 4672, 325, 273, 875, 272, 273, 11991, 18, 4939, 12, 2187, 6134, 364, 695, 316, 272, 30, 661, 273, 695, 18, 4939, 2668, 17, 6134, 325, 1011, 296, 2188, 2218, ...
unittest.main()
unittest.main(defaultTest='suite')
def suite(): return unittest.makeSuite(AttachmentTestCase, 'test')
f662173629056ac8b011b2bf0b13859787fab073 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2831/f662173629056ac8b011b2bf0b13859787fab073/attachment.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11371, 13332, 327, 2836, 3813, 18, 6540, 13587, 12, 6803, 4709, 2449, 16, 296, 3813, 6134, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 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, 11371, 13332, 327, 2836, 3813, 18, 6540, 13587, 12, 6803, 4709, 2449, 16, 296, 3813, 6134, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
MelFid('NNAM','embeddedWeaponNode'),
MelString('NNAM','embeddedWeaponNode'),
def loadData(self,record,ins,type,size,readId): if size == 102: MelStruct.loadData(self,record,ins,type,size,readId) return elif size == 86: #--Else 86 byte record (skips dispVelocity, #-- dispFalloff, dispDampner, dispSize, and damage #-- Two junk? bytes are tacked onto the end #-- Hex editing and the CS confirms that it is NOT #-- damage, so it is probably just filler unpacked = ins.unpack('11f3Bs3Bs3BsB3s6f2s',size,readId) elif size == 62: #--Else 62 byte record (skips most everything #-- Two junk? bytes are tacked onto the end #-- No testing done, but assumed that its the same as the #-- previous truncated record. unpacked = ins.unpack('11f3Bs3Bs3BsB3s2s',size,readId) elif size == 42: #--Else 42 byte record (skips most everything #-- Two junk? bytes are tacked onto the end #-- No testing done, but assumed that its the same as the #-- previous truncated record. unpacked = ins.unpack('10f2s',size,readId) elif size == 2: #--Else 2 byte record (skips everything #-- Two junk? bytes are tacked onto the end #-- No testing done, but assumed that its the same as the #-- previous truncated record. unpacked = ins.unpack('2s',size,readId) else: raise "Unexpected size encountered for WATR subrecord: %s" % size unpacked = unpacked[:-1] unpacked += self.defaults[len(unpacked):] setter = record.__setattr__ for attr,value,action in zip(self.attrs,unpacked,self.actions): if callable(action): value = action(value) setter(attr,value) if self._debug: print unpacked
7548e17e569a15e4985eba29e4c2223b7594d7e1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6682/7548e17e569a15e4985eba29e4c2223b7594d7e1/bosh.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 29422, 12, 2890, 16, 3366, 16, 2679, 16, 723, 16, 1467, 16, 896, 548, 4672, 309, 963, 422, 21822, 30, 490, 292, 3823, 18, 945, 751, 12, 2890, 16, 3366, 16, 2679, 16, 723, 16, 1467, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 29422, 12, 2890, 16, 3366, 16, 2679, 16, 723, 16, 1467, 16, 896, 548, 4672, 309, 963, 422, 21822, 30, 490, 292, 3823, 18, 945, 751, 12, 2890, 16, 3366, 16, 2679, 16, 723, 16, 1467, ...