rem
stringlengths
1
226k
add
stringlengths
0
227k
context
stringlengths
6
326k
meta
stringlengths
143
403
input_ids
listlengths
256
256
attention_mask
listlengths
256
256
labels
listlengths
128
128
if server.headers.has_key('Transfer-Encoding'): tenc = server.headers['Transfer-Encoding'] if tenc != 'chunked': wc.log.warn(wc.LOG_PROXY, "unknown transfer encoding %r, assuming chunked encoding", tenc) server.decoders.append(UnchunkStream.UnchunkStream(server)) server.encoders.append(ChunkStream.ChunkStream(server)) if server.headers.has_key("Content-Length"): wc.log.warn(wc.LOG_PROXY, 'chunked encoding should not have Content-Length') to_remove.add("Content-Length") bytes_remaining = None elif rewrite: server.headers['Transfer-Encoding'] = "chunked\r" if server.headers.has_key("Content-Length"): to_remove.add("Content-Length") server.encoders.append(ChunkStream.ChunkStream(server))
def server_set_encoding_headers (server, filename=None): """ Set encoding headers. """ rewrite = server.is_rewrite() bytes_remaining = get_content_length(server.headers) to_remove = sets.Set() # remove content length if rewrite: to_remove.add('Content-Length') # add decoders if server.headers.has_key('Transfer-Encoding'): # chunked encoded tenc = server.headers['Transfer-Encoding'] if tenc != 'chunked': wc.log.warn(wc.LOG_PROXY, "unknown transfer encoding %r, assuming chunked encoding", tenc) server.decoders.append(UnchunkStream.UnchunkStream(server)) server.encoders.append(ChunkStream.ChunkStream(server)) if server.headers.has_key("Content-Length"): wc.log.warn(wc.LOG_PROXY, 'chunked encoding should not have Content-Length') to_remove.add("Content-Length") bytes_remaining = None elif rewrite: # To make pipelining possible, enable chunked encoding. server.headers['Transfer-Encoding'] = "chunked\r" if server.headers.has_key("Content-Length"): to_remove.add("Content-Length") server.encoders.append(ChunkStream.ChunkStream(server)) remove_headers(server.headers, to_remove) # only decompress on rewrite if not rewrite: return bytes_remaining # Compressed content (uncompress only for rewriting modules) encoding = server.headers.get('Content-Encoding', '').lower() # note: do not gunzip .gz files if encoding in ('gzip', 'x-gzip', 'deflate') and \ (filename is None or not filename.endswith(".gz")): if encoding == 'deflate': server.decoders.append(DeflateStream.DeflateStream()) else: server.decoders.append(GunzipStream.GunzipStream()) # remove encoding because we unzip the stream to_remove = ['Content-Encoding'] # remove no-transform cache control if server.headers.get('Cache-Control', '').lower() == 'no-transform': to_remove.append('Cache-Control') remove_headers(server.headers, to_remove) # add warning server.headers['Warning'] = "214 Transformation applied\r" elif encoding and encoding!='identity': wc.log.warn(wc.LOG_PROXY, _("unsupported encoding: %r"), encoding) # do not disable filtering for unknown content-encodings # this could result in a DoS attack (server sending garbage # as content-encoding) if not server.headers.has_key('Content-Length'): server.headers['Connection'] = 'close\r' return bytes_remaining
1d0b4dde3d21f983a9244c939ccb80fd5778999a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3948/1d0b4dde3d21f983a9244c939ccb80fd5778999a/Headers.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1438, 67, 542, 67, 5999, 67, 2485, 261, 3567, 16, 1544, 33, 7036, 4672, 3536, 1000, 2688, 1607, 18, 3536, 10738, 273, 1438, 18, 291, 67, 21489, 1435, 1731, 67, 17956, 273, 336, 67, 174...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1438, 67, 542, 67, 5999, 67, 2485, 261, 3567, 16, 1544, 33, 7036, 4672, 3536, 1000, 2688, 1607, 18, 3536, 10738, 273, 1438, 18, 291, 67, 21489, 1435, 1731, 67, 17956, 273, 336, 67, 174...
self.modification_date = self.bobobase_modification_time()
self.modification_date = DateTime()
def setModificationDate(self, modification_date=None): """ Set the date when the resource was last modified. When called without an argument, sets the date to now. """ if modification_date is None: # XXX which one is more correct ? #self.modification_date = DateTime() self.modification_date = self.bobobase_modification_time() else: self.modification_date = self._datify(modification_date)
fce9430ef053a7a1c3d94b47480ec89a0bb969d4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1843/fce9430ef053a7a1c3d94b47480ec89a0bb969d4/DublinCore.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 13467, 1626, 12, 2890, 16, 11544, 67, 712, 33, 7036, 4672, 3536, 1000, 326, 1509, 1347, 326, 1058, 1703, 1142, 4358, 18, 5203, 2566, 2887, 392, 1237, 16, 1678, 326, 1509, 358, 2037,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 13467, 1626, 12, 2890, 16, 11544, 67, 712, 33, 7036, 4672, 3536, 1000, 326, 1509, 1347, 326, 1058, 1703, 1142, 4358, 18, 5203, 2566, 2887, 392, 1237, 16, 1678, 326, 1509, 358, 2037,...
value = self.__getattribute__(key, nd=True)
value = self.__getattribute__(key)
def get_values(self, include=None, exclude=None, **kwargs):
00f2896afc3ae1d700b80723794a5b433977d24a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2510/00f2896afc3ae1d700b80723794a5b433977d24a/main.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 2372, 12, 2890, 16, 2341, 33, 7036, 16, 4433, 33, 7036, 16, 2826, 4333, 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...
[ 1, 1, 1, 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, 336, 67, 2372, 12, 2890, 16, 2341, 33, 7036, 16, 4433, 33, 7036, 16, 2826, 4333, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
replace('\x00', '@at[]').\ replace('\x01', '@lb[]').\ replace('\x02', '@rb[]')
replace('\x00', '@%sZat[]' % commandprefix).\ replace('\x01', '@%sZlb[]' % commandprefix).\ replace('\x02', '@%sZrb[]' % commandprefix)
def escape_tex(text): return text.replace('@', '\x00'). \ replace('[', '\x01'). \ replace(']', '\x02'). \ replace('\x00', '@at[]').\ replace('\x01', '@lb[]').\ replace('\x02', '@rb[]')
75c7886b2006dc435fe9aadbf6639884d02648b0 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2885/75c7886b2006dc435fe9aadbf6639884d02648b0/latex.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4114, 67, 21763, 12, 955, 4672, 327, 977, 18, 2079, 2668, 36, 2187, 2337, 92, 713, 16063, 565, 521, 1453, 2668, 63, 2187, 2337, 92, 1611, 16063, 565, 521, 1453, 2668, 65, 2187, 2337, 9...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4114, 67, 21763, 12, 955, 4672, 327, 977, 18, 2079, 2668, 36, 2187, 2337, 92, 713, 16063, 565, 521, 1453, 2668, 63, 2187, 2337, 92, 1611, 16063, 565, 521, 1453, 2668, 65, 2187, 2337, 9...
return self.tk.call(tuple(args))
return str(self.tk.call(tuple(args)))
def search(self, pattern, index, stopindex=None, forwards=None, backwards=None, exact=None, regexp=None, nocase=None, count=None, elide=None): """Search PATTERN beginning from INDEX until STOPINDEX. Return the index of the first character of a match or an empty string.""" args = [self._w, 'search'] if forwards: args.append('-forwards') if backwards: args.append('-backwards') if exact: args.append('-exact') if regexp: args.append('-regexp') if nocase: args.append('-nocase') if elide: args.append('-elide') if count: args.append('-count'); args.append(count) if pattern and pattern[0] == '-': args.append('--') args.append(pattern) args.append(index) if stopindex: args.append(stopindex) return self.tk.call(tuple(args))
6d6c1fd04e2d7c8edd945c826b69da41e592db4c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8546/6d6c1fd04e2d7c8edd945c826b69da41e592db4c/Tkinter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1623, 12, 2890, 16, 1936, 16, 770, 16, 2132, 1615, 33, 7036, 16, 24578, 33, 7036, 16, 12727, 33, 7036, 16, 5565, 33, 7036, 16, 7195, 33, 7036, 16, 30601, 448, 33, 7036, 16, 1056, 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, 1623, 12, 2890, 16, 1936, 16, 770, 16, 2132, 1615, 33, 7036, 16, 24578, 33, 7036, 16, 12727, 33, 7036, 16, 5565, 33, 7036, 16, 7195, 33, 7036, 16, 30601, 448, 33, 7036, 16, 1056, 33,...
Jacobian of the modular curve associated to the congruence subgroup Gamma0(37)
Abelian variety J0(37) of dimension 2
def is_subvariety(self, other): """ Return True if self is a subvariety of other.
83d03c9b2d797a52ad4e3f2fe47728d1f93f64bc /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/83d03c9b2d797a52ad4e3f2fe47728d1f93f64bc/abvar.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 67, 1717, 4093, 14369, 12, 2890, 16, 1308, 4672, 3536, 2000, 1053, 309, 365, 353, 279, 720, 4093, 14369, 434, 1308, 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, 67, 1717, 4093, 14369, 12, 2890, 16, 1308, 4672, 3536, 2000, 1053, 309, 365, 353, 279, 720, 4093, 14369, 434, 1308, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
@param paths: The loaded path @type paths: string
@param path: The loaded path @type path: string
def __init__(self, caller, event, path, revisions=[]): """ @param caller: The calling object @type caller: object @param base_dir: The curent working directory @type base_dir: string @param paths: The loaded path @type paths: string @param revisions: The selected revisions @type revisions: list of rabbitvcs.vcs.Revision object """ self.caller = caller self.event = event self.path = path self.revisions = revisions self.vcs_client = rabbitvcs.vcs.create_vcs_instance()
c7939b81d6a06876f00ea3bed9e951f592b1d448 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5119/c7939b81d6a06876f00ea3bed9e951f592b1d448/log.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 4894, 16, 871, 16, 589, 16, 18325, 33, 8526, 4672, 3536, 632, 891, 225, 4894, 30, 1021, 4440, 733, 632, 723, 282, 4894, 30, 733, 225, 632, 891, 225, 10...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4894, 16, 871, 16, 589, 16, 18325, 33, 8526, 4672, 3536, 632, 891, 225, 4894, 30, 1021, 4440, 733, 632, 723, 282, 4894, 30, 733, 225, 632, 891, 225, 10...
def qmake_expression(pattern, tag_format = "%s"): pat = make_pattern(pattern, tag_format) return Martel.Re(pat)
def make_expression(pattern, tag_format = "%s"): return _parse_time(pattern, tag_format, text_to_result = Martel.Str, group_to_result = Martel.Group, re_to_result = Martel.Re, t = Martel.NullOp())
b9f3f23192144bd795fb24bb5a522f108cb23a69 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7167/b9f3f23192144bd795fb24bb5a522f108cb23a69/Time.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 67, 8692, 12, 4951, 16, 1047, 67, 2139, 273, 2213, 87, 6, 4672, 327, 389, 2670, 67, 957, 12, 4951, 16, 1047, 67, 2139, 16, 977, 67, 869, 67, 2088, 273, 490, 485, 292, 18, 158...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 67, 8692, 12, 4951, 16, 1047, 67, 2139, 273, 2213, 87, 6, 4672, 327, 389, 2670, 67, 957, 12, 4951, 16, 1047, 67, 2139, 16, 977, 67, 869, 67, 2088, 273, 490, 485, 292, 18, 158...
draw.text((2,2), "w=%i" % (self.getChannels()[i].getEmissionWave()), font=font, fill="
draw.text((2,2), "w=%s" % (str(self.getChannels()[i].getEmissionWave())), font=font, fill="
def renderSplitChannelImage (self, z, t, compression=0.9, border=2): """ Prepares a PIL Image with a 2d grid holding a render of each channel, along with one for all channels at the set Z and T points. @param z: @param t: @param compression: @param border: @return: canvas """ dims = self.splitChannelDims(border=border)[self.isGreyscaleRenderingModel() and 'g' or 'c'] canvas = Image.new('RGBA', (dims['width'], dims['height']), '#fff') cmap = [ch.isActive() and i+1 or 0 for i,ch in enumerate(self.getChannels())] c = self.c_count() pxc = 0 px = dims['border'] py = dims['border'] # Font sizes depends on image width w = self.getWidth() if w >= 640: fsize = (int((w-640)/128)*8) + 24 if fsize > 64: fsize = 64 elif w >= 512: fsize = 24 elif w >= 384: #pragma: no cover fsize = 18 elif w >= 298: #pragma: no cover fsize = 14 elif w >= 256: #pragma: no cover fsize = 12 elif w >= 213: #pragma: no cover fsize = 10 elif w >= 96: #pragma: no cover fsize = 8 else: #pragma: no cover fsize = 0 if fsize > 0: font = ImageFont.load('%s/pilfonts/B%0.2d.pil' % (THISPATH, fsize) )
4e0302d4905794e2e55de85d4b7c60fa5fee7c8e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12409/4e0302d4905794e2e55de85d4b7c60fa5fee7c8e/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 5521, 2909, 2040, 261, 2890, 16, 998, 16, 268, 16, 9154, 33, 20, 18, 29, 16, 5795, 33, 22, 4672, 3536, 2962, 84, 4807, 279, 29407, 3421, 598, 279, 576, 72, 3068, 19918, 279, 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, 1743, 5521, 2909, 2040, 261, 2890, 16, 998, 16, 268, 16, 9154, 33, 20, 18, 29, 16, 5795, 33, 22, 4672, 3536, 2962, 84, 4807, 279, 29407, 3421, 598, 279, 576, 72, 3068, 19918, 279, 17...
Subgroup of Mordell Weil group: [[1:-1:1], [-2:3:1], [-14:25:8]]
Subgroup of Mordell-Weil group: [[1:-1:1], [-2:3:1], [-14:25:8]]
def rank(self): """ Return the rank of this subgroup of the Mordell-Weil group.
9932a677a12413086a59217c4c0d425b0543b6eb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9417/9932a677a12413086a59217c4c0d425b0543b6eb/interface.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6171, 12, 2890, 4672, 3536, 2000, 326, 6171, 434, 333, 720, 1655, 434, 326, 490, 517, 1165, 17, 3218, 330, 1041, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6171, 12, 2890, 4672, 3536, 2000, 326, 6171, 434, 333, 720, 1655, 434, 326, 490, 517, 1165, 17, 3218, 330, 1041, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
Here is a curve with two-torsion, so here the algorithm gives bounds on the rank::
Here is a curve with two-torsion, so here the algorithm does not uniquely determine the rank::
def gens(self,verbose=0, lim1=5, lim3=50, limtriv=10, maxprob=20, limbigprime=30): r""" Returns some generators of this elliptic curve. Check rank or rank_bound to verify the number of generators.
01eaacce3f9905c68fca1a1aea0780ff588fba83 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/01eaacce3f9905c68fca1a1aea0780ff588fba83/ell_number_field.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 314, 773, 12, 2890, 16, 11369, 33, 20, 16, 20167, 21, 33, 25, 16, 20167, 23, 33, 3361, 16, 20167, 313, 427, 33, 2163, 16, 943, 7748, 33, 3462, 16, 20167, 14002, 16382, 33, 5082, 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, 314, 773, 12, 2890, 16, 11369, 33, 20, 16, 20167, 21, 33, 25, 16, 20167, 23, 33, 3361, 16, 20167, 313, 427, 33, 2163, 16, 943, 7748, 33, 3462, 16, 20167, 14002, 16382, 33, 5082, 4672...
if __debug__: print "colorizing stopped"
if DEBUG: print "colorizing stopped"
def recolorize_main(self): next = "1.0" while 1: item = self.tag_nextrange("TODO", next) if not item: break head, tail = item self.tag_remove("SYNC", head, tail) item = self.tag_prevrange("SYNC", head) if item: head = item[1] else: head = "1.0"
3cc1250f168209f3333e4f60e71f65efb1e8f18b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/3cc1250f168209f3333e4f60e71f65efb1e8f18b/ColorDelegator.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 283, 3266, 554, 67, 5254, 12, 2890, 4672, 1024, 273, 315, 21, 18, 20, 6, 1323, 404, 30, 761, 273, 365, 18, 2692, 67, 82, 14523, 726, 2932, 6241, 3113, 1024, 13, 309, 486, 761, 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, 283, 3266, 554, 67, 5254, 12, 2890, 4672, 1024, 273, 315, 21, 18, 20, 6, 1323, 404, 30, 761, 273, 365, 18, 2692, 67, 82, 14523, 726, 2932, 6241, 3113, 1024, 13, 309, 486, 761, 30, ...
self._action(self._bscw_interface.destroyClipboard,
self._action(self._bscw_interface.destroyClipboard,
def _destroyClipboardSlot(self): try: user = [] for i in self._user_list.getSelection(): user.append(i["name"]) outdated = QtGui.QInputDialog.getInteger(self, self.trUtf8("Mindestalter angeben"), self.trUtf8("Mindestalter der zu " \ "löschenden Dateien (in Tagen):"), 5, 0) if outdated[1]: self._lockWidget(True, self.trUtf8("Zwischenablagen werden " \ "aufgeräumt ...")) self._action(self._bscw_interface.destroyClipboard, self._unlockWidget, outdated[0], user) except Exception, exception: # Fehlerdialog anzeigen err_dialog = ErrorDialog(exception, self) err_dialog.exec_()
264364269a301ec6020404f8aff8dc3b8f01916d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4919/264364269a301ec6020404f8aff8dc3b8f01916d/MainWindow.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 11662, 15339, 3752, 8764, 12, 2890, 4672, 775, 30, 729, 273, 5378, 225, 364, 277, 316, 365, 6315, 1355, 67, 1098, 18, 588, 6233, 13332, 729, 18, 6923, 12, 77, 9614, 529, 6, 5717, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 11662, 15339, 3752, 8764, 12, 2890, 4672, 775, 30, 729, 273, 5378, 225, 364, 277, 316, 365, 6315, 1355, 67, 1098, 18, 588, 6233, 13332, 729, 18, 6923, 12, 77, 9614, 529, 6, 5717, ...
raise
raise if os.path.isfile(VERSION_FILE): old_version = file_read(VERSION_FILE) if old_version != __version__: file_write(VERSION_FILE, __version__) d = xbmcgui.Dialog() d.ok('Welcome to BBC IPlayer plugin', 'Please be aware this plugin only works in the UK.', 'The IPlayer service checks to ensure UK IP addresses.') if is_old_xbmc(): show_version_warning()
def listen_live(label='', url=None): if not url: return txt = iplayer.httpget(url) # some of the the urls passed in are .asx. These are text files with multiple mss stream hrefs stream = re.compile('href\="(mms.*?)"', re.IGNORECASE) match = stream.search(txt) stream_url = None if match: stream_url = match.group(1) else: # pass it to xbmc and see if it is directly supported stream_url = url listitem = xbmcgui.ListItem(label=label, label2=label) if thumbnail: listitem.setThumbnailImage(thumbnail) play=xbmc.PlayList(xbmc.PLAYLIST_MUSIC) play.clear() play.add(stream_url,listitem) player = xbmc.Player(xbmc.PLAYER_CORE_AUTO) player.play(play)
91eb953b7cba4fc0e3bb609c31fac6af847c4613 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4862/91eb953b7cba4fc0e3bb609c31fac6af847c4613/default.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6514, 67, 16472, 12, 1925, 2218, 2187, 880, 33, 7036, 4672, 225, 309, 486, 880, 30, 327, 225, 6463, 273, 277, 14872, 18, 2505, 588, 12, 718, 13, 225, 468, 2690, 434, 326, 326, 6903, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6514, 67, 16472, 12, 1925, 2218, 2187, 880, 33, 7036, 4672, 225, 309, 486, 880, 30, 327, 225, 6463, 273, 277, 14872, 18, 2505, 588, 12, 718, 13, 225, 468, 2690, 434, 326, 326, 6903, ...
for x in mypkgs: if mycatpkg[1]==x:
if not installcache.has_key(mykey): return 0 for x in installcache[mykey]: if x[0]==mycatpkg:
def isinstalled(mycatpkg): mycatpkg=string.split(mycatpkg,"/") if not os.path.isdir(root+"var/db/pkg/"+mycatpkg[0]): return 0 mypkgs=os.listdir(root+"var/db/pkg/"+mycatpkg[0]) if isjustname(mycatpkg[1]): # only name specified for x in mypkgs: thispkgname=pkgsplit(x)[0] if mycatpkg[1]==thispkgname: return 1 else: # name and version specified for x in mypkgs: if mycatpkg[1]==x: return 1 return 0
7fba891e9345142f3f79275004cc9a6e99cc73b8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9957/7fba891e9345142f3f79275004cc9a6e99cc73b8/portage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 13435, 12, 4811, 2574, 10657, 4672, 3399, 2574, 10657, 33, 1080, 18, 4939, 12, 4811, 2574, 10657, 10837, 4898, 13, 309, 486, 1140, 18, 803, 18, 291, 1214, 12, 3085, 9078, 1401, 19, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 13435, 12, 4811, 2574, 10657, 4672, 3399, 2574, 10657, 33, 1080, 18, 4939, 12, 4811, 2574, 10657, 10837, 4898, 13, 309, 486, 1140, 18, 803, 18, 291, 1214, 12, 3085, 9078, 1401, 19, ...
def __init__(data = None)
def __init__(data = None):
def __init__(data = None) if data == None: quickfix.CharField.__init__(self, 139) else quickfix.CharField.__init__(self, 139, data)
484890147d4b23aac4b9d0e85e84fceab7e137c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8819/484890147d4b23aac4b9d0e85e84fceab7e137c3/quickfix_fields.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 892, 273, 599, 4672, 309, 501, 422, 599, 30, 9549, 904, 18, 2156, 974, 16186, 2738, 972, 12, 2890, 16, 404, 5520, 13, 469, 9549, 904, 18, 2156, 974, 16186, 2738, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 892, 273, 599, 4672, 309, 501, 422, 599, 30, 9549, 904, 18, 2156, 974, 16186, 2738, 972, 12, 2890, 16, 404, 5520, 13, 469, 9549, 904, 18, 2156, 974, 16186, 2738, ...
for m, subj in msgs:
for m, subj, ds in msgs:
def getaddrs(opt, prpt=None, default=None): addrs = opts.get(opt.replace('-', '_')) if addrs: return mail.addrlistencode(ui, addrs, _charsets, opts.get('test'))
9da6032086f09e0116442acbe6e7d1fe447e0b5e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11312/9da6032086f09e0116442acbe6e7d1fe447e0b5e/patchbomb.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 23305, 12, 3838, 16, 846, 337, 33, 7036, 16, 805, 33, 7036, 4672, 11755, 273, 1500, 18, 588, 12, 3838, 18, 2079, 2668, 17, 2187, 4427, 3719, 309, 11755, 30, 327, 4791, 18, 4793, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 336, 23305, 12, 3838, 16, 846, 337, 33, 7036, 16, 805, 33, 7036, 4672, 11755, 273, 1500, 18, 588, 12, 3838, 18, 2079, 2668, 17, 2187, 4427, 3719, 309, 11755, 30, 327, 4791, 18, 4793, ...
alltests = findtests(testdir, stdtests, nottests) for i in range(len(alltests)): if tests[0] == alltests[i]: if i == len(alltests) - 1: os.unlink(filename) else: fp = open(filename, 'w') fp.write(alltests[i+1] + '\n') fp.close() break
if next_single_test: with open(filename, 'w') as fp: fp.write(next_single_test + '\n')
def work(): # A worker thread. try: while True: try: test, args_tuple = next(pending) except StopIteration: output.put((None, None, None, None)) return # -E is needed by some tests, e.g. test_import popen = Popen([sys.executable, '-E', '-m', 'test.regrtest', '--slaveargs', json.dumps(args_tuple)], stdout=PIPE, stderr=PIPE, universal_newlines=True, close_fds=True) stdout, stderr = popen.communicate() # Strip last refcount output line if it exists, since it # comes from the shutdown of the interpreter in the subcommand. stderr = debug_output_pat.sub("", stderr) stdout, _, result = stdout.strip().rpartition("\n") if not result: output.put((None, None, None, None)) return result = json.loads(result) if not quiet: stdout = test+'\n'+stdout output.put((test, stdout.rstrip(), stderr.rstrip(), result)) except BaseException: output.put((None, None, None, None)) raise
c34258ce21d27fa3a09a638abc1088a10dad6167 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12029/c34258ce21d27fa3a09a638abc1088a10dad6167/regrtest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1440, 13332, 468, 432, 4322, 2650, 18, 775, 30, 1323, 1053, 30, 775, 30, 1842, 16, 833, 67, 8052, 273, 1024, 12, 9561, 13, 1335, 16179, 30, 876, 18, 458, 12443, 7036, 16, 599, 16, 59...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1440, 13332, 468, 432, 4322, 2650, 18, 775, 30, 1323, 1053, 30, 775, 30, 1842, 16, 833, 67, 8052, 273, 1024, 12, 9561, 13, 1335, 16179, 30, 876, 18, 458, 12443, 7036, 16, 599, 16, 59...
except:
except ValueError:
def _an_element_impl(self): """ Returns an arbitrary element of a free module.
7f8f223f948e12c9172b086452a98d24651686d8 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/7f8f223f948e12c9172b086452a98d24651686d8/free_module.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 304, 67, 2956, 67, 11299, 12, 2890, 4672, 3536, 2860, 392, 11078, 930, 434, 279, 4843, 1605, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 304, 67, 2956, 67, 11299, 12, 2890, 4672, 3536, 2860, 392, 11078, 930, 434, 279, 4843, 1605, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
defn = first['definition'].firstChild.data
if self.include_function_definition: defn = first['definition'].firstChild.data else: defn = ""
compdef = tmp.getElementsByTagName('compounddef')[0]
5406ea81f76a42a2764112ef6fe5ea7842c15201 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1130/5406ea81f76a42a2764112ef6fe5ea7842c15201/doxy2swig.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1161, 536, 273, 1853, 18, 588, 3471, 10401, 2668, 22585, 536, 6134, 63, 20, 65, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1161, 536, 273, 1853, 18, 588, 3471, 10401, 2668, 22585, 536, 6134, 63, 20, 65, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
if not first_line.startswith(TRANSLATION_TAGLINE):
if not first_line.startswith(ENCODING_STRING) or not second_line.startswith(TRANSLATION_TAGLINE):
def _translation_is_needed(repyfilename, generatedfile): """ Checks if generatedfile needs to be regenerated. Does several checks to decide if generating generatedfilename based on repyfilename is a good idea. --does file already exist? --was it automatically generated? --was it generated from the same source file? --was the original modified since the last translation? """ if not os.path.isfile(repyfilename): raise TranslationError("no such file:", repyfilename) if not os.path.isfile(generatedfile): return True #Read the first line try: fh = open(generatedfile, "r") first_line = fh.readline().rstrip() current_line = '' for line in fh: current_line = line last_line = current_line fh.close() except IOError, e: raise TranslationError("Error opening old generated file: " + generatedfile + ": " + str(e)) #Check to see if the file was generated by repyhelper, to prevent #clobbering a file that we didn't create if not first_line.startswith(TRANSLATION_TAGLINE): raise TranslationError("File name exists but wasn't automatically generated: " + generatedfile) if not last_line.startswith(TRANSLATION_TAGLINE): # The file generation wasn't completed... I think this means we should # silently regenerate (#617) return True #Check to see if the generated file has the same original source old_translation_path = first_line[len(TRANSLATION_TAGLINE):].strip() generated_abs_path = os.path.abspath(repyfilename) if old_translation_path != generated_abs_path: #It doesn't match, but the other file was also a translation! Regen then... return True #If we get here and modification time of orig is older than gen, this is still #a valid generation repystat = os.stat(repyfilename) genstat = os.stat(generatedfile) if repystat.st_mtime < genstat.st_mtime: return False return True
dd857b0ca7a3f124c09028c818f789778f6039d3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7263/dd857b0ca7a3f124c09028c818f789778f6039d3/repyhelper.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 10173, 67, 291, 67, 17471, 12, 266, 2074, 3459, 16, 4374, 768, 4672, 3536, 13074, 309, 4374, 768, 4260, 358, 506, 960, 7489, 18, 9637, 11392, 4271, 358, 16288, 309, 12516, 4374, 345...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 10173, 67, 291, 67, 17471, 12, 266, 2074, 3459, 16, 4374, 768, 4672, 3536, 13074, 309, 4374, 768, 4260, 358, 506, 960, 7489, 18, 9637, 11392, 4271, 358, 16288, 309, 12516, 4374, 345...
self.GetParent ().GetParent ().switchSplittingMode ()
self.getFrame ().switchSplittingMode ()
def switchSplittingMode (self): self.GetParent ().GetParent ().switchSplittingMode ()
c77a99f1e1d289d91f9bcbf2b7c6c8e572e3ab89 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9028/c77a99f1e1d289d91f9bcbf2b7c6c8e572e3ab89/candy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1620, 5521, 1787, 2309, 261, 2890, 4672, 365, 18, 967, 3054, 1832, 18, 967, 3054, 1832, 18, 9610, 5521, 1787, 2309, 1832, 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, 1620, 5521, 1787, 2309, 261, 2890, 4672, 365, 18, 967, 3054, 1832, 18, 967, 3054, 1832, 18, 9610, 5521, 1787, 2309, 1832, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
fields = ['interest','description']
fields = ['description','interest']
def save_m2m(): for form in self.saved_forms: form.save_m2m()
4ba23e3fb2e1c1114c633021d43400ad511afffe /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12441/4ba23e3fb2e1c1114c633021d43400ad511afffe/trds_forms.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1923, 67, 81, 22, 81, 13332, 364, 646, 316, 365, 18, 14077, 67, 9741, 30, 646, 18, 5688, 67, 81, 22, 81, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1923, 67, 81, 22, 81, 13332, 364, 646, 316, 365, 18, 14077, 67, 9741, 30, 646, 18, 5688, 67, 81, 22, 81, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
Output array of integers.
Output array of ints.
def rindex(a, sub, start=0, end=None): """ Like `rfind`, but raises `ValueError` when the substring `sub` is not found. Calls `str.rindex` element-wise. Parameters ---------- a : array-like of str or unicode sub : str or unicode start, end : int, optional Returns ------- out : ndarray Output array of integers. See also -------- rfind, str.rindex """ return _vec_string( a, integer, 'rindex', [sub, start] + _clean_args(end))
05324d0e986a1012a342e2650b3883e13a285029 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/14925/05324d0e986a1012a342e2650b3883e13a285029/defchararray.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 436, 1615, 12, 69, 16, 720, 16, 787, 33, 20, 16, 679, 33, 7036, 4672, 3536, 23078, 1375, 86, 4720, 9191, 1496, 14183, 1375, 23610, 68, 1347, 326, 3019, 1375, 1717, 68, 353, 486, 1392, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 436, 1615, 12, 69, 16, 720, 16, 787, 33, 20, 16, 679, 33, 7036, 4672, 3536, 23078, 1375, 86, 4720, 9191, 1496, 14183, 1375, 23610, 68, 1347, 326, 3019, 1375, 1717, 68, 353, 486, 1392, ...
fastsync - Don't wait for the sync to complete, just start one and move on. This is for cases where rebooting prompty is more important than data integrity and/or the machine may have disks that cause sync to never return.
def reboot(self, timeout=DEFAULT_REBOOT_TIMEOUT, label=LAST_BOOT_TAG, kernel_args=None, wait=True, fastsync=False, **dargs): """ Reboot the remote host.
4e8ff94992313dfa3d29b62c8111ce235ccb698c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12268/4e8ff94992313dfa3d29b62c8111ce235ccb698c/remote.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 22852, 12, 2890, 16, 2021, 33, 5280, 67, 862, 30124, 67, 9503, 16, 1433, 33, 14378, 67, 30124, 67, 7927, 16, 5536, 67, 1968, 33, 7036, 16, 2529, 33, 5510, 16, 4797, 8389, 33, 8381, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 22852, 12, 2890, 16, 2021, 33, 5280, 67, 862, 30124, 67, 9503, 16, 1433, 33, 14378, 67, 30124, 67, 7927, 16, 5536, 67, 1968, 33, 7036, 16, 2529, 33, 5510, 16, 4797, 8389, 33, 8381, 1...
n = len(prefix)
def forget_prefix(prefix): """Remove all pathnames with a given prefix.""" n = len(prefix) for path in cache.keys(): if path[:n] == prefix: del cache[path]
c5ad71f1ae1b114b5d8aef77121988e50a13a9d1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/c5ad71f1ae1b114b5d8aef77121988e50a13a9d1/statcache.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13776, 67, 3239, 12, 3239, 4672, 3536, 3288, 777, 589, 1973, 598, 279, 864, 1633, 12123, 364, 589, 316, 1247, 18, 2452, 13332, 309, 589, 10531, 82, 65, 422, 1633, 30, 1464, 1247, 63, 8...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 13776, 67, 3239, 12, 3239, 4672, 3536, 3288, 777, 589, 1973, 598, 279, 864, 1633, 12123, 364, 589, 316, 1247, 18, 2452, 13332, 309, 589, 10531, 82, 65, 422, 1633, 30, 1464, 1247, 63, 8...
if self.debug > 1: print atoms.get_positions()
def __init__(self, nc='out.nc', outnc=None, debug=0, stay_alive=False, **kwargs): ''' Initialize the Jacapo calculator
efb0053a692e68241ce5b5d3e00d105383545b1a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5572/efb0053a692e68241ce5b5d3e00d105383545b1a/jacapo.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 8194, 2218, 659, 18, 14202, 2187, 596, 14202, 33, 7036, 16, 1198, 33, 20, 16, 23449, 67, 11462, 33, 8381, 16, 2826, 4333, 4672, 9163, 9190, 326, 804, 107...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1001, 2738, 972, 12, 2890, 16, 8194, 2218, 659, 18, 14202, 2187, 596, 14202, 33, 7036, 16, 1198, 33, 20, 16, 23449, 67, 11462, 33, 8381, 16, 2826, 4333, 4672, 9163, 9190, 326, 804, 107...
from FieldTypes import IMAGE
from qFieldTypes import IMAGE
def do_delete(self, item): from FieldTypes import IMAGE from glob import glob for field_name, field_type in item.stream.itemExtFields.items(): if isinstance(field_type, IMAGE): image = getattr(item, field_name) for old_path in glob(image.pattern+'.*'): os.remove(old_path)
de8abbdcabc61b09140c0d70e2f106849bdfcec6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1871/de8abbdcabc61b09140c0d70e2f106849bdfcec6/qMake.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 3733, 12, 2890, 16, 761, 4672, 628, 1043, 974, 2016, 1930, 10757, 628, 4715, 1930, 4715, 364, 652, 67, 529, 16, 652, 67, 723, 316, 761, 18, 3256, 18, 1726, 2482, 2314, 18, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 3733, 12, 2890, 16, 761, 4672, 628, 1043, 974, 2016, 1930, 10757, 628, 4715, 1930, 4715, 364, 652, 67, 529, 16, 652, 67, 723, 316, 761, 18, 3256, 18, 1726, 2482, 2314, 18, 3...
if not season == None and 'season' in tablenames:
if season != None and 'season' in tablenames:
def getTitleId(self, title, subtitle=None, season=None, episode=None, array=False): """ Finds the MythVideo metadata id for the given Title from the MythDB, if any. Searches can be more specific if additional fields are supplied. If array is True return an array of intid's for the record(s) matching the search criteria. Without the array option a search with multiple matches will return a random result if more than one match was found. Non-array return results are only supported for backward compatibilty with older scripts. Returns None if no metadata was found. """ tablenames = self.getTableFieldNames('videometadata')
cbd031af868a22b20efa5009641d2f15a4d893ba /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/13713/cbd031af868a22b20efa5009641d2f15a4d893ba/MythVideo.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10786, 548, 12, 2890, 16, 2077, 16, 20281, 33, 7036, 16, 15874, 33, 7036, 16, 17054, 33, 7036, 16, 526, 33, 8381, 4672, 3536, 4163, 87, 326, 8005, 451, 10083, 1982, 612, 364, 326, 864,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10786, 548, 12, 2890, 16, 2077, 16, 20281, 33, 7036, 16, 15874, 33, 7036, 16, 17054, 33, 7036, 16, 526, 33, 8381, 4672, 3536, 4163, 87, 326, 8005, 451, 10083, 1982, 612, 364, 326, 864,...
name = Column(Unicode(128), nullable=False)
name = Column(Unicode(128), nullable=False)
def __repr__(self): return u"<Factoid %s = %s>" % (', '.join([name.name for name in self.names]), ', '.join([value.value for value in self.values]))
8f4d852c7533668d2254e086d7d79ac39c9fdac1 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12048/8f4d852c7533668d2254e086d7d79ac39c9fdac1/factoid.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 12715, 972, 12, 2890, 4672, 327, 582, 6, 32, 9766, 839, 738, 87, 273, 738, 87, 2984, 738, 261, 2187, 2418, 5701, 3816, 529, 18, 529, 364, 508, 316, 365, 18, 1973, 65, 3631, 226...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 12715, 972, 12, 2890, 4672, 327, 582, 6, 32, 9766, 839, 738, 87, 273, 738, 87, 2984, 738, 261, 2187, 2418, 5701, 3816, 529, 18, 529, 364, 508, 316, 365, 18, 1973, 65, 3631, 226...
def __getattr__(self, attr): """Allow UPPERCASE variants of all following IMAP4 commands.""" if Commands.has_key(attr): return eval("self.%s" % string.lower(attr)) raise AttributeError("Unknown IMAP4 command: '%s'" % attr)
def recent(self): """Return most recent 'RECENT' responses if any exist, else prompt server for an update using the 'NOOP' command. (typ, [data]) = <instance>.recent() 'data' is None if no new messages, else list of RECENT responses, most recent last. """ name = 'RECENT' typ, dat = self._untagged_response('OK', [None], name) if dat[-1]: return typ, dat typ, dat = self.noop() return self._untagged_response(typ, dat, name) def response(self, code): """Return data for response 'code' if received, or None. Old value for response 'code' is cleared. (code, [data]) = <instance>.response(code) """ return self._untagged_response(code, [None], string.upper(code)) def socket(self): """Return socket instance used to connect to IMAP4 server. socket = <instance>.socket() """ return self.sock
def __getattr__(self, attr): """Allow UPPERCASE variants of all following IMAP4 commands.""" if Commands.has_key(attr): return eval("self.%s" % string.lower(attr)) raise AttributeError("Unknown IMAP4 command: '%s'" % attr)
b10c0e30e74484a3863b7dcd5a9fd8e9e5849364 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/b10c0e30e74484a3863b7dcd5a9fd8e9e5849364/imaplib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 588, 1747, 972, 12, 2890, 16, 1604, 4672, 3536, 7009, 29290, 13415, 12935, 434, 777, 3751, 6246, 2203, 24, 4364, 12123, 309, 18034, 18, 5332, 67, 856, 12, 1747, 4672, 327, 5302, 29...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 588, 1747, 972, 12, 2890, 16, 1604, 4672, 3536, 7009, 29290, 13415, 12935, 434, 777, 3751, 6246, 2203, 24, 4364, 12123, 309, 18034, 18, 5332, 67, 856, 12, 1747, 4672, 327, 5302, 29...
if self.mathmlOK and tag in self.mathml_elements: if tag == 'math': self.mathmlOK = 0 elif self.svgOK and tag in self.svg_elements: tag = self.svg_elem_map.get(tag,tag) if tag == 'svg': self.svgOK = 0 else: return
return
def unknown_endtag(self, tag): if not tag in self.acceptable_elements: if tag in self.unacceptable_elements_with_end_tag: self.unacceptablestack -= 1 if self.mathmlOK and tag in self.mathml_elements: if tag == 'math': self.mathmlOK = 0 elif self.svgOK and tag in self.svg_elements: tag = self.svg_elem_map.get(tag,tag) if tag == 'svg': self.svgOK = 0 else: return _BaseHTMLProcessor.unknown_endtag(self, tag)
b46d7e4f5773873813bf0c2abf7f311d20f6ee9d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10695/b46d7e4f5773873813bf0c2abf7f311d20f6ee9d/feedparser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5917, 67, 409, 2692, 12, 2890, 16, 1047, 4672, 309, 486, 1047, 316, 365, 18, 9436, 429, 67, 6274, 30, 309, 1047, 316, 365, 18, 318, 9436, 429, 67, 6274, 67, 1918, 67, 409, 67, 2692, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5917, 67, 409, 2692, 12, 2890, 16, 1047, 4672, 309, 486, 1047, 316, 365, 18, 9436, 429, 67, 6274, 30, 309, 1047, 316, 365, 18, 318, 9436, 429, 67, 6274, 67, 1918, 67, 409, 67, 2692, ...
def __init__(self, cmap={}, inputFile=None, N_nodes=None):
def __init__(self, cmap=None, inputFile=None, N_nodes=None):
def __init__(self, cmap={}, inputFile=None, N_nodes=None): """Initialize a node partition.
c2c75f8e7416c6272a9fe1426d0234bcacc54bac /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/768/c2c75f8e7416c6272a9fe1426d0234bcacc54bac/communities.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 11136, 33, 7036, 16, 22014, 33, 7036, 16, 423, 67, 4690, 33, 7036, 4672, 3536, 7520, 279, 756, 3590, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 11136, 33, 7036, 16, 22014, 33, 7036, 16, 423, 67, 4690, 33, 7036, 4672, 3536, 7520, 279, 756, 3590, 18, 2, -100, -100, -100, -100, -100, -100, -100, -10...
txt = new_doc.createTextNode(prefix+str(line[f]) or '')
col.text = prefix+str(line[f]) or ''
def _append_node(name, text): n = new_doc.createElement(name) t = new_doc.createTextNode(text) n.appendChild(t) config.appendChild(n)
32aa89f603ce93d4388ce6f049f482862969ced9 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12853/32aa89f603ce93d4388ce6f049f482862969ced9/custom.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 6923, 67, 2159, 12, 529, 16, 977, 4672, 290, 273, 394, 67, 2434, 18, 2640, 1046, 12, 529, 13, 268, 273, 394, 67, 2434, 18, 2640, 17299, 12, 955, 13, 290, 18, 6923, 1763, 12, 8...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 6923, 67, 2159, 12, 529, 16, 977, 4672, 290, 273, 394, 67, 2434, 18, 2640, 1046, 12, 529, 13, 268, 273, 394, 67, 2434, 18, 2640, 17299, 12, 955, 13, 290, 18, 6923, 1763, 12, 8...
return self.edje.image_id_get(name)
return self.__edje.image_id_get(name)
def image_id_get(self, name): return self.edje.image_id_get(name)
54aa077f5354283d089632d8853c1ffd3783950c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12343/54aa077f5354283d089632d8853c1ffd3783950c/editable.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1316, 67, 350, 67, 588, 12, 2890, 16, 508, 4672, 327, 365, 18, 329, 78, 73, 18, 2730, 67, 350, 67, 588, 12, 529, 13, 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, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1316, 67, 350, 67, 588, 12, 2890, 16, 508, 4672, 327, 365, 18, 329, 78, 73, 18, 2730, 67, 350, 67, 588, 12, 529, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
cat_class = '('+string.join(idxsi)+')'
cat_class = '(%s)' % string.join(idxsi)
def changeit(buf, pp): global onlylatexspecial, hist, out i, length = 0, len(pp) while 1: # sanity check: length should always equal len(pp) if len(pp) != length: print i, pp[i] raise 'FATAL', 'inconsistent length. thought ' + `length` + ', but should really be ' + `len(pp)` if i >= length: break ch = pp[i] i = i + 1 if type(ch) is StringType: #normally, only chunks are present in pp, # but in some cases, some extra info # has been inserted, e.g., the \end{...} clauses raise 'FATAL', 'got string, probably too many ' + `end` if ch.chtype == chunk_type[GROUP]: # check for {\em ...} constructs data = ch.data if data and \ data[0].chtype == chunk_type[CSNAME] and \ fontchanges.has_key(s(buf, data[0].data)): k = s(buf, data[0].data) del data[0] pp.insert(i-1, chunk(CSNAME, ch.where, fontchanges[k])) length, i = length+1, i+1 elif data: if len(data) \ and data[0].chtype == chunk_type[GROUP] \ and len(data[0].data) \ and data[0].data[0].chtype == chunk_type[CSNAME] \ and s(buf, data[0].data[0].data) == 'e': data[0] = data[0].data[0] print "invoking \\e magic group transform..." else:
4f6d6e487c786d1591c0e26e671322e470bdd244 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/4f6d6e487c786d1591c0e26e671322e470bdd244/partparse.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2549, 305, 12, 4385, 16, 8228, 4672, 2552, 1338, 26264, 9371, 16, 5356, 16, 596, 225, 277, 16, 769, 273, 374, 16, 562, 12, 11858, 13, 1323, 404, 30, 468, 16267, 866, 30, 769, 1410, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2549, 305, 12, 4385, 16, 8228, 4672, 2552, 1338, 26264, 9371, 16, 5356, 16, 596, 225, 277, 16, 769, 273, 374, 16, 562, 12, 11858, 13, 1323, 404, 30, 468, 16267, 866, 30, 769, 1410, 3...
from mwlib import filequeue
from mwlib import filequeue, utils
def watch(): parser = optparse.OptionParser(usage="%prog [OPTIONS]") parser.add_option('-l', '--logfile', help='log output to LOGFILE', ) parser.add_option('-d', '--daemonize', action='store_true', help='become daemon as soon as possible', ) parser.add_option('-q', '--queue-dir', help='queue directory, where new job files are written to (default: /var/cache/mw-watch/q/)', default='/var/cache/mw-watch/q/', ) parser.add_option('-p', '--processing-dir', help='processing directory, where active job files are moved to (must be on same filesystem as --queue-dir, default: /var/cache/mw-watch/p/)', default='/var/cache/mw-watch/p/', ) parser.add_option('-n', '--num-jobs', help='maximum number of simulataneous jobs (default: 5)', default='5', ) options, args = parser.parse_args() try: options.num_jobs = int(options.num_jobs) except ValueError: parser.error('--num-jobs value must be an integer') from mwlib import filequeue if options.logfile: utils.start_logging(options.logfile) if options.daemonize: utils.daemonize() poller = filequeue.FileJobPoller( queue_dir=options.queue_dir, processing_dir=options.processing_dir, max_num_jobs=options.num_jobs, ).run_forever()
dd77942ae8515e27507a30291e1abbf0c89ff719 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12391/dd77942ae8515e27507a30291e1abbf0c89ff719/apps.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4267, 13332, 2082, 273, 2153, 2670, 18, 1895, 2678, 12, 9167, 11613, 14654, 306, 12422, 4279, 13, 2082, 18, 1289, 67, 3482, 2668, 17, 80, 2187, 3534, 28806, 2187, 2809, 2218, 1330, 876, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4267, 13332, 2082, 273, 2153, 2670, 18, 1895, 2678, 12, 9167, 11613, 14654, 306, 12422, 4279, 13, 2082, 18, 1289, 67, 3482, 2668, 17, 80, 2187, 3534, 28806, 2187, 2809, 2218, 1330, 876, ...
i. e. such that j(E) has negative valuation
i.e., such that j(E) has negative valuation
def __init__(self,E,p): """ INPUT: E -- an elliptic curve p -- a prime where E has multiplicative reduction, i. e. such that j(E) has negative valuation
0141536ffa68ec24a5809e05e1a770e212340d97 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/0141536ffa68ec24a5809e05e1a770e212340d97/ell_tate_curve.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 41, 16, 84, 4672, 3536, 12943, 30, 512, 1493, 392, 415, 549, 21507, 8882, 293, 1493, 279, 17014, 1625, 512, 711, 3309, 28884, 20176, 16, 277, 18, 425, 18...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 41, 16, 84, 4672, 3536, 12943, 30, 512, 1493, 392, 415, 549, 21507, 8882, 293, 1493, 279, 17014, 1625, 512, 711, 3309, 28884, 20176, 16, 277, 18, 425, 18...
self.tuxboatitem = self.rootitem.add( gnome.canvas.CanvasPixbuf, pixbuf = gcompris.utils.load_pixmap("gcompris/misc/tuxboat.png"), x=10.0, y=470.0 )
def start(self): self.gcomprisBoard.level=1 self.gcomprisBoard.maxlevel=1 self.gcomprisBoard.sublevel=1 self.gcomprisBoard.number_of_sublevel=1
bcfb70762e7bc11762c9be637e8a998f7a6e8596 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11306/bcfb70762e7bc11762c9be637e8a998f7a6e8596/watercycle.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 787, 12, 2890, 4672, 365, 18, 75, 832, 683, 291, 22233, 18, 2815, 33, 21, 365, 18, 75, 832, 683, 291, 22233, 18, 1896, 2815, 33, 21, 365, 18, 75, 832, 683, 291, 22233, 18, 87, 1255...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 787, 12, 2890, 4672, 365, 18, 75, 832, 683, 291, 22233, 18, 2815, 33, 21, 365, 18, 75, 832, 683, 291, 22233, 18, 1896, 2815, 33, 21, 365, 18, 75, 832, 683, 291, 22233, 18, 87, 1255...
lcgCEs = gConfig.getValue('/Resources/Sites/LCG/%s/CE' %site,[])
lcgCEs = gConfig.getValue('/Resources/Sites/LCG/%s/CE' % site,[])
def __getSiteFromCE( self, ce ): siteSections = gConfig.getSections('/Resources/Sites/LCG/') if not siteSections['OK']: self.log.error('Could not get LCG site list') return "unknown"
7f51688cabae4796b449ace06519af7b2fcc9cf0 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12864/7f51688cabae4796b449ace06519af7b2fcc9cf0/PilotStatusAgent.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 588, 4956, 1265, 1441, 12, 365, 16, 5898, 262, 30, 2834, 15965, 273, 314, 809, 18, 588, 15965, 2668, 19, 3805, 19, 17055, 19, 13394, 43, 2473, 13, 309, 486, 2834, 15965, 3292, 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, 1001, 588, 4956, 1265, 1441, 12, 365, 16, 5898, 262, 30, 2834, 15965, 273, 314, 809, 18, 588, 15965, 2668, 19, 3805, 19, 17055, 19, 13394, 43, 2473, 13, 309, 486, 2834, 15965, 3292, 31...
[pricelist], product_id, qty or 1.0, partner_id)[pricelist] return price or p_obj
[pricelist], product_id, qty or 1.0, partner_id,{'uom': uom_id})[pricelist] if price is False: raise osv.except_osv(_('No valid pricelist line found !'), _("Couldn't find a pricelist line matching this product" \ " and quantity.\nYou have to change either the product," \ " the quantity or the pricelist.")) return price
def price_by_product(self, cr, uid, ids, pricelist, product_id, qty=0, partner_id=False): if not product_id: return 0.0 if not pricelist: raise osv.except_osv(_('No Pricelist !'), _('You have to select a pricelist in the sale form !\n' \ 'Please set one before choosing a product.')) p_obj = self.pool.get('product.product').browse(cr,uid,product_id).list_price price = self.pool.get('product.pricelist').price_get(cr, uid, [pricelist], product_id, qty or 1.0, partner_id)[pricelist] # Todo need to check
6ac363ae0149da9ae401f50c3abeeefdc238815d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/6ac363ae0149da9ae401f50c3abeeefdc238815d/pos.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6205, 67, 1637, 67, 5896, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 846, 335, 5449, 16, 3017, 67, 350, 16, 26667, 33, 20, 16, 19170, 67, 350, 33, 8381, 4672, 309, 486, 3017, 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, 6205, 67, 1637, 67, 5896, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 846, 335, 5449, 16, 3017, 67, 350, 16, 26667, 33, 20, 16, 19170, 67, 350, 33, 8381, 4672, 309, 486, 3017, 67, ...
cursor.execute(sqlCommand) except MySQLdb.Error: self.conn = self.connect(invalidate = True)
cursor.execute(sqlCommand) except MySQLdb.Error: self.conn = self.connect() self.redo()
def getStatus(self): """ __getStatus__ Get the Merge Sensor status Arguments: none Return: a dictionary with the status information
f6d38da4b0910650112bd5df8a6e148fb35b760b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8887/f6d38da4b0910650112bd5df8a6e148fb35b760b/MergeSensorDB.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5870, 12, 2890, 4672, 3536, 1001, 588, 1482, 972, 225, 968, 326, 8964, 28903, 1267, 225, 13599, 30, 225, 6555, 225, 2000, 30, 225, 279, 3880, 598, 326, 1267, 1779, 2, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5870, 12, 2890, 4672, 3536, 1001, 588, 1482, 972, 225, 968, 326, 8964, 28903, 1267, 225, 13599, 30, 225, 6555, 225, 2000, 30, 225, 279, 3880, 598, 326, 1267, 1779, 2, -100, -100, -100, ...
out += """<a href="http://cdswebdev.cern.ch/search.py?recid=%s&ln=en">""" %recID
out += """<a href="%s/search.py?recid=%s&ln=en">""" % (weburl, recID)
def print_record(recID, format='hb', ot='', ln=cdslang, decompress=zlib.decompress): "Prints record 'recID' formatted accoding to 'format'." out = "" # sanity check: record_exist_p = record_exists(recID) if record_exist_p == 0: # doesn't exist return out # print record opening tags, if needed: if format == "marcxml" or format == "oai_dc": out += " <record>\n" out += " <header>\n" for id in get_fieldvalues(recID,oaiidfield): out += " <identifier>%s</identifier>\n" % id out += " <datestamp>%s</datestamp>\n" % get_modification_date(recID) out += " </header>\n" out += " <metadata>\n" if format.startswith("xm") or format == "marcxml": # look for detailed format existence: query = "SELECT value FROM bibfmt WHERE id_bibrec='%s' AND format='%s'" % (recID, format) res = run_sql(query, None, 1) if res and record_exist_p==1: # record 'recID' is formatted in 'format', so print it out += "%s" % decompress(res[0][0]) else: # record 'recID' is not formatted in 'format' -- they are not in "bibfmt" table; so fetch all the data from "bibXXx" tables: if format == "marcxml": out += """ <record xmlns="http://www.loc.gov/MARC21/slim">\n""" out += " <controlfield tag=\"001\">%d</controlfield>\n" % int(recID) elif format.startswith("xm"): out += """ <record>\n""" out += " <controlfield tag=\"001\">%d</controlfield>\n" % int(recID) if record_exist_p == -1: # deleted record, so display only OAI ID and 980: oai_ids = get_fieldvalues(recID, cfg_oaiidtag) if oai_ids: out += "<datafield tag=\"%s\" ind1=\"%s\" ind2=\"%s\"><subfield code=\"%s\">%s</subfield></datafield>\n" % \ (cfg_oaiidtag[0:3], cfg_oaiidtag[3:4], cfg_oaiidtag[4:5], cfg_oaiidtag[5:6], oai_ids[0]) out += "<datafield tag=\"980\" ind1=\"\" ind2=\"\"><subfield code=\"a\">DELETED</subfield></datafield>\n" else: for digit1 in range(0,10): for digit2 in range(0,10): bx = "bib%d%dx" % (digit1, digit2) bibx = "bibrec_bib%d%dx" % (digit1, digit2) query = "SELECT b.tag,b.value,bb.field_number FROM %s AS b, %s AS bb "\ "WHERE bb.id_bibrec='%s' AND b.id=bb.id_bibxxx AND b.tag LIKE '%s%%' "\ "ORDER BY bb.field_number, b.tag ASC" % (bx, bibx, recID, str(digit1)+str(digit2)) res = run_sql(query) field_number_old = -999 field_old = "" for row in res: field, value, field_number = row[0], row[1], row[2] ind1, ind2 = field[3], field[4] if ind1 == "_": ind1 = "" if ind2 == "_": ind2 = "" # print field tag if field_number != field_number_old or field[:-1] != field_old[:-1]: if format.startswith("xm") or format == "marcxml": fieldid = encode_for_xml(field[0:3]) if field_number_old != -999: out += """ </datafield>\n""" out += """ <datafield tag="%s" ind1="%s" ind2="%s">\n""" % \ (encode_for_xml(field[0:3]), encode_for_xml(ind1), encode_for_xml(ind2)) field_number_old = field_number field_old = field # print subfield value if format.startswith("xm") or format == "marcxml": value = encode_for_xml(value) out += """ <subfield code="%s">%s</subfield>\n""" % (encode_for_xml(field[-1:]), value) # all fields/subfields printed in this run, so close the tag: if (format.startswith("xm") or format == "marcxml") and field_number_old != -999: out += """ </datafield>\n""" # we are at the end of printing the record: if format.startswith("xm") or format == "marcxml": out += " </record>\n" elif format == "xd" or format == "oai_dc": # XML Dublin Core format, possibly OAI -- select only some bibXXx fields: out += """ <dc xmlns="http://purl.org/dc/elements/1.1/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://purl.org/dc/elements/1.1/ http://www.openarchives.org/OAI/1.1/dc.xsd">\n""" if record_exist_p == -1: out += "" else: for f in get_fieldvalues(recID, "041__a"): out += " <language>%s</language>\n" % f for f in get_fieldvalues(recID, "100__a"): out += " <creator>%s</creator>\n" % encode_for_xml(f) for f in get_fieldvalues(recID, "700__a"): out += " <creator>%s</creator>\n" % encode_for_xml(f) for f in get_fieldvalues(recID, "245__a"): out += " <title>%s</title>\n" % encode_for_xml(f) for f in get_fieldvalues(recID, "65017a"): out += " <subject>%s</subject>\n" % encode_for_xml(f) for f in get_fieldvalues(recID, "8564_u"): out += " <identifier>%s</identifier>\n" % encode_for_xml(f) for f in get_fieldvalues(recID, "520__a"): out += " <description>%s</description>\n" % encode_for_xml(f) out += " <date>%s</date>\n" % get_creation_date(recID) out += " </dc>\n" elif format.startswith("x_"): # underscore means that XML formats should be called on-the-fly; suitable for testing formats out += call_bibformat(recID, format) elif str(format[0:3]).isdigit(): # user has asked to print some fields only if format == "001": out += "<!--%s-begin-->%s<!--%s-end-->\n" % (format, recID, format) else: vals = get_fieldvalues(recID, format) for val in vals: out += "<!--%s-begin-->%s<!--%s-end-->\n" % (format, val, format) elif format.startswith('t'): ## user directly asked for some tags to be displayed only if record_exist_p == -1: out += get_fieldvalues_alephseq_like(recID, "001,%s,980" % cfg_oaiidtag) else: out += get_fieldvalues_alephseq_like(recID, ot) elif format == "hm": if record_exist_p == -1: out += "<pre>" + cgi.escape(get_fieldvalues_alephseq_like(recID, "001,%s,980" % cfg_oaiidtag)) + "</pre>" else: out += "<pre>" + cgi.escape(get_fieldvalues_alephseq_like(recID, ot)) + "</pre>" elif format.startswith("h") and ot: ## user directly asked for some tags to be displayed only if record_exist_p == -1: out += "<pre>" + get_fieldvalues_alephseq_like(recID, "001,%s,980" % cfg_oaiidtag) + "</pre>" else: out += "<pre>" + get_fieldvalues_alephseq_like(recID, ot) + "</pre>" elif format == "hd": # HTML detailed format if record_exist_p == -1: out += msg_record_deleted[ln] else: # look for detailed format existence: query = "SELECT value FROM bibfmt WHERE id_bibrec='%s' AND format='%s'" % (recID, format) res = run_sql(query, None, 1) if res: # record 'recID' is formatted in 'format', so print it out += "%s" % decompress(res[0][0]) else: # record 'recID' is not formatted in 'format', so either call BibFormat on the fly or use default format # second, see if we are calling BibFormat on the fly: if cfg_call_bibformat: out += call_bibformat(recID) else: # okay, need to construct a simple "Detailed record" format of our own: out += "<p>&nbsp;" # secondly, title: titles = get_fieldvalues(recID, "245__a") for title in titles: out += "<p><p><center><big><strong>%s</strong></big></center>" % title # thirdly, authors: authors = get_fieldvalues(recID, "100__a") + get_fieldvalues(recID, "700__a") if authors: out += "<p><p><center>" for author in authors: out += """<a href="%s/search.py?p=%s&f=author">%s</a> ;""" % (weburl, urllib.quote(author), author) out += "</center>" # fourthly, date of creation: dates = get_fieldvalues(recID, "260__c") for date in dates: out += "<p><center><small>%s</small></center>" % date # fifthly, abstract: abstracts = get_fieldvalues(recID, "520__a") for abstract in abstracts: out += """<p style="margin-left: 15%%; width: 70%%"> <small><strong>Abstract:</strong> %s</small></p>""" % abstract # fifthly bis, keywords: keywords = get_fieldvalues(recID, "6531_a") if len(keywords): out += """<p style="margin-left: 15%; width: 70%"> <small><strong>Keyword(s):</strong></small>""" for keyword in keywords: out += """<small><a href="%s/search.py?p=%s&f=keyword">%s</a> ;</small> """ % (weburl, urllib.quote(keyword), keyword) # fifthly bis bis, published in: prs_p = get_fieldvalues(recID, "909C4p") prs_v = get_fieldvalues(recID, "909C4v") prs_y = get_fieldvalues(recID, "909C4y") prs_n = get_fieldvalues(recID, "909C4n") prs_c = get_fieldvalues(recID, "909C4c") for idx in range(0,len(prs_p)): out += """<p style="margin-left: 15%%; width: 70%%"> <small><strong>Publ. in:</strong> %s""" % prs_p[idx] if prs_v and prs_v[idx]: out += """<strong>%s</strong>""" % prs_v[idx] if prs_y and prs_y[idx]: out += """(%s)""" % prs_y[idx] if prs_n and prs_n[idx]: out += """, no.%s""" % prs_n[idx] if prs_c and prs_c[idx]: out += """, p.%s""" % prs_c[idx] out += """.</small>""" # sixthly, fulltext link: urls_z = get_fieldvalues(recID, "8564_z") urls_u = get_fieldvalues(recID, "8564_u") for idx in range(0,len(urls_u)): link_text = "URL" try: if urls_z[idx]: link_text = urls_z[idx] except IndexError: pass out += """<p style="margin-left: 15%%; width: 70%%"> <small><strong>%s:</strong> <a href="%s">%s</a></small>""" % (link_text, urls_u[idx], urls_u[idx]) # print some white space at the end: out += "<p><p>" elif format.startswith("hb_") or format.startswith("hd_"): # underscore means that HTML brief/detailed formats should be called on-the-fly; suitable for testing formats if record_exist_p == -1: out += msg_record_deleted[ln] else: out += call_bibformat(recID, format) elif format.startswith("similarity"): if record_exist_p == -1: out += msg_record_deleted[ln] else: out += """<a href="http://cdswebdev.cern.ch/search.py?recid=%s&ln=en">""" %recID # firstly, title: titles = get_fieldvalues(recID, "245__a") for title in titles: out += "<strong>%s</strong> " % title # secondly, authors: authors = get_fieldvalues(recID, "100__a") + get_fieldvalues(recID, "700__a") if authors: out += "&nbsp;/" for i in range (0,cfg_author_et_al_threshold): if i < len(authors): out += authors[i] if len(authors) > cfg_author_et_al_threshold: out += " <em>et al.</em>" rec_year = get_fieldvalues(recID,'773__y') if not rec_year: rec_year = get_fieldvalues(recID, '260__c') if rec_year: out += "&nbsp;/%s"%rec_year[0] out += "</a>" else: # HTML brief format by default if record_exist_p == -1: out += msg_record_deleted[ln] else: query = "SELECT value FROM bibfmt WHERE id_bibrec='%s' AND format='%s'" % (recID, format) res = run_sql(query) if res: # record 'recID' is formatted in 'format', so print it out += "%s" % decompress(res[0][0]) else: # record 'recID' does not exist in format 'format', so print some default format: # firstly, title: titles = get_fieldvalues(recID, "245__a") for title in titles: out += "<strong>%s</strong> " % title # secondly, authors: authors = get_fieldvalues(recID, "100__a") + get_fieldvalues(recID, "700__a") if authors: out += " / " for i in range (0,cfg_author_et_al_threshold): if i < len(authors): out += """<a href="%s/search.py?p=%s&f=author">%s</a> ;""" % (weburl, urllib.quote(authors[i]), authors[i]) if len(authors) > cfg_author_et_al_threshold: out += " <em>et al.</em>" # thirdly, date of creation: dates = get_fieldvalues(recID, "260__c") for date in dates: out += " %s." % date # thirdly bis, report numbers: rns = get_fieldvalues(recID, "037__a") for rn in rns: out += """ <small class="quicknote">[%s]</small>""" % rn rns = get_fieldvalues(recID, "088__a") for rn in rns: out += """ <small class="quicknote">[%s]</small>""" % rn # fourthly, beginning of abstract: abstracts = get_fieldvalues(recID, "520__a") for abstract in abstracts: out += "<br><small>%s [...]</small>" % abstract[:1+string.find(abstract, '.')] # fifthly, fulltext link: urls_z = get_fieldvalues(recID, "8564_z") urls_u = get_fieldvalues(recID, "8564_u") for idx in range(0,len(urls_u)): out += """<br><small class="note"><a class="note" href="%s">%s</a></small>""" % (urls_u[idx], urls_u[idx]) # at the end of HTML brief mode, print the "Detailed record" functionality: if format == 'hp' or format.startswith("hb_") or format.startswith("hd_"): pass # do nothing for portfolio and on-the-fly formats else: if cfg_use_aleph_sysnos: alephsysnos = get_fieldvalues(recID, "970__a") if len(alephsysnos)>0: alephsysno = alephsysnos[0] out += """<br><span class="moreinfo"><a class="moreinfo" href="%s/search.py?sysno=%s&amp;ln=%s">%s</a></span>""" \ % (weburl, alephsysno, ln, msg_detailed_record[ln]) else: out += """<br><span class="moreinfo"><a class="moreinfo" href="%s/search.py?recid=%s&amp;ln=%s">%s</a></span>""" \ % (weburl, recID, ln, msg_detailed_record[ln]) else: out += """<br><span class="moreinfo"><a class="moreinfo" href="%s/search.py?recid=%s&amp;ln=%s">%s</a></span>""" \ % (weburl, recID, ln, msg_detailed_record[ln]) out += """<span class="moreinfo"> - <a class="moreinfo" href="%s/search.py?p=recid:%d&amp;rm=wrd&amp;ln=%s">%s</a></span>\n""" % \ (weburl, recID, ln, msg_similar_records[ln]) out += """<span class="moreinfo"> - <a class="moreinfo" href="%s/search.py?p=recid:%d&amp;rm=cit&amp;ln=%s">Cited by</a></span>\n""" % (weburl, recID, ln) # print record closing tags, if needed: if format == "marcxml" or format == "oai_dc": out += " </metadata>\n" out += " </record>\n" return out
dda932d7ad497e8f74e73b4141dcc5a712641b70 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2139/dda932d7ad497e8f74e73b4141dcc5a712641b70/search_engine.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1172, 67, 3366, 12, 3927, 734, 16, 740, 2218, 76, 70, 2187, 15835, 2218, 2187, 7211, 33, 4315, 2069, 539, 16, 16824, 33, 94, 2941, 18, 323, 14706, 4672, 315, 15402, 1409, 296, 3927, 73...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3366, 12, 3927, 734, 16, 740, 2218, 76, 70, 2187, 15835, 2218, 2187, 7211, 33, 4315, 2069, 539, 16, 16824, 33, 94, 2941, 18, 323, 14706, 4672, 315, 15402, 1409, 296, 3927, 73...
def cb_out_back(self, args):
def cb_out_back(self, *args):
def cb_out_back(self, args): if not self.ocheck(): return if not self.vout.backup(): self.err('Output buffer exhausted') self.oshow()
5d022419dc6e16dea5d9031e192610d8b3e0c749 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/5d022419dc6e16dea5d9031e192610d8b3e0c749/Vedit.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2875, 67, 659, 67, 823, 12, 2890, 16, 380, 1968, 4672, 309, 486, 365, 18, 83, 1893, 13332, 327, 309, 486, 365, 18, 90, 659, 18, 9572, 13332, 365, 18, 370, 2668, 1447, 1613, 24948, 61...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2875, 67, 659, 67, 823, 12, 2890, 16, 380, 1968, 4672, 309, 486, 365, 18, 83, 1893, 13332, 327, 309, 486, 365, 18, 90, 659, 18, 9572, 13332, 365, 18, 370, 2668, 1447, 1613, 24948, 61...
print "checking", file, "...",
print("checking", file, "...", end=' ')
def check(file): if os.path.isdir(file) and not os.path.islink(file): if verbose: print "listing directory", file names = os.listdir(file) for name in names: fullname = os.path.join(file, name) if ((recurse and os.path.isdir(fullname) and not os.path.islink(fullname)) or name.lower().endswith(".py")): check(fullname) return if verbose: print "checking", file, "...", try: f = open(file) except IOError as msg: errprint("%s: I/O Error: %s" % (file, str(msg))) return r = Reindenter(f) f.close() if r.run(): if verbose: print "changed." if dryrun: print "But this is a dry run, so leaving it alone." if not dryrun: bak = file + ".bak" if os.path.exists(bak): os.remove(bak) os.rename(file, bak) if verbose: print "renamed", file, "to", bak f = open(file, "w") r.write(f) f.close() if verbose: print "wrote new", file else: if verbose: print "unchanged."
2f30fac56992ed396f664b446bcb83b1b3e1add5 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3187/2f30fac56992ed396f664b446bcb83b1b3e1add5/reindent.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 12, 768, 4672, 309, 1140, 18, 803, 18, 291, 1214, 12, 768, 13, 471, 486, 1140, 18, 803, 18, 291, 1232, 12, 768, 4672, 309, 3988, 30, 1172, 315, 21228, 1867, 3113, 585, 1257, 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, 866, 12, 768, 4672, 309, 1140, 18, 803, 18, 291, 1214, 12, 768, 13, 471, 486, 1140, 18, 803, 18, 291, 1232, 12, 768, 4672, 309, 3988, 30, 1172, 315, 21228, 1867, 3113, 585, 1257, 273...
except ValueError, IndexError:
except (ValueError, IndexError):
def _check_duration(option, opt, value): try: if value[-1].isdigit(): return int(value) else: return int(value[:-1]) * _time_units[value[-1]] except ValueError, IndexError: raise OptionValueError( 'option %s: invalid duration: %r' % (opt, value))
71d8f6b3244c8acd09d9e5386c093f6fced2a968 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12029/71d8f6b3244c8acd09d9e5386c093f6fced2a968/test_optparse.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1893, 67, 8760, 12, 3482, 16, 2153, 16, 460, 4672, 775, 30, 309, 460, 18919, 21, 8009, 291, 11052, 13332, 327, 509, 12, 1132, 13, 469, 30, 327, 509, 12, 1132, 10531, 17, 21, 571...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1893, 67, 8760, 12, 3482, 16, 2153, 16, 460, 4672, 775, 30, 309, 460, 18919, 21, 8009, 291, 11052, 13332, 327, 509, 12, 1132, 13, 469, 30, 327, 509, 12, 1132, 10531, 17, 21, 571...
A=sb.asanyarray(A) n,ny=A.shape
def eigen(A,k=6,M=None,ncv=None,which='LM', maxiter=None,tol=0, return_eigenvectors=True): """ Return k eigenvalues and eigenvectors of the matrix A. Solves A * x[i] = w[i] * x[i], the standard eigenvalue problem for w[i] eigenvalues with corresponding eigenvectors x[i]. Inputs: A -- A matrix, array or an object with matvec(x) method to perform the matrix vector product A * x. The sparse matrix formats in scipy.sparse are appropriate for A. k -- The number of eigenvalue/eigenvectors desired M -- (Not implemented) A symmetric positive-definite matrix for the generalized eigenvalue problem A * x = w * M * x Outputs: w -- An array of k eigenvalues v -- An array of k eigenvectors, k[i] is the eigenvector corresponding to the eigenvector w[i] Optional Inputs: ncv -- Number of Lanczos vectors generated, ncv must be greater than k and is recommended to be ncv > 2*k which -- String specifying which eigenvectors to compute. Compute the k eigenvalues of: 'LM' - largest magnitude. 'SM' - smallest magnitude. 'LR' - largest real part. 'SR' - smallest real part. 'LI' - largest imaginary part. 'SI' - smallest imaginary part. maxiter -- Maximum number of Arnoldi update iterations allowed tol -- Relative accuracy for eigenvalues (stopping criterion) return_eigenvectors -- True|False, return eigenvectors """ A=sb.asanyarray(A) n,ny=A.shape try: n==ny except: raise AttributeError("matrix is not square") if M is not None: raise NotImplementedError("generalized eigenproblem not supported yet") # some defaults if ncv is None: ncv=2*k+1 ncv=min(ncv,n) if maxiter==None: maxiter=n*10 # guess type resid = sb.zeros(n,'f') try: typ = A.dtype.char except AttributeError: typ = A.matvec(resid).dtype.char if typ not in 'fdFD': raise ValueError("matrix type must be 'f', 'd', 'F', or 'D'") # some sanity checks if k <= 0: raise ValueError("k must be positive, k=%d"%k) if k == n: raise ValueError("k must be less than rank(A), k=%d"%k) if maxiter <= 0: raise ValueError("maxiter must be positive, maxiter=%d"%maxiter) whiches=['LM','SM','LR','SR','LI','SI'] if which not in whiches: raise ValueError("which must be one of %s"%' '.join(whiches)) if ncv > n or ncv < k: raise ValueError("ncv must be k<=ncv<=n, ncv=%s"%ncv) # assign solver and postprocessor ltr = _type_conv[typ] eigsolver = _arpack.__dict__[ltr+'naupd'] eigextract = _arpack.__dict__[ltr+'neupd'] matvec = get_matvec(A) v = sb.zeros((n,ncv),typ) # holds Ritz vectors resid = sb.zeros(n,typ) # residual workd = sb.zeros(3*n,typ) # workspace workl = sb.zeros(3*ncv*ncv+6*ncv,typ) # workspace iparam = sb.zeros(11,'int') # problem parameters ipntr = sb.zeros(14,'int') # pointers into workspaces info = 0 ido = 0 if typ in 'FD': rwork = sb.zeros(ncv,typ.lower()) # only supported mode is 1: Ax=lx ishfts = 1 mode1 = 1 bmat = 'I' iparam[0] = ishfts iparam[2] = maxiter iparam[6] = mode1 while True: if typ in 'fd': ido,resid,v,iparam,ipntr,info =\ eigsolver(ido,bmat,which,k,tol,resid,v,iparam,ipntr, workd,workl,info) else: ido,resid,v,iparam,ipntr,info =\ eigsolver(ido,bmat,which,k,tol,resid,v,iparam,ipntr, workd,workl,rwork,info) if (ido == -1 or ido == 1): # compute y = A * x xslice = slice(ipntr[0]-1, ipntr[0]-1+n) yslice = slice(ipntr[1]-1, ipntr[1]-1+n) workd[yslice]=matvec(workd[xslice]) else: # done break if info < -1 : raise RuntimeError("Error info=%d in arpack"%info) return None if info == -1: warnings.warn("Maximum number of iterations taken: %s"%iparam[2])
80765541cfc5e712b0a58b01d16e386f7e59e50b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12971/80765541cfc5e712b0a58b01d16e386f7e59e50b/arpack.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 16719, 12, 37, 16, 79, 33, 26, 16, 49, 33, 7036, 16, 14202, 90, 33, 7036, 16, 12784, 2218, 17063, 2187, 25743, 33, 7036, 16, 3490, 33, 20, 16, 327, 67, 22663, 29098, 33, 5510, 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, 16719, 12, 37, 16, 79, 33, 26, 16, 49, 33, 7036, 16, 14202, 90, 33, 7036, 16, 12784, 2218, 17063, 2187, 25743, 33, 7036, 16, 3490, 33, 20, 16, 327, 67, 22663, 29098, 33, 5510, 4672, ...
def unlink(self, cr, uid, ids):
def unlink(self, cr, uid, ids, context={}):
def unlink(self, cr, uid, ids): previsions = self.read(cr, uid, ids, ['state']) unlink_ids = [] for t in previsions: if t['state'] in ('draft'): unlink_ids.append(t['id']) else: raise osv.except_osv(_('Invalid action !'), _('Cannot delete Validated Sale Previsions !')) osv.osv.unlink(self, cr, uid, unlink_ids) return True
f82f905dd41bd3aa2112f354a306b4b6ba7c4047 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7339/f82f905dd41bd3aa2112f354a306b4b6ba7c4047/stock_planning.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8255, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 819, 12938, 4672, 2807, 12682, 273, 365, 18, 896, 12, 3353, 16, 4555, 16, 3258, 16, 10228, 2019, 19486, 8255, 67, 2232, 273, 5378, 364...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8255, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 819, 12938, 4672, 2807, 12682, 273, 365, 18, 896, 12, 3353, 16, 4555, 16, 3258, 16, 10228, 2019, 19486, 8255, 67, 2232, 273, 5378, 364...
JOIN coinc_event ON (
LEFT OUTER JOIN coinc_event ON (
def add_contents(self, contents): seglist = contents.seglists.intersection(self.instruments) for values in contents.connection.cursor().execute("""
039ed8d24639055f13bb6b11810eebc26ad7f408 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3592/039ed8d24639055f13bb6b11810eebc26ad7f408/SimBurstUtils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 3980, 12, 2890, 16, 2939, 4672, 2291, 1098, 273, 2939, 18, 5680, 9772, 18, 30231, 12, 2890, 18, 22818, 87, 13, 364, 924, 316, 2939, 18, 4071, 18, 9216, 7675, 8837, 2932, 3660,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 3980, 12, 2890, 16, 2939, 4672, 2291, 1098, 273, 2939, 18, 5680, 9772, 18, 30231, 12, 2890, 18, 22818, 87, 13, 364, 924, 316, 2939, 18, 4071, 18, 9216, 7675, 8837, 2932, 3660,...
style = n.vlist.get('style',None) if style:
style = n.vlist.get('style', None) if style and isinstance(style, dict):
def displayNode(self, n): """ check if a node has styling info, that prevents rendering of item """ if not hasattr(n, 'vlist'): return True style = n.vlist.get('style',None) if style: display = style.get('display', '').lower() if display == 'none': return False return True
2e65854fbc54e3673be1a3ac50f1571f78d4f78c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12390/2e65854fbc54e3673be1a3ac50f1571f78d4f78c/rlwriter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2562, 907, 12, 2890, 16, 290, 4672, 3536, 866, 309, 279, 756, 711, 16253, 2456, 1123, 16, 716, 17793, 9782, 434, 761, 3536, 309, 486, 3859, 12, 82, 16, 296, 90, 1098, 11, 4672, 327, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2562, 907, 12, 2890, 16, 290, 4672, 3536, 866, 309, 279, 756, 711, 16253, 2456, 1123, 16, 716, 17793, 9782, 434, 761, 3536, 309, 486, 3859, 12, 82, 16, 296, 90, 1098, 11, 4672, 327, ...
for (i, child) in enumerate(toc.iter()):
for (i, child) in enumerate(toc.iterdescendants()):
def _generate_ctoc(self): # Generate the compiled TOC strings # Each node has 1-4 CTOC entries: # Periodical (0xDF) # title, class # Section (0xFF) # title, class # Article (0x3F) # title, class, description, author # Chapter (0x0F) # title, class # nb: Chapters don't actually have @class, so we synthesize it # in reader._toc_from_navpoint
07bc32118b37c7eb269752b8dde39c9058801fe5 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9125/07bc32118b37c7eb269752b8dde39c9058801fe5/writer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 7163, 67, 299, 504, 12, 2890, 4672, 468, 6654, 326, 7743, 8493, 39, 2064, 468, 8315, 756, 711, 404, 17, 24, 385, 4296, 39, 3222, 30, 468, 202, 5027, 1706, 261, 20, 92, 4577, 13,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 7163, 67, 299, 504, 12, 2890, 4672, 468, 6654, 326, 7743, 8493, 39, 2064, 468, 8315, 756, 711, 404, 17, 24, 385, 4296, 39, 3222, 30, 468, 202, 5027, 1706, 261, 20, 92, 4577, 13,...
unittest.main()
unittest.main()
def scoped(): # global rgba_combinations for i, (r,g,b,a) in enumerate(rgba_combinations): c = pygame.Color (r,g,b,a) other = pygame.Color(0) print i print r,g,b,a print 'i', i
085f558cc2600c410c8e39217bcedfa4d97ed892 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1298/085f558cc2600c410c8e39217bcedfa4d97ed892/color_test.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12523, 13332, 468, 2552, 19465, 67, 832, 4757, 1012, 364, 277, 16, 261, 86, 16, 75, 16, 70, 16, 69, 13, 316, 4241, 12, 26198, 67, 832, 4757, 1012, 4672, 276, 273, 2395, 13957, 18, 29...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12523, 13332, 468, 2552, 19465, 67, 832, 4757, 1012, 364, 277, 16, 261, 86, 16, 75, 16, 70, 16, 69, 13, 316, 4241, 12, 26198, 67, 832, 4757, 1012, 4672, 276, 273, 2395, 13957, 18, 29...
a = search_tree(self, partition, dict=False, lab=False, dig=True)
a = search_tree(self, partition, dict=False, lab=False, dig=True, verbosity=verbosity)
def automorphism_group(self, partition=None, translation=False): """ Returns the largest subgroup of the automorphism group of the digraph whose orbit partition is finer than the partition given. If no partition is given, the unit partition is used and the entire automorphism group is given. INPUT: translation -- if True, then output is the tuple (group, dict), where dict is a dictionary translating from keys == vertices to entries == elements of {1,2,...,n} (since permutation groups can currently only act on positive integers). EXAMPLE: sage: D = DiGraph( { 0:[1], 1:[2], 2:[3], 3:[4], 4:[0] } ) sage: D.automorphism_group() Permutation Group with generators [(1,2,3,4,5)]
d67a023472152bc59356bb215a37f04255fdd99a /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/d67a023472152bc59356bb215a37f04255fdd99a/graph.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 18472, 7657, 6228, 67, 1655, 12, 2890, 16, 3590, 33, 7036, 16, 4794, 33, 8381, 4672, 3536, 2860, 326, 12756, 720, 1655, 434, 326, 18472, 7657, 6228, 1041, 434, 326, 3097, 1483, 8272, 176...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 18472, 7657, 6228, 67, 1655, 12, 2890, 16, 3590, 33, 7036, 16, 4794, 33, 8381, 4672, 3536, 2860, 326, 12756, 720, 1655, 434, 326, 18472, 7657, 6228, 1041, 434, 326, 3097, 1483, 8272, 176...
if not self.list.has_key(pkg["name"]): self.list[pkg["name"]] = [ ] for r in self.list[pkg["name"]]: if str(pkg) == str(r): printDebug(1, "Package %s is already in list" % r.getNEVRA()) return 0
if self.list.has_key(pkg["name"]): for r in self.list[pkg["name"]]: if str(pkg) == str(r): printDebug(1, "Package %s is already in list" % \ r.getNEVRA()) return 0
def install(self, pkg): if not self.list.has_key(pkg["name"]): self.list[pkg["name"]] = [ ] for r in self.list[pkg["name"]]: if str(pkg) == str(r): printDebug(1, "Package %s is already in list" % r.getNEVRA()) return 0 # remove obsolete packages for u in pkg["obsoletes"]: s = self.search_dep(u) for r2 in s: if str(r2) != str(pkg): printDebug(1, "%s obsoletes %s, removing %s" % \ (pkg.getNEVRA(), r2.getNEVRA(), r2.getNEVRA())) self.obsolete(pkg, r2) self.list[pkg["name"]].append(pkg) self.provides.add_rpm(pkg) self.filenames.add_rpm(pkg) return 1
0365effc8f9d7b7a3e0d4ec04d0a55cb2d09fedf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1143/0365effc8f9d7b7a3e0d4ec04d0a55cb2d09fedf/rpmlist.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3799, 12, 2890, 16, 3475, 4672, 309, 365, 18, 1098, 18, 5332, 67, 856, 12, 10657, 9614, 529, 11929, 4672, 364, 436, 316, 365, 18, 1098, 63, 10657, 9614, 529, 11929, 14542, 309, 609, 12...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3799, 12, 2890, 16, 3475, 4672, 309, 365, 18, 1098, 18, 5332, 67, 856, 12, 10657, 9614, 529, 11929, 4672, 364, 436, 316, 365, 18, 1098, 63, 10657, 9614, 529, 11929, 14542, 309, 609, 12...
file_path = os.path.join(absolute_path, fn)
file_path = '/'.join((absolute_path.rstrip('/'), fn))
def __populateData(self): """ Fills the metadata dict with metadata about the given file. This metadata consists of things we pick up from an os.stat call as well as knowledge of the filename and the root directory. We then parse the file and fill in the rest of the information that we know. """ file_basename = os.path.basename(self._filename)
30a07c84e3adebccd0dcd63a7517c431f4333776 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11836/30a07c84e3adebccd0dcd63a7517c431f4333776/fileentry.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 19936, 751, 12, 2890, 4672, 3536, 14192, 87, 326, 1982, 2065, 598, 1982, 2973, 326, 864, 585, 18, 225, 1220, 1982, 20915, 434, 9198, 732, 6002, 731, 628, 392, 1140, 18, 5642, 745, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 19936, 751, 12, 2890, 4672, 3536, 14192, 87, 326, 1982, 2065, 598, 1982, 2973, 326, 864, 585, 18, 225, 1220, 1982, 20915, 434, 9198, 732, 6002, 731, 628, 392, 1140, 18, 5642, 745, ...
if mline.date_from <= today and mline.date_to >= today:
if mline.date_to >= today:
def _membership_state(self, cr, uid, ids, name, args, context=None): res = {} for id in ids: res[id] = 'none' today = time.strftime('%Y-%m-%d') for id in ids: partner_data = self.browse(cr,uid,id) if partner_data.membership_cancel and today > partner_data.membership_cancel: res[id] = 'canceled' continue if partner_data.membership_stop and today > partner_data.membership_stop: res[id] = 'old' continue s = 4 if partner_data.member_lines: for mline in partner_data.member_lines: if mline.date_from <= today and mline.date_to >= today: if mline.account_invoice_line and mline.account_invoice_line.invoice_id: mstate = mline.account_invoice_line.invoice_id.state if mstate == 'paid': s = 0 break elif mstate == 'open' and s!=0: s = 1 elif mstate == 'cancel' and s!=0 and s!=1: s = 2 elif (mstate == 'draft' or mstate == 'proforma') and s!=0 and s!=1: s = 3 if s==4: for mline in partner_data.member_lines: if mline.date_from < today and mline.date_to < today and mline.date_from<=mline.date_to and (mline.account_invoice_line and mline.account_invoice_line.invoice_id.state) == 'paid': s = 5 else: s = 6 if s==0: res[id] = 'paid' elif s==1: res[id] = 'invoiced' elif s==2: res[id] = 'canceled' elif s==3: res[id] = 'waiting' elif s==5: res[id] = 'old' elif s==6: res[id] = 'none' if partner_data.free_member and s!=0: res[id] = 'free' if partner_data.associate_member: res_state = self._membership_state(cr, uid, [partner_data.associate_member.id], name, args, context) res[id] = res_state[partner_data.associate_member.id] return res
caf2746c0485623a44b55ec2cdd09732c813fa9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/caf2746c0485623a44b55ec2cdd09732c813fa9c/membership.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 19679, 67, 2019, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 508, 16, 833, 16, 819, 33, 7036, 4672, 400, 273, 2618, 364, 612, 316, 3258, 30, 400, 63, 350, 65, 273, 296, 6102, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 19679, 67, 2019, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 508, 16, 833, 16, 819, 33, 7036, 4672, 400, 273, 2618, 364, 612, 316, 3258, 30, 400, 63, 350, 65, 273, 296, 6102, ...
fn.func_globals.setdefault('Task', self) for module in self.required_modules: mod_name = module[0] if iskv(module) else module mod = __import__(mod_name, fromlist=[mod_name]) fn.func_globals.setdefault(mod_name.split('.')[-1], mod)
if isinstance(fn, FunctionType): fn.func_globals.setdefault('Task', self) for module in self.required_modules: mod_name = module[0] if iskv(module) else module mod = __import__(mod_name, fromlist=[mod_name]) fn.func_globals.setdefault(mod_name.split('.')[-1], mod)
def insert_globals(self, functions): for fn in functions: fn.func_globals.setdefault('Task', self) for module in self.required_modules: mod_name = module[0] if iskv(module) else module mod = __import__(mod_name, fromlist=[mod_name]) fn.func_globals.setdefault(mod_name.split('.')[-1], mod)
a0eaac16444fd5cac0a01fa488e695b1360343cd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/373/a0eaac16444fd5cac0a01fa488e695b1360343cd/task.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2243, 67, 16227, 12, 2890, 16, 4186, 4672, 364, 2295, 316, 4186, 30, 2295, 18, 644, 67, 16227, 18, 542, 1886, 2668, 2174, 2187, 365, 13, 364, 1605, 316, 365, 18, 4718, 67, 6400, 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, 2243, 67, 16227, 12, 2890, 16, 4186, 4672, 364, 2295, 316, 4186, 30, 2295, 18, 644, 67, 16227, 18, 542, 1886, 2668, 2174, 2187, 365, 13, 364, 1605, 316, 365, 18, 4718, 67, 6400, 30, ...
self.glib.SetColumn(self.idx, 1, sval[0])
self.glist.SetColumn(self.idx, 1, sval[0])
def setenum(self, val): rv = self.lpc.set_val(self.parm, self.aidx, "integer", str(val)) if (rv != 0): self.glist.SetError("Could not set value to " + str(val) + ": " + OpenIPMI.get_error_string(rv)) return self.currval = val nval = [ 0 ] sval = [ "" ] OpenIPMI.lanconfig_enum_val(self.parm, val, nval, sval) self.glib.SetColumn(self.idx, 1, sval[0]) return
2e75cc1150d2838c013d06ef7ee5474655269a1c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3867/2e75cc1150d2838c013d06ef7ee5474655269a1c/_mc_lanparm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 7924, 12, 2890, 16, 1244, 4672, 5633, 273, 365, 18, 80, 2436, 18, 542, 67, 1125, 12, 2890, 18, 1065, 81, 16, 365, 18, 69, 3465, 16, 315, 7745, 3113, 609, 12, 1125, 3719, 309, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 7924, 12, 2890, 16, 1244, 4672, 5633, 273, 365, 18, 80, 2436, 18, 542, 67, 1125, 12, 2890, 18, 1065, 81, 16, 365, 18, 69, 3465, 16, 315, 7745, 3113, 609, 12, 1125, 3719, 309, ...
logging.info('Starting %s server on %d.' % (
logging.debug('Starting %s server on %d.' % (
def start(self): if not self._web_socket_tests: logging.info('No need to start %s server.' % self._server_name) return if self.is_running(): raise PyWebSocketNotStarted('%s is already running.' % self._server_name)
bfb8d8c3cc9486a97efc411bc846f8836f731f21 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9392/bfb8d8c3cc9486a97efc411bc846f8836f731f21/websocket_server.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 787, 12, 2890, 4672, 309, 486, 365, 6315, 4875, 67, 7814, 67, 16341, 30, 2907, 18, 1376, 2668, 2279, 1608, 358, 787, 738, 87, 1438, 1093, 738, 365, 6315, 3567, 67, 529, 13, 327, 309, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 787, 12, 2890, 4672, 309, 486, 365, 6315, 4875, 67, 7814, 67, 16341, 30, 2907, 18, 1376, 2668, 2279, 1608, 358, 787, 738, 87, 1438, 1093, 738, 365, 6315, 3567, 67, 529, 13, 327, 309, ...
if not gpod.itdb_write_file(self._itdb, self._itdb_file, None):
if not gpod.itdb_write(self._itdb, None):
def close(self): """Save and close the database.
0c62a56dd9a840c56cfbb5d9070bf3c97c4ac3ab /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12459/0c62a56dd9a840c56cfbb5d9070bf3c97c4ac3ab/ipod.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1746, 12, 2890, 4672, 3536, 4755, 471, 1746, 326, 2063, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1746, 12, 2890, 4672, 3536, 4755, 471, 1746, 326, 2063, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
callback=lambda: self.fuse_args.add('debug'),
callback=lambda *args: self.fuse_args.add('debug'),
def parseCommandLine(self): ''' Parse the command line arguments into a usable set of variables. This sets the following instance variables:
4d59569716e9270e553d018abdac7d0e650b110d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10739/4d59569716e9270e553d018abdac7d0e650b110d/fusethread.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 21391, 12, 2890, 4672, 9163, 2884, 326, 1296, 980, 1775, 1368, 279, 15603, 444, 434, 3152, 18, 1220, 1678, 326, 3751, 791, 3152, 30, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 21391, 12, 2890, 4672, 9163, 2884, 326, 1296, 980, 1775, 1368, 279, 15603, 444, 434, 3152, 18, 1220, 1678, 326, 3751, 791, 3152, 30, 2, -100, -100, -100, -100, -100, -100, -100, -1...
verts = data.keys()
verts = set(data.keys())
def __init__(self, data=None, pos=None, loops=None, format=None, boundary=[], weighted=None, implementation='networkx', sparse=True, vertex_labels=True, **kwds): """ TEST:: sage: D = DiGraph() sage: loads(dumps(D)) == D True
603eb4c558e9475c3014df6f55a60b30f853aa89 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/603eb4c558e9475c3014df6f55a60b30f853aa89/graph.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 501, 33, 7036, 16, 949, 33, 7036, 16, 14075, 33, 7036, 16, 740, 33, 7036, 16, 7679, 22850, 6487, 13747, 33, 7036, 16, 4471, 2218, 5185, 92, 2187, 9387, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 501, 33, 7036, 16, 949, 33, 7036, 16, 14075, 33, 7036, 16, 740, 33, 7036, 16, 7679, 22850, 6487, 13747, 33, 7036, 16, 4471, 2218, 5185, 92, 2187, 9387, ...
gLogger.error("ReplicationScheduler.execute: Failed to determine replication tree.",res['Message'])
gLogger.error( "ReplicationScheduler.execute: Failed to determine replication tree.", res['Message'] )
def execute(self): """ The main agent execution method """ # This allows dynamic changing of the throughput timescale self.throughputTimescale = self.am_getOption('ThroughputTimescale',3600) self.throughputTimescale = 60*60*1 #print 'ThroughputTimescale:',self.throughputTimescale ###################################################################################### # # Obtain information on the current state of the channel queues # res = self.TransferDB.getChannelQueues() if not res['OK']: errStr = "ReplicationScheduler._execute: Failed to get channel queues from TransferDB." gLogger.error(errStr, res['Message']) return S_OK() if not res['Value']: gLogger.info("ReplicationScheduler._execute: No active channels found for replication.") return S_OK() channels = res['Value'] res = self.TransferDB.getChannelObservedThroughput(self.throughputTimescale) if not res['OK']: errStr = "ReplicationScheduler._execute: Failed to get observed throughput from TransferDB." gLogger.error(errStr,res['Message']) return S_OK() if not res['Value']: gLogger.info("ReplicationScheduler._execute: No active channels found for replication.") return S_OK() bandwidths = res['Value'] self.strategyHandler = StrategyHandler(bandwidths,channels,self.section) requestsPresent = True while requestsPresent: ###################################################################################### # # The first step is to obtain a transfer request from the RequestDB which should be scheduled. # gLogger.info("ReplicationScheduler._execute: Contacting RequestDB for suitable requests.") res = self.RequestDB.getRequest('transfer') if not res['OK']: gLogger.error("ReplicationScheduler._execute: Failed to get a request list from RequestDB.", res['Message']) continue if not res['Value']: gLogger.info("ReplicationScheduler._execute: No requests found in RequestDB.") requestsPresent = False return S_OK() requestString = res['Value']['RequestString'] requestName = res['Value']['RequestName'] gLogger.info("ReplicationScheduler._execute: Obtained Request %s from RequestDB." % (requestName))
9005c0a96ba1bc0698c543bcb4c1886f4eeee344 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/9005c0a96ba1bc0698c543bcb4c1886f4eeee344/ReplicationScheduler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1836, 12, 2890, 4672, 3536, 1021, 2774, 4040, 4588, 707, 3536, 225, 468, 1220, 5360, 5976, 12770, 434, 326, 24677, 1658, 31402, 365, 18, 10064, 458, 10178, 31402, 273, 365, 18, 301, 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, 1836, 12, 2890, 4672, 3536, 1021, 2774, 4040, 4588, 707, 3536, 225, 468, 1220, 5360, 5976, 12770, 434, 326, 24677, 1658, 31402, 365, 18, 10064, 458, 10178, 31402, 273, 365, 18, 301, 67, ...
find_lib_file = self.compiler.find_library_file
def detect_modules(self): # Ensure that /usr/local is always used add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
05d4d562d70568469b12cb2b45dfc78886f8c5d9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/05d4d562d70568469b12cb2b45dfc78886f8c5d9/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, 527, 67, 1214, 67, 869, 67, 1098, 12, 2890, 18, 9576, 18, 12083, 67, 8291, 16, 1173, 13640, 19, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5966, 67, 6400, 12, 2890, 4672, 468, 7693, 716, 342, 13640, 19, 3729, 353, 3712, 1399, 527, 67, 1214, 67, 869, 67, 1098, 12, 2890, 18, 9576, 18, 12083, 67, 8291, 16, 1173, 13640, 19, ...
The following are examples of minimal QSOs using standard JT65 messages:
The following are recommended sequences for minimal QSOs using the standard JT65 messages:
def minimal_qso(event=NONE): screenf5s=Toplevel(root) screenf5s.geometry(root_geom[root_geom.index("+"):]) if g.Win32: screenf5s.iconbitmap("wsjt.ico") t="""
07a92cdf745e46e84bea04cbf5cc2453f6035a7d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2394/07a92cdf745e46e84bea04cbf5cc2453f6035a7d/wsjt.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 16745, 67, 85, 2048, 12, 2575, 33, 9826, 4672, 5518, 74, 25, 87, 33, 3401, 2815, 12, 3085, 13, 5518, 74, 25, 87, 18, 14330, 12, 3085, 67, 10049, 63, 3085, 67, 10049, 18, 1615, 2932, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 16745, 67, 85, 2048, 12, 2575, 33, 9826, 4672, 5518, 74, 25, 87, 33, 3401, 2815, 12, 3085, 13, 5518, 74, 25, 87, 18, 14330, 12, 3085, 67, 10049, 63, 3085, 67, 10049, 18, 1615, 2932, ...
if rpmnevral.exists(name, arch): archlist = archwork.availablearchs(rpmnevral, name) bestarch = archwork.bestarch(archlist) rc = compareEVR(headernevral.evr(name, arch), rpmnevral.evr(name, bestarch)) if (rc > 0): if not uplist_archdict.has_key(name): uplist_archdict[name]=bestarch else: rc = compareEVR(headernevral.evr(name, bestarch), headernevral.evr(name, uplist_archdict[name])) if (rc > 0): finalarch = archwork.bestarch([bestarch, uplist_archdict[name]]) if finalarch == bestarch: uplist_archdict[name]=bestarch else: archlist = archwork.availablearchs(headernevral, name) bestarch = archwork.bestarch(archlist) if arch == bestarch: rpmarchlist = archwork.availablearchs(rpmnevral, name) bestrpmarch = archwork.bestarch(rpmarchlist) rc = compareEVR(headernevral.evr(name, arch), rpmnevral.evr(name, bestrpmarch))
archlist = archwork.availablearchs(rpmnevral, name) finalarch = archlist.pop() if len(archlist) > 1: log(4, 'multiple archs in rpmdb for pkg: %s' % name) for otherarch in archlist: rc = compareEVR(rpmnevral.evr(name, finalarch), rpmnevral.evr(name, otherarch)) if rc > 0: pass elif rc < 0: finalarch = otherarch elif rc == 0: log(5, 'Deeply odd, two pkgs of same arch and same version %s - %s' % (name, currentarch)) archlist = archwork.availablearchs(headernevral, name) hdr_finalarch = archlist.pop() if len(archlist) > 1: for otherarch in archlist: rc = compareEVR(headernevral.evr(name, hdr_finalarch), headernevral.evr(name, otherarch)) if rc > 0: pass elif rc < 0: hdr_finalarch = otherarch elif rc == 0: log(5, 'Deeply odd, two pkgs of same arch and same version %s - %s' % (name, currentarch)) rc = compareEVR(headernevral.evr(name, hdr_finalarch), rpmnevral.evr(name, finalarch) if (rc > 0): if not uplist_archdict.has_key(name): uplist_archdict[name]=hdr_finalarch else: rc = compareEVR(headernevral.evr(name, hdr_finalarch), headernevral.evr(name, uplist_archdict[name]))
def getupdatedhdrlist(headernevral, rpmnevral): "returns (name, arch) tuples of updated and uninstalled pkgs" uplist = [] newlist = [] uplist_archdict = {} for (name, arch) in headernevral.NAkeys(): # this is all hard and goofy to deal with pkgs changing arch # if we have the package installed # check to see if we have that specific arch # if so compare that name,arch vs the bestarch in the rpmdb # this deals with us having 2.4.9-31.i686 kernels installed AND 2.4.18-4.athlon kernels installed # b/c a 2.4.18-4.i686 would constantly showed up on an athlon # if its newer then mark it as updateable # if we don't have that specific arch, then if its the best arch in the headernevral, compare # it to what we have, if its newer then mark it as updateable if rpmnevral.exists(name): if rpmnevral.exists(name, arch): archlist = archwork.availablearchs(rpmnevral, name) bestarch = archwork.bestarch(archlist) rc = compareEVR(headernevral.evr(name, arch), rpmnevral.evr(name, bestarch)) if (rc > 0): if not uplist_archdict.has_key(name): uplist_archdict[name]=bestarch else: rc = compareEVR(headernevral.evr(name, bestarch), headernevral.evr(name, uplist_archdict[name])) if (rc > 0): finalarch = archwork.bestarch([bestarch, uplist_archdict[name]]) if finalarch == bestarch: uplist_archdict[name]=bestarch else: archlist = archwork.availablearchs(headernevral, name) bestarch = archwork.bestarch(archlist) if arch == bestarch: rpmarchlist = archwork.availablearchs(rpmnevral, name) bestrpmarch = archwork.bestarch(rpmarchlist) rc = compareEVR(headernevral.evr(name, arch), rpmnevral.evr(name, bestrpmarch)) if (rc > 0): if not uplist_archdict.has_key(name): uplist_archdict[name]=bestarch else: rc = compareEVR(headernevral.evr(name, bestarch), headernevral.evr(name, uplist_archdict[name])) if (rc > 0): finalarch = archwork.bestarch([bestarch, uplist_archdict[name]]) if finalarch == bestarch: uplist_archdict[name]=bestarch else: newlist.append((name, arch)) for name in uplist_archdict.keys(): uplist.append((name,uplist_archdict[name])) nulist=uplist+newlist return (uplist, newlist, nulist)
e287c114ed224326962e7d00431e9e63c1a0494b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5445/e287c114ed224326962e7d00431e9e63c1a0494b/clientStuff.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 7007, 16587, 1098, 12, 3374, 4644, 18090, 287, 16, 25228, 4644, 18090, 287, 4672, 315, 6154, 261, 529, 16, 6637, 13, 10384, 434, 3526, 471, 640, 13435, 16922, 6, 582, 17842, 273, 53...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 7007, 16587, 1098, 12, 3374, 4644, 18090, 287, 16, 25228, 4644, 18090, 287, 4672, 315, 6154, 261, 529, 16, 6637, 13, 10384, 434, 3526, 471, 640, 13435, 16922, 6, 582, 17842, 273, 53...
a.write("$(Link) -o cm3 *.o\n")
if Target.find("INTERIX") == -1: a.write("$(Link) -o cm3 *.o\n") else: a.write("rm ntdll.def ntdll.lib ntdll.dll ntdll.o ntdll.c.o a.out a.exe cm3 cm3.exe") a.write("gcc -c ntdll.c") a.write("/opt/gcc.3.3/i586-pc-interix3/bin/dlltool --dllname ntdll.dll --kill-at --output-lib libntdll.a --export-all-symbols ntdll.o") a.write("rm ntdll.o ntdll.c.o _m3main.c.o _m3main.o") a.write("gcc -g -o cm3 _m3main.c *.o -lm -L . -lntdll")
def Boot(): global BuildLocal BuildLocal += " -boot -keep " 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. SunCompile = "/usr/ccs/bin/cc -g -mt -xcode=pic32 -xldscope=symbolic " GnuCompile = { # gcc -fPIC generates incorrect code on Interix "I386_INTERIX" : "gcc -g " }.get(Target) or "gcc -g -fPIC " if Target.endswith("_SOLARIS") or Target == "SOLsun": Compile = SunCompile else: Compile = GnuCompile Compile = Compile + ({ "AMD64_LINUX" : " -m64 -mno-align-double ", "AMD64_DARWIN" : " -arch x86_64 ", "ARM_DARWIN" : " -march=armv6 -mcpu=arm1176jzf-s ", "LINUXLIBC6" : " -m32 -mno-align-double ", "MIPS64_OPENBSD" : " -mabi=64 ", "SOLgnu" : " -m32 ", "SOLsun" : " -xarch=v8plus ", "SPARC32_LINUX" : " -m32 -munaligned-doubles ", "SPARC64_LINUX" : " -m64 -munaligned-doubles ", "SPARC64_SOLARIS" : " -xarch=v9 ", }.get(Target) or " ") SunLink = " -lrt -lm -lnsl -lsocket -lpthread " Link = Compile + ({ "ARM_DARWIN" : " ", "AMD64_DARWIN" : " ", "I386_DARWIN" : " ", "I386_INTERIX" : " -lm ", "PPC_DARWIN" : " ", "PPC64_DARWIN" : " ", "SOLgnu" : SunLink, "SOLsun" : SunLink, "SPARC64_SOLARIS" : SunLink, "PA32_HPUX" : " -lrt -lm ", }.get(Target) or " -lm -lpthread ") # not in Link Compile += " -c " if Target.endswith("_SOLARIS") or Target.startswith("SOL"): Assemble = "/usr/ccs/bin/as " else: Assemble = "as " if Target.find("LINUX") != -1 or Target.find("BSD") != -1: if Target.find("64") != -1 or Target.find("ALPHA") != -1: Assemble = Assemble + " --64" else: Assemble = Assemble + " --32" Assemble = (Assemble + ({ "AMD64_DARWIN" : " -arch x86_64 ", "ARM_DARWIN" : " -arch armv6 ", "SOLgnu" : " -s -K PIC -xarch=v8plus ", "SOLsun" : " -s -K PIC -xarch=v8plus ", "SPARC64_SOLARIS" : " -s -K PIC -xarch=v9 ", }.get(Target) or "")) GnuPlatformPrefix = { "ARM_DARWIN" : "arm-apple-darwin8-", }.get(Target) or "" Compile = GnuPlatformPrefix + Compile Link = GnuPlatformPrefix + Link Assemble = GnuPlatformPrefix + Assemble # # squeeze runs of spaces and spaces at end # 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 = [ "ntdll", "import-libs", "m3core", "libm3", "sysutils", "m3middle", "m3quake", "m3objfile", "m3linker", "m3back", "m3front", "cm3" ] if Target == "NT386": P += ["mklib"] #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") Makefile = open(os.path.join(BootDir, "Makefile"), "wb") UpdateSource = open(os.path.join(BootDir, "updatesource.sh"), "wb") Makefile.write(".SUFFIXES:\nall: cm3\n\n") for a in [UpdateSource, Make]: a.write("#!/bin/sh\n\nset -e\nset -x\n\n") for a in [Makefile]: a.write("# edit up here\n\n") a.write("Assemble=" + Assemble + "\nCompile=" + Compile + "\nLink=" + Link + "\n") a.write("\n\n# no more editing should be needed\n\n") for a in [Make]: a.write("Assemble=\"" + Assemble + "\"\nCompile=\"" + Compile + "\"\nLink=\"" + Link + "\"\n") for q in P: dir = GetPackagePath(q) for a in os.listdir(os.path.join(Root, dir, Config)): if (a.endswith(".ms") or a.endswith(".is") or a.endswith(".s") or a.endswith(".c")): CopyFile(os.path.join(Root, dir, Config, a), BootDir) Makefile.write("Objects += " + a + ".o\n" + a + ".o: " + a + "\n\t") if a.endswith(".c"): Command = "Compile" else: Command = "Assemble" for b in [Make, Makefile]: b.write("${" + Command + "} " + a + " -o " + a + ".o\n") if a.endswith(".h"): CopyFile(os.path.join(Root, dir, Config, a), BootDir) Makefile.write("cm3: $(Objects)\n\t") for a in [Make, Makefile]: a.write("$(Link) -o cm3 *.o\n") Common = "Common" 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/linux-32/m3makefile", "m3-libs/m3core/src/unix/linux-64/m3makefile", "m3-libs/m3core/src/unix/freebsd-common/m3makefile", "m3-libs/m3core/src/unix/freebsd-common/Uerror.i3", "m3-libs/m3core/src/unix/freebsd-common/Usysdep.i3", "m3-libs/m3core/src/unix/freebsd-common/Uucontext.i3", "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]: a.close() _MakeArchive(BootDir[2:])
ebac2d73779b25ddd3117b47a42cd6ae02ac62a6 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9328/ebac2d73779b25ddd3117b47a42cd6ae02ac62a6/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, 315, 225, 4049, 273, 315, 21, 6, 225, 468, 1220, 1779, 353, 16975, 628, 326, 642, 1390, 18, 468, 399, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 315, 225, 4049, 273, 315, 21, 6, 225, 468, 1220, 1779, 353, 16975, 628, 326, 642, 1390, 18, 468, 399, ...
for key in ('LDFLAGS', 'BASECFLAGS',
for key in ('LDFLAGS', 'BASECFLAGS', 'LDSHARED',
def get_config_vars(*args): """With no arguments, return a dictionary of all configuration variables relevant for the current platform. Generally this includes everything needed to build extensions and install both pure modules and extensions. On Unix, this means every variable defined in Python's installed Makefile; on Windows and Mac OS it's a much smaller set. With arguments, return a list of values that result from looking up each argument in the configuration variable dictionary. """ global _config_vars if _config_vars is None: func = globals().get("_init_" + os.name) if func: func() else: _config_vars = {} # Normalized versions of prefix and exec_prefix are handy to have; # in fact, these are the standard versions used most places in the # Distutils. _config_vars['prefix'] = PREFIX _config_vars['exec_prefix'] = EXEC_PREFIX if 'srcdir' not in _config_vars: _config_vars['srcdir'] = project_base # Convert srcdir into an absolute path if it appears necessary. # Normally it is relative to the build directory. However, during # testing, for example, we might be running a non-installed python # from a different directory. if python_build and os.name == "posix": base = os.path.dirname(os.path.abspath(sys.executable)) if (not os.path.isabs(_config_vars['srcdir']) and base != os.getcwd()): # srcdir is relative and we are not in the same directory # as the executable. Assume executable is in the build # directory and make srcdir absolute. srcdir = os.path.join(base, _config_vars['srcdir']) _config_vars['srcdir'] = os.path.normpath(srcdir) if sys.platform == 'darwin': kernel_version = os.uname()[2] # Kernel version (8.4.3) major_version = int(kernel_version.split('.')[0]) if major_version < 8: # On Mac OS X before 10.4, check if -arch and -isysroot # are in CFLAGS or LDFLAGS and remove them if they are. # This is needed when building extensions on a 10.3 system # using a universal build of python. for key in ('LDFLAGS', 'BASECFLAGS', # a number of derived variables. These need to be # patched up as well. 'CFLAGS', 'PY_CFLAGS', 'BLDSHARED'): flags = _config_vars[key] flags = re.sub('-arch\s+\w+\s', ' ', flags) flags = re.sub('-isysroot [^ \t]*', ' ', flags) _config_vars[key] = flags else: # Allow the user to override the architecture flags using # an environment variable. # NOTE: This name was introduced by Apple in OSX 10.5 and # is used by several scripting languages distributed with # that OS release. if 'ARCHFLAGS' in os.environ: arch = os.environ['ARCHFLAGS'] for key in ('LDFLAGS', 'BASECFLAGS', # a number of derived variables. These need to be # patched up as well. 'CFLAGS', 'PY_CFLAGS', 'BLDSHARED'): flags = _config_vars[key] flags = re.sub('-arch\s+\w+\s', ' ', flags) flags = flags + ' ' + arch _config_vars[key] = flags # If we're on OSX 10.5 or later and the user tries to # compiles an extension using an SDK that is not present # on the current machine it is better to not use an SDK # than to fail. # # The major usecase for this is users using a Python.org # binary installer on OSX 10.6: that installer uses # the 10.4u SDK, but that SDK is not installed by default # when you install Xcode. # m = re.search('-isysroot\s+(\S+)', _config_vars['CFLAGS']) if m is not None: sdk = m.group(1) if not os.path.exists(sdk): for key in ('LDFLAGS', 'BASECFLAGS', # a number of derived variables. These need to be # patched up as well. 'CFLAGS', 'PY_CFLAGS', 'BLDSHARED'): flags = _config_vars[key] flags = re.sub('-isysroot\s+\S+(\s|$)', ' ', flags) _config_vars[key] = flags if args: vals = [] for name in args: vals.append(_config_vars.get(name)) return vals else: return _config_vars
be2eb94185c2f13a5719446a99ef4a057b6d3fb6 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3187/be2eb94185c2f13a5719446a99ef4a057b6d3fb6/sysconfig.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 1425, 67, 4699, 30857, 1968, 4672, 3536, 1190, 1158, 1775, 16, 327, 279, 3880, 434, 777, 1664, 3152, 9368, 364, 326, 783, 4072, 18, 225, 3055, 1230, 333, 6104, 7756, 3577, 358, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 1425, 67, 4699, 30857, 1968, 4672, 3536, 1190, 1158, 1775, 16, 327, 279, 3880, 434, 777, 1664, 3152, 9368, 364, 326, 783, 4072, 18, 225, 3055, 1230, 333, 6104, 7756, 3577, 358, ...
avoid this message by removing the rdiff_backup_data directory;
avoid this message by removing the rdiff-backup-data directory;
def checkdest_need_check(dest_rp): """Return None if no dest dir found, 1 if dest dir needs check, 0 o/w""" if not dest_rp.isdir() or not Globals.rbdir.isdir(): return None for filename in Globals.rbdir.listdir(): if filename not in ['chars_to_quote', 'backup.log']: break else: # This may happen the first backup just after we test for quoting return None curmirroot = Globals.rbdir.append("current_mirror") curmir_incs = restore.get_inclist(curmirroot) if not curmir_incs: Log.FatalError(
0d51bc60b81d04e9683479f29f8b812a4de9cc8e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6202/0d51bc60b81d04e9683479f29f8b812a4de9cc8e/Main.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 10488, 67, 14891, 67, 1893, 12, 10488, 67, 13832, 4672, 3536, 990, 599, 309, 1158, 1570, 1577, 1392, 16, 404, 309, 1570, 1577, 4260, 866, 16, 374, 320, 19, 91, 8395, 309, 486, 157...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 10488, 67, 14891, 67, 1893, 12, 10488, 67, 13832, 4672, 3536, 990, 599, 309, 1158, 1570, 1577, 1392, 16, 404, 309, 1570, 1577, 4260, 866, 16, 374, 320, 19, 91, 8395, 309, 486, 157...
def self.validate_fields(self, module): if self.debug_output >= DEBUG_ALL: print "Validating fields: %s" % True
def validate_fields(self, module): for field in self.necessary_attributes: if self.debug_output >= DEBUG_ALL: print "Validating fields %s : %s" % (field, hasattr(module, field)) if not hasattr(module, field): return False
def self.validate_fields(self, module): if self.debug_output >= DEBUG_ALL: print "Validating fields: %s" % True return True
75dbf626c3b697e568752995866893479a555cae /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/635/75dbf626c3b697e568752995866893479a555cae/moduleloader.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1954, 67, 2821, 12, 2890, 16, 1605, 4672, 364, 652, 316, 365, 18, 82, 4128, 67, 4350, 30, 309, 365, 18, 4148, 67, 2844, 1545, 6369, 67, 4685, 30, 1172, 315, 31496, 1466, 738, 87, 294...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1954, 67, 2821, 12, 2890, 16, 1605, 4672, 364, 652, 316, 365, 18, 82, 4128, 67, 4350, 30, 309, 365, 18, 4148, 67, 2844, 1545, 6369, 67, 4685, 30, 1172, 315, 31496, 1466, 738, 87, 294...
if timeout_needs_update: timeout = self._CalcTimeout(time.time()) timeout_needs_update = False
def Run(self, handle_sigchld=True, handle_sigterm=True, stop_on_empty=False): """Runs the mainloop.
577c90a3dbe81bb3cca5c97f19e6877a8bbdc5c9 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7542/577c90a3dbe81bb3cca5c97f19e6877a8bbdc5c9/daemon.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1939, 12, 2890, 16, 1640, 67, 7340, 343, 1236, 33, 5510, 16, 1640, 67, 7340, 6408, 33, 5510, 16, 2132, 67, 265, 67, 5531, 33, 8381, 4672, 3536, 9361, 326, 2774, 6498, 18, 2, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1939, 12, 2890, 16, 1640, 67, 7340, 343, 1236, 33, 5510, 16, 1640, 67, 7340, 6408, 33, 5510, 16, 2132, 67, 265, 67, 5531, 33, 8381, 4672, 3536, 9361, 326, 2774, 6498, 18, 2, -100, -1...
parametersUnderstood = ['tzid', 'x-vobj-original-tzid', 'x-osaf-anytime-param']
parametersUnderstood = ['tzid', 'x-vobj-original-tzid', 'x-osaf-anytime']
def makeNaiveteMatch(dt, tzinfo): if dt.tzinfo is None: if tzinfo is not None: dt = TimeZone.coerceTimeZone(dt, tzinfo) else: if tzinfo is None: dt = TimeZone.stripTimeZone(dt) return dt
8a610cda30e4f028bb97c166221c9390b46c6756 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9228/8a610cda30e4f028bb97c166221c9390b46c6756/ICalendar.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 24101, 427, 12865, 2060, 12, 7510, 16, 15732, 4672, 309, 3681, 18, 12994, 1376, 353, 599, 30, 309, 15732, 353, 486, 599, 30, 3681, 273, 16491, 18, 2894, 2765, 16760, 12, 7510, 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, 1221, 24101, 427, 12865, 2060, 12, 7510, 16, 15732, 4672, 309, 3681, 18, 12994, 1376, 353, 599, 30, 309, 15732, 353, 486, 599, 30, 3681, 273, 16491, 18, 2894, 2765, 16760, 12, 7510, 16, ...
"C Structure has no attribute %s" % name))
"C Structure has no attribute %s" % attr))
def getattr(self, space, attr): if attr.startswith('tm'): pass for i in range(len(self.fields)): name, c = self.fields[i] if name == attr: # XXX RPython-trick for passing lambda around self.next_pos = i return wrap_result(space, c, self.cast_pos) raise OperationError(space.w_AttributeError, space.wrap( "C Structure has no attribute %s" % name))
bfeef41df7c0141820da86fd582bba0ca3023571 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6934/bfeef41df7c0141820da86fd582bba0ca3023571/structure.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3869, 12, 2890, 16, 3476, 16, 1604, 4672, 309, 1604, 18, 17514, 1918, 2668, 16925, 11, 4672, 1342, 364, 277, 316, 1048, 12, 1897, 12, 2890, 18, 2821, 3719, 30, 508, 16, 276, 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, 3869, 12, 2890, 16, 3476, 16, 1604, 4672, 309, 1604, 18, 17514, 1918, 2668, 16925, 11, 4672, 1342, 364, 277, 316, 1048, 12, 1897, 12, 2890, 18, 2821, 3719, 30, 508, 16, 276, 273, 365, ...
dyld_library_path = os.environ.get('DYLD_LIBRARY_PATH', '')
dyld_library_path = os.getenv('DYLD_LIBRARY_PATH', '')
def setupEnvironment(buildenv): if buildenv['version'] == 'debug': path = buildenv['root'] + os.sep + 'chandler' + os.sep + 'debug' + os.sep + 'bin' + \ os.pathsep + buildenv['path'] os.putenv('BUILDMODE', 'debug') if buildenv['version'] == 'release': path = buildenv['root'] + os.sep + 'chandler' + os.sep + 'release' + os.sep + 'bin' + \ os.pathsep + buildenv['path'] os.putenv('BUILDMODE', 'release') # to run Chandler-related scripts from directories other than # chandler, PYTHONPATH is needed pythonpaths = [] prevPath = os.getenv('PYTHONPATH') if prevPath: pythonpaths.append(prevPath) # need to add chandler and chandler/parcels to PYTHONPATH pythonpaths.append(os.path.join(buildenv['root'], "chandler")) pythonpaths.append(os.path.join(buildenv['root'], "chandler", "parcels")) pythonpath = os.pathsep.join(pythonpaths) # log(buildenv, HARDHAT_MESSAGE, 'hardhat', "Setting path to " + path) # os.putenv('path', path) if (sys.platform == 'cygwin'): # Even though we're under cygwin, we're going to be launching # external programs that expect PATH to be in DOS format, so # convert it try: if('.'.join(map(str, sys.version_info[:3])) < '2.3.0'): # we only need to fix the path on versions before 2.3 cygpath = os.popen("/bin/cygpath -wp \"" + path + "\"", "r") path = cygpath.readline() path = path[:-1] cygpath.close() # also convert PYTHONPATH to DOS format cygpath = os.popen("/bin/cygpath -wp \"" + pythonpath + "\"", "r") pythonpath = cygpath.readline() pythonpath = pythonpath[:-1] cygpath.close() except Exception, e: print e print "Unable to call 'cygpath' to determine DOS-equivalent for PATH" print "Either make sure that 'cygpath' is in your PATH or run the Windows version" print "of Python from http://python.org/, rather than the Cygwin Python" raise HardHatError os.putenv('PATH', path) os.putenv('PYTHONPATH', pythonpath) if buildenv['os'] == 'win': # Use DOS format paths under windows os.putenv('CHANDLERHOME', buildenv['root_dos']+"\\chandler") else: os.putenv('CHANDLERHOME', buildenv['root']+os.sep+"chandler") if buildenv['os'] == 'posix': ld_library_path = os.environ.get('LD_LIBRARY_PATH', '') ver = buildenv['version'] additional_path=os.path.join(buildenv['root'],'chandler',ver,'lib')+\ os.pathsep + os.path.join(buildenv['root'],'chandler',ver,'db','lib')+\ os.pathsep + os.path.join(buildenv['root'],'chandler',ver,'dbxml','lib') ld_library_path = additional_path + os.pathsep + ld_library_path os.putenv('LD_LIBRARY_PATH', ld_library_path) if buildenv['os'] == 'osx': dyld_library_path = os.environ.get('DYLD_LIBRARY_PATH', '') ver = buildenv['version'] additional_path=os.path.join(buildenv['root'],'chandler',ver,'lib')+\ os.pathsep + os.path.join(buildenv['root'],'chandler',ver,'db','lib')+\ os.pathsep + os.path.join(buildenv['root'],'chandler',ver,'dbxml','lib') dyld_library_path = additional_path + os.pathsep + dyld_library_path os.putenv('DYLD_LIBRARY_PATH', dyld_library_path) dyld_framework_path = os.environ.get('DYLD_FRAMEWORK_PATH', '') additional_path = os.path.join( buildenv['root'], 'chandler', ver, 'Library', 'Frameworks') dyld_framework_path = additional_path + os.pathsep + dyld_framework_path os.putenv('DYLD_FRAMEWORK_PATH', dyld_framework_path)
a17acba4eaef7c37e9e8fb617272ca059931311b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/a17acba4eaef7c37e9e8fb617272ca059931311b/hardhatlib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 5494, 12, 3510, 3074, 4672, 225, 309, 1361, 3074, 3292, 1589, 3546, 422, 296, 4148, 4278, 589, 273, 1361, 3074, 3292, 3085, 3546, 397, 1140, 18, 10814, 397, 296, 343, 464, 749, 11,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 5494, 12, 3510, 3074, 4672, 225, 309, 1361, 3074, 3292, 1589, 3546, 422, 296, 4148, 4278, 589, 273, 1361, 3074, 3292, 3085, 3546, 397, 1140, 18, 10814, 397, 296, 343, 464, 749, 11,...
header = self.header(), footer = self.footer(), repo = self.reponame,
def changelist(): parity = (start - end) & 1 cl = self.repo.changelog l = [] # build a list in forward order for efficiency for i in range(start, end): n = cl.node(i) changes = cl.read(n) hn = hex(n) t = float(changes[2].split(' ')[0])
f7cbed805c4e724499ee250f00fdeb337f80ac54 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11312/f7cbed805c4e724499ee250f00fdeb337f80ac54/hgweb.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9435, 5449, 13332, 19904, 273, 261, 1937, 300, 679, 13, 473, 404, 927, 273, 365, 18, 7422, 18, 24083, 12970, 328, 273, 5378, 468, 1361, 279, 666, 316, 5104, 1353, 364, 30325, 364, 277, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9435, 5449, 13332, 19904, 273, 261, 1937, 300, 679, 13, 473, 404, 927, 273, 365, 18, 7422, 18, 24083, 12970, 328, 273, 5378, 468, 1361, 279, 666, 316, 5104, 1353, 364, 30325, 364, 277, ...
return len(changed) == 0
for list in itertools.chain(modified,added,removed): return False return True
def uptodate(self,*args,**kwargs): """ Returns true is repo is uptodate.
30a13c12fd72a3a7be90da45ed0800c6538a2585 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11984/30a13c12fd72a3a7be90da45ed0800c6538a2585/hgfile_store.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 582, 337, 31756, 12, 2890, 16, 14, 1968, 16, 636, 4333, 4672, 3536, 2860, 638, 353, 3538, 353, 582, 337, 31756, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 582, 337, 31756, 12, 2890, 16, 14, 1968, 16, 636, 4333, 4672, 3536, 2860, 638, 353, 3538, 353, 582, 337, 31756, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
reductor = x.__reduce__
copier = x.__deepcopy__
def deepcopy(x, memo = None): """Deep copy operation on arbitrary Python objects. See the module's __doc__ string for more info. """ if memo is None: memo = {} d = id(x) if d in memo: return memo[d] try: copierfunction = _deepcopy_dispatch[type(x)] except KeyError: try: copier = x.__deepcopy__ except AttributeError: try: reductor = x.__reduce__ except AttributeError: raise error, \ "un-deep-copyable object of type %s" % type(x) else: y = _reconstruct(x, reductor(), 1, memo) else: y = copier(memo) else: y = copierfunction(x, memo) memo[d] = y return y
9a66d46f026c9e6a2278551c925defe7d0f21db4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/9a66d46f026c9e6a2278551c925defe7d0f21db4/copy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7217, 12, 92, 16, 11063, 273, 599, 4672, 3536, 13980, 1610, 1674, 603, 11078, 6600, 2184, 18, 225, 2164, 326, 1605, 1807, 1001, 2434, 972, 533, 364, 1898, 1123, 18, 3536, 225, 309, 11063...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7217, 12, 92, 16, 11063, 273, 599, 4672, 3536, 13980, 1610, 1674, 603, 11078, 6600, 2184, 18, 225, 2164, 326, 1605, 1807, 1001, 2434, 972, 533, 364, 1898, 1123, 18, 3536, 225, 309, 11063...
return (self.apps[path], path_info, script_name)
return (self.apps[path], script_name, path_info)
def match_path_info(self, path_info, script_name): for path in self.apps: if path_info == path or path_info.startswith(path+'/'): script_name += path path_info = path_info[len(path):] assert not path_info or path_info.startswith('/') return (self.apps[path], path_info, script_name)
c1e37dd6338d9182f4a043ba04e0ea9e391c21ef /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12795/c1e37dd6338d9182f4a043ba04e0ea9e391c21ef/wsgi.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 845, 67, 803, 67, 1376, 12, 2890, 16, 589, 67, 1376, 16, 2728, 67, 529, 4672, 364, 589, 316, 365, 18, 11411, 30, 309, 589, 67, 1376, 422, 589, 578, 589, 67, 1376, 18, 17514, 1918, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 845, 67, 803, 67, 1376, 12, 2890, 16, 589, 67, 1376, 16, 2728, 67, 529, 4672, 364, 589, 316, 365, 18, 11411, 30, 309, 589, 67, 1376, 422, 589, 578, 589, 67, 1376, 18, 17514, 1918, ...
os.system("sudo rm -f /dev/"+ser_addr)
os.system("sleep 3 && sudo rm -f /dev/"+ser_addr+" &")
def remove_vsi(ser_addr, conn): #close a VSI try: print "Closing Socket..." conn.close() #close the socket connection print "Removing System Virtual Socket..." os.system("sudo rm -f /dev/"+ser_addr) #remove the virtual socket print "VSI Removed... Please Note That That Your System May Still Have Traces Of VSI Usage Until You Reboot..." #you need to reboot to have a clean system except BaseException as e: throw_error(8,e) #error removing the VSI
e37cb02731babf21eda1659c72fa1ee560f15547 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10779/e37cb02731babf21eda1659c72fa1ee560f15547/main.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1206, 67, 6904, 77, 12, 550, 67, 4793, 16, 1487, 4672, 468, 4412, 279, 776, 2320, 775, 30, 1172, 315, 15745, 8758, 7070, 1487, 18, 4412, 1435, 468, 4412, 326, 2987, 1459, 1172, 315, 18...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1206, 67, 6904, 77, 12, 550, 67, 4793, 16, 1487, 4672, 468, 4412, 279, 776, 2320, 775, 30, 1172, 315, 15745, 8758, 7070, 1487, 18, 4412, 1435, 468, 4412, 326, 2987, 1459, 1172, 315, 18...
pass
import traceback traceback.print_exc(file=sys.stderr) sys.stderr.flush()
def run(self): while 1: try: url, filename = self.queue.get_nowait() except Queue.Empty: break f = open(filename, "wb") curl = pycurl.Curl() curl.setopt(pycurl.HTTPHEADER, ["User-Agent: PycURL"]) curl.setopt(pycurl.FOLLOWLOCATION, 1) curl.setopt(pycurl.MAXREDIRS, 5) curl.setopt(pycurl.URL, url) curl.setopt(pycurl.WRITEDATA, f) curl.setopt(pycurl.NOSIGNAL, 1) try: curl.perform() except: pass curl.close() f.close() sys.stdout.write(".") sys.stdout.flush()
0fa1d1c95b5455f50b94a37f3a6ac44139cf184e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10805/0fa1d1c95b5455f50b94a37f3a6ac44139cf184e/retriever.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 1323, 404, 30, 775, 30, 880, 16, 1544, 273, 365, 18, 4000, 18, 588, 67, 3338, 1540, 1435, 1335, 7530, 18, 1921, 30, 898, 284, 273, 1696, 12, 3459, 16, 315, 9464...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 1323, 404, 30, 775, 30, 880, 16, 1544, 273, 365, 18, 4000, 18, 588, 67, 3338, 1540, 1435, 1335, 7530, 18, 1921, 30, 898, 284, 273, 1696, 12, 3459, 16, 315, 9464...
def getGPGKeyTuple(keyId, keyRing, secret=0, passPhrase=''): startPoint = keyRing.tell() keyRing.seek(0, SEEK_END) limit = keyRing.tell() if limit == 0: raise KeyNotFound(keyId) if secret: assertSigningKey(keyId, keyRing) keyRing.seek(0) while (keyId not in getKeyId(keyRing)): seekNextKey(keyRing) if keyRing.tell() == limit: raise KeyNotFound(keyId) startLoc=keyRing.tell() seekNextPacket(keyRing) limit = keyRing.tell() keyRing.seek(startLoc) packetType=ord(keyRing.read(1)) if secret and (not ((packetType>>2) & 1)): raise IncompatibleKey("Can't get private key from public keyring") readBlockSize(keyRing, packetType) if ord(keyRing.read(1)) != 4: raise MalformedKeyRing("Can only read V4 packets") keyRing.seek(4, SEEK_CUR) keyType = ord(keyRing.read(1)) if keyType in PK_ALGO_ALL_RSA: n = readMPI(keyRing) e = readMPI(keyRing) if secret: privateMPIs = decryptPrivateKey(keyRing, limit, 4, passPhrase) r = (n, e, privateMPIs[0], privateMPIs[1], privateMPIs[2], privateMPIs[3]) else: r = (n, e) elif keyType in (PK_ALGO_DSA,): p = readMPI(keyRing) q = readMPI(keyRing) g = readMPI(keyRing) y = readMPI(keyRing) if secret: privateMPIs=decryptPrivateKey(keyRing, limit, 1, passPhrase) r = (y, g, p, q, privateMPIs[0]) else: r = (y, g, p, q) elif keyType in PK_ALGO_ALL_ELGAMAL: raise MalformedKeyRing("Can't use El-Gamal keys in current version") p = readMPI(keyRing) g = readMPI(keyRing) y = readMPI(keyRing) if secret: privateMPIs = decryptPrivateKey(keyRing, limit, 1, passPhrase) r = (y, g, p, privateMPIs[0]) else: r = (p, g, y) else: raise MalformedKeyRing("Wrong key type") keyRing.seek(startPoint) return r
def getGPGKeyTuple(keyId, keyRing, secret=0, passPhrase=''): startPoint = keyRing.tell() keyRing.seek(0, SEEK_END) limit = keyRing.tell() if limit == 0: # empty file, there can be no keys in it raise KeyNotFound(keyId) if secret: assertSigningKey(keyId, keyRing) keyRing.seek(0) while (keyId not in getKeyId(keyRing)): seekNextKey(keyRing) if keyRing.tell() == limit: raise KeyNotFound(keyId) startLoc=keyRing.tell() seekNextPacket(keyRing) limit = keyRing.tell() keyRing.seek(startLoc) packetType=ord(keyRing.read(1)) if secret and (not ((packetType>>2) & 1)): raise IncompatibleKey("Can't get private key from public keyring") # reading the block size skips the length octets readBlockSize(keyRing, packetType) if ord(keyRing.read(1)) != 4: raise MalformedKeyRing("Can only read V4 packets") keyRing.seek(4, SEEK_CUR) keyType = ord(keyRing.read(1)) if keyType in PK_ALGO_ALL_RSA: # do RSA stuff # n e n = readMPI(keyRing) e = readMPI(keyRing) if secret: privateMPIs = decryptPrivateKey(keyRing, limit, 4, passPhrase) r = (n, e, privateMPIs[0], privateMPIs[1], privateMPIs[2], privateMPIs[3]) else: r = (n, e) elif keyType in (PK_ALGO_DSA,): p = readMPI(keyRing) q = readMPI(keyRing) g = readMPI(keyRing) y = readMPI(keyRing) if secret: privateMPIs=decryptPrivateKey(keyRing, limit, 1, passPhrase) r = (y, g, p, q, privateMPIs[0]) else: r = (y, g, p, q) elif keyType in PK_ALGO_ALL_ELGAMAL: raise MalformedKeyRing("Can't use El-Gamal keys in current version") p = readMPI(keyRing) g = readMPI(keyRing) y = readMPI(keyRing) if secret: privateMPIs = decryptPrivateKey(keyRing, limit, 1, passPhrase) r = (y, g, p, privateMPIs[0]) else: r = (p, g, y) else: raise MalformedKeyRing("Wrong key type") keyRing.seek(startPoint) return r
f9b14c0b086cd07cd1ac0ac3836d11087586c9e2 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8747/f9b14c0b086cd07cd1ac0ac3836d11087586c9e2/openpgpfile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7162, 18679, 653, 9038, 12, 856, 548, 16, 498, 10369, 16, 4001, 33, 20, 16, 1342, 12812, 2218, 11, 4672, 787, 2148, 273, 498, 10369, 18, 88, 1165, 1435, 498, 10369, 18, 16508, 12, 20, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7162, 18679, 653, 9038, 12, 856, 548, 16, 498, 10369, 16, 4001, 33, 20, 16, 1342, 12812, 2218, 11, 4672, 787, 2148, 273, 498, 10369, 18, 88, 1165, 1435, 498, 10369, 18, 16508, 12, 20, ...
self.id._close()
def close(self): """ Close this HDF5 file. All open objects will be invalidated. """ with self._lock: self.id._close() self.fid.close()
6622d89a8037f4a0f39fde53eaf4c31b03b8f5d8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10380/6622d89a8037f4a0f39fde53eaf4c31b03b8f5d8/highlevel.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1746, 12, 2890, 4672, 3536, 3527, 333, 21673, 25, 585, 18, 225, 4826, 1696, 2184, 903, 506, 28711, 18, 3536, 598, 365, 6315, 739, 30, 365, 18, 27268, 18, 4412, 1435, 2, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1746, 12, 2890, 4672, 3536, 3527, 333, 21673, 25, 585, 18, 225, 4826, 1696, 2184, 903, 506, 28711, 18, 3536, 598, 365, 6315, 739, 30, 365, 18, 27268, 18, 4412, 1435, 2, -100, -100, -10...
global error global parse_file global success
global error, parse_file, success, parser
def p_error(tok): global error global parse_file global success error = "%s: Syntax error on line %d %s [type=%s]" % (parse_file, tok.lineno, tok.value, tok.type) print error success = False
52f9d9f2ad3225e44f9fd55722b49231f060e2f3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7147/52f9d9f2ad3225e44f9fd55722b49231f060e2f3/refparser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 293, 67, 1636, 12, 17692, 4672, 2552, 555, 16, 1109, 67, 768, 16, 2216, 16, 2082, 555, 273, 2213, 87, 30, 11517, 555, 603, 980, 738, 72, 738, 87, 306, 723, 5095, 87, 4279, 738, 261, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 293, 67, 1636, 12, 17692, 4672, 2552, 555, 16, 1109, 67, 768, 16, 2216, 16, 2082, 555, 273, 2213, 87, 30, 11517, 555, 603, 980, 738, 72, 738, 87, 306, 723, 5095, 87, 4279, 738, 261, ...
pass
r = 0.1 N = 100 pop = population(size=N, loci=[2,5], sexChrom=True) InitByValue(pop, indRange=[0,N/2-1], sex=[Male]*(N/2), atPloidy=0, value=[1]*7) InitByValue(pop, indRange=[0,N/2-1], sex=[Male]*(N/2), atPloidy=1, value=[3]*7) InitByValue(pop, indRange=[N/2,N-1], sex=[Female]*(N/2), value=[1]*7+[2]*7) simu = simulator(pop, randomMating()) simu.evolve( [ recombinator(rate=r) ], end=100) pop = simu.population(0) for i in range( pop.popSize() ): ind = pop.individual(i) if ind.sex() == Male: assert ind.arrGenotype(1, 1) == carray('B', [3]*5) else: assert ind.arrGenotype().count(3) == 0
def testNoMaleRec(self): ' male chromosome is not supposed to recombine ' # create such an situation
497e2e46b1db4af7f42af0cb4e820210ec7b8ccf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/401/497e2e46b1db4af7f42af0cb4e820210ec7b8ccf/test_recombination.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 2279, 49, 5349, 5650, 12, 2890, 4672, 296, 312, 5349, 22674, 353, 486, 18405, 358, 283, 14082, 296, 468, 752, 4123, 392, 20886, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 2279, 49, 5349, 5650, 12, 2890, 4672, 296, 312, 5349, 22674, 353, 486, 18405, 358, 283, 14082, 296, 468, 752, 4123, 392, 20886, 2, -100, -100, -100, -100, -100, -100, -100, -100, -...
singleton(self)
def __init__(self): # assure there is only one instance of this class singleton(self) self.loader = PandaLoader()
038728b4933b0821c956cc9b9696775468fe81ca /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7999/038728b4933b0821c956cc9b9696775468fe81ca/data.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 468, 1551, 594, 1915, 353, 1338, 1245, 791, 434, 333, 667, 2890, 18, 6714, 273, 453, 464, 69, 2886, 1435, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 468, 1551, 594, 1915, 353, 1338, 1245, 791, 434, 333, 667, 2890, 18, 6714, 273, 453, 464, 69, 2886, 1435, 225, 2, -100, -100, -100, -100, -100, -100, -...
class Preview(wx.Panel):
def __init__(self , evtType, id): super(SerieEvent, self).__init__(evtType, id)
3a3b134c2506801a560a5465264fdb23f6a835b1 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10228/3a3b134c2506801a560a5465264fdb23f6a835b1/dicom_preview_panel.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 269, 6324, 559, 16, 612, 4672, 2240, 12, 827, 1385, 1133, 16, 365, 2934, 972, 2738, 972, 12, 73, 11734, 559, 16, 612, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 269, 6324, 559, 16, 612, 4672, 2240, 12, 827, 1385, 1133, 16, 365, 2934, 972, 2738, 972, 12, 73, 11734, 559, 16, 612, 13, 2, -100, -100, -100, -100, -100, ...
elif header == 0x06054b50:
elif header == ZipEndCentralDirectory.HEADER:
def createFields(self): # File data self.signature = None self.central_directory = [] while not self.eof: header = UInt32(self, "header[]", "Header", text_handler=hexadecimal) yield header header = header.value if header == 0x04034B50: yield FileEntry(self, "file[]") elif header == 0x02014b50: yield ZipCentralDirectory(self, "central_directory[]") elif header == 0x06054b50: yield ZipEndCentralDirectory(self, "end_central_directory", "End of central directory") elif header == 0x05054b50: yield PascalString16(self, "signature", "Signature") else: raise ParserError("Error, unknown ZIP header (0x%08X)." % header)
2385730f38f03d81f1775b53d4087ccb2d86ffcf /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9327/2385730f38f03d81f1775b53d4087ccb2d86ffcf/zip.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 2314, 12, 2890, 4672, 468, 1387, 501, 365, 18, 8195, 273, 599, 365, 18, 71, 12839, 67, 5149, 273, 5378, 1323, 486, 365, 18, 9339, 30, 1446, 273, 29810, 1578, 12, 2890, 16, 315, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 2314, 12, 2890, 4672, 468, 1387, 501, 365, 18, 8195, 273, 599, 365, 18, 71, 12839, 67, 5149, 273, 5378, 1323, 486, 365, 18, 9339, 30, 1446, 273, 29810, 1578, 12, 2890, 16, 315, ...
self.game_mode]] = handle
self.game_mode]] = "%s" % handle
def event_handler(self, event): """ Responds to any events that happen during the course of the game. """ if event.type == KEYDOWN:
b76f8b31810447ba446f316a73bae4b400688fa3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11269/b76f8b31810447ba446f316a73bae4b400688fa3/LemonadeGui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 871, 67, 4176, 12, 2890, 16, 871, 4672, 3536, 1124, 12545, 358, 1281, 2641, 716, 5865, 4982, 326, 4362, 434, 326, 7920, 18, 3536, 225, 309, 871, 18, 723, 422, 5311, 12711, 30, 2, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 871, 67, 4176, 12, 2890, 16, 871, 4672, 3536, 1124, 12545, 358, 1281, 2641, 716, 5865, 4982, 326, 4362, 434, 326, 7920, 18, 3536, 225, 309, 871, 18, 723, 422, 5311, 12711, 30, 2, -100,...
jdl += 'OutputSandbox = {%s};\n'% outfiles[:-1]
jdl += 'OutputSandbox = {%s};\n' % outfiles[:-1] if len( remOutfiles ) != 0 : jdl += 'OutputSandboxDestURI = {%s};\n' % remOutfiles[:-1]
def collectionApiJdl( self, task, requirements='' ): """ build a collection jdl easy to be handled by the wmproxy API interface and gives back the list of input files for a better handling """ # general part for task jdl = "[\n" jdl += 'Type = "collection";\n'
bd17679921d6a788fe427a4d70ec6001d261d495 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8886/bd17679921d6a788fe427a4d70ec6001d261d495/SchedulerGLiteAPI.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1849, 3064, 46, 5761, 12, 365, 16, 1562, 16, 8433, 2218, 11, 262, 30, 3536, 1361, 279, 1849, 525, 5761, 12779, 358, 506, 7681, 635, 326, 18200, 5656, 1491, 1560, 471, 14758, 1473, 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, 1849, 3064, 46, 5761, 12, 365, 16, 1562, 16, 8433, 2218, 11, 262, 30, 3536, 1361, 279, 1849, 525, 5761, 12779, 358, 506, 7681, 635, 326, 18200, 5656, 1491, 1560, 471, 14758, 1473, 326, ...
exception_retry=True):
exception_retry_count=2):
def store_result(self, task_id, result, status, traceback=None, exception_retry=True): """Store the result and status of a task.
ad572c4983ff2db51c02ab218b22ff0e43331724 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2024/ad572c4983ff2db51c02ab218b22ff0e43331724/managers.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1707, 67, 2088, 12, 2890, 16, 1562, 67, 350, 16, 563, 16, 1267, 16, 10820, 33, 7036, 16, 1520, 67, 9620, 67, 1883, 33, 22, 4672, 3536, 2257, 326, 563, 471, 1267, 434, 279, 1562, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1707, 67, 2088, 12, 2890, 16, 1562, 67, 350, 16, 563, 16, 1267, 16, 10820, 33, 7036, 16, 1520, 67, 9620, 67, 1883, 33, 22, 4672, 3536, 2257, 326, 563, 471, 1267, 434, 279, 1562, 18, ...
""" b.project.icon_url = "/static/images/icons/projects/%s.png" % b.project.name.lower()
""" b.project.icon_url = "/static/images/icons/projects/%s.png" % b.project.name.lower()
def fetch_bugs(request): # FIXME: Give bugs some date field language = request.GET.get('language', '') format = request.GET.get('format', None) start = int(request.GET.get('start', 1)) end = int(request.GET.get('end', 10)) bugs = Bug.objects.all() if language: bugs = bugs.filter(project__language=language) #if status: # bugs = bugs.filter(project__status=status) bugs = bugs[start-1:end] for b in bugs: """ b.description += "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum." b.description = b.description[:65] + "..." """ b.project.icon_url = "/static/images/icons/projects/%s.png" % b.project.name.lower() if format == 'json': return bugs_to_json_response(bugs, request.GET.get('jsoncallback', 'alert')) else: prev_page_query_str = QueryDict('') prev_page_query_str = prev_page_query_str.copy() next_page_query_str = QueryDict('') next_page_query_str = next_page_query_str.copy() if language: prev_page_query_str['language'] = language next_page_query_str['language'] = language if format: prev_page_query_str['format'] = format next_page_query_str['format'] = format diff = end - start prev_page_query_str['start'] = start - diff - 1 prev_page_query_str['end'] = start - 1 next_page_query_str['start'] = end + 1 next_page_query_str['end'] = end + diff + 1 return render_to_response('search/search.html', { 'bunch_of_bugs': bugs, 'developer_name': "Orrin Hatch", 'language': language, 'start': start, 'end': end, 'url': 'http://launchpad.net/', 'prev_page_url': '/search/?' + prev_page_query_str.urlencode(), 'next_page_url': '/search/?' + next_page_query_str.urlencode() })
1a4e7c1bf89031f94711c1ea65959742c1f064c8 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11976/1a4e7c1bf89031f94711c1ea65959742c1f064c8/views.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2158, 67, 19381, 12, 2293, 4672, 468, 9852, 30, 22374, 22398, 2690, 1509, 652, 225, 2653, 273, 590, 18, 3264, 18, 588, 2668, 4923, 2187, 28707, 740, 273, 590, 18, 3264, 18, 588, 2668, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2158, 67, 19381, 12, 2293, 4672, 468, 9852, 30, 22374, 22398, 2690, 1509, 652, 225, 2653, 273, 590, 18, 3264, 18, 588, 2668, 4923, 2187, 28707, 740, 273, 590, 18, 3264, 18, 588, 2668, ...
Cache._setPropValue(self, id, value)
PropertyManager._setPropValue(self, id, value)
def _setPropValue(self, id, value): Cache._setPropValue(self, id, value) self.ZCacheable_invalidate()
255d1174daada068be0087f8f724324d956ac323 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/255d1174daada068be0087f8f724324d956ac323/ZopePageTemplate.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 542, 4658, 620, 12, 2890, 16, 612, 16, 460, 4672, 4276, 1318, 6315, 542, 4658, 620, 12, 2890, 16, 612, 16, 460, 13, 365, 18, 62, 1649, 429, 67, 5387, 340, 1435, 2, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 542, 4658, 620, 12, 2890, 16, 612, 16, 460, 4672, 4276, 1318, 6315, 542, 4658, 620, 12, 2890, 16, 612, 16, 460, 13, 365, 18, 62, 1649, 429, 67, 5387, 340, 1435, 2, -100, -100, ...
""" fl_add_checkbutton(type, x, y, w, h, label) -> object ref.
""" fl_add_checkbutton(type, x, y, w, h, label) -> object
def fl_add_checkbutton(type, x, y, w, h, label): """ fl_add_checkbutton(type, x, y, w, h, label) -> object ref. """ retval = _fl_add_checkbutton(type, x, y, w, h, label) return retval
8765c710f695de392f6fc7c664c746ec98668b1d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2429/8765c710f695de392f6fc7c664c746ec98668b1d/xformslib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1183, 67, 1289, 67, 1893, 5391, 12, 723, 16, 619, 16, 677, 16, 341, 16, 366, 16, 1433, 4672, 3536, 1183, 67, 1289, 67, 1893, 5391, 12, 723, 16, 619, 16, 677, 16, 341, 16, 366, 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, 1183, 67, 1289, 67, 1893, 5391, 12, 723, 16, 619, 16, 677, 16, 341, 16, 366, 16, 1433, 4672, 3536, 1183, 67, 1289, 67, 1893, 5391, 12, 723, 16, 619, 16, 677, 16, 341, 16, 366, 16, ...
raise IOError(errno.EINVAL, "Negative size not allowed")
raise IOError(EINVAL, "Negative size not allowed")
def truncate(self, size=None): if self.closed: raise ValueError, "I/O operation on closed file" if size is None: size = self.pos elif size < 0: raise IOError(errno.EINVAL, "Negative size not allowed") elif size < self.pos: self.pos = size self.buf = self.getvalue()[:size]
c7ed0e3c1301fd27122e336eef7fd233526ccfc1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/c7ed0e3c1301fd27122e336eef7fd233526ccfc1/StringIO.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10310, 12, 2890, 16, 963, 33, 7036, 4672, 309, 365, 18, 12204, 30, 1002, 2068, 16, 315, 45, 19, 51, 1674, 603, 4375, 585, 6, 309, 963, 353, 599, 30, 963, 273, 365, 18, 917, 1327, 9...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10310, 12, 2890, 16, 963, 33, 7036, 4672, 309, 365, 18, 12204, 30, 1002, 2068, 16, 315, 45, 19, 51, 1674, 603, 4375, 585, 6, 309, 963, 353, 599, 30, 963, 273, 365, 18, 917, 1327, 9...
str_time = '%s %s' % (utils.format_time(ttuple, daytimesep='&nbsp;'), utils.get_diff_to_gmt())
str_time = utils.format_time(ttuple, daytimesep='&nbsp;', gmtsep='&nbsp;')
def serialize_test_doc(suite, outpath, title): outfile = open(outpath, 'w') serializer = TestdocSerializer(outfile, suite) ttuple = time.localtime() str_time = '%s %s' % (utils.format_time(ttuple, daytimesep='&nbsp;'), utils.get_diff_to_gmt()) int_time = long(time.mktime(ttuple)) if title: title = title.replace('_', ' ') else: title = 'Documentation for %s' % suite.name namespace = Namespace(gentime_str=str_time, gentime_int=int_time, version=utils.get_full_version('testdoc.py'), suite=suite, title=title) Template(template=templates.LOG).generate(namespace, outfile) suite.serialize(serializer) outfile.write('</body>\n</html>\n') outfile.close()
f33f03560eaa42dec6e8352d9e273211d12d6c41 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7408/f33f03560eaa42dec6e8352d9e273211d12d6c41/testdoc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4472, 67, 3813, 67, 2434, 12, 30676, 16, 596, 803, 16, 2077, 4672, 8756, 273, 1696, 12, 659, 803, 16, 296, 91, 6134, 6340, 273, 7766, 2434, 6306, 12, 26050, 16, 11371, 13, 3574, 2268, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4472, 67, 3813, 67, 2434, 12, 30676, 16, 596, 803, 16, 2077, 4672, 8756, 273, 1696, 12, 659, 803, 16, 296, 91, 6134, 6340, 273, 7766, 2434, 6306, 12, 26050, 16, 11371, 13, 3574, 2268, ...
dialog_type==KDE_DIALOG
dialog_type=KDE_DIALOG
def get_dialog_type(self, mode): dialog_mode=app.config.preferences.dialog_type if not dialog_mode: if not self.desktop: dialog_type=TK_DIALOG else: dialog_type=self.desktop if dialog_type==TK_DIALOG and self.is_zenity==1: dialog_type=GNOME_DIALOG if dialog_type==TK_DIALOG and self.is_kdialog==1: dialog_type==KDE_DIALOG else: dialog_type=dialog_mode if dialog_type==KDE_DIALOG and self.is_kdialog==0: dialog_type=TK_DIALOG if dialog_type==GNOME_DIALOG and self.is_zenity==0: dialog_type=TK_DIALOG print 'self.is_kdialog', self.is_kdialog
dc77cded517b3e90bf0e672857676d6e48bdc2d5 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3123/dc77cded517b3e90bf0e672857676d6e48bdc2d5/dialogmanager.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 12730, 67, 723, 12, 2890, 16, 1965, 4672, 6176, 67, 3188, 33, 2910, 18, 1425, 18, 23219, 18, 12730, 67, 723, 309, 486, 6176, 67, 3188, 30, 309, 486, 365, 18, 31949, 30, 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, 336, 67, 12730, 67, 723, 12, 2890, 16, 1965, 4672, 6176, 67, 3188, 33, 2910, 18, 1425, 18, 23219, 18, 12730, 67, 723, 309, 486, 6176, 67, 3188, 30, 309, 486, 365, 18, 31949, 30, 6176...
if not self.vector: return 0 l = self.writeVector(self.vector) if l < 0 or isinstance(l, Exception): return l if l == 0 and self.vector: result = 0 else: result = None
if self.vector: l = self.writeVector(self.vector) if l < 0 or isinstance(l, Exception): return l if l == 0 and self.vector: result = 0 else: result = None
def doWrite(self): if not self.vector: return 0 l = self.writeVector(self.vector) if l < 0 or isinstance(l, Exception): return l if l == 0 and self.vector: result = 0 else: result = None if not self.vector: self.stopWriting() if self.producer is not None and ((not self.streamingProducer) or self.producerPaused): self.producer.resumeProducing() self.producerPaused = False elif self.disconnecting: return self._postLoseConnection() return result
7857da7eafb89faffafd754b3d1a75bf45647193 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/7857da7eafb89faffafd754b3d1a75bf45647193/abstract.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 3067, 12, 2890, 4672, 309, 365, 18, 7737, 30, 328, 273, 365, 18, 2626, 5018, 12, 2890, 18, 7737, 13, 309, 328, 411, 374, 578, 1549, 12, 80, 16, 1185, 4672, 327, 328, 309, 328, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 3067, 12, 2890, 4672, 309, 365, 18, 7737, 30, 328, 273, 365, 18, 2626, 5018, 12, 2890, 18, 7737, 13, 309, 328, 411, 374, 578, 1549, 12, 80, 16, 1185, 4672, 327, 328, 309, 328, ...
// Parse the init as a normal assignment.
* Lets at the def toplevel are just vars, at least in
58afad4d3cade0a037f53f0a04cb23589df417b1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12949/58afad4d3cade0a037f53f0a04cb23589df417b1/Parser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 380, 511, 2413, 622, 326, 1652, 28999, 854, 2537, 4153, 16, 622, 4520, 316, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 380, 511, 2413, 622, 326, 1652, 28999, 854, 2537, 4153, 16, 622, 4520, 316, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
if backlog is None: backlog = self.backlog
if backlog is not None: self.backlog = backlog
def __init__(self, listener, backlog=None, pool=None, log=sys.stderr, **ssl_args): self.ssl_enabled = False if hasattr(listener, 'accept'): self.socket = listener self.address = listener.getsockname() self.ssl_enabled = hasattr(listener, 'do_handshake') else: if not isinstance(listener, tuple): raise TypeError('Expected a socket instance or a tuple: %r' % (listener, )) if backlog is None: backlog = self.backlog self.address = listener if ssl_args: self.ssl_enabled = True for key, value in ssl_args: if key not in self._allowed_ssl_args: raise TypeError('Unexpected argument: %r' % (key, )) else: setattr(self, key, value) if pool is None: self.pool = GreenletSet() elif hasattr(pool, 'spawn'): self.pool = pool elif isinstance(pool, int): self.pool = Pool(pool) self.log = log Greenlet.__init__(self)
b8d668a18ac3692a1d1272cc5e7b1ee95b253a96 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10423/b8d668a18ac3692a1d1272cc5e7b1ee95b253a96/server.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2991, 16, 1473, 1330, 33, 7036, 16, 2845, 33, 7036, 16, 613, 33, 9499, 18, 11241, 16, 2826, 8157, 67, 1968, 4672, 365, 18, 8157, 67, 5745, 273, 1083, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2991, 16, 1473, 1330, 33, 7036, 16, 2845, 33, 7036, 16, 613, 33, 9499, 18, 11241, 16, 2826, 8157, 67, 1968, 4672, 365, 18, 8157, 67, 5745, 273, 1083, 3...
[0, 1, 2, 1]
[1, 2, 1]
def to_exp(self, k=0): """ Return a list of the multiplicities of the parts of a partition.
7af2c37cd8f544dca04922bdb7f739b544d91b69 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/7af2c37cd8f544dca04922bdb7f739b544d91b69/partition.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 358, 67, 2749, 12, 2890, 16, 417, 33, 20, 4672, 3536, 2000, 279, 666, 434, 326, 3309, 1780, 1961, 434, 326, 2140, 434, 279, 3590, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 358, 67, 2749, 12, 2890, 16, 417, 33, 20, 4672, 3536, 2000, 279, 666, 434, 326, 3309, 1780, 1961, 434, 326, 2140, 434, 279, 3590, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100,...