rem
stringlengths
1
226k
add
stringlengths
0
227k
context
stringlengths
6
326k
meta
stringlengths
143
403
input_ids
listlengths
256
256
attention_mask
listlengths
256
256
labels
listlengths
128
128
self._console.error("Missing path information!") sys.exit(1)
raise ValueError("Missing path information!")
def __init__(self, libconfig, console): self._config = libconfig self._console = console
8b4b0c8973aec5a80d278fabe144face9c23b31d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5718/8b4b0c8973aec5a80d278fabe144face9c23b31d/LibraryPath.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2561, 1425, 16, 2983, 4672, 365, 6315, 1425, 273, 2561, 1425, 365, 6315, 8698, 273, 2983, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2561, 1425, 16, 2983, 4672, 365, 6315, 1425, 273, 2561, 1425, 365, 6315, 8698, 273, 2983, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
self.add_var_opt("user-tag",str(coinc.time)
self.add_var_opt("user-tag",str(coinc.time))
def __init__(self, dag, job,cp, opts, coinc, skyMapNode, p_nodes = []):
34683d7381925664466ea6f4908bd728fb8dbdd3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5758/34683d7381925664466ea6f4908bd728fb8dbdd3/stfu_pipe.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 22940, 16, 1719, 16, 4057, 16, 1500, 16, 13170, 71, 16, 15513, 863, 907, 16, 293, 67, 4690, 273, 5378, 4672, 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, 1001, 2738, 972, 12, 2890, 16, 22940, 16, 1719, 16, 4057, 16, 1500, 16, 13170, 71, 16, 15513, 863, 907, 16, 293, 67, 4690, 273, 5378, 4672, 2, -100, -100, -100, -100, -100, -100, -100,...
self.fill_table(page, ['end_time', trig.end_time] ) self.fill_table(page, ['end_time_ns', trig.end_time_ns] )
self.fill_table(page, ['end_time', '%010d' % trig.end_time] ) self.fill_table(page, ['end_time_ns', '%09d' % trig.end_time_ns] )
def create_table_sngl(self, trig): """ Creates the first table containing basic properties of the trigger which is followed up. @param trig: an sngl_inspiral table """ # create the web-page and add a table page = markup.page() page.h1("Followup trigger #"+str(self.number)) page.add('<table border="2" >') self.fill_table(page, ['<b>parameter','<b>value'] ) self.fill_table(page, ['Number', self.number] ) self.fill_table(page, ['inj ID', self.injection_id] ) self.fill_table(page, ['mass1', '%.2f'% trig.mass1] ) self.fill_table(page, ['mass2', '%.2f'% trig.mass2] ) self.fill_table(page, ['mtotal', '%.2f' % (trig.mass1+trig.mass2)] ) self.fill_table(page, ['mchirp', '%.2f' % (trig.mchirp)] ) self.fill_table(page, ['end_time', trig.end_time] ) self.fill_table(page, ['end_time_ns', trig.end_time_ns] ) self.fill_table(page, ['snr', trig.snr]) self.fill_table(page, ['chisq', trig.chisq]) self.fill_table(page, ['eff_snr', self.get_effective_snr(trig)]) self.fill_table(page, ['eff_distance', '%.1f' % trig.eff_distance] ) page.add('</table></td><br>') page.hr() return page
b4acd7dc4e287a609bc633f9e0fd28eba8a7b684 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3592/b4acd7dc4e287a609bc633f9e0fd28eba8a7b684/followup_trigger.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 2121, 67, 87, 3368, 80, 12, 2890, 16, 23142, 4672, 3536, 10210, 326, 1122, 1014, 4191, 5337, 1790, 434, 326, 3080, 1492, 353, 10860, 731, 18, 632, 891, 23142, 30, 392, 272, 33...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 2121, 67, 87, 3368, 80, 12, 2890, 16, 23142, 4672, 3536, 10210, 326, 1122, 1014, 4191, 5337, 1790, 434, 326, 3080, 1492, 353, 10860, 731, 18, 632, 891, 23142, 30, 392, 272, 33...
"""Support older 4 byte version."""
"""Support older 8 byte version."""
def setRace(self,race): """Set additional race info.""" self.race = race #--Model if not self.model: self.model = self.getDefault('model') if race in (0x23fe9,0x223c7): self.model.modPath = r"Characters\_Male\SkeletonBeast.NIF" else: self.model.modPath = r"Characters\_Male\skeleton.nif" #--FNAM fnams = { 0x23fe9 : 0x3cdc ,#--Argonian 0x224fc : 0x1d48 ,#--Breton 0x191c1 : 0x5472 ,#--Dark Elf 0x19204 : 0x21e6 ,#--High Elf 0x00907 : 0x358e ,#--Imperial 0x22c37 : 0x5b54 ,#--Khajiit 0x224fd : 0x03b6 ,#--Nord 0x191c0 : 0x0974 ,#--Orc 0x00d43 : 0x61a9 ,#--Redguard 0x00019 : 0x4477 ,#--Vampire 0x223c8 : 0x4a2e ,#--Wood Elf } self.fnam = fnams.get(race,0x358e)
cdd05bf6c021b5f069ec65da467b610730840d77 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6682/cdd05bf6c021b5f069ec65da467b610730840d77/bosh.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 54, 623, 12, 2890, 16, 9963, 4672, 3536, 694, 3312, 17996, 1123, 12123, 365, 18, 9963, 273, 17996, 468, 413, 1488, 309, 486, 365, 18, 2284, 30, 365, 18, 2284, 273, 365, 18, 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, 444, 54, 623, 12, 2890, 16, 9963, 4672, 3536, 694, 3312, 17996, 1123, 12123, 365, 18, 9963, 273, 17996, 468, 413, 1488, 309, 486, 365, 18, 2284, 30, 365, 18, 2284, 273, 365, 18, 588, ...
elif data0 == 103:
elif data0 == MAGIC_PID:
def _UnpackOneTerm(data): dataLen = len(data) if len(data) == 0: return (None, data) data0 = ord(data[0]) if data0 == 97: # small_integer_ext if dataLen < 2: return (None, data) n = _ReadInt1(data[1]) return (ErlNumber(n), data[2:]) elif data0 == 98: # integer_ext if dataLen < 5: return (None, data) n = _ReadInt4(data[1:5]) return (ErlNumber(i), data[5:]) elif data0 == 99: # float_ext if dataLen < 32: return (None, data) floatData = data[1:32] try: nullIndex = string.index(floatData, chr(0)) floatStr = floatData[0:nullIndex] except ValueError: floatStr = floatData f = string.atof(floatStr) return (ErlNumber(f), data[32:]) elif data0 == 100: # atom_ext if dataLen < 3: return (None, data) atomLen = _ReadInt2(data[1:3]) if dataLen < 3 + atomLen: return (None, data) atomText = data[3:3 + atomLen] return (ErlAtom(atomText), data[3 + atomLen:]) elif data0 == 101: # reference_ext (node, remainingData) = _UnpackOneTerm(data[1:]) if node == None: return (None, data) if len(remainingData) < 5: return (None, data) id = _ReadId(remainingData[0:4]) creation = _ReadCreation(remainingData[4]) return (ErlRef(node, id, creation), remainingData[5:]) elif data0 == 102: # port_ext (node, remainingData) = _UnpackOneTerm(data[1:]) if node == None: return (None, data) if len(remainingData) < 5: return (None, data) id = _ReadId(remainingData[0:4]) creation = _ReadCreation(remainingData[4]) return (ErlPort(node, id, creation), remainingData[5:]) elif data0 == 103: # pid_ext (node, remainingData) = _UnpackOneTerm(data[1:]) if node == None: return (None, data) if len(remainingData) < 9: return (None, data) id = _ReadId(remainingData[0:4], 15) serial = _ReadInt4(remainingData[4:8]) creation = _ReadCreation(remainingData[8]) return (ErlPid(node, id, serial, creation), remainingData[9:]) elif data0 == 104: # small_tuple_ext if dataLen < 2: return (None, data) arity = _ReadInt1(data[1]) (elements, remainingData) = _UnpackTermSeq(arity, data[2:]) if elements == None: return (None, data) return (ErlTuple(elements), remainingData) elif data0 == 105: # large_tuple_ext if dataLen < 5: return (None, data) arity = _ReadInt4(data[1:5]) (elements, remainingData) = _UnpackTermSeq(arity, data[5:]) if elements == None: return (None, data) return (ErlTuple(elements), remainingData) elif data0 == 106: # nil_ext: return (ErlList([]), data[1:]) elif data0 == 107: # string_ext if dataLen < 3: return (None, data) strlen = _ReadInt2(data[1:3]) if dataLen < 3 + strlen: return (None, data) s = data[3:3 + strlen] return (ErlString(s), data[3 + strlen:]) elif data0 == 108: # list_ext if dataLen < 5: return (None, data) arity = _ReadInt4(data[1:5]) (elements, remainingData) = _UnpackTermSeq(arity, data[5:]) if elements == None: return (None, data) return (ErlList(elements), remainingData) elif data0 == 109: # binary_ext if dataLen < 5: return (None, data) binlen = _ReadInt4(data[1:5]) if dataLen < 5 + binlen: return (None, data) s = data[5:5 + binlen] return (ErlBinary(s), data[5 + binlen:]) elif data0 == 110: # small_big_ext if dataLen < 2: return (None, data) n = _ReadInt1(data[1]) if dataLen < 2 + 1 + n: return (None, data) sign = _ReadInt1(data[2]) bignum = 0L for i in range(n): d = _ReadInt1(data[3 + n - i - 1]) bignum = bignum * 256L + long(d) if sign: bignum = bignum * -1L return (ErlNumber(bignum), data[3 + n:]) elif data0 == 111: # large_big_ext if dataLen < 5: return (None, data) n = _ReadInt4(data[1:5]) if dataLen < 5 + 1 + n: return (None, data) sign = _ReadInt1(data[5]) bignum = 0L for i in range(n): d = _ReadInt1(data[6 + n - i - 1]) bignum = bignum * 256L + long(d) if sign: bignum = bignum * -1L return (ErlNumber(bignum), data[6 + n:]) elif data0 == 78: # new_cache if dataLen < 4: return (None, data) index = _ReadInt1(data[1]) atomLen = _ReadInt2(data[2:4]) if dataLen < 4 + atomLen: return (None, data) atomText = data[4:4 + atomLen] return (ErlAtom(atomText, cache=index), data[4 + atomLen:]) elif data0 == 67: # cached_atom if dataLen < 2: return (None, data) index = _ReadInt1(data[1]) return (ErlAtom(None, cache=index), data[2:]) elif data0 == 114: # new_reference_ext if dataLen < 3: return (None, data) idLen = _ReadInt2(data[1:3]) (node, remainingData) = _UnpackOneTerm(data[3:]) if node == None: return (None, data) nprim = 4 * idLen if len(remainingData) < 1 + nprim: return (None, data) creation = _ReadCreation(remainingData[0]) remainingData = remainingData[1:] id0 = _ReadId(remainingData[0:4]) id = [id0] remainingData = remainingData[4:] for i in idLen: i = _ReadInt4(remainingData[0:4]) remainingData = remainingData[4:] return (ErlRef(node, creation, id), remainingData) elif data0 == 117: # fun_ext if dataLen < 5: return (None, data) freevarsLen = _ReadInt4(data[1:5]) (pid, remainingData1) = _UnpackOneTerm(data[5:]) if pid == None: return (None, data) (module, remainingData2) = _UnpackOneTerm(remainingData1) if module == None: return (None, data) (index, remainingData3) = _UnpackOneTerm(remainingData2) if index == None: return (None, data) (uniq, remainingData4) = _UnpackOneTerm(remainingData3) if uniq == None: return (None, data) (freeVars, remainingData5) = _UnpackTermSeq(freevarsLen, remainingData4) if freeVars == None: return (None, data) return (ErlFun(pid, module, index, uniq, freeVars), remainingData5) else: print "Bad tag %s" % `data0` return (None, data)
f5a33431908f2d30884e237b626d15ed55b2f169 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7565/f5a33431908f2d30884e237b626d15ed55b2f169/erl_term.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 23649, 3335, 4065, 12, 892, 4672, 501, 2891, 273, 562, 12, 892, 13, 225, 309, 562, 12, 892, 13, 422, 374, 30, 327, 261, 7036, 16, 501, 13, 225, 501, 20, 273, 4642, 12, 892, 63...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 23649, 3335, 4065, 12, 892, 4672, 501, 2891, 273, 562, 12, 892, 13, 225, 309, 562, 12, 892, 13, 422, 374, 30, 327, 261, 7036, 16, 501, 13, 225, 501, 20, 273, 4642, 12, 892, 63...
factorConcentrationsOld = currentState[i][j].factor_concentration
factorConcentrationOld = currentState[i][j].factor_concentration
def update_factor_concentrations(self, currentState): """Update function of the simulator, calculates the factor concentrations of the next timestep.
c0740bdaa035187eb5e0596d71a0ffb7dfff28a9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1770/c0740bdaa035187eb5e0596d71a0ffb7dfff28a9/translattice.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 67, 6812, 67, 11504, 8230, 1012, 12, 2890, 16, 17773, 4672, 3536, 1891, 445, 434, 326, 3142, 11775, 16, 17264, 326, 5578, 20570, 8230, 1012, 434, 326, 1024, 27072, 18, 2, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 67, 6812, 67, 11504, 8230, 1012, 12, 2890, 16, 17773, 4672, 3536, 1891, 445, 434, 326, 3142, 11775, 16, 17264, 326, 5578, 20570, 8230, 1012, 434, 326, 1024, 27072, 18, 2, -100, -10...
def abelian_2group(s):
def elementary_abelian_2group(s):
def abelian_2group(s): """ Returns the latin square based on the Cayley table for the abelian 2-group of order 2^s. INPUT: s -- int; order of the latin square will be 2^s. EXAMPLES: sage: from sage.combinat.matrices.latin import * sage: print abelian_2group(3) [0 1 2 3 4 5 6 7] [1 0 3 2 5 4 7 6] [2 3 0 1 6 7 4 5] [3 2 1 0 7 6 5 4] [4 5 6 7 0 1 2 3] [5 4 7 6 1 0 3 2] [6 7 4 5 2 3 0 1] [7 6 5 4 3 2 1 0] """ assert s > 0 if s == 1: L = LatinSquare(2, 2) L[0, 0] = 0 L[0, 1] = 1 L[1, 0] = 1 L[1, 1] = 0 return L else: L_prev = abelian_2group(s-1) L = LatinSquare(2**s, 2**s) offset = L.nrows()/2 for r in range(L_prev.nrows()): for c in range(L_prev.ncols()): L[r, c] = L_prev[r, c] L[r+offset, c] = L_prev[r, c] + offset L[r, c+offset] = L_prev[r, c] + offset L[r+offset, c+offset] = L_prev[r, c] return L
b912fcc3f6e81017bcafed666fd88a387d1cf679 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/b912fcc3f6e81017bcafed666fd88a387d1cf679/latin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 930, 814, 67, 873, 2779, 67, 22, 1655, 12, 87, 4672, 3536, 2860, 326, 30486, 8576, 2511, 603, 326, 385, 528, 30678, 1014, 364, 326, 1223, 292, 2779, 576, 17, 1655, 434, 1353, 576, 66, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 930, 814, 67, 873, 2779, 67, 22, 1655, 12, 87, 4672, 3536, 2860, 326, 30486, 8576, 2511, 603, 326, 385, 528, 30678, 1014, 364, 326, 1223, 292, 2779, 576, 17, 1655, 434, 1353, 576, 66, ...
if 'size' in self.esmtp_features: esmtp_opts.append("size=" + `len(msg)`) for option in options: if option in self.esmtp_features:
if self.does_esmtp: if self.has_extn('size'): esmtp_opts.append("size=" + `len(msg)`) for option in mail_options:
def sendmail(self,from_addr,to_addrs,msg,options=[]): """ This command performs an entire mail transaction. The arguments are: - from_addr : The address sending this mail. - to_addrs : a list of addresses to send this mail to - msg : the message to send. - encoding : list of ESMTP options (such as 8bitmime)
2fa5f60664065d7f143e96d9f7ecc34ac6c401ed /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2fa5f60664065d7f143e96d9f7ecc34ac6c401ed/smtplib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 4408, 12, 2890, 16, 2080, 67, 4793, 16, 869, 67, 23305, 16, 3576, 16, 2116, 33, 8526, 4672, 3536, 1220, 1296, 11199, 392, 7278, 4791, 2492, 18, 1021, 1775, 854, 30, 300, 628, 67,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 4408, 12, 2890, 16, 2080, 67, 4793, 16, 869, 67, 23305, 16, 3576, 16, 2116, 33, 8526, 4672, 3536, 1220, 1296, 11199, 392, 7278, 4791, 2492, 18, 1021, 1775, 854, 30, 300, 628, 67,...
x,y = R.gens()
def full_division_polynomial(self, m): """ Return the m-th bivariate division polynomial in x and y.
5ed26421d5bce93093035f28d28f8b03cdb744e9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/5ed26421d5bce93093035f28d28f8b03cdb744e9/ell_generic.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1983, 67, 2892, 1951, 67, 3915, 13602, 12, 2890, 16, 312, 4672, 3536, 2000, 326, 312, 17, 451, 324, 27693, 16536, 16991, 316, 619, 471, 677, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1983, 67, 2892, 1951, 67, 3915, 13602, 12, 2890, 16, 312, 4672, 3536, 2000, 326, 312, 17, 451, 324, 27693, 16536, 16991, 316, 619, 471, 677, 18, 2, -100, -100, -100, -100, -100, -100, ...
self.client = memcache.Client(servers, **options)
def __init__(self, expires=conf.TASK_RESULT_EXPIRES, backend=conf.CELERY_CACHE_BACKEND, options={}, **kwargs): super(CacheBackend, self).__init__(self, **kwargs) if isinstance(expires, timedelta): expires = timeutils.timedelta_seconds(expires) self.expires = expires self.options = dict(conf.CELERY_CACHE_BACKEND_OPTIONS, options) self.backend, _, servers = partition(backend, "://") self.servers = servers.split(";") self.client = memcache.Client(servers, **options)
df7fd4612f917090094e8880da57070989c758b2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2024/df7fd4612f917090094e8880da57070989c758b2/cache.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 7368, 33, 3923, 18, 15580, 67, 12289, 67, 18433, 7031, 16, 4221, 33, 3923, 18, 28746, 8404, 67, 8495, 67, 8720, 4415, 16, 702, 28793, 2826, 4333, 4672, 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, 7368, 33, 3923, 18, 15580, 67, 12289, 67, 18433, 7031, 16, 4221, 33, 3923, 18, 28746, 8404, 67, 8495, 67, 8720, 4415, 16, 702, 28793, 2826, 4333, 4672, 2...
if '__WXMSW__' in wx.PlatformInfo: wx.SystemOptions.SetOptionInt( "msw.remap", 0 )
def OnAppActivate(self, event): if event.GetActive() and self.IsIconized(): self.Iconize(False)
517577536ac5edf9c26c1bba1d477f7811cf0959 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/517577536ac5edf9c26c1bba1d477f7811cf0959/Application.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2755, 3371, 21370, 12, 2890, 16, 871, 4672, 309, 871, 18, 967, 3896, 1435, 471, 365, 18, 2520, 5554, 1235, 13332, 365, 18, 5554, 554, 12, 8381, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2755, 3371, 21370, 12, 2890, 16, 871, 4672, 309, 871, 18, 967, 3896, 1435, 471, 365, 18, 2520, 5554, 1235, 13332, 365, 18, 5554, 554, 12, 8381, 13, 2, -100, -100, -100, -100, -100, -10...
ok_delta = datetime.timedelta(seconds=1)
nowish = now + datetime.timedelta(seconds=1)
def testFileTimes(self): if issubclass(pywintypes.TimeType, datetime.datetime): from win32timezone import GetLocalTimeZone now = datetime.datetime.now(tz=GetLocalTimeZone()) ok_delta = datetime.timedelta(seconds=1) later = now + datetime.timedelta(seconds=120) else: tick = int(time.time()) now = pywintypes.Time(tick) ok_delta = 1 later = pywintypes.Time(tick+120)
14ccee35f01afa6ae2a33f3bb83af9e157bf96aa /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/677/14ccee35f01afa6ae2a33f3bb83af9e157bf96aa/test_win32file.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 812, 10694, 12, 2890, 4672, 309, 14664, 12, 2074, 91, 474, 989, 18, 950, 559, 16, 3314, 18, 6585, 4672, 628, 5657, 1578, 12690, 1930, 968, 2042, 16760, 2037, 273, 3314, 18, 6585, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 812, 10694, 12, 2890, 4672, 309, 14664, 12, 2074, 91, 474, 989, 18, 950, 559, 16, 3314, 18, 6585, 4672, 628, 5657, 1578, 12690, 1930, 968, 2042, 16760, 2037, 273, 3314, 18, 6585, ...
gLogger.info("ReplicaManager.__resolveBestReplicas: %s is available for use." % diracSE) storageElement = StorageElement(diracSE)
gLogger.info( "ReplicaManager.__resolveBestReplicas: %s is available for use." % diracSE ) storageElement = StorageElement( diracSE )
def __resolveBestReplicas(self,sourceSE,lfnReplicas,catalogueSize): ########################################################### # Determine the best replicas (remove banned sources, invalid storage elements and file with the wrong size) configStr = '/Resources/StorageElements/BannedSource' bannedSources = gConfig.getValue(configStr,[]) gLogger.info("ReplicaManager.__resolveBestReplicas: Obtained current banned sources.") replicaPreference = [] for diracSE,pfn in lfnReplicas.items(): if sourceSE and diracSE != sourceSE: gLogger.info("ReplicaManager.__resolveBestReplicas: %s replica not requested." % diracSE) elif diracSE in bannedSources: gLogger.info("ReplicaManager.__resolveBestReplicas: %s is currently banned as a source." % diracSE) else: gLogger.info("ReplicaManager.__resolveBestReplicas: %s is available for use." % diracSE) storageElement = StorageElement(diracSE) res = storageElement.isValid() if not res['OK']: errStr = "ReplicaManager.__resolveBestReplicas: The storage element is not currently valid." gLogger.error(errStr,"%s %s" % (diracSE,res['Message'])) else: if storageElement.getRemoteProtocols()['Value']: gLogger.verbose("ReplicaManager.__resolveBestReplicas: Attempting to get source pfns for remote protocols.") res = storageElement.getPfnForProtocol(pfn,self.thirdPartyProtocols) if res['OK']: sourcePfn = res['Value'] gLogger.verbose("ReplicaManager.__resolveBestReplicas: Attempting to get source file size.") res = storageElement.getFileSize(sourcePfn) if res['OK']: if res['Value']['Successful'].has_key(sourcePfn): sourceFileSize = res['Value']['Successful'][sourcePfn] gLogger.info("ReplicaManager.__resolveBestReplicas: Source file size determined to be %s." % sourceFileSize) if catalogueSize == sourceFileSize: fileTuple = (diracSE,sourcePfn) replicaPreference.append(fileTuple) else: errStr = "ReplicaManager.__resolveBestReplicas: Catalogue size and physical file size mismatch." gLogger.error(errStr,"%s %s" % (diracSE,sourcePfn)) else: errStr = "ReplicaManager.__resolveBestReplicas: Failed to get physical file size." gLogger.error(errStr,"%s %s: %s" % (sourcePfn,diracSE,res['Value']['Failed'][sourcePfn])) else: errStr = "ReplicaManager.__resolveBestReplicas: Completely failed to get physical file size." gLogger.error(errStr,"%s %s: %s" % (sourcePfn,diracSE,res['Message'])) else: errStr = "ReplicaManager.__resolveBestReplicas: Failed to get PFN for replication for StorageElement." gLogger.error(errStr,"%s %s" % (diracSE,res['Message'])) else: errStr = "ReplicaManager.__resolveBestReplicas: Source Storage Element has no remote protocols." gLogger.info(errStr,diracSE) if not replicaPreference: errStr = "ReplicaManager.__resolveBestReplicas: Failed to find any valid source Storage Elements." gLogger.error(errStr) return S_ERROR(errStr) else: return S_OK(replicaPreference)
9fabceb719d19d46d8b75011d2932552dbe360f9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/9fabceb719d19d46d8b75011d2932552dbe360f9/ReplicaManager.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 10828, 14173, 17248, 12, 2890, 16, 3168, 1090, 16, 80, 4293, 17248, 16, 7199, 344, 1225, 4672, 19709, 5516, 3228, 1189, 468, 10229, 326, 3796, 21545, 261, 4479, 324, 10041, 5550, 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, 10828, 14173, 17248, 12, 2890, 16, 3168, 1090, 16, 80, 4293, 17248, 16, 7199, 344, 1225, 4672, 19709, 5516, 3228, 1189, 468, 10229, 326, 3796, 21545, 261, 4479, 324, 10041, 5550, 16,...
print "FOUND 0."
if debug: print "FOUND 0."
def call_gnucap(self): filename = "/tmp/gcompris_electric.gnucap.%d" %(os.getpid(),) f = file(filename, "w+")
68e9d9e0c9b9895ad7bed7ca4429509271f2d3b4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11306/68e9d9e0c9b9895ad7bed7ca4429509271f2d3b4/electric.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 745, 67, 1600, 5286, 438, 12, 2890, 4672, 1544, 273, 2206, 5645, 19, 75, 832, 683, 291, 67, 13759, 1512, 18, 1600, 5286, 438, 7866, 72, 6, 8975, 538, 18, 588, 6610, 9334, 13, 284, 27...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 745, 67, 1600, 5286, 438, 12, 2890, 4672, 1544, 273, 2206, 5645, 19, 75, 832, 683, 291, 67, 13759, 1512, 18, 1600, 5286, 438, 7866, 72, 6, 8975, 538, 18, 588, 6610, 9334, 13, 284, 27...
rpcClient = getRPCClient( "Monitoring/Server" )
rpcClient = getRPCClient( "Framework/Monitoring" )
def tryView( self ): """ Try plotting graphs for a view """ if not authorizeAction(): return S_ERROR( "Unauthorized!" ) try: plotRequest = simplejson.loads( request.params[ 'plotRequest' ] ) if 'timeLength' in request.params: timeLength = str( request.params[ 'timeLength' ] ) toSecs = int( Time.toEpoch() ) if timeLength == "hour": fromSecs = toSecs - 3600 elif timeLength == "day": fromSecs = toSecs - 86400 elif timeLength == "month": fromSecs = toSecs - 2592000 elif fromSecs == "year": fromDate = toSecs - 31104000 else: return S_ERROR( "Time length value not valid" ) else: fromDate = str( request.params[ 'fromDate' ] ) toDate = str( request.params[ 'toDate' ] ) fromSecs = self.__dateToSecs( fromDate ) toSecs = self.__dateToSecs( toDate ) except Exception, e: return S_ERROR( "Error while processing plot parameters: %s" % str( e ) ) rpcClient = getRPCClient( "Monitoring/Server" ) requestStub = DEncode.encode( plotRequest ) retVal = rpcClient.tryView( fromSecs, toSecs, requestStub ) if not retVal[ 'OK' ]: return retVal return S_OK( { 'images' : retVal[ 'Value' ], 'stub' : requestStub } )
3a4ed20fa2777d497603323b1fa6e5d315519b7a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12767/3a4ed20fa2777d497603323b1fa6e5d315519b7a/monitoring.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 775, 1767, 12, 365, 262, 30, 3536, 6161, 20947, 19422, 364, 279, 1476, 3536, 309, 486, 12229, 1803, 13332, 327, 348, 67, 3589, 12, 315, 13981, 4442, 262, 775, 30, 3207, 691, 273, 4143, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 775, 1767, 12, 365, 262, 30, 3536, 6161, 20947, 19422, 364, 279, 1476, 3536, 309, 486, 12229, 1803, 13332, 327, 348, 67, 3589, 12, 315, 13981, 4442, 262, 775, 30, 3207, 691, 273, 4143, ...
srpm = po.returnSimple('sourcerpm').strip('.src.rpm')
srpm = po.returnSimple('sourcerpm').split('.src.rpm')[0]
def getSRPMList(self): """Cycle through the list of package objects and find the sourcerpm for them. Requires yum still configured and a list of package objects"""
e93179577e958e5765f880108fd0b2f50b237394 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8489/e93179577e958e5765f880108fd0b2f50b237394/gather.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1322, 54, 12728, 682, 12, 2890, 4672, 3536, 13279, 3059, 326, 666, 434, 2181, 2184, 471, 1104, 326, 272, 477, 2750, 7755, 364, 2182, 18, 225, 16412, 677, 379, 4859, 4351, 471, 279, 666, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1322, 54, 12728, 682, 12, 2890, 4672, 3536, 13279, 3059, 326, 666, 434, 2181, 2184, 471, 1104, 326, 272, 477, 2750, 7755, 364, 2182, 18, 225, 16412, 677, 379, 4859, 4351, 471, 279, 666, ...
"""
"""
def flimage_get_closest_color_from_map(pImage, p2): """ flimage_get_closest_color_from_map(pImage, p2) -> num. """ retval = _flimage_get_closest_color_from_map(pImage, p2) return retval
9942dac8ce2b35a1e43615a26fd8e7054ef805d3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2429/9942dac8ce2b35a1e43615a26fd8e7054ef805d3/xformslib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1183, 2730, 67, 588, 67, 7550, 7781, 67, 3266, 67, 2080, 67, 1458, 12, 84, 2040, 16, 293, 22, 4672, 3536, 1183, 2730, 67, 588, 67, 7550, 7781, 67, 3266, 67, 2080, 67, 1458, 12, 84, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1183, 2730, 67, 588, 67, 7550, 7781, 67, 3266, 67, 2080, 67, 1458, 12, 84, 2040, 16, 293, 22, 4672, 3536, 1183, 2730, 67, 588, 67, 7550, 7781, 67, 3266, 67, 2080, 67, 1458, 12, 84, ...
for key in data_dict.keys():
for key in data_dict:
def merge(self,__loc_data__=None,__conflict_solve=None,**kw): """S.merge(data,conflict,k=v1,k=v2,...) -> merge data and k=v into S.
2d6ded9f7d7a6d62ac5b460b7428dd8baa77b458 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4224/2d6ded9f7d7a6d62ac5b460b7428dd8baa77b458/Struct.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2691, 12, 2890, 16, 972, 1829, 67, 892, 972, 33, 7036, 16, 972, 20340, 67, 24626, 33, 7036, 16, 636, 9987, 4672, 3536, 55, 18, 2702, 12, 892, 16, 20340, 16, 79, 33, 90, 21, 16, 79,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2691, 12, 2890, 16, 972, 1829, 67, 892, 972, 33, 7036, 16, 972, 20340, 67, 24626, 33, 7036, 16, 636, 9987, 4672, 3536, 55, 18, 2702, 12, 892, 16, 20340, 16, 79, 33, 90, 21, 16, 79,...
return (' ! Error found during real run of migration! Aborting.\n' '\n' ' ! Since you have a database that does not support running\n' ' ! schema-altering statements in transactions, we have had \n' ' ! to leave it in an interim state between migrations.\n' '%s\n' ' ! The South developers regret this has happened, and would\n' ' ! like to gently persuade you to consider a slightly\n' ' ! easier-to-deal-with DBMS.\n') % extra_info
return ( ' ! Error found during real run of migration! Aborting.\n' '\n' ' ! Since you have a database that does not support running\n' ' ! schema-altering statements in transactions, we have had \n' ' ! to leave it in an interim state between migrations.\n' '%s\n' ' ! The South developers regret this has happened, and would\n' ' ! like to gently persuade you to consider a slightly\n' ' ! easier-to-deal-with DBMS.\n' ' ! NOTE: The error which caused the migration to fail is further up.' ) % extra_info
def run_migration_error(self, migration, extra_info=''): return (' ! Error found during real run of migration! Aborting.\n' '\n' ' ! Since you have a database that does not support running\n' ' ! schema-altering statements in transactions, we have had \n' ' ! to leave it in an interim state between migrations.\n' '%s\n' ' ! The South developers regret this has happened, and would\n' ' ! like to gently persuade you to consider a slightly\n' ' ! easier-to-deal-with DBMS.\n') % extra_info
f9bb13996315b6025fc99e92833ef97c2ca22f64 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13142/f9bb13996315b6025fc99e92833ef97c2ca22f64/migrators.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 67, 15746, 67, 1636, 12, 2890, 16, 6333, 16, 2870, 67, 1376, 2218, 11, 4672, 327, 7707, 401, 1068, 1392, 4982, 2863, 1086, 434, 6333, 5, 14263, 310, 8403, 82, 11, 2337, 82, 11, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 67, 15746, 67, 1636, 12, 2890, 16, 6333, 16, 2870, 67, 1376, 2218, 11, 4672, 327, 7707, 401, 1068, 1392, 4982, 2863, 1086, 434, 6333, 5, 14263, 310, 8403, 82, 11, 2337, 82, 11, ...
class lower_panel(wx.Panel):
class _Lower_Panel(wx.Panel):
def __init__(self, parent): wx.Panel.__init__(self, parent) sizer = wx.BoxSizer(wx.HORIZONTAL) download_liste = wx.ListCtrl(self, style=wx.LC_REPORT) download_liste.InsertColumn(0, 'Name', width=250) download_liste.InsertColumn(1, 'Status') download_liste.InsertColumn(2, 'Groesse') download_liste.InsertColumn(3, 'Uebertragen', width=100) download_liste.InsertColumn(4, 'Prozent', width=100) download_liste.InsertColumn(5, 'Dauer', width=100) download_liste.InsertColumn(7, 'Geschwindigkeit', width=150)
c41ba12f6ec3f15160195671ad10d789fed7c6ff /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9838/c41ba12f6ec3f15160195671ad10d789fed7c6ff/pyMainGui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 982, 4672, 7075, 18, 5537, 16186, 2738, 972, 12, 2890, 16, 982, 13, 272, 1824, 273, 7075, 18, 3514, 20512, 12, 27226, 18, 44, 20344, 13, 4224, 67, 1098, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 982, 4672, 7075, 18, 5537, 16186, 2738, 972, 12, 2890, 16, 982, 13, 272, 1824, 273, 7075, 18, 3514, 20512, 12, 27226, 18, 44, 20344, 13, 4224, 67, 1098, ...
pypungi._ensuredir('%s-disc%d/SRPMS' % (timper.dist_dir, i),
pypungi._ensuredir('%s-disc%d/SRPMS' % (timber.dist_dir, i),
def doSplitSRPMs(self): """Use anaconda-runtime's splittree to split the srpms into appropriate sized chunks."""
aa358c15177650addd547369b409d82d719f19ea /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8489/aa358c15177650addd547369b409d82d719f19ea/pungi.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 5521, 10090, 52, 6947, 12, 2890, 4672, 3536, 3727, 392, 16329, 2414, 17, 9448, 1807, 1416, 3413, 358, 1416, 326, 9133, 84, 959, 1368, 5505, 26046, 6055, 12123, 2, 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, 741, 5521, 10090, 52, 6947, 12, 2890, 4672, 3536, 3727, 392, 16329, 2414, 17, 9448, 1807, 1416, 3413, 358, 1416, 326, 9133, 84, 959, 1368, 5505, 26046, 6055, 12123, 2, -100, -100, -100, ...
new_mtime = os.path.getmtime(os.path.join(self._path, 'new')) cur_mtime = os.path.getmtime(os.path.join(self._path, 'cur')) if (self._last_read is not None and new_mtime <= self._last_read and cur_mtime <= self._last_read): return
if self._last_read is not None: for subdir in ('new', 'cur'): mtime = os.path.getmtime(os.path.join(self._path, subdir)) if mtime > self._last_read: break else: return now = time.time() - 1
def _refresh(self): """Update table of contents mapping.""" new_mtime = os.path.getmtime(os.path.join(self._path, 'new')) cur_mtime = os.path.getmtime(os.path.join(self._path, 'cur'))
d35b8c78990bf3921648c3cb9f186f726c0f13de /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8546/d35b8c78990bf3921648c3cb9f186f726c0f13de/mailbox.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 9144, 12, 2890, 4672, 3536, 1891, 1014, 434, 2939, 2874, 12123, 394, 67, 10838, 273, 1140, 18, 803, 18, 588, 10838, 12, 538, 18, 803, 18, 5701, 12, 2890, 6315, 803, 16, 296, 2704,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 9144, 12, 2890, 4672, 3536, 1891, 1014, 434, 2939, 2874, 12123, 394, 67, 10838, 273, 1140, 18, 803, 18, 588, 10838, 12, 538, 18, 803, 18, 5701, 12, 2890, 6315, 803, 16, 296, 2704,...
-(d2Udphi2 + 2*y[1]*dUdphi + (y[1]**2)*U)/(y[2]**2) )*y[5])
+ (d2Udphi2 + 2*y[1]*dUdphi + (y[1]**2)*U)/(y[2]**2) )*y[5])
def derivs(self, y, t): """Basic background equations of motion. dydx[0] = dy[0]/dn etc""" #get potential from function U, dUdphi, d2Udphi2 = self.potentials(y) #Set derivatives taking care of k type if type(self.k) is N.ndarray or type(self.k) is list: dydx = N.zeros((7,len(self.k))) else: dydx = N.zeros(7) #d\phi_0/dn = y_1 dydx[0] = y[1] #dphi^prime/dn dydx[1] = -(U*y[1] + dUdphi)/(y[2]**2) #dH/dn dydx[2] = -0.5*(y[1]**2)*y[2] #d\deltaphi_1/dn = y[4] dydx[3] = y[4] #Get a a = self.ainit*N.exp(t) #d\deltaphi_1^prime/dn dydx[4] = (-(3 + dydx[2]/y[2])*y[4] - ( ( self.k/(a*y[2]) )**2 -(d2Udphi2 + 2*y[1]*dUdphi + (y[1]**2)*U)/(y[2]**2) )*y[3]) #print dydx[4] #Complex parts dydx[5] = y[6] dydx[6] = (-(3 + dydx[2]/y[2])*y[6] - ( ( self.k/(a*y[2]) )**2 -(d2Udphi2 + 2*y[1]*dUdphi + (y[1]**2)*U)/(y[2]**2) )*y[5]) return dydx
3e7f6d34e81f3425fc5d8b067dd407427fd1cf30 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7283/3e7f6d34e81f3425fc5d8b067dd407427fd1cf30/cosmomodels.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9630, 87, 12, 2890, 16, 677, 16, 268, 4672, 3536, 8252, 5412, 30369, 434, 21188, 18, 7732, 13437, 63, 20, 65, 273, 7732, 63, 20, 18537, 5176, 5527, 8395, 225, 468, 588, 8555, 628, 445,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9630, 87, 12, 2890, 16, 677, 16, 268, 4672, 3536, 8252, 5412, 30369, 434, 21188, 18, 7732, 13437, 63, 20, 65, 273, 7732, 63, 20, 18537, 5176, 5527, 8395, 225, 468, 588, 8555, 628, 445,...
return 1
""" EXAMPLES: sage: [sloane.A000012._eval(n) for n in range(10)] [1, 1, 1, 1, 1, 1, 1, 1, 1, 1] """ return Integer(1)
def _eval(self, n): return 1
d2510d4232e17c9cea8d1a0271c6be68a81d317b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/d2510d4232e17c9cea8d1a0271c6be68a81d317b/sloane_functions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8622, 12, 2890, 16, 290, 4672, 327, 404, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8622, 12, 2890, 16, 290, 4672, 327, 404, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
data = mem(data) if data != None: return data
if mem(data) == HANDLED: break
def executeHandler(self, data): """ Executes a callback chain on a given piece of data. This data could be a string or an object. Consult the documentation for the specific callback chain you're executing.
db90d771c89073b96c5c12345e0a44ebff216485 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11836/db90d771c89073b96c5c12345e0a44ebff216485/api.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1836, 1503, 12, 2890, 16, 501, 4672, 3536, 3889, 993, 279, 1348, 2687, 603, 279, 864, 11151, 434, 501, 18, 225, 1220, 501, 3377, 506, 279, 533, 578, 392, 733, 18, 225, 11020, 406, 326,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1836, 1503, 12, 2890, 16, 501, 4672, 3536, 3889, 993, 279, 1348, 2687, 603, 279, 864, 11151, 434, 501, 18, 225, 1220, 501, 3377, 506, 279, 533, 578, 392, 733, 18, 225, 11020, 406, 326,...
assert getattr(stateBitmaps, "normal", None) is not None, "invalid state '" + inStateName + "' is missing 'normal' bitmap"
assert getattr(stateBitmaps, "normal", None) is not None, \ "invalid state '" + self.currentState + "' is missing 'normal' bitmap"
def _RolloverFinish(self, event): """ Return the button to its non-rollover state. """ if self.IsEnabled(): stateBitmaps = self.bitmapCache[self.currentState] # only do all this if there was actually a rollover if getattr(stateBitmaps, "rollover", None) is not None: assert getattr(stateBitmaps, "normal", None) is not None, "invalid state '" + inStateName + "' is missing 'normal' bitmap" self.SetBitmapLabel(stateBitmaps.normal) self.Refresh() # will the app need this call to Update? self.Update()
b0b7312bd50d61e01ca8df57043385699557d59b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9228/b0b7312bd50d61e01ca8df57043385699557d59b/MultiStateButton.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4984, 21896, 11641, 12, 2890, 16, 871, 4672, 3536, 2000, 326, 3568, 358, 2097, 1661, 17, 922, 21896, 919, 18, 3536, 309, 365, 18, 2520, 1526, 13332, 919, 5775, 10711, 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, 389, 4984, 21896, 11641, 12, 2890, 16, 871, 4672, 3536, 2000, 326, 3568, 358, 2097, 1661, 17, 922, 21896, 919, 18, 3536, 309, 365, 18, 2520, 1526, 13332, 919, 5775, 10711, 273, 365, 18, ...
def __init__(self, *args, **kwargs): if args: if isinstance(args[0], basestring): self.raw_text = args[0] else: self.raw_text = "\n".join(args[0]) args = (self.raw_text,) + args[1:] _multivalued.__init__(self, *args, **kwargs)
def __init__(self, *args, **kwargs): try: sequence = args[0] except IndexError: sequence = kwargs.get("sequence", None)
fbc257eee0c448f7ab397dbf793b4880b6ab79a8 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12282/fbc257eee0c448f7ab397dbf793b4880b6ab79a8/deb822.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 380, 1968, 16, 2826, 4333, 4672, 775, 30, 3102, 273, 833, 63, 20, 65, 1335, 10195, 30, 3102, 273, 1205, 18, 588, 2932, 6178, 3113, 599, 13, 2, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 380, 1968, 16, 2826, 4333, 4672, 775, 30, 3102, 273, 833, 63, 20, 65, 1335, 10195, 30, 3102, 273, 1205, 18, 588, 2932, 6178, 3113, 599, 13, 2, -100, -1...
if not raw_data.startswith("<?xml"):
if not raw_data.startswith("<?xml") and not raw_data.startswith("STP/1"):
def send_command(self): """send a command to scope""" raw_data = self.raw_post_data if scope.version == "stp-1": args = self.arguments """ message type: 1 = command, 2 = response, 3 = event, 4 = error message TransportMessage { required string service = 1; required uint32 commandID = 2; required uint32 format = 3; optional uint32 status = 4; optional uint32 tag = 5; optional uint32 clientID = 6; optional string uuid = 7; required binary payload = 8; } /send-command/" + service + "/" + command_id + "/" + tag """ scope.sendCommand({ 0: 1, # message type 1: args[0], 2: int(args[1]), 3: 1, 5: int(args[2]), 8: self.raw_post_data }) else: service = self.arguments[0] if not raw_data.startswith("<?xml"): raw_data = XML_PRELUDE % raw_data msg = "%s %s" % (service, raw_data.decode('UTF-8')) if scope.services_enabled[service]: scope.sendCommand(msg) else: scope.commands_waiting[service].append(msg) self.out_buffer += self.RESPONSE_OK_OK % getTimestamp() self.timeout = 0
773fbe44e33764693f40b6dcadd4b5120b081f1e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10923/773fbe44e33764693f40b6dcadd4b5120b081f1e/HTTPScopeInterface.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 67, 3076, 12, 2890, 4672, 3536, 4661, 279, 1296, 358, 2146, 8395, 1831, 67, 892, 273, 365, 18, 1899, 67, 2767, 67, 892, 309, 2146, 18, 1589, 422, 315, 20355, 17, 21, 6877, 833, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 67, 3076, 12, 2890, 4672, 3536, 4661, 279, 1296, 358, 2146, 8395, 1831, 67, 892, 273, 365, 18, 1899, 67, 2767, 67, 892, 309, 2146, 18, 1589, 422, 315, 20355, 17, 21, 6877, 833, ...
def __exc_info(self):
def _exc_info(self):
def __exc_info(self): """Return a version of sys.exc_info() with the traceback frame minimised; usually the top level of the traceback frame is not needed. """ exctype, excvalue, tb = sys.exc_info() if sys.platform[:4] == 'java': ## tracebacks look different in Jython return (exctype, excvalue, tb) return (exctype, excvalue, tb)
75ecd8e0d687dfdcd2d80ec6d2e0349454779b1f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/75ecd8e0d687dfdcd2d80ec6d2e0349454779b1f/unittest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 10075, 67, 1376, 12, 2890, 4672, 3536, 990, 279, 1177, 434, 2589, 18, 10075, 67, 1376, 1435, 598, 326, 10820, 2623, 18172, 5918, 31, 11234, 326, 1760, 1801, 434, 326, 10820, 2623, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 10075, 67, 1376, 12, 2890, 4672, 3536, 990, 279, 1177, 434, 2589, 18, 10075, 67, 1376, 1435, 598, 326, 10820, 2623, 18172, 5918, 31, 11234, 326, 1760, 1801, 434, 326, 10820, 2623, 3...
0.78539816339744828
0.785398163397448
def argument(self): r""" The argument (angle) of the complex number, normalized so that $-\pi < \theta \leq \pi$.
0f85c81e959512e75d1c3f66db056b379125ea81 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9890/0f85c81e959512e75d1c3f66db056b379125ea81/complex_number.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1237, 12, 2890, 4672, 436, 8395, 1021, 1237, 261, 4341, 13, 434, 326, 7233, 1300, 16, 5640, 1427, 716, 271, 6943, 7259, 411, 521, 14482, 521, 298, 85, 521, 7259, 8, 18, 2, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1237, 12, 2890, 4672, 436, 8395, 1021, 1237, 261, 4341, 13, 434, 326, 7233, 1300, 16, 5640, 1427, 716, 271, 6943, 7259, 411, 521, 14482, 521, 298, 85, 521, 7259, 8, 18, 2, -100, -100, ...
if not skip_known_failures: self.assertRaisesCOMError(disp.GetIDsOfNames, 0, 'expando', hresult=winerror.DISP_E_UNKNOWNNAME) self.parseScriptText(code) disp.GetIDsOfNames(0, 'expando')
self.assertRaisesCOMError(disp.GetIDsOfNames, 0, 'expando', hresult=winerror.DISP_E_UNKNOWNNAME) self.parseScriptText(code) lcid = 0 dispid = disp.GetIDsOfNames(lcid, 'expando') ret = disp.Invoke(dispid, lcid, pythoncom.DISPATCH_PROPERTYGET, True) self.failUnlessEqual(ret, 'hello') def testCreateExpando(self): disp = self.site.engine_script.GetScriptDispatch('test') disp = disp.QueryInterface(pythoncom.IID_IDispatchEx) self.assertRaisesCOMError(disp.GetIDsOfNames, 0, 'expando', hresult=winerror.DISP_E_UNKNOWNNAME) lcid = 0 dispid = disp.GetDispID('expando', pythoncom.fdexNameEnsure) ret = disp.Invoke(dispid, lcid, pythoncom.DISPATCH_PROPERTYGET, True) self.failUnlessEqual(ret, None) disp.Invoke(dispid, lcid, pythoncom.DISPATCH_PROPERTYPUT, False, 'hello') ret = disp.Invoke(dispid, lcid, pythoncom.DISPATCH_PROPERTYGET, True) self.failUnlessEqual(ret, 'hello') def testDispatchCall(self): code = "function f(arg) { return 'hello ' + arg}; test.expando_func = f;" disp = self.site.engine_script.GetScriptDispatch('test') self.assertRaisesCOMError(disp.GetIDsOfNames, 0, 'expando', hresult=winerror.DISP_E_UNKNOWNNAME) self.parseScriptText(code) lcid = 0 dispid = disp.GetIDsOfNames(lcid, 'expando_func') ret = disp.Invoke(dispid, lcid, pythoncom.DISPATCH_METHOD, True, 'Mark') self.failUnlessEqual(ret, 'hello Mark')
def testDispatchSimple(self): code = "var expando = 'hello'" disp = self.site.engine_script.GetScriptDispatch(None) # name should not exist. if not skip_known_failures: self.assertRaisesCOMError(disp.GetIDsOfNames, 0, 'expando', hresult=winerror.DISP_E_UNKNOWNNAME) # Now execute the script code, which will define the name self.parseScriptText(code) disp.GetIDsOfNames(0, 'expando')
55b25e0f5d9dc05a88006fb263d2d359b9b6608b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/13395/55b25e0f5d9dc05a88006fb263d2d359b9b6608b/testEngine.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 5325, 5784, 12, 2890, 4672, 981, 273, 315, 1401, 4542, 83, 273, 296, 23711, 4970, 16232, 273, 365, 18, 4256, 18, 8944, 67, 4263, 18, 967, 3651, 5325, 12, 7036, 13, 468, 508, 1410...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 5325, 5784, 12, 2890, 4672, 981, 273, 315, 1401, 4542, 83, 273, 296, 23711, 4970, 16232, 273, 365, 18, 4256, 18, 8944, 67, 4263, 18, 967, 3651, 5325, 12, 7036, 13, 468, 508, 1410...
conf = IniFile({'global':{}})
conf = IniFile({'global':{'autoconnect':[]}})
def print_section(self,section): print "[%s]" % section for var in self.conf[section]: print "%s = %s" % (var, self.conf[section][var])
300b6af2da9d6050ff22095a1ba55dff72615c9e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10542/300b6af2da9d6050ff22095a1ba55dff72615c9e/upgrade.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1172, 67, 3464, 12, 2890, 16, 3464, 4672, 1172, 30048, 87, 4279, 738, 2442, 364, 569, 316, 365, 18, 3923, 63, 3464, 14542, 1172, 2213, 87, 273, 738, 87, 6, 738, 261, 1401, 16, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1172, 67, 3464, 12, 2890, 16, 3464, 4672, 1172, 30048, 87, 4279, 738, 2442, 364, 569, 316, 365, 18, 3923, 63, 3464, 14542, 1172, 2213, 87, 273, 738, 87, 6, 738, 261, 1401, 16, 365, 1...
""" {% months_with_news 4 as months %} """ bits = token.split_contents() if len(bits) == 3: limit = None elif len(bits) == 4: try: limit = abs(int(bits[1])) except ValueError: raise template.TemplateSyntaxError("If provided, second argument to `months_with_news` must be a positive whole number.") if bits[-2].lower() != 'as': raise template.TemplateSyntaxError("Missing 'as' from 'months_with_news' template tag. Format is {% months_with_news 5 as months %}.") return MonthNode(bits[-1], limit=limit)
""" {% months_with_news 4 as months %} """ bits = token.split_contents() if len(bits) == 3: limit = None elif len(bits) == 4: try: limit = abs(int(bits[1])) except ValueError: raise template.TemplateSyntaxError("If provided, second argument to `months_with_news` must be a positive whole number.") if bits[-2].lower() != 'as': raise template.TemplateSyntaxError("Missing 'as' from 'months_with_news' template tag. Format is {% months_with_news 5 as months %}.") return MonthNode(bits[-1], limit=limit)
def months_with_news(parser, token): """ {% months_with_news 4 as months %} """ bits = token.split_contents() if len(bits) == 3: limit = None elif len(bits) == 4: try: limit = abs(int(bits[1])) except ValueError: raise template.TemplateSyntaxError("If provided, second argument to `months_with_news` must be a positive whole number.") if bits[-2].lower() != 'as': raise template.TemplateSyntaxError("Missing 'as' from 'months_with_news' template tag. Format is {% months_with_news 5 as months %}.") return MonthNode(bits[-1], limit=limit)
2d3c8ed0ed7c2f6a9f8202b37fc595f1f8bfb7d6 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2484/2d3c8ed0ed7c2f6a9f8202b37fc595f1f8bfb7d6/news_tags.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8846, 67, 1918, 67, 18443, 12, 4288, 16, 1147, 4672, 3536, 288, 9, 8846, 67, 1918, 67, 18443, 1059, 487, 8846, 738, 97, 3536, 4125, 273, 1147, 18, 4939, 67, 3980, 1435, 309, 562, 12, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8846, 67, 1918, 67, 18443, 12, 4288, 16, 1147, 4672, 3536, 288, 9, 8846, 67, 1918, 67, 18443, 1059, 487, 8846, 738, 97, 3536, 4125, 273, 1147, 18, 4939, 67, 3980, 1435, 309, 562, 12, ...
return "%s/published/patches.xml" % ROOT
if distro is None or source is None: return "%s/published/patches.xml" % ROOT else: return "%s/patches.xml" % patch_directory(distro, source) def diff_rss_file(distro=None, source=None): """Return the location of the diff rss feed.""" if distro is None or source is None: return "%s/diffs/patches.xml" % ROOT else: return "%s/patches.xml" % diff_directory(distro, source)
def patch_rss_file(): """Return the location of the patch rss feed.""" return "%s/published/patches.xml" % ROOT
25611a3aa48a730f0d474ca7140e900048fc7433 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1955/25611a3aa48a730f0d474ca7140e900048fc7433/momlib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4729, 67, 25151, 67, 768, 13332, 3536, 990, 326, 2117, 434, 326, 4729, 18817, 4746, 12123, 309, 27450, 353, 599, 578, 1084, 353, 599, 30, 327, 2213, 87, 19, 12614, 19, 30278, 18, 2902, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4729, 67, 25151, 67, 768, 13332, 3536, 990, 326, 2117, 434, 326, 4729, 18817, 4746, 12123, 309, 27450, 353, 599, 578, 1084, 353, 599, 30, 327, 2213, 87, 19, 12614, 19, 30278, 18, 2902, ...
self.tk.call(self._w, 'configure')):
self.tk.call(_flatten((self._w, cmd)))):
def configure(self, cnf=None, **kw): """Configure resources of a widget.
6ce1315bd35b6114abf8a59d0e9b9f7dce0bcd7d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/6ce1315bd35b6114abf8a59d0e9b9f7dce0bcd7d/Tkinter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5068, 12, 2890, 16, 23118, 33, 7036, 16, 2826, 9987, 4672, 3536, 11207, 2703, 434, 279, 3604, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 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, 5068, 12, 2890, 16, 23118, 33, 7036, 16, 2826, 9987, 4672, 3536, 11207, 2703, 434, 279, 3604, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
list, messages = self.pimpinstaller.prepareInstall(pkg, force, recursive)
pimpinstaller = pimp.PimpInstaller(self.pimpdb) list, messages = pimpinstaller.prepareInstall(pkg, force, recursive)
def installpackage(self, sel, output, recursive, force): pkg = self.packages[sel] list, messages = self.pimpinstaller.prepareInstall(pkg, force, recursive) if messages: return messages messages = self.pimpinstaller.install(list, output) return messages
40b2e839246aa74f08eea1c2abb60e5ca93ecab0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/40b2e839246aa74f08eea1c2abb60e5ca93ecab0/PackageManager.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3799, 5610, 12, 2890, 16, 357, 16, 876, 16, 5904, 16, 2944, 4672, 3475, 273, 365, 18, 10308, 63, 1786, 65, 293, 14532, 20163, 273, 293, 14532, 18, 52, 14532, 18678, 12, 2890, 18, 84, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3799, 5610, 12, 2890, 16, 357, 16, 876, 16, 5904, 16, 2944, 4672, 3475, 273, 365, 18, 10308, 63, 1786, 65, 293, 14532, 20163, 273, 293, 14532, 18, 52, 14532, 18678, 12, 2890, 18, 84, ...
cmd = [options.runpython[mode], os.path.join('tools', 'run_tests.py')]
cmd = options.runpython[mode][:] cmd += [os.path.join('tools', 'run_tests.py')]
def runUnitSuite(options): """ Run all unit tests in a single process >>> options = parseOptions() >>> checkOptions(options) >>> options.dryrun = True >>> options.verbose = True >>> options.modes = ['release', 'debug'] >>> runUnitSuite(options) /.../release/RunPython... tools/run_tests.py -v application i18n osaf repository - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + /.../debug/RunPython... tools/run_tests.py -v application i18n osaf repository - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + False """ failed = False for mode in options.modes: cmd = [options.runpython[mode], os.path.join('tools', 'run_tests.py')] if options.verbose: cmd += ['-v'] cmd += ['application', 'i18n', 'osaf', 'repository'] if options.params: cmd += [ options.params ] if options.verbose: log(' '.join(cmd)) if options.dryrun: result = 0 else: result = build_lib.runCommand(cmd, timeout=3600) if result != 0: log('***Error exit code=%d' % result) failed = True failedTests.append('unitSuite') if failed and not options.noStop: break log('- + ' * 15) return failed
134ce2a6ff32b988db479ade6fcf70a08aac23f5 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9228/134ce2a6ff32b988db479ade6fcf70a08aac23f5/rt.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 2802, 13587, 12, 2116, 4672, 3536, 1939, 777, 2836, 7434, 316, 279, 2202, 1207, 225, 4080, 702, 273, 1109, 1320, 1435, 4080, 866, 1320, 12, 2116, 13, 4080, 702, 18, 25011, 2681, 22...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 2802, 13587, 12, 2116, 4672, 3536, 1939, 777, 2836, 7434, 316, 279, 2202, 1207, 225, 4080, 702, 273, 1109, 1320, 1435, 4080, 866, 1320, 12, 2116, 13, 4080, 702, 18, 25011, 2681, 22...
def processRecord(self, record):
def _processRecord(self, record):
def processRecord(self, record): self.recordCount0 += 1
d74aed94337c1f0da9f3459c657963d19c6a52b5 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8937/d74aed94337c1f0da9f3459c657963d19c6a52b5/harvester.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2567, 2115, 12, 2890, 16, 1409, 4672, 365, 18, 3366, 1380, 20, 1011, 404, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2567, 2115, 12, 2890, 16, 1409, 4672, 365, 18, 3366, 1380, 20, 1011, 404, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
try: os.O_EXLOCK except AttributeError: return releaseprocesslockflock(lockname) else: return releaseprocesslocko_exlock(lockname)
return releaseprocesslockflock(lockname)
def releaseprocesslock(lockname): ostype = platform.system() if ostype == 'Windows' or ostype == 'Microsoft': return releaseprocesslockmutex(lockname) elif ostype == 'Linux' or ostype == 'Darwin' or 'BSD' in ostype: # unfortunately, it seems *NIXes differ on whether O_EXLOCK is supported try: os.O_EXLOCK except AttributeError: #print >> sys.stderr, 'Releasing flock for '+lockname return releaseprocesslockflock(lockname) else: #print >> sys.stderr, 'Releasing o_exlock for '+lockname return releaseprocesslocko_exlock(lockname) else: raise Exception, 'Unknown operating system:'+ostype
112abf4ccbc54a874cbe35ab13918bb41c65ceed /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7995/112abf4ccbc54a874cbe35ab13918bb41c65ceed/runonce.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3992, 2567, 739, 12, 739, 529, 4672, 320, 27273, 273, 4072, 18, 4299, 1435, 309, 320, 27273, 422, 296, 10399, 11, 578, 320, 27273, 422, 296, 22350, 4278, 327, 3992, 2567, 739, 29946, 12,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3992, 2567, 739, 12, 739, 529, 4672, 320, 27273, 273, 4072, 18, 4299, 1435, 309, 320, 27273, 422, 296, 10399, 11, 578, 320, 27273, 422, 296, 22350, 4278, 327, 3992, 2567, 739, 29946, 12,...
def testUpdateData(self):
def testUpdateData1(self): from bb import data from bb import data_smart
def testUpdateData(self): pass
0a2a07d6bd9d6805c4c33fdc0b99aa822367cf65 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2672/0a2a07d6bd9d6805c4c33fdc0b99aa822367cf65/datatest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 1891, 751, 21, 12, 2890, 4672, 628, 7129, 1930, 501, 628, 7129, 1930, 501, 67, 26416, 1342, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 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, 1842, 1891, 751, 21, 12, 2890, 4672, 628, 7129, 1930, 501, 628, 7129, 1930, 501, 67, 26416, 1342, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
if not location and node_type != NodeType.Mobile: raise forms.ValidationError(_("Location is required for non-mobile nodes!"))
if not location and node_type == NodeType.Mesh: raise forms.ValidationError(_("Location is required for mesh nodes!"))
def clean(self): """ Additional validation handler. """ name = self.cleaned_data.get('name') ip = self.cleaned_data.get('ip') wan_dhcp = self.cleaned_data.get('wan_dhcp') wan_ip = self.cleaned_data.get('wan_ip') wan_gw = self.cleaned_data.get('wan_gw') geo_lat = self.cleaned_data.get('geo_lat') geo_long = self.cleaned_data.get('geo_long') location = self.cleaned_data.get('location') node_type = int(self.cleaned_data.get('node_type'))
54e642cb035dfca73c1816c3798d82f8540b66d0 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11345/54e642cb035dfca73c1816c3798d82f8540b66d0/forms.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2721, 12, 2890, 4672, 3536, 15119, 3379, 1838, 18, 3536, 508, 273, 365, 18, 6200, 329, 67, 892, 18, 588, 2668, 529, 6134, 2359, 273, 365, 18, 6200, 329, 67, 892, 18, 588, 2668, 625, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2721, 12, 2890, 4672, 3536, 15119, 3379, 1838, 18, 3536, 508, 273, 365, 18, 6200, 329, 67, 892, 18, 588, 2668, 529, 6134, 2359, 273, 365, 18, 6200, 329, 67, 892, 18, 588, 2668, 625, ...
self.game.world.mouse_move(event.pos)
self.game.world.add.remove_mouseJoint()
def handleToolEvent(self,event): #look for default events, and if none are handled then try the custom events if not super(GrabTool,self).handleEvents(event): # we handle two types of "grab" depending on simulation running or not if event.type == MOUSEBUTTONDOWN: if event.button == 1: # grab the first object at the mouse pointer bodylist = self.game.world.get_bodies_at_pos(event.pos, include_static=False) if bodylist and len(bodylist) > 0: if self.game.world.run_physics: self.game.world.add.mouseJoint(bodylist[0], event.pos) else: self._current_body = bodylist[0] elif event.type == MOUSEBUTTONUP: # let it go if event.button == 1: if self.game.world.run_physics: self.game.world.add.remove_mouseJoint() else: self._current_body = None elif event.type == MOUSEMOTION and event.buttons[0]: # move it around if self.game.world.run_physics: # use box2D mouse motion self.game.world.mouse_move(event.pos) else: # position directly (if we have a current body) if self._current_body is not None: x, y = self.game.world.to_world(event.pos) x /= self.game.world.ppm y /= self.game.world.ppm self._current_body.position = (x, y)
9167e5a85dc90b86f593eab2860735e79955c88d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7607/9167e5a85dc90b86f593eab2860735e79955c88d/tools.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 6364, 1133, 12, 2890, 16, 2575, 4672, 468, 7330, 364, 805, 2641, 16, 471, 309, 6555, 854, 7681, 1508, 775, 326, 1679, 2641, 309, 486, 2240, 12, 14571, 70, 6364, 16, 2890, 2934, 4...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 6364, 1133, 12, 2890, 16, 2575, 4672, 468, 7330, 364, 805, 2641, 16, 471, 309, 6555, 854, 7681, 1508, 775, 326, 1679, 2641, 309, 486, 2240, 12, 14571, 70, 6364, 16, 2890, 2934, 4...
for nom in noms[item]:
for nom in noms[item]:
def initMappers(self): """ Initialize all SQLalchemy mappers needed for the inventory database """ self.table = {} self.klass = {}
3627a91097eeb6b6560ab9a081db2477a801ccbc /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5988/3627a91097eeb6b6560ab9a081db2477a801ccbc/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1208, 863, 10422, 12, 2890, 4672, 3536, 9190, 777, 3063, 24182, 852, 10422, 3577, 364, 326, 13086, 2063, 3536, 365, 18, 2121, 273, 2618, 365, 18, 22626, 273, 2618, 2, 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, 1208, 863, 10422, 12, 2890, 4672, 3536, 9190, 777, 3063, 24182, 852, 10422, 3577, 364, 326, 13086, 2063, 3536, 365, 18, 2121, 273, 2618, 365, 18, 22626, 273, 2618, 2, -100, -100, -100, -...
for keyvalue in options._extra_options: try: key, value = keyvalue.split('=') except ValueError: parser.error('--option must be in the format <key>=<value> (not %r)' % (keyvalue,)) options_dict[key] = value
if options._extra_options is not None: for keyvalue in options._extra_options: try: key, value = keyvalue.split('=') except ValueError: parser.error('--option must be in the format <key>=<value> (not %r)' % (keyvalue,)) options_dict[key] = value
def main(): """implement an useful main for use as command line program""" import sys import optparse import os.path parser = optparse.OptionParser( usage = "%prog [options] [file]", version = """\
a88512024da2fdef6f17df756ff7247df9f8d59c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1203/a88512024da2fdef6f17df756ff7247df9f8d59c/aafigure.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 3536, 10442, 392, 5301, 2774, 364, 999, 487, 1296, 980, 5402, 8395, 1930, 2589, 1930, 2153, 2670, 1930, 1140, 18, 803, 225, 2082, 273, 2153, 2670, 18, 1895, 2678, 12, 4084, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2774, 13332, 3536, 10442, 392, 5301, 2774, 364, 999, 487, 1296, 980, 5402, 8395, 1930, 2589, 1930, 2153, 2670, 1930, 1140, 18, 803, 225, 2082, 273, 2153, 2670, 18, 1895, 2678, 12, 4084, ...
[2, 3, 5]
[2, 3, 5, 23]
def bound_kato(self): r""" Returns a list `p` of primes such that the theorems of Kato's [Ka] and others (e.g., as explained in a paper/thesis of Grigor Grigorov [Gri]) imply that if `p` divides the order of Sha(E) then `p` is in the list.
1f9a9ac925d4e3e0abde7a3cddc48eb48dc2be90 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/1f9a9ac925d4e3e0abde7a3cddc48eb48dc2be90/sha_tate.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2489, 67, 79, 31093, 12, 2890, 4672, 436, 8395, 2860, 279, 666, 1375, 84, 68, 434, 846, 4485, 4123, 716, 326, 326, 479, 959, 434, 1475, 31093, 1807, 306, 47, 69, 65, 471, 10654, 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, 2489, 67, 79, 31093, 12, 2890, 4672, 436, 8395, 2860, 279, 666, 1375, 84, 68, 434, 846, 4485, 4123, 716, 326, 326, 479, 959, 434, 1475, 31093, 1807, 306, 47, 69, 65, 471, 10654, 261, ...
self.assertEquals(read_val, "sub_key", "Read subkey value wrong")
self.assertEquals(read_val, subkeystr, "Read subkey value wrong")
def ReadTestData(self, root_key): # Check we can get default value for this key. val = QueryValue(root_key, test_key_name) self.assertEquals(val, "Default value", "Registry didn't give back the correct value")
f3eb94a6b1ba946a780f9bec3f012f5a68326881 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3187/f3eb94a6b1ba946a780f9bec3f012f5a68326881/test_winreg.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2720, 4709, 751, 12, 2890, 16, 1365, 67, 856, 4672, 468, 2073, 732, 848, 336, 805, 460, 364, 333, 498, 18, 1244, 273, 2770, 620, 12, 3085, 67, 856, 16, 1842, 67, 856, 67, 529, 13, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2720, 4709, 751, 12, 2890, 16, 1365, 67, 856, 4672, 468, 2073, 732, 848, 336, 805, 460, 364, 333, 498, 18, 1244, 273, 2770, 620, 12, 3085, 67, 856, 16, 1842, 67, 856, 67, 529, 13, ...
Return the Lin matrix. If no length is provided the standard state space size is used. The key schedule calls this method with an explicit length argument because only self.r S-Box applications are performed in the key schedule. INPUT: - ``length`` - length of state space. (default: None)
Return the ``Lin`` matrix. If no ``length`` is provided the standard state space size is used. The key schedule calls this method with an explicit length argument because only ``self.r`` S-Box applications are performed in the key schedule. INPUT: - ``length`` - length of state space. (default: ``None``)
def lin_matrix(self, length=None): """ Return the Lin matrix. If no length is provided the standard state space size is used. The key schedule calls this method with an explicit length argument because only self.r S-Box applications are performed in the key schedule. INPUT: - ``length`` - length of state space. (default: None) EXAMPLE:: sage: sr = mq.SR(1, 1, 1, 4, gf2=True) sage: sr.lin_matrix() [1 0 1 1] [1 1 0 1] [1 1 1 0] [0 1 1 1] """ r, c, e = self.r, self.c, self.e
f145241e51a69266a2640a052ee008637b5d9160 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/f145241e51a69266a2640a052ee008637b5d9160/sr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4739, 67, 5667, 12, 2890, 16, 769, 33, 7036, 4672, 3536, 2000, 326, 12176, 48, 267, 10335, 3148, 18, 225, 971, 1158, 12176, 2469, 10335, 353, 2112, 326, 4529, 919, 3476, 963, 353, 1399, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4739, 67, 5667, 12, 2890, 16, 769, 33, 7036, 4672, 3536, 2000, 326, 12176, 48, 267, 10335, 3148, 18, 225, 971, 1158, 12176, 2469, 10335, 353, 2112, 326, 4529, 919, 3476, 963, 353, 1399, ...
time = wsite.server_time() - timedelta(minutes=timeoffset_variable) offset_variable = int(time.strftime("%Y%m%d%H%M%S"))
now = wsite.server_time() - timedelta(minutes=timeoffset_variable) offset_variable = int(now.strftime("%Y%m%d%H%M%S"))
def main(settingsBot): # Taking the messages inside the function namespace. global netext, summary, logbook, summary2, report_page, project_inserted global comment, bad_pag, report_text, random_sign, whitelist_pg, final_new_text_additions """ 0 1 2 3 4 5 6 7 8 9 10 11 Returned tuple: (None, ask, filename, fileOption, fileSignName, filter_wp, limit, log_variable, number, numberlog, offset_variable, random, (mainSettings()) 12 13 14 15 recursive, savedata, sign, time_variable) """ # Loading the option of the mainSettings() ask = settingsBot[1] filename = settingsBot[2] fileOption = settingsBot[3] fileSignName = settingsBot[4] filter_wp = settingsBot[5] limit = settingsBot[6] log_variable = settingsBot[7] number = settingsBot[8] numberlog = settingsBot[9] offset_variable = settingsBot[10] random = settingsBot[11] recursive = settingsBot[12] savedata = settingsBot[13] sign = settingsBot[14] time_variable = settingsBot[15] timeoffset_variable = settingsBot[16] # The site wsite = wikipedia.getSite() # The follow lines translate the language's parameters. welcomer = wikipedia.translate(wsite, netext) summ = wikipedia.translate(wsite, summary) logg = wikipedia.translate(wsite, logbook) summ2 = wikipedia.translate(wsite, summary2) rep_page = wikipedia.translate(wsite, report_page) com = wikipedia.translate(wsite, comment) bad_page = wikipedia.translate(wsite, bad_pag) rep_text = wikipedia.translate(wsite, report_text) signPageTitle = wikipedia.translate(wsite, random_sign) wtlpg = wikipedia.translate(wsite, whitelist_pg) final_additions = wikipedia.translate(wsite, final_new_text_additions) usernam = wsite.namespace(2) contrib = string.capitalize(wsite.mediawiki_message('contribslink')) # The talk_page's variable gives "Talk page". talk_page = wsite.namespace(3) talk = '%s:' % urlname(talk_page, wsite) # Some project of the same language, have different settings. (this is the place to add them). if wsite.family.name == "wikinews" and wsite.lang == "it": welcomer = u'{{subst:benvenuto|%s}}' sign = 'Tooby' elif wsite.family.name == "wiktionary" and wsite.lang == "it": welcomer = u'{{subst:Utente:Filnik/Benve|nome={{subst:PAGENAME}}}} %s' elif wsite.family.name == "wikiversity" and wsite.lang == "it": welcomer = u'{{subst:Benvenuto}} %s' welcomed_users = list() if savedata == True and os.path.exists( wikipedia.config.datafilepath(filename)): f = file(filename) number_user = cPickle.load(f) yield number_user else: number_user = 0 yield number_user # Here there is the main loop. while True: if filter_wp == True: # A standard list of bad username components (you can change/delate it in your project...). # [ I divided the list into three to make it smaller...] elencoaf = [' ano', ' anus', 'anal ', 'babies', 'baldracca', 'balle', 'bastardo', 'bestiali', 'bestiale', 'bastarda', 'b.i.t.c.h.', 'bitch', 'boobie', 'bordello', 'breast', 'cacata', 'cacca', 'cachapera', 'cagata', 'cane', 'cazz', 'cazzo', 'cazzata', 'chiavare', 'chiavata', 'chick', 'christ ', 'cristo', 'clitoride', 'coione', 'cojdioonear', 'cojones', 'cojo', 'coglione', 'coglioni', 'cornuto', 'cula', 'culatone', 'culattone', 'culo', 'deficiente', 'deficente', 'dio', 'die ', 'died ', 'ditalino', 'ejackulate', 'enculer', 'eroticunt', 'fanculo', 'fellatio', 'fica ', 'ficken', 'figa', 'sfiga', 'fottere', 'fotter', 'fottuto', 'fuck', 'f.u.c.k.', "funkyass"] elencogz = ['gay', 'hentai.com', 'horne', 'horney', 'virgin', 'hotties', 'idiot', '@alice.it', 'incest', 'jesus', 'gesu', 'gesù', 'kazzo', 'kill', 'leccaculo', 'lesbian', 'lesbica', 'lesbo', 'masturbazione', 'masturbare', 'masturbo', 'merda', 'merdata', 'merdoso', 'mignotta', 'minchia', 'minkia', 'minchione', 'mona', 'nudo', 'nuda', 'nudi', 'oral', 'sex', 'orgasmso', 'porc', 'pompa', 'pompino', 'porno', 'puttana', 'puzza', 'puzzone', "racchia", 'sborone', 'sborrone', 'sborata', 'sborolata', 'sboro', 'scopata', 'scopare', 'scroto', 'scrotum', 'sega', 'sesso', 'shit', 'shiz', 's.h.i.t.', 'sadomaso', 'sodomist', 'stronzata', 'stronzo', 'succhiamelo', 'succhiacazzi', 'testicol', 'troia', 'universetoday.net', 'vaffanculo', 'vagina', 'vibrator', "vacca", 'yiddiot', "zoccola"] elenco_others = ['@', ".com", ".sex", ".org", ".uk", ".en", ".it", "admin", "administrator", "amministratore", '@yahoo.com', '@alice.com', "amministratrice", "burocrate", "checkuser", "developer", "http://", "jimbo", "mediawiki", "on wheals", "on wheal", "on wheel", "planante", "razinger", "sysop", "troll", "vandal", " v.f. ", "v. fighter", "vandal f.", "vandal fighter", 'wales jimmy', "wheels", "wales", "www."] badword_page = wikipedia.Page(wsite, bad_page) if badword_page.exists(): wikipedia.output(u'\nLoading the bad words list from %s...' % wsite.hostname() ) text_bad = badword_page.get() list_loaded = load_word_function(wsite,text_bad) else: wikipedia.output(u'\t\t>>>WARNING: The bad word page doesn\'t exist!<<<') list_loaded = list() # Joining the "other things" with the loaded... elencovarie = elenco_others + list_loaded else: elencoaf = list() elencogz = list() elencovarie = list() # Joining the three lists.. elenco = elencoaf + elencogz + elencovarie if filter_wp == True: # That is the default whitelist (it contains few name because it has been improved in the latest days..). whitelist_default = ['emiliano'] if wtlpg != None: whitelist_page = wikipedia.Page(wsite, wtlpg) if whitelist_page.exists(): wikipedia.output(u'\nLoading the whitelist from %s...' % wsite.hostname() ) text_white = whitelist_page.get() list_white = load_word_function(wsite, text_white) else: wikipedia.output(u"\t\t>>>WARNING: The whitelist's page doesn't exist!<<<") list_white = list() else: wikipedia.output(u"\t\t>>>WARNING: The whitelist hasn't been setted!<<<") list_white = list() else: list_white = list() whitelist_default = list() # Join the whitelist words. whitelist = list_white + whitelist_default # List of words that the bot understands when it asks the operator for input. block = ("B", "b", "Blocco", "blocco", "block", "bloc", "Block", "Bloc", 'Report', 'report') say_hi = ("S", "s", "Saluto", "saluto", "Welcome", "welcome", 'w', 'W', 'say hi', 'Say hi', 'Hi', 'hi', 'h', 'hello', 'Hello') # think about non-wikimedia wikis. Use Site functions. URL = wsite.log_address(limit, 'newusers') if timeoffset_variable != 0: time = wsite.server_time() - timedelta(minutes=timeoffset_variable) offset_variable = int(time.strftime("%Y%m%d%H%M%S")) if offset_variable != 0: URL += "&offset=%d" % offset_variable log = wsite.getUrl(URL) wikipedia.output(u'Loading latest %s new users from %s...\n' % (limit, wsite.hostname())) # Determine which signature to use if random == True: try: wikipedia.output(u'Loading random signatures...') signList = defineSign(wsite, signPageTitle, fileSignName, fileOption) except wikipedia.NoPage: wikipedia.output(u'The list with signatures is not available... Using default signature...') random = False for found_result in parselog(wsite, log, talk, number): if found_result == None: continue # Compiling the signature to be used. if random == True: if number_user + 1 > len(signList): number_user = 0 yield number_user welcom = welcomer % signList[number_user] + timeselected # If there's something extra to add at the end of the template, add it! if final_additions != '': welcom += final_additions else: welcom = welcomer % sign username = str(found_result[0]) usertalkpage = wikipedia.Page(wsite, talk + username) baduser = False # Check if the username is composed by only numbers. try: int(username) baduser = True except ValueError: # OK, no problem pass # Check if the user has been already blocked. ki = blocked(wsite,username) if ki == True: wikipedia.output(u'%s has been blocked! Skipping...' % usertalkpage.titleWithoutNamespace()) continue # Understand if the user has a bad-username. for word in elenco: username = str(username).encode(config.console_encoding) if word.lower() in username.lower(): baduser = True if wsite.lang == 'it': final_rep = "%s%s}}" % (rep_text, word) break else: final_rep = rep_text break # Checking in the whitelist... for xy in whitelist: if xy.lower() in username.lower(): username.replace(xy, '') for word in elenco: if word.lower() in username.lower(): baduser = True break else: baduser = False break # He has a badusername, trying to report him... if baduser: while 1: if ask == True: wikipedia.output(u'%s may have an unwanted username, what shall I do?' % usertalkpage.titleWithoutNamespace()) answer = wikipedia.input(u'[B]lock or [W]elcome?') for w in block: if w in answer: if not usertalkpage.exists(): # Check if the user has been already blocked (second check). ki = blocked(wsite, username) if ki == True: wikipedia.output(u'%s has been blocked! Skipping him...' % usertalkpage.titleWithoutNamespace()) continue report(wsite, rep_page, username, com, final_rep) break else: wikipedia.output(u'The discussion page of the bad-user already exists...') running = False for w in say_hi: if w in answer: baduser = False break elif ask == False: wikipedia.output(u'%s is possibly an unwanted username. He will be reported.' % usertalkpage.titleWithoutNamespace()) if not usertalkpage.exists(): report(wsite, rep_page, username, com, final_rep) break else: wikipedia.output(u'The discussion page of the bad-user already exists...') break # He has a good username, welcome! else: if not usertalkpage.exists(): # Tring to put the welcome... try: # make non-minor edit to trigger new talk page message. usertalkpage.put(welcom, summ, minorEdit = False) welcomed_users.append(found_result) if random == True: number_user += 1 yield number_user except wikipedia.EditConflict: wikipedia.output(u'An edit conflict has occured, skipping this user.') continue else: wikipedia.output(u'%s has been already welcomed when i was loading all the users... skipping' % usertalkpage.titleWithoutNamespace()) continue # That's the log if log_variable == True and logg: if len(welcomed_users) == 1: wikipedia.output(u'One user has been welcomed.') elif len(welcomed_users) == 0: wikipedia.output(u'No users have been welcomed.') else: wikipedia.output(u'%s users have been welcomed.' % str(len(welcomed_users)) ) if len(welcomed_users) < numberlog: continue # Update the welcome log each fifth welcome message. elif len(welcomed_users) >= numberlog: logresult = logmaker(wsite, welcomed_users, logg, summ2, usernam, contrib) welcomed_users = list() if logresult == False: continue # If we haven't to report, do nothing. elif log_variable == False: pass if log_variable == True and logg and len(welcomed_users) != 0: if len(welcomed_users) == 1: wikipedia.output(u'Putting the log of the latest user...') else: wikipedia.output(u'Putting the log of the latest %d users...' % len(welcomed_users)) logresult2 = logmaker(wsite, welcomed_users, logg, summ2, usernam, contrib) welcomed_users = list() if logresult2 == False: continue # If recursive, don't exit, repeat after one hour. if recursive == True: waitstr = unicode(time_variable) if locale.getlocale()[1]: strfstr = unicode(time.strftime(u"%d %b %Y %H:%M:%S (UTC)", time.gmtime()), locale.getlocale()[1]) else: strfstr = unicode(time.strftime(u"%d %b %Y %H:%M:%S (UTC)", time.gmtime())) wikipedia.output(u'Sleeping %s seconds before rerun. %s' % (waitstr, strfstr)) time.sleep(time_variable) # If not recursive, break. elif recursive == False: yield [number_user, 'STOP']
e7fbb9c206e974504e4ed7ff4e694528ae81c259 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4404/e7fbb9c206e974504e4ed7ff4e694528ae81c259/welcome.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 4272, 6522, 4672, 468, 399, 6159, 326, 2743, 4832, 326, 445, 1981, 18, 2552, 2901, 408, 16, 4916, 16, 613, 3618, 16, 4916, 22, 16, 2605, 67, 2433, 16, 1984, 67, 6387, 329, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4272, 6522, 4672, 468, 399, 6159, 326, 2743, 4832, 326, 445, 1981, 18, 2552, 2901, 408, 16, 4916, 16, 613, 3618, 16, 4916, 22, 16, 2605, 67, 2433, 16, 1984, 67, 6387, 329, ...
mrna_dbase.execute("SELECT DISTINCT MRC_GENEID, MRC_TRANSCRIPT_NO, CDS_START, CDS_STOP " "FROM PAP.MRNA_COORDINATES, PAP.CDS_COORDINATES " "WHERE PAP.MRNA_COORDINATES.MRC_GENEID = PAP.CDS_COORDINATES.CDS_GENEID " "AND PAP.MRNA_COORDINATES.MRC_TRANSCRIPT_NO = PAP.CDS_COORDINATES.CDS_TRANSCRIPT_NO "
mrna_dbase.execute("SELECT DISTINCT CDS_GENEID, CDS_TRANSCRIPT_NO, CDS_START, CDS_STOP " "FROM PAP.CDS_COORDINATES " "WHERE CDS_GENEID IN (SELECT DISTINCT GCS_GENEID FROM PAP.GENE_COORDINATES " "WHERE GCS_TAXID IN (" + species_limit + ")) "
def _get_mrna_to_cds(dbase): """ Returns: mrna_to_cds (dict) """ # mrna_to_cds: (Dict) # key: (mrna_geneid, mrc_transcript_no) # val: [(cds_start, cds_stop), (cds_start, cds_stop), ...] mrna_to_cds = {} print "Populating: mrna_to_cds" mrna_dbase = dbase.cursor() mrna_dbase.execute("SELECT DISTINCT MRC_GENEID, MRC_TRANSCRIPT_NO, CDS_START, CDS_STOP " "FROM PAP.MRNA_COORDINATES, PAP.CDS_COORDINATES " "WHERE PAP.MRNA_COORDINATES.MRC_GENEID = PAP.CDS_COORDINATES.CDS_GENEID " "AND PAP.MRNA_COORDINATES.MRC_TRANSCRIPT_NO = PAP.CDS_COORDINATES.CDS_TRANSCRIPT_NO " "ORDER BY CDS_START") for row in SQLGenerator(mrna_dbase): assert(row[2] < row[3] + 1) # Start < Stop + 1 mrna_to_cds.setdefault((row[0], row[1]), []).append((row[2], row[3])) mrna_dbase.close() print "Populated.\n" return mrna_to_cds
b850fb892724b1943780db181408ec0a356cd4f5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12607/b850fb892724b1943780db181408ec0a356cd4f5/scan.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 21387, 6582, 67, 869, 67, 71, 2377, 12, 1966, 448, 4672, 3536, 2860, 30, 9752, 6582, 67, 869, 67, 71, 2377, 261, 1576, 13, 3536, 468, 9752, 6582, 67, 869, 67, 71, 2377,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 21387, 6582, 67, 869, 67, 71, 2377, 12, 1966, 448, 4672, 3536, 2860, 30, 9752, 6582, 67, 869, 67, 71, 2377, 261, 1576, 13, 3536, 468, 9752, 6582, 67, 869, 67, 71, 2377,...
self.variable.set(default)
def __init__(self, master=None, label='Font', default='Helvetica', help=''): """Create a widget that opens a font chooser dialog. master: Tkinter widget that will contain this Font label: Text label for the font default: Default font help: Help text to show in a tooltip """ Control.__init__(self, master, str, help) self.label = tk.Label(self, text=label) self.label.pack(side='left') self.button = tk.Button(self, textvariable=self.variable, command=self.choose) self.button.pack(side='left', padx=8) self.variable.set(default)
ac756e9bfa740df0ff497bc9bb0b414d357eefc4 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4675/ac756e9bfa740df0ff497bc9bb0b414d357eefc4/meta.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 4171, 33, 7036, 16, 1433, 2218, 5711, 2187, 805, 2218, 44, 292, 90, 7943, 69, 2187, 2809, 2218, 11, 4672, 3536, 1684, 279, 3604, 716, 10400, 279, 3512, 5...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 4171, 33, 7036, 16, 1433, 2218, 5711, 2187, 805, 2218, 44, 292, 90, 7943, 69, 2187, 2809, 2218, 11, 4672, 3536, 1684, 279, 3604, 716, 10400, 279, 3512, 5...
cache[key] = weakref.ref(K)
cache[key] = K
def FiniteField(order, name=None, modulus=None, names=None, elem_cache=False, check_irreducible=True, *args, **kwds): """ Return the globally unique finite field of given order with generator labeled by the given name and possibly with given modulus. INPUT: order -- int name -- string; must be specified if not a prime field modulus -- (optional) defining polynomial for field, i.e., generator of the field will be a root of this polynomial; if not specified the choice of definining polynomials can be arbitrary. elem_cache -- cache all elements to avoid creation time (default: order<500) check_irreducible -- verify that the polynomial modulus is irreducible args -- additional parameters passed to finite field implementations kwds -- additional keyword parameters passed to finite field implementations ALIAS: You can also use GF instead of FiniteField -- they are identical. EXAMPLES: sage: k.<a> = FiniteField(9); k Finite Field in a of size 3^2 sage: parent(a) Finite Field in a of size 3^2 sage: charpoly(a, 'y') y^2 + 2*y + 2 sage: F.<x> = GF(5)[] sage: K.<a> = GF(5**5, name='a', modulus=x^5 - x +1 ) sage: f = K.modulus(); f x^5 + 4*x + 1 sage: type(f) <type 'sage.rings.polynomial.polynomial_modn_dense_ntl.Polynomial_dense_mod_p'> The modulus must be irreducible: sage: K.<a> = GF(5**5, name='a', modulus=x^5 - x ) Traceback (most recent call last): ... ValueError: finite field modulus must be irreducible but it is not You can't accidently fool the constructor into thinking the modulus is irreducible when it isn't mod p, since it actually tests irreducibility modulo p. sage: F.<x> = QQ[] sage: factor(x^5+2) x^5 + 2 sage: K.<a> = GF(5**5, name='a', modulus=x^5 + 2 ) Traceback (most recent call last): ... ValueError: finite field modulus must be irreducible but it is not If you wish to live dangerously, you can tell the constructor not to test irreducibility using check_irreducible=False, but this can easily lead to crashes and hangs -- so do not do it unless you know that the modulus really is irreducible! sage: F.<x> = GF(5)[] sage: K.<a> = GF(5**2, name='a', modulus=x^2 + 2, check_irreducible=False) For example, you may print finite field elements as integers. This currently only works if the order of field is $<2^{16}$, though. sage: k.<a> = GF(2^8,repr='int') sage: a 2 The order of a finite field must be a prime power: sage: GF(100) Traceback (most recent call last): ... ValueError: order of finite field must be a prime power Finite fields with random modulus are not cached: sage: k.<a> = GF(2^17,modulus='random') sage: n.<a> = GF(2^17,modulus='random') sage: n is k False """ if not names is None: name = names order = int(order) name = normalize_names(1,name) if elem_cache is None: elem_cache = order < 500 key = (order, name, modulus, str([args, kwds])) if modulus != 'random' and cache.has_key(key): K = cache[key]() if not K is None: return K if arith.is_prime(order): from finite_field_prime_modn import FiniteField_prime_modn K = FiniteField_prime_modn(order,*args,**kwds) else: if not arith.is_prime_power(order): raise ValueError, "order of finite field must be a prime power" if check_irreducible and polynomial_element.is_Polynomial(modulus): if modulus.parent().base_ring().characteristic() == 0: p = arith.factor(order)[0][0] modulus = modulus.change_ring(FiniteField(p)) if not modulus.is_irreducible(): raise ValueError, "finite field modulus must be irreducible but it is not" if name is None: raise TypeError, "you must specify the generator name" if order < zech_log_bound: # DO *NOT* use for prime subfield, since that would lead to # a circular reference in the call to ParentWithGens in the # __init__ method. K = FiniteField_givaro(order, name, modulus, cache=elem_cache, *args,**kwds) else: if integer.Integer(order).factor()[0][0] == 2: from finite_field_ntl_gf2e import FiniteField_ntl_gf2e K = FiniteField_ntl_gf2e(order, name, modulus, *args, **kwds) else: from finite_field_ext_pari import FiniteField_ext_pari K = FiniteField_ext_pari(order, name, modulus, *args, **kwds) if modulus != 'random': cache[key] = weakref.ref(K) return K
333d670584f443f05b200a36f5493eb597e484d4 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/333d670584f443f05b200a36f5493eb597e484d4/finite_field.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9458, 1137, 974, 12, 1019, 16, 508, 33, 7036, 16, 24770, 33, 7036, 16, 1257, 33, 7036, 16, 3659, 67, 2493, 33, 8381, 16, 866, 67, 481, 1118, 5286, 1523, 33, 5510, 16, 380, 1968, 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, 9458, 1137, 974, 12, 1019, 16, 508, 33, 7036, 16, 24770, 33, 7036, 16, 1257, 33, 7036, 16, 3659, 67, 2493, 33, 8381, 16, 866, 67, 481, 1118, 5286, 1523, 33, 5510, 16, 380, 1968, 16, ...
sage: sage_getsource(sage.misc.sageinspect.sage_getfile)[4:]
sage: sage_getsource(sagenb.misc.sageinspect.sage_getfile)[4:]
... def __init__(self):
4d25713f8b0421c8ec86dac00f7ab1999549be38 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11792/4d25713f8b0421c8ec86dac00f7ab1999549be38/sageinspect.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1372, 377, 1652, 1001, 2738, 972, 12, 2890, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1372, 377, 1652, 1001, 2738, 972, 12, 2890, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
duration, duration_per, location
duration, duration_per, location_id
def loadOperations(cursor): print 'Importing operations...' cnt = 0 starttime = time() x = [ header, '<operations>' ] cursor.execute(''' SELECT name, fence, pretime, posttime, sizeminimum, sizemultiple, type, duration, duration_per, location FROM operation ''') for i, j, k, l, m, n, p, q, r, s in cursor.fetchall(): cnt += 1 if p: x.append('<operation name=%s xsi:type="%s">' % (quoteattr(i),p)) else: x.append('<operation name=%s>' % quoteattr(i)) if j: x.append('<fence>PT%sS</fence>' % int(j)) if k: x.append('<pretime>PT%sS</pretime>' % int(k)) if l: x.append('<posttime>PT%sS</posttime>' % int(l)) if m: x.append('<size_minimum>%d</size_minimum>' % m) if n: x.append('<size_multiple>%d</size_multiple>' % n) if q: x.append('<duration>PT%sS</duration>' % int(q)) if r: x.append('<duration_per>PT%sS</duration_per>' % int(r)) if s: x.append('<location name="%s"/>' % quoteattr(s)) x.append('</operation>') x.append('</operations></plan>') frepple.readXMLdata('\n'.join(x).encode('utf-8','ignore'),False,False) print 'Loaded %d operations in %.2f seconds' % (cnt, time() - starttime)
cdf87a24ff30a9033e904cfd843a808134232b75 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8604/cdf87a24ff30a9033e904cfd843a808134232b75/load.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1262, 9343, 12, 9216, 4672, 1172, 296, 5010, 310, 5295, 7821, 7599, 273, 374, 23437, 273, 813, 1435, 619, 273, 306, 1446, 16, 2368, 17542, 1870, 308, 3347, 18, 8837, 2668, 6309, 9111, 50...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1262, 9343, 12, 9216, 4672, 1172, 296, 5010, 310, 5295, 7821, 7599, 273, 374, 23437, 273, 813, 1435, 619, 273, 306, 1446, 16, 2368, 17542, 1870, 308, 3347, 18, 8837, 2668, 6309, 9111, 50...
block = self.parentBlock while block is not None and not block.eventBoundary: block = block.parentBlock if block:
block = self while block is not None:
def show (self, shouldShow): # if the show status has changed, tell our widget, and return True try: widget = self.widget except AttributeError: return False if shouldShow == widget.IsShown(): return False widget.Show(shouldShow) self.isShown = shouldShow #logger.debug("%s: now %s", debugName(self), #shouldShow and "visible" or "hidden") # Re-layout the sizer on the detail view block = self.parentBlock while block is not None and not block.eventBoundary: block = block.parentBlock if block: sizer = block.widget.GetSizer() if sizer: sizer.Layout() return True
17edbd96e98f1e6b19a0cdc1f1640edab07bc759 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/17edbd96e98f1e6b19a0cdc1f1640edab07bc759/Detail.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 261, 2890, 16, 1410, 5706, 4672, 468, 309, 326, 2405, 1267, 711, 3550, 16, 9276, 3134, 3604, 16, 471, 327, 1053, 775, 30, 3604, 273, 365, 18, 6587, 1335, 6394, 30, 327, 1083, 309...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 261, 2890, 16, 1410, 5706, 4672, 468, 309, 326, 2405, 1267, 711, 3550, 16, 9276, 3134, 3604, 16, 471, 327, 1053, 775, 30, 3604, 273, 365, 18, 6587, 1335, 6394, 30, 327, 1083, 309...
skipped = set() if len(self._test_files) > 1 and not self._options.force:
num_all_test_files = len(self._test_files) skipped = () if num_all_test_files > 1 and not self._options.force:
def PrepareListsAndPrintOutput(self): """Create appropriate subsets of test lists and returns a ResultSummary object. Also prints expected test counts."""
93ef176c40555a6f3a3895f745a977efe1b5037b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9392/93ef176c40555a6f3a3895f745a977efe1b5037b/run_webkit_tests.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7730, 7432, 1876, 5108, 1447, 12, 2890, 4672, 3536, 1684, 5505, 30760, 434, 1842, 6035, 471, 1135, 279, 3438, 4733, 733, 18, 8080, 14971, 2665, 1842, 6880, 12123, 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, 0, 0, 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, 7730, 7432, 1876, 5108, 1447, 12, 2890, 4672, 3536, 1684, 5505, 30760, 434, 1842, 6035, 471, 1135, 279, 3438, 4733, 733, 18, 8080, 14971, 2665, 1842, 6880, 12123, 2, -100, -100, -100, -100...
def browse_in_bibwords(p, f): """Browse inside words indexes.""" return def browse_in_bibxxx(req, colls, p, f, rg):
def browse_in_bibxxx(colls, p, f, rg):
def browse_in_bibwords(p, f): """Browse inside words indexes.""" return
620cac641ba839b8d458726c5bcd42752af2f02c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2139/620cac641ba839b8d458726c5bcd42752af2f02c/search_engine.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 21670, 67, 267, 67, 70, 495, 3753, 12, 84, 16, 284, 4672, 3536, 27304, 4832, 4511, 5596, 12123, 327, 225, 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, 21670, 67, 267, 67, 70, 495, 3753, 12, 84, 16, 284, 4672, 3536, 27304, 4832, 4511, 5596, 12123, 327, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
self.polygonBeginningsIndex=Numeric.resize(self.polygonBeginningsIndex,
self.polygonBeginningsIndex=Numeric.resize( self.polygonBeginningsIndex,
def addPolygon(self,polygon): """ Adds a polygon to the objects. The polygon should be a list of the form (x1,y1,x2,y2, ...) """ if len(polygon) % 2 != 0: raise Exception("Cannot add polygon because the number of x cordinates and y cordinates are not equal.")
69d13a1b8b2cac1003a5686e7195378d35f89426 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8973/69d13a1b8b2cac1003a5686e7195378d35f89426/MaskedPixelInfo.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 11787, 12, 2890, 16, 20917, 4672, 3536, 15605, 279, 7154, 358, 326, 2184, 18, 1021, 7154, 1410, 506, 279, 666, 434, 326, 646, 261, 92, 21, 16, 93, 21, 16, 92, 22, 16, 93, 22, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 11787, 12, 2890, 16, 20917, 4672, 3536, 15605, 279, 7154, 358, 326, 2184, 18, 1021, 7154, 1410, 506, 279, 666, 434, 326, 646, 261, 92, 21, 16, 93, 21, 16, 92, 22, 16, 93, 22, ...
Profiling data is written into CFG_TMPDIR/invenio-profile-stats-datetime.raw, and
Profiling data is written into CFG_TMPDIR/invenio-profile-stats-datetime.raw, and
def _profiler(req): """ This handler wrap the default handler with a profiler. Profiling data is written into CFG_TMPDIR/invenio-profile-stats-datetime.raw, and is displayed at the bottom of the webpage. To use add profile=1 to your url. To change sorting algorithm you can provide profile=algorithm_name. You can add more than one profile requirement like ?profile=time&profile=cumulative. The list of available algorithm is displayed at the end of the profile. """ args = {} if req.args: args = cgi.parse_qs(req.args) if 'profile' in args: if not isUserSuperAdmin(collect_user_info(req)): return _handler(req)
34e3759fd8d988daf736478f488636d4ab5bc8a2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2111/34e3759fd8d988daf736478f488636d4ab5bc8a2/webinterface_handler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 23097, 12, 3658, 4672, 3536, 1220, 1838, 2193, 326, 805, 1838, 598, 279, 16583, 18, 1186, 74, 4973, 501, 353, 5941, 1368, 7577, 67, 28259, 4537, 19, 267, 3995, 1594, 17, 5040, 17, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 23097, 12, 3658, 4672, 3536, 1220, 1838, 2193, 326, 805, 1838, 598, 279, 16583, 18, 1186, 74, 4973, 501, 353, 5941, 1368, 7577, 67, 28259, 4537, 19, 267, 3995, 1594, 17, 5040, 17, ...
elif my_type == mm_cfg.Host:
elif wtype == mm_cfg.Host:
def validp(addr): try: Utils.ValidateEmail(addr) return 1 except Errors.EmailAddressError: return 0
fa0e46b5bfa2180b822daee86334dd5980724324 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2120/fa0e46b5bfa2180b822daee86334dd5980724324/admin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 923, 84, 12, 4793, 4672, 775, 30, 6091, 18, 4270, 4134, 12, 4793, 13, 327, 404, 1335, 9372, 18, 23590, 668, 30, 327, 374, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 923, 84, 12, 4793, 4672, 775, 30, 6091, 18, 4270, 4134, 12, 4793, 13, 327, 404, 1335, 9372, 18, 23590, 668, 30, 327, 374, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
if (%(a_val)s->dimensions[0] != %(a_ind)s->dimensions[0]) {PyErr_SetString(PyExc_NotImplementedError, "a_val and a_ind have different lengths"); %(fail)s;} if (%(a_ptr)s->dimensions[0] != %(b)s->dimensions[0]+1) {PyErr_SetString(PyExc_NotImplementedError, "a's number of columns doesn't match b's rows"); %(fail)s;}
if (%(a)s->dimensions[0] != %(b)s->dimensions[0]) {PyErr_SetString(PyExc_NotImplementedError, "a and b have different lengths"); %(fail)s;}
def c_code(self, node, name, (a_val, a_ind, a_ptr, a_nrows, b), (z,), sub): return """ if (%(a_val)s->nd != 1) {PyErr_SetString(PyExc_NotImplementedError, "rank(a_val) != 1"); %(fail)s;} if (%(a_ind)s->nd != 1) {PyErr_SetString(PyExc_NotImplementedError, "rank(a_ind) != 1"); %(fail)s;} if (%(a_ptr)s->nd != 1) {PyErr_SetString(PyExc_NotImplementedError, "rank(a_ptr) != 1"); %(fail)s;} if (%(a_nrows)s->nd != 0) {PyErr_SetString(PyExc_NotImplementedError, "rank(nrows) != 0"); %(fail)s;} if (%(b)s->nd != 2) {PyErr_SetString(PyExc_NotImplementedError, "rank(b) != 2"); %(fail)s;}
46305ee5eb1cd7beebd74117366afb20cd152a02 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12438/46305ee5eb1cd7beebd74117366afb20cd152a02/test_debugmode.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 276, 67, 710, 12, 2890, 16, 756, 16, 508, 16, 261, 69, 67, 1125, 16, 279, 67, 728, 16, 279, 67, 6723, 16, 279, 67, 82, 3870, 16, 324, 3631, 261, 94, 16, 3631, 720, 4672, 327, 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, 276, 67, 710, 12, 2890, 16, 756, 16, 508, 16, 261, 69, 67, 1125, 16, 279, 67, 728, 16, 279, 67, 6723, 16, 279, 67, 82, 3870, 16, 324, 3631, 261, 94, 16, 3631, 720, 4672, 327, 353...
charset = properties.site_properties.getProperty('default_charset', 'utf-8').upper()
charset = properties.site_properties.getProperty('default_charset', 'utf-8').upper()
def parseSubscriberCSVFile(subscriberdata, composer, header_row_present=False, delimiter=csv_delimiter): """parses file containing subscriber data returns list of dictionaries with subscriber data according to composer""" properties = component.getUtility(IPropertiesTool) charset = properties.site_properties.getProperty('default_charset', 'utf-8').upper() try: data = cStringIO.StringIO(subscriberdata) reader = csv.reader(data, delimiter=str(delimiter)) subscriberslist = [] errorcandidates = [] for index, parsedline in enumerate(reader): if index == 0: if header_row_present: fields = parsedline continue else: fields = field.Fields(composer.schema).keys() if len(parsedline)<len(fields): pass else: try: subscriber = dict(zip(fields,\ map(lambda x:x.decode(charset), parsedline))) check_email(subscriber['email']) except: errorcandidates.append(subscriber['email']) else: subscriberslist.append(subscriber) return subscriberslist, errorcandidates except Exception, e: return _(u"Error importing subscriber file. %s" % e), []
6a225131d5814f4fcaf8f720f43c7e7816ee8a6b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9843/6a225131d5814f4fcaf8f720f43c7e7816ee8a6b/channel.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 11118, 16570, 812, 12, 26410, 892, 16, 8561, 16, 1446, 67, 492, 67, 6706, 33, 8381, 16, 5654, 33, 6715, 67, 15751, 4672, 3536, 1065, 2420, 585, 4191, 9467, 501, 225, 1135, 666, 4...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 11118, 16570, 812, 12, 26410, 892, 16, 8561, 16, 1446, 67, 492, 67, 6706, 33, 8381, 16, 5654, 33, 6715, 67, 15751, 4672, 3536, 1065, 2420, 585, 4191, 9467, 501, 225, 1135, 666, 4...
if os.path.exists( url):
if url.startswith('/'):
def __init__( self, url): """ Parses the OPML feed from the given URL into a local data structure containing channel metadata. """ self.items = [] try: if os.path.exists( url): # assume local filename doc = xml.dom.minidom.parse( url) else: doc = xml.dom.minidom.parseString( self.read_url( url))
e0828d8fdedfcd566af3cd750f390f9912eb77c9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12778/e0828d8fdedfcd566af3cd750f390f9912eb77c9/opml.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 365, 16, 880, 4672, 3536, 2280, 2420, 326, 7247, 1495, 4746, 628, 326, 864, 1976, 1368, 279, 1191, 501, 3695, 4191, 1904, 1982, 18, 3536, 365, 18, 3319, 273, 5378, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 365, 16, 880, 4672, 3536, 2280, 2420, 326, 7247, 1495, 4746, 628, 326, 864, 1976, 1368, 279, 1191, 501, 3695, 4191, 1904, 1982, 18, 3536, 365, 18, 3319, 273, 5378, ...
if 'access' in attr and attr['access'] in ('private','protected') : return True
if attr.get('access') in ('private','protected') : return True else : return False
def isDestructorNonPublic(self, id ) : attrs = self.xref[id]['attrs'] if 'members' in attrs : for m in attrs['members'].split() : elem = self.xref[m]['elem'] attr = self.xref[m]['attrs'] if elem == 'Destructor' : if 'access' in attr and attr['access'] in ('private','protected') : return True if 'bases' in attrs : for b in attrs['bases'].split() : if b[:10] == 'protected:' : b = b[10:] if b[:8] == 'private:' : b = b[8:] if self.isDestructorNonPublic(b) : return True return False
019c39121ef57ca63f323b792148e867a1b893be /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4350/019c39121ef57ca63f323b792148e867a1b893be/gendict.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 6305, 8813, 280, 3989, 4782, 12, 2890, 16, 612, 262, 294, 3422, 273, 365, 18, 22044, 63, 350, 23962, 7039, 3546, 309, 296, 7640, 11, 316, 3422, 294, 364, 312, 316, 3422, 3292, 764...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 6305, 8813, 280, 3989, 4782, 12, 2890, 16, 612, 262, 294, 3422, 273, 365, 18, 22044, 63, 350, 23962, 7039, 3546, 309, 296, 7640, 11, 316, 3422, 294, 364, 312, 316, 3422, 3292, 764...
verify(C.__dynamic__ == 0)
verify(S.__dynamic__ == 0)
def dynamics(): if verbose: print "Testing __dynamic__..." verify(object.__dynamic__ == 0) verify(list.__dynamic__ == 0) class S1: __metaclass__ = type verify(S1.__dynamic__ == 0) class S(object): pass verify(C.__dynamic__ == 0) class D(object): __dynamic__ = 1 verify(D.__dynamic__ == 1) class E(D, S): pass verify(E.__dynamic__ == 1) class F(S, D): pass verify(F.__dynamic__ == 1) try: S.foo = 1 except (AttributeError, TypeError): pass else: verify(0, "assignment to a static class attribute should be illegal") D.foo = 1 verify(D.foo == 1) # Test that dynamic attributes are inherited verify(E.foo == 1) verify(F.foo == 1) class SS(D): __dynamic__ = 0 verify(SS.__dynamic__ == 0) verify(SS.foo == 1) try: SS.foo = 1 except (AttributeError, TypeError): pass else: verify(0, "assignment to SS.foo should be illegal")
2dfc084d606c095a06b54df5653ff5547df6278f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2dfc084d606c095a06b54df5653ff5547df6278f/test_descr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 19468, 2102, 13332, 309, 3988, 30, 1172, 315, 22218, 1001, 14507, 972, 7070, 3929, 12, 1612, 16186, 14507, 972, 422, 374, 13, 3929, 12, 1098, 16186, 14507, 972, 422, 374, 13, 667, 348, 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, 19468, 2102, 13332, 309, 3988, 30, 1172, 315, 22218, 1001, 14507, 972, 7070, 3929, 12, 1612, 16186, 14507, 972, 422, 374, 13, 3929, 12, 1098, 16186, 14507, 972, 422, 374, 13, 667, 348, 2...
message.append(generate_internal_reports(cr, uid, 'html2html', document_data, False, context))
message.append(generate_internal_reports(cr, uid, 'html2html', document_data, False, context))
def send_email(cr,uid,obj,context): """ Get Emailmvision connection infos """ ev_host = obj.mail_service_id.ev_host ev_service = obj.mail_service_id.ev_service ev_encrypt = obj.mail_service_id.ev_encrypt ev_random = obj.mail_service_id.ev_random email_dest = obj.address_id.email or '' email_reply = obj.segment_id.campaign_id.trademark_id.email or '' context['document_id'] = obj.document_id.id context['address_id'] = obj.address_id.id context['wi_id'] = obj.wi_id.id email_subject = merge_message(cr, uid, obj.document_id.subject or '',context) name_from = obj.segment_id.campaign_id.trademark_id.name or '' name_reply = obj.segment_id.campaign_id.trademark_id.name or '' pool = pooler.get_pool(cr.dbname) message = [] if obj.mail_service_id.store_email_document: ir_att_obj = pool.get('ir.attachment') ir_att_ids = ir_att_obj.search(cr,uid,[('res_model','=','dm.campaign.document'),('res_id','=',obj.id),('file_type','=','html')]) for attach in ir_att_obj.browse(cr,uid,ir_att_ids): message.append(base64.decodestring(attach.datas)) else : document_data = pool.get('dm.offer.document').browse(cr,uid,obj.document_id.id) if obj.document_id.editor == 'internal' : message.append(generate_internal_reports(cr, uid, 'html2html', document_data, False, context)) else : msg = generate_openoffice_reports(cr, uid, 'html2html', document_data, False, context) message.extend(msg) for msg in message: root = etree.HTML(msg) body = root.find('body') print "message :", message # I think html_content = message should wrk html_content = ''.join([ etree.tostring(x) for x in body.getchildren()]) print "body :", html_content
5fc1f54db19c52d78ef1270601596e3f813432c3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7339/5fc1f54db19c52d78ef1270601596e3f813432c3/dm_emailvision_api.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 67, 3652, 12, 3353, 16, 1911, 16, 2603, 16, 2472, 4672, 225, 3536, 968, 8166, 81, 2820, 1459, 10626, 3536, 2113, 67, 2564, 273, 1081, 18, 4408, 67, 3278, 67, 350, 18, 14965, 67, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 67, 3652, 12, 3353, 16, 1911, 16, 2603, 16, 2472, 4672, 225, 3536, 968, 8166, 81, 2820, 1459, 10626, 3536, 2113, 67, 2564, 273, 1081, 18, 4408, 67, 3278, 67, 350, 18, 14965, 67, ...
imshp = (5,4)
imshp = (1,5,4)
def test_convolution(self): print '\n\n*************************************************' print ' TEST CONVOLUTION' print '*************************************************' from scipy.signal import convolve2d
9982dc5c65f804e1270b071fb87f3004cf725394 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12438/9982dc5c65f804e1270b071fb87f3004cf725394/test_conv.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 4896, 5889, 12, 2890, 4672, 1172, 2337, 82, 64, 82, 5021, 2751, 4035, 1172, 296, 6647, 22130, 3492, 19971, 13269, 11, 1172, 296, 5021, 2751, 4035, 628, 10966, 18, 10420, 1930, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 4896, 5889, 12, 2890, 4672, 1172, 2337, 82, 64, 82, 5021, 2751, 4035, 1172, 296, 6647, 22130, 3492, 19971, 13269, 11, 1172, 296, 5021, 2751, 4035, 628, 10966, 18, 10420, 1930, ...
if [i for i in moin_link_schemes if refuri.lstrip().startswith(i)]:
if [scheme for scheme in moin_link_schemes if refuri.lstrip().startswith(scheme)]:
def visit_reference(self, node): target = None # These are the special link schemes that MoinMoin supports. We let # MoinMoin handle these types. moin_link_schemes = ['wiki:', 'attachment:', 'inline:', 'drawing:'] # Do I need to lstrip? TODO: Find this out. Doesn't look like I need to # since I don't when assigning target. if 'refuri' in node.attributes: refuri = node['refuri'] if [i for i in moin_link_schemes if refuri.lstrip().startswith(i)]: target = refuri # What is this? TODO: Figure this out and comment elif ('name' in node.attributes and fully_normalize_name(node['name']) == refuri): target = ':%s:' % (node['name']) # The node should have a whitespace normalized name if the docutlis # restructured text parser would normally fully normalize the name. elif ':' not in refuri: target = ':%s:' % (refuri) if target: self.strip_paragraph = 1 # inline is special. We're not doing a link really, we need # moinmoin to actually insert the attachment. if target.startswith('inline:'): self.wikiparser.raw = target self.wikiparser.format(self.formatter) else: # Sometimes a newline will creep in to the node's text. This # throws the moinmoin regex so a link will not get processed. node_text = node.astext().replace('\n', ' ') self.wikiparser.raw = '[%s %s]' % (target, node_text) self.wikiparser.format(self.formatter) self.strip_paragraph = 0 raise docutils.nodes.SkipNode return html4css1.HTMLTranslator.visit_reference(self, node)
b1e8c31c1276da7b2b2d7f198bb518e5ce112c66 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5620/b1e8c31c1276da7b2b2d7f198bb518e5ce112c66/rst.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3757, 67, 6180, 12, 2890, 16, 756, 4672, 1018, 273, 599, 225, 468, 8646, 854, 326, 4582, 1692, 20436, 716, 490, 885, 49, 885, 6146, 18, 1660, 2231, 468, 490, 885, 49, 885, 1640, 4259, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3757, 67, 6180, 12, 2890, 16, 756, 4672, 1018, 273, 599, 225, 468, 8646, 854, 326, 4582, 1692, 20436, 716, 490, 885, 49, 885, 6146, 18, 1660, 2231, 468, 490, 885, 49, 885, 1640, 4259, ...
john = model.Person.get_by(name='John')
john = model.Person.query.filter_by(name='John').one()
def __json__(self): '''Transform any SA mapped class into json.
7a91c7ff19507818d50d3a2b3bcae4fb41c047da /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9953/7a91c7ff19507818d50d3a2b3bcae4fb41c047da/json.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1977, 972, 12, 2890, 4672, 9163, 4059, 1281, 17127, 5525, 667, 1368, 1163, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1977, 972, 12, 2890, 4672, 9163, 4059, 1281, 17127, 5525, 667, 1368, 1163, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
gLogger.error(errStr,res['Message'])
gLogger.error( errStr, res['Message'] )
def __removeReplica(self,storageElementName,fileTuple): pfnDict = {} for lfn,pfn in fileTuple: pfnDict[pfn] = lfn failed = {} res = self.__removePhysicalReplica(storageElementName,pfnDict.keys()) if not res['OK']: errStr = "ReplicaManager.__removeReplica: Failed to remove catalog replicas." gLogger.error(errStr,res['Message']) return S_ERROR(errStr) for pfn,error in res['Value']['Failed'].items(): failed[pfnDict[pfn]] = error replicaTuples = [] for pfn in res['Value']['Successful'].keys(): replicaTuple = (pfnDict[pfn],pfn,storageElementName) replicaTuples.append(replicaTuple) successful = {} res = self.__removeCatalogReplica(replicaTuples) if not res['OK']: errStr = "ReplicaManager.__removeReplica: Completely failed to remove physical files." gLogger.error(errStr,res['Message']) for lfn in pfnDict.values(): if not failed.has_key(lfn): failed[lfn] = errStr else: failed.update(res['Value']['Failed']) successful = res['Value']['Successful'] resDict = {'Successful':successful,'Failed':failed} return S_OK(resDict)
9fabceb719d19d46d8b75011d2932552dbe360f9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/9fabceb719d19d46d8b75011d2932552dbe360f9/ReplicaManager.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 4479, 14222, 12, 2890, 16, 5697, 30584, 16, 768, 9038, 4672, 293, 4293, 5014, 273, 2618, 364, 328, 4293, 16, 84, 4293, 316, 585, 9038, 30, 293, 4293, 5014, 63, 84, 4293, 65, 273,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 4479, 14222, 12, 2890, 16, 5697, 30584, 16, 768, 9038, 4672, 293, 4293, 5014, 273, 2618, 364, 328, 4293, 16, 84, 4293, 316, 585, 9038, 30, 293, 4293, 5014, 63, 84, 4293, 65, 273,...
def sign_char(val): if val < 0: return '-' else: return '+'
def get(self, name=''): '''Get Gnuplot instance from list and verify whether it's alive.'''
5010f73bd92989a5cf2410948e519b0c8e9f4956 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6471/5010f73bd92989a5cf2410948e519b0c8e9f4956/qtgnuplot.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 12, 2890, 16, 508, 2218, 11, 4672, 9163, 967, 611, 13053, 4032, 791, 628, 666, 471, 3929, 2856, 518, 1807, 13714, 1093, 6309, 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, 336, 12, 2890, 16, 508, 2218, 11, 4672, 9163, 967, 611, 13053, 4032, 791, 628, 666, 471, 3929, 2856, 518, 1807, 13714, 1093, 6309, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Used with mappers in an inheritance relationship, a ``Column`` which will identify the class/mapper combination to be used with a particular row. Requires the ``polymorphic_identity`` value to be set for all mappers in the inheritance hierarchy. The column specified by ``polymorphic_on`` is usually a column that resides directly within the base mapper's mapped table; alternatively, it may be a column that is only present within the <selectable> portion of the ``with_polymorphic`` argument.
Used with mappers in an inheritance relationship, a ``Column`` which will identify the class/mapper combination to be used with a particular row. Requires the ``polymorphic_identity`` value to be set for all mappers in the inheritance hierarchy. The column specified by ``polymorphic_on`` is usually a column that resides directly within the base mapper's mapped table; alternatively, it may be a column that is only present within the <selectable> portion of the ``with_polymorphic`` argument.
def mapper(class_, local_table=None, *args, **params): """Return a new [sqlalchemy.orm#Mapper] object. class\_ The class to be mapped. local_table The table to which the class is mapped, or None if this mapper inherits from another mapper using concrete table inheritance. entity_name A name to be associated with the `class`, to allow alternate mappings for a single class. always_refresh If True, all query operations for this mapped class will overwrite all data within object instances that already exist within the session, erasing any in-memory changes with whatever information was loaded from the database. Usage of this flag is highly discouraged; as an alternative, see the method `populate_existing()` on [sqlalchemy.orm.query#Query]. allow_column_override If True, allows the usage of a ``relation()`` which has the same name as a column in the mapped table. The table column will no longer be mapped. allow_null_pks Indicates that composite primary keys where one or more (but not all) columns contain NULL is a valid primary key. Primary keys which contain NULL values usually indicate that a result row does not contain an entity and should be skipped. batch Indicates that save operations of multiple entities can be batched together for efficiency. setting to False indicates that an instance will be fully saved before saving the next instance, which includes inserting/updating all table rows corresponding to the entity as well as calling all ``MapperExtension`` methods corresponding to the save operation. column_prefix A string which will be prepended to the `key` name of all Columns when creating column-based properties from the given Table. Does not affect explicitly specified column-based properties concrete If True, indicates this mapper should use concrete table inheritance with its parent mapper. extension A [sqlalchemy.orm#MapperExtension] instance or list of ``MapperExtension`` instances which will be applied to all operations by this ``Mapper``. inherits Another ``Mapper`` for which this ``Mapper`` will have an inheritance relationship with. inherit_condition For joined table inheritance, a SQL expression (constructed ``ClauseElement``) which will define how the two tables are joined; defaults to a natural join between the two tables. inherit_foreign_keys when inherit_condition is used and the condition contains no ForeignKey columns, specify the "foreign" columns of the join condition in this list. else leave as None. order_by A single ``Column`` or list of ``Columns`` for which selection operations should use as the default ordering for entities. Defaults to the OID/ROWID of the table if any, or the first primary key column of the table. non_primary Construct a ``Mapper`` that will define only the selection of instances, not their persistence. Any number of non_primary mappers may be created for a particular class. polymorphic_on Used with mappers in an inheritance relationship, a ``Column`` which will identify the class/mapper combination to be used with a particular row. Requires the ``polymorphic_identity`` value to be set for all mappers in the inheritance hierarchy. The column specified by ``polymorphic_on`` is usually a column that resides directly within the base mapper's mapped table; alternatively, it may be a column that is only present within the <selectable> portion of the ``with_polymorphic`` argument. _polymorphic_map Used internally to propagate the full map of polymorphic identifiers to surrogate mappers. polymorphic_identity A value which will be stored in the Column denoted by polymorphic_on, corresponding to the *class identity* of this mapper. polymorphic_fetch specifies how subclasses mapped through joined-table inheritance will be fetched. options are 'union', 'select', and 'deferred'. if the 'with_polymorphic' argument is present, defaults to 'union', otherwise defaults to 'select'. properties A dictionary mapping the string names of object attributes to ``MapperProperty`` instances, which define the persistence behavior of that attribute. Note that the columns in the mapped table are automatically converted into ``ColumnProperty`` instances based on the `key` property of each ``Column`` (although they can be overridden using this dictionary). include_properties An inclusive list of properties to map. Columns present in the mapped table but not present in this list will not be automatically converted into properties. exclude_properties A list of properties not to map. Columns present in the mapped table and present in this list will not be automatically converted into properties. Note that neither this option nor include_properties will allow an end-run around Python inheritance. If mapped class ``B`` inherits from mapped class ``A``, no combination of includes or excludes will allow ``B`` to have fewer properties than its superclass, ``A``. primary_key A list of ``Column`` objects which define the *primary key* to be used against this mapper's selectable unit. This is normally simply the primary key of the `local_table`, but can be overridden here. with_polymorphic A tuple in the form ``(<classes>, <selectable>)`` indicating the default style of "polymorphic" loading, that is, which tables are queried at once. <classes> is any single or list of mappers and/or classes indicating the inherited classes that should be loaded at once. The special value ``'*'`` may be used to indicate all descending classes should be loaded immediately. The second tuple argument <selectable> indicates a selectable that will be used to query for multiple classes. Normally, it is left as None, in which case this mapper will form an outer join from the base mapper's table to that of all desired sub-mappers. When specified, it provides the selectable to be used for polymorphic loading. When with_polymorphic includes mappers which load from a "concrete" inheriting table, the <selectable> argument is required, since it usually requires more complex UNION queries. select_table Deprecated. Synonymous with ``with_polymorphic=('*', <selectable>)``. version_id_col A ``Column`` which must have an integer type that will be used to keep a running *version id* of mapped entities in the database. this is used during save operations to ensure that no other thread or process has updated the instance during the lifetime of the entity, else a ``ConcurrentModificationError`` exception is thrown. """ return Mapper(class_, local_table, *args, **params)
8b169bdc1a9ad510d1fa7ac55cf02c0a00396ed8 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1074/8b169bdc1a9ad510d1fa7ac55cf02c0a00396ed8/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5815, 12, 1106, 67, 16, 1191, 67, 2121, 33, 7036, 16, 380, 1968, 16, 2826, 2010, 4672, 3536, 990, 279, 394, 306, 4669, 24182, 18, 535, 7, 4597, 65, 733, 18, 225, 667, 64, 67, 1021, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5815, 12, 1106, 67, 16, 1191, 67, 2121, 33, 7036, 16, 380, 1968, 16, 2826, 2010, 4672, 3536, 990, 279, 394, 306, 4669, 24182, 18, 535, 7, 4597, 65, 733, 18, 225, 667, 64, 67, 1021, ...
compileCacheRoot = "%s/cache" % Configuration.SkunkRoot, componentCacheRoot = "%s/cache" % Configuration.SkunkRoot,
compileCacheRoot = confvars.DEFAULT_CACHE, componentCacheRoot = confvars.DEFAULT_CACHE,
def __initConfig(): from AE import cfg from SkunkWeb import Configuration, confvars # set our defaults from AE defaults Configuration.mergeDefaults( documentRoot = confvars.DEFAULT_DOCROOT, compileCacheRoot = "%s/cache" % Configuration.SkunkRoot, componentCacheRoot = "%s/cache" % Configuration.SkunkRoot, failoverComponentCacheRoot = "%s/failoverCache" % Configuration.SkunkRoot, mimeTypesFile = confvars.DEFAULT_MIME_TYPES_FILE_NAME, componentCommentLevel = 0, ) dd = {} for k, v in cfg.Configuration._d.items(): if k not in ['documentRoot', 'compileCacheRoot', 'componentCacheRoot', 'failoverComponentCacheRoot', 'mimeTypesFile', 'componentCommentLevel']: dd[k]=v Configuration.mergeDefaults(dd) # set AE's config object to ours cfg.Configuration = Configuration __checkScopes(Configuration.scopeMatchers())
b69bfc5a3bcf451b86785545c852cda02e02a15a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5832/b69bfc5a3bcf451b86785545c852cda02e02a15a/ae_component.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 809, 13332, 628, 432, 41, 1930, 2776, 628, 10362, 1683, 4079, 1930, 4659, 16, 2195, 4699, 468, 444, 3134, 3467, 628, 432, 41, 3467, 4659, 18, 2702, 7019, 12, 1668, 2375, 273,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 809, 13332, 628, 432, 41, 1930, 2776, 628, 10362, 1683, 4079, 1930, 4659, 16, 2195, 4699, 468, 444, 3134, 3467, 628, 432, 41, 3467, 4659, 18, 2702, 7019, 12, 1668, 2375, 273,...
9: I INT 2
9: L LONG 2
def __init__(self, value): self.value = value
be11cfc8ea0a39ea467910d27373334131f315b1 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8125/be11cfc8ea0a39ea467910d27373334131f315b1/pickletools.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 460, 4672, 365, 18, 1132, 273, 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, ...
[ 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, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 460, 4672, 365, 18, 1132, 273, 460, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
self.log.error('Maximum number of reschedulings is reached','Job %s' % jobID) res = self.setJobStatus(jobID, status='Failed', minor='Maximum of reschedulings reached') return S_ERROR('Maximum number of reschedulings is reached: %s' % self.maxRescheduling) jobAttrNames = []
self.log.error( 'Maximum number of reschedulings is reached', 'Job %s' % jobID ) res = self.setJobStatus( jobID, status = 'Failed', minor = 'Maximum of reschedulings reached' ) return S_ERROR( 'Maximum number of reschedulings is reached: %s' % self.maxRescheduling ) jobAttrNames = []
def rescheduleJob (self, jobID): """ Reschedule the given job to run again from scratch. Retain the already defined parameters in the parameter Attic """ # Check Verified Flag result = self.getJobAttributes( jobID, ['Status','MinorStatus','VerifiedFlag','RescheduleCounter', 'Owner','OwnerDN','OwnerGroup','DIRACSetup'] ) if result['OK']: resultDict = result['Value'] else: return S_ERROR('JobDB.getJobAttributes: can not retrieve job attributes')
99c1bc850ba087890925b3180df206f65bb1d4b3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/99c1bc850ba087890925b3180df206f65bb1d4b3/JobDB.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 400, 2847, 2278, 261, 2890, 16, 28913, 4672, 3536, 1124, 2847, 326, 864, 1719, 358, 1086, 3382, 628, 15289, 18, 17100, 530, 326, 1818, 2553, 1472, 316, 326, 1569, 6020, 335, 3536, 468, 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, 400, 2847, 2278, 261, 2890, 16, 28913, 4672, 3536, 1124, 2847, 326, 864, 1719, 358, 1086, 3382, 628, 15289, 18, 17100, 530, 326, 1818, 2553, 1472, 316, 326, 1569, 6020, 335, 3536, 468, 2...
print
print
def get_url_from_coord(self, coord, layer, conf): self.mt_counter += 1 self.mt_counter = self.mt_counter % NR_MTS print try: if not conf.oneDirPerMap: if conf.map_service == MAP_SERVERS[OSM] and (layer == LAYER_MAP): return openStreetMaps.get_url(self.mt_counter, coord) elif conf.map_service == MAP_SERVERS[CLOUDMADE] and (layer == LAYER_MAP): return cloudMade.get_url(self.mt_counter, coord, styleID) elif conf.map_service == MAP_SERVERS[YAHOO] and (layer != LAYER_TERRAIN): return yahoo.get_url(self.mt_counter, coord, layer) elif conf.map_service == MAP_SERVERS[INFO_FREEWAY] and (layer == LAYER_MAP): return informationFreeway.get_url(self.mt_counter, coord) elif conf.map_service == MAP_SERVERS[OPENCYCLEMAP] and (layer == LAYER_MAP): return openCycleMap.get_url(self.mt_counter, coord) elif conf.map_service == MAP_SERVERS[GOOGLE_MAKER] and (layer == LAYER_MAP): return googleMapMaker.get_url(self.mt_counter, coord) elif conf.map_service == MAP_SERVERS[VIRTUAL_EARTH] and (layer != LAYER_TERRAIN): return virtualEarth.get_url(self.mt_counter, coord, layer) else: return googleMaps.get_url(self.mt_counter, coord, layer) if (MAP_SERVICES[layer]["TextID"] in ["veter", "vemap", "vesat"]): return virtualEarth.get_url(self.mt_counter, coord, layer) elif (MAP_SERVICES[layer]["TextID"] == "osmmap"): return openStreetMaps.get_url(self.mt_counter, coord) elif (MAP_SERVICES[layer]["TextID"] == "cmmap"): return cloudMade.get_url(self.mt_counter, coord, cloudMade_styleID) elif (MAP_SERVICES[layer]["TextID"] in ["yter", "ymap"]): return yahoo.get_url(self.mt_counter, coord, layer) elif (MAP_SERVICES[layer]["TextID"] == "ifwmap"): return informationFreeway.get_url(self.mt_counter, coord) elif (MAP_SERVICES[layer]["TextID"] == "ocmmap"): return openCycleMap.get_url(self.mt_counter, coord) elif (MAP_SERVICES[layer]["TextID"] == "gmmmap"): return googleMapMaker.get_url(self.mt_counter, coord) else: return googleMaps.get_url(self.mt_counter, coord, layer, conf.language)
9085a614745b80e6d052b46b6536f46395466d8e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5373/9085a614745b80e6d052b46b6536f46395466d8e/mapServices.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 718, 67, 2080, 67, 5732, 12, 2890, 16, 2745, 16, 3018, 16, 2195, 4672, 365, 18, 1010, 67, 7476, 1011, 404, 365, 18, 1010, 67, 7476, 273, 365, 18, 1010, 67, 7476, 738, 423, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 718, 67, 2080, 67, 5732, 12, 2890, 16, 2745, 16, 3018, 16, 2195, 4672, 365, 18, 1010, 67, 7476, 1011, 404, 365, 18, 1010, 67, 7476, 273, 365, 18, 1010, 67, 7476, 738, 423, ...
r = append_filename_to_results(file, message + hostresults)) if 'metalink' in d and d['metalink']: (returncode, results)=metalink(dir, file, r))
r = append_filename_to_results(file, message + hostresults) if 'metalink' in kwargs and kwargs['metalink']: dir = '/'.join(sdir) (returncode, results)=metalink(dir, file, r)
def do_mirrorlist(kwargs): if not (kwargs.has_key('repo') and kwargs.has_key('arch')) and not kwargs.has_key('path'): return dict(resulttype='mirrorlist', returncode=200, results=[(None, '# either path=, or repo= and arch= must be specified')]) file = None cache = None if kwargs.has_key('path'): path = kwargs['path'].strip('/') header = "# path = %s " % (path) sdir = path.split('/') try: # path was to a directory cache = mirrorlist_cache['/'.join(sdir)] except KeyError: # path was to a file, try its directory file = sdir[-1] sdir = sdir[:-1] try: cache = mirrorlist_cache['/'.join(sdir)] except KeyError: return dict(resulttype='mirrorlist', returncode=200, results=[(None, header + 'error: invalid path')]) else: if u'source' in kwargs['repo']: kwargs['arch'] = u'source' repo = repo_redirect.get(kwargs['repo'], kwargs['repo']) arch = kwargs['arch'] header = "# repo = %s arch = %s " % (repo, arch) if repo in disabled_repositories: return dict(resulttype='mirrorlist', returncode=200, results=[(None, header + 'repo disabled')]) try: dir = repo_arch_to_directoryname[(repo, arch)] cache = mirrorlist_cache[dir] except KeyError: return dict(resulttype='mirrorlist', returncode=200, results=[(None, header + 'error: invalid repo or arch')]) ordered_mirrorlist = cache.get('ordered_mirrorlist', default_ordered_mirrorlist) done = 0 netblock_results = [] internet2_results = [] country_results = [] geoip_results = [] continent_results = [] global_results = [] requested_countries = [] if kwargs.has_key('country'): requested_countries = uniqueify([c.upper() for c in kwargs['country'].split(',') ]) # if they specify a country, don't use netblocks if not 'country' in kwargs: header, netblock_results = do_netblocks(kwargs, cache, header) if len(netblock_results) > 0: if not ordered_mirrorlist: done=1 client_ip = kwargs['client_ip'] clientCountry = gi.country_code_by_addr(client_ip) if not done: header, internet2_results = do_internet2(kwargs, cache, clientCountry, header) if uniq_host_count(internet2_results) + uniq_host_count(netblock_results) >= 3: if not ordered_mirrorlist: done = 1 if not done and 'country' in kwargs: header, country_results = do_country(kwargs, cache, clientCountry, requested_countries, header) if len(country_results) == 0: header, continent_results = do_continent(kwargs, cache, clientCountry, requested_countries, header) done = 1 if not done: header, geoip_results = do_geoip(kwargs, cache, clientCountry, header) if uniq_host_count(geoip_results) >= 3: if not ordered_mirrorlist: done = 1 if not done: header, continent_results = do_continent(kwargs, cache, clientCountry, [], header) if uniq_host_count(geoip_results) + uniq_host_count(continent_results) >= 3: done = 1 if not done: header, global_results = do_global(kwargs, cache, clientCountry, header) random.shuffle(netblock_results) random.shuffle(internet2_results) country_results = shuffle(country_results) geoip_results = shuffle(geoip_results) continent_results = shuffle(continent_results) global_results = shuffle(global_results) hostresults = uniqueify(netblock_results + internet2_results + country_results + geoip_results + continent_results + global_results) hostresults = append_path(hostresults, cache) message = [(None, header)] r = append_filename_to_results(file, message + hostresults)) if 'metalink' in d and d['metalink']: (returncode, results)=metalink(dir, file, r)) return dict(resulttype='metalink', returncode=returncode, results=results) return dict(resulttype='mirrorlist', returncode=200, results=r)
116cd1550360275ea8e93c1c459f5f184cc9a35e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/13031/116cd1550360275ea8e93c1c459f5f184cc9a35e/mirrorlist_server.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 27197, 1098, 12, 4333, 4672, 309, 486, 261, 4333, 18, 5332, 67, 856, 2668, 7422, 6134, 471, 1205, 18, 5332, 67, 856, 2668, 991, 26112, 471, 486, 1205, 18, 5332, 67, 856, 2668,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 27197, 1098, 12, 4333, 4672, 309, 486, 261, 4333, 18, 5332, 67, 856, 2668, 7422, 6134, 471, 1205, 18, 5332, 67, 856, 2668, 991, 26112, 471, 486, 1205, 18, 5332, 67, 856, 2668,...
this = apply(_quickfix.new_EventType, args)
this = _quickfix.new_EventType(*args)
def __init__(self, *args): this = apply(_quickfix.new_EventType, args) try: self.this.append(this) except: self.this = this
7e632099fd421880c8c65fb0cf610d338d115ee9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8819/7e632099fd421880c8c65fb0cf610d338d115ee9/quickfix.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 380, 1968, 4672, 333, 273, 389, 19525, 904, 18, 2704, 67, 16346, 30857, 1968, 13, 775, 30, 365, 18, 2211, 18, 6923, 12, 2211, 13, 1335, 30, 365, 18, 22...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 380, 1968, 4672, 333, 273, 389, 19525, 904, 18, 2704, 67, 16346, 30857, 1968, 13, 775, 30, 365, 18, 2211, 18, 6923, 12, 2211, 13, 1335, 30, 365, 18, 22...
elif string.upper(text) in ("N", "NO", "FALSE", "0"):
elif text.upper() in ("N", "NO", "FALSE", "0"):
def readBool(text): if string.upper(text) in ("Y", "YES", "TRUE", "1"): return 1 elif string.upper(text) in ("N", "NO", "FALSE", "0"): return 0 else: raise RMLError, "true/false attribute has illegal value '%s'" % text
041e2d265f4d145658b08edc02ff501d425029d6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3878/041e2d265f4d145658b08edc02ff501d425029d6/para.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 7464, 12, 955, 4672, 309, 533, 18, 5797, 12, 955, 13, 316, 7566, 61, 3113, 315, 29081, 3113, 315, 18724, 3113, 315, 21, 6, 4672, 327, 404, 1327, 977, 18, 5797, 1435, 316, 7566, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 7464, 12, 955, 4672, 309, 533, 18, 5797, 12, 955, 13, 316, 7566, 61, 3113, 315, 29081, 3113, 315, 18724, 3113, 315, 21, 6, 4672, 327, 404, 1327, 977, 18, 5797, 1435, 316, 7566, ...
return GetWeekOfMonth(targetDate, self.firstDayOfWeek)
return self.GetWeekOfMonth(targetDate)
def GetWeek(self, targetDate, useRelative=True): """ get the week (row, in range 1..WEEKS_TO_DISPLAY) for the given date """ if useRelative: # week of the month return GetWeekOfMonth(targetDate, self.firstDayOfWeek)
b1890ae729cf70fa2a0da432c9780afb8031468e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/b1890ae729cf70fa2a0da432c9780afb8031468e/minical.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 968, 6630, 12, 2890, 16, 1018, 1626, 16, 999, 8574, 33, 5510, 4672, 3536, 336, 326, 4860, 261, 492, 16, 316, 1048, 404, 838, 20274, 55, 67, 4296, 67, 17463, 13, 364, 326, 864, 1509, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 968, 6630, 12, 2890, 16, 1018, 1626, 16, 999, 8574, 33, 5510, 4672, 3536, 336, 326, 4860, 261, 492, 16, 316, 1048, 404, 838, 20274, 55, 67, 4296, 67, 17463, 13, 364, 326, 864, 1509, ...
for port in [preferred_port, 9907, 10243, 32999]:
for port in [preferred_port, 9907, 10243, 32999, 0]:
def bind_port(sock, host='', preferred_port=54321): """Try to bind the sock to a port. If we are running multiple tests and we don't try multiple ports, the test can fails. This makes the test more robust.""" import socket, errno # some random ports that hopefully no one is listening on. for port in [preferred_port, 9907, 10243, 32999]: try: sock.bind((host, port)) return port except socket.error, (err, msg): if err != errno.EADDRINUSE: raise print >>sys.__stderr__, \ ' WARNING: failed to listen on port %d, trying another' % port raise TestFailed, 'unable to find port to listen on'
5c35216c5b4c79d6bd71d8f97d8f813ce4759e41 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8125/5c35216c5b4c79d6bd71d8f97d8f813ce4759e41/test_support.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1993, 67, 655, 12, 15031, 16, 1479, 2218, 2187, 9119, 67, 655, 33, 6564, 1578, 21, 4672, 3536, 7833, 358, 1993, 326, 7313, 358, 279, 1756, 18, 225, 971, 732, 854, 3549, 3229, 7434, 471...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1993, 67, 655, 12, 15031, 16, 1479, 2218, 2187, 9119, 67, 655, 33, 6564, 1578, 21, 4672, 3536, 7833, 358, 1993, 326, 7313, 358, 279, 1756, 18, 225, 971, 732, 854, 3549, 3229, 7434, 471...
self.cnt.transformCSS(art)
def buildArticle(self, item): art = self.env.wiki.getParsedArticle(title=item['title'], revision=item.get('revision')) if not art: return # FIXME art.url = self.env.wiki.getURL(item['title'], item.get('revision')) art.authors = self.env.wiki.getAuthors(item['title'], revision=item.get('revision')) if 'displaytitle' in item: art.caption = item['displaytitle'] url = self.env.wiki.getURL(item['title'], item.get('revision')) if url: art.url = url else: art.url = None source = self.env.wiki.getSource(item['title'], item.get('revision')) if source: art.wikiurl = source.get('url', '') else: art.wikiurl = None art.authors = self.env.wiki.getAuthors(item['title'], revision=item.get('revision'))
ae4d738dabdc2749fe45a3b3c215234c65eb7c5a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12390/ae4d738dabdc2749fe45a3b3c215234c65eb7c5a/rlwriter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 7880, 12, 2890, 16, 761, 4672, 3688, 273, 365, 18, 3074, 18, 13044, 18, 588, 11257, 7880, 12, 2649, 33, 1726, 3292, 2649, 17337, 6350, 33, 1726, 18, 588, 2668, 13057, 26112, 309, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 7880, 12, 2890, 16, 761, 4672, 3688, 273, 365, 18, 3074, 18, 13044, 18, 588, 11257, 7880, 12, 2649, 33, 1726, 3292, 2649, 17337, 6350, 33, 1726, 18, 588, 2668, 13057, 26112, 309, ...
self.addEventsToEventNameToItemUUID (subscribeAlwaysEnts)
self.addEventsToEventNameToItemUUID (subscribeAlwaysEvents)
def render (self): try: instantiateWidgetMethod = getattr (type (self), "instantiateWidget") except AttributeError: pass else: oldIgnoreSynchronizeWidget = Globals.wxApplication.ignoreSynchronizeWidget Globals.wxApplication.ignoreSynchronizeWidget = True try: widget = instantiateWidgetMethod (self) finally: Globals.wxApplication.ignoreSynchronizeWidget = oldIgnoreSynchronizeWidget """ Store a non persistent pointer to the widget in the block and pin the block to keep it in memory. Store a pointer to the block in the widget. Undo all this when the widget is destroyed. """
5532adca257405ee7a53645ddd00e1f6cd723271 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/5532adca257405ee7a53645ddd00e1f6cd723271/Block.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 261, 2890, 4672, 775, 30, 10275, 4609, 1305, 273, 3869, 261, 723, 261, 2890, 3631, 315, 24628, 3840, 4609, 7923, 1335, 6394, 30, 1342, 469, 30, 1592, 3777, 19298, 554, 4609, 273, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 261, 2890, 4672, 775, 30, 10275, 4609, 1305, 273, 3869, 261, 723, 261, 2890, 3631, 315, 24628, 3840, 4609, 7923, 1335, 6394, 30, 1342, 469, 30, 1592, 3777, 19298, 554, 4609, 273, 1...
dtypechars.append(tc)
typecodes.append(tc)
def __init__(self, data=None, ncols=0, nrows=0, dtypechars=None): """
d323a0e51c5bfbfe6a5d20c4a492829533562316 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2510/d323a0e51c5bfbfe6a5d20c4a492829533562316/table.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 501, 33, 7036, 16, 21330, 33, 20, 16, 18871, 33, 20, 16, 3182, 7549, 33, 7036, 4672, 3536, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 501, 33, 7036, 16, 21330, 33, 20, 16, 18871, 33, 20, 16, 3182, 7549, 33, 7036, 4672, 3536, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
child_dict = master_dict = {}
child_dict = {} master_dict = {}
def get_kml(self, cr, uid, context={}): partner_obj = self.pool.get('res.partner') partner_ids = partner_obj.search(cr, uid, []) partner_data = partner_obj.browse(cr, uid, partner_ids, context) address_obj= self.pool.get('res.partner.address') res = {} number_customer_inv = number_supplier_inv = 0 cr.execute(''' select count(i.id),i.type, i.partner_id from account_invoice as i left join res_partner_address as a on i.partner_id=a.partner_id where i.type in ('out_invoice','in_invoice') group by i.type, i.partner_id ''') invoice_partner = cr.fetchall()
aaaffb7a7ee3c7d260a070bf8a5e141e1c996850 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7339/aaaffb7a7ee3c7d260a070bf8a5e141e1c996850/google_earth.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 79, 781, 12, 2890, 16, 4422, 16, 4555, 16, 819, 12938, 4672, 19170, 67, 2603, 273, 365, 18, 6011, 18, 588, 2668, 455, 18, 31993, 6134, 19170, 67, 2232, 273, 19170, 67, 2603, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 79, 781, 12, 2890, 16, 4422, 16, 4555, 16, 819, 12938, 4672, 19170, 67, 2603, 273, 365, 18, 6011, 18, 588, 2668, 455, 18, 31993, 6134, 19170, 67, 2232, 273, 19170, 67, 2603, ...
if self.is_forwared(obj):
if self.is_forwarded(obj):
def copy(self, obj): if not self.fromspace <= obj < self.fromspace + self.space_size: return self.copy_non_managed_obj(obj)
de511f3b613a2cb4a495a10173904523ac05e588 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/de511f3b613a2cb4a495a10173904523ac05e588/gc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1610, 12, 2890, 16, 1081, 4672, 309, 486, 365, 18, 2080, 2981, 1648, 1081, 411, 365, 18, 2080, 2981, 397, 365, 18, 2981, 67, 1467, 30, 327, 365, 18, 3530, 67, 5836, 67, 19360, 67, 26...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1610, 12, 2890, 16, 1081, 4672, 309, 486, 365, 18, 2080, 2981, 1648, 1081, 411, 365, 18, 2080, 2981, 397, 365, 18, 2981, 67, 1467, 30, 327, 365, 18, 3530, 67, 5836, 67, 19360, 67, 26...
if not user.isValidName(self.request, theuser.name):
if not user.isValidName(self.request, new_name):
def _save_user_prefs(self): _ = self._ form = self.request.form
39ee40a7a56d6232a4f77e637d8fe0ae20d800f5 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/888/39ee40a7a56d6232a4f77e637d8fe0ae20d800f5/prefs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5688, 67, 1355, 67, 1484, 2556, 12, 2890, 4672, 389, 273, 365, 6315, 646, 273, 365, 18, 2293, 18, 687, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5688, 67, 1355, 67, 1484, 2556, 12, 2890, 4672, 389, 273, 365, 6315, 646, 273, 365, 18, 2293, 18, 687, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
1: "minus_x", 2: "minus_y", 3: "plus_x", 4: "plus_y",
1: "minus_x", 2: "minus_y", 3: "plus_x", 4: "plus_y",
def refine_func(vertices, area): return area > max_area
592adeeb615eb5497b4dae9329f92c603720e638 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12869/592adeeb615eb5497b4dae9329f92c603720e638/geometry.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 30446, 67, 644, 12, 17476, 16, 5091, 4672, 327, 5091, 405, 943, 67, 5036, 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, ...
[ 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, 30446, 67, 644, 12, 17476, 16, 5091, 4672, 327, 5091, 405, 943, 67, 5036, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
def run(self, options, args):
def run(self, config, options, args):
def run(self, options, args): module_set = jhbuild.moduleset.load(config) if args: modules = args elif config.modules == 'all': modules = None else: modules = config.modules module_set.write_dot(modules)
04664fbccf1921a8b7d6da9b588cd6a5d6b1811d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4596/04664fbccf1921a8b7d6da9b588cd6a5d6b1811d/base.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 16, 642, 16, 702, 16, 833, 4672, 1605, 67, 542, 273, 525, 76, 3510, 18, 6400, 278, 18, 945, 12, 1425, 13, 309, 833, 30, 4381, 273, 833, 1327, 642, 18, 6400, 422, 29...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 16, 642, 16, 702, 16, 833, 4672, 1605, 67, 542, 273, 525, 76, 3510, 18, 6400, 278, 18, 945, 12, 1425, 13, 309, 833, 30, 4381, 273, 833, 1327, 642, 18, 6400, 422, 29...
return parse_docs(name=base_var.imported_from) except ParseError: pass
dirname = os.path.split(parent_docs[0].filename)[0] sys.path = [dirname] + sys.path try: return parse_docs(name=str(base_var.imported_from)) except ParseError: log.info('Unable to parse base', base_var.imported_from) except ImportError: log.info('Unable to find base', base_var.imported_from) finally: sys.path = old_sys_path
def find_base(name, parent_docs): assert isinstance(name, DottedName) # Find the variable containing the base. base_var = lookup_variable(name, parent_docs) if base_var is None: # If it looks like it's in an external module, then try # "importing" it. if (lookup_name(name[0], parent_docs).imported_from not in (None, UNKNOWN)): _import_var(name, parent_docs) base_var = lookup_variable(name, parent_docs) # If we still don't have a var containing the base, give up. if base_var is None: raise ParseError("Could not find %s" % name) # If the variable has a value, return that value. if base_var.value != UNKNOWN: return base_var.value # Otherwise, if BASE_HANDLING is 'parse', try parsing the docs for # the base class; if that fails, or if BASE_HANDLING is 'link', # just make a proxy object. if base_var.imported_from not in (None, UNKNOWN): if BASE_HANDLING == 'parse': try: return parse_docs(name=base_var.imported_from) except ParseError: pass # Either BASE_HANDLING='link' or parsing the base class failed; # return a proxy value for the base class. return ClassDoc(variables={}, sort_spec=[], bases=[], subclasses=[], proxy_for=base_var.imported_from, docs_extracted_by='parser') else: raise ParseError() # no value available for var.
098b9dc3aecc8b3fbf3cb31e9897292b02004396 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11420/098b9dc3aecc8b3fbf3cb31e9897292b02004396/docparser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 67, 1969, 12, 529, 16, 982, 67, 8532, 4672, 1815, 1549, 12, 529, 16, 17502, 2344, 461, 13, 225, 468, 4163, 326, 2190, 4191, 326, 1026, 18, 1026, 67, 1401, 273, 3689, 67, 6105, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1969, 12, 529, 16, 982, 67, 8532, 4672, 1815, 1549, 12, 529, 16, 17502, 2344, 461, 13, 225, 468, 4163, 326, 2190, 4191, 326, 1026, 18, 1026, 67, 1401, 273, 3689, 67, 6105, ...
files.append(f)
files.append((f, f)) elif f in ["pre-upgrade", "pre-install", "post-upgrade", "post-install"]: files.append((f, self.packageInfo["Title"]+"."+f))
def _addResources(self): "Add Welcome/ReadMe/License files, .lproj folders and scripts."
d932aaa96ea8845f4755fa2da90712cb71b9e9c4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/d932aaa96ea8845f4755fa2da90712cb71b9e9c4/buildpkg.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1289, 3805, 12, 2890, 4672, 315, 986, 678, 16312, 19, 1994, 4667, 19, 13211, 1390, 16, 263, 80, 17995, 9907, 471, 8873, 1199, 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, 389, 1289, 3805, 12, 2890, 4672, 315, 986, 678, 16312, 19, 1994, 4667, 19, 13211, 1390, 16, 263, 80, 17995, 9907, 471, 8873, 1199, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100...
elif v.concretetype != concretetype:
elif hasattr(v, 'concretetype') and v.concretetype != concretetype:
def convertvar(self, v, concretetype): """Get the operation(s) needed to convert 'v' to the given type.""" ops = [] if isinstance(v, Constant): # we should never modify a Constant in-place v = Constant(v.value) v.concretetype = concretetype
4a1243f03cf24e397a28bce61424ea76edc6c850 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/4a1243f03cf24e397a28bce61424ea76edc6c850/typer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1765, 1401, 12, 2890, 16, 331, 16, 20570, 1349, 5872, 4672, 3536, 967, 326, 1674, 12, 87, 13, 3577, 358, 1765, 296, 90, 11, 358, 326, 864, 618, 12123, 6727, 273, 5378, 309, 1549, 12, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1765, 1401, 12, 2890, 16, 331, 16, 20570, 1349, 5872, 4672, 3536, 967, 326, 1674, 12, 87, 13, 3577, 358, 1765, 296, 90, 11, 358, 326, 864, 618, 12123, 6727, 273, 5378, 309, 1549, 12, ...
try: return self.__order except AttributeError: pass o = self.element().additive_order() self.__order = o return o
return self.element().additive_order()
def multiplicative_order(self): """ The order of this character. EXAMPLES:: sage: e = DirichletGroup(100).1 sage: e.order() # same as multiplicative_order, since group is multiplicative 20 sage: e.multiplicative_order() 20 sage: e = DirichletGroup(100).0 sage: e.multiplicative_order() 2 """ try: return self.__order except AttributeError: pass o = self.element().additive_order() self.__order = o return o
80bb64cda04307dbe55314d6e4fce85c5aab0086 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/80bb64cda04307dbe55314d6e4fce85c5aab0086/dirichlet.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3309, 28884, 67, 1019, 12, 2890, 4672, 3536, 1021, 1353, 434, 333, 3351, 18, 225, 5675, 8900, 11386, 2866, 225, 272, 410, 30, 425, 273, 8446, 1354, 1810, 1114, 12, 6625, 2934, 21, 272, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3309, 28884, 67, 1019, 12, 2890, 4672, 3536, 1021, 1353, 434, 333, 3351, 18, 225, 5675, 8900, 11386, 2866, 225, 272, 410, 30, 425, 273, 8446, 1354, 1810, 1114, 12, 6625, 2934, 21, 272, ...
lines.append('%s "%s"' % (commandparams_info[name][0], option1[1:-1].replace('"', '\"')))
lines.append('%s "%s"' % (commandparams_info[name][0], option1[1:-1].replace('"', '\\"')))
def convert_commandparams(document): """ Convert \begin_inset LatexCommand \cmdname[opt1][opt2]{arg} \end_inset to \begin_inset LatexCommand cmdname name1 "opt1" name2 "opt2" name3 "arg" \end_inset name1, name2 and name3 can be different for each command.
d56de86b6af0eea59990991b75b6d0e746ee684d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7514/d56de86b6af0eea59990991b75b6d0e746ee684d/lyx_1_5.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1765, 67, 3076, 2010, 12, 5457, 4672, 3536, 4037, 225, 521, 10086, 67, 267, 542, 11134, 338, 2189, 521, 4172, 529, 63, 3838, 21, 6362, 3838, 22, 7073, 3175, 97, 521, 409, 67, 267, 542,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1765, 67, 3076, 2010, 12, 5457, 4672, 3536, 4037, 225, 521, 10086, 67, 267, 542, 11134, 338, 2189, 521, 4172, 529, 63, 3838, 21, 6362, 3838, 22, 7073, 3175, 97, 521, 409, 67, 267, 542,...
'ssh-rsa': keys.getPublicKeyString(data=publicKey)
'ssh-rsa': keys.Key.fromString(data=publicKey)
def closed(self): pass
331ee68ea32a788459323eff0b95500849d2eca1 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12595/331ee68ea32a788459323eff0b95500849d2eca1/sshsimpleserver.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4375, 12, 2890, 4672, 1342, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4375, 12, 2890, 4672, 1342, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
print '<p>%s contains the description of this error.' % path
print '<p> %s contains the description of this error.' % path
def handle(self, info=None): import sys, os info = info or sys.exc_info() text = 0 print reset()
89c89b4d445b1f2dc0cf0b9d3ef890dbee839ea8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/89c89b4d445b1f2dc0cf0b9d3ef890dbee839ea8/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, ...
cannot_set_attr(self.f.a, "im_self", None, TypeError) cannot_set_attr(self.fi.a, "im_self", self.fi, TypeError)
self.cannot_set_attr(self.f.a, "im_self", None, TypeError) self.cannot_set_attr(self.fi.a, "im_self", self.fi, TypeError)
def test_im_self(self): self.assertEqual(self.f.a.im_self, None) self.assertEqual(self.fi.a.im_self, self.fi) cannot_set_attr(self.f.a, "im_self", None, TypeError) cannot_set_attr(self.fi.a, "im_self", self.fi, TypeError)
83eab6910e0145bc66eaf399de3570146bc6a09d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8125/83eab6910e0145bc66eaf399de3570146bc6a09d/test_funcattrs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 381, 67, 2890, 12, 2890, 4672, 365, 18, 11231, 5812, 12, 2890, 18, 74, 18, 69, 18, 381, 67, 2890, 16, 599, 13, 365, 18, 11231, 5812, 12, 2890, 18, 22056, 18, 69, 18, 381,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 381, 67, 2890, 12, 2890, 4672, 365, 18, 11231, 5812, 12, 2890, 18, 74, 18, 69, 18, 381, 67, 2890, 16, 599, 13, 365, 18, 11231, 5812, 12, 2890, 18, 22056, 18, 69, 18, 381,...
apps = [migration.get_app(app)]
apps = [migration.get_app(app.split(".")[-1])]
def handle(self, app=None, target=None, skip=False, merge=False, only=False, backwards=False, fake=False, db_dry_run=False, list=False, **options):
15d0c106b7545eadd073d26079dea4deb6f88e3c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/13142/15d0c106b7545eadd073d26079dea4deb6f88e3c/migrate.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 12, 2890, 16, 595, 33, 7036, 16, 1018, 33, 7036, 16, 2488, 33, 8381, 16, 2691, 33, 8381, 16, 1338, 33, 8381, 16, 12727, 33, 8381, 16, 10517, 33, 8381, 16, 1319, 67, 25011, 67, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 12, 2890, 16, 595, 33, 7036, 16, 1018, 33, 7036, 16, 2488, 33, 8381, 16, 2691, 33, 8381, 16, 1338, 33, 8381, 16, 12727, 33, 8381, 16, 10517, 33, 8381, 16, 1319, 67, 25011, 67, ...
return "%s>%s</%s>" % (renderTag(tag, **kw), contents, tag)
return u"%s>%s</%s>" % (renderTag(tag, **kw), contents, tag)
def renderElement(tag, **kw): if 'contents' in kw: contents = kw['contents'] del kw['contents'] return "%s>%s</%s>" % (renderTag(tag, **kw), contents, tag) else: return renderTag(tag, **kw) + " />"
0b2225846974a0b3c4595f543a4f3630f7cb6e8a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9530/0b2225846974a0b3c4595f543a4f3630f7cb6e8a/widget.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 1046, 12, 2692, 16, 2826, 9987, 4672, 309, 296, 3980, 11, 316, 5323, 30, 2939, 273, 5323, 3292, 3980, 3546, 1464, 5323, 3292, 3980, 3546, 327, 582, 28385, 87, 9822, 87, 1757, 9, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 1046, 12, 2692, 16, 2826, 9987, 4672, 309, 296, 3980, 11, 316, 5323, 30, 2939, 273, 5323, 3292, 3980, 3546, 1464, 5323, 3292, 3980, 3546, 327, 582, 28385, 87, 9822, 87, 1757, 9, ...
if headers.get('content-type', '').startswith('text/'):
content_type = headers.get('content-type', '') if (content_type.startswith('text/') or content_type == 'application/x-javascript'):
def remove_header(self, key): for i, (k, v) in enumerate(self.headers): if key == k: self.headers.pop(i) return
bd015199706fd7f60660cfa0417fd5a1e874298d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3776/bd015199706fd7f60660cfa0417fd5a1e874298d/httparchive.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1206, 67, 3374, 12, 2890, 16, 498, 4672, 364, 277, 16, 261, 79, 16, 331, 13, 316, 4241, 12, 2890, 18, 2485, 4672, 309, 498, 422, 417, 30, 365, 18, 2485, 18, 5120, 12, 77, 13, 327, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1206, 67, 3374, 12, 2890, 16, 498, 4672, 364, 277, 16, 261, 79, 16, 331, 13, 316, 4241, 12, 2890, 18, 2485, 4672, 309, 498, 422, 417, 30, 365, 18, 2485, 18, 5120, 12, 77, 13, 327, ...
'vcd', 'dvd', None ]
'vcd', 'dvd', 'empty_cdrom' ]
def main_menu_generate(self): """ generate the items for the main menu. This is needed when first generating the menu and if something changes by pressing the EJECT button """ items = copy.copy(self.normal_items)
1a4d554ba7dacf4c310ac08b0eccd2d04180edce /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/1a4d554ba7dacf4c310ac08b0eccd2d04180edce/mediamenu.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 67, 5414, 67, 7163, 12, 2890, 4672, 3536, 2103, 326, 1516, 364, 326, 2774, 3824, 18, 1220, 353, 3577, 1347, 1122, 12516, 326, 3824, 471, 309, 5943, 3478, 635, 11779, 310, 326, 512,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 67, 5414, 67, 7163, 12, 2890, 4672, 3536, 2103, 326, 1516, 364, 326, 2774, 3824, 18, 1220, 353, 3577, 1347, 1122, 12516, 326, 3824, 471, 309, 5943, 3478, 635, 11779, 310, 326, 512,...