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
png_chunks = (1, 1, 1, 1, 1)
png_chunks = (1, 1, 0, 1, 1)
def store_layer(img, drawable, path): tmp = os.path.join(tempdir, 'tmp.png') interlace, compression = 0, 2 png_chunks = (1, 1, 1, 1, 1) # write all PNG chunks pdb['file-png-save'](img, drawable, tmp, 'tmp.png', interlace, compression, *png_chunks) orafile.write(tmp, path) os.remove(tmp)
c16af0160677292e8fc8ba96bcd2361ee049c499 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11058/c16af0160677292e8fc8ba96bcd2361ee049c499/file-openraster.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1707, 67, 6363, 12, 6081, 16, 19021, 16, 589, 4672, 1853, 273, 1140, 18, 803, 18, 5701, 12, 5814, 1214, 16, 296, 5645, 18, 6446, 6134, 1554, 80, 623, 16, 9154, 273, 374, 16, 576, 144...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1707, 67, 6363, 12, 6081, 16, 19021, 16, 589, 4672, 1853, 273, 1140, 18, 803, 18, 5701, 12, 5814, 1214, 16, 296, 5645, 18, 6446, 6134, 1554, 80, 623, 16, 9154, 273, 374, 16, 576, 144...
tmp = bb.data.getVar('DISTRO_PN_ALIAS', d, True)
bb.note("Checking: %s" % pn) if pn.find("-native") != -1: pnstripped = pn.split("-native") bb.data.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + bb.data.getVar('OVERRIDES', d, True), localdata) bb.data.update_data(localdata) recipe_name = pnstripped[0] if pn.find("-cross") != -1: pnstripped = pn.split("-cross") bb.data.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + bb.data.getVar('OVERRIDES', d, True), localdata) bb.data.update_data(localdata) recipe_name = pnstripped[0] if pn.find("-initial") != -1: pnstripped = pn.split("-initial") bb.data.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + bb.data.getVar('OVERRIDES', d, True), localdata) bb.data.update_data(localdata) recipe_name = pnstripped[0] bb.note("Recipe: %s" % recipe_name) tmp = bb.data.getVar('DISTRO_PN_ALIAS', localdata, True)
def compare_in_distro_packages_list(distro_check_dir, d): if not os.path.isdir(distro_check_dir): raise Exception("compare_in_distro_packages_list: invalid distro_check_dir passed") pkglst_dir = os.path.join(distro_check_dir, "package_lists") matching_distros = [] recipe_name = bb.data.getVar('PN', d, True) tmp = bb.data.getVar('DISTRO_PN_ALIAS', d, True) distro_pn_aliases = {} if tmp: list = tmp.split(' ') for str in list: (dist, pn_alias) = str.split('=') distro_pn_aliases[dist.strip().lower()] = pn_alias.strip() for file in os.listdir(pkglst_dir): (distro, distro_release) = file.split("-") f = open(os.path.join(pkglst_dir, file), "rb") for pkg in f: if distro.lower() in distro_pn_aliases: pn = distro_pn_aliases[distro.lower()] else: pn = recipe_name if pn == pkg[:-1]: # strip the \n at the end matching_distros.append(distro) f.close() break f.close() return matching_distros
68385456af93a6a80c558676fd176e3ec81c9183 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8123/68385456af93a6a80c558676fd176e3ec81c9183/distro_check.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3400, 67, 267, 67, 4413, 303, 67, 10308, 67, 1098, 12, 4413, 303, 67, 1893, 67, 1214, 16, 302, 4672, 309, 486, 1140, 18, 803, 18, 291, 1214, 12, 4413, 303, 67, 1893, 67, 1214, 4672, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3400, 67, 267, 67, 4413, 303, 67, 10308, 67, 1098, 12, 4413, 303, 67, 1893, 67, 1214, 16, 302, 4672, 309, 486, 1140, 18, 803, 18, 291, 1214, 12, 4413, 303, 67, 1893, 67, 1214, 4672, ...
if n < 2: return integer_ring.ZZ(2) if n == 2: return integer_ring.ZZ(3) if not proof: return integer_ring.ZZ((eval(str(pari(n+1).nextprime())))) if n % 2 == 0: n += 1 else: n += 2 while not is_prime(n): n += 2 return integer_ring.ZZ(n)
return n.next_prime(proof=proof)
def next_prime(n, proof=True): """ The next prime greater than the integer n. If n is prime, then this function does not return n, but the next prime after n. If the optional argument proof is False (the default), this function only returns a pseudo-prime, as defined by the PARI nextprime function. INPUT: n -- integer proof -- bool (default: True) EXAMPLES: sage: next_prime(-100) 2 sage: next_prime(1) 2 sage: next_prime(2) 3 sage: next_prime(3) 5 sage: next_prime(4) 5 Notice that the next_prime(5) is not 5 but 7. sage: next_prime(5) 7 sage: next_prime(2004) 2011 """ n = integer_ring.ZZ(n) if n < 2: # negatives are not prime. return integer_ring.ZZ(2) if n == 2: return integer_ring.ZZ(3) if not proof: # pari nextprime is probabilistic (according to their docs) return integer_ring.ZZ((eval(str(pari(n+1).nextprime())))) if n % 2 == 0: n += 1 else: n += 2 while not is_prime(n): # pari isprime is provably correct n += 2 return integer_ring.ZZ(n)
4447b4c9f5f062d7658da7d9324114bf5d0e9c9a /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9417/4447b4c9f5f062d7658da7d9324114bf5d0e9c9a/arith.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1024, 67, 16382, 12, 82, 16, 14601, 33, 5510, 4672, 3536, 1021, 1024, 17014, 6802, 2353, 326, 3571, 290, 18, 225, 971, 290, 353, 17014, 16, 1508, 333, 445, 1552, 486, 327, 290, 16, 149...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1024, 67, 16382, 12, 82, 16, 14601, 33, 5510, 4672, 3536, 1021, 1024, 17014, 6802, 2353, 326, 3571, 290, 18, 225, 971, 290, 353, 17014, 16, 1508, 333, 445, 1552, 486, 327, 290, 16, 149...
"""A security policy provider."""
"""A security policy provider used for fine grained permission checks."""
def get_permission_groups(username): """Return a list of names of the groups that the user with the specified name is a member of."""
bb550be0aaed37d329f9ac3552b484947e375a6f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2831/bb550be0aaed37d329f9ac3552b484947e375a6f/perm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 9827, 67, 4650, 12, 5053, 4672, 3536, 990, 279, 666, 434, 1257, 434, 326, 3252, 716, 326, 729, 598, 326, 1269, 508, 353, 279, 3140, 434, 12123, 2, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 9827, 67, 4650, 12, 5053, 4672, 3536, 990, 279, 666, 434, 1257, 434, 326, 3252, 716, 326, 729, 598, 326, 1269, 508, 353, 279, 3140, 434, 12123, 2, -100, -100, -100, -100, -100...
nid = (self.hwnd, 0, flags, win32con.WM_USER+20, hicon, "SpamBayes")
nid = (self.hwnd, 0, flags, WM_TASKBAR_NOTIFY, hicon, "SpamBayes")
def __init__(self): # The ordering here is important - it is the order that they will # appear in the menu. As dicts don't have an order, this means # that the order is controlled by the id. Any items were the # function is None will appear as separators. self.control_functions = {1024 : ("Start SpamBayes", self.StartStop), 1025 : ("-", None), 1026 : ("View information ...", self.OpenInterface), 1027 : ("Configure ...", self.OpenConfig), 1028 : ("-", None), 1029 : ("Exit SpamBayes", self.OnExit), } message_map = { win32con.WM_DESTROY: self.OnDestroy, win32con.WM_COMMAND: self.OnCommand, win32con.WM_USER+20 : self.OnTaskbarNotify, }
dee0c4d20c1b073d14b6a18a484058719c5c30ec /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9857/dee0c4d20c1b073d14b6a18a484058719c5c30ec/pop3proxy_tray.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 468, 1021, 9543, 2674, 353, 10802, 300, 518, 353, 326, 1353, 716, 2898, 903, 468, 9788, 316, 326, 3824, 18, 225, 2970, 15838, 2727, 1404, 1240, 392, 1353...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 468, 1021, 9543, 2674, 353, 10802, 300, 518, 353, 326, 1353, 716, 2898, 903, 468, 9788, 316, 326, 3824, 18, 225, 2970, 15838, 2727, 1404, 1240, 392, 1353...
else: def popen3(cmd, mode='t', bufsize=-1): """Execute the shell command 'cmd' in a sub-process. If 'bufsize' is specified, it sets the buffer size for the I/O pipes. The file objects (child_stdout, child_stdin, child_stderr) are returned.""" if type(mode) is type(0) and bufsize == -1: bufsize = mode mode = 't' assert mode in ('t', 'b') _cleanup() inst = Popen3(cmd, 1, bufsize) return inst.fromchild, inst.tochild, inst.childerr
def popen3(cmd, mode='t', bufsize=-1): """Execute the shell command 'cmd' in a sub-process. If 'bufsize' is specified, it sets the buffer size for the I/O pipes. The file objects (child_stdout, child_stdin, child_stderr) are returned.""" w, r, e = os.popen3(cmd, mode, bufsize) return r, w, e
153a739f731cf942200e8506e1610b6782ce3e60 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/153a739f731cf942200e8506e1610b6782ce3e60/popen2.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 30925, 23, 12, 4172, 16, 1965, 2218, 88, 2187, 1681, 1467, 29711, 21, 4672, 3536, 5289, 326, 5972, 1296, 296, 4172, 11, 316, 279, 720, 17, 2567, 18, 225, 971, 296, 4385, 1467, 11, 353,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 30925, 23, 12, 4172, 16, 1965, 2218, 88, 2187, 1681, 1467, 29711, 21, 4672, 3536, 5289, 326, 5972, 1296, 296, 4172, 11, 316, 279, 720, 17, 2567, 18, 225, 971, 296, 4385, 1467, 11, 353,...
state = deepcopy(state)
state = deepcopy(state, memo)
def _reconstruct(x, info, deep): if isinstance(info, str): return x assert isinstance(info, tuple) n = len(info) assert n in (2, 3) callable, args = info[:2] if n > 2: state = info[2] else: state = {} if deep: args = deepcopy(args) y = callable(*args) if state: if deep: state = deepcopy(state) y.__dict__.update(state) return y
69aa394a60d56aaf0e00893137935bdc97e0d527 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/69aa394a60d56aaf0e00893137935bdc97e0d527/copy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 266, 10062, 12, 92, 16, 1123, 16, 4608, 4672, 309, 1549, 12, 1376, 16, 609, 4672, 327, 619, 1815, 1549, 12, 1376, 16, 3193, 13, 290, 273, 562, 12, 1376, 13, 1815, 290, 316, 261,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 266, 10062, 12, 92, 16, 1123, 16, 4608, 4672, 309, 1549, 12, 1376, 16, 609, 4672, 327, 619, 1815, 1549, 12, 1376, 16, 3193, 13, 290, 273, 562, 12, 1376, 13, 1815, 290, 316, 261,...
return self.redirect(redirect_url)
return self.redirect(request, redirect_url)
def do_verify(self): """Process the form submission, initating OpenID verification. """
3613973e0dba8bc750646a30918b4dc7828ea1b1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2097/3613973e0dba8bc750646a30918b4dc7828ea1b1/open_id.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 8705, 12, 2890, 4672, 3536, 2227, 326, 646, 8515, 16, 1208, 1776, 25781, 11805, 18, 3536, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 8705, 12, 2890, 4672, 3536, 2227, 326, 646, 8515, 16, 1208, 1776, 25781, 11805, 18, 3536, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
return Factorization([(p,-e) for p,e in self], cr=self._cr())
""" Return the formal inverse of the factors in the factorization. EXAMPLES: sage: F = factor(2006); F 2 * 17 * 59 sage: F^-1 2^-1 * 17^-1 * 59^-1 sage: R.<x,y> = FreeAlgebra(QQ, 2) sage: F = Factorization([(x,3), (y, 2), (x,1)], 2); F (2) * x^3 * y^2 * x sage: F^-1 (1/2) * x^-1 * y^-2 * x^-3 """ return Factorization([(p,-e) for p,e in reversed(self)], cr=self._cr(), unit=self.unit()**(-1))
def __invert__(self): return Factorization([(p,-e) for p,e in self], cr=self._cr())
366d01f87cfaf5726fd23f49c23799fb32b771dd /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/366d01f87cfaf5726fd23f49c23799fb32b771dd/factorization.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 267, 1097, 972, 12, 2890, 4672, 327, 26400, 1588, 3816, 12, 84, 16, 17, 73, 13, 364, 293, 16, 73, 316, 365, 6487, 4422, 33, 2890, 6315, 3353, 10756, 2, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 267, 1097, 972, 12, 2890, 4672, 327, 26400, 1588, 3816, 12, 84, 16, 17, 73, 13, 364, 293, 16, 73, 316, 365, 6487, 4422, 33, 2890, 6315, 3353, 10756, 2, -100, -100, -100, -100, ...
labelKeysTitle=Label(frameKeySets,text='Select a Key Set')
def CreatePageKeys(self): #tkVars self.bindingTarget=StringVar(self) self.builtinKeys=StringVar(self) self.customKeys=StringVar(self) self.keysAreBuiltin=BooleanVar(self) self.keyBinding=StringVar(self) ##widget creation #body frame frame=self.tabPages.pages['Keys']['page'] #body section frames frameCustom=Frame(frame,borderwidth=2,relief=GROOVE) frameKeySets=Frame(frame,borderwidth=2,relief=GROOVE) #frameCustom frameTarget=Frame(frameCustom) labelCustomTitle=Label(frameCustom,text='Set Custom Key Bindings') labelTargetTitle=Label(frameTarget,text='Action - Key(s)') scrollTargetY=Scrollbar(frameTarget) scrollTargetX=Scrollbar(frameTarget,orient=HORIZONTAL) self.listBindings=Listbox(frameTarget,takefocus=FALSE, exportselection=FALSE) self.listBindings.bind('<ButtonRelease-1>',self.KeyBindingSelected) scrollTargetY.config(command=self.listBindings.yview) scrollTargetX.config(command=self.listBindings.xview) self.listBindings.config(yscrollcommand=scrollTargetY.set) self.listBindings.config(xscrollcommand=scrollTargetX.set) self.buttonNewKeys=Button(frameCustom,text='Get New Keys for Selection', command=self.GetNewKeys,state=DISABLED) buttonSaveCustomKeys=Button(frameCustom, text='Save as New Custom Key Set',command=self.SaveAsNewKeySet) #frameKeySets labelKeysTitle=Label(frameKeySets,text='Select a Key Set') labelTypeTitle=Label(frameKeySets,text='Select : ') self.radioKeysBuiltin=Radiobutton(frameKeySets,variable=self.keysAreBuiltin, value=1,command=self.SetKeysType,text='a Built-in Key Set') self.radioKeysCustom=Radiobutton(frameKeySets,variable=self.keysAreBuiltin, value=0,command=self.SetKeysType,text='a Custom Key Set') self.optMenuKeysBuiltin=DynOptionMenu(frameKeySets, self.builtinKeys,None,command=None) self.optMenuKeysCustom=DynOptionMenu(frameKeySets, self.customKeys,None,command=None) self.buttonDeleteCustomKeys=Button(frameKeySets,text='Delete Custom Key Set', command=self.DeleteCustomKeys) ##widget packing #body frameCustom.pack(side=LEFT,padx=5,pady=5,expand=TRUE,fill=BOTH) frameKeySets.pack(side=LEFT,padx=5,pady=5,fill=Y) #frameCustom labelCustomTitle.pack(side=TOP,anchor=W,padx=5,pady=5) buttonSaveCustomKeys.pack(side=BOTTOM,fill=X,padx=5,pady=5) self.buttonNewKeys.pack(side=BOTTOM,fill=X,padx=5,pady=5) frameTarget.pack(side=LEFT,padx=5,pady=5,expand=TRUE,fill=BOTH) #frame target frameTarget.columnconfigure(0,weight=1) frameTarget.rowconfigure(1,weight=1) labelTargetTitle.grid(row=0,column=0,columnspan=2,sticky=W) self.listBindings.grid(row=1,column=0,sticky=NSEW) scrollTargetY.grid(row=1,column=1,sticky=NS) scrollTargetX.grid(row=2,column=0,sticky=EW) #frameKeySets labelKeysTitle.pack(side=TOP,anchor=W,padx=5,pady=5) labelTypeTitle.pack(side=TOP,anchor=W,padx=5,pady=5) self.radioKeysBuiltin.pack(side=TOP,anchor=W,padx=5) self.radioKeysCustom.pack(side=TOP,anchor=W,padx=5,pady=2) self.optMenuKeysBuiltin.pack(side=TOP,fill=X,padx=5,pady=5) self.optMenuKeysCustom.pack(side=TOP,fill=X,anchor=W,padx=5,pady=5) self.buttonDeleteCustomKeys.pack(side=TOP,fill=X,padx=5,pady=5) return frame
55017c8d2483230b370f09b40eaa33e91cc2555a /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8125/55017c8d2483230b370f09b40eaa33e91cc2555a/configDialog.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1788, 1964, 2396, 12, 2890, 4672, 468, 16099, 5555, 365, 18, 7374, 2326, 33, 780, 1537, 12, 2890, 13, 365, 18, 24553, 2396, 33, 780, 1537, 12, 2890, 13, 365, 18, 3662, 2396, 33, 780, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1788, 1964, 2396, 12, 2890, 4672, 468, 16099, 5555, 365, 18, 7374, 2326, 33, 780, 1537, 12, 2890, 13, 365, 18, 24553, 2396, 33, 780, 1537, 12, 2890, 13, 365, 18, 3662, 2396, 33, 780, ...
return '<ExtendedFile %r>' % (path,)
return '<ExtendedFile %r>' % (self.name,)
def __repr__(self): return '<ExtendedFile %r>' % (path,)
2c9c45d466d9f36b257b07acc15ff8878d3665ac /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8747/2c9c45d466d9f36b257b07acc15ff8878d3665ac/util.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 12715, 972, 12, 2890, 4672, 327, 2368, 11456, 812, 738, 86, 1870, 738, 261, 803, 16, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 12715, 972, 12, 2890, 4672, 327, 2368, 11456, 812, 738, 86, 1870, 738, 261, 803, 16, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
resp.setCookie('dtpref_rows',str(rows),path='/',expires=e) resp.setCookie('dtpref_cols',str(cols),path='/',expires=e)
resp.setCookie('sql_pref__rows',str(rows),path='/',expires=e) resp.setCookie('sql_pref__cols',str(cols),path='/',expires=e)
def _er(self,title,connection_id,arguments,template, SUBMIT,dtpref_cols,dtpref_rows,REQUEST): dr,dc = self._size_changes[SUBMIT] rows=max(1,atoi(dtpref_rows)+dr) cols=max(40,atoi(dtpref_cols)+dc) e='Friday, 31-Dec-99 23:59:59 GMT' resp=REQUEST['RESPONSE'] resp.setCookie('dtpref_rows',str(rows),path='/',expires=e) resp.setCookie('dtpref_cols',str(cols),path='/',expires=e) return self.manage_main( self,REQUEST, title=title, arguments_src=arguments, connection_id=connection_id, template=template, dtpref_cols=cols,dtpref_rows=rows)
1a9aa0d57a57003eda61781e1fdebcfa19b314f2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/1a9aa0d57a57003eda61781e1fdebcfa19b314f2/DA.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 264, 12, 2890, 16, 2649, 16, 4071, 67, 350, 16, 7099, 16, 3202, 16, 10025, 6068, 16, 7510, 25724, 67, 6842, 16, 7510, 25724, 67, 3870, 16, 5519, 4672, 5081, 16, 7201, 273, 365, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 264, 12, 2890, 16, 2649, 16, 4071, 67, 350, 16, 7099, 16, 3202, 16, 10025, 6068, 16, 7510, 25724, 67, 6842, 16, 7510, 25724, 67, 3870, 16, 5519, 4672, 5081, 16, 7201, 273, 365, ...
"""Read 'input', apply quoted-printable encoding, and write to 'output'.
"""Read 'input', apply quoted-printable encoding, and write to 'output'.
def encode(input, output, quotetabs): """Read 'input', apply quoted-printable encoding, and write to 'output'. 'input' and 'output' are files with readline() and write() methods. The 'quotetabs' flag indicates whether tabs should be quoted.""" while 1: line = input.readline() if not line: break new = '' last = line[-1:] if last == '\n': line = line[:-1] else: last = '' prev = '' for c in line: if needsquoting(c, quotetabs): c = quote(c) if len(new) + len(c) >= MAXLINESIZE: output.write(new + ESCAPE + '\n') new = '' new = new + c prev = c if prev in (' ', '\t'): output.write(new + ESCAPE + '\n\n') else: output.write(new + '\n')
7ad3eb0691b28b7bbfefbfe6d3feaf80fa53186d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/7ad3eb0691b28b7bbfefbfe6d3feaf80fa53186d/quopri.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2017, 12, 2630, 16, 876, 16, 4914, 278, 5113, 4672, 3536, 1994, 296, 2630, 2187, 2230, 9298, 17, 1188, 429, 2688, 16, 471, 1045, 358, 296, 2844, 10332, 225, 296, 2630, 11, 471, 296, 28...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2017, 12, 2630, 16, 876, 16, 4914, 278, 5113, 4672, 3536, 1994, 296, 2630, 2187, 2230, 9298, 17, 1188, 429, 2688, 16, 471, 1045, 358, 296, 2844, 10332, 225, 296, 2630, 11, 471, 296, 28...
</tr>""" %(_("No new mail"),)
</tr>""" %(_("No messages"),)
def tmpl_display_inbox(self, messages, infos=[], warnings=[], nb_messages=0, no_quota=0, ln=cdslang): """ Displays a list of messages, with the appropriate links and buttons @param messages: a list of tuples: [(message_id, user_from_id, user_from_nickname, subject, sent_date, status=] @param infos: a list of informations to print on top of page @param warnings: a list of warnings to display @param nb_messages: number of messages user has @param no_quota: 1 if user has no quota (admin) or 0 else. @param ln: language of the page. @return the list in HTML format """ _ = gettext_set_language(ln) junk = 0 inbox = self.tmpl_warning(warnings, ln) inbox += self.tmpl_infobox(infos, ln) if not(no_quota): inbox += self.tmpl_quota(nb_messages, ln) inbox += """
1e085ff8e9bc542f7d9e6466fe8127b136199bf2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2876/1e085ff8e9bc542f7d9e6466fe8127b136199bf2/webmessage_templates.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10720, 67, 5417, 67, 267, 2147, 12, 2890, 16, 2743, 16, 10626, 22850, 6487, 5599, 22850, 6487, 4264, 67, 6833, 33, 20, 16, 1158, 67, 23205, 33, 20, 16, 7211, 33, 4315, 2069, 539, 4672,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10720, 67, 5417, 67, 267, 2147, 12, 2890, 16, 2743, 16, 10626, 22850, 6487, 5599, 22850, 6487, 4264, 67, 6833, 33, 20, 16, 1158, 67, 23205, 33, 20, 16, 7211, 33, 4315, 2069, 539, 4672,...
(indexNoa, storeSizea, fmta, fmta2) = writeHeader(rpm.hdr.hash, rpmdbtag, region, install_keys, 0, rpm.rpmgroup) if fmt != fmta or fmt2 != fmta2:
(indexNoa, storeSizea, fmta, fmta2) = writeRpmdb(rpm) if pkg.hdrdata[3] != fmta or pkg.hdrdata[4] != fmta2:
def readRpmdb(rpmdbpath, distroverpkg, releasever, configfiles, buildroot, arch, archlist, specifyarch, verbose, checkfileconflicts, reposdirs): from binascii import b2a_hex if verbose: print "Reading rpmdb, this can take some time..." print "Reading %sPackages..." % rpmdbpath if verbose > 2: time1 = time.clock() (packages, keyring, maxtid, pkgdata, swapendian) = readPackages(buildroot, rpmdbpath, verbose) if verbose: if verbose > 2: time2 = time.clock() print "Needed", time2 - time1, "seconds to read Packages", \ "(%d rpm packages)." % len(packages.keys()) print "Reading the other files in %s..." % rpmdbpath if verbose > 2: time1 = time.clock() if verbose and sys.version_info < (2, 3): print "If you use python-2.2 you can get the harmless output:", \ "'Python bsddb: close errno 13 in dealloc'." basenames = readDb(swapendian, rpmdbpath + "Basenames") conflictname = readDb(swapendian, rpmdbpath + "Conflictname") dirnames = readDb(swapendian, rpmdbpath + "Dirnames", "bt") filemd5s = readDb(swapendian, rpmdbpath + "Filemd5s") group = readDb(swapendian, rpmdbpath + "Group") installtid = readDb(swapendian, rpmdbpath + "Installtid", "bt", 1) name = readDb(swapendian, rpmdbpath + "Name") providename = readDb(swapendian, rpmdbpath + "Providename") provideversion = readDb(swapendian, rpmdbpath + "Provideversion", "bt") # We make "Pubkeys" optional since also pyrpmrebuilddb does not write # it again: if not os.access(rpmdbpath + "Pubkeys", os.R_OK): if verbose: print "Did not any Pubkey db file." else: #pubkeys = readDb(swapendian, rpmdbpath + "Pubkeys") requirename = readDb(swapendian, rpmdbpath + "Requirename") requireversion = readDb(swapendian, rpmdbpath + "Requireversion", "bt") sha1header = readDb(swapendian, rpmdbpath + "Sha1header") sigmd5 = readDb(swapendian, rpmdbpath + "Sigmd5") triggername = readDb(swapendian, rpmdbpath + "Triggername") if verbose: if verbose > 2: time2 = time.clock() print "Needed", time2 - time1, "seconds to read the other files." print "Checking data integrity..." if verbose > 2: time1 = time.clock() # Checking data integrity of the rpmdb: for tid in packages.iterkeys(): if tid > maxtid: print "wrong tid:", tid verifyStructure(verbose, packages, basenames, "basenames") verifyStructure(verbose, packages, conflictname, "conflictname") verifyStructure(verbose, packages, dirnames, "dirnames") for x in filemd5s.itervalues(): for y in x.iterkeys(): x[y] = b2a_hex(x[y]) verifyStructure(verbose, packages, filemd5s, "filemd5s") verifyStructure(verbose, packages, group, "group") verifyStructure(verbose, packages, installtid, "installtid") verifyStructure(verbose, packages, name, "name", 0) verifyStructure(verbose, packages, providename, "providename") verifyStructure(verbose, packages, provideversion, "provideversion") #verifyStructure(verbose, packages, pubkeys, "pubkeys") verifyStructure(verbose, packages, requirename, "requirename") verifyStructure(verbose, packages, requireversion, "requireversion") verifyStructure(verbose, packages, sha1header, "install_sha1header", 0) verifyStructure(verbose, packages, sigmd5, "install_md5", 0) verifyStructure(verbose, packages, triggername, "triggername") arch_hash = setMachineDistance(arch, archlist) checkdupes = {} checkevr = {} # Find out "arch", "releasever" and set "checkdupes". for pkg in packages.itervalues(): if (not specifyarch and rpmdbpath != "/var/lib/rpm/" and pkg["name"] in kernelpkgs): # This would apply if we e.g. go from i686 -> x86_64, but # would also go from i686 -> s390 if such a kernel would # accidentally be installed. Good enough for the normal case. if arch_hash.get(pkg["arch"]) == None: arch = pkg["arch"] arch_hash = setMachineDistance(arch) print "Change 'arch' setting to be:", arch if not releasever and pkg["name"] in distroverpkg: releasever = pkg["version"] if not pkg.isInstallonly(): checkdupes.setdefault("%s.%s" % (pkg["name"], pkg["arch"]), []).append(pkg) checkevr.setdefault("%s" % pkg["name"], []).append(pkg) # Check "arch" and dupes: for pkg in packages.itervalues(): if (pkg["name"] != "gpg-pubkey" and arch_hash.get(pkg["arch"]) == None): print "Warning: did not expect package with this arch: %s" % \ pkg.getFilename() if (pkg["arch"] != "noarch" and checkdupes.has_key("%s.noarch" % pkg["name"])): print "Warning: noarch and arch-dependent package installed:", \ pkg.getFilename() for (pkg, value) in checkdupes.iteritems(): if len(value) > 1: print "Warning: more than one package installed for %s." % pkg for (pkg, value) in checkevr.iteritems(): if len(value) <= 1: continue p = value[0] evr = (p["epoch"], p["version"], p["release"]) for q in value[1:]: if evr != (q["epoch"], q["version"], q["release"]): print p.getFilename(), "has different epoch/version/release", \ " than", q.getFilename() # Read in repositories to compare packages: if verbose > 2 and configfiles: time3 = time.clock() repos = readRepos(releasever, configfiles, arch, buildroot, 1, 0, reposdirs, verbose) if repos == None: return 1 if verbose > 2 and configfiles: print "Needed", time.clock() - time3, "seconds to read the repos." for (tid, pkg) in packages.iteritems(): if pkg["name"] == "gpg-pubkey": continue # Check if we could write the rpmdb data again. region = "immutable" rpmversion = pkg["rpmversion"] if rpmversion and rpmversion[:3] not in ("4.0", "3.0", "2.2"): install_keys["archivesize"] = 1 if pkg["immutable1"] != None: region = "immutable1" install_keys["providename"] = 1 install_keys["provideflags"] = 1 install_keys["provideversion"] = 1 install_keys["dirindexes"] = 1 install_keys["dirnames"] = 1 install_keys["basenames"] = 1 (indexNo, storeSize, fmt, fmt2) = writeHeader(pkg.hdr.hash, rpmdbtag, region, {}, 1, pkg.rpmgroup) if rpmversion and rpmversion[:3] not in ("4.0", "3.0", "2.2"): del install_keys["archivesize"] if pkg["immutable1"] != None: del install_keys["providename"] del install_keys["provideflags"] del install_keys["provideversion"] del install_keys["dirindexes"] del install_keys["dirnames"] del install_keys["basenames"] lead = pack("!2I", indexNo, storeSize) data = "".join([lead, fmt, fmt2]) if len(data) % 4 != 0: print "rpmdb header is not aligned to 4" if data != pkgdata[tid]: print "writeHeader() would not write the same rpmdb data for", \ pkg["name"], "(rpm-%s)" % rpmversion if verbose > 2: # This should be some more generic diff routine for headers. if fmt != pkg.hdrdata[3]: print "wrong fmt" if fmt2 != pkg.hdrdata[4]: print "wrong fmt2", len(fmt2), len(pkg.hdrdata[4]) for i in xrange(0, indexNo * 16, 16): (tag1, ttype1, offset1, count1) = unpack("!4I", fmt[i:i + 16]) (tag2, ttype2, offset2, count2) = unpack("!4I", pkg.hdrdata[3][i:i + 16]) if tag1 != tag2 or ttype1 != ttype2 or count1 != count2: print "tag:", tag1, tag2, i if offset1 != offset2: print "offset:", offset1, offset2, "tag=", tag1 # Try to just copy the immutable region to verify the sha1. immutable = pkg.getImmutableRegion() if immutable: (indexNo, storeSize, fmt, fmt2) = immutable else: # If we cannot use the immutable region, try to write our own # header again. pkg.sig = HdrIndex() if pkg["archivesize"] != None: pkg.sig["payloadsize"] = pkg["archivesize"] if rpmversion and rpmversion[:3] not in ("4.0", "3.0", "2.2"): del pkg["archivesize"] (indexNo, storeSize, fmt, fmt2) = writeHeader(pkg.hdr.hash, rpmdbtag, region, install_keys, 0, pkg.rpmgroup) found = 0 nevra = pkg.getNEVRA0() for r in repos: if r.pkglist.has_key(nevra): repopkg = r.pkglist[nevra] headerend = None if repopkg["rpm:header-range:end"]: headerend = repopkg["rpm:header-range:end"] rpm = ReadRpm(repopkg.filename) if rpm.readHeader(rpmsigtag, rpmtag, 1, headerend=headerend): print "Cannot read %s.\n" % repopkg.filename continue rpm.closeFd() if rpm.hdrdata[3] != fmt or rpm.hdrdata[4] != fmt2: print "Rpm %s in repo does not match." % repopkg.filename continue found = 1 # Use the rpm header to write again a rpmdb entry and compare # that again to the currently existing rpmdb header. # We should try to write some of these ourselves: for s in ("installtime", "filestates", "instprefixes", "installcolor", "installtid"): if pkg[s] != None: rpm[s] = pkg[s] #rpm["installcolor"] = (getInstallColor(arch),) region = "immutable" if rpm["immutable1"]: region = "immutable1" rpm.genRpmdbHeader() (indexNoa, storeSizea, fmta, fmta2) = writeHeader(rpm.hdr.hash, rpmdbtag, region, install_keys, 0, rpm.rpmgroup) if fmt != fmta or fmt2 != fmta2: print "Could not write a new rpmdb for %s." \ % repopkg.filename continue break if found == 0 and configfiles: print "Warning: package not found in the repositories:", nevra # Verify the sha1 crc of the normal header data. (Signature # data does not have an extra crc.) sha1header = pkg["install_sha1header"] if sha1header == None: if verbose: print "Warning: package", pkg.getFilename(), \ "does not have a sha1 checksum." continue lead = pack("!8s2I", "\x8e\xad\xe8\x01\x00\x00\x00\x00", indexNo, storeSize) ctx = sha.new() ctx.update(lead) ctx.update(fmt) ctx.update(fmt2) if ctx.hexdigest() != sha1header: print pkg.getFilename(), \ "bad sha1: %s / %s" % (sha1header, ctx.hexdigest()) checkDeps(packages.values(), checkfileconflicts, 0) if verbose: if verbose > 2: time2 = time.clock() print "Needed", time2 - time1, "seconds to check the rpmdb data." print "Done with checkrpmdb." return None
dfaf16c0c140ab9da7e4358e03f80b0cfb6266a5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1143/dfaf16c0c140ab9da7e4358e03f80b0cfb6266a5/oldpyrpm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 54, 84, 27574, 12, 13832, 27574, 803, 16, 27450, 502, 10657, 16, 3992, 502, 16, 642, 2354, 16, 1361, 3085, 16, 6637, 16, 6637, 1098, 16, 4800, 991, 16, 3988, 16, 866, 768, 20340, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 54, 84, 27574, 12, 13832, 27574, 803, 16, 27450, 502, 10657, 16, 3992, 502, 16, 642, 2354, 16, 1361, 3085, 16, 6637, 16, 6637, 1098, 16, 4800, 991, 16, 3988, 16, 866, 768, 20340, ...
def check_for_errors(root):
class ISBNNotFound(ValueError): pass def check_for_errors(root, isbn):
def check_for_errors(root): err = root.find('.//'+AWS('Error')) if err is not None: raise Exception('Failed to get metadata with error: '\ + etree.tostring(err, method='text', pretty_print=True, encoding=unicode))
d866fcc48f076c3f9c639b68d114015507059e16 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9125/d866fcc48f076c3f9c639b68d114015507059e16/amazon.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 667, 4437, 15388, 2768, 12, 23610, 4672, 1342, 225, 1652, 866, 67, 1884, 67, 4324, 12, 3085, 16, 24205, 4672, 393, 273, 1365, 18, 4720, 2668, 18, 759, 11, 15, 10800, 2668, 668, 26112, 309, 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, 667, 4437, 15388, 2768, 12, 23610, 4672, 1342, 225, 1652, 866, 67, 1884, 67, 4324, 12, 3085, 16, 24205, 4672, 393, 273, 1365, 18, 4720, 2668, 18, 759, 11, 15, 10800, 2668, 668, 26112, 309, 3...
pcts = "-"+self.d.percentDone
pcts = "-"+self.percentDone
def shutdown(): print "shutdown." self.d.display({'activity':_("shutting down"), 'fractionDone':0}) if self.multitorrent: df = self.multitorrent.shutdown() stop_rawserver = lambda *a : rawserver.stop() df.addCallbacks(stop_rawserver, stop_rawserver) else: rawserver.stop()
45bcad9dc48ec18226c0748c74cc6deaa55fe98b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2550/45bcad9dc48ec18226c0748c74cc6deaa55fe98b/bittorrent-console.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5731, 13332, 1172, 315, 15132, 1199, 365, 18, 72, 18, 5417, 12590, 11, 9653, 4278, 67, 2932, 674, 25387, 2588, 6, 3631, 296, 16744, 7387, 4278, 20, 6792, 309, 365, 18, 5421, 1811, 547, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5731, 13332, 1172, 315, 15132, 1199, 365, 18, 72, 18, 5417, 12590, 11, 9653, 4278, 67, 2932, 674, 25387, 2588, 6, 3631, 296, 16744, 7387, 4278, 20, 6792, 309, 365, 18, 5421, 1811, 547, ...
self.commit(description, files, branch, globalPrefix, initialParent)
self.commit(description, files, self.branch, self.globalPrefix, self.initialParent)
def run(self, args): self.branch = "refs/heads/" + self.branch self.globalPrefix = self.previousDepotPath = os.popen("git-repo-config --get p4.depotpath").read() if len(self.globalPrefix) != 0: self.globalPrefix = self.globalPrefix[:-1]
19d73797bca78a225d3ddc0134a33ec0ce48b167 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12824/19d73797bca78a225d3ddc0134a33ec0ce48b167/git-p4.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 16, 833, 4672, 365, 18, 7500, 273, 315, 9316, 19, 20263, 4898, 397, 365, 18, 7500, 365, 18, 6347, 2244, 273, 365, 18, 11515, 758, 13130, 743, 273, 1140, 18, 84, 3190, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 16, 833, 4672, 365, 18, 7500, 273, 315, 9316, 19, 20263, 4898, 397, 365, 18, 7500, 365, 18, 6347, 2244, 273, 365, 18, 11515, 758, 13130, 743, 273, 1140, 18, 84, 3190, ...
self.updateCaption(0,0) def updateCaption(self, x, y): x = int(round(x)) y = int(round(y))
self.updateCaption() def updateCaption(self, x=None, y=None): x = int(round(x)) if x is not None else self._captionCoords[0] y = int(round(y)) if y is not None else self._captionCoords[1]
def __init__(self, image, normalize = True, title = None, parent = None): qt.QFrame.__init__(self, parent) self.viewer =ImageViewer(image, normalize, title, parent = self) self.setWindowTitle(self.viewer.windowTitle())
11a8a60d7328a17d6e9343c1223cd9deae7c4c8d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12582/11a8a60d7328a17d6e9343c1223cd9deae7c4c8d/imagewindow.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1316, 16, 3883, 273, 1053, 16, 2077, 273, 599, 16, 982, 273, 599, 4672, 25672, 18, 53, 3219, 16186, 2738, 972, 12, 2890, 16, 982, 13, 365, 18, 25256, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1316, 16, 3883, 273, 1053, 16, 2077, 273, 599, 16, 982, 273, 599, 4672, 25672, 18, 53, 3219, 16186, 2738, 972, 12, 2890, 16, 982, 13, 365, 18, 25256, 2...
g_bnodes, g_definitions = nailFormula(g) bnodes, definitions = nailFormula(f)
g_bnodes, g_definitions = nailFormula(g, assumptions) bnodes, definitions = nailFormula(f, assumptions)
def differences(f, g): """Smush the formulae. Compare them, generating patch instructions.""" global lumped
c1bfd803814d84a8ec0ae946813eb6a735cf6088 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3308/c1bfd803814d84a8ec0ae946813eb6a735cf6088/diff.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 16440, 12, 74, 16, 314, 4672, 3536, 9552, 1218, 326, 8013, 73, 18, 225, 11051, 2182, 16, 12516, 4729, 12509, 12123, 2552, 328, 379, 1845, 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, 16440, 12, 74, 16, 314, 4672, 3536, 9552, 1218, 326, 8013, 73, 18, 225, 11051, 2182, 16, 12516, 4729, 12509, 12123, 2552, 328, 379, 1845, 225, 2, -100, -100, -100, -100, -100, -100, -100...
f2 = (1/12)*kL**2/(1-f1)
f2 = (1/12.)*kL**2/(1-f1)
def beam2g(ex,ey,ep,N,eq=None): """ Compute the element stiffness matrix for a two dimensional beam element with respect to geometric nonlinearity. Parameters: ex = [x1, x2] ey = [y1, y2] element node coordinates ep = [E,A,I] element properties; E: Young's modulus A: cross section area I: moment of inertia N axial force in the beam eq distributed transverse load Returns: Ke element stiffness matrix (6 x 6) fe element load vector (6 x 1) """ if eq != None: if size(eq) > 1: print "eq should be a scalar !!!" return else: eq = 0 b = mat([ [ex[1]-ex[0]], [ey[1]-ey[0]] ]) L = asscalar(sqrt(b.T*b)) n = asarray(b/L).reshape(2,) E,A,I = ep rho = -N*L**2/(pi**2*E*I) eps = 2.2204e-16 kL = pi*sqrt(abs(rho))+eps if rho > 0: f1 = (kL/2)/tan(kL/2) f2 = (1/12)*kL**2/(1-f1) f3 = f1/4+3*f2/4 f4 = -f1/2+3*f2/2 f5 = f1*f2 h = 6*(2/kL**2-(1+cos(kL))/(kL*sin(kL))) elif rho < 0: f1 = (kL/2)/tanh(kL/2) f2 = -(1/12)*kL**2/(1-f1) f3 = f1/4+3*f2/4 f4 = -f1/2+3*f2/2 f5 = f1*f2 h = -6*(2/kL**2-(1+cosh(kL))/(kL*sinh(kL))) else: f1 = f2 = f3 = f4 = f5 = 1 Kle = mat([ [ E*A/L, 0, 0, -E*A/L, 0, 0 ], [ 0, 12*E*I*f5/L**3, 6*E*I*f2/L**2, 0, -12*E*I*f5/L**3, 6*E*I*f2/L**2], [ 0, 6*E*I*f2/L**2, 4*E*I*f3/L, 0, -6*E*I*f2/L**2, 2*E*I*f4/L ], [-E*A/L, 0, 0, E*A/L, 0, 0 ], [ 0, -12*E*I*f5/L**3,-6*E*I*f2/L**2, 0, 12*E*I,f5/L**3,-6*E*I*f2/L**2], [ 0, 6*E*I*f2/L**2, 2*E*I*f4/L, 0, -6*E*I*f2/L**2, 4*E*I*f3/L ] ]) fle = eq*L*mat([0,1/2,L*h/12,0,1/2,-L*h/12]).T G = mat([ [ n[0], n[1], 0, 0, 0, 0], [-n[1], n[0], 0, 0, 0, 0], [ 0, 0, 1, 0, 0, 0], [ 0, 0, 0, n[0], n[1], 0], [ 0, 0, 0,-n[1], n[0], 0], [ 0, 0, 0, 0, 0, 1] ]) Ke = G.T*Kle*G fe = G.T*fle if eq != None: return Ke,fe else: return Ke
cfe7bf300b6aacb3bf5e60147e09727b9113eed7 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1235/cfe7bf300b6aacb3bf5e60147e09727b9113eed7/pycalfem.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 16751, 22, 75, 12, 338, 16, 402, 16, 881, 16, 50, 16, 11253, 33, 7036, 4672, 3536, 8155, 326, 930, 384, 3048, 4496, 3148, 364, 279, 2795, 17469, 16751, 930, 598, 8762, 358, 7364, 1591,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 16751, 22, 75, 12, 338, 16, 402, 16, 881, 16, 50, 16, 11253, 33, 7036, 4672, 3536, 8155, 326, 930, 384, 3048, 4496, 3148, 364, 279, 2795, 17469, 16751, 930, 598, 8762, 358, 7364, 1591,...
name = name[0] if name else False
def remove_format(self, index, format, index_is_id=False, notify=True): id = index if index_is_id else self.id(index) path = os.path.join(self.library_path, self.path(id, index_is_id=True)) name = self.conn.get('SELECT name FROM data WHERE book=? AND format=?', (id, format), all=False) name = name[0] if name else False if name: ext = ('.' + format.lower()) if format else '' path = os.path.join(path, name+ext) try: os.remove(path) except: pass self.conn.execute('DELETE FROM data WHERE book=? AND format=?', (id, format.upper())) self.conn.commit() self.refresh_ids([id]) if notify: self.notify('metadata', [id])
8ea22bb7ccf8c4724d346b5ac4aa1700d4f6df94 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9125/8ea22bb7ccf8c4724d346b5ac4aa1700d4f6df94/database2.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1206, 67, 2139, 12, 2890, 16, 770, 16, 740, 16, 770, 67, 291, 67, 350, 33, 8381, 16, 5066, 33, 5510, 4672, 612, 273, 770, 309, 770, 67, 291, 67, 350, 469, 365, 18, 350, 12, 1615, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1206, 67, 2139, 12, 2890, 16, 770, 16, 740, 16, 770, 67, 291, 67, 350, 33, 8381, 16, 5066, 33, 5510, 4672, 612, 273, 770, 309, 770, 67, 291, 67, 350, 469, 365, 18, 350, 12, 1615, ...
readingStr, fromReading, **options)
readingStr, **options)
def _getReadingSearch(self, readingStr, **options): fromReading = options.pop('reading', self.READING)
7768f0434aecc2e353c85a4406b0b7da401f6ea2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11128/7768f0434aecc2e353c85a4406b0b7da401f6ea2/dictionary.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 15714, 2979, 12, 2890, 16, 6453, 1585, 16, 2826, 2116, 4672, 628, 15714, 273, 702, 18, 5120, 2668, 21803, 2187, 365, 18, 6949, 1360, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 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, 588, 15714, 2979, 12, 2890, 16, 6453, 1585, 16, 2826, 2116, 4672, 628, 15714, 273, 702, 18, 5120, 2668, 21803, 2187, 365, 18, 6949, 1360, 13, 2, -100, -100, -100, -100, -100, -100, ...
"H": atom_info("H", 0, "H'"), "HE22": atom_info("H", 0, "H'"), "HE21": atom_info("H", 0, "H'"),
"H": atom_info("H", 0, "H"), "HE22": atom_info("H", 0, "H"), "HE21": atom_info("H", 0, "H"),
def keys(self): return ("element_symbol", "ionic_state", "scattering_label")
46b20303e8ed53745807da84c39cb29f25aa3911 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/696/46b20303e8ed53745807da84c39cb29f25aa3911/residue_info.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1311, 12, 2890, 4672, 327, 7566, 2956, 67, 7175, 3113, 315, 285, 335, 67, 2019, 3113, 315, 31320, 310, 67, 1925, 7923, 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, 1311, 12, 2890, 4672, 327, 7566, 2956, 67, 7175, 3113, 315, 285, 335, 67, 2019, 3113, 315, 31320, 310, 67, 1925, 7923, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
(\b[Vv]o?l?\.?|\b[Nn]o\.?)?\s?(\d+)\s?
(\b[Vv]o?l?\.?|\b[Nn]o\.?)?\s?(?<!(?:\/|\d))(\d+)\s?
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
103822f367ad5b90a2a2f5a80ad9a444ce0b55ce /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12027/103822f367ad5b90a2a2f5a80ad9a444ce0b55ce/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...
ret.append(DiscoIdentity(i))
ret.append(DiscoIdentity(self,i))
def identities(self): ret=[] l=self.xpath_ctxt.xpathEval("d:identity") if l is not None: for i in l: ret.append(DiscoIdentity(i)) return ret
757239d766b69b18b3364d9b60215480f0c4d547 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12769/757239d766b69b18b3364d9b60215480f0c4d547/disco.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17230, 12, 2890, 4672, 325, 33, 8526, 328, 33, 2890, 18, 18644, 67, 20364, 18, 18644, 13904, 2932, 72, 30, 10781, 7923, 309, 328, 353, 486, 599, 30, 364, 277, 316, 328, 30, 325, 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, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17230, 12, 2890, 4672, 325, 33, 8526, 328, 33, 2890, 18, 18644, 67, 20364, 18, 18644, 13904, 2932, 72, 30, 10781, 7923, 309, 328, 353, 486, 599, 30, 364, 277, 316, 328, 30, 325, 18, ...
if tools.config['db_password']: logger.notifyChannel("web-service", netsvc.LOG_ERROR, 'DUMP DB: %s doesn\'t work with password' % (db_name,)) raise Exception, "Couldn't dump database with password"
def dump(self, password, db_name): security.check_super(password) logger = netsvc.Logger()
be08323c6207f01f0d1f1c20ecc8ee14e4f7d790 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7397/be08323c6207f01f0d1f1c20ecc8ee14e4f7d790/web_services.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4657, 12, 2890, 16, 2201, 16, 1319, 67, 529, 4672, 4373, 18, 1893, 67, 9565, 12, 3664, 13, 1194, 273, 21954, 4227, 18, 3328, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4657, 12, 2890, 16, 2201, 16, 1319, 67, 529, 4672, 4373, 18, 1893, 67, 9565, 12, 3664, 13, 1194, 273, 21954, 4227, 18, 3328, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -1...
elif action in ('store', None):
elif action in ('store', 'store_true', 'store_false', None):
def Noop(value): return value
be4c678efeffc44f0f8e473c9c6268922274268d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6220/be4c678efeffc44f0f8e473c9c6268922274268d/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2631, 556, 12, 1132, 4672, 327, 460, 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, 2631, 556, 12, 1132, 4672, 327, 460, 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...
if percent == "True":
document.warning("length: " + length) if length.rfind("-") <> 0 or (length.rfind("-") == 0 and length.rfind("+") > -1):
def revert_hspace_glue_lengths(document): " Revert HSpace glue lengths to ERT " i = 0 j = 0 while True: i = find_token(document.body, "\\begin_inset space \hspace{}", i) if i == -1: j = find_token(document.body, "\\begin_inset space \hspace*{}", j) if j == -1: break else: star = True i = j else: star = False o = document.body[i+1].find("\\length") if o == -1: document.warning("Error: Cannot find lenght for \\hspace!") break # search for the beginning of the value via the space k = document.body[i+1].find(" ") length = document.body[i+1][k+1:] # only revert when the length contains a plus or minus l = length.find("+") if l == -1: l = length.find("-") if l == -1: break # handle percent lengths length = latex_length(length) # latex_length returns "bool,length" m = length.find(",") percent = length[:m] length = length[m+1:] # revert the HSpace inset to ERT if percent == "True": if star == True: subst = [put_cmd_in_ert("\\hspace*{" + length + "}")] else: subst = [put_cmd_in_ert("\\hspace{" + length + "}")] document.body[i:i+3] = subst i = i + 2 j = i
e65445a65062df40e7295c86abfc59c52681c2c3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7514/e65445a65062df40e7295c86abfc59c52681c2c3/lyx_2_0.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15226, 67, 76, 2981, 67, 7043, 344, 67, 14907, 12, 5457, 4672, 315, 868, 1097, 670, 3819, 17960, 10917, 358, 4232, 56, 315, 277, 273, 374, 525, 273, 374, 1323, 1053, 30, 277, 273, 1104...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15226, 67, 76, 2981, 67, 7043, 344, 67, 14907, 12, 5457, 4672, 315, 868, 1097, 670, 3819, 17960, 10917, 358, 4232, 56, 315, 277, 273, 374, 525, 273, 374, 1323, 1053, 30, 277, 273, 1104...
self.setFiringTimeIfRemindersExist() def setFiringTimeIfRemindersExist(self): events = schema.ns('osaf.app', self.itsView).eventsWithReminders.rep firstReminder = events.firstInIndex('reminderTime') if firstReminder is not None: self.setFiringTime(firstReminder.reminderFireTime)
self.setFiringTime(nextReminderTime)
def onReminderTimeEvent(self, event): # Run the reminders dialog and re-queue our timer if necessary # logger.debug("*** Got reminders time event!") pending = self.getPendingReminders() reminderDialog = self.getReminderDialog(True) assert reminderDialog is not None (nextReminderTime, closeIt) = reminderDialog.UpdateList(pending) if closeIt: # logger.debug("*** closing the dialog!") self.closeReminderDialog() self.setFiringTimeIfRemindersExist()
e1a3008a6475c92bba9864a8fcc9c82fc08de8c0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/e1a3008a6475c92bba9864a8fcc9c82fc08de8c0/ControlBlocks.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 1933, 14055, 950, 1133, 12, 2890, 16, 871, 4672, 468, 1939, 326, 849, 728, 414, 6176, 471, 283, 17, 4000, 3134, 5441, 309, 4573, 468, 1194, 18, 4148, 2932, 14465, 19578, 849, 728, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 1933, 14055, 950, 1133, 12, 2890, 16, 871, 4672, 468, 1939, 326, 849, 728, 414, 6176, 471, 283, 17, 4000, 3134, 5441, 309, 4573, 468, 1194, 18, 4148, 2932, 14465, 19578, 849, 728, ...
namespace = None
def main(): start = '!' featured = False namespace = None gen = None # This factory is responsible for processing command line arguments # that are also used by other scripts and that determine on which pages # to work on. genFactory = pagegenerators.GeneratorFactory() for arg in wikipedia.handleArgs(): if arg == '-featured': featured = True elif arg.startswith('-namespace'): if len(arg) == 10: namespace = int(wikipedia.input(u'Which namespace should be processed?')) else: namespace = int(arg[11:]) else: genFactory.handleArg(arg) gen = genFactory.getCombinedGenerator() mysite = wikipedia.getSite() if mysite.sitename() == 'wikipedia:nl': wikipedia.output(u'\03{lightred}There is consensus on the Dutch Wikipedia that bots should not be used to fix redirects.\03{default}') sys.exit() linktrail = mysite.linktrail() if featured: featuredList = wikipedia.translate(mysite, featured_articles) ref = wikipedia.Page(wikipedia.getSite(), featuredList) gen = pagegenerators.ReferringPageGenerator(ref) generator = pagegenerators.NamespaceFilterPageGenerator(gen, [0]) for page in generator: workon(page) elif namespace is not None: for page in pagegenerators.AllpagesPageGenerator(start=start, namespace=namespace, includeredirects=False): workon(page) elif gen: for page in pagegenerators.PreloadingGenerator(gen): workon(page) else: wikipedia.showHelp('fixing_redirects')
f015b025a74f9b10f742993d9ea03bf3fbfc00bc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4404/f015b025a74f9b10f742993d9ea03bf3fbfc00bc/fixing_redirects.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 787, 273, 15502, 2572, 72, 273, 1083, 3157, 273, 599, 225, 468, 1220, 3272, 353, 14549, 364, 4929, 1296, 980, 1775, 468, 716, 854, 2546, 1399, 635, 1308, 8873, 471, 716, 419...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 787, 273, 15502, 2572, 72, 273, 1083, 3157, 273, 599, 225, 468, 1220, 3272, 353, 14549, 364, 4929, 1296, 980, 1775, 468, 716, 854, 2546, 1399, 635, 1308, 8873, 471, 716, 419...
raise RuntimeError
raise RuntimeError, msg % (_, one.dtype)
def __init__(self, float_conv=float,int_conv=int, float_to_float=float, float_to_str = lambda v:'%24.16e' % v, title = 'Python floating point number'): """ float_conv - convert integer to float (array) int_conv - convert float (array) to integer float_to_float - convert float array to float float_to_str - convert array float to str title - description of used floating point numbers """ max_iter = range(1000) one = float_conv(1) two = one + one zero = one - one
0c7be2c208f3f173b3d8913e55aeb3b731fcf3f7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14925/0c7be2c208f3f173b3d8913e55aeb3b731fcf3f7/machar.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1431, 67, 4896, 33, 5659, 16, 474, 67, 4896, 33, 474, 16, 1431, 67, 869, 67, 5659, 33, 5659, 16, 1431, 67, 869, 67, 701, 273, 3195, 331, 2497, 9, 324...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1431, 67, 4896, 33, 5659, 16, 474, 67, 4896, 33, 474, 16, 1431, 67, 869, 67, 5659, 33, 5659, 16, 1431, 67, 869, 67, 701, 273, 3195, 331, 2497, 9, 324...
self.destroyed.connect(self._on_destroy) def __del__(self): self._on_destroy()
@QtCore.pyqtSlot(QtCore.QObject) def on_destroy(obj): self._mplayer.quit() self.destroyed.connect(on_destroy)
def __init__(self, parent=None): super(QPlayerView, self).__init__(parent) self._mplayer = QtPlayer(['-idx', '-fs', '-osdlevel', '0', '-really-quiet', '-msglevel', 'global=6', '-fixed-vo', '-wid', str(self.winId())]) self._mplayer.stdout.hook(self._handle_data) self._mplayer.start() self.destroyed.connect(self._on_destroy)
62aee091dffa518a8738f310ce47a712aab407d9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12327/62aee091dffa518a8738f310ce47a712aab407d9/qt4.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 982, 33, 7036, 4672, 2240, 12, 53, 12148, 1767, 16, 365, 2934, 972, 2738, 972, 12, 2938, 13, 365, 6315, 81, 14872, 273, 7354, 12148, 12, 3292, 17, 3465, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 33, 7036, 4672, 2240, 12, 53, 12148, 1767, 16, 365, 2934, 972, 2738, 972, 12, 2938, 13, 365, 6315, 81, 14872, 273, 7354, 12148, 12, 3292, 17, 3465, ...
LOG('MailBoxer', PROBLEM, 'archive_id = "%s"' % archive_id)
log.error('archive_id = "%s"' % archive_id)
def processSpool(self): # # run through the spool, and actually send the mail out # archive = self.restrictedTraverse(self.getValueFor('storage')) for spoolfilepath in os.listdir(MAILDROP_SPOOL): if os.path.exists(os.path.join(MAILDROP_SPOOL, '%s.lck' % spoolfilepath)): continue # we're locked spoolfile = file(os.path.join(MAILDROP_SPOOL, spoolfilepath)) line = spoolfile.readline().strip() if len(line) < 5 or line[:2] != ';;' or line[-2:] != ';;': LOG('MailBoxer', PROBLEM, 'Spooled email has no group specified') continue
022876f88e927316bd924ded9b9dc1cbc88f4167 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6274/022876f88e927316bd924ded9b9dc1cbc88f4167/XWFMailingList.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 3389, 1371, 12, 2890, 4672, 468, 468, 1086, 3059, 326, 1694, 1371, 16, 471, 6013, 1366, 326, 4791, 596, 468, 5052, 273, 365, 18, 29306, 29654, 12, 2890, 18, 24805, 1290, 2668, 5697...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 3389, 1371, 12, 2890, 4672, 468, 468, 1086, 3059, 326, 1694, 1371, 16, 471, 6013, 1366, 326, 4791, 596, 468, 5052, 273, 365, 18, 29306, 29654, 12, 2890, 18, 24805, 1290, 2668, 5697...
self.site().checkBlocks(sysop = sysop)
self.site().checkBlocks(sysop = True)
def protect(self, edit='sysop', move='sysop', unprotect=False, reason=None, duration = None, cascading = False, prompt=True, throttle=True): """(Un)protect a wiki page. Requires administrator status.
830c77f5c791b8c40ae3367efc08bbd3f0740fd7 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4404/830c77f5c791b8c40ae3367efc08bbd3f0740fd7/wikipedia.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17151, 12, 2890, 16, 3874, 2218, 9499, 556, 2187, 3635, 2218, 9499, 556, 2187, 640, 11815, 386, 33, 8381, 16, 3971, 33, 7036, 16, 3734, 273, 599, 16, 29502, 14968, 273, 1083, 16, 6866, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17151, 12, 2890, 16, 3874, 2218, 9499, 556, 2187, 3635, 2218, 9499, 556, 2187, 640, 11815, 386, 33, 8381, 16, 3971, 33, 7036, 16, 3734, 273, 599, 16, 29502, 14968, 273, 1083, 16, 6866, ...
print "reinitialize_command: command=%s" % command print " before: have_run =", self.have_run
def reinitialize_command (self, command, reinit_subcommands=0): """Reinitializes a command to the state it was in when first returned by 'get_command_obj()': ie., initialized but not yet finalized. This provides the opportunity to sneak option values in programmatically, overriding or supplementing user-supplied values from the config files and command line. You'll have to re-finalize the command object (by calling 'finalize_options()' or 'ensure_finalized()') before using it for real.
2b0119bd85af2030e27422393df7b0abf14207eb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/2b0119bd85af2030e27422393df7b0abf14207eb/dist.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 283, 11160, 67, 3076, 261, 2890, 16, 1296, 16, 283, 2738, 67, 1717, 7847, 33, 20, 4672, 3536, 426, 6769, 3128, 279, 1296, 358, 326, 919, 518, 1703, 316, 1347, 1122, 2106, 635, 296, 588...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 283, 11160, 67, 3076, 261, 2890, 16, 1296, 16, 283, 2738, 67, 1717, 7847, 33, 20, 4672, 3536, 426, 6769, 3128, 279, 1296, 358, 326, 919, 518, 1703, 316, 1347, 1122, 2106, 635, 296, 588...
finished_blocks = e['finished_blocks'] requested_blocks = e['requested_blocks'] for index in xrange(len(e['peers'])) if (finished_blocks[index])
for fin, req in zip(e['finished_blocks'], e['requested_blocks']): if fin:
def print_download_queue(console, download_queue): out = "" for e in download_queue: out += '%4d: [' % e['piece_index']; finished_blocks = e['finished_blocks'] requested_blocks = e['requested_blocks'] for index in xrange(len(e['peers'])) if (finished_blocks[index]) out += '#' elif requested_blocks[index] out += '+' else out += '-' out += ']\n'
4da7a90a0d04a8592ac31e365ce6a9c12e8a6eba /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6320/4da7a90a0d04a8592ac31e365ce6a9c12e8a6eba/client.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1172, 67, 7813, 67, 4000, 12, 8698, 16, 4224, 67, 4000, 4672, 225, 596, 273, 1408, 225, 364, 425, 316, 4224, 67, 4000, 30, 596, 1011, 1995, 24, 72, 30, 10228, 738, 425, 3292, 30100, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1172, 67, 7813, 67, 4000, 12, 8698, 16, 4224, 67, 4000, 4672, 225, 596, 273, 1408, 225, 364, 425, 316, 4224, 67, 4000, 30, 596, 1011, 1995, 24, 72, 30, 10228, 738, 425, 3292, 30100, ...
print self.gained.referrersStr(1)
self.gained.printReferrers(1)
def printOut(self): print 'lost %s objects, gained %s objects' % (len(self.lost), len(self.gained)) print '\n\nself.lost\n' print self.lost.typeFreqStr() print '\n\nself.gained\n' print self.gained.typeFreqStr() self.gained.printObjsByType() print '\n\nGAINED-OBJECT REFERRERS\n' print self.gained.referrersStr(1)
2f68815351a8c1fda94205efb8571c23be860b44 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7242/2f68815351a8c1fda94205efb8571c23be860b44/ObjectPool.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1172, 1182, 12, 2890, 4672, 1172, 296, 383, 334, 738, 87, 2184, 16, 314, 8707, 738, 87, 2184, 11, 738, 261, 1897, 12, 2890, 18, 383, 334, 3631, 562, 12, 2890, 18, 75, 8707, 3719, 117...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1172, 1182, 12, 2890, 4672, 1172, 296, 383, 334, 738, 87, 2184, 16, 314, 8707, 738, 87, 2184, 11, 738, 261, 1897, 12, 2890, 18, 383, 334, 3631, 562, 12, 2890, 18, 75, 8707, 3719, 117...
result.append('\\') result.append(char)
if char == '\000': result.append(r'\000') else: result.append('\\' + char) else: result.append(char)
def escape(pattern): "Escape all non-alphanumeric characters in pattern." result = [] alphanum=string.letters+'_'+string.digits for char in pattern: if char not in alphanum: result.append('\\') result.append(char) return string.join(result, '')
b1908846af1c70e77917d56798daa8242d80d2b5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/b1908846af1c70e77917d56798daa8242d80d2b5/re.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4114, 12, 4951, 4672, 315, 8448, 777, 1661, 17, 287, 21183, 3949, 316, 1936, 1199, 563, 273, 5378, 524, 17560, 33, 1080, 18, 26054, 6797, 4623, 15, 1080, 18, 16649, 364, 1149, 316, 1936,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 12, 4951, 4672, 315, 8448, 777, 1661, 17, 287, 21183, 3949, 316, 1936, 1199, 563, 273, 5378, 524, 17560, 33, 1080, 18, 26054, 6797, 4623, 15, 1080, 18, 16649, 364, 1149, 316, 1936,...
print "OOffice.to_text"
def to_text(self, outfile=None): if self.__text_output__ is not None: return self.__text_output__ print "OOffice.to_text"
5acf607fe866693c0a2b88b17b7895c564d2f2bd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12681/5acf607fe866693c0a2b88b17b7895c564d2f2bd/office.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 358, 67, 955, 12, 2890, 16, 8756, 33, 7036, 4672, 309, 365, 16186, 955, 67, 2844, 972, 353, 486, 599, 30, 327, 365, 16186, 955, 67, 2844, 972, 1172, 315, 51, 30126, 18, 869, 67, 955,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 358, 67, 955, 12, 2890, 16, 8756, 33, 7036, 4672, 309, 365, 16186, 955, 67, 2844, 972, 353, 486, 599, 30, 327, 365, 16186, 955, 67, 2844, 972, 1172, 315, 51, 30126, 18, 869, 67, 955,...
within self.burst_peak_time_window of t.
within window seconds of t. This is not used to define any coincidences, only to provide a short list of burst events for use in more costly comparison tests.
def bursts_near_peaktime(self, t): """ Return a list of the burst events whose peak times are within self.burst_peak_time_window of t. """ return self.snglbursttable[bisect.bisect_left(self.snglbursttable, t - self.burst_peak_time_window):bisect.bisect_right(self.snglbursttable, t + self.burst_peak_time_window)]
f23162e4f63afbd6a2032de2d75ca44643717584 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/f23162e4f63afbd6a2032de2d75ca44643717584/ligolw_binjfind.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 27966, 87, 67, 27862, 67, 10244, 957, 12, 2890, 16, 268, 4672, 3536, 2000, 279, 666, 434, 326, 27966, 2641, 8272, 11148, 4124, 854, 3470, 2742, 3974, 434, 268, 18, 225, 1220, 353, 486, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 27966, 87, 67, 27862, 67, 10244, 957, 12, 2890, 16, 268, 4672, 3536, 2000, 279, 666, 434, 326, 27966, 2641, 8272, 11148, 4124, 854, 3470, 2742, 3974, 434, 268, 18, 225, 1220, 353, 486, ...
print "nothing to do."
print "This option does not work yet."
def inspect(): mysql = mysql_support.MySQLConnect() if sys.argv[1] == "list": for dbkey in mysql.job_list(): print dbkey["jobID"], dbkey["job_id"], dbkey["submit_date"] if sys.argv[1] == "remove": ## This does not work yet. print "nothing to do."
57a414db198f444674182632ac07084d877a9036 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10674/57a414db198f444674182632ac07084d877a9036/webtlsmdd.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5334, 13332, 7219, 273, 7219, 67, 13261, 18, 28723, 5215, 1435, 225, 309, 2589, 18, 19485, 63, 21, 65, 422, 315, 1098, 6877, 364, 1319, 856, 316, 7219, 18, 4688, 67, 1098, 13332, 1172, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5334, 13332, 7219, 273, 7219, 67, 13261, 18, 28723, 5215, 1435, 225, 309, 2589, 18, 19485, 63, 21, 65, 422, 315, 1098, 6877, 364, 1319, 856, 316, 7219, 18, 4688, 67, 1098, 13332, 1172, ...
hgcmd, func, args, opts, cmdopts = dispatch._parse(ui, sys.argv[1:]) if hgcmd in nokwcommands.split(): return if hgcmd == 'diff': node1, node2 = cmdutil.revpair(repo, cmdopts.get('rev')) if node2 is not None: return if node1 is not None and node1 != repo.changectx().node(): hgcmd = 'diff1'
def reposetup(ui, repo): '''Sets up repo as kwrepo for keyword substitution. Overrides file method to return kwfilelog instead of filelog if file matches user configuration. Wraps commit to overwrite configured files with updated keyword substitutions. This is done for local repos only, and only if there are files configured at all for keyword substitution.''' try: if (not repo.local() or '.hg' in repo.root.split('/') or repo._url.startswith('bundle:')): return except AttributeError: pass hgcmd, func, args, opts, cmdopts = dispatch._parse(ui, sys.argv[1:]) if hgcmd in nokwcommands.split(): return if hgcmd == 'diff': # only expand if comparing against working dir node1, node2 = cmdutil.revpair(repo, cmdopts.get('rev')) if node2 is not None: return # shrink if rev is not current node if node1 is not None and node1 != repo.changectx().node(): hgcmd = 'diff1' inc, exc = [], ['.hg*'] for pat, opt in ui.configitems('keyword'): if opt != 'ignore': inc.append(pat) else: exc.append(pat) if not inc: return global _kwtemplater restrict = hgcmd in restricted.split() _kwtemplater = kwtemplater(ui, repo, inc, exc, restrict) class kwrepo(repo.__class__): def file(self, f, kwmatch=False): if f[0] == '/': f = f[1:] if kwmatch or _kwtemplater.matcher(f): return kwfilelog(self.sopener, f) return filelog.filelog(self.sopener, f) def wread(self, filename): data = super(kwrepo, self).wread(filename) if restrict and _kwtemplater.matcher(filename): return _kwtemplater.shrink(data) return data def commit(self, files=None, text='', user=None, date=None, match=util.always, force=False, force_editor=False, p1=None, p2=None, extra={}, empty_ok=False): wlock = lock = None _p1 = _p2 = None try: wlock = self.wlock() lock = self.lock() # store and postpone commit hooks commithooks = {} for name, cmd in ui.configitems('hooks'): if name.split('.', 1)[0] == 'commit': commithooks[name] = cmd ui.setconfig('hooks', name, None) if commithooks: # store parents for commit hook environment if p1 is None: _p1, _p2 = repo.dirstate.parents() else: _p1, _p2 = p1, p2 or nullid _p1 = hex(_p1) if _p2 == nullid: _p2 = '' else: _p2 = hex(_p2) node = super(kwrepo, self).commit(files=files, text=text, user=user, date=date, match=match, force=force, force_editor=force_editor, p1=p1, p2=p2, extra=extra, empty_ok=empty_ok) # restore commit hooks for name, cmd in commithooks.iteritems(): ui.setconfig('hooks', name, cmd) if node is not None: _overwrite(ui, self, node=node) repo.hook('commit', node=node, parent1=_p1, parent2=_p2) return node finally: del wlock, lock repo.__class__ = kwrepo patch.patchfile.__init__ = _kwpatchfile_init
456c7fd60d171a3adc3fc12c0f3ad4066f54f2ee /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11312/456c7fd60d171a3adc3fc12c0f3ad4066f54f2ee/keyword.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13686, 278, 416, 12, 4881, 16, 3538, 4672, 9163, 2785, 731, 3538, 487, 5323, 7422, 364, 4932, 12785, 18, 531, 9857, 585, 707, 358, 327, 5323, 7540, 12970, 3560, 434, 661, 12970, 309, 585...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13686, 278, 416, 12, 4881, 16, 3538, 4672, 9163, 2785, 731, 3538, 487, 5323, 7422, 364, 4932, 12785, 18, 531, 9857, 585, 707, 358, 327, 5323, 7540, 12970, 3560, 434, 661, 12970, 309, 585...
contours = [approxPolyDP(Mat(x), 3, 1) for x in contours]
contours = [approxPolyDP(Mat.from_ndarray(x.reshape(1,len(x),2)), 3, 1) for x in contours]
def generate_image(): img = Mat(Size(w,w), CV_8UC1) img.setTo(0) for i in range(6): dx = (i%2)*250 - 30 dy = (i/2)*150 white = Scalar(255) black = Scalar(0) if i==0: for j in range(11): angle = (j+5)*CV_PI/21 line(img, Point(round(dx+100+j*10-80*cos(angle)), round(dy+100-90*sin(angle))), Point(round(dx+100+j*10-30*cos(angle)), round(dy+100-30*sin(angle))), white, 1, 8, 0) ellipse( img, Point(dx+150, dy+100), Size(100,70), 0, 0, 360, white, -1, 8, 0 ) ellipse( img, Point(dx+115, dy+70), Size(30,20), 0, 0, 360, black, -1, 8, 0 ) ellipse( img, Point(dx+185, dy+70), Size(30,20), 0, 0, 360, black, -1, 8, 0 ) ellipse( img, Point(dx+115, dy+70), Size(15,15), 0, 0, 360, white, -1, 8, 0 ) ellipse( img, Point(dx+185, dy+70), Size(15,15), 0, 0, 360, white, -1, 8, 0 ) ellipse( img, Point(dx+115, dy+70), Size(5,5), 0, 0, 360, black, -1, 8, 0 ) ellipse( img, Point(dx+185, dy+70), Size(5,5), 0, 0, 360, black, -1, 8, 0 ) ellipse( img, Point(dx+150, dy+100), Size(10,5), 0, 0, 360, black, -1, 8, 0 ) ellipse( img, Point(dx+150, dy+150), Size(40,10), 0, 0, 360, black, -1, 8, 0 ) ellipse( img, Point(dx+27, dy+100), Size(20,35), 0, 0, 360, white, -1, 8, 0 ) ellipse( img, Point(dx+273, dy+100), Size(20,35), 0, 0, 360, white, -1, 8, 0 ) return img
19097abeee12f8288a705db7b9c8ee86ebb4b62e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4310/19097abeee12f8288a705db7b9c8ee86ebb4b62e/contours.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 67, 2730, 13332, 3774, 273, 14493, 12, 1225, 12, 91, 16, 91, 3631, 385, 58, 67, 28, 17479, 21, 13, 3774, 18, 542, 774, 12, 20, 13, 225, 364, 277, 316, 1048, 12, 26, 4672, 663...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 67, 2730, 13332, 3774, 273, 14493, 12, 1225, 12, 91, 16, 91, 3631, 385, 58, 67, 28, 17479, 21, 13, 3774, 18, 542, 774, 12, 20, 13, 225, 364, 277, 316, 1048, 12, 26, 4672, 663...
mro_err_msg = """Cannot create class.The superclasses have conflicting inheritance trees which leave the method resolution order (MRO) undefined for bases """
mro_err_msg = """Cannot create a consistent method resolution order (MRO) for bases """
def consistency_with_epg(): if verbose: print "Testing consistentcy with EPG..." class Pane(object): pass class ScrollingMixin(object): pass class EditingMixin(object): pass class ScrollablePane(Pane,ScrollingMixin): pass class EditablePane(Pane,EditingMixin): pass class EditableScrollablePane(ScrollablePane,EditablePane): pass vereq(EditableScrollablePane.__mro__, (EditableScrollablePane, ScrollablePane, EditablePane, Pane, ScrollingMixin, EditingMixin, object))
a0f8c5f77609bc07ccf442478a892a5efb5b4e30 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/a0f8c5f77609bc07ccf442478a892a5efb5b4e30/test_descr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14297, 67, 1918, 67, 881, 75, 13332, 309, 3988, 30, 1172, 315, 22218, 11071, 2431, 598, 512, 18679, 7070, 667, 453, 8806, 12, 1612, 4672, 1342, 667, 2850, 15742, 14439, 12, 1612, 4672, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14297, 67, 1918, 67, 881, 75, 13332, 309, 3988, 30, 1172, 315, 22218, 11071, 2431, 598, 512, 18679, 7070, 667, 453, 8806, 12, 1612, 4672, 1342, 667, 2850, 15742, 14439, 12, 1612, 4672, 1...
script = 'echo -- Quicktime Components Installation/Upgrade -- \n'
script = 'echo -- QuickTime Components Installation/Upgrade -- \n'
def _performInstallation(installList, upgradeList): installCount = len(installList) upgradeCount = len(upgradeList) if installCount > 0 or upgradeCount > 0: message = _buildMessage(installCount, upgradeCount) else: print ' nothing to install or upgrade.' return False dlogTitle = 'Quicktime Components Installation' dlogResult = showWarningDialog(dlogTitle, message, ['Yes', 'No']) proceedAndRestart = (dlogResult == 0) if proceedAndRestart: script = 'echo -- Quicktime Components Installation/Upgrade -- \n' for install in installList: script += _getInstallCommands(install) for upgrade in upgradeList: script += _getUpgradeCommands(upgrade) script += _getRestartCommands() _runScript(script) return proceedAndRestart
612b1072d3c185d5578dcb970ba098cfcc134b01 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12354/612b1072d3c185d5578dcb970ba098cfcc134b01/ComponentInstaller.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 16092, 21790, 12, 5425, 682, 16, 8400, 682, 4672, 3799, 1380, 273, 562, 12, 5425, 682, 13, 8400, 1380, 273, 562, 12, 15097, 682, 13, 309, 3799, 1380, 405, 374, 578, 8400, 1380, 40...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 16092, 21790, 12, 5425, 682, 16, 8400, 682, 4672, 3799, 1380, 273, 562, 12, 5425, 682, 13, 8400, 1380, 273, 562, 12, 15097, 682, 13, 309, 3799, 1380, 405, 374, 578, 8400, 1380, 40...
raise Exception, "Evaluation of code safety exceeded timeout threshold!"
raise Exception, "Evaluation of code safety exceeded timeout threshold ("+str(nonportable.getruntime() - starttime)+" seconds)"
def safe_check(code): """Check the code to be safe.""" # NOTE: This code will not work in Windows Mobile due to the reliance on subprocess # Get the path to safe_check.py by using the original start directory of python path_to_safe_check = os.path.join(repy_constants.REPY_START_DIR, "safe_check.py") # Start a safety check process, reading from the user code and outputing to a pipe we can read proc = subprocess.Popen(["python", path_to_safe_check],stdin=subprocess.PIPE, stdout=subprocess.PIPE) # Write out the user code, close so the other end gets an EOF proc.stdin.write(code) proc.stdin.close() # Wait for the process to terminate starttime = nonportable.getruntime() status = None # Only wait up to EVALUTATION_TIMEOUT seconds before terminating while status == None and (nonportable.getruntime() - starttime < EVALUTATION_TIMEOUT): status = proc.poll() time.sleep(0.1) else: # Check if the process is still running if status == None: # Try to terminate the external process try: harshexit.portablekill(proc.pid) except: pass # Raise an exception raise Exception, "Evaluation of code safety exceeded timeout threshold!" # Read the output and close the pipe output = proc.stdout.read() proc.stdout.close() # Check the output, None is success, else it is a failure if output == "None": return True # If there is no output, this is a fatal error condition elif output == "": raise Exception, "Fatal error while evaluating code safety!" else: # Raise the error from the output raise safety_exceptions.SafeException, output
5ab0811cb54d9ce811fd7d8ba212c9b3dacb0a09 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7263/5ab0811cb54d9ce811fd7d8ba212c9b3dacb0a09/safe.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4183, 67, 1893, 12, 710, 4672, 3536, 1564, 326, 981, 358, 506, 4183, 12123, 468, 5219, 30, 1220, 981, 903, 486, 1440, 316, 8202, 20428, 6541, 358, 326, 14719, 1359, 603, 6652, 225, 468, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4183, 67, 1893, 12, 710, 4672, 3536, 1564, 326, 981, 358, 506, 4183, 12123, 468, 5219, 30, 1220, 981, 903, 486, 1440, 316, 8202, 20428, 6541, 358, 326, 14719, 1359, 603, 6652, 225, 468, ...
lib = self.iTunes.sources.ItemByName('Library') lib_playlists = [pl.Name for pl in lib.Playlists] if 'Books' in lib_playlists: lib_books = lib.Playlists.ItemByName('Books').Tracks
for source in self.iTunes.sources: if source.Kind == self.Sources.index('Library'): lib = source self.log.info(" Library source: '%s' kind: %s" % (lib.Name, self.Sources[lib.Kind])) break else: self.log.error(" Library source not found") if lib is not None: lib_books = None for pl in lib.Playlists: if self.PlaylistKind[pl.Kind] == 'User' and self.PlaylistSpecialKind[pl.SpecialKind] == 'Books': if DEBUG: self.log.info(" Books playlist: '%s' special_kind: '%s'" % (pl.Name, self.PlaylistSpecialKind[pl.SpecialKind])) lib_books = pl.Tracks break else: if DEBUG: self.log.error(" no Books playlist found")
def _get_library_books(self): ''' Populate a dict of paths from iTunes Library|Books ''' library_books = {}
462b2e6c44751baac6b573b9a8450f4512d05312 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9125/462b2e6c44751baac6b573b9a8450f4512d05312/driver.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 12083, 67, 12567, 12, 2890, 4672, 9163, 22254, 279, 2065, 434, 2953, 628, 277, 56, 27490, 18694, 96, 9084, 87, 9163, 5313, 67, 12567, 273, 2618, 2, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 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, 588, 67, 12083, 67, 12567, 12, 2890, 4672, 9163, 22254, 279, 2065, 434, 2953, 628, 277, 56, 27490, 18694, 96, 9084, 87, 9163, 5313, 67, 12567, 273, 2618, 2, -100, -100, -100, -100, ...
if not pdf_stylesheet.has_key(parent_style): parent_style = 'Normal' style = ParagraphStyle('', parent=pdf_stylesheet[parent_style], **style_attr)
parent_style = get_style(pdf_stylesheet, alias_style, parent_style) style = ParagraphStyle('', parent=parent_style, **style_attr)
def create_paragraph(pdf_stylesheet, element, content): """ """ parent_style = 'Normal' style_attr = {} content = ''.join(content) bulletText = None for key, attr_value in element[1].iteritems(): key = key[1] if key == 'style': parent_style = attr_value elif key == 'bulletText': bulletText = attr_value else: if key == 'alignment': attr_value = __tab_para_alignment.get(attr_value, __tab_para_alignment['left']) elif key in ['leftIndent', 'rightIndent']: attr_value = get_value_reportlab(attr_value) style_attr[key] = attr_value if not pdf_stylesheet.has_key(parent_style): parent_style = 'Normal' style = ParagraphStyle('', parent=pdf_stylesheet[parent_style], **style_attr) return Paragraph(content, style, bulletText)
51b02e012792ad1fcdef1300580c1d6a58548c1f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12681/51b02e012792ad1fcdef1300580c1d6a58548c1f/rml.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 22445, 12, 7699, 67, 19403, 16, 930, 16, 913, 4672, 3536, 3536, 982, 67, 4060, 273, 296, 5506, 11, 2154, 67, 1747, 273, 2618, 913, 273, 875, 18, 5701, 12, 1745, 13, 31650, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 22445, 12, 7699, 67, 19403, 16, 930, 16, 913, 4672, 3536, 3536, 982, 67, 4060, 273, 296, 5506, 11, 2154, 67, 1747, 273, 2618, 913, 273, 875, 18, 5701, 12, 1745, 13, 31650, 1...
return self.get('system', name) raise ConfigParser.NoOptionError
bin = self.get('system', name) if bin == "False": return False else: return bin raise ConfigParser.NoOptionError('system', name)
def _getbin(self, name): if self.has_option('system', name): return self.get('system', name) raise ConfigParser.NoOptionError
0caba114cd86255dcf1be4e04b0b7cd10933fdd0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2758/0caba114cd86255dcf1be4e04b0b7cd10933fdd0/eagle3d.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 4757, 12, 2890, 16, 508, 4672, 309, 365, 18, 5332, 67, 3482, 2668, 4299, 2187, 508, 4672, 327, 365, 18, 588, 2668, 4299, 2187, 508, 13, 1002, 25076, 18, 2279, 1895, 668, 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, 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, 4757, 12, 2890, 16, 508, 4672, 309, 365, 18, 5332, 67, 3482, 2668, 4299, 2187, 508, 4672, 327, 365, 18, 588, 2668, 4299, 2187, 508, 13, 1002, 25076, 18, 2279, 1895, 668, 2, ...
<a href='http://62.95.69.15/cgi-bin/thw?${HTML}=sfst_lst&amp;${OOHTML}=sfst_dok&amp;${SNHTML}=sfst_err&amp;${BASE}=SFST&amp;${TRIPSHOW}=format%3DTHW&amp;BET=<!--
<a href="http://62.95.69.15/cgi-bin/thw?${HTML}=sfst_lst&amp;${OOHTML}=sfst_dok&amp;${SNHTML}=sfst_err&amp;${BASE}=SFST&amp;${TRIPSHOW}=format%3DTHW&amp;BET=<!--
def _build_indexpages(self, by_pred_obj, by_subj_pred): documents = defaultdict(lambda:defaultdict(list)) pagetitles = {} pagelabels = {} fsnr_pred = Util.ns['rinfo']+'fsNummer' title_pred = Util.ns['dct']+'title' type_pred = Util.ns['rdf']+'type' type_obj = Util.ns['rinfo']+'KonsolideradGrundforfattning' year_lbl = u'Ordnade efter utgivningsr' title_lbl = u'Ordnade efter titel' # construct the 404 page doc = u'''<?xml version="1.0"?>
790e5f49889d891c35b2d7558f04a08af0d115bf /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4027/790e5f49889d891c35b2d7558f04a08af0d115bf/SFS.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3510, 67, 1615, 7267, 12, 2890, 16, 635, 67, 6510, 67, 2603, 16, 635, 67, 1717, 78, 67, 6510, 4672, 7429, 273, 13090, 12, 14661, 30, 1886, 1576, 12, 1098, 3719, 4262, 278, 9398, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3510, 67, 1615, 7267, 12, 2890, 16, 635, 67, 6510, 67, 2603, 16, 635, 67, 1717, 78, 67, 6510, 4672, 7429, 273, 13090, 12, 14661, 30, 1886, 1576, 12, 1098, 3719, 4262, 278, 9398, ...
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)
6b2e4e8451b2ff914627bf148e284ac33e6ccb57 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9278/6b2e4e8451b2ff914627bf148e284ac33e6ccb57/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, ...
status = model.StatusTranslation.query.filter_by(statusname='Approved').one()
status = self.approvedStatus
def _user_can_set_acls(self, identity, pkg): '''Check that the current user can set acls.
48b4c95df35399b9205c63bf94720f75862df541 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9953/48b4c95df35399b9205c63bf94720f75862df541/dispatcher.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1355, 67, 4169, 67, 542, 67, 69, 6429, 12, 2890, 16, 4215, 16, 3475, 4672, 9163, 1564, 716, 326, 783, 729, 848, 444, 30906, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1355, 67, 4169, 67, 542, 67, 69, 6429, 12, 2890, 16, 4215, 16, 3475, 4672, 9163, 1564, 716, 326, 783, 729, 848, 444, 30906, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, ...
d.addCallback(handlePushes, repo)
d.addCallback(handlePushes, repo, self.do_update)
def poll(self): if self.runnings >= self.parallels: repomsg = '' if self.repos: repomsg = ' for %s' % self.repos[-1].name log.msg("skipping a cycle%s, I'm too busy (%d >= %d)" % (repomsg, self.runnings, self.parallels)) return if not self.repos: n = datetime.now() if self.start_cycle is not None: lag = n - self.start_cycle log.msg("Cycle took %d seconds" % lag.seconds) self.start_cycle = n self.repos = list(Repository.objects.filter(forest__isnull = True)) self.parallels = 1 # make sure to have all forests for forest in Forest.objects.all(): url = str(forest.url + '?style=raw') d = getPage(url, timeout = self.timeout) d.addCallback(self.gotForest, forest) d.addErrback(self.failedForest, forest) self.runnings += 1 return repo = self.repos.pop()
4adde9d6762653e433871bd05e274a0da23fae09 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12435/4adde9d6762653e433871bd05e274a0da23fae09/pushes_plugin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7672, 12, 2890, 4672, 309, 365, 18, 2681, 82, 899, 1545, 365, 18, 18054, 87, 30, 2071, 362, 1055, 273, 875, 309, 365, 18, 15564, 30, 2071, 362, 1055, 273, 296, 364, 738, 87, 11, 738,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7672, 12, 2890, 4672, 309, 365, 18, 2681, 82, 899, 1545, 365, 18, 18054, 87, 30, 2071, 362, 1055, 273, 875, 309, 365, 18, 15564, 30, 2071, 362, 1055, 273, 296, 364, 738, 87, 11, 738,...
def send(self, ACLmsg, method="jabber"):
def send(self, ACLmsg, method="auto"):
def send(self, ACLmsg, method="jabber"):
9f0b7c0364d086fd6fa03dbe1cb839f880130866 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/10121/9f0b7c0364d086fd6fa03dbe1cb839f880130866/Agent.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 12, 2890, 16, 10098, 3576, 16, 707, 1546, 78, 378, 744, 6, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 12, 2890, 16, 10098, 3576, 16, 707, 1546, 78, 378, 744, 6, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Extension( 'sgmlop',
Extension( 'reportlab/lib/sgmlop',
def run(): LIBS = [] setup( name="Reportlab", version="1.15.3", description="Reportlab PDF generation tools", author="The boys from SW19", author_email="info@reportlab.com", url="http://www.reportlab.com/", package_dir = {'': '..'}, packages=[ # include anything with an __init__ 'reportlab', 'reportlab.docs', 'reportlab.docs.graphguide', 'reportlab.docs.images', 'reportlab.docs.reference', 'reportlab.docs.userguide', 'reportlab.fonts', 'reportlab.graphics', 'reportlab.graphics.charts', 'reportlab.graphics.widgets', 'reportlab.lib', 'reportlab.pdfbase', 'reportlab.pdfgen', 'reportlab.platypus', ], data_files = [('docs/images', ['docs/images/Edit_Prefs.gif', 'docs/images/Python_21.gif', 'docs/images/Python_21_HINT.gif', 'docs/images/fileExchange.gif', 'docs/images/jpn.gif', 'docs/images/jpnchars.jpg', 'docs/images/lj8100.jpg', 'docs/images/replogo.a85', 'docs/images/replogo.gif']), ('fonts', ['fonts/LeERC___.AFM', 'fonts/LeERC___.PFB', 'fonts/luxiserif.ttf', 'fonts/rina.ttf'] )], ext_modules = [Extension( '_rl_accel', ['lib/_rl_accel.c'], include_dirs=[], define_macros=[], library_dirs=[], libraries=LIBS, # libraries to link against ), Extension( 'sgmlop', ['lib/sgmlop.c'], include_dirs=[], define_macros=[], library_dirs=[], libraries=LIBS, # libraries to link against ), Extension( 'pyHnj', ['lib/pyHnjmodule.c', 'lib/hyphen.c', 'lib/hnjalloc.c'], include_dirs=[], define_macros=[], library_dirs=[], libraries=LIBS, # libraries to link against ), ], )
3d98c85095bfb26ef062b09b88057d05b3f35850 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3878/3d98c85095bfb26ef062b09b88057d05b3f35850/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 13332, 8961, 12692, 273, 5378, 3875, 12, 508, 1546, 4820, 7411, 3113, 1177, 1546, 21, 18, 3600, 18, 23, 3113, 2477, 1546, 4820, 7411, 12667, 9377, 8513, 3113, 2869, 1546, 1986, 800, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 13332, 8961, 12692, 273, 5378, 3875, 12, 508, 1546, 4820, 7411, 3113, 1177, 1546, 21, 18, 3600, 18, 23, 3113, 2477, 1546, 4820, 7411, 12667, 9377, 8513, 3113, 2869, 1546, 1986, 800, ...
if self.sender in BL:
self.log.debug("[check_lists]: BLACK_LIST=%s" % BL) if sender in BL:
def check_lists(self, config): """ Check if the user is authorized to use the handler """
d4c83e442added28c91a5b63bb8ef7f5aea9a05f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3144/d4c83e442added28c91a5b63bb8ef7f5aea9a05f/MailHandler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 9772, 12, 2890, 16, 642, 4672, 3536, 2073, 309, 326, 729, 353, 10799, 358, 999, 326, 1838, 3536, 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, 866, 67, 9772, 12, 2890, 16, 642, 4672, 3536, 2073, 309, 326, 729, 353, 10799, 358, 999, 326, 1838, 3536, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
doc = html(*info)
text, doc = 0, html(info, self.context)
def handle(self, info=None): import sys, os info = info or sys.exc_info() text = 0 print reset()
09029ec15c2b61a0aa506286a6bb485f468ac920 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/09029ec15c2b61a0aa506286a6bb485f468ac920/cgitb.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 12, 2890, 16, 1123, 33, 7036, 4672, 1930, 2589, 16, 1140, 1123, 273, 1123, 578, 2589, 18, 10075, 67, 1376, 1435, 977, 273, 374, 1172, 2715, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 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, 1640, 12, 2890, 16, 1123, 33, 7036, 4672, 1930, 2589, 16, 1140, 1123, 273, 1123, 578, 2589, 18, 10075, 67, 1376, 1435, 977, 273, 374, 1172, 2715, 1435, 2, -100, -100, -100, -100, -100, ...
if change[2] == TaskStamp:
stampClass = change[2].schemaItem.stampClass if stampClass == TaskStamp:
def runDialog(self): # Check in case the dialog somehow got cancelled if self.dialogUp:
de0728fb5005654b8328f652694ee99b999c9874 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9228/de0728fb5005654b8328f652694ee99b999c9874/RecurrenceDialog.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 6353, 12, 2890, 4672, 468, 2073, 316, 648, 326, 6176, 28578, 2363, 13927, 309, 365, 18, 12730, 1211, 30, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 6353, 12, 2890, 4672, 468, 2073, 316, 648, 326, 6176, 28578, 2363, 13927, 309, 365, 18, 12730, 1211, 30, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
def docroutine(self, object):
def docroutine(self, object, name=None, clname=None):
def docroutine(self, object): """Produce text documentation for a function or method object.""" if inspect.ismethod(object): object = object.im_func if inspect.isbuiltin(object): decl = self.bold(object.__name__) + '(...)' else: args, varargs, varkw, defaults = inspect.getargspec(object) argspec = inspect.formatargspec( args, varargs, varkw, defaults, formatvalue=self.formatvalue) if object.__name__ == '<lambda>': decl = '<lambda> ' + argspec[1:-1] else: decl = self.bold(object.__name__) + argspec doc = getdoc(object) if doc: return decl + '\n' + rstrip(self.indent(doc)) + '\n' else: return decl + '\n'
37f7b38eb6247564c00c8a355ab12268e8486c4e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/37f7b38eb6247564c00c8a355ab12268e8486c4e/pydoc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 997, 22640, 12, 2890, 16, 733, 16, 508, 33, 7036, 16, 927, 529, 33, 7036, 4672, 3536, 25884, 977, 7323, 364, 279, 445, 578, 707, 733, 12123, 309, 5334, 18, 291, 2039, 12, 1612, 4672, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 997, 22640, 12, 2890, 16, 733, 16, 508, 33, 7036, 16, 927, 529, 33, 7036, 4672, 3536, 25884, 977, 7323, 364, 279, 445, 578, 707, 733, 12123, 309, 5334, 18, 291, 2039, 12, 1612, 4672, ...
""" Attempts to revert the last user action by popping an action from the undo stack and executing it.
""" Attempts to revert the last user action by popping an action from the undo stack and executing it.
def Undo(self): """ Attempts to revert the last user action by popping an action from the undo stack and executing it. """ self.__performingUndo = True if len(self.__undoStack): cmd = self.__undoStack.pop() self.ExecuteCommand(cmd) elif len(self.__savedUndoStack): self.__savedUndo = True cmd = self.__savedUndoStack.pop() self.ExecuteCommand(cmd) self.__savedUndo = False self.__performingUndo = False
e2b4f4a534dc5054c26a7ac44730cd6e0c158de4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10033/e2b4f4a534dc5054c26a7ac44730cd6e0c158de4/Project.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1351, 2896, 12, 2890, 4672, 3536, 6020, 9585, 358, 15226, 326, 1142, 729, 1301, 635, 1843, 1382, 392, 1301, 628, 326, 15436, 2110, 471, 11274, 518, 18, 3536, 365, 16186, 16092, 310, 31224,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1351, 2896, 12, 2890, 4672, 3536, 6020, 9585, 358, 15226, 326, 1142, 729, 1301, 635, 1843, 1382, 392, 1301, 628, 326, 15436, 2110, 471, 11274, 518, 18, 3536, 365, 16186, 16092, 310, 31224,...
exactmatch, matched, unmatched = \
exactmatch, matched, unmatched = \
def installLocal(self, pkg, po=None, updateonly=False): """ handles installs/updates of rpms provided on the filesystem in a local dir (ie: not from a repo)
73608510136c99d64d53a82d34851986935d56d3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5445/73608510136c99d64d53a82d34851986935d56d3/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3799, 2042, 12, 2890, 16, 3475, 16, 8275, 33, 7036, 16, 1089, 3700, 33, 8381, 4672, 3536, 7372, 31011, 19, 14703, 434, 8715, 959, 2112, 603, 326, 6496, 316, 279, 1191, 1577, 261, 1385, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3799, 2042, 12, 2890, 16, 3475, 16, 8275, 33, 7036, 16, 1089, 3700, 33, 8381, 4672, 3536, 7372, 31011, 19, 14703, 434, 8715, 959, 2112, 603, 326, 6496, 316, 279, 1191, 1577, 261, 1385, ...
for p in filter(lambda x: x[3] == arch, affected): if not self.binaries['testing'][arch][0].has_key(p[0]) or \ skip_archall and self.binaries['testing'][arch][0][p[0]]['architecture'] == 'all': continue r = self.excuse_unsat_deps(p[0], None, arch, 'testing', None, excluded=[]) if not r and p[0] not in broken: broken.append(p[0])
nbroken = -1 while len(broken) > nbroken: nbroken = len(broken) for p in filter(lambda x: x[3] == arch, affected): if not self.binaries['testing'][arch][0].has_key(p[0]) or \ skip_archall and self.binaries['testing'][arch][0][p[0]]['architecture'] == 'all': continue r = self.excuse_unsat_deps(p[0], None, arch, 'testing', None, excluded=broken) if not r and p[0] not in broken: broken.append(p[0])
def iter_packages(self, packages, output): extra = [] nuninst_comp = self.get_nuninst()
4c244612e5aab657228c46716aa44ab98349ab71 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2784/4c244612e5aab657228c46716aa44ab98349ab71/britney.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1400, 67, 10308, 12, 2890, 16, 5907, 16, 876, 4672, 2870, 273, 5378, 290, 318, 8591, 67, 2919, 273, 365, 18, 588, 67, 82, 318, 8591, 1435, 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, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1400, 67, 10308, 12, 2890, 16, 5907, 16, 876, 4672, 2870, 273, 5378, 290, 318, 8591, 67, 2919, 273, 365, 18, 588, 67, 82, 318, 8591, 1435, 2, -100, -100, -100, -100, -100, -100, -100, ...
self.J = kwarks['J']
self.J = kwargs['J']
def __init__(self, f, x0, **kwargs): self.f = f if isinstance(x0, (tuple, list)): x0 = matrix(x0) assert x0.cols == 1, 'need a vector' self.x0 = x0 if 'J' in kwargs: self.J = kwarks['J'] else: def J(*x): return jacobian(f, x) self.J = J self.norm = kwargs['norm'] self.verbose = kwargs['verbose']
5112ae69dd3264cfc684408f4df646aadf12a126 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11851/5112ae69dd3264cfc684408f4df646aadf12a126/optimization.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 284, 16, 619, 20, 16, 2826, 4333, 4672, 365, 18, 74, 273, 284, 309, 1549, 12, 92, 20, 16, 261, 8052, 16, 666, 3719, 30, 619, 20, 273, 3148, 12, 92, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 284, 16, 619, 20, 16, 2826, 4333, 4672, 365, 18, 74, 273, 284, 309, 1549, 12, 92, 20, 16, 261, 8052, 16, 666, 3719, 30, 619, 20, 273, 3148, 12, 92, ...
regexp = re.compile("window.location='/thread.php\?id=(.*)'")
regexp = re.compile("window.location='/thread.php\?id=(\d+)'")
def get_id(self): tag = self.__get_element('thread_link')
5d70abf8f9559537e09f2f4e3737d7db8bbdad1f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7471/5d70abf8f9559537e09f2f4e3737d7db8bbdad1f/contact_list.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 350, 12, 2890, 4672, 1047, 273, 365, 16186, 588, 67, 2956, 2668, 5930, 67, 1232, 6134, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 350, 12, 2890, 4672, 1047, 273, 365, 16186, 588, 67, 2956, 2668, 5930, 67, 1232, 6134, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
'SAGE Library Source Code',
'Sage Library Source Code',
def bundle(self, filename, options='', url=None, base=None, to=None): r""" Create an hg changeset bundle with the given filename against the repository at the given url (which is by default the 'official' SAGE repository, unless push_url() is changed in a setup file).
9f49a1c307694e045ec245b9406a55b5387d5935 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/9f49a1c307694e045ec245b9406a55b5387d5935/hg.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3440, 12, 2890, 16, 1544, 16, 702, 2218, 2187, 880, 33, 7036, 16, 1026, 33, 7036, 16, 358, 33, 7036, 4672, 436, 8395, 1788, 392, 22576, 22463, 3440, 598, 326, 864, 1544, 5314, 326, 335...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3440, 12, 2890, 16, 1544, 16, 702, 2218, 2187, 880, 33, 7036, 16, 1026, 33, 7036, 16, 358, 33, 7036, 4672, 436, 8395, 1788, 392, 22576, 22463, 3440, 598, 326, 864, 1544, 5314, 326, 335...
char.incognito = int( textentries[ key ] )
char.incognito = str2bool( textentries[ key ] )
def charinfo_response( player, args, choice ): socket = player.socket char = args[0] if choice.button == 0 or not char or not socket: return 1 # check for rank #if char.rank >= player.rank and not player == char: # socket.sysmessage( "You've burnt your fingers!" ) # return 1 textentries = choice.text keys = textentries.keys() for key in keys: if key == 1: char.name = textentries[ key ] elif key == 2: char.title = textentries[ key ] elif key == 3: char.id = int( hex2dec( textentries[ key ] ) ) elif key == 4: char.orgid = int( hex2dec( textentries[ key ] ) ) elif key == 5: char.skin = int( hex2dec( textentries[ key ] ) ) elif key == 6: char.orgskin = int( hex2dec( textentries[ key ] ) ) elif key == 7: char.fame = int( textentries[ key ] ) elif key == 8: char.karma = int( textentries[ key ] ) elif key == 9: char.kills = int( textentries[ key ] ) elif key == 10: char.deaths = int( textentries[ key ] ) elif key == 11: char.pos = ( textentries[ key ] ) elif key == 12: char.direction = int( textentries[ key ] ) elif key == 13: char.invulnerable = int( textentries[ key ] ) elif key == 14: char.strength = int( textentries[ key ] ) elif key == 15: char.dexterity = int( textentries[ key ] ) elif key == 16: char.intelligence = int( textentries[ key ] ) elif key == 17: char.maxhitpoints = int( textentries[ key ] ) elif key == 18: char.hitpoints = int( textentries[ key ] ) elif key == 19: char.maxstamina = int( textentries[ key ] ) elif key == 20: char.stamina = int( textentries[ key ] ) elif key == 21: char.maxmana = int( textentries[ key ] ) elif key == 22: char.mana = int( textentries[ key ] ) elif key == 23: char.hidden = int( textentries[ key ] ) elif key == 24: char.dead = int( textentries[ key ] ) elif key == 25: char.polymorph = int( textentries[ key ] ) elif key == 26: char.incognito = int( textentries[ key ] ) elif key == 27: char.hunger = int( textentries[ key ] ) elif key == 28: char.war = int( textentries[ key ] ) elif key == 29: char.invisible = int( textentries[ key ] ) elif key == 30: char.frozen = int( textentries[ key ] ) elif key == 31: char.stealthedsteps = int( textentries[ key ] ) elif key == 32: char.strength2 = int( hex2dec( textentries[ key ] ) ) elif key == 33: char.dexterity2 = int( hex2dec( textentries[ key ] ) ) elif key == 34: char.intelligence2 = int( hex2dec( textentries[ key ] ) ) elif key == 35: char.saycolor = int( hex2dec( textentries[ key ] ) ) elif key == 36: char.emotecolor = int( hex2dec( textentries[ key ] ) ) elif key == 37: if ( textentries[key] ) == "female": char.gender = 1 elif ( textentries[key] ) == "male": char.gender = 0 elif ( textentries[key] ) == "none": char.gender = 0 elif len(textentries[key]) == 1: if ( int( textentries[ key ] ) < 0 ) or ( int( textentries[ key ] ) > 1 ): char.gender = 0 else: char.gender = int( textentries[ key ] ) elif key == 38: if not char.npc: char.account.name = textentries[ key ] else: if ( textentries[ key ] ) == 'Null' or ( textentries[ key ] ) == 'None': char.owner = 'None' else: char.owner = int( textentries[ key ] ) elif key == 39: if not char.npc: char.visrange = int( textentries[ key ] ) #else: # char.spawnregion = ( textentries[ key ] ) elif key == 40: if not char.npc: char.lightbonus = int( textentries[ key ] ) #else: # char.carve = ( textentries[ key ] ) elif key == 41: if not char.npc: char.profile = textentries[ key ] elif key == 42: if not char.npc: if (textentries[ key ]) == '': if char.hastag( 'guild' ): char.deltag( 'guild' ) else: char.settag( 'guild', int( hex2dec( textentries[ key ] ) ) ) elif key == 43: if not char.npc: if (textentries[ key ]) == '': if char.hastag( 'notoriety' ): char.deltag( 'notoriety' ) else: char.settag( 'notoriety', int( textentries[ key ] ) ) #elif char.npc: # if not textentries[ key ] == '': # char.mindamage = int( textentries[ key ] ) elif key == 44: if not char.npc: if (textentries[ key ]) == '': if char.hastag( 'poisoned' ): char.deltag( 'poisoned' ) else: char.settag( 'poisoned', int( textentries[ key ] ) ) #elif char.npc: # if not textentries[ key ] == '': # char.maxdamage = int( textentries[ key ] ) elif key == 46: if char.npc: if textentries[ key ] == '' or int(textentries[ key ]) <= 0: if char.hastag( 'dmg_fire' ): char.deltag( 'dmg_fire' ) elif int( textentries[ key ] ) <= 100: char.settag( 'dmg_fire', int( textentries[ key ] ) ) elif key == 47: if char.npc: if textentries[ key ] == '' or int(textentries[ key ]) <= 0: if char.hastag( 'dmg_cold' ): char.deltag( 'dmg_cold' ) elif int( textentries[ key ] ) <= 100: char.settag( 'dmg_cold', int( textentries[ key ] ) ) elif key == 48: if char.npc: if textentries[ key ] == '' or int(textentries[ key ]) <= 0: if char.hastag( 'dmg_poison' ): char.deltag( 'dmg_poison' ) elif int( textentries[ key ] ) <= 100: char.settag( 'dmg_poison', int( textentries[ key ] ) ) elif key == 49: if char.npc: if textentries[ key ] == '' or int(textentries[ key ]) <= 0: if char.hastag( 'dmg_energy' ): char.deltag( 'dmg_energy' ) elif int( textentries[ key ] ) <= 100: char.settag( 'dmg_energy', int( textentries[ key ] ) ) elif key == 50: if char.npc: if (textentries[ key ]) == '' or int(textentries[ key ]) == 0: if char.hastag( 'res_physical' ): char.deltag( 'res_physical' ) else: char.settag( 'res_physical', int( textentries[ key ] ) ) elif key == 51: if char.npc: if (textentries[ key ]) == '' or int(textentries[ key ]) == 0: if char.hastag( 'res_fire' ): char.deltag( 'res_fire' ) elif int( textentries[ key ] ) <= 100: char.settag( 'res_fire', int( textentries[ key ] ) ) elif key == 52: if char.npc: if (textentries[ key ]) == '' or int(textentries[ key ]) == 0: if char.hastag( 'res_cold' ): char.deltag( 'res_cold' ) elif int( textentries[ key ] ) <= 100: char.settag( 'res_cold', int( textentries[ key ] ) ) elif key == 53: if char.npc: if (textentries[ key ]) == '' or int(textentries[ key ]) == 0: if char.hastag( 'res_poison' ): char.deltag( 'res_poison' ) elif int( textentries[ key ] ) <= 100: char.settag( 'res_poison', int( textentries[ key ] ) ) elif key == 54: if char.npc: if (textentries[ key ]) == '' or int(textentries[ key ]) == 0: if char.hastag( 'res_energy' ): char.deltag( 'res_energy' ) elif int( textentries[ key ] ) <= 100: char.settag( 'res_energy', int( textentries[ key ] ) ) if choice.button == 1: charinfo( socket, char ) char.update() return 1
02db11658d92161398ef40c48df266b74fc14e36 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/02db11658d92161398ef40c48df266b74fc14e36/info.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1149, 1376, 67, 2740, 12, 7291, 16, 833, 16, 6023, 262, 30, 2987, 273, 7291, 18, 7814, 1149, 273, 833, 63, 20, 65, 309, 6023, 18, 5391, 422, 374, 578, 486, 1149, 578, 486, 2987, 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, 1149, 1376, 67, 2740, 12, 7291, 16, 833, 16, 6023, 262, 30, 2987, 273, 7291, 18, 7814, 1149, 273, 833, 63, 20, 65, 309, 6023, 18, 5391, 422, 374, 578, 486, 1149, 578, 486, 2987, 30, ...
s.appendExten("8","Goto(%s,s,1)" % self.ivr_8, self.pbx)
s.appendExten("8","Goto(%s,s,1)" % self.ivr_8, context)
def createAsteriskConfig(self): s = AstConf("extensions.conf") s.setSection(self.name) if self.pbx: pbx = self.pbx else: pbx = "phones" s.append("include=%s" % pbx) s.appendExten("s","Set(TIMEOUT(digit)=%d)" % self.digittimeout, self.pbx) if self.moh: s.appendExten("s","Setmusiconhold(%s)" % self.moh, self.pbx) s.appendExten("s","Set(DIAL_OPTIONS=m)", self.pbx) else: s.appendExten("s","Set(DIAL_OPTIONS=r)", self.pbx) if self.ivrtime: if self.times: times=self.times.split(',') for t in times: s.appendExten("s","GotoIfTime(%s?%s,s,1)" % (t,self.ivrtime), self.pbx) if self.timeout: s.appendExten("s","Set(TIMEOUT(absolute)=%s)" % self.timeout, self.pbx) for i in range(self.repeat): s.appendExten("s","Background(%s)" % self.backgroundfile, self.pbx) if self.pause: s.appendExten("s","WaitExten(%s)" % self.pause, self.pbx) s.appendExten("s","WaitExten(%d)" % self.waittime, self.pbx) s.appendExten("s","Goto(%s,%s,1)" % (pbx,self.operator), self.pbx) if self.ivr_1: s.appendExten("1","Goto(%s,s,1)" % self.ivr_1, self.pbx) if self.ivr_2: s.appendExten("2","Goto(%s,s,1)" % self.ivr_2, self.pbx) if self.ivr_3: s.appendExten("3","Goto(%s,s,1)" % self.ivr_3, self.pbx) if self.ivr_4: s.appendExten("4","Goto(%s,s,1)" % self.ivr_4, self.pbx) if self.ivr_5: s.appendExten("5","Goto(%s,s,1)" % self.ivr_5, self.pbx) if self.ivr_6: s.appendExten("6","Goto(%s,s,1)" % self.ivr_6, self.pbx) if self.ivr_7: s.appendExten("7","Goto(%s,s,1)" % self.ivr_7, self.pbx) if self.ivr_8: s.appendExten("8","Goto(%s,s,1)" % self.ivr_8, self.pbx) if self.ivr_9: s.appendExten("9","Goto(%s,s,1)" % self.ivr_9, self.pbx) if self.ivr_ast: s.appendExten("*","Goto(%s,s,1)" % self.ivr_ast, self.pbx) if self.phone_1: s.appendExten("1","Goto(%s,%s,1)" % (pbx,self.phone_1), self.pbx) if self.phone_2: s.appendExten("2","Goto(%s,%s,1)" % (pbx,self.phone_2), self.pbx) if self.phone_3: s.appendExten("3","Goto(%s,%s,1)" % (pbx,self.phone_3), self.pbx) if self.phone_4: s.appendExten("4","Goto(%s,%s,1)" % (pbx,self.phone_4), self.pbx) if self.phone_5: s.appendExten("5","Goto(%s,%s,1)" % (pbx,self.phone_5), self.pbx) if self.phone_6: s.appendExten("6","Goto(%s,%s,1)" % (pbx,self.phone_6), self.pbx) if self.phone_7: s.appendExten("7","Goto(%s,%s,1)" % (pbx,self.phone_7), self.pbx) if self.phone_8: s.appendExten("8","Goto(%s,%s,1)" % (pbx,self.phone_8), self.pbx) if self.phone_9: s.appendExten("9","Goto(%s,%s,1)" % (pbx,self.phone_9), self.pbx) if self.phone_ast: s.appendExten("*","Goto(%s,%s,1)" % (pbx,self.phone_ast), self.pbx) s.appendExten("0", "Goto(%s,%s,1)" % (pbx,self.operator), self.pbx) s.appendExten("i","Playback(invalid)", self.pbx) s.appendExten("i","Goto(%s,%s,1)" % (pbx,self.operator), self.pbx) s.appendExten("t","ResetCDR(w)", self.pbx) s.appendExten("t","NoCDR", self.pbx) s.appendExten("t","Hangup", self.pbx) s.appendExten("T","ResetCDR(w)", self.pbx) s.appendExten("T","NoCDR", self.pbx) s.appendExten("T","Hangup", self.pbx) s.appendExten("#","ResetCDR(w)", self.pbx) s.appendExten("#","NoCDR", self.pbx) s.appendExten("#","Hangup", self.pbx)
e581660927aebaacc03692e1a06a4d11542ff6a3 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2627/e581660927aebaacc03692e1a06a4d11542ff6a3/cfg_ivr_treenode.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 37, 8190, 10175, 809, 12, 2890, 4672, 272, 273, 16614, 3976, 2932, 9489, 18, 3923, 7923, 272, 18, 542, 5285, 12, 2890, 18, 529, 13, 309, 365, 18, 5733, 92, 30, 6386, 92, 273, 36...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 37, 8190, 10175, 809, 12, 2890, 4672, 272, 273, 16614, 3976, 2932, 9489, 18, 3923, 7923, 272, 18, 542, 5285, 12, 2890, 18, 529, 13, 309, 365, 18, 5733, 92, 30, 6386, 92, 273, 36...
id = idx + startId
troveId = idx + startId
def addChangeSet(self, cs, includesFileContents = False): relative = []
3cca4e91e7ca26950e59f13d68e76e091a61e521 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8747/3cca4e91e7ca26950e59f13d68e76e091a61e521/trovesource.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 21565, 12, 2890, 16, 2873, 16, 6104, 812, 6323, 273, 1083, 4672, 3632, 273, 5378, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 21565, 12, 2890, 16, 2873, 16, 6104, 812, 6323, 273, 1083, 4672, 3632, 273, 5378, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
text=(text[:m.end()] + (u" {{%s|%s}}" % (findtemplate, fromsite.lang)) + text[m.end():])
else: text=(text[:m.end()] + (u" {{%s|%s}}" % (findtemplate, fromsite.lang)) + text[m.end():])
def featuredWithInterwiki(fromsite, tosite): if not fromsite.lang in cache: cache[fromsite.lang]={} if not tosite.lang in cache[fromsite.lang]: cache[fromsite.lang][tosite.lang]={} cc=cache[fromsite.lang][tosite.lang] if nocache: cc={} findtemplate = wikipedia.translate(wikipedia.getSite(), template) re_Link_FA=re.compile(ur"\{\{%s\|%s\}\}" % (findtemplate, fromsite.lang), re.IGNORECASE) re_this_iw=re.compile(ur"\[\[%s:[^]]+\]\]" % fromsite.lang) arts=featuredArticles(fromsite) pairs=[] for a in arts: if a.title()<afterpage: continue if u"/" in a.title(): wikipedia.output(u"%s is a subpage" % a.title()) continue if a.title() in cc: wikipedia.output(u"(cached) %s -> %s"%(a.title(), cc[a.title()])) continue if a.isRedirectPage(): a=a.getRedirectTarget() try: if not a.exists(): wikipedia.output(u"source page doesn't exist: %s" % a.title()) continue atrans=findTranslated(a,tosite) if atrans: text=atrans.get() m=re_Link_FA.search(text) if m: wikipedia.output(u"(already done)") else: # insert just before interwiki if (not interactive or wikipedia.input(u'Connecting %s -> %s. Proceed? [Y/N]'%(a.title(), atrans.title())) in ['Y','y'] ): m=re_this_iw.search(text) if not m: wikipedia.output(u"no interwiki record, very strange") continue comment = wikipedia.setAction(wikipedia.translate(wikipedia.getSite(), msg) % (fromsite.lang, a.title())) # TODO: create commandline for this ### Placing {{Link FA|xx}} right next to corresponding interwiki ### text=(text[:m.end()] + (u" {{%s|%s}}" % (findtemplate, fromsite.lang)) + text[m.end():]) ### Moving {{Link FA|xx}} to top of interwikis ### # text=wikipedia.replaceCategoryLinks(text+(u"{{%s|%s}}"%(findtemplate, fromsite.lang)), atrans.categories()) try: atrans.put(text, comment) except wikipedia.LockedPage: wikipedia.output(u'Page %s is locked!' % atrans.title()) cc[a.title()]=atrans.title() except wikipedia.PageNotSaved, e: wikipedia.output(u"Page not saved")
78f0b6d3ce560a1a4f1cbc7d128e70da26c6dc46 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4404/78f0b6d3ce560a1a4f1cbc7d128e70da26c6dc46/featured.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2572, 72, 1190, 2465, 13044, 12, 2080, 4256, 16, 358, 4256, 4672, 309, 486, 628, 4256, 18, 4936, 316, 1247, 30, 1247, 63, 2080, 4256, 18, 4936, 65, 12938, 309, 486, 358, 4256, 18, 4936...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2572, 72, 1190, 2465, 13044, 12, 2080, 4256, 16, 358, 4256, 4672, 309, 486, 628, 4256, 18, 4936, 316, 1247, 30, 1247, 63, 2080, 4256, 18, 4936, 65, 12938, 309, 486, 358, 4256, 18, 4936...
edition["subject"] = subject
edition["subjects"] = subject
def find_subjects(r, edition): fields = [ ('600', 'abcd'), ('610', 'ab'), ('630', 'acdegnpqst'), ('650', 'a'), ('651', 'a'), ] subject = [] subdivision_fields = 'vxyz' for tag, name_fields in fields: subject += [" -- ".join([" ".join(specific_subtags(f, name_fields))] + specific_subtags(f, subdivision_fields)) for f in r.get_fields(tag)] if subject: edition["subject"] = subject
da804bedd5a86ca4953a76539728719f215e8cf0 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3913/da804bedd5a86ca4953a76539728719f215e8cf0/parse.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 67, 7857, 87, 12, 86, 16, 28432, 4672, 1466, 273, 306, 7707, 28133, 2187, 296, 378, 4315, 19899, 7707, 26, 2163, 2187, 296, 378, 19899, 7707, 4449, 20, 2187, 296, 1077, 323, 1600, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 7857, 87, 12, 86, 16, 28432, 4672, 1466, 273, 306, 7707, 28133, 2187, 296, 378, 4315, 19899, 7707, 26, 2163, 2187, 296, 378, 19899, 7707, 4449, 20, 2187, 296, 1077, 323, 1600, ...
old_cwd = os.getcwd()
cwd = tempfile.mkdtemp()
def test_issue_8766(self): # "import encodings" emits a warning whereas the warnings is not loaded # or not completly loaded (warnings imports indirectly encodings by # importing linecache) yet old_cwd = os.getcwd() try: cwd = tempfile.mkdtemp() try: os.chdir(cwd) os.mkdir('encodings') env = os.environ.copy() env['PYTHONPATH'] = cwd
d656354dddf36a159d71b01a77649088f6411e05 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8546/d656354dddf36a159d71b01a77649088f6411e05/test_warnings.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 13882, 67, 11035, 6028, 12, 2890, 4672, 468, 315, 5666, 24118, 6, 24169, 279, 3436, 1625, 345, 326, 5599, 353, 486, 4203, 468, 578, 486, 2302, 715, 4203, 261, 12103, 10095, 168...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 13882, 67, 11035, 6028, 12, 2890, 4672, 468, 315, 5666, 24118, 6, 24169, 279, 3436, 1625, 345, 326, 5599, 353, 486, 4203, 468, 578, 486, 2302, 715, 4203, 261, 12103, 10095, 168...
table2.attach(display_lyrics, 1, 3, 5, 6, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 30, 0) table2.attach(display_volume, 1, 3, 6, 7, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 30, 0) table2.attach(gtk.Label(), 1, 3, 7, 8, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 15, 0)
table2.attach(display_search, 1, 3, 5, 6, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 30, 0) table2.attach(display_lyrics, 1, 3, 6, 7, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 30, 0) table2.attach(display_volume, 1, 3, 7, 8, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 30, 0)
def prefs(self, widget, show_mpd_tab=False): prefswindow = gtk.Dialog(_("Preferences"), self.window, flags=gtk.DIALOG_DESTROY_WITH_PARENT) prefswindow.set_resizable(False) prefswindow.set_has_separator(False) hbox = gtk.HBox() prefsnotebook = gtk.Notebook() # MPD tab table = gtk.Table(9, 2, False) #table.set_row_spacings(7) table.set_col_spacings(3) mpdlabel = gtk.Label() mpdlabel.set_markup('<b>' + _('MPD Connection') + '</b>') mpdlabel.set_alignment(0, 1) hostentry = gtk.Entry() hostentry.set_text(str(self.host)) portentry = gtk.Entry() portentry.set_text(str(self.port)) passwordentry = gtk.Entry() passwordentry.set_visibility(False) passwordentry.set_text(str(self.password)) blanklabel = gtk.Label() blanklabel.set_markup("<small>(" + _('Leave blank if none is required') + ")</small>") blanklabel.set_alignment(0, 0) table.attach(gtk.Label(), 1, 3, 1, 2, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 10, 0) table.attach(mpdlabel, 1, 3, 2, 3, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 10, 0) table.attach(gtk.Label(), 1, 3, 3, 4, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 10, 0) table.attach(gtk.Label(_("Host") + ":"), 1, 2, 4, 5, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 10, 0) table.attach(hostentry, 2, 3, 4, 5, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 10, 0) table.attach(gtk.Label(_("Port") + ":"), 1, 2, 5, 6, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 10, 0) table.attach(portentry, 2, 3, 5, 6, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 10, 0) table.attach(gtk.Label(_("Password") + ":"), 1, 2, 6, 7, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 10, 0) table.attach(passwordentry, 2, 3, 6, 7, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 10, 0) table.attach(blanklabel, 2, 3, 7, 8, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 10, 0) table.attach(gtk.Label(), 1, 3, 8, 9, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 10, 0) # Display tab table2 = gtk.Table(7, 2, False) displaylabel = gtk.Label() displaylabel.set_markup('<b>' + _('Display') + '</b>') displaylabel.set_alignment(0, 1) display_art = gtk.CheckButton(_("Show album covers")) display_art.set_active(self.show_covers) display_art.connect('toggled', self.prefs_art_toggled) display_volume = gtk.CheckButton(_("Show volume button")) display_volume.set_active(self.show_volume) display_volume.connect('toggled', self.prefs_volume_toggled) display_lyrics = gtk.CheckButton(_("Show lyrics tab")) display_lyrics.set_active(self.show_lyrics) display_lyrics.connect('toggled', self.prefs_lyrics_toggled) table2.attach(gtk.Label(), 1, 3, 1, 2, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 15, 0) table2.attach(displaylabel, 1, 3, 2, 3, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 15, 0) table2.attach(gtk.Label(), 1, 3, 3, 4, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 15, 0) table2.attach(display_art, 1, 3, 4, 5, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 30, 0) table2.attach(display_lyrics, 1, 3, 5, 6, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 30, 0) table2.attach(display_volume, 1, 3, 6, 7, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 30, 0) table2.attach(gtk.Label(), 1, 3, 7, 8, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 15, 0) table2.attach(gtk.Label(), 1, 3, 8, 9, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 15, 0) # Behavior tab table3 = gtk.Table(7, 2, False) behaviorlabel = gtk.Label() behaviorlabel.set_markup('<b>' + _('Behavior') + '</b>') behaviorlabel.set_alignment(0, 1) win_sticky = gtk.CheckButton(_("Show window on all workspaces")) win_sticky.set_active(self.sticky) win_ontop = gtk.CheckButton(_("Keep window above other windows")) win_ontop.set_active(self.ontop) exit_stop = gtk.CheckButton(_("Stop playback on exit")) exit_stop.set_active(self.stop_on_exit) self.tooltips.set_tip(exit_stop, _("MPD allows playback even when the client is not open. If enabled, Sonata will behave like a more conventional music player and, instead, stop playback upon exit.")) minimize = gtk.CheckButton(_("Minimize to system tray on close")) minimize.set_active(self.minimize_to_systray) self.tooltips.set_tip(minimize, _("If enabled, closing Sonata will minimize it to the system tray. Note that it's currently impossible to detect if there actually is a system tray, so only check this if you have one.")) if HAVE_EGG and self.trayicon.get_property('visible') == True: minimize.set_sensitive(True) else: minimize.set_sensitive(False) table3.attach(gtk.Label(), 1, 3, 1, 2, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 15, 0) table3.attach(behaviorlabel, 1, 3, 2, 3, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 15, 0) table3.attach(gtk.Label(), 1, 3, 3, 4, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 15, 0) table3.attach(win_sticky, 1, 3, 4, 5, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 30, 0) table3.attach(win_ontop, 1, 3, 5, 6, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 30, 0) table3.attach(minimize, 1, 3, 6, 7, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 30, 0) table3.attach(exit_stop, 1, 3, 7, 8, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 30, 0) table3.attach(gtk.Label(), 1, 3, 8, 9, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 15, 0) prefsnotebook.append_page(table2, gtk.Label(str=_("Display"))) prefsnotebook.append_page(table3, gtk.Label(str=_("Behavior"))) prefsnotebook.append_page(table, gtk.Label(str=_("MPD"))) hbox.pack_start(prefsnotebook, False, False, 10) prefswindow.vbox.pack_start(hbox, False, False, 10) close_button = prefswindow.add_button(gtk.STOCK_CLOSE, gtk.RESPONSE_CLOSE) prefswindow.show_all() while gtk.events_pending(): gtk.main_iteration() if show_mpd_tab: prefsnotebook.set_current_page(2) # MPD page close_button.grab_focus() response = prefswindow.run() if response == gtk.RESPONSE_CLOSE: if hostentry.get_text() != self.host or portentry.get_text() != self.port or passwordentry.get_text() != self.password: self.host = hostentry.get_text() try: self.port = int(portentry.get_text()) except: pass self.password = passwordentry.get_text() self.stop_on_exit = exit_stop.get_active() self.ontop = win_ontop.get_active() self.sticky = win_sticky.get_active() self.minimize_to_systray = minimize.get_active() if self.ontop: self.window.set_keep_above(True) else: self.window.set_keep_above(False) if self.sticky: self.window.stick() else: self.window.unstick() self.change_cursor(gtk.gdk.Cursor(gtk.gdk.WATCH)) while gtk.events_pending(): gtk.main_iteration() self.conn = self.connect() if self.conn: self.iterate_time = self.iterate_time_when_connected self.conn.do.password(self.password) self.iterate_now() else: self.iterate_time = self.iterate_time_when_disconnected self.browserdata.clear() self.change_cursor(None) prefswindow.destroy()
9a1189ef0a6c014f0c3d64fa26fdc291b0f3a6e6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2312/9a1189ef0a6c014f0c3d64fa26fdc291b0f3a6e6/sonata.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15503, 12, 2890, 16, 3604, 16, 2405, 67, 1291, 72, 67, 7032, 33, 8381, 4672, 15503, 5668, 273, 22718, 18, 6353, 24899, 2932, 12377, 6, 3631, 365, 18, 5668, 16, 2943, 33, 4521, 79, 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, 15503, 12, 2890, 16, 3604, 16, 2405, 67, 1291, 72, 67, 7032, 33, 8381, 4672, 15503, 5668, 273, 22718, 18, 6353, 24899, 2932, 12377, 6, 3631, 365, 18, 5668, 16, 2943, 33, 4521, 79, 18, ...
msg_area.set_text_and_icon(gtk.STOCK_DIALOG_ERROR, multi_error, "")
msg_area.set_text_and_icon(gtk.STOCK_DIALOG_ERROR, multi_error, info)
def ReloadErrorMessages(self): num_errors = len(self.gstreamerErrorMessages) if self.errorMessageArea: self.vbox.remove(self.errorMessageArea) if self.moreErrorsMessageArea: self.vbox.remove(self.moreErrorsMessageArea) if num_errors == 0: return if not self.errorMessageArea: error, details = self.gstreamerErrorMessages[0] self.errorMessageArea = self.CreateDefaultErrorPane(error, details) if num_errors == 2 and not self.moreErrorsMessageArea: error, details = self.gstreamerErrorMessages[1] self.moreErrorsMessageArea = self.CreateDefaultErrorPane(error, details) elif num_errors > 2 and not self.moreErrorsMessageArea: multi_error = _("There are %(number)d more errors not shown.") multi_error %= {"number" : num_errors - 1 } msg_area = MessageArea.MessageArea() msg_area.add_stock_button_with_text(_("_Close All"), gtk.STOCK_CLOSE, gtk.RESPONSE_CLOSE) msg_area.add_button(_("_Show All"), gtk.RESPONSE_YES) msg_area.set_text_and_icon(gtk.STOCK_DIALOG_ERROR, multi_error, "") msg_area.connect("response", self.OnMessageAreaReponse, msg_area) msg_area.connect("close", self.OnMessageAreaClose, msg_area) self.moreErrorsMessageArea = msg_area # now repack them in the correct order if self.moreErrorsMessageArea: self.vbox.pack_end(self.moreErrorsMessageArea, False, False) self.moreErrorsMessageArea.show() self.vbox.pack_end(self.errorMessageArea, False, False) self.errorMessageArea.show()
15bb5e98f089f084b41cf0d41adcadb6ada21678 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10033/15bb5e98f089f084b41cf0d41adcadb6ada21678/RecordingView.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 23086, 668, 5058, 12, 2890, 4672, 818, 67, 4324, 273, 562, 12, 2890, 18, 75, 3256, 264, 668, 5058, 13, 225, 309, 365, 18, 1636, 1079, 5484, 30, 365, 18, 90, 2147, 18, 4479, 12, 2890,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 23086, 668, 5058, 12, 2890, 4672, 818, 67, 4324, 273, 562, 12, 2890, 18, 75, 3256, 264, 668, 5058, 13, 225, 309, 365, 18, 1636, 1079, 5484, 30, 365, 18, 90, 2147, 18, 4479, 12, 2890,...
person.invoices.append(invoice)
r.person.invoices.append(invoice)
def _build_invoice(self): person = c.registration.person r = c.registration
4564a7b8c923eccde8041311a7f7d56b61a99834 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12856/4564a7b8c923eccde8041311a7f7d56b61a99834/registration.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3510, 67, 16119, 12, 2890, 4672, 6175, 273, 276, 18, 14170, 18, 12479, 436, 273, 276, 18, 14170, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3510, 67, 16119, 12, 2890, 4672, 6175, 273, 276, 18, 14170, 18, 12479, 436, 273, 276, 18, 14170, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
print register, frame
def MakeLocal(start, end, location, name): """ Create a local variable @param start: start of address range for the local variable @param end: end of address range for the local variable @param location: the variable location in the "[bp+xx]" form where xx is a number. The location can also be specified as a register name. @param name: name of the local variable @return: 1-ok, 0-failure @note: For the stack variables the end address is ignored. If there is no function at 'start' then this function. will fail. """ func = idaapi.get_func(start) if not func: return 0 # Find out if location is in the [bp+xx] form r = re.compile("\[([a-z]+)([-+][0-9a-fx]+)", re.IGNORECASE) m = r.match(location) if m: # Location in the form of [bp+xx] register = idaapi.str2reg(m.group(1)) offset = int(m.group(2), 0) frame = idaapi.get_frame(func) print register, frame if register == -1 or not frame: return 0 offset += func.frsize member = idaapi.get_member(frame, offset) if member: # Member already exists, rename it if idaapi.set_member_name(frame, offset, name): return 1 else: return 0 else: # No member at the offset, create a new one if idaapi.add_struc_member(frame, name, offset, idaapi.byteflag(), None, 1) == 0: return 1 else: return 0 else: # Location as simple register name return idaapi.add_regvar(func, start, end, location, name, None)
4f22943d42ee1d5013421d280b3bd776bee83fb9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3410/4f22943d42ee1d5013421d280b3bd776bee83fb9/idc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4344, 2042, 12, 1937, 16, 679, 16, 2117, 16, 508, 4672, 3536, 1788, 279, 1191, 2190, 225, 632, 891, 787, 30, 787, 434, 1758, 1048, 364, 326, 1191, 2190, 632, 891, 679, 30, 679, 434, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4344, 2042, 12, 1937, 16, 679, 16, 2117, 16, 508, 4672, 3536, 1788, 279, 1191, 2190, 225, 632, 891, 787, 30, 787, 434, 1758, 1048, 364, 326, 1191, 2190, 632, 891, 679, 30, 679, 434, ...
cls = None if self._uid.is_method(): cls = func.im_class func = func.im_func
if self._uid.is_function(): self._init_signature(func) self._init_params() elif self._uid.is_method(): self._init_signature(func.im_func) self._init_params() self._find_override(func.im_class) elif self._uid.is_builtin_function() or self._uid.is_builtin_method(): self._init_builtin_signature(func) self._init_params() else: raise TypeError("Can't document %s" % func) def _init_builtin_signature(self, func): self._params = [] self._kwarg_param = None self._vararg_param = None self._return = Var('return') signature_re = (r'^\s*((?P<class>\w+)\.)?' + r'(?P<func>%s)' % func.__name__ + r'\((?P<params>(\w+(,\s*\w+)*)?)\)' + r'(\s*->\s*(?P<return>\S.*))?'+ r'\s*(\n|\s+--\s+|$)') m = re.match(signature_re, func.__doc__) if m: if m.group('params'): for name in m.group('params').split(','): name = name.strip() if name == '...': self._vararg_param = Var('...') elif name.startswith('**'): self._kwarg_param = Var(name[1:]) elif name.startswith('*'): self._vararg_param = Var(name[1:]) else: self._params.append(Var(name.strip())) if m.group('return'): rtype = m.group('return') self._return.set_type(epytext.parse(rtype)) text = self._descr.childNodes[0].childNodes[0] text.data = re.sub(signature_re, '', text.data, 1) else: self._vararg_param = Var('...') def _init_signature(self, func):
def __init__(self, func): # Initilize the module from its docstring. self._tmp_param = {} self._tmp_type = {} self._raises = [] ObjDoc.__init__(self, func)
788f0e25df4ecb97c21bbf49a8b83a43099bb789 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11420/788f0e25df4ecb97c21bbf49a8b83a43099bb789/objdoc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1326, 4672, 468, 4378, 330, 554, 326, 1605, 628, 2097, 14525, 18, 365, 6315, 5645, 67, 891, 273, 2618, 365, 6315, 5645, 67, 723, 273, 2618, 365, 6315, 35...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1326, 4672, 468, 4378, 330, 554, 326, 1605, 628, 2097, 14525, 18, 365, 6315, 5645, 67, 891, 273, 2618, 365, 6315, 5645, 67, 723, 273, 2618, 365, 6315, 35...
for child_path, entry in \
for child_relpath, entry in \
def record_delete(self, path, ie): self._add_entry((path, None, ie.file_id, None)) if ie.kind == 'directory': for child_path, entry in \ self.basis_inventory.iter_entries_by_dir(from_dir=ie): self._add_entry((child_path, None, entry.file_id, None))
489efe9c49a5c8943e25857ab2d84d2c6438da94 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8703/489efe9c49a5c8943e25857ab2d84d2c6438da94/bzr_commit_handler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1409, 67, 3733, 12, 2890, 16, 589, 16, 9228, 4672, 365, 6315, 1289, 67, 4099, 12443, 803, 16, 599, 16, 9228, 18, 768, 67, 350, 16, 599, 3719, 309, 9228, 18, 9224, 422, 296, 5149, 427...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1409, 67, 3733, 12, 2890, 16, 589, 16, 9228, 4672, 365, 6315, 1289, 67, 4099, 12443, 803, 16, 599, 16, 9228, 18, 768, 67, 350, 16, 599, 3719, 309, 9228, 18, 9224, 422, 296, 5149, 427...
if( self._state == 'references' ):
if self._state == 'references':
def start_li( self, attrs ): if( self._state == 'references' ): self._reference_state = 'pubmed_id' self._flush_text() if( self._current_reference != '' ): self._references.append( self._current_reference ) self._current_reference = Reference()
057a42016586e300ec42f7a5a6468a5d7f6c179c /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7167/057a42016586e300ec42f7a5a6468a5d7f6c179c/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 787, 67, 549, 12, 365, 16, 3422, 262, 30, 309, 365, 6315, 2019, 422, 296, 14353, 4278, 365, 6315, 6180, 67, 2019, 273, 296, 10174, 2937, 67, 350, 11, 365, 6315, 11330, 67, 955, 1435, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 787, 67, 549, 12, 365, 16, 3422, 262, 30, 309, 365, 6315, 2019, 422, 296, 14353, 4278, 365, 6315, 6180, 67, 2019, 273, 296, 10174, 2937, 67, 350, 11, 365, 6315, 11330, 67, 955, 1435, ...
parser = optparse.OptionParser(usage="usage: %prog [options] [year] [month]") parser.add_option("-w", "--width", dest="width", type="int", default=2, help="width of date column (default 2, text only)") parser.add_option("-l", "--lines", dest="lines", type="int", default=1, help="number of lines for each week (default 1, text only)") parser.add_option("-s", "--spacing", dest="spacing", type="int", default=6, help="spacing between months (default 6, text only)") parser.add_option("-m", "--months", dest="months", type="int", default=3, help="months per row (default 3, text only)") parser.add_option("-c", "--css", dest="css", default="calendar.css", help="CSS to use for page (html only)") parser.add_option("-e", "--encoding", dest="encoding", default=None, help="Encoding to use for CSS output (html only)") parser.add_option("-t", "--type", dest="type", default="text", choices=("text", "html"), help="output type (text or html)")
parser = optparse.OptionParser(usage="usage: %prog [options] [year [month]]") parser.add_option( "-w", "--width", dest="width", type="int", default=2, help="width of date column (default 2, text only)" ) parser.add_option( "-l", "--lines", dest="lines", type="int", default=1, help="number of lines for each week (default 1, text only)" ) parser.add_option( "-s", "--spacing", dest="spacing", type="int", default=6, help="spacing between months (default 6, text only)" ) parser.add_option( "-m", "--months", dest="months", type="int", default=3, help="months per row (default 3, text only)" ) parser.add_option( "-c", "--css", dest="css", default="calendar.css", help="CSS to use for page (html only)" ) parser.add_option( "-L", "--locale", dest="locale", default=None, help="locale to be used from month and weekday names" ) parser.add_option( "-e", "--encoding", dest="encoding", default=None, help="Encoding to use for output" ) parser.add_option( "-t", "--type", dest="type", default="text", choices=("text", "html"), help="output type (text or html)" )
def main(args): import optparse parser = optparse.OptionParser(usage="usage: %prog [options] [year] [month]") parser.add_option("-w", "--width", dest="width", type="int", default=2, help="width of date column (default 2, text only)") parser.add_option("-l", "--lines", dest="lines", type="int", default=1, help="number of lines for each week (default 1, text only)") parser.add_option("-s", "--spacing", dest="spacing", type="int", default=6, help="spacing between months (default 6, text only)") parser.add_option("-m", "--months", dest="months", type="int", default=3, help="months per row (default 3, text only)") parser.add_option("-c", "--css", dest="css", default="calendar.css", help="CSS to use for page (html only)") parser.add_option("-e", "--encoding", dest="encoding", default=None, help="Encoding to use for CSS output (html only)") parser.add_option("-t", "--type", dest="type", default="text", choices=("text", "html"), help="output type (text or html)") (options, args) = parser.parse_args(args) if options.type == "html": cal = HTMLCalendar() encoding = options.encoding if encoding is None: encoding = sys.getdefaultencoding() optdict = dict(encoding=encoding, css=options.css) if len(args) == 1: print cal.formatyearpage(datetime.date.today().year, **optdict) elif len(args) == 2: print cal.formatyearpage(int(args[1]), **optdict) else: parser.error("incorrect number of arguments") sys.exit(1) else: cal = TextCalendar() optdict = dict(w=options.width, l=options.lines) if len(args) != 3: optdict["c"] = options.spacing optdict["m"] = options.months if len(args) == 1: print cal.formatyear(datetime.date.today().year, **optdict) elif len(args) == 2: print cal.formatyear(int(args[1]), **optdict) elif len(args) == 3: print cal.formatmonth(int(args[1]), int(args[2]), **optdict) else: parser.error("incorrect number of arguments") sys.exit(1)
243815ee949d8494ecadb24f0872307909b05fc8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/243815ee949d8494ecadb24f0872307909b05fc8/calendar.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 1968, 4672, 1930, 2153, 2670, 2082, 273, 2153, 2670, 18, 1895, 2678, 12, 9167, 1546, 9167, 30, 738, 14654, 306, 2116, 65, 306, 6874, 306, 7496, 65, 4279, 13, 2082, 18, 1289, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 1968, 4672, 1930, 2153, 2670, 2082, 273, 2153, 2670, 18, 1895, 2678, 12, 9167, 1546, 9167, 30, 738, 14654, 306, 2116, 65, 306, 6874, 306, 7496, 65, 4279, 13, 2082, 18, 1289, ...
raise DateTime.SyntaxError, escape(e)
raise DateTime.SyntaxError, "Invalid DateTime "+escape(`v`)
def field2date(v): v = field2string(v) try: v = DateTime(v) except DateTime.SyntaxError, e: raise DateTime.SyntaxError, escape(e) return v
fca9a010fcede1e9ef026951f09eadb0dcac800c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/fca9a010fcede1e9ef026951f09eadb0dcac800c/Converters.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 652, 22, 712, 12, 90, 4672, 331, 273, 652, 22, 1080, 12, 90, 13, 775, 30, 331, 273, 3716, 12, 90, 13, 1335, 3716, 18, 22510, 16, 425, 30, 1002, 3716, 18, 22510, 16, 315, 1941, 3716...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 652, 22, 712, 12, 90, 4672, 331, 273, 652, 22, 1080, 12, 90, 13, 775, 30, 331, 273, 3716, 12, 90, 13, 1335, 3716, 18, 22510, 16, 425, 30, 1002, 3716, 18, 22510, 16, 315, 1941, 3716...
Utils.AddToolButtonBmpIS(self, self.toolbar,
self.sourceTraceId = Utils.AddToolButtonBmpIS(self, self.toolbar,
def __init__(self, model, stack = None): bdb.Bdb.__init__(self) wxFrame.__init__(self, model.editor, -1, 'Debugger - %s - %s' \ % (path.basename(model.filename), model.filename), wxPoint(0, Preferences.paletteHeight), wxSize(Preferences.inspWidth, Preferences.bottomHeight))
8055148f9a8fcabcece9112831730017237be8e6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/8055148f9a8fcabcece9112831730017237be8e6/Debugger.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 938, 16, 2110, 273, 599, 4672, 324, 1966, 18, 38, 1966, 16186, 2738, 972, 12, 2890, 13, 7075, 3219, 16186, 2738, 972, 12, 2890, 16, 938, 18, 9177, 16, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 938, 16, 2110, 273, 599, 4672, 324, 1966, 18, 38, 1966, 16186, 2738, 972, 12, 2890, 13, 7075, 3219, 16186, 2738, 972, 12, 2890, 16, 938, 18, 9177, 16, ...
print "%s contains no analysis data." % self.get_name()
log.warn("%s contains no analysis data." % self.get_name())
def parse(self): print "Parsing: %s" % self.original_file.name.val provider = self.original_file_provider data = provider.get_original_file_data(self.original_file) try: et = ElementTree(file=data) finally: data.close() root = et.getroot() areas = root.findall(self.AREA_XPATH) print "Area count: %d" % len(areas) for i, area in enumerate(areas): result_parameters = area.findall(self.PARAMETER_XPATH) print "Area %d result children: %d" % (i, len(result_parameters)) if len(result_parameters) == 0: print "%s contains no analysis data." % self.get_name() return headers = list() for result_parameter in result_parameters: headers.append(result_parameter.text) columns = self.get_empty_columns(headers) wells = area.findall(self.WELL_XPATH) for well in wells: # Rows and columns are 1-indexed, OMERO wells are 0-indexed row = int(well.get('row')) - 1 column = int(well.get('col')) - 1 try: v = columns['Well'].values wellobj, images = self.get_well_images(row, column) if not wellobj: continue v.append(wellobj.id.val) except: log.exception("ERROR: Failed to get well images") continue results = well.findall(self.RESULT_XPATH) for result in results: name = result.get('name') columns[name].values.append(float(result.text)) return MeasurementParsingResult([columns.values()])
2abc05f6ec4c7dd58ee9bb618f839a4be9554279 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12409/2abc05f6ec4c7dd58ee9bb618f839a4be9554279/populate_roi.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 12, 2890, 4672, 1172, 315, 13963, 30, 738, 87, 6, 738, 365, 18, 8830, 67, 768, 18, 529, 18, 1125, 2893, 273, 365, 18, 8830, 67, 768, 67, 6778, 501, 273, 2893, 18, 588, 67, 88...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 12, 2890, 4672, 1172, 315, 13963, 30, 738, 87, 6, 738, 365, 18, 8830, 67, 768, 18, 529, 18, 1125, 2893, 273, 365, 18, 8830, 67, 768, 67, 6778, 501, 273, 2893, 18, 588, 67, 88...
command = '' cat_class = '' if idxsi and idxsi[-1] in ('method', 'protocol', 'attribute'): command = 'defmethod' cat_class = string.join(idxsi[:-1]) elif len(idxsi) == 2 and idxsi[1] == 'function': command = 'deffn' cat_class = string.join(idxsi) elif len(idxsi) == 3 and idxsi[:2] == ['in', 'module']: command = 'deffn' cat_class = 'function of ' + string.join(idxsi[1:]) elif len(idxsi) > 3 and idxsi[:2] == ['in', 'modules']: command = 'deffn' cat_class = 'function of ' + string.join(idxsi[1:]) if not command: raise error, 'don\'t know what to do with indexsubitem ' + `idxsi`
command = 'deffn' if hist.this_module: cat_class = 'function of ' + hist.this_module else: cat_class = 'built-in function'
def do_funcdesc(length, buf, pp, i, index=1): startpoint = i-1 ch = pp[startpoint] wh = ch.where length, newi = getnextarg(length, buf, pp, i) funcname = chunk(GROUP, wh, pp[i:newi]) del pp[i:newi] length = length - (newi-i) save = hist.inargs hist.inargs = 1 length, newi = getnextarg(length, buf, pp, i) hist.inargs = save del save the_args = [chunk(PLAIN, wh, '()'[0])] + pp[i:newi] + \ [chunk(PLAIN, wh, '()'[1])] del pp[i:newi] length = length - (newi-i) idxsi = hist.indexsubitem # words command = '' cat_class = '' if idxsi and idxsi[-1] in ('method', 'protocol', 'attribute'): command = 'defmethod' cat_class = string.join(idxsi[:-1]) elif len(idxsi) == 2 and idxsi[1] == 'function': command = 'deffn' cat_class = string.join(idxsi) elif len(idxsi) == 3 and idxsi[:2] == ['in', 'module']: command = 'deffn' cat_class = 'function of ' + string.join(idxsi[1:]) elif len(idxsi) > 3 and idxsi[:2] == ['in', 'modules']: command = 'deffn' cat_class = 'function of ' + string.join(idxsi[1:]) if not command: raise error, 'don\'t know what to do with indexsubitem ' + `idxsi` ch.chtype = chunk_type[CSLINE] ch.data = command cslinearg = [chunk(GROUP, wh, [chunk(PLAIN, wh, cat_class)])] cslinearg.append(chunk(PLAIN, wh, ' ')) cslinearg.append(funcname) cslinearg.append(chunk(PLAIN, wh, ' ')) l = len(cslinearg) cslinearg[l:l] = the_args pp.insert(i, chunk(GROUP, wh, cslinearg)) i, length = i+1, length+1 hist.command = command return length, i
8155ca150930842112da9c64dcc64f9241c80817 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/8155ca150930842112da9c64dcc64f9241c80817/partparse.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 644, 5569, 12, 2469, 16, 1681, 16, 8228, 16, 277, 16, 770, 33, 21, 4672, 787, 1153, 273, 277, 17, 21, 462, 273, 8228, 63, 1937, 1153, 65, 600, 273, 462, 18, 6051, 769, 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, 741, 67, 644, 5569, 12, 2469, 16, 1681, 16, 8228, 16, 277, 16, 770, 33, 21, 4672, 787, 1153, 273, 277, 17, 21, 462, 273, 8228, 63, 1937, 1153, 65, 600, 273, 462, 18, 6051, 769, 16,...
value.append(value) fields.append(""""%s"=%s""" % (prop.name, value))
values.append(value) field = '"%s"=' % prop.name field += '%s' fields.append(field)
def _build_update_qs(self, obj, calculated): fields = [] values = [] for prop in obj.properties(hidden=False): if prop not in calculated: value = prop.get_value_for_datastore(obj) if value != prop.default_value() or prop.required: value = self.encode_value(prop, value) value.append(value) fields.append(""""%s"=%s""" % (prop.name, value)) qs = 'UPDATE "%s" SET ' % self.db_table qs += ','.join(fields) qs += """ WHERE "id" = '%s'""" % obj.id if calculated: qs += ' RETURNING ' calc_values = ['"%s"' % p.name for p in calculated] qs += ','.join(calc_values) qs += ';' return qs, values
8ca31ce1a02d795c33b75cd3001317bce1692924 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1098/8ca31ce1a02d795c33b75cd3001317bce1692924/pgmanager.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3510, 67, 2725, 67, 12926, 12, 2890, 16, 1081, 16, 8894, 4672, 1466, 273, 5378, 924, 273, 5378, 364, 2270, 316, 1081, 18, 4738, 12, 6345, 33, 8381, 4672, 309, 2270, 486, 316, 8894...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3510, 67, 2725, 67, 12926, 12, 2890, 16, 1081, 16, 8894, 4672, 1466, 273, 5378, 924, 273, 5378, 364, 2270, 316, 1081, 18, 4738, 12, 6345, 33, 8381, 4672, 309, 2270, 486, 316, 8894...
time.sleep(self._waituntil - datetime.now())
diff = self._waituntil - datetime.now() time.sleep(diff.seconds)
def getCookie(self, remember=True, captchaId=None, captchaAnswer=None): """Login to the site.
1b65e85ece07916d4588089d8d9218700279adf1 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9005/1b65e85ece07916d4588089d8d9218700279adf1/api.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24643, 12, 2890, 16, 11586, 33, 5510, 16, 21083, 548, 33, 7036, 16, 21083, 13203, 33, 7036, 4672, 3536, 5358, 358, 326, 2834, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 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, 24643, 12, 2890, 16, 11586, 33, 5510, 16, 21083, 548, 33, 7036, 16, 21083, 13203, 33, 7036, 4672, 3536, 5358, 358, 326, 2834, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
'description': u'Generic timed reminders',
'description': u'Programs reminders in the future for you or other people.',
def coffee_accept(self, event): if (event.source, event.channel) not in self.pots: event.addresponse(u"There isn't a pot on")
56809cecbad85fd40e67605034372cb381aeb902 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12048/56809cecbad85fd40e67605034372cb381aeb902/fun.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 276, 3674, 1340, 67, 9436, 12, 2890, 16, 871, 4672, 309, 261, 2575, 18, 3168, 16, 871, 18, 4327, 13, 486, 316, 365, 18, 84, 6968, 30, 871, 18, 1289, 2740, 12, 89, 6, 9828, 5177, 14...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 276, 3674, 1340, 67, 9436, 12, 2890, 16, 871, 4672, 309, 261, 2575, 18, 3168, 16, 871, 18, 4327, 13, 486, 316, 365, 18, 84, 6968, 30, 871, 18, 1289, 2740, 12, 89, 6, 9828, 5177, 14...
self.persistent_balloon = MultiSmartDictBalloonMessage(self, title=_("UFO informations balloon")) self.fit_balloon(self.persistent_balloon)
self.persistent_balloon = MultiSmartDictBalloonMessage(title=_("UFO informations balloon"), rearrange_callback=self.rearrange_balloons) self.balloons = [ self.persistent_balloon ]
def __init__(self): QtGui.QSystemTrayIcon.__init__(self)
6da3a49668769c8248fc6884f3a4fb927515ce5a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1208/6da3a49668769c8248fc6884f3a4fb927515ce5a/gui_pyqt.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 23425, 18, 53, 3163, 56, 435, 5554, 16186, 2738, 972, 12, 2890, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 23425, 18, 53, 3163, 56, 435, 5554, 16186, 2738, 972, 12, 2890, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
repository.runGeneratorForAll(job)
tempdir = tempfile.gettempdir() macro = { "QOOXDOO_PATH" : "../../qooxdoo/trunk", "CACHE" : tempdir + "/cache/trunk" } repository.runGeneratorForAll(job, macro)
def main(): (options,args) = getComputedConf() config = None if options.configfile: config = getDataFromJsonFile(options.configfile) repository = Repository(options.workdir, config) if options.demobrowser: if not os.path.isabs(options.demobrowser): options.demobrowser = os.path.abspath(options.demobrowser) if options.joblist: jobs = options.joblist.split(",") for job in jobs: # build all demos if job[:6] == "demos-": if options.demobrowser: repository.buildAllDemos(job[6:], options.demobrowser, options.copydemos) else: repository.buildAllDemos(job[6:]) # store repository data JSON file in the demobrowser's script directory elif job == "store-data": outPath = os.path.join(options.demobrowser, "script") repository.storeData(outPath) # run a lint check on all libraries elif job == "lint-check": repository.lintCheckAll() # any other job: run it on all library versions else: repository.runGeneratorForAll(job)
074d6ff63573eb00617de5f63c6708be5563b7c6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5718/074d6ff63573eb00617de5f63c6708be5563b7c6/repository.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 261, 2116, 16, 1968, 13, 273, 29567, 3976, 1435, 225, 642, 273, 599, 309, 702, 18, 1425, 768, 30, 642, 273, 4303, 1265, 3185, 812, 12, 2116, 18, 1425, 768, 13, 225, 3352, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 261, 2116, 16, 1968, 13, 273, 29567, 3976, 1435, 225, 642, 273, 599, 309, 702, 18, 1425, 768, 30, 642, 273, 4303, 1265, 3185, 812, 12, 2116, 18, 1425, 768, 13, 225, 3352, ...
icon = t.getProperty('icon_expr')
icon = t.getIconExprObject()
def addable_types(self, include=None): """Return menu item entries in a TAL-friendly form.
dbd16b4ff19d9991d2a49a9d6828e52f88e4a391 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12237/dbd16b4ff19d9991d2a49a9d6828e52f88e4a391/folderfactories.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 429, 67, 2352, 12, 2890, 16, 2341, 33, 7036, 4672, 3536, 990, 3824, 761, 3222, 316, 279, 399, 1013, 17, 29111, 646, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 429, 67, 2352, 12, 2890, 16, 2341, 33, 7036, 4672, 3536, 990, 3824, 761, 3222, 316, 279, 399, 1013, 17, 29111, 646, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
"non-zero flags not allowed in calls to recv_into() on %s" % self.__class__)
"non-zero flags not allowed in calls to recv_into() on %s" % self.__class__)
def recv (self, buflen=1024, flags=0): self._checkClosed() if self._sslobj: if flags != 0: raise ValueError( "non-zero flags not allowed in calls to recv_into() on %s" % self.__class__) while True: try: return self.read(buflen) except SSLError as x: if x.args[0] == SSL_ERROR_WANT_READ: continue else: raise x else: return socket.recv(self, buflen, flags)
80e3b731afdd5339bee603af01a80f172af03c74 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3187/80e3b731afdd5339bee603af01a80f172af03c74/ssl.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10665, 261, 2890, 16, 1681, 1897, 33, 2163, 3247, 16, 2943, 33, 20, 4672, 365, 6315, 1893, 7395, 1435, 309, 365, 6315, 1049, 383, 441, 30, 309, 2943, 480, 374, 30, 1002, 2068, 12, 315,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10665, 261, 2890, 16, 1681, 1897, 33, 2163, 3247, 16, 2943, 33, 20, 4672, 365, 6315, 1893, 7395, 1435, 309, 365, 6315, 1049, 383, 441, 30, 309, 2943, 480, 374, 30, 1002, 2068, 12, 315,...
if self.immortal() and self.tree.picked:
if self.immortal() and self.topnode.picked:
def cut(self): eh = begin_event_handler("Cut") # bruce ca. 050307; stub for future undo work; experimental try: self.w.history.message(greenmsg("Cut:")) if self.selatoms: #bruce 050201-bug370 (2nd commit here, similar issue to bug 370): # changed condition to not use selwhat, since jigs can be selected even in Select Atoms mode self.w.history.message(redmsg("Cutting selected atoms is not yet supported.")) #bruce 050201 ## return #bruce 050201-bug370: don't return yet, in case some jigs were selected too. # note: we will check selatoms again, below, to know whether we emitted this message new = Group(gensym("Copy"), self.assy, None) # bruce 050201 comment: this group is usually, but not always, used only for its members list if self.immortal() and self.tree.picked: ###@@@ design note: this is an issue for the partgroup but not for clips... what's the story? ### Answer: some parts can be deleted by being entirely cut (top node too) or killed, others can't. ### This is not a properly of the node, so much as of the Part, I think.... not clear since 1-1 corr. ### but i'll go with that guess. immortal parts are the ones that can't be killed in the UI. #bruce 050201 to fix catchall bug 360's "Additional Comments From ninad@nanorex.com 2005-02-02 00:36": # don't let assy.tree itself be cut; if that's requested, just cut all its members instead. # (No such restriction will be required for assy.copy, even when it copies entire groups.) self.tree.unpick_top() ## self.w.history.message(redmsg("Can't cut the entire Part -- cutting its members instead.")) #bruce 050201 ###@@@ following should use description_for_history, but so far there's only one such Part so it doesn't matter yet self.w.history.message("Can't cut the entire Part; copying its toplevel Group, cutting its members.") #bruce 050201 # new code to handle this case [bruce 050201] self.tree.apply2picked(lambda(x): x.moveto(new)) use = new use.name = self.tree.name # not copying any other properties of the Group (if it has any) new = Group(gensym("Copy"), self.assy, None) new.addmember(use) else: self.tree.apply2picked(lambda(x): x.moveto(new)) # bruce 050131 inference from recalled bug report: # this must fail in some way that addmember handles, or tolerate jigs/groups but shouldn't; # one difference is that for chunks it would leave them in assy.molecules whereas copy would not; # guess: that last effect (and the .pick we used to do) might be the most likely cause of some bugs -- # like bug 278! Because findpick (etc) uses assy.molecules. So I fixed this with sanitize_for_clipboard, below.
0abde4f5ce347d2e9de87cb0501caffd0127e8c2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/0abde4f5ce347d2e9de87cb0501caffd0127e8c2/part.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6391, 12, 2890, 4672, 20124, 273, 2376, 67, 2575, 67, 4176, 2932, 15812, 7923, 468, 5186, 3965, 3474, 18, 374, 3361, 5082, 27, 31, 7168, 364, 3563, 15436, 1440, 31, 23070, 775, 30, 365, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6391, 12, 2890, 4672, 20124, 273, 2376, 67, 2575, 67, 4176, 2932, 15812, 7923, 468, 5186, 3965, 3474, 18, 374, 3361, 5082, 27, 31, 7168, 364, 3563, 15436, 1440, 31, 23070, 775, 30, 365, ...
1/0
1./0
def f(p): 1/0
6294fee72793ac61c16b5ff2e9c17a78b67f4478 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12029/6294fee72793ac61c16b5ff2e9c17a78b67f4478/test_profilehooks.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 284, 12, 84, 4672, 404, 19, 20, 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, 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, 284, 12, 84, 4672, 404, 19, 20, 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, -...
def loadfile(filepath, pos, ea, size): return LoadFile(filepath, pos, ea, size) def savefile(filepath, pos, ea, size): return SaveFile(filepath, pos, ea, size)
def loadfile(filepath, pos, ea, size): return LoadFile(filepath, pos, ea, size)
76aa24fecdace41c9fc827e500b95cfdf5053272 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4773/76aa24fecdace41c9fc827e500b95cfdf5053272/idc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1262, 768, 12, 10561, 16, 949, 16, 24164, 16, 963, 4672, 327, 4444, 812, 12, 10561, 16, 949, 16, 24164, 16, 963, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 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, 1262, 768, 12, 10561, 16, 949, 16, 24164, 16, 963, 4672, 327, 4444, 812, 12, 10561, 16, 949, 16, 24164, 16, 963, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
for iP in range( len( self.__singleValueFields ) ): tqData[ tqId ][ self.__singleValueFields[ iP ] ] = record[ iP ]
for iP in range( len( self.__singleValueDefFields ) ): tqData[ tqId ][ self.__singleValueDefFields[ iP ] ] = record[ iP ]
def retrieveTaskQueues( self ): """ Get all the task queues """ sqlSelectEntries = [ "`tq_TaskQueues`.TQId", "`tq_TaskQueues`.Priority", "COUNT( `tq_Jobs`.TQId )" ] sqlGroupEntries = [ "`tq_TaskQueues`.TQId", "`tq_TaskQueues`.Priority" ] for field in self.__singleValueFields: sqlSelectEntries.append( "`tq_TaskQueues`.%s" % field ) sqlGroupEntries.append( "`tq_TaskQueues`.%s" % field ) sqlCmd = "SELECT %s FROM `tq_TaskQueues`, `tq_Jobs`" % ", ".join( sqlSelectEntries ) sqlCmd = "%s WHERE `tq_TaskQueues`.TQId = `tq_Jobs`.TQId GROUP BY %s" % ( sqlCmd, ", ".join( sqlGroupEntries ) )
6df3e1dfd550d5095830cb4cb71d2151d3513a5a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12864/6df3e1dfd550d5095830cb4cb71d2151d3513a5a/TaskQueueDB.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4614, 2174, 17428, 12, 365, 262, 30, 3536, 968, 777, 326, 1562, 11897, 3536, 1847, 3391, 5400, 273, 306, 11972, 88, 85, 67, 2174, 17428, 8338, 56, 53, 548, 3113, 11972, 88, 85, 67, 217...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4614, 2174, 17428, 12, 365, 262, 30, 3536, 968, 777, 326, 1562, 11897, 3536, 1847, 3391, 5400, 273, 306, 11972, 88, 85, 67, 2174, 17428, 8338, 56, 53, 548, 3113, 11972, 88, 85, 67, 217...
class DataFile:
class DataFile(object):
def __parseFolder(self): path="C:/Documents and Settings/pymn/workspace/Stonerlab/src/folder/run1" # insert the path to the directory of interest dirList=os.listdir(path) for fname in dirList: print(fname)
372d4d900e7cb6cacd8653f8b9b35c416e299025 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9183/372d4d900e7cb6cacd8653f8b9b35c416e299025/Stoner.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2670, 3899, 12, 2890, 4672, 589, 1546, 39, 27824, 12922, 471, 8709, 19, 2074, 13607, 19, 14915, 19, 510, 31430, 7411, 19, 4816, 19, 5609, 19, 2681, 21, 6, 225, 468, 2243, 326, 58...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2670, 3899, 12, 2890, 4672, 589, 1546, 39, 27824, 12922, 471, 8709, 19, 2074, 13607, 19, 14915, 19, 510, 31430, 7411, 19, 4816, 19, 5609, 19, 2681, 21, 6, 225, 468, 2243, 326, 58...
S = Set([t*q**i%n for i in range(n)])
S = Set([t*q**i%n for i in srange(n)])
def cyclotomic_cosets(q, n, t = None): r""" INPUT: q,n,t positive integers (or t=None) Some type-checking of inputs is performed. OUTPUT: q-cyclotomic cosets mod n (or, if t<>None, the q-cyclotomic coset mod n containing t) Let q, n be relatively print positive integers and let $A = q^{ZZ}$. The group A acts on ZZ/nZZ by multiplication. The orbits of this action are "cyclotomic cosets", or more precisely "q-cyclotomic cosets mod n". Sometimes the smallest element of the coset is called the "coset leader". The algorithm will always return the cosets as sorted lists of lists, so the coset leader will always be the first element in the list. These cosets arise in the theory of duadic codes and minimal polynomials of finite fields. Fix a primitive element $z$ of $GF(q^k)$. The minimal polynomial of $z^s$ over $GF(q)$ is given by \[ M_s(x) = \prod_{i \in C_s} (x-z^i), \] where $C_s$ is the q-cyclotomic coset mod n containing s, $n = q^k - 1$. EXAMPLES: sage: cyclotomic_cosets(2,11) [[0], [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]] sage: cyclotomic_cosets(2,15) [[0], [1, 2, 4, 8], [3, 6, 9, 12], [5, 10], [7, 11, 13, 14]] sage: cyclotomic_cosets(2,15,5) [5, 10] sage: cyclotomic_cosets(3,16) [[0], [1, 3, 9, 11], [2, 6], [4, 12], [5, 7, 13, 15], [8], [10, 14]] sage: F.<z> = GF(2^4, "z") sage: P.<x> = PolynomialRing(F,"x") sage: a = z^5 sage: a.minimal_polynomial() x^2 + x + 1 sage: prod([x-z^i for i in [5, 10]]) x^2 + x + 1 sage: cyclotomic_cosets(3,2,0) [0] sage: cyclotomic_cosets(3,2,1) [1] sage: cyclotomic_cosets(3,2,2) [0] This last output loks strange but is correct, since the elements of the cosets are in ZZ/nZZ and 2 = 0 in ZZ/2ZZ. """ if not(t==None) and type(t)<>Integer: raise TypeError, "Optional input %s must None or an integer."%t if q<2 or n<2: raise TypeError, "Inputs %s and %s must be > 1."%(q,n) if GCD(q,n) <> 1: raise TypeError, "Inputs %s and %s must be relative prime."%(q,n) if t<>None and type(t)==Integer: S = Set([t*q**i%n for i in range(n)]) L = list(S) L.sort() return L ccs = Set([]) ccs_list = [[0]] for s in range(1,n): if not(s in ccs): S = Set([s*q**i%n for i in range(n)]) L = list(S) L.sort() ccs = ccs.union(S) ccs_list.append(L) return ccs_list
11390a66b39c7a71313e55734b4de512e35d6dc6 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/11390a66b39c7a71313e55734b4de512e35d6dc6/code_constructions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6143, 830, 352, 24721, 67, 14445, 2413, 12, 85, 16, 290, 16, 268, 273, 599, 4672, 436, 8395, 225, 12943, 30, 1043, 16, 82, 16, 88, 6895, 12321, 261, 280, 268, 33, 7036, 13, 10548, 61...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6143, 830, 352, 24721, 67, 14445, 2413, 12, 85, 16, 290, 16, 268, 273, 599, 4672, 436, 8395, 225, 12943, 30, 1043, 16, 82, 16, 88, 6895, 12321, 261, 280, 268, 33, 7036, 13, 10548, 61...
DISCO_BIN = os.path.realpath(os.path.dirname(__file__))
DISCO_BIN = os.path.dirname(os.path.realpath(__file__))
def main(): DISCO_BIN = os.path.realpath(os.path.dirname(__file__)) DISCO_HOME = os.path.dirname(DISCO_BIN) DISCO_CONF = os.path.join(DISCO_HOME, 'conf') option_parser = optparse.OptionParser() option_parser.add_option('-s', '--settings', default=os.path.join(DISCO_CONF, 'settings.py'), help='use settings file settings') option_parser.add_option('-v', '--verbose', action='store_true', help='print debugging messages') option_parser.add_option('-p', '--print-env', action='store_true', help='print the parsed disco environment and exit') options, sys.argv = option_parser.parse_args() disco_settings = DiscoSettings(options.settings, DISCO_BIN=DISCO_BIN, DISCO_HOME=DISCO_HOME, DISCO_CONF=DISCO_CONF) if options.verbose: print( """ It seems that Disco is at {DISCO_HOME} Disco settings are at {0} If this is not what you want, see the `--help` option """.format(options.settings, **disco_settings)) # python2.6+ for name in disco_settings.must_exist: path = disco_settings[name] if not os.path.exists(path): os.makedirs(path) if options.print_env: for item in sorted(disco_settings.env.iteritems()): print('%s = %s' % (item)) sys.exit(0) argdict = dict(enumerate(sys.argv)) disco_object = globals()[argdict.pop(0, 'master')](disco_settings) for message in disco_object.send(argdict.pop(1, 'status')): print(message)
ad8c242af148154828b966902f5ab8e49963a98c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/373/ad8c242af148154828b966902f5ab8e49963a98c/disco.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 3690, 16224, 67, 12615, 225, 273, 1140, 18, 803, 18, 12287, 12, 538, 18, 803, 18, 7688, 803, 12, 972, 768, 972, 3719, 3690, 16224, 67, 14209, 273, 1140, 18, 803, 18, 12287...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3690, 16224, 67, 12615, 225, 273, 1140, 18, 803, 18, 12287, 12, 538, 18, 803, 18, 7688, 803, 12, 972, 768, 972, 3719, 3690, 16224, 67, 14209, 273, 1140, 18, 803, 18, 12287...
m = self.add_module('__main__')
m = self.add_module('__main__')
def make_main(self):
ce7c76df1b92a89c9b48d025af1313d1dcf28c4f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/ce7c76df1b92a89c9b48d025af1313d1dcf28c4f/rexec.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 67, 5254, 12, 2890, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 67, 5254, 12, 2890, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
IPATH=['direct/src/dcparse', 'direct/src/dcparser'] OPTS=['WITHINPANDA', 'NSPR'] CompileC(ipath=IPATH, opts=OPTS, src='dcparse.cxx', obj='dcparse_dcparse.obj') CompileLink(dll='dcparse.exe', opts=['ADVAPI', 'NSPR'], obj=[ 'dcparse_dcparse.obj', 'libdirect.dll', 'libpandaexpress.dll', 'libdtoolconfig.dll', 'libdtool.dll', 'libpystub.dll', ])
if (OMIT.count("PYTHON")==0): IPATH=['direct/src/dcparse', 'direct/src/dcparser'] OPTS=['WITHINPANDA', 'NSPR'] CompileC(ipath=IPATH, opts=OPTS, src='dcparse.cxx', obj='dcparse_dcparse.obj') CompileLink(dll='dcparse.exe', opts=['ADVAPI', 'NSPR'], obj=[ 'dcparse_dcparse.obj', 'libdirect.dll', 'libpandaexpress.dll', 'libdtoolconfig.dll', 'libdtool.dll', 'libpystub.dll', ])
if (val == 'UNDEF'): conf = conf + "#undef " + key + "\n"
8fd5a5147d54776cde7f8879cd333f478ebf3714 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8543/8fd5a5147d54776cde7f8879cd333f478ebf3714/makepanda.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 309, 261, 1125, 422, 296, 2124, 12904, 11, 4672, 2195, 273, 2195, 397, 6619, 318, 536, 315, 397, 498, 397, 1548, 82, 6, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 309, 261, 1125, 422, 296, 2124, 12904, 11, 4672, 2195, 273, 2195, 397, 6619, 318, 536, 315, 397, 498, 397, 1548, 82, 6, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...