rem
stringlengths
2
226k
add
stringlengths
0
227k
context
stringlengths
8
228k
meta
stringlengths
156
215
input_ids
list
attention_mask
list
labels
list
log( 'Player found: %s (%s in %s)', app_name, filename, dir)
log( 'Player found: %s (%s)', app_name, filename)
def parse_and_append( self, dir, filename): parser = RawConfigParser() parser.read( [ dir + filename ]) if not parser.has_section( sect): return try: app_name = parser.get( sect, 'Name') app_cmd = parser.get( sect, 'Exec') app_mime = parser.get( sect, 'MimeType') app_icon = parser.get( sect, 'Icon') if app_mime.find( 'audio/') != -1: log( 'Player found: %s (%s in %s)', app_name, filename, dir) self.apps.append( UserApplication( app_name, app_cmd, app_mime, app_icon)) except: return
9b165cce8d20e551951ed5d0f6a94b0556448e7d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12778/9b165cce8d20e551951ed5d0f6a94b0556448e7d/libplayers.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 464, 67, 6923, 12, 365, 16, 1577, 16, 1544, 4672, 2082, 273, 6576, 809, 2678, 1435, 2082, 18, 896, 12, 306, 1577, 397, 1544, 308, 13, 309, 486, 2082, 18, 5332, 67, 3464, 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, 1109, 67, 464, 67, 6923, 12, 365, 16, 1577, 16, 1544, 4672, 2082, 273, 6576, 809, 2678, 1435, 2082, 18, 896, 12, 306, 1577, 397, 1544, 308, 13, 309, 486, 2082, 18, 5332, 67, 3464, 12...
self.assertEqual(slice(TrapLong(0)).indices(0), (0,0,1))
def test_subclasses(self): r = list(range(10)) self.assertEqual(r[TrapInt(5):TrapInt(10)], r[5:10]) self.assertEqual(r[TrapLong(5):TrapLong(10)], r[5:10]) self.assertEqual(slice(TrapInt()).indices(0), (0,0,1)) self.assertEqual(slice(TrapLong(0)).indices(0), (0,0,1))
dd2f2fb6f49a3894e0f0d77b54f58e720924c666 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8125/dd2f2fb6f49a3894e0f0d77b54f58e720924c666/test_index.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 1717, 4701, 12, 2890, 4672, 436, 273, 666, 12, 3676, 12, 2163, 3719, 365, 18, 11231, 5812, 12, 86, 63, 56, 1266, 1702, 12, 25, 4672, 56, 1266, 1702, 12, 2163, 13, 6487, 436...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1717, 4701, 12, 2890, 4672, 436, 273, 666, 12, 3676, 12, 2163, 3719, 365, 18, 11231, 5812, 12, 86, 63, 56, 1266, 1702, 12, 25, 4672, 56, 1266, 1702, 12, 2163, 13, 6487, 436...
self.vbox.remove(self.instrbar)
for i in self.vbox.get_children(): if i == self.instrbar: self.vbox.remove(self.instrbar)
def Update(self): """ Updates the mix view when requested by OnStateChanged or __init__ Returns: False -- indicates the GTK signal to: 1) continue propagating the regular signal. 2) stop calling the callback on a timeout_add. """ if self.Updating: return self.Updating = True self.projectview.Update() # remove all the mixer strips and then add the visible ones for strip in self.hbox.get_children(): self.hbox.remove(strip) for instr in self.project.instruments: if instr.isVisible: strip = None for channel in self.channels: if channel.instrument is instr: strip = channel strip.Update() break if not strip: strip = MixerStrip(self.project, instr, self, self.mainview) strip.connect("minimise", self.OnMinimiseTrack, instr) self.channels.append(strip) self.hbox.pack_start(strip, False, False) removeList = [] for strip in self.channels: if not strip.instrument in self.project.instruments: strip.Destroy() removeList.append(strip) for item in removeList: self.channels.remove(item) del removeList #Pack the master vuwidget self.hbox.pack_end(self.mastermixer, False, False) #create the minimise instruments bar if self.instrbar: self.vbox.remove(self.instrbar) self.instrbar = gtk.Toolbar() self.instrbar.set_show_arrow(True) self.instrbar.set_style(gtk.TOOLBAR_BOTH_HORIZ) self.vbox.pack_end(self.instrbar, False, True) toollab = gtk.ToolItem() lab = gtk.Label() lab.set_markup(_("<b>Instruments Not Shown:</b>")) toollab.add(lab) toollab.set_is_important(True) self.instrbar.insert(toollab, 0)
d8662fee38a4a9ea01ea1d006814416826c505d7 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/10033/d8662fee38a4a9ea01ea1d006814416826c505d7/CompactMixView.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2315, 12, 2890, 4672, 3536, 15419, 326, 6843, 1476, 1347, 3764, 635, 2755, 1119, 5033, 578, 1001, 2738, 972, 225, 2860, 30, 1083, 1493, 8527, 326, 19688, 47, 4277, 358, 30, 404, 13, 1324...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2315, 12, 2890, 4672, 3536, 15419, 326, 6843, 1476, 1347, 3764, 635, 2755, 1119, 5033, 578, 1001, 2738, 972, 225, 2860, 30, 1083, 1493, 8527, 326, 19688, 47, 4277, 358, 30, 404, 13, 1324...
rvsb = stats.beta.rvs(5,15,size=200)
rvsb = stats.beta.rvs(10,15,size=2000) print 'true params', 10, 15, 0, 1
def fit_mps(dist, data, x0=None): '''Estimate distribution parameters with Maximum Product-of-Spacings Parameters ---------- params : array_like, tuple ? parameters of the distribution funciton xsorted : array_like data that is already sorted dist : instance of a distribution class only cdf method is used Returns ------- x : ndarray estimates for the parameters of the distribution given the data, including loc and scale ''' xsorted = np.sort(data) if x0 is None: x0 = getstartparams(dist, xsorted) args = (xsorted, dist) print x0 #print args return optimize.fmin(logmps, x0, args=args)
5f2eb2d33199a53672ca83d83a79594ede00c4f7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12658/5f2eb2d33199a53672ca83d83a79594ede00c4f7/distribution_estimators.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4845, 67, 81, 1121, 12, 4413, 16, 501, 16, 619, 20, 33, 7036, 4672, 9163, 13638, 7006, 1472, 598, 18848, 8094, 17, 792, 17, 3389, 1077, 899, 225, 7012, 12181, 859, 294, 526, 67, 5625, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4845, 67, 81, 1121, 12, 4413, 16, 501, 16, 619, 20, 33, 7036, 4672, 9163, 13638, 7006, 1472, 598, 18848, 8094, 17, 792, 17, 3389, 1077, 899, 225, 7012, 12181, 859, 294, 526, 67, 5625, ...
L{xml.dom.minidom.Element}
L{markup.ParsedDocstring}
def __repr__(self): return '<Field: %s>' % self.tags[0]
7140f1248773f589eaa5826bd2b3d64a09ab01f2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/7140f1248773f589eaa5826bd2b3d64a09ab01f2/objdoc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 12715, 972, 12, 2890, 4672, 327, 2368, 974, 30, 738, 87, 1870, 738, 365, 18, 4156, 63, 20, 65, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 12715, 972, 12, 2890, 4672, 327, 2368, 974, 30, 738, 87, 1870, 738, 365, 18, 4156, 63, 20, 65, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
skmod_src=src_path+'extentions/skmod/'
skmod_src=src_path+'extensions/skmod/'
def generate_locales(): print 'LOCALES BUILD' files=get_files('po','po') if len(files): for file in files: lang=file.split('.')[0] po_file=os.path.join('po',file) mo_file=os.path.join('src','share','locales',lang,'LC_MESSAGES','sk1.mo') if not os.path.lexists(os.path.join('src','share','locales',lang,'LC_MESSAGES')): os.makedirs(os.path.join('src','share','locales',lang,'LC_MESSAGES')) print po_file, '==>',mo_file os.system('msgfmt -o '+mo_file+' '+po_file)
6b91f31c59e36c11dc38a3113f73ac69decc3592 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3123/6b91f31c59e36c11dc38a3113f73ac69decc3592/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 67, 22638, 13332, 1172, 296, 1502, 3587, 11386, 30054, 11, 1390, 33, 588, 67, 2354, 2668, 1631, 17023, 1631, 6134, 309, 562, 12, 2354, 4672, 364, 585, 316, 1390, 30, 3303, 33, 768,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 67, 22638, 13332, 1172, 296, 1502, 3587, 11386, 30054, 11, 1390, 33, 588, 67, 2354, 2668, 1631, 17023, 1631, 6134, 309, 562, 12, 2354, 4672, 364, 585, 316, 1390, 30, 3303, 33, 768,...
"""
r"""
def laplace_transform(self,var = "s",latex_output=0): """ Returns the laplace transform of self, as a function of var. We assume that a piecewise function is 0 outside of its domain and that the left-most endpoint of the domain is 0.
1647ed1843fe080249d8ccf31cefcde17c19a01d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9890/1647ed1843fe080249d8ccf31cefcde17c19a01d/piecewise.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7125, 964, 67, 6547, 12, 2890, 16, 1401, 273, 315, 87, 3113, 26264, 67, 2844, 33, 20, 4672, 436, 8395, 2860, 326, 7125, 964, 2510, 434, 365, 16, 487, 279, 445, 434, 569, 18, 1660, 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, 7125, 964, 67, 6547, 12, 2890, 16, 1401, 273, 315, 87, 3113, 26264, 67, 2844, 33, 20, 4672, 436, 8395, 2860, 326, 7125, 964, 2510, 434, 365, 16, 487, 279, 445, 434, 569, 18, 1660, 67...
u_iso = xray_structure.scatterers().extract_u_iso()
u_iso = xray_structure.scatterers().extract_u_iso().select( xray_structure.use_u_iso())
def split_u(xray_structure, tls_selections, offset): global time_split_u timer = user_plus_sys_time() uc = xray_structure.unit_cell() u_iso = xray_structure.scatterers().extract_u_iso() u_eq_1 = xray_structure.extract_u_iso_or_u_equiv() for tls_selection in tls_selections: u_iso_sel = u_iso.select(tls_selection) u_iso_min = flex.min(u_iso_sel) if(offset): offset_ = adptbx.b_as_u(5.0) else: offset_ = 0.0 if u_iso_min >= offset_: u_iso_min = u_iso_min - offset_ t = adptbx.u_iso_as_u_star(uc, u_iso_min) for i_seq in tls_selection: sc = xray_structure.scatterers()[i_seq] assert sc.u_iso == u_iso[i_seq] u_iso_new = sc.u_iso - u_iso_min assert u_iso_new >= 0.0 sc.u_iso = u_iso_new assert sc.flags.use_u_aniso() assert sc.flags.use_u_iso() if(sc.u_star == (-1.0,-1.0,-1.0,-1.0,-1.0,-1.0)): sc.u_star = t else: x = flex.double(sc.u_star) y = flex.double(t) z = list(x + y) sc.u_star = z u_iso = xray_structure.scatterers().extract_u_iso() assert (u_iso < 0.0).count(True) == 0 u_eq_2 = xray_structure.extract_u_iso_or_u_equiv() assert approx_equal(u_eq_1, u_eq_2) time_split_u += timer.elapsed()
779010742155ba279dd06928d3ddb275b1dcbf05 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/696/779010742155ba279dd06928d3ddb275b1dcbf05/tools.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1416, 67, 89, 12, 92, 435, 67, 7627, 16, 6871, 67, 10705, 87, 16, 1384, 4672, 2552, 813, 67, 4939, 67, 89, 5441, 273, 729, 67, 10103, 67, 9499, 67, 957, 1435, 6232, 273, 619, 435, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1416, 67, 89, 12, 92, 435, 67, 7627, 16, 6871, 67, 10705, 87, 16, 1384, 4672, 2552, 813, 67, 4939, 67, 89, 5441, 273, 729, 67, 10103, 67, 9499, 67, 957, 1435, 6232, 273, 619, 435, ...
default_compiler = { 'posix': 'unix', 'nt': 'msvc', 'mac': 'mwerks', }
_default_compilers = ( ('cygwin.*', 'cygwin'), ('posix', 'unix'), ('nt', 'msvc'), ('mac', 'mwerks'), ) def get_default_compiler(osname=None, platform=None): """ Determine the default compiler to use for the given platform. osname should be one of the standard Python OS names (i.e. the ones returned by os.name) and platform the common value returned by sys.platform for the platform in question. The default values are os.name and sys.platform in case the parameters are not given. """ if osname is None: osname = os.name if platform is None: platform = sys.platform for pattern, compiler in _default_compilers: if re.match(pattern, platform) is not None or \ re.match(pattern, osname) is not None: return compiler return 'unix'
def mkpath (self, name, mode=0777): mkpath (name, mode, self.verbose, self.dry_run)
4be4be8ede8d2cb760abf6af749f2bd1c0178bc9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/4be4be8ede8d2cb760abf6af749f2bd1c0178bc9/ccompiler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5028, 803, 261, 2890, 16, 508, 16, 1965, 33, 20, 14509, 4672, 5028, 803, 261, 529, 16, 1965, 16, 365, 18, 11369, 16, 365, 18, 25011, 67, 2681, 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, 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, 5028, 803, 261, 2890, 16, 508, 16, 1965, 33, 20, 14509, 4672, 5028, 803, 261, 529, 16, 1965, 16, 365, 18, 11369, 16, 365, 18, 25011, 67, 2681, 13, 2, -100, -100, -100, -100, -100, -1...
if len(sys.argv) != 2: sys.stderr.write('usage: telnet hostname\n')
if len(sys.argv) < 2: sys.stderr.write('usage: telnet hostname [port]\n')
def main(): if len(sys.argv) != 2: sys.stderr.write('usage: telnet hostname\n') sys.exit(2) host = sys.argv[1] try: hostaddr = gethostbyname(host) except error: sys.stderr.write(sys.argv[1] + ': bad host name\n') sys.exit(2) # if len(sys.argv) > 2: servname = sys.argv[2] else: servname = 'telnet' # if '0' <= servname[:1] <= '9': port = eval(servname) else: try: port = getservbyname(servname, 'tcp') except error: sys.stderr.write(servname + ': bad tcp service name\n') sys.exit(2) # s = socket(AF_INET, SOCK_STREAM) # try: s.connect(host, port) except error, msg: sys.stderr.write('connect failed: ' + `msg` + '\n') sys.exit(1) # thread.start_new(child, (s,)) parent(s)
0a11042342ae6c774fd19228d6eecfa34e75a01c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/0a11042342ae6c774fd19228d6eecfa34e75a01c/telnet.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 309, 562, 12, 9499, 18, 19485, 13, 411, 576, 30, 2589, 18, 11241, 18, 2626, 2668, 9167, 30, 20666, 2758, 5199, 306, 655, 13944, 82, 6134, 2589, 18, 8593, 12, 22, 13, 1479,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 309, 562, 12, 9499, 18, 19485, 13, 411, 576, 30, 2589, 18, 11241, 18, 2626, 2668, 9167, 30, 20666, 2758, 5199, 306, 655, 13944, 82, 6134, 2589, 18, 8593, 12, 22, 13, 1479,...
self.close()
self.close()
def handle_close (self):
9ef0eb402d9dcd1f9a44788a7d02c8d87b2dde07 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8169/9ef0eb402d9dcd1f9a44788a7d02c8d87b2dde07/HttpReplicator.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 67, 4412, 261, 2890, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 67, 4412, 261, 2890, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
def tags_win_create_apply_all_button(self, button, vbox, entry, autotrack=False):
def tags_win_create_apply_all_button(self, button, entry, autotrack=False):
def tags_win_create_apply_all_button(self, button, vbox, entry, autotrack=False): button.set_size_request(12, 12) if autotrack: button.set_tooltip_text(_("Increment each selected music file, starting at track 1 for this file.")) else: button.set_tooltip_text(_("Apply to all selected music files.")) padding = int((entry.size_request()[1] - button.size_request()[1])/2)+1 vbox.pack_start(button, False, False, padding)
28fcba0e29af1c09d48bf18063cbf8f66985ca38 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2312/28fcba0e29af1c09d48bf18063cbf8f66985ca38/tagedit.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2342, 67, 8082, 67, 2640, 67, 9010, 67, 454, 67, 5391, 12, 2890, 16, 3568, 16, 1241, 16, 3656, 4101, 33, 8381, 4672, 3568, 18, 542, 67, 1467, 67, 2293, 12, 2138, 16, 2593, 13, 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, 2342, 67, 8082, 67, 2640, 67, 9010, 67, 454, 67, 5391, 12, 2890, 16, 3568, 16, 1241, 16, 3656, 4101, 33, 8381, 4672, 3568, 18, 542, 67, 1467, 67, 2293, 12, 2138, 16, 2593, 13, 309, ...
title = self.renderText(article.caption)
title = self.renderText(article.caption, break_long=True)
def writeArticle(self, article): self.references = [] title = self.renderText(article.caption) log.info('rendering: %r' % title) if self.layout_status: self.layout_status(article=title) self.articlecount += 1 elements = [] pt = WikiPage(title) if hasattr(self, 'doc'): # doc is not present if tests are run self.doc.addPageTemplates(pt) elements.append(NextPageTemplate(title.encode('utf-8'))) # pagetemplate.id cant handle unicode # FIXME remove the getPrevious below if not getattr(article, 'has_preceeding_chapter', False) or isinstance(article.getPrevious(), advtree.Article) or self.license_mode: if pdfstyles.page_break_after_article: # if configured and preceded by an article elements.append(NotAtTopPageBreak()) elif miscutils.articleStartsWithInfobox(article, max_text_until_infobox=100): elements.append(CondPageBreak(pdfstyles.article_start_min_space_infobox)) else: elements.append(CondPageBreak(pdfstyles.article_start_min_space))
e118ba4a9e2b1a65cf6802702fbb3b52e9a3639d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12390/e118ba4a9e2b1a65cf6802702fbb3b52e9a3639d/rlwriter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 7880, 12, 2890, 16, 7559, 4672, 365, 18, 14353, 273, 5378, 2077, 273, 365, 18, 5902, 1528, 12, 11480, 18, 15386, 16, 898, 67, 5748, 33, 5510, 13, 613, 18, 1376, 2668, 5902, 310, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 7880, 12, 2890, 16, 7559, 4672, 365, 18, 14353, 273, 5378, 2077, 273, 365, 18, 5902, 1528, 12, 11480, 18, 15386, 16, 898, 67, 5748, 33, 5510, 13, 613, 18, 1376, 2668, 5902, 310, ...
return HttpResponseRedirect(reverse('profile'))
return HttpResponseRedirect(reverse('user-keys-list', args=[user_id]))
def key_delete(request, key_id=None): user = request.user key_edit = get_object_or_404(SSHKey, pk=key_id) if not (user.is_superuser or key_edit.user==user): return HttpResponseForbidden('Only superuser or owner can delete user\'s SSH key.') key_edit.delete() return HttpResponseRedirect(reverse('profile'))
de7079f3b6ba425af07463ca7c80d015c628b16b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10509/de7079f3b6ba425af07463ca7c80d015c628b16b/users.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 498, 67, 3733, 12, 2293, 16, 498, 67, 350, 33, 7036, 4672, 729, 273, 590, 18, 1355, 498, 67, 4619, 273, 336, 67, 1612, 67, 280, 67, 11746, 12, 12559, 653, 16, 2365, 33, 856, 67, 35...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 498, 67, 3733, 12, 2293, 16, 498, 67, 350, 33, 7036, 4672, 729, 273, 590, 18, 1355, 498, 67, 4619, 273, 336, 67, 1612, 67, 280, 67, 11746, 12, 12559, 653, 16, 2365, 33, 856, 67, 35...
None, [cty.c_long],
None, [cty.c_long],
def flps_circ(p1, p2, p3, p4, p5): """ flps_circ(p1, p2, p3, p4, p5) """ _flps_circ(p1, p2, p3, p4, p5)
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, 1121, 67, 11614, 71, 12, 84, 21, 16, 293, 22, 16, 293, 23, 16, 293, 24, 16, 293, 25, 4672, 3536, 1183, 1121, 67, 11614, 71, 12, 84, 21, 16, 293, 22, 16, 293, 23, 16, 293, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1121, 67, 11614, 71, 12, 84, 21, 16, 293, 22, 16, 293, 23, 16, 293, 24, 16, 293, 25, 4672, 3536, 1183, 1121, 67, 11614, 71, 12, 84, 21, 16, 293, 22, 16, 293, 23, 16, 293, ...
'unixware5':
'unixware7':
def printlist(x, width=70, indent=4): """Print the elements of iterable x to stdout. Optional arg width (default 70) is the maximum line length. Optional arg indent (default 4) is the number of blanks with which to begin each line. """ from textwrap import fill blanks = ' ' * indent print fill(' '.join(map(str, x)), width, initial_indent=blanks, subsequent_indent=blanks)
2f85b46e802663f3f42868abd5f70863be7d86e1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2f85b46e802663f3f42868abd5f70863be7d86e1/regrtest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1172, 1098, 12, 92, 16, 1835, 33, 7301, 16, 3504, 33, 24, 4672, 3536, 5108, 326, 2186, 434, 6087, 619, 358, 3909, 18, 225, 4055, 1501, 1835, 261, 1886, 16647, 13, 353, 326, 4207, 980, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1172, 1098, 12, 92, 16, 1835, 33, 7301, 16, 3504, 33, 24, 4672, 3536, 5108, 326, 2186, 434, 6087, 619, 358, 3909, 18, 225, 4055, 1501, 1835, 261, 1886, 16647, 13, 353, 326, 4207, 980, ...
approx = self._complex_mpfr_field_(ComplexField(field.prec()))
approx = self._complex_mpfr_field_(ComplexField(prec))
def numerical_approximation(self, prec=53): """ Get a numerical approximation of self as either a real or complex number.
d30234dcef2a125c3c3933121558e10cbed8dea3 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9417/d30234dcef2a125c3c3933121558e10cbed8dea3/calculus.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17409, 67, 26742, 5115, 12, 2890, 16, 13382, 33, 8643, 4672, 3536, 968, 279, 17409, 24769, 434, 365, 487, 3344, 279, 2863, 578, 7233, 1300, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17409, 67, 26742, 5115, 12, 2890, 16, 13382, 33, 8643, 4672, 3536, 968, 279, 17409, 24769, 434, 365, 487, 3344, 279, 2863, 578, 7233, 1300, 18, 2, -100, -100, -100, -100, -100, -100, -10...
description=_("%s Personalize, Main page") % cdsnameintl.get(args['ln'], cdsname), keywords=_("%s , personalize") % cdsnameintl.get(args['ln'], cdsname),
description="%s Personalize, Main page" % cdsnameintl.get(args['ln'], cdsname), keywords="%s , personalize" % cdsnameintl.get(args['ln'], cdsname),
def login(self, req, form): args = wash_urlargd(form, { 'p_un': (str, None), 'p_pw': (str, None), 'login_method': (str, None), 'action': (str, ''), 'referer': (str, '')})
0fdc70575318c17fadb1476e7759f2e992d9c45b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12027/0fdc70575318c17fadb1476e7759f2e992d9c45b/websession_webinterface.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3925, 12, 2890, 16, 1111, 16, 646, 4672, 833, 273, 341, 961, 67, 718, 3175, 72, 12, 687, 16, 288, 296, 84, 67, 318, 4278, 261, 701, 16, 599, 3631, 296, 84, 67, 14921, 4278, 261, 70...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3925, 12, 2890, 16, 1111, 16, 646, 4672, 833, 273, 341, 961, 67, 718, 3175, 72, 12, 687, 16, 288, 296, 84, 67, 318, 4278, 261, 701, 16, 599, 3631, 296, 84, 67, 14921, 4278, 261, 70...
attr = "NS_%s" % (nsdata[ns]['canonical'].replace(' ', '_').upper())
try: attr = "NS_%s" % (nsdata[ns]['canonical'].replace(' ', '_').upper()) except KeyError: attr = "NS_%s" % (nsdata[ns]['*'].replace(' ', '_').upper())
def setSiteinfo(self): """Retrieves basic siteinfo Called when constructing, or after login if the first call failed """ params = {'action':'query', 'meta':'siteinfo', 'siprop':'general|namespaces|namespacealiases', } if self.maxlag < 120: params['maxlag'] = 120 req = api.APIRequest(self, params) info = req.query() sidata = info['query']['general'] for item in sidata: self.siteinfo[item] = sidata[item] nsdata = info['query']['namespaces'] for ns in nsdata: nsinfo = nsdata[ns] self.namespaces[nsinfo['id']] = nsinfo if ns != "0": attr = "NS_%s" % (nsdata[ns]['canonical'].replace(' ', '_').upper()) else: attr = "NS_MAIN" setattr(self, attr.encode('utf8'), Namespace(ns.encode('utf8'))) nsaliasdata = info['query']['namespacealiases'] if nsaliasdata: for ns in nsaliasdata: self.NSaliases[ns['*']] = ns['id'] if not 'writeapi' in sidata: print "WARNING: Write-API not enabled, you will not be able to edit" version = re.search("\d\.(\d\d)", self.siteinfo['generator']) if not int(version.group(1)) >= 13: # Will this even work on 13? print "WARNING: Some features may not work on older versions of MediaWiki" return self
a272001a596e895fe13d86be11333bd72d7e5487 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8398/a272001a596e895fe13d86be11333bd72d7e5487/wiki.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 4956, 1376, 12, 2890, 4672, 3536, 6960, 5337, 2834, 1376, 225, 11782, 1347, 27389, 16, 578, 1839, 3925, 309, 326, 1122, 745, 2535, 225, 3536, 859, 273, 13666, 1128, 11, 2497, 2271, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4956, 1376, 12, 2890, 4672, 3536, 6960, 5337, 2834, 1376, 225, 11782, 1347, 27389, 16, 578, 1839, 3925, 309, 326, 1122, 745, 2535, 225, 3536, 859, 273, 13666, 1128, 11, 2497, 2271, ...
def populate() :
def populate():
def populate() : doc,root = cleanxml.emptydoc("project") #Task 0@1 : Getting started with GTG title1 = _("Getting started with GTG") text1 = _("Welcome in Getting Things Gnome!, your new task manager.") text1 += "\n\n" text1 += _("In GTG, everything is a task. From building a bridge over the Pacific Ocean to changing a light bulb or organizing a party. When you edit a task, it is automatically saved.") text1 += "\n\n" text1 += _("Once a task is done, you can push the &quot;Mark as done&quot; button. If the task is not relevant any-more, simply press &quot;Dismiss&quot;.") text1 += "\n\n" text1 += _("A task might be composed of multiple subtasks that appear as links in the description. Simply click on the following link :") text1 += "\n" text1 += "<subtask>1@1</subtask>\n" text1 += "\n\n" text1 += _("Don't forget to mark this subtask as done !") text1 += "\n\n" text1 += _("Other stuff you should read :") text1 += "\n" text1 += "<subtask>2@1</subtask>\n" text1 += "<subtask>3@1</subtask>\n" text1 += "<subtask>4@1</subtask>\n" text1 += "\n\n" text1 += _("We hope that you will appreciate GTG. Please send us bug reports and ideas for improvement using : ") text1 += "https://bugs.launchpad.net/gtg" text1 += "\n\n" text1 += _("Thank you for trying out GTG :-)") t1 = addtask(doc,"0@1",title1,text1,["1@1","2@1","3@1","4@1"]) root.appendChild(t1) #Task 1@1 : Learn to use subtasks title2 = _("Learn to use subtasks") text2 = _("In the task description (this window), if you begin a line with &quot;-&quot;, it will be considered as a &quot;subtask&quot;, something that needs to be done in order to accomplish your task. Just try to write &quot;- test subtask&quot; on the next line and press enter.") text2 += "\n\n" text2 += _("You can also use the &quot;insert subtask&quot; button.") text2 += "\n\n\n" text2 += _("Task and subtasks can be re-organized by drag-n-drop in the tasks list.") text2 += "\n\n" text2 += _("Some concept come with subtasks : for example, a subtask due date can never be after its parent due date.") text2 += "\n\n" text2 += _("Also, marking a parent as done will mark all the subtasks as done.") t2 = addtask(doc,"1@1",title2,text2,[]) root.appendChild(t2) #Task 2@1 : Learn to use tags title3 = _("Learn to use tags") text3 = _("A tag is a simple word that begin with &quot;@&quot;.") text3 += "\n\n" text3 += _("Try to type a word beginning with @ here :") text3 += "\n\n" text3 += _("It becomes yellow, it's a tag.") text3 += "\n\n" text3 += _("Tags are useful to sort your tasks. In the view menu, you can enable a sidebar which displays all the tags you are using so you can easily see tasks for a given tag. There's no limit to the number of tags a task can have.") text3 += "\n\n" text3 += _("If you right click on a tag in the sidebar you can also set its color. It will permit you to have a more colorful list of tasks, if you want it that way.") text3 += "\n\n" text3 += _("A new tag is only added to the current task. There's no recursivity and the tag is not applied to subtasks. But when you create a new subtask, this subtask will inherit the tags of its parent as a good primary default (it will also be the case if you add a tag to a parent just after creating a subtask). Of course, you can modify at any time the tags of this particular subtask. It will never be changed by the parent.") t3 = addtask(doc,"2@1",title3,text3,[]) root.appendChild(t3) #Task 3@1 : Using the Workview title4 = _("Using the Workview") text4 = _("If you press the &quot;Workview&quot; button, only actionable tasks will be displayed.") text4 += "\n\n" text4 += _("What is an actionable task? It's a task you can do directly, right now.") text4 += "\n\n" text4 += _("It's a task that is already &quot;start-able&quot;, i.e. the start date is already over.") text4 += "\n\n" text4 += _("It's a task that doesn't have open subtasks, i.e. you can do the task itself directly.") text4 += "\n\n" text4 += _("Thus, the workview will only show you tasks you should do right now.") text4 += "\n\n" text4 += _("If you use tags, you can right click on a tag in the sidebar and choose to not display tasks with this particular tag in the workview. It's very useful if you have a tag like &quot;someday&quot; that you use for tasks you would like to do but are not particularly urgent.") t4 = addtask(doc,"3@1",title4,text4,[]) root.appendChild(t4) #Task 4@1 : Reporting bugs title5 = _("Reporting bugs") text5 = _("GTG is still very alpha software. We like it and use it everyday but you will encounter some bugs.") text5 += "\n\n" text5 += _("Please, report them ! We need you to make this software better. Any contribution, any idea is welcome.") text5 += "\n\n" text5 += _("If you have some trouble with GTG, we might be able to help you or to solve your problem really quickly.") t5 = addtask(doc,"4@1",title5,text5,[]) root.appendChild(t5) return doc
e5bb674db8dc80fc0b68053f5ab1782bdfcbe3f3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7036/e5bb674db8dc80fc0b68053f5ab1782bdfcbe3f3/firstrun_tasks.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6490, 13332, 997, 16, 3085, 273, 2721, 2902, 18, 5531, 2434, 2932, 4406, 7923, 468, 2174, 374, 36, 21, 294, 26602, 5746, 598, 19688, 43, 2077, 21, 273, 389, 2932, 19213, 5746, 598, 19688...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6490, 13332, 997, 16, 3085, 273, 2721, 2902, 18, 5531, 2434, 2932, 4406, 7923, 468, 2174, 374, 36, 21, 294, 26602, 5746, 598, 19688, 43, 2077, 21, 273, 389, 2932, 19213, 5746, 598, 19688...
script_args = ['-q','easy_install', '-v']+argv,
script_args = ['-q','easy_install', '-v']+argv,
def _show_help(self,*args,**kw): with_ei_usage(lambda: Distribution._show_help(self,*args,**kw))
6bd7460a036613a1ef0fb1f7115c5833c1fd4efb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8186/6bd7460a036613a1ef0fb1f7115c5833c1fd4efb/easy_install.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4500, 67, 5201, 12, 2890, 16, 14, 1968, 16, 636, 9987, 4672, 598, 67, 73, 77, 67, 9167, 12, 14661, 30, 17547, 6315, 4500, 67, 5201, 12, 2890, 16, 14, 1968, 16, 636, 9987, 3719, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4500, 67, 5201, 12, 2890, 16, 14, 1968, 16, 636, 9987, 4672, 598, 67, 73, 77, 67, 9167, 12, 14661, 30, 17547, 6315, 4500, 67, 5201, 12, 2890, 16, 14, 1968, 16, 636, 9987, 3719, ...
def validate(self):
def prevalidate(self):
def validate(self): self.validate_optional_attribute((None,'id'), unique('id',self.parent))
d3afc0dc38c01c318675e7fb84cdcf2833d67ca6 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5012/d3afc0dc38c01c318675e7fb84cdcf2833d67ca6/kml.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 675, 5662, 12, 2890, 4672, 365, 18, 5662, 67, 10444, 67, 4589, 12443, 7036, 11189, 350, 19899, 3089, 2668, 350, 2187, 2890, 18, 2938, 3719, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 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, 675, 5662, 12, 2890, 4672, 365, 18, 5662, 67, 10444, 67, 4589, 12443, 7036, 11189, 350, 19899, 3089, 2668, 350, 2187, 2890, 18, 2938, 3719, 2, -100, -100, -100, -100, -100, -100, -100, -...
siteCount = siteCount + 1 print 'ERROR: file not saved to %s - using now %s ...' %(siteID, temp_locations[siteCount] ) count = 0
if siteCount<len(temp_locations): siteCount = siteCount + 1 count = 0 print 'ERROR: file not saved to %s - using now %s ...' %(siteID, temp_locations[siteCount] ) else: count = retry
def check_duplicates_in_dataset(datasetname, output_files): """Checks for duplicate output files in outputdataset""" try: dq2_lock.acquire() try: contents = dq2.listFilesInDataset(out_datasetname) except: print 'Problem retrieving content info dataset %s from DQ2! ' %datasetname return finally: dq2_lock.release() if not contents: print 'Dataset %s is empty.' %datasetname return contents = contents[0] fileNames = [] for guid, keys in contents.iteritems(): fileNames.append(keys['lfn']) filePattern = [] for fileName in fileNames: for outFile in output_files: patName = '\._(\w+)\.%s$'%outFile match = re.search(patName,fileName) if match: if match.group(0) in filePattern: print '!!!!!!!!!!! ATTENTION !!!!!!!!!!!!!!' print 'Possible duplicated output file %s in output dataset %s' %(fileName, datasetname) print 'After all subjobs have finished run j.outputdata.clean_duplicates_in_dataset()' print '!!!!!!!!!!! ATTENTION !!!!!!!!!!!!!!' else: filePattern.append(match.group(0)) return
fa6258d7325c3fd357d8a383251582542e171000 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1488/fa6258d7325c3fd357d8a383251582542e171000/ganga-stage-in-out-dq2.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 22449, 67, 267, 67, 8682, 12, 8682, 529, 16, 876, 67, 2354, 4672, 3536, 4081, 364, 6751, 876, 1390, 316, 876, 8682, 8395, 225, 775, 30, 20803, 22, 67, 739, 18, 1077, 1039, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 22449, 67, 267, 67, 8682, 12, 8682, 529, 16, 876, 67, 2354, 4672, 3536, 4081, 364, 6751, 876, 1390, 316, 876, 8682, 8395, 225, 775, 30, 20803, 22, 67, 739, 18, 1077, 1039, 1...
def http_error_407(self, url, fp, errcode, errmsg, headers, data=None):
def http_error_407(self, url, fp, errcode, errmsg, headers, data=None, retry=False):
def http_error_407(self, url, fp, errcode, errmsg, headers, data=None): """Error 407 -- proxy authentication required. This function supports Basic authentication only.""" if not 'proxy-authenticate' in headers: URLopener.http_error_default(self, url, fp, errcode, errmsg, headers) stuff = headers['proxy-authenticate'] import re match = re.match('[ \t]*([^ \t]+)[ \t]+realm="([^"]*)"', stuff) if not match: URLopener.http_error_default(self, url, fp, errcode, errmsg, headers) scheme, realm = match.groups() if scheme.lower() != 'basic': URLopener.http_error_default(self, url, fp, errcode, errmsg, headers) name = 'retry_proxy_' + self.type + '_basic_auth' if data is None: return getattr(self,name)(url, realm) else: return getattr(self,name)(url, realm, data)
9f3f9af2a2fa2bf13108fe4a0542882d307138dc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12029/9f3f9af2a2fa2bf13108fe4a0542882d307138dc/request.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1062, 67, 1636, 67, 7132, 27, 12, 2890, 16, 880, 16, 4253, 16, 393, 710, 16, 17460, 16, 1607, 16, 501, 33, 7036, 16, 3300, 33, 8381, 4672, 3536, 668, 8063, 27, 1493, 2889, 5107, 1931...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1062, 67, 1636, 67, 7132, 27, 12, 2890, 16, 880, 16, 4253, 16, 393, 710, 16, 17460, 16, 1607, 16, 501, 33, 7036, 16, 3300, 33, 8381, 4672, 3536, 668, 8063, 27, 1493, 2889, 5107, 1931...
``plot_vector_field}`` takes two functions of two variables xvar and yvar
``plot_vector_field`` takes two functions of two variables xvar and yvar
def plot_vector_field((f, g), xrange, yrange, **options): r""" ``plot_vector_field}`` takes two functions of two variables xvar and yvar (for instance, if the variables are `x` and `y`, take `(f(x,y), g(x,y))`) and plots vector arrows of the function over the specified ranges, with xrange being of xvar between xmin and xmax and yrange similarly (see below). plot_vector_field((f, g), (xvar, xmin, xmax), (yvar, ymin, ymax)) EXAMPLES: Plot some vector fields involving sin and cos:: sage: x,y = var('x y') sage: plot_vector_field((sin(x), cos(y)), (x,-3,3), (y,-3,3)) sage: plot_vector_field(( y, (cos(x)-2)*sin(x)), (x,-pi,pi), (y,-pi,pi)) Plot a gradient field:: sage: u,v = var('u v') sage: f = exp(-(u^2+v^2)) sage: plot_vector_field(f.gradient(), (u,-2,2), (v,-2,2)) We ignore function values that are infinite or NaN:: sage: x,y = var('x,y') sage: plot_vector_field( (-x/sqrt(x^2+y^2), -y/sqrt(x^2+y^2)), (x, -10, 10), (y, -10, 10)) sage: plot_vector_field( (-x/sqrt(x+y), -y/sqrt(x+y)), (x, -10, 10), (y, -10, 10)) """ from sage.plot.plot import setup_for_eval_on_grid, Graphics z, xstep, ystep, xrange, yrange = setup_for_eval_on_grid([f,g], xrange, yrange, options['plot_points']) f,g = z xpos_array, ypos_array, xvec_array, yvec_array = [],[],[],[] for x in xsrange(xrange[0], xrange[1], xstep, include_endpoint=True): for y in xsrange(yrange[0], yrange[1], ystep, include_endpoint=True): xpos_array.append(x) ypos_array.append(y) xvec_array.append(f(x,y)) yvec_array.append(g(x,y)) import numpy xvec_array = numpy.ma.masked_invalid(numpy.array(xvec_array, dtype=float)) yvec_array = numpy.ma.masked_invalid(numpy.array(yvec_array, dtype=float)) g = Graphics() g.add_primitive(PlotField(xpos_array, ypos_array, xvec_array, yvec_array, options)) return g
4066c1fc9f33e7aa34b6d922f2dcec69cbfd86b6 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/4066c1fc9f33e7aa34b6d922f2dcec69cbfd86b6/plot_field.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3207, 67, 7737, 67, 1518, 12443, 74, 16, 314, 3631, 12314, 16, 677, 3676, 16, 2826, 2116, 4672, 436, 8395, 12176, 4032, 67, 7737, 67, 1518, 10335, 5530, 2795, 4186, 434, 2795, 3152, 619,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3207, 67, 7737, 67, 1518, 12443, 74, 16, 314, 3631, 12314, 16, 677, 3676, 16, 2826, 2116, 4672, 436, 8395, 12176, 4032, 67, 7737, 67, 1518, 10335, 5530, 2795, 4186, 434, 2795, 3152, 619,...
print index
def next(self): index = wizard.index.get() print index try: self.pages[index].hide_page() wizard.index.set(index + 1) self.pages[index+1].frame.pack(side='right') self.pages[index+1].show_page() except IndexError: pass
da5b36b02b4777d12c9eea8794f6b7d3fb12a3c7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4675/da5b36b02b4777d12c9eea8794f6b7d3fb12a3c7/titleset-wizard.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1024, 12, 2890, 4672, 770, 273, 24204, 18, 1615, 18, 588, 1435, 775, 30, 365, 18, 7267, 63, 1615, 8009, 11248, 67, 2433, 1435, 24204, 18, 1615, 18, 542, 12, 1615, 397, 404, 13, 365, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1024, 12, 2890, 4672, 770, 273, 24204, 18, 1615, 18, 588, 1435, 775, 30, 365, 18, 7267, 63, 1615, 8009, 11248, 67, 2433, 1435, 24204, 18, 1615, 18, 542, 12, 1615, 397, 404, 13, 365, ...
exceptions = ['nowiki', 'comment', 'math', 'pre', 'source', 'startspace']
exceptions = ['nowiki', 'comment', 'math', 'pre', 'source', 'startspace', 'gallery', 'hyperlink', 'interwiki', 'link']
def fixTypo(self, text): exceptions = ['nowiki', 'comment', 'math', 'pre', 'source', 'startspace'] # change <number> ccm -> <number> cm³ text = pywikibot.replaceExcept(text, ur'(\d)\s*&nbsp;ccm', ur'\1&nbsp;cm³', exceptions) text = pywikibot.replaceExcept(text, ur'(\d)\s*ccm', ur'\1&nbsp;cm³', exceptions) # Solve wrong Nº sign with °C or °F # additional exception requested on fr-wiki for this stuff pattern = re.compile(u'«.*?»', re.UNICODE) exceptions.append(pattern) text = pywikibot.replaceExcept(text, ur'(\d)\s*&nbsp;[º°]([CF])', ur'\1&nbsp;°\2', exceptions) text = pywikibot.replaceExcept(text, ur'(\d)\s*[º°]([CF])', ur'\1&nbsp;°\2', exceptions) text = pywikibot.replaceExcept(text, ur'º([CF])', ur'°\1', exceptions) return text
0041c8e6902ae195e2c9648f0f4716390e087046 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4404/0041c8e6902ae195e2c9648f0f4716390e087046/cosmetic_changes.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2917, 18488, 83, 12, 2890, 16, 977, 4672, 4798, 273, 10228, 3338, 6169, 2187, 296, 3469, 2187, 296, 15949, 2187, 296, 1484, 2187, 296, 3168, 2187, 296, 1937, 2981, 2187, 296, 21454, 2187, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2917, 18488, 83, 12, 2890, 16, 977, 4672, 4798, 273, 10228, 3338, 6169, 2187, 296, 3469, 2187, 296, 15949, 2187, 296, 1484, 2187, 296, 3168, 2187, 296, 1937, 2981, 2187, 296, 21454, 2187, ...
if flags:
return result libc = ctypes.CDLL(ctypes.util.find_library("c"), use_errno=True) try: libc.inotify_init1 except AttributeError: libc.inotify_init.argtypes = [] libc.inotify_init.errcheck = errcheck def init(): """ See inotify_init(2) man page. """ return libc.inotify_init() else: libc.inotify_init1.argtypes = [ctypes.c_int] libc.inotify_init1.errcheck = errcheck def init(flags=0): """ See inotify_init1(2) man page. """
def init(flags=0): """ See inotify_init(2) man page. """ if flags: return libc.inotify_init1(flags) else: return libc.inotify_init()
cd4adef5bbe7c15f648d858e0fd291f85642892b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13731/cd4adef5bbe7c15f648d858e0fd291f85642892b/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1208, 12, 7133, 33, 20, 4672, 3536, 2164, 316, 352, 1164, 67, 2738, 12, 22, 13, 3161, 1363, 18, 3536, 225, 327, 563, 225, 2561, 71, 273, 6983, 18, 10160, 4503, 12, 299, 989, 18, 1367...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1208, 12, 7133, 33, 20, 4672, 3536, 2164, 316, 352, 1164, 67, 2738, 12, 22, 13, 3161, 1363, 18, 3536, 225, 327, 563, 225, 2561, 71, 273, 6983, 18, 10160, 4503, 12, 299, 989, 18, 1367...
http = http.client.HTTPConnection(netloc)
http = httpclient.HTTPConnection(netloc)
def upload_file(self, command, pyversion, filename): # Sign if requested if self.sign: gpg_args = ["gpg", "--detach-sign", "-a", filename] if self.identity: gpg_args[2:2] = ["--local-user", self.identity] spawn(gpg_args, dry_run=self.dry_run)
e1011c7d8dfce4ad448822fc78404d5b40824e62 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12029/e1011c7d8dfce4ad448822fc78404d5b40824e62/upload.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3617, 67, 768, 12, 2890, 16, 1296, 16, 2395, 1589, 16, 1544, 4672, 468, 4383, 309, 3764, 309, 365, 18, 2977, 30, 22544, 67, 1968, 273, 8247, 6403, 75, 3113, 5238, 8238, 497, 17, 2977, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3617, 67, 768, 12, 2890, 16, 1296, 16, 2395, 1589, 16, 1544, 4672, 468, 4383, 309, 3764, 309, 365, 18, 2977, 30, 22544, 67, 1968, 273, 8247, 6403, 75, 3113, 5238, 8238, 497, 17, 2977, ...
elif c == ':' and not bracks_open:
elif c == ':' and not bracks_open and not v[idx-1] == '\\':
def _part_conditional(v): bracks_open = 0 args = [] carg = "" for idx, c in enumerate(v): if c == '(': if v[idx-1] != '\\': bracks_open += 1 elif c == ')': if v[idx-1] != '\\': bracks_open -= 1 elif c == ':' and not bracks_open: args.append(carg) carg = "" continue carg += c args.append(carg) return args
40a0b464357bcf762076e85bd688845049ae4859 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11767/40a0b464357bcf762076e85bd688845049ae4859/TextObjects.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2680, 67, 22019, 12, 90, 4672, 16430, 363, 87, 67, 3190, 273, 374, 833, 273, 5378, 276, 3175, 273, 1408, 364, 2067, 16, 276, 316, 4241, 12, 90, 4672, 309, 276, 422, 7321, 30, 30...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2680, 67, 22019, 12, 90, 4672, 16430, 363, 87, 67, 3190, 273, 374, 833, 273, 5378, 276, 3175, 273, 1408, 364, 2067, 16, 276, 316, 4241, 12, 90, 4672, 309, 276, 422, 7321, 30, 30...
previous_completion = self.completions[cursel - 1] while cursel > 0 and selstart[:i] <= previous_completion: i += 1 if selstart == previous_completion: break
def _selection_changed(self): """Should be called when the selection of the Listbox has changed. Updates the Listbox display and calls _change_start.""" cursel = int(self.listbox.curselection()[0])
12c173f937e25edcb690e3a7476497dd9958b6d9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3187/12c173f937e25edcb690e3a7476497dd9958b6d9/AutoCompleteWindow.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 10705, 67, 6703, 12, 2890, 4672, 3536, 14309, 506, 2566, 1347, 326, 4421, 434, 326, 987, 2147, 711, 3550, 18, 15419, 326, 987, 2147, 2562, 471, 4097, 389, 3427, 67, 1937, 12123, 662...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 389, 10705, 67, 6703, 12, 2890, 4672, 3536, 14309, 506, 2566, 1347, 326, 4421, 434, 326, 987, 2147, 711, 3550, 18, 15419, 326, 987, 2147, 2562, 471, 4097, 389, 3427, 67, 1937, 12123, 662...
return
return False
def read_request_headers(self): # then all the http headers try: read_headers(self.rfile, self.inheaders) except ValueError, ex: self.simple_response("400 Bad Request", ex.args[0]) return mrbs = self.server.max_request_body_size if mrbs and int(self.inheaders.get("Content-Length", 0)) > mrbs: self.simple_response("413 Request Entity Too Large", "The entity sent with the request exceeds the maximum " "allowed bytes.") return # Persistent connection support if self.response_protocol == "HTTP/1.1": # Both server and client are HTTP/1.1 if self.inheaders.get("Connection", "") == "close": self.close_connection = True else: # Either the server or client (or both) are HTTP/1.0 if self.inheaders.get("Connection", "") != "Keep-Alive": self.close_connection = True # Transfer-Encoding support te = None if self.response_protocol == "HTTP/1.1": te = self.inheaders.get("Transfer-Encoding") if te: te = [x.strip().lower() for x in te.split(",") if x.strip()] self.chunked_read = False if te: for enc in te: if enc == "chunked": self.chunked_read = True else: # Note that, even if we see "chunked", we must reject # if there is an extension we don't recognize. self.simple_response("501 Unimplemented") self.close_connection = True return # From PEP 333: # "Servers and gateways that implement HTTP 1.1 must provide # transparent support for HTTP 1.1's "expect/continue" mechanism. # This may be done in any of several ways: # 1. Respond to requests containing an Expect: 100-continue request # with an immediate "100 Continue" response, and proceed normally. # 2. Proceed with the request normally, but provide the application # with a wsgi.input stream that will send the "100 Continue" # response if/when the application first attempts to read from # the input stream. The read request must then remain blocked # until the client responds. # 3. Wait until the client decides that the server does not support # expect/continue, and sends the request body on its own. # (This is suboptimal, and is not recommended.) # # We used to do 3, but are now doing 1. Maybe we'll do 2 someday, # but it seems like it would be a big slowdown for such a rare case. if self.inheaders.get("Expect", "") == "100-continue": # Don't use simple_response here, because it emits headers # we don't want. See http://www.cherrypy.org/ticket/951 msg = self.server.protocol + " 100 Continue\r\n\r\n" try: self.conn.wfile.sendall(msg) except socket.error, x: if x.args[0] not in socket_errors_to_ignore: raise
0b96a20cd7422d233e0802f40b063ebbc42a5b7d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/82/0b96a20cd7422d233e0802f40b063ebbc42a5b7d/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 67, 2293, 67, 2485, 12, 2890, 4672, 225, 468, 1508, 777, 326, 1062, 1607, 775, 30, 855, 67, 2485, 12, 2890, 18, 86, 768, 16, 365, 18, 267, 2485, 13, 1335, 2068, 16, 431, 30, 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, 855, 67, 2293, 67, 2485, 12, 2890, 4672, 225, 468, 1508, 777, 326, 1062, 1607, 775, 30, 855, 67, 2485, 12, 2890, 18, 86, 768, 16, 365, 18, 267, 2485, 13, 1335, 2068, 16, 431, 30, 3...
ALLDAY_EVENT_HEIGHT = 17
def onSelectItemBroadcast(self, event): #@@@ untested. doesn't seem to be receiving SIB's correctly print "allday evt cvs receives SIB" self.selection = event.arguments['item']
8eace90be88e98cc9d34c820558edb9e140b1b26 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/8eace90be88e98cc9d34c820558edb9e140b1b26/CalendarCanvas.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 3391, 1180, 15926, 12, 2890, 16, 871, 4672, 468, 30989, 36, 640, 88, 3149, 18, 225, 3302, 1404, 19264, 358, 506, 15847, 5705, 38, 1807, 8783, 1172, 315, 454, 2881, 6324, 276, 6904, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 603, 3391, 1180, 15926, 12, 2890, 16, 871, 4672, 468, 30989, 36, 640, 88, 3149, 18, 225, 3302, 1404, 19264, 358, 506, 15847, 5705, 38, 1807, 8783, 1172, 315, 454, 2881, 6324, 276, 6904, ...
'%s/contents/%s' % (folder.href, source_entry.resource_id.text),
'%s/contents/%s' % ( folder.href, urllib.quote(source_entry.resource_id.text)),
def move(self, source_entry, folder_entry=None, keep_in_folders=False, auth_token=None, **kwargs): """Moves an item into a different folder (or to the root document list).
138167c2e88a80ba9cb37a86a8b4e5eae8d1e402 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6580/138167c2e88a80ba9cb37a86a8b4e5eae8d1e402/client.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3635, 12, 2890, 16, 1084, 67, 4099, 16, 3009, 67, 4099, 33, 7036, 16, 3455, 67, 267, 67, 16064, 33, 8381, 16, 1357, 67, 2316, 33, 7036, 16, 2826, 4333, 4672, 3536, 19297, 392, 761, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3635, 12, 2890, 16, 1084, 67, 4099, 16, 3009, 67, 4099, 33, 7036, 16, 3455, 67, 267, 67, 16064, 33, 8381, 16, 1357, 67, 2316, 33, 7036, 16, 2826, 4333, 4672, 3536, 19297, 392, 761, 1...
project_dir=None,key_dir=None,
project_dir=None, key_dir=None,
def __init__(self, short_name, long_name, project_dir=None,key_dir=None, master_url=None, cgi_url=None, db_name=None, production=False ): init()
66036a92ceb2f061542dded35983f53a712e212c /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/10777/66036a92ceb2f061542dded35983f53a712e212c/setup_project.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 3025, 67, 529, 16, 1525, 67, 529, 16, 1984, 67, 1214, 33, 7036, 16, 498, 67, 1214, 33, 7036, 16, 4171, 67, 718, 33, 7036, 16, 276, 10052, 67, 718, 33...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 3025, 67, 529, 16, 1525, 67, 529, 16, 1984, 67, 1214, 33, 7036, 16, 498, 67, 1214, 33, 7036, 16, 4171, 67, 718, 33, 7036, 16, 276, 10052, 67, 718, 33...
def extract_file(self, filename): if filename == MOIN_PACKAGE_FILE: return u"""moinmoinpackage|1
self.script = script or u"""moinmoinpackage|1
def __init__(self, request, filename): Package.__init__(self, request) ScriptEngine.__init__(self) self.filename = filename
1da8caba128106b388cc3ed6cc2d8687bbb42931 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/888/1da8caba128106b388cc3ed6cc2d8687bbb42931/test_packages.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 590, 16, 1544, 4672, 7508, 16186, 2738, 972, 12, 2890, 16, 590, 13, 7739, 4410, 16186, 2738, 972, 12, 2890, 13, 365, 18, 3459, 273, 1544, 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, 1001, 2738, 972, 12, 2890, 16, 590, 16, 1544, 4672, 7508, 16186, 2738, 972, 12, 2890, 16, 590, 13, 7739, 4410, 16186, 2738, 972, 12, 2890, 13, 365, 18, 3459, 273, 1544, 2, -100, -100, ...
log.info('database exist')
def check_for_db(self, override): db_path = jn(self.root, self.dbname) log.info('checking for existing db in %s', db_path) if os.path.isfile(db_path): self.db_exists = True log.info('database exist') if not override: raise Exception('database already exists')
c5a2c52270ae25932480f2e25f89e9d909e318e9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4230/c5a2c52270ae25932480f2e25f89e9d909e318e9/db_manage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 1884, 67, 1966, 12, 2890, 16, 3849, 4672, 1319, 67, 803, 273, 525, 82, 12, 2890, 18, 3085, 16, 365, 18, 20979, 13, 613, 18, 1376, 2668, 24609, 364, 2062, 1319, 316, 738, 87,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 1884, 67, 1966, 12, 2890, 16, 3849, 4672, 1319, 67, 803, 273, 525, 82, 12, 2890, 18, 3085, 16, 365, 18, 20979, 13, 613, 18, 1376, 2668, 24609, 364, 2062, 1319, 316, 738, 87,...
== self.approvedStatus.statuscodeid:
== self.approvedStatus:
def name(self, packageName, collectionName=None, collectionVersion=None): '''Retrieve Packages by their name.
ac5a84058696734a11e988cfe2bff9d8e3098970 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9953/ac5a84058696734a11e988cfe2bff9d8e3098970/packages.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 508, 12, 2890, 16, 9929, 16, 17137, 33, 7036, 16, 1849, 1444, 33, 7036, 4672, 9163, 5767, 7930, 1023, 635, 3675, 508, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 508, 12, 2890, 16, 9929, 16, 17137, 33, 7036, 16, 1849, 1444, 33, 7036, 4672, 9163, 5767, 7930, 1023, 635, 3675, 508, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
The characteristic must not be 2 or 3 and the j-invariant must be 1728
The characteristic must not be 2 or 3 and the j-invariant must be 1728.
def quartic_twist(self, D): """ Return the quartic twist of this curve by D, which must be nonzero.
b731b462902660c0112a8494ebc6f58ef36102b5 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/b731b462902660c0112a8494ebc6f58ef36102b5/ell_generic.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 719, 485, 335, 67, 11246, 376, 12, 2890, 16, 463, 4672, 3536, 2000, 326, 719, 485, 335, 2339, 376, 434, 333, 8882, 635, 463, 16, 1492, 1297, 506, 16966, 18, 2, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 719, 485, 335, 67, 11246, 376, 12, 2890, 16, 463, 4672, 3536, 2000, 326, 719, 485, 335, 2339, 376, 434, 333, 8882, 635, 463, 16, 1492, 1297, 506, 16966, 18, 2, -100, -100, -100, -100, ...
fn = ';filename="%s"' % value[0]
title += '; filename="%s"' % value[0]
def upload_file(self, command, pyversion, filename): # Sign if requested if self.sign: gpg_args = ["gpg", "--detach-sign", "-a", filename] if self.identity: gpg_args[2:2] = ["--local-user", self.identity] spawn(gpg_args, dry_run=self.dry_run)
ced6203ffef566cf6a86e860e570efc5dd66580b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8125/ced6203ffef566cf6a86e860e570efc5dd66580b/upload.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3617, 67, 768, 12, 2890, 16, 1296, 16, 2395, 1589, 16, 1544, 4672, 468, 4383, 309, 3764, 309, 365, 18, 2977, 30, 22544, 67, 1968, 273, 8247, 6403, 75, 3113, 5238, 8238, 497, 17, 2977, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3617, 67, 768, 12, 2890, 16, 1296, 16, 2395, 1589, 16, 1544, 4672, 468, 4383, 309, 3764, 309, 365, 18, 2977, 30, 22544, 67, 1968, 273, 8247, 6403, 75, 3113, 5238, 8238, 497, 17, 2977, ...
semilogx(bins, eff, plotsym,markersize=12, markerfacecolor='None',\
semilogx(plotbins, eff, plotsym,markersize=12, markerfacecolor='None',\
def efficiencyplot(found, missed, col_name, ifo=None, plot_type = 'linear', \ nbins = 40, output_name = None, plotsym = 'k-', plot_name = '', \ title_string = '', errors = False): """ function to plot the difference if col_name_a in two tables against the value of col_name_b in table1. @param found: metaDataTable containing found injections @param missed: metaDataTable containing missed injections @param col_name: name of column used to plot efficiency @param ifo: name of ifo (default = None), used in extracting information (e.g. which eff_dist) @param plot_type: either 'linear' or 'log' plot on x-axis @param plotsym: the symbol to use when plotting, default = 'k-' @param plot_name: name of the plot (for the legend) @param title_string: extra info for title @param errors: plot errorbars on the efficiencies (using binomial errors) default = False """ if not ifo and ("ifo" in found.validcolumns.keys()): ifo = found[0].ifo foundVal = readcol(found,col_name, ifo) missedVal = readcol(missed,col_name, ifo) if len(foundVal) or len(missedVal): # we have found or missed injections so we can generate the plot if plot_type == 'log': foundVal = log10(foundVal) missedVal = log10(missedVal) if len(foundVal): step = (max(foundVal) - min(foundVal)) /nbins bins = arange(min(foundVal),max(foundVal), step ) if step == 0: bins = array([foundVal[0]/2.0, foundVal[0], foundVal[0] * 3.0/2.0]) else: step = (max(missedVal) - min(missedVal)) /nbins bins = arange(min(missedVal),max(missedVal), step ) if step == 0: bins = array([missedVal[0]/2.0, missedVal[0], missedVal[0] * 3.0/2.0]) fig_num = gcf().number figure(100) [num_found,binsf,stuff] = hist(foundVal, bins) [num_missed,binsm,stuff] = hist(missedVal ,bins) close(100) figure(fig_num) num_found = array(num_found,'d') eff = num_found / (num_found + num_missed) error = sqrt( num_found * num_missed / (num_found + num_missed)**3 ) error = array(error) if plot_type == 'log': bins = 10**bins if plot_name: semilogx(bins, eff, plotsym,markersize=12, markerfacecolor='None',\ markeredgewidth=1, linewidth=2, label = plot_name) else: semilogx(bins, eff, plotsym,markersize=12, markerfacecolor='None',\ markeredgewidth=1, linewidth=2) if errors: errorbar(bins, eff, error,markersize=12, markerfacecolor='None',\ markeredgewidth=1, linewidth = 2, label = plot_name, \ fmt = plotsym) else: if errors: errorbar(bins, eff, error, fmt = plotsym, markersize=12,\ markerfacecolor='None',\ markeredgewidth=1, linewidth=1, label = plot_name) else: plot(bins, eff, plotsym,markersize=12, markerfacecolor='None',\ markeredgewidth=1, linewidth=1, label = plot_name) xlabel(col_name.replace("_"," "), size='x-large') ylabel('Efficiency', size='x-large') ylim(0,1.1) else: # no found or missed injections figtext(0,0,'No found or missed injections',fontsize=32) if ifo: title_string += ' ' + ifo title_string += ' ' + col_name.replace("_"," ") title_string += ' efficiency plot' title(title_string, size='x-large') grid(True) if output_name: if ifo: output_name += '_' + ifo output_name += '_' + col_name + '_eff.png' savefig(output_name)
c9b61fdc32295bdb8be1140c1b8359958473b6f4 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5758/c9b61fdc32295bdb8be1140c1b8359958473b6f4/viz.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 30325, 4032, 12, 7015, 16, 25143, 16, 645, 67, 529, 16, 21479, 33, 7036, 16, 3207, 67, 723, 273, 296, 12379, 2187, 521, 4264, 2679, 273, 8063, 16, 876, 67, 529, 273, 599, 16, 3207, 8...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 30325, 4032, 12, 7015, 16, 25143, 16, 645, 67, 529, 16, 21479, 33, 7036, 16, 3207, 67, 723, 273, 296, 12379, 2187, 521, 4264, 2679, 273, 8063, 16, 876, 67, 529, 273, 599, 16, 3207, 8...
ssd = AlignMol(mol,core,atomMap=algMap)
rms = AlignMol(mol,core,atomMap=algMap)
def ConstrainedEmbed(mol,core,useTethers,randomseed=2342): match = mol.GetSubstructMatch(core) if not match: raise ValueError,"molecule doesn't match the core" coordMap={} coreConf = core.GetConformer() for i,idxI in enumerate(match): corePtI = coreConf.GetAtomPosition(i) coordMap[idxI]=corePtI ci = EmbedMolecule(mol,coordMap=coordMap,randomSeed=randomseed) if ci<0: logger.error('could not embed molecule %s, no coordinates generated.'%mol.GetProp('_Name')) algMap=[] for i,itm in enumerate(match): algMap.append((itm,i)) if not useTethers: # clean up the conformation ff = UFFGetMoleculeForceField(mol,confId=0) for i,idxI in enumerate(match): for j in range(i+1,len(match)): idxJ = match[j] d = coordMap[idxI].Distance(coordMap[idxJ]) ff.AddDistanceConstraint(idxI,idxJ,d,d,100.) ff.Initialize() n=4 more=ff.Minimize() while more and n: more=ff.Minimize() n-=1 # rotate the embedded conformation onto the core: ssd =AlignMol(mol,core,atomMap=algMap) else: # rotate the embedded conformation onto the core: ssd = AlignMol(mol,core,atomMap=algMap) ff = UFFGetMoleculeForceField(mol,confId=0) conf = core.GetConformer() for i in range(core.GetNumAtoms()): p =conf.GetAtomPosition(i) pIdx=ff.AddExtraPoint(p.x,p.y,p.z,fixed=True)-1 ff.AddDistanceConstraint(pIdx,match[i],0,0,100.) ff.Initialize() n=4 more=ff.Minimize(energyTol=1e-4,forceTol=1e-3) while more and n: more=ff.Minimize(energyTol=1e-4,forceTol=1e-3) n-=1 # realign ssd = AlignMol(mol,core,atomMap=algMap) print numpy.sqrt(ssd/len(algMap)) return mol
06790088a279034c39aa5ee91c735025dbe17313 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9195/06790088a279034c39aa5ee91c735025dbe17313/AllChem.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 735, 31142, 9538, 12, 21260, 16, 3644, 16, 1202, 56, 546, 414, 16, 9188, 12407, 33, 4366, 9452, 4672, 845, 273, 12629, 18, 967, 1676, 1697, 2060, 12, 3644, 13, 309, 486, 845, 30, 1002,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 735, 31142, 9538, 12, 21260, 16, 3644, 16, 1202, 56, 546, 414, 16, 9188, 12407, 33, 4366, 9452, 4672, 845, 273, 12629, 18, 967, 1676, 1697, 2060, 12, 3644, 13, 309, 486, 845, 30, 1002,...
super(Decude, self).__init__(*args, **kwargs)
super(Deduce, self).__init__(*args, **kwargs)
def __init__(self, *args, **kwargs): super(Decude, self).__init__(*args, **kwargs)
68a8af3d7bc1d6c27d252b3d3c1221a1241662ab /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3020/68a8af3d7bc1d6c27d252b3d3c1221a1241662ab/deduce.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 380, 1968, 16, 2826, 4333, 4672, 2240, 12, 1799, 1317, 16, 365, 2934, 972, 2738, 972, 30857, 1968, 16, 2826, 4333, 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, 1001, 2738, 972, 12, 2890, 16, 380, 1968, 16, 2826, 4333, 4672, 2240, 12, 1799, 1317, 16, 365, 2934, 972, 2738, 972, 30857, 1968, 16, 2826, 4333, 13, 2, -100, -100, -100, -100, -100, -...
def createValue(self): value = Bits.createValue(self) a = value & 0xFF b = (value >> 8) & 0xFF c = value >> 16 return "%02X-%02X-%02X" % (a, b, c)
def createValue(self): value = Bits.createValue(self) a = value & 0xFF b = (value >> 8) & 0xFF c = value >> 16 return "%02X-%02X-%02X" % (a, b, c)
4415a730941abfb7126e16644bd729eb10b02697 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9327/4415a730941abfb7126e16644bd729eb10b02697/common.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 620, 12, 2890, 4672, 460, 273, 18690, 18, 2640, 620, 12, 2890, 13, 279, 273, 460, 473, 374, 6356, 324, 273, 261, 1132, 1671, 1725, 13, 473, 374, 6356, 276, 273, 460, 1671, 2872, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 620, 12, 2890, 4672, 460, 273, 18690, 18, 2640, 620, 12, 2890, 13, 279, 273, 460, 473, 374, 6356, 324, 273, 261, 1132, 1671, 1725, 13, 473, 374, 6356, 276, 273, 460, 1671, 2872, ...
option = self.optionxform(option) sectdict[option] = value
sectdict[self.optionxform(option)] = value
def set(self, section, option, value): """Set an option.""" if not section or section == "DEFAULT": sectdict = self.__defaults else: try: sectdict = self.__sections[section] except KeyError: raise NoSectionError(section) option = self.optionxform(option) sectdict[option] = value
05e74c488d7085fb533b40a9d6860ee732e784e4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/05e74c488d7085fb533b40a9d6860ee732e784e4/ConfigParser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 12, 2890, 16, 2442, 16, 1456, 16, 460, 4672, 3536, 694, 392, 1456, 12123, 309, 486, 2442, 578, 2442, 422, 315, 5280, 6877, 29140, 1576, 273, 365, 16186, 7606, 469, 30, 775, 30, 29...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 12, 2890, 16, 2442, 16, 1456, 16, 460, 4672, 3536, 694, 392, 1456, 12123, 309, 486, 2442, 578, 2442, 422, 315, 5280, 6877, 29140, 1576, 273, 365, 16186, 7606, 469, 30, 775, 30, 29...
if v == (0, 10, 0): tmp_dict["partial_schema"].add_child_tags([ Tag("categories", SINGLE, None, [ Tag("category", ANY, self._parse_category, [ Tag("name", SINGLE, parse_fn_store("tmp_name")), Tag("color", SINGLE, parse_fn_store("tmp_color")), Tag("parent", OPTIONAL, parse_fn_store("tmp_parent")), ])
def _create_rest_of_schema(self, tmp_dict): """ Ensure all versions of the xml format can be parsed with this schema. tmp_dict["version"] can be used to create different schemas depending on the version. """ tmp_dict["partial_schema"].add_child_tags([ Tag("categories", SINGLE, None, [ Tag("category", ANY, self._parse_category, [ Tag("name", SINGLE, parse_fn_store("tmp_name")), Tag("color", SINGLE, parse_fn_store("tmp_color")), Tag("parent", OPTIONAL, parse_fn_store("tmp_parent")), ]) ]), Tag("events", SINGLE, None, [ Tag("event", ANY, self._parse_event, [ Tag("start", SINGLE, parse_fn_store("tmp_start")), Tag("end", SINGLE, parse_fn_store("tmp_end")), Tag("text", SINGLE, parse_fn_store("tmp_text")), Tag("category", OPTIONAL, parse_fn_store("tmp_category")), Tag("description", OPTIONAL, parse_fn_store("tmp_description")), Tag("icon", OPTIONAL, parse_fn_store("tmp_icon")), ]) ]), Tag("view", SINGLE, None, [ Tag("displayed_period", OPTIONAL, self._parse_displayed_period, [ Tag("start", SINGLE, parse_fn_store("tmp_start")), Tag("end", SINGLE, parse_fn_store("tmp_end")),
def _parse_version(self, text, tmp_dict): match = re.search(r"^(\d+).(\d+).(\d+)(dev.*)?$", text) if match: (x, y, z) = (int(match.group(1)), int(match.group(2)), int(match.group(3))) v = tmp_dict["version"] = (x, y, z) else: raise ParseException("Could not parse version number from '%s'." % text) # Create the rest of the parse schema depending on version number if v == (0, 10, 0): tmp_dict["partial_schema"].add_child_tags([ Tag("categories", SINGLE, None, [ Tag("category", ANY, self._parse_category, [ Tag("name", SINGLE, parse_fn_store("tmp_name")), Tag("color", SINGLE, parse_fn_store("tmp_color")), Tag("parent", OPTIONAL, parse_fn_store("tmp_parent")), ]) ]), Tag("events", SINGLE, None, [ Tag("event", ANY, self._parse_event, [ Tag("start", SINGLE, parse_fn_store("tmp_start")), Tag("end", SINGLE, parse_fn_store("tmp_end")), Tag("text", SINGLE, parse_fn_store("tmp_text")), Tag("category", OPTIONAL, parse_fn_store("tmp_category")), Tag("description", OPTIONAL, parse_fn_store("tmp_description")), Tag("icon", OPTIONAL, parse_fn_store("tmp_icon")), ]) ]), Tag("view", SINGLE, None, [ Tag("displayed_period", OPTIONAL, self._parse_displayed_period, [ Tag("start", SINGLE, parse_fn_store("tmp_start")), Tag("end", SINGLE, parse_fn_store("tmp_end")), ]), Tag("hidden_categories", OPTIONAL, self._parse_hidden_categories, [ Tag("name", ANY, self._parse_hidden_category), ]), ]), ]) else: raise ParseException("Unknown version '%s,%s,%s'." % v)
0f46b14e475c4ca85130494602b52c66c6b81115 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5252/0f46b14e475c4ca85130494602b52c66c6b81115/xmlfile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2670, 67, 1589, 12, 2890, 16, 977, 16, 1853, 67, 1576, 4672, 845, 273, 283, 18, 3072, 12, 86, 6, 66, 4713, 72, 15, 2934, 4713, 72, 15, 2934, 4713, 72, 6975, 12, 5206, 4509, 99...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2670, 67, 1589, 12, 2890, 16, 977, 16, 1853, 67, 1576, 4672, 845, 273, 283, 18, 3072, 12, 86, 6, 66, 4713, 72, 15, 2934, 4713, 72, 15, 2934, 4713, 72, 6975, 12, 5206, 4509, 99...
if (day>5) or (dateorder=='DMY'): return (year,month,day),0.5
if dateorder == 'DMY': return (year,month,day),0.5
def getdate(s=""): """Attempt to parse the given string as a date. The format is unknown, but it's assumed that the broken American m/d/y isn't a possibility. It attempts to distinguish between d/m/y and y/m/d using the values, and handles any seperator. if dateorder (global) is 'DMY' or 'YMD', it overrides the last-resort guessing used if the order is ambiguous, but otherwise has no effect. For example, "2003-11-12" is still parsed correctly if dateorder is 'DMY'. returns y,m,d,confidence where confidence is 1 if the date order is definitely correct, and 0 if it's ambiguous. Throws an AssertionError exception if the input is definitely not a date triple. """ nums=re.findall(reuf,s) nums=map(float,nums) #Convert from strings to floats if len(nums)==2: month=0 #May be broken Canopus UTdate with month name s=string.upper(s) for i in range(12): if string.find(s, months[i])>=0: month=i+1 assert month, "Only two numbers and month name not found in '"+s+"'" nums=[nums[0],month,nums[1]] monthname=1 else: monthname=0 assert len(nums)==3, "Too many/few numbers in '"+s+"'" #Now either nums[0] is the year and nums[2] is the day, or vice-versa #either way, nums[1] is the month month=int(nums[1]) assert (month>=1) and (month<=12), "Month invalid in '"+s+"'" if nums[0]>31: #If first number is >31, it must be a year, so the third must be a day assert (nums[2] >= 1) and (nums[2] <= mlen[month-1]), "YMD, Day invalid in '"+s+"'" day=nums[2] if nums[0]<100: year=nums[0]+1900 else: year=nums[0] return (year,month,day),1 #confident it's YMD if nums[2]>31: #If third number is >31, it must be a year, so the first must be a day assert (nums[0] >= 1) and (nums[0] <= mlen[month-1]), "DMY, Day invalid in '"+s+"'" day=nums[0] if nums[2]<100: year=nums[2]+1900 else: year=nums[2] return (year,month,day),1 #confident it's DMY #First and last number are both valid days, so we hope the LARGER one is the day if ( (nums[2]>nums[0]) and (not monthname) ) or (dateorder=='YMD'): assert (nums[2] >= 1) and (nums[2] <= mlen[month-1]), "guess YMD, Day invalid in '"+s+"'" day=nums[2] year=nums[0]+2000 if (day>5) or (dateorder=='YMD'): return (year,month,day),0.5 #Relatively sure since year probably isn't >2005 else: print "Warning - guessing at YMD order for '"+s+"'" return (year,month,day),0 #Only guess it's YMD else: assert (nums[0] >= 1) and (nums[0] <= mlen[month-1]), "guess DMY, Day invalid in '"+s+"'" day=nums[0] year=nums[2]+2000 if (day>5) or (dateorder=='DMY'): return (year,month,day),0.5 #Relatively sure since year probably isn't >2005 else: print "Warning - guessing at DMY order for '"+s+"'" return (year,month,day),0 #Only guess it's DMY
77dc1cebf1577c1346bade46be0e5544c237788a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8228/77dc1cebf1577c1346bade46be0e5544c237788a/parseing.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 712, 12, 87, 1546, 6, 4672, 3536, 7744, 358, 1109, 326, 864, 533, 487, 279, 1509, 18, 1021, 740, 353, 5917, 16, 1496, 518, 1807, 12034, 716, 326, 12933, 3986, 3036, 304, 312, 19, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 712, 12, 87, 1546, 6, 4672, 3536, 7744, 358, 1109, 326, 864, 533, 487, 279, 1509, 18, 1021, 740, 353, 5917, 16, 1496, 518, 1807, 12034, 716, 326, 12933, 3986, 3036, 304, 312, 19, ...
EXTENSION_NAMES = {
EXTENSIONS = {
def parsePlugin(s): yield SoundMixPluginInfo(s, "info") # Check if VST setchunk present size = s.stream.readBits(s.absolute_address+s.current_size, 32, LITTLE_ENDIAN) if size > 0 and size < s.current_size + s._size: yield ExtraData(s, "extra_data") # Check if XPlugData is present size = s.stream.readBits(s.absolute_address+s.current_size, 32, LITTLE_ENDIAN) if size > 0 and size < s.current_size + s._size: yield XPlugData(s, "xplug_data")
75d0930d61b2b98bfd5cdaf0ec5487c36bb81181 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9327/75d0930d61b2b98bfd5cdaf0ec5487c36bb81181/xm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 3773, 12, 87, 4672, 2824, 348, 772, 21294, 3773, 966, 12, 87, 16, 315, 1376, 7923, 225, 468, 2073, 309, 776, 882, 444, 6551, 3430, 963, 273, 272, 18, 3256, 18, 896, 6495, 12, 8...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 3773, 12, 87, 4672, 2824, 348, 772, 21294, 3773, 966, 12, 87, 16, 315, 1376, 7923, 225, 468, 2073, 309, 776, 882, 444, 6551, 3430, 963, 273, 272, 18, 3256, 18, 896, 6495, 12, 8...
pattern = '%s_%s' % (self.dbUName, pattern)
pattern = '%s_%%%s%%' % (self.dbUName, pattern)
def run(self, pattern): self.connect(self.dbUName, self.dbUPwd)
a52cbe4e1b554d851875ae8e78d5902b5841ec38 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6558/a52cbe4e1b554d851875ae8e78d5902b5841ec38/dropDatabases.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 16, 1936, 4672, 365, 18, 3612, 12, 2890, 18, 1966, 57, 461, 16, 365, 18, 1966, 3079, 3623, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1086, 12, 2890, 16, 1936, 4672, 365, 18, 3612, 12, 2890, 18, 1966, 57, 461, 16, 365, 18, 1966, 3079, 3623, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
return m.group if m else None return None
self.__instance_group = m.group if m else None return self.__instance_group
def _instance_group(self): if c.instance: m = self.user.instance_membership(c.instance) return m.group if m else None return None
716f67469e690bb9888dddb40b73582e7515fbb7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10360/716f67469e690bb9888dddb40b73582e7515fbb7/user_tiles.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1336, 67, 1655, 12, 2890, 4672, 309, 276, 18, 1336, 30, 312, 273, 365, 18, 1355, 18, 1336, 67, 19679, 12, 71, 18, 1336, 13, 365, 16186, 1336, 67, 1655, 273, 312, 18, 1655, 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, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1336, 67, 1655, 12, 2890, 4672, 309, 276, 18, 1336, 30, 312, 273, 365, 18, 1355, 18, 1336, 67, 19679, 12, 71, 18, 1336, 13, 365, 16186, 1336, 67, 1655, 273, 312, 18, 1655, 309, ...
else: print "no session"
def ciStateChanged(self, slot): if slot in self.ci: self.ci[slot](slot) else: if slot in self.dlgs: self.dlgs[slot].ciStateChanged() elif eDVBCI_UI.getInstance().availableMMI(slot) == 1: if self.session: self.dlgs[slot] = self.session.openWithCallback(self.dlgClosed, CiMmi, slot, 3) else: print "no session"
fe4819c2c3bf9e67e8088aea8d85751cd5918ee5 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6652/fe4819c2c3bf9e67e8088aea8d85751cd5918ee5/Ci.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9039, 1119, 5033, 12, 2890, 16, 4694, 4672, 309, 4694, 316, 365, 18, 8450, 30, 365, 18, 8450, 63, 14194, 29955, 14194, 13, 469, 30, 309, 4694, 316, 365, 18, 5761, 564, 30, 365, 18, 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, 9039, 1119, 5033, 12, 2890, 16, 4694, 4672, 309, 4694, 316, 365, 18, 8450, 30, 365, 18, 8450, 63, 14194, 29955, 14194, 13, 469, 30, 309, 4694, 316, 365, 18, 5761, 564, 30, 365, 18, 5...
self.mesgType = CONN_TERM
self.mesgType = MULTIPLEXER_CONN_TERM
def initConnTermFrame(self,referenceID): """ <Purpose> Makes the frame a CONN_TERM frame
992246c633c09fe5d066f537c0640421e414afac /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7995/992246c633c09fe5d066f537c0640421e414afac/Multiplexer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1208, 3543, 4065, 3219, 12, 2890, 16, 6180, 734, 4672, 3536, 411, 10262, 4150, 34, 490, 3223, 326, 2623, 279, 3492, 50, 67, 15176, 2623, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 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, 3543, 4065, 3219, 12, 2890, 16, 6180, 734, 4672, 3536, 411, 10262, 4150, 34, 490, 3223, 326, 2623, 279, 3492, 50, 67, 15176, 2623, 2, -100, -100, -100, -100, -100, -100, -100, -100...
h = httpslib.HTTPSConnection('127.0.0.1', 9443, ssl_context=ctx)
h = httpslib.HTTPSConnection('localhost', 19443, ssl_context=ctx)
def test_httpslib(): ctx = SSL.Context('sslv23') ctx.load_cert_chain('client.pem') ctx.load_verify_locations('ca.pem', '') ctx.set_verify(SSL.verify_peer, 10) ctx.set_info_callback() h = httpslib.HTTPSConnection('127.0.0.1', 9443, ssl_context=ctx) h.set_debuglevel(1) h.putrequest('GET', '/') h.putheader('Accept', 'text/html') h.putheader('Accept', 'text/plain') h.putheader('Connection', 'close') h.endheaders() resp = h.getresponse() f = resp.fp c = 0 while 1: # Either of following two works. #data = f.readline(4096) data = resp.read(4096) if not data: break c = c + len(data) #print data sys.stdout.write(data) sys.stdout.flush() f.close() h.close()
ec3e8ebe4426853913c39525db55814185c48ba1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8055/ec3e8ebe4426853913c39525db55814185c48ba1/https_cli.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 4528, 2941, 13332, 1103, 273, 7419, 18, 1042, 2668, 1049, 3070, 4366, 6134, 1103, 18, 945, 67, 7593, 67, 5639, 2668, 2625, 18, 20313, 6134, 1103, 18, 945, 67, 8705, 67, 12352, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4528, 2941, 13332, 1103, 273, 7419, 18, 1042, 2668, 1049, 3070, 4366, 6134, 1103, 18, 945, 67, 7593, 67, 5639, 2668, 2625, 18, 20313, 6134, 1103, 18, 945, 67, 8705, 67, 12352, ...
elif self.widget.__class__ == GtkEntry:
elif self.widget.__class__ == gtk.Entry:
def getValue (self): """ Get the current value from the option widget.
ec17e2ee5c945ddc11ff8bcc0cdc586ae535e76d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4580/ec17e2ee5c945ddc11ff8bcc0cdc586ae535e76d/driconf.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2366, 261, 2890, 4672, 3536, 968, 326, 783, 460, 628, 326, 1456, 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, 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, 2366, 261, 2890, 4672, 3536, 968, 326, 783, 460, 628, 326, 1456, 3604, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
icursor = icursor-1
def __normalize(self, event=None): ew = event.widget contents = ew.get() icursor = ew.index(INSERT) if contents == '': contents = '0' # figure out what the contents value is in the current base try: if self.__hexp.get(): v = string.atoi(contents, 16) else: v = string.atoi(contents) except ValueError: v = None # if value is not legal, delete the last character inserted and ring # the bell if v is None or v < 0 or v > 255: i = ew.index(INSERT) contents = contents[:i-1] + contents[i:] ew.bell() icursor = icursor-1 elif self.__hexp.get(): contents = hex(v) else: contents = int(v) ew.delete(0, END) ew.insert(0, contents) ew.icursor(icursor)
c2461ddd11df00e95f5c846c3f63041a878453fd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/c2461ddd11df00e95f5c846c3f63041a878453fd/TypeinViewer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 12237, 12, 2890, 16, 871, 33, 7036, 4672, 22722, 273, 871, 18, 6587, 2939, 273, 22722, 18, 588, 1435, 277, 9216, 273, 22722, 18, 1615, 12, 11356, 13, 309, 2939, 422, 875, 30, 293...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 12237, 12, 2890, 16, 871, 33, 7036, 4672, 22722, 273, 871, 18, 6587, 2939, 273, 22722, 18, 588, 1435, 277, 9216, 273, 22722, 18, 1615, 12, 11356, 13, 309, 2939, 422, 875, 30, 293...
excerpt = util.shorten_line(chgset.message or '--')
def get_timeline_events(self, req, start, stop, filters): if 'changeset' in filters: format = req.args.get('format') show_files = int(self.config.get('timeline', 'changeset_show_files')) db = self.env.get_db_cnx() repos = self.env.get_repository() rev = repos.youngest_rev while rev: chgset = repos.get_changeset(rev) if chgset.date < start: return if chgset.date < stop: title = 'Changeset <em>[%s]</em> by %s' % ( util.escape(chgset.rev), util.escape(chgset.author)) if format == 'rss': href = self.env.abs_href.changeset(chgset.rev) message = wiki_to_html(chgset.message or '--', self.env, db, absurls=True) else: href = self.env.href.changeset(chgset.rev) excerpt = util.shorten_line(chgset.message or '--') message = wiki_to_oneliner(excerpt, self.env, db) if show_files: files = [] for chg in chgset.get_changes(): if show_files > 0 and len(files) >= show_files: files.append('...') break files.append('<span class="%s">%s</span>' % (chg[2], util.escape(chg[0]))) message = '<span class="changes">' + ', '.join(files) +\ '</span>: ' + message yield 'changeset', href, title, chgset.date, chgset.author,\ message rev = repos.previous_rev(rev)
f4d15b01d33a8b1ce9fabdb9f356b3aa6ba10f7c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/f4d15b01d33a8b1ce9fabdb9f356b3aa6ba10f7c/Changeset.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 26237, 67, 5989, 12, 2890, 16, 1111, 16, 787, 16, 2132, 16, 3415, 4672, 309, 296, 6329, 278, 11, 316, 3415, 30, 740, 273, 1111, 18, 1968, 18, 588, 2668, 2139, 6134, 2405, 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, 336, 67, 26237, 67, 5989, 12, 2890, 16, 1111, 16, 787, 16, 2132, 16, 3415, 4672, 309, 296, 6329, 278, 11, 316, 3415, 30, 740, 273, 1111, 18, 1968, 18, 588, 2668, 2139, 6134, 2405, 67...
print 'mod'
def load_cache(self, dirname): """ load a new cachefile """ if dirname == self.current_cachedir: return
c68284f641fa43480d764963e40d5d514debce84 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/c68284f641fa43480d764963e40d5d514debce84/mediainfo.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1262, 67, 2493, 12, 2890, 16, 4283, 4672, 3536, 1262, 279, 394, 1247, 768, 3536, 309, 4283, 422, 365, 18, 2972, 67, 7097, 481, 30, 327, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1262, 67, 2493, 12, 2890, 16, 4283, 4672, 3536, 1262, 279, 394, 1247, 768, 3536, 309, 4283, 422, 365, 18, 2972, 67, 7097, 481, 30, 327, 2, -100, -100, -100, -100, -100, -100, -100, -10...
pass
self.in_item = False
def depart_list_item(self, node): pass
5d96b2fca5272e18a020af9d7b6aa61d1e9e1eb0 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/541/5d96b2fca5272e18a020af9d7b6aa61d1e9e1eb0/rst_parser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 26000, 67, 1098, 67, 1726, 12, 2890, 16, 756, 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,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 26000, 67, 1098, 67, 1726, 12, 2890, 16, 756, 4672, 1342, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
def __hash__(self): """Return a distinct hash code. ClauseElements may have special equality comparisons which makes us rely on them having unique hash codes for use in hash-based collections. Stock __hash__ doesn't guarantee unique values on platforms with moving GCs. """ return id(self)
def __hash__(self): """Return a distinct hash code. ClauseElements may have special equality comparisons which makes us rely on them having unique hash codes for use in hash-based collections. Stock __hash__ doesn't guarantee unique values on platforms with moving GCs. """ return id(self)
def __hash__(self): """Return a distinct hash code.
0b93f88d2c199737f8d1202bb95240fed122b531 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1074/0b93f88d2c199737f8d1202bb95240fed122b531/expression.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2816, 972, 12, 2890, 4672, 3536, 990, 279, 10217, 1651, 981, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 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, 2816, 972, 12, 2890, 4672, 3536, 990, 279, 10217, 1651, 981, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
(-0.98174770424681035, -0.83146961230254524), (-0.78539816339744828,
(-0.98174770424681035, -0.831469612302545...), (-0.78539816339744828,
def generate_plot_points(f, xrange, plot_points=5, adaptive_tolerance=0.01, adaptive_recursion=5, randomize = True): r""" Calculate plot points for a function f in the interval xrange. The adaptive refinement algorithm for plotting a function f. See the docstring for plot for a description of the algorithm. INPUT: f -- a function of one variable p1, p2 -- two points to refine between plot_points -- (default: 5) the minimal number of plot points. adaptive_recursion -- (default: 5) how many levels of recursion to go before giving up when doing adaptive refinement. Setting this to 0 disables adaptive refinement. adaptive_tolerance -- (default: 0.01) how large a difference should be before the adaptive refinement code considers it significant. See the documentation for plot() for more information. OUTPUT: list -- a list of points (x, f(x)) in the interval xrange, which aproximate the function f. TESTS: sage: from sage.plot.plot import generate_plot_points sage: generate_plot_points(sin, (0, pi), plot_points=2, adaptive_recursion=0) [(0.0, 0.0), (3.1415926535897931, 1.2246...e-16)] sage: generate_plot_points(sin(x), (-pi, pi), randomize=False) [(-3.1415926535897931, -1.2246...e-16), (-2.748893571891069, -0.38268343236508989), (-2.3561944901923448, -0.707106781186547...), (-2.1598449493429825, -0.831469612302545...), (-1.9634954084936207, -0.92387953251128674), (-1.7671458676442586, -0.98078528040323043), (-1.5707963267948966, -1.0), (-1.3744467859455345, -0.98078528040323043), (-1.1780972450961724, -0.92387953251128674), (-0.98174770424681035, -0.83146961230254524), (-0.78539816339744828, -0.707106781186547...), (-0.39269908169872414, -0.38268343236508978), (0.0, 0.0), (0.39269908169872414, 0.38268343236508978), (0.78539816339744828, 0.707106781186547...), (0.98174770424681035, 0.83146961230254524), (1.1780972450961724, 0.92387953251128674), (1.3744467859455345, 0.98078528040323043), (1.5707963267948966, 1.0), (1.7671458676442586, 0.98078528040323043), (1.9634954084936207, 0.92387953251128674), (2.1598449493429825, 0.831469612302545...), (2.3561944901923448, 0.707106781186547...), (2.748893571891069, 0.38268343236508989), (3.1415926535897931, 1.2246...e-16)] This shows that lowering adaptive_tolerance and raising adaptive_recursion both increase the number of subdivision points: sage: x = var('x') sage: f = sin(1/x) sage: [len(generate_plot_points(f, (-pi, pi), adaptive_tolerance=i)) for i in [0.01, 0.001, 0.0001]] [42, 67, 104] sage: [len(generate_plot_points(f, (-pi, pi), adaptive_recursion=i)) for i in [5, 10, 15]] [34, 144, 897] """ x, data = var_and_list_of_values(xrange, plot_points) xmin = data[0] xmax = data[-1] delta = float(xmax-xmin) / plot_points random = current_randstate().python_random().random exceptions = 0; msg='' exception_indices = [] for i in range(len(data)): xi = data[i] # Slightly randomize the interior sample points if # randomize is true if randomize and i > 0 and i < plot_points-1: xi += delta*(random() - 0.5) try: data[i] = (float(xi), float(f(xi))) if str(data[i][1]) in ['nan', 'NaN', 'inf', '-inf']: sage.misc.misc.verbose("%s\nUnable to compute f(%s)"%(msg, x),1) exceptions += 1 exception_indices.append(i) except (ZeroDivisionError, TypeError, ValueError, OverflowError), msg: sage.misc.misc.verbose("%s\nUnable to compute f(%s)"%(msg, x),1) if i == 0: for j in range(1, 99): xj = xi + delta*j/100.0 try: data[i] = (float(xj), float(f(xj))) # nan != nan if data[i][1] != data[i][1]: continue break except (ZeroDivisionError, TypeError, ValueError, OverflowError), msg: pass else: exceptions += 1 exception_indices.append(i) elif i == plot_points-1: for j in range(1, 99): xj = xi - delta*j/100.0 try: data[i] = (float(xj), float(f(xj))) # nan != nan if data[i][1] != data[i][1]: continue break except (ZeroDivisionError, TypeError, ValueError, OverflowError), msg: pass else: exceptions += 1 exception_indices.append(i) else: exceptions += 1 exception_indices.append(i) exceptions += 1 exception_indices.append(i) data = [data[i] for i in range(len(data)) if i not in exception_indices] # adaptive refinement i, j = 0, 0 adaptive_tolerance = delta * float(adaptive_tolerance) adaptive_recursion = int(adaptive_recursion) while i < len(data) - 1: for p in adaptive_refinement(f, data[i], data[i+1], adaptive_tolerance=adaptive_tolerance, adaptive_recursion=adaptive_recursion): data.insert(i+1, p) i += 1 i += 1 if (len(data) == 0 and exceptions > 0) or exceptions > 10: sage.misc.misc.verbose("WARNING: When plotting, failed to evaluate function at %s points."%exceptions, level=0) sage.misc.misc.verbose("Last error message: '%s'"%msg, level=0) return data
3750f5ad7c578e2263770f54bfa6bccc2308c0df /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9417/3750f5ad7c578e2263770f54bfa6bccc2308c0df/plot.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 67, 4032, 67, 4139, 12, 74, 16, 12314, 16, 3207, 67, 4139, 33, 25, 16, 5855, 688, 67, 25456, 33, 20, 18, 1611, 16, 5855, 688, 67, 31347, 33, 25, 16, 2744, 554, 273, 1053, 467...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 67, 4032, 67, 4139, 12, 74, 16, 12314, 16, 3207, 67, 4139, 33, 25, 16, 5855, 688, 67, 25456, 33, 20, 18, 1611, 16, 5855, 688, 67, 31347, 33, 25, 16, 2744, 554, 273, 1053, 467...
def _render_menu(self, menu_name, active=None, depth=None): """ If the menu has its own template, then use the template. Otherwise, ask its class to do the rendering. """ try: menu_template = loader.get_template('menu/%s.html' % menu_name) self.context['active'] = active return menu_template.render(self.context) except template.TemplateDoesNotExist: return menu.render(menu_name, depth=depth, active=active)
def _render_menu(self, menu_name, active=None, depth=None): """ If the menu has its own template, then use the template. Otherwise, ask its class to do the rendering. """ try: menu_template = loader.get_template('menu/%s.html' % menu_name) self.context['active'] = active return menu_template.render(self.context) except template.TemplateDoesNotExist: return menu.render(menu_name, depth=depth, active=active)
def _render_menu(self, menu_name, active=None, depth=None): """ If the menu has its own template, then use the template. Otherwise, ask its class to do the rendering. """ try: menu_template = loader.get_template('menu/%s.html' % menu_name) self.context['active'] = active return menu_template.render(self.context) except template.TemplateDoesNotExist: return menu.render(menu_name, depth=depth, active=active)
6d3257b8c4a1776d5526acbc55ae4b47e2cf5dde /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4778/6d3257b8c4a1776d5526acbc55ae4b47e2cf5dde/menu.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5902, 67, 5414, 12, 2890, 16, 3824, 67, 529, 16, 2695, 33, 7036, 16, 3598, 33, 7036, 4672, 3536, 971, 326, 3824, 711, 2097, 4953, 1542, 16, 1508, 999, 326, 1542, 18, 225, 5272, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5902, 67, 5414, 12, 2890, 16, 3824, 67, 529, 16, 2695, 33, 7036, 16, 3598, 33, 7036, 4672, 3536, 971, 326, 3824, 711, 2097, 4953, 1542, 16, 1508, 999, 326, 1542, 18, 225, 5272, ...
self.rects.append(r)
def addRect(self, x0, x1, y0, y1, data = None, condition = "", usedAttrs = []): x0 = int(x0); x1 = int(x1); y0 = int(y0); y1 = int(y1) if x0 == x1: x1+=1 if y0 == y1: y1+=1
4617629279f24e162a43e27a838ac49ba8cc40ec /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6366/4617629279f24e162a43e27a838ac49ba8cc40ec/OWMosaicDisplay.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 6120, 12, 2890, 16, 619, 20, 16, 619, 21, 16, 677, 20, 16, 677, 21, 16, 501, 273, 599, 16, 2269, 273, 23453, 1399, 8262, 273, 5378, 4672, 619, 20, 273, 509, 12, 92, 20, 1769, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 6120, 12, 2890, 16, 619, 20, 16, 619, 21, 16, 677, 20, 16, 677, 21, 16, 501, 273, 599, 16, 2269, 273, 23453, 1399, 8262, 273, 5378, 4672, 619, 20, 273, 509, 12, 92, 20, 1769, ...
D = D*np.exp(1-G/float(G.max()))
D *= np.exp(1-G/float(G.max()))
def roysam_watershed(dna,thresh=None,blur_factor=3): ''' Run watershed on mixed gradient & intensity image as suggested by Lin et al. -Input dna: DNA image thresh: Gray value threshold (default: computed using Murphy's RC) blur_factor: Blur factor (default: 3) REFERENCE Gang Lin, Umesh Adiga, Kathy Olson, John F. Guzowski, Carol A. Barnes, and Badrinath Roysam "A Hybrid 3-D Watershed Algorithm Incorporating Gradient Cues & Object Models for Automatic Segmentation of Nuclei in Confocal Image Stacks" Vol. 56A, No. 1, pp. 23-36 Cytometry Part A, November 2003. ''' if thresh is None: thresh = thresholding.murphy_rc(dna) M = (ndimage.gaussian_filter(dna,4)>thresh) G = pymorph.gradm(dna) D = ndimage.distance_transform_edt(M) D = D*np.exp(1-G/float(G.max())) T = ndimage.gaussian_filter(D.max() - D,blur_factor) T *= M if T.max() < 256: T = pymorph.to_uint8(T) else: T = pymorph.to_uint8(T*(256.0/T.max())) R = pymorph.regmin(T) R,N = ndimage.label(R) for i in xrange(R.size): if R.flat[i] == 0 and M.flat[i] == 0: R.flat[i] = N+1 break W,WL = morph.cwatershed(T,R,return_lines=True) return W,WL
47a535d7936f00206fd04bdeae917c38c9630111 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12199/47a535d7936f00206fd04bdeae917c38c9630111/roysam.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 721, 1900, 301, 67, 91, 31302, 18550, 12, 5176, 69, 16, 19237, 33, 7036, 16, 27065, 67, 6812, 33, 23, 4672, 9163, 1939, 341, 31302, 18550, 603, 7826, 10292, 473, 16551, 1316, 487, 22168,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 721, 1900, 301, 67, 91, 31302, 18550, 12, 5176, 69, 16, 19237, 33, 7036, 16, 27065, 67, 6812, 33, 23, 4672, 9163, 1939, 341, 31302, 18550, 603, 7826, 10292, 473, 16551, 1316, 487, 22168,...
tasks = Processing_task.objects.filter( user = request.user, kind__name__exact = 'scamp', success = True).order_by('-end_date')
tasks = Processing_task.objects.filter(kind__name__exact = 'scamp', success = True).order_by('-end_date')
def checkForScampData(self, request, imgList = None): """ Check if the image selection matches a successful Scamp involving the same image selection. @return List of Scamp processings, if any """
6e80370af43c6d8570073d410816f1f70c8eaf96 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11651/6e80370af43c6d8570073d410816f1f70c8eaf96/swarp.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13855, 1541, 931, 751, 12, 2890, 16, 590, 16, 3774, 682, 273, 599, 4672, 3536, 2073, 309, 326, 1316, 4421, 1885, 279, 6873, 2850, 931, 29876, 6282, 326, 1967, 1316, 4421, 18, 632, 2463, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 13855, 1541, 931, 751, 12, 2890, 16, 590, 16, 3774, 682, 273, 599, 4672, 3536, 2073, 309, 326, 1316, 4421, 1885, 279, 6873, 2850, 931, 29876, 6282, 326, 1967, 1316, 4421, 18, 632, 2463, ...
return '%s\n%s\n' % ('-' * max_len, '\n'.join(text))
ret = tabs + '%s\n' % (prefix_str * max_len)[:max_len] for row in text: ret += tabs + row + '\n' return ret
def make_conclusion(text): """Return: -------------- text text text """ out = StringIO() tool = AbstractFormatter(DumbWriter(out, maxcol=78)) tool.add_flowing_data(text) text = out.getvalue().split('\n') max_len = max([len(row) for row in text]) return '%s\n%s\n' % ('-' * max_len, '\n'.join(text))
1824c9872fb379b24480d725681a9dbec93b3b02 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12027/1824c9872fb379b24480d725681a9dbec93b3b02/textutils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 67, 591, 15335, 12, 955, 4672, 3536, 990, 30, 300, 16982, 977, 977, 977, 3536, 596, 273, 15777, 1435, 5226, 273, 4115, 5074, 12, 40, 3592, 2289, 12, 659, 16, 943, 1293, 33, 8285,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 67, 591, 15335, 12, 955, 4672, 3536, 990, 30, 300, 16982, 977, 977, 977, 3536, 596, 273, 15777, 1435, 5226, 273, 4115, 5074, 12, 40, 3592, 2289, 12, 659, 16, 943, 1293, 33, 8285,...
arguments.append('%s' %(paramsDict['JobConfigArgs']['value']))
arguments.append( '%s' % ( paramsDict['JobConfigArgs']['value'] ) )
def _toJDL(self,xmlFile=''): #messy but need to account for xml file being in /tmp/guid dir """Creates a JDL representation of itself as a Job. """ #Check if we have to do old bootstrap... classadJob = ClassAd('[]')
50b3322668816ba92ea3f9b253d993dc34c53a21 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/50b3322668816ba92ea3f9b253d993dc34c53a21/Job.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 869, 46, 8914, 12, 2890, 16, 2902, 812, 2218, 11, 4672, 468, 81, 403, 93, 1496, 1608, 358, 2236, 364, 2025, 585, 3832, 316, 342, 5645, 19, 14066, 1577, 3536, 2729, 279, 804, 8914,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 869, 46, 8914, 12, 2890, 16, 2902, 812, 2218, 11, 4672, 468, 81, 403, 93, 1496, 1608, 358, 2236, 364, 2025, 585, 3832, 316, 342, 5645, 19, 14066, 1577, 3536, 2729, 279, 804, 8914,...
scheduler.schedule(0.5, client.printLater, "test2", 0.5) scheduler.schedule(1, client.stopLoop)
scheduler.schedule(0.2, client.printLater, "test2", 0.2) scheduler.schedule(0.5, client.stopLoop)
def stopLoop(self, *args): global looping looping = False
07f2bb9c30aec582d153a85bb0b7f64f99668f3a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5969/07f2bb9c30aec582d153a85bb0b7f64f99668f3a/AsyncXmlRpc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2132, 6452, 12, 2890, 16, 380, 1968, 4672, 2552, 25004, 25004, 273, 1083, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 2132, 6452, 12, 2890, 16, 380, 1968, 4672, 2552, 25004, 25004, 273, 1083, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
pass
ids = self.portal.objectIds()
def afterSetUp(self): pass
0325e6531056aee7e095e90781645b02671ef2fb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11941/0325e6531056aee7e095e90781645b02671ef2fb/SetupTestcase.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1839, 694, 1211, 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, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1839, 694, 1211, 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, -1...
entity_ids[d] = { 0 : range( len(ls) ) }
entity_ids[d] = { 0 : 0 }
def __init__( self , shape , U ): # get barycenter d = shapes_new.dimension( shape ) nc = U.tensor_shape()[0] vs = shapes_new.vertices[ shape ] bary = Numeric.average( Numeric.array( map( Numeric.array , \ vs.values() ) ) ) self.pts = ( tuple(bary) , ) ls = [ functional.ComponentPointEvaluation( U , c , bary ) \ for c in range( d ) ] entity_ids = {} for i in range(d): entity_ids[i] = {} for j in shapes_new.entity_range( shape , i ): entity_ids[i][j] = {} entity_ids[d] = { 0 : range( len(ls) ) }
25b2c753f781b31940347e20feb94c29e06bb61f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/625/25b2c753f781b31940347e20feb94c29e06bb61f/P0.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 365, 269, 2179, 269, 587, 262, 30, 468, 336, 324, 814, 5693, 302, 273, 14736, 67, 2704, 18, 11808, 12, 2179, 262, 8194, 273, 587, 18, 13720, 67, 4867, 1435, 63, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 365, 269, 2179, 269, 587, 262, 30, 468, 336, 324, 814, 5693, 302, 273, 14736, 67, 2704, 18, 11808, 12, 2179, 262, 8194, 273, 587, 18, 13720, 67, 4867, 1435, 63, ...
key]] = map(float, line[40:].split().replace('-', '0.0'))
key]] = map(float, line[40:].replace( ' - ', ' 0.0 ').split())
def get_summary(self): '''Get a summary of the data.'''
4910411c249c5b20ea35e0bd02f425a156922b16 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3290/4910411c249c5b20ea35e0bd02f425a156922b16/Scala.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 7687, 12, 2890, 4672, 9163, 967, 279, 4916, 434, 326, 501, 1093, 6309, 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, 336, 67, 7687, 12, 2890, 4672, 9163, 967, 279, 4916, 434, 326, 501, 1093, 6309, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
(x, overshoot, -(plotheight+overshoot)), tickat)) +
(x*hs, overshoot, -(plotheight+overshoot)), tickat)) +
def plot(arg, inp, out, meta): """Read data from `inp` and create a plot of the stations specified in the list `arg`. Plot is written to `out`. Metadata (station name, location) is takem from the `meta` file (usually v2.inv). """ import struct BAD = -9999 table = asdict(arg, inp) if meta: meta = get_meta(table, meta) title = [] for id11,d in meta.items(): title.append('%s %+06.2f%+07.2f %s' % (id11, d['lat'], d['lon'], d['name'])) title = '\n'.join(title) minyear = 9999 maxyear = -9999 highest = -9999 lowest = 9999 for _,lines in table.items(): for row in lines: year = int(row[12:16]) minyear = min(minyear, year) maxyear = max(maxyear, year) data = struct.unpack('5s'*12, row[16:-1]) for datum in map(int, data): if datum == BAD: continue highest = max(highest, datum) lowest = min(lowest, datum) if highest == -9999: raise Error('No data found for %s' % (', '.join(table))) # The data should be such that a station cannot have entirely # invalid data. At least one year should have at least one valid # datum. assert highest > -9999 assert lowest < 9999 highest /= 10.0 lowest /= 10.0 limyear = maxyear + 1 # Bounds of the box that displays data. In SVG viewBox format. databox = (minyear, lowest, limyear-minyear, highest-lowest) plotwidth = databox[2] plotheight = databox[3] out.write("""<svg width='1000px' height='750px' viewBox='0 0 %d %d' xmlns="http://www.w3.org/2000/svg" version="1.1">\n""" % (plotwidth+12, plotheight+20)) # Style out.write("""<defs> <style type="text/css"> path { stroke-width: 0.1; fill: none } path.singleton { stroke-width: 0.2; stroke-linecap: round } g#axes path { stroke-width:0.1; fill:none; stroke: #888 } g#axes text { fill: black; font-family: Verdana } g#title text { fill: black; font-family: Verdana }
56f4bc366ef894f5205cbf82b6b8d1525a03fba4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6890/56f4bc366ef894f5205cbf82b6b8d1525a03fba4/stationplot.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3207, 12, 3175, 16, 12789, 16, 596, 16, 2191, 4672, 3536, 1994, 501, 628, 1375, 31647, 68, 471, 752, 279, 3207, 434, 326, 29719, 1269, 316, 326, 666, 1375, 3175, 8338, 225, 15211, 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, 3207, 12, 3175, 16, 12789, 16, 596, 16, 2191, 4672, 3536, 1994, 501, 628, 1375, 31647, 68, 471, 752, 279, 3207, 434, 326, 29719, 1269, 316, 326, 666, 1375, 3175, 8338, 225, 15211, 353, ...
None, [cty.c_int, cty.c_int],
None, [cty.c_int, cty.c_int],
def fl_setpup_position(x, y): """ fl_setpup_position(x, y) """ _fl_setpup_position(x, y)
9942dac8ce2b35a1e43615a26fd8e7054ef805d3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2429/9942dac8ce2b35a1e43615a26fd8e7054ef805d3/xformslib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1183, 67, 542, 84, 416, 67, 3276, 12, 92, 16, 677, 4672, 3536, 1183, 67, 542, 84, 416, 67, 3276, 12, 92, 16, 677, 13, 3536, 225, 389, 2242, 67, 542, 84, 416, 67, 3276, 12, 92, 16...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1183, 67, 542, 84, 416, 67, 3276, 12, 92, 16, 677, 4672, 3536, 1183, 67, 542, 84, 416, 67, 3276, 12, 92, 16, 677, 13, 3536, 225, 389, 2242, 67, 542, 84, 416, 67, 3276, 12, 92, 16...
[x^2 + x + 1, [0, 1], -3, 1, [Mat([1, -0.50000000000000000000000000000000000000 + 0.86602540378443864676372317075293618347*I]), [1, 0.36602540378443864676372317075293618347; 1, -1.3660254037844386467637231707529361835], 0, [2, -1; -1, -1], [3, 2; 0, 1], [1, -1; -1, -2], [3, [2, -1; 1, 1]]], [-0.50000000000000000000000000000000000000 + 0.86602540378443864676372317075293618347*I], [1, x], [1, 0; 0, 1], [1, 0, 0, -1; 0, 1, 1, -1]]
[x^2 + x + 1, [0, 1], -3, 1, ... [1, x], [1, 0; 0, 1], [1, 0, 0, -1; 0, 1, 1, -1]]
def _pari_init_(self): """ Needed for conversion of number field to PARI. EXAMPLES: sage: k = NumberField(x^2 + x + 1, 'a') sage: k._pari_init_() 'nfinit(x^2 + x + 1)' sage: k._pari_() [x^2 + x + 1, [0, 1], -3, 1, [Mat([1, -0.50000000000000000000000000000000000000 + 0.86602540378443864676372317075293618347*I]), [1, 0.36602540378443864676372317075293618347; 1, -1.3660254037844386467637231707529361835], 0, [2, -1; -1, -1], [3, 2; 0, 1], [1, -1; -1, -2], [3, [2, -1; 1, 1]]], [-0.50000000000000000000000000000000000000 + 0.86602540378443864676372317075293618347*I], [1, x], [1, 0; 0, 1], [1, 0, 0, -1; 0, 1, 1, -1]] sage: pari(k) [x^2 + x + 1, [0, 1], -3, 1, [Mat([1, -0.50000000000000000000000000000000000000 + 0.86602540378443864676372317075293618347*I]), [1, 0.36602540378443864676372317075293618347; 1, -1.3660254037844386467637231707529361835], 0, [2, -1; -1, -1], [3, 2; 0, 1], [1, -1; -1, -2], [3, [2, -1; 1, 1]]], [-0.50000000000000000000000000000000000000 + 0.86602540378443864676372317075293618347*I], [1, x], [1, 0; 0, 1], [1, 0, 0, -1; 0, 1, 1, -1]] """ return 'nfinit(%s)'%self.pari_polynomial()
4323d4c57b428df4f1cf516cf22018c93ee7dbed /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/4323d4c57b428df4f1cf516cf22018c93ee7dbed/number_field.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1065, 77, 67, 2738, 67, 12, 2890, 4672, 3536, 26480, 364, 4105, 434, 1300, 652, 358, 3939, 45, 18, 225, 5675, 8900, 11386, 30, 272, 410, 30, 417, 273, 3588, 974, 12, 92, 66, 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, 389, 1065, 77, 67, 2738, 67, 12, 2890, 4672, 3536, 26480, 364, 4105, 434, 1300, 652, 358, 3939, 45, 18, 225, 5675, 8900, 11386, 30, 272, 410, 30, 417, 273, 3588, 974, 12, 92, 66, 22,...
modname = modname + dirname + '.'
modname = dirname + '.' + modname
def getenvironment(self): if self.path: file = self.path dir = os.path.dirname(file) # check if we're part of a package modname = "" while os.path.exists(os.path.join(dir, "__init__.py")): dir, dirname = os.path.split(dir) modname = modname + dirname + '.' subname = _filename_as_modname(self.title) if modname: if subname == "__init__": modname = modname[:-1] # strip trailing period else: modname = modname + subname else: modname = subname if sys.modules.has_key(modname): globals = sys.modules[modname].__dict__ self.globals = {} else: globals = self.globals else: file = '<%s>' % self.title globals = self.globals modname = file return globals, file, modname
d55730cde9f71e09e4c5ad7e85cee398d9ebc570 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/d55730cde9f71e09e4c5ad7e85cee398d9ebc570/PyEdit.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 10274, 12, 2890, 4672, 309, 365, 18, 803, 30, 585, 273, 365, 18, 803, 1577, 273, 1140, 18, 803, 18, 12287, 12, 768, 13, 468, 866, 309, 732, 4565, 1087, 434, 279, 2181, 16037, 27...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 10274, 12, 2890, 4672, 309, 365, 18, 803, 30, 585, 273, 365, 18, 803, 1577, 273, 1140, 18, 803, 18, 12287, 12, 768, 13, 468, 866, 309, 732, 4565, 1087, 434, 279, 2181, 16037, 27...
object.settag( "active", 0 )
if object.baseid == "comcrystal_receiver" : activate_receiver( object ) else: activate_sender( object )
def onContextEntry(player, object, entry): if entry == 400: object.settag( "active", 0 ) if entry == 401: object.deltag( "active" ) object.resendtooltip() return True
fee0bd587814a931b25d1fd5c61d8581d0aed4c5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/fee0bd587814a931b25d1fd5c61d8581d0aed4c5/comcrystals.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 1042, 1622, 12, 14872, 16, 733, 16, 1241, 4672, 309, 1241, 422, 7409, 30, 309, 733, 18, 1969, 350, 422, 315, 832, 3353, 31365, 67, 24454, 6, 294, 10235, 67, 24454, 12, 733, 262, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 1042, 1622, 12, 14872, 16, 733, 16, 1241, 4672, 309, 1241, 422, 7409, 30, 309, 733, 18, 1969, 350, 422, 315, 832, 3353, 31365, 67, 24454, 6, 294, 10235, 67, 24454, 12, 733, 262, ...
cacheId = "protected-%s" % self._context['jobconf']._fname
cacheId = "protected-%s" % self._context['config']._fname
def _storeProtectedFields(self): cacheId = "protected-%s" % self._context['jobconf']._fname # use path to main config file for context self._cache.write(cacheId, protectedoptimizer.get())
609cd85b3f51500cf0af36fe6004e93a406ff654 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5718/609cd85b3f51500cf0af36fe6004e93a406ff654/TreeCompiler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2233, 15933, 2314, 12, 2890, 4672, 21367, 273, 315, 1117, 6456, 87, 6, 738, 365, 6315, 2472, 3292, 1425, 3546, 6315, 12749, 225, 468, 999, 589, 358, 2774, 642, 585, 364, 819, 365, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2233, 15933, 2314, 12, 2890, 4672, 21367, 273, 315, 1117, 6456, 87, 6, 738, 365, 6315, 2472, 3292, 1425, 3546, 6315, 12749, 225, 468, 999, 589, 358, 2774, 642, 585, 364, 819, 365, ...
Note, if an element's count has been set to zero or a negative number, elements() will ignore it.
Note, if an element's count has been set to zero or is a negative number, elements() will ignore it.
def elements(self): '''Iterator over elements repeating each as many times as its count.
eb5bd1c66560d71d0ddca0221c88584e38f0d556 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3187/eb5bd1c66560d71d0ddca0221c88584e38f0d556/collections.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2186, 12, 2890, 4672, 9163, 3198, 1879, 2186, 30571, 1517, 487, 4906, 4124, 487, 2097, 1056, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 2186, 12, 2890, 4672, 9163, 3198, 1879, 2186, 30571, 1517, 487, 4906, 4124, 487, 2097, 1056, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
if self.config.get("general", "useoffline").lower() == "true":
if self.UseOffline:
def Start(self): """ Start the Factory """ self.Intialize()
16cdb8fdf1d74b24f2cda284e1cf22d7310ba17f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12601/16cdb8fdf1d74b24f2cda284e1cf22d7310ba17f/Factory.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3603, 12, 2890, 4672, 3536, 3603, 326, 7822, 225, 3536, 365, 18, 1702, 1710, 1435, 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, 3603, 12, 2890, 4672, 3536, 3603, 326, 7822, 225, 3536, 365, 18, 1702, 1710, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
lambda: collections.defaultdict(int))
lambda: collections.defaultdict(float))
def __init__(self, games, skill_model): self.skill_model = skill_model
57a620ce7c222ab1bc56811e70ce40710d67be1d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10357/57a620ce7c222ab1bc56811e70ce40710d67be1d/compute_stats.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 28422, 16, 15667, 67, 2284, 4672, 365, 18, 7771, 737, 67, 2284, 273, 15667, 67, 2284, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 28422, 16, 15667, 67, 2284, 4672, 365, 18, 7771, 737, 67, 2284, 273, 15667, 67, 2284, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
Returns `None` if the expression cannot be evaluated.
Return `None` if the expression cannot be evaluated.
def get_statement_result(scope, node): """Evaluate a `ast.AST` node and return a PyName Returns `None` if the expression cannot be evaluated. """ return get_primary_and_result(scope, node)[1]
40aeb93a1b8374662d216abe6e8c99bbdc54bcba /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8286/40aeb93a1b8374662d216abe6e8c99bbdc54bcba/evaluate.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 11516, 67, 2088, 12, 4887, 16, 756, 4672, 3536, 15369, 279, 1375, 689, 18, 9053, 68, 756, 471, 327, 279, 4707, 461, 225, 2000, 1375, 7036, 68, 309, 326, 2652, 2780, 506, 12697...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 11516, 67, 2088, 12, 4887, 16, 756, 4672, 3536, 15369, 279, 1375, 689, 18, 9053, 68, 756, 471, 327, 279, 4707, 461, 225, 2000, 1375, 7036, 68, 309, 326, 2652, 2780, 506, 12697...
Rcomment = re.compile("<!--.*?-->", re.M) while True: comment = Rcomment.search(thistxt) if not comment: break thistxt = thistxt[:comment.start()] + thistxt[comment.end():]
thistxt = re.sub("(?ms)<!--.*?-->", "", thistxt)
def linkedPages(self): """Gives the normal (not-interwiki, non-category) pages the page links to, as a list of Page objects """ result = [] try: thistxt = removeLanguageLinks(self.get()) except NoPage: return [] except IsRedirectPage: raise thistxt = removeCategoryLinks(thistxt, self.site())
2a38b30275da1487e3b0b2bde42dec9735cec643 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4404/2a38b30275da1487e3b0b2bde42dec9735cec643/wikipedia.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8459, 5716, 12, 2890, 4672, 3536, 43, 3606, 326, 2212, 261, 902, 17, 2761, 13044, 16, 1661, 17, 4743, 13, 4689, 326, 1363, 4716, 358, 16, 487, 279, 666, 434, 3460, 2184, 3536, 563, 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, 8459, 5716, 12, 2890, 4672, 3536, 43, 3606, 326, 2212, 261, 902, 17, 2761, 13044, 16, 1661, 17, 4743, 13, 4689, 326, 1363, 4716, 358, 16, 487, 279, 666, 434, 3460, 2184, 3536, 563, 273...
def form_factory(self, wrapper):
def form_factory(self, wrapper, prefix=''):
def form_factory(self, wrapper): """ Build a basic Form if possible, else it returns a parent form """ if wrapper.children: return self.get_parent_form(wrapper) return self.get_vanilla_form(wrapper)
be181697e5a2460a018bf9ec2944c0b9110cca80 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10509/be181697e5a2460a018bf9ec2944c0b9110cca80/form.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 646, 67, 6848, 12, 2890, 16, 4053, 16, 1633, 2218, 11, 4672, 3536, 3998, 279, 5337, 2748, 309, 3323, 16, 469, 518, 1135, 279, 982, 646, 3536, 309, 4053, 18, 5906, 30, 327, 365, 18, 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, 646, 67, 6848, 12, 2890, 16, 4053, 16, 1633, 2218, 11, 4672, 3536, 3998, 279, 5337, 2748, 309, 3323, 16, 469, 518, 1135, 279, 982, 646, 3536, 309, 4053, 18, 5906, 30, 327, 365, 18, 5...
entity.mapper.add_property(self.name, sa.orm.synonym(attr_name))
def after_mapper(self): if not hasattr(assoc_entity, '_assoc_mapper'): assoc_entity._assoc_mapper = sa.orm.mapper( GenericAssoc, assoc_entity._assoc_table, properties={ 'targets': sa.orm.relation( assoc_entity, secondary=assoc_entity._assoc_to_table, lazy=lazy, backref='associations', order_by=assoc_entity.mapper.order_by) }) entity = self.entity entity.mapper.add_property( attr_name, sa.orm.relation(GenericAssoc, lazy=self.lazy, backref='_backref_%s' % entity.table.name) )
55e82aa314a9fc75c8733eb854fbc19570a36346 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11921/55e82aa314a9fc75c8733eb854fbc19570a36346/associable.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1839, 67, 13919, 12, 2890, 4672, 309, 486, 3859, 12, 14578, 67, 1096, 16, 2070, 14578, 67, 13919, 11, 4672, 7191, 67, 1096, 6315, 14578, 67, 13919, 273, 7864, 18, 535, 18, 13919, 12, 7...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1839, 67, 13919, 12, 2890, 4672, 309, 486, 3859, 12, 14578, 67, 1096, 16, 2070, 14578, 67, 13919, 11, 4672, 7191, 67, 1096, 6315, 14578, 67, 13919, 273, 7864, 18, 535, 18, 13919, 12, 7...
reader = csv.reader(open("map.csv"))
reader = csv.reader(open(find_resource("map.csv")))
def test_spt_performance(self): g = Graph() reader = csv.reader(open("map.csv")) for wayid, fromv, tov, length in reader: g.add_vertex( fromv ) g.add_vertex( tov ) g.add_edge( fromv, tov, Street( wayid, float(length) ) ) runtimes = [] nodeids = ["53204010","53116165","53157403", "30279744","67539645","53217469", "152264675","53062837","53190677", "53108368","91264868","53145350", "53156103","53139148","108423294", "53114499","53110306","53132736", "53103049","53178033"] #twenty random node ids in the given graph for nodeid in nodeids: t0 = time.time() spt = g.shortest_path_tree( nodeid, None, State(0), WalkOptions() ) t1 = time.time() runtimes.append( t1-t0 ) average = sum(runtimes)/len(runtimes) limit = 0.031 print "average runtime is %f s; limit %f s"%(average,limit) assert average < limit
b8c859cb5e608e0077f1e0de11e18e0c0eeaef31 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10974/b8c859cb5e608e0077f1e0de11e18e0c0eeaef31/unit_test.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 87, 337, 67, 16092, 1359, 12, 2890, 4672, 314, 273, 5601, 1435, 225, 2949, 273, 6101, 18, 10530, 12, 3190, 12, 4720, 67, 3146, 2932, 1458, 18, 6715, 6, 20349, 225, 364, 4031,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 87, 337, 67, 16092, 1359, 12, 2890, 4672, 314, 273, 5601, 1435, 225, 2949, 273, 6101, 18, 10530, 12, 3190, 12, 4720, 67, 3146, 2932, 1458, 18, 6715, 6, 20349, 225, 364, 4031,...
def __div__(self, other): return "B.__div__" def __rdiv__(self, other): return "B.__rdiv__" vereq(B(1) / 1, "B.__div__") vereq(1 / B(1), "B.__rdiv__")
def __floordiv__(self, other): return "B.__floordiv__" def __rfloordiv__(self, other): return "B.__rfloordiv__" vereq(B(1) // 1, "B.__floordiv__") vereq(1 // B(1), "B.__rfloordiv__")
def __div__(self, other): return "B.__div__"
17d7494e9f328104782d1562688e9d5a56d5b36d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/17d7494e9f328104782d1562688e9d5a56d5b36d/test_descr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2892, 972, 12, 2890, 16, 1308, 4672, 327, 315, 38, 16186, 2892, 14437, 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, 1001, 2892, 972, 12, 2890, 16, 1308, 4672, 327, 315, 38, 16186, 2892, 14437, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
def setup(self, tarball = 'libhugetlbfs-1.3-pre1.tar.gz'): tarball = utils.unmap_url(self.bindir, tarball, self.tmpdir) autotest_utils.extract_tarball_to_dir(tarball, self.srcdir) os.chdir(self.srcdir) try: utils.system('make') except: utils.system('make OBJDIRS=obj64') def execute(self, dir = None, pages_requested = 20):
def initialize(self): self.job.require_gcc()
7b966edebce58b626c3b054de7ab66e9918adc99 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10349/7b966edebce58b626c3b054de7ab66e9918adc99/libhugetlbfs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4046, 12, 2890, 4672, 365, 18, 4688, 18, 6528, 67, 75, 952, 1435, 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, 4046, 12, 2890, 4672, 365, 18, 4688, 18, 6528, 67, 75, 952, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
parser.add_option("-l", "--license", dest="license", default=None, type="string", help="append license file to js and css")
parser.add_option("-l", "--no-license", dest="license", default=True, action="store_false", help="Do NOT append license file to js and css. (license is taken from $cwd/license.txt")
def main(argv=sys.argv): """ Entry point when the script is called from the command line, not used as a module. """ import optparse usage = """%prog [options] source destination
724f61348e9b910667eb3f6d0fa422a6d4a6d6c2 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10922/724f61348e9b910667eb3f6d0fa422a6d4a6d6c2/dfbuild.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 19485, 33, 9499, 18, 19485, 4672, 3536, 3841, 1634, 1347, 326, 2728, 353, 2566, 628, 326, 1296, 980, 16, 486, 1399, 487, 279, 1605, 18, 3536, 1930, 2153, 2670, 4084, 273, 3536,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2774, 12, 19485, 33, 9499, 18, 19485, 4672, 3536, 3841, 1634, 1347, 326, 2728, 353, 2566, 628, 326, 1296, 980, 16, 486, 1399, 487, 279, 1605, 18, 3536, 1930, 2153, 2670, 4084, 273, 3536,...
if not os.path.exists(self.diracInstallPath):
if not os.path.exists( self.diracInstallPath ):
def initialize(self,loops=0): """Sets default parameters and creates CE instance """ self.maxcount = loops
364464017f61dc703439c7a2235a47d4ba35aafe /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/364464017f61dc703439c7a2235a47d4ba35aafe/DiracSiteAgent.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4046, 12, 2890, 16, 383, 4473, 33, 20, 4672, 3536, 2785, 805, 1472, 471, 3414, 29538, 791, 3536, 365, 18, 1896, 1883, 273, 14075, 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, 4046, 12, 2890, 16, 383, 4473, 33, 20, 4672, 3536, 2785, 805, 1472, 471, 3414, 29538, 791, 3536, 365, 18, 1896, 1883, 273, 14075, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
logger.debug("Connection from %s" % (self.transport.getHost().host,))
logger.debug("Connection from %s" % (self.transport.getPeer().host,))
def connectionMade(self): logger = logging.getLogger() logger.debug("Connection from %s" % (self.transport.getHost().host,)) http.HTTPChannel.connectionMade(self)
70c359a50f22be7a72d322b80fcacac7c043ccfd /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5988/70c359a50f22be7a72d322b80fcacac7c043ccfd/xmlrpc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1459, 49, 2486, 12, 2890, 4672, 1194, 273, 2907, 18, 588, 3328, 1435, 1194, 18, 4148, 2932, 1952, 628, 738, 87, 6, 738, 261, 2890, 18, 13049, 18, 588, 6813, 7675, 2564, 16, 3719, 1062,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1459, 49, 2486, 12, 2890, 4672, 1194, 273, 2907, 18, 588, 3328, 1435, 1194, 18, 4148, 2932, 1952, 628, 738, 87, 6, 738, 261, 2890, 18, 13049, 18, 588, 6813, 7675, 2564, 16, 3719, 1062,...
new_file = not os.access(CONF_FILE,os.F_OK) fd = file(CONF_FILE, "wb") try: if new_file: os.chmod(CONF_FILE,0600) fd.write(pprint(conf)) finally: fd.close()
pass
def save(*args): new_file = not os.access(CONF_FILE,os.F_OK) fd = file(CONF_FILE, "wb") try: if new_file: os.chmod(CONF_FILE,0600) fd.write(pprint(conf)) finally: fd.close()
b096400e4611197b25b73656136829d64d2fee53 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5554/b096400e4611197b25b73656136829d64d2fee53/conf.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1923, 30857, 1968, 4672, 1342, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1923, 30857, 1968, 4672, 1342, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
group_id = self.id_get(cr, 'res.groups', group)
group_id = self.id_get(cr, group)
def _tag_report(self, cr, rec, data_node=None): res = {} for dest,f in (('name','string'),('model','model'),('report_name','name')): res[dest] = rec.get(f,'').encode('utf8') assert res[dest], "Attribute %s of report is empty !" % (f,) for field,dest in (('rml','report_rml'),('file','report_rml'),('xml','report_xml'),('xsl','report_xsl'),('attachment','attachment'),('attachment_use','attachment_use')): if rec.get(field): res[dest] = rec.get(field).encode('utf8') if rec.get('auto'): res['auto'] = eval(rec.get('auto','False')) if rec.get('sxw'): sxw_content = misc.file_open(rec.get('sxw')).read() res['report_sxw_content'] = sxw_content if rec.get('header'): res['header'] = eval(rec.get('header','False')) if rec.get('report_type'): res['report_type'] = rec.get('report_type')
4bc20ff99f4251e4705e5836bf656f172bf6fd92 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/4bc20ff99f4251e4705e5836bf656f172bf6fd92/convert.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2692, 67, 6006, 12, 2890, 16, 4422, 16, 1950, 16, 501, 67, 2159, 33, 7036, 4672, 400, 273, 2618, 364, 1570, 16, 74, 316, 261, 2668, 529, 17023, 1080, 19899, 2668, 2284, 17023, 228...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2692, 67, 6006, 12, 2890, 16, 4422, 16, 1950, 16, 501, 67, 2159, 33, 7036, 4672, 400, 273, 2618, 364, 1570, 16, 74, 316, 261, 2668, 529, 17023, 1080, 19899, 2668, 2284, 17023, 228...
1)
1, cost)
def _find_sms(self, a_lower, a_upper, b_lower, b_upper, find_minimal): """ Finds the Shortest Middle Snake. """ down_vector = self.fdiag # The vector for the (0, 0) to (x, y) search up_vector = self.bdiag # The vector for the (u, v) to (N, M) search
b916ddeca30cdfdaf0e81e61e8f674df1d86691a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1600/b916ddeca30cdfdaf0e81e61e8f674df1d86691a/myersdiff.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4720, 67, 20984, 12, 2890, 16, 279, 67, 8167, 16, 279, 67, 5797, 16, 324, 67, 8167, 16, 324, 67, 5797, 16, 1104, 67, 1154, 2840, 4672, 3536, 4163, 87, 326, 7925, 395, 490, 3132,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4720, 67, 20984, 12, 2890, 16, 279, 67, 8167, 16, 279, 67, 5797, 16, 324, 67, 8167, 16, 324, 67, 5797, 16, 1104, 67, 1154, 2840, 4672, 3536, 4163, 87, 326, 7925, 395, 490, 3132,...
"""Return a string representation in the non mangled format.
"""Return a string representation in the non-mangled format.
def strFullsize(self, wantprefixlen = None): """Return a string representation in the non mangled format.
beeb5ca0480c8d1ae505244beb56772f807ba70e /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/14367/beeb5ca0480c8d1ae505244beb56772f807ba70e/IPy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 609, 5080, 1467, 12, 2890, 16, 2545, 3239, 1897, 273, 599, 4672, 3536, 990, 279, 533, 4335, 316, 326, 1661, 29674, 1259, 740, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 609, 5080, 1467, 12, 2890, 16, 2545, 3239, 1897, 273, 599, 4672, 3536, 990, 279, 533, 4335, 316, 326, 1661, 29674, 1259, 740, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
return (self._testObject1.GetOutput().GetClassName(),)
return (self._curvatures.GetOutput().GetClassName(),)
def getOutputDescriptions(self): return (self._testObject1.GetOutput().GetClassName(),)
c99c0d08f17665b59f6fee5cbb26bc995d2b627a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4494/c99c0d08f17665b59f6fee5cbb26bc995d2b627a/testModule.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11062, 16844, 12, 2890, 4672, 327, 261, 2890, 6315, 3813, 921, 21, 18, 967, 1447, 7675, 967, 3834, 9334, 13, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11062, 16844, 12, 2890, 4672, 327, 261, 2890, 6315, 3813, 921, 21, 18, 967, 1447, 7675, 967, 3834, 9334, 13, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
picklefile=self.__getpicklefile(self.path)
picklefile=self.__getpicklefile(path) if not os.path.exists(picklefile): return {}
def __getproperties(self, path): picklefile=self.__getpicklefile(self.path) f=open(picklefile) fd=f.fileno() fcntl.flock(fd, fcntl.LOCK_SH) data=cPickle.load(f) fcntl.flock(fd, fcntl.LOCK_UN) f.close() return data
afd073c5afc0866feaab4a818715a1683c69b971 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5832/afd073c5afc0866feaab4a818715a1683c69b971/pickleProps.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 588, 4738, 12, 2890, 16, 589, 4672, 13379, 768, 33, 2890, 16186, 588, 20847, 768, 12, 803, 13, 309, 486, 1140, 18, 803, 18, 1808, 12, 20847, 768, 4672, 327, 2618, 284, 33, 3190, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 588, 4738, 12, 2890, 16, 589, 4672, 13379, 768, 33, 2890, 16186, 588, 20847, 768, 12, 803, 13, 309, 486, 1140, 18, 803, 18, 1808, 12, 20847, 768, 4672, 327, 2618, 284, 33, 3190, ...
return self.content()
return _libxml.xmlNodeGetContent(self._o)
def __getattr__(self, attr): if attr == "parent": ret = _libxml.parent(self._o) if ret == None: return None return xmlNode(_obj=ret) elif attr == "properties": ret = _libxml.properties(self._o) if ret == None: return None return xmlAttr(_obj=ret)
cfb0546244beb0b3ae297f8dee0fa9bfdc2e1115 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12659/cfb0546244beb0b3ae297f8dee0fa9bfdc2e1115/libxml.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 588, 1747, 972, 12, 2890, 16, 1604, 4672, 309, 1604, 422, 315, 2938, 6877, 325, 273, 389, 2941, 2902, 18, 2938, 12, 2890, 6315, 83, 13, 309, 325, 422, 599, 30, 327, 599, 327, 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, 588, 1747, 972, 12, 2890, 16, 1604, 4672, 309, 1604, 422, 315, 2938, 6877, 325, 273, 389, 2941, 2902, 18, 2938, 12, 2890, 6315, 83, 13, 309, 325, 422, 599, 30, 327, 599, 327, 2...
:param silent: If set to False parsing errors will not be catched.
:param silent: If set to False parsing errors will not be caught.
def parse_form_data(environ, stream_factory=None, charset='utf-8', errors='ignore', max_form_memory_size=None, max_content_length=None, cls=None, silent=True): """Parse the form data in the environ and return it as tuple in the form ``(stream, form, files)``. You should only call this method if the transport method is `POST` or `PUT`. If the mimetype of the data transmitted is `multipart/form-data` the files multidict will be filled with `FileStorage` objects. If the mimetype is unknown the input stream is wrapped and returned as first argument, else the stream is empty. This function does not raise exceptions, even if the input data is malformed. Have a look at :ref:`dealing-with-request-data` for more details. .. versionadded:: 0.5 The `max_form_memory_size`, `max_content_length` and `cls` parameters were added. .. versionadded:: 0.5.1 The optional `silent` flag was added. :param environ: the WSGI environment to be used for parsing. :param stream_factory: An optional callable that returns a new read and writeable file descriptor. This callable works the same as :meth:`~BaseResponse._get_file_stream`. :param charset: The character set for URL and url encoded form data. :param errors: The encoding error behavior. :param max_form_memory_size: the maximum number of bytes to be accepted for in-memory stored form data. If the data exceeds the value specified an :exc:`~exceptions.RequestURITooLarge` exception is raised. :param max_content_length: If this is provided and the transmitted data is longer than this value an :exc:`~exceptions.RequestEntityTooLarge` exception is raised. :param cls: an optional dict class to use. If this is not specified or `None` the default :class:`MultiDict` is used. :param silent: If set to False parsing errors will not be catched. :return: A tuple in the form ``(stream, form, files)``. """ content_type, extra = parse_options_header(environ.get('CONTENT_TYPE', '')) try: content_length = int(environ['CONTENT_LENGTH']) except (KeyError, ValueError): content_length = 0 if cls is None: cls = MultiDict if max_content_length is not None and content_length > max_content_length: raise RequestEntityTooLarge() stream = _empty_stream files = () if content_type == 'multipart/form-data': try: form, files = parse_multipart(environ['wsgi.input'], extra.get('boundary'), content_length, stream_factory, charset, errors, max_form_memory_size=max_form_memory_size) except ValueError, e: if not silent: raise form = cls() else: form = cls(form) elif content_type == 'application/x-www-form-urlencoded' or \ content_type == 'application/x-url-encoded': if max_form_memory_size is not None and \ content_length > max_form_memory_size: raise RequestEntityTooLarge() form = url_decode(environ['wsgi.input'].read(content_length), charset, errors=errors, cls=cls) else: form = cls() stream = LimitedStream(environ['wsgi.input'], content_length) return stream, form, cls(files)
d547d10fb4c9e15eba5db485669e2edc4e33be4b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/14437/d547d10fb4c9e15eba5db485669e2edc4e33be4b/utils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 687, 67, 892, 12, 28684, 16, 1407, 67, 6848, 33, 7036, 16, 4856, 2218, 3158, 17, 28, 2187, 1334, 2218, 6185, 2187, 943, 67, 687, 67, 7858, 67, 1467, 33, 7036, 16, 943, 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, 1109, 67, 687, 67, 892, 12, 28684, 16, 1407, 67, 6848, 33, 7036, 16, 4856, 2218, 3158, 17, 28, 2187, 1334, 2218, 6185, 2187, 943, 67, 687, 67, 7858, 67, 1467, 33, 7036, 16, 943, 67, ...
if type(operand) == types.ListType: vString = ','.join( [ "'"+str(x)+"'" for x in operand] ) selectList.append("Value NOT IN (%s)" % vString)
if type( operand ) == types.ListType: vString = ','.join( [ "'" + str( x ) + "'" for x in operand] ) selectList.append( "Value NOT IN (%s)" % vString )
def __findSubdirByMeta(self,meta,value,subdirFlag=True): """ Find directories for the given meta datum. If the the meta datum type is a list, combine values in OR. In case the meta datum is 'Any', finds all the subdirectories for which the meta datum is defined at all. """ if type(value) == types.DictType: selectList = [] for operation,operand in value.items(): if operation in ['>','<','>=','<=']: if type(operand) == types.ListType: return S_ERROR('Illegal query: list of values for comparison operation') if type(operand) in [types.IntType,types.LongType]: selectList.append( "Value%s%d" % (operation,operand) ) elif type(operand) == types.FloatType: selectList.append( "Value%s%f" % (operation,operand) ) else: selectList.append( "Value%s'%s'" % (operation,operand) ) elif operation == 'in' or operation == "=": if type(operand) == types.ListType: vString = ','.join( [ "'"+str(x)+"'" for x in operand] ) selectList.append("Value IN (%s)" % vString) else: selectList.append("Value='%s'" % operand ) elif operation == 'nin' or operation == "!=": if type(operand) == types.ListType: vString = ','.join( [ "'"+str(x)+"'" for x in operand] ) selectList.append("Value NOT IN (%s)" % vString) else: selectList.append("Value!='%s'" % operand ) selectString = ' AND '.join(selectList) req = " SELECT DirID FROM FC_Meta_%s WHERE %s" % (meta,selectString) elif type(value) == types.ListType: vString = ','.join( [ "'"+str(x)+"'" for x in value] ) req = " SELECT DirID FROM FC_Meta_%s WHERE Value IN (%s) " % (meta,vString) else: if value == "Any": req = " SELECT DirID FROM FC_Meta_%s " % meta else: req = " SELECT DirID FROM FC_Meta_%s WHERE Value='%s' " % (meta,value) print req result = self._query(req) if not result['OK']: return result if not result['Value']: return S_OK([]) dirList = [] for row in result['Value']: dirID = row[0] dirList.append(dirID) if subdirFlag: result = self.dtree.getSubdirectoriesByID(dirID) if not result['OK']: return result dirList += result['Value'] return S_OK(dirList)
127f98379e5064d0a5d5df2ba7ce74c780770faa /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/127f98379e5064d0a5d5df2ba7ce74c780770faa/DirectoryMetadata.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 4720, 1676, 1214, 858, 2781, 12, 2890, 16, 3901, 16, 1132, 16, 1717, 1214, 4678, 33, 5510, 4672, 3536, 4163, 6402, 364, 326, 864, 2191, 12059, 18, 971, 326, 326, 2191, 12059, 618, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4720, 1676, 1214, 858, 2781, 12, 2890, 16, 3901, 16, 1132, 16, 1717, 1214, 4678, 33, 5510, 4672, 3536, 4163, 6402, 364, 326, 864, 2191, 12059, 18, 971, 326, 326, 2191, 12059, 618, ...
def _load_testfile(filename, package, module_relative):
def _load_testfile(filename, package, module_relative, encoding):
def _load_testfile(filename, package, module_relative): if module_relative: package = _normalize_module(package, 3) filename = _module_relative_path(package, filename) if hasattr(package, '__loader__'): if hasattr(package.__loader__, 'get_data'): return package.__loader__.get_data(filename).decode('utf-8'), filename return open(filename, encoding="utf-8").read(), filename
1862736c3afcbb0446c06eff1ce76a43ca03ebb1 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12029/1862736c3afcbb0446c06eff1ce76a43ca03ebb1/doctest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 945, 67, 3813, 768, 12, 3459, 16, 2181, 16, 1605, 67, 11626, 16, 2688, 4672, 309, 1605, 67, 11626, 30, 2181, 273, 389, 12237, 67, 2978, 12, 5610, 16, 890, 13, 1544, 273, 389, 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, 389, 945, 67, 3813, 768, 12, 3459, 16, 2181, 16, 1605, 67, 11626, 16, 2688, 4672, 309, 1605, 67, 11626, 30, 2181, 273, 389, 12237, 67, 2978, 12, 5610, 16, 890, 13, 1544, 273, 389, 29...
dbtab.databases.update(getattr(DB, 'databases', {})) DB.databases = dbtab.databases else: DB = ZODB.DB(m.Storage, databases=dbtab.databases)
databases.update(getattr(DB, 'databases', {})) DB.databases = databases else: DB = ZODB.DB(m.Storage, databases=databases)
def startup(): global app # Import products OFS.Application.import_products() configuration = getConfiguration() # Open the database dbtab = configuration.dbtab try: # Try to use custom storage try: m=imp.find_module('custom_zodb',[configuration.testinghome]) except: m=imp.find_module('custom_zodb',[configuration.instancehome]) except: # if there is no custom_zodb, use the config file specified databases DB = dbtab.getDatabase('/', is_root=1) else: m=imp.load_module('Zope2.custom_zodb', m[0], m[1], m[2]) sys.modules['Zope2.custom_zodb']=m if hasattr(m,'DB'): DB=m.DB dbtab.databases.update(getattr(DB, 'databases', {})) DB.databases = dbtab.databases else: DB = ZODB.DB(m.Storage, databases=dbtab.databases) Globals.BobobaseName = DB.getName() if DB.getActivityMonitor() is None: from ZODB.ActivityMonitor import ActivityMonitor DB.setActivityMonitor(ActivityMonitor()) Globals.DB = DB # Ick, this is temporary until we come up with some registry Zope2.DB = DB # Hook for providing multiple transaction object manager undo support: Globals.UndoManager=DB Globals.opened.append(DB) import ClassFactory DB.classFactory = ClassFactory.ClassFactory # "Log on" as system user newSecurityManager(None, AccessControl.User.system) # Set up the "app" object that automagically opens # connections app = App.ZApplication.ZApplicationWrapper( DB, 'Application', OFS.Application.Application, (), Globals.VersionNameName) Zope2.bobo_application = app # Initialize the app object application = app() OFS.Application.initialize(application) if Globals.DevelopmentMode: # Set up auto-refresh. from App.RefreshFuncs import setupAutoRefresh setupAutoRefresh(application._p_jar) application._p_jar.close() # "Log off" as system user noSecurityManager() global startup_time startup_time = asctime() Zope2.zpublisher_transactions_manager = TransactionsManager() Zope2.zpublisher_exception_hook = zpublisher_exception_hook Zope2.zpublisher_validated_hook = validated_hook Zope2.__bobo_before__ = noSecurityManager
e2f258ba099ecfe726cc86d02c77b9e09d73049d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/e2f258ba099ecfe726cc86d02c77b9e09d73049d/startup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11850, 13332, 2552, 595, 225, 468, 6164, 10406, 531, 4931, 18, 3208, 18, 5666, 67, 18736, 1435, 225, 1664, 273, 10316, 1435, 225, 468, 3502, 326, 2063, 1319, 7032, 273, 1664, 18, 1966, 7...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11850, 13332, 2552, 595, 225, 468, 6164, 10406, 531, 4931, 18, 3208, 18, 5666, 67, 18736, 1435, 225, 1664, 273, 10316, 1435, 225, 468, 3502, 326, 2063, 1319, 7032, 273, 1664, 18, 1966, 7...