rem
stringlengths
1
226k
add
stringlengths
0
227k
context
stringlengths
6
326k
meta
stringlengths
143
403
input_ids
listlengths
256
256
attention_mask
listlengths
256
256
labels
listlengths
128
128
def activate(self, request):
def activate(self, request, postconverting=0):
def activate(self, request): Fetcher.activate(self, request) if not request.apFetcher: return
ba3d8721d8b906b93d571d1233bb0567d59ea911 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7531/ba3d8721d8b906b93d571d1233bb0567d59ea911/apt_proxy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10235, 12, 2890, 16, 590, 16, 1603, 6283, 310, 33, 20, 4672, 8065, 264, 18, 10014, 12, 2890, 16, 590, 13, 309, 486, 590, 18, 438, 16855, 30, 327, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10235, 12, 2890, 16, 590, 16, 1603, 6283, 310, 33, 20, 4672, 8065, 264, 18, 10014, 12, 2890, 16, 590, 13, 309, 486, 590, 18, 438, 16855, 30, 327, 2, -100, -100, -100, -100, -100, -10...
result['name'] = res.name
result['name'] = res.partner_ref
def product_id_change(self, cr, uid, ids, product, uom, qty=0, name='', type='out_invoice', partner_id=False, fposition_id=False, price_unit=False, address_invoice_id=False, context=None): if context is None: context = {} if not partner_id: raise osv.except_osv(_('No Partner Defined !'),_("You must first select a partner !") ) if not product: if type in ('in_invoice', 'in_refund'): return {'domain':{'product_uom':[]}} else: return {'value': {'price_unit': 0.0}, 'domain':{'product_uom':[]}} part = self.pool.get('res.partner').browse(cr, uid, partner_id) fpos = fposition_id and self.pool.get('account.fiscal.position').browse(cr, uid, fposition_id) or False
4fc1c14b335ea4a267b3a7341cbb729a30a31188 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/4fc1c14b335ea4a267b3a7341cbb729a30a31188/invoice.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3017, 67, 350, 67, 3427, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 3017, 16, 582, 362, 16, 26667, 33, 20, 16, 508, 2218, 2187, 618, 2218, 659, 67, 16119, 2187, 19170, 67, 350, 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, 3017, 67, 350, 67, 3427, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 3017, 16, 582, 362, 16, 26667, 33, 20, 16, 508, 2218, 2187, 618, 2218, 659, 67, 16119, 2187, 19170, 67, 350, 33, ...
rval.append('-Xlinker,-rpath,'+t[2:])
rval.append('-Wl,-rpath,'+t[2:])
def ldflags(libs=True, flags=False, libs_dir=False, include_dir=False): """Return a list of libraries against which an Op's object file should be linked to benefit from a BLAS implementation. Default: ['blas'], but configuration variable config.blas.ldflags overrides this. """ rval = [] if libs_dir: found_dyn=False dirs = [x[2:] for x in config.blas.ldflags.split() if x.startswith('-L')] libs = ldflags() for d in dirs: for f in os.listdir(d): if f.endswith('.so') or f.endswith('.dylib') or f.endswith('.dll'): if any([f.find(l)>=0 for l in libs]): found_dyn=True if not found_dyn and dirs: warning("We did not found a dynamic library into the library_dir of the library we use for blas. If you use ATLAS, make sure to compile it with dynamics library.") for t in config.blas.ldflags.split(): try: t0, t1, t2 = t[0:3] assert t0 == '-' except: raise ValueError('invalid token in config.blas.ldflags', t) if libs_dir and t1 == 'L': rval.append(t[2:]) elif include_dir and t1 == 'I': raise ValueError('Include dirs are not used for blas. We disable this as this can hide other headers and this is not wanted.', t) rval.append(t[2:]) elif libs and t1=='l': # example -lmkl rval.append(t[2:]) elif flags and t1 not in ['L','I','l']: # example -openmp rval.append(t) elif flags and t1 == 'L': #to find it when we load the compiled op if the env of the used is not well configured. rval.append('-Xlinker,-rpath,'+t[2:]) return rval
789f36a5e617e87c6833dd4cabe0942891559b38 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12438/789f36a5e617e87c6833dd4cabe0942891559b38/blas.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 328, 2180, 80, 1341, 12, 21571, 33, 5510, 16, 2943, 33, 8381, 16, 15042, 67, 1214, 33, 8381, 16, 2341, 67, 1214, 33, 8381, 4672, 3536, 990, 279, 666, 434, 14732, 5314, 1492, 392, 6066,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 328, 2180, 80, 1341, 12, 21571, 33, 5510, 16, 2943, 33, 8381, 16, 15042, 67, 1214, 33, 8381, 16, 2341, 67, 1214, 33, 8381, 4672, 3536, 990, 279, 666, 434, 14732, 5314, 1492, 392, 6066,...
maxLogLength: [Optional] An integer option. Default 0. The number of lines of internal state to save. rssdler keeps all messages that could possibly be printed in an internal class (_sharedData). If you leave it running, oh, for say a month or two (yes, I have seen it run that long without crashing). It can grow rather large. Setting this to a positive number will limit the length of the internal state to about the number of lines you specify. This is especially useful in case you are running on a platform with minimal memory available. However, the lower you set the number above 0, the more likely you are to get repeat error messages.
maxLogLength: [Optional] An integer option. Default 100. The number of lines of internal state to save. rssdler keeps all messages that could possibly be printed in an internal class (_sharedData). If you leave it running, oh, for say a month or two (yes, I have seen it run that long without crashing). It can grow rather large. Setting this to a positive number will limit the length of the internal state to about the number of lines you specify. This is especially useful in case you are running on a platform with minimal memory available. However, the lower you set the number above 0, the more likely you are to get repeat error messages.
def delItem(self, x=0): u"""returns what should be the last added item to the rss feed. Or specify which item to return""" if self.itemsQuaDictBool: self.itemsQuaDict.pop(x) else: self.items.pop(x)
05a7e8b80ca19befcbd0555d2e6932c615c48842 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1664/05a7e8b80ca19befcbd0555d2e6932c615c48842/rssdler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1464, 1180, 12, 2890, 16, 619, 33, 20, 4672, 582, 8395, 6154, 4121, 1410, 506, 326, 1142, 3096, 761, 358, 326, 18817, 4746, 18, 2965, 4800, 1492, 761, 358, 327, 8395, 309, 365, 18, 331...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1464, 1180, 12, 2890, 16, 619, 33, 20, 4672, 582, 8395, 6154, 4121, 1410, 506, 326, 1142, 3096, 761, 358, 326, 18817, 4746, 18, 2965, 4800, 1492, 761, 358, 327, 8395, 309, 365, 18, 331...
"""Returns a dict relating user IDs to usernames"""
'''Returns a dict relating user IDs to usernames'''
def user_id(self): """Returns a dict relating user IDs to usernames""" request = self.send_request('json/user_id', auth=True) return request['people']
5dcaa033d0134f79f4c175eee4ebed39f9279f6f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9952/5dcaa033d0134f79f4c175eee4ebed39f9279f6f/fas2.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 729, 67, 350, 12, 2890, 4672, 9163, 1356, 279, 2065, 1279, 1776, 729, 7115, 358, 27675, 26418, 590, 273, 365, 18, 4661, 67, 2293, 2668, 1977, 19, 1355, 67, 350, 2187, 1357, 33, 5510, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 729, 67, 350, 12, 2890, 4672, 9163, 1356, 279, 2065, 1279, 1776, 729, 7115, 358, 27675, 26418, 590, 273, 365, 18, 4661, 67, 2293, 2668, 1977, 19, 1355, 67, 350, 2187, 1357, 33, 5510, 1...
'Content-Type: %s\nContent-Length: %d\nLast-modified: %s\n' %
'Content-type: %s\nContent-length: %d\nLast-modified: %s\n' %
def open_local_file(self, req): host = req.get_host() file = req.get_selector() localfile = url2pathname(file) stats = os.stat(localfile) size = stats.st_size modified = rfc822.formatdate(stats.st_mtime) mtype = mimetypes.guess_type(file)[0] headers = mimetools.Message(StringIO( 'Content-Type: %s\nContent-Length: %d\nLast-modified: %s\n' % (mtype or 'text/plain', size, modified))) if host: host, port = splitport(host) if not host or \ (not port and socket.gethostbyname(host) in self.get_names()): return addinfourl(open(localfile, 'rb'), headers, 'file:'+file) raise URLError('file not on local host')
78369cba63bbebebc5a0d9d184eb858f3ea1268a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/78369cba63bbebebc5a0d9d184eb858f3ea1268a/urllib2.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1696, 67, 3729, 67, 768, 12, 2890, 16, 1111, 4672, 1479, 273, 1111, 18, 588, 67, 2564, 1435, 585, 273, 1111, 18, 588, 67, 9663, 1435, 1191, 768, 273, 880, 22, 28336, 12, 768, 13, 317...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1696, 67, 3729, 67, 768, 12, 2890, 16, 1111, 4672, 1479, 273, 1111, 18, 588, 67, 2564, 1435, 585, 273, 1111, 18, 588, 67, 9663, 1435, 1191, 768, 273, 880, 22, 28336, 12, 768, 13, 317...
FL_Coord, STRING, FL_HANDLEPTR],
FL_Coord, STRING, FL_HANDLEPTR],
def fl_create_free(type, x, y, w, h, label, py_handle): """ fl_create_free(type, x, y, w, h, label, py_handle) -> object """ c_handle = FL_HANDLEPTR(py_handle) _cfunc_refs[get_rand_dictkey()] = c_handle retval = _fl_create_free(type, x, y, w, h, label, c_handle) return retval
9942dac8ce2b35a1e43615a26fd8e7054ef805d3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2429/9942dac8ce2b35a1e43615a26fd8e7054ef805d3/xformslib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1183, 67, 2640, 67, 9156, 12, 723, 16, 619, 16, 677, 16, 341, 16, 366, 16, 1433, 16, 2395, 67, 4110, 4672, 3536, 1183, 67, 2640, 67, 9156, 12, 723, 16, 619, 16, 677, 16, 341, 16, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1183, 67, 2640, 67, 9156, 12, 723, 16, 619, 16, 677, 16, 341, 16, 366, 16, 1433, 16, 2395, 67, 4110, 4672, 3536, 1183, 67, 2640, 67, 9156, 12, 723, 16, 619, 16, 677, 16, 341, 16, ...
tk=numpy.array(tk) tk_pr=numpy.array(tk_pr) tk_po=numpy.array(tk_po)
if type(split_str) in [list,numpy.ndarray,numpy.matrix]: split_str=', '.join([str(i) for i in split_str]) else: split_str=str(split_str)
def reduce_split_str(split_str): tk=[] tk_sort=[] tk_pr=[] tk_po=[] split_str=str(split_str) tk_split=re.findall("(^|,)(\d+:\d+)|(\d+)",split_str) for i in range(len(tk_split)): if tk_split[i][2]!='': tk.append(tk_split[i][2]) tk_pr.append(int(tk[-1])) tk_po.append(int(tk[-1])+1) if tk_split[i][1]!='': tk.append(tk_split[i][1]) tk_pr.append(int(tk[-1].split(":")[0])) tk_po.append(int(tk[-1].split(":")[1])) tk=numpy.array(tk) tk_pr=numpy.array(tk_pr) tk_po=numpy.array(tk_po) sindex=tk_pr.argsort() tk=tk[sindex] tk_pr=tk_pr[sindex] tk_po=tk_po[sindex] if len(tk) == 1: return tk tk_reduce=[] akt=0 red_ind=0 aktstr=str(tk_pr[0]) for i in range(1,len(tk)): if (tk_pr[i]==tk_po[i-1]): akt+=1 else: if akt>0: aktstr+=":"+str(tk_po[i-1]) tk_reduce.append(aktstr) aktstr=str(tk_pr[i]) akt=0 else: tk_reduce.append(tk[i-1]) aktstr=str(tk_pr[i]) if i==len(tk)-1: if akt>0: aktstr+=":"+str(tk_po[i]) tk_reduce.append(aktstr) aktstr=tk_pr[i] else: tk_reduce.append(tk[i]) return tk_reduce
76bd12c9f0f970ec39e56fe35c8c6964ae612c86 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12567/76bd12c9f0f970ec39e56fe35c8c6964ae612c86/indexsplit.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5459, 67, 4939, 67, 701, 12, 4939, 67, 701, 4672, 13030, 33, 8526, 13030, 67, 3804, 33, 8526, 13030, 67, 683, 33, 8526, 13030, 67, 1631, 33, 8526, 1416, 67, 701, 33, 701, 12, 4939, 6...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5459, 67, 4939, 67, 701, 12, 4939, 67, 701, 4672, 13030, 33, 8526, 13030, 67, 3804, 33, 8526, 13030, 67, 683, 33, 8526, 13030, 67, 1631, 33, 8526, 1416, 67, 701, 33, 701, 12, 4939, 6...
2.0000000000000000000000000000000
2.0000000000000000000000000000
def real(self): """ Return real part of self.
193380da4580283517e8b5d85f0bf8d1c6d47fce /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9890/193380da4580283517e8b5d85f0bf8d1c6d47fce/complex_number.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2863, 12, 2890, 4672, 3536, 2000, 2863, 1087, 434, 365, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2863, 12, 2890, 4672, 3536, 2000, 2863, 1087, 434, 365, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
print(to_mult);
def PhiJK(j,k,(r_t,q_bb,q_b_arrow_t,q_bt),sigma): """ PhiJK is defined in Equation 29 This is a helper function to ProbKMigrationInL Input Parameters ---------------- @param j the input to Phi will be j-1 @param k The number of migrations within the level @param (r_t,q_bb,q_b_arrow_t,q_bt) the (r_t,q_bb,q_b_arrow_t,q_bt) tuple before the first migration within the level See ForwardRateSTT for more details @param sigma sigma =(lambda, b, B, alpha, mu), where lambda is the turnover rate in state 0 (the boreal region), b = the effective migration rate from state 0 to 1 (boreal to tropical), B = the total number of species in state 0 (the boreal region) alpha = the per lineage speciation rate in state 1 (the neotropical region), and mu = the per lineage extinction rate in state 1 (the neotropical region). """ product=1 if(j==1): product=1 else: for i in range(1,j): to_mult=(Phi(i,(r_t,q_bb,q_b_arrow_t,q_bt),sigma)-Phi(j,(r_t,q_bb,q_b_arrow_t,q_bt),sigma)); print(to_mult); product=product*to_mult; if(j!=k): for i in range(j+1,k+1): to_mult=(Phi(i,(r_t,q_bb,q_b_arrow_t,q_bt),sigma)-Phi(j,(r_t,q_bb,q_b_arrow_t,q_bt),sigma)) print(to_mult); product=product*to_mult; return pow(product,-1)
5299f9ed882716927e9e56c1e7b5b931e25ae9e1 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7945/5299f9ed882716927e9e56c1e7b5b931e25ae9e1/is_likelihood.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4360, 77, 19474, 12, 78, 16, 79, 16, 12, 86, 67, 88, 16, 85, 67, 9897, 16, 85, 67, 70, 67, 7815, 67, 88, 16, 85, 67, 23602, 3631, 13201, 4672, 3536, 4360, 77, 19474, 353, 2553, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4360, 77, 19474, 12, 78, 16, 79, 16, 12, 86, 67, 88, 16, 85, 67, 9897, 16, 85, 67, 70, 67, 7815, 67, 88, 16, 85, 67, 23602, 3631, 13201, 4672, 3536, 4360, 77, 19474, 353, 2553, 3...
default = errno.EINVAL errors = {} for i in range(1, 65000): error = dosmaperr(i) if error != default: errors[i] = error return errors, default
from pypy.translator.platform import platform, Windows static_platform = Windows() if static_platform.name == 'msvc': static_platform.cflags = ['/MT'] static_platform.version = 0 cfile = udir.join('dosmaperr.c') cfile.write(r''' int main() { int i; for(i=1; i < 65000; i++) { _dosmaperr(i); if (errno == EINVAL) continue; printf("%d\t%d\n", i, errno); } return 0; }''') exename = static_platform.compile( [cfile], ExternalCompilationInfo(), outputfilename = "dosmaperr", standalone=True) output = os.popen(str(exename)) errors = dict(map(int, line.split()) for line in output) return errors, errno.EINVAL
def build_winerror_to_errno(): """Build a dictionary mapping windows error numbers to POSIX errno. The function returns the dict, and the default value for codes not in the dict.""" default = errno.EINVAL errors = {} for i in range(1, 65000): error = dosmaperr(i) if error != default: errors[i] = error return errors, default
899d6831443f801a1eed3fd240039a8fca1cf3db /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6934/899d6831443f801a1eed3fd240039a8fca1cf3db/rwin32.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 67, 8082, 1636, 67, 869, 67, 19088, 13332, 3536, 3116, 279, 3880, 2874, 9965, 555, 5600, 358, 13803, 31773, 8402, 18, 1021, 445, 1135, 326, 2065, 16, 471, 326, 805, 460, 364, 6198,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 67, 8082, 1636, 67, 869, 67, 19088, 13332, 3536, 3116, 279, 3880, 2874, 9965, 555, 5600, 358, 13803, 31773, 8402, 18, 1021, 445, 1135, 326, 2065, 16, 471, 326, 805, 460, 364, 6198,...
enumerated = self.callbacks["get_opt"]("tags_enumerated") == "True"
enumerated = self.callbacks["get_opt"]("taglist.tags_enumerated") == "True"
def render_header(self, mwidth, pad): enumerated = self.callbacks["get_opt"]("tags_enumerated") == "True" header = self.tag + u"\n" if enumerated: curtags = self.callbacks["get_var"]("curtags") header = ("[%d] " % curtags.index(self)) + header
1df1967abfb12be3eadd6e023af62b1d6307acd5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12358/1df1967abfb12be3eadd6e023af62b1d6307acd5/tag.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 67, 3374, 12, 2890, 16, 312, 2819, 16, 4627, 4672, 3557, 690, 273, 365, 18, 13316, 9614, 588, 67, 3838, 11929, 2932, 2692, 1098, 18, 4156, 67, 7924, 19007, 7923, 422, 315, 5510, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 67, 3374, 12, 2890, 16, 312, 2819, 16, 4627, 4672, 3557, 690, 273, 365, 18, 13316, 9614, 588, 67, 3838, 11929, 2932, 2692, 1098, 18, 4156, 67, 7924, 19007, 7923, 422, 315, 5510, ...
else
else:
def __init__(data = None) if data == None: quickfix.DoubleField.__init__(self, 662) else quickfix.DoubleField.__init__(self, 662, 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, 13, 309, 501, 422, 599, 30, 9549, 904, 18, 5265, 974, 16186, 2738, 972, 12, 2890, 16, 1666, 8898, 13, 469, 30, 9549, 904, 18, 5265, 974, 16186, 27...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 892, 273, 599, 13, 309, 501, 422, 599, 30, 9549, 904, 18, 5265, 974, 16186, 2738, 972, 12, 2890, 16, 1666, 8898, 13, 469, 30, 9549, 904, 18, 5265, 974, 16186, 27...
if dist >= maxDist:
if dist >= maxDist and p != q:
def createCentroid(point): centroid = Centroid() centroid.addMember(point) self.__centroidByEvent[point] = centroid self.__centroids.append(centroid)
8209e9553361f0dc2871191b642fb9e3c4db905b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7300/8209e9553361f0dc2871191b642fb9e3c4db905b/clusteredEventList.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 15897, 5560, 12, 1153, 4672, 16767, 273, 22321, 5560, 1435, 16767, 18, 1289, 4419, 12, 1153, 13, 365, 16186, 2998, 5560, 858, 1133, 63, 1153, 65, 273, 16767, 365, 16186, 2998, 17694, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 752, 15897, 5560, 12, 1153, 4672, 16767, 273, 22321, 5560, 1435, 16767, 18, 1289, 4419, 12, 1153, 13, 365, 16186, 2998, 5560, 858, 1133, 63, 1153, 65, 273, 16767, 365, 16186, 2998, 17694, ...
this = apply(_quickfix.new_ContraLegRefID, args)
this = _quickfix.new_ContraLegRefID(*args)
def __init__(self, *args): this = apply(_quickfix.new_ContraLegRefID, 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, 442, 2033, 8329, 1957, 734, 30857, 1968, 13, 775, 30, 365, 18, 2211, 18, 6923, 12, 2211, 13, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 442, 2033, 8329, 1957, 734, 30857, 1968, 13, 775, 30, 365, 18, 2211, 18, 6923, 12, 2211, 13, ...
andi t3, t3, 2 or reg, reg, t3
andi t4, t3, 2, flags=(EZF,) or reg, reg, t4 mov t1, t1, t3, flags=(nCEZF,)
def macroop BSF_R_P { rdip t7 mov t1, t1, t0, dataSize=8 ld t1, seg, riprel, disp # Determine if the input was zero, and also move it to a temp reg. and t1, t1, t1, flags=(ZF,) bri t0, label("end"), flags=(CZF,) # Zero out the result register mov reg, reg, t0 subi t2, t1, 1 xor t1, t2, t1 # Bit 6 srli t3, t1, 32, dataSize=8 andi t3, t3, 32 or reg, reg, t3 # Bit 5 srli t3, t1, 16, dataSize=8 andi t3, t3, 16 or reg, reg, t3 # Bit 4 srli t3, t1, 8, dataSize=8 andi t3, t3, 8 or reg, reg, t3 # Bit 3 srli t3, t1, 4, dataSize=8 andi t3, t3, 4 or reg, reg, t3 # Bit 2 srli t3, t1, 2, dataSize=8 andi t3, t3, 2 or reg, reg, t3 # Bit 1 srli t3, t1, 1, dataSize=8 andi t3, t3, 1 or reg, reg, t3
8e2991b529fd63f4d7c56518ebfbd2424f964172 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6787/8e2991b529fd63f4d7c56518ebfbd2424f964172/bit_scan.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11522, 556, 605, 22395, 67, 54, 67, 52, 288, 225, 9437, 625, 268, 27, 5730, 268, 21, 16, 268, 21, 16, 268, 20, 16, 30216, 33, 28, 16916, 268, 21, 16, 2291, 16, 436, 625, 2878, 16, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11522, 556, 605, 22395, 67, 54, 67, 52, 288, 225, 9437, 625, 268, 27, 5730, 268, 21, 16, 268, 21, 16, 268, 20, 16, 30216, 33, 28, 16916, 268, 21, 16, 2291, 16, 436, 625, 2878, 16, ...
self._edit_sensitive += 1 if self._edit_sensitive == 2: self.activity.set_edit_sensitive(True) def _article_deleted_cb(self, abook, article, notebook): if abook.map: return notebook.set_current_page(1) self._edit_sensitive -= 1 self.activity.set_edit_sensitive(False)
def _article_deleted_cb(self, abook, article, notebooks): if not abook.map: notebooks[0].set_current_page(0) self.activity.set_edit_sensitive(False)
def _article_selected_cb(self, book, article, notebook, article_widget): notebook.set_current_page(0) article_widget.textbox.set_article(article)
e1da2477f69248320d33906c1bee515b73201170 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5598/e1da2477f69248320d33906c1bee515b73201170/library.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 11480, 67, 8109, 67, 7358, 12, 2890, 16, 6978, 16, 7559, 16, 14718, 16, 7559, 67, 6587, 4672, 14718, 18, 542, 67, 2972, 67, 2433, 12, 20, 13, 7559, 67, 6587, 18, 955, 2147, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 11480, 67, 8109, 67, 7358, 12, 2890, 16, 6978, 16, 7559, 16, 14718, 16, 7559, 67, 6587, 4672, 14718, 18, 542, 67, 2972, 67, 2433, 12, 20, 13, 7559, 67, 6587, 18, 955, 2147, 18, ...
b = bytearray()
b = self.type2test()
def test_empty_sequence(self): b = bytearray() self.assertEqual(len(b), 0) self.assertRaises(IndexError, lambda: b[0]) self.assertRaises(IndexError, lambda: b[1]) self.assertRaises(IndexError, lambda: b[sys.maxsize]) self.assertRaises(IndexError, lambda: b[sys.maxsize+1]) self.assertRaises(IndexError, lambda: b[10**100]) self.assertRaises(IndexError, lambda: b[-1]) self.assertRaises(IndexError, lambda: b[-2]) self.assertRaises(IndexError, lambda: b[-sys.maxsize]) self.assertRaises(IndexError, lambda: b[-sys.maxsize-1]) self.assertRaises(IndexError, lambda: b[-sys.maxsize-2]) self.assertRaises(IndexError, lambda: b[-10**100])
ee68bbafb3455a5d2d59063851393925977e8adc /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12029/ee68bbafb3455a5d2d59063851393925977e8adc/test_bytes.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 5531, 67, 6178, 12, 2890, 4672, 324, 273, 365, 18, 723, 22, 3813, 1435, 365, 18, 11231, 5812, 12, 1897, 12, 70, 3631, 374, 13, 365, 18, 11231, 12649, 6141, 12, 1016, 668, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 5531, 67, 6178, 12, 2890, 4672, 324, 273, 365, 18, 723, 22, 3813, 1435, 365, 18, 11231, 5812, 12, 1897, 12, 70, 3631, 374, 13, 365, 18, 11231, 12649, 6141, 12, 1016, 668, 1...
r""" Factorial numbers: $n! = 1 \cdot 2 \cdot 3 \cdots n$ Order of symmetric group $S_n$, number of permutations of $n$ letters. INPUT: n -- non negative integer OUTPUT: integer -- function value EXAMPLES: sage: a = sloane.A000142;a Factorial numbers: n! = 1*2*3*4*...*n (order of symmetric group S_n, number of permutations of n letters). sage: a(0) 1 sage: a(8) 40320 sage: a(40) 815915283247897734345611269596115894272000000000 sage: a.list(9) [1, 1, 2, 6, 24, 120, 720, 5040, 40320] AUTHOR: -- Jaap Spies (2007-01-12) """ def __init__(self):
def __init__(self): r""" Factorial numbers: $n! = 1 \cdot 2 \cdot 3 \cdots n$ Order of symmetric group $S_n$, number of permutations of $n$ letters. INPUT: n -- non negative integer OUTPUT: integer -- function value EXAMPLES: sage: a = sloane.A000142;a Factorial numbers: n! = 1*2*3*4*...*n (order of symmetric group S_n, number of permutations of n letters). sage: a(0) 1 sage: a(8) 40320 sage: a(40) 815915283247897734345611269596115894272000000000 sage: a.list(9) [1, 1, 2, 6, 24, 120, 720, 5040, 40320] AUTHOR: -- Jaap Spies (2007-01-12) """
def _eval(self, n): return Integer(n**4)
d2510d4232e17c9cea8d1a0271c6be68a81d317b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/d2510d4232e17c9cea8d1a0271c6be68a81d317b/sloane_functions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8622, 12, 2890, 16, 290, 4672, 327, 2144, 12, 82, 636, 24, 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, 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, 389, 8622, 12, 2890, 16, 290, 4672, 327, 2144, 12, 82, 636, 24, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
print "In %s" % lookup
def filter(self, *args, **kwargs): qs = self.get_query_set().filter(*args) cls = self.model for lookup, value in kwargs.items(): print "In %s" % lookup updated_lookup, extra_filters = expand_filter_string(lookup, cls) print "Out %s %s" % (updated_lookup, extra_filters) extra_filters.update({updated_lookup: value}) qs = qs.filter(**extra_filters) return qs
80bcb8cdf204c11474b82854d6a035496850d03d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11809/80bcb8cdf204c11474b82854d6a035496850d03d/managers.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1034, 12, 2890, 16, 380, 1968, 16, 2826, 4333, 4672, 8719, 273, 365, 18, 588, 67, 2271, 67, 542, 7675, 2188, 30857, 1968, 13, 2028, 273, 365, 18, 2284, 364, 3689, 16, 460, 316, 1205, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1034, 12, 2890, 16, 380, 1968, 16, 2826, 4333, 4672, 8719, 273, 365, 18, 588, 67, 2271, 67, 542, 7675, 2188, 30857, 1968, 13, 2028, 273, 365, 18, 2284, 364, 3689, 16, 460, 316, 1205, ...
def __init__(data = None)
def __init__(data = None):
def __init__(data = None) if data == None: quickfix.StringField.__init__(self, 551) else quickfix.StringField.__init__(self, 551, 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, 1381, 10593, 13, 469, 9549, 904, 18, 780, 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, 780, 974, 16186, 2738, 972, 12, 2890, 16, 1381, 10593, 13, 469, 9549, 904, 18, 780, 974, 16186, 2738, ...
self.opts.log.info(self.updateProgressFullStep("generateNCXHeader()"))
self.updateProgressFullStep("NCX header")
def generateNCXHeader(self):
1ce23c231468dc03709ee76c7da814fa41c6e4a7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9125/1ce23c231468dc03709ee76c7da814fa41c6e4a7/catalog.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 10346, 60, 1864, 12, 2890, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 10346, 60, 1864, 12, 2890, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
outP = self.__E2.change_ring(output_base_ring)(outP)
outE2 = self.__E2.change_ring(output_base_ring)
def __call__(self, P, output_base_ring=None): r""" Function that implements the call-ability of elliptic curve isogenies.
d8b812384321cf00512524bf05863ee5a747c2fc /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/d8b812384321cf00512524bf05863ee5a747c2fc/ell_curve_isogeny.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 453, 16, 876, 67, 1969, 67, 8022, 33, 7036, 4672, 436, 8395, 4284, 716, 4792, 326, 745, 17, 2967, 434, 415, 549, 21507, 8882, 353, 19409, 606, 18, 2, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1001, 1991, 972, 12, 2890, 16, 453, 16, 876, 67, 1969, 67, 8022, 33, 7036, 4672, 436, 8395, 4284, 716, 4792, 326, 745, 17, 2967, 434, 415, 549, 21507, 8882, 353, 19409, 606, 18, 2, -...
from FilterStrainSNPMatrix import FilterStrainSNPMatrix FilterStrainSNPMatrix_instance = FilterStrainSNPMatrix() header, strain_acc_list, category_list, data_matrix = FilterStrainSNPMatrix_instance.read_data(self.input_fname, int(self.nt_alphabet_bits[0]))
header, strain_acc_list, category_list, data_matrix = read_data(self.input_fname, int(self.nt_alphabet_bits[0]))
def run(self): """ 2007-08-13 """ from FilterStrainSNPMatrix import FilterStrainSNPMatrix FilterStrainSNPMatrix_instance = FilterStrainSNPMatrix() header, strain_acc_list, category_list, data_matrix = FilterStrainSNPMatrix_instance.read_data(self.input_fname, int(self.nt_alphabet_bits[0])) data_matrix = Numeric.array(data_matrix) if self.debug: import pdb pdb.set_trace() s_estimate_result_instance = self.estimate_method[self.which_method](data_matrix) self.write_result(self.output_fname, s_estimate_result_instance) import re pop_number_pattern = re.compile('\d+$') #the trailing number in the input_fname is population number if pop_number_pattern.search(self.input_fname): pop_number = pop_number_pattern.search(self.input_fname).group() else: pop_number = '00' if s_estimate_result_instance.selfing_rate_vector: pylab.title("histogram of selfing rate. pop %s"%pop_number) pylab.hist(s_estimate_result_instance.selfing_rate_vector, 20) pylab.savefig('%s.png'%self.output_fname) if self.commit: if pop_number=='00': sys.stderr.write("Can't infer pop_number from input_fname. Exit!\n") sys.exit(1) if not self.selfing_rate_table: sys.stderr.write("Need to specify selfing_rate_table. Exit!\n") sys.exit(1) import MySQLdb conn = MySQLdb.connect(db=self.dbname,host=self.hostname) curs = conn.cursor() self.submit_to_table(curs, self.selfing_rate_table, s_estimate_result_instance, pop_number, self.method2table_entry, self.which_method)
6273ac84acfe2ee45dc7cd3c2efc3b4a466b2bde /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9645/6273ac84acfe2ee45dc7cd3c2efc3b4a466b2bde/EstimateSelfingRate.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 3536, 4044, 27, 17, 6840, 17, 3437, 3536, 1446, 16, 16853, 67, 8981, 67, 1098, 16, 3150, 67, 1098, 16, 501, 67, 5667, 273, 855, 67, 892, 12, 2890, 18, 2630, 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, 1086, 12, 2890, 4672, 3536, 4044, 27, 17, 6840, 17, 3437, 3536, 1446, 16, 16853, 67, 8981, 67, 1098, 16, 3150, 67, 1098, 16, 501, 67, 5667, 273, 855, 67, 892, 12, 2890, 18, 2630, 67,...
if order.invoice_id and order.invoice_id not in iids: if not order.invoice_id: raise osv.except_osv(_('Error !'), _('Please create an invoice for this sale.')) iids.append(order.invoice_id) nids.append(order.invoice_id.id)
order.write({'nb_print': order.nb_print + 1}) if order.invoice_id and order.invoice_id not in iids: if not order.invoice_id: raise osv.except_osv(_('Error !'), _('Please create an invoice for this sale.')) iids.append(order.invoice_id) nids.append(order.invoice_id.id)
def set_context(self, objects, data, ids, report_type=None): super(pos_invoice, self).set_context(objects, data, ids, report_type) iids = [] nids = []
1f5c37ee327989ca148f5c870f8551048eaa8698 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/1f5c37ee327989ca148f5c870f8551048eaa8698/pos_invoice.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 2472, 12, 2890, 16, 2184, 16, 501, 16, 3258, 16, 2605, 67, 723, 33, 7036, 4672, 2240, 12, 917, 67, 16119, 16, 365, 2934, 542, 67, 2472, 12, 6911, 16, 501, 16, 3258, 16, 26...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 2472, 12, 2890, 16, 2184, 16, 501, 16, 3258, 16, 2605, 67, 723, 33, 7036, 4672, 2240, 12, 917, 67, 16119, 16, 365, 2934, 542, 67, 2472, 12, 6911, 16, 501, 16, 3258, 16, 26...
[bundles, groups] = self.groups[self.default]
[bundles, groups, categories] = self.groups[self.default]
def get_metadata(self, client): '''Return the metadata for a given client''' if self.aliases.has_key(client): client = self.aliases[client] if self.clients.has_key(client): (bundles, groups, categories) = self.groups[self.clients[client]] else: if self.default == None: self.logger.error("Cannot set group for client %s; no default group set" % (client)) raise MetadataConsistencyError [bundles, groups] = self.groups[self.default] toolinfo = [self.toolsets[group] for group in groups if self.toolsets.has_key(group)] if len(toolinfo) > 1: self.logger.error("Found multiple toolsets for client %s; choosing one" % (client)) elif len(toolinfo) == 0: self.logger.error("Cannot determine toolset for client %s" % (client)) raise MetadataConsistencyError toolset = toolinfo[0] probed = self.probedata.get(client, {}) newgroups = groups[:] newbundles = bundles[:] newcategories = {} newcategories.update(categories) for group in self.cgroups.get(client, []): if self.groups.has_key(group): nbundles, ngroups, ncategories = self.groups[group] else: nbundles, ngroups, ncategories = ([], [group], {}) [newbundles.append(b) for b in nbundles if b not in newbundles] [newgroups.append(g) for g in ngroups if g not in newgroups] newcategories.update(ncategories) return ClientMetadata(client, newgroups, newbundles, toolset, newcategories, probed)
843dad5bef2dc420002ced3547828d542040e7f7 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11867/843dad5bef2dc420002ced3547828d542040e7f7/Metadata.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 4165, 12, 2890, 16, 1004, 4672, 9163, 990, 326, 1982, 364, 279, 864, 1004, 26418, 309, 365, 18, 13831, 18, 5332, 67, 856, 12, 2625, 4672, 1004, 273, 365, 18, 13831, 63, 2625, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4165, 12, 2890, 16, 1004, 4672, 9163, 990, 326, 1982, 364, 279, 864, 1004, 26418, 309, 365, 18, 13831, 18, 5332, 67, 856, 12, 2625, 4672, 1004, 273, 365, 18, 13831, 63, 2625, ...
cod = re.sub ('[ /]+', ' ',cod)
cod = re.sub ('[ /]+', ' ', cod)
def read_encoding (file): sys.stderr.write(_("Using encoding file: `%s'\n") % file) str = open (file).read () str = re.sub ("%.*", '', str) str = re.sub ("[\n\t \f]+", ' ', str) m = re.search ('/([^ ]+) \[([^\]]+)\] def', str) if not m: raise 'Encoding file invalid.' name = m.group (1) cod = m.group (2) cod = re.sub ('[ /]+', ' ',cod) cods = string.split (cod) return (name, cods)
d96cc8339091f674ea0fc313632dcc5c333eeb78 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11856/d96cc8339091f674ea0fc313632dcc5c333eeb78/mftrace.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 67, 5999, 261, 768, 4672, 2589, 18, 11241, 18, 2626, 24899, 2932, 7736, 2688, 585, 30, 12430, 87, 8314, 82, 7923, 738, 585, 13, 225, 609, 273, 1696, 261, 768, 2934, 896, 1832, 609...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 67, 5999, 261, 768, 4672, 2589, 18, 11241, 18, 2626, 24899, 2932, 7736, 2688, 585, 30, 12430, 87, 8314, 82, 7923, 738, 585, 13, 225, 609, 273, 1696, 261, 768, 2934, 896, 1832, 609...
s0 = SubByte(kj[3,c-1]) s1 = SubByte(kj[2,c-1]) s2 = SubByte(kj[1,c-1]) s3 = SubByte(kj[0,c-1])
s0 = SubByte(kj[3, c-1]) s1 = SubByte(kj[2, c-1]) s2 = SubByte(kj[1, c-1]) s3 = SubByte(kj[0, c-1])
def key_schedule(self, kj, i): """ Return $k_i$ for a given $i$ and $k_j$ with $j = i-1$. TESTS: sage: sr = mq.SR(10,4,4,8, star=True, allow_zero_inversions=True) sage: ki = sr.state_array() sage: for i in range(10): ... ki = sr.key_schedule(ki,i+1) sage: print sr.hex_str_matrix(ki) B4 3E 23 6F EF 92 E9 8F 5B E2 51 18 CB 11 CF 8E """ if i < 0: raise TypeError, "i must be >= i"
cd82551727ddbae04c5b28f55b59ec14654a84ab /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/cd82551727ddbae04c5b28f55b59ec14654a84ab/sr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 498, 67, 10676, 12, 2890, 16, 417, 78, 16, 277, 4672, 3536, 2000, 271, 79, 67, 77, 8, 364, 279, 864, 271, 77, 8, 471, 271, 79, 67, 78, 8, 598, 271, 78, 273, 277, 17, 21, 8, 18,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 498, 67, 10676, 12, 2890, 16, 417, 78, 16, 277, 4672, 3536, 2000, 271, 79, 67, 77, 8, 364, 279, 864, 271, 77, 8, 471, 271, 79, 67, 78, 8, 598, 271, 78, 273, 277, 17, 21, 8, 18,...
self.c.execute("SELECT l.id FROM links as l INNER JOIN packages as p ON l.package=p.id WHERE p.queue=1 AND l.plugin NOT IN %s AND l.status IN (2,3,6) LIMIT 5" % str(occ))
self.c.execute("SELECT l.id FROM links as l INNER JOIN packages as p ON l.package=p.id WHERE p.queue=1 AND l.plugin NOT IN %s AND l.status IN (2,3,6) LIMIT 5" % occ)
def getJob(self, occ): """return pyfile instance, which is suitable for download and dont use a occupied plugin""" self.c.execute("SELECT l.id FROM links as l INNER JOIN packages as p ON l.package=p.id WHERE p.queue=1 AND l.plugin NOT IN %s AND l.status IN (2,3,6) LIMIT 5" % str(occ)) # very bad!
3c1236c5ec9d2ab45a435184315c31d3cfb35cba /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9838/3c1236c5ec9d2ab45a435184315c31d3cfb35cba/FileDatabase.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13024, 12, 2890, 16, 9145, 4672, 3536, 2463, 2395, 768, 791, 16, 1492, 353, 10631, 364, 4224, 471, 14046, 999, 279, 18928, 2092, 1909, 8395, 365, 18, 71, 18, 8837, 2932, 4803, 328, 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, 13024, 12, 2890, 16, 9145, 4672, 3536, 2463, 2395, 768, 791, 16, 1492, 353, 10631, 364, 4224, 471, 14046, 999, 279, 18928, 2092, 1909, 8395, 365, 18, 71, 18, 8837, 2932, 4803, 328, 18, ...
nodes = Nodes(self.api, [self['node_id']])
nodes = PLC.Nodes.Nodes(self.api, [self['node_id']]).values()
def validate_is_primary(self, is_primary): """ Set this interface to be the primary one. """
28a186f3f8c8fec9d25a2c95d03535047bb7ec0d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7598/28a186f3f8c8fec9d25a2c95d03535047bb7ec0d/NodeNetworks.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1954, 67, 291, 67, 8258, 12, 2890, 16, 353, 67, 8258, 4672, 3536, 1000, 333, 1560, 358, 506, 326, 3354, 1245, 18, 3536, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 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, 1954, 67, 291, 67, 8258, 12, 2890, 16, 353, 67, 8258, 4672, 3536, 1000, 333, 1560, 358, 506, 326, 3354, 1245, 18, 3536, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
c = self._context
c = self._context
def _obj(self, tagURI, attrs): # 6.2 if tagURI == RDF_NS_URI + "Description": self.idAboutAttr(attrs) # Set up subject and context
d8d5550e85d4e1575de516acf94f0474eaafb56b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3308/d8d5550e85d4e1575de516acf94f0474eaafb56b/sax2rdf.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2603, 12, 2890, 16, 1047, 3098, 16, 3422, 4672, 225, 468, 1666, 18, 22, 309, 1047, 3098, 422, 13539, 67, 3156, 67, 3098, 397, 315, 3291, 6877, 365, 18, 350, 24813, 3843, 12, 7039,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 389, 2603, 12, 2890, 16, 1047, 3098, 16, 3422, 4672, 225, 468, 1666, 18, 22, 309, 1047, 3098, 422, 13539, 67, 3156, 67, 3098, 397, 315, 3291, 6877, 365, 18, 350, 24813, 3843, 12, 7039,...
self.syntax_error('invalid attribute name %s'%k)
self._syntax_error('invalid attribute name %s'%k)
def getAttributes(self,attr,attrMap): A = {} for k, v in attr.items(): k = string.lower(k) if k in attrMap.keys(): j = attrMap[k] func = j[1] try: A[j[0]] = (func is None) and v or apply(func,(v,)) except: self.syntax_error('%s: invalid value %s'%(k,v)) else: self.syntax_error('invalid attribute name %s'%k) return A
68d6e529cdc81587e6fbb778e2bd2bf636e9e777 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3878/68d6e529cdc81587e6fbb778e2bd2bf636e9e777/paraparser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10183, 12, 2890, 16, 1747, 16, 1747, 863, 4672, 432, 273, 2618, 364, 417, 16, 331, 316, 1604, 18, 3319, 13332, 417, 273, 533, 18, 8167, 12, 79, 13, 309, 417, 316, 1604, 863, 18, 2452...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10183, 12, 2890, 16, 1747, 16, 1747, 863, 4672, 432, 273, 2618, 364, 417, 16, 331, 316, 1604, 18, 3319, 13332, 417, 273, 533, 18, 8167, 12, 79, 13, 309, 417, 316, 1604, 863, 18, 2452...
del lwtparser
uniq_def = (row[ifos_col],row[name_col],row[vers_col])
0054f41ea899cadb48038f4e8db82f40cc43d80f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5758/0054f41ea899cadb48038f4e8db82f40cc43d80f/LDBDServer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 10748, 67, 536, 273, 261, 492, 63, 430, 538, 67, 1293, 6487, 492, 63, 529, 67, 1293, 6487, 492, 63, 2496, 67, 1293, 5717, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 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, 10748, 67, 536, 273, 261, 492, 63, 430, 538, 67, 1293, 6487, 492, 63, 529, 67, 1293, 6487, 492, 63, 2496, 67, 1293, 5717, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
elif isinstance(value, (list, GeneratorType, XMLParser)):
elif type(value) in (list, GeneratorType, XMLParser):
def substitute(data, stack, repeat_stack, encoding='utf-8'): """Interprets the given data as a substitution string with the "${expr}" format, where the expression within the brackets is an STL expression. Returns a tuple with the interpreted string and the number of substitutions done. """ if type(data) is not str: raise ValueError, 'byte string expected, not %s' % type(data) segments = subs_expr.split(data) for i, segment in enumerate(segments): if i % 2: # Evaluate expression value = evaluate(segment, stack, repeat_stack) # An STL template if isinstance(value, STLTemplate): value = value.render() # Ignore if None if value is None: continue # Yield if isinstance(value, MSG): value = value.gettext() yield TEXT, value.encode(encoding), 0 elif isinstance(value, (list, GeneratorType, XMLParser)): for x in value: if type(x) is not tuple: raise STLError, ERR_EXPR_XML % (type(x), segment) yield x elif type(value) is unicode: yield TEXT, value.encode(encoding), 0 else: yield TEXT, str(value), 0 elif segment: yield TEXT, segment, 0
44dab67e4fb0cbda75d0905e4af8369cfbae36b0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12681/44dab67e4fb0cbda75d0905e4af8369cfbae36b0/stl.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14811, 12, 892, 16, 2110, 16, 7666, 67, 3772, 16, 2688, 2218, 3158, 17, 28, 11, 4672, 3536, 2465, 15089, 87, 326, 864, 501, 487, 279, 12785, 533, 598, 326, 27214, 8638, 1532, 740, 16, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14811, 12, 892, 16, 2110, 16, 7666, 67, 3772, 16, 2688, 2218, 3158, 17, 28, 11, 4672, 3536, 2465, 15089, 87, 326, 864, 501, 487, 279, 12785, 533, 598, 326, 27214, 8638, 1532, 740, 16, ...
self.default = getattr(PageTemplateFile, name, NO_DEFAULT)
self.default = getattr(cls, name, None)
def __init__(self, name): self.name = name self.default = getattr(PageTemplateFile, name, NO_DEFAULT) property.__init__(self, self._get, self._set)
92aa2107977024bbd16ef64d9c5df24b043d1151 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9585/92aa2107977024bbd16ef64d9c5df24b043d1151/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 508, 4672, 365, 18, 529, 273, 508, 365, 18, 1886, 273, 3869, 12, 6429, 16, 508, 16, 599, 13, 1272, 16186, 2738, 972, 12, 2890, 16, 365, 6315, 588, 16, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 508, 4672, 365, 18, 529, 273, 508, 365, 18, 1886, 273, 3869, 12, 6429, 16, 508, 16, 599, 13, 1272, 16186, 2738, 972, 12, 2890, 16, 365, 6315, 588, 16, ...
if __debug__ and self.debug >= 4: _mesg('> %s' % data)
def _command(self, name, *args):
7c42a4d8ae3bf54c1a8aa8875c15ffc51f6daabc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/7c42a4d8ae3bf54c1a8aa8875c15ffc51f6daabc/imaplib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3076, 12, 2890, 16, 508, 16, 380, 1968, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3076, 12, 2890, 16, 508, 16, 380, 1968, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
except (IOError, OSError):
except (KeyError, IOError, OSError):
def attachment_drawing(self, url, text, **kw): # XXX text arg is unused! _ = self.request.getText pagename, drawing = AttachFile.absoluteName(url, self.page.page_name) containername = wikiutil.taintfilename(drawing) + ".tdraw"
1c15a67466638b693e4135e3c61ff64126175d11 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/888/1c15a67466638b693e4135e3c61ff64126175d11/text_html.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6042, 67, 9446, 310, 12, 2890, 16, 880, 16, 977, 16, 2826, 9987, 4672, 468, 11329, 977, 1501, 353, 10197, 5, 389, 273, 365, 18, 2293, 18, 588, 1528, 4262, 1069, 16, 16327, 273, 8659, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 9446, 310, 12, 2890, 16, 880, 16, 977, 16, 2826, 9987, 4672, 468, 11329, 977, 1501, 353, 10197, 5, 389, 273, 365, 18, 2293, 18, 588, 1528, 4262, 1069, 16, 16327, 273, 8659, ...
stderr('%s: host %s is disabled in the config file' % (CONF_FILE, cfg['hostname']))
stderr('%s: host %s is disabled in the config file' % (synctool_config.CONF_FILE, cfg['hostname']))
def main(): global DRY_RUN, VERBOSE, QUIET, UNIX_CMD, LOGFILE, SYMLINK_MODE, RUN_TASKS progname = os.path.basename(sys.argv[0]) diff_file = None single_file = None if len(sys.argv) > 1: try: opts, args = getopt.getopt(sys.argv[1:], "hc:l:d:1:tfvqx", ['help', 'conf=', 'log=', 'diff=', 'single=', 'tasks', 'fix', 'verbose', 'quiet', 'unix']) except getopt.error, (reason): print '%s: %s' % (progname, reason) usage() sys.exit(1) except getopt.GetoptError, (reason): print '%s: %s' % (progname, reason) usage() sys.exit(1) except: usage() sys.exit(1) errors = 0 for opt, arg in opts: if opt in ('-h', '--help', '-?'): usage() sys.exit(1) if opt in ('-c', '--conf'): synctool_config.CONF_FILE=arg continue
3a9f4283482c56bde10b6ba0bf929e0a5fdc96e6 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/13401/3a9f4283482c56bde10b6ba0bf929e0a5fdc96e6/synctool.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 2552, 463, 9590, 67, 15238, 16, 27857, 16, 2238, 5370, 1584, 16, 23160, 67, 19473, 16, 2018, 3776, 16, 7068, 1495, 8476, 67, 7038, 16, 15484, 67, 15580, 55, 225, 11243, 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, 2774, 13332, 2552, 463, 9590, 67, 15238, 16, 27857, 16, 2238, 5370, 1584, 16, 23160, 67, 19473, 16, 2018, 3776, 16, 7068, 1495, 8476, 67, 7038, 16, 15484, 67, 15580, 55, 225, 11243, 529,...
if prep_res == 255:
if prep_res == -255:
def tryPrepare(self): if self.justplay: return True else: self.calculateFilename() rec_ref = self.service_ref and self.service_ref.ref if rec_ref and rec_ref.flags & eServiceReference.isGroup: rec_ref = getBestPlayableServiceReference(rec_ref, eServiceReference()) if not rec_ref: self.log(1, "'get best playable service for group... record' failed") return False self.record_service = rec_ref and NavigationInstance.instance.recordService(rec_ref)
5e9b74157d81f7bfd0ae5315ae1ddbc849e97a5b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6652/5e9b74157d81f7bfd0ae5315ae1ddbc849e97a5b/RecordTimer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 775, 7543, 12, 2890, 4672, 309, 365, 18, 3732, 1601, 30, 327, 1053, 469, 30, 365, 18, 11162, 5359, 1435, 1950, 67, 1734, 273, 365, 18, 3278, 67, 1734, 471, 365, 18, 3278, 67, 1734, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 775, 7543, 12, 2890, 4672, 309, 365, 18, 3732, 1601, 30, 327, 1053, 469, 30, 365, 18, 11162, 5359, 1435, 1950, 67, 1734, 273, 365, 18, 3278, 67, 1734, 471, 365, 18, 3278, 67, 1734, 1...
text = "<b><span size='x-large'>%s</span></b>" % song("title") if "version" in song: text += "\n" + song.comma("version")
text = "<b><span size='x-large'>%s</span></b>" %( util.escape(song("title"))) if "version" in song: text += "\n" + util.escape(song.comma("version"))
def _title(self, song): w = gtk.Label() text = "<b><span size='x-large'>%s</span></b>" % song("title") if "version" in song: text += "\n" + song.comma("version") w.set_markup(text) w.set_alignment(0, 0) return w
16f3ffcccacd88b6f8491e3a2bf340491bc6ca33 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4764/16f3ffcccacd88b6f8491e3a2bf340491bc6ca33/quodlibet.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2649, 12, 2890, 16, 17180, 4672, 341, 273, 22718, 18, 2224, 1435, 977, 273, 3532, 70, 4438, 3969, 963, 2218, 92, 17, 14095, 11, 9822, 87, 1757, 3969, 4695, 70, 2984, 8975, 1709, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2649, 12, 2890, 16, 17180, 4672, 341, 273, 22718, 18, 2224, 1435, 977, 273, 3532, 70, 4438, 3969, 963, 2218, 92, 17, 14095, 11, 9822, 87, 1757, 3969, 4695, 70, 2984, 8975, 1709, 1...
doc = Request(self, 'user.getRecentTracks', self.api_key, params).execute()
doc = _Request(self, 'user.getRecentTracks', self.api_key, params).execute()
def getRecentTracks(self, limit = None): """Returns this user's recent listened-to tracks. """ params = self._getParams() if limit: params['limit'] = unicode(limit) list = [] doc = Request(self, 'user.getRecentTracks', self.api_key, params).execute() if not doc: return None for track in doc.getElementsByTagName('track'): title = self._extract(track, 'name') artist = self._extract(track, 'artist') if track.hasAttribute('nowplaying'): continue #to prevent the now playing track from sneaking in here list.append(Track(artist, title, *self.auth_data)) return list
903c9b1622fe56617e5099f20abdc69f2090f8e0 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9926/903c9b1622fe56617e5099f20abdc69f2090f8e0/pylast.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5561, 2998, 22138, 12, 2890, 16, 1800, 273, 599, 4672, 3536, 1356, 333, 729, 1807, 8399, 6514, 329, 17, 869, 13933, 18, 3536, 225, 859, 273, 365, 6315, 588, 1370, 1435, 309, 1800, 30, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5561, 2998, 22138, 12, 2890, 16, 1800, 273, 599, 4672, 3536, 1356, 333, 729, 1807, 8399, 6514, 329, 17, 869, 13933, 18, 3536, 225, 859, 273, 365, 6315, 588, 1370, 1435, 309, 1800, 30, ...
input = raw_input("Would you like to add " + fabric_mod_name + "to drivers/target/Kconfig..? [yes,no]: ")
input = raw_input("Would you like to add " + fabric_mod_name + " to drivers/target/Kconfig..? [yes,no]: ")
def main(modname, proto_ident):
8b55836b9045a75a0b74cb25d8a39f3bc6e2ea50 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5327/8b55836b9045a75a0b74cb25d8a39f3bc6e2ea50/tcm_mod_builder.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 1711, 529, 16, 3760, 67, 6392, 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,...
[ 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, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 1711, 529, 16, 3760, 67, 6392, 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, ...
scsi_devices = vscsi_get_scsidevices()
scsi_devices = _vscsi_get_scsidevices_by_lsscsi("") if not scsi_devices: scsi_devices = _vscsi_get_scsidevices_by_sysfs()
def vscsi_get_hctl_and_devname_by(target, scsi_devices = None): if scsi_devices is None: if len(target.split(':')) == 4: scsi_devices = _vscsi_get_scsidevices_by_lsscsi(target) elif target.startswith('/dev/'): scsi_devices = _vscsi_get_scsidevices_by_lsscsi("| grep %s" % target) else: scsi_devices = vscsi_get_scsidevices() if len(target.split(':')) == 4: return _vscsi_get_devname_by(target, scsi_devices) else: return _vscsi_get_hctl_by(target, scsi_devices)
7568582c5a89c35aa6fd75d341347a1eded081bf /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6195/7568582c5a89c35aa6fd75d341347a1eded081bf/vscsi_util.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 331, 1017, 7722, 67, 588, 67, 76, 12930, 67, 464, 67, 5206, 529, 67, 1637, 12, 3299, 16, 888, 7722, 67, 12506, 273, 599, 4672, 309, 888, 7722, 67, 12506, 353, 599, 30, 309, 562, 12, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 331, 1017, 7722, 67, 588, 67, 76, 12930, 67, 464, 67, 5206, 529, 67, 1637, 12, 3299, 16, 888, 7722, 67, 12506, 273, 599, 4672, 309, 888, 7722, 67, 12506, 353, 599, 30, 309, 562, 12, ...
if item.text(0):
if item.isOn():
def show(self): self.fill() self._result = False self._window.show() centerWindow(self._window) self._window.raiseW() self._result = self._window.exec_loop() self._window.hide()
27e6f2870782a663778a9656d4c2fa0cad5c6712 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8317/27e6f2870782a663778a9656d4c2fa0cad5c6712/channels.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 12, 2890, 4672, 365, 18, 5935, 1435, 365, 6315, 2088, 273, 1083, 365, 6315, 5668, 18, 4500, 1435, 4617, 3829, 12, 2890, 6315, 5668, 13, 365, 6315, 5668, 18, 11628, 59, 1435, 365, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 12, 2890, 4672, 365, 18, 5935, 1435, 365, 6315, 2088, 273, 1083, 365, 6315, 5668, 18, 4500, 1435, 4617, 3829, 12, 2890, 6315, 5668, 13, 365, 6315, 5668, 18, 11628, 59, 1435, 365, ...
if stdout != None:
if stdout is not None:
def communicate(self, input=None): """Interact with process: Send data to stdin. Read data from stdout and stderr, until end-of-file is reached. Wait for process to terminate. The optional input argument should be a string to be sent to the child process, or None, if no data should be sent to the child.
d38ddf4ca23824f375e627bda82ffa995344c6e5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/d38ddf4ca23824f375e627bda82ffa995344c6e5/subprocess.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15541, 12, 2890, 16, 810, 33, 7036, 4672, 3536, 2465, 621, 598, 1207, 30, 2479, 501, 358, 8801, 18, 225, 2720, 501, 628, 3909, 471, 4514, 16, 3180, 679, 17, 792, 17, 768, 353, 8675, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15541, 12, 2890, 16, 810, 33, 7036, 4672, 3536, 2465, 621, 598, 1207, 30, 2479, 501, 358, 8801, 18, 225, 2720, 501, 628, 3909, 471, 4514, 16, 3180, 679, 17, 792, 17, 768, 353, 8675, ...
file.write("<!-- %s -->" % _escape_cdata(node.text, encoding))
file.write(_encode("<!-- %s -->" % _escape_cdata(node.text), encoding))
def _write(self, file, node, encoding, namespaces): # write XML to file tag = node.tag if tag is Comment: file.write("<!-- %s -->" % _escape_cdata(node.text, encoding)) elif tag is ProcessingInstruction: file.write("<?%s?>" % _escape_cdata(node.text, encoding)) else: items = list(node.items()) xmlns_items = [] # new namespaces in this scope try: if isinstance(tag, QName) or tag[:1] == "{": tag, xmlns = fixtag(tag, namespaces) if xmlns: xmlns_items.append(xmlns) except TypeError: _raise_serialization_error(tag) file.write("<" + _encode(tag, encoding)) if items or xmlns_items: items.sort() # lexical order for k, v in items: try: if isinstance(k, QName) or k[:1] == "{": k, xmlns = fixtag(k, namespaces) if xmlns: xmlns_items.append(xmlns) except TypeError: _raise_serialization_error(k) try: if isinstance(v, QName): v, xmlns = fixtag(v, namespaces) if xmlns: xmlns_items.append(xmlns) except TypeError: _raise_serialization_error(v) file.write(" %s=\"%s\"" % (_encode(k, encoding), _escape_attrib(v, encoding))) for k, v in xmlns_items: file.write(" %s=\"%s\"" % (_encode(k, encoding), _escape_attrib(v, encoding))) if node.text or len(node): file.write(">") if node.text: file.write(_escape_cdata(node.text, encoding)) for n in node: self._write(file, n, encoding, namespaces) file.write("</" + _encode(tag, encoding) + ">") else: file.write(" />") for k, v in xmlns_items: del namespaces[v] if node.tail: file.write(_escape_cdata(node.tail, encoding))
d7657fbd21edb2a284db95beac93d0fb6cf519f0 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8125/d7657fbd21edb2a284db95beac93d0fb6cf519f0/ElementTree.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2626, 12, 2890, 16, 585, 16, 756, 16, 2688, 16, 7728, 4672, 468, 1045, 3167, 358, 585, 1047, 273, 756, 18, 2692, 309, 1047, 353, 9821, 30, 585, 18, 2626, 24899, 3015, 2932, 5586, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2626, 12, 2890, 16, 585, 16, 756, 16, 2688, 16, 7728, 4672, 468, 1045, 3167, 358, 585, 1047, 273, 756, 18, 2692, 309, 1047, 353, 9821, 30, 585, 18, 2626, 24899, 3015, 2932, 5586, ...
vList.append(Violation(self, line.number))
vList.append(Violation(self, line))
def apply(self, lines): vList = [] if (self.getFiletype() in self.getTypeList()): # angle bracket style #include<foo> should preceed quote style #include "foo.h" foundQuoteStyle = False for line in lines: if ( re.search("^\#include\s+\"\w+\.h(pp)?\"\s*$", line.stripped) ): foundQuoteStyle = True if ( foundQuoteStyle and re.search("^\#include\s*\<\w+(\.h|\.hpp)?\>\s*$", line.stripped) ): vList.append(Violation(self, line.number)) return vList
cb6d1c1b9da3a15f55b42e7ffc55f274aee325d2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6529/cb6d1c1b9da3a15f55b42e7ffc55f274aee325d2/style.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2230, 12, 2890, 16, 2362, 4672, 331, 682, 273, 5378, 309, 261, 2890, 18, 588, 25579, 5872, 1435, 316, 365, 18, 588, 559, 682, 1435, 4672, 468, 5291, 9843, 2154, 468, 6702, 32, 11351, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2230, 12, 2890, 16, 2362, 4672, 331, 682, 273, 5378, 309, 261, 2890, 18, 588, 25579, 5872, 1435, 316, 365, 18, 588, 559, 682, 1435, 4672, 468, 5291, 9843, 2154, 468, 6702, 32, 11351, 3...
if len(ver) = 0:
if len(ver) == 0:
def biosVersion(self): ver = "" if self.hdr.headerMajorVer < 2: ver = "".join([ chr(c) for c in self.hdr.biosVersion if chr(c).isalnum() ]) if len(ver) = 0: ver = "unknown" else: ver = "%d.%d.%d" % (self.hdr.biosVersion[0], self.hdr.biosVersion[1], self.hdr.biosVersion[2]) return ver
fe0fe0e3e7f64e38912bb76896b931320a2707db /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/40/fe0fe0e3e7f64e38912bb76896b931320a2707db/rbu_hdr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 324, 7441, 1444, 12, 2890, 4672, 1924, 273, 1408, 309, 365, 18, 16587, 18, 3374, 17581, 3945, 411, 576, 30, 1924, 273, 1408, 18, 5701, 3816, 4513, 12, 71, 13, 364, 276, 316, 365, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 324, 7441, 1444, 12, 2890, 4672, 1924, 273, 1408, 309, 365, 18, 16587, 18, 3374, 17581, 3945, 411, 576, 30, 1924, 273, 1408, 18, 5701, 3816, 4513, 12, 71, 13, 364, 276, 316, 365, 18, ...
if(not connection.closed):
if(connection.closed): log(self, "%s's thread ended, connection was marked closed" % connection.user, 3) else: log(self, "%s's thread ended unexpectedly, cleaning up" % connection.user, 3)
def watchConnection(self, connection, sockThread): sockThread.join() if(not connection.closed): # send a quit message if(connection.type == self.IRC_Connection.CLIENT): msg = self.IRC_Message("QUIT :Lost connection") msg.prefix = connection.user.fullUser() self.localBroadcast(msg, connection.user, connection) # this method should never attempt to send messages to the dead connection self.broadcast(msg, connection, self.IRC_Connection.SERVER) self.removeUser(connection.user) elif(connection.type == self.IRC_Connection.SERVER): for user in self.users: if(user.connection == connection): # any user which was connected to us through the lost server must quit msg = self.IRC_Message("QUIT :Lost in netsplit") msg.prefix = user.fullUser() self.localBroadcast(msg, user, connection) self.broadcast(msg, connection, self.IRC_Connection.SERVER) self.removeUser(user) for server in self.servers: if(server.connection == connection): # this removes both the lost server, and all servers behind it msg = self.IRC_Message("SQUIT :Lost in netsplit") msg.prefix = self.hostname msg.params = [server.hostname] self.broadcast(msg, connection, self.IRC_Connection.SERVER) self.removeServer(server) else: # that was fast :P connection.sock.close() self.connections.remove(connection)
c67cc1c5bd1e3e782d15e195bd40576ffd8c36fb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11670/c67cc1c5bd1e3e782d15e195bd40576ffd8c36fb/IRC_Server.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4267, 1952, 12, 2890, 16, 1459, 16, 7313, 3830, 4672, 7313, 3830, 18, 5701, 1435, 309, 12, 4071, 18, 12204, 4672, 613, 12, 2890, 16, 2213, 87, 1807, 2650, 16926, 16, 1459, 1703, 9350, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4267, 1952, 12, 2890, 16, 1459, 16, 7313, 3830, 4672, 7313, 3830, 18, 5701, 1435, 309, 12, 4071, 18, 12204, 4672, 613, 12, 2890, 16, 2213, 87, 1807, 2650, 16926, 16, 1459, 1703, 9350, ...
self.failUnless("100 items matching your search terms" in browser2.contents)
self.failUnless('<strong id="search-results-number">100</strong>' in browser2.contents)
def test_performance_for_100_items(self): """ To make sure we don't make Plone superslower, we run some crude performance tests. We make 100 documents, publish them, then search for them. Compare the results with the old search results page If we are slower the test fails These tests WILL be slow to run. Let's remove or hide these when(if) the PLIP is approved """ print "testing performance with 100 pages" from time import time self.setRoles(['Manager', 'Member']) for i in range(0,100): new_id = self.folder.invokeFactory('Document', 'my-page'+str(i), text='spam spam ham eggs') obj = getattr(self.folder,new_id) self.portal.portal_workflow.doActionFor(obj, 'publish') portal_url = self.portal.absolute_url()
20bcb9142d3a7bd27c785795a8138688a239a184 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12249/20bcb9142d3a7bd27c785795a8138688a239a184/test_search_performance.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 16092, 1359, 67, 1884, 67, 6625, 67, 3319, 12, 2890, 4672, 3536, 2974, 1221, 3071, 732, 2727, 1404, 1221, 3008, 476, 1169, 414, 8167, 16, 732, 1086, 2690, 4422, 1317, 9239, 743...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 16092, 1359, 67, 1884, 67, 6625, 67, 3319, 12, 2890, 4672, 3536, 2974, 1221, 3071, 732, 2727, 1404, 1221, 3008, 476, 1169, 414, 8167, 16, 732, 1086, 2690, 4422, 1317, 9239, 743...
return super(users, self).unlink(cr, uid, ids)
return super(users, self).unlink(cr, uid, ids, context=context)
def unlink(self, cr, uid, ids): if 1 in ids: raise osv.except_osv(_('Can not remove root user!'), _('You can not remove the admin user as it is used internally for resources created by OpenERP (updates, module installation, ...)')) return super(users, self).unlink(cr, uid, ids)
3e97fa8182b2bc393a8204201ec228d59cc01c89 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12853/3e97fa8182b2bc393a8204201ec228d59cc01c89/res_user.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8255, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 4672, 309, 404, 316, 3258, 30, 1002, 1140, 90, 18, 14137, 67, 538, 90, 24899, 2668, 2568, 486, 1206, 1365, 729, 5124, 3631, 389, 2668, 622...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8255, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 4672, 309, 404, 316, 3258, 30, 1002, 1140, 90, 18, 14137, 67, 538, 90, 24899, 2668, 2568, 486, 1206, 1365, 729, 5124, 3631, 389, 2668, 622...
def on_button_remove_path_clicked(self,widget,data=None):
def on_button_remove_path_clicked(self, widget, data=None):
def on_button_remove_path_clicked(self,widget,data=None): self.pathListStore.remove(self.iterPath) self.iterPath = None self._update_path_buttons()
4c8cd0209bff872132a9871d2110a25a9e228ec9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11741/4c8cd0209bff872132a9871d2110a25a9e228ec9/gui_sequence_properties_advanced.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 5391, 67, 4479, 67, 803, 67, 7475, 329, 12, 2890, 16, 3604, 16, 501, 33, 7036, 4672, 365, 18, 803, 682, 2257, 18, 4479, 12, 2890, 18, 2165, 743, 13, 365, 18, 2165, 743, 27...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 5391, 67, 4479, 67, 803, 67, 7475, 329, 12, 2890, 16, 3604, 16, 501, 33, 7036, 4672, 365, 18, 803, 682, 2257, 18, 4479, 12, 2890, 18, 2165, 743, 13, 365, 18, 2165, 743, 27...
self._cache = FileCache(self._file, self._size)
if use_cache: self._cache = FileCache(self._file, self._size, 4096, 10) else: self._cache = None
def __init__(self, file, filename=None, copy=None): """ Endian: See setEndian function. """
fd111dc80b6122bcd7074fc0a60484ba18098368 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2280/fd111dc80b6122bcd7074fc0a60484ba18098368/file.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 585, 16, 1544, 33, 7036, 16, 1610, 33, 7036, 4672, 3536, 4403, 2779, 30, 2164, 444, 7583, 445, 18, 3536, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 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, 585, 16, 1544, 33, 7036, 16, 1610, 33, 7036, 4672, 3536, 4403, 2779, 30, 2164, 444, 7583, 445, 18, 3536, 2, -100, -100, -100, -100, -100, -100, -100, -10...
try: add_paths(os.environ['PYTHONPATH'].split(os.pathsep)) except: pass
if 'PYTHONPATH' in os.environ: for path in os.environ['PYTHONPATH'].split(os.pathsep): add_path(path) del path
def remove_path(path): path = norm_path(path) while path in sys.path: sys.path.remove(path)
b2ebefb3ebf0602f1b37020cde2082d7c1870e1c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6988/b2ebefb3ebf0602f1b37020cde2082d7c1870e1c/pythonpathsetter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1206, 67, 803, 12, 803, 4672, 589, 273, 4651, 67, 803, 12, 803, 13, 1323, 589, 316, 2589, 18, 803, 30, 2589, 18, 803, 18, 4479, 12, 803, 13, 282, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1206, 67, 803, 12, 803, 4672, 589, 273, 4651, 67, 803, 12, 803, 13, 1323, 589, 316, 2589, 18, 803, 30, 2589, 18, 803, 18, 4479, 12, 803, 13, 282, 2, -100, -100, -100, -100, -100, -...
self.dirlevels.SetFont(self.font)
def __init__(self, parent): wx.Panel.__init__(self, parent) self.default_font = self.GetFont() self.font = wx.Font(8, self.default_font.GetFamily(), self.default_font.GetStyle(), self.default_font.GetWeight())
ff945dff0e29c1eeb4ad2a1704d50fbe62614802 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11522/ff945dff0e29c1eeb4ad2a1704d50fbe62614802/nextpanel.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 982, 4672, 7075, 18, 5537, 16186, 2738, 972, 12, 2890, 16, 982, 13, 365, 18, 1886, 67, 5776, 273, 365, 18, 967, 5711, 1435, 365, 18, 5776, 273, 7075, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 982, 4672, 7075, 18, 5537, 16186, 2738, 972, 12, 2890, 16, 982, 13, 365, 18, 1886, 67, 5776, 273, 365, 18, 967, 5711, 1435, 365, 18, 5776, 273, 7075, 1...
if product_uom_id != prod.uom_id.id: value = {'product_uom_id': prod.uom_id.id}
def onchange_product_id(self, cr, uid, ids, product_id,product_uom_id, context={}):
129cfb45727e84c0b10daf933a6f730fdd5b5e56 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/129cfb45727e84c0b10daf933a6f730fdd5b5e56/purchase_requisition.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 3427, 67, 5896, 67, 350, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 3017, 67, 350, 16, 5896, 67, 89, 362, 67, 350, 16, 819, 12938, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 603, 3427, 67, 5896, 67, 350, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 3017, 67, 350, 16, 5896, 67, 89, 362, 67, 350, 16, 819, 12938, 4672, 2, -100, -100, -100, -100, -100, -100, ...
suffixes = [".py", ".pyc", ".pyo"]
suffixes = [] for triple in imp.get_suffixes(): suffixes.append(triple[0])
def find_all_submodules(self, m): if not m.__path__: return modules = {} suffixes = [".py", ".pyc", ".pyo"] for dir in m.__path__: try: names = os.listdir(dir) except os.error: self.msg(2, "can't list directory", dir) continue for name in names: mod = None for suff in suffixes: n = len(suff) if name[-n:] == suff: mod = name[:-n] break if mod and mod != "__init__": modules[mod] = mod return modules.keys()
e81582e2e6cc03219e1d7884912d5ea3d6dccef4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/e81582e2e6cc03219e1d7884912d5ea3d6dccef4/modulefinder.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 67, 454, 67, 1717, 6400, 12, 2890, 16, 312, 4672, 309, 486, 312, 16186, 803, 972, 30, 327, 4381, 273, 2618, 565, 18333, 273, 5378, 364, 14543, 316, 1646, 18, 588, 67, 8477, 281, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 67, 454, 67, 1717, 6400, 12, 2890, 16, 312, 4672, 309, 486, 312, 16186, 803, 972, 30, 327, 4381, 273, 2618, 565, 18333, 273, 5378, 364, 14543, 316, 1646, 18, 588, 67, 8477, 281, ...
libraries = ["curvesntl", "g0nntl", "jcntl", "rankntl", "ntl", "gmp", "gmpxx", "stdc++", "m", "pari"])
depends = ["sage/libs/mwrank/wrap.h"], libraries = ["curvesntl", "g0nntl", "jcntl", "rankntl", "ntl", "gmp", "gmpxx", "stdc++", "m", "pari"])
def is_newer(file1, file2): """ Return True if either file2 does not exist or is older than file1. If file1 does not exist, always return False. """ if not os.path.exists(file1): return False if not os.path.exists(file2): return True if os.path.getmtime(file2) < os.path.getmtime(file1): return True return False
c82811cc0b935d826f6cfba833e4406f8eb9ed19 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/c82811cc0b935d826f6cfba833e4406f8eb9ed19/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 67, 2704, 264, 12, 768, 21, 16, 585, 22, 4672, 3536, 2000, 1053, 309, 3344, 585, 22, 1552, 486, 1005, 578, 353, 12156, 2353, 585, 21, 18, 225, 971, 585, 21, 1552, 486, 1005, 16,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 67, 2704, 264, 12, 768, 21, 16, 585, 22, 4672, 3536, 2000, 1053, 309, 3344, 585, 22, 1552, 486, 1005, 578, 353, 12156, 2353, 585, 21, 18, 225, 971, 585, 21, 1552, 486, 1005, 16,...
return posts[1:] def get_last_post(self): replies = self.get_replies() if replies: last = replies[-1] else: last = 0 return get_forum_handler(self, last) def get_message_namespace(self, context):
return [ x[1] for x in posts ] def get_last_post_id(self): posts = self.search_handlers(handler_class=Message) ids = [ int(FileName.decode(x.name)[0]) for x in posts ] return max(ids) view__access__ = 'is_allowed_to_view' view__label__ = u"View" def view(self, context): add_forum_style(context)
def get_replies(self): #XXX To remove in 0.17 replies = self.search_handlers(handler_class=(XHTMLFile, Text)) posts = [int(FileName.decode(x.name)[0]) for x in replies] posts.sort()
c8dcdf60b825e04eb781ac84cd0ee12139dc2529 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12681/c8dcdf60b825e04eb781ac84cd0ee12139dc2529/forum.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 266, 5259, 12, 2890, 4672, 468, 15639, 2974, 1206, 316, 374, 18, 4033, 22009, 273, 365, 18, 3072, 67, 11046, 12, 4176, 67, 1106, 28657, 60, 4870, 812, 16, 3867, 3719, 10775, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 266, 5259, 12, 2890, 4672, 468, 15639, 2974, 1206, 316, 374, 18, 4033, 22009, 273, 365, 18, 3072, 67, 11046, 12, 4176, 67, 1106, 28657, 60, 4870, 812, 16, 3867, 3719, 10775, 2...
- extend (True) decides if base field extensions should be considered or not.
- ``extend`` -- boolean (default: True) decides if base field extensions should be considered or not.
def eigenvectors(self,extend=True): """ Computes the subspace of eigenvectors of a given eigenvalue. INPUT: - extend (True) decides if base field extensions should be considered or not. OUTPUT: A sequence of tuples. Each tuple contains an eigenvalue, a list with a basis of the corresponding subspace of eigenvectors, and the algebraic multiplicity of the eigenvalue. EXAMPLES: :: sage: V=(QQ^4).subspace([[0,2,1,4],[1,2,5,0],[1,1,1,1]]) sage: H=(V.Hom(V))([[0,1,0],[-1,0,0],[0,0,3]]) sage: H.eigenvectors() [(3, [(0, 0, 1, -6/7)], 1), (-1*I, [(1, 1*I, 0, -0.571428571428572? + 2.428571428571429?*I)], 1), (1*I, [(1, -1*I, 0, -0.571428571428572? - 2.428571428571429?*I)], 1)] sage: H.eigenvectors(extend=False) [(3, [(0, 0, 1, -6/7)], 1)] sage: H1=(V.Hom(V))([[2,1,0],[0,2,0],[0,0,3]]) sage: H1.eigenvectors() [(3, [(0, 0, 1, -6/7)], 1), (2, [(0, 1, 0, 17/7)], 2)] sage: H1.eigenvectors(extend=False) [(3, [(0, 0, 1, -6/7)], 1), (2, [(0, 1, 0, 17/7)], 2)]
9bb09580aa7e219d556bbf2e0ec6c8440ac569f7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/9bb09580aa7e219d556bbf2e0ec6c8440ac569f7/free_module_morphism.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11043, 29098, 12, 2890, 16, 14313, 33, 5510, 4672, 3536, 14169, 281, 326, 720, 2981, 434, 11043, 29098, 434, 279, 864, 16719, 1132, 18, 225, 12943, 30, 225, 300, 12176, 14313, 10335, 1493,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11043, 29098, 12, 2890, 16, 14313, 33, 5510, 4672, 3536, 14169, 281, 326, 720, 2981, 434, 11043, 29098, 434, 279, 864, 16719, 1132, 18, 225, 12943, 30, 225, 300, 12176, 14313, 10335, 1493,...
return poly1d(other*self.coeffs)
return poly1d(self.coeffs * other)
def __mul__(self, other): if isscalar(other): return poly1d(other*self.coeffs) else: other = poly1d(other) return poly1d(polymul(self.coeffs, other.coeffs))
d1138ad58536e796421bad68861c0a1323dfdb8a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14925/d1138ad58536e796421bad68861c0a1323dfdb8a/polynomial.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 16411, 972, 12, 2890, 16, 1308, 4672, 309, 3385, 3473, 12, 3011, 4672, 327, 7573, 21, 72, 12, 2890, 18, 30463, 380, 1308, 13, 469, 30, 1308, 273, 7573, 21, 72, 12, 3011, 13, 32...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 16411, 972, 12, 2890, 16, 1308, 4672, 309, 3385, 3473, 12, 3011, 4672, 327, 7573, 21, 72, 12, 2890, 18, 30463, 380, 1308, 13, 469, 30, 1308, 273, 7573, 21, 72, 12, 3011, 13, 32...
return str(translate_message(message, vars))
return str(translate_message(message, vars=vars))
def gettext(message, vars=None): return str(translate_message(message, vars))
095151eedb3b9526770f750971bad5c3fb3ea6ab /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11388/095151eedb3b9526770f750971bad5c3fb3ea6ab/gettext_live.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24972, 12, 2150, 16, 4153, 33, 7036, 4672, 327, 609, 12, 13929, 67, 2150, 12, 2150, 16, 4153, 33, 4699, 3719, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24972, 12, 2150, 16, 4153, 33, 7036, 4672, 327, 609, 12, 13929, 67, 2150, 12, 2150, 16, 4153, 33, 4699, 3719, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
a0 = Arg(Widget2D)
a0 = Arg(Widget2D, None)
def draw(self): if self.print_lbox: print "print_lbox: %r lbox attrs are %r" % (self,(self.bleft, self.bright, self.bbottom, self.btop)) glPushMatrix() prior = None for a in self.drawables: if prior: # move from prior to a dy = prior.bbottom + self.gap + a.btop glTranslatef(0,-dy,0) # positive is up, but Column progresses down prior = a a.draw() glPopMatrix() return
afe0e58b40691afe453f33e2e027fc6ff467f64b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/afe0e58b40691afe453f33e2e027fc6ff467f64b/Column.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3724, 12, 2890, 4672, 309, 365, 18, 1188, 67, 80, 2147, 30, 1172, 315, 1188, 67, 80, 2147, 30, 738, 86, 328, 2147, 3422, 854, 738, 86, 6, 738, 261, 2890, 16, 12, 2890, 18, 70, 4482...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3724, 12, 2890, 4672, 309, 365, 18, 1188, 67, 80, 2147, 30, 1172, 315, 1188, 67, 80, 2147, 30, 738, 86, 328, 2147, 3422, 854, 738, 86, 6, 738, 261, 2890, 16, 12, 2890, 18, 70, 4482...
testboth("%.*d", (sys.maxint,1), overflowok = True)
testboth("%.*d", (sys.maxint,1), overflowok=True)
def test_format(self): testboth("%.1d", (1,), "1") testboth("%.*d", (sys.maxint,1), overflowok = True) # expect overflow testboth("%.100d", (1,), '00000000000000000000000000000000000000' '000000000000000000000000000000000000000000000000000000' '00000001', overflowok = True) testboth("%#.117x", (1,), '0x00000000000000000000000000000000000' '000000000000000000000000000000000000000000000000000000' '0000000000000000000000000001', overflowok = True) testboth("%#.118x", (1,), '0x00000000000000000000000000000000000' '000000000000000000000000000000000000000000000000000000' '00000000000000000000000000001', overflowok = True)
cd731f22f7e822ceee7d62a39270229989d67686 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8125/cd731f22f7e822ceee7d62a39270229989d67686/test_format.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 2139, 12, 2890, 4672, 1842, 18237, 27188, 18, 21, 72, 3113, 261, 21, 16, 3631, 315, 21, 7923, 1842, 18237, 27188, 4509, 72, 3113, 261, 9499, 18, 1896, 474, 16, 21, 3631, 9391...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2139, 12, 2890, 4672, 1842, 18237, 27188, 18, 21, 72, 3113, 261, 21, 16, 3631, 315, 21, 7923, 1842, 18237, 27188, 4509, 72, 3113, 261, 9499, 18, 1896, 474, 16, 21, 3631, 9391...
defskipamount = 'medskip'
defskipamount = 'medskip'
def convert_vspace(file): # Get default spaceamount i = find_token(file.header, '\\defskip', 0) if i == -1: defskipamount = 'medskip' else: defskipamount = split(file.header[i])[1] # Convert the insets i = 0 while 1: i = find_token(file.body, '\\begin_inset VSpace', i) if i == -1: return spaceamount = split(file.body[i])[2] # Are we at the beginning or end of a paragraph? paragraph_start = 1 start = get_paragraph(file.body, i) + 1 for k in range(start, i): if is_nonempty_line(file.body[k]): paragraph_start = 0 break paragraph_end = 1 j = find_end_of_inset(file.body, i) if j == -1: file.warning("Malformed LyX file: Missing '\\end_inset'.") i = i + 1 continue end = get_next_paragraph(file.body, i) for k in range(j + 1, end): if is_nonempty_line(file.body[k]): paragraph_end = 0 break # Convert to paragraph formatting if we are at the beginning or end # of a paragraph and the resulting paragraph would not be empty if ((paragraph_start and not paragraph_end) or (paragraph_end and not paragraph_start)): # The order is important: del and insert invalidate some indices del file.body[j] del file.body[i] if paragraph_start: file.body.insert(start, '\\added_space_top ' + spaceamount + ' ') else: file.body.insert(start, '\\added_space_bottom ' + spaceamount + ' ') continue # Convert to ERT file.body[i:i+1] = ['\\begin_inset ERT', 'status Collapsed', '', '\\layout Standard', '', '\\backslash '] i = i + 6 if spaceamount[-1] == '*': spaceamount = spaceamount[:-1] keep = 1 else: keep = 0 # Replace defskip by the actual value if spaceamount == 'defskip': spaceamount = defskipamount # LaTeX does not know \\smallskip* etc if keep: if spaceamount == 'smallskip': spaceamount = '\\smallskipamount' elif spaceamount == 'medskip': spaceamount = '\\medskipamount' elif spaceamount == 'bigskip': spaceamount = '\\bigskipamount' elif spaceamount == 'vfill': spaceamount = '\\fill' # Finally output the LaTeX code if (spaceamount == 'smallskip' or spaceamount == 'medskip' or spaceamount == 'bigskip' or spaceamount == 'vfill'): file.body.insert(i, spaceamount) else : if keep: file.body.insert(i, 'vspace*{') else: file.body.insert(i, 'vspace{') i = convert_ertbackslash(file.body, i, spaceamount) file.body[i] = file.body[i] + '}' i = i + 1
c8c616688faf08016da0ac35a111bf5a62b9ad05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7514/c8c616688faf08016da0ac35a111bf5a62b9ad05/lyx_1_4.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1765, 67, 90, 2981, 12, 768, 4672, 225, 468, 968, 805, 3476, 8949, 277, 273, 1104, 67, 2316, 12, 768, 18, 3374, 16, 3718, 536, 7457, 2187, 374, 13, 309, 277, 422, 300, 21, 30, 1652, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1765, 67, 90, 2981, 12, 768, 4672, 225, 468, 968, 805, 3476, 8949, 277, 273, 1104, 67, 2316, 12, 768, 18, 3374, 16, 3718, 536, 7457, 2187, 374, 13, 309, 277, 422, 300, 21, 30, 1652, ...
raise 'unknown public-key algorithm (%d) in signature at %d' % (self.pk_algo, idx)
raise RuntimeError('unknown public-key algorithm (%d) in signature at %d' % (self.pk_algo, idx))
def deserialize(self, msg, idx, pkt_len) : self.version, idx = get_whole_int(msg, idx, 1) if self.version == 2 : self.version = 3 if self.version == 3 : hash_len, idx = get_whole_number(msg, idx, 1) self.sig_type, idx = get_whole_int(msg, idx, 1) self.timestamp, idx = get_whole_number(msg, idx, 4) self.timestamp = float(self.timestamp) self.key_id_ = msg[idx:idx+8] idx = idx + 8 self.pk_algo, idx = get_whole_int(msg, idx, 1) self.hash_algo, idx = get_whole_int(msg, idx, 1) elif self.version == 4: self.sig_type, idx = get_whole_int(msg, idx, 1) self.pk_algo, idx = get_whole_int(msg, idx, 1) self.hash_algo, idx = get_whole_int(msg, idx, 1) sub_paks_len, idx = get_whole_int(msg, idx, 2) sub_paks_end = idx + sub_paks_len self.hashed_subpaks = [] while idx < sub_paks_end : sp, idx = self.deserialize_subpacket(msg, idx) self.hashed_subpaks.append(sp) sub_paks_len, idx = get_whole_int(msg, idx, 2) sub_paks_end = idx + sub_paks_len self.unhashed_subpaks = [] while idx < sub_paks_end : sp, idx = self.deserialize_subpacket(msg, idx) self.unhashed_subpaks.append(sp) else : raise 'unknown signature packet version %d at %d' % (self.version, idx) self.hash_frag, idx = get_whole_number(msg, idx, 2) if self.pk_algo == ALGO_PK_RSA_ENC_OR_SIGN or self.pk_algo == ALGO_PK_RSA_SIGN_ONLY : self.rsa_sig, idx = get_mpi(msg, idx) elif self.pk_algo == ALGO_PK_DSA : self.dsa_sig_r, idx = get_mpi(msg, idx) self.dsa_sig_s, idx = get_mpi(msg, idx) else : raise 'unknown public-key algorithm (%d) in signature at %d' % (self.pk_algo, idx) return idx
5d7aa9157d2f53056609972b4318766aa186bfd1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/5d7aa9157d2f53056609972b4318766aa186bfd1/pgpmsg.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7673, 12, 2890, 16, 1234, 16, 2067, 16, 11536, 67, 1897, 13, 294, 365, 18, 1589, 16, 2067, 273, 336, 67, 3350, 790, 67, 474, 12, 3576, 16, 2067, 16, 404, 13, 309, 365, 18, 1589, 42...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7673, 12, 2890, 16, 1234, 16, 2067, 16, 11536, 67, 1897, 13, 294, 365, 18, 1589, 16, 2067, 273, 336, 67, 3350, 790, 67, 474, 12, 3576, 16, 2067, 16, 404, 13, 309, 365, 18, 1589, 42...
self.failUnlessEqual(99, getargs_n(Long())) self.failUnlessEqual(99, getargs_n(Int()))
self.assertRaises(TypeError, getargs_n, Long()) self.assertRaises(TypeError, getargs_n, Int())
def test_n(self): from _testcapi import getargs_n # n returns 'Py_ssize_t', and does range checking # (PY_SSIZE_T_MIN ... PY_SSIZE_T_MAX) self.assertRaises(TypeError, getargs_n, 3.14) self.failUnlessEqual(99, getargs_n(Long())) self.failUnlessEqual(99, getargs_n(Int()))
a478237f7b876f973998e24e3ac62f46f8a8d0f0 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8125/a478237f7b876f973998e24e3ac62f46f8a8d0f0/test_getargs2.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 82, 12, 2890, 4672, 628, 389, 3813, 71, 2425, 1930, 336, 1968, 67, 82, 468, 290, 1135, 296, 9413, 67, 1049, 554, 67, 88, 2187, 471, 1552, 1048, 6728, 468, 261, 16235, 67, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 82, 12, 2890, 4672, 628, 389, 3813, 71, 2425, 1930, 336, 1968, 67, 82, 468, 290, 1135, 296, 9413, 67, 1049, 554, 67, 88, 2187, 471, 1552, 1048, 6728, 468, 261, 16235, 67, 1...
cursor, user, statement.move.id, {'state': 'posted'},
cursor, user, [m.id for m in statement.moves], {'state': 'posted'},
def set_state_done(self, cursor, user, statement_id, context=None): move_obj = self.pool.get('account.move') statement = self.browse(cursor, user, statement_id, context=context) move_obj.write( cursor, user, statement.move.id, {'state': 'posted'}, context=context) self.write( cursor, user, statement_id, {'state':'done'}, context=context)
dfe8497e441e7eb98f8e39e1431c514b26b8b920 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9288/dfe8497e441e7eb98f8e39e1431c514b26b8b920/statement.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 2019, 67, 8734, 12, 2890, 16, 3347, 16, 729, 16, 3021, 67, 350, 16, 819, 33, 7036, 4672, 3635, 67, 2603, 273, 365, 18, 6011, 18, 588, 2668, 4631, 18, 8501, 6134, 3021, 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, 444, 67, 2019, 67, 8734, 12, 2890, 16, 3347, 16, 729, 16, 3021, 67, 350, 16, 819, 33, 7036, 4672, 3635, 67, 2603, 273, 365, 18, 6011, 18, 588, 2668, 4631, 18, 8501, 6134, 3021, 273, ...
factoids = get_factoid(session, name, number, pattern, is_regex, True)
factoids = get_factoid(session, name, number, pattern, is_regex, all=True)
def modify(self, event, name, number, pattern, is_regex, operation, separator): session = ibid.databases.ibid() factoids = get_factoid(session, name, number, pattern, is_regex, True) if len(factoids) == 0: if pattern: event.addresponse(u"I don't know about any %(name)s matching %(pattern)s", { 'name': name, 'pattern': pattern, }) else: event.addresponse(u"I don't know about %s", name) elif len(factoids) > 1: event.addresponse(u"Pattern matches multiple factoids, please be more specific") else: factoidadmin = auth_responses(event, u'factoidadmin') identities = get_identities(event, session) factoid = factoids[0]
f225bef6763e5cd591e5cd93f62d6ea13a804264 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12048/f225bef6763e5cd591e5cd93f62d6ea13a804264/factoid.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5612, 12, 2890, 16, 871, 16, 508, 16, 1300, 16, 1936, 16, 353, 67, 7584, 16, 1674, 16, 4182, 4672, 1339, 273, 9834, 350, 18, 3404, 19684, 18, 495, 350, 1435, 5410, 21061, 273, 336, 6...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5612, 12, 2890, 16, 871, 16, 508, 16, 1300, 16, 1936, 16, 353, 67, 7584, 16, 1674, 16, 4182, 4672, 1339, 273, 9834, 350, 18, 3404, 19684, 18, 495, 350, 1435, 5410, 21061, 273, 336, 6...
raise StandardError res = run_sql("SELECT score FROM collection_field_fieldvalue WHERE id_collection=%s AND type='%s' ORDER BY score desc" % (colID, type)) if res: score = int(res[0][0])
return (0, (1, "Already exists"))
def add_col_fld(colID, fldID, type, fldvID=''): """Add a sort/search/field to the collection. colID - the id of the collection involved fldID - the id of the field. fldvID - the id of the fieldvalue. type - which type, seo, sew... score - the score of the format, decides sorting, if not given, place the format on top""" try: if fldvID and fldvID not in [-1, "-1"]: run_sql("DELETE FROM collection_field_fieldvalue WHERE id_collection=%s AND id_field=%s and type='%s' and id_fieldvalue is NULL" % (colID, fldID, type)) res = run_sql("SELECT score FROM collection_field_fieldvalue WHERE id_collection=%s AND id_field=%s and type='%s' ORDER BY score desc" % (colID, fldID, type)) if res: score = int(res[0][0]) res = run_sql("SELECT score_fieldvalue FROM collection_field_fieldvalue WHERE id_collection=%s AND id_field=%s and type='%s' ORDER BY score_fieldvalue desc" % (colID, fldID, type)) if res: v_score = int(res[0][0]) else: v_score = 0 else: res = run_sql("SELECT score FROM collection_field_fieldvalue WHERE id_collection=%s and type='%s' ORDER BY score desc" % (colID, type)) if res: score = int(res[0][0]) + 1 else: score = 1 v_score = 0 res = run_sql("SELECT * FROM collection_field_fieldvalue where id_field=%s and id_collection=%s and type='%s' and id_fieldvalue=%s" % (fldID, colID, type, fldvID)) if not res: res = run_sql("INSERT INTO collection_field_fieldvalue(id_field, id_fieldvalue, id_collection, type, score, score_fieldvalue) values (%s,%s,%s,'%s',%s,%s)" % (fldID, fldvID, colID, type, score, (v_score + 1))) else: return (0, (0,"Already exists")) else: res = run_sql("SELECT * FROM collection_field_fieldvalue WHERE id_collection=%s AND type='%s' and id_field=%s and id_fieldvalue is NULL" % (colID, type, fldID)) if res: raise StandardError res = run_sql("SELECT score FROM collection_field_fieldvalue WHERE id_collection=%s AND type='%s' ORDER BY score desc" % (colID, type)) if res: score = int(res[0][0]) else: score = 0 res = run_sql("INSERT INTO collection_field_fieldvalue(id_field, id_collection, type, score,score_fieldvalue) values (%s,%s,'%s',%s, 0)" % (fldID, colID, type, (score + 1))) return (1, "") except StandardError, e: return (0, e)
a7dc1251228978ff43acad8ffd11009d6c08e560 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2139/a7dc1251228978ff43acad8ffd11009d6c08e560/websearchadminlib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 1293, 67, 19794, 12, 1293, 734, 16, 9880, 734, 16, 618, 16, 9880, 90, 734, 2218, 11, 4672, 3536, 986, 279, 1524, 19, 3072, 19, 1518, 358, 326, 1849, 18, 645, 734, 300, 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, 527, 67, 1293, 67, 19794, 12, 1293, 734, 16, 9880, 734, 16, 618, 16, 9880, 90, 734, 2218, 11, 4672, 3536, 986, 279, 1524, 19, 3072, 19, 1518, 358, 326, 1849, 18, 645, 734, 300, 326, ...
rf12.write("acP%c" % remadr)
remadr = 1 rf12.write("acB%c" % remadr)
def run ( self ): global ar global status while 1: if self.readline(): if len(ar) > 3 and ar[0] == 'P': #print #received packet print "%s Sender=%d Rec=%d Seq=%d Data:" % (time.time(),ord(ar[3]),ord(ar[2]),ord(ar[1])) print ar[4:] elif len(ar) > 1 and ar[0] == 'D': #debug info if ar[1] != 'f': #print time.time() print "%s Debug: %s" % (time.time() ,''.join(ar[1:])) #ar[0] = 'D' elif len(ar) > 1 and ar[0] == 'E': #debug info print "%s -----------Error: %s-----------------" % (time.time() ,''.join(ar[1:])) elif len(ar) > 1 and ar[0] == 'S': if ar[1] == 'D': #print "Status: done" status = 'D' elif ar[1] == 'T': #print time.time() print "%s ------------------Status: timeout--------------------" % time.time() status = 'T' else: print "?: %s" % ar
df8f7c831c89b8e1eeb2aa8512fe097e89393d42 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11679/df8f7c831c89b8e1eeb2aa8512fe097e89393d42/rfinterface.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 261, 365, 262, 30, 2552, 419, 2552, 1267, 1323, 404, 30, 309, 365, 18, 896, 1369, 13332, 309, 562, 12, 297, 13, 405, 890, 471, 419, 63, 20, 65, 422, 296, 52, 4278, 468, 1188, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 261, 365, 262, 30, 2552, 419, 2552, 1267, 1323, 404, 30, 309, 365, 18, 896, 1369, 13332, 309, 562, 12, 297, 13, 405, 890, 471, 419, 63, 20, 65, 422, 296, 52, 4278, 468, 1188, ...
referenceFileName = '%s/spec_%d.00_%d.00_%s\n' % (htmlReferenceDir,thisStartFreq,thisEndFreq,htmlRefIFOEpoch)
referenceFileName = '%s/spec_%d.00_%d.00_%s' % (htmlReferenceDir,thisStartFreq,thisEndFreq,htmlRefIFOEpoch)
def usage(): msg = """\
1bd0f87f658eba57ba99b5b05ca7b9dd3fc15b4e /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5758/1bd0f87f658eba57ba99b5b05ca7b9dd3fc15b4e/fscanDriver.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4084, 13332, 1234, 273, 3536, 64, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4084, 13332, 1234, 273, 3536, 64, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
print '\t\t\t%s' % (a_participant.attendee_status.value,)
if a_participant.attendee_status: print '\t\t\t%s' % (a_participant.attendee_status.value,)
def _PrintAllEventsOnDefaultCalendar(self): """Retrieves all events on the primary calendar for the authenticated user. In reality, the server limits the result set intially returned. You can use the max_results query parameter to allow the server to send additional results back (see query parameter use in DateRangeQuery for more info). Additionally, you can page through the results returned by using the feed.GetNextLink().href value to get the location of the next set of results.""" feed = self.cal_client.GetCalendarEventFeed() print 'Events on Primary Calendar: %s' % (feed.title.text,) for i, an_event in zip(xrange(len(feed.entry)), feed.entry): print '\t%s. %s' % (i, an_event.title.text,) for p, a_participant in zip(xrange(len(an_event.who)), an_event.who): print '\t\t%s. %s' % (p, a_participant.email,) print '\t\t\t%s' % (a_participant.name,) print '\t\t\t%s' % (a_participant.attendee_status.value,)
2c849e341b19bc3b196a2b175fd174f64f9364a8 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10620/2c849e341b19bc3b196a2b175fd174f64f9364a8/calendarExample.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5108, 1595, 3783, 1398, 1868, 7335, 12, 2890, 4672, 3536, 6960, 777, 2641, 603, 326, 3354, 5686, 364, 326, 9370, 729, 18, 657, 2863, 560, 16, 326, 1438, 8181, 326, 563, 444, 509, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 5108, 1595, 3783, 1398, 1868, 7335, 12, 2890, 4672, 3536, 6960, 777, 2641, 603, 326, 3354, 5686, 364, 326, 9370, 729, 18, 657, 2863, 560, 16, 326, 1438, 8181, 326, 563, 444, 509, ...
"""
r""" Coerces the element x into this Laurent series ring. INPUT: x -- the element to coerce n -- the result of the coercion will be multiplied by $t^n$ (default: 0)
def __call__(self, x, n=0): """ EXAMPLES: sage: R.<u> = LaurentSeriesRing(Qp(5, 10)) sage: S.<t> = LaurentSeriesRing(RationalField()) sage: print R(t + t^2 + O(t^3)) (1 + O(5^10))*u + (1 + O(5^10))*u^2 + O(u^3)
37b7cd1f7116bcccf35cb1905789b2cbe70d1503 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/37b7cd1f7116bcccf35cb1905789b2cbe70d1503/laurent_series_ring.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 619, 16, 290, 33, 20, 4672, 436, 8395, 7695, 264, 764, 326, 930, 619, 1368, 333, 511, 8377, 547, 4166, 9221, 18, 225, 12943, 30, 619, 1493, 326, 930, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 619, 16, 290, 33, 20, 4672, 436, 8395, 7695, 264, 764, 326, 930, 619, 1368, 333, 511, 8377, 547, 4166, 9221, 18, 225, 12943, 30, 619, 1493, 326, 930, 3...
self.ofile.write('BUILD_DIRS = %s %s\n' % (string.join(self.target_dirs.keys()), string.join(script_dirs)))
script_dirs = map(os.path.dirname, scripts + fs_scripts) build_dirs = self.target_dirs.copy() for d in script_dirs: build_dirs[d] = None self.ofile.write('BUILD_DIRS = %s\n' % string.join(build_dirs.keys()))
def write(self): errors = 0 for target in self.target_names: target_ob = self.targets[target]
7fb8f6dc51b92a34b2aa3675f29d3450f05747c5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6036/7fb8f6dc51b92a34b2aa3675f29d3450f05747c5/gen_base.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 12, 2890, 4672, 1334, 273, 374, 364, 1018, 316, 365, 18, 3299, 67, 1973, 30, 1018, 67, 947, 273, 365, 18, 11358, 63, 3299, 65, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 12, 2890, 4672, 1334, 273, 374, 364, 1018, 316, 365, 18, 3299, 67, 1973, 30, 1018, 67, 947, 273, 365, 18, 11358, 63, 3299, 65, 2, -100, -100, -100, -100, -100, -100, -100, -100, ...
elif line[:2]=="//": rest = line[2:].strip() if rest.startswith("@pyswig"): doc, lineNo = GetComments(line, lineNo, lines) curMethod = doc[8:], [] methods.append(curMethod) elif rest.startswith("@pymeth "): doc, lineNo = GetComments(line, lineNo, lines) nativeMethods.append(line+doc)
else: try: pos = line.index("//") except ValueError: pass
def make_doc_summary(inFile, outFile): methods = [] nativeMethods = [] modDoc = "" modName = "" lines = inFile.readlines() curMethod = None constants = [] extra_tags = [] lineNo = 0 bInRawBlock = 0 while lineNo < len(lines): line = lines[lineNo] if bInRawBlock and len(line)>2 and line[:2]=="%}": bInRawBlock = 0 if not bInRawBlock and len(line)>2 and line[:2]=="%{": bInRawBlock = 1 try: if line[:7]=="%module": extra = string.split(line, "//") if len(extra)>1: modName = string.strip(extra[0][7:]) modDoc, lineNo = GetComments(line, lineNo, lines) lineNo += 1 elif line[:7]=="#define" and not bInRawBlock: cname = string.split(line)[1] doc, lineNo = GetComments(line, lineNo, lines) constants.append((cname, doc)) elif line[:2]=="//": rest = line[2:].strip() if rest.startswith("@pyswig"): doc, lineNo = GetComments(line, lineNo, lines) curMethod = doc[8:], [] methods.append(curMethod) elif rest.startswith("@pymeth "): doc, lineNo = GetComments(line, lineNo, lines) nativeMethods.append(line+doc) else: if rest.startswith("@"): doc, lineNo = GetComments(line, lineNo, lines) if curMethod: curMethod[1].append("// " + doc + '\n') else: extra_tags.append("// " + doc + '\n') except: print "Line %d is badly formed - %s" % (lineNo, str(sys.exc_value)) lineNo = lineNo + 1 # autoduck seems to crash when > ~97 methods. Loop multiple times, # creating a synthetic module name when this happens. max_methods = 90 # native ones first - hopefully never more than 90 of them! assert len(nativeMethods) < max_methods method_num = len(nativeMethods) chunk_number = 0 while 1: these_methods = methods[method_num:method_num+max_methods] if not these_methods: break thisModName = modName if g_com_parent: thisModName = "Py" + modName if chunk_number == 0: pass elif chunk_number == 1: thisModName = thisModName + " (more)" else: thisModName = thisModName + " (more %d)" % (chunk_number+1,) for (meth, extras) in these_methods: fields = string.split(meth,'|') if len(fields)<>3: print "**Error - %s does not have enough fields" % meth else: outFile.write("\n// @pymethod %s|%s|%s|%s\n" % (fields[0],thisModName,fields[1], fields[2])) for extra in extras: outFile.write(extra) if g_com_parent: outFile.write("\n// @object %s|%s" % (thisModName,modDoc)) outFile.write("\n// <nl>Derived from <o %s>\n" % (g_com_parent)) else: outFile.write("\n// @module %s|%s\n" % (thisModName,modDoc)) for (meth, extras) in these_methods: fields = string.split(meth,'|') outFile.write("// @pymeth %s|%s\n" % (fields[1], fields[2])) if chunk_number == 0: for meth in nativeMethods: outFile.write(meth) outFile.write("\n") chunk_number += 1 method_num += max_methods outFile.write("\n") for (cname, doc) in constants: outFile.write("// @const %s|%s|%s\n" % (modName, cname, doc) ) for extra in extra_tags: outFile.write("%s\n" % (extra) )
de6d785f6e32e155061010dd66103baf7ea116fe /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/677/de6d785f6e32e155061010dd66103baf7ea116fe/makedfromi.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 67, 2434, 67, 7687, 12, 267, 812, 16, 21651, 4672, 2590, 273, 5378, 6448, 4712, 273, 5378, 681, 1759, 273, 1408, 681, 461, 273, 1408, 2362, 273, 316, 812, 18, 896, 3548, 1435, 66...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2434, 67, 7687, 12, 267, 812, 16, 21651, 4672, 2590, 273, 5378, 6448, 4712, 273, 5378, 681, 1759, 273, 1408, 681, 461, 273, 1408, 2362, 273, 316, 812, 18, 896, 3548, 1435, 66...
license=info.get('license', 'GPL-2'),
license='GPL-3',
def add_defaults(self): sdist.sdist.add_defaults(self) if self.distribution.has_pure_modules(): build_py = self.get_finalized_command('build_py') data = [] for package in build_py.packages: src_dir = build_py.get_package_dir(package) data.extend(build_py.find_data_files(package, src_dir)) self.filelist.extend(data)
f4e2b0c18d2ead5cefbc74835f8ac2e3008aae90 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9285/f4e2b0c18d2ead5cefbc74835f8ac2e3008aae90/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 7606, 12, 2890, 4672, 272, 4413, 18, 87, 4413, 18, 1289, 67, 7606, 12, 2890, 13, 309, 365, 18, 16279, 18, 5332, 67, 84, 594, 67, 6400, 13332, 1361, 67, 2074, 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 7606, 12, 2890, 4672, 272, 4413, 18, 87, 4413, 18, 1289, 67, 7606, 12, 2890, 13, 309, 365, 18, 16279, 18, 5332, 67, 84, 594, 67, 6400, 13332, 1361, 67, 2074, 273, 365, 18, ...
BasicLogger.setLevel(2)
BasicLogger.setLevel(DEBUG)
def setBasicLoggerDEBUG(): '''Use Basic Logger. ''' setLoggerClass(BasicLogger) BasicLogger.setLevel(2)
0e572c485ebb264ee85b8afc2865034ce368ae54 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/13054/0e572c485ebb264ee85b8afc2865034ce368ae54/logging.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 8252, 3328, 9394, 13332, 9163, 3727, 7651, 4242, 18, 9163, 28423, 797, 12, 8252, 3328, 13, 7651, 3328, 18, 542, 2355, 12, 9394, 13, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 8252, 3328, 9394, 13332, 9163, 3727, 7651, 4242, 18, 9163, 28423, 797, 12, 8252, 3328, 13, 7651, 3328, 18, 542, 2355, 12, 9394, 13, 225, 2, -100, -100, -100, -100, -100, -100, -100,...
h= env.CXXFile( source= bison, target= [ bison_name+".cpp", bison_name + bison_ext ] )
h= env.CXXFile(source= bison, target= [ bison_name+".cpp", bison_name + bison_ext ], LEXFLAGS=LEXFLAGS, YACCFLAGS=YACCFLAGS)
def BisonFlex( env, bison, flex, prefix ): """ Smart autoscan function. """ if prefix : env.Append( LEXFLAGS="-P"+prefix) env.Append( YACCFLAGS="-p "+prefix) targets=[] bison_ext= ".hpp" if not env[ "BISON_HPP" ]: bison_ext= ".cpp.h" ( bison_name, ext )= os.path.splitext( bison ) h= env.CXXFile( source= bison, target= [ bison_name+".cpp", bison_name + bison_ext ] ) targets.append( h[0] ) ( flex_name, ext )= os.path.splitext( flex ) cpp= env.CXXFile( source= flex ) targets.append( cpp ) return targets
fbfd526cbfb804b49f6aecbd8c94a5a81d1c62a5 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6794/fbfd526cbfb804b49f6aecbd8c94a5a81d1c62a5/config.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 605, 4530, 19667, 12, 1550, 16, 324, 4530, 16, 16600, 16, 1633, 262, 30, 3536, 19656, 13133, 4169, 445, 18, 3536, 225, 309, 1633, 294, 1550, 18, 5736, 12, 511, 2294, 17836, 1546, 17, 5...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 605, 4530, 19667, 12, 1550, 16, 324, 4530, 16, 16600, 16, 1633, 262, 30, 3536, 19656, 13133, 4169, 445, 18, 3536, 225, 309, 1633, 294, 1550, 18, 5736, 12, 511, 2294, 17836, 1546, 17, 5...
"""Return a list of weights in self with their multiplicities. EXAMPLE: sage: B3 = WeylCharacterRing(['B',3]) sage: B3(1/2,1/2,1/2).mlist() [[(1/2, 1/2, 1/2), 1], [(-1/2, 1/2, -1/2), 1], [(-1/2, -1/2, -1/2), 1], [(1/2, -1/2, 1/2), 1], [(-1/2, 1/2, 1/2), 1], [(1/2, -1/2, -1/2), 1], [(-1/2, -1/2, 1/2), 1], [(1/2, 1/2, -1/2), 1]]
""" Returns a list of weights in self with their multiplicities. EXAMPLES: sage: B3 = WeylCharacterRing(['B',3]) sage: B3(1/2,1/2,1/2).mlist() [[(1/2, 1/2, 1/2), 1], [(-1/2, 1/2, -1/2), 1], [(-1/2, -1/2, -1/2), 1], [(1/2, -1/2, 1/2), 1], [(-1/2, 1/2, 1/2), 1], [(1/2, -1/2, -1/2), 1], [(-1/2, -1/2, 1/2), 1], [(1/2, 1/2, -1/2), 1]]
def mlist(self): """Return a list of weights in self with their multiplicities. EXAMPLE: sage: B3 = WeylCharacterRing(['B',3]) sage: B3(1/2,1/2,1/2).mlist() [[(1/2, 1/2, 1/2), 1], [(-1/2, 1/2, -1/2), 1], [(-1/2, -1/2, -1/2), 1], [(1/2, -1/2, 1/2), 1], [(-1/2, 1/2, 1/2), 1], [(1/2, -1/2, -1/2), 1], [(-1/2, -1/2, 1/2), 1], [(1/2, 1/2, -1/2), 1]] """ return [[self._parent.VS(k),m] for k,m in self._mdict.iteritems()]
0a30ee9b10542e4dc66149f6ffe87504cb679b84 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/0a30ee9b10542e4dc66149f6ffe87504cb679b84/weyl_characters.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 312, 1098, 12, 2890, 4672, 3536, 2860, 279, 666, 434, 5376, 316, 365, 598, 3675, 3309, 1780, 1961, 18, 225, 5675, 8900, 11386, 30, 272, 410, 30, 605, 23, 273, 678, 402, 80, 7069, 10369...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 312, 1098, 12, 2890, 4672, 3536, 2860, 279, 666, 434, 5376, 316, 365, 598, 3675, 3309, 1780, 1961, 18, 225, 5675, 8900, 11386, 30, 272, 410, 30, 605, 23, 273, 678, 402, 80, 7069, 10369...
if type == "matrix":
if typ == "matrix":
def hex_str(self, M, type="matrix"): r""" Return a hex string for the provided AES state array/matrix.
62424369e932ac59629cb4d40b7e47ae2a712293 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/62424369e932ac59629cb4d40b7e47ae2a712293/sr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3827, 67, 701, 12, 2890, 16, 490, 16, 618, 1546, 5667, 6, 4672, 436, 8395, 2000, 279, 3827, 533, 364, 326, 2112, 15986, 919, 526, 19, 5667, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3827, 67, 701, 12, 2890, 16, 490, 16, 618, 1546, 5667, 6, 4672, 436, 8395, 2000, 279, 3827, 533, 364, 326, 2112, 15986, 919, 526, 19, 5667, 18, 2, -100, -100, -100, -100, -100, -100, ...
source, _, _ = hg.parseurl(ui.expandpath("default"), None) other = hg.repository(cmdutil.remoteui(repo, opts), source)
other = getremote(ui, repo, opts)
def sync(ui, repo, **opts): """synchronize with remote repository Incorporates recent changes from the remote repository into the local repository. """ ui.status = sync_note ui.note = sync_note source, _, _ = hg.parseurl(ui.expandpath("default"), None) other = hg.repository(cmdutil.remoteui(repo, opts), source) modheads = repo.pull(other) err = commands.postincoming(ui, repo, modheads, True, "tip") if err: return err sync_changes(ui, repo)
3923648111167109b264da8caaf1d3a99d9cfe9a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5761/3923648111167109b264da8caaf1d3a99d9cfe9a/codereview.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3792, 12, 4881, 16, 3538, 16, 2826, 4952, 4672, 3536, 87, 2600, 554, 598, 2632, 3352, 225, 657, 3850, 3831, 815, 8399, 3478, 628, 326, 2632, 3352, 1368, 326, 1191, 3352, 18, 3536, 5915, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3792, 12, 4881, 16, 3538, 16, 2826, 4952, 4672, 3536, 87, 2600, 554, 598, 2632, 3352, 225, 657, 3850, 3831, 815, 8399, 3478, 628, 326, 2632, 3352, 1368, 326, 1191, 3352, 18, 3536, 5915, ...
msg.attach(email.MIMEText.MIMEText('\n'.join(patch), 'x-patch'))
p = email.MIMEText.MIMEText('\n'.join(patch), 'x-patch') node = bin(node) patchname = [t for t in repo.nodetags(node) if t.endswith('.patch') or t.endswith('.diff')] if patchname: patchname = patchname[0] elif total > 1: patchname = commands.make_filename(repo, '%b-%n.patch', node, idx, total) else: patchname = commands.make_filename(repo, '%b.patch', node) p['Content-Disposition'] = 'inline; filename=' + patchname msg.attach(p)
def makepatch(patch, idx, total): desc = [] node = None body = '' for line in patch: if line.startswith('#'): if line.startswith('# Node ID'): node = line.split()[-1] continue if line.startswith('diff -r'): break desc.append(line) if not node: raise ValueError
90405ab703676fd59a36d4de50977f72e83577ae /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11312/90405ab703676fd59a36d4de50977f72e83577ae/patchbomb.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 29796, 881, 505, 12, 2272, 16, 2067, 16, 2078, 4672, 3044, 273, 5378, 756, 273, 599, 1417, 273, 875, 364, 980, 316, 4729, 30, 309, 980, 18, 17514, 1918, 2668, 10038, 4672, 309, 980, 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, 29796, 881, 505, 12, 2272, 16, 2067, 16, 2078, 4672, 3044, 273, 5378, 756, 273, 599, 1417, 273, 875, 364, 980, 316, 4729, 30, 309, 980, 18, 17514, 1918, 2668, 10038, 4672, 309, 980, 18...
raise TypeError, "sbox constant only defined for e in (4,8)"
raise TypeError, "sbox constant only defined for e in (4, 8)"
def sbox_constant(self): """ Return the sbox constant which is added after $L(x^{-1})$ was performed. That is 0x63 if e == 8 or 0x6 if e == 4.
62424369e932ac59629cb4d40b7e47ae2a712293 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/62424369e932ac59629cb4d40b7e47ae2a712293/sr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 272, 2147, 67, 14384, 12, 2890, 4672, 3536, 2000, 326, 272, 2147, 5381, 1492, 353, 3096, 1839, 271, 48, 12, 92, 66, 95, 17, 21, 6792, 8, 1703, 9591, 18, 12466, 353, 374, 92, 4449, 30...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 272, 2147, 67, 14384, 12, 2890, 4672, 3536, 2000, 326, 272, 2147, 5381, 1492, 353, 3096, 1839, 271, 48, 12, 92, 66, 95, 17, 21, 6792, 8, 1703, 9591, 18, 12466, 353, 374, 92, 4449, 30...
@return: -1 - no more fixups otherwise returns the next
@return: -1 - no more fixups otherwise returns the next
def GetNextFixupEA(ea): """ Find next address with fixup information @param ea: current address @return: -1 - no more fixups otherwise returns the next address with fixup information """ return idaapi.get_next_fixup_ea(ea)
bf1ab9894aabbc1bcdadb6513fc5ef25283e4f52 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3410/bf1ab9894aabbc1bcdadb6513fc5ef25283e4f52/idc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 968, 2134, 8585, 416, 41, 37, 12, 24852, 4672, 3536, 4163, 1024, 1758, 598, 2917, 416, 1779, 225, 632, 891, 24164, 30, 783, 1758, 225, 632, 2463, 30, 300, 21, 300, 1158, 1898, 2917, 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, 968, 2134, 8585, 416, 41, 37, 12, 24852, 4672, 3536, 4163, 1024, 1758, 598, 2917, 416, 1779, 225, 632, 891, 24164, 30, 783, 1758, 225, 632, 2463, 30, 300, 21, 300, 1158, 1898, 2917, 18...
sre_tagged_numeration_near_line_start = sre.compile(r'^.{0,4}?<CDS (VOL|SER)>', sre.UNICODE)
sre_tagged_numeration_near_line_start = \ sre.compile(r'^.{0,4}?<CDS (VOL|SER)>', sre.UNICODE)
def get_bad_char_replacements(): """When a document is converted to plain-text from PDF, certain characters may result in the plain-text, that are either unwanted, or broken. These characters need to be corrected or removed. Examples are, certain control characters that would be illegal in XML and must be removed; TeX ligatures (etc); broken accents such as umlauts on letters that must be corrected. This function returns a dictionary of (unwanted) characters to look for and the characters that should be used to replace them. @return: (dictionary) - { seek -> replace, } or charsacters to replace in plain-text. """ replacements = { ## Control characters not allowed in XML: u'\u2028' : u"", u'\u2029' : u"", u'\u202A' : u"", u'\u202B' : u"", u'\u202C' : u"", u'\u202D' : u"", u'\u202E' : u"", u'\u206A' : u"", u'\u206B' : u"", u'\u206C' : u"", u'\u206D' : u"", u'\u206E' : u"", u'\u206F' : u"", u'\uFFF9' : u"", u'\uFFFA' : u"", u'\uFFFB' : u"", u'\uFFFC' : u"", u'\uFEFF' : u"", ## Language Tag Code Points: u"\U000E0000" : u"", u"\U000E0001" : u"", u"\U000E0002" : u"", u"\U000E0003" : u"", u"\U000E0004" : u"", u"\U000E0005" : u"", u"\U000E0006" : u"", u"\U000E0007" : u"", u"\U000E0008" : u"", u"\U000E0009" : u"", u"\U000E000A" : u"", u"\U000E000B" : u"", u"\U000E000C" : u"", u"\U000E000D" : u"", u"\U000E000E" : u"", u"\U000E000F" : u"", u"\U000E0010" : u"", u"\U000E0011" : u"", u"\U000E0012" : u"", u"\U000E0013" : u"", u"\U000E0014" : u"", u"\U000E0015" : u"", u"\U000E0016" : u"", u"\U000E0017" : u"", u"\U000E0018" : u"", u"\U000E0019" : u"", u"\U000E001A" : u"", u"\U000E001B" : u"", u"\U000E001C" : u"", u"\U000E001D" : u"", u"\U000E001E" : u"", u"\U000E001F" : u"", u"\U000E0020" : u"", u"\U000E0021" : u"", u"\U000E0022" : u"", u"\U000E0023" : u"", u"\U000E0024" : u"", u"\U000E0025" : u"", u"\U000E0026" : u"", u"\U000E0027" : u"", u"\U000E0028" : u"", u"\U000E0029" : u"", u"\U000E002A" : u"", u"\U000E002B" : u"", u"\U000E002C" : u"", u"\U000E002D" : u"", u"\U000E002E" : u"", u"\U000E002F" : u"", u"\U000E0030" : u"", u"\U000E0031" : u"", u"\U000E0032" : u"", u"\U000E0033" : u"", u"\U000E0034" : u"", u"\U000E0035" : u"", u"\U000E0036" : u"", u"\U000E0037" : u"", u"\U000E0038" : u"", u"\U000E0039" : u"", u"\U000E003A" : u"", u"\U000E003B" : u"", u"\U000E003C" : u"", u"\U000E003D" : u"", u"\U000E003E" : u"", u"\U000E003F" : u"", u"\U000E0040" : u"", u"\U000E0041" : u"", u"\U000E0042" : u"", u"\U000E0043" : u"", u"\U000E0044" : u"", u"\U000E0045" : u"", u"\U000E0046" : u"", u"\U000E0047" : u"", u"\U000E0048" : u"", u"\U000E0049" : u"", u"\U000E004A" : u"", u"\U000E004B" : u"", u"\U000E004C" : u"", u"\U000E004D" : u"", u"\U000E004E" : u"", u"\U000E004F" : u"", u"\U000E0050" : u"", u"\U000E0051" : u"", u"\U000E0052" : u"", u"\U000E0053" : u"", u"\U000E0054" : u"", u"\U000E0055" : u"", u"\U000E0056" : u"", u"\U000E0057" : u"", u"\U000E0058" : u"", u"\U000E0059" : u"", u"\U000E005A" : u"", u"\U000E005B" : u"", u"\U000E005C" : u"", u"\U000E005D" : u"", u"\U000E005E" : u"", u"\U000E005F" : u"", u"\U000E0060" : u"", u"\U000E0061" : u"", u"\U000E0062" : u"", u"\U000E0063" : u"", u"\U000E0064" : u"", u"\U000E0065" : u"", u"\U000E0066" : u"", u"\U000E0067" : u"", u"\U000E0068" : u"", u"\U000E0069" : u"", u"\U000E006A" : u"", u"\U000E006B" : u"", u"\U000E006C" : u"", u"\U000E006D" : u"", u"\U000E006E" : u"", u"\U000E006F" : u"", u"\U000E0070" : u"", u"\U000E0071" : u"", u"\U000E0072" : u"", u"\U000E0073" : u"", u"\U000E0074" : u"", u"\U000E0075" : u"", u"\U000E0076" : u"", u"\U000E0077" : u"", u"\U000E0078" : u"", u"\U000E0079" : u"", u"\U000E007A" : u"", u"\U000E007B" : u"", u"\U000E007C" : u"", u"\U000E007D" : u"", u"\U000E007E" : u"", u"\U000E007F" : u"", ## Musical Notation Scoping u"\U0001D173" : u"", u"\U0001D174" : u"", u"\U0001D175" : u"", u"\U0001D176" : u"", u"\U0001D177" : u"", u"\U0001D178" : u"", u"\U0001D179" : u"", u"\U0001D17A" : u"", u'\u0001' : u"", ## START OF HEADING ## START OF TEXT & END OF TEXT: u'\u0002' : u"", u'\u0003' : u"", u'\u0004' : u"", ## END OF TRANSMISSION ## ENQ and ACK u'\u0005' : u"", u'\u0006' : u"", u'\u0007' : u"", # BELL u'\u0008' : u"", # BACKSPACE ## SHIFT-IN & SHIFT-OUT u'\u000E' : u"", u'\u000F' : u"", ## Other controls: u'\u0010' : u"", ## DATA LINK ESCAPE u'\u0011' : u"", ## DEVICE CONTROL ONE u'\u0012' : u"", ## DEVICE CONTROL TWO u'\u0013' : u"", ## DEVICE CONTROL THREE u'\u0014' : u"", ## DEVICE CONTROL FOUR u'\u0015' : u"", ## NEGATIVE ACK u'\u0016' : u"", ## SYNCRONOUS IDLE u'\u0017' : u"", ## END OF TRANSMISSION BLOCK u'\u0018' : u"", ## CANCEL u'\u0019' : u"", ## END OF MEDIUM u'\u001A' : u"", ## SUBSTITUTE u'\u001B' : u"", ## ESCAPE u'\u001C' : u"", ## INFORMATION SEPARATOR FOUR (file separator) u'\u001D' : u"", ## INFORMATION SEPARATOR THREE (group separator) u'\u001E' : u"", ## INFORMATION SEPARATOR TWO (record separator) u'\u001F' : u"", ## INFORMATION SEPARATOR ONE (unit separator) ## \r -> remove it u'\r' : u"", ## Strange parantheses - change for normal: u'\x1c' : u'(', u'\x1d' : u')', ## Some ff from tex: u'\u0013\u0010' : u'\u00ED', u'\x0b' : u'ff', ## fi from tex: u'\x0c' : u'fi', ## ligatures from TeX: u'\ufb00' : u'ff', u'\ufb01' : u'fi', u'\ufb02' : u'fl', u'\ufb03' : u'ffi', u'\ufb04' : u'ffl', ## Superscripts from TeX u'\u2212' : u'-', u'\u2013' : u'-', ## Word style speech marks: u'\u201d' : u'"', u'\u201c' : u'"', ## pdftotext has problems with umlaut and prints it as diaeresis followed by a letter:correct it ## (Optional space between char and letter - fixes broken line examples) u'\u00A8 a' : u'\u00E4', u'\u00A8 e' : u'\u00EB', u'\u00A8 i' : u'\u00EF', u'\u00A8 o' : u'\u00F6', u'\u00A8 u' : u'\u00FC', u'\u00A8 y' : u'\u00FF', u'\u00A8 A' : u'\u00C4', u'\u00A8 E' : u'\u00CB', u'\u00A8 I' : u'\u00CF', u'\u00A8 O' : u'\u00D6', u'\u00A8 U' : u'\u00DC', u'\u00A8 Y' : u'\u0178', u'\xA8a' : u'\u00E4', u'\xA8e' : u'\u00EB', u'\xA8i' : u'\u00EF', u'\xA8o' : u'\u00F6', u'\xA8u' : u'\u00FC', u'\xA8y' : u'\u00FF', u'\xA8A' : u'\u00C4', u'\xA8E' : u'\u00CB', u'\xA8I' : u'\u00CF', u'\xA8O' : u'\u00D6', u'\xA8U' : u'\u00DC', u'\xA8Y' : u'\u0178', ## More umlaut mess to correct: u'\x7fa' : u'\u00E4', u'\x7fe' : u'\u00EB', u'\x7fi' : u'\u00EF', u'\x7fo' : u'\u00F6', u'\x7fu' : u'\u00FC', u'\x7fy' : u'\u00FF', u'\x7fA' : u'\u00C4', u'\x7fE' : u'\u00CB', u'\x7fI' : u'\u00CF', u'\x7fO' : u'\u00D6', u'\x7fU' : u'\u00DC', u'\x7fY' : u'\u0178', u'\x7f a' : u'\u00E4', u'\x7f e' : u'\u00EB', u'\x7f i' : u'\u00EF', u'\x7f o' : u'\u00F6', u'\x7f u' : u'\u00FC', u'\x7f y' : u'\u00FF', u'\x7f A' : u'\u00C4', u'\x7f E' : u'\u00CB', u'\x7f I' : u'\u00CF', u'\x7f O' : u'\u00D6', u'\x7f U' : u'\u00DC', u'\x7f Y' : u'\u0178', ## pdftotext: fix accute accent: u'\x13a' : u'\u00E1', u'\x13e' : u'\u00E9', u'\x13i' : u'\u00ED', u'\x13o' : u'\u00F3', u'\x13u' : u'\u00FA', u'\x13y' : u'\u00FD', u'\x13A' : u'\u00C1', u'\x13E' : u'\u00C9', u'\x13I' : u'\u00CD', u'\x13O' : u'\u00D3', u'\x13U' : u'\u00DA', u'\x13Y' : u'\u00DD', u'\x13 a' : u'\u00E1', u'\x13 e' : u'\u00E9', u'\x13 i' : u'\u00ED', u'\x13 o' : u'\u00F3', u'\x13 u' : u'\u00FA', u'\x13 y' : u'\u00FD', u'\x13 A' : u'\u00C1', u'\x13 E' : u'\u00C9', u'\x13 I' : u'\u00CD', u'\x13 O' : u'\u00D3', u'\x13 U' : u'\u00DA', u'\x13 Y' : u'\u00DD', u'\u00B4 a' : u'\u00E1', u'\u00B4 e' : u'\u00E9', u'\u00B4 i' : u'\u00ED', u'\u00B4 o' : u'\u00F3', u'\u00B4 u' : u'\u00FA', u'\u00B4 y' : u'\u00FD', u'\u00B4 A' : u'\u00C1', u'\u00B4 E' : u'\u00C9', u'\u00B4 I' : u'\u00CD', u'\u00B4 O' : u'\u00D3', u'\u00B4 U' : u'\u00DA', u'\u00B4 Y' : u'\u00DD', u'\u00B4a' : u'\u00E1', u'\u00B4e' : u'\u00E9', u'\u00B4i' : u'\u00ED', u'\u00B4o' : u'\u00F3', u'\u00B4u' : u'\u00FA', u'\u00B4y' : u'\u00FD', u'\u00B4A' : u'\u00C1', u'\u00B4E' : u'\u00C9', u'\u00B4I' : u'\u00CD', u'\u00B4O' : u'\u00D3', u'\u00B4U' : u'\u00DA', u'\u00B4Y' : u'\u00DD', ## pdftotext: fix grave accent: u'\u0060 a' : u'\u00E0', u'\u0060 e' : u'\u00E8', u'\u0060 i' : u'\u00EC', u'\u0060 o' : u'\u00F2', u'\u0060 u' : u'\u00F9', u'\u0060 A' : u'\u00C0', u'\u0060 E' : u'\u00C8', u'\u0060 I' : u'\u00CC', u'\u0060 O' : u'\u00D2', u'\u0060 U' : u'\u00D9', u'\u0060a' : u'\u00E0', u'\u0060e' : u'\u00E8', u'\u0060i' : u'\u00EC', u'\u0060o' : u'\u00F2', u'\u0060u' : u'\u00F9', u'\u0060A' : u'\u00C0', u'\u0060E' : u'\u00C8', u'\u0060I' : u'\u00CC', u'\u0060O' : u'\u00D2', u'\u0060U' : u'\u00D9', ## \02C7 : caron u'\u02C7C' : u'\u010C', u'\u02C7c' : u'\u010D', u'\u02C7S' : u'\u0160', u'\u02C7s' : u'\u0161', u'\u02C7Z' : u'\u017D', u'\u02C7z' : u'\u017E', ## \027 : aa (a with ring above) u'\u02DAa' : u'\u00E5', u'\u02DAA' : u'\u00C5', ## \030 : cedilla u'\u0327c' : u'\u00E7', u'\u0327C' : u'\u00C7', ## \02DC : tilde u'\u02DCn' : u'\u00F1', u'\u02DCN' : u'\u00D1', u'\u02DCo' : u'\u00F5', u'\u02DCO' : u'\u00D5', u'\u02DCa' : u'\u00E3', u'\u02DCA' : u'\u00C3', } return replacements
afd852f45332d11ac027b8d47ce1a922ce7f2cc6 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12027/afd852f45332d11ac027b8d47ce1a922ce7f2cc6/refextract.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 8759, 67, 3001, 67, 2079, 1346, 13332, 3536, 9434, 279, 1668, 353, 5970, 358, 7351, 17, 955, 628, 12667, 16, 8626, 3949, 2026, 563, 316, 326, 7351, 17, 955, 16, 716, 854, 3344...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 8759, 67, 3001, 67, 2079, 1346, 13332, 3536, 9434, 279, 1668, 353, 5970, 358, 7351, 17, 955, 628, 12667, 16, 8626, 3949, 2026, 563, 316, 326, 7351, 17, 955, 16, 716, 854, 3344...
m.y = 1
m.j = 1
def movebaddy(enemy): "Tactical movement for the bad guys." next = coord(); look = coord() irun = False # This should probably be just (game.quadrant in game.state.kcmdr) + (game.state.kscmdr==game.quadrant) if game.skill >= SKILL_EXPERT: nbaddys = (((game.quadrant in game.state.kcmdr)*2 + (game.state.kscmdr==game.quadrant)*2+game.klhere*1.23+game.irhere*1.5)/2.0) else: nbaddys = (game.quadrant in game.state.kcmdr) + (game.state.kscmdr==game.quadrant) dist1 = enemy.kdist mdist = int(dist1 + 0.5); # Nearest integer distance # If SC, check with spy to see if should hi-tail it if enemy.type==IHS and \ (enemy.kpower <= 500.0 or (game.condition=="docked" and not damaged(DPHOTON))): irun = True motion = -QUADSIZE else: # decide whether to advance, retreat, or hold position forces = enemy.kpower+100.0*len(game.enemies)+400*(nbaddys-1) if not game.shldup: forces += 1000; # Good for enemy if shield is down! if not damaged(DPHASER) or not damaged(DPHOTON): if damaged(DPHASER): # phasers damaged forces += 300.0 else: forces -= 0.2*(game.energy - 2500.0) if damaged(DPHOTON): # photon torpedoes damaged forces += 300.0 else: forces -= 50.0*game.torps else: # phasers and photon tubes both out! forces += 1000.0 motion = 0 if forces <= 1000.0 and game.condition != "docked": # Typical situation motion = ((forces + randreal(200))/150.0) - 5.0 else: if forces > 1000.0: # Very strong -- move in for kill motion = (1.0 - randreal())**2 * dist1 + 1.0 if game.condition=="docked" and (game.options & OPTION_BASE): # protected by base -- back off ! motion -= game.skill*(2.0-randreal()**2) if idebug: proutn("=== MOTION = %d, FORCES = %1.2f, " % (motion, forces)) # don't move if no motion if motion==0: return # Limit motion according to skill if abs(motion) > game.skill: if motion < 0: motion = -game.skill else: motion = game.skill # calculate preferred number of steps if motion < 0: nsteps = -motion else: nsteps = motion if motion > 0 and nsteps > mdist: nsteps = mdist; # don't overshoot if nsteps > QUADSIZE: nsteps = QUADSIZE; # This shouldn't be necessary if nsteps < 1: nsteps = 1; # This shouldn't be necessary if idebug: proutn("NSTEPS = %d:" % nsteps) # Compute preferred values of delta X and Y m = game.sector - enemy.kloc if 2.0 * abs(m.x) < abs(m.y): m.x = 0 if 2.0 * abs(m.y) < abs(game.sector.x-enemy.kloc.x): m.y = 0 if m.x != 0: if m.x*motion < 0: m.x = -1 else: m.x = 1 if m.y != 0: if m.y*motion < 0: m.y = -1 else: m.y = 1 next = enemy.kloc # main move loop for ll in range(nsteps): if idebug: proutn(" %d" % (ll+1)) # Check if preferred position available look = next + m if m.x < 0: krawlx = 1 else: krawlx = -1 if m.y < 0: krawly = 1 else: krawly = -1 success = False attempts = 0; # Settle mysterious hang problem while attempts < 20 and not success: attempts += 1 if look.x < 0 or look.x >= QUADSIZE: if motion < 0 and tryexit(enemy, look, irun): return if krawlx == m.x or m.y == 0: break look.x = next.x + krawlx krawlx = -krawlx elif look.y < 0 or look.y >= QUADSIZE: if motion < 0 and tryexit(enemy, look, irun): return if krawly == m.y or m.x == 0: break look.y = next.y + krawly krawly = -krawly elif (game.options & OPTION_RAMMING) and game.quad[look.x][look.y] != IHDOT: # See if enemy should ram ship if game.quad[look.x][look.y] == game.ship and \ (enemy.type == IHC or enemy.type == IHS): collision(rammed=True, enemy=enemy) return if krawlx != m.x and m.y != 0: look.x = next.x + krawlx krawlx = -krawlx elif krawly != m.y and m.x != 0: look.y = next.y + krawly krawly = -krawly else: break; # we have failed else: success = True if success: next = look if idebug: proutn(`next`) else: break; # done early if idebug: skip(1) if enemy.move(next): if not damaged(DSRSENS) or game.condition == "docked": proutn(_("*** %s from Sector %s") % (cramen(enemy.type), enemy.kloc)) if enemy.kdist < dist1: proutn(_(" advances to ")) else: proutn(_(" retreats to ")) prout("Sector %s." % next)
e67cf36a789c4ab1cd905a9a08e91d219395f538 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3176/e67cf36a789c4ab1cd905a9a08e91d219395f538/sst.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3635, 70, 31934, 12, 275, 351, 93, 4672, 315, 56, 621, 1706, 26017, 364, 326, 5570, 3058, 1900, 1199, 1024, 273, 2745, 5621, 2324, 273, 2745, 1435, 277, 2681, 273, 1083, 468, 1220, 1410,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3635, 70, 31934, 12, 275, 351, 93, 4672, 315, 56, 621, 1706, 26017, 364, 326, 5570, 3058, 1900, 1199, 1024, 273, 2745, 5621, 2324, 273, 2745, 1435, 277, 2681, 273, 1083, 468, 1220, 1410,...
print >> f, '\t\treturn NULL;'
print >> f, '\t\tFUNCTION_RETURN(NULL)'
def visit(node): if isinstance(node, Block): localslst.extend(node.getvariables())
0c16b1f9f49e0e17ba9a84715a0e13220b2ea3e0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/0c16b1f9f49e0e17ba9a84715a0e13220b2ea3e0/genc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3757, 12, 2159, 4672, 309, 1549, 12, 2159, 16, 3914, 4672, 1191, 2069, 334, 18, 14313, 12, 2159, 18, 588, 7528, 10756, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3757, 12, 2159, 4672, 309, 1549, 12, 2159, 16, 3914, 4672, 1191, 2069, 334, 18, 14313, 12, 2159, 18, 588, 7528, 10756, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
self.add_field_action('mtime', SORTABLE, type='float') self.add_field_action('revision', SORTABLE, type='float')
self.add_field_action('mtime', INDEX_EXACT) self.add_field_action('revision', STORE_CONTENT) self.add_field_action('revision', INDEX_EXACT)
def _define_fields_actions(self): # XXX: Terms for fields SORTABLE = xappy.FieldActions.SORTABLE INDEX_EXACT = xappy.FieldActions.INDEX_EXACT INDEX_FREETEXT = xappy.FieldActions.INDEX_FREETEXT STORE_CONTENT = xappy.FieldActions.STORE_CONTENT
d007b08d8d666cb582edc2659be9f488803a6758 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/888/d007b08d8d666cb582edc2659be9f488803a6758/Xapian.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 11255, 67, 2821, 67, 4905, 12, 2890, 4672, 468, 11329, 30, 26563, 364, 1466, 11530, 2782, 273, 619, 438, 2074, 18, 974, 6100, 18, 23988, 2782, 12425, 67, 2294, 6526, 273, 619, 438, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 11255, 67, 2821, 67, 4905, 12, 2890, 4672, 468, 11329, 30, 26563, 364, 1466, 11530, 2782, 273, 619, 438, 2074, 18, 974, 6100, 18, 23988, 2782, 12425, 67, 2294, 6526, 273, 619, 438, ...
predata['wpStarttime'] = time.strftime('%Y%m%d%H%M%S', time.gmtime())
predata['wpStarttime'] = time.strftime('%Y%m%d%H%M%S', time.gmtime())
def _putPageOld(self, text, comment=None, watchArticle=False, minorEdit=True, newPage=False, token=None, newToken=False, sysop=False, captcha=None, botflag=True, maxTries=-1): """Upload 'text' as new content of Page by filling out the edit form.
dd69ba008e92f2f3d64571439cc434364aa01062 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4404/dd69ba008e92f2f3d64571439cc434364aa01062/wikipedia.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 458, 1964, 7617, 12, 2890, 16, 977, 16, 2879, 33, 7036, 16, 4267, 7880, 33, 8381, 16, 8439, 4666, 33, 5510, 16, 394, 1964, 33, 8381, 16, 1147, 33, 7036, 16, 394, 1345, 33, 8381,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 458, 1964, 7617, 12, 2890, 16, 977, 16, 2879, 33, 7036, 16, 4267, 7880, 33, 8381, 16, 8439, 4666, 33, 5510, 16, 394, 1964, 33, 8381, 16, 1147, 33, 7036, 16, 394, 1345, 33, 8381,...
result = eval( self.args.rule, dfenv )
evalenv = {} evalenv.update(dfenv) result = eval( self.args.rule, evalenv )
def docheck(self, Config):
6dc32b1c3cc30e401b3a60443a793ffc21c712f3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3643/6dc32b1c3cc30e401b3a60443a793ffc21c712f3/directive.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 1893, 12, 2890, 16, 1903, 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...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 1893, 12, 2890, 16, 1903, 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...
log('DATA_REQUEST:%s' % gif_bitmap_filename)
log('DATA_REQUEST:fileid=%d(pos=%d,size=%d):%s' % ( fileid, position, size, gfx_bitmap_filename))
def def_bitmap2(self, bitmap_code, fileid, *rest): #log('def_bitmap2: bitmap_code=%d, fileid=%d, colorkey=%s' % (bitmap_code, fileid, rest)) gif_bitmap_filename = '%sbitmap%d.%s' % (self.gfx_dir, bitmap_code, self.gfx_extension) if exists(gif_bitmap_filename): #log('SKIP DATA_REQUEST:%s' % gif_bitmap_filename) pass else: self._md5_file[fileid]['bitmap_code'] = bitmap_code self._md5_file[fileid]['colorkey'] = rest position = self._md5_file[fileid]['offset'] size = self._md5_file[fileid]['len_data'] msg = message(CMSG_DATA_REQUEST, fileid, position, size) self.socket.send(msg) log('DATA_REQUEST:%s' % gif_bitmap_filename)
3cb18c99c830806be4edfc5f715dc0bbcb26c753 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/3cb18c99c830806be4edfc5f715dc0bbcb26c753/servermessage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1652, 67, 3682, 1458, 22, 12, 2890, 16, 9389, 67, 710, 16, 585, 350, 16, 380, 8792, 4672, 468, 1330, 2668, 536, 67, 3682, 1458, 22, 30, 9389, 67, 710, 5095, 72, 16, 585, 350, 5095, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1652, 67, 3682, 1458, 22, 12, 2890, 16, 9389, 67, 710, 16, 585, 350, 16, 380, 8792, 4672, 468, 1330, 2668, 536, 67, 3682, 1458, 22, 30, 9389, 67, 710, 5095, 72, 16, 585, 350, 5095, ...
global _powell_funcalls def _myfunc(alpha, func, x0, direc, args=()): funcargs = (x0 + alpha * direc,)+args return func(*funcargs) def _linesearch_powell(func, p, xi, args=(), tol=1e-3):
def _linesearch_powell(func, p, xi, tol=1e-3):
def bracket(func, xa=0.0, xb=1.0, args=(), grow_limit=110.0): """Given a function and distinct initial points, search in the downhill direction (as defined by the initital points) and return new points xa, xb, xc that bracket the minimum of the function: f(xa) > f(xb) < f(xc) """ _gold = 1.618034 _verysmall_num = 1e-21 fa = apply(func, (xa,)+args) fb = apply(func, (xb,)+args) if (fa < fb): # Switch so fa > fb dum = xa; xa = xb; xb = dum dum = fa; fa = fb; fb = dum xc = xb + _gold*(xb-xa) fc = apply(func, (xc,)+args) funcalls = 3 iter = 0 while (fc < fb): tmp1 = (xb - xa)*(fb-fc) tmp2 = (xb - xc)*(fb-fa) val = tmp2-tmp1 if abs(val) < _verysmall_num: denom = 2.0*_verysmall_num else: denom = 2.0*val w = xb - ((xb-xc)*tmp2-(xb-xa)*tmp1)/denom wlim = xb + grow_limit*(xc-xb) if iter > 1000: raise RuntimeError, "Too many iterations." if (w-xc)*(xb-w) > 0.0: fw = apply(func, (w,)+args) funcalls += 1 if (fw < fc): xa = xb; xb=w; fa=fb; fb=fw return xa, xb, xc, fa, fb, fc, funcalls elif (fw > fb): xc = w; fc=fw return xa, xb, xc, fa, fb, fc, funcalls w = xc + _gold*(xc-xb) fw = apply(func, (w,)+args) funcalls += 1 elif (w-wlim)*(wlim-xc) >= 0.0: w = wlim fw = apply(func, (w,)+args) funcalls += 1 elif (w-wlim)*(xc-w) > 0.0: fw = apply(func, (w,)+args) funcalls += 1 if (fw < fc): xb=xc; xc=w; w=xc+_gold*(xc-xb) fb=fc; fc=fw; fw=apply(func, (w,)+args) funcalls += 1 else: w = xc + _gold*(xc-xb) fw = apply(func, (w,)+args) funcalls += 1 xa=xb; xb=xc; xc=w fa=fb; fb=fc; fc=fw return xa, xb, xc, fa, fb, fc, funcalls
926e615eebcd9f2ca3373b1887f74b532b10bda4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/926e615eebcd9f2ca3373b1887f74b532b10bda4/optimize.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9843, 12, 644, 16, 14139, 33, 20, 18, 20, 16, 15970, 33, 21, 18, 20, 16, 833, 33, 9334, 13334, 67, 3595, 33, 17506, 18, 20, 4672, 3536, 6083, 279, 445, 471, 10217, 2172, 3143, 16, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9843, 12, 644, 16, 14139, 33, 20, 18, 20, 16, 15970, 33, 21, 18, 20, 16, 833, 33, 9334, 13334, 67, 3595, 33, 17506, 18, 20, 4672, 3536, 6083, 279, 445, 471, 10217, 2172, 3143, 16, ...
body = context.get_form_value('body')
def new_reply(self, context): body = context.get_form_value('body')
3b838d86710a06bfa99bd20af2526ac017d5816d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12681/3b838d86710a06bfa99bd20af2526ac017d5816d/forum.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 394, 67, 10629, 12, 2890, 16, 819, 4672, 1417, 273, 819, 18, 588, 67, 687, 67, 1132, 2668, 3432, 6134, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 394, 67, 10629, 12, 2890, 16, 819, 4672, 1417, 273, 819, 18, 588, 67, 687, 67, 1132, 2668, 3432, 6134, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
file.setVersion(newVersion) file.applyChange(csInfo) inversion.addFile(fileId, newVersion, oldVersion, old.diff(new))
newFile.applyChange(csInfo) inversion.addFile(fileId, newVersion, oldVersion, origFile.diff(newFile))
def invert(self, repos):
8b1da0aaf62f91ef04236c0e8f6769642947945d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8747/8b1da0aaf62f91ef04236c0e8f6769642947945d/changeset.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9848, 12, 2890, 16, 13686, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9848, 12, 2890, 16, 13686, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
return washer.wash(value, allowed_attribute_whitelist=\ allowed_attribute_whitelist, allowed_tag_whitelist=\ allowed_tag_whitelist )
try: return washer.wash(value, allowed_attribute_whitelist=\ allowed_attribute_whitelist, allowed_tag_whitelist=\ allowed_tag_whitelist ) except HTMLParseError: return cgi.escape(value)
def escape_field(value, mode=0): """ Utility function used to escape the value of a field in given mode. - mode 0: no escaping - mode 1: escaping all HTML/XML characters (escaped chars are shown as escaped) - mode 2: escaping unsafe HTML tags to avoid XSS, but keep basic one (such as <br />) Escaped tags are removed. - mode 3: mix of mode 1 and mode 2. If field_value starts with <!--HTML-->, then use mode 2. Else use mode 1. - mode 4: escaping all HTML/XML tags (escaped tags are removed) - mode 5: same as 2, but allows more tags, like <img> - mode 6: same as 3, but allows more tags, like <img> """ if mode == 1: return cgi.escape(value) elif mode in [2, 5]: allowed_attribute_whitelist = cfg_html_buffer_allowed_attribute_whitelist allowed_tag_whitelist = cfg_html_buffer_allowed_tag_whitelist + \ ['class'] if mode == 5: allowed_attribute_whitelist += ['src', 'alt', 'width', 'height', 'style'] allowed_tag_whitelist += ['img'] return washer.wash(value, allowed_attribute_whitelist=\ allowed_attribute_whitelist, allowed_tag_whitelist= \ allowed_tag_whitelist ) elif mode in [3, 6]: if value.lstrip(' \n').startswith(html_field): allowed_attribute_whitelist = cfg_html_buffer_allowed_attribute_whitelist allowed_tag_whitelist = cfg_html_buffer_allowed_tag_whitelist + \ ['class'] if mode == 6: allowed_attribute_whitelist += ['src', 'alt', 'width', 'height', 'style'] allowed_tag_whitelist += ['img'] return washer.wash(value, allowed_attribute_whitelist=\ allowed_attribute_whitelist, allowed_tag_whitelist=\ allowed_tag_whitelist ) else: return cgi.escape(value) elif mode == 4: return washer.wash(value, allowed_attribute_whitelist=[], allowed_tag_whitelist=[] ) else: return value
ebc2355357781d137e04e0cc29f89ffba75caaa7 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2763/ebc2355357781d137e04e0cc29f89ffba75caaa7/bibformat_engine.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4114, 67, 1518, 12, 1132, 16, 1965, 33, 20, 4672, 3536, 13134, 445, 1399, 358, 4114, 326, 460, 434, 279, 652, 316, 864, 1965, 18, 225, 300, 1965, 374, 30, 1158, 20604, 300, 1965, 404, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4114, 67, 1518, 12, 1132, 16, 1965, 33, 20, 4672, 3536, 13134, 445, 1399, 358, 4114, 326, 460, 434, 279, 652, 316, 864, 1965, 18, 225, 300, 1965, 374, 30, 1158, 20604, 300, 1965, 404, ...
for type, title in self._parseCategory(recurse = recurse, purge = purge, startFrom = startFrom):
for type, title in self._parseCategory(recurse, purge, startFrom):
def _getContentsAndSupercats(self, recurse = False, purge = False, startFrom = None): """ Cache results of _parseCategory for a second call.
815d9901434f2ff6d622d0ccf808499026b5da0e /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4404/815d9901434f2ff6d622d0ccf808499026b5da0e/catlib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 6323, 1876, 8051, 24750, 12, 2890, 16, 11502, 273, 1083, 16, 11668, 273, 1083, 16, 787, 1265, 273, 599, 4672, 3536, 4379, 1686, 434, 389, 2670, 4457, 364, 279, 2205, 745, 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, 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, 588, 6323, 1876, 8051, 24750, 12, 2890, 16, 11502, 273, 1083, 16, 11668, 273, 1083, 16, 787, 1265, 273, 599, 4672, 3536, 4379, 1686, 434, 389, 2670, 4457, 364, 279, 2205, 745, 18, ...
res[event.id]['register_current'] = len(reg_ids)
res[event.id]['register_current'] = number and number[0] or 0.0
def _get_register(self, cr, uid, ids, fields, args, context=None): """Get Confirm or uncofirm register value. @param ids: List of Event registration type's id @param fields: List of function fields(register_current and register_prospect). @param context: A standard dictionary for contextual values @return: Dictionary of function fields value. """ register_pool = self.pool.get('event.registration') res = {} for event in self.browse(cr, uid, ids, context): res[event.id] = {} for field in fields: res[event.id][field] = False state = [] if 'register_current' in fields: state += ['open', 'done'] if 'register_prospect' in fields: state.append('draft')
463d928a0e098afd326eb695c26c8f1e2d65865b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/463d928a0e098afd326eb695c26c8f1e2d65865b/event.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 4861, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 1466, 16, 833, 16, 819, 33, 7036, 4672, 3536, 967, 17580, 578, 6301, 792, 3985, 1744, 460, 18, 632, 891, 3258, 30, 987...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 4861, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 1466, 16, 833, 16, 819, 33, 7036, 4672, 3536, 967, 17580, 578, 6301, 792, 3985, 1744, 460, 18, 632, 891, 3258, 30, 987...
class PDFOutlines:
class PDFOutlines0:
def testpage(document): P = PDFPage() P.Contents = teststream() pages = document.Pages P.Parent = document.Reference(pages) P.MediaBox = PDFArray([0, 0, 595, 841]) resources = PDFResourceDictionary() resources.allProcs() # enable all procsets resources.basicFonts() P.Resources = resources pages.addPage(P)
2c5172700fdffe036114a40496deca6320476ca9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3878/2c5172700fdffe036114a40496deca6320476ca9/pdfdoc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 2433, 12, 5457, 4672, 453, 273, 12667, 1964, 1435, 453, 18, 6323, 273, 1842, 3256, 1435, 4689, 273, 1668, 18, 5716, 453, 18, 3054, 273, 1668, 18, 2404, 12, 7267, 13, 453, 18, 541...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2433, 12, 5457, 4672, 453, 273, 12667, 1964, 1435, 453, 18, 6323, 273, 1842, 3256, 1435, 4689, 273, 1668, 18, 5716, 453, 18, 3054, 273, 1668, 18, 2404, 12, 7267, 13, 453, 18, 541...
if lastupdated:
if lastupdated and lastupdated != '$Date$':
def tmpl_pagefooter(self, req=None, ln=CFG_SITE_LANG, lastupdated=None, pagefooteradd=""): """Creates a page footer Parameters:
e8c018603a7fd34a430130d15b421223ebe34636 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14116/e8c018603a7fd34a430130d15b421223ebe34636/webstyle_templates_inspire.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10720, 67, 2433, 14723, 12, 2890, 16, 1111, 33, 7036, 16, 7211, 33, 19727, 67, 20609, 67, 10571, 16, 1142, 7007, 33, 7036, 16, 1363, 14723, 1289, 1546, 6, 4672, 3536, 2729, 279, 1363, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10720, 67, 2433, 14723, 12, 2890, 16, 1111, 33, 7036, 16, 7211, 33, 19727, 67, 20609, 67, 10571, 16, 1142, 7007, 33, 7036, 16, 1363, 14723, 1289, 1546, 6, 4672, 3536, 2729, 279, 1363, ...