rem
stringlengths
2
226k
add
stringlengths
0
227k
context
stringlengths
8
228k
meta
stringlengths
156
215
input_ids
list
attention_mask
list
labels
list
if sr<(n-1) and er>=n:
if sr<n and er>=(n-1):
def _splitRows(self,availHeight): h = 0 n = 0 lim = len(self._rowHeights) while n<lim: hn = h + self._rowHeights[n] if hn>availHeight: break h = hn n = n + 1
9f5a788184a7139b9b717f8b6082af233464645d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3878/9f5a788184a7139b9b717f8b6082af233464645d/tables.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4939, 4300, 12, 2890, 16, 842, 671, 2686, 4672, 366, 273, 374, 290, 273, 374, 20167, 273, 562, 12, 2890, 6315, 492, 2686, 87, 13, 1323, 290, 32, 7091, 30, 366, 82, 273, 366, 397...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4939, 4300, 12, 2890, 16, 842, 671, 2686, 4672, 366, 273, 374, 290, 273, 374, 20167, 273, 562, 12, 2890, 6315, 492, 2686, 87, 13, 1323, 290, 32, 7091, 30, 366, 82, 273, 366, 397...
shutil.rmtree(OUTDIR) os.mkdir(OUTDIR)
for file in os.listdir(OUTDIR): if file == '.svn': continue file = os.path.join(os.path.abspath(OUTDIR), file) if os.path.isdir(file): shutil.rmtree(file) else: os.remove(file) else: os.mkdir(OUTDIR)
def pygments_directive(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine): try: lexer = get_lexer_by_name(arguments[0]) except ValueError: # no lexer found - use the text one instead of an exception lexer = TextLexer() # take an arbitrary option if more than one is given formatter = options and VARIANTS[options.keys()[0]] or DEFAULT filtered = [ line for line in content if line ] if len(filtered) and os.path.isfile(filtered[0]): content = open(content[0]).read().splitlines() parsed = highlight(u'\n'.join(content), lexer, formatter) return [nodes.raw('', parsed, format='html')]
3f42631bfa6e00b871bd7008eec4af1aa4ae5a4f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6988/3f42631bfa6e00b871bd7008eec4af1aa4ae5a4f/ug2html.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2395, 75, 1346, 67, 22347, 12, 529, 16, 1775, 16, 702, 16, 913, 16, 7586, 16, 913, 67, 3348, 16, 1203, 67, 955, 16, 919, 16, 919, 67, 9149, 4672, 775, 30, 8512, 273, 336, 67, 31731...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 75, 1346, 67, 22347, 12, 529, 16, 1775, 16, 702, 16, 913, 16, 7586, 16, 913, 67, 3348, 16, 1203, 67, 955, 16, 919, 16, 919, 67, 9149, 4672, 775, 30, 8512, 273, 336, 67, 31731...
4. Subclass SimpleXMLRPCRequestHandler: class MathHandler(SimpleXMLRPCRequestHandler):
4. Subclass SimpleXMLRPCServer: class MathServer(SimpleXMLRPCServer):
def _dispatch(self, method, params): if method == 'pow': return apply(pow, params) elif method == 'add': return params[0] + params[1] else: raise 'bad method'
eca2f3e72cc54be7e8c786d52d54714d73e4aef8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/eca2f3e72cc54be7e8c786d52d54714d73e4aef8/SimpleXMLRPCServer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 10739, 12, 2890, 16, 707, 16, 859, 4672, 309, 707, 422, 296, 23509, 4278, 327, 2230, 12, 23509, 16, 859, 13, 1327, 707, 422, 296, 1289, 4278, 327, 859, 63, 20, 65, 397, 859, 63,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 10739, 12, 2890, 16, 707, 16, 859, 4672, 309, 707, 422, 296, 23509, 4278, 327, 2230, 12, 23509, 16, 859, 13, 1327, 707, 422, 296, 1289, 4278, 327, 859, 63, 20, 65, 397, 859, 63,...
fp.write('from %s import *\n'%basepackage._code_to_fullname[code])
def compilesuite(suite, major, minor, language, script, fname, basepackage=None): """Generate code for a single suite""" [name, desc, code, level, version, events, classes, comps, enums] = suite modname = identify(name) if len(modname) > 28: modname = modname[:27] fss, ok = macfs.StandardPutFile('Python output file', modname+'.py') if not ok: return None, None pathname = fss.as_pathname() modname = os.path.splitext(os.path.split(pathname)[1])[0] fp = open(fss.as_pathname(), 'w') fss.SetCreatorType('Pyth', 'TEXT') fp.write('"""Suite %s: %s\n' % (name, desc)) fp.write("Level %d, version %d\n\n" % (level, version)) fp.write("Generated from %s\n"%fname) fp.write("AETE/AEUT resource version %d/%d, language %d, script %d\n" % \ (major, minor, language, script)) fp.write('"""\n\n') fp.write('import aetools\n') fp.write('import MacOS\n\n') fp.write("_code = %s\n\n"% `code`) if basepackage and basepackage._code_to_module.has_key(code): # We are an extension of a baseclass (usually an application extending # Standard_Suite or so). Import everything from our base module fp.write('from %s import *\n'%basepackage._code_to_fullname[code]) basemodule = basepackage._code_to_module[code] else: # We are not an extension. basemodule = None compileclassheader(fp, modname, basemodule) enumsneeded = {} if events: for event in events: compileevent(fp, event, enumsneeded) else: fp.write("\tpass\n\n") objc = ObjectCompiler(fp, basemodule) for cls in classes: objc.compileclass(cls) for cls in classes: objc.fillclasspropsandelems(cls) for comp in comps: objc.compilecomparison(comp) for enum in enums: objc.compileenumeration(enum) for enum in enumsneeded.keys(): objc.checkforenum(enum) objc.dumpindex() return code, modname
b18e37723e6f3e7fe6bae03f14e954721df23eaf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b18e37723e6f3e7fe6bae03f14e954721df23eaf/gensuitemodule.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1161, 1449, 9519, 12, 30676, 16, 7888, 16, 8439, 16, 2653, 16, 2728, 16, 5299, 16, 1026, 5610, 33, 7036, 4672, 3536, 4625, 981, 364, 279, 2202, 11371, 8395, 306, 529, 16, 3044, 16, 981...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1161, 1449, 9519, 12, 30676, 16, 7888, 16, 8439, 16, 2653, 16, 2728, 16, 5299, 16, 1026, 5610, 33, 7036, 4672, 3536, 4625, 981, 364, 279, 2202, 11371, 8395, 306, 529, 16, 3044, 16, 981...
Simple abelian variety factor 33a(1,33) of dimension 1 of J0(33)
Simple abelian subvariety 33a(1,33) of dimension 1 of J0(33)
def complement(self, A=None): """ Return a complement of this abelian variety.
231a556974015ed454b20c5783447e82495d8183 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/231a556974015ed454b20c5783447e82495d8183/abvar.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17161, 12, 2890, 16, 432, 33, 7036, 4672, 3536, 2000, 279, 17161, 434, 333, 1223, 292, 2779, 1394, 14369, 18, 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, 17161, 12, 2890, 16, 432, 33, 7036, 4672, 3536, 2000, 279, 17161, 434, 333, 1223, 292, 2779, 1394, 14369, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
if name=="Weekly": new_name=de.strftime('%Y, week %W')
if name =="Weekly": new_name = de.strftime('%Y, week %W')
def create_period(self,cr, uid, ids, context={}, interval=0, name='Daily'): for p in self.browse(cr, uid, ids, context): dt = p.date_start ds = mx.DateTime.strptime(p.date_start, '%Y-%m-%d') while ds.strftime('%Y-%m-%d')<p.date_stop: de = ds + RelativeDateTime(days=interval, minutes =-1) if name=='Daily': new_name=de.strftime('%Y-%m-%d') if name=="Weekly": new_name=de.strftime('%Y, week %W') self.pool.get('stock.period').create(cr, uid, { 'name': new_name, 'date_start': ds.strftime('%Y-%m-%d'), 'date_stop': de.strftime('%Y-%m-%d %H:%M:%S'), }) ds = ds + RelativeDateTime(days=interval) + 1 return { 'view_type': 'form', "view_mode": 'tree', 'res_model': 'stock.period', 'type': 'ir.actions.act_window', }
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, 6908, 12, 2890, 16, 3353, 16, 4555, 16, 3258, 16, 819, 28793, 3673, 33, 20, 16, 508, 2218, 40, 12857, 11, 4672, 364, 293, 316, 365, 18, 25731, 12, 3353, 16, 4555, 16, 3258, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 6908, 12, 2890, 16, 3353, 16, 4555, 16, 3258, 16, 819, 28793, 3673, 33, 20, 16, 508, 2218, 40, 12857, 11, 4672, 364, 293, 316, 365, 18, 25731, 12, 3353, 16, 4555, 16, 3258, ...
if ('align' not in node.attributes or node.attributes['align'] == 'center'): align = '\n\\centering' align_end = '' else: align = '\\begin{flush%s}' % node.attributes['align'] align_end = '\\end{flush%s}' % node.attributes['align'] self.body.append( '\\begin{figure}[htbp]%s\n' % align ) self.context.append( '%s\\end{figure}\n' % align_end )
self.body.append('\\begin{figure}[htbp]') self.context.append('\\end{figure}\n')
def visit_figure(self, node): # TODO: use LaTeX default alignment (left) (similar to HTML) if ('align' not in node.attributes or node.attributes['align'] == 'center'): # centering does not add vertical space like center. align = '\n\\centering' align_end = '' else: # TODO non vertical space for other alignments. align = '\\begin{flush%s}' % node.attributes['align'] align_end = '\\end{flush%s}' % node.attributes['align'] self.body.append( '\\begin{figure}[htbp]%s\n' % align ) self.context.append( '%s\\end{figure}\n' % align_end )
ca2f22b1c4e8be5a06f234a03127244e2db8bd3c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1532/ca2f22b1c4e8be5a06f234a03127244e2db8bd3c/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3757, 67, 19675, 12, 2890, 16, 756, 4672, 468, 2660, 30, 999, 21072, 21575, 60, 805, 8710, 261, 4482, 13, 261, 22985, 358, 3982, 13, 309, 7707, 7989, 11, 486, 316, 756, 18, 4350, 578, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3757, 67, 19675, 12, 2890, 16, 756, 4672, 468, 2660, 30, 999, 21072, 21575, 60, 805, 8710, 261, 4482, 13, 261, 22985, 358, 3982, 13, 309, 7707, 7989, 11, 486, 316, 756, 18, 4350, 578, ...
TixSubWidget.__init__(self, master, name, destroy_physically)
TixSubWidget.__init__(self, master, name, destroy_physically)
def __init__(self, master, name, destroy_physically=0):
86af7ef7e3f4448abc89aa941517a84075d99a38 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/86af7ef7e3f4448abc89aa941517a84075d99a38/Tix.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 4171, 16, 508, 16, 5546, 67, 844, 1900, 6478, 33, 20, 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, ...
[ 1, 1, 1, 1, 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, 4171, 16, 508, 16, 5546, 67, 844, 1900, 6478, 33, 20, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
args = getnewargs()
args = getnewargs()
def save_newobj(self, obj): # Save a new-style class instance, using protocol 2. # XXX This is still experimental. assert self.proto >= 2 # This only works for protocol 2 t = type(obj) getnewargs = getattr(obj, "__getnewargs__", None) if getnewargs: args = getnewargs() # This bette not reference obj else: args = ()
eb06c0d76f9bedc0d419a077d9cfdc5ac0e021e2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/eb06c0d76f9bedc0d419a077d9cfdc5ac0e021e2/pickle.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1923, 67, 2704, 2603, 12, 2890, 16, 1081, 4672, 468, 7074, 279, 394, 17, 4060, 667, 791, 16, 1450, 1771, 576, 18, 468, 11329, 1220, 353, 4859, 23070, 18, 1815, 365, 18, 9393, 1545, 576...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1923, 67, 2704, 2603, 12, 2890, 16, 1081, 4672, 468, 7074, 279, 394, 17, 4060, 667, 791, 16, 1450, 1771, 576, 18, 468, 11329, 1220, 353, 4859, 23070, 18, 1815, 365, 18, 9393, 1545, 576...
buildir = os.path.dirname(sys.executable)
buildir = os.path.dirname(os.path.realpath(sys.executable))
def get_python_inc(plat_specific=0, prefix=None): """Return the directory containing installed Python header files. If 'plat_specific' is false (the default), this is the path to the non-platform-specific header files, i.e. Python.h and so on; otherwise, this is the path to platform-specific header files (namely pyconfig.h). If 'prefix' is supplied, use it instead of sys.prefix or sys.exec_prefix -- i.e., ignore 'plat_specific'. """ if prefix is None: prefix = plat_specific and EXEC_PREFIX or PREFIX if os.name == "posix": if python_build: buildir = os.path.dirname(sys.executable) if plat_specific: # python.h is located in the buildir inc_dir = buildir else: # the source dir is relative to the buildir srcdir = os.path.abspath(os.path.join(buildir, get_config_var('srcdir'))) # Include is located in the srcdir inc_dir = os.path.join(srcdir, "Include") return inc_dir return os.path.join(prefix, "include", "python" + get_python_version()) elif os.name == "nt": return os.path.join(prefix, "include") elif os.name == "mac": if plat_specific: return os.path.join(prefix, "Mac", "Include") else: return os.path.join(prefix, "Include") elif os.name == "os2": return os.path.join(prefix, "Include") else: raise DistutilsPlatformError( "I don't know where Python installs its C header files " "on platform '%s'" % os.name)
6fe4970b903c3a5b646f6d30ad62e22255daeca1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3187/6fe4970b903c3a5b646f6d30ad62e22255daeca1/sysconfig.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 8103, 67, 9523, 12, 412, 270, 67, 12524, 33, 20, 16, 1633, 33, 7036, 4672, 3536, 990, 326, 1867, 4191, 5876, 6600, 1446, 1390, 18, 225, 971, 296, 412, 270, 67, 12524, 11, 35...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 8103, 67, 9523, 12, 412, 270, 67, 12524, 33, 20, 16, 1633, 33, 7036, 4672, 3536, 990, 326, 1867, 4191, 5876, 6600, 1446, 1390, 18, 225, 971, 296, 412, 270, 67, 12524, 11, 35...
['p', common.MP(obj.p)[4:]], ['q', common.MP(obj.q)[4:]], ['a', common.MP(obj.d%(obj.p-1))[4:]], ['b', common.MP(obj.d%(obj.q-1))[4:]], ['c', common.MP(Util.number.inverse(obj.q, obj.p))[4:]]]]])
['p', common.MP(q)[4:]], ['q', common.MP(p)[4:]], ['a', common.MP(obj.d%(q-1))[4:]], ['b', common.MP(obj.d%(p-1))[4:]], ['c', common.MP(Util.number.inverse(p, q))[4:]]]]])
def makePrivateKeyString_lsh(obj, passphrase): #assert not passphrase keyType = objectType(obj) if keyType == 'ssh-rsa': return sexpy.pack([['private-key', ['rsa-pkcs1', ['n', common.MP(obj.n)[4:]], ['e', common.MP(obj.e)[4:]], ['d', common.MP(obj.d)[4:]], ['p', common.MP(obj.p)[4:]], ['q', common.MP(obj.q)[4:]], ['a', common.MP(obj.d%(obj.p-1))[4:]], ['b', common.MP(obj.d%(obj.q-1))[4:]], ['c', common.MP(Util.number.inverse(obj.q, obj.p))[4:]]]]]) elif keyType == 'ssh-dss': return sexpy.pack([['private-key', ['dsa', ['p', common.MP(obj.p)[4:]], ['q', common.MP(obj.q)[4:]], ['g', common.MP(obj.g)[4:]], ['y', common.MP(obj.y)[4:]], ['x', common.MP(obj.x)[4:]]]]]) else: raise BadKeyError('bad keyType %s' % keyType)
3cf1ed6058067c1597ae54cb3a1cd95725a1e8d1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/3cf1ed6058067c1597ae54cb3a1cd95725a1e8d1/keys.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 10824, 780, 67, 80, 674, 12, 2603, 16, 15244, 4672, 468, 11231, 486, 15244, 14867, 273, 16400, 12, 2603, 13, 309, 14867, 422, 296, 10975, 17, 24654, 4278, 327, 19631, 2074, 18, 292...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 10824, 780, 67, 80, 674, 12, 2603, 16, 15244, 4672, 468, 11231, 486, 15244, 14867, 273, 16400, 12, 2603, 13, 309, 14867, 422, 296, 10975, 17, 24654, 4278, 327, 19631, 2074, 18, 292...
send_subprocess(['git', 'clean', '-fxdq'], path=path)
if self.added: send_subprocess(['git', 'clean', '-fxdq'], path=self.path) self.added.clear() self.changed.clear()
def _abort_changes(self): cache = self.cache path = self.path to_add = self._to_add
3faba4a24cd4eaf0a1e3725c3cf35e7e68fc661b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12681/3faba4a24cd4eaf0a1e3725c3cf35e7e68fc661b/database.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 18623, 67, 6329, 12, 2890, 4672, 1247, 273, 365, 18, 2493, 589, 273, 365, 18, 803, 358, 67, 1289, 273, 365, 6315, 869, 67, 1289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 18623, 67, 6329, 12, 2890, 4672, 1247, 273, 365, 18, 2493, 589, 273, 365, 18, 803, 358, 67, 1289, 273, 365, 6315, 869, 67, 1289, 2, -100, -100, -100, -100, -100, -100, -100, -100,...
""" make -C '$(1)' -j '$(JOBS)' libbz2.a """
""" make install """
def buildAll() : for name in packageOrder : build(name)
562268164ac29d52a79c3d3ea3a433ed0badb027 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1456/562268164ac29d52a79c3d3ea3a433ed0badb027/setup_mingw.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 1595, 1435, 294, 364, 508, 316, 2181, 2448, 294, 1361, 12, 529, 13, 377, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 1595, 1435, 294, 364, 508, 316, 2181, 2448, 294, 1361, 12, 529, 13, 377, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
return delta.months + delta .years * 12
return delta.months + delta.years * 12
def _get_maintenance_month_qty_from_start_end(self, cr, uid, start, end): delta = DateTime.RelativeDateDiff(end + RelativeDateTime(days=fixed_days_before_month_end + 1), start) return delta.months + delta .years * 12
4e7383fcc48fc6d9ac6de042fc37dcda7c7991df /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7339/4e7383fcc48fc6d9ac6de042fc37dcda7c7991df/sale.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 29715, 67, 7496, 67, 85, 4098, 67, 2080, 67, 1937, 67, 409, 12, 2890, 16, 4422, 16, 4555, 16, 787, 16, 679, 4672, 3622, 273, 3716, 18, 8574, 1626, 5938, 12, 409, 397, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 29715, 67, 7496, 67, 85, 4098, 67, 2080, 67, 1937, 67, 409, 12, 2890, 16, 4422, 16, 4555, 16, 787, 16, 679, 4672, 3622, 273, 3716, 18, 8574, 1626, 5938, 12, 409, 397, ...
fw = dict(lower=framework.lower(), upper=framework.upper(), cap=framework.capitalize()) fwpth = "Library/Frameworks/%(cap)s.framework/%(lower)sConfig.sh" % fw sysfw = os.path.join('/System', fwpth)
fwpth = 'Library/Frameworks/Tcl.framework/Versions/Current' sysfw = os.path.join(SDKPATH, 'System', fwpth)
def checkEnvironment(): """ Check that we're running on a supported system. """ if platform.system() != 'Darwin': fatal("This script should be run on a Mac OS X 10.4 (or later) system") if int(platform.release().split('.')[0]) < 8: fatal("This script should be run on a Mac OS X 10.4 (or later) system") if not os.path.exists(SDKPATH): fatal("Please install the latest version of Xcode and the %s SDK"%( os.path.basename(SDKPATH[:-4]))) # Because we only support dynamic load of only one major/minor version of # Tcl/Tk, ensure: # 1. there are no user-installed frameworks of Tcl/Tk with version # higher than the Apple-supplied system version # 2. there is a user-installed framework in /Library/Frameworks with the # same version as the system version. This allows users to choose # to install a newer patch level. for framework in ['Tcl', 'Tk']: fw = dict(lower=framework.lower(), upper=framework.upper(), cap=framework.capitalize()) fwpth = "Library/Frameworks/%(cap)s.framework/%(lower)sConfig.sh" % fw sysfw = os.path.join('/System', fwpth) libfw = os.path.join('/', fwpth) usrfw = os.path.join(os.getenv('HOME'), fwpth) version = "%(upper)s_VERSION" % fw if getTclTkVersion(libfw, version) != getTclTkVersion(sysfw, version): fatal("Version of %s must match %s" % (libfw, sysfw) ) if os.path.exists(usrfw): fatal("Please rename %s to avoid possible dynamic load issues." % usrfw) # Remove inherited environment variables which might influence build environ_var_prefixes = ['CPATH', 'C_INCLUDE_', 'DYLD_', 'LANG', 'LC_', 'LD_', 'LIBRARY_', 'PATH', 'PYTHON'] for ev in list(os.environ): for prefix in environ_var_prefixes: if ev.startswith(prefix) : print "INFO: deleting environment variable %s=%s" % ( ev, os.environ[ev]) del os.environ[ev] os.environ['PATH'] = '/bin:/sbin:/usr/bin:/usr/sbin' print "Setting default PATH: %s"%(os.environ['PATH'])
d54d355ae0a4f89259661991480939fabe2f7da0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12029/d54d355ae0a4f89259661991480939fabe2f7da0/build-installer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 5494, 13332, 3536, 2073, 716, 732, 4565, 3549, 603, 279, 3260, 2619, 18, 3536, 225, 309, 4072, 18, 4299, 1435, 480, 296, 40, 19992, 4278, 10081, 2932, 2503, 2728, 1410, 506, 1086, 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, 866, 5494, 13332, 3536, 2073, 716, 732, 4565, 3549, 603, 279, 3260, 2619, 18, 3536, 225, 309, 4072, 18, 4299, 1435, 480, 296, 40, 19992, 4278, 10081, 2932, 2503, 2728, 1410, 506, 1086, 6...
new_keysyms.append(unichr(int(keysyms[1], 16)))
unicode_char = unichr(int(keysyms[1], 16))
def get_keymap_table(): keymap = {} keymap_table = cmd_keymap_table() re_line = re.compile(r'0x\w+') for line in keymap_table.split('\n')[1:]: if len(line) > 0: keycode = re.search(r'\s+(\d+).*', line) if keycode: new_keysyms = [] keycode = int(keycode.group(1)) keysyms = re_line.findall(line) # When you press only one key try: new_keysyms.append(unichr(int(keysyms[0], 16))) except: new_keysyms.append('') # When you press a key plus Shift key try: new_keysyms.append(unichr(int(keysyms[1], 16))) except: new_keysyms.append('') # When you press a key plus meta (dead keys) try: new_keysyms.append(unichr(int(keysyms[4], 16))) except: new_keysyms.append('') # When you press a key plus meta plus Shift key (dead keys) try: new_keysyms.append(unichr(int(keysyms[5], 16))) except: new_keysyms.append('') keymap[keycode-8] = new_keysyms return keymap
e8245fe51ea61f1764c2053166427459a0c9f3ad /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4183/e8245fe51ea61f1764c2053166427459a0c9f3ad/modmap.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 856, 1458, 67, 2121, 13332, 498, 1458, 273, 2618, 225, 498, 1458, 67, 2121, 273, 1797, 67, 856, 1458, 67, 2121, 1435, 225, 283, 67, 1369, 273, 283, 18, 11100, 12, 86, 11, 20...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 856, 1458, 67, 2121, 13332, 498, 1458, 273, 2618, 225, 498, 1458, 67, 2121, 273, 1797, 67, 856, 1458, 67, 2121, 1435, 225, 283, 67, 1369, 273, 283, 18, 11100, 12, 86, 11, 20...
def reorder_slice(self, nslice):
def reorder_slice(self, nslice, sorted, indices, tmp_sorted, tmp_indices):
def reorder_slice(self, nslice): """Copy & reorder the slice in source to final destination.""" ss = self.slicesize ssorted = self.slice_sorted; sindices = self.slice_indices # Load the second part in buffers self.read_slice(self.tmp.sorted, nslice, ssorted[ss:]) self.read_slice(self.tmp.indices, nslice, sindices[ss:]) indexesExtension.keysort(ssorted, sindices) # Write the first part of the buffers to the regular indices self.write_slice(self.sorted, nslice-1, ssorted[:ss]) self.write_slice(self.indices, nslice-1, sindices[:ss]) # Update caches self.update_caches(nslice-1, ssorted[:ss]) # Shift the slice in the end to the beginning ssorted[:ss] = ssorted[ss:]; sindices[:ss] = sindices[ss:]
4ec73663a9c5b2970b2d92f44b26adce15ac2395 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12687/4ec73663a9c5b2970b2d92f44b26adce15ac2395/index.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 19427, 67, 6665, 12, 2890, 16, 3153, 2008, 16, 3115, 16, 4295, 16, 1853, 67, 10350, 16, 1853, 67, 6836, 4672, 3536, 2951, 473, 19427, 326, 2788, 316, 1084, 358, 727, 2929, 12123, 5202, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 19427, 67, 6665, 12, 2890, 16, 3153, 2008, 16, 3115, 16, 4295, 16, 1853, 67, 10350, 16, 1853, 67, 6836, 4672, 3536, 2951, 473, 19427, 326, 2788, 316, 1084, 358, 727, 2929, 12123, 5202, ...
onScreenDebug.add("height", height)
if __debug__: onScreenDebug.add("height", height)
def determineHeight(self): """ returns the height of the avatar above the ground. If there is no floor below the avatar, 0.0 is returned. aka get airborne height. """ if self.useLifter: height = self.avatarNodePath.getPos(self.cRayNodePath) # If the shadow where not pointed strait down, we would need to # get magnitude of the vector. Since it is strait down, we'll # just get the z: #spammy --> assert self.debugPrint("getAirborneHeight() returning %s"%(height.getZ(),)) assert onScreenDebug.add("height", height.getZ()) return height.getZ() - self.floorOffset else: # useCollisionHandlerQueue """ returns the height of the avatar above the ground. If there is no floor below the avatar, 0.0 is returned. aka get airborne height. """ height = 0.0 #*#self.cRayTrav.traverse(render) if self.cRayQueue.getNumEntries() != 0: # ...we have a floor. # Choose the highest of the possibly several floors we're over: self.cRayQueue.sortEntries() floorPoint = self.cRayQueue.getEntry(0).getFromIntersectionPoint() height = -floorPoint.getZ() self.cRayQueue.clearEntries() onScreenDebug.add("height", height) return height
083c874d5b73c7fdd22e74516f8e55d6aff6772d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7242/083c874d5b73c7fdd22e74516f8e55d6aff6772d/PhysicsWalker.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4199, 2686, 12, 2890, 4672, 3536, 1135, 326, 2072, 434, 326, 16910, 5721, 326, 19209, 18, 971, 1915, 353, 1158, 6346, 5712, 326, 16910, 16, 374, 18, 20, 353, 2106, 18, 28105, 336, 23350,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4199, 2686, 12, 2890, 4672, 3536, 1135, 326, 2072, 434, 326, 16910, 5721, 326, 19209, 18, 971, 1915, 353, 1158, 6346, 5712, 326, 16910, 16, 374, 18, 20, 353, 2106, 18, 28105, 336, 23350,...
interrupted=None,
interrupted=None, timezone=None,
def __init__(self, author=None, category=None, contributor=None, generator=None, icon=None, atom_id=None, link=None, logo=None, rights=None, subtitle=None, title=None, updated=None, entry=None, total_results=None, start_index=None, items_per_page=None, interrupted=None, extension_elements=None, extension_attributes=None, text=None): gdata.BatchFeed.__init__(self, author=author, category=category, contributor=contributor, generator=generator, icon=icon, atom_id=atom_id, link=link, logo=logo, rights=rights, subtitle=subtitle, title=title, updated=updated, entry=entry, total_results=total_results, start_index=start_index, items_per_page=items_per_page, interrupted=interrupted, extension_elements=extension_elements, extension_attributes=extension_attributes, text=text)
9fdc919de49536d0b8f55253abe7eea42a983741 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10620/9fdc919de49536d0b8f55253abe7eea42a983741/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2869, 33, 7036, 16, 3150, 33, 7036, 16, 31123, 33, 7036, 16, 4456, 33, 7036, 16, 4126, 33, 7036, 16, 3179, 67, 350, 33, 7036, 16, 1692, 33, 7036, 16, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2869, 33, 7036, 16, 3150, 33, 7036, 16, 31123, 33, 7036, 16, 4456, 33, 7036, 16, 4126, 33, 7036, 16, 3179, 67, 350, 33, 7036, 16, 1692, 33, 7036, 16, ...
if ltr1 in regionName:
if charRB in regionName:
def doResize(self, regionName, evt): """Handle <Motion> event to resize the box""" newMousePos = [evt.x, evt.y] dPos = [newMousePos[ii] - self.mousePos[ii] for ii in range(2)] newRectCoords = list(self.rectCoords) cnvSize = [self.cnv.winfo_width(), self.cnv.winfo_height()] # compute the resize for (ii, ltr0, ltr1) in [(0, "L", "R"), (1, "T", "B")]: if ltr0 in regionName: adj = 0 # apply left or top resize newRectCoords[ii] += dPos[ii] if newRectCoords[ii] < 0: adj = -newRectCoords[ii] elif newRectCoords[ii] > newRectCoords[ii+2] - self.minSize: adj = (newRectCoords[ii+2] - self.minSize) - newRectCoords[ii] newRectCoords[ii] += adj newMousePos[ii] += adj if ltr1 in regionName: # apply right or lower resize adj = 0 newRectCoords[ii+2] += dPos[ii] if newRectCoords[ii+2] > cnvSize[ii]: adj = cnvSize[ii] - newRectCoords[ii+2] # - cnvSize[ii] elif newRectCoords[ii+2] < newRectCoords[ii] + self.minSize: adj = (newRectCoords[ii] + self.minSize) - newRectCoords[ii+2] newRectCoords[ii+2] += adj newMousePos[ii] += adj self.rectCoords = newRectCoords self.mousePos = newMousePos self.redraw()
c27501cab7a14477428cf8488de40d84a3a02be0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6236/c27501cab7a14477428cf8488de40d84a3a02be0/ResizableRect.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 12182, 12, 2890, 16, 3020, 461, 16, 6324, 4672, 3536, 3259, 411, 29360, 34, 871, 358, 7041, 326, 3919, 8395, 394, 9186, 1616, 273, 306, 73, 11734, 18, 92, 16, 6324, 18, 93, 65, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 12182, 12, 2890, 16, 3020, 461, 16, 6324, 4672, 3536, 3259, 411, 29360, 34, 871, 358, 7041, 326, 3919, 8395, 394, 9186, 1616, 273, 306, 73, 11734, 18, 92, 16, 6324, 18, 93, 65, ...
SongDataDict[item] = str(itm) return SongDataDict, index+1
if index == 1 and curIndx == count-1: curIndx = -1 elif index == -1 and curIndx == 0: curIndx = count index += curIndx tmpObject = self.MM.Player.PlaylistItems(index) for item in SongDataDict.iterkeys(): itm = getattr(tmpObject,item) if type(itm) == unicode: SongDataDict[item] = itm else: SongDataDict[item] = str(itm) return SongDataDict, index+1
def GetSongData(self,index): repeat = self.MM.Player.isRepeat SongDataDict = dict([(item[2],None) for item in SONG_TABLE_FIELDS if item[2] != ""]) curIndx = self.MM.Player.CurrentSongIndex count = self.MM.Player.PlaylistCount if not repeat: if (index == 1 and curIndx == count-1) or (index == -1 and curIndx == 0): return None,None else: if index == 1 and curIndx == count-1: curIndx = -1 elif index == -1 and curIndx == 0: curIndx = count index += curIndx tmpObject = self.MM.Player.PlaylistItems(index) for item in SongDataDict.iterkeys(): itm = getattr(tmpObject,item) if type(itm) == unicode: SongDataDict[item] = itm else: SongDataDict[item] = str(itm) return SongDataDict, index+1
00e4fd0138f9a3789c536c9ec79d8dcf4f1aa706 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8076/00e4fd0138f9a3789c536c9ec79d8dcf4f1aa706/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 968, 55, 932, 751, 12, 2890, 16, 1615, 4672, 7666, 273, 365, 18, 8206, 18, 12148, 18, 291, 16750, 348, 932, 751, 5014, 273, 2065, 3816, 12, 1726, 63, 22, 6487, 7036, 13, 364, 761, 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, 968, 55, 932, 751, 12, 2890, 16, 1615, 4672, 7666, 273, 365, 18, 8206, 18, 12148, 18, 291, 16750, 348, 932, 751, 5014, 273, 2065, 3816, 12, 1726, 63, 22, 6487, 7036, 13, 364, 761, 31...
image = wx.wxEmptyImage(self.matrix.shape[0],self.matrix.shape[1])
image = wx.wxEmptyImage(self.matrix.shape[1],self.matrix.shape[0])
def form_image(self): # look up colormap if it si identified by a string if type(self.colormap) == type(''): try: colormap = colormap_map[self.colormap] except KeyError: raise KeyError, 'Invalid colormap name. Choose from %s' \ % `colormap_map.keys()` else: colormap = self.colormap # scale image if we're supposed to. if self.scale in ['yes','on']: scaled_mag = self.scale_magnitude(self.matrix,colormap) else: scaled_mag = self.matrix.astype('b') scaled_mag = clip(scaled_mag,0,len(colormap)-1) if float(maximum.reduce(ravel(colormap))) == 1.: cmap = colormap * 255 else: cmap = colormap pixels = take( cmap, scaled_mag) del scaled_mag bitmap = pixels.astype(UnsignedInt8).tostring() image = wx.wxEmptyImage(self.matrix.shape[0],self.matrix.shape[1]) image.SetData(bitmap) return image
5418e2ef7c1d6ad75b66d8f5ac3a7f580289bd32 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/5418e2ef7c1d6ad75b66d8f5ac3a7f580289bd32/plot_objects.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 646, 67, 2730, 12, 2890, 4672, 468, 2324, 731, 24806, 309, 518, 7533, 9283, 635, 279, 533, 309, 618, 12, 2890, 18, 1293, 18804, 13, 422, 618, 2668, 11, 4672, 775, 30, 24806, 273, 24806...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 646, 67, 2730, 12, 2890, 4672, 468, 2324, 731, 24806, 309, 518, 7533, 9283, 635, 279, 533, 309, 618, 12, 2890, 18, 1293, 18804, 13, 422, 618, 2668, 11, 4672, 775, 30, 24806, 273, 24806...
if hasattr(Configuration, 'userToRunAs'): uid = pwd.getpwnam(Configuration.userToRunAs)[2] if hasattr(os, 'seteuid'): os.seteuid(os.getuid()) os.setuid(uid)
if userToRunAs is not None: uid = pwd.getpwnam(userToRunAs)[2] os.setuid(uid)
def run(self): import Hooks
f77c4261826f500d1b68866d5744251a90a8abcc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2304/f77c4261826f500d1b68866d5744251a90a8abcc/Server.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 1930, 13725, 87, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 1086, 12, 2890, 4672, 1930, 13725, 87, 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, -1...
self.sock.send(buf)
"""Blocking send. We use a stupid retry loop instead of using PyBlueZ's blocking sockets, since its blocking is non-interruptible. """ while buf: count = self.sock.send(buf) assert count >= 0 if count > 0: buf = buf[count:] else: time.sleep(0.01)
def _send(self, buf): self.sock.send(buf)
a2f109b27f45204fd47b16451693f3cf88f5dfeb /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6757/a2f109b27f45204fd47b16451693f3cf88f5dfeb/test-client.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4661, 12, 2890, 16, 1681, 4672, 3536, 8728, 1366, 18, 1660, 999, 279, 384, 416, 350, 3300, 2798, 3560, 434, 1450, 4707, 27986, 62, 1807, 9445, 16762, 16, 3241, 2097, 9445, 353, 1661...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4661, 12, 2890, 16, 1681, 4672, 3536, 8728, 1366, 18, 1660, 999, 279, 384, 416, 350, 3300, 2798, 3560, 434, 1450, 4707, 27986, 62, 1807, 9445, 16762, 16, 3241, 2097, 9445, 353, 1661...
u = urllib2.urlopen("ftp://ftp.mirror.nl/pub/mirror/gnu/", timeout=None)
u = _urlopen_with_retry(self.FTP_HOST, timeout=None)
def test_ftp_NoneNodefault(self): u = urllib2.urlopen("ftp://ftp.mirror.nl/pub/mirror/gnu/", timeout=None) self.assertTrue(u.fp.fp._sock.gettimeout() is None)
b0a6dbd218e0b3c92b3a49454b888b6e15ea563c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12029/b0a6dbd218e0b3c92b3a49454b888b6e15ea563c/test_urllib2net.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 11727, 67, 7036, 907, 643, 12, 2890, 4672, 582, 273, 389, 295, 18589, 67, 1918, 67, 9620, 12, 2890, 18, 17104, 67, 8908, 16, 2021, 33, 7036, 13, 365, 18, 11231, 5510, 12, 8...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 11727, 67, 7036, 907, 643, 12, 2890, 4672, 582, 273, 389, 295, 18589, 67, 1918, 67, 9620, 12, 2890, 18, 17104, 67, 8908, 16, 2021, 33, 7036, 13, 365, 18, 11231, 5510, 12, 8...
first discriminant < -4 that satisfies the Heegner hypothesis
first discriminant < -4 that satisfies the Heegner hypothesis
def heegner_index_bound(self, D=0, prec=5, verbose=True, max_height=_MAX_HEIGHT): """ Assume self has rank 0. Return a list v of primes such that if an odd prime p divides the index of the the Heegner point in the group of rational points *modulo torsion*, then p is in v.
92160f8928a0d15c605f7edb7321e90dc2f9a26b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/92160f8928a0d15c605f7edb7321e90dc2f9a26b/ell_rational_field.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3904, 1332, 1224, 67, 1615, 67, 3653, 12, 2890, 16, 463, 33, 20, 16, 225, 13382, 33, 25, 16, 3988, 33, 5510, 16, 943, 67, 4210, 33, 67, 6694, 67, 14595, 4672, 3536, 15983, 365, 711, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3904, 1332, 1224, 67, 1615, 67, 3653, 12, 2890, 16, 463, 33, 20, 16, 225, 13382, 33, 25, 16, 3988, 33, 5510, 16, 943, 67, 4210, 33, 67, 6694, 67, 14595, 4672, 3536, 15983, 365, 711, ...
- ``unit``
- ``unit``
def base_units(unit): """ Converts unit to base SI units. INPUT: - ``unit`` OUTPUT: - `symbolic expression` EXAMPLES:: sage: sage.symbolic.units.base_units(units.length.foot) 381/1250*meter If unit is already a base unit, it just returns that unit:: sage: sage.symbolic.units.base_units(units.length.meter) meter Derived units get broken down into their base parts:: sage: sage.symbolic.units.base_units(units.force.newton) kilogram*meter/second^2 sage: sage.symbolic.units.base_units(units.volume.liter) 1/1000*meter^3 Returns variable if 'unit' is not a unit:: sage: sage.symbolic.units.base_units(var('x')) x """ from sage.misc.all import sage_eval if not unit_to_type.has_key(str(unit)): return unit elif unit_to_type[str(unit)] == 'si_prefixes' or unit_to_type[str(unit)] == 'unit_multipliers': return sage_eval(unitdict[unit_to_type[str(unit)]][str(unit)]) else: v = SR.var(unit_to_type[str(unit)]) if unit_derivations.has_key(str(v)): base = unit_derivations_expr(v) for i in base.variables(): base = base.subs({i:SR.var(value_to_unit[str(i)]['1'])}) return base*sage_eval(unitdict[str(v)][str(unit)]) else: base = SR.var(value_to_unit[str(v)]['1'])*sage_eval(unitdict[str(v)][str(unit)]) return base
36d2f28c044694ad73a4a70a9d869366d0e39ec4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/36d2f28c044694ad73a4a70a9d869366d0e39ec4/units.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1026, 67, 7705, 12, 4873, 4672, 3536, 20377, 2836, 358, 1026, 5705, 4971, 18, 225, 12943, 30, 225, 300, 12176, 4873, 10335, 225, 11550, 30, 225, 300, 1375, 9009, 12164, 2652, 68, 225, 56...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1026, 67, 7705, 12, 4873, 4672, 3536, 20377, 2836, 358, 1026, 5705, 4971, 18, 225, 12943, 30, 225, 300, 12176, 4873, 10335, 225, 11550, 30, 225, 300, 1375, 9009, 12164, 2652, 68, 225, 56...
r="%s%s\n\n%s" % (r,s[0],self.pre(s[1],1)) if not tagged: r=r+'</XMP>\n'
r="%s%s\n\n%s" % (r,html_quote(s[0]),self.pre(s[1],1)) if not tagged: r=r+'</PRE>\n'
def pre(self,structure,tagged=0):
4bf472476dd8f1951924bc51314fa330c37ae22f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/4bf472476dd8f1951924bc51314fa330c37ae22f/StructuredText.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 675, 12, 2890, 16, 7627, 16, 23023, 33, 20, 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,...
[ 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, 675, 12, 2890, 16, 7627, 16, 23023, 33, 20, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
print "check_moderated for %s" % self.id print self._subscribers
def check_moderated_variables(self): print "check_moderated for %s" % self.id print self._subscribers if len(self._subscribers) <= 0: return print "check_moderated for %s" % self.id variables = moderated_variables[self.get_type()] notify = [] for v in variables: if self._variables[0][v].updated == True: self._variables[0][v].updated = False notify.append(self._variables[0][v]) self.propagate_notification(notify)
86a3d0345cb1b5db61a85fa7c0fe938bb8024df6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11626/86a3d0345cb1b5db61a85fa7c0fe938bb8024df6/service.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 1711, 19007, 67, 7528, 12, 2890, 4672, 282, 309, 562, 12, 2890, 6315, 1717, 17769, 13, 1648, 374, 30, 327, 1172, 315, 1893, 67, 1711, 19007, 364, 738, 87, 6, 738, 365, 18, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 1711, 19007, 67, 7528, 12, 2890, 4672, 282, 309, 562, 12, 2890, 6315, 1717, 17769, 13, 1648, 374, 30, 327, 1172, 315, 1893, 67, 1711, 19007, 364, 738, 87, 6, 738, 365, 18, 3...
assert gc.collect() > 0
if gc.collect() == 0: raise TestFailed
def __init__(self): self.init = self.__init__
419afec2d7b22fe8cf5fdba072bbc63384a4dad6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/419afec2d7b22fe8cf5fdba072bbc63384a4dad6/test_gc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 365, 18, 2738, 273, 365, 16186, 2738, 972, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 365, 18, 2738, 273, 365, 16186, 2738, 972, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
name_plurality = self._MapUnion(name_plurality, npdm)
name_plurality = self._MapDisjunction(name_plurality, npdm)
def nameBasedPlurality (self): """Return a map from expanded names to pairs consisting of a boolean representing the plurality of the aggregated name, and the element base declaration with that name.
9753ac9b33520d9a13f831252522d4c2749e8041 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7171/9753ac9b33520d9a13f831252522d4c2749e8041/structures.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 508, 9802, 12968, 560, 261, 2890, 4672, 3536, 990, 279, 852, 628, 8406, 1257, 358, 5574, 23570, 434, 279, 1250, 5123, 326, 7978, 560, 434, 326, 16165, 508, 16, 471, 326, 930, 1026, 8266,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 508, 9802, 12968, 560, 261, 2890, 4672, 3536, 990, 279, 852, 628, 8406, 1257, 358, 5574, 23570, 434, 279, 1250, 5123, 326, 7978, 560, 434, 326, 16165, 508, 16, 471, 326, 930, 1026, 8266,...
if s[1][0]=='\xc2' and s[1][1]=='\x86':
if ord(s[1][0])==0xc2 and ord(s[1][1])==0x86:
def readServiceList(self): serviceHandler = eServiceCenter.getInstance() refstr = '%s ORDER BY name' % (service_types_tv) self.root = eServiceReference(refstr) self.servicesList = {} list = serviceHandler.list(self.root) if list is not None: services = list.getContent("CN", True) #(servicecomparestring, name) for s in services: if s[1][0]=='\xc2' and s[1][1]=='\x86': # ignore shortname brackets key = s[1].lower()[2] else: key = s[1].lower()[0] if key < 'a' or key > 'z': key = chr(SPECIAL_CHAR) #key = str(key) if not self.servicesList.has_key(key): self.servicesList[key] = [] self.servicesList[key].append(s)
d30355fd9062e6333af64e64a9a4847ac76ed73e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6652/d30355fd9062e6333af64e64a9a4847ac76ed73e/ParentalControlSetup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 1179, 682, 12, 2890, 4672, 1156, 1503, 273, 425, 1179, 8449, 18, 588, 1442, 1435, 1278, 701, 273, 1995, 87, 10205, 6953, 508, 11, 738, 261, 3278, 67, 2352, 67, 24161, 13, 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, 855, 1179, 682, 12, 2890, 4672, 1156, 1503, 273, 425, 1179, 8449, 18, 588, 1442, 1435, 1278, 701, 273, 1995, 87, 10205, 6953, 508, 11, 738, 261, 3278, 67, 2352, 67, 24161, 13, 365, 18,...
scope -- see the documentaion of this class.
scope -- see the documentation of this class.
def set_pause_context(self, value, scope=Scope.SELF): """Set the amount of context when resuming a paused message.
7c9633115d399a569dd8e2ac33c37854b07f2e0f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7484/7c9633115d399a569dd8e2ac33c37854b07f2e0f/client.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 19476, 67, 2472, 12, 2890, 16, 460, 16, 2146, 33, 3876, 18, 26280, 4672, 3536, 694, 326, 3844, 434, 819, 1347, 400, 21249, 279, 17781, 883, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 19476, 67, 2472, 12, 2890, 16, 460, 16, 2146, 33, 3876, 18, 26280, 4672, 3536, 694, 326, 3844, 434, 819, 1347, 400, 21249, 279, 17781, 883, 18, 2, -100, -100, -100, -100, -100...
os.chdir(self.resultsdir)
os.chdir(self.tmpdir) args += " -c"
def execute(self, iterations = 1, args = ''): os.chdir(self.resultsdir) for i in range(1, iterations+1): system(self.srcdir + '/interbench -m \'run #%s\'' % i \ + args)
cd36ea2fe653d9b9081c50b7446b04565a14d2bd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12268/cd36ea2fe653d9b9081c50b7446b04565a14d2bd/interbench.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1836, 12, 2890, 16, 11316, 273, 404, 16, 833, 273, 875, 4672, 1140, 18, 343, 1214, 12, 2890, 18, 5645, 1214, 13, 833, 1011, 315, 300, 71, 6, 225, 364, 277, 316, 1048, 12, 21, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1836, 12, 2890, 16, 11316, 273, 404, 16, 833, 273, 875, 4672, 1140, 18, 343, 1214, 12, 2890, 18, 5645, 1214, 13, 833, 1011, 315, 300, 71, 6, 225, 364, 277, 316, 1048, 12, 21, 16, 1...
self.write(cr,uid, map(lambda x: x.id, todo), {'state':'to upgrade'}, context=context)
ids = map(lambda x: x.id, todo) self.write(cr, uid, ids, {'state':'to upgrade'}, context=context) self.button_install(cr, uid, ids, context=context)
def button_upgrade(self, cr, uid, ids, context=None): depobj = self.pool.get('ir.module.module.dependency') todo = self.browse(cr, uid, ids, context=context) i = 0 while i<len(todo): mod = todo[i] i += 1 if mod.state not in ('installed','to upgrade'): raise orm.except_orm(_('Error'), _("Can not upgrade module '%s'. It is not installed.") % (mod.name,)) iids = depobj.search(cr, uid, [('name', '=', mod.name)], context=context) for dep in depobj.browse(cr, uid, iids, context=context): if dep.module_id.state=='installed': todo.append(dep.module_id) self.write(cr,uid, map(lambda x: x.id, todo), {'state':'to upgrade'}, context=context) return True
5e510fc9775ca75bd316b8d08319e6f57617cc0a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7397/5e510fc9775ca75bd316b8d08319e6f57617cc0a/module.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3568, 67, 15097, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 819, 33, 7036, 4672, 443, 1631, 441, 273, 365, 18, 6011, 18, 588, 2668, 481, 18, 2978, 18, 2978, 18, 15896, 6134, 10621, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3568, 67, 15097, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 819, 33, 7036, 4672, 443, 1631, 441, 273, 365, 18, 6011, 18, 588, 2668, 481, 18, 2978, 18, 2978, 18, 15896, 6134, 10621, ...
if (game.options & OPTION_SHOWME) and i == game.quadrant.x and j == game.quadrant.y:
if (game.options & OPTION_SHOWME) and i == game.quadrant.i and j == game.quadrant.j:
def chart(): "Display the star chart." scanner.chew() if (game.options & OPTION_AUTOSCAN): lrscan(silent=True) if not damaged(DRADIO): rechart() if game.lastchart < game.state.date and game.condition == "docked": prout(_("Spock- \"I revised the Star Chart from the starbase's records.\"")) rechart() prout(_(" STAR CHART FOR THE KNOWN GALAXY")) if game.state.date > game.lastchart: prout(_("(Last surveillance update %d stardates ago).") % ((int)(game.state.date-game.lastchart))) prout(" 1 2 3 4 5 6 7 8") for i in range(GALSIZE): proutn("%d |" % (i+1)) for j in range(GALSIZE): if (game.options & OPTION_SHOWME) and i == game.quadrant.x and j == game.quadrant.y: proutn("<") else: proutn(" ") if game.state.galaxy[i][j].supernova: show = "***" elif not game.state.galaxy[i][j].charted and game.state.galaxy[i][j].starbase: show = ".1." elif game.state.galaxy[i][j].charted: show = "%3d" % (game.state.chart[i][j].klingons*100 + game.state.chart[i][j].starbase * 10 + game.state.chart[i][j].stars) else: show = "..." proutn(show) if (game.options & OPTION_SHOWME) and i == game.quadrant.x and j == game.quadrant.y: proutn(">") else: proutn(" ") proutn(" |") if i<GALSIZE: skip(1)
e67cf36a789c4ab1cd905a9a08e91d219395f538 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3176/e67cf36a789c4ab1cd905a9a08e91d219395f538/sst.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4980, 13332, 315, 4236, 326, 10443, 4980, 1199, 7683, 18, 343, 359, 1435, 309, 261, 13957, 18, 2116, 473, 7845, 67, 18909, 2312, 1258, 4672, 12226, 9871, 12, 21862, 33, 5510, 13, 309, 48...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4980, 13332, 315, 4236, 326, 10443, 4980, 1199, 7683, 18, 343, 359, 1435, 309, 261, 13957, 18, 2116, 473, 7845, 67, 18909, 2312, 1258, 4672, 12226, 9871, 12, 21862, 33, 5510, 13, 309, 48...
print "Compressed [%s]: %s" % (compressedIndex, compressSource)
if options.verbose: print " * Compressed [%s]: %s" % (compressedIndex, compressSource) compressedCounter[compressSource] += 1
def execute(options): if options.sourceDirectories == None or len(options.sourceDirectories) == 0: basename = os.path.basename(sys.argv[0]) print "You must define at least one source directory!" print "usage: %s [options]" % basename print "Try '%s -h' or '%s --help' to show the help message." % (basename, basename) sys.exit(1) print print " PREPARING:" print "***********************************************************************************************" print " * Loading source directory content..." # Normalizing directories i=0 for directory in options.sourceDirectories: options.sourceDirectories[i] = os.path.normpath(options.sourceDirectories[i]) i+=1 scanResult = loader.scanAll(options.sourceDirectories) sortedIncludeList = loader.getSortedList(options, scanResult) if options.outputFiles: print print " KNOWN FILES:" print "***********************************************************************************************" for key in scanResult["files"]: print " %s (%s)" % (key, scanResult["files"][key]) if options.outputModules: print print " KNOWN MODULES:" print "***********************************************************************************************" for pkg in scanResult["modules"]: print " * %s" % pkg for key in scanResult["modules"][pkg]: print " - %s" % key if options.outputList: print print " INCLUDE ORDER:" print "***********************************************************************************************" for key in sortedIncludeList: print " * %s" % key if options.copyResources: print print " COPY RESOURCES:" print "***********************************************************************************************" print " * Creating needed directories..." if options.copyResources: if options.resourceDirectory == None: print " * You must define the resource directory!" sys.exit(1) else: options.resourceDirectory = os.path.normpath(options.resourceDirectory) # Normalizing directory if not os.path.exists(options.resourceDirectory): os.makedirs(options.resourceDirectory) for fileId in sortedIncludeList: filePath = scanResult["files"][fileId] fileContent = file(filePath, "r").read() fileResourceList = loader.extractResources(fileContent) if len(fileResourceList) > 0: print " * Found %i resources in %s" % (len(fileResourceList), fileId) for fileResource in fileResourceList: resourceId = fileId + "." + fileResource resourcePath = resourceId.replace(".", os.sep) if options.verbose: print " * ResourcePath: %s" % resourcePath sourceDir = os.path.join(os.path.dirname(filePath), fileResource) destDir = os.path.join(options.resourceDirectory, resourcePath) for root, dirs, files in os.walk(sourceDir): # Filter ignored directories for ignoredDir in config.DIRIGNORE: if ignoredDir in dirs: dirs.remove(ignoredDir) # Searching for items (resource files) for itemName in files: # Generate absolute source file path itemSourcePath = os.path.join(root, itemName) # Extract relative path and directory itemRelPath = itemSourcePath.replace(sourceDir + os.sep, "") itemRelDir = os.path.dirname(itemRelPath) # Generate destination directory and file path itemDestDir = os.path.join(destDir, itemRelDir) itemDestPath = os.path.join(itemDestDir, itemName) # Check/Create destination directory if not os.path.exists(itemDestDir): os.makedirs(itemDestDir) # Copy file shutil.copyfile(itemSourcePath, itemDestPath) if options.compileSource or options.storeTokens: print print " TRANSFORMING SOURCE:" print "***********************************************************************************************" print " * Creating needed directories..." if options.storeTokens: if options.tokenDirectory == None: print " * You must define the token directory!" sys.exit(1) else: options.tokenDirectory = os.path.normpath(options.tokenDirectory) # Normalizing directory if not os.path.exists(options.tokenDirectory): os.makedirs(options.tokenDirectory) if options.compileSource or options.copyResources: if options.compileDirectory == None: print " * You must define the build directory!" sys.exit(1) else: options.compileDirectory = os.path.normpath(options.compileDirectory) # Normalizing directory if not os.path.exists(options.compileDirectory): os.makedirs(options.compileDirectory) compiledOutput = "" compressedStrings = {} compressedIndex = 0 for fileId in sortedIncludeList: print " * %s" % fileId if options.verbose: print " * reading..." fileName = scanResult["files"][fileId] fileContent = file(fileName, "r").read() fileSize = len(fileContent) / 1000.0 if options.verbose: print " * tokenizing source (%s KB)..." % fileSize tokens = tokenizer.parseStream(fileContent, fileId) if options.storeTokens: tokenString = tokenizer.convertTokensToString(tokens) tokenSize = len(tokenString) / 1000.0 if options.verbose: print " * writing tokens to file (%s KB)..." % tokenSize tokenFileName = os.path.join(options.tokenDirectory, fileId + config.TOKENEXT) tokenFile = file(tokenFileName, "w") tokenFile.write(tokenString) tokenFile.flush() tokenFile.close() if options.compressStrings: for token in tokens: if token["type"] != "string": continue compressSource = token["source"] if not compressedStrings.has_key(compressSource): compressedStrings[compressSource] = compressedIndex compressedIndex += 1 print "Compressed [%s]: %s" % (compressedIndex, compressSource) token["source"] = "qxStr[%s]" % compressedStrings[compressSource] token["detail"] = "compressed" if options.compileSource: if options.verbose: print " * compiling..." compiledFileContent = compile.compile(tokens, options.compileWithNewLines) if options.addFileIds: compiledOutput += "/* ID: " + fileId + " */\n" + compiledFileContent + "\n" else: compiledOutput += compiledFileContent compiledFileSize = len(compiledFileContent) / 1000.0 compiledFileSizeFactor = 100 - (compiledFileSize / fileSize * 100) if options.verbose: print " * compression %i%% (%s KB)" % (compiledFileSizeFactor, compiledFileSize) if options.storeSeparateScripts: if options.verbose: print " * writing compiled file..." compiledSeparateFileName = os.path.join(options.compileDirectory, fileId.replace(".", os.path.sep) + config.JSEXT) compiledSeparateFileDir = os.path.dirname(compiledSeparateFileName) # Check/Create destination directory if not os.path.exists(compiledSeparateFileDir): os.makedirs(compiledSeparateFileDir) compiledSeparateFile = file(compiledSeparateFileName, "w") compiledSeparateFile.write(compiledFileContent) compiledSeparateFile.flush() compiledSeparateFile.close() if options.compileSource: compiledOutputFileName = os.path.join(options.compileDirectory, options.compileOutputName) compiledOutputFileDir = os.path.dirname(compiledOutputFileName) # Check/Create destination directory if not os.path.exists(compiledOutputFileDir): os.makedirs(compiledOutputFileDir) compiledOutputFile = file(compiledOutputFileName, "w") compiledOutputFile.write(compiledOutput) compiledOutputFile.flush() compiledOutputFile.close()
85aacefb36d60936c37d08520d1b27007e812a55 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5718/85aacefb36d60936c37d08520d1b27007e812a55/build.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1836, 12, 2116, 4672, 309, 702, 18, 3168, 13071, 422, 599, 578, 562, 12, 2116, 18, 3168, 13071, 13, 422, 374, 30, 4882, 273, 1140, 18, 803, 18, 13909, 12, 9499, 18, 19485, 63, 20, 57...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1836, 12, 2116, 4672, 309, 702, 18, 3168, 13071, 422, 599, 578, 562, 12, 2116, 18, 3168, 13071, 13, 422, 374, 30, 4882, 273, 1140, 18, 803, 18, 13909, 12, 9499, 18, 19485, 63, 20, 57...
'file': wikiutil.escape(file), 'fsize': fsize,
'file': wikiutil.escape(file).replace(' ', '%20'), 'fsize': fsize,
def _build_filelist(request, pagename, showheader, readonly): _ = request.getText # access directory attach_dir = getAttachDir(request, pagename) files = _get_files(request, pagename) str = "" if files: if showheader: str = str + _( "To refer to attachments on a page, use '''{{{attachment:filename}}}''', \n" "as shown below in the list of files. \n" "Do '''NOT''' use the URL of the {{{[get]}}} link, \n" "since this is subject to change and can break easily." ) str = str + "<ul>" label_del = _("del") label_get = _("get") label_edit = _("edit") label_view = _("view") label_unzip = _("unzip") label_install = _("install") for file in files: fsize = float(os.stat(os.path.join(attach_dir,file).encode(config.charset))[6]) # in byte fsize = "%.1f" % (fsize / 1024) baseurl = request.getScriptname() action = action_name urlpagename = wikiutil.quoteWikinameURL(pagename) urlfile = wikiutil.url_quote_plus(file) base, ext = os.path.splitext(file) get_url = getAttachUrl(pagename, file, request, escaped=1) parmdict = {'baseurl': baseurl, 'urlpagename': urlpagename, 'action': action, 'urlfile': urlfile, 'label_del': label_del, 'base': base, 'label_edit': label_edit, 'label_view': label_view, 'label_unzip': label_unzip, 'label_install': label_install, 'get_url': get_url, 'label_get': label_get, 'file': wikiutil.escape(file), 'fsize': fsize, 'pagename': pagename} del_link = '' if request.user.may.delete(pagename) and not readonly: del_link = '<a href="%(baseurl)s/%(urlpagename)s' \ '?action=%(action)s&amp;do=del&amp;target=%(urlfile)s">%(label_del)s</a>&nbsp;| ' % parmdict if ext == '.draw': viewlink = '<a href="%(baseurl)s/%(urlpagename)s?action=%(action)s&amp;drawing=%(base)s">%(label_edit)s</a>' % parmdict else: viewlink = '<a href="%(baseurl)s/%(urlpagename)s?action=%(action)s&amp;do=view&amp;target=%(urlfile)s">%(label_view)s</a>' % parmdict if (packages.ZipPackage(request, os.path.join(attach_dir, file).encode(config.charset)).isPackage() and request.user.name in request.cfg.superuser): viewlink += ' | <a href="%(baseurl)s/%(urlpagename)s?action=%(action)s&amp;do=install&amp;target=%(urlfile)s">%(label_install)s</a>' % parmdict elif (zipfile.is_zipfile(os.path.join(attach_dir,file).encode(config.charset)) and request.user.may.read(pagename) and request.user.may.delete(pagename) and request.user.may.write(pagename)): viewlink += ' | <a href="%(baseurl)s/%(urlpagename)s?action=%(action)s&amp;do=unzip&amp;target=%(urlfile)s">%(label_unzip)s</a>' % parmdict parmdict['viewlink'] = viewlink parmdict['del_link'] = del_link str = str + ('<li>[%(del_link)s' '<a href="%(get_url)s">%(label_get)s</a>&nbsp;| %(viewlink)s]' ' (%(fsize)s KB) attachment:<strong>%(file)s</strong></li>') % parmdict str = str + "</ul>" else: if showheader: str = '%s<p>%s</p>' % (str, _("No attachments stored for %(pagename)s") % {'pagename': pagename}) return str
07f56a9b532bb552794939279e84ee4937ad6e60 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/888/07f56a9b532bb552794939279e84ee4937ad6e60/AttachFile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3510, 67, 7540, 5449, 12, 2293, 16, 4262, 1069, 16, 2405, 3374, 16, 17102, 4672, 389, 273, 590, 18, 588, 1528, 225, 468, 2006, 1867, 3306, 67, 1214, 273, 336, 4761, 1621, 12, 2293...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3510, 67, 7540, 5449, 12, 2293, 16, 4262, 1069, 16, 2405, 3374, 16, 17102, 4672, 389, 273, 590, 18, 588, 1528, 225, 468, 2006, 1867, 3306, 67, 1214, 273, 336, 4761, 1621, 12, 2293...
return executeCommand("banshee $", " ".join(commands), returnoutput=True)
return executeCommand(" ".join(["banshee"] + commands), returnoutput=True)
def banshee_command(self, commands): return executeCommand("banshee $", " ".join(commands), returnoutput=True) #return subprocess.Popen(["banshee"]+commands, stdout=subprocess.PIPE).communicate()[0]
ec6e9ed55e2bbadbe2aac00e0be1717484305e3a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8738/ec6e9ed55e2bbadbe2aac00e0be1717484305e3a/nowplaying.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 324, 634, 580, 73, 67, 3076, 12, 2890, 16, 4364, 4672, 327, 21120, 2932, 70, 634, 580, 73, 271, 3113, 315, 3552, 5701, 12, 7847, 3631, 327, 2844, 33, 5510, 13, 468, 2463, 6652, 18, 5...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 324, 634, 580, 73, 67, 3076, 12, 2890, 16, 4364, 4672, 327, 21120, 2932, 70, 634, 580, 73, 271, 3113, 315, 3552, 5701, 12, 7847, 3631, 327, 2844, 33, 5510, 13, 468, 2463, 6652, 18, 5...
main(2, 50)
main(2, 5)
def main(codeno, j): portal(codeno, Frame(j))
cbdb5c311cd3cb1679045eb3b12cb6fcf107ce8a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6934/cbdb5c311cd3cb1679045eb3b12cb6fcf107ce8a/test_recursive.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 1559, 5764, 16, 525, 4672, 11899, 12, 1559, 5764, 16, 8058, 12, 78, 3719, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 1559, 5764, 16, 525, 4672, 11899, 12, 1559, 5764, 16, 8058, 12, 78, 3719, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
%s* %s
%(uric)s* %(urilast)s
def parse(self, text, lineno, memo, parent): """ Return 2 lists: nodes (text and inline elements), and system_messages.
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, 1109, 12, 2890, 16, 977, 16, 7586, 16, 11063, 16, 982, 4672, 3536, 2000, 576, 6035, 30, 2199, 261, 955, 471, 6370, 2186, 3631, 471, 2619, 67, 6833, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 12, 2890, 16, 977, 16, 7586, 16, 11063, 16, 982, 4672, 3536, 2000, 576, 6035, 30, 2199, 261, 955, 471, 6370, 2186, 3631, 471, 2619, 67, 6833, 18, 2, -100, -100, -100, -100, -100,...
for fd in set((p2cread, c2pwrite, errwrite))-set((0,1,2)): if fd: os.close(fd)
if p2cread and p2cread not in (0,): os.close(p2cread) if c2pwrite and c2pwrite not in (p2cread, 1): os.close(c2pwrite) if errwrite and errwrite not in (p2cread, c2pwrite, 2): os.close(errwrite)
def _execute_child(self, args, executable, preexec_fn, close_fds, cwd, env, universal_newlines, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite): """Execute program (POSIX version)"""
ec05a2d5803db2e9d38e1126b8b88062b9e11ce8 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8546/ec05a2d5803db2e9d38e1126b8b88062b9e11ce8/subprocess.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8837, 67, 3624, 12, 2890, 16, 833, 16, 9070, 16, 675, 4177, 67, 4293, 16, 1746, 67, 74, 2377, 16, 7239, 16, 1550, 16, 26182, 67, 31276, 16, 11850, 1376, 16, 6710, 7133, 16, 5972...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 8837, 67, 3624, 12, 2890, 16, 833, 16, 9070, 16, 675, 4177, 67, 4293, 16, 1746, 67, 74, 2377, 16, 7239, 16, 1550, 16, 26182, 67, 31276, 16, 11850, 1376, 16, 6710, 7133, 16, 5972...
filename = self.pysrc_url(doc)
filename = urllib.unquote(self.pysrc_url(doc))
def write(self, directory=None): """ Write the documentation to the given directory.
1546f158386fe400ef62e2648ffeeeabe16992fa /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11420/1546f158386fe400ef62e2648ffeeeabe16992fa/html.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 12, 2890, 16, 1867, 33, 7036, 4672, 3536, 2598, 326, 7323, 358, 326, 864, 1867, 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, ...
[ 1, 1, 1, 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, 1045, 12, 2890, 16, 1867, 33, 7036, 4672, 3536, 2598, 326, 7323, 358, 326, 864, 1867, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
if len(line.strip()) != 0: file.write(line + '\n') if has_been_printed: file.write('/\n') line = ' ' has_been_printed = False for var in self.pb_nml.keys(): if self.pb_nml[var] != self.pb_nml_defaults[var]: if (not has_been_printed): if self.program == 'sander.APBS': file.write('&apbs\n') else: file.write('&pb\n') has_been_printed = True line = addOn(line,'%s=%s, ' % (var, self.pb_nml[var]), file)
def write(self, filename = 'mdin'): if not self.check(): # check the validity of the parameters print >> stderr, 'mdin file not written!' return -1
5fa4f46f8262f1ad5bf19b7b2c71c926bb57ae0e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8376/5fa4f46f8262f1ad5bf19b7b2c71c926bb57ae0e/mdin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 12, 2890, 16, 1544, 273, 296, 1264, 267, 11, 4672, 225, 309, 486, 365, 18, 1893, 13332, 468, 866, 326, 13800, 434, 326, 1472, 1172, 1671, 4514, 16, 296, 1264, 267, 585, 486, 5941...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 12, 2890, 16, 1544, 273, 296, 1264, 267, 11, 4672, 225, 309, 486, 365, 18, 1893, 13332, 468, 866, 326, 13800, 434, 326, 1472, 1172, 1671, 4514, 16, 296, 1264, 267, 585, 486, 5941...
def populateBackground( server, style, tiles, image ):
def populateBackground( server, cachelocation, tiles, image ):
def populateBackground( server, style, tiles, image ): rootx = tiles['x']['min'] rooty = tiles['y']['min'] zoom = str(tiles['zoom']) templocation = os.path.join(cachelocation, style) if not os.path.isdir(templocation): os.mkdir(templocation)
7a25d0ed29c6f5dedd83c457767dc9ac4a88e91d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3985/7a25d0ed29c6f5dedd83c457767dc9ac4a88e91d/gpx2png.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6490, 8199, 12, 1438, 16, 7122, 292, 4431, 16, 12568, 16, 1316, 262, 30, 1365, 92, 273, 12568, 3292, 92, 21712, 1154, 3546, 1365, 93, 273, 12568, 3292, 93, 21712, 1154, 3546, 7182, 273, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6490, 8199, 12, 1438, 16, 7122, 292, 4431, 16, 12568, 16, 1316, 262, 30, 1365, 92, 273, 12568, 3292, 92, 21712, 1154, 3546, 1365, 93, 273, 12568, 3292, 93, 21712, 1154, 3546, 7182, 273, ...
except (NameError, AttributeError):
except (NameError, AttributeError, dbus.exceptions.DBusException):
def activate_screensaver(self): """ Screen.activate_screensaver() -- activate screensaver
f495791d4bb2673e2e4c3b798dfb6c597d43f257 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7906/f495791d4bb2673e2e4c3b798dfb6c597d43f257/fullscreen.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10235, 67, 1017, 266, 773, 21851, 12, 2890, 4672, 3536, 10146, 18, 10014, 67, 1017, 266, 773, 21851, 1435, 1493, 10235, 888, 266, 773, 21851, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 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, 10235, 67, 1017, 266, 773, 21851, 12, 2890, 4672, 3536, 10146, 18, 10014, 67, 1017, 266, 773, 21851, 1435, 1493, 10235, 888, 266, 773, 21851, 2, -100, -100, -100, -100, -100, -100, -100, ...
name = dev['local_name']
name = dev['name']
def live_dev_cfg(self,dev): # # first of all, get status, if interface is down, just give up # self.updating = True
bced10be3e728c7e32309f3ce16cf534869135ca /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2587/bced10be3e728c7e32309f3ce16cf534869135ca/bluetool_config.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8429, 67, 5206, 67, 7066, 12, 2890, 16, 5206, 4672, 468, 468, 202, 3645, 434, 777, 16, 336, 1267, 16, 309, 1560, 353, 2588, 16, 2537, 8492, 731, 468, 365, 18, 5533, 1776, 273, 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, 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, 8429, 67, 5206, 67, 7066, 12, 2890, 16, 5206, 4672, 468, 468, 202, 3645, 434, 777, 16, 336, 1267, 16, 309, 1560, 353, 2588, 16, 2537, 8492, 731, 468, 365, 18, 5533, 1776, 273, 1053, ...
def start_audio_only(self): self.audio_only = True self.pipeline = gst.parse_launch('filesrc location="%s" ! decodebin ! fakesink' % (self.filename,)) self.bus = self.pipeline.get_bus() self.bus.add_signal_watch() self.watch_id = self.bus.connect("message", self.on_bus_message) self.pipeline.set_state(gst.STATE_PAUSED) def done (self): if self.saw_video_tag: type = 'video' elif self.saw_audio_tag: type = 'audio' else: type = 'other' self.callback(self.duration, self.success, type) def paused_reached(self): if self.audio_only: self.duration = self.pipeline.query_duration(gst.FORMAT_TIME)[0] self.success = True self.disconnect() self.done() if self.first_pause: self.duration = self.pipeline.query_duration(gst.FORMAT_TIME)[0] self.grabit = True seek_result = self.pipeline.seek(1.0, gst.FORMAT_TIME, gst.SEEK_FLAG_FLUSH | gst.SEEK_FLAG_ACCURATE, gst.SEEK_TYPE_SET, self.duration / 2, gst.SEEK_TYPE_NONE, 0) if not seek_result: self.disconnect() self.done() self.first_pause = False return False def error_occurred(self): self.disconnect() if self.audio_only: self.done() else: self.start_audio_only() return False
def __init__(self, filename, thumbnail_filename, callback):
9ec3a8ff57978fde4b3a57d656b012c6d994d233 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12354/9ec3a8ff57978fde4b3a57d656b012c6d994d233/gst_extractor.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1544, 16, 9134, 67, 3459, 16, 1348, 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...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1544, 16, 9134, 67, 3459, 16, 1348, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
return value
return ''.join(value)
def _read_chunked(self, amt): assert self.chunked != _UNKNOWN chunk_left = self.chunk_left value = ''
78de251d91563bc03063df6f574d313e0d1a124f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3187/78de251d91563bc03063df6f574d313e0d1a124f/httplib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 896, 67, 6551, 329, 12, 2890, 16, 25123, 4672, 1815, 365, 18, 6551, 329, 480, 389, 14737, 2441, 67, 4482, 273, 365, 18, 6551, 67, 4482, 460, 273, 875, 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, 389, 896, 67, 6551, 329, 12, 2890, 16, 25123, 4672, 1815, 365, 18, 6551, 329, 480, 389, 14737, 2441, 67, 4482, 273, 365, 18, 6551, 67, 4482, 460, 273, 875, 2, -100, -100, -100, -100, ...
db = dbhash.open(dbfile, 'c')
db = bsddb.hashopen(dbfile, 'c')
def do_remove(mlist, dbfile, textfile, virtualp): lockfp = None try: listname = mlist.internal_name() # Crack open the dbhash file, and delete all the entries. See the # discussion above for while we lock the aliases.db file this way. lockfp = open(dbfile) fcntl.flock(lockfp.fileno(), fcntl.LOCK_EX) db = dbhash.open(dbfile, 'c') for k, v in makealiases(listname): try: del db[k + '\0'] except KeyError: pass if not virtualp: # Always update YP_LAST_MODIFIED, but only for the aliases file db['YP_LAST_MODIFIED'] = '%010d' % time.time() # Add a YP_MASTER_NAME only if there isn't one already if not db.has_key('YP_MASTER_NAME'): db['YP_MASTER_NAME'] = socket.getfqdn() # And flush the changes to disk db.sync() # Now do our best to filter out the proper stanza from the text file. # The text file better exist! try: infp = open(textfile) except IOError, e: if e.errno <> errno.ENOENT: raise # Otherwise, there's no text file to filter so we're done. return omask = os.umask(007) try: outfp = open(textfile + '.tmp', 'w') finally: os.umask(omask) filteroutp = 0 start = '# STANZA START: ' + listname end = '# STANZA END: ' + listname while 1: line = infp.readline() if not line: break # If we're filtering out a stanza, just look for the end marker # and filter out everything in between. If we're not in the # middle of filter out a stanza, we're just looking for the proper # begin marker. if filteroutp: if line.startswith(end): filteroutp = 0 # Discard the trailing blank line, but don't worry if # we're at the end of the file. infp.readline() # Otherwise, ignore the line else: if line.startswith(start): # Filter out this stanza filteroutp = 1 else: outfp.write(line) # Close up shop, and rotate the files infp.close() outfp.close() os.rename(textfile+'.tmp', textfile) finally: if lockfp: fcntl.flock(lockfp.fileno(), fcntl.LOCK_UN) lockfp.close()
fdea0f4d4aafc034bf532b1250b6ea19c3d2c875 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2120/fdea0f4d4aafc034bf532b1250b6ea19c3d2c875/Postfix.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 4479, 12, 781, 376, 16, 1319, 768, 16, 977, 768, 16, 5024, 84, 4672, 2176, 7944, 273, 599, 775, 30, 666, 529, 273, 312, 1098, 18, 7236, 67, 529, 1435, 468, 385, 21580, 1696,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4479, 12, 781, 376, 16, 1319, 768, 16, 977, 768, 16, 5024, 84, 4672, 2176, 7944, 273, 599, 775, 30, 666, 529, 273, 312, 1098, 18, 7236, 67, 529, 1435, 468, 385, 21580, 1696,...
return
return OK
def effecttimer( time, args ): char = args[0] effecttype = args[1] bonus = args[2] if effecttype == 6 or effecttype == 7: if not char.hastag( 'agility_effect' ): return OOPS char.dexterity = char.dexterity - bonus char.maxstamina = char.maxstamina - bonus if char.stamina > char.maxstamina: char.stamina = char.maxstamina char.deltag( 'agility_effect' ) char.updatestamina() char.updatestats() return elif effecttype == 8 or effecttype == 9: if not char.hastag( 'strength_effect' ): return OOPS char.strength = char.strength - bonus if char.hitpoints > char.maxhitpoints: char.hitpoints = char.maxhitpoints char.deltag( 'strength_effect' ) char.updatehealth() char.updatestats() return elif effecttype == 20 or effecttype == 21: if not char.hastag( 'intelligence_effect' ): return OOPS char.intelligence = char.intelligence - bonus char.maxmana = char.maxmana - bonus if char.mana > char.maxmana: char.mana = char.maxmana char.deltag( 'intelligence_effect' ) char.updatemana() char.updatestats() return
1dbb4f996db2ee1cdf189b46c7eeed3786d7b16c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/1dbb4f996db2ee1cdf189b46c7eeed3786d7b16c/potions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5426, 12542, 12, 813, 16, 833, 262, 30, 1149, 273, 833, 63, 20, 65, 5426, 723, 273, 833, 63, 21, 65, 324, 22889, 273, 833, 63, 22, 65, 225, 309, 5426, 723, 422, 1666, 578, 5426, 72...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5426, 12542, 12, 813, 16, 833, 262, 30, 1149, 273, 833, 63, 20, 65, 5426, 723, 273, 833, 63, 21, 65, 324, 22889, 273, 833, 63, 22, 65, 225, 309, 5426, 723, 422, 1666, 578, 5426, 72...
if e[0] == EINTR:
if e.args[0] == EINTR:
def read(self, size=-1): # Use max, disallow tiny reads in a loop as they are very inefficient. # We never leave read() with any leftover data from a new recv() call # in our internal buffer. rbufsize = max(self._rbufsize, self.default_bufsize) # Our use of StringIO rather than lists of string objects returned by # recv() minimizes memory usage and fragmentation that occurs when # rbufsize is large compared to the typical return value of recv(). buf = self._rbuf buf.seek(0, 2) # seek end if size < 0: # Read until EOF self._rbuf = StringIO() # reset _rbuf. we consume it via buf. while True: try: data = self._sock.recv(rbufsize) except error, e: if e[0] == EINTR: continue raise if not data: break buf.write(data) return buf.getvalue() else: # Read until size bytes or EOF seen, whichever comes first buf_len = buf.tell() if buf_len >= size: # Already have size bytes in our buffer? Extract and return. buf.seek(0) rv = buf.read(size) self._rbuf = StringIO() self._rbuf.write(buf.read()) return rv
659074f9ef02a6c3a78b35a8bf2fa0ab12511c2e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3187/659074f9ef02a6c3a78b35a8bf2fa0ab12511c2e/socket.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 12, 2890, 16, 963, 29711, 21, 4672, 468, 2672, 943, 16, 29176, 24405, 6838, 316, 279, 2798, 487, 2898, 854, 8572, 316, 25403, 18, 468, 1660, 5903, 8851, 855, 1435, 598, 1281, 29709,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 12, 2890, 16, 963, 29711, 21, 4672, 468, 2672, 943, 16, 29176, 24405, 6838, 316, 279, 2798, 487, 2898, 854, 8572, 316, 25403, 18, 468, 1660, 5903, 8851, 855, 1435, 598, 1281, 29709,...
This command is depreacted. Without -c, it's implied by other relevant
This command is deprecated. Without -c, it's implied by other relevant
def init(ui, repo, **opts): """init a new queue repository (DEPRECATED) The queue repository is unversioned by default. If -c/--create-repo is specified, qinit will create a separate nested repository for patches (qinit -c may also be run later to convert an unversioned patch repository into a versioned one). You can use qcommit to commit changes to this queue repository. This command is depreacted. Without -c, it's implied by other relevant commands. With -c, use hg -Q init instead.""" q = repo.mq r = q.init(repo, create=opts['create_repo']) q.save_dirty() if r: if not os.path.exists(r.wjoin('.hgignore')): fp = r.wopener('.hgignore', 'w') fp.write('^\\.hg\n') fp.write('^\\.mq\n') fp.write('syntax: glob\n') fp.write('status\n') fp.write('guards\n') fp.close() if not os.path.exists(r.wjoin('series')): r.wopener('series', 'w').close() r.add(['.hgignore', 'series']) commands.add(ui, r) return 0
78192733ca5267882c3742813f90c07bd90d7856 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11312/78192733ca5267882c3742813f90c07bd90d7856/mq.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1208, 12, 4881, 16, 3538, 16, 2826, 4952, 4672, 3536, 2738, 279, 394, 2389, 3352, 261, 17575, 13, 225, 1021, 2389, 3352, 353, 29645, 635, 805, 18, 971, 300, 71, 19, 413, 2640, 17, 7422...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4881, 16, 3538, 16, 2826, 4952, 4672, 3536, 2738, 279, 394, 2389, 3352, 261, 17575, 13, 225, 1021, 2389, 3352, 353, 29645, 635, 805, 18, 971, 300, 71, 19, 413, 2640, 17, 7422...
@return: Two dictionaries: - the first maps keys to terms - the second maks keys to lists of links @rtype: C{dictionary}
Extract the set of terms that should be indexed from all documented docstrings. Return the extracted set as a list of tuples of the form C{(key, term, [links])}. This list is used by L{_write_indices} to construct the term index. @rtype: C{list} of C{(string, L{ParsedDocstring}, list of Link)}
def _extract_term_index(self): """ @return: Two dictionaries: - the first maps keys to terms - the second maks keys to lists of links @rtype: C{dictionary} """ terms = {} links = {} for (uid, doc) in self._docmap.items(): if (not self._show_private) and uid.is_private(): continue if uid.is_function(): link = Link(uid.name(), uid.module()) elif uid.is_method(): link = Link(uid.name(), uid.cls()) else: link = Link(uid.name(), uid)
21a6d8c30a29a133335836c07a6da6e2f0b95f2a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11420/21a6d8c30a29a133335836c07a6da6e2f0b95f2a/html.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8004, 67, 6408, 67, 1615, 12, 2890, 4672, 3536, 8152, 326, 444, 434, 6548, 716, 1410, 506, 8808, 628, 777, 23051, 997, 10219, 18, 225, 2000, 326, 9438, 444, 487, 279, 666, 434, 10...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 8004, 67, 6408, 67, 1615, 12, 2890, 4672, 3536, 8152, 326, 444, 434, 6548, 716, 1410, 506, 8808, 628, 777, 23051, 997, 10219, 18, 225, 2000, 326, 9438, 444, 487, 279, 666, 434, 10...
self.get(force=True, get_redirect=True, throttle=False)
try: self.get(force=True, get_redirect=True, throttle=False) except NoPage: output(u'Page %s is moved and no longer exist.') delattr(self, '_contents')
def _moveOld(self, newtitle, reason=None, movetalkpage=True, movesubpages=False, sysop=False, throttle=True, deleteAndMove=False, safe=True, fixredirects=True, leaveRedirect=True): # Login try: self.get() except: pass sysop = self._getActionUser(action = 'move', restriction = self.moveRestriction, sysop = False) if deleteAndMove: sysop = self._getActionUser(action = 'delete', restriction = '', sysop = True)
a589302f3796bb6cd5e8e918dfe938d6f28d338d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4404/a589302f3796bb6cd5e8e918dfe938d6f28d338d/wikipedia.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8501, 7617, 12, 2890, 16, 394, 2649, 16, 3971, 33, 7036, 16, 5730, 278, 2960, 2433, 33, 5510, 16, 13934, 373, 7267, 33, 8381, 16, 2589, 556, 33, 8381, 16, 18304, 33, 5510, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8501, 7617, 12, 2890, 16, 394, 2649, 16, 3971, 33, 7036, 16, 5730, 278, 2960, 2433, 33, 5510, 16, 13934, 373, 7267, 33, 8381, 16, 2589, 556, 33, 8381, 16, 18304, 33, 5510, 16, 1...
if 'bin' in f.split('/'): addonsdir = '' else: addonsdir = self.args['addonsdir']+'/' self.pofiles.append(addonsdir+f) if len(self.pofiles):
if mod_lst[0] not in self.pofiles: self.pofiles[mod_lst[0]] = [] self.pofiles[mod_lst[0]].append(mod_lst[-1]) self.translation_lst.append(mod_lst[-1]) if len(self.translation_lst):
def start(self): s = self.build.getSourceStamp() self.pofiles = [] for change in s.changes: files = ( change.files_added + change.files_modified + [f[1] for f in change.files_renamed] ) for f in files: fname,ext = os.path.splitext(f.split('/')[-1]) if ext == '.po': if 'bin' in f.split('/'): addonsdir = '' else: addonsdir = self.args['addonsdir']+'/' self.pofiles.append(addonsdir+f) if len(self.pofiles): commands = [] commands = ["make","install-translation"]
ebbf77dbde8b1ca1e43ac3ea55be7b01ef0199a8 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12355/ebbf77dbde8b1ca1e43ac3ea55be7b01ef0199a8/buildstep.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 787, 12, 2890, 4672, 272, 273, 365, 18, 3510, 18, 588, 1830, 8860, 1435, 365, 18, 84, 792, 1449, 273, 5378, 364, 2549, 316, 272, 18, 6329, 30, 1390, 273, 261, 2549, 18, 2354, 67, 966...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 787, 12, 2890, 4672, 272, 273, 365, 18, 3510, 18, 588, 1830, 8860, 1435, 365, 18, 84, 792, 1449, 273, 5378, 364, 2549, 316, 272, 18, 6329, 30, 1390, 273, 261, 2549, 18, 2354, 67, 966...
statuses = ["Unknown", "Invalid", "Won't fix", "Fix Released", "Fix Committed", "New", "Incomplete", "Confirmed", "Triaged", "In Progress"]
statuses = ["Unknown", "Invalid", "Won't Fix", "Fix Released", "Fix Committed", "New", "Incomplete", "Confirmed", "Triaged", "In Progress"]
def _sort(task1, task2): statuses = ["Unknown", "Invalid", "Won't fix", "Fix Released", "Fix Committed", "New", "Incomplete", "Confirmed", "Triaged", "In Progress"] severities = ["Unknown", "Undecided", "Wishlist", "Low", "Medium", "High", "Critical"] task1_status = task1.status task1_importance = task1.importance task2_status = task2.status task2_importance = task2.importance if task1_status != task2_status: if statuses.index(task1_status) < statuses.index(task2_status): return -1 return 1 if task1_importance != task2_importance: if severities.index(task1_importance) < severities.index(task2_importance): return -1 return 1 return 0
62ade6d270f7c070792d20b4a9e5210e428591e8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3124/62ade6d270f7c070792d20b4a9e5210e428591e8/plugin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3804, 12, 4146, 21, 16, 1562, 22, 4672, 13516, 273, 8247, 4874, 3113, 315, 1941, 3113, 315, 59, 265, 1404, 12139, 3113, 315, 8585, 10819, 72, 3113, 315, 8585, 1286, 7948, 3113, 315,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3804, 12, 4146, 21, 16, 1562, 22, 4672, 13516, 273, 8247, 4874, 3113, 315, 1941, 3113, 315, 59, 265, 1404, 12139, 3113, 315, 8585, 10819, 72, 3113, 315, 8585, 1286, 7948, 3113, 315,...
return eval(maxima.eval("jacobi_nd(%s,%s)"%(RR(x),RR(m))))
return eval(maxima.eval("jacobi_nd(%s,%s)"%(float(x),float(m))))
def jacobi(sym,x,m): r""" Here sym = "pq", where p,q in {c,d,n,s}. This returns the value of the Jacobi function pq(x,m), as described in the documentation for SAGE's "special" module. There are a total of 12 functions described by this. EXAMPLES: sage: jacobi("sn",1,1) 0.76159415595576485 sage: jacobi("cd",1,1/2) 0.72400972165937116 sage: jacobi("cn",1,1/2);jacobi("dn",1,1/2);jacobi("cn",1,1/2)/jacobi("dn",1,1/2) 0.59597656767214113 0.82316100163159622 0.72400972165937116 sage: jsn = lambda x: jacobi("sn",x,1) sage: P= plot(jsn,0,1) Now to view this, just type show(P). """ #R = x.parent() #y = R.gen() if sym=="dc": return eval(maxima.eval("jacobi_sn(%s,%s)"%(RR(x),RR(m)))) if sym=="nc": return eval(maxima.eval("jacobi_sn(%s,%s)"%(RR(x),RR(m)))) if sym=="sc": return eval(maxima.eval("jacobi_sn(%s,%s)"%(RR(x),RR(m)))) if sym=="cd": return eval(maxima.eval("jacobi_cd(%s,%s)"%(RR(x),RR(m)))) if sym=="nd": return eval(maxima.eval("jacobi_nd(%s,%s)"%(RR(x),RR(m)))) if sym=="sd": return eval(maxima.eval("jacobi_sd(%s,%s)"%(RR(x),RR(m)))) if sym=="cn": return eval(maxima.eval("jacobi_cn(%s,%s)"%(RR(x),RR(m)))) if sym=="dn": return eval(maxima.eval("jacobi_dn(%s,%s)"%(RR(x),RR(m)))) if sym=="sn": return eval(maxima.eval("jacobi_sn(%s,%s)"%(RR(x),RR(m)))) if sym=="cs": return eval(maxima.eval("jacobi_cs(%s,%s)"%(RR(x),RR(m)))) if sym=="ds": return eval(maxima.eval("jacobi_ds(%s,%s)"%(RR(x),RR(m)))) if sym=="ns": return eval(maxima.eval("jacobi_ns(%s,%s)"%(RR(x),RR(m)))) return 1
9a0ab89f387827fef6f9118a65362ee1e0032bd5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9890/9a0ab89f387827fef6f9118a65362ee1e0032bd5/special.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 20138, 30875, 12, 8117, 16, 92, 16, 81, 4672, 436, 8395, 13743, 5382, 273, 315, 84, 85, 3113, 1625, 293, 16, 85, 316, 288, 71, 16, 72, 16, 82, 16, 87, 5496, 1220, 1135, 326, 460, 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, 20138, 30875, 12, 8117, 16, 92, 16, 81, 4672, 436, 8395, 13743, 5382, 273, 315, 84, 85, 3113, 1625, 293, 16, 85, 316, 288, 71, 16, 72, 16, 82, 16, 87, 5496, 1220, 1135, 326, 460, 4...
event.Skip()
def OnMouseEvents (self, event): """ Handle the variety of raw mouse events cells get, passing them to the rendering delegate if it wants them. """ # If the handlers we call (if any) want to eat the event, they'll # call event.Skip(False) event.Skip() # Bug #7320: Don't process mouse events when the the table isn't visible # or when gridWindow's data has changed but hasn't been synchronized to the widget. if self.IsShown(): blockItem = self.blockItem blockItem.itsView.dispatchQueuedNotifications() if not blockItem.isBlockDirty(): gridWindow = self.GetGridWindow() def callHandler(cell, isInCell, oldnew): if cell is None or -1 in cell: return False renderer = self.GetCellRenderer(cell[1], cell[0]) try: # See if it's renderer with an attribute editor that wants # mouse events handler = renderer.delegate.OnMouseChange except AttributeError: # See if it's a section renderer that wants mouse events handler = getattr(renderer, 'OnMouseChange', None) if handler is None: return False # Add information to the event event.cell = cell event.isInCell = isInCell event.getCellValue = lambda: self.GetTable().GetValue(cell[1], cell[0]) event.getCellRect = lambda: self.CalculateCellRect(cell) # Call the handler wantsCapture = handler(event) return wantsCapture # Figure out which cell we're over, and the previous one if any cell = self.__eventToCell(event) oldCell = getattr(blockItem, "overCell", None) # Summarize the state on each call if False: evtType = event.GetEventType() evtType = evtNames.get(evtType, evtType) logger.debug("wxDashboard.OnMouseEvents: %s, %s (was %s)", evtType, cell, oldCell) # If we were over a cell previously that wanted us to capture # the mouse, notify it and see whether it still wants it. wantsCapture = False if oldCell is not None: wantsCapture = callHandler(oldCell, oldCell == cell, "old") if not wantsCapture: del blockItem.overCell if not wantsCapture: # If the old cell didn't want it, give the current # cell a chance if oldCell != cell: wantsCapture = callHandler(cell, True, "new") if wantsCapture: blockItem.overCell = cell # Change mouse capture if necessary. Apparently window.HasCapture # isn't reliable, so we track our own capturedness hasCapture = getattr(blockItem, 'mouseCaptured', False) if wantsCapture: if not hasCapture: #logger.debug("OnMouseEvents: CaptureMouse") gridWindow.CaptureMouse() blockItem.mouseCaptured = True elif hasCapture: if gridWindow.HasCapture(): #logger.debug("OnMouseEvents: ReleaseMouse") gridWindow.ReleaseMouse() #else: #logger.debug("OnMouseEvents: would ReleaseMouse, but not HasCapture") del blockItem.mouseCaptured
31d95cc507e370982e6667ce0fbee76301e3a261 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9228/31d95cc507e370982e6667ce0fbee76301e3a261/Table.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2755, 9186, 3783, 261, 2890, 16, 871, 4672, 3536, 5004, 326, 1394, 14369, 434, 1831, 7644, 2641, 5983, 336, 16, 9588, 2182, 358, 326, 9782, 7152, 309, 518, 14805, 2182, 18, 3536, 468, 97...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2755, 9186, 3783, 261, 2890, 16, 871, 4672, 3536, 5004, 326, 1394, 14369, 434, 1831, 7644, 2641, 5983, 336, 16, 9588, 2182, 358, 326, 9782, 7152, 309, 518, 14805, 2182, 18, 3536, 468, 97...
field_values += doc.field_value(field)
field_values += doc.field_values(field)
def _standard_field_values(self, doc): """ @return: A list of epytext field values that includes all fields that are common to all L{ObjDoc}s. C{_standard_field_values} is used by L{_extract_term_index}. @rtype: C{list} of L{xml.dom.minidom.Document} """ field_values = [] for field in doc.fields(): field_values += doc.field_value(field) return field_values
986fb527f9f5168bb2a99f7a14d03b6f9e1f2682 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/986fb527f9f5168bb2a99f7a14d03b6f9e1f2682/html.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 10005, 67, 1518, 67, 2372, 12, 2890, 16, 997, 4672, 3536, 632, 2463, 30, 432, 666, 434, 425, 2074, 955, 652, 924, 716, 6104, 777, 1466, 716, 854, 2975, 358, 777, 511, 95, 2675, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 10005, 67, 1518, 67, 2372, 12, 2890, 16, 997, 4672, 3536, 632, 2463, 30, 432, 666, 434, 425, 2074, 955, 652, 924, 716, 6104, 777, 1466, 716, 854, 2975, 358, 777, 511, 95, 2675, ...
subentry=langheader(wikilang) + '\n'
subentry=langheader[wikilang] + '\n'
def wikiwrap(self,wikilang): for meaning in self.meanings: subentry=langheader(wikilang) + '\n' # langheader is a dictionary that has the proper way to create a header indicating the language of a subentry for this Wiktionary term=meaning.term subentry+=posheader(wikilang,term.pos) # posheader is a dictionary that has the proper way to create headers indicating part of speech subentry+='\n' subentry+=term.getTerm + ' ' + term.getGender + ' ' + meaning.definition subentry+='\n\n' return subentry
3857c33ffc3beac922d870b30b2d14cc5143c3c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4404/3857c33ffc3beac922d870b30b2d14cc5143c3c3/wiktionary.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9050, 4113, 12, 2890, 16, 11999, 330, 539, 4672, 364, 12256, 316, 365, 18, 7079, 899, 30, 720, 4099, 33, 4936, 3374, 12, 11999, 330, 539, 13, 397, 2337, 82, 11, 202, 7, 3303, 3374, 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, 9050, 4113, 12, 2890, 16, 11999, 330, 539, 4672, 364, 12256, 316, 365, 18, 7079, 899, 30, 720, 4099, 33, 4936, 3374, 12, 11999, 330, 539, 13, 397, 2337, 82, 11, 202, 7, 3303, 3374, 3...
if self.detect_lang() == self.toLang(): if self.fromLang() != 'auto':
if self.detect_lang() == self.to_lang(): if self.from_lang() != 'auto':
def translate(self): '''Return translated text from fromLang to toLang.''' self.result = '' if self._text == '': return True try: # 'auto' needs to be set to blank now if self._fromLang == 'auto': fromLangTemp = '' else: fromLangTemp = self._fromLang langpair = '%s|%s' % (fromLangTemp, self._toLang) urldata = urllib.urlencode({'v': 1.0, 'q': self._text, 'langpair': langpair }) url = 'http://ajax.googleapis.com/ajax/services/language/translate?%s' % \ (urldata,) headers = {'User-Agent': 'Traduisons/%s' % (msg_VERSION,)} req = urllib2.Request(url, None, headers) response = urllib2.urlopen(req).read() result = json.loads(response) if result['responseStatus'] != 200: self._error = ('Unable to translate', Exception(result['responseDetails'])) translation = '' return False translation = result['responseData']['translatedText'] translation = self._unquotehtml(translation) if translation.lower() == self._text.lower(): if self.detect_lang() == self.toLang(): if self.fromLang() != 'auto': self.swapLang() print "Reversing translation direction..." translation = self.translate() # If 'result' is empty (pretty generic error) handle exception. except TypeError, e: self._error = ('No translation available', e) return False except urllib2.HTTPError, e: self._error = ('urllib2.HTTPError: Check network connection', e) return False ## If the url ever changes... except urllib2.URLError, e: self._error = (e.reason, e) return False finally: try: self.result = translation except NameError: pass return True
14df03d8cb360b4e980acabb44bd6dbe0fd79acd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9947/14df03d8cb360b4e980acabb44bd6dbe0fd79acd/traduisons.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4204, 12, 2890, 4672, 9163, 990, 9955, 977, 628, 628, 7275, 358, 358, 7275, 1093, 6309, 365, 18, 2088, 273, 875, 309, 365, 6315, 955, 422, 875, 30, 327, 1053, 775, 30, 468, 296, 6079, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4204, 12, 2890, 4672, 9163, 990, 9955, 977, 628, 628, 7275, 358, 358, 7275, 1093, 6309, 365, 18, 2088, 273, 875, 309, 365, 6315, 955, 422, 875, 30, 327, 1053, 775, 30, 468, 296, 6079, ...
match = re.match(r"^(?P<n>.*) *\(.*", m)
match = re.match('^(?P<n>.*) *\(.*', m)
def __init__(self, t, m, d): self.time = float(t) # check to see if this is a trace event em = re.match(r"^ *\/\* *(?P<msg>.*) \*\/ *$", m) if(em): self.name = em.group("msg") self.fevent = True return # convert the duration to seconds if(d): self.length = float(d)/1000000 # the indentation determines the depth match = re.match(r"^(?P<d> *)(?P<o>.*)$", m) if(not match): return self.depth = self.getDepth(match.group('d')) m = match.group('o') # function return if(m[0] == '}'): self.freturn = True if(len(m) > 1): # includes comment with function name match = re.match(r"^} *\/\* *(?P<n>.*) *\*\/$", m) if(match): self.name = match.group('n') # function call else: self.fcall = True # function call with children if(m[-1] == '{'): match = re.match(r"^(?P<n>.*) *\(.*", m) if(match): self.name = match.group('n') # function call with no children (leaf) elif(m[-1] == ';'): self.freturn = True match = re.match(r"^(?P<n>.*) *\(.*", m) if(match): self.name = match.group('n') # something else (possibly a trace marker) else: self.name = m
0c52bda8f6c5785b5982bc3636b627b4ccd59c3f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5327/0c52bda8f6c5785b5982bc3636b627b4ccd59c3f/analyze_suspend.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 268, 16, 312, 16, 302, 4672, 365, 18, 957, 273, 1431, 12, 88, 13, 468, 866, 358, 2621, 309, 333, 353, 279, 2606, 871, 801, 273, 283, 18, 1916, 12, 86...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 268, 16, 312, 16, 302, 4672, 365, 18, 957, 273, 1431, 12, 88, 13, 468, 866, 358, 2621, 309, 333, 353, 279, 2606, 871, 801, 273, 283, 18, 1916, 12, 86...
if image or analyze:
if (image or analyze) and os.path.exists(project+'.ms'):
def simdata( project=None, modifymodel=None, skymodel=None, inbright=None, indirection=None, incell=None, incenter=None, inwidth=None, # innchan=None, setpointings=None, ptgfile=None, integration=None, direction=None, mapsize=None, maptype=None, pointingspacing=None, caldirection=None, calflux=None, predict=None, refdate=None, complist=None, compwidth=None, totaltime=None, antennalist=None, sdantlist=None, sdant=None, thermalnoise=None, user_pwv=None, t_ground=None, t_sky=None, tau0=None, leakage=None, image=None, vis=None, modelimage=None, cell=None, imsize=None, niter=None, threshold=None, weighting=None, mask=None, outertaper=None, stokes=None, analyze=None, showarray=None, showuv=None, showpsf=None, showmodel=None, showconvolved=None, showclean=None, showresidual=None, showdifference=None, showfidelity=None, graphics=None, verbose=None, overwrite=None, async=False): # RI TODO for inbright=unchanged, need to scale input image to jy/pix casalog.origin('simdata') if verbose: casalog.filter(level="DEBUG2") a=inspect.stack() stacklevel=0 for k in range(len(a)): if (string.find(a[k][1], 'ipython console') > 0): stacklevel=k myf=sys._getframe(stacklevel).f_globals saveinputs=myf['saveinputs'] saveinputs('simdata',project+".simdata.last") # some hardcoded variables that may be reintroduced in future development relmargin=.5 # number of PB between edge of model and pointing centers scanlength=1 # number of integrations per scan # as of 20100507, newfig will delete the previous one # create the utility object: util=simutil(direction) # this is the dir of the observation - could be "" if verbose: util.verbose=True msg=util.msg if type(skymodel)==type([]): skymodel=skymodel[0] skymodel=skymodel.replace('$project',project) if((not os.path.exists(skymodel)) and (not os.path.exists(complist))): msg("No sky input found. At least one of skymodel or complist must be set.",priority="error") return False if((not os.path.exists(skymodel)) and (os.path.exists(complist))): msg("No skymodel found. Simulating from components only is new and still considered an 'expert' feature.",priority="warn")
1510580ba08e0263ed627cc6ad8317047555cfc5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2098/1510580ba08e0263ed627cc6ad8317047555cfc5/task_simdata.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3142, 892, 12, 1984, 33, 7036, 16, 5612, 2284, 33, 7036, 16, 15513, 2284, 33, 7036, 16, 316, 31070, 33, 7036, 16, 1547, 2769, 33, 7036, 16, 316, 3855, 33, 7036, 16, 316, 5693, 33, 70...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3142, 892, 12, 1984, 33, 7036, 16, 5612, 2284, 33, 7036, 16, 15513, 2284, 33, 7036, 16, 316, 31070, 33, 7036, 16, 1547, 2769, 33, 7036, 16, 316, 3855, 33, 7036, 16, 316, 5693, 33, 70...
res = run("SELECT term,hitlist FROM %s WHERE term BETWEEN %%s AND %%s" % bibwordsX, (wash_index_term(word0), wash_index_term(word1)))
res = run_sql("SELECT term,hitlist FROM %s WHERE term BETWEEN %%s AND %%s" % bibwordsX, (wash_index_term(word0), wash_index_term(word1)))
def search_unit_in_bibwords(word, f, decompress=zlib.decompress): """Searches for 'word' inside bibwordsX table for field 'f' and returns hitset of recIDs.""" set = HitSet() # will hold output result set set_used = 0 # not-yet-used flag, to be able to circumvent set operations # deduce into which bibwordsX table we will search: apply_stemming = not "anyfield" in CFG_BIBINDEX_DISABLE_STEMMING_FOR_INDEXES bibwordsX = "idxWORD%02dF" % get_index_id("anyfield") if f: index_id = get_index_id(f) if index_id: bibwordsX = "idxWORD%02dF" % index_id apply_stemming = not f in CFG_BIBINDEX_DISABLE_STEMMING_FOR_INDEXES else: return HitSet() # word index f does not exist # wash 'word' argument and run query: word = string.replace(word, '*', '%') # we now use '*' as the truncation character words = string.split(word, "->", 1) # check for span query if len(words) == 2: word0 = re_word.sub('', words[0]) word1 = re_word.sub('', words[1]) if apply_stemming: word0 = stem(word0) word1 = stem(word1) res = run("SELECT term,hitlist FROM %s WHERE term BETWEEN %%s AND %%s" % bibwordsX, (wash_index_term(word0), wash_index_term(word1))) else: word = re_word.sub('', word) if apply_stemming: word = stem(word) if string.find(word, '%') >= 0: # do we have wildcard in the word? res = run_sql("SELECT term,hitlist FROM %s WHERE term LIKE %%s" % bibwordsX, (wash_index_term(word),)) else: res = run_sql("SELECT term,hitlist FROM %s WHERE term=%%s" % bibwordsX, (wash_index_term(word),)) # fill the result set: for word, hitlist in res: hitset_bibwrd = HitSet(hitlist) # add the results: if set_used: set.union_update(hitset_bibwrd) else: set = hitset_bibwrd set_used = 1 # okay, return result set: return set
86ec2adb7ea91e5a1ce9484051fb4d4c4ae54b13 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2139/86ec2adb7ea91e5a1ce9484051fb4d4c4ae54b13/search_engine.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1623, 67, 4873, 67, 267, 67, 70, 495, 3753, 12, 1095, 16, 284, 16, 16824, 33, 94, 2941, 18, 323, 14706, 4672, 3536, 16294, 364, 296, 1095, 11, 4832, 25581, 3753, 60, 1014, 364, 652, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1623, 67, 4873, 67, 267, 67, 70, 495, 3753, 12, 1095, 16, 284, 16, 16824, 33, 94, 2941, 18, 323, 14706, 4672, 3536, 16294, 364, 296, 1095, 11, 4832, 25581, 3753, 60, 1014, 364, 652, ...
BareLF = re.compile('([^\015])\015') DoDont = re.compile('(^|[^\377])\377[\375\376](.)') WillWont = re.compile('(^|[^\377])\377[\373\374](.)') AreYouThere = re.compile('(^|[^\377])\377\366') IpTelnet = re.compile('(^|[^\377])\377\364') OtherTelnet = re.compile('(^|[^\377])\377[^\377]')
LINEMODE = chr(34) NULL = chr(0) ECHO = chr(1) CR = chr(13) LF = chr(10) SE = chr(240) NOP = chr(241) DM = chr(242) BRK = chr(243) IP = chr(244) AO = chr(245) AYT = chr(246) EC = chr(247) EL = chr(248) GA = chr(249) SB = chr(250) WILL = chr(251) WONT = chr(252) DO = chr(253) DONT = chr(254) IAC = chr(255) UIAC = '(^|[^' + IAC + '])' + IAC BareLF = re.compile('([^' + CR + '])' + CR) DoDont = re.compile(UIAC +'[' + DO + DONT + '](.)') WillWont = re.compile(UIAC + '[' + WILL + WONT + '](.)') AreYouThere = re.compile(UIAC + AYT) IpTelnet = re.compile(UIAC + IP) OtherTelnet = re.compile(UIAC + '[^' + IAC + ']')
def finish(self): dbg('debugserver: disconnect from %s' % str(self.client_address))
528aaa06b6d1da43df857560969166229ecd0f23 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1032/528aaa06b6d1da43df857560969166229ecd0f23/debugserver.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4076, 12, 2890, 4672, 28966, 2668, 4148, 3567, 30, 9479, 628, 738, 87, 11, 738, 609, 12, 2890, 18, 2625, 67, 2867, 3719, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4076, 12, 2890, 4672, 28966, 2668, 4148, 3567, 30, 9479, 628, 738, 87, 11, 738, 609, 12, 2890, 18, 2625, 67, 2867, 3719, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
print >>fp, str(entry) fp.close() def write_as_txt(self,filename):
print >>fileobj, str(entry) fileobj.close() def topfnfile(self, fileobj):
def write(self,filename): """ write a cache object to filename as a lal cache file """ fp = open(filename,'w') for entry in self: print >>fp, str(entry) fp.close()
ccd374c8d5f8c51aff23f40822b44718babd6098 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3589/ccd374c8d5f8c51aff23f40822b44718babd6098/lal.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 12, 2890, 16, 3459, 4672, 3536, 1045, 279, 1247, 733, 358, 1544, 487, 279, 328, 287, 1247, 585, 3536, 4253, 273, 1696, 12, 3459, 11189, 91, 6134, 364, 1241, 316, 365, 30, 1172, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 12, 2890, 16, 3459, 4672, 3536, 1045, 279, 1247, 733, 358, 1544, 487, 279, 328, 287, 1247, 585, 3536, 4253, 273, 1696, 12, 3459, 11189, 91, 6134, 364, 1241, 316, 365, 30, 1172, 1...
def _tokenize(str, warnings, errors):
def _tokenize(str, errors):
def _tokenize(str, warnings, errors): """ Split a given formatted docstring into an ordered list of C{Token}s, according to the epytext markup rules. @param str: The epytext string @type str: C{string} @param warnings: A list of the warnings generated by parsing. Any new warnings generated while will tokenizing this paragraph will be appended to this list. @type warnings: C{list} of L{ParseError} @param errors: A list where any errors generated during parsing will be stored. If no list is specified, then errors will generate exceptions. @type errors: C{list} of L{ParseError} @return: a list of the C{Token}s that make up the given string. @rtype: C{list} of L{Token} """ tokens = [] lines = str.split('\n') # Scan through the lines, determining what @type of token we're # dealing with, and tokenizing it, as appropriate. linenum = 0 while linenum < len(lines): # Get the current line and its indentation. line = lines[linenum] indent = len(line)-len(line.lstrip()) if indent == len(line): # Ignore blank lines. linenum += 1 continue elif line[indent:indent+4] == '>>> ': # blocks starting with ">>> " are doctest block tokens. linenum = _tokenize_doctest(lines, linenum, indent, tokens, errors) elif _BULLET_RE.match(line, indent): # blocks starting with a bullet are LI start tokens. linenum = _tokenize_listart(lines, linenum, indent, tokens, warnings) if tokens[-1].indent != None: indent = tokens[-1].indent else: # Check for mal-formatted field items. if line[indent] == '@': estr = "Possible mal-formatted field item." warnings.append(TokenizationError(estr, linenum, line)) # anything else is either a paragraph or a heading. linenum = _tokenize_para(lines, linenum, indent, tokens, warnings) # Paragraph tokens ending in '::' initiate literal blocks. if (tokens[-1].tag == Token.PARA and tokens[-1].contents[-2:] == '::'): tokens[-1].contents = tokens[-1].contents[:-1] linenum = _tokenize_literal(lines, linenum, indent, tokens, warnings) return tokens
7bf7c136593a0f12e906094a55f7b8f591c5abaf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/7bf7c136593a0f12e906094a55f7b8f591c5abaf/epytext.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2316, 554, 12, 701, 16, 1334, 4672, 3536, 5385, 279, 864, 4955, 14525, 1368, 392, 5901, 666, 434, 385, 95, 1345, 97, 87, 16, 4888, 358, 326, 425, 2074, 955, 9813, 2931, 18, 225, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2316, 554, 12, 701, 16, 1334, 4672, 3536, 5385, 279, 864, 4955, 14525, 1368, 392, 5901, 666, 434, 385, 95, 1345, 97, 87, 16, 4888, 358, 326, 425, 2074, 955, 9813, 2931, 18, 225, ...
moments = t.get_moments()
moments = truncate.get_moments()
def _scale(self): '''Actually scale all of the data together.'''
a62cb6c872066be1cce61a7b9346ded9f2df42d6 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3290/a62cb6c872066be1cce61a7b9346ded9f2df42d6/XDSScaler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5864, 12, 2890, 4672, 9163, 2459, 3452, 3159, 777, 434, 326, 501, 9475, 1093, 6309, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5864, 12, 2890, 4672, 9163, 2459, 3452, 3159, 777, 434, 326, 501, 9475, 1093, 6309, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
if kind == "string":
if kind.startswith("string"):
def _length (self, kind, data): # Calculate the size of the data to read in the file if kind == "string": replace = "" for i in data: # except: Too lazy to handle the '\r' and co otherwise try: replace += chr(i) except: replace+='*' # This is for "\0" replace = replace.replace('*\0','*') # This is for two "\" replace = replace.replace('\\\\','*') # This is for the remaining "\{whatever}" replace = replace.replace('\\','') length = len(replace) else: length = self.data_size[kind] return length
fa8a059590f5621889e8f0481dc5d1c6f0c2d5c8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3948/fa8a059590f5621889e8f0481dc5d1c6f0c2d5c8/magic.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2469, 261, 2890, 16, 3846, 16, 501, 4672, 468, 9029, 326, 963, 434, 326, 501, 358, 855, 316, 326, 585, 309, 3846, 18, 17514, 1918, 2932, 1080, 6, 4672, 1453, 273, 1408, 364, 277, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2469, 261, 2890, 16, 3846, 16, 501, 4672, 468, 9029, 326, 963, 434, 326, 501, 358, 855, 316, 326, 585, 309, 3846, 18, 17514, 1918, 2932, 1080, 6, 4672, 1453, 273, 1408, 364, 277, ...
if tempCart.numItems == 0:
if tempCart.numItems == 0 and not order.is_partially_paid:
def confirm_info(request): payment_module = config_get_group('PAYMENT_PAYPAL') try: order = Order.objects.from_request(request) except Order.DoesNotExist: url = lookup_url(payment_module, 'satchmo_checkout-step1') return HttpResponseRedirect(url) tempCart = Cart.objects.from_request(request) if tempCart.numItems == 0: template = lookup_template(payment_module, 'shop/checkout/empty_cart.html') return render_to_response(template, context_instance=RequestContext(request)) # Check if the order is still valid if not order.validate(request): context = RequestContext(request, {'message': _('Your order is no longer valid.')}) return render_to_response('shop/404.html', context_instance=context) template = lookup_template(payment_module, 'shop/checkout/paypal/confirm.html') if payment_module.LIVE.value: log.debug("live order on %s", payment_module.KEY.value) url = payment_module.POST_URL.value account = payment_module.BUSINESS.value else: url = payment_module.POST_TEST_URL.value account = payment_module.BUSINESS_TEST.value try: address = lookup_url(payment_module, payment_module.RETURN_ADDRESS.value, include_server=True) except urlresolvers.NoReverseMatch: address = payment_module.RETURN_ADDRESS.value processor_module = payment_module.MODULE.load_module('processor') processor = processor_module.PaymentProcessor(payment_module) processor.create_pending_payment(order=order) default_view_tax = config_value('TAX', 'DEFAULT_VIEW_TAX') recurring = None order_items = order.orderitem_set.all() for item in order_items: if item.product.is_subscription: recurring = {'product':item.product, 'price':item.product.price_set.all()[0].price.quantize(Decimal('.01')),} trial0 = recurring['product'].subscriptionproduct.get_trial_terms(0) if len(order_items) > 1 or trial0 is not None or recurring['price'] < order.balance: recurring['trial1'] = {'price': order.balance,} if trial0 is not None: recurring['trial1']['expire_length'] = trial0.expire_length recurring['trial1']['expire_unit'] = trial0.expire_unit[0] # else: # recurring['trial1']['expire_length'] = recurring['product'].subscriptionproduct.get_trial_terms(0).expire_length trial1 = recurring['product'].subscriptionproduct.get_trial_terms(1) if trial1 is not None: recurring['trial2']['expire_length'] = trial1.expire_length recurring['trial2']['expire_unit'] = trial1.expire_unit[0] recurring['trial2']['price'] = trial1.price ctx = RequestContext(request, {'order': order, 'post_url': url, 'default_view_tax': default_view_tax, 'business': account, 'currency_code': payment_module.CURRENCY_CODE.value, 'return_address': address, 'invoice': order.id, 'subscription': recurring, 'PAYMENT_LIVE' : payment_live(payment_module) }) return render_to_response(template, context_instance=ctx)
4027228241406bfb7c0c8af76cfdd94068ac3dc2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13656/4027228241406bfb7c0c8af76cfdd94068ac3dc2/views.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6932, 67, 1376, 12, 2293, 4672, 5184, 67, 2978, 273, 642, 67, 588, 67, 1655, 2668, 16436, 67, 30094, 6134, 225, 775, 30, 1353, 273, 4347, 18, 6911, 18, 2080, 67, 2293, 12, 2293, 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, 6932, 67, 1376, 12, 2293, 4672, 5184, 67, 2978, 273, 642, 67, 588, 67, 1655, 2668, 16436, 67, 30094, 6134, 225, 775, 30, 1353, 273, 4347, 18, 6911, 18, 2080, 67, 2293, 12, 2293, 13, ...
if line[-2:] == CRLF: line = line[:-2] elif line[-1:] in CRLF: line = line[:-1]
if line[-2:] == CRLF: line = line[:-2] elif line[-1:] in CRLF: line = line[:-1]
def getline(self): """Internal: return one line from the server, stripping CRLF. Raise EOFError if the connection is closed.""" line = self.file.readline() if self.debugging > 1: print('*get*', repr(line)) if not line: raise EOFError if line[-2:] == CRLF: line = line[:-2] elif line[-1:] in CRLF: line = line[:-1] return line
933238ad85875df26c18a674f77afc1abaafb88e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8546/933238ad85875df26c18a674f77afc1abaafb88e/nntplib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 1369, 12, 2890, 4672, 3536, 3061, 30, 327, 1245, 980, 628, 326, 1438, 16, 2569, 1382, 21791, 18, 20539, 6431, 668, 309, 326, 1459, 353, 4375, 12123, 980, 273, 365, 18, 768, 18, 89...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1369, 12, 2890, 4672, 3536, 3061, 30, 327, 1245, 980, 628, 326, 1438, 16, 2569, 1382, 21791, 18, 20539, 6431, 668, 309, 326, 1459, 353, 4375, 12123, 980, 273, 365, 18, 768, 18, 89...
print 'DEF'
def get(self, section, option): ''' Reads string value from configuration, if it is not found, it tries to apply defaults, if even this fails, exception is raised. ''' try: return self._config.get(section, option) except (ConfigParser.NoOptionError, ConfigParser.NoSectionError): print 'DEF' if not self._defaults.has_key(section): raise if not self._defaults[section].has_key(option): raise return self._defaults[section][option]
89b1fae00c953f577a7f1a715942e572a31669e7 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1527/89b1fae00c953f577a7f1a715942e572a31669e7/config.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 12, 2890, 16, 2442, 16, 1456, 4672, 9163, 29185, 533, 460, 628, 1664, 16, 309, 518, 353, 486, 1392, 16, 518, 9327, 358, 2230, 3467, 16, 309, 5456, 333, 6684, 16, 1520, 353, 11531,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 12, 2890, 16, 2442, 16, 1456, 4672, 9163, 29185, 533, 460, 628, 1664, 16, 309, 518, 353, 486, 1392, 16, 518, 9327, 358, 2230, 3467, 16, 309, 5456, 333, 6684, 16, 1520, 353, 11531,...
(head,tail)=os.path.split(self.__path) dirs=head.split('/') (fileBase,fileExt)=os.path.splitext(tail)
dirs=self._path.split('/') fileName=dirs.pop() fileParts=fileName.rsplit('.',1) fileExt=None if len(fileParts)>1: fileExt=fileParts[1] fileBase=fileParts[0]
def split(self): """ Splits the path into:
1296d23610e06f7e22a2cad3eb1db3a1e79af471 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2285/1296d23610e06f7e22a2cad3eb1db3a1e79af471/NativeUnixPath.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1416, 12, 2890, 4672, 3536, 5385, 87, 326, 589, 1368, 30, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 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, 1416, 12, 2890, 4672, 3536, 5385, 87, 326, 589, 1368, 30, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
l = [v for v in l if v in Omega[i]]
li = [v for v in li if v in Omega[i]]
def search_tree(G, Pi, lab=True, dig=False, dict=False, proof=False, verbosity=0): """ Assumes that the vertex set of G is {0,1,...,n-1} for some n. Note that this conflicts with the SymmetricGroup we are using to represent automorphisms. The solution is to let the group act on the set {1,2,...,n}, under the assumption n = 0. INPUT: lab -- if True, return the canonical label in addition to the auto- morphism group. dig -- if True, does not use Lemma 2.25 in [1], and the algorithm is valid for digraphs and graphs with loops. dict -- if True, explain which vertices are which elements of the set {1,2,...,n} in the representation of the automorphism group. proof -- if True, return the automorphism between G and its canonical label. Forces lab=True. STATE DIAGRAM: sage: SD = DiGraph( { 1:[18,2], 2:[5,3], 3:[4,6], 4:[7,2], 5:[4], 6:[13,12], 7:[18,8,10], 8:[6,9,10], 9:[6], 10:[11,13], 11:[12], 12:[13], 13:[17,14], 14:[16,15], 15:[2], 16:[13], 17:[15,13], 18:[13] } ) sage: SD.set_arc_label(1, 18, 'discrete') sage: SD.set_arc_label(4, 7, 'discrete') sage: SD.set_arc_label(2, 5, 'h = 0') sage: SD.set_arc_label(7, 18, 'h = 0') sage: SD.set_arc_label(7, 10, 'aut') sage: SD.set_arc_label(8, 10, 'aut') sage: SD.set_arc_label(8, 9, 'label') sage: SD.set_arc_label(8, 6, 'no label') sage: SD.set_arc_label(13, 17, 'k > h') sage: SD.set_arc_label(13, 14, 'k = h') sage: SD.set_arc_label(17, 15, 'v_k finite') sage: SD.set_arc_label(14, 15, 'v_k m.c.r.') sage: posn = {1:[ 3,-3], 2:[0,2], 3:[0, 13], 4:[3,9], 5:[3,3], 6:[16, 13], 7:[6,1], 8:[6,6], 9:[6,11], 10:[9,1], 11:[10,6], 12:[13,6], 13:[16,2], 14:[10,-6], 15:[0,-10], 16:[14,-6], 17:[16,-10], 18:[6,-4]} sage: SD.plot(pos=posn, node_size=400, color_dict={'#FFFFFF':range(1,19)}, edge_labels=True).save('search_tree.png') EXAMPLES: sage: from sage.groups.perm_gps.permgroup import PermutationGroup sage: import sage.graphs.graph_isom sage: from sage.graphs.graph_isom import search_tree, perm_group_elt sage: from sage.graphs.graph import enum sage: G = graphs.DodecahedralGraph() sage: Pi=[range(20)] sage: a,b = search_tree(G, Pi) sage: print a, enum(b) [[0, 19, 3, 2, 6, 5, 4, 17, 18, 11, 10, 9, 13, 12, 16, 15, 14, 7, 8, 1], [0, 1, 8, 9, 13, 14, 7, 6, 2, 3, 19, 18, 17, 4, 5, 15, 16, 12, 11, 10], [0, 19, 18, 11, 12, 16, 17, 4, 3, 2, 1, 8, 7, 6, 5, 15, 14, 13, 9, 10], [1, 8, 9, 10, 11, 12, 13, 14, 7, 6, 2, 3, 4, 5, 15, 16, 17, 18, 19, 0]] 17318942212009113839976787462421724338461987195898671092180383421848885858584973127639899792828728124797968735273000 sage: c = search_tree(G, Pi, lab=False) sage: print c [[0, 19, 3, 2, 6, 5, 4, 17, 18, 11, 10, 9, 13, 12, 16, 15, 14, 7, 8, 1], [0, 1, 8, 9, 13, 14, 7, 6, 2, 3, 19, 18, 17, 4, 5, 15, 16, 12, 11, 10], [0, 19, 18, 11, 12, 16, 17, 4, 3, 2, 1, 8, 7, 6, 5, 15, 14, 13, 9, 10], [1, 8, 9, 10, 11, 12, 13, 14, 7, 6, 2, 3, 4, 5, 15, 16, 17, 18, 19, 0]] sage: DodecAut = PermutationGroup([perm_group_elt(aa) for aa in a]) sage: DodecAut.character_table() [ 1 1 1 1 1 1 1 1 1 1] [ 1 -1 1 1 -1 1 -1 1 -1 -1] [ 3 -1 0 -1 zeta5^3 + zeta5^2 + 1 -zeta5^3 - zeta5^2 0 zeta5^3 + zeta5^2 + 1 -zeta5^3 - zeta5^2 3] [ 3 -1 0 -1 -zeta5^3 - zeta5^2 zeta5^3 + zeta5^2 + 1 0 -zeta5^3 - zeta5^2 zeta5^3 + zeta5^2 + 1 3] [ 3 1 0 -1 -zeta5^3 - zeta5^2 - 1 -zeta5^3 - zeta5^2 0 zeta5^3 + zeta5^2 + 1 zeta5^3 + zeta5^2 -3] [ 3 1 0 -1 zeta5^3 + zeta5^2 zeta5^3 + zeta5^2 + 1 0 -zeta5^3 - zeta5^2 -zeta5^3 - zeta5^2 - 1 -3] [ 4 0 1 0 -1 -1 1 -1 -1 4] [ 4 0 1 0 1 -1 -1 -1 1 -4] [ 5 1 -1 1 0 0 -1 0 0 5] [ 5 -1 -1 1 0 0 1 0 0 -5] sage: DodecAut2 = PermutationGroup([perm_group_elt(cc) for cc in c]) sage: DodecAut2.character_table() [ 1 1 1 1 1 1 1 1 1 1] [ 1 -1 1 1 -1 1 -1 1 -1 -1] [ 3 -1 0 -1 zeta5^3 + zeta5^2 + 1 -zeta5^3 - zeta5^2 0 zeta5^3 + zeta5^2 + 1 -zeta5^3 - zeta5^2 3] [ 3 -1 0 -1 -zeta5^3 - zeta5^2 zeta5^3 + zeta5^2 + 1 0 -zeta5^3 - zeta5^2 zeta5^3 + zeta5^2 + 1 3] [ 3 1 0 -1 -zeta5^3 - zeta5^2 - 1 -zeta5^3 - zeta5^2 0 zeta5^3 + zeta5^2 + 1 zeta5^3 + zeta5^2 -3] [ 3 1 0 -1 zeta5^3 + zeta5^2 zeta5^3 + zeta5^2 + 1 0 -zeta5^3 - zeta5^2 -zeta5^3 - zeta5^2 - 1 -3] [ 4 0 1 0 -1 -1 1 -1 -1 4] [ 4 0 1 0 1 -1 -1 -1 1 -4] [ 5 1 -1 1 0 0 -1 0 0 5] [ 5 -1 -1 1 0 0 1 0 0 -5] sage: G = graphs.PetersenGraph() sage: Pi=[range(10)] sage: a,b = search_tree(G, Pi) sage: print a, enum(b) [[0, 1, 2, 7, 5, 4, 6, 3, 9, 8], [0, 1, 6, 8, 5, 4, 2, 9, 3, 7], [0, 4, 3, 8, 5, 1, 9, 2, 6, 7], [1, 0, 4, 9, 6, 2, 5, 3, 7, 8]] 8716441511243809436161868448 sage: c = search_tree(G, Pi, lab=False) sage: PAut = PermutationGroup([perm_group_elt(aa) for aa in a]) sage: PAut.character_table() [ 1 1 1 1 1 1 1] [ 1 -1 1 -1 1 -1 1] [ 4 -2 0 1 1 0 -1] [ 4 2 0 -1 1 0 -1] [ 5 1 1 1 -1 -1 0] [ 5 -1 1 -1 -1 1 0] [ 6 0 -2 0 0 0 1] sage: PAut = PermutationGroup([perm_group_elt(cc) for cc in c]) sage: PAut.character_table() [ 1 1 1 1 1 1 1] [ 1 -1 1 -1 1 -1 1] [ 4 -2 0 1 1 0 -1] [ 4 2 0 -1 1 0 -1] [ 5 1 1 1 -1 -1 0] [ 5 -1 1 -1 -1 1 0] [ 6 0 -2 0 0 0 1] sage: G = graphs.CubeGraph(3) sage: Pi = [] sage: for i in range(8): ... b = Integer(i).binary() ... Pi.append(b.zfill(3)) ... sage: Pi = [Pi] sage: a,b = search_tree(G, Pi) sage: print a, enum(b) [[0, 3, 2, 1, 6, 5, 4, 7], [0, 1, 4, 5, 2, 3, 6, 7], [0, 3, 6, 5, 2, 1, 4, 7], [1, 0, 3, 2, 5, 4, 7, 6]] 520239721777506480 sage: c = search_tree(G, Pi, lab=False) sage: PermutationGroup([perm_group_elt(aa) for aa in a]).order() 48 sage: PermutationGroup([perm_group_elt(cc) for cc in c]).order() 48 sage: DodecAut.order() 120 sage: PAut.order() 120 sage: D = graphs.DodecahedralGraph() sage: a,b,c = search_tree(D, [range(20)], proof=True) sage: from sage.plot.plot import GraphicsArray sage: import networkx sage: position_D = networkx.spring_layout(D._nxg) sage: position_b = {} sage: for vert in position_D: ... position_b[c[vert]] = position_D[vert] sage.: GraphicsArray([D.plot(pos=position_D), b.plot(pos=position_b)]).show() sage: c {0: 0, 1: 19, 2: 16, 3: 15, 4: 9, 5: 1, 6: 10, 7: 8, 8: 14, 9: 12, 10: 17, 11: 11, 12: 5, 13: 6, 14: 2, 15: 4, 16: 3, 17: 7, 18: 13, 19: 18} BENCHMARKS: The following examples are given to check modifications to the algorithm for optimization-- use sage -t -long to check all the cases. sage: G = Graph({0:[]}) sage: Pi = [[0]] sage: a,b = search_tree(G, Pi) sage: print a, enum(b) [] 0 sage: a,b = search_tree(G, Pi, dig=True) sage: print a, enum(b) [] 0 sage: search_tree(G, Pi, lab=False) [] sage: from sage.graphs.graph_isom import all_labeled_graphs, all_ordered_partitions sage: graph2 = all_labeled_graphs(2) sage: part2 = all_ordered_partitions(range(2)) sage: for G in graph2: ... for Pi in part2: ... a,b = search_tree(G, Pi) ... c,d = search_tree(G, Pi, dig=True) ... e = search_tree(G, Pi, lab=False) ... a = str(a); b = str(enum(b)); c = str(c); d = str(enum(d)); e = str(e) ... print a.ljust(15), b.ljust(5), c.ljust(15), d.ljust(5), e.ljust(15) [] 0 [] 0 [] [] 0 [] 0 [] [[1, 0]] 0 [[1, 0]] 0 [[1, 0]] [[1, 0]] 0 [[1, 0]] 0 [[1, 0]] [] 6 [] 6 [] [] 6 [] 6 [] [[1, 0]] 6 [[1, 0]] 6 [[1, 0]] [[1, 0]] 6 [[1, 0]] 6 [[1, 0]] sage: graph3 = all_labeled_graphs(3) sage: part3 = all_ordered_partitions(range(3)) sage: for G in graph3: # long time (~30 secs) ... for Pi in part3: ... a,b = search_tree(G, Pi) ... c,d = search_tree(G, Pi, dig=True) ... e = search_tree(G, Pi, lab=False) ... a = str(a); b = str(enum(b)); c = str(c); d = str(enum(d)); e = str(e) ... print a.ljust(15), b.ljust(5), c.ljust(15), d.ljust(5), e.ljust(15) [] 0 [] 0 [] [] 0 [] 0 [] [[0, 2, 1]] 0 [[0, 2, 1]] 0 [[0, 2, 1]] [[0, 2, 1]] 0 [[0, 2, 1]] 0 [[0, 2, 1]] [] 0 [] 0 [] [] 0 [] 0 [] [[2, 1, 0]] 0 [[2, 1, 0]] 0 [[2, 1, 0]] [[2, 1, 0]] 0 [[2, 1, 0]] 0 [[2, 1, 0]] [] 0 [] 0 [] [] 0 [] 0 [] [[1, 0, 2]] 0 [[1, 0, 2]] 0 [[1, 0, 2]] [[1, 0, 2]] 0 [[1, 0, 2]] 0 [[1, 0, 2]] [[1, 0, 2]] 0 [[1, 0, 2]] 0 [[1, 0, 2]] [[2, 1, 0]] 0 [[2, 1, 0]] 0 [[2, 1, 0]] [[1, 0, 2]] 0 [[1, 0, 2]] 0 [[1, 0, 2]] [[0, 2, 1]] 0 [[0, 2, 1]] 0 [[0, 2, 1]] [[2, 1, 0]] 0 [[2, 1, 0]] 0 [[2, 1, 0]] [[0, 2, 1]] 0 [[0, 2, 1]] 0 [[0, 2, 1]] [[0, 2, 1], [1, 0, 2]] 0 [[0, 2, 1], [1, 0, 2]] 0 [[0, 2, 1], [1, 0, 2]] [[0, 2, 1], [1, 0, 2]] 0 [[0, 2, 1], [1, 0, 2]] 0 [[0, 2, 1], [1, 0, 2]] [[0, 2, 1], [1, 0, 2]] 0 [[0, 2, 1], [1, 0, 2]] 0 [[0, 2, 1], [1, 0, 2]] [[0, 2, 1], [1, 0, 2]] 0 [[0, 2, 1], [1, 0, 2]] 0 [[0, 2, 1], [1, 0, 2]] [[0, 2, 1], [1, 0, 2]] 0 [[0, 2, 1], [1, 0, 2]] 0 [[0, 2, 1], [1, 0, 2]] [[0, 2, 1], [1, 0, 2]] 0 [[0, 2, 1], [1, 0, 2]] 0 [[0, 2, 1], [1, 0, 2]] [] 10 [] 10 [] [] 10 [] 10 [] [[0, 2, 1]] 10 [[0, 2, 1]] 10 [[0, 2, 1]] [[0, 2, 1]] 10 [[0, 2, 1]] 10 [[0, 2, 1]] [] 68 [] 68 [] [] 160 [] 160 [] [] 68 [] 68 [] [] 68 [] 68 [] [] 68 [] 68 [] [] 160 [] 160 [] [] 68 [] 68 [] [] 68 [] 68 [] [] 10 [] 10 [] [] 10 [] 10 [] [] 10 [] 10 [] [[0, 2, 1]] 160 [[0, 2, 1]] 160 [[0, 2, 1]] [] 10 [] 10 [] [[0, 2, 1]] 160 [[0, 2, 1]] 160 [[0, 2, 1]] [[0, 2, 1]] 10 [[0, 2, 1]] 10 [[0, 2, 1]] [[0, 2, 1]] 10 [[0, 2, 1]] 10 [[0, 2, 1]] [[0, 2, 1]] 10 [[0, 2, 1]] 10 [[0, 2, 1]] [[0, 2, 1]] 10 [[0, 2, 1]] 10 [[0, 2, 1]] [[0, 2, 1]] 10 [[0, 2, 1]] 10 [[0, 2, 1]] [[0, 2, 1]] 10 [[0, 2, 1]] 10 [[0, 2, 1]] [] 68 [] 68 [] [] 160 [] 160 [] [] 68 [] 68 [] [] 68 [] 68 [] [] 10 [] 10 [] [] 10 [] 10 [] [[2, 1, 0]] 10 [[2, 1, 0]] 10 [[2, 1, 0]] [[2, 1, 0]] 10 [[2, 1, 0]] 10 [[2, 1, 0]] [] 160 [] 160 [] [] 68 [] 68 [] [] 68 [] 68 [] [] 68 [] 68 [] [] 10 [] 10 [] [[2, 1, 0]] 160 [[2, 1, 0]] 160 [[2, 1, 0]] [] 10 [] 10 [] [] 10 [] 10 [] [[2, 1, 0]] 160 [[2, 1, 0]] 160 [[2, 1, 0]] [] 10 [] 10 [] [[2, 1, 0]] 10 [[2, 1, 0]] 10 [[2, 1, 0]] [[2, 1, 0]] 10 [[2, 1, 0]] 10 [[2, 1, 0]] [[2, 1, 0]] 10 [[2, 1, 0]] 10 [[2, 1, 0]] [[2, 1, 0]] 10 [[2, 1, 0]] 10 [[2, 1, 0]] [[2, 1, 0]] 10 [[2, 1, 0]] 10 [[2, 1, 0]] [[2, 1, 0]] 10 [[2, 1, 0]] 10 [[2, 1, 0]] [] 78 [] 78 [] [] 170 [] 170 [] [] 78 [] 78 [] [] 78 [] 78 [] [] 78 [] 78 [] [] 170 [] 170 [] [] 78 [] 78 [] [] 78 [] 78 [] [] 228 [] 228 [] [] 228 [] 228 [] [[1, 0, 2]] 228 [[1, 0, 2]] 228 [[1, 0, 2]] [[1, 0, 2]] 228 [[1, 0, 2]] 228 [[1, 0, 2]] [[1, 0, 2]] 78 [[1, 0, 2]] 78 [[1, 0, 2]] [] 170 [] 170 [] [[1, 0, 2]] 78 [[1, 0, 2]] 78 [[1, 0, 2]] [] 170 [] 170 [] [] 170 [] 170 [] [] 170 [] 170 [] [[1, 0, 2]] 78 [[1, 0, 2]] 78 [[1, 0, 2]] [[1, 0, 2]] 78 [[1, 0, 2]] 78 [[1, 0, 2]] [[1, 0, 2]] 78 [[1, 0, 2]] 78 [[1, 0, 2]] [[1, 0, 2]] 78 [[1, 0, 2]] 78 [[1, 0, 2]] [[1, 0, 2]] 78 [[1, 0, 2]] 78 [[1, 0, 2]] [[1, 0, 2]] 78 [[1, 0, 2]] 78 [[1, 0, 2]] [] 160 [] 160 [] [] 68 [] 68 [] [] 68 [] 68 [] [] 68 [] 68 [] [] 160 [] 160 [] [] 68 [] 68 [] [] 68 [] 68 [] [] 68 [] 68 [] [] 10 [] 10 [] [] 10 [] 10 [] [[1, 0, 2]] 10 [[1, 0, 2]] 10 [[1, 0, 2]] [[1, 0, 2]] 10 [[1, 0, 2]] 10 [[1, 0, 2]] [[1, 0, 2]] 160 [[1, 0, 2]] 160 [[1, 0, 2]] [] 10 [] 10 [] [[1, 0, 2]] 160 [[1, 0, 2]] 160 [[1, 0, 2]] [] 10 [] 10 [] [] 10 [] 10 [] [] 10 [] 10 [] [[1, 0, 2]] 10 [[1, 0, 2]] 10 [[1, 0, 2]] [[1, 0, 2]] 10 [[1, 0, 2]] 10 [[1, 0, 2]] [[1, 0, 2]] 10 [[1, 0, 2]] 10 [[1, 0, 2]] [[1, 0, 2]] 10 [[1, 0, 2]] 10 [[1, 0, 2]] [[1, 0, 2]] 10 [[1, 0, 2]] 10 [[1, 0, 2]] [[1, 0, 2]] 10 [[1, 0, 2]] 10 [[1, 0, 2]] [] 170 [] 170 [] [] 78 [] 78 [] [] 78 [] 78 [] [] 78 [] 78 [] [] 228 [] 228 [] [] 228 [] 228 [] [[2, 1, 0]] 228 [[2, 1, 0]] 228 [[2, 1, 0]] [[2, 1, 0]] 228 [[2, 1, 0]] 228 [[2, 1, 0]] [] 78 [] 78 [] [] 170 [] 170 [] [] 78 [] 78 [] [] 78 [] 78 [] [] 170 [] 170 [] [[2, 1, 0]] 78 [[2, 1, 0]] 78 [[2, 1, 0]] [] 170 [] 170 [] [] 170 [] 170 [] [[2, 1, 0]] 78 [[2, 1, 0]] 78 [[2, 1, 0]] [] 170 [] 170 [] [[2, 1, 0]] 78 [[2, 1, 0]] 78 [[2, 1, 0]] [[2, 1, 0]] 78 [[2, 1, 0]] 78 [[2, 1, 0]] [[2, 1, 0]] 78 [[2, 1, 0]] 78 [[2, 1, 0]] [[2, 1, 0]] 78 [[2, 1, 0]] 78 [[2, 1, 0]] [[2, 1, 0]] 78 [[2, 1, 0]] 78 [[2, 1, 0]] [[2, 1, 0]] 78 [[2, 1, 0]] 78 [[2, 1, 0]] [] 228 [] 228 [] [] 228 [] 228 [] [[0, 2, 1]] 228 [[0, 2, 1]] 228 [[0, 2, 1]] [[0, 2, 1]] 228 [[0, 2, 1]] 228 [[0, 2, 1]] [] 170 [] 170 [] [] 78 [] 78 [] [] 78 [] 78 [] [] 78 [] 78 [] [] 170 [] 170 [] [] 78 [] 78 [] [] 78 [] 78 [] [] 78 [] 78 [] [] 170 [] 170 [] [] 170 [] 170 [] [] 170 [] 170 [] [[0, 2, 1]] 78 [[0, 2, 1]] 78 [[0, 2, 1]] [] 170 [] 170 [] [[0, 2, 1]] 78 [[0, 2, 1]] 78 [[0, 2, 1]] [[0, 2, 1]] 78 [[0, 2, 1]] 78 [[0, 2, 1]] [[0, 2, 1]] 78 [[0, 2, 1]] 78 [[0, 2, 1]] [[0, 2, 1]] 78 [[0, 2, 1]] 78 [[0, 2, 1]] [[0, 2, 1]] 78 [[0, 2, 1]] 78 [[0, 2, 1]] [[0, 2, 1]] 78 [[0, 2, 1]] 78 [[0, 2, 1]] [[0, 2, 1]] 78 [[0, 2, 1]] 78 [[0, 2, 1]] [] 238 [] 238 [] [] 238 [] 238 [] [[0, 2, 1]] 238 [[0, 2, 1]] 238 [[0, 2, 1]] [[0, 2, 1]] 238 [[0, 2, 1]] 238 [[0, 2, 1]] [] 238 [] 238 [] [] 238 [] 238 [] [[2, 1, 0]] 238 [[2, 1, 0]] 238 [[2, 1, 0]] [[2, 1, 0]] 238 [[2, 1, 0]] 238 [[2, 1, 0]] [] 238 [] 238 [] [] 238 [] 238 [] [[1, 0, 2]] 238 [[1, 0, 2]] 238 [[1, 0, 2]] [[1, 0, 2]] 238 [[1, 0, 2]] 238 [[1, 0, 2]] [[1, 0, 2]] 238 [[1, 0, 2]] 238 [[1, 0, 2]] [[2, 1, 0]] 238 [[2, 1, 0]] 238 [[2, 1, 0]] [[1, 0, 2]] 238 [[1, 0, 2]] 238 [[1, 0, 2]] [[0, 2, 1]] 238 [[0, 2, 1]] 238 [[0, 2, 1]] [[2, 1, 0]] 238 [[2, 1, 0]] 238 [[2, 1, 0]] [[0, 2, 1]] 238 [[0, 2, 1]] 238 [[0, 2, 1]] [[0, 2, 1], [1, 0, 2]] 238 [[0, 2, 1], [1, 0, 2]] 238 [[0, 2, 1], [1, 0, 2]] [[0, 2, 1], [1, 0, 2]] 238 [[0, 2, 1], [1, 0, 2]] 238 [[0, 2, 1], [1, 0, 2]] [[0, 2, 1], [1, 0, 2]] 238 [[0, 2, 1], [1, 0, 2]] 238 [[0, 2, 1], [1, 0, 2]] [[0, 2, 1], [1, 0, 2]] 238 [[0, 2, 1], [1, 0, 2]] 238 [[0, 2, 1], [1, 0, 2]] [[0, 2, 1], [1, 0, 2]] 238 [[0, 2, 1], [1, 0, 2]] 238 [[0, 2, 1], [1, 0, 2]] [[0, 2, 1], [1, 0, 2]] 238 [[0, 2, 1], [1, 0, 2]] 238 [[0, 2, 1], [1, 0, 2]] sage: C = graphs.CubeGraph(1) sage: gens = search_tree(C, [C.vertices()], lab=False) sage: PermutationGroup([perm_group_elt(aa) for aa in gens]).order() 2 sage: C = graphs.CubeGraph(2) sage: gens = search_tree(C, [C.vertices()], lab=False) sage: PermutationGroup([perm_group_elt(aa) for aa in gens]).order() 8 sage: C = graphs.CubeGraph(3) sage: gens = search_tree(C, [C.vertices()], lab=False) sage: PermutationGroup([perm_group_elt(aa) for aa in gens]).order() 48 sage: C = graphs.CubeGraph(4) sage: gens = search_tree(C, [C.vertices()], lab=False) sage: PermutationGroup([perm_group_elt(aa) for aa in gens]).order() 384 sage: C = graphs.CubeGraph(5) sage: gens = search_tree(C, [C.vertices()], lab=False) # long time (~8 secs) sage: PermutationGroup([perm_group_elt(aa) for aa in gens]).order() # long time 3840 sage: C = graphs.CubeGraph(6) sage: gens = search_tree(C, [C.vertices()], lab=False) # long time (~50 secs) sage: PermutationGroup([perm_group_elt(aa) for aa in gens]).order() # long time 46080 """ from copy import copy from sage.rings.infinity import Infinity from sage.graphs.graph import enum n = G.order() Pi = copy(Pi) if n == 0: if lab: H = copy(G) if dict: ddd = {} if proof: dd = {} if dict: return [[]], ddd, H, dd else: return [[]], H, dd if lab and dict: return [[]], ddd, H elif lab: return [[]], H elif dict: return [[]], ddd else: return [[]] if proof: lab=True #create to and from mappings to relabel vertices listto = G.vertices() ffrom = {} for v in listto: ffrom[v] = listto.index(v) to = {} for i in range(len(listto)): to[i] = listto[i] G.relabel(ffrom) Pi2 = [] for cell in Pi: newcell = [] for c in cell: newcell.append(ffrom[c]) Pi2.append(newcell) Pi = Pi2 # create the boolean matrix M = [] for _ in range(n): M.append( [False]*n ) if isinstance(G, Graph): for i, j, l in G.edge_iterator(): M[i][j] = True M[j][i] = True elif isinstance(G, DiGraph): for i, j, l in G.arc_iterator(): M[i][j] = True #begin BDM's algorithm: L = 100 state = 1 W = {} v = {} Lambda = {} nu = {} eta = None rho = None Phi = {} Omega = {} e = {} zf = {} zb = {} output = [] k = None h = None hh = None hb = None hzb = None hzf = None qzb = None while not state is None: if verbosity > 1: print 'k: ' + str(k) print 'nu: ' + str(nu) print 'rho: ' + str(rho) if verbosity > 3: print 'e: ' + str(e) print 'hh: ' + str(hh) print 'hb: ' + str(hb) print 'h: ' + str(h) print 'eta: ' + str(eta) print 'zb: ' + str(zb) print 'hzb: ' + str(hzb) print 'hzf: ' + str(hzf) print 'qzb: ' + str(qzb) if state == 1: if verbosity > 0: print 'state: 1' size = 1 k = 1 h = 0 hzb = 0 index = 0 l = 0 Theta = [[i] for i in range(n)] nu[1] = refine(M, Pi, Pi, bool_matrix_format=True) hh = 2 if not dig: if sat225(nu[1], n): hh = 1 if is_discrete(nu[1]): state = 18 else: W[1] = first_smallest_non_trivial(nu[1]) v[1] = min(W[1]) Lambda[1] = 0 e[1] = 0 state = 2 elif state == 2: if verbosity > 0: print 'state: 2' k += 1 nu[k] = perp(M, nu[k-1], v[k-1], bool_matrix_format=True) Lambda[k] = indicator(M, Pi, nu.values(), k, bool_matrix_format=True) if h == 0: state = 5 else: if hzf == k-1 and Lambda[k] == zf[k]: hzf = k if not lab: state = 3 else: qzb = Lambda[k] - zb[k] if hzb == k-1 and qzb == 0: hzb = k if qzb > 0: zb[k] = Lambda[k] state = 3 elif state == 3: if verbosity > 0: print 'state: 3' if hzf <= k or (lab and qzb >= 0): state = 4 ##changed hzb to hzf, == to <= else: state = 6 elif state == 4: if verbosity > 0: print 'state: 4' if is_discrete(nu[k]): state = 7 else: W[k] = first_smallest_non_trivial(nu[k]) v[k] = min(W[k]) if dig or not sat225(nu[k], n): hh = k+1 e[k] = 0 state = 2 elif state == 5: if verbosity > 0: print 'state: 5' zf[k] = Lambda[k] zb[k] = Lambda[k] state = 4 elif state == 6: if verbosity > 0: print 'state: 6' kprime = k k = min([ hh-1, max(ht-1,hzb) ]) if k == 0: k = 1 # not in BDM, broke at G = Graph({0:[], 1:[]}), Pi = [[0,1]], lab=False if kprime == hh: state = 13 else: l = min([l+1,L]) Lambda[l] = min_cell_reps(nu[hh]) Phi[l] = fix(nu[hh]) state = 12 elif state == 7: if verbosity > 0: print 'state: 7' if h == 0: state = 18 elif k < hzf: state = 8 ## BDM had !=, broke at G = Graph({0:[],1:[],2:[]}), Pi = [[0,1,2]] else: gamma = get_permutation(eta.values(), nu.values(), list_perm=True) if verbosity > 2: print gamma if enum(G, quick=True) == G.relabel(gamma, inplace=False, quick=True): # if G^gamma == G: state = 10 else: state = 8 elif state == 8: if verbosity > 0: print 'state: 8' if (not lab) or (qzb < 0): state = 6 elif (qzb > 0) or (k < len(rho)): state = 9 elif (term_pnest_graph(G, nu.values(), enumer=True) > term_pnest_graph(G, rho.values(), enumer=True)): state = 9 elif (term_pnest_graph(G, nu.values(), enumer=True) < term_pnest_graph(G, rho.values(), enumer=True)): state = 6 else: gamma = get_permutation(nu.values(), rho.values(), list_perm=True) if verbosity > 2: print gamma state = 10 elif state == 9: if verbosity > 0: print 'state: 9' rho = copy(nu) qzb = 0 hb = k hzb = k zb[k+1] = Infinity state = 6 elif state == 10: if verbosity > 0: print 'state: 10' l = min([l+1,L]) Omega[l] = min_cell_reps(orbit_partition(gamma, list_perm=True)) Phi[l] = fix(orbit_partition(gamma, list_perm=True)) if finer( orbit_partition(gamma, list_perm=True), Theta ): state = 11 else: Theta = vee( orbit_partition(gamma, list_perm=True), Theta ) output.append(gamma) if tvc in min_cell_reps(Theta) and lab: ## added "and lab" state = 11 else: k = h state = 13 elif state == 11: if verbosity > 0: print 'state: 11' k = hb state = 12 elif state == 12: if verbosity > 0: print 'state: 12' if e[k] == 1: W[k] = [v for v in W[k] if v in Omega[l]] state = 13 elif state == 13: if verbosity > 0: print 'state: 13' if k == 0: state = None else: if k > h: state = 17 elif k == h: state = 14 else: h = k tvc = min(W[k]) tvh = tvc state = 14 elif state == 14: if verbosity > 0: print 'state: 14' for cell in Theta: if v[k] in cell: if tvh in cell: index += 1 else: break VVV = [vv for vv in W[k] if vv > v[k]] if len(VVV) != 0: v[k] = min(VVV) else: v[k] = Infinity if v[k] == Infinity: state = 16 elif v[k] not in min_cell_reps(Theta): state = 14 else: state = 15 elif state == 15: if verbosity > 0: print 'state: 15' hh = min(hh,k+1) hzf = min(hzf,k) if not lab or hb < k: state = 2 # changed hzb to hb else: hb = k # changed hzb to hb qzb = 0 state = 2 elif state == 16: if verbosity > 0: print 'state: 16' if len(W[k]) == index and ht == k+1: ht = k size = size*index index = 0 k -= 1 state = 13 elif state == 17: if verbosity > 0: print 'state: 17' if e[k] == 0: l = W[k] for i in range(1,l+1): boo = True for j in range(1,k): if v[j] not in Phi[i]: boo = False break if boo: l = [v for v in l if v in Omega[i]] W[k] = l e[k] = 1 VVV = [v for v in W[k] if v > v[k]] if len(VVV) != 0: v[k] = min(VVV) else: v[k] = Infinity if v[k] != Infinity: state = 15 k -= 1 state = 13 elif state == 18: if verbosity > 0: print 'state: 18' h = k ht = k hzf = k zf[k+1] = Infinity eta = copy(nu) k -= 1 if not lab: state = 13 else: rho = copy(nu) hzb = k ## BDM had k+1 hb = k ## BDM had k+1 zb[k+2] = Infinity qzb = 0 state = 13 if lab: H = term_pnest_graph(G, rho.values()) G.relabel(to) if dict: ddd = {} for v in G.vertices(): if ffrom[v] != 0: ddd[v] = ffrom[v] else: ddd[v] = n if proof: proofpart = rho.values()[-1] dd = {} for i in proofpart: dd[i[0]] = proofpart.index(i) if dict: return output, ddd, H, dd else: return output, H, dd if lab and dict: return output, ddd, H elif lab: return output, H elif dict: return output, ddd else: return output
27d71cb6938e9f53c1eef0fbe75a725e24d15db2 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9417/27d71cb6938e9f53c1eef0fbe75a725e24d15db2/graph_isom.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1623, 67, 3413, 12, 43, 16, 13380, 16, 11814, 33, 5510, 16, 3097, 33, 8381, 16, 2065, 33, 8381, 16, 14601, 33, 8381, 16, 11561, 33, 20, 4672, 3536, 25374, 716, 326, 5253, 444, 434, 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, 1623, 67, 3413, 12, 43, 16, 13380, 16, 11814, 33, 5510, 16, 3097, 33, 8381, 16, 2065, 33, 8381, 16, 14601, 33, 8381, 16, 11561, 33, 20, 4672, 3536, 25374, 716, 326, 5253, 444, 434, 6...
if os.path.exists(os.path.join(logpath, "mythburn.lck")): write("Lock File Exists - already running???")
fd = os.open(lckpath, os.O_WRONLY | os.O_CREAT | os.O_EXCL) try: os.write(fd, "%d\n" % os.getpid()) os.close(fd) except: os.remove(lckpath) raise except OSError, e: if e.errno == errno.EEXIST: write("Lock file exists -- already running???")
def usage(): write(""" -h/--help (Show this usage) -j/--jobfile file (use file as the job file) -l/--progresslog file (log file to output progress messages) """)
0fb805843dc74893ade451f26a5217f82be03367 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/13713/0fb805843dc74893ade451f26a5217f82be03367/mythburn.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4084, 13332, 1045, 2932, 3660, 300, 76, 19, 413, 5201, 9079, 261, 5706, 333, 4084, 13, 300, 78, 19, 413, 4688, 768, 585, 4202, 261, 1202, 585, 487, 326, 1719, 585, 13, 300, 80, 19, 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, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4084, 13332, 1045, 2932, 3660, 300, 76, 19, 413, 5201, 9079, 261, 5706, 333, 4084, 13, 300, 78, 19, 413, 4688, 768, 585, 4202, 261, 1202, 585, 487, 326, 1719, 585, 13, 300, 80, 19, 4...
self.hbox2.pack_start(self.welcome)
def __init__(self): self.builder = gtk.Builder() self.builder.add_from_file("wordgroupz.glade") self.window = self.builder.get_object("MainWindow") self.window.set_icon_from_file("/usr/share/pixmaps/wordgroupz.png") self.window.set_title("wordGroupz") self.builder.connect_signals(self) self.get_word = self.builder.get_object("get_word") self.get_group = gtk.combo_box_entry_new_text() self.get_group.set_tooltip_text("Enter a group for your word") self.details = self.builder.get_object("textview1") self.eventbox1 = self.builder.get_object('eventbox1') self.eventbox1.modify_bg(gtk.STATE_NORMAL, gtk.gdk.color_parse('#444444')) self.get_group.child.connect('key-press-event',self.item_list_changed) #self.vpan = self.builder.get_object("vpaned1") self.output_txtview = self.builder.get_object("textview2") #pango self.fontdesc = pango.FontDescription("Purisa 10") #self.output_txtview.modify_font(self.fontdesc) for x in wordz_db.list_groups(): self.get_group.append_text(x) self.table1 = self.builder.get_object("table1") self.get_group.show() self.table1.attach(self.get_group, 1,2,1,2)
7259fb520fc5151ef0818ac3852f8ec5fb9b5ce3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10994/7259fb520fc5151ef0818ac3852f8ec5fb9b5ce3/wordgroupz.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 365, 18, 9574, 273, 22718, 18, 1263, 1435, 365, 18, 9574, 18, 1289, 67, 2080, 67, 768, 2932, 1095, 1655, 94, 18, 7043, 2486, 7923, 365, 18, 5668, 273, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 365, 18, 9574, 273, 22718, 18, 1263, 1435, 365, 18, 9574, 18, 1289, 67, 2080, 67, 768, 2932, 1095, 1655, 94, 18, 7043, 2486, 7923, 365, 18, 5668, 273, ...
files = glob.glob(win32com.__gen_path__+ "\*.py") for file in files: name = os.path.splitext(os.path.split(file)[1])[0] if name[0] != '_': mod = _GetModule(name) print "%s - %s" % (mod.__doc__, name)
d = {} for clsid, (typelibCLSID, lcid, major, minor) in clsidToTypelib.items(): d[typelibCLSID, lcid, major, minor] = None for typelibCLSID, lcid, major, minor in d.keys(): mod = GetModuleForTypelib(typelibCLSID, lcid, major, minor) print "%s - %s" % (mod.__doc__, typelibCLSID)
def _Dump(): print "Cache is in directory", win32com.__gen_path__ files = glob.glob(win32com.__gen_path__+ "\*.py") for file in files: name = os.path.splitext(os.path.split(file)[1])[0] if name[0] != '_': mod = _GetModule(name) print "%s - %s" % (mod.__doc__, name)
4cf1af44a185253e6e304af6fd43329bfb1821c5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/677/4cf1af44a185253e6e304af6fd43329bfb1821c5/gencache.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 10628, 13332, 1172, 315, 1649, 353, 316, 1867, 3113, 5657, 1578, 832, 16186, 4507, 67, 803, 972, 1390, 273, 4715, 18, 10581, 12, 8082, 1578, 832, 16186, 4507, 67, 803, 972, 15, 1548...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 10628, 13332, 1172, 315, 1649, 353, 316, 1867, 3113, 5657, 1578, 832, 16186, 4507, 67, 803, 972, 1390, 273, 4715, 18, 10581, 12, 8082, 1578, 832, 16186, 4507, 67, 803, 972, 15, 1548...
self.filtered.add_suites(suites)
self.filtered.add_suites( [ long for long, short in suites ] )
def _filter_by_names(self, suites, tests): self.filtered.add_suites(suites) self.filtered.add_tests(tests) suites = self._filter_suite_names(suites) self.suites = [ suite for suite in self.suites if suite._filter_by_names(suites, tests) ] if suites == []: self.tests = [ test for test in self.tests if tests == [] or utils.matches_any(test.name, tests, ignore=['_']) ] else: self.tests = [] return len(self.suites) + len(self.tests) > 0
ec4e173743785708e87eff7e6a2e244a52e0b07b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7408/ec4e173743785708e87eff7e6a2e244a52e0b07b/model.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2188, 67, 1637, 67, 1973, 12, 2890, 16, 27208, 16, 7434, 4672, 365, 18, 12071, 18, 1289, 67, 26560, 2997, 12, 306, 1525, 364, 1525, 16, 3025, 316, 27208, 308, 262, 365, 18, 12071,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2188, 67, 1637, 67, 1973, 12, 2890, 16, 27208, 16, 7434, 4672, 365, 18, 12071, 18, 1289, 67, 26560, 2997, 12, 306, 1525, 364, 1525, 16, 3025, 316, 27208, 308, 262, 365, 18, 12071,...
<!-- The above is a description of an error that occurred in a Python program. It is formatted for display in a Web browser because it appears that we are running in a CGI environment. In case you are viewing this message outside of a Web browser, here is the original error traceback:
<!-- The above is a description of an error in a Python program, formatted for a Web browser because the 'cgitb' module was enabled. In case you are not reading this in a Web browser, here is the original traceback:
def linereader(lnum=[lnum]): line = linecache.getline(file, lnum[0]) lnum[0] += 1 return line
83205972a2d027517ebedd827d1c19a5b0264c0a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/83205972a2d027517ebedd827d1c19a5b0264c0a/cgitb.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4739, 264, 18105, 12, 80, 2107, 22850, 80, 2107, 65, 4672, 980, 273, 4739, 557, 807, 18, 588, 1369, 12, 768, 16, 328, 2107, 63, 20, 5717, 328, 2107, 63, 20, 65, 1011, 404, 327, 980, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4739, 264, 18105, 12, 80, 2107, 22850, 80, 2107, 65, 4672, 980, 273, 4739, 557, 807, 18, 588, 1369, 12, 768, 16, 328, 2107, 63, 20, 5717, 328, 2107, 63, 20, 65, 1011, 404, 327, 980, ...
dependency_warning('p4python (>=07.3) not found. Perforce integration will not work.')
dependency_warning('p4python (>=07.3) not found. Perforce integration' ' will not work.')
def dependency_warning(string): sys.stderr.write('Warning: %s\n' % string) global warnings_found warnings_found += 1
5a768f9ed929f4d1f402e6fad79cffff383f2917 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1600/5a768f9ed929f4d1f402e6fad79cffff383f2917/manage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4904, 67, 8551, 12, 1080, 4672, 2589, 18, 11241, 18, 2626, 2668, 6210, 30, 738, 87, 64, 82, 11, 738, 533, 13, 2552, 5599, 67, 7015, 5599, 67, 7015, 1011, 404, 2, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4904, 67, 8551, 12, 1080, 4672, 2589, 18, 11241, 18, 2626, 2668, 6210, 30, 738, 87, 64, 82, 11, 738, 533, 13, 2552, 5599, 67, 7015, 5599, 67, 7015, 1011, 404, 2, -100, -100, -100, -1...
def trace_font (fontname, gf_file, metric, glyphs, encoding, magnification):
def trace_font (fontname, gf_file, metric, glyphs, encoding, magnification, fontinfo):
def trace_font (fontname, gf_file, metric, glyphs, encoding, magnification): t1os = [] font_bbox = (10000, 10000, -10000, -10000) progress (_ ("Tracing bitmaps... ")) eps_lines = [] # for single glyph testing. # glyphs = [] for a in glyphs: valid = metric.has_char (a) if not valid: continue valid = make_pbm (gf_file, 'char.pbm', a) if not valid: continue (w, h, xo, yo) = read_gf_dims (gf_file, a) if not verbose_p: sys.stderr.write ('[%d' % a) sys.stderr.flush () # this wants the id, not the filename. success = trace_one ("char.pbm", '%s-%d' % (gf_fontname, a)) if not success: sys.stderr.write ("(skipping character)]") sys.stderr.flush () continue if not verbose_p: sys.stderr.write (']') sys.stderr.flush () metric_width = metric.get_char (a).width tw = int (round (metric_width / metric.design_size * 1000)) (bbox, t1o) = path_to_type1_ops ("char.eps", (h, w, xo, yo), tw) if t1o == '': continue font_bbox = update_bbox_with_bbox (font_bbox, bbox) t1os.append ('/%s %s ' % (encoding[a], t1o)) progress ('\n') to_type1 (t1os, font_bbox, fontname, encoding, magnification)
dfdd47ac4957b0e437c434b79c7589ca35658d7b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11856/dfdd47ac4957b0e437c434b79c7589ca35658d7b/mftrace.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2606, 67, 5776, 261, 5776, 529, 16, 13828, 67, 768, 16, 3999, 16, 23404, 16, 2688, 16, 28160, 1480, 16, 3512, 1376, 4672, 268, 21, 538, 273, 5378, 3512, 67, 20737, 273, 261, 23899, 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, 2606, 67, 5776, 261, 5776, 529, 16, 13828, 67, 768, 16, 3999, 16, 23404, 16, 2688, 16, 28160, 1480, 16, 3512, 1376, 4672, 268, 21, 538, 273, 5378, 3512, 67, 20737, 273, 261, 23899, 16,...
buildscript.execute(cmd, 'git', cwd = self.srcdir)
buildscript.execute(cmd, cwd=self.srcdir)
def _update_submodules(self, buildscript): if os.path.exists(os.path.join(self.srcdir, '.gitmodules')): cmd = ['git', 'submodule', 'init'] buildscript.execute(cmd, 'git', cwd = self.srcdir) cmd = ['git', 'submodule', 'update'] buildscript.execute(cmd, 'git', cwd = self.srcdir)
1a224b0a56aeaf262d7650245ef6abcabae0d850 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4596/1a224b0a56aeaf262d7650245ef6abcabae0d850/git.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2725, 67, 1717, 6400, 12, 2890, 16, 1361, 4263, 4672, 309, 1140, 18, 803, 18, 1808, 12, 538, 18, 803, 18, 5701, 12, 2890, 18, 4816, 1214, 16, 2418, 6845, 6400, 26112, 30, 1797, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2725, 67, 1717, 6400, 12, 2890, 16, 1361, 4263, 4672, 309, 1140, 18, 803, 18, 1808, 12, 538, 18, 803, 18, 5701, 12, 2890, 18, 4816, 1214, 16, 2418, 6845, 6400, 26112, 30, 1797, ...
yield file
yield file
def list_files(self): dir = os.path.expanduser("~/.Trash") for file in FileUtilities.children_in_directory(dir, False): yield file # fixme http://www.ramendik.ru/docs/trashspec.html # http://standards.freedesktop.org/basedir-spec/basedir-spec-0.6.html # GNOME 2.22, Fedora 9 ~/.local/share/Trash dir = os.path.expanduser("~/.local/share/Trash") for file in FileUtilities.children_in_directory(dir, False): yield file
ece8c3e99f8a702d7e0267938ec012476dbadf5f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7853/ece8c3e99f8a702d7e0267938ec012476dbadf5f/CleanerBackend.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 666, 67, 2354, 12, 2890, 4672, 1577, 273, 1140, 18, 803, 18, 12320, 1355, 2932, 98, 15865, 29420, 7923, 364, 585, 316, 1387, 11864, 18, 5906, 67, 267, 67, 5149, 12, 1214, 16, 1083, 467...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 666, 67, 2354, 12, 2890, 4672, 1577, 273, 1140, 18, 803, 18, 12320, 1355, 2932, 98, 15865, 29420, 7923, 364, 585, 316, 1387, 11864, 18, 5906, 67, 267, 67, 5149, 12, 1214, 16, 1083, 467...
{1/6, 1/4, 1/3, 1/2, 1/9, 0, 1/18, 5/12, Infinity, 1/12, 2/3, 5/6}
{1/2, 0, 1/3, 1/12, 5/6, 5/12, 1/4, 1/18, 1/6, 1/9, 2/3, Infinity}
def cusps(self, algorithm='default'): r""" Return a set of inequivalent cusps for self, i.e. a set of representatives for the orbits of self on $\mathbf{P}^1(\mathbf{Q})$. These should be returned in a reduced form.
181eaebff8a9a061a54ebc750cb7d22f46db6243 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/181eaebff8a9a061a54ebc750cb7d22f46db6243/congroup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 27964, 1121, 12, 2890, 16, 4886, 2218, 1886, 11, 4672, 436, 8395, 2000, 279, 444, 434, 316, 14298, 6505, 27964, 1121, 364, 365, 16, 277, 18, 73, 18, 279, 444, 434, 2406, 8785, 364, 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, 27964, 1121, 12, 2890, 16, 4886, 2218, 1886, 11, 4672, 436, 8395, 2000, 279, 444, 434, 316, 14298, 6505, 27964, 1121, 364, 365, 16, 277, 18, 73, 18, 279, 444, 434, 2406, 8785, 364, 326...
return redirect_to_url(req, target, apache.HTTP_MOVED_PERMANENTLY)
return redirect_to_url(req, target)
def legacy_collection(self, req, form): """Collection URL backward compatibility handling.""" accepted_args = dict(legacy_collection_default_urlargd) accepted_args.update({'referer' : (str, ''), 'realm' : (str, '')}) argd = wash_urlargd(form, accepted_args)
6ef09d18d01e43349ecf59c457e1f4275e77be1b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2139/6ef09d18d01e43349ecf59c457e1f4275e77be1b/websearch_webinterface.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8866, 67, 5548, 12, 2890, 16, 1111, 16, 646, 4672, 3536, 2532, 1976, 12555, 8926, 5057, 12123, 8494, 67, 1968, 273, 2065, 12, 17386, 67, 5548, 67, 1886, 67, 718, 3175, 72, 13, 8494, 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, 8866, 67, 5548, 12, 2890, 16, 1111, 16, 646, 4672, 3536, 2532, 1976, 12555, 8926, 5057, 12123, 8494, 67, 1968, 273, 2065, 12, 17386, 67, 5548, 67, 1886, 67, 718, 3175, 72, 13, 8494, 67...
ld t1, ds, [scale, index, base], disp
ld t1, ds, [1, t0, t7], disp
def macroop XOR_R_P
7cd92ac6ddc118e2e8a1d0ca9acca93165ec36d7 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7385/7cd92ac6ddc118e2e8a1d0ca9acca93165ec36d7/logical.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11522, 556, 28086, 67, 54, 67, 52, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11522, 556, 28086, 67, 54, 67, 52, 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, ...
specCache = JobState.get('CacheDirLocation', None)
specCache = jobState.get('CacheDirLocation', None)
def submitJob(self, payload ): """ _createJob_
34a63c08a16b8ccd15b50b0efe392141d4cbdffd /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8887/34a63c08a16b8ccd15b50b0efe392141d4cbdffd/JobSubmitterComponent.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4879, 2278, 12, 2890, 16, 2385, 262, 30, 3536, 389, 2640, 2278, 67, 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, 4879, 2278, 12, 2890, 16, 2385, 262, 30, 3536, 389, 2640, 2278, 67, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
"Valid commands: 'help', 'stats', 'start game', 'end game', 'renick'", target)
"Valid commands: 'help', 'stats', 'start game', 'end game', 'renick', 'del'", target)
def do_command(self, e, cmd, from_private): """This is the function called whenever someone sends a public or private message addressed to the bot. (e.g. "bot: blah"). Parse the CMD, execute it, then reply either to public channel or via /msg, based on how the command was received. E is the original event, and FROM_PRIVATE is the nick that sent the message."""
a19f1df6d00f5a74a0e7952aacc8c5b1a76102b0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3953/a19f1df6d00f5a74a0e7952aacc8c5b1a76102b0/wolfbot.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 3076, 12, 2890, 16, 425, 16, 1797, 16, 628, 67, 1152, 4672, 3536, 2503, 353, 326, 445, 2566, 17334, 18626, 9573, 279, 1071, 578, 3238, 883, 527, 4638, 358, 326, 2512, 18, 261,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 3076, 12, 2890, 16, 425, 16, 1797, 16, 628, 67, 1152, 4672, 3536, 2503, 353, 326, 445, 2566, 17334, 18626, 9573, 279, 1071, 578, 3238, 883, 527, 4638, 358, 326, 2512, 18, 261,...
getattr(self.distribution,'dist_files',[]).append( ('bdist_wininst', pyversion, installer_name) )
bad = ('bdist_wininst','any',installer_name) if bad in dist_files: dist_files.remove(bad) else: installer_name = os.path.join(self.dist_dir, "%s.win32.exe" % fullname) pyversion = 'any' dist_files.append(('bdist_wininst', pyversion, installer_name))
def create_exe(self, arcname, fullname, bitmap=None):
f18b3474396aebdbd2d915ad37850e2a36b7cf70 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8186/f18b3474396aebdbd2d915ad37850e2a36b7cf70/bdist_wininst.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 14880, 12, 2890, 16, 8028, 529, 16, 13321, 16, 9389, 33, 7036, 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, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 14880, 12, 2890, 16, 8028, 529, 16, 13321, 16, 9389, 33, 7036, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
expected = 'def <tt>ghi</tt> jkl <tt>mno</tt> pqr'
expected = 'def <tt>ghi</tt> jkl <tt>mno</tt>'
raw = 'def {{{ghi}}} jkl {{{mno}}} pqr'
bbbf4bb0ddc5a35e1ce89bebcb95ef9f2c520c95 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/888/bbbf4bb0ddc5a35e1ce89bebcb95ef9f2c520c95/test_text_moin_wiki.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1831, 273, 296, 536, 10179, 95, 75, 12266, 9090, 97, 525, 16391, 10179, 95, 81, 2135, 9090, 97, 14619, 86, 11, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1831, 273, 296, 536, 10179, 95, 75, 12266, 9090, 97, 525, 16391, 10179, 95, 81, 2135, 9090, 97, 14619, 86, 11, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
- Oscar Lazo, William Cauchois (2009-2010): Adding coordinate transformations
- Oscar Lazo, William Cauchois, Jason Grout (2009-2010): Adding coordinate transformations
sage: def f(x,y): return math.exp(x/5)*math.cos(y)
85811d8c24ec26acc8a960fadc0b24274c01a5a8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9417/85811d8c24ec26acc8a960fadc0b24274c01a5a8/plot3d.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 272, 410, 30, 1652, 284, 12, 92, 16, 93, 4672, 327, 4233, 18, 2749, 12, 92, 19, 25, 17653, 15949, 18, 14445, 12, 93, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 272, 410, 30, 1652, 284, 12, 92, 16, 93, 4672, 327, 4233, 18, 2749, 12, 92, 19, 25, 17653, 15949, 18, 14445, 12, 93, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
if response.getheader("Content-Encoding", "") == "gzip": stream = GzipDecodedResponse(response)
if hasattr(response,'getheader'): if response.getheader("Content-Encoding", "") == "gzip": stream = GzipDecodedResponse(response) else: stream = response
def parse_response(self, response): # read response data from httpresponse, and parse it if response.getheader("Content-Encoding", "") == "gzip": stream = GzipDecodedResponse(response) else: stream = response
40d1804cb1f3eb8645190dd94d80bea8bc8c93c3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8125/40d1804cb1f3eb8645190dd94d80bea8bc8c93c3/xmlrpclib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 2740, 12, 2890, 16, 766, 4672, 468, 855, 766, 501, 628, 1062, 2740, 16, 471, 1109, 518, 282, 309, 3859, 12, 2740, 11189, 75, 546, 18105, 11, 4672, 309, 766, 18, 75, 546, 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, 1109, 67, 2740, 12, 2890, 16, 766, 4672, 468, 855, 766, 501, 628, 1062, 2740, 16, 471, 1109, 518, 282, 309, 3859, 12, 2740, 11189, 75, 546, 18105, 11, 4672, 309, 766, 18, 75, 546, 18...
'Are you sure you want to delete all groups ?',
'Are you sure you want to delete all groups?',
def del_group(self, opts, args): """ delete an Licorn group. """ selection = filters.NONE if opts.empty: selection = filters.EMPTY include_id_lists=[ (opts.name, LMC.groups.name_to_gid), (opts.gid, LMC.groups.confirm_gid), ] exclude_id_lists = [ (opts.exclude, LMC.groups.guess_identifier), (opts.exclude_group, LMC.groups.name_to_gid), (opts.exclude_gid, LMC.groups.confirm_gid) ] if opts.all and ( ( # NOTE TO THE READER: don't event try to simplify these conditions, # or the order the tests: they just MATTER. Read the tests in pure # english to undestand them and why the order is important. opts.non_interactive and opts.force) or opts.batch \ or (opts.non_interactive and logging.ask_for_repair( 'Are you sure you want to delete all groups ?', auto_answer=opts.auto_answer) or not opts.non_interactive)): include_id_lists.extend([ (LMC.groups.Select(filters.STD), LMC.groups.confirm_gid), (LMC.groups.Select(filters.SYSUNRSTR), LMC.groups.confirm_gid) ]) gids_to_del = self.select(LMC.groups, 'group', args, include_id_lists=include_id_lists, exclude_id_lists = exclude_id_lists, default_selection=selection) for gid in gids_to_del: if opts.non_interactive or opts.batch or opts.force or \ logging.ask_for_repair('''Delete group %s ?''' % stylize( ST_LOGIN,LMC.groups.gid_to_name(gid)), auto_answer=opts.auto_answer): LMC.groups.DeleteGroup(gid=gid, del_users=opts.del_users, no_archive=opts.no_archive) #logging.notice("Deleting group : %s" % LMC.groups.gid_to_name(gid))
a1acd345c6b587c46acec53d660359e9c2c78c73 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/a1acd345c6b587c46acec53d660359e9c2c78c73/rwi.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1464, 67, 1655, 12, 2890, 16, 1500, 16, 833, 4672, 3536, 1430, 392, 511, 335, 14245, 1041, 18, 3536, 4421, 273, 3415, 18, 9826, 309, 1500, 18, 5531, 30, 4421, 273, 3415, 18, 13625, 234...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1464, 67, 1655, 12, 2890, 16, 1500, 16, 833, 4672, 3536, 1430, 392, 511, 335, 14245, 1041, 18, 3536, 4421, 273, 3415, 18, 9826, 309, 1500, 18, 5531, 30, 4421, 273, 3415, 18, 13625, 234...
print "find NOT FOUND"
print "find %s NOT FOUND" % self.port
def callback(self, values): try: if(len(values) == 0): if not self.found: print "find NOT FOUND" else: print "find FOUND" else: if self.val in values: self.found = 1 finally: self.flag.set()
a6a2f7ed963e55f0b99926b84cdbdc7be5d3d47c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/665/a6a2f7ed963e55f0b99926b84cdbdc7be5d3d47c/khashmir.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1348, 12, 2890, 16, 924, 4672, 775, 30, 309, 12, 1897, 12, 2372, 13, 422, 374, 4672, 309, 486, 365, 18, 7015, 30, 1172, 315, 4720, 282, 738, 87, 2398, 4269, 17634, 5240, 6, 738, 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, 1348, 12, 2890, 16, 924, 4672, 775, 30, 309, 12, 1897, 12, 2372, 13, 422, 374, 4672, 309, 486, 365, 18, 7015, 30, 1172, 315, 4720, 282, 738, 87, 2398, 4269, 17634, 5240, 6, 738, 365,...
def getTransformationDirectories(self,transID):
def getTransformationDirectories( self, transID ):
def getTransformationDirectories(self,transID): """ Get the directories for the supplied transformation from the transformation system """ directories = [] if 'TransformationDB' in self.directoryLocations: res = self.transClient.getTransformationParameters(transID,['OutputDirectories']) if not res['OK']: gLogger.error("Failed to obtain transformation directories",res['Message']) return res transDirectories = res['Value'].splitlines() directories = self.__addDirs(transID,transDirectories,directories)
c3853ad0438058db66814335a87076cdaecd2d33 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/c3853ad0438058db66814335a87076cdaecd2d33/TransformationCleaningAgent.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 15292, 13071, 12, 365, 16, 906, 734, 262, 30, 3536, 968, 326, 6402, 364, 326, 4580, 8620, 628, 326, 8620, 2619, 3536, 6402, 273, 5378, 309, 296, 15292, 2290, 11, 316, 365, 18, 514...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 15292, 13071, 12, 365, 16, 906, 734, 262, 30, 3536, 968, 326, 6402, 364, 326, 4580, 8620, 628, 326, 8620, 2619, 3536, 6402, 273, 5378, 309, 296, 15292, 2290, 11, 316, 365, 18, 514...
self.metadata.show_opf(self.iterator.opf)
self.metadata.show_opf(self.iterator.opf, os.path.splitext(pathtoebook)[1][1:])
def load_ebook(self, pathtoebook): if self.iterator is not None: self.save_current_position() self.iterator.__exit__() self.iterator = EbookIterator(pathtoebook) self.open_progress_indicator(_('Loading ebook...')) worker = Worker(target=self.iterator.__enter__) worker.start() while worker.isAlive(): worker.join(0.1) QApplication.processEvents() if worker.exception is not None: if isinstance(worker.exception, DRMError): error_dialog(self, _('DRM Error'), _('<p>This book is protected by <a href="%s">DRM</a>') %'http://wiki.mobileread.com/wiki/DRM').exec_() else: r = getattr(worker.exception, 'reason', worker.exception) error_dialog(self, _('Could not open ebook'), unicode(r), det_msg=worker.traceback, show=True) self.close_progress_indicator() else: self.metadata.show_opf(self.iterator.opf) title = self.iterator.opf.title if not title: title = os.path.splitext(os.path.basename(pathtoebook))[0] self.action_table_of_contents.setDisabled(not self.iterator.toc) if self.iterator.toc: self.toc_model = TOC(self.iterator.toc) self.toc.setModel(self.toc_model) self.current_title = title self.setWindowTitle(unicode(self.windowTitle())+' - '+title) self.pos.setMaximum(sum(self.iterator.pages)) self.pos.setSuffix(' / %d'%sum(self.iterator.pages)) self.vertical_scrollbar.setMinimum(100) self.vertical_scrollbar.setMaximum(100*sum(self.iterator.pages)) self.vertical_scrollbar.setSingleStep(10) self.vertical_scrollbar.setPageStep(100) self.set_vscrollbar_value(1) self.current_index = -1 QApplication.instance().alert(self, 5000) previous = self.set_bookmarks(self.iterator.bookmarks) if previous is not None: self.goto_bookmark(previous) else: self.next_document()
eb95f16c46ecb1777c7a76bac5c63fe6b3371d60 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9125/eb95f16c46ecb1777c7a76bac5c63fe6b3371d60/main.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1262, 67, 73, 3618, 12, 2890, 16, 589, 869, 73, 3618, 4672, 309, 365, 18, 9838, 353, 486, 599, 30, 365, 18, 5688, 67, 2972, 67, 3276, 1435, 365, 18, 9838, 16186, 8593, 972, 1435, 365...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1262, 67, 73, 3618, 12, 2890, 16, 589, 869, 73, 3618, 4672, 309, 365, 18, 9838, 353, 486, 599, 30, 365, 18, 5688, 67, 2972, 67, 3276, 1435, 365, 18, 9838, 16186, 8593, 972, 1435, 365...
def list_fs_templates(self, metatype):
def list_fs_templates(self, portal):
def list_fs_templates(self, metatype): """ return the list of the filesystem templates """ portal_path = self.get_portal_path(metatype) skel_handler, error = skel_parser().parse(readFile(join(portal_path, 'skel', 'skel.xml'), 'r')) if skel_handler.root.forms is not None: return [f.id for f in skel_handler.root.forms.forms]
0116da894b0fd06e2befe1c4b6331ce460957cbc /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3287/0116da894b0fd06e2befe1c4b6331ce460957cbc/NaayaUpdater.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 666, 67, 2556, 67, 8502, 12, 2890, 16, 11899, 4672, 3536, 327, 326, 666, 434, 326, 6496, 5539, 3536, 11899, 67, 803, 273, 365, 18, 588, 67, 24386, 67, 803, 12, 10578, 6361, 13, 4343, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 666, 67, 2556, 67, 8502, 12, 2890, 16, 11899, 4672, 3536, 327, 326, 666, 434, 326, 6496, 5539, 3536, 11899, 67, 803, 273, 365, 18, 588, 67, 24386, 67, 803, 12, 10578, 6361, 13, 4343, ...
self.youtube.entry_lock.acquire (True)
def run (self): self.youtube.entry_lock.acquire (True) try: self.youtube.entry[self.treeview_name] = self.youtube.service.Get (self.url).entry except gdata.service.RequestError: """Probably a 503 service unavailable. Unfortunately we can't give an error message, as we're not in the GUI thread""" """Just let the lock go and return""" self.youtube.entry_lock.release ()
46523ddcd022328735d34c97303e166c1ff3dd97 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11070/46523ddcd022328735d34c97303e166c1ff3dd97/youtube.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 261, 2890, 4672, 775, 30, 365, 18, 31749, 18, 4099, 63, 2890, 18, 3413, 1945, 67, 529, 65, 273, 365, 18, 31749, 18, 3278, 18, 967, 261, 2890, 18, 718, 2934, 4099, 1335, 314, 89...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 261, 2890, 4672, 775, 30, 365, 18, 31749, 18, 4099, 63, 2890, 18, 3413, 1945, 67, 529, 65, 273, 365, 18, 31749, 18, 3278, 18, 967, 261, 2890, 18, 718, 2934, 4099, 1335, 314, 89...
def ListProto(_dict): for proto in default_ports.iterkeys(): yield (proto, _dict[proto]) def ListPorts(_dict): for port in _dict.iterkeys(): if port not in default_ports: yield (port, _dict[port])
def ListProto(_dict): for proto in default_ports.iterkeys(): yield (proto, _dict[proto])
e6b934d874638116159258819f29844cdd6a0420 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4762/e6b934d874638116159258819f29844cdd6a0420/lookup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 987, 6262, 24899, 1576, 4672, 364, 3760, 316, 805, 67, 4363, 18, 2165, 2452, 13332, 2824, 261, 9393, 16, 389, 1576, 63, 9393, 5717, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 987, 6262, 24899, 1576, 4672, 364, 3760, 316, 805, 67, 4363, 18, 2165, 2452, 13332, 2824, 261, 9393, 16, 389, 1576, 63, 9393, 5717, 2, -100, -100, -100, -100, -100, -100, -100, -100, -10...