rem
stringlengths
2
226k
add
stringlengths
0
227k
context
stringlengths
8
228k
meta
stringlengths
156
215
input_ids
list
attention_mask
list
labels
list
if e[0] == EINTR:
if e.args[0] == EINTR:
def read(self, size=-1): # Use max, disallow tiny reads in a loop as they are very inefficient. # We never leave read() with any leftover data from a new recv() call # in our internal buffer. rbufsize = max(self._rbufsize, self.default_bufsize) # Our use of StringIO rather than lists of string objects returned by # recv() minimizes memory usage and fragmentation that occurs when # rbufsize is large compared to the typical return value of recv(). buf = self._rbuf buf.seek(0, 2) # seek end if size < 0: # Read until EOF self._rbuf = StringIO() # reset _rbuf. we consume it via buf. while True: try: data = self._sock.recv(rbufsize) except error, e: if e[0] == EINTR: continue raise if not data: break buf.write(data) return buf.getvalue() else: # Read until size bytes or EOF seen, whichever comes first buf_len = buf.tell() if buf_len >= size: # Already have size bytes in our buffer? Extract and return. buf.seek(0) rv = buf.read(size) self._rbuf = StringIO() self._rbuf.write(buf.read()) return rv
daa524a29358e1cb762ab0e11a544a60f26f1b0e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8546/daa524a29358e1cb762ab0e11a544a60f26f1b0e/socket.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 12, 2890, 16, 963, 29711, 21, 4672, 468, 2672, 943, 16, 29176, 24405, 6838, 316, 279, 2798, 487, 2898, 854, 8572, 316, 25403, 18, 468, 1660, 5903, 8851, 855, 1435, 598, 1281, 29709,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 12, 2890, 16, 963, 29711, 21, 4672, 468, 2672, 943, 16, 29176, 24405, 6838, 316, 279, 2798, 487, 2898, 854, 8572, 316, 25403, 18, 468, 1660, 5903, 8851, 855, 1435, 598, 1281, 29709,...
self.button.pack(side=LEFT, padx=8)
self.button.pack(side=tk.LEFT, padx=8)
def __init__(self, master=None, label='Font', default='Helvetica'): """Create a widget that opens a font chooser dialog. master: Tkinter widget that will contain this Font label: Text label for the font default: Default font """ Metawidget.__init__(self, master, str) log.debug("Creating Font") self.label = Label(self, text=label) self.label.pack(side=LEFT) self.button = Button(self, textvariable=self.variable, command=self.choose) self.button.pack(side=LEFT, padx=8) self.variable.set(default)
f057996c3a6de2d5fabf3ad7997bbd1f796a9e23 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4675/f057996c3a6de2d5fabf3ad7997bbd1f796a9e23/meta.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 4171, 33, 7036, 16, 1433, 2218, 5711, 2187, 805, 2218, 44, 292, 90, 7943, 69, 11, 4672, 3536, 1684, 279, 3604, 716, 10400, 279, 3512, 5011, 13164, 6176, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 4171, 33, 7036, 16, 1433, 2218, 5711, 2187, 805, 2218, 44, 292, 90, 7943, 69, 11, 4672, 3536, 1684, 279, 3604, 716, 10400, 279, 3512, 5011, 13164, 6176, ...
if "revision" in data: if data["revision"].number != -1 and rabbitvcs.util.helper.in_rich_compare(
if ("revision" in data and data["revision"].number != -1 and rabbitvcs.util.helper.in_rich_compare(
def notify(self, data): """ This method is called every time the VCS function wants to tell us something. It passes us a dictionary of useful information. When this method is called, it appends some useful data to the notifcation window.
1a63586b2d73bb7e42837bca47c35b2d5719a565 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5119/1a63586b2d73bb7e42837bca47c35b2d5719a565/action.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5066, 12, 2890, 16, 501, 4672, 3536, 1220, 707, 353, 2566, 3614, 813, 326, 776, 4596, 445, 14805, 358, 9276, 584, 5943, 18, 225, 2597, 11656, 584, 279, 3880, 434, 5301, 1779, 18, 225, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5066, 12, 2890, 16, 501, 4672, 3536, 1220, 707, 353, 2566, 3614, 813, 326, 776, 4596, 445, 14805, 358, 9276, 584, 5943, 18, 225, 2597, 11656, 584, 279, 3880, 434, 5301, 1779, 18, 225, ...
'committees/committeemeeting_list.html') object_list = res.context['object_list']
'committees/committee_detail.html') object_list = res.context['meetings_list']
def testCommitteeMeetings(self): res = self.client.get(reverse('committee-detail', kwargs={'committee_id': self.committee_1.id})) self.assertEqual(res.status_code, 200) self.assertTemplateUsed(res, 'committees/committeemeeting_list.html') object_list = res.context['object_list'] self.assertEqual(map(just_id, object_list), [self.meeting_1.id, self.meeting_2.id, ], 'object_list has wrong objects: %s' % object_list)
2b68b7270466c48e7f6b7468d656e67f88c37331 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1866/2b68b7270466c48e7f6b7468d656e67f88c37331/tests.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 5580, 22579, 4667, 278, 899, 12, 2890, 4672, 400, 273, 365, 18, 2625, 18, 588, 12, 9845, 2668, 7371, 22579, 17, 8992, 2187, 1205, 5899, 11, 7371, 22579, 67, 350, 4278, 365, 18, 7...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 5580, 22579, 4667, 278, 899, 12, 2890, 4672, 400, 273, 365, 18, 2625, 18, 588, 12, 9845, 2668, 7371, 22579, 17, 8992, 2187, 1205, 5899, 11, 7371, 22579, 67, 350, 4278, 365, 18, 7...
http://www-cs-staff.stanford.edu/~uno/papers/dancing-color.ps.gz
http://www-cs-staff.stanford.edu/~uno/papers/dancing-color.ps.gz
def all_graph_colorings(G,n,count_only=False): r""" Computes all `n`-colorings of the graph `G` by casting the graph coloring problem into an exact cover problem, and passing this into an implementation of the Dancing Links algorithm described by Knuth (who attributes the idea to Hitotumatu and Noshita). The construction works as follows: (columns) * The first `|V|` columns correspond to a vertex -- a `1` in this column indicates that that vertex has a color. * After those `|V|` columns, we add `n*|E|` columns -- a `1` in these columns indicate that a particular edge is incident to a vertex with a certain color. (rows) * For each vertex, add `n` rows; one for each color `c`. Place a `1` in the column corresponding to the vertex, and a `1` in the appropriate column for each edge incident to the vertex, indicating that that edge is incident to the color `c`. * If `n > 2`, the above construction cannot be exactly covered since each edge will be incident to only two vertices (and hence two colors) - so we add `n*|E|` rows, each one containing a `1` for each of the `n*|E|` columns. These get added to the cover solutions "for free" during the backtracking. Note that this construction results in `n*|V| + 2*n*|E| + n*|E|` entries in the matrix. The Dancing Links algorithm uses a sparse representation, so if the graph is simple, `|E| \leq |V|^2` and `n <= |V|`, this construction runs in `O(|V|^3)` time. Back-conversion to a coloring solution is a simple scan of the solutions, which will contain `|V| + (n-2)*|E|` entries, so runs in `O(|V|^3)` time also. For most graphs, the conversion will be much faster -- for example, a planar graph will be transformed for `4`-coloring in linear time since `|E| = O(|V|)`. REFERENCES: http://www-cs-staff.stanford.edu/~uno/papers/dancing-color.ps.gz EXAMPLES:: sage: from sage.graphs.graph_coloring import all_graph_colorings sage: G = Graph({0:[1,2,3],1:[2]}) sage: n = 0 sage: for C in all_graph_colorings(G,3): ... parts = [C[k] for k in C] ... for P in parts: ... l = len(P) ... for i in range(l): ... for j in range(i+1,l): ... if G.has_edge(P[i],P[j]): ... raise RuntimeError, "Coloring Failed." ... n+=1 sage: print "G has %s 3-colorings."%n G has 12 3-colorings. TESTS:: sage: G = Graph({0:[1,2,3],1:[2]}) sage: for C in all_graph_colorings(G,0): print C sage: for C in all_graph_colorings(G,-1): print C Traceback (most recent call last): ... ValueError: n must be non-negative. """ if n == 0: return if n < 0: raise ValueError, "n must be non-negative." V = G.vertices() E = G.edges() nV=len(V) nE=len(E) ones = [] N = xrange(n) Vd= {} colormap = {} k = 0 for i in range(nV): v = V[i] Vd[v] = i for c in N: ones.append([k, [i]]) colormap[k] = (v,c) k+=1 kk = nV for e in E: for c in N: v0 = n*Vd[e[0]]+c v1 = n*Vd[e[1]]+c ones[v0][1].append(kk+c) ones[v1][1].append(kk+c) kk+=n if n > 2: for i in range(n*nE): ones.append([k+i, [nV+i]]) colors = rainbow(n) for i in range(len(ones)): ones[i] = ones[i][1] try: for a in DLXCPP(ones): if count_only: yield 1 continue coloring = {} for x in a: if colormap.has_key(x): v,c = colormap[x] if coloring.has_key(colors[c]): coloring[colors[c]].append(v) else: coloring[colors[c]] = [v] yield coloring except RuntimeError: raise RuntimeError, "Too much recursion! Graph coloring failed."
868ad8e585ce6fd27dcfefd4b2264fb9dde59dd4 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9417/868ad8e585ce6fd27dcfefd4b2264fb9dde59dd4/graph_coloring.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 777, 67, 4660, 67, 3266, 899, 12, 43, 16, 82, 16, 1883, 67, 3700, 33, 8381, 4672, 436, 8395, 14169, 281, 777, 1375, 82, 68, 17, 3266, 899, 434, 326, 2667, 1375, 43, 68, 635, 27660, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 777, 67, 4660, 67, 3266, 899, 12, 43, 16, 82, 16, 1883, 67, 3700, 33, 8381, 4672, 436, 8395, 14169, 281, 777, 1375, 82, 68, 17, 3266, 899, 434, 326, 2667, 1375, 43, 68, 635, 27660, ...
return 1 def put_item( str, x, y, map ): item = wolfpack.additem( str ) if not item: return 0 item.moveto( x, y, map ) item.movable = 3 item.update() return 1
return True
def put_item( str, pos ): item = wolfpack.additem( str ) if not item: return 0 item.moveto( pos ) # locked down item.movable = 3 item.update() return 1
f9665c46d91ee48a0931cc8fc760b9852ee4a43f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/f9665c46d91ee48a0931cc8fc760b9852ee4a43f/carpentry_deed.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1378, 67, 1726, 12, 609, 16, 949, 262, 30, 761, 273, 341, 355, 74, 2920, 18, 1289, 1726, 12, 609, 262, 309, 486, 761, 30, 327, 374, 761, 18, 81, 1527, 11453, 12, 949, 262, 468, 858...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1378, 67, 1726, 12, 609, 16, 949, 262, 30, 761, 273, 341, 355, 74, 2920, 18, 1289, 1726, 12, 609, 262, 309, 486, 761, 30, 327, 374, 761, 18, 81, 1527, 11453, 12, 949, 262, 468, 858...
print "trying fast call"
def call(self, cppthis, args_w): if self.executor is None: raise OperationError(self.space.w_TypeError, self.space.wrap("return type not handled"))
2ee8008678de4205562cac01abdd04555451c2c7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6934/2ee8008678de4205562cac01abdd04555451c2c7/interp_cppyy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 745, 12, 2890, 16, 3283, 2397, 291, 16, 833, 67, 91, 4672, 309, 365, 18, 21097, 353, 599, 30, 1002, 4189, 668, 12, 2890, 18, 2981, 18, 91, 67, 19030, 16, 365, 18, 2981, 18, 4113, 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, 745, 12, 2890, 16, 3283, 2397, 291, 16, 833, 67, 91, 4672, 309, 365, 18, 21097, 353, 599, 30, 1002, 4189, 668, 12, 2890, 18, 2981, 18, 91, 67, 19030, 16, 365, 18, 2981, 18, 4113, 2...
def favicon_ico(self, command, path):
def favicon_ico(self):
def favicon_ico(self, command, path): """Opera likes to get always a favicon""" self.serve(path_join(sys.path[0], "favicon.ico"))
875d84683c6f5810b66d18e9b89d7d46eb73a506 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10923/875d84683c6f5810b66d18e9b89d7d46eb73a506/Connection.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 18180, 3950, 67, 10764, 12, 2890, 4672, 3536, 3542, 69, 7906, 281, 358, 336, 3712, 279, 18180, 3950, 8395, 365, 18, 30104, 12, 803, 67, 5701, 12, 9499, 18, 803, 63, 20, 6487, 315, 1973...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 18180, 3950, 67, 10764, 12, 2890, 4672, 3536, 3542, 69, 7906, 281, 358, 336, 3712, 279, 18180, 3950, 8395, 365, 18, 30104, 12, 803, 67, 5701, 12, 9499, 18, 803, 63, 20, 6487, 315, 1973...
this = apply(_quickfix.new_CashSettlAgentCode, args)
this = _quickfix.new_CashSettlAgentCode(*args)
def __init__(self, *args): this = apply(_quickfix.new_CashSettlAgentCode, 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, 39, 961, 694, 6172, 3630, 1085, 30857, 1968, 13, 775, 30, 365, 18, 2211, 18, 6923, 12, 2211, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 380, 1968, 4672, 333, 273, 389, 19525, 904, 18, 2704, 67, 39, 961, 694, 6172, 3630, 1085, 30857, 1968, 13, 775, 30, 365, 18, 2211, 18, 6923, 12, 2211, ...
def check(self, useHEAD = True):
def check(self, useHEAD = False):
def check(self, useHEAD = True): """ Returns True and the server status message if the page is alive. Otherwise returns false """ try: wasRedirected = self.resolveRedirect(useHEAD = useHEAD) except UnicodeError, arg: return False, u'Encoding Error: %s (%s)' % (arg.__class__.__name__, unicode(arg)) except httplib.error, arg: return False, u'HTTP Error: %s (%s)' % (arg.__class__.__name__, arg.line) except socket.error, arg: # TODO: decode arg[1]. On Linux, it's encoded in UTF-8. # How is it encoded in Windows? Or can we somehow just # get the English message? return False, u'Socket Error: %s' % repr(arg[1]) #except UnicodeEncodeError, arg: # return False, u'Non-ASCII Characters in URL: %s' % arg if wasRedirected: if self.url in self.redirectChain: if useHEAD: # Some servers don't seem to handle HEAD requests properly, # which leads to a cyclic list of redirects. # We simply start from the beginning, but this time, # we don't use HEAD, but GET requests. redirChecker = LinkChecker(self.redirectChain[0], serverEncoding = self.serverEncoding) return redirChecker.check(useHEAD = False) else: urlList = ['[%s]' % url for url in self.redirectChain + [self.url]] return False, u'HTTP Redirect Loop: %s' % ' -> '.join(urlList) elif len(self.redirectChain) >= 19: if useHEAD: # Some servers don't seem to handle HEAD requests properly, # which leads to a long (or infinite) list of redirects. # We simply start from the beginning, but this time, # we don't use HEAD, but GET requests. redirChecker = LinkChecker(self.redirectChain[0], serverEncoding = self.serverEncoding) return redirChecker.check(useHEAD = False) else: urlList = ['[%s]' % url for url in self.redirectChain + [self.url]] return False, u'Long Chain of Redirects: %s' % ' -> '.join(urlList) else: redirChecker = LinkChecker(self.url, self.redirectChain, self.serverEncoding) return redirChecker.check(useHEAD = useHEAD) else: try: conn = self.getConnection() except httplib.error, arg: return False, u'HTTP Error: %s (%s)' % (arg.__class__.__name__, arg.line) try: conn.request('GET', '%s%s' % (self.path, self.query), None, self.header) except socket.error, arg: return False, u'Socket Error: %s' % repr(arg[1]) #except UnicodeEncodeError, arg: # return False, u'Non-ASCII Characters in URL: %s' % arg try: response = conn.getresponse() except Exception, arg: return False, u'Error: %s' % arg # read the server's encoding, in case we need it later self.readEncodingFromResponse(response) # site down if the server status is between 400 and 499 siteDown = response.status in range(400, 500) return not siteDown, '%s %s' % (response.status, response.reason)
920e0f300ade446cdbe0dadb5b3abc6cc854e52c /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4404/920e0f300ade446cdbe0dadb5b3abc6cc854e52c/weblinkchecker.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 12, 2890, 16, 999, 12458, 273, 1083, 4672, 3536, 2860, 1053, 471, 326, 1438, 1267, 883, 309, 326, 1363, 353, 13714, 18, 5272, 1135, 629, 3536, 775, 30, 1703, 5961, 329, 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, 866, 12, 2890, 16, 999, 12458, 273, 1083, 4672, 3536, 2860, 1053, 471, 326, 1438, 1267, 883, 309, 326, 1363, 353, 13714, 18, 5272, 1135, 629, 3536, 775, 30, 1703, 5961, 329, 273, 365, ...
if bad_parent: path2root = node.getParents() problem_node = node root = bad_parent.parent path2root = path2root[path2root.index(root):] if bad_parent == node.parent: mtree = node i = node.parent.children.index(node) if i > 0: ttree = node.parent.copy() ttree.children = ttree.children[:i] else: ttree = None if i < len(node.parent.children): btree = node.parent.copy() btree.children = btree.children[i+1:] else: btree = None else: ttree = bad_parent.copy() self._buildSubTree(ttree, path2root, problem_node, 'top') mtree = path2root[2].copy() self._buildMiddleTree(mtree, path2root, problem_node) btree = bad_parent.copy() self._buildSubTree(btree, path2root, problem_node, 'bottom') new_children = [] if ttree: new_children.append(ttree) new_children.append(mtree) if btree: new_children.append(btree) self.report('replacing child', bad_parent, 'by', new_children) root.replaceChild(bad_parent, new_children) return True else:
if not bad_parent:
def _fixNesting(self, node): """Nesting of nodes is corrected.
c831fc8b189107e4c1fe155370bb0e2377072a91 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12391/c831fc8b189107e4c1fe155370bb0e2377072a91/treecleaner.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 904, 50, 10100, 12, 2890, 16, 756, 4672, 3536, 50, 10100, 434, 2199, 353, 19864, 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, ...
[ 1, 1, 1, 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, 389, 904, 50, 10100, 12, 2890, 16, 756, 4672, 3536, 50, 10100, 434, 2199, 353, 19864, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
conn, addr = self.accept()
try: conn, addr = self.accept() except TypeError: return except socket.error as err: if err.args[0] != errno.ECONNABORTED: raise return else: if addr == None: return
def handle_accept(self): conn, addr = self.accept() print >> DEBUGSTREAM, 'Incoming connection from %s' % repr(addr) channel = SMTPChannel(self, conn, addr)
777508185731fe4411e62659e9fa7ddbc840124c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3187/777508185731fe4411e62659e9fa7ddbc840124c/smtpd.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 67, 9436, 12, 2890, 4672, 775, 30, 1487, 16, 3091, 273, 365, 18, 9436, 1435, 1335, 3580, 30, 225, 327, 1335, 2987, 18, 1636, 487, 393, 30, 225, 309, 393, 18, 1968, 63, 20, 65, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 67, 9436, 12, 2890, 4672, 775, 30, 1487, 16, 3091, 273, 365, 18, 9436, 1435, 1335, 3580, 30, 225, 327, 1335, 2987, 18, 1636, 487, 393, 30, 225, 309, 393, 18, 1968, 63, 20, 65, ...
self.expectResult(o)
self.expectResult("DISCOVERED: " + o) def test_DiscoverMultipleServiceTypes(self): snTemplate = "My New Service %d" hnTemplate = "newnode-%d" st = "_newservice._tcp" domain = "local" port = 100 ipTemplate = "5.5.5.%d" fqst = st + "." + domain outputs = [] for i in range(0, 5): [s, output] = self.newLocalService(snTemplate % i, st, domain, port, hnTemplate % i, ipTemplate % i) outputs.append(output) self.startServiceDiscovery(fqst) snTemplate = "My Other Service %d" hnTemplate = "othernode-%d" st = "_otherservice._tcp" port = 255 ipTemplate = "1.2.3.%d" fqst = st + "." + domain for i in range(0, 5): [s, output] = self.newLocalService(snTemplate % i, st, domain, port, hnTemplate % i, ipTemplate % i) outputs.append(output) time.sleep(2) uut.monitor(fqst) time.sleep(1) for o in outputs: self.expectResult("DISCOVERED: " + o) def test_UpdateServiceInfo(self): fqst = "_xyzservice._tcp.local" sn = "MyXYZ" fqsn = sn + "." + fqst + "." fqdn = "xyznode.local." ip = "10.3.3.4" port = 1234 self.startServiceDiscovery(fqst) fqst = fqst + "." r = self.prepareServiceResponse(fqdn, fqst, fqsn, port, ip, None) mdns_tool.inject(r, '224.0.0.251') o = "DISCOVERED: " + fqsn + " at " + ip + ":" + str(port) + " (no key vals)" self.expectResult(o) time.sleep(random.uniform(0.0, 0.1)) r = self.prepareServiceResponse(fqdn, fqst, fqsn, port + 2, ip, None) mdns_tool.inject(r, '224.0.0.251') o = "UPDATED: " + fqsn + " at " + ip + ":" + str(port + 2) + " (no key vals)" self.expectResult(o) time.sleep(random.uniform(0.0, 0.1)) ip = "2.3.4.5" r = self.prepareServiceResponse(fqdn, fqst, fqsn, port, ip, None) mdns_tool.inject(r, '224.0.0.251') o = "UPDATED: " + fqsn + " at " + ip + ":" + str(port) + " (no key vals)" self.expectResult(o) time.sleep(random.uniform(0.0, 0.1)) ip = "6.7.8.9" r = self.prepareServiceResponse(fqdn, None, None, None, ip) mdns_tool.inject(r, '224.0.0.251') o = "UPDATED: " + fqsn + " at " + ip + ":" + str(port) + " (no key vals)" self.expectResult(o) time.sleep(random.uniform(0.0, 0.1)) fqdn = "newnodename.local." r = self.prepareServiceResponse(fqdn, fqst, fqsn, port, ip, None) mdns_tool.inject(r, '224.0.0.251') o = "UPDATED: " + fqsn + " at " + ip + ":" + str(port) + " (no key vals)" self.expectResult(o) time.sleep(random.uniform(0.0, 0.1)) fqdn = "newnodename.local." txt = "this=that foo=bar" r = self.prepareServiceResponse(fqdn, fqst, fqsn, port, ip, txt) mdns_tool.inject(r, '224.0.0.251') o = "UPDATED: " + fqsn + " at " + ip + ":" + str(port) + \ " (" + txt.replace(" ", ":") + ")" self.expectResult(o) time.sleep(random.uniform(0.0, 0.1)) fqdn = "newnodename.local." txt = "this=that foo=bar whoops=yeah" r = self.prepareServiceResponse(fqdn, fqst, fqsn, port, ip, txt) mdns_tool.inject(r, '224.0.0.251') o = "UPDATED: " + fqsn + " at " + ip + ":" + str(port) + \ " (" + txt.replace(" ", ":") + ")" self.expectResult(o) time.sleep(random.uniform(0.0, 0.1)) fqdn = "newnodename.local." txt = "this=that foo=bar whoops=year" r = self.prepareServiceResponse(fqdn, fqst, fqsn, port, ip, txt) mdns_tool.inject(r, '224.0.0.251') o = "UPDATED: " + fqsn + " at " + ip + ":" + str(port) + \ " (" + txt.replace(" ", ":") + ")" self.expectResult(o)
def test_DiscoverMultipleServices(self): snTemplate = "My New Service %d" hnTemplate = "newnode-%d" fqst = "_newservice._tcp.local"
69206d7a7a498cea8a3c057a19f26483bf5732db /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9489/69206d7a7a498cea8a3c057a19f26483bf5732db/test_mdns.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 26082, 8438, 5676, 12, 2890, 4672, 4556, 2283, 273, 315, 12062, 1166, 1956, 738, 72, 6, 366, 82, 2283, 273, 315, 2704, 2159, 6456, 72, 6, 8508, 334, 273, 4192, 2704, 3278, 63...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 26082, 8438, 5676, 12, 2890, 4672, 4556, 2283, 273, 315, 12062, 1166, 1956, 738, 72, 6, 366, 82, 2283, 273, 315, 2704, 2159, 6456, 72, 6, 8508, 334, 273, 4192, 2704, 3278, 63...
day += -(weekday-self._wkst)+self._interval*7 weekday = self._wkst
day += -(weekday-wkst)+self._interval*7 weekday = wkst
def _iter(self): year, month, day, hour, minute, second, weekday, yearday, _ = \ self._dtstart.timetuple()
d375f07e08a8fd61f1640e67f981e1abdac8d8d1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8441/d375f07e08a8fd61f1640e67f981e1abdac8d8d1/rrule.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2165, 12, 2890, 4672, 3286, 16, 3138, 16, 2548, 16, 6126, 16, 8044, 16, 2205, 16, 7560, 16, 677, 73, 1060, 528, 16, 389, 273, 521, 365, 6315, 7510, 1937, 18, 8584, 278, 2268, 14...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2165, 12, 2890, 4672, 3286, 16, 3138, 16, 2548, 16, 6126, 16, 8044, 16, 2205, 16, 7560, 16, 677, 73, 1060, 528, 16, 389, 273, 521, 365, 6315, 7510, 1937, 18, 8584, 278, 2268, 14...
"""Yield submodule names+loaders recursively, for path or sys.path"""
"""Yields (module_loader, name, ispkg) for all modules recursively on path, or, if path is None, all accessible modules. 'path' should be either None or a list of paths to look for modules in. 'prefix' is a string to output on the front of every module name on output. Note that this function must import all *packages* (NOT all modules!) on the given path, in order to access the __path__ attribute to find submodules. 'onerror' is a function which gets called with one argument (the name of the package which was being imported) if an ImportError occurs trying to import a package. By default the ImportError is caught and ignored. Examples: walk_packages() : list all modules python can access walk_packages(ctypes.__path__, ctypes.__name__+'.') : list all submodules of ctypes """
def walk_packages(path=None, prefix='', onerror=None): """Yield submodule names+loaders recursively, for path or sys.path""" def seen(p, m={}): if p in m: return True m[p] = True for importer, name, ispkg in iter_modules(path, prefix): yield importer, name, ispkg if ispkg: try: __import__(name) except ImportError: if onerror is not None: onerror() else: path = getattr(sys.modules[name], '__path__', None) or [] # don't traverse path items we've seen before path = [p for p in path if not seen(p)] for item in walk_packages(path, name+'.'): yield item
4f53506c406eb4d42a7a95608e7f4d36fd4b86b4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/4f53506c406eb4d42a7a95608e7f4d36fd4b86b4/pkgutil.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5442, 67, 10308, 12, 803, 33, 7036, 16, 1633, 2218, 2187, 20991, 33, 7036, 4672, 3536, 16348, 87, 261, 2978, 67, 6714, 16, 508, 16, 353, 10657, 13, 364, 777, 4381, 8536, 603, 589, 16, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5442, 67, 10308, 12, 803, 33, 7036, 16, 1633, 2218, 2187, 20991, 33, 7036, 4672, 3536, 16348, 87, 261, 2978, 67, 6714, 16, 508, 16, 353, 10657, 13, 364, 777, 4381, 8536, 603, 589, 16, ...
except: pass
def latex2lyx(data): '''Takes a string, possibly multi-line, and returns the result of converting LaTeX constructs into LyX constructs. Returns a list of lines, suitable for insertion into document.body.''' mathre = re.compile('^(.*?)(\$.*?\$)(.*)') retval = [] # Convert LaTeX to Unicode reps = read_unicodesymbols() for rep in reps: try: data = data.replace(rep[0], rep[1]) except: # There seems to be a character in the unicodesymbols file # that causes problems, namely, 0x2109. pass # Generic, \" -> ": data = wrap_into_ert(data, r'\"', '"') # Math: lines = data.split('\n') for line in lines: #document.warning("LINE: " + line) #document.warning(str(i) + ":" + document.body[i]) #document.warning("LAST: " + document.body[-1]) g = line m = mathre.match(g) while m != None: s = m.group(1) f = m.group(2).replace('\\\\', '\\') g = m.group(3) if s: # this is non-math! s = line2lyx(s) subst = s.split('\n') retval += subst retval.append("\\begin_inset Formula " + f) retval.append("\\end_inset") m = mathre.match(g) # Handle whatever is left, which is just text g = line2lyx(g) subst = g.split('\n') retval += subst return retval
dc6da8014627193b195aa0ee97e75e09c06a1c53 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7514/dc6da8014627193b195aa0ee97e75e09c06a1c53/lyx_1_6.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 25079, 22, 715, 92, 12, 892, 4672, 9163, 11524, 279, 533, 16, 10016, 3309, 17, 1369, 16, 471, 1135, 326, 563, 434, 14540, 21072, 21575, 60, 15725, 1368, 511, 93, 60, 15725, 18, 2860, 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, 25079, 22, 715, 92, 12, 892, 4672, 9163, 11524, 279, 533, 16, 10016, 3309, 17, 1369, 16, 471, 1135, 326, 563, 434, 14540, 21072, 21575, 60, 15725, 1368, 511, 93, 60, 15725, 18, 2860, 2...
println('type(my_%s, pointer, intent(in) :: the%s' % (el.type[el.type.index('(')+1:], name))
println('type(quippy_%s, pointer, intent(in) :: the%s' % (el.type[el.type.index('(')+1:], name))
def join_and_split_lines(args, max_length=80): args_str = '' line = '' args = args[:] # make a copy while args: line += args.pop(0) if args: line += ', ' if args and len(line) >= max_length: args_str += '%s&\n%s' % (line, ' '*(indent+3)) line = '' args_str += line return args_str
eee528902aec7e9c3a06b70646ae7dfb085e9987 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8914/eee528902aec7e9c3a06b70646ae7dfb085e9987/f2py_wrapper_gen.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1233, 67, 464, 67, 4939, 67, 3548, 12, 1968, 16, 943, 67, 2469, 33, 3672, 4672, 833, 67, 701, 273, 875, 980, 273, 875, 833, 273, 833, 10531, 65, 468, 1221, 279, 1610, 1323, 833, 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, 1233, 67, 464, 67, 4939, 67, 3548, 12, 1968, 16, 943, 67, 2469, 33, 3672, 4672, 833, 67, 701, 273, 875, 980, 273, 875, 833, 273, 833, 10531, 65, 468, 1221, 279, 1610, 1323, 833, 30, ...
is_line.__doc__ = Vrepresentation.is_line.__doc__
def is_line(self): """ Tests if the object is a line. By construction it must be.
58a962fefc201dcfd3e2e47df0f7b0e2cedced92 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9417/58a962fefc201dcfd3e2e47df0f7b0e2cedced92/polyhedra.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 67, 1369, 12, 2890, 4672, 3536, 7766, 87, 309, 326, 733, 353, 279, 980, 18, 225, 2525, 16171, 518, 1297, 506, 18, 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, 353, 67, 1369, 12, 2890, 4672, 3536, 7766, 87, 309, 326, 733, 353, 279, 980, 18, 225, 2525, 16171, 518, 1297, 506, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
res=super(account_invoice_line, self).product_id_change(cr, uid, ids, product, uom, qty, name, type, partner_id, fposition_id, price_unit, address_invoice_id, context)
res=super(account_invoice_line, self).product_id_change(cr, uid, ids, product, uom, qty, name, type, partner_id, fposition_id, price_unit, address_invoice_id, context=context)
def product_id_change(self, cr, uid, ids, product, uom, qty=0, name='', type='out_invoice', partner_id=False, fposition_id=False, price_unit=False, address_invoice_id=False, context={}): res=super(account_invoice_line, self).product_id_change(cr, uid, ids, product, uom, qty, name, type, partner_id, fposition_id, price_unit, address_invoice_id, context)
77ef1cb2f9418228febf5415a68b00e439965920 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7339/77ef1cb2f9418228febf5415a68b00e439965920/product.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3017, 67, 350, 67, 3427, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 3017, 16, 582, 362, 16, 26667, 33, 20, 16, 508, 2218, 2187, 618, 2218, 659, 67, 16119, 2187, 19170, 67, 350, 33, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3017, 67, 350, 67, 3427, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 3017, 16, 582, 362, 16, 26667, 33, 20, 16, 508, 2218, 2187, 618, 2218, 659, 67, 16119, 2187, 19170, 67, 350, 33, ...
src = zlib.decompress(self._file.read(size))
src = zlib.decompress(self._file.read(size))
def fget(self): if self.compressed_info_size == 0: raise LRFException("This document has no meta info") size = self.compressed_info_size - 4 self._file.seek(self.info_start) try: src = zlib.decompress(self._file.read(size)) if len(src) != self.uncompressed_info_size: raise LRFException("Decompression of document meta info\ yielded unexpected results") candidate = unicode(src, 'utf-16', 'replace') # LRF files produced with makelrf dont have a correctly # encoded metadata block. # Decoding using latin1 is the most useful for me since I # occassionally read french books. # pdflrf creates invalif metadata blocks candidate = re.compile(u'</Info>.*', re.DOTALL).sub(u'</Info>', candidate) if not u"Info" in candidate: candidate = unicode(src, 'latin1', errors='ignore') if candidate[-1:] == '\0': candidate = candidate[:-1] candidate = dom.parseString(candidate.encode('utf-8')).\ toxml(encoding='utf-16').strip() else: candidate = candidate.strip().encode('utf-16') return candidate except zlib.error: raise LRFException("Unable to decompress document meta information")
5cbe331c0791d5ce5030fc48987fd5072a9a9db7 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9125/5cbe331c0791d5ce5030fc48987fd5072a9a9db7/meta.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 284, 588, 12, 2890, 4672, 309, 365, 18, 15385, 67, 1376, 67, 1467, 422, 374, 30, 1002, 511, 12918, 503, 2932, 2503, 1668, 711, 1158, 2191, 1123, 7923, 963, 273, 365, 18, 15385, 67, 137...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 284, 588, 12, 2890, 4672, 309, 365, 18, 15385, 67, 1376, 67, 1467, 422, 374, 30, 1002, 511, 12918, 503, 2932, 2503, 1668, 711, 1158, 2191, 1123, 7923, 963, 273, 365, 18, 15385, 67, 137...
def findSidebarPath(self): if os.path.isfile(self.path + '.sidebar'): return self.path + '.sidebar' else: return os.path.join(os.path.split(self.path)[0], 'default.sidebar')
def findSidebarPath(self, path): if os.path.isfile(path + '.sidebar'): return path + '.sidebar' else: return os.path.join(os.path.split(path)[0], 'default.sidebar')
def findSidebarPath(self): if os.path.isfile(self.path + '.sidebar'): return self.path + '.sidebar' else: return os.path.join(os.path.split(self.path)[0], 'default.sidebar')
83f74e8aaf28abf51f9ed311e6742f8df2d5655e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9478/83f74e8aaf28abf51f9ed311e6742f8df2d5655e/Doc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 8895, 3215, 743, 12, 2890, 4672, 309, 1140, 18, 803, 18, 291, 768, 12, 2890, 18, 803, 397, 2418, 26417, 11, 4672, 327, 365, 18, 803, 397, 2418, 26417, 11, 469, 30, 327, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 8895, 3215, 743, 12, 2890, 4672, 309, 1140, 18, 803, 18, 291, 768, 12, 2890, 18, 803, 397, 2418, 26417, 11, 4672, 327, 365, 18, 803, 397, 2418, 26417, 11, 469, 30, 327, 1140, 1...
Unlike using the comparator directly, None values are shunned.
def isbetter(potential, old, comparator): """Finds whether the potential value is better than the old value.
43f65aa2fcde6fd74e3796bb366931eadb6ab5c4 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/966/43f65aa2fcde6fd74e3796bb366931eadb6ab5c4/particle.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 70, 11214, 12, 26451, 16, 1592, 16, 8862, 4672, 3536, 8947, 2856, 326, 8555, 460, 353, 7844, 2353, 326, 1592, 460, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 70, 11214, 12, 26451, 16, 1592, 16, 8862, 4672, 3536, 8947, 2856, 326, 8555, 460, 353, 7844, 2353, 326, 1592, 460, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
curr_x = curr_x - 100 if (curr_x <= 50): curr_x = 50
curr_x = curr_x - 20 if (curr_x <= 10): curr_x = 10
def move_left(self): (curr_x, curr_y) = self.pos curr_x = curr_x - 100 if (curr_x <= 50): curr_x = 50 self.pos = (curr_x, curr_y) self.rect = self.image.get_rect(center = self.pos)
25adcc4c56b6447a6930c8e2f3924510c2cd6046 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12377/25adcc4c56b6447a6930c8e2f3924510c2cd6046/main.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3635, 67, 4482, 12, 2890, 4672, 261, 17016, 67, 92, 16, 4306, 67, 93, 13, 273, 365, 18, 917, 4306, 67, 92, 273, 4306, 67, 92, 300, 4200, 309, 261, 17016, 67, 92, 1648, 1728, 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3635, 67, 4482, 12, 2890, 4672, 261, 17016, 67, 92, 16, 4306, 67, 93, 13, 273, 365, 18, 917, 4306, 67, 92, 273, 4306, 67, 92, 300, 4200, 309, 261, 17016, 67, 92, 1648, 1728, 4672, ...
classId, attribId = self.splitClassAttribute(assembledId, assembled) ldeps = self.getMethodDeps1(classId, attribId, variants)
ldeps = self.getMethodDeps1(className, classAttribute, variants)
def _analyzeClassDepsNode(self, node, loadtime, runtime, inFunction, variants):
9b42a4791cdc214f7766715090b1117a1f44ce46 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5718/9b42a4791cdc214f7766715090b1117a1f44ce46/Class.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 304, 9508, 797, 14430, 907, 12, 2890, 16, 756, 16, 1262, 957, 16, 3099, 16, 316, 2083, 16, 12935, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 304, 9508, 797, 14430, 907, 12, 2890, 16, 756, 16, 1262, 957, 16, 3099, 16, 316, 2083, 16, 12935, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
return self._generate_edges(tree[0], father=father+id, id='0') + \ self._generate_edges(tree[1], father=father+id, id='1') + \ ([(u, father+id)] if (father+id) != '' else [])
left = self._generate_edges(tree[0], parent=s, bit="0") right = self._generate_edges(tree[1], parent=s, bit="1") L = [(u, s)] if s != "" else [] return left + right + L
def _generate_edges(self, tree, father='', id=''): if father=='': u = 'root' else: u = father try: return self._generate_edges(tree[0], father=father+id, id='0') + \ self._generate_edges(tree[1], father=father+id, id='1') + \ ([(u, father+id)] if (father+id) != '' else [])
08cf8218c91d92b4dcb4602a7135f1d9d706af1e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9417/08cf8218c91d92b4dcb4602a7135f1d9d706af1e/huffman.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 7163, 67, 8746, 12, 2890, 16, 2151, 16, 284, 4806, 2218, 2187, 612, 2218, 11, 4672, 309, 284, 4806, 18920, 4278, 582, 273, 296, 3085, 11, 469, 30, 582, 273, 284, 4806, 775, 30, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 7163, 67, 8746, 12, 2890, 16, 2151, 16, 284, 4806, 2218, 2187, 612, 2218, 11, 4672, 309, 284, 4806, 18920, 4278, 582, 273, 296, 3085, 11, 469, 30, 582, 273, 284, 4806, 775, 30, ...
line += '{0:{1}.{2}e}'.format(self.parm_data[flag][j],size_item,decnum)
line += '{0:{1}.{2}E}'.format(self.parm_data[flag][j],size_item,decnum)
def writeParm(self, name): # write a new prmtop with the current prmtop data # global variable(s) global AMBER_ELECTROSTATIC
e17b4208fa82ec6a7e318c3d9c0a0897d1475f17 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8376/e17b4208fa82ec6a7e318c3d9c0a0897d1475f17/readparm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 27144, 12, 2890, 16, 508, 4672, 282, 468, 1045, 279, 394, 846, 1010, 556, 598, 326, 783, 846, 1010, 556, 501, 468, 2552, 2190, 12, 87, 13, 2552, 20653, 6271, 67, 41, 3918, 1457, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1045, 27144, 12, 2890, 16, 508, 4672, 282, 468, 1045, 279, 394, 846, 1010, 556, 598, 326, 783, 846, 1010, 556, 501, 468, 2552, 2190, 12, 87, 13, 2552, 20653, 6271, 67, 41, 3918, 1457, ...
<type 'None'>
<type 'NoneType'>
... def f(self):
297abadc6b871c61388c3df2e5e7b3e531a9a813 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/297abadc6b871c61388c3df2e5e7b3e531a9a813/test_generators.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1372, 2398, 1652, 284, 12, 2890, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1372, 2398, 1652, 284, 12, 2890, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
def reset(self): self.pool.reset() self.turned.reset() for stack in self.rows + self.suits: stack.reset() self.deck.reset()
def reset(self):
1b2b53a25d27d96f60926802226dd375767cb3b2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/1b2b53a25d27d96f60926802226dd375767cb3b2/solitaire.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2715, 12, 2890, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2715, 12, 2890, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
def curve(self, is_linear= False, stride_factor=10):
def curve(self, is_linear= False, stride_factor=10, distances=None):
def curve(self, is_linear= False, stride_factor=10): """ Return the equivalent PlantGL nurbs curve which interpol the points. :param: stride_factor is the number of points to draw an arc of the curve. """ if not self.nurbs: self.distances() self.derivatives() self.bezier_cp() self.bezier_kv(is_linear)
730af3f1e883a661b5d7f77d1c5afa2da8bb2268 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/799/730af3f1e883a661b5d7f77d1c5afa2da8bb2268/cspline.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8882, 12, 2890, 16, 353, 67, 12379, 33, 1083, 16, 11084, 67, 6812, 33, 2163, 16, 12491, 33, 7036, 4672, 3536, 2000, 326, 7680, 3008, 970, 11261, 290, 295, 2038, 8882, 1492, 7326, 326, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8882, 12, 2890, 16, 353, 67, 12379, 33, 1083, 16, 11084, 67, 6812, 33, 2163, 16, 12491, 33, 7036, 4672, 3536, 2000, 326, 7680, 3008, 970, 11261, 290, 295, 2038, 8882, 1492, 7326, 326, ...
if condExpr:
indepCond = self.currentContext().getCondition() if indepCond is not None: current = nodes.Select(current, indepCond) if condExpr is not None:
def selectQueryExpr(self, (columnNames, mappingExprs), patternExpr, condExpr): current = patternExpr
8646d50126c55931291904836b90660c854e7004 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5223/8646d50126c55931291904836b90660c854e7004/parser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2027, 1138, 4742, 12, 2890, 16, 261, 2827, 1557, 16, 2874, 22947, 3631, 1936, 4742, 16, 6941, 4742, 4672, 783, 273, 1936, 4742, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 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, 2027, 1138, 4742, 12, 2890, 16, 261, 2827, 1557, 16, 2874, 22947, 3631, 1936, 4742, 16, 6941, 4742, 4672, 783, 273, 1936, 4742, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
if eleNum < 200 or eleNum > 299: f.write('%2s %3d %3.3f %3.3f %3d %3d %3d\n' % \ (_symbol, eleNum, elm.rvdw * cpk_sf, \ _rcovalent, \ r, g, b) \ ) f.write(" " " " " % cpk_sf) f.close()
cpkRadius = \ element.rvdw * env.prefs[cpkScaleFactor_prefs_key] ballAndStickRadius = \ element.rvdw * 0.25 * env.prefs[diBALL_AtomRadius_prefs_key] fileHandle.write \ ('%2s %3d %3.3f %3.3f %3d %3d %3d\n' % (element.symbol, elementNumber, cpkRadius, ballAndStickRadius, r, g, b)) fileHandle.write \ (" " " " " % env.prefs[cpkScaleFactor_prefs_key]) fileHandle.close()
def write_art_file(filename): """ Writes the Atom Rendering Table (ART) file, which contains all the atom rendering properties needed by QuteMol. Each atom is on a separate line. Lines starting with '#' are comment lines. <filename> - ART filename """ assert type(filename) == type(" ") from elements import PeriodicTable elemTable = PeriodicTable.getAllElements() try: f = open(filename, "w") except: print "Exception occurred to open file %s to write: " % filename return None # QuteMol can use line 1 to validate the file format. # Added @ to help make it clear that line 1 is special. f.write("#@ NanoEngineer-1 Atom Rendering Table, \ file format version 2007-06-04\n") # Lines after line 1 are only comments. f.write("#\n# File format:\n#\n") f.write("# Atom NE1 Render Covlnt\n") f.write("# Symbol Number Radius Radius Red Green Blue\n") from prefs_constants import cpkScaleFactor_prefs_key cpk_sf = env.prefs[cpkScaleFactor_prefs_key] # Mark 2007-06-03 for eleNum, elm in elemTable.items(): col = elm.color r = int(col[0] * 255 + 0.5) g = int(col[1] * 255 + 0.5) b = int(col[2] * 255 + 0.5) if len(elm.symbol) == 3: _symbol = elm.symbol[:2] else: _symbol = elm.symbol if eleNum < 199: _rcovalent = elm.atomtypes[0].rcovalent else: _rcovalent = 4.8 # 4.8 - 5.1 are good values if eleNum < 200 or eleNum > 299: f.write('%2s %3d %3.3f %3.3f %3d %3d %3d\n' % \ (_symbol, eleNum, elm.rvdw * cpk_sf, \ _rcovalent, \ r, g, b) \ ) f.write("# All Render Radii were calculated using a CPK scaling factor\n"\ "# that can be modified by the user in \"Preference | Atoms\".\n"\ "# CPK Scale Factor: %2.3f\n"\ "# To computer the original VDW radii, use the formula:\n"\ "# VDW Radius = Render Radius / CPK Scale Factor\n"\ % cpk_sf) f.close() return
56125dae90531c2c58d7b319f6586881b702b552 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11221/56125dae90531c2c58d7b319f6586881b702b552/qutemol.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 67, 485, 67, 768, 12, 3459, 4672, 3536, 30053, 326, 7149, 18018, 3555, 261, 4928, 13, 585, 16, 1492, 1914, 777, 326, 3179, 9782, 1790, 3577, 635, 2238, 624, 49, 355, 18, 8315, 31...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 67, 485, 67, 768, 12, 3459, 4672, 3536, 30053, 326, 7149, 18018, 3555, 261, 4928, 13, 585, 16, 1492, 1914, 777, 326, 3179, 9782, 1790, 3577, 635, 2238, 624, 49, 355, 18, 8315, 31...
if p.usesShmem(): self.asyncSwitch.addcase( CaseLabel('SHMEM_CREATED_MESSAGE_TYPE'), self.genShmemCreatedHandler())
for typedef in self.includedActorTypedefs: self.cls.addstmt(typedef)
55736d114f5decf54ef10e9091f3ec3c037fb43b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11102/55736d114f5decf54ef10e9091f3ec3c037fb43b/lower.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 364, 618, 536, 316, 365, 18, 20405, 17876, 559, 12537, 30, 365, 18, 6429, 18, 1289, 10589, 12, 723, 536, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 364, 618, 536, 316, 365, 18, 20405, 17876, 559, 12537, 30, 365, 18, 6429, 18, 1289, 10589, 12, 723, 536, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
libs.append('tk'+version) libs.append('tcl'+version)
libs.append(lib_prefix + 'tk'+ version) libs.append(lib_prefix + 'tcl'+ version)
def detect_tkinter(self, inc_dirs, lib_dirs): # The _tkinter module.
7b6a6c4ab622816ae9900b89eb0fd344d1d0e9fb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/7b6a6c4ab622816ae9900b89eb0fd344d1d0e9fb/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5966, 67, 16099, 2761, 12, 2890, 16, 7290, 67, 8291, 16, 2561, 67, 8291, 4672, 468, 1021, 389, 16099, 2761, 1605, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5966, 67, 16099, 2761, 12, 2890, 16, 7290, 67, 8291, 16, 2561, 67, 8291, 4672, 468, 1021, 389, 16099, 2761, 1605, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
raise Exception("%s: Couldn't parse XML config\n%s: %s"%(sys.argv[0],sys.argv[0],e)) print >>sys.stderr, "Warning:", e
raise Exception("Couldn't parse XML config\n") print >>sys.stderr, "Warning: couldn't parse XML file"
def read(self, failopen_ok=False): """Read the XML object's file source and return self.""" try: self.xml = xml.dom.minidom.parse(self.filename) strip_white_space(self.xml) except IOError, e: if not failopen_ok: # raise raise Exception("%s: Couldn't parse XML config\n%s: %s"%(sys.argv[0],sys.argv[0],e)) print >>sys.stderr, "Warning:", e # self.xml = xml.dom.minidom.Document() self._init_empty_xml() self._get_elements() return self
d86b5e26e89007bbeb7329f7ad4a0e27e9c20046 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10777/d86b5e26e89007bbeb7329f7ad4a0e27e9c20046/boincxml.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 12, 2890, 16, 2321, 3190, 67, 601, 33, 8381, 4672, 3536, 1994, 326, 3167, 733, 1807, 585, 1084, 471, 327, 365, 12123, 775, 30, 365, 18, 2902, 377, 273, 2025, 18, 9859, 18, 1154, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 12, 2890, 16, 2321, 3190, 67, 601, 33, 8381, 4672, 3536, 1994, 326, 3167, 733, 1807, 585, 1084, 471, 327, 365, 12123, 775, 30, 365, 18, 2902, 377, 273, 2025, 18, 9859, 18, 1154, ...
else
else:
def __init__(data = None) if data == None: quickfix.StringField.__init__(self, 793) else quickfix.StringField.__init__(self, 793, data)
484890147d4b23aac4b9d0e85e84fceab7e137c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8819/484890147d4b23aac4b9d0e85e84fceab7e137c3/quickfix_fields.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 892, 273, 599, 13, 309, 501, 422, 599, 30, 9549, 904, 18, 780, 974, 16186, 2738, 972, 12, 2890, 16, 2371, 11180, 13, 469, 30, 9549, 904, 18, 780, 974, 16186, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 892, 273, 599, 13, 309, 501, 422, 599, 30, 9549, 904, 18, 780, 974, 16186, 2738, 972, 12, 2890, 16, 2371, 11180, 13, 469, 30, 9549, 904, 18, 780, 974, 16186, 273...
urls = path
urls = path
def __checkArgumentFormat(self,path): if type(path) in types.StringTypes: urls = {path:False} elif type(path) == types.ListType: urls = {} for url in path: urls[url] = False elif type(path) == types.DictType: urls = path else: return S_ERROR("FileCatalog.__checkArgumentFormat: Supplied path is not of the correct format.") return S_OK(urls)
ec8d443c1e720a43f60c09596a698ec1dc9f4de7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/ec8d443c1e720a43f60c09596a698ec1dc9f4de7/FileCatalog.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1893, 1379, 1630, 12, 2890, 16, 803, 4672, 309, 618, 12, 803, 13, 316, 1953, 18, 780, 2016, 30, 6903, 273, 288, 803, 30, 8381, 97, 1327, 618, 12, 803, 13, 422, 1953, 18, 19366,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1893, 1379, 1630, 12, 2890, 16, 803, 4672, 309, 618, 12, 803, 13, 316, 1953, 18, 780, 2016, 30, 6903, 273, 288, 803, 30, 8381, 97, 1327, 618, 12, 803, 13, 422, 1953, 18, 19366,...
return ("%s %s %s, %s:%s") %\ (d, get_i18n_month_name(month_nb=int(m),ln=ln),y, h, mm)
def get_i18n_pythondatetext(pythonic_date, ln=cdslang): """ Convert a given date (formatted in python's time struct) to a textual representation """ _ = gettext_set_language(ln) try: month = get_i18n_month_name(pythonic_date[1], ln=ln) output_format = "%02d " + month + " %04Y, %02H:%02M" return strftime(output_format, pythonic_date) except ValueError: return _("N/A")
def to_str(int_val): """ """ if int_val == 0: return '00' else: return str(int_val)
09144e08209c1e4f0f49b8b6836cdec16112c8f2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1780/09144e08209c1e4f0f49b8b6836cdec16112c8f2/dateutils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 358, 67, 701, 12, 474, 67, 1125, 4672, 3536, 3536, 309, 509, 67, 1125, 422, 374, 30, 327, 296, 713, 11, 469, 30, 327, 609, 12, 474, 67, 1125, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 358, 67, 701, 12, 474, 67, 1125, 4672, 3536, 3536, 309, 509, 67, 1125, 422, 374, 30, 327, 296, 713, 11, 469, 30, 327, 609, 12, 474, 67, 1125, 13, 2, -100, -100, -100, -100, -100, -...
self.source_id = gobject.timeout_add(2000, self.checkfile)
self.source_id = gobject.timeout_add(500, self.checkfile)
def activate(self,widget): """ This function starts the selected operation of the current selected file. """
c3a96201deade650fd9337facf873534aba99b1f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4607/c3a96201deade650fd9337facf873534aba99b1f/sinthgunt.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10235, 12, 2890, 16, 6587, 4672, 3536, 1220, 445, 2542, 326, 3170, 1674, 434, 326, 783, 3170, 585, 18, 3536, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 10235, 12, 2890, 16, 6587, 4672, 3536, 1220, 445, 2542, 326, 3170, 1674, 434, 326, 783, 3170, 585, 18, 3536, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
print "Number of intersections:",
def findCAlphaPositionPossibilities(self): print 'in findCAlphaPositionPossibilities' self.possibleAtomsList = [] radius = float( self.CAdoubleSpinBox.value() ) #self.parentWidget()=>SequenceWidget, self.parentWidget().parentWidget() => SequenceDock skeletonViewer = self.parentWidget().parentWidget().app.viewers['skeleton'] meshRenderer = skeletonViewer.renderer residue = self.currentChainModel[ int( str(self.atomicResNumbers[0].text()) ) ] atom = residue.getAtom('CA') if not atom: self.possibilityNumSpinBox.setRange(0, 0) self.numPossibilities.setText('of ?') return atomPos = atom.getPosition() #print atomPos, radius if skeletonViewer.loaded: print "Number of intersections:", numIntersections = meshRenderer.intersectMeshAndSphere(atomPos, radius) print numIntersections if numIntersections == 0: print "No possibilities!" self.numPossibilities.setText('of 0') self.possibilityNumSpinBox.setRange(0, 0) return possiblePositionsList = [] for i in range(numIntersections): possiblePositionsList.append( meshRenderer.getIntersectionPoint(i) ) print 'Possible positions:', possiblePositionsList for i in range(len(possiblePositionsList)): pos = possiblePositionsList[i] x, y, z = (pos.x(), pos.y(), pos.z()) print '(%f, %f, %f)' % (x, y, z) rawAtom=PDBAtom(self.currentChainModel.getPdbID(), self.currentChainModel.getChainID() , i+1, 'CA') rawAtom.setPosition(pos) rawAtom.setElement('C') rawAtom.setColor(0, 1, 0, 1) try: prevAtom = self.currentChainModel[int( str(self.atomicResNumbers[0].text()) )-1].getAtom('CA') previousAtomPos = prevAtom.getPosition() prevDistSquared = (pos.x() - previousAtomPos.x())**2 + (pos.y() - previousAtomPos.y())**2 + (pos.z() - previousAtomPos.z())**2 except KeyError, IndexError: prevDistSquared = 100000 except AttributeError: prevDistSquared = 100000 try: nextAtom = self.currentChainModel[int( str(self.atomicResNumbers[0].text()) )+1].getAtom('CA') nextAtomPos = nextAtom.getPosition() nextDistSquared = (pos.x() - nextAtomPos.x())**2 + (pos.y() - nextAtomPos.y())**2 + (pos.z() - nextAtomPos.z())**2 except KeyError, IndexError: nextDistSquared = 100000 except AttributeError: nextDistSquared = 100000 if prevDistSquared < 4 or nextDistSquared < 4: #two C-alpha atoms are never less than 2 angstroms apart print 'one possible atom was too close to an existing atom' else: self.possibleAtomsList.append(rawAtom) print 'possible atoms:', self.possibleAtomsList self.numPossibilities.setText('of ' + str(len(self.possibleAtomsList))) #Note that a valueChanged signal might be emitted in either or both of the following two lines. self.possibilityNumSpinBox.setRange(1, len(self.possibleAtomsList)) self.possibilityNumSpinBox.setValue(1) for index in range( len(self.possibleAtomsList) ): atom = self.possibleAtomsList[index] atom.setColor(0, 1, 0, 1) self.possibleAtomsList.pop(index) atom = self.parentWidget().parentWidget().viewer.renderer.addAtom(atom) self.possibleAtomsList.insert(index, atom) if index + 1 == self.possibilityNumSpinBox.value(): atom.setColor(0, 1, 1, 1) self.previouslySelectedPossibleAtom = atom #We remove this atom from the viewer when we display a different possibility self.parentWidget().parentWidget().viewer.emitModelChanged()
9db7b9c590275f962e65bcd3c870a9a8dd2cd0c1 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4399/9db7b9c590275f962e65bcd3c870a9a8dd2cd0c1/structure_editor.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 39, 9690, 2555, 1616, 24074, 12, 2890, 4672, 1172, 296, 267, 1104, 39, 9690, 2555, 1616, 24074, 11, 365, 18, 12708, 14280, 682, 273, 5378, 5725, 273, 1431, 12, 365, 18, 39, 1871, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 39, 9690, 2555, 1616, 24074, 12, 2890, 4672, 1172, 296, 267, 1104, 39, 9690, 2555, 1616, 24074, 11, 365, 18, 12708, 14280, 682, 273, 5378, 5725, 273, 1431, 12, 365, 18, 39, 1871, ...
avg_ans = logs / case.nbr_cases
avg_ans = logs / case.nbr
def _get_data(self, cr, uid, ids, field_name, arg, context={}): res = {} state_perc = 0.0 avg_ans = 0.0 for case in self.browse(cr, uid, ids, context): if field_name != 'avg_answers': state = field_name[5:] cr.execute("select count(*) from crm_opportunity where section_id =%s and state='%s'"%(case.section_id.id,state)) state_cases = cr.fetchone()[0] perc_state = (state_cases / float(case.nbr_cases) ) * 100 res[case.id] = perc_state else: model_name = self._name.split('report.') if len(model_name) < 2: res[case.id] = 0.0 else: model_name = model_name[1]
30c239414fe282ec5d6bf5c7c50dc9a3f64ada6c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/30c239414fe282ec5d6bf5c7c50dc9a3f64ada6c/report_crm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 892, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 652, 67, 529, 16, 1501, 16, 819, 12938, 4672, 400, 273, 2618, 919, 67, 457, 71, 273, 374, 18, 20, 11152, 67, 634, 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, 389, 588, 67, 892, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 652, 67, 529, 16, 1501, 16, 819, 12938, 4672, 400, 273, 2618, 919, 67, 457, 71, 273, 374, 18, 20, 11152, 67, 634, 273...
do_test("mmap-cow %i %i" % (nr_pages - 1, nr_pages))
do_test(("mmap-cow", repr(nr_pages-1), repr(nr_pages)))
def stress_tests(): """ Run the set of stress tests. """ iterations = 10 # Number of iterations for looping tests # Don't update NRPAGES every time like above because we want to catch the # failures that happen when the kernel doesn't release all of the huge pages # after a stress test terminates (rc, nr_pages) = free_hpages() do_test("mmap-gettest %i %i" % (iterations, nr_pages)) # mmap-cow needs a hugepages for each thread plus one extra do_test("mmap-cow %i %i" % (nr_pages - 1, nr_pages)) (rc, tot_pages) = total_hpages() (rc, size) = hpage_size() sysctls = setup_shm_sysctl(tot_pages * size) threads = 10 # Number of threads for shm-fork # Run shm-fork once using half available hugepages, then once using all # This is to catch off-by-ones or races in the kernel allocated that # can make allocating all hugepages a problem if nr_pages > 1: do_test("shm-fork.sh %i %i" % (threads, nr_pages / 2)) do_test("shm-fork.sh %i %i" % (threads, nr_pages)) do_test("shm-getraw.sh %i %s" % (nr_pages, "/dev/full")) restore_shm_sysctl(sysctls)
637db55c57379f6e4c69d320ca16f9b05c873e3f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3715/637db55c57379f6e4c69d320ca16f9b05c873e3f/run_tests.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 384, 663, 67, 16341, 13332, 3536, 1939, 326, 444, 434, 384, 663, 7434, 18, 3536, 11316, 273, 1728, 202, 7, 3588, 434, 11316, 364, 25004, 7434, 225, 468, 7615, 1404, 1089, 423, 54, 11219,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 384, 663, 67, 16341, 13332, 3536, 1939, 326, 444, 434, 384, 663, 7434, 18, 3536, 11316, 273, 1728, 202, 7, 3588, 434, 11316, 364, 25004, 7434, 225, 468, 7615, 1404, 1089, 423, 54, 11219,...
self.assertEqual(self.count, 1)
for callback in callbacks: if not callback.called: self.fail("All callback methods should be called")
def callback(name, data): self.count += 1
fe908491d0204174bb7002a635ee321add07a856 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10420/fe908491d0204174bb7002a635ee321add07a856/test_dispatch.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1348, 12, 529, 16, 501, 4672, 365, 18, 1883, 1011, 404, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 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, 1348, 12, 529, 16, 501, 4672, 365, 18, 1883, 1011, 404, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
doPDirs("")
def build(filename): """ builds metaball package from filename source usage: build(filename) """ global glres doPDirs("") filename = filename[:-1] print filename overtrees = os.environ['PORTDIR_OVERLAY'].split(' ') ptrees = portage.settings['PORTDIR'].split(' ') alltrees = ptrees + overtrees for path in alltrees: print path findebuild(filename, path) ebuildtreepath = glres print ebuildtreepath ebuildtreegroup = glres.split('/')[-3] print ebuildtreegroup print 'group is:' + ebuildtreegroup atomname = getPNameFromFile(ebuildtreepath) ebuild = ebuildtreepath.split('/')[-1] ebuildtreedir=os.path.split(ebuildtreepath)[0] print 'name is:' + atomname #try: os.makedirs('/tmp/mb/portage/'+ebuildtreegroup+'/'+atomname+'/files') os.system('cp -r '+ebuildtreepath+' /tmp/mb/portage/'+ebuildtreegroup+'/'+atomname) # TODO selective copy ./files os.system('cp -r '+ebuildtreedir+'/files/* /tmp/mb/portage/'\ +ebuildtreegroup+'/'+atomname+'/files/') os.system('ebuild /tmp/mb/portage/'+ebuildtreegroup+'/'\ +atomname+'/'+ebuild+' digest') #except: # print 'copying ebuild failed' # sys.exit() os.environ['PKGDIR'] = '/tmp/mb/packages' cmd = 'ebuild /tmp/mb/portage/'+ebuildtreegroup+'/'\ +atomname+'/'+ebuild+' package' print 'Start building atom ' if os.system(cmd) == 0: print 'building ' + ' successful' else: print 'error during building ' + ' skipping ..'
29f66a54b0905aaf095561c0c413eab14c295fce /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2327/29f66a54b0905aaf095561c0c413eab14c295fce/mb.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 12, 3459, 4672, 3536, 10736, 5100, 378, 454, 2181, 628, 1544, 1084, 4084, 30, 1361, 12, 3459, 13, 3536, 2552, 5118, 455, 225, 1544, 273, 1544, 10531, 17, 21, 65, 1172, 1544, 320, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 12, 3459, 4672, 3536, 10736, 5100, 378, 454, 2181, 628, 1544, 1084, 4084, 30, 1361, 12, 3459, 13, 3536, 2552, 5118, 455, 225, 1544, 273, 1544, 10531, 17, 21, 65, 1172, 1544, 320, ...
res=data['form'][f] if isinstance(res, list): if len(res): res=res[0][2] else: res=False return res
res=data['form'][f] if isinstance(res, list): if len(res): res=res[0][2] else: res=False return res
def field_value(f): res=data['form'][f] if isinstance(res, list): if len(res): res=res[0][2] else: res=False return res
b487e7b94b0afc52953a6eecd307f6353774256a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7339/b487e7b94b0afc52953a6eecd307f6353774256a/fashion_help_wizard.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 652, 67, 1132, 12, 74, 4672, 400, 33, 892, 3292, 687, 3546, 63, 74, 65, 309, 1549, 12, 455, 16, 666, 4672, 309, 562, 12, 455, 4672, 400, 33, 455, 63, 20, 6362, 22, 65, 469, 30, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 652, 67, 1132, 12, 74, 4672, 400, 33, 892, 3292, 687, 3546, 63, 74, 65, 309, 1549, 12, 455, 16, 666, 4672, 309, 562, 12, 455, 4672, 400, 33, 455, 63, 20, 6362, 22, 65, 469, 30, 4...
if not hasattr(self, '_obj'):
if self.__closed:
def wrapper(self, *args, **kwargs): if not hasattr(self, '_obj'): raise psycopg2.ProgrammingError('Unable to use the cursor after having closing it') return f(self, *args, **kwargs)
609c279a9451a99ef143970eee8bacfb588a217b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12853/609c279a9451a99ef143970eee8bacfb588a217b/sql_db.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4053, 12, 2890, 16, 380, 1968, 16, 2826, 4333, 4672, 309, 365, 16186, 12204, 30, 1002, 4250, 93, 22295, 75, 22, 18, 9459, 11987, 668, 2668, 3370, 358, 999, 326, 3347, 1839, 7999, 7647, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4053, 12, 2890, 16, 380, 1968, 16, 2826, 4333, 4672, 309, 365, 16186, 12204, 30, 1002, 4250, 93, 22295, 75, 22, 18, 9459, 11987, 668, 2668, 3370, 358, 999, 326, 3347, 1839, 7999, 7647, ...
val = ''; AP = 'ABCDEFGHIJKLMNOP'
val = b''; AP = b'ABCDEFGHIJKLMNOP'
def Int2AP(num): """Convert integer to A-P string representation.""" val = ''; AP = 'ABCDEFGHIJKLMNOP' num = int(abs(num)) while num: num, mod = divmod(num, 16) val = AP[mod] + val return val
904415bf68711317b77f5fac862d529284410d4b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12029/904415bf68711317b77f5fac862d529284410d4b/imaplib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3094, 22, 2203, 12, 2107, 4672, 225, 3536, 2723, 3571, 358, 432, 17, 52, 533, 4335, 12123, 225, 1244, 273, 324, 6309, 31, 14410, 273, 324, 11, 26904, 12904, 16715, 45, 19474, 17063, 3417...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3094, 22, 2203, 12, 2107, 4672, 225, 3536, 2723, 3571, 358, 432, 17, 52, 533, 4335, 12123, 225, 1244, 273, 324, 6309, 31, 14410, 273, 324, 11, 26904, 12904, 16715, 45, 19474, 17063, 3417...
Return True if the given matrix satisfies the conditions for a vector as it appears in the algebraic expression of self.
Return ``True`` if the given matrix satisfies the conditions for a vector as it appears in the algebraic expression of ``self``.
def is_vector(self, d): """ Return True if the given matrix satisfies the conditions for a vector as it appears in the algebraic expression of self. INPUT: - ``d`` - matrix EXAMPLE:: sage: sr = mq.SR(gf2=True) sage: sr SR(1,1,1,4) sage: k = sr.base_ring() sage: A = Matrix(k, 1, 1, [k.gen()]) sage: B = sr.vector(A) sage: sr.is_vector(A) False sage: sr.is_vector(B) True """ return is_Matrix(d) and \ d.nrows() == self.r*self.c*self.e and \ d.ncols() == 1 and \ d.base_ring() == GF(2)
64b5e0e9186de5235119791631990329cc9aecfa /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/64b5e0e9186de5235119791631990329cc9aecfa/sr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 67, 7737, 12, 2890, 16, 302, 4672, 3536, 2000, 12176, 5510, 10335, 309, 326, 864, 3148, 17917, 326, 4636, 364, 279, 3806, 487, 518, 14606, 316, 326, 524, 29087, 335, 2652, 434, 1217...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 67, 7737, 12, 2890, 16, 302, 4672, 3536, 2000, 12176, 5510, 10335, 309, 326, 864, 3148, 17917, 326, 4636, 364, 279, 3806, 487, 518, 14606, 316, 326, 524, 29087, 335, 2652, 434, 1217...
print '\t\t"%s": %s,' % (key, mapEntry) print "\t}" print "\t_prop_map_put_ = {"
print >> stream, '\t\t"%s": %s,' % (key, mapEntry) print >> stream, "\t}" print >> stream, "\t_prop_map_put_ = {"
def WriteClassBody(self, generator): # Write in alpha order. names = self.mapFuncs.keys() names.sort() specialItems = {"count":None, "item":None,"value":None,"_newenum":None} # If found, will end up with (entry, invoke_tupe) itemCount = None for name in names: entry=self.mapFuncs[name] # skip [restricted] methods, unless it is the # enumerator (which, being part of the "system", # we know about and can use) dispid = entry.desc[0] if entry.desc[9] & pythoncom.FUNCFLAG_FRESTRICTED and \ dispid != pythoncom.DISPID_NEWENUM: continue # If not accessible via IDispatch, then we can't use it here. if entry.desc[3] != pythoncom.FUNC_DISPATCH: continue if dispid==pythoncom.DISPID_VALUE: lkey = "value" elif dispid==pythoncom.DISPID_NEWENUM: specialItems["_newenum"] = (entry, entry.desc[4], None) continue # Dont build this one now! else: lkey = string.lower(name) if specialItems.has_key(lkey) and specialItems[lkey] is None: # remember if a special one. specialItems[lkey] = (entry, entry.desc[4], None) if generator.bBuildHidden or not entry.hidden: if entry.GetResultName(): print '\t# Result is of type ' + entry.GetResultName() if entry.wasProperty: print '\t# The method %s is actually a property, but must be used as a method to correctly pass the arguments' % name ret = self.MakeFuncMethod(entry,build.MakePublicAttributeName(name)) for line in ret: print line print "\t_prop_map_get_ = {" names = self.propMap.keys(); names.sort() for key in names: entry = self.propMap[key] if generator.bBuildHidden or not entry.hidden: resultName = entry.GetResultName() if resultName: print "\t\t# Property '%s' is an object of type '%s'" % (key, resultName) lkey = string.lower(key) details = entry.desc resultDesc = details[2] argDesc = () mapEntry = MakeMapLineEntry(details[0], pythoncom.DISPATCH_PROPERTYGET, resultDesc, argDesc, key, entry.GetResultCLSIDStr()) if entry.desc[0]==pythoncom.DISPID_VALUE: lkey = "value" elif entry.desc[0]==pythoncom.DISPID_NEWENUM: lkey = "_newenum" else: lkey = string.lower(key) if specialItems.has_key(lkey) and specialItems[lkey] is None: # remember if a special one. specialItems[lkey] = (entry, pythoncom.DISPATCH_PROPERTYGET, mapEntry) # All special methods, except _newenum, are written # "normally". This is a mess! if entry.desc[0]==pythoncom.DISPID_NEWENUM: continue
cfd84d318292d699ca53899ee423b08bfb797445 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/992/cfd84d318292d699ca53899ee423b08bfb797445/genpy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2598, 797, 2250, 12, 2890, 16, 4456, 4672, 468, 2598, 316, 4190, 1353, 18, 1257, 273, 365, 18, 1458, 10928, 18, 2452, 1435, 1257, 18, 3804, 1435, 4582, 3126, 273, 12528, 1883, 6877, 7036...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2598, 797, 2250, 12, 2890, 16, 4456, 4672, 468, 2598, 316, 4190, 1353, 18, 1257, 273, 365, 18, 1458, 10928, 18, 2452, 1435, 1257, 18, 3804, 1435, 4582, 3126, 273, 12528, 1883, 6877, 7036...
print >> sys.stderr, "Error: Exited with code %d during test run"%(status)
print >> sys.stderr, "TEST-UNEXPECTED-FAIL | runtest.py | Exited with code %d during test run"%(status) if checkForCrashes(os.path.join(PROFILE, "minidumps"), automation.SYMBOLS_PATH, cmd['name']): print >> sys.stderr, 'TinderboxPrint: ' + cmd['name'] + '<br/><em class="testfail">CRASH</em>' status = -1 if status != 0:
def __init__(self, **kwargs): optparse.OptionParser.__init__(self, **kwargs) defaults = {}
ee6cd336430688494ce59f053ebf33a9bf31c66b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11044/ee6cd336430688494ce59f053ebf33a9bf31c66b/runtest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2826, 4333, 4672, 2153, 2670, 18, 1895, 2678, 16186, 2738, 972, 12, 2890, 16, 2826, 4333, 13, 3467, 273, 2618, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2826, 4333, 4672, 2153, 2670, 18, 1895, 2678, 16186, 2738, 972, 12, 2890, 16, 2826, 4333, 13, 3467, 273, 2618, 2, -100, -100, -100, -100, -100, -100, -100,...
gLogger.info("TransformationDB.addFile: Attempting to add %s files." % len(fileTuples))
gLogger.info( "TransformationDB.addFile: Attempting to add %s files." % len( fileTuples ) )
def addFile(self,fileTuples,force=False,connection=False): """ Add a new file to the TransformationDB together with its first replica. """ gLogger.info("TransformationDB.addFile: Attempting to add %s files." % len(fileTuples)) successful = {} failed = {} # Determine which files pass the filters and are to be added to transformations transFiles = {} filesToAdd = [] for lfn,pfn,size,se,guid,checksum in fileTuples: fileTrans = self.__filterFile(lfn) if not (fileTrans or force): successful[lfn] = True else: filesToAdd.append((lfn,pfn,se)) for trans in fileTrans: if not transFiles.has_key(trans): transFiles[trans] = [] transFiles[trans].append(lfn) # Add the files to the DataFiles and Replicas tables if filesToAdd: connection = self.__getConnection(connection) res = self.__addFileTuples(filesToAdd,connection=connection) if not res['OK']: return res lfnFileIDs = res['Value'] for lfn,pfn,se in filesToAdd: if lfnFileIDs.has_key(lfn): successful[lfn] = True else: failed[lfn] = True # Add the files to the transformations #TODO: THIS SHOULD BE TESTED WITH A TRANSFORMATION WITH A FILTER for transID,lfns in transFiles.items(): fileIDs = [] for lfn in lfns: if lfn.has_key(lfn): fileIDs.append(lfnFileIDs[lfn]) if fileIDs: res = self.__addFilesToTransformation(transID,fileIDs,connection=connection) if not res['OK']: gLogger.error("Failed to add files to transformation","%s %s" % (transID,res['Message'])) resDict = {'Successful':successful,'Failed':failed} return S_OK(resDict)
9ad007ea503b29694fc081c1646b7c5ecd07b1f2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/9ad007ea503b29694fc081c1646b7c5ecd07b1f2/TransformationDB.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 18671, 12, 2890, 16, 768, 25813, 16, 5734, 33, 8381, 16, 4071, 33, 8381, 4672, 3536, 225, 1436, 279, 394, 585, 358, 326, 21274, 2290, 9475, 598, 2097, 1122, 12335, 18, 3536, 314, 3328, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 18671, 12, 2890, 16, 768, 25813, 16, 5734, 33, 8381, 16, 4071, 33, 8381, 4672, 3536, 225, 1436, 279, 394, 585, 358, 326, 21274, 2290, 9475, 598, 2097, 1122, 12335, 18, 3536, 314, 3328, ...
ids = is_a_test.keys()
ids = self.is_a_test.keys()
def is_a_test_under_src(t): return t[-8:] == 'Tests.py' \ and os.path.isfile(os.path.join(path, t))
4c658f4d6755ca9edc67b2709d25f986f9cc2b38 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12817/4c658f4d6755ca9edc67b2709d25f986f9cc2b38/scons_tdb.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 67, 69, 67, 3813, 67, 9341, 67, 4816, 12, 88, 4672, 327, 268, 18919, 28, 26894, 422, 296, 14650, 18, 2074, 11, 521, 471, 1140, 18, 803, 18, 291, 768, 12, 538, 18, 803, 18, 570...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 353, 67, 69, 67, 3813, 67, 9341, 67, 4816, 12, 88, 4672, 327, 268, 18919, 28, 26894, 422, 296, 14650, 18, 2074, 11, 521, 471, 1140, 18, 803, 18, 291, 768, 12, 538, 18, 803, 18, 570...
if _debug: print "\t%s: Called LinePlot.render()" % rendererName
debugMsg("Called LinePlot.render()")
def render(self): """ Does LinePlot object specific (pre)rendering stuff """ if _debug: print "\t%s: Called LinePlot.render()" % rendererName
525240b057c0121c2cab7772950af46d6399ad7e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8476/525240b057c0121c2cab7772950af46d6399ad7e/plot.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 12, 2890, 4672, 3536, 9637, 5377, 11532, 733, 2923, 261, 1484, 13, 5902, 310, 10769, 3536, 309, 389, 4148, 30, 1172, 1548, 88, 9, 87, 30, 11782, 5377, 11532, 18, 5902, 10031, 738, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1743, 12, 2890, 4672, 3536, 9637, 5377, 11532, 733, 2923, 261, 1484, 13, 5902, 310, 10769, 3536, 309, 389, 4148, 30, 1172, 1548, 88, 9, 87, 30, 11782, 5377, 11532, 18, 5902, 10031, 738, ...
(Handling anything about args in superclasses is NIM. The index of the instance made from this optional argument
(Handling anything about args in superclasses is NIM. The index of the instance made from this optional argument
def Arg( type_expr, dflt_expr = _E_REQUIRED_ARG_, _attr_expr = None, _arglist = False, **moreopts): ### [update 061204: i think this cmt is obs, not sure:] IMPLEM _E_REQUIRED_ARG_ - do we tell _i_instance somehow? ###e see new notes at end of file about how to reform Arg into a more coherent object, useful in wider contexts... [070321] """To declare an Instance-argument in an expr class, use an assignment like this, directly in the class namespace: attr = Arg( type, optional default value expr ) Order matters (specifically, execution order of the Arg macros, or maybe only of the exprs containing them, while Python is executing a given class definition, before the metaclass's __new__ runs); those attrs which are not already defined as args in superclasses [nim] are appended to the inherited arglist, whose positions are counted from 0. (Handling anything about args in superclasses is NIM. ##e) The index of the instance made from this optional argument will be its position in the arglist (whether or not the arg was supplied or the default value expr was used). If the default value expr is not supplied, there is no default value (i.e. the arg is required). If it is supplied, it is processed through canon_expr (as if Arg was an Expr constructor), unless it's one of the special case symbols (meant only for private use by this family of macros) _E_REQUIRED_ARG_ or the other _E_ one.##doc [_attr_expr is a private option for use by ArgOrOption. So is _lvalue_flag and ###NIM _noinstance (in moreopts).] [_arglist is a private option for use by ArgList.] """ global _arg_order_counter _arg_order_counter += 1 required = (dflt_expr is _E_REQUIRED_ARG_) argpos_expr = _this_gets_replaced_with_argpos_for_current_attr( _arg_order_counter, required, _arglist ) # Implem note: # _this_gets_replaced_with_argpos_for_current_attr(...) makes a special thing to be noticed by the FormulaScanner # and replaced with the actual arg order within the class (but the same within any single attr). # ExprsMeta can do that by scanning values in order of Expr construction. # But it has to worry about two vals the same, since then two attrs have equal claim... # it does that by asserting that a given _arg_order_counter corresponds to only one attr. ########@@@@@@@nim # FYI, the other possible use for _arg_order_counter would be to assert that it only increases, # but this is not obviously true (or useful) in undoc but presently supported cases like # attr = If(cond, Arg(type1), Arg(type2)) # (which the present code treats as alternative type decls for the same arg position). ##printnim("asserting that a given _arg_order_counter corresponds to only one attr -- in a better way than ive_seen kluge below")####@@@@@ attr_expr = _attr_expr # what about current attr to use in index for arg instance and/or # in finding the arg expr in an instance (the replacement instance for _self) -- # this is None by default, since _E_ATTR (the attr we're on) shouldn't affect the index, # in this Arg macro. When we're used by other macros they can pass something else for that. return _ArgOption_helper( attr_expr, argpos_expr, type_expr, dflt_expr, _arglist = _arglist, **moreopts)
d0ffa4ebc7f1e32fb807fce132593cfedae374b0 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11221/d0ffa4ebc7f1e32fb807fce132593cfedae374b0/attr_decl_macros.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14448, 12, 618, 67, 8638, 16, 302, 31864, 67, 8638, 273, 389, 41, 67, 14977, 67, 10973, 67, 16, 389, 1747, 67, 8638, 273, 599, 16, 389, 3175, 1098, 273, 1083, 16, 2826, 10161, 4952, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14448, 12, 618, 67, 8638, 16, 302, 31864, 67, 8638, 273, 389, 41, 67, 14977, 67, 10973, 67, 16, 389, 1747, 67, 8638, 273, 599, 16, 389, 3175, 1098, 273, 1083, 16, 2826, 10161, 4952, ...
def generate_doc(fname, exampledir, outdir):
def generate_doc(fname, outdir):
def generate_doc(fname, exampledir, outdir): """ generate a .txt based on a cmake file if the doc is not empty """ dest = os.path.join(outdir, os.path.basename(fname)) dest = dest.replace(".cmake", ".txt") docs = extract_doc_from_cmake(fname, exampledir) if len(docs) > 0: print "Generated:", dest with open(dest, "w") as f: for l in docs: f.write(l)
58e5719f8c1d5d076eb3b9af15ecc71594baba83 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13121/58e5719f8c1d5d076eb3b9af15ecc71594baba83/generate_doc_from_cmake.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 67, 2434, 12, 12749, 16, 15398, 4672, 3536, 2103, 279, 263, 5830, 2511, 603, 279, 5003, 911, 585, 309, 326, 997, 353, 486, 1008, 3536, 1570, 273, 1140, 18, 803, 18, 5701, 12, 659...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2434, 12, 12749, 16, 15398, 4672, 3536, 2103, 279, 263, 5830, 2511, 603, 279, 5003, 911, 585, 309, 326, 997, 353, 486, 1008, 3536, 1570, 273, 1140, 18, 803, 18, 5701, 12, 659...
if not self.completed:
if not self.completed and not self.moveisundo:
def finish_move(self): # Swap bottom face. (Once the game is completed, we allow # the user to arbitrarily roll the fully blue cube around # the grid just for fun.) if not self.completed: self.arena[self.newx][self.newy], self.newcube[B] = \ self.newcube[B], self.arena[self.newx][self.newy]
76798148034c63225e3e9051a38e9b1bafe27f36 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7420/76798148034c63225e3e9051a38e9b1bafe27f36/cube.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4076, 67, 8501, 12, 2890, 4672, 468, 12738, 5469, 7945, 18, 261, 12212, 326, 7920, 353, 5951, 16, 732, 1699, 468, 326, 729, 358, 10056, 86, 10243, 5824, 326, 7418, 8024, 18324, 6740, 468...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4076, 67, 8501, 12, 2890, 4672, 468, 12738, 5469, 7945, 18, 261, 12212, 326, 7920, 353, 5951, 16, 732, 1699, 468, 326, 729, 358, 10056, 86, 10243, 5824, 326, 7418, 8024, 18324, 6740, 468...
data = StringIO.StringIO.read(self, n)
data = io.BytesIO.read(self, n)
def read(self, n=-1): data = StringIO.StringIO.read(self, n) if data == '': raise AssertionError('caller tried to read past EOF') return data
8fff7924a4217dc73de2042168a0eda7243e26d7 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8546/8fff7924a4217dc73de2042168a0eda7243e26d7/test_httplib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 12, 2890, 16, 290, 29711, 21, 4672, 501, 273, 2527, 18, 2160, 4294, 18, 896, 12, 2890, 16, 290, 13, 309, 501, 422, 875, 30, 1002, 12068, 2668, 16140, 12928, 358, 855, 8854, 6431, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 855, 12, 2890, 16, 290, 29711, 21, 4672, 501, 273, 2527, 18, 2160, 4294, 18, 896, 12, 2890, 16, 290, 13, 309, 501, 422, 875, 30, 1002, 12068, 2668, 16140, 12928, 358, 855, 8854, 6431, ...
for o, a in opts: if o in ("-v", "--version"): self.print_version() sys.exit(2) elif o in ("-h", "--help"): self.print_usage() sys.exit(2) elif o in ("-R", "--recursive"): self.recursive = True elif o in ("-V", "--verbose"): self.verbose = True
for o, a in opts: if o in ("-v", "--version"): self.print_version() sys.exit(2) elif o in ("-h", "--help"): self.print_usage() sys.exit(2) elif o in ("-R", "--recursive"): self.recursive = True elif o in ("-V", "--verbose"): self.verbose = True
def __init__(self):
a4d6024d09d807bd2a142bf54daca1a7d1873c7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/a4d6024d09d807bd2a142bf54daca1a7d1873c7f/mirage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
import pickle
def saveBreakpoints(self): # XXX This is not yet called automatically on saving a module, should it be ? import pickle fn = self.getBreakpointFilename() if len(self.breaks): pickle.dump(self.breaks, open(fn, 'w')) elif os.path.exists(fn): os.remove(fn)
ed86f61b9d55619ac440188d57acc292436b0dab /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/ed86f61b9d55619ac440188d57acc292436b0dab/PySourceView.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1923, 7634, 4139, 12, 2890, 4672, 468, 11329, 1220, 353, 486, 4671, 2566, 6635, 603, 12392, 279, 1605, 16, 1410, 518, 506, 692, 225, 2295, 273, 365, 18, 588, 20552, 5359, 1435, 309, 562,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 7634, 4139, 12, 2890, 4672, 468, 11329, 1220, 353, 486, 4671, 2566, 6635, 603, 12392, 279, 1605, 16, 1410, 518, 506, 692, 225, 2295, 273, 365, 18, 588, 20552, 5359, 1435, 309, 562,...
ob = self.unrestrictedTraverse('%s' % show) if ob:
ob = self.unrestrictedTraverse('%s' % show, None) if ob and not isinstance(ob, GeoMapTool):
def xrjs_simple_feed(self, key, show, REQUEST): """ """ #if key == self.getSession(MSP_SESSION_KEY, None): res = '' ob = self.unrestrictedTraverse('%s' % show) if ob: if ob.latitude is not None and ob.longitude is not None: res = '%s|%s|%s' % (ob.latitude, ob.longitude, self.utJavaScriptEncode(ob.title_or_id())) #self.delSession(MSP_SESSION_KEY) REQUEST.RESPONSE.setHeader('Content-type', 'text/html;charset=utf-8') return res
c27d9a0253c98537f16bf185cb9dde4f26bc9b82 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3287/c27d9a0253c98537f16bf185cb9dde4f26bc9b82/GeoMapTool.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 20912, 2924, 67, 9647, 67, 7848, 12, 2890, 16, 498, 16, 2405, 16, 12492, 4672, 3536, 3536, 468, 430, 498, 422, 365, 18, 588, 2157, 12, 49, 3118, 67, 7042, 67, 3297, 16, 599, 4672, 40...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 20912, 2924, 67, 9647, 67, 7848, 12, 2890, 16, 498, 16, 2405, 16, 12492, 4672, 3536, 3536, 468, 430, 498, 422, 365, 18, 588, 2157, 12, 49, 3118, 67, 7042, 67, 3297, 16, 599, 4672, 40...
if context is None: context = getcontext() other = self._convert_other(other) sn = self._isnan() on = other._isnan() if sn or on: if on == 1 and sn != 2: return self if sn == 1 and on != 2: return other return self._check_nans(other, context)
other = _convert_other(other) if self._is_special or other._is_special: sn = self._isnan() on = other._isnan() if sn or on: if on == 1 and sn != 2: return self if sn == 1 and on != 2: return other return self._check_nans(other, context)
def max(self, other, context=None): """Returns the larger value.
1a63da64df2af26e1f050749c19281f1de9084fa /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/1a63da64df2af26e1f050749c19281f1de9084fa/decimal.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 943, 12, 2890, 16, 1308, 16, 819, 33, 7036, 4672, 3536, 1356, 326, 10974, 460, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 943, 12, 2890, 16, 1308, 16, 819, 33, 7036, 4672, 3536, 1356, 326, 10974, 460, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
and exc.root().name == 'exceptions'
and exc.root().name == EXCEPTIONS_MODULE
def visit_tryexcept(self, node): """check for empty except""" exceptions_classes = [] nb_handlers = len(node.handlers) for index, handler in enumerate(node.handlers): # single except doing nothing but "pass" without else clause if nb_handlers == 1 and is_empty(handler.body) and not node.orelse: self.add_message('W0704', node=handler.type or handler.body[0]) if handler.type is None: if nb_handlers == 1 and not is_raising(handler.body): self.add_message('W0702', node=handler.body[0]) # check if a "except:" is followed by some other # except elif index < (nb_handlers - 1): msg = 'empty except clause should always appear last' self.add_message('E0701', node=node, args=msg) else: try: excs = list(unpack_infer(handler.type)) except astng.InferenceError: continue for exc in excs: # XXX skip other non class nodes if exc is YES or not isinstance(exc, astng.Class): continue exc_ancestors = [anc for anc in exc.ancestors() if isinstance(anc, astng.Class)] for previous_exc in exceptions_classes: if previous_exc in exc_ancestors: msg = '%s is an ancestor class of %s' % ( previous_exc.name, exc.name) self.add_message('E0701', node=handler.type, args=msg) if (exc.name == 'Exception' and exc.root().name == 'exceptions' and nb_handlers == 1 and not is_raising(handler.body)): self.add_message('W0703', node=handler.type) exceptions_classes += excs
0824e1a81e2dc8f16d5eb64ebd0218d1b36948e8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/928/0824e1a81e2dc8f16d5eb64ebd0218d1b36948e8/exceptions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3757, 67, 698, 14137, 12, 2890, 16, 756, 4672, 3536, 1893, 364, 1008, 1335, 8395, 4798, 67, 4701, 273, 5378, 4264, 67, 11046, 273, 562, 12, 2159, 18, 11046, 13, 364, 770, 16, 1838, 225...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3757, 67, 698, 14137, 12, 2890, 16, 756, 4672, 3536, 1893, 364, 1008, 1335, 8395, 4798, 67, 4701, 273, 5378, 4264, 67, 11046, 273, 562, 12, 2159, 18, 11046, 13, 364, 770, 16, 1838, 225...
junk.append(glob.glob("*.fpm")) junk.append(glob.glob("*.log")) junk.append(glob.glob("*.log.bz2"))
junk.extend(glob.glob("*.fpm")) junk.extend(glob.glob("*.log")) junk.extend(glob.glob("*.log.bz2"))
def build(self, pkg): # maybe later support protocolls (the first item) other than git? scm = pkg.split('/')[0][:-1] tree = pkg.split('/')[2] pkgarr = pkg.split('/')[3].split('-') pkgname = "-".join(pkgarr[:-3]) pkgver = "-".join(pkgarr[-3:-1]) arch = pkgarr[-1] self.log(pkg, "starting build") sock = os.popen("export HOME=/home/syncpkgd; . ~/.repoman.conf; echo $fst_root; echo $%s_servers" % tree) buf = sock.readlines() sock.close() fst_root = buf[0].strip() url = buf[1].strip() try: os.stat(fst_root) except OSError: os.makedirs(fst_root) os.chdir(fst_root) if scm not in ["git", "darcs"]: self.log(pkg, "unkown scm, aborting") return try: os.stat(tree) os.chdir(tree) if scm == "git": self.system("git pull") self.system("git checkout -f") elif scm == "darcs": self.system("darcs pull -a") self.system("darcs revert -a") except OSError: if scm == "git": self.system("git clone %s %s" % (url, tree)) elif scm == "darcs": self.system("darcs get --partial" % (url, tree)) try: os.chdir(tree) except OSError: self.log(pkg, "failed to get the repo") return self.go(pkgname) if scm == "git": self.system("git clean -x -d") elif scm == "darcs": junk = [] junk.append(glob.glob("*.fpm")) junk.append(glob.glob("*.log")) junk.append(glob.glob("*.log.bz2")) for i in junk: os.unlink(junk) self.system("sudo makepkg -t %s -C" % tree) if self.system("sudo makepkg -t %s -cu" % tree): self.log(pkg, "makepkg failed") sock = open("%s.log" % pkg.split('/')[-1]) server.report_result(config.server_user, config.server_pass, pkg, 1, base64.encodestring(sock.read())) sock.close() return self.system("repoman -t %s -k sync" % tree) self.log(pkg, "build finished") server.report_result(config.server_user, config.server_pass, pkg, 0)
2b90374ccc08224c6a26fa8903fe646e838279ec /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11991/2b90374ccc08224c6a26fa8903fe646e838279ec/syncpkgcd.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 12, 2890, 16, 3475, 4672, 468, 6944, 5137, 2865, 1771, 3251, 261, 5787, 1122, 761, 13, 1308, 2353, 5071, 35, 29207, 273, 3475, 18, 4939, 2668, 2473, 25146, 20, 6362, 30, 17, 21, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 12, 2890, 16, 3475, 4672, 468, 6944, 5137, 2865, 1771, 3251, 261, 5787, 1122, 761, 13, 1308, 2353, 5071, 35, 29207, 273, 3475, 18, 4939, 2668, 2473, 25146, 20, 6362, 30, 17, 21, ...
for fin, req in zip(e['finished_blocks'], e['requested_blocks']): if fin:
for b in e['blocks']: s = b['state'] if s == 3:
def print_download_queue(console, download_queue): out = "" for e in download_queue: out += '%4d: [' % e['piece_index']; for fin, req in zip(e['finished_blocks'], e['requested_blocks']): if fin: out += '#' elif req: out += '+' else: out += '-' out += ']\n' write_line(console, out)
c6bd3d5dab21821cfc01856868ca63e824d74ca1 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6321/c6bd3d5dab21821cfc01856868ca63e824d74ca1/client.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1172, 67, 7813, 67, 4000, 12, 8698, 16, 4224, 67, 4000, 4672, 225, 596, 273, 1408, 225, 364, 425, 316, 4224, 67, 4000, 30, 596, 1011, 1995, 24, 72, 30, 10228, 738, 425, 3292, 30100, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1172, 67, 7813, 67, 4000, 12, 8698, 16, 4224, 67, 4000, 4672, 225, 596, 273, 1408, 225, 364, 425, 316, 4224, 67, 4000, 30, 596, 1011, 1995, 24, 72, 30, 10228, 738, 425, 3292, 30100, ...
""" vertices1 = [v for v in vertices1 if v in self] output = []
sage: G.edge_boundary([2], [0]) [(0, 2, {})] """ vertices1 = set([v for v in vertices1 if v in self])
def edge_boundary(self, vertices1, vertices2=None, labels=True): """ Returns a list of edges `(u,v,l)` with `u` in ``vertices1`` and `v` in ``vertices2``. If ``vertices2`` is ``None``, then it is set to the complement of ``vertices1``. In a digraph, the external boundary of a vertex `v` are those vertices `u` with an arc `(v, u)`. INPUT: - ``labels`` - if ``False``, each edge is a tuple `(u,v)` of vertices. EXAMPLES:: sage: K = graphs.CompleteBipartiteGraph(9,3) sage: len(K.edge_boundary( [0,1,2,3,4,5,6,7,8], [9,10,11] )) 27 sage: K.size() 27 Note that the edge boundary preserves direction:: sage: K = graphs.CompleteBipartiteGraph(9,3).to_directed() sage: len(K.edge_boundary( [0,1,2,3,4,5,6,7,8], [9,10,11] )) 27 sage: K.size() 54 :: sage: D = DiGraph({0:[1,2], 3:[0]}) sage: D.edge_boundary([0]) [(0, 1, None), (0, 2, None)] sage: D.edge_boundary([0], labels=False) [(0, 1), (0, 2)]
e92672ad33fbb51945fec0fd0603282fca8d5783 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/e92672ad33fbb51945fec0fd0603282fca8d5783/generic_graph.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3591, 67, 16604, 12, 2890, 16, 6928, 21, 16, 6928, 22, 33, 7036, 16, 3249, 33, 5510, 4672, 3536, 2860, 279, 666, 434, 5231, 1375, 12, 89, 16, 90, 16, 80, 22025, 598, 1375, 89, 68, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 16604, 12, 2890, 16, 6928, 21, 16, 6928, 22, 33, 7036, 16, 3249, 33, 5510, 4672, 3536, 2860, 279, 666, 434, 5231, 1375, 12, 89, 16, 90, 16, 80, 22025, 598, 1375, 89, 68, ...
long_description=read('README.txt')
long_description=(read('README.txt') +'\n\n'+ read('CHANGES.txt')),
def read(*rnames): return open(os.path.join(os.path.dirname(__file__), *rnames)).read()
72632b9ccc07ec553a11e57b6f8dd804113ca719 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9449/72632b9ccc07ec553a11e57b6f8dd804113ca719/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 30857, 86, 1973, 4672, 327, 1696, 12, 538, 18, 803, 18, 5701, 12, 538, 18, 803, 18, 12287, 12, 972, 768, 972, 3631, 380, 86, 1973, 13, 2934, 896, 1435, 225, 2, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 30857, 86, 1973, 4672, 327, 1696, 12, 538, 18, 803, 18, 5701, 12, 538, 18, 803, 18, 12287, 12, 972, 768, 972, 3631, 380, 86, 1973, 13, 2934, 896, 1435, 225, 2, -100, -100, -100,...
cc = {
CCompiler = {
def Boot(): global BuildLocal BuildLocal += " -boot -keep -DM3CC_TARGET=" + Config Version = "1" # This information is duplicated from the config files. # TBD: put it only in one place. # The older bootstraping method does get that right. vms = StringTagged(Config, "VMS") # pick the compiler if Config == "ALPHA32_VMS": cc = "cc" cflags = " " elif Config == "ALPHA64_VMS": cc = "cc" cflags = "/pointer_size=64 " elif StringTagged(Config, "SOLARIS") or Config == "SOLsun": cc = "/usr/bin/cc" cflags = "-g -mt -xldscope=symbolic " else: # gcc platforms cc = { "SOLgnu" : "/usr/sfw/bin/gcc", }.get(Config) or "gcc" cflags = { "I386_INTERIX" : "-g ", # gcc -fPIC generates incorrect code on Interix "SOLgnu" : "-g ", # -fPIC? }.get(Config) or "-g -fPIC " cflags = cflags + ({ "AMD64_LINUX" : " -m64 -mno-align-double ", "AMD64_DARWIN" : " -arch x86_64 ", "PPC64_DARWIN" : " -arch ppc64 ", "ARM_DARWIN" : " -march=armv6 -mcpu=arm1176jzf-s ", "LINUXLIBC6" : " -m32 -mno-align-double ", "I386_LINUX" : " -m32 -mno-align-double ", "MIPS64_OPENBSD" : " -mabi=64 ", "SOLgnu" : " -m32 -mcpu=v9 ", "I386_SOLARIS" : " -xarch=pentium_pro -Kpic ", "AMD64_SOLARIS" : " -xarch=amd64 -Kpic ", "SOLsun" : " -xarch=v8plus -xcode=pic32 ", "SPARC32_SOLARIS" : " -xarch=v8plus -xcode=pic32 ", "SPARC64_SOLARIS" : " -xarch=v9 -xcode=pic32 ", "SPARC32_LINUX" : " -m32 -mcpu=v9 -munaligned-doubles ", "SPARC64_LINUX" : " -m64 -munaligned-doubles ", }.get(Config) or " ") Link = "$(CC) $(CFLAGS) *.mo *.io *.o " # link flags if StringTagged(Target, "DARWIN"): pass elif StringTagged(Target, "SOLARIS") or Target.startswith("SOL"): Link = Link + " -lrt -lm -lnsl -lsocket -lpthread " elif StringTagged(Target, "HPUX"): Link = Link + " -lrt -lm " elif StringTagged(Target, "INTERIX"): Link = Link + " -lm " else: Link = Link + " -lm -lpthread " # add -c to compiler but not link (i.e. not cflags) Compile = "$(CC) $(CFLAGS) " if not StringTagged(Config, "VMS"): Compile = Compile + " -c " AssembleOnTarget = not vms AssembleOnHost = not AssembleOnTarget # pick assembler if StringTagged(Target, "VMS") and AssembleOnTarget: Assemble = "macro /alpha " # not right, come back to it later elif StringTagged(Target, "SOLARIS") or Target.startswith("SOL"): Assemble = "/usr/ccs/bin/as " else: Assemble = "as " # set assembler flags if Target != "PPC32_OPENBSD" and Target != "PPC_LINUX": # "Tag" not right for LINUX due to LINUXLIBC6 # "Tag" not right for BSD or 64 either. if Target.find("LINUX") != -1 or Target.find("BSD") != -1: if Target.find("64") != -1 or (StringTagged(Target, "ALPHA") and not StringTagged(Target, "ALPHA32")): Assemble = Assemble + " --64" else: Assemble = Assemble + " --32" Assemble = (Assemble + ({ "AMD64_DARWIN" : " -arch x86_64 ", "PPC64_DARWIN" : " -arch ppc64 ", "ARM_DARWIN" : " -arch armv6 ", # -s puts symbols where linker won't automatically strip them "I386_SOLARIS" : " -s ", "AMD64_SOLARIS" : " -s -xarch=amd64 ", "SOLgnu" : " -s -xarch=v8plus ", "SOLsun" : " -s -xarch=v8plus ", "SPARC32_SOLARIS" : " -s -xarch=v8plus ", "SPARC64_SOLARIS" : " -s -xarch=v9 ", }.get(Target) or "")) GnuPlatformPrefix = { "ARM_DARWIN" : "arm-apple-darwin8-", "ALPHA32_VMS" : "alpha-dec-vms-", "ALPHA64_VMS" : "alpha64-dec-vms-", }.get(Target) or "" if not vms: cc = GnuPlatformPrefix + cc Link = GnuPlatformPrefix + Link if (not vms) or AssembleOnHost: Assemble = GnuPlatformPrefix + Assemble # # squeeze runs of spaces and spaces at ends # cflags = re.sub(" +", " ", cflags) cflags = re.sub(" +$", "", cflags) cflags = re.sub("^ +", "", cflags) Compile = re.sub(" +", " ", Compile) Compile = re.sub(" +$", "", Compile) Compile = re.sub("^ +", "", Compile) Link = re.sub(" +", " ", Link) Link = re.sub(" +$", "", Link) Assemble = re.sub(" +", " ", Assemble) Assemble = re.sub(" +$", "", Assemble) BootDir = "./cm3-boot-" + Target + "-" + Version P = [ "m3cc", "import-libs", "m3core", "libm3", "sysutils", "m3middle", "m3quake", "m3objfile", "m3linker", "m3back", "m3front", "cm3" ] #DoPackage(["", "realclean"] + P) or sys.exit(1) DoPackage(["", "buildlocal"] + P) or sys.exit(1) try: shutil.rmtree(BootDir) except: pass try: os.mkdir(BootDir) except: pass # # This would probably be a good use of XSL (xml style sheets) # Make = open(os.path.join(BootDir, "make.sh"), "wb") VmsMake = open(os.path.join(BootDir, "vmsmake.com"), "wb") VmsLink = open(os.path.join(BootDir, "vmslink.opt"), "wb") Makefile = open(os.path.join(BootDir, "Makefile"), "wb") UpdateSource = open(os.path.join(BootDir, "updatesource.sh"), "wb") Objects = { } Makefile.write(".SUFFIXES:\n" + ".SUFFIXES: .c .is .ms .s .o .obj .io .mo\n\n" + "all: cm3\n\n" + "clean:\n" + "\trm -rf *.io *.mo *.o *.obj\n\n") for a in [UpdateSource, Make]: a.write("#!/bin/sh\n\n" + "set -e\n" + "set -x\n\n") for a in [Makefile]: a.write("# edit up here\n\n" + "CC ?= " + cc + "\n" + "CFLAGS ?= " + cflags + "\n" + "Compile=" + Compile + "\n" + "Assemble=" + Assemble + "\n" + "Link=" + Link + "\n" + "\n# no more editing should be needed\n\n") for a in [Make]: a.write("# edit up here\n\n" + "CC=${CC:-" + cc + "}\n" + "CFLAGS=${CFLAGS:-" + cflags + "}\n" + "Compile=" + Compile + "\n" + "Assemble=" + Assemble + "\n" + "Link=" + Link + "\n" + "\n# no more editing should be needed\n\n") for q in P: dir = GetPackagePath(q) for a in os.listdir(os.path.join(Root, dir, Config)): ext_c = a.endswith(".c") ext_h = a.endswith(".h") ext_s = a.endswith(".s") ext_ms = a.endswith(".ms") ext_is = a.endswith(".is") if not (ext_c or ext_h or ext_s or ext_ms or ext_is): continue fullpath = os.path.join(Root, dir, Config, a) if ext_h or ext_c or not vms or AssembleOnTarget: CopyFile(fullpath, BootDir) if ext_h: continue Object = GetObjectName(a) if Objects.get(Object): continue Objects[Object] = 1 if ext_c: VmsMake.write("$ " + Compile + " " + a + "\n") else: if AssembleOnHost: # must have cross assembler a = Assemble + " " + fullpath + " -o " + BootDir + "/" + Object print(a) os.system(a) else: VmsMake.write("$ " + Assemble + " " + a + "\n") VmsLink.write(Object + "/SELECTIVE_SEARCH\n") Makefile.write(".c.o:\n" + "\t$(Compile) -o $@ $<\n\n" + ".c.obj:\n" + "\t$(Compile) -o $@ $<\n\n" + ".is.io:\n" + "\t$(Assemble) -o $@ $<\n\n" + ".s.o:\n" + "\t$(Assemble) -o $@ $<\n\n" + ".ms.mo:\n" + "\t$(Assemble) -o $@ $<\n\n") Makefile.write("cm3:") Objects = Objects.keys() Objects.sort() k = 4 for a in Objects: k = k + 1 + len(a) if k > 76: # line wrap Makefile.write(" \\\n") k = 1 + len(a) Makefile.write(" " + a) Makefile.write("\n\t") VmsMake.write("$ set file/attr=(rfm=var,rat=none) *.o\n") VmsMake.write("$ set file/attr=(rfm=var,rat=none) *.obj\n") VmsMake.write("$ set file/attr=(rfm=var,rat=none) *.mo\n") VmsMake.write("$ set file/attr=(rfm=var,rat=none) *.io\n") VmsMake.write("$ link /executable=cm3.exe vmslink/options\n") for a in [Make, Makefile]: a.write("$(Link) -o cm3\n") for a in [ # # Add to this list as needed. # Adding more than necessary is ok -- assume the target system has no changes, # so we can replace whatever is there. # "m3-libs/libm3/src/os/POSIX/OSConfigPosix.m3", "m3-libs/libm3/src/random/m3makefile", "m3-libs/m3core/src/m3makefile", "m3-libs/m3core/src/Uwaitpid.quake", "m3-libs/m3core/src/thread.quake", "m3-libs/m3core/src/C/m3makefile", "m3-libs/m3core/src/C/" + Target + "/m3makefile", "m3-libs/m3core/src/C/Common/m3makefile", "m3-libs/m3core/src/Csupport/m3makefile", "m3-libs/m3core/src/float/m3makefile", "m3-libs/m3core/src/runtime/m3makefile", "m3-libs/m3core/src/runtime/common/m3makefile", "m3-libs/m3core/src/runtime/common/Compiler.tmpl", "m3-libs/m3core/src/runtime/common/m3text.h", "m3-libs/m3core/src/runtime/common/RTError.h", "m3-libs/m3core/src/runtime/common/RTMachine.i3", "m3-libs/m3core/src/runtime/common/RTProcess.h", "m3-libs/m3core/src/runtime/common/RTSignalC.c", "m3-libs/m3core/src/runtime/common/RTSignalC.h", "m3-libs/m3core/src/runtime/common/RTSignalC.i3", "m3-libs/m3core/src/runtime/common/RTSignal.i3", "m3-libs/m3core/src/runtime/common/RTSignal.m3", "m3-libs/m3core/src/runtime/" + Target + "/m3makefile", "m3-libs/m3core/src/runtime/" + Target + "/RTMachine.m3", "m3-libs/m3core/src/runtime/" + Target + "/RTSignal.m3", "m3-libs/m3core/src/runtime/" + Target + "/RTThread.m3", "m3-libs/m3core/src/text/TextLiteral.i3", "m3-libs/m3core/src/thread/m3makefile", "m3-libs/m3core/src/thread/PTHREAD/m3makefile", "m3-libs/m3core/src/thread/PTHREAD/ThreadPThread.m3", "m3-libs/m3core/src/thread/PTHREAD/ThreadPThreadC.i3", "m3-libs/m3core/src/thread/PTHREAD/ThreadPThreadC.c", "m3-libs/m3core/src/time/POSIX/m3makefile", "m3-libs/m3core/src/unix/m3makefile", "m3-libs/m3core/src/unix/Common/m3makefile", "m3-libs/m3core/src/unix/Common/m3unix.h", "m3-libs/m3core/src/unix/Common/Udir.i3", "m3-libs/m3core/src/unix/Common/UdirC.c", "m3-libs/m3core/src/unix/Common/Usignal.i3", "m3-libs/m3core/src/unix/Common/Ustat.i3", "m3-libs/m3core/src/unix/Common/UstatC.c", "m3-libs/m3core/src/unix/Common/UtimeC.c", "m3-libs/m3core/src/unix/Common/Uucontext.i3", "m3-sys/cminstall/src/config-no-install/SOLgnu", "m3-sys/cminstall/src/config-no-install/SOLsun", "m3-sys/cminstall/src/config-no-install/Solaris.common", "m3-sys/cminstall/src/config-no-install/Unix.common", "m3-sys/cminstall/src/config-no-install/cm3cfg.common", "m3-sys/cminstall/src/config-no-install/" + Target, "m3-sys/m3cc/src/m3makefile", "m3-sys/m3cc/src/gcc/m3cg/parse.c", "m3-sys/m3middle/src/Target.i3", "m3-sys/m3middle/src/Target.m3", "scripts/python/pylib.py", "m3-libs/m3core/src/C/" + Target + "/Csetjmp.i3", "m3-libs/m3core/src/C/" + Target + "/m3makefile", "m3-libs/m3core/src/C/Common/Csetjmp.i3", "m3-libs/m3core/src/C/Common/Csignal.i3", "m3-libs/m3core/src/C/Common/Cstdio.i3", "m3-libs/m3core/src/C/Common/Cstring.i3", "m3-libs/m3core/src/C/Common/m3makefile", ]: source = os.path.join(Root, a) if FileExists(source): name = GetLastPathElement(a) reldir = RemoveLastPathElement(a) destdir = os.path.join(BootDir, reldir) dest = os.path.join(destdir, name) try: os.makedirs(destdir) except: pass CopyFile(source, dest) for b in [UpdateSource, Make]: b.write("mkdir -p /dev2/cm3/" + reldir + "\n") b.write("cp " + a + " /dev2/cm3/" + a + "\n") for a in [UpdateSource, Make, Makefile, VmsMake, VmsLink]: a.close() # write entirely new custom makefile for NT # We always have object files so just compile and link in one fell swoop. if StringTagged(Config, "NT") or Config == "NT386": DeleteFile("updatesource.sh") DeleteFile("make.sh") Makefile = open(os.path.join(BootDir, "Makefile"), "wb") Makefile.write("cm3.exe: *.io *.mo *.c\r\n" + " cl -Zi -MD *.c -link *.mo *.io -out:cm3.exe user32.lib kernel32.lib wsock32.lib comctl32.lib gdi32.lib advapi32.lib netapi32.lib\r\n") Makefile.close() if vms or StringTagged(Config, "NT") or Config == "NT386": _MakeZip(BootDir[2:]) else: _MakeTGZ(BootDir[2:])
c35fdb46ab081a89157be8ee1623b9566eef3714 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9328/c35fdb46ab081a89157be8ee1623b9566eef3714/pylib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 26254, 13332, 225, 2552, 3998, 2042, 3998, 2042, 1011, 315, 300, 7137, 300, 10102, 300, 16125, 23, 6743, 67, 16374, 1546, 397, 1903, 225, 4049, 273, 315, 21, 6, 225, 468, 1220, 1779, 353...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 26254, 13332, 225, 2552, 3998, 2042, 3998, 2042, 1011, 315, 300, 7137, 300, 10102, 300, 16125, 23, 6743, 67, 16374, 1546, 397, 1903, 225, 4049, 273, 315, 21, 6, 225, 468, 1220, 1779, 353...
exts.append( Extension('_Win', ['win/_Winmodule.c']) )
exts.append( Extension('_Win', ['win/_Winmodule.c'], extra_link_args=['-framework', 'Carbon']) )
def detect_modules(self): # Ensure that /usr/local is always used if '/usr/local/lib' not in self.compiler.library_dirs: self.compiler.library_dirs.insert(0, '/usr/local/lib') if '/usr/local/include' not in self.compiler.include_dirs: self.compiler.include_dirs.insert(0, '/usr/local/include' )
c51427a25686e757c1fb9c6305e7bcf0bfbfc7dd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/c51427a25686e757c1fb9c6305e7bcf0bfbfc7dd/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5966, 67, 6400, 12, 2890, 4672, 468, 7693, 716, 342, 13640, 19, 3729, 353, 3712, 1399, 309, 1173, 13640, 19, 3729, 19, 2941, 11, 486, 316, 365, 18, 9576, 18, 12083, 67, 8291, 30, 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, 5966, 67, 6400, 12, 2890, 4672, 468, 7693, 716, 342, 13640, 19, 3729, 353, 3712, 1399, 309, 1173, 13640, 19, 3729, 19, 2941, 11, 486, 316, 365, 18, 9576, 18, 12083, 67, 8291, 30, 365, ...
data_app((self.formatDate(part.registration_date), part.id, part.first_name, part.last_name, part.country, part.organisation, part.official_title, part.passport_no, part.passport_expire, part.email, part.phone_number, part.fax_number, arrival_date, part.arrival_from, part.arrival_flight, part.arrival_time, departure_date, part.departure_flight, part.departure_time, hotel_reservation))
data_app((self.formatDate(part.registration_date), part.id, self.unicode2UTF8(part.first_name), self.unicode2UTF8(part.last_name), self.unicode2UTF8(part.country), self.unicode2UTF8(part.organisation), self.unicode2UTF8(part.official_title), self.unicode2UTF8(part.passport_no), self.unicode2UTF8(part.passport_expire), part.email, self.unicode2UTF8(part.phone_number), self.unicode2UTF8(part.fax_number), arrival_date, self.unicode2UTF8(part.arrival_from), self.unicode2UTF8(part.arrival_flight), part.arrival_time, departure_date, self.unicode2UTF8(part.departure_flight), part.departure_time, hotel_reservation))
def exportParticipants(self, REQUEST=None, RESPONSE=None): """ exports the participants list in CSV format """ data = [('Registration date', 'Registration number', 'First name', 'Name', 'Country', 'Organisation', 'Official title', 'Passport number', 'Expiry date of the passport', 'Email address', 'Phone number', 'Fax number', 'Date of arrival', 'Arriving from', 'Flight number', 'Time of arrival', 'Date of departure', 'Flight number', 'Departure time', 'Hotel reservation')] data_app = data.append for part in self.getParticipants(skey='registration_date', rkey=1, is_journalist=False): if part.arrival_date: arrival_date = self.formatDate(part.arrival_date) else: arrival_date = 'n/a' if part.departure_date: departure_date = self.formatDate(part.departure_date) else: departure_date = 'n/a' if part.hotel_reservation == '1': hotel_reservation = 'I am part of one of the following delegations: (2 persons for each delegation): Albania, Algeria, Bosnia-Herzegovina, Croatia, Montenegro, Egypt, Euro-Mediterranean Parliamentary Assembly, Israel, League of Arab States, Lebanon, Libya, Mauritania, Morocco, Palestine, Syria, Tunisia, Turkey. My accommodation is covered by the French Government.' else: hotel_reservation = 'I pay my own accommodation. So please book your hotel room, click here to get hotels contacts and special rates.' data_app((self.formatDate(part.registration_date), part.id, part.first_name, part.last_name, part.country, part.organisation, part.official_title, part.passport_no, part.passport_expire, part.email, part.phone_number, part.fax_number, arrival_date, part.arrival_from, part.arrival_flight, part.arrival_time, departure_date, part.departure_flight, part.departure_time, hotel_reservation))
24f47b8597200f28c962a2f2bc1be16d29bd2cfc /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3287/24f47b8597200f28c962a2f2bc1be16d29bd2cfc/SemideRegistration.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3359, 1988, 27620, 12, 2890, 16, 12492, 33, 7036, 16, 20645, 33, 7036, 4672, 3536, 8095, 326, 22346, 666, 316, 10381, 740, 3536, 501, 273, 306, 2668, 7843, 1509, 2187, 296, 7843, 1300, 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, 3359, 1988, 27620, 12, 2890, 16, 12492, 33, 7036, 16, 20645, 33, 7036, 4672, 3536, 8095, 326, 22346, 666, 316, 10381, 740, 3536, 501, 273, 306, 2668, 7843, 1509, 2187, 296, 7843, 1300, 2...
return attrname[:len(prefix)] == prefix and callable(getattr(testCaseClass, attrname))
return attrname.startswith(prefix) and callable(getattr(testCaseClass, attrname))
def isTestMethod(attrname, testCaseClass=testCaseClass, prefix=self.testMethodPrefix): return attrname[:len(prefix)] == prefix and callable(getattr(testCaseClass, attrname))
ac3fd9b58079d280347347559392e17a6635b99e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/ac3fd9b58079d280347347559392e17a6635b99e/unittest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 4709, 1305, 12, 1747, 529, 16, 1842, 2449, 797, 33, 3813, 2449, 797, 16, 1633, 33, 2890, 18, 3813, 1305, 2244, 4672, 327, 1604, 529, 10531, 1897, 12, 3239, 25887, 422, 1633, 471, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 4709, 1305, 12, 1747, 529, 16, 1842, 2449, 797, 33, 3813, 2449, 797, 16, 1633, 33, 2890, 18, 3813, 1305, 2244, 4672, 327, 1604, 529, 10531, 1897, 12, 3239, 25887, 422, 1633, 471, ...
request = loads(str)
request = loads(str_)
def loop(self): """@brief Loop forever and respond to all requests.""" _log("Server::loop") while True: try: try: str = _read_lp_hunk(self._in) except EOFError: sys.exit(0) # normal exit request = loads(str) _log("request: %s (%s)" % (request, self._objects)) req = request id = None obj = None try: id = req['id'] if id: id = int(id) obj = self._objects[id] #_log("id, object: %d %s" % (id, obj)) except Exception, e: #_log("Exception %s" % str(e)) pass if obj is None or id is None: id = None obj = self._export #_log("found object %s" % str(obj))
d5f17df58ca45e68ce1ad548f1d0ed25f44eae9b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10078/d5f17df58ca45e68ce1ad548f1d0ed25f44eae9b/saranwrap.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2798, 12, 2890, 4672, 3536, 36, 25888, 9720, 21238, 471, 6846, 358, 777, 3285, 12123, 389, 1330, 2932, 2081, 2866, 6498, 7923, 1323, 1053, 30, 775, 30, 775, 30, 609, 273, 389, 896, 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, 2798, 12, 2890, 4672, 3536, 36, 25888, 9720, 21238, 471, 6846, 358, 777, 3285, 12123, 389, 1330, 2932, 2081, 2866, 6498, 7923, 1323, 1053, 30, 775, 30, 775, 30, 609, 273, 389, 896, 67, ...
except WindowsError,OSError:
except (WindowsError,OSError):
def install(options): """Create a virtual environment and install into it. You problably want this option as it ensures MysteryMachine doesn't touch your systemwide yapsy install. MysteryMachine currently requires a patched version of ypasy, so installing mysterrymachine virtually means we don't break any existing python scripts on your system. """ #options(virtualenv = Bunch(dest_dir = options.install.installdir, # paver_command_line = "install_here")) # We can't add this a a dependencies - because it needs virtualenv # which might not exist and dependency resolution. call_task('paver.virtual.bootstrap') here = os.getcwd() try: os.mkdir(options.install.installdir) except OSError, e: if e.errno != 17: raise e os.chdir(options.install.installdir) #call Pre built install file , creates virtual environment etc.. import subprocess subprocess.call(sys.executable , os.path.join(here,"install.py") ) os.chdir(here) #Relaunch paver to install ourself into the newly setup virtualenv. # -but first find our paver executable.. paver =os.path.join(options.install.installdir,"bin","paver") try: os.stat(paver) except WindowsError,OSError: paver = os.path.join(options.install.installdir,"scripts","paver") subprocess.call(paver,"-f",os.path.join(here,"pavement.py"),"install_here")
80895f2c1c226a334692ab663241993db22812a8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11984/80895f2c1c226a334692ab663241993db22812a8/pavement.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3799, 12, 2116, 4672, 3536, 1684, 279, 5024, 3330, 471, 3799, 1368, 518, 18, 225, 4554, 450, 3083, 6906, 2545, 333, 1456, 487, 518, 11932, 490, 1094, 627, 6981, 3302, 1404, 6920, 3433, 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, 3799, 12, 2116, 4672, 3536, 1684, 279, 5024, 3330, 471, 3799, 1368, 518, 18, 225, 4554, 450, 3083, 6906, 2545, 333, 1456, 487, 518, 11932, 490, 1094, 627, 6981, 3302, 1404, 6920, 3433, 2...
- 'system groups': show only «system» groups (root, bin, daemon, apache...), not normal group account. - 'normal groups': keep only «normal» groups, which includes Licorn administrators
- 'system groups': show only «system» groups (root, bin, daemon, apache...), not normal group account. - 'normal groups': keep only «normal» groups, which includes Licorn administrators
def Select(self, filter_string): """ Filter group accounts on different criteria: - 'system groups': show only «system» groups (root, bin, daemon, apache...), not normal group account. - 'normal groups': keep only «normal» groups, which includes Licorn administrators The criteria values are defined in /etc/{login.defs,adduser.conf} """
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6766, 12, 2890, 16, 1034, 67, 1080, 4672, 3536, 4008, 1041, 9484, 603, 3775, 3582, 30, 300, 296, 4299, 3252, 4278, 2405, 1338, 225, 131, 109, 4299, 131, 124, 3252, 261, 3085, 16, 4158, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6766, 12, 2890, 16, 1034, 67, 1080, 4672, 3536, 4008, 1041, 9484, 603, 3775, 3582, 30, 300, 296, 4299, 3252, 4278, 2405, 1338, 225, 131, 109, 4299, 131, 124, 3252, 261, 3085, 16, 4158, ...
user = pwd.getpwuid(stat.st_uid).pw_name mtime = time.asctime(time.localtime(stat.st_mtime))
user = pwd.getpwuid(info.st_uid).pw_name mtime = time.asctime(time.localtime(info.st_mtime))
def check_lockfile(path): """ Return (user, modification time) of lockfile, or (None, None). """ path = os.path.join(path, LOCKFILE) if os.path.exists(path): try: stat = os.stat(path) except OSError, exc: print 'Cannot access lockfile:', exc sys.exit(1) else: user = pwd.getpwuid(stat.st_uid).pw_name mtime = time.asctime(time.localtime(stat.st_mtime)) return (user, mtime) else: return (None, None)
5070bcba30f4213c12dbc66d6a5580dd2dddf97c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12610/5070bcba30f4213c12dbc66d6a5580dd2dddf97c/repo.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 739, 768, 12, 803, 4672, 3536, 2000, 261, 1355, 16, 11544, 813, 13, 434, 2176, 768, 16, 578, 261, 7036, 16, 599, 2934, 3536, 589, 273, 1140, 18, 803, 18, 5701, 12, 803, 16, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 739, 768, 12, 803, 4672, 3536, 2000, 261, 1355, 16, 11544, 813, 13, 434, 2176, 768, 16, 578, 261, 7036, 16, 599, 2934, 3536, 589, 273, 1140, 18, 803, 18, 5701, 12, 803, 16, ...
GuideTest.init("ecam", isLocal = isLocal)
GuideTest.init("ecam", isLocal = isLocal)
def _exitHandler(self): """Delete all image files and mask files. """ for maskObj in self.maskDict.itervalues(): maskObj.expire() for imObj in self.imObjDict.itervalues(): imObj.expire()
0a1ada4b1f708851eb5a7bb0cc86140829f349d1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6236/0a1ada4b1f708851eb5a7bb0cc86140829f349d1/GuideWdg.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8593, 1503, 12, 2890, 4672, 3536, 2613, 777, 1316, 1390, 471, 3066, 1390, 18, 3536, 364, 3066, 2675, 316, 365, 18, 4455, 5014, 18, 2165, 2372, 13332, 3066, 2675, 18, 14070, 1435, 36...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8593, 1503, 12, 2890, 4672, 3536, 2613, 777, 1316, 1390, 471, 3066, 1390, 18, 3536, 364, 3066, 2675, 316, 365, 18, 4455, 5014, 18, 2165, 2372, 13332, 3066, 2675, 18, 14070, 1435, 36...
sci_not = re.compile("(-?(?:0|[1-9]\d*))(\.\d+)?([eE][-+]\d+)")
def symbolic_expression_from_maxima_string(x, equals_sub=False, maxima=maxima): syms = dict(_syms) if len(x) == 0: raise RuntimeError, "invalid symbolic expression -- ''" maxima.set('_tmp_',x) # This is inefficient since it so rarely is needed: #r = maxima._eval_line('listofvars(_tmp_);')[1:-1] s = maxima._eval_line('_tmp_;') formal_functions = maxima_tick.findall(s) if len(formal_functions) > 0: for X in formal_functions: syms[X[1:]] = function(X[1:]) # You might think there is a potential very subtle bug if 'foo is in a string literal -- # but string literals should *never* ever be part of a symbolic expression. s = s.replace("'","") delayed_functions = maxima_qp.findall(s) if len(delayed_functions) > 0: for X in delayed_functions: syms[X[2:]] = SymbolicFunction_delayed(X[2:]) s = s.replace("?%","") s = multiple_replace(symtable, s) s = s.replace("%","") if equals_sub: s = s.replace('=','==') #replace all instances of scientific notation #with regular notation sci_not = re.compile("(-?(?:0|[1-9]\d*))(\.\d+)?([eE][-+]\d+)") search = sci_not.search(s) while not search is None: (start, end) = search.span() s = s.replace(s[start:end], str(RR(s[start:end]))) search = sci_not.search(s) # have to do this here, otherwise maxima_tick catches it syms['limit'] = dummy_limit global is_simplified try: # use a global flag so all expressions obtained via # evaluation of maxima code are assumed pre-simplified is_simplified = True last_msg = '' while True: try: w = sage_eval(s, syms) except NameError, msg: if msg == last_msg: raise NameError, msg msg = str(msg) last_msg = msg i = msg.find("'") j = msg.rfind("'") nm = msg[i+1:j] syms[nm] = var(nm) else: break if isinstance(w, (list, tuple)): return w else: x = SR(w) return x except SyntaxError: raise TypeError, "unable to make sense of Maxima expression '%s' in SAGE"%s finally: is_simplified = False
8242d096950759f3533906c728465e479b30a1f5 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9417/8242d096950759f3533906c728465e479b30a1f5/calculus.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 16754, 67, 8692, 67, 2080, 67, 1896, 13888, 67, 1080, 12, 92, 16, 1606, 67, 1717, 33, 8381, 16, 943, 13888, 33, 1896, 13888, 4672, 24367, 273, 2065, 24899, 9009, 959, 13, 225, 309, 562...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 16754, 67, 8692, 67, 2080, 67, 1896, 13888, 67, 1080, 12, 92, 16, 1606, 67, 1717, 33, 8381, 16, 943, 13888, 33, 1896, 13888, 4672, 24367, 273, 2065, 24899, 9009, 959, 13, 225, 309, 562...
actual_seq and expected_seq have the same element counts.
actual and expected have the same element counts.
def assertCountEqual(self, actual, expected, msg=None): """An unordered sequence specific comparison. It asserts that actual_seq and expected_seq have the same element counts. Equivalent to::
fc3caca49d18eea957d9debecfe5989524a77a53 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8125/fc3caca49d18eea957d9debecfe5989524a77a53/case.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1815, 1380, 5812, 12, 2890, 16, 3214, 16, 2665, 16, 1234, 33, 7036, 4672, 3536, 979, 29573, 3102, 2923, 5826, 18, 2597, 26124, 716, 3214, 471, 2665, 1240, 326, 1967, 930, 6880, 18, 31208...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1815, 1380, 5812, 12, 2890, 16, 3214, 16, 2665, 16, 1234, 33, 7036, 4672, 3536, 979, 29573, 3102, 2923, 5826, 18, 2597, 26124, 716, 3214, 471, 2665, 1240, 326, 1967, 930, 6880, 18, 31208...
@type progress_callback: C{function} @param progress_callback: A callback function that is called before each file is written, with the name of the created file.
def write(self, directory=None, progress_callback=None): """ Write the documentation to the given directory.
fab1255010a52ee17b13b50d1696c13e716be512 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/fab1255010a52ee17b13b50d1696c13e716be512/html.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 12, 2890, 16, 1867, 33, 7036, 16, 4007, 67, 3394, 33, 7036, 4672, 3536, 2598, 326, 7323, 358, 326, 864, 1867, 18, 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, 12, 2890, 16, 1867, 33, 7036, 16, 4007, 67, 3394, 33, 7036, 4672, 3536, 2598, 326, 7323, 358, 326, 864, 1867, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
if fileList == []:
if fileList == {}:
def pollDBS(self, datasetPath, status): """ _pollDBS_
87d7e4aaef9a55485525200d47dab0552b5b83de /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8887/87d7e4aaef9a55485525200d47dab0552b5b83de/MergeSensorComponent.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7672, 2290, 55, 12, 2890, 16, 3709, 743, 16, 1267, 4672, 3536, 389, 13835, 2290, 55, 67, 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, 7672, 2290, 55, 12, 2890, 16, 3709, 743, 16, 1267, 4672, 3536, 389, 13835, 2290, 55, 67, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
for line in self.browse(cr, uid, ids):
for line in self.browse(cr, uid, ids, context=context):
def write(self, cr, uid, ids, vals, context=None): """Overrides orm write method """ if not context: context={} res = super(account_invoice_line, self).write(cr, uid, ids, vals, context=context) member_line_obj = self.pool.get('membership.membership_line') for line in self.browse(cr, uid, ids): if line.invoice_id.type == 'out_invoice': ml_ids = member_line_obj.search(cr, uid, [('account_invoice_line','=',line.id)]) if line.product_id and line.product_id.membership and not ml_ids: # Product line has changed to a membership product date_from = line.product_id.membership_date_from date_to = line.product_id.membership_date_to if line.invoice_id.date_invoice > date_from and line.invoice_id.date_invoice < date_to: date_from = line.invoice_id.date_invoice line_id = member_line_obj.create(cr, uid, { 'partner': line.invoice_id.partner_id.id, 'membership_id': line.product_id.id, 'member_price': line.price_unit, 'date': time.strftime('%Y-%m-%d'), 'date_from': date_from, 'date_to': date_to, 'account_invoice_line': line.id, }) if line.product_id and not line.product_id.membership and ml_ids: # Product line has changed to a non membership product member_line_obj.unlink(cr, uid, ml_ids, context=context) return res
2a4c1e50cb967d4599507ed63424b4f85c7753ea /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/2a4c1e50cb967d4599507ed63424b4f85c7753ea/membership.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 5773, 16, 819, 33, 7036, 4672, 3536, 13084, 13969, 1045, 707, 3536, 309, 486, 819, 30, 819, 12938, 400, 273, 2240, 12, 4631, 67, 16119...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 5773, 16, 819, 33, 7036, 4672, 3536, 13084, 13969, 1045, 707, 3536, 309, 486, 819, 30, 819, 12938, 400, 273, 2240, 12, 4631, 67, 16119...
md5data = bb.utils.md5_file(ud.localpath) sha256data = bb.utils.sha256_file(ud.localpath)
def verify_checksum(u, ud, d): """ verify the MD5 and SHA256 checksum for downloaded src return value: - True: checksum matched - False: checksum unmatched if checksum is missing in recipes file, "BB_STRICT_CHECKSUM" decide the return value. if BB_STRICT_CHECKSUM = "1" then return false as unmatched, otherwise return true as matched """ if not ud.type in ["http", "https", "ftp", "ftps"]: return if (ud.md5_expected == None or ud.sha256_expected == None): bb.warn("Missing SRC_URI checksum for %s, consider to add\n" \ "SRC_URI[%s] = \"%s\"\nSRC_URI[%s] = \"%s\"" \ % (ud.localpath, ud.md5_name, md5data, ud.sha256_name, sha256data)) if bb.data.getVar("BB_STRICT_CHECKSUM", d, True) == "1": raise FetchError("No checksum specified for %s." % u) return md5data = bb.utils.md5_file(ud.localpath) sha256data = bb.utils.sha256_file(ud.localpath) if (ud.md5_expected != md5data or ud.sha256_expected != sha256data): bb.error("The checksums for '%s' did not match." % ud.localpath) bb.error("Expected MD5: '%s' and Got: '%s'" % (ud.md5_expected, md5data)) bb.error("Expected SHA256: '%s' and Got: '%s'" % (ud.sha256_expected, sha256data)) raise FetchError("%s checksum mismatch." % u)
3bda5b1301df902e86619527b9bae4b9dc9af35b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8123/3bda5b1301df902e86619527b9bae4b9dc9af35b/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3929, 67, 15149, 12, 89, 16, 23969, 16, 302, 4672, 3536, 3929, 326, 10852, 25, 471, 9777, 5034, 6697, 364, 13549, 1705, 225, 327, 460, 30, 300, 1053, 30, 6697, 4847, 300, 1083, 30, 669...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3929, 67, 15149, 12, 89, 16, 23969, 16, 302, 4672, 3536, 3929, 326, 10852, 25, 471, 9777, 5034, 6697, 364, 13549, 1705, 225, 327, 460, 30, 300, 1053, 30, 6697, 4847, 300, 1083, 30, 669...
self.add_var_opt("--output-path",output)
self.add_var_opt("output-path",output)
def __init__(self,dag,job,cp,time_range,tag='start'): pipeline.CondorDAGNode.__init__(self,job) self.add_var_arg("--" + tag + "-run") self.add_var_opt("log-name",time_range.replace(",","_")+".log") outputString = "omega/" + stfu_pipe.science_run(int(time_range.split(",")[0])).upper() + "/background" if cp.has_option('fu-output','output-dir') and cp.get('fu-output','output-dir'): output = cp.get('fu-output','output-dir') + '/' + outputString else: output = outputString self.add_var_opt("--output-path",output)
53d10acfe78e970818527d4425dd3106b4a7287e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5758/53d10acfe78e970818527d4425dd3106b4a7287e/wscan_background.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 30204, 16, 4688, 16, 4057, 16, 957, 67, 3676, 16, 2692, 2218, 1937, 11, 4672, 5873, 18, 12441, 280, 40, 1781, 907, 16186, 2738, 972, 12, 2890, 16, 4688, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 30204, 16, 4688, 16, 4057, 16, 957, 67, 3676, 16, 2692, 2218, 1937, 11, 4672, 5873, 18, 12441, 280, 40, 1781, 907, 16186, 2738, 972, 12, 2890, 16, 4688, ...
while classstack and \ classstack[-1][1] >= thisindent: del classstack[-1]
def readmodule_ex(module, path=[], inpackage=None): '''Read a module file and return a dictionary of classes. Search for MODULE in PATH and sys.path, read and parse the module and return a dictionary with one entry for each class found in the module. If INPACKAGE is true, it must be the dotted name of the package in which we are searching for a submodule, and then PATH must be the package search path; otherwise, we are searching for a top-level module, and PATH is combined with sys.path. ''' # Compute the full module name (prepending inpackage if set) if inpackage: fullmodule = "%s.%s" % (inpackage, module) else: fullmodule = module # Check in the cache if fullmodule in _modules: return _modules[fullmodule] # Initialize the dict for this module's contents dict = {} # Check if it is a built-in module; we don't do much for these if module in sys.builtin_module_names and not inpackage: _modules[module] = dict return dict # Check for a dotted module name i = module.rfind('.') if i >= 0: package = module[:i] submodule = module[i+1:] parent = readmodule_ex(package, path, inpackage) if inpackage: package = "%s.%s" % (inpackage, package) return readmodule_ex(submodule, parent['__path__'], package) # Search the path for the module f = None if inpackage: f, file, (suff, mode, type) = imp.find_module(module, path) else: f, file, (suff, mode, type) = imp.find_module(module, path + sys.path) if type == imp.PKG_DIRECTORY: dict['__path__'] = [file] path = [file] + path f, file, (suff, mode, type) = imp.find_module('__init__', [file]) _modules[fullmodule] = dict if type != imp.PY_SOURCE: # not Python source, can't do anything with this module f.close() return dict classstack = [] # stack of (class, indent) pairs g = tokenize.generate_tokens(f.readline) try: for tokentype, token, start, end, line in g: if token == 'def': lineno, thisindent = start tokentype, meth_name, start, end, line = g.next() if tokentype != NAME: continue # Syntax error # close all classes indented at least as much while classstack and \ classstack[-1][1] >= thisindent: del classstack[-1] if classstack: # it's a class method cur_class = classstack[-1][0] cur_class._addmethod(meth_name, lineno) else: # it's a function dict[meth_name] = Function(module, meth_name, file, lineno) elif token == 'class': lineno, thisindent = start tokentype, class_name, start, end, line = g.next() if tokentype != NAME: continue # Syntax error # close all classes indented at least as much while classstack and \ classstack[-1][1] >= thisindent: del classstack[-1] # parse what follows the class name tokentype, token, start, end, line = g.next() inherit = None if token == '(': names = [] # List of superclasses # there's a list of superclasses level = 1 super = [] # Tokens making up current superclass while True: tokentype, token, start, end, line = g.next() if token in (')', ',') and level == 1: n = "".join(super) if n in dict: # we know this super class n = dict[n] else: c = n.split('.') if len(c) > 1: # super class is of the form # module.class: look in module for # class m = c[-2] c = c[-1] if m in _modules: d = _modules[m] if c in d: n = d[c] names.append(n) if token == '(': level += 1 elif token == ')': level -= 1 if level == 0: break elif token == ',' and level == 1: pass else: super.append(token) inherit = names cur_class = Class(module, class_name, inherit, file, lineno) dict[class_name] = cur_class classstack.append((cur_class, thisindent)) elif token == 'import' and start[1] == 0: modules = _getnamelist(g) for mod, mod2 in modules: try: # Recursively read the imported module if not inpackage: readmodule_ex(mod, path) else: try: readmodule_ex(mod, path, inpackage) except ImportError: readmodule_ex(mod) except: # If we can't find or parse the imported module, # too bad -- don't die here. pass elif token == 'from' and start[1] == 0: mod, token = _getname(g) if not mod or token != "import": continue names = _getnamelist(g) try: # Recursively read the imported module d = readmodule_ex(mod, path, inpackage) except: # If we can't find or parse the imported module, # too bad -- don't die here. continue # add any classes that were defined in the imported module # to our name space if they were mentioned in the list for n, n2 in names: if n in d: dict[n2 or n] = d[n] elif n == '*': # only add a name if not already there (to mimic # what Python does internally) also don't add # names that start with _ for n in d: if n[0] != '_' and not n in dict: dict[n] = d[n] except StopIteration: pass f.close() return dict
2b8200b51961eb9d362ebd1b3649bc1732ccc1cc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/2b8200b51961eb9d362ebd1b3649bc1732ccc1cc/pyclbr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 2978, 67, 338, 12, 2978, 16, 589, 22850, 6487, 316, 5610, 33, 7036, 4672, 9163, 1994, 279, 1605, 585, 471, 327, 279, 3880, 434, 3318, 18, 225, 5167, 364, 14057, 316, 7767, 471, 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, 855, 2978, 67, 338, 12, 2978, 16, 589, 22850, 6487, 316, 5610, 33, 7036, 4672, 9163, 1994, 279, 1605, 585, 471, 327, 279, 3880, 434, 3318, 18, 225, 5167, 364, 14057, 316, 7767, 471, 25...
archive.writepy(os.path.join(ad, name))
archive.writepy(os.path.join(ad, name).encode())
def createzip(cr, uid, moduleid, context, b64enc=True, src=True): pool = pooler.get_pool(cr.dbname) module_obj = pool.get('ir.module.module') module = module_obj.browse(cr, uid, moduleid) if module.state != 'installed': raise wizard.except_wizard(_('Error'), _('Can not export module that is not installed!')) ad = tools.config['addons_path'] name = str(module.name) if os.path.isdir(os.path.join(ad, name)): archname = StringIO.StringIO('wb') archive = PyZipFile(archname, "w", ZIP_DEFLATED) archive.writepy(os.path.join(ad, name)) _zippy(archive, ad, name, src=src) archive.close() val =archname.getvalue() archname.close() elif os.path.isfile(os.path.join(ad, name + '.zip')): val = file(os.path.join(ad, name + '.zip'), 'rb').read() else: raise wizard.except_wizard(_('Error'), _('Could not find the module to export!')) if b64enc: val =base64.encodestring(val) return {'module_file':val, 'module_filename': name + '-' + \ (module.installed_version or '0') + '.zip'}
b6c69c83a22483659703f95b61c4ba4e544fd735 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7397/b6c69c83a22483659703f95b61c4ba4e544fd735/module_zip.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 4450, 12, 3353, 16, 4555, 16, 1605, 350, 16, 819, 16, 324, 1105, 1331, 33, 5510, 16, 1705, 33, 5510, 4672, 2845, 273, 2845, 264, 18, 588, 67, 6011, 12, 3353, 18, 20979, 13, 1605...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4450, 12, 3353, 16, 4555, 16, 1605, 350, 16, 819, 16, 324, 1105, 1331, 33, 5510, 16, 1705, 33, 5510, 4672, 2845, 273, 2845, 264, 18, 588, 67, 6011, 12, 3353, 18, 20979, 13, 1605...
prompt()
_prompt()
def ev_read(self, worker): if self.shell_worker is None: task = task_self() buf = worker.last_read() if len(buf) > 0: self.shell_worker = task.shell(buf, nodes=self.nodes, handler=self.shell_eh) else: prompt()
e4098373e5716f8e9470cb371a433c13b3d73ade /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11479/e4098373e5716f8e9470cb371a433c13b3d73ade/clush.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2113, 67, 896, 12, 2890, 16, 4322, 4672, 309, 365, 18, 10304, 67, 10124, 353, 599, 30, 1562, 273, 1562, 67, 2890, 1435, 1681, 273, 4322, 18, 2722, 67, 896, 1435, 309, 562, 12, 4385, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2113, 67, 896, 12, 2890, 16, 4322, 4672, 309, 365, 18, 10304, 67, 10124, 353, 599, 30, 1562, 273, 1562, 67, 2890, 1435, 1681, 273, 4322, 18, 2722, 67, 896, 1435, 309, 562, 12, 4385, ...
forwards += DELETE_UNIQUE_SNIPPET % (
forwards = DELETE_UNIQUE_SNIPPET % (
new_def = triples_to_defs(app, model, { field_name: new_triple,
db4b60b70d21b1300e659e30e85d13bf29a312ca /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/13142/db4b60b70d21b1300e659e30e85d13bf29a312ca/startmigration.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 394, 67, 536, 273, 22388, 67, 869, 67, 12537, 12, 2910, 16, 938, 16, 288, 652, 67, 529, 30, 394, 67, 313, 2444, 16, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 394, 67, 536, 273, 22388, 67, 869, 67, 12537, 12, 2910, 16, 938, 16, 288, 652, 67, 529, 30, 394, 67, 313, 2444, 16, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
self.out = []
self.push_output_collector([])
def visit_footer(self, node): self.out = [] self.out.append(r'\newcommand{\DUfooter}{')
6d0e673df8a8a162ea831fe884be17ae4ef52a46 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5620/6d0e673df8a8a162ea831fe884be17ae4ef52a46/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3757, 67, 14723, 12, 2890, 16, 756, 4672, 365, 18, 6206, 67, 2844, 67, 21356, 3816, 5717, 365, 18, 659, 18, 6923, 12, 86, 8314, 2704, 3076, 23241, 16214, 14723, 8637, 6134, 2, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3757, 67, 14723, 12, 2890, 16, 756, 4672, 365, 18, 6206, 67, 2844, 67, 21356, 3816, 5717, 365, 18, 659, 18, 6923, 12, 86, 8314, 2704, 3076, 23241, 16214, 14723, 8637, 6134, 2, -100, -1...
consec = 0 for j in xrange(length): discard = discards[i - j] if j >= 8 and discard == 1: break if discard == 2: consec = 0 discards[i - j] = 0 elif discard == 0: consec = 0 else: consec += 1 if consec == 3: break
scan_run(discards, i, length, lambda x,y: x - y) i += 1
def check_discard_runs(data, discards): for i in xrange(data.length): # Cancel the provisional discards that are not in the middle # of a run of discards if discards[i] == 2: discards[i] = 0 elif discards[i] != 0: # We found a provisional discard provisional = 0
97543e17e72ffa73040dbf9d8592f08aa6cf12c3 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1600/97543e17e72ffa73040dbf9d8592f08aa6cf12c3/myersdiff.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 31992, 67, 20152, 12, 892, 16, 10388, 87, 4672, 364, 277, 316, 12314, 12, 892, 18, 2469, 4672, 468, 10347, 326, 10595, 287, 10388, 87, 716, 854, 486, 316, 326, 7689, 468, 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, 866, 67, 31992, 67, 20152, 12, 892, 16, 10388, 87, 4672, 364, 277, 316, 12314, 12, 892, 18, 2469, 4672, 468, 10347, 326, 10595, 287, 10388, 87, 716, 854, 486, 316, 326, 7689, 468, 434,...
toPackage = self._getPreviousCommonPackage(fromPackage, parts, packages)
toPackage = self._getPreviousCommonPackage1(fromPackage, parts, packages)
def _optimizePackages(self, packages, parts, variants, minPackageSize, minPackageSizeForUnshared): # Support for merging small packages # The first common package before the selected package between two # or more parts is allowed to merge with. As the package which should be merged # may have requirements, these must be solved. The easiest way to be sure regarding # this issue, is to look out for another common package. (TODO: ???)
9b71a1bc2ecaa995197d4d9b0d6f24c3f6d13bfc /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5718/9b71a1bc2ecaa995197d4d9b0d6f24c3f6d13bfc/PartBuilder.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 29155, 11425, 12, 2890, 16, 5907, 16, 2140, 16, 12935, 16, 1131, 2261, 1225, 16, 1131, 2261, 1225, 1290, 984, 11574, 4672, 468, 13619, 364, 17256, 5264, 5907, 468, 1021, 1122, 2975, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 29155, 11425, 12, 2890, 16, 5907, 16, 2140, 16, 12935, 16, 1131, 2261, 1225, 16, 1131, 2261, 1225, 1290, 984, 11574, 4672, 468, 13619, 364, 17256, 5264, 5907, 468, 1021, 1122, 2975, ...
if 'id=\'wpTextbox2\' name="wpTextbox2"' in data:
if 'id=\'wpTextbox2\' name="wpTextbox2"' in data and deleted == True:
def _putPage(self, text, comment=None, watchArticle=False, minorEdit=True, newPage=False, token=None, newToken=False, sysop=False): """Upload 'text' as new content of Page by filling out the edit form.
e209aca4a97685700a9613125cf0216fca9e1b79 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4404/e209aca4a97685700a9613125cf0216fca9e1b79/wikipedia.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 458, 1964, 12, 2890, 16, 977, 16, 2879, 33, 7036, 16, 4267, 7880, 33, 8381, 16, 8439, 4666, 33, 5510, 16, 394, 1964, 33, 8381, 16, 1147, 33, 7036, 16, 394, 1345, 33, 8381, 16, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 458, 1964, 12, 2890, 16, 977, 16, 2879, 33, 7036, 16, 4267, 7880, 33, 8381, 16, 8439, 4666, 33, 5510, 16, 394, 1964, 33, 8381, 16, 1147, 33, 7036, 16, 394, 1345, 33, 8381, 16, ...
if default_value.shape != shape:
def __init__(self, default_value=None, dtype = None, shape = None, iotype=None, desc=None, units=None, **metadata): # Determine default_value if unspecified if default_value is None: if shape is None or len(shape) == 1: default_value = array([]) elif len(shape) == 2: default_value = array([[]]) elif len(shape) == 3: default_value = array([[[]]]) elif isinstance(default_value, ndarray): pass elif isinstance(default_value, list): default_value = array(default_value) else: raise TraitError("Default value should be a numpy array, " "not a %s." % type(default_value)) # Put iotype in the metadata dictionary if iotype is not None: metadata['iotype'] = iotype # Put desc in the metadata dictionary if desc is not None: metadata['desc'] = desc # Put units in the metadata dictionary if units is not None: metadata['units'] = units # Since there are units, test them by creating a physical quantity try: pq = PhysicalQuantity(0., metadata['units']) except: raise TraitError("Units of '%s' are invalid" % metadata['units']) # Put shape in the metadata dictionary if shape is not None: metadata['shape'] = shape # Make sure default matches the shape. if len(shape) != len(default_value.shape): if default_value.shape != shape: raise TraitError("Shape of the default value does not match " "the shape attribute.") for i, sh in enumerate(shape): if sh is not None and sh != default_value.shape[i]: raise TraitError("Shape of the default value does not match " "the shape attribute.") super(Array, self).__init__(dtype=dtype, value=default_value, **metadata)
a17cb6d13c8964d8d79d56a70739f8ed280ad9b3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12610/a17cb6d13c8964d8d79d56a70739f8ed280ad9b3/array.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 805, 67, 1132, 33, 7036, 16, 3182, 273, 599, 16, 2179, 273, 599, 16, 277, 10570, 33, 7036, 16, 3044, 33, 7036, 16, 4971, 33, 7036, 16, 2826, 4165, 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, 1, 1, 1, 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, 805, 67, 1132, 33, 7036, 16, 3182, 273, 599, 16, 2179, 273, 599, 16, 277, 10570, 33, 7036, 16, 3044, 33, 7036, 16, 4971, 33, 7036, 16, 2826, 4165, 4672...
self.update_tag(sender, tag.get_name()) def update_tag_task_deleted(self, sender, task_id):
self._update_tag_from_name(tag.get_name()) def on_task_deleted(self, sender, task_id):
def update_tag_task_added(self, sender, task_id): ''' This method handles the adding of tasks, updating the "All task" entry in the tag pane and the "No tags" ''' self._update_tag_from_name(self.req.get_alltag_tag().get_name()) self._update_tag_from_name(self.req.get_notag_tag().get_name()) task = self.req.get_task(task_id) for tag in task.get_tags(): self.update_tag(sender, tag.get_name())
2f000587cf1f61e4600cf231c42fe3ceba3cd9bb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8234/2f000587cf1f61e4600cf231c42fe3ceba3cd9bb/tagtree.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 67, 2692, 67, 4146, 67, 9665, 12, 2890, 16, 5793, 16, 1562, 67, 350, 4672, 9163, 1220, 707, 7372, 326, 6534, 434, 4592, 16, 9702, 326, 315, 1595, 1562, 6, 1241, 316, 326, 1047, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 67, 2692, 67, 4146, 67, 9665, 12, 2890, 16, 5793, 16, 1562, 67, 350, 4672, 9163, 1220, 707, 7372, 326, 6534, 434, 4592, 16, 9702, 326, 315, 1595, 1562, 6, 1241, 316, 326, 1047, ...
def usage():
if not len( args ) == 1:
def usage(): Script.showHelp() DIRAC.exit( 2 )
d5df96f1261e8e728fe0a271a2a6579e08934814 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/d5df96f1261e8e728fe0a271a2a6579e08934814/dirac-admin-bdii-sa.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 309, 486, 562, 12, 833, 262, 422, 404, 30, 7739, 18, 4500, 6696, 1435, 18544, 2226, 18, 8593, 12, 576, 262, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 309, 486, 562, 12, 833, 262, 422, 404, 30, 7739, 18, 4500, 6696, 1435, 18544, 2226, 18, 8593, 12, 576, 262, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
self.format = GeomVertexFormat.getV3c4t2 ( )
if (self.texture != None): self.format = GeomVertexFormat.getV3c4t2 ( ) else: self.format = GeomVertexFormat.getV3c4 ( )
def begin_geometry (self):
10bf727190481397d5bd662ac1f8804a7eff101d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8543/10bf727190481397d5bd662ac1f8804a7eff101d/MotionTrail.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2376, 67, 14330, 261, 2890, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2376, 67, 14330, 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, -...
print "bug_2: attempt to push non-glname", name
pass
def finish(): """ Finish sorting -- objects recorded since"start" will be sorted and invoked now. If there's no CSDL, we're in all-in-one-display-list mode, which is still a big speedup over plain immediate-mode drawing. """ if not ColorSorter.sorting: return # Plain immediate-mode, nothing to do.
6f041112ba4de8118d3a2db741224101ee581f4e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11221/6f041112ba4de8118d3a2db741224101ee581f4e/ColorSorter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4076, 13332, 3536, 18560, 9602, 1493, 2184, 16421, 3241, 6, 1937, 6, 903, 506, 3115, 471, 8187, 2037, 18, 225, 971, 1915, 1807, 1158, 6761, 8914, 16, 732, 4565, 316, 777, 17, 267, 17, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4076, 13332, 3536, 18560, 9602, 1493, 2184, 16421, 3241, 6, 1937, 6, 903, 506, 3115, 471, 8187, 2037, 18, 225, 971, 1915, 1807, 1158, 6761, 8914, 16, 732, 4565, 316, 777, 17, 267, 17, ...
msg = '|%s|-[%s] ===>> ' % (draggedObject.getLabel(), pstr) if currentPort[0] == 0: pstr = currentGlyph.moduleInstance.get_input_descriptions()[ currentPort[1]]
from_descr = '|%s|-[%s]' % (draggedObject.getLabel(), pstr) from_port = True same_port = draggedObject == glyph and \ draggedObject.draggedPort[0] == port_inout and \ draggedObject.draggedPort[1] == port_idx if port_inout == 0: pstr = glyph.moduleInstance.get_input_descriptions()[ port_idx]
def update_port_info_statusbar(self, glyph, port_inout, port_idx): """You can only call this during motion IN a port of a glyph. """ msg = '' canvas = self.canvas
afadac5e2e0310d8179849fbe61d4597bc6d87ec /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4494/afadac5e2e0310d8179849fbe61d4597bc6d87ec/graph_editor.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 67, 655, 67, 1376, 67, 2327, 3215, 12, 2890, 16, 9440, 16, 1756, 67, 267, 659, 16, 1756, 67, 3465, 4672, 225, 3536, 6225, 848, 1338, 745, 333, 4982, 21188, 2120, 279, 1756, 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, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 67, 655, 67, 1376, 67, 2327, 3215, 12, 2890, 16, 9440, 16, 1756, 67, 267, 659, 16, 1756, 67, 3465, 4672, 225, 3536, 6225, 848, 1338, 745, 333, 4982, 21188, 2120, 279, 1756, 434, ...
'ANY', 50, False)
[self._time_to_str()], 50, False)
def add(self): result = tvserver.favorites.add(self.title, self.channels, self.days, 'ANY', 50, False) if isinstance(result, kaa.notifier.InProgress): yield result result = result() if result != tvserver.favorites.SUCCESS: text = _('Adding favorite Failed')+(': %s' % result) else: text = _('"%s" has been scheduled as favorite') % self.title MessageWindow(text).show() self.get_menustack().delete_submenu()
f84299bf4016a71b790e8f41a165a70dc888d227 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11399/f84299bf4016a71b790e8f41a165a70dc888d227/favorite.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 12, 2890, 4672, 563, 273, 13521, 3567, 18, 19731, 280, 2997, 18, 1289, 12, 2890, 18, 2649, 16, 365, 18, 9114, 16, 365, 18, 9810, 16, 306, 2890, 6315, 957, 67, 869, 67, 701, 1435...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 12, 2890, 4672, 563, 273, 13521, 3567, 18, 19731, 280, 2997, 18, 1289, 12, 2890, 18, 2649, 16, 365, 18, 9114, 16, 365, 18, 9810, 16, 306, 2890, 6315, 957, 67, 869, 67, 701, 1435...
etree.SubElement(root, 'manifest:file-entry', attrib={
SubElement(root, 'manifest:file-entry', attrib={
def create_manifest(self): root = etree.Element('manifest:manifest', attrib=MANIFEST_NAMESPACE_DICT) doc = etree.ElementTree(root) etree.SubElement(root, 'manifest:file-entry', attrib={ 'manifest:media-type': 'application/vnd.oasis.opendocument.text', 'manifest:full-path': '/', }) etree.SubElement(root, 'manifest:file-entry', attrib={ 'manifest:media-type': 'text/xml', 'manifest:full-path': 'content.xml', }) etree.SubElement(root, 'manifest:file-entry', attrib={ 'manifest:media-type': 'text/xml', 'manifest:full-path': 'styles.xml', }) etree.SubElement(root, 'manifest:file-entry', attrib={ 'manifest:media-type': 'text/xml', 'manifest:full-path': 'meta.xml', }) s1 = etree.tostring(doc) doc = minidom.parseString(s1) s1 = doc.toprettyxml(' ') return s1
57ceb741b8ea9b94d9b9e314a03912d12bd3c5c5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1278/57ceb741b8ea9b94d9b9e314a03912d12bd3c5c5/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 14357, 12, 2890, 4672, 1365, 273, 12031, 18, 1046, 2668, 14357, 30, 14357, 2187, 5885, 33, 9560, 30050, 67, 11368, 67, 31456, 13, 997, 273, 12031, 18, 1046, 2471, 12, 3085, 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, 752, 67, 14357, 12, 2890, 4672, 1365, 273, 12031, 18, 1046, 2668, 14357, 30, 14357, 2187, 5885, 33, 9560, 30050, 67, 11368, 67, 31456, 13, 997, 273, 12031, 18, 1046, 2471, 12, 3085, 13, ...
def profile(self, val=None): if val is None:
def profile(self, val=UNDEFINED): if val is UNDEFINED:
def profile(self, val=None): if val is None: if not exists(self.path.profile.stamp): return None
cc8f4b7879c964af4c9c3e9adf42893b1c3a187f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10616/cc8f4b7879c964af4c9c3e9adf42893b1c3a187f/registry.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3042, 12, 2890, 16, 1244, 33, 2124, 15544, 4672, 309, 1244, 353, 21919, 30, 309, 486, 1704, 12, 2890, 18, 803, 18, 5040, 18, 14317, 4672, 327, 599, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3042, 12, 2890, 16, 1244, 33, 2124, 15544, 4672, 309, 1244, 353, 21919, 30, 309, 486, 1704, 12, 2890, 18, 803, 18, 5040, 18, 14317, 4672, 327, 599, 2, -100, -100, -100, -100, -100, -10...
self.assert_((self.t.int[6,1:self.embed.n+1] == 0).all())
self.assert_((self.t.int[6,1:self.embed.n] == 0).all()) self.assert_((self.t.int[6,self.clash_ind] == 0).all())
def test_term_index(self): # Final int column is term index self.assert_((self.t.int[6,1:self.embed.n+1] == 0).all())
49a0154539fccd5751664e8bc0d6fb470334493d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8914/49a0154539fccd5751664e8bc0d6fb470334493d/test_cluster.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 6408, 67, 1615, 12, 2890, 4672, 468, 16269, 509, 1057, 353, 2481, 770, 365, 18, 11231, 67, 12443, 2890, 18, 88, 18, 474, 63, 26, 16, 21, 30, 2890, 18, 8483, 18, 82, 15, 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, 1842, 67, 6408, 67, 1615, 12, 2890, 4672, 468, 16269, 509, 1057, 353, 2481, 770, 365, 18, 11231, 67, 12443, 2890, 18, 88, 18, 474, 63, 26, 16, 21, 30, 2890, 18, 8483, 18, 82, 15, 2...
def gettermbase(self):
def gettermbase(self, make_matcher):
def gettermbase(self): """returns this project's terminology store""" if self.isterminologyproject(): if len(self.non_db_state.pofiles) > 0: for termfile in self.non_db_state.pofiles.values(): termfile.pofreshen() return self else: termfilename = "pootle-terminology."+self.fileext if termfilename in self.non_db_state.pofiles: termfile = self.getpofile(termfilename, freshen=True) return termfile return None
427d64bb9fd3de0451356553247e71a46cc68061 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11388/427d64bb9fd3de0451356553247e71a46cc68061/translation_project.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7060, 1627, 448, 12, 2890, 16, 1221, 67, 22761, 4672, 3536, 6154, 333, 1984, 1807, 16122, 4676, 1707, 8395, 309, 365, 18, 376, 1035, 267, 4676, 4406, 13332, 309, 562, 12, 2890, 18, 5836,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7060, 1627, 448, 12, 2890, 16, 1221, 67, 22761, 4672, 3536, 6154, 333, 1984, 1807, 16122, 4676, 1707, 8395, 309, 365, 18, 376, 1035, 267, 4676, 4406, 13332, 309, 562, 12, 2890, 18, 5836,...