rem
stringlengths
2
226k
add
stringlengths
0
227k
context
stringlengths
8
228k
meta
stringlengths
156
215
input_ids
list
attention_mask
list
labels
list
below = obj.below_get() while below != self["above"]:
above = self["above"] if above: below = obj.below_get() while below != above: obj.restack_below() below = obj.below_get()
def apply_to(self, obj):
63012352cf4b27edeed99520103b8535f70dbb54 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12343/63012352cf4b27edeed99520103b8535f70dbb54/objects_data.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2230, 67, 869, 12, 2890, 16, 1081, 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, 2230, 67, 869, 12, 2890, 16, 1081, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
P += arrow((pos[u][0],pos[u][1]),(pos[v][0],pos[v][1]),rgbcolor=(0,0,0))
P += arrow((pos[u][0],pos[u][1]),(pos[v][0],pos[v][1]), **edge_style)
def plot(self, pos=None, layout=None, vertex_labels=True, edge_labels=False, vertex_size=200, graph_border=False, vertex_colors=None, partition=None, edge_colors=None, scaling_term=0.05, iterations=50, loop_size=.1, talk=False, color_by_label=False, heights=None): """ Returns a graphics object representing the (di)graph. INPUT: pos -- an optional positioning dictionary layout -- what kind of layout to use, takes precedence over pos 'circular' -- plots the graph with vertices evenly distributed on a circle 'spring' -- uses the traditional spring layout, using the graph's current positions as initial positions vertex_labels -- whether to print vertex labels edge_labels -- whether to print edge labels. By default, False, but if True, the result of str(l) is printed on the edge for each label l. Labels equal to None are not printed. vertex_size -- size of vertices displayed graph_border -- whether to include a box around the graph vertex_colors -- optional dictionary to specify vertex colors: each key is a color recognizable by matplotlib, and each corresponding entry is a list of vertices. If a vertex is not listed, it looks invisible on the resulting plot (it doesn't get drawn). edge_colors -- a dictionary specifying edge colors: each key is a color recognized by matplotlib, and each entry is a list of edges. partition -- a partition of the vertex set. if specified, plot will show each cell in a different color. vertex_colors takes precedence. scaling_term -- default is 0.05. if vertices are getting chopped off, increase; if graph is too small, decrease. should be positive, but values much bigger than 1/8 won't be useful unless the vertices are huge talk -- if true, prints large vertices with white backgrounds so that labels are legible on slides iterations -- how many iterations of the spring layout algorithm to go through, if applicable color_by_label -- if True, color edges by their labels heights -- if specified, this is a dictionary from a set of floating point heights to a set of vertices EXAMPLES: sage: from math import sin, cos, pi sage: P = graphs.PetersenGraph() sage: d = {'#FF0000':[0,5], '#FF9900':[1,6], '#FFFF00':[2,7], '#00FF00':[3,8], '#0000FF':[4,9]} sage: pos_dict = {} sage: for i in range(5): ... x = float(cos(pi/2 + ((2*pi)/5)*i)) ... y = float(sin(pi/2 + ((2*pi)/5)*i)) ... pos_dict[i] = [x,y] ... sage: for i in range(10)[5:]: ... x = float(0.5*cos(pi/2 + ((2*pi)/5)*i)) ... y = float(0.5*sin(pi/2 + ((2*pi)/5)*i)) ... pos_dict[i] = [x,y] ... sage: pl = P.plot(pos=pos_dict, vertex_colors=d) sage: pl.show() sage: C = graphs.CubeGraph(8) sage: P = C.plot(vertex_labels=False, vertex_size=0, graph_border=True) sage: P.show() sage: G = graphs.HeawoodGraph() sage: for u,v,l in G.edges(): ... G.set_edge_label(u,v,'(' + str(u) + ',' + str(v) + ')') sage: G.plot(edge_labels=True).show() sage: D = DiGraph( { 0: [1, 10, 19], 1: [8, 2], 2: [3, 6], 3: [19, 4], 4: [17, 5], 5: [6, 15], 6: [7], 7: [8, 14], 8: [9], 9: [10, 13], 10: [11], 11: [12, 18], 12: [16, 13], 13: [14], 14: [15], 15: [16], 16: [17], 17: [18], 18: [19], 19: []} ) sage: for u,v,l in D.edges(): ... D.set_edge_label(u,v,'(' + str(u) + ',' + str(v) + ')') sage: D.plot(edge_labels=True, layout='circular').show()
7524291de527a0df574d754449e74a613f7db457 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/7524291de527a0df574d754449e74a613f7db457/graph.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3207, 12, 2890, 16, 949, 33, 7036, 16, 3511, 33, 7036, 16, 5253, 67, 5336, 33, 5510, 16, 3591, 67, 5336, 33, 8381, 16, 5253, 67, 1467, 33, 6976, 16, 2667, 67, 8815, 33, 8381, 16, 5...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3207, 12, 2890, 16, 949, 33, 7036, 16, 3511, 33, 7036, 16, 5253, 67, 5336, 33, 5510, 16, 3591, 67, 5336, 33, 8381, 16, 5253, 67, 1467, 33, 6976, 16, 2667, 67, 8815, 33, 8381, 16, 5...
filesys.chmod(temp_fname, 0666 & config.umask)
filesys.chmod(temp_fname, self.mode)
def save(self, session): fd, temp_fname = tempfile.mkstemp(suffix='.tmp', dir=self.path) f = os.fdopen(fd, 'wb') try: dump(dict(session), f, HIGHEST_PROTOCOL) finally: f.close() filesys.chmod(temp_fname, 0666 & config.umask) # relax restrictive mode from mkstemp fname = self.get_session_filename(session.sid) # this is either atomic or happening with real locks set: filesys.rename(temp_fname, fname)
e42433dfef2f71b42210790866823ee481f53888 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/888/e42433dfef2f71b42210790866823ee481f53888/session.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1923, 12, 2890, 16, 1339, 4672, 5194, 16, 1906, 67, 12749, 273, 13275, 18, 24816, 19781, 84, 12, 8477, 2218, 18, 5645, 2187, 1577, 33, 2890, 18, 803, 13, 284, 273, 1140, 18, 8313, 3190...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1923, 12, 2890, 16, 1339, 4672, 5194, 16, 1906, 67, 12749, 273, 13275, 18, 24816, 19781, 84, 12, 8477, 2218, 18, 5645, 2187, 1577, 33, 2890, 18, 803, 13, 284, 273, 1140, 18, 8313, 3190...
csumtag = '%s-%s' % (self.hdr['name'] , self.hdr[rpm.RPMTAG_SHA1HEADER])
key = "".join([hex(ord(x))[2:].zfill(2) for x in tuple(self.hdr[rpm.RPMTAG_SIGMD5])]) csumtag = '%s-%s' % (self.hdr['name'] , key)
def doChecksumCache(self, fo): """return a checksum for a package: - check if the checksum cache is enabled if not - return the checksum if so - check to see if it has a cache file if so, open it and return the first line's contents if not, grab the checksum and write it to a file for this pkg """ if not self.options['cache']: return getChecksum(self.options['sumtype'], fo) csumtag = '%s-%s' % (self.hdr['name'] , self.hdr[rpm.RPMTAG_SHA1HEADER]) csumfile = '%s/%s' % (self.options['cachedir'], csumtag) if os.path.exists(csumfile) and self.mtime <= os.stat(csumfile)[8]: csumo = open(csumfile, 'r') checksum = csumo.readline() csumo.close() else: checksum = getChecksum(self.options['sumtype'], fo) csumo = open(csumfile, 'w') csumo.write(checksum) csumo.close() return checksum
97dd294de48c01e2def199fa5cccf9b94aea5e7d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9557/97dd294de48c01e2def199fa5cccf9b94aea5e7d/dumpMetadata.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 10723, 1649, 12, 2890, 16, 18261, 4672, 3536, 2463, 279, 6697, 364, 279, 2181, 30, 300, 866, 309, 326, 6697, 1247, 353, 3696, 309, 486, 300, 327, 326, 6697, 309, 1427, 300, 866, 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, 741, 10723, 1649, 12, 2890, 16, 18261, 4672, 3536, 2463, 279, 6697, 364, 279, 2181, 30, 300, 866, 309, 326, 6697, 1247, 353, 3696, 309, 486, 300, 327, 326, 6697, 309, 1427, 300, 866, 3...
x=x+1
x=x-1
def unmerge(category,pkgname): if os.path.isdir(os.path.normpath(root+"var/db/pkg/"+category+"/"+pkgname)): if root=="/": print "Unmerging",pkgname+"..." else: print "Unmerging",pkgname,"from",root+"..." print else: print pkgname,"not installed" return try: contents=open(os.path.normpath(root+"var/db/pkg/"+category+"/"+pkgname+"/CONTENTS")) except: print "Error -- could not open CONTENTS file for", pkgname+". Aborting." return pkgfiles={} for line in contents.readlines(): mydat=string.split(line) # we do this so we can remove from non-root filesystems # (use the ROOT var to allow maintenance on other partitions) mydat[1]=os.path.normpath(root+mydat[1][1:]) if mydat[0]=="obj": #format: type, mtime, md5sum pkgfiles[string.join(mydat[1:-2]," ")]=[mydat[0], mydat[-1], mydat[-2]] elif mydat[0]=="dir": #format: type pkgfiles[string.join(mydat[1:])]=[mydat[0] ] elif mydat[0]=="sym": #format: type, mtime, dest x=len(mydat)-1 splitter=-1 while(x>=0): if mydat[x]=="->": splitter=x break x=x+1 if splitter==-1: #invalid symlink format print "CONTENTS symlink error!" return pkgfiles[string.join(mydat[1:splitter]," ")]=[mydat[0], mydat[-1], string.join(mydat[(splitter+1):-1]," ")] elif mydat[0]=="dev": #format: type pkgfiles[string.join(mydat[1:]," ")]=[mydat[0] ] elif mydat[0]=="fif": #format: type pkgfiles[string.join(mydat[1:]," ")]=[mydat[0]] else: print "Error -- CONTENTS file for", pkgname, "is corrupt." print ">>> "+line return # we don't want to automatically remove the ebuild file listed # in the CONTENTS file. We'll do after everything else has # completed successfully. myebuildfile=os.path.normpath(root+"var/db/pkg/"+category+"/"+pkgname+"/"+pkgname+".ebuild") if pkgfiles.has_key(myebuildfile): del pkgfiles[myebuildfile] mykeys=pkgfiles.keys() mykeys.sort() mykeys.reverse() #prerm script pkgscript("prerm",myebuildfile) for obj in mykeys: obj=os.path.normpath(obj) if not os.path.islink(obj): #we skip this if we're dealing with a symlink #because os.path.exists() will operate on the #link target rather than the link itself. if not os.path.exists(obj): print "--- !found", pkgfiles[obj][0], obj continue if (pkgfiles[obj][0] not in ("dir","fif","dev")) and (getmtime(obj) != pkgfiles[obj][1]): print "--- !mtime", pkgfiles[obj][0], obj continue if pkgfiles[obj][0]=="dir": if not os.path.isdir(obj): print "--- !dir ","dir", obj continue if os.listdir(obj): print "--- !empty","dir", obj continue os.rmdir(obj) print "<<< ","dir",obj elif pkgfiles[obj][0]=="sym": if not os.path.islink(obj): print "--- !sym ","sym", obj continue mydest=os.readlink(obj) if os.path.exists(os.path.normpath(root+mydest)): if mydest != pkgfiles[obj][2]: print "--- !destn","sym", obj continue os.unlink(obj) print "<<< ","sym",obj elif pkgfiles[obj][0]=="obj": if not os.path.isfile(obj): print "--- !obj ","obj", obj continue mymd5=md5(obj) if mymd5 != string.upper(pkgfiles[obj][2]): print "--- !md5 ","obj", obj continue os.unlink(obj) print "<<< ","obj",obj elif pkgfiles[obj][0]=="fif": if not isfifo(obj): print "--- !fif ","fif", obj continue os.unlink(obj) print "<<< ","fif",obj elif pkgfiles[obj][0]=="dev": if not isdev(obj): print "--- !dev ","dev", obj continue os.unlink(obj) print "<<< ","dev",obj #postrm script pkgscript("postrm",myebuildfile) #recursive cleanup for thing in os.listdir(root+"var/db/pkg/"+category+"/"+pkgname): os.unlink(root+"var/db/pkg/"+category+"/"+pkgname+"/"+thing) os.rmdir(root+"var/db/pkg/"+category+"/"+pkgname) print if root=="/": print pkgname,"unmerged." else: print pkgname,"unmerged from",root+"."
84eb471080c1d275a7f28e41ac0fcbe7f54eed2b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2807/84eb471080c1d275a7f28e41ac0fcbe7f54eed2b/portage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 640, 2702, 12, 4743, 16, 10657, 529, 4672, 309, 1140, 18, 803, 18, 291, 1214, 12, 538, 18, 803, 18, 7959, 803, 12, 3085, 9078, 1401, 19, 1966, 19, 10657, 4898, 15, 4743, 9078, 4898, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 640, 2702, 12, 4743, 16, 10657, 529, 4672, 309, 1140, 18, 803, 18, 291, 1214, 12, 538, 18, 803, 18, 7959, 803, 12, 3085, 9078, 1401, 19, 1966, 19, 10657, 4898, 15, 4743, 9078, 4898, ...
ns.resolve_populate(state.caller_root, proc.root_node, "/usr") ns.resolve_populate(state.caller_root, proc.root_node, "/dev/null", flags=ns.FS_OBJECT_RW)
def usage(): print """
940312746620f92eb1ada1f7676f9643fe4d4533 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1008/940312746620f92eb1ada1f7676f9643fe4d4533/pola-run.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4084, 13332, 1172, 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, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4084, 13332, 1172, 3536, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
'login': 'login_action',
'login': 'loginAction',
def content(self): ''' Callback used by the page template to render the content of the page.
b1bc7f9506cbf5af8a01c9e7e59b1950c097e889 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/b1bc7f9506cbf5af8a01c9e7e59b1950c097e889/client.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 913, 12, 2890, 4672, 9163, 8444, 1399, 635, 326, 1363, 1542, 358, 1743, 326, 913, 434, 326, 1363, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 913, 12, 2890, 4672, 9163, 8444, 1399, 635, 326, 1363, 1542, 358, 1743, 326, 913, 434, 326, 1363, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
uri = os.path.join(url, absattr(ob.id))
uri = urljoin(url, absattr(ob.id))
def apply(self, obj, token, user, url=None, result=None, top=1): if result is None: result = StringIO() url = urlfix(url, 'DELETE') url = urlbase(url) iscol = isDavCollection(obj) errmsg = None parent = aq_parent(obj)
03fb4e1b6eb485522ed0478cd95ea0c2a601808d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/03fb4e1b6eb485522ed0478cd95ea0c2a601808d/davcmds.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2230, 12, 2890, 16, 1081, 16, 1147, 16, 729, 16, 880, 33, 7036, 16, 563, 33, 7036, 16, 1760, 33, 21, 4672, 309, 563, 353, 599, 30, 563, 273, 15777, 1435, 880, 273, 880, 904, 12, 71...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2230, 12, 2890, 16, 1081, 16, 1147, 16, 729, 16, 880, 33, 7036, 16, 563, 33, 7036, 16, 1760, 33, 21, 4672, 309, 563, 353, 599, 30, 563, 273, 15777, 1435, 880, 273, 880, 904, 12, 71...
w = coord()
w = Coord()
def setup(): "Prepare to play, set up cosmos." w = coord() # Decide how many of everything if choose(): return # frozen game # Prepare the Enterprise game.alldone = game.gamewon = game.shldchg = game.shldup = False game.ship = 'E' game.state.crew = FULLCREW game.energy = game.inenrg = 5000.0 game.shield = game.inshld = 2500.0 game.inlsr = 4.0 game.lsupres = 4.0 game.quadrant = randplace(GALSIZE) game.sector = randplace(QUADSIZE) game.torps = game.intorps = 10 game.nprobes = randrange(2, 5) game.warpfac = 5.0 for i in range(NDEVICES): game.damage[i] = 0.0 # Set up assorted game parameters game.battle = coord() game.state.date = game.indate = 100.0 * randreal(20, 51) game.nkinks = game.nhelp = game.casual = game.abandoned = 0 game.iscate = game.resting = game.imine = game.icrystl = game.icraft = False game.isatb = game.state.nplankl = 0 game.state.starkl = game.state.basekl = 0 game.iscraft = "onship" game.landed = False game.alive = True # Starchart is functional but we've never seen it game.lastchart = FOREVER # Put stars in the galaxy game.instar = 0 for i in range(GALSIZE): for j in range(GALSIZE): k = randrange(1, QUADSIZE**2/10+1) game.instar += k game.state.galaxy[i][j].stars = k # Locate star bases in galaxy for i in range(game.inbase): while True: while True: w = randplace(GALSIZE) if not game.state.galaxy[w.i][w.j].starbase: break contflag = False # C version: for (j = i-1; j > 0; j--) # so it did them in the opposite order. for j in range(1, i): # Improved placement algorithm to spread out bases distq = (w - game.state.baseq[j]).distance() if distq < 6.0*(BASEMAX+1-game.inbase) and withprob(0.75): contflag = True if game.idebug: prout("=== Abandoning base #%d at %s" % (i, w)) break elif distq < 6.0 * (BASEMAX+1-game.inbase): if game.idebug: prout("=== Saving base #%d, close to #%d" % (i, j)) if not contflag: break game.state.baseq.append(w) game.state.galaxy[w.i][w.j].starbase = game.state.chart[w.i][w.j].starbase = True # Position ordinary Klingon Battle Cruisers krem = game.inkling klumper = 0.25*game.skill*(9.0-game.length)+1.0 if klumper > MAXKLQUAD: klumper = MAXKLQUAD while True: r = randreal() klump = (1.0 - r*r)*klumper if klump > krem: klump = krem krem -= klump while True: w = randplace(GALSIZE) if not game.state.galaxy[w.i][w.j].supernova and \ game.state.galaxy[w.i][w.j].klingons + klump <= MAXKLQUAD: break game.state.galaxy[w.i][w.j].klingons += int(klump) if krem <= 0: break # Position Klingon Commander Ships for i in range(game.incom): while True: w = randplace(GALSIZE) if not welcoming(w) or w in game.state.kcmdr: continue if (game.state.galaxy[w.i][w.j].klingons or withprob(0.25)): break game.state.galaxy[w.i][w.j].klingons += 1 game.state.kcmdr.append(w) # Locate planets in galaxy for i in range(game.inplan): while True: w = randplace(GALSIZE) if game.state.galaxy[w.i][w.j].planet == None: break new = planet() new.quadrant = w new.crystals = "absent" if (game.options & OPTION_WORLDS) and i < NINHAB: new.pclass = "M" # All inhabited planets are class M new.crystals = "absent" new.known = "known" new.name = systnames[i] new.inhabited = True else: new.pclass = ("M", "N", "O")[randrange(0, 3)] if withprob(0.33): new.crystals = "present" new.known = "unknown" new.inhabited = False game.state.galaxy[w.i][w.j].planet = new game.state.planets.append(new) # Locate Romulans for i in range(game.state.nromrem): w = randplace(GALSIZE) game.state.galaxy[w.i][w.j].romulans += 1 # Place the Super-Commander if needed if game.state.nscrem > 0: while True: w = randplace(GALSIZE) if welcoming(w): break game.state.kscmdr = w game.state.galaxy[w.i][w.j].klingons += 1 # Initialize times for extraneous events schedule(FSNOVA, expran(0.5 * game.intime)) schedule(FTBEAM, expran(1.5 * (game.intime / len(game.state.kcmdr)))) schedule(FSNAP, randreal(1.0, 2.0)) # Force an early snapshot schedule(FBATTAK, expran(0.3*game.intime)) unschedule(FCDBAS) if game.state.nscrem: schedule(FSCMOVE, 0.2777) else: unschedule(FSCMOVE) unschedule(FSCDBAS) unschedule(FDSPROB) if (game.options & OPTION_WORLDS) and game.skill >= SKILL_GOOD: schedule(FDISTR, expran(1.0 + game.intime)) else: unschedule(FDISTR) unschedule(FENSLV) unschedule(FREPRO) # Place thing (in tournament game, we don't want one!) # New in SST2K: never place the Thing near a starbase. # This makes sense and avoids a special case in the old code. global thing if game.tourn is None: while True: thing = randplace(GALSIZE) if thing not in game.state.baseq: break skip(2) game.state.snap = False if game.skill == SKILL_NOVICE: prout(_("It is stardate %d. The Federation is being attacked by") % int(game.state.date)) prout(_("a deadly Klingon invasion force. As captain of the United")) prout(_("Starship U.S.S. Enterprise, it is your mission to seek out")) prout(_("and destroy this invasion force of %d battle cruisers.") % ((game.inkling + game.incom + game.inscom))) prout(_("You have an initial allotment of %d stardates to complete") % int(game.intime)) prout(_("your mission. As you proceed you may be given more time.")) skip(1) prout(_("You will have %d supporting starbases.") % (game.inbase)) proutn(_("Starbase locations- ")) else: prout(_("Stardate %d.") % int(game.state.date)) skip(1) prout(_("%d Klingons.") % (game.inkling + game.incom + game.inscom)) prout(_("An unknown number of Romulans.")) if game.state.nscrem: prout(_("And one (GULP) Super-Commander.")) prout(_("%d stardates.") % int(game.intime)) proutn(_("%d starbases in ") % game.inbase) for i in range(game.inbase): proutn(`game.state.baseq[i]`) proutn(" ") skip(2) proutn(_("The Enterprise is currently in Quadrant %s") % game.quadrant) proutn(_(" Sector %s") % game.sector) skip(2) prout(_("Good Luck!")) if game.state.nscrem: prout(_(" YOU'LL NEED IT.")) waitfor() newqad() if len(game.enemies) - (thing == game.quadrant) - (game.tholian != None): game.shldup = True if game.neutz: # bad luck to start in a Romulan Neutral Zone attack(torps_ok=False)
e571d502c19abfb5a3320300c347793da7b43d05 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3176/e571d502c19abfb5a3320300c347793da7b43d05/sst.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 13332, 315, 7543, 358, 6599, 16, 444, 731, 4987, 26719, 1199, 341, 273, 10320, 1435, 468, 225, 3416, 831, 3661, 4906, 434, 7756, 309, 9876, 13332, 327, 468, 12810, 7920, 468, 7730, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 13332, 315, 7543, 358, 6599, 16, 444, 731, 4987, 26719, 1199, 341, 273, 10320, 1435, 468, 225, 3416, 831, 3661, 4906, 434, 7756, 309, 9876, 13332, 327, 468, 12810, 7920, 468, 7730, ...
try: time = numpy.linspace(0,HORZ_DIVISIONS*secPerDiv*recordLength*(1.0/2500),recordLength) except: time = secPerDiv
time = numpy.linspace(0,HORZ_DIVISIONS*secPerDiv*recordLength*(1.0/2500),recordLength)
def get_trace(self, c, channel, start=1, stop=2500): """Get a trace from the scope. OUTPUT - (array voltage in volts, array time in seconds) """
e7ba2706bdba9c5a160a9d3ae9d9264de9aced4a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7016/e7ba2706bdba9c5a160a9d3ae9d9264de9aced4a/tektronixTDS2014B.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 5129, 12, 2890, 16, 276, 16, 1904, 16, 787, 33, 21, 16, 2132, 33, 2947, 713, 4672, 3536, 967, 279, 2606, 628, 326, 2146, 18, 11550, 300, 261, 1126, 20839, 316, 6626, 3428, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 336, 67, 5129, 12, 2890, 16, 276, 16, 1904, 16, 787, 33, 21, 16, 2132, 33, 2947, 713, 4672, 3536, 967, 279, 2606, 628, 326, 2146, 18, 11550, 300, 261, 1126, 20839, 316, 6626, 3428, 1...
self.tk.call(self._w, 'open', entrypath)
self.tk.call(self._w, 'open', entrypath)
def open(self, entrypath):
0049f0036898e656085d5c214ba07642a9c25a6e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/0049f0036898e656085d5c214ba07642a9c25a6e/Tix.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1696, 12, 2890, 16, 1241, 803, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1696, 12, 2890, 16, 1241, 803, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
msg.attach( MIMEText(body.encode('utf-8') or '', _charset='utf-8', _subtype=subtype) )
try: msg.attach(MIMEText(body.encode('utf8') or '',_subtype=subtype,_charset='utf-8')) except: msg.attach(MIMEText(body or '', _charset='utf-8', _subtype=subtype) )
def email_send(email_from, email_to, subject, body, email_cc=None, email_bcc=None, reply_to=False, attach=None, tinycrm=False, ssl=False, debug=False, subtype='plain', x_headers=None): """Send an email.""" import smtplib from email.MIMEText import MIMEText from email.MIMEBase import MIMEBase from email.MIMEMultipart import MIMEMultipart from email.Header import Header from email.Utils import formatdate, COMMASPACE from email.Utils import formatdate, COMMASPACE from email import Encoders import netsvc if x_headers is None: x_headers = {} if not ssl: ssl = config.get('smtp_ssl', False) if not email_from and not config['email_from']: raise Exception("No Email sender by default, see config file") if not email_cc: email_cc = [] if not email_bcc: email_bcc = [] if not attach: msg = MIMEText(body.encode('utf-8') or '',_subtype=subtype,_charset='utf-8') else: msg = MIMEMultipart() msg['Subject'] = Header(ustr(subject), 'utf-8') msg['From'] = email_from del msg['Reply-To'] if reply_to: msg['Reply-To'] = reply_to else: msg['Reply-To'] = msg['From'] msg['To'] = COMMASPACE.join(email_to) if email_cc: msg['Cc'] = COMMASPACE.join(email_cc) if email_bcc: msg['Bcc'] = COMMASPACE.join(email_bcc) msg['Date'] = formatdate(localtime=True) # Add OpenERP Server information msg['X-Generated-By'] = 'OpenERP (http://www.openerp.com)' msg['X-OpenERP-Server-Host'] = socket.gethostname() msg['X-OpenERP-Server-Version'] = release.version # Add dynamic X Header for key, value in x_headers.items(): msg['X-OpenERP-%s' % key] = str(value) if tinycrm: msg['Message-Id'] = "<%s-tinycrm-%s@%s>" % (time.time(), tinycrm, socket.gethostname()) if attach: msg.attach( MIMEText(body.encode('utf-8') or '', _charset='utf-8', _subtype=subtype) ) for (fname,fcontent) in attach: part = MIMEBase('application', "octet-stream") part.set_payload( fcontent ) Encoders.encode_base64(part) part.add_header('Content-Disposition', 'attachment; filename="%s"' % (fname,)) msg.attach(part) class WriteToLogger(object): def __init__(self): self.logger = netsvc.Logger() def write(self, s): self.logger.notifyChannel('email_send', netsvc.LOG_DEBUG, s) try: oldstderr = smtplib.stderr s = smtplib.SMTP() try: # in case of debug, the messages are printed to stderr. if debug: smtplib.stderr = WriteToLogger() s.set_debuglevel(int(bool(debug))) # 0 or 1 s.connect(config['smtp_server'], config['smtp_port']) if ssl: s.ehlo() s.starttls() s.ehlo() if config['smtp_user'] or config['smtp_password']: s.login(config['smtp_user'], config['smtp_password']) s.sendmail(email_from, flatten([email_to, email_cc, email_bcc]), msg.as_string() ) finally: s.quit() if debug: smtplib.stderr = oldstderr except Exception, e: netsvc.Logger().notifyChannel('email_send', netsvc.LOG_ERROR, e) return False return True
e66a4f16ffbfdb478267bda3652ed7d3d5038787 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12853/e66a4f16ffbfdb478267bda3652ed7d3d5038787/misc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2699, 67, 4661, 12, 3652, 67, 2080, 16, 2699, 67, 869, 16, 3221, 16, 1417, 16, 2699, 67, 952, 33, 7036, 16, 2699, 67, 31345, 33, 7036, 16, 4332, 67, 869, 33, 8381, 16, 3306, 33, 70...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2699, 67, 4661, 12, 3652, 67, 2080, 16, 2699, 67, 869, 16, 3221, 16, 1417, 16, 2699, 67, 952, 33, 7036, 16, 2699, 67, 31345, 33, 7036, 16, 4332, 67, 869, 33, 8381, 16, 3306, 33, 70...
return self.encode(self._body)
return self.encode(self.get_body())
def get_body_encoded(self): """ This method is really a semi-private method used by the Queue.write method when writing the contents of the message to SQS. The RawMessage class does not encode the message in any way so this just calls get_body(). You probably shouldn't need to call this method in the normal course of events. """ return self.encode(self._body)
14c97b1bc77931ac159c7294608bc9ae3b4a6a03 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1098/14c97b1bc77931ac159c7294608bc9ae3b4a6a03/message.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 3432, 67, 10787, 12, 2890, 4672, 3536, 1220, 707, 353, 8654, 279, 23161, 17, 1152, 707, 1399, 635, 326, 7530, 18, 2626, 707, 1347, 7410, 326, 2939, 434, 326, 883, 358, 29052, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3432, 67, 10787, 12, 2890, 4672, 3536, 1220, 707, 353, 8654, 279, 23161, 17, 1152, 707, 1399, 635, 326, 7530, 18, 2626, 707, 1347, 7410, 326, 2939, 434, 326, 883, 358, 29052, ...
if wherevals: vals=vals+wherevals
def _joinTableSQL(self, conn, thisAttrNames, pivotTable, thisSideColumns, thatSideColumns, thatObject, thatAttrNames, extraTables, wheresql, wherevals, order, limit, offset): """SQL generating function for joinTable""" if extraTables is None: extraTables=[]
3546b489c540e47c23cc09d9dbc54588c9d46a36 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2304/3546b489c540e47c23cc09d9dbc54588c9d46a36/base.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5701, 1388, 3997, 12, 2890, 16, 1487, 16, 333, 3843, 1557, 16, 9939, 1388, 16, 333, 8895, 3380, 16, 716, 8895, 3380, 16, 716, 921, 16, 716, 3843, 1557, 16, 2870, 6905, 16, 17554, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 5701, 1388, 3997, 12, 2890, 16, 1487, 16, 333, 3843, 1557, 16, 9939, 1388, 16, 333, 8895, 3380, 16, 716, 8895, 3380, 16, 716, 921, 16, 716, 3843, 1557, 16, 2870, 6905, 16, 17554, ...
msg = "Rendering scene" else: msg = "Rendering raytrace image from POV-Ray Scene file. Please wait...."
msg = "Rendering scene. Please wait..." else: msg = "Rendering raytrace image from POV-Ray Scene file. Please wait..."
def raytrace_scene(self, tmpscene=False): """Render scene. If tmpscene is False, the INI and pov files are written to the 'POV-Ray Scene Files' directory. If tmpscene is True, the INI and pov files are written to a temporary directory (~/Nanorex/POV-Ray). Callers should set <tmpscene> = True when they want to render the scene but don't need to save the files and create a POV-Ray Scene node (i.e. 'View > Raytrace Scene'). The caller is responsible for adding the POV-Ray Scene node to the model tree. Returns errorcode and errortext. """ ini, pov = self.get_povfile_pair(tmpscene) if ini: if not self.povrayscene_file: self.povrayscene_file = pov writepovfile(self.assy.part, self.assy.o, self.povrayscene_file) write_povray_ini_file(ini, self.povrayscene_file, self.width, self.height, self.output_type) else: return 1, "Problem getting POV-Ray INI filename." cmd = greenmsg("Raytrace Scene: ") if tmpscene: msg = "Rendering scene" else: msg = "Rendering raytrace image from POV-Ray Scene file. Please wait...." env.history.message(cmd + msg) # Launch raytrace program (POV-Ray or MegaPOV) errorcode, errortext = launch_povray_or_megapov(self.assy.w, ini) if errorcode: env.history.message(cmd + orangemsg(errortext)) else: env.history.message(cmd + "Rendered image: " + self.get_output_image_filename())
05a09e8fce4a794de2c8e401a50f930afe649894 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/05a09e8fce4a794de2c8e401a50f930afe649894/PovrayScene.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14961, 5129, 67, 23694, 12, 2890, 16, 1853, 23694, 33, 8381, 4672, 3536, 3420, 9065, 18, 971, 1853, 23694, 353, 1083, 16, 326, 2120, 45, 471, 293, 1527, 1390, 854, 5941, 358, 326, 296, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14961, 5129, 67, 23694, 12, 2890, 16, 1853, 23694, 33, 8381, 4672, 3536, 3420, 9065, 18, 971, 1853, 23694, 353, 1083, 16, 326, 2120, 45, 471, 293, 1527, 1390, 854, 5941, 358, 326, 296, ...
logger = netsvc.Logger()
logger.notifyChannel('init', netsvc.LOG_WARNING, "column '%s' in table '%s' has changed type (DB = %s, def = %s) but unable to migrate this change !" % (k, self._table, f_pg_type, f._type))
ab41714295af23aa5c95790777fbe2e65dff8efa /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/ab41714295af23aa5c95790777fbe2e65dff8efa/orm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1194, 18, 12336, 2909, 2668, 2738, 2187, 21954, 4227, 18, 4842, 67, 9511, 16, 315, 2827, 1995, 87, 11, 316, 1014, 1995, 87, 11, 711, 3550, 618, 261, 2290, 273, 738, 87, 16, 1652, 273, 738, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1194, 18, 12336, 2909, 2668, 2738, 2187, 21954, 4227, 18, 4842, 67, 9511, 16, 315, 2827, 1995, 87, 11, 316, 1014, 1995, 87, 11, 711, 3550, 618, 261, 2290, 273, 738, 87, 16, 1652, 273, 738, ...
:param branch: branch at which the submodule should (later) be checked out.
:param branch: name of branch at which the submodule should (later) be checked out.
def add(cls, repo, name, path, url=None, branch=None, no_checkout=False): """Add a new submodule to the given repository. This will alter the index as well as the .gitmodules file, but will not create a new commit. If the submodule already exists, no matter if the configuration differs from the one provided, the existing submodule will be returned. :param repo: Repository instance which should receive the submodule :param name: The name/identifier for the submodule :param path: repository-relative or absolute path at which the submodule should be located It will be created as required during the repository initialization. :param url: git-clone compatible URL, see git-clone reference for more information If None, the repository is assumed to exist, and the url of the first remote is taken instead. This is useful if you want to make an existing repository a submodule of anotherone. :param branch: branch at which the submodule should (later) be checked out. The given branch must exist in the remote repository, and will be checked out locally as a tracking branch. It will only be written into the configuration if it not None, which is when the checked out branch will be the one the remote HEAD pointed to. The result you get in these situation is somewhat fuzzy, and it is recommended to specify at least 'master' here :param no_checkout: if True, and if the repository has to be cloned manually, no checkout will be performed :return: The newly created submodule instance :note: works atomically, such that no change will be done if the repository update fails for instance""" if repo.bare: raise InvalidGitRepositoryError("Cannot add submodules to bare repositories") # END handle bare repos path = to_native_path_linux(path) if path.endswith('/'): path = path[:-1] # END handle trailing slash # assure we never put backslashes into the url, as some operating systems # like it ... if url != None: url = to_native_path_linux(url) #END assure url correctness # INSTANTIATE INTERMEDIATE SM sm = cls(repo, cls.NULL_BIN_SHA, cls.k_default_mode, path, name) if sm.exists(): # reretrieve submodule from tree try: return repo.head.commit.tree[path] except KeyError: # could only be in index index = repo.index entry = index.entries[index.entry_key(path, 0)] sm.binsha = entry.binsha return sm # END handle exceptions # END handle existing br = git.Head.to_full_path(str(branch) or cls.k_head_default) has_module = sm.module_exists() branch_is_default = branch is None if has_module and url is not None: if url not in [r.url for r in sm.module().remotes]: raise ValueError("Specified URL '%s' does not match any remote url of the repository at '%s'" % (url, sm.abspath)) # END check url # END verify urls match mrepo = None if url is None: if not has_module: raise ValueError("A URL was not given and existing repository did not exsit at %s" % path) # END check url mrepo = sm.module() urls = [r.url for r in mrepo.remotes] if not urls: raise ValueError("Didn't find any remote url in repository at %s" % sm.abspath) # END verify we have url url = urls[0] else: # clone new repo kwargs = {'n' : no_checkout} if not branch_is_default: kwargs['b'] = br # END setup checkout-branch mrepo = git.Repo.clone_from(url, path, **kwargs) # END verify url # update configuration and index index = sm.repo.index writer = sm.config_writer(index=index, write=False) writer.set_value('url', url) writer.set_value('path', path) sm._url = url if not branch_is_default: # store full path writer.set_value(cls.k_head_option, br) sm._branch_path = br # END handle path del(writer) # we deliberatly assume that our head matches our index ! pcommit = repo.head.commit sm._parent_commit = pcommit sm.binsha = mrepo.head.commit.binsha index.add([sm], write=True) return sm
96d003cb2baabd73f2aa0fd9486c13c61415106e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13767/96d003cb2baabd73f2aa0fd9486c13c61415106e/base.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 12, 6429, 16, 3538, 16, 508, 16, 589, 16, 880, 33, 7036, 16, 3803, 33, 7036, 16, 1158, 67, 17300, 33, 8381, 4672, 3536, 986, 279, 394, 27314, 358, 326, 864, 3352, 18, 1220, 903,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 6429, 16, 3538, 16, 508, 16, 589, 16, 880, 33, 7036, 16, 3803, 33, 7036, 16, 1158, 67, 17300, 33, 8381, 4672, 3536, 986, 279, 394, 27314, 358, 326, 864, 3352, 18, 1220, 903,...
time = totalCapacity / totalRate
if totalRate: time = totalCapacity / totalRate else: time = totalCapacity
def estimated_lifetime(self): # what should we return if state==charging? # it's not clean to return a time in one case and any # English string in another case. # The user can check for ac-state before call this func # fixed bug - if a battery is full and not discharging, it # would not be counted in the estimated lifetime # so, this new code totals the remaining capacity and rate # from all the batteries, and divides # however, if two or more batteries are discharging at # different non-zero rates, I don't know how accurate this # will be # - QS Computing (postmaster@qscomputing.net) time = 0 totalCapacity = 0 totalRate = 0 for batt, capacity in self.life_capacity.items(): totalCapacity += capacity totalRate += self.present_rate[batt] time = totalCapacity / totalRate return time
d9046690729321e024ac4dab17519db74c4f42c9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4994/d9046690729321e024ac4dab17519db74c4f42c9/acpi.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13137, 67, 17155, 12, 2890, 4672, 468, 4121, 1410, 732, 327, 309, 919, 631, 3001, 1998, 35, 468, 518, 1807, 486, 2721, 358, 327, 279, 813, 316, 1245, 648, 471, 1281, 468, 24151, 533, 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, 13137, 67, 17155, 12, 2890, 4672, 468, 4121, 1410, 732, 327, 309, 919, 631, 3001, 1998, 35, 468, 518, 1807, 486, 2721, 358, 327, 279, 813, 316, 1245, 648, 471, 1281, 468, 24151, 533, 3...
if isinstance(value, basestring): value = [value,]
def _validate(self, value): """ To redisplay correctly on error, selection fields must have the :attr:`item_validator` applies to their value. This function does this in a way that will never raise an exception, before calling the main validator. """ if isinstance(value, basestring): value = [value,] if self.multiple: value = [twc.safe_validate(self.item_validator, v) for v in (value or [])] value = [v for v in value if v is not twc.Invalid] else: value = twc.safe_validate(self.item_validator, value) if value is twc.Invalid: value = None return super(SelectionField, self)._validate(value)
f048691cde9c90b1a3922b712ee07ee83456805b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11476/f048691cde9c90b1a3922b712ee07ee83456805b/widgets.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5662, 12, 2890, 16, 460, 4672, 3536, 2974, 5813, 1601, 8783, 603, 555, 16, 4421, 1466, 1297, 1240, 326, 294, 1747, 28288, 1726, 67, 7357, 68, 10294, 358, 3675, 460, 18, 1220, 445, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5662, 12, 2890, 16, 460, 4672, 3536, 2974, 5813, 1601, 8783, 603, 555, 16, 4421, 1466, 1297, 1240, 326, 294, 1747, 28288, 1726, 67, 7357, 68, 10294, 358, 3675, 460, 18, 1220, 445, ...
raise Exit
reason=args.all() args.finish() self.exit_request(reason)
def cmd_quit(self,args): raise Exit
2a2c20f1ab2a3d7201fcb9a7a7532d4a094daaec /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12768/2a2c20f1ab2a3d7201fcb9a7a7532d4a094daaec/main.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1797, 67, 27176, 12, 2890, 16, 1968, 4672, 1002, 9500, 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,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1797, 67, 27176, 12, 2890, 16, 1968, 4672, 1002, 9500, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
return template % locals()
return template % options
def _addSortUi(self, header, column): columnName = column.name resource_path = component.getAdapter(self.request, name='zc.table')() if (interfaces.IColumnSortedItems.providedBy(self.items) and self.items.sort_on): sortColumnName, sortReversed = self.items.sort_on[0] else: sortColumnName = sortReversed = None if columnName == sortColumnName: path = component.getAdapter(self.request, name='zc.table')() if sortReversed: dirIndicator = ('<img src="%s/sort_arrows_up.gif" ' 'style="vertical-align: top; ' 'margin-top: 0px" ' 'alt="(ascending)"/>' % resource_path) else: dirIndicator = ('<img src="%s/sort_arrows_down.gif" ' 'style="vertical-align: top; ' 'margin-top: 0px" ' 'alt="(descending)"/>' % resource_path) else: dirIndicator = ('<img src="%s/sort_arrows.gif" ' 'style="vertical-align: top; ' 'margin-top: 0px" ' 'alt="(sortable)"/>' % resource_path) sort_on_name = getSortOnName(self.prefix) script_name = self.script_name # The <img> below is intentionally not in the <span> because IE # doesn't underline it correctly when the CSS class is changed. # XXX can we avoid changing the className and get a similar effect? template = """ <span class="zc-table-sortable" onclick="javascript: %(script_name)s( '%(columnName)s', '%(sort_on_name)s')" onMouseOver="javascript: this.className='sortable zc-table-sortable'" onMouseOut="javascript: this.className='zc-table-sortable'"> %(header)s</span> %(dirIndicator)s """ return template % locals()
af9f7c347635fc15e287b413b9e016f4b913fb44 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9500/af9f7c347635fc15e287b413b9e016f4b913fb44/table.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1289, 4416, 13943, 12, 2890, 16, 1446, 16, 1057, 4672, 7578, 273, 1057, 18, 529, 1058, 67, 803, 273, 1794, 18, 588, 4216, 12, 2890, 18, 2293, 16, 508, 2218, 94, 71, 18, 2121, 61...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1289, 4416, 13943, 12, 2890, 16, 1446, 16, 1057, 4672, 7578, 273, 1057, 18, 529, 1058, 67, 803, 273, 1794, 18, 588, 4216, 12, 2890, 18, 2293, 16, 508, 2218, 94, 71, 18, 2121, 61...
self.socket.unwrap()
try: self.socket.unwrap() except ssl.SSLError, err: if err.args[0] in (ssl.SSL_ERROR_WANT_READ, ssl.SSL_ERROR_WANT_WRITE): ssl_want_read_or_write = True else: raise
def close(self): try: if isinstance(self.socket, ssl.SSLSocket): if self.socket._sslobj is not None: self.socket.unwrap() finally: super(SSLConnection, self).close()
5a729c6f3593f97c7dc1a03f2384419ecf124fab /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12029/5a729c6f3593f97c7dc1a03f2384419ecf124fab/test_ftplib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1746, 12, 2890, 4672, 775, 30, 309, 1549, 12, 2890, 18, 7814, 16, 5832, 18, 1260, 25831, 4672, 309, 365, 18, 7814, 6315, 1049, 383, 441, 353, 486, 599, 30, 775, 30, 365, 18, 7814, 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, 1746, 12, 2890, 4672, 775, 30, 309, 1549, 12, 2890, 18, 7814, 16, 5832, 18, 1260, 25831, 4672, 309, 365, 18, 7814, 6315, 1049, 383, 441, 353, 486, 599, 30, 775, 30, 365, 18, 7814, 18...
if None!=self.readersAsked: readers=[str(reader) for reader in self.readersAsked]
if None==self.readersAsked: readers = pcscreaders
def getReaderNames( self ): """Returns the list or PCSC readers on which to wait for cards.""" # if no readers asked, use all readers readers=[] if None!=self.readersAsked: readers=[str(reader) for reader in self.readersAsked] else: hresult, readers = SCardListReaders( self.hcontext, [] ) if 0!=hresult and SCARD_E_NO_READERS_AVAILABLE!=hresult: raise ListReadersException( hresult ) return readers
4f21c45fdae64051b4b02a2a0d992ae348b36bfa /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3537/4f21c45fdae64051b4b02a2a0d992ae348b36bfa/PCSCCardRequest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 27173, 1557, 12, 365, 262, 30, 3536, 1356, 326, 666, 578, 26300, 2312, 16527, 603, 1492, 358, 2529, 364, 18122, 12123, 468, 309, 1158, 16527, 19279, 16, 999, 777, 16527, 16527, 33, 8526, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 27173, 1557, 12, 365, 262, 30, 3536, 1356, 326, 666, 578, 26300, 2312, 16527, 603, 1492, 358, 2529, 364, 18122, 12123, 468, 309, 1158, 16527, 19279, 16, 999, 777, 16527, 16527, 33, 8526, ...
Subwidgets Class ---------- ----- fsbox ExFileSelectBox""" def __init__(self, master, cnf={}, **kw): TixWidget.__init__(self, master, 'tixExFileSelectDialog', ['options'], cnf, kw) self.subwidget_list['fsbox'] = _dummyExFileSelectBox(self, 'fsbox')
Subwidgets Class ---------- ----- fsbox ExFileSelectBox""" def __init__(self, master, cnf={}, **kw): TixWidget.__init__(self, master, 'tixExFileSelectDialog', ['options'], cnf, kw) self.subwidget_list['fsbox'] = _dummyExFileSelectBox(self, 'fsbox')
def invoke(self):
22710823fb554a796dc96c44885d7a9389426824 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/22710823fb554a796dc96c44885d7a9389426824/Tix.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4356, 12, 2890, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4356, 12, 2890, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
def create_exe (self, arcname):
def create_exe (self, arcname, fullname):
def create_exe (self, arcname): import struct, zlib
d632280482e5e5e66cebc993062f0fd1e60755b5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/d632280482e5e5e66cebc993062f0fd1e60755b5/bdist_wininst.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 14880, 261, 2890, 16, 8028, 529, 16, 13321, 4672, 1930, 1958, 16, 24220, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 14880, 261, 2890, 16, 8028, 529, 16, 13321, 4672, 1930, 1958, 16, 24220, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
return translate('dissalowed_error_text', 'ftw_meeting')
return translate( 'disallowed_error_text', 'ftw_meeting', context=self.request)
def __call__(self, date_hash=None): """If successfull this view returns a small part html Example: <a href="url/to/meeting">Meeting</a> this will be displayed as statusmessage
7b9eb76e85b184a69f98586606124fad699fc96c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11898/7b9eb76e85b184a69f98586606124fad699fc96c/create_meeting.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 1509, 67, 2816, 33, 7036, 4672, 3536, 2047, 2216, 2854, 333, 1476, 1135, 279, 5264, 1087, 1729, 5090, 30, 411, 69, 3897, 1546, 718, 19, 869, 19, 3501, 21...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 1509, 67, 2816, 33, 7036, 4672, 3536, 2047, 2216, 2854, 333, 1476, 1135, 279, 5264, 1087, 1729, 5090, 30, 411, 69, 3897, 1546, 718, 19, 869, 19, 3501, 21...
"Verify that the control is visible and enabled"
"""Verify that the control is both visible and enabled raise either ControlNotEnalbed or ControlNotVisible if not enabled or visible respectively. """
def VerifyActionable(self): "Verify that the control is visible and enabled" win32functions.WaitGuiThreadIdle(self) self.VerifyVisible() self.VerifyEnabled()
186267d912b2327653564c2a6fdee702cfdd83f4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6953/186267d912b2327653564c2a6fdee702cfdd83f4/HwndWrapper.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8553, 1803, 429, 12, 2890, 4672, 3536, 8097, 716, 326, 3325, 353, 3937, 6021, 471, 3696, 225, 1002, 3344, 8888, 1248, 664, 287, 2992, 578, 8888, 1248, 6207, 309, 486, 3696, 578, 6021, 19...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8553, 1803, 429, 12, 2890, 4672, 3536, 8097, 716, 326, 3325, 353, 3937, 6021, 471, 3696, 225, 1002, 3344, 8888, 1248, 664, 287, 2992, 578, 8888, 1248, 6207, 309, 486, 3696, 578, 6021, 19...
url = '/packages/orphans'
url = '/acls/orphans'
def packages(self, fasname=None, acls=None, eol=None): '''List packages that the user is interested in.
0d328c8e5b29f32f86483e9ce755d03b1a61a6be /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9953/0d328c8e5b29f32f86483e9ce755d03b1a61a6be/users.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5907, 12, 2890, 16, 284, 345, 529, 33, 7036, 16, 30906, 33, 7036, 16, 14775, 33, 7036, 4672, 9163, 682, 5907, 716, 326, 729, 353, 20506, 316, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5907, 12, 2890, 16, 284, 345, 529, 33, 7036, 16, 30906, 33, 7036, 16, 14775, 33, 7036, 4672, 9163, 682, 5907, 716, 326, 729, 353, 20506, 316, 18, 2, -100, -100, -100, -100, -100, -100,...
raise SyntaxError("Invalid break")
raise SyntaxError("Invalid break", tokenizer)
def Statement(tokenizer, staticContext): """Parses a Statement.""" tokenType = tokenizer.get(True) builder = staticContext.builder # Cases for statements ending in a right curly return early, avoiding the # common semicolon insertion magic after this switch. if tokenType == "function": # "declared_form" extends functions of staticContext, "statement_form" doesn'tokenizer. if len(staticContext.statementStack) > 1: kind = "statement_form" else: kind = "declared_form" return FunctionDefinition(tokenizer, staticContext, True, kind) elif tokenType == "left_curly": node = Statements(tokenizer, staticContext) tokenizer.mustMatch("right_curly") return node elif tokenType == "if": node = builder.IF_build(tokenizer) builder.IF_setCondition(node, ParenExpression(tokenizer, staticContext)) staticContext.statementStack.append(node) builder.IF_setThenPart(node, Statement(tokenizer, staticContext)) if tokenizer.match("else"): comments = tokenizer.getComments() elsePart = Statement(tokenizer, staticContext) builder.COMMENTS_add(elsePart, node, comments) builder.IF_setElsePart(node, elsePart) staticContext.statementStack.pop() builder.IF_finish(node) return node elif tokenType == "switch": # This allows CASEs after a "default", which is in the standard. node = builder.SWITCH_build(tokenizer) builder.SWITCH_setDiscriminant(node, ParenExpression(tokenizer, staticContext)) staticContext.statementStack.append(node) tokenizer.mustMatch("left_curly") tokenType = tokenizer.get() while tokenType != "right_curly": if tokenType == "default": if node.defaultIndex >= 0: raise SyntaxError("More than one switch default", tokenizer) childNode = builder.DEFAULT_build(tokenizer) builder.SWITCH_setDefaultIndex(node, len(node)-1) tokenizer.mustMatch("colon") builder.DEFAULT_initializeStatements(childNode, tokenizer) while True: tokenType=tokenizer.peek(True) if tokenType == "case" or tokenType == "default" or tokenType == "right_curly": break builder.DEFAULT_addStatement(childNode, Statement(tokenizer, staticContext)) builder.DEFAULT_finish(childNode) elif tokenType == "case": childNode = builder.CASE_build(tokenizer) builder.CASE_setLabel(childNode, Expression(tokenizer, staticContext)) tokenizer.mustMatch("colon") builder.CASE_initializeStatements(childNode, tokenizer) while True: tokenType=tokenizer.peek(True) if tokenType == "case" or tokenType == "default" or tokenType == "right_curly": break builder.CASE_addStatement(childNode, Statement(tokenizer, staticContext)) builder.CASE_finish(childNode) else: raise SyntaxError("Invalid switch case", tokenizer) builder.SWITCH_addCase(node, childNode) tokenType = tokenizer.get() staticContext.statementStack.pop() builder.SWITCH_finish(node) return node elif tokenType == "for": node = builder.FOR_build(tokenizer) forBlock = None if tokenizer.match("identifier") and tokenizer.token.value == "each": builder.FOR_rebuildForEach(node) tokenizer.mustMatch("left_paren") tokenType = tokenizer.peek() childNode = None if tokenType != "semicolon": staticContext.inForLoopInit = True if tokenType == "var" or tokenType == "const": tokenizer.get() childNode = Variables(tokenizer, staticContext) elif tokenType == "let": tokenizer.get() if tokenizer.peek() == "left_paren": childNode = LetBlock(tokenizer, staticContext, False) else: # Let in for head, we need to add an implicit block # around the rest of the for. forBlock = builder.BLOCK_build(tokenizer, staticContext.blockId) staticContext.blockId += 1 staticContext.statementStack.append(forBlock) childNode = Variables(tokenizer, staticContext, forBlock) else: childNode = Expression(tokenizer, staticContext) staticContext.inForLoopInit = False if childNode and tokenizer.match("in"): builder.FOR_rebuildForIn(node) builder.FOR_setObject(node, Expression(tokenizer, staticContext), forBlock) if childNode.type == "var" or childNode.type == "let": if len(childNode) != 1: raise SyntaxError("Invalid for..in left-hand side", tokenizer) builder.FOR_setIterator(node, childNode, forBlock) else: builder.FOR_setIterator(node, childNode, forBlock) else: builder.FOR_setSetup(node, childNode) tokenizer.mustMatch("semicolon") if node.isEach: raise SyntaxError("Invalid for each..in loop") if tokenizer.peek() == "semicolon": builder.FOR_setCondition(node, None) else: builder.FOR_setCondition(node, Expression(tokenizer, staticContext)) tokenizer.mustMatch("semicolon") if tokenizer.peek() == "right_paren": builder.FOR_setUpdate(node, None) else: builder.FOR_setUpdate(node, Expression(tokenizer, staticContext)) tokenizer.mustMatch("right_paren") builder.FOR_setBody(node, nest(tokenizer, staticContext, node, Statement)) if forBlock: builder.BLOCK_finish(forBlock) staticContext.statementStack.pop() builder.FOR_finish(node) return node elif tokenType == "while": node = builder.WHILE_build(tokenizer) builder.WHILE_setCondition(node, ParenExpression(tokenizer, staticContext)) builder.WHILE_setBody(node, nest(tokenizer, staticContext, node, Statement)) builder.WHILE_finish(node) return node elif tokenType == "do": node = builder.DO_build(tokenizer) builder.DO_setBody(node, nest(tokenizer, staticContext, node, Statement, "while")) builder.DO_setCondition(node, ParenExpression(tokenizer, staticContext)) builder.DO_finish(node) if not staticContext.ecma3OnlyMode: # <script language="JavaScript"> (without version hints) may need # automatic semicolon insertion without a newline after do-while. # See http://bugzilla.mozilla.org/show_bug.cgi?id=238945. tokenizer.match("semicolon") return node # NO RETURN elif tokenType == "break" or tokenType == "continue": if tokenType == "break": node = builder.BREAK_build(tokenizer) else: node = builder.CONTINUE_build(tokenizer) if tokenizer.peekOnSameLine() == "identifier": tokenizer.get() if tokenType == "break": builder.BREAK_setLabel(node, tokenizer.token.value) else: builder.CONTINUE_setLabel(node, tokenizer.token.value) statementStack = staticContext.statementStack i = len(statementStack) label = node.label if hasattr(node, "label") else None if label: while True: i -= 1 if i < 0: raise SyntaxError("Label not found", tokenizer) if getattr(statementStack[i], "label", None) == label: break # # Both break and continue to label need to be handled specially # within a labeled loop, so that they target that loop. If not in # a loop, then break targets its labeled statement. Labels can be # nested so we skip all labels immediately enclosing the nearest # non-label statement. # while i < len(statementStack) - 1 and statementStack[i+1].type == "label": i += 1 if i < len(statementStack) - 1 and getattr(statementStack[i+1], "isLoop", False): i += 1 elif tokenType == "continue": raise SyntaxError("Invalid continue", tokenizer) else: while True: i -= 1 if i < 0: if tokenType == "break": raise SyntaxError("Invalid break") else: raise SyntaxError("Invalid continue") if getattr(statementStack[i], "isLoop", False) or (tokenType == "break" and statementStack[i].type == "switch"): break if tokenType == "break": builder.BREAK_setTarget(node, statementStack[i]) builder.BREAK_finish(node) else: builder.CONTINUE_setTarget(node, statementStack[i]) builder.CONTINUE_finish(node) # NO RETURN elif tokenType == "try": node = builder.TRY_build(tokenizer) builder.TRY_setTryBlock(node, Block(tokenizer, staticContext)) while tokenizer.match("catch"): childNode = builder.CATCH_build(tokenizer) tokenizer.mustMatch("left_paren") nextTokenType = tokenizer.get() if nextTokenType == "left_bracket" or nextTokenType == "left_curly": # Destructured catch identifiers. tokenizer.unget() exception = DestructuringExpression(tokenizer, staticContext, True) for exceptionChild in exception: staticContext.exceptions.add(exceptionChild.value) elif nextTokenType == "identifier": exception = builder.CATCH_wrapException(tokenizer) staticContext.exceptions.add(exception.value) else: raise SyntaxError("Missing identifier in catch", tokenizer) builder.CATCH_setException(childNode, exception) if tokenizer.match("if"): if staticContext.ecma3OnlyMode: raise SyntaxError("Illegal catch guard", tokenizer) if node.getChildrenLength() > 0 and not node.getUnrelatedChildren()[0].guard: raise SyntaxError("Guarded catch after unguarded", tokenizer) builder.CATCH_setGuard(childNode, Expression(tokenizer, staticContext)) else: builder.CATCH_setGuard(childNode, None) tokenizer.mustMatch("right_paren") builder.CATCH_setBlock(childNode, Block(tokenizer, staticContext)) builder.CATCH_finish(childNode) builder.TRY_addCatch(node, childNode) builder.TRY_finishCatches(node) if tokenizer.match("finally"): builder.TRY_setFinallyBlock(node, Block(tokenizer, staticContext)) if node.getChildrenLength() == 0 and not hasattr(node, "finallyBlock"): raise SyntaxError("Invalid try statement", tokenizer) builder.TRY_finish(node) return node elif tokenType == "catch" or tokenType == "finally": raise SyntaxError(tokens[tokenType] + " without preceding try") elif tokenType == "throw": node = builder.THROW_build(tokenizer) builder.THROW_setException(node, Expression(tokenizer, staticContext)) builder.THROW_finish(node) # NO RETURN elif tokenType == "return": node = returnOrYield(tokenizer, staticContext) # NO RETURN elif tokenType == "with": node = builder.WITH_build(tokenizer) builder.WITH_setObject(node, ParenExpression(tokenizer, staticContext)) builder.WITH_setBody(node, nest(tokenizer, staticContext, node, Statement)) builder.WITH_finish(node) return node elif tokenType == "var" or tokenType == "const": node = Variables(tokenizer, staticContext) # NO RETURN elif tokenType == "let": if tokenizer.peek() == "left_paren": node = LetBlock(tokenizer, staticContext, True) else: node = Variables(tokenizer, staticContext) # NO RETURN elif tokenType == "debugger": node = builder.DEBUGGER_build(tokenizer) # NO RETURN elif tokenType == "newline" or tokenType == "semicolon": node = builder.SEMICOLON_build(tokenizer) builder.SEMICOLON_setExpression(node, None) builder.SEMICOLON_finish(tokenizer) return node else: if tokenType == "identifier": tokenType = tokenizer.peek() # Labeled statement. if tokenType == "colon": label = tokenizer.token.value statementStack = staticContext.statementStack i = len(statementStack)-1 while i >= 0: if getattr(statementStack[i], "label", None) == label: raise SyntaxError("Duplicate label") i -= 1 tokenizer.get() node = builder.LABEL_build(tokenizer) builder.LABEL_setLabel(node, label) builder.LABEL_setStatement(node, nest(tokenizer, staticContext, node, Statement)) builder.LABEL_finish(node) return node # Expression statement. # We unget the current token to parse the expression as a whole. node = builder.SEMICOLON_build(tokenizer) tokenizer.unget() builder.SEMICOLON_setExpression(node, Expression(tokenizer, staticContext)) node.end = node.expression.end builder.SEMICOLON_finish(node) # NO RETURN MagicalSemicolon(tokenizer) return node
bdc507c93397dfb45618391af4f8ad06736bfaf9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12949/bdc507c93397dfb45618391af4f8ad06736bfaf9/Parser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8056, 12, 2316, 1824, 16, 760, 1042, 4672, 3536, 6656, 279, 8056, 12123, 225, 22302, 273, 10123, 18, 588, 12, 5510, 13, 2089, 273, 760, 1042, 18, 9574, 225, 468, 385, 3304, 364, 6317, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8056, 12, 2316, 1824, 16, 760, 1042, 4672, 3536, 6656, 279, 8056, 12123, 225, 22302, 273, 10123, 18, 588, 12, 5510, 13, 2089, 273, 760, 1042, 18, 9574, 225, 468, 385, 3304, 364, 6317, ...
names=None, titles=None, byteorder=None, aligned=0):
names=None, titles=None, aligned=False, byteorder=None):
def fromfile(fd, dtype=None, shape=None, offset=0, formats=None, names=None, titles=None, byteorder=None, aligned=0): """Create an array from binary file data If file is a string then that file is opened, else it is assumed to be a file object. >>> import testdata, sys >>> fd=open(testdata.filename) >>> fd.seek(2880*2) >>> r=fromfile(fd, formats='f8,i4,a5', shape=3, byteorder='big') >>> print r[0] (5.1000000000000005, 61, 'abcde') >>> r._shape (3,) """ if (shape is None or shape == 0): shape = (-1,) elif isinstance(shape, (int, long)): shape = (shape,) name = 0 if isinstance(fd, str): name = 1 fd = open(fd, 'rb') if (offset > 0): fd.seek(offset, 1) size = get_remaining_size(fd) if dtype is not None: descr = sb.dtype(dtype) else: descr = format_parser(formats, names, titles, aligned, byteorder)._descr itemsize = descr.itemsize shapeprod = sb.array(shape).prod() shapesize = shapeprod*itemsize if shapesize < 0: shape = list(shape) shape[ shape.index(-1) ] = size / -shapesize shape = tuple(shape) shapeprod = sb.array(shape).prod() nbytes = shapeprod*itemsize if nbytes > size: raise ValueError( "Not enough bytes left in file for specified shape and type") # create the array _array = recarray(shape, descr) nbytesread = fd.readinto(_array.data) if nbytesread != nbytes: raise IOError("Didn't read as many bytes as expected") if name: fd.close() return _array
107a45f793e249bc87e9bd328fa7d62519a5b4e9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14925/107a45f793e249bc87e9bd328fa7d62519a5b4e9/records.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 628, 768, 12, 8313, 16, 3182, 33, 7036, 16, 2179, 33, 7036, 16, 1384, 33, 20, 16, 6449, 33, 7036, 16, 1257, 33, 7036, 16, 14693, 33, 7036, 16, 13939, 33, 8381, 16, 1160, 1019, 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, 628, 768, 12, 8313, 16, 3182, 33, 7036, 16, 2179, 33, 7036, 16, 1384, 33, 20, 16, 6449, 33, 7036, 16, 1257, 33, 7036, 16, 14693, 33, 7036, 16, 13939, 33, 8381, 16, 1160, 1019, 33, ...
self.body.append(self.comment(self.document_start).lstrip())
self.body.append(self.comment(self.document_start).rstrip()+'\n')
def visit_document(self, node): self.body.append(self.comment(self.document_start).lstrip()) # writing header is postboned self.header_written = 0
e5e12ce3fb3aca02c63f869fd242329ed44a5e9a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1278/e5e12ce3fb3aca02c63f869fd242329ed44a5e9a/manpage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3757, 67, 5457, 12, 2890, 16, 756, 4672, 225, 365, 18, 3432, 18, 6923, 12, 2890, 18, 3469, 12, 2890, 18, 5457, 67, 1937, 2934, 86, 6406, 1435, 6797, 64, 82, 6134, 468, 7410, 1446, 35...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3757, 67, 5457, 12, 2890, 16, 756, 4672, 225, 365, 18, 3432, 18, 6923, 12, 2890, 18, 3469, 12, 2890, 18, 5457, 67, 1937, 2934, 86, 6406, 1435, 6797, 64, 82, 6134, 468, 7410, 1446, 35...
if key in keywords:
if type(key) in [int,float]: pass elif key in keywords or not __simpleProperty.match(key):
def __property_init(node): key = compress(node[0]) value = compress(node[1]) # Protect keywords if key in keywords: key = '"%s"' % key return "%s:%s" % (key, value)
dc4be74e05f8704c44c6e99305663d8c2247a4b3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12949/dc4be74e05f8704c44c6e99305663d8c2247a4b3/Compressor.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 4468, 67, 2738, 12, 2159, 4672, 498, 273, 8099, 12, 2159, 63, 20, 5717, 460, 273, 8099, 12, 2159, 63, 21, 5717, 225, 468, 1186, 88, 386, 7093, 430, 618, 12, 856, 13, 316, 306, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4468, 67, 2738, 12, 2159, 4672, 498, 273, 8099, 12, 2159, 63, 20, 5717, 460, 273, 8099, 12, 2159, 63, 21, 5717, 225, 468, 1186, 88, 386, 7093, 430, 618, 12, 856, 13, 316, 306, ...
return urwid.TextCanvas([txt], [attr], [cs], maxcol=maxcol)
return urwid.TextCanvas([txt], [attr], [cs], maxcol=maxcol)
def render(self, (maxcol,), focus=False): hscroll = self.dbg_ui.source_hscroll_start attrs = [] if self.is_current: crnt = ">" attrs.append("current") else: crnt = " "
e032f4d4e7d00a05fe0f27b0ce4695345bb987e0 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12738/e032f4d4e7d00a05fe0f27b0ce4695345bb987e0/debugger.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 12, 2890, 16, 261, 1896, 1293, 16, 3631, 7155, 33, 8381, 4672, 366, 12033, 273, 365, 18, 1966, 75, 67, 4881, 18, 3168, 67, 76, 12033, 67, 1937, 3422, 273, 5378, 309, 365, 18, 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, 1743, 12, 2890, 16, 261, 1896, 1293, 16, 3631, 7155, 33, 8381, 4672, 366, 12033, 273, 365, 18, 1966, 75, 67, 4881, 18, 3168, 67, 76, 12033, 67, 1937, 3422, 273, 5378, 309, 365, 18, 2...
if (earlyAbort and _maxpw is not None and pw[prvpkg] > _maxpw): self.trace(2, "early abort of PENDING_INSTALL at %s", (prvpkg)) continue
cs = changeset.copy() lk = locked.copy() task = trans.TaskInstall(self, prvpkg, cs, lk, None, _pruneweight, self._yieldweight, csweight, pw[prvpkg], order, "install %s" % prvpkg) heappush(taskheap, task) order += 1 while len(taskheap)>0: task = heappop(taskheap) yw = min(self._yieldweight, _pruneweight) if len(taskheap)>1: yw = min(yw, taskheap[1].getChangesetWeight())
def _pending(self, pending): trans = self._trans changeset = self._changeset locked = self._locked depth = self._depth if traceVerbosity<4: self.trace(1, "_pending(pw=%f, yw=%f)", (self._pruneweight, self._yieldweight)) else: self.trace(4, "_pending(%s, pw=%f, yw=%f)", (pending, self._pruneweight, self._yieldweight))
c1c8c97608cc7dc211d0b953aa22e130e6544b4b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8317/c1c8c97608cc7dc211d0b953aa22e130e6544b4b/transaction.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 9561, 12, 2890, 16, 4634, 4672, 906, 273, 365, 6315, 2338, 22463, 273, 365, 6315, 6329, 278, 8586, 273, 365, 6315, 15091, 3598, 273, 365, 6315, 5979, 309, 2606, 30594, 32, 24, 30, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 9561, 12, 2890, 16, 4634, 4672, 906, 273, 365, 6315, 2338, 22463, 273, 365, 6315, 6329, 278, 8586, 273, 365, 6315, 15091, 3598, 273, 365, 6315, 5979, 309, 2606, 30594, 32, 24, 30, ...
utils.logger.info( 'query has been optimized on type' )
utils.logger.debug( 'query has been optimized on type' )
def __findout_range( self, name, decl_type, recursive ): if not self._optimized: utils.logger.info( 'running non optimized query - optimization has not been done' ) decls = self.declarations if recursive: decls = algorithm.make_flatten( self.declarations ) return decls
420149f2642ab48ea7ca588594f35e1e04160a38 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7398/420149f2642ab48ea7ca588594f35e1e04160a38/scopedef.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 4720, 659, 67, 3676, 12, 365, 16, 508, 16, 3496, 67, 723, 16, 5904, 262, 30, 309, 486, 365, 6315, 16689, 1235, 30, 2990, 18, 4901, 18, 1376, 12, 296, 8704, 1661, 15411, 843, 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, 1001, 4720, 659, 67, 3676, 12, 365, 16, 508, 16, 3496, 67, 723, 16, 5904, 262, 30, 309, 486, 365, 6315, 16689, 1235, 30, 2990, 18, 4901, 18, 1376, 12, 296, 8704, 1661, 15411, 843, 30...
args[i][2] = '%%%s%%' % args[i][2]
args[i] = (args[i][0], args[i][1], '%%%s%%' % args[i][2])
def _rec_get(ids, table, parent): if not ids: return [] if 'active' in table._columns: ids2 = table.search(cr, user, [(parent,'in',ids),('active','in', [True, False])]) else: ids2 = table.search(cr, user, [(parent, 'in', ids)]) return ids + _rec_get(ids2, table, parent)
04686e345d164cc2963205bc4768ea1725110988 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7397/04686e345d164cc2963205bc4768ea1725110988/orm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3927, 67, 588, 12, 2232, 16, 1014, 16, 982, 4672, 309, 486, 3258, 30, 327, 5378, 309, 296, 3535, 11, 316, 1014, 6315, 5112, 30, 3258, 22, 273, 1014, 18, 3072, 12, 3353, 16, 729,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3927, 67, 588, 12, 2232, 16, 1014, 16, 982, 4672, 309, 486, 3258, 30, 327, 5378, 309, 296, 3535, 11, 316, 1014, 6315, 5112, 30, 3258, 22, 273, 1014, 18, 3072, 12, 3353, 16, 729,...
def selectConnected(self, atomlist=None): """ Select any atom that can be reached from any currently
def selectConnected(self, atomlist = None): """ Selects any atom that can be reached from any currently
def selectConnected(self, atomlist=None): """ Select any atom that can be reached from any currently selected atom through a sequence of bonds. If <atomlist> is supplied, use it instead of the currently selected atoms. """ ###@@@ should make sure we don't traverse interspace bonds, until all bugs creating them are fixed cmd = greenmsg("Select Connected: ") if atomlist is None and not self.selatoms: msg = redmsg("No atoms selected") env.history.message(cmd + msg) return if atomlist is None: # test for None since atomlist can be an empty list. atomlist = self.selatoms.values() catoms = self.getConnectedAtoms(atomlist) if not len(catoms): return natoms = 0 for atom in catoms[:]: if not atom.picked: atom.pick() if atom.picked: # Just in case a selection filter was applied to this atom. natoms += 1 from PlatformDependent import fix_plurals info = fix_plurals( "%d connected atom(s) selected." % natoms) env.history.message( cmd + info) self.o.gl_update()
ab1c10701c4a5e1193a1255c8aabbcc77bed0aec /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11221/ab1c10701c4a5e1193a1255c8aabbcc77bed0aec/ops_connected.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2027, 8932, 12, 2890, 16, 3179, 1098, 273, 599, 4672, 3536, 6766, 87, 1281, 3179, 716, 848, 506, 8675, 628, 1281, 4551, 3170, 3179, 3059, 279, 3102, 434, 15692, 18, 971, 411, 7466, 1098,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2027, 8932, 12, 2890, 16, 3179, 1098, 273, 599, 4672, 3536, 6766, 87, 1281, 3179, 716, 848, 506, 8675, 628, 1281, 4551, 3170, 3179, 3059, 279, 3102, 434, 15692, 18, 971, 411, 7466, 1098,...
if model == 'ir.actions.act_window' \ and 'search_view_id' in datas \ and datas['search_view_id']: datas['search_view_id'] = datas['search_view_id'][0]
def _result_get(x, keys): if x[1] in keys: return False keys.append(x[1]) if x[3]: model,id = x[2].split(',') # FIXME: It might be a good idea to opt-in that kind of stuff # FIXME: instead of arbitrarily removing random fields fields = [ field for field in self.pool.get(model).fields_get_keys(cr, uid) if field not in EXCLUDED_FIELDS]
9b25bd6eb49bd02c5f6a3d8e3f6e0a0bee2da17f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/9b25bd6eb49bd02c5f6a3d8e3f6e0a0bee2da17f/ir_values.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2088, 67, 588, 12, 92, 16, 1311, 4672, 309, 619, 63, 21, 65, 316, 1311, 30, 327, 1083, 1311, 18, 6923, 12, 92, 63, 21, 5717, 309, 619, 63, 23, 14542, 938, 16, 350, 273, 619, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2088, 67, 588, 12, 92, 16, 1311, 4672, 309, 619, 63, 21, 65, 316, 1311, 30, 327, 1083, 1311, 18, 6923, 12, 92, 63, 21, 5717, 309, 619, 63, 23, 14542, 938, 16, 350, 273, 619, ...
self.url_website = 'http://handbrake.fr'
self.url_website = 'http://code.google.com/p/hbfork'
def __init__( self ): super( Project, self ).__init__( 'compute', 'project data' )
9369b172bc7504b3def12d5e3cc2ede2d7479367 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/13161/9369b172bc7504b3def12d5e3cc2ede2d7479367/configure.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 365, 262, 30, 2240, 12, 5420, 16, 365, 262, 16186, 2738, 972, 12, 296, 9200, 2187, 296, 4406, 501, 11, 262, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 365, 262, 30, 2240, 12, 5420, 16, 365, 262, 16186, 2738, 972, 12, 296, 9200, 2187, 296, 4406, 501, 11, 262, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100...
glock.glock_connect(self.model, "game_started", self.game_started) self.model.connect_after("game_changed", self.game_changed) self.model.connect_after("moves_undoing", self.moves_undoing) self.model.connect_after("game_loading", self.game_loading) self.model.connect_after("game_loaded", self.game_loaded) self.model.connect_after("game_ended", self.game_ended)
glock_connect(self.model, "game_started", self.game_started) glock_connect_after(self.model, "game_changed", self.game_changed) glock_connect_after(self.model, "moves_undoing", self.moves_undoing) glock_connect_after(self.model, "game_loading", self.game_loading) glock_connect_after(self.model, "game_loaded", self.game_loaded) glock_connect_after(self.model, "game_ended", self.game_ended)
def __init__(self, gamemodel=None): gtk.DrawingArea.__init__(self) if gamemodel == None: gamemodel = GameModel() self.model = gamemodel glock.glock_connect(self.model, "game_started", self.game_started) self.model.connect_after("game_changed", self.game_changed) self.model.connect_after("moves_undoing", self.moves_undoing) self.model.connect_after("game_loading", self.game_loading) self.model.connect_after("game_loaded", self.game_loaded) self.model.connect_after("game_ended", self.game_ended) self.connect("expose_event", self.expose) self.connect_after("realize", self.on_realized) conf.notify_add("showCords", self.on_show_cords) self.set_size_request(300,300) self.animationStart = time() self.lastShown = None self.deadlist = [] self.autoUpdateShown = True self.padding = 0 # Set to self.pad when setcords is active self.square = 0, 0, 8, 1 # An object global variable with the current # board size self.pad = 0.13 # Padding applied only when setcords is active self._selected = None self._hover = None self._active = None self._redarrow = None self._greenarrow = None self._bluearrow = None self._shown = self.model.ply self._showCords = False self.showCords = conf.get("showCords", False) self._showEnpassant = False self.lastMove = None self.matrix = cairo.Matrix() self.matrixPi = cairo.Matrix.init_rotate(pi) self.cordMatricesState = (0, 0) self._rotation = 0 self.drawcount = 0 self.drawtime = 0 self.animationLock = Lock() self.rotationLock = Lock()
00b45dfd071453e0e887394c464e17b8d189cd7f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5339/00b45dfd071453e0e887394c464e17b8d189cd7f/BoardView.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 7920, 2284, 33, 7036, 4672, 22718, 18, 26885, 5484, 16186, 2738, 972, 12, 2890, 13, 225, 309, 7920, 2284, 422, 599, 30, 7920, 2284, 273, 14121, 1488, 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, 1001, 2738, 972, 12, 2890, 16, 7920, 2284, 33, 7036, 4672, 22718, 18, 26885, 5484, 16186, 2738, 972, 12, 2890, 13, 225, 309, 7920, 2284, 422, 599, 30, 7920, 2284, 273, 14121, 1488, 1435,...
<script src="http://api.maps.yahoo.com/ajaxymap?v=3.0&amp;appid=%(yahooappid)s"></script>"""
<script src="http://api.maps.yahoo.com/ajaxymap?v=3.0&amp;appid=%(yahooappid)s"></script>""" % args
def generate_openlayers( self ): """ Template for openlayers.html implementing overlay of available Spherical Mercator layers.
f0a2bffc6c6cded0ce183edb340bda2cdbc6c56e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10289/f0a2bffc6c6cded0ce183edb340bda2cdbc6c56e/gdal2tiles.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 67, 3190, 10396, 12, 365, 262, 30, 3536, 5035, 364, 1696, 10396, 18, 2620, 19981, 9218, 434, 2319, 348, 21570, 490, 12610, 639, 6623, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 67, 3190, 10396, 12, 365, 262, 30, 3536, 5035, 364, 1696, 10396, 18, 2620, 19981, 9218, 434, 2319, 348, 21570, 490, 12610, 639, 6623, 18, 2, -100, -100, -100, -100, -100, -100, -10...
working directory. This is the default if no options are specified.
working directory.
def main(args): usage_msg="""Usage: python testrunner.py options If run without options, testrunner will display this usage message. If you want to run all test suites found in all subdirectories of the current working directory, use the -a option. options: -a Run all tests found in all subdirectories of the current working directory. This is the default if no options are specified. -m Run all tests in a single, giant suite (consolidates error reporting). [default] -M Run each test file's suite separately (noisier output, may help in isolating global effects later). -p Add 'lib/python' to the Python search path. [default] -P *Don't* add 'lib/python' to the Python search path. -d dirpath Run all tests found in the directory specified by dirpath, and recursively in all its subdirectories. The dirpath should be a full system path. -f filepath Run the test suite found in the file specified. The filepath should be a fully qualified path to the file to be run. -v level Set the Verbosity level to level. Newer versions of unittest.py allow more options than older ones. Allowed values are: 0 - Silent 1 - Quiet (produces a dot for each succesful test) 2 - Verbose (default - produces a line of output for each test) -q Run tests without producing verbose output. The tests are normally run in verbose mode, which produces a line of output for each test that includes the name of the test and whether it succeeded. Running with -q is the same as running with -v1. -o filename Output test results to the specified file rather than to stderr. -h Display usage information. """ pathname=None filename=None test_all=None verbosity = VERBOSE mega_suite = 1 set_python_path = 1 options, arg=getopt.getopt(args, 'amPhd:f:v:qMo:') if not options: err_exit(usage_msg) for name, value in options: name=name[1:] if name == 'a': test_all=1 elif name == 'm': mega_suite = 1 elif name == 'M': mega_suite = 0 elif name == 'p': set_python_path = 1 elif name == 'P': set_python_path = 0 elif name == 'd': pathname=string.strip(value) elif name == 'f': filename=string.strip(value) elif name == 'h': err_exit(usage_msg, 0) elif name == 'v': verbosity = int(value) elif name == 'q': verbosity = 1 elif name == 'o': f = open(value,'w') sys.stderr = f else: err_exit(usage_msg) os.path.walk(os.curdir, remove_stale_bytecode, None) testrunner = TestRunner( os.getcwd() , verbosity=verbosity , mega_suite=mega_suite) if set_python_path: script = sys.argv[0] script_dir = os.path.split( os.path.abspath( script ) )[0] zope_dir = os.path.abspath( os.path.join( script_dir, '..' ) ) sw_home = os.path.join( zope_dir, 'lib', 'python' ) if verbosity > 1: testrunner.report( "Adding %s to sys.path." % sw_home ) sys.path.insert( 0, sw_home ) os.environ['SOFTWARE_HOME'] = sw_home try: # Try to set up the testing environment (esp. INSTANCE_HOME, # so we use the right custom_zodb.py.) import Testing except ImportError: pass if test_all: testrunner.runAllTests() elif pathname: testrunner.runPath(pathname) elif filename: testrunner.runFile(filename) ## Report overall errors / failures if there were any fails = reduce(lambda x, y: x + len(y.failures), testrunner.results, 0) errs = reduce(lambda x, y: x + len(y.errors), testrunner.results, 0) if fails or errs: msg = '=' * 70 msg += "\nOVERALL FAILED (" if fails: msg += "total failures=%d" % fails if errs: if fails: msg += ", " msg += "total errors=%d" % errs msg += ")" err_exit(msg, 1) sys.exit(0)
dc50791ca5f2ca00bea841eb5f02d505400400c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/dc50791ca5f2ca00bea841eb5f02d505400400c3/testrunner.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 1968, 4672, 225, 4084, 67, 3576, 1546, 3660, 5357, 30, 5790, 268, 281, 313, 318, 1224, 18, 2074, 702, 225, 971, 1086, 2887, 702, 16, 268, 281, 313, 318, 1224, 903, 2562, 333,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 1968, 4672, 225, 4084, 67, 3576, 1546, 3660, 5357, 30, 5790, 268, 281, 313, 318, 1224, 18, 2074, 702, 225, 971, 1086, 2887, 702, 16, 268, 281, 313, 318, 1224, 903, 2562, 333,...
'description' : """ * Save the Thunderbird plug­in. \n * Follow the Steps to configure OpenERP in Thunderbird. \n -> 1. Go to Tools > OpenERP Synchronization. \n -> 2. check data (configured by default). \n -> 3. Click Test Connection. \n -> 4. A message appears with state of your connection. \n -> 5. If your connection failed, check if your database is open, and check your data. \n -> 6. If you have a good connection, click Ok and start to archive mail in OpenERP.
'description' : """ * Save the Thunderbird plug­in. \n * Follow the Steps to configure OpenERP in Thunderbird. \n -> 1. Go to Tools > OpenERP Synchronization. \n -> 2. check data (configured by default). \n -> 3. Click Test Connection. \n -> 4. A message appears with state of your connection. \n -> 5. If your connection failed, check if your database is open, and check your data. \n -> 6. If you have a good connection, click Ok and start to archive mail in OpenERP."""
def default_get(self, cr, uid, fields, context={}): data = super(thunderbird_installer, self).default_get(cr, uid, fields, context) pdf_file = open(config['addons_path'] + "/thunderbird/doc/Installation Guide to OpenERP Thunderbid Plug-in.pdf", 'r') data['pdf_file'] = base64.encodestring(pdf_file.read()) file = open(config['addons_path'] + "/thunderbird/plugin/OpenERP_plugin-2.0.xpi", 'r') data['plugin_file'] = base64.encodestring(file.read()) return data
ddc18f506e0553d64edb5647896a55443de810fd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/ddc18f506e0553d64edb5647896a55443de810fd/installer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 805, 67, 588, 12, 2890, 16, 4422, 16, 4555, 16, 1466, 16, 819, 12938, 4672, 501, 273, 2240, 12, 451, 9341, 31245, 67, 20163, 16, 365, 2934, 1886, 67, 588, 12, 3353, 16, 4555, 16, 146...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 805, 67, 588, 12, 2890, 16, 4422, 16, 4555, 16, 1466, 16, 819, 12938, 4672, 501, 273, 2240, 12, 451, 9341, 31245, 67, 20163, 16, 365, 2934, 1886, 67, 588, 12, 3353, 16, 4555, 16, 146...
__instances = {}
def __init__(self): self.__instances = {}
def implements (*interfaces): # Get parent exection frame frame = inspect.stack()[1][0] # Get locals from it locals = frame.f_locals if ((locals is frame.f_globals) or ('__module__' not in locals)): raise TypeError('implements() can only be used in class definition') if '_implements' in locals: raise TypeError('implements() could be used only once') locals.setdefault('_implements',[]).extend(interfaces) # TODO: trac also all base interfaces (if needed)
0566ebb826baebacd4ccdc70d4b7202a845775a1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3600/0566ebb826baebacd4ccdc70d4b7202a845775a1/com.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4792, 261, 14, 15898, 4672, 468, 968, 982, 431, 794, 2623, 2623, 273, 5334, 18, 3772, 1435, 63, 21, 6362, 20, 65, 468, 968, 8985, 628, 518, 8985, 273, 2623, 18, 74, 67, 17977, 225, 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, 4792, 261, 14, 15898, 4672, 468, 968, 982, 431, 794, 2623, 2623, 273, 5334, 18, 3772, 1435, 63, 21, 6362, 20, 65, 468, 968, 8985, 628, 518, 8985, 273, 2623, 18, 74, 67, 17977, 225, 3...
return
return True
def alpm_install_targets(self, targets, repo = None): # TODO: check if there's something searched for or a repo selected, and # update the pkg_treeview accordingly self.busy_status_label = self.all_widgets.get_widget('busy_status_label') number_pkgs_to_download =\ self.alpm_get_number_of_packages_to_download(targets)
8f90b0f951a01773d8498fe71f08a3fa9c6bba7e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2759/8f90b0f951a01773d8498fe71f08a3fa9c6bba7e/gui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 524, 7755, 67, 5425, 67, 11358, 12, 2890, 16, 5774, 16, 3538, 273, 599, 4672, 468, 2660, 30, 866, 309, 1915, 1807, 5943, 19242, 364, 578, 279, 3538, 3170, 16, 471, 468, 1089, 326, 3475...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 524, 7755, 67, 5425, 67, 11358, 12, 2890, 16, 5774, 16, 3538, 273, 599, 4672, 468, 2660, 30, 866, 309, 1915, 1807, 5943, 19242, 364, 578, 279, 3538, 3170, 16, 471, 468, 1089, 326, 3475...
ctx = Context("SSH_MAT_" + target + username, { "expire": 30, "alert_on_expire": self.alert }, update = True, idmef=idmef) ctx.addAlertReference(idmef)
ctx = Context("SSH_MAT_" + target + username, { "expire": 30, "alert_on_expire": self.alert }, update=True) if ctx.getUpdateCount() == 0: ctx.authtype = { data: True } ctx.addAlertReference(idmef)
def run(self, idmef): if idmef.Get("alert.analyzer(-1).manufacturer") != "OpenSSH": return
88d7d04acb73c7d4f4de9fc20f41c0126fa2396e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3386/88d7d04acb73c7d4f4de9fc20f41c0126fa2396e/opensshauth.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 16, 612, 3501, 74, 4672, 309, 612, 3501, 74, 18, 967, 2932, 11798, 18, 13647, 19236, 21, 2934, 4728, 13019, 7923, 480, 315, 3678, 12559, 6877, 327, 2, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1086, 12, 2890, 16, 612, 3501, 74, 4672, 309, 612, 3501, 74, 18, 967, 2932, 11798, 18, 13647, 19236, 21, 2934, 4728, 13019, 7923, 480, 315, 3678, 12559, 6877, 327, 2, -100, -100, -100, ...
... yield 2
... yield 2
... def f(i):
bf39f862ae932b4c89c2b39409add25af9507824 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/bf39f862ae932b4c89c2b39409add25af9507824/test_generators.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1372, 540, 1652, 284, 12, 77, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1372, 540, 1652, 284, 12, 77, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
if options.get('active'): user.is_active = True else: user.is_active = False
user.is_active = options.get('active')
def handle(self, *args, **options): try: username = args[0] except IndexError: raise CommandError("You must give a username as first argument.")
b72e5f51c5582792062b3d589bb4b3480d8d17a3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11651/b72e5f51c5582792062b3d589bb4b3480d8d17a3/createyoupiuser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 12, 2890, 16, 380, 1968, 16, 2826, 2116, 4672, 775, 30, 2718, 273, 833, 63, 20, 65, 1335, 10195, 30, 1002, 3498, 668, 2932, 6225, 1297, 8492, 279, 2718, 487, 1122, 1237, 1199, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 12, 2890, 16, 380, 1968, 16, 2826, 2116, 4672, 775, 30, 2718, 273, 833, 63, 20, 65, 1335, 10195, 30, 1002, 3498, 668, 2932, 6225, 1297, 8492, 279, 2718, 487, 1122, 1237, 1199, 13...
curdir = os.path.abspath(os.path.curdir) for dirname in os.path.split(destination)[0].split(os.path.sep): curdir = os.path.join(curdir, dirname) if dirname and not os.path.exists(curdir): os.mkdir(curdir)
if not os.path.exists(os.path.split(destination)[0]): os.makedirs(destination) return
def _create_missing_local_dirs(self, destination): curdir = os.path.abspath(os.path.curdir) for dirname in os.path.split(destination)[0].split(os.path.sep): curdir = os.path.join(curdir, dirname) if dirname and not os.path.exists(curdir): os.mkdir(curdir)
39ab134c1d41f7ed18823146d9219cf67aac99f9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6575/39ab134c1d41f7ed18823146d9219cf67aac99f9/abstractclient.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2640, 67, 7337, 67, 3729, 67, 8291, 12, 2890, 16, 2929, 4672, 309, 486, 1140, 18, 803, 18, 1808, 12, 538, 18, 803, 18, 4939, 12, 10590, 25146, 20, 65, 4672, 1140, 18, 81, 9477, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2640, 67, 7337, 67, 3729, 67, 8291, 12, 2890, 16, 2929, 4672, 309, 486, 1140, 18, 803, 18, 1808, 12, 538, 18, 803, 18, 4939, 12, 10590, 25146, 20, 65, 4672, 1140, 18, 81, 9477, ...
yield self.startTag(token[1], token[2])
if len(token) == 4: namespace, name, attrib = token[1:] else: namespace = default_namespace name, attrib = token[1:] yield self.startTag(namespace, name, attrib)
def __iter__(self): for token in self.tree: type = token[0] if type == "StartTag": yield self.startTag(token[1], token[2]) elif type == "EndTag": yield self.endTag(token[1]) elif type == "EmptyTag": for token in self.emptyTag(token[1], token[2]): yield token elif type == "Comment": yield self.comment(token[1]) elif type in ("Characters", "SpaceCharacters"): for token in self.text(token[1]): yield token elif type == "Doctype": yield self.doctype(token[1]) else: raise ValueError("Unknown token type: " + type)
55caa340f6c309edec2b0c01f138178c92932e48 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9368/55caa340f6c309edec2b0c01f138178c92932e48/test_serializer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2165, 972, 12, 2890, 4672, 364, 1147, 316, 365, 18, 3413, 30, 618, 273, 1147, 63, 20, 65, 309, 618, 422, 315, 30512, 6877, 309, 562, 12, 2316, 13, 422, 1059, 30, 1981, 16, 508,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2165, 972, 12, 2890, 4672, 364, 1147, 316, 365, 18, 3413, 30, 618, 273, 1147, 63, 20, 65, 309, 618, 422, 315, 30512, 6877, 309, 562, 12, 2316, 13, 422, 1059, 30, 1981, 16, 508,...
yield "<tr><td>%s</td><td>%s</td><td>%s</td></tr>\n" %\
yield "<tr><td>%s</td><td>%s</td><td>%s</td></tr>" %\
def draw_dead_hosts(self, *deadhosts): """Draw the "dead hosts" table"""
6f759d61aa9f4714f83d32476fcc23e0c846d5e7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7314/6f759d61aa9f4714f83d32476fcc23e0c846d5e7/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3724, 67, 22097, 67, 11588, 12, 2890, 16, 380, 22097, 11588, 4672, 3536, 6493, 326, 315, 22097, 7206, 6, 1014, 8395, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 3724, 67, 22097, 67, 11588, 12, 2890, 16, 380, 22097, 11588, 4672, 3536, 6493, 326, 315, 22097, 7206, 6, 1014, 8395, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
checkCharacterReading(getDictionaryEntries(dictionary), reading,
checkCharacterReading(dictionary, reading,
def main(): # parse command line parameters try: opts, args = getopt.getopt(sys.argv[1:], "w:rc", ["help", "pinyin", "character-variants", "set-dictionary=", "ignore-fifth"]) except getopt.GetoptError: # print help information and exit usage() sys.exit(2) # get default dictionary dictionaryDic = {} for dictionary in DICTIONARY_READING.keys(): dictionaryDic[dictionary.lower()] = dictionary dictionary = DICTIONARY_READING.keys()[0] ignoreFifthTone = False # if True, no error will be reported when tone shifts to neutral tone checkReading = False checkVariants = False # start to check parameters if len(opts) == 0: print "use parameter -h for a short summary on supported functions" for o, a in opts: a = a.decode(default_encoding) # help screen if o in ("-h", "--help"): usage() sys.exit() # setting of dictionary elif o in ("-w", "--set-dictionary"): if a.lower() in dictionaryDic.keys(): dictionary = a else: print "not a valid dictionary" # check reading elif o in ("--ignore-fifth"): ignoreFifthTone = True # check reading mapping elif o in ("-r", "--reading"): checkReading = True # check variant mapping elif o in ("-c", "--character-variants"): checkVariants = True if checkReading or checkVariants: print "Checking " + dictionary if checkReading: reading, readingOptions \ = DICTIONARY_READING[dictionaryDic[dictionary.lower()]] checkCharacterReading(getDictionaryEntries(dictionary), reading, readingOptions, ignoreFifthTone) if checkVariants: checkCharacterVariants(getDictionaryEntries(dictionary))
03ee2902c9101f1e847d6ed9b78fc134a514e71a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11128/03ee2902c9101f1e847d6ed9b78fc134a514e71a/checkcedict.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 468, 1109, 1296, 980, 1472, 775, 30, 1500, 16, 833, 273, 336, 3838, 18, 588, 3838, 12, 9499, 18, 19485, 63, 21, 30, 6487, 315, 91, 30, 1310, 3113, 8247, 5201, 3113, 315, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 468, 1109, 1296, 980, 1472, 775, 30, 1500, 16, 833, 273, 336, 3838, 18, 588, 3838, 12, 9499, 18, 19485, 63, 21, 30, 6487, 315, 91, 30, 1310, 3113, 8247, 5201, 3113, 315, ...
converter=conn.getConverter()
if converter is None: converter=conn.getConverter()
def _uniqueWhere(cls, conn, kw): """given a connection and kw, using _matchUnique, generate a where clause to select a unique row. """ unique = cls._matchUnique(kw) if not unique: raise ValueError, 'No way to get unique row! %s %s' % \ (str(kw), unique) converter=conn.getConverter() if len(unique)==1: u=tuple(unique)[0] sql=str(EQ(FIELD(u), kw[u], converter=converter)) else: sql=str(AND(converter=converter, *[EQ(FIELD(u), kw[u]) for u in unique])) return sql, converter.values
1e90cec39e33610ec66eb5f5d2969bba1d7d215f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2304/1e90cec39e33610ec66eb5f5d2969bba1d7d215f/base.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 6270, 5262, 12, 6429, 16, 1487, 16, 5323, 4672, 3536, 10822, 279, 1459, 471, 5323, 16, 1450, 389, 1916, 6303, 16, 2103, 279, 1625, 6591, 358, 2027, 279, 3089, 1027, 18, 3536, 3089, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 6270, 5262, 12, 6429, 16, 1487, 16, 5323, 4672, 3536, 10822, 279, 1459, 471, 5323, 16, 1450, 389, 1916, 6303, 16, 2103, 279, 1625, 6591, 358, 2027, 279, 3089, 1027, 18, 3536, 3089, ...
elif heights is not None and self.num_verts() > 0:
elif layout == 'tree': if not self.is_tree(): raise RuntimeError("Cannot use tree layout on this graph: self.is_tree() returns False.") verts = self.vertices() if tree_root is None: from sage.misc.prandom import randrange root = verts[randrange(self.num_verts())] else: root = tree_root seen = [root] queue = [root] heights = [-1]*self.num_verts() heights[verts.index(root)] = 0 while queue: u = queue.pop(0) for v in self.neighbors(u): if v not in seen: seen.append(v) queue.append(v) heights[verts.index(v)] = heights[verts.index(u)] + 1 if tree_orientation == 'down': maxx = max(heights) heights = [maxx - heights[i] for i in xrange(self.num_verts())] heights_dict = {} for v in self: if not heights_dict.has_key(heights[verts.index(v)]): heights_dict[heights[verts.index(v)]] = [v] else: heights_dict[heights[verts.index(v)]].append(v) heights = heights_dict if heights is not None and pos is None and self.num_verts() > 0:
def plot(self, pos=None, layout=None, vertex_labels=True, edge_labels=False, vertex_size=200, graph_border=False, vertex_colors=None, partition=None, edge_colors=None, scaling_term=0.05, iterations=50, loop_size=.1, talk=False, color_by_label=False, heights=None, edge_style=None, save_pos=False): """ Returns a graphics object representing the (di)graph. INPUT: pos -- an optional positioning dictionary layout -- what kind of layout to use, takes precedence over pos 'circular' -- plots the graph with vertices evenly distributed on a circle 'spring' -- uses the traditional spring layout, using the graph's current positions as initial positions vertex_labels -- whether to print vertex labels edge_labels -- whether to print edge labels. By default, False, but if True, the result of str(l) is printed on the edge for each label l. Labels equal to None are not printed. vertex_size -- size of vertices displayed graph_border -- whether to include a box around the graph vertex_colors -- optional dictionary to specify vertex colors: each key is a color recognizable by matplotlib, and each corresponding entry is a list of vertices. If a vertex is not listed, it looks invisible on the resulting plot (it doesn't get drawn). edge_colors -- a dictionary specifying edge colors: each key is a color recognized by matplotlib, and each entry is a list of edges. partition -- a partition of the vertex set. if specified, plot will show each cell in a different color. vertex_colors takes precedence. scaling_term -- default is 0.05. if vertices are getting chopped off, increase; if graph is too small, decrease. should be positive, but values much bigger than 1/8 won't be useful unless the vertices are huge talk -- if true, prints large vertices with white backgrounds so that labels are legible on slides iterations -- how many iterations of the spring layout algorithm to go through, if applicable color_by_label -- if True, color edges by their labels heights -- if specified, this is a dictionary from a set of floating point heights to a set of vertices edge_style -- keyword arguments passed into the edge-drawing routine. This currently only works for directed graphs, since we pass off the undirected graph to networkx save_pos -- save position computed during plotting
16390a39b3fac9559dbead5f9d7bd86320e67f60 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/16390a39b3fac9559dbead5f9d7bd86320e67f60/graph.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3207, 12, 2890, 16, 949, 33, 7036, 16, 3511, 33, 7036, 16, 5253, 67, 5336, 33, 5510, 16, 3591, 67, 5336, 33, 8381, 16, 5253, 67, 1467, 33, 6976, 16, 2667, 67, 8815, 33, 8381, 16, 5...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3207, 12, 2890, 16, 949, 33, 7036, 16, 3511, 33, 7036, 16, 5253, 67, 5336, 33, 5510, 16, 3591, 67, 5336, 33, 8381, 16, 5253, 67, 1467, 33, 6976, 16, 2667, 67, 8815, 33, 8381, 16, 5...
if 'BEGIN WAVELENGTH' in record: wavelength = record.replace('BEGIN WAVELENGTH', '').strip()
if 'BEGIN WAVELENGTH ' in record: wavelength = record.replace('BEGIN WAVELENGTH ', '').strip()
def _parse_crystal(self, crystal_records): '''Parse the interesting information out of the crystal description.'''
6ffb5b650d7622d6e049131a8377d82fc2539589 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3290/6ffb5b650d7622d6e049131a8377d82fc2539589/XInfo.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2670, 67, 3353, 31365, 12, 2890, 16, 4422, 31365, 67, 7094, 4672, 9163, 3201, 326, 26122, 1779, 596, 434, 326, 4422, 31365, 2477, 1093, 6309, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 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, 2670, 67, 3353, 31365, 12, 2890, 16, 4422, 31365, 67, 7094, 4672, 9163, 3201, 326, 26122, 1779, 596, 434, 326, 4422, 31365, 2477, 1093, 6309, 2, -100, -100, -100, -100, -100, -100, ...
current_version=0
current_version=1
def check_dbversion(): cfg = Config.Config() current_version=0 try: dbversion=cfg.GetConfigItem("dbversion") except: #print "WARNING: dbversion tag added to database." #dbversion=0 #print cfg.NewConfigItem("dbversion","%s"%dbversion) print "WARNING: dbversion tag not found." print " : Check that your DB structure is up to date." return 0 dbversion=int(dbversion) if dbversion < current_version: print "WARNING: dbversion tag indicates your database is out of date." print " : Recommend running with -u option." return 1
91f7f2366c0f0ea552b851b2ac7df1d63165ca37 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11694/91f7f2366c0f0ea552b851b2ac7df1d63165ca37/DBSync.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 1966, 1589, 13332, 2776, 273, 1903, 18, 809, 1435, 783, 67, 1589, 33, 21, 225, 775, 30, 1319, 1589, 33, 7066, 18, 967, 809, 1180, 2932, 1966, 1589, 7923, 1335, 30, 468, 1188, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 1966, 1589, 13332, 2776, 273, 1903, 18, 809, 1435, 783, 67, 1589, 33, 21, 225, 775, 30, 1319, 1589, 33, 7066, 18, 967, 809, 1180, 2932, 1966, 1589, 7923, 1335, 30, 468, 1188, ...
>>> m235.close()
>>> def m235():
82675db194a0b6021e6c2528f6442b5fafe69951 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/82675db194a0b6021e6c2528f6442b5fafe69951/test_generators.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 4080, 1652, 312, 30803, 13332, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 4080, 1652, 312, 30803, 13332, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
if hasattr(self, 'aq_base') and hasattr(self.aq_base, 'index_html'):
if hasattr(self, 'index_html'):
def HEAD(self, REQUEST, RESPONSE): """Retrieve resource information without a response body.""" self.dav__init(REQUEST, RESPONSE) if hasattr(self, 'aq_base') and hasattr(self.aq_base, 'index_html'): if hasattr(self.index_html, 'HEAD'): return self.index_html.HEAD(REQUEST, RESPONSE) raise 'Method Not Allowed', ( 'Method not supported for this resource.' ) raise 'Not Found', 'The requested resource does not exist.'
97e3d8562343dbb5e8e14805129c887ed57b9c77 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/97e3d8562343dbb5e8e14805129c887ed57b9c77/Collection.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14792, 12, 2890, 16, 12492, 16, 20645, 4672, 3536, 5767, 1058, 1779, 2887, 279, 766, 1417, 12123, 365, 18, 20752, 972, 2738, 12, 5519, 16, 20645, 13, 565, 309, 3859, 12, 2890, 16, 296, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14792, 12, 2890, 16, 12492, 16, 20645, 4672, 3536, 5767, 1058, 1779, 2887, 279, 766, 1417, 12123, 365, 18, 20752, 972, 2738, 12, 5519, 16, 20645, 13, 565, 309, 3859, 12, 2890, 16, 296, ...
self.set_x_st = xmarg self.set_y_st = ymarg
self.set_x_mrg = xmarg self.set_y_mrg = ymarg
def SetMarg(self, xmarg, ymarg): self.set_x_st = xmarg self.set_y_st = ymarg self.set_y_end = ymarg
b25cb7db43121f1f6899b7ebfcd6ccc3806dd0f6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/b25cb7db43121f1f6899b7ebfcd6ccc3806dd0f6/calendar.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1000, 49, 3175, 12, 2890, 16, 25179, 3175, 16, 677, 81, 3175, 4672, 365, 18, 542, 67, 92, 67, 21387, 75, 273, 25179, 3175, 365, 18, 542, 67, 93, 67, 21387, 75, 273, 677, 81, 3175, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1000, 49, 3175, 12, 2890, 16, 25179, 3175, 16, 677, 81, 3175, 4672, 365, 18, 542, 67, 92, 67, 21387, 75, 273, 25179, 3175, 365, 18, 542, 67, 93, 67, 21387, 75, 273, 677, 81, 3175, ...
@param width: branch width for this clade (including parent branch)
@param width: branch width for this clade (including branch from parent)
def confidence(self): """Equivalent to self.confidences[0] if there is only 1 value.
3ad93fd5d849632e287a1986057477528a749750 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7167/3ad93fd5d849632e287a1986057477528a749750/PhyloXML.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15588, 12, 2890, 4672, 3536, 22606, 358, 365, 18, 3923, 350, 2369, 63, 20, 65, 309, 1915, 353, 1338, 404, 460, 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, 0, 0, 0, 0, 0, 0, 0, 0, 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, 15588, 12, 2890, 4672, 3536, 22606, 358, 365, 18, 3923, 350, 2369, 63, 20, 65, 309, 1915, 353, 1338, 404, 460, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
doc = Template(template=DOCUMENT_TEMPLATE).generate(namespace)
doc = Template(template=DOCUMENT_TEMPLATE).generate(namespace) + '\n'
def create_html_doc(lib, outpath, title=None): if not title: title = '%s - Documentation' % lib.name generated = utils.get_timestamp(daysep='-', millissep=None) namespace = Namespace(LIB=lib, TITLE=title, GENERATED=generated) doc = Template(template=DOCUMENT_TEMPLATE).generate(namespace) outfile = open(outpath, 'w') outfile.write(doc + '\n') outfile.close()
7b61341aa220824927a7a0b07813249928c7d581 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7408/7b61341aa220824927a7a0b07813249928c7d581/libdoc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 2620, 67, 2434, 12, 2941, 16, 596, 803, 16, 2077, 33, 7036, 4672, 309, 486, 2077, 30, 2077, 273, 1995, 87, 300, 20495, 11, 738, 2561, 18, 529, 4374, 273, 2990, 18, 588, 67, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 2620, 67, 2434, 12, 2941, 16, 596, 803, 16, 2077, 33, 7036, 4672, 309, 486, 2077, 30, 2077, 273, 1995, 87, 300, 20495, 11, 738, 2561, 18, 529, 4374, 273, 2990, 18, 588, 67, ...
output += 'no qualified users, try new search'
output += '<p>no qualified users, try new search.</p>' elif len(users1) > MAXSELECTUSERS: output += '<p><strong>%s hits</strong>, to many qualified users, specify more narrow search.</p>' % (len(users1), )
def perform_delegate_adduserrole(req, id_role=0, email_user_pattern='', id_user=0, confirm=0): """let a lower level web admin add users to a limited set of roles. id_role - the role to connect to a user id_user - the user to connect to a role confirm - make the connection happen """ # finding the allowed roles for this user id_admin = getUid(req) id_action = acca.acc_getActionId(name_action=DELEGATEADDUSERROLE) actions = acca.acc_findPossibleActionsUser(id_user=id_admin, id_action=id_action) allowed_roles = [] allowed_id_roles = [] for (id, arglistid, name_role_help) in actions[1:]: id_role_help = acca.acc_getRoleId(name_role=name_role_help) if id_role_help and [id_role_help, name_role_help, ''] not in allowed_roles: allowed_roles.append([id_role_help, name_role_help, '']) allowed_id_roles.append(str(id_role_help)) output = '' if not allowed_roles: subtitle = 'no delegation rights' output += """ <p> You do not have the delegation rights over any roles.<br> If you think you should have such rights, contact a WebAccess Administrator. </p>""" extra = '' else: subtitle = 'step 1 - select role' output += """ <p> Lower level delegation of access rights to roles.<br> An administrator with all rights have to give you these rights. </p>""" email_out = acca.acc_getUserEmail(id_user=id_user) name_role = acca.acc_getRoleName(id_role=id_role) output += createroleselect(id_role=id_role, step=1, name='id_role', action='delegate_adduserrole', roles=allowed_roles) if str(id_role) != '0' and str(id_role) in allowed_id_roles: subtitle = 'step 2 - search for users' # remove letters not allowed in an email email_user_pattern = cleanstring_email(email_user_pattern) text = ' <span class="adminlabel">2. search pattern </span>\n' text += ' <input class="admin_wvar" type="text" name="email_user_pattern" value="%s" />\n' % (email_user_pattern, ) output += createhiddenform(action="delegate_adduserrole", text=text, button="search for users", id_role=id_role) # pattern is entered if email_user_pattern: # users with matching email-address users1 = run_sql("""SELECT id, email FROM user WHERE email RLIKE '%s' ORDER BY id """ % (email_user_pattern, )) # users that are connected users2 = run_sql("""SELECT DISTINCT u.id, u.email FROM user u LEFT JOIN user_accROLE ur ON u.id = ur.id_user WHERE ur.id_accROLE = '%s' AND u.email RLIKE '%s' ORDER BY u.id """ % (id_role, email_user_pattern)) # no users that match the pattern if not (users1 or users2): output += 'no qualified users, try new search' # show matching users else: subtitle = 'step 3 - select a user' users = [] extrausers = [] for (id, email) in users1: if (id, email) not in users2: users.append([id,email,'']) for (id, email) in users2: extrausers.append([-id, email,'']) output += createuserselect(id_user=id_user, action="delegate_adduserrole", step=3, users=users, extrausers=extrausers, button="add this user", id_role=id_role, email_user_pattern=email_user_pattern) try: id_user = int(id_user) except ValueError: pass # user selected already connected to role if id_user < 0: output += '<p>users in brackets are already attached to the role, try another one...</p>' # a user is selected elif email_out: subtitle = "step 4 - confirm to add user" output += createhiddenform(action="delegate_adduserrole", text='add user <strong>%s</strong> to role <strong>%s</strong>?' % (email_out, name_role), id_role=id_role, email_user_pattern=email_user_pattern, id_user=id_user, confirm=1) # it is confirmed that this user should be added if confirm: # add user result = acca.acc_addUserRole(id_user=id_user, id_role=id_role) if result and result[2]: subtitle = 'step 5 - confirm user added' output += '<p>confirm: user <strong>%s</strong> added to role <strong>%s</strong>.</p>' % (email_out, name_role) else: subtitle = 'step 5 - user could not be added' output += '<p>sorry, but user could not be added.</p>' extra = """ <dl> <dt><a href="delegate_deleteuserrole?id_role=%s">Remove users from role</a></dt> <dd>remove users from the roles you have delegating rights to.</dd> </dl> """ % (id_role, ) return index(req=req, title='Add users to roles', subtitle=subtitle, body=[output, extra], adminarea=1, authorized=1)
911068548336831a628cc7a6d8a3e449446b6170 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1931/911068548336831a628cc7a6d8a3e449446b6170/webaccessadmin_lib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3073, 67, 22216, 67, 1289, 1355, 4615, 12, 3658, 16, 612, 67, 4615, 33, 20, 16, 2699, 67, 1355, 67, 4951, 2218, 2187, 612, 67, 1355, 33, 20, 16, 6932, 33, 20, 4672, 3536, 1810, 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, 3073, 67, 22216, 67, 1289, 1355, 4615, 12, 3658, 16, 612, 67, 4615, 33, 20, 16, 2699, 67, 1355, 67, 4951, 2218, 2187, 612, 67, 1355, 33, 20, 16, 6932, 33, 20, 4672, 3536, 1810, 279, ...
res = res + ' if((m_attrFlags & %s) || !defaults_%s->attr_%s.empty()) {\n' \
res = res + ' if((m_attrFlags & %s) || !((%s *)m_defaults)->attr_%s.empty()) {\n' \
def inline_send(self, classname): res = 'inline void %s::send%s' % (classname, self.cname) res = res + '(Atlas::Bridge & b) const\n' res = res + '{\n' if self.name not in ["parents", "objtype"]: res = res + ' if(m_attrFlags & %s) {\n' % self.flag_name indent = " " else: res = res + ' if((m_attrFlags & %s) || !defaults_%s->attr_%s.empty()) {\n' \ % (self.flag_name, classname, self.name) indent = " "
6752e7312d35dea2cd08e9fb6b1fe7c4ed0abec3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12931/6752e7312d35dea2cd08e9fb6b1fe7c4ed0abec3/AttributeInfo.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6370, 67, 4661, 12, 2890, 16, 7479, 4672, 400, 273, 296, 10047, 918, 738, 87, 2866, 4661, 9, 87, 11, 738, 261, 18340, 16, 365, 18, 71, 529, 13, 400, 273, 400, 397, 7747, 861, 9521, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6370, 67, 4661, 12, 2890, 16, 7479, 4672, 400, 273, 296, 10047, 918, 738, 87, 2866, 4661, 9, 87, 11, 738, 261, 18340, 16, 365, 18, 71, 529, 13, 400, 273, 400, 397, 7747, 861, 9521, ...
infoStr = "ReplicaManager.replicateAndRegister: Storage Element replica not requested." gLogger.info(infoStr,diracSE)
gLogger.info("ReplicaManager.__resolveBestReplicas: %s replica not requested." % diracSE)
def __resolveBestReplicas(self,sourceSE,lfnReplicas,catalogueSize): ########################################################### # Determine the best replicas (remove banned sources, invalid storage elements and file with the wrong size) replicaPreference = [] for diracSE,pfn in lfnReplicas.items(): if sourceSE and diracSE != sourceSE: infoStr = "ReplicaManager.replicateAndRegister: Storage Element replica not requested." gLogger.info(infoStr,diracSE) elif diracSE in bannedSources: infoStr = "ReplicaManager.replicateAndRegister: Storage Element is currently banned as a source." gLogger.info(infoStr,diracSE) else: storageElement = StorageElement(diracSE) if storageElement.isValid()['Value']: if storageElement.getRemoteProtocols()['Value']: res = storageElement.getPfnForProtocol(pfn,self.thirdPartyProtocols) if res['OK']: sourcePfn = res['Value'] res = storageElement.getFileSize(sourcePfn) if res['OK']: sourceFileSize = res['Value'] if catalogueSize == sourceFileSize: fileTuple = (diracSE,sourcePfn) replicaPreference.append(fileTuple) else: errStr = "ReplicaManager.replicateAndRegister: Catalogue size and physical file size mismatch." gLogger.error(errStr,"%s %s" % (diracSE,sourcePfn)) else: errStr = "ReplicaManager.replicateAndRegister: Failed to get physical file size." gLogger.error(errStr,"%s %s: %s" % (sourcePfn,diracSE,res['Message'])) else: errStr = "ReplicaManager.replicateAndRegister: Failed to get PFN for replication for StorageElement." gLogger.error(errStr,"%s %s" % (diracSE,res['Message'])) else: errStr = "ReplicaManager.replicateAndRegister: Source Storage Element has no remote protocols." gLogger.info(errStr,diracSE) else: errStr = "ReplicaManager.replicateAndRegister: Failed to get valid Storage Element." gLogger.error(errStr,diracSE) if not replicaPreference: errStr = "ReplicaManager.getFile: Failed to find any valid StorageElements." gLogger.error(errStr,lfn) return S_ERROR(errStr) else: return S_OK(replicaPreference)
e8a6375e5f8805958dacbec0f1a4c6f0cfc1b690 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12864/e8a6375e5f8805958dacbec0f1a4c6f0cfc1b690/ReplicaManager.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 10828, 14173, 17248, 12, 2890, 16, 3168, 1090, 16, 80, 4293, 17248, 16, 7199, 344, 1225, 4672, 19709, 5516, 3228, 1189, 468, 10229, 326, 3796, 21545, 261, 4479, 324, 10041, 5550, 16,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 10828, 14173, 17248, 12, 2890, 16, 3168, 1090, 16, 80, 4293, 17248, 16, 7199, 344, 1225, 4672, 19709, 5516, 3228, 1189, 468, 10229, 326, 3796, 21545, 261, 4479, 324, 10041, 5550, 16,...
'Download\n' '**********************\n'
'========\n' + 'Download\n' + '========\n'
def read(*rnames): return open(os.path.join(os.path.dirname(__file__), *rnames)).read()
cefc981ed3219e5118924699764c0348c3feabac /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9782/cefc981ed3219e5118924699764c0348c3feabac/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 30857, 86, 1973, 4672, 327, 1696, 12, 538, 18, 803, 18, 5701, 12, 538, 18, 803, 18, 12287, 12, 972, 768, 972, 3631, 380, 86, 1973, 13, 2934, 896, 1435, 225, 2, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 30857, 86, 1973, 4672, 327, 1696, 12, 538, 18, 803, 18, 5701, 12, 538, 18, 803, 18, 12287, 12, 972, 768, 972, 3631, 380, 86, 1973, 13, 2934, 896, 1435, 225, 2, -100, -100, -100,...
]
constants.RAPI_CERT_FILE, constants.RAPI_USERS_FILE, ]) for hv_name in constants.HYPER_TYPES: hv_class = hypervisor.GetHypervisor(hv_name) allowed_files.update(hv_class.GetAncillaryFiles())
def UploadFile(file_name, data, mode, uid, gid, atime, mtime): """Write a file to the filesystem. This allows the master to overwrite(!) a file. It will only perform the operation if the file belongs to a list of configuration files. @type file_name: str @param file_name: the target file name @type data: str @param data: the new contents of the file @type mode: int @param mode: the mode to give the file (can be None) @type uid: int @param uid: the owner of the file (can be -1 for default) @type gid: int @param gid: the group of the file (can be -1 for default) @type atime: float @param atime: the atime to set on the file (can be None) @type mtime: float @param mtime: the mtime to set on the file (can be None) @rtype: boolean @return: the success of the operation; errors are logged in the node daemon log """ if not os.path.isabs(file_name): logging.error("Filename passed to UploadFile is not absolute: '%s'", file_name) return False allowed_files = [ constants.CLUSTER_CONF_FILE, constants.ETC_HOSTS, constants.SSH_KNOWN_HOSTS_FILE, constants.VNC_PASSWORD_FILE, ] if file_name not in allowed_files: logging.error("Filename passed to UploadFile not in allowed" " upload targets: '%s'", file_name) return False raw_data = _Decompress(data) utils.WriteFile(file_name, data=raw_data, mode=mode, uid=uid, gid=gid, atime=atime, mtime=mtime) return True
4501a443735a9948276db4aeb6752226a37770c7 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7542/4501a443735a9948276db4aeb6752226a37770c7/backend.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9414, 812, 12, 768, 67, 529, 16, 501, 16, 1965, 16, 4555, 16, 11399, 16, 622, 494, 16, 13158, 4672, 3536, 3067, 279, 585, 358, 326, 6496, 18, 225, 1220, 5360, 326, 4171, 358, 6156, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9414, 812, 12, 768, 67, 529, 16, 501, 16, 1965, 16, 4555, 16, 11399, 16, 622, 494, 16, 13158, 4672, 3536, 3067, 279, 585, 358, 326, 6496, 18, 225, 1220, 5360, 326, 4171, 358, 6156, 1...
if users>0:
if len(users) > 0:
def getUserEmail(self, p_username, acl_folder): #return the email of the given user id users = acl_folder.findUser(search_param='uid', search_term=p_username) if users>0: return unicode(users[0].get('mail', ''), 'iso-8859-1').encode('utf-8') else: return ''
36dc6eb70ad374772709b7399c873694d8b37066 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3287/36dc6eb70ad374772709b7399c873694d8b37066/plugLDAPUserFolder.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4735, 4134, 12, 2890, 16, 293, 67, 5053, 16, 7895, 67, 5609, 4672, 468, 2463, 326, 2699, 434, 326, 864, 729, 612, 3677, 273, 7895, 67, 5609, 18, 4720, 1299, 12, 3072, 67, 891, 2218, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4735, 4134, 12, 2890, 16, 293, 67, 5053, 16, 7895, 67, 5609, 4672, 468, 2463, 326, 2699, 434, 326, 864, 729, 612, 3677, 273, 7895, 67, 5609, 18, 4720, 1299, 12, 3072, 67, 891, 2218, ...
if CONFIG is BuildConfig.RELEASE and \ re.match(xml_ext_re, f, flags=re.I): src = minify_xml(f, src) elif CONFIG is BuildConfig.RELEASE and f.endswith(".js"): src = minify_js(f, src) src_file.close()
if BuildConfig.is_minified(CONFIG): if re.match(xml_ext_re, f, flags=re.I): src = minify_xml(f, src) elif f.endswith(".js"): src = minify_js(f, src)
def main(): global CONFIG # Defaults
f7b6a6950d9ddde616f30725ff4cdbdbbb56e02f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8389/f7b6a6950d9ddde616f30725ff4cdbdbbb56e02f/build.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 2552, 9128, 225, 468, 14159, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 2552, 9128, 225, 468, 14159, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
p.add_constraint( Sum( r_edge_used[(u,v)] for u in self.neighbors(v)), max = 1-epsilon)
p.add_constraint( Sum(r_edge_used[(u,v)] for u in self.neighbors(v)), max=1-epsilon)
def longest_path(self, s = None, t = None, weighted = False, algorithm = "MILP", solver = None, verbose = 0): r""" Returns a longest path of ``self``.
851087dd5fd3776eb2db10b18fb5402a16a5dd17 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/851087dd5fd3776eb2db10b18fb5402a16a5dd17/generic_graph.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12163, 67, 803, 12, 2890, 16, 272, 273, 599, 16, 268, 273, 599, 16, 13747, 273, 1083, 16, 4886, 273, 315, 49, 2627, 52, 3113, 12776, 273, 599, 16, 3988, 273, 374, 4672, 436, 8395, 28...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12163, 67, 803, 12, 2890, 16, 272, 273, 599, 16, 268, 273, 599, 16, 13747, 273, 1083, 16, 4886, 273, 315, 49, 2627, 52, 3113, 12776, 273, 599, 16, 3988, 273, 374, 4672, 436, 8395, 28...
"%s not in sys.path" % pth_file.imported) self.assertTrue(site.makepath(pth_file.good_dir_path)[0] in sys.path) self.assertTrue(not os.path.exists(pth_file.bad_dir_path))
"%s not in sys.modules" % pth_file.imported) self.assertIn(site.makepath(pth_file.good_dir_path)[0], sys.path) self.assertFalse(os.path.exists(pth_file.bad_dir_path))
def pth_file_tests(self, pth_file): """Contain common code for testing results of reading a .pth file""" self.assertTrue(pth_file.imported in sys.modules, "%s not in sys.path" % pth_file.imported) self.assertTrue(site.makepath(pth_file.good_dir_path)[0] in sys.path) self.assertTrue(not os.path.exists(pth_file.bad_dir_path))
477bd74fb9d12d61f8fb7cbcb55b2cdb33264622 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8125/477bd74fb9d12d61f8fb7cbcb55b2cdb33264622/test_site.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 18540, 67, 768, 67, 16341, 12, 2890, 16, 18540, 67, 768, 4672, 3536, 22928, 2975, 981, 364, 7769, 1686, 434, 6453, 279, 263, 2397, 585, 8395, 365, 18, 11231, 5510, 12, 2397, 67, 768, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 18540, 67, 768, 67, 16341, 12, 2890, 16, 18540, 67, 768, 4672, 3536, 22928, 2975, 981, 364, 7769, 1686, 434, 6453, 279, 263, 2397, 585, 8395, 365, 18, 11231, 5510, 12, 2397, 67, 768, 1...
ls = '\n'.join([(i%st == 0 and (i%sp == 0 and '<span class="special">%*d</span>' or '%*d') % (mw, i) or '') for i in range(fl, fl + lncount)])
lines = [ ] for i in range(fl, fl+lncount): if i % st == 0: if i % sp == 0: if aln: lines.append('<a href=" ' class="special">%*d</a>' % (la, i, mw, i)) else: lines.append('<span class="special">%*d</span>' \ % (mw, i)) else: if aln: lines.append('<a href=" % (la, i, mw, i)) else: lines.append('%*d' % (mw, i)) else: lines.append('') ls = '\n'.join(lines)
def _wrap_tablelinenos(self, inner): dummyoutfile = StringIO.StringIO() lncount = 0 for t, line in inner: if t: lncount += 1 dummyoutfile.write(line)
fe49feead1d111ac433d9d6d1f543ae725fc04de /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2885/fe49feead1d111ac433d9d6d1f543ae725fc04de/html.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4113, 67, 7032, 80, 292, 267, 275, 538, 12, 2890, 16, 3443, 4672, 9609, 26050, 273, 15777, 18, 780, 4294, 1435, 7211, 1883, 273, 374, 364, 268, 16, 980, 316, 3443, 30, 309, 268, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4113, 67, 7032, 80, 292, 267, 275, 538, 12, 2890, 16, 3443, 4672, 9609, 26050, 273, 15777, 18, 780, 4294, 1435, 7211, 1883, 273, 374, 364, 268, 16, 980, 316, 3443, 30, 309, 268, ...
if isinstance(x, (int, long, integer.Integer)):
if isinstance(x, (float, sage.rings.real_mpfr.RealNumber, sage.rings.real_mpfr.RealLiteral)): P = x.parent() if m < 0: return P(0) from sage.functions.all import gamma return gamma(x+1)/gamma(P(m+1))/gamma(x-m+1) if isinstance(x,sage.symbolic.expression.Expression): try: x=x.pyobject() x=ZZ(x) except TypeError: pass else: try: x=ZZ(x) except TypeError: pass if isinstance(x,integer.Integer):
def binomial(x,m): r""" Return the binomial coefficient .. math:: \binom{x}{m} = x (x-1) \cdots (x-m+1) / m! which is defined for `m \in \ZZ` and any `x`. We extend this definition to include cases when `x-m` is an integer but `m` is not by .. math:: \binom{x}{m}= \binom{x}{x-m} If `m < 0`, return `0`. INPUT: - ``x``, ``m`` - numbers or symbolic expressions. Either ``m`` or ``x-m`` must be an integer. OUTPUT: number or symbolic expression (if input is symbolic) EXAMPLES:: sage: binomial(5,2) 10 sage: binomial(2,0) 1 sage: binomial(1/2, 0) 1 sage: binomial(3,-1) 0 sage: binomial(20,10) 184756 sage: binomial(-2, 5) -6 sage: binomial(RealField()('2.5'), 2) 1.87500000000000 sage: n=var('n'); binomial(n,2) 1/2*(n - 1)*n sage: n=var('n'); binomial(n,n) 1 sage: n=var('n'); binomial(n,n-1) n sage: binomial(2^100, 2^100) 1 sage: k, i = var('k,i') sage: binomial(k,i) binomial(k,i) TESTS: We test that certain binomials are very fast (this should be instant) -- see trac 3309:: sage: a = binomial(RR(1140000.78), 42000000) """ if not isinstance(m, (int, long, integer.Integer)): try: m = ZZ(x-m) except TypeError: try: return x.binomial(m) except AttributeError: pass raise TypeError, 'Either m or x-m must be an integer' if isinstance(x, (int, long, integer.Integer)): if x >= 0 and (m < 0 or m > x): return ZZ(0) if m > sys.maxint: m = x - m if m > sys.maxint: raise ValueError, "binomial not implemented for m >= 2^32.\nThis is probably OK, since the answer would have billions of digits." return ZZ(pari(x).binomial(m)) try: P = x.parent() except AttributeError: P = type(x) if m < 0: return P(0) # a (hopefully) temporary fix for #3309; eventually Pari should do # this for us. if isinstance(x, (float, sage.rings.real_mpfr.RealNumber, sage.rings.real_mpfr.RealLiteral)): from sage.functions.all import gamma return gamma(x+1)/gamma(P(m+1))/gamma(x-m+1) return misc.prod([x-i for i in xrange(m)]) / P(factorial(m))
248d7f05db7341eacad62d96e9c70208208cc5e5 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/248d7f05db7341eacad62d96e9c70208208cc5e5/arith.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4158, 11496, 12, 92, 16, 81, 4672, 436, 8395, 2000, 326, 4158, 11496, 16554, 225, 6116, 4233, 2866, 225, 521, 4757, 362, 95, 92, 8637, 81, 97, 273, 619, 261, 92, 17, 21, 13, 521, 431...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4158, 11496, 12, 92, 16, 81, 4672, 436, 8395, 2000, 326, 4158, 11496, 16554, 225, 6116, 4233, 2866, 225, 521, 4757, 362, 95, 92, 8637, 81, 97, 273, 619, 261, 92, 17, 21, 13, 521, 431...
print "self.bdist_dir = %s" % self.bdist_dir print "self.format = %s" % self.format
def run (self):
f7b9d13742cdb1bf2328864184bb90a83169527d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/f7b9d13742cdb1bf2328864184bb90a83169527d/bdist_dumb.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 261, 2890, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 261, 2890, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
aa_list.append(mol.protein.get_amino_acid_id_list())
aa_list = mol.protein.get_amino_acid_id_list()
def update_residue_combobox(self): """ Update the residue combo box with residues belonging to the same protein """ #Urmi 20080728: Update the residue combo box with amino acids for the #currently selected protein in build protein mode self.current_protein = "" previousCommand = self.win.commandSequencer.prevMode # update_residue_combobox: get_current_protein_chunk_name if previousCommand is not None and previousCommand.commandName == 'BUILD_PROTEIN': self.current_protein = previousCommand.propMgr.get_current_protein_chunk_name() else: #Urmi 20080728: if the previous command was zoom or something, just set this to the # first available protein chunk, since there's no way we can access # the current protein in Build protein mode for mol in self.win.assy.molecules: if mol.isProteinChunk(): self.current_protein = mol.name sequence = mol.protein.get_sequence_string() self.sequenceEditor.setSequence(sequence) secStructure = mol.protein.get_secondary_structure_string() self.sequenceEditor.setSecondaryStructure(secStructure) self.sequenceEditor.setRuler(len(secStructure)) break # Urmi 20080728: if the current protein has changed, need to update the residue combo box # as well between two entries into this mode if self.current_protein != self.previous_protein: self.previous_protein = self.current_protein count = self.aminoAcidsComboBox.count() #remove all the old residues for i in range(count): self.aminoAcidsComboBox.removeItem(0) #add all the new residues aa_list = [] for mol in self.win.assy.molecules: if mol.isProteinChunk() and mol.name == self.current_protein: aa_list.append(mol.protein.get_amino_acid_id_list()) break for j in range(len(aa_list)): self.aminoAcidsComboBox.addItem(aa_list[j]) return
bfe70ff3974580d10eba25aebbf7826ffecd9cc9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11221/bfe70ff3974580d10eba25aebbf7826ffecd9cc9/EditRotamers_PropertyManager.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 67, 23388, 67, 9301, 27570, 12, 2890, 4672, 3536, 2315, 326, 14765, 16778, 3919, 598, 25435, 17622, 358, 326, 1967, 14314, 3536, 468, 57, 8864, 77, 4044, 3672, 27, 6030, 30, 2315, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 67, 23388, 67, 9301, 27570, 12, 2890, 4672, 3536, 2315, 326, 14765, 16778, 3919, 598, 25435, 17622, 358, 326, 1967, 14314, 3536, 468, 57, 8864, 77, 4044, 3672, 27, 6030, 30, 2315, ...
iemob.data[ mapping[var] ] = cleaner(sreport.db[sid][ts][var]) * multiplier[var]
if (var == "raw"): iemob.data[ mapping[var] ] = sreport.db[sid][ts][var] else: iemob.data[ mapping[var] ] = cleaner(sreport.db[sid][ts][var]) * multiplier[var]
def real_process(self, buf, cstr): sreport = shefReport.shefReport(buf, cstr )
d3de34c59b840a374e7dfcaefb22ff12994682ae /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11186/d3de34c59b840a374e7dfcaefb22ff12994682ae/shefParse.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2863, 67, 2567, 12, 2890, 16, 1681, 16, 276, 701, 4672, 272, 6006, 273, 23901, 74, 4820, 18, 87, 580, 74, 4820, 12, 4385, 16, 276, 701, 262, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2863, 67, 2567, 12, 2890, 16, 1681, 16, 276, 701, 4672, 272, 6006, 273, 23901, 74, 4820, 18, 87, 580, 74, 4820, 12, 4385, 16, 276, 701, 262, 2, -100, -100, -100, -100, -100, -100, -1...
_fl_create_generic_button = cfuncproto(so_libforms, "fl_create_generic_button",
_fl_create_generic_button = cfuncproto(so_libforms, "fl_create_generic_button",
def fl_get_button_numb(ob): """ fl_get_button_numb(ob) -> num. """ retval = _fl_get_button_numb(ob) return retval
9942dac8ce2b35a1e43615a26fd8e7054ef805d3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2429/9942dac8ce2b35a1e43615a26fd8e7054ef805d3/xformslib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1183, 67, 588, 67, 5391, 67, 2107, 70, 12, 947, 4672, 3536, 1183, 67, 588, 67, 5391, 67, 2107, 70, 12, 947, 13, 317, 818, 18, 3536, 225, 5221, 273, 389, 2242, 67, 588, 67, 5391, 67...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1183, 67, 588, 67, 5391, 67, 2107, 70, 12, 947, 4672, 3536, 1183, 67, 588, 67, 5391, 67, 2107, 70, 12, 947, 13, 317, 818, 18, 3536, 225, 5221, 273, 389, 2242, 67, 588, 67, 5391, 67...
if left[2] <= max_gap_char and right[2] => (len(s) - (len(right[0]) +\
if left[2] <= max_gap_char and right[2] >= (len(s) - (len(right[0]) +\
def linkerTrim(record, tags, max_gap_char=5, **kwargs): '''Use regular expression and (optionally) fuzzy string matching to locate and trim linkers from sequences''' #if record.id == 'FX5ZTWB02DOPOT': # pdb.set_trace() m_type = False s = str(record.seq) left = leftLinker(s, tags, max_gap_char=5, fuzzy=kwargs['fuzzy']) right = rightLinker(s, tags, max_gap_char=5, fuzzy=kwargs['fuzzy']) if left and right and left[0] == right[0]: # we can have lots of conditional matches here if left[2] <= max_gap_char and right[2] => (len(s) - (len(right[0]) +\ max_gap_char)): trimmed = trim(record, left[3], right[2]) # left and right are identical so largely pass back the left # info... except for m_type which can be a combination tag, m_type, seq_match = left[0], left[1]+'-'+right[1]+'-both', \ left[4] else: pass elif left and right and left[0] != right[0]: # flag if left[2] <= max_gap_char and right[2] => (len(s) - (len(right[0]) +\ max_gap_char)): trimmed = None tag, m_type, seq_match = None, 'tag-mismatch', None elif left: if left[2] <= max_gap_char: trimmed = trim(record, left[3]) tag, m_type, seq_match = left[0], left[1]+'-left', left[4] else: # flag pass elif right: if right[2] => (len(s) - (len(right[0]) + max_gap_char)): trimmed = trim(record, None, right[2]) tag, m_type, seq_match = right[0], right[1]+'-right', right[4] else: # flag pass if m_type: try: return tag, trimmed, seq_match, tags[tag], m_type except: return tag, trimmed, seq_match, None, m_type else: return None
783dc609c244bf0cc0fb00a306ab4408f098f654 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10703/783dc609c244bf0cc0fb00a306ab4408f098f654/main.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 28058, 14795, 12, 3366, 16, 2342, 16, 943, 67, 14048, 67, 3001, 33, 25, 16, 2826, 4333, 4672, 9163, 3727, 6736, 2652, 471, 261, 3482, 1230, 13, 21315, 533, 3607, 358, 10627, 471, 2209, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 28058, 14795, 12, 3366, 16, 2342, 16, 943, 67, 14048, 67, 3001, 33, 25, 16, 2826, 4333, 4672, 9163, 3727, 6736, 2652, 471, 261, 3482, 1230, 13, 21315, 533, 3607, 358, 10627, 471, 2209, ...
for blob in self.tree: yield 'add', blob.path
for x in self.tree().ls(): yield 'add', x['href']
def diff_summarize(self): if self.parents: for d in self.parents[0].diff(self.sha): if d.deleted_file: yield 'remove', d.a_blob.path elif d.new_file: yield 'add', d.b_blob.path else: yield 'change', d.a_blob.path else: for blob in self.tree: yield 'add', blob.path
f364aa121f8047991eb2d9904f9f2291356e15b1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1036/f364aa121f8047991eb2d9904f9f2291356e15b1/git_repo.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3122, 67, 1364, 21872, 12, 2890, 4672, 309, 365, 18, 12606, 30, 364, 302, 316, 365, 18, 12606, 63, 20, 8009, 5413, 12, 2890, 18, 7819, 4672, 309, 302, 18, 8600, 67, 768, 30, 2824, 29...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3122, 67, 1364, 21872, 12, 2890, 4672, 309, 365, 18, 12606, 30, 364, 302, 316, 365, 18, 12606, 63, 20, 8009, 5413, 12, 2890, 18, 7819, 4672, 309, 302, 18, 8600, 67, 768, 30, 2824, 29...
site = Site.objects.create(name="site", domain="www.site-rev-1.com")
test = TestModel.objects.create(name="test1.0",)
def setUp(self): """Sets up a versioned site model to test.""" reversion.register(Site) with reversion.revision: site = Site.objects.create(name="site", domain="www.site-rev-1.com") with reversion.revision: site.domain = "www.site-rev-2.com" site.save() self.site = site
7719152dbc21d60cdb83458f397a719b0cdb4820 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11809/7719152dbc21d60cdb83458f397a719b0cdb4820/tests.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24292, 12, 2890, 4672, 3536, 2785, 731, 279, 17083, 2834, 938, 358, 1842, 12123, 283, 1589, 18, 4861, 12, 4956, 13, 598, 283, 1589, 18, 13057, 30, 1842, 273, 7766, 1488, 18, 6911, 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, 24292, 12, 2890, 4672, 3536, 2785, 731, 279, 17083, 2834, 938, 358, 1842, 12123, 283, 1589, 18, 4861, 12, 4956, 13, 598, 283, 1589, 18, 13057, 30, 1842, 273, 7766, 1488, 18, 6911, 18, ...
attributes)
attributes, labels)
def __init__(self, subdir, testname, status, reason, test_kernel, machine, started_time, finished_time, iterations, attributes): # for backwards compatibility with the original parser # implementation, if there is no test version we need a NULL # value to be used; also, if there is a version it should # be terminated by a newline if "version" in attributes: attributes["version"] = str(attributes["version"]) else: attributes["version"] = None
d7a8013bb3ac2b60b444daad6b0edc06f7b4c9f7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12268/d7a8013bb3ac2b60b444daad6b0edc06f7b4c9f7/version_0.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 16921, 16, 1842, 529, 16, 1267, 16, 3971, 16, 1842, 67, 8111, 16, 5228, 16, 5746, 67, 957, 16, 6708, 67, 957, 16, 11316, 16, 1677, 4672, 468, 364, 1272...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 16921, 16, 1842, 529, 16, 1267, 16, 3971, 16, 1842, 67, 8111, 16, 5228, 16, 5746, 67, 957, 16, 6708, 67, 957, 16, 11316, 16, 1677, 4672, 468, 364, 1272...
ok_path = tuple(sys.path)
ok_path = tuple(sys.path)
def reload(self, module, path=None): if path is None and hasattr(module, '__filename__'): head, tail = os.path.split(module.__filename__) path = [os.path.join(head, '')] return ihooks.ModuleImporter.reload(self, module, path)
b9c951d8cedeec531cce217b5117b5d471b1e468 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/b9c951d8cedeec531cce217b5117b5d471b1e468/rexec.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7749, 12, 2890, 16, 1605, 16, 589, 33, 7036, 4672, 309, 589, 353, 599, 471, 3859, 12, 2978, 16, 4940, 3459, 7250, 4672, 910, 16, 5798, 273, 1140, 18, 803, 18, 4939, 12, 2978, 16186, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7749, 12, 2890, 16, 1605, 16, 589, 33, 7036, 4672, 309, 589, 353, 599, 471, 3859, 12, 2978, 16, 4940, 3459, 7250, 4672, 910, 16, 5798, 273, 1140, 18, 803, 18, 4939, 12, 2978, 16186, ...
print count*200.0/lastid, '%,', print count*rate*200.0/lastid, '% of wanted rate',
print '(', print round(count*200.0/lastid), '%, or', print round(count*rate*200.0/lastid), '% of wanted rate )',
def record(v, info, filename, audiofilename, mono, grey, greybits, \ monotreshold, fields, preallocspace): import thread format, x, y, qsize, rate = info fps = 59.64 # Fields per second # XXX (Strange: need fps of Indigo monitor, not of PAL or NTSC!) tpf = 1000.0 / fps # Time per field in msec if filename: vout = VFile.VoutFile(filename) if mono: format = 'mono' elif grey and greybits == 8: format = 'grey' elif grey: format = 'grey'+`abs(greybits)` else: format = 'rgb8' vout.setformat(format) vout.setsize(x, y) if fields: vout.setpf((1, -2)) vout.writeheader() if preallocspace: print 'Preallocating space...' vout.prealloc(preallocspace) print 'done.' MAXSIZE = 20 # XXX should be a user option import Queue queue = Queue.Queue(MAXSIZE) done = thread.allocate_lock() done.acquire_lock() convertor = None if grey: if greybits == 2: convertor = imageop.grey2grey2 elif greybits == 4: convertor = imageop.grey2grey4 elif greybits == -2: convertor = imageop.dither2grey2 thread.start_new_thread(saveframes, \ (vout, queue, done, mono, monotreshold, convertor)) if audiofilename: audiodone = thread.allocate_lock() audiodone.acquire_lock() audiostop = [] initaudio(audiofilename, audiostop, audiodone) gl.wintitle('(rec) ' + filename) lastid = 0 t0 = time.millitimer() count = 0 ids = [] v.InitContinuousCapture(info) while not gl.qtest(): try: cd, id = v.GetCaptureData() except sv.error: #time.millisleep(10) # XXX is this necessary? sgi.nap(1) # XXX Try by Jack continue ids.append(id) id = id + 2*rate
0efafb39da32880543cd890590a4185b05040479 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/0efafb39da32880543cd890590a4185b05040479/Vrec.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1409, 12, 90, 16, 1123, 16, 1544, 16, 20232, 77, 792, 2550, 16, 6921, 83, 16, 5174, 93, 16, 5174, 93, 6789, 16, 521, 6921, 352, 3444, 16, 1466, 16, 675, 9853, 2981, 4672, 1930, 2650,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1409, 12, 90, 16, 1123, 16, 1544, 16, 20232, 77, 792, 2550, 16, 6921, 83, 16, 5174, 93, 16, 5174, 93, 6789, 16, 521, 6921, 352, 3444, 16, 1466, 16, 675, 9853, 2981, 4672, 1930, 2650,...
if _debug: print "\t%s: Called Plane.mapImageToPlane()" % rendererName
debugMsg("Called Plane.mapImageToPlane()")
def mapImageToPlane(self,image): """ Maps an Image object onto a Plane object """ if _debug: print "\t%s: Called Plane.mapImageToPlane()" % rendererName
14a27bcd280a0a7884be8bd64c5e85ab15303932 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8476/14a27bcd280a0a7884be8bd64c5e85ab15303932/plane.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 852, 2040, 774, 19505, 12, 2890, 16, 2730, 4672, 3536, 19837, 392, 3421, 733, 10170, 279, 3008, 8806, 733, 3536, 309, 389, 4148, 30, 1172, 1548, 88, 9, 87, 30, 11782, 3008, 8806, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 852, 2040, 774, 19505, 12, 2890, 16, 2730, 4672, 3536, 19837, 392, 3421, 733, 10170, 279, 3008, 8806, 733, 3536, 309, 389, 4148, 30, 1172, 1548, 88, 9, 87, 30, 11782, 3008, 8806, 18, 1...
rawsource = unescape(string[matchstart:matchend+endmatch.end(1)], 1)
textend = matchend + endmatch.end(1) rawsource = unescape(string[matchstart:textend], 1)
def inline_obj(self, match, lineno, pattern, nodeclass, restore_backslashes=0): string = match.string matchstart = match.start('start') matchend = match.end('start') if self.quoted_start(match): return (string[:matchend], [], string[matchend:], [], '') endmatch = pattern.search(string[matchend:]) if endmatch and endmatch.start(1): # 1 or more chars text = unescape(endmatch.string[:endmatch.start(1)], restore_backslashes) rawsource = unescape(string[matchstart:matchend+endmatch.end(1)], 1) return (string[:matchstart], [nodeclass(rawsource, text)], string[matchend:][endmatch.end(1):], [], endmatch.group(1)) msg = self.reporter.warning( 'Inline %s start-string without end-string ' 'at line %s.' % (nodeclass.__name__, lineno)) text = unescape(string[matchstart:matchend], 1) rawsource = unescape(string[matchstart:matchend], 1) prb = self.problematic(text, rawsource, msg) return string[:matchstart], [prb], string[matchend:], [msg], ''
816927c350eab6c8d1baf3e3aa09f53b2caab704 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1278/816927c350eab6c8d1baf3e3aa09f53b2caab704/states.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6370, 67, 2603, 12, 2890, 16, 845, 16, 7586, 16, 1936, 16, 756, 1106, 16, 5217, 67, 823, 13675, 33, 20, 4672, 533, 273, 845, 18, 1080, 845, 1937, 273, 845, 18, 1937, 2668, 1937, 6134...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6370, 67, 2603, 12, 2890, 16, 845, 16, 7586, 16, 1936, 16, 756, 1106, 16, 5217, 67, 823, 13675, 33, 20, 4672, 533, 273, 845, 18, 1080, 845, 1937, 273, 845, 18, 1937, 2668, 1937, 6134...
for (t, item) in items:
for (t, item) in tuples:
def updateListBoxItems(self): if not self.listbox: return if self.oldText == "" and len(self.listboxItems) != self.listbox.count(): self.listboxItems = [(str(self.listbox.item(i).text()), QListWidgetItem(self.listbox.item(i))) for i in range(self.listbox.count())] text = str(self.text()) self.oldText = text if text == "": items = [(t, QListWidgetItem(i)) for (t,i) in self.listboxItems] elif self.useRE: pattern = re.compile(text) items = [(itemText, QListWidgetItem(item)) for (itemText, item) in self.listboxItems if pattern.match(itemText)] else: items = [(itemText, QListWidgetItem(item)) for (itemText, item) in self.listboxItems if text in itemText] self.listbox.clear() for (t, item) in items: self.listbox.addItem(item) if self.callback: self.callback()
4dd2601ce487793400c1f7e5247f0850daac5006 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6366/4dd2601ce487793400c1f7e5247f0850daac5006/OWGUIEx.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 682, 3514, 3126, 12, 2890, 4672, 309, 486, 365, 18, 1098, 2147, 30, 327, 309, 365, 18, 1673, 1528, 422, 1408, 471, 562, 12, 2890, 18, 1098, 2147, 3126, 13, 480, 365, 18, 1098, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 682, 3514, 3126, 12, 2890, 4672, 309, 486, 365, 18, 1098, 2147, 30, 327, 309, 365, 18, 1673, 1528, 422, 1408, 471, 562, 12, 2890, 18, 1098, 2147, 3126, 13, 480, 365, 18, 1098, ...
i = i + 1
i += 1
def expanduser(path): """Expand ~ and ~user constructions. If user or $HOME is unknown, do nothing.""" if path[:1] != '~': return path i, n = 1, len(path) while i < n and path[i] != '/': i = i + 1 if i == 1: if not 'HOME' in os.environ: import pwd userhome = pwd.getpwuid(os.getuid())[5] else: userhome = os.environ['HOME'] else: import pwd try: pwent = pwd.getpwnam(path[1:i]) except KeyError: return path userhome = pwent[5] if userhome[-1:] == '/': i = i + 1 return userhome + path[i:]
3ee13a55a709833ffc7258daf6b67bc26a7e3a01 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/3ee13a55a709833ffc7258daf6b67bc26a7e3a01/posixpath.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14717, 12, 803, 4672, 3536, 12271, 4871, 471, 4871, 1355, 16171, 87, 18, 225, 971, 729, 578, 271, 14209, 353, 5917, 16, 741, 5083, 12123, 309, 589, 10531, 21, 65, 480, 10091, 4278, 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, 14717, 12, 803, 4672, 3536, 12271, 4871, 471, 4871, 1355, 16171, 87, 18, 225, 971, 729, 578, 271, 14209, 353, 5917, 16, 741, 5083, 12123, 309, 589, 10531, 21, 65, 480, 10091, 4278, 327, ...
category, combining, bidirectional, mirrored, decomposition
category, combining, bidirectional, mirrored
def maketable(): unicode = UnicodeData(UNICODE_DATA) # extract unicode properties dummy = (0, 0, 0, 0, "NULL") table = [dummy] cache = {0: dummy} index = [0] * len(unicode.chars) DECOMPOSITION = [""] for char in unicode.chars: record = unicode.table[char] if record: # extract database properties category = CATEGORY_NAMES.index(record[2]) combining = int(record[3]) bidirectional = BIDIRECTIONAL_NAMES.index(record[4]) mirrored = record[9] == "Y" if record[5]: decomposition = '"%s"' % record[5] else: decomposition = "NULL" item = ( category, combining, bidirectional, mirrored, decomposition ) # add entry to index and item tables i = cache.get(item) if i is None: cache[item] = i = len(table) table.append(item) index[char] = i # FIXME: we really should compress the decomposition stuff # (see the unidb utilities for one way to do this) FILE = "unicodedata_db.h" sys.stdout = open(FILE, "w") print "/* this file was generated by %s %s */" % (SCRIPT, VERSION) print print "/* a list of unique database records */" print "const _PyUnicode_DatabaseRecord _PyUnicode_Database_Records[] = {" for item in table: print " {%d, %d, %d, %d, %s}," % item print "};" print print "/* string literals */" print "const char *_PyUnicode_CategoryNames[] = {" for name in CATEGORY_NAMES: print " \"%s\"," % name print " NULL" print "};" print "const char *_PyUnicode_BidirectionalNames[] = {" for name in BIDIRECTIONAL_NAMES: print " \"%s\"," % name print " NULL" print "};" # split index table index1, index2, shift = splitbins(index) print "/* index tables used to find the right database record */" print "#define SHIFT", shift Array("index1", index1).dump(sys.stdout) Array("index2", index2).dump(sys.stdout) sys.stdout = sys.__stdout__
52c6d7a9e9afe3d0a9ad29e7a71c205b3bb17a83 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/52c6d7a9e9afe3d0a9ad29e7a71c205b3bb17a83/makeunicodedata.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 29796, 278, 429, 13332, 225, 5252, 273, 9633, 751, 12, 26642, 67, 4883, 13, 225, 468, 2608, 5252, 1790, 9609, 273, 261, 20, 16, 374, 16, 374, 16, 374, 16, 315, 8560, 7923, 1014, 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, 29796, 278, 429, 13332, 225, 5252, 273, 9633, 751, 12, 26642, 67, 4883, 13, 225, 468, 2608, 5252, 1790, 9609, 273, 261, 20, 16, 374, 16, 374, 16, 374, 16, 315, 8560, 7923, 1014, 273, ...
class TestMultipartMixed(unittest.TestCase):
class TestMultipartMixed(TestEmailBase):
def test_charset(self): eq = self.assertEqual msg = MIMEText('hello there', _charset='us-ascii') eq(msg.get_charset().input_charset, 'us-ascii') eq(msg['content-type'], 'text/plain; charset="us-ascii"')
6c092335fbbbed9a020cb4f6c46ffc1affc8b887 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/6c092335fbbbed9a020cb4f6c46ffc1affc8b887/test_email.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 9999, 12, 2890, 4672, 7555, 273, 365, 18, 11231, 5812, 1234, 273, 13195, 1528, 2668, 23711, 1915, 2187, 389, 9999, 2218, 407, 17, 9184, 6134, 7555, 12, 3576, 18, 588, 67, 9999,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 9999, 12, 2890, 4672, 7555, 273, 365, 18, 11231, 5812, 1234, 273, 13195, 1528, 2668, 23711, 1915, 2187, 389, 9999, 2218, 407, 17, 9184, 6134, 7555, 12, 3576, 18, 588, 67, 9999,...
[{'width': 420.0-140.0, 'line_width': 1.0, 'height': 500.0-460.0, 'stroke_color_rgba': 255L, 'fill_color_rgba': 0x000000A0L, 'y': 460.0, 'tool': 'FILL_RECT', 'x': 140.0}, {'width': 260.0-240.0, 'line_width': 1.0, 'height': 460.0-360.0, 'stroke_color_rgba': 255L, 'fill_color_rgba': 0x33FF00A0L, 'y': 360.0, 'tool': 'FILL_RECT', 'x': 240.0}, {'radius_x': 70, 'line_width': 1.0, 'radius_y': 40, 'stroke_color_rgba': 255L, 'fill_color_rgba': 0x33FF00A0L, 'center_y': 280.0+40, 'tool': 'FILL_CIRCLE', 'center_x': 180.0+70}]
[{'width': 420.0-140.0, 'line_width': 1.0, 'height': 500.0-460.0, 'stroke_color_rgba': C_STROKE, 'fill_color_rgba': C_BLACK|C_FILL, 'y': 460.0, 'tool': 'FILL_RECT', 'x': 140.0}, {'width': 260.0-240.0, 'line_width': 1.0, 'height': 460.0-360.0, 'stroke_color_rgba': C_STROKE, 'fill_color_rgba': C_GREEN|C_FILL, 'y': 360.0, 'tool': 'FILL_RECT', 'x': 240.0}, {'radius_x': 70, 'line_width': 1.0, 'radius_y': 40, 'stroke_color_rgba': C_STROKE, 'fill_color_rgba': C_GREEN|C_FILL, 'center_y': 280.0+40, 'tool': 'FILL_CIRCLE', 'center_x': 180.0+70}]
def init_item_list(self):
afe6d4cfa4a483507d506d63168d467aba7acf11 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11306/afe6d4cfa4a483507d506d63168d467aba7acf11/redraw.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1208, 67, 1726, 67, 1098, 12, 2890, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1208, 67, 1726, 67, 1098, 12, 2890, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
msg = Message(msg, default=default)
default = unicode(default) msg = Message(msg, default=default)
def __addentry(self, msg, default=None, lineno=None, isdocstring=0): if lineno is None: lineno = self.__lineno
72e5951b869cd81266418538c7bcc34178260ba2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9527/72e5951b869cd81266418538c7bcc34178260ba2/extract.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1289, 4099, 12, 2890, 16, 1234, 16, 805, 33, 7036, 16, 7586, 33, 7036, 16, 353, 24675, 33, 20, 4672, 309, 7586, 353, 599, 30, 7586, 273, 365, 16186, 17782, 2, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1289, 4099, 12, 2890, 16, 1234, 16, 805, 33, 7036, 16, 7586, 33, 7036, 16, 353, 24675, 33, 20, 4672, 309, 7586, 353, 599, 30, 7586, 273, 365, 16186, 17782, 2, -100, -100, -100, ...
message = "Applet Installation Failed"
message = _("Applet Installation Failed")
def extract_file(self, filename, do_apply): appletpath = "" applet_exists = False tar = tarfile.open(filename, "r:gz") for member in tar.getmembers(): if member.name.endswith(".desktop"): appletpath = os.path.join(defs.HOME_APPLET_DIR, member.name)
1dd4cdd2df8bc5b53c4886eb8af47cf699e05db1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8416/1dd4cdd2df8bc5b53c4886eb8af47cf699e05db1/awnClass.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2608, 67, 768, 12, 2890, 16, 1544, 16, 741, 67, 9010, 4672, 21853, 803, 273, 1408, 21853, 67, 1808, 273, 1083, 8232, 273, 25857, 18, 3190, 12, 3459, 16, 315, 86, 30, 9764, 7923, 364, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2608, 67, 768, 12, 2890, 16, 1544, 16, 741, 67, 9010, 4672, 21853, 803, 273, 1408, 21853, 67, 1808, 273, 1083, 8232, 273, 25857, 18, 3190, 12, 3459, 16, 315, 86, 30, 9764, 7923, 364, ...
s = asarray(arg1)
s = arg1
def __init__(self, arg1, dims=(None,None), nzmax=100, dtype='d', copy=False): spmatrix.__init__(self) if isdense(arg1): # Convert the dense matrix arg1 to CSC format if rank(arg1) == 2: s = asarray(arg1) if s.dtype.char not in 'fdFD': # Use a double array as the source (but leave it alone) s = s*1.0 if (rank(s) == 2): M, N = s.shape dtype = s.dtype.char func = getattr(sparsetools, _transtabl[dtype]+'fulltocsc') ierr = irow = jcol = 0 nnz = sum(ravel(s != 0.0)) a = zeros((nnz,), dtype) rowa = zeros((nnz,), 'i') ptra = zeros((N+1,), 'i') while 1: a, rowa, ptra, irow, jcol, ierr = \ func(s, a, rowa, ptra, irow, jcol, ierr) if (ierr == 0): break nnz = nnz + ALLOCSIZE a = resize1d(a, nnz) rowa = resize1d(rowa, nnz) self.data = a self.rowind = rowa self.indptr = ptra self.shape = (M, N) # s = dok_matrix(arg1).tocsc(nzmax) # self.shape = s.shape # self.data = s.data # self.rowind = s.rowind # self.indptr = s.indptr else: raise ValueError, "dense array does not have rank 1 or 2" elif isspmatrix(arg1): s = arg1 if isinstance(s, csc_matrix): # do nothing but copy information self.shape = s.shape if copy: self.data = s.data.copy() self.rowind = s.rowind.copy() self.indptr = s.indptr.copy() else: self.data = s.data self.rowind = s.rowind self.indptr = s.indptr elif isinstance(s, csr_matrix): self.shape = s.shape func = getattr(sparsetools, s.ftype+'transp') self.data, self.rowind, self.indptr = \ func(s.shape[1], s.data, s.colind, s.indptr) else: temp = s.tocsc() self.data = temp.data self.rowind = temp.rowind self.indptr = temp.indptr self.shape = temp.shape elif type(arg1) == tuple: try: # Assume it's a tuple of matrix dimensions (M, N) (M, N) = arg1 M = int(M) # will raise TypeError if (data, ij) N = int(N) self.data = zeros((nzmax,), dtype) self.rowind = zeros((nzmax,), int) self.indptr = zeros((N+1,), int) self.shape = (M, N) except (ValueError, TypeError): try: # Try interpreting it as (data, ij) (s, ij) = arg1 assert isinstance(ij, ArrayType) and (rank(ij) == 2) and (shape(ij) == (len(s), 2)) temp = coo_matrix( s, ij, dims=dims, nzmax=nzmax, \ dtype=dtype).tocsc() self.shape = temp.shape self.data = temp.data self.rowind = temp.rowind self.indptr = temp.indptr except: try: # Try interpreting it as (data, rowind, indptr) (s, rowind, indptr) = arg1 if copy: self.data = array(s) self.rowind = array(rowind) self.indptr = array(indptr) else: self.data = asarray(s) self.rowind = asarray(rowind) self.indptr = asarray(indptr) except: raise ValueError, "unrecognized form for csc_matrix constructor" else: raise ValueError, "unrecognized form for csc_matrix constructor"
cc9a850083c66543ac7901fd68022fbe73610704 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/cc9a850083c66543ac7901fd68022fbe73610704/sparse.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1501, 21, 16, 9914, 28657, 7036, 16, 7036, 3631, 15062, 1896, 33, 6625, 16, 3182, 2218, 72, 2187, 1610, 33, 8381, 4672, 1694, 5667, 16186, 2738, 972, 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, 1001, 2738, 972, 12, 2890, 16, 1501, 21, 16, 9914, 28657, 7036, 16, 7036, 3631, 15062, 1896, 33, 6625, 16, 3182, 2218, 72, 2187, 1610, 33, 8381, 4672, 1694, 5667, 16186, 2738, 972, 12, ...
'fiscal_position': o.partner_id.property_account_position.id,
'fiscal_position': o.fiscal_position.id or o.partner_id.property_account_position.id,
def action_invoice_create(self, cr, uid, ids, *args): res = False
73d818f71aa6f8f3fbebe6c96e3162cbe554820e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/73d818f71aa6f8f3fbebe6c96e3162cbe554820e/purchase.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1301, 67, 16119, 67, 2640, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 380, 1968, 4672, 400, 273, 1083, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1301, 67, 16119, 67, 2640, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 380, 1968, 4672, 400, 273, 1083, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
include_file.close()
def include(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine): """Include a reST file as part of the content of this reST file.""" source_dir = os.path.dirname( os.path.abspath(state.document.current_source)) path = ''.join(arguments[0].splitlines()) if path.find(' ') != -1: error = state_machine.reporter.error( '"%s" directive path contains whitespace.' % name, nodes.literal_block(block_text, block_text), line=lineno) return [error] path = os.path.normpath(os.path.join(source_dir, path)) path = utils.relative_path(None, path) try: include_file = open(path) except IOError, error: severe = state_machine.reporter.severe( 'Problems with "%s" directive path:\n%s.' % (name, error), nodes.literal_block(block_text, block_text), line=lineno) return [severe] include_text = include_file.read() include_file.close() if options.has_key('literal'): literal_block = nodes.literal_block(include_text, include_text, source=path) literal_block.line = 1 return literal_block else: include_lines = statemachine.string2lines(include_text, convert_whitespace=1) state_machine.insert_input(include_lines, path) return []
6ac9be4d18ecff4e69eb864caf6522a160028621 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1532/6ac9be4d18ecff4e69eb864caf6522a160028621/misc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2341, 12, 529, 16, 1775, 16, 702, 16, 913, 16, 7586, 16, 913, 67, 3348, 16, 1203, 67, 955, 16, 919, 16, 919, 67, 9149, 4672, 3536, 8752, 279, 283, 882, 585, 487, 1087, 434, 326, 91...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2341, 12, 529, 16, 1775, 16, 702, 16, 913, 16, 7586, 16, 913, 67, 3348, 16, 1203, 67, 955, 16, 919, 16, 919, 67, 9149, 4672, 3536, 8752, 279, 283, 882, 585, 487, 1087, 434, 326, 91...
grid.pack(lab, grid.ALIGN_LEFT) grid.pack(sec)
vbox = widgetset.VBox() vbox.pack_start(lab, True, padding=2) grid.pack(vbox, grid.ALIGN_LEFT) grid.pack(sec, grid.ALIGN_LEFT)
def _run_dialog(iteminfo): """Creates and launches the item edit dialog. This dialog waits for the user to press "Apply" or "Cancel". Returns a dict of new name -> value. """ window = MainDialog(_('Edit Item'), _('Edit the metadata of this item.')) try: try: window.add_button(BUTTON_APPLY.text) window.add_button(BUTTON_CANCEL.text) sections = [] sections.append(build_text_entry( "name", _("Title:"), iteminfo.name)) sections.append(build_multiline_text_entry( "description", _("Description:"), iteminfo.description)) sections.append(build_radio( "file_type", _("Media type:"), iteminfo.file_type, [(_("video"), u"video"), (_("audio"), u"audio"), (_("other"), u"other")])) grid = dialogwidgets.ControlGrid() for lab, sec, handler in sections: grid.pack(lab, grid.ALIGN_LEFT) grid.pack(sec) grid.end_line(spacing=5) window.set_extra_widget(grid.make_table()) response = window.run() response_dict = {} if response == 0: for lab, sec, handler in sections: handler(response_dict) logging.info("response dict: %r", response_dict) return response_dict except StandardError: logging.exception("itemedit threw exception.") finally: window.destroy()
7a6d36f8987a10e91ee088cb926489126498a10f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12354/7a6d36f8987a10e91ee088cb926489126498a10f/itemedit.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2681, 67, 12730, 12, 1726, 1376, 4672, 3536, 2729, 471, 8037, 281, 326, 761, 3874, 6176, 18, 225, 1220, 6176, 16248, 364, 326, 729, 358, 11779, 315, 7001, 6, 578, 315, 6691, 9654, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2681, 67, 12730, 12, 1726, 1376, 4672, 3536, 2729, 471, 8037, 281, 326, 761, 3874, 6176, 18, 225, 1220, 6176, 16248, 364, 326, 729, 358, 11779, 315, 7001, 6, 578, 315, 6691, 9654, ...
Might raise error.ConnectionRefusedError.
Might raise L{ConnectionRefusedError<twisted.internet.error.ConnectionRefusedError>}.
def write(self, packet): """Write packet to address we are connected to.
2049631dd0aa73ddfc33a2c3c8f41078e4f4fcf8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/2049631dd0aa73ddfc33a2c3c8f41078e4f4fcf8/interfaces.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 12, 2890, 16, 4414, 4672, 3536, 3067, 4414, 358, 1758, 732, 854, 5840, 358, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 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, 1045, 12, 2890, 16, 4414, 4672, 3536, 3067, 4414, 358, 1758, 732, 854, 5840, 358, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
"""Logs given `dictionary's` length and content with given `level`
"""Logs the size and contents of the `dictionary` using given `level`.
def log_dictionary(self, dictionary, level='INFO'): """Logs given `dictionary's` length and content with given `level` Valid levels are TRACE, DEBUG, INFO (default), and WARN. In case you want only log the length, use keyword `Get Length` from BuiltIn library. """ print '*%s* ' % (_validate_log_level(level)), if len(dictionary) == 0: print 'Dictionary is empty' elif len(dictionary) == 1: print "Dictionary has one item '%s: %s'" % (dictionary.items()[0]) else: print "Dictionary length is '%s'" % (len(dictionary)) for key in self.get_dictionary_keys(dictionary): print '%s: %s' % (key, dictionary[key])
de39b6e29004a5333c4bba068a24007a666cf2eb /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6988/de39b6e29004a5333c4bba068a24007a666cf2eb/Collections.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 613, 67, 15556, 12, 2890, 16, 3880, 16, 1801, 2218, 5923, 11, 4672, 3536, 7777, 326, 963, 471, 2939, 434, 326, 1375, 15556, 68, 1450, 864, 1375, 2815, 8338, 225, 2364, 7575, 854, 12734, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 613, 67, 15556, 12, 2890, 16, 3880, 16, 1801, 2218, 5923, 11, 4672, 3536, 7777, 326, 963, 471, 2939, 434, 326, 1375, 15556, 68, 1450, 864, 1375, 2815, 8338, 225, 2364, 7575, 854, 12734, ...
sage: cipher = sr(plain,key)
sage: cipher = sr(plain, key)
def __call__(self, P, K): r""" Encrypts the plaintext $P$ using the key $K$.
e506ccc2459e6e3948659b0d1b28d9d6b70342e4 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/e506ccc2459e6e3948659b0d1b28d9d6b70342e4/sr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 453, 16, 1475, 4672, 436, 8395, 8594, 20261, 326, 11917, 271, 52, 8, 1450, 326, 498, 271, 47, 8, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 453, 16, 1475, 4672, 436, 8395, 8594, 20261, 326, 11917, 271, 52, 8, 1450, 326, 498, 271, 47, 8, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, ...
x = _olist.at (pos,whichcoord)
x = pos[whichcoord] pos = [pos[0],pos[1],pos[2]]
def NextPos (un, pos): rad=_unit.getRSize (un) whichcoord = random.random(0,2) x = _olist.at (pos,whichcoord) x=x+3.0*rad _olist.set (pos,whichcoord,x)
79a4a72427eea78a1eda0edc80d0661f3845c1a1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2883/79a4a72427eea78a1eda0edc80d0661f3845c1a1/launch_recycle.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4804, 1616, 261, 318, 16, 949, 4672, 6719, 33, 67, 4873, 18, 588, 54, 1225, 261, 318, 13, 1492, 5732, 273, 2744, 18, 9188, 12, 20, 16, 22, 13, 619, 273, 949, 63, 12784, 5732, 65, 9...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4804, 1616, 261, 318, 16, 949, 4672, 6719, 33, 67, 4873, 18, 588, 54, 1225, 261, 318, 13, 1492, 5732, 273, 2744, 18, 9188, 12, 20, 16, 22, 13, 619, 273, 949, 63, 12784, 5732, 65, 9...
ret.append("%s:%s" % (vnclisten, vncdisplay))
ret.append("%s:%s%s" % (vnclisten, vncdisplay, vncopts))
def parseDeviceModelArgs(self, vmConfig): ret = ["-domain-name", str(self.vm.info['name_label'])]
830b88c45bc84a0ab80e2ed8c109813884145dee /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6195/830b88c45bc84a0ab80e2ed8c109813884145dee/image.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 3654, 1488, 2615, 12, 2890, 16, 4268, 809, 4672, 325, 273, 8247, 17, 4308, 17, 529, 3113, 609, 12, 2890, 18, 3489, 18, 1376, 3292, 529, 67, 1925, 19486, 65, 2, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 3654, 1488, 2615, 12, 2890, 16, 4268, 809, 4672, 325, 273, 8247, 17, 4308, 17, 529, 3113, 609, 12, 2890, 18, 3489, 18, 1376, 3292, 529, 67, 1925, 19486, 65, 2, -100, -100, -100, ...