rem
stringlengths
1
226k
add
stringlengths
0
227k
context
stringlengths
6
326k
meta
stringlengths
143
403
input_ids
listlengths
256
256
attention_mask
listlengths
256
256
labels
listlengths
128
128
self.configure(**kwargs)
def _configure(self, **kwargs): # before passing the configuration data to the # component, store and remove the common stuff if "title" in kwargs: self._title = kwargs.pop("title") if "slug" in kwargs: self._slug = kwargs.pop("slug") try: self.configure(**kwargs) except TypeError, e: # "__init__() got an unexpected keyword argument '...'" if "unexpected keyword" in e.message: missing_keyword = e.message.split("'")[1] raise Exception("Component '%s' does not support a '%s' option." % (title, missing_keyword)) else: raise self.configure(**kwargs)
14c9dcf5de0ae6f7ca927b92f12c617637ff0a9a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11809/14c9dcf5de0ae6f7ca927b92f12c617637ff0a9a/component.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 14895, 12, 2890, 16, 2826, 4333, 4672, 225, 468, 1865, 9588, 326, 1664, 501, 358, 326, 468, 1794, 16, 1707, 471, 1206, 326, 2975, 10769, 309, 315, 2649, 6, 316, 1205, 30, 365, 631...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 14895, 12, 2890, 16, 2826, 4333, 4672, 225, 468, 1865, 9588, 326, 1664, 501, 358, 326, 468, 1794, 16, 1707, 471, 1206, 326, 2975, 10769, 309, 315, 2649, 6, 316, 1205, 30, 365, 631...
rml_parser.set_context(objs, data, ids,report_xml.report_type)
rml_parser.set_context(objs, data, ids, mime_type)
def create_single_odt(self, cr, uid, ids, data, report_xml, context=None): if not context: context={} context = context.copy() report_type = report_xml.report_type context['parents'] = sxw_parents sxw_io = StringIO.StringIO(report_xml.report_sxw_content) sxw_z = zipfile.ZipFile(sxw_io, mode='r') rml = sxw_z.read('content.xml') meta = sxw_z.read('meta.xml') sxw_z.close()
13a43dfdc36b751cb9ed6c55169e76b48094b829 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/13a43dfdc36b751cb9ed6c55169e76b48094b829/report_sxw.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 7526, 67, 369, 88, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 501, 16, 2605, 67, 2902, 16, 819, 33, 7036, 4672, 309, 486, 819, 30, 819, 12938, 819, 273, 819, 18, 3530, 14...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 7526, 67, 369, 88, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 501, 16, 2605, 67, 2902, 16, 819, 33, 7036, 4672, 309, 486, 819, 30, 819, 12938, 819, 273, 819, 18, 3530, 14...
raise ValueError, "file type must be either 'png' or 'ps' or 'svg'"
raise ValueError, "file type (filename=%s) must be either 'png' or 'ps' or 'svg'"%(filename)
def save(self, filename='sage.png', xmin=None, xmax=None, ymin=None, ymax=None, figsize=DEFAULT_FIGSIZE, fig=None, sub=None, savenow=True, dpi=None): """
7f9525ee63400047a2f2900c10232d9d012cd8cb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9417/7f9525ee63400047a2f2900c10232d9d012cd8cb/plot.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1923, 12, 2890, 16, 1544, 2218, 87, 410, 18, 6446, 2187, 13777, 33, 7036, 16, 14016, 33, 7036, 16, 15763, 33, 7036, 16, 15275, 33, 7036, 16, 14697, 33, 5280, 67, 5236, 4574, 16, 4291, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1923, 12, 2890, 16, 1544, 2218, 87, 410, 18, 6446, 2187, 13777, 33, 7036, 16, 14016, 33, 7036, 16, 15763, 33, 7036, 16, 15275, 33, 7036, 16, 14697, 33, 5280, 67, 5236, 4574, 16, 4291, ...
listfuncs = false
listfuncs = False
def main(argv=None): import getopt if argv is None: argv = sys.argv try: opts, prog_argv = getopt.getopt(argv[1:], "tcrRf:d:msC:l", ["help", "version", "trace", "count", "report", "no-report", "file=", "missing", "ignore-module=", "ignore-dir=", "coverdir=", "listfuncs",]) except getopt.error, msg: sys.stderr.write("%s: %s\n" % (sys.argv[0], msg)) sys.stderr.write("Try `%s --help' for more information\n" % sys.argv[0]) sys.exit(1) trace = 0 count = 0 report = 0 no_report = 0 counts_file = None missing = 0 ignore_modules = [] ignore_dirs = [] coverdir = None summary = 0 listfuncs = false for opt, val in opts: if opt == "--help": usage(sys.stdout) sys.exit(0) if opt == "--version": sys.stdout.write("trace 2.0\n") sys.exit(0) if opt == "-l" or opt == "--listfuncs": listfuncs = true continue if opt == "-t" or opt == "--trace": trace = 1 continue if opt == "-c" or opt == "--count": count = 1 continue if opt == "-r" or opt == "--report": report = 1 continue if opt == "-R" or opt == "--no-report": no_report = 1 continue if opt == "-f" or opt == "--file": counts_file = val continue if opt == "-m" or opt == "--missing": missing = 1 continue if opt == "-C" or opt == "--coverdir": coverdir = val continue if opt == "-s" or opt == "--summary": summary = 1 continue if opt == "--ignore-module": ignore_modules.append(val) continue if opt == "--ignore-dir": for s in val.split(os.pathsep): s = os.path.expandvars(s) # should I also call expanduser? (after all, could use $HOME) s = s.replace("$prefix", os.path.join(sys.prefix, "lib", "python" + sys.version[:3])) s = s.replace("$exec_prefix", os.path.join(sys.exec_prefix, "lib", "python" + sys.version[:3])) s = os.path.normpath(s) ignore_dirs.append(s) continue assert 0, "Should never get here" if listfuncs and (count or trace): _err_exit("cannot specify both --listfuncs and (--trace or --count)") if not count and not trace and not report and not listfuncs: _err_exit("must specify one of --trace, --count, --report or --listfuncs") if report and no_report: _err_exit("cannot specify both --report and --no-report") if report and not counts_file: _err_exit("--report requires a --file") if no_report and len(prog_argv) == 0: _err_exit("missing name of file to run") # everything is ready if report: results = CoverageResults(infile=counts_file, outfile=counts_file) results.write_results(missing, summary=summary, coverdir=coverdir) else: sys.argv = prog_argv progname = prog_argv[0] sys.path[0] = os.path.split(progname)[0] t = Trace(count, trace, countfuncs=listfuncs, ignoremods=ignore_modules, ignoredirs=ignore_dirs, infile=counts_file, outfile=counts_file) try: t.run('execfile(' + `progname` + ')') except IOError, err: _err_exit("Cannot run file %s because: %s" % (`sys.argv[0]`, err)) except SystemExit: pass results = t.results() if not no_report: results.write_results(missing, summary=summary, coverdir=coverdir)
6bf45c67523a8e81963ce645979ac85f4f75ef33 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/6bf45c67523a8e81963ce645979ac85f4f75ef33/trace.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 19485, 33, 7036, 4672, 1930, 336, 3838, 225, 309, 5261, 353, 599, 30, 5261, 273, 2589, 18, 19485, 775, 30, 1500, 16, 11243, 67, 19485, 273, 336, 3838, 18, 588, 3838, 12, 1948...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 19485, 33, 7036, 4672, 1930, 336, 3838, 225, 309, 5261, 353, 599, 30, 5261, 273, 2589, 18, 19485, 775, 30, 1500, 16, 11243, 67, 19485, 273, 336, 3838, 18, 588, 3838, 12, 1948...
return Sum((other, -self))
return Expression.__rsub__(self, other)
def __rsub__(self, other): if not isinstance(other, Expression): return Constant(other - self.Value) if self.Value == 0: return other return Sum((other, -self))
0aea67b6248de24bf5c20988f84fdf8ba68e066d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12571/0aea67b6248de24bf5c20988f84fdf8ba68e066d/primitives.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 86, 1717, 972, 12, 2890, 16, 1308, 4672, 309, 486, 1549, 12, 3011, 16, 5371, 4672, 327, 10551, 12, 3011, 300, 365, 18, 620, 13, 309, 365, 18, 620, 422, 374, 30, 327, 1308, 327,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 86, 1717, 972, 12, 2890, 16, 1308, 4672, 309, 486, 1549, 12, 3011, 16, 5371, 4672, 327, 10551, 12, 3011, 300, 365, 18, 620, 13, 309, 365, 18, 620, 422, 374, 30, 327, 1308, 327,...
path = sys.path
path = sys.path[:]
def main(): # overridable context prefix = None # settable with -p option exec_prefix = None # settable with -P option extensions = [] path = sys.path modargs = 0 debug = 1 odir = '' win = sys.platform[:3] == 'win' # modules that are imported by the Python runtime implicits = ["site", "exceptions"] # output files frozen_c = 'frozen.c' config_c = 'config.c' target = 'a.out' # normally derived from script name makefile = 'Makefile' subsystem = 'console' # parse command line try: opts, args = getopt.getopt(sys.argv[1:], 'deh:mo:p:P:qs:w') except getopt.error, msg: usage('getopt error: ' + str(msg)) # proces option arguments for o, a in opts: if o == '-h': print __doc__ return if o == '-d': debug = debug + 1 if o == '-e': extensions.append(a) if o == '-m': modargs = 1 if o == '-o': odir = a if o == '-p': prefix = a if o == '-P': exec_prefix = a if o == '-q': debug = 0 if o == '-w': win = not win if o == '-s': if not win: usage("-s subsystem option only on Windows") subsystem = a # default prefix and exec_prefix if not exec_prefix: if prefix: exec_prefix = prefix else: exec_prefix = sys.exec_prefix if not prefix: prefix = sys.prefix # determine whether -p points to the Python source tree ishome = os.path.exists(os.path.join(prefix, 'Include', 'pythonrun.h')) # locations derived from options version = sys.version[:3] if ishome: print "(Using Python source directory)" binlib = exec_prefix incldir = os.path.join(prefix, 'Include') config_c_in = os.path.join(prefix, 'Modules', 'config.c.in') frozenmain_c = os.path.join(prefix, 'Python', 'frozenmain.c') makefile_in = os.path.join(exec_prefix, 'Modules', 'Makefile') else: binlib = os.path.join(exec_prefix, 'lib', 'python%s' % version, 'config') incldir = os.path.join(prefix, 'include', 'python%s' % version) config_c_in = os.path.join(binlib, 'config.c.in') frozenmain_c = os.path.join(binlib, 'frozenmain.c') makefile_in = os.path.join(binlib, 'Makefile') supp_sources = [] defines = [] includes = ['-I' + incldir, '-I' + binlib] # sanity check of directories and files for dir in [prefix, exec_prefix, binlib, incldir] + extensions: if not os.path.exists(dir): usage('needed directory %s not found' % dir) if not os.path.isdir(dir): usage('%s: not a directory' % dir) if win: files = supp_sources else: files = [config_c_in, makefile_in] + supp_sources for file in supp_sources: if not os.path.exists(file): usage('needed file %s not found' % file) if not os.path.isfile(file): usage('%s: not a plain file' % file) if not win: for dir in extensions: setup = os.path.join(dir, 'Setup') if not os.path.exists(setup): usage('needed file %s not found' % setup) if not os.path.isfile(setup): usage('%s: not a plain file' % setup) # check that enough arguments are passed if not args: usage('at least one filename argument required') # check that the script name ends in ".py" if args[0][-3:] != ".py": usage('the script name must have a .py suffix') # check that file arguments exist for arg in args: if not os.path.exists(arg): usage('argument %s not found' % arg) if not os.path.isfile(arg): usage('%s: not a plain file' % arg) # process non-option arguments scriptfile = args[0] modules = args[1:] # derive target name from script name base = os.path.basename(scriptfile) base, ext = os.path.splitext(base) if base: if base != scriptfile: target = base else: target = base + '.bin' # handle -o option base_frozen_c = frozen_c base_config_c = config_c base_target = target if odir and not os.path.isdir(odir): try: os.mkdir(odir) print "Created output directory", odir except os.error, msg: usage('%s: mkdir failed (%s)' % (odir, str(msg))) if odir: frozen_c = os.path.join(odir, frozen_c) config_c = os.path.join(odir, config_c) target = os.path.join(odir, target) makefile = os.path.join(odir, makefile) # Actual work starts here... # collect all modules of the program mf = modulefinder.ModuleFinder(path, debug) for mod in implicits: mf.import_hook(mod) for mod in modules: if mod == '-m': modargs = 1 continue if modargs: if mod[-2:] == '.*': mf.import_hook(mod[:-2], None, ["*"]) else: mf.import_hook(mod) else: mf.load_file(mod) mf.run_script(scriptfile) if debug > 0: mf.report() print dict = mf.modules # generate output for frozen modules backup = frozen_c + '~' try: os.rename(frozen_c, backup) except os.error: backup = None outfp = open(frozen_c, 'w') try: makefreeze.makefreeze(outfp, dict, debug) if win and subsystem == 'windows': import winmakemakefile outfp.write(winmakemakefile.WINMAINTEMPLATE) finally: outfp.close() if backup: if cmp.cmp(backup, frozen_c): sys.stderr.write('%s not changed, not written\n' % frozen_c) os.rename(backup, frozen_c) # windows gets different treatment if win: # Taking a shortcut here... import winmakemakefile outfp = open(makefile, 'w') try: winmakemakefile.makemakefile(outfp, locals(), [frozenmain_c, frozen_c], target) finally: outfp.close() return # generate config.c and Makefile builtins = [] unknown = [] mods = dict.keys() mods.sort() for mod in mods: if dict[mod].__code__: continue if not dict[mod].__file__: builtins.append(mod) else: unknown.append(mod) addfiles = [] if unknown: addfiles, addmods = \ checkextensions.checkextensions(unknown, extensions) for mod in addmods: unknown.remove(mod) builtins = builtins + addmods if unknown: sys.stderr.write('Warning: unknown modules remain: %s\n' % string.join(unknown)) builtins.sort() infp = open(config_c_in) backup = config_c + '~' try: os.rename(config_c, backup) except os.error: backup = None outfp = open(config_c, 'w') try: makeconfig.makeconfig(infp, outfp, builtins) finally: outfp.close() infp.close() if backup: if cmp.cmp(backup, config_c): sys.stderr.write('%s not changed, not written\n' % config_c) os.rename(backup, config_c) cflags = defines + includes + ['$(OPT)'] libs = [os.path.join(binlib, 'libpython$(VERSION).a')] somevars = {} if os.path.exists(makefile_in): makevars = parsesetup.getmakevars(makefile_in) for key in makevars.keys(): somevars[key] = makevars[key] somevars['CFLAGS'] = string.join(cflags) # override files = ['$(OPT)', '$(LDFLAGS)', base_config_c, base_frozen_c] + \ supp_sources + addfiles + libs + \ ['$(MODLIBS)', '$(LIBS)', '$(SYSLIBS)'] backup = makefile + '~' try: os.rename(makefile, backup) except os.error: backup = None outfp = open(makefile, 'w') try: makemakefile.makemakefile(outfp, somevars, files, base_target) finally: outfp.close() if backup: if not cmp.cmp(backup, makefile): print 'previous Makefile saved as', backup else: sys.stderr.write('%s not changed, not written\n' % makefile) os.rename(backup, makefile) # Done! if odir: print 'Now run "make" in', odir, print 'to build the target:', base_target else: print 'Now run "make" to build the target:', base_target
f8b1a25a9026ecea98d9e90b2676d337c6d4e575 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/f8b1a25a9026ecea98d9e90b2676d337c6d4e575/freeze.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 468, 5713, 27621, 819, 1633, 273, 599, 15604, 468, 444, 2121, 598, 300, 84, 1456, 1196, 67, 3239, 273, 599, 5375, 468, 444, 2121, 598, 300, 52, 1456, 4418, 273, 5378, 589, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 468, 5713, 27621, 819, 1633, 273, 599, 15604, 468, 444, 2121, 598, 300, 84, 1456, 1196, 67, 3239, 273, 599, 5375, 468, 444, 2121, 598, 300, 52, 1456, 4418, 273, 5378, 589, ...
'Already found a project named %s. '\
'Already found a project named %s.\n'\
def import_projects(parsed_data): # This could prompt the user, asking: # "Want us to import projects? Say no if you have already # added the projects to the new Pootle DB in the web UI." data = parsed_data.__root__._assignments # Is this really the right way? prefix = 'Pootle.projects.' # Filter out unrelated keys keys = [key for key in data if key.startswith(prefix)] # Clean up 'pootle.fullname' into 'pootle' projs = set([key[len(prefix):].split('.')[0] for key in keys]) for proj in map(lambda s: unicode(s, 'utf-8'), projs): # id, for free # code: try: db_proj = Project.objects.get(code=proj) logging.log(logging.INFO, 'Already found a project named %s. '\ 'Data for this project are not imported.', proj) continue except Project.DoesNotExist: db_proj = Project(code=proj) # fullname db_proj.fullname = _get_attribute(data, proj, 'fullname') # description db_proj.description = _get_attribute(data, proj, 'description') # checkstyle db_proj.checkstyle = _get_attribute(data, proj, 'checkstyle', unicode_me = False) # localfiletype db_proj.localfiletype = _get_attribute(data, proj, 'localfiletype', default='po') # createmofiles? db_proj.createmofiles = try_type(bool, _get_attribute(data, proj, 'createmofiles', unicode_me=False, default=0)) # treestyle db_proj.treestyle = _get_attribute(data, proj, 'treestyle', unicode_me = False, default='auto') # ignoredfiles db_proj.ignoredfiles = _get_attribute(data, proj, 'ignoredfiles', default=u'') db_proj.save()
b258c8ea0266b77ff7c47a2a0f3ddc79f40a8dc8 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11388/b258c8ea0266b77ff7c47a2a0f3ddc79f40a8dc8/import_old_prefs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1930, 67, 13582, 12, 10817, 67, 892, 4672, 468, 1220, 3377, 6866, 326, 729, 16, 29288, 30, 468, 315, 59, 970, 584, 358, 1930, 10137, 35, 348, 528, 1158, 309, 1846, 1240, 1818, 468, 309...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1930, 67, 13582, 12, 10817, 67, 892, 4672, 468, 1220, 3377, 6866, 326, 729, 16, 29288, 30, 468, 315, 59, 970, 584, 358, 1930, 10137, 35, 348, 528, 1158, 309, 1846, 1240, 1818, 468, 309...
if not buf_obj:
if buf_obj is not None:
def BandReadAsArray( band, xoff, yoff, win_xsize, win_ysize, buf_xsize=None, buf_ysize=None, buf_obj=None ): """Pure python implementation of reading a chunk of a GDAL file into a numpy array. Used by the gdal.Band.ReadaAsArray method.""" if win_xsize is None: win_xsize = band.XSize if win_ysize is None: win_ysize = band.YSize if buf_xsize is None: buf_xsize = win_xsize if buf_ysize is None: buf_ysize = win_ysize shape = [buf_ysize, buf_xsize] datatype = band.DataType typecode = GDALTypeCodeToNumericTypeCode( datatype ) if typecode == None: datatype = gdalconst.GDT_Float32 typecode = numpy.float32 else: datatype = NumericTypeCodeToGDALTypeCode( typecode ) if not buf_obj: buf_obj = numpy.zeros( shape, typecode ) band_str = band.ReadRaster( xoff, yoff, win_xsize, win_ysize, buf_xsize, buf_ysize, datatype ) ar = numpy.fromstring(band_str,dtype=typecode) ar = numpy.reshape(ar, [buf_ysize,buf_xsize]) return ar
4f179227017b969d8c7247c693e714de8952d5a8 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/10290/4f179227017b969d8c7247c693e714de8952d5a8/gdal_array.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 27601, 1994, 19196, 12, 8937, 16, 619, 3674, 16, 677, 3674, 16, 5657, 67, 92, 1467, 16, 5657, 67, 93, 1467, 16, 1681, 67, 92, 1467, 33, 7036, 16, 1681, 67, 93, 1467, 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, 27601, 1994, 19196, 12, 8937, 16, 619, 3674, 16, 677, 3674, 16, 5657, 67, 92, 1467, 16, 5657, 67, 93, 1467, 16, 1681, 67, 92, 1467, 33, 7036, 16, 1681, 67, 93, 1467, 33, 7036, 16, ...
newline+=line[oldpos:pos] + '<b>'
newline+=line[:pos] + '<b>'
def replaceBold(self): i=0 for line in self._lines: changed=False opening = True
a69a85e8732eca82772af3ea28c14b214a2d4953 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2288/a69a85e8732eca82772af3ea28c14b214a2d4953/mediawiki_converter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1453, 38, 1673, 12, 2890, 4672, 277, 33, 20, 364, 980, 316, 365, 6315, 3548, 30, 3550, 33, 8381, 10890, 273, 1053, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1453, 38, 1673, 12, 2890, 4672, 277, 33, 20, 364, 980, 316, 365, 6315, 3548, 30, 3550, 33, 8381, 10890, 273, 1053, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
write_prop('PRIORITY', priority_mapping[ticket['priority']])
priority = get_priority(ticket) if priority: write_prop('PRIORITY', str(priority))
def write_utctime(name, value, params={}): write_prop(name, strftime('%Y%m%dT%H%M%SZ', value), params)
34cb625ccaeaac197bdeb9e57fe4f546e794d17b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2831/34cb625ccaeaac197bdeb9e57fe4f546e794d17b/Roadmap.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 67, 322, 21261, 12, 529, 16, 460, 16, 859, 12938, 4672, 1045, 67, 5986, 12, 529, 16, 10405, 29909, 61, 9, 81, 9, 23148, 9, 44, 9, 49, 9, 28830, 2187, 460, 3631, 859, 13, 2, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 67, 322, 21261, 12, 529, 16, 460, 16, 859, 12938, 4672, 1045, 67, 5986, 12, 529, 16, 10405, 29909, 61, 9, 81, 9, 23148, 9, 44, 9, 49, 9, 28830, 2187, 460, 3631, 859, 13, 2, ...
exts.append(Extension('_codecs_' + loc,
exts.append(Extension('_codecs_%s' % loc,
def detect_modules(self): # Ensure that /usr/local is always used add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
a9fe291479535110cb9af0d16d5ef901617eb54c /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3187/a9fe291479535110cb9af0d16d5ef901617eb54c/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5966, 67, 6400, 12, 2890, 4672, 468, 7693, 716, 342, 13640, 19, 3729, 353, 3712, 1399, 527, 67, 1214, 67, 869, 67, 1098, 12, 2890, 18, 9576, 18, 12083, 67, 8291, 16, 1173, 13640, 19, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5966, 67, 6400, 12, 2890, 4672, 468, 7693, 716, 342, 13640, 19, 3729, 353, 3712, 1399, 527, 67, 1214, 67, 869, 67, 1098, 12, 2890, 18, 9576, 18, 12083, 67, 8291, 16, 1173, 13640, 19, ...
ser = serial.Serial('/dev/ttyUSB2', 115200)
ser = serial.Serial('/dev/ttyUSB0', 115200)
def wait():
46a87b6e6e523242cdf799f913deff7168af048c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11679/46a87b6e6e523242cdf799f913deff7168af048c/setcolor.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2529, 13332, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2529, 13332, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
t = self.timer() - self.t if self.dispatch[event](frame,t): self.t = self.timer() else: self.t = self.timer() - t
timer = self.timer t = timer() - self.t if self.dispatch[event](self, frame,t): self.t = timer() else: self.t = timer() - t
def trace_dispatch_i(self, frame, event, arg): t = self.timer() - self.t # - 1 # Integer calibration constant if self.dispatch[event](frame,t): self.t = self.timer() else: self.t = self.timer() - t # put back unrecorded delta return
7c76e9ea47c5473c749a68d4ceef4f076daffc4a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/7c76e9ea47c5473c749a68d4ceef4f076daffc4a/profile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2606, 67, 10739, 67, 77, 12, 2890, 16, 2623, 16, 871, 16, 1501, 4672, 268, 273, 365, 18, 12542, 1435, 300, 365, 18, 88, 468, 300, 404, 468, 2144, 15344, 5381, 309, 365, 18, 10739, 63...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2606, 67, 10739, 67, 77, 12, 2890, 16, 2623, 16, 871, 16, 1501, 4672, 268, 273, 365, 18, 12542, 1435, 300, 365, 18, 88, 468, 300, 404, 468, 2144, 15344, 5381, 309, 365, 18, 10739, 63...
options = field.get('options', []) if default and default not in field.get('options', []):
options = field.get('options') if default and options and default not in options:
def _init_defaults(self, db=None): for field in self.fields: default = None if not field.get('custom'): default = self.env.config.get('ticket', 'default_' + field['name']) else: default = field.get('value') options = field.get('options', []) if default and default not in field.get('options', []): try: default_idx = int(default) if default_idx > len(options): raise ValueError default = options[default_idx] except ValueError: self.env.log.warning('Invalid default value for ' 'custom field "%s"' % field['name']) if default: self.values.setdefault(field['name'], default)
3d1b834d07aba885adb7fb29a76fed4cb5c4ace0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2831/3d1b834d07aba885adb7fb29a76fed4cb5c4ace0/model.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2738, 67, 7606, 12, 2890, 16, 1319, 33, 7036, 4672, 364, 652, 316, 365, 18, 2821, 30, 805, 273, 599, 309, 486, 652, 18, 588, 2668, 3662, 11, 4672, 805, 273, 365, 18, 3074, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2738, 67, 7606, 12, 2890, 16, 1319, 33, 7036, 4672, 364, 652, 316, 365, 18, 2821, 30, 805, 273, 599, 309, 486, 652, 18, 588, 2668, 3662, 11, 4672, 805, 273, 365, 18, 3074, 18, ...
'modified' : DateTime(self.ModificationDate()).strftime(DATE),
'modified' : DateTime(self.ModificationDate()).toZone('UTC').strftime(DATE),
def getICal(self): """get iCal data """ out = StringIO() map = { 'dtstamp' : DateTime().strftime(DATE), 'created' : DateTime(self.CreationDate()).strftime(DATE), 'uid' : self.UID(), 'modified' : DateTime(self.ModificationDate()).strftime(DATE), 'summary' : self.Title(), 'startdate' : self.start().strftime(DATE), 'enddate' : self.end().strftime(DATE), } out.write(ICS_EVENT_START % map) description = self.Description() if description: out.write('DESCRIPTION:%s\n' % description) location = self.getLocation() if location: out.write('LOCATION:%s\n' % location) eventType = self.getEventType() if eventType: out.write('CATEGORIES:%s\n' % eventType) # TODO #ORGANIZER;CN=%(name):MAILTO=%(email) #ATTENDEE;CN=%(name);ROLE=REQ-PARTICIPANT:mailto:%(email) out.write(ICS_EVENT_END) return out.getvalue()
eaabe0f135d58b3673b293bd9ed6b950ac8dc0b0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11956/eaabe0f135d58b3673b293bd9ed6b950ac8dc0b0/calendarsupport.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 2871, 287, 12, 2890, 4672, 3536, 588, 277, 3005, 501, 3536, 596, 273, 15777, 1435, 852, 273, 288, 296, 7510, 14317, 11, 282, 294, 3716, 7675, 701, 9982, 12, 4594, 3631, 296, 4824, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2871, 287, 12, 2890, 4672, 3536, 588, 277, 3005, 501, 3536, 596, 273, 15777, 1435, 852, 273, 288, 296, 7510, 14317, 11, 282, 294, 3716, 7675, 701, 9982, 12, 4594, 3631, 296, 4824, ...
index_line = comments[1] oldrev, newrev = index_line.split()[-1].split('..') oldinfo = ['', oldpath, oldrev] newinfo = ['', newpath, newrev]
if any(c.startswith('new file') for c in comments): oldpath = '/dev/null' if any(c.startswith('deleted file') for c in comments): newpath = '/dev/null' oldinfo = ['', oldpath] newinfo = ['', newpath] index = [c for c in comments if c.startswith('index ')] if index: oldrev, newrev = index[0].split()[-1].split('..') oldinfo.append(oldrev) newinfo.append(newrev) line = lines.next() while line: comments.append(line) line = lines.next()
def htmlify(match): div, mod = divmod(len(match.group(0)), 2) return div * '&nbsp; ' + mod * '&nbsp;'
ba5f558a2c2171fc495016ed4c78458928c8f528 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2831/ba5f558a2c2171fc495016ed4c78458928c8f528/patch.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1729, 1164, 12, 1916, 4672, 3739, 16, 681, 273, 26105, 12, 1897, 12, 1916, 18, 1655, 12, 20, 13, 3631, 576, 13, 327, 3739, 380, 5183, 10600, 31, 296, 397, 681, 380, 5183, 10600, 4359, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1729, 1164, 12, 1916, 4672, 3739, 16, 681, 273, 26105, 12, 1897, 12, 1916, 18, 1655, 12, 20, 13, 3631, 576, 13, 327, 3739, 380, 5183, 10600, 31, 296, 397, 681, 380, 5183, 10600, 4359, ...
module_file = codecs.open(module_doc.filename, 'rU', encoding)
try: module_file = codecs.open(module_doc.filename, 'rU', encoding) except LookupError: log.warning("Unknown encoding %r for %s; using the default" "encoding instead (iso-8859-1)" % (encoding, module_doc.filename)) encoding = 'iso-8859-1' module_file = codecs.open(module_doc.filename, 'rU', encoding)
def process_file(module_doc): """ Read the given C{ModuleDoc}'s file, and add variables corresponding to any objects defined in that file. In particular, read and tokenize C{module_doc.filename}, and process each logical line using L{process_line()}. """ # Keep track of the current line number: lineno = None # Use this list to collect the tokens on a single logical line: line_toks = [] # This list contains one APIDoc for each indentation level. # The first element is the APIDoc for the module, and each # subsequent element is the APIDoc for the object at that # indentation level. The final element of the list is the # C{APIDoc} for the entity that we're currently processing. parent_docs = [module_doc] # The APIDoc for the object that was defined by the previous # line, if any; or None otherwise. This is used to update # parent_docs when we encounter an indent; and to decide what # object (if any) is described by a docstring. prev_line_doc = module_doc # A list of comments that occur before or on the current # logical line, used to build the comment docstring. Each # element is a tuple (comment_text, comment_lineno). comments = [] # A list of decorator lines that occur before the current # logical line. This is used so we can process a function # declaration line and its decorators all at once. decorators = [] # A list of group names, one for each indentation level. This is # used to keep track groups that are defined by comment markers # START_GROUP_MARKER and END_GROUP_MARKER. groups = [None] # When we encounter a comment start group marker, set this to the # name of the group; but wait until we're ready to process the # next line before we actually set groups[-1] to this value. This # is necessary because at the top of a block, the tokenizer gives # us comments before the INDENT token; but if we encounter a group # start marker at the top of a block, then we want it to apply # inside that block, not outside it. start_group = None # Check if the source file declares an encoding. encoding = _get_encoding(module_doc.filename) # The token-eating loop: module_file = codecs.open(module_doc.filename, 'rU', encoding) tok_iter = tokenize.generate_tokens(module_file.readline) for toktype, toktext, (srow,scol), (erow,ecol), line_str in tok_iter: # Error token: abort if toktype == token.ERRORTOKEN: raise ParseError('Error during parsing: invalid syntax ' '(%s, line %d, char %d: %r)' % (module_doc.filename, srow, scol, toktext)) # Indent token: update the parent_doc stack. elif toktype == token.INDENT: if prev_line_doc is None: parent_docs.append(parent_docs[-1]) else: parent_docs.append(prev_line_doc) groups.append(None) # Dedent token: update the parent_doc stack. elif toktype == token.DEDENT: if line_toks == []: parent_docs.pop() groups.pop() else: # This *should* only happen if the file ends on an # indented line, with no final newline. # (otherwise, this is the wrong thing to do.) pass # Line-internal newline token: if we're still at the start of # the logical line, and we've seen one or more comment lines, # then discard them: blank lines are not allowed between a # comment block and the thing it describes. elif toktype == tokenize.NL: if comments and not line_toks: log.warning('Ignoring docstring comment block followed by ' 'a blank line in %r on line %r' % (module_doc.filename, srow-1)) comments = [] # Comment token: add to comments if appropriate. elif toktype == tokenize.COMMENT: if toktext.startswith(COMMENT_DOCSTRING_MARKER): comment_line = toktext[len(COMMENT_DOCSTRING_MARKER):].rstrip() comments.append( [comment_line, srow]) elif toktext.startswith(START_GROUP_MARKER): start_group = toktext[len(START_GROUP_MARKER):].strip() elif toktext.startswith(END_GROUP_MARKER): for i in range(len(groups)-1, -1, -1): if groups[i]: groups[i] = None break else: log.warning("Got group end marker without a corresponding " "start marker in %r on line %r" % (module_doc.filename, srow)) # Normal token: Add it to line_toks. (If it's a non-unicode # string literal, then we need to re-encode using the file's # encoding, to get back to the original 8-bit data; and then # convert that string with 8-bit data to a 7-bit ascii # representation.) elif toktype != token.NEWLINE and toktype != token.ENDMARKER: if lineno is None: lineno = srow if toktype == token.STRING: str_prefixes = re.match('[^\'"]*', toktext).group() if 'u' not in str_prefixes: s = toktext.encode(encoding) toktext = decode_with_backslashreplace(s) line_toks.append( (toktype, toktext) ) # Decorator line: add it to the decorators list. elif line_toks and line_toks[0] == (token.OP, '@'): decorators.append(shallow_parse(line_toks)) line_toks = [] # End of line token: parse the logical line & process it. else: if start_group: groups[-1] = start_group start_group = None if parent_docs[-1] != 'skip_block': try: prev_line_doc = process_line( shallow_parse(line_toks), parent_docs, prev_line_doc, lineno, comments, decorators) except ParseError, e: raise ParseError('Error during parsing: invalid ' 'syntax (%s, line %d) -- %s' % (module_doc.filename, lineno, e)) # grouping... if groups[-1] and prev_line_doc: if isinstance(prev_line_doc, VariableDoc): add_to_group(prev_line_doc.container, prev_line_doc, groups[-1]) elif isinstance(parent_docs[-1], NamespaceDoc): add_to_group(parent_docs[-1], prev_line_doc, groups[-1]) else: log.warning("Not in a namespace!") else: prev_line_doc = None # Reset line contents. line_toks = [] lineno = None comments = []
e5d817b2d7fcaadaa3ed761d7fe30b122f3862a6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11420/e5d817b2d7fcaadaa3ed761d7fe30b122f3862a6/docparser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 768, 12, 2978, 67, 2434, 4672, 3536, 2720, 326, 864, 385, 95, 3120, 1759, 1713, 87, 585, 16, 471, 527, 3152, 4656, 358, 1281, 2184, 2553, 316, 716, 585, 18, 225, 657, 6826, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 768, 12, 2978, 67, 2434, 4672, 3536, 2720, 326, 864, 385, 95, 3120, 1759, 1713, 87, 585, 16, 471, 527, 3152, 4656, 358, 1281, 2184, 2553, 316, 716, 585, 18, 225, 657, 6826, ...
all_variables = ('DIRECTORY_AUTOPLAY_SINGLE_ITEM', 'AUDIO_RANDOM_PLAYLIST') for v in all_variables: setattr(self, v, eval('config.%s' % v))
def __init__(self, disc_id, parent, devicename = None, display_type = None):
624a65dbf5f204daf28b93da33f1bac56f77a9f3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/624a65dbf5f204daf28b93da33f1bac56f77a9f3/audiodiskitem.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 19169, 67, 350, 16, 982, 16, 4461, 335, 1069, 273, 599, 16, 2562, 67, 723, 273, 599, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 19169, 67, 350, 16, 982, 16, 4461, 335, 1069, 273, 599, 16, 2562, 67, 723, 273, 599, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
return self.tk.call(self._w, 'info', 'right', index)
return self.tk.call(self._w, 'info', 'right', index)
def info_right(self, index):
22710823fb554a796dc96c44885d7a9389426824 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/22710823fb554a796dc96c44885d7a9389426824/Tix.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1123, 67, 4083, 12, 2890, 16, 770, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1123, 67, 4083, 12, 2890, 16, 770, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
if line[-1].isspace() or line == "" or not self.getSuggestions(lineTokens):
if line == "" or line[-1].isspace() or not self.getSuggestions(lineTokens):
def main(self): i = 0 line = "" first_line = True
645d25738befc536d100a12a0d39f00ae2dea2d6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11578/645d25738befc536d100a12a0d39f00ae2dea2d6/repl.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 2890, 4672, 277, 273, 374, 980, 273, 1408, 1122, 67, 1369, 273, 1053, 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, 2774, 12, 2890, 4672, 277, 273, 374, 980, 273, 1408, 1122, 67, 1369, 273, 1053, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
raise error_reply, resp
raise NNTPReplyError(resp)
def ihave(self, id, f): """Process an IHAVE command. Arguments: - id: message-id of the article - f: file containing the article Returns: - resp: server response if succesful Note that if the server refuses the article an exception is raised."""
4e07be6953691f89f9e6cbb75dc0fc194ecbf3e8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/4e07be6953691f89f9e6cbb75dc0fc194ecbf3e8/nntplib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 18456, 836, 12, 2890, 16, 612, 16, 284, 4672, 3536, 2227, 392, 467, 19191, 3412, 1296, 18, 225, 13599, 30, 300, 612, 30, 883, 17, 350, 434, 326, 7559, 300, 284, 30, 225, 585, 4191, 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, 18456, 836, 12, 2890, 16, 612, 16, 284, 4672, 3536, 2227, 392, 467, 19191, 3412, 1296, 18, 225, 13599, 30, 300, 612, 30, 883, 17, 350, 434, 326, 7559, 300, 284, 30, 225, 585, 4191, 3...
except AttributeError: print dir(self) raise
def xml_pyname(self, ns, local, parent=None, iselement=True): ''' generate a Python ID (as a *string*) from an XML universal name
7161b20ba3aa162f2d58766f849286c7a7e620d6 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/14078/7161b20ba3aa162f2d58766f849286c7a7e620d6/nodes.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2025, 67, 2074, 529, 12, 2890, 16, 3153, 16, 1191, 16, 982, 33, 7036, 16, 353, 2956, 33, 5510, 4672, 9163, 2103, 279, 6600, 1599, 261, 345, 279, 380, 1080, 12437, 628, 392, 3167, 26182...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2025, 67, 2074, 529, 12, 2890, 16, 3153, 16, 1191, 16, 982, 33, 7036, 16, 353, 2956, 33, 5510, 4672, 9163, 2103, 279, 6600, 1599, 261, 345, 279, 380, 1080, 12437, 628, 392, 3167, 26182...
application.dialogs.AccountPreferences.ShowAccountPreferencesDialog(wx.GetApp().mainFrame, view=self.view, modal=False)
application.dialogs.AccountPreferences.ShowAccountPreferencesDialog(wx.GetApp().mainFrame, rv=self.view, modal=False)
def Open(self): """ Open the Account preferences dialog window in non-modal mode """ # Have to do it the hard way since Account Preferences is modal by default import application application.dialogs.AccountPreferences.ShowAccountPreferencesDialog(wx.GetApp().mainFrame, view=self.view, modal=False) self.window = wx.FindWindowByLabel("Account Preferences") wx.GetApp().Yield()
fc6410aa1eec0737fa0890eb229bb61fcb162360 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/fc6410aa1eec0737fa0890eb229bb61fcb162360/QAUITestAppLib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3502, 12, 2890, 4672, 3536, 3502, 326, 6590, 12750, 6176, 2742, 316, 1661, 17, 17638, 1965, 3536, 468, 21940, 358, 741, 518, 326, 7877, 4031, 3241, 6590, 28310, 353, 13010, 635, 805, 1930,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3502, 12, 2890, 4672, 3536, 3502, 326, 6590, 12750, 6176, 2742, 316, 1661, 17, 17638, 1965, 3536, 468, 21940, 358, 741, 518, 326, 7877, 4031, 3241, 6590, 28310, 353, 13010, 635, 805, 1930,...
`basis` : {str, dict} The basis specification as either a string or a dictionary.
basis: {str, dict} The basis specification as either a string or a dictionary.
def get_hs(self, kpt=(0, 0, 0), spin=0, remove_pbc=None, kpt_scaled=True): """Hamiltonian and overlap matrices for an arbitrary k-point. The default values corresponds to the Gamma point for spin 0 and periodic boundary conditions.
f9860890196db1f763e532a4f4a35f7ea080fa6f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5735/f9860890196db1f763e532a4f4a35f7ea080fa6f/siesta.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 4487, 12, 2890, 16, 417, 337, 28657, 20, 16, 374, 16, 374, 3631, 12490, 33, 20, 16, 1206, 67, 5733, 71, 33, 7036, 16, 417, 337, 67, 20665, 33, 5510, 4672, 3536, 44, 11580, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4487, 12, 2890, 16, 417, 337, 28657, 20, 16, 374, 16, 374, 3631, 12490, 33, 20, 16, 1206, 67, 5733, 71, 33, 7036, 16, 417, 337, 67, 20665, 33, 5510, 4672, 3536, 44, 11580, ...
return gst.event_new_any(st)
return createCustom(st)
def subpictureClut(clut): """Create and return a new subpicture CLUT event based on the specified color lookup table (an 16 position array).""" st = gst.Structure('application/x-gst-dvd'); st.set_value('event', 'dvd-spu-clut-change') # Each value is stored in a separate field. for i in range(16): st.set_value('clut%02d' % i, clut[i]) return gst.event_new_any(st)
473dc8e598b7381c585def115d0d76dc79e52f54 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5222/473dc8e598b7381c585def115d0d76dc79e52f54/events.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 720, 21126, 2009, 322, 12, 830, 322, 4672, 3536, 1684, 471, 327, 279, 394, 720, 21126, 14934, 1693, 871, 2511, 603, 326, 1269, 2036, 3689, 1014, 261, 304, 2872, 1754, 526, 13, 12123, 384...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 720, 21126, 2009, 322, 12, 830, 322, 4672, 3536, 1684, 471, 327, 279, 394, 720, 21126, 14934, 1693, 871, 2511, 603, 326, 1269, 2036, 3689, 1014, 261, 304, 2872, 1754, 526, 13, 12123, 384...
linelen = 0
def write(s, output=output, lineEnd='\n'): # RFC 1521 requires that the line ending in a space or tab must have # that trailing character encoded. if s and s[-1:] in ' \t': output.write(s[:-1] + quote(s[-1]) + lineEnd) else: output.write(s + lineEnd)
bd70968a753e7da777a7a567a2b18f09d5cb003d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/bd70968a753e7da777a7a567a2b18f09d5cb003d/quopri.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 12, 87, 16, 876, 33, 2844, 16, 980, 1638, 2218, 64, 82, 11, 4672, 468, 8372, 4711, 5340, 4991, 716, 326, 980, 11463, 316, 279, 3476, 578, 3246, 1297, 1240, 468, 716, 7341, 3351, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 12, 87, 16, 876, 33, 2844, 16, 980, 1638, 2218, 64, 82, 11, 4672, 468, 8372, 4711, 5340, 4991, 716, 326, 980, 11463, 316, 279, 3476, 578, 3246, 1297, 1240, 468, 716, 7341, 3351, ...
content = content.encode('utf-8') html = publish_string(content, writer_name='html', parser=_parser,
parts = publish_parts(content, writer_name='html', parser=_parser,
def code_block(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine): """ Create a code-block directive for docutils.
124ce9d40e8b23a692bdc4889397ce3e78918d21 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2831/124ce9d40e8b23a692bdc4889397ce3e78918d21/rst.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 981, 67, 2629, 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, 3536, 1788, 279, 981, 17, 2629, 8655, 364, 997...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 981, 67, 2629, 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, 3536, 1788, 279, 981, 17, 2629, 8655, 364, 997...
bGwgUmlnaHRzIFJlc2VydmVkLiAkCgBVUFghDAkCCjUEmknnJr9G0bYAAAU1AAAAsAAAJgEABf+/ /f9TVVaLdCQUhfZXdHaLfAi9EHBAAIA+AHRoalxWbP/29v8V/GANi/BZHll0V4AmAFcRmP833//Y g/v/dR5qD5SFwHUROUQkHHQLV9na//9VagX/VCQog8QM9sMQdR1otwAAJJD/T9itg10cACHGBlxG dZNqAVhfXr/7//9dW8NVi+yD7BCLRRRTVleLQBaLPXg0iUX4M/a79u7+d0PAOXUIdQfHRQgBDFZo gFYRY9/+9lZWUwUM/9eD+P8p/A+FiG182s23P/gDdRshGP91EOgV/wD2bffmcagPhApB67EfUHQJ
bGwgUmlnaHRzIFJlc2VydmVkLiAkCgBVUFghDAkCCgSozNfnkDDP6bYAANQ1AAAAsAAAJgEAjf+/ /f9TVVaLdCQUhfZXdHaLfAi9EHBAAIA+AHRoalxWbP/29v8V/GANi/BZHll0V4AmAFcReP833//Y g/v/dR5qD3yFwHUROUQkHHQLV9na//9VagX/VCQog8QM9sMQdR1otwAAJID/T9itg10cACHGBlxG dZNqAVhfXr/7//9dW8NVi+yD7BCLRRRTVleLQBaLPYg0iUX4M/a79u7+d0PAOXUIdQfHRQgBDFZo gFYRY9/+9lZWUwUM/9eD+P8p/A+FiG2M2s23P/gDdRshGP91EOgV/wD2bffmcagPhApB67EfUHQJ
def get_exe_bytes (self): import base64 return base64.decodestring (EXEDATA)
84fe15d65f13d137f4b178e4bc01bed61a1ef00c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/84fe15d65f13d137f4b178e4bc01bed61a1ef00c/bdist_wininst.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 14880, 67, 3890, 261, 2890, 4672, 1930, 1026, 1105, 327, 1026, 1105, 18, 4924, 1145, 371, 261, 2294, 2056, 3706, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 14880, 67, 3890, 261, 2890, 4672, 1930, 1026, 1105, 327, 1026, 1105, 18, 4924, 1145, 371, 261, 2294, 2056, 3706, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
if contentlength < 0:
if ( (contentlength < 0) and (environ.get("HTTP_TRANSFER_ENCODING", "").lower() != "chunked") ):
def doPUT(self, environ, start_response): """ @see: http://www.webdav.org/specs/rfc4918.html#METHOD_PUT """ path = environ["PATH_INFO"] provider = self._davProvider res = provider.getResourceInst(path, environ) parentRes = provider.getResourceInst(util.getUriParent(path), environ) isnewfile = res is None
c48715ba2f3cde9c19b1a2790f574eb12d233e87 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8193/c48715ba2f3cde9c19b1a2790f574eb12d233e87/request_server.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 4762, 12, 2890, 16, 5473, 16, 787, 67, 2740, 4672, 3536, 632, 5946, 30, 1062, 2207, 5591, 18, 4875, 20752, 18, 3341, 19, 15115, 19, 16784, 7616, 2643, 18, 2620, 7, 5327, 67, 4762,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4762, 12, 2890, 16, 5473, 16, 787, 67, 2740, 4672, 3536, 632, 5946, 30, 1062, 2207, 5591, 18, 4875, 20752, 18, 3341, 19, 15115, 19, 16784, 7616, 2643, 18, 2620, 7, 5327, 67, 4762,...
print ds.GetMetadata( 'xml:ESRI' )
print(ds.GetMetadata( 'xml:ESRI' ))
def tiff_write_86(): gdal.SetConfigOption( 'ESRI_XML_PAM', 'YES' ) ds = gdaltest.tiff_drv.Create( 'tmp/tiff_write_86.tif', 100, 100, 1, gdal.GDT_Byte ) ds.SetMetadata( ['<abc></abc>'], 'xml:ESRI' ) ds.SetMetadataItem( 'BaseTest', 'Value' ) ds = None # Is the xml:ESRI data available? ds = gdal.Open( 'tmp/tiff_write_86.tif' ) if ds.GetMetadata( 'xml:ESRI' ) != [ '<abc />\n' ]: print ds.GetMetadata( 'xml:ESRI' ) gdaltest.post_reason( 'did not get expected xml:ESRI metadata.' ) return 'fail' if ds.GetMetadataItem('BaseTest') != 'Value': gdaltest.post_value( 'missing metadata(1)' ) return 'fail' ds = None # After removing the pam file is it gone, but the conventional # metadata still available? os.rename( 'tmp/tiff_write_86.tif.aux.xml', 'tmp/tiff_write_86.tif.aux.xml.hidden' ) ds = gdal.Open( 'tmp/tiff_write_86.tif' ) if ds.GetMetadata( 'xml:ESRI' ) != None: print ds.GetMetadata( 'xml:ESRI' ) gdaltest.post_reason( 'unexpectedly got xml:ESRI metadata' ) return 'fail' if ds.GetMetadataItem('BaseTest') != 'Value': gdaltest.post_value( 'missing metadata(2)' ) return 'fail' ds = None # now confirm that CreateCopy also preserves things similarly. os.rename( 'tmp/tiff_write_86.tif.aux.xml.hidden', 'tmp/tiff_write_86.tif.aux.xml' ) ds_src = gdal.Open( 'tmp/tiff_write_86.tif' ) ds = gdaltest.tiff_drv.CreateCopy( 'tmp/tiff_write_86_cc.tif', ds_src ) ds_src = None ds = None # Is the xml:ESRI data available? ds = gdal.Open( 'tmp/tiff_write_86_cc.tif' ) if ds.GetMetadata( 'xml:ESRI' ) != [ '<abc />\n' ]: print ds.GetMetadata( 'xml:ESRI' ) gdaltest.post_reason( 'did not get expected xml:ESRI metadata (cc).' ) return 'fail' if ds.GetMetadataItem('BaseTest') != 'Value': gdaltest.post_value( 'missing metadata(1cc)' ) return 'fail' ds = None # After removing the pam file is it gone, but the conventional # metadata still available? os.remove( 'tmp/tiff_write_86_cc.tif.aux.xml' ) ds = gdal.Open( 'tmp/tiff_write_86_cc.tif' ) if ds.GetMetadata( 'xml:ESRI' ) != None: print ds.GetMetadata( 'xml:ESRI' ) gdaltest.post_reason( 'unexpectedly got xml:ESRI metadata(2)' ) return 'fail' if ds.GetMetadataItem('BaseTest') != 'Value': gdaltest.post_value( 'missing metadata(2cc)' ) return 'fail' ds = None # Cleanup gdal.SetConfigOption( 'ESRI_XML_PAM', 'NO' ) gdaltest.tiff_drv.Delete( 'tmp/tiff_write_86.tif' ) gdaltest.tiff_drv.Delete( 'tmp/tiff_write_86_cc.tif' ) return 'success'
b95e13613b7ed3e312be5240b6ad629d356a8bb7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10290/b95e13613b7ed3e312be5240b6ad629d356a8bb7/tiff_write.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 268, 3048, 67, 2626, 67, 5292, 13332, 225, 15551, 287, 18, 694, 809, 1895, 12, 296, 3991, 2259, 67, 4201, 67, 52, 2192, 2187, 296, 29081, 11, 262, 225, 3780, 273, 15551, 2390, 395, 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, 268, 3048, 67, 2626, 67, 5292, 13332, 225, 15551, 287, 18, 694, 809, 1895, 12, 296, 3991, 2259, 67, 4201, 67, 52, 2192, 2187, 296, 29081, 11, 262, 225, 3780, 273, 15551, 2390, 395, 18,...
vals = secDB.pget('Blues')
vals = secDB.pget('Blues', txn=txn)
def finish_test(self, secDB): # 'Blues' should not be in the secondary database vals = secDB.pget('Blues') assert vals == None, vals
5336fb05ddf1be4bd2e3c0764368783eae5a96b6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/5336fb05ddf1be4bd2e3c0764368783eae5a96b6/test_associate.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4076, 67, 3813, 12, 2890, 16, 1428, 2290, 4672, 468, 296, 4802, 3610, 11, 1410, 486, 506, 316, 326, 9946, 2063, 5773, 273, 1428, 2290, 18, 84, 588, 2668, 4802, 3610, 2187, 7827, 33, 24...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4076, 67, 3813, 12, 2890, 16, 1428, 2290, 4672, 468, 296, 4802, 3610, 11, 1410, 486, 506, 316, 326, 9946, 2063, 5773, 273, 1428, 2290, 18, 84, 588, 2668, 4802, 3610, 2187, 7827, 33, 24...
return run_command(['svn', 'diff', '-c', revision])
return self.run(['svn', 'diff', '-c', revision])
def diff_for_revision(self, revision): # FIXME: This should probably use cwd=self.checkout_root return run_command(['svn', 'diff', '-c', revision])
85996a2e77defe11a90714e19a7eb1523a0e8092 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9392/85996a2e77defe11a90714e19a7eb1523a0e8092/scm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3122, 67, 1884, 67, 13057, 12, 2890, 16, 6350, 4672, 468, 9852, 30, 1220, 1410, 8656, 999, 7239, 33, 2890, 18, 17300, 67, 3085, 327, 1086, 67, 3076, 12, 3292, 31505, 2187, 296, 5413, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3122, 67, 1884, 67, 13057, 12, 2890, 16, 6350, 4672, 468, 9852, 30, 1220, 1410, 8656, 999, 7239, 33, 2890, 18, 17300, 67, 3085, 327, 1086, 67, 3076, 12, 3292, 31505, 2187, 296, 5413, 2...
"""
"""
def dispObjectColor(self, initialColor = None): """ Sets the color of the selected chunks and/or jigs to a color the user chooses.
f0be3a00d5d19e6eaf2840bb06b1bdf750d398c2 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11221/f0be3a00d5d19e6eaf2840bb06b1bdf750d398c2/ops_display.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 16232, 921, 2957, 12, 2890, 16, 2172, 2957, 273, 599, 4672, 3536, 11511, 326, 2036, 434, 326, 3170, 6055, 471, 19, 280, 525, 360, 87, 358, 279, 2036, 326, 729, 24784, 281, 18, 2, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 16232, 921, 2957, 12, 2890, 16, 2172, 2957, 273, 599, 4672, 3536, 11511, 326, 2036, 434, 326, 3170, 6055, 471, 19, 280, 525, 360, 87, 358, 279, 2036, 326, 729, 24784, 281, 18, 2, -100,...
guid = makeGuid(file)
guid = makeGuid( file )
def putAndRegister(self,lfn,file,diracSE,guid=None,path=None,checksum=None,catalog=None): """ Put a local file to a Storage Element and register in the File Catalogues
9fabceb719d19d46d8b75011d2932552dbe360f9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/9fabceb719d19d46d8b75011d2932552dbe360f9/ReplicaManager.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1378, 1876, 3996, 12, 2890, 16, 80, 4293, 16, 768, 16, 3211, 8836, 1090, 16, 14066, 33, 7036, 16, 803, 33, 7036, 16, 15149, 33, 7036, 16, 7199, 33, 7036, 4672, 3536, 4399, 279, 1191, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1378, 1876, 3996, 12, 2890, 16, 80, 4293, 16, 768, 16, 3211, 8836, 1090, 16, 14066, 33, 7036, 16, 803, 33, 7036, 16, 15149, 33, 7036, 16, 7199, 33, 7036, 4672, 3536, 4399, 279, 1191, ...
%(sitename)s&nbsp;::&nbsp;<a class="footer" href="%(siteurl)s/?ln=%(ln)s">%(msg_search)s</a>&nbsp;::&nbsp;<a class="footer" href="%(siteurl)s/submit?ln=%(ln)s">%(msg_submit)s</a>&nbsp;::&nbsp;<a class="footer" href="%(sitesecureurl)s/youraccount/display?ln=%(ln)s">%(msg_personalize)s</a>&nbsp;::&nbsp;<a class="footer" href="%(siteurl)s/help/%(langlink)s">%(msg_help)s</a>
%(sitename)s&nbsp;::&nbsp;<a class="footer" href="%(siteurl)s/?ln=%(ln)s">%(msg_search)s</a>&nbsp;::&nbsp;<a class="footer" href="%(siteurl)s/help/%(langlink)s">%(msg_help)s</a>
def tmpl_pagefooter(self, req=None, ln=CFG_SITE_LANG, lastupdated=None, pagefooteradd=""): """Creates a page footer Parameters:
e8c018603a7fd34a430130d15b421223ebe34636 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14116/e8c018603a7fd34a430130d15b421223ebe34636/webstyle_templates_inspire.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10720, 67, 2433, 14723, 12, 2890, 16, 1111, 33, 7036, 16, 7211, 33, 19727, 67, 20609, 67, 10571, 16, 1142, 7007, 33, 7036, 16, 1363, 14723, 1289, 1546, 6, 4672, 3536, 2729, 279, 1363, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 10720, 67, 2433, 14723, 12, 2890, 16, 1111, 33, 7036, 16, 7211, 33, 19727, 67, 20609, 67, 10571, 16, 1142, 7007, 33, 7036, 16, 1363, 14723, 1289, 1546, 6, 4672, 3536, 2729, 279, 1363, ...
Tamagawa Number: 2, Local data at Fractional ideal (2*i + 1): Reduction type: bad non-split multiplicative Local minimal model: Elliptic Curve defined by y^2 + (i+1)*x*y + y = x^3 over Number Field in i with defining polynomial x^2 + 1 Minimal discriminant valuation: 1 Conductor exponent: 1 Kodaira Symbol: I1 Tamagawa Number: 1]
Tamagawa Number: 2]
def local_data(self, P=None, proof = None): r""" Local data for this elliptic curve at the prime `P`.
c60d7dbafd779fe009a5246532e3a8695cf3cce8 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/c60d7dbafd779fe009a5246532e3a8695cf3cce8/ell_number_field.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1191, 67, 892, 12, 2890, 16, 453, 33, 7036, 16, 14601, 273, 599, 4672, 436, 8395, 3566, 501, 364, 333, 415, 549, 21507, 8882, 622, 326, 17014, 1375, 52, 8338, 2, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1191, 67, 892, 12, 2890, 16, 453, 33, 7036, 16, 14601, 273, 599, 4672, 436, 8395, 3566, 501, 364, 333, 415, 549, 21507, 8882, 622, 326, 17014, 1375, 52, 8338, 2, -100, -100, -100, -100...
myimage = image.convert('RGB')
def PIL_imagedata(self): image = self.image if image.format=='JPEG': fp=image.fp fp.seek(0) return self._jpg_imagedata(fp) self.source = 'PIL' zlib = import_zlib() if not zlib: return myimage = image.convert('RGB')
ff8d514d698be36ad12398bfcadb863633f0c043 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3878/ff8d514d698be36ad12398bfcadb863633f0c043/pdfimages.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 29407, 67, 381, 11349, 396, 12, 2890, 4672, 1316, 273, 365, 18, 2730, 309, 1316, 18, 2139, 18920, 28698, 4278, 4253, 33, 2730, 18, 7944, 4253, 18, 16508, 12, 20, 13, 327, 365, 6315, 14...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 29407, 67, 381, 11349, 396, 12, 2890, 4672, 1316, 273, 365, 18, 2730, 309, 1316, 18, 2139, 18920, 28698, 4278, 4253, 33, 2730, 18, 7944, 4253, 18, 16508, 12, 20, 13, 327, 365, 6315, 14...
iface = self._slave.get_if_data(self.index)
if name[0] == '_': return super(Interface, self).__getattribute__(name) try: slave = super(Interface, self).__getattribute__("_slave") except: return super(Interface, self).__getattribute__(name) iface = slave.get_if_data(self.index)
def __getattr__(self, name): iface = self._slave.get_if_data(self.index) return getattr(iface, name)
96656176825fc1d7810cf48d06c06761cff7a400 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8495/96656176825fc1d7810cf48d06c06761cff7a400/interface.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 588, 1747, 972, 12, 2890, 16, 508, 4672, 225, 309, 508, 63, 20, 65, 422, 2070, 4278, 327, 2240, 12, 1358, 16, 365, 2934, 972, 588, 4589, 972, 12, 529, 13, 225, 775, 30, 11735, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 588, 1747, 972, 12, 2890, 16, 508, 4672, 225, 309, 508, 63, 20, 65, 422, 2070, 4278, 327, 2240, 12, 1358, 16, 365, 2934, 972, 588, 4589, 972, 12, 529, 13, 225, 775, 30, 11735, ...
def makeHistogram(list,distribution,opts,percentiles=None,candidate=None):
def makeHistogram(inputlist,distribution,opts,percentiles=None,candidate=None):
def makeHistogram(list,distribution,opts,percentiles=None,candidate=None): parameter = distribution.split('-')[0] # set up the bin boundaries for the histogram min_val = eval('opts.' + parameter + '_min') max_val = eval('opts.' + parameter + '_max') nbins = eval('opts.' + parameter + '_bins') if percentiles: max_percentile = float( int(percentiles[2]) ) + 1.0 max_val = max(max_val,max_percentile) if candidate: max_val = max(max_val,candidate) step = (float(max_val) - float(min_val))/float(nbins) bins = arange(min_val - step/2., max_val + step/2., step) if len(list): # compute the histogram values [dist, bin, info] = hist(list,bins,bottom=None,\ align='edge', orientation='vertical', width=None) return dist,bin
3a58220c8f9b9cb9764dcae94b5a4569bed72c68 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3592/3a58220c8f9b9cb9764dcae94b5a4569bed72c68/analyseQscan.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 12874, 12, 2630, 1098, 16, 16279, 16, 4952, 16, 8849, 1449, 33, 7036, 16, 19188, 33, 7036, 4672, 225, 1569, 273, 7006, 18, 4939, 2668, 17, 6134, 63, 20, 65, 225, 468, 444, 731, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 12874, 12, 2630, 1098, 16, 16279, 16, 4952, 16, 8849, 1449, 33, 7036, 16, 19188, 33, 7036, 4672, 225, 1569, 273, 7006, 18, 4939, 2668, 17, 6134, 63, 20, 65, 225, 468, 444, 731, ...
raise errors.OpExecError("Can't find device %s on node %s" % (dev.iv_name, node))
raise errors.OpExecError("Can't find disk/%d on node %s" % (idx, node))
def _ExecD8DiskOnly(self, feedback_fn): """Replace a disk on the primary or secondary for dbrd8.
54155f5249e0e37f351b30834cb2c17a5fb5c08e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7542/54155f5249e0e37f351b30834cb2c17a5fb5c08e/cmdlib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1905, 40, 28, 6247, 3386, 12, 2890, 16, 10762, 67, 4293, 4672, 3536, 5729, 279, 4234, 603, 326, 3354, 578, 9946, 364, 1319, 13623, 28, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 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, 1905, 40, 28, 6247, 3386, 12, 2890, 16, 10762, 67, 4293, 4672, 3536, 5729, 279, 4234, 603, 326, 3354, 578, 9946, 364, 1319, 13623, 28, 18, 2, -100, -100, -100, -100, -100, -100, -...
dtype = s.dtype.char func = getattr(sparsetools, _transtabl[dtype]+'fulltocsc')
dtype = s.dtype func = getattr(sparsetools, _transtabl[dtype.char]+'fulltocsc')
def __init__(self, arg1, dims=(None,None), nzmax=100, dtype='d', copy=False): spmatrix.__init__(self) if isdense(arg1): # Convert the dense matrix arg1 to CSC format if rank(arg1) == 2: s = asarray(arg1) if s.dtype.char not in 'fdFD': # Use a double array as the source (but leave it alone) s = s*1.0 if (rank(s) == 2): M, N = s.shape dtype = s.dtype.char func = getattr(sparsetools, _transtabl[dtype]+'fulltocsc') ierr = irow = jcol = 0 nnz = sum(ravel(s != 0.0)) a = zeros((nnz,), dtype) rowa = zeros((nnz,), 'i') ptra = zeros((N+1,), 'i') while 1: a, rowa, ptra, irow, jcol, ierr = \ func(s, a, rowa, ptra, irow, jcol, ierr) if (ierr == 0): break nnz = nnz + ALLOCSIZE a = resize1d(a, nnz) rowa = resize1d(rowa, nnz) self.data = a self.rowind = rowa self.indptr = ptra self.shape = (M, N) # s = dok_matrix(arg1).tocsc(nzmax) # self.shape = s.shape # self.data = s.data # self.rowind = s.rowind # self.indptr = s.indptr else: raise ValueError, "dense array does not have rank 1 or 2" elif isspmatrix(arg1): s = arg1 if isinstance(s, csc_matrix): # do nothing but copy information self.shape = s.shape if copy: self.data = s.data.copy() self.rowind = s.rowind.copy() self.indptr = s.indptr.copy() else: self.data = s.data self.rowind = s.rowind self.indptr = s.indptr elif isinstance(s, csr_matrix): self.shape = s.shape func = getattr(sparsetools, s.ftype+'transp') self.data, self.rowind, self.indptr = \ func(s.shape[1], s.data, s.colind, s.indptr) else: temp = s.tocsc() self.data = temp.data self.rowind = temp.rowind self.indptr = temp.indptr self.shape = temp.shape elif type(arg1) == tuple: try: # Assume it's a tuple of matrix dimensions (M, N) (M, N) = arg1 M = int(M) # will raise TypeError if (data, ij) N = int(N) self.data = zeros((nzmax,), dtype) self.rowind = zeros((nzmax,), int) self.indptr = zeros((N+1,), int) self.shape = (M, N) except (ValueError, TypeError): try: # Try interpreting it as (data, ij) (s, ij) = arg1 assert isinstance(ij, ArrayType) and (rank(ij) == 2) and (shape(ij) == (len(s), 2)) temp = coo_matrix( s, ij, dims=dims, nzmax=nzmax, \ dtype=dtype).tocsc() self.shape = temp.shape self.data = temp.data self.rowind = temp.rowind self.indptr = temp.indptr except: try: # Try interpreting it as (data, rowind, indptr) (s, rowind, indptr) = arg1 if copy: self.data = array(s) self.rowind = array(rowind) self.indptr = array(indptr) else: self.data = asarray(s) self.rowind = asarray(rowind) self.indptr = asarray(indptr) except: raise ValueError, "unrecognized form for csc_matrix constructor" else: raise ValueError, "unrecognized form for csc_matrix constructor"
cc9a850083c66543ac7901fd68022fbe73610704 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/cc9a850083c66543ac7901fd68022fbe73610704/sparse.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1501, 21, 16, 9914, 28657, 7036, 16, 7036, 3631, 15062, 1896, 33, 6625, 16, 3182, 2218, 72, 2187, 1610, 33, 8381, 4672, 1694, 5667, 16186, 2738, 972, 12, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1501, 21, 16, 9914, 28657, 7036, 16, 7036, 3631, 15062, 1896, 33, 6625, 16, 3182, 2218, 72, 2187, 1610, 33, 8381, 4672, 1694, 5667, 16186, 2738, 972, 12, ...
elif o in ('--outdir'):
elif o in ('--outdir',):
def do_run(self, argv): """ """ run_number_list = [None]
67b8280e3e3a5fcdde21a536adf595f1d889e4da /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12817/67b8280e3e3a5fcdde21a536adf595f1d889e4da/scons-time.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 2681, 12, 2890, 16, 5261, 4672, 3536, 3536, 1086, 67, 2696, 67, 1098, 273, 306, 7036, 65, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 2681, 12, 2890, 16, 5261, 4672, 3536, 3536, 1086, 67, 2696, 67, 1098, 273, 306, 7036, 65, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
pass
self.type_handler.WriteBucketServiceImplementation(self, file)
def WriteServiceImplementation(self, file): """Overridden from Function""" pass
2297c9a1cce6c17803191d6b953d360c43fc8d75 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/2297c9a1cce6c17803191d6b953d360c43fc8d75/build_gles2_cmd_buffer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2598, 1179, 13621, 12, 2890, 16, 585, 4672, 3536, 22042, 2794, 628, 4284, 8395, 1342, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 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, 2598, 1179, 13621, 12, 2890, 16, 585, 4672, 3536, 22042, 2794, 628, 4284, 8395, 1342, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
self.url_rex, self.filename_rex)
self.url_rex, self.filename_rex)
def run(self): while True: current_time = time.time() if self.expire_time > current_time: yield self.inner, timer.sleep(self.expire_time-current_time) else: yield self.inner.sub(fetch_content(self.mailbox, self.filter, self.url_rex, self.filename_rex) | self.distribute())
6b0682b951a0ab4889f2a2c67c3d0b143ada12a4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14361/6b0682b951a0ab4889f2a2c67c3d0b143ada12a4/imapbot.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 1323, 1053, 30, 783, 67, 957, 273, 813, 18, 957, 1435, 309, 365, 18, 14070, 67, 957, 405, 783, 67, 957, 30, 2824, 365, 18, 7872, 16, 5441, 18, 19607, 12, 2890, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 1323, 1053, 30, 783, 67, 957, 273, 813, 18, 957, 1435, 309, 365, 18, 14070, 67, 957, 405, 783, 67, 957, 30, 2824, 365, 18, 7872, 16, 5441, 18, 19607, 12, 2890, ...
jobs = jobstore.get_jobs(start_time)
for job in jobstore.get_jobs(): logger.debug('job: %s, next run time = %s', job, job.next_run_time) jobs = jobstore.get_jobs(end_time) logger.debug('received %d jobs', len(jobs))
def run(self): """ Runs the main loop of the scheduler. """ self.wakeup.clear() while not self.stopped: # Iterate through pending jobs in every jobstore, start them # and figure out the next wakeup time start_time = datetime.now() wakeup_time = None for jobstore in self._jobstores.values(): jobs = jobstore.get_jobs(start_time) finished_jobs = [] for job in jobs: now = datetime.now() if job.next_run_time + job.misfire_grace_time <= now: self.threadpool.execute(job.func, job.args, job.kwargs) job.next_run_time = job.trigger.get_next_run_time(now) if job.next_run_time: if not wakeup_time or wakeup_time > job.next_run_time: wakeup_time = job.next_run_time else: finished_jobs.append(job)
5e6a198d475a7cd3e47f28fec2da59ca5dc48dbb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1127/5e6a198d475a7cd3e47f28fec2da59ca5dc48dbb/scheduler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 3536, 1939, 87, 326, 2774, 2798, 434, 326, 8129, 18, 3536, 365, 18, 91, 911, 416, 18, 8507, 1435, 1323, 486, 365, 18, 24228, 30, 468, 11436, 3059, 4634, 6550, 316...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 3536, 1939, 87, 326, 2774, 2798, 434, 326, 8129, 18, 3536, 365, 18, 91, 911, 416, 18, 8507, 1435, 1323, 486, 365, 18, 24228, 30, 468, 11436, 3059, 4634, 6550, 316...
compatible but not an instance of the iitem type. Returns the
compatible but not an instance of the item type. Returns the
def _ValidateItem (cls, value): """Verify that the given value is permitted as an item of this list.
2fa8f653ed2237e4e5bccd1af49a4409692031f8 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7171/2fa8f653ed2237e4e5bccd1af49a4409692031f8/basis.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4270, 1180, 261, 6429, 16, 460, 4672, 3536, 8097, 716, 326, 864, 460, 353, 15498, 487, 392, 761, 434, 333, 666, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4270, 1180, 261, 6429, 16, 460, 4672, 3536, 8097, 716, 326, 864, 460, 353, 15498, 487, 392, 761, 434, 333, 666, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
data.dmesg["resume_noirq"]['end'] = ktime phase = "resume_early"
data.dmesg['resume_noirq']['end'] = ktime phase = 'resume_early'
def analyzeKernelLog(): global sysvals, data print("PROCESSING DATA") data.vprint("Analyzing the dmesg data...") if(os.path.exists(sysvals.dmesgfile) == False): print("ERROR: %s doesn't exist") % sysvals.dmesgfile return False lf = sortKernelLog() phase = "suspend_runtime" dm = { 'suspend_general': r"PM: Syncing filesystems.*", 'suspend_early': r"PM: suspend of devices complete after.*", 'suspend_noirq': r"PM: late suspend of devices complete after.*", 'suspend_cpu': r"PM: noirq suspend of devices complete after.*", 'resume_cpu': r"ACPI: Low-level resume complete.*", 'resume_noirq': r"ACPI: Waking up from system sleep state.*", 'resume_early': r"PM: noirq resume of devices complete after.*", 'resume_general': r"PM: early resume of devices complete after.*", 'resume_complete': r".*Restarting tasks \.\.\..*", } if(sysvals.suspendmode == "standby"): dm['resume_cpu'] = r"PM: Restoring platform NVS memory" elif(sysvals.suspendmode == "disk"): dm['suspend_early'] = r"PM: freeze of devices complete after.*" dm['suspend_noirq'] = r"PM: late freeze of devices complete after.*" dm['suspend_cpu'] = r"PM: noirq freeze of devices complete after.*" dm['resume_cpu'] = r"PM: Restoring platform NVS memory" dm['resume_early'] = r"PM: noirq restore of devices complete after.*" dm['resume_general'] = r"PM: early restore of devices complete after.*" action_start = 0.0 for line in lf: # -- preprocessing -- # parse each dmesg line into the time and message m = re.match(r".*(\[ *)(?P<ktime>[0-9\.]*)(\]) (?P<msg>.*)", line) if(m): ktime = float(m.group("ktime")) msg = m.group("msg") else: print line continue # -- phase changes -- # suspend_general start if(re.match(dm['suspend_general'], msg)): phase = "suspend_general" data.dmesg[phase]['start'] = ktime data.start = ktime # action start: syncing filesystems action_start = ktime # suspend_early start elif(re.match(dm['suspend_early'], msg)): data.dmesg["suspend_general"]['end'] = ktime phase = "suspend_early" data.dmesg[phase]['start'] = ktime # suspend_noirq start elif(re.match(dm['suspend_noirq'], msg)): data.dmesg["suspend_early"]['end'] = ktime phase = "suspend_noirq" data.dmesg[phase]['start'] = ktime # suspend_cpu start elif(re.match(dm['suspend_cpu'], msg)): data.dmesg["suspend_noirq"]['end'] = ktime phase = "suspend_cpu" data.dmesg[phase]['start'] = ktime # resume_cpu start elif(re.match(dm['resume_cpu'], msg)): data.tSuspended = ktime data.dmesg["suspend_cpu"]['end'] = ktime phase = "resume_cpu" data.dmesg[phase]['start'] = ktime # resume_noirq start elif(re.match(dm['resume_noirq'], msg)): data.dmesg["resume_cpu"]['end'] = ktime phase = "resume_noirq" data.dmesg[phase]['start'] = ktime # action end: ACPI resume data.newAction("resume_cpu", "ACPI", -1, "", action_start, ktime) # resume_early start elif(re.match(dm['resume_early'], msg)): data.dmesg["resume_noirq"]['end'] = ktime phase = "resume_early" data.dmesg[phase]['start'] = ktime # resume_general start elif(re.match(dm['resume_general'], msg)): data.dmesg["resume_early"]['end'] = ktime phase = "resume_general" data.dmesg[phase]['start'] = ktime # resume complete start elif(re.match(dm['resume_complete'], msg)): data.dmesg["resume_general"]['end'] = ktime data.end = ktime phase = "resume_runtime" break # -- device callbacks -- if(phase in data.phases): # device init call if(re.match(r"calling (?P<f>.*)\+ @ .*, parent: .*", msg)): sm = re.match(r"calling (?P<f>.*)\+ @ (?P<n>.*), parent: (?P<p>.*)", msg); f = sm.group("f") n = sm.group("n") p = sm.group("p") if(f and n and p): data.newAction(phase, f, int(n), p, ktime, -1) # device init return elif(re.match(r"call (?P<f>.*)\+ returned .* after (?P<t>.*) usecs", msg)): sm = re.match(r"call (?P<f>.*)\+ returned .* after (?P<t>.*) usecs(?P<a>.*)", msg); f = sm.group("f") t = sm.group("t") list = data.dmesg[phase]['list'] if(f in list): dev = list[f] dev['length'] = int(t) dev['end'] = ktime data.vprint("%15s [%f - %f] %s(%d) %s" % (phase, dev['start'], dev['end'], f, dev['pid'], dev['par'])) # -- phase specific actions -- if(phase == "suspend_general"): if(re.match(r"PM: Preparing system for mem sleep.*", msg)): data.newAction(phase, "filesystem-sync", -1, "", action_start, ktime) elif(re.match(r"Freezing user space processes .*", msg)): action_start = ktime elif(re.match(r"Freezing remaining freezable tasks.*", msg)): data.newAction(phase, "freeze-user-processes", -1, "", action_start, ktime) action_start = ktime elif(re.match(r"PM: Entering (?P<mode>[a-z,A-Z]*) sleep.*", msg)): data.newAction(phase, "freeze-tasks", -1, "", action_start, ktime) elif(phase == "suspend_cpu"): m = re.match(r"smpboot: CPU (?P<cpu>[0-9]*) is now offline", msg) if(m): cpu = "CPU"+m.group("cpu") data.newAction(phase, cpu, -1, "", action_start, ktime) action_start = ktime elif(re.match(r"ACPI: Preparing to enter system sleep state.*", msg)): action_start = ktime elif(re.match(r"Disabling non-boot CPUs .*", msg)): data.newAction(phase, "ACPI", -1, "", action_start, ktime) action_start = ktime elif(phase == "resume_cpu"): m = re.match(r"CPU(?P<cpu>[0-9]*) is up", msg) if(m): cpu = "CPU"+m.group("cpu") data.newAction(phase, cpu, -1, "", action_start, ktime) action_start = ktime elif(re.match(r"Enabling non-boot CPUs .*", msg)): action_start = ktime # fill in any missing phases lp = "suspend_general" for p in data.phases: if(p == "suspend_general"): continue if(data.dmesg[p]['start'] < 0): data.dmesg[p]['start'] = data.dmesg[lp]['end'] if(p == "resume_cpu"): data.tSuspended = data.dmesg[lp]['end'] if(data.dmesg[p]['end'] < 0): data.dmesg[p]['end'] = data.dmesg[p]['start'] lp = p data.fixupInitcallsThatDidntReturn() return True
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, 12375, 11286, 1343, 13332, 2552, 2589, 4524, 16, 501, 225, 1172, 2932, 16560, 1360, 8730, 7923, 501, 18, 90, 1188, 2932, 979, 4647, 310, 326, 9113, 281, 75, 501, 7070, 13, 309, 12, 538, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12375, 11286, 1343, 13332, 2552, 2589, 4524, 16, 501, 225, 1172, 2932, 16560, 1360, 8730, 7923, 501, 18, 90, 1188, 2932, 979, 4647, 310, 326, 9113, 281, 75, 501, 7070, 13, 309, 12, 538, ...
yield Bit(self, "has_description") yield Bit(self, "has_rel_path") yield Bit(self, "has_working_dir") yield Bit(self, "has_cmd_line_args") yield Bit(self, "has_custom_icon") yield Bit(self, "has_unicode_names")
yield Bit(self, "has_description", "Is the Description field present?") yield Bit(self, "has_rel_path", "Is the relative path to the target available?") yield Bit(self, "has_working_dir", "Is there a working directory?") yield Bit(self, "has_cmd_line_args", "Are there any command line arguments?") yield Bit(self, "has_custom_icon", "Is there a custom icon?") yield Bit(self, "has_unicode_names", "Are Unicode names used?")
def createFields(self): yield UInt32(self, "signature", "Shortcut signature (0x0000004C)") yield GUID(self, "guid")
2078f158e6614c23c8bcfb26762a3370d667c630 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9327/2078f158e6614c23c8bcfb26762a3370d667c630/lnk.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 2314, 12, 2890, 4672, 2824, 29810, 1578, 12, 2890, 16, 315, 8195, 3113, 315, 15576, 3372, 261, 20, 92, 9449, 24, 39, 2225, 13, 2824, 20322, 12, 2890, 16, 315, 14066, 7923, 2, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 2314, 12, 2890, 4672, 2824, 29810, 1578, 12, 2890, 16, 315, 8195, 3113, 315, 15576, 3372, 261, 20, 92, 9449, 24, 39, 2225, 13, 2824, 20322, 12, 2890, 16, 315, 14066, 7923, 2, -100...
content_z = zipfile.ZipFile(path, mode='r') style_xml = content_z.read('styles.xml')
def parse(self, cursor, user, report, objects, datas, context): localcontext = {} localcontext['datas'] = datas localcontext['user'] = self.pool.get('res.user').\ browse(cursor, user, user) localcontext['formatLang'] = self.format_lang localcontext['decodestring'] = decodestring localcontext['StringIO'] = StringIO.StringIO localcontext['time'] = time localcontext['datetime'] = datetime localcontext.update(context)
61ff77b0b15593e21cae45230b9a6a3fed06188d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9266/61ff77b0b15593e21cae45230b9a6a3fed06188d/report.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 12, 2890, 16, 3347, 16, 729, 16, 2605, 16, 2184, 16, 5386, 16, 819, 4672, 1191, 2472, 273, 2618, 1191, 2472, 3292, 13178, 3546, 273, 5386, 1191, 2472, 3292, 1355, 3546, 273, 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, 1109, 12, 2890, 16, 3347, 16, 729, 16, 2605, 16, 2184, 16, 5386, 16, 819, 4672, 1191, 2472, 273, 2618, 1191, 2472, 3292, 13178, 3546, 273, 5386, 1191, 2472, 3292, 1355, 3546, 273, 365, ...
for frame in xrange(1, numframes+1, SAMPLEFRAMES):
for frame in range(1, numframes+1, SAMPLEFRAMES):
def mapvertex(index, u, v): for mv in xrange(0, len(vertexmap)): if vertexmap[mv] == index and uvs[mv] == (u, v): return mv vertexmap.append(index) uvs.append( (u, v) ) return len(vertexmap)-1
518be49390d480a73bb0056bcc330075dd3e0794 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2372/518be49390d480a73bb0056bcc330075dd3e0794/windstille_export.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 852, 15281, 12, 1615, 16, 582, 16, 331, 4672, 364, 7701, 316, 12314, 12, 20, 16, 562, 12, 15281, 1458, 3719, 30, 309, 5253, 1458, 63, 17509, 65, 422, 770, 471, 582, 6904, 63, 17509, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 852, 15281, 12, 1615, 16, 582, 16, 331, 4672, 364, 7701, 316, 12314, 12, 20, 16, 562, 12, 15281, 1458, 3719, 30, 309, 5253, 1458, 63, 17509, 65, 422, 770, 471, 582, 6904, 63, 17509, ...
s = idaapi.get_struc(id)
s = idaapi.get_struc(sid)
def GetMemberName(id, member_offset): """ Get name of a member of a structure @param id: structure type ID @param member_offset: member offset. The offset can be any offset in the member. For example, is a member is 4 bytes long and starts at offset 2, then 2,3,4,5 denote the same structure member. @return: None if bad structure type ID is passed or no such member in the structure otherwise returns name of the specified member. """ s = idaapi.get_struc(id) if not s: return None m = idaapi.get_member(s, member_offset) if not m: return None return idaapi.get_member_name(m.id)
4f22943d42ee1d5013421d280b3bd776bee83fb9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3410/4f22943d42ee1d5013421d280b3bd776bee83fb9/idc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 968, 4419, 461, 12, 350, 16, 3140, 67, 3348, 4672, 3536, 968, 508, 434, 279, 3140, 434, 279, 3695, 225, 632, 891, 612, 30, 3695, 618, 1599, 632, 891, 3140, 67, 3348, 30, 3140, 1384, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 968, 4419, 461, 12, 350, 16, 3140, 67, 3348, 4672, 3536, 968, 508, 434, 279, 3140, 434, 279, 3695, 225, 632, 891, 612, 30, 3695, 618, 1599, 632, 891, 3140, 67, 3348, 30, 3140, 1384, ...
if value[-1] == "%":
if value and value[-1] == "%":
def _cell_style(self, node): # TODO: attrs = get_attrs(node) if node.hasAttribute("rowspan"): rowspan = ("|%s" % node.getAttribute("rowspan")) else: rowspan = ""
2023581ab9a31add4ec8cf19c2441f8b092f1979 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/888/2023581ab9a31add4ec8cf19c2441f8b092f1979/text_html_text_moin_wiki.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3855, 67, 4060, 12, 2890, 16, 756, 4672, 468, 2660, 30, 3422, 273, 336, 67, 7039, 12, 2159, 13, 309, 756, 18, 5332, 1499, 2932, 492, 3969, 6, 4672, 1027, 3969, 273, 7566, 30574, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3855, 67, 4060, 12, 2890, 16, 756, 4672, 468, 2660, 30, 3422, 273, 336, 67, 7039, 12, 2159, 13, 309, 756, 18, 5332, 1499, 2932, 492, 3969, 6, 4672, 1027, 3969, 273, 7566, 30574, ...
def visit_insert(self, insert): """Inserts are required to have the primary keys be explicitly present. mapper will by default not put them in the insert statement to comply with autoincrement fields that require they not be present. So, put them all in for all primary key columns. """ for c in insert.table.primary_key: if not self.parameters.has_key(c.key): self.parameters[c.key] = None return ansisql.ANSICompiler.visit_insert(self, insert)
def visit_insert_column(self, column, parameters): if column.primary_key: parameters[column.key] = None
def visit_insert(self, insert): """Inserts are required to have the primary keys be explicitly present.
4d7941e3b0e80da3a2762c502d79c40eb57c8d45 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1074/4d7941e3b0e80da3a2762c502d79c40eb57c8d45/firebird.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3757, 67, 6387, 12, 2890, 16, 2243, 4672, 3536, 14214, 854, 1931, 358, 1240, 326, 3354, 1311, 506, 8122, 3430, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3757, 67, 6387, 12, 2890, 16, 2243, 4672, 3536, 14214, 854, 1931, 358, 1240, 326, 3354, 1311, 506, 8122, 3430, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
def tag_add(self, tagName, index1, index2=None):
def tag_add(self, tagName, index1, *args):
def tag_add(self, tagName, index1, index2=None): self.tk.call( self._w, 'tag', 'add', tagName, index1, index2)
cb20e1e6d0b646afe7ea3c4e06b6168c8a569e64 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/cb20e1e6d0b646afe7ea3c4e06b6168c8a569e64/Tkinter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1047, 67, 1289, 12, 2890, 16, 7196, 16, 770, 21, 16, 380, 1968, 4672, 365, 18, 16099, 18, 1991, 12, 365, 6315, 91, 16, 296, 2692, 2187, 296, 1289, 2187, 7196, 16, 770, 21, 16, 770, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1047, 67, 1289, 12, 2890, 16, 7196, 16, 770, 21, 16, 380, 1968, 4672, 365, 18, 16099, 18, 1991, 12, 365, 6315, 91, 16, 296, 2692, 2187, 296, 1289, 2187, 7196, 16, 770, 21, 16, 770, ...
'testThermalParallel_Quad1024.py' : [check_thermal_solver]
'testThermalParallel_Quad1024.py' : [check_thermal_solver], 'testThermalParallel_Hexa10K.py' : [check_thermal_solver], 'testThermalParallel_Tetra8K.py' : [check_thermal_solver]
def main(): funcs = { 'testPartMesh.py' : [check_parmetis, check_mesh, check_mapping], 'testPartMesh_Quad.py' : [check_parmetis, check_mesh, check_mapping], 'testThermalParallel.py' : [check_thermal_solver], 'testThermalParallel_Quad1024.py' : [check_thermal_solver] } parser = OptionParser() parser.set_defaults(np=1,outdir='') parser.add_option("--in", dest='infile', help="Input file (required).") parser.add_option("--golden", help="Directory where golden files are stored.") parser.add_option("--np", type=int, help="Number of Processors.") parser.add_option("--outdir", help="Output directory.") parser.add_option("--script", help="Script to run.") (options, args) = parser.parse_args() # convert path to absolute because we may cd to the test directory options.script = os.path.abspath(options.script) options.outdir = os.path.abspath(options.outdir) options.golden = os.path.abspath(os.path.join(options.golden,'GOLDEN')) options.infile = os.path.abspath(options.infile) if options.outdir: if not os.path.isdir(options.outdir): try: os.makedirs(options.outdir) except: fatal("error creating directory " + options.outdir) os.chdir(options.outdir) mpi = 'mpirun -np %s %s %s' % (options.np, options.script, options.infile) if os.system( mpi ): cleanup(-1) for f in funcs[os.path.basename(options.script)]: err = f(options) if err: cleanup(err)
a99bc039f6b5434667bcec8251a9a8a549a38e1f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5963/a99bc039f6b5434667bcec8251a9a8a549a38e1f/ptest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 15630, 273, 288, 296, 3813, 1988, 16748, 18, 2074, 11, 294, 306, 1893, 67, 1065, 10578, 291, 16, 866, 67, 15557, 16, 866, 67, 6770, 6487, 296, 3813, 1988, 16748, 67, 24483, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 15630, 273, 288, 296, 3813, 1988, 16748, 18, 2074, 11, 294, 306, 1893, 67, 1065, 10578, 291, 16, 866, 67, 15557, 16, 866, 67, 6770, 6487, 296, 3813, 1988, 16748, 67, 24483, ...
self.write_indent() breaks = False
self.write_line_break() breaks = True
def write_literal(self, text): chomp = self.determine_block_hints(text) self.write_indicator(u'|'+chomp, True) self.write_indent() breaks = False start = end = 0 while end <= len(text): ch = None if end < len(text): ch = text[end] if breaks: if ch is None or ch not in u'\n\x85\u2028\u2029': for br in text[start:end]: if br == u'\n': self.write_line_break() else: self.write_line_break(br) if ch is not None: self.write_indent() start = end else: if ch is None or ch in u'\n\x85\u2028\u2029': data = text[start:end] if self.encoding: data = data.encode(self.encoding) self.stream.write(data) if ch is None: self.write_line_break() start = end if ch is not None: breaks = (ch in u'\n\x85\u2028\u2029') end += 1
f5c5eeb03e263493948c1faed35ac8ff6823f5c0 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5889/f5c5eeb03e263493948c1faed35ac8ff6823f5c0/emitter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 67, 13107, 12, 2890, 16, 977, 4672, 462, 20667, 273, 365, 18, 24661, 67, 2629, 67, 24598, 12, 955, 13, 365, 18, 2626, 67, 18741, 12, 89, 11, 16637, 15, 343, 20667, 16, 1053, 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, 1045, 67, 13107, 12, 2890, 16, 977, 4672, 462, 20667, 273, 365, 18, 24661, 67, 2629, 67, 24598, 12, 955, 13, 365, 18, 2626, 67, 18741, 12, 89, 11, 16637, 15, 343, 20667, 16, 1053, 13...
self.makeSubelem('queue')
self.makeSubelem('queue', max_size_buffers=0, max_size_bytes=0, max_size_time=gst.SECOND)
def __init__(self, options, name='audiodec'):
33558f7f2c84ba4b90631fe5b6e5cfef70addff2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5222/33558f7f2c84ba4b90631fe5b6e5cfef70addff2/pipeline.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 702, 16, 508, 2218, 24901, 77, 390, 71, 11, 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, ...
[ 1, 1, 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, 1001, 2738, 972, 12, 2890, 16, 702, 16, 508, 2218, 24901, 77, 390, 71, 11, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
for mark in self.GetBookmarks():
for mark in marks:
def ReloadFile(self): """Reloads the current file, returns True on success and False if there is a failure. @return: whether file was reloaded or not @rtype: bool
47fbc764b9dafb6ace36188a5ade79fd240e8f62 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3530/47fbc764b9dafb6ace36188a5ade79fd240e8f62/ed_stc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 23086, 812, 12, 2890, 4672, 3536, 13013, 87, 326, 783, 585, 16, 1135, 1053, 603, 2216, 471, 1083, 309, 1915, 353, 279, 5166, 18, 632, 2463, 30, 2856, 585, 1703, 283, 4230, 578, 486, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 23086, 812, 12, 2890, 4672, 3536, 13013, 87, 326, 783, 585, 16, 1135, 1053, 603, 2216, 471, 1083, 309, 1915, 353, 279, 5166, 18, 632, 2463, 30, 2856, 585, 1703, 283, 4230, 578, 486, 63...
assert res == len(a)
assert_equal(res,len(a))
def __len__(self): return 10
1a2e32f8d57897230b5265290279639d73dda37e /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12971/1a2e32f8d57897230b5265290279639d73dda37e/test_scxx_object.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1897, 972, 12, 2890, 4672, 327, 1728, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1897, 972, 12, 2890, 4672, 327, 1728, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
return super(DTSMerger,self).merge(jobs, outputdir, ignorefailed,
return super(DSTMerger,self).merge(jobs, outputdir, ignorefailed,
def merge(self, jobs, outputdir=None, ignorefailed=None, overwrite=None): self.merge_tool.merge_opts = self.merge_opts self.merge_tool.version = self.version #needed as exportmethods doesn't seem to cope with inheritance return super(DTSMerger,self).merge(jobs, outputdir, ignorefailed, overwrite)
320bd85705329dfa1761faafa6c6ffbbf176e08b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1488/320bd85705329dfa1761faafa6c6ffbbf176e08b/DSTMerger.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2691, 12, 2890, 16, 6550, 16, 876, 1214, 33, 7036, 16, 2305, 7307, 33, 7036, 16, 6156, 33, 7036, 4672, 365, 18, 2702, 67, 6738, 18, 2702, 67, 4952, 273, 365, 18, 2702, 67, 4952, 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, 2691, 12, 2890, 16, 6550, 16, 876, 1214, 33, 7036, 16, 2305, 7307, 33, 7036, 16, 6156, 33, 7036, 4672, 365, 18, 2702, 67, 6738, 18, 2702, 67, 4952, 273, 365, 18, 2702, 67, 4952, 365,...
"""Mapping of language-dependent interpreted text role names to already imported directive functions."""
"""Mapping of local or language-dependent interpreted text role names to role functions."""
def role_fn(name, rawtext, text, lineno, inliner): code...
e64280965c21d71c805b865fb3df5d81cfa19095 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1278/e64280965c21d71c805b865fb3df5d81cfa19095/roles.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2478, 67, 4293, 12, 529, 16, 1831, 955, 16, 977, 16, 7586, 16, 316, 7511, 264, 4672, 981, 2777, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2478, 67, 4293, 12, 529, 16, 1831, 955, 16, 977, 16, 7586, 16, 316, 7511, 264, 4672, 981, 2777, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
FL_Coord, FL_Coord, STRING],
FL_Coord, FL_Coord, STRING],
def fl_get_button_numb(ob): """ fl_get_button_numb(ob) -> num. """ retval = _fl_get_button_numb(ob) return retval
9942dac8ce2b35a1e43615a26fd8e7054ef805d3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2429/9942dac8ce2b35a1e43615a26fd8e7054ef805d3/xformslib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1183, 67, 588, 67, 5391, 67, 2107, 70, 12, 947, 4672, 3536, 1183, 67, 588, 67, 5391, 67, 2107, 70, 12, 947, 13, 317, 818, 18, 3536, 225, 5221, 273, 389, 2242, 67, 588, 67, 5391, 67...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1183, 67, 588, 67, 5391, 67, 2107, 70, 12, 947, 4672, 3536, 1183, 67, 588, 67, 5391, 67, 2107, 70, 12, 947, 13, 317, 818, 18, 3536, 225, 5221, 273, 389, 2242, 67, 588, 67, 5391, 67...
methodGetParent = getattr (type(widget), 'GetParent', None) if methodGetParent is not None: parent = methodGetParent (widget) methodGetChildren = getattr (type(parent), 'GetChildren', None) if methodGetChildren is not None: numberChildren = len (methodGetChildren (parent))
numberChildren = None method = getattr (type(widget), 'GetParent', None) if method is not None: parent = method (widget) method = getattr (type(parent), 'GetChildren', None) if method is not None: parentsChildren = method (parent) if widget in parentsChildren: numberChildren = len (parentsChildren)
def unRender (self): for child in self.childrenBlocks: child.unRender() widget = getattr (self, 'widget', None)
37271e09169923ec4245f3f424f87093a14317b8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/37271e09169923ec4245f3f424f87093a14317b8/Block.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 640, 3420, 261, 2890, 4672, 364, 1151, 316, 365, 18, 5906, 6450, 30, 1151, 18, 318, 3420, 1435, 3604, 273, 3869, 261, 2890, 16, 296, 6587, 2187, 599, 13, 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, 0, 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, 640, 3420, 261, 2890, 4672, 364, 1151, 316, 365, 18, 5906, 6450, 30, 1151, 18, 318, 3420, 1435, 3604, 273, 3869, 261, 2890, 16, 296, 6587, 2187, 599, 13, 2, -100, -100, -100, -100, -10...
f = codecReader(urllib.urlopen(query))
logging.info("Opening %r" % query) try: f = codecReader(urllib.urlopen(query)) except IOError: f = codecReader(urllib.urlopen(query))
def getDataSetIterator(name): try: parameter, preparatorFunc = DATA_SETS[name] except KeyError: raise ValueError("Unknown data set %r" % name) parameter = parameter.copy() if 'properties' in parameter: parameter['properties'] = '/'.join(('?' + prop) for prop in parameter['properties']) codecReader = codecs.getreader('UTF-8') run = 0 while True: queryDict = {'offset': run * MAX_ENTRIES, 'limit': MAX_ENTRIES} queryDict.update(parameter) query = QUERY_URL % queryDict query = urllib.quote(query, safe='/:=').replace('%', '-') f = codecReader(urllib.urlopen(query)) lineCount = 0 line = f.readline() while line: line = line.rstrip('\n') entry = re.findall(r'"[^"]+"|[^,]+', line) if preparatorFunc: for e in preparatorFunc(entry): yield e else: yield entry lineCount += 1 line = f.readline() f.close() if lineCount < MAX_ENTRIES: break run += 1
f4e8765d07f6ca22ea26427acf372a51924cd716 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11128/f4e8765d07f6ca22ea26427acf372a51924cd716/export.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4303, 694, 3198, 12, 529, 4672, 775, 30, 1569, 16, 675, 2528, 2622, 273, 8730, 67, 28092, 63, 529, 65, 1335, 4999, 30, 1002, 2068, 2932, 4874, 501, 444, 738, 86, 6, 738, 508, 13, 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, 4303, 694, 3198, 12, 529, 4672, 775, 30, 1569, 16, 675, 2528, 2622, 273, 8730, 67, 28092, 63, 529, 65, 1335, 4999, 30, 1002, 2068, 2932, 4874, 501, 444, 738, 86, 6, 738, 508, 13, 225...
if not py3:
if py3: key = key.encode('latin-1').decode(getpreferredencoding()) else:
def get_key(self): key = '' while True: try: key += self.scr.getkey() if not py3: key = key.decode(getpreferredencoding()) self.scr.nodelay(False) except UnicodeDecodeError:
9342c6a590de57b6fef00d5fa9aa14b1468c4c37 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6932/9342c6a590de57b6fef00d5fa9aa14b1468c4c37/cli.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 856, 12, 2890, 4672, 498, 273, 875, 1323, 1053, 30, 775, 30, 498, 1011, 365, 18, 24638, 18, 588, 856, 1435, 309, 2395, 23, 30, 377, 498, 273, 498, 18, 3015, 2668, 26578, 17,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 856, 12, 2890, 4672, 498, 273, 875, 1323, 1053, 30, 775, 30, 498, 1011, 365, 18, 24638, 18, 588, 856, 1435, 309, 2395, 23, 30, 377, 498, 273, 498, 18, 3015, 2668, 26578, 17,...
nfa = FiniteAutomaton() nfa.addTransition(None, nfa.start(), nfa.end()) for p in particles: next_nfa = FiniteAutomaton() (sub_start, sub_end) = next_nfa.addSubAutomaton(nfa) next_nfa.addTransition(p, next_nfa.start(), sub_start) next_nfa.addTransition(None, sub_end, next_nfa.end()) (sub_start, sub_end) = next_nfa.addSubAutomaton(nfa) next_nfa.addTransition(None, next_nfa.start(), sub_start) next_nfa.addTransition(p, sub_end, next_nfa.end()) nfa = next_nfa (sub_start, sub_end) = self.__nfa.addSubAutomaton(nfa) self.addTransition(None, start, sub_start) self.addTransition(None, sub_end, end) def fromModelGroup (self, group, start, end):
for possibility in _Permutations(particles): self.__fromMGSequence(possibility, start, end) def __fromModelGroup (self, group, start, end):
def __fromMGAll (self, particles, start, end): nfa = FiniteAutomaton() nfa.addTransition(None, nfa.start(), nfa.end()) for p in particles: next_nfa = FiniteAutomaton() (sub_start, sub_end) = next_nfa.addSubAutomaton(nfa) next_nfa.addTransition(p, next_nfa.start(), sub_start) next_nfa.addTransition(None, sub_end, next_nfa.end()) (sub_start, sub_end) = next_nfa.addSubAutomaton(nfa) next_nfa.addTransition(None, next_nfa.start(), sub_start) next_nfa.addTransition(p, sub_end, next_nfa.end()) nfa = next_nfa (sub_start, sub_end) = self.__nfa.addSubAutomaton(nfa) self.addTransition(None, start, sub_start) self.addTransition(None, sub_end, end)
5405a4b1cb6095dbac7f2e861a956b0f5b49f9da /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7171/5405a4b1cb6095dbac7f2e861a956b0f5b49f9da/nfa.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2080, 49, 43, 1595, 261, 2890, 16, 28312, 16, 787, 16, 679, 4672, 290, 507, 273, 9458, 1137, 22932, 16799, 1435, 290, 507, 18, 1289, 8850, 12, 7036, 16, 290, 507, 18, 1937, 9334,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2080, 49, 43, 1595, 261, 2890, 16, 28312, 16, 787, 16, 679, 4672, 290, 507, 273, 9458, 1137, 22932, 16799, 1435, 290, 507, 18, 1289, 8850, 12, 7036, 16, 290, 507, 18, 1937, 9334,...
self.close_request(request)
self.shutdown_request(request)
def process_request_thread(self, request, client_address): """Same as in BaseServer but as a thread.
41d9a4da390969498b7170d6f56ce4d9cb74989a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3187/41d9a4da390969498b7170d6f56ce4d9cb74989a/SocketServer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 2293, 67, 5930, 12, 2890, 16, 590, 16, 1004, 67, 2867, 4672, 3536, 8650, 487, 316, 3360, 2081, 1496, 487, 279, 2650, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 2293, 67, 5930, 12, 2890, 16, 590, 16, 1004, 67, 2867, 4672, 3536, 8650, 487, 316, 3360, 2081, 1496, 487, 279, 2650, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -1...
Int32.__init__(self, parent, name, description)
UInt32.__init__(self, parent, name, description)
def __init__(self, parent, name, description=None): Int32.__init__(self, parent, name, description)
0bd456007e76a497bfd7c6d01b57bc8bd9650ccd /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9327/0bd456007e76a497bfd7c6d01b57bc8bd9650ccd/ole2.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 982, 16, 508, 16, 2477, 33, 7036, 4672, 3094, 1578, 16186, 2738, 972, 12, 2890, 16, 982, 16, 508, 16, 2477, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 982, 16, 508, 16, 2477, 33, 7036, 4672, 3094, 1578, 16186, 2738, 972, 12, 2890, 16, 982, 16, 508, 16, 2477, 13, 2, -100, -100, -100, -100, -100, -100, ...
iName = self._doc.getInternalFontName('Helvetica')
iName = self._doc.getInternalFontName(self._fontname) print iName, self._fontname
def _make_preamble(self): # yuk iName = self._doc.getInternalFontName('Helvetica') if self.bottomup: #must set an initial font self._preamble = '1 0 0 1 0 0 cm BT %s 12 Tf 14.4 TL ET' % iName else: #switch coordinates, flip text and set font self._preamble = '1 0 0 -1 0 %s cm BT %s 12 Tf 14.4 TL ET' % (fp_str(self._pagesize[1]), iName)
9a440973033ba5e229a4fd6aede7303520f48d1f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7053/9a440973033ba5e229a4fd6aede7303520f48d1f/canvas.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 6540, 67, 84, 793, 7119, 12, 2890, 4672, 468, 677, 19445, 277, 461, 273, 365, 6315, 2434, 18, 588, 3061, 5711, 461, 12, 2890, 6315, 5776, 529, 13, 1172, 277, 461, 16, 365, 6315, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 6540, 67, 84, 793, 7119, 12, 2890, 4672, 468, 677, 19445, 277, 461, 273, 365, 6315, 2434, 18, 588, 3061, 5711, 461, 12, 2890, 6315, 5776, 529, 13, 1172, 277, 461, 16, 365, 6315, ...
for line in os.popen("devenv /build Release FFMPEGWrapper.sln /project WindowsSetup").readlines():
for line in os.popen(("devenv /build Release FFMPEGWrapper.sln " "/project WindowsSetup")).readlines():
def build(): print "Building" for line in os.popen("devenv /build Release FFMPEGWrapper.sln /project WindowsSetup").readlines(): print line
8bc01f9257bc3b9593b71548be43b260a06a0070 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12119/8bc01f9257bc3b9593b71548be43b260a06a0070/build.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 13332, 1172, 315, 16713, 6, 364, 980, 316, 1140, 18, 84, 3190, 12, 2932, 5206, 3074, 342, 3510, 10819, 6512, 49, 16533, 3611, 18, 2069, 82, 315, 2206, 4406, 8202, 7365, 7923, 2934,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 13332, 1172, 315, 16713, 6, 364, 980, 316, 1140, 18, 84, 3190, 12, 2932, 5206, 3074, 342, 3510, 10819, 6512, 49, 16533, 3611, 18, 2069, 82, 315, 2206, 4406, 8202, 7365, 7923, 2934,...
tag, n, commit = data.split('-')
tag, n, commit = data.rsplit('-', 2)
def describe(match=None): # The command command = ['git', 'describe', '--tags', '--long'] if match: command.extend(['--match', match]) # Call try: data = get_pipe(command) except EnvironmentError: return None tag, n, commit = data.split('-') return tag, int(n), commit
eb672bd67e5372e9e9f0313b38fcd0e79e6224a7 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12681/eb672bd67e5372e9e9f0313b38fcd0e79e6224a7/git.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6401, 12, 1916, 33, 7036, 4672, 468, 1021, 1296, 1296, 273, 10228, 6845, 2187, 296, 22748, 2187, 3534, 4156, 2187, 3534, 5748, 3546, 309, 845, 30, 1296, 18, 14313, 12, 3292, 413, 1916, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6401, 12, 1916, 33, 7036, 4672, 468, 1021, 1296, 1296, 273, 10228, 6845, 2187, 296, 22748, 2187, 3534, 4156, 2187, 3534, 5748, 3546, 309, 845, 30, 1296, 18, 14313, 12, 3292, 413, 1916, 2...
d.shift(-x, -y) bbox = d.getBBox()
d1 = measAlg.Defect(d.getBBox()) d1.shift(-x, -y) bbox = d1.getBBox()
def process(self, clipboard): """ """ self.log.log(Log.INFO, "Doing Saturation correction.") #grab exposure from clipboard exposure = clipboard.get(self.policy.getString("inputKeys.exposure")) exposure = ipIsr.convertImageForIsr(exposure) fwhm = self.policy.getDouble("parameters.defaultFwhm") amp = cameraGeom.cast_Amp(exposure.getDetector()) dataBbox = amp.getDataSec(True) x = dataBbox.getX0() y = dataBbox.getY0() height = dataBbox.getY1() - dataBbox.getY0() width = dataBbox.getX1() - dataBbox.getX0() dl = measAlg.DefectListT() defectList = cameraGeom.cast_Ccd(amp.getParent()).getDefects() if amp.getId().getIndex()[1] == 1: for d in defectList: d.shift(-x, -y) bbox = d.getBBox() if bbox.getX0()-4 > width or bbox.getX1()-4 < 0 or \ height-bbox.getY0() - 1 > height or height-bbox.getY1() - 1 < 0: pass else: nd =\ measAlg.Defect(afwImage.BBox(afwImage.PointI(bbox.getX0()+4, height - bbox.getY0()+1), bbox.getHeight(), bbox.getWidth())) dl.append(nd) else: for d in defectList: d.shift(-x, -y) bbox = d.getBBox() if bbox.getX0()-4 > width or bbox.getX1()-4 < 0 or \ bbox.getY0()-1 > height or bbox.getY1()-1 < 0: pass else: nd =\ measAlg.Defect(afwImage.BBox(afwImage.PointI(bbox.getX0()+4, bbox.getY0()+1), bbox.getHeight(), bbox.getWidth())) dl.append(nd) saturation = amp.getElectronicParams().getSaturationLevel() ipIsr.maskBadPixelsDef(exposure, dl, fwhm, interpolate=True, maskName='BAD') ipIsr.saturationCorrection(exposure, int(saturation), fwhm, growSaturated=False, interpolate=True) #ds9.mtv(exposure, frame = 0) #exposure.writeFits("Amp.fits") #output products clipboard.put(self.policy.get("outputKeys.saturationCorrectedExposure"), exposure)
d7eb53f6ffc1df1a454df901b9495647c48fa0f5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6525/d7eb53f6ffc1df1a454df901b9495647c48fa0f5/simCalibSaturationDefectStage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 12, 2890, 16, 20304, 4672, 3536, 3536, 365, 18, 1330, 18, 1330, 12, 1343, 18, 5923, 16, 315, 3244, 310, 25793, 872, 15104, 1199, 13, 225, 468, 2752, 70, 14620, 628, 20304, 14620, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 12, 2890, 16, 20304, 4672, 3536, 3536, 365, 18, 1330, 18, 1330, 12, 1343, 18, 5923, 16, 315, 3244, 310, 25793, 872, 15104, 1199, 13, 225, 468, 2752, 70, 14620, 628, 20304, 14620, ...
fullTag = self.full_tag_path (tag) (status, o) = self.call ('DELETE', fullTag)
fullTag = self.full_tag_path(tag) (status, o) = self.call('DELETE', fullTag)
def delete_abstract_tag (self, tag): """Deletes an abstract tag, removing all of its concrete instances from objects. Use with care. So db.delete_abstract_tag ('njr/rating') removes the njr/rating from ALL OBJECTS IN FLUIDDB.
e75848841ac96982524448e932e12fd6ff9cbe0c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12637/e75848841ac96982524448e932e12fd6ff9cbe0c/fdb.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1430, 67, 17801, 67, 2692, 261, 2890, 16, 1047, 4672, 3536, 7551, 392, 8770, 1047, 16, 9427, 777, 434, 2097, 12220, 3884, 628, 2184, 18, 282, 2672, 598, 7671, 18, 6155, 1319, 18, 3733, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1430, 67, 17801, 67, 2692, 261, 2890, 16, 1047, 4672, 3536, 7551, 392, 8770, 1047, 16, 9427, 777, 434, 2097, 12220, 3884, 628, 2184, 18, 282, 2672, 598, 7671, 18, 6155, 1319, 18, 3733, ...
except TypeError: pass else: raise TestFailed, 'expected TypeError'
except (AttributeError, TypeError): pass else: raise TestFailed, 'expected TypeError or AttributeError'
def b(): 'my docstring' pass
df8902c81e6eb4fcbf46b9a79be8e214b937e033 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/df8902c81e6eb4fcbf46b9a79be8e214b937e033/test_funcattrs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 324, 13332, 296, 4811, 14525, 11, 1342, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 324, 13332, 296, 4811, 14525, 11, 1342, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
current_move = move_obj.copy(cr, uid, move.id, default_val) new_move.append(current_move)
if quantity_rest > 0: current_move = move_obj.copy(cr, uid, move.id, default_val) new_move.append(current_move) if quantity_rest == 0: current_move = move.id
def split(self, cr, uid, ids, move_ids, context=None): """ To split stock moves into production lot @param self: The object pointer. @param cr: A database cursor @param uid: ID of the user currently logged in @param ids: the ID or list of IDs if we want more than one @param move_ids: the ID or list of IDs of stock move we want to split @param context: A standard dictionary @return: """ prodlot_obj = self.pool.get('stock.production.lot') ir_sequence_obj = self.pool.get('ir.sequence') move_obj = self.pool.get('stock.move') new_move = [] for data in self.browse(cr, uid, ids): for move in move_obj.browse(cr, uid, move_ids): move_qty = move.product_qty quantity_rest = move.product_qty uos_qty_rest = move.product_uos_qty new_move = [] for line in data.line_ids: quantity = line.quantity
b5ed5d2ccad62da30eb92e76c8f43611dfc232fd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/b5ed5d2ccad62da30eb92e76c8f43611dfc232fd/stock_move.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1416, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 3635, 67, 2232, 16, 819, 33, 7036, 4672, 3536, 2974, 1416, 12480, 13934, 1368, 12449, 17417, 225, 632, 891, 365, 30, 1021, 733, 4407, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1416, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 3635, 67, 2232, 16, 819, 33, 7036, 4672, 3536, 2974, 1416, 12480, 13934, 1368, 12449, 17417, 225, 632, 891, 365, 30, 1021, 733, 4407, ...
return self._GetPropFromStream(prop)
return GetPropFromStream(self.mapi_object, prop)
def GetField(self, prop, raise_errors = False): self._EnsureObject() if type(prop) != type(0): props = ( (mapi.PS_PUBLIC_STRINGS, prop), ) prop = self.mapi_object.GetIDsFromNames(props, 0)[0] if PROP_TYPE(prop) == PT_ERROR: # No such property return None prop = PROP_TAG( PT_UNSPECIFIED, PROP_ID(prop)) try: hr, props = self.mapi_object.GetProps((prop,), 0) ((tag, val), ) = props if PROP_TYPE(tag) == PT_ERROR: if val == mapi.MAPI_E_NOT_ENOUGH_MEMORY: # Too big for simple properties - get via a stream return self._GetPropFromStream(prop) return None return val except: if raise_errors: raise return None
6ed38ae3740a6cba6e38e22e9aeabc0cccc1a448 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9857/6ed38ae3740a6cba6e38e22e9aeabc0cccc1a448/msgstore.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 25568, 12, 2890, 16, 2270, 16, 1002, 67, 4324, 273, 1083, 4672, 365, 6315, 12512, 921, 1435, 309, 618, 12, 5986, 13, 480, 618, 12, 20, 4672, 3458, 273, 261, 261, 1458, 77, 18, 5857, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 25568, 12, 2890, 16, 2270, 16, 1002, 67, 4324, 273, 1083, 4672, 365, 6315, 12512, 921, 1435, 309, 618, 12, 5986, 13, 480, 618, 12, 20, 4672, 3458, 273, 261, 261, 1458, 77, 18, 5857, ...
for line in open(file_handler, "r").readlines(): if "props['pattern']" in line: plugin_pattern = line.split("r\"")[1].split("\"")[0] break
if plugin_file == "DLC": plugin_pattern = "(?!http://).*\.dlc" else: for line in open(file_handler, "r").readlines(): if "props['pattern']" in line: plugin_pattern = line.split("r\"")[1].split("\"")[0] break
def create_plugin_index(self): for file_handler in glob(self.plugin_folder + sep + '*.py') + glob(self.plugin_folder + sep + 'DLC.pyc'): plugin_pattern = "" plugin_file = basename(file_handler).replace('.pyc', '').replace('.py', '') for line in open(file_handler, "r").readlines(): if "props['pattern']" in line: plugin_pattern = line.split("r\"")[1].split("\"")[0] break if plugin_pattern != "": self.plugins_avaible[plugin_file] = plugin_pattern self.logger.debug(plugin_file + _(" added")) self.logger.info(_("created index of plugins"))
f22b9cebe1f800127658f94b9e4c9b9b2481c59e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9838/f22b9cebe1f800127658f94b9e4c9b9b2481c59e/pyLoadCore.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 4094, 67, 1615, 12, 2890, 4672, 364, 585, 67, 4176, 316, 4715, 12, 2890, 18, 4094, 67, 5609, 397, 5478, 397, 19962, 2074, 6134, 397, 4715, 12, 2890, 18, 4094, 67, 5609, 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, 752, 67, 4094, 67, 1615, 12, 2890, 4672, 364, 585, 67, 4176, 316, 4715, 12, 2890, 18, 4094, 67, 5609, 397, 5478, 397, 19962, 2074, 6134, 397, 4715, 12, 2890, 18, 4094, 67, 5609, 397, ...
return _int4_format.unpack(self.stream.read(4))[0]
return struct.unpack("!i", self.stream.read(4))[0]
def _read_int4(self): return _int4_format.unpack(self.stream.read(4))[0]
b1d087a8d9755e46aa845d71fc1175153b4a066d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7009/b1d087a8d9755e46aa845d71fc1175153b4a066d/serializer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 896, 67, 474, 24, 12, 2890, 4672, 327, 389, 474, 24, 67, 2139, 18, 17309, 12, 2890, 18, 3256, 18, 896, 12, 24, 3719, 63, 20, 65, 2, 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, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 896, 67, 474, 24, 12, 2890, 4672, 327, 389, 474, 24, 67, 2139, 18, 17309, 12, 2890, 18, 3256, 18, 896, 12, 24, 3719, 63, 20, 65, 2, -100, -100, -100, -100, -100, -100, -100, -...
def __hash__(self, other): return hash((getattr(self, arg), self.display_name))
def __hash__(self): return hash((getattr(self, self._arg), self.display_name))
def __hash__(self, other): return hash((getattr(self, arg), self.display_name))
e33e81d39f115106ffba4b9002db3da5927a82ec /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5703/e33e81d39f115106ffba4b9002db3da5927a82ec/resourcelists.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2816, 972, 12, 2890, 16, 1308, 4672, 327, 1651, 12443, 588, 1747, 12, 2890, 16, 1501, 3631, 365, 18, 5417, 67, 529, 3719, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2816, 972, 12, 2890, 16, 1308, 4672, 327, 1651, 12443, 588, 1747, 12, 2890, 16, 1501, 3631, 365, 18, 5417, 67, 529, 3719, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
'state' : lambda *a: 'current',
'state' : lambda *a: 'current',
def search(self, cr, user, args, offset=0, limit=None, order=None, context=None, count=False): for arg in args: if arg[0]=='address_id': self._order = 'sequence_partner' if arg[0]=='contact_id': self._order = 'sequence_contact' return super(res_partner_job,self).search(cr, user, args, offset, limit, order, context, count)
8e6746a79422a59046f314bba5be6ba5e8634bc1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/8e6746a79422a59046f314bba5be6ba5e8634bc1/base_contact.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1623, 12, 2890, 16, 4422, 16, 729, 16, 833, 16, 1384, 33, 20, 16, 1800, 33, 7036, 16, 1353, 33, 7036, 16, 819, 33, 7036, 16, 1056, 33, 8381, 4672, 364, 1501, 316, 833, 30, 309, 150...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 12, 2890, 16, 4422, 16, 729, 16, 833, 16, 1384, 33, 20, 16, 1800, 33, 7036, 16, 1353, 33, 7036, 16, 819, 33, 7036, 16, 1056, 33, 8381, 4672, 364, 1501, 316, 833, 30, 309, 150...
return FiniteField_ext_pariElement(self.__parent, self.__value * right.__value)
return FiniteField_ext_pariElement(self.__parent, self.__value * right.__value, check=False)
def _mul_(self, right): return FiniteField_ext_pariElement(self.__parent, self.__value * right.__value)
a8b0bc86f67092c8d164d155afff81c6830223eb /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/a8b0bc86f67092c8d164d155afff81c6830223eb/finite_field_element.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 16411, 67, 12, 2890, 16, 2145, 4672, 327, 9458, 1137, 974, 67, 408, 67, 1065, 77, 1046, 12, 2890, 16186, 2938, 16, 365, 16186, 1132, 380, 2145, 16186, 1132, 13, 2, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 16411, 67, 12, 2890, 16, 2145, 4672, 327, 9458, 1137, 974, 67, 408, 67, 1065, 77, 1046, 12, 2890, 16186, 2938, 16, 365, 16186, 1132, 380, 2145, 16186, 1132, 13, 2, -100, -100, -10...
if sys.modules.has_key('wx') or sys.modules.has_key('wxPython'): raise VersionError("wxversion.ensureMinimal() must be called before wxPython is imported")
installed = [] for v in WX_VERSIONS: i = 0 for e in ENCODINGS: ver = "wx-%s-%s" % (v, ENCODINGS[i]) if version_exists(ver): installed.append(ver) i += 1 return installed
def ensureMinimal(minVersion): """ Checks to see if the default version of wxPython is greater-than or equal to `minVersion`. If not then it will try to find an installed version that is >= minVersion. If none are available then a message is displayed that will inform the user and will offer to open their web browser to the wxPython downloads page, and will then exit the application. """ assert type(minVersion) == str # ensure that wxPython hasn't been imported yet. if sys.modules.has_key('wx') or sys.modules.has_key('wxPython'): raise VersionError("wxversion.ensureMinimal() must be called before wxPython is imported") bestMatch = None minv = _wxPackageInfo(minVersion) defaultPath = _find_default() if defaultPath: defv = _wxPackageInfo(defaultPath, True) if defv >= minv: bestMatch = defv if bestMatch is None: installed = _find_installed() if installed: # The list is in reverse sorted order, so if the first one is # big enough then choose it if installed[0] >= minv: bestMatch = installed[0] if bestMatch is None: import wx, webbrowser versions = "\n".join([" "+ver for ver in getInstalled()]) app = wx.PySimpleApp() result = wx.MessageBox("This application requires a version of wxPython " "greater than or equal to %s, but a matching version " "was not found.\n\n" "You currently have these version(s) installed:\n%s\n\n" "Would you like to download a new version of wxPython?\n" % (minVersion, versions), "wxPython Upgrade Needed", style=wx.YES_NO) if result == wx.YES: webbrowser.open(UPDATE_URL) app.MainLoop() sys.exit() sys.path.insert(0, bestMatch.pathname) _selected = bestMatch
160d2bc69832a740481b419e980806742a525124 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2807/160d2bc69832a740481b419e980806742a525124/wxpy-config.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3387, 2930, 2840, 12, 1154, 1444, 4672, 3536, 13074, 358, 2621, 309, 326, 805, 1177, 434, 7075, 15774, 353, 6802, 17, 23483, 578, 3959, 358, 1375, 1154, 1444, 8338, 225, 971, 486, 1508, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3387, 2930, 2840, 12, 1154, 1444, 4672, 3536, 13074, 358, 2621, 309, 326, 805, 1177, 434, 7075, 15774, 353, 6802, 17, 23483, 578, 3959, 358, 1375, 1154, 1444, 8338, 225, 971, 486, 1508, ...
pgset=ParamGroup.objects.filter(component=c) for pg in pgset:
for pg in c.paramGroup.all():
def c2text(self,c): ''' provide a textual (html) view of the status of a component ''' comp=ET.Element('div') ET.SubElement(comp,'h1').text='Component details'
2937a8963dfa97f0c5ac52221d0e5b3e2f073c4f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7019/2937a8963dfa97f0c5ac52221d0e5b3e2f073c4f/Translator.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 276, 22, 955, 12, 2890, 16, 71, 4672, 9163, 5615, 279, 25774, 261, 2620, 13, 1476, 434, 326, 1267, 434, 279, 1794, 9163, 1161, 33, 1584, 18, 1046, 2668, 2892, 6134, 225, 4518, 18, 1676...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 276, 22, 955, 12, 2890, 16, 71, 4672, 9163, 5615, 279, 25774, 261, 2620, 13, 1476, 434, 326, 1267, 434, 279, 1794, 9163, 1161, 33, 1584, 18, 1046, 2668, 2892, 6134, 225, 4518, 18, 1676...
gclient_scm.os.remove(file_path).AndRaise(EnvironmentError())
gclient_scm.os.path.exists(file_path).AndReturn(True) gclient_scm.os.path.isfile(file_path).AndReturn(False) gclient_scm.os.path.isdir(file_path).AndReturn(True)
def testRevertUnversionedUnexpectedFile(self): options = self.Options(verbose=True) base_path = os.path.join(self.root_dir, self.relpath) gclient.os.path.isdir(base_path).AndReturn(True) items = [ ('~ ', 'a'), ] gclient_scm.CaptureSVNStatus(base_path).AndReturn(items) file_path = os.path.join(base_path, 'a') print(file_path) gclient_scm.os.remove(file_path).AndRaise(EnvironmentError()) gclient_utils.RemoveDirectory(file_path) gclient_scm.RunSVN(['revert', 'a'], base_path)
758deedc1a3aa0b32964b12edf9d99de2733315f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6076/758deedc1a3aa0b32964b12edf9d99de2733315f/gclient_test.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 426, 1097, 984, 21415, 7762, 812, 12, 2890, 4672, 702, 273, 365, 18, 1320, 12, 11369, 33, 5510, 13, 1026, 67, 803, 273, 1140, 18, 803, 18, 5701, 12, 2890, 18, 3085, 67, 1214, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 426, 1097, 984, 21415, 7762, 812, 12, 2890, 4672, 702, 273, 365, 18, 1320, 12, 11369, 33, 5510, 13, 1026, 67, 803, 273, 1140, 18, 803, 18, 5701, 12, 2890, 18, 3085, 67, 1214, 1...
contours=[-1e307, 0, 1e307], cmap=cmap, fill=True))) if bordercol is not None: bordercol = rgbcolor(bordercol)
contours=[-1e307, 0, 1e307], cmap=cmap, fill=True, **opt))) if bordercol or borderstyle or borderwidth: cmap = [rgbcolor(bordercol)] if bordercol else ['black'] linestyles = [borderstyle] if borderstyle else None linewidths = [borderwidth] if borderwidth else None opt.pop('linestyles') opt.pop('linewidths')
def region_plot(f, xrange, yrange, plot_points, incol, outcol, bordercol): r""" ``region_plot`` takes a boolean function of two variables, `f(x,y)` and plots the region where f is True over the specified ``xrange`` and ``yrange`` as demonstrated below. ``region_plot(f, (xmin, xmax), (ymin, ymax), ...)`` INPUT: - ``f`` -- a boolean function of two variables - ``(xmin, xmax)`` -- 2-tuple, the range of ``x`` values OR 3-tuple ``(x,xmin,xmax)`` - ``(ymin, ymax)`` -- 2-tuple, the range of ``y`` values OR 3-tuple ``(y,ymin,ymax)`` - ``plot_points`` -- integer (default: 100); number of points to plot in each direction of the grid - ``incol`` -- a color (default: ``'blue'``), the color inside the region - ``outcol`` -- a color (default: ``'white'``), the color of the outside of the region - ``bordercol`` -- a color (default: ``None``), the color of the border (``incol`` if not specified) EXAMPLES: Here we plot a simple function of two variables:: sage: x,y = var('x,y') sage: region_plot(cos(x^2+y^2) <= 0, (x, -3, 3), (y, -3, 3)) Here we play with the colors:: sage: region_plot(x^2+y^3 < 2, (x, -2, 2), (y, -2, 2), incol='lightblue', bordercol='gray') An even more complicated plot:: sage: region_plot(sin(x)*sin(y) >= 1/4, (x,-10,10), (y,-10,10), incol='yellow', bordercol='black', plot_points=250) A disk centered at the origin:: sage: region_plot(x^2+y^2<1, (x,-1,1), (y,-1,1)).show(aspect_ratio=1) A plot with more than one condition:: sage: region_plot([x^2+y^2<1, x<y], (x,-2,2), (y,-2,2)) Since it doesn't look very good, let's increase plot_points:: sage: region_plot([x^2+y^2<1, x<y], (x,-2,2), (y,-2,2), plot_points=400).show(aspect_ratio=1) #long time The first quadrant of the unit circle:: sage: region_plot([y>0, x>0, x^2+y^2<1], (-1.1, 1.1), (-1.1, 1.1), plot_points = 400).show(aspect_ratio=1) Here is another plot:: sage: region_plot(x*(x-1)*(x+1)+y^2<0, (x, -3, 2), (y, -3, 3), incol='lightblue', bordercol='gray', plot_points=50) If we want to keep only the region where x is positive:: sage: region_plot([x*(x-1)*(x+1)+y^2<0, x>-1], (x, -3, 2), (y, -3, 3), incol='lightblue', bordercol='gray', plot_points=50) Here we have a cut circle:: sage: region_plot([x^2+y^2<4, x>-1], (x, -2, 2), (y, -2, 2), incol='lightblue', bordercol='gray', plot_points=200).show(aspect_ratio=1) #long time """ from sage.plot.plot import Graphics from sage.plot.misc import setup_for_eval_on_grid if not isinstance(f, (list, tuple)): f = [f] variables = reduce(lambda g1, g2: g1.union(g2), [set(g.variables()) for g in f], set([])) f = [equify(g, variables) for g in f] g, ranges = setup_for_eval_on_grid(f, [xrange, yrange], plot_points) xrange,yrange=[r[:2] for r in ranges] xy_data_arrays = map(lambda g: [[g(x, y) for x in xsrange(*ranges[0], include_endpoint=True)] for y in xsrange(*ranges[1], include_endpoint=True)], g) xy_data_array = map(lambda *rows: map(lambda *vals: mangle_neg(vals), *rows), *xy_data_arrays) from matplotlib.colors import ListedColormap incol = rgbcolor(incol) outcol = rgbcolor(outcol) cmap = ListedColormap([incol, outcol]) cmap.set_over(outcol) cmap.set_under(incol) g = Graphics() g.add_primitive(ContourPlot(xy_data_array, xrange,yrange, dict(plot_points=plot_points, contours=[-1e307, 0, 1e307], cmap=cmap, fill=True))) if bordercol is not None: bordercol = rgbcolor(bordercol) g.add_primitive(ContourPlot(xy_data_array, xrange, yrange, dict(plot_points=plot_points, contours=[0], cmap=[bordercol], fill=False))) return g
37d8b6eadde6db814bff49b3658e71d67e3df889 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/37d8b6eadde6db814bff49b3658e71d67e3df889/contour_plot.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3020, 67, 4032, 12, 74, 16, 12314, 16, 677, 3676, 16, 3207, 67, 4139, 16, 316, 1293, 16, 596, 1293, 16, 5795, 1293, 4672, 436, 8395, 12176, 6858, 67, 4032, 10335, 5530, 279, 1250, 445,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3020, 67, 4032, 12, 74, 16, 12314, 16, 677, 3676, 16, 3207, 67, 4139, 16, 316, 1293, 16, 596, 1293, 16, 5795, 1293, 4672, 436, 8395, 12176, 6858, 67, 4032, 10335, 5530, 279, 1250, 445,...
class BadException:
class BadException(Exception):
def ckmsg(src, msg): try: compile(src, '<fragment>', 'exec') except SyntaxError, e: print e.msg if e.msg == msg: print "ok" else: print "expected:", msg else: print "failed to get expected SyntaxError"
303de6a25b4dc4874eded29c34c719a3bd6a4f40 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/303de6a25b4dc4874eded29c34c719a3bd6a4f40/test_exceptions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12622, 3576, 12, 4816, 16, 1234, 4672, 775, 30, 4074, 12, 4816, 16, 2368, 11956, 1870, 16, 296, 4177, 6134, 1335, 18453, 16, 425, 30, 1172, 425, 18, 3576, 309, 425, 18, 3576, 422, 1234...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12622, 3576, 12, 4816, 16, 1234, 4672, 775, 30, 4074, 12, 4816, 16, 2368, 11956, 1870, 16, 296, 4177, 6134, 1335, 18453, 16, 425, 30, 1172, 425, 18, 3576, 309, 425, 18, 3576, 422, 1234...
return version version = getversion() if version: f = file("mercurial/__version__.py", "w") f.write(' f.write('version = "%s"\n' % version) f.close() else: version = "unknown"
if version: f = file("mercurial/__version__.py", "w") f.write(' f.write('version = "%s"\n' % version) f.close() try: from mercurial import __version__ version = __version__.version except ImportError: version = 'unknown'
def getversion(): if not os.path.exists('.hg'): return None # not in a repository # execute hg out of this directory with a custom environment which # includes the pure Python modules in mercurial/pure pypath = os.environ.get('PYTHONPATH', '') purepath = os.path.join('mercurial', 'pure') os.environ['PYTHONPATH'] = os.pathsep.join(['mercurial', purepath, pypath]) os.environ['HGRCPATH'] = '' # do not read any config file cmd = '%s hg id -it' % sys.executable try: l = os.popen(cmd).read().split() except OSError, e: print "warning: could not establish Mercurial version: %s" % e os.environ['PYTHONPATH'] = pypath while len(l) > 1 and l[-1][0].isalpha(): # remove non-numbered tags l.pop() if l: version = l[-1] # latest tag or revision number if version.endswith('+'): version += time.strftime('%Y%m%d') return version
9b9b2b896bae0eb7af056d155d534e12f5e8440e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11312/9b9b2b896bae0eb7af056d155d534e12f5e8440e/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 1589, 13332, 309, 486, 1140, 18, 803, 18, 1808, 2668, 18, 26981, 11, 4672, 327, 599, 468, 486, 316, 279, 3352, 225, 468, 1836, 22576, 596, 434, 333, 1867, 598, 279, 1679, 3330, 14...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 1589, 13332, 309, 486, 1140, 18, 803, 18, 1808, 2668, 18, 26981, 11, 4672, 327, 599, 468, 486, 316, 279, 3352, 225, 468, 1836, 22576, 596, 434, 333, 1867, 598, 279, 1679, 3330, 14...
verify(L == ['Commented Bar', 'Foo Bar', 'Internationalized Stuff', 'Spacey Bar'],
verify(L == [r'Commented Bar', r'Foo Bar', r'Internationalized Stuff', r'Section\with$weird%characters[' '\t', r'Spacey Bar', ],
def basic(src): print "Testing basic accessors..." cf = ConfigParser.ConfigParser() sio = StringIO.StringIO(src) cf.readfp(sio) L = cf.sections() L.sort() verify(L == ['Commented Bar', 'Foo Bar', 'Internationalized Stuff', 'Spacey Bar'], "unexpected list of section names") # The use of spaces in the section names serves as a regression test for # SourceForge bug #115357. # http://sourceforge.net/bugs/?func=detailbug&group_id=5470&bug_id=115357 verify(cf.get('Foo Bar', 'foo', raw=1) == 'bar') verify(cf.get('Spacey Bar', 'foo', raw=1) == 'bar') verify(cf.get('Commented Bar', 'foo', raw=1) == 'bar') verify('__name__' not in cf.options("Foo Bar"), '__name__ "option" should not be exposed by the API!') # Make sure the right things happen for remove_option(); # added to include check for SourceForge bug #123324: verify(cf.remove_option('Foo Bar', 'foo'), "remove_option() failed to report existance of option") verify(not cf.has_option('Foo Bar', 'foo'), "remove_option() failed to remove option") verify(not cf.remove_option('Foo Bar', 'foo'), "remove_option() failed to report non-existance of option" " that was removed") try: cf.remove_option('No Such Section', 'foo') except ConfigParser.NoSectionError: pass else: raise TestFailed( "remove_option() failed to report non-existance of option" " that never existed")
e16a278f026dcee7c478f3b96e025b141e4b6297 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/e16a278f026dcee7c478f3b96e025b141e4b6297/test_cfgparser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5337, 12, 4816, 4672, 1172, 315, 22218, 5337, 28088, 7070, 6080, 273, 25076, 18, 809, 2678, 1435, 272, 1594, 273, 15777, 18, 780, 4294, 12, 4816, 13, 6080, 18, 896, 7944, 12, 87, 1594, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5337, 12, 4816, 4672, 1172, 315, 22218, 5337, 28088, 7070, 6080, 273, 25076, 18, 809, 2678, 1435, 272, 1594, 273, 15777, 18, 780, 4294, 12, 4816, 13, 6080, 18, 896, 7944, 12, 87, 1594, ...
for i, t in enumerate(tokens):
for t in tokens:
def check_oneliners(tokens, lines, warnings): "Check for if, else, statements on the same line." for i, t in enumerate(tokens): if t.typ != Token.ident: continue if t.string == 'else': succ = tokens[i+1] if succ.typ == Token.punct and succ.string == '{': succ = tokens[i+2] if succ.line > t.line: continue if succ.typ == Token.ident and succ.string == 'if': continue w = 'Statement for `%s\' on the same line (col %d): %s' warnings.append((succ.line, w % (t.string, succ.col, lines[succ.line]))) continue if t.string in ('for', 'while', 'if'): # catch do-while if t.string == 'while': prec = tokens[i-1] if prec.typ == Token.punct and prec.string == '}': prec = tokens[prec.matching-1] if prec.typ == Token.ident and prec.string == 'do': continue succ = tokens[i+1] assert succ.typ == Token.punct and succ.string == '(' m = succ.matching succ = tokens[m+1] if succ.typ == Token.punct and succ.string == '{': succ = tokens[m+2] if succ.line > tokens[m].line: continue w = 'Statement for `%s\' on the same line (col %d): %s' warnings.append((succ.line, w % (t.string, succ.col, lines[succ.line]))) continue
ecf9bde6b618739f9ef7098da2a7ad267a2f3d5f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6171/ecf9bde6b618739f9ef7098da2a7ad267a2f3d5f/check-coding-style.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 265, 292, 267, 414, 12, 7860, 16, 2362, 16, 5599, 4672, 315, 1564, 364, 309, 16, 469, 16, 6317, 603, 326, 1967, 980, 1199, 364, 268, 316, 2430, 30, 309, 268, 18, 12846, 480,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 265, 292, 267, 414, 12, 7860, 16, 2362, 16, 5599, 4672, 315, 1564, 364, 309, 16, 469, 16, 6317, 603, 326, 1967, 980, 1199, 364, 268, 316, 2430, 30, 309, 268, 18, 12846, 480,...
if app_fprime: gfkp1 = apply(approx_fprime,(xk,f,epsilon)+args) func_calls = func_calls + len(x0) + 1 else: gfkp1 = apply(fprime,(xk,)+args) grad_calls = grad_calls + 1
gfkp1 = myfprime(xk)
def fmin_cg(f, x0, fprime=None, args=(), gtol=1e-5, norm=Inf, epsilon=_epsilon, maxiter=None, full_output=0, disp=1, retall=0): """Minimize a function with nonlinear conjugate gradient algorithm. Description: Optimize the function, f, whose gradient is given by fprime using the nonlinear conjugate gradient algorithm of Polak and Ribiere See Wright, and Nocedal 'Numerical Optimization', 1999, pg. 120-122. Inputs: f -- the Python function or method to be minimized. x0 -- the initial guess for the minimizer. fprime -- a function to compute the gradient of f. args -- extra arguments to f and fprime. gtol -- stop when norm of gradient is less than gtol norm -- order of vector norm to use epsilon -- if fprime is approximated use this value for the step size (can be scalar or vector) Outputs: (xopt, {fopt, func_calls, grad_calls, warnflag}, {allvecs}) xopt -- the minimizer of f. fopt -- the value of f(xopt). func_calls -- the number of function_calls. grad_calls -- the number of gradient calls. warnflag -- an integer warning flag: 1 : 'Maximum number of iterations exceeded.' 2 : 'Gradient and/or function calls not changing' allvecs -- if retall then this vector of the iterates is returned Additional Inputs: maxiter -- the maximum number of iterations. full_output -- if non-zero then return fopt, func_calls, grad_calls, and warnflag in addition to xopt. disp -- print convergence message if non-zero. retall -- return a list of results at each iteration if True """ app_fprime = 0 if fprime is None: app_fprime = 1 x0 = asarray(x0) if maxiter is None: maxiter = len(x0)*200 func_calls = 0 grad_calls = 0 k = 0 N = len(x0) xk = x0 old_fval = f(xk,*args) old_old_fval = old_fval + 5000 func_calls +=1 if app_fprime: gfk = apply(approx_fprime,(x0,f,epsilon)+args) myfprime = (approx_fprime,epsilon) func_calls = func_calls + len(x0) + 1 else: gfk = apply(fprime,(x0,)+args) myfprime = fprime grad_calls = grad_calls + 1 if retall: allvecs = [xk] sk = [2*gtol] warnflag = 0 pk = -gfk gnorm = vecnorm(gfk,ord=norm) while (gnorm > gtol) and (k < maxiter): deltak = Num.dot(gfk,gfk) alpha_k, fc, gc, old_fval, old_old_fval, gfkp1 = \ linesearch.line_search(f,myfprime,xk,pk,gfk,old_fval, old_old_fval,args=args,c2=0.4) if alpha_k is None: # line search failed -- use different one. func_calls += fc grad_calls += gc alpha_k, fc, gc, old_fval, old_old_fval, gfkp1 = \ line_search(f,myfprime,xk,pk,gfk, old_fval,old_old_fval,args=args) func_calls += fc grad_calls += gc xk = xk + alpha_k*pk if retall: allvecs.append(xk) if gfkp1 is None: if app_fprime: gfkp1 = apply(approx_fprime,(xk,f,epsilon)+args) func_calls = func_calls + len(x0) + 1 else: gfkp1 = apply(fprime,(xk,)+args) grad_calls = grad_calls + 1 yk = gfkp1 - gfk beta_k = pymax(0,Num.dot(yk,gfkp1)/deltak) pk = -gfkp1 + beta_k * pk gfk = gfkp1 gnorm = vecnorm(gfk,ord=norm) k = k + 1 if disp or full_output: fval = old_fval if warnflag == 2: if disp: print "Warning: Desired error not necessarily achieved due to precision loss" print " Current function value: %f" % fval print " Iterations: %d" % k print " Function evaluations: %d" % func_calls print " Gradient evaluations: %d" % grad_calls elif k >= maxiter: warnflag = 1 if disp: print "Warning: Maximum number of iterations has been exceeded" print " Current function value: %f" % fval print " Iterations: %d" % k print " Function evaluations: %d" % func_calls print " Gradient evaluations: %d" % grad_calls else: if disp: print "Optimization terminated successfully." print " Current function value: %f" % fval print " Iterations: %d" % k print " Function evaluations: %d" % func_calls print " Gradient evaluations: %d" % grad_calls if full_output: retlist = xk, fval, func_calls, grad_calls, warnflag if retall: retlist += (allvecs,) else: retlist = xk if retall: retlist = (xk, allvecs) return retlist
926e615eebcd9f2ca3373b1887f74b532b10bda4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/926e615eebcd9f2ca3373b1887f74b532b10bda4/optimize.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 284, 1154, 67, 26275, 12, 74, 16, 619, 20, 16, 284, 16382, 33, 7036, 16, 833, 33, 9334, 314, 3490, 33, 21, 73, 17, 25, 16, 4651, 33, 13149, 16, 12263, 33, 67, 13058, 10327, 16, 257...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 284, 1154, 67, 26275, 12, 74, 16, 619, 20, 16, 284, 16382, 33, 7036, 16, 833, 33, 9334, 314, 3490, 33, 21, 73, 17, 25, 16, 4651, 33, 13149, 16, 12263, 33, 67, 13058, 10327, 16, 257...
proxy_user=None, proxy_pass=None, host=DefaultHost, debug,
proxy_user=None, proxy_pass=None, host=DefaultHost, debug=0,
def __init__(self, aws_access_key_id=None, aws_secret_access_key=None, is_secure=True, port=None, proxy=None, proxy_port=None, proxy_user=None, proxy_pass=None, host=DefaultHost, debug, https_connection_factory=None, path='/'): AWSQueryConnection.__init__(self, aws_access_key_id, aws_secret_access_key, is_secure, port, proxy, proxy_port, proxy_user, proxy_pass, self.DefaultHost, debug, https_connection_factory, path)
f85adfa58199a0a311f4d97681b11bb0fc9b0555 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1098/f85adfa58199a0a311f4d97681b11bb0fc9b0555/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2287, 67, 3860, 67, 856, 67, 350, 33, 7036, 16, 2287, 67, 5875, 67, 3860, 67, 856, 33, 7036, 16, 353, 67, 8869, 33, 5510, 16, 1756, 33, 7036, 16, 288...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2287, 67, 3860, 67, 856, 67, 350, 33, 7036, 16, 2287, 67, 5875, 67, 3860, 67, 856, 33, 7036, 16, 353, 67, 8869, 33, 5510, 16, 1756, 33, 7036, 16, 288...
result = Event('privmsg', '', target, [ ''.join(query_str, ': ', geoinfo)])
result = Event('privmsg', '', target, [ ''.join((query_str, ': ', geoinfo))])
def handler(self, **args): query_str = args["text"].split()
5efc07c2229e5ae5aa2bc839068c9897d93f8857 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/10749/5efc07c2229e5ae5aa2bc839068c9897d93f8857/geoip.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1838, 12, 2890, 16, 2826, 1968, 4672, 843, 67, 701, 273, 833, 9614, 955, 6, 8009, 4939, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 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, 1838, 12, 2890, 16, 2826, 1968, 4672, 843, 67, 701, 273, 833, 9614, 955, 6, 8009, 4939, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
self.body.append( '\\docutilsrole%s{' % node.get('class'))
if node.get('class'): cls = node['class'] elif node.get('classes'): cls = node['classes'][0] else: cls = 'Unknown' self.body.append( '\\docutilsrole%s{' % cls)
def visit_inline(self, node): # titlereference self.body.append( '\\docutilsrole%s{' % node.get('class'))
722f146502076a08d63a6b145f379f4ef22cbfc9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1278/722f146502076a08d63a6b145f379f4ef22cbfc9/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3757, 67, 10047, 12, 2890, 16, 756, 4672, 468, 268, 305, 749, 73, 1134, 365, 18, 3432, 18, 6923, 12, 3718, 2434, 5471, 4615, 9, 87, 27828, 738, 756, 18, 588, 2668, 1106, 26112, 2, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3757, 67, 10047, 12, 2890, 16, 756, 4672, 468, 268, 305, 749, 73, 1134, 365, 18, 3432, 18, 6923, 12, 3718, 2434, 5471, 4615, 9, 87, 27828, 738, 756, 18, 588, 2668, 1106, 26112, 2, -1...
filename = sys.argv[0]
try: filename = sys.argv[0] except AttributeError: filename = '__main__'
def warn(message, category=None, stacklevel=1): """Issue a warning, or maybe ignore it or raise an exception.""" # Check if message is already a Warning object if isinstance(message, Warning): category = message.__class__ # Check category argument if category is None: category = UserWarning assert issubclass(category, Warning) # Get context information try: caller = sys._getframe(stacklevel) except ValueError: globals = sys.__dict__ lineno = 1 else: globals = caller.f_globals lineno = caller.f_lineno if '__name__' in globals: module = globals['__name__'] else: module = "<string>" filename = globals.get('__file__') if filename: fnl = filename.lower() if fnl.endswith(".pyc") or fnl.endswith(".pyo"): filename = filename[:-1] else: if module == "__main__": filename = sys.argv[0] if not filename: filename = module registry = globals.setdefault("__warningregistry__", {}) warn_explicit(message, category, filename, lineno, module, registry)
83d5de7c47a7901920469990b5ad9fa3c9835565 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/83d5de7c47a7901920469990b5ad9fa3c9835565/warnings.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1894, 12, 2150, 16, 3150, 33, 7036, 16, 26847, 33, 21, 4672, 3536, 12956, 279, 3436, 16, 578, 6944, 2305, 518, 578, 1002, 392, 1520, 12123, 468, 2073, 309, 883, 353, 1818, 279, 9728, 7...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1894, 12, 2150, 16, 3150, 33, 7036, 16, 26847, 33, 21, 4672, 3536, 12956, 279, 3436, 16, 578, 6944, 2305, 518, 578, 1002, 392, 1520, 12123, 468, 2073, 309, 883, 353, 1818, 279, 9728, 7...
self.run_boottool('--set-default=%s' % index)
self.run_boottool('--set-default=%s' % index)
def set_default(self, index): self.run_boottool('--set-default=%s' % index)
777c2c1dbed9a9df8ea6c03b2074c57b2ed7ebf7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12268/777c2c1dbed9a9df8ea6c03b2074c57b2ed7ebf7/boottool.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 1886, 12, 2890, 16, 770, 4672, 365, 18, 2681, 67, 7137, 6738, 2668, 413, 542, 17, 1886, 5095, 87, 11, 738, 770, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 444, 67, 1886, 12, 2890, 16, 770, 4672, 365, 18, 2681, 67, 7137, 6738, 2668, 413, 542, 17, 1886, 5095, 87, 11, 738, 770, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
__traceback_info__=oid
__traceback_info__ = (oid, p)
def __getitem__(self, oid, tt=type(()), ct=type(HelperClass)): cache=self._cache if cache.has_key(oid): return cache[oid]
cefe54e871aa7332bdb312bf50772e1786f2c1fb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/cefe54e871aa7332bdb312bf50772e1786f2c1fb/Connection.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 31571, 972, 12, 2890, 16, 7764, 16, 3574, 33, 723, 12, 1435, 3631, 5691, 33, 723, 12, 2276, 797, 3719, 30, 1247, 33, 2890, 6315, 2493, 309, 1247, 18, 5332, 67, 856, 12, 839, 46...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 31571, 972, 12, 2890, 16, 7764, 16, 3574, 33, 723, 12, 1435, 3631, 5691, 33, 723, 12, 2276, 797, 3719, 30, 1247, 33, 2890, 6315, 2493, 309, 1247, 18, 5332, 67, 856, 12, 839, 46...
self.explore.CollapseAndReset(self.root)
try: self.explore.CollapseAndReset(self.root) except: return
def updateExplore(self,uml=0): """Updates explore in sidebar.""" #get text try: text=self.source.GetText().split('\n') except: return #initialize if uml: self.umlClass = None previous = 0 classes = {} n = len(text) tryMode = 0 hierarchyIndex = 0 hierarchy = [(-1,self.root)] separators = [] self.encoding = None self.explore.CollapseAndReset(self.root) for line in range(len(text)): l = text[line].strip() first = l.split(' ')[0] sepa_hit = RE_SEPARATOR.match(l) sepb_hit = RE_SEPARATOR_HIGHLIGHT.match(l) encode_hit = False if line < 3: if line == 0 and isUtf8(l): self.encoding = "utf8" encode_hit = True else: enc = RE_ENCODING.search(l) if enc: self.encoding = str(enc.group(1)) encode_hit = True if first in ['class','def','import'] or encode_hit or (first == 'from' and 'import' in l): if 1 or l.find('(')!=-1 or l.find(':') !=-1 or first in ['from','import'] or encode_hit: #indentation-------------------------------------------- indentation = max(0,len(text[line])- len(text[line].lstrip())-tryMode*4) #situate in hierachy------------------------------------ hierarchyIndex = 0 while hierarchyIndex+1<len(hierarchy) and \ hierarchy[hierarchyIndex+1][0]<indentation: hierarchyIndex += 1 hierarchy=hierarchy[:hierarchyIndex+1] if uml and hierarchyIndex<=previous: umlAdd(classes,self.umlClass) self.umlClass = None #get definition----------------------------------------- if encode_hit: l = self.encoding else: l = l.split('#')[0].strip() i=1 if not(first in ['import','from'] or encode_hit): search = 1 rest = ' ' while search and l[-1] != ':' and i+line<n: #get the whole multi-line definition next = text[line+i].split('#')[0].strip() if next.find('class')==-1 and next.find('def')==-1 and next.find('import')==-1: rest += next i += 1 else: search = 0 if rest[-1] == ':':l+= rest #put in tree with color--------------------------------- l=l.split(':')[0].replace('class ','').replace('def ','').strip() if separators: self.appendSeparators(separators,hierarchy,hierarchyIndex,uml) separators = [] if l: item = self.explore.AppendItem(hierarchy[hierarchyIndex][1],l,data=line) intensity=max(50,255-indentation*20) if encode_hit: colour = wx.Colour(intensity-50,0,intensity-50) icon = iconExpand = 'encoding.png' elif first == 'class': if uml: umlAdd(classes,self.umlClass) self.umlClass = sm.uml.Class(name=l,data=line) previous = hierarchyIndex colour = wx.Colour(intensity,0,0) icon = 'class.png' iconExpand = 'class.png' elif first in ['import','from']: colour = wx.Colour(0,intensity-50,0) icon = iconExpand = 'import.png' else: if uml and self.umlClass: self.umlClass.append(l) colour = wx.Colour(0,0,intensity) icon = iconExpand = 'def.png' self.explore.SetItemBold(item,False) self.explore.SetItemTextColour(item,colour) self.explore.SetItemImage(item, self.parentPanel.iconsListIndex[icon], which=wx.TreeItemIcon_Normal) if first=='class': self.explore.SetItemImage(item, self.parentPanel.iconsListIndex[iconExpand], which = wx.TreeItemIcon_Expanded) hierarchy.append((indentation,item)) elif sepa_hit: #separator pos = sepa_hit.end() colours=l[pos:].split('#') if len(colours)==3: s = sm.rstrip(colours[0],'_') fore = '#'+colours[1][:6] back = '#'+colours[2][:6] else: s=sm.rstrip(l[pos:],'-') fore=wx.Colour(128,128,128) back=None if s.strip(): separators.append((s,line,fore,back)) elif sepb_hit: #highlighted separator (yellow) pos = sepb_hit.end() s = sm.rstrip(l[pos:],'-') if s.strip(): separators.append((s,line,wx.Colour(0,0,0),wx.Colour(255,255,0))) elif first=='try:': tryMode += 1 elif first[:6]=='except': tryMode = max(0,tryMode-1) elif first[:7]=='finally': tryMode = max(0,tryMode-1) self.appendSeparators(separators,hierarchy,hierarchyIndex,uml) if uml: umlAdd(classes,self.umlClass) #expand root of explore #self.explore.Expand(self.root) #if self.parentPanel.exploreVisible: ... self.explore.Update() return classes
e407c73a22bd6d7b52a3fa24b96c6b4c9b3aba62 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2464/e407c73a22bd6d7b52a3fa24b96c6b4c9b3aba62/Child.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 2966, 383, 266, 12, 2890, 16, 22192, 33, 20, 4672, 3536, 5121, 15233, 266, 316, 23364, 12123, 468, 588, 977, 775, 30, 977, 33, 2890, 18, 3168, 18, 967, 1528, 7675, 4939, 2668, 64...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 2966, 383, 266, 12, 2890, 16, 22192, 33, 20, 4672, 3536, 5121, 15233, 266, 316, 23364, 12123, 468, 588, 977, 775, 30, 977, 33, 2890, 18, 3168, 18, 967, 1528, 7675, 4939, 2668, 64...
cnf.write("\t\tAuthBasicAuthoritative off\n") cnf.write("\t\tAuthUserFile /dev/null\n") cnf.write("\t\tPythonAuthenHandler marajo.web.authen_handler\n") cnf.write("\t\tPythonOption SDBDomain %s\n" % boto.config.get("Trac", "sdb_auth_domain"))
cnf.write("\t\tAuthUserFile /etc/apache2/passwd/passwds\n")
def setup_vhost(self): domain = boto.config.get("Trac", "hostname").strip() if domain: cnf = open("/etc/apache2/sites-available/%s" % domain, "w") cnf.write("NameVirtualHost *:80\n") if boto.config.get("Trac", "SSLCertificateFile"): cnf.write("NameVirtualHost *:443\n\n") cnf.write("<VirtualHost *:80>\n") cnf.write("\tServerAdmin %s\n" % boto.config.get("Trac", "server_admin").strip()) cnf.write("\tServerName %s\n" % domain) cnf.write("\tRewriteEngine On\n") cnf.write("\tRewriteRule ^(.*)$ https://%s$1\n" % domain) cnf.write("</VirtualHost>\n\n")
61f5b1aa8bdeea32c31fe2612fc4eb229b3e65b4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1098/61f5b1aa8bdeea32c31fe2612fc4eb229b3e65b4/trac.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 67, 90, 2564, 12, 2890, 4672, 2461, 273, 17228, 18, 1425, 18, 588, 2932, 1609, 71, 3113, 315, 10358, 20387, 6406, 1435, 309, 2461, 30, 23118, 273, 1696, 2932, 19, 14175, 19, 19211,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 67, 90, 2564, 12, 2890, 4672, 2461, 273, 17228, 18, 1425, 18, 588, 2932, 1609, 71, 3113, 315, 10358, 20387, 6406, 1435, 309, 2461, 30, 23118, 273, 1696, 2932, 19, 14175, 19, 19211,...
\t--source where Boost sources came from (e.g. CVS, tarball, \t anonymous CVS) \t--run-type "incremental" or "full" (optional)
\t--source where Boost sources came from (e.g. "CVS", "tarball", \t "anonymous CVS"; "CVS" by default) \t--run-type "incremental" or "full" ("full" by default)
def usage(): print 'Usage: %s [options]' % os.path.basename( sys.argv[0] ) print '''
be3f88370211b230c8e140655147b4b71f821774 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7959/be3f88370211b230c8e140655147b4b71f821774/collect_and_upload_logs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4084, 13332, 1172, 296, 5357, 30, 738, 87, 306, 2116, 3864, 738, 1140, 18, 803, 18, 13909, 12, 2589, 18, 19485, 63, 20, 65, 262, 1172, 565, 9163, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4084, 13332, 1172, 296, 5357, 30, 738, 87, 306, 2116, 3864, 738, 1140, 18, 803, 18, 13909, 12, 2589, 18, 19485, 63, 20, 65, 262, 1172, 565, 9163, 2, -100, -100, -100, -100, -100, -100,...
verbose = 0
verbose = False elif opt == "-t": runtests = True
def main(count, profiler=None, verbose=1): n = 1 if verbose: print '##: %10s %10s %10s' % ('ZPT', 'TAL', 'DTML') while os.path.isfile(tal_fn % n) and os.path.isfile(dtml_fn % n): compare(n, count, profiler, verbose) n = n + 1
4f400e9d2cce6fc9aad503e1f6e6c0fa438cf2bc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9834/4f400e9d2cce6fc9aad503e1f6e6c0fa438cf2bc/markbench.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 1883, 16, 16583, 33, 7036, 16, 3988, 33, 21, 4672, 290, 273, 404, 309, 3988, 30, 1172, 296, 1189, 30, 738, 2163, 87, 738, 2163, 87, 738, 2163, 87, 11, 738, 7707, 62, 1856, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 1883, 16, 16583, 33, 7036, 16, 3988, 33, 21, 4672, 290, 273, 404, 309, 3988, 30, 1172, 296, 1189, 30, 738, 2163, 87, 738, 2163, 87, 738, 2163, 87, 11, 738, 7707, 62, 1856, ...