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.hboxlayout57.addWidget(self.undo_stack_memory_limit_label)
self.hboxlayout60.addWidget(self.undo_stack_memory_limit_label)
def setupUi(self, UserPrefsDialog): UserPrefsDialog.setObjectName("UserPrefsDialog") UserPrefsDialog.resize(QtCore.QSize(QtCore.QRect(0,0,609,642).size()).expandedTo(UserPrefsDialog.minimumSizeHint()))
30deb2219e016847d91b37e801c50b75fbd1c3cf /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11221/30deb2219e016847d91b37e801c50b75fbd1c3cf/UserPrefsDialog.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 13943, 12, 2890, 16, 2177, 1386, 2556, 6353, 4672, 2177, 1386, 2556, 6353, 18, 542, 16707, 2932, 1299, 1386, 2556, 6353, 7923, 2177, 1386, 2556, 6353, 18, 15169, 12, 23310, 4670, 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, 3875, 13943, 12, 2890, 16, 2177, 1386, 2556, 6353, 4672, 2177, 1386, 2556, 6353, 18, 542, 16707, 2932, 1299, 1386, 2556, 6353, 7923, 2177, 1386, 2556, 6353, 18, 15169, 12, 23310, 4670, 18,...
"""prune a pkgs structure to contain only the latest version of each package. the result is sorted.""" latest_rpms = [] for rpmblob_list in pkgs.values():
"""prune a pkgs structure to contain only the latest version of each package (includes multiarch results).""" latest_pkgs = {} for rpmblobs in pkgs.values():
def prune_pkgs(pkgs): """prune a pkgs structure to contain only the latest version of each package. the result is sorted.""" latest_rpms = [] for rpmblob_list in pkgs.values(): (major, minor) = sys.version_info[:2] if major >= 2 and minor >= 4: rpmblob_list.sort(rpmblob_cmp, reverse=True) else: rpmblob_list.sort(rpmblob_cmp) rpmblob_list.reverse() latest_rpms.append(rpmblob_list[0]) latest_rpms.sort(rpmblob_cmp) return latest_rpms
927e8c2c0aa11f1475dc1e55a080ff005957f3ba /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11867/927e8c2c0aa11f1475dc1e55a080ff005957f3ba/rpmlisting.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13293, 67, 25376, 12, 25376, 4672, 3536, 28545, 279, 16922, 3695, 358, 912, 1338, 326, 4891, 1177, 434, 1517, 2181, 261, 18499, 3309, 991, 1686, 13, 12123, 4891, 67, 25376, 273, 2618, 364,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13293, 67, 25376, 12, 25376, 4672, 3536, 28545, 279, 16922, 3695, 358, 912, 1338, 326, 4891, 1177, 434, 1517, 2181, 261, 18499, 3309, 991, 1686, 13, 12123, 4891, 67, 25376, 273, 2618, 364,...
zinfo.name = zinfo.filename zinfo.size = zinfo.file_size zinfo.mtime = calendar.timegm(zinfo.date_time) self.tarfile.addfile(zinfo, StringIO(bytes))
tinfo = TarInfo(zinfo.filename) tinfo.size = len(bytes) tinfo.mtime = calendar.timegm(zinfo.date_time) self.tarfile.addfile(tinfo, StringIO(bytes))
def writestr(self, zinfo, bytes): try: from cStringIO import StringIO except ImportError: from StringIO import StringIO import calendar zinfo.name = zinfo.filename zinfo.size = zinfo.file_size zinfo.mtime = calendar.timegm(zinfo.date_time) self.tarfile.addfile(zinfo, StringIO(bytes))
fdec39ea53fe908bbe5599feb2f7ce89a7e2d58d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12029/fdec39ea53fe908bbe5599feb2f7ce89a7e2d58d/tarfile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7262, 313, 12, 2890, 16, 998, 1376, 16, 1731, 4672, 775, 30, 628, 276, 780, 4294, 1930, 15777, 1335, 11308, 30, 628, 15777, 1930, 15777, 1930, 5686, 998, 1376, 18, 529, 273, 998, 1376, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7262, 313, 12, 2890, 16, 998, 1376, 16, 1731, 4672, 775, 30, 628, 276, 780, 4294, 1930, 15777, 1335, 11308, 30, 628, 15777, 1930, 15777, 1930, 5686, 998, 1376, 18, 529, 273, 998, 1376, ...
if logdir is not None: if not os.path.isdir(logdir): sys.stderr.write( "trace: WARNING, --logdir directory %s is not available\n" % `logdir`) sys.argv = prog_argv progname = prog_argv[0] if eval(sys.version[:3])>1.3: sys.path[0] = os.path.split(progname)[0]
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")
def main(argv = None): import getopt if argv is None: argv = sys.argv try: opts, prog_argv = getopt.getopt(argv[1:], "tcrRf:d:msC:", ["help", "version", "trace", "count", "report", "no-report", "file=", "logdir=", "missing", "ignore-module=", "ignore-dir=", "coverdir="]) except getopt.error, msg: print >> sys.stderr, "%s: %s" % (sys.argv[0], msg) print >> sys.stderr, "Try `%s --help' for more information" \ % sys.argv[0] sys.exit(1) trace = 0 count = 0 report = 0 no_report = 0 counts_file = None logdir = "." missing = 0 ignore_modules = [] ignore_dirs = [] coverdir = None summary = 0 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 == "-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 == "-d" or opt == "--logdir": logdir = 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 string.split(val, os.pathsep): s = os.path.expandvars(s) # should I also call expanduser? (after all, could use $HOME) s = string.replace(s, "$prefix", os.path.join(sys.prefix, "lib", "python" + sys.version[:3])) s = string.replace(s, "$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 len(prog_argv) == 0: _err_exit("missing name of file to run") if count + trace + report > 1: _err_exit("can only specify one of --trace, --count or --report") if count + trace + report == 0: _err_exit("must specify one of --trace, --count or --report") if report and counts_file is None: _err_exit("--report requires a --file") if report and no_report: _err_exit("cannot specify both --report and --no-report") if logdir is not None: # warn if the directory doesn't exist, but keep on going # (is this the correct behaviour?) if not os.path.isdir(logdir): sys.stderr.write( "trace: WARNING, --logdir directory %s is not available\n" % `logdir`) sys.argv = prog_argv progname = prog_argv[0] if eval(sys.version[:3])>1.3: sys.path[0] = os.path.split(progname)[0] # ??? # everything is ready ignore = Ignore(ignore_modules, ignore_dirs) if trace: t = Trace(ignore) try: run(t.trace, 'execfile(' + `progname` + ')') except IOError, err: _err_exit("Cannot run file %s because: %s" % \ (`sys.argv[0]`, err)) elif count: t = Coverage(ignore) try: run(t.trace, 'execfile(' + `progname` + ')') except IOError, err: _err_exit("Cannot run file %s because: %s" % \ (`sys.argv[0]`, err)) except SystemExit: pass results = t.results() # Add another lookup from the program's file name to its import name # This give the right results, but I'm not sure why ... results.modules[progname] = os.path.splitext(progname)[0] if counts_file: # add in archived data, if available try: old_counts, old_modules = marshal.load(open(counts_file, 'rb')) except IOError: pass else: results.update(CoverageResults(old_counts, old_modules)) if not no_report: create_results_log(results, logdir, missing, summary=summary, coverdir=coverdir) if counts_file: try: marshal.dump( (results.counts, results.modules), open(counts_file, 'wb')) except IOError, err: _err_exit("Cannot save counts file %s because: %s" % \ (`counts_file`, err)) elif report: old_counts, old_modules = marshal.load(open(counts_file, 'rb')) results = CoverageResults(old_counts, old_modules) create_results_log(results, logdir, missing, summary=summary, coverdir=coverdir) else: assert 0, "Should never get here"
a30eacf45815c14b480972c5097677fac83ed4c0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/a30eacf45815c14b480972c5097677fac83ed4c0/trace.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 19485, 273, 599, 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, 273, 599, 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...
"tags" : [ libVersion ],
"tags" : [ libName, libVersion ],
def _getData(self): libName = self.parent.parent.name libVersion = self.parent.name demoDict = { "name" : self.name + ".html", "nr": self.name.capitalize(), "title": libName + " " + libVersion + " " + self.name, "tags" : [ libVersion ], "manifest" : self.manifest }
6b5b6f4f18e1c99749d3b87c166a0081318de98f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5718/6b5b6f4f18e1c99749d3b87c166a0081318de98f/repository.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 751, 12, 2890, 4672, 2561, 461, 273, 365, 18, 2938, 18, 2938, 18, 529, 2561, 1444, 273, 365, 18, 2938, 18, 529, 21477, 5014, 273, 288, 315, 529, 6, 294, 365, 18, 529, 397, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 751, 12, 2890, 4672, 2561, 461, 273, 365, 18, 2938, 18, 2938, 18, 529, 2561, 1444, 273, 365, 18, 2938, 18, 529, 21477, 5014, 273, 288, 315, 529, 6, 294, 365, 18, 529, 397, ...
Chebyshev([ 0., 1., 2., 3.], [-1., 1.]) >>> p = P.Polynomial(P.cheb2poly(c.coef))
Legendre([ 0., 1., 2., 3.], [-1., 1.]) >>> p = c.convert(kind=P.Polynomial)
def leg2poly(cs) : """ Convert a Legendre series to a polynomial. Convert an array representing the coefficients of a Legendre series, ordered from lowest degree to highest, to an array of the coefficients of the equivalent polynomial (relative to the "standard" basis) ordered from lowest to highest degree. Parameters ---------- cs : array_like 1-d array containing the Legendre series coefficients, ordered from lowest order term to highest. Returns ------- pol : ndarray 1-d array containing the coefficients of the equivalent polynomial (relative to the "standard" basis) ordered from lowest order term to highest. See Also -------- poly2leg Notes ----- The easy way to do conversions between polynomial basis sets is to use the convert method of a class instance. Examples -------- >>> from numpy import polynomial as P >>> c = P.Chebyshev(np.arange(4)) >>> c Chebyshev([ 0., 1., 2., 3.], [-1., 1.]) >>> p = P.Polynomial(P.cheb2poly(c.coef)) >>> p Polynomial([ -2., -8., 4., 12.], [-1., 1.]) """ from polynomial import polyadd, polysub, polymulx [cs] = pu.as_series([cs]) n = len(cs) if n < 3: return cs else: c0 = cs[-2] c1 = cs[-1] # i is the current degree of c1 for i in range(n - 1, 1, -1) : tmp = c0 c0 = polysub(cs[i - 2], (c1*(i - 1))/i) c1 = polyadd(tmp, (polymulx(c1)*(2*i - 1))/i) return polyadd(c0, polymulx(c1))
45020fb87b0558142d0f3ca873839663269cb2fc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14925/45020fb87b0558142d0f3ca873839663269cb2fc/legendre.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4553, 22, 16353, 12, 2143, 13, 294, 3536, 4037, 279, 17167, 409, 266, 4166, 358, 279, 16991, 18, 225, 4037, 392, 526, 5123, 326, 14229, 434, 279, 17167, 409, 266, 4166, 16, 5901, 628, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4553, 22, 16353, 12, 2143, 13, 294, 3536, 4037, 279, 17167, 409, 266, 4166, 358, 279, 16991, 18, 225, 4037, 392, 526, 5123, 326, 14229, 434, 279, 17167, 409, 266, 4166, 16, 5901, 628, ...
comments = manager.filter(object_pk__exact=product.id,
comments = manager.filter(object_pk__exact=str(product.id),
def get_product_rating(product, site=None): """Get the average product rating""" if site is None: site = Site.objects.get_current() site = site.id manager = Comment.objects comments = manager.filter(object_pk__exact=product.id, content_type__app_label__exact='product', content_type__model__exact='product', site__id__exact=site, is_public__exact=True) ratings = [] for comment in comments: if hasattr(comment,'productrating'): rating = comment.productrating.rating if rating > 0: ratings.append(rating) log.debug("Ratings: %s", ratings) if ratings: return average(ratings) else: return None
f00111be7be00bb623e2a9e400094d1cd152167f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/171/f00111be7be00bb623e2a9e400094d1cd152167f/utils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 5896, 67, 17326, 12, 5896, 16, 2834, 33, 7036, 4672, 3536, 967, 326, 8164, 3017, 13953, 8395, 309, 2834, 353, 599, 30, 2834, 273, 9063, 18, 6911, 18, 588, 67, 2972, 1435, 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, 336, 67, 5896, 67, 17326, 12, 5896, 16, 2834, 33, 7036, 4672, 3536, 967, 326, 8164, 3017, 13953, 8395, 309, 2834, 353, 599, 30, 2834, 273, 9063, 18, 6911, 18, 588, 67, 2972, 1435, 225,...
abstract_en = abstract_en[:int(max_char)]
abstract_en = abstract_en[:int(max_chars)]
def format(bfo, prefix_en, prefix_fr, suffix_en, suffix_fr, limit, max_chars, extension_en="[...] ",extension_fr="[...] ", contextual="no", highlight='no', print_lang='en,fr'): """ Prints the abstract of a record in HTML. By default prints English and French versions. Printed languages can be chosen with the 'print_lang' parameter. @param prefix_en a prefix for english abstract (printed only if english abstract exists) @param prefix_fr a prefix for french abstract (printed only if french abstract exists) @param limit the maximum number of sentences of the abstract to display (for each language) @param max_chars the maximum number of chars of the abstract to display (for each language) @param extension_en a text printed after english abstracts longer than parameter 'limit' @param extension_fr a text printed after french abstracts longer than parameter 'limit' @param suffix_en a suffix for english abstract(printed only if english abstract exists) @param suffix_fr a suffix for french abstract(printed only if french abstract exists) @parmm contextual if 'yes' prints sentences the most relative to user search keyword (if limit < abstract) @param highlight if 'yes' highlights words from user search keyword @param print_lang the comma-separated list of languages to print. Now restricted to 'en' and 'fr' """ out = '' languages = print_lang.split(',') abstract_en = bfo.fields('520__a', escape=3) abstract_en.extend(bfo.fields('520__b', escape=3)) #abstract_en = [cgi.escape(val) for val in abstract_en] abstract_en = "<br/>".join(abstract_en) abstract_fr = bfo.fields('590__a', escape=3) abstract_fr.extend(bfo.fields('590__b', escape=3)) #abstract_fr = [cgi.escape(val) for val in abstract_fr] abstract_fr = "<br/>".join(abstract_fr) if contextual == 'yes' and limit != "" and \ limit.isdigit() and int(limit) > 0: context_en = bibformat_utils.get_contextual_content(abstract_en, bfo.search_pattern, max_lines=int(limit)) #FIXME add something like [...] before and after #contextual sentences when not at beginning/end of abstract #if not abstract_en.strip().startswith(context_en[0].strip()): # out += '[...]' abstract_en = "<br/>".join(context_en) context_fr = bibformat_utils.get_contextual_content(abstract_fr, bfo.search_pattern, max_lines=int(limit)) abstract_fr = "<br/>".join(context_fr) if len(abstract_en) > 0 and 'en' in languages: out += prefix_en print_extension = False if max_char != "" and max_char.isdigit() and \ int(max_char) < len(abstract_en): print_extension = True abstract_en = abstract_en[:int(max_char)] if limit != "" and limit.isdigit(): s_abstract = abstract_en.split(".") if int(limit) < len(s_abstract): print_extension = True s_abstract = s_abstract[:int(limit)] #for sentence in s_abstract: # out += sentence + "." out = '.'.join(s_abstract) # Add final dot if needed if abstract_en.endswith('.'): out += '.' if print_extension: out += " " + extension_en else: out += abstract_en out += suffix_en if len(abstract_fr) > 0 and 'fr' in languages: out += prefix_fr print_extension = False if max_char != "" and max_char.isdigit() and \ int(max_char) < len(abstract_fr): print_extension = True abstract_fr = abstract_fr[:int(max_char)] if limit != "" and limit.isdigit(): s_abstract = abstract_fr.split(".") if int(limit) < len(s_abstract): print_extension = True s_abstract = s_abstract[:int(limit)] #for sentence in s_abstract: # out += sentence + "." out = '.'.join(s_abstract) # Add final dot if needed if abstract_fr.endswith('.'): out += '.' if print_extension: out += " "+extension_fr else: out += abstract_fr out += suffix_fr if highlight == 'yes': out = bibformat_utils.highlight(out, bfo.search_pattern) return out
11026d93ba6cb8ecf3245185b16e78e0f67d5ca1 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2763/11026d93ba6cb8ecf3245185b16e78e0f67d5ca1/bfe_abstract.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 740, 12, 70, 617, 16, 1633, 67, 275, 16, 1633, 67, 4840, 16, 3758, 67, 275, 16, 3758, 67, 4840, 16, 1800, 16, 943, 67, 7549, 16, 2710, 67, 275, 1546, 63, 2777, 65, 3104, 6447, 67, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 740, 12, 70, 617, 16, 1633, 67, 275, 16, 1633, 67, 4840, 16, 3758, 67, 275, 16, 3758, 67, 4840, 16, 1800, 16, 943, 67, 7549, 16, 2710, 67, 275, 1546, 63, 2777, 65, 3104, 6447, 67, ...
p3 = plot(list31,list32,linestyle='None', marker='s',\
p3 = pylab.plot(list31,list32,linestyle='None', marker='s',\
def makeScatteredPlot(chan,opts,distribution,list11=None,list12=None,list21=None,list22=None,list31=None,list32=None,figNumber=None): p1 = None p2 = None p3 = None parameter = distribution.split('-')[0] figure(figNumber) ax = subplot(111) ax.set_xscale('log') ax.set_yscale('log') if list11 and list12: p1 = plot(list11,list12,linestyle='None', marker='o',\ markerfacecolor='k', markeredgecolor='k',\ markersize=4, markeredgewidth=0) if list21 and list22: p2 = plot(list21,list22,linestyle='None', marker='v',\ markerfacecolor='r', markeredgecolor='r',\ markersize=4, markeredgewidth=0) if list31 and list32: p3 = plot(list31,list32,linestyle='None', marker='s',\ markerfacecolor='r', markeredgecolor='r',\ markersize=8, markeredgewidth=0) grid() xlabel('Z in ' + chan,size='x-large') ylabel('Z in ' + opts.ref_channel,size='x-large') title('Scattered plot of significance for channel: ' + chan) if p1 and p2 and p3: legend((p1,p2,p3),('background','foreground','candidate'),loc = 'upper right') lim = max(max(list11),max(list12),max(list21),max(list22),max(list31),max(list32)) if p1 and p2 and not p3: legend((p1,p2),('background','foreground'),loc = 'upper right') lim = max(max(list11),max(list12),max(list21),max(list22)) if p1 and not p2 and p3: legend((p1,p3),('background','candidate'),loc = 'upper right') lim = max(max(list11),max(list12),max(list31),max(list32)) if p1 and not p2 and not p3:
fd13c4566cb6da062a6e5ba73e68bd260af90c85 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5758/fd13c4566cb6da062a6e5ba73e68bd260af90c85/analyseQscan.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 1541, 9293, 329, 11532, 12, 7472, 16, 4952, 16, 16279, 16, 1098, 2499, 33, 7036, 16, 1098, 2138, 33, 7036, 16, 1098, 5340, 33, 7036, 16, 1098, 3787, 33, 7036, 16, 1098, 6938, 33,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 1541, 9293, 329, 11532, 12, 7472, 16, 4952, 16, 16279, 16, 1098, 2499, 33, 7036, 16, 1098, 2138, 33, 7036, 16, 1098, 5340, 33, 7036, 16, 1098, 3787, 33, 7036, 16, 1098, 6938, 33,...
'return_checking_func' : allow_return_none},
'return_checking_func' : allow_return_none},
def allow_args_emulated_file_writelines(fileobj, lines): _require_emulated_file(fileobj) _require_list_of_strings(lines)
3c551ef3827ddde6b2f4571bc3357a59857633a1 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7995/3c551ef3827ddde6b2f4571bc3357a59857633a1/namespace.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1699, 67, 1968, 67, 351, 11799, 67, 768, 67, 5363, 14567, 12, 768, 2603, 16, 2362, 4672, 389, 6528, 67, 351, 11799, 67, 768, 12, 768, 2603, 13, 389, 6528, 67, 1098, 67, 792, 67, 1021...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1699, 67, 1968, 67, 351, 11799, 67, 768, 67, 5363, 14567, 12, 768, 2603, 16, 2362, 4672, 389, 6528, 67, 351, 11799, 67, 768, 12, 768, 2603, 13, 389, 6528, 67, 1098, 67, 792, 67, 1021...
def multivariate_normal(mean, cov, shape=[]): """multivariate_normal(mean, cov) or multivariate_normal(mean, cov, [m, n, ...]) returns an array containing multivariate normally distributed random numbers with specified mean and covariance.
def random_integers(low, high=None, size=None): """Return random integers x such that low <= x <= high. random_integers(low, high=None, size=None) -> random values. If high is None, then 1 <= x <= low. """ if high is None: high = low low = 1 return randint(low, high+1, size)
def multivariate_normal(mean, cov, shape=[]): """multivariate_normal(mean, cov) or multivariate_normal(mean, cov, [m, n, ...]) returns an array containing multivariate normally distributed random numbers with specified mean and covariance. mean must be a 1 dimensional array. cov must be a square two dimensional array with the same number of rows and columns as mean has elements. The first form returns a single 1-D array containing a multivariate normal. The second form returns an array of shape (m, n, ..., cov.shape[0]). In this case, output[i,j,...,:] is a 1-D array containing a multivariate normal.""" # Check preconditions on arguments mean = Numeric.array(mean) cov = Numeric.array(cov) if len(mean.shape) != 1: raise ArgumentError, "mean must be 1 dimensional." if (len(cov.shape) != 2) or (cov.shape[0] != cov.shape[1]): raise ArgumentError, "cov must be 2 dimensional and square." if mean.shape[0] != cov.shape[0]: raise ArgumentError, "mean and cov must have same length." # Compute shape of output if isinstance(shape, int): shape = [shape] final_shape = list(shape[:]) final_shape.append(mean.shape[0]) # Create a matrix of independent standard normally distributed random # numbers. The matrix has rows with the same length as mean and as # many rows are necessary to form a matrix of shape final_shape. x = standard_normal(Numeric.multiply.reduce(final_shape)) x.shape = (Numeric.multiply.reduce(final_shape[0:len(final_shape)-1]), mean.shape[0]) # Transform matrix of standard normals into matrix where each row # contains multivariate normals with the desired covariance. # Compute A such that matrixmultiply(transpose(A),A) == cov. # Then the matrix products of the rows of x and A has the desired # covariance. Note that sqrt(s)*v where (u,s,v) is the singular value # decomposition of cov is such an A. (u,s,v) = LinearAlgebra.singular_value_decomposition(cov) x = Numeric.matrixmultiply(x*Numeric.sqrt(s),v) # The rows of x now have the correct covariance but mean 0. Add # mean to each row. Then each row will have mean mean. Numeric.add(mean,x,x) x.shape = tuple(final_shape) return x
9bb983356b5dc2f19a389befc72da89fafe4fef8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14925/9bb983356b5dc2f19a389befc72da89fafe4fef8/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2744, 67, 14970, 414, 12, 821, 16, 3551, 33, 7036, 16, 963, 33, 7036, 4672, 3536, 990, 2744, 12321, 619, 4123, 716, 4587, 1648, 619, 1648, 3551, 18, 225, 2744, 67, 14970, 414, 12, 821,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2744, 67, 14970, 414, 12, 821, 16, 3551, 33, 7036, 16, 963, 33, 7036, 4672, 3536, 990, 2744, 12321, 619, 4123, 716, 4587, 1648, 619, 1648, 3551, 18, 225, 2744, 67, 14970, 414, 12, 821,...
d.addCallbacks(lambda x : True, client.onError, errbackArgs = (func, args, 0))
d.addCallbacks(lambda x: True, client.onError, errbackArgs=(func, args, 0))
def _getmacCB(result): if result and type(result) == dict : client = self._getXMLRPCClient() func = 'imaging.injectInventory' args = (result['uuid'], Inventory) d = client.callRemote(func, *args) d.addCallbacks(lambda x : True, client.onError, errbackArgs = (func, args, 0)) return d self.logger.warn('Imaging: Failed resolving UUID for client %s : %s' % (MACAddress, result)) return False
433412e00fa04ae64b63408fab93248fec79b319 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5988/433412e00fa04ae64b63408fab93248fec79b319/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 5821, 8876, 12, 2088, 4672, 309, 563, 471, 618, 12, 2088, 13, 422, 2065, 294, 1004, 273, 365, 6315, 588, 4201, 8087, 1227, 1435, 1326, 273, 296, 381, 5755, 18, 22170, 15059, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 5821, 8876, 12, 2088, 4672, 309, 563, 471, 618, 12, 2088, 13, 422, 2065, 294, 1004, 273, 365, 6315, 588, 4201, 8087, 1227, 1435, 1326, 273, 296, 381, 5755, 18, 22170, 15059, ...
a = emp.product_id.product_tmpl_id.property_account_expense.id
a = emp.product_id.product_tmpl_id.property_account_expense.id
def _getGeneralAccount(self, cr, uid, context=None): emp_obj = self.pool.get('hr.employee') if context is None: context = {} emp_id = emp_obj.search(cr, uid, [('user_id', '=', context.get('user_id', uid))], context=context) if emp_id: emp = emp_obj.browse(cr, uid, emp_id[0], context=context) if bool(emp.product_id): a = emp.product_id.product_tmpl_id.property_account_expense.id if not a: a = emp.product_id.categ_id.property_account_expense_categ.id if a: return a return False
64a2c35fac8d1acdf2c7b30c7413175f33210211 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/64a2c35fac8d1acdf2c7b30c7413175f33210211/hr_timesheet.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 12580, 3032, 12, 2890, 16, 4422, 16, 4555, 16, 819, 33, 7036, 4672, 801, 84, 67, 2603, 273, 365, 18, 6011, 18, 588, 2668, 7256, 18, 351, 2817, 1340, 6134, 309, 819, 353, 59...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 12580, 3032, 12, 2890, 16, 4422, 16, 4555, 16, 819, 33, 7036, 4672, 801, 84, 67, 2603, 273, 365, 18, 6011, 18, 588, 2668, 7256, 18, 351, 2817, 1340, 6134, 309, 819, 353, 59...
elif type == INDENT and self.blkopenline:
elif typ == INDENT and self.blkopenline:
def run(self): OPENERS=('class', 'def', 'for', 'if', 'try', 'while') INDENT=tokenize.INDENT NAME=tokenize.NAME save_tabsize = tokenize.tabsize tokenize.tabsize = self.tabwidth try: try: for (typ, token, start, end, line) in token_generator(self.readline): if typ == NAME and token in OPENERS: self.blkopenline = line elif type == INDENT and self.blkopenline: self.indentedline = line break
856c92d2e0450747fad73ef9889147a552571e40 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/992/856c92d2e0450747fad73ef9889147a552571e40/AutoIndent.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 7247, 8196, 55, 33, 2668, 1106, 2187, 296, 536, 2187, 296, 1884, 2187, 296, 430, 2187, 296, 698, 2187, 296, 17523, 6134, 30009, 33, 2316, 554, 18, 2356, 2222, 6048,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 7247, 8196, 55, 33, 2668, 1106, 2187, 296, 536, 2187, 296, 1884, 2187, 296, 430, 2187, 296, 698, 2187, 296, 17523, 6134, 30009, 33, 2316, 554, 18, 2356, 2222, 6048,...
"""execp(file, args)
"""execvp(file, args)
def execvp(file, args): """execp(file, args) Execute the executable file (which is searched for along $PATH) with argument list args, replacing the current process. args may be a list or tuple of strings. """ _execvpe(file, args)
0fc07d37d59f169849607ccc7f06f661606f1517 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3187/0fc07d37d59f169849607ccc7f06f661606f1517/os.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1196, 20106, 12, 768, 16, 833, 4672, 3536, 4177, 20106, 12, 768, 16, 833, 13, 225, 7903, 326, 9070, 585, 261, 12784, 353, 19242, 364, 7563, 271, 4211, 13, 598, 1237, 666, 833, 16, 1399...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1196, 20106, 12, 768, 16, 833, 4672, 3536, 4177, 20106, 12, 768, 16, 833, 13, 225, 7903, 326, 9070, 585, 261, 12784, 353, 19242, 364, 7563, 271, 4211, 13, 598, 1237, 666, 833, 16, 1399...
(len(ial.nodes), ial.required_nodes))
(ial.name, len(ial.nodes), ial.required_nodes))
def _RunAllocator(self): """Run the allocator based on input opcode.
207a6c745d306ee152632e678e9029885f0f632d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7542/207a6c745d306ee152632e678e9029885f0f632d/cmdlib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1997, 21156, 12, 2890, 4672, 3536, 1997, 326, 26673, 2511, 603, 810, 11396, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 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, 389, 1997, 21156, 12, 2890, 4672, 3536, 1997, 326, 26673, 2511, 603, 810, 11396, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
shutil.copy(source, destination)
shutil.copy(source, dest) return source, dest
def _copy_file(self, source, destination): if not os.path.exists(source): raise DataError("Source file '%s' does not exist" % source) if not os.path.isfile(source): raise DataError("Source file '%s' is not a regular file" % source) if not os.path.exists(destination): if destination.endswith(os.sep): parent = destination else: parent = os.path.dirname(os.path.normpath(destination)) if not os.path.exists(parent): os.makedirs(parent) shutil.copy(source, destination)
8394d54a14ff248630063a73df253438178dff53 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7408/8394d54a14ff248630063a73df253438178dff53/OperatingSystem.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3530, 67, 768, 12, 2890, 16, 1084, 16, 2929, 4672, 309, 486, 1140, 18, 803, 18, 1808, 12, 3168, 4672, 1002, 1910, 668, 2932, 1830, 585, 1995, 87, 11, 1552, 486, 1005, 6, 738, 10...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3530, 67, 768, 12, 2890, 16, 1084, 16, 2929, 4672, 309, 486, 1140, 18, 803, 18, 1808, 12, 3168, 4672, 1002, 1910, 668, 2932, 1830, 585, 1995, 87, 11, 1552, 486, 1005, 6, 738, 10...
b"da39a3ee5e6b4b0d3255bfef95601890afd80709")
"da39a3ee5e6b4b0d3255bfef95601890afd80709")
def test_case_sha1_0(self): self.check('sha1', b"", b"da39a3ee5e6b4b0d3255bfef95601890afd80709")
3bff6a60b7f9604c9dd9da05f2b634d2ca62ece9 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3187/3bff6a60b7f9604c9dd9da05f2b634d2ca62ece9/test_hashlib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 3593, 67, 7819, 21, 67, 20, 12, 2890, 4672, 365, 18, 1893, 2668, 7819, 21, 2187, 324, 6, 3113, 324, 6, 2414, 5520, 69, 23, 1340, 25, 73, 26, 70, 24, 70, 20, 72, 1578, 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, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 3593, 67, 7819, 21, 67, 20, 12, 2890, 4672, 365, 18, 1893, 2668, 7819, 21, 2187, 324, 6, 3113, 324, 6, 2414, 5520, 69, 23, 1340, 25, 73, 26, 70, 24, 70, 20, 72, 1578, 2...
"""
r"""
def __iter__(self): """ EXAMPLES:: sage: from sage.combinat.permutation import PatternAvoider sage: p = PatternAvoider(4, [[1,3,2]]) sage: len(list(p)) 14 """ #Initialize the stack of generators with the initial data. #The generator in stack[i] is a generator for the i^th level #of the search tree. stack = [] stack.append(self._rec(self._initial_data, self._initial_state))
0c5cb94bdc0dba9150cb164c00100196aa13fa7e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/0c5cb94bdc0dba9150cb164c00100196aa13fa7e/backtrack.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2165, 972, 12, 2890, 4672, 436, 8395, 5675, 8900, 11386, 2866, 225, 272, 410, 30, 628, 272, 410, 18, 832, 4757, 270, 18, 12160, 9245, 1930, 6830, 3769, 839, 264, 272, 410, 30, 29...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2165, 972, 12, 2890, 4672, 436, 8395, 5675, 8900, 11386, 2866, 225, 272, 410, 30, 628, 272, 410, 18, 832, 4757, 270, 18, 12160, 9245, 1930, 6830, 3769, 839, 264, 272, 410, 30, 29...
if line == '*** EOOH ***' + os.linesep or line == '':
if line == '*** EOOH ***' + os.linesep or not line:
def get_message(self, key): """Return a Message representation or raise a KeyError.""" start, stop = self._lookup(key) self._file.seek(start) self._file.readline() # Skip '1,' line specifying labels. original_headers = StringIO.StringIO() while True: line = self._file.readline() if line == '*** EOOH ***' + os.linesep or line == '': break original_headers.write(line.replace(os.linesep, '\n')) visible_headers = StringIO.StringIO() while True: line = self._file.readline() if line == os.linesep or line == '': break visible_headers.write(line.replace(os.linesep, '\n')) body = self._file.read(stop - self._file.tell()).replace(os.linesep, '\n') msg = BabylMessage(original_headers.getvalue() + body) msg.set_visible(visible_headers.getvalue()) if key in self._labels: msg.set_labels(self._labels[key]) return msg
7cad4f3d02861d143c0d5d71a93eab81972588e4 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8546/7cad4f3d02861d143c0d5d71a93eab81972588e4/mailbox.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 2150, 12, 2890, 16, 498, 4672, 3536, 990, 279, 2350, 4335, 578, 1002, 279, 4999, 12123, 787, 16, 2132, 273, 365, 6315, 8664, 12, 856, 13, 365, 6315, 768, 18, 16508, 12, 1937, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2150, 12, 2890, 16, 498, 4672, 3536, 990, 279, 2350, 4335, 578, 1002, 279, 4999, 12123, 787, 16, 2132, 273, 365, 6315, 8664, 12, 856, 13, 365, 6315, 768, 18, 16508, 12, 1937, ...
s = "" for t in filemode_table: while True: if mode & t[0] == t[0]: s += t[1] elif len(t) > 2: t = t[2:] continue else: s += "-" break return s
perm = [] for table in filemode_table: for bit, char in table: if mode & bit == bit: perm.append(char) break else: perm.append("-") return "".join(perm)
def filemode(mode): """Convert a file's mode to a string of the form -rwxrwxrwx. Used by TarFile.list() """ s = "" for t in filemode_table: while True: if mode & t[0] == t[0]: s += t[1] elif len(t) > 2: t = t[2:] continue else: s += "-" break return s
a6ce4e3452792792affb00b2fe8d99b4346f8f6f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/a6ce4e3452792792affb00b2fe8d99b4346f8f6f/tarfile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 585, 3188, 12, 3188, 4672, 3536, 2723, 279, 585, 1807, 1965, 358, 279, 533, 434, 326, 646, 300, 21878, 92, 21878, 92, 21878, 92, 18, 10286, 635, 20334, 812, 18, 1098, 1435, 3536, 4641, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 585, 3188, 12, 3188, 4672, 3536, 2723, 279, 585, 1807, 1965, 358, 279, 533, 434, 326, 646, 300, 21878, 92, 21878, 92, 21878, 92, 18, 10286, 635, 20334, 812, 18, 1098, 1435, 3536, 4641, ...
self.add_link('alternate', '?format=diff', 'Unified Diff',
self.add_link(req, 'alternate', '?format=diff', 'Unified Diff',
def render(self, req): self.perm.assert_permission (perm.CHANGESET_VIEW)
5304b982a6c96671fea398b5c0665537d7d0f9ec /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/5304b982a6c96671fea398b5c0665537d7d0f9ec/Changeset.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 12, 2890, 16, 1111, 4672, 365, 18, 12160, 18, 11231, 67, 9827, 261, 12160, 18, 14473, 4043, 67, 12145, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 12, 2890, 16, 1111, 4672, 365, 18, 12160, 18, 11231, 67, 9827, 261, 12160, 18, 14473, 4043, 67, 12145, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
msg = '%sIncoming %s connection from %s:%s' % (self.prefix, local_uri.scheme.upper(), transport.getPeer().host, transport.getPeer().port) self._write(msg)
msg = 'Incoming %s connection from %s:%s' % (local_uri.scheme.upper(), transport.getPeer().host, transport.getPeer().port) self.write(msg)
def report_accepted(self, transport, local_uri): msg = '%sIncoming %s connection from %s:%s' % (self.prefix, local_uri.scheme.upper(), transport.getPeer().host, transport.getPeer().port) self._write(msg)
cc857348d47ed9f662955e48d30279058774cfb8 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3444/cc857348d47ed9f662955e48d30279058774cfb8/trafficlog.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2605, 67, 23847, 12, 2890, 16, 4736, 16, 1191, 67, 1650, 4672, 1234, 273, 1995, 87, 20370, 738, 87, 1459, 628, 738, 87, 5319, 87, 11, 738, 261, 2890, 18, 3239, 16, 1191, 67, 1650, 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, 2605, 67, 23847, 12, 2890, 16, 4736, 16, 1191, 67, 1650, 4672, 1234, 273, 1995, 87, 20370, 738, 87, 1459, 628, 738, 87, 5319, 87, 11, 738, 261, 2890, 18, 3239, 16, 1191, 67, 1650, 18...
text2 = u"Mr. From" result2 = [u'Mr. From'] segments = Message(text).get_segments() self.assertEqual(list(segments), result) segments = Message(text2).get_segments() self.assertEqual(list(segments), result2)
message = Message() message.append_text(text) segments = message.get_segments() self.assertEqual(list(segments), result) text = u"Mr. From" result = [u'Mr. From'] message = Message() message.append_text(text) segments = message.get_segments() self.assertEqual(list(segments), result)
def test_abrevations(self): text = u"This is Toto Inc. a big compagny." result = [u'This is Toto Inc. a big compagny.'] text2 = u"Mr. From" result2 = [u'Mr. From'] segments = Message(text).get_segments() self.assertEqual(list(segments), result) segments = Message(text2).get_segments() self.assertEqual(list(segments), result2)
35ce99942bc0e90ca3b6320121aad380eff31c2a /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12681/35ce99942bc0e90ca3b6320121aad380eff31c2a/test_i18n.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 378, 9083, 1012, 12, 2890, 4672, 977, 273, 582, 6, 2503, 353, 399, 6302, 15090, 18, 279, 5446, 1161, 346, 18538, 1199, 563, 273, 306, 89, 11, 2503, 353, 399, 6302, 15090, 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, 1842, 67, 378, 9083, 1012, 12, 2890, 4672, 977, 273, 582, 6, 2503, 353, 399, 6302, 15090, 18, 279, 5446, 1161, 346, 18538, 1199, 563, 273, 306, 89, 11, 2503, 353, 399, 6302, 15090, 18,...
name = pkgname[0:match.start()] version = try_cleanup_distro_version(pkgname[match.start() + 1:])
name = match.group(1) if name != package: continue version = try_cleanup_distro_version(match.group(2))
def get_package_info(self, package, factory): _version_start_reqexp = '-[0-9]'
da7c2a2958b88c0658025523e7829c13f241fb9f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10543/da7c2a2958b88c0658025523e7829c13f241fb9f/distro.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 5610, 67, 1376, 12, 2890, 16, 2181, 16, 3272, 4672, 389, 1589, 67, 1937, 67, 3658, 2749, 273, 2400, 63, 20, 17, 29, 3864, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 5610, 67, 1376, 12, 2890, 16, 2181, 16, 3272, 4672, 389, 1589, 67, 1937, 67, 3658, 2749, 273, 2400, 63, 20, 17, 29, 3864, 2, -100, -100, -100, -100, -100, -100, -100, -100, ...
"dict must be strings, functions "
"dict must be strings, functions, methods, "
def run__test__(self, d, name): """d, name -> Treat dict d like module.__test__.
040fefdfdcf118ce21e042d6994f364e4d297bff /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/040fefdfdcf118ce21e042d6994f364e4d297bff/doctest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 972, 3813, 972, 12, 2890, 16, 302, 16, 508, 4672, 3536, 72, 16, 508, 317, 26564, 2065, 302, 3007, 1605, 16186, 3813, 25648, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 972, 3813, 972, 12, 2890, 16, 302, 16, 508, 4672, 3536, 72, 16, 508, 317, 26564, 2065, 302, 3007, 1605, 16186, 3813, 25648, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
def pest_viewtree_node_nth_child(self):
def test_viewtree_node_nth_child(self):
def test_viewtree_node_all_children(self): view = self.tree.get_viewtree(refresh=True) self.assertEqual(0,len(view.node_all_children('0'))) """Test node_all_children() for TreeView.
300ee9d368fb095a57c467d2ee3530f8630d94fc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8234/300ee9d368fb095a57c467d2ee3530f8630d94fc/test_liblarch.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 1945, 3413, 67, 2159, 67, 454, 67, 5906, 12, 2890, 4672, 1476, 273, 365, 18, 3413, 18, 588, 67, 1945, 3413, 12, 9144, 33, 5510, 13, 365, 18, 11231, 5812, 12, 20, 16, 1897, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 1945, 3413, 67, 2159, 67, 454, 67, 5906, 12, 2890, 4672, 1476, 273, 365, 18, 3413, 18, 588, 67, 1945, 3413, 12, 9144, 33, 5510, 13, 365, 18, 11231, 5812, 12, 20, 16, 1897, ...
_lock = None
if thread: _lock = threading.RLock() else: _lock = None
def _checkLevel(level): if isinstance(level, int): rv = level elif str(level) == level: if level not in _levelNames: raise ValueError("Unknown level: %r" % level) rv = _levelNames[level] else: raise TypeError("Level not an integer or a valid string: %r" % level) return rv
3920dfcd5e18072354598892349be553edcb5f29 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12029/3920dfcd5e18072354598892349be553edcb5f29/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1893, 2355, 12, 2815, 4672, 309, 1549, 12, 2815, 16, 509, 4672, 5633, 273, 1801, 1327, 609, 12, 2815, 13, 422, 1801, 30, 309, 1801, 486, 316, 389, 2815, 1557, 30, 1002, 2068, 2932...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1893, 2355, 12, 2815, 4672, 309, 1549, 12, 2815, 16, 509, 4672, 5633, 273, 1801, 1327, 609, 12, 2815, 13, 422, 1801, 30, 309, 1801, 486, 316, 389, 2815, 1557, 30, 1002, 2068, 2932...
self.dictList.Append((entryDialog.commentTextCtrl.GetValue(),entryDialog.patternTextCtrl.GetValue(),entryDialog.replacementTextCtrl.GetValue(),str(bool(entryDialog.caseSensitiveCheckBox.GetValue())),str(bool(entryDialog.regexpCheckBox.GetValue()))))
self.dictList.Append((entryDialog.commentTextCtrl.GetValue(),entryDialog.patternTextCtrl.GetValue(),entryDialog.replacementTextCtrl.GetValue(),self.offOn[int(entryDialog.caseSensitiveCheckBox.GetValue())],self.offOn[int(entryDialog.regexpCheckBox.GetValue())]))
def OnAddClick(self,evt): entryDialog=DictionaryEntryDialog(self) if entryDialog.ShowModal()==wx.ID_OK: self.tempSpeechDict.append(speechDictHandler.SpeechDictEntry(entryDialog.patternTextCtrl.GetValue(),entryDialog.replacementTextCtrl.GetValue(),entryDialog.commentTextCtrl.GetValue(),bool(entryDialog.caseSensitiveCheckBox.GetValue()),bool(entryDialog.regexpCheckBox.GetValue()))) self.dictList.Append((entryDialog.commentTextCtrl.GetValue(),entryDialog.patternTextCtrl.GetValue(),entryDialog.replacementTextCtrl.GetValue(),str(bool(entryDialog.caseSensitiveCheckBox.GetValue())),str(bool(entryDialog.regexpCheckBox.GetValue())))) index=self.dictList.GetFirstSelected() while index>=0: self.dictList.Select(index,on=0) index=self.dictList.GetNextSelected(index) addedIndex=self.dictList.GetItemCount()-1 self.dictList.Select(addedIndex) self.dictList.Focus(addedIndex) self.dictList.SetFocus() entryDialog.Destroy()
7692c538857deeebc72a5789f8ab64b7feb10907 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9340/7692c538857deeebc72a5789f8ab64b7feb10907/settingsDialogs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2755, 986, 6563, 12, 2890, 16, 73, 11734, 4672, 1241, 6353, 33, 10905, 1622, 6353, 12, 2890, 13, 309, 1241, 6353, 18, 5706, 20191, 1435, 631, 27226, 18, 734, 67, 3141, 30, 365, 18, 581...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2755, 986, 6563, 12, 2890, 16, 73, 11734, 4672, 1241, 6353, 33, 10905, 1622, 6353, 12, 2890, 13, 309, 1241, 6353, 18, 5706, 20191, 1435, 631, 27226, 18, 734, 67, 3141, 30, 365, 18, 581...
cannot_set_attr(self.f.a, "__doc__", docstr, AttributeError) cannot_set_attr(self.fi.a, "__doc__", docstr, AttributeError)
self.cannot_set_attr(self.f.a, "__doc__", docstr, AttributeError) self.cannot_set_attr(self.fi.a, "__doc__", docstr, AttributeError)
def test_set_docstring_attr(self): self.assertEqual(self.b.__doc__, None) self.assertEqual(self.b.func_doc, None) docstr = "A test method that does nothing" self.b.__doc__ = self.f.a.im_func.__doc__ = docstr self.assertEqual(self.b.__doc__, docstr) self.assertEqual(self.b.func_doc, docstr) self.assertEqual(self.f.a.__doc__, docstr) self.assertEqual(self.fi.a.__doc__, docstr) cannot_set_attr(self.f.a, "__doc__", docstr, AttributeError) cannot_set_attr(self.fi.a, "__doc__", docstr, AttributeError)
8ada17742baaa36357dbdf70009d247c1863c291 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8546/8ada17742baaa36357dbdf70009d247c1863c291/test_funcattrs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 542, 67, 24675, 67, 1747, 12, 2890, 4672, 365, 18, 11231, 5812, 12, 2890, 18, 70, 16186, 2434, 972, 16, 599, 13, 365, 18, 11231, 5812, 12, 2890, 18, 70, 18, 644, 67, 2434, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 542, 67, 24675, 67, 1747, 12, 2890, 4672, 365, 18, 11231, 5812, 12, 2890, 18, 70, 16186, 2434, 972, 16, 599, 13, 365, 18, 11231, 5812, 12, 2890, 18, 70, 18, 644, 67, 2434, ...
nim.configMode = ConfigSelection(choices = choices, default = "simple")
nim.configMode = ConfigSelection(choices = choices, default = "nothing")
def InitNimManager(nimmgr): InitSecParams() config.Nims = ConfigSubList() for x in range(len(nimmgr.nim_slots)): config.Nims.append(ConfigSubsection()) for slot in nimmgr.nim_slots: x = slot.slot nim = config.Nims[x] if slot.isCompatible("DVB-S"): choices = { "nothing": _("nothing connected"), "simple": _("simple"), "advanced": _("advanced")} if len(nimmgr.getNimListOfType(slot.type, exception = x)) > 0: choices["equal"] = _("equal to") choices["satposdepends"] = _("second cable of motorized LNB") if len(nimmgr.canConnectTo(x)) > 0: choices["loopthrough"] = _("loopthrough to") nim.configMode = ConfigSelection(choices = choices, default = "simple") #important - check if just the 2nd one is LT only and the first one is DVB-S # CHECKME: is this logic correct for >2 slots? if nim.configMode.value in ["loopthrough", "satposdepends", "equal"]: if x == 0: # first one can never be linked to anything # reset to simple nim.configMode.value = "simple" nim.configMode.save() else: #FIXME: make it better for y in nimmgr.nim_slots: if y.slot == 0: if not y.isCompatible("DVB-S"): # reset to simple nim.configMode.value = "simple" nim.configMode.save() nim.diseqcMode = ConfigSelection( choices = [ ("single", _("Single")), ("toneburst_a_b", _("Toneburst A/B")), ("diseqc_a_b", _("DiSEqC A/B")), ("diseqc_a_b_c_d", _("DiSEqC A/B/C/D")), ("positioner", _("Positioner"))], default = "diseqc_a_b") choices = [] for id in nimmgr.getNimListOfType("DVB-S"): if id != x: choices.append((str(id), str(chr(65 + id)))) nim.connectedTo = ConfigSelection(choices = choices) nim.diseqcA = getConfigSatlist(192, nimmgr.satList) nim.diseqcB = getConfigSatlist(130, nimmgr.satList) nim.diseqcC = ConfigSatlist(list = nimmgr.satList) nim.diseqcD = ConfigSatlist(list = nimmgr.satList) nim.positionerMode = ConfigSelection( choices = [ ("usals", _("USALS")), ("manual", _("manual"))], default = "usals") nim.longitude = ConfigFloat(default=[5,100], limits=[(0,359),(0,999)]) nim.longitudeOrientation = ConfigSelection(choices={"east": _("East"), "west": _("West")}, default = "east") nim.latitude = ConfigFloat(default=[50,767], limits=[(0,359),(0,999)]) nim.latitudeOrientation = ConfigSelection(choices={"north": _("North"), "south": _("South")}, default="north") nim.powerMeasurement = ConfigYesNo(default=True) nim.powerThreshold = ConfigInteger(default=50, limits=(0, 100)) nim.turningSpeed = ConfigSelection(choices = [("fast", _("Fast")), ("slow", _("Slow")), ("fast epoch", _("Fast epoch")) ], default = "fast") btime = datetime(1970, 1, 1, 7, 0); nim.fastTurningBegin = ConfigDateTime(default = mktime(btime.timetuple()), formatstring = _("%H:%M"), increment = 900) etime = datetime(1970, 1, 1, 19, 0); nim.fastTurningEnd = ConfigDateTime(default = mktime(etime.timetuple()), formatstring = _("%H:%M"), increment = 900) # advanced config: nim.advanced = ConfigSubsection() nim.advanced.sats = getConfigSatlist(192,nimmgr.satList) nim.advanced.sat = ConfigSubDict() lnbs = [("0", "not available")] for y in range(1, 33): lnbs.append((str(y), "LNB " + str(y))) for x in nimmgr.satList: nim.advanced.sat[x[0]] = ConfigSubsection() nim.advanced.sat[x[0]].voltage = ConfigSelection(choices={"polarization": _("Polarization"), "13V": _("13 V"), "18V": _("18 V")}, default = "polarization") nim.advanced.sat[x[0]].tonemode = ConfigSelection(choices={"band": _("Band"), "on": _("On"), "off": _("Off")}, default = "band") nim.advanced.sat[x[0]].usals = ConfigYesNo(default=True) nim.advanced.sat[x[0]].rotorposition = ConfigInteger(default=1, limits=(1, 255)) nim.advanced.sat[x[0]].lnb = ConfigSelection(choices = lnbs) csw = [("none", _("None")), ("AA", _("AA")), ("AB", _("AB")), ("BA", _("BA")), ("BB", _("BB"))] for y in range(0, 16): csw.append((str(0xF0|y), "Input " + str(y+1))) ucsw = [("0", _("None"))] for y in range(1, 17): ucsw.append((str(y), "Input " + str(y))) nim.advanced.lnb = ConfigSubList() nim.advanced.lnb.append(ConfigNothing()) for x in range(1, 33): nim.advanced.lnb.append(ConfigSubsection()) nim.advanced.lnb[x].lof = ConfigSelection(choices={"universal_lnb": _("Universal LNB"), "c_band": _("C-Band"), "user_defined": _("User defined")}, default="universal_lnb") nim.advanced.lnb[x].lofl = ConfigInteger(default=9750, limits = (0, 99999)) nim.advanced.lnb[x].lofh = ConfigInteger(default=10600, limits = (0, 99999)) nim.advanced.lnb[x].threshold = ConfigInteger(default=11700, limits = (0, 99999))
31ff2df44f294aa9685022e458a0aab7ba7df576 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6652/31ff2df44f294aa9685022e458a0aab7ba7df576/NimManager.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4378, 50, 381, 1318, 12, 82, 381, 13552, 4672, 4378, 2194, 1370, 1435, 225, 642, 18, 50, 12097, 273, 1903, 1676, 682, 1435, 364, 619, 316, 1048, 12, 1897, 12, 82, 381, 13552, 18, 82, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4378, 50, 381, 1318, 12, 82, 381, 13552, 4672, 4378, 2194, 1370, 1435, 225, 642, 18, 50, 12097, 273, 1903, 1676, 682, 1435, 364, 619, 316, 1048, 12, 1897, 12, 82, 381, 13552, 18, 82, ...
According to this matrix the first bit of the input is equal to the third bit of the output 6 out of 8 times.
According to this matrix the first bit of the input is equal to the third bit of the output 6 out of 8 times.::
def linear_approximation_matrix(self): """ Return linear approximation matrix $A$ for this S-box.
d8d819d404da04929f5525b5dd795973a8bd80ae /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/d8d819d404da04929f5525b5dd795973a8bd80ae/sbox.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9103, 67, 26742, 5115, 67, 5667, 12, 2890, 4672, 3536, 2000, 9103, 24769, 3148, 271, 37, 8, 364, 333, 348, 17, 2147, 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, 9103, 67, 26742, 5115, 67, 5667, 12, 2890, 4672, 3536, 2000, 9103, 24769, 3148, 271, 37, 8, 364, 333, 348, 17, 2147, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
ref = '1e+10'
ref = '(1e+10+0j)'
def check_complex_type(tp): for x in [0, 1,-1, 1e20] : assert_equal(str(tp(x)), str(complex(x)), err_msg='Failed str formatting for type %s' % tp) assert_equal(str(tp(x*1j)), str(complex(x*1j)), err_msg='Failed str formatting for type %s' % tp) assert_equal(str(tp(x + x*1j)), str(complex(x + x*1j)), err_msg='Failed str formatting for type %s' % tp) if tp(1e10).itemsize > 8: assert_equal(str(tp(1e10)), str(complex(1e10)), err_msg='Failed str formatting for type %s' % tp) else: if sys.platform == 'win32' and sys.version_info[0] <= 2 and \ sys.version_info[1] <= 5: ref = '1e+010' else: ref = '1e+10' assert_equal(str(tp(1e10)), ref, err_msg='Failed str formatting for type %s' % tp)
a41f1aefef662be0645c61da5bf7849d0c68194c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/14925/a41f1aefef662be0645c61da5bf7849d0c68194c/test_print.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 14259, 67, 723, 12, 6834, 4672, 364, 619, 316, 306, 20, 16, 404, 16, 17, 21, 16, 404, 73, 3462, 65, 294, 1815, 67, 9729, 12, 701, 12, 6834, 12, 92, 13, 3631, 609, 12, 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, 866, 67, 14259, 67, 723, 12, 6834, 4672, 364, 619, 316, 306, 20, 16, 404, 16, 17, 21, 16, 404, 73, 3462, 65, 294, 1815, 67, 9729, 12, 701, 12, 6834, 12, 92, 13, 3631, 609, 12, 14...
self._lock.acquire() try: fs1, mount_path1, delegate_path1 = self._delegate(src) fs2, mount_path2, delegate_path2 = self._delegate(dst) if fs1 is not fs2: raise OperationFailedError("rename resource", path=src) if fs1 is not self: return fs1.rename(delegate_path1, delegate_path2) path_src = normpath(src) path_dst = normpath(dst) object = self.mount_tree.get(path_src, None) object2 = self.mount_tree.get(path_dst, None) if object1 is None: raise ResourceNotFoundError(src) raise UnsupportedError("rename resource", path=src) finally: self._lock.release()
fs1, mount_path1, delegate_path1 = self._delegate(src) fs2, mount_path2, delegate_path2 = self._delegate(dst) if fs1 is not fs2: raise OperationFailedError("rename resource", path=src) if fs1 is not self: return fs1.rename(delegate_path1, delegate_path2) path_src = normpath(src) path_dst = normpath(dst) object = self.mount_tree.get(path_src, None) object2 = self.mount_tree.get(path_dst, None) if object1 is None: raise ResourceNotFoundError(src) raise UnsupportedError("rename resource", path=src) @synchronize
def rename(self, src, dst):
55488646ab3bb52783488eb894e034bb2323f1b7 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5578/55488646ab3bb52783488eb894e034bb2323f1b7/mountfs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6472, 12, 2890, 16, 1705, 16, 3046, 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, 6472, 12, 2890, 16, 1705, 16, 3046, 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,...
def rational_points(self, algorithm="enum", sort=True):
def rational_points_iterator(self):
def rational_points(self, algorithm="enum", sort=True): r""" Return the rational points on this curve computed via enumeration.
60fa2d7563b965c543d95334de8974fbe21499e1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/60fa2d7563b965c543d95334de8974fbe21499e1/projective_curve.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 436, 8371, 67, 4139, 67, 9838, 12, 2890, 4672, 436, 8395, 2000, 326, 436, 8371, 3143, 603, 333, 8882, 8470, 3970, 16836, 18, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 436, 8371, 67, 4139, 67, 9838, 12, 2890, 4672, 436, 8395, 2000, 326, 436, 8371, 3143, 603, 333, 8882, 8470, 3970, 16836, 18, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
if os.path.exists(cert):
if cert=='NULL': pass elif os.path.exists(cert):
def check(self,goodJobs, badJobs, rJobs,pJobs, wJobs, sJobs, subJobs, cJobs,chJobs,uJobs): logging.debug("Success Jobs "+ str(len(goodJobs))) for jobId in goodJobs: #if the job is ok for the scheduler retrieve output
b299645affb60052912599346c5588880cf6034e /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8887/b299645affb60052912599346c5588880cf6034e/TrackingComponent.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 12, 2890, 16, 19747, 7276, 16, 5570, 7276, 16, 436, 7276, 16, 84, 7276, 16, 341, 7276, 16, 272, 7276, 16, 720, 7276, 16, 276, 7276, 16, 343, 7276, 16, 89, 7276, 4672, 225, 2907,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 12, 2890, 16, 19747, 7276, 16, 5570, 7276, 16, 436, 7276, 16, 84, 7276, 16, 341, 7276, 16, 272, 7276, 16, 720, 7276, 16, 276, 7276, 16, 343, 7276, 16, 89, 7276, 4672, 225, 2907,...
raise TypeError("SeqRecord (id=%s) has None for its sequence." % record.id)
raise TypeError(\ "SeqRecord (id=%s) has None for its sequence." % record.id)
def to_alignment(sequences, alphabet=None, strict=True): """Returns a multiple sequence alignment (OBSOLETE). - sequences -An iterator that returns SeqRecord objects, or simply a list of SeqRecord objects. All the record sequences must be the same length. - alphabet - Optional alphabet. Stongly recommended. - strict - Optional, defaults to True. Should error checking be done? Using this function is now discouraged. Rather doing this: >>> from Bio import SeqIO >>> handle = open("Clustalw/protein.aln") >>> alignment = SeqIO.to_alignment(SeqIO.parse(handle, "clustal")) >>> handle.close() You are now encouraged to use Bio.AlignIO instead, e.g. >>> from Bio import AlignIO >>> handle = open("Clustalw/protein.aln") >>> alignment = AlignIO.read(handle, "clustal") >>> handle.close() """ #TODO - Move this functionality into the Alignment class instead? from Bio.Alphabet import generic_alphabet from Bio.Alphabet import _consensus_alphabet if alphabet is None: sequences = list(sequences) alphabet = _consensus_alphabet([rec.seq.alphabet for rec in sequences \ if rec.seq is not None]) if not (isinstance(alphabet, Alphabet) or isinstance(alphabet, AlphabetEncoder)): raise ValueError("Invalid alphabet") alignment_length = None alignment = Alignment(alphabet) for record in sequences: if strict: if alignment_length is None: alignment_length = len(record.seq) elif alignment_length != len(record.seq): raise ValueError("Sequences must all be the same length") assert isinstance(record.seq.alphabet, Alphabet) \ or isinstance(record.seq.alphabet, AlphabetEncoder), \ "Sequence does not have a valid alphabet" #TODO - Move this alphabet comparison code into the Alphabet module/class? #TODO - Is a normal alphabet "ungapped" by default, or does it just mean #undecided? if isinstance(record.seq.alphabet, Alphabet) \ and isinstance(alphabet, Alphabet): #Comparing two non-gapped alphabets if not isinstance(record.seq.alphabet, alphabet.__class__): raise ValueError("Incompatible sequence alphabet " \ + "%s for %s alignment" \ % (record.seq.alphabet, alphabet)) elif isinstance(record.seq.alphabet, AlphabetEncoder) \ and isinstance(alphabet, Alphabet): raise ValueError("Sequence has a gapped alphabet, alignment does not") elif isinstance(record.seq.alphabet, Alphabet) \ and isinstance(alphabet, Gapped): #Sequence isn't gapped, alignment is. if not isinstance(record.seq.alphabet, alphabet.alphabet.__class__): raise ValueError("Incompatible sequence alphabet " \ + "%s for %s alignment" \ % (record.seq.alphabet, alphabet)) else: #Comparing two gapped alphabets if not isinstance(record.seq.alphabet, alphabet.__class__): raise ValueError("Incompatible sequence alphabet " \ + "%s for %s alignment" \ % (record.seq.alphabet, alphabet)) if record.seq.alphabet.gap_char != alphabet.gap_char: raise ValueError("Sequence gap characters != alignment gap char") #ToDo, additional checks on the specified alignment... #Should we look at the alphabet.contains() method? if record.seq is None: raise TypeError("SeqRecord (id=%s) has None for its sequence." % record.id) #This is abusing the "private" records list, #we should really have a method like add_sequence #but which takes SeqRecord objects. See also Bug 1944 alignment._records.append(record) return alignment
a2855b4f95e94e4ef816422674d48a89ec6bbe18 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7167/a2855b4f95e94e4ef816422674d48a89ec6bbe18/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 358, 67, 14409, 12, 17190, 16, 10877, 33, 7036, 16, 5490, 33, 5510, 4672, 3536, 1356, 279, 3229, 3102, 8710, 261, 5704, 3584, 4311, 2934, 225, 300, 8463, 300, 979, 2775, 716, 1135, 14367...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 358, 67, 14409, 12, 17190, 16, 10877, 33, 7036, 16, 5490, 33, 5510, 4672, 3536, 1356, 279, 3229, 3102, 8710, 261, 5704, 3584, 4311, 2934, 225, 300, 8463, 300, 979, 2775, 716, 1135, 14367...
Trys to return the source code of a Maple function str
Tries to return the source code of a Maple function str
def _source(self, s): """ Trys to return the source code of a Maple function str as a string.
0e1f18674ba92dfc46347ccdef4bcd2dec75f3a2 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/0e1f18674ba92dfc46347ccdef4bcd2dec75f3a2/maple.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3168, 12, 2890, 16, 272, 4672, 3536, 10000, 281, 358, 327, 326, 1084, 981, 434, 279, 1635, 298, 445, 609, 487, 279, 533, 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, 389, 3168, 12, 2890, 16, 272, 4672, 3536, 10000, 281, 358, 327, 326, 1084, 981, 434, 279, 1635, 298, 445, 609, 487, 279, 533, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -10...
matrix[a1, a2] = statc.spearmanr(f1, filleds[a2])[1]
matrix[a1, a2] = (1.0 - statc.spearmanr(f1, filleds[a2])[0]) / 2.0
def computeMatrix(self): self.error() if self.data: atts = self.data.domain.attributes matrix = orange.SymMatrix(len(atts)) matrix.setattr('items', atts)
6eb0ff13fbf220055e06a6f788dfd333038c65cb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6366/6eb0ff13fbf220055e06a6f788dfd333038c65cb/OWAttributeDistance.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3671, 4635, 12, 2890, 4672, 365, 18, 1636, 1435, 309, 365, 18, 892, 30, 15687, 273, 365, 18, 892, 18, 4308, 18, 4350, 3148, 273, 578, 726, 18, 11901, 4635, 12, 1897, 12, 270, 3428, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3671, 4635, 12, 2890, 4672, 365, 18, 1636, 1435, 309, 365, 18, 892, 30, 15687, 273, 365, 18, 892, 18, 4308, 18, 4350, 3148, 273, 578, 726, 18, 11901, 4635, 12, 1897, 12, 270, 3428, 3...
- [D] - I. Duursma, "Extremal weight enumerators and ultraspherical polynomials"
.. [D] I. Duursma, "Extremal weight enumerators and ultraspherical polynomials"
def sd_duursma_data(C, i): r""" Returns the Duursama data `v` and `m` of this formally s.d. code `C` and the type number `i` in (1,2,3,4). Does *not* check if this code is actually sd. INPUT: - ``i`` - Type number OUTPUT: - Pair ``(v, m)`` as in Duursama [D]_ REFERENCES: - [D] - I. Duursma, "Extremal weight enumerators and ultraspherical polynomials" """ n = C.length() d = C.minimum_distance() if i == 1: v = (n-4*d)/2 + 4 m = d-3 if i == 2: v = (n-6*d)/8 + 3 m = d-5 if i == 3: v = (n-4*d)/4 + 3 m = d-4 if i == 4: v = (n-3*d)/2 + 3 m = d-3 return [v,m]
f1481b520156da7cdd4d6adefe31299a038fab0a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/f1481b520156da7cdd4d6adefe31299a038fab0a/linear_code.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8349, 67, 2544, 25152, 2540, 67, 892, 12, 39, 16, 277, 4672, 436, 8395, 2860, 326, 463, 89, 295, 20353, 69, 501, 1375, 90, 68, 471, 1375, 81, 68, 434, 333, 646, 1230, 272, 18, 72, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8349, 67, 2544, 25152, 2540, 67, 892, 12, 39, 16, 277, 4672, 436, 8395, 2860, 326, 463, 89, 295, 20353, 69, 501, 1375, 90, 68, 471, 1375, 81, 68, 434, 333, 646, 1230, 272, 18, 72, ...
outdir=opts.outpath
def histN(mat,N): Nd=size(N) histo=zeros(N) scale=array(map(lambda a,b:a/b,map(lambda a,b:(1*a)-b,map(max,mat),map(min,mat)),N)) axes=array(map(lambda a,N:linspace(min(a),max(a),N),mat,N)) bins=floor(map(lambda a,b:a/b , map(lambda a,b:a-b, mat, map(min,mat) ),scale*1.01)) hbins=reshape(map(int,bins.flat),bins.shape) for co in transpose(hbins): t=tuple(co) histo[t[::-1]]=histo[t[::-1]]+1 return (axes,histo)
6b7383178dfc3e0bc72b88b696c5636f91f41a6d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/6b7383178dfc3e0bc72b88b696c5636f91f41a6d/cbcBayesSkyRes.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5356, 50, 12, 7373, 16, 50, 4672, 19963, 33, 1467, 12, 50, 13, 5356, 83, 33, 22008, 12, 50, 13, 3159, 33, 1126, 12, 1458, 12, 14661, 279, 16, 70, 30, 69, 19, 70, 16, 1458, 12, 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, 5356, 50, 12, 7373, 16, 50, 4672, 19963, 33, 1467, 12, 50, 13, 5356, 83, 33, 22008, 12, 50, 13, 3159, 33, 1126, 12, 1458, 12, 14661, 279, 16, 70, 30, 69, 19, 70, 16, 1458, 12, 14...
def getarrayitem(pbox, index): p = reveal_ptr(PTR, pbox)
def getarrayitem(cpu, pbox, index): p = reveal_ptr(cpu, PTR, pbox)
def getarrayitem(pbox, index): p = reveal_ptr(PTR, pbox) x = p[index] return %(result)s
dd61b785b172f6b1b2717595c851b95c8629aab6 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6934/dd61b785b172f6b1b2717595c851b95c8629aab6/runner.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 1126, 1726, 12, 11447, 16, 293, 2147, 16, 770, 4672, 293, 273, 283, 24293, 67, 6723, 12, 11447, 16, 453, 4349, 16, 293, 2147, 13, 619, 273, 293, 63, 1615, 65, 327, 8975, 2088, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 1126, 1726, 12, 11447, 16, 293, 2147, 16, 770, 4672, 293, 273, 283, 24293, 67, 6723, 12, 11447, 16, 453, 4349, 16, 293, 2147, 13, 619, 273, 293, 63, 1615, 65, 327, 8975, 2088, 1...
elif plat[:5] == 'sunos':
elif plat[:5] == 'sunos':
def device(port): return '/dev/tty%dp0' % (port+1)
3172d3da76680bf096f24759967140a5e2377c8b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2937/3172d3da76680bf096f24759967140a5e2377c8b/serialposix.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2346, 12, 655, 4672, 327, 1173, 5206, 19, 5512, 9, 9295, 20, 11, 738, 261, 655, 15, 21, 13, 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, 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, 2346, 12, 655, 4672, 327, 1173, 5206, 19, 5512, 9, 9295, 20, 11, 738, 261, 655, 15, 21, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
if release_level: scipy_core_version = '%(major)d.%(minor)d.%(micro)d'\ '_%(release_level)s'\ '_%(cvs_minor)d.%(cvs_serial)d' % (locals ())
if cvs_minor or cvs_serial: if release_level: scipy_core_version = '%(major)d.%(minor)d.%(micro)d'\ '_%(release_level)s'\ '_%(cvs_minor)d.%(cvs_serial)d' % (locals ()) else: scipy_core_version = '%(major)d.%(minor)d.%(micro)d'\ '_%(cvs_minor)d.%(cvs_serial)d' % (locals ())
def setup_package(): old_path = os.getcwd() local_path = os.path.dirname(os.path.abspath(sys.argv[0])) os.chdir(local_path) sys.path.insert(0, local_path) try: configs = [{'name':'Scipy_core'}] versions = [] for n in bundle_packages: sys.path.insert(0,os.path.join(local_path,n)) try: mod = __import__('setup_'+n) configs.append(mod.configuration(parent_path=local_path)) mod = __import__(n+'_version') versions.append(mod) finally: del sys.path[0] config_dict = merge_config_dicts(configs) major = max([v.major for v in versions]) minor = max([v.minor for v in versions]) micro = max([v.micro for v in versions]) release_level = min([v.release_level for v in versions]) release_level = '' cvs_minor = reduce(lambda a,b:a+b,[v.cvs_minor for v in versions],0) cvs_serial = reduce(lambda a,b:a+b,[v.cvs_serial for v in versions],0) if release_level: scipy_core_version = '%(major)d.%(minor)d.%(micro)d'\ '_%(release_level)s'\ '_%(cvs_minor)d.%(cvs_serial)d' % (locals ()) else: scipy_core_version = '%(major)d.%(minor)d.%(micro)d'\ '_%(cvs_minor)d.%(cvs_serial)d' % (locals ()) print 'SciPy Core Version %s' % scipy_core_version setup( version = scipy_core_version, maintainer = "SciPy Developers", maintainer_email = "scipy-dev@scipy.org", description = "SciPy core modules: scipy_{distutils,test,base}", license = "SciPy License (BSD Style)", url = "http://www.scipy.org", **config_dict ) finally: del sys.path[0] os.chdir(old_path)
fd66cf94a14d8291fc5028b8e82eb086893dc21d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14925/fd66cf94a14d8291fc5028b8e82eb086893dc21d/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 67, 5610, 13332, 1592, 67, 803, 273, 1140, 18, 588, 11089, 1435, 1191, 67, 803, 273, 1140, 18, 803, 18, 12287, 12, 538, 18, 803, 18, 5113, 803, 12, 9499, 18, 19485, 63, 20, 226...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 5610, 13332, 1592, 67, 803, 273, 1140, 18, 588, 11089, 1435, 1191, 67, 803, 273, 1140, 18, 803, 18, 12287, 12, 538, 18, 803, 18, 5113, 803, 12, 9499, 18, 19485, 63, 20, 226...
outf.write(" (os.path.normpath(sys.executable), post_interp))
if not sysconfig.python_build: outf.write(" (os.path.normpath(sys.executable), post_interp)) else: outf.write(" (os.path.join( sysconfig.get_config_var("BINDIR"), "python" + sysconfig.get_config_var("EXE")), post_interp))
def copy_scripts (self): """Copy each script listed in 'self.scripts'; if it's marked as a Python script in the Unix way (first line matches 'first_line_re', ie. starts with "\#!" and contains "python"), then adjust the first line to refer to the current Python interpreter as we copy. """ self.mkpath(self.build_dir) for script in self.scripts: adjust = 0 script = convert_path(script) outfile = os.path.join(self.build_dir, os.path.basename(script))
fb173cd471e842dc37f01e767dd1fe0a9a5f7d4e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/fb173cd471e842dc37f01e767dd1fe0a9a5f7d4e/build_scripts.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1610, 67, 12827, 261, 2890, 4672, 3536, 2951, 1517, 2728, 12889, 316, 296, 2890, 18, 12827, 13506, 309, 518, 1807, 9350, 487, 279, 6600, 2728, 316, 326, 9480, 4031, 261, 3645, 980, 1885, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1610, 67, 12827, 261, 2890, 4672, 3536, 2951, 1517, 2728, 12889, 316, 296, 2890, 18, 12827, 13506, 309, 518, 1807, 9350, 487, 279, 6600, 2728, 316, 326, 9480, 4031, 261, 3645, 980, 1885, ...
if max_new != "unlimited" and max_new <= self.feed_new_count.get(feed, 0) + self.feed_running_count.get(key, 0): continue
if max_new != "unlimited": count = (self.feed_new_count.get(feed, 0) + self.feed_running_count.get(key, 0) + feed.num_unwatched()) if count >= max_new: continue
def start_downloads_idle(self): if self.paused: return last_count = 0 while self.running_count < self.MAX and self.pending_count > 0 and self.pending_count != last_count: last_count = self.pending_count sorted = SortedList(pending_sort) for feed in feedmod.Feed.make_view(): key = self._key_for_feed(feed) if self.is_auto: max_new = feed.get_max_new() if max_new != "unlimited" and max_new <= self.feed_new_count.get(feed, 0) + self.feed_running_count.get(key, 0): continue if self.feed_pending_count.get(key, 0) <= 0: continue sorted.append((feed, self.feed_running_count.get(key, 0), self.feed_time.get(feed, datetime.min))) for feed, count, time in sorted: if self.is_auto: feed.startAutoDownload() else: feed.startManualDownload() self.feed_time[feed] = datetime.now() if self.running_count >= self.MAX: break self.dc = None
d84a8ee15d99c05437e6a7786c97952163c0c948 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12354/d84a8ee15d99c05437e6a7786c97952163c0c948/autodler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 787, 67, 7813, 87, 67, 20390, 12, 2890, 4672, 309, 365, 18, 8774, 3668, 30, 327, 1142, 67, 1883, 273, 374, 1323, 365, 18, 8704, 67, 1883, 411, 365, 18, 6694, 471, 365, 18, 9561, 67, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 787, 67, 7813, 87, 67, 20390, 12, 2890, 4672, 309, 365, 18, 8774, 3668, 30, 327, 1142, 67, 1883, 273, 374, 1323, 365, 18, 8704, 67, 1883, 411, 365, 18, 6694, 471, 365, 18, 9561, 67, ...
print "signal.pause() ..."
def main(): # Catch most important signals signal.signal( signal.SIGALRM, SigHandler ) signal.signal( signal.SIGHUP, SigHandler ) signal.signal( signal.SIGINT, SigHandler ) signal.signal( signal.SIGTERM, SigHandler ) argflags = {} # dict of argument flags # Parse command-line arguments doArgs(sys.argv[1:], argflags) # parse arg-list (not program name) # TODO: Is there a simpler Python-way of getting hostname ?? tmp = os.popen('uname -n', 'r') hostname = tmp.readline() log.hostname = hostname[:-1] # strip \n off end tmp.close() #print "[DEBUG] hostname:",log.hostname # instantiate global Config object global Config Config = config.Config( '__main__' ) # New history object history.eddieHistory = history.history() # read in config and rules parseConfig.readConf(config_file, Config) if 'showconfig' in argflags.keys() and argflags['showconfig'] == 1: # Just display the configuration and exit print "---Displaying Eddie Configuration---" print Config eddieexit() # Main Loop while 1: try: # check if any config/rules files have been modified # if so, re-read config if Config.checkfiles(): log.log( '<eddie>eddieguts(), config files modified - reloading config', 7 ) # # reset config and read in config and rules global Config Config = config.Config( '__main__' ) # read in config and rules parseConfig.readConf(config_file, Config) # perform guts of Eddie eddieguts(Config, history.eddieHistory) # email admin the adminlog if required log.sendadminlog() # sleep for set period - only quits with CTRL-c log.log( '<eddie>main(), sleeping for %d secs' % (config.scanperiod), 6 ) #print '<eddie>main(), sleeping for %d secs' % (config.scanperiod) # Sleep by setting SIGALRM to go off in scanperiod seconds #time.sleep( config.scanperiod ) print "Setting signal.alarm( %d )" % (config.scanperiod) signal.alarm( config.scanperiod ) print "signal.pause() ..." signal.pause() print "...end of signal.pause()" except KeyboardInterrupt: # CTRL-c hit - quit now log.log( '<eddie>main(), KeyboardInterrupt encountered - quitting', 1 ) print "\nEddie quitting ... bye bye" break
3f3c453a48ff4dfbc4fe9c29551712c8d11aa72a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3643/3f3c453a48ff4dfbc4fe9c29551712c8d11aa72a/eddie.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 468, 21984, 4486, 10802, 11505, 4277, 18, 10420, 12, 4277, 18, 18513, 1013, 8717, 16, 21911, 1503, 262, 4277, 18, 10420, 12, 4277, 18, 2320, 16715, 3079, 16, 21911, 1503, 262,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 21984, 4486, 10802, 11505, 4277, 18, 10420, 12, 4277, 18, 18513, 1013, 8717, 16, 21911, 1503, 262, 4277, 18, 10420, 12, 4277, 18, 2320, 16715, 3079, 16, 21911, 1503, 262,...
elif record.holiday_type == 'category' and record.type == 'remove':
elif record.holiday_type == 'category':
def holidays_validate(self, cr, uid, ids, *args): obj_emp = self.pool.get('hr.employee') wf_service = netsvc.LocalService("workflow") data_holiday = self.browse(cr, uid, ids) self.check_holidays(cr, uid, ids) vals = {'state':'validate'} ids2 = obj_emp.search(cr, uid, [('user_id', '=', uid)]) if ids2: if data_holiday[0].state == 'validate1': vals['manager_id2'] = ids2[0] else: vals['manager_id'] = ids2[0] else: raise osv.except_osv(_('Warning !'), _('No user related to the selected employee.')) self.write(cr, uid, ids, vals) for record in data_holiday: if record.holiday_type == 'employee' and record.type == 'remove': vals = { 'name': record.name, 'date_from': record.date_from, 'date_to': record.date_to, 'calendar_id': record.employee_id.calendar_id.id, 'company_id': record.employee_id.company_id.id, 'resource_id': record.employee_id.resource_id.id, 'holiday_id': record.id } self._create_resource_leave(cr, uid, vals) elif record.holiday_type == 'category' and record.type == 'remove': emp_ids = obj_emp.search(cr, uid, [('category_ids', '=', record.category_id.id)]) for emp in obj_emp.browse(cr, uid, emp_ids): vals = { 'name': record.name, 'date_from': record.date_from, 'date_to': record.date_to, 'calendar_id': emp.calendar_id.id, 'company_id': emp.company_id.id, 'resource_id': emp.resource_id.id, 'holiday_id':record.id }
d6451e011dbfc79f10dbf349593fa319c26ec083 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/d6451e011dbfc79f10dbf349593fa319c26ec083/hr_holidays.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 28990, 67, 5662, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 380, 1968, 4672, 1081, 67, 30752, 273, 365, 18, 6011, 18, 588, 2668, 7256, 18, 351, 2817, 1340, 6134, 11578, 67, 3278, 273,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 28990, 67, 5662, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 380, 1968, 4672, 1081, 67, 30752, 273, 365, 18, 6011, 18, 588, 2668, 7256, 18, 351, 2817, 1340, 6134, 11578, 67, 3278, 273,...
converted_numbers.append( int(int(num[0:-1])*255/100))
converted_numbers.append( int(float(num[0:-1])*255/100))
def parseColor(c): """Creates a rgb int array""" # Based on the code in parseColor in the simplestyle.py module # Fixes a few bugs. Should be removed when fixed upstreams. if c in simplestyle.svgcolors.keys(): c=simplestyle.svgcolors[c] if c.startswith('#') and len(c)==4: c='#'+c[1:2]+c[1:2]+c[2:3]+c[2:3]+c[3:]+c[3:] elif c.startswith('rgb('): # remove the rgb(...) stuff tmp = c.strip()[4:-1] numbers = [number.strip() for number in tmp.split(',')] converted_numbers = [] if len(numbers) == 3: for num in numbers: if num.endswith(r'%'): converted_numbers.append( int(int(num[0:-1])*255/100)) else: converted_numbers.append(int(num)) return tuple(converted_numbers) else: return (0,0,0) try: r=int(c[1:3],16) g=int(c[3:5],16) b=int(c[5:],16) except: return (0,0,0) return (r,g,b)
c72cd95dc66e6087397fd99c184a31c681978764 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7584/c72cd95dc66e6087397fd99c184a31c681978764/tikz_export.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 2957, 12, 71, 4672, 3536, 2729, 279, 6917, 509, 526, 8395, 468, 25935, 603, 326, 981, 316, 1109, 2957, 316, 326, 9330, 19706, 18, 2074, 1605, 468, 12139, 281, 279, 11315, 22398, 18...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 2957, 12, 71, 4672, 3536, 2729, 279, 6917, 509, 526, 8395, 468, 25935, 603, 326, 981, 316, 1109, 2957, 316, 326, 9330, 19706, 18, 2074, 1605, 468, 12139, 281, 279, 11315, 22398, 18...
data.append("keyboard " + self.keyboard_dict[self.keyboard_combo.entry.get_text()])
keys = self.keyboard_dict.keys() keys.sort() for item in keys: if self.keyboard_dict[item][0] == self.keyboard_combo.entry.get_text(): data.append("keyboard " + self.keyboard_dict[item][1]) break
def getData(self): data = [] data.append("") data.append("#System language") lang = self.languageLookup(self.lang_combo.entry.get_text()) data.append("lang " + lang) data.append("") data.append("#Language modules to install")
8e4cc04fad3b839b77cb057832c2c387f8dd06b9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5376/8e4cc04fad3b839b77cb057832c2c387f8dd06b9/basic.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4303, 12, 2890, 4672, 501, 273, 5378, 501, 18, 6923, 2932, 7923, 501, 18, 6923, 2932, 7, 3163, 2653, 7923, 3303, 273, 365, 18, 4923, 6609, 12, 2890, 18, 4936, 67, 25053, 18, 4099, 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, 4303, 12, 2890, 4672, 501, 273, 5378, 501, 18, 6923, 2932, 7923, 501, 18, 6923, 2932, 7, 3163, 2653, 7923, 3303, 273, 365, 18, 4923, 6609, 12, 2890, 18, 4936, 67, 25053, 18, 4099, 18, ...
return [Bug(bugzilla=self,dict=b) for b in self._getbugsfull(idlist)] def getbugs(self,idlist):
return [Bug(bugzilla=self,dict=b) for b in self._getbugs(idlist)] def getbugssimple(self,idlist):
def getbugsfull(self,idlist): '''Return a list of Bug objects with the full complement of bug data already loaded.''' return [Bug(bugzilla=self,dict=b) for b in self._getbugsfull(idlist)]
49c70e1dd483e14f0ea6e2b32c1cde7563e5264d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5050/49c70e1dd483e14f0ea6e2b32c1cde7563e5264d/bugzilla.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 19381, 2854, 12, 2890, 16, 350, 1098, 4672, 9163, 990, 279, 666, 434, 16907, 2184, 598, 326, 1983, 17161, 434, 7934, 501, 1818, 4203, 1093, 6309, 327, 306, 19865, 12, 925, 15990, 33...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 19381, 2854, 12, 2890, 16, 350, 1098, 4672, 9163, 990, 279, 666, 434, 16907, 2184, 598, 326, 1983, 17161, 434, 7934, 501, 1818, 4203, 1093, 6309, 327, 306, 19865, 12, 925, 15990, 33...
command = OSDCommand.set_attributes(pid, oid1)
command = OSDCommand().set_attributes(pid, oid1)
def create_any_object(pid): command = OSDCommand().set_create(pid) command.attr_build(OSDAttr(ATTR_GET, CUR_CMD_ATTR_PG, CCAP_OID, \ CCAP_OID_LEN)) attr = run(command) return ntohll(attr.val)
7840cadba24d9ce489c611e2a26a5491efa28e59 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11094/7840cadba24d9ce489c611e2a26a5491efa28e59/test-collection.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 2273, 67, 1612, 12, 6610, 4672, 1296, 273, 5932, 40, 2189, 7675, 542, 67, 2640, 12, 6610, 13, 1296, 18, 1747, 67, 3510, 12, 4618, 40, 3843, 12, 12043, 67, 3264, 16, 4706, 67...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 2273, 67, 1612, 12, 6610, 4672, 1296, 273, 5932, 40, 2189, 7675, 542, 67, 2640, 12, 6610, 13, 1296, 18, 1747, 67, 3510, 12, 4618, 40, 3843, 12, 12043, 67, 3264, 16, 4706, 67...
data = data.replace("&lt;", "<") data = data.replace("&gt;", ">") data = data.replace("&quot;", '"') data = data.replace("&amp;", '&')
data = data.replace("&lt;", "<").replace("&gt;", ">").replace("&quot;", '"').replace("&amp;", '&')
def handleRawCharacterData(self, data): data = data.replace("&lt;", "<") data = data.replace("&gt;", ">") data = data.replace("&quot;", '"') data = data.replace("&amp;", '&') self.handleCharacterData(data)
76fdbe5c982cfc23db9b0406a5307afa7d58c5a1 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/14305/76fdbe5c982cfc23db9b0406a5307afa7d58c5a1/simplexmlparser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 4809, 7069, 751, 12, 2890, 16, 501, 4672, 501, 273, 501, 18, 2079, 2932, 10, 5618, 31, 3113, 18165, 2934, 2079, 2932, 10, 4521, 31, 3113, 14675, 2934, 2079, 2932, 10, 9270, 31, 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, 1640, 4809, 7069, 751, 12, 2890, 16, 501, 4672, 501, 273, 501, 18, 2079, 2932, 10, 5618, 31, 3113, 18165, 2934, 2079, 2932, 10, 4521, 31, 3113, 14675, 2934, 2079, 2932, 10, 9270, 31, 3...
self.control.setChecked(value)
self.control.setOn(value)
def action(self, value): if value != None: self.control.setChecked(value)
0eb6f11acef0b90e11c4bafb9e83aa44e09ea65b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6366/0eb6f11acef0b90e11c4bafb9e83aa44e09ea65b/OWGUI.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1301, 12, 2890, 16, 460, 4672, 309, 460, 480, 599, 30, 365, 18, 7098, 18, 542, 11454, 12, 1132, 13, 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, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1301, 12, 2890, 16, 460, 4672, 309, 460, 480, 599, 30, 365, 18, 7098, 18, 542, 11454, 12, 1132, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
if re.search('TITEL',line):
if line.find('TITEL') != -1:
def atom_types(self): """Method that returns list of atomtypes.""" file=open(self._file_,'r') lines=file.readlines() file.close() atomtypes=[] for line in lines: if re.search('TITEL',line): atomtypes.append(line.split()[3].split('_')[0].split('.')[0]) return atomtypes
6a89da2a0a41561b153928e180694dab9ecea901 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5572/6a89da2a0a41561b153928e180694dab9ecea901/vasp.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3179, 67, 2352, 12, 2890, 4672, 3536, 1305, 716, 1135, 666, 434, 3179, 2352, 12123, 585, 33, 3190, 12, 2890, 6315, 768, 67, 11189, 86, 6134, 2362, 33, 768, 18, 896, 3548, 1435, 585, 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, 3179, 67, 2352, 12, 2890, 4672, 3536, 1305, 716, 1135, 666, 434, 3179, 2352, 12123, 585, 33, 3190, 12, 2890, 6315, 768, 67, 11189, 86, 6134, 2362, 33, 768, 18, 896, 3548, 1435, 585, 18...
if command[1] is None:
if command[1] is not None: return command[1] elif command[0] is not None:
def get(using=None): """Return a browser launcher instance appropriate for the environment.""" if using is not None: alternatives = [using] else: alternatives = _tryorder for browser in alternatives: if '%s' in browser: # User gave us a command line, don't mess with it. return GenericBrowser(browser) else: # User gave us a browser name. try: command = _browsers[browser.lower()] except KeyError: command = _synthesize(browser) if command[1] is None: return command[0]() else: return command[1] raise Error("could not locate runnable browser")
1bbf00d37260b18cf03374e0074bd1b59c8b2110 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/1bbf00d37260b18cf03374e0074bd1b59c8b2110/webbrowser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 12, 9940, 33, 7036, 4672, 3536, 990, 279, 4748, 26618, 791, 5505, 364, 326, 3330, 12123, 309, 1450, 353, 486, 599, 30, 20699, 273, 306, 9940, 65, 469, 30, 20699, 273, 389, 698, 10...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 12, 9940, 33, 7036, 4672, 3536, 990, 279, 4748, 26618, 791, 5505, 364, 326, 3330, 12123, 309, 1450, 353, 486, 599, 30, 20699, 273, 306, 9940, 65, 469, 30, 20699, 273, 389, 698, 10...
def diff():
def diff(**map):
def diff(): yield self.diff(p1, n, None)
268bedddddaed84793c541e8d24cbb2a515ccc87 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11312/268bedddddaed84793c541e8d24cbb2a515ccc87/hgweb.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3122, 12, 636, 1458, 4672, 2824, 365, 18, 5413, 12, 84, 21, 16, 290, 16, 599, 13, 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, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3122, 12, 636, 1458, 4672, 2824, 365, 18, 5413, 12, 84, 21, 16, 290, 16, 599, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
self._order *= int(g.order()) return self._order
ord *= int(g.order()) return ord
def order(self): """ Return the number of elements of self. This is the same as len(self). EXAMPLES:: sage: DirichletGroup(20).order() 8 sage: DirichletGroup(37).order() 36 """ try: return self._order except AttributeError: pass self._order = rings.Integer(1) for g in self.gens(): self._order *= int(g.order()) return self._order
2d29bdbbd76a69f79b998867461156f2c290f64a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/2d29bdbbd76a69f79b998867461156f2c290f64a/dirichlet.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1353, 12, 2890, 4672, 3536, 2000, 326, 1300, 434, 2186, 434, 365, 18, 1220, 353, 326, 1967, 487, 562, 12, 2890, 2934, 225, 5675, 8900, 11386, 2866, 225, 272, 410, 30, 8446, 1354, 1810, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1353, 12, 2890, 4672, 3536, 2000, 326, 1300, 434, 2186, 434, 365, 18, 1220, 353, 326, 1967, 487, 562, 12, 2890, 2934, 225, 5675, 8900, 11386, 2866, 225, 272, 410, 30, 8446, 1354, 1810, ...
def makefile(self, mode):
def makefile(self, mode, bufsize=None): """Return a readable file-like object with data from socket. This method offers only partial support for the makefile interface of a real socket. It only supports modes 'r' and 'rb' and the bufsize argument is ignored. The returned object contains *all* of the file data """
def makefile(self, mode): # hopefully, never have to write if mode != 'r' and mode != 'rb': raise UnimplementedFileMode()
a809ab51a1f0830bd85a8c4bda919585b9e6ec27 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/a809ab51a1f0830bd85a8c4bda919585b9e6ec27/httplib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 768, 12, 2890, 16, 1965, 16, 1681, 1467, 33, 7036, 4672, 3536, 990, 279, 7471, 585, 17, 5625, 733, 598, 501, 628, 2987, 18, 225, 1220, 707, 28641, 1338, 4702, 2865, 364, 326, 122...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 768, 12, 2890, 16, 1965, 16, 1681, 1467, 33, 7036, 4672, 3536, 990, 279, 7471, 585, 17, 5625, 733, 598, 501, 628, 2987, 18, 225, 1220, 707, 28641, 1338, 4702, 2865, 364, 326, 122...
def notify(self, new_maxrate, new_maxexemptrate, usedbytes, usedi2bytes)
def notify(self, new_maxrate, new_maxexemptrate, usedbytes, usedi2bytes):
def notify(self, new_maxrate, new_maxexemptrate, usedbytes, usedi2bytes) """ Notify the slice it's being capped. """ # Prepare message parameters from the template message = "" params = {'slice': self.name, 'hostname': socket.gethostname(), 'since': time.asctime(time.gmtime(self.time)) + " GMT", 'until': time.asctime(time.gmtime(self.time + period)) + " GMT", 'date': time.asctime(time.gmtime()) + " GMT", 'period': format_period(period)} if new_maxrate ! = self.MaxRate: # Format template parameters for low bandwidth message params['class'] = "low bandwidth" params['bytes'] = format_bytes(usedbytes - self.bytes) params['limit'] = format_bytes(self.MaxKByte * 1024) params['new_maxrate'] = bwlimit.format_tc_rate(new_maxrate)
329419f2c6de2b011a55dbd9f1f91337ef3b840a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6995/329419f2c6de2b011a55dbd9f1f91337ef3b840a/bwmon.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5066, 12, 2890, 16, 394, 67, 1896, 5141, 16, 394, 67, 1896, 338, 351, 6723, 340, 16, 1399, 3890, 16, 1399, 77, 22, 3890, 4672, 3536, 10918, 326, 2788, 518, 1807, 3832, 3523, 1845, 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, 5066, 12, 2890, 16, 394, 67, 1896, 5141, 16, 394, 67, 1896, 338, 351, 6723, 340, 16, 1399, 3890, 16, 1399, 77, 22, 3890, 4672, 3536, 10918, 326, 2788, 518, 1807, 3832, 3523, 1845, 18, ...
self._read_test(['a,\\b,c'], [['a', '\\b', 'c']], escapechar='\\')
self._read_test(['a,\\b,c'], [['a', 'b', 'c']], escapechar='\\')
def test_read_escape(self): self._read_test(['a,\\b,c'], [['a', '\\b', 'c']], escapechar='\\') self._read_test(['a,b\\,c'], [['a', 'b,c']], escapechar='\\') self._read_test(['a,"b\\,c"'], [['a', 'b,c']], escapechar='\\') self._read_test(['a,"b,\\c"'], [['a', 'b,\\c']], escapechar='\\') self._read_test(['a,"b,c\\""'], [['a', 'b,c"']], escapechar='\\') self._read_test(['a,"b,c"\\'], [['a', 'b,c\\']], escapechar='\\')
36a7691c2dc4a11ceebacb149e69b01226962d69 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/36a7691c2dc4a11ceebacb149e69b01226962d69/test_csv.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 896, 67, 6939, 12, 2890, 4672, 365, 6315, 896, 67, 3813, 12, 3292, 69, 16, 1695, 70, 16, 71, 17337, 306, 3292, 69, 2187, 296, 70, 2187, 296, 71, 3546, 6487, 4114, 3001, 221...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 896, 67, 6939, 12, 2890, 4672, 365, 6315, 896, 67, 3813, 12, 3292, 69, 16, 1695, 70, 16, 71, 17337, 306, 3292, 69, 2187, 296, 70, 2187, 296, 71, 3546, 6487, 4114, 3001, 221...
if self.body and not self.preface:
if self.body and not (self.preface or self.introduction):
def visit_section(self, node): #print 'visit section level', self.section_level, node.__dict__ self.section_level += 1 if self.doctype == 'doc': pass elif self.doctype == 'book': if self.section_level == 1: if not (self.chapters or self.parts): # first one if self.body and not self.preface: # text before first chapter is always a preface self.body.insert(0, '@Preface\n' '@Begin\n') self.body.append('\n@End @Preface\n') self.preface = self.body self.body = [] # don't return, as we're actually starting the *next* chapter # after the preface elif self.settings.has_preface and not self.preface: self.body = self.preface = [ '@Preface\n' ' @Title { ', '', # title placeholder ' }\n' '@Begin\n'] self.section_commands.append('@Preface') self.section_title = 1 return if self.settings.has_introduction and not self.introduction: self.body = self.introduction = [ '\n@Introduction\n' ' @Title { ', '', # title placeholder ' }\n' '@Begin\n'] self.section_commands.append('@Introduction') self.section_title = 1 return # no, it's actually a chapter or part self.body = [] self.chapters.append(self.body) if self.settings.has_parts: self.body.extend([0, '']) self.section_title = 1 self.parts.append(self.chapters) elif self.settings.has_parts: # new part (not first) self.body = [0, ''] self.section_title = 1 self.chapters = [self.body] self.parts.append(self.chapters) level = self.section_level extra = '' if self.settings.has_parts: level -= 1 if level == 1: # chapter if self.body and type(self.body[0]) is type(0): # first real chapter in a part del self.chapters[0] # we don't want it on the output del self.body[0] # delete the marker too ptitle = self.body.pop(0) if self.body and self.body[0] == '\n@PP\n': # always is del self.body[0] ptext = ''.join(self.body).strip() extra = ' @PartTitle { %s }\n' % self.encode(ptitle) if ptext: extra += '\n @PartText {\n%s\n}\n' % ptext self.body = [] self.chapters.append(self.body) self.section_commands.append('@Chapter') elif level == 2: self.section_commands.append('@Section') elif level == 3: self.section_commands.append('@SubSection') elif level == 4: self.section_commands.append('@SubSubSection') if 0 < level <= 4: if level > 1 and self.section_nesting < self.section_level: self.section_nesting_stack.append((self.section_nesting, self.section_commands[-1][1:])) self.body.append('\n@Begin%ss\n' % self.section_nesting_stack[-1][1]) self.section_nesting = self.section_level self.body.append('\n%s @Title { ' % self.section_commands[-1]) self.section_title = len(self.body) self.body.extend(['', ' }\n']) if node.hasattr('id'): self.body.append(' @Tag { %s }\n' % node['id']) if extra: self.body.append(extra) self.body.append('@Begin\n') elif level > 4: # unsupported level, let's cheat # IMPROVEME: perhaps allow two or three different levels? self.body.extend(['\n@Display @Heading { ', '', # title placeholder ' }\n']) self.section_title = len(self.body) - 2 self.section_commands.append(None) # reset state stuff that may be left over self.kill_next_paragraph = False
544440c7f6145f4088ce7ce07b13fae4e87b8570 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5620/544440c7f6145f4088ce7ce07b13fae4e87b8570/lout.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3757, 67, 3464, 12, 2890, 16, 756, 4672, 468, 1188, 296, 11658, 2442, 1801, 2187, 365, 18, 3464, 67, 2815, 16, 756, 16186, 1576, 972, 365, 18, 3464, 67, 2815, 1011, 404, 309, 365, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3757, 67, 3464, 12, 2890, 16, 756, 4672, 468, 1188, 296, 11658, 2442, 1801, 2187, 365, 18, 3464, 67, 2815, 16, 756, 16186, 1576, 972, 365, 18, 3464, 67, 2815, 1011, 404, 309, 365, 18, ...
return (self.python is None or dist.py_version==self.python) \
return (self.python is None or dist.py_version is None or dist.py_version==self.python) \
def can_add(self, dist): """Is distribution `dist` acceptable for this collection?""" return (self.python is None or dist.py_version==self.python) \ and compatible_platforms(dist.platform,self.platform)
13c8739a6b43cb59ad0dfbd7751148d427af6170 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/495/13c8739a6b43cb59ad0dfbd7751148d427af6170/pkg_resources.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 848, 67, 1289, 12, 2890, 16, 2411, 4672, 3536, 2520, 7006, 1375, 4413, 68, 14206, 364, 333, 1849, 35, 8395, 327, 261, 2890, 18, 8103, 353, 599, 578, 2411, 18, 2074, 67, 1589, 353, 599,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 848, 67, 1289, 12, 2890, 16, 2411, 4672, 3536, 2520, 7006, 1375, 4413, 68, 14206, 364, 333, 1849, 35, 8395, 327, 261, 2890, 18, 8103, 353, 599, 578, 2411, 18, 2074, 67, 1589, 353, 599,...
'data_files': [('docutils/parsers/rst/include', glob.glob('docutils/parsers/rst/include/*.txt')), ('docutils/writers/html4css1', ['docutils/writers/html4css1/html4css1.css']), ('docutils/writers/latex2e', ['docutils/writers/latex2e/latex2e.tex']), ('docutils/writers/newlatex2e', ['docutils/writers/newlatex2e/base.tex']), ('docutils/writers/pep_html', ['docutils/writers/pep_html/pep.css', 'docutils/writers/pep_html/template.txt']), ('docutils/writers/s5_html', (['docutils/writers/s5_html/README.txt'] + glob.glob('docutils/writers/s5_html/*/*')))],
'data_files': ([('docutils/parsers/rst/include', glob.glob('docutils/parsers/rst/include/*.txt')), ('docutils/writers/html4css1', ['docutils/writers/html4css1/html4css1.css']), ('docutils/writers/latex2e', ['docutils/writers/latex2e/latex2e.tex']), ('docutils/writers/newlatex2e', ['docutils/writers/newlatex2e/base.tex']), ('docutils/writers/pep_html', ['docutils/writers/pep_html/pep.css', 'docutils/writers/pep_html/template.txt']), ('docutils/writers/s5_html/themes', ['docutils/writers/s5_html/themes/README.txt']),] + s5_theme_files),
def do_setup(): kwargs = package_data.copy() extras = get_extras() if extras: kwargs['py_modules'] = extras if sys.hexversion >= 0x02030000: # Python 2.3 kwargs['classifiers'] = classifiers else: kwargs['cmdclass'] = {'build_py': dual_build_py} dist = setup(**kwargs) return dist
cdfd77b1d7d16b89f1358cd21a2b5acdcb3779a9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1532/cdfd77b1d7d16b89f1358cd21a2b5acdcb3779a9/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 8401, 13332, 1205, 273, 2181, 67, 892, 18, 3530, 1435, 11875, 273, 336, 67, 23687, 1435, 309, 11875, 30, 1205, 3292, 2074, 67, 6400, 3546, 273, 11875, 309, 2589, 18, 7118, 1589,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 8401, 13332, 1205, 273, 2181, 67, 892, 18, 3530, 1435, 11875, 273, 336, 67, 23687, 1435, 309, 11875, 30, 1205, 3292, 2074, 67, 6400, 3546, 273, 11875, 309, 2589, 18, 7118, 1589,...
ht = khmer.new_hashtable(K, 1)
ht = khmer.new_hashbits(K, 1, 1)
def main(dir1, dir2, n_threads): # detect all of the relevant partitionmap files subset_filenames = glob.glob(os.path.join(dir1, '*.pmap')) # create empty hashtable structure ht = khmer.new_hashtable(K, 1) # put jobs on queue merge_queue = Queue.Queue() for filename in subset_filenames: merge_queue.put((ht, filename)) print 'starting threads' threads = [] for n in range(n_threads): t = threading.Thread(target=pull_pair, args=(merge_queue,)) threads.append(t) t.start() # wait for threads for t in threads: t.join() # done! if merge_queue.qsize() == 1: ht, merge_file = merge_queue.get() shutil.copy(merge_file, os.path.join(dir2, os.path.basename(merge_file))) assert merge_queue.qsize() == 0
eff72e89775da8c1e9b1e4f775912971d016875f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11148/eff72e89775da8c1e9b1e4f775912971d016875f/do-subset-merge.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 1214, 21, 16, 1577, 22, 16, 290, 67, 12495, 4672, 468, 5966, 777, 434, 326, 9368, 3590, 1458, 1390, 7931, 67, 19875, 273, 4715, 18, 10581, 12, 538, 18, 803, 18, 5701, 12, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 1214, 21, 16, 1577, 22, 16, 290, 67, 12495, 4672, 468, 5966, 777, 434, 326, 9368, 3590, 1458, 1390, 7931, 67, 19875, 273, 4715, 18, 10581, 12, 538, 18, 803, 18, 5701, 12, 1...
"nics": [(nic.mac, nic.ip, nic.bridge) for nic in instance.nics],
"nics": _NICListToTuple(self, instance.nics),
def Exec(self, feedback_fn): """Gather and return data""" result = {}
0b13832caf657d44cffa51b88993b21e835104ac /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7542/0b13832caf657d44cffa51b88993b21e835104ac/cmdlib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3889, 12, 2890, 16, 10762, 67, 4293, 4672, 3536, 26092, 471, 327, 501, 8395, 563, 273, 2618, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3889, 12, 2890, 16, 10762, 67, 4293, 4672, 3536, 26092, 471, 327, 501, 8395, 563, 273, 2618, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
self.tree.SetItemImage(self.treeroot,treeimages.Add(wx.Bitmap(DV.images_path+'icon16.png')))
self.tree.SetItemImage(self.treeroot,self.treeimages.Add(wx.Bitmap(DV.images_path+'icon16.png')))
def buildTree(self): self.tree.DeleteAllItems() treeimages=wx.ImageList(16,16,True) self.tree.AssignImageList(treeimages) self.treeroot=self.tree.AddRoot('DamnVid Preferences') self.tree.SetItemImage(self.treeroot,treeimages.Add(wx.Bitmap(DV.images_path+'icon16.png'))) self.searchprefs=self.tree.AppendItem(self.treeroot,'YouTube browser') self.tree.SetItemImage(self.searchprefs,treeimages.Add(wx.Bitmap(DV.images_path+'youtubebrowser.png'))) self.modulelistitem=self.tree.AppendItem(self.treeroot,'Modules') self.tree.SetItemImage(self.modulelistitem,treeimages.Add(wx.Bitmap(DV.images_path+'modules.png'))) self.modules={} self.moduledescs={} for i in DamnIterModules(): self.modules[i]=self.tree.AppendItem(self.modulelistitem,DV.modules[i]['title']) self.tree.SetItemImage(self.modules[i],treeimages.Add(wx.Bitmap(DV.modules_path+DV.modules[i]['name']+os.sep+DV.modules[i]['icon']['small']))) self.profileroot=self.tree.AppendItem(self.treeroot,'Encoding profiles') self.tree.SetItemImage(self.profileroot,treeimages.Add(wx.Bitmap(DV.images_path+'profiles.png'))) self.profiles=[] for i in range(0,DV.prefs.profiles): treeitem=self.tree.AppendItem(self.profileroot,DV.prefs.getp(i,'name')) self.profiles.append(treeitem) self.tree.SetItemImage(treeitem,treeimages.Add(wx.Bitmap(DV.images_path+'profile.png'))) self.tree.ExpandAll() self.forceSelect(self.treeroot)
634b608ae5f20543343f64e046fbaa5c38f2cbd8 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11142/634b608ae5f20543343f64e046fbaa5c38f2cbd8/DamnVid.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 2471, 12, 2890, 4672, 365, 18, 3413, 18, 2613, 1595, 3126, 1435, 2151, 7369, 33, 27226, 18, 2040, 682, 12, 2313, 16, 2313, 16, 5510, 13, 365, 18, 3413, 18, 4910, 2040, 682, 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, 1361, 2471, 12, 2890, 4672, 365, 18, 3413, 18, 2613, 1595, 3126, 1435, 2151, 7369, 33, 27226, 18, 2040, 682, 12, 2313, 16, 2313, 16, 5510, 13, 365, 18, 3413, 18, 4910, 2040, 682, 12, ...
OPTS=['DIR:direct/src/plugin_npapi']
OPTS=['DIR:direct/src/plugin_npapi', 'PLUGIN']
def CreatePandaVersionFiles(): version1=int(VERSION.split(".")[0]) version2=int(VERSION.split(".")[1]) version3=int(VERSION.split(".")[2]) nversion=version1*1000000+version2*1000+version3 pandaversion_h = PANDAVERSION_H.replace("VERSION1",str(version1)) pandaversion_h = pandaversion_h.replace("VERSION2",str(version2)) pandaversion_h = pandaversion_h.replace("VERSION3",str(version3)) pandaversion_h = pandaversion_h.replace("NVERSION",str(nversion)) checkpandaversion_cxx = CHECKPANDAVERSION_CXX.replace("VERSION1",str(version1)) checkpandaversion_cxx = checkpandaversion_cxx.replace("VERSION2",str(version2)) checkpandaversion_cxx = checkpandaversion_cxx.replace("VERSION3",str(version3)) checkpandaversion_cxx = checkpandaversion_cxx.replace("NVERSION",str(nversion)) checkpandaversion_h = CHECKPANDAVERSION_H.replace("VERSION1",str(version1)) checkpandaversion_h = checkpandaversion_h.replace("VERSION2",str(version2)) checkpandaversion_h = checkpandaversion_h.replace("VERSION3",str(version3)) checkpandaversion_h = checkpandaversion_h.replace("NVERSION",str(nversion)) ConditionalWriteFile(GetOutputDir()+'/include/pandaVersion.h', pandaversion_h) ConditionalWriteFile(GetOutputDir()+'/include/checkPandaVersion.cxx', checkpandaversion_cxx) ConditionalWriteFile(GetOutputDir()+'/include/checkPandaVersion.h', checkpandaversion_h) ConditionalWriteFile(GetOutputDir()+"/tmp/null.cxx","")
e3fa0022175dde573a1d33d792149dcb2851865e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8543/e3fa0022175dde573a1d33d792149dcb2851865e/makepanda.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1788, 52, 464, 69, 1444, 2697, 13332, 1177, 21, 33, 474, 12, 5757, 18, 4939, 2932, 1199, 25146, 20, 5717, 1177, 22, 33, 474, 12, 5757, 18, 4939, 2932, 1199, 25146, 21, 5717, 1177, 23, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1788, 52, 464, 69, 1444, 2697, 13332, 1177, 21, 33, 474, 12, 5757, 18, 4939, 2932, 1199, 25146, 20, 5717, 1177, 22, 33, 474, 12, 5757, 18, 4939, 2932, 1199, 25146, 21, 5717, 1177, 23, ...
collection_web_update_time = str(file.readline())
collection_web_update_time = string.strip(file.readline()) collection_web_update_time = re.sub(r'[A-Z ]+$', '', collection_web_update_time)
def perform_runwebcoll(colID, ln, confirm=0, callback='yes'): """Status of the collection tables / indexes""" subtitle = """<a name="11"></a>Webcoll Status""" output = "" colID = int(colID) col_dict = dict(get_def_name('', "collection")) output += """<br><b>Last updates:</b><br>""" collection_table_update_time = "" collection_web_update_time = "" res = run_sql("SHOW TABLE STATUS LIKE 'collection'") if res: if str(res[0][11])[-3:] == ".00": collection_table_update_time = str(res[0][11])[:-3] else: collection_table_update_time = str(res[0][11]) output += "Collection table last updated: %s<br>" % collection_table_update_time try: file = open("%s/collections/1/last-updated-ln=en.html" % cachedir) collection_web_update_time = str(file.readline()) output += "Collection webpage last updated: %s<br>" % collection_web_update_time file.close() except StandardError, e: pass tabletime = time.strptime(collection_table_update_time, "%Y-%m-%d %H:%M:%S") try: webtime = time.strptime(collection_web_update_time, "%d %b %Y %H:%M:%S %Z") except ValueError, e: collection_web_update_time[0:string.rfind(collection_web_update_time, " ")] webtime = time.strptime(collection_web_update_time, "%d %b %Y %H:%M:%S") if tabletime > webtime: output += """<br><b><span class="info">Warning: The collections has been modified since last time Webcoll was executed, to process the changes, Webcoll must be executed.</span></b><br>""" header = ['ID', 'Name', 'Time', 'Status', 'Progress'] actions = [] output += """<br><b>Last BibSched tasks:</b><br>""" res = run_sql("select id, proc, host, user, runtime, sleeptime, arguments, status, progress from schTASK where proc='webcoll' and runtime< now() ORDER by runtime") if len(res) > 0: (id, proc, host, user, runtime, sleeptime, arguments, status, progress) = res[len(res) - 1] webcoll__update_time = runtime actions.append([id, proc, runtime, (status !="" and status or ''), (progress !="" and progress or '')]) else: actions.append(['', 'webcoll', '', '', 'Not executed yet']) res = run_sql("select id, proc, host, user, runtime, sleeptime, arguments, status, progress from schTASK where proc='bibindex' and runtime< now() ORDER by runtime") if len(res) > 0: (id, proc, host, user, runtime, sleeptime, arguments, status, progress) = res[len(res) - 1] actions.append([id, proc, runtime, (status !="" and status or ''), (progress !="" and progress or '')]) else: actions.append(['', 'bibindex', '', '', 'Not executed yet']) output += tupletotable(header=header, tuple=actions) output += """<br><b>Next scheduled BibSched run:</b><br>""" actions = [] res = run_sql("select id, proc, host, user, runtime, sleeptime, arguments, status, progress from schTASK where proc='webcoll' and runtime > now() ORDER by runtime") webcoll_future = "" if len(res) > 0: (id, proc, host, user, runtime, sleeptime, arguments, status, progress) = res[0] webcoll__update_time = runtime actions.append([id, proc, runtime, (status !="" and status or ''), (progress !="" and progress or '')]) webcoll_future = "yes" else: actions.append(['', 'webcoll', '', '', 'Not scheduled']) res = run_sql("select id, proc, host, user, runtime, sleeptime, arguments, status, progress from schTASK where proc='bibindex' and runtime > now() ORDER by runtime") bibindex_future = "" if len(res) > 0: (id, proc, host, user, runtime, sleeptime, arguments, status, progress) = res[0] actions.append([id, proc, runtime, (status !="" and status or ''), (progress !="" and progress or '')]) bibindex_future = "yes" else: actions.append(['', 'bibindex', '', '', 'Not scheduled']) output += tupletotable(header=header, tuple=actions) if webcoll_future == "": output += """<br><b><span class="info">Warning: Webcoll is not scheduled for a future run by bibsched, any updates to the collection will not be processed.</span></b><br>""" if bibindex_future == "": output += """<br><b><span class="info">Warning: Bibindex is not scheduled for a future run by bibsched, any updates to the records will not be processed.</span></b><br>""" try: body = [output, extra] except NameError: body = [output] if callback: return perform_index(colID, ln, "perform_runwebcoll", addadminbox(subtitle, body)) else: return addadminbox(subtitle, body)
c77c596171df6d0086ebd1a934cf45e91f22634e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12027/c77c596171df6d0086ebd1a934cf45e91f22634e/websearchadminlib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3073, 67, 2681, 4875, 12910, 12, 1293, 734, 16, 7211, 16, 6932, 33, 20, 16, 1348, 2218, 9707, 11, 4672, 3536, 1482, 434, 326, 1849, 4606, 342, 5596, 8395, 225, 20281, 273, 3536, 32, 69...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3073, 67, 2681, 4875, 12910, 12, 1293, 734, 16, 7211, 16, 6932, 33, 20, 16, 1348, 2218, 9707, 11, 4672, 3536, 1482, 434, 326, 1849, 4606, 342, 5596, 8395, 225, 20281, 273, 3536, 32, 69...
if winUser.getAncestor(self.NVDAObject.windowHandle,winUser.GA_ROOT)==winUser.getForegroundWindow():
if winUser.isDescendantWindow(self.NVDAObject.windowHandle,api.getFocusObject().windowHandle):
def loadDocument(self): if self.dom.body.isContentEditable is True: #This is an editable document and will not be managed by this virtualBuffer return if winUser.getAncestor(self.NVDAObject.windowHandle,winUser.GA_ROOT)==winUser.getForegroundWindow(): audio.cancel() if api.isVirtualBufferPassThrough(): api.toggleVirtualBufferPassThrough() audio.speakMessage(_("loading document %s")%self.dom.title+"...") self.resetBuffer() self.fillBuffer(self.dom) self.text_reviewOffset=0 if winUser.getAncestor(self.NVDAObject.windowHandle,winUser.GA_ROOT)==winUser.getForegroundWindow(): audio.cancel() self.text_reviewOffset=0 time.sleep(0.01) audio.speakMessage(_("done")) self.text_reportNewPresentation(self.text_reviewOffset) self.text_speakLine(self.text_reviewOffset)
2ccbd29a498b50e15a00cf571a2d239c140eb639 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9340/2ccbd29a498b50e15a00cf571a2d239c140eb639/MSHTML.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1262, 2519, 12, 2890, 4672, 309, 365, 18, 9859, 18, 3432, 18, 291, 1350, 15470, 353, 1053, 30, 468, 2503, 353, 392, 13754, 1668, 471, 903, 486, 506, 7016, 635, 333, 5024, 1892, 327, 30...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1262, 2519, 12, 2890, 4672, 309, 365, 18, 9859, 18, 3432, 18, 291, 1350, 15470, 353, 1053, 30, 468, 2503, 353, 392, 13754, 1668, 471, 903, 486, 506, 7016, 635, 333, 5024, 1892, 327, 30...
self.editor = conf.get('prefs', 'editor')
def __init__(self):
9528ffe985b91cbffe7621720ac1de8beeca167e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/9528ffe985b91cbffe7621720ac1de8beeca167e/mirage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
self.write('if (%s) {' % self.generatecond(node.cond))
self.write('if (%s) {' % self.generatecond(self.adoptcond(node.cond)))
def generate_If(self, node): if self.debugging: self.dumpcomplex(self)
0f4992cce44f3fbf1046ec1c6c981bc4fad023f7 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2040/0f4992cce44f3fbf1046ec1c6c981bc4fad023f7/c.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 67, 2047, 12, 2890, 16, 756, 4672, 309, 365, 18, 4148, 1998, 30, 365, 18, 8481, 14259, 12, 2890, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2103, 67, 2047, 12, 2890, 16, 756, 4672, 309, 365, 18, 4148, 1998, 30, 365, 18, 8481, 14259, 12, 2890, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
raise NotImplementedError( "abstract method: use format_option_strings_short_first or " "format_option_strings_long_first instead.") def format_option_strings_short_first (self, option): opts = [] takes_value = option.takes_value() if takes_value:
if option.takes_value():
def format_option_strings (self, option): """Return a comma-separated list of option strings & metavariables.""" raise NotImplementedError( "abstract method: use format_option_strings_short_first or " "format_option_strings_long_first instead.")
2492fcf3b0d58eafc9a7551263857649fcc7f1a4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/2492fcf3b0d58eafc9a7551263857649fcc7f1a4/optparse.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 740, 67, 3482, 67, 10219, 261, 2890, 16, 1456, 4672, 3536, 990, 279, 8716, 17, 24622, 666, 434, 1456, 2064, 473, 9170, 12954, 1538, 12123, 1002, 11206, 12, 315, 17801, 707, 30, 999, 740,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 740, 67, 3482, 67, 10219, 261, 2890, 16, 1456, 4672, 3536, 990, 279, 8716, 17, 24622, 666, 434, 1456, 2064, 473, 9170, 12954, 1538, 12123, 1002, 11206, 12, 315, 17801, 707, 30, 999, 740,...
method_name
method_name, self.allow_dotted_names
def system_methodHelp(self, method_name): """system.methodHelp('add') => "Adds two integers together"
5f05dcb05a44eb9330196a202687eec8d955644e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/5f05dcb05a44eb9330196a202687eec8d955644e/SimpleXMLRPCServer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2619, 67, 2039, 6696, 12, 2890, 16, 707, 67, 529, 4672, 3536, 4299, 18, 2039, 6696, 2668, 1289, 6134, 516, 315, 3655, 2795, 12321, 9475, 6, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 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, 2619, 67, 2039, 6696, 12, 2890, 16, 707, 67, 529, 4672, 3536, 4299, 18, 2039, 6696, 2668, 1289, 6134, 516, 315, 3655, 2795, 12321, 9475, 6, 2, -100, -100, -100, -100, -100, -100, -100, ...
print "Ignore locale..."
def search_loop(node, stringMap={}, verbose=False): if node.type == "call": oper = node.getChild("operand", False) if oper: variable = oper.getChild("variable", False) if variable: try: variableName = treeutil.assembleVariable(variable) except tree.NodeAccessException: variableName = None # Don't extract from locales if variableName == "qx.Locale.define": print "Ignore locale..." return stringMap if node.type == "constant" and node.get("constantType") == "string": if verbose: pvalue = node.get("value") if isinstance(pvalue, unicode): pvalue = pvalue.encode("utf-8") print " - Found: %s" % pvalue if node.get("detail") == "singlequotes": quote = "'" elif node.get("detail") == "doublequotes": quote = '"' value = "%s%s%s" % (quote, node.get("value"), quote) if value in stringMap: stringMap[value] += 1 else: stringMap[value] = 1 if check(node, verbose): for child in node.children: search_loop(child, stringMap, verbose) return stringMap
03cf02b61e1c38b7fb6b586e20da3bef8df9faba /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5718/03cf02b61e1c38b7fb6b586e20da3bef8df9faba/stringoptimizer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1623, 67, 6498, 12, 2159, 16, 533, 863, 28793, 3988, 33, 8381, 4672, 309, 756, 18, 723, 422, 315, 1991, 6877, 2255, 273, 756, 18, 588, 1763, 2932, 4063, 464, 3113, 1083, 13, 225, 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, 1623, 67, 6498, 12, 2159, 16, 533, 863, 28793, 3988, 33, 8381, 4672, 309, 756, 18, 723, 422, 315, 1991, 6877, 2255, 273, 756, 18, 588, 1763, 2932, 4063, 464, 3113, 1083, 13, 225, 309, ...
except _winreg.error:
except win32api.error:
def find_module(self, name, path): if name in self.excludes: self.msgout(3, "find_module -> Excluded") raise ImportError, name
d8c3466dfb0ae0eb2105137bf301bbd7bbd5637c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1361/d8c3466dfb0ae0eb2105137bf301bbd7bbd5637c/modulefinder.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 67, 2978, 12, 2890, 16, 508, 16, 589, 4672, 309, 508, 316, 365, 18, 338, 8993, 30, 365, 18, 3576, 659, 12, 23, 16, 315, 4720, 67, 2978, 317, 1312, 7908, 7923, 1002, 11308, 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, 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, 1104, 67, 2978, 12, 2890, 16, 508, 16, 589, 4672, 309, 508, 316, 365, 18, 338, 8993, 30, 365, 18, 3576, 659, 12, 23, 16, 315, 4720, 67, 2978, 317, 1312, 7908, 7923, 1002, 11308, 16, ...
try: self.__mtx.release() self.join() finally: self.__mtx.acquire()
def abort(self): try: self.__mtx.acquire() self.__do_abort = True if self.__started: try: self.proxy.abort() except: pass try: self.__mtx.release() self.join() finally: self.__mtx.acquire() finally: self.__mtx.release()
c7947691a7d1e74878c1ce8b43802ac05047e694 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2459/c7947691a7d1e74878c1ce8b43802ac05047e694/activity.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6263, 12, 2890, 4672, 775, 30, 365, 16186, 81, 978, 18, 1077, 1039, 1435, 365, 16186, 2896, 67, 18623, 273, 1053, 309, 365, 16186, 14561, 30, 775, 30, 365, 18, 5656, 18, 18623, 1435, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 6263, 12, 2890, 4672, 775, 30, 365, 16186, 81, 978, 18, 1077, 1039, 1435, 365, 16186, 2896, 67, 18623, 273, 1053, 309, 365, 16186, 14561, 30, 775, 30, 365, 18, 5656, 18, 18623, 1435, 1...
if not self._bymonthday: self._bymonthday = None elif not self._bynmonthday: self._bynmonthday = None
def __init__(self, freq, dtstart=None, interval=1, wkst=0, count=None, until=None, bysetpos=None, bymonth=None, bymonthday=None, byyearday=None, byeaster=None, byweekno=None, byweekday=None, byhour=None, byminute=None, bysecond=None, cache=False): if cache: self._cache = [] self._cache_lock = thread.allocate_lock() self._cache_gen = self._iter() else: self._cache = None if not dtstart: dtstart = datetime.datetime.now() self._dtstart = dtstart self._tzinfo = dtstart.tzinfo self._freq = freq self._interval = interval self._count = count self._until = until if type(wkst) is int: self._wkst = wkst else: self._wkst = wkst.weekday if bysetpos is None: self._bysetpos = None elif type(bysetpos) is int: self._bysetpos = (bysetpos,) else: self._bysetpos = tuple(bysetpos) if not (byweekno or byyearday or bymonthday or byweekday is not None or byeaster is not None): if freq == FREQ_YEARLY: if not bymonth: bymonth = dtstart.month bymonthday = dtstart.day elif freq == FREQ_MONTHLY: bymonthday = dtstart.day elif freq == FREQ_WEEKLY: byweekday = dtstart.weekday() # bymonth if not bymonth: self._bymonth = None elif type(bymonth) is int: self._bymonth = (bymonth,) else: self._bymonth = tuple(bymonth) # byyearday if not byyearday: self._byyearday = None elif type(byyearday) is int: self._byyearday = (byyearday,) else: self._byyearday = tuple(byyearday) # byeaster if byeaster is not None: if not easter: from dateutil import easter if type(byeaster) is int: self._byeaster = (byeaster,) else: self._byeaster = tuple(byeaster) else: self._byeaster = None # bymonthay if not bymonthday: self._bymonthday = None self._bynmonthday = None elif type(bymonthday) is int: if bymonthday < 0: self._bynmonthday = (bymonthday,) self._bymonthday = None else: self._bymonthday = (bymonthday,) self._bynmonthday = None else: self._bymonthday = tuple([x for x in bymonthday if x > 0]) self._bynmonthday = tuple([x for x in bymonthday if x < 0]) if not self._bymonthday: self._bymonthday = None elif not self._bynmonthday: self._bynmonthday = None # byweekno if byweekno is None: self._byweekno = None elif type(byweekno) is int: self._byweekno = (byweekno,) else: self._byweekno = tuple(byweekno) # byweekday / bynweekday if byweekday is None: self._byweekday = None self._bynweekday = None elif type(byweekday) is int: self._byweekday = (byweekday,) self._bynweekday = None elif hasattr(byweekday, "n"): if byweekday.n == 0: self._byweekday = (byweekday.weekday,) self._bynweekday = None else: self._bynweekday = ((byweekday.weekday, byweekday.n),) self._byweekday = None else: self._byweekday = [] self._bynweekday = [] for wday in byweekday: if type(wday) is int: self._byweekday.append(wday) elif wday.n == 0: self._byweekday.append(wday.weekday) else: self._bynweekday.append((wday.weekday, wday.n)) self._byweekday = tuple(self._byweekday) self._bynweekday = tuple(self._bynweekday) if not self._byweekday: self._byweekday = None elif not self._bynweekday: self._bynweekday = None # byhour if byhour is None: if freq < FREQ_HOURLY: self._byhour = (dtstart.hour,) else: self._byhour = None elif type(byhour) is int: self._byhour = (byhour,) else: self._byhour = tuple(byhour) # byminute if byminute is None: if freq < FREQ_MINUTELY: self._byminute = (dtstart.minute,) else: self._byminute = None elif type(byminute) is int: self._byminute = (byminute,) else: self._byminute = tuple(byminute) # bysecond if bysecond is None: if freq < FREQ_SECONDLY: self._bysecond = (dtstart.second,) else: self._bysecond = None elif type(bysecond) is int: self._bysecond = (bysecond,) else: self._bysecond = tuple(bysecond)
d375f07e08a8fd61f1640e67f981e1abdac8d8d1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8441/d375f07e08a8fd61f1640e67f981e1abdac8d8d1/rrule.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 7684, 16, 3681, 1937, 33, 7036, 16, 3673, 33, 21, 16, 26987, 334, 33, 20, 16, 1056, 33, 7036, 16, 3180, 33, 7036, 16, 635, 542, 917, 33, 7036, 16, 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, 1001, 2738, 972, 12, 2890, 16, 7684, 16, 3681, 1937, 33, 7036, 16, 3673, 33, 21, 16, 26987, 334, 33, 20, 16, 1056, 33, 7036, 16, 3180, 33, 7036, 16, 635, 542, 917, 33, 7036, 16, 63...
out.append([ext,match.group()])
out.append([ext,match.group(1)])
def get_fulltext_urls_from_html_page(htmlpagebody): """Parses htmlpagebody data looking for url_directs referring to probable fulltexts. Returns an array of (ext,url_direct) to fulltexts. Note: it looks for file format extensions as defined by global 'conv_programs'structure. """ out = [] for ext in conv_programs.keys(): expr = sre.compile( r"\"(http://[\w]+\.+[\w]+[^\"'><]*\.)(" + \ ext + r")\"") match = expr.search(htmlpagebody) if match: out.append([ext,match.group()]) else: # FIXME: workaround for getfile, should use bibdoc tables expr_getfile = sre.compile(r"\"(http://.*getfile\.py\?.*format=" + ext + r"&version=.*)\"") match = expr_getfile.search(htmlpagebody) if match: out.append([ext,match.group()]) return out
561825a6b79fb9a0227b867de758f582751b04a3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12027/561825a6b79fb9a0227b867de758f582751b04a3/bibindex_engine.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 2854, 955, 67, 10518, 67, 2080, 67, 2620, 67, 2433, 12, 2620, 2433, 3432, 4672, 3536, 6656, 1729, 2433, 3432, 501, 7849, 364, 880, 67, 7205, 87, 1278, 20245, 358, 3137, 429, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2854, 955, 67, 10518, 67, 2080, 67, 2620, 67, 2433, 12, 2620, 2433, 3432, 4672, 3536, 6656, 1729, 2433, 3432, 501, 7849, 364, 880, 67, 7205, 87, 1278, 20245, 358, 3137, 429, 1...
print "OD is", output_dir
for undef in ext.undef_macros: macros.append((undef,))
b4ebdb012b8956f77a129c82ec3145a261fe4b60 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/992/b4ebdb012b8956f77a129c82ec3145a261fe4b60/setup_win32all.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 364, 640, 536, 316, 1110, 18, 318, 536, 67, 5821, 6973, 30, 24302, 18, 6923, 12443, 318, 536, 16, 3719, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 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, 364, 640, 536, 316, 1110, 18, 318, 536, 67, 5821, 6973, 30, 24302, 18, 6923, 12443, 318, 536, 16, 3719, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
"""Returns the (1-tail) probability value associated with the provided chi-square value and degrees of freedom.
"""Returns the (1-tail) probability value associated with the provided chi-square value and degrees of freedom.
def chisqprob(chisq, df): """Returns the (1-tail) probability value associated with the provided chi-square value and degrees of freedom. Broadcasting rules apply. Parameters ---------- chisq : array or float > 0 df : array or float, probably int >= 1 Returns ------- The area from chisq to infinity under the Chi^2 probability distribution with degrees of freedom df. """ return special.chdtrc(df,chisq)
4df9a383125c76d1f060a1bc70e49a9dd5337298 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12971/4df9a383125c76d1f060a1bc70e49a9dd5337298/stats.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 462, 291, 85, 7748, 12, 343, 291, 85, 16, 3013, 4672, 3536, 1356, 326, 261, 21, 17, 13101, 13, 11331, 460, 3627, 598, 326, 2112, 17198, 17, 19719, 460, 471, 10904, 434, 28004, 362, 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, 462, 291, 85, 7748, 12, 343, 291, 85, 16, 3013, 4672, 3536, 1356, 326, 261, 21, 17, 13101, 13, 11331, 460, 3627, 598, 326, 2112, 17198, 17, 19719, 460, 471, 10904, 434, 28004, 362, 18,...
with open(self.state('logfile')) as f: s = f.read() return s
f = open(self.state('logfile')) s = f.read() f.close() return s
def getEntireLog(self): s = '' with open(self.state('logfile')) as f: s = f.read() return s
f0feea8f1495b981f2e614054094f7daf1ac1387 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7016/f0feea8f1495b981f2e614054094f7daf1ac1387/ADR.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4774, 496, 577, 1343, 12, 2890, 4672, 272, 273, 875, 284, 273, 1696, 12, 2890, 18, 2019, 2668, 28806, 26112, 272, 273, 284, 18, 896, 1435, 284, 18, 4412, 1435, 327, 272, 225, 2, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4774, 496, 577, 1343, 12, 2890, 4672, 272, 273, 875, 284, 273, 1696, 12, 2890, 18, 2019, 2668, 28806, 26112, 272, 273, 284, 18, 896, 1435, 284, 18, 4412, 1435, 327, 272, 225, 2, -100, ...
return "Block entry %u" % self["crc16"]
return "Block entry: %s" % self["type"].display
def createDescription(self): return "Block entry %u" % self["crc16"]
9be6b66d3e7ceacca1ad4a124689b228fec9523a /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9327/9be6b66d3e7ceacca1ad4a124689b228fec9523a/rar.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 3291, 12, 2890, 4672, 327, 315, 1768, 1241, 738, 89, 6, 738, 365, 9614, 22988, 2313, 11929, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 3291, 12, 2890, 4672, 327, 315, 1768, 1241, 738, 89, 6, 738, 365, 9614, 22988, 2313, 11929, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
if not layout_manager.index_updated:
if not layoutmanager.get_instance().index_updated:
def __init__(self, **options): bus_name = dbus.service.BusName(DS_SERVICE, bus=dbus.SessionBus(), replace_existing=False, allow_replacement=False) dbus.service.Object.__init__(self, bus_name, DS_OBJECT_PATH)
f37d7c51f76cdd1bead1d936d6ec88d792a97765 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9394/f37d7c51f76cdd1bead1d936d6ec88d792a97765/datastore.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2826, 2116, 4672, 5766, 67, 529, 273, 21866, 18, 3278, 18, 7086, 461, 12, 3948, 67, 12426, 16, 5766, 33, 1966, 407, 18, 2157, 7086, 9334, 1453, 67, 11711...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2826, 2116, 4672, 5766, 67, 529, 273, 21866, 18, 3278, 18, 7086, 461, 12, 3948, 67, 12426, 16, 5766, 33, 1966, 407, 18, 2157, 7086, 9334, 1453, 67, 11711...
kw['initial'] = product.unit_price
if 'CustomProduct' in subtypes: initial_price = product.customproduct.full_price else: initial_price = product.unit_price kw['initial'] = initial_price
def __init__(self, *args, **kwargs): products = kwargs.pop('products', None)
b73c381bdc5e53f6b78ccc6ee327f033d2698ac9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/13656/b73c381bdc5e53f6b78ccc6ee327f033d2698ac9/forms.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 380, 1968, 16, 2826, 4333, 4672, 10406, 273, 1205, 18, 5120, 2668, 18736, 2187, 599, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 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, 380, 1968, 16, 2826, 4333, 4672, 10406, 273, 1205, 18, 5120, 2668, 18736, 2187, 599, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
ids = model_field_obj.search(cursor, user, [('view_load', '=', 1)])
ids = model_field_obj.search(cursor, user, [])
def models_get(self, cursor, user, context=None): model_field_obj = self.pool.get('ir.model.field') ids = model_field_obj.search(cursor, user, [('view_load', '=', 1)]) res = [] done = {} for model_field in model_field_obj.browse(cursor, user, ids, context=context): if model_field.model.id not in done: res.append([model_field.model.model, model_field.model.name]) done[model_field.model.id] = True return res
110c4bc565e434c9c7764408f1bec104a5715e2d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9266/110c4bc565e434c9c7764408f1bec104a5715e2d/property.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3679, 67, 588, 12, 2890, 16, 3347, 16, 729, 16, 819, 33, 7036, 4672, 938, 67, 1518, 67, 2603, 273, 365, 18, 6011, 18, 588, 2668, 481, 18, 2284, 18, 1518, 6134, 225, 3258, 273, 938, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3679, 67, 588, 12, 2890, 16, 3347, 16, 729, 16, 819, 33, 7036, 4672, 938, 67, 1518, 67, 2603, 273, 365, 18, 6011, 18, 588, 2668, 481, 18, 2284, 18, 1518, 6134, 225, 3258, 273, 938, ...
self.doc = implementation.createDocument(None, "svg", None)
doctype = implementation.createDocumentType("svg", "-//W3C//DTD SVG 1.0//EN", "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd") self.doc = implementation.createDocument(None,"svg",doctype)
def __init__(self, size=(300,300)): self.verbose = 0 self.width, self.height = self.size = size # self.height = size[1] self.code = [] self.style = {} self.path = '' self._strokeColor = self._fillColor = self._lineWidth = \ self._font = self._fontSize = self._lineCap = \ self._lineJoin = self._color = None
37afe6db14252697b2c6f0bd32cd0cbf4e4ebe03 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3878/37afe6db14252697b2c6f0bd32cd0cbf4e4ebe03/renderSVG.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 963, 28657, 19249, 16, 19249, 3719, 30, 365, 18, 11369, 273, 374, 365, 18, 2819, 16, 365, 18, 4210, 273, 365, 18, 1467, 273, 963, 468, 365, 18, 4210, 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, 1001, 2738, 972, 12, 2890, 16, 963, 28657, 19249, 16, 19249, 3719, 30, 365, 18, 11369, 273, 374, 365, 18, 2819, 16, 365, 18, 4210, 273, 365, 18, 1467, 273, 963, 468, 365, 18, 4210, 2...
yield nextchar
if nextchar == ')' and stream_i.peek() == '(': yield ')(' else: yield nextchar
def read_token_stream(self, stream_i): whitespace = self.WHITESPACE wordchars = self.NON_SPECIALS read_until = self.read_until
42e5fe7a3fb35c72f1f2318060befd51b8e7eb5c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9352/42e5fe7a3fb35c72f1f2318060befd51b8e7eb5c/response_lexer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 67, 2316, 67, 3256, 12, 2890, 16, 1407, 67, 77, 4672, 7983, 273, 365, 18, 20767, 2076, 7549, 273, 365, 18, 3993, 67, 13847, 30308, 855, 67, 12198, 273, 365, 18, 896, 67, 12198, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 855, 67, 2316, 67, 3256, 12, 2890, 16, 1407, 67, 77, 4672, 7983, 273, 365, 18, 20767, 2076, 7549, 273, 365, 18, 3993, 67, 13847, 30308, 855, 67, 12198, 273, 365, 18, 896, 67, 12198, ...
record['res_id']=new_id trans_obj.create(cr,uid,record)
record['res_id'] = new_id trans_obj.create(cr, uid, record, context)
def copy(self, cr, uid, id, default=None, context=None): trans_obj = self.pool.get('ir.translation') data, trans_data = self.copy_data(cr, uid, id, default, context) new_id=self.create(cr, uid, data) for record in trans_data: del record['id'] record['res_id']=new_id trans_obj.create(cr,uid,record) return new_id
7b48feea4fd84977cd14feabe9206b6fb8899a7f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/7b48feea4fd84977cd14feabe9206b6fb8899a7f/orm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1610, 12, 2890, 16, 4422, 16, 4555, 16, 612, 16, 805, 33, 7036, 16, 819, 33, 7036, 4672, 906, 67, 2603, 273, 365, 18, 6011, 18, 588, 2668, 481, 18, 10173, 6134, 501, 16, 906, 67, 8...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1610, 12, 2890, 16, 4422, 16, 4555, 16, 612, 16, 805, 33, 7036, 16, 819, 33, 7036, 4672, 906, 67, 2603, 273, 365, 18, 6011, 18, 588, 2668, 481, 18, 10173, 6134, 501, 16, 906, 67, 8...
self.stdout_backup = sys.stdout sys.stdout = open(os.devnull, 'w')
self.stderr_backup = sys.stderr sys.stderr = open(os.devnull, 'w')
def setUp(self): self.stdout_backup = sys.stdout sys.stdout = open(os.devnull, 'w') self.zone_refresh = MyZonemgrRefresh()
ddf21e206a3be38788eb385d5fcf57bfca3bac20 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6792/ddf21e206a3be38788eb385d5fcf57bfca3bac20/zonemgr_test.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24292, 12, 2890, 4672, 365, 18, 11241, 67, 9572, 273, 2589, 18, 11241, 2589, 18, 11241, 273, 1696, 12, 538, 18, 5206, 2011, 16, 296, 91, 6134, 365, 18, 3486, 67, 9144, 273, 8005, 62, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 24292, 12, 2890, 4672, 365, 18, 11241, 67, 9572, 273, 2589, 18, 11241, 2589, 18, 11241, 273, 1696, 12, 538, 18, 5206, 2011, 16, 296, 91, 6134, 365, 18, 3486, 67, 9144, 273, 8005, 62, ...
win = DrawFrame(None, -1, "FloatCanvas Drawing Window",wxDefaultPosition,wxSize(500,500))
win = DrawFrame(None, -1, "FloatCanvas Drawing Window", wx.DefaultPosition, (500,500))
def runTest(frame, nb, log): """ This method is used by the wxPython Demo Framework for integrating this demo with the rest. """ global colors wxPython.lib.colourdb.updateColourDB() colors = wxPython.lib.colourdb.getColourList()
707fbe5d0f6e4988cc42444956cefd4136d0c1fc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/707fbe5d0f6e4988cc42444956cefd4136d0c1fc/FloatCanvas.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 4709, 12, 3789, 16, 4264, 16, 613, 4672, 3536, 1220, 707, 353, 1399, 635, 326, 7075, 15774, 27744, 83, 13472, 364, 11301, 1776, 333, 21477, 598, 326, 3127, 18, 3536, 2552, 5740, 70...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 4709, 12, 3789, 16, 4264, 16, 613, 4672, 3536, 1220, 707, 353, 1399, 635, 326, 7075, 15774, 27744, 83, 13472, 364, 11301, 1776, 333, 21477, 598, 326, 3127, 18, 3536, 2552, 5740, 70...
obj = self.pool.get(self._columns[field].model_name)
obj = self.pool.get(fld_def.model_name)
fld_def = (field in self._columns) and self._columns[field] \ or self._inherit_fields[field][2]
56f83deedfea47bd6f52ae156b82a15db12ee860 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9266/56f83deedfea47bd6f52ae156b82a15db12ee860/modelstorage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 9880, 67, 536, 273, 261, 1518, 316, 365, 6315, 5112, 13, 471, 365, 6315, 5112, 63, 1518, 65, 521, 578, 365, 6315, 6018, 67, 2821, 63, 1518, 6362, 22, 65, 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, 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, 9880, 67, 536, 273, 261, 1518, 316, 365, 6315, 5112, 13, 471, 365, 6315, 5112, 63, 1518, 65, 521, 578, 365, 6315, 6018, 67, 2821, 63, 1518, 6362, 22, 65, 2, -100, -100, -100, -100, -100, -...
... return line3d([(0,0,1), (2*sqrt(2.)/3,0,-1./3), (-sqrt(2.)/3, sqrt(6.)/3,-1./3),\
... return line3d([(0,0,1), (2*sqrt(2.)/3,0,-1./3), (-sqrt(2.)/3, sqrt(6.)/3,-1./3),\
sage: def tetra(col):
65343a14eea795bf4f76cc40264764e4584eebb6 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/65343a14eea795bf4f76cc40264764e4584eebb6/shapes2.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 272, 410, 30, 1652, 268, 30710, 12, 1293, 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, 272, 410, 30, 1652, 268, 30710, 12, 1293, 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,...
EnqueueLink(opts=['ADVAPI', 'NSPR', 'OPENSSL', 'OPT4'], dll='interrogate_module.exe', obj=[
EnqueueLink(opts=['ADVAPI', 'NSPR', 'OPENSSL', 'OPT3'], dll='interrogate_module.exe', obj=[
if (val == 'UNDEF'): conf = conf + "#undef " + key + "\n"
bc5fc1af0298e68a51a18dc8bc8da9f86c4f411e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8543/bc5fc1af0298e68a51a18dc8bc8da9f86c4f411e/makepanda.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 309, 261, 1125, 422, 296, 2124, 12904, 11, 4672, 2195, 273, 2195, 397, 6619, 318, 536, 315, 397, 498, 397, 1548, 82, 6, 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, 309, 261, 1125, 422, 296, 2124, 12904, 11, 4672, 2195, 273, 2195, 397, 6619, 318, 536, 315, 397, 498, 397, 1548, 82, 6, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
self.TextCtrl_MYSQL_USER = wx.TextCtrl(self, -1, "ANONYMOUS")
self.TextCtrl_MYSQL_USER = wx.TextCtrl(self, -1, "selector")
def __init__(self, *args, **kwds): # begin wxGlade: ConfiguratorFrame.__init__ kwds["style"] = wx.DEFAULT_FRAME_STYLE wx.Frame.__init__(self, *args, **kwds) self.L_CLUSTER_IP = wx.StaticText(self, -1, "CLUSTER_IP") self.TextCtrl_CLUSTER_IP = wx.TextCtrl(self, -1, "") self.L_SSH_PATIENCE = wx.StaticText(self, -1, "SSH_PATIENCE") self.TextCtrl_SSH_PATIENCE = wx.TextCtrl(self, -1, "20") self.L_CLUSTER_NETMASK = wx.StaticText(self, -1, "CLUSTER_NETMASK") self.TextCtrl_CLUSTER_NETMASK = wx.TextCtrl(self, -1, "") self.L_MONITOR_PATIENCE = wx.StaticText(self, -1, "MONITOR_PATIENCE") self.TextCtrl_MONITOR_PATIENCE = wx.TextCtrl(self, -1, "10") self.L_CLUSTER_BROADCAST = wx.StaticText(self, -1, "CLUSTER_BROADCAST") self.TextCtrl_CLUSTER_BROADCAST = wx.TextCtrl(self, -1, "") self.L_MONITOR_CHK_THRESHOLD = wx.StaticText(self, -1, "MONITOR_CHK_THRESHOLD") self.TextCtrl_MONITOR_CHK_THRESHOLD = wx.TextCtrl(self, -1, "20") self.L_CLUSTER_DEVICE = wx.StaticText(self, -1, "CLUSTER_DEVICE") self.TextCtrl_CLUSTER_DEVICE = wx.TextCtrl(self, -1, "") self.L_MYSQL_KILL_WAIT = wx.StaticText(self, -1, "MYSQL_KILL_WAIT") self.TextCtrl_MYSQL_KILL_WAIT = wx.TextCtrl(self, -1, "5") self.L_MYSQL_USER = wx.StaticText(self, -1, "MYSQL_USER") self.TextCtrl_MYSQL_USER = wx.TextCtrl(self, -1, "ANONYMOUS") self.L_MYSQL_RESTART_WAIT = wx.StaticText(self, -1, "MYSQL_RESTART_WAIT") self.TextCtrl_MYSQL_RESTART_WAIT = wx.TextCtrl(self, -1, "5") self.L_MYSQL_PASSWORD = wx.StaticText(self, -1, "MYSQL_PASSWORD") self.TextCtrl_MYSQL_PASSWORD = wx.TextCtrl(self, -1, "EMPTY") self.L_FPING_ATTEMPTS = wx.StaticText(self, -1, "FPING_ATTEMPTS") self.TextCtrl_FPING_ATTEMPTS = wx.TextCtrl(self, -1, "3") self.L_REPLICATION_USER = wx.StaticText(self, -1, "REPLICATION_USER") self.TextCtrl_REPLICATION_USER = wx.TextCtrl(self, -1, "replicator") self.L_SLAVE = wx.StaticText(self, -1, "SLAVE") self.TextCtrl_SLAVE = wx.TextCtrl(self, -1, "mysql-slave") self.L_REPLICATION_PASSWORD = wx.StaticText(self, -1, "REPLICATION_PASSWORD") self.TextCtrl_REPLICATION_PASSWORD = wx.TextCtrl(self, -1, "replicatorpwd") self.L_SIG_KILL_WAIT = wx.StaticText(self, -1, "SIG_KILL_WAIT") self.TextCtrl_SIG_KILL_WAIT = wx.TextCtrl(self, -1, "5") self.L_MYSQL_DATABASE = wx.StaticText(self, -1, "MYSQL_DATABASE") self.TextCtrl_MYSQL_DATABASE = wx.TextCtrl(self, -1, "") self.L_DB_USER = wx.StaticText(self, -1, "DB_USER") self.TextCtrl_DB_USER = wx.TextCtrl(self, -1, "root") self.L_ARP_DELAY = wx.StaticText(self, -1, "ARP_DELAY") self.TextCtrl_ARP_DELAY = wx.TextCtrl(self, -1, "5") self.L_DB_PASSWORD = wx.StaticText(self, -1, "DB_PASSWORD") self.TextCtrl_DB_PASSWORD = wx.TextCtrl(self, -1, "rootpwd") self.L_MASTER_SLEEP_TIME = wx.StaticText(self, -1, "MASTER_SLEEP_TIME") self.TextCtrl_MASTER_SLEEP_TIME = wx.TextCtrl(self, -1, "60") self.L_NOTIFY_EMAIL = wx.StaticText(self, -1, "NOTIFY_EMAIL") self.TextCtrl_NOTIFY_EMAIL = wx.TextCtrl(self, -1, "root@localhost") self.L_SLAVE_SLEEP_TIME = wx.StaticText(self, -1, "SLAVE_SLEEP_TIME") self.TextCtrl_SLAVE_SLEEP_TIME = wx.TextCtrl(self, -1, "60") self.SaveConfiguration = wx.Button(self, -1, "Save Configuration") self.Cancel = wx.Button(self, -1, "Cancel") self.isMaster = wx.CheckBox(self, -1, "This is the master node")
ee7473995f59406ec04159ff46a27e1ed6a34bbd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/848/ee7473995f59406ec04159ff46a27e1ed6a34bbd/configuration-wxpython.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 380, 1968, 16, 2826, 25577, 4672, 468, 2376, 7075, 21308, 2486, 30, 1903, 10662, 3219, 16186, 2738, 972, 17149, 9614, 4060, 11929, 273, 7075, 18, 5280, 67, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 380, 1968, 16, 2826, 25577, 4672, 468, 2376, 7075, 21308, 2486, 30, 1903, 10662, 3219, 16186, 2738, 972, 17149, 9614, 4060, 11929, 273, 7075, 18, 5280, 67, ...
self.conn.send.deleteid(self.currentdata.get_value(model.get_iter(path), 0)) self.conn.do.command_list_end()
self.conn.do.deleteid(self.currentdata.get_value(model.get_iter(path), 0))
def remove(self, widget): if self.conn: page_num = self.notebook.get_current_page() if page_num == self.TAB_CURRENT: model, selected = self.current_selection.get_selected_rows() if len(selected) == len(self.currentdata): # Everything is selected, clear: self.conn.do.clear() elif len(selected) > 0: self.conn.send.command_list_begin() for path in selected: self.conn.send.deleteid(self.currentdata.get_value(model.get_iter(path), 0)) self.conn.do.command_list_end() elif page_num == self.TAB_PLAYLISTS: dialog = gtk.MessageDialog(self.window, gtk.DIALOG_MODAL, gtk.MESSAGE_WARNING, gtk.BUTTONS_YES_NO, _("Delete the selected playlist(s)?")) dialog.set_title(_("Delete Playlist(s)")) response = dialog.run() if response == gtk.RESPONSE_YES: dialog.destroy() model, selected = self.playlists_selection.get_selected_rows() iters = [model.get_iter(path) for path in selected] self.conn.send.command_list_begin() for iter in iters: self.conn.send.rm(unescape_html(self.playlistsdata.get_value(iter, 1))) self.conn.do.command_list_end() self.playlists_populate() else: dialog.destroy() elif page_num == self.TAB_STREAMS: dialog = gtk.MessageDialog(self.window, gtk.DIALOG_MODAL, gtk.MESSAGE_WARNING, gtk.BUTTONS_YES_NO, _("Delete the selected stream(s)?")) dialog.set_title(_("Delete Stream(s)")) response = dialog.run() if response == gtk.RESPONSE_YES: dialog.destroy() model, selected = self.streams_selection.get_selected_rows() iters = [model.get_iter(path) for path in selected] for iter in iters: stream_removed = False for i in range(len(self.stream_names)): if not stream_removed: if self.streamsdata.get_value(iter, 1) == escape_html(self.stream_names[i]): self.stream_names.pop(i) self.stream_uris.pop(i) stream_removed = True self.streams_populate() else: dialog.destroy() self.iterate_now()
0da9815c248298a9268c10f25c59ea81e5bd319d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2312/0da9815c248298a9268c10f25c59ea81e5bd319d/sonata.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1206, 12, 2890, 16, 3604, 4672, 309, 365, 18, 4646, 30, 1363, 67, 2107, 273, 365, 18, 24422, 18, 588, 67, 2972, 67, 2433, 1435, 309, 1363, 67, 2107, 422, 365, 18, 28899, 67, 15487, 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, 1206, 12, 2890, 16, 3604, 4672, 309, 365, 18, 4646, 30, 1363, 67, 2107, 273, 365, 18, 24422, 18, 588, 67, 2972, 67, 2433, 1435, 309, 1363, 67, 2107, 422, 365, 18, 28899, 67, 15487, 3...
rtscts = 1
ser.rtscts = True
def usage(): print >>sys.stderr, """USAGE: %s [options] Simple Terminal Programm for the serial port. options: -p, --port=PORT: serial port, a number, defualt = 0 or a device name -b, --baud=BAUD: baudrate, default 9600 -r, --rtscts: enable RTS/CTS flow control (default off) -x, --xonxoff: enable software flow control (default off) -P, --localport: TCP/IP port on which to run the server (default 7777) """ % sys.argv[0]
d1bc025a5ffd45b7cb45bdc2b2b0210119acfd93 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10955/d1bc025a5ffd45b7cb45bdc2b2b0210119acfd93/tcp_serial_redirect.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4084, 13332, 1172, 1671, 9499, 18, 11241, 16, 3536, 29550, 30, 738, 87, 306, 2116, 65, 4477, 18778, 13586, 81, 364, 326, 2734, 1756, 18, 225, 702, 30, 300, 84, 16, 1493, 655, 33, 6354,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4084, 13332, 1172, 1671, 9499, 18, 11241, 16, 3536, 29550, 30, 738, 87, 306, 2116, 65, 4477, 18778, 13586, 81, 364, 326, 2734, 1756, 18, 225, 702, 30, 300, 84, 16, 1493, 655, 33, 6354,...
__stateversion__ = Loader.__stateversion__+1
__stateversion__ = Loader.__stateversion__+2
def getGroup(self): return self._info.get("group", "")
3ccd92295667cd452ae73959a77aeee175de3303 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8317/3ccd92295667cd452ae73959a77aeee175de3303/metadata.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11751, 12, 2890, 4672, 327, 365, 6315, 1376, 18, 588, 2932, 1655, 3113, 1408, 13, 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, 11751, 12, 2890, 4672, 327, 365, 6315, 1376, 18, 588, 2932, 1655, 3113, 1408, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
subs = self.assemble_parts() subs['encoding'] = self.document.settings.output_encoding subs['version'] = docutils.__version__ return template.substitute(subs)
self.assemble_parts() return template.substitute(self.parts)
def apply_template(self): # Get template string from file try: file = open(self.document.settings.template, 'rb') except IOError: file = open(os.path.join(os.path.dirname(__file__), self.document.settings.template), 'rb') template = string.Template(file.read()) file.close() # create dictionary of substitutions subs = self.assemble_parts() subs['encoding'] = self.document.settings.output_encoding subs['version'] = docutils.__version__ return template.substitute(subs)
72029aee8394eeb4400f5487aabbec1a1dfbd5cd /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5620/72029aee8394eeb4400f5487aabbec1a1dfbd5cd/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2230, 67, 3202, 12, 2890, 4672, 468, 968, 1542, 533, 628, 585, 775, 30, 585, 273, 1696, 12, 2890, 18, 5457, 18, 4272, 18, 3202, 16, 296, 6731, 6134, 1335, 8340, 30, 585, 273, 1696, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2230, 67, 3202, 12, 2890, 4672, 468, 968, 1542, 533, 628, 585, 775, 30, 585, 273, 1696, 12, 2890, 18, 5457, 18, 4272, 18, 3202, 16, 296, 6731, 6134, 1335, 8340, 30, 585, 273, 1696, 1...
while line and not line.strip() and line.strip().startswith( "
while line and (not line.strip() or line.strip().startswith( "
def __iter__(self): # Register: increase the number of parsers with self.__lock() as data: parsers, current_offset, current_line = data self.__update( parsers + 1, current_offset, current_line ) # Iterate until the file ends line = self.__file.readline() while line: with self.__lock() as data: parsers, current_offset, current_line = data self.__file.seek( current_offset ) line = self.__file.readline() current_line += 1
8c3213d1cd42162a32b568732093724083e1b2e4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10264/8c3213d1cd42162a32b568732093724083e1b2e4/running.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2165, 972, 12, 2890, 4672, 468, 5433, 30, 10929, 326, 1300, 434, 14212, 598, 365, 16186, 739, 1435, 487, 501, 30, 14212, 16, 783, 67, 3348, 16, 783, 67, 1369, 273, 501, 365, 1618...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2165, 972, 12, 2890, 4672, 468, 5433, 30, 10929, 326, 1300, 434, 14212, 598, 365, 16186, 739, 1435, 487, 501, 30, 14212, 16, 783, 67, 3348, 16, 783, 67, 1369, 273, 501, 365, 1618...