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
os.path.join(self.lcov_converter_path,
(os.path.join(self.lcov_converter_path,
def Upload(self, coverage_file, upload_path, sym_path=None, src_root=None): """Upload the results to the dashboard.
3039e8499d9e67b0f9d59f0c0c4a6fe541e073c5 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9392/3039e8499d9e67b0f9d59f0c0c4a6fe541e073c5/coverage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9414, 12, 2890, 16, 11196, 67, 768, 16, 3617, 67, 803, 16, 5382, 67, 803, 33, 7036, 16, 1705, 67, 3085, 33, 7036, 4672, 3536, 4777, 326, 1686, 358, 326, 11825, 18, 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, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9414, 12, 2890, 16, 11196, 67, 768, 16, 3617, 67, 803, 16, 5382, 67, 803, 33, 7036, 16, 1705, 67, 3085, 33, 7036, 4672, 3536, 4777, 326, 1686, 358, 326, 11825, 18, 2, -100, -100, -10...
if title is not None: q += title if author is not None: q += author if publisher is not None: q += publisher if keywords is not None: q += keywords
q = ' '.join([i for i in (title, author, publisher, keywords) \ if i is not None])
def __init__(self, title=None, author=None, publisher=None, isbn=None, keywords=None, max_results=20): assert not(title is None and author is None and publisher is None \ and isbn is None and keywords is None) assert (max_results < 21)
fd711e6075e2dec43ab37c76fad9ed299fcdc71d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9125/fd711e6075e2dec43ab37c76fad9ed299fcdc71d/nicebooks.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2077, 33, 7036, 16, 2869, 33, 7036, 16, 12855, 33, 7036, 16, 24205, 33, 7036, 16, 7093, 33, 7036, 16, 943, 67, 4717, 33, 3462, 4672, 1815, 486, 12, 264...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2077, 33, 7036, 16, 2869, 33, 7036, 16, 12855, 33, 7036, 16, 24205, 33, 7036, 16, 7093, 33, 7036, 16, 943, 67, 4717, 33, 3462, 4672, 1815, 486, 12, 264...
return not CoincTable.connection.cursor().execute("SELECT COUNT(offset) FROM time_slide WHERE time_slide_id == ? AND offset != 0", (self.time_slide_id,)).fetchone()[0]
return not CoincTable.connection.cursor().execute("SELECT COUNT(offset) FROM time_slide WHERE time_slide_id == ? AND offset != 0", (lsctables.ILWDID(self.time_slide_id),)).fetchone()[0]
def is_zero_lag(self): return not CoincTable.connection.cursor().execute("SELECT COUNT(offset) FROM time_slide WHERE time_slide_id == ? AND offset != 0", (self.time_slide_id,)).fetchone()[0]
d71b565c67bd82b1335777c3479c4432d2bb9873 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3592/d71b565c67bd82b1335777c3479c4432d2bb9873/SnglBurstUtils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 67, 7124, 67, 22532, 12, 2890, 4672, 327, 486, 28932, 71, 1388, 18, 4071, 18, 9216, 7675, 8837, 2932, 4803, 12666, 12, 3348, 13, 4571, 813, 67, 26371, 4852, 813, 67, 26371, 67, 35...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 67, 7124, 67, 22532, 12, 2890, 4672, 327, 486, 28932, 71, 1388, 18, 4071, 18, 9216, 7675, 8837, 2932, 4803, 12666, 12, 3348, 13, 4571, 813, 67, 26371, 4852, 813, 67, 26371, 67, 35...
self[name] = _ParseResultsWithOffset(toklist.copy(),-1)
self[name] = _ParseResultsWithOffset(toklist.copy(),0)
def __init__( self, toklist, name=None, asList=True, modal=True ): if self.__doinit: self.__doinit = False self.__name = None self.__parent = None self.__accumNames = {} if isinstance(toklist, list): self.__toklist = toklist[:] else: self.__toklist = [toklist] self.__tokdict = dict()
ea515eab3c36f4426843dea8c3e17fb563569d58 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12364/ea515eab3c36f4426843dea8c3e17fb563569d58/pyparsing.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 365, 16, 946, 1098, 16, 508, 33, 7036, 16, 8528, 33, 5510, 16, 13010, 33, 5510, 262, 30, 309, 365, 16186, 72, 885, 305, 30, 365, 16186, 72, 885, 305, 273, 1083, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 365, 16, 946, 1098, 16, 508, 33, 7036, 16, 8528, 33, 5510, 16, 13010, 33, 5510, 262, 30, 309, 365, 16186, 72, 885, 305, 30, 365, 16186, 72, 885, 305, 273, 1083, ...
error_handler=log.err)
error_handler=d.errback)
def sms_get_cb(_sms): self.assertEqual(sms['number'], _sms['number']) self.assertEqual(sms['text'], _sms['text']) # leave everything as found self.device.Delete(_sms['index'], dbus_interface=SMS_INTFACE, reply_handler=lambda: d.callback(True), error_handler=log.err)
45c00959c14e666ef31b3f93137f14e6d66959e4 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12036/45c00959c14e666ef31b3f93137f14e6d66959e4/test_dbus.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 16188, 67, 588, 67, 7358, 24899, 20984, 4672, 365, 18, 11231, 5812, 12, 20984, 3292, 2696, 17337, 389, 20984, 3292, 2696, 19486, 365, 18, 11231, 5812, 12, 20984, 3292, 955, 17337, 389, 209...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 16188, 67, 588, 67, 7358, 24899, 20984, 4672, 365, 18, 11231, 5812, 12, 20984, 3292, 2696, 17337, 389, 20984, 3292, 2696, 19486, 365, 18, 11231, 5812, 12, 20984, 3292, 955, 17337, 389, 209...
1
True
def idwt(self,other="haar",wavelet_k=2): """ Implements the gsl WaveletTransform.backward in dwt.pyx. other must be an element of {"haar", "daubechies", "daubechies_centered", "haar_centered", "bspline", "bspline_centered"}. Assumes the length of the sample is a power of 2. Uses the GSL function gsl_wavelet_transform_backward. See the above docstring for dwt for further details.
837c0b7c218776beb9f35f10fe4f0b231105b3a3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9890/837c0b7c218776beb9f35f10fe4f0b231105b3a3/dft.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 612, 6046, 12, 2890, 16, 3011, 1546, 3395, 297, 3113, 24801, 808, 67, 79, 33, 22, 4672, 3536, 29704, 326, 314, 2069, 678, 842, 808, 4059, 18, 29275, 316, 302, 6046, 18, 2074, 92, 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, 612, 6046, 12, 2890, 16, 3011, 1546, 3395, 297, 3113, 24801, 808, 67, 79, 33, 22, 4672, 3536, 29704, 326, 314, 2069, 678, 842, 808, 4059, 18, 29275, 316, 302, 6046, 18, 2074, 92, 18, ...
subvendor_id = "0x%04x" % pciTuple[2], subdevice_id = "0x%04x" % pciTuple[3],
def validate(letter): if letter.isalnum(): return letter return "_"
c4c22f1c21dd0939f5b152df75ed7d2a9f46197f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/37/c4c22f1c21dd0939f5b152df75ed7d2a9f46197f/create_payload.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1954, 12, 13449, 4672, 309, 9471, 18, 291, 287, 2107, 13332, 327, 9471, 327, 8802, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1954, 12, 13449, 4672, 309, 9471, 18, 291, 287, 2107, 13332, 327, 9471, 327, 8802, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
cls.__name__, parcel_for_module(cls.__module__, view),
'tmp_'+cls.__name__, view,
def _create_schema_item(cls, view): return SchemaStruct( cls.__name__, parcel_for_module(cls.__module__, view), itemFor(Types.Struct, view) )
cb556f567ef24d42447440c993f7b3c87ac4ad3c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/cb556f567ef24d42447440c993f7b3c87ac4ad3c/schema.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2640, 67, 4821, 67, 1726, 12, 6429, 16, 1476, 4672, 327, 4611, 3823, 12, 296, 5645, 4623, 15, 6429, 16186, 529, 972, 16, 1476, 16, 761, 1290, 12, 2016, 18, 3823, 16, 1476, 13, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2640, 67, 4821, 67, 1726, 12, 6429, 16, 1476, 4672, 327, 4611, 3823, 12, 296, 5645, 4623, 15, 6429, 16186, 529, 972, 16, 1476, 16, 761, 1290, 12, 2016, 18, 3823, 16, 1476, 13, 2...
counter=0 total=len(linear_lead) lastpp=-1
def lead(p): return p.lexLead()
06a9f6ca9741467ec77ffd30a94903bf0ac6a603 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2046/06a9f6ca9741467ec77ffd30a94903bf0ac6a603/ll.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5871, 12, 84, 4672, 327, 293, 18, 4149, 9678, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5871, 12, 84, 4672, 327, 293, 18, 4149, 9678, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
i = k
i = j
def convert_url(document): 'Convert url insets to url charstyles' if document.backend == "docbook": return i = 0 while True: i = find_token(document.body, "\\begin_inset CommandInset url", i) if i == -1: break n = find_token(document.body, "name", i) if n == i + 2: # place the URL name in typewriter before the new URL insert # grab the name 'bla' from the e.g. the line 'name "bla"', # therefore start with the 6th character name = document.body[n][6:-1] newname = [name + " "] document.body[i:i] = newname i = i + 1 j = find_token(document.body, "target", i) if j == -1: document.warning("Malformed LyX document: Can't find target for url inset") i = j continue target = document.body[j][8:-1] k = find_token(document.body, "\\end_inset", j) if k == -1: document.warning("Malformed LyX document: Can't find end of url inset") i = k continue newstuff = ["\\begin_inset Flex URL", "status collapsed", "", "\\begin_layout Standard", "", target, "\\end_layout", ""] document.body[i:k] = newstuff i = k
3a8121ddee60ee6360ffa91efd7e91f26829f616 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7514/3a8121ddee60ee6360ffa91efd7e91f26829f616/lyx_1_6.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1765, 67, 718, 12, 5457, 4672, 296, 2723, 880, 23576, 358, 880, 1149, 10218, 11, 309, 1668, 18, 9993, 422, 315, 2434, 3618, 6877, 327, 277, 273, 374, 1323, 1053, 30, 277, 273, 1104, 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, 1765, 67, 718, 12, 5457, 4672, 296, 2723, 880, 23576, 358, 880, 1149, 10218, 11, 309, 1668, 18, 9993, 422, 315, 2434, 3618, 6877, 327, 277, 273, 374, 1323, 1053, 30, 277, 273, 1104, 67...
command = self.command + ' "%s"' % self.media stream = self.core_process(command, self.buffer_size) for chunk in stream: yield chunk
self.channel.open() print 'Opening ' + self.short_name + '...' time.sleep(0.5) playlist = self.get_playlist() lp = len(playlist) self.rand_list = range(0,lp) while True: if lp == 0: break time.sleep(0.1) if self.mode_shuffle == 1: playlist, media = self.get_next_media_rand(playlist) else: playlist, media = self.get_next_media_lin(playlist) file_name = string.replace(media, self.media_dir + os.sep, '') self.channel.set_metadata({'song': file_name}) command = self.main_command + ' "%s"' % media stream = self.core_process(command, self.buffer_size) print 'D-fuzz this file on %s ch%s (%s): %s' % (self.short_name, self.channel_id, self.id, file_name) for __chunk in stream: self.channel.send(__chunk) self.channel.sync() self.channel.close()
def run(self): command = self.command + ' "%s"' % self.media stream = self.core_process(command, self.buffer_size) for chunk in stream: yield chunk
9bcb46828bd7ee9c824e79d41893f83e79986a9d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12047/9bcb46828bd7ee9c824e79d41893f83e79986a9d/d-fuzz.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 1296, 273, 365, 18, 3076, 397, 296, 2213, 87, 5187, 738, 365, 18, 5829, 1407, 273, 365, 18, 3644, 67, 2567, 12, 3076, 16, 365, 18, 4106, 67, 1467, 13, 364, 2441...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1086, 12, 2890, 4672, 1296, 273, 365, 18, 3076, 397, 296, 2213, 87, 5187, 738, 365, 18, 5829, 1407, 273, 365, 18, 3644, 67, 2567, 12, 3076, 16, 365, 18, 4106, 67, 1467, 13, 364, 2441...
printError(pkg, "file-contains-system-library", filename, grep_result)
printError(pkg, "file-contains-system-library", fname, grep_result)
def check(self, pkg):
29a4c5a13a46e5592daecf3ca6e03acc12a1f285 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10341/29a4c5a13a46e5592daecf3ca6e03acc12a1f285/CheckStaticLibraries.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 12, 2890, 16, 3475, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 12, 2890, 16, 3475, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
self.printOut(u'Ending Suite ""%s"" :: EndTime %s :: Total Time %s' % (self.currentSuite['name'], self.currentSuite['endtime'], self.currentSuite['totaltime']), level=3)
self.printOut(u'Ending Suite ""%s"" :: EndTime %s :: Total Time %0.2f seconds' % (self.currentSuite['name'], self.currentSuite['endtime'], self._inSeconds(self.currentSuite['totaltime'])), level=3)
def endSuite(self): """Method to end current running suite. Encapsulates test list.""" self.currentSuite['endtime'] = datetime.now() self.currentSuite['totaltime'] = self.currentSuite['endtime'] - self.currentSuite['starttime'] self.printOut(u'Ending Suite ""%s"" :: EndTime %s :: Total Time %s' % (self.currentSuite['name'], self.currentSuite['endtime'], self.currentSuite['totaltime']), level=3) self.currentSuite['testlist'] = copy.copy(self.testList) self.suiteList.append(copy.copy(self.currentSuite)) self.inSuite = False
2562e26386ff1d6f66c4fb7f4920405b16212033 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/2562e26386ff1d6f66c4fb7f4920405b16212033/TestOutput.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 679, 13587, 12, 2890, 4672, 3536, 1305, 358, 679, 783, 3549, 11371, 18, 225, 1374, 22984, 17099, 1842, 666, 12123, 225, 365, 18, 2972, 13587, 3292, 409, 957, 3546, 273, 3314, 18, 3338, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 679, 13587, 12, 2890, 4672, 3536, 1305, 358, 679, 783, 3549, 11371, 18, 225, 1374, 22984, 17099, 1842, 666, 12123, 225, 365, 18, 2972, 13587, 3292, 409, 957, 3546, 273, 3314, 18, 3338, 1...
filenames = page.image_glob('*range_summary.txt"')
filenames = page.image_glob('*range_summary.txt') print filenames
def finish(self): self.file.close()
169a557d8e92cd9179b78335183b526242bb7589 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5758/169a557d8e92cd9179b78335183b526242bb7589/make_summary_page.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4076, 12, 2890, 4672, 365, 18, 768, 18, 4412, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4076, 12, 2890, 4672, 365, 18, 768, 18, 4412, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
gateway._trace("putting None to execqueue") gateway._execqueue.put(None)
gateway._terminate_execution()
def received(self, gateway): gateway._trace("putting None to execqueue") gateway._execqueue.put(None) raise SystemExit(0)
7f473dd6b120aa536bf297915d37395468830315 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7009/7f473dd6b120aa536bf297915d37395468830315/gateway_base.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5079, 12, 2890, 16, 6878, 4672, 6878, 6315, 30017, 67, 16414, 1435, 1002, 25454, 12, 20, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 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, 5079, 12, 2890, 16, 6878, 4672, 6878, 6315, 30017, 67, 16414, 1435, 1002, 25454, 12, 20, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
oRequest = RequestContainer(request=requestString)
oRequest = RequestContainer( request = requestString )
def executeRequest(self): ################################################ # Get a request from request DB res = self.RequestDBClient.getRequest('register') if not res['OK']: gLogger.info("RegistrationAgent.execute: Failed to get request from database.") return S_OK() elif not res['Value']: gLogger.info("RegistrationAgent.execute: No requests to be executed found.") return S_OK() requestString = res['Value']['RequestString'] requestName = res['Value']['RequestName'] sourceServer = res['Value']['Server'] try: jobID = int(res['Value']['JobID']) except: jobID = 0 gLogger.info("RegistrationAgent.execute: Obtained request %s" % requestName)
991ec8b0394b656ec2c67f7fb0b500c383f8babd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/991ec8b0394b656ec2c67f7fb0b500c383f8babd/RegistrationAgent.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1836, 691, 12, 2890, 4672, 19709, 26487, 13151, 468, 968, 279, 590, 628, 590, 2383, 400, 273, 365, 18, 691, 2290, 1227, 18, 588, 691, 2668, 4861, 6134, 309, 486, 400, 3292, 3141, 3546, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1836, 691, 12, 2890, 4672, 19709, 26487, 13151, 468, 968, 279, 590, 628, 590, 2383, 400, 273, 365, 18, 691, 2290, 1227, 18, 588, 691, 2668, 4861, 6134, 309, 486, 400, 3292, 3141, 3546, ...
self._username = username self._host = host self._port = port self._password = password self._use_tls = use_tls self._fail_silently = fail_silently self._connection = SMTPConnection(username=username, port=port, host=host, password=password, use_tls=use_tls, fail_silently=fail_silently)
self.smtp_host = smtp_host self.smtp_port = int(smtp_port) self.imap_host = imap_host self.imap_port = int(imap_port) self.username = username self.password = password self.use_tls = use_tls self.poll_interval = int(poll_interval) def send(self, email_message): msg = MIMEText(email_message.text) msg['Subject'] = getattr(email_message, "subject", None) msg['From'] = self.username msg['To'] = email_message.peer s = smtplib.SMTP(host=self.smtp_host, port=self.smtp_port) s.ehlo() if self.use_tls: s.starttls() s.login(self.username, self.password) s.sendmail(self.username, [email_message.peer], msg.as_string()) s.quit() def run(self): while self.running: messages = self._get_new_messages() if messages: for message in messages: self.route(message) time.sleep(self.poll_interval) def _get_new_messages(self): self.debug("polling for new messages") imap_connection = imaplib.IMAP4_SSL(self.imap_host, self.imap_port) imap_connection.login(self.username, self.password) imap_connection.select() all_msgs = [] typ, data = imap_connection.search(None, 'UNSEEN') for num in data[0].split(): typ, data = imap_connection.fetch(num, '(RFC822)') email_message = self.message_from_imap(data[0][1]) all_msgs.append(email_message) imap_connection.store(num, "+FLAGS", "\\Seen") imap_connection.close() imap_connection.logout() return all_msgs
def configure(self, host="localhost", port=25, username="demo-user@domain.com", password="secret", use_tls=True, fail_silently=False): # the default information will not work, users need to configure this # in their settings # this is some commented out code that doesn't call django email packages self._username = username self._host = host self._port = port self._password = password self._use_tls = use_tls self._fail_silently = fail_silently self._connection = SMTPConnection(username=username, port=port, host=host, password=password, use_tls=use_tls, fail_silently=fail_silently)
6d681d82e58d10f0624caf32b7b289b3a27faefa /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11809/6d681d82e58d10f0624caf32b7b289b3a27faefa/email.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5068, 12, 2890, 16, 1479, 1546, 13014, 3113, 1756, 33, 2947, 16, 2718, 1546, 27928, 17, 1355, 36, 4308, 18, 832, 3113, 2201, 1546, 5875, 3113, 999, 67, 17116, 33, 5510, 16, 2321, 67, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5068, 12, 2890, 16, 1479, 1546, 13014, 3113, 1756, 33, 2947, 16, 2718, 1546, 27928, 17, 1355, 36, 4308, 18, 832, 3113, 2201, 1546, 5875, 3113, 999, 67, 17116, 33, 5510, 16, 2321, 67, 2...
psCall = sysTools.call("ps -p %s -o %s" % (torPid, "%cpu,rss"), 5, True)
psCall = sysTools.call("ps -p %s -o %s" % (torPid, "%cpu,rss,%mem,etime"), 5, True)
def bandwidth_event(self, event): # doesn't use events but this keeps it in sync with the bandwidth panel # (and so it stops if Tor stops # TODO: ok, screw it - the number of ps calls this makes is ridicuous # compared to how frequently it changes - now caching for five seconds # (note this during the rewrite that its fidelity isn't at the second # level) # TODO: when rewritten raise fidelity to second level if being actively # looked at (or has been recently) # TODO: dropped header requirement so any documentation will, of course, # need to be revised torPid = torTools.getConn().getPid() # cached results stale - requery ps # TODO: issue the same request as header panel to take advantage of cached results sampling = [] psCall = None if torPid: psCall = sysTools.call("ps -p %s -o %s" % (torPid, "%cpu,rss"), 5, True) if psCall and len(psCall) >= 2: sampling = psCall[1].strip().split() if len(sampling) < 2: # either ps failed or returned no tor instance, register error # ps call failed (returned no tor instance or registered an error) - # we need to register something (otherwise timescale would be thrown # off) so keep old results self._processEvent(self.lastPrimary, self.lastSecondary) else: self._processEvent(float(sampling[0]), float(sampling[1]) / 1024.0)
07c71f1028adf9033a633bf54abbc21379cd98fd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13459/07c71f1028adf9033a633bf54abbc21379cd98fd/cpuMemMonitor.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 20508, 67, 2575, 12, 2890, 16, 871, 4672, 468, 3302, 1404, 999, 2641, 1496, 333, 20948, 518, 316, 3792, 598, 326, 20508, 6594, 468, 261, 464, 1427, 518, 12349, 309, 23763, 12349, 468, 26...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 20508, 67, 2575, 12, 2890, 16, 871, 4672, 468, 3302, 1404, 999, 2641, 1496, 333, 20948, 518, 316, 3792, 598, 326, 20508, 6594, 468, 261, 464, 1427, 518, 12349, 309, 23763, 12349, 468, 26...
widgets = ObjectBuilder('includes/ui/graphical/buxon.glade')
path = __file__.split('/') base = '/'.join(path[:-1]) + '/' widgets = ObjectBuilder(base + 'includes/ui/graphical/buxon.glade')
def __init__(self): GtkUI.__init__(self, 'buxon') self.cache = None self.treeTranslator = {}
d1b6d39065c14939f03c6406a2fb9c1b719c5a9e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5712/d1b6d39065c14939f03c6406a2fb9c1b719c5a9e/buxon.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 225, 22132, 5370, 16186, 2738, 972, 12, 2890, 16, 296, 70, 2616, 265, 6134, 225, 365, 18, 2493, 273, 599, 365, 18, 3413, 12233, 273, 2618, 225, 2, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 225, 22132, 5370, 16186, 2738, 972, 12, 2890, 16, 296, 70, 2616, 265, 6134, 225, 365, 18, 2493, 273, 599, 365, 18, 3413, 12233, 273, 2618, 225, 2, -100...
prop = {'name': name, 'value': rendered}
prop = {'name': name, 'value': rendered, 'rendered': None}
def render_property(self, name, mode, context, props): """Renders a node property to HTML.""" candidates = [] for renderer in self.property_renderers: quality = renderer.match_property(name, mode) if quality > 0: candidates.append((quality, renderer)) if candidates: renderer = sorted(candidates, reverse=True)[0][1] rendered = renderer.render_property(name, mode, context, props) if rendered: prop = {'name': name, 'value': rendered} if isinstance(rendered, RenderedProperty): prop['rendered'] = rendered prop['value'] = rendered.content return prop
e3cd92aaea2b5bfb63e0c4db8178860fff7f7e52 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2831/e3cd92aaea2b5bfb63e0c4db8178860fff7f7e52/browser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 67, 4468, 12, 2890, 16, 508, 16, 1965, 16, 819, 16, 3458, 4672, 3536, 10900, 279, 756, 1272, 358, 3982, 12123, 7965, 273, 5378, 364, 5690, 316, 365, 18, 4468, 67, 5902, 414, 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, 1743, 67, 4468, 12, 2890, 16, 508, 16, 1965, 16, 819, 16, 3458, 4672, 3536, 10900, 279, 756, 1272, 358, 3982, 12123, 7965, 273, 5378, 364, 5690, 316, 365, 18, 4468, 67, 5902, 414, 30, ...
if (self._client_is_rfc2217 and modemstate & self.modemstate_mask) or force_notification:
if (self._client_is_rfc2217 and (modemstate & self.modemstate_mask)) or force_notification:
def check_modem_lines(self, force_notification=False): modemstate = ( (self.serial.getCTS() and MODEMSTATE_MASK_CTS) | (self.serial.getDSR() and MODEMSTATE_MASK_DSR) | (self.serial.getRI() and MODEMSTATE_MASK_RI) | (self.serial.getCD() and MODEMSTATE_MASK_CD) ) # check what has changed deltas = modemstate ^ (self.last_modemstate or 0) # when last is None -> 0 if deltas & MODEMSTATE_MASK_CTS: modemstate |= MODEMSTATE_MASK_CTS_CHANGE if deltas & MODEMSTATE_MASK_DSR: modemstate |= MODEMSTATE_MASK_DSR_CHANGE if deltas & MODEMSTATE_MASK_RI: modemstate |= MODEMSTATE_MASK_RI_CHANGE if deltas & MODEMSTATE_MASK_CD: modemstate |= MODEMSTATE_MASK_CD_CHANGE # if new state is different and the mask allows this change, send # notification. suppress notifications when client is not rfc2217 if modemstate != self.last_modemstate or force_notification: if (self._client_is_rfc2217 and modemstate & self.modemstate_mask) or force_notification: self.rfc2217SendSubnegotiation( SERVER_NOTIFY_MODEMSTATE, to_bytes([modemstate & self.modemstate_mask]) ) if self.debug_output: print "NOTIFY_MODEMSTATE: %s" % (modemstate,) # save last state, but forget about deltas. # otherwise it would also notify about changing deltas which is # probably not very useful self.last_modemstate = modemstate & 0xf0
a25e3af5f706b678c9512c976fdac1be628b8dbe /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10955/a25e3af5f706b678c9512c976fdac1be628b8dbe/rfc2217.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 3188, 81, 67, 3548, 12, 2890, 16, 2944, 67, 9927, 33, 8381, 4672, 1965, 81, 2019, 273, 261, 261, 2890, 18, 8818, 18, 588, 1268, 55, 1435, 471, 11741, 49, 7998, 67, 11704, 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, 866, 67, 3188, 81, 67, 3548, 12, 2890, 16, 2944, 67, 9927, 33, 8381, 4672, 1965, 81, 2019, 273, 261, 261, 2890, 18, 8818, 18, 588, 1268, 55, 1435, 471, 11741, 49, 7998, 67, 11704, 67...
(msg is None or mod.match(module)) and
(mod is None or mod.match(module)) and
def warn_explicit(message, category, filename, lineno, module=None, registry=None): if module is None: module = filename if module[-3:].lower() == ".py": module = module[:-3] # XXX What about leading pathname? if registry is None: registry = {} if isinstance(message, Warning): text = str(message) category = message.__class__ else: text = message message = category(message) key = (text, category, lineno) # Quick test for common case if registry.get(key): return # Search the filters for item in filters: action, msg, cat, mod, ln = item if ((msg is None or msg.match(text)) and issubclass(category, cat) and (msg is None or mod.match(module)) and (ln == 0 or lineno == ln)): break else: action = defaultaction # Early exit actions if action == "ignore": registry[key] = 1 return if action == "error": raise message # Other actions if action == "once": registry[key] = 1 oncekey = (text, category) if onceregistry.get(oncekey): return onceregistry[oncekey] = 1 elif action == "always": pass elif action == "module": registry[key] = 1 altkey = (text, category, 0) if registry.get(altkey): return registry[altkey] = 1 elif action == "default": registry[key] = 1 else: # Unrecognized actions are errors raise RuntimeError( "Unrecognized action (%r) in warnings.filters:\n %s" % (action, item)) # Print message and context showwarning(message, category, filename, lineno)
37d0208e5d510bc9da42f15d8122edcce1f5ef3c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/37d0208e5d510bc9da42f15d8122edcce1f5ef3c/warnings.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1894, 67, 16511, 12, 2150, 16, 3150, 16, 1544, 16, 7586, 16, 1605, 33, 7036, 16, 4023, 33, 7036, 4672, 309, 1605, 353, 599, 30, 1605, 273, 1544, 309, 1605, 18919, 23, 30, 8009, 8167, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1894, 67, 16511, 12, 2150, 16, 3150, 16, 1544, 16, 7586, 16, 1605, 33, 7036, 16, 4023, 33, 7036, 4672, 309, 1605, 353, 599, 30, 1605, 273, 1544, 309, 1605, 18919, 23, 30, 8009, 8167, ...
_quippy.qp_verbosity_push_i(0)
_quippy.qp_verbosity_push(0)
def quippy_cleanup(): try: _quippy.qp_verbosity_pop() _quippy.qp_system_finalise() except AttributeError: pass
fb4de905e5a8970b64df344ff6c16f0cbee2b5cf /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8914/fb4de905e5a8970b64df344ff6c16f0cbee2b5cf/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 719, 625, 2074, 67, 16732, 13332, 775, 30, 389, 372, 625, 2074, 18, 14166, 67, 16629, 8807, 67, 5120, 1435, 389, 372, 625, 2074, 18, 14166, 67, 4299, 67, 6385, 784, 1435, 1335, 6394, 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, 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, 719, 625, 2074, 67, 16732, 13332, 775, 30, 389, 372, 625, 2074, 18, 14166, 67, 16629, 8807, 67, 5120, 1435, 389, 372, 625, 2074, 18, 14166, 67, 4299, 67, 6385, 784, 1435, 1335, 6394, 3...
result = """<td rowspan="%(len_subfields)s" class="bibEditCellTag"> %(print_tag_field)s %(print_tag_form)s </td> %(subfield)s %(print_link_function)s """ % {'len_subfields' : len_subfields, 'print_tag_field' : print_tag_field, 'print_tag_form' : print_tag_form, 'subfield' : self.tmpl_subfields(ln, recid, subfields[0][0], subfields[0][1], tag_field, format_tag, type_table, 0, num_field, len_subfields), 'print_link_function' : print_link_function}
try: result = """<td rowspan="%(len_subfields)s" class="bibEditCellTag"> %(print_tag_field)s %(print_tag_form)s </td> %(subfield)s %(print_link_function)s """ % {'len_subfields' : len_subfields, 'print_tag_field' : print_tag_field, 'print_tag_form' : print_tag_form, 'subfield' : self.tmpl_subfields(ln, recid, subfields[0][0], subfields[0][1], tag_field, format_tag, type_table, 0, num_field, len_subfields), 'print_link_function' : print_link_function} except IndexError: raise "FIXME: BibEdit does not seem to be able to edit records with controlfields."
def tmpl_table_value(self, ln, recid, tag, field, format_tag, type_table, add, form_add=0): """ Return a field to print in table. """
0ec7cbf5788a8b67811a2c8f45f27c907f73de7d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12027/0ec7cbf5788a8b67811a2c8f45f27c907f73de7d/bibedit_templates.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10720, 67, 2121, 67, 1132, 12, 2890, 16, 7211, 16, 1950, 350, 16, 1047, 16, 652, 16, 740, 67, 2692, 16, 618, 67, 2121, 16, 527, 16, 646, 67, 1289, 33, 20, 4672, 3536, 2000, 279, 65...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10720, 67, 2121, 67, 1132, 12, 2890, 16, 7211, 16, 1950, 350, 16, 1047, 16, 652, 16, 740, 67, 2692, 16, 618, 67, 2121, 16, 527, 16, 646, 67, 1289, 33, 20, 4672, 3536, 2000, 279, 65...
sorted_edges_iterator=iter(sorted(self.edges(), cmp=lambda x,y: weight_function(x)-weight_function(y)))
sorted_edges_iterator=iter(sorted(self.edges(), cmp=cmp))
def min_spanning_tree(self, weight_function=lambda e: 1, algorithm='Kruskal', starting_vertex=None ): """ Returns the edges of a minimum spanning tree, if one exists, otherwise returns False.
70759ef6e049241bec6ab0f319f450ed69144e8d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/70759ef6e049241bec6ab0f319f450ed69144e8d/graph.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1131, 67, 1752, 10903, 67, 3413, 12, 2890, 16, 3119, 67, 915, 33, 14661, 425, 30, 404, 16, 4886, 2218, 47, 8010, 79, 287, 2187, 5023, 67, 15281, 33, 7036, 262, 30, 3536, 2860, 326, 5...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1131, 67, 1752, 10903, 67, 3413, 12, 2890, 16, 3119, 67, 915, 33, 14661, 425, 30, 404, 16, 4886, 2218, 47, 8010, 79, 287, 2187, 5023, 67, 15281, 33, 7036, 262, 30, 3536, 2860, 326, 5...
delta = self.expiration - curr_time if delta.days == -1:
if self.expiration < curr_time:
def time_remaining(self): """ <Purpose> Returns the number of seconds remaining to the assignment of a user to a vessel <Arguments> None <Exceptions> None <Side Effects> None <Returns> Number of seconds before the vessel expires """ curr_time = datetime.datetime.now() delta = self.expiration - curr_time if delta.days == -1: ret = "now" else: hours = delta.seconds / (60 * 60) minutes = (delta.seconds - (hours * 60 * 60)) / 60 ret = str(hours) + "h " + str(minutes) + "m" return ret
f389a59221b1f87a97603e771dab7eb9c821a021 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7263/f389a59221b1f87a97603e771dab7eb9c821a021/models.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 813, 67, 17956, 12, 2890, 4672, 3536, 411, 10262, 4150, 34, 2860, 326, 1300, 434, 3974, 4463, 358, 326, 6661, 434, 279, 729, 358, 279, 331, 403, 292, 411, 4628, 34, 599, 411, 11416, 34...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 813, 67, 17956, 12, 2890, 4672, 3536, 411, 10262, 4150, 34, 2860, 326, 1300, 434, 3974, 4463, 358, 326, 6661, 434, 279, 729, 358, 279, 331, 403, 292, 411, 4628, 34, 599, 411, 11416, 34...
self.__determinant = d
if self.is_immutable(): self.__determinant = d
def determinant(self): r""" Return the determinant of self.
99fc27254328edfe5a8af81a6772d4c4fd568115 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9890/99fc27254328edfe5a8af81a6772d4c4fd568115/matrix.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6328, 970, 12, 2890, 4672, 436, 8395, 2000, 326, 6328, 970, 434, 365, 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, ...
[ 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, 1652, 6328, 970, 12, 2890, 4672, 436, 8395, 2000, 326, 6328, 970, 434, 365, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
po = parsers.PO(content) assert po.write() == content
p = parsers.PO.PO(memory.File(content)) assert p.messages[0].msgid == ['Hello'] assert p.messages[0].msgstr == [u'', u'Hola\n']
def test_output(self): """Test output""" content = '# Comment\n' \ 'msgid "Hello"\n' \ 'msgstr ""\n' \ '"Hola\\n"\n'
a3c81c1d735ba1868ba3eb465b674f362e597962 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12681/a3c81c1d735ba1868ba3eb465b674f362e597962/test_parsers.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 2844, 12, 2890, 4672, 3536, 4709, 876, 8395, 913, 273, 2946, 9821, 64, 82, 11, 521, 296, 3576, 350, 315, 18601, 12691, 82, 11, 521, 296, 27439, 313, 1408, 64, 82, 11, 521, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1842, 67, 2844, 12, 2890, 4672, 3536, 4709, 876, 8395, 913, 273, 2946, 9821, 64, 82, 11, 521, 296, 3576, 350, 315, 18601, 12691, 82, 11, 521, 296, 27439, 313, 1408, 64, 82, 11, 521, ...
print " from paste.cgiserver import run_with_cgi" print " run_with_cgi(app)"
print " from paste.servers.cgi_wsgi import run_with_cgi" print " run_with_cgi(app, redirect_stdout=True)"
def serve(conf, app): replacements = {} replacements['default_config_fn'] = os.path.abspath( server.default_config_fn) # Ideally, other_conf should be any options that came from the # command-line. # @@: This assumes too much about the ordering of namespaces. other_conf = dict(conf.namespaces[-2]) # Not a good idea to let 'verbose' through, but this doesn't really # stop any sourced configs from setting it either... if other_conf.has_key('verbose'): del other_conf['verbose'] replacements['other_conf'] = other_conf template_fn = os.path.join(os.path.dirname(__file__), 'server_script_template.py.txt') template = open(template_fn).read() for name, value in replacements.items(): template = template.replace('@@' + name + '@@', repr(value)) print "#!%s" % sys.executable print template print "if __name__ == '__main__':" print " from paste.cgiserver import run_with_cgi" print " run_with_cgi(app)"
9ac1eb4da881df9f0f98879ee0e4e85307919856 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11400/9ac1eb4da881df9f0f98879ee0e4e85307919856/cgi_server.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12175, 12, 3923, 16, 595, 4672, 11413, 273, 2618, 11413, 3292, 1886, 67, 1425, 67, 4293, 3546, 273, 1140, 18, 803, 18, 5113, 803, 12, 1438, 18, 1886, 67, 1425, 67, 4293, 13, 225, 468, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12175, 12, 3923, 16, 595, 4672, 11413, 273, 2618, 11413, 3292, 1886, 67, 1425, 67, 4293, 3546, 273, 1140, 18, 803, 18, 5113, 803, 12, 1438, 18, 1886, 67, 1425, 67, 4293, 13, 225, 468, ...
sage: a,b,c,d,e,f=sorted(SymmetricGroup(3))
sage: a,b,c,d,e,f = sorted(SymmetricGroup(3))
def canonical_label(self, partition=None, certify=False, verbosity=0, edge_labels=False): """ Returns the canonical label with respect to the partition. If no partition is given, uses the unit partition. INPUT: - ``partition`` - if given, the canonical label with respect to this partition will be computed. The default is the unit partition. - ``certify`` - if True, a dictionary mapping from the (di)graph to its canonical label will be given. - ``verbosity`` - gets passed to nice: prints helpful output. - ``edge_labels`` - default False, otherwise allows only permutations respecting edge labels. EXAMPLE:: sage: D = graphs.DodecahedralGraph() sage: E = D.canonical_label(); E Dodecahedron: Graph on 20 vertices sage: D.canonical_label(certify=True) (Dodecahedron: Graph on 20 vertices, {0: 0, 1: 19, 2: 16, 3: 15, 4: 9, 5: 1, 6: 10, 7: 8, 8: 14, 9: 12, 10: 17, 11: 11, 12: 5, 13: 6, 14: 2, 15: 4, 16: 3, 17: 7, 18: 13, 19: 18}) sage: D.is_isomorphic(E) True Multigraphs:: sage: G = Graph(multiedges=True) sage: G.add_edge((0,1)) sage: G.add_edge((0,1)) sage: G.add_edge((0,1)) sage: G.canonical_label() Multi-graph on 2 vertices Digraphs:: sage: P = graphs.PetersenGraph() sage: DP = P.to_directed() sage: DP.canonical_label().adjacency_matrix() [0 0 0 0 0 0 0 1 1 1] [0 0 0 0 1 0 1 0 0 1] [0 0 0 1 0 0 1 0 1 0] [0 0 1 0 0 1 0 0 0 1] [0 1 0 0 0 1 0 0 1 0] [0 0 0 1 1 0 0 1 0 0] [0 1 1 0 0 0 0 1 0 0] [1 0 0 0 0 1 1 0 0 0] [1 0 1 0 1 0 0 0 0 0] [1 1 0 1 0 0 0 0 0 0] Edge labeled graphs:: sage: G = Graph(implementation='networkx') sage: G.add_edges( [(0,1,'a'),(1,2,'b'),(2,3,'c'),(3,4,'b'),(4,0,'a')] ) sage: G.canonical_label(edge_labels=True) Graph on 5 vertices """ import sage.groups.perm_gps.partn_ref.refinement_graphs from sage.groups.perm_gps.partn_ref.refinement_graphs import search_tree
29b594d9895313ea6ca0065ec3d0602f32782dd9 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/29b594d9895313ea6ca0065ec3d0602f32782dd9/graph.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7378, 67, 1925, 12, 2890, 16, 3590, 33, 7036, 16, 3320, 1164, 33, 8381, 16, 11561, 33, 20, 16, 3591, 67, 5336, 33, 8381, 4672, 3536, 2860, 326, 7378, 1433, 598, 8762, 358, 326, 3590, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7378, 67, 1925, 12, 2890, 16, 3590, 33, 7036, 16, 3320, 1164, 33, 8381, 16, 11561, 33, 20, 16, 3591, 67, 5336, 33, 8381, 4672, 3536, 2860, 326, 7378, 1433, 598, 8762, 358, 326, 3590, ...
new_regex = self._or_(regex)
new_regex = self._or_(regex, False)
def or_(self, regex): """ Create new optimized version of a|b. Returns None if there is no interesting optimization. """ # (a|b) where a match b => a # eg. ([a-z|[a-b]) => [a-z] if self.match(regex): return self
a2e7fcad5dec1414a3bcb02b36e930f96c13ef05 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9327/a2e7fcad5dec1414a3bcb02b36e930f96c13ef05/regex.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 578, 67, 12, 2890, 16, 3936, 4672, 3536, 1788, 394, 15411, 1177, 434, 279, 96, 70, 18, 2860, 599, 309, 1915, 353, 1158, 26122, 14850, 18, 3536, 468, 261, 69, 96, 70, 13, 1625, 279, 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, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 578, 67, 12, 2890, 16, 3936, 4672, 3536, 1788, 394, 15411, 1177, 434, 279, 96, 70, 18, 2860, 599, 309, 1915, 353, 1158, 26122, 14850, 18, 3536, 468, 261, 69, 96, 70, 13, 1625, 279, 8...
if ira.file_size: self._doclog.warning( "ir.attachment raise IOError(errno.ENOENT, 'No file can be located') fpath = os.path.join(boo.path, ira.store_fname)
if mode in ('r','r+'): if ira.file_size: self._doclog.warning( "ir.attachment raise IOError(errno.ENOENT, 'No file can be located') else: store_fname = self.__get_random_fname(boo.path) cr.execute('UPDATE ir_attachment SET store_fname = %s WHERE id = %s', (store_fname, ira.id)) fpath = os.path.join(boo.path, store_fname) else: fpath = os.path.join(boo.path, ira.store_fname)
def get_file(self, cr, uid, id, file_node, mode, context=None): """ Return a file-like object for the contents of some node """ if context is None: context = {} boo = self.browse(cr, uid, id, context) if not boo.online: raise RuntimeError('media offline') ira = self.pool.get('ir.attachment').browse(cr, uid, file_node.file_id, context=context) if boo.type == 'filestore': if not ira.store_fname: # On a migrated db, some files may have the wrong storage type # try to fix their directory. if ira.file_size: self._doclog.warning( "ir.attachment #%d does not have a filename, but is at filestore, fix it!" % ira.id) raise IOError(errno.ENOENT, 'No file can be located') fpath = os.path.join(boo.path, ira.store_fname) return nodefd_file(file_node, path=fpath, mode=mode)
31d45716ca29df2809d98d6aed3e9a5eb64d20d9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/31d45716ca29df2809d98d6aed3e9a5eb64d20d9/document_storage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 768, 12, 2890, 16, 4422, 16, 4555, 16, 612, 16, 585, 67, 2159, 16, 1965, 16, 819, 33, 7036, 4672, 3536, 2000, 279, 585, 17, 5625, 733, 364, 326, 2939, 434, 2690, 756, 3536, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 768, 12, 2890, 16, 4422, 16, 4555, 16, 612, 16, 585, 67, 2159, 16, 1965, 16, 819, 33, 7036, 4672, 3536, 2000, 279, 585, 17, 5625, 733, 364, 326, 2939, 434, 2690, 756, 3536, ...
'params', 'pi_start', 'pi_end', 'xinit_start', 'xinit_end', 'u_start', 'u_end', ]
'params', 'pi_start', 'pi_end', 'xinit_start', 'xinit_end', 'u_start', 'u_end', ]
def _Jac(N, J, t, y, fy, jac_data, tmp1, tmp2, tmp3): """ Set Jacobian calculated by JMI. This function is a callback function for (Py)SUNDIALS. """ data = ctypes.cast(jac_data, PUserData).contents model = data.model model.setTime(t) model.setStates(y) J_jmi = model.evalJacX() for row in xrange(len(J_jmi)): for col in xrange(len(J_jmi[row])): J[row][col] = J_jmi[row][col] return 0
6f9de9e370a3e7fc0d381d47d68431314fad33c5 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7711/6f9de9e370a3e7fc0d381d47d68431314fad33c5/shooting.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 46, 1077, 12, 50, 16, 804, 16, 268, 16, 677, 16, 28356, 16, 20138, 67, 892, 16, 1853, 21, 16, 1853, 22, 16, 1853, 23, 4672, 3536, 1000, 804, 1077, 26968, 8894, 635, 804, 7492, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 46, 1077, 12, 50, 16, 804, 16, 268, 16, 677, 16, 28356, 16, 20138, 67, 892, 16, 1853, 21, 16, 1853, 22, 16, 1853, 23, 4672, 3536, 1000, 804, 1077, 26968, 8894, 635, 804, 7492, ...
__lio_target_del_tpg(None, None, tpg_val, None)
__lio_target_del_tpg(None, None, tpg_val, None, 0)
def lio_target_unload(option, opt_str, value, parser): if not os.path.isdir(lio_root): lio_err("Unable to access lio_root: " + lio_root) iqn_root = os.listdir(lio_root) # Loop through LIO-Target IQN list for iqn in iqn_root: if iqn == "lio_version": continue # Loop through LIO-Target IQN+TPGT list tpg_root = os.listdir(lio_root + "/" + iqn); for tpgt_tmp in tpg_root: tpgt_tmp2 = tpgt_tmp.split('_') tpgt = tpgt_tmp2[1] np_root = os.listdir(lio_root + "/" + iqn + "/tpgt_" + tpgt + "/np") for np in np_root: np_val = [iqn,tpgt,np] lio_target_del_np(None, None, np_val, None) nacl_root = os.listdir(lio_root + "/" + iqn + "/tpgt_" + tpgt + "/acls") for nacl in nacl_root: nacl_val = [iqn,tpgt,nacl] lio_target_del_nodeacl(None, None, nacl_val, None) lun_root = os.listdir(lio_root + "/" + iqn + "/tpgt_" + tpgt + "/lun") for lun_tmp in lun_root: lun_tmp2 = lun_tmp.split('_') lun = lun_tmp2[1] lun_val = [iqn,tpgt,lun] __lio_target_del_port(None, None, lun_val, None) tpg_val = [iqn,tpgt] __lio_target_del_tpg(None, None, tpg_val, None) __lio_target_del_iqn(None, None, iqn, None, 0) rmdir_op = "rmdir " + lio_root ret = os.system(rmdir_op) if ret: print "Unable to release lio_root: " + lio_root rmmod_op = "rmmod iscsi_target_mod" ret = os.system(rmmod_op) if ret: print "Unable to unload iscsi_target_mod" return
ea3761ed38da7ac34381d247f75ab501a307aa08 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8449/ea3761ed38da7ac34381d247f75ab501a307aa08/lio_node.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 328, 1594, 67, 3299, 67, 318, 945, 12, 3482, 16, 2153, 67, 701, 16, 460, 16, 2082, 4672, 225, 309, 486, 1140, 18, 803, 18, 291, 1214, 12, 549, 83, 67, 3085, 4672, 328, 1594, 67, 37...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 328, 1594, 67, 3299, 67, 318, 945, 12, 3482, 16, 2153, 67, 701, 16, 460, 16, 2082, 4672, 225, 309, 486, 1140, 18, 803, 18, 291, 1214, 12, 549, 83, 67, 3085, 4672, 328, 1594, 67, 37...
Returns a comma+space-separated string of keywords from either a list or a string
Returns a comma+space-separated string of keywords from either a list or a string
def get_keywords_as_string(keywords): """ Returns a comma+space-separated string of keywords from either a list or a string """ if type(keywords) is list: keywords = ', '.join(keywords) if type(keywords) is str: final_keywords = keywords elif type(keywords) is unicode: final_keywords = keywords.encode('utf-8') elif keywords is None: final_keywords = "" else: raise TypeError("keywords argument must be a string or a list of strings; got a %s" % type(keywords)) return final_keywords
ccfdc9ec5c0cd1044df8085ab2d2c98d4f4618d0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1098/ccfdc9ec5c0cd1044df8085ab2d2c98d4f4618d0/connection.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 11771, 67, 345, 67, 1080, 12, 11771, 4672, 3536, 2860, 279, 8716, 15, 2981, 17, 24622, 533, 434, 7093, 628, 3344, 279, 666, 578, 279, 533, 3536, 309, 618, 12, 11771, 13, 353, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 11771, 67, 345, 67, 1080, 12, 11771, 4672, 3536, 2860, 279, 8716, 15, 2981, 17, 24622, 533, 434, 7093, 628, 3344, 279, 666, 578, 279, 533, 3536, 309, 618, 12, 11771, 13, 353, ...
typ, lltype, _ = converter if typ == member_type result = rffi.cast(rffi.CArrayPtr(lltype), addr)
typ, lltyp, _ = converter if typ == member_type: result = rffi.cast(rffi.CArrayPtr(lltyp), addr)
def PyMember_GetOne(space, obj, w_member): addr = rffi.cast(ADDR, obj) addr += w_member.c_offset member_type = rffi.cast(lltype.Signed, w_member.c_type) for converter in integer_converters: typ, lltype, _ = converter if typ == member_type result = rffi.cast(rffi.CArrayPtr(lltype), addr) w_result = space.wrap(result[0]) return w_result if member_type == structmemberdefs.T_STRING: result = rffi.cast(rffi.CCHARPP, addr) if result[0]: w_result = PyString_FromString(space, result[0]) else: w_result = space.w_None elif member_type == structmemberdefs.T_STRING_INPLACE: result = rffi.cast(rffi.CCHARP, addr) w_result = PyString_FromString(space, result) elif member_type == structmemberdefs.T_CHAR: result = rffi.cast(rffi.CCHARP, addr) w_result = space.wrap(result[0]) elif member_type == structmemberdefs.T_OBJECT: obj_ptr = rffi.cast(PyObjectP, addr) if obj_ptr[0]: w_result = from_ref(space, obj_ptr[0]) else: w_result = space.w_None elif member_type == T_OBJECT_EX: obj_ptr = rffi.cast(PyObjectP, addr) if obj_ptr[0]: w_result = from_ref(space, obj_ptr[0]) else: w_name = space.wrap(rffi.charp2str(w_member.c_name)) raise OperationError(space.w_AttributeError, w_name) else: raise OperationError(space.w_SystemError, space.wrap("bad memberdescr type")) return w_result
7d8ca48ae382f8f8ee1722452fcde8de660d979e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6934/7d8ca48ae382f8f8ee1722452fcde8de660d979e/structmember.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4707, 4419, 67, 967, 3335, 12, 2981, 16, 1081, 16, 341, 67, 5990, 4672, 3091, 273, 436, 1403, 77, 18, 4155, 12, 14142, 16, 1081, 13, 3091, 1011, 341, 67, 5990, 18, 71, 67, 3348, 225,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4707, 4419, 67, 967, 3335, 12, 2981, 16, 1081, 16, 341, 67, 5990, 4672, 3091, 273, 436, 1403, 77, 18, 4155, 12, 14142, 16, 1081, 13, 3091, 1011, 341, 67, 5990, 18, 71, 67, 3348, 225,...
if kwargs.get('redefine', False):
if kwargs.pop('redefine', False):
def __call__(self, name, engine, *args, **kwargs): try: schema = kwargs.get('schema', None) key = _get_table_key(engine, name, schema) table = engine.tables[key] if len(args): if kwargs.get('redefine', False): table.reload_values(*args) else: raise "Table '%s.%s' is already defined. specify 'redefine=True' to remap columns" % (schema, name) return table except KeyError: if kwargs.get('mustexist', False): raise "Table '%s.%s' not defined" % (schema, name) table = type.__call__(self, name, engine, *args, **kwargs) engine.tables[key] = table # load column definitions from the database if 'autoload' is defined # we do it after the table is in the singleton dictionary to support # circular foreign keys if kwargs.get('autoload', False): engine.reflecttable(table)
ba1e7878ecf96f68bd73903768469cb3b57a1516 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1074/ba1e7878ecf96f68bd73903768469cb3b57a1516/schema.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 508, 16, 4073, 16, 380, 1968, 16, 2826, 4333, 4672, 775, 30, 1963, 273, 1205, 18, 588, 2668, 4821, 2187, 599, 13, 498, 273, 389, 588, 67, 2121, 67, 856...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1991, 972, 12, 2890, 16, 508, 16, 4073, 16, 380, 1968, 16, 2826, 4333, 4672, 775, 30, 1963, 273, 1205, 18, 588, 2668, 4821, 2187, 599, 13, 498, 273, 389, 588, 67, 2121, 67, 856...
*pendantic*: [ True | False ]
*pedantic*: [ True | False ]
def vo_read(self, filename, pedantic=False, verbose=True): ''' Read all tables from a VOT file
fb5bd4b4ba601f95313106c2126000e74ccbb6bf /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13233/fb5bd4b4ba601f95313106c2126000e74ccbb6bf/votable.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 19993, 67, 896, 12, 2890, 16, 1544, 16, 31840, 9941, 33, 8381, 16, 3988, 33, 5510, 4672, 9163, 2720, 777, 4606, 628, 279, 776, 1974, 585, 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, 19993, 67, 896, 12, 2890, 16, 1544, 16, 31840, 9941, 33, 8381, 16, 3988, 33, 5510, 4672, 9163, 2720, 777, 4606, 628, 279, 776, 1974, 585, 2, -100, -100, -100, -100, -100, -100, -100, -...
if ( len(Document.get_completed(self.user, self.program_anchor_cached)) > 0 ):
if ( len(Document.get_completed(self.user, self.program_anchor_cached())) > 0 ):
def isCompleted(self): """ Whether the user has paid for this program or its parent program. """ if ( len(Document.get_completed(self.user, self.program_anchor_cached)) > 0 ): return True else: parent_program = self.program.getParentProgram() if parent_program is not None: return ( len(Document.get_completed(self.user, parent_program.anchor)) > 0 )
b8776d13f6b416e598cee68ad51d54ce0a9fe4e8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12041/b8776d13f6b416e598cee68ad51d54ce0a9fe4e8/creditcardmodule_cybersource.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 9556, 12, 2890, 4672, 3536, 17403, 326, 729, 711, 30591, 364, 333, 5402, 578, 2097, 982, 5402, 18, 3536, 309, 261, 562, 12, 2519, 18, 588, 67, 13615, 12, 2890, 18, 1355, 16, 365, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 9556, 12, 2890, 4672, 3536, 17403, 326, 729, 711, 30591, 364, 333, 5402, 578, 2097, 982, 5402, 18, 3536, 309, 261, 562, 12, 2519, 18, 588, 67, 13615, 12, 2890, 18, 1355, 16, 365, ...
tid = coord()
tid = Coord()
def movetholian(): "Move the Tholian." if not game.tholian or game.justin: return tid = coord() if game.tholian.location.i == 0 and game.tholian.location.j == 0: tid.i = 0; tid.j = QUADSIZE-1 elif game.tholian.location.i == 0 and game.tholian.location.j == QUADSIZE-1: tid.i = QUADSIZE-1; tid.j = QUADSIZE-1 elif game.tholian.location.i == QUADSIZE-1 and game.tholian.location.j == QUADSIZE-1: tid.i = QUADSIZE-1; tid.j = 0 elif game.tholian.location.i == QUADSIZE-1 and game.tholian.location.j == 0: tid.i = 0; tid.j = 0 else: # something is wrong! game.tholian.move(None) prout("***Internal error: Tholian in a bad spot.") return # do nothing if we are blocked if game.quad[tid.i][tid.j] not in ('.', '#'): return here = copy.copy(game.tholian.location) delta = (tid - game.tholian.location).sgn() # move in x axis while here.i != tid.i: here.i += delta.i if game.quad[here.i][here.j]=='.': game.tholian.move(here) # move in y axis while here.j != tid.j: here.j += delta.j if game.quad[here.i][here.j]=='.': game.tholian.move(here) # check to see if all holes plugged for i in range(QUADSIZE): if game.quad[0][i]!='#' and game.quad[0][i]!='T': return if game.quad[QUADSIZE-1][i]!='#' and game.quad[QUADSIZE-1][i]!='T': return if game.quad[i][0]!='#' and game.quad[i][0]!='T': return if game.quad[i][QUADSIZE-1]!='#' and game.quad[i][QUADSIZE-1]!='T': return # All plugged up -- Tholian splits game.quad[game.tholian.location.i][game.tholian.location.j]='#' dropin(' ') prout(crmena(True, 'T', "sector", game.tholian) + _(" completes web.")) game.tholian.move(None) return
e571d502c19abfb5a3320300c347793da7b43d05 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3176/e571d502c19abfb5a3320300c347793da7b43d05/sst.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5730, 546, 355, 2779, 13332, 315, 7607, 326, 935, 355, 2779, 1199, 309, 486, 7920, 18, 451, 355, 2779, 578, 7920, 18, 3732, 267, 30, 327, 11594, 273, 10320, 1435, 309, 7920, 18, 451, 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, 5730, 546, 355, 2779, 13332, 315, 7607, 326, 935, 355, 2779, 1199, 309, 486, 7920, 18, 451, 355, 2779, 578, 7920, 18, 3732, 267, 30, 327, 11594, 273, 10320, 1435, 309, 7920, 18, 451, 3...
lines[i] = '<cell multicolumn="%s" alignment="%s" valignment="%s" topline="%s" bottomline="%s" leftline="%s" rightline="%s" rotate="%s" usebox="%s" width="%s" special="%s">' % ( val[0], align_table[val[1]], align_table[val[2]], bool_table[val[3]], bool_table[val[4]], bool_table[val[5]], bool_table[val[6]], bool_table[val[7]], use_table[val[8]], val[9], val[10])
lines[i] = '<cell multicolumn="%s" alignment="%s" valignment="%s" topline="%s" bottomline="%s" leftline="%s" rightline="%s" rotate="%s" usebox="%s" width="%s" special="%s">' % ( val[0], align_table[val[1]], align_table[val[2]], bool_table(val[3]), bool_table(val[4]), bool_table(val[5]), bool_table(val[6]), bool_table(val[7]), use_table[val[8]], val[9], val[10])
def table_update(lines): lines[1] = string.replace(lines[1], '<Features', '<features') res = features_re.match( lines[1] ) if res: val = res.groups() lines[1] = '<features rotate="%s" islongtable="%s" endhead="%s" endfirsthead="%s" endfoot="%s" endlastfoot="%s">' % (bool_table[val[0]], bool_table[val[1]], val[2], val[3], val[4], val[5]) if lines[2]=="": del lines[2] i = 2 col_info = [] while i < len(lines): lines[i] = string.replace(lines[i], '<Cell', '<cell') lines[i] = string.replace(lines[i], '</Cell', '</cell') lines[i] = string.replace(lines[i], '<Row', '<row') lines[i] = string.replace(lines[i], '</Row', '</row') lines[i] = string.replace(lines[i], '<Column', '<column') lines[i] = string.replace(lines[i], '</Column', '</column') lines[i] = string.replace(lines[i], '</LyXTabular', '</lyxtabular') k = string.find (lines[i], '<column ') if k != -1: col_info.append(lines[i]) del lines[i] continue if lines[i] == '</column>' or lines[i] == '<column>': del lines[i] continue res = cell_re.match(lines[i]) if res: val = res.groups() lines[i] = '<cell multicolumn="%s" alignment="%s" valignment="%s" topline="%s" bottomline="%s" leftline="%s" rightline="%s" rotate="%s" usebox="%s" width="%s" special="%s">' % ( val[0], align_table[val[1]], align_table[val[2]], bool_table[val[3]], bool_table[val[4]], bool_table[val[5]], bool_table[val[6]], bool_table[val[7]], use_table[val[8]], val[9], val[10]) res = row_re.match(lines[i]) if res: val = res.groups() lines[i] = '<row topline="%s" bottomline="%s" newpage="%s">' % (bool_table[val[0]], bool_table[val[1]], bool_table[val[2]]) i = i + 1 j = len(col_info) for i in range(j): res = col_re.match(col_info[i]) if res: val = res.groups() col_info[i] = '<column alignment="%s" valignment="%s" leftline="%s" rightline="%s" width="%s" special="%s">' \ % ( align_table[val[0]], align_table[val[1]], bool_table[val[2]], bool_table[val[3]], val[4],val[5]) return lines[:2] + col_info + lines[2:]
7c7f326f6406cb6eeed546204a642bbf372bf26b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7514/7c7f326f6406cb6eeed546204a642bbf372bf26b/lyxconvert_217.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1014, 67, 2725, 12, 3548, 4672, 2362, 63, 21, 65, 273, 533, 18, 2079, 12, 3548, 63, 21, 6487, 2368, 8696, 2187, 2368, 7139, 6134, 400, 273, 4467, 67, 266, 18, 1916, 12, 2362, 63, 21,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1014, 67, 2725, 12, 3548, 4672, 2362, 63, 21, 65, 273, 533, 18, 2079, 12, 3548, 63, 21, 6487, 2368, 8696, 2187, 2368, 7139, 6134, 400, 273, 4467, 67, 266, 18, 1916, 12, 2362, 63, 21,...
_dictEntries.append((name, value)) dict.__init__(self, _dictEntries)
self[name] = value
def __init__(self, items=()): _dictEntries = [] for name,value in items: if type(name) in (list, tuple, frozenset, set): for item in name: _dictEntries.append((item, value)) else: _dictEntries.append((name, value)) dict.__init__(self, _dictEntries) self.default = None
5e5309d9e1b81e6ea67c6e6c86d82d0a3ab62a2e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9368/5e5309d9e1b81e6ea67c6e6c86d82d0a3ab62a2e/utils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1516, 33, 1435, 4672, 389, 1576, 5400, 273, 5378, 364, 508, 16, 1132, 316, 1516, 30, 309, 618, 12, 529, 13, 316, 261, 1098, 16, 3193, 16, 23462, 16, 44...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1516, 33, 1435, 4672, 389, 1576, 5400, 273, 5378, 364, 508, 16, 1132, 316, 1516, 30, 309, 618, 12, 529, 13, 316, 261, 1098, 16, 3193, 16, 23462, 16, 44...
<item text="All" id="landscape_all" open="1" im0="tombs.gif" im1="tombs.gif" im2="iconSafe.gif" call="1" select="1">
<item text="All" id="cat_all" open="1" im0="tombs.gif" im1="tombs.gif" im2="iconSafe.gif" call="1" select="1">
def create_xml_for_tabs(self, symbols_list=None): if symbols_list is not None and len(symbols_list) > 0: r = [] for symbol in symbols_list: s = """ <item text="%s" id="%s" im0="%s" im1="folderOpen.gif" im2="folderClosed.gif" />""" \ % (self.utXmlEncode(symbol.title), self.utXmlEncode(symbol.id), '%s/getSymbolPicture?id=%s' % ( self.absolute_url(), symbol.id ) ) r.append(s)
d1910a5c41ed2d3581e404d63849fa30c5449123 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3287/d1910a5c41ed2d3581e404d63849fa30c5449123/GeoMapTool.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 2902, 67, 1884, 67, 16056, 12, 2890, 16, 7963, 67, 1098, 33, 7036, 4672, 309, 7963, 67, 1098, 353, 486, 599, 471, 562, 12, 15536, 67, 1098, 13, 405, 374, 30, 436, 273, 5378,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 2902, 67, 1884, 67, 16056, 12, 2890, 16, 7963, 67, 1098, 33, 7036, 4672, 309, 7963, 67, 1098, 353, 486, 599, 471, 562, 12, 15536, 67, 1098, 13, 405, 374, 30, 436, 273, 5378,...
dir = os.path.join(*paths) return os.path.normcase(os.path.abspath(dir)) L = sys.modules.values() for m in L:
dir = os.path.abspath(os.path.join(*paths)) return dir, os.path.normcase(dir) for m in sys.modules.values():
def makepath(*paths): dir = os.path.join(*paths) return os.path.normcase(os.path.abspath(dir))
c4ce4db3160f9a22a1062ef98f6390b7bfe4e61d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/c4ce4db3160f9a22a1062ef98f6390b7bfe4e61d/site.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 803, 30857, 4481, 4672, 1577, 273, 1140, 18, 803, 18, 5701, 30857, 4481, 13, 327, 1140, 18, 803, 18, 7959, 3593, 12, 538, 18, 803, 18, 5113, 803, 12, 1214, 3719, 225, 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, 1221, 803, 30857, 4481, 4672, 1577, 273, 1140, 18, 803, 18, 5701, 30857, 4481, 13, 327, 1140, 18, 803, 18, 7959, 3593, 12, 538, 18, 803, 18, 5113, 803, 12, 1214, 3719, 225, 2, -100, ...
key = 'None'
key = ''
def generic_visit(self, node): self.nodecnt += 1 #self.childNodeMap[self.nodecnt] = node self.childNodeMap[node] = self.nodecnt node_xmlrepr = self.xmlrepr.createElement(node.__class__.__name__ + "Ast") node_xmlrepr.setAttribute('nodecnt', str(self.nodecnt)) self.currentnode.appendChild(node_xmlrepr) save_currentnode = self.currentnode self.currentnode = node_xmlrepr fields = list(node._attributes) fields.extend(list(node._fields)) searching_locally = [] for field in fields: value = getattr(node, field) if type(value) not in [types.IntType, types.StringType, types.FloatType, types.BooleanType]: continue node_xmlrepr.setAttribute(field.lower(), str(value))
d397fae6d353ff1cc9abb1016ccacc065c44fbb1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6362/d397fae6d353ff1cc9abb1016ccacc065c44fbb1/pythonpythonparser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5210, 67, 11658, 12, 2890, 16, 756, 4672, 365, 18, 2159, 13085, 1011, 404, 225, 468, 2890, 18, 3624, 907, 863, 63, 2890, 18, 2159, 13085, 65, 273, 756, 365, 18, 3624, 907, 863, 63, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5210, 67, 11658, 12, 2890, 16, 756, 4672, 365, 18, 2159, 13085, 1011, 404, 225, 468, 2890, 18, 3624, 907, 863, 63, 2890, 18, 2159, 13085, 65, 273, 756, 365, 18, 3624, 907, 863, 63, 2...
print procfile
def __init__(self, file, as_eps = 1, bounding_box = None, document = None, printable = 1, visible = 0, rotate = 0, embed_fonts = 0, **options): if as_eps and not bounding_box: raise ValueError, 'bounding_box required for EPS'
316f6d0bcbb880600b07926c10d2d1602d7552d5 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3123/316f6d0bcbb880600b07926c10d2d1602d7552d5/psdevice.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 585, 16, 487, 67, 13058, 273, 404, 16, 7552, 67, 2147, 273, 599, 16, 1668, 273, 599, 16, 23474, 273, 404, 16, 6021, 273, 374, 16, 8534, 273, 374, 16, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 585, 16, 487, 67, 13058, 273, 404, 16, 7552, 67, 2147, 273, 599, 16, 1668, 273, 599, 16, 23474, 273, 404, 16, 6021, 273, 374, 16, 8534, 273, 374, 16, ...
newStates.append(controlTypes.STATE_COLLAPSED) return frozenset(newStates)
newStates.add(controlTypes.STATE_COLLAPSED) return newStates
def _get_states(self): newStates=[] for state in api.createStateList(self.IAccessibleStates): if IAccessibleStatesToNVDAStates.has_key(state): newStates.append(IAccessibleStatesToNVDAStates[state]) hItem=winUser.sendMessage(self.windowHandle,CLM_GETSELECTION,0,0) state=winUser.sendMessage(self.windowHandle,CLM_GETEXPAND,hItem,0) if state==CLE_EXPAND: newStates.append(controlTypes.STATE_EXPANDED) elif state==CLE_COLLAPSE: newStates.append(controlTypes.STATE_COLLAPSED) return frozenset(newStates)
dde09fa1cac1e9af94e273b59f16fe473eb7cd07 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9340/dde09fa1cac1e9af94e273b59f16fe473eb7cd07/miranda32.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 7992, 12, 2890, 4672, 394, 7629, 33, 8526, 364, 919, 316, 1536, 18, 2640, 1119, 682, 12, 2890, 18, 45, 10451, 7629, 4672, 309, 467, 10451, 7629, 774, 11679, 9793, 7629, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 7992, 12, 2890, 4672, 394, 7629, 33, 8526, 364, 919, 316, 1536, 18, 2640, 1119, 682, 12, 2890, 18, 45, 10451, 7629, 4672, 309, 467, 10451, 7629, 774, 11679, 9793, 7629, 1...
Try:
try:
def handle_message(self, message): ''' message - a Message instance
338383ee6b65b5dc64411e4689652e526e7faa34 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/338383ee6b65b5dc64411e4689652e526e7faa34/mailgw.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 67, 2150, 12, 2890, 16, 883, 4672, 9163, 883, 300, 279, 2350, 791, 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...
[ 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, 1652, 1640, 67, 2150, 12, 2890, 16, 883, 4672, 9163, 883, 300, 279, 2350, 791, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
pool.start(analyze)
startSearching(analyze)
def go (queue): """ Finds and prints the best move from the current position """ searchLock.acquire() try: queue.put(None) # TODO: Length info should be put in the book. # Btw. 10 is not enough. Try 20 if len(board.history) < 14: movestr = getBestOpening(board) if movestr: mvs = [parseSAN(board, movestr)] if len(board.history) >= 14 or not movestr: global mytime, increment, scr lsearch.skipPruneChance = skipPruneChance lsearch.searching = True if mytime == None: lsearch.endtime = sys.maxint mvs, scr = alphaBeta (board, sd) else: usetime = mytime / remainingMovesA(len(board.history)) if mytime < 6*60+increment*40: # If game is blitz, we assume 40 moves rather than 80 usetime *= 2 # The increment is a constant. We'll use this allways usetime += increment if usetime < 0.5: # We don't wan't to search for e.g. 0 secs usetime = 0.5 starttime = time() lsearch.endtime = starttime + usetime prevtime = 0 print "Time left: %3.2f seconds; Planing to thinking for %3.2f seconds" % \ (mytime, usetime) for depth in range(1, sd+1): # Heuristic time saving # Don't waste time, if the estimated isn't enough to complete next depth if usetime > prevtime*4 or usetime <= 1: lsearch.timecheck_counter = lsearch.TIMECHECK_FREQ search_result = alphaBeta(board, depth) if lsearch.searching: mvs, scr = search_result if time() > lsearch.endtime: # Endtime occured after depth break else: # Endtime occured in depth print "Endtime occoured while I was searching depth %d" % depth break prevtime = time()-starttime - prevtime else: print "I don't have enough time to go into depth %d" % depth # Not enough time for depth break else: print "I searched through depths [1, %d]" % (sd+1) mytime -= time() - starttime mytime += increment if not mvs: if not lsearch.searching: # We were interupted lsearch.movesearches = 0 lsearch.nodes = 0 searchLock.release() return #if lsearch.last == 4: # print "resign" #else: if scr == 0: print "result", reprResult[DRAW] elif scr < 0: if board.color == WHITE: print "result", reprResult[BLACKWON] else: print "result", reprResult[WHITEWON] else: if board.color == WHITE: print "result", reprResult[WHITEWON] else: print "result", reprResult[BLACKWON] print "last:", lsearch.last, scr return print "moves were:", " ".join(listToSan(board, mvs)), scr lsearch.movesearches = 0 lsearch.nodes = 0 lsearch.searching = False move = mvs[0] print "move", toSAN(board, move) board.applyMove(move) finally: searchLock.release()
3989d5f03e9e09f795eaf02ffa22de695b21e8e9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5339/3989d5f03e9e09f795eaf02ffa22de695b21e8e9/PyChess.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1960, 261, 4000, 4672, 3536, 4163, 87, 471, 14971, 326, 3796, 3635, 628, 326, 783, 1754, 3536, 1623, 2531, 18, 1077, 1039, 1435, 775, 30, 2389, 18, 458, 12, 7036, 13, 468, 2660, 30, 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, 1960, 261, 4000, 4672, 3536, 4163, 87, 471, 14971, 326, 3796, 3635, 628, 326, 783, 1754, 3536, 1623, 2531, 18, 1077, 1039, 1435, 775, 30, 2389, 18, 458, 12, 7036, 13, 468, 2660, 30, 11...
print dep
def add_tasks(self, fn, dataCache): """ Add tasks for a given fn to the database """
d40615961e843851f59f5b3dda141745989d80bb /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2672/d40615961e843851f59f5b3dda141745989d80bb/taskdata.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 9416, 12, 2890, 16, 2295, 16, 501, 1649, 4672, 3536, 1436, 4592, 364, 279, 864, 2295, 358, 326, 2063, 3536, 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, 527, 67, 9416, 12, 2890, 16, 2295, 16, 501, 1649, 4672, 3536, 1436, 4592, 364, 279, 864, 2295, 358, 326, 2063, 3536, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
profile = graph.get_object(id) name = unicodedata.normalize('NFKD', profile["name"]).encode('ascii', 'ignore')
def get_facebook_nickname(user): email = user.email() memcache_key = "facebook_nickname_%s" % email name = memcache.get(memcache_key) if name is not None: return name id = email.replace(FACEBOOK_ID_EMAIL_PREFIX, "") graph = facebook.GraphAPI() profile = graph.get_object(id) # Workaround http://code.google.com/p/googleappengine/issues/detail?id=573 name = unicodedata.normalize('NFKD', profile["name"]).encode('ascii', 'ignore') memcache.set(memcache_key, name, time=FACEBOOK_CACHE_EXPIRATION_SECONDS) return name
50af9c17c5baf16c0606a9f2f3d697b7c3e8a25c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12010/50af9c17c5baf16c0606a9f2f3d697b7c3e8a25c/facebook_util.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 23130, 67, 17091, 529, 12, 1355, 4672, 225, 2699, 273, 729, 18, 3652, 1435, 225, 20549, 67, 856, 273, 315, 23130, 67, 17091, 529, 10185, 87, 6, 738, 2699, 508, 273, 20549, 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, 336, 67, 23130, 67, 17091, 529, 12, 1355, 4672, 225, 2699, 273, 729, 18, 3652, 1435, 225, 20549, 67, 856, 273, 315, 23130, 67, 17091, 529, 10185, 87, 6, 738, 2699, 508, 273, 20549, 18,...
for anc in getProperAncestors(stateList[0],None): if all(isDescendant(s,anc) for s in stateList[1:]):
for anc in getProperAncestors(stateList[0], None): if all(map(lambda(s): isDescendant(s,anc), stateList[1:])):
def findLCA(stateList): for anc in getProperAncestors(stateList[0],None): if all(isDescendant(s,anc) for s in stateList[1:]): return anc
fa72944ebe9c1a503306771dfea5ec44a5989133 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10998/fa72944ebe9c1a503306771dfea5ec44a5989133/interpreter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 48, 3587, 12, 2019, 682, 4672, 364, 392, 71, 316, 3570, 457, 28304, 12, 2019, 682, 63, 20, 6487, 599, 4672, 309, 777, 12, 1458, 12, 14661, 12, 87, 4672, 353, 29014, 12, 87, 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, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 48, 3587, 12, 2019, 682, 4672, 364, 392, 71, 316, 3570, 457, 28304, 12, 2019, 682, 63, 20, 6487, 599, 4672, 309, 777, 12, 1458, 12, 14661, 12, 87, 4672, 353, 29014, 12, 87, 16,...
startupinfo.dwFlags |= STARTF_USESHOWWINDOW startupinfo.wShowWindow = SW_HIDE
startupinfo.dwFlags |= _subprocess.STARTF_USESHOWWINDOW startupinfo.wShowWindow = _subprocess.SW_HIDE
def _execute_child(self, args, executable, preexec_fn, close_fds, cwd, env, universal_newlines, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite): """Execute program (MS Windows version)"""
a2936cfa0989988f3e9f9ce6aec7d5657a2f73ba /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8546/a2936cfa0989988f3e9f9ce6aec7d5657a2f73ba/subprocess.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8837, 67, 3624, 12, 2890, 16, 833, 16, 9070, 16, 675, 4177, 67, 4293, 16, 1746, 67, 74, 2377, 16, 7239, 16, 1550, 16, 26182, 67, 31276, 16, 11850, 1376, 16, 6710, 7133, 16, 5972...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 8837, 67, 3624, 12, 2890, 16, 833, 16, 9070, 16, 675, 4177, 67, 4293, 16, 1746, 67, 74, 2377, 16, 7239, 16, 1550, 16, 26182, 67, 31276, 16, 11850, 1376, 16, 6710, 7133, 16, 5972...
assert word not in self.wordinfo, \
assert key not in self.wordinfo, \
def store(self): '''Place state into persistent store'''
4b603a76f9ff55d6e5526112cc8e63d69b1c62e1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9857/4b603a76f9ff55d6e5526112cc8e63d69b1c62e1/storage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1707, 12, 2890, 4672, 9163, 6029, 919, 1368, 9195, 1707, 26418, 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, 1707, 12, 2890, 4672, 9163, 6029, 919, 1368, 9195, 1707, 26418, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
if glob_build: dir = string.replace(os.getcwd(),'/build','') src = map(os.path.basename, glob.glob(os.path.join(dir,'[a-z]*.f90'))) else: src = glob.glob('[a-z]*.f90') for source in src: inc = env.Include(source,prefix='') obj = env.StaticObject(source) env.Depends(obj,inc) env['LIBS'].insert(0,'rsff90') env.Prepend(F90PATH=[os.path.join(bldroot,'include')])
def build_install_f90(env, progs_f90, bindir, api, bldroot, glob_build): 'Build and install Fortran90 programs' mains_f90 = Split(progs_f90) if 'f90' in api: F90 = env.get('F90') assert F90 != None # The configure step should have found the compiler if glob_build: dir = string.replace(os.getcwd(),'/build','') # RSFSRC/user/$USER src = map(os.path.basename, glob.glob(os.path.join(dir,'[a-z]*.f90'))) else: src = glob.glob('[a-z]*.f90') for source in src: inc = env.Include(source,prefix='') obj = env.StaticObject(source) env.Depends(obj,inc) env['LIBS'].insert(0,'rsff90') # order matters when linking env.Prepend(F90PATH=[os.path.join(bldroot,'include')]) F90base = os.path.basename(F90) if F90base[:8] == 'gfortran' or F90base[:3] == 'gfc': env.Append(F90FLAGS=' -J${SOURCE.dir}') elif F90base == 'ifort': env.Append(F90FLAGS=' -module ${SOURCE.dir}') for prog in mains_f90: sources = ['M' + prog] depends90(env,sources,'M'+prog) prog = env.Program(prog,map(lambda x: x + '.f90',sources), LINK=F90) if glob_build: env.Install(bindir,prog) else: # Put in a placeholder for prog in mains_f90: prog = env.Place('sf'+prog,None,package='Fortran90+API=F90') if glob_build: env.Install(bindir,prog) if glob_build: docs_f90 = map(lambda prog: env.Doc(prog,'M'+prog+'.f90',lang='f90'), mains_f90) else: docs_f90 = None return docs_f90
27412c71919c8b2e337dc6cef2ddca363fbe39c7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3143/27412c71919c8b2e337dc6cef2ddca363fbe39c7/configure.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 67, 5425, 67, 74, 9349, 12, 3074, 16, 450, 564, 67, 74, 9349, 16, 1993, 481, 16, 1536, 16, 324, 1236, 3085, 16, 4715, 67, 3510, 4672, 296, 3116, 471, 3799, 2457, 13171, 9349, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 67, 5425, 67, 74, 9349, 12, 3074, 16, 450, 564, 67, 74, 9349, 16, 1993, 481, 16, 1536, 16, 324, 1236, 3085, 16, 4715, 67, 3510, 4672, 296, 3116, 471, 3799, 2457, 13171, 9349, 2...
self.msgText("doSpeedGreen: " + i.toString() + "\n")
if (self.debugLevel >= LowDebug) : self.msgText("doSpeedGreen: " + i.toString() + "\n")
def doSpeedGreen(self): if (self.redDelayTimer != None) : self.redDelayTimer.stop() if (self.currentThrottle != None) : i = int(self.locoSpeedGreen.text) * 0.01 self.currentThrottle.setSpeedSetting(i) self.msgText("doSpeedGreen: " + i.toString() + "\n") self.locoSpeed.text = self.locoSpeedGreen.text return
637586c522dc4614e3aa55f7046de00d6eaa8ae0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1660/637586c522dc4614e3aa55f7046de00d6eaa8ae0/RobotThrottle2.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 16562, 21453, 12, 2890, 4672, 309, 261, 2890, 18, 1118, 6763, 6777, 480, 599, 13, 294, 365, 18, 1118, 6763, 6777, 18, 5681, 1435, 309, 261, 2890, 18, 2972, 27636, 480, 599, 13, 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, 741, 16562, 21453, 12, 2890, 4672, 309, 261, 2890, 18, 1118, 6763, 6777, 480, 599, 13, 294, 365, 18, 1118, 6763, 6777, 18, 5681, 1435, 309, 261, 2890, 18, 2972, 27636, 480, 599, 13, 29...
for trip in trips: if trip.rating: total_rating += int(trip.rating)
def calculate_rating_average(trips): total_rating = 0 rating = 0 for trip in trips: if trip.rating: total_rating += int(trip.rating) if len(trips): rating = int( (total_rating + 0.0) / len(trips) + 0.5 ) rating = { 'on': [ 1 for x in range(rating) ], 'off': [ 1 for x in range(5-rating) ], } return rating
a8f947240df38c3562a26ef57ab39c390fc88976 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9909/a8f947240df38c3562a26ef57ab39c390fc88976/models.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4604, 67, 17326, 67, 15621, 12, 313, 7146, 4672, 2078, 67, 17326, 273, 374, 13953, 273, 374, 309, 562, 12, 313, 7146, 4672, 13953, 273, 509, 12, 261, 4963, 67, 17326, 397, 374, 18, 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, 4604, 67, 17326, 67, 15621, 12, 313, 7146, 4672, 2078, 67, 17326, 273, 374, 13953, 273, 374, 309, 562, 12, 313, 7146, 4672, 13953, 273, 509, 12, 261, 4963, 67, 17326, 397, 374, 18, 20,...
if os.path.normpath(i.getDir()).contains("/framework/"):
if os.path.normpath(i.getDir()).find("/framework/") != -1:
def writeDoxygenHeader(self): projects = core.getProjects()
2b3f7736af1b2f47f52aa7ab4d587ac4acbc6838 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8259/2b3f7736af1b2f47f52aa7ab4d587ac4acbc6838/CPPDocumentation.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 3244, 1698, 4507, 1864, 12, 2890, 4672, 10137, 273, 2922, 18, 588, 15298, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 3244, 1698, 4507, 1864, 12, 2890, 4672, 10137, 273, 2922, 18, 588, 15298, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
_cmd_remove.help = _('Removes the entry at INDEX') _cmd_list.help = _('Lists all entries in short format') _cmd_list_detail.help = _('Prints all entries in full detail') _cmd_show.help = _('Shows the entry at the specified INDEX. The index ' 'is the same as printed by the list command') _cmd_search.help = _('Searches phone book for PATTERN and prints all ' 'matching entries') _cmd_create.help = _('Creates a new entry') _cmd_table.help = _('Show a nice table containing all entries of the ' 'phone book') def _is_cmd_function(self, func): name = None if isinstance(func, basestring): name = func else: name = func.__name__ return name.startswith('_cmd_') def _get_cmd_name(self, func): """Returns the command name for `func`""" name = None if isinstance(func, basestring): name = func else: name = func.__name__ return name[5:].replace('_', '-') def _get_cmd_function(self, command): """Returns the function for `command`""" name = '_cmd_%s' % command
def _get_cmd_function(self, arg): """Returns the function for `arg`""" if arg.startswith('--'): name = '_cmd_%s' % arg[2:]
def _cmd_remove(self, index): del self.phonebook[int(index)] self.phonebook.save()
500a390f053c916fbb5e449916c39bcc41901f78 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2215/500a390f053c916fbb5e449916c39bcc41901f78/tel.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4172, 67, 4479, 12, 2890, 16, 770, 4672, 1464, 365, 18, 10540, 3618, 63, 474, 12, 1615, 25887, 365, 18, 10540, 3618, 18, 5688, 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, 389, 4172, 67, 4479, 12, 2890, 16, 770, 4672, 1464, 365, 18, 10540, 3618, 63, 474, 12, 1615, 25887, 365, 18, 10540, 3618, 18, 5688, 1435, 225, 2, -100, -100, -100, -100, -100, -100, -1...
sage: sage.symbolic.units.convert(units.length.foot/units.time.second^2, units.acceleration.galileo) 762/25*galileo sage: sage.symbolic.units.convert(units.mass.kilogram*units.length.meter/units.time.second^2, units.force.newton) newton sage: sage.symbolic.units.convert(units.length.foot^3, units.area.acre*units.length.inch) 1/3630*acre*inch sage: sage.symbolic.units.convert(units.charge.coulomb, units.current.ampere*units.time.second) ampere*second sage: sage.symbolic.units.convert(units.pressure.pascal*units.si_prefixes.kilo, units.pressure.pounds_per_square_inch) 1290320000000/8896443230521*pounds_per_square_inch
sage: sage.symbolic.units.convert(units.length.foot/units.time.second^2, units.acceleration.galileo) 762/25*galileo sage: sage.symbolic.units.convert(units.mass.kilogram*units.length.meter/units.time.second^2, units.force.newton) newton sage: sage.symbolic.units.convert(units.length.foot^3, units.area.acre*units.length.inch) 1/3630*acre*inch sage: sage.symbolic.units.convert(units.charge.coulomb, units.current.ampere*units.time.second) ampere*second sage: sage.symbolic.units.convert(units.pressure.pascal*units.si_prefixes.kilo, units.pressure.pounds_per_square_inch) 1290320000000/8896443230521*pounds_per_square_inch
def convert(expr, target): """ Converts units between expr and target. If target is None then converts to SI base units. INPUT: - `expr` -- the symbolic expression converting from - `target` -- (default None) the symbolic expression converting to OUTPUT: - `symbolic expression` EXAMPLES:: sage: sage.symbolic.units.convert(units.length.foot, None) 381/1250*meter sage: sage.symbolic.units.convert(units.mass.kilogram, units.mass.pound) 100000000/45359237*pound Raises ValueError if expr and target are not convertible:: sage: sage.symbolic.units.convert(units.mass.kilogram, units.length.foot) Traceback (most recent call last): ... ValueError: Incompatible units sage: sage.symbolic.units.convert(units.length.meter^2, units.length.foot) Traceback (most recent call last): ... ValueError: Incompatible units Recognizes derived unit relationships to base units and other derived units:: sage: sage.symbolic.units.convert(units.length.foot/units.time.second^2, units.acceleration.galileo) 762/25*galileo sage: sage.symbolic.units.convert(units.mass.kilogram*units.length.meter/units.time.second^2, units.force.newton) newton sage: sage.symbolic.units.convert(units.length.foot^3, units.area.acre*units.length.inch) 1/3630*acre*inch sage: sage.symbolic.units.convert(units.charge.coulomb, units.current.ampere*units.time.second) ampere*second sage: sage.symbolic.units.convert(units.pressure.pascal*units.si_prefixes.kilo, units.pressure.pounds_per_square_inch) 1290320000000/8896443230521*pounds_per_square_inch For decimal answers multiply 1.0:: sage: sage.symbolic.units.convert(units.pressure.pascal*units.si_prefixes.kilo, units.pressure.pounds_per_square_inch)*1.0 0.145037737730209*pounds_per_square_inch """ base_target = target z = {} tz = {} for x in expr.variables(): if is_unit(x): if unit_to_type[str(x)] == 'temperature': return convert_temperature(expr, target) else: z[x] = base_units(x) expr = expr.subs(z) if target is None: return expr else: for y in base_target.variables(): if is_unit(y): tz[y] = base_units(y) base_target = base_target.subs(tz) coeff = (expr/base_target).expand() if len(coeff.variables()) != 0: raise ValueError, "Incompatible units" return coeff*target
ed891e5784edd8a5e4d544f1ef837edc82b93924 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/ed891e5784edd8a5e4d544f1ef837edc82b93924/units.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1765, 12, 8638, 16, 1018, 4672, 3536, 20377, 4971, 3086, 3065, 471, 1018, 18, 971, 1018, 353, 599, 1508, 7759, 358, 5705, 1026, 4971, 18, 225, 12943, 30, 225, 300, 1375, 8638, 68, 1493, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1765, 12, 8638, 16, 1018, 4672, 3536, 20377, 4971, 3086, 3065, 471, 1018, 18, 971, 1018, 353, 599, 1508, 7759, 358, 5705, 1026, 4971, 18, 225, 12943, 30, 225, 300, 1375, 8638, 68, 1493, ...
if name[:4] == 'test': print_test(value.__doc__+' try: value() except: print 'Error!', sys.exc_type, sys.exc_value errors = errors+1
if name[:4] == 'test': print_test(value.__doc__+' try: value() except: print 'Error!', sys.exc_type, sys.exc_value errors = errors+1
def test
255f4210c1e3b967db40828e7c0a557465f32371 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6753/255f4210c1e3b967db40828e7c0a557465f32371/bugs101.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 282, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 282, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
print "frag%d: '%s'" % (l, frags[l].text)
print "frag%d: '%s' %s" % (l, frags[l].text,' '.join(['%s=%s' % (k,getattr(frags[l],k)) for k in frags[l].__dict__ if k!=text]))
def dumpParagraphFrags(P): print 'dumpParagraphFrags(<Paragraph @ %d>) minWidth() = %.2f' % (id(P), P.minWidth()) frags = P.frags n =len(frags) for l in range(n): print "frag%d: '%s'" % (l, frags[l].text)
8d23a394d71e94269f4f4a0be1e036155775a4c8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/8d23a394d71e94269f4f4a0be1e036155775a4c8/paragraph.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4657, 17719, 7167, 1341, 12, 52, 4672, 1172, 296, 8481, 17719, 7167, 1341, 12, 32, 17719, 632, 738, 72, 23429, 1131, 2384, 1435, 273, 12639, 22, 74, 11, 738, 261, 350, 12, 52, 3631, 45...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4657, 17719, 7167, 1341, 12, 52, 4672, 1172, 296, 8481, 17719, 7167, 1341, 12, 32, 17719, 632, 738, 72, 23429, 1131, 2384, 1435, 273, 12639, 22, 74, 11, 738, 261, 350, 12, 52, 3631, 45...
s = smtplib.SMTP(request.environ['paste.config']['app_conf'] .get('app_smtp_server'))
s = smtplib.SMTP(request.environ['paste.config']['global_conf'].get('smtp_server'))
def submit_mini(self): c.cfptypes = self.dbsession.query(ProposalType).select() c.tatypes = self.dbsession.query(AssistanceType).select() c.cfp_mode = request.environ['paste.config']['app_conf'].get('cfp_mode') c.signed_in_person = self.dbsession.query(model.Person).get_by(id=session['signed_in_person_id']) c.person = c.signed_in_person
af1fd5b6bf986844a7eb5c9d1f097db0f068d2de /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12856/af1fd5b6bf986844a7eb5c9d1f097db0f068d2de/cfp.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4879, 67, 1154, 77, 12, 2890, 4672, 276, 18, 8522, 825, 23033, 273, 365, 18, 1966, 3184, 18, 2271, 12, 14592, 559, 2934, 4025, 1435, 276, 18, 88, 13373, 273, 365, 18, 1966, 3184, 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, 4879, 67, 1154, 77, 12, 2890, 4672, 276, 18, 8522, 825, 23033, 273, 365, 18, 1966, 3184, 18, 2271, 12, 14592, 559, 2934, 4025, 1435, 276, 18, 88, 13373, 273, 365, 18, 1966, 3184, 18, ...
type -- button, checkbox, file, password, radio, slider, text, setter_bar, drop_down
type -- button, checkbox, file, password, radio, slider, text, setter_bar
[x] default slider pos doesn't work, eg. def _(q1=(-1,(-3,3)), q2=(1,(-3,3))):
d309010c54ba9edf1e2bfc229ca66c5c4e85a709 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/d309010c54ba9edf1e2bfc229ca66c5c4e85a709/interact.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 306, 92, 65, 805, 18442, 949, 3302, 1404, 1440, 16, 9130, 18, 1652, 389, 12, 85, 21, 33, 19236, 21, 16, 19236, 23, 16, 23, 13, 3631, 1043, 22, 28657, 21, 16, 19236, 23, 16, 23, 3719, 467...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 306, 92, 65, 805, 18442, 949, 3302, 1404, 1440, 16, 9130, 18, 1652, 389, 12, 85, 21, 33, 19236, 21, 16, 19236, 23, 16, 23, 13, 3631, 1043, 22, 28657, 21, 16, 19236, 23, 16, 23, 3719, 467...
return self.getlongresp()
return self.getlongresp(fileHandle)
def longcmd(self, line): """Internal: send a command and get the response plus following text.""" self.putcmd(line) return self.getlongresp()
d1d584f4e820dc893175cdde74b901b6808ed3ab /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/d1d584f4e820dc893175cdde74b901b6808ed3ab/nntplib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1525, 4172, 12, 2890, 16, 980, 4672, 3536, 3061, 30, 1366, 279, 1296, 471, 336, 326, 766, 8737, 3751, 977, 12123, 365, 18, 458, 4172, 12, 1369, 13, 327, 365, 18, 588, 5748, 12243, 1435...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1525, 4172, 12, 2890, 16, 980, 4672, 3536, 3061, 30, 1366, 279, 1296, 471, 336, 326, 766, 8737, 3751, 977, 12123, 365, 18, 458, 4172, 12, 1369, 13, 327, 365, 18, 588, 5748, 12243, 1435...
log.info("ALVA BC6xx Braille init")
log.debug("ALVA BC6xx Braille init")
def __init__(self): super(BrailleDisplayDriver,self).__init__() log.info("ALVA BC6xx Braille init") _AlvaNumDevices=c_int(0) AlvaScanDevices(byref(_AlvaNumDevices)) if _AlvaNumDevices.value==0: raise RuntimeError("No ALVA dislay found") else: log.info("%d devices found" %_AlvaNumDevices.value) AlvaOpen(0) self._alva_NumCells = 0 self._alva_KeyCheckTimer = wx.PyTimer(self._alva_CheckKeyPresses) self._alva_KeyMask = 0 self._alva_KeyCheckTimer.Start(ALVA_KEY_CHECK_INTERVAL)
a906a03e97eb70e4e237f1cca7165c019d925c60 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9340/a906a03e97eb70e4e237f1cca7165c019d925c60/alvaBC6.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 2240, 12, 38, 354, 14120, 4236, 4668, 16, 2890, 2934, 972, 2738, 972, 1435, 613, 18, 4148, 2932, 1013, 27722, 21225, 26, 5279, 605, 354, 14120, 1208, 792...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4672, 2240, 12, 38, 354, 14120, 4236, 4668, 16, 2890, 2934, 972, 2738, 972, 1435, 613, 18, 4148, 2932, 1013, 27722, 21225, 26, 5279, 605, 354, 14120, 1208, 792...
treeshift = pleft - cright leftbound = cright + 1 rightbound = pleft cwidth = cleft-cright-1 leftrange = pleft+1 rightrange = cleft cr.execute('UPDATE '+self._table+''' SET parent_left = CASE WHEN parent_left BETWEEN %s AND %s THEN parent_left + %s WHEN parent_left BETWEEN %s AND %s THEN parent_left + %s ELSE parent_left END, parent_right = CASE WHEN parent_right BETWEEN %s AND %s THEN parent_right + %s WHEN parent_right BETWEEN %s AND %s THEN parent_right + %s ELSE parent_right END WHERE parent_left<%s OR parent_right>%s; ''', (leftbound,rightbound,cwidth,cleft,cright,treeshift,leftbound,rightbound, cwidth,cleft,cright,treeshift,leftrange,rightrange))
cr.execute('SELECT parent_left,parent_right FROM '+self._table+' WHERE id IS NULL') res = cr.fetchone() if res: pleft,pright = res else: cr.execute('select max(parent_right),max(parent_right)+1 from '+self._table) pleft,pright = cr.fetchone() cr.execute('select parent_left,parent_right,id from '+self._table+' where id in ('+','.join(map(lambda x:'%s',ids))+')', ids) dest = pleft + 1 for cleft,cright,cid in cr.fetchall(): if cleft > pleft: treeshift = pleft - cleft + 1 leftbound = pleft+1 rightbound = cleft-1 cwidth = cright-cleft+1 leftrange = cright rightrange = pleft else: treeshift = pleft - cright leftbound = cright + 1 rightbound = pleft cwidth = cleft-cright-1 leftrange = pleft+1 rightrange = cleft cr.execute('UPDATE '+self._table+''' SET parent_left = CASE WHEN parent_left BETWEEN %s AND %s THEN parent_left + %s WHEN parent_left BETWEEN %s AND %s THEN parent_left + %s ELSE parent_left END, parent_right = CASE WHEN parent_right BETWEEN %s AND %s THEN parent_right + %s WHEN parent_right BETWEEN %s AND %s THEN parent_right + %s ELSE parent_right END WHERE parent_left<%s OR parent_right>%s; ''', (leftbound,rightbound,cwidth,cleft,cright,treeshift,leftbound,rightbound, cwidth,cleft,cright,treeshift,leftrange,rightrange))
def write(self, cr, user, ids, vals, context=None): readonly = None for field in vals.copy(): fobj = None if field in self._columns: fobj = self._columns[field] else: fobj = self._inherit_fields[field][2] if not fobj: continue groups = fobj.write
3e80d4a789771d2f0ef08ffc6811c4fe784bec7e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12853/3e80d4a789771d2f0ef08ffc6811c4fe784bec7e/orm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 12, 2890, 16, 4422, 16, 729, 16, 3258, 16, 5773, 16, 819, 33, 7036, 4672, 17102, 273, 599, 364, 652, 316, 5773, 18, 3530, 13332, 24705, 273, 599, 309, 652, 316, 365, 6315, 5112, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 12, 2890, 16, 4422, 16, 729, 16, 3258, 16, 5773, 16, 819, 33, 7036, 4672, 17102, 273, 599, 364, 652, 316, 5773, 18, 3530, 13332, 24705, 273, 599, 309, 652, 316, 365, 6315, 5112, ...
(0010110011.)
(001011001, 1)
def standard_factorization(self): r""" Returns the standard factorization of self. The *standard factorization* of a word `w` is the unique factorization: `w = uv` where `v` is the longest proper suffix of `w` that qualifies as a Lyndon word. Note that if `w` is a Lyndon word with standard factorization `w = uv`, then `u` and `v` are also Lyndon words and `u < v`. See for instance [1] and [2]. OUTPUT:
15b3eef9c2a56a442197101e799229fc2fce69fc /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/15b3eef9c2a56a442197101e799229fc2fce69fc/word.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4529, 67, 6812, 1588, 12, 2890, 4672, 436, 8395, 2860, 326, 4529, 5578, 1588, 434, 365, 18, 225, 1021, 380, 10005, 5578, 1588, 14, 434, 279, 2076, 1375, 91, 68, 353, 326, 3089, 5578, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4529, 67, 6812, 1588, 12, 2890, 4672, 436, 8395, 2860, 326, 4529, 5578, 1588, 434, 365, 18, 225, 1021, 380, 10005, 5578, 1588, 14, 434, 279, 2076, 1375, 91, 68, 353, 326, 3089, 5578, 1...
if key == ord('q'): quit = 1
if key: log("key pressed %s\n" % str(key))
def main_keyloop(self): quit = 0 log("%s\n" % dir(self.timers)) while not quit: self.update() key = self.get_key() if key == ord('q'): quit = 1 if self.keymaps.has_key(key): self.keymaps[key]()
bcf87a597a1e0835f1fe615deb65b579c04c8456 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2622/bcf87a597a1e0835f1fe615deb65b579c04c8456/cxmms.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 67, 856, 6498, 12, 2890, 4672, 9706, 273, 374, 613, 27188, 87, 64, 82, 6, 738, 1577, 12, 2890, 18, 8584, 414, 3719, 1323, 486, 9706, 30, 365, 18, 2725, 1435, 498, 273, 365, 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, 2774, 67, 856, 6498, 12, 2890, 4672, 9706, 273, 374, 613, 27188, 87, 64, 82, 6, 738, 1577, 12, 2890, 18, 8584, 414, 3719, 1323, 486, 9706, 30, 365, 18, 2725, 1435, 498, 273, 365, 18,...
return "<MultiplexerFrame instance, FRAME_NOT_INIT>"
return "<MultiplexerFrame instance, MULTIPLEXER_FRAME_NOT_INIT>"
def __repr__(self): try: return self.toString() except AttributeError: return "<MultiplexerFrame instance, FRAME_NOT_INIT>"
c0a4cb118694010ecadc522882f9681e1ce41a0b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7263/c0a4cb118694010ecadc522882f9681e1ce41a0b/Multiplexer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 12715, 972, 12, 2890, 4672, 775, 30, 327, 365, 18, 10492, 1435, 1335, 6394, 30, 327, 3532, 8438, 92, 264, 3219, 791, 16, 31385, 21130, 654, 67, 15072, 67, 4400, 67, 12919, 2984, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1001, 12715, 972, 12, 2890, 4672, 775, 30, 327, 365, 18, 10492, 1435, 1335, 6394, 30, 327, 3532, 8438, 92, 264, 3219, 791, 16, 31385, 21130, 654, 67, 15072, 67, 4400, 67, 12919, 2984, ...
self.pushButton10.setText(self.__tr("10\n" "Ne")) self.closePTableButton.setText(self.__tr("Close")) self.TransmuteButton.setText(self.__tr("Transmute"))
def languageChange(self): self.setCaption(self.__tr("Element Selector")) self.elementButtonGroup.setTitle(QString.null) self.elementNumberLabel.setText(self.__tr("1")) self.amuLabel.setText(self.__tr("1.008")) self.elementSymbolLabel.setText(self.__tr("H")) self.pushButton2.setText(self.__tr("2\n"
94d2d00500cacfd81eab5fbecfa6b79935a375e2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/94d2d00500cacfd81eab5fbecfa6b79935a375e2/ElementSelectorDialog.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2653, 3043, 12, 2890, 4672, 365, 18, 542, 21158, 12, 2890, 16186, 313, 2932, 1046, 11703, 6, 3719, 365, 18, 2956, 3616, 1114, 18, 542, 4247, 12, 53, 780, 18, 2011, 13, 365, 18, 2956, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2653, 3043, 12, 2890, 4672, 365, 18, 542, 21158, 12, 2890, 16186, 313, 2932, 1046, 11703, 6, 3719, 365, 18, 2956, 3616, 1114, 18, 542, 4247, 12, 53, 780, 18, 2011, 13, 365, 18, 2956, ...
print """usage: basd64 [-d] [-e] [-u] [-t] [file|-]
print """usage: %s [-d|-e|-u|-t] [file|-]
def test(): """Small test program""" import sys, getopt try: opts, args = getopt.getopt(sys.argv[1:], 'deut') except getopt.error, msg: sys.stdout = sys.stderr print msg print """usage: basd64 [-d] [-e] [-u] [-t] [file|-] -d, -u: decode -e: encode (default) -t: decode string 'Aladdin:open sesame'""" sys.exit(2) func = encode for o, a in opts: if o == '-e': func = encode if o == '-d': func = decode if o == '-u': func = decode if o == '-t': test1(); return if args and args[0] != '-': func(open(args[0], 'rb'), sys.stdout) else: func(sys.stdin, sys.stdout)
0365180a74904c1b6ac186e9edb923afed59aa84 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/0365180a74904c1b6ac186e9edb923afed59aa84/base64.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 13332, 3536, 19187, 1842, 5402, 8395, 1930, 2589, 16, 336, 3838, 775, 30, 1500, 16, 833, 273, 336, 3838, 18, 588, 3838, 12, 9499, 18, 19485, 63, 21, 30, 6487, 296, 323, 322, 6134...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 13332, 3536, 19187, 1842, 5402, 8395, 1930, 2589, 16, 336, 3838, 775, 30, 1500, 16, 833, 273, 336, 3838, 18, 588, 3838, 12, 9499, 18, 19485, 63, 21, 30, 6487, 296, 323, 322, 6134...
report(wsite, rep_page, username, com, rep_text)
ki = blocked(wsite, username) if ki == True: wikipedia.output(username + u' has been blocked! Skipping him...') continue report(wsite, rep_page, username, com, final_rep)
def defineSign(wsite, signPageTitle): #A little function to load the random signs. signPage = wikipedia.Page(wsite, signPageTitle) signText = signPage.get() reg = "\* ?(.*?)\n" listSign = re.findall(reg, signText) return listSign
cb8f0066c76ec26963b2359ce86d64d19516ea4e /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4404/cb8f0066c76ec26963b2359ce86d64d19516ea4e/welcome.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4426, 2766, 12, 91, 4256, 16, 1573, 1964, 4247, 4672, 468, 37, 12720, 445, 358, 1262, 326, 2744, 21588, 18, 1573, 1964, 273, 21137, 18, 1964, 12, 91, 4256, 16, 1573, 1964, 4247, 13, 15...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4426, 2766, 12, 91, 4256, 16, 1573, 1964, 4247, 4672, 468, 37, 12720, 445, 358, 1262, 326, 2744, 21588, 18, 1573, 1964, 273, 21137, 18, 1964, 12, 91, 4256, 16, 1573, 1964, 4247, 13, 15...
argPtr = "&" + argVal
def writeTraceableArgumentConversion(f, member, i, name, type, haveCcx, rvdeclared): argVal = "_arg%d" % i argPtr = "&" + argVal params = { 'name': name, 'argVal': argVal } typeName = getBuiltinOrNativeTypeName(type) if typeName is not None: template = traceableArgumentConversionTemplates.get(typeName) if template is not None: f.write(substitute(template, params)) return rvdeclared # else fall through; the type isn't supported yet. elif isInterfaceType(type): if type.name == 'nsIVariant': # Totally custom. assert haveCcx template = ( " nsCOMPtr<nsIVariant> ${name}(already_AddRefed<nsIVariant>(" "XPCVariant::newVariant(ccx, ${argVal})));\n" " if (!${name}) {\n") f.write(substitute(template, params)) writeFailure(f, getTraceInfoDefaultReturn(member.type), 2) return rvdeclared elif type.name == 'nsIAtom': # Should have special atomizing behavior. Fall through. pass else: if not rvdeclared: f.write(" nsresult rv;\n"); f.write(" nsCOMPtr<%s> %s;\n" % (type.name, name)) f.write(" rv = xpc_qsUnwrapArg<%s>(" "cx, %s, getter_AddRefs(%s));\n" % (type.name, argVal, name)) f.write(" if (NS_FAILED(rv)) {\n") if haveCcx: f.write(" xpc_qsThrowBadArgWithCcx(ccx, rv, %d);\n" % i) else: # XXX Fix this to return a real error! f.write(" xpc_qsThrowBadArgWithDetails(cx, rv, %d, " "\"%s\", \"%s\");\n" % (i, member.iface.name, member.name)) writeFailure(f, getTraceInfoDefaultReturn(member.type), 2) return True print member warn("Unable to unbox argument of type %s" % type.name) f.write(" !; // TODO - Unbox argument %s = arg%d\n" % (name, i)) return rvdeclared
62904871e7291b38e7809dbb292895c665628124 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11102/62904871e7291b38e7809dbb292895c665628124/qsgen.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 3448, 429, 1379, 6814, 12, 74, 16, 3140, 16, 277, 16, 508, 16, 618, 16, 1240, 39, 71, 92, 16, 5633, 16571, 4672, 1501, 3053, 273, 4192, 3175, 9, 72, 6, 738, 277, 225, 859, 27...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 3448, 429, 1379, 6814, 12, 74, 16, 3140, 16, 277, 16, 508, 16, 618, 16, 1240, 39, 71, 92, 16, 5633, 16571, 4672, 1501, 3053, 273, 4192, 3175, 9, 72, 6, 738, 277, 225, 859, 27...
for key in ('LDFLAGS', 'BASECFLAGS'):
for key in ('LDFLAGS', 'BASECFLAGS', 'CFLAGS', 'PY_CFLAGS', 'BLDSHARED'):
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 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'): flags = _config_vars[key] flags = re.sub('-arch\s+\w+\s', ' ', flags) flags = re.sub('-isysroot [^ \t]*', ' ', flags) _config_vars[key] = flags if args: vals = [] for name in args: vals.append(_config_vars.get(name)) return vals else: return _config_vars
46d3ef965949944cde1126a8aee3c264256ae3d2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/46d3ef965949944cde1126a8aee3c264256ae3d2/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, ...
if str(selItems[0].parent().text(0)) == "Lights" and str(selItems[0].parent().parent().text(0)).startswith("Zone: "):
if str(selItems[0]).startswith("Scene: ") and str(selItems[0].parent().text(0)) == "Lights" and str(selItems[0].parent().parent().text(0)).startswith("Zone: "):
def onSelectionChanged(self): if self.selectionChangedCallback is None: return
757478a3f30b6509128d1c36147afa4b00481ede /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2792/757478a3f30b6509128d1c36147afa4b00481ede/ModuleExplorer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 6233, 5033, 12, 2890, 4672, 309, 365, 18, 10705, 5033, 2428, 353, 599, 30, 327, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 6233, 5033, 12, 2890, 4672, 309, 365, 18, 10705, 5033, 2428, 353, 599, 30, 327, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
lines = ['==== foo ====', '@FRAMEFOOTER=\\buge bar\\3', '==== bar ===='] expected = ['\n', '\\begin{frame}\n \\frametitle{foo}\n \n', '', ' \n \\end{frame}\n\\begin{frame}\n \\frametitle{bar}\n \n', '', ' \\buge bar\\3 \n \\end{frame}\n']
lines = ['==== foo ====', '@FRAMEFOOTER=\\huge bar 3', '==== bar ===='] expected = ['\n', '\\begin{frame}\n \\frametitle{foo}\n \n', '', ' \n\\end{frame}\n\\begin{frame}\n \\frametitle{bar}\n \n', '', ' \\huge bar 3 \n\\end{frame}\n']
def test_subexp_footer(self): lines = ['==== foo ====', '@FRAMEFOOTER=\\buge bar\\3', '==== bar ===='] expected = ['\n', '\\begin{frame}\n \\frametitle{foo}\n \n', '', ' \n \\end{frame}\n\\begin{frame}\n \\frametitle{bar}\n \n', '', ' \\buge bar\\3 \n \\end{frame}\n'] out = convert2beamer(lines) self.assertEqual(out,expected)
d64ce59e01a52c33f1dee2a4128500420cfe8322 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14466/d64ce59e01a52c33f1dee2a4128500420cfe8322/test_wiki2beamer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 1717, 2749, 67, 14723, 12, 2890, 4672, 2362, 273, 10228, 894, 8431, 422, 631, 2187, 4622, 15072, 3313, 1974, 654, 33, 1695, 76, 21627, 4653, 890, 2187, 296, 894, 4653, 422, 631...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 1717, 2749, 67, 14723, 12, 2890, 4672, 2362, 273, 10228, 894, 8431, 422, 631, 2187, 4622, 15072, 3313, 1974, 654, 33, 1695, 76, 21627, 4653, 890, 2187, 296, 894, 4653, 422, 631...
"statsheadings": self.getstatsheadings(),
"statsheadings": self.getstatsheadings(),
def __init__(self, project, session, argdict, dirfilter=None): self.project = project self.session = session self.localize = session.localize self.nlocalize = session.nlocalize self.tr_lang = session.tr_lang self.rights = self.project.getrights(self.session) message = argdict.get("message", "") if dirfilter == "": dirfilter = None self.dirfilter = dirfilter if dirfilter and dirfilter.endswith(".po"): self.dirname = os.path.dirname(dirfilter) else: self.dirname = dirfilter or "" self.argdict = argdict # handle actions before generating URLs, so we strip unneccessary parameters out of argdict self.handleactions() # generate the navigation bar maintaining state navbarpath_dict = self.makenavbarpath_dict(project=self.project, session=self.session, currentfolder=dirfilter, argdict=self.argdict) self.showtracks = self.getboolarg("showtracks") self.showchecks = self.getboolarg("showchecks") self.showassigns = self.getboolarg("showassigns") self.showgoals = self.getboolarg("showgoals") self.editing = self.getboolarg("editing") self.currentgoal = self.argdict.pop("goal", None) if dirfilter and dirfilter.endswith(".po"): actionlinks = [] mainstats = "" mainicon = "file" else: pofilenames = self.project.browsefiles(dirfilter) projecttotals = self.project.getquickstats(pofilenames) projectstats = projecttotals if self.showassigns: projectstats['assign'] = self.project.combineassignstats(pofilenames) if self.showchecks: projectstats['units'] = self.project.combine_unit_stats(pofilenames) if self.editing: actionlinks = self.getactionlinks("", projectstats, ["editing", "mine", "review", "check", "assign", "goal", "quick", "all", "zip", "sdf"], dirfilter) else: actionlinks = self.getactionlinks("", projectstats, ["editing", "goal", "zip", "sdf"]) mainstats = self.getitemstats("", pofilenames, len(pofilenames)) mainstats["summary"] = self.describestats(self.project, projecttotals, len(pofilenames)) if self.showgoals: childitems = self.getgoalitems(dirfilter) else: childitems = self.getchilditems(dirfilter) instancetitle = getattr(session.instance, "title", session.localize("Pootle Demo")) # l10n: The first parameter is the name of the installation (like "Pootle") pagetitle = self.localize("%s: Project %s, Language %s", instancetitle, self.project.projectname, self.tr_lang(self.project.languagename)) templatename = "fileindex" sessionvars = {"status": session.status, "isopen": session.isopen, "issiteadmin": session.issiteadmin()} templatevars = {"pagetitle": pagetitle, "project": {"code": self.project.projectcode, "name": self.project.projectname}, "language": {"code": self.project.languagecode, "name": self.tr_lang(self.project.languagename)}, # optional sections, will appear if these values are replaced "assign": None, "goals": None, "upload": None, "search": {"title": self.localize("Search"), "advanced_title": self.localize("Advanced Search"), "fields": self.getsearchfields() }, "message": message, # navigation bar "navitems": [{"icon": "folder", "path": navbarpath_dict, "actions": actionlinks, "stats": mainstats}], # children "children": childitems, # are we in editing mode (otherwise stats) "editing": self.editing, # stats table headings "statsheadings": self.getstatsheadings(), # general vars "session": sessionvars, "instancetitle": instancetitle} pagelayout.PootleNavPage.__init__(self, templatename, templatevars, session, bannerheight=80) if self.showassigns and "assign" in self.rights: self.templatevars["assign"] = self.getassignbox() if "admin" in self.rights: if self.showgoals: self.templatevars["goals"] = self.getgoalbox() if "admin" in self.rights or "translate" in self.rights or "suggest" in self.rights: self.templatevars["upload"] = self.getuploadbox()
453fde85a31c143f65673eb2b3585722000751e5 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11388/453fde85a31c143f65673eb2b3585722000751e5/indexpage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1984, 16, 1339, 16, 1501, 1576, 16, 1577, 2188, 33, 7036, 4672, 365, 18, 4406, 273, 1984, 365, 18, 3184, 273, 1339, 365, 18, 3729, 554, 273, 1339, 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, 1001, 2738, 972, 12, 2890, 16, 1984, 16, 1339, 16, 1501, 1576, 16, 1577, 2188, 33, 7036, 4672, 365, 18, 4406, 273, 1984, 365, 18, 3184, 273, 1339, 365, 18, 3729, 554, 273, 1339, 18, ...
help=_('Edits the entries at the specified indices'),
help=_('edits the entries at the specified indices'),
def _get_cmd_function(self, arg): """Returns the function for `arg`""" if arg.startswith('--'): # strip of the first to shlashes name = '_cmd_%s' % arg[2:] # and replace remaining slashes with underscores name = name.replace('-', '_') function = getattr(self, name) return function
4a1b0e39c0e8f9263a36e8e53943e18224245734 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2215/4a1b0e39c0e8f9263a36e8e53943e18224245734/tel.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 4172, 67, 915, 12, 2890, 16, 1501, 4672, 3536, 1356, 326, 445, 364, 1375, 3175, 68, 8395, 309, 1501, 18, 17514, 1918, 2668, 413, 11, 4672, 468, 2569, 434, 326, 1122, 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, 389, 588, 67, 4172, 67, 915, 12, 2890, 16, 1501, 4672, 3536, 1356, 326, 445, 364, 1375, 3175, 68, 8395, 309, 1501, 18, 17514, 1918, 2668, 413, 11, 4672, 468, 2569, 434, 326, 1122, 358,...
sys.stdout = io
sys.stdout = string_io
def summarize(self, out, verbose=None): io = StringIO.StringIO() old_stdout = sys.stdout sys.stdout = io try: res = doctest.DocTestRunner.summarize(self, verbose) finally: sys.stdout = old_stdout out(io.getvalue()) return res
3826b7851930131ca8662a261ff0260695e3570d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7032/3826b7851930131ca8662a261ff0260695e3570d/doctest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 28712, 12, 2890, 16, 596, 16, 3988, 33, 7036, 4672, 2527, 273, 15777, 18, 780, 4294, 1435, 1592, 67, 10283, 273, 2589, 18, 10283, 2589, 18, 10283, 273, 533, 67, 1594, 775, 30, 400, 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, 28712, 12, 2890, 16, 596, 16, 3988, 33, 7036, 4672, 2527, 273, 15777, 18, 780, 4294, 1435, 1592, 67, 10283, 273, 2589, 18, 10283, 2589, 18, 10283, 273, 533, 67, 1594, 775, 30, 400, 273...
return time.asctime(time.gmtime(float(c[2].split(' ')[0])))
return time.asctime(time.gmtime(c[2][0]))
def date(c): return time.asctime(time.gmtime(float(c[2].split(' ')[0])))
0658b2b2df7d852ddc7c4463318ce4f37036ca2f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11312/0658b2b2df7d852ddc7c4463318ce4f37036ca2f/hgk.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1509, 12, 71, 4672, 327, 813, 18, 345, 21261, 12, 957, 18, 75, 10838, 12, 5659, 12, 71, 63, 22, 8009, 4939, 2668, 8624, 63, 20, 65, 20349, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1509, 12, 71, 4672, 327, 813, 18, 345, 21261, 12, 957, 18, 75, 10838, 12, 5659, 12, 71, 63, 22, 8009, 4939, 2668, 8624, 63, 20, 65, 20349, 2, -100, -100, -100, -100, -100, -100, -100...
"""
"""
def list(self): """ EXAMPLES: sage: Permutations([1,2,3],2).list() [[1, 2], [1, 3], [2, 1], [2, 3], [3, 1], [3, 2]] sage: Permutations([1,2,2],2).list() [[1, 2], [2, 1], [2, 2]] """ mset = self.mset n = len(self.mset) lmset = __builtin__.list(mset) mset_list = map(lambda x: lmset.index(x), lmset)
ee193cf821b7901e84dd403a0936e9968178dcad /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/ee193cf821b7901e84dd403a0936e9968178dcad/permutation.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 666, 12, 2890, 4672, 3536, 225, 5675, 8900, 11386, 30, 272, 410, 30, 13813, 22190, 3816, 21, 16, 22, 16, 23, 6487, 22, 2934, 1098, 1435, 12167, 21, 16, 576, 6487, 306, 21, 16, 890, 6...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 666, 12, 2890, 4672, 3536, 225, 5675, 8900, 11386, 30, 272, 410, 30, 13813, 22190, 3816, 21, 16, 22, 16, 23, 6487, 22, 2934, 1098, 1435, 12167, 21, 16, 576, 6487, 306, 21, 16, 890, 6...
self.__frame = Frame(parent) self.__frame.pack(expand=YES, fill=BOTH)
self.__frame = Frame(parent, relief=GROOVE, borderwidth=2) self.__frame.pack()
def __init__(self, switchboard, parent=None): self.__sb = switchboard self.__frame = Frame(parent) self.__frame.pack(expand=YES, fill=BOTH) # create the chip that will display the currently selected color # exactly self.__sframe = Frame(self.__frame) self.__sframe.grid(row=0, column=0) self.__selected = ChipWidget(self.__sframe, text='Selected') # create the chip that will display the nearest real X11 color # database color name self.__nframe = Frame(self.__frame) self.__nframe.grid(row=0, column=1) self.__nearest = ChipWidget(self.__nframe, text='Nearest', presscmd = self.__buttonpress, releasecmd = self.__buttonrelease)
6ccb2b80150ecf148bdcf1ae1bd7a025ae318829 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/6ccb2b80150ecf148bdcf1ae1bd7a025ae318829/ChipViewer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1620, 3752, 16, 982, 33, 7036, 4672, 365, 16186, 18366, 273, 1620, 3752, 365, 16186, 3789, 273, 8058, 12, 2938, 16, 14719, 10241, 33, 43, 1457, 51, 3412, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1620, 3752, 16, 982, 33, 7036, 4672, 365, 16186, 18366, 273, 1620, 3752, 365, 16186, 3789, 273, 8058, 12, 2938, 16, 14719, 10241, 33, 43, 1457, 51, 3412, ...
self.proxy.datagramReceived(r.toString()m ("client.com", 5060))
self.proxy.datagramReceived(r.toString(), ("client.com", 5060))
def unregister(self): r = sip.Request("REGISTER", "sip:bell.example.com") r.addHeader("to", "sip:joe@bell.example.com") r.addHeader("contact", "*") r.addHeader("via", sip.Via("client.com").toString()) r.addHeader("expires", "0") self.proxy.datagramReceived(r.toString()m ("client.com", 5060))
21d90ca605586e14f28406f74ff4d9475a57682a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/21d90ca605586e14f28406f74ff4d9475a57682a/test_sip.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10232, 12, 2890, 4672, 436, 273, 10341, 18, 691, 2932, 27511, 3113, 315, 28477, 30, 70, 1165, 18, 8236, 18, 832, 7923, 436, 18, 1289, 1864, 2932, 869, 3113, 315, 28477, 30, 78, 15548, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10232, 12, 2890, 4672, 436, 273, 10341, 18, 691, 2932, 27511, 3113, 315, 28477, 30, 70, 1165, 18, 8236, 18, 832, 7923, 436, 18, 1289, 1864, 2932, 869, 3113, 315, 28477, 30, 78, 15548, ...
s2.connect((gp.server_ip,gp.server_port)) connected = True fout.write("DNS server is %s\n" % gp.server_ip)
try: s2.connect((gp.server_ip,gp.server_port)) connected = True fout.write("DNS server is %s\n" % gp.server_ip) except: connected = False
def doit(gp,args): connected = False fout = gp.fout
8fb83025efceaf8c02533faae101f66a1eee2ebc /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6933/8fb83025efceaf8c02533faae101f66a1eee2ebc/dnsproxy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 305, 12, 6403, 16, 1968, 4672, 5840, 273, 1083, 17382, 273, 4178, 18, 617, 322, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 305, 12, 6403, 16, 1968, 4672, 5840, 273, 1083, 17382, 273, 4178, 18, 617, 322, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
grid1.Add( self.integerwidth, 0, wx.ALIGN_LEFT|wx.ALL, 5 )
grid1.Add( self.integerwidth, 0, wx.FIXED_SIZE|wx.ALIGN_LEFT|wx.ALL, 5 )
def __init__( self, parent, log ):
13fc2ad8196af29d6a3e2c8dfac5d6c10acfcacb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/13fc2ad8196af29d6a3e2c8dfac5d6c10acfcacb/MaskedNumCtrl.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 365, 16, 982, 16, 613, 262, 30, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1001, 2738, 972, 12, 365, 16, 982, 16, 613, 262, 30, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
except: print "Warning: %s missing for locale %s" % (filename, locale)
except IOError: print 'Warning: %s missing for locale %s' % (filename, locale)
def main(argv): if len(argv) < 4: print __doc__ % argv[0] sys.exit(1) locales = [] translation_dir = argv.pop(-1) source_file = argv.pop(-1) target_file = argv.pop(-1) defines = getDefines(argv) # If this is an official build, warnings are treated as errors. treat_warnings_as_errors = defines.get('OFFICIAL_BUILD') != None # Languages are specified via a define. if defines.has_key('I18N_LANGUAGES'): raw_locales = re.sub(r'[()]', '', defines['I18N_LANGUAGES']) locales = re.split(r',', raw_locales) filename = os.path.basename(source_file) # The file specified as the source is considered the most up to date set of # strings. The translated files are compared to this to determine if the # localized strings match. source_strings = getStrings(source_file) strings = {} for locale in locales: localized_strings = {} try: localized_strings = getStrings(os.path.join(translation_dir, locale, filename)) except: print "Warning: %s missing for locale %s" % (filename, locale) if treat_warnings_as_errors: sys.exit(2) # This block simply checks if the localized strings are out of date. if locale == "en-US": if len(localized_strings) > len(source_strings): print "Warning: Strings are out of date, build is not localized." if treat_warnings_as_errors: sys.exit(2) else: for string_id, string in source_strings.items(): # If the english string is missing or different from the source, the # string is out of date. if ((not localized_strings.has_key(string_id)) or localized_strings[string_id] != source_strings[string_id]): print "Warning: Strings are out of date, build is not localized." if treat_warnings_as_errors: sys.exit(2) break strings[locale] = {} for id in source_strings.keys(): # If there is no localized string, substitute the string from the source. string = localized_strings.get(id, source_strings[id]) # Replace any macros as specified on the commandline for define, value in defines.items(): string = string.replace(define, value) strings[locale][id] = string # Extract the file extension from the target filename. match = re.search(r'\.(.*?)$', target_file) if not match: print 'Target %s does not have a file extension' % target_file sys.exit(1) file_type = match.group(1) parse_funcs = {'js': createJavaScriptFromStrings, 'rc': createRCFromStrings} if parse_funcs.has_key(file_type): parse_funcs[file_type](target_file, strings) else: print "Unknown output file type: %s\n" % (file_type) sys.exit(3)
00ea35b9791951af01325916fb87ff7ff1bbf5a5 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1918/00ea35b9791951af01325916fb87ff7ff1bbf5a5/parse_stab.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 19485, 4672, 309, 562, 12, 19485, 13, 411, 1059, 30, 1172, 1001, 2434, 972, 738, 5261, 63, 20, 65, 2589, 18, 8593, 12, 21, 13, 225, 6922, 273, 5378, 225, 4794, 67, 1214, 27...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 19485, 4672, 309, 562, 12, 19485, 13, 411, 1059, 30, 1172, 1001, 2434, 972, 738, 5261, 63, 20, 65, 2589, 18, 8593, 12, 21, 13, 225, 6922, 273, 5378, 225, 4794, 67, 1214, 27...
packages[i]['rdepends'].append((pkg, a[1], a[2])) if 'conflicts' in packages[pkg]: for p in parse_depends(packages[pkg]['conflicts']): if a[0] in packages: packages[a[0]]['rconflicts'].append((pkg, a[1], a[2])) elif a[0] in provides: for i in provides[a[0]]: packages[i]['rconflicts'].append((pkg, a[1], a[2])) return (packages, provides)
if i not in packages: continue if not check_doubles or pkg not in packages[i]['rconflicts']: packages[i]['rconflicts'].append(pkg)
def read_binaries(self, basedir, distribution, arch): """Read the list of binary packages from the specified directory The binary packages are read from the `Packages_${arch}' files within the directory specified as `basedir' parameter, replacing ${arch} with the value of the arch parameter. Considering the large amount of memory needed, not all the fields are loaded in memory. The available fields are Version, Source, Pre-Depends, Depends, Conflicts, Provides and Architecture. After reading the packages, reverse dependencies are computed and saved in the `rdepends' keys, and the `Provides' field is used to populate the virtual packages list.
b57aefed68ccf3a45d249459e90c513a8a777948 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2784/b57aefed68ccf3a45d249459e90c513a8a777948/britney.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 67, 4757, 5646, 12, 2890, 16, 15573, 16, 7006, 16, 6637, 4672, 3536, 1994, 326, 666, 434, 3112, 5907, 628, 326, 1269, 1867, 225, 1021, 3112, 5907, 854, 855, 628, 326, 1375, 11425, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 67, 4757, 5646, 12, 2890, 16, 15573, 16, 7006, 16, 6637, 4672, 3536, 1994, 326, 666, 434, 3112, 5907, 628, 326, 1269, 1867, 225, 1021, 3112, 5907, 854, 855, 628, 326, 1375, 11425, ...
self.assertEqual(stdout, "Woke up, sleep function is: <built-in function sleep>\n")
self.assertEqual(stdout.strip(), "Woke up, sleep function is: <built-in function sleep>")
def child(): sleep(1) # As a non-daemon thread we SHOULD wake up and nothing # should be torn down yet print "Woke up, sleep function is:", sleep
7105633ad9a80e979666ec755f28e112a605e956 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12029/7105633ad9a80e979666ec755f28e112a605e956/test_threading.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1151, 13332, 5329, 12, 21, 13, 468, 2970, 279, 1661, 17, 21511, 2650, 732, 6122, 31090, 19891, 731, 471, 5083, 468, 1410, 506, 8934, 82, 2588, 4671, 1172, 315, 59, 3056, 731, 16, 5329, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1151, 13332, 5329, 12, 21, 13, 468, 2970, 279, 1661, 17, 21511, 2650, 732, 6122, 31090, 19891, 731, 471, 5083, 468, 1410, 506, 8934, 82, 2588, 4671, 1172, 315, 59, 3056, 731, 16, 5329, ...
root = '.'
def makePackedApp(args): opts, args = getopt.getopt(args, 'r:m:h') root = '.' main = None for option, value in opts: if option == '-r': root = value elif option == '-m': main = value elif option == '-h': print __doc__ sys.exit(1) if not args: raise ArgumentError, "No destination app specified. Use:\npython MakeAppMF.py app.mf" multifile_name = args[0] root = '.' if len(args) > 1: root = args[1] if len(args) > 2: raise ArgumentError, "Too many arguments." p = AppPacker(multifile_name) p.scan(root = root, main = main)
d3cc028356c0fec172e9848d2e45018c3cd581aa /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7242/d3cc028356c0fec172e9848d2e45018c3cd581aa/MakeAppMF.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 4420, 329, 3371, 12, 1968, 4672, 1500, 16, 833, 273, 336, 3838, 18, 588, 3838, 12, 1968, 16, 296, 86, 30, 81, 30, 76, 6134, 225, 2774, 273, 599, 364, 1456, 16, 460, 316, 1500, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 4420, 329, 3371, 12, 1968, 4672, 1500, 16, 833, 273, 336, 3838, 18, 588, 3838, 12, 1968, 16, 296, 86, 30, 81, 30, 76, 6134, 225, 2774, 273, 599, 364, 1456, 16, 460, 316, 1500, ...
if len(os_str) == 0:
if len(os_str) == 0 or None != self.xlate_cb:
def os_match(self, os_str): """Return boolean whether operating system matches""" if len(os_str) == 0: return True if os_str == 'linux' and sys.platform == 'linux2': return True if os_str == 'windows' and sys.platform == 'win32': return True return False
3f2dfdef1f93d7fe43ee42459db877dccd247b21 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7853/3f2dfdef1f93d7fe43ee42459db877dccd247b21/CleanerML.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1140, 67, 1916, 12, 2890, 16, 1140, 67, 701, 4672, 3536, 990, 1250, 2856, 16929, 2619, 1885, 8395, 225, 309, 562, 12, 538, 67, 701, 13, 422, 374, 578, 599, 480, 365, 18, 18402, 340, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1140, 67, 1916, 12, 2890, 16, 1140, 67, 701, 4672, 3536, 990, 1250, 2856, 16929, 2619, 1885, 8395, 225, 309, 562, 12, 538, 67, 701, 13, 422, 374, 578, 599, 480, 365, 18, 18402, 340, ...
- list of strings (unit names)
- list of strings (unit names)
def vars_in_str(s): """ Given a string like 'mass/(length*time)', return the list ['mass', 'length', 'time']. INPUT: - `s` -- string OUTPUT: - list of strings (unit names) EXAMPLES:: sage: sage.symbolic.units.vars_in_str('mass/(length*time)') ['mass', 'length', 'time'] """ return re.findall('[a-z|_]+', s)
d9145e61c2e167a847618a21778e0e532a04af5d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/d9145e61c2e167a847618a21778e0e532a04af5d/units.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4153, 67, 267, 67, 701, 12, 87, 4672, 3536, 16803, 279, 533, 3007, 296, 10424, 19, 12, 2469, 14, 957, 13, 2187, 327, 326, 666, 10228, 10424, 2187, 296, 2469, 2187, 296, 957, 29489, 225...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4153, 67, 267, 67, 701, 12, 87, 4672, 3536, 16803, 279, 533, 3007, 296, 10424, 19, 12, 2469, 14, 957, 13, 2187, 327, 326, 666, 10228, 10424, 2187, 296, 2469, 2187, 296, 957, 29489, 225...
'{outbound} method %s()", not found' % (action)
'{outbound} method %s()", not found' % action
def outbound(cls, action): """ Find the handler B{outbound} method for the specified I{action}. @param action: The I{action} part of an event subject. @type action: str @return: The handler instance method. @rtype: instancemethod """ mutex.acquire() try: method = cls.outbounds.get(action) if method is None: raise Exception,\ '{outbound} method %s()", not found' % (action) else: return method finally: mutex.release()
e019d45771f02e3ce7f00bacfd4d1da7861f8f32 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10692/e019d45771f02e3ce7f00bacfd4d1da7861f8f32/dispatcher.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11663, 12, 6429, 16, 1301, 4672, 3536, 4163, 326, 1838, 605, 95, 659, 3653, 97, 707, 364, 326, 1269, 467, 95, 1128, 5496, 632, 891, 1301, 30, 1021, 467, 95, 1128, 97, 1087, 434, 392, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11663, 12, 6429, 16, 1301, 4672, 3536, 4163, 326, 1838, 605, 95, 659, 3653, 97, 707, 364, 326, 1269, 467, 95, 1128, 5496, 632, 891, 1301, 30, 1021, 467, 95, 1128, 97, 1087, 434, 392, ...
self.threeDlocEventZ = float(event[10]) * 1000
self.threeDlocEventZ = float(event[10])
def load3dlocData(self): #self.load3dlocSyntheticPhases() event = open(self.threeDlocOutfile).readline().split() self.threeDlocEventLon = float(event[8]) self.threeDlocEventLat = float(event[9]) self.threeDlocEventZ = float(event[10]) * 1000 self.threeDlocEventErrX = float(event[11]) self.threeDlocEventErrY = float(event[12]) self.threeDlocEventErrZ = float(event[13]) * 1000 self.threeDlocEventTime = UTCDateTime(int(event[2]), int(event[3]), int(event[4]), int(event[5]), int(event[6]), float(event[7])) #XXX aufraeumen!! Die meisten Listen hier werden nicht mehr gebraucht self.threeDlocPLons = [] self.threeDlocPLats = [] self.threeDlocSLons = [] self.threeDlocSLats = [] self.threeDlocPNames = [] self.threeDlocSNames = [] self.threeDlocPResInfo = [] self.threeDlocSResInfo = [] lines = open(self.threeDlocInfile).readlines() for line in lines: pick = line.split() for i in range(len(self.streams)): if pick[0].strip() == self.streams[i][0].stats.station.strip(): if pick[1] == 'P': self.dicts[i]['3DlocPLon'] = float(pick[14]) self.dicts[i]['3DlocPLat'] = float(pick[15]) elif pick[1] == 'S': self.dicts[i]['3DlocSLon'] = float(pick[14]) self.dicts[i]['3DlocSLat'] = float(pick[15]) break lines = open(self.threeDlocOutfile).readlines() for line in lines[1:]: pick = line.split() for i in range(len(self.streams)): if pick[0].strip() == self.streams[i][0].stats.station.strip(): if pick[1] == 'P': self.dicts[i]['3DlocPResInfo'] = '\n\n %+0.3fs' % float(pick[8]) elif pick[1] == 'S': self.dicts[i]['3DlocSResInfo'] = '\n\n\n %+0.3fs' % float(pick[8]) break
74f68db5096834aa7cf8785b28082e2c08e155f2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10346/74f68db5096834aa7cf8785b28082e2c08e155f2/obspyck.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1262, 23, 72, 1829, 751, 12, 2890, 4672, 468, 2890, 18, 945, 23, 72, 1829, 10503, 16466, 3731, 3304, 1435, 871, 273, 1696, 12, 2890, 18, 451, 992, 40, 1829, 1182, 768, 2934, 896, 1369,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1262, 23, 72, 1829, 751, 12, 2890, 4672, 468, 2890, 18, 945, 23, 72, 1829, 10503, 16466, 3731, 3304, 1435, 871, 273, 1696, 12, 2890, 18, 451, 992, 40, 1829, 1182, 768, 2934, 896, 1369,...
def checksenddata(self): if len(self.classifiers) and self.sendOnChange: self.senddata() def checksendselection(self): if len(self.classifiers) and self.sendOnChange: self.selection()
def checksenddata(self): # if self.sendOnChange and self.outbox.isEnabled(): if len(self.classifiers) and self.sendOnChange: self.senddata()
63e34d56e155a4f1aba288f36a71868771294735 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6366/63e34d56e155a4f1aba288f36a71868771294735/OWPredictions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4271, 409, 892, 12, 2890, 4672, 468, 309, 365, 18, 4661, 1398, 3043, 471, 365, 18, 659, 2147, 18, 291, 1526, 13332, 309, 562, 12, 2890, 18, 1106, 3383, 13, 471, 365, 18, 4661, 1398, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4271, 409, 892, 12, 2890, 4672, 468, 309, 365, 18, 4661, 1398, 3043, 471, 365, 18, 659, 2147, 18, 291, 1526, 13332, 309, 562, 12, 2890, 18, 1106, 3383, 13, 471, 365, 18, 4661, 1398, ...
__metaclass__ = ClfsStructType _fields_ = ()
__metaclass__ = ClfsStructType _fields_ = ()
def all_fields(): for base in bases: if hasattr(base, "fields"): for field in base.fields: yield field for a in attrs["_fields_"]: yield ClfsStructField(*a)
a2d8f4bc0f5dd94eba8767e5d77b1beb78415227 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4811/a2d8f4bc0f5dd94eba8767e5d77b1beb78415227/clfs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 777, 67, 2821, 13332, 364, 1026, 316, 8337, 30, 309, 3859, 12, 1969, 16, 315, 2821, 6, 4672, 364, 652, 316, 1026, 18, 2821, 30, 2824, 652, 364, 279, 316, 3422, 9614, 67, 2821, 9548, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 777, 67, 2821, 13332, 364, 1026, 316, 8337, 30, 309, 3859, 12, 1969, 16, 315, 2821, 6, 4672, 364, 652, 316, 1026, 18, 2821, 30, 2824, 652, 364, 279, 316, 3422, 9614, 67, 2821, 9548, ...
// This is nasty, but is seems like the only way to get // the notation R.<x,y> = blah that we use in SAGE to not // result in R. = blah after highlighting.
// We do this so <'s don't result in being parsed as // special html tags.
def notebook_lib(): s= r"""
7751efbdc1366e2bf50c46e4b48af7d837e36cfa /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/7751efbdc1366e2bf50c46e4b48af7d837e36cfa/js.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14718, 67, 2941, 13332, 272, 33, 436, 8395, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14718, 67, 2941, 13332, 272, 33, 436, 8395, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
if issue: flicense = flag_policy_issue(flicense, status)
if issue: flicense = flag_policy_issue(flicense, 'D')
def check_policy(flicense, llicense, library, issue): # is the lib dynamic or static? ltype = 'Dynamic' if re.search(is_static, library): ltype = 'Static' # it's possible that the license assigned to the target or library is one of # the aliases, in which case we need the 'official' name for the policy check pllicense = llicense # we want to display both names in the report, if present pflicense = flicense llicenseset = Aliases.objects.filter(alias = llicense) if llicenseset: # can only be one match pllicense = llicenseset[0].license flicenseset = Aliases.objects.filter(alias = flicense) if flicenseset: # can only be one match pflicense = flicenseset[0].license policyset = Policy.objects.filter(tlicense = pflicense, dlicense = pllicense) policyset = policyset.filter(Q(relationship = ltype) | Q(relationship = 'Both')) # if we got multiple matches, just return - bad policies if policyset and policyset.count() < 2: status = policyset[0].status if status == 'D': issue = issue or True if llicense != pllicense: # plug in the alias (real name) llicense = llicense + ' (' + pllicense + ')' llicense = flag_policy_issue(llicense, status) if flicense != pflicense: flicense = flicense + ' (' + pflicense + ')' # only modify the target when there's a problem if issue: flicense = flag_policy_issue(flicense, status) return issue, llicense, flicense
a7e4843addd56adcd1577e55dc38681d2639fe5c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4228/a7e4843addd56adcd1577e55dc38681d2639fe5c/views.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 5086, 12, 2242, 5142, 16, 6579, 5142, 16, 5313, 16, 5672, 4672, 468, 353, 326, 2561, 5976, 578, 760, 35, 328, 723, 273, 296, 9791, 11, 309, 283, 18, 3072, 12, 291, 67, 3845,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 5086, 12, 2242, 5142, 16, 6579, 5142, 16, 5313, 16, 5672, 4672, 468, 353, 326, 2561, 5976, 578, 760, 35, 328, 723, 273, 296, 9791, 11, 309, 283, 18, 3072, 12, 291, 67, 3845,...
self.assertEqual(list(d), d.keys())
self.assertEqual(list(d), list(d.keys()))
def test_builtin_list(self): self.assertEqual(list(SequenceClass(5)), range(5)) self.assertEqual(list(SequenceClass(0)), []) self.assertEqual(list(()), []) self.assertEqual(list(range(10, -1, -1)), range(10, -1, -1))
0b7e42560ad88ca619fe25772c5c48b14518b87f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12029/0b7e42560ad88ca619fe25772c5c48b14518b87f/test_iter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 24553, 67, 1098, 12, 2890, 4672, 365, 18, 11231, 5812, 12, 1098, 12, 4021, 797, 12, 25, 13, 3631, 1048, 12, 25, 3719, 365, 18, 11231, 5812, 12, 1098, 12, 4021, 797, 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, 1842, 67, 24553, 67, 1098, 12, 2890, 4672, 365, 18, 11231, 5812, 12, 1098, 12, 4021, 797, 12, 25, 13, 3631, 1048, 12, 25, 3719, 365, 18, 11231, 5812, 12, 1098, 12, 4021, 797, 12, 20,...
pypungi._doRunCommand(repoview, self.logger)
pypungi.util._doRunCommand(repoview, self.logger)
def _makeMetadata(self, path, cachedir, comps=False, repoview=False, repoviewtitle=False, baseurl=False, output=False, basedir=False, split=False, update=True): """Create repodata and repoview.""" conf = createrepo.MetaDataConfig() conf.cachedir = os.path.join(cachedir, 'createrepocache') conf.update = update if output: conf.outputdir = output else: conf.outputdir = path conf.directory = path conf.database = True if comps: conf.groupfile = comps if basedir: conf.basedir = basedir if baseurl: conf.baseurl = baseurl if split: conf.split = True conf.directories = split repomatic = createrepo.SplitMetaDataGenerator(conf) else: repomatic = createrepo.MetaDataGenerator(conf) self.logger.info('Making repodata') repomatic.doPkgMetadata() repomatic.doRepoMetadata() repomatic.doFinalMove() if repoview: # setup the repoview call repoview = ['/usr/bin/repoview'] repoview.append('--quiet') repoview.append('--state-dir') repoview.append(os.path.join(cachedir, 'repoviewcache')) if repoviewtitle: repoview.append('--title') repoview.append(repoviewtitle) repoview.append(path) # run the command pypungi._doRunCommand(repoview, self.logger)
a81ead6181e277e8003cb6c9095b415a7d60d493 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8489/a81ead6181e277e8003cb6c9095b415a7d60d493/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 6540, 2277, 12, 2890, 16, 589, 16, 3472, 481, 16, 13979, 33, 8381, 16, 3538, 1945, 33, 8381, 16, 3538, 1945, 2649, 33, 8381, 16, 25427, 33, 8381, 16, 876, 33, 8381, 16, 15573, 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, 389, 6540, 2277, 12, 2890, 16, 589, 16, 3472, 481, 16, 13979, 33, 8381, 16, 3538, 1945, 33, 8381, 16, 3538, 1945, 2649, 33, 8381, 16, 25427, 33, 8381, 16, 876, 33, 8381, 16, 15573, 3...