rem stringlengths 1 226k | add stringlengths 0 227k | context stringlengths 6 326k | meta stringlengths 143 403 | input_ids listlengths 256 256 | attention_mask listlengths 256 256 | labels listlengths 128 128 |
|---|---|---|---|---|---|---|
self.minimumSpaceField.setIntValue_(config.get(prefs.PRESERVE_X_GB_FREE)) | self.minimumSpaceField.setFloatValue_(config.get(prefs.PRESERVE_X_GB_FREE)) | def awakeFromNib(self): preserve = config.get(prefs.PRESERVE_DISK_SPACE) self.preserveSpaceCheckBox.setState_(preserve and NSOnState or NSOffState) self.minimumSpaceField.setEnabled_(preserve) self.minimumSpaceField.setIntValue_(config.get(prefs.PRESERVE_X_GB_FREE)) itemTag = int(config.get(prefs.EXPIRE_AFTER_X_DAYS) * 24) itemIndex = self.expirationDelayPopupButton.indexOfItemWithTag_(itemTag) self.expirationDelayPopupButton.selectItemAtIndex_(itemIndex) | 8c31b3391c426430e5304bbf721cf7fd2f4033b4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12354/8c31b3391c426430e5304bbf721cf7fd2f4033b4/frontend.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1690,
911,
1265,
50,
495,
12,
2890,
4672,
9420,
273,
642,
18,
588,
12,
1484,
2556,
18,
3670,
2123,
3412,
67,
2565,
11129,
67,
6616,
13,
365,
18,
27297,
3819,
19174,
18,
542,
1119,
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,
1690,
911,
1265,
50,
495,
12,
2890,
4672,
9420,
273,
642,
18,
588,
12,
1484,
2556,
18,
3670,
2123,
3412,
67,
2565,
11129,
67,
6616,
13,
365,
18,
27297,
3819,
19174,
18,
542,
1119,
67,
... |
'There is no Python module or object named "%s".' % path) | 'No Python documentation found for %s.' % repr(path)) | def do_GET(self): path = self.path if path[-5:] == '.html': path = path[:-5] if path[:1] == '/': path = path[1:] if path and path != '.': try: p, x = locate(path) except DocImportError, value: self.send_document(path, html.escape( 'problem with %s - %s' % (value.filename, value.args))) return if x: self.send_document(describe(x), html.document(x)) else: self.send_document(path, | 66efbc74811f153a02728942adbbfc549bf10398 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/66efbc74811f153a02728942adbbfc549bf10398/pydoc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
67,
3264,
12,
2890,
4672,
589,
273,
365,
18,
803,
309,
589,
18919,
25,
26894,
422,
2418,
2620,
4278,
589,
273,
589,
10531,
17,
25,
65,
309,
589,
10531,
21,
65,
422,
2023,
30,
58... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
67,
3264,
12,
2890,
4672,
589,
273,
365,
18,
803,
309,
589,
18919,
25,
26894,
422,
2418,
2620,
4278,
589,
273,
589,
10531,
17,
25,
65,
309,
589,
10531,
21,
65,
422,
2023,
30,
58... |
super(Population, self).__init__(logname="Population",*args) | super(Population, self).__init__(parser,progress,loglevel,logname) | def __init__(self,*args): | 1cd209e411f742a480b2b696e61bc5ece7a6801d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8167/1cd209e411f742a480b2b696e61bc5ece7a6801d/population.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
14,
1968,
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,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
14,
1968,
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,
... |
"""Generator a text representation of a message. | """Generates a text representation of a message. | def _handle_message(self, msg): s = StringIO() g = self.clone(s) # The payload of a message/rfc822 part should be a multipart sequence # of length 1. The zeroth element of the list should be the Message # object for the subpart. Extract that object, stringify it, and # write it out. # Except, it turns out, when it's a string instead, which happens when # and only when HeaderParser is used on a message of mime type # message/rfc822. Such messages are generated by, for example, # Groupwise when forwarding unadorned messages. (Issue 7970.) So # in that case we just emit the string body. payload = msg.get_payload() if isinstance(payload, list): g.flatten(msg.get_payload(0), unixfrom=False) payload = s.getvalue() self._fp.write(payload) | 67da6fc328476b3b3d19b1e8a5424497fe41a9ce /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8125/67da6fc328476b3b3d19b1e8a5424497fe41a9ce/generator.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
4110,
67,
2150,
12,
2890,
16,
1234,
4672,
272,
273,
15777,
1435,
314,
273,
365,
18,
14056,
12,
87,
13,
468,
1021,
2385,
434,
279,
883,
19,
16784,
24532,
1087,
1410,
506,
279,
1026... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4110,
67,
2150,
12,
2890,
16,
1234,
4672,
272,
273,
15777,
1435,
314,
273,
365,
18,
14056,
12,
87,
13,
468,
1021,
2385,
434,
279,
883,
19,
16784,
24532,
1087,
1410,
506,
279,
1026... |
except IOError, etree.expatbuilder.expat.ExpatError: | except IOError, etree.XMLSyntaxError: | field_def = objmodel._columns[field_name] | 8deb66a4f15a2da7e8acc96a0b590f83964d3609 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/8deb66a4f15a2da7e8acc96a0b590f83964d3609/translate.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
652,
67,
536,
273,
1081,
2284,
6315,
5112,
63,
1518,
67,
529,
65,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
652,
67,
536,
273,
1081,
2284,
6315,
5112,
63,
1518,
67,
529,
65,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
for type, url in proxies.items(): | for type, url in proxies.iteritems(): | def __init__(self, proxies=None): if proxies is None: proxies = getproxies() assert hasattr(proxies, 'has_key'), "proxies must be a mapping" self.proxies = proxies for type, url in proxies.items(): setattr(self, '%s_open' % type, lambda r, proxy=url, type=type, meth=self.proxy_open: \ meth(r, proxy, type)) | df4cdd4f10a3f78eed655c6e26a5b3ff75e96705 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/df4cdd4f10a3f78eed655c6e26a5b3ff75e96705/urllib2.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
13263,
33,
7036,
4672,
309,
13263,
353,
599,
30,
13263,
273,
336,
20314,
606,
1435,
1815,
3859,
12,
20314,
606,
16,
296,
5332,
67,
856,
19899,
315,
20314,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
13263,
33,
7036,
4672,
309,
13263,
353,
599,
30,
13263,
273,
336,
20314,
606,
1435,
1815,
3859,
12,
20314,
606,
16,
296,
5332,
67,
856,
19899,
315,
20314,
... |
except: | except MIPSolverException: | def edge_coloring(g, value_only=False, vizing=False, hex_colors=False, log=0): r""" Properly colors the edges of a graph. See the URL http://en.wikipedia.org/wiki/Edge_coloring for further details on edge coloring. INPUT: - ``g`` -- a graph. - ``value_only`` -- (default: ``False``): - When set to ``True``, only the chromatic index is returned. - When set to ``False``, a partition of the edge set into matchings is returned if possible. - ``vizing`` -- (default: ``False``): - When set to ``True``, tries to find a `\Delta + 1`-edge-coloring, where `\Delta` is equal to the maximum degree in the graph. - When set to ``False``, tries to find a `\Delta`-edge-coloring, where `\Delta` is equal to the maximum degree in the graph. If impossible, tries to find and returns a `\Delta + 1`-edge-coloring. This implies that ``value_only=False``. - ``hex_colors`` -- (default: ``False``) when set to ``True``, the partition returned is a dictionary whose keys are colors and whose values are the color classes (ideal for plotting). - ``log`` -- (default: ``0``) as edge-coloring is an `NP`-complete problem, this function may take some time depending on the graph. Use ``log`` to define the level of verbosity you wantfrom the linear program solver. By default ``log=0``, meaning that there will be no message printed by the solver. OUTPUT: In the following, `\Delta` is equal to the maximum degree in the graph ``g``. - If ``vizing=True`` and ``value_only=False``, return a partition of the edge set into `\Delta + 1` matchings. - If ``vizing=False`` and ``value_only=True``, return the chromatic index. - If ``vizing=False`` and ``value_only=False``, return a partition of the edge set into the minimum number of matchings. - If ``vizing=True`` and ``value_only=True``, should return something, but mainly you are just trying to compute the maximum degree of the graph, and this is not the easiest way. By Vizing's theorem, a graph has a chromatic index equal to `\Delta` or to `\Delta + 1`. .. NOTE:: In a few cases, it is possible to find very quickly the chromatic index of a graph, while it remains a tedious job to compute a corresponding coloring. For this reason, ``value_only = True`` can sometimes be much faster, and it is a bad idea to compute the whole coloring if you do not need it ! EXAMPLE:: sage: from sage.graphs.graph_coloring import edge_coloring sage: g = graphs.PetersenGraph() sage: edge_coloring(g, value_only=True) # optional - requires GLPK or CBC 4 Complete graphs are colored using the linear-time round-robin coloring:: sage: from sage.graphs.graph_coloring import edge_coloring sage: len(edge_coloring(graphs.CompleteGraph(20))) 19 """ from sage.numerical.mip import MixedIntegerLinearProgram from sage.plot.colors import rainbow from sage.numerical.mip import MIPSolverException if g.is_clique(): if value_only: return g.order()-1 if g.order() % 2 == 0 else g.order() vertices = g.vertices() r = round_robin(g.order()) classes = [[] for v in g] if g.order() % 2 == 0 and not vizing: classes.pop() for (u, v, c) in r.edge_iterator(): classes[c].append((vertices[u], vertices[v])) if hex_colors: return dict(zip(rainbow(len(classes)), classes)) else: return classes if value_only and g.is_overfull(): return max(g.degree())+1 p = MixedIntegerLinearProgram(maximization=True) color = p.new_variable(dim=2) obj = {} k = max(g.degree()) # reorders the edge if necessary... R = lambda x: x if (x[0] <= x[1]) else (x[1], x[0]) # Vizing's coloring uses Delta + 1 colors if vizing: value_only = False k += 1 # A vertex can not have two incident edges with the same color. [p.add_constraint( sum([color[R(e)][i] for e in g.edges_incident(v, labels=False)]), max=1) for v in g.vertex_iterator() for i in xrange(k)] # an edge must have a color [p.add_constraint(sum([color[R(e)][i] for i in xrange(k)]), max=1, min=1) for e in g.edge_iterator(labels=False)] # anything is good as an objective value as long as it is satisfiable e = g.edge_iterator(labels=False).next() p.set_objective(color[R(e)][0]) p.set_binary(color) try: if value_only: p.solve(objective_only=True, log=log) else: chi = p.solve(log=log) except: if value_only: return k + 1 else: # if the coloring with Delta colors fails, tries Delta + 1 return edge_coloring(g, vizing=True, hex_colors=hex_colors, log=log) if value_only: return k # Builds the color classes color = p.get_values(color) classes = [[] for i in xrange(k)] [classes[i].append(e) for e in g.edge_iterator(labels=False) for i in xrange(k) if color[R(e)][i] == 1] # if needed, builds a dictionary from the color classes adding colors if hex_colors: return dict(zip(rainbow(len(classes)), classes)) else: return classes | d7fc2c3e81e90f2878d6fd0d6533272249dc35dd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/d7fc2c3e81e90f2878d6fd0d6533272249dc35dd/graph_coloring.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3591,
67,
3266,
310,
12,
75,
16,
460,
67,
3700,
33,
8381,
16,
331,
6894,
33,
8381,
16,
3827,
67,
9724,
33,
8381,
16,
613,
33,
20,
4672,
436,
8395,
1186,
457,
715,
5740,
326,
5231,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3591,
67,
3266,
310,
12,
75,
16,
460,
67,
3700,
33,
8381,
16,
331,
6894,
33,
8381,
16,
3827,
67,
9724,
33,
8381,
16,
613,
33,
20,
4672,
436,
8395,
1186,
457,
715,
5740,
326,
5231,
... |
thumbList+="%s," % starttime | thumbList.append(str(starttime)) | def createVideoChapters(itemnum, numofchapters, lengthofvideo, getthumbnails): """Returns numofchapters chapter marks even spaced through a certain time period""" # if there are user defined thumb images already available use them infoDOM = xml.dom.minidom.parse(os.path.join(getItemTempPath(itemnum),"info.xml")) thumblistNode = infoDOM.getElementsByTagName("thumblist") if thumblistNode.length > 0: thumblist = getText(thumblistNode[0]) write("Using user defined thumb images - %s" % thumblist) return thumblist # no user defined thumbs so create them segment=int(lengthofvideo / numofchapters) write( "Video length is %s seconds. Each chapter will be %s seconds" % (lengthofvideo,segment)) chapters="" thumbList="" starttime=0 count=1 while count<=numofchapters: chapters+=time.strftime("%H:%M:%S",time.gmtime(starttime)) if starttime==0: if thumboffset < segment: thumbList+="%s," % thumboffset else: thumbList+="%s," % starttime else: thumbList+="%s," % starttime if numofchapters>1: chapters+="," starttime+=segment count+=1 if getthumbnails==True: extractVideoFrames( os.path.join(getItemTempPath(itemnum),"stream.mv2"), os.path.join(getItemTempPath(itemnum),"chapter-%1.jpg"), thumbList) return chapters | 63d3cc2b92e2603f06c88c580763487dd17aad9e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13713/63d3cc2b92e2603f06c88c580763487dd17aad9e/mythburn.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
10083,
782,
1657,
414,
12,
1726,
2107,
16,
818,
792,
343,
1657,
414,
16,
769,
792,
9115,
16,
336,
14904,
87,
4672,
3536,
1356,
818,
792,
343,
1657,
414,
23580,
13999,
5456,
3476,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
10083,
782,
1657,
414,
12,
1726,
2107,
16,
818,
792,
343,
1657,
414,
16,
769,
792,
9115,
16,
336,
14904,
87,
4672,
3536,
1356,
818,
792,
343,
1657,
414,
23580,
13999,
5456,
3476,
... |
m,s = divmod( duration/1000000000, 60) h,m = divmod(m,60) self.server.av_transport_server.set_variable(self.server.connection_manager_server.lookup_avt_id(self.current_connection_id), 'CurrentTrackDuration', '%02d:%02d:%02d' % (h,m,s)) self.server.av_transport_server.set_variable(self.server.connection_manager_server.lookup_avt_id(self.current_connection_id), 'CurrentMediaDuration', '%02d:%02d:%02d' % (h,m,s)) | formatted = self._format_time(duration) av_transport.set_variable(conn_id, 'CurrentTrackDuration', formatted) av_transport.set_variable(conn_id, 'CurrentMediaDuration', formatted) | def update( self,message=None): _, current,_ = self.player.get_state() self.debug("update current %r" % current) """ if current == gst.STATE_NULL: return if current not in (gst.STATE_PLAYING, gst.STATE_PAUSED, gst.STATE_READY): print "I'm out" return """ if current == gst.STATE_PLAYING: state = 'playing' self.server.av_transport_server.set_variable(self.server.connection_manager_server.lookup_avt_id(self.current_connection_id), 'TransportState', 'PLAYING') elif current == gst.STATE_PAUSED: state = 'paused' self.server.av_transport_server.set_variable(self.server.connection_manager_server.lookup_avt_id(self.current_connection_id), 'TransportState', 'PAUSED_PLAYBACK') elif(self.playcontainer != None and message == gst.MESSAGE_EOS and self.playcontainer[0]+1 < len(self.playcontainer[2])): state = 'transitioning' self.server.av_transport_server.set_variable(self.server.connection_manager_server.lookup_avt_id(self.current_connection_id), 'TransportState', 'TRANSITIONING') | 56a690641745e5de48e43c2d6f0dd10f24a0e22c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11626/56a690641745e5de48e43c2d6f0dd10f24a0e22c/gstreamer_renderer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
12,
365,
16,
2150,
33,
7036,
4672,
389,
16,
783,
16,
67,
273,
365,
18,
14872,
18,
588,
67,
2019,
1435,
365,
18,
4148,
2932,
2725,
783,
738,
86,
6,
738,
783,
13,
3536,
309,
78... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
12,
365,
16,
2150,
33,
7036,
4672,
389,
16,
783,
16,
67,
273,
365,
18,
14872,
18,
588,
67,
2019,
1435,
365,
18,
4148,
2932,
2725,
783,
738,
86,
6,
738,
783,
13,
3536,
309,
78... |
self.write_line('<%s%s>' % (tag_name, attrs)) | self.write_line(u'<%s%s>' % (tag_name, attrs)) | def _open_tag(self, tag_name, attributes=None): if attributes is None: attributes = [] attrs = collect_attributes( tag_name, attributes, self._indent, self._indent_char, len(tag_name) + 2) self.write_line('<%s%s>' % (tag_name, attrs)) | 805ed9f5150d8d202700d4be67af9d7068d8db5b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2770/805ed9f5150d8d202700d4be67af9d7068d8db5b/xmlwriter.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3190,
67,
2692,
12,
2890,
16,
1047,
67,
529,
16,
1677,
33,
7036,
4672,
309,
1677,
353,
599,
30,
1677,
273,
5378,
3422,
273,
3274,
67,
4350,
12,
1047,
67,
529,
16,
1677,
16,
365,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3190,
67,
2692,
12,
2890,
16,
1047,
67,
529,
16,
1677,
33,
7036,
4672,
309,
1677,
353,
599,
30,
1677,
273,
5378,
3422,
273,
3274,
67,
4350,
12,
1047,
67,
529,
16,
1677,
16,
365,... |
this = apply(_quickfix.new_RepurchaseTerm, args) | this = _quickfix.new_RepurchaseTerm(*args) | def __init__(self, *args): this = apply(_quickfix.new_RepurchaseTerm, args) try: self.this.append(this) except: self.this = this | 7e632099fd421880c8c65fb0cf610d338d115ee9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8819/7e632099fd421880c8c65fb0cf610d338d115ee9/quickfix.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
380,
1968,
4672,
333,
273,
389,
19525,
904,
18,
2704,
67,
426,
12688,
12104,
4065,
30857,
1968,
13,
775,
30,
365,
18,
2211,
18,
6923,
12,
2211,
13,
1335,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
380,
1968,
4672,
333,
273,
389,
19525,
904,
18,
2704,
67,
426,
12688,
12104,
4065,
30857,
1968,
13,
775,
30,
365,
18,
2211,
18,
6923,
12,
2211,
13,
1335,... |
for field in xmlRec.XmlData: print field, | Gratia.DebugPrint(debug_level, string.join(" ", xmlRec.XmlData)) | def printRecord(self): print "=================================" for key in self.__sgeFields__: print key, ":", self.sgeRecord[key] print "=================================" | eea703b754cd5b945361f0e02b5711010e4f89a5 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/637/eea703b754cd5b945361f0e02b5711010e4f89a5/sge.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1172,
2115,
12,
2890,
4672,
1172,
315,
4428,
1546,
364,
498,
316,
365,
16186,
87,
908,
2314,
972,
30,
1172,
498,
16,
6153,
16,
365,
18,
87,
908,
2115,
63,
856,
65,
1172,
315,
4428,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1172,
2115,
12,
2890,
4672,
1172,
315,
4428,
1546,
364,
498,
316,
365,
16186,
87,
908,
2314,
972,
30,
1172,
498,
16,
6153,
16,
365,
18,
87,
908,
2115,
63,
856,
65,
1172,
315,
4428,
1... |
def getContainerByIdGen(self, id): | def getContainerByIdGen(self, id, **kwArgs): | def getContainerByIdGen(self, id): # return a generator to look up a container return self._id2ref[id].getContainerGen() | 4d3cbde89edfcfbe5f0fc64c8086cca04dd6be75 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7242/4d3cbde89edfcfbe5f0fc64c8086cca04dd6be75/ContainerLeakDetector.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9272,
5132,
7642,
12,
2890,
16,
612,
16,
2826,
9987,
2615,
4672,
468,
327,
279,
4456,
358,
2324,
731,
279,
1478,
327,
365,
6315,
350,
22,
1734,
63,
350,
8009,
588,
2170,
7642,
1435,
2,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9272,
5132,
7642,
12,
2890,
16,
612,
16,
2826,
9987,
2615,
4672,
468,
327,
279,
4456,
358,
2324,
731,
279,
1478,
327,
365,
6315,
350,
22,
1734,
63,
350,
8009,
588,
2170,
7642,
1435,
2,... |
VERSION = match.group(1)+"."+match.group(2)+"."+match.group(3) break f.close() except: pass | incname = match.group(1) include.append(incname) sfile.close() CXXINCLUDECACHE[path] = [date, include] return include def CxxFindSource(name, ipath): for dir in ipath: if (dir == "."): full = name else: full = dir + "/" + name if filedate(full) > 0: return full return 0 def CxxFindHeader(srcfile, incfile, ipath): if (incfile[:1]=="."): last = srcfile.rfind("/") if (last < 0): exit("CxxFindHeader cannot handle this case srcdir = srcfile[:last+1] while (incfile[:1]=="."): if (incfile[:2]=="./"): incfile = incfile[2:] elif (incfile[:3]=="../"): incfile = incfile[3:] last = srcdir[:-1].rfind("/") if (last < 0): exit("CxxFindHeader cannot handle this case srcdir = srcdir[:last+1] else: exit("CxxFindHeader cannot handle this case full = srcdir + incfile if filedate(full) > 0: return full return 0 else: return CxxFindSource(incfile, ipath) global CxxIgnoreHeader global CxxDependencyCache CxxIgnoreHeader = {} CxxDependencyCache = {} def CxxCalcDependencies(srcfile, ipath, ignore): if (SLAVEBUILD!=0): return [] if (CxxDependencyCache.has_key(srcfile)): return CxxDependencyCache[srcfile] if (ignore.count(srcfile)): return [] dep = {} dep[srcfile] = 1 includes = CxxGetIncludes(srcfile) for include in includes: if (CxxIgnoreHeader.has_key(include)==0): header = CxxFindHeader(srcfile, include, ipath) if (header!=0): if (ignore.count(header)==0): hdeps = CxxCalcDependencies(header, ipath, [srcfile]+ignore) for x in hdeps: dep[x] = 1 else: print "CAUTION: header file "+include+" cannot be found in "+srcfile+" IPATH="+str(ipath) result = dep.keys() CxxDependencyCache[srcfile] = result return result def CxxCalcDependenciesAll(srcfiles, ipath): dep = {} for srcfile in srcfiles: for x in CxxCalcDependencies(srcfile, ipath, []): dep[x] = 1 return dep.keys() def ReadCvsEntries(dir): try: if (os.path.isfile(dir+"/CVS-Entries")): srchandle = open(dir+"/CVS-Entries", "r") else: srchandle = open(dir+"/CVS/Entries", "r") files = [] for line in srchandle: if (line[0]=="/"): s = line.split("/",2) if (len(s)==3): files.append(s[1]) srchandle.close() files.sort() return files except: return 0 def CopyFile(dstfile,srcfile): if (dstfile[-1]=='/'): dstdir = dstfile fnl = srcfile.rfind("/") if (fnl < 0): fn = srcfile else: fn = srcfile[fnl+1:] dstfile = dstdir + fn if (older([dstfile],srcfile)): global VERBOSE if VERBOSE >= 1: print "Copying \"%s\" --> \"%s\""%(srcfile, dstfile) WriteFile(dstfile,ReadFile(srcfile)) def CopyAllFiles(dstdir, srcdir, suffix=""): suflen = len(suffix) files = os.listdir(srcdir) for x in files: if (os.path.isfile(srcdir+x)): if (suflen==0) or (x[-suflen:]==suffix): CopyFile(dstdir+x, srcdir+x) def CopyAllHeaders(dir, skip=[]): if (SLAVEBUILD!=0): return dirlist = os.listdir(dir) dirlist.sort() files = fnmatch.filter(dirlist,"*.h")+fnmatch.filter(dirlist,"*.I")+fnmatch.filter(dirlist,"*.T") copied = [] if (skip!="ALL"): for filename in files: if (skip.count(filename)==0): srcfile = dir + "/" + filename dstfile = "built/include/" + filename if (older([dstfile],srcfile)): copied.append(filename) WriteFile(dstfile,ReadFile(srcfile)) cvsentries = ReadCvsEntries(dir) if (cvsentries != 0): cvsheaders = fnmatch.filter(cvsentries,"*.h")+fnmatch.filter(cvsentries,"*.I")+fnmatch.filter(cvsentries,"*.T") for x in SetDifference(files, cvsheaders): if ((skip=="ALL") or (skip.count(x)==0)): msg = "WARNING: header file %s is in your directory, but not in CVS"%(dir+"/"+x) print msg WARNINGS.append(msg) for x in SetDifference(cvsheaders, files): if ((skip=="ALL") or (skip.count(x)==0)): msg = "WARNING: header file %s is CVS, but not in your directory"%(dir+"/"+x) print msg WARNINGS.append(msg) def CopyTree(dstdir,srcdir): if (os.path.isdir(dstdir)): return 0 if (COMPILER=="MSVC7"): cmd = 'xcopy /I/Y/E/Q "' + srcdir + '" "' + dstdir + '"' if (COMPILER=="LINUXA"): cmd = 'cp --recursive --force ' + srcdir + ' ' + dstdir oscmd(cmd) updatefiledate(dstdir) def CompileCxxMSVC7(wobj,fullsrc,ipath,opts): cmd = "cl /Fo" + wobj + " /nologo /c" if (OMIT.count("PYTHON")==0): cmd = cmd + " /Ibuilt/python/include" if (opts.count("DXSDK")): cmd = cmd + ' /I"' + DIRECTXSDK + '/include"' for ver in ["MAYA5","MAYA6","MAYA65"]: if (opts.count(ver)): cmd = cmd + ' /I"' + MAYASDK[ver] + '/include"' for max in ["MAX5","MAX6","MAX7"]: if (PkgSelected(opts,max)): cmd = cmd + ' /I"' + MAXSDK[max] + '/include" /I"' + MAXSDKCS[max] + '" /D' + max for pkg in PACKAGES: if (pkg[:4] != "MAYA") and PkgSelected(opts,pkg): cmd = cmd + " /Ithirdparty/win-libs-vc7/" + pkg.lower() + "/include" for x in ipath: cmd = cmd + " /I" + x if (opts.count('NOFLOATWARN')): cmd = cmd + ' /wd4244 /wd4305' if (opts.count("WITHINPANDA")): cmd = cmd + ' /DWITHIN_PANDA' if (opts.count("MSFORSCOPE")==0): cmd = cmd + ' /Zc:forScope' if (opts.count("PTMALLOC2")): cmd = cmd + ' /DUSE_MEMORY_PTMALLOC2' optlevel = getoptlevel(opts,OPTIMIZE) if (optlevel==1): cmd = cmd + " /MD /Zi /RTCs /GS" if (optlevel==2): cmd = cmd + " /MD /Zi " if (optlevel==3): cmd = cmd + " /MD /Zi /O2 /Ob2 /DFORCE_INLINING " if (optlevel==4): cmd = cmd + " /MD /Zi /Ox /Ob2 /DFORCE_INLINING /GL " cmd = cmd + " /Fd" + wobj[:-4] + ".pdb" building = getbuilding(opts) if (building): cmd = cmd + " /DBUILDING_" + building cmd = cmd + " /EHsc /Zm300 /DWIN32_VC /DWIN32 /W3 " + fullsrc oscmd(cmd) def CompileCxxLINUXA(wobj,fullsrc,ipath,opts): if (fullsrc[-2:]==".c"): cmd = 'gcc -c -o ' + wobj else: cmd = 'g++ -ftemplate-depth-30 -c -o ' + wobj if (OMIT.count("PYTHON")==0): cmd = cmd + ' -I"' + PYTHONSDK + '"' if (PkgSelected(opts,"VRPN")): cmd = cmd + ' -Ithirdparty/linux-libs-a/vrpn/include' if (PkgSelected(opts,"FFTW")): cmd = cmd + ' -Ithirdparty/linux-libs-a/fftw/include' if (PkgSelected(opts,"FMOD")): cmd = cmd + ' -Ithirdparty/linux-libs-a/fmod/include' if (PkgSelected(opts,"NVIDIACG")): cmd = cmd + ' -Ithirdparty/linux-libs-a/nvidiacg/include' if (PkgSelected(opts,"NSPR")): cmd = cmd + ' -Ithirdparty/linux-libs-a/nspr/include' if (PkgSelected(opts,"FREETYPE")): cmd = cmd + ' -I/usr/include/freetype2' for x in ipath: cmd = cmd + ' -I' + x if (opts.count("WITHINPANDA")): cmd = cmd + ' -DWITHIN_PANDA' optlevel = getoptlevel(opts,OPTIMIZE) if (optlevel==1): cmd = cmd + " -g" if (optlevel==2): cmd = cmd + " -O1" if (optlevel==3): cmd = cmd + " -O2" if (optlevel==4): cmd = cmd + " -O2" building = getbuilding(opts) if (building): cmd = cmd + " -DBUILDING_" + building cmd = cmd + ' ' + fullsrc oscmd(cmd) def EnqueueCxx(obj=0,src=0,ipath=[],opts=[],xdep=[]): if ((obj==0)|(src==0)): exit("syntax error in EnqueueCxx directive") if (COMPILER=="MSVC7"): wobj = "built/tmp/"+obj fn = CompileCxxMSVC7 if (COMPILER=="LINUXA"): wobj = "built/tmp/" + obj[:-4] + ".o" fn = CompileCxxLINUXA if (SLAVEBUILD!=0) and (SLAVEBUILD!=wobj): return ipath = ["built/tmp"] + ipath + ["built/include"] fullsrc = CxxFindSource(src, ipath) if (fullsrc == 0): exit("Cannot find source file "+src) dep = CxxCalcDependencies(fullsrc, ipath, []) + xdep DependencyQueue(fn, [wobj,fullsrc,ipath,opts], [wobj], dep) def CompileBisonMSVC7(pre, dsth, dstc, wobj, ipath, opts, src): oscmd('thirdparty/win-util/bison -y -d -o built/tmp/y_tab.c -p '+pre+' '+src) CopyFile(dstc, "built/tmp/y_tab.c") CopyFile(dsth, "built/tmp/y_tab.h") CompileCxxMSVC7(wobj,dstc,ipath,opts) def CompileBisonLINUXA(pre, dsth, dstc, wobj, ipath, opts, src): oscmd("bison -y -d -o built/tmp/y.tab.c -p "+pre+" "+src) CopyFile(dstc, "built/tmp/y.tab.c") CopyFile(dsth, "built/tmp/y.tab.h") CompileCxxLINUXA(wobj,dstc,ipath,opts) def EnqueueBison(ipath=0,opts=0,pre=0,obj=0,dsth=0,src=0): if ((ipath==0)|(opts==0)|(pre==0)|(obj==0)|(dsth==0)|(src==0)): exit("syntax error in EnqueueBison directive") if (COMPILER=="MSVC7"): wobj="built/tmp/"+obj fn = CompileBisonMSVC7 if (COMPILER=="LINUXA"): wobj="built/tmp/"+obj[:-4]+".o" fn = CompileBisonLINUXA if (SLAVEBUILD!=0) and (SLAVEBUILD!=wobj): return ipath = ["built/tmp"] + ipath + ["built/include"] fullsrc = CxxFindSource(src, ipath) if (OMIT.count("BISON")): dir = os.path.dirname(fullsrc) CopyFile("built/tmp/"+dstc, dir+"/"+dstc+".prebuilt") CopyFile("built/tmp/"+dsth, dir+"/"+dsth+".prebuilt") EnqueueCxx(ipath=ipath,opts=opts,obj=obj,src=dstc) return() dstc=obj[:-4]+".cxx" if (fullsrc == 0): exit("Cannot find source file "+src) dstc="built/tmp/"+dstc dsth="built/tmp/"+dsth DependencyQueue(fn, [pre,dsth,dstc,wobj,ipath,opts,fullsrc], [wobj, dsth], [fullsrc]) def CompileFlexMSVC7(pre,dst,src,wobj,ipath,opts,dashi): if (dashi): oscmd("thirdparty/win-util/flex -i -P" + pre + " -o"+dst+" "+src) else: oscmd("thirdparty/win-util/flex -P" + pre + " -o"+dst+" "+src) CompileCxxMSVC7(wobj,dst,ipath,opts) def CompileFlexLINUXA(pre,dst,src,wobj,ipath,opts,dashi): if (dashi): oscmd("flex -i -P" + pre + " -o "+dst+" "+src) else: oscmd("flex -P" + pre + " -o "+dst+" "+src) CompileCxxLINUXA(wobj,dst,ipath,opts) def EnqueueFlex(ipath=0,opts=0,pre=0,obj=0,src=0,dashi=0): if ((ipath==0)|(opts==0)|(pre==0)|(obj==0)|(src==0)): exit("syntax error in EnqueueFlex directive") if (COMPILER=="MSVC7"): wobj="built/tmp/"+obj[:-4]+".obj" dst="built/tmp/"+obj[:-4]+".cxx" fn=CompileFlexMSVC7 if (COMPILER=="LINUX"): wobj="built/tmp/"+obj[:-4]+".o" dst="built/tmp/"+obj[:-4]+".cxx" fn=CompileFlexLINUXA if (SLAVEBUILD!=0) and (SLAVEBUILD!=wobj): return ipath = ["built/tmp"] + ipath + ["built/include"] fullsrc = CxxFindSource(src, ipath) if (OMIT.count("FLEX")): dir = os.path.dirname(fullsrc) CopyFile("built/tmp/"+dst, dir+"/"+dst+".prebuilt") EnqueueCxx(ipath=IPATH, opts=OPTS, obj=obj, src=dst) return() if (fullsrc == 0): exit("Cannot find source file "+src) DependencyQueue(fn, [pre,dst,fullsrc,wobj,ipath,opts,dashi], [wobj], [fullsrc]) def CompileIgateMSVC7(ipath,opts,outd,outc,wobj,src,module,library,files): if (OMIT.count("PYTHON")): WriteFile(outc,"") else: cmd = "built/bin/interrogate -srcdir "+src+" -I"+src cmd = cmd + ' -DCPPPARSER -D__STDC__=1 -D__cplusplus -longlong __int64 -D_X86_ -DWIN32_VC -D_WIN32' cmd = cmd + ' -D"_declspec(param)=" -D_near -D_far -D__near -D__far -D__stdcall' optlevel=getoptlevel(opts,OPTIMIZE) if (optlevel==1): cmd = cmd + ' ' if (optlevel==2): cmd = cmd + ' ' if (optlevel==3): cmd = cmd + ' -DFORCE_INLINING' if (optlevel==4): cmd = cmd + ' -DFORCE_INLINING' cmd = cmd + ' -Sbuilt/include/parser-inc' cmd = cmd + ' -Ibuilt/python/include' for pkg in PACKAGES: if (PkgSelected(opts,pkg)): cmd = cmd + " -Ithirdparty/win-libs-vc7/" + pkg.lower() + "/include" cmd = cmd + ' -oc ' + outc + ' -od ' + outd cmd = cmd + ' -fnames -string -refcount -assert -python-native' for x in ipath: cmd = cmd + ' -I' + x building = getbuilding(opts) if (building): cmd = cmd + " -DBUILDING_"+building if (opts.count("WITHINPANDA")): cmd = cmd + " -DWITHIN_PANDA" cmd = cmd + ' -module ' + module + ' -library ' + library if ((COMPILER=="MSVC7") and opts.count("DXSDK")): cmd = cmd + ' -I"' + DIRECTXSDK + '/include"' for ver in ["MAYA5","MAYA6","MAYA65"]: if ((COMPILER=="MSVC7") and opts.count(ver)): cmd = cmd + ' -I"' + MAYASDK[ver] + '/include"' for x in files: cmd = cmd + ' ' + x oscmd(cmd) CompileCxxMSVC7(wobj,outc,ipath,opts) def CompileIgateLINUXA(ipath,opts,outd,outc,wobj,src,module,library,files): if (OMIT.count("PYTHON")): WriteFile(outc,"") else: cmd = 'built/bin/interrogate -srcdir '+src cmd = cmd + ' -DCPPPARSER -D__STDC__=1 -D__cplusplus -D__i386__ -D__const=const' optlevel = getoptlevel(opts,OPTIMIZE) if (optlevel==1): cmd = cmd + ' ' if (optlevel==2): cmd = cmd + ' ' if (optlevel==3): cmd = cmd + ' ' if (optlevel==4): cmd = cmd + ' ' cmd = cmd + ' -Sbuilt/include/parser-inc -S/usr/include' cmd = cmd + ' -Ibuilt/python/include' for pkg in PACKAGES: if (PkgSelected(opts,pkg)): cmd = cmd + " -Ithirdparty/linux-libs-a/" + pkg.lower() + "/include" cmd = cmd + ' -oc ' + outc + ' -od ' + outd cmd = cmd + ' -fnames -string -refcount -assert -python-native' for x in ipath: cmd = cmd + ' -I' + x building = getbuilding(opts) if (building): cmd = cmd + " -DBUILDING_"+building if (opts.count("WITHINPANDA")): cmd = cmd + " -DWITHIN_PANDA" cmd = cmd + ' -module ' + module + ' -library ' + library if (opts.count("DXSDK")): cmd = cmd + ' -I"' + DIRECTXSDK + '/include"' for ver in ["MAYA5","MAYA6","MAYA65"]: if (opts.count(ver)): cmd = cmd + ' -I"' + MAYASDK[ver] + '/include"' for x in files: cmd = cmd + ' ' + x oscmd(cmd) CompileCxxLINUXA(wobj,outc,ipath,opts) def EnqueueIgate(ipath=0, opts=0, outd=0, obj=0, src=0, module=0, library=0, also=0, skip=0): if ((ipath==0)|(opts==0)|(outd==0)|(obj==0)|(src==0)|(module==0)|(library==0)|(also==0)|(skip==0)): exit("syntax error in EnqueueIgate directive") if (COMPILER=="MSVC7"): dep = "built/bin/interrogate.exe" wobj = "built/tmp/"+obj fn = CompileIgateMSVC7 if (COMPILER=="LINUXA"): dep = "built/bin/interrogate" wobj = "built/tmp/"+outc[:-4]+".o" fn = CompileIgateLINUXA if (SLAVEBUILD!=0) and (SLAVEBUILD!=wobj): return ALLIN.append(outd) outd = 'built/pandac/input/'+outd dirlisting = os.listdir(src) files = fnmatch.filter(dirlisting,"*.h") if (skip=='ALL'): files=[] else: files.sort() for x in skip: if (files.count(x)!=0): files.remove(x) for x in also: files.append(x) ipath = ["built/tmp"] + ipath + ["built/include"] dep = [dep, "built/tmp/dtool_have_python.dat"] dep = dep + CxxCalcDependenciesAll(xpaths(src+"/",files,""), ipath) outc = "built/tmp/"+obj[:-4]+".cxx" DependencyQueue(fn, [ipath,opts,outd,outc,wobj,src,module,library,files], [wobj, outd], dep) def CompileImodMSVC7(outc, wobj, module, library, ipath, opts, files): if (OMIT.count("PYTHON")): WriteFile(outc,"") else: cmd = 'built/bin/interrogate_module ' cmd = cmd + ' -oc ' + outc + ' -module ' + module + ' -library ' + library + ' -python-native ' for x in files: cmd = cmd + ' ' + x oscmd(cmd) CompileCxxMSVC7(wobj,outc,ipath,opts) def CompileImodLINUXA(outc, wobj, module, library, ipath, opts, files): if (OMIT.count("PYTHON")): WriteFile(outc,"") else: cmd = 'built/bin/interrogate_module ' cmd = cmd + ' -oc ' + outc + ' -module ' + module + ' -library ' + library + ' -python-native ' for x in files: cmd = cmd + ' ' + x oscmd(cmd) CompileCxxLINUXA(wobj,outc,ipath,opts) def EnqueueImod(ipath=0, opts=0, obj=0, module=0, library=0, files=0): if ((ipath==0)|(opts==0)|(obj==0)|(module==0)|(library==0)|(files==0)): exit("syntax error in EnqueueImod directive") if (COMPILER=="MSVC7"): wobj = "built/tmp/"+obj[:-4]+".obj" fn = CompileImodMSVC7 if (COMPILER=="LINUXA"): wobj = "built/tmp/"+obj[:-4]+".o" fn = CompileImodLINUXA if (SLAVEBUILD!=0) and (SLAVEBUILD!=wobj): return ipath = ["built/tmp"] + ipath + ["built/include"] outc = "built/tmp/"+obj[:-4]+".cxx" files = xpaths("built/pandac/input/",files,"") dep = files + ["built/tmp/dtool_have_python.dat"] DependencyQueue(fn, [outc, wobj, module, library, ipath, opts, files], [wobj], dep) def CompileLibMSVC7(wlib, wobj, opts): cmd = 'link /lib /nologo /OUT:' + wlib optlevel = getoptlevel(opts,OPTIMIZE) if (optlevel==4): cmd = cmd + " /LTCG " for x in wobj: cmd = cmd + ' ' + x oscmd(cmd) def CompileLibLINUXA(wlib, wobj, opts): cmd = 'ar cru ' + wlib for x in wobj: cmd=cmd + ' ' + x oscmd(cmd) def EnqueueLib(lib=0, obj=[], opts=[]): if (lib==0): exit("syntax error in EnqueueLib directive") if (COMPILER=="MSVC7"): if (lib[-4:]==".ilb"): wlib = "built/tmp/" + lib[:-4] + ".lib" else: wlib = "built/lib/" + lib[:-4] + ".lib" if (SLAVEBUILD!=0) and (SLAVEBUILD!=wlib): return wobj = xpaths("built/tmp/",obj,"") DependencyQueue(CompileLibMSVC7, [wlib, wobj, opts], [wlib], wobj) if (COMPILER=="LINUXA"): if (lib[-4:]==".ilb"): wlib = "built/tmp/" + lib[:-4] + ".a" else: wlib = "built/lib/" + lib[:-4] + ".a" if (SLAVEBUILD!=0) and (SLAVEBUILD!=wlib): return wobj = [] for x in obj: wobj.append("built/tmp/" + x[:-4] + ".o") DependencyQueue(CompileLibLINUXA, [wlib, wobj, opts], [wlib], wobj) def CompileLinkMSVC7(wdll, wlib, wobj, opts, ldef): cmd = 'link /nologo /NODEFAULTLIB:LIBCI.LIB /NODEFAULTLIB:MSVCRTD.LIB /DEBUG ' if (wdll[-4:]!=".exe"): cmd = cmd + " /DLL" optlevel = getoptlevel(opts,OPTIMIZE) if (optlevel==1): cmd = cmd + " /MAP /MAPINFO:LINES /MAPINFO:EXPORTS" if (optlevel==2): cmd = cmd + " /MAP:NUL " if (optlevel==3): cmd = cmd + " /MAP:NUL " if (optlevel==4): cmd = cmd + " /MAP:NUL /LTCG " cmd = cmd + " /FIXED:NO /OPT:REF /STACK:4194304 /INCREMENTAL:NO " if (ldef!=0): cmd = cmd + ' /DEF:"' + ldef + '"' cmd = cmd + ' /OUT:' + wdll if (wlib != 0): cmd = cmd + ' /IMPLIB:' + wlib if (OMIT.count("PYTHON")==0): cmd = cmd + ' /LIBPATH:built/python/libs ' for x in wobj: cmd = cmd + ' ' + x if (wdll[-4:]==".exe"): cmd = cmd + ' panda/src/configfiles/pandaIcon.obj' if (opts.count("D3D8") or opts.count("D3D9") or opts.count("DXDRAW") or opts.count("DXSOUND") or opts.count("DXGUID")): cmd = cmd + ' /LIBPATH:"' + DIRECTXSDK + '/lib/x86"' cmd = cmd + ' /LIBPATH:"' + DIRECTXSDK + '/lib"' if (opts.count("D3D8")): cmd = cmd + ' d3d8.lib d3dx8.lib dxerr8.lib' if (opts.count("D3D9")): cmd = cmd + ' d3d9.lib d3dx9.lib dxerr9.lib' if (opts.count("DXDRAW")): cmd = cmd + ' ddraw.lib' if (opts.count("DXSOUND")): cmd = cmd + ' dsound.lib' if (opts.count("DXGUID")): cmd = cmd + ' dxguid.lib' if (opts.count("WINSOCK")): cmd = cmd + " wsock32.lib" if (opts.count("WINSOCK2")): cmd = cmd + " wsock32.lib ws2_32.lib" if (opts.count("WINCOMCTL")): cmd = cmd + ' comctl32.lib' if (opts.count("WINCOMDLG")): cmd = cmd + ' comdlg32.lib' if (opts.count("WINUSER")): cmd = cmd + " user32.lib" if (opts.count("WINMM")): cmd = cmd + " winmm.lib" if (opts.count("WINIMM")): cmd = cmd + " imm32.lib" if (opts.count("WINKERNEL")): cmd = cmd + " kernel32.lib" if (opts.count("WINOLDNAMES")): cmd = cmd + " oldnames.lib" if (opts.count("WINGDI")): cmd = cmd + " gdi32.lib" if (opts.count("ADVAPI")): cmd = cmd + " advapi32.lib" if (opts.count("GLUT")): cmd = cmd + " opengl32.lib glu32.lib" if (PkgSelected(opts,"ZLIB")): cmd = cmd + ' thirdparty/win-libs-vc7/zlib/lib/libpandazlib1.lib' if (PkgSelected(opts,"PNG")): cmd = cmd + ' thirdparty/win-libs-vc7/png/lib/libpandapng13.lib' if (PkgSelected(opts,"JPEG")): cmd = cmd + ' thirdparty/win-libs-vc7/jpeg/lib/libpandajpeg.lib' if (PkgSelected(opts,"TIFF")): cmd = cmd + ' thirdparty/win-libs-vc7/tiff/lib/libpandatiff.lib' if (PkgSelected(opts,"VRPN")): cmd = cmd + ' thirdparty/win-libs-vc7/vrpn/lib/vrpn.lib' cmd = cmd + ' thirdparty/win-libs-vc7/vrpn/lib/quat.lib' if (PkgSelected(opts,"FMOD")): cmd = cmd + ' thirdparty/win-libs-vc7/fmod/lib/fmod.lib' if (PkgSelected(opts,"MILES")): cmd = cmd + ' thirdparty/win-libs-vc7/miles/lib/mss32.lib' if (PkgSelected(opts,"NVIDIACG")): if (opts.count("CGGL")): cmd = cmd + ' thirdparty/win-libs-vc7/nvidiacg/lib/cgGL.lib' cmd = cmd + ' thirdparty/win-libs-vc7/nvidiacg/lib/cg.lib' if (PkgSelected(opts,"HELIX")): cmd = cmd + ' thirdparty/win-libs-vc7/helix/lib/runtlib.lib' cmd = cmd + ' thirdparty/win-libs-vc7/helix/lib/syslib.lib' cmd = cmd + ' thirdparty/win-libs-vc7/helix/lib/contlib.lib' cmd = cmd + ' thirdparty/win-libs-vc7/helix/lib/debuglib.lib' cmd = cmd + ' thirdparty/win-libs-vc7/helix/lib/utillib.lib' cmd = cmd + ' thirdparty/win-libs-vc7/helix/lib/stlport_vc7.lib' if (PkgSelected(opts,"NSPR")): cmd = cmd + ' thirdparty/win-libs-vc7/nspr/lib/nspr4.lib' if (PkgSelected(opts,"OPENSSL")): cmd = cmd + ' thirdparty/win-libs-vc7/openssl/lib/libpandassl.lib' cmd = cmd + ' thirdparty/win-libs-vc7/openssl/lib/libpandaeay.lib' if (PkgSelected(opts,"FREETYPE")): cmd = cmd + ' thirdparty/win-libs-vc7/freetype/lib/freetype.lib' if (PkgSelected(opts,"FFTW")): cmd = cmd + ' thirdparty/win-libs-vc7/fftw/lib/rfftw.lib' cmd = cmd + ' thirdparty/win-libs-vc7/fftw/lib/fftw.lib' for maya in ["MAYA5","MAYA6","MAYA65"]: if (PkgSelected(opts,maya)): cmd = cmd + ' "' + MAYASDK[maya] + '/lib/Foundation.lib"' cmd = cmd + ' "' + MAYASDK[maya] + '/lib/OpenMaya.lib"' cmd = cmd + ' "' + MAYASDK[maya] + '/lib/OpenMayaAnim.lib"' for max in ["MAX5","MAX6","MAX7"]: if PkgSelected(opts,max): cmd = cmd + ' "' + MAXSDK[max] + '/lib/core.lib"' cmd = cmd + ' "' + MAXSDK[max] + '/lib/edmodel.lib"' cmd = cmd + ' "' + MAXSDK[max] + '/lib/gfx.lib"' cmd = cmd + ' "' + MAXSDK[max] + '/lib/geom.lib"' cmd = cmd + ' "' + MAXSDK[max] + '/lib/mesh.lib"' cmd = cmd + ' "' + MAXSDK[max] + '/lib/maxutil.lib"' cmd = cmd + ' "' + MAXSDK[max] + '/lib/paramblk2.lib"' oscmd(cmd) def CompileLinkLINUXA(wdll, wobj, opts, ldef): if (dll[-4:]==".exe"): cmd = 'g++ -o ' + wdll + ' -Lbuilt/lib -L/usr/X11R6/lib' else: cmd = 'g++ -shared -o ' + wdll + ' -Lbuilt/lib -L/usr/X11R6/lib' for x in obj: suffix = x[-4:] if (suffix==".obj"): cmd = cmd + ' built/tmp/' + x[:-4] + '.o' elif (suffix==".dll"): cmd = cmd + ' -l' + x[3:-4] elif (suffix==".lib"): cmd = cmd + ' built/lib/' + x[:-4] + '.a' elif (suffix==".ilb"): cmd = cmd + ' built/tmp/' + x[:-4] + '.a' if (PkgSelected(opts,"FMOD")): cmd = cmd + ' -Lthirdparty/linux-libs-a/fmod/lib -lfmod-3.74' if (PkgSelected(opts,"NVIDIACG")): cmd = cmd + ' -Lthirdparty/nvidiacg/lib ' if (opts.count("CGGL")): cmd = cmd + " -lCgGL" cmd = cmd + " -lCg" if (PkgSelected(opts,"NSPR")): cmd = cmd + ' -Lthirdparty/linux-libs-a/nspr/lib -lpandanspr4' if (PkgSelected(opts,"ZLIB")): cmd = cmd + " -lz" if (PkgSelected(opts,"PNG")): cmd = cmd + " -lpng" if (PkgSelected(opts,"JPEG")): cmd = cmd + " -ljpeg" if (PkgSelected(opts,"TIFF")): cmd = cmd + " -ltiff" if (PkgSelected(opts,"OPENSSL")): cmd = cmd + " -lssl" if (PkgSelected(opts,"FREETYPE")): cmd = cmd + " -lfreetype" if (PkgSelected(opts,"VRPN")): cmd = cmd + ' -Lthirdparty/linux-libs-a/vrpn/lib -lvrpn -lquat' if (PkgSelected(opts,"FFTW")): cmd = cmd + ' -Lthirdparty/linux-libs-a/fftw/lib -lrfftw -lfftw' if (opts.count("GLUT")): cmd = cmd + " -lGL -lGLU" oscmd(cmd) def EnqueueLink(dll=0, obj=[], opts=[], xdep=[], ldef=0): if (dll==0): exit("syntax error in EnqueueLink directive") if (COMPILER=="MSVC7"): wobj = [] for x in obj: suffix = x[-4:] if (suffix==".obj"): wobj.append("built/tmp/"+x) elif (suffix==".dll"): wobj.append("built/lib/"+x[:-4]+".lib") elif (suffix==".lib"): wobj.append("built/lib/"+x) elif (suffix==".ilb"): wobj.append("built/tmp/"+x[:-4]+".lib") else: exit("unknown suffix in object list.") if (dll[-4:]==".exe"): wdll = "built/bin/"+dll if (SLAVEBUILD!=0) and (SLAVEBUILD!=wdll): return DependencyQueue(CompileLinkMSVC7, [wdll, 0, wobj, opts, ldef], [wdll], wobj) elif (dll[-4:]==".dll"): wdll = "built/bin/"+dll wlib = "built/lib/"+dll[:-4]+".lib" if (SLAVEBUILD!=0) and (SLAVEBUILD!=wdll): return DependencyQueue(CompileLinkMSVC7, [wdll, wlib, wobj, opts, ldef], [wdll, wlib], wobj) else: wdll = "built/plugins/"+dll if (SLAVEBUILD!=0) and (SLAVEBUILD!=wdll): return DependencyQueue(CompileLinkMSVC7, [wdll, 0, wobj, opts, ldef], [wdll], wobj) if (COMPILER=="LINUXA"): if (dll[-4:]==".exe"): wdll = "built/bin/"+dll[:-4] else: wdll = "built/lib/"+dll[:-4]+".so" wobj = [] for x in obj: suffix = x[-4:] if (suffix==".obj"): wobj.append("built/tmp/"+x[:-4]+".o") elif (suffix==".dll"): wobj.append("built/lib/"+x[:-4]+".so") elif (suffix==".lib"): wobj.append("built/lib/"+x[:-4]+".a") elif (suffix==".ilb"): wobj.append("built/tmp/"+x[:-4]+".a") else: exit("unknown suffix in object list.") if (SLAVEBUILD!=0) and (SLAVEBUILD!=wdll): return DependencyQueue(CompileLinkLINUXA, [wdll, wobj, opts, ldef], [wdll], wobj) | def SetDifference(add, sub): set = {} for x in add: set[x]=1 for x in sub: if (set.has_key(x)): del set[x] return set.keys() | 8f86705296f973090fc3f2bedce1bf0e6e54e9f6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7242/8f86705296f973090fc3f2bedce1bf0e6e54e9f6/makepanda.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1000,
16220,
12,
1289,
16,
720,
4672,
444,
273,
2618,
364,
619,
316,
527,
30,
444,
63,
92,
65,
33,
21,
364,
619,
316,
720,
30,
309,
261,
542,
18,
5332,
67,
856,
12,
92,
3719,
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,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1000,
16220,
12,
1289,
16,
720,
4672,
444,
273,
2618,
364,
619,
316,
527,
30,
444,
63,
92,
65,
33,
21,
364,
619,
316,
720,
30,
309,
261,
542,
18,
5332,
67,
856,
12,
92,
3719,
30,
... |
sage: cmp(type(SR(3)), type(Mod(2,5))) | sage: cmp(type(SR(3)), type(Mod(2,5))) | def __cmp__(self, right): """ Compares self and right. | 2b6ad56bcf2516ea032c64349bb279c9ac313cda /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/2b6ad56bcf2516ea032c64349bb279c9ac313cda/calculus.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
9625,
972,
12,
2890,
16,
2145,
4672,
3536,
5427,
4807,
365,
471,
2145,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
9625,
972,
12,
2890,
16,
2145,
4672,
3536,
5427,
4807,
365,
471,
2145,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
def determine_context(self, dre=re.compile(r'([^\d]+)(\d+)')): | def determine_context(self, dre=re.compile(r'([^\d]+)(\d+)'), mc=re.compile(r'(</?(.*?)>)')): | def determine_context(self, dre=re.compile(r'([^\d]+)(\d+)')): ''' Determine the context of this page from the URL: | e4a893248de986ae5d4217a5ba5af3d10b8f9b01 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/e4a893248de986ae5d4217a5ba5af3d10b8f9b01/client.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4199,
67,
2472,
12,
2890,
16,
302,
266,
33,
266,
18,
11100,
12,
86,
11,
19042,
72,
7941,
4713,
72,
29169,
3631,
6108,
33,
266,
18,
11100,
12,
86,
11,
12,
1757,
35,
21110,
34,
2506,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4199,
67,
2472,
12,
2890,
16,
302,
266,
33,
266,
18,
11100,
12,
86,
11,
19042,
72,
7941,
4713,
72,
29169,
3631,
6108,
33,
266,
18,
11100,
12,
86,
11,
12,
1757,
35,
21110,
34,
2506,
... |
''' adapted from ASE/dacapo.py def GetEnsembleCoefficients(self): self.Calculate() E = self.GetPotentialEnergy() xc = self.GetNetCDFEntry('EnsembleXCEnergies') Exc = xc[0] exc_c = self.GetNetCDFEntry('EvaluateCorrelationEnergy') exc_e = self.GetNetCDFEntry('EvaluateExchangeEnergy') exc = exc_c + exc_e if self.GetXCFunctional() == 'RPBE': Exc = exc[-1][-1] E0 = xc[1] diff0 = xc[2] diff1 = xc[3] diff2 = xc[4] coefs = (E + E0 - Exc,diff0-E0 ,diff1-E0,diff2-E0) print 'ensemble: (%.9f, %.9f, %.9f, %.9f)'% coefs return num.array(coefs) ''' | def get_ensemble_coefficients(self): ''' adapted from ASE/dacapo.py def GetEnsembleCoefficients(self): self.Calculate() E = self.GetPotentialEnergy() xc = self.GetNetCDFEntry('EnsembleXCEnergies') Exc = xc[0] exc_c = self.GetNetCDFEntry('EvaluateCorrelationEnergy') exc_e = self.GetNetCDFEntry('EvaluateExchangeEnergy') exc = exc_c + exc_e if self.GetXCFunctional() == 'RPBE': Exc = exc[-1][-1] | ca8cf15074267967822633632ebd17fab026f445 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5735/ca8cf15074267967822633632ebd17fab026f445/jacapo.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
25137,
298,
67,
8075,
12344,
12,
2890,
4672,
9163,
28345,
628,
432,
1090,
19,
72,
1077,
438,
83,
18,
2074,
1652,
968,
664,
10045,
4249,
73,
12344,
12,
2890,
4672,
365,
18,
869... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
25137,
298,
67,
8075,
12344,
12,
2890,
4672,
9163,
28345,
628,
432,
1090,
19,
72,
1077,
438,
83,
18,
2074,
1652,
968,
664,
10045,
4249,
73,
12344,
12,
2890,
4672,
365,
18,
869... | |
assert _usertag and _usertag!="users" | assert _usertag | def getDQ2Locations(self,se_name): ''' Provides the triplet: LFC, site and srm path from input se''' lfcstrings=getLFCmap() outputlocation={} default_site="CERN-PROD_SCRATCHDISK" job=self._getParent() app=job.application # first of all, check that _usertag is set properly: try: assert _usertag and _usertag!="users" except: logger.error("config['DQ2']['usertag'] is not set properly! Please exit ganga, do: export GANGA_CONFIG_PATH=GangaAtlas/Atlas.ini and restart ganga") raise for site, desc in ToACache.sites.iteritems(): try: outloc = desc['srm'].strip() imax=outloc.rfind(":") imin2=outloc.find("=") token=outloc.find("token:") if imin2>0 and token>=0: # srmv2 site. Save token information as coded in ToA: token:SPACETOKEN+srm path, removing the junk bit between the port number (after the last : in the string) and the equal sign. outputlocation[site]= outloc[:imax]+outloc[imin2+1:] else: # srmv1 site outputlocation[site]= outloc except KeyError: continue sites=lfcstrings.keys() if se_name not in sites: logger.warning("%s not found in DQ2 site list. This must be a Storage Element server name. If not, please kill the job as the output will not be saved anywhere." % se_name) if se_name != "none": return ["",se_name,""] else: return [lfcstrings[default_site],default_site,outputlocation[default_site]] else: selsite=se_name makeSites=[] forbiddenSE="true" for token in _writeTokens: if token in se_name: forbiddenSE="false" #print se_name, forbiddenSE if forbiddenSE=="true" : #print app.sites selsite="" logger.warning("Detected forbidden output space token in input: %s. Changing to SCRATCHDISK" % se_name) imax=se_name.find("_") sitename=se_name[:imax] # build all possible alternative, check that they are in DQ2 site list. for token in _writeTokens: makeSites.append(sitename+"_"+token) | 44eacc491236ac3372907dd704f4453f8acf2569 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1488/44eacc491236ac3372907dd704f4453f8acf2569/AthenaMCDatasets.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2343,
53,
22,
10985,
12,
2890,
16,
307,
67,
529,
4672,
9163,
28805,
326,
6882,
1469,
30,
511,
4488,
16,
2834,
471,
272,
8864,
589,
628,
810,
695,
26418,
328,
7142,
10219,
33,
588,
48,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2343,
53,
22,
10985,
12,
2890,
16,
307,
67,
529,
4672,
9163,
28805,
326,
6882,
1469,
30,
511,
4488,
16,
2834,
471,
272,
8864,
589,
628,
810,
695,
26418,
328,
7142,
10219,
33,
588,
48,
... |
if len(string.lstrip(data)) < (len(data) - 4): nextnode.data = "\n\n\n" + string.lstrip(data) | s = data.lstrip() if len(s) < (len(data) - 4): nextnode.data = "\n\n\n" + s | def create_module_info(doc, section): # Heavy. node = extract_first_element(section, "modulesynopsis") if node is None: return set_tagName(node, "synopsis") lastchild = node.childNodes[-1] if lastchild.nodeType == TEXT \ and lastchild.data[-1:] == ".": lastchild.data = lastchild.data[:-1] modauthor = extract_first_element(section, "moduleauthor") if modauthor: set_tagName(modauthor, "author") modauthor.appendChild(doc.createTextNode( modauthor.getAttribute("name"))) modauthor.removeAttribute("name") platform = extract_first_element(section, "platform") if section.tagName == "section": modinfo_pos = 2 modinfo = doc.createElement("moduleinfo") moddecl = extract_first_element(section, "declaremodule") name = None if moddecl: modinfo.appendChild(doc.createTextNode("\n ")) name = moddecl.attributes["name"].value namenode = doc.createElement("name") namenode.appendChild(doc.createTextNode(name)) modinfo.appendChild(namenode) type = moddecl.attributes.get("type") if type: type = type.value modinfo.appendChild(doc.createTextNode("\n ")) typenode = doc.createElement("type") typenode.appendChild(doc.createTextNode(type)) modinfo.appendChild(typenode) versionadded = extract_first_element(section, "versionadded") if versionadded: modinfo.setAttribute("added", versionadded.getAttribute("version")) title = get_first_element(section, "title") if title: children = title.childNodes if len(children) >= 2 \ and children[0].nodeName == "module" \ and children[0].childNodes[0].data == name: # this is it; morph the <title> into <short-synopsis> first_data = children[1] if first_data.data[:4] == " ---": first_data.data = string.lstrip(first_data.data[4:]) set_tagName(title, "short-synopsis") if children[-1].nodeType == TEXT \ and children[-1].data[-1:] == ".": children[-1].data = children[-1].data[:-1] section.removeChild(title) section.removeChild(section.childNodes[0]) title.removeChild(children[0]) modinfo_pos = 0 else: ewrite("module name in title doesn't match" " <declaremodule/>; no <short-synopsis/>\n") else: ewrite("Unexpected condition: <section/> without <title/>\n") modinfo.appendChild(doc.createTextNode("\n ")) modinfo.appendChild(node) if title and not contents_match(title, node): # The short synopsis is actually different, # and needs to be stored: modinfo.appendChild(doc.createTextNode("\n ")) modinfo.appendChild(title) if modauthor: modinfo.appendChild(doc.createTextNode("\n ")) modinfo.appendChild(modauthor) if platform: modinfo.appendChild(doc.createTextNode("\n ")) modinfo.appendChild(platform) modinfo.appendChild(doc.createTextNode("\n ")) section.insertBefore(modinfo, section.childNodes[modinfo_pos]) section.insertBefore(doc.createTextNode("\n "), modinfo) # # The rest of this removes extra newlines from where we cut out # a lot of elements. A lot of code for minimal value, but keeps # keeps the generated *ML from being too funny looking. # section.normalize() children = section.childNodes for i in range(len(children)): node = children[i] if node.nodeName == "moduleinfo": nextnode = children[i+1] if nextnode.nodeType == TEXT: data = nextnode.data if len(string.lstrip(data)) < (len(data) - 4): nextnode.data = "\n\n\n" + string.lstrip(data) | 3c171d1b9f1420a6bbce02f1511ffb6b621863ef /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/3c171d1b9f1420a6bbce02f1511ffb6b621863ef/docfixer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
67,
2978,
67,
1376,
12,
2434,
16,
2442,
4672,
468,
8264,
23935,
18,
756,
273,
2608,
67,
3645,
67,
2956,
12,
3464,
16,
315,
6400,
878,
29522,
7923,
309,
756,
353,
599,
30,
327,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
67,
2978,
67,
1376,
12,
2434,
16,
2442,
4672,
468,
8264,
23935,
18,
756,
273,
2608,
67,
3645,
67,
2956,
12,
3464,
16,
315,
6400,
878,
29522,
7923,
309,
756,
353,
599,
30,
327,
4... |
if len(content)!=1 or type(content[0]) is not StringType: | if len(content)!=1 or type(content[0]) not in (StringType, UnicodeType): | def compile_bullet(self, attdict, content, extra, program): from types import StringType ### eventually should allow things like images and graphics in bullets too XXXX if len(content)!=1 or type(content[0]) is not StringType: raise ValueError, "content for bullet must be a single string" text = content[0] self.do_bullet(text, program) | 041e2d265f4d145658b08edc02ff501d425029d6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3878/041e2d265f4d145658b08edc02ff501d425029d6/para.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4074,
67,
70,
19994,
12,
2890,
16,
2403,
1576,
16,
913,
16,
2870,
16,
5402,
4672,
628,
1953,
1930,
31570,
11849,
18011,
1410,
1699,
9198,
3007,
4602,
471,
17313,
316,
324,
420,
2413,
488... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4074,
67,
70,
19994,
12,
2890,
16,
2403,
1576,
16,
913,
16,
2870,
16,
5402,
4672,
628,
1953,
1930,
31570,
11849,
18011,
1410,
1699,
9198,
3007,
4602,
471,
17313,
316,
324,
420,
2413,
488... |
def __init__(self, bufsize=2**16 ): self._bufsize=bufsize XMLReader.__init__( self ) def parse(self, source): self.prepareParser(source) inf=open( source ) buffer = inf.read(self._bufsize) | def __init__(self, bufsize=2**16): self._bufsize = bufsize XMLReader.__init__(self) def _parseOpenFile(self, source): buffer = source.read(self._bufsize) | def __init__(self, bufsize=2**16 ): self._bufsize=bufsize XMLReader.__init__( self ) | 2d5c793d9ed451a19712d06fbd40696db101927d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2d5c793d9ed451a19712d06fbd40696db101927d/xmlreader.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1681,
1467,
33,
22,
636,
2313,
262,
30,
365,
6315,
4385,
1467,
33,
4385,
1467,
3167,
2514,
16186,
2738,
972,
12,
365,
262,
225,
2,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1681,
1467,
33,
22,
636,
2313,
262,
30,
365,
6315,
4385,
1467,
33,
4385,
1467,
3167,
2514,
16186,
2738,
972,
12,
365,
262,
225,
2,
-100,
-100,
-100,
-100... |
self.message = errorMessage | self._message = errorMessage | def __init__(self, errorCode, errorMessage, lang = ''): Exception.__init__(self) self.code = errorCode self.message = errorMessage self.lang = lang | 3ba0d358d3d5f21a353c730f2b80f8d0f54bc0f7 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12595/3ba0d358d3d5f21a353c730f2b80f8d0f54bc0f7/filetransfer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
12079,
16,
9324,
16,
3303,
273,
875,
4672,
1185,
16186,
2738,
972,
12,
2890,
13,
365,
18,
710,
273,
12079,
365,
6315,
2150,
273,
9324,
365,
18,
4936,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
12079,
16,
9324,
16,
3303,
273,
875,
4672,
1185,
16186,
2738,
972,
12,
2890,
13,
365,
18,
710,
273,
12079,
365,
6315,
2150,
273,
9324,
365,
18,
4936,
273... |
self._debug(NIGHTMARE, "characters", `data`) | def characters (self, data): """characters""" self._debug(NIGHTMARE, "characters", `data`) return self._data(data) | 2235a065dd104f9a4252037ab7cb36681acd5b89 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3948/2235a065dd104f9a4252037ab7cb36681acd5b89/HtmlParser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3949,
261,
2890,
16,
501,
4672,
3536,
20558,
8395,
225,
327,
365,
6315,
892,
12,
892,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3949,
261,
2890,
16,
501,
4672,
3536,
20558,
8395,
225,
327,
365,
6315,
892,
12,
892,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... | |
self.body.append(self.comment(self.document_start)) | self.body.append(self.comment(self.document_start).lstrip()) | def visit_document(self, node): self.body.append(self.comment(self.document_start)) # writing header is postboned self.header_written = 0 | fc46c05a5cf700f0b1164ddb4babcd95ccddd35e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5620/fc46c05a5cf700f0b1164ddb4babcd95ccddd35e/manpage.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3757,
67,
5457,
12,
2890,
16,
756,
4672,
365,
18,
3432,
18,
6923,
12,
2890,
18,
3469,
12,
2890,
18,
5457,
67,
1937,
2934,
80,
6406,
10756,
468,
7410,
1446,
353,
1603,
70,
8184,
365,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
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,
365,
18,
3432,
18,
6923,
12,
2890,
18,
3469,
12,
2890,
18,
5457,
67,
1937,
2934,
80,
6406,
10756,
468,
7410,
1446,
353,
1603,
70,
8184,
365,
... |
a score=3656.000000 | a score=3656.0 | def test_write_with_synteny(): reader = maf.Reader( StringIO( test_maf_2 ), parse_e_rows=True ) a = reader.next() val = StringIO() writer = maf.Writer( val, { 'scoring':'foobar' } ) writer.write( a ) actual = val.getvalue() expected = """##maf version=1 scoring=foobar | 4c24676dc20d908a9c928c06f4d8af132675903b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2104/4c24676dc20d908a9c928c06f4d8af132675903b/maf_tests.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
2626,
67,
1918,
67,
9009,
496,
275,
93,
13332,
2949,
273,
312,
1727,
18,
2514,
12,
15777,
12,
1842,
67,
81,
1727,
67,
22,
262,
16,
1109,
67,
73,
67,
3870,
33,
5510,
262,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
2626,
67,
1918,
67,
9009,
496,
275,
93,
13332,
2949,
273,
312,
1727,
18,
2514,
12,
15777,
12,
1842,
67,
81,
1727,
67,
22,
262,
16,
1109,
67,
73,
67,
3870,
33,
5510,
262,
... |
class UITestView: | class UITestView(object): | def VerifyValues(self, type, name, **keys): """ Check the accounts settings @type type : string @param type : the type of account you want to check (IMAP,SMTP,WebDAV,POP) @type name : string @param name : the name of the account to check @param keys : key:value pairs """ if type == "SMTP": iter = Mail.SMTPAccount.iterItems(App_ns.itsView) elif type == "IMAP": iter = Mail.IMAPAccount.iterItems(App_ns.itsView) elif type == "WebDAV": iter = Sharing.WebDAVAccount.iterItems(App_ns.itsView) elif type == "POP": iter = Mail.POPAccount.iterItems(App_ns.itsView) else: raise AttributeError for account in iter: if account.displayName == name: break self.logger.SetChecked(True) result = True for (key, value) in keys.items(): if account._values[key] != value: self.logger.ReportFailure("Checking %s %s: expected %s, but got %s" % (type, key, value, account._values[key])) result = False else: self.logger.ReportPass("Checking %s %s" % (type, key)) #report the checkings self.logger.Report("%s values" %type) return result | f931a5723901da16934d2fe9febbd78c2c1b6fd4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/f931a5723901da16934d2fe9febbd78c2c1b6fd4/QAUITestAppLib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8553,
1972,
12,
2890,
16,
618,
16,
508,
16,
2826,
2452,
4672,
3536,
2073,
326,
9484,
1947,
632,
723,
618,
294,
533,
632,
891,
618,
294,
326,
618,
434,
2236,
1846,
2545,
358,
866,
261,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8553,
1972,
12,
2890,
16,
618,
16,
508,
16,
2826,
2452,
4672,
3536,
2073,
326,
9484,
1947,
632,
723,
618,
294,
533,
632,
891,
618,
294,
326,
618,
434,
2236,
1846,
2545,
358,
866,
261,
... |
def __init__(self, device, baud=3000000): self.serial = serial.Serial(device, baud, timeout=2) self._rxBuffer = [] self._escBuffer = '' | def writeBytes(addr, data): spime.memWrite(port, 0x10, data) command('W', 0x10, addr, len(data)) | def __init__(self, device, baud=3000000): self.serial = serial.Serial(device, baud, timeout=2) self._rxBuffer = [] self._escBuffer = '' | 0554d466ac4ce5d624b54862fc0c6a2e0dc6ca60 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6757/0554d466ac4ce5d624b54862fc0c6a2e0dc6ca60/arm7mon.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
2346,
16,
9846,
1100,
33,
23,
9449,
4672,
365,
18,
8818,
273,
2734,
18,
6342,
12,
5964,
16,
9846,
1100,
16,
2021,
33,
22,
13,
365,
6315,
20122,
1892,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
2346,
16,
9846,
1100,
33,
23,
9449,
4672,
365,
18,
8818,
273,
2734,
18,
6342,
12,
5964,
16,
9846,
1100,
16,
2021,
33,
22,
13,
365,
6315,
20122,
1892,
2... |
raise PatchError(_("Unable to find %s or %s for patching\n" % (afile, bfile))) | raise PatchError(_("unable to find %s or %s for patching") % (afile, bfile)) | def pathstrip(path, count=1): pathlen = len(path) i = 0 if count == 0: return path.rstrip() while count > 0: i = path.find(os.sep, i) if i == -1: raise PatchError("Unable to strip away %d dirs from %s" % (count, path)) i += 1 # consume '//' in the path while i < pathlen - 1 and path[i] == os.sep: i += 1 count -= 1 return path[i:].rstrip() | 252c8d85581f2987e5c62ae7983c3003cc9e5438 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11312/252c8d85581f2987e5c62ae7983c3003cc9e5438/patch.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
589,
6406,
12,
803,
16,
1056,
33,
21,
4672,
589,
1897,
273,
562,
12,
803,
13,
277,
273,
374,
309,
1056,
422,
374,
30,
327,
589,
18,
86,
6406,
1435,
1323,
1056,
405,
374,
30,
277,
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,
589,
6406,
12,
803,
16,
1056,
33,
21,
4672,
589,
1897,
273,
562,
12,
803,
13,
277,
273,
374,
309,
1056,
422,
374,
30,
327,
589,
18,
86,
6406,
1435,
1323,
1056,
405,
374,
30,
277,
2... |
' >%s</a></p>' % (toc_url, toc_url, doc_url, label)) | ' >%s</a><br />' % (toc_url, toc_url, doc_url, label)) | def write_toc_section(self, out, name, docs, fullname=True): if not docs: return | ead96d86090e18fdeec64a06319b925d20efd2b2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11420/ead96d86090e18fdeec64a06319b925d20efd2b2/html.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
67,
1391,
67,
3464,
12,
2890,
16,
596,
16,
508,
16,
3270,
16,
13321,
33,
5510,
4672,
309,
486,
3270,
30,
327,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
67,
1391,
67,
3464,
12,
2890,
16,
596,
16,
508,
16,
3270,
16,
13321,
33,
5510,
4672,
309,
486,
3270,
30,
327,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
security.declareProtected(CMFCorePermissions.View, 'wrapped') | security.declareProtected(permissions.View, 'wrapped') | def copy(self, factory=None): """Returns a deep copy of this Schema. """ if factory is None: factory = self.__class__ c = factory() for field in self.fields(): c.addField(field.copy()) # Need to be smarter when joining layers # and internal props c._props.update(self._props) layers = {} for k, v in self.registeredLayers(): c.registerLayer(k, v) return c | 209dd0431121be615174f562fcf89fd6fae6c083 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12165/209dd0431121be615174f562fcf89fd6fae6c083/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1610,
12,
2890,
16,
3272,
33,
7036,
4672,
3536,
1356,
279,
4608,
1610,
434,
333,
4611,
18,
3536,
309,
3272,
353,
599,
30,
3272,
273,
365,
16186,
1106,
972,
276,
273,
3272,
1435,
364,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1610,
12,
2890,
16,
3272,
33,
7036,
4672,
3536,
1356,
279,
4608,
1610,
434,
333,
4611,
18,
3536,
309,
3272,
353,
599,
30,
3272,
273,
365,
16186,
1106,
972,
276,
273,
3272,
1435,
364,
6... |
gcompris.sound.play_ogg("melody/son1") | gcompris.sound.play_ogg(sound_struct['sound']) self.tried(sound_struct) | def son1_item_event(self, widget, event=None): if event.type == gtk.gdk.BUTTON_PRESS: if event.button == 1: gcompris.sound.play_ogg("melody/son1") return gtk.FALSE | d0b9a61ff7e201727e6e488e54d1db34d86881e4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11306/d0b9a61ff7e201727e6e488e54d1db34d86881e4/melody.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
18882,
21,
67,
1726,
67,
2575,
12,
2890,
16,
3604,
16,
871,
33,
7036,
4672,
309,
871,
18,
723,
422,
22718,
18,
75,
2883,
18,
20068,
67,
22526,
30,
309,
871,
18,
5391,
422,
404,
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,
18882,
21,
67,
1726,
67,
2575,
12,
2890,
16,
3604,
16,
871,
33,
7036,
4672,
309,
871,
18,
723,
422,
22718,
18,
75,
2883,
18,
20068,
67,
22526,
30,
309,
871,
18,
5391,
422,
404,
30,
... |
hashBytes = stringToBytes(sha.sha(bytes).digest()) | hashBytes = stringToBytes(sha1(bytes).digest()) | def hashAndSign(self, bytes): """Hash and sign the passed-in bytes. | 0104d485864276b9e853b6994a5c58369d5cc6c9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5609/0104d485864276b9e853b6994a5c58369d5cc6c9/RSAKey.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1651,
1876,
2766,
12,
2890,
16,
1731,
4672,
3536,
2310,
471,
1573,
326,
2275,
17,
267,
1731,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1651,
1876,
2766,
12,
2890,
16,
1731,
4672,
3536,
2310,
471,
1573,
326,
2275,
17,
267,
1731,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
return elif len(new_episodes) == 1: title = _('gPodder has found %s') % (_('one new episode:'),) else: title = _('gPodder has found %s') % (_('%i new episodes:') % len(new_episodes)) message = self.tray_icon.format_episode_list(new_episodes) if gl.config.auto_download_when_minimized: message += '\n<i>(%s...)</i>' % _('downloading') self.download_episode_list(new_episodes) self.tray_icon.send_notification(message, title) return self.channels = load_channels() self.channel_list_changed = True self.updateComboBox() self.download_all_new(channels=channels) | else: if len(new_episodes) == 1: title = _('gPodder has found %s') % (_('one new episode:'),) else: title = _('gPodder has found %s') % (_('%i new episodes:') % len(new_episodes)) message = self.tray_icon.format_episode_list([e.title for e in new_episodes]) if gl.config.auto_download_when_minimized: message += '\n<i>(%s...)</i>' % _('downloading') self.download_episode_list(new_episodes) self.tray_icon.send_notification(message, title) if len(episodes) == 0 or self.feed_cache_update_cancelled: self.pbFeedUpdate.set_fraction(1.0) if self.feed_cache_update_cancelled: self.pbFeedUpdate.set_text(_('Update has been cancelled')) else: self.pbFeedUpdate.set_text(_('No new episodes')) self.feed_cache_update_cancelled = True self.btnCancelFeedUpdate.show() self.btnCancelFeedUpdate.set_sensitive(True) if gpodder.interface == gpodder.MAEMO: self.btnCancelFeedUpdate.set_stock_id(gtk.STOCK_APPLY) else: self.btnCancelFeedUpdate.set_image(gtk.image_new_from_stock(gtk.STOCK_APPLY, gtk.ICON_SIZE_BUTTON)) else: self.new_episodes_show(episodes) | def update_feed_cache_finish_callback(self, channels=None, notify_no_new_episodes=False, select_url_afterwards=None): | 84347eeaeaf0d4bda7ce196913b09fad272d4615 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12778/84347eeaeaf0d4bda7ce196913b09fad272d4615/gui.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
67,
7848,
67,
2493,
67,
13749,
67,
3394,
12,
2890,
16,
5750,
33,
7036,
16,
5066,
67,
2135,
67,
2704,
67,
881,
27134,
33,
8381,
16,
2027,
67,
718,
67,
5205,
6397,
33,
7036,
4672... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
67,
7848,
67,
2493,
67,
13749,
67,
3394,
12,
2890,
16,
5750,
33,
7036,
16,
5066,
67,
2135,
67,
2704,
67,
881,
27134,
33,
8381,
16,
2027,
67,
718,
67,
5205,
6397,
33,
7036,
4672... |
if self.terminalProtocol.receiving>=0: self.set_prompt(self.terminalProtocol.ps_init[0], True) return self._receive() | old_pn = self.terminalProtocol.pn if self.terminalProtocol.pn == 1: self.terminalProtocol.cursorToBOL() self.terminalProtocol.pn = 0 try: self.terminalProtocol.drawInputLine() return self._receive() finally: self.terminalProtocol.cursorToBOL() self.terminalProtocol.pn = old_pn | def recv(self): if self.terminalProtocol.receiving>=0: self.set_prompt(self.terminalProtocol.ps_init[0], True) return self._receive() | 95154775e42ac733d1d39dc1ff04dd1451f82f4e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5703/95154775e42ac733d1d39dc1ff04dd1451f82f4e/console.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10665,
12,
2890,
4672,
309,
365,
18,
15979,
5752,
18,
8606,
9288,
34,
33,
20,
30,
365,
18,
542,
67,
13325,
12,
2890,
18,
15979,
5752,
18,
1121,
67,
2738,
63,
20,
6487,
1053,
13,
327,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10665,
12,
2890,
4672,
309,
365,
18,
15979,
5752,
18,
8606,
9288,
34,
33,
20,
30,
365,
18,
542,
67,
13325,
12,
2890,
18,
15979,
5752,
18,
1121,
67,
2738,
63,
20,
6487,
1053,
13,
327,... |
dict_append(info, **atlas) | info = atlas | def calc_info(self): lib_dirs = self.get_lib_dirs() include_dirs = self.get_include_dirs() | 5e3b7826da1bb357993e68d8af77480fced1f4fb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14925/5e3b7826da1bb357993e68d8af77480fced1f4fb/system_info.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7029,
67,
1376,
12,
2890,
4672,
2561,
67,
8291,
273,
365,
18,
588,
67,
2941,
67,
8291,
1435,
2341,
67,
8291,
273,
365,
18,
588,
67,
6702,
67,
8291,
1435,
2,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7029,
67,
1376,
12,
2890,
4672,
2561,
67,
8291,
273,
365,
18,
588,
67,
2941,
67,
8291,
1435,
2341,
67,
8291,
273,
365,
18,
588,
67,
6702,
67,
8291,
1435,
2,
-100,
-100,
-100,
-100,
-... |
if timeString is None: | if timeString is None and not hideTime: | def Draw (self, grid, dc, rect, (item, attributeName), isInSelection=False): """ Draw the date & time, somewhat in the style that Apple Mail does: Date left justified, time right justified. """ item = RecurrenceDialog.getProxy(u'ui', item, createNew=False) | d86bba90b060ddd061a87e3b172294e3e886f6ab /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/d86bba90b060ddd061a87e3b172294e3e886f6ab/AttributeEditors.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10184,
261,
2890,
16,
3068,
16,
6744,
16,
4917,
16,
261,
1726,
16,
9734,
3631,
8048,
6233,
33,
8381,
4672,
3536,
10184,
326,
1509,
473,
813,
16,
18016,
11304,
316,
326,
2154,
716,
1716,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10184,
261,
2890,
16,
3068,
16,
6744,
16,
4917,
16,
261,
1726,
16,
9734,
3631,
8048,
6233,
33,
8381,
4672,
3536,
10184,
326,
1509,
473,
813,
16,
18016,
11304,
316,
326,
2154,
716,
1716,
... |
return "\\csch^{-1}" | """ Returns the LaTeX code for arccsch. EXAMPLES: sage: latex(arccsch) \text{csch}^{-1} """ return r"\text{csch}^{-1}" | def _latex_(self): return "\\csch^{-1}" | f3b9011adeb0121efdc646ee82c26baf37453a14 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/f3b9011adeb0121efdc646ee82c26baf37453a14/calculus.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
26264,
67,
12,
2890,
4672,
327,
8422,
2143,
343,
66,
95,
17,
21,
1532,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
26264,
67,
12,
2890,
4672,
327,
8422,
2143,
343,
66,
95,
17,
21,
1532,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
rot_matrix = N.dot(T, R1); rot_matrix = N.dot(rot_matrix, R2); rot_matrix = N.dot(rot_matrix, R3); | rot_matrix = NP.dot(T, R1); rot_matrix = NP.dot(rot_matrix, R2); rot_matrix = NP.dot(rot_matrix, R3); | def build_rotate_matrix(img_data_parms): """ rot_matrix = reg.build_rotate_matrix(img_data_parms) takes the 6 element vector (3 angles, 3 translations) and build the 4x4 mapping matrix Parameters ....... img_data_parms : {nd_array} this is the current (6-dim) array with 3 angles and 3 translations. Returns ....... rot_matrix: {nd_array} the 4x4 mapping matrix Examples ........ >>> import numpy as N >>> import _registration as reg >>> imdata = reg.build_structs() >>> x = N.zeros(6, dtype=N.float64) >>> M = reg.build_rotate_matrix(x) >>> M array([[ 1., 0., 0., 0.], [ 0., 1., 0., 0.], [ 0., 0., 1., 0.], [ 0., 0., 0., 1.]]) """ R1 = N.zeros([4,4], dtype=N.float64); R2 = N.zeros([4,4], dtype=N.float64); R3 = N.zeros([4,4], dtype=N.float64); T = N.eye(4, dtype=N.float64); alpha = math.radians(img_data_parms[0]) beta = math.radians(img_data_parms[1]) gamma = math.radians(img_data_parms[2]) R1[0][0] = 1.0 R1[1][1] = math.cos(alpha) R1[1][2] = math.sin(alpha) R1[2][1] = -math.sin(alpha) R1[2][2] = math.cos(alpha) R1[3][3] = 1.0 R2[0][0] = math.cos(beta) R2[0][2] = math.sin(beta) R2[1][1] = 1.0 R2[2][0] = -math.sin(beta) R2[2][2] = math.cos(beta) R2[3][3] = 1.0 R3[0][0] = math.cos(gamma) R3[0][1] = math.sin(gamma) R3[1][0] = -math.sin(gamma) R3[1][1] = math.cos(gamma) R3[2][2] = 1.0 R3[3][3] = 1.0 T[0][0] = 1.0 T[1][1] = 1.0 T[2][2] = 1.0 T[3][3] = 1.0 T[0][3] = img_data_parms[3] T[1][3] = img_data_parms[4] T[2][3] = img_data_parms[5] rot_matrix = N.dot(T, R1); rot_matrix = N.dot(rot_matrix, R2); rot_matrix = N.dot(rot_matrix, R3); return rot_matrix | de681f926e982b0212f2f58bf637917926737f89 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12971/de681f926e982b0212f2f58bf637917926737f89/_registration.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1361,
67,
20342,
67,
5667,
12,
6081,
67,
892,
67,
29927,
4672,
3536,
4168,
67,
5667,
273,
960,
18,
3510,
67,
20342,
67,
5667,
12,
6081,
67,
892,
67,
29927,
13,
225,
5530,
326,
1666,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1361,
67,
20342,
67,
5667,
12,
6081,
67,
892,
67,
29927,
4672,
3536,
4168,
67,
5667,
273,
960,
18,
3510,
67,
20342,
67,
5667,
12,
6081,
67,
892,
67,
29927,
13,
225,
5530,
326,
1666,
... |
__pattern__ = r"http://[\w\.]*?rapidshare.com/(?:files/(?P<id>\d*?)/(?P<name>.+)| | __pattern__ = r"http://[\w\.]*?rapidshare.com/(?:files/(?P<id>\d*?)/(?P<name>[^?]+)| | def getInfo(urls): ids = "" names = "" p = re.compile(RapidshareCom.__pattern__) for url in urls: r = p.search(url) if r.group("name"): ids+= ","+r.group("id") names+= ","+r.group("name") elif r.group("name_new"): ids+= ","+r.group("id_new") names+= ","+r.group("name_new") url = "http://api.rapidshare.com/cgi-bin/rsapi.cgi?sub=checkfiles_v1&files=%s&filenames=%s" % (ids[1:], names[1:]) api = getURL(url) result = [] i = 0 for res in api.split(): tmp = res.split(",") if tmp[4] in ("0", "4", "5"): status = 1 elif tmp[4] == "1": status = 2 else: status = 3 result.append( (tmp[1], tmp[2], status, urls[i]) ) i += 1 yield result | 89cfdaedbcf26a5a13195587ffc91f44552e5d10 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9838/89cfdaedbcf26a5a13195587ffc91f44552e5d10/RapidshareCom.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
17142,
12,
10518,
4672,
225,
3258,
273,
1408,
1257,
273,
1408,
225,
293,
273,
283,
18,
11100,
12,
54,
438,
350,
14419,
799,
16186,
4951,
972,
13,
225,
364,
880,
316,
6903,
30,
436,
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,
17142,
12,
10518,
4672,
225,
3258,
273,
1408,
1257,
273,
1408,
225,
293,
273,
283,
18,
11100,
12,
54,
438,
350,
14419,
799,
16186,
4951,
972,
13,
225,
364,
880,
316,
6903,
30,
436,
273... |
logging.exception(e) | log.exception(e) | def main(retParams): # drop unprivleged to parse args, etc. # uidManager saves current real uid/gid which are unpriviledged (callers) # due to suid helper, our current effective uid is 0 uidManager = mock.uid.uidManager(os.getuid(), os.getgid()) uidManager._becomeUser(os.getuid(), os.getgid()) del(os.environ["HOME"]) # defaults config_opts = {} setup_default_config_opts(config_opts) (options, args) = command_parse(config_opts) # config path -- can be overridden on cmdline config_path=MOCKCONFDIR if options.configdir: config_path = options.configdir # Read in the config files: default, and then user specified for cfg in ( os.path.join(config_path, 'defaults.cfg'), '%s/%s.cfg' % (config_path, options.chroot)): if os.path.exists(cfg): execfile(cfg) else: log.error("Could not find required config file: %s" % cfg) if options.chroot == "default": log.error(" Did you forget to specify the chroot to use with '-r'?") sys.exit(1) # configure logging config_opts['chroot_name'] = options.chroot log_ini = os.path.join(config_path, config_opts["log_config_file"]) if not os.path.exists(log_ini): log.error("Could not find required logging config file: %s" % log_ini) sys.exit(50) try: if not os.path.exists(log_ini): raise IOError, "Could not find log config file %s" % log_ini log_cfg = ConfigParser.ConfigParser() logging.config.fileConfig(log_ini) log_cfg.read(log_ini) except (IOError, OSError, ConfigParser.NoSectionError), e: log.error("Could not find required logging config file: %s" % log_ini) sys.exit(50) try: # set up logging format strings config_opts['build_log_fmt_str'] = log_cfg.get("formatter_%s" % config_opts['build_log_fmt_name'], "format", raw=1) config_opts['root_log_fmt_str'] = log_cfg.get("formatter_%s" % config_opts['root_log_fmt_name'], "format", raw=1) config_opts['state_log_fmt_str'] = log_cfg.get("formatter_%s" % config_opts['state_log_fmt_name'], "format", raw=1) except ConfigParser.NoSectionError, e: log.error("Log config file (%s) missing required section: %s" % (log_ini, e)) sys.exit(50) if options.verbose == 0: log.handlers[0].setLevel(logging.WARNING) logging.getLogger("mock.Root.state").handlers[0].setLevel(logging.WARNING) elif options.verbose == 1: log.handlers[0].setLevel(logging.INFO) elif options.verbose == 2: log.handlers[0].setLevel(logging.DEBUG) build_log = logging.getLogger("mock.Root.build") build_log.propagate = 1; mock_log = logging.getLogger("mock") mock_log.propagate = 1; # cmdline options override config options log.info("mock.py version %s starting..." % __VERSION__) set_config_opts_per_cmdline(config_opts, options) warn_obsolete_config_options(config_opts) # do whatever we're here to do chroot = mock.backend.Root(config_opts, uidManager) # elevate privs uidManager._becomeUser(0, 0) retParams["chroot"] = chroot retParams["config_opts"] = config_opts os.umask(002) if options.mode not in ('chroot', 'shell', 'install', 'installdeps') and config_opts['clean']: chroot.clean() if options.mode == 'init': chroot.init() elif options.mode == 'clean': if chroot.state() != "clean": chroot.clean() elif options.mode in ('chroot', 'shell'): chroot.tryLockBuildRoot() chroot._mountall() try: if config_opts['internal_setarch']: mock.util.condPersonality(config_opts['target_arch']) cmd = ' '.join(args) os.system("PS1='mock-chroot> ' /usr/sbin/chroot %s %s" % (chroot.rootdir, cmd)) finally: chroot._umountall() elif options.mode == 'installdeps': if len(args) == 0: log.critical("You must specify an SRPM file.") sys.exit(50) for hdr in mock.util.yieldSrpmHeaders(args, plainRpmOk=1): pass chroot.tryLockBuildRoot() chroot._mountall() try: chroot.installSrpmDeps(*args) finally: chroot._umountall() elif options.mode == 'install': if len(args) == 0: log.critical("You must specify a package list to install.") sys.exit(50) chroot.tryLockBuildRoot() chroot.yumInstall(*args) elif options.mode == 'rebuild': do_rebuild(config_opts, chroot, args) | 521025b767f54c75c55ea088d6ae305210cfbcaf /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7328/521025b767f54c75c55ea088d6ae305210cfbcaf/mock.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
12,
1349,
1370,
4672,
468,
3640,
640,
11365,
1935,
329,
358,
1109,
833,
16,
5527,
18,
468,
282,
4555,
1318,
14649,
783,
2863,
4555,
19,
15780,
1492,
854,
640,
11365,
1411,
2423,
26... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1349,
1370,
4672,
468,
3640,
640,
11365,
1935,
329,
358,
1109,
833,
16,
5527,
18,
468,
282,
4555,
1318,
14649,
783,
2863,
4555,
19,
15780,
1492,
854,
640,
11365,
1411,
2423,
26... |
accelerate_while_key_pressed(player, K_UP, (0, -0.2), 5) | accelerate_while_key_pressed(player, K_UP, (0, -10), 5) | def main(): clock = events.dispatcher('Clock') keyboard = events.dispatcher('Keyboard') frame_time = 0.02 pygame.init() screen = pygame.display.set_mode((1000, 600)) tick_event = pygame.event.Event(TICK) player = components.entity('Player', clock, keyboard, location=components.location((0, 0), (100, 200)), motion=components.motion(), graphics=components.graphics(None)) regular_physics(player) player.physics.add(ground_limiter(400), physics.GROUP_LOCATION) # movement left/right move_while_key_pressed(player, K_RIGHT, (0.2, 0), 10) move_while_key_pressed(player, K_LEFT, (-0.2, 0), 10) # jumping accelerate_while_key_pressed(player, K_UP, (0, -0.2), 5) while True: start = time.clock() clock.dispatch(tick_event) for event in pygame.event.get(): if event.type == QUIT: return 0 elif event.type == KEYDOWN or event.type == KEYUP: keyboard.dispatch(event) screen.fill((0, 0, 0)) screen.fill((200, 200, 150), pygame.Rect(player.location.point, player.location.size)) pygame.display.flip() delta = time.clock() - start if delta < frame_time: time.sleep(frame_time - delta) | fb856d4a6aa39fa78c632f6966376b3d215afc7b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13911/fb856d4a6aa39fa78c632f6966376b3d215afc7b/project_viking.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
7268,
273,
2641,
18,
18495,
2668,
14027,
6134,
16263,
273,
2641,
18,
18495,
2668,
17872,
6134,
2623,
67,
957,
273,
374,
18,
3103,
2395,
13957,
18,
2738,
1435,
5518,
273,
2395,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
7268,
273,
2641,
18,
18495,
2668,
14027,
6134,
16263,
273,
2641,
18,
18495,
2668,
17872,
6134,
2623,
67,
957,
273,
374,
18,
3103,
2395,
13957,
18,
2738,
1435,
5518,
273,
2395,... |
waste = self.rfile.read(1) | if not self.rfile.read(1): break | def run_cgi(self): """Execute a CGI script.""" dir, rest = self.cgi_info i = rest.rfind('?') if i >= 0: rest, query = rest[:i], rest[i+1:] else: query = '' i = rest.find('/') if i >= 0: script, rest = rest[:i], rest[i:] else: script, rest = rest, '' scriptname = dir + '/' + script scriptfile = self.translate_path(scriptname) if not os.path.exists(scriptfile): self.send_error(404, "No such CGI script (%s)" % `scriptname`) return if not os.path.isfile(scriptfile): self.send_error(403, "CGI script is not a plain file (%s)" % `scriptname`) return ispy = self.is_python(scriptname) if not ispy: if not (self.have_fork or self.have_popen2 or self.have_popen3): self.send_error(403, "CGI script is not a Python script (%s)" % `scriptname`) return if not self.is_executable(scriptfile): self.send_error(403, "CGI script is not executable (%s)" % `scriptname`) return | e2f18377ff21c0e3217d561c8509e6816ecb362d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/e2f18377ff21c0e3217d561c8509e6816ecb362d/CGIHTTPServer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
67,
19062,
12,
2890,
4672,
3536,
5289,
279,
385,
13797,
2728,
12123,
1577,
16,
3127,
273,
365,
18,
19062,
67,
1376,
277,
273,
3127,
18,
86,
4720,
2668,
4899,
13,
309,
277,
1545,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
67,
19062,
12,
2890,
4672,
3536,
5289,
279,
385,
13797,
2728,
12123,
1577,
16,
3127,
273,
365,
18,
19062,
67,
1376,
277,
273,
3127,
18,
86,
4720,
2668,
4899,
13,
309,
277,
1545,
... |
self.assertEqual(-(017777777777), -2147483647) | if platform_long_is_32_bits: self.assertEqual(-(017777777777), -2147483647) else: self.assertEqual(-(0777777777777777777777), -9223372036854775807) | def test_oct_baseline(self): # Baseline tests self.assertEqual(00, 0) self.assertEqual(020, 16) self.assertEqual(017777777777, 2147483647) # Ditto with a minus sign and parentheses self.assertEqual(-(00), 0) self.assertEqual(-(020), -16) self.assertEqual(-(017777777777), -2147483647) # Ditto with a minus sign and NO parentheses self.assertEqual(-00, 0) self.assertEqual(-020, -16) self.assertEqual(-017777777777, -2147483647) | 9b3db2c2c77b9dc37cb1cf9e9135dfe7bfec4d7c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/9b3db2c2c77b9dc37cb1cf9e9135dfe7bfec4d7c/test_hexoct.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
13410,
67,
27818,
12,
2890,
4672,
468,
605,
345,
3027,
7434,
365,
18,
11231,
5812,
12,
713,
16,
374,
13,
365,
18,
11231,
5812,
12,
3103,
20,
16,
2872,
13,
365,
18,
11231,
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,
1842,
67,
13410,
67,
27818,
12,
2890,
4672,
468,
605,
345,
3027,
7434,
365,
18,
11231,
5812,
12,
713,
16,
374,
13,
365,
18,
11231,
5812,
12,
3103,
20,
16,
2872,
13,
365,
18,
11231,
5... |
hbox1 = gtk.HBox(spacing=10) hbox1.pack_start(gtk.Label(_L('Name')), False, False) hbox1.pack_start(self._plot_name, False, True) hbox2 = gtk.HBox(spacing=10) hbox2.pack_start(gtk.Label(_L('Clear')), False, False) hbox2.pack_start(self._clear_check, False, True) hbox3 = gtk.HBox(spacing=10) hbox3.pack_start(gtk.Label(_L('Style')), False, False) hbox3.pack_start(self._plot_style, False, True) hbox4 = gtk.HBox(spacing=10) hbox4.pack_start(gtk.Label(_L('Columns')), False, False) hbox4.pack_start(self._columns, False, True) | self._ofs_entry = gtk.Entry() self._traceofs_entry = gtk.Entry() vbox1 = gui.pack_vbox([ gui.pack_hbox([ gtk.Label(_L('Name')), self._plot_name], False, False), gui.pack_hbox([ gtk.Label(_L('Clear')), self._clear_check], False, False), gui.pack_hbox([ gtk.Label(_L('Style')), self._plot_style], False, False), gui.pack_hbox([ gtk.Label(_L('Columns')), self._columns], False, False), ], False, False) vbox2 = gui.pack_vbox([ gui.pack_hbox([ gtk.Label(_L('Offset')), self._ofs_entry], False, False), gui.pack_hbox([ gtk.Label(_L('Trace offset')), self._traceofs_entry], False, False), ], False, False) | def __init__(self): qtwindow.QTWindow.__init__(self, 'data', _L('Data Browser')) self.connect("delete-event", self._delete_event_cb) | 8935522e8ec507931ce9d0737d4837329b8b1363 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6471/8935522e8ec507931ce9d0737d4837329b8b1363/data_window.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
25672,
5668,
18,
53,
56,
3829,
16186,
2738,
972,
12,
2890,
16,
296,
892,
2187,
389,
48,
2668,
751,
15408,
26112,
365,
18,
3612,
2932,
3733,
17,
2575,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
25672,
5668,
18,
53,
56,
3829,
16186,
2738,
972,
12,
2890,
16,
296,
892,
2187,
389,
48,
2668,
751,
15408,
26112,
365,
18,
3612,
2932,
3733,
17,
2575,
3... |
ALGORITHM: Uses Pari function \emph{idealstar} | ALGORITHM: Uses Pari function ``idealstar`` | def idealstar(self, flag=1): r""" Returns the finite abelian group $(O_K/I)^*$, where I is the ideal self of the number field K, and $O_K$ is the ring of integers of K. | e462b4d226d7b8f741f48ed1e071494aa5463b8a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9417/e462b4d226d7b8f741f48ed1e071494aa5463b8a/number_field_ideal.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
23349,
10983,
12,
2890,
16,
2982,
33,
21,
4672,
436,
8395,
2860,
326,
25922,
1223,
292,
2779,
1041,
27488,
51,
67,
47,
19,
45,
13,
66,
26788,
16,
1625,
467,
353,
326,
23349,
365,
434,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
23349,
10983,
12,
2890,
16,
2982,
33,
21,
4672,
436,
8395,
2860,
326,
25922,
1223,
292,
2779,
1041,
27488,
51,
67,
47,
19,
45,
13,
66,
26788,
16,
1625,
467,
353,
326,
23349,
365,
434,
... |
Each of the choice arrays should have the same shape as the index array. | Choice arrays. The index array and all of the choices should be broadcastable to the same shape. | def choose(a, choices, out=None, mode='raise'): """Use an index array to construct a new array from a set of choices. Given an array of integers in {0, 1, ..., n-1} and a set of n choice arrays, this function will create a new array that merges each of the choice arrays. Where a value in `a` is i, then the new array will have the value that choices[i] contains in the same place. Parameters ---------- a : int array This array must contain integers in [0, n-1], where n is the number of choices. choices : sequence of arrays Each of the choice arrays should have the same shape as the index array. out : array, optional If provided, the result will be inserted into this array. It should be of the appropriate shape and dtype mode : {'raise', 'wrap', 'clip'}, optional Specifies how out-of-bounds indices will behave. 'raise' : raise an error 'wrap' : wrap around 'clip' : clip to the range Returns ------- merged_array : array See Also -------- ndarray.choose : equivalent method Examples -------- >>> choices = [[0, 1, 2, 3], [10, 11, 12, 13], ... [20, 21, 22, 23], [30, 31, 32, 33]] >>> choose([2, 3, 1, 0], choices) array([20, 31, 12, 3]) >>> choose([2, 4, 1, 0], choices, mode='clip') array([20, 31, 12, 3]) >>> choose([2, 4, 1, 0], choices, mode='wrap') array([20, 1, 12, 3]) """ try: choose = a.choose except AttributeError: return _wrapit(a, 'choose', choices, out=out, mode=mode) return choose(choices, out=out, mode=mode) | 2634ce0819396e55c8ba0e3014c1c22cb722ddac /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/14925/2634ce0819396e55c8ba0e3014c1c22cb722ddac/fromnumeric.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9876,
12,
69,
16,
7246,
16,
596,
33,
7036,
16,
1965,
2218,
11628,
11,
4672,
3536,
3727,
392,
770,
526,
358,
4872,
279,
394,
526,
628,
279,
444,
434,
7246,
18,
225,
16803,
392,
526,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9876,
12,
69,
16,
7246,
16,
596,
33,
7036,
16,
1965,
2218,
11628,
11,
4672,
3536,
3727,
392,
770,
526,
358,
4872,
279,
394,
526,
628,
279,
444,
434,
7246,
18,
225,
16803,
392,
526,
4... |
allevents.append(core.write_event(get_fileno(r), callback, arg=w)) | allevents.append(core.write_event(get_fileno(w), callback, arg=w)) | def callback(ev, evtype): if evtype & core.EV_READ: current.switch(([ev.arg], [], [])) elif evtype & core.EV_WRITE: current.switch(([], [ev.arg], [])) else: current.switch(([], [], [])) | 11e1f3f86a1f802f3381b37edb0fddda24ea1822 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10423/11e1f3f86a1f802f3381b37edb0fddda24ea1822/select.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1348,
12,
14965,
16,
2113,
723,
4672,
309,
2113,
723,
473,
2922,
18,
24427,
67,
6949,
30,
783,
18,
9610,
12,
3816,
14965,
18,
3175,
6487,
5378,
16,
5378,
3719,
1327,
2113,
723,
473,
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,
1348,
12,
14965,
16,
2113,
723,
4672,
309,
2113,
723,
473,
2922,
18,
24427,
67,
6949,
30,
783,
18,
9610,
12,
3816,
14965,
18,
3175,
6487,
5378,
16,
5378,
3719,
1327,
2113,
723,
473,
29... |
command = inp + ' sfquantile pclip=' + str(pclip) if verb: print(command) clip = getoutput( command ) | if have_subprocess: if verb: print_cmd(verb, cmd, arg, inp, None) clip=subprocess.Popen([cmd,arg],stdin=finp,stdout=subprocess.PIPE).communicate()[0] else: command = assemble_cmd(cmd, arg, inp, None) if verb: print command clip = getoutput( command ) | def main(argv=sys.argv): success = 0 error = 1 par = rsf.Par(argv) inp = par.string('inp') out = par.string('out') if inp == None or out == None: sys.stderr.write(__doc__) return error verb = par.bool('verb', False) pclip = par.float('pclip',99) if pclip <0 or pclip>100: sys.stderr.write('pclip must be between 0 and 100\n') return error inp = '< ' + inp out = ' > '+ out command = inp + ' sfquantile pclip=' + str(pclip) if verb: print(command) clip = getoutput( command ) if not clip: sys.stderr.write('sfquantile did not return anything!\n') if verb: print(clip) command = inp + ' sfclip clip=' + clip + out if verb: print(command) system(command) return success | b3554cf2c1327499364082fbe0e829cec5c6c26f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3143/b3554cf2c1327499364082fbe0e829cec5c6c26f/pclip.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
12,
19485,
33,
9499,
18,
19485,
4672,
225,
2216,
273,
374,
555,
282,
273,
404,
779,
273,
3597,
74,
18,
1553,
12,
19485,
13,
225,
12789,
273,
779,
18,
1080,
2668,
31647,
6134,
596... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
19485,
33,
9499,
18,
19485,
4672,
225,
2216,
273,
374,
555,
282,
273,
404,
779,
273,
3597,
74,
18,
1553,
12,
19485,
13,
225,
12789,
273,
779,
18,
1080,
2668,
31647,
6134,
596... |
self._storage[code.co_code] = source | self._storage[id(code)] = source | def register(self, code, source): self._storage[code.co_code] = source # register code objects of wrapped functions too. for var in code.co_consts: if isinstance(var, CodeType): self._storage[var.co_code] = source | 42162a7bf1d3bd6cd4c01abd546db2e1ad2d96fc /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/14437/42162a7bf1d3bd6cd4c01abd546db2e1ad2d96fc/console.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1744,
12,
2890,
16,
981,
16,
1084,
4672,
365,
6315,
5697,
63,
350,
12,
710,
25887,
273,
1084,
468,
1744,
981,
2184,
434,
5805,
4186,
4885,
18,
364,
569,
316,
981,
18,
2894,
67,
10248,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1744,
12,
2890,
16,
981,
16,
1084,
4672,
365,
6315,
5697,
63,
350,
12,
710,
25887,
273,
1084,
468,
1744,
981,
2184,
434,
5805,
4186,
4885,
18,
364,
569,
316,
981,
18,
2894,
67,
10248,
... |
Loading "/home/wstein/.sage//temp/one/.../a.m" | Loading ".../.sage//temp/.../a.m" | def load(self, filename): """ Load the file with given filename using the 'load' command in the MAGMA shell. | 0f49ce8ef2c5cc832f61d3e5e09c4b17878f433f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/0f49ce8ef2c5cc832f61d3e5e09c4b17878f433f/magma.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1262,
12,
2890,
16,
1544,
4672,
3536,
4444,
326,
585,
598,
864,
1544,
1450,
326,
296,
945,
11,
1296,
316,
326,
490,
1781,
5535,
5972,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1262,
12,
2890,
16,
1544,
4672,
3536,
4444,
326,
585,
598,
864,
1544,
1450,
326,
296,
945,
11,
1296,
316,
326,
490,
1781,
5535,
5972,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
cond = self.__buildCondition(condDict, older, newer, timeStamp) | cond = self.__buildCondition( condDict, older, newer, timeStamp ) | def countJobs(self, condDict, older=None, newer=None, timeStamp='LastUpdateTime'): """ Get the number of jobs matching conditions specified by condDict and time limits """ self.log.debug ( 'JobDB.countJobs: counting Jobs' ) cond = self.__buildCondition(condDict, older, newer, timeStamp) cmd = ' SELECT count(JobID) from Jobs ' ret = self._query( cmd + cond ) if ret['OK']: return S_OK(ret['Value'][0][0]) return ret | 99c1bc850ba087890925b3180df206f65bb1d4b3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/99c1bc850ba087890925b3180df206f65bb1d4b3/JobDB.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1056,
7276,
12,
2890,
16,
6941,
5014,
16,
12156,
33,
7036,
16,
16069,
33,
7036,
16,
18198,
2218,
3024,
1891,
950,
11,
4672,
3536,
968,
326,
1300,
434,
6550,
3607,
4636,
1269,
635,
6941,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1056,
7276,
12,
2890,
16,
6941,
5014,
16,
12156,
33,
7036,
16,
16069,
33,
7036,
16,
18198,
2218,
3024,
1891,
950,
11,
4672,
3536,
968,
326,
1300,
434,
6550,
3607,
4636,
1269,
635,
6941,
... |
li | li | def cleanup(page): """ remove unwanted sections of the page. Uses pyquery. """ document = pq(page) #If you want to remove any other section, just add the class or id of the section below with comma seperated unwanted_sections_list=""" div#jump-to-nav, div.top, div#column-one, div#siteNotice, div#purl, div#head,div#footer, div#head-base, div#page-base, div#stub, div#noprint, div#disambig,div.NavFrame,#colophon,.editsection,.toctoggle,.tochidden,.catlinks,.navbox,.sisterproject,.ambox, .toccolours,.topicondiv#f-poweredbyico,div#f-copyrightico,div#featured-star,li#f-viewcount, li#f-about,li#f-disclaimer,li#f-privacy,.portal, #footer """ unwanted_divs = unwanted_sections_list.split(",") for section in unwanted_divs: document.remove(section.strip()) return document.wrap('<div></div>').html().encode("utf-8") | 5ed842fe50b8f5117571e202ef9076caa38cb8bb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14704/5ed842fe50b8f5117571e202ef9076caa38cb8bb/wiki2pdf.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6686,
12,
2433,
4672,
3536,
1206,
30264,
7178,
434,
326,
1363,
18,
14854,
2395,
2271,
18,
3536,
1668,
273,
14619,
12,
2433,
13,
468,
2047,
1846,
2545,
358,
1206,
1281,
1308,
2442,
16,
25... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6686,
12,
2433,
4672,
3536,
1206,
30264,
7178,
434,
326,
1363,
18,
14854,
2395,
2271,
18,
3536,
1668,
273,
14619,
12,
2433,
13,
468,
2047,
1846,
2545,
358,
1206,
1281,
1308,
2442,
16,
25... |
'host' : XendNode.instance().uuid, | def host_metrics_get_record(self, _, ref): return xen_api_success({ 'uuid' : ref, 'host' : XendNode.instance().uuid, 'memory_total' : self._host_metrics_get_memory_total(), 'memory_free' : self._host_metrics_get_memory_free(), }) | ea227c18fa5fd018f3d60a77f507f8ca1b3cf9ba /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6195/ea227c18fa5fd018f3d60a77f507f8ca1b3cf9ba/XendAPI.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1479,
67,
9597,
67,
588,
67,
3366,
12,
2890,
16,
389,
16,
1278,
4672,
327,
23048,
67,
2425,
67,
4768,
12590,
296,
7080,
11,
540,
294,
1278,
16,
296,
7858,
67,
4963,
11,
294,
365,
631... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1479,
67,
9597,
67,
588,
67,
3366,
12,
2890,
16,
389,
16,
1278,
4672,
327,
23048,
67,
2425,
67,
4768,
12590,
296,
7080,
11,
540,
294,
1278,
16,
296,
7858,
67,
4963,
11,
294,
365,
631... | |
cmd.extend(shlex.split(self.importerArgs)) | cmd.extend(shlex.split(self.importArgs)) | def importFile(self, fileName, exName): """ Import file or directory using 'bin/omero importer' This method is solely responsible for logging the user in, attempting (possibly multiply) an import, logging and throwing an exception if necessary. """ | 9a2b1cc9b9118479713f64d7f9b2935c483589d8 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12409/9a2b1cc9b9118479713f64d7f9b2935c483589d8/fsDropBoxMonitorClient.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1930,
812,
12,
2890,
16,
3968,
16,
431,
461,
4672,
3536,
6164,
585,
578,
1867,
1450,
296,
4757,
19,
362,
2439,
15198,
11,
1220,
707,
353,
3704,
2357,
14549,
364,
2907,
326,
729,
316,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1930,
812,
12,
2890,
16,
3968,
16,
431,
461,
4672,
3536,
6164,
585,
578,
1867,
1450,
296,
4757,
19,
362,
2439,
15198,
11,
1220,
707,
353,
3704,
2357,
14549,
364,
2907,
326,
729,
316,
1... |
""" | r""" | def gen_legendre_P(n,m,x): """ Returns the generalized (or associated) Legendre function of the first kind for integers n > -1, m > -1. The awkward code for when m is odd and > 1 results from the fact that Maxima is happy with, for example, (1 - t^2)^3/2, but SAGE is not. For these cases the function is computed from the (m-1)-case using one of the recursions satisfied by the Legendre functions. EXAMPLES: sage: P.<t> = QQ[] sage: gen_legendre_P(2, 0, t) 3/2*t^2 - 1/2 sage: gen_legendre_P(2, 0, t) == legendre_P(2, t) True sage: gen_legendre_P(3, 1, t) (3/2 - 15*t^2/2)*sqrt(1 - t^2) sage: gen_legendre_P(4, 3, t) sqrt(1 - t^2)*(105*t^3 - 105*t) sage: gen_legendre_P(7, 3, I).expand() -16695*sqrt(2) sage: gen_legendre_P(4, 1, 2.5) -583.562373654533*I """ _init() if m.mod(2).is_zero() or m.is_one(): return sage_eval(maxima.eval('assoc_legendre_p(%s,%s,x)'%(ZZ(n),ZZ(m))), locals={'x':x}) else: return sqrt(1-x**2)*(((n-m+1)*x*gen_legendre_P(n,m-1,x)-(n+m-1)*gen_legendre_P(n-1,m-1,x))/(1-x**2)) | b5134d6598410d7687ed531c5908683fd3511b5b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/b5134d6598410d7687ed531c5908683fd3511b5b/orthogonal_polys.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3157,
67,
16292,
266,
67,
52,
12,
82,
16,
81,
16,
92,
4672,
436,
8395,
2860,
326,
7470,
1235,
261,
280,
3627,
13,
17167,
409,
266,
445,
434,
326,
1122,
3846,
364,
12321,
290,
405,
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,
3157,
67,
16292,
266,
67,
52,
12,
82,
16,
81,
16,
92,
4672,
436,
8395,
2860,
326,
7470,
1235,
261,
280,
3627,
13,
17167,
409,
266,
445,
434,
326,
1122,
3846,
364,
12321,
290,
405,
30... |
if not self.databuf: print '** socket: no data!' print '** recv: got ', len(self.databuf) | def recv(self, bufsize, flags=0): if flags: raise my_error, 'recv flags not yet supported on mac' if not self.databuf: try: self.databuf, urg, mark = self.stream.Rcv(0) if not self.databuf: print '** socket: no data!' print '** recv: got ', len(self.databuf) except mactcp.error, arg: if arg[0] != MACTCP.connectionClosing: raise mactcp.error, arg rv = self.databuf[:bufsize] self.databuf = self.databuf[bufsize:] return rv | f90a113176df262aa7d495a57bdc0d09c8ac09bb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/f90a113176df262aa7d495a57bdc0d09c8ac09bb/socket.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10665,
12,
2890,
16,
1681,
1467,
16,
2943,
33,
20,
4672,
309,
2943,
30,
1002,
3399,
67,
1636,
16,
296,
18334,
2943,
486,
4671,
3260,
603,
5318,
11,
309,
486,
365,
18,
3404,
378,
696,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10665,
12,
2890,
16,
1681,
1467,
16,
2943,
33,
20,
4672,
309,
2943,
30,
1002,
3399,
67,
1636,
16,
296,
18334,
2943,
486,
4671,
3260,
603,
5318,
11,
309,
486,
365,
18,
3404,
378,
696,
... | |
result[bom.id] += map(lambda x: x.id, bom2.bom_lines) print "name",name print "arg",arg print "result",result | result[bom.id] += map(lambda x: x.id, bom2.bom_lines) | def _child_compute(self, cr, uid, ids, name, arg, context={}): """ @param self: The object pointer. @param cr: A database cursor @param uid: ID of the user currently logged in @param ids: the ID of mrp.production object @param name: @param arg: | e3cd823031c382369be6fdc654dc96aea91a478c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/e3cd823031c382369be6fdc654dc96aea91a478c/mrp.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3624,
67,
9200,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
508,
16,
1501,
16,
819,
12938,
4672,
3536,
632,
891,
365,
30,
1021,
733,
4407,
18,
632,
891,
4422,
30,
432,
2063,
334... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3624,
67,
9200,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
508,
16,
1501,
16,
819,
12938,
4672,
3536,
632,
891,
365,
30,
1021,
733,
4407,
18,
632,
891,
4422,
30,
432,
2063,
334... |
return K(answer.lift(), prec - answer.valuation()) | return K(answer) | def height(P, check=True): if P.is_finite_order(): return K(0) if check: assert P.curve() == E, "the point P must lie on the curve " \ "from which the height function was created" | b4c17f72cfffe6d3d64fa3f70fa8d12616c7a62d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/b4c17f72cfffe6d3d64fa3f70fa8d12616c7a62d/ell_rational_field.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2072,
12,
52,
16,
866,
33,
5510,
4672,
309,
453,
18,
291,
67,
9551,
67,
1019,
13332,
327,
1475,
12,
20,
13,
309,
866,
30,
1815,
453,
18,
16683,
1435,
422,
512,
16,
315,
5787,
1634,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2072,
12,
52,
16,
866,
33,
5510,
4672,
309,
453,
18,
291,
67,
9551,
67,
1019,
13332,
327,
1475,
12,
20,
13,
309,
866,
30,
1815,
453,
18,
16683,
1435,
422,
512,
16,
315,
5787,
1634,
... |
line = packet.datain.read (size) | if (self.verbose): print ('Next packet') line = packet.fromClient (size) | def handle (self): """ This is where the action starts. """ self.server.controller.updateProgressInfo ('Idle.', 2) # create a packet structure packet = IIS () packet.datain = self.rfile packet.dataout = self.wfile # decode the header size = struct.calcsize ('8h') line = packet.datain.read (size) n = len (line) if (n < size): return while (n): try: bytes = struct.unpack ('8h', line) except: sys.stderr.write ('PYIMTOOL: error unpacking the data.\n') for exctn in sys.exc_info(): sys.stderr.write (exctn) # verify checksum # DO SOMETHING! # decode the packet fields subunit = bytes[2] subunit077 = subunit & 077 tid = bytes[0] x = bytes[4] & 0177777 y = bytes[5] & 0177777 z = bytes[6] & 0177777 t = bytes[7] & 017777 ndatabytes = - bytes[1] # are the bytes packed? if (not (tid & PACKED)): ndatabytes *= 2 # populate the packet structure packet.subunit = subunit packet.subunit077 = subunit077 packet.tid = tid packet.x = x packet.y = y packet.z = z packet.t = t packet.nbytes = ndatabytes # decide what to do, depending on the # value of subunit if (packet.subunit077 == FEEDBACK): self.handleFeedback (packet) elif (packet.subunit077 == LUT): self.handleLut (packet) # read the next packet line = packet.datain.read (size) n = len (line) continue elif (packet.subunit077 == MEMORY): self.handleMemory (packet) # if (self.needsUpdate): # self.server.controller.animateProgressWeel () # read the next packet line = packet.datain.read (size) n = len (line) continue elif (packet.subunit077 == WCS): self.handleWCS (packet) line = packet.datain.read (size) n = len (line) continue elif (packet.subunit077 == IMCURSOR): self.handleImcursor (packet) line = packet.datain.read (size) n = len (line) continue else: # no-op pass if (not (packet.tid & IIS_READ)): # OK, discard the rest of the data nbytes = packet.nbytes while (nbytes > 0): if (nbytes < SZ_FIFOBUF): n = nbytes else: n = SZ_FIFOBUF m = self.rfile.read (n) if (m <= 0): break nbytes -= n # read the next packet line = packet.datain.read (size) n = len (line) if (n < size): return # <--- end of the while (n) loop self.server.controller.updateProgressInfo ('Done.', 2.0) if (self.needsUpdate): self.server.controller.displayImage () return | eb163fa149dbd928a3fa7b9842edc6170373d658 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2360/eb163fa149dbd928a3fa7b9842edc6170373d658/RequestHandler.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
261,
2890,
4672,
3536,
1220,
353,
1625,
326,
1301,
2542,
18,
3536,
365,
18,
3567,
18,
5723,
18,
2725,
5491,
966,
7707,
13834,
1093,
16,
576,
13,
225,
468,
752,
279,
4414,
3695,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
261,
2890,
4672,
3536,
1220,
353,
1625,
326,
1301,
2542,
18,
3536,
365,
18,
3567,
18,
5723,
18,
2725,
5491,
966,
7707,
13834,
1093,
16,
576,
13,
225,
468,
752,
279,
4414,
3695,
4... |
tail = len(self.body) > LIMIT and '...' or '' | tail = len(self.body) > LIMIT and '...' or '' | def summary(self): LIMIT = 50 tail = len(self.body) > LIMIT and '...' or '' return self.body[:LIMIT] + tail | c114aab6e3ffead3d3b362276b8bf3ebb9e69661 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12938/c114aab6e3ffead3d3b362276b8bf3ebb9e69661/models.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4916,
12,
2890,
4672,
13319,
273,
6437,
5798,
273,
562,
12,
2890,
18,
3432,
13,
405,
13319,
471,
20243,
578,
875,
327,
365,
18,
3432,
10531,
8283,
65,
397,
5798,
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,
4916,
12,
2890,
4672,
13319,
273,
6437,
5798,
273,
562,
12,
2890,
18,
3432,
13,
405,
13319,
471,
20243,
578,
875,
327,
365,
18,
3432,
10531,
8283,
65,
397,
5798,
2,
-100,
-100,
-100,
-... |
logger.critical(u'''Creating an instance caused an error for one of: MythDBConn or MythVideo, error(%s) | logger.critical(u'''Creating an instance caused an error for one of: MythDB or MythVideo, error(%s) | def __getattr__(self, attr): """Delegate everything but write to the stream""" return getattr(self.out, attr) | 1343c41ccf0843d1fd2aca238fd7164a00e09ba4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13713/1343c41ccf0843d1fd2aca238fd7164a00e09ba4/mirobridge.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
588,
1747,
972,
12,
2890,
16,
1604,
4672,
3536,
9586,
7756,
1496,
1045,
358,
326,
1407,
8395,
327,
3869,
12,
2890,
18,
659,
16,
1604,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
588,
1747,
972,
12,
2890,
16,
1604,
4672,
3536,
9586,
7756,
1496,
1045,
358,
326,
1407,
8395,
327,
3869,
12,
2890,
18,
659,
16,
1604,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
glyphs_to_append=("_2561", "_1025") initialcount=179 | glyphs_to_append=("_2561", "_1025", "_0075", "_0076", "_0078", "_0080") initialcount=189 | def initialize_glyphs(): global initial_glyphs, initialcount, count for number in initial_glyphs: toto="_00%02d" % int(number) initial_glyphs.insert(0,toto) initial_glyphs.remove(number) if font_name=="gregorio": glyphs_to_append=("_1025", "_2561") initialcount=178 elif font_name=="parmesan": glyphs_to_append=("_1025", "_2561") initialcount=178 elif font_name=="greciliae": glyphs_to_append=("_2561", "_1025") initialcount=179 elif font_name=="gregoria": glyphs_to_append=("_2561", "_1025") initialcount=178 for glyphnumber in glyphs_to_append: initial_glyphs.append(glyphnumber) count=initialcount | 4b001d16d1fd8d460d56aa89c56eaff58440c9ed /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7096/4b001d16d1fd8d460d56aa89c56eaff58440c9ed/squarize.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4046,
67,
19426,
87,
13332,
2552,
2172,
67,
19426,
87,
16,
2172,
1883,
16,
1056,
364,
1300,
316,
2172,
67,
19426,
87,
30,
268,
6302,
1546,
67,
713,
9,
3103,
72,
6,
738,
509,
12,
2696... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4046,
67,
19426,
87,
13332,
2552,
2172,
67,
19426,
87,
16,
2172,
1883,
16,
1056,
364,
1300,
316,
2172,
67,
19426,
87,
30,
268,
6302,
1546,
67,
713,
9,
3103,
72,
6,
738,
509,
12,
2696... |
'_topdir %s/%s' % (os.getcwd(), rpm_base),]) | '_topdir %s/%s' % (os.getcwd(), self.rpm_base),]) | def run (self): | ba0c406df5613e0bb0538b6dc43268e63fc8db5a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/ba0c406df5613e0bb0538b6dc43268e63fc8db5a/bdist_rpm.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,
... |
return text.rjust(vimformat.TEXT_WIDTH) | return text.rjust(vimformat.TEXT_WIDTH) + "\n" | def handleLink(link, width): text = '*' + GetText(link.childNodes) + '*' return text.rjust(vimformat.TEXT_WIDTH) | 3d0fffdb9fbce8d86076159a7d2a35ee8ad4c456 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6145/3d0fffdb9fbce8d86076159a7d2a35ee8ad4c456/vimxml.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
2098,
12,
1232,
16,
1835,
4672,
977,
273,
5306,
397,
968,
1528,
12,
1232,
18,
3624,
3205,
13,
397,
5306,
225,
327,
977,
18,
86,
3732,
12,
90,
381,
2139,
18,
5151,
67,
10023,
13... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
2098,
12,
1232,
16,
1835,
4672,
977,
273,
5306,
397,
968,
1528,
12,
1232,
18,
3624,
3205,
13,
397,
5306,
225,
327,
977,
18,
86,
3732,
12,
90,
381,
2139,
18,
5151,
67,
10023,
13... |
filtered += wc.filter.applyfilter(wc.filter.FILTER_RESPONSE_MODIFY, "", 'finish', attrs) | filtered += wc.filter.applyfilter( wc.filter.STAGE_RESPONSE_MODIFY, "", 'finish', attrs) | def _main (): """USAGE: test/run.sh test/filterfile.py <config dir> <.html file>""" if len(sys.argv)!=3: print _main.__doc__ sys.exit(1) confdir = sys.argv[1] fname = sys.argv[2] if fname=="-": f = sys.stdin else: f = file(fname) logfile = os.path.join(confdir, "logging.conf") wc.initlog(logfile, wc.Name, filelogs=False) wc.configuration.config = wc.configuration.init(confdir=confdir) wc.configuration.config.init_filter_modules() wc.proxy.dns_lookups.init_resolver() headers = wc.proxy.Headers.WcMessage() headers['Content-Type'] = "text/html" attrs = wc.filter.get_filterattrs(fname, [wc.filter.FILTER_RESPONSE_MODIFY], headers=headers, serverheaders=headers) filtered = "" data = f.read(2048) while data: print >>sys.stderr, "Test: data", len(data) try: filtered += wc.filter.applyfilter(wc.filter.FILTER_RESPONSE_MODIFY, data, 'filter', attrs) except wc.filter.FilterException, msg: print >>sys.stderr, "Test: exception:", msg pass data = f.read(2048) print >>sys.stderr, "Test: finishing" i = 1 while True: print >>sys.stderr, "Test: finish", i try: filtered += wc.filter.applyfilter(wc.filter.FILTER_RESPONSE_MODIFY, "", 'finish', attrs) break except wc.filter.FilterException, msg: print >>sys.stderr, "Test: finish: exception:", msg wc.proxy.proxy_poll(timeout=max(0, wc.proxy.run_timers())) i += 1 if i==200: # background downloading if javascript is too slow print >>sys.stderr, "Test: oooooops" break print "Filtered:", filtered | 678ba849fbf388983e9878b8f7f0379239e5ab00 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3948/678ba849fbf388983e9878b8f7f0379239e5ab00/filterfile.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
5254,
1832,
30,
3536,
29550,
30,
1842,
19,
2681,
18,
674,
1842,
19,
2188,
768,
18,
2074,
411,
1425,
1577,
34,
411,
18,
2620,
585,
2984,
3660,
309,
562,
12,
9499,
18,
19485,
13,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
5254,
1832,
30,
3536,
29550,
30,
1842,
19,
2681,
18,
674,
1842,
19,
2188,
768,
18,
2074,
411,
1425,
1577,
34,
411,
18,
2620,
585,
2984,
3660,
309,
562,
12,
9499,
18,
19485,
13,
... |
if cur > total: total = cur | if current > total: total = current | def GetExportProgress(self): """ Returns tuple with number of seconds done, and number of total seconds. """ if self.IsExporting: try: #total = self.mainpipeline.query_duration(gst.FORMAT_TIME)[0] total = self.GetProjectLength() * gst.SECOND cur = self.mainpipeline.query_position(gst.FORMAT_TIME)[0] except gst.QueryError: return (-1, -1) else: if cur > total: total = cur self.TerminateExport() return (float(cur)/gst.SECOND, float(total)/gst.SECOND) else: return (100, 100) | e2b4f4a534dc5054c26a7ac44730cd6e0c158de4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10033/e2b4f4a534dc5054c26a7ac44730cd6e0c158de4/Project.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
968,
6144,
5491,
12,
2890,
4672,
3536,
2860,
3193,
598,
1300,
434,
3974,
2731,
16,
471,
1300,
434,
2078,
3974,
18,
3536,
309,
365,
18,
2520,
6144,
310,
30,
775,
30,
468,
4963,
273,
365... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
968,
6144,
5491,
12,
2890,
4672,
3536,
2860,
3193,
598,
1300,
434,
3974,
2731,
16,
471,
1300,
434,
2078,
3974,
18,
3536,
309,
365,
18,
2520,
6144,
310,
30,
775,
30,
468,
4963,
273,
365... |
self.write_text(choice.name, val.font, content, x=x0 + hskip, y=y0 + vskip + val.height, width=val.width, height=-1, | self.write_text(choice.name, val.font, content, x=x0, y=y0 + val.height, width=val.width, height=-1, | def update_content(self): """ update the listing area """ | 89d3a48576954c634545f1e0e240fa334f6245a2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/89d3a48576954c634545f1e0e240fa334f6245a2/listing_area.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
67,
1745,
12,
2890,
4672,
3536,
1089,
326,
11591,
5091,
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,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
67,
1745,
12,
2890,
4672,
3536,
1089,
326,
11591,
5091,
3536,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
parts = node['parts'] | def html_visit_inheritance_diagram(self, node): """ Output the graph for HTML. This will insert a PNG with clickable image map. """ graph = node['graph'] parts = node['parts'] graph_hash = get_graph_hash(node) name = 'inheritance%s' % graph_hash # Create a mapping from fully-qualified class names to URLs. urls = {} for child in node: if child.get('refuri') is not None: urls[child['reftitle']] = child.get('refuri') elif child.get('refid') is not None: urls[child['reftitle']] = '#' + child.get('refid') dotcode = graph.generate_dot(name, parts, urls, env=self.builder.env) render_dot_html(self, node, dotcode, [], 'inheritance', 'inheritance', alt='Inheritance diagram of ' + node['content']) raise nodes.SkipNode | b90ca05941e1fd53e0d69ced376e466dab659f67 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5532/b90ca05941e1fd53e0d69ced376e466dab659f67/inheritance_diagram.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1729,
67,
11658,
67,
6018,
1359,
67,
12264,
1940,
12,
2890,
16,
756,
4672,
3536,
3633,
326,
2667,
364,
3982,
18,
225,
1220,
903,
2243,
279,
22476,
598,
4682,
429,
1316,
852,
18,
3536,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1729,
67,
11658,
67,
6018,
1359,
67,
12264,
1940,
12,
2890,
16,
756,
4672,
3536,
3633,
326,
2667,
364,
3982,
18,
225,
1220,
903,
2243,
279,
22476,
598,
4682,
429,
1316,
852,
18,
3536,
... | |
sys.argv[0] = "/foo/bar/baz.py" parser = OptionParser("usage: %prog ...", version="%prog 1.2") expected_usage = "usage: baz.py ...\n" self.assertUsage(parser, expected_usage) self.assertVersion(parser, "baz.py 1.2") self.assertHelp(parser, expected_usage + "\n" + "options:\n" " --version show program's version number and exit\n" " -h, --help show this help message and exit\n") | save_argv = sys.argv[:] try: sys.argv[0] = "/foo/bar/baz.py" parser = OptionParser("usage: %prog ...", version="%prog 1.2") expected_usage = "usage: baz.py ...\n" self.assertUsage(parser, expected_usage) self.assertVersion(parser, "baz.py 1.2") self.assertHelp(parser, expected_usage + "\n" + "options:\n" " --version show program's version number and exit\n" " -h, --help show this help message and exit\n") finally: sys.argv[:] = save_argv | def test_default_progname(self): # Make sure that program name taken from sys.argv[0] by default. sys.argv[0] = "/foo/bar/baz.py" parser = OptionParser("usage: %prog ...", version="%prog 1.2") expected_usage = "usage: baz.py ...\n" self.assertUsage(parser, expected_usage) self.assertVersion(parser, "baz.py 1.2") self.assertHelp(parser, expected_usage + "\n" + "options:\n" " --version show program's version number and exit\n" " -h, --help show this help message and exit\n") | 54b934e963d7972f62c3625b723cb51a21647124 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/54b934e963d7972f62c3625b723cb51a21647124/test_optparse.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
1886,
67,
14654,
529,
12,
2890,
4672,
468,
4344,
3071,
716,
5402,
508,
9830,
628,
2589,
18,
19485,
63,
20,
65,
635,
805,
18,
2589,
18,
19485,
63,
20,
65,
273,
2206,
11351,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1886,
67,
14654,
529,
12,
2890,
4672,
468,
4344,
3071,
716,
5402,
508,
9830,
628,
2589,
18,
19485,
63,
20,
65,
635,
805,
18,
2589,
18,
19485,
63,
20,
65,
273,
2206,
11351,
... |
def plugin_toggled(self, renderer, _path): renderer.set_active(not renderer.get_active()) | def plugin_toggled(self, renderer, path, user_data): model, column = user_data model[path][column] = not model[path][column] return | def plugin_toggled(self, renderer, _path): renderer.set_active(not renderer.get_active()) | 5c439d0e2f2a15cd484c856e850d4ef1ac7dd331 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2312/5c439d0e2f2a15cd484c856e850d4ef1ac7dd331/preferences.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1909,
67,
88,
23972,
1259,
12,
2890,
16,
5690,
16,
589,
16,
729,
67,
892,
4672,
938,
16,
1057,
273,
729,
67,
892,
938,
63,
803,
6362,
2827,
65,
273,
486,
938,
63,
803,
6362,
2827,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1909,
67,
88,
23972,
1259,
12,
2890,
16,
5690,
16,
589,
16,
729,
67,
892,
4672,
938,
16,
1057,
273,
729,
67,
892,
938,
63,
803,
6362,
2827,
65,
273,
486,
938,
63,
803,
6362,
2827,
... |
@param count true iff it should count number of times each line is executed @param trace true iff it should print out each line that is being counted @param countfuncs true iff it should just output a list of (filename, modulename, funcname,) for functions that were called at least once; This overrides `count' and `trace' | @param count true iff it should count number of times each line is executed @param trace true iff it should print out each line that is being counted @param countfuncs true iff it should just output a list of (filename, modulename, funcname,) for functions that were called at least once; This overrides `count' and `trace' | def __init__(self, count=1, trace=1, countfuncs=0, ignoremods=(), ignoredirs=(), infile=None, outfile=None): """ @param count true iff it should count number of times each line is executed @param trace true iff it should print out each line that is being counted @param countfuncs true iff it should just output a list of (filename, modulename, funcname,) for functions that were called at least once; This overrides `count' and `trace' @param ignoremods a list of the names of modules to ignore @param ignoredirs a list of the names of directories to ignore all of the (recursive) contents of @param infile file from which to read stored counts to be added into the results @param outfile file in which to write the results """ self.infile = infile self.outfile = outfile self.ignore = Ignore(ignoremods, ignoredirs) self.counts = {} # keys are (filename, linenumber) self.blabbed = {} # for debugging self.pathtobasename = {} # for memoizing os.path.basename self.donothing = 0 self.trace = trace self._calledfuncs = {} if countfuncs: self.globaltrace = self.globaltrace_countfuncs elif trace and count: self.globaltrace = self.globaltrace_lt self.localtrace = self.localtrace_trace_and_count elif trace: self.globaltrace = self.globaltrace_lt self.localtrace = self.localtrace_trace elif count: self.globaltrace = self.globaltrace_lt self.localtrace = self.localtrace_count else: # Ahem -- do nothing? Okay. self.donothing = 1 | 1255e8bca5f975b133653db2e2f74b0d4cb7a9da /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/1255e8bca5f975b133653db2e2f74b0d4cb7a9da/trace.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1056,
33,
21,
16,
2606,
33,
21,
16,
1056,
17728,
33,
20,
16,
2305,
22760,
33,
9334,
2305,
8291,
33,
9334,
14568,
33,
7036,
16,
8756,
33,
7036,
4672,
35... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1056,
33,
21,
16,
2606,
33,
21,
16,
1056,
17728,
33,
20,
16,
2305,
22760,
33,
9334,
2305,
8291,
33,
9334,
14568,
33,
7036,
16,
8756,
33,
7036,
4672,
35... |
if not os.access(path,os.W_OK): | if not is_writable(path): | def default_dir(): """ Return a default location to store compiled files and catalogs. XX is the Python version number in all paths listed below On windows, the default location is the temporary directory returned by gettempdir()/pythonXX. On Unix, ~/.pythonXX_compiled is the default location. If it doesn't exist, it is created. The directory is marked rwx------. If for some reason it isn't possible to build a default directory in the user's home, /tmp/<uid>_pythonXX_compiled is used. If it doesn't exist, it is created. The directory is marked rwx------ to try and keep people from being able to sneak a bad module in on you. """ import tempfile python_name = "python%d%d_compiled" % tuple(sys.version_info[:2]) if sys.platform != 'win32': try: path = os.path.join(os.environ['HOME'],'.' + python_name) except KeyError: temp_dir = `os.getuid()` + '_' + python_name path = os.path.join(tempfile.gettempdir(),temp_dir) else: path = os.path.join(tempfile.gettempdir(),python_name) if not os.path.exists(path): os.mkdir(path) os.chmod(path,0700) # make it only accessible by this user. if not os.access(path,os.W_OK): print 'warning: default directory is not write accessible.' print 'defualt:', path return path | ef494feebe6224fb56ba36961b60d609f74551ee /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14925/ef494feebe6224fb56ba36961b60d609f74551ee/catalog.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
805,
67,
1214,
13332,
3536,
2000,
279,
805,
2117,
358,
1707,
7743,
1390,
471,
26455,
18,
225,
1139,
60,
353,
326,
6600,
1177,
1300,
316,
777,
2953,
12889,
5712,
2755,
9965,
16,
326,
805,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1214,
13332,
3536,
2000,
279,
805,
2117,
358,
1707,
7743,
1390,
471,
26455,
18,
225,
1139,
60,
353,
326,
6600,
1177,
1300,
316,
777,
2953,
12889,
5712,
2755,
9965,
16,
326,
805,... |
mean_value = (min(a) + max(a))/2.0 | mirror = min(a) + max(a) | def run(args): run_mode = args.pop(0) assert run_mode in run_modes filename = args.pop(0) data = Gwyddion.dump.read(filename) dfield = data['/0/data'] a = dfield['data'] n = len(a) mean_value = (min(a) + max(a))/2.0 for i in range(n): a[i] = mean_value - a[i] Gwyddion.dump.write(data, filename) | 8f37642fabc20f699593dea61a3116914c8e4e19 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6176/8f37642fabc20f699593dea61a3116914c8e4e19/invert_python.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
1968,
4672,
1086,
67,
3188,
273,
833,
18,
5120,
12,
20,
13,
1815,
1086,
67,
3188,
316,
1086,
67,
19282,
225,
1544,
273,
833,
18,
5120,
12,
20,
13,
501,
273,
611,
91,
93,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
1968,
4672,
1086,
67,
3188,
273,
833,
18,
5120,
12,
20,
13,
1815,
1086,
67,
3188,
316,
1086,
67,
19282,
225,
1544,
273,
833,
18,
5120,
12,
20,
13,
501,
273,
611,
91,
93,
... |
self.assertEquals(f1.result(timeout=1), 42) | self.assertEquals(f1.result(timeout=5), 42) | def notification(): time.sleep(0.1) with f1._condition: f1._state = FINISHED f1._result = 42 f1._condition.notify_all() | e8a84fa6a17b77fedbffac4d58eb93b64b079c29 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4870/e8a84fa6a17b77fedbffac4d58eb93b64b079c29/test_futures.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3851,
13332,
813,
18,
19607,
12,
20,
18,
21,
13,
598,
284,
21,
6315,
4175,
30,
284,
21,
6315,
2019,
273,
25768,
2056,
284,
21,
6315,
2088,
273,
14856,
284,
21,
6315,
4175,
18,
12336,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3851,
13332,
813,
18,
19607,
12,
20,
18,
21,
13,
598,
284,
21,
6315,
4175,
30,
284,
21,
6315,
2019,
273,
25768,
2056,
284,
21,
6315,
2088,
273,
14856,
284,
21,
6315,
4175,
18,
12336,
... |
except AttributeError: conf.fatal("Add options(opt): opt.load('compiler_cc')") | except AttributeError: conf.fatal("Add options(opt): opt.load('compiler_c')") | def configure(conf): """ for each compiler for the platform, try to configure the compiler in theory the tools should raise a configuration error if the compiler pretends to be something it is not (setting CC=icc and trying to configure gcc) """ try: test_for_compiler = conf.options.check_c_compiler except AttributeError: conf.fatal("Add options(opt): opt.load('compiler_cc')") for compiler in test_for_compiler.split(): conf.env.stash() conf.start_msg('Checking for %r (c compiler)' % compiler) try: conf.load(compiler) except conf.errors.ConfigurationError as e: conf.env.revert() conf.end_msg(False) debug('compiler_cc: %r' % e) else: if conf.env['CC']: conf.end_msg(True) conf.env['COMPILER_CC'] = compiler break conf.end_msg(False) else: conf.fatal('could not configure a c compiler!') | 3c491454eecb627d964393942090c586883ff004 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2886/3c491454eecb627d964393942090c586883ff004/compiler_c.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5068,
12,
3923,
4672,
3536,
364,
1517,
5274,
364,
326,
4072,
16,
775,
358,
5068,
326,
5274,
316,
326,
630,
326,
8513,
1410,
1002,
279,
1664,
555,
309,
326,
5274,
675,
88,
5839,
358,
50... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5068,
12,
3923,
4672,
3536,
364,
1517,
5274,
364,
326,
4072,
16,
775,
358,
5068,
326,
5274,
316,
326,
630,
326,
8513,
1410,
1002,
279,
1664,
555,
309,
326,
5274,
675,
88,
5839,
358,
50... |
libraries, extradirs, extraexportsymbols) | libraries, extradirs, extraexportsymbols, outputdir) | def genpluginproject(architecture, module, project=None, projectdir=None, sources=[], sourcedirs=[], libraries=[], extradirs=[], extraexportsymbols=[], outputdir=":::Lib:lib-dynload"): if architecture == "all": # For the time being we generate two project files. Not as nice as # a single multitarget project, but easier to implement for now. genpluginproject("ppc", module, project, projectdir, sources, sourcedirs, libraries, extradirs, extraexportsymbols) genpluginproject("carbon", module, project, projectdir, sources, sourcedirs, libraries, extradirs, extraexportsymbols) return templatename = "template-%s" % architecture targetname = "%s.%s" % (module, architecture) dllname = "%s.%s.slb" % (module, architecture) if not project: if architecture != "ppc": project = "%s.%s.mcp"%(module, architecture) else: project = "%s.mcp"%module if not projectdir: projectdir = PROJECTDIR if not sources: sources = [module + 'module.c'] if not sourcedirs: for moduledir in MODULEDIRS: if '%' in moduledir: moduledir = moduledir % module fn = os.path.join(projectdir, os.path.join(moduledir, sources[0])) if os.path.exists(fn): moduledir, sourcefile = os.path.split(fn) sourcedirs = [relpath(projectdir, moduledir)] sources[0] = sourcefile break else: print "Warning: %s: sourcefile not found: %s"%(module, sources[0]) sourcedirs = [] if architecture == "carbon": prefixname = "mwerks_carbonplugin_config.h" else: prefixname = "mwerks_plugin_config.h" dict = { "sysprefix" : relpath(projectdir, sys.prefix), "sources" : sources, "extrasearchdirs" : sourcedirs + extradirs, "libraries": libraries, "mac_outputdir" : outputdir, "extraexportsymbols" : extraexportsymbols, "mac_targetname" : targetname, "mac_dllname" : dllname, "prefixname" : prefixname, } mkcwproject.mkproject(os.path.join(projectdir, project), module, dict, force=FORCEREBUILD, templatename=templatename) | 579f673323af12f7aa8ee186776b73f9976097f9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/579f673323af12f7aa8ee186776b73f9976097f9/genpluginprojects.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3157,
4094,
4406,
12,
991,
18123,
16,
1605,
16,
1984,
33,
7036,
16,
1984,
1214,
33,
7036,
16,
5550,
22850,
6487,
1084,
8291,
22850,
6487,
14732,
22850,
6487,
7582,
361,
10539,
22850,
6487,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3157,
4094,
4406,
12,
991,
18123,
16,
1605,
16,
1984,
33,
7036,
16,
1984,
1214,
33,
7036,
16,
5550,
22850,
6487,
1084,
8291,
22850,
6487,
14732,
22850,
6487,
7582,
361,
10539,
22850,
6487,... |
def ZpFM(p, prec = 20, print_mode = None, halt = 40, check=True): | def ZpFM(p, prec = twenty, print_mode = None, halt = forty, check=True): | def ZpFM(p, prec = 20, print_mode = None, halt = 40, check=True): return Zp(p=p, prec=prec, print_mode=print_mode, halt=halt, check=check, type = 'fixed-mod') | 52b1691f211d5745f1620cd0a7f20ac04ca573c9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/52b1691f211d5745f1620cd0a7f20ac04ca573c9/factory.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2285,
84,
42,
49,
12,
84,
16,
13382,
273,
2339,
319,
93,
16,
1172,
67,
3188,
273,
599,
16,
18389,
273,
364,
4098,
16,
866,
33,
5510,
4672,
327,
2285,
84,
12,
84,
33,
84,
16,
13382,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2285,
84,
42,
49,
12,
84,
16,
13382,
273,
2339,
319,
93,
16,
1172,
67,
3188,
273,
599,
16,
18389,
273,
364,
4098,
16,
866,
33,
5510,
4672,
327,
2285,
84,
12,
84,
33,
84,
16,
13382,... |
if fileInfo: | if S_ISREG(entry.filemode): | def __getDirectoryContents(self,path): """ Returns a dictionary containing all of the contents of a directory. This includes the metadata associated to files (replicas, size, guid, status) and the subdirectories found. """ # First check that the directory exists, this res = self.exists(path) if not res['OK']: return res if not res['Value']['Successful'].has_key(path): return S_ERROR('__getDirectoryContents: There was an error accessing the supplied path') if not res['Value']['Successful'][path]: return S_ERROR('__getDirectoryContents: There supplied path does not exist') | cff124c80101a729006f0324d8648c6b90cbff8a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12864/cff124c80101a729006f0324d8648c6b90cbff8a/LcgFileCatalogClient.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
588,
2853,
6323,
12,
2890,
16,
803,
4672,
3536,
2860,
279,
3880,
4191,
777,
434,
326,
2939,
434,
279,
1867,
18,
1220,
6104,
326,
1982,
3627,
358,
1390,
261,
266,
10528,
16,
963,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
588,
2853,
6323,
12,
2890,
16,
803,
4672,
3536,
2860,
279,
3880,
4191,
777,
434,
326,
2939,
434,
279,
1867,
18,
1220,
6104,
326,
1982,
3627,
358,
1390,
261,
266,
10528,
16,
963,
... |
"""open_vistrail_from_zip_xml(filename) -> Vistrail""" zipfname = os.path.basename(filename) name_in_archive = zipfname if len(zipfname) > 3: dot = zipfname.rfind('.') name_in_archive = zipfname[:dot] xmlfname = os.path.join(core.system.temporary_directory(),name_in_archive) | """open_vistrail_from_zip_xml(filename) -> Vistrail Open a vistrail from a zip compressed format. It expects that the file inside archive has name vistrail """ name_in_archive = 'vistrail' (file_, xmlfname) = tempfile.mkstemp(suffix='.xml') | def open_vistrail_from_zip_xml(filename): """open_vistrail_from_zip_xml(filename) -> Vistrail""" # will assume that the file inside has the same name without .vt zipfname = os.path.basename(filename) name_in_archive = zipfname if len(zipfname) > 3: dot = zipfname.rfind('.') name_in_archive = zipfname[:dot] xmlfname = os.path.join(core.system.temporary_directory(),name_in_archive) core.requirements.require_executable('unzip') if systemType not in ['Windows', 'Microsoft']: cmdline = 'unzip -p %s %s > %s' % (filename, name_in_archive, xmlfname) process = popen2.Popen4(cmdline) result = -1 while result == -1: result = process.poll() output = process.fromchild.readlines() else: cmdline = 'unzip -p "%s" "%s" > "%s"' % (filename, name_in_archive, xmlfname) result = -1 out, inp = popen2.popen4(cmdline) output = out.readlines() #print result, output if result == 0 or len(output) == 0: vistrail = open_vistrail_from_xml(xmlfname) os.unlink(xmlfname) return vistrail else: raise Exception(" ".join(output)) | d2e792d72bd9ef0551682768f3b59ab7ada66fae /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6341/d2e792d72bd9ef0551682768f3b59ab7ada66fae/io.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1696,
67,
90,
3337,
671,
67,
2080,
67,
4450,
67,
2902,
12,
3459,
4672,
3536,
3190,
67,
90,
3337,
671,
67,
2080,
67,
4450,
67,
2902,
12,
3459,
13,
317,
776,
3337,
671,
8395,
468,
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,
1696,
67,
90,
3337,
671,
67,
2080,
67,
4450,
67,
2902,
12,
3459,
4672,
3536,
3190,
67,
90,
3337,
671,
67,
2080,
67,
4450,
67,
2902,
12,
3459,
13,
317,
776,
3337,
671,
8395,
468,
903,... |
<name>%d/%d/%d.png</name> | <name>%d/%d/%d.%s</name> | def generate_kml( **args ): """ Template for the tile kml. Returns filled string. Expected variables: zoom, ix, iy, rpixel, tilesize, tileformat, south, west, xsize, ysize, maxzoom """ zoom, ix, iy, rpixel = args['zoom'], args['ix'], args['iy'], args['rpixel'] maxzoom, tilesize = args['maxzoom'], args['tilesize'] south, west = args['south'], args['west'] xsize, ysize = args['xsize'], args['ysize'] nsew = lambda ix, iy, rpixel: (south + rpixel*((iy+1)*tilesize), south + rpixel*(iy*tilesize), west + rpixel*((ix+1)*tilesize), west + rpixel*ix*tilesize) args['minlodpixels'] = args['tilesize'] / 2 args['tnorth'], args['tsouth'], args['teast'], args['twest'] = nsew(ix, iy, rpixel) if verbose: print "\tKML for area NSEW: %.20f %.20f %.20f %.20f" % nsew(ix, iy, rpixel) xchildern = [] ychildern = [] if zoom < maxzoom: zareasize = 2.0**(maxzoom-zoom-1)*tilesize xchildern.append(ix*2) if ix*2+1 < int( ceil( xsize / zareasize)): xchildern.append(ix*2+1) ychildern.append(iy*2) if iy*2+1 < int( ceil( ysize / zareasize)): ychildern.append(iy*2+1) s = """<?xml version="1.0" encoding="utf-8"?> | 76fa2f42b72b0363b7511f1567746078baebe8c8 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/10289/76fa2f42b72b0363b7511f1567746078baebe8c8/gdal2tiles.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2103,
67,
79,
781,
12,
2826,
1968,
262,
30,
3536,
5035,
364,
326,
4769,
417,
781,
18,
2860,
6300,
533,
18,
13219,
3152,
30,
7182,
16,
8288,
16,
23466,
16,
8715,
3556,
16,
12568,
554,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2103,
67,
79,
781,
12,
2826,
1968,
262,
30,
3536,
5035,
364,
326,
4769,
417,
781,
18,
2860,
6300,
533,
18,
13219,
3152,
30,
7182,
16,
8288,
16,
23466,
16,
8715,
3556,
16,
12568,
554,
... |
key, val = filter(None, map(text, item.find_all('td'))) info[keys[key]] = val | values = filter(None, map(text, item.find_all('td'))) middle = len(values) / 2 fields = [keys[key] if key in spanmap else key for key in values[:middle]] info.update(zip(fields, values[middle:])) | def parse_albumpage(page): album_soup = parse_html.SoupWrapper(parse_html.parse(page)) artist_group = album_soup.find_all('td', 'artist') info = {} for item in artist_group: key = item.find('span').all_text().strip() if key in keys: if callable(keys[key]): info.update(keys[key](item)) else: key, val = filter(None, map(text, item.find_all('td'))) info[keys[key]] = val info.update(parse_rating(album_soup)) info.update(parse_cover(album_soup)) info.update(parse_review(album_soup)) if 'year' in info: try: year = time.strptime(info['year'], '%b %d, %Y') info['year'] = time.strftime('%Y-%m-%d', year) except ValueError: try: year = time.strptime(info['year'], '%b %Y') info['year'] = time.strftime('%Y-%m', year) except ValueError: pass releasetype = [parse_album_element(t) for t in album_soup.find_all('table', width="342", cellpadding="0", cellspacing="0")[0][1:]] return info, parse_tracks(album_soup) | 6cc7bd8ff99f60f0e8c9d9fadef063e1ca8db850 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3907/6cc7bd8ff99f60f0e8c9d9fadef063e1ca8db850/amg.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
67,
25090,
2433,
12,
2433,
4672,
14844,
67,
2048,
416,
273,
1109,
67,
2620,
18,
27069,
3611,
12,
2670,
67,
2620,
18,
2670,
12,
2433,
3719,
15469,
67,
1655,
273,
14844,
67,
2048,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
67,
25090,
2433,
12,
2433,
4672,
14844,
67,
2048,
416,
273,
1109,
67,
2620,
18,
27069,
3611,
12,
2670,
67,
2620,
18,
2670,
12,
2433,
3719,
15469,
67,
1655,
273,
14844,
67,
2048,
... |
if entity.entity_type.source != 'osm': | if entity.source.module_name != 'molly.providers.apps.maps.osm': | def handle_GET(cls, request, context, type_slug, id): entity = context['entity'] if entity.entity_type.source != 'osm': raise Http404 | 10ea9b227156c90def0c058559d2eb86af439411 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14173/10ea9b227156c90def0c058559d2eb86af439411/views.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
67,
3264,
12,
6429,
16,
590,
16,
819,
16,
618,
67,
6436,
16,
612,
4672,
1522,
273,
819,
3292,
1096,
3546,
309,
1522,
18,
3168,
18,
2978,
67,
529,
480,
296,
21260,
715,
18,
1752... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
67,
3264,
12,
6429,
16,
590,
16,
819,
16,
618,
67,
6436,
16,
612,
4672,
1522,
273,
819,
3292,
1096,
3546,
309,
1522,
18,
3168,
18,
2978,
67,
529,
480,
296,
21260,
715,
18,
1752... |
self.dprint('dir=%s pattern=%s' % (uridir, pattern)) | self.dprint(u'dir=%s pattern=%s' % (uridir, pattern)) | def completePath(self, text, uri, path): paths = [] if '/' in path: if path.endswith('/'): # It's already a directory uridir = uri pattern = '' else: # The stuff after the last slash is the pattern to match uridir, pattern = path.rsplit('/', 1) uridir = vfs.get_dirname(uri) elif path == '.': # Needed to handle protocols that don't use leading slashes uridir = uri pattern = '' else: uridir = vfs.get_dirname(uri) pattern = path self.dprint('dir=%s pattern=%s' % (uridir, pattern)) for name in vfs.get_names(uridir): if not name.startswith(pattern): self.dprint("skipping %s because it doesn't start with %s" % (name, pattern)) continue uri = uridir.resolve2(name) path = str(uri) if vfs.is_folder(uri): path = str(uri) + '/' else: path = str(uri) self.dprint(path) paths.append(path) return paths | e93c2da781a8338895f3837819d7baa7fe6f0c78 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11522/e93c2da781a8338895f3837819d7baa7fe6f0c78/mainmenu.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3912,
743,
12,
2890,
16,
977,
16,
2003,
16,
589,
4672,
2953,
273,
5378,
309,
2023,
316,
589,
30,
309,
589,
18,
5839,
1918,
2668,
2473,
4672,
468,
2597,
1807,
1818,
279,
1867,
8896,
350... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3912,
743,
12,
2890,
16,
977,
16,
2003,
16,
589,
4672,
2953,
273,
5378,
309,
2023,
316,
589,
30,
309,
589,
18,
5839,
1918,
2668,
2473,
4672,
468,
2597,
1807,
1818,
279,
1867,
8896,
350... |
for ((pid, address), bp) in self.__pageBP.itervalues(): | for ((pid, address), bp) in self.__pageBP.iteritems(): | def get_all_page_breakpoints(self): """ @rtype: list of tuple( int, L{PageBreakpoint} ) @return: All page breakpoints as a list of tuples (pid, bp). """ | 6c990afd5a2ab711f191645e14c3a19d8842347b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7261/6c990afd5a2ab711f191645e14c3a19d8842347b/breakpoint.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
454,
67,
2433,
67,
8820,
4139,
12,
2890,
4672,
3536,
632,
86,
723,
30,
225,
666,
434,
3193,
12,
509,
16,
511,
95,
1964,
20552,
97,
262,
632,
2463,
30,
4826,
1363,
23416,
487... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
336,
67,
454,
67,
2433,
67,
8820,
4139,
12,
2890,
4672,
3536,
632,
86,
723,
30,
225,
666,
434,
3193,
12,
509,
16,
511,
95,
1964,
20552,
97,
262,
632,
2463,
30,
4826,
1363,
23416,
487... |
elif x == roster.first_player: | elif x.prev == None: | def AddPlayer(self, playerID, firstName, lastName, bats, throws, team): p = cw_player_create(playerID, lastName, firstName, bats, throws) | fc03920ae847e01b1f56268350f454a95027ab67 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10056/fc03920ae847e01b1f56268350f454a95027ab67/scorebook.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1436,
12148,
12,
2890,
16,
7291,
734,
16,
22033,
16,
23439,
16,
324,
2323,
16,
1216,
16,
5927,
4672,
293,
273,
14098,
67,
14872,
67,
2640,
12,
14872,
734,
16,
23439,
16,
22033,
16,
324... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1436,
12148,
12,
2890,
16,
7291,
734,
16,
22033,
16,
23439,
16,
324,
2323,
16,
1216,
16,
5927,
4672,
293,
273,
14098,
67,
14872,
67,
2640,
12,
14872,
734,
16,
23439,
16,
22033,
16,
324... |
self.lastModified = lastModified[-1] | if lastModified: self.lastModified = lastModified[-1] | def _get(self, previousView=None, updateCallback=None): | 368a9416e794563e4f9a7fb7c9aa2bb2a5d59092 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/368a9416e794563e4f9a7fb7c9aa2bb2a5d59092/Sharing.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
12,
2890,
16,
2416,
1767,
33,
7036,
16,
1089,
2428,
33,
7036,
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,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
12,
2890,
16,
2416,
1767,
33,
7036,
16,
1089,
2428,
33,
7036,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
r, g, b = helpers.hsv_to_rgb(h, s, v) self.set_color_rgb(r, g, b) | rgb = helpers.hsv_to_rgb(h, s, v) self.set_color_rgb(rgb) | def set_color_hsv(self, hsv): if not self.change_notification: return if hsv == self.last_known_color_hsv: return self.last_known_color_hsv = hsv h, s, v = hsv while h > 1.0: h -= 1.0 while h < 0.0: h += 1.0 if s > 1.0: s = 1.0 if s < 0.0: s = 0.0 if v > 1.0: v = 1.0 if v < 0.0: v = 0.0 r, g, b = helpers.hsv_to_rgb(h, s, v) self.set_color_rgb(r, g, b) | 2e0e45cb89043b73344120fcaf1790d1b8e86604 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7129/2e0e45cb89043b73344120fcaf1790d1b8e86604/colorselectionwindow.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
67,
3266,
67,
4487,
90,
12,
2890,
16,
30785,
4672,
309,
486,
365,
18,
3427,
67,
9927,
30,
327,
309,
30785,
422,
365,
18,
2722,
67,
2994,
67,
3266,
67,
4487,
90,
30,
327,
365,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
67,
3266,
67,
4487,
90,
12,
2890,
16,
30785,
4672,
309,
486,
365,
18,
3427,
67,
9927,
30,
327,
309,
30785,
422,
365,
18,
2722,
67,
2994,
67,
3266,
67,
4487,
90,
30,
327,
365,
... |
if verbose: print "generating JPG file %s" % repr(filename) | if verbose: print "generating JPG file %s" % filename | def save(self, formats=None, verbose=None, fnRoot=None): "Saves copies of self in desired location and formats" ext = '' fnroot = os.path.join(getattr(self,'outDir','.'), fnRoot or (getattr(self,'fileNamePattern',(self.__class__.__name__+'%03d')) % getattr(self,'chartId',0))) | 164c65c54f5935d247b468cadaa7e21a37eb7697 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/164c65c54f5935d247b468cadaa7e21a37eb7697/shapes.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1923,
12,
2890,
16,
6449,
33,
7036,
16,
3988,
33,
7036,
16,
2295,
2375,
33,
7036,
4672,
315,
13370,
13200,
434,
365,
316,
6049,
2117,
471,
6449,
6,
1110,
273,
875,
2295,
3085,
273,
114... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6449,
33,
7036,
16,
3988,
33,
7036,
16,
2295,
2375,
33,
7036,
4672,
315,
13370,
13200,
434,
365,
316,
6049,
2117,
471,
6449,
6,
1110,
273,
875,
2295,
3085,
273,
114... |
"Predicate for inclusion in the writable for select()" | """Predicate for inclusion in the writable for select().""" | def writable(self): "Predicate for inclusion in the writable for select()" return self.producer_fifo or (not self.connected) | 367a95e4363ae8b7515230480fff6ef354b95226 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3782/367a95e4363ae8b7515230480fff6ef354b95226/FTPServer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9691,
12,
2890,
4672,
3536,
8634,
364,
26485,
316,
326,
9691,
364,
2027,
1435,
12123,
327,
365,
18,
11776,
2750,
67,
74,
20299,
578,
261,
902,
365,
18,
8537,
13,
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,
9691,
12,
2890,
4672,
3536,
8634,
364,
26485,
316,
326,
9691,
364,
2027,
1435,
12123,
327,
365,
18,
11776,
2750,
67,
74,
20299,
578,
261,
902,
365,
18,
8537,
13,
2,
-100,
-100,
-100,
-... |
fileName = ifo + '-TRIGBANK_FOLLOWUP_' + str(ckey.event_id) + ".xml.gz" | fileName = ifo + '-TRIGBANK_FOLLOWUP_' + str(int(ckey.event_id)) + ".xml.gz" | def generateXMLfile(ckey,ifo,outputPath=None,table_type='pre-bank-veto'): if outputPath: try: os.mkdir(outputPath) except: pass xmldoc = ligolw.Document() xmldoc.appendChild(ligolw.LIGO_LW()) trig = getattr(ckey,ifo) # BEFORE WE MAKE A NEW TABLE FIGURE OUT WHAT COLUMNS ARE VALID !!! valid_columns = trig.__slots__ columns = [] for col in valid_columns: try: getattr(trig,col) columns.append(col) except: pass process_params_table = lsctables.New(lsctables.ProcessParamsTable) xmldoc.childNodes[-1].appendChild(process_params_table) sngl_inspiral_table = lsctables.New(lsctables.SnglInspiralTable,columns) xmldoc.childNodes[-1].appendChild(sngl_inspiral_table) sngl_inspiral_table.append(trig) fileName = ifo + '-TRIGBANK_FOLLOWUP_' + str(ckey.event_id) + ".xml.gz" if outputPath: fileName = outputPath + '/' + fileName utils.write_filename(xmldoc, fileName, verbose = True, gz = True) | bbfb9d5951b943975f4b18b4cf9f16aff1996eaa /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3592/bbfb9d5951b943975f4b18b4cf9f16aff1996eaa/fu_utils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2103,
4201,
768,
12,
363,
402,
16,
20299,
16,
2844,
743,
33,
7036,
16,
2121,
67,
723,
2218,
1484,
17,
10546,
17,
90,
11453,
11,
4672,
225,
309,
19566,
30,
775,
30,
1140,
18,
26686,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2103,
4201,
768,
12,
363,
402,
16,
20299,
16,
2844,
743,
33,
7036,
16,
2121,
67,
723,
2218,
1484,
17,
10546,
17,
90,
11453,
11,
4672,
225,
309,
19566,
30,
775,
30,
1140,
18,
26686,
1... |
g = open( "plugins/" + plugin_name + "/" + new_file_name + ext, "w" ) print "Creating " + "plugins/" + plugin_name + "/" + new_file_name + ext + " file" | g = open( plugin["output_dir"]+"/" + plugin_name + "/" + new_file_name + ext, "w" ) print "Creating " + plugin["output_dir"]+ "/" + plugin_name + "/" + new_file_name + ext + " file" | def make_file( template_dir, plugin_name, replacement_str, filename, new_file_name="", to_lower_case=False ): if not os.path.isdir('templates'): print "Error. There is not templates dir" sys.exit(3) try: f = open( "templates/" + template_dir + "/" + filename , 'r' ) except IOError: return new_file = f.read() f.close if new_file_name=="": new_file_name=plugin_name if to_lower_case: new_file = new_file.replace( replacement_str.lower(), plugin_name.lower() ) else: new_file = new_file.replace( replacement_str, plugin_name ) if not os.path.isdir('plugins'): os.mkdir( 'plugins' ) if not os.path.isdir("plugins/"+plugin_name): os.mkdir( "plugins/"+plugin_name ) try: ext = "." + filename.split('.')[1] except: ext = "" try: g = open( "plugins/" + plugin_name + "/" + new_file_name + ext, "w" ) print "Creating " + "plugins/" + plugin_name + "/" + new_file_name + ext + " file" except: print "plugins/" + plugin_name + "/" + plugin_name + ext print "Output file write error." sys.exit(2) if (ext==".hxx" or ext==".cxx") and plugin["license"]!="null": g.write( license_text + "\n\n" ) g.write( new_file ) g.close() | 0bb9b8d1224012a3effeb47a46aa7c17b9bcedb7 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1456/0bb9b8d1224012a3effeb47a46aa7c17b9bcedb7/TemplatedPluginsGenerator.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1221,
67,
768,
12,
1542,
67,
1214,
16,
1909,
67,
529,
16,
6060,
67,
701,
16,
1544,
16,
394,
67,
768,
67,
529,
1546,
3113,
358,
67,
8167,
67,
3593,
33,
8381,
262,
30,
309,
486,
1140... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1221,
67,
768,
12,
1542,
67,
1214,
16,
1909,
67,
529,
16,
6060,
67,
701,
16,
1544,
16,
394,
67,
768,
67,
529,
1546,
3113,
358,
67,
8167,
67,
3593,
33,
8381,
262,
30,
309,
486,
1140... |
raise TracError('Attachment %s does not exist.' % (self.title), 'Invalid Attachment') | raise ResourceNotFound("Attachment '%s' does not exist." % self.title, 'Invalid Attachment') | def _fetch(self, filename, db=None): if not db: db = self.env.get_db_cnx() cursor = db.cursor() cursor.execute("SELECT filename,description,size,time,author,ipnr " "FROM attachment WHERE type=%s AND id=%s " "AND filename=%s ORDER BY time", (self.parent_realm, unicode(self.parent_id), filename)) row = cursor.fetchone() cursor.close() if not row: self.filename = filename raise TracError('Attachment %s does not exist.' % (self.title), 'Invalid Attachment') self.filename = row[0] self.description = row[1] self.size = row[2] and int(row[2]) or 0 time = row[3] and int(row[3]) or 0 self.date = datetime.fromtimestamp(time, utc) self.author = row[4] self.ipnr = row[5] | 57b71088ef03c4154ec62328071f2d6bd8794ddf /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9317/57b71088ef03c4154ec62328071f2d6bd8794ddf/attachment.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
5754,
12,
2890,
16,
1544,
16,
1319,
33,
7036,
4672,
309,
486,
1319,
30,
1319,
273,
365,
18,
3074,
18,
588,
67,
1966,
67,
10305,
92,
1435,
3347,
273,
1319,
18,
9216,
1435,
3347,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5754,
12,
2890,
16,
1544,
16,
1319,
33,
7036,
4672,
309,
486,
1319,
30,
1319,
273,
365,
18,
3074,
18,
588,
67,
1966,
67,
10305,
92,
1435,
3347,
273,
1319,
18,
9216,
1435,
3347,
... |
def cmd_build(config, options, args): | def cmd_build(config, args): '''Build generated files''' if args: print 'Usage: %prog build' return | def cmd_build(config, options, args): builder = Builder(config) builder.build() | aecba37572ec3baab7f1e846b19e09650600ccc2 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3114/aecba37572ec3baab7f1e846b19e09650600ccc2/bundlebuilder.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1797,
67,
3510,
12,
1425,
16,
833,
4672,
9163,
3116,
4374,
1390,
26418,
225,
309,
833,
30,
1172,
296,
5357,
30,
738,
14654,
1361,
11,
327,
225,
2089,
273,
5008,
12,
1425,
13,
2089,
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,
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,
3510,
12,
1425,
16,
833,
4672,
9163,
3116,
4374,
1390,
26418,
225,
309,
833,
30,
1172,
296,
5357,
30,
738,
14654,
1361,
11,
327,
225,
2089,
273,
5008,
12,
1425,
13,
2089,
18,... |
if num > 1000: return comma_format(int(num)) | if num > 1000: return comma_format(int(num)) try: floats = int(max(2-max(numpy.floor(numpy.log(abs(num)+1e-3)/log(10)),0),0)) except: floats=2 format = "%." + str(floats) + "f" if type(num) == types.TupleType: return format % float(num[0]) else: | def pretty_float( num ): if num > 1000: return comma_format(int(num)) try: floats = int(max(2-max(floor(log(abs(num)+1e-3)/log(10)),0),0)) except: floats=2 format = "%." + str(floats) + "f" if type(num) == types.TupleType: return format % float(num[0]) else: try: retval = format % float(num) except: raise Exception("Unable to convert %s into a float." % (str(num))) return retval | d12a24d14c272a59a1adb2fbe6b24f8968b0de71 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/d12a24d14c272a59a1adb2fbe6b24f8968b0de71/GraphUtilities.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7517,
67,
5659,
12,
818,
262,
30,
225,
309,
818,
405,
4336,
30,
327,
8716,
67,
2139,
12,
474,
12,
2107,
3719,
225,
775,
30,
19172,
273,
509,
12,
1896,
12,
22,
17,
1896,
12,
15974,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7517,
67,
5659,
12,
818,
262,
30,
225,
309,
818,
405,
4336,
30,
327,
8716,
67,
2139,
12,
474,
12,
2107,
3719,
225,
775,
30,
19172,
273,
509,
12,
1896,
12,
22,
17,
1896,
12,
15974,
... |
gamethread.delayed(0.5, usermsg.hudhint, (userid, HudHintText)) | gamethread.delayed(0.5, usermsg.hudhint, (event_var['userid'], HudHintText)) | def gg_levelup(event_var): global list_leaderNames # Check for a winner first if int(event_var['old_level']) == getTotalLevels(): es.event('initialize', 'gg_win') es.event('setint', 'gg_win', 'userid', event_var['userid']) es.event('setint', 'gg_win', 'loser', event_var['victim']) es.event('setstring', 'gg_win', 'steamid', event_var['steamid']) es.event('setint', 'gg_win', 'team', event_var['team']) es.event('setstring', 'gg_win', 'name', event_var['name']) es.event('fire', 'gg_win') # No winner...so sad. Let's continue with the regular levelup code. else: # BEGIN REGULAR LEVELUP CODE # -------------------------------------------- userid = int(event_var['userid']) gungamePlayer = gungame.getPlayer(userid) # Set the player's level in the GunGame Core Dictionary gungamePlayer.set('level', int(event_var['new_level'])) # Reset the player's multikill in the GunGame Core Dictionary gungamePlayer.set('multikill', 0) # ----------------------------------------- # END REGULAR LEVELUP CODE # BEGIN LEADER LEVEL COMPARISONS & MESSAGING # ------------------------------------------------------------------------- # Let's see if this player is the new leader newLeaderLevel = int(getLeaderLevel()) oldLeaderLevel = int(getGunGameVar('oldleaderlevel')) if newLeaderLevel == int(event_var['new_level']): if len(getLevelUseridList(newLeaderLevel)) == 1: # Congratulations, player! You have become the new leader. # Now, let's add the new leader's name to the list "list_leaderNames" list_leaderNames = [] list_leaderNames.append(removeReturnChars(event_var['name'])) # Rebuild the leaders menu rebuildLeaderMenu() # Set this new level to be the new oldLeaderLevel setGunGameVar('oldleaderlevel', int(event_var['old_level'])) # Loop through the players and send a saytext2 message for userid in es.getUseridList(): usermsg.saytext2(userid, gungamePlayer.attributes['index'], '\3%s\1 is now leading on level \4%d' % (event_var['name'], int(event_var['new_level']))) # Let's see if the player has tied the other leaders else: # OK. They have tied someone else. # Now we add their name to the leader list ("list_leaderNames") list_leaderNames.append(removeReturnChars(event_var['name'])) # Let's find out how many people are on the leader level leaderCount = int(len(list_leaderNames)) # There are 2 leaders if leaderCount == 2: # Loop through the players and send a saytext2 message for userid in es.getUseridList(): usermsg.saytext2(userid, gungamePlayer.attributes['index'], '\1[\4%s-way tie\1]\3 %s\1 has tied the other leader on level \4%d' % ('2', event_var['name'], int(event_var['new_level']))) # There are more than 2 leaders elif leaderCount > 2: # Loop through the players and send a saytext2 message for userid in es.getUseridList(): usermsg.saytext2(userid, gungamePlayer.attributes['index'], '\1[\4%d-way tie\1]\3 %s\1 has tied the other leaders on level \4%d' % (leaderCount, event_var['name'], int(event_var['new_level']))) # Rebuild the leaders menu rebuildLeaderMenu() # ---------------------------------------------------------------------- # END LEADER LEVEL COMPARISONS & MESSAGING if not dict_gungameRegisteredAddons.has_key('gungame/included_addons/gg_warmup_round'): # Get levels behind leader levelsBehindLeader = getLeaderLevel() - gungamePlayer.get('level') # How many levels behind the leader? if levelsBehindLeader == 0: # Is there more than 1 leader? if len(getLeaderUserid()) == 1: HudHintText = 'Current level: %d of %d\nCurrent weapon: %s\n\nYou are the leader.' % (gungamePlayer.get('level'), getTotalLevels(), gungamePlayer.get('weapon')) else: HudHintText = 'Current level: %d of %d\nCurrent weapon: %s\n\nYou are amongst the leaders.' % (gungamePlayer.get('level'), getTotalLevels(), gungamePlayer.get('weapon')) else: HudHintText = 'Current level: %d of %d\nCurrent weapon: %s\n\nLeader (%s) level: %d of %d (%s)' %(gungamePlayer.get('level'), getTotalLevels(), gungamePlayer.get('weapon'), es.getplayername(getLeaderUserid()[0]), getLeaderLevel(), getTotalLevels(), getLevelWeapon(getLeaderLevel())) gamethread.delayed(0.5, usermsg.hudhint, (userid, HudHintText)) # BEGIN CODE FOR TRIGGERING CUSTOM EVENT "GG_VOTE" # ---------------------------------------------------------------------------------- if int(getLeaderLevel()) == getTotalLevels() - int(getGunGameVar('gg_vote_trigger')): # Only continue if no other script has set the next map if es.ServerVar('eventscripts_nextmapoverride') == '': if not getGunGameVar('gungame_voting_started'): es.event('initialize', 'gg_vote') es.event('fire', 'gg_vote') else: es.dbgmsg(0, '[GunGame] - Map vote failed because eventscripts_nextmapoverride was previously set by another script.') # ---------------------------------------------------------------------------------- # END CODE FOR TRIGGERING CUSTOM EVENT "GG_VOTE" | 8c9c543192c66d5208fc987aa94050f8ae1ea454 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4575/8c9c543192c66d5208fc987aa94050f8ae1ea454/gungame.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
29758,
67,
2815,
416,
12,
2575,
67,
1401,
4672,
2552,
666,
67,
27863,
1557,
468,
2073,
364,
279,
5657,
1224,
1122,
309,
509,
12,
2575,
67,
1401,
3292,
1673,
67,
2815,
19486,
422,
12831,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
29758,
67,
2815,
416,
12,
2575,
67,
1401,
4672,
2552,
666,
67,
27863,
1557,
468,
2073,
364,
279,
5657,
1224,
1122,
309,
509,
12,
2575,
67,
1401,
3292,
1673,
67,
2815,
19486,
422,
12831,
... |
gLogger.error("Failed to determine whether FTS request terminal",res['Message']) | gLogger.error( "Failed to determine whether FTS request terminal", res['Message'] ) | def monitorTransfer(self,ftsReqDict): """ Monitors transfer obtained from TransferDB """ | 75f9ff3f5f046181ee9f2e9b6a6d0d0b668c1251 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/75f9ff3f5f046181ee9f2e9b6a6d0d0b668c1251/FTSMonitorAgent.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6438,
5912,
12,
2890,
16,
1222,
87,
6113,
5014,
4672,
3536,
9041,
13704,
7412,
225,
12700,
628,
12279,
2290,
3536,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
6438,
5912,
12,
2890,
16,
1222,
87,
6113,
5014,
4672,
3536,
9041,
13704,
7412,
225,
12700,
628,
12279,
2290,
3536,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
if (req): | if req: | def format(bfo, style): """ Prints a link to BibEdit, if authorization is granted @param style the CSS style to be applied to the link. """ from invenio.config import weburl from invenio.access_control_engine import acc_authorize_action out = "" uid = bfo.uid req = bfo.rec if uid is not None: if (req): (auth_code, auth_message) = acc_authorize_action(req,'runbibedit') else: (auth_code, auth_message) = acc_authorize_action(uid, 'runbibedit') if auth_code == 0: print_style = '' if style != '': print_style = 'style="' + style + '"' out += '<a href="'+weburl + \ '/admin/bibedit/bibeditadmin.py/index?recid=' + \ str(bfo.recID) + '&ln=' + bfo.lang +'" ' + \ print_style + \ '>Edit This Record</a>' return out | 780fbe64d099f6991dfda50e4c3d2d0d84f5afff /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12027/780fbe64d099f6991dfda50e4c3d2d0d84f5afff/bfe_edit_record.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
740,
12,
70,
617,
16,
2154,
4672,
3536,
3038,
87,
279,
1692,
358,
605,
495,
4666,
16,
309,
6093,
353,
17578,
225,
632,
891,
2154,
326,
6765,
2154,
358,
506,
6754,
358,
326,
1692,
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,
740,
12,
70,
617,
16,
2154,
4672,
3536,
3038,
87,
279,
1692,
358,
605,
495,
4666,
16,
309,
6093,
353,
17578,
225,
632,
891,
2154,
326,
6765,
2154,
358,
506,
6754,
358,
326,
1692,
18,
... |
12. To calculate the kernel of the ensuing map $\mathbb{Z}^m \to (\mathbb{Z}/24\mathbb{Z})^n$ we lift it arbitrarily to an integer | 12. To calculate the kernel of the ensuing map $\ZZ^m \to (\ZZ/24\ZZ)^n$ we lift it arbitrarily to an integer | def basis(self, reduce=True): r""" Produce a basis for the free abelian group of eta-products of level N (under multiplication), attempting to find basis vectors of the smallest possible degree. | 0c130fed7b356e022134568630e483428d00fec2 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/0c130fed7b356e022134568630e483428d00fec2/etaproducts.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10853,
12,
2890,
16,
5459,
33,
5510,
4672,
436,
8395,
23278,
279,
10853,
364,
326,
4843,
1223,
292,
2779,
1041,
434,
14251,
17,
18736,
434,
1801,
423,
261,
9341,
23066,
3631,
15600,
358,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
10853,
12,
2890,
16,
5459,
33,
5510,
4672,
436,
8395,
23278,
279,
10853,
364,
326,
4843,
1223,
292,
2779,
1041,
434,
14251,
17,
18736,
434,
1801,
423,
261,
9341,
23066,
3631,
15600,
358,
... |
RemoteImplicitWaitTest.driver = webdriver.connect('firefox') | RemoteImplicitWaitTest.driver = webdriver.connect("remote", browser_name="firefox", platform="ANY") | def setup_module(module): webserver = SimpleWebServer() webserver.start() RemoteImplicitWaitTest.webserver = webserver RemoteImplicitWaitTest.driver = webdriver.connect('firefox') | f19e86a4f641b28af0f182ec180813019ab517d7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3504/f19e86a4f641b28af0f182ec180813019ab517d7/test_remote_implicit_waits.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3875,
67,
2978,
12,
2978,
4672,
732,
2266,
502,
273,
4477,
4079,
2081,
1435,
732,
2266,
502,
18,
1937,
1435,
6304,
15787,
5480,
4709,
18,
1814,
2266,
502,
273,
732,
2266,
502,
6304,
1578... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
67,
2978,
12,
2978,
4672,
732,
2266,
502,
273,
4477,
4079,
2081,
1435,
732,
2266,
502,
18,
1937,
1435,
6304,
15787,
5480,
4709,
18,
1814,
2266,
502,
273,
732,
2266,
502,
6304,
1578... |
glob_settings.widgetGeometry('ssys_admin/GroupManager',dlg) | glob_settings.widgetGeometry('ssys_admin/CreateGroup',dlg) | def execCreateGroup(conn): dlg = WidgetDialog() dlg.setCaption(qApp.translate("CreateGroupWdg","Create Group")) creategroup = CreateGroupWdg(conn) dlg.setWidget(creategroup,True,qApp.translate("CreateUserWdg","Group information")) glob_settings.widgetGeometry('ssys_admin/GroupManager',dlg) dlg.exec_loop() glob_settings.setWidgetGeometry('ssys_admin/GroupManager',dlg) | 2ba500597d23954c66b0df641b6da3515d9fb695 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2487/2ba500597d23954c66b0df641b6da3515d9fb695/launcher.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1196,
1684,
1114,
12,
4646,
4672,
25840,
273,
11103,
6353,
1435,
25840,
18,
542,
21158,
12,
85,
3371,
18,
13929,
2932,
1684,
1114,
59,
72,
75,
15937,
1684,
3756,
6,
3719,
752,
1655,
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,
1196,
1684,
1114,
12,
4646,
4672,
25840,
273,
11103,
6353,
1435,
25840,
18,
542,
21158,
12,
85,
3371,
18,
13929,
2932,
1684,
1114,
59,
72,
75,
15937,
1684,
3756,
6,
3719,
752,
1655,
273,... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.