rem
stringlengths
2
226k
add
stringlengths
0
227k
context
stringlengths
8
228k
meta
stringlengths
156
215
input_ids
list
attention_mask
list
labels
list
return mu.empty(shape, dtype, order)
return mu.empty(shape, dtype)
def empty(shape, typecode='l', dtype=None): dtype = convtypecode(typecode, dtype) return mu.empty(shape, dtype, order)
9b0c090eaa73c7646dbc163cf2ff85a59e2109dc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14925/9b0c090eaa73c7646dbc163cf2ff85a59e2109dc/functions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1008, 12, 4867, 16, 618, 710, 2218, 80, 2187, 3182, 33, 7036, 4672, 3182, 273, 6292, 723, 710, 12, 723, 710, 16, 3182, 13, 327, 4129, 18, 5531, 12, 4867, 16, 3182, 13, 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, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1008, 12, 4867, 16, 618, 710, 2218, 80, 2187, 3182, 33, 7036, 4672, 3182, 273, 6292, 723, 710, 12, 723, 710, 16, 3182, 13, 327, 4129, 18, 5531, 12, 4867, 16, 3182, 13, 225, 2, -100, ...
self.write_breadcrumbs(out, 'help')
self.write_breadcrumbs(out, 'help', 'help.html')
def write_help(self, out): """ Write an HTML help file to the given stream. If C{self._helpfile} contains a help file, then use it; otherwise, use the default helpfile from L{epydoc.docwriter.html_help}. @param public: The output stream for the public version of the page. @param private: The output stream for the private version of the page. """ # todo: optionally parse .rst etc help files? # Get the contents of the help file. if self._helpfile: if os.path.exists(self._helpfile): try: help = open(self._helpfile).read() except: raise IOError("Can't open help file: %r" % self._helpfile) else: raise IOError("Can't find help file: %r" % self._helpfile) else: if self._prj_name: thisprj = self._prj_name else: thisprj = 'this project' help = HTML_HELP % {'this_project':thisprj}
038faa3b3abb74159d142669f28698abda4fb0e8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11420/038faa3b3abb74159d142669f28698abda4fb0e8/html.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 67, 5201, 12, 2890, 16, 596, 4672, 3536, 2598, 392, 3982, 2809, 585, 358, 326, 864, 1407, 18, 225, 971, 385, 95, 2890, 6315, 5201, 768, 97, 1914, 279, 2809, 585, 16, 1508, 999, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 67, 5201, 12, 2890, 16, 596, 4672, 3536, 2598, 392, 3982, 2809, 585, 358, 326, 864, 1407, 18, 225, 971, 385, 95, 2890, 6315, 5201, 768, 97, 1914, 279, 2809, 585, 16, 1508, 999, ...
EXAMPLES:
EXAMPLES::
def test_pickle(p, verbose_eval=False, pedantic=False, args=()): r""" Tests explain_pickle on a given pickle p. p can be: - a string containing an uncompressed pickle (which will always end with a '.') - a string containing a pickle fragment (not ending with '.') test_pickle will synthesize a pickle that will push args onto the stack (using persistent IDs), run the pickle fragment, and then STOP (if the string 'mark' occurs in args, then a mark will be pushed) - an arbitrary object; test_pickle will pickle the object Once it has a pickle, test_pickle will print the pickle's disassembly, run explain_pickle with in_current_sage=True and False, print the results, evaluate the results, unpickle the object with cPickle, and compare all three results. If verbose_eval is True, then test_pickle will print messages before evaluating the pickles; this is to allow for tests where the unpickling prints messages (to verify that the same operations occur in all cases). EXAMPLES: sage: from sage.misc.explain_pickle import * sage: test_pickle(['a']) 0: \x80 PROTO 2 2: ] EMPTY_LIST 3: q BINPUT 1 5: U SHORT_BINSTRING 'a' 8: a APPEND 9: . STOP highest protocol among opcodes = 2 explain_pickle in_current_sage=True/False: ['a'] result: ['a'] """ start = '' for n in range(len(args)): a = args[n] if a == 'mark': start += '(' else: start += "P%d\n" % n if isinstance(p, str): if p[-1] != '.': p = start + p + '.' else: p = dumps(p, compress=False) pickletools.dis(p) current = explain_pickle(p, compress=False, in_current_sage=True, pedantic=pedantic, preparse=False) generic = explain_pickle(p, compress=False, pedantic=pedantic, preparse=False) if current == generic: print "explain_pickle in_current_sage=True/False:" print current else: print "explain_pickle in_current_sage=True:" print current print "explain_pickle in_current_sage=False:" print generic pers_load = lambda s: args[int(s)] global unpickle_persistent_loader unpickle_persistent_loader = pers_load if verbose_eval: print "evaluating explain_pickle in_current_sage=True:" current_res = sage_eval(current, preparse=False) if verbose_eval: print "evaluating explain_pickle in_current_sage=False:" generic_res = sage_eval(generic, preparse=False) if verbose_eval: print "loading pickle with cPickle:" from cStringIO import StringIO import cPickle unp = cPickle.Unpickler(StringIO(p)) unp.persistent_load = pers_load unp.find_global = unpickle_global try: cpickle_res = unp.load() cpickle_ok = True except: cpickle_ok = False current_repr = repr(current_res) generic_repr = repr(generic_res) if cpickle_ok: cpickle_repr = repr(cpickle_res) assert(current_repr == generic_repr == cpickle_repr) print "result: " + current_repr else: assert(current_repr == generic_repr) print "result: " + current_repr + " (cPickle raised an exception!)"
3bed29c45c1270055cd235e22fd02f632971b39e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/3bed29c45c1270055cd235e22fd02f632971b39e/explain_pickle.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 20847, 12, 84, 16, 3988, 67, 8622, 33, 8381, 16, 31840, 9941, 33, 8381, 16, 833, 33, 1435, 4672, 436, 8395, 7766, 87, 19765, 67, 20847, 603, 279, 864, 13379, 293, 18, 225, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 20847, 12, 84, 16, 3988, 67, 8622, 33, 8381, 16, 31840, 9941, 33, 8381, 16, 833, 33, 1435, 4672, 436, 8395, 7766, 87, 19765, 67, 20847, 603, 279, 864, 13379, 293, 18, 225, ...
xC = ((x - (self.xRange[0])) / self.xPixelSize + self.xOff) yC = ((-1 * y + self.yRange[0]) / self.yPixelSize + self.yPlotSize + self.yOff)
def PlotPoints(self): bins = []
8a73eea1364de2ef58bbf9fa5d34230d01fb2bed /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6163/8a73eea1364de2ef58bbf9fa5d34230d01fb2bed/ConfDistFuncs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15211, 5636, 12, 2890, 4672, 8963, 273, 5378, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 15211, 5636, 12, 2890, 4672, 8963, 273, 5378, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
group.add_option("--db_maxconn", dest="db_maxconn", default='64',
group.add_option("--db_maxconn", dest="db_maxconn", type='int',
def __init__(self, fname=None): self.options = { 'email_from':False, 'xmlrpc_interface': '', # this will bind the server to all interfaces 'xmlrpc_port': 8069, 'netrpc_interface': '', 'netrpc_port': 8070, 'xmlrpcs_interface': '', # this will bind the server to all interfaces 'xmlrpcs_port': 8071, 'db_host': False, 'db_port': False, 'db_name': False, 'db_user': False, 'db_password': False, 'db_maxconn': 64, 'reportgz': False, 'netrpc': True, 'xmlrpc': True, 'xmlrpcs': True, 'translate_in': None, 'translate_out': None, 'language': None, 'pg_path': None, 'admin_passwd': 'admin', 'csv_internal_sep': ',', 'addons_path': None, 'root_path': None, 'debug_mode': False, 'import_partial': "", 'pidfile': None, 'logfile': None, 'logrotate': '1', 'smtp_server': 'localhost', 'smtp_user': False, 'smtp_port':25, 'smtp_ssl':False, 'smtp_password': False, 'stop_after_init': False, # this will stop the server after initialization 'syslog' : False, 'log_level': logging.INFO, 'assert_exit_level': logging.ERROR, # level above which a failed assert will be raised 'cache_timeout': 100000, 'login_message': False, 'list_db' : True, 'timezone' : False, # to override the default TZ 'test_file' : False, 'test_disable' : False, 'test_commit' : False, 'static_http_enable': False, 'static_http_document_root': None, 'static_http_url_prefix': None, }
6849735d632bc3232089bcba161bf3eaa621c1e5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12853/6849735d632bc3232089bcba161bf3eaa621c1e5/config.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 5299, 33, 7036, 4672, 365, 18, 2116, 273, 288, 296, 3652, 67, 2080, 4278, 8381, 16, 296, 2902, 7452, 67, 5831, 4278, 10226, 565, 468, 333, 903, 1993, 326...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 5299, 33, 7036, 4672, 365, 18, 2116, 273, 288, 296, 3652, 67, 2080, 4278, 8381, 16, 296, 2902, 7452, 67, 5831, 4278, 10226, 565, 468, 333, 903, 1993, 326...
MAXSDK = {} MAXSDKCS = {}
def parseopts(args): global PREFIX,COMPILER,OPTIMIZE,OMIT,THIRDPARTY,INSTALLER,PPGAME global COPYEXTRAS,VERSION,COMPRESSOR,DIRECTXSDK,VERBOSE longopts = [ "help","package-info","prefix=","compiler=","directx-sdk=","thirdparty=", "optimize=","everything","nothing","installer","ppgame=","quiet","verbose", "complete","version=","lzma"] anything = 0 for pkg in PACKAGES: longopts.append("no-"+pkg.lower()) for pkg in PACKAGES: longopts.append("use-"+pkg.lower()) try: opts, extras = getopt.getopt(args, "", longopts) for option,value in opts: if (option=="--help"): raise "usage" elif (option=="--package-info"): raise "package-info" elif (option=="--prefix"): PREFIX=value elif (option=="--compiler"): COMPILER=value elif (option=="--directx-sdk"): DIRECTXSDK=value elif (option=="--thirdparty"): THIRDPARTY=value elif (option=="--optimize"): OPTIMIZE=value elif (option=="--quiet"): VERBOSE-=1 elif (option=="--verbose"): VERBOSE+=1 elif (option=="--installer"): INSTALLER=1 elif (option=="--ppgame"): PPGAME=value elif (option=="--complete"): COMPLETE=1 elif (option=="--everything"): OMIT=[] elif (option=="--nothing"): OMIT=PACKAGES[:] elif (option=="--version"): VERSION=value if (len(VERSION.split(".")) != 3): raise "usage" elif (option=="--lzma"): COMPRESSOR="lzma" else: for pkg in PACKAGES: if (option=="--use-"+pkg.lower()): if (OMIT.count(pkg)): OMIT.remove(pkg) break for pkg in PACKAGES: if (option=="--no-"+pkg.lower()): if (OMIT.count(pkg)==0): OMIT.append(pkg) break anything = 1 except "package-info": packageInfo() except: usage(0) if (anything==0): usage(0) if (OPTIMIZE=="1"): OPTIMIZE=1 elif (OPTIMIZE=="2"): OPTIMIZE=2 elif (OPTIMIZE=="3"): OPTIMIZE=3 elif (OPTIMIZE=="4"): OPTIMIZE=4 else: usage("Invalid setting for OPTIMIZE") if (COMPILERS.count(COMPILER)==0): usage("Invalid setting for COMPILER: "+COMPILER)
3c98662297c774af33b1cab289c99746e2a28ca5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7242/3c98662297c774af33b1cab289c99746e2a28ca5/makepanda.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 4952, 12, 1968, 4672, 2552, 17154, 16, 31075, 14668, 16, 15620, 3445, 15641, 16, 1872, 1285, 16, 2455, 7937, 40, 2778, 5538, 16, 28865, 654, 16, 6584, 43, 1642, 2552, 27776, 22639, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4952, 12, 1968, 4672, 2552, 17154, 16, 31075, 14668, 16, 15620, 3445, 15641, 16, 1872, 1285, 16, 2455, 7937, 40, 2778, 5538, 16, 28865, 654, 16, 6584, 43, 1642, 2552, 27776, 22639, ...
return defer.maybeDeferred(urlopen, url) def _parse_date_string(self, dateString): return timegm(parse_date(dateString).utctimetuple()) def _parse_changes(self, query): dom = minidom.parseString(query.read()) items = dom.getElementsByTagName("entry") changes = [] for i in items: d = {} for k in ["title", "updated"]: d[k] = i.getElementsByTagName(k)[0].firstChild.wholeText d["updated"] = self._parse_date_string(d["updated"]) d["changeset"] = d["title"].split(" ")[1] nameNode = i.getElementsByTagName("author")[0].childNodes[1] d["author"] = nameNode.firstChild.wholeText d["link"] = i.getElementsByTagName("link")[0].getAttribute("href") changes.append(d) changes = [c for c in changes if c["updated"] > self.lastChange] changes.reverse() return changes def _process_changes(self, query): change_list = self._parse_changes(query)
return getPage(url) def processData(self, query): change_list = _parse_changes(query, self.lastChange)
def _get_changes(self): url = self._make_url() log.msg("Polling Hg server at %s" % url) return defer.maybeDeferred(urlopen, url)
d8b00aa04f5731060f58f27586cc2006183bc63c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/13067/d8b00aa04f5731060f58f27586cc2006183bc63c/hgpoller.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 6329, 12, 2890, 4672, 880, 273, 365, 6315, 6540, 67, 718, 1435, 613, 18, 3576, 2932, 24767, 670, 75, 1438, 622, 738, 87, 6, 738, 880, 13, 225, 327, 2220, 18, 19133, 168...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 6329, 12, 2890, 4672, 880, 273, 365, 6315, 6540, 67, 718, 1435, 613, 18, 3576, 2932, 24767, 670, 75, 1438, 622, 738, 87, 6, 738, 880, 13, 225, 327, 2220, 18, 19133, 168...
return [Set([listint])]
yield Set([listint]) return
def _listbloc(n, nbrepets, listint=None): """ listbloc decomposes a set of n*nbrepets integers (the list listint) in nbrepets parts. It is used in the algorithm to generate all set partitions. Not to be called by the user. EXAMPLES: sage: sage.combinat.set_partition._listbloc(2,1) [{{1, 2}}] sage: l = [Set([Set([3, 4]), Set([1, 2])]), Set([Set([2, 4]), Set([1, 3])]), Set([Set([2, 3]), Set([1, 4])])] sage: sage.combinat.set_partition._listbloc(2,2,[1,2,3,4]) == l True """ if isinstance(listint, (int, sage.rings.integer.Integer)) or listint is None: listint = Set(range(1,n+1)) if nbrepets == 1: return [Set([listint])] l = __builtin__.list(listint) l.sort() smallest = Set(l[:1]) new_listint = Set(l[1:]) f = lambda u, v: u.union(_set_union([smallest,v])) res = [] for ssens in subset.Subsets(new_listint, n-1): for z in _listbloc(n, nbrepets-1, new_listint-ssens): res.append(f(z,ssens)) return res
7fe4d7cd49495151340889465d2a7e6e30f6cb2e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/7fe4d7cd49495151340889465d2a7e6e30f6cb2e/set_partition.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1098, 70, 1829, 12, 82, 16, 4264, 14462, 2413, 16, 666, 474, 33, 7036, 4672, 3536, 666, 70, 1829, 9862, 10522, 279, 444, 434, 290, 14, 82, 6073, 84, 2413, 12321, 261, 5787, 666, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1098, 70, 1829, 12, 82, 16, 4264, 14462, 2413, 16, 666, 474, 33, 7036, 4672, 3536, 666, 70, 1829, 9862, 10522, 279, 444, 434, 290, 14, 82, 6073, 84, 2413, 12321, 261, 5787, 666, ...
second_descent = int(second_descent)
second_descent = int(second_descent)
def two_descent(self, verbose = True, selmer_only = False, first_limit = 20, second_limit = 8, n_aux = -1, second_descent = True): """ Compute 2-descent data for this curve.
1cc4edc9aafb88d044d853b60331d1432546cf60 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/1cc4edc9aafb88d044d853b60331d1432546cf60/interface.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2795, 67, 5569, 319, 12, 2890, 16, 3988, 273, 1053, 16, 357, 6592, 67, 3700, 273, 1083, 16, 1122, 67, 3595, 273, 4200, 16, 2205, 67, 3595, 273, 1725, 16, 290, 67, 18196, 273, 300, 21...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2795, 67, 5569, 319, 12, 2890, 16, 3988, 273, 1053, 16, 357, 6592, 67, 3700, 273, 1083, 16, 1122, 67, 3595, 273, 4200, 16, 2205, 67, 3595, 273, 1725, 16, 290, 67, 18196, 273, 300, 21...
def __init__(data = None)
def __init__(data = None):
def __init__(data = None) if data == None: quickfix.CharField.__init__(self, 481) else quickfix.CharField.__init__(self, 481, data)
484890147d4b23aac4b9d0e85e84fceab7e137c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8819/484890147d4b23aac4b9d0e85e84fceab7e137c3/quickfix_fields.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 892, 273, 599, 4672, 309, 501, 422, 599, 30, 9549, 904, 18, 2156, 974, 16186, 2738, 972, 12, 2890, 16, 9934, 21, 13, 469, 9549, 904, 18, 2156, 974, 16186, 2738, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 892, 273, 599, 4672, 309, 501, 422, 599, 30, 9549, 904, 18, 2156, 974, 16186, 2738, 972, 12, 2890, 16, 9934, 21, 13, 469, 9549, 904, 18, 2156, 974, 16186, 2738, ...
books = web.ctx.site.things(dict(type='/type/edition', sort='-id', limit=1)) key = books[0] return edit().POST(key, action='/addbook', title='Add Book')
books = web.ctx.site.things({'key~': '/b/OL*', 'sort': '-id', 'limit': 1}) key = '/b/OL%dM' % (1 + int(web.numify(books[0].key))) web.ctx.path = key return edit().POST(key)
def POST(self): from infogami.core.code import edit books = web.ctx.site.things(dict(type='/type/edition', sort='-id', limit=1)) key = books[0] return edit().POST(key, action='/addbook', title='Add Book')
99ce6327be0adcd52c3b63c96bfee5357986d90d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3913/99ce6327be0adcd52c3b63c96bfee5357986d90d/code.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5485, 12, 2890, 4672, 628, 1123, 75, 26223, 18, 3644, 18, 710, 1930, 3874, 6978, 87, 273, 3311, 18, 5900, 18, 4256, 18, 451, 899, 12590, 11, 856, 98, 4278, 1173, 70, 19, 1741, 14, 21...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5485, 12, 2890, 4672, 628, 1123, 75, 26223, 18, 3644, 18, 710, 1930, 3874, 6978, 87, 273, 3311, 18, 5900, 18, 4256, 18, 451, 899, 12590, 11, 856, 98, 4278, 1173, 70, 19, 1741, 14, 21...
try:
if self.lp: return self.get_bug_new(id) return self.get_bug_old(id) def get_bug_new(self, id): def _sort(task1, task2): statuses = ["Unknown", "Invalid", "Won't fix", "Fix Released", "Fix Committed", "New", "Incomplete", "Confirmed", "Triaged", "In Progress"] severities = ["Unknown", "Undecided", "Wishlist", "Low", "Medium", "High", "Critical"] task1_status = task1.status task1_importance = task1.importance task2_status = task2.status task2_importance = task2.importance if task1_status != task2_status: if statuses.index(task1_status) < statuses.index(task2_status): return -1 return 1 if task1_importance != task2_importance: if severities.index(task1_importance) < severities.index(task2_importance): return -1 return 1 return 0 try: bugdata = self.lp.bugs[id] if bugdata.private: raise BugtrackerError, "This bug is private" dup = bugdata.duplicate_of affected = bugdata.users_affected_count_with_dupes heat = bugdata.heat tasks = bugdata.bug_tasks if tasks.total_size != 1: tasks = list(tasks) tasks.sort(_sort) taskdata = tasks[-1] else: taskdata = tasks[0] assignee = taskdata.assignee t = taskdata.bug_target_display_name if assignee: assignee = u"%s (%s)" % (assignee.display_name, assignee.name) else: assignee = '' except Exception, e: supylog.exception("Error gathering bug data for %s bug %d" % (self.description, id)) s = 'Could not parse data returned by %s: %s (%s/bugs/%d)' % (self.description, e, self.url, id) raise BugtrackerError, s if dup: dupbug = self.get_bug(dup.id) return [(id, t, bugdata.title + (' (dup-of: %d)' % dup.id), taskdata.importance, taskdata.status, assignee, "%s/bugs/%s" % (self.url, id))] + dupbug return [(id, t, bugdata.title + " (affected: %d, heat: %d)" % (affected, heat), taskdata.importance, taskdata.status, assignee, "%s/bugs/%s" % (self.url, id))] def get_bug_old(self, id): if id == 1: raise BugtrackerError, "https://bugs.launchpad.net/ubuntu/+bug/1 (Not reporting large bug)" try:
def get_bug(self, id): try:
e98b0c7609de44c6d24c22ddad8e0c7ce58f3692 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3104/e98b0c7609de44c6d24c22ddad8e0c7ce58f3692/plugin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 925, 12, 2890, 16, 612, 4672, 775, 30, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 925, 12, 2890, 16, 612, 4672, 775, 30, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
c = self.ctx.conn({"omero.host":"localhost", "omero.user":"root","omero.pass":"ome"})
c = self.ctx.conn({"omero.host":server, "omero.user":user,"omero.pass":pasw})
def _run(self, args = []): args = Arguments(args)
7f42ee15d793ebec322efd3976c6df9d14fc4cbb /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12409/7f42ee15d793ebec322efd3976c6df9d14fc4cbb/export.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2681, 12, 2890, 16, 833, 273, 5378, 4672, 833, 273, 13599, 12, 1968, 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, 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, 2681, 12, 2890, 16, 833, 273, 5378, 4672, 833, 273, 13599, 12, 1968, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
if endNotifier is None: endNotifier = []
if self.endNotifier is None: self.endNotifier = []
def addEndNotifier(self, notifier): if endNotifier is None: endNotifier = [] self.endNotifier.append(notifier)
6533ba61374a744fdc01a39cef95d923ba2ab451 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6652/6533ba61374a744fdc01a39cef95d923ba2ab451/config.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 1638, 14889, 12, 2890, 16, 19057, 4672, 309, 365, 18, 409, 14889, 353, 599, 30, 365, 18, 409, 14889, 273, 5378, 365, 18, 409, 14889, 18, 6923, 12, 902, 1251, 13, 2, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 527, 1638, 14889, 12, 2890, 16, 19057, 4672, 309, 365, 18, 409, 14889, 353, 599, 30, 365, 18, 409, 14889, 273, 5378, 365, 18, 409, 14889, 18, 6923, 12, 902, 1251, 13, 2, -100, -100, ...
show_project_names = models.BooleanField("Show project names", default=True, choices=( (False, 'No'), (True, 'Yes')))
show_project_names = models.BooleanField("Show project names", default=True, choices=yes_no_choices)
def clean_up_text(text, leading_lines_re = re.compile(r"^\s*\n"), leading_spaces_re = re.compile(r"^\s*"), ): """Clean up user-editable ruleset text. This expands tabs, removes blank leading lines, uniformly unindents as much as possible, and removes trailing whitespace from each line. """ # Expand tabs and remove leading lines lines = leading_lines_re.sub("", text.expandtabs()).split("\n") # Measure the maximum unindent level level = None for line in lines: if line.strip(): # Count leading spaces s = leading_spaces_re.match(line).span()[1] if level is None: level = s else: level = min(level, s) if level is None: return "" # Perform the unindentation on each line while stripping trailing space. return "\n".join([line[level:].rstrip() for line in lines])
1445bd90951f39c305137a3605bf2278fb68c4af /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9478/1445bd90951f39c305137a3605bf2278fb68c4af/models.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2721, 67, 416, 67, 955, 12, 955, 16, 7676, 67, 3548, 67, 266, 273, 283, 18, 11100, 12, 86, 6, 17134, 87, 12174, 82, 6, 3631, 7676, 67, 9554, 67, 266, 273, 283, 18, 11100, 12, 86, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2721, 67, 416, 67, 955, 12, 955, 16, 7676, 67, 3548, 67, 266, 273, 283, 18, 11100, 12, 86, 6, 17134, 87, 12174, 82, 6, 3631, 7676, 67, 9554, 67, 266, 273, 283, 18, 11100, 12, 86, ...
def revert_unicode_line(document, i, last_char, insets, spec_chars, replacement_character = '???'):
def revert_unicode_line(document, i, insets, spec_chars, replacement_character = '???'):
def revert_unicode_line(document, i, last_char, insets, spec_chars, replacement_character = '???'): # Define strings to start and end ERT and math insets ert_intro='\n\n\\begin_inset ERT\nstatus collapsed\n\\begin_layout %s\n\\backslash\n' % document.default_layout ert_outro='\n\\end_layout\n\n\\end_inset\n' math_intro='\n\\begin_inset Formula $' math_outro='$\n\\end_inset' mod_line = u'' line = document.body[i] for character in line: try: # Try to write the character dummy = character.encode(document.encoding) mod_line += character last_char = character except: # Try to replace with ERT/math inset if spec_chars.has_key(character): command = spec_chars[character][0] # the command to replace unicode flag1 = spec_chars[character][1] flag2 = spec_chars[character][2] if flag1.find('combining') > -1 or flag2.find('combining') > -1: # We have a character that should be combined with the previous command += '{' + last_char + '}' # Remove the last character. Ignore if it is whitespace if len(last_char.rstrip()): # last_char was found and is not whitespace if mod_line: mod_line = mod_line[:-1] else: # last_char belongs to the last line document.body[i-1] = document.body[i-1][:-1] else: # The last character was replaced by a command. For now it is # ignored. This could be handled better. pass if command[0:2] == '\\\\': if command[2:12]=='ensuremath': if insets and insets[-1] == "ERT": # math in ERT command = command.replace('\\\\ensuremath{\\\\', '$\n\\backslash\n') command = command.replace('}', '$\n') elif not insets or insets[-1] != "Formula": # add a math inset with the replacement character command = command.replace('\\\\ensuremath{\\', math_intro) command = command.replace('}', math_outro) else: # we are already in a math inset command = command.replace('\\\\ensuremath{\\', '') command = command.replace('}', '') else: if insets and insets[-1] == "Formula": # avoid putting an ERT in a math; instead put command as text command = command.replace('\\\\', '\mathrm{') command = command + '}' elif not insets or insets[-1] != "ERT": # add an ERT inset with the replacement character command = command.replace('\\\\', ert_intro) command = command + ert_outro else: command = command.replace('\\\\', '\n\\backslash\n') last_char = '' # indicate that the character should not be removed mod_line += command else: # Replace with replacement string mod_line += replacement_character return mod_line, last_char
b03bc9691212caf7dc3f524e4163b2cb73a6a9f0 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7514/b03bc9691212caf7dc3f524e4163b2cb73a6a9f0/lyx_1_5.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15226, 67, 9124, 67, 1369, 12, 5457, 16, 277, 16, 23576, 16, 857, 67, 7549, 16, 6060, 67, 11560, 273, 13023, 35, 4899, 4672, 468, 13184, 2064, 358, 787, 471, 679, 4232, 56, 471, 4233, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15226, 67, 9124, 67, 1369, 12, 5457, 16, 277, 16, 23576, 16, 857, 67, 7549, 16, 6060, 67, 11560, 273, 13023, 35, 4899, 4672, 468, 13184, 2064, 358, 787, 471, 679, 4232, 56, 471, 4233, ...
wlock = repo.wlock()
def apply(self, repo, source, revmap, merges, opts={}): '''apply the revisions in revmap one by one in revision order''' revs = revmap.keys() revs.sort()
1e5183fc665dc033a39b12fd3e70a2dd2d212d05 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11312/1e5183fc665dc033a39b12fd3e70a2dd2d212d05/transplant.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2230, 12, 2890, 16, 3538, 16, 1084, 16, 5588, 1458, 16, 19037, 16, 1500, 12938, 4672, 9163, 9010, 326, 18325, 316, 5588, 1458, 1245, 635, 1245, 316, 6350, 1353, 26418, 5588, 87, 273, 558...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2230, 12, 2890, 16, 3538, 16, 1084, 16, 5588, 1458, 16, 19037, 16, 1500, 12938, 4672, 9163, 9010, 326, 18325, 316, 5588, 1458, 1245, 635, 1245, 316, 6350, 1353, 26418, 5588, 87, 273, 558...
return False, ["levels/campaign/level1"]
return False, dircache.listdir("levels/campaign/")
def main(screen): bgimage = pygame.image.load("gfx/menu.png") main = ["New game", "Custom Level", "Level Editor", "Quit."] levels = dircache.listdir('levels/') buttons = main dircache.annotate('levels/', levels) button_height = 37 menu_margin = 30 offset = 0 clevel = False edit = False update = True fgcolor = 255, 255, 255 #bgcolor = 0, 0, 0 menuhover = -1 font = pygame.font.SysFont("Bitstream Vera Sans", 24) labels = [] for button in buttons: labels.append(font.render(button, 1, fgcolor)) while True: event = pygame.event.wait() if update: update = False labels = [] if clevel: i = offset*8 labels.append(font.render("Return to main menu", 1, fgcolor)) labels.append(font.render("Previous page", 1, fgcolor)) while i < (1+offset)*8: if i < len(levels): labels.append(font.render(levels[i], 1, fgcolor)) else: labels.append(font.render("(empty)", 1, fgcolor)) i += 1 labels.append(font.render("Next page", 1, fgcolor)) else: for choices in main: labels.append(font.render(choices, 1, fgcolor)) if event.type == pygame.VIDEOEXPOSE: screen.blit(bgimage, (0,0)) for i in range(len(labels)): screen.blit(labels[i], (menu_margin, i * button_height + menu_margin)) if menuhover != -1: rect = labels[menuhover].get_rect() rect[0] += menu_margin - 4 rect[1] += menu_margin + menuhover * button_height - 3 rect[2] += 8 rect[3] += 6 pygame.draw.rect(screen, (255,0,0), rect, 3) pygame.display.update() elif event.type == pygame.KEYDOWN: if event.key == pygame.K_ESCAPE: sys.exit(0) elif event.type == pygame.MOUSEBUTTONDOWN: for i in range(len(labels)): rect = labels[i].get_rect() if (event.pos[0] < rect[2] + menu_margin and event.pos[0] > menu_margin and event.pos[1] > menu_margin + i*button_height and event.pos[1] < menu_margin + (i+1)*button_height): if clevel: if i == 0: clevel = False update = True elif i == 1: if offset != 0: offset -= 1 update = True elif i == 10: update = True offset += 1 else: if i+offset*6 - 2 < len(levels): if "/" in levels[offset*6+i-2]: returnlist = [] for level in dircache.listdir('levels/' + levels[offset*6+i-2]): returnlist.append("levels/" + levels[offset*6+i-2] + level) else: returnlist = ["levels/" + levels[offset*6+i-2]] print returnlist return edit, returnlist else: if i == 0: return False, ["levels/campaign/level1"] elif i == 1: clevel = True edit = False update = True elif i == 2: edit = True clevel = True update = True elif i == 3: sys.exit(0) elif event.type == pygame.MOUSEMOTION: menuhover = -1 for i in range(len(labels)): rect = labels[i].get_rect() if (event.pos[0] < rect[2] + menu_margin and event.pos[0] > menu_margin and event.pos[1] > menu_margin + i*button_height and event.pos[1] < menu_margin + (i+1)*button_height): menuhover = i
8d574e601d97c84dbc3e3e1b6f903d6ace0ad319 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14575/8d574e601d97c84dbc3e3e1b6f903d6ace0ad319/menu.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 9252, 4672, 7611, 2730, 273, 2395, 13957, 18, 2730, 18, 945, 2932, 75, 19595, 19, 5414, 18, 6446, 7923, 2774, 273, 8247, 1908, 7920, 3113, 315, 3802, 4557, 3113, 315, 2355, 184...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 9252, 4672, 7611, 2730, 273, 2395, 13957, 18, 2730, 18, 945, 2932, 75, 19595, 19, 5414, 18, 6446, 7923, 2774, 273, 8247, 1908, 7920, 3113, 315, 3802, 4557, 3113, 315, 2355, 184...
path = ''
path = '/'
def __init__(self): # Install our custom exception handler so that any exceptions are # output to the syslog rather than to /dev/null. sys.excepthook = tsumufs.syslogExceptHook
9bcc967538fef2994be36b872541201564d55f00 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5149/9bcc967538fef2994be36b872541201564d55f00/cachemanager.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 468, 10284, 3134, 1679, 1520, 1838, 1427, 716, 1281, 4798, 854, 468, 876, 358, 326, 16718, 9178, 2353, 358, 342, 5206, 19, 2011, 18, 2589, 18, 14137, 447...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 468, 10284, 3134, 1679, 1520, 1838, 1427, 716, 1281, 4798, 854, 468, 876, 358, 326, 16718, 9178, 2353, 358, 342, 5206, 19, 2011, 18, 2589, 18, 14137, 447...
if side == RIGHT and lastValueForFirstAttribute != 2: return
def DrawText(self, data, side, attr, (x0, x1), (y0, y1), totalAttrs, lastValueForFirstAttribute): if self.drawnSides[side]: return if not data or len(data) == 0: if not self.drawPositions.has_key(side): self.drawPositions[side] = (x0, x1, y0, y1) return else: if self.drawPositions.has_key(side): (x0, x1, y0, y1) = self.drawPositions[side] # restore the positions where we have to draw the attribute values and attribute name if side == RIGHT and lastValueForFirstAttribute != 2: return self.drawnSides[side] = 1
62cf623eff13c9742e9479d8e4bce7776a158fb1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6366/62cf623eff13c9742e9479d8e4bce7776a158fb1/OWMosaicDisplay.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10184, 1528, 12, 2890, 16, 501, 16, 4889, 16, 1604, 16, 261, 92, 20, 16, 619, 21, 3631, 261, 93, 20, 16, 677, 21, 3631, 2078, 8262, 16, 1142, 620, 1290, 3759, 1499, 4672, 309, 365, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10184, 1528, 12, 2890, 16, 501, 16, 4889, 16, 1604, 16, 261, 92, 20, 16, 619, 21, 3631, 261, 93, 20, 16, 677, 21, 3631, 2078, 8262, 16, 1142, 620, 1290, 3759, 1499, 4672, 309, 365, ...
f = open(pidfile, "r") pid = f.readline() f.close()
pid = open(pidfile, "r").readline()
def check_instance(directory): """Check if gtg is already running.""" pidfile = directory + "gtg.pid" if not os.path.exists(pidfile): f = open(pidfile, "w") f.close() os.chmod(pidfile, 0600) #see if gtg is already running f = open(pidfile, "r") pid = f.readline() f.close() if pid: p = os.system("ps --no-heading --pid " + pid) p_name = os.popen("ps -f --pid " + pid).read() if p == 0 and "gtg" in p_name: print _("gtg is already running!") d=dbus.SessionBus().get_object(CoreConfig.BUSNAME,\ CoreConfig.BUSINTERFACE) d.show_task_browser() sys.exit(0) #write the pid file f = open(pidfile, "w") f.write(str(os.getpid())) f.close()
e9a78819321cdd105dfdffda86c2fd701d737b8c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8234/e9a78819321cdd105dfdffda86c2fd701d737b8c/gtg.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 1336, 12, 5149, 4672, 3536, 1564, 309, 9879, 75, 353, 1818, 3549, 12123, 27656, 273, 1867, 397, 315, 4521, 75, 18, 6610, 6, 309, 486, 1140, 18, 803, 18, 1808, 12, 6610, 768, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 1336, 12, 5149, 4672, 3536, 1564, 309, 9879, 75, 353, 1818, 3549, 12123, 27656, 273, 1867, 397, 315, 4521, 75, 18, 6610, 6, 309, 486, 1140, 18, 803, 18, 1808, 12, 6610, 768, ...
from types import ListType
def __str__(self): from types import ListType if isinstance(self._deg,ListType): deg = len(self._deg) else: deg = self.degree() return "SymmetricGroup(%s)"%deg
ed0329722dedd840bfa9724699de1598d510ded5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9417/ed0329722dedd840bfa9724699de1598d510ded5/permgroup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 701, 972, 12, 2890, 4672, 309, 1549, 12, 2890, 6315, 9923, 16, 19366, 4672, 5843, 273, 562, 12, 2890, 6315, 9923, 13, 469, 30, 5843, 273, 365, 18, 21361, 1435, 327, 315, 29496, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1001, 701, 972, 12, 2890, 4672, 309, 1549, 12, 2890, 6315, 9923, 16, 19366, 4672, 5843, 273, 562, 12, 2890, 6315, 9923, 13, 469, 30, 5843, 273, 365, 18, 21361, 1435, 327, 315, 29496, 1...
if old_binhost and old_binhost != new_binhost: RunCommand(['sudo', 'rm', '-rf', boardpath])
emptytree = (old_binhost and old_binhost != new_binhost)
def main(): # Parse options usage = "usage: %prog [options] cbuildbot_config" parser = optparse.OptionParser(usage=usage) parser.add_option('-r', '--buildroot', help='root directory where build occurs', default=".") parser.add_option('-n', '--buildnumber', help='build number', type='int', default=0) parser.add_option('--chrome_rev', default=None, type='string', dest='chrome_rev', help=('Chrome_rev of type [tot|latest_release|' 'sticky_release]')) parser.add_option('-f', '--revisionfile', help='file where new revisions are stored') parser.add_option('--clobber', action='store_true', dest='clobber', default=False, help='Clobbers an old checkout before syncing') parser.add_option('--debug', action='store_true', dest='debug', default=False, help='Override some options to run as a developer.') parser.add_option('--nosync', action='store_false', dest='sync', default=True, help="Don't sync before building.") parser.add_option('--notests', action='store_false', dest='tests', default=True, help='Override values from buildconfig and run no tests.') parser.add_option('-t', '--tracking-branch', dest='tracking_branch', default='cros/master', help='Run the buildbot on a branch') parser.add_option('-u', '--url', dest='url', default='http://git.chromium.org/git/manifest', help='Run the buildbot on internal manifest') parser.add_option('-g', '--gsutil', default='', help='Location of gsutil') parser.add_option('-c', '--gsutil_archive', default='', help='Datastore archive location') parser.add_option('-a', '--acl', default='private', help='ACL to set on GSD archives') (options, args) = parser.parse_args() buildroot = os.path.abspath(options.buildroot) revisionfile = options.revisionfile tracking_branch = options.tracking_branch chrome_atom_to_build = None if len(args) >= 1: buildconfig = _GetConfig(args[-1]) else: Warning('Missing configuration description') parser.print_usage() sys.exit(1) try: # Calculate list of overlay directories. rev_overlays = _ResolveOverlays(buildroot, buildconfig['rev_overlays']) push_overlays = _ResolveOverlays(buildroot, buildconfig['push_overlays']) # We cannot push to overlays that we don't rev. assert set(push_overlays).issubset(set(rev_overlays)) # Either has to be a master or not have any push overlays. assert buildconfig['master'] or not push_overlays board = buildconfig['board'] old_binhost = None _PreFlightRinse(buildroot, buildconfig['board'], tracking_branch, rev_overlays) chroot_path = os.path.join(buildroot, 'chroot') boardpath = os.path.join(chroot_path, 'build', board) if options.sync: if options.clobber or not os.path.isdir(buildroot): _FullCheckout(buildroot, tracking_branch, url=options.url) else: old_binhost = _GetPortageEnvVar(buildroot, board, _FULL_BINHOST) _IncrementalCheckout(buildroot) new_binhost = _GetPortageEnvVar(buildroot, board, _FULL_BINHOST) if old_binhost and old_binhost != new_binhost: RunCommand(['sudo', 'rm', '-rf', boardpath]) # Check that all overlays can be found. for path in rev_overlays: if not os.path.isdir(path): Die('Missing overlay: %s' % path) if not os.path.isdir(chroot_path): _MakeChroot(buildroot) if not os.path.isdir(boardpath): _SetupBoard(buildroot, board=buildconfig['board']) # Perform uprev. If chrome_uprev is set, rev Chrome ebuilds. if options.chrome_rev: chrome_atom_to_build = _MarkChromeAsStable(buildroot, tracking_branch, options.chrome_rev) elif buildconfig['uprev']: _UprevPackages(buildroot, tracking_branch, revisionfile, buildconfig['board'], rev_overlays) _EnableLocalAccount(buildroot) # Doesn't rebuild without acquiring more source. if options.sync: _Build(buildroot) if chrome_atom_to_build: _BuildChrome(buildroot, buildconfig['board'], chrome_atom_to_build) if buildconfig['unittests'] and options.tests: _RunUnitTests(buildroot) _BuildImage(buildroot) if buildconfig['smoke_bvt'] and options.tests: _BuildVMImageForTesting(buildroot) test_results_dir = '/tmp/run_remote_tests.%s' % options.buildnumber try: _RunSmokeSuite(buildroot, test_results_dir) finally: if not options.debug: archive_full_path = os.path.join(options.gsutil_archive, str(options.buildnumber)) _ArchiveTestResults(buildroot, buildconfig['board'], test_results_dir=test_results_dir, gsutil=options.gsutil, archive_dir=archive_full_path, acl=options.acl) if buildconfig['uprev']: # Don't push changes for developers. if buildconfig['master']: # Master bot needs to check if the other slaves completed. if cbuildbot_comm.HaveSlavesCompleted(config): if not options.debug: _UploadPrebuilts(buildroot, board, buildconfig['rev_overlays'], [new_binhost]) _UprevPush(buildroot, tracking_branch, buildconfig['board'], push_overlays, options.debug) else: Die('CBUILDBOT - One of the slaves has failed!!!') else: # Publish my status to the master if its expecting it. if buildconfig['important'] and not options.debug: cbuildbot_comm.PublishStatus(cbuildbot_comm.STATUS_BUILD_COMPLETE) except: # Send failure to master bot. if not buildconfig['master'] and buildconfig['important']: cbuildbot_comm.PublishStatus(cbuildbot_comm.STATUS_BUILD_FAILED) raise
ab5c6917c6892b847a7559559dc2a6ae244bee52 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/ab5c6917c6892b847a7559559dc2a6ae244bee52/cbuildbot.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 468, 2884, 702, 4084, 273, 315, 9167, 30, 738, 14654, 306, 2116, 65, 2875, 680, 4819, 67, 1425, 6, 2082, 273, 2153, 2670, 18, 1895, 2678, 12, 9167, 33, 9167, 13, 2082, 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, 2774, 13332, 468, 2884, 702, 4084, 273, 315, 9167, 30, 738, 14654, 306, 2116, 65, 2875, 680, 4819, 67, 1425, 6, 2082, 273, 2153, 2670, 18, 1895, 2678, 12, 9167, 33, 9167, 13, 2082, 18,...
assert isinstance(person, PLC.Persons.Person) assert 'person_id' in person
assert 'key' in self
def set_primary_key(self, person, commit = True):
6a15f46cfce003d21ee8ba0bee213df66250e60e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7598/6a15f46cfce003d21ee8ba0bee213df66250e60e/Keys.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 8258, 67, 856, 12, 2890, 16, 6175, 16, 3294, 273, 1053, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 8258, 67, 856, 12, 2890, 16, 6175, 16, 3294, 273, 1053, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
for libdir in library_dirs or []:
for libdir in library_dirs:
def _link (self, body, headers, include_dirs, libraries, library_dirs, lang): if self.compiler.compiler_type=='msvc': libraries = libraries[:] library_dirs = library_dirs[:] if lang in ['f77','f90']: lang = 'c' # always use system linker when using MSVC compiler if self.fcompiler: for d in self.fcompiler.library_dirs or []: # correct path when compiling in Cygwin but with normal Win # Python if d.startswith('/usr/lib'): s,o = exec_command(['cygpath', '-w', d], use_tee=False) if not s: d = o library_dirs.append(d) for libname in self.fcompiler.libraries or []: if libname not in libraries: libraries.append(libname) for libname in libraries or []: if libname.startswith('msvcr'): continue fileexists = False for libdir in library_dirs or []: libfile = os.path.join(libdir,'%s.lib' % (libname)) if os.path.isfile(libfile): fileexists = True break if fileexists: continue # make g77-compiled static libs available to MSVC for libdir in library_dirs or []: libfile = os.path.join(libdir,'lib%s.a' % (libname)) if os.path.isfile(libfile): # copy libname.a file to name.lib so that MSVC linker # can find it copy_file(libfile, os.path.join(libdir,'%s.lib' % (libname))) break return self._wrap_method(old_config._link,lang, (body, headers, include_dirs, libraries, library_dirs, lang))
0168bce06a2d0266a2d337a2f587ec1327d19fb4 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/14925/0168bce06a2d0266a2d337a2f587ec1327d19fb4/config.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1232, 261, 2890, 16, 1417, 16, 1607, 16, 2341, 67, 8291, 16, 14732, 16, 5313, 67, 8291, 16, 3303, 4672, 309, 365, 18, 9576, 18, 9576, 67, 723, 18920, 959, 4227, 4278, 14732, 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, 389, 1232, 261, 2890, 16, 1417, 16, 1607, 16, 2341, 67, 8291, 16, 14732, 16, 5313, 67, 8291, 16, 3303, 4672, 309, 365, 18, 9576, 18, 9576, 67, 723, 18920, 959, 4227, 4278, 14732, 273, ...
self.archive_max = 246
self.archive_max = 255
def __init__(self, archive_num): self.question = "Did you know, " #archive_max checked 13-8-2009 self.archive_max = 246 self.archive_num = archive_num if self.archive_num > self.archive_max: self.archive_num = random.randint(1, self.archive_max) self.url = "http://en.wikipedia.org/wiki/Wikipedia:Recent_additions_" + str(self.archive_num) Nuggets.__init__(self)
54ad0d407555c5733db7f137d934e31fa6becd68 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14781/54ad0d407555c5733db7f137d934e31fa6becd68/module_nugget.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 5052, 67, 2107, 4672, 365, 18, 4173, 273, 315, 18250, 1846, 5055, 16, 315, 468, 10686, 67, 1896, 5950, 5958, 17, 28, 17, 6976, 29, 365, 18, 10686, 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, 5052, 67, 2107, 4672, 365, 18, 4173, 273, 315, 18250, 1846, 5055, 16, 315, 468, 10686, 67, 1896, 5950, 5958, 17, 28, 17, 6976, 29, 365, 18, 10686, 67, ...
h.putrequest('GET', selector)
h.putrequest('GET', "http:" + url)
def open_http(self, url, data=None): """override this WHOLE FUNCTION to change
62749d3471b5b60316ab4b70d96fa8a468f4aaf8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8747/62749d3471b5b60316ab4b70d96fa8a468f4aaf8/transport.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1696, 67, 2505, 12, 2890, 16, 880, 16, 501, 33, 7036, 4672, 3536, 10601, 333, 678, 7995, 900, 13690, 358, 2549, 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, 1696, 67, 2505, 12, 2890, 16, 880, 16, 501, 33, 7036, 4672, 3536, 10601, 333, 678, 7995, 900, 13690, 358, 2549, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
print " <3> Data for Key Name Above:", data_dict[data_key_name]
print "Data for Key Name Above:", data_dict[data_key_name]
def extract_config_data(config_file): if diagnostic_level >= 1: print "*** Extracting Configuration Data and Building Dictionaries ***" # Collect Data from Config File groups_dict = {} quantities_dict = {} data_dict = {} keyed_groups = {} keyed_quantities = {} keyed_data = {} quantity_counter = 0 data_counter = 0 group_counter = 0 skip_counter = 0 #Create File Object try: fh = file(config_file, 'U') except: print"!!! The Config File "+config_file_name+" does not exist or the path defined in the script is incorrect. !!!" exit() #Read file with csv module. data_array = csv.reader(fh) #Convert into List object config_lists = [list(sublist) for sublist in data_array] if diagnostic_level >= 2: print str(len(config_lists))+" lines read in from "+config_file_name+"\n" #Build Quantity and Data Dictionaries, with values keyed by config column name. for list_item in config_lists: if list_item[0] == 'g': if group_counter < 1: group_header = list_item[2:] else: if group_counter >= 1: for x in range(len(group_header)): keyed_groups[group_header[x]] = list_item[x+2] groups_dict[int(list_item[1])] = keyed_groups keyed_groups = {} group_counter += 1 if diagnostic_level >= 3: print " <3> This is group line #"+str(group_counter)+"." elif list_item[0] == 'q': if quantity_counter < 1: quantity_header = list_item[2:] if quantity_counter >= 1: for x in range(len(quantity_header)): keyed_quantities[quantity_header[x]] = list_item[x+2] if diagnostic_level >= 3: print " <3> List item 1:",int(list_item[1]) quantities_dict[int(list_item[1])] = keyed_quantities keyed_quantities = {} quantity_counter += 1 elif list_item[0] == data_line_char: if data_counter < quantity_counter: data_counter = quantity_counter - 1 data_header = list_item[1:] if data_counter >= quantity_counter: for x in range(len(data_header)): keyed_data[data_header[x].strip()] = list_item[x+1] data_key_name = keyed_data['Quantity'].strip()+"~"+keyed_data['Group'].strip()+"~"+keyed_data['Dataname'].strip()+"~"+keyed_data['d1_Dep_Col_Name'].strip()+"~"+keyed_data['d1_Ind_Col_Name'].strip() if diagnostic_level >= 3: print " <3> Key Name:", data_key_name data_dict[data_key_name] = keyed_data if diagnostic_level >= 3: print " <3> Data for Key Name Above:", data_dict[data_key_name] keyed_data = {} data_counter += 1 else: skip_counter = skip_counter + 1 if diagnostic_level >= 3: print " <3> No g, q or "+data_line_char+", skipping row." if diagnostic_level >= 2: print "There were "+str(skip_counter)+" lines skipped, out of the "+str(len(config_lists))+" lines read in." #Return a single list object containing the dictionaries. if diagnostic_level >= 3: print " <3> Groups Dictionary: ", groups_dict print " <3> Quantities Dictionary: ", quantities_dict print " <3> Data Dictionary: ", data_dict return [groups_dict,quantities_dict,data_dict]
f66ca75013a32a9d59d8e58dec0baa78eda49b79 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12/f66ca75013a32a9d59d8e58dec0baa78eda49b79/Validation_Data_Processor.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2608, 67, 1425, 67, 892, 12, 1425, 67, 768, 4672, 309, 21396, 67, 2815, 1545, 404, 30, 1172, 315, 14465, 8152, 310, 4659, 1910, 471, 3998, 310, 463, 14336, 18852, 6, 225, 468, 9302, 19...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2608, 67, 1425, 67, 892, 12, 1425, 67, 768, 4672, 309, 21396, 67, 2815, 1545, 404, 30, 1172, 315, 14465, 8152, 310, 4659, 1910, 471, 3998, 310, 463, 14336, 18852, 6, 225, 468, 9302, 19...
setViewOrthoActionText = "<u><b>Orthographic Projection</b></u><br>"\ "<p>Sets nonperspective (or parallel) projection, with no foreshortening."\
setViewOrthoActionText = \ "<u><b>Orthographic Projection</b></u><br>"\ "<p>"\ "Sets nonperspective (or parallel) projection, "\ "with no foreshortening."\
def createWhatsThisTextForMainWindowWidgets(win): """ Adds the "What's This" help text to items found in the NE1 mainwindow toolbars and menus . @param win: NE1's mainwindow object. @type win: U{B{QMainWindow}<http://doc.trolltech.com/4/qmainwindow.html>} @note: Property Managers specify "What's This" text for their own widgets, usually in a method called add_whats_this_text(), not in this file. """ # # File Toolbar # # Open File fileOpenText = "<u><b>Open File</b></u> (Ctrl + O)<br> "\ "<p><img source=\"ui/actions/File/Open.png\"><br> "\ "Opens a new file."\ "</p>" win.fileOpenAction.setWhatsThis( fileOpenText ) # Import File fileImportText = "<u><b>Import File</b></u><br>"\ "Inserts a file of any chemical file format supported by "\ "<b>Openbabel</b> into the current Part" win.fileImportAction.setWhatsThis(fileImportText) #Export File fileExportText = "<u><b>Export File</b></u><br>"\ "Save the current Part in any chemical file format supported by "\ "<b>Openbabel</b>. Note that exclusive features of NanoEngineer-1 "\ "are not saved to the exported file" win.fileExportAction.setWhatsThis(fileExportText) # Save File fileSaveText = "<u><b>Save File</b></u> (Ctrl + S)<br> "\ "<p><img source=\"ui/actions//Save.png\"><br> "\ "Saves the current file."\ "</p>" win.fileSaveAction.setWhatsThis( fileSaveText ) # # Edit Toolbar # # Make Checkpoint ### editMakeCheckpointText = \ "<u><b>Make Checkpoint</b></u>"\ "<p>"\ "<img source=\"ui/actions/Edit/Make_CheckPoint.png\"><br> "\ "Make Undo checkpoint."\ "</p>" win.editMakeCheckpointAction.setWhatsThis( editMakeCheckpointText ) # Automatic Checkpointing ### [minor changes, bruce 060319] editAutoCheckpointingText = \ "<u><b>Automatic Checkpointing</b></u>"\ "<p>"\ "Enables/Disables <b>Automatic Checkpointing</b>. When enabled, "\ "the program maintains the Undo stack automatically. When disabled, "\ "the user is required to manually create Undo checkpoints using the "\ "<b>Make Checkpoint</b> button: "\ "</p>"\ "<p><img source=\"ui/actions/Edit/Make_CheckPoint.png\">"\ "</p>"\ "<p><b>Automatic Checkpointing</b> can impact program performance. "\ "By disabling Automatic Checkpointing, the program will run faster. "\ "</p>"\ "<p><b><i>Remember that you must make your own Undo checkpoints "\ "manually when Automatic Checkpointing is disabled.</i></b>"\ "</p>" win.editAutoCheckpointingAction.setWhatsThis( editAutoCheckpointingText ) # Clear Undo Stack ### [minor changes, bruce 060319] editClearUndoStackText = "<u><b>Clear Undo Stack</b></u>"\ "<p>Clears all checkpoints on the Undo and Redo stacks, freeing up memory."\ "</p>" win.editClearUndoStackAction.setWhatsThis( editClearUndoStackText ) # Undo editUndoText = "<u><b>Undo</b></u> (Ctrl + Z)<br> "\ "<p><img source=\"ui/actions/Undo.png\"><br> "\ "Reverses the last edit or command which changed structure or selection. "\ "<br><font color=\"#808080\">"\ "Known bug: the link to wiki help for Undo "\ "only works if you got this popup from the Edit menu item for Undo, "\ "not from the Undo toolbutton."\ "</font>"\ "</p>" #bruce 060317 revised this text to reflect what it does in A7; 060320 added 1421-not-fixed warning win.editUndoAction.setWhatsThis( editUndoText ) win.editUndoText = editUndoText #bruce 060317 to help fix bug 1421 in Undo whatsthis wiki help link # Redo from PlatformDependent import is_macintosh if is_macintosh(): redo_accel = "(Ctrl + Shift + Z)" # note: this is further modified (Ctrl -> Cmd) by other code # changing this is partly redundant with code in undo*.py, but as of 060317 it's desirable in editRedoText too else: redo_accel = "(Ctrl + Y)" editRedoText = "<u><b>Redo</b></u> %s<br> "\ "<p><img source=\"ui/actions/Edit/Redo.png\"> <br>"\ "Restores a change which was undone using the Undo command."\ "<br><font color=\"#808080\">"\ "Known bug: the link to wiki help for Redo "\ "only works if you got this popup from the Edit menu item for Redo, "\ "not from the Redo toolbutton."\ "</font>"\ "</p>" % redo_accel #bruce 060317 revised this text to be more accurate, and split out redo_accel; 060320 added 1421-not-fixed warning win.editRedoAction.setWhatsThis( editRedoText ) win.editRedoText = editRedoText #bruce 060317 to help fix bug 1421 in Redo whatsthis wiki help link # Cut editCutText = "<u><b>Cut</b></u> (Ctrl + X)<br> "\ "<p><img source=\"ui/actions/Edit/Cut.png\"><br> "\ "Removes the selected object(s) and stores the cut data on the"\ "clipboard."\ "</p>" win.editCutAction.setWhatsThis( editCutText ) # Copy editCopyText = "<u><b>Copy</b></u> (Ctrl + C)<br> "\ "<p><img source=\"ui/actions/Edit/Copy.png\"><br> "\ "Places a copy of the selected chunk(s) on the clipboard "\ "while leaving the original chunk(s) unaffected."\ "</p>" win.editCopyAction.setWhatsThis( editCopyText ) # Paste editPasteText = "<u><b>Paste</b></u> (Ctrl + V)<br> "\ "<p><img source=\"ui/actions/Edit/Paste_On.png\"><br> "\ "<b>Paste</b> places the user in <b>Build</b> mode where copied chunks on "\ "the clipboard can be pasted into the model by double clicking in empty space. "\ "If the current clipboard chunk has a <b><i>hotspot</i></b>, it can be bonded to "\ "another chunk by single clicking on one of the chunk's bondpoints."\ "</p>"\ "<p>A <b><i>Hotspot</i></b> is a green bondpoint on a clipboard chunk indicating "\ "it will be the active bondpoint which will connect to another chunk's bondpoint. "\ "To specify a hotspot on the clipboard chunk, click on one of its bondpoints in the "\ "<b><i>MMKit's Thumbview</i></b>."\ "</p>" win.editPasteAction.setWhatsThis( editPasteText ) # Delete editDeleteText = "<u><b>Delete</b></u> (DEL)<br> "\ "<p><img source=\"ui/actions/Delete.png\"><br> "\ "Deletes the selected object(s). "\ "For this Alpha release, deleted objects may be permanently lost, or they might be recoverable using Undo.</p>" #bruce 060212 revised above text (and fixed spelling error); should be revised again before A7 release win.editDeleteAction.setWhatsThis( editDeleteText ) #Preferences Dialog editPrefsText = "<u><b>Preferences Dialog</b></u>"\ "<p>Allows you to edit various user preferences "\ "such as changing atom, bond display properties,"\ "lighting, background color, window position and"\ "size, plugins etc. </p>" win.editPrefsAction.setWhatsThis( editPrefsText ) # # View Toolbar # # Home View setViewHomeActionText = \ "<u><b>Home</b></u> (Home)<br>"\ "<p>"\ "<img source=\"ui/actions/View/Modify/Home.png\"><br>"\ "When you create a new model, it appears in a "\ "default view orientation (FRONT view). When you "\ "open an existing model, it appears in the "\ "orientation it was last saved. You can change the "\ "default orientation by selecting <b>Set Home View "\ "to Current View</b> from the <b>View</b> menu."\ "</p>" win.setViewHomeAction.setWhatsThis( setViewHomeActionText ) # Fit to Window setViewFitToWindowActionText = "<u><b>Fit To Window</b></u><br>"\ "<p><img source=\"ui/actions/View/Modify/Zoom_To_Fit.png\"><br> "\ "Refits the model to the screen so you can view the entire model."\ "</p>" win.setViewFitToWindowAction.setWhatsThis( setViewFitToWindowActionText ) # Recenter setViewRecenterActionText = "<u><b>Recenter</b></u><br>"\ "<p><img source=\"ui/actions/View/Modify/Recenter.png\"><br> "\ "Changes the view center and zoom factor so that the origin is in the "\ "center of the view and you can view the entire model."\ "</p>" win.setViewRecenterAction.setWhatsThis( setViewRecenterActionText ) # Zoom Tool setzoomToolActionText = "<u><b>Zoom Tool</b></u><br>"\ "<p><img source=\"ui/actions/View/Modify/Zoom.png\"><br> "\ "Allows the user to zoom into a specific area of the model by specifying a rectangular area. "\ "This is done by holding down the left button and dragging the mouse.</p>"\ "<p>A mouse with a mouse wheel can also be used to zoom in and out "\ "at any time, without using the Zoom Tool.</p>" win.zoomToolAction.setWhatsThis( setzoomToolActionText ) # Pan Tool setpanToolActionText = "<u><b>Pan Tool</b></u><br>"\ "<p><img source=\"ui/actions/View/Modify/Pan.png\"><br> "\ "Allows X-Y panning using the left mouse button.</p>"\ "<p>Users with a 3-button mouse can pan the model at any time by pressing "\ "the middle mouse button while holding down the Shift key.</p>" win.panToolAction.setWhatsThis( setpanToolActionText ) # Rotate Tool setrotateToolActionText = "<u><b>Rotate Tool</b></u><br>"\ "<p><img source=\"ui/actions/View/Modify/Rotate.png\"><br> "\ "Allows free rotation using the left mouse button.</p>"\ "<p>Users with a 3-button mouse can rotate the model at any time by pressing "\ "the middle mouse button and dragging the mouse.</p>" win.rotateToolAction.setWhatsThis( setrotateToolActionText ) # Orthographic Projection setViewOrthoActionText = "<u><b>Orthographic Projection</b></u><br>"\ "<p>Sets nonperspective (or parallel) projection, with no foreshortening."\ "</p>" win.setViewOrthoAction.setWhatsThis( setViewOrthoActionText ) # Perspective Projection setViewPerspecActionText = "<u><b>Perspective Projection</b></u><br>"\ "<p>Set perspective projection, drawing objects slightly larger "\ "that are closer to the viewer."\ "</p>" win.setViewPerspecAction.setWhatsThis( setViewPerspecActionText ) # Normal To viewNormalToActionText = "<u><b>Set View Normal To</b></u><br>"\ "<p><img source=\"ui/actions/View/Set_View_Normal_To.png/\"><br> "\ "Orients view to the normal vector of the plane defined by "\ "3 or more selected atoms, or a jig's axis."\ "</p>" win.viewNormalToAction.setWhatsThis( viewNormalToActionText ) # Parallel To viewParallelToActionText = "<u><b>Set View Parallel To</b></u><br>"\ "<p><img source=\"ui/actions/View/Set_View_Parallel_To.png\"><br> "\ "Orients view parallel to the vector defined by 2 selected atoms."\ "</p>" win.viewParallelToAction.setWhatsThis( viewParallelToActionText ) # Save Named View saveNamedViewActionText = "<u><b>Save Named View</b></u><br>"\ "<p><img source=\"ui/actions/View/Modify/Save_Named_View.png\"><br> "\ "Saves the current view as a custom <b>named view</b> and places it in the Model Tree.</p>" \ "<p>The view can be restored by selecting <b>Change View</b> from its context menu in the Model Tree."\ "</p>" win.saveNamedViewAction.setWhatsThis( saveNamedViewActionText ) # Front View viewFrontActionText = "<u><b>Front View</b></u><br>"\ "<p><img source=\"ui/actions/View/Front.png\"><br> "\ "Orients the view to the Front View."\ "</p>" win.viewFrontAction.setWhatsThis( viewFrontActionText ) # Back View viewBackActionText = "<u><b>Back View</b></u><br>"\ "<p><img source=\"ui/actions/View/Back.png\"><br> "\ "Orients the view to the Back View."\ "</p>" win.viewBackAction.setWhatsThis( viewBackActionText ) # Top View viewTopActionText = "<u><b>Top View</b></u><br>"\ "<p><img source=\"ui/actions/View/Top.png\"><br> "\ "Orients the view to the Top View."\ "</p>" win.viewTopAction.setWhatsThis( viewTopActionText ) # Bottom View viewBottomActionText = "<u><b>Bottom View</b></u><br>"\ "<p><img source=\"ui/actions/View/Bottom.png\"><br> "\ "Orients the view to the Bottom View."\ "</p>" win.viewBottomAction.setWhatsThis( viewBottomActionText ) # Left View viewLeftActionText = "<u><b>Left View</b></u><br>"\ "<p><img source=\"ui/actions/View/Left.png\"><br> "\ "Orients the view to the Left View."\ "</p>" win.viewLeftAction.setWhatsThis( viewLeftActionText ) # Right View viewRightActionText = "<u><b>Right View</b></u><br>"\ "<p><img source=\"ui/actions/View/Right.png\"><br> "\ "Orients the view to the Right View."\ "</p>" win.viewRightAction.setWhatsThis( viewRightActionText ) #Isometric View viewIsometricActionText = "<u><b>IsometricView</b></u><br>"\ "<p><img source=\"ui/actions/View/Isometric.png\"><br> "\ "Orients the view to the Isometric View."\ "</p>" win.viewIsometricAction.setWhatsThis( viewIsometricActionText ) # Rotate View 180 viewRotate180ActionText = "<u><b>Rotate View 180</b></u><br>"\ "<p><img source=\"ui/actions/View/Rotate_View_180.png.png\"><br> "\ "Rotates the view 180 degrees."\ "</p>" win.viewRotate180Action.setWhatsThis( viewRotate180ActionText ) # Rotate View +90 viewRotatePlus90ActionText = "<u><b>Rotate View +90</b></u><br>"\ "<p><img source=\"ui/actions/View/Rotate_View_+90.png\"><br> "\ "Increment the current view by 90 degrees around the vertical axis."\ "</p>" win.viewRotatePlus90Action.setWhatsThis( viewRotatePlus90ActionText ) # Rotate View -90 viewRotateMinus90ActionText = "<u><b>Rotate View -90</b></u><br>"\ "<p><img source=\"ui/actions/View/Rotate_View_-90.png\"><br> "\ "Decrement the current view by 90 degrees around the vertical axis."\ "</p>" win.viewRotateMinus90Action.setWhatsThis( viewRotateMinus90ActionText ) # QuteMol viewQuteMolActionText = \ "<u><b>QuteMol</b></u><br>"\ "<p><img source=\"ui/actions/View/Display/QuteMol.png\"><br> "\ "Starts QuteMol and loads a PDB file of the current model."\ "</p>" \ "QuteMol must be installed and enabled as a plug-in from "\ "<b>Preferences > Plug-ins</b> for this feature to work." \ "</p>" win.viewQuteMolAction.setWhatsThis( viewQuteMolActionText ) # POV-Ray (was Raytrace Scene) viewRaytraceSceneActionText = "<u><b>POV-Ray</b></u><br>"\ "<p><img source=\"ui/actions/View/Display/Raytrace_Scene.png\"><br> "\ "Raytrace the current scene using POV-Ray. "\ "</p>" \ "POV-Ray must be installed and enabled as a plug-in from "\ "<b>Preferences > Plug-ins</b> for this feature to work." \ "</p>" win.viewRaytraceSceneAction.setWhatsThis( viewRaytraceSceneActionText ) # # Grids Toolbar # # Surface 100 orient100ActionText = "<u><b>Surface 100</b></u><br>"\ "<p><img source=\"ui\actions\Properties Manager/Surface100.png\"><br> "\ "Reorients the view to the nearest angle that would "\ "look straight into a (1,0,0) surface of a diamond lattice."\ "</p>" win.orient100Action.setWhatsThis(orient100ActionText ) # Surface 110 orient110ActionText = "<u><b>Surface 110</b></u><br>"\ "<p><img source=\"ui\actions\Properties Manager/Surface110.png\"><br> "\ "Reorients the view to the nearest angle that would "\ "look straight into a (1,1,0) surface of a diamond lattice."\ "</p>" win.orient110Action.setWhatsThis(orient110ActionText ) # Surface 111 orient111ActionText = "<u><b>Surface 111</b></u><br>"\ "<p><img source=\"ui\actions\Properties Manager/Surface111.png\"><br> "\ "Reorients the view to the nearest angle that would "\ "look straight into a (1,1,1) surface of a diamond lattice."\ "</p>" win.orient111Action.setWhatsThis(orient111ActionText ) # # Insert toolbar # # Graphene insertGrapheneActionText = \ "<u><b>Build Graphene</b></u><br>"\ "<p><img source=\"ui/actions/Tools/Build Structures/Graphene.png\"><br> "\ "Inserts a 2D sheet of graphene in the model "\ "based on the current parameters in the Property Manager. "\ "To preview the structure based on the current parameters, "\ "click the Preview button located at the top of the "\ "Property Manager :<br> "\ "<img source=\"ui/actions/Properties Manager/Preview.png\"> "\ "</p>" win.insertGrapheneAction.setWhatsThis(insertGrapheneActionText ) # Build Nanotube insertNanotubeActionText = \ "<u><b>Build Nanotube</b></u>"\ "<p><img source=\"ui/actions/Tools/Build Structures/Nanotube.png\"> <br>"\ "Inserts a carbon or boron nitride nanotube in the model "\ "based on the current parameters in the Property Manager. "\ "To preview the structure based on the current parameters, "\ "click the Preview button located at the top of the "\ "Property Manager :<br> "\ "<img source=\"ui/actions/Properties Manager/Preview.png\"> "\ "</p>" win.insertNanotubeAction.setWhatsThis(insertNanotubeActionText ) # Build DNA buildDnaActionText = \ "<u><b>Build DNA</b></u><br>"\ "<p><img source=\"ui/actions/Tools/Build Structures/DNA.png\"><br> "\ "Inserts DNA in the model "\ "based on the current parameters in the Property Manager. "\ "To preview the structure based on the current parameters, "\ "click the Preview button located at the top of the "\ "Property Manager :<br> "\ "<img source=\"ui/actions/Properties Manager/Preview.png\"> "\ "</p>" win.buildDnaAction.setWhatsThis(buildDnaActionText ) # POV-Ray Scene insertPovraySceneActionText = "<u><b>Insert POV-Ray Scene</b></u><br>"\ "<p><img source=\"ui/actions/POV-Ray_Scene.png\"><br> "\ "Inserts a POV-Ray Scene file based on the current model and viewpoint. "\ "</p>" win.insertPovraySceneAction.setWhatsThis(insertPovraySceneActionText ) # Comment insertCommentActionText = "<u><b>Insert Comment</b></u><br>"\ "<p><img source=\"ui/actions/Insert/Comment.png\"><br> "\ "Inserts a comment in the current part. "\ "</p>" win.insertCommentAction.setWhatsThis(insertCommentActionText ) # # Display toolbar # # Display Default dispDefaultActionText = "<u><b>Display Default</b></u><br>"\ "<p><img source=\"ui/actions/View/Display/Default.png\"><br> "\ "Changes the <i>display setting</i> of selected atoms or chunks to "\ "<b>Default</b> , rendering them in the <b>Current Display Mode</b>."\ "</p>"\ "<p>If no atoms or chunks are selected, then this action will change the "\ "<b>Current Display Mode</b> of the 3D workspace to the <b>Default Display Mode</b>. " \ "All chunks with their display setting set to <b>Default</b> will be rendered in the "\ "<b>Default Display Mode</b>."\ "</p>"\ "<p>The <b>Default Display Mode</b> can be changed via the "\ "<b>Edit > Preferences</b> menu and selecting the <b>Modes</b> tab."\ "</p>"\ "<p>The <b>Current or Default Display Mode</b> is displayed in the status bar in the "\ "lower right corner of the main window."\ "</p>" win.dispDefaultAction.setWhatsThis(dispDefaultActionText ) # Display Invisible dispInvisActionText = "<u><b>Display Invisible</b></u><br>"\ "<p><img source=\"ui/actions/View/Display/Invisible.png\"><br> "\ "Changes the <i>display setting</i> of selected atoms or chunks to "\ "<b>Invisible</b>, making them invisible."\ "</p>"\ "<p>If no atoms or chunks are selected, then this action will change the "\ "<b>Current Display Mode</b> of the 3D workspace to <b>Invisible</b>. " \ "All chunks with their display setting set to <b>Default</b> will inherit "\ "this display property."\ "</p>" win.dispInvisAction.setWhatsThis(dispInvisActionText ) # Display Lines dispLinesActionText = "<u><b>Display Lines</b></u><br>"\ "<p><img source=\"ui/actions/View/Display/Lines.png\"><br> "\ "Changes the <i>display setting</i> of selected atoms or chunks to "\ " <b>Lines</b>. Only bonds are rendered as colored lines."\ "</p>"\ "<p>If no atoms or chunks are selected, then this action will change the "\ "<b>Current Display Mode</b> of the 3D workspace to <b>Lines</b>. " \ "All chunks with their display setting set to <b>Default</b> will inherit "\ "this display property."\ "</p>" win.dispLinesAction.setWhatsThis(dispLinesActionText ) # Display Tubes dispTubesActionText = "<u><b>Display Tubes</b></u><br>"\ "<p><img source=\"ui/actions/View/Display/Tubes.png\"><br> "\ "Changes the <i>display setting</i> of selected atoms or chunks to "\ "<b>Tubes</b>. Atoms and bonds are rendered as colored tubes."\ "</p>"\ "<p>If no atoms or chunks are selected, then this action will change the "\ "<b>Current Display Mode</b> of the 3D workspace to <b>Tubes</b>. " \ "All chunks with their display setting set to <b>Default</b> will inherit "\ "this display property."\ "</p>" win.dispTubesAction.setWhatsThis(dispTubesActionText ) # Display Ball and Stick dispBallActionText = "<u><b>Display Ball and Stick</b></u><br>"\ "<p><img source=\"ui/actions/View/Display/Ball_and_Stick.png\"><br> "\ "Changes the <i>display setting</i> of selected atoms or chunks to "\ "<b>Ball and Stick</b> mode. Atoms are rendered "\ "as spheres and bonds are rendered as narrow cylinders."\ "</p>"\ "<p>If no atoms or chunks are selected, then this action will change the "\ "<b>Current Display Mode</b> of the 3D workspace to <b>Ball and Stick</b>. " \ "All chunks with their display setting set to <b>Default</b> will inherit "\ "this display property."\ "</p>"\ "<p>The scale of the spheres and cylinders can be changed from the "\ "<b>Atoms</b> and <b>Bonds</b> pages of the <b>Preferences</b> dialog."\ "</p>" win.dispBallAction.setWhatsThis(dispBallActionText ) # Display CPK # [bruce extended and slightly corrected text, 060307] dispCPKActionText = "<u><b>Display CPK</b></u><br>"\ "<p><img source=\"ui/actions/View/Display/CPK.png\"><br> "\ "Changes the <i>display setting</i> of selected atoms or chunks to "\ "<b>CPK</b> mode. Atoms are rendered as spheres with "\ "a size equal to 0.78 of their VdW radius, corresponding "\ "to a contact force of approximately 0.1 nN with neighboring "\ "nonbonded atoms. Bonds are not rendered."\ "</p>"\ "<p>If no atoms or chunks are selected, then this action will change the "\ "<b>Current Display Mode</b> of the 3D workspace to <b>CPK</b>. " \ "All chunks with their display setting set to <b>Default</b> will inherit "\ "this display property."\ "</p>"\ "<p>The scale of the spheres can be changed from the "\ "<b>Atoms</b> and <b>Bonds</b> pages of the <b>Preferences</b> dialog."\ "</p>" win.dispCPKAction.setWhatsThis(dispCPKActionText ) # Display Cylinder dispCylinderActionText = "<u><b>Display Cylinder</b></u><br>"\ "<p><img source=\"ui/actions/View/Display/Cylinder.png\"><br> "\ "Changes the <i>display setting</i> of selected chunks to "\ "<b>Cylinder</b> mode. Chunks are rendered as cylinders."\ "</p>"\ "<p>If no chunks are selected, then this action will change the "\ "<b>Current Display Mode</b> of the 3D workspace to <b>Cylinder</b>. " \ "All chunks with their display setting set to <b>Default</b> will inherit "\ "this display property."\ "</p>" win.dispCylinderAction.setWhatsThis(dispCylinderActionText ) # Display Surface dispSurfaceActionText = "<u><b>Display Surface</b></u><br>"\ "<p><img source=\"ui/actions/View/Display/Surface.png\"><br> "\ "Changes the <i>display setting</i> of selected chunks to "\ "<b>Surface</b> mode. Chunks are rendered as a smooth surface."\ "</p>"\ "<p>If no chunks are selected, then this action will change the "\ "<b>Current Display Mode</b> of the 3D workspace to <b>Surface</b>. " \ "All chunks with their display setting set to <b>Default</b> will inherit "\ "this display property."\ "</p>" win.dispSurfaceAction.setWhatsThis(dispSurfaceActionText ) #Reset Chunk Color dispResetChunkColorText = "<u><b>Reset Chunk Color</b></u><br>"\ "Resets the user defined chunk color and renders the atoms " \ "(in the chunk) with their own element colors" win.dispResetChunkColorAction.setWhatsThis(dispResetChunkColorText ) #Reset Atoms Display dispResetAtomsDisplayText = "<u><b>Reset Atoms Display</b></u><br>"\ "Renders the selected atoms (or the atoms in the"\ "selected chunks) with the same display style as "\ "that of their parent chunk" win.dispResetAtomsDisplayAction.setWhatsThis(dispResetAtomsDisplayText) #Show Invisible Atoms dispShowInvisAtomsText = "<u><b>Show Invisible Atoms</b></u><br>"\ "Renders the selected atoms (or the atoms in the selected "\ "chunks) with the same display style as their parent chunk. "\ "However, if the parent chunk is set as invisible, this feature " \ "will not work. " win.dispShowInvisAtomsAction.setWhatsThis(dispShowInvisAtomsText) #Element Color Settings Dialog dispElementColorSettingsText = "<u><b>Element Color Settings Dialog</b></u><br>"\ "Element colors can be manually changed " \ "using this dialog. Also, the user can load"\ "or save the element colors" win.dispElementColorSettingsAction.setWhatsThis(dispElementColorSettingsText) # # Select toolbar # # Select All selectAllActionText = "<u><b>Select All</b></u> (Ctrl + A)<br>"\ "<p><img source=\"ui/actions/Tools/Select/Select_All.png\"><br> "\ "When in <b>Build</b> mode, this will select all the atoms in "\ "the model. Otherwise, this will select all the chunks in the model."\ "</p>" win.selectAllAction.setWhatsThis(selectAllActionText ) # Select None selectNoneActionText = "<u><b>Select None</b></u></p><br>"\ "<p><img source=\"ui/actions/Tools/Select/Select_None.png\"><br> "\ "Unselects everything currently selected.</p>" win.selectNoneAction.setWhatsThis(selectNoneActionText ) # InvertSelection selectInvertActionText = "<u><b>Invert Selection</b></u> (Ctrl + Shift + I)<br>"\ "<p><img source=\"ui/actions/Tools/Select/Select_Invert.png\"><br> "\ "Inverts the current selection.</p>" win.selectInvertAction.setWhatsThis(selectInvertActionText ) # Select Connected selectConnectedActionText = "<u><b>Select Connected</b></u> (Ctrl + Shift + C)<br>"\ "<p><img source=\"ui/actions/Tools/Select/Select_Connected.png\"><br> "\ "Selects all the atoms that can be reached by the currently selected atom "\ "via an unbroken chain of bonds. </p>"\ "<p>You can also select all connected atoms by double clicking on an atom or bond "\ "while in <b>Build</b> mode.</p>" win.selectConnectedAction.setWhatsThis(selectConnectedActionText ) # Select Doubly selectDoublyActionText = "<u><b>Select Doubly</b></u><br>"\ "<p><img source=\"ui/actions/Tools/Select/Select_Doubly.png\"><br> "\ "Selects all the atoms that can be reached from a currently selected "\ "atom through two disjoint unbroken chains of bonds. Atoms singly "\ "connected to this group and unconnected to anything else are also "\ "included in the selection."\ "</p>" win.selectDoublyAction.setWhatsThis(selectDoublyActionText ) # Expand Selection selectExpandActionText = "<u><b>Expand Selection</b></u> (Ctrl + D)<br>"\ "<p><img source=\"ui/actions/Tools/Select/Expand.png\"><br> "\ "Selects any atom that is a neighbor of a currently selected atom."\ "</p>" win.selectExpandAction.setWhatsThis(selectExpandActionText ) # Contract Selection selectContractActionText = "<u><b>Contract Selection</b></u> (Ctrl + Shift + D)<br>"\ "<p><img source=\"ui/actions/Tools/Select/Contract.png\"><br> "\ "Deselects any atom that is a neighbor of a non-picked atom or has a bondpoint."\ "</p>" win.selectContractAction.setWhatsThis(selectContractActionText ) # # Modify Toolbar # # Adjust Selection modifyAdjustSelActionText = "<u><b>Adjust Selection</b></u><br>"\ "<p><img source=\"ui/actions/Tools/Adjust_Selection.png\"><br> "\ "Adjusts the atom and bond positions (<i>of the selection</i>) to make the geometry more realistic. "\ "The operations used to move the atoms and bonds approximate molecular mechanics methods."\ "</p>" win.modifyAdjustSelAction.setWhatsThis(modifyAdjustSelActionText ) # Adjust All modifyAdjustAllActionText = "<u><b>Adjust All</b></u><br>"\ "<p><img source=\"ui/actions/Tools/Adjust_All.png\"><br> "\ "Adjusts the atom and bond positions (<i>of the entire part</i>) to make the geometry of the part more realistic. "\ "The operations used to move the atoms and bonds approximate molecular mechanics methods."\ "</p>" win.modifyAdjustAllAction.setWhatsThis(modifyAdjustAllActionText ) # Hydrogenate modifyHydrogenateActionText = "<u><b>Hydrogenate</b></u> <br>"\ "<p><img source=\"ui/actions/Tools/Build Tools/Hydrogenate.png\"><br> "\ "Adds hydrogen atoms to all the bondpoints in the selection.</p>" win.modifyHydrogenateAction.setWhatsThis(modifyHydrogenateActionText ) # Dehydrogenate modifyDehydrogenateActionText = "<u><b>Dehydrogenate</b></u><br>"\ "<p><img source=\"ui/actions/Tools/Build Tools/Dehydrogenate.png\"><br> "\ "Removes all hydrogen atoms from the selection.</p>" win.modifyDehydrogenateAction.setWhatsThis(modifyDehydrogenateActionText ) # Passivate modifyPassivateActionText = "<u><b>Passivate</b></u> (Ctrl + P)<br>"\ "<p><img source=\"ui/actions/Tools/Build Tools/Passivate.png\"><br> "\ "Changes the types of incompletely bonded atoms to atoms with the "\ "right number of bonds, using atoms with the best atomic radius."\ "</p>" win.modifyPassivateAction.setWhatsThis(modifyPassivateActionText ) # Stretch modifyStretchActionText = "<u><b>Stretch</b></u><br>"\ "<p><img source=\"ui/actions/Tools/Build Tools/Stretch.png\"><br> "\ "Stretches the bonds of the selected chunk(s).</p>" win.modifyStretchAction.setWhatsThis(modifyStretchActionText ) # Delete Bonds modifyDeleteBondsActionText = "<u><b>Cut Bonds</b></u><br>"\ "<p><img source=\"ui/actions/Tools/Build Tools/Delete_Bonds.png\"><br> "\ "Delete all bonds between selected and unselected atoms or chunks.</p>" win.modifyDeleteBondsAction.setWhatsThis(modifyDeleteBondsActionText ) # Separate/New Chunk modifySeparateActionText = "<u><b>Separate</b></u><br>"\ "<p><img source=\"ui/actions/Tools/Build Tools/Separate.png\"><br> "\ "Creates a new chunk(s) from the currently selected atoms. "\ "If the selected atoms belong to different chunks, multiple new "\ "chunks are created.</p>" win.modifySeparateAction.setWhatsThis(modifySeparateActionText ) # New Chunk makeChunkFromSelectedAtomsActionText = "<u><b>New Chunk</b></u><br>"\ "<p><img source=\"ui/actions/Tools/Build Tools/New_Chunk.png\"><br> "\ "Creates a new chunk from the currently selected atoms. "\ "All atoms end up in a single chunk.</p>" win.makeChunkFromSelectedAtomsAction.setWhatsThis(makeChunkFromSelectedAtomsActionText ) # Merge Chunks modifyMergeActionText = "<u><b>Merge Chunks</b></u><br>"\ "<p><img source=\"ui/actions/Tools/Build Tools/Merge.png\"><br> "\ "Merges two or more chunks into a single chunk.</p>" win.modifyMergeAction.setWhatsThis(modifyMergeActionText ) # Invert Chunks modifyInvertActionText = "<u><b>Invert</b></u><br>"\ "<p><img source=\"ui/actions/Tools/Build Tools/Invert.png\"><br> "\ "Inverts the atoms of the selected chunks.</p>" win.modifyInvertAction.setWhatsThis(modifyInvertActionText ) # Mirror Selected Chunks #Note that the the feature name is intentionally kept "Mirror" instead of "Mirror Chunks" because # in future we will support mirrroing atoms as well. -- ninad060814 modifyMirrorActionText = "<u><b>Mirror</b></u><br>"\ "<p><img source=\"ui/actions/Tools/Build Tools/Mirror.png\"><br> "\ "Mirrors the selected <b> chunks </b> about a reference Grid Plane.<br>"\ "<font color=\"#808080\">Note: In this version, it doesn't mirror jigs or individual atoms.</font> </p>" win.modifyMirrorAction.setWhatsThis(modifyMirrorActionText ) # Align to Common Axis modifyAlignCommonAxisActionText = "<u><b>Align To Common Axis</b></u><br>"\ "<p><img source=\"ui/actions/Tools/Build Tools/AlignToCommonAxis.png\"><br> "\ "Aligns one or more chunks to the axis of the first selected chunk."\ "You must select two or more chunks before using this feature."\ "</p>" win. modifyAlignCommonAxisAction.setWhatsThis( modifyAlignCommonAxisActionText ) #Center on Common Axis modifyCenterCommonAxisActionText= "<u><b>Center On Common Axis</b></u><br>"\ "<p><b> Moves</b> all selected chunks to the center of the <b> first </b> selected chunk "\ "and also <b>aligns</b> them to the axis of the first one ."\ "You must select two or more chunks before using this feature. </p>" win.modifyCenterCommonAxisAction.setWhatsThis(modifyCenterCommonAxisActionText) # # Tools Toolbar # # Select Chunks toolsSelectMoleculesActionText = "<u><b>Select Chunks</b></u><!-- [[Feature:Select Chunks Mode]] --><br>"\ "<p><img source=\"ui/actions/Toolbars/Standard/63.png\"><br> "\ "<b>Select Chunks</b> allows you to select/unselect chunks with the mouse.</p>"\ "<p><b><u>Mouse/Key Combinations</u></b></p>"\ "<p><b>Left Click/Drag</b> - selects a chunk(s).</p>"\ "<p><b>Ctrl+Left Click/Drag</b> - removes chunk(s) from selection.</p>"\ "<p><b>Shift+Left Click/Drag</b> - adds chunk(s) to selection."\ "</p>" win. toolsSelectMoleculesAction.setWhatsThis( toolsSelectMoleculesActionText ) # Move Chunks toolsMoveMoleculeActionText = "<u><b>Move Chunks</b></u><!-- [[Feature:Move Chunks Mode]] --><br>"\ "<p><img source=\"ui/actions/Toolbars/Standard/64.png\"><br> "\ "Activates <b>Move Chunks</b> mode, allowing you to select, "\ "move and rotate one of more chunks with the mouse.</p>"\ "<p><b><u>Mouse/Key Combinations</u></b></p>"\ "<p><b>Left Drag</b> - moves the selected chunk(s).</p>"\ "<p><b>Ctrl+Left Drag</b> - freely rotates selected chunk(s).</p>"\ "<p><b>Shift+Left Drag</b> - constrained movement and rotation of a chunk about its own axis."\ "</p>" win. toolsMoveMoleculeAction.setWhatsThis( toolsMoveMoleculeActionText ) # Build Atoms toolsDepositAtomActionText = \ "<u><b>Build Atoms</b></u><!-- [[Feature:Build Atoms]] --><br>"\ "<p><img source=\"ui/actions/Tools/Build Structures/Atoms.png\"><br> "\ "<b>Build Atoms</b> allows you to build structures one atom at a time or by depositing objects "\ "that are on the paste clipboard. You can also insert structures from the "\ "NanoEngineer-1 Parts Library.</p>"\ "<p>It is also possible to change bond types between atoms using the <b>Bond Tool</b> or by "\ "simply dragging and dropping one bondpoint onto another."\ "</p>" win. toolsDepositAtomAction.setWhatsThis( toolsDepositAtomActionText ) # Build Crystal (was Cookie Cutter Mode) toolsCookieCutActionText = "<u><b>Build Crystal</b></u><!-- [[Feature:Build Crystal]] --><br>"\ "<p><><img source=\"ui/actions/Tools/Build Structures/Cookie_Cutter.png\"><br> "\ "<b>Build Crystal</b> provides tools for cutting out multi-layered shapes from "\ "slabs of diamond or lonsdaleite lattice.</p>" win. toolsCookieCutAction.setWhatsThis( toolsCookieCutActionText ) # Tools > Extrude toolsExtrudeActionText = "<u><b>Extrude</b></u><!-- [[Feature:Extrude Mode]] --><br>"\ "<p><img source=\"ui/actions/Insert/Features/Extrude.png\"><br> "\ "Activates <b>Extrude</b> mode, allowing you to create a rod or ring using a chunk as "\ "a repeating unit.</p>" win. toolsExtrudeAction.setWhatsThis( toolsExtrudeActionText ) # Fuse Chunks Mode toolsFuseChunksActionText = "<u><b>Fuse Chunks Mode</b></u><!-- [[Feature:Fuse Chunks Mode]] --><br>"\ "<p><img source=\"ui/actions/Tools/Build Tools/Fuse.png\"><br> "\ "<b>Fuse Chunks</b> can be used to interactively join two or more "\ "chunks by dragging chunks around and fusing them together. "\ "Two fusing options are supported:<br><br>"\ "<b>Make Bonds</b> creates bonds between the existing bondpoints "\ "of two or more chunks. Bondpoints are highlighted and lines are drawn (and undrawn) as chunks "\ "are dragged to indicate bonding relationships between bondpoints. Bondpoints with "\ "multiple bonding relationships are highlighted in magenta to indicate that they cannot "\ "make bonds.<br><br>"\ "<b>Fuse Atoms</b> fuses pairs of overlapping atoms between chunks. The set of overlapping "\ "atoms in the selected chunk(s) are highlighted in green while the set of atoms that will be deleted "\ "in non-selected chunks are highlighted in dark red. It is possible that deleted atoms will not fuse "\ "properly, leaving bondpoints on the selected chunk(s) atoms. This is a bug. To help "\ "minimize this problem, try to get the bonds of overlapping atoms oriented similarly.<br>"\ "</p>" win.toolsFuseChunksAction.setWhatsThis( toolsFuseChunksActionText ) # # Simulator Toolbar # # Minimize Energy simMinimizeEnergyActionText = "<u><b>Minimize Energy</b></u><br>"\ "<p><img source=\"ui/actions/Simulation/Minimize_Energy.png\"><br> "\ "The potential energy of a chemical structure is a function of the relative positions of its atoms. " \ "To obtain this energy with complete accuracy involves a lot of computer time spent on quantum " \ "mechanical calculations, which cannot be practically done on a desktop computer. "\ "To get an approximate potential energy without all that, we represent the energy as a series of " \ "terms involving geometric properties of the structure: lengths of chemical bonds, angles between " \ "pairs and triples of chemical bonds, etc. </p>" \ "<p>" \ "As is generally the case with physical systems, the gradient of the potential energy represents " \ "the forces acting on various particles. The atoms want to move in the direction that most reduces " \ "the potential energy. Energy minimization is a process of adjusting the atom positions to try to find " \ "a global minimum of the potential energy. Each atom contributes three variables (its x, y, and z " \ "coordinates) so the search space is multi-dimensional. The global minimum is the configuration " \ "that the atoms will settle into if lowered to zero Kelvin. </p>" win. simMinimizeEnergyAction.setWhatsThis( simMinimizeEnergyActionText ) # Run Dynamics (was NanoDynamics-1). Mark 060807. simSetupActionText = "<u><b>Run Dynamics</b></u><br>"\ "<p><img source=\"ui/actions/Simulation/Run_Dynamics.png\"><br> "\ "This is the interface to the NanoEngineer-1 molecular dynamics simulator. "\ "Enter the parameters of the simulation and click <b>Run Simulation</b>."\ "The simulator creates a trajectory (movie) file by calculating the inter-atomic potentials and bonding "\ "of the entire model.</p>" win. simSetupAction.setWhatsThis( simSetupActionText ) # Play Movie (was Movie Player) Mark 060807. simMoviePlayerActionText = "<u><b>Play Movie</b></u><br>"\ "<p><img source=\"ui/actions/Simulation/Play_Movie.png\"><br> "\ "Plays the most recent trajectory (movie) file created by the NanoEngineer-1 molecular dynamics simulator."\ "To create a movie file, select <b>Run Dynamics</b>.</p>" win. simMoviePlayerAction.setWhatsThis( simMoviePlayerActionText ) # Make Graphs (was Plot Tool) Mark 060807. simPlotToolActionText = "<u><b>Make Graphs</b></u><br>"\ "<p><img source=\"ui/actions/Simulation/Make_Graphs.png\"><br> "\ "Make a graph of a simulator trace file using GNUplot. A simulation must be run to create "\ "the trace file and the part must have a jig that writes output to the trace file. <br><br>"\ "The following list of jigs write data to the trace file:<br>"\ "<b>Rotary Motors:</b> speed (GHz) and torque (nn-nm)<br>"\ "<b>Linear Motors:</b> displacement (pm)<br>"\ "<b>Anchors:</b> torque (nn-nm)<br>"\ "<b>Thermostats:</b> energy added (zJ)<br>"\ "<b>Thermometer:</b> temperature (K)<br>"\ "<b>Measure Distance:</b> distance(angstroms)<br>"\ "<b>Measure Angle:</b> angle (degrees)<br>"\ "<b>Measure Dihedral:</b> dihedral(degrees)<br>"\ "</p>" win. simPlotToolAction.setWhatsThis( simPlotToolActionText ) # # Dashboard Buttons # # Done toolsDoneActionText = "<u><b>Done</b></u><br>"\ "<p><img source=\"ui/actions/Properties Manager/Done.png\"><br> "\ "Completes the current operation and enters the default mode."\ "</p>" win. toolsDoneAction.setWhatsThis( toolsDoneActionText ) # Cancel toolsCancelActionText = "<u><b>Cancel</b></u><br>"\ "<p><img source=\"ui/actions/Properties Manager/Cancel.png\"><br> "\ "Cancels the current operation and enters the default mode."\ "</p>" win. toolsCancelAction.setWhatsThis( toolsCancelActionText ) # Back up toolsBackUpActionText = "<u><b>Back Up</b></u><br>"\ "Undoes the previous operation."\ "</p>" win. toolsBackUpAction.setWhatsThis( toolsBackUpActionText ) # Start Over toolsStartOverActionText = "<u><b>Start Over</b></u><br>"\ "Cancels the current operation, leaving the user in the current mode."\ "</p>" win.toolsStartOverAction.setWhatsThis(toolsStartOverActionText ) # Add Layers ccAddLayerActionText = "<u><b>Add Layer</b></u><br>"\ "<p><img source=\"ui/actions/Properties Manager/addlayer.png\"><br> "\ "Adds a new layer of diamond lattice to the existing layer."\ "</p>" win.ccAddLayerAction.setWhatsThis(ccAddLayerActionText ) # # Jigs # # Anchor jigsAnchorActionText = "<u><b>Anchor</b></u><br>"\ "<p><img source=\"ui/actions/Simulation/Anchor.png\"><br> "\ "Attaches an <b>Anchor</b> to the selected atom(s), which "\ "constrains its motion during a minimization or simulation."\ "</p>"\ "<p>To create an Anchor, enter <b>Build</b> mode, "\ "select the atom(s) you want to anchor and then select this action. "\ "Anchors are drawn as a black wireframe box around each selected atom."\ "</p>" win.jigsAnchorAction.setWhatsThis(jigsAnchorActionText ) # Rotary Motor jigsMotorActionText = "<u><b>Rotary Motor</b></u><br>"\ "<p><img source=\"ui/actions/Simulation/Rotary_Motor.png\"><br> "\ "Attaches a <b>Rotary Motor</b> to the selected atoms. The Rotary Motor is used by "\ "the simulator to apply rotary motion to a set of atoms during a simulation run. You may "\ "specify the <b>torque (in nN*nm)</b> and <b>speed (in Ghz)</b> of the motor."\ "</p>"\ "<p>To create a Rotary Motor, enter <b>Build</b> mode, "\ "select the atoms you want to attach the motor to and then select this action."\ "</p>" win.jigsMotorAction.setWhatsThis(jigsMotorActionText ) # Linear Motor jigsLinearMotorActionText = "<u><b>Linear Motor</b></u><br>"\ "<p><img source=\"ui/actions/Simulation/Linear_Motor.png\"><br> "\ "Attaches a <b>Linear Motor</b> to the selected atoms. The Linear Motor is used by "\ "the simulator to apply linear motion to a set of atoms during a simulation run. You may "\ "specify the <b>force (in nN*nm)</b> and <b>stiffness (in N/m)</b> of the motor."\ "</p>"\ "<p>To create a Linear Motor, enter <b>Build</b> mode, "\ "select the atoms you want to attach the motor to and then select this action."\ "</p>" win.jigsLinearMotorAction.setWhatsThis(jigsLinearMotorActionText ) # Thermostat jigsStatActionText = "<u><b>Thermostat</b></u><br>"\ "<p><img source=\"ui/actions/Simulation/Thermostat.png\"><br> "\ "Attaches a <b>Langevin Thermostat</b> to a single selected atom, thereby associating "\ "the themostat to the entire molecule of which the selected atom is a member. The user "\ "specifies the temperature (in Kelvin)."\ "</p>"\ "<p>The Langevin Thermostat is used to set and hold the temperature "\ "of a molecule during a simulation run."\ "</p>"\ "<p>To create a Langevin Thermostat, enter <b>Build</b> mode, "\ "select a single atom and then select this action. The thermostat is drawn as a "\ "blue wireframe box around the selected atom."\ "</p>" win.jigsStatAction.setWhatsThis(jigsStatActionText ) # Thermometer jigsThermoActionText = "<u><b>Thermometer</b></u><br>"\ "<p><img source=\"ui/actions/Simulation/Measurements/Thermometer.png\"><br> "\ "Attaches a <b>Thermometer</b> to a single selected atom, thereby associating "\ "the themometer to the entire molecule of which the selected atom is a member. "\ "<p>The temperature of the molecule will be recorded and written to a trace file "\ "during a simulation run."\ "</p>"\ "<p>To create a Thermometer, enter <b>Build</b> mode, "\ "select a single atom and then select this action. The thermometer is drawn as a "\ "dark red wireframe box around the selected atom."\ "</p>" win.jigsThermoAction.setWhatsThis(jigsThermoActionText ) # ESP Image jigsESPImageActionText = "<u><b>ESP Image</b></u><br>"\ "<p><img source=\"ui/actions/Simulation/ESP_Image.png\"><br> "\ "An <b>ESP Image</b> allows the user to visualize the electrostatic potential "\ "of points on the face of a square 2D surface. Nano-Hive's MPQC ESP Plane plug-in "\ "is used to calculate the electrostatic potential."\ "</p>"\ "<p>To create an ESP Image, enter <b>Build</b> mode, "\ "select three or more atoms and then select this jig. The ESP Image is drawn as a "\ "plane with a bounding volume."\ "</p>" win.jigsESPImageAction.setWhatsThis(jigsESPImageActionText ) # Atom Set jigsAtomSetActionText = "<u><b>Atom Set</b></u><br>"\ "<p><img source=\"ui/actions/Tools/Atom_Set.png\"><br> "\ "An <b>Atom Set</b> jig provides a convienient way to save an atom "\ "selection which can be reselected later."\ "</p>"\ "<p>To create an Atom Set, enter <b>Build</b> mode, "\ "select any number of atoms and then select this jig. The Atom Set is "\ "drawn as a set of wireframe boxes around each atom in the selection."\ "</p>"\ "<p>To reselect the atoms in an Atom Set, select it's context "\ "menu in the Model Tree and click the menu item that states "\ "<b>Select this jig's atoms</b>."\ "</p>" win.jigsAtomSetAction.setWhatsThis(jigsAtomSetActionText ) # Measure Distance jigsDistanceActionText = "<u><b>Measure Distance Jig</b></u><br>"\ "<p><img source=\"ui/actions/Simulation/Measurements/Measure_Distance.png\"><br> "\ "A <b>Measure Distance Jig</b> functions as a dimension to display the "\ "distance between two atoms."\ "</p>"\ "<p>To create the Measure Distance Jig, enter <b>Build</b> mode, "\ "select two atoms and then select this jig. The Measure Distance Jig is "\ "drawn as a pair of wireframe boxes around each atom connected by "\ "a line and a pair of numbers. The first number is the distance between the "\ "VdW radii (this can be a negative number for atoms that are close together). "\ "The second number is the distance between the nuclei."\ "</p>"\ "<p>The Measure Distance Jig will write the two distance values to the trace file "\ "for each frame of a simulation run and can be plotted using the Plot Tool."\ "</p>" win.jigsDistanceAction.setWhatsThis(jigsDistanceActionText ) # Measure Angle jigsAngleActionText = "<u><b>Measure Angle Jig</b></u><br>"\ "<p><img source=\"ui/actions/Simulation/Measurements/Measure_Angle.png\"><br> "\ "A <b>Measure Angle Jig</b> functions as a dimension to display the "\ "angle between three atoms.</p>"\ "<p>To create the Measure Angle Jig, enter <b>Build</b> mode, "\ "select three atoms and then select this jig. The Measure Angle Jig is "\ "drawn as a set of wireframe boxes around each atom and a number "\ "which is the angle between the three atoms."\ "</p>"\ "<p>The Measure Angle Jig will write the angle value to the trace file "\ "for each frame of a simulation run and can be plotted using the Plot Tool."\ "</p>" win.jigsAngleAction.setWhatsThis(jigsAngleActionText ) # Measure Dihedral jigsDihedralActionText = "<u><b>Measure Dihedral Jig</b></u><br>"\ "<p><img source=\"ui/actions/Simulation/Measurements/Measure_Dihedral.png\"><br> "\ "A <b>Measure Dihedral Jig</b> functions as a dimension to display the "\ "dihedral angle of a four atom sequence.</p>"\ "<p>To create the Measure Dihedral Jig, enter <b>Build</b> mode, "\ "select four atoms and then select this jig. The Measure Dihedral Jig is "\ "drawn as a set of wireframe boxes around each atom and a number "\ "which is the dihedral angle value."\ "</p>"\ "<p>The Measure Dihedral Jig will write the dihedral angle value to the trace file "\ "for each frame of a simulation run and can be plotted using the Plot Tool."\ "</p>" win.jigsDihedralAction.setWhatsThis(jigsDihedralActionText ) # GAMESS Jig jigsGamessActionText = "<u><b>GAMESS Jig</b></u><br>"\ "<p><img source=\"ui/actions/Simulation/Gamess.png\"><br> "\ "A <b>GAMESS Jig</b> is used to tag a set of atoms for running a GAMESS "\ "calculation. <b>Energy</b> and <b>Geometry Optimization</b> calculations are supported."\ "</p>"\ "<p>To create the GAMESS Jig, enter <b>Build</b> mode, "\ "select the atoms to tag and then select this jig. The GAMESS Jig is drawn as a "\ "set of magenta wireframe boxes around each atom."\ "</p>" win.jigsGamessAction.setWhatsThis(jigsGamessActionText ) # Grid Plane Jig jigsGridPlaneActionText = "<u><b>Grid Plane</b></u><br>"\ "<p><img source=\"ui/actions/Insert/Reference Geometry/Grid_Plane.png\"><br> "\ "A <b>Grid Plane</b> jig is a rectanglar plane that can display a square or SiC grid "\ "within its boundary. It is often used as an aid in constructing large lattice "\ "structures made of silicon carbide (SiC). It is also used as a visual aid in estimating "\ "distances between atoms and/or other structures."\ "</p>"\ "<p>To create the Grid Plane jig, enter <b>Build</b> mode, "\ "select three or more atoms and then select this jig. "\ "</p>"\ "<p>The Grid Plane jig is drawn as a rectanglar plane with a grid."\ "</p>" win.jigsGridPlaneAction.setWhatsThis(jigsGridPlaneActionText ) # # Help Toolbar # # What's This helpWhatsThisText = "<u><b>What's This</b></u><br>"\ "<p><img source=\"ui/actions/Help/WhatsThis.png\"><br> "\ "Click this option to invoke a small question mark that is attached to the mouse pointer. "\ "Click on a feature which you would like more information about. "\ "A popup box appears with information about the feature.</p>" win.helpWhatsThisAction.setWhatsThis( helpWhatsThisText ) win.helpMouseControlsAction.setWhatsThis('Displays help for mouse controls') win.helpKeyboardShortcutsAction.setWhatsThis('Displays help for keyboard shortcuts')
596540c24ceb3b478e904a42e26d7d5dd8809d95 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11221/596540c24ceb3b478e904a42e26d7d5dd8809d95/whatsthis.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 2888, 2323, 2503, 1528, 1290, 6376, 3829, 16166, 12, 8082, 4672, 3536, 15605, 326, 315, 23801, 1807, 1220, 6, 2809, 977, 358, 1516, 1392, 316, 326, 12901, 21, 2774, 5668, 12748, 87, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 2888, 2323, 2503, 1528, 1290, 6376, 3829, 16166, 12, 8082, 4672, 3536, 15605, 326, 315, 23801, 1807, 1220, 6, 2809, 977, 358, 1516, 1392, 316, 326, 12901, 21, 2774, 5668, 12748, 87, ...
return os.path.join(self.temp_dir, "work_log_path")
return os.path.join(self.test.temp_dir, "work_log_path")
def work_logs_directory(self): self.callbacks.append("work_logs_directory") return os.path.join(self.temp_dir, "work_log_path")
2ab6dd9042cc607541b00e081f35dd79a297dbd0 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9392/2ab6dd9042cc607541b00e081f35dd79a297dbd0/workqueue_unittest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1440, 67, 10011, 67, 5149, 12, 2890, 4672, 365, 18, 13316, 18, 6923, 2932, 1252, 67, 10011, 67, 5149, 7923, 327, 1140, 18, 803, 18, 5701, 12, 2890, 18, 5814, 67, 1214, 16, 315, 1252, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1440, 67, 10011, 67, 5149, 12, 2890, 4672, 365, 18, 13316, 18, 6923, 2932, 1252, 67, 10011, 67, 5149, 7923, 327, 1140, 18, 803, 18, 5701, 12, 2890, 18, 5814, 67, 1214, 16, 315, 1252, ...
zipopen = zipfp.open(TESTFN, 'rU') for line in zipopen: data2 += line
with zipfp.open(TESTFN, 'rU') as zipopen: for line in zipopen: data2 += line
def test_univeral_readaheads(self): f = io.BytesIO()
8fb9b868bd8415347ffa608eec324055ff9f66d7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8546/8fb9b868bd8415347ffa608eec324055ff9f66d7/test_zipfile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 318, 1667, 287, 67, 896, 11617, 87, 12, 2890, 4672, 284, 273, 2527, 18, 2160, 4294, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 318, 1667, 287, 67, 896, 11617, 87, 12, 2890, 4672, 284, 273, 2527, 18, 2160, 4294, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
if loc.latitude != 0.0 and loc.longitude != 0.0:
if loc.latitude is not None and loc.longitude is not None:
def locations_kml(self, path='', show='', REQUEST=None): """ """ path = path or '/' show = eval(show)
fe076f8740e8f33bd92e963406ec7a8b6b5b28db /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3287/fe076f8740e8f33bd92e963406ec7a8b6b5b28db/GeoMapTool.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7838, 67, 79, 781, 12, 2890, 16, 589, 2218, 2187, 2405, 2218, 2187, 12492, 33, 7036, 4672, 3536, 3536, 589, 273, 589, 578, 2023, 2405, 273, 5302, 12, 4500, 13, 2, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7838, 67, 79, 781, 12, 2890, 16, 589, 2218, 2187, 2405, 2218, 2187, 12492, 33, 7036, 4672, 3536, 3536, 589, 273, 589, 578, 2023, 2405, 273, 5302, 12, 4500, 13, 2, -100, -100, -100, -10...
], CONTEXT)
], 0, None, None, CONTEXT)
def test0060text(self): ''' Test Text. ''' text1_id = self.text.create({ 'text': 'Test', }, CONTEXT) self.assert_(text1_id)
52062c763bf1737b3f2071e48338f60845edc54d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9266/52062c763bf1737b3f2071e48338f60845edc54d/test_tryton.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 713, 4848, 955, 12, 2890, 4672, 9163, 7766, 3867, 18, 9163, 977, 21, 67, 350, 273, 365, 18, 955, 18, 2640, 12590, 296, 955, 4278, 296, 4709, 2187, 19879, 13862, 13, 365, 18, 1123...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 713, 4848, 955, 12, 2890, 4672, 9163, 7766, 3867, 18, 9163, 977, 21, 67, 350, 273, 365, 18, 955, 18, 2640, 12590, 296, 955, 4278, 296, 4709, 2187, 19879, 13862, 13, 365, 18, 1123...
def __init__(data = None)
def __init__(data = None):
def __init__(data = None) if data == None: quickfix.StringField.__init__(self, 48) else quickfix.StringField.__init__(self, 48, data)
484890147d4b23aac4b9d0e85e84fceab7e137c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8819/484890147d4b23aac4b9d0e85e84fceab7e137c3/quickfix_fields.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 892, 273, 599, 4672, 309, 501, 422, 599, 30, 9549, 904, 18, 780, 974, 16186, 2738, 972, 12, 2890, 16, 9934, 13, 469, 9549, 904, 18, 780, 974, 16186, 2738, 972, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 892, 273, 599, 4672, 309, 501, 422, 599, 30, 9549, 904, 18, 780, 974, 16186, 2738, 972, 12, 2890, 16, 9934, 13, 469, 9549, 904, 18, 780, 974, 16186, 2738, 972, 1...
for ftype in [S_ISDIR, S_ISREG]: if ftype(sinfo[ST_MODE]): chmod(entry.get('name'), calc_perms(ftype, entry.get('perms')))
for ftype in ['DIR', 'REG', 'CHR', 'BLK']: if getattr(statmod, "S_IS%s" % ftype)(sinfo[ST_MODE]): chmod(entry.get('name'), calc_perms(getattr(statmod, "S_IF%s" % ftype), entry.get('perms')))
def InstallPermissions(self, entry): '''Install method for abstract permission''' try: sinfo = stat(entry.get('name')) except OSError: self.CondPrint('debug', "Entry %s doesn't exist" % entry.get('name')) return False for ftype in [S_ISDIR, S_ISREG]: if ftype(sinfo[ST_MODE]): chmod(entry.get('name'), calc_perms(ftype, entry.get('perms'))) return True self.CondPrint('verbose', "Entry %s has unknown file type" % entry.get('name')) return False
06f4b4b0fca9e3a890772142f68f6724b6a94067 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11867/06f4b4b0fca9e3a890772142f68f6724b6a94067/Toolset.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10284, 6521, 12, 2890, 16, 1241, 4672, 9163, 6410, 707, 364, 8770, 4132, 26418, 775, 30, 272, 1376, 273, 610, 12, 4099, 18, 588, 2668, 529, 26112, 1335, 10002, 30, 365, 18, 12441, 5108, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10284, 6521, 12, 2890, 16, 1241, 4672, 9163, 6410, 707, 364, 8770, 4132, 26418, 775, 30, 272, 1376, 273, 610, 12, 4099, 18, 588, 2668, 529, 26112, 1335, 10002, 30, 365, 18, 12441, 5108, ...
n = int(s[:-2]) if n == 12: return 6 elif n == 13: return 7
majorVersion = int(s[:-2]) - 6 minorVersion = int(s[2:3]) / 10.0 if majorVersion == 6: minorVersion = 0 if majorVersion >= 6: return majorVersion + minorVersion
def get_build_version(): """Return the version of MSVC that was used to build Python. For Python 2.3 and up, the version number is included in sys.version. For earlier versions, assume the compiler is MSVC 6. """ prefix = "MSC v." i = string.find(sys.version, prefix) if i == -1: return 6 i = i + len(prefix) s, rest = sys.version[i:].split(" ", 1) n = int(s[:-2]) if n == 12: return 6 elif n == 13: return 7 # else we don't know what version of the compiler this is return None
e9a92aa03ac91c307a90db8eefff22cea1b97399 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/e9a92aa03ac91c307a90db8eefff22cea1b97399/msvccompiler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 3510, 67, 1589, 13332, 3536, 990, 326, 1177, 434, 9238, 13464, 716, 1703, 1399, 358, 1361, 6600, 18, 225, 2457, 6600, 576, 18, 23, 471, 731, 16, 326, 1177, 1300, 353, 5849, 31...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 3510, 67, 1589, 13332, 3536, 990, 326, 1177, 434, 9238, 13464, 716, 1703, 1399, 358, 1361, 6600, 18, 225, 2457, 6600, 576, 18, 23, 471, 731, 16, 326, 1177, 1300, 353, 5849, 31...
if options: self.unexplored = options else: self.unexplored = board.possible_moves()
def play(self, board, options=None): """ uct tree search """ if options: self.unexplored = options else: self.unexplored = board.possible_moves()
c05d54de737c460624de3dbb1a77f565ef382140 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6661/c05d54de737c460624de3dbb1a77f565ef382140/go.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6599, 12, 2890, 16, 11094, 16, 702, 33, 7036, 4672, 3536, 582, 299, 2151, 1623, 3536, 309, 702, 30, 365, 18, 318, 2749, 383, 1118, 273, 702, 469, 30, 365, 18, 318, 2749, 383, 1118, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6599, 12, 2890, 16, 11094, 16, 702, 33, 7036, 4672, 3536, 582, 299, 2151, 1623, 3536, 309, 702, 30, 365, 18, 318, 2749, 383, 1118, 273, 702, 469, 30, 365, 18, 318, 2749, 383, 1118, 2...
m = self.add_module('__main__') exec code in m.__dict__
m = self.add_module('__main__') exec code in m.__dict__
def r_exec(self, code):
ca6ae39a786f3d7535cba0f2aef10692eb750051 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/ca6ae39a786f3d7535cba0f2aef10692eb750051/rexec.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 436, 67, 4177, 12, 2890, 16, 981, 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...
[ 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, 436, 67, 4177, 12, 2890, 16, 981, 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, ...
serv_args = (self.evt, 1, self.requestHandler)
serv_args = (self.evt, self.request_count, self.requestHandler)
def setUp(self): # enable traceback reporting xmlrpc.server.SimpleXMLRPCServer._send_traceback_header = True
e6d7bd32621e4936fcf7665f76e8d06f99ce9bfc /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12029/e6d7bd32621e4936fcf7665f76e8d06f99ce9bfc/test_xmlrpc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24292, 12, 2890, 4672, 468, 4237, 10820, 16096, 31811, 18, 3567, 18, 5784, 4201, 8087, 2081, 6315, 4661, 67, 21696, 67, 3374, 273, 1053, 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, 0, 0, 0, 0, 0, 0, 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, 24292, 12, 2890, 4672, 468, 4237, 10820, 16096, 31811, 18, 3567, 18, 5784, 4201, 8087, 2081, 6315, 4661, 67, 21696, 67, 3374, 273, 1053, 2, -100, -100, -100, -100, -100, -100, -100, -100, ...
cmap = options['cmap']
given_cmap = options['cmap']
def _render_on_subplot(self, subplot): from sage.rings.integer import Integer options = self.options() fill = options['fill'] cmap = options['cmap'] contours = options['contours'] #cm is the matplotlib color map module from matplotlib import cm try: cmap = cm.__dict__[cmap] except KeyError: from matplotlib.colors import LinearSegmentedColormap as C possibilities = ', '.join([str(x) for x in cm.__dict__.keys() if \ isinstance(cm.__dict__[x], C)]) sage.misc.misc.verbose("The possible color maps include: %s"%possibilities, level = 0) raise RuntimeError, "Color map %s not known"%cmap
99e74ab281c357bf759b78aeae23f841b8e0ef44 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/99e74ab281c357bf759b78aeae23f841b8e0ef44/plot.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5902, 67, 265, 67, 24523, 12, 2890, 16, 19826, 4672, 628, 272, 410, 18, 86, 899, 18, 7745, 1930, 2144, 702, 273, 365, 18, 2116, 1435, 3636, 273, 702, 3292, 5935, 3546, 864, 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, 389, 5902, 67, 265, 67, 24523, 12, 2890, 16, 19826, 4672, 628, 272, 410, 18, 86, 899, 18, 7745, 1930, 2144, 702, 273, 365, 18, 2116, 1435, 3636, 273, 702, 3292, 5935, 3546, 864, 67, ...
this = apply(_quickfix.new_Headline, args)
this = _quickfix.new_Headline(*args)
def __init__(self, *args): this = apply(_quickfix.new_Headline, args) try: self.this.append(this) except: self.this = this
7e632099fd421880c8c65fb0cf610d338d115ee9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8819/7e632099fd421880c8c65fb0cf610d338d115ee9/quickfix.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 380, 1968, 4672, 333, 273, 389, 19525, 904, 18, 2704, 67, 1414, 1369, 30857, 1968, 13, 775, 30, 365, 18, 2211, 18, 6923, 12, 2211, 13, 1335, 30, 365, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4672, 333, 273, 389, 19525, 904, 18, 2704, 67, 1414, 1369, 30857, 1968, 13, 775, 30, 365, 18, 2211, 18, 6923, 12, 2211, 13, 1335, 30, 365, 1...
stylize(ST_ , 'licornd.threads.pool_members')))
stylize(ST_COMMENT, 'licornd.threads.pool_members')))
def check_directive_daemon_threads(self): """ check the pingers number for correctness. """ assert ltrace('configuration', '| check_directive_daemon_threads()')
43dbf1adf057b66668d355529748be8d7e1b8bcb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/43dbf1adf057b66668d355529748be8d7e1b8bcb/configuration.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 22347, 67, 21511, 67, 12495, 12, 2890, 4672, 3536, 866, 326, 10087, 414, 1300, 364, 3434, 4496, 18, 3536, 1815, 328, 5129, 2668, 7025, 2187, 6699, 866, 67, 22347, 67, 21511, 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, 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, 866, 67, 22347, 67, 21511, 67, 12495, 12, 2890, 4672, 3536, 866, 326, 10087, 414, 1300, 364, 3434, 4496, 18, 3536, 1815, 328, 5129, 2668, 7025, 2187, 6699, 866, 67, 22347, 67, 21511, 67,...
self.send_sockets.remove(sock)
self.recv_sockets.remove(sock)
def testing_thread(self): log.debug("TestThread: Starting test thread.") data_recv = {} while True: with self.send_recv_cond: # Wait on send_recv_cond to stall while we're not waiting on # test sockets. while len(self.recv_sockets) + len(self.send_sockets) == 0: log.debug("TestThread: waiting for new test sockets.") self.send_recv_cond.wait() recv_socks = copy(self.recv_sockets) send_socks = copy(self.send_sockets)
bcc5c0b8dee18ee16bab2c94da854b26a596c522 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9986/bcc5c0b8dee18ee16bab2c94da854b26a596c522/torbel.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7769, 67, 5930, 12, 2890, 4672, 613, 18, 4148, 2932, 4709, 3830, 30, 24591, 1842, 2650, 1199, 13, 501, 67, 18334, 273, 2618, 225, 1323, 1053, 30, 598, 365, 18, 4661, 67, 18334, 67, 100...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7769, 67, 5930, 12, 2890, 4672, 613, 18, 4148, 2932, 4709, 3830, 30, 24591, 1842, 2650, 1199, 13, 501, 67, 18334, 273, 2618, 225, 1323, 1053, 30, 598, 365, 18, 4661, 67, 18334, 67, 100...
def _fnct_write(self,obj,cr, uid, ids, field_name, args, context=None): raise 'Not Implemented Yet'
def _fnct_write(self,obj,cr, uid, ids, field_name, args, context=None): raise 'Not Implemented Yet'
17eb1ec7dafa56196faff9a3df4105d59228021f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7397/17eb1ec7dafa56196faff9a3df4105d59228021f/fields.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4293, 299, 67, 2626, 12, 2890, 16, 2603, 16, 3353, 16, 4555, 16, 3258, 16, 652, 67, 529, 16, 833, 16, 819, 33, 7036, 4672, 1002, 296, 1248, 18788, 1624, 278, 11, 2, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 389, 4293, 299, 67, 2626, 12, 2890, 16, 2603, 16, 3353, 16, 4555, 16, 3258, 16, 652, 67, 529, 16, 833, 16, 819, 33, 7036, 4672, 1002, 296, 1248, 18788, 1624, 278, 11, 2, -100, -100, ...
return "%s | %s "%(SubstitutionMathPsTricks(repr(self.f1.sage(x=t))), SubstitutionMathPsTricks(repr(self.f2.sage(x=t))) )
return "%s | %s "%(SubstitutionMathPsTricks(repr(self.f1.sage(x=t)).replace("pi","3.1415")), SubstitutionMathPsTricks(repr(self.f2.sage(x=t)).replace("pi","3.1415")) )
def pstricks(self): var('t') return "%s | %s "%(SubstitutionMathPsTricks(repr(self.f1.sage(x=t))), SubstitutionMathPsTricks(repr(self.f2.sage(x=t))) )
1ac4b94ababecdbf2785a5a45f52f25ee4cc0a1b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5111/1ac4b94ababecdbf2785a5a45f52f25ee4cc0a1b/BasicGeometricObjects.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 293, 701, 20642, 12, 2890, 4672, 569, 2668, 88, 6134, 327, 2213, 87, 571, 738, 87, 22061, 23798, 10477, 18124, 1070, 20642, 12, 12715, 12, 2890, 18, 74, 21, 18, 87, 410, 12, 92, 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, 293, 701, 20642, 12, 2890, 4672, 569, 2668, 88, 6134, 327, 2213, 87, 571, 738, 87, 22061, 23798, 10477, 18124, 1070, 20642, 12, 12715, 12, 2890, 18, 74, 21, 18, 87, 410, 12, 92, 33, ...
vcsinfo=options.vcsinfo)
vcsinfo=options.vcsinfo, srcsrv=options.srcsrv)
def main(): parser = OptionParser(usage="usage: %prog [options] <dump_syms binary> <symbol store path> <debug info files>") parser.add_option("-c", "--copy", action="store_true", dest="copy_debug", default=False, help="Copy debug info files into the same directory structure as symbol files") parser.add_option("-a", "--archs", action="store", dest="archs", help="Run dump_syms -a <arch> for each space separated cpu architecture in ARCHS (only on OS X)") parser.add_option("-s", "--srcdir", action="store", dest="srcdir", help="Use SRCDIR to determine relative paths to source files") parser.add_option("-v", "--vcs-info", action="store_true", dest="vcsinfo", help="Try to retrieve VCS info for each FILE listed in the output") (options, args) = parser.parse_args() if len(args) < 3: parser.error("not enough arguments") exit(1) dumper = GetPlatformSpecificDumper(dump_syms=args[0], symbol_path=args[1], copy_debug=options.copy_debug, archs=options.archs, srcdir=options.srcdir, vcsinfo=options.vcsinfo) for arg in args[2:]: dumper.Process(arg)
a582c2015a7cbf1d6ab07c641c82c770275badc5 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/13067/a582c2015a7cbf1d6ab07c641c82c770275badc5/symbolstore.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 2082, 273, 18862, 12, 9167, 1546, 9167, 30, 738, 14654, 306, 2116, 65, 411, 8481, 67, 9009, 959, 3112, 34, 411, 7175, 1707, 589, 34, 411, 4148, 1123, 1390, 2984, 13, 2082, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2082, 273, 18862, 12, 9167, 1546, 9167, 30, 738, 14654, 306, 2116, 65, 411, 8481, 67, 9009, 959, 3112, 34, 411, 7175, 1707, 589, 34, 411, 4148, 1123, 1390, 2984, 13, 2082, ...
if context['sheet_id'] != self.browse(cr, uid, res, context=context).sheet_id.id: raise osv.except_osv(_('UserError'), _('You can not enter an attendance ' \
if context['sheet_id'] != vals['sheet_id']: raise osv.except_osv(_('UserError'), _('You cannot enter an attendance ' \
def create(self, cr, uid, vals, context={}): if 'sheet_id' in context: ts = self.pool.get('hr_timesheet_sheet.sheet').browse(cr, uid, context['sheet_id']) if ts.state not in ('draft', 'new'): raise osv.except_osv(_('Error !'), _('You can not modify an entry in a confirmed timesheet !')) res = super(hr_attendance,self).create(cr, uid, vals, context=context) if 'sheet_id' in context: if context['sheet_id'] != self.browse(cr, uid, res, context=context).sheet_id.id: raise osv.except_osv(_('UserError'), _('You can not enter an attendance ' \ 'date outside the current timesheet dates!')) return res
aaf478c22075e872786f6696ff3b9b7ecaf0bdde /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/aaf478c22075e872786f6696ff3b9b7ecaf0bdde/hr_timesheet_sheet.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 12, 2890, 16, 4422, 16, 4555, 16, 5773, 16, 819, 12938, 4672, 309, 296, 8118, 67, 350, 11, 316, 819, 30, 3742, 273, 365, 18, 6011, 18, 588, 2668, 7256, 67, 8293, 2963, 67, 8118,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 12, 2890, 16, 4422, 16, 4555, 16, 5773, 16, 819, 12938, 4672, 309, 296, 8118, 67, 350, 11, 316, 819, 30, 3742, 273, 365, 18, 6011, 18, 588, 2668, 7256, 67, 8293, 2963, 67, 8118,...
return self.attachment_link(url, text)
return (self.attachment_link(1, url) + self.text(text) + self.attachment_link(0))
def attachment_inlined(self, url, text, **kw): from MoinMoin.action import AttachFile import os _ = self.request.getText pagename, filename = AttachFile.absoluteName(url, self.page.page_name) fname = wikiutil.taintfilename(filename) fpath = AttachFile.getFilename(self.request, pagename, fname) ext = os.path.splitext(filename)[1] Parser = wikiutil.getParserForExtension(self.request.cfg, ext) if Parser is not None: try: content = file(fpath, 'r').read() # Try to decode text. It might return junk, but we don't # have enough information with attachments. content = wikiutil.decodeUnknownInput(content) colorizer = Parser(content, self.request, filename=filename) colorizer.format(self) except IOError: pass
fff5cd4bbf441056546617dec5e820c12cdf6226 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/888/fff5cd4bbf441056546617dec5e820c12cdf6226/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6042, 67, 267, 22316, 12, 2890, 16, 880, 16, 977, 16, 2826, 9987, 4672, 628, 490, 885, 49, 885, 18, 1128, 1930, 8659, 812, 1930, 1140, 389, 273, 365, 18, 2293, 18, 588, 1528, 4262, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6042, 67, 267, 22316, 12, 2890, 16, 880, 16, 977, 16, 2826, 9987, 4672, 628, 490, 885, 49, 885, 18, 1128, 1930, 8659, 812, 1930, 1140, 389, 273, 365, 18, 2293, 18, 588, 1528, 4262, 1...
if len(self.fields['paymentmethod'].choices) == 1: self.fields['paymentmethod'].widget = forms.HiddenInput(attrs={'value' : self.fields['paymentmethod'].choices[0][0]})
self.fields['paymentmethod'].choices = payment_choices if len(payment_choices) == 1: self.fields['paymentmethod'].widget = forms.HiddenInput(attrs={'value' : payment_choices[0][0]}) else: self.fields['paymentmethod'].widget = forms.RadioSelect(attrs={'value' : payment_choices[0][0]})
def __init__(self, *args, **kwargs): try: cart = kwargs['cart'] del kwargs['cart'] except KeyError: cart = None try: order = kwargs['order'] del kwargs['order'] except KeyError: order = None super(forms.Form, self).__init__(*args, **kwargs) # Send a signal to perform additional filtering of available payment methods. # Receivers have cart/order passed in variables to check the contents and modify methods # list if neccessary. signals.payment_methods_query.send( PaymentMethodForm, methods=self.fields['paymentmethod'].choices, cart=cart, order=order ) if len(self.fields['paymentmethod'].choices) == 1: self.fields['paymentmethod'].widget = forms.HiddenInput(attrs={'value' : self.fields['paymentmethod'].choices[0][0]})
0d8fa0b0640c6105e95ef654a47268c34eebbc67 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/13656/0d8fa0b0640c6105e95ef654a47268c34eebbc67/forms.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 380, 1968, 16, 2826, 4333, 4672, 775, 30, 7035, 273, 1205, 3292, 11848, 3546, 1464, 1205, 3292, 11848, 3546, 1335, 4999, 30, 7035, 273, 599, 775, 30, 1353,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4333, 4672, 775, 30, 7035, 273, 1205, 3292, 11848, 3546, 1464, 1205, 3292, 11848, 3546, 1335, 4999, 30, 7035, 273, 599, 775, 30, 1353,...
print >>out, "Old references are stored in %s, so migrating them to new style reference annotations." % (TOOL_NAME)
print >>out, "Old references are stored in %s, so migrating them to new style reference annotations.\n" % (TOOL_NAME)
def migrateReferences(portal, out): # FIRST # a 1.2 -> 1.3 (new annotation style) migration path at = getToolByName(portal, TOOL_NAME) rc = getToolByName(portal, REFERENCE_CATALOG) uc = getToolByName(portal, UID_CATALOG) count=0 # Old 1.2 style references are stored inside archetype_tool on the 'ref' # attribute refs = getattr(at, 'refs', None) if refs is not None: print >>out, 'migrating reference from Archetypes 1.2' count=0 print >>out, "Old references are stored in %s, so migrating them to new style reference annotations." % (TOOL_NAME) allbrains = uc() for brain in allbrains: sourceObj = brain.getObject() sourceUID = getattr(aq_base(sourceObj), olduididx, None) if sourceUID is None: continue # references migration starts for targetUID, relationship in refs.get(sourceUID, []): # get target object targetBrains = uc(**{olduididx:targetUID}) assert(len(targetBrains) == 1,'catalog query for OLD uid (%s) returned %d results instead of 1' % (targetUID,len(targetBrains))) targetObj=targetBrains[0].getObject() # create new style reference rc.addReference(sourceObj, targetObj, relationship) count+=1 # avoid eating up all RAM if not count % 250: get_transaction().commit(1) print >>out, "%s old references migrated." % count # after all remove the old-style reference attribute delattr(at, 'refs') if USE_FULL_TRANSACTIONS: get_transaction().commit() else: get_transaction().commit(1) else: # SECOND # a 1.3.b2 -> 1.3 (new annotation style) migration path # We had a reference catalog, make sure its doing annotation # based references # reference metadata cannot be restored since reference-catalog is no more # a btree and in AT 1.3.b2 reference_catalog was a btreefolder print >>out, 'migrating reference from Archetypes 1.3. beta2' refs = rc() rc.manage_catalogClear() for brain in refs: sourceObject = rc.lookupObject(brain.sourceUID) if sourceObject is None: continue targetObject=rc.lookupObject(brain.targetUID) if not targetObject: print >>out, 'mirateReferences: Warning: no targetObject found for UID ',brain.targetUID continue count+=1 sourceObject.addReference(targetObject,relationship=brain.relationship) # avoid eating up all RAM if not count % 250: get_transaction().commit(1) print >>out, "%s old references migrated (reference metadata not restored)." % count if USE_FULL_TRANSACTIONS: get_transaction().commit() else: get_transaction().commit(1) print >>out, "Migrated References" #Reindex for new UUIDs uc.manage_reindexIndex() rc.manage_reindexIndex()
545e67b439ed8266102d0bdfa5dde36a90e9ffab /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12165/545e67b439ed8266102d0bdfa5dde36a90e9ffab/migrations.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13187, 8221, 12, 24386, 16, 596, 4672, 468, 21786, 468, 279, 404, 18, 22, 317, 404, 18, 23, 261, 2704, 3204, 2154, 13, 6333, 589, 225, 622, 273, 336, 6364, 5911, 12, 24386, 16, 8493, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13187, 8221, 12, 24386, 16, 596, 4672, 468, 21786, 468, 279, 404, 18, 22, 317, 404, 18, 23, 261, 2704, 3204, 2154, 13, 6333, 589, 225, 622, 273, 336, 6364, 5911, 12, 24386, 16, 8493, ...
parser.add_option('-j', '--jobs', default=1, type='int', help='Specify how many SCM commands can run in parallel')
parser.add_option('-j', '--jobs', default=8, type='int', help='Specify how many SCM commands can run in parallel; ' 'default=%default')
def Main(argv): """Doesn't parse the arguments here, just find the right subcommand to execute.""" try: # Do it late so all commands are listed. CMDhelp.usage = ('\n\nCommands are:\n' + '\n'.join([ ' %-10s %s' % (fn[3:], Command(fn[3:]).__doc__.split('\n')[0].strip()) for fn in dir(sys.modules[__name__]) if fn.startswith('CMD')])) parser = optparse.OptionParser(version='%prog ' + __version__) parser.add_option('-j', '--jobs', default=1, type='int', help='Specify how many SCM commands can run in parallel') parser.add_option('-v', '--verbose', action='count', default=0, help='Produces additional output for diagnostics. Can be ' 'used up to three times for more logging info.') parser.add_option('--gclientfile', dest='config_filename', default=os.environ.get('GCLIENT_FILE', '.gclient'), help='Specify an alternate %default file') # Integrate standard options processing. old_parser = parser.parse_args def Parse(args): (options, args) = old_parser(args) level = None if options.verbose == 2: level = logging.INFO elif options.verbose > 2: level = logging.DEBUG logging.basicConfig(level=level, format='%(module)s(%(lineno)d) %(funcName)s:%(message)s') options.entries_filename = options.config_filename + '_entries' if options.jobs < 1: parser.error('--jobs must be 1 or higher') # Always autoflush so buildbot doesn't kill us during lengthy operations. options.stdout = gclient_utils.StdoutAutoFlush(sys.stdout) # These hacks need to die. if not hasattr(options, 'revisions'): # GClient.RunOnDeps expects it even if not applicable. options.revisions = [] if not hasattr(options, 'head'): options.head = None if not hasattr(options, 'nohooks'): options.nohooks = True if not hasattr(options, 'deps_os'): options.deps_os = None if not hasattr(options, 'manually_grab_svn_rev'): options.manually_grab_svn_rev = None if not hasattr(options, 'force'): options.force = None return (options, args) parser.parse_args = Parse # We don't want wordwrapping in epilog (usually examples) parser.format_epilog = lambda _: parser.epilog or '' if argv: command = Command(argv[0]) if command: # 'fix' the usage and the description now that we know the subcommand. GenUsage(parser, argv[0]) return command(parser, argv[1:]) # Not a known command. Default to help. GenUsage(parser, 'help') return CMDhelp(parser, argv) except gclient_utils.Error, e: print >> sys.stderr, 'Error: %s' % str(e) return 1
a5e1a742f89561ca57497621fc2cb75b59c2d5bc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6076/a5e1a742f89561ca57497621fc2cb75b59c2d5bc/gclient.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12740, 12, 19485, 4672, 3536, 10154, 82, 1404, 1109, 326, 1775, 2674, 16, 2537, 1104, 326, 2145, 18856, 358, 1836, 12123, 775, 30, 468, 2256, 518, 26374, 1427, 777, 4364, 854, 12889, 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, 12740, 12, 19485, 4672, 3536, 10154, 82, 1404, 1109, 326, 1775, 2674, 16, 2537, 1104, 326, 2145, 18856, 358, 1836, 12123, 775, 30, 468, 2256, 518, 26374, 1427, 777, 4364, 854, 12889, 18, ...
class Poll(Thread): """ Thread that performs polling """ def __init__(self, poll): """ __init__ Initialize thread and set polling callback """ Thread.__init__(self) self.poll = poll; def run(self): """ __run__ Performs polling """ while True: self.poll()
def startComponent(self): """ _startComponent_
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, 787, 1841, 12, 2890, 4672, 3536, 389, 1937, 1841, 67, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 787, 1841, 12, 2890, 4672, 3536, 389, 1937, 1841, 67, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
(sync_percent, estimated_time)
(sync_percent, estimated_time, is_degraded)
def GetSyncStatus(self): """Returns the sync status of the device.
583e3f6f78548b8d1aaed3cc0bb95370f5197759 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7542/583e3f6f78548b8d1aaed3cc0bb95370f5197759/bdev.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 968, 4047, 1482, 12, 2890, 4672, 3536, 1356, 326, 3792, 1267, 434, 326, 2346, 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, 968, 4047, 1482, 12, 2890, 4672, 3536, 1356, 326, 3792, 1267, 434, 326, 2346, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
tmpType, tmpPath, tmpSize, tmpHash = self.dlQueue.get(False)
tmpType, tmpFileName, tmpSize, tmpHash = self.dlQueue.get(False)
def run(self): log.log(2,"info",_("New XiboDownloadManager instance started.")) while (self.running): self.interval = 300
66a075cab3d68c237f51e86004d5840adb9c1f9c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5464/66a075cab3d68c237f51e86004d5840adb9c1f9c/XiboClient.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 613, 18, 1330, 12, 22, 10837, 1376, 3113, 67, 2932, 1908, 1139, 495, 83, 7109, 1318, 791, 5746, 1199, 3719, 1323, 261, 2890, 18, 8704, 4672, 365, 18, 6624, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 613, 18, 1330, 12, 22, 10837, 1376, 3113, 67, 2932, 1908, 1139, 495, 83, 7109, 1318, 791, 5746, 1199, 3719, 1323, 261, 2890, 18, 8704, 4672, 365, 18, 6624, 273, 1...
self.assertRaises(ValueError, lambda: bytes([-1])) self.assertRaises(ValueError, lambda: bytes([-sys.maxint])) self.assertRaises(ValueError, lambda: bytes([-sys.maxint-1])) self.assertRaises(ValueError, lambda: bytes([-sys.maxint-2])) self.assertRaises(ValueError, lambda: bytes([-10**100])) self.assertRaises(ValueError, lambda: bytes([256])) self.assertRaises(ValueError, lambda: bytes([257])) self.assertRaises(ValueError, lambda: bytes([sys.maxint])) self.assertRaises(ValueError, lambda: bytes([sys.maxint+1])) self.assertRaises(ValueError, lambda: bytes([10**100]))
self.assertRaises(ValueError, bytes, [-1]) self.assertRaises(ValueError, bytes, [-sys.maxint]) self.assertRaises(ValueError, bytes, [-sys.maxint-1]) self.assertRaises(ValueError, bytes, [-sys.maxint-2]) self.assertRaises(ValueError, bytes, [-10**100]) self.assertRaises(ValueError, bytes, [256]) self.assertRaises(ValueError, bytes, [257]) self.assertRaises(ValueError, bytes, [sys.maxint]) self.assertRaises(ValueError, bytes, [sys.maxint+1]) self.assertRaises(ValueError, bytes, [10**100])
def test_constructor_value_errors(self): self.assertRaises(ValueError, lambda: bytes([-1])) self.assertRaises(ValueError, lambda: bytes([-sys.maxint])) self.assertRaises(ValueError, lambda: bytes([-sys.maxint-1])) self.assertRaises(ValueError, lambda: bytes([-sys.maxint-2])) self.assertRaises(ValueError, lambda: bytes([-10**100])) self.assertRaises(ValueError, lambda: bytes([256])) self.assertRaises(ValueError, lambda: bytes([257])) self.assertRaises(ValueError, lambda: bytes([sys.maxint])) self.assertRaises(ValueError, lambda: bytes([sys.maxint+1])) self.assertRaises(ValueError, lambda: bytes([10**100]))
5692fcc0ae6c9d301cc3b22d4f435a905d21093e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/5692fcc0ae6c9d301cc3b22d4f435a905d21093e/test_bytes.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 12316, 67, 1132, 67, 4324, 12, 2890, 4672, 365, 18, 11231, 12649, 6141, 12, 23610, 16, 3195, 30, 1731, 3816, 17, 21, 22643, 365, 18, 11231, 12649, 6141, 12, 23610, 16, 3195, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 12316, 67, 1132, 67, 4324, 12, 2890, 4672, 365, 18, 11231, 12649, 6141, 12, 23610, 16, 3195, 30, 1731, 3816, 17, 21, 22643, 365, 18, 11231, 12649, 6141, 12, 23610, 16, 3195, ...
self.serverurl,
'http://127.0.0.1',
def getServerProxy(self): # mostly put here for unit testing return xmlrpclib.ServerProxy( self.serverurl, transport = BasicAuthTransport(self.username, self.password) )
26a1122a8a73354508ec8cd25d4ff586b4dc5891 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/13620/26a1122a8a73354508ec8cd25d4ff586b4dc5891/options.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11543, 3886, 12, 2890, 4672, 468, 23958, 1378, 2674, 364, 2836, 7769, 327, 2025, 13832, 830, 495, 18, 2081, 3886, 12, 565, 296, 2505, 2207, 14260, 18, 20, 18, 20, 18, 21, 2187, 4736, 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, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11543, 3886, 12, 2890, 4672, 468, 23958, 1378, 2674, 364, 2836, 7769, 327, 2025, 13832, 830, 495, 18, 2081, 3886, 12, 565, 296, 2505, 2207, 14260, 18, 20, 18, 20, 18, 21, 2187, 4736, 2...
if self.factor is not None: value_to_display = float(self.value * self.factor) else: value_to_display = float(self.value) decimal = round(float(value_to_display) - int(value_to_display), 1) if decimal == 0.0: self.value_btn.props.text = str(int(value_to_display)) elif decimal == 1.0: self.value_btn.props.text = str(int(value_to_display)+1) else: self.value_btn.props.text = str(value_to_display)
def __init__(self, min, max, default, increment=1, text=None, factor=None): Box.__init__(self, horizontal=True, spacing=5, border=5)
bfd6323fffd943774d4be4bd4bde88101d3a2338 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5279/bfd6323fffd943774d4be4bd4bde88101d3a2338/adjusters.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1131, 16, 943, 16, 805, 16, 5504, 33, 21, 16, 977, 33, 7036, 16, 5578, 33, 7036, 4672, 8549, 16186, 2738, 972, 12, 2890, 16, 10300, 33, 5510, 16, 13259...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1131, 16, 943, 16, 805, 16, 5504, 33, 21, 16, 977, 33, 7036, 16, 5578, 33, 7036, 4672, 8549, 16186, 2738, 972, 12, 2890, 16, 10300, 33, 5510, 16, 13259...
class _FuncPtr(_CFuncPtr): _flags_ = _FUNCFLAG_STDCALL _restype_ = c_int
_func_flags_ = _FUNCFLAG_STDCALL
def __getitem__(self, name_or_ordinal): func = self._FuncPtr((name_or_ordinal, self)) if not isinstance(name_or_ordinal, (int, long)): func.__name__ = name_or_ordinal return func
80c06d808e835167ce387b53461bda158c7c9257 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9417/80c06d808e835167ce387b53461bda158c7c9257/ctypes__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 31571, 972, 12, 2890, 16, 508, 67, 280, 67, 517, 1490, 4672, 1326, 273, 365, 6315, 2622, 5263, 12443, 529, 67, 280, 67, 517, 1490, 16, 365, 3719, 309, 486, 1549, 12, 529, 67, 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, 31571, 972, 12, 2890, 16, 508, 67, 280, 67, 517, 1490, 4672, 1326, 273, 365, 6315, 2622, 5263, 12443, 529, 67, 280, 67, 517, 1490, 16, 365, 3719, 309, 486, 1549, 12, 529, 67, 2...
self.commonURL=cURL
self.commonURL=os.path.normpath(cURL).replace(protocolTag,givenProtocol)
def __init__(self,publicationDirectory=None,publicationURL=None): if publicationDirectory == None or\ publicationURL == None: os.stderr.write("Error: Initializing filenameToURLMappe instance \
00e7d9398d724c190344f7b933f3fb6b88128218 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3592/00e7d9398d724c190344f7b933f3fb6b88128218/makeCheckListWiki.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 28631, 2853, 33, 7036, 16, 28631, 1785, 33, 7036, 4672, 309, 20574, 2853, 422, 599, 578, 64, 20574, 1785, 422, 599, 30, 1140, 18, 11241, 18, 2626, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 28631, 2853, 33, 7036, 16, 28631, 1785, 33, 7036, 4672, 309, 20574, 2853, 422, 599, 578, 64, 20574, 1785, 422, 599, 30, 1140, 18, 11241, 18, 2626, 2932, ...
pwBottomArea.setSizePolicy( QSizePolicy(QSizePolicy.Policy(QSizePolicy.Expanding), QSizePolicy.Policy(QSizePolicy.Fixed)))
def __init__(self, assy, parent): """ Constructor for the part window.
768028589b20c831bb59b141074536c76c7b2736 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11221/768028589b20c831bb59b141074536c76c7b2736/Ui_PartWindow.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1551, 93, 16, 982, 4672, 3536, 11417, 364, 326, 1087, 2742, 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...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1551, 93, 16, 982, 4672, 3536, 11417, 364, 326, 1087, 2742, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
def check_whitespace(ui, repo, hooktype, node, parent1, parent2):
def check_whitespace(ui, repo, hooktype, node, parent1, parent2, **kwargs):
def check_whitespace(ui, repo, hooktype, node, parent1, parent2): if hooktype != 'pretxncommit': raise AttributeError, \ "This hook is only meant for pretxncommit, not %s" % hooktype args = { 'tabsize' : 8 } do_check_whitespace(ui, repo, **args)
01b5f4f841caa9bec10f22904535ee93f76a827b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7385/01b5f4f841caa9bec10f22904535ee93f76a827b/style.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 18777, 12, 4881, 16, 3538, 16, 3953, 723, 16, 756, 16, 982, 21, 16, 982, 22, 16, 2826, 4333, 4672, 309, 3953, 723, 480, 296, 1484, 24790, 7371, 4278, 1002, 6394, 16, 521, 31...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 18777, 12, 4881, 16, 3538, 16, 3953, 723, 16, 756, 16, 982, 21, 16, 982, 22, 16, 2826, 4333, 4672, 309, 3953, 723, 480, 296, 1484, 24790, 7371, 4278, 1002, 6394, 16, 521, 31...
else: if l.posters: l.member_posting_only = 0
elif l.data_version <= 10 and l.posters: l.member_posting_only = 0
def PreferStored(oldname, newname, newdefault=uniqueval, l=l, state=stored_state): """Use specified old value if new value is not in stored state.
669735dfacd49cc0bf856f923cd6861a8c280097 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2120/669735dfacd49cc0bf856f923cd6861a8c280097/versions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2962, 586, 18005, 12, 1673, 529, 16, 26722, 16, 394, 1886, 33, 6270, 1125, 16, 328, 33, 80, 16, 919, 33, 22601, 67, 2019, 4672, 3536, 3727, 1269, 1592, 460, 309, 394, 460, 353, 486, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2962, 586, 18005, 12, 1673, 529, 16, 26722, 16, 394, 1886, 33, 6270, 1125, 16, 328, 33, 80, 16, 919, 33, 22601, 67, 2019, 4672, 3536, 3727, 1269, 1592, 460, 309, 394, 460, 353, 486, ...
""" The function nu from the Cohen and Oesterle paper on
r""" The function $\nu$ from the Cohen and Oesterle paper on
def CO_nu(r, p, N, eps): """ The function nu from the Cohen and Oesterle paper on dimension formulas. INPUT: r -- positive integer p -- a prime N -- positive integer eps -- character OUTPUT: element of the base ring of the character EXAMPLES: sage: G.<eps> = DirichletGroup(7) sage: G.<eps> = DirichletGroup(7) sage: sage.modular.dims.CO_nu(1,7,7,eps) -1 """ K = eps.base_ring() if p%3==2: return K(0) if p==3: if r==1: return K(1) return K(0) # interesting case: p=1(mod 3) # omega is a cube root of 1 mod p. omega = (IntegerModRing(p).unit_gens()[0])**((p-1)//3) n = Mod(omega.crt(Mod(1,N//(p**r))), N) # within a p-power root of a "local" cube root of 1 mod p. n = n**(p**(r-1)) # this is right now t = eps(n) if t==K(1): return K(2) return K(-1)
c82112a889c87779a875085f7c30d0e045ec245d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/c82112a889c87779a875085f7c30d0e045ec245d/dims.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7910, 67, 13053, 12, 86, 16, 293, 16, 423, 16, 7785, 4672, 436, 8395, 1021, 445, 271, 64, 13053, 8, 628, 326, 7695, 76, 275, 471, 531, 7654, 298, 15181, 603, 4968, 646, 24857, 18, 22...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7910, 67, 13053, 12, 86, 16, 293, 16, 423, 16, 7785, 4672, 436, 8395, 1021, 445, 271, 64, 13053, 8, 628, 326, 7695, 76, 275, 471, 531, 7654, 298, 15181, 603, 4968, 646, 24857, 18, 22...
self.offset += offset def __str__(self): return 'putchar(mptr[%s]);\n' % self.offset def __repr__(self): return 'Output[%r]' % self.offset
self.expr = self.expr.movepointer(offset) def __str__(self): return 'putchar(%s);\n' % self.expr def __repr__(self): return 'Output[%r]' % self.expr
def movepointer(self, offset): self.offset += offset
7e4977d92466eee249d210728f4afcdaea7223d2 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2040/7e4977d92466eee249d210728f4afcdaea7223d2/esotope-bfc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3635, 10437, 12, 2890, 16, 1384, 4672, 365, 18, 3348, 1011, 1384, 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,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3635, 10437, 12, 2890, 16, 1384, 4672, 365, 18, 3348, 1011, 1384, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
if self.conditionalAdd(pl3, counter):
if self.conditionalAdd(pl3, counter, pl):
def workDone(self, counter): """This is called by a worker to tell us that the promised work was completed as far as possible. The only argument is an instance of a counter class, that has methods minus() and plus() to keep counts of the total work todo.""" # Loop over all the pages that should have been taken care of for pl in self.pending: # Mark the page as done self.done[pl] = pl.code() # Register this fact at the todo-counter. counter.minus(pl.code()) # Assume it's not a redirect isredirect = 0 # Now check whether any interwiki links should be added to the # todo list. if unequal.bigger(self.inpl, pl): print "NOTE: %s is bigger than %s, not following references" % (pl, self.inpl) else: try: iw = pl.interwiki() except wikipedia.IsRedirectPage,arg: pl3 = wikipedia.PageLink(pl.code(),arg.args[0]) print "NOTE: %s is redirect to %s" % (pl.asasciilink(), pl3.asasciilink()) if pl == self.inpl: # This is a redirect page itself. We don't need to # follow the redirection. isredirect = 1 # In this case we can also stop all hints! for pl2 in self.todo: counter.minus(pl2.code()) self.todo = {} pass elif not globalvar.followredirect: print "NOTE: not following redirects." elif unequal.unequal(self.inpl, pl3): print "NOTE: %s is unequal to %s, not adding it" % (pl3, self.inpl) else: if self.conditionalAdd(pl3, counter): if globalvar.shownew: print "%s: %s gives new redirect %s"% (self.inpl.asasciiselflink(), pl.asasciilink(), pl3.asasciilink()) except wikipedia.NoPage: print "NOTE: %s does not exist" % pl.asasciilink() #print "DBG> ",pl.urlname() if pl == self.inpl: # This is the home subject page. # In this case we can stop all hints! for pl2 in self.todo: counter.minus(pl2.code()) self.todo = {} pass except wikipedia.SubpageError: print "NOTE: %s subpage does not exist" % pl.asasciilink() else: if self.inpl == pl: self.untranslated = (len(iw) == 0) if globalvar.untranslatedonly: # Ignore the interwiki links. iw = () elif pl.isEmpty(): print "NOTE: %s is empty; ignoring it and its interwiki links" % pl.asasciilink() # Ignore the interwiki links iw = () for pl2 in iw: if unequal.unequal(self.inpl, pl2): print "NOTE: %s is unequal to %s, not adding it" % (pl2, self.inpl) else: if self.conditionalAdd(pl2, counter): if globalvar.shownew: print "%s: %s gives new interwiki %s"% (self.inpl.asasciiselflink(), pl.asasciilink(), pl2.asasciilink()) # These pages are no longer 'in progress' del self.pending # Check whether we need hints and the user offered to give them if self.untranslated and not self.hintsasked: print "NOTE: %s does not have any interwiki links" % self.inpl.asasciilink() if (self.untranslated or globalvar.askhints) and not self.hintsasked and not isredirect: # Only once! self.hintsasked = True if globalvar.untranslated: if globalvar.bell: sys.stdout.write('\07') newhint = None while 1: newhint = raw_input("Hint:") if newhint and not ':' in newhint: print "Please enter a hint like language:pagename" #print "or type 'q' to stop generating new pages" print "or type nothing if you do not have a hint" elif not newhint: break else: arr = {} import titletranslate titletranslate.translate(pl, arr, same = False, hints = [newhint]) for pl2 in arr.iterkeys(): self.todo[pl2] = pl2.code() counter.plus(pl2.code())
b5b807b46b22efa6e85db531b0ff45ffef67e5ed /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4404/b5b807b46b22efa6e85db531b0ff45ffef67e5ed/interwiki.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1440, 7387, 12, 2890, 16, 3895, 4672, 3536, 2503, 353, 2566, 635, 279, 4322, 358, 9276, 584, 716, 326, 3012, 5918, 1440, 1703, 5951, 487, 10247, 487, 3323, 18, 1021, 1338, 1237, 353, 392...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1440, 7387, 12, 2890, 16, 3895, 4672, 3536, 2503, 353, 2566, 635, 279, 4322, 358, 9276, 584, 716, 326, 3012, 5918, 1440, 1703, 5951, 487, 10247, 487, 3323, 18, 1021, 1338, 1237, 353, 392...
})
'address_id' : address_id },context)
def create_picking(self, cr, uid, ids, context={}): """Create a picking for each order and validate it.""" picking_obj = self.pool.get('stock.picking')
96f68bec03a177c1e3daa9b3b776f3c0ca55e0f1 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/96f68bec03a177c1e3daa9b3b776f3c0ca55e0f1/pos.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 11503, 310, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 819, 12938, 4672, 3536, 1684, 279, 6002, 310, 364, 1517, 1353, 471, 1954, 518, 12123, 6002, 310, 67, 2603, 273, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 11503, 310, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 819, 12938, 4672, 3536, 1684, 279, 6002, 310, 364, 1517, 1353, 471, 1954, 518, 12123, 6002, 310, 67, 2603, 273, 365, 18...
_open = _mk_single_path_wrapper('file', _open)
_file = _mk_single_path_wrapper('file', _file) _open = _mk_single_path_wrapper('open', _open)
def wrap(self,path,*args,**kw): if self._active: path = self._remap_input(name,path,*args,**kw) return original(path,*args,**kw)
457f95783acaed3c59668b6c6bf93414c4f1967b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/495/457f95783acaed3c59668b6c6bf93414c4f1967b/sandbox.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2193, 12, 2890, 16, 803, 16, 14, 1968, 16, 636, 9987, 4672, 309, 365, 6315, 3535, 30, 589, 273, 365, 6315, 266, 1458, 67, 2630, 12, 529, 16, 803, 16, 14, 1968, 16, 636, 9987, 13, 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, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2193, 12, 2890, 16, 803, 16, 14, 1968, 16, 636, 9987, 4672, 309, 365, 6315, 3535, 30, 589, 273, 365, 6315, 266, 1458, 67, 2630, 12, 529, 16, 803, 16, 14, 1968, 16, 636, 9987, 13, 3...
return object.__new__(cls, sexpr, owner)
return object.__new__(cls)
def __new__(cls, sexpr, owner): if len(sexpr) == 6 and isinstance(sexpr[5], djvu.sexpr.StringExpression): cls = LeafNode else: cls = InnerNode return object.__new__(cls, sexpr, owner)
93f25cd21035580300856c06ebc78d3f42f18915 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3683/93f25cd21035580300856c06ebc78d3f42f18915/text.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2704, 972, 12, 6429, 16, 272, 8638, 16, 3410, 4672, 309, 562, 12, 20909, 683, 13, 422, 1666, 471, 1549, 12, 20909, 683, 63, 25, 6487, 19754, 90, 89, 18, 20909, 683, 18, 780, 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, 1001, 2704, 972, 12, 6429, 16, 272, 8638, 16, 3410, 4672, 309, 562, 12, 20909, 683, 13, 422, 1666, 471, 1549, 12, 20909, 683, 63, 25, 6487, 19754, 90, 89, 18, 20909, 683, 18, 780, 23...
if (self._docformat not in ('epytext', 'plaintext') and
if (self._docformat not in KNOWN_DOCFORMATS and
def __init__(self, uid, verbosity=0): """ Create the documentation for the given object. @param uid: The UID of the object to document. @type uid: L{UID} @param verbosity: The verbosity of output produced when creating documentation for the object. More positive numbers produce more verbose output; negative numbers supress warnings and errors. @type verbosity: C{int} """ obj = uid.value() self._uid = uid
23fb91d61db0cb012ca48676ad68bb02c6a45128 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11420/23fb91d61db0cb012ca48676ad68bb02c6a45128/objdoc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 4555, 16, 11561, 33, 20, 4672, 3536, 1788, 326, 7323, 364, 326, 864, 733, 18, 225, 632, 891, 4555, 30, 1021, 10034, 434, 326, 733, 358, 1668, 18, 632, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 4555, 16, 11561, 33, 20, 4672, 3536, 1788, 326, 7323, 364, 326, 864, 733, 18, 225, 632, 891, 4555, 30, 1021, 10034, 434, 326, 733, 358, 1668, 18, 632, ...
'GALLERY' : 'gallery'}
'GALLERY' : 'gallery', 'EDIT' : 'edit', 'CHAR' : 'edit', 'loadmap':'palette'}
def __init__(self,name): self.name = name self.deps = [] self.editors = {}
f9f008ef8d8def9d631bc4a1f6676d20b4e357e3 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11338/f9f008ef8d8def9d631bc4a1f6676d20b4e357e3/vlab.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 529, 4672, 365, 18, 529, 273, 508, 365, 18, 14877, 273, 5378, 365, 18, 4619, 1383, 273, 2618, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 529, 4672, 365, 18, 529, 273, 508, 365, 18, 14877, 273, 5378, 365, 18, 4619, 1383, 273, 2618, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
return self.tk.call(self.stylename, 'cget', '-%s'%key, value)
return self.tk.call(self.stylename, 'cget', '-%s'%key, value)
def __getitem__(self,key):
22710823fb554a796dc96c44885d7a9389426824 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/22710823fb554a796dc96c44885d7a9389426824/Tix.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 31571, 972, 12, 2890, 16, 856, 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, 1001, 31571, 972, 12, 2890, 16, 856, 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...
host = request.environ["SERVER_NAME"]
host = request.environ["HTTP_X_FORWARDED_HOST'"]
def isMobileRequest(self, site, request, mobileDomainPrefixes, mobileDomainSuffixes): """ Determine should this request be rendered in mobile mode. """
dc9852ea596084c0e3e633035ca6b8b2883591df /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10164/dc9852ea596084c0e3e633035ca6b8b2883591df/discriminator.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15707, 7106, 691, 12, 2890, 16, 2834, 16, 590, 16, 13411, 3748, 11700, 16, 13411, 3748, 5791, 281, 4672, 3536, 10229, 1410, 333, 590, 506, 7935, 316, 13411, 1965, 18, 3536, 2, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15707, 7106, 691, 12, 2890, 16, 2834, 16, 590, 16, 13411, 3748, 11700, 16, 13411, 3748, 5791, 281, 4672, 3536, 10229, 1410, 333, 590, 506, 7935, 316, 13411, 1965, 18, 3536, 2, -100, -100...
Gratia.Initialize() defaultAccountingFile = Gratia.Config.getConfigAttribute("SGEAccountingFile") if not defaultAccountingFile or not os.path.exists(defaultAccountingFile): defaultAccountingFile = sgeRoot+"/default/common/accounting"
def printRecord(self): Gratia.DebugPrint(debug_level, "=================================") for key in self.__sgeFields__: Gratia.DebugPrint(debug_level, key + " : " + self.sgeRecord[key]) Gratia.DebugPrint(debug_level, "=================================")
999318529aeaf71a8f8191a7dedf8a1bc982b564 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/637/999318529aeaf71a8f8191a7dedf8a1bc982b564/sge_meter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1172, 2115, 12, 2890, 4672, 611, 17048, 1155, 18, 2829, 5108, 12, 4148, 67, 2815, 16, 315, 4428, 1546, 13, 364, 498, 316, 365, 16186, 87, 908, 2314, 972, 30, 611, 17048, 1155, 18, 2829...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1172, 2115, 12, 2890, 4672, 611, 17048, 1155, 18, 2829, 5108, 12, 4148, 67, 2815, 16, 315, 4428, 1546, 13, 364, 498, 316, 365, 16186, 87, 908, 2314, 972, 30, 611, 17048, 1155, 18, 2829...
-0.38268343236508989), (-2.3561944901923448, -0.707106781186547...),
-0.3826834323650898...), (-2.3561944901923448, -0.707106781186547...),
def generate_plot_points(f, xrange, plot_points=5, adaptive_tolerance=0.01, adaptive_recursion=5, randomize = True): r""" Calculate plot points for a function f in the interval xrange. The adaptive refinement algorithm for plotting a function f. See the docstring for plot for a description of the algorithm. INPUT: f -- a function of one variable p1, p2 -- two points to refine between plot_points -- (default: 5) the minimal number of plot points. adaptive_recursion -- (default: 5) how many levels of recursion to go before giving up when doing adaptive refinement. Setting this to 0 disables adaptive refinement. adaptive_tolerance -- (default: 0.01) how large a difference should be before the adaptive refinement code considers it significant. See the documentation for plot() for more information. OUTPUT: list -- a list of points (x, f(x)) in the interval xrange, which aproximate the function f. TESTS: sage: from sage.plot.plot import generate_plot_points sage: generate_plot_points(sin, (0, pi), plot_points=2, adaptive_recursion=0) [(0.0, 0.0), (3.1415926535897931, 1.2246...e-16)] sage: generate_plot_points(sin(x), (-pi, pi), randomize=False) [(-3.1415926535897931, -1.2246...e-16), (-2.748893571891069, -0.38268343236508989), (-2.3561944901923448, -0.707106781186547...), (-2.1598449493429825, -0.831469612302545...), (-1.9634954084936207, -0.92387953251128674), (-1.7671458676442586, -0.98078528040323043), (-1.5707963267948966, -1.0), (-1.3744467859455345, -0.98078528040323043), (-1.1780972450961724, -0.92387953251128674), (-0.98174770424681035, -0.83146961230254524), (-0.78539816339744828, -0.707106781186547...), (-0.39269908169872414, -0.38268343236508978), (0.0, 0.0), (0.39269908169872414, 0.38268343236508978), (0.78539816339744828, 0.707106781186547...), (0.98174770424681035, 0.83146961230254524), (1.1780972450961724, 0.92387953251128674), (1.3744467859455345, 0.98078528040323043), (1.5707963267948966, 1.0), (1.7671458676442586, 0.98078528040323043), (1.9634954084936207, 0.92387953251128674), (2.1598449493429825, 0.831469612302545...), (2.3561944901923448, 0.707106781186547...), (2.748893571891069, 0.38268343236508989), (3.1415926535897931, 1.2246...e-16)] This shows that lowering adaptive_tolerance and raising adaptive_recursion both increase the number of subdivision points: sage: x = var('x') sage: f = sin(1/x) sage: [len(generate_plot_points(f, (-pi, pi), adaptive_tolerance=i)) for i in [0.01, 0.001, 0.0001]] [42, 67, 104] sage: [len(generate_plot_points(f, (-pi, pi), adaptive_recursion=i)) for i in [5, 10, 15]] [34, 144, 897] """ x, data = var_and_list_of_values(xrange, plot_points) xmin = data[0] xmax = data[-1] delta = float(xmax-xmin) / plot_points random = current_randstate().python_random().random exceptions = 0; msg='' exception_indices = [] for i in range(len(data)): xi = data[i] # Slightly randomize the interior sample points if # randomize is true if randomize and i > 0 and i < plot_points-1: xi += delta*(random() - 0.5) try: data[i] = (float(xi), float(f(xi))) if str(data[i][1]) in ['nan', 'NaN', 'inf', '-inf']: sage.misc.misc.verbose("%s\nUnable to compute f(%s)"%(msg, x),1) exceptions += 1 exception_indices.append(i) except (ZeroDivisionError, TypeError, ValueError, OverflowError), msg: sage.misc.misc.verbose("%s\nUnable to compute f(%s)"%(msg, x),1) if i == 0: for j in range(1, 99): xj = xi + delta*j/100.0 try: data[i] = (float(xj), float(f(xj))) # nan != nan if data[i][1] != data[i][1]: continue break except (ZeroDivisionError, TypeError, ValueError, OverflowError), msg: pass else: exceptions += 1 exception_indices.append(i) elif i == plot_points-1: for j in range(1, 99): xj = xi - delta*j/100.0 try: data[i] = (float(xj), float(f(xj))) # nan != nan if data[i][1] != data[i][1]: continue break except (ZeroDivisionError, TypeError, ValueError, OverflowError), msg: pass else: exceptions += 1 exception_indices.append(i) else: exceptions += 1 exception_indices.append(i) exceptions += 1 exception_indices.append(i) data = [data[i] for i in range(len(data)) if i not in exception_indices] # adaptive refinement i, j = 0, 0 adaptive_tolerance = delta * float(adaptive_tolerance) adaptive_recursion = int(adaptive_recursion) while i < len(data) - 1: for p in adaptive_refinement(f, data[i], data[i+1], adaptive_tolerance=adaptive_tolerance, adaptive_recursion=adaptive_recursion): data.insert(i+1, p) i += 1 i += 1 if (len(data) == 0 and exceptions > 0) or exceptions > 10: sage.misc.misc.verbose("WARNING: When plotting, failed to evaluate function at %s points."%exceptions, level=0) sage.misc.misc.verbose("Last error message: '%s'"%msg, level=0) return data
662ccb636620bd0abeed04142bada4e1054b961e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/662ccb636620bd0abeed04142bada4e1054b961e/plot.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 67, 4032, 67, 4139, 12, 74, 16, 12314, 16, 3207, 67, 4139, 33, 25, 16, 5855, 688, 67, 25456, 33, 20, 18, 1611, 16, 5855, 688, 67, 31347, 33, 25, 16, 2744, 554, 273, 1053, 467...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 67, 4032, 67, 4139, 12, 74, 16, 12314, 16, 3207, 67, 4139, 33, 25, 16, 5855, 688, 67, 25456, 33, 20, 18, 1611, 16, 5855, 688, 67, 31347, 33, 25, 16, 2744, 554, 273, 1053, 467...
self.assertEquals(where.as_sql(), "(cn=test*)")
self.assertEquals(where.as_sql(), ("(cn=test*)", []))
def test_char_field_startswith(self): where = WhereNode() where.add((Constraint("cn", "cn", CharField()), 'startswith', "test"), AND) self.assertEquals(where.as_sql(), "(cn=test*)")
d16779d7edb93416524eae1081f4238208ccdc6b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12933/d16779d7edb93416524eae1081f4238208ccdc6b/tests.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 3001, 67, 1518, 67, 17514, 1918, 12, 2890, 4672, 1625, 273, 12177, 907, 1435, 1625, 18, 1289, 12443, 5806, 2932, 10305, 3113, 315, 10305, 3113, 3703, 974, 1435, 3631, 296, 17514,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3001, 67, 1518, 67, 17514, 1918, 12, 2890, 4672, 1625, 273, 12177, 907, 1435, 1625, 18, 1289, 12443, 5806, 2932, 10305, 3113, 315, 10305, 3113, 3703, 974, 1435, 3631, 296, 17514,...
variables set as they want before running jamu live.
variables set as they want before running jamu live.
def displayOptions(self): """ Display all of the configuration values. This is used to verify that the user has the variables set as they want before running jamu live. """ keys=self.config.keys() keys.sort()
6089d4d60f2dab84c6af9981c242684b162de38e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/13713/6089d4d60f2dab84c6af9981c242684b162de38e/jamu.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2562, 1320, 12, 2890, 4672, 3536, 9311, 777, 434, 326, 1664, 924, 18, 1220, 353, 1399, 358, 3929, 716, 326, 729, 711, 326, 3152, 444, 487, 2898, 2545, 1865, 3549, 525, 301, 89, 8429, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2562, 1320, 12, 2890, 4672, 3536, 9311, 777, 434, 326, 1664, 924, 18, 1220, 353, 1399, 358, 3929, 716, 326, 729, 711, 326, 3152, 444, 487, 2898, 2545, 1865, 3549, 525, 301, 89, 8429, 1...
return page['revisions'].values()[0]['*']
return revisions.values()[0]['*']
def getRawArticle(self, title, revision=None): if not title: return None
f185ac71316210bf1588f6b5c8f0f8b686acc917 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12391/f185ac71316210bf1588f6b5c8f0f8b686acc917/mwapidb.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10547, 7880, 12, 2890, 16, 2077, 16, 6350, 33, 7036, 4672, 309, 486, 2077, 30, 327, 599, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10547, 7880, 12, 2890, 16, 2077, 16, 6350, 33, 7036, 4672, 309, 486, 2077, 30, 327, 599, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
xyz=butcher_stall_xyz,age=probability.fertility_age) m.learn(trader,(il.market,"run_shop(stall,'open','dawn')")) m.learn(trader,(il.market,"run_shop(stall,'closed','evening')"))
xyz=(uniform(-36,-56),uniform(-7,-17),village_height), age=probability.fertility_age,face=directions[randint(0,7)]) m.learn(trader,(il.market,"run_shop('"+stall+"','open','dawn')")) m.learn(trader,(il.market,"run_shop('"+stall+"','closed','evening')"))
def default(mapeditor):
2b4c12d65db58d1782f011f2603afda9626e8060 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12932/2b4c12d65db58d1782f011f2603afda9626e8060/define_world.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 805, 12, 1458, 9177, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 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, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 805, 12, 1458, 9177, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
print "COMPILING: ", stub
def gen_stub(plumber, address, port): stub = get_test_stub() print "COMPILING: ", stub dfparser.compile(plumber, stub) if dfparser.dataflows.has_key(DATAFLOW_NAME): m = dfparser.dataflows[DATAFLOW_NAME] m.eval_dataflow() return m.conf print "DATAFLOW COMPILATION PROBLEM" return None
f7a03c90e8948849c5fb99491857bbcef534f0fe /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/929/f7a03c90e8948849c5fb99491857bbcef534f0fe/terminal.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3157, 67, 12847, 12, 412, 1226, 16, 1758, 16, 1756, 4672, 7168, 273, 336, 67, 3813, 67, 12847, 1435, 225, 3013, 4288, 18, 11100, 12, 412, 1226, 16, 7168, 13, 225, 309, 3013, 4288, 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, 3157, 67, 12847, 12, 412, 1226, 16, 1758, 16, 1756, 4672, 7168, 273, 336, 67, 3813, 67, 12847, 1435, 225, 3013, 4288, 18, 11100, 12, 412, 1226, 16, 7168, 13, 225, 309, 3013, 4288, 18, ...
for (ver,key) in MAYAVERSIONS:
for (ver,key) in MAYAVERSIONINFO:
def parseopts(args): global COMPILER,OPTIMIZE,OMIT,INSTALLER,GENMAN,SLAVEBUILD global VERSION,COMPRESSOR,DIRECTXSDK,VERBOSE,SLAVEFILE,THREADCOUNT longopts = [ "help","package-info","compiler=","directx-sdk=","slavebuild=", "optimize=","everything","nothing","installer","quiet","verbose", "version=","lzma","no-python","slaves=","threads="] anything = 0 for pkg in PACKAGES: longopts.append("no-"+pkg.lower()) for pkg in PACKAGES: longopts.append("use-"+pkg.lower()) try: opts, extras = getopt.getopt(args, "", longopts) for option,value in opts: if (option=="--help"): raise "usage" elif (option=="--package-info"): raise "package-info" elif (option=="--compiler"): COMPILER=value elif (option=="--directx-sdk"): DIRECTXSDK=value elif (option=="--optimize"): OPTIMIZE=value elif (option=="--quiet"): VERBOSE-=1 elif (option=="--verbose"): VERBOSE+=1 elif (option=="--installer"): INSTALLER=1 elif (option=="--genman"): GENMAN=1 elif (option=="--everything"): OMIT=[] elif (option=="--nothing"): OMIT=PACKAGES[:] elif (option=="--slaves"): SLAVEFILE=value elif (option=="--threads"): THREADCOUNT=int(value) elif (option=="--slavebuild"): SLAVEBUILD=value elif (option=="--version"): VERSION=value if (len(VERSION.split(".")) != 3): raise "usage" elif (option=="--lzma"): COMPRESSOR="lzma" else: for pkg in PACKAGES: if (option=="--use-"+pkg.lower()): if (OMIT.count(pkg)): OMIT.remove(pkg) break for pkg in PACKAGES: if (option=="--no-"+pkg.lower()): if (OMIT.count(pkg)==0): OMIT.append(pkg) break anything = 1 except "package-info": packageInfo() except: usage(0) if (anything==0): usage(0) if (OPTIMIZE=="1"): OPTIMIZE=1 elif (OPTIMIZE=="2"): OPTIMIZE=2 elif (OPTIMIZE=="3"): OPTIMIZE=3 elif (OPTIMIZE=="4"): OPTIMIZE=4 else: usage("Invalid setting for OPTIMIZE") if (COMPILERS.count(COMPILER)==0): usage("Invalid setting for COMPILER: "+COMPILER)
d00f745e1ceedb7d59a09beac4f23f2f45af36fe /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7242/d00f745e1ceedb7d59a09beac4f23f2f45af36fe/makepanda.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 4952, 12, 1968, 4672, 2552, 5423, 1102, 14668, 16, 15620, 3445, 15641, 16, 1872, 1285, 16, 28865, 654, 16, 16652, 9560, 16, 55, 2534, 3412, 20215, 2552, 8456, 16, 4208, 22526, 916, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4952, 12, 1968, 4672, 2552, 5423, 1102, 14668, 16, 15620, 3445, 15641, 16, 1872, 1285, 16, 28865, 654, 16, 16652, 9560, 16, 55, 2534, 3412, 20215, 2552, 8456, 16, 4208, 22526, 916, ...
def __call__(self, REQUEST, RESPONSE, *args, **kw): rel_dir = '/'.join(REQUEST.get('_e', [])) destpath = os.path.join(self.folder, rel_dir) if os.path.isfile(destpath): if REQUEST.get('action', '') == 'unpack': self.unpackFile(destpath, REQUEST, RESPONSE) elif REQUEST.get('action', '') == 'delete': self.deleteFile(rel_dir, destpath, REQUEST, RESPONSE) elif REQUEST.get('action', '') == 'catalog': catalogTool = getToolByName(self, 'portal_catalog') return self.catalogContents() else: return self.showFile(destpath, REQUEST, RESPONSE) else: RESPONSE.redirect(('/' + os.path.join(self.absolute_url(1), rel_dir, 'plfng_view')).replace('\\','/'))
def __call__(self, REQUEST=None, RESPONSE=None, *args, **kw): if not hasattr(self, "folder"): return self elif not REQUEST: zLOG.LOG('PloneLocalFolderNG', zLOG.INFO , "__call__() :: no REQUEST") raise NotImplementedError, "PLFNG objects can only be created and viewed through the Plone interface." else: rel_dir = '/'.join(REQUEST.get('_e', [])) destpath = os.path.join(self.folder, rel_dir) if os.path.isfile(destpath): if REQUEST.get('action', '') == 'unpack': self.unpackFile(destpath, REQUEST, RESPONSE) elif REQUEST.get('action', '') == 'delete': self.deleteFile(rel_dir, destpath, REQUEST, RESPONSE) elif REQUEST.get('action', '') == 'catalog': catalogTool = getToolByName(self, 'portal_catalog') return self.catalogContents() else: return self.showFile(destpath, REQUEST, RESPONSE) else: RESPONSE.redirect(('/' + os.path.join(self.absolute_url(1), rel_dir, 'plfng_view')).replace('\\','/'))
def __call__(self, REQUEST, RESPONSE, *args, **kw): rel_dir = '/'.join(REQUEST.get('_e', [])) destpath = os.path.join(self.folder, rel_dir)
97f1e6006a3369cff34a5a0b62b63bacecca7475 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1807/97f1e6006a3369cff34a5a0b62b63bacecca7475/PloneLocalFolderNG.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 12492, 16, 20645, 16, 380, 1968, 16, 2826, 9987, 4672, 1279, 67, 1214, 273, 2023, 18, 5701, 12, 5519, 18, 588, 2668, 67, 73, 2187, 5378, 3719, 1570, 803,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 12492, 16, 20645, 16, 380, 1968, 16, 2826, 9987, 4672, 1279, 67, 1214, 273, 2023, 18, 5701, 12, 5519, 18, 588, 2668, 67, 73, 2187, 5378, 3719, 1570, 803,...
print "Mkdir %s" % repr(newdir)
def Mkdir(newdir): """works the way a good mkdir should :) - already exists, silently complete - regular file in the way, raise an exception - parent directory(ies) does not exist, make them as well """ if os.path.isdir(newdir): pass elif os.path.isfile(newdir): raise OSError("a file with the same name as the desired " \ "dir, '%s', already exists." % newdir) else: head, tail = os.path.split(newdir) if head and not os.path.isdir(head): Mkdir(head) print "Mkdir %s" % repr(newdir) if tail: os.mkdir(newdir)
14d1ad97ca7689119bc791e9d6863d941f3b9271 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/637/14d1ad97ca7689119bc791e9d6863d941f3b9271/Gratia.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17370, 12, 2704, 1214, 4672, 3536, 18597, 326, 4031, 279, 7494, 6535, 1410, 294, 13, 300, 1818, 1704, 16, 22274, 3912, 300, 6736, 585, 316, 326, 4031, 16, 1002, 392, 1520, 300, 982, 1867...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17370, 12, 2704, 1214, 4672, 3536, 18597, 326, 4031, 279, 7494, 6535, 1410, 294, 13, 300, 1818, 1704, 16, 22274, 3912, 300, 6736, 585, 316, 326, 4031, 16, 1002, 392, 1520, 300, 982, 1867...
Attribute access provided for convenience:: env.value = x corresponds to:: env['value'] = x
Attribute access provided for convenience. The following forms are equivalent:: def configure(conf): conf.env.value = x env['value'] = x
def __setattr__(self, name, value): """ Attribute access provided for convenience:: env.value = x
9286ebff2cf2adbd1ae6a2198f5c7879a08d827c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2886/9286ebff2cf2adbd1ae6a2198f5c7879a08d827c/ConfigSet.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 542, 1747, 972, 12, 2890, 16, 508, 16, 460, 4672, 3536, 3601, 2006, 2112, 364, 13553, 2866, 1550, 18, 1132, 273, 619, 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, 1001, 542, 1747, 972, 12, 2890, 16, 508, 16, 460, 4672, 3536, 3601, 2006, 2112, 364, 13553, 2866, 1550, 18, 1132, 273, 619, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
% (self.title(), currentPageOffset))
% (self.title(), wikipedia.url2link(currentPageOffset, self.site(), self.site())))
def _parseCategory(self, purge=False, startFrom=None): """ Yields all articles and subcategories that are in this category.
908d700428b1865e8876aac5cee1d88507afdbe2 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4404/908d700428b1865e8876aac5cee1d88507afdbe2/catlib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2670, 4457, 12, 2890, 16, 11668, 33, 8381, 16, 787, 1265, 33, 7036, 4672, 3536, 31666, 87, 777, 15828, 471, 720, 8995, 716, 854, 316, 333, 3150, 18, 2, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2670, 4457, 12, 2890, 16, 11668, 33, 8381, 16, 787, 1265, 33, 7036, 4672, 3536, 31666, 87, 777, 15828, 471, 720, 8995, 716, 854, 316, 333, 3150, 18, 2, -100, -100, -100, -100, -10...
"""Knows how to extract a filename if a IBytes/IFileWidget was used.
"""Extract the filename of the widget with the given id.
def extractFileName(form, id, cleanup=True, allowEmtpyPostFix=False): """Knows how to extract a filename if a IBytes/IFileWidget was used. Uploads from win/IE need some cleanup because the filename includes also the path. The option cleanup=True will do this for you. The option allowEmtpyPostFix allows to pass filename without extensions. By default this option is set to False and will raise a ValueError if a filename doesn't contain a extension. """ widget = getWidgetById(form, id) if not allowEmtpyPostFix or cleanup: # we need to strip out the path part even if we not reomve them later, # because we just need ot check the filename extension cleanFileName = widget.filename.split('\\')[-1] cleanFileName = cleanFileName.split('/')[-1] dottedParts = cleanFileName.split('.') if not allowEmtpyPostFix: if len(dottedParts) <= 1: raise ValueError(_('Missing filename extension.')) if cleanup: return cleanFileName return widget.filename
d1fd8cba03be71d9e973c4cbba26de6b870cf153 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9738/d1fd8cba03be71d9e973c4cbba26de6b870cf153/util.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2608, 4771, 12, 687, 16, 612, 16, 6686, 33, 5510, 16, 1699, 41, 1010, 2074, 3349, 8585, 33, 8381, 4672, 3536, 4976, 326, 1544, 434, 326, 3604, 598, 326, 864, 612, 18, 225, 9414, 87, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2608, 4771, 12, 687, 16, 612, 16, 6686, 33, 5510, 16, 1699, 41, 1010, 2074, 3349, 8585, 33, 8381, 4672, 3536, 4976, 326, 1544, 434, 326, 3604, 598, 326, 864, 612, 18, 225, 9414, 87, ...
u = self.w.getLinkURL(make_link_node(parser.InterwikiLink, u'Physics', u'gibtsnicht:Physics'))
u = self.w.getLinkURL(make_link_node(parser.InterwikiLink, u'Physics', u'gibtsnicht:Physics'), u'Bla')
def make_link_node(cls, target, full_target=None): link = cls() link.target = target link.full_target = full_target or target if link.full_target[0] == ':': link.full_target = link.full_target[1:] link.colon = True else: link.colon = False return link
651456b8e8660e24e74d881d810eb1936fb22bea /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12391/651456b8e8660e24e74d881d810eb1936fb22bea/test_mwapidb.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 67, 1232, 67, 2159, 12, 6429, 16, 1018, 16, 1983, 67, 3299, 33, 7036, 4672, 1692, 273, 2028, 1435, 1692, 18, 3299, 273, 1018, 1692, 18, 2854, 67, 3299, 273, 1983, 67, 3299, 578, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 67, 1232, 67, 2159, 12, 6429, 16, 1018, 16, 1983, 67, 3299, 33, 7036, 4672, 1692, 273, 2028, 1435, 1692, 18, 3299, 273, 1018, 1692, 18, 2854, 67, 3299, 273, 1983, 67, 3299, 578, ...
run_test_conv_nnet2_classif(23485, 28, 5)
run_test_conv_nnet2_classif(23485, 28, 5, 60)
def test_lenet_28(): #MNIST run_test_conv_nnet2_classif(23485, 28, 5)
af573ee7d8c3a54114353242f023e8ff2afeebe5 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12438/af573ee7d8c3a54114353242f023e8ff2afeebe5/test_nnet.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 1897, 278, 67, 6030, 13332, 468, 49, 50, 5511, 1086, 67, 3813, 67, 4896, 67, 82, 2758, 22, 67, 1106, 430, 12, 17959, 7140, 16, 9131, 16, 1381, 16, 4752, 13, 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, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 1897, 278, 67, 6030, 13332, 468, 49, 50, 5511, 1086, 67, 3813, 67, 4896, 67, 82, 2758, 22, 67, 1106, 430, 12, 17959, 7140, 16, 9131, 16, 1381, 16, 4752, 13, 225, 2, -100, ...
if key in self[section].overriden:
if key in self[section].overridden:
def save(self): """Write the configuration options to the primary file.""" if not self.filename: return
99f16af4b1bb12ffadcccab2470adf39c5851d5a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/99f16af4b1bb12ffadcccab2470adf39c5851d5a/config.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1923, 12, 2890, 4672, 3536, 3067, 326, 1664, 702, 358, 326, 3354, 585, 12123, 309, 486, 365, 18, 3459, 30, 327, 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, 1923, 12, 2890, 4672, 3536, 3067, 326, 1664, 702, 358, 326, 3354, 585, 12123, 309, 486, 365, 18, 3459, 30, 327, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
print "Some tests will be disabled: %s" % e
if verbose: print "Some tests will be disabled: %s" % e
def test_main(): tests = [TestMiscellaneous, TestEnUSNumberFormatting, TestCNumberFormatting] # TestSkipped can't be raised inside unittests, handle it manually instead try: get_enUS_locale() except TestSkipped as e: print "Some tests will be disabled: %s" % e else: tests += [TestNumberFormatting, TestStringMethods] run_unittest(*tests)
a7fe915e66fd9696915252a65a96b7f12a94bd36 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3187/a7fe915e66fd9696915252a65a96b7f12a94bd36/test_locale.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 5254, 13332, 7434, 273, 306, 4709, 11729, 3855, 15522, 16, 7766, 664, 3378, 1854, 23974, 16, 7766, 39, 1854, 23974, 65, 468, 7766, 16425, 848, 1404, 506, 11531, 4832, 2836, 16341...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 5254, 13332, 7434, 273, 306, 4709, 11729, 3855, 15522, 16, 7766, 664, 3378, 1854, 23974, 16, 7766, 39, 1854, 23974, 65, 468, 7766, 16425, 848, 1404, 506, 11531, 4832, 2836, 16341...
results_in_any_collection = search_pattern(req, p1, f1, m1, ap=ap, of=of, verbose=verbose, ln=ln)
results_in_any_collection = search_pattern_parenthesised(req, p1, f1, m1, ap=ap, of=of, verbose=verbose, ln=ln)
def perform_request_search(req=None, cc=CFG_SITE_NAME, c=None, p="", f="", rg=10, sf="", so="d", sp="", rm="", of="id", ot="", as=0, p1="", f1="", m1="", op1="", p2="", f2="", m2="", op2="", p3="", f3="", m3="", sc=0, jrec=0, recid=-1, recidb=-1, sysno="", id=-1, idb=-1, sysnb="", action="", d1="", d1y=0, d1m=0, d1d=0, d2="", d2y=0, d2m=0, d2d=0, dt="", verbose=0, ap=0, ln=CFG_SITE_LANG, ec=None, tab=""): """Perform search or browse request, without checking for authentication. Return list of recIDs found, if of=id. Otherwise create web page. The arguments are as follows: req - mod_python Request class instance. cc - current collection (e.g. "ATLAS"). The collection the user started to search/browse from. c - collection list (e.g. ["Theses", "Books"]). The collections user may have selected/deselected when starting to search from 'cc'. p - pattern to search for (e.g. "ellis and muon or kaon"). f - field to search within (e.g. "author"). rg - records in groups of (e.g. "10"). Defines how many hits per collection in the search results page are displayed. sf - sort field (e.g. "title"). so - sort order ("a"=ascending, "d"=descending). sp - sort pattern (e.g. "CERN-") -- in case there are more values in a sort field, this argument tells which one to prefer rm - ranking method (e.g. "jif"). Defines whether results should be ranked by some known ranking method. of - output format (e.g. "hb"). Usually starting "h" means HTML output (and "hb" for HTML brief, "hd" for HTML detailed), "x" means XML output, "t" means plain text output, "id" means no output at all but to return list of recIDs found. (Suitable for high-level API.) ot - output only these MARC tags (e.g. "100,700,909C0b"). Useful if only some fields are to be shown in the output, e.g. for library to control some fields. as - advanced search ("0" means no, "1" means yes). Whether search was called from within the advanced search interface. p1 - first pattern to search for in the advanced search interface. Much like 'p'. f1 - first field to search within in the advanced search interface. Much like 'f'. m1 - first matching type in the advanced search interface. ("a" all of the words, "o" any of the words, "e" exact phrase, "p" partial phrase, "r" regular expression). op1 - first operator, to join the first and the second unit in the advanced search interface. ("a" add, "o" or, "n" not). p2 - second pattern to search for in the advanced search interface. Much like 'p'. f2 - second field to search within in the advanced search interface. Much like 'f'. m2 - second matching type in the advanced search interface. ("a" all of the words, "o" any of the words, "e" exact phrase, "p" partial phrase, "r" regular expression). op2 - second operator, to join the second and the third unit in the advanced search interface. ("a" add, "o" or, "n" not). p3 - third pattern to search for in the advanced search interface. Much like 'p'. f3 - third field to search within in the advanced search interface. Much like 'f'. m3 - third matching type in the advanced search interface. ("a" all of the words, "o" any of the words, "e" exact phrase, "p" partial phrase, "r" regular expression). sc - split by collection ("0" no, "1" yes). Governs whether we want to present the results in a single huge list, or splitted by collection. jrec - jump to record (e.g. "234"). Used for navigation inside the search results. recid - display record ID (e.g. "20000"). Do not search/browse but go straight away to the Detailed record page for the given recID. recidb - display record ID bis (e.g. "20010"). If greater than 'recid', then display records from recid to recidb. Useful for example for dumping records from the database for reformatting. sysno - display old system SYS number (e.g. ""). If you migrate to CDS Invenio from another system, and store your old SYS call numbers, you can use them instead of recid if you wish so. id - the same as recid, in case recid is not set. For backwards compatibility. idb - the same as recid, in case recidb is not set. For backwards compatibility. sysnb - the same as sysno, in case sysno is not set. For backwards compatibility. action - action to do. "SEARCH" for searching, "Browse" for browsing. Default is to search. d1 - first datetime in full YYYY-mm-dd HH:MM:DD format (e.g. "1998-08-23 12:34:56"). Useful for search limits on creation/modification date (see 'dt' argument below). Note that 'd1' takes precedence over d1y, d1m, d1d if these are defined. d1y - first date's year (e.g. "1998"). Useful for search limits on creation/modification date. d1m - first date's month (e.g. "08"). Useful for search limits on creation/modification date. d1d - first date's day (e.g. "23"). Useful for search limits on creation/modification date. d2 - second datetime in full YYYY-mm-dd HH:MM:DD format (e.g. "1998-09-02 12:34:56"). Useful for search limits on creation/modification date (see 'dt' argument below). Note that 'd2' takes precedence over d2y, d2m, d2d if these are defined. d2y - second date's year (e.g. "1998"). Useful for search limits on creation/modification date. d2m - second date's month (e.g. "09"). Useful for search limits on creation/modification date. d2d - second date's day (e.g. "02"). Useful for search limits on creation/modification date. dt - first and second date's type (e.g. "c"). Specifies whether to search in creation dates ("c") or in modification dates ("m"). When dt is not set and d1* and d2* are set, the default is "c". verbose - verbose level (0=min, 9=max). Useful to print some internal information on the searching process in case something goes wrong. ap - alternative patterns (0=no, 1=yes). In case no exact match is found, the search engine can try alternative patterns e.g. to replace non-alphanumeric characters by a boolean query. ap defines if this is wanted. ln - language of the search interface (e.g. "en"). Useful for internationalization. ec - list of external search engines to search as well (e.g. "SPIRES HEP"). """ selected_external_collections_infos = None # wash all arguments requiring special care try: (cc, colls_to_display, colls_to_search) = wash_colls(cc, c, sc) # which colls to search and to display? except InvenioWebSearchUnknownCollectionError, exc: colname = exc.colname if of.startswith("h"): page_start(req, of, cc, as, ln, getUid(req), websearch_templates.tmpl_collection_not_found_page_title(colname, ln)) req.write(websearch_templates.tmpl_collection_not_found_page_body(colname, ln)) return page_end(req, of, ln) elif of == "id": return [] elif of.startswith("x"): # Print empty, but valid XML print_records_prologue(req, of) print_records_epilogue(req, of) else: return page_end(req, of, ln) p = wash_pattern(p) f = wash_field(f) p1 = wash_pattern(p1) f1 = wash_field(f1) p2 = wash_pattern(p2) f2 = wash_field(f2) p3 = wash_pattern(p3) f3 = wash_field(f3) datetext1, datetext2 = wash_dates(d1, d1y, d1m, d1d, d2, d2y, d2m, d2d) _ = gettext_set_language(ln) # backwards compatibility: id, idb, sysnb -> recid, recidb, sysno (if applicable) if sysnb != "" and sysno == "": sysno = sysnb if id > 0 and recid == -1: recid = id if idb > 0 and recidb == -1: recidb = idb # TODO deduce passed search limiting criterias (if applicable) pl, pl_in_url = "", "" # no limits by default if action != "browse" and req and req.args: # we do not want to add options while browsing or while calling via command-line fieldargs = cgi.parse_qs(req.args) for fieldcode in get_fieldcodes(): if fieldargs.has_key(fieldcode): for val in fieldargs[fieldcode]: pl += "+%s:\"%s\" " % (fieldcode, val) pl_in_url += "&amp;%s=%s" % (urllib.quote(fieldcode), urllib.quote(val)) # deduce recid from sysno argument (if applicable): if sysno: # ALEPH SYS number was passed, so deduce DB recID for the record: recid = get_mysql_recid_from_aleph_sysno(sysno) if recid is None: recid = 0 # use recid 0 to indicate that this sysno does not exist # deduce collection we are in (if applicable): if recid > 0: cc = guess_primary_collection_of_a_record(recid) # deduce user id (if applicable): try: uid = getUid(req) except: uid = 0 ## 0 - start output if recid >= 0: # recid can be 0 if deduced from sysno and if such sysno does not exist ## 1 - detailed record display title, description, keywords = \ websearch_templates.tmpl_record_page_header_content(req, recid, ln) page_start(req, of, cc, as, ln, uid, title, description, keywords, recid, tab) # Default format is hb but we are in detailed -> change 'of' if of == "hb": of = "hd" if record_exists(recid): if recidb <= recid: # sanity check recidb = recid + 1 if of == "id": return [recidx for recidx in range(recid, recidb) if record_exists(recidx)] else: print_records(req, range(recid, recidb), -1, -9999, of, ot, ln, search_pattern=p, verbose=verbose, tab=tab) if req and of.startswith("h"): # register detailed record page view event client_ip_address = str(req.get_remote_host(apache.REMOTE_NOLOOKUP)) register_page_view_event(recid, uid, client_ip_address) else: # record does not exist if of == "id": return [] elif of.startswith("x"): # Print empty, but valid XML print_records_prologue(req, of) print_records_epilogue(req, of) elif of.startswith("h"): print_warning(req, _("Requested record does not seem to exist.")) elif action == "browse": ## 2 - browse needed page_start(req, of, cc, as, ln, uid, _("Browse")) if of.startswith("h"): req.write(create_search_box(cc, colls_to_display, p, f, rg, sf, so, sp, rm, of, ot, as, ln, p1, f1, m1, op1, p2, f2, m2, op2, p3, f3, m3, sc, pl, d1y, d1m, d1d, d2y, d2m, d2d, dt, jrec, ec, action)) try: if as == 1 or (p1 or p2 or p3): browse_pattern(req, colls_to_search, p1, f1, rg, ln) browse_pattern(req, colls_to_search, p2, f2, rg, ln) browse_pattern(req, colls_to_search, p3, f3, rg, ln) else: browse_pattern(req, colls_to_search, p, f, rg, ln) except: if of.startswith("h"): req.write(create_error_box(req, verbose=verbose, ln=ln)) elif of.startswith("x"): # Print empty, but valid XML print_records_prologue(req, of) print_records_epilogue(req, of) return page_end(req, of, ln) elif rm and p.startswith("recid:"): ## 3-ter - similarity search needed page_start(req, of, cc, as, ln, uid, _("Search Results")) if of.startswith("h"): req.write(create_search_box(cc, colls_to_display, p, f, rg, sf, so, sp, rm, of, ot, as, ln, p1, f1, m1, op1, p2, f2, m2, op2, p3, f3, m3, sc, pl, d1y, d1m, d1d, d2y, d2m, d2d, dt, jrec, ec, action)) if record_exists(p[6:]) != 1: # record does not exist if of.startswith("h"): print_warning(req, "Requested record does not seem to exist.") if of == "id": return [] elif of.startswith("x"): # Print empty, but valid XML print_records_prologue(req, of) print_records_epilogue(req, of) else: # record well exists, so find similar ones to it t1 = os.times()[4] results_similar_recIDs, results_similar_relevances, results_similar_relevances_prologue, results_similar_relevances_epilogue, results_similar_comments = \ rank_records(rm, 0, get_collection_reclist(cc), string.split(p), verbose) if results_similar_recIDs: t2 = os.times()[4] cpu_time = t2 - t1 if of.startswith("h"): req.write(print_search_info(p, f, sf, so, sp, rm, of, ot, cc, len(results_similar_recIDs), jrec, rg, as, ln, p1, p2, p3, f1, f2, f3, m1, m2, m3, op1, op2, sc, pl_in_url, d1y, d1m, d1d, d2y, d2m, d2d, dt, cpu_time)) print_warning(req, results_similar_comments) print_records(req, results_similar_recIDs, jrec, rg, of, ot, ln, results_similar_relevances, results_similar_relevances_prologue, results_similar_relevances_epilogue, search_pattern=p, verbose=verbose) elif of=="id": return results_similar_recIDs elif of.startswith("x"): print_records(req, results_similar_recIDs, jrec, rg, of, ot, ln, results_similar_relevances, results_similar_relevances_prologue, results_similar_relevances_epilogue, search_pattern=p, verbose=verbose) else: # rank_records failed and returned some error message to display: if of.startswith("h"): print_warning(req, results_similar_relevances_prologue) print_warning(req, results_similar_relevances_epilogue) print_warning(req, results_similar_comments) if of == "id": return [] elif of.startswith("x"): # Print empty, but valid XML print_records_prologue(req, of) print_records_epilogue(req, of) elif p.startswith("cocitedwith:"): #WAS EXPERIMENTAL ## 3-terter - cited by search needed page_start(req, of, cc, as, ln, uid, _("Search Results")) if of.startswith("h"): req.write(create_search_box(cc, colls_to_display, p, f, rg, sf, so, sp, rm, of, ot, as, ln, p1, f1, m1, op1, p2, f2, m2, op2, p3, f3, m3, sc, pl, d1y, d1m, d1d, d2y, d2m, d2d, dt, jrec, ec, action)) recID = p[12:] if record_exists(recID) != 1: # record does not exist if of.startswith("h"): print_warning(req, "Requested record does not seem to exist.") if of == "id": return [] elif of.startswith("x"): # Print empty, but valid XML print_records_prologue(req, of) print_records_epilogue(req, of) else: # record well exists, so find co-cited ones: t1 = os.times()[4] results_cocited_recIDs = map(lambda x: x[0], calculate_co_cited_with_list(int(recID))) if results_cocited_recIDs: t2 = os.times()[4] cpu_time = t2 - t1 if of.startswith("h"): req.write(print_search_info(p, f, sf, so, sp, rm, of, ot, CFG_SITE_NAME, len(results_cocited_recIDs), jrec, rg, as, ln, p1, p2, p3, f1, f2, f3, m1, m2, m3, op1, op2, sc, pl_in_url, d1y, d1m, d1d, d2y, d2m, d2d, dt, cpu_time)) print_records(req, results_cocited_recIDs, jrec, rg, of, ot, ln, search_pattern=p, verbose=verbose) elif of=="id": return results_cocited_recIDs elif of.startswith("x"): print_records(req, results_cocited_recIDs, jrec, rg, of, ot, ln, search_pattern=p, verbose=verbose) else: # cited rank_records failed and returned some error message to display: if of.startswith("h"): print_warning(req, "nothing found") if of == "id": return [] elif of.startswith("x"): # Print empty, but valid XML print_records_prologue(req, of) print_records_epilogue(req, of) else: ## 3 - common search needed page_start(req, of, cc, as, ln, uid, _("Search Results")) if of.startswith("h"): req.write(create_search_box(cc, colls_to_display, p, f, rg, sf, so, sp, rm, of, ot, as, ln, p1, f1, m1, op1, p2, f2, m2, op2, p3, f3, m3, sc, pl, d1y, d1m, d1d, d2y, d2m, d2d, dt, jrec, ec, action)) t1 = os.times()[4] results_in_any_collection = HitSet() if as == 1 or (p1 or p2 or p3): ## 3A - advanced search try: results_in_any_collection = search_pattern(req, p1, f1, m1, ap=ap, of=of, verbose=verbose, ln=ln) if len(results_in_any_collection) == 0: if of.startswith("h"): perform_external_collection_search(req, cc, [p, p1, p2, p3], f, ec, verbose, ln, selected_external_collections_infos) elif of.startswith("x"): # Print empty, but valid XML print_records_prologue(req, of) print_records_epilogue(req, of) return page_end(req, of, ln) if p2: results_tmp = search_pattern_parenthesised(req, p2, f2, m2, ap=ap, of=of, verbose=verbose, ln=ln) if op1 == "a": # add results_in_any_collection.intersection_update(results_tmp) elif op1 == "o": # or results_in_any_collection.union_update(results_tmp) elif op1 == "n": # not results_in_any_collection.difference_update(results_tmp) else: if of.startswith("h"): print_warning(req, "Invalid set operation %s." % op1, "Error") if len(results_in_any_collection) == 0: if of.startswith("h"): perform_external_collection_search(req, cc, [p, p1, p2, p3], f, ec, verbose, ln, selected_external_collections_infos) elif of.startswith("x"): # Print empty, but valid XML print_records_prologue(req, of) print_records_epilogue(req, of) return page_end(req, of, ln) if p3: results_tmp = search_pattern_parenthesised(req, p3, f3, m3, ap=ap, of=of, verbose=verbose, ln=ln) if op2 == "a": # add results_in_any_collection.intersection_update(results_tmp) elif op2 == "o": # or results_in_any_collection.union_update(results_tmp) elif op2 == "n": # not results_in_any_collection.difference_update(results_tmp) else: if of.startswith("h"): print_warning(req, "Invalid set operation %s." % op2, "Error") except: if of.startswith("h"): req.write(create_error_box(req, verbose=verbose, ln=ln)) perform_external_collection_search(req, cc, [p, p1, p2, p3], f, ec, verbose, ln, selected_external_collections_infos) elif of.startswith("x"): # Print empty, but valid XML print_records_prologue(req, of) print_records_epilogue(req, of) return page_end(req, of, ln) else: ## 3B - simple search try: results_in_any_collection = search_pattern_parenthesised(req, p, f, ap=ap, of=of, verbose=verbose, ln=ln) except: if of.startswith("h"): req.write(create_error_box(req, verbose=verbose, ln=ln)) perform_external_collection_search(req, cc, [p, p1, p2, p3], f, ec, verbose, ln, selected_external_collections_infos) return page_end(req, of, ln) if len(results_in_any_collection) == 0: if of.startswith("h"): perform_external_collection_search(req, cc, [p, p1, p2, p3], f, ec, verbose, ln, selected_external_collections_infos) elif of.startswith("x"): # Print empty, but valid XML print_records_prologue(req, of) print_records_epilogue(req, of) return page_end(req, of, ln)
78205486d85dc9cc3ce555a8deffec4f8aa9453f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2139/78205486d85dc9cc3ce555a8deffec4f8aa9453f/search_engine.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3073, 67, 2293, 67, 3072, 12, 3658, 33, 7036, 16, 4946, 33, 19727, 67, 20609, 67, 1985, 16, 276, 33, 7036, 16, 293, 1546, 3113, 284, 1546, 3113, 14524, 33, 2163, 16, 9033, 1546, 3113, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2293, 67, 3072, 12, 3658, 33, 7036, 16, 4946, 33, 19727, 67, 20609, 67, 1985, 16, 276, 33, 7036, 16, 293, 1546, 3113, 284, 1546, 3113, 14524, 33, 2163, 16, 9033, 1546, 3113, ...
raise unittest.SkipTest("test works only on NT+, and with " "pseudo-Unicode filesystems")
raise unittest.SkipTest("only NT+ and systems with Unicode" "-friendly filesystem encoding")
def setUp(self): try: os.mkdir(test_support.TESTFN) except OSError: pass for name in self.files: try: f = open(name, 'w') except UnicodeEncodeError: if not os.path.supports_unicode_filenames: raise unittest.SkipTest("test works only on NT+, and with " "pseudo-Unicode filesystems") f.write((name+'\n').encode("utf-8")) f.close() os.stat(name)
51aaeab0d84c1df13257fa790b9dc502f0ac6d5b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8125/51aaeab0d84c1df13257fa790b9dc502f0ac6d5b/test_pep277.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24292, 12, 2890, 4672, 775, 30, 1140, 18, 26686, 12, 3813, 67, 13261, 18, 16961, 19793, 13, 1335, 10002, 30, 1342, 364, 508, 316, 365, 18, 2354, 30, 775, 30, 284, 273, 1696, 12, 529, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24292, 12, 2890, 4672, 775, 30, 1140, 18, 26686, 12, 3813, 67, 13261, 18, 16961, 19793, 13, 1335, 10002, 30, 1342, 364, 508, 316, 365, 18, 2354, 30, 775, 30, 284, 273, 1696, 12, 529, ...
colors=OWGraphTools.ColorPaletteHSV(len(dist))
colors=OWColorPalette.ColorPaletteHSV(len(dist))
def setPie(self, attrIndex, size): for e in self.histObj: e.setCanvas(None) self.histObj=[] if len(self.node.examples)<0: return dist=orange.Distribution(attrIndex, self.node.examples) colors=OWGraphTools.ColorPaletteHSV(len(dist)) distSum=max(sum(dist),1) startAngle=0 for i in range(len(dist)): angle=360/distSum*dist[i]*16 c=QCanvasEllipse(size, size, startAngle, angle, self.canvas()) c.setBrush(QBrush(colors[i])) c.setZ(10) c.move(self.x(), self.y()) c.show() startAngle+=angle self.histObj.append(c)
2b9e0f59e61b45c73e7fedce237662c6ff50ea8c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6366/2b9e0f59e61b45c73e7fedce237662c6ff50ea8c/OWSOMVisualizer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17004, 1385, 12, 2890, 16, 1604, 1016, 16, 963, 4672, 364, 425, 316, 365, 18, 11488, 2675, 30, 425, 18, 542, 12971, 12, 7036, 13, 365, 18, 11488, 2675, 33, 8526, 309, 562, 12, 2890, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17004, 1385, 12, 2890, 16, 1604, 1016, 16, 963, 4672, 364, 425, 316, 365, 18, 11488, 2675, 30, 425, 18, 542, 12971, 12, 7036, 13, 365, 18, 11488, 2675, 33, 8526, 309, 562, 12, 2890, ...
def readmodule_ex(module, path=[]):
def readmodule_ex(module, path=None):
def readmodule_ex(module, path=[]): '''Read a module file and return a dictionary of classes. Search for MODULE in PATH and sys.path, read and parse the module and return a dictionary with one entry for each class found in the module. If INPACKAGE is true, it must be the dotted name of the package in which we are searching for a submodule, and then PATH must be the package search path; otherwise, we are searching for a top-level module, and PATH is combined with sys.path. ''' return _readmodule(module, path)
4b228016f7248c15c1df2d1be731768fca57d0ca /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12029/4b228016f7248c15c1df2d1be731768fca57d0ca/pyclbr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 2978, 67, 338, 12, 2978, 16, 589, 33, 7036, 4672, 9163, 1994, 279, 1605, 585, 471, 327, 279, 3880, 434, 3318, 18, 225, 5167, 364, 14057, 316, 7767, 471, 2589, 18, 803, 16, 855, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 2978, 67, 338, 12, 2978, 16, 589, 33, 7036, 4672, 9163, 1994, 279, 1605, 585, 471, 327, 279, 3880, 434, 3318, 18, 225, 5167, 364, 14057, 316, 7767, 471, 2589, 18, 803, 16, 855, ...
from types import StringType
def stringLine(line, length): "simple case: line with just strings and spacings which can be ignored" strings = [] from types import StringType for x in line: if type(x) is StringType: strings.append(x) text = string.join(strings) result = [text, float(length)] nextlinemark = ("nextLine", 0) if line and line[-1]==nextlinemark: result.append( nextlinemark ) return result
a9fe2a25d7fcc8f510447cdecc4f6473c43d80f7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/a9fe2a25d7fcc8f510447cdecc4f6473c43d80f7/para.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 533, 1670, 12, 1369, 16, 769, 4672, 315, 9647, 648, 30, 980, 598, 2537, 2064, 471, 1694, 1077, 899, 1492, 848, 506, 5455, 6, 2064, 273, 5378, 364, 619, 316, 980, 30, 309, 618, 12, 92...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 533, 1670, 12, 1369, 16, 769, 4672, 315, 9647, 648, 30, 980, 598, 2537, 2064, 471, 1694, 1077, 899, 1492, 848, 506, 5455, 6, 2064, 273, 5378, 364, 619, 316, 980, 30, 309, 618, 12, 92...
wikipedia.link2url(start)
start=link2url(start)
def allnlpages(start='%20%200'): wikipedia.link2url(start) m=0 while 1: text=wikipedia.getPage('nl','Speciaal:Allpages&printable=yes&from=%s'%start,do_quote=0,do_edit=0) #print text R=re.compile('/wiki/(.*?)" *class=[\'\"]printable') n=0 for hit in R.findall(text): if not ':' in hit: if not hit in ['Hoofdpagina','In_het_nieuws']: n=n+1 yield wikipedia.url2link(hit) start=hit+'%20%200' if n<100: break m=m+n sys.stderr.write('AllNLPages: %d done; continuing from "%s";\n'%(m,wikipedia.link2url(start)))
bfd79666aeda85c89eb6356290904952022367a1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4404/bfd79666aeda85c89eb6356290904952022367a1/wikipedia.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 777, 14039, 7267, 12, 1937, 28713, 3462, 9, 6976, 11, 4672, 787, 33, 1232, 22, 718, 12, 1937, 13, 312, 33, 20, 1323, 404, 30, 977, 33, 11999, 13744, 18, 588, 1964, 2668, 14039, 17023, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 777, 14039, 7267, 12, 1937, 28713, 3462, 9, 6976, 11, 4672, 787, 33, 1232, 22, 718, 12, 1937, 13, 312, 33, 20, 1323, 404, 30, 977, 33, 11999, 13744, 18, 588, 1964, 2668, 14039, 17023, ...
_files2 = """BigCancel.png BigCancel_pressed.png BigOK.png BigOK_pressed.png Cancel_pressed.png OK_Cancel.png OK_pressed.png""".split()
_files2 = """CancelBig.png CancelBig_Pressed.png DoneBig.png DoneBig_Pressed.png DoneSmall_Cancel_Pressed.png DoneSmall.png DoneSmall_Pressed.png """.split()
def test_translucent_icons(_files, _dir = ""): #e refile into images.py? (along with trans_image?) if type(_files) == type(""): # permit single file arg [untested, as is _dir = "" with os.path.join] _files = [_files] _tmp = DraggableObject(SimpleColumn(Image("blueflake.jpg", size = Rect(5)), TextRect("drag blueflake under icons to see\n" "their translucency over it")), translation = (0,0,0)) for _file, _i in zip(_files, range(len(_files))): _translation = (_i - 4) * 2.5 * DX # de-overlap them _tmp = Overlay( _tmp, Closer(DraggableObject( WithAttributes( trans_image( os.path.join( _dir, _file) ), mt_name = _file ), #e rename mt_name in this interface? (used by DraggableObject) translation = _translation)) ) _tmp = Overlay(_tmp, DraggableObject(SimpleColumn(Rect(5,5,red), TextRect("drag red rect under icons to see which\n" "pixels are highlightable/draggable\n" "(it's drawn so they'll obscure it fully)")), translation = (-6,-8,-10))) return _tmp
1a256aec4fb575ab447baadc78f41f03b80a7b56 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11221/1a256aec4fb575ab447baadc78f41f03b80a7b56/test.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 5379, 89, 2998, 67, 14516, 24899, 2354, 16, 389, 1214, 273, 1408, 4672, 468, 73, 283, 768, 1368, 4602, 18, 2074, 35, 261, 287, 932, 598, 906, 67, 2730, 8535, 309, 618, 24899,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 5379, 89, 2998, 67, 14516, 24899, 2354, 16, 389, 1214, 273, 1408, 4672, 468, 73, 283, 768, 1368, 4602, 18, 2074, 35, 261, 287, 932, 598, 906, 67, 2730, 8535, 309, 618, 24899,...
def __init__(self, host='', port=SIEVE_PORT):
def __init__(self, host='', port=SIEVE_PORT, use_tls=False, keyfile=None, certfile=None):
def __init__(self, host='', port=SIEVE_PORT): self.host = host self.port = port self.debug = Debug self.state = 'NONAUTH'
028da7fcb56493451b10ad62faa6fad2f23ade78 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9777/028da7fcb56493451b10ad62faa6fad2f23ade78/managesieve.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1479, 2218, 2187, 1756, 33, 2320, 41, 3412, 67, 6354, 16, 999, 67, 17116, 33, 8381, 16, 28632, 33, 7036, 16, 3320, 768, 33, 7036, 4672, 365, 18, 2564, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1479, 2218, 2187, 1756, 33, 2320, 41, 3412, 67, 6354, 16, 999, 67, 17116, 33, 8381, 16, 28632, 33, 7036, 16, 3320, 768, 33, 7036, 4672, 365, 18, 2564, ...
print 'server stopped'
pass
def server_activate(self): self.base.server_activate(self) if self.callback: self.callback()
c8867551cbacbd399ba1d7b4ce3738d629629967 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/c8867551cbacbd399ba1d7b4ce3738d629629967/pydoc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1438, 67, 10014, 12, 2890, 4672, 365, 18, 1969, 18, 3567, 67, 10014, 12, 2890, 13, 309, 365, 18, 3394, 30, 365, 18, 3394, 1435, 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, 1438, 67, 10014, 12, 2890, 4672, 365, 18, 1969, 18, 3567, 67, 10014, 12, 2890, 13, 309, 365, 18, 3394, 30, 365, 18, 3394, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
self.prevpbest[particle.pid] = particle.pbestval
self.iters_stagnant[particle.pid] = 0
def __call__(self, **kwds): best = kwds['best'] self.iters = kwds['iteration'] particles = kwds['particles'] if self.iters == 1: for particle in particles: self.prevpbest[particle.pid] = 0 stagnant = True for particle in particles: if particle.pbestval != self.prevpbest[particle.pid]: self.num_pbest_updates += 1 self.prevpbest[particle.pid] = particle.pbestval stagnant = False self.num_pbest_possible_updates += 1 if best.pbestval == self.last_val: self.not_updated += 1 if stagnant: self.stagnant_iters += 1 print self.iters, best.pbestval, 'Stagnant!' print self.iters, best.pbestval else: self.last_val = best.pbestval if best.pid in self.recentlyseen: self.recently_seen_changes += 1 if best.pid == self.bestpid: self.consistent_changes += 1 else: self.recentlyseen.append(best.pid) self.recentlyseen = self.recentlyseen[-self.num_recent:] self.bestpid = best.pid if best.pid not in self.counter: self.counter[best.pid] = 0 self.counter[best.pid] += 1 self.changes += 1 print self.iters, best.pbestval, best.pid
c073122bd7062775f03509342c521cb736323525 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/966/c073122bd7062775f03509342c521cb736323525/output.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 2826, 25577, 4672, 3796, 273, 17149, 3292, 12729, 3546, 365, 18, 27270, 273, 17149, 3292, 16108, 3546, 28312, 273, 17149, 3292, 2680, 8383, 3546, 309, 365, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 2826, 25577, 4672, 3796, 273, 17149, 3292, 12729, 3546, 365, 18, 27270, 273, 17149, 3292, 16108, 3546, 28312, 273, 17149, 3292, 2680, 8383, 3546, 309, 365, 1...
if record_id: picking_ids = picking_obj.search(cr, uid, [('pos_order', 'in',[record_id]), ('state', '=', 'done')])
if active_id: picking_ids = picking_obj.search(cr, uid, [('pos_order', 'in',[active_id]), ('state', '=', 'done')])
def create_returns2(self, cr, uid, ids, context): record_id = context.get('record_id', False) order_obj =self.pool.get('pos.order') line_obj = self.pool.get('pos.order.line') picking_obj = self.pool.get('stock.picking') stock_move_obj = self.pool.get('stock.move') property_obj= self.pool.get("ir.property") uom_obj =self. pool.get('product.uom') wf_service = netsvc.LocalService("workflow") #Todo :Need to clean the code if record_id: picking_ids = picking_obj.search(cr, uid, [('pos_order', 'in',[record_id]), ('state', '=', 'done')]) data=self.read(cr,uid,ids)[0] clone_list = [] date_cur=time.strftime('%Y-%m-%d')
1ec225ce8c6444f7d03770574c22a04544d34f5f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/1ec225ce8c6444f7d03770574c22a04544d34f5f/pos_return.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 6154, 22, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 819, 4672, 1409, 67, 350, 273, 819, 18, 588, 2668, 3366, 67, 350, 2187, 1083, 13, 1353, 67, 2603, 273, 2890, 18, 6011, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 6154, 22, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 819, 4672, 1409, 67, 350, 273, 819, 18, 588, 2668, 3366, 67, 350, 2187, 1083, 13, 1353, 67, 2603, 273, 2890, 18, 6011, ...