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
for block in self.annotated:
for block in fully_annotated_blocks(self):
def transform_slice(self): """Transforms a[b:c] to getslice(a, b, c).""" for block in self.annotated: operations = block.operations[:] n_op = len(operations) for i in range(0, n_op-1): op1 = operations[i] op2 = operations[i+1] if (op1.opname == 'newslice' and self.gettype(op1.args[2]) is types.NoneType and op2.opname == 'getitem' and op1.result is op2.args[1]): new_op = SpaceOperation('getslice', (op2.args[0], op1.args[0], op1.args[1]), op2.result) block.operations[i+1:i+2] = [new_op]
1a2978d9a8c06d564d3b598fb5282e21ee713265 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/1a2978d9a8c06d564d3b598fb5282e21ee713265/transform.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2510, 67, 6665, 12, 2890, 4672, 3536, 15236, 279, 63, 70, 30, 71, 65, 358, 5571, 2008, 12, 69, 16, 324, 16, 276, 13, 12123, 364, 1203, 316, 7418, 67, 18338, 690, 67, 7996, 12, 2890, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2510, 67, 6665, 12, 2890, 4672, 3536, 15236, 279, 63, 70, 30, 71, 65, 358, 5571, 2008, 12, 69, 16, 324, 16, 276, 13, 12123, 364, 1203, 316, 7418, 67, 18338, 690, 67, 7996, 12, 2890, ...
self.args = sys.argv
self._args = sys.argv
def _dispatch(self): self.args = sys.argv actions = self._getActions() try: action = self.args[1] except IndexError: action = None if action and action in actions: fl_args = [self.args[0]] + ['--url=%s' % self.url] + self.args[2:] sys.argv = fl_args action = getattr(self,action) action() else: self._usage()
72bc74904fc331408c9d1b07e324a4834c15af66 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9007/72bc74904fc331408c9d1b07e324a4834c15af66/dispatcher.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 10739, 12, 2890, 4672, 365, 6315, 1968, 273, 2589, 18, 19485, 4209, 273, 365, 6315, 588, 6100, 1435, 775, 30, 1301, 273, 365, 18, 1968, 63, 21, 65, 1335, 10195, 30, 1301, 273, 599...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 10739, 12, 2890, 4672, 365, 6315, 1968, 273, 2589, 18, 19485, 4209, 273, 365, 6315, 588, 6100, 1435, 775, 30, 1301, 273, 365, 18, 1968, 63, 21, 65, 1335, 10195, 30, 1301, 273, 599...
spheroid = sr.GetProjParm( 'SPHEROID' )
spheroid = sr.GetAttrValue( 'SPHEROID' )
def netcdf_9(): if gdaltest.netcdf_drv is None: return 'skip' ds = gdal.Open( 'data/cf_no_sphere.nc' ) prj = ds.GetProjection( ) sr = osr.SpatialReference( ) sr.ImportFromWkt( prj ) spheroid = sr.GetProjParm( 'SPHEROID' ) if spheroid != 'WGS 84': gdaltest.post_reason( 'Incorrect spheroid read from file\n%s' % ( spheroid ) ) return 'fail' ds = None sr = None return 'success'
e4e0edb9045a275db477c300a8eb65dc5402b4ab /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10289/e4e0edb9045a275db477c300a8eb65dc5402b4ab/netcdf.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2901, 24799, 67, 29, 13332, 225, 309, 15551, 2390, 395, 18, 2758, 24799, 67, 3069, 90, 353, 599, 30, 327, 296, 7457, 11, 225, 3780, 273, 15551, 287, 18, 3678, 12, 296, 892, 19, 8522, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2901, 24799, 67, 29, 13332, 225, 309, 15551, 2390, 395, 18, 2758, 24799, 67, 3069, 90, 353, 599, 30, 327, 296, 7457, 11, 225, 3780, 273, 15551, 287, 18, 3678, 12, 296, 892, 19, 8522, ...
class CompressTestCase(unittest.TestCase):
class BaseCompressTestCase(object): def check_big_compress_buffer(self, size, compress_func): _1M = 1024 * 1024 fmt = "%%0%dx" % (2 * _1M) data = ''.join([binascii.a2b_hex(fmt % random.getrandbits(8 * _1M)) for i in range(10)]) data = data * (size // len(data) + 1) try: compress_func(data) finally: data = None def check_big_decompress_buffer(self, size, decompress_func): data = 'x' * size try: compressed = zlib.compress(data, 1) finally: data = None data = decompress_func(compressed) try: self.assertEqual(len(data), size) self.assertEqual(len(data.strip('x')), 0) finally: data = None class CompressTestCase(BaseCompressTestCase, unittest.TestCase):
def test_decompressobj_badflush(self): # verify failure on calling decompressobj.flush with bad params self.assertRaises(ValueError, zlib.decompressobj().flush, 0) self.assertRaises(ValueError, zlib.decompressobj().flush, -1)
80ce7faf39bf40547cc0ea3cd2925c3fcf0da786 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3187/80ce7faf39bf40547cc0ea3cd2925c3fcf0da786/test_zlib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 323, 14706, 2603, 67, 8759, 11330, 12, 2890, 4672, 468, 3929, 5166, 603, 4440, 16824, 2603, 18, 11330, 598, 5570, 859, 365, 18, 11231, 12649, 6141, 12, 23610, 16, 24220, 18, 32...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 323, 14706, 2603, 67, 8759, 11330, 12, 2890, 4672, 468, 3929, 5166, 603, 4440, 16824, 2603, 18, 11330, 598, 5570, 859, 365, 18, 11231, 12649, 6141, 12, 23610, 16, 24220, 18, 32...
"Id is not the same than existing one: " + str(line[i]) + ' !\n')
_("Id is not the same than existing one: %s")%(line[i]))
def process_liness(self, datas, prefix, current_module, model_name, fields_def, position=0): line = datas[position] row = {} translate = {} todo = [] warning = '' data_id = False data_res_id = False is_xml_id = False is_db_id = False ir_model_data_obj = self.pool.get('ir.model.data') # # Import normal fields # for i in range(len(fields)): if i >= len(line): raise Exception(_('Please check that all your lines have %d columns.') % (len(fields),)) if not line[i]: continue field = fields[i] if (len(field)==len(prefix)+1) and field[len(prefix)].endswith(':id'): res_id = False if line[i]: if fields_def[field[len(prefix)][:-3]]['type']=='many2many': res_id = [] for word in line[i].split(config.get('csv_internal_sep')): if '.' in word: module, xml_id = word.rsplit('.', 1) else: module, xml_id = current_module, word id = ir_model_data_obj._get_id(cr, uid, module, xml_id) res_id2 = ir_model_data_obj.read(cr, uid, [id], ['res_id'])[0]['res_id'] if res_id2: res_id.append(res_id2) if len(res_id): res_id = [(6, 0, res_id)] else: if '.' in line[i]: module, xml_id = line[i].rsplit('.', 1) else: module, xml_id = current_module, line[i] id = ir_model_data_obj._get_id(cr, uid, module, xml_id) res_id = ir_model_data_obj.read(cr, uid, [id], ['res_id'])[0]['res_id'] row[field[0][:-3]] = res_id or False continue if (len(field) == len(prefix)+1) and \ len(field[len(prefix)].split(':lang=')) == 2: f, lang = field[len(prefix)].split(':lang=') translate.setdefault(lang, {})[f]=line[i] or False continue if (len(field) == len(prefix)+1) and \ (prefix == field[0:len(prefix)]): if field[len(prefix)] == "id": # XML ID db_id = False is_xml_id = data_id = line[i] d = data_id.split('.') module = len(d)>1 and d[0] or '' name = len(d)>1 and d[1] or d[0] data_ids = ir_model_data_obj.search(cr, uid, [('module','=',module),('model','=',model_name),('name','=',name)]) if len(data_ids): d = ir_model_data_obj.read(cr, uid, data_ids, ['res_id'])[0] db_id = d['res_id'] if is_db_id and not db_id: data_ids = ir_model_data_obj.search(cr, uid, [('module','=',module),('model','=',model_name),('res_id','=',is_db_id)]) if not len(data_ids): ir_model_data_obj.create(cr, uid, {'module':module, 'model':model_name, 'name':name, 'res_id':is_db_id}) db_id = is_db_id if is_db_id and int(db_id) != int(is_db_id): warning += ("Id is not the same than existing one: " + str(is_db_id) + " !\n") logger.notifyChannel("import", netsvc.LOG_ERROR, "Id is not the same than existing one: " + str(is_db_id) + ' !\n') continue
30b2fc5bd2ddbaf44cd90f006b166de084029bfc /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/30b2fc5bd2ddbaf44cd90f006b166de084029bfc/orm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 80, 6336, 12, 2890, 16, 5386, 16, 1633, 16, 783, 67, 2978, 16, 938, 67, 529, 16, 1466, 67, 536, 16, 1754, 33, 20, 4672, 980, 273, 5386, 63, 3276, 65, 1027, 273, 2618, 420...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 80, 6336, 12, 2890, 16, 5386, 16, 1633, 16, 783, 67, 2978, 16, 938, 67, 529, 16, 1466, 67, 536, 16, 1754, 33, 20, 4672, 980, 273, 5386, 63, 3276, 65, 1027, 273, 2618, 420...
gap.eval('RequirePackage("HAP")')
gap.eval('LoadPackage("hap")')
def homology_part(self, n, p = 0): r""" Computes the $p$-part of the group homology $H_n(G, F)$, where $F = Z$ if $p=0$ and $F = Z/pZ$ if $p >0$ is a prime. Wraps HAP's Homology function, written by Graham Ellis, applied to the $p$-Sylow subgroup of $G$.
2aab0e46e038cb99ddd82ff3767ef8540acf0c86 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/2aab0e46e038cb99ddd82ff3767ef8540acf0c86/permgroup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13995, 4676, 67, 2680, 12, 2890, 16, 290, 16, 293, 273, 374, 4672, 436, 8395, 14169, 281, 326, 271, 84, 8, 17, 2680, 434, 326, 1041, 13995, 4676, 271, 44, 67, 82, 12, 43, 16, 478, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13995, 4676, 67, 2680, 12, 2890, 16, 290, 16, 293, 273, 374, 4672, 436, 8395, 14169, 281, 326, 271, 84, 8, 17, 2680, 434, 326, 1041, 13995, 4676, 271, 44, 67, 82, 12, 43, 16, 478, ...
sqlSite = sql + "AND siteid IN ("
def checkSitesWithRelease(self,sites,releases,caches): comment = ' /* DBProxy.checkSitesWithRelease */' try: relStr = releases if releases != None: relStr = releases.replace('\n',' ') caStr = caches if caches != None: caStr = caches.replace('\n',' ') _logger.debug("checkSitesWithRelease(%s,%s,%s)" % (sites,relStr,caStr)) # select sql = "SELECT distinct siteid FROM ATLAS_PANDAMETA.InstalledSW WHERE " if not caches in ['','NULL',None]: loopKey = ':cache' loopValues = caches.split('\n') sql += "cache=:cache " elif not releases in ['','NULL',None]: loopKey = ':release' loopValues = releases.split('\n') sql += "release=:release " else: # don't check return sites # start transaction self.conn.begin() self.cur.arraysize = 1000 # loop over all releases/caches for loopVal in loopValues: sqlSite = sql + "AND siteid IN (" # remove Atlas- loopVal = re.sub('^Atlas-','',loopVal) varMap = {} varMap[loopKey] = loopVal tmpRetSites = [] # look over sites nSites = 10 iSite = 0 for siteIndex,site in enumerate(sites): iSite += 1 tmpSiteKey = ':siteid%s' % iSite varMap[tmpSiteKey] = site sqlSite += '%s,' % tmpSiteKey if iSite == nSites or (siteIndex+1) == len(sites): iSite = 0 # close bracket in SQL sqlSite = sqlSite[:-1] sqlSite += ')' # execute _logger.debug(sqlSite+comment+str(varMap)) self.cur.execute(sqlSite+comment, varMap) resList = self.cur.fetchall() # collect candidates if len(resList) > 0: for tmpSite, in resList: # append tmpRetSites.append(tmpSite) # set sites = tmpRetSites # escape if sites == []: break # commit if not self._commit(): raise RuntimeError, 'Commit error' _logger.debug("checkSitesWithRelease -> %s" % sites) return sites except: # roll back self._rollback() type,value,traceBack = sys.exc_info() _logger.error("checkSitesWithRelease : %s %s" % (type,value)) return []
972653e2bc80ff0e0a142e53fa96ebe2f3410678 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7525/972653e2bc80ff0e0a142e53fa96ebe2f3410678/OraDBProxy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 17055, 1190, 7391, 12, 2890, 16, 12180, 16, 28416, 16, 17703, 281, 4672, 2879, 273, 296, 1748, 2383, 3886, 18, 1893, 17055, 1190, 7391, 1195, 11, 775, 30, 1279, 1585, 273, 14824, 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, 866, 17055, 1190, 7391, 12, 2890, 16, 12180, 16, 28416, 16, 17703, 281, 4672, 2879, 273, 296, 1748, 2383, 3886, 18, 1893, 17055, 1190, 7391, 1195, 11, 775, 30, 1279, 1585, 273, 14824, 30...
group1 = self.indepMapping.get(var1.name) group2 = self.indepMapping.get(var2.name)
group1 = self.indepMapping.get(varName1) group2 = self.indepMapping.get(varName2)
def addIndependentPair(self, var1, var2): if var1.name == var2.name: return
8646d50126c55931291904836b90660c854e7004 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5223/8646d50126c55931291904836b90660c854e7004/parser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 382, 10891, 4154, 12, 2890, 16, 569, 21, 16, 569, 22, 4672, 309, 569, 21, 18, 529, 422, 569, 22, 18, 529, 30, 327, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 382, 10891, 4154, 12, 2890, 16, 569, 21, 16, 569, 22, 4672, 309, 569, 21, 18, 529, 422, 569, 22, 18, 529, 30, 327, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
small_snippet = cut_out_snippet(s, escaped_keywords, nb_words_around, \ words_left, right_boundary) words_left -= len(small_snippet.split()) result.append(small_snippet)
if words_left > 0: (small_snippets, words_left) = cut_out_snippet(s, escaped_keywords, \ nb_words_around, words_left, right_boundary) result += small_snippets
def get_text_snippets(textfile_path, patterns, nb_words_around, max_snippets, \ right_boundary = True): """ Extract text snippets around 'patterns' from file found at 'textfile_path' The snippets are meant to look like in the results of the popular search engine: using " ... " between snippets. For empty patterns it returns "" The idea is to first produce big snippets with grep and narrow them @param right_boundary: match the right word boundary TODO: - distinguish the beginning of sentences and try to make the snippets start there """ if len(patterns) == 0: return "" # split multiword patterns # escape the parenthesis unless there is no space between then (e.g. U(1)) escaped_keywords = [] for p in patterns: for w in str(p).split(): #if there are both '(' and ')' in one word we leave them if w.count('(') or w.count(')'): if re.match("\w*\(\w*\)\w*", w): w1 = w.replace('(', '\(') escaped_keywords.append(w1.replace(')', '\)')) else: w1 = w.replace('(', '') escaped_keywords.append(w1.replace(')', '')) else: escaped_keywords.append(w) # the max number of words that can still be added to the snippet words_left = max_snippets * (nb_words_around * 2 + 1) # Assuming that there will be at least one word per line we can produce the # big snippets like this # FIXME: the ligature replacement should be done at the textification time; # then the sed expression can go away here. cmd = "sed \'s/ff/ff/g; s/fi/fi/g; s/fl/fl/g; s/ffi/ffi/g; s/ffl/ffl/g\' \ %s | grep -i -E -A%s -B%s -m%s" cmdargs = [textfile_path, str(nb_words_around), str(nb_words_around), str(max_snippets)] for p in escaped_keywords: cmd += " -e \"(\\b|\\s)\"%s" if right_boundary: cmd += "\"(\\b|\\s)\"" cmdargs.append(p) (dummy1, output, dummy2) = run_shell_command(cmd, cmdargs) #print cmd, cmdargs, output result = [] big_snippets = output.split("--") # cut the snippets to match the nb_words_around parameter precisely: for s in big_snippets: small_snippet = cut_out_snippet(s, escaped_keywords, nb_words_around, \ words_left, right_boundary) #count words words_left -= len(small_snippet.split()) #if words_left <= 0: #print "Error: snippet too long" result.append(small_snippet) # combine snippets out = "" for snippet in result: if snippet: if out: out += "<br>" out += "..." + snippet + "..." return out
46ff8aedd0010a41316b8cbe48c87eb00cb24d5a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12027/46ff8aedd0010a41316b8cbe48c87eb00cb24d5a/bibformat_utils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 955, 67, 8134, 16664, 12, 955, 768, 67, 803, 16, 6884, 16, 4264, 67, 3753, 67, 12716, 16, 943, 67, 8134, 16664, 16, 521, 2145, 67, 16604, 273, 1053, 4672, 3536, 8152, 977, 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, 336, 67, 955, 67, 8134, 16664, 12, 955, 768, 67, 803, 16, 6884, 16, 4264, 67, 3753, 67, 12716, 16, 943, 67, 8134, 16664, 16, 521, 2145, 67, 16604, 273, 1053, 4672, 3536, 8152, 977, 2...
print test_name
def run_tests(controls, tests_to_run = None, test_visible_only = True): # allow either a string or list to be passed try: tests_to_run = tests_to_run.split() except AttributeError: pass # if no tests specified run them all if tests_to_run is None: tests_to_run = registered.keys() # Filter out hidden controls if requested if test_visible_only: controls = [c for c in controls if c.IsVisible] bugs = [] # run each test for test_name in tests_to_run: print test_name bugs.extend(registered[test_name](controls)) return bugs
911c4820a091550b7c49e44585e4e4b263d66578 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6953/911c4820a091550b7c49e44585e4e4b263d66578/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 67, 16341, 12, 24350, 16, 7434, 67, 869, 67, 2681, 273, 599, 16, 1842, 67, 8613, 67, 3700, 273, 1053, 4672, 225, 468, 1699, 3344, 279, 533, 578, 666, 358, 506, 2275, 775, 30, 7...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 67, 16341, 12, 24350, 16, 7434, 67, 869, 67, 2681, 273, 599, 16, 1842, 67, 8613, 67, 3700, 273, 1053, 4672, 225, 468, 1699, 3344, 279, 533, 578, 666, 358, 506, 2275, 775, 30, 7...
while len(self.soundBuffers) < self.bufferCount and not self.done:
while len(self.buffersOut) < self.bufferCount and not self.done:
def play(self): if self.playing: return
fd83e7c1a811ef09c2d32488bf8a9a0efaef4aae /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7946/fd83e7c1a811ef09c2d32488bf8a9a0efaef4aae/Audio.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6599, 12, 2890, 4672, 309, 365, 18, 1601, 310, 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, 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, 6599, 12, 2890, 4672, 309, 365, 18, 1601, 310, 30, 327, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
self.log.error('Erros in updating pilot status: %s' % result['Message'])
self.log.error('Errors in updating pilot status: %s' % result['Message'])
def execute(self): """ Main execution method """
de53db04094ffe536f00b063457d17fbef5ab7b7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/de53db04094ffe536f00b063457d17fbef5ab7b7/SiteDirector.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1836, 12, 2890, 4672, 3536, 12740, 4588, 707, 3536, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 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, 1836, 12, 2890, 4672, 3536, 12740, 4588, 707, 3536, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
class _cs_matrix(spmatrix): def astype(self, t): out = self.copy() out.data = out.data.astype(t) out.dtype = out.data.dtype out.ftype = _transtabl[out.dtype.char] return out def __repr__(self): format = self.getformat() return "<%dx%d sparse matrix of type '%s'\n\twith %d stored "\ "elements (space for %d)\n\tin %s format>" % \ (self.shape + (self.dtype.type, self.getnnz(), self.nzmax, \ _formats[format][1])) def __add__(self, other, self_ind, other_ind, fn, cls): if isscalarlike(other): raise NotImplementedError, 'adding a scalar to a CSC or CSR ' \ 'matrix is not yet supported' elif isspmatrix(other): other = other.tocsc() if (other.shape != self.shape): raise ValueError, "inconsistent shapes" indptr, ind, data = fn(self.shape[0], self.shape[1], \ self.indptr, self_ind, \ self.data, other.indptr, \ other_ind, other.data) return cls((data, ind, indptr), self.shape) elif isdense(other): return other + self.todense() else: raise TypeError, "unsupported type for sparse matrix addition" def __mul__(self, other): """ Scalar, vector, or matrix multiplication """ if isscalarlike(other): new = self.copy() new.data = other * new.data new.dtype = new.data.dtype new.ftype = _transtabl[new.dtype.char] return new else: return self.dot(other) def __rmul__(self, other): if isscalarlike(other): new = self.copy() new.data = other * new.data new.dtype = new.data.dtype new.ftype = _transtabl[new.dtype.char] return new else: try: tr = other.transpose() except AttributeError: tr = asarray(other).transpose() return self.transpose().dot(tr).transpose() def __neg__(self): new = self.copy() new.data *= -1 return new def __pow__(self, other, self_ind, other_ind, fn, cls): """ Element-by-element power (unless other is a scalar, in which case return the matrix power.) """ if isscalarlike(other): new = self.copy() new.data = new.data ** other new.dtype = new.data.dtype new.ftype = _transtabl[new.dtype.char] return new elif isspmatrix(other): other = other.tocsr() if (other.shape != self.shape): raise ValueError, "inconsistent shapes" indptr, ind, data = fn(self.shape[0], self.shape[1], \ self.indptr, self_ind, \ self.data, other.indptr, \ other_ind, other.data) return cls((data, ind, indptr), (self.shape[0], other.shape[1])) else: raise TypeError, "unsupported type for sparse matrix power" def _matmat(self, other, self_ind, other_ind, fn, cls): if isspmatrix(other): M, K1 = self.shape K2, N = other.shape if (K1 != K2): raise ValueError, "shape mismatch error" other = other.tocsc() indptr, ind, data = fn(M, N, self.indptr, self_ind, \ self.data, other.indptr, \ other_ind, other.data) return cls((data, ind, indptr), (M, N)) elif isdense(other): return self.matmat(csc_matrix(other)) else: raise TypeError, "need a dense or sparse matrix" def _matvec(self, other, self_ind, fn): if isdense(other): oth = numpy.ravel(other) y = fn(self.shape[0], self.shape[1], \ self.indptr, self_ind, self.data, oth) if isinstance(other, matrix): y = asmatrix(y) if other.ndim == 2 and other.shape[1] == 1: y = y.T return y elif isspmatrix(other): raise TypeError, "use matmat() for sparse * sparse" else: raise TypeError, "need a dense vector" def _rmatvec(self, other, shape0, shape1, fn, conjugate=True): if isdense(other): if conjugate: cd = conj(self.data) else: cd = self.data oth = numpy.ravel(other) y = fn(shape0, shape1, self.indptr, self.rowind, cd, oth) if isinstance(other, matrix): y = asmatrix(y) if other.ndim == 2 and other.shape[1] == 1: y = y.T return y elif isspmatrix(other): raise TypeError, "use matmat() for sparse * sparse" else: raise TypeError, "need a dense vector" def getdata(self, ind): return self.data[ind] def _tocoo(self, fn, self_ind): rows, cols, data = fn(self.shape[0], self.shape[1], \ self.indptr, self_ind, self.data) return coo_matrix((data, (rows, cols)), self.shape) class csc_matrix(_cs_matrix):
class csc_matrix(spmatrix):
def save(self, file_name, format = '%d %d %f\n'): try: fd = open(file_name, 'w') except Exception, e: raise e, file_name
68509c21665a282972955c9c541c98c796ab1d7d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12971/68509c21665a282972955c9c541c98c796ab1d7d/sparse.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1923, 12, 2890, 16, 585, 67, 529, 16, 740, 273, 1995, 72, 738, 72, 738, 74, 64, 82, 11, 4672, 775, 30, 5194, 273, 1696, 12, 768, 67, 529, 16, 296, 91, 6134, 1335, 1185, 16, 425, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1923, 12, 2890, 16, 585, 67, 529, 16, 740, 273, 1995, 72, 738, 72, 738, 74, 64, 82, 11, 4672, 775, 30, 5194, 273, 1696, 12, 768, 67, 529, 16, 296, 91, 6134, 1335, 1185, 16, 425, ...
if str(res[0][11])[-3:] == ".00": collection_table_update_time = str(res[0][11])[:-3] else: collection_table_update_time = str(res[0][11])
collection_table_update_time = re.sub(r'\.00$', '', str(res[0][11]))
def perform_runwebcoll(colID, ln, confirm=0, callback='yes'): """Status of the collection tables / indexes""" subtitle = """<a name="11"></a>Webcoll Status""" output = "" colID = int(colID) col_dict = dict(get_def_name('', "collection")) output += """<br><b>Last updates:</b><br>""" collection_table_update_time = "" collection_web_update_time = "" res = run_sql("SHOW TABLE STATUS LIKE 'collection'") if res: if str(res[0][11])[-3:] == ".00": collection_table_update_time = str(res[0][11])[:-3] else: collection_table_update_time = str(res[0][11]) output += "Collection table last updated: %s<br>" % collection_table_update_time try: file = open("%s/collections/1/last-updated-ln=en.html" % cachedir) collection_web_update_time = str(file.readline()) output += "Collection webpage last updated: %s<br>" % collection_web_update_time file.close() except StandardError, e: pass tabletime = time.strptime(collection_table_update_time, "%Y-%m-%d %H:%M:%S") try: webtime = time.strptime(collection_web_update_time, "%d %b %Y %H:%M:%S %Z") except ValueError, e: collection_web_update_time[0:string.rfind(collection_web_update_time, " ")] webtime = time.strptime(collection_web_update_time, "%d %b %Y %H:%M:%S") if tabletime > webtime: output += """<br><b><span class="info">Warning: The collections has been modified since last time Webcoll was executed, to process the changes, Webcoll must be executed.</span></b><br>""" header = ['ID', 'Name', 'Time', 'Status', 'Progress'] actions = [] output += """<br><b>Last BibSched tasks:</b><br>""" res = run_sql("select id, proc, host, user, runtime, sleeptime, arguments, status, progress from schTASK where proc='webcoll' and runtime< now() ORDER by runtime") if len(res) > 0: (id, proc, host, user, runtime, sleeptime, arguments, status, progress) = res[len(res) - 1] webcoll__update_time = runtime actions.append([id, proc, runtime, (status !="" and status or ''), (progress !="" and progress or '')]) else: actions.append(['', 'webcoll', '', '', 'Not executed yet']) res = run_sql("select id, proc, host, user, runtime, sleeptime, arguments, status, progress from schTASK where proc='bibindex' and runtime< now() ORDER by runtime") if len(res) > 0: (id, proc, host, user, runtime, sleeptime, arguments, status, progress) = res[len(res) - 1] actions.append([id, proc, runtime, (status !="" and status or ''), (progress !="" and progress or '')]) else: actions.append(['', 'bibindex', '', '', 'Not executed yet']) output += tupletotable(header=header, tuple=actions) output += """<br><b>Next scheduled BibSched run:</b><br>""" actions = [] res = run_sql("select id, proc, host, user, runtime, sleeptime, arguments, status, progress from schTASK where proc='webcoll' and runtime > now() ORDER by runtime") webcoll_future = "" if len(res) > 0: (id, proc, host, user, runtime, sleeptime, arguments, status, progress) = res[0] webcoll__update_time = runtime actions.append([id, proc, runtime, (status !="" and status or ''), (progress !="" and progress or '')]) webcoll_future = "yes" else: actions.append(['', 'webcoll', '', '', 'Not scheduled']) res = run_sql("select id, proc, host, user, runtime, sleeptime, arguments, status, progress from schTASK where proc='bibindex' and runtime > now() ORDER by runtime") bibindex_future = "" if len(res) > 0: (id, proc, host, user, runtime, sleeptime, arguments, status, progress) = res[0] actions.append([id, proc, runtime, (status !="" and status or ''), (progress !="" and progress or '')]) bibindex_future = "yes" else: actions.append(['', 'bibindex', '', '', 'Not scheduled']) output += tupletotable(header=header, tuple=actions) if webcoll_future == "": output += """<br><b><span class="info">Warning: Webcoll is not scheduled for a future run by bibsched, any updates to the collection will not be processed.</span></b><br>""" if bibindex_future == "": output += """<br><b><span class="info">Warning: Bibindex is not scheduled for a future run by bibsched, any updates to the records will not be processed.</span></b><br>""" try: body = [output, extra] except NameError: body = [output] if callback: return perform_index(colID, ln, "perform_runwebcoll", addadminbox(subtitle, body)) else: return addadminbox(subtitle, body)
754d19915d70f2e3a0364cac500bb203b82c6e16 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2139/754d19915d70f2e3a0364cac500bb203b82c6e16/websearchadminlib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3073, 67, 2681, 4875, 12910, 12, 1293, 734, 16, 7211, 16, 6932, 33, 20, 16, 1348, 2218, 9707, 11, 4672, 3536, 1482, 434, 326, 1849, 4606, 342, 5596, 8395, 225, 20281, 273, 3536, 32, 69...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3073, 67, 2681, 4875, 12910, 12, 1293, 734, 16, 7211, 16, 6932, 33, 20, 16, 1348, 2218, 9707, 11, 4672, 3536, 1482, 434, 326, 1849, 4606, 342, 5596, 8395, 225, 20281, 273, 3536, 32, 69...
def __init__(self, channel_info, search_term, section):
def __init__(self, channel_info, search_term, section=u"video"):
def __init__(self, channel_info, search_term, section): self.channel_info = channel_info self.search_term = search_term self.section = section
d8f8302d78fdc2cc5d3a07c6d4563070109cd8ce /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12354/d8f8302d78fdc2cc5d3a07c6d4563070109cd8ce/messages.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1904, 67, 1376, 16, 1623, 67, 6408, 16, 2442, 33, 89, 6, 9115, 6, 4672, 365, 18, 4327, 67, 1376, 273, 1904, 67, 1376, 365, 18, 3072, 67, 6408, 273, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1904, 67, 1376, 16, 1623, 67, 6408, 16, 2442, 33, 89, 6, 9115, 6, 4672, 365, 18, 4327, 67, 1376, 273, 1904, 67, 1376, 365, 18, 3072, 67, 6408, 273, 1...
def command_set(self, args):
def command_set(self, arg):
def command_set(self, args): """ /set <option> [value] """ if len(args) != 2 and len(args) != 1: self.command_help(['set']) return option = args[0] if len(args) == 2: value = args[1] else: value = '' config.set_and_save(option, value) msg = "%s=%s" % (option, value) room = self.current_room() self.add_message_to_room(room, msg)
1c7377804051166c26f33457378524d192077c66 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9814/1c7377804051166c26f33457378524d192077c66/gui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1296, 67, 542, 12, 2890, 16, 1501, 4672, 3536, 342, 542, 411, 3482, 34, 306, 1132, 65, 3536, 309, 562, 12, 1968, 13, 480, 576, 471, 562, 12, 1968, 13, 480, 404, 30, 365, 18, 3076, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1296, 67, 542, 12, 2890, 16, 1501, 4672, 3536, 342, 542, 411, 3482, 34, 306, 1132, 65, 3536, 309, 562, 12, 1968, 13, 480, 576, 471, 562, 12, 1968, 13, 480, 404, 30, 365, 18, 3076, ...
TixWidget.__init__(self,master,'tixNoteBook', ['options'], cnf, kw) self.subwidget_list['nbframe'] = TixSubWidget(self, 'nbframe', destroy_physically=0)
TixWidget.__init__(self,master,'tixNoteBook', ['options'], cnf, kw) self.subwidget_list['nbframe'] = TixSubWidget(self, 'nbframe', destroy_physically=0)
def __init__ (self,master=None,cnf={}, **kw):
22710823fb554a796dc96c44885d7a9389426824 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/22710823fb554a796dc96c44885d7a9389426824/Tix.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 261, 2890, 16, 7525, 33, 7036, 16, 10305, 74, 28793, 2826, 9987, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 261, 2890, 16, 7525, 33, 7036, 16, 10305, 74, 28793, 2826, 9987, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
if check != int(vat[8]): return False return True elif vat[0] in ('N', 'P', 'Q', 'S'):
return True elif vat[0] in ('N', 'P', 'Q', 'R', 'S', 'W'):
def check_vat_es(self, vat): ''' Check Spain VAT number. ''' if len(vat) != 9: return False
3de195d3730638334f30e9d665f903ccad28a417 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/3de195d3730638334f30e9d665f903ccad28a417/partner.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 25012, 67, 281, 12, 2890, 16, 17359, 4672, 9163, 2073, 5878, 530, 776, 789, 1300, 18, 9163, 309, 562, 12, 25012, 13, 480, 2468, 30, 327, 1083, 2, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 25012, 67, 281, 12, 2890, 16, 17359, 4672, 9163, 2073, 5878, 530, 776, 789, 1300, 18, 9163, 309, 562, 12, 25012, 13, 480, 2468, 30, 327, 1083, 2, -100, -100, -100, -100, -100,...
self.pc=PluginContainer(p_frame,self.root, self) self.pc.rborder=b
self.pc = PluginContainer(p_frame, self.root, self) self.pc.rborder = b
def build_window(self): root = self.application.root p_frame = TFrame(root, style='FlatFrame') p_frame.pack(side = 'right', fill = Y) palette_frame = TFrame(p_frame, style='FlatFrame', borderwidth=3) palette_frame.pack(side = 'right', fill = Y) b = TLabel(p_frame, style='VLine3') self.pc=PluginContainer(p_frame,self.root, self) self.pc.rborder=b b = TLabel(root, style='VLine2') b.pack(side = 'right', fill = Y)
5bd05aab08ecc99debb8be46af1003105e4183ab /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3123/5bd05aab08ecc99debb8be46af1003105e4183ab/mainwindow.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 67, 5668, 12, 2890, 4672, 1365, 273, 365, 18, 3685, 18, 3085, 225, 293, 67, 3789, 273, 399, 3219, 12, 3085, 16, 2154, 2218, 16384, 3219, 6134, 293, 67, 3789, 18, 2920, 12, 5564, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 5668, 12, 2890, 4672, 1365, 273, 365, 18, 3685, 18, 3085, 225, 293, 67, 3789, 273, 399, 3219, 12, 3085, 16, 2154, 2218, 16384, 3219, 6134, 293, 67, 3789, 18, 2920, 12, 5564, ...
if not isinstance(obj, Bond) and env.debug(): print "debug fyi: not isinstance(obj, Bond) in get_obj_under_cursor, for %r" % (obj,)
if env.debug(): if isinstance(obj, Atom): print "debug fyi: likely bug: selobj is Atom but not in selatom: %r" % (obj,) elif isinstance(obj, Jig): print "debug fyi: selobj is a Jig in get_obj_under_cursor (comment is wrong), for %r" % (obj,)
def get_obj_under_cursor(self, event): '''Return the object under the cursor. Only atoms, singlets and bonds are returned. Returns None for all other cases, including when a bond, jig or nothing is under the cursor. ''' #bruce 060331 comment: this docstring appears wrong, since the code looks like it can return jigs. ### WARNING: this is slow, and redundant with highlighting -- only call it on mousedown or mouseup, never in move or drag. # [true as of 060726 and before; bruce 060726 comment] # It may be that it's not called when highlighting is on, and it has no excuse to be, but I suspect it is anyway. # [bruce 060726 comment] if self.hover_highlighting_enabled: self.update_selatom(event) #bruce 041130 in case no update_selatom happened yet # update_selatom() updates self.o.selatom and self.o.selobj. # self.o.selatom is either a real atom or a singlet [or None]. # self.o.selobj can be a bond, and is used in leftUp() to determine if a bond was selected. # Warning: if there was no GLPane repaint event (i.e. paintGL call) since the last bareMotion, # update_selatom can't make selobj/selatom correct until the next time paintGL runs. # Therefore, the present value might be out of date -- but it does correspond to whatever # highlighting is on the screen, so whatever it is should not be a surprise to the user, # so this is not too bad -- the user should wait for the highlighting to catch up to the mouse # motion before pressing the mouse. [bruce 050705 comment] [might be out of context, copied from other code] obj = self.o.selatom # a "highlighted" atom or singlet if obj is None and self.o.selobj: obj = self.o.selobj # a "highlighted" bond if not isinstance(obj, Bond) and env.debug(): print "debug fyi: not isinstance(obj, Bond) in get_obj_under_cursor, for %r" % (obj,) # I suspect some jigs can occur here # (and if not, we should put them here -- I know of no excuse for jig highlighting # to work differently than for anything else) [bruce 060721] if obj is None: # a "highlighted" jig [i think this comment is misleading, it might really be nothing -- bruce 060726] obj = self.get_jig_under_cursor(event) if env.debug(): print "debug fyi: get_jig_under_cursor returns %r" % (obj,) # [bruce 060721] pass else: # No hover highlighting obj = self.o.assy.findAtomUnderMouse(event, self.water_enabled, singlet_ok = True) # Note: findAtomUnderMouse() only returns atoms and singlets, not bonds or jigs. # This means that bonds can never be selected when highlighting is turned off. # [What about jigs? bruce question 060721] return obj
06f1b222ddf7d812f613b43cc2fa4c24daa5ccfe /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/06f1b222ddf7d812f613b43cc2fa4c24daa5ccfe/selectMode.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 2603, 67, 9341, 67, 9216, 12, 2890, 16, 871, 4672, 9163, 990, 326, 733, 3613, 326, 3347, 18, 225, 5098, 9006, 16, 4864, 17307, 471, 15692, 854, 2106, 18, 2860, 599, 364, 777, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2603, 67, 9341, 67, 9216, 12, 2890, 16, 871, 4672, 9163, 990, 326, 733, 3613, 326, 3347, 18, 225, 5098, 9006, 16, 4864, 17307, 471, 15692, 854, 2106, 18, 2860, 599, 364, 777, ...
print 'avant', res2
def _result_get(x, keys): if x[1] in keys: return False keys.append(x[1]) if x[3]: model,id = x[2].split(',') id = int(id) fields = self.pool.get(model).fields_get_keys(cr, uid) pos = 0 while pos<len(fields): if fields[pos] in ('report_sxw_content', 'report_rml_content', 'report_sxw', 'report_rml', 'report_sxw_content_data', 'report_rml_content_data'): del fields[pos] else: pos+=1 try: datas = self.pool.get(model).read(cr, uid, [id], fields, context) except except_orm, e: print 'false 1',model,fields,e return False datas= datas and datas[0] or None if not datas: #ir_del(cr, uid, x[0]) print 'false 2' return False else: datas = pickle.loads(str(x[2].encode('utf-8'))) if meta: meta2 = pickle.loads(x[4]) return (x[0],x[1],datas,meta2) return (x[0],x[1],datas)
d716dd6bb6ed3586cc83747e569c654cfc6d0f08 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/d716dd6bb6ed3586cc83747e569c654cfc6d0f08/ir_values.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2088, 67, 588, 12, 92, 16, 1311, 4672, 309, 619, 63, 21, 65, 316, 1311, 30, 327, 1083, 1311, 18, 6923, 12, 92, 63, 21, 5717, 309, 619, 63, 23, 14542, 938, 16, 350, 273, 619, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2088, 67, 588, 12, 92, 16, 1311, 4672, 309, 619, 63, 21, 65, 316, 1311, 30, 327, 1083, 1311, 18, 6923, 12, 92, 63, 21, 5717, 309, 619, 63, 23, 14542, 938, 16, 350, 273, 619, ...
self._view.graph().addCallback(self._graph_event_callback)
self._graph_event_callback_id = self._view.graph().addCallback(self._graph_event_callback)
def SetGraphCallback(self): self._graph_event_callback = GraphCallback(self) self._graph_event_callback.thisown = 0 self._view.graph().addCallback(self._graph_event_callback) GraphCallback.SelectEvent.BIND(self, self.onSelect) GraphCallback.DeselectEvent.BIND(self, self.onDeselect) GraphCallback.SelectionClearEvent.BIND(self, self.onSelectionClear) GraphCallback.RefreshEvent.BIND(self, self.onRefresh) GraphCallback.ActivateEvent.BIND(self, self.onActivate)
b65ff623d99ba8bc623483767a58ad3139bbe28b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14747/b65ff623d99ba8bc623483767a58ad3139bbe28b/UI.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1000, 4137, 2428, 12, 2890, 4672, 365, 6315, 4660, 67, 2575, 67, 3394, 273, 5601, 2428, 12, 2890, 13, 365, 6315, 4660, 67, 2575, 67, 3394, 18, 2211, 995, 273, 374, 365, 6315, 4660, 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, 1000, 4137, 2428, 12, 2890, 4672, 365, 6315, 4660, 67, 2575, 67, 3394, 273, 5601, 2428, 12, 2890, 13, 365, 6315, 4660, 67, 2575, 67, 3394, 18, 2211, 995, 273, 374, 365, 6315, 4660, 67,...
self.curNode.appendChild(node)
def ignorableWhitespace(self, chars): node = self.document.createTextNode(chars) self.curNode.appendChild(node)
c24483579d2ef3b62fbbed2f05d121e7270d4c8a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/c24483579d2ef3b62fbbed2f05d121e7270d4c8a/pulldom.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9750, 15514, 9431, 12, 2890, 16, 5230, 4672, 756, 273, 365, 18, 5457, 18, 2640, 17299, 12, 7549, 13, 365, 18, 1397, 907, 18, 6923, 1763, 12, 2159, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9750, 15514, 9431, 12, 2890, 16, 5230, 4672, 756, 273, 365, 18, 5457, 18, 2640, 17299, 12, 7549, 13, 365, 18, 1397, 907, 18, 6923, 1763, 12, 2159, 13, 2, -100, -100, -100, -100, -100, ...
"WHERE package in (" + "?," * len(package_ids) + ")"
"WHERE package in (" + ",".join( [ "?" for e in package_ids ]) + ")"
def iter_imports(self, package_ids, id=None, id_alt=None, url=None, url_alt=None, uri=None, uri_alt=None, ): """ Yield tuples of the form (IMPORT, package_id, id, url, uri). """ assert _DF or not isinstance(package_ids, basestring) assert _DF or id is None or id_alt is None assert _DF or url is None or url_alt is None assert _DF or uri is None or uri_alt is None
9211fbc135554dfd26ec9647541c2f8691c68822 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11977/9211fbc135554dfd26ec9647541c2f8691c68822/sqlite.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1400, 67, 21350, 12, 2890, 16, 2181, 67, 2232, 16, 612, 33, 7036, 16, 282, 612, 67, 2390, 33, 7036, 16, 880, 33, 7036, 16, 225, 880, 67, 2390, 33, 7036, 16, 2003, 33, 7036, 16, 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, 1400, 67, 21350, 12, 2890, 16, 2181, 67, 2232, 16, 612, 33, 7036, 16, 282, 612, 67, 2390, 33, 7036, 16, 880, 33, 7036, 16, 225, 880, 67, 2390, 33, 7036, 16, 2003, 33, 7036, 16, 225...
super(SelectMultipleField, self).__call__(multiple="multiple", **kwargs)
return super(SelectMultipleField, self).__call__(multiple="multiple", **kwargs)
def __call__(self, **kwargs): super(SelectMultipleField, self).__call__(multiple="multiple", **kwargs)
f26312c5a98c39b434e8349db0e1933c781d43bf /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8614/f26312c5a98c39b434e8349db0e1933c781d43bf/fields.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 2826, 4333, 4672, 2240, 12, 3391, 8438, 974, 16, 365, 2934, 972, 1991, 972, 12, 9622, 1546, 9622, 3113, 2826, 4333, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 2826, 4333, 4672, 2240, 12, 3391, 8438, 974, 16, 365, 2934, 972, 1991, 972, 12, 9622, 1546, 9622, 3113, 2826, 4333, 13, 2, -100, -100, -100, -100, -100, ...
cdspageheader, \
re.sub("<!--USERINFOBOX-->", create_user_infobox(uid), cdspageheader),
def create_header(cc=cdsname, as=0, headeradd=""): "Creates CDS header and info on URL and date." return """
f839501b02b6f1b955e60deafa542ab8007124be /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2139/f839501b02b6f1b955e60deafa542ab8007124be/search_engine.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 3374, 12, 952, 33, 71, 2377, 529, 16, 487, 33, 20, 16, 1446, 1289, 1546, 6, 4672, 315, 2729, 385, 3948, 1446, 471, 1123, 603, 1976, 471, 1509, 1199, 327, 3536, 2, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 3374, 12, 952, 33, 71, 2377, 529, 16, 487, 33, 20, 16, 1446, 1289, 1546, 6, 4672, 315, 2729, 385, 3948, 1446, 471, 1123, 603, 1976, 471, 1509, 1199, 327, 3536, 2, -100, -100...
listfuncs = false
listfuncs = False
def main(argv=None): import getopt if argv is None: argv = sys.argv try: opts, prog_argv = getopt.getopt(argv[1:], "tcrRf:d:msC:l", ["help", "version", "trace", "count", "report", "no-report", "file=", "missing", "ignore-module=", "ignore-dir=", "coverdir=", "listfuncs",]) except getopt.error, msg: sys.stderr.write("%s: %s\n" % (sys.argv[0], msg)) sys.stderr.write("Try `%s --help' for more information\n" % sys.argv[0]) sys.exit(1) trace = 0 count = 0 report = 0 no_report = 0 counts_file = None missing = 0 ignore_modules = [] ignore_dirs = [] coverdir = None summary = 0 listfuncs = false for opt, val in opts: if opt == "--help": usage(sys.stdout) sys.exit(0) if opt == "--version": sys.stdout.write("trace 2.0\n") sys.exit(0) if opt == "-l" or opt == "--listfuncs": listfuncs = true continue if opt == "-t" or opt == "--trace": trace = 1 continue if opt == "-c" or opt == "--count": count = 1 continue if opt == "-r" or opt == "--report": report = 1 continue if opt == "-R" or opt == "--no-report": no_report = 1 continue if opt == "-f" or opt == "--file": counts_file = val continue if opt == "-m" or opt == "--missing": missing = 1 continue if opt == "-C" or opt == "--coverdir": coverdir = val continue if opt == "-s" or opt == "--summary": summary = 1 continue if opt == "--ignore-module": ignore_modules.append(val) continue if opt == "--ignore-dir": for s in val.split(os.pathsep): s = os.path.expandvars(s) # should I also call expanduser? (after all, could use $HOME) s = s.replace("$prefix", os.path.join(sys.prefix, "lib", "python" + sys.version[:3])) s = s.replace("$exec_prefix", os.path.join(sys.exec_prefix, "lib", "python" + sys.version[:3])) s = os.path.normpath(s) ignore_dirs.append(s) continue assert 0, "Should never get here" if listfuncs and (count or trace): _err_exit("cannot specify both --listfuncs and (--trace or --count)") if not count and not trace and not report and not listfuncs: _err_exit("must specify one of --trace, --count, --report or --listfuncs") if report and no_report: _err_exit("cannot specify both --report and --no-report") if report and not counts_file: _err_exit("--report requires a --file") if no_report and len(prog_argv) == 0: _err_exit("missing name of file to run") # everything is ready if report: results = CoverageResults(infile=counts_file, outfile=counts_file) results.write_results(missing, summary=summary, coverdir=coverdir) else: sys.argv = prog_argv progname = prog_argv[0] sys.path[0] = os.path.split(progname)[0] t = Trace(count, trace, countfuncs=listfuncs, ignoremods=ignore_modules, ignoredirs=ignore_dirs, infile=counts_file, outfile=counts_file) try: t.run('execfile(' + `progname` + ')') except IOError, err: _err_exit("Cannot run file %s because: %s" % (`sys.argv[0]`, err)) except SystemExit: pass results = t.results() if not no_report: results.write_results(missing, summary=summary, coverdir=coverdir)
1255e8bca5f975b133653db2e2f74b0d4cb7a9da /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/1255e8bca5f975b133653db2e2f74b0d4cb7a9da/trace.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 19485, 33, 7036, 4672, 1930, 336, 3838, 225, 309, 5261, 353, 599, 30, 5261, 273, 2589, 18, 19485, 775, 30, 1500, 16, 11243, 67, 19485, 273, 336, 3838, 18, 588, 3838, 12, 1948...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 19485, 33, 7036, 4672, 1930, 336, 3838, 225, 309, 5261, 353, 599, 30, 5261, 273, 2589, 18, 19485, 775, 30, 1500, 16, 11243, 67, 19485, 273, 336, 3838, 18, 588, 3838, 12, 1948...
if mssdk is not None: ftc = os.path.join(mssdk, _SANITY_CHECK_FILE[versionstr]) if not os.path.exists(ftc): debug("File %s used for sanity check not found" % ftc) return None else: return None
if mssdk is not None: ftc = os.path.join(mssdk, _SANITY_CHECK_FILE[versionstr]) if not os.path.exists(ftc): debug("File %s used for sanity check not found" % ftc) return None else: return None
def find_mssdk(versionstr): """Return the MSSSDK given the version string.""" if versionstr.startswith('2003'): mssdk = find_mssdk_2003(versionstr) else: mssdk = sdir_from_reg(versionstr) if mssdk is not None: ftc = os.path.join(mssdk, _SANITY_CHECK_FILE[versionstr]) if not os.path.exists(ftc): debug("File %s used for sanity check not found" % ftc) return None else: return None return mssdk
0bf47cb689ea7c0e2d67cdbe29c9a518e03b8fae /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12817/0bf47cb689ea7c0e2d67cdbe29c9a518e03b8fae/sdk.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 67, 959, 20907, 12, 1589, 701, 4672, 3536, 990, 326, 490, 1260, 22625, 864, 326, 1177, 533, 12123, 309, 1177, 701, 18, 17514, 1918, 2668, 6976, 23, 11, 4672, 312, 1049, 2883, 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, 1104, 67, 959, 20907, 12, 1589, 701, 4672, 3536, 990, 326, 490, 1260, 22625, 864, 326, 1177, 533, 12123, 309, 1177, 701, 18, 17514, 1918, 2668, 6976, 23, 11, 4672, 312, 1049, 2883, 273, ...
option_parser.add_option('-o', '--no_html_results', action='store_true', default=False, help=('If specified, do not generate html that ' 'compares the rebaselining results.'))
def main(): """Main function to produce new baselines.""" option_parser = optparse.OptionParser() option_parser.add_option('-v', '--verbose', action='store_true', default=False, help='include debug-level logging.') option_parser.add_option('-p', '--platforms', default='mac,win,win-xp,win-vista,linux', help=('Comma delimited list of platforms that need ' 'rebaselining.')) option_parser.add_option('-u', '--archive_url', default=('http://build.chromium.org/buildbot/' 'layout_test_results'), help=('Url to find the layout test result archive ' 'file.')) option_parser.add_option('-t', '--archive_name', default='layout-test-results', help='Layout test result archive name.') option_parser.add_option('-w', '--webkit_canary', action='store_true', default=False, help=('If True, pull baselines from webkit.org ' 'canary bot.')) option_parser.add_option('-b', '--backup', action='store_true', default=False, help=('Whether or not to backup the original test ' 'expectations file after rebaseline.')) option_parser.add_option('-o', '--no_html_results', action='store_true', default=False, help=('If specified, do not generate html that ' 'compares the rebaselining results.')) option_parser.add_option('-d', '--html_directory', default='', help=('The directory that stores the results for ' 'rebaselining comparison.')) option_parser.add_option('-c', '--clean_html_directory', action='store_true', default=False, help=('If specified, delete all existing files in ' 'the html directory before rebaselining.')) option_parser.add_option('-e', '--browser_path', default='', help=('The browser path that you would like to ' 'use to launch the rebaselining result ' 'comparison html')) options = option_parser.parse_args()[0] # Set up our logging format. log_level = logging.INFO if options.verbose: log_level = logging.DEBUG logging.basicConfig(level=log_level, format=('%(asctime)s %(filename)s:%(lineno)-3d ' '%(levelname)s %(message)s'), datefmt='%y%m%d %H:%M:%S') # Verify 'platforms' option is valid if not options.platforms: logging.error('Invalid "platforms" option. --platforms must be specified ' 'in order to rebaseline.') sys.exit(1) platforms = [p.strip().lower() for p in options.platforms.split(',')] for platform in platforms: if not platform in REBASELINE_PLATFORM_ORDER: logging.error('Invalid platform: "%s"' % (platform)) sys.exit(1) # Adjust the platform order so rebaseline tool is running at the order of # 'mac', 'win' and 'linux'. This is in same order with layout test baseline # search paths. It simplifies how the rebaseline tool detects duplicate # baselines. Check _IsDupBaseline method for details. rebaseline_platforms = [] for platform in REBASELINE_PLATFORM_ORDER: if platform in platforms: rebaseline_platforms.append(platform) if not options.no_html_results: options.html_directory = SetupHtmlDirectory(options.html_directory, options.clean_html_directory) rebaselining_tests = set() backup = options.backup for platform in rebaseline_platforms: rebaseliner = Rebaseliner(platform, options) logging.info('') LogDashedString('Rebaseline started', platform) if rebaseliner.Run(backup): # Only need to backup one original copy of test expectation file. backup = False LogDashedString('Rebaseline done', platform) else: LogDashedString('Rebaseline failed', platform, logging.ERROR) rebaselining_tests |= set(rebaseliner.GetRebaseliningTests()) if not options.no_html_results: logging.info('') LogDashedString('Rebaselining result comparison started', None) html_generator = HtmlGenerator(options, rebaseline_platforms, rebaselining_tests) html_generator.GenerateHtml() html_generator.ShowHtml() LogDashedString('Rebaselining result comparison done', None) sys.exit(0)
a8cca2e7f89f106d5b2cdf9f818191a14c4afb8b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/a8cca2e7f89f106d5b2cdf9f818191a14c4afb8b/rebaseline.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 3536, 6376, 445, 358, 11402, 394, 2580, 14567, 12123, 225, 1456, 67, 4288, 273, 2153, 2670, 18, 1895, 2678, 1435, 1456, 67, 4288, 18, 1289, 67, 3482, 2668, 17, 90, 2187, 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, 2774, 13332, 3536, 6376, 445, 358, 11402, 394, 2580, 14567, 12123, 225, 1456, 67, 4288, 273, 2153, 2670, 18, 1895, 2678, 1435, 1456, 67, 4288, 18, 1289, 67, 3482, 2668, 17, 90, 2187, 353...
elif _isfunction(v) or _isclass(v):
elif _isfunction(v) or _isclass(v) or _ismethod(v):
def run__test__(self, d, name): """d, name -> Treat dict d like module.__test__.
93c6492106baad86aaa09980a7560c2724b8e132 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/93c6492106baad86aaa09980a7560c2724b8e132/doctest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 972, 3813, 972, 12, 2890, 16, 302, 16, 508, 4672, 3536, 72, 16, 508, 317, 26564, 2065, 302, 3007, 1605, 16186, 3813, 25648, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 972, 3813, 972, 12, 2890, 16, 302, 16, 508, 4672, 3536, 72, 16, 508, 317, 26564, 2065, 302, 3007, 1605, 16186, 3813, 25648, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
bt.clicked = (my_pager_1, (pg, info))
bt.callback_clicked_add(my_pager_1, pg, info)
def pager_clicked(obj, it, *args, **kwargs): win = elementary.Window("pager", elementary.ELM_WIN_BASIC) win.autodel_set(True) win.title_set("Pager") bg = elementary.Background(win) win.resize_object_add(bg) bg.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND) bg.show() pg = elementary.Pager(win) win.resize_object_add(pg) pg.show() info = dict() bx = elementary.Box(win) bx.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND) bx.show() lb = elementary.Label(win) lb.label_set("This is page 1 in a pager stack.<br>" "<br>" "So what is a pager stack? It is a stack<br>" "of pages that hold widgets in it. The<br>" "pages can be pushed and popped on and<br>" "off the stack, activated and otherwise<br>" "activated if already in the stack<br>" "(activated means promoted to the top of<br>" "the stack).<br>" "<br>" "The theme may define the animation how<br>" "show and hide of pages.") bx.pack_end(lb) lb.show() bt = elementary.Button(win) bt.label_set("Flip to 2") bt.clicked = (my_pager_1, (pg, info)) bx.pack_end(bt) bt.show() bt = elementary.Button(win) bt.label_set("Popme") bt.clicked = (my_pager_pop, (pg, info)) bx.pack_end(bt) bt.show() pg.content_push(bx) info["pg1"] = bx; bx = elementary.Box(win) bx.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND) bx.show() lb = elementary.Label(win) lb.label_set("This is page 2 in a pager stack.<br>" "<br>" "This is just like the previous page in<br>" "the pager stack.") bx.pack_end(lb) lb.show() bt = elementary.Button(win) bt.label_set("Flip to 3") bt.clicked = (my_pager_2, (pg, info)) bx.pack_end(bt) bt.show() bt = elementary.Button(win) bt.label_set("Popme") bt.clicked = (my_pager_pop, (pg,info)) bx.pack_end(bt) bt.show() pg.content_push(bx) info["pg2"] = bx bx = elementary.Box(win) bx.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND) bx.show() lb = elementary.Label(win) lb.label_set("This is page 3 in a pager stack.<br>" "<br>" "This is just like the previous page in<br>" "the pager stack.") bx.pack_end(lb) lb.show() bt = elementary.Button(win) bt.label_set("Flip to 1") bt.clicked = (my_pager_3, (pg,info)) bx.pack_end(bt) bt.show() bt = elementary.Button(win) bt.label_set("Popme") bt.clicked = (my_pager_pop, (pg,info)) bx.pack_end(bt) bt.show() pg.content_push(bx) info["pg3"] = bx win.resize(320, 320) win.show()
ef127faaba8fc06ebbb7bd48a4185405cdfc6a4e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12343/ef127faaba8fc06ebbb7bd48a4185405cdfc6a4e/test.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12679, 67, 7475, 329, 12, 2603, 16, 518, 16, 380, 1968, 16, 2826, 4333, 4672, 5657, 273, 930, 814, 18, 3829, 2932, 24081, 3113, 930, 814, 18, 2247, 49, 67, 24572, 67, 25642, 13, 5657, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12679, 67, 7475, 329, 12, 2603, 16, 518, 16, 380, 1968, 16, 2826, 4333, 4672, 5657, 273, 930, 814, 18, 3829, 2932, 24081, 3113, 930, 814, 18, 2247, 49, 67, 24572, 67, 25642, 13, 5657, ...
'da': u'Portal diskussion',
'da': u'Portaldiskussion',
def __init__(self): family.Family.__init__(self) self.name = 'wikipedia'
4fb000b17584a84d920642631147419ef40bd731 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4404/4fb000b17584a84d920642631147419ef40bd731/wikipedia_family.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 6755, 18, 9203, 16186, 2738, 972, 12, 2890, 13, 365, 18, 529, 273, 296, 11999, 13744, 11, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 6755, 18, 9203, 16186, 2738, 972, 12, 2890, 13, 365, 18, 529, 273, 296, 11999, 13744, 11, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
print("-", line, end=' ')
print("-", line, end='')
def pair(x0, x1): # x0:x1 are 0-based slice indices; convert to 1-based line indices. x0 += 1 if x0 >= x1: return "line " + str(x0) else: return "lines %d-%d" % (x0, x1)
2ab7a78dfe13418683ec7409d4dd7c9db9de1328 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8125/2ab7a78dfe13418683ec7409d4dd7c9db9de1328/regrtest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3082, 12, 92, 20, 16, 619, 21, 4672, 468, 619, 20, 30, 92, 21, 854, 374, 17, 12261, 2788, 4295, 31, 1765, 358, 404, 17, 12261, 980, 4295, 18, 619, 20, 1011, 404, 309, 619, 20, 1545...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3082, 12, 92, 20, 16, 619, 21, 4672, 468, 619, 20, 30, 92, 21, 854, 374, 17, 12261, 2788, 4295, 31, 1765, 358, 404, 17, 12261, 980, 4295, 18, 619, 20, 1011, 404, 309, 619, 20, 1545...
print dir() return True
print envp return True
def route_up(envp): print dir() return True
05f75fcd4276beb4b127476d6d02dcc08d6e82d6 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3904/05f75fcd4276beb4b127476d6d02dcc08d6e82d6/ovpn-def.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1946, 67, 416, 12, 3074, 84, 4672, 1172, 1550, 84, 327, 1053, 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, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1946, 67, 416, 12, 3074, 84, 4672, 1172, 1550, 84, 327, 1053, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
def _index_term(self, word, doc_number, positions): if word: prefix, suffix = word[0], word[1:]
def _index_term(self, term, documents): """ Indexes the given term. The parameter 'documents' is a mapping from document number to list of positions: {<document number>: [postion, ...], ...} """ if term: prefix, suffix = term[0], term[1:]
def _index_term(self, word, doc_number, positions): if word: prefix, suffix = word[0], word[1:] if prefix in self.children: subtree = self.children[prefix] else: # Get an empty slot free_slot_n = self.root.tree_handler._get_free_slot() # Update data structure on memory subtree = self.children[prefix] = Tree(self.root, free_slot_n) # Update resource r = self.root.tree_handler.resource # Initialize the empty slot free_slot = 16 + free_slot_n * 16 r[free_slot:free_slot+4] = IO.encode_character(prefix) r[free_slot+4:free_slot+8] = IO.encode_link(None) r[free_slot+8:free_slot+12] = IO.encode_link(None) # Prepend the new slot this_slot = 16 + self.slot * 16 r[free_slot+12:free_slot+16] = r[this_slot+8:this_slot+12] r[this_slot+8:this_slot+12] = IO.encode_link(free_slot_n) subtree._index_term(suffix, doc_number, positions) else: tree_handler = self.root.tree_handler tree_rsrc = tree_handler.resource docs_handler = self.root.docs_handler docs_rsrc = docs_handler.resource # Get the slot in the 'documents' resource tree_slot = 16 + self.slot * 16 fdoc_slot_r = tree_rsrc[tree_slot+4:tree_slot+8] fdoc_slot_n = IO.decode_link(fdoc_slot_r) if doc_number in self.documents: aux = self.documents[doc_number] aux.extend(positions) positions = aux # Update slot doc_slot_n = docs_handler._get_document_slot(fdoc_slot_n, doc_number) doc_slot = 12 + doc_slot_n * 12 else: self.documents[doc_number] = positions # Update slot doc_slot_n = docs_handler._get_free_slot() doc_slot = 12 + doc_slot_n * 12 docs_rsrc[doc_slot:doc_slot+4] = IO.encode_uint32(doc_number) docs_rsrc[doc_slot+8:doc_slot+12] = fdoc_slot_r tree_rsrc[tree_slot+4:tree_slot+8] = IO.encode_link(doc_slot_n) frequency = len(positions) docs_rsrc[doc_slot+4:doc_slot+8] = IO.encode_uint32(frequency)
0f25159ac78f6533e983857dd8eb3f011e7ae412 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12681/0f25159ac78f6533e983857dd8eb3f011e7ae412/IIndex.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1615, 67, 6408, 12, 2890, 16, 2481, 16, 7429, 4672, 3536, 3340, 281, 326, 864, 2481, 18, 1021, 1569, 296, 24795, 11, 353, 279, 2874, 628, 1668, 1300, 358, 666, 434, 6865, 30, 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, 389, 1615, 67, 6408, 12, 2890, 16, 2481, 16, 7429, 4672, 3536, 3340, 281, 326, 864, 2481, 18, 1021, 1569, 296, 24795, 11, 353, 279, 2874, 628, 1668, 1300, 358, 666, 434, 6865, 30, 225,...
slideTriggersOnRingWithVector(inspTriggers, rings, shiftVector)
slideTriggersOnRingWithVector(inspTriggers, shiftVector, rings)
def ReadSnglInspiralSlidesFromFiles(fileList, shiftVector, vetoFile=None, mangleEventId=False, verbose=False): """ Function for reading time-slided single inspiral triggers with automatic resliding the times, given a list of input files. @param fileList: List of files containing single inspiral time-slided triggers @param shiftVector: Dictionary of time shifts to apply to triggers keyed by IFO @param vetoFile: segwizard formatted file used to veto all triggers @param mangleEventId: ID remapping is necessary in cases where multiple files might have event_id collisions (ex: exttrig injections) @param verbose: print ligolw_add progress """ # read raw triggers inspTriggers = ReadSnglInspiralFromFiles(\ fileList, verbose=verbose, mangle_event_id=mangleEventId ) # get the rings segDict = SearchSummaryUtils.GetSegListFromSearchSummaries(fileList) rings = segments.segmentlist(iterutils.flatten(segDict.values())) rings.sort() # perform the veto if vetoFile is not None: segList = segmentsUtils.fromsegwizard(open(vetoFile)) inspTriggers = inspTriggers.veto(segList) # now slide all the triggers within their appropriate ring slideTriggersOnRingWithVector(inspTriggers, rings, shiftVector) # return the re-slided triggers return inspTriggers
1bcb2e321ad2e8c794399c6f8ca75fa7f409ebb3 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5758/1bcb2e321ad2e8c794399c6f8ca75fa7f409ebb3/SnglInspiralUtils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2720, 55, 3368, 80, 382, 1752, 481, 287, 3738, 4369, 1265, 2697, 12, 768, 682, 16, 4654, 5018, 16, 331, 11453, 812, 33, 7036, 16, 312, 4341, 21973, 33, 8381, 16, 3988, 33, 8381, 4672, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2720, 55, 3368, 80, 382, 1752, 481, 287, 3738, 4369, 1265, 2697, 12, 768, 682, 16, 4654, 5018, 16, 331, 11453, 812, 33, 7036, 16, 312, 4341, 21973, 33, 8381, 16, 3988, 33, 8381, 4672, ...
self._sessionCookie = Cookie.SimpleCookie() self._sessionCookie[self.cookieName] = visit_key data = self.send_request('', auth=True) return Visit(self._sessionCookie[self.cookieName].value, True)
fas = BaseClient(self.fasURL, self.debug) fas._sessionCookie = Cookie.SimpleCookie() fas._sessionCookie[self.cookieName] = visit_key data = fas.send_request('', auth=True) return Visit(fas._sessionCookie[self.cookieName].value, True)
def new_visit_with_key(self, visit_key): # Hit any URL in fas2 with the visit_key set. That will call the # new_visit method in fas2 self._sessionCookie = Cookie.SimpleCookie() self._sessionCookie[self.cookieName] = visit_key data = self.send_request('', auth=True) return Visit(self._sessionCookie[self.cookieName].value, True)
89251d7d57c5642c0d3984777ffb3e442526d505 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9952/89251d7d57c5642c0d3984777ffb3e442526d505/jsonfasvisit.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 394, 67, 11658, 67, 1918, 67, 856, 12, 2890, 16, 3757, 67, 856, 4672, 468, 670, 305, 1281, 1976, 316, 284, 345, 22, 598, 326, 3757, 67, 856, 444, 18, 225, 12466, 903, 745, 326, 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, 394, 67, 11658, 67, 1918, 67, 856, 12, 2890, 16, 3757, 67, 856, 4672, 468, 670, 305, 1281, 1976, 316, 284, 345, 22, 598, 326, 3757, 67, 856, 444, 18, 225, 12466, 903, 745, 326, 468, ...
self.enableCmdBtns()
self.enableCmdButtons()
def showSelection(self): """Display the current selection. """ # clear current selection self.gim.removeAnnotation(_SelTag)
d75ff7430101ebcb5c8b05de779183403ed043c6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6236/d75ff7430101ebcb5c8b05de779183403ed043c6/GuideWdg.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 6233, 12, 2890, 4672, 3536, 4236, 326, 783, 4421, 18, 3536, 468, 2424, 783, 4421, 365, 18, 75, 381, 18, 4479, 3257, 24899, 1877, 1805, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 6233, 12, 2890, 4672, 3536, 4236, 326, 783, 4421, 18, 3536, 468, 2424, 783, 4421, 365, 18, 75, 381, 18, 4479, 3257, 24899, 1877, 1805, 13, 2, -100, -100, -100, -100, -100, -100, ...
return portage_atom_string.split('=')[1]
chrome_atom = portage_atom_string.split('=')[1] RunCommand(['sudo', 'tee', CHROME_KEYWORDS_FILE % {'board': board}], input='=%s\n' % chrome_atom, enter_chroot=True, cwd=cwd) return chrome_atom
def _MarkChromeAsStable(buildroot, tracking_branch, chrome_rev): """Returns the portage atom for the revved chrome ebuild - see man emerge.""" cwd = os.path.join(buildroot, 'src', 'scripts') portage_atom_string = RunCommand(['bin/cros_mark_chrome_as_stable', '--tracking_branch=%s' % tracking_branch, chrome_rev], cwd=cwd, redirect_stdout=True, enter_chroot=True).rstrip() if not portage_atom_string: Info('Found nothing to rev.') return None else: return portage_atom_string.split('=')[1]
cd2196d6c560351cc1f26a16fa3769fea6758f65 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/cd2196d6c560351cc1f26a16fa3769fea6758f65/cbuildbot.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3882, 28548, 1463, 30915, 12, 3510, 3085, 16, 11093, 67, 7500, 16, 18167, 67, 9083, 4672, 3536, 1356, 326, 1756, 410, 3179, 364, 326, 5588, 2155, 18167, 425, 3510, 300, 2621, 3161, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3882, 28548, 1463, 30915, 12, 3510, 3085, 16, 11093, 67, 7500, 16, 18167, 67, 9083, 4672, 3536, 1356, 326, 1756, 410, 3179, 364, 326, 5588, 2155, 18167, 425, 3510, 300, 2621, 3161, ...
def build_graph (key, d):
def build_graphs (key, datas): """Build a graph using the data arrays from any number of files."""
def build_graph (key, d): # if this is the root, we only want the first 3 dof, for now # FIXME - we really should do some stuff to track root orientation, # but that's a much more complicated problem. if (key == 'root'): d = d[:,0:3] dof = d.shape[1] frames = d.shape[0] # degrees covered (angle-wise) within a single node. Note that for some # bones, the number of nodes we have will be (360 / interval)^3, so be # sparing when decreasing this! interval = 5 mins = [] slots = [] graph = MotionGraph () adjacency_list = AdjacencyList (graph) vertex_map = VertexMap (graph) edge_list = EdgeList (graph) # it's silly to have angle values outside of [0,360] # dunno if this will handle <0 d = Numeric.remainder (d, 360.0) # Create list of nodes nodes = {} for angle in cp_range (dof, interval): node = MotionGraphNode ([n for n in angle], [n + interval for n in angle]) nodes[angle] = node graph.nodes = nodes # find edges data1 = d[0,:] bases = tuple (map (fixnegative, (int (n / interval) * interval for n in data1))) node1 = nodes[bases] for frame in range (1, frames): node2 = None data2 = d[frame,:] bases = tuple (map (fixnegative, (int (n / interval) * interval for n in data1))) node2 = nodes[bases] # check to see if it's a self-loop if node1 is node2: try: edge = edge_list.query (node1, node2) edge.visit () except KeyError: try: edge = edge_list.query (node2, node1) edge.visit () except KeyError: edge = ProbabilityEdge (node1, node2) edge.visit () graph.addList ([edge]) else: try: edge = edge_list.query (node1, node2) edge.visit () except KeyError: edge = ProbabilityEdge (node1, node2) edge.visit () graph.addList ([edge]) data1 = data2 node1 = node2 for vertex in vertex_map: # Normalize probabilities for all edges coming out of a vertex. The sum # of probabilities along edges coming out of any given vertex will be 1. total = 0 edges = vertex_map.query (vertex) for edge in edges: if edge.u is vertex: total += edge.count for edge in edges: if edge.u is vertex: edge.normalize (total) return graph
06c5189cceb33db4082ae4d94ff86fe083fc0935 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6757/06c5189cceb33db4082ae4d94ff86fe083fc0935/build_motion_graphs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 67, 4660, 261, 856, 16, 302, 4672, 468, 309, 333, 353, 326, 1365, 16, 732, 1338, 2545, 326, 1122, 890, 741, 74, 16, 364, 2037, 468, 9852, 300, 732, 8654, 1410, 741, 2690, 10769, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4660, 261, 856, 16, 302, 4672, 468, 309, 333, 353, 326, 1365, 16, 732, 1338, 2545, 326, 1122, 890, 741, 74, 16, 364, 2037, 468, 9852, 300, 732, 8654, 1410, 741, 2690, 10769, ...
sim.getRNG().setSeed(12345)
sim.getRNG().set(seed=12345)
def idString(IDs): uniqueIDs = list(set(IDs)) uniqueIDs.sort() return ', '.join(['%d' % x for x in uniqueIDs if x >= 1])
205f55f8c6cd28aed704d70838912648f07ac340 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/401/205f55f8c6cd28aed704d70838912648f07ac340/userGuide.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 612, 780, 12, 5103, 4672, 3089, 5103, 273, 666, 12, 542, 12, 5103, 3719, 3089, 5103, 18, 3804, 1435, 327, 2265, 2418, 5701, 12, 3292, 9, 72, 11, 738, 619, 364, 619, 316, 3089, 5103, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 612, 780, 12, 5103, 4672, 3089, 5103, 273, 666, 12, 542, 12, 5103, 3719, 3089, 5103, 18, 3804, 1435, 327, 2265, 2418, 5701, 12, 3292, 9, 72, 11, 738, 619, 364, 619, 316, 3089, 5103, ...
def initiate_send (self):
def initiate_send(self):
def initiate_send (self): num_sent = 0 num_sent = dispatcher.send (self, self.out_buffer[:512]) self.out_buffer = self.out_buffer[num_sent:]
52c4de7c23c31563e4f0316b68865e17bb8c0f33 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/52c4de7c23c31563e4f0316b68865e17bb8c0f33/asyncore.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 18711, 67, 4661, 12, 2890, 4672, 818, 67, 7569, 273, 374, 818, 67, 7569, 273, 7393, 18, 4661, 261, 2890, 16, 365, 18, 659, 67, 4106, 10531, 13757, 5717, 365, 18, 659, 67, 4106, 273, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 18711, 67, 4661, 12, 2890, 4672, 818, 67, 7569, 273, 374, 818, 67, 7569, 273, 7393, 18, 4661, 261, 2890, 16, 365, 18, 659, 67, 4106, 10531, 13757, 5717, 365, 18, 659, 67, 4106, 273, ...
res = self.transClient.setTransformationParameter(transID,'Status','ValidatedOutput')
res = self.transClient.setTransformationParameter( transID, 'Status', 'ValidatedOutput' )
def updateWaitingIntegrity(self): gLogger.info( "Looking for transformations in the WaitingIntegrity status to update" ) res = self.transClient.getTransformations({'Status':'WaitingIntegrity'}) if not res['OK']: gLogger.error( "Failed to get WaitingIntegrity transformations", res['Message'] ) return res transDicts = res['Value'] if not transDicts: gLogger.info( "No transformations found in WaitingIntegrity status" ) return S_OK() gLogger.info( "Found %s transformations in WaitingIntegrity status" % len( transDicts ) ) for transDict in transDicts: transID = transDict['TransformationID'] gLogger.info( "-" * 40 ) res = self.integrityClient.getTransformationProblematics(int(transID)) if not res['OK']: gLogger.error("Failed to determine waiting problematics for transformation", res['Message']) elif not res['Value']: res = self.transClient.setTransformationParameter(transID,'Status','ValidatedOutput') if not res['OK']: gLogger.error("Failed to update status of transformation %s to ValidatedOutput" % (transID)) else: gLogger.info("Updated status of transformation %s to ValidatedOutput" % (transID)) else: gLogger.info("%d problematic files for transformation %s were found" % (len(res['Value']), transID)) return
18fc97d84d5da730b753dba630ee26614f9d37b6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/18fc97d84d5da730b753dba630ee26614f9d37b6/ValidateOutputDataAgent.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 15946, 30669, 12, 2890, 4672, 314, 3328, 18, 1376, 12, 315, 9794, 310, 364, 19245, 316, 326, 23333, 30669, 1267, 358, 1089, 6, 262, 400, 273, 365, 18, 2338, 1227, 18, 588, 4059, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 15946, 30669, 12, 2890, 4672, 314, 3328, 18, 1376, 12, 315, 9794, 310, 364, 19245, 316, 326, 23333, 30669, 1267, 358, 1089, 6, 262, 400, 273, 365, 18, 2338, 1227, 18, 588, 4059, ...
self.m_async_sm.disable_breakpoint([], fAll = True)
self.m_async_sm.disable_breakpoint([], True)
def do_disable(self, event): self.m_async_sm.disable_breakpoint([], fAll = True)
38b731e9667028d3e9041f5ff7ba86382d321dfe /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1662/38b731e9667028d3e9041f5ff7ba86382d321dfe/winpdb.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 8394, 12, 2890, 16, 871, 4672, 365, 18, 81, 67, 3810, 67, 4808, 18, 8394, 67, 8820, 1153, 3816, 6487, 284, 1595, 273, 1053, 13, 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, 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, 741, 67, 8394, 12, 2890, 16, 871, 4672, 365, 18, 81, 67, 3810, 67, 4808, 18, 8394, 67, 8820, 1153, 3816, 6487, 284, 1595, 273, 1053, 13, 2, -100, -100, -100, -100, -100, -100, -100, ...
'hg churn [-r revision range] [-a file] [--progress]'),
'hg churn [-r REVISIONS] [--aliases FILE] [--progress]'),
def get_aliases(f): aliases = {}
e99fde1a5f461632dc161ecd0d394396ceef4032 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11312/e99fde1a5f461632dc161ecd0d394396ceef4032/churn.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 13831, 12, 74, 4672, 6900, 273, 2618, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 13831, 12, 74, 4672, 6900, 273, 2618, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
""" % string.strip(cp.get('fu-condor','convertcache'))) convert_script.close() os.chmod('cacheconv.sh',0755)
""" % string.strip(cp.get('fu-condor','convertcache'))) convert_script.close() os.chmod('cacheconv.sh',0755)
def setup_cacheconv(self,cp): # create a shell script to call convertlalcache.pl if the value of $RETURN is 0 convert_script = open('cacheconv.sh','w')
cbd6ac162cb6bf2eb4ad5ce9c3d03753b881f67f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5758/cbd6ac162cb6bf2eb4ad5ce9c3d03753b881f67f/stfu_pipe.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 67, 17703, 17181, 90, 12, 2890, 16, 4057, 4672, 468, 752, 279, 5972, 2728, 358, 745, 1765, 80, 287, 2493, 18, 412, 309, 326, 460, 434, 271, 14033, 353, 374, 1765, 67, 4263, 273, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 67, 17703, 17181, 90, 12, 2890, 16, 4057, 4672, 468, 752, 279, 5972, 2728, 358, 745, 1765, 80, 287, 2493, 18, 412, 309, 326, 460, 434, 271, 14033, 353, 374, 1765, 67, 4263, 273, ...
25
50 50 5 5 50
def __getitem__(self, n): """ Return the n'th point in self's __points list. This enables users to iterate over the curve's point set.
c3f20f06eecd6a15c5eb91262ba753b725cf98c7 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/c3f20f06eecd6a15c5eb91262ba753b725cf98c7/ell_finite_field.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 31571, 972, 12, 2890, 16, 290, 4672, 3536, 2000, 326, 290, 1404, 76, 1634, 316, 365, 1807, 1001, 4139, 666, 18, 225, 1220, 19808, 3677, 358, 7401, 1879, 326, 8882, 1807, 1634, 444,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 31571, 972, 12, 2890, 16, 290, 4672, 3536, 2000, 326, 290, 1404, 76, 1634, 316, 365, 1807, 1001, 4139, 666, 18, 225, 1220, 19808, 3677, 358, 7401, 1879, 326, 8882, 1807, 1634, 444,...
self.interwiki_on_one_line = ['pl']
self.interwiki_on_one_line = []
def __init__(self): family.Family.__init__(self) self.name = 'wikiquote' self.langs = { 'minnan':'zh-min-nan.wikiquote.org', 'nb':'no.wikiquote.org', 'zh-cn':'zh.wikiquote.org', 'zh-tw':'zh.wikiquote.org' } self.languages_by_size = [ 'en','de','pl','it','sk','ru','pt','bs','bg','sl', 'es','tr','he','zh','id','sv','lt','ja','no','hu', 'el','fa','nl','cs','ku','fi','fr','ar','eo','ca', 'gl','ro','ka','hr','la','uk','da','et','sr','vi', 'sq','ko','eu','th','simple','nn','ast','ang','hi','lb', 'is','ta','az','mr','kn','am','co','ml','cy','wo', 'za','te','kr','qu','uz','tt','ur','af','vo','bm', 'cr','na','nds','ky','su','als','be','ug','gu','zh-min-nan', 'hy','ga','kk','ks','kw','tk',] for lang in self.languages_by_size: self.langs[lang] = lang+'.wikiquote.org'
d2f7404533a1a1c96b2dcd51dc81640315c3fe15 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4404/d2f7404533a1a1c96b2dcd51dc81640315c3fe15/wikiquote_family.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 6755, 18, 9203, 16186, 2738, 972, 12, 2890, 13, 365, 18, 529, 273, 296, 13044, 6889, 11, 225, 365, 18, 4936, 87, 273, 288, 296, 1154, 13569, 11, 2497, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 6755, 18, 9203, 16186, 2738, 972, 12, 2890, 13, 365, 18, 529, 273, 296, 13044, 6889, 11, 225, 365, 18, 4936, 87, 273, 288, 296, 1154, 13569, 11, 2497, ...
avil_id = obj.pool.get(value._name).search(cr, uid, [('id','=',value.id)], context=context)
avil_id = obj.pool.get(value._name).exists(cr, uid, value.id)
def _fnct_read(self, obj, cr, uid, ids, prop_name, obj_dest, context=None): properties = obj.pool.get('ir.property') domain = [('fields_id.model', '=', obj._name), ('fields_id.name','in',prop_name)] domain += [('res_id','in', [obj._name + ',' + str(oid) for oid in ids])] nids = properties.search(cr, uid, domain, context=context) default_val,replaces = self._get_defaults(obj, cr, uid, prop_name, context)
197ab1211831df5655b9a27a253db326d8651f71 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12853/197ab1211831df5655b9a27a253db326d8651f71/fields.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4293, 299, 67, 896, 12, 2890, 16, 1081, 16, 4422, 16, 4555, 16, 3258, 16, 2270, 67, 529, 16, 1081, 67, 10488, 16, 819, 33, 7036, 4672, 1790, 273, 1081, 18, 6011, 18, 588, 2668, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4293, 299, 67, 896, 12, 2890, 16, 1081, 16, 4422, 16, 4555, 16, 3258, 16, 2270, 67, 529, 16, 1081, 67, 10488, 16, 819, 33, 7036, 4672, 1790, 273, 1081, 18, 6011, 18, 588, 2668, ...
n = _kernel32.FormatMessageW(
n = kernel32.FormatMessageW(
def FormatError(code=None): """ A replacement for ctypes.FormtError, but returns a unicode string. """ if code is None: code = GetLastError() _kernel32 = ctypes.kernel32 lpMsgBuf = LPWSTR() n = _kernel32.FormatMessageW( FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, None, code, 0, byref(lpMsgBuf), 0, None ) message = lpMsgBuf.value.strip() _kernel32.LocalFree(lpMsgBuf) return message
1e06af08d8db8fb1a59836f1fae653ef1e7cf428 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8076/1e06af08d8db8fb1a59836f1fae653ef1e7cf428/Utils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4077, 668, 12, 710, 33, 7036, 4672, 3536, 432, 6060, 364, 6983, 18, 1204, 88, 668, 16, 1496, 1135, 279, 5252, 533, 18, 3536, 309, 981, 353, 599, 30, 981, 273, 968, 3024, 668, 1435, 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, 4077, 668, 12, 710, 33, 7036, 4672, 3536, 432, 6060, 364, 6983, 18, 1204, 88, 668, 16, 1496, 1135, 279, 5252, 533, 18, 3536, 309, 981, 353, 599, 30, 981, 273, 968, 3024, 668, 1435, 3...
nid = (self.hwnd, 0) Shell_NotifyIcon(NIM_DELETE, nid) PostQuitMessage(0)
nid = (self.hwnd, 0) Shell_NotifyIcon(NIM_DELETE, nid) PostQuitMessage(0)
def OnDestroy(self, hwnd, msg, wparam, lparam):
0254a2f4a8a68361bc59fecaadbe2435c61fa306 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6126/0254a2f4a8a68361bc59fecaadbe2435c61fa306/pop3proxy_tray.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2755, 10740, 12, 2890, 16, 16139, 4880, 16, 1234, 16, 341, 891, 16, 328, 891, 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...
[ 1, 1, 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, 2755, 10740, 12, 2890, 16, 16139, 4880, 16, 1234, 16, 341, 891, 16, 328, 891, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
print sadbox_path, sadbox_dir, cmd
def main(): qemu_identfile = "../sadbox/sshkey/vmkey" dest_path = "contestvm@localhost:~" try: opts, args = getopt.getopt(sys.argv[1:], "d:c:", ["directory=", "command="]) except getopt.GetoptError, err: print str(err) usage() sys.exit(2) sadbox_path = None cmd = None for o, a in opts: if o in ("-d", "--directory"): sadbox_path = a elif o in ("-c", "--command"): cmd = a else: usage() if sadbox_path == None: usage() sys.exit(2) sadbox_dir = os.path.basename(sadbox_path) cmd = "cd ./" + sadbox_dir + "/; " + cmd print sadbox_path, sadbox_dir, cmd (qemu_proc, port) = launch_qemu() scp_proc = copy_exec_dir(port, qemu_identfile, sadbox_path, dest_path) print "READY" child_cmd = "ssh -p " + str(port) + " -i " + qemu_identfile + " contestvm@localhost " + cmd child_args = shlex.split(child_cmd) child_process = subprocess.Popen(child_args, close_fds=True) print "executing command inside VM" child_process.wait() #wait for command to finish execution os.kill(qemu_proc.pid, signal.SIGINT) qemu_proc.wait() #wait for vm to die
84414da8b24d69e9d10e1d9b9fa3cf25a8452f48 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13129/84414da8b24d69e9d10e1d9b9fa3cf25a8452f48/sadbox.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 1043, 24995, 67, 6392, 768, 273, 315, 6216, 87, 361, 2147, 19, 10975, 856, 19, 3489, 856, 6, 1570, 67, 803, 273, 315, 1213, 395, 3489, 36, 13014, 30, 98, 6, 775, 30, 150...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 1043, 24995, 67, 6392, 768, 273, 315, 6216, 87, 361, 2147, 19, 10975, 856, 19, 3489, 856, 6, 1570, 67, 803, 273, 315, 1213, 395, 3489, 36, 13014, 30, 98, 6, 775, 30, 150...
out = "" query = "SELECT DATE_FORMAT(modification_date,'%%Y-%%m-%%d %%H:%%i:%%s') FROM bibrec WHERE id='%s'" % (sysno) res = run_sql(query) for row in res: out = row[0] return localtime_to_UTC(out)
out = "" res = run_sql("SELECT DATE_FORMAT(modification_date,'%%Y-%%m-%%d %%H:%%i:%%s') FROM bibrec WHERE id=%s", (sysno,), 1) if res[0][0]: out = localtime_to_UTC(res[0][0]) return out
def get_modification_date(sysno): "Returns the date of last modification for the record 'sysno'." out = "" query = "SELECT DATE_FORMAT(modification_date,'%%Y-%%m-%%d %%H:%%i:%%s') FROM bibrec WHERE id='%s'" % (sysno) res = run_sql(query) for row in res: out = row[0] return localtime_to_UTC(out)
188076f16a4a54bae23fd66a92bc6f2ff56b588d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12027/188076f16a4a54bae23fd66a92bc6f2ff56b588d/oai_repository.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 31064, 67, 712, 12, 9499, 2135, 4672, 315, 1356, 326, 1509, 434, 1142, 11544, 364, 326, 1409, 296, 9499, 2135, 14550, 596, 273, 1408, 400, 273, 1086, 67, 4669, 2932, 4803, 11457...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 31064, 67, 712, 12, 9499, 2135, 4672, 315, 1356, 326, 1509, 434, 1142, 11544, 364, 326, 1409, 296, 9499, 2135, 14550, 596, 273, 1408, 400, 273, 1086, 67, 4669, 2932, 4803, 11457...
key = self.getBrowserIdManager().getToken(create=0) if key: if self._hasSessionDataObject(key): return 1
return not not self.getSessionData(create=0)
def hasSessionData(self): """ """ key = self.getBrowserIdManager().getToken(create=0) if key: if self._hasSessionDataObject(key): return 1
67b8dd175c3ef74d2bcdc7855fd892673337035e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/67b8dd175c3ef74d2bcdc7855fd892673337035e/SessionDataManager.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 711, 2157, 751, 12, 2890, 4672, 3536, 3536, 498, 273, 365, 18, 588, 9132, 548, 1318, 7675, 588, 1345, 12, 2640, 33, 20, 13, 309, 498, 30, 309, 365, 6315, 5332, 2157, 21881, 12, 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, 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, 711, 2157, 751, 12, 2890, 4672, 3536, 3536, 498, 273, 365, 18, 588, 9132, 548, 1318, 7675, 588, 1345, 12, 2640, 33, 20, 13, 309, 498, 30, 309, 365, 6315, 5332, 2157, 21881, 12, 856, ...
name = DottedName(name)
if not isinstance(name, DottedName): name = DottedName(name) val = self._get_cache.get(name) if val is not None: return val
def _get(self, name): """ A helper function that's used to implement L{get_vardoc()} and L{get_valdoc()}. """ # Convert name to a DottedName, if necessary. name = DottedName(name)
e323dc2f8909c24fbfcbf962646d0d9393264ae0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11420/e323dc2f8909c24fbfcbf962646d0d9393264ae0/apidoc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 12, 2890, 16, 508, 4672, 3536, 432, 4222, 445, 716, 1807, 1399, 358, 2348, 511, 95, 588, 67, 90, 1060, 504, 17767, 471, 511, 95, 588, 67, 1125, 2434, 1435, 5496, 3536, 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, 389, 588, 12, 2890, 16, 508, 4672, 3536, 432, 4222, 445, 716, 1807, 1399, 358, 2348, 511, 95, 588, 67, 90, 1060, 504, 17767, 471, 511, 95, 588, 67, 1125, 2434, 1435, 5496, 3536, 468, ...
if self.youtubeurl[-4]=='.': for i in range(len(self.youtubeurl)): if self.youtubeurl[-i]=='/': output=self.youtubeurl[-i+1:] break print output print self.youtubeurl self.input.extend([os.getenv("HOME")+'/'+output]) self.download(widget,self.youtubeurl) self.setinput(widget) else: self.download_youtube(widget) self.setinput(widget)
try: if self.youtubeurl[-4]=='.': for i in range(len(self.youtubeurl)): if self.youtubeurl[-i]=='/': output=self.youtubeurl[-i+1:] break print output print self.youtubeurl self.input.extend([os.getenv("HOME")+'/'+output]) self.download(widget,self.youtubeurl) self.setinput(widget) else: self.download_youtube(widget) self.setinput(widget) except: pass
def menuopenyoutube(self,widget): #################### # Description # =========== """ Dialog that allows the user to enter a YouTube url. Once the user presses the 'ok' button, the download will begin""" # Arguments # ========= # # Further Details # =============== # #################### #base this on a message dialog dialog = gtk.MessageDialog(None,gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT,gtk.MESSAGE_QUESTION,gtk.BUTTONS_OK,None) dialog.set_markup('Please enter YouTube URL or a direct link to a video file, eg.') #create the text input field entry = gtk.Entry() #allow the user to press enter to do ok #entry.connect("activate", dialog.response(response), dialog, gtk.RESPONSE_OK) #create a horizontal box to pack the entry and a label hbox = gtk.HBox() hbox.pack_start(gtk.Label("URL:"), False, 5, 5) hbox.pack_end(entry) #some secondary text dialog.format_secondary_markup("<i>http://www.youtube.com/watch?v=LkCNJRfSZBU</i>\n- or-\n<i>http://hartvig.de/files/dod/16cwillcttt_teaser.avi</i>") #add it and show it dialog.vbox.pack_end(hbox, True, True, 0) dialog.show_all() #go go go dialog.run() self.youtubeurl = entry.get_text() dialog.destroy() dialog.destroy() # Look for direct link to media file if self.youtubeurl[-4]=='.': # find last '/' for i in range(len(self.youtubeurl)): if self.youtubeurl[-i]=='/': output=self.youtubeurl[-i+1:] break print output print self.youtubeurl self.input.extend([os.getenv("HOME")+'/'+output]) self.download(widget,self.youtubeurl) self.setinput(widget) else: self.download_youtube(widget) self.setinput(widget)
d571f8e82ed7cc78a4e1f3045ea3a3a189c1e311 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4607/d571f8e82ed7cc78a4e1f3045ea3a3a189c1e311/app.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3824, 30656, 21105, 12, 2890, 16, 6587, 4672, 29570, 13151, 468, 6507, 468, 422, 1432, 33, 3536, 17242, 716, 5360, 326, 729, 358, 6103, 279, 4554, 27195, 880, 18, 12419, 326, 729, 11779, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3824, 30656, 21105, 12, 2890, 16, 6587, 4672, 29570, 13151, 468, 6507, 468, 422, 1432, 33, 3536, 17242, 716, 5360, 326, 729, 358, 6103, 279, 4554, 27195, 880, 18, 12419, 326, 729, 11779, ...
if attroffs in attrmap and hasattr(obj, attrmap[attroffs]): return getattr(obj, attrmap[attroffs])
if attroffs in attrmap and hasattr(obj, attrmap[attroffs][1]): return getattr(obj, attrmap[attroffs][1])
def _IDC_GetAttr(obj, attrmap, attroffs): """ Internal function to generically get object attributes Do not use unless you know what you are doing """ if attroffs in attrmap and hasattr(obj, attrmap[attroffs]): return getattr(obj, attrmap[attroffs]) else: errormsg = "attribute with offset %d not found, check the offset and report the problem" % attroffs raise KeyError, errormsg
29b47497d67cadb8b21d1a3429f7b9be50b6f793 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6984/29b47497d67cadb8b21d1a3429f7b9be50b6f793/idc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 734, 39, 67, 967, 3843, 12, 2603, 16, 1604, 1458, 16, 2403, 303, 1403, 87, 4672, 3536, 3186, 445, 358, 5210, 1230, 336, 733, 1677, 2256, 486, 999, 3308, 1846, 5055, 4121, 1846, 85...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 734, 39, 67, 967, 3843, 12, 2603, 16, 1604, 1458, 16, 2403, 303, 1403, 87, 4672, 3536, 3186, 445, 358, 5210, 1230, 336, 733, 1677, 2256, 486, 999, 3308, 1846, 5055, 4121, 1846, 85...
error_handler=log.err)
error_handler=d.errback)
def pin_changed_cb(): self.device.ChangePin(bad_pin, good_pin, dbus_interface=CRD_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, 7092, 67, 6703, 67, 7358, 13332, 365, 18, 5964, 18, 3043, 12178, 12, 8759, 67, 13097, 16, 7494, 67, 13097, 16, 21866, 67, 5831, 33, 5093, 40, 67, 3217, 11300, 16, 4332, 67, 4176, 33, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7092, 67, 6703, 67, 7358, 13332, 365, 18, 5964, 18, 3043, 12178, 12, 8759, 67, 13097, 16, 7494, 67, 13097, 16, 21866, 67, 5831, 33, 5093, 40, 67, 3217, 11300, 16, 4332, 67, 4176, 33, ...
def gridsky(resolution):
def gridsky(resolution,shifted=False):
def gridsky(resolution): """ grid the sky up into roughly square regions resolution is the length of a side the points get placed at the center of the squares and to first order each square has an area of resolution^2 """ latitude = 0.0 longitude = pi ds = pi*resolution/180.0 points = [(latitude-0.5*pi, longitude)] while latitude <= pi: latitude += ds longitude = 0.0 points.append((latitude-0.5*pi, longitude)) while longitude <= 2.0*pi: longitude += ds / abs(sin(latitude)) points.append((latitude-0.5*pi, longitude)) #there's some slop so get rid of it and only focus on points on the sphere sphpts = [] for pt in points: if pt[0] > pi/2 or pt[0] < -pi/2 \ or pt[1] > 2*pi or pt[1] < 0: pass else: sphpts.append(pt) return sphpts
f92b8a09994e6eca850ba21adf1061202a15b274 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/f92b8a09994e6eca850ba21adf1061202a15b274/skylocutils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3068, 22921, 12, 19182, 16, 4012, 329, 33, 8381, 4672, 3536, 3068, 326, 15513, 731, 1368, 23909, 715, 8576, 10085, 7861, 353, 326, 769, 434, 279, 4889, 326, 3143, 336, 15235, 622, 326, 4...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3068, 22921, 12, 19182, 16, 4012, 329, 33, 8381, 4672, 3536, 3068, 326, 15513, 731, 1368, 23909, 715, 8576, 10085, 7861, 353, 326, 769, 434, 279, 4889, 326, 3143, 336, 15235, 622, 326, 4...
def zdstatus(self):
def get_status(self):
def zdstatus(self): self.zd_up = 0 self.zd_pid = 0 self.zd_status = None resp = self.zdcommand("status") if not resp: return m = re.search("(?m)^application=(\d+)$", resp) if not m: return self.zd_up = 1 self.zd_pid = int(m.group(1)) self.zd_status = resp
62025f58079f2271c5bf6a4bc0455b164c06d413 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9782/62025f58079f2271c5bf6a4bc0455b164c06d413/zdctl.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 2327, 12, 2890, 4672, 365, 18, 94, 72, 67, 416, 273, 374, 365, 18, 94, 72, 67, 6610, 273, 374, 365, 18, 94, 72, 67, 2327, 273, 599, 1718, 273, 365, 18, 94, 72, 3076, 293...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2327, 12, 2890, 4672, 365, 18, 94, 72, 67, 416, 273, 374, 365, 18, 94, 72, 67, 6610, 273, 374, 365, 18, 94, 72, 67, 2327, 273, 599, 1718, 273, 365, 18, 94, 72, 3076, 293...
return "date_trunc('second', %s) as %s" % (f_qual, f)
return "date_trunc('second', %s%s) as %s" % (table_prefix, f, f)
def convert_field(f): f_qual = "%s.%s" % (self._table, f) # need fully-qualified references in case len(tables) > 1 if f in ('create_date', 'write_date'): return "date_trunc('second', %s) as %s" % (f_qual, f) if f == self.CONCURRENCY_CHECK_FIELD: if self._log_access: return "COALESCE(%s.write_date, %s.create_date, now())::timestamp AS %s" % (self._table, self._table, f,) return "now()::timestamp AS %s" % (f,) if isinstance(self._columns[f], fields.binary) and context.get('bin_size', False): return 'length(%s) as "%s"' % (f_qual, f) return f_qual
d3aad2306f65d7221f245ecd45855b7cb29b6f47 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12853/d3aad2306f65d7221f245ecd45855b7cb29b6f47/orm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1765, 67, 1518, 12, 74, 4672, 284, 67, 3369, 273, 2213, 87, 7866, 87, 6, 738, 261, 2890, 6315, 2121, 16, 284, 13, 468, 1608, 7418, 17, 19724, 5351, 316, 648, 562, 12, 9373, 13, 405, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1518, 12, 74, 4672, 284, 67, 3369, 273, 2213, 87, 7866, 87, 6, 738, 261, 2890, 6315, 2121, 16, 284, 13, 468, 1608, 7418, 17, 19724, 5351, 316, 648, 562, 12, 9373, 13, 405, ...
params = params, out=out,pdb=pdb,hkl=hkl)
params = params, out=out,pdb=pdb,hkl=hkl)
def update_solvent_and_scale(fmodel, pdb, hkl, out): try: status = None params = bss.solvent_and_scale_params() params.b_sol_min=0.0 params.b_sol_max=200.0 params.k_sol_min=0.0 params.k_sol_max=1.5 fmodel.update_solvent_and_scale(params = params, verbose = -1) r_work = fmodel.r_work()*100 r_free = fmodel.r_free()*100 rwrf_delta = 1.5 if(fmodel.f_obs.d_min() < 1.2): rwrf_delta = 0.5 if(r_work > r_free or abs(r_work - r_free) <= rwrf_delta or r_work > 45.0): status = "bad" else: status = "good" except KeyboardInterrupt: raise except: print >> out, "ERROR_(update_solvent_and_scale1): %s"%pdb[-11:], hkl[:-4] status = None fmodel = None convert_to_intensities = False convert_to_amplitudes = False if([status, fmodel].count(None) == 0 and status == "bad"): fmodel_dc = fmodel.deep_copy() rw, rf = update_solvent_and_scale_helper(fmodel = fmodel_dc, params = params, out=out,pdb=pdb,hkl=hkl) if([rw, rf].count(None) > 0): return None, None check = (rw>rf or abs(rw-rf) <= rwrf_delta or rw > 45. or abs(r_work-rw) <= 5.) if(check): status = "bad" else: status = "good" if([status, fmodel].count(None) == 0 and status == "bad"): fmodel_dc = fmodel.deep_copy() f_obs = fmodel_dc.f_obs f_obs = f_obs.set_observation_type(observation_type = None) f_obs = f_obs.f_sq_as_f() fmodel_dc.update(f_obs = f_obs) rw, rf = update_solvent_and_scale_helper(fmodel = fmodel_dc, params = params, out=out,pdb=pdb,hkl=hkl) if([rw, rf].count(None) > 0): return None, None check = (rw>rf or abs(rw-rf) <= rwrf_delta or rw > 45. or abs(r_work-rw) <= 5.) if(check): status = "bad" else: status = "good" convert_to_amplitudes = True if([status, fmodel].count(None) == 0 and status == "bad"): fmodel_dc = fmodel.deep_copy() f_obs = fmodel_dc.f_obs f_obs = f_obs.set_observation_type(observation_type = None) f_obs = f_obs.f_as_f_sq() fmodel_dc.update(f_obs = f_obs) rw, rf = update_solvent_and_scale_helper(fmodel = fmodel_dc, params = params, out=out,pdb=pdb,hkl=hkl) if([rw, rf].count(None) > 0): return None, None check = (rw>rf or abs(rw-rf) <= rwrf_delta or rw > 45. or abs(r_work-rw) <= 5.) if(check): status = "bad" else: status = "good" convert_to_intensities = True if(status == "good" and [convert_to_intensities, convert_to_amplitudes].count(True) > 0): fmodel.f_obs.set_observation_type(observation_type = None) if(convert_to_intensities): fmodel.update(k_sol=0, b_sol=0, b_cart=[0,0,0,0,0,0], f_obs = fmodel.f_obs.f_as_f_sq()) if(convert_to_amplitudes): fmodel.update(k_sol=0, b_sol=0, b_cart=[0,0,0,0,0,0], f_obs = fmodel.f_obs.f_sq_as_f()) fmodel.f_obs.set_observation_type_xray_amplitude() fmodel.update_solvent_and_scale(params = params, verbose = -1) if(status == "bad"): print >> out, "ERROR_(status=bad): %s"%pdb[-11:], hkl[:-4] status = None fmodel = None return status, fmodel
2c220ddd53d23ebc88a4c0420b37c64ef8a33770 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/696/2c220ddd53d23ebc88a4c0420b37c64ef8a33770/pdb_refl_cif_to_mtz.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 67, 18281, 616, 67, 464, 67, 5864, 12, 74, 2284, 16, 10892, 16, 366, 16391, 16, 596, 4672, 775, 30, 1267, 273, 599, 859, 273, 324, 1049, 18, 18281, 616, 67, 464, 67, 5864, 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, 1089, 67, 18281, 616, 67, 464, 67, 5864, 12, 74, 2284, 16, 10892, 16, 366, 16391, 16, 596, 4672, 775, 30, 1267, 273, 599, 859, 273, 324, 1049, 18, 18281, 616, 67, 464, 67, 5864, 67, ...
- ``'gmp'`` - use the GMP C-library factorial
- ``'gmp'`` - use the GMP C-library factorial
def factorial(n, algorithm='gmp'): r""" Compute the factorial of `n`, which is the product `1\cdot 2\cdot 3 \cdots (n-1) n`. INPUT: - ``n`` - an integer - ``algorithm`` - string (default: 'gmp') - ``'gmp'`` - use the GMP C-library factorial function - ``'pari'`` - use PARI's factorial function OUTPUT: an integer EXAMPLES:: sage: factorial(0) 1 sage: factorial(4) 24 sage: factorial(10) 3628800 sage: factorial(1) == factorial(0) True sage: factorial(6) == 6*5*4*3*2 True sage: factorial(1) == factorial(0) True sage: factorial(71) == 71* factorial(70) True sage: factorial(-32) Traceback (most recent call last): ... ValueError: factorial -- must be nonnegative PERFORMANCE: This discussion is valid as of April 2006. All timings below are on a Pentium Core Duo 2Ghz MacBook Pro running Linux with a 2.6.16.1 kernel. - It takes less than a minute to compute the factorial of `10^7` using the GMP algorithm, and the factorial of `10^6` takes less than 4 seconds. - The GMP algorithm is faster and more memory efficient than the PARI algorithm. E.g., PARI computes `10^7` factorial in 100 seconds on the core duo 2Ghz. - For comparison, computation in Magma `\leq` 2.12-10 of `n!` is best done using ``*[1..n]``. It takes 113 seconds to compute the factorial of `10^7` and 6 seconds to compute the factorial of `10^6`. Mathematica V5.2 compute the factorial of `10^7` in 136 seconds and the factorial of `10^6` in 7 seconds. (Mathematica is notably very efficient at memory usage when doing factorial calculations.) """ if n < 0: raise ValueError, "factorial -- must be nonnegative" if algorithm == 'gmp': return ZZ(n).factorial() elif algorithm == 'pari': return pari.factorial(n) else: raise ValueError, 'unknown algorithm'
08206c95546f1db2a947692b19f3ca4ec939d5d9 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/08206c95546f1db2a947692b19f3ca4ec939d5d9/arith.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5578, 649, 12, 82, 16, 4886, 2218, 75, 1291, 11, 4672, 436, 8395, 8155, 326, 5578, 649, 434, 1375, 82, 9191, 1492, 353, 326, 3017, 1375, 21, 64, 4315, 352, 576, 64, 4315, 352, 890, 5...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5578, 649, 12, 82, 16, 4886, 2218, 75, 1291, 11, 4672, 436, 8395, 8155, 326, 5578, 649, 434, 1375, 82, 9191, 1492, 353, 326, 3017, 1375, 21, 64, 4315, 352, 576, 64, 4315, 352, 890, 5...
def cliques_node_clique_number(self, nodes=None, with_labels=False, cliques=None):
def cliques_vertex_clique_number(self, vertices=None, with_labels=False, cliques=None):
def cliques_node_clique_number(self, nodes=None, with_labels=False, cliques=None): r""" Returns a list of sizes of the largest maximal cliques containing each node. (Returns a single value if only one input node). Currently only implemented for undirected graphs. Use to_undirected to convert a digraph to an undirected graph. (See examples below). INPUT: -- nodes - the nodes to inspect (default is entire graph) -- with_labels - (boolean) default False returns list as above True returns a dictionary keyed by node labels -- cliques - list of cliques (if already computed) EXAMPLES: sage: C = Graph('DJ{') sage: C.cliques_node_clique_number() [2, 4, 4, 4, 4] sage: E = C.cliques() sage: E [[4, 1, 2, 3], [4, 0]] sage: C.cliques_node_clique_number(cliques=E) [2, 4, 4, 4, 4] sage: F = graphs.Grid2dGraph(2,3) sage: F.cliques_node_clique_number(with_labels=True) {(0, 1): 2, (1, 2): 2, (0, 0): 2, (1, 1): 2, (1, 0): 2, (0, 2): 2} sage: F.cliques_node_clique_number(nodes=[(0, 1), (1, 2)]) [2, 2] sage: D = DiGraph({0:[1,2,3], 1:[2], 3:[0,1]}) sage.: D.show(figsize=[2,2]) sage: D.cliques_node_clique_number() Traceback (most recent call last): ... TypeError: Function defined for undirected graphs only. See documentation. sage: D = D.to_undirected() sage.: D.show(figsize=[2,2]) sage: D.cliques_node_clique_number() [3, 3, 3, 3] """ if (self.is_directed()): raise TypeError('Function defined for undirected graphs only. See documentation.') else: import networkx.cliques return networkx.cliques.node_clique_number(self._nxg, nodes, with_labels, cliques)
a520fa15cff86fbbd1335f8b6f9d36203c74d574 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/a520fa15cff86fbbd1335f8b6f9d36203c74d574/graph.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4942, 29896, 67, 15281, 67, 4857, 1857, 67, 2696, 12, 2890, 16, 6928, 33, 7036, 16, 598, 67, 5336, 33, 8381, 16, 4942, 29896, 33, 7036, 4672, 436, 8395, 2860, 279, 666, 434, 8453, 434,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4942, 29896, 67, 15281, 67, 4857, 1857, 67, 2696, 12, 2890, 16, 6928, 33, 7036, 16, 598, 67, 5336, 33, 8381, 16, 4942, 29896, 33, 7036, 4672, 436, 8395, 2860, 279, 666, 434, 8453, 434,...
pmsg('SAM to BAM', cmd_dict['infile'], cmd_dict['ofile'])
pmsg('SAM to BAM', cmd_dict['infile'], cmd_dict['outfile'])
def sam_to_bam(input_file, output_file): '''Convert SAM files to BAM files.''' cmd_dict = cdict.copy() cmd_dict['infile'] = input_file cmd_dict['outfile'] = output_file pmsg('SAM to BAM', cmd_dict['infile'], cmd_dict['ofile']) samcmd = '%(samtools)s import %(ref)s.fai %(infile)s %(outfile)s' % cmd_dict call(samcmd)
1dcbe90106e59b7068eea2a6827390a1e2282350 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14572/1dcbe90106e59b7068eea2a6827390a1e2282350/prep_sequence.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 16260, 67, 869, 67, 11477, 12, 2630, 67, 768, 16, 876, 67, 768, 4672, 9163, 2723, 30712, 1390, 358, 605, 2192, 1390, 1093, 6309, 1797, 67, 1576, 273, 276, 1576, 18, 3530, 1435, 1797, 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, 16260, 67, 869, 67, 11477, 12, 2630, 67, 768, 16, 876, 67, 768, 4672, 9163, 2723, 30712, 1390, 358, 605, 2192, 1390, 1093, 6309, 1797, 67, 1576, 273, 276, 1576, 18, 3530, 1435, 1797, 6...
a = [t for t in self.dns_txt(domain) if isSPF(t)]
a = [t for t in self.dns_txt(domain) if RE_SPF.match(t)]
def dns_spf(self, domain): """Get the SPF record recorded in DNS for a specific domain name. Returns None if not found, or if more than one record is found. """ # for performance, check for most common case of TXT first a = [t for t in self.dns_txt(domain) if isSPF(t)] if len(a) > 1: raise PermError('Two or more type TXT spf records found.') if len(a) == 1 and self.strict < 2: return a[0] # check official SPF type first when it becomes more popular try: b = [t for t in self.dns_99(domain) if isSPF(t)] except TempError,x: # some braindead DNS servers hang on type 99 query if self.strict > 1: raise TempError(x) b = []
a7e98f411e38a9546bc0fe33add21eb0ae6fd268 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/139/a7e98f411e38a9546bc0fe33add21eb0ae6fd268/spf.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6605, 67, 1752, 74, 12, 2890, 16, 2461, 4672, 3536, 967, 326, 11405, 42, 1409, 16421, 316, 8858, 364, 279, 2923, 2461, 508, 18, 225, 2860, 599, 309, 486, 1392, 16, 578, 309, 1898, 2353...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6605, 67, 1752, 74, 12, 2890, 16, 2461, 4672, 3536, 967, 326, 11405, 42, 1409, 16421, 316, 8858, 364, 279, 2923, 2461, 508, 18, 225, 2860, 599, 309, 486, 1392, 16, 578, 309, 1898, 2353...
planned_out = ret[2]
planned_out = ret[2]
def create_planning(self,cr, uid, ids, context={}): product_obj = self.pool.get('product.product') planning_obj=self.pool.get('stock.planning') mod_obj =self.pool.get('ir.model.data') for f in self.browse(cr, uid, ids, context=context): if f.forecasted_products: cr.execute("SELECT product_id \ FROM stock_sale_forecast \ WHERE (period_id = %s) AND (warehouse_id = %s)", (f.period_id2.id, f.warehouse_id2.id)) products_id1 = [x for x, in cr.fetchall()] else: prod_categ_obj=self.pool.get('product.category') template_obj=self.pool.get('product.template') categ_ids = f.product_categ_id2.id and [f.product_categ_id2.id] or [] prod_categ_ids=prod_categ_obj.search(cr,uid,[('parent_id','child_of',categ_ids)]) templates_ids = template_obj.search(cr,uid,[('categ_id','in',prod_categ_ids)]) products_id1 = product_obj.search(cr,uid,[('product_tmpl_id','in',templates_ids)]) if len(products_id1)==0: raise osv.except_osv(_('Error !'), _('No forecasts for selected period or no products in selected category !'))
6a21b5d661b74602c870fac41f3c8c42e8bc6c33 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/6a21b5d661b74602c870fac41f3c8c42e8bc6c33/stock_planning.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 412, 10903, 12, 2890, 16, 3353, 16, 4555, 16, 3258, 16, 819, 12938, 4672, 3017, 67, 2603, 273, 365, 18, 6011, 18, 588, 2668, 5896, 18, 5896, 6134, 886, 10903, 67, 2603, 33, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 412, 10903, 12, 2890, 16, 3353, 16, 4555, 16, 3258, 16, 819, 12938, 4672, 3017, 67, 2603, 273, 365, 18, 6011, 18, 588, 2668, 5896, 18, 5896, 6134, 886, 10903, 67, 2603, 33, ...
format = "chg"
format = 'chg'
def write(self, filename='CHG', format=None): """Write VASP charge density in CHG format
3688e40cc7f63097f1190182a26faaf134e6e2d4 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5735/3688e40cc7f63097f1190182a26faaf134e6e2d4/vasp.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 12, 2890, 16, 1544, 2218, 1792, 43, 2187, 740, 33, 7036, 4672, 3536, 3067, 776, 3033, 52, 13765, 12142, 316, 6469, 43, 740, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 12, 2890, 16, 1544, 2218, 1792, 43, 2187, 740, 33, 7036, 4672, 3536, 3067, 776, 3033, 52, 13765, 12142, 316, 6469, 43, 740, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
def notify_workflow(obj):
def notify_workflow(obj, event):
def notify_workflow(obj): """Tell the workflow tool when a comment is added """ tool = getToolByName(obj, 'portal_workflow', None) if tool is not None: tool.notifyCreated(obj)
e12d19a6e98fd1764e650d219a4c9891e5fded88 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12197/e12d19a6e98fd1764e650d219a4c9891e5fded88/comment.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5066, 67, 13815, 12, 2603, 16, 871, 4672, 3536, 21009, 326, 6095, 5226, 1347, 279, 2879, 353, 3096, 3536, 5226, 273, 336, 6364, 5911, 12, 2603, 16, 296, 24386, 67, 13815, 2187, 599, 13, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5066, 67, 13815, 12, 2603, 16, 871, 4672, 3536, 21009, 326, 6095, 5226, 1347, 279, 2879, 353, 3096, 3536, 5226, 273, 336, 6364, 5911, 12, 2603, 16, 296, 24386, 67, 13815, 2187, 599, 13, ...
g.add_edge(i,o,g.edge_label(i,v)[0]+g.edge_label(v,o)[0])
g.add_edge(i,o,g.edge_label(i,v)[0]*g.edge_label(v,o)[0])
def reduced_rauzy_graph(self, n): r""" Returns the reduced Rauzy graph of order `n` of self.
1e309a0b696b2b5ea5293939102925384078f62f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/1e309a0b696b2b5ea5293939102925384078f62f/word.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13162, 67, 354, 89, 21832, 67, 4660, 12, 2890, 16, 290, 4672, 436, 8395, 2860, 326, 13162, 534, 8377, 21832, 2667, 434, 1353, 1375, 82, 68, 434, 365, 18, 2, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 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, 13162, 67, 354, 89, 21832, 67, 4660, 12, 2890, 16, 290, 4672, 436, 8395, 2860, 326, 13162, 534, 8377, 21832, 2667, 434, 1353, 1375, 82, 68, 434, 365, 18, 2, -100, -100, -100, -100, -10...
l = getattr(pkt, self.fld) l += pkt.get_field(self.fld).shift i = self.m2i(pkt, s[:l]) return s[l:],i
l = getattr(pkt, self.fld) l += pkt.get_field(self.fld).shift i = self.m2i(pkt, s[:l]) return s[l:],i
def getfield(self, pkt, s): l = getattr(pkt, self.fld) l += pkt.get_field(self.fld).shift i = self.m2i(pkt, s[:l]) return s[l:],i
b94dbcd6fc233189c75b8cb2137032e94f2718ed /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7311/b94dbcd6fc233189c75b8cb2137032e94f2718ed/scapy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 1518, 12, 2890, 16, 11536, 16, 272, 4672, 328, 273, 3869, 12, 5465, 88, 16, 365, 18, 19794, 13, 328, 1011, 11536, 18, 588, 67, 1518, 12, 2890, 18, 19794, 2934, 4012, 277, 273, 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, 336, 1518, 12, 2890, 16, 11536, 16, 272, 4672, 328, 273, 3869, 12, 5465, 88, 16, 365, 18, 19794, 13, 328, 1011, 11536, 18, 588, 67, 1518, 12, 2890, 18, 19794, 2934, 4012, 277, 273, 3...
print checkin_date print checkout_date
def on_change_checkout(self,cr, uid, ids, checkin_date=time.strftime('%Y-%m-%d %H:%M:%S'),checkout_date=time.strftime('%Y-%m-%d %H:%M:%S'),context=None): qty = 1 print checkin_date print checkout_date if checkout_date < checkin_date: raise osv.except_osv ('Error !','Checkout must be greater or equal checkin date') if checkin_date: diffDate = datetime.datetime(*time.strptime(checkout_date,'%Y-%m-%d %H:%M:%S')[:5]) - datetime.datetime(*time.strptime(checkin_date,'%Y-%m-%d %H:%M:%S')[:5]) qty = diffDate.days return {'value':{'product_uom_qty':qty}}
c3ecae300b51b41e529e87af3b8a4554a185c2e7 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7339/c3ecae300b51b41e529e87af3b8a4554a185c2e7/hotel.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 3427, 67, 17300, 12, 2890, 16, 3353, 16, 4555, 16, 3258, 16, 866, 267, 67, 712, 33, 957, 18, 701, 9982, 29909, 61, 6456, 81, 6456, 72, 738, 44, 5319, 49, 5319, 55, 19899, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 3427, 67, 17300, 12, 2890, 16, 3353, 16, 4555, 16, 3258, 16, 866, 267, 67, 712, 33, 957, 18, 701, 9982, 29909, 61, 6456, 81, 6456, 72, 738, 44, 5319, 49, 5319, 55, 19899, ...
qsd_rec = QuasiStaticData.find_by_url_parts(url.split('/'))
qsd_rec = QuasiStaticData.find_by_url_parts(url_parts)
def qsd(request, url): # Fetch user login state user_id = request.session.get('user_id', False) logged_in = user_id if logged_in != False: logged_in = True # Extract URL parts url_parts = url.split('/') # Detect verb url_verb = url_parts.pop() url_verb_parts = url_verb.split('.') if len(url_verb_parts) > 2: url_verb = url_verb_parts[1] url_parts.append(url_verb_parts[0] + url_verb_parts[2]) else: url_parts.append(url_verb) url_verb = 'read' # Fetch the QSD object try: qsd_rec = QuasiStaticData.find_by_url_parts(url.split('/')) except QuasiStaticData.DoesNotExist: if url_verb != 'create': raise Http404 # Detect edit authorizations user = User.objects.filter(id=user_id) if user.count() > 0: user = user[0] else: user = None have_edit = UserBit.UserHasPerms( user, qsd_rec.path, GetNode('V/Administer') ) # FIXME: the create verb is NOT implemented # Detect the edit verb if url_verb == 'edit': # Enforce authorizations (FIXME: SHOW A REAL ERROR!) if not have_edit: raise Http404 # Detect POST if request.POST.has_key('post_edit'): qsd_rec.content = request.POST['content'] qsd_rec.title = request.POST['title'] qsd_rec.save() url_verb = 'read' else: # Render an edit form return render_to_response('qsd_edit.html', { 'navbar_list': _makeNavbar(request.path), 'preload_images': preload_images, 'title': qsd_rec.title, 'content': qsd_rec.content, 'logged_in': logged_in}) # Detect the standard read verb if url_verb == 'read': # Render response return render_to_response('qsd.html', { 'navbar_list': _makeNavBar(request.path), 'preload_images': preload_images, 'title': qsd_rec.title, 'content': qsd_rec.html(), 'logged_in': logged_in, 'have_edit': have_edit}) # Operation Complete!
0a92b0eff9587b5150a0a903caf233778c48a803 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12041/0a92b0eff9587b5150a0a903caf233778c48a803/views.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1043, 6427, 12, 2293, 16, 880, 4672, 468, 8065, 729, 3925, 919, 729, 67, 350, 273, 590, 18, 3184, 18, 588, 2668, 1355, 67, 350, 2187, 1083, 13, 7545, 67, 267, 273, 729, 67, 350, 309,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1043, 6427, 12, 2293, 16, 880, 4672, 468, 8065, 729, 3925, 919, 729, 67, 350, 273, 590, 18, 3184, 18, 588, 2668, 1355, 67, 350, 2187, 1083, 13, 7545, 67, 267, 273, 729, 67, 350, 309,...
pilotAgentsDB.addPilotTQReference(pilotReference, taskQueueID, ownerDN, vomsGroup, broker=resourceBroker, gridType=self.gridMiddleware,
submittedPilots += len(pilotReference) pilotAgentsDB.addPilotTQReference(pilotReference, taskQueueID, ownerDN, vomsGroup, broker=resourceBroker, gridType=self.gridMiddleware,
def submitPilots(self, taskQueueDict, pilotsToSubmit, director): """ Submit pilot for the given TaskQueue, this is done from the Thread Pool job """ try:
6271afc9c4bbb66e2201ad46655c110521589002 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12864/6271afc9c4bbb66e2201ad46655c110521589002/TaskQueueDirector.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4879, 52, 330, 6968, 12, 2890, 16, 1562, 3183, 5014, 16, 24970, 6968, 774, 11620, 16, 2657, 280, 4672, 3536, 17320, 293, 22797, 364, 326, 864, 3837, 3183, 16, 333, 353, 2731, 628, 326, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4879, 52, 330, 6968, 12, 2890, 16, 1562, 3183, 5014, 16, 24970, 6968, 774, 11620, 16, 2657, 280, 4672, 3536, 17320, 293, 22797, 364, 326, 864, 3837, 3183, 16, 333, 353, 2731, 628, 326, ...
(indexNo, storeSize) = unpack("!ii", data[0:8])
(indexNo, storeSize) = unpack("!II", data[0:8])
def readPackages(dbpath): packages = {} keyring = openpgp.PGPKeyRing() db = hashopen(dbpath+"/Packages", "r") for key in db.keys(): rpmio = RpmFileIO(rpmconfig, "dummy", verify=1) pkg = package.RpmPackage(rpmconfig, "dummy") data = db[key] val = unpack("i", key)[0] if val != 0: (indexNo, storeSize) = unpack("!ii", data[0:8]) indexdata = data[8:indexNo*16+8] storedata = data[indexNo*16+8:] pkg["signature"] = {} for idx in xrange(0, indexNo): try: (tag, tagval) = rpmio.getHeaderByIndex(idx, indexdata, storedata) except ValueError, e: # FIXME: different handling? config.printError("Invalid header entry %s in %s: %s" % (idx, key, e)) continue if tag == 257: pkg["signature"]["size_in_sig"] = tagval elif tag == 261: pkg["signature"]["md5"] = tagval elif tag == 269: pkg["signature"]["sha1header"] = tagval if rpmtag.has_key(tag): if rpmtagname[tag] == "archivesize": pkg["signature"]["payloadsize"] = tagval pkg[rpmtagname[tag]] = tagval if pkg["name"].startswith("gpg-pubkey"): keys = openpgp.parsePGPKeys(pkg["description"]) for k in keys: keyring.addKey(k) pkg["group"] = (pkg["group"],) pkg.generateFileNames() pkg.source = "db:"+dbpath+"/"+pkg.getNEVRA() packages[val] = pkg rpmio.hdr = {} return packages, keyring
dc80ea1747ad5322e1899c6565d4131e1fa3ca2a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1143/dc80ea1747ad5322e1899c6565d4131e1fa3ca2a/functions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 11425, 12, 1966, 803, 4672, 5907, 273, 2618, 20923, 273, 1696, 84, 6403, 18, 52, 9681, 653, 10369, 1435, 1319, 273, 1651, 3190, 12, 1966, 803, 9078, 19, 11425, 3113, 315, 86, 7923, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 11425, 12, 1966, 803, 4672, 5907, 273, 2618, 20923, 273, 1696, 84, 6403, 18, 52, 9681, 653, 10369, 1435, 1319, 273, 1651, 3190, 12, 1966, 803, 9078, 19, 11425, 3113, 315, 86, 7923, ...
return fonts fontdict = {} for i in range(_winreg.QueryInfoKey(key)[1]): try: name, font, t = _winreg.EnumValue(key,i) except EnvironmentError: break font = str(font) if font[-4:].lower() != ".ttf": continue if os.sep not in font: font = os.path.join(fontdir, font) if name[-10:] == '(TrueType)': name = name[:-11] name = name.lower().split() bold = italic = 0 for m in mods: if m in name: name.remove(m) if 'bold' in name: name.remove('bold') bold = 1 if 'italic' in name: name.remove('italic') italic = 1 name = ''.join(name) _addfont(name, bold, italic, font, fonts)
pass for key in keys: fontdict = {} for i in range(_winreg.QueryInfoKey(key)[1]): try: name, font, t = _winreg.EnumValue(key,i) except EnvironmentError: break font = str(font) if font[-4:].lower() != ".ttf": continue if os.sep not in font: font = os.path.join(fontdir, font) if name[-10:] == '(TrueType)': name = name[:-11] name = name.lower().split() bold = italic = 0 for m in mods: if m in name: name.remove(m) if 'bold' in name: name.remove('bold') bold = 1 if 'italic' in name: name.remove('italic') italic = 1 name = ''.join(name) _addfont(name, bold, italic, font, fonts)
def initsysfonts_win32(): import _winreg fonts = {} mods = 'demibold', 'narrow', 'light', 'unicode', 'bt', 'mt' fontdir = os.path.join(os.environ['WINDIR'], "Fonts") #find the right place in registry try: key = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, r"SOFTWARE\Microsoft\Windows\CurrentVersion\Fonts") except WindowsError: try: key = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, r"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts") except WindowsError: return fonts fontdict = {} for i in range(_winreg.QueryInfoKey(key)[1]): try: name, font, t = _winreg.EnumValue(key,i) except EnvironmentError: break font = str(font) if font[-4:].lower() != ".ttf": continue if os.sep not in font: font = os.path.join(fontdir, font) if name[-10:] == '(TrueType)': name = name[:-11] name = name.lower().split() bold = italic = 0 for m in mods: if m in name: name.remove(m) if 'bold' in name: name.remove('bold') bold = 1 if 'italic' in name: name.remove('italic') italic = 1 name = ''.join(name) _addfont(name, bold, italic, font, fonts) return fonts
9514cfca7f6ad6d57dfbfe52d7ae6bdf13d437a8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1298/9514cfca7f6ad6d57dfbfe52d7ae6bdf13d437a8/sysfont.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1208, 9499, 22052, 67, 8082, 1578, 13332, 1930, 389, 8082, 1574, 16450, 273, 2618, 15546, 273, 296, 19117, 495, 1673, 2187, 296, 82, 7815, 2187, 296, 5099, 2187, 296, 9124, 2187, 296, 2360...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1208, 9499, 22052, 67, 8082, 1578, 13332, 1930, 389, 8082, 1574, 16450, 273, 2618, 15546, 273, 296, 19117, 495, 1673, 2187, 296, 82, 7815, 2187, 296, 5099, 2187, 296, 9124, 2187, 296, 2360...
write_keyval(self.resultdir, job_data)
utils.write_keyval(self.resultdir, job_data)
def __init__(self, control, args, resultdir, label, user, machines, client=False, parse_job="", ssh_user='root', ssh_port=22, ssh_pass=''): """ control The control file (pathname of) args args to pass to the control file resultdir where to throw the results label label for the job user Username for the job (email address) client True if a client-side control file """ path = os.path.dirname(__file__) self.autodir = os.path.abspath(os.path.join(path, '..')) self.serverdir = os.path.join(self.autodir, 'server') self.testdir = os.path.join(self.serverdir, 'tests') self.tmpdir = os.path.join(self.serverdir, 'tmp') self.conmuxdir = os.path.join(self.autodir, 'conmux') self.clientdir = os.path.join(self.autodir, 'client') self.toolsdir = os.path.join(self.autodir, 'client/tools') if control: self.control = open(control, 'r').read() self.control = re.sub('\r', '', self.control) else: self.control = None self.resultdir = resultdir if not os.path.exists(resultdir): os.mkdir(resultdir) self.debugdir = os.path.join(resultdir, 'debug') if not os.path.exists(self.debugdir): os.mkdir(self.debugdir) self.status = os.path.join(resultdir, 'status') self.label = label self.user = user self.args = args self.machines = machines self.client = client self.record_prefix = '' self.warning_loggers = set() self.ssh_user = ssh_user self.ssh_port = ssh_port self.ssh_pass = ssh_pass
988f351358fb2fe7b34a0fcafd607cb74524e537 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12268/988f351358fb2fe7b34a0fcafd607cb74524e537/server_job.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 3325, 16, 833, 16, 563, 1214, 16, 1433, 16, 729, 16, 15942, 16, 1004, 33, 8381, 16, 1109, 67, 4688, 1546, 3113, 7056, 67, 1355, 2218, 3085, 2187, 7056, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3325, 16, 833, 16, 563, 1214, 16, 1433, 16, 729, 16, 15942, 16, 1004, 33, 8381, 16, 1109, 67, 4688, 1546, 3113, 7056, 67, 1355, 2218, 3085, 2187, 7056, ...
self.parser.parseError(_("Unexpected end of file. Missing closing " "tags"))
self.parser.parseError(_("Unexpected end of file. " u"Missing closing tags."))
def processEOF(self): self.tree.generateImpliedEndTags() if len(self.tree.openElements) > 2: self.parser.parseError(_("Unexpected end of file. Missing closing " "tags")) elif len(self.tree.openElements) == 2 and\ self.tree.openElements[1].name != "body": # This happens for framesets or something? self.parser.parseError(_("XXXXX FRAMESET?")) elif self.parser.innerHTML and len(self.tree.openElements) > 1 : # XXX This is not what the specification says. Not sure what to do # here. self.parser.parseError(_("XXX innerHTML EOF")) # Betting ends.
e173cf51e14f1d0228414fa7e873210ea25c9c2f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4487/e173cf51e14f1d0228414fa7e873210ea25c9c2f/html5parser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 12706, 12, 2890, 4672, 365, 18, 3413, 18, 7163, 2828, 2092, 1638, 3453, 1435, 309, 562, 12, 2890, 18, 3413, 18, 3190, 3471, 13, 405, 576, 30, 365, 18, 4288, 18, 2670, 668, 24899,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 12706, 12, 2890, 4672, 365, 18, 3413, 18, 7163, 2828, 2092, 1638, 3453, 1435, 309, 562, 12, 2890, 18, 3413, 18, 3190, 3471, 13, 405, 576, 30, 365, 18, 4288, 18, 2670, 668, 24899,...
self.updateSelectedObjColor(Vec4(1.0))
self.setCurrentColor(Vec4(1.0)) self.setResetColor(Vec4(1.0)) baseline.setColor(Vec4(1.0))
def setSignBaselineStyle(self, val): baseline=self.currentBaselineDNA if baseline: settings={} if val == '<custom>': return elif val == 'Zero': self.levelEditor.replaceSelectedEnabled=0 # Don't set string: self.baselineString.set('') self.addCurveFloater.set(0) self.addKernFloater.set(0) self.addWiggleFloater.set(0) self.addStumbleFloater.set(0) self.addStompFloater.set(0)
c2c59d71bc85491dbe79631deb02cf50859b960b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8543/c2c59d71bc85491dbe79631deb02cf50859b960b/LevelEditor.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 2766, 16635, 2885, 12, 2890, 16, 1244, 4672, 14243, 33, 2890, 18, 2972, 16635, 8609, 37, 309, 14243, 30, 1947, 12938, 309, 1244, 422, 2368, 3662, 1870, 30, 327, 1327, 1244, 422, 296...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 2766, 16635, 2885, 12, 2890, 16, 1244, 4672, 14243, 33, 2890, 18, 2972, 16635, 8609, 37, 309, 14243, 30, 1947, 12938, 309, 1244, 422, 2368, 3662, 1870, 30, 327, 1327, 1244, 422, 296...
if workflowSpec.parameters.has_key("DQMServer"): self.uploadUrl = workflowSpec.parameters['DQMServer'] self.proxyLocation = workflow.parameters['DQMUploadProxy']
if workflow.parameters.has_key("DQMServer"): self.uploadUrl = workflow.parameters['DQMServer'] self.proxyLocation = workflow.parameters['proxyLocation']
def __init__(self): self.state = TaskState(os.getcwd()) self.state.loadRunResDB() self.config = self.state.configurationDict() self.workflowSpecId = self.config['WorkflowSpecID'][0] self.jobSpecId = self.config['JobSpecID'][0]
8aa0379b7ff693cb5ae777625af3f75853af35f9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8887/8aa0379b7ff693cb5ae777625af3f75853af35f9/RuntimeOfflineDQM.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 365, 18, 2019, 273, 3837, 1119, 12, 538, 18, 588, 11089, 10756, 365, 18, 2019, 18, 945, 1997, 607, 2290, 1435, 365, 18, 1425, 273, 365, 18, 2019, 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, 4672, 365, 18, 2019, 273, 3837, 1119, 12, 538, 18, 588, 11089, 10756, 365, 18, 2019, 18, 945, 1997, 607, 2290, 1435, 365, 18, 1425, 273, 365, 18, 2019, 18, ...
def shutdown (self, how):
def shutdown(self, how):
def shutdown (self, how): self._checkClosed() self._sslobj = None socket.shutdown(self, how)
e1cac0e547ba90a51eefe78efa72af8e4ccaaaf8 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8125/e1cac0e547ba90a51eefe78efa72af8e4ccaaaf8/ssl.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5731, 12, 2890, 16, 3661, 4672, 365, 6315, 1893, 7395, 1435, 365, 6315, 1049, 383, 441, 273, 599, 2987, 18, 15132, 12, 2890, 16, 3661, 13, 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, 5731, 12, 2890, 16, 3661, 4672, 365, 6315, 1893, 7395, 1435, 365, 6315, 1049, 383, 441, 273, 599, 2987, 18, 15132, 12, 2890, 16, 3661, 13, 2, -100, -100, -100, -100, -100, -100, -100, ...
self.add_var_opt("write-cdata","")
def __init__(self, inspJob, procParams, ifo, trig, cp,opts,dag, datafindCache, d_node, datafindCommand, type='plot', sngl_table = None): self.sample_rate = string.strip(cp.get('coh-inspiral','sample-rate')) if 1:#try: self.output_file_name = "" #inspiral.InspiralNode.__init__(self, inspJob) # the use of this class would require some reorganisation in fu_Condor.py # and webCondor.py in order to set up the jobs following the same scheme # as the way it is done for the Inspiral pipeline... pipeline.CondorDAGNode.__init__(self,inspJob) injFile = self.checkInjections(cp) hipeCache = checkHipeCachePath(cp)
144148eb00e4ab8f032b3d50097d78192aeba475 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3592/144148eb00e4ab8f032b3d50097d78192aeba475/fu_Condor.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 316, 1752, 2278, 16, 5418, 1370, 16, 21479, 16, 23142, 16, 3283, 16, 4952, 16, 30204, 16, 501, 4720, 1649, 16, 302, 67, 2159, 16, 501, 4720, 2189, 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, 316, 1752, 2278, 16, 5418, 1370, 16, 21479, 16, 23142, 16, 3283, 16, 4952, 16, 30204, 16, 501, 4720, 1649, 16, 302, 67, 2159, 16, 501, 4720, 2189, 16, ...
lambda: "library_content_html_%s" % Setting.cached_library_content_date(),
lambda *args, **kwargs: "library_content_html_%s" % Setting.cached_library_content_date(),
def get(self): library_content_html(bust_cache=True) self.response.out.write("Library content regenerated")
b4e905730ee2d7308b21af7b79ec4511e9f07813 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12010/b4e905730ee2d7308b21af7b79ec4511e9f07813/main.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 12, 2890, 4672, 5313, 67, 1745, 67, 2620, 12, 70, 641, 67, 2493, 33, 5510, 13, 365, 18, 2740, 18, 659, 18, 2626, 2932, 9313, 913, 960, 7489, 7923, 2, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 12, 2890, 4672, 5313, 67, 1745, 67, 2620, 12, 70, 641, 67, 2493, 33, 5510, 13, 365, 18, 2740, 18, 659, 18, 2626, 2932, 9313, 913, 960, 7489, 7923, 2, -100, -100, -100, -100, -10...
by running out of read data, or by the ``length``
by running out of read data, or by the ``zipped_length``
def read(self, bytes = -1): ''' Read bytes from file
4ac164bdacd3aa537b13ee3f7f078a5c22210a40 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12971/4ac164bdacd3aa537b13ee3f7f078a5c22210a40/gzipstreams.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 12, 2890, 16, 1731, 273, 300, 21, 4672, 9163, 2720, 1731, 628, 585, 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, 855, 12, 2890, 16, 1731, 273, 300, 21, 4672, 9163, 2720, 1731, 628, 585, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
cursor.execute(sqlCommand) except MySQLdb.Error: self.conn = self.connect(invalidate = True)
cursor.execute(sqlCommand) except MySQLdb.Error: self.conn = self.connect() self.redo()
def getMergeToBeDoneAgain(self, datasetId):
f6d38da4b0910650112bd5df8a6e148fb35b760b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8887/f6d38da4b0910650112bd5df8a6e148fb35b760b/MergeSensorDB.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2108, 1583, 15360, 7387, 23530, 12, 2890, 16, 3709, 548, 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,...
[ 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, 2108, 1583, 15360, 7387, 23530, 12, 2890, 16, 3709, 548, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
to_ = bridge.get_participant(event.target().split('!')[0]) self.error(2, debug_str, debug=True) from_.say_on_xmpp_to(to_.nickname, event.arguments()[0]) return except Bridge.NoSuchParticipantException: if event.target().split('!')[0] == self.nickname: self.error(2, debug_str, debug=True) connection.privmsg(from_.nickname, self.respond(event.arguments()[0])) return else: continue if event.eventtype() == 'kick': if event.target().lower() == bridge.irc_room: try: kicked = bridge.get_participant(event.arguments()[0]) if isinstance(kicked.irc_connection, irclib.ServerConnection): kicked.irc_connection.join(bridge.irc_room) else: if len(event.arguments()) > 1: bridge.remove_participant('irc', kicked.nickname, 'Kicked by '+nickname+' with reason: '+event.arguments()[1]) else: bridge.remove_participant('irc', kicked.nickname, 'Kicked by '+nickname+' (no reason was given)') return except Bridge.NoSuchParticipantException: self.error(say_levels.debug, 'a participant that was not here has been kicked ? WTF ?', no_debug_add=event_str) return else: continue if event.eventtype() == 'quit' or event.eventtype() == 'part' and event.target().lower() == bridge.irc_room: if len(event.arguments()) > 0: leave_message = event.arguments()[0] elif event.eventtype() == 'quit': leave_message = 'Left server.' elif event.eventtype() == 'part': leave_message = 'Left channel.' else: leave_message = '' bridge.remove_participant('irc', from_.nickname, leave_message) handled = True continue if event.eventtype() == 'nick': from_.change_nickname(event.target(), 'xmpp') handled = True continue if event.eventtype() in ['pubmsg', 'action']: if bridge.irc_room == event.target().lower() and bridge.irc_server == connection.server: self.error(2, debug_str, debug=True) message = event.arguments()[0]
from_ = bridge.get_participant(source_nickname)
def _irc_event_handler(self, connection, event): """[Internal] Manage IRC events""" # Answer ping if event.eventtype() == 'ping': connection.pong(connection.get_server_name()) return # Events we always want to ignore if 'all' in event.eventtype() or 'motd' in event.eventtype() or event.eventtype() in ['nicknameinuse', 'nickcollision', 'erroneusnickname']: return if event.eventtype() in ['pong', 'privnotice', 'ctcp', 'nochanmodes', 'notexttosend', 'currenttopic', 'topicinfo', '328', 'pubnotice', '042', 'umode', 'welcome', 'yourhost', 'created', 'myinfo', 'featurelist', 'luserclient', 'luserop', 'luserchannels', 'luserme', 'n_local', 'n_global', 'endofnames', 'luserunknown', 'luserconns', 'inviteonlychan', 'bannedfromchan', 'channelisfull', 'badchannelkey']: self.error(1, 'ignoring IRC '+event.eventtype(), debug=True) return nickname = None if event.source() and '!' in event.source(): nickname = event.source().split('!')[0] # A string representation of the event event_str = '\nconnection='+connection.__str__()+'\neventtype='+event.eventtype()+'\nsource='+repr(event.source())+'\ntarget='+repr(event.target())+'\narguments='+repr(event.arguments()) debug_str = 'Received IRC event.'+event_str printed_event = False if event.eventtype() in ['pubmsg', 'action', 'privmsg', 'quit', 'part', 'nick', 'kick']: if nickname == None: return handled = False if event.eventtype() in ['quit', 'part'] and nickname == self.nickname: return if event.eventtype() in ['quit', 'part', 'nick', 'kick']: if connection.real_nickname != self.nickname: self.error(1, 'ignoring IRC '+event.eventtype()+' not received on bot connection', debug=True) return else: self.error(2, debug_str, debug=True) printed_event = True if event.eventtype() == 'kick' and len(event.arguments()) < 1: self.error(say_levels.debug, 'at least 1 argument is needed for a '+event.eventtype()+' event', no_debug_add=event_str) return if event.eventtype() in ['pubmsg', 'action']: if connection.real_nickname != self.nickname: self.error(1, 'ignoring IRC '+event.eventtype()+' not received on bot connection', debug=True) return if nickname == self.nickname: self.error(1, 'ignoring IRC '+event.eventtype()+' sent by self', debug=True) return for bridge in self.bridges: if connection.server != bridge.irc_server: continue try: from_ = bridge.get_participant(nickname) except Bridge.NoSuchParticipantException: continue # Private message if event.eventtype() == 'privmsg': if event.target() == None: return try: to_ = bridge.get_participant(event.target().split('!')[0]) self.error(2, debug_str, debug=True) from_.say_on_xmpp_to(to_.nickname, event.arguments()[0]) return except Bridge.NoSuchParticipantException: if event.target().split('!')[0] == self.nickname: # Message is for the bot self.error(2, debug_str, debug=True) connection.privmsg(from_.nickname, self.respond(event.arguments()[0])) return else: continue # kick handling if event.eventtype() == 'kick': if event.target().lower() == bridge.irc_room: try: kicked = bridge.get_participant(event.arguments()[0]) if isinstance(kicked.irc_connection, irclib.ServerConnection): kicked.irc_connection.join(bridge.irc_room) else: if len(event.arguments()) > 1: bridge.remove_participant('irc', kicked.nickname, 'Kicked by '+nickname+' with reason: '+event.arguments()[1]) else: bridge.remove_participant('irc', kicked.nickname, 'Kicked by '+nickname+' (no reason was given)') return except Bridge.NoSuchParticipantException: self.error(say_levels.debug, 'a participant that was not here has been kicked ? WTF ?', no_debug_add=event_str) return else: continue # Leaving events if event.eventtype() == 'quit' or event.eventtype() == 'part' and event.target().lower() == bridge.irc_room: if len(event.arguments()) > 0: leave_message = event.arguments()[0] elif event.eventtype() == 'quit': leave_message = 'Left server.' elif event.eventtype() == 'part': leave_message = 'Left channel.' else: leave_message = '' bridge.remove_participant('irc', from_.nickname, leave_message) handled = True continue # Nickname change if event.eventtype() == 'nick': from_.change_nickname(event.target(), 'xmpp') handled = True continue # Chan message if event.eventtype() in ['pubmsg', 'action']: if bridge.irc_room == event.target().lower() and bridge.irc_server == connection.server: self.error(2, debug_str, debug=True) message = event.arguments()[0] if event.eventtype() == 'action': action = True else: action = False from_.say_on_xmpp(message, action=action) return else: continue if handled: return if event.eventtype() in ['disconnect', 'kill', 'error']: if len(event.arguments()) > 0 and event.arguments()[0] == 'Connection reset by peer': self.error(2, debug_str, debug=True) else: self.error(say_levels.debug, debug_str, send_to_admins=True) return # Chan errors if event.eventtype() in ['cannotsendtochan', 'notonchannel']: self.error(2, debug_str, debug=True) bridge = self.get_bridge(irc_room=event.arguments()[0], irc_server=connection.server) if event.eventtype() == 'cannotsendtochan': if connection.real_nickname == self.nickname: bridge._join_irc_failed(event.eventtype()) else: p = bridge.get_participant(connection.real_nickname) p._close_irc_connection(event.eventtype()) p.irc_connection = event.eventtype() elif event.eventtype() == 'notonchannel': if connection.real_nickname == self.nickname: bridge.restart(message='Restarting bridge because we received the IRC event '+event.eventtype()) else: p = bridge.get_participant(connection.real_nickname) p.irc_connection.join(bridge.irc_room) return # Ignore events not received on bot connection if connection.real_nickname != self.nickname: self.error(1, 'ignoring IRC '+event.eventtype()+' not received on bridge connection', debug=True) return # Joining events if event.eventtype() in ['namreply', 'join']: if event.eventtype() == 'namreply': bridge = self.get_bridge(irc_room=event.arguments()[1].lower(), irc_server=connection.server) for nickname in re.split('(?:^[&@\+%]?|(?: [&@\+%]?)*)', event.arguments()[2].strip()): if nickname == '' or nickname == self.nickname: continue bridge.add_participant('irc', nickname) return elif event.eventtype() == 'join': bridge = self.get_bridge(irc_room=event.target().lower(), irc_server=connection.server) bridge.add_participant('irc', nickname) return # Mode event if event.eventtype() == 'mode': if len(event.arguments()) < 2: self.error(2, debug_str, debug=True) self.error(1, '2 arguments are needed for a '+event.eventtype()+' event', debug=True) return if event.arguments()[1] != self.nickname or not 'o' in event.arguments()[0]: self.error(1, 'ignoring IRC mode "'+event.arguments()[0]+'" for "'+event.arguments()[1]+'"', debug=True) return self.error(2, debug_str, debug=True) bridges = self.iter_bridges(irc_room=event.target(), irc_server=connection.server) if len(bridges) > 1: raise Exception, 'more than one bridge for one irc chan, WTF ?' bridge = bridges[0] if re.search('\+[^\-]*o', event.arguments()[0]): # bot is channel operator bridge.irc_op = True self.error(say_levels.notice, 'bot has IRC operator privileges in '+event.target()) elif re.search('\-[^\+]*o', event.arguments()[0]): # bot lost channel operator privileges if bridge.irc_op: self.error(say_levels.notice, 'bot lost IRC operator privileges in '+event.target(), send_to_admins=True) bridge.irc_op = False return # Unhandled events if not printed_event: self.error(say_levels.debug, 'The following IRC event was not handled:'+event_str+'\n', send_to_admins=True) else: self.error(1, 'event not handled', debug=True) self._send_message_to_admins(say_levels.debug, 'The following IRC event was not handled:'+event_str)
7af2a8a810665cc96ac01e14451dec4dfa2e27ba /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9915/7af2a8a810665cc96ac01e14451dec4dfa2e27ba/bot.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 481, 71, 67, 2575, 67, 4176, 12, 2890, 16, 1459, 16, 871, 4672, 3536, 63, 3061, 65, 24247, 467, 11529, 2641, 8395, 225, 468, 21019, 10087, 309, 871, 18, 2575, 723, 1435, 422, 296,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 481, 71, 67, 2575, 67, 4176, 12, 2890, 16, 1459, 16, 871, 4672, 3536, 63, 3061, 65, 24247, 467, 11529, 2641, 8395, 225, 468, 21019, 10087, 309, 871, 18, 2575, 723, 1435, 422, 296,...
self._console.outdent() self._console.outdent() return def depsToConsole(classDepsIter): oPackageId = oClassId = oLoadOrRun = '' self._console.indent() self._console.indent() for (packageId, classId, depId, loadOrRun) in classDepsIter: if packageId != oPackageId: oPackageId = packageId self._console.outdent() self._console.outdent() self._console.outdent() self._console.info("Package %s" % packageId) self._console.indent() for partId in parts: if packageId in (x.id for x in parts[partId].packages): self._console.info("Part %s" % partId) self._console.indent() self._console.indent() if classId != oClassId: oClassId = classId oLoadOrRun = '' self._console.outdent() self._console.outdent() self._console.info("Class: %s" % classId) self._console.indent() self._console.indent() if loadOrRun != oLoadOrRun: oLoadOrRun = loadOrRun self._console.outdent() if loadOrRun == 'load': self._console.info("Uses (load):") elif loadOrRun == 'run': self._console.info("Uses (run):") self._console.indent() self._console.info("%s" % depId)
def depsToConsole1(classDepsIter): oPackageId = '' self._console.indent() self._console.indent() depsMap = collectDispersedDependencies(classDepsIter)
9fe10b42be513df41053afa53e91b1f58d06af21 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5718/9fe10b42be513df41053afa53e91b1f58d06af21/Generator.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8740, 774, 10215, 21, 12, 1106, 14430, 2360, 4672, 320, 2261, 548, 273, 875, 365, 6315, 8698, 18, 9355, 1435, 365, 6315, 8698, 18, 9355, 1435, 8740, 863, 273, 3274, 1669, 457, 730, 8053,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 8740, 774, 10215, 21, 12, 1106, 14430, 2360, 4672, 320, 2261, 548, 273, 875, 365, 6315, 8698, 18, 9355, 1435, 365, 6315, 8698, 18, 9355, 1435, 8740, 863, 273, 3274, 1669, 457, 730, 8053,...
class BrokenImplementation(ExeATCTion): pass class DoesNotImplement(ExeATCTion): pass class BrokenMethodImplementation(ExeATCTion): pass
class BrokenImplementation(Exception): pass class DoesNotImplement(Exception): pass class BrokenMethodImplementation(Exception): pass
def flattenInterfaces(interfaces, remove_duplicates=1): return ()
ff9d89f26a432d62a1e362915ed8be38d46c9ac1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1807/ff9d89f26a432d62a1e362915ed8be38d46c9ac1/common.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5341, 10273, 12, 15898, 16, 1206, 67, 22449, 33, 21, 4672, 327, 1832, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5341, 10273, 12, 15898, 16, 1206, 67, 22449, 33, 21, 4672, 327, 1832, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
print "LM_Sensors proc data not available? Did you load i2c-proc" print "and configured lm_sensors?" print "temperatures will be bogus"
if self.k6: print "Kernel 2.5/2.6 detected, but no i2c sensors found" print "Did u load (or compile) the necessary bus driver" print "and sensor chip modules" else: print "LM_Sensors proc data not available? Did you load i2c-proc" print "and configured lm_sensors?" print "temperatures will be bogus"
def getSensorPath(self): if not os.path.exists(self.initpath): print "LM_Sensors proc data not available? Did you load i2c-proc" print "and configured lm_sensors?" print "temperatures will be bogus" return -1 #failure for senspath in os.listdir(self.initpath): testpath = os.path.join(self.initpath , senspath) if os.path.isdir(testpath): return testpath
8a8719064ecbca5b6c21ce59179fe1b270980ee0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/8a8719064ecbca5b6c21ce59179fe1b270980ee0/system.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1322, 3975, 743, 12, 2890, 4672, 309, 486, 1140, 18, 803, 18, 1808, 12, 2890, 18, 2738, 803, 4672, 309, 365, 18, 79, 26, 30, 1172, 315, 11286, 576, 18, 25, 19, 22, 18, 26, 8316, 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, 1322, 3975, 743, 12, 2890, 4672, 309, 486, 1140, 18, 803, 18, 1808, 12, 2890, 18, 2738, 803, 4672, 309, 365, 18, 79, 26, 30, 1172, 315, 11286, 576, 18, 25, 19, 22, 18, 26, 8316, 16...
small_buf = array.array('c', ' '*10)
small_buf = array.array('b', b' '*10)
def test_pack_into_fn(): test_string = 'Reykjavik rocks, eow!' writable_buf = array.array('c', ' '*100) fmt = '21s' pack_into = lambda *args: struct.pack_into(fmt, *args) # Test without offset. pack_into(writable_buf, 0, test_string) from_buf = writable_buf.tostring()[:len(test_string)] vereq(from_buf, test_string) # Test with offset. pack_into(writable_buf, 10, test_string) from_buf = writable_buf.tostring()[:len(test_string)+10] vereq(from_buf, test_string[:10] + test_string) # Go beyond boundaries. small_buf = array.array('c', ' '*10) assertRaises(struct.error, pack_into, small_buf, 0, test_string) assertRaises(struct.error, pack_into, small_buf, 2, test_string)
99c0c223e297866b55920dc1f15bade93004c5f9 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8546/99c0c223e297866b55920dc1f15bade93004c5f9/test_struct.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 2920, 67, 18591, 67, 4293, 13332, 1842, 67, 1080, 273, 296, 54, 402, 79, 12333, 522, 79, 23486, 87, 16, 425, 543, 5124, 9691, 67, 4385, 273, 526, 18, 1126, 2668, 71, 2187, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2920, 67, 18591, 67, 4293, 13332, 1842, 67, 1080, 273, 296, 54, 402, 79, 12333, 522, 79, 23486, 87, 16, 425, 543, 5124, 9691, 67, 4385, 273, 526, 18, 1126, 2668, 71, 2187, ...
"""Return a copy of `setting_spec` excluding/replacing some settings. `setting_spec` is a tuple of configuration settings with a structure
"""Return a copy of `settings_spec` excluding/replacing some settings. `settings_spec` is a tuple of configuration settings with a structure
def filter_settings_spec(settings_spec, *exclude, **replace): """Return a copy of `setting_spec` excluding/replacing some settings. `setting_spec` is a tuple of configuration settings with a structure described for docutils.SettingsSpec.settings_spec. Optional positional arguments are names of to-be-excluded settings. Keyword arguments are option specification replacements. (See the html4strict writer for an example.) """ settings = list(settings_spec) # every third item is a sequence of option tuples for i in range(2, len(settings), 3): newopts = [] for opt_spec in settings[i]: # opt_spec is ("<help>", [<option strings>], {<keyword args>}) opt_name = [opt_string[2:].replace('-', '_') for opt_string in opt_spec[1] if opt_string.startswith('--') ][0] if opt_name in exclude: continue if opt_name in replace.keys(): newopts.append(replace[opt_name]) else: newopts.append(opt_spec) settings[i] = tuple(newopts) return tuple(settings)
7b3b0b79adf0cc56a80071a5806d407be86d673b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1532/7b3b0b79adf0cc56a80071a5806d407be86d673b/frontend.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1034, 67, 4272, 67, 2793, 12, 4272, 67, 2793, 16, 380, 10157, 16, 2826, 2079, 4672, 3536, 990, 279, 1610, 434, 1375, 4272, 67, 2793, 68, 19560, 19, 26745, 5330, 2690, 1947, 18, 225, 13...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1034, 67, 4272, 67, 2793, 12, 4272, 67, 2793, 16, 380, 10157, 16, 2826, 2079, 4672, 3536, 990, 279, 1610, 434, 1375, 4272, 67, 2793, 68, 19560, 19, 26745, 5330, 2690, 1947, 18, 225, 13...
], context=context)
], context=ctx)
def get_action_id(self, cursor, user, action_id, context=None): if self.search(cursor, user, [ ('id', '=', action_id), ], context=context): return action_id for action_type in ( 'ir.action.report', 'ir.action.act_window', 'ir.action.wizard', 'ir.action.url', ): action_obj = self.pool.get(action_type) action_id2 = action_obj.search(cursor, user, [ ('id', '=', action_id), ], context=context) if action_id2: action = action_obj.browse(cursor, user, action_id2[0], context=context) return action.action.id return False
fac19fcd48f47126f4b4509097d1358c72492d1d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9266/fac19fcd48f47126f4b4509097d1358c72492d1d/action.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 1128, 67, 350, 12, 2890, 16, 3347, 16, 729, 16, 1301, 67, 350, 16, 819, 33, 7036, 4672, 309, 365, 18, 3072, 12, 9216, 16, 729, 16, 306, 7707, 350, 2187, 15196, 2187, 1301, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1128, 67, 350, 12, 2890, 16, 3347, 16, 729, 16, 1301, 67, 350, 16, 819, 33, 7036, 4672, 309, 365, 18, 3072, 12, 9216, 16, 729, 16, 306, 7707, 350, 2187, 15196, 2187, 1301, ...
result[line.id] = res
result[line.id] = res * div2
def _get_timesheets(self, cr, uid, ids, name, args, context): result = {} for line in self.browse(cr, uid, ids, context): cr.execute(""" SELECT SUM(unit_amount/uom.factor) FROM account_analytic_line acc LEFT JOIN product_uom uom ON (uom.id = acc.product_uom_id) WHERE acc.date>=%s and acc.date<=%s and acc.account_id=%s""", (line.planning_id.date_from, line.planning_id.date_to, line.account_id.id, )) res = cr.fetchall()[0][0] if res: result[line.id] = res else: result[line.id] = 0 return result
ae7597596cba3342d97dcae8ae9e8fa1990f86bd /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/ae7597596cba3342d97dcae8ae9e8fa1990f86bd/report_analytic_planning.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 8293, 10245, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 508, 16, 833, 16, 819, 4672, 563, 273, 2618, 364, 980, 316, 365, 18, 25731, 12, 3353, 16, 4555, 16, 3258, 16, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 8293, 10245, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 508, 16, 833, 16, 819, 4672, 563, 273, 2618, 364, 980, 316, 365, 18, 25731, 12, 3353, 16, 4555, 16, 3258, 16, ...
if type(result) is type(''): result=RDB.File(StringIO(result),brain,self)
if type(result) is type(''): f=StringIO() f.write(result) result=RDB.File(f,brain,self)
def __call__(self, REQUEST=None, __ick__=None, src__=0, **kw):
8e4cda08f82a28d426c6c1cd44b8a471b1de0bc4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/8e4cda08f82a28d426c6c1cd44b8a471b1de0bc4/DA.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 12492, 33, 7036, 16, 1001, 1200, 972, 33, 7036, 16, 1705, 972, 33, 20, 16, 2826, 9987, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 12492, 33, 7036, 16, 1001, 1200, 972, 33, 7036, 16, 1705, 972, 33, 20, 16, 2826, 9987, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
A: Something | C: Else | F: A3 | B: A1 / A2 | D: | : | : | E: | : |
: | A: Something | C: Else | F: A3 | : | B: A1 / A2 | D: | : | : | : | E: | : |
def format_timetable_for_presentation(timetable): """Prepare a timetable for presentation with Page Templates. Returns a matrix where columns correspond to days, rows correspond to periods, and cells contain a dict with two keys 'period' -- the name of this period (different days may have different periods) 'activity' -- activity or activities that occur during that period of a day. First, let us create a timetable: >>> timetable = Timetable(['day 1', 'day 2', 'day 3']) >>> timetable['day 1'] = TimetableDay(['A', 'B']) >>> timetable['day 2'] = TimetableDay(['C', 'D', 'E']) >>> timetable['day 3'] = TimetableDay(['F']) >>> timetable['day 1'].add('A', TimetableActivity('Something')) >>> timetable['day 1'].add('B', TimetableActivity('A2')) >>> timetable['day 1'].add('B', TimetableActivity('A1')) >>> timetable['day 2'].add('C', TimetableActivity('Else')) >>> timetable['day 3'].add('F', TimetableActivity('A3')) Here's how it looks like >>> matrix = format_timetable_for_presentation(timetable) >>> for row in matrix: ... for cell in row: ... print '%(period)1s: %(activity)-11s |' % cell, ... print A: Something | C: Else | F: A3 | B: A1 / A2 | D: | : | : | E: | : | """ rows = [] for ncol, (id, day) in enumerate(timetable.items()): for nrow, (period, actiter) in enumerate(day.items()): activities = [] for a in actiter: activities.append(a.title) activities.sort() if nrow >= len(rows): rows.append([{'period': '', 'activity': ''}] * ncol) rows[nrow].append({'period': period, 'activity': " / ".join(activities)}) for nrow in range(nrow + 1, len(rows)): rows[nrow].append({'period': '', 'activity': ''}) return rows
3b13be7cb768e4ea555da3949e2c430b6c3f8651 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7127/3b13be7cb768e4ea555da3949e2c430b6c3f8651/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 740, 67, 8584, 278, 429, 67, 1884, 67, 10364, 12, 8584, 278, 429, 4672, 3536, 7543, 279, 26668, 429, 364, 22525, 598, 3460, 26212, 18, 225, 2860, 279, 3148, 1625, 2168, 4325, 358, 4681, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 740, 67, 8584, 278, 429, 67, 1884, 67, 10364, 12, 8584, 278, 429, 4672, 3536, 7543, 279, 26668, 429, 364, 22525, 598, 3460, 26212, 18, 225, 2860, 279, 3148, 1625, 2168, 4325, 358, 4681, ...
if mergeDart.edge().flags() & contourProtection:
if mergeDart.edge().flag(CONTOUR_SEGMENT):
def fakedConstrainedDelaunayMap(points, jumpPoints, imageSize, contourProtection = CONTOUR_PROTECTION, onlyInner = True): """See constrainedDelaunayMap, this calculates a DT and throws away outer edges retroactively. This may fail when the DT does not contain all constrained segments, which is checked in this function and leads to an AssertionError.""" print "- performing Delaunay Triangulation (%d points)..." % len(points) nodePositions, edges, sigma = hourglass.delaunay(points) print "- storing result in a GeoMap..." result = _delaunayMapFromData(nodePositions, edges, imageSize, sigma) if not contourProtection: return result print "- ex-post marking of contour edges for faked CDT..." print " (keep your fingers crossed that no segment is missing!)" edgeSourceDarts = [None] * result.maxEdgeLabel() i = 0 while i < len(jumpPoints) - 1: contourStartLabel = jumpPoints[i] + 1 # +1 for conversion of contourEndLabel = jumpPoints[i+1] + 1 # point indices -> node labels dart = result.node(contourStartLabel).anchor() for nodeLabel in range(contourStartLabel+1, contourEndLabel): j = dart.startNode().degree() + 2 while dart.endNodeLabel() != nodeLabel and j > 0: dart.nextSigma() j -= 1 assert j > 0, """Original contour fragment missing in Delauny map! (This is a problem of the fakedConstrainedDelaunayMap, try compiling the triangle module and using the real constrainedDelaunayMap instead.)""" dart.edge().setFlag(contourProtection) edgeSourceDarts[dart.edgeLabel()] = dart.label() dart.nextAlpha() j = dart.startNode().degree() + 1 while dart.endNodeLabel() != contourStartLabel and j > 0: dart.nextSigma() j -= 1 assert j > 0, "Original contour fragment missing in Delauny map!" dart.edge().setFlag(contourProtection) edgeSourceDarts[dart.edgeLabel()] = dart.label() i += 1 if onlyInner: sys.stdout.write("- reducing delaunay triangulation to inner part...") outerFace = [False] * result.maxFaceLabel() for edge in result.edgeIter(): if edge.flags() & contourProtection: dart = result.dart(edgeSourceDarts[edge.label()]) assert dart.edgeLabel() == edge.label(), str(edge) while True: mergeDart = dart.clone().prevSigma() if mergeDart.edge().flags() & contourProtection: break outerFace[result.mergeFaces(mergeDart).label()] = True sys.stdout.write(".") sys.stdout.flush() sys.stdout.write("\n") return result
9780fdb920d074c0946e5e96a8fed5fb752733ff /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/10394/9780fdb920d074c0946e5e96a8fed5fb752733ff/delaunay.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 284, 9477, 442, 31142, 2837, 69, 318, 528, 863, 12, 4139, 16, 11833, 5636, 16, 29344, 16, 15332, 16938, 273, 3492, 4296, 1099, 67, 3373, 1448, 3106, 16, 1338, 2857, 273, 1053, 4672, 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, 284, 9477, 442, 31142, 2837, 69, 318, 528, 863, 12, 4139, 16, 11833, 5636, 16, 29344, 16, 15332, 16938, 273, 3492, 4296, 1099, 67, 3373, 1448, 3106, 16, 1338, 2857, 273, 1053, 4672, 225,...
output = filter(lambda x:x, split(output, '\n'))
output = [x for x in output.split('\n') if x]
def VerifyPackage(self, entry, modlist=[]): if self.installed.has_key(entry.attrib['name']): if self.installed[entry.attrib['name']] == entry.attrib['version']: if not self.setup['quick']: cmd = Popen4("debsums -s %s"%(entry.attrib['name'])) cstat = cmd.poll() output = cmd.fromchild.read() while cstat == -1: output += cmd.fromchild.read() cstat = cmd.poll() output = filter(lambda x:x, split(output, '\n')) if [x for x in output if x not in modlist]: return False return True return False
47a54440f26f6dc5903e304284a1116ab32aa1c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11867/47a54440f26f6dc5903e304284a1116ab32aa1c3/Debian.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8553, 2261, 12, 2890, 16, 1241, 16, 681, 1098, 33, 8526, 4672, 309, 365, 18, 13435, 18, 5332, 67, 856, 12, 4099, 18, 14588, 3292, 529, 3546, 4672, 309, 365, 18, 13435, 63, 4099, 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, 8553, 2261, 12, 2890, 16, 1241, 16, 681, 1098, 33, 8526, 4672, 309, 365, 18, 13435, 18, 5332, 67, 856, 12, 4099, 18, 14588, 3292, 529, 3546, 4672, 309, 365, 18, 13435, 63, 4099, 18, ...
mul1s rax, reg mulel rax muleh ah, flags=(OF,CF)
mul1s rax, reg, flags=(OF,CF) mulel rax muleh ah
def macroop IMUL_B_R
b64d0bdeda1662091746c3695b4429fcc6f69342 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6787/b64d0bdeda1662091746c3695b4429fcc6f69342/multiply_and_divide.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11522, 556, 6246, 1506, 67, 38, 67, 54, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11522, 556, 6246, 1506, 67, 38, 67, 54, 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, ...
pix = Store.app.request( 'pixmap', name=self.font_decorations_to_names[i])
pix = Store.app.request( 'pixmap', name=i)
def __init__( self, master, buttons=('interpret','asis'), **kw): Frame.__init__( self, master, **kw) self.text = '' self.interpret = 1 self.editPool = Entry( self, width=50, state='disabled', font="Helvetica 12") self.editPool.pack( side='left')
ae27aafb868cf9b89b6cf27a043731c7122e555b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4298/ae27aafb868cf9b89b6cf27a043731c7122e555b/edit_pool.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 365, 16, 4171, 16, 9502, 33, 2668, 24713, 17023, 17247, 19899, 2826, 9987, 4672, 8058, 16186, 2738, 972, 12, 365, 16, 4171, 16, 2826, 9987, 13, 365, 18, 955, 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, 1001, 2738, 972, 12, 365, 16, 4171, 16, 9502, 33, 2668, 24713, 17023, 17247, 19899, 2826, 9987, 4672, 8058, 16186, 2738, 972, 12, 365, 16, 4171, 16, 2826, 9987, 13, 365, 18, 955, 273, ...
prevIterPoint = p.point(atleast_1d(T(copy(x0)))) bestPoint = prevIterPoint prevIter_best_ls_point = prevIterPoint previter_pointForDilation = prevIterPoint g = prevIterPoint.__getDirection__(self.approach)
bestPoint = p.point(atleast_1d(T(copy(x0)))) prevIter_best_ls_point = bestPoint previter_pointForDilation = bestPoint g = bestPoint.__getDirection__(self.approach)
def restoreProb(): p.Aeq, p.beq, p.nbeq = Aeq_r, beq_r, nbeq_r #if nEQ != 0: restore lb, ub
26845e7bdedc47100b28276b20c816ac82b36a68 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6196/26845e7bdedc47100b28276b20c816ac82b36a68/ralg_oo.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5217, 9152, 13332, 293, 18, 37, 11253, 16, 293, 18, 2196, 85, 16, 293, 18, 82, 2196, 85, 273, 432, 11253, 67, 86, 16, 506, 85, 67, 86, 16, 290, 2196, 85, 67, 86, 468, 430, 290, 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, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5217, 9152, 13332, 293, 18, 37, 11253, 16, 293, 18, 2196, 85, 16, 293, 18, 82, 2196, 85, 273, 432, 11253, 67, 86, 16, 506, 85, 67, 86, 16, 290, 2196, 85, 67, 86, 468, 430, 290, 2...