rem
stringlengths
1
226k
add
stringlengths
0
227k
context
stringlengths
6
326k
meta
stringlengths
143
403
input_ids
listlengths
256
256
attention_mask
listlengths
256
256
labels
listlengths
128
128
signal.signal(signum, handler)
if handler is not None: signal.signal(signum, handler)
def restore(self): for signum, handler in self._store.iteritems(): signal.signal(signum, handler)
88a2168058e0fb862cf5fb96ce5746beb546c259 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/88a2168058e0fb862cf5fb96ce5746beb546c259/util.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5217, 12, 2890, 4672, 364, 26006, 16, 1838, 316, 365, 6315, 2233, 18, 2165, 3319, 13332, 4277, 18, 10420, 12, 2977, 379, 16, 1838, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 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, 5217, 12, 2890, 4672, 364, 26006, 16, 1838, 316, 365, 6315, 2233, 18, 2165, 3319, 13332, 4277, 18, 10420, 12, 2977, 379, 16, 1838, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, ...
if 'USERPROFILE' in os.environ:
if 'APPDATA' in os.environ: homepath = os.environ["APPDATA"] elif 'USERPROFILE' in os.environ:
def __init__(self, url, proxy=None): if not url.endswith('/'): url = url + '/' self.url = url if 'USERPROFILE' in os.environ: homepath = os.path.join(os.environ["USERPROFILE"], "Local Settings", "Application Data") elif 'HOME' in os.environ: homepath = os.environ["HOME"] else: homepath = '' self.cookie_file = os.path.join(homepath, ".post-review-cookies.txt") self._cj = cookielib.MozillaCookieJar(self.cookie_file) password_mgr = ReviewBoardHTTPPasswordMgr(self.url) self._opener = opener = urllib2.build_opener( urllib2.ProxyHandler(proxy), urllib2.UnknownHandler(), urllib2.HTTPHandler(), urllib2.HTTPDefaultErrorHandler(), urllib2.HTTPErrorProcessor(), urllib2.HTTPCookieProcessor(self._cj), urllib2.HTTPBasicAuthHandler(password_mgr) ) urllib2.install_opener(self._opener) self._repositories = None self._requests = None
25d73c280e4ebca242396bd3cae8069af56fdbd2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11434/25d73c280e4ebca242396bd3cae8069af56fdbd2/reviewboard.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 880, 16, 2889, 33, 7036, 4672, 309, 486, 880, 18, 5839, 1918, 2668, 2473, 4672, 880, 273, 880, 397, 2023, 365, 18, 718, 4202, 273, 880, 309, 296, 7215, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 880, 16, 2889, 33, 7036, 4672, 309, 486, 880, 18, 5839, 1918, 2668, 2473, 4672, 880, 273, 880, 397, 2023, 365, 18, 718, 4202, 273, 880, 309, 296, 7215, ...
lang = lang_pattern.match(os.path.basename(file))
file = os.path.basename(file) lang = lang_pattern.match(file)
def main(argv): print """# This is a Makefile for the TOC.lyx files.
0385c00f3ec166dec7d08594bd322a012adf23c5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7514/0385c00f3ec166dec7d08594bd322a012adf23c5/depend.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 19485, 4672, 1172, 3536, 7, 1220, 353, 279, 4344, 768, 364, 326, 8493, 39, 18, 715, 92, 1390, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 19485, 4672, 1172, 3536, 7, 1220, 353, 279, 4344, 768, 364, 326, 8493, 39, 18, 715, 92, 1390, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
@unittest.skipUnless(HAS_SHAREDCTYPES, "requires multiprocessing.sharedctypes")
def test_heap(self): iterations = 5000 maxblocks = 50 blocks = []
dcee68dfff0eb85c681ac1411477d081bce6facd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3187/dcee68dfff0eb85c681ac1411477d081bce6facd/test_multiprocessing.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 25506, 12, 2890, 4672, 11316, 273, 20190, 943, 7996, 273, 6437, 4398, 273, 5378, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 25506, 12, 2890, 4672, 11316, 273, 20190, 943, 7996, 273, 6437, 4398, 273, 5378, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
for acl in ('watchbugzilla', 'watchcommits', 'commit', 'build', 'approveacls', 'checkout'):
for acl in ('watchbugzilla', 'watchcommits', 'commit', 'build', 'approveacls'):
def edit_package(self, package, **changes): '''Add a new package to the database. ''' # Check that the tg.identity is allowed to set themselves as owner if not identity.in_any_group('cvsadmin'): return dict(status=False, message='User must be in cvsadmin')
833e0b1b326b6f2947fe9bff0e05ccd6bdf67cf1 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9953/833e0b1b326b6f2947fe9bff0e05ccd6bdf67cf1/dispatcher.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3874, 67, 5610, 12, 2890, 16, 2181, 16, 2826, 6329, 4672, 9163, 986, 279, 394, 2181, 358, 326, 2063, 18, 9163, 468, 2073, 716, 326, 18289, 18, 10781, 353, 2935, 358, 444, 20968, 487, 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, 3874, 67, 5610, 12, 2890, 16, 2181, 16, 2826, 6329, 4672, 9163, 986, 279, 394, 2181, 358, 326, 2063, 18, 9163, 468, 2073, 716, 326, 18289, 18, 10781, 353, 2935, 358, 444, 20968, 487, 3...
while lst_move.move_dest_id and lst_move.state == 'done':
while lst_move.move_dest_id and lst_move.move_dest_id and lst_move.move_dest_id.picking_id.state == 'done':
def get_last_move(lst_move): while lst_move.move_dest_id and lst_move.state == 'done': lst_move = lst_move.move_dest_id return lst_move
6dd72363aed824c372cde3b3c62f8cd0a22d8847 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7397/6dd72363aed824c372cde3b3c62f8cd0a22d8847/mrp_repair.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 2722, 67, 8501, 12, 16923, 67, 8501, 4672, 1323, 9441, 67, 8501, 18, 8501, 67, 10488, 67, 350, 471, 9441, 67, 8501, 18, 8501, 67, 10488, 67, 350, 471, 9441, 67, 8501, 18, 85...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2722, 67, 8501, 12, 16923, 67, 8501, 4672, 1323, 9441, 67, 8501, 18, 8501, 67, 10488, 67, 350, 471, 9441, 67, 8501, 18, 8501, 67, 10488, 67, 350, 471, 9441, 67, 8501, 18, 85...
jacobian = []
j00 = 2*edgeLen*N0**2 / (2.0*dt) j01 = 2*edgeLen*N0*N1 / (2.0*dt) j10 = j01 j11 = 2*edgeLen*N1**2 / (2.0*dt) jacobian = [dampingConsts[0]*j00, dampingConsts[1]*j00, dampingConsts[0]*j01, dampingConsts[1]*j01, dampingConsts[0]*j10, dampingConsts[1]*j10, dampingConsts[0]*j11, dampingConsts[1]*j11]
def calcTri3(): """ Calculate damping constants, residual, and Jacobian values for absorbing dampers on mesh with tri3 cells. """ density = 2500.0 vp = 5000.0 vs = 3000.0 velocity = 1.2 edgeLen = 0.5**0.5 dt = 0.25 normal = [0.5**0.5, -0.5**0.5] dampingConsts = [density*vp, density*vs] residualNormal = dampingConsts[0]*velocity*edgeLen/(2.0*dt) residualTangential = dampingConsts[1]*velocity*edgeLen/(2.0*dt) residual = [residualNormal*normal[0] - residualTangential*normal[1], residualNormal*normal[1] + residualTangential*normal[0], residualNormal*normal[0] - residualTangential*normal[1], residualNormal*normal[1] + residualTangential*normal[0]] jacobian = [] print "Absorbing boundary for tri3 mesh" print "damping constants:" for v in dampingConsts: print " %16.8e" % v print "residual:" for v in residual: print " %16.8e" % v
22636c27c7f957fe66645b65342623f04e386317 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8645/22636c27c7f957fe66645b65342623f04e386317/absorbingdampers.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7029, 6251, 23, 13332, 3536, 9029, 302, 931, 310, 6810, 16, 20690, 16, 471, 804, 1077, 26968, 924, 364, 2417, 16640, 310, 302, 931, 414, 603, 6986, 598, 6882, 23, 5983, 18, 3536, 225, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7029, 6251, 23, 13332, 3536, 9029, 302, 931, 310, 6810, 16, 20690, 16, 471, 804, 1077, 26968, 924, 364, 2417, 16640, 310, 302, 931, 414, 603, 6986, 598, 6882, 23, 5983, 18, 3536, 225, ...
raise_small_hardness=param_vector[2] default_hardeness=param_vector[3] if len(materials[idx_mat][3])==5: if raise_small_hardness and (materials[idx_mat][3][4]<default_hardeness): matt[n].specular_hardness=default_hardeness else: matt[n].specular_hardness=materials[idx_mat][3][4] import_emmissive=True; if import_emmissive: emm_c=materials[idx_mat][4][:3] matt[n].emit=(emm_c[0]+emm_c[1]+emm_c[2])/3 if idx_tex>=0: mtex=matt[n].texture_slots.add() mtex.texture=tx[idx_tex] mtex.texture_coords="UV" for grp_idx in pair[1]: groups[grp_idx][5].data.materials.append(matt[n]) n=n+1
if idx_tex>=0: mtex=matt[n].texture_slots.add() mtex.texture=tx[idx_tex] mtex.texture_coords="UV" for grp_idx in pair[1]: groups[grp_idx][5].data.materials.append(matt[n]) n=n+1
def create_materials(groups,materials,textures,orbiterpath,param_vector): ''' To create materials, some steps has to be done: 1. Create unique material+texture pairs with corresponding mesh groups 2. Create textures 3. Create materials,assign textures to them if needed, assign materials to mesh groups ''' #1. ==========counting material/texture combinations=========== print("-----------Creating materials-----------") matpairset=set() matpair=[] # [(mat,tex),[mgroups...]] Unique mat+tex and corresponding groups for n in range(len(groups)): l=(groups[n][1],groups[n][2]) #print(l) if l not in matpairset: matpairset.add(l) matpair.append([l,[]]) #fill unique mat+tex combination for n in range(len(groups)): l=(groups[n][1],groups[n][2]) for i in range(len(matpair)): if l==matpair[i][0]: matpair[i][1].append(n) #fill array of corresponding groups print("\nUnique pairs:",len(matpairset),"\n",matpairset) if VERBOSE_OUT: print(matpair) #2.==============create textures======================= tx=[] tex_load_fails=0 print ("lalala",orbiterpath) orbiter_path_ok=os.access(orbiterpath,os.F_OK) if not(orbiter_path_ok): print("Orbiter path is wrong! path=",orbiterpath) print("creating textures") for n in range(len(textures)): tx.append(bpy.data.textures.new(textures[n][1],"IMAGE")) if orbiter_path_ok: fpath=find_texture_path(orbiterpath,textures[n][0]) if fpath=="": tex_load_fails=tex_load_fails+1 continue #Trying to load data try: img=bpy.data.images.load(fpath) except: print("Can not load image, file is possibly corrupted : ",fpath) tex_load_fails=tex_load_fails+1 continue else: tex_load_fails=tex_load_fails+1 continue tx[n].image=img tx[n].use_alpha=True #3.=================Create materials===================== print("creating materials") n=0 matt=[] mat_index_out_of_range=False for pair in matpair: #create material object idx_mat=pair[0][0]-1 if (idx_mat)>len(materials)-1: #There are some .msh files with wrong mat indices mat_index_out_of_range=True print("WARNING! Material index out of range in GEOM(s):",pair[1],". Using the last material.") idx_mat=len(materials)-1 idx_tex=pair[0][1]-1 if VERBOSE_OUT: print("idx_mat=",idx_mat) print("mat_name=",materials[idx_mat][0]) print("diff=",materials[idx_mat][1][:3]) if len(textures)>0: print("tex=",textures[idx_tex][1],"idx=",idx_tex) matt.append(bpy.data.materials.new(materials[idx_mat][0])) #diffuse component matt[n].diffuse_color=materials[idx_mat][1][:3] matt[n].alpha=materials[idx_mat][1][3] if materials[idx_mat][1][3]<1.0: matt[n].use_transparency=True #specular component matt[n].specular_color=materials[idx_mat][3][:3] matt[n].specular_alpha=materials[idx_mat][3][3] raise_small_hardness=param_vector[2] default_hardeness=param_vector[3] if len(materials[idx_mat][3])==5: if raise_small_hardness and (materials[idx_mat][3][4]<default_hardeness): matt[n].specular_hardness=default_hardeness else: matt[n].specular_hardness=materials[idx_mat][3][4] #there aren't different ambient and emissive color component in blender #ambient is very often equal to diffuse, it's like amb=1.0 in blender #Emmissive component: import_emmissive=True; if import_emmissive: emm_c=materials[idx_mat][4][:3] matt[n].emit=(emm_c[0]+emm_c[1]+emm_c[2])/3 #Adding texture to material if idx_tex>=0: mtex=matt[n].texture_slots.add() mtex.texture=tx[idx_tex] mtex.texture_coords="UV" #mtex.map_colordiff = True #mtex.map_alpha = True #mtex.map_coloremission = True #mtex.map_density = True #mtex.mapping = 'FLAT' for grp_idx in pair[1]: groups[grp_idx][5].data.materials.append(matt[n]) n=n+1 print("=============Materials creation summary:=================") print("Created ",n," materials,") print("Loaded ",len(tx)-tex_load_fails," textures.") if not(orbiter_path_ok): print("WARNING! Orbiter path is wrong or not accessible, textures cannot be loaded!") print("Wrong path=",orbiterpath) if tex_load_fails>0: print("WARNING! ",tex_load_fails," of ",len(tx)," textures aren't loaded, possibly wrong file name(s)!") if mat_index_out_of_range: print("WARNNG! Material numbers of some GEOMs are out of range, see above!")
ec8905efedfda89511122eccacd10f493de9b5f3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10993/ec8905efedfda89511122eccacd10f493de9b5f3/io_orbiter_msh.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 20542, 87, 12, 4650, 16, 20542, 87, 16, 955, 1823, 16, 16640, 2165, 803, 16, 891, 67, 7737, 4672, 9163, 2974, 752, 31824, 16, 2690, 6075, 711, 358, 506, 2731, 30, 404, 18, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 20542, 87, 12, 4650, 16, 20542, 87, 16, 955, 1823, 16, 16640, 2165, 803, 16, 891, 67, 7737, 4672, 9163, 2974, 752, 31824, 16, 2690, 6075, 711, 358, 506, 2731, 30, 404, 18, 1...
if config["ui"]["roomlistcollapsed"]: self.hide_room_list1.set_active(1) else: self.vpaned3.pack2(self.roomlist.vbox2,True, True) self.hide_room_list1.set_active(0)
def __init__(self, config, use_trayicon): self.clip_data = "" self.log_queue = [] self.configfile = config self.transfermsgs = {} self.transfermsgspostedtime = 0 self.manualdisconnect = 0 self.away = 0 self.showdebug = 0 self.current_tab = 0 self.rescanning = 0 self.brescanning = 0 self.needrescan = 0 self.autoaway = False self.awaytimer = None self.SEXY = SEXY self.chatrooms = None self.tts = [] self.tts_playing = self.continue_playing = False
9fe705fd7ca958c230eed299b67aabd49da7d96b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8738/9fe705fd7ca958c230eed299b67aabd49da7d96b/frame.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 642, 16, 999, 67, 313, 528, 3950, 4672, 225, 365, 18, 14161, 67, 892, 273, 1408, 365, 18, 1330, 67, 4000, 273, 5378, 365, 18, 1425, 768, 273, 642, 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, 1001, 2738, 972, 12, 2890, 16, 642, 16, 999, 67, 313, 528, 3950, 4672, 225, 365, 18, 14161, 67, 892, 273, 1408, 365, 18, 1330, 67, 4000, 273, 5378, 365, 18, 1425, 768, 273, 642, 365,...
else:
if not ipList:
def textToIp(text): """ Return the IP of DNS found in a given text. """ ipList = list() # Search for plain IP plainIP = searchIP(text) for element in plainIP: ipList.append(element) else: # Try to get IP from possible DNS dnsList = textToDns(text) for element in dnsList: dns = dnsToIp(element) for e in dns: ipList.append(e) return ipList
71d74b1b552ee8d4f6c997b37ef9e89e8ce9c74f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12786/71d74b1b552ee8d4f6c997b37ef9e89e8ce9c74f/dns.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 977, 774, 5273, 12, 955, 4672, 3536, 2000, 326, 2971, 434, 8858, 1392, 316, 279, 864, 977, 18, 3536, 2359, 682, 273, 666, 1435, 468, 5167, 364, 7351, 2971, 7351, 2579, 273, 1623, 2579, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 977, 774, 5273, 12, 955, 4672, 3536, 2000, 326, 2971, 434, 8858, 1392, 316, 279, 864, 977, 18, 3536, 2359, 682, 273, 666, 1435, 468, 5167, 364, 7351, 2971, 7351, 2579, 273, 1623, 2579, ...
Please make the appropriate changes for your system and try again. Thank you for your patience. """
Please make the appropriate changes for your system and try again.""" % ( self.install_dir, os.environ.get('PYTHONPATH','') )
def no_default_version_msg(self): return """
7057a529d083522066a6d8706e669627ec11bcf9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8186/7057a529d083522066a6d8706e669627ec11bcf9/easy_install.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1158, 67, 1886, 67, 1589, 67, 3576, 12, 2890, 4672, 327, 3536, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1158, 67, 1886, 67, 1589, 67, 3576, 12, 2890, 4672, 327, 3536, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
''')%{ 'config_file': os.path.join(tracker_home, 'config.py'), 'database_config_file': os.path.join(tracker_home, 'dbinit.py')
""") % { 'database_config_file': os.path.join(tracker_home, 'schema.py'), 'database_init_file': os.path.join(tracker_home, 'initial_data.py'),
def do_install(self, tracker_home, args): ""'''Usage: install [template [backend [admin password]]] Install a new Roundup tracker.
640e7c498f550e19964fb6a7d43b73e704c0b5f6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/640e7c498f550e19964fb6a7d43b73e704c0b5f6/admin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 5425, 12, 2890, 16, 9745, 67, 8712, 16, 833, 4672, 1408, 26418, 5357, 30, 3799, 306, 3202, 306, 9993, 306, 3666, 2201, 13563, 65, 10284, 279, 394, 11370, 416, 9745, 18, 2, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 5425, 12, 2890, 16, 9745, 67, 8712, 16, 833, 4672, 1408, 26418, 5357, 30, 3799, 306, 3202, 306, 9993, 306, 3666, 2201, 13563, 65, 10284, 279, 394, 11370, 416, 9745, 18, 2, -10...
simuOpt.setOptions(quiet=True)
simuOpt.setOptions(quiet=True, gui=False)
def fitness(gen, sp): 'sim.CONSTANT positive selection pressure.' return [1, 1.01, 1.02]
37b50a098815a16f4117f51d3aca5ca48c276690 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/401/37b50a098815a16f4117f51d3aca5ca48c276690/userGuide.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 20351, 12, 4507, 16, 1694, 4672, 296, 9812, 18, 25878, 6895, 4421, 17590, 1093, 327, 306, 21, 16, 404, 18, 1611, 16, 404, 18, 3103, 65, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 20351, 12, 4507, 16, 1694, 4672, 296, 9812, 18, 25878, 6895, 4421, 17590, 1093, 327, 306, 21, 16, 404, 18, 1611, 16, 404, 18, 3103, 65, 225, 2, -100, -100, -100, -100, -100, -100, -100...
ldlibs = output['Value'][1].split('\n')
ldlibs = output['Value'][1].split( '\n' )
def fixLDPath( root, ldpath, directory): """ This is a utility to fix the LD_LIBRARY_PATH on Grid WNs. The shared libraries from the original LD_LIBRARY_PATH are linked to the locally specified directory. For Windows (and in general) this needs some refurbishment. """ if os.path.exists(directory): shutil.rmtree(directory) start = os.getcwd() os.mkdir(directory) os.chdir(directory) uniqueLD = uniquePath(ldpath) if DEBUG: print 'Unique LD LIBRARY PATH is:' print uniqueLD sys.stdout.flush() ldlist = string.split(uniqueLD,':') if DEBUG: print '' print 'LD List is:' print ldlist print '' sys.stdout.flush() for path in ldlist: if os.path.exists(path): if DEBUG: print 'Searching for shared libraries in:' print path print '-----------------------------------------------' res = shellCall(0,'ls '+path+'/*.so*') if res['OK']: print res['Value'] else: print res print '-----------------------------------------------' output = shellCall(0,'ls '+path+'/*.so*') #must be tidied for Windows (same below) if DEBUG: if not output['OK']: print '**************************' print 'Warning, problem with ls:' print output print '**************************' if not output['Value'][0]: ldlibs = output['Value'][1].split('\n') for lib in ldlibs: if os.path.exists(lib): filename = os.path.basename(lib) output = shellCall(0,'ln -s '+str(lib)+' '+str(filename)) #N.B. for Windows this should be a copy... if DEBUG: if not output['OK']: print '********************************' print 'Warning, problem creating link:' print 'File: ',filename print 'Path: ',lib print output print '********************************' if DEBUG: print 'Searching for rootmap file in:' print path print '-----------------------------------------------' res = shellCall(0,'ls '+path+'/*rootmap*') if res['OK']: print res['Value'] else: print res print '-----------------------------------------------' output = shellCall(0,'ls '+path+'/*rootmap*') if DEBUG: if not output['OK']: print '**************************' print 'Warning, problem with rootmap:' print output print '**************************' if not output['Value'][0]: ldlibs = output['Value'][1].split('\n') for lib in ldlibs: if os.path.exists(lib): if re.search('RELAX',lib) is not None: filename = os.path.basename(lib) output = shellCall(0,'ln -s '+str(lib)+' '+str(filename)) if DEBUG: if not output['OK']: print '********************************' print 'Warning, problem creating link:' print 'File: ',filename print 'Path: ',lib print output print '********************************' os.chdir(start) sys.stdout.flush()
9b8eea7ba28a2770fdfbf806c3e35df73cf645a1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/9b8eea7ba28a2770fdfbf806c3e35df73cf645a1/dirac-fix-ld-library-path.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2917, 12069, 743, 12, 1365, 16, 16916, 803, 16, 1867, 4672, 3536, 1220, 353, 279, 12788, 358, 2917, 326, 28083, 67, 2053, 28254, 67, 4211, 603, 7145, 678, 10386, 18, 1021, 5116, 14732, 6...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2917, 12069, 743, 12, 1365, 16, 16916, 803, 16, 1867, 4672, 3536, 1220, 353, 279, 12788, 358, 2917, 326, 28083, 67, 2053, 28254, 67, 4211, 603, 7145, 678, 10386, 18, 1021, 5116, 14732, 6...
sage: C = HammingCode(2,GF(3)); C Linear code of length 4, dimension 2 over Finite Field of size 3 sage: V = VectorSpace(GF(3), 4) sage: v = V([0, 2, 0, 1]) sage: syndrome(C, v) [(2, 0, 0, 0), (0, 2, 0, 1), (0, 0, 2, 2), (0, 1, 1, 0), (1, 2, 2, 0), (1, 0, 1, 1), (1, 1, 0, 2), (2, 2, 1, 2), (2, 1, 2, 1)]
sage: C = HammingCode(2,GF(3)); C Linear code of length 4, dimension 2 over Finite Field of size 3 sage: V = VectorSpace(GF(3), 4) sage: v = V([0, 2, 0, 1]) sage: from sage.coding.decoder import syndrome sage: syndrome(C, v) [(2, 0, 0, 0), (0, 2, 0, 1), (0, 0, 2, 2), (0, 1, 1, 0), (1, 2, 2, 0), (1, 0, 1, 1), (1, 1, 0, 2), (2, 2, 1, 2), (2, 1, 2, 1)]
def syndrome(C, v): """ The vector v represents a received word, so should be in the same ambient space V as C. Returns the elements in V (including v) which belong to the syndrome of v (ie, the coset v+C, sorted by weight). EXAMPLES: sage: C = HammingCode(2,GF(3)); C Linear code of length 4, dimension 2 over Finite Field of size 3 sage: V = VectorSpace(GF(3), 4) sage: v = V([0, 2, 0, 1]) sage: syndrome(C, v) [(2, 0, 0, 0), (0, 2, 0, 1), (0, 0, 2, 2), (0, 1, 1, 0), (1, 2, 2, 0), (1, 0, 1, 1), (1, 1, 0, 2), (2, 2, 1, 2), (2, 1, 2, 1)] """ V = C.ambient_space() if not(type(v)==list): v = v.list() v = V(v) coset = [[c+v,hamming_weight(c+v)] for c in C] coset.sort(lambda x,y: x[1]-y[1]) return [x[0] for x in coset]
59d4832a79d90fe16d8951de121fdd6ce8b458bc /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/59d4832a79d90fe16d8951de121fdd6ce8b458bc/decoder.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6194, 72, 10896, 12, 39, 16, 331, 4672, 3536, 1021, 3806, 331, 8686, 279, 5079, 2076, 16, 1427, 1410, 506, 316, 326, 1967, 13232, 1979, 3476, 776, 487, 385, 18, 2860, 326, 2186, 316, 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, 6194, 72, 10896, 12, 39, 16, 331, 4672, 3536, 1021, 3806, 331, 8686, 279, 5079, 2076, 16, 1427, 1410, 506, 316, 326, 1967, 13232, 1979, 3476, 776, 487, 385, 18, 2860, 326, 2186, 316, 7...
utils.system('patch -p0 < ../fix_netperf_build.patch')
def setup(self, tarball = 'netperf-2.4.4.tar.gz'): self.job.require_gcc() tarball = utils.unmap_url(self.bindir, tarball, self.tmpdir) utils.extract_tarball_to_dir(tarball, self.srcdir) os.chdir(self.srcdir)
ba4baf855e4339c798f1ef545ca2ef3e7907309b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10349/ba4baf855e4339c798f1ef545ca2ef3e7907309b/netperf2.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 12, 2890, 16, 29441, 273, 296, 2758, 19825, 17, 22, 18, 24, 18, 24, 18, 11718, 18, 9764, 11, 4672, 365, 18, 4688, 18, 6528, 67, 75, 952, 1435, 29441, 273, 2990, 18, 318, 1458, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 12, 2890, 16, 29441, 273, 296, 2758, 19825, 17, 22, 18, 24, 18, 24, 18, 11718, 18, 9764, 11, 4672, 365, 18, 4688, 18, 6528, 67, 75, 952, 1435, 29441, 273, 2990, 18, 318, 1458, ...
Profiling data is written into CFG_TMPDIR/invenio-profile-stats-datetime.raw, and
Profiling data is written into CFG_TMPDIR/invenio-profile-stats-datetime.raw, and
def _profiler(req): """ This handler wrap the default handler with a profiler. Profiling data is written into CFG_TMPDIR/invenio-profile-stats-datetime.raw, and is displayed at the bottom of the webpage. To use add profile=1 to your url. To change sorting algorithm you can provide profile=algorithm_name. You can add more than one profile requirement like ?profile=time&profile=cumulative. The list of available algorithm is displayed at the end of the profile. """ args = {} if req.args: args = cgi.parse_qs(req.args) if 'profile' in args: if not isUserSuperAdmin(collect_user_info(req)): return _handler(req)
00bdd4e15cae5bba82b87f2de4cd2c3f177919b7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12027/00bdd4e15cae5bba82b87f2de4cd2c3f177919b7/webinterface_handler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 23097, 12, 3658, 4672, 3536, 1220, 1838, 2193, 326, 805, 1838, 598, 279, 16583, 18, 1186, 74, 4973, 501, 353, 5941, 1368, 7577, 67, 28259, 4537, 19, 267, 3995, 1594, 17, 5040, 17, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 23097, 12, 3658, 4672, 3536, 1220, 1838, 2193, 326, 805, 1838, 598, 279, 16583, 18, 1186, 74, 4973, 501, 353, 5941, 1368, 7577, 67, 28259, 4537, 19, 267, 3995, 1594, 17, 5040, 17, ...
print "!!!!!!", self.names
def __init__(self, **options): Filter.__init__(self, **options) self.names = set(get_list_opt(options, 'names', [])) print "!!!!!!", self.names tokentype = options.get('tokentype') if tokentype: self.tokentype = string_to_tokentype(tokentype) else: self.tokentype = Name.Function
af020e969dfdbb6833887e0a088e245e5032f26a /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6148/af020e969dfdbb6833887e0a088e245e5032f26a/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2826, 2116, 4672, 4008, 16186, 2738, 972, 12, 2890, 16, 2826, 2116, 13, 365, 18, 1973, 273, 444, 12, 588, 67, 1098, 67, 3838, 12, 2116, 16, 296, 1973, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2826, 2116, 4672, 4008, 16186, 2738, 972, 12, 2890, 16, 2826, 2116, 13, 365, 18, 1973, 273, 444, 12, 588, 67, 1098, 67, 3838, 12, 2116, 16, 296, 1973, ...
t[0] = ['OPERATOR', '[]']
t[0] = ['OPERATOR', '[]']
def p_operator_bracket(t): 'operator : OPERATOR LBRACKET RBRACKET' t[0] = ['OPERATOR', '[]']
367505153c68ae57f68ccea93c03c7cb467e504a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13661/367505153c68ae57f68ccea93c03c7cb467e504a/blt.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 293, 67, 9497, 67, 21025, 12, 88, 4672, 296, 9497, 294, 25500, 511, 21217, 534, 21217, 11, 268, 63, 20, 65, 273, 10228, 26110, 2187, 5271, 65, 3546, 282, 2, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 293, 67, 9497, 67, 21025, 12, 88, 4672, 296, 9497, 294, 25500, 511, 21217, 534, 21217, 11, 268, 63, 20, 65, 273, 10228, 26110, 2187, 5271, 65, 3546, 282, 2, -100, -100, -100, -100, -10...
entries = [(relpath(pathjoin(path, k.name)),k) for k in keys]
return ((relpath(pathjoin(path, nm)),k) for (nm,k) in keys)
def _filter_keys(self,path,keys,wildcard,full,absolute,dirs_only,files_only): """Filter out keys not matching the given criteria.
08fcb5eb9943873d0265d2d6261d936a7e404984 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5578/08fcb5eb9943873d0265d2d6261d936a7e404984/s3fs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2188, 67, 2452, 12, 2890, 16, 803, 16, 2452, 16, 22887, 16, 2854, 16, 12547, 16, 8291, 67, 3700, 16, 2354, 67, 3700, 4672, 3536, 1586, 596, 1311, 486, 3607, 326, 864, 3582, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2188, 67, 2452, 12, 2890, 16, 803, 16, 2452, 16, 22887, 16, 2854, 16, 12547, 16, 8291, 67, 3700, 16, 2354, 67, 3700, 4672, 3536, 1586, 596, 1311, 486, 3607, 326, 864, 3582, 18, ...
pop, dad = 0, mom = 1, off = 2)
pop, pop, dad = 0, mom = 1, off = 2)
def testRecombinatorAsGenoTransmitter(self): 'Testing operator Recombinator as a genotype transmitter.' pop = self.getPop(size=100, loci=[20]*5) applyDuringMatingOperator(Recombinator(rates=0), pop, dad = 0, mom = 1, off = 2) for ch in range(5): # check if 1 is copied to 2. g1 = pop.individual(2).genotype(0, ch) g2 = pop.individual(2).genotype(1, ch) p1 = [pop.individual(1).genotype(p, ch) for p in range(2)] p2 = [pop.individual(0).genotype(p, ch) for p in range(2)] self.assertEqual(g1 in p1, True) self.assertEqual(g2 in p2, True) # # customized chromosomes are NOT copied pop = self.getPop(size=100, loci=[20]*7, chromTypes=[AUTOSOME]*5 + [CUSTOMIZED]*2) applyDuringMatingOperator(Recombinator(rates=0), pop, dad = 0, mom = 1, off = 2) for ch in range(7): # check if 1 is copied to 2. g1 = pop.individual(2).genotype(0, ch) g2 = pop.individual(2).genotype(1, ch) p1 = [pop.individual(1).genotype(p, ch) for p in range(2)] p2 = [pop.individual(0).genotype(p, ch) for p in range(2)] if ch < 5: self.assertEqual(g1 in p1, True) self.assertEqual(g2 in p2, True) else: self.assertNotEqual(g1 in p1, True) self.assertNotEqual(g2 in p2, True) # MALE... pop = self.getPop(size=100, loci=[20]*9, chromTypes=[AUTOSOME]*5 + [CHROMOSOME_X, CHROMOSOME_Y] + [CUSTOMIZED]*2) pop.individual(2).setSex(MALE) applyDuringMatingOperator(Recombinator(rates=0), pop, dad = 0, mom = 1, off = 2) for ch in range(9): # check if 1 is copied to 2. g1 = pop.individual(2).genotype(0, ch) g2 = pop.individual(2).genotype(1, ch) p1 = [pop.individual(1).genotype(p, ch) for p in range(2)] p2 = [pop.individual(0).genotype(p, ch) for p in range(2)] if ch < 5: self.assertEqual(g1 in p1, True) self.assertEqual(g2 in p2, True) elif ch == 5: # get chrom X from mother self.assertEqual(g1 in p1, True) elif ch == 6: # get chrom Y from father self.assertEqual(g2, pop.individual(0).genotype(1, ch)) else: self.assertNotEqual(g1 in p1, True) self.assertNotEqual(g2 in p2, True) # FEMALE ... pop = self.getPop(size=100, loci=[20]*9, chromTypes=[AUTOSOME]*5 + [CHROMOSOME_X, CHROMOSOME_Y] + [CUSTOMIZED]*2) pop.individual(2).setSex(FEMALE) applyDuringMatingOperator(Recombinator(rates=0), pop, dad = 0, mom = 1, off = 2) for ch in range(9): # check if 1 is copied to 2. g1 = pop.individual(2).genotype(0, ch) g2 = pop.individual(2).genotype(1, ch) p1 = [pop.individual(1).genotype(p, ch) for p in range(2)] p2 = [pop.individual(0).genotype(p, ch) for p in range(2)] if ch < 5: self.assertEqual(g1 in p1, True) self.assertEqual(g2 in p2, True) elif ch == 5: # get chrom X from mother self.assertEqual(g1 in p1, True) # get chrom X from father self.assertEqual(g2, pop.individual(0).genotype(0, ch)) elif ch == 6: # unused. self.assertEqual(g1 in p1, False) self.assertEqual(g2 in p2, False) else: self.assertNotEqual(g1 in p1, True) self.assertNotEqual(g2 in p2, True) # # # With non-zero recombination rate # pop = self.getPop(size=100, loci=[20]*5) applyDuringMatingOperator(Recombinator(rates=0.1), pop, dad = 0, mom = 1, off = 2) for index in range(pop.chromEnd(4)): ch,loc = pop.chromLocusPair(index) # check if 1 is copied to 2. g1 = pop.individual(2).allele(loc, 0, ch) g2 = pop.individual(2).allele(loc, 1, ch) p1 = [pop.individual(1).allele(loc, p, ch) for p in range(2)] p2 = [pop.individual(0).allele(loc, p, ch) for p in range(2)] self.assertEqual(g1 in p1, True) self.assertEqual(g2 in p2, True) # # customized chromosomes are NOT copied pop = self.getPop(size=100, loci=[20]*7, chromTypes=[AUTOSOME]*5 + [CUSTOMIZED]*2) applyDuringMatingOperator(Recombinator(rates=0.1), pop, dad = 0, mom = 1, off = 2) for index in range(pop.chromEnd(6)): # check if 1 is copied to 2. ch,loc = pop.chromLocusPair(index) g1 = pop.individual(2).allele(loc, 0, ch) g2 = pop.individual(2).allele(loc, 1, ch) p1 = [pop.individual(1).allele(loc, p, ch) for p in range(2)] p2 = [pop.individual(0).allele(loc, p, ch) for p in range(2)] if ch < 5: self.assertEqual(g1 in p1, True) self.assertEqual(g2 in p2, True) #else: # self.assertNotEqual(g1 in p1, True) # self.assertNotEqual(g2 in p2, True) # MALE... pop = self.getPop(size=100, loci=[20]*9, chromTypes=[AUTOSOME]*5 + [CHROMOSOME_X, CHROMOSOME_Y] + [CUSTOMIZED]*2) pop.individual(2).setSex(MALE) applyDuringMatingOperator(Recombinator(rates=0.1), pop, dad = 0, mom = 1, off = 2) for index in range(pop.chromEnd(8)): # check if 1 is copied to 2. ch,loc = pop.chromLocusPair(index) g1 = pop.individual(2).allele(loc, 0, ch) g2 = pop.individual(2).allele(loc, 1, ch) p1 = [pop.individual(1).allele(loc, p, ch) for p in range(2)] p2 = [pop.individual(0).allele(loc, p, ch) for p in range(2)] if ch < 5: self.assertEqual(g1 in p1, True) self.assertEqual(g2 in p2, True) elif ch == 5: # get chrom X from mother self.assertEqual(g1 in p1, True) elif ch == 6: # get chrom Y from father self.assertEqual(g2, pop.individual(0).allele(loc, 1, ch)) #else: #self.assertNotEqual(g1 in p1, True) #self.assertNotEqual(g2 in p2, True) # FEMALE ... pop = self.getPop(size=100, loci=[20]*9, chromTypes=[AUTOSOME]*5 + [CHROMOSOME_X, CHROMOSOME_Y] + [CUSTOMIZED]*2) pop.individual(2).setSex(FEMALE) applyDuringMatingOperator(Recombinator(rates=0.1), pop, dad = 0, mom = 1, off = 2) for index in range(pop.chromEnd(8)): # check if 1 is copied to 2. ch,loc = pop.chromLocusPair(index) g1 = pop.individual(2).allele(loc, 0, ch) g2 = pop.individual(2).allele(loc, 1, ch) p1 = [pop.individual(1).allele(loc, p, ch) for p in range(2)] p2 = [pop.individual(0).allele(loc, p, ch) for p in range(2)] if ch < 5: self.assertEqual(g1 in p1, True) self.assertEqual(g2 in p2, True) elif ch == 5: # get chrom X from mother self.assertEqual(g1 in p1, True) # get chrom X from father self.assertEqual(g2, pop.individual(0).allele(loc, 0, ch)) #elif ch == 6: #self.assertEqual(g1 in p1, False) #self.assertEqual(g2 in p2, False) #else: #self.assertNotEqual(g1 in p1, True) #self.assertNotEqual(g2 in p2, True)
413376e42263886141c9a591f1c5ee892c441cab /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/401/413376e42263886141c9a591f1c5ee892c441cab/test_14_transmitter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 426, 9301, 4240, 1463, 43, 5764, 1429, 1938, 387, 12, 2890, 4672, 296, 22218, 3726, 868, 9301, 4240, 487, 279, 22306, 23323, 387, 1093, 1843, 273, 365, 18, 588, 7049, 12, 1467, 33,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 426, 9301, 4240, 1463, 43, 5764, 1429, 1938, 387, 12, 2890, 4672, 296, 22218, 3726, 868, 9301, 4240, 487, 279, 22306, 23323, 387, 1093, 1843, 273, 365, 18, 588, 7049, 12, 1467, 33,...
try: return self._assoc[vertex] except:
if hasattr(self, '_assoc') is False:
def get_vertex(self, vertex): """ Retrieve the object associated with a given vertex. INPUT: vertex -- the given vertex EXAMPLES: sage: d = {0 : graphs.DodecahedralGraph(), 1 : graphs.FlowerSnark(), 2 : graphs.MoebiusKantorGraph(), 3 : graphs.PetersenGraph() } sage: d[2] Moebius-Kantor Graph: Graph on 16 vertices sage: T = graphs.TetrahedralGraph() sage: T.vertices() [0, 1, 2, 3] sage: T.set_vertices(d) sage: T.get_vertex(1) Flower Snark: Graph on 20 vertices
a17cf97d13353046a414697c0d5320af24770a31 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/a17cf97d13353046a414697c0d5320af24770a31/graph.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 15281, 12, 2890, 16, 5253, 4672, 3536, 10708, 326, 733, 3627, 598, 279, 864, 5253, 18, 225, 12943, 30, 5253, 1493, 326, 864, 5253, 225, 5675, 8900, 11386, 30, 272, 410, 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, 336, 67, 15281, 12, 2890, 16, 5253, 4672, 3536, 10708, 326, 733, 3627, 598, 279, 864, 5253, 18, 225, 12943, 30, 5253, 1493, 326, 864, 5253, 225, 5675, 8900, 11386, 30, 272, 410, 30, 30...
share_url = "http://miroguide.com/share-item/?%s" % query_string
share_url = "http://miroguide.com/share/item/?%s" % query_string
def share_item(self, item): share_items = {"weburl": item.permalink, "mediaurl": item.file_url, "name": item.name} query_string = "&".join(["%s=%s" % (key, urllib.quote(val)) for key, val in share_items.items()]) share_url = "http://miroguide.com/share-item/?%s" % query_string self.open_url(share_url)
cf7a5c35ff3558ed969c4690143ce74c05d5a667 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12354/cf7a5c35ff3558ed969c4690143ce74c05d5a667/application.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7433, 67, 1726, 12, 2890, 16, 761, 4672, 7433, 67, 3319, 273, 12528, 4875, 718, 6877, 761, 18, 30898, 16, 315, 5829, 718, 6877, 761, 18, 768, 67, 718, 16, 315, 529, 6877, 761, 18, 52...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7433, 67, 1726, 12, 2890, 16, 761, 4672, 7433, 67, 3319, 273, 12528, 4875, 718, 6877, 761, 18, 30898, 16, 315, 5829, 718, 6877, 761, 18, 768, 67, 718, 16, 315, 529, 6877, 761, 18, 52...
def __get_rbuf_len(self):
def _get_rbuf_len(self):
def __get_rbuf_len(self): buf_len = 0 for i in [len(x) for x in self._rbuf]: buf_len += i return buf_len
27d975d627ac3873241741299112e1d228e86e3f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/27d975d627ac3873241741299112e1d228e86e3f/socket.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 86, 4385, 67, 1897, 12, 2890, 4672, 1681, 67, 1897, 273, 374, 364, 277, 316, 306, 1897, 12, 92, 13, 364, 619, 316, 365, 6315, 86, 4385, 14542, 1681, 67, 1897, 1011, 277...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 86, 4385, 67, 1897, 12, 2890, 4672, 1681, 67, 1897, 273, 374, 364, 277, 316, 306, 1897, 12, 92, 13, 364, 619, 316, 365, 6315, 86, 4385, 14542, 1681, 67, 1897, 1011, 277...
('cmp', [Mpfr, Mpfr], Ternary), ('cmp_ui', [Mpfr, UnsignedLong], Ternary), ('cmp_si', [Mpfr, Long], Ternary), ('cmp_d', [Mpfr, ctypes.c_double], Ternary), ('cmp_ui_2exp', [Mpfr, UnsignedLong, Exponent], Ternary), ('cmp_si_2exp', [Mpfr, Long, Exponent], Ternary), ('cmpabs', [Mpfr, Mpfr], Ternary),
('cmp', [IMpfr, IMpfr], Ternary), ('cmp_ui', [IMpfr, UnsignedLong], Ternary), ('cmp_si', [IMpfr, Long], Ternary), ('cmp_d', [IMpfr, ctypes.c_double], Ternary), ('cmp_ui_2exp', [IMpfr, UnsignedLong, Exponent], Ternary), ('cmp_si_2exp', [IMpfr, Long, Exponent], Ternary), ('cmpabs', [IMpfr, IMpfr], Ternary),
def error_on_failure(result, func, args): if result: raise ValueError("call failed") return result
b450c0023d8375a0580fdd1ed0db290a5d5cd85a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7048/b450c0023d8375a0580fdd1ed0db290a5d5cd85a/pympfr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 555, 67, 265, 67, 12251, 12, 2088, 16, 1326, 16, 833, 4672, 309, 563, 30, 1002, 2068, 2932, 1991, 2535, 7923, 327, 563, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 555, 67, 265, 67, 12251, 12, 2088, 16, 1326, 16, 833, 4672, 309, 563, 30, 1002, 2068, 2932, 1991, 2535, 7923, 327, 563, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
data_aligns = "c", stubs_align = "l",
data_aligns = 'c', stubs_align = 'l',
def format(self, width, output_format='txt', **fmt_dict): """Return string. This is the default formatter for cells. Override this to get different formating. A cell formatter must accept as arguments a cell (self) and an output format, one of ('html', 'txt', 'csv', 'latex'). It will generally respond to the datatype, one of (int, 'header', 'stub'). """ fmt = self._get_fmt(output_format, **fmt_dict)
efae2e5f0d449e2a63dec32a4b19f53ab9f9e3f8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12658/efae2e5f0d449e2a63dec32a4b19f53ab9f9e3f8/table.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 740, 12, 2890, 16, 1835, 16, 876, 67, 2139, 2218, 5830, 2187, 2826, 8666, 67, 1576, 4672, 3536, 990, 533, 18, 1220, 353, 326, 805, 4453, 364, 5983, 18, 1439, 333, 358, 336, 3775, 740, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 740, 12, 2890, 16, 1835, 16, 876, 67, 2139, 2218, 5830, 2187, 2826, 8666, 67, 1576, 4672, 3536, 990, 533, 18, 1220, 353, 326, 805, 4453, 364, 5983, 18, 1439, 333, 358, 336, 3775, 740, ...
"""
If you pass a vector, it is assumed to be the coordinate vector of a point:: sage: P = Polyhedron(vertices=[[1,1],[1,-1],[-1,1],[-1,-1]]) sage: p = vector(ZZ, [1,0] ) sage: [ ieq.interior_contains(p) for ieq in P.inequality_generator() ] [True, True, True, False] """ try: if Vobj.is_vector(): return self.polyhedron()._is_positive( self.eval(Vobj) ) except AttributeError: pass
def interior_contains(self, Vobj): """ Tests whether the interior of the halfspace (excluding its boundary) defined by the inequality contains the given vertex/ray/line.
58a962fefc201dcfd3e2e47df0f7b0e2cedced92 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9417/58a962fefc201dcfd3e2e47df0f7b0e2cedced92/polyhedra.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 26230, 67, 12298, 12, 2890, 16, 776, 2603, 4672, 225, 971, 1846, 1342, 279, 3806, 16, 518, 353, 12034, 358, 506, 326, 7799, 3806, 434, 279, 1634, 2866, 225, 272, 410, 30, 453, 273, 183...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 26230, 67, 12298, 12, 2890, 16, 776, 2603, 4672, 225, 971, 1846, 1342, 279, 3806, 16, 518, 353, 12034, 358, 506, 326, 7799, 3806, 434, 279, 1634, 2866, 225, 272, 410, 30, 453, 273, 183...
a, b = n1.split('/'), n2.split('/')
a, b = n1.split(os.sep), n2.split('/')
def pathto(n1, n2): '''return the relative path from one place to another. this returns a path in the form used by the local filesystem, not hg.''' if not n1: return localpath(n2) a, b = n1.split('/'), n2.split('/') a.reverse() b.reverse() while a and b and a[-1] == b[-1]: a.pop() b.pop() b.reverse() return os.sep.join((['..'] * len(a)) + b)
d62fdd8f429f76d573cb36f883cf3d1b09d7c4f1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11312/d62fdd8f429f76d573cb36f883cf3d1b09d7c4f1/util.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 589, 869, 12, 82, 21, 16, 290, 22, 4672, 9163, 2463, 326, 3632, 589, 628, 1245, 3166, 358, 4042, 18, 333, 1135, 279, 589, 316, 326, 646, 1399, 635, 326, 1191, 6496, 16, 486, 22576, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 589, 869, 12, 82, 21, 16, 290, 22, 4672, 9163, 2463, 326, 3632, 589, 628, 1245, 3166, 358, 4042, 18, 333, 1135, 279, 589, 316, 326, 646, 1399, 635, 326, 1191, 6496, 16, 486, 22576, 1...
self._kill_remaining_orphan_processes(orphans)
self._check_for_remaining_orphan_processes(orphans)
def _recover_all_recoverable_entries(self): orphans = _drone_manager.get_orphaned_autoserv_processes() self._recover_running_entries(orphans) self._recover_gathering_entries(orphans) self._recover_parsing_entries(orphans) self._recover_special_tasks(orphans) self._kill_remaining_orphan_processes(orphans)
2c10535ad0da5499a30b6e40c4ff27f3faa12c12 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12268/2c10535ad0da5499a30b6e40c4ff27f3faa12c12/monitor_db.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 266, 3165, 67, 454, 67, 25864, 67, 8219, 12, 2890, 4672, 578, 31574, 273, 389, 3069, 476, 67, 4181, 18, 588, 67, 7657, 304, 329, 67, 5854, 13164, 90, 67, 18675, 1435, 365, 6315, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 266, 3165, 67, 454, 67, 25864, 67, 8219, 12, 2890, 4672, 578, 31574, 273, 389, 3069, 476, 67, 4181, 18, 588, 67, 7657, 304, 329, 67, 5854, 13164, 90, 67, 18675, 1435, 365, 6315, ...
assert ('<input type="hidden" name="singleRef" id="singleRef" /> ') \
assert ('<input type="hidden" name="singleRef" id="ref_browser_singleRef" /> ') \
def test_basewidget(self): response = self.publish('%s/base_edit' % self.demo1_url, self.basic_auth) body = normalize(response.getBody()) assert ('<script type="text/javascript" charset="iso-8859-1" ' 'src="http://nohost/plone/referencebrowser.js"> ' '</script>') in body
ac866dcf3cbe81f819c782778edb264b547cd56c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12240/ac866dcf3cbe81f819c782778edb264b547cd56c/test_product.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 1969, 6587, 12, 2890, 4672, 766, 273, 365, 18, 6543, 29909, 87, 19, 1969, 67, 4619, 11, 738, 365, 18, 27928, 21, 67, 718, 16, 365, 18, 13240, 67, 1944, 13, 1417, 273, 3883,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1969, 6587, 12, 2890, 4672, 766, 273, 365, 18, 6543, 29909, 87, 19, 1969, 67, 4619, 11, 738, 365, 18, 27928, 21, 67, 718, 16, 365, 18, 13240, 67, 1944, 13, 1417, 273, 3883,...
if ac.is_allowed_to_remove(user, object):
if ac.is_allowed_to_remove(user, handler):
def remove(self, context): ids = context.get_form_values('ids') if not ids: return context.come_back(u'No objects selected.')
33045047969584a2278b8e03c0d1f873036adabc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12681/33045047969584a2278b8e03c0d1f873036adabc/Folder.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1206, 12, 2890, 16, 819, 4672, 3258, 273, 819, 18, 588, 67, 687, 67, 2372, 2668, 2232, 6134, 309, 486, 3258, 30, 327, 819, 18, 5624, 67, 823, 12, 89, 11, 2279, 2184, 3170, 1093, 13, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1206, 12, 2890, 16, 819, 4672, 3258, 273, 819, 18, 588, 67, 687, 67, 2372, 2668, 2232, 6134, 309, 486, 3258, 30, 327, 819, 18, 5624, 67, 823, 12, 89, 11, 2279, 2184, 3170, 1093, 13, ...
hints[l[0]].extend([(p, (v, h, days)) for h, p, v in tmp]
hints[l[0]].extend([(p, (v, h, days)) for h, p, v in tmp])
def read_hints(self, basedir): """Read the hint commands from the specified directory The hint commands are read from the files contained by the `Hints' directory within the directory specified as `basedir' parameter. The name of the files has to be the same of the authorized users for the hints. The file contains rows with the format:
4987a3c0562fab014a1cc61ae6eb45a0179d470f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2784/4987a3c0562fab014a1cc61ae6eb45a0179d470f/britney.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 67, 24598, 12, 2890, 16, 15573, 4672, 3536, 1994, 326, 7380, 4364, 628, 326, 1269, 1867, 225, 1021, 7380, 4364, 854, 855, 628, 326, 1390, 7542, 635, 326, 1375, 13368, 11, 1867, 3470...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 24598, 12, 2890, 16, 15573, 4672, 3536, 1994, 326, 7380, 4364, 628, 326, 1269, 1867, 225, 1021, 7380, 4364, 854, 855, 628, 326, 1390, 7542, 635, 326, 1375, 13368, 11, 1867, 3470...
self.logger.addHandler(logging.StreamHandler())
addHandler()
def _init(self, **kwds):
9eeb5323dbd3d24f6f70013dccdf64c3df3dd2fe /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/9eeb5323dbd3d24f6f70013dccdf64c3df3dd2fe/Repository.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2738, 12, 2890, 16, 2826, 25577, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2738, 12, 2890, 16, 2826, 25577, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
Result: An integer value representing the new case_id or a dictionary containing values for the keys, "faultcode" and "faultstring".
Result: An integer value representing the new case_id
def testcase_create(self, summary, plan_id, author_id, isautomated, category_id, case_status_id, alias=None, arguments=None, default_tester_id=None, priority_id=None, requirement=None, script=None, sortkey=None, estimated_time=None): """Create A New TestCase.
83012e559756373ef19add9ed3d26f1bf779a22c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/231/83012e559756373ef19add9ed3d26f1bf779a22c/testopia.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 3593, 67, 2640, 12, 2890, 16, 4916, 16, 4995, 67, 350, 16, 2869, 67, 350, 16, 353, 5854, 362, 690, 16, 3150, 67, 350, 16, 648, 67, 2327, 67, 350, 16, 2308, 33, 7036, 16, 1775...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3593, 67, 2640, 12, 2890, 16, 4916, 16, 4995, 67, 350, 16, 2869, 67, 350, 16, 353, 5854, 362, 690, 16, 3150, 67, 350, 16, 648, 67, 2327, 67, 350, 16, 2308, 33, 7036, 16, 1775...
@staticmethod
def from_token_and_callback(token, callback=None, http_method=HTTP_METHOD, http_url=None, parameters=None): if not parameters: parameters = {}
6693d442ced806c6c8cda35b96d4347a543dcae0 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1598/6693d442ced806c6c8cda35b96d4347a543dcae0/oauth.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 628, 67, 2316, 67, 464, 67, 3394, 12, 2316, 16, 1348, 33, 7036, 16, 1062, 67, 2039, 33, 3693, 67, 5327, 16, 1062, 67, 718, 33, 7036, 16, 1472, 33, 7036, 4672, 309, 486, 1472, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 628, 67, 2316, 67, 464, 67, 3394, 12, 2316, 16, 1348, 33, 7036, 16, 1062, 67, 2039, 33, 3693, 67, 5327, 16, 1062, 67, 718, 33, 7036, 16, 1472, 33, 7036, 4672, 309, 486, 1472, 30, 1...
elif code:
else:
def __init__(self, code, message): if code == -1: if message == "OK": self._code = 0 else: self._code = 1 elif code: self._code = code if message: self._message = message
afa5b9e606e09a707c71dbf4e8fb865d25aa5dd9 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/637/afa5b9e606e09a707c71dbf4e8fb865d25aa5dd9/Gratia.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 981, 16, 883, 4672, 309, 981, 422, 300, 21, 30, 309, 883, 422, 315, 3141, 6877, 365, 6315, 710, 273, 374, 469, 30, 365, 6315, 710, 273, 404, 469, 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, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 981, 16, 883, 4672, 309, 981, 422, 300, 21, 30, 309, 883, 422, 315, 3141, 6877, 365, 6315, 710, 273, 374, 469, 30, 365, 6315, 710, 273, 404, 469, 30, ...
'balance_fy': balance_allfy[account_id], 'balanceinit_fy': round(balance_allfy[account_id]-debit_allfy_nos[account_id]+credit_allfy_nos[account_id], int(config['price_accuracy'])),
'balance_fy': balance_allfy_nos[account_id], 'balanceinit_fy': round(balance_allfy_nos[account_id]-debit_allfy_nos[account_id]+credit_allfy_nos[account_id], int(config['price_accuracy'])),
# def cmp_code(x, y):
cd6bad26b43428cf1ed3e8c02c4f5c2db7f08034 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7339/cd6bad26b43428cf1ed3e8c02c4f5c2db7f08034/account_balance.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 468, 5411, 1652, 9411, 67, 710, 12, 92, 16, 677, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 468, 5411, 1652, 9411, 67, 710, 12, 92, 16, 677, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
self.__ftpd = ftpserver.FTPServer(address, ftp_handler)
ftpd = ftpserver.FTPServer(address, ftp_handler) import inspect, asyncore if 'count' in inspect.getargspec(asyncore.loop)[0]: fun = ftpd.serve_forever kwargs = {"timeout":0.1, "count":1} else: fun = asyncore.poll kwargs = {"timeout":0.1}
def run(self): assert not self.active ftpserver.log = ftpserver.logline = ftpserver.debug = lambda x: x authorizer = ftpserver.DummyAuthorizer() authorizer.add_user(user, pwd, home, perm='elradfmw') # full perms authorizer.add_anonymous(home) ftp_handler = ftpserver.FTPHandler ftp_handler.authorizer = authorizer address = (host, port) self.__ftpd = ftpserver.FTPServer(address, ftp_handler) if self.flag: self.flag.set() self.active = True self.__ftpd.serve_forever()
6712ed5a4f425e3f4669062b94e83d789cb5c2a5 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7236/6712ed5a4f425e3f4669062b94e83d789cb5c2a5/test_ftpd.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 1815, 486, 365, 18, 3535, 13487, 3567, 18, 1330, 273, 13487, 3567, 18, 1330, 1369, 273, 13487, 3567, 18, 4148, 273, 3195, 619, 30, 619, 16761, 273, 13487, 3567, 18,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 1815, 486, 365, 18, 3535, 13487, 3567, 18, 1330, 273, 13487, 3567, 18, 1330, 1369, 273, 13487, 3567, 18, 4148, 273, 3195, 619, 30, 619, 16761, 273, 13487, 3567, 18,...
self._enqueue_message(message_id, content, content_type)
self._enqueue_message(message_id, content, content_type, failure_report='partial', success_report='yes', notify_progress=True)
def send_message(self, content, content_type='text/plain', remote_identity=None, dt=None): """Send IM message. Prefer Message/CPIM wrapper if it is supported. If called before the connection was established, the messages will be queued until MediaStreamDidStart notification.
758d54d44f58bd7d1625f75b44660ca65e892e45 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5703/758d54d44f58bd7d1625f75b44660ca65e892e45/msrp.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 67, 2150, 12, 2890, 16, 913, 16, 913, 67, 723, 2218, 955, 19, 7446, 2187, 2632, 67, 10781, 33, 7036, 16, 3681, 33, 7036, 4672, 3536, 3826, 6246, 883, 18, 2962, 586, 2350, 19, 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, 1366, 67, 2150, 12, 2890, 16, 913, 16, 913, 67, 723, 2218, 955, 19, 7446, 2187, 2632, 67, 10781, 33, 7036, 16, 3681, 33, 7036, 4672, 3536, 3826, 6246, 883, 18, 2962, 586, 2350, 19, 3...
sourceSite = sourceSE.split('-')[0].split('_')[0] channelName = '%s-%s' % (sourceSite,destSite) if channelInfo.has_key(channelName):
sourceSite = sourceSE.split( '-' )[0].split( '_' )[0] channelName = '%s-%s' % ( sourceSite, destSite ) if channelInfo.has_key( channelName ):
def __dynamicThroughput(self,sourceSEs,destSEs): """ This creates a replication tree based on observed throughput on the channels """ res = self.__getTimeToStart() if not res['OK']: gLogger.error(res['Message']) return {} channelInfo = res['Value']
9005c0a96ba1bc0698c543bcb4c1886f4eeee344 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/9005c0a96ba1bc0698c543bcb4c1886f4eeee344/ReplicationScheduler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 14507, 24478, 12, 2890, 16, 3168, 1090, 87, 16, 10488, 1090, 87, 4672, 3536, 1220, 3414, 279, 11335, 2151, 2511, 603, 12117, 24677, 603, 326, 5750, 3536, 400, 273, 365, 16186, 588, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 14507, 24478, 12, 2890, 16, 3168, 1090, 87, 16, 10488, 1090, 87, 4672, 3536, 1220, 3414, 279, 11335, 2151, 2511, 603, 12117, 24677, 603, 326, 5750, 3536, 400, 273, 365, 16186, 588, ...
self.package(id, info, version.summary)
self.package(id, info, unicode(version.summary, DEFAULT_ENCODING))
def _emit_pkg_version(self, version, info=None): """Emit the Package signal of the given apt.package.Version.""" id = self._get_id_from_version(version) section = version.section.split("/")[-1] if not info: if version == version.package.installed: if section == "metapackages": info = INFO_COLLECTION_INSTALLED else: info = INFO_INSTALLED else: if section == "metapackages": info = INFO_COLLECTION_AVAILABLE else: info = INFO_AVAILABLE self.package(id, info, version.summary)
c9854d38e3d2b64a5be58b946d7d99fcd94605fb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12904/c9854d38e3d2b64a5be58b946d7d99fcd94605fb/aptBackend.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 18356, 67, 10657, 67, 1589, 12, 2890, 16, 1177, 16, 1123, 33, 7036, 4672, 3536, 17982, 326, 7508, 4277, 434, 326, 864, 279, 337, 18, 5610, 18, 1444, 12123, 612, 273, 365, 6315, 58...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 18356, 67, 10657, 67, 1589, 12, 2890, 16, 1177, 16, 1123, 33, 7036, 4672, 3536, 17982, 326, 7508, 4277, 434, 326, 864, 279, 337, 18, 5610, 18, 1444, 12123, 612, 273, 365, 6315, 58...
guideAct = QtGui.QAction(self.tr("User &Guide"), self)
guideAct = QtGui.QAction(self.tr("User &Guide..."), self)
def createActions(self): aboutAct = QtGui.QAction(self.tr("&About"), self) aboutAct.setStatusTip(self.tr("About Gorgon")) self.connect(aboutAct, QtCore.SIGNAL("triggered()"), self.showAbout) self.app.actions.addAction("show_AboutForm", aboutAct) updatesAct = QtGui.QAction(self.tr("Get &Updates"), self) updatesAct.setStatusTip(self.tr("Download Gorgon Updates")) self.connect(updatesAct, QtCore.SIGNAL("triggered()"), self.getUpdates) self.app.actions.addAction("show_GetUpdatesForm", updatesAct)
cbd6c1fa99cff77cff9f20aa748426c80d8ce636 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4399/cbd6c1fa99cff77cff9f20aa748426c80d8ce636/about_form.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 6100, 12, 2890, 4672, 2973, 2459, 273, 23425, 18, 53, 1803, 12, 2890, 18, 313, 2932, 10, 24813, 6, 3631, 365, 13, 2973, 2459, 18, 542, 1482, 14189, 12, 2890, 18, 313, 2932, 24813,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 6100, 12, 2890, 4672, 2973, 2459, 273, 23425, 18, 53, 1803, 12, 2890, 18, 313, 2932, 10, 24813, 6, 3631, 365, 13, 2973, 2459, 18, 542, 1482, 14189, 12, 2890, 18, 313, 2932, 24813,...
-979933/553629 + 255525/657688*i - 3511/6929*j - 700105/258683*k
-61003/263835 + 222181/103881*i - 7314/2707*j + 458453/129132*k
def random_element(self, *args, **kwds): """ Return a random element of this quaternion algebra.
c054dae383a61f81a84e0a8e99c4dcec64cdfc97 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/c054dae383a61f81a84e0a8e99c4dcec64cdfc97/quaternion_algebra.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2744, 67, 2956, 12, 2890, 16, 380, 1968, 16, 2826, 25577, 4672, 3536, 2000, 279, 2744, 930, 434, 333, 26774, 524, 29087, 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, 2744, 67, 2956, 12, 2890, 16, 380, 1968, 16, 2826, 25577, 4672, 3536, 2000, 279, 2744, 930, 434, 333, 26774, 524, 29087, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
start = new_string.lower().find("<latex>", end+1)
start = new_string.lower().find("<latex>")
def preprocess(old_string): # Escape literal < (unmatched tag) and new line from string. hanging = [] open = 0 pending = 0 for i in range(len(old_string)): if old_string[i] == '<': if open != 0: hanging.append(pending) pending = i continue open += 1 pending = i elif old_string[i] == '>': if open > 0: open -= 1 if open != 0: hanging.append(pending) new_string = "" for i in range(len(old_string)): if old_string[i] == '\n': new_string += "<br>" elif i in hanging: new_string += "&lt;" else: new_string += old_string[i] # Fill out relative paths for img tags. i = new_string.lower().find("img src") while i != -1: start = new_string.find("\"", i) end = new_string.find("\"", start+1) if end == -1: break old_path = new_string[start+1:end] new_string = new_string[:start+1] + \ expand_path(old_path) + \ new_string[end:] i = new_string.lower().find("img src", end+1) # Process latex tags. start = new_string.lower().find("<latex>") while start != -1: end = new_string.find("</latex>", start+1) if end == -1: break latex_command = new_string[start+7:end] new_string = new_string[:start] + \ process_latex(latex_command) + \ new_string[end+8:] start = new_string.lower().find("<latex>", end+1) return new_string
bd19aa69ff819e53aae4d121638c2b7d1a55254f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1240/bd19aa69ff819e53aae4d121638c2b7d1a55254f/mnemosyne_core.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17942, 12, 1673, 67, 1080, 4672, 225, 468, 18025, 7158, 411, 261, 318, 11073, 1047, 13, 471, 394, 980, 628, 533, 18, 225, 366, 18183, 273, 5378, 1696, 273, 374, 4634, 273, 374, 225, 36...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17942, 12, 1673, 67, 1080, 4672, 225, 468, 18025, 7158, 411, 261, 318, 11073, 1047, 13, 471, 394, 980, 628, 533, 18, 225, 366, 18183, 273, 5378, 1696, 273, 374, 4634, 273, 374, 225, 36...
self.typename_streamer.read(stream, stream.read(1))
typeName = self.typename_streamer.read(stream, stream.read(1))
def read(self, stream, prefix): assert prefix in self.codes # skip typeNmae of remote interface self.typename_streamer.read(stream, stream.read(1)) # read url url = self.url_streamer(stream, stream.read(1)) # NOTE: non HTTP transports are not yet supported. # TODO: (See comments to HttpProxy class) return RemoteReference(url)
c19eb4aab51adb600d8e745b8ec8c8277b76437c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3153/c19eb4aab51adb600d8e745b8ec8c8277b76437c/hessian.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 12, 2890, 16, 1407, 16, 1633, 4672, 1815, 1633, 316, 365, 18, 7000, 468, 2488, 618, 50, 2540, 73, 434, 2632, 1560, 8173, 273, 365, 18, 12846, 1069, 67, 3256, 264, 18, 896, 12, 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, 12, 2890, 16, 1407, 16, 1633, 4672, 1815, 1633, 316, 365, 18, 7000, 468, 2488, 618, 50, 2540, 73, 434, 2632, 1560, 8173, 273, 365, 18, 12846, 1069, 67, 3256, 264, 18, 896, 12, 3...
if type(object) is _MethodType: self._id = id(object.im_func) else: self._id = id(object)
if type(object) is _MethodType: self._id = id(object.im_func) else: self._id = id(object) n = self.name()
def __init__(self, object): self._obj = object if type(object) is _MethodType: self._id = id(object.im_func) else: self._id = id(object)
9b139bc1a13c6e06e5791313d0843c073e7c1588 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/9b139bc1a13c6e06e5791313d0843c073e7c1588/uid.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 733, 4672, 365, 6315, 2603, 273, 733, 309, 618, 12, 1612, 13, 353, 389, 21988, 30, 365, 6315, 350, 273, 612, 12, 1612, 18, 381, 67, 644, 13, 469, 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, 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, 733, 4672, 365, 6315, 2603, 273, 733, 309, 618, 12, 1612, 13, 353, 389, 21988, 30, 365, 6315, 350, 273, 612, 12, 1612, 18, 381, 67, 644, 13, 469, 30, ...
return http.Response(stream=message(error, '/settings'))
return HTMLResponse(stream=message(error, '/settings'))
def render(self, request): error = None redirect_to_home = None redirect_to_logout = None if 'autosave' in request.args: notebook.user(self.username)['autosave_interval'] = int(request.args['autosave'][0]) * 60 redirect_to_home = True
39855fabbbbe971c1c1d64566b1625e9c1c6d482 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/39855fabbbbe971c1c1d64566b1625e9c1c6d482/twist.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 12, 2890, 16, 590, 4672, 555, 273, 599, 3136, 67, 869, 67, 8712, 273, 599, 3136, 67, 869, 67, 21229, 225, 273, 599, 309, 296, 21996, 836, 11, 316, 590, 18, 1968, 30, 14718, 18,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 12, 2890, 16, 590, 4672, 555, 273, 599, 3136, 67, 869, 67, 8712, 273, 599, 3136, 67, 869, 67, 21229, 225, 273, 599, 309, 296, 21996, 836, 11, 316, 590, 18, 1968, 30, 14718, 18,...
print self.window_width, self.window_level
print "WW, WL", self.window_width, self.window_level
def do_ww_wl(self, image): print self.window_width, self.window_level print image.GetScalarRange() colorer = vtk.vtkImageMapToWindowLevelColors() colorer.SetInput(image) colorer.SetWindow(self.window_width) colorer.SetLevel(self.window_level) colorer.SetOutputFormatToRGB() colorer.Update()
03d9dea41c98050216ea9bbb9fd861e373e95ecb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10228/03d9dea41c98050216ea9bbb9fd861e373e95ecb/slice_.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 3107, 67, 21504, 12, 2890, 16, 1316, 4672, 1172, 315, 19989, 16, 678, 48, 3113, 365, 18, 5668, 67, 2819, 16, 365, 18, 5668, 67, 2815, 1172, 1316, 18, 967, 13639, 2655, 1435, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 3107, 67, 21504, 12, 2890, 16, 1316, 4672, 1172, 315, 19989, 16, 678, 48, 3113, 365, 18, 5668, 67, 2819, 16, 365, 18, 5668, 67, 2815, 1172, 1316, 18, 967, 13639, 2655, 1435, ...
if h.sock: h.sock.close() h.sock = None
def http_open(self, req): # XXX devise a new mechanism to specify user/password host = req.get_host() if not host: raise URLError('no host given')
5cd5cbaf8b626d729e14304f4612dd5de8207c89 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/5cd5cbaf8b626d729e14304f4612dd5de8207c89/urllib2.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1062, 67, 3190, 12, 2890, 16, 1111, 4672, 468, 11329, 4461, 784, 279, 394, 12860, 358, 4800, 729, 19, 3664, 1479, 273, 1111, 18, 588, 67, 2564, 1435, 309, 486, 1479, 30, 1002, 1976, 66...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1062, 67, 3190, 12, 2890, 16, 1111, 4672, 468, 11329, 4461, 784, 279, 394, 12860, 358, 4800, 729, 19, 3664, 1479, 273, 1111, 18, 588, 67, 2564, 1435, 309, 486, 1479, 30, 1002, 1976, 66...
res.append(same_start)
res.extend(same_start)
def get_sorted_events_in_range(self, dtstart, dtend, only_last=True): """ Return a list of Component objects of type 'VEVENT' matching the given dates range and sorted chronologically. The only_last True value means only getting events with last sequence number (history). """ res_events, res_event = [], None
5376f5bc09e5b5bab94961a2ef807c750f6ab2aa /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12681/5376f5bc09e5b5bab94961a2ef807c750f6ab2aa/icalendar.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 10350, 67, 5989, 67, 267, 67, 3676, 12, 2890, 16, 3681, 1937, 16, 3681, 409, 16, 1338, 67, 2722, 33, 5510, 4672, 3536, 2000, 279, 666, 434, 5435, 2184, 434, 618, 296, 3412, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 10350, 67, 5989, 67, 267, 67, 3676, 12, 2890, 16, 3681, 1937, 16, 3681, 409, 16, 1338, 67, 2722, 33, 5510, 4672, 3536, 2000, 279, 666, 434, 5435, 2184, 434, 618, 296, 3412, ...
self.add_deferred_sql( self.create_index_sql( table_name, [field.column], unique = True, db_tablespace = tablespace, ) )
field_output.append('UNIQUE')
def column_sql(self, table_name, field_name, field, tablespace=''): """ Creates the SQL snippet for a column. Used by add_column and add_table. """ qn = connection.ops.quote_name
231ea68d258af195057488cc17f484ac994da293 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/13142/231ea68d258af195057488cc17f484ac994da293/generic.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1057, 67, 4669, 12, 2890, 16, 1014, 67, 529, 16, 652, 67, 529, 16, 652, 16, 4606, 909, 2218, 11, 4672, 3536, 10210, 326, 3063, 13016, 364, 279, 1057, 18, 10286, 635, 527, 67, 2827, 4...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1057, 67, 4669, 12, 2890, 16, 1014, 67, 529, 16, 652, 67, 529, 16, 652, 16, 4606, 909, 2218, 11, 4672, 3536, 10210, 326, 3063, 13016, 364, 279, 1057, 18, 10286, 635, 527, 67, 2827, 4...
df.Creator, df.Type, df.Flags = sf.Creator, sf.Type, sf.Flags
df.Creator, df.Type = sf.Creator, sf.Type df.Flags = (sf.Flags & (kIsStationary|kNameLocked|kHasBundle|kIsInvisible|kIsAlias))
def copy(src, dst, createpath=0): """Copy a file, including finder info, resource fork, etc""" if createpath: mkdirs(os.path.split(dst)[0]) srcfss = macfs.FSSpec(src) dstfss = macfs.FSSpec(dst) ifp = open(srcfss.as_pathname(), 'rb') ofp = open(dstfss.as_pathname(), 'wb') d = ifp.read(BUFSIZ) while d: ofp.write(d) d = ifp.read(BUFSIZ) ifp.close() ofp.close() ifp = open(srcfss.as_pathname(), '*rb') ofp = open(dstfss.as_pathname(), '*wb') d = ifp.read(BUFSIZ) while d: ofp.write(d) d = ifp.read(BUFSIZ) ifp.close() ofp.close() sf = srcfss.GetFInfo() df = dstfss.GetFInfo() df.Creator, df.Type, df.Flags = sf.Creator, sf.Type, sf.Flags dstfss.SetFInfo(df)
a8a277cbdc32c06fe59465fc3f8bc260dc7d82ea /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/a8a277cbdc32c06fe59465fc3f8bc260dc7d82ea/macostools.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1610, 12, 4816, 16, 3046, 16, 752, 803, 33, 20, 4672, 3536, 2951, 279, 585, 16, 6508, 7532, 1123, 16, 1058, 12515, 16, 5527, 8395, 309, 752, 803, 30, 18095, 12, 538, 18, 803, 18, 493...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1610, 12, 4816, 16, 3046, 16, 752, 803, 33, 20, 4672, 3536, 2951, 279, 585, 16, 6508, 7532, 1123, 16, 1058, 12515, 16, 5527, 8395, 309, 752, 803, 30, 18095, 12, 538, 18, 803, 18, 493...
You can also create a task with attributes like tags, due date or defer date in the quickadd entry. For that the syntax is :
def populate(): doc,root = cleanxml.emptydoc("project") #Task 0@1: Getting started with GTG title1 = _("Getting started with GTG") text1 = _("""Welcome to Getting Things Gnome!, your new task manager.
76bf5caf1729f76e2bf15a86b25f71ed1983de5e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8234/76bf5caf1729f76e2bf15a86b25f71ed1983de5e/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, 225, 468, 2174, 374, 36, 21, 30, 26602, 5746, 598, 19688, 43, 2077, 21, 273, 389, 2932, 19213, 5746, 598, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 225, 468, 2174, 374, 36, 21, 30, 26602, 5746, 598, 19688, 43, 2077, 21, 273, 389, 2932, 19213, 5746, 598, ...
self.queue.put((url, html, handle))
self.queue.put((url, handle)) self.num_obj += 1
def request_url(self, html, url, handle): url = urllib.basejoin(history[-1], url) print "Requesting URL: ", url self.queue.put((url, html, handle))
0b588b6558655c350e5625a4b6113395b7461e97 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10805/0b588b6558655c350e5625a4b6113395b7461e97/gtkhtml_demo.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 590, 67, 718, 12, 2890, 16, 1729, 16, 880, 16, 1640, 4672, 880, 273, 11527, 18, 1969, 5701, 12, 8189, 18919, 21, 6487, 880, 13, 1172, 315, 691, 310, 1976, 30, 3104, 880, 365, 18, 400...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 590, 67, 718, 12, 2890, 16, 1729, 16, 880, 16, 1640, 4672, 880, 273, 11527, 18, 1969, 5701, 12, 8189, 18919, 21, 6487, 880, 13, 1172, 315, 691, 310, 1976, 30, 3104, 880, 365, 18, 400...
if os.path.isfile(self.path) and password:
if os.path.isfile(self.path) and self.password:
def frstStatus(self): if os.path.isfile(self.path) and password: return "unmounted" elif not password: return "nopass" elif not os.path.isfile(self.path): return "notfound" else: return "error"
555a8dc6bed1082a6c83820980f23d663c9ff974 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3000/555a8dc6bed1082a6c83820980f23d663c9ff974/truecrypt.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3812, 334, 1482, 12, 2890, 4672, 309, 1140, 18, 803, 18, 291, 768, 12, 2890, 18, 803, 13, 471, 365, 18, 3664, 30, 327, 315, 318, 4778, 329, 6, 1327, 486, 2201, 30, 327, 315, 82, 55...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3812, 334, 1482, 12, 2890, 4672, 309, 1140, 18, 803, 18, 291, 768, 12, 2890, 18, 803, 13, 471, 365, 18, 3664, 30, 327, 315, 318, 4778, 329, 6, 1327, 486, 2201, 30, 327, 315, 82, 55...
def setParseAction( self, *fns ):
def setParseAction( self, *fns, **kwargs ):
def setParseAction( self, *fns ): """Define action to perform when successfully matching parse element definition. Parse action fn is a callable method with 0-3 arguments, called as fn(s,loc,toks), fn(loc,toks), fn(toks), or just fn(), where: - s = the original string being parsed - loc = the location of the matching substring - toks = a list of the matched tokens, packaged as a ParseResults object If the functions in fns modify the tokens, they can return them as the return value from fn, and the modified list of tokens will replace the original. Otherwise, fn does not need to return any value.""" self.parseAction = map(self.normalizeParseActionArgs, list(fns)) return self
fe4553e6ec2935041dca80d29446568e2932ed31 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3693/fe4553e6ec2935041dca80d29446568e2932ed31/pyparsing.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 3201, 1803, 12, 365, 16, 380, 74, 2387, 16, 2826, 4333, 262, 30, 3536, 11644, 1301, 358, 3073, 1347, 4985, 3607, 1109, 930, 2379, 18, 2884, 1301, 2295, 353, 279, 4140, 707, 598, 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, 444, 3201, 1803, 12, 365, 16, 380, 74, 2387, 16, 2826, 4333, 262, 30, 3536, 11644, 1301, 358, 3073, 1347, 4985, 3607, 1109, 930, 2379, 18, 2884, 1301, 2295, 353, 279, 4140, 707, 598, 3...
elif _KeyMask == ALVA_SP_DOWN or _KeyMask == ALVA_SPR_DOWN:
elif _KeyMask == ALVA_SP_DOWN or _KeyMask == ALVA_SPR_DOWN:
def _alva_OnKeyRelease(self): _KeyMask = self._alva_KeyMask self._alva_KeyMask = 0
a906a03e97eb70e4e237f1cca7165c019d925c60 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9340/a906a03e97eb70e4e237f1cca7165c019d925c60/alvaBC6.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 287, 15304, 67, 1398, 653, 7391, 12, 2890, 4672, 389, 653, 5796, 273, 365, 6315, 287, 15304, 67, 653, 5796, 365, 6315, 287, 15304, 67, 653, 5796, 273, 374, 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, 389, 287, 15304, 67, 1398, 653, 7391, 12, 2890, 4672, 389, 653, 5796, 273, 365, 6315, 287, 15304, 67, 653, 5796, 365, 6315, 287, 15304, 67, 653, 5796, 273, 374, 2, -100, -100, -100, -1...
self.description = self.result and self.result.describe() or None
self.description = self._result and self._result.describe() or None
def _do_query(self, q): from string import split, atoi db = self.connection.db db.query(q) self.result = self._get_result() self.rowcount = db.affected_rows() self.description = self.result and self.result.describe() or None self._insert_id = db.insert_id() return self.rowcount
4dcca6779b980ae173a387375f0f35be5e3fead3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10477/4dcca6779b980ae173a387375f0f35be5e3fead3/MySQLdb.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2896, 67, 2271, 12, 2890, 16, 1043, 4672, 628, 533, 1930, 1416, 16, 622, 11359, 1319, 273, 365, 18, 4071, 18, 1966, 1319, 18, 2271, 12, 85, 13, 365, 18, 2088, 273, 365, 6315, 58...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2896, 67, 2271, 12, 2890, 16, 1043, 4672, 628, 533, 1930, 1416, 16, 622, 11359, 1319, 273, 365, 18, 4071, 18, 1966, 1319, 18, 2271, 12, 85, 13, 365, 18, 2088, 273, 365, 6315, 58...
s += ('<span id="%s"%s><a%s%s href=" (uid, css_class_html, tooltip_html,
if targets: targets_html = ' targets="%s"' % targets else: targets_html = '' s += ('<tt id="%s"%s%s><a%s%s href=" (uid, css_class_html, targets_html, tooltip_html,
# function def block, then self.def_name will be its name;
5bc1065ae92ac1cb6e043d081151eb3bcfca80a3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/5bc1065ae92ac1cb6e043d081151eb3bcfca80a3/html_colorize.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 468, 445, 1652, 1203, 16, 1508, 365, 18, 536, 67, 529, 903, 506, 2097, 508, 31, 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, 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, 468, 445, 1652, 1203, 16, 1508, 365, 18, 536, 67, 529, 903, 506, 2097, 508, 31, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
sage: f.coeff(x^2)
sage: f.coefficient(x^2)
def coeff(self, x, n=1): """ Returns the coefficient of $x^n$ in self.
486725f285970683f3b2bc0d446ea3c8081b0bdb /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/486725f285970683f3b2bc0d446ea3c8081b0bdb/calculus.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11943, 12, 2890, 16, 619, 16, 290, 33, 21, 4672, 3536, 2860, 326, 16554, 434, 271, 92, 66, 82, 8, 316, 365, 18, 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, 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, 11943, 12, 2890, 16, 619, 16, 290, 33, 21, 4672, 3536, 2860, 326, 16554, 434, 271, 92, 66, 82, 8, 316, 365, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
sage: CuspFamily(16, 4, "1") (c_{4,1})
sage: CuspFamily(16, 4, "1")._repr_() '(c_{4,1})'
def _repr_(self): r""" Return a string representation of self. EXAMPLE: sage: CuspFamily(16, 4, "1") (c_{4,1}) """ if self.width() == 1: return "(Inf)" elif self.width() == self.level(): return "(0)" else: return "(c_{%s%s})" % (self.width(), ((self.label and (","+self.label)) or ""))
fcfdaf87182bf98cd1dec10345d4a38b5f098c6e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/fcfdaf87182bf98cd1dec10345d4a38b5f098c6e/etaproducts.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 12715, 67, 12, 2890, 4672, 436, 8395, 2000, 279, 533, 4335, 434, 365, 18, 5675, 21373, 30, 272, 410, 30, 385, 407, 84, 9203, 12, 2313, 16, 1059, 16, 315, 21, 20387, 67, 12715, 6...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 12715, 67, 12, 2890, 4672, 436, 8395, 2000, 279, 533, 4335, 434, 365, 18, 5675, 21373, 30, 272, 410, 30, 385, 407, 84, 9203, 12, 2313, 16, 1059, 16, 315, 21, 20387, 67, 12715, 6...
return a +"wx." +c +d
return a +" wx." +c +d
def repWX2Action(self, s, l, t): a, b, c, d = t try: newWX = self.specialNames[c] return a +newWX +d except KeyError: return a +"wx." +c +d
9ab6f841af87631b8ce8853ff157269cd7c65263 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/9ab6f841af87631b8ce8853ff157269cd7c65263/wx25upgrade.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2071, 59, 60, 22, 1803, 12, 2890, 16, 272, 16, 328, 16, 268, 4672, 279, 16, 324, 16, 276, 16, 302, 273, 268, 775, 30, 394, 59, 60, 273, 365, 18, 9371, 1557, 63, 71, 65, 327, 279,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2071, 59, 60, 22, 1803, 12, 2890, 16, 272, 16, 328, 16, 268, 4672, 279, 16, 324, 16, 276, 16, 302, 273, 268, 775, 30, 394, 59, 60, 273, 365, 18, 9371, 1557, 63, 71, 65, 327, 279,...
data15 = nc.variables['precipitation'][t0:t1,y,x]
try: data15 = nc.variables['precipitation'][t0:t1,y,x] except: print "Index ERROR t0: %s t1: %s y: %s x: %s" % (t0,t1,y,x) sys.exit()
def doBreakPoint(lat, lon, day): """ Actually compute the breakpoint data, hmmm """ x,y = lib.nc_lalo2pt(nc, lat, lon) t0 = (day - 1) * 96 + 24 # 6 hours tz offset t1 = day * 96 + 24 # 6 hours tz offset if t1 > numpy.shape(nc.variables['precipitation'])[0]: t1 = numpy.shape(nc.variables['precipitation'])[0] data15 = nc.variables['precipitation'][t0:t1,y,x] threshold = 0.1 * 25.4 # Threshold is 2/10 of an inch accum = 0.00 writeAccum = 0.00 lastTime = 0 lines = 0 bkTxt = "" cliFrmt = "%-12s%-12.3f\n" rAccum = 0 # Running Accumulation tAccum = 0 # Total Accumulation cnt = 0 for accum in data15: rAccum += accum tAccum += accum if rAccum > threshold: bkTxt += cliFrmt % (times[cnt], tAccum) rAccum = 0 cnt += 1 if rAccum > 0: bkTxt += cliFrmt % (times[cnt-1], tAccum) if tAccum < (0.05 * 25.4): # Minimum Threshold bkTxt = "" return bkTxt
a245257b9e3b8ebac4551a9304e3d64cadbf39e4 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11189/a245257b9e3b8ebac4551a9304e3d64cadbf39e4/build_wepp.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 7634, 2148, 12, 4801, 16, 4281, 16, 2548, 4672, 3536, 4603, 3452, 3671, 326, 18820, 501, 16, 366, 7020, 81, 3536, 619, 16, 93, 273, 2561, 18, 14202, 67, 80, 287, 83, 22, 337, 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, 741, 7634, 2148, 12, 4801, 16, 4281, 16, 2548, 4672, 3536, 4603, 3452, 3671, 326, 18820, 501, 16, 366, 7020, 81, 3536, 619, 16, 93, 273, 2561, 18, 14202, 67, 80, 287, 83, 22, 337, 12...
axis_positions = zeros([n_bases+2,3],Float)
axis_positions = [ None ] * (n_bases + 2) for n in range(0, n_bases+2): axis_positions[n] = [ 0.0 ] * 3
def compute_memo(self, chunk): """ If drawing chunks in this display mode can be optimized by precomputing some info from chunk's appearance, compute that info and return it.
cbc143d808cf827d03bc69ee526e2fca8459d46d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11221/cbc143d808cf827d03bc69ee526e2fca8459d46d/DnaCylinderChunks.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3671, 67, 19521, 12, 2890, 16, 2441, 4672, 3536, 971, 16327, 6055, 316, 333, 2562, 1965, 848, 506, 15411, 635, 675, 13406, 310, 2690, 1123, 628, 2441, 1807, 9788, 1359, 16, 3671, 716, 11...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3671, 67, 19521, 12, 2890, 16, 2441, 4672, 3536, 971, 16327, 6055, 316, 333, 2562, 1965, 848, 506, 15411, 635, 675, 13406, 310, 2690, 1123, 628, 2441, 1807, 9788, 1359, 16, 3671, 716, 11...
ifp = open(args)
ifp = open(args[0])
def main(): global DEBUG # opts, args = getopt.getopt(sys.argv[1:], "D", ["debug"]) for opt, arg in opts: if opt in ("-D", "--debug"): DEBUG = DEBUG + 1 if len(args) == 0: ifp = sys.stdin ofp = sys.stdout elif len(args) == 1: ifp = open(args) ofp = sys.stdout elif len(args) == 2: ifp = open(args[0]) ofp = open(args[1], "w") else: usage() sys.exit(2) table = load_table(open(os.path.join(sys.path[0], 'conversion.xml'))) convert(ifp, ofp, table)
082fec83c8af353bd090af107d5cb3647fed99c1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/082fec83c8af353bd090af107d5cb3647fed99c1/latex2esis.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 2552, 6369, 468, 1500, 16, 833, 273, 336, 3838, 18, 588, 3838, 12, 9499, 18, 19485, 63, 21, 30, 6487, 315, 40, 3113, 8247, 4148, 6, 5717, 364, 2153, 16, 1501, 316, 1500, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 2552, 6369, 468, 1500, 16, 833, 273, 336, 3838, 18, 588, 3838, 12, 9499, 18, 19485, 63, 21, 30, 6487, 315, 40, 3113, 8247, 4148, 6, 5717, 364, 2153, 16, 1501, 316, 1500, ...
script = '<div><script>jmol_applet(%s, "%s");</script></div>' % (size, url)
script = '<div><script>jmol_applet(%s, "%s?%d");</script></div>' % (size, url, self.version())
def files_html(self, out): dir = self.directory() D = os.listdir(dir) D.sort() if len(D) == 0: return '' images = [] files = [] # The question mark trick here is so that images will be reloaded when # the async request requests the output text for a computation. # This is inspired by http://www.irt.org/script/416.htm/. for F in D: if 'cell://%s'%F in out: continue url = "%s/%s"%(self.url_to_self(), F) if F.endswith('.png') or F.endswith('.bmp') or \ F.endswith('.jpg') or F.endswith('.gif'): images.append('<img src="%s?%d">'%(url, self.version())) elif F.endswith('.obj'): images.append("""<a href="javascript:sage3d_show('%s', '%s_%s', '%s');">Click for interactive view.</a>"""%(url, self.__id, F, F[:-4])) elif F.endswith('.mtl') or F.endswith(".objmeta"): pass # obj data elif F.endswith('.svg'): images.append('<embed src="%s" type="image/svg+xml" name="emap">'%url) elif F.endswith('.jmol'): # If F ends in -size500.jmol then we make the viewer applet with size 500. i = F.rfind('-size') if i != -1: size = F[i+5:-5] else: size = 500
7d79984a2c9f3f6219ea22090349ce5dbbbbf090 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/7d79984a2c9f3f6219ea22090349ce5dbbbbf090/cell.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1390, 67, 2620, 12, 2890, 16, 596, 4672, 1577, 273, 365, 18, 5149, 1435, 463, 273, 1140, 18, 1098, 1214, 12, 1214, 13, 463, 18, 3804, 1435, 309, 562, 12, 40, 13, 422, 374, 30, 327, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1390, 67, 2620, 12, 2890, 16, 596, 4672, 1577, 273, 365, 18, 5149, 1435, 463, 273, 1140, 18, 1098, 1214, 12, 1214, 13, 463, 18, 3804, 1435, 309, 562, 12, 40, 13, 422, 374, 30, 327, ...
DebugErr(self.encoding)
def connect(self, server, port, nickname, password=None, username=None, ircname=None, localaddress="", localport=0, ssl=False, ipv6=False, encoding="utf-8"): """Connect/reconnect to a server.
6f989045beadc559b1d4c839e10486890c6f8c77 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10749/6f989045beadc559b1d4c839e10486890c6f8c77/irclib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3077, 12, 2890, 16, 1438, 16, 1756, 16, 19570, 16, 2201, 33, 7036, 16, 2718, 33, 7036, 16, 277, 1310, 529, 33, 7036, 16, 1191, 2867, 1546, 3113, 1191, 655, 33, 20, 16, 5832, 33, 8381...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3077, 12, 2890, 16, 1438, 16, 1756, 16, 19570, 16, 2201, 33, 7036, 16, 2718, 33, 7036, 16, 277, 1310, 529, 33, 7036, 16, 1191, 2867, 1546, 3113, 1191, 655, 33, 20, 16, 5832, 33, 8381...
src.newmethod('- (<PREFIX>Reference *)at:(long)fromIndex to:(long)toIndex')
src.newmethod('- (<PREFIX>Reference *)at:(int)fromIndex to:(int)toIndex')
def render_reference(self, src): src.newglue('ReferenceGlue') src.importmacro('<PREFIX>CommandGlue.h') src.importmacro('<PREFIX>ReferenceRendererGlue.h') for name in ['App', 'Con', 'Its']: src.definemacro('<PREFIX>%s' % name, '(<PREFIX>Reference *)[<PREFIX>Reference referenceWithAppData: nil aemReference: AEM%s]' % name) src.newclass('<PREFIX>Reference', 'ASReference') # add +app, +con, +its methods so that scripting languages can easily use glues via BridgeSupport src.comment('+app, +con, +its methods can be used in place of <PREFIX>App, <PREFIX>Con, <PREFIX>Its macros') for name in ['App', 'Con', 'Its']: src.newmethod('+ (<PREFIX>Reference *)%s' % name.lower()) src += ' return [self referenceWithAppData: nil aemReference: AEM%s];' % name src.endmethod() src.comment('*********************************') # add -description support src.newmethod('- (NSString *)description') src += ' return [<PREFIX>ReferenceRenderer formatObject: AS_aemReference appData: AS_appData];' src.endmethod() # add dictionary-defined property, element and command methods prevkind = None for name, (kind, data) in self.referencebyname: if kind != prevkind: src.comment({kCommand: 'Commands', kProperty: 'Properties', kElement: 'Elements'}[kind]) prevkind = kind if kind == kCommand: classname = '<PREFIX>' + self._capname(name) + 'Command' for directParam in ['', ':(id)directParameter']: src.newmethod('- (%s *)%s%s' % (classname, name, directParam)) code = data[0] src += ' return [%s commandWithAppData: AS_appData' % classname src += ' eventClass: %s' % self._formatcode(code[:4]) src += ' eventID: %s' % self._formatcode(code[4:]) src += ' directParameter: %s' % (directParam and 'directParameter' or 'kASNoDirectParameter') src += ' parentReference: self];' src.endmethod() else: src.newmethod('- (<PREFIX>Reference *)%s' % name) src += ' return [<PREFIX>Reference referenceWithAppData: AS_appData' src += ' aemReference: [AS_aemReference %s: %s]];' % ( {kProperty: 'property', kElement: 'elements'}[kind], self._formatcode(data)) src.endmethod() # add selector methods (-byIndex, -byName, etc.) src.comment('*********************************') # src.comment('ordinal selectors') for methodname in ['first', 'middle', 'last', 'any']: src.newmethod('- (<PREFIX>Reference *)%s' % methodname) src += ' return [<PREFIX>Reference referenceWithAppData: AS_appData' src += ' aemReference: [AS_aemReference %s]];' % methodname src.endmethod() # src.comment('by-index, by-name, by-id selectors') for methodname, type, var in [('at', 'long', 'index'), ('byIndex', 'id', 'index'), ('byName', 'id', 'name'), ('byID', 'id', 'id_')]: src.newmethod('- (<PREFIX>Reference *)%s:(%s)%s' % (methodname, type, var)) src += ' return [<PREFIX>Reference referenceWithAppData: AS_appData' src += ' aemReference: [AS_aemReference %s: %s]];' % (methodname, var) src.endmethod() # src.comment('by-relative-position selectors') for methodname, type, var in [('previous', 'ASConstant *', 'class_'), ('next', 'ASConstant *', 'class_')]: src.newmethod('- (<PREFIX>Reference *)%s:(%s)%s' % (methodname, type, var)) src += ' return [<PREFIX>Reference referenceWithAppData: AS_appData' src += ' aemReference: [AS_aemReference %s: [%s AS_code]]];' % (methodname, var) src.endmethod() # src.comment('by-range selector') src.newmethod('- (<PREFIX>Reference *)at:(long)fromIndex to:(long)toIndex') src += ' return [<PREFIX>Reference referenceWithAppData: AS_appData' src += ' aemReference: [AS_aemReference at: fromIndex to: toIndex]];' src.endmethod() src.newmethod('- (<PREFIX>Reference *)byRange:(id)fromObject to:(id)toObject') src += ' // takes two con-based references, with other values being expanded as necessary' src += ' if ([fromObject isKindOfClass: [<PREFIX>Reference class]])' src += ' fromObject = [fromObject AS_aemReference];' src += ' if ([toObject isKindOfClass: [<PREFIX>Reference class]])' src += ' toObject = [toObject AS_aemReference];' src += ' return [<PREFIX>Reference referenceWithAppData: AS_appData' src += ' aemReference: [AS_aemReference byRange: fromObject to: toObject]];' src.endmethod() # src.comment('by-test selector') src.newmethod('- (<PREFIX>Reference *)byTest:(<PREFIX>Reference *)testReference') src += ' return [<PREFIX>Reference referenceWithAppData: AS_appData' src += ' aemReference: [AS_aemReference byTest: [testReference AS_aemReference]]];' src.endmethod() # src.comment('insertion location selectors') for methodname in ['beginning', 'end', 'before', 'after']: src.newmethod('- (<PREFIX>Reference *)%s' % methodname) src += ' return [<PREFIX>Reference referenceWithAppData: AS_appData' src += ' aemReference: [AS_aemReference %s]];' % methodname src.endmethod() # src.comment('Comparison and logic tests') for methodname in ['greaterThan', 'greaterOrEquals', 'equals', 'notEquals', 'lessThan', 'lessOrEquals', 'beginsWith', 'endsWith', 'contains', 'isIn']: src.newmethod('- (<PREFIX>Reference *)%s:(id)object' % methodname) src += ' return [<PREFIX>Reference referenceWithAppData: AS_appData' src += ' aemReference: [AS_aemReference %s: object]];' % methodname src.endmethod() # for methodname in ['AND', 'OR']: src.newmethod('- (<PREFIX>Reference *)%s:(id)remainingOperands' % methodname) src += ' return [<PREFIX>Reference referenceWithAppData: AS_appData' src += ' aemReference: [AS_aemReference %s: remainingOperands]];' % methodname src.endmethod() # src.newmethod('- (<PREFIX>Reference *)NOT') src += ' return [<PREFIX>Reference referenceWithAppData: AS_appData' src += ' aemReference: [AS_aemReference NOT]];' src.endmethod() src.endclass()
895334772e731f980de83b397887c1cd4836ee61 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10961/895334772e731f980de83b397887c1cd4836ee61/objcappscript.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 67, 6180, 12, 2890, 16, 1705, 4672, 1705, 18, 2704, 7043, 344, 2668, 2404, 21308, 344, 6134, 1705, 18, 5666, 26448, 2668, 32, 6307, 34, 2189, 21308, 344, 18, 76, 6134, 1705, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 67, 6180, 12, 2890, 16, 1705, 4672, 1705, 18, 2704, 7043, 344, 2668, 2404, 21308, 344, 6134, 1705, 18, 5666, 26448, 2668, 32, 6307, 34, 2189, 21308, 344, 18, 76, 6134, 1705, 18, ...
raise Exception(msg)
raise DataError(message=msg, context=context)
def process_message_result(self, message_xml, response_xml, diagnose): doc = gxml.Document.fromxml(response_xml)
2dae73cb17e61665bc3a359c80357abb15f324ba /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10801/2dae73cb17e61665bc3a359c80357abb15f324ba/controller.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 2150, 67, 2088, 12, 2890, 16, 883, 67, 2902, 16, 766, 67, 2902, 16, 6643, 2135, 307, 4672, 997, 273, 314, 2902, 18, 2519, 18, 2080, 2902, 12, 2740, 67, 2902, 13, 2, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 2150, 67, 2088, 12, 2890, 16, 883, 67, 2902, 16, 766, 67, 2902, 16, 6643, 2135, 307, 4672, 997, 273, 314, 2902, 18, 2519, 18, 2080, 2902, 12, 2740, 67, 2902, 13, 2, -100, ...
if isnumeric(name): messages.append(eval(name))
if name[0] != "," and \ numericprog.match(name) == len(name): messages.append(string.atoi(name))
def listmessages(self): messages = [] for name in os.listdir(self.getfullname()): if isnumeric(name): messages.append(eval(name)) messages.sort() if messages: self.last = max(messages) else: self.last = 0 return messages
d0bf5f75a6327149d2b42bf17801ad6845c63d62 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/d0bf5f75a6327149d2b42bf17801ad6845c63d62/mhlib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 666, 6833, 12, 2890, 4672, 2743, 273, 5378, 364, 508, 316, 1140, 18, 1098, 1214, 12, 2890, 18, 588, 21885, 1435, 4672, 309, 508, 63, 20, 65, 480, 5753, 471, 521, 6389, 14654, 18, 1916,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 666, 6833, 12, 2890, 4672, 2743, 273, 5378, 364, 508, 316, 1140, 18, 1098, 1214, 12, 2890, 18, 588, 21885, 1435, 4672, 309, 508, 63, 20, 65, 480, 5753, 471, 521, 6389, 14654, 18, 1916,...
def addTicket(self, id, time, changetime, component, severity, priority, owner, reporter, cc, version, milestone, status, resolution,
def addTicket(self, id, time, changetime, component, severity, priority, owner, reporter, cc, version, milestone, status, resolution,
def addTicket(self, id, time, changetime, component, severity, priority, owner, reporter, cc, version, milestone, status, resolution, summary, description, keywords): c = self.db().cursor() desc = description.encode('utf-8') if PREFORMAT_COMMENTS: desc = '{{{\n%s\n}}}' % desc
63f7bce156a2ed5a10227f95c07a9ae105efaf62 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/63f7bce156a2ed5a10227f95c07a9ae105efaf62/bugzilla2trac.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 13614, 12, 2890, 16, 612, 16, 813, 16, 9435, 2374, 16, 1794, 16, 11426, 16, 4394, 16, 3410, 16, 11528, 16, 4946, 16, 1177, 16, 28664, 16, 1267, 16, 7861, 16, 4916, 16, 2477, 16,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 13614, 12, 2890, 16, 612, 16, 813, 16, 9435, 2374, 16, 1794, 16, 11426, 16, 4394, 16, 3410, 16, 11528, 16, 4946, 16, 1177, 16, 28664, 16, 1267, 16, 7861, 16, 4916, 16, 2477, 16,...
def residue_field(self, prime, names = None, check = False):
def residue_field(self, prime, names = None, check = True):
def residue_field(self, prime, names = None, check = False): """ Return the residue field of this number field at a given prime, ie $O_K / p O_K$.
46275d617668972470c10bbdc09de0e9680f2fca /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/46275d617668972470c10bbdc09de0e9680f2fca/number_field.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14765, 67, 1518, 12, 2890, 16, 17014, 16, 1257, 273, 599, 16, 866, 273, 1053, 4672, 3536, 2000, 326, 14765, 652, 434, 333, 1300, 652, 622, 279, 864, 17014, 16, 9228, 271, 51, 67, 47, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 14765, 67, 1518, 12, 2890, 16, 17014, 16, 1257, 273, 599, 16, 866, 273, 1053, 4672, 3536, 2000, 326, 14765, 652, 434, 333, 1300, 652, 622, 279, 864, 17014, 16, 9228, 271, 51, 67, 47, ...
pngpath = "/usr/lib/enigma2/python/Plugins/SystemPlugins/SkinSelector/noprev.png"
pngpath = resolveFilename(SCOPE_PLUGINS, "SystemPlugins/SkinSelector/noprev.png")
def loadPreview(self): if self["SkinList"].getCurrent() == "Default Skin": pngpath = self.root+"/prev.png" else: pngpath = self.root+self["SkinList"].getCurrent()+"/prev.png"
bff20b44ef4d4885eea730e3dce5e3c890af6083 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6652/bff20b44ef4d4885eea730e3dce5e3c890af6083/plugin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1262, 11124, 12, 2890, 4672, 309, 365, 9614, 26827, 682, 6, 8009, 588, 3935, 1435, 422, 315, 1868, 10362, 267, 6877, 14476, 803, 273, 365, 18, 3085, 9078, 19, 10001, 18, 6446, 6, 469, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1262, 11124, 12, 2890, 4672, 309, 365, 9614, 26827, 682, 6, 8009, 588, 3935, 1435, 422, 315, 1868, 10362, 267, 6877, 14476, 803, 273, 365, 18, 3085, 9078, 19, 10001, 18, 6446, 6, 469, ...
break if not module: raise Http404
return ProgramModuleObj.getFromProgModule(prog, module)
def findModuleObject(tl, call_txt, prog): modules = ProgramModule.objects.filter(main_call = call_txt, module_type = tl).select_related()[:1]
61e30bc336a6ba307f1b96efa49014c480874736 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12041/61e30bc336a6ba307f1b96efa49014c480874736/base.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 3120, 921, 12, 6172, 16, 745, 67, 5830, 16, 11243, 4672, 4381, 273, 13586, 3120, 18, 6911, 18, 2188, 12, 5254, 67, 1991, 273, 745, 67, 5830, 16, 1605, 67, 723, 273, 8332, 2934, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1104, 3120, 921, 12, 6172, 16, 745, 67, 5830, 16, 11243, 4672, 4381, 273, 13586, 3120, 18, 6911, 18, 2188, 12, 5254, 67, 1991, 273, 745, 67, 5830, 16, 1605, 67, 723, 273, 8332, 2934, ...
icon = 'images/ZWikiPage_icon.gif',
icon = 'skins/zwiki_standard/wikipage_icon.gif',
def initialize(context): """Initialize the ZWiki product. """ try: # register the wiki page class context.registerClass( ZWikiPage.ZWikiPage, #I want to change the zmi add menu.. but not the meta_type #meta_type=Defaults.PAGE_ADD_MENU_NAME, permission=Permissions.Add, icon = 'images/ZWikiPage_icon.gif', constructors = ( ZWikiPage.manage_addZWikiPageForm, ZWikiPage.manage_addZWikiPage, ), ) # allow zclass subclassing ? #context.createZClassForBase(ZWikiPage.ZWikiPage, # globals(), # nice_name=None) # and the PersistentOutline class, so it's zmi-manageable context.registerClass( OutlineSupport.PersistentOutline, permission=Permissions.manage_properties, #icon = 'images/ZWikiPage_icon.gif', constructors = ( dummyOutlineConstructor, ), ) # set up an "add wiki" menu item context.registerClass( OFS.Folder.Folder, meta_type=Defaults.WIKI_ADD_MENU_NAME, permission=Permissions.AddWiki, #icon = 'images/Wiki_icon.gif' constructors = ( Wikis.manage_addWikiForm, Wikis.manage_addWiki, Wikis.listWikis, Wikis.listZodbWikis, Wikis.listFsWikis, Wikis.addWikiFromFs, Wikis.addWikiFromZodb, ) ) # do CMF initialisation if installed try: import CMFInit CMFInit.initialize(context) except ImportError: pass # register skin as customizable dir if FileSystemSite is installed try: from Products.FileSystemSite.DirectoryView import registerDirectory registerDirectory('skins/zwiki_standard', globals()) except ImportError: pass # auto-install extra wiki templates to zodb #autoImport(context) except: import sys, traceback, string type, val, tb = sys.exc_info() sys.stderr.write(string.join(traceback.format_exception(type, val, tb), '')) del type, val, tb
fc77daddeb5084ebfb07b7b1273d97d5ff03335e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5225/fc77daddeb5084ebfb07b7b1273d97d5ff03335e/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4046, 12, 2472, 4672, 3536, 7520, 326, 2285, 25438, 3017, 18, 3536, 775, 30, 468, 1744, 326, 9050, 1363, 667, 819, 18, 4861, 797, 12, 2285, 25438, 1964, 18, 62, 25438, 1964, 16, 468, 4...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4046, 12, 2472, 4672, 3536, 7520, 326, 2285, 25438, 3017, 18, 3536, 775, 30, 468, 1744, 326, 9050, 1363, 667, 819, 18, 4861, 797, 12, 2285, 25438, 1964, 18, 62, 25438, 1964, 16, 468, 4...
server_data = { 'port': listen_port } server_data_json = json.dumps(server_data) debug('sending server_data: %s' % server_data_json) server_data_len = len(server_data_json)
def main(options, args): logfile = open('testserver.log', 'w') sys.stdout = FileMultiplexer(sys.stdout, logfile) sys.stderr = FileMultiplexer(sys.stderr, logfile) port = options.port if options.server_type == SERVER_HTTP: if options.cert: # let's make sure the cert file exists. if not os.path.isfile(options.cert): print 'specified server cert file not found: ' + options.cert + \ ' exiting...' return for ca_cert in options.ssl_client_ca: if not os.path.isfile(ca_cert): print 'specified trusted client CA file not found: ' + ca_cert + \ ' exiting...' return server = HTTPSServer(('127.0.0.1', port), TestPageHandler, options.cert, options.ssl_client_auth, options.ssl_client_ca, options.ssl_bulk_cipher) print 'HTTPS server started on port %d...' % server.server_port else: server = StoppableHTTPServer(('127.0.0.1', port), TestPageHandler) print 'HTTP server started on port %d...' % server.server_port server.data_dir = MakeDataDir() server.file_root_url = options.file_root_url listen_port = server.server_port server._device_management_handler = None elif options.server_type == SERVER_SYNC: server = SyncHTTPServer(('127.0.0.1', port), SyncPageHandler) print 'Sync HTTP server started on port %d...' % server.server_port listen_port = server.server_port # means FTP Server else: my_data_dir = MakeDataDir() # Instantiate a dummy authorizer for managing 'virtual' users authorizer = pyftpdlib.ftpserver.DummyAuthorizer() # Define a new user having full r/w permissions and a read-only # anonymous user authorizer.add_user('chrome', 'chrome', my_data_dir, perm='elradfmw') authorizer.add_anonymous(my_data_dir) # Instantiate FTP handler class ftp_handler = pyftpdlib.ftpserver.FTPHandler ftp_handler.authorizer = authorizer # Define a customized banner (string returned when client connects) ftp_handler.banner = ("pyftpdlib %s based ftpd ready." % pyftpdlib.ftpserver.__ver__) # Instantiate FTP server class and listen to 127.0.0.1:port address = ('127.0.0.1', port) server = pyftpdlib.ftpserver.FTPServer(address, ftp_handler) listen_port = server.socket.getsockname()[1] print 'FTP server started on port %d...' % listen_port # Notify the parent that we've started. (BaseServer subclasses # bind their sockets on construction.) if options.startup_pipe is not None: server_data = { 'port': listen_port } server_data_json = json.dumps(server_data) debug('sending server_data: %s' % server_data_json) server_data_len = len(server_data_json) if sys.platform == 'win32': fd = msvcrt.open_osfhandle(options.startup_pipe, 0) else: fd = options.startup_pipe startup_pipe = os.fdopen(fd, "w") # First write the data length as an unsigned 4-byte value. This # is _not_ using network byte ordering since the other end of the # pipe is on the same machine. startup_pipe.write(struct.pack('=L', server_data_len)) startup_pipe.write(server_data_json) startup_pipe.close() try: server.serve_forever() except KeyboardInterrupt: print 'shutting down server' server.stop = True
24571f4d2f036756d7661440d8db27f99d30aa5a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/24571f4d2f036756d7661440d8db27f99d30aa5a/testserver.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 2116, 16, 833, 4672, 15204, 273, 1696, 2668, 3813, 3567, 18, 1330, 2187, 296, 91, 6134, 2589, 18, 10283, 273, 1387, 8438, 92, 264, 12, 9499, 18, 10283, 16, 15204, 13, 2589, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 2116, 16, 833, 4672, 15204, 273, 1696, 2668, 3813, 3567, 18, 1330, 2187, 296, 91, 6134, 2589, 18, 10283, 273, 1387, 8438, 92, 264, 12, 9499, 18, 10283, 16, 15204, 13, 2589, 1...
'ean13': fields.char('EAN13', size=13),
'ean13': fields.char('EAN13', size=14),
def _product_partner_ref(self, cr, uid, ids, name, arg, context={}): res = {} for p in self.browse(cr, uid, ids, context): data = self._get_partner_code_name(cr, uid, [], p, context.get('partner_id', None), context) if not data['variants']: data['variants'] = p.variants if not data['code']: data['code'] = p.code if not data['name']: data['name'] = p.name res[p.id] = (data['code'] and ('['+data['code']+'] ') or '') + \ (data['name'] or '') + (data['variants'] and (' - '+data['variants']) or '') return res
5b647eb30c82b1f3eed3a549ecc08069f0858647 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/5b647eb30c82b1f3eed3a549ecc08069f0858647/product.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5896, 67, 31993, 67, 1734, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 508, 16, 1501, 16, 819, 12938, 4672, 400, 273, 2618, 364, 293, 316, 365, 18, 25731, 12, 3353, 16, 4555, 16...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5896, 67, 31993, 67, 1734, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 508, 16, 1501, 16, 819, 12938, 4672, 400, 273, 2618, 364, 293, 316, 365, 18, 25731, 12, 3353, 16, 4555, 16...
return cuneiform_to_iso(language) in get_languages()
return language in get_languages()
def has_language(language): if not _language_pattern.match(language): raise errors.InvalidLanguageId(language) return cuneiform_to_iso(language) in get_languages()
8a16a816fddc8517f0cacd18a181f1d3b5c70e99 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3685/8a16a816fddc8517f0cacd18a181f1d3b5c70e99/cuneiform.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 711, 67, 4923, 12, 4923, 4672, 309, 486, 389, 4923, 67, 4951, 18, 1916, 12, 4923, 4672, 1002, 1334, 18, 1941, 3779, 548, 12, 4923, 13, 327, 2653, 316, 336, 67, 14045, 1435, 225, 2, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 711, 67, 4923, 12, 4923, 4672, 309, 486, 389, 4923, 67, 4951, 18, 1916, 12, 4923, 4672, 1002, 1334, 18, 1941, 3779, 548, 12, 4923, 13, 327, 2653, 316, 336, 67, 14045, 1435, 225, 2, -...
if args[1] in ('enable', 'only'):
if args[1] == 'enable':
def complete_backends(self, text, line, begidx, endidx): choices = None commands = ['enable', 'disable', 'only', 'list'] available_backends_names = set(backend.name for backend in self.weboob.iter_backends()) enabled_backends_names = set(backend.name for backend in self.enabled_backends)
6bbc6f599ec3217986a558239488dbf3b67c40c3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7471/6bbc6f599ec3217986a558239488dbf3b67c40c3/repl.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3912, 67, 823, 5839, 12, 2890, 16, 977, 16, 980, 16, 16847, 3465, 16, 679, 3465, 4672, 7246, 273, 599, 4364, 273, 10228, 7589, 2187, 296, 8394, 2187, 296, 3700, 2187, 296, 1098, 3546, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3912, 67, 823, 5839, 12, 2890, 16, 977, 16, 980, 16, 16847, 3465, 16, 679, 3465, 4672, 7246, 273, 599, 4364, 273, 10228, 7589, 2187, 296, 8394, 2187, 296, 3700, 2187, 296, 1098, 3546, ...
drawable.drawOn(self.canvas, self.x, self.y - h) self.y = self.y - h
drawable.drawOn(self.canvas, self.x, y) self.y = y
def add(self, drawable): """ Draws the object at the current position. Returns 1 if successful, 0 if it would not fit. Raises a LayoutError if the object is too wide, or if it is too high for a totally empty frame, to avoid infinite loops""" w, h = drawable.wrap(self.width, self.y - self.bottomMargin - self.bottomPadding)
7687a1d030812b9f5afbac3716bb76baba123b1a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3878/7687a1d030812b9f5afbac3716bb76baba123b1a/layout.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 12, 2890, 16, 19021, 4672, 3536, 10184, 87, 326, 733, 622, 326, 783, 1754, 18, 2860, 404, 309, 6873, 16, 374, 309, 518, 4102, 486, 4845, 18, 20497, 279, 9995, 668, 309, 326, 733, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 12, 2890, 16, 19021, 4672, 3536, 10184, 87, 326, 733, 622, 326, 783, 1754, 18, 2860, 404, 309, 6873, 16, 374, 309, 518, 4102, 486, 4845, 18, 20497, 279, 9995, 668, 309, 326, 733, ...
for var in scope.variables:
allvars = scope.arguments + scope.variables for var in allvars:
def isReservedWord(word): return word in reservedWords
6077520d72be5b067136baed8ee39a393bb0f581 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5718/6077520d72be5b067136baed8ee39a393bb0f581/variableoptimizer1.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 10435, 3944, 12, 1095, 4672, 327, 2076, 316, 8735, 7363, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 10435, 3944, 12, 1095, 4672, 327, 2076, 316, 8735, 7363, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
basedoc.subclasses.append(class_doc)
if (basedoc.subclasses and basedoc.subclasses[-1].canonical_name != class_doc.canonical_name): basedoc.subclasses.append(class_doc)
def process_classdef(line, parent_docs, prev_line_doc, lineno, comments, decorators, encoding): """ The line handler for class declaration lines, such as: >>> class Foo(Bar, Baz): This handler creates and initializes a new C{VariableDoc} containing a C{ClassDoc}, adds the C{VariableDoc} to the containing namespace, and returns the C{ClassDoc}. """ # Check syntax if len(line)<3 or len(line)>4 or line[-1] != (token.OP, ':'): raise ParseError("Bad class definition line") # If we're not in a namespace, then ignore it. parent_doc = parent_docs[-1] if not isinstance(parent_doc, NamespaceDoc): return # Get the class's name class_name = parse_name(line[1]) canonical_name = DottedName(parent_doc.canonical_name, class_name) # Create the class's ClassDoc & VariableDoc. class_doc = ClassDoc(variables={}, sort_spec=[], bases=[], subclasses=[], canonical_name=canonical_name, defining_module=parent_docs[0], docs_extracted_by='parser') var_doc = VariableDoc(name=class_name, value=class_doc, is_imported=False, is_alias=False, docs_extracted_by='parser') # Add the bases. if len(line) == 4: if (not isinstance(line[2], list) or line[2][0] != (token.OP, '(')): raise ParseError("Expected base list") try: for base_name in parse_classdef_bases(line[2]): class_doc.bases.append(find_base(base_name, parent_docs)) except ParseError, e: log.warning("Unable to extract the base list for %s: %s" % (canonical_name, e)) class_doc.bases = UNKNOWN else: class_doc.bases = [] # Register ourselves as a subclass to our bases. if class_doc.bases is not UNKNOWN: for basedoc in class_doc.bases: if isinstance(basedoc, ClassDoc): basedoc.subclasses.append(class_doc) # If the preceeding comment includes a docstring, then add it. add_docstring_from_comments(class_doc, comments) # Add the VariableDoc to our container. set_variable(parent_doc, var_doc) return class_doc
eeff01f89a5ef370fe2f3cb2211b6abc8d51fa59 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3512/eeff01f89a5ef370fe2f3cb2211b6abc8d51fa59/docparser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 1106, 536, 12, 1369, 16, 982, 67, 8532, 16, 2807, 67, 1369, 67, 2434, 16, 7586, 16, 5678, 16, 19423, 16, 2688, 4672, 3536, 1021, 980, 1838, 364, 667, 8266, 2362, 16, 4123, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 1106, 536, 12, 1369, 16, 982, 67, 8532, 16, 2807, 67, 1369, 67, 2434, 16, 7586, 16, 5678, 16, 19423, 16, 2688, 4672, 3536, 1021, 980, 1838, 364, 667, 8266, 2362, 16, 4123, ...
for option in options: yield (option, self._interpolate(section, option, d[option], d))
return [(option, self._interpolate(section, option, d[option], d)) for option in options]
def items(self, section, raw=False, vars=None): """Return a list of tuples with (name, value) for each option in the section.
8c4da53afedd7b7fa49f7209582b2f61d80f457e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/8c4da53afedd7b7fa49f7209582b2f61d80f457e/ConfigParser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1516, 12, 2890, 16, 2442, 16, 1831, 33, 8381, 16, 4153, 33, 7036, 4672, 3536, 990, 279, 666, 434, 10384, 598, 261, 529, 16, 460, 13, 364, 1517, 1456, 316, 326, 2442, 18, 2, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1516, 12, 2890, 16, 2442, 16, 1831, 33, 8381, 16, 4153, 33, 7036, 4672, 3536, 990, 279, 666, 434, 10384, 598, 261, 529, 16, 460, 13, 364, 1517, 1456, 316, 326, 2442, 18, 2, -100, -10...
cmd = "python " + os.path.join(self.path, "demo", demoVariant, "generate.py") + " build" console.info("Building demo variant %s for library %s version %s" %(demoVariant, self.library.dir, self.dir) )
cmd = "python " + os.path.join(self.path, "demo", demoVariant, "generate.py") + " " + demoVersion console.info("Building %s version of demo variant %s for library %s version %s" %(demoVersion,demoVariant, self.library.dir, self.dir) )
def buildDemo(self, demoVariant = "default"): if not self.hasDemoDir: console.error("Library %s version %s has no demo folder!" %(self.library.dir, self.dir)) return cmd = "python " + os.path.join(self.path, "demo", demoVariant, "generate.py") + " build" console.info("Building demo variant %s for library %s version %s" %(demoVariant, self.library.dir, self.dir) ) rcode, output, errout = shell.execute_piped(cmd) demoBuildStatus = { "svnRevision" : self.getSvnRevision() } #some demos have a "build" job that doesn't produce a qooxdoo application demoBuildPath = os.path.join(self.path, "demo", demoVariant, "build", "script") hasScriptDir = os.path.isdir(demoBuildPath) if rcode > 0: console.error(errout) console.info(output) if not errout: errout = "Unknown error" demoBuildStatus["buildError"] = errout elif not hasScriptDir: console.warn("No script directory created!") demoBuildStatus["buildError"] = "No script directory created" else: console.info("Demo built successfully.") demoBuildStatus["buildError"] = None self.demoBuildStatus = demoBuildStatus return demoBuildStatus
08205ff42a35b27c9d693bcd5c7c3e1f883bf50c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5718/08205ff42a35b27c9d693bcd5c7c3e1f883bf50c/repository.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 27126, 12, 2890, 16, 21477, 9356, 273, 315, 1886, 6, 4672, 309, 486, 365, 18, 5332, 27126, 1621, 30, 2983, 18, 1636, 2932, 9313, 738, 87, 1177, 738, 87, 711, 1158, 21477, 3009, 4...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 27126, 12, 2890, 16, 21477, 9356, 273, 315, 1886, 6, 4672, 309, 486, 365, 18, 5332, 27126, 1621, 30, 2983, 18, 1636, 2932, 9313, 738, 87, 1177, 738, 87, 711, 1158, 21477, 3009, 4...
DEPENDS = [ env.File(LibPath(x)) for x in LIBS ]) ]
DEPENDS = [ env.File(LibPath(env['LIBSENF'])) ]) ]
def Objects(env, sources, testSources = None, LIBS = [], OBJECTS = [], no_includes = False): if type(sources) == type(()): testSources = sources[1] sources = sources[0] if type(sources) is not type([]): sources = [ sources ] objects = None if sources: obsources = [ source for source in sources if type(source) is type('') and not source.endswith('.o') ] objects = [ source for source in sources if type(source) is not type('') or source.endswith('.o') ] if obsources: objects += env.Object(obsources) if testSources: test = [ env.BoostUnitTests( target = 'test', objects = objects, test_sources = testSources, LIBS = [ '$LIBSENF' ], OBJECTS = OBJECTS, DEPENDS = [ env.File(LibPath(x)) for x in LIBS ]) ] compileTestSources = [ src for src in testSources if 'COMPILE_CHECK' in file(src).read() ] if compileTestSources: test.extend(env.CompileCheck(source = compileTestSources)) env.Alias('all_tests', test) # Hmm ... here I'd like to use an Alias instead of a file # however the alias does not seem to live in the subdirectory # which breaks 'scons -u test' env.Command(env.File('test'), test, []) #env.Alias(env.File('test'), test) return objects
276aa5f0865d87854835faa1dbdaa1602b061aa8 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2548/276aa5f0865d87854835faa1dbdaa1602b061aa8/SENFSCons.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8487, 12, 3074, 16, 5550, 16, 1842, 8628, 273, 599, 16, 8961, 12692, 273, 5378, 16, 12166, 55, 273, 5378, 16, 1158, 67, 18499, 273, 1083, 4672, 309, 618, 12, 10141, 13, 422, 618, 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, 8487, 12, 3074, 16, 5550, 16, 1842, 8628, 273, 599, 16, 8961, 12692, 273, 5378, 16, 12166, 55, 273, 5378, 16, 1158, 67, 18499, 273, 1083, 4672, 309, 618, 12, 10141, 13, 422, 618, 12, ...
pass
continue try: obj.handle_read_event() except ExitNow: raise ExitNow except: obj.handle_error()
def poll (timeout=0.0, map=None): global DEBUG if map is None: map = socket_map if map: r = []; w = []; e = [] for fd, obj in map.items(): if obj.readable(): r.append (fd) if obj.writable(): w.append (fd) r,w,e = select.select (r,w,e, timeout) if DEBUG: print r,w,e for fd in r: try: obj = map[fd] try: obj.handle_read_event() except ExitNow: raise ExitNow except: obj.handle_error() except KeyError: pass for fd in w: try: obj = map[fd] try: obj.handle_write_event() except ExitNow: raise ExitNow except: obj.handle_error() except KeyError: pass
e66f5751e5825c28880ab37cf35890958d97e274 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/e66f5751e5825c28880ab37cf35890958d97e274/asyncore.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7672, 261, 4538, 33, 20, 18, 20, 16, 852, 33, 7036, 4672, 2552, 6369, 309, 852, 353, 599, 30, 852, 273, 2987, 67, 1458, 309, 852, 30, 436, 273, 5378, 31, 341, 273, 5378, 31, 425, 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, 7672, 261, 4538, 33, 20, 18, 20, 16, 852, 33, 7036, 4672, 2552, 6369, 309, 852, 353, 599, 30, 852, 273, 2987, 67, 1458, 309, 852, 30, 436, 273, 5378, 31, 341, 273, 5378, 31, 425, 2...
if isinstance(parent, function) and parent.inherited:
if isinstance(parent, function) and (parent.inherited or not self.inhcpa(parent)):
def get_constant(self, node): parent = inode(node).parent while isinstance(parent, function) and parent.listcomp: # XXX parent = parent.parent if isinstance(parent, function) and parent.inherited: return
a550fa78ac4545c919997543742fff97adfdf579 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4470/a550fa78ac4545c919997543742fff97adfdf579/cpp.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 14384, 12, 2890, 16, 756, 4672, 982, 273, 17870, 12, 2159, 2934, 2938, 1323, 1549, 12, 2938, 16, 445, 13, 471, 982, 18, 1098, 2919, 30, 468, 11329, 982, 273, 982, 18, 2938, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 14384, 12, 2890, 16, 756, 4672, 982, 273, 17870, 12, 2159, 2934, 2938, 1323, 1549, 12, 2938, 16, 445, 13, 471, 982, 18, 1098, 2919, 30, 468, 11329, 982, 273, 982, 18, 2938, ...
scPub = idaapi.scPub
scPub = idaapi.scPub
def SegComb(segea, comb): """ Change combination of the segment @param segea: any address in the segment @param comb: new combination of the segment (one of the sc... constants) @return: success (boolean) """ return SetSegmentAttr(segea, SEGATTR_COMB, comb)
507ea15b7a89e88e413b47a9fe03b571d956c14a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4773/507ea15b7a89e88e413b47a9fe03b571d956c14a/idc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 348, 1332, 11328, 12, 307, 908, 69, 16, 3894, 4672, 3536, 7576, 10702, 434, 326, 3267, 225, 632, 891, 695, 908, 69, 30, 1281, 1758, 316, 326, 3267, 632, 891, 3894, 30, 394, 10702, 434,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 348, 1332, 11328, 12, 307, 908, 69, 16, 3894, 4672, 3536, 7576, 10702, 434, 326, 3267, 225, 632, 891, 695, 908, 69, 30, 1281, 1758, 316, 326, 3267, 632, 891, 3894, 30, 394, 10702, 434,...
uid =self.uid val = self.getvalue() val2 = { 'datas': base64.encodestring(val), 'file_size': len(val), } pool.get('ir.attachment').write(cr, uid, [self.ressource_id], val2) cr.commit()
try: val = self.getvalue() val2 = { 'datas': base64.encodestring(val), 'file_size': len(val), } pool.get('ir.attachment').write(cr, self.uid, [self.ressource_id], val2) finally: cr.commit() cr.close()
def close(self, *args, **kwargs): db,pool = pooler.get_db_and_pool(self.dbname) cr = db.cursor() uid =self.uid val = self.getvalue() val2 = { 'datas': base64.encodestring(val), 'file_size': len(val), } pool.get('ir.attachment').write(cr, uid, [self.ressource_id], val2) cr.commit() StringIO.StringIO.close(self, *args, **kwargs)
6af4fbbbed7122479be3045eb3d28d580277818d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7397/6af4fbbbed7122479be3045eb3d28d580277818d/abstracted_fs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1746, 12, 2890, 16, 380, 1968, 16, 2826, 4333, 4672, 1319, 16, 6011, 273, 2845, 264, 18, 588, 67, 1966, 67, 464, 67, 6011, 12, 2890, 18, 20979, 13, 4422, 273, 1319, 18, 9216, 1435, 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, 1746, 12, 2890, 16, 380, 1968, 16, 2826, 4333, 4672, 1319, 16, 6011, 273, 2845, 264, 18, 588, 67, 1966, 67, 464, 67, 6011, 12, 2890, 18, 20979, 13, 4422, 273, 1319, 18, 9216, 1435, 7...
print "Ship it: %s (%s)" % (review.ship_it, type(review.ship_it))
def review_draft_save(request, review_request_id, publish=False): review_request = get_object_or_404(ReviewRequest, pk=review_request_id) review, review_is_new = Review.objects.get_or_create( user=request.user, review_request=review_request, public=False, base_reply_to__isnull=True) if 'shipit' in request.POST: review.ship_it = request.POST['shipit'] in (1, "1", True, "True") print "Ship it: %s (%s)" % (review.ship_it, type(review.ship_it)) if 'body_top' in request.POST: review.body_top = request.POST['body_top'] if 'body_bottom' in request.POST: review.body_bottom = request.POST['body_bottom'] if publish: review.publish() else: review.save() siteconfig = SiteConfiguration.objects.get_current() if publish and siteconfig.get("mail_send_review_mail"): mail_review(request.user, review) return WebAPIResponse(request)
a099370a44543de21670f6af00c931058892e007 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1600/a099370a44543de21670f6af00c931058892e007/json.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10725, 67, 17153, 67, 5688, 12, 2293, 16, 10725, 67, 2293, 67, 350, 16, 3808, 33, 8381, 4672, 10725, 67, 2293, 273, 336, 67, 1612, 67, 280, 67, 11746, 12, 9159, 691, 16, 2365, 33, 16...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10725, 67, 17153, 67, 5688, 12, 2293, 16, 10725, 67, 2293, 67, 350, 16, 3808, 33, 8381, 4672, 10725, 67, 2293, 273, 336, 67, 1612, 67, 280, 67, 11746, 12, 9159, 691, 16, 2365, 33, 16...
if not is_valid_ip_address(localip): raise Exception("Local IP address is invalid.")
def openconn(desthost, destport,localip=None, localport=None,timeout=5.0): """ <Purpose> Opens a connection, returning a socket-like object <Arguments> desthost: The host to open communcations with destport: The port to use for communication localip (optional): The local ip to use for the communication localport (optional): The local port to use for communication (0 for a random port) timeout (optional): The maximum amount of time to wait to connect <Exceptions> As from socket.connect, etc. <Side Effects> None. <Returns> A socket-like object that can be used for communication. Use send, recv, and close just like you would an actual socket object in python. """ # Check that both localip and localport are given if either is specified if localip != None and localport == None or localport != None and localip == None: raise Exception("Localip and localport must be specified simultaneously.") # Set the default value of localip if not localip or localip == '0.0.0.0': localip = None else: # Check that the localip is valid if given if not is_valid_ip_address(localip): raise Exception("Local IP address is invalid.") # Assign the default value of localport if none is given. if localport == None: localport = 0 # Check the remote IP for validity if not is_valid_ip_address(desthost): raise Exception("Destination host IP address is invalid.") if not is_valid_network_port(destport): raise Exception("Destination port number must be an integer, between 1 and 65535.") # Allow the localport to be 0, which is the default. if not is_valid_network_port(localport, True): raise Exception("Local port number must be an integer, between 1 and 65535.") # Check that the timeout is a number, greater than 0 if not (type(timeout) == float or type(timeout) == int or type(timeout) == long) or timeout <= 0.0: raise Exception("Timeout parameter must be a numeric value greater than 0.") # Armon: Check if the specified local ip is allowed # this check only makes sense if the localip is specified if localip and not ip_is_allowed(localip): raise Exception, "IP '"+str(localip)+"' is not allowed." # If there is a preference, but no localip, then get one elif user_ip_interface_preferences and not localip: # Use whatever getmyip returns localip = getmyip() restrictions.assertisallowed('openconn',desthost,destport,localip,localport) # Get our start time starttime = nonportable.getruntime() # Armon: Check for any pre-existing sockets. If they are being closed, wait for them. # This will also serve to check if repy has a pre-existing socket open on this same tuple exists = True while exists and nonportable.getruntime() - starttime < timeout: # Update the status (exists, status) = nonportable.osAPI.existsOutgoingNetworkSocket(localip,localport,desthost,destport) if exists: # Check the socket state if "ESTABLISH" in status or "CLOSE_WAIT" in status: # Check if the socket is from this repy vessel handle = find_outgoing_tcp_commhandle(localip, localport, desthost, destport) message = "Network socket is in use by an external process!" if handle != None: message = " Duplicate handle exists with name: "+str(handle) raise Exception, message else: # Wait for socket cleanup time.sleep(RETRY_INTERVAL) else: # Check if a socket exists still and we timed out if exists: raise Exception, "Timed out checking for socket cleanup!" if localport: nanny.tattle_check('connport',localport) handle = idhelper.getuniqueid() nanny.tattle_add_item('outsockets',handle) try: s = get_real_socket(localip,localport) # add the socket to the comminfo table comminfo[handle] = {'type':'TCP','remotehost':None, 'remoteport':None,'localip':localip,'localport':localport,'socket':s, 'outgoing':True} except: # the socket wasn't passed to the user prog... nanny.tattle_remove_item('outsockets',handle) raise try: thissock = emulated_socket(handle) # We set a timeout before we connect. This allows us to timeout slow # connections... oldtimeout = comminfo[handle]['socket'].gettimeout() # Set the new timeout comminfo[handle]['socket'].settimeout(timeout) # Store exceptions until we exit the loop, default to timed out # in case we are given a very small timeout connect_exception = Exception("Connection timed out!") # Ignore errors and retry if we have not yet reached the timeout while nonportable.getruntime() - starttime < timeout: try: comminfo[handle]['socket'].connect((desthost,destport)) break except Exception,e: # Check if this is recoverable, only continue if it is if not is_recoverable_network_exception(e): raise else: # Store the exception connect_exception = e # Sleep a bit, avoid excessive iterations of the loop time.sleep(0.2) else: # Raise any exception that was raised if connect_exception != None: raise connect_exception comminfo[handle]['remotehost']=desthost comminfo[handle]['remoteport']=destport except: cleanup(handle) raise else: # and restore the old timeout... comminfo[handle]['socket'].settimeout(oldtimeout) return thissock
86d29537aa93ae6d463ba0845d7be285b0ad21e5 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7995/86d29537aa93ae6d463ba0845d7be285b0ad21e5/emulcomm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1696, 4646, 12, 10488, 2564, 16, 1570, 655, 16, 3729, 625, 33, 7036, 16, 1191, 655, 33, 7036, 16, 4538, 33, 25, 18, 20, 4672, 3536, 411, 10262, 4150, 34, 6066, 773, 279, 1459, 16, 57...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1696, 4646, 12, 10488, 2564, 16, 1570, 655, 16, 3729, 625, 33, 7036, 16, 1191, 655, 33, 7036, 16, 4538, 33, 25, 18, 20, 4672, 3536, 411, 10262, 4150, 34, 6066, 773, 279, 1459, 16, 57...
coherence = self.CoherenceStump(transcoder=failing_config)
coherence = self.CoherenceStump(transcoder=self.failing_config)
def test_placeholdercheck_in_config(self): # this pipeline does not contain the '%s' placeholder and because # of that should not be created failing_config = {'name': 'failing', 'pipeline': 'wrong', 'type': 'process', 'target': 'yay'}
57524504b476672a4f25a706269d224fefb63a33 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11626/57524504b476672a4f25a706269d224fefb63a33/test_transcoder.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 12988, 1893, 67, 267, 67, 1425, 12, 2890, 4672, 468, 333, 5873, 1552, 486, 912, 326, 1995, 87, 11, 6695, 471, 2724, 468, 434, 716, 1410, 486, 506, 2522, 21311, 67, 1425, 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, 1842, 67, 12988, 1893, 67, 267, 67, 1425, 12, 2890, 4672, 468, 333, 5873, 1552, 486, 912, 326, 1995, 87, 11, 6695, 471, 2724, 468, 434, 716, 1410, 486, 506, 2522, 21311, 67, 1425, 273,...
template = 'myfedora.widgets.rsswidget'
template = 'myfedora.templates.rsswidget'
def refresh(self, force=False): if not force and (datetime.utcnow() - self.lastPoll) < self.pollInterval: log.debug("Skipping refresh") return log.debug("Refreshing entries") newEntries = [] regex = re.compile('<img src="(.*)" alt="" />') feed = feedparser.parse(self.url) for entry in feed['entries'][:5]: # FIXME: use config info newEntries.append({ 'link' : entry['link'], 'title' : entry['title'], 'image' : regex.match(entry['summary']).group(1) }) for entry in range(0, len(newEntries)): if newEntries[entry].link != self[entry].link: self[:] self.extend(newEntries) self.lastChange = datetime.utcnow() break self.lastPoll = datetime.utcnow()
975c82a813e6624958420df1ead20f4aee12e3f5 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12732/975c82a813e6624958420df1ead20f4aee12e3f5/controllers.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4460, 12, 2890, 16, 2944, 33, 8381, 4672, 309, 486, 2944, 471, 261, 6585, 18, 17892, 3338, 1435, 300, 365, 18, 2722, 19085, 13, 411, 365, 18, 13835, 4006, 30, 613, 18, 4148, 2932, 1687...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4460, 12, 2890, 16, 2944, 33, 8381, 4672, 309, 486, 2944, 471, 261, 6585, 18, 17892, 3338, 1435, 300, 365, 18, 2722, 19085, 13, 411, 365, 18, 13835, 4006, 30, 613, 18, 4148, 2932, 1687...
hover_iter = get_iter_at_event(self, event)
hover_iter = get_iter_at_coords(self, event.x, event.y)
def mouseup(self, widget, event): if event.button == 1 and not self.get_buffer().get_selection_bounds(): hover_iter = get_iter_at_event(self, event) if not hover_iter.ends_line(): c_data = get_event_at_iter(self, hover_iter)
dc48d82f65e7144c5c80ba3d6e855bd294ed3607 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10693/dc48d82f65e7144c5c80ba3d6e855bd294ed3607/widgets.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7644, 416, 12, 2890, 16, 3604, 16, 871, 4672, 309, 871, 18, 5391, 422, 404, 471, 486, 365, 18, 588, 67, 4106, 7675, 588, 67, 10705, 67, 10576, 13332, 15758, 67, 2165, 273, 336, 67, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7644, 416, 12, 2890, 16, 3604, 16, 871, 4672, 309, 871, 18, 5391, 422, 404, 471, 486, 365, 18, 588, 67, 4106, 7675, 588, 67, 10705, 67, 10576, 13332, 15758, 67, 2165, 273, 336, 67, 2...
self.showAllCB = OWGUI.checkBox(self.addRemoveGroup, self, "showAllAttributes", "Show all", callback = self.cbShowAllAttributes)
self.showAllCB = OWGUI.checkBox(self.addRemoveGroup, self, "showAllAttributes", "Show all", callback = self.cbShowAllAttributes)
def createShowHiddenLists(self, placementTab, callback = None): self.updateCallbackFunction = callback self.shownAttributes = [] self.selectedShown = [] self.hiddenAttributes = [] self.selectedHidden = [] self.shownAttribsGroup = OWGUI.widgetBox(placementTab, " Shown attributes " ) self.addRemoveGroup = OWGUI.widgetBox(placementTab, 1, orientation = "horizontal" ) self.hiddenAttribsGroup = OWGUI.widgetBox(placementTab, " Hidden attributes ")
fab79c43e88f76ee565e96dcdc9f46e83cb68d40 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6366/fab79c43e88f76ee565e96dcdc9f46e83cb68d40/OWVisWidget.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 5706, 9345, 7432, 12, 2890, 16, 12607, 5661, 16, 1348, 273, 599, 4672, 365, 18, 2725, 2428, 2083, 273, 1348, 365, 18, 674, 995, 2498, 273, 5378, 365, 18, 8109, 27042, 273, 5378, 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, 752, 5706, 9345, 7432, 12, 2890, 16, 12607, 5661, 16, 1348, 273, 599, 4672, 365, 18, 2725, 2428, 2083, 273, 1348, 365, 18, 674, 995, 2498, 273, 5378, 365, 18, 8109, 27042, 273, 5378, 3...
('Build Atoms', self.w.toolsAtomStart),
('Build Atoms', self.w.toolsBuildAtoms),
def makeMenus(self): # menus modified by bruce 041103, 041217 self.Menu_spec = [ ('Stretch', self.o.assy.Stretch), ('Delete Del', self.o.assy.kill), ('Hide', self.o.assy.Hide), None, # bruce 041217 added the following (rather than just Done) #bruce 051213 added 'checked' and reordered these to conform with toolbar. ('Select Chunks', self.w.toolsSelectMolecules), ('Select Atoms', self.w.toolsSelectAtoms), ('Move Chunks', self.w.toolsMoveMolecule, 'checked'), ('Build Atoms', self.w.toolsAtomStart), ]
cd99d16fde5e5457d06ea70beb0a7bce94b86e2a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/cd99d16fde5e5457d06ea70beb0a7bce94b86e2a/modifyMode.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 29755, 12, 2890, 4672, 468, 21374, 4358, 635, 5186, 3965, 374, 9803, 23494, 16, 16486, 2138, 4033, 225, 365, 18, 4599, 67, 2793, 273, 306, 7707, 510, 20783, 2187, 365, 18, 83, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 29755, 12, 2890, 4672, 468, 21374, 4358, 635, 5186, 3965, 374, 9803, 23494, 16, 16486, 2138, 4033, 225, 365, 18, 4599, 67, 2793, 273, 306, 7707, 510, 20783, 2187, 365, 18, 83, 18, ...
import trac.Browser import trac.Changeset
import trac.versioncontrol.web_ui.browser import trac.versioncontrol.web_ui.changeset
def get_db_cnx(self): return db
27dbba3f412f95f19469e741d91d517c2c9a95b7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/27dbba3f412f95f19469e741d91d517c2c9a95b7/formatter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 1966, 67, 10305, 92, 12, 2890, 4672, 327, 1319, 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, 336, 67, 1966, 67, 10305, 92, 12, 2890, 4672, 327, 1319, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
def __init__(data = None)
def __init__(data = None):
def __init__(data = None) if data == None: quickfix.StringField.__init__(self, 579) else quickfix.StringField.__init__(self, 579, data)
484890147d4b23aac4b9d0e85e84fceab7e137c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8819/484890147d4b23aac4b9d0e85e84fceab7e137c3/quickfix_fields.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 892, 273, 599, 4672, 309, 501, 422, 599, 30, 9549, 904, 18, 780, 974, 16186, 2738, 972, 12, 2890, 16, 1381, 7235, 13, 469, 9549, 904, 18, 780, 974, 16186, 2738, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 892, 273, 599, 4672, 309, 501, 422, 599, 30, 9549, 904, 18, 780, 974, 16186, 2738, 972, 12, 2890, 16, 1381, 7235, 13, 469, 9549, 904, 18, 780, 974, 16186, 2738, ...
solr_select += ''.join('&fq=%s:"%s"' % (k, l) for l in v if l)
solr_select += ''.join('&fq=%s:"%s"' % (k, url_quote(l)) for l in v if l)
def run_solr_query(param = {}, rows=100, page=1, sort=None): q_list = [] if 'q' in param: q_param = param['q'].strip() else: q_param = None offset = rows * (page - 1) if q_param: if q_param == '*:*' or re_fields.match(q_param): q_list.append(q_param) else: isbn = read_isbn(q_param) if isbn: q_list.append('isbn:(%s)' % isbn) else: q_list.append('(' + ' OR '.join('%s:(%s)' % (f, q_param) for f in search_fields) + ')') else: if 'author' in param: v = param['author'].strip() m = re_author_key.search(v) if m: # FIXME: 'OL123A OR OL234A' q_list.append('author_key:(' + m.group(1) + ')') else: q_list.append('author_name:(' + v + ')') check_params = ['title', 'publisher', 'isbn', 'oclc', 'lccn', 'contribtor'] q_list += ['%s:(%s)' % (k, param[k]) for k in check_params if k in param] q = url_quote(' AND '.join(q_list)) solr_select = solr_select_url + "?version=2.2&q.op=AND&q=%s&start=%d&rows=%d&fl=key,author_name,author_key,title,edition_count,ia,has_fulltext,first_publish_year,cover_edition_key&qt=standard&wt=standard" % (q, offset, rows) solr_select += "&facet=true&" + '&'.join("facet.field=" + f for f in facet_fields) for k in 'has_fulltext': if k not in param: continue v = param[k].lower() if v not in ('true', 'false'): del param[k] param[k] == v solr_select += '&fq=%s:%s' % (k, v) for k in facet_list_fields: if k == 'author_facet': k = 'author_key' if k not in param: continue v = param[k] solr_select += ''.join('&fq=%s:"%s"' % (k, l) for l in v if l) if sort: solr_select += "&sort=" + url_quote(sort) reply = urllib.urlopen(solr_select) print solr_select return (parse(reply).getroot(), solr_select, q_list)
f4e34b1197ff4c418363c5b6288cf791d871aec8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3913/f4e34b1197ff4c418363c5b6288cf791d871aec8/code.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 67, 22495, 67, 2271, 12, 891, 273, 10615, 2595, 33, 6625, 16, 1363, 33, 21, 16, 1524, 33, 7036, 4672, 1043, 67, 1098, 273, 5378, 309, 296, 85, 11, 316, 579, 30, 1043, 67, 891, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 67, 22495, 67, 2271, 12, 891, 273, 10615, 2595, 33, 6625, 16, 1363, 33, 21, 16, 1524, 33, 7036, 4672, 1043, 67, 1098, 273, 5378, 309, 296, 85, 11, 316, 579, 30, 1043, 67, 891, ...
def notify_user(obj):
def notify_user(obj, event):
def notify_user(obj): """Tell users when a comment has been added. This method composes and sends emails to all users that have added a comment to this conversation and enabled user notification. This requires the user_notification setting to be enabled in the discussion control panel. """ # Check if user notification is enabled registry = queryUtility(IRegistry) settings = registry.forInterface(IDiscussionSettings) if not settings.user_notification_enabled: return # Get informations that are necessary to send an email mail_host = getToolByName(obj, 'MailHost') portal_url = getToolByName(obj, 'portal_url') portal = portal_url.getPortalObject() sender = portal.getProperty('email_from_address') # Check if a sender address is available if not sender: return # Compose and send emails to all users that have add a comment to this # conversation and enabled author_notification. conversation = aq_parent(obj) content_object = aq_parent(conversation) for comment in conversation.getComments(): if obj != comment and \ comment.author_notification and comment.author_email: subject = "A comment has been posted." message = USER_NOTIFICATION_MESSAGE % (obj.title, content_object.absolute_url(),) mail_host.send(message, comment.author_email, sender, subject)
e12d19a6e98fd1764e650d219a4c9891e5fded88 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12197/e12d19a6e98fd1764e650d219a4c9891e5fded88/comment.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5066, 67, 1355, 12, 2603, 16, 871, 4672, 3536, 21009, 3677, 1347, 279, 2879, 711, 2118, 3096, 18, 225, 1220, 707, 532, 10522, 471, 9573, 14255, 358, 777, 3677, 716, 1240, 3096, 279, 2879...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5066, 67, 1355, 12, 2603, 16, 871, 4672, 3536, 21009, 3677, 1347, 279, 2879, 711, 2118, 3096, 18, 225, 1220, 707, 532, 10522, 471, 9573, 14255, 358, 777, 3677, 716, 1240, 3096, 279, 2879...