rem
stringlengths
1
226k
add
stringlengths
0
227k
context
stringlengths
6
326k
meta
stringlengths
143
403
input_ids
listlengths
256
256
attention_mask
listlengths
256
256
labels
listlengths
128
128
if (self.getFile(remoteDir + self.dirSlash + f, os.path.join(localDir, f)) == None):
if (self.getFile(remoteDir + '/' + f, os.path.join(localDir, f)) == None):
def getDirectory(self, remoteDir, localDir): if (self.debug >= 2): print "getting files in '" + remoteDir + "'" filelist = self.listFiles(remoteDir) if (filelist == None): return None if (self.debug >= 3): print filelist if not os.path.exists(localDir): os.makedirs(localDir) #TODO: is this a comprehensive file regex? isFile = re.compile('^([a-zA-Z0-9_\-\. ]+)\.([a-zA-Z0-9]+)$') for f in filelist: if (isFile.match(f)): if (self.getFile(remoteDir + self.dirSlash + f, os.path.join(localDir, f)) == None): return None else: if (self.getDirectory(remoteDir + self.dirSlash + f, os.path.join(localDir, f)) == None): return None
fd9e385f2805e09156e5ef3c1f5d56e976bc2bf6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12156/fd9e385f2805e09156e5ef3c1f5d56e976bc2bf6/devicemanager.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 19831, 12, 2890, 16, 2632, 1621, 16, 1191, 1621, 4672, 309, 261, 2890, 18, 4148, 1545, 576, 4672, 1172, 315, 588, 1787, 1390, 316, 2119, 397, 2632, 1621, 397, 5862, 26204, 273, 365, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 19831, 12, 2890, 16, 2632, 1621, 16, 1191, 1621, 4672, 309, 261, 2890, 18, 4148, 1545, 576, 4672, 1172, 315, 588, 1787, 1390, 316, 2119, 397, 2632, 1621, 397, 5862, 26204, 273, 365, 18, ...
print "AUCTION DATE FIELDS",auc_dates_fields print "AUCTION ID VALUE PRINT",ad_id[0] print 'QUERY :: select * from auction_buyer_taxes_rel abr,auction_dates ad where ad.id=abr.auction_id and ad.id=%d'%(ad_id[0],)
def lines_lots_from_auction(self,objects):
f7fe6d3651bfb6c2fc8e5eb570200e60bc2d7b6d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7339/f7fe6d3651bfb6c2fc8e5eb570200e60bc2d7b6d/buyer_list.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2362, 67, 80, 6968, 67, 2080, 67, 69, 4062, 12, 2890, 16, 6911, 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, ...
[ 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, 2362, 67, 80, 6968, 67, 2080, 67, 69, 4062, 12, 2890, 16, 6911, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
window.location.replace('/');o
window.location.replace('/');
def notebook_lib(): s= r"""
d7e50ff263e478bb259fa48e10c164611e3e15dc /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/d7e50ff263e478bb259fa48e10c164611e3e15dc/js.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14718, 67, 2941, 13332, 272, 33, 436, 8395, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14718, 67, 2941, 13332, 272, 33, 436, 8395, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
modes.extend(generics)
def scanURL(cls, url, metadata): """Scan for url filename match. Determine if the pathname matches some pattern that can identify the corresponding major mode.
6e81b1b78258e8557f7823271a093b0b588f3e79 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11522/6e81b1b78258e8557f7823271a093b0b588f3e79/majormodematcher.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4135, 1785, 12, 6429, 16, 880, 16, 1982, 4672, 3536, 7972, 364, 880, 1544, 845, 18, 225, 10229, 309, 326, 9806, 1885, 2690, 1936, 716, 848, 9786, 326, 4656, 7888, 1965, 18, 2, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4135, 1785, 12, 6429, 16, 880, 16, 1982, 4672, 3536, 7972, 364, 880, 1544, 845, 18, 225, 10229, 309, 326, 9806, 1885, 2690, 1936, 716, 848, 9786, 326, 4656, 7888, 1965, 18, 2, -100, -1...
for fileID in migratedFiles:
for fileID in allMigrated:
def __updateMigrationAccounting(self,se,migratedFiles,migratingFiles,mismatchingFiles,assumedEndTime,previousMonitorTime): """ Create accounting messages for the overall throughput observed and the total migration time for the files """ gMonitor.addMark("MigratedFiles%s" % se,len(migratedFiles)) gMonitor.addMark("TotalMigratedFiles%s" % se,len(migratedFiles)) lfnFileID = {} for fileID in migratedFiles: sizesToObtain = [] if not migratingFiles[fileID]['Size']: lfn = migratingFiles[fileID]['LFN'] sizesToObtain.append(lfn) lfnFileID[lfn] = fileID if sizesToObtain: res = self.ReplicaManager.getCatalogFileSize(sizesToObtain) if not res['OK']: gLogger.error("[%s] __updateMigrationAccounting: Failed to obtain file sizes" % se) return res for lfn,error in res['Value']['Failed'].items(): gLogger.error("[%s] __updateAccounting: Failed to get file size" % se,"%s %s" % (lfn,error)) migratingFiles[lfnFileID[lfn]]['Size'] = 0 for lfn,size in res['Value']['Successful'].items(): migratingFiles[lfnFileID[lfn]]['Size'] = size totalSize = 0 for fileID in migratedFiles: size = migratingFiles[fileID]['Size'] totalSize += size st = time.strptime(migratingFiles[fileID]['SubmitTime'], "%a %b %d %H:%M:%S %Y") submitTime = datetime(st[0],st[1],st[2],st[3],st[4],st[5],st[6],None) timeDiff = submitTime-assumedEndTime migrationTime = (timeDiff.days * 86400) + (timeDiff.seconds) + (timeDiff.microseconds/1000000.0) gMonitor.addMark("MigrationTime%s" % se,migrationTime) gDataStoreClient.addRegister(self.__initialiseAccountingObject('MigrationTime', se, submitTime, assumedEndTime, size)) gDataStoreClient.addRegister(self.__initialiseAccountingObject('MigrationThroughput', se, previousMonitorTime, assumedEndTime, size)) oDataOperation = self.__initialiseAccountingObject('MigrationSuccess', se, submitTime, assumedEndTime, size) if fileID in mismatchingFiles: oDataOperation.setValueByKey('TransferOK',0) oDataOperation.setValueByKey('FinalStatus','Failed') gDataStoreClient.addRegister(oDataOperation) gMonitor.addMark("TotalMigratedSize%s" % se,totalSize) gMonitor.addMark("ChecksumMismatches%s" % se,len(mismatchingFiles)) gMonitor.addMark("TotalChecksumMismatches%s" % se,len(mismatchingFiles)) gMonitor.addMark("ChecksumMatches%s" % se,(len(migratedFiles)-len(mismatchingFiles))) gMonitor.addMark("TotalChecksumMatches%s" % se,(len(migratedFiles)-len(mismatchingFiles))) gLogger.info('[%s] __updateMigrationAccounting: Attempting to send accounting message...' % se) return gDataStoreClient.commit()
4f91556b86199dede4b08bee27f08eea5a1de278 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12864/4f91556b86199dede4b08bee27f08eea5a1de278/MigrationMonitoringAgent.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2725, 10224, 3032, 310, 12, 2890, 16, 307, 16, 81, 2757, 690, 2697, 16, 81, 2757, 1776, 2697, 16, 11173, 16271, 2697, 16, 428, 379, 329, 25255, 16, 11515, 7187, 950, 4672, 3536, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2725, 10224, 3032, 310, 12, 2890, 16, 307, 16, 81, 2757, 690, 2697, 16, 81, 2757, 1776, 2697, 16, 11173, 16271, 2697, 16, 428, 379, 329, 25255, 16, 11515, 7187, 950, 4672, 3536, ...
def get_memdump(self, address, move_idx):
def _get_memdump(self, address, move_idx):
def get_memdump(self, address, move_idx): linewidth = 16 screenful = self.lines*linewidth # no move, left/right, up/down, page up/down (no overlap) offsets = [0, 2, linewidth, screenful] offset = offsets[abs(move_idx)] if move_idx < 0: address -= offset else: address += offset self.set_clamped(address, address+screenful) self.hatari.debug_command("m %06x-%06x" % (self.first, self.last)) # get & set debugger command results output = self.hatari.get_lines(self.debug_output) self.second = address + linewidth return output
0e0984f57cbf375cc2813fe0509dc8425a475afc /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2811/0e0984f57cbf375cc2813fe0509dc8425a475afc/debugui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 3917, 8481, 12, 2890, 16, 1758, 16, 3635, 67, 3465, 4672, 18795, 273, 2872, 5518, 2706, 273, 365, 18, 3548, 14, 7511, 14434, 468, 1158, 3635, 16, 2002, 19, 4083, 16, 731,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3917, 8481, 12, 2890, 16, 1758, 16, 3635, 67, 3465, 4672, 18795, 273, 2872, 5518, 2706, 273, 365, 18, 3548, 14, 7511, 14434, 468, 1158, 3635, 16, 2002, 19, 4083, 16, 731,...
for i in range(len(test_records)): for ns in self.nameservers.enabled: (request_type, hostname) = shuffled_records[ns][i] input_queue.put((ns, request_type, hostname)) results_queue = self._LaunchBenchmarkThreads(input_queue) errors = [] while results_queue.qsize(): (ns, request_type, hostname, response, duration, error_msg) = results_queue.get() if error_msg: duration = ns.timeout * 1000 errors.append((ns, error_msg)) results[ns].append((hostname, request_type, duration, response, error_msg)) for (ns, error_msg) in errors: self.msg("Error querying %s: %s" % (ns, error_msg))
results_queue = self._LaunchBenchmarkThreads(input_queue) errors = [] while results_queue.qsize(): (ns, request_type, hostname, response, duration, error_msg) = results_queue.get() if error_msg: duration = ns.timeout * 1000 errors.append((ns, error_msg)) results.setdefault(ns, []).append((hostname, request_type, duration, response, error_msg)) for (ns, error_msg) in errors: self.msg("Error querying %s: %s" % (ns, error_msg))
def _SingleTestRun(self, test_records): """Manage and execute a single test-run on all nameservers.
2c42206e842762b2e00f9dd574e3b673ee0d2469 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4170/2c42206e842762b2e00f9dd574e3b673ee0d2469/benchmark.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5281, 4709, 1997, 12, 2890, 16, 1842, 67, 7094, 4672, 3536, 21258, 471, 1836, 279, 2202, 1842, 17, 2681, 603, 777, 1257, 29638, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5281, 4709, 1997, 12, 2890, 16, 1842, 67, 7094, 4672, 3536, 21258, 471, 1836, 279, 2202, 1842, 17, 2681, 603, 777, 1257, 29638, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100...
while req.hdf.get('links.%s.%d.href' % (rel, idx)):
while req.hdf.get('chrome.links.%s.%d.href' % (rel, idx)):
def add_link(req, rel, href, title=None, type=None, class_name=None): link = {'href': escape(href)} if title: link['title'] = escape(title) if type: link['type'] = type if class_name: link['class'] = class_name idx = 0 while req.hdf.get('links.%s.%d.href' % (rel, idx)): idx += 1 req.hdf['links.%s.%d' % (rel, idx)] = link
957a6635bde1e02889bd20b6bd9831dc7e50b057 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2831/957a6635bde1e02889bd20b6bd9831dc7e50b057/chrome.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 1232, 12, 3658, 16, 1279, 16, 3897, 16, 2077, 33, 7036, 16, 618, 33, 7036, 16, 667, 67, 529, 33, 7036, 4672, 1692, 273, 13666, 7547, 4278, 4114, 12, 7547, 16869, 309, 2077, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 1232, 12, 3658, 16, 1279, 16, 3897, 16, 2077, 33, 7036, 16, 618, 33, 7036, 16, 667, 67, 529, 33, 7036, 4672, 1692, 273, 13666, 7547, 4278, 4114, 12, 7547, 16869, 309, 2077, ...
def processComment(self, data): self.parser.document.appendChild(CommentNode(data))
def processEndTag(self, name): self.insertHtmlElement() self.parser.phase.processEndTag(name)
22ba9dab3834147341a8aa3162fe6c07a00e7dcb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10463/22ba9dab3834147341a8aa3162fe6c07a00e7dcb/parser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 25633, 12, 2890, 16, 508, 4672, 365, 18, 6387, 4353, 1046, 1435, 365, 18, 4288, 18, 13961, 18, 2567, 25633, 12, 529, 13, 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, 1207, 25633, 12, 2890, 16, 508, 4672, 365, 18, 6387, 4353, 1046, 1435, 365, 18, 4288, 18, 13961, 18, 2567, 25633, 12, 529, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
0:"calls", 1:"time", 2: "cumulative" } [ field[0] ] ]
0: "calls", 1: "time", 2: "cumulative"}[field[0]] ]
def sort_stats(self, *field): if not field: self.fcn_list = 0 return self if len(field) == 1 and type(field[0]) == type(1): # Be compatible with old profiler field = [ {-1: "stdname", 0:"calls", 1:"time", 2: "cumulative" } [ field[0] ] ]
1076eed9bee3b873e1cb1bcca42f40854ecd9db4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3187/1076eed9bee3b873e1cb1bcca42f40854ecd9db4/pstats.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1524, 67, 5296, 12, 2890, 16, 380, 1518, 4672, 309, 486, 652, 30, 365, 18, 7142, 82, 67, 1098, 273, 374, 327, 365, 309, 562, 12, 1518, 13, 422, 404, 471, 618, 12, 1518, 63, 20, 571...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1524, 67, 5296, 12, 2890, 16, 380, 1518, 4672, 309, 486, 652, 30, 365, 18, 7142, 82, 67, 1098, 273, 374, 327, 365, 309, 562, 12, 1518, 13, 422, 404, 471, 618, 12, 1518, 63, 20, 571...
if self.out_buffer.getvalue():
if self.out_buffer.getvalue() and not self.__write_nf:
def close(self): if self.closed: return self.closed = True if self.out_buffer.getvalue(): # if need no more sending: self.__close()
76c4d9fa934bbdef143116571773fdae3c8a08c5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/76c4d9fa934bbdef143116571773fdae3c8a08c5/fsocket.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1746, 12, 2890, 4672, 309, 365, 18, 12204, 30, 327, 365, 18, 12204, 273, 1053, 309, 365, 18, 659, 67, 4106, 18, 588, 1132, 1435, 471, 486, 365, 16186, 2626, 67, 82, 74, 30, 468, 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, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1746, 12, 2890, 4672, 309, 365, 18, 12204, 30, 327, 365, 18, 12204, 273, 1053, 309, 365, 18, 659, 67, 4106, 18, 588, 1132, 1435, 471, 486, 365, 16186, 2626, 67, 82, 74, 30, 468, 309,...
self.body.append( '\\includegraphics%s{%s}' % ( options, attrs['uri'] ) ) self.body.extend( post )
self.body.append('\\includegraphics%s{%s}' % (options, attrs['uri'])) self.body.extend(post)
def visit_image(self, node): self.requirements['graphicx'] = self.graphicx_package attrs = node.attributes # Add image URI to dependency list, assuming that it's # referring to a local file. self.settings.record_dependencies.add(attrs['uri']) pre = [] # in reverse order post = [] include_graphics_options = [] inline = isinstance(node.parent, nodes.TextElement) align_prepost = { # key == (<inline>, <align>) # By default latex aligns the bottom of an image. (1, 'bottom'): ('', ''), (1, 'middle'): ('\\raisebox{-0.5\\height}{', '}'), (1, 'top'): ('\\raisebox{-\\height}{', '}'), (0, 'center'): ('{\\hfill', '\\hfill}'), # According to the HTML standard # http://www.w3.org/TR/html4/struct/objects.html#adef-align-IMG # the image should be floated alongside the paragraph. # However, this is not even honoured by all HTML browsers. (0, 'left'): ('{', '\\hfill}'), (0, 'right'): ('{\\hfill', '}'),} if 'scale' in attrs: # Could also be done with ``scale`` option to # ``\includegraphics``; doing it this way for consistency. pre.append('\\scalebox{%f}{' % (attrs['scale'] / 100.0,)) post.append('}') if 'width' in attrs: include_graphics_options.append('width=%s' % ( self.latex_image_length(attrs['width']), )) if 'height' in attrs: include_graphics_options.append('height=%s' % ( self.latex_image_length(attrs['height']), )) if 'align' in attrs: try: pre.append(align_prepost[inline, attrs['align']][0]) post.append(align_prepost[inline, attrs['align']][1]) except KeyError: pass # XXX complain here? if not inline: pre.append('\n') post.append('\n') pre.reverse() self.body.extend( pre ) options = '' if len(include_graphics_options)>0: options = '[%s]' % (','.join(include_graphics_options)) self.body.append( '\\includegraphics%s{%s}' % ( options, attrs['uri'] ) ) self.body.extend( post )
fb3336a6d5cf7ea080d0ead3a5384f168a9030c0 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1278/fb3336a6d5cf7ea080d0ead3a5384f168a9030c0/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3757, 67, 2730, 12, 2890, 16, 756, 4672, 365, 18, 16175, 3292, 4660, 335, 92, 3546, 273, 365, 18, 4660, 335, 92, 67, 5610, 3422, 273, 756, 18, 4350, 468, 1436, 1316, 3699, 358, 4904, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3757, 67, 2730, 12, 2890, 16, 756, 4672, 365, 18, 16175, 3292, 4660, 335, 92, 3546, 273, 365, 18, 4660, 335, 92, 67, 5610, 3422, 273, 756, 18, 4350, 468, 1436, 1316, 3699, 358, 4904, ...
> <doctest foo-bär@baz[1]>(1)<module>()->None
> <doctest foo-bär@baz[2]>(1)<module>()->None
def test_pdb_set_trace(): """Using pdb.set_trace from a doctest. You can use pdb.set_trace from a doctest. To do so, you must retrieve the set_trace function from the pdb module at the time you use it. The doctest module changes sys.stdout so that it can capture program output. It also temporarily replaces pdb.set_trace with a version that restores stdout. This is necessary for you to see debugger output. >>> doc = ''' ... >>> x = 42 ... >>> import pdb; pdb.set_trace() ... ''' >>> parser = doctest.DocTestParser() >>> test = parser.get_doctest(doc, {}, "foo-bär@baz", "foo-bär@baz.py", 0) >>> runner = doctest.DocTestRunner(verbose=False) To demonstrate this, we'll create a fake standard input that captures our debugger input: >>> import tempfile >>> real_stdin = sys.stdin >>> sys.stdin = _FakeInput([ ... 'print(x)', # print data defined by the example ... 'continue', # stop debugging ... '']) >>> try: runner.run(test) ... finally: sys.stdin = real_stdin --Return-- > <doctest foo-bär@baz[1]>(1)<module>()->None -> import pdb; pdb.set_trace() (Pdb) print(x) 42 (Pdb) continue TestResults(failed=0, attempted=2) You can also put pdb.set_trace in a function called from a test: >>> def calls_set_trace(): ... y=2 ... import pdb; pdb.set_trace() >>> doc = ''' ... >>> x=1 ... >>> calls_set_trace() ... ''' >>> test = parser.get_doctest(doc, globals(), "foo-bär@baz", "foo-bär@baz.py", 0) >>> real_stdin = sys.stdin >>> sys.stdin = _FakeInput([ ... 'print(y)', # print data defined in the function ... 'up', # out of function ... 'print(x)', # print data defined by the example ... 'continue', # stop debugging ... '']) >>> try: ... runner.run(test) ... finally: ... sys.stdin = real_stdin --Return-- > <doctest test.test_doctest.test_pdb_set_trace[8]>(3)calls_set_trace()->None -> import pdb; pdb.set_trace() (Pdb) print(y) 2 (Pdb) up > <doctest foo-bär@baz[1]>(1)<module>() -> calls_set_trace() (Pdb) print(x) 1 (Pdb) continue TestResults(failed=0, attempted=2) During interactive debugging, source code is shown, even for doctest examples: >>> doc = ''' ... >>> def f(x): ... ... g(x*2) ... >>> def g(x): ... ... print(x+3) ... ... import pdb; pdb.set_trace() ... >>> f(3) ... ''' >>> test = parser.get_doctest(doc, globals(), "foo-bär@baz", "foo-bär@baz.py", 0) >>> real_stdin = sys.stdin >>> sys.stdin = _FakeInput([ ... 'list', # list source from example 2 ... 'next', # return from g() ... 'list', # list source from example 1 ... 'next', # return from f() ... 'list', # list source from example 3 ... 'continue', # stop debugging ... '']) >>> try: runner.run(test) ... finally: sys.stdin = real_stdin ... # doctest: +NORMALIZE_WHITESPACE --Return-- > <doctest foo-bär@baz[1]>(3)g()->None -> import pdb; pdb.set_trace() (Pdb) list 1 def g(x): 2 print(x+3) 3 -> import pdb; pdb.set_trace() [EOF] (Pdb) next --Return-- > <doctest foo-bär@baz[0]>(2)f()->None -> g(x*2) (Pdb) list 1 def f(x): 2 -> g(x*2) [EOF] (Pdb) next --Return-- > <doctest foo-bär@baz[2]>(1)<module>()->None -> f(3) (Pdb) list 1 -> f(3) [EOF] (Pdb) continue ********************************************************************** File "foo-bär@baz.py", line 7, in foo-bär@baz Failed example: f(3) Expected nothing Got: 9 TestResults(failed=1, attempted=3) """
35049443dc2c3e51959700aa8c5359c5ce12663e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8546/35049443dc2c3e51959700aa8c5359c5ce12663e/test_doctest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 17414, 67, 542, 67, 5129, 13332, 3536, 7736, 10892, 18, 542, 67, 5129, 628, 279, 31263, 395, 18, 225, 4554, 848, 999, 10892, 18, 542, 67, 5129, 628, 279, 31263, 395, 18, 225,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 17414, 67, 542, 67, 5129, 13332, 3536, 7736, 10892, 18, 542, 67, 5129, 628, 279, 31263, 395, 18, 225, 4554, 848, 999, 10892, 18, 542, 67, 5129, 628, 279, 31263, 395, 18, 225,...
if globalvar.force:
if globalvar.force or globalvar.cleanup:
def replaceLinks(self, page, newPages, bot): """ Returns True if saving was successful. """ if globalvar.localonly: # In this case only continue on the Page we started with if page != self.originPage: raise SaveError
2d64cf4a614d7554015d47d72f408789906c793c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4404/2d64cf4a614d7554015d47d72f408789906c793c/interwiki.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1453, 7100, 12, 2890, 16, 1363, 16, 394, 5716, 16, 2512, 4672, 3536, 2860, 1053, 309, 12392, 1703, 6873, 18, 3536, 309, 2552, 1401, 18, 3729, 3700, 30, 468, 657, 333, 648, 1338, 1324, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1453, 7100, 12, 2890, 16, 1363, 16, 394, 5716, 16, 2512, 4672, 3536, 2860, 1053, 309, 12392, 1703, 6873, 18, 3536, 309, 2552, 1401, 18, 3729, 3700, 30, 468, 657, 333, 648, 1338, 1324, ...
p = subprocess.Popen (cmdl, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
p = subprocess.Popen (cmdl, close_fds=True, stdin=subprocess.PIPE, \ stdout=subprocess.PIPE, stderr=subprocess.PIPE)
def PlayStart (self, fi): try: cmdl = self.BuildCmdline (fi [2]) if not cmdl: self.ConvertStop (fi, self._Error) return False
e6c1d8b8aa1eeead3142f41f1d3380b7665838c0 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2524/e6c1d8b8aa1eeead3142f41f1d3380b7665838c0/gui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 19592, 1685, 261, 2890, 16, 7314, 4672, 775, 30, 1797, 80, 273, 365, 18, 3116, 5931, 1369, 261, 22056, 306, 22, 5717, 309, 486, 1797, 80, 30, 365, 18, 2723, 4947, 261, 22056, 16, 365, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 19592, 1685, 261, 2890, 16, 7314, 4672, 775, 30, 1797, 80, 273, 365, 18, 3116, 5931, 1369, 261, 22056, 306, 22, 5717, 309, 486, 1797, 80, 30, 365, 18, 2723, 4947, 261, 22056, 16, 365, ...
debug("imgNames: %s" % imgNames)
debug("images with same checksum: %s" % imgNames)
def process(userData, kind_id, argv): """ Execute system call then updates the database consequently. exit_code != 0 means problem. """ user_id = userData['UserID'] kind = userData['Kind'] # Log file to store storeLog = '_condor_stderr' success = 0 db = DB(host = DATABASE_HOST, user = DATABASE_USER, passwd = DATABASE_PASSWORD, db = DATABASE_NAME) g = DBGeneric(db.con) start = getNowDateTime(time.time()) (imgName, task_id, g) = task_start_log(userData, start, kind_id) ################### PRE-PROCESSING STUFF GOES HERE ######################################## # Automatic .head (or .ahead for Scamp) file generation if kind == 'fitsin': #image name from commandline argv splittedArgs = argv[len(argv) - 1].split('/') nameFromDB = splittedArgs[len(splittedArgs) -1][:-5] debug("nameFromDB: %s" % nameFromDB) imgChecksum = g.execute("SELECT checksum FROM youpi_image WHERE name='%s'" % nameFromDB)[0][0] debug("imgChecksum: %s" % imgChecksum) imgNames = g.execute("SELECT name FROM youpi_image WHERE checksum='%s'" % imgChecksum)[0] debug("imgNames: %s" % imgNames) litename = nameFromDB for imgName in imgNames: if len(imgName) < len(litename): litename = imgName debug("litename: %s" % litename) argv[len(argv) - 1] = argv[len(argv) -1].replace(nameFromDB,litename) debug("NEWargv: %s" % argv) if userData['HandleHeadOption']: try: from genimgdothead import genImageDotHead img_id = userData['ImgID'] data, lenght, missing = genImageDotHead(int(img_id)) if len(data): headname = litename + '.head' f = open(headname, 'w') for i in range(lenght): for k, v in data.iteritems(): f.write("%s = %s\n" % (k, v)) f.write("END\n") f.close() debug("Generated: %s" % headname) except Exception, e: debug("Error during automatic .head file generation: %s" % e) for a in argv: if (a == '--head'): argv[argv.index(a) + 1] = argv[argv.index(a) + 1].replace(nameFromDB, litename) # Other preprocessing stuff if kind == 'sex': img_id = userData['ImgID'] imgName = g.execute("SELECT name FROM youpi_image WHERE id='%s'" % img_id)[0][0] os.mkdir(imgName) os.chmod(imgName, RWX_ALL) os.system("mv sex-config* sex-param* *.conv *.nnw %s" %(imgName)) os.chdir(imgName) # FIXME: remove this code that won't get executed at all since the files are not yet # transferred... (see Swarp plugin code for a fix) fzs = glob.glob('*.fits.fz') for fz in fzs: debug("Sextractor Preprocessing: uncompressing %s" % fz) os.system("%s %s %s" % (CMD_IMCOPY, fz, fz[:-3])) elif kind == 'fitsin': flatname = g.execute("SELECT flat FROM youpi_image WHERE id=%s" % userData['ImgID'])[0][0] if userData['ExitIfFlatMissing']: # Check for flat file flatFile = os.path.join(userData['Flat'], flatname) if not os.path.exists(flatFile): exit_code = 1 success = 0 debug("Error: FLAT file %s has not been found (and you asked Youpi to halt in this case)" % flatFile) debug("Exiting now...") task_end_log(userData, g, storeLog, task_id, success, kind) debug("Exited (code %d)" % exit_code) sys.exit(exit_code) else: debug("Found FLAT file: %s" % flatFile) else: debug("No check for FLAT image %s existence (checkbox was unchecked)" % flatname) ################### END OF PRE-PROCESSING ################################################ # Execute process, waiting for completion cmd_line = string.join(argv, ' ') debug("Executing command line: %s\n" % cmd_line) try: exit_code = os.system(cmd_line) except: pass debug("Command line execution terminated (code %d)" % exit_code) ################### POST-PROCESSING STUFF GOES HERE ######################################## debug("Beginning post-processing operations") # QualityFITS-In processing if kind == 'fitsin': if exit_code == 0: time.sleep(2) data = os.popen('ls */*/.finished 2>&1') done = data.readlines() data.close() if len(done): # QF was successful success = 1 else: storeLog = '_condor_stdout' # Stores results of QF into DB when successful (stores at least flat, mask, reg paths and QF config content) try: g.setTableName('youpi_plugin_fitsin') g.insert( task_id = int(task_id), flat = userData['Flat'], mask = userData['Mask'], reg = userData['Reg'], exitIfFlatMissing = userData['ExitIfFlatMissing'], handleHeadOption = userData['HandleHeadOption'], # # QF config file serialization: base64 encoding over zlib compression # To retreive data: zlib.decompress(base64.decodestring(encoded_data)) # qfconfig = base64.encodestring(zlib.compress(string.join(open(os.path.basename(userData['ConfigFile']), 'r').readlines(), ''), 9)).replace('\n', ''), www = os.path.join( WWW_FITSIN_PREFIX, username, userData['Kind'], userData['ResultsOutputDir'][userData['ResultsOutputDir'].find(userData['Kind'])+len(userData['Kind'])+1:], imgName, 'qualityFITS' ) + '/' ) fitsin_id = g.con.insert_id() # Now results ingestion takes place ingestQFitsInResults(fitsin_id, g) except Exception, e: raise WrapperError, e elif kind == 'scamp': if exit_code == 0: # FIXME: look for scamp.xml; parse it and look for errors in it success = 1 configContent = open(os.path.basename(userData['ConfigFile']), 'r').readlines() try: if HAS_CONVERT: convert = 1 else: convert = 0 debug("[Warning] convert utility not found. No thumbnails will be generated") g.setTableName('youpi_plugin_scamp') g.insert( task_id = int(task_id), # # Scamp config file serialization: base64 encoding over zlib compression # config = base64.encodestring(zlib.compress(string.join(configContent, ''), 9)).replace('\n', ''), ldac_files = base64.encodestring(marshal.dumps(userData['LDACFiles'])).replace('\n', ''), www = os.path.join( WWW_SCAMP_PREFIX, username, userData['Kind'], userData['ResultsOutputDir'][userData['ResultsOutputDir'].find(userData['Kind'])+len(userData['Kind'])+1:] ), thumbnails = convert, aheadPath = userData['AheadPath'] ) scamp_id = g.con.insert_id() except Exception, e: raise WrapperError, e # Copy XSL stylesheet try: xslPath = re.search(r'file://(.*)$', getConfigValue(configContent, 'XSL_URL')) if xslPath: copyFileChmodAll(xslPath.group(1), userData['ResultsOutputDir']) except TypeError, e: # No custom XSL_URL value pass # Create thumbnails for group #1, if convert cmd available if HAS_CONVERT: debug("Creating image thumbnails for group #1") olds = glob.glob(os.path.join(userData['ResultsOutputDir'], 'tn_*.png')) for old in olds: os.remove(old) pngs = glob.glob(os.path.join(userData['ResultsOutputDir'], '*_1.png')) for png in pngs: os.system("%s %s %s" % (CMD_CONVERT_THUMB, # Source png, # Destination os.path.join(os.path.dirname(png), 'tn_' + os.path.basename(png)))) elif kind == 'sex': if exit_code == 0: success = 1 configContent = open(os.path.basename(userData['ConfigFile']), 'r').readlines() try: if HAS_CONVERT: convert = 1 else: convert = 0 debug("[Warning] convert utility not found. No thumbnails will be generated") g.setTableName('youpi_plugin_sex') g.insert( task_id = int(task_id), weightPath = userData['Weight'], flagPath = userData['Flag'], psfPath = userData['Psf'], dualMode = userData['DualMode'], dualImage = userData['DualImage'], dualweightPath = userData['DualWeight'], dualflagPath = userData['DualFlag'], # # Sex config file serialization: base64 encoding over zlib compression # config = base64.encodestring(zlib.compress(string.join(configContent, ''), 9)).replace('\n', ''), param = base64.encodestring(zlib.compress(string.join(open(os.path.basename(userData['ParamFile']), 'r').readlines(), ''), 9)).replace('\n', ''), www = os.path.join( WWW_SEX_PREFIX, username, userData['Kind'], userData['ResultsOutputDir'][userData['ResultsOutputDir'].find(userData['Kind'])+len(userData['Kind'])+1:]) + '/', thumbnails = convert, ) sex_id = g.con.insert_id() except Exception, e: raise WrapperError, e # Copy XSL stylesheet try: xslPath = re.search(r'file://(.*)$', getConfigValue(configContent, 'XSL_URL')) if xslPath: copyFileChmodAll(xslPath.group(1), userData['ResultsOutputDir']) except TypeError, e: # No custom XSL_URL value pass # Gets image name motif = "CHECKIMAGE_NAME" path_cf = userData['ConfigFile'] cfile = path_cf.split('/')[2] f = open(cfile,'r') for ligne in f : if motif in ligne: m = re.findall(r'(\w+\.fits)', ligne) f.close() for current in m: name = current.split('.') cur = name[0] if (os.path.exists(cur +'.fits')): os.system(CMD_SWARP + " %s -SUBTRACT_BACK N -WRITE_XML N -PIXELSCALE_TYPE MANUAL -PIXEL_SCALE 4.0 -RESAMPLING_TYPE BILINEAR -IMAGEOUT_NAME %s" % (cur + '.fits', os.path.join(userData['ResultsOutputDir'], 'temp.fits'))) # Converts produced FITS image into PNG format tiff = os.path.join(userData['ResultsOutputDir'], cur + '.tif') os.system("%s %s -OUTFILE_NAME %s 2>/dev/null" % (CMD_STIFF,os.path.join(userData['ResultsOutputDir'], 'temp.fits'), tiff)) os.remove(os.path.join(userData['ResultsOutputDir'], 'temp.fits')) os.system("%s %s %s" % (CMD_CONVERT, tiff, os.path.join(userData['ResultsOutputDir'], cur + '.png'))) if HAS_CONVERT: debug("Creating image thumbnails") os.system("%s %s %s" % (CMD_CONVERT_THUMB, tiff, os.path.join(userData['ResultsOutputDir'] , 'tn_' + cur + '.png'))) os.remove(tiff) elif kind == 'swarp': if exit_code == 0: # FIXME: look for swarp.xml; parse it and look for errors in it success = 1 configContent = open(os.path.basename(userData['ConfigFile']), 'r').readlines() # Final stack image ingestion debug("Starting ingestion of final stack image...") try: from stack_ingestion import run_stack_ingestion imgout = getConfigValue(configContent, 'IMAGEOUT_NAME') finalStackName = run_stack_ingestion(g, os.path.join(userData['ResultsOutputDir'], imgout), user_id) debug("Final stack ingestion complete") if finalStackName != imgout: # Stack name has changed! # The config file IMAGEOUT_NAME must be modified j = 0 for line in configContent: if line.find('IMAGEOUT_NAME') != -1: line = re.sub(r'#.*$', '', line) res = [k for k in re.split(r'[ \t]', line) if len(k)] try: res[1] = finalStackName except: debug("IMAGEOUT_NAME parameter: could not set value") raise configContent[j] = string.join(res, '\t') break j += 1 if j == len(configContent): debug("Could not find IMAGEOUT_NAME parameter in the config file") raise WrapperError, "IMAGEOUT_NAME param not found" debug("IMAGEOUT_NAME parameter value set to %s" % finalStackName) # The stack file has to be renamed on disk os.rename(os.path.join(userData['ResultsOutputDir'], imgout), os.path.join(userData['ResultsOutputDir'], finalStackName)) debug("Renamed %s to %s in %s" % (imgout, finalStackName, userData['ResultsOutputDir'])) except Exception, e: debug("Could not ingest final stack image. Error: %s" % e) success = 0 exit_code = 1 try: if HAS_CONVERT: convert = 1 else: convert = 0 debug("[Warning] convert utility not found. No thumbnails will be generated") g.setTableName('youpi_plugin_swarp') g.insert( task_id = int(task_id), # # Swarp config file serialization: base64 encoding over zlib compression # config = base64.encodestring(zlib.compress(string.join(configContent, ''), 9)).replace('\n', ''), www = os.path.join( WWW_SWARP_PREFIX, username, userData['Kind'], userData['ResultsOutputDir'][userData['ResultsOutputDir'].find(userData['Kind'])+len(userData['Kind'])+1:] ), weightPath = userData['WeightPath'], useQFITSWeights = userData['UseQFITSWeights'], headPath = userData['HeadPath'], useHeadFiles = userData['UseHeadFiles'], thumbnails = convert ) swarp_id = g.con.insert_id() except Exception, e: raise WrapperError, e # Copy XSL stylesheet try: xslPath = re.search(r'file://(.*)$', getConfigValue(configContent, 'XSL_URL')) if xslPath: copyFileChmodAll(xslPath.group(1), userData['ResultsOutputDir']) except TypeError, e: # No custom XSL_URL value pass # Gets image name imgout = getConfigValue(configContent, 'IMAGEOUT_NAME') if imgout: # Converts produced FITS image into PNG format tiff = os.path.join(userData['ResultsOutputDir'], 'swarp.tif') os.system("%s %s -OUTFILE_NAME %s -BINNING 40 2>/dev/null" % (CMD_STIFF, imgout, tiff)) os.system("%s %s %s" % (CMD_CONVERT, tiff, os.path.join(userData['ResultsOutputDir'], 'swarp.png'))) if HAS_CONVERT: debug("Creating image thumbnails") os.system("%s %s %s" % (CMD_CONVERT_THUMB, tiff, os.path.join(userData['ResultsOutputDir'], 'tn_swarp.png'))) else: debug("[Warning] IMAGEOUT_NAME keyword not found in configuration file") else: # Default: success is set to that task_end_log marks the job as successful if exit_code == 0: success = 1 ################### END OF POST-PROCESSING ################################################ task_end_log(userData, g, storeLog, task_id, success, kind) debug("Post-processing operations terminated"); debug("Exited (code %d)" % exit_code) sys.exit(exit_code)
4386b3fce41e4f947242a074665b6ad7374046ae /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11651/4386b3fce41e4f947242a074665b6ad7374046ae/wrapper_processing.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 12, 1355, 751, 16, 3846, 67, 350, 16, 5261, 4672, 3536, 7903, 2619, 745, 1508, 4533, 326, 2063, 356, 9116, 715, 18, 2427, 67, 710, 480, 374, 4696, 6199, 18, 3536, 225, 729, 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, 1207, 12, 1355, 751, 16, 3846, 67, 350, 16, 5261, 4672, 3536, 7903, 2619, 745, 1508, 4533, 326, 2063, 356, 9116, 715, 18, 2427, 67, 710, 480, 374, 4696, 6199, 18, 3536, 225, 729, 67, ...
sage: C.riemann_roch_basis(D) [x/(y + x), (z + y)/(y + x)] The answer has dimension 2 (confirmed via Magma). But it varies between 1 and quite large with Singular.
sage: C.riemann_roch_basis(D) [(-2*x + y)/(x + y), (-x + z)/(x + y)] .. NOTE:: Currently this only works over prime field and divisors supported on rational points.
def riemann_roch_basis(self, D): r""" Return a basis for the Riemann-Roch space corresponding to `D`. .. warning::
77afcbecaf564fe98fd62507a1eccb878b037e67 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/77afcbecaf564fe98fd62507a1eccb878b037e67/projective_curve.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12347, 351, 1072, 67, 303, 343, 67, 23774, 12, 2890, 16, 463, 4672, 436, 8395, 2000, 279, 10853, 364, 326, 21688, 351, 1072, 17, 54, 9842, 3476, 4656, 358, 1375, 40, 8338, 225, 6116, 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, 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, 12347, 351, 1072, 67, 303, 343, 67, 23774, 12, 2890, 16, 463, 4672, 436, 8395, 2000, 279, 10853, 364, 326, 21688, 351, 1072, 17, 54, 9842, 3476, 4656, 358, 1375, 40, 8338, 225, 6116, 3...
'Source': Channel, 'Destination': Link, 'CallerID': CallerIDNum, 'CallerIDName': CallerIDName, 'SrcUniqueID': Uniqueid, 'DestUniqueID': UniqueidLink, 'Status': 'Link', 'startTime': time.time() - int(Seconds)
'Source': Channel, 'Destination': Link, 'SrcUniqueID': Uniqueid, 'DestUniqueID': UniqueidLink, 'Status': 'Link', 'startTime': time.time() - int(Seconds)
def handlerStatus(self, lines): log.info('MonAst.handlerStatus :: Running...') dic = self.list2Dict(lines) Channel = dic['Channel'] CallerIDNum = dic['CallerIDNum'] CallerIDName = dic['CallerIDName'] State = dic.get('ChannelStateDesc', dic.get('State')) Seconds = dic.get('Seconds', 0) Link = dic.get('BridgedChannel', dic.get('Link', '')) Uniqueid = dic['Uniqueid'] Monitor = False self.channelStatus.append(Uniqueid) self.channelsLock.acquire() if not self.channels.has_key(Uniqueid): self.channels[Uniqueid] = {'Channel': Channel, 'State': State, 'CallerIDNum': CallerIDNum, 'CallerIDName': CallerIDName, 'Monitor': Monitor} self.monitoredUsersLock.acquire() user = Channel if Channel.rfind('-') != -1: user = Channel[:Channel.rfind('-')] if self.monitoredUsers.has_key(user): self.monitoredUsers[user]['Calls'] += 1 self.enqueue('PeerStatus: %s:::%s:::%s' % (user, self.monitoredUsers[user]['Status'], self.monitoredUsers[user]['Calls'])) self.monitoredUsersLock.release() self.enqueue('NewChannel: %s:::%s:::%s:::%s:::%s:::%s' % (Channel, State, CallerIDNum, CallerIDName, Uniqueid, Monitor)) if Link: for UniqueidLink in self.channels: if self.channels[UniqueidLink]['Channel'] == Link: self.callsLock.acquire() self.calls['%s-%s' % (Uniqueid, UniqueidLink)] = { 'Source': Channel, 'Destination': Link, 'CallerID': CallerIDNum, 'CallerIDName': CallerIDName, 'SrcUniqueID': Uniqueid, 'DestUniqueID': UniqueidLink, 'Status': 'Link', 'startTime': time.time() - int(Seconds) } self.callsLock.release() self.enqueue('Link: %s:::%s:::%s:::%s:::%s:::%s:::%d' % \ (Channel, Link, Uniqueid, UniqueidLink, CallerIDNum, self.channels[UniqueidLink]['CallerIDNum'], int(Seconds))) self.channelsLock.release()
813c458b6b9d6ad69d56f03bf10cade3d4e1bc36 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12004/813c458b6b9d6ad69d56f03bf10cade3d4e1bc36/monast.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1838, 1482, 12, 2890, 16, 2362, 4672, 225, 613, 18, 1376, 2668, 11415, 21385, 18, 4176, 1482, 493, 20480, 7821, 13, 11681, 273, 365, 18, 1098, 22, 5014, 12, 3548, 13, 225, 5307, 1377, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1838, 1482, 12, 2890, 16, 2362, 4672, 225, 613, 18, 1376, 2668, 11415, 21385, 18, 4176, 1482, 493, 20480, 7821, 13, 11681, 273, 365, 18, 1098, 22, 5014, 12, 3548, 13, 225, 5307, 1377, ...
/archive/home/channa/public_html/followup/htQscan/H1/999999999.999
/archive/home/channa/public_html/followup/htQscan/H1/999999999.999
def setupNodeWeb(self, job, passItAlong=False, content=None, page=None,webOverride=None,cache=None): self.jobName = job.name if passItAlong: self.add_var_opt("output-path",job.outputPath) self.add_var_opt("enable-output","") if cache: cache.appendCache(job.name,job.outputPath) try: if self.outputCache: cache.appendSubCache(job.name,self.outputCache) except: pass
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, 907, 4079, 12, 2890, 16, 1719, 16, 1342, 7193, 1067, 932, 33, 8381, 16, 913, 33, 7036, 16, 1363, 33, 7036, 16, 4875, 6618, 33, 7036, 16, 2493, 33, 7036, 4672, 365, 18, 4688, 46...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 907, 4079, 12, 2890, 16, 1719, 16, 1342, 7193, 1067, 932, 33, 8381, 16, 913, 33, 7036, 16, 1363, 33, 7036, 16, 4875, 6618, 33, 7036, 16, 2493, 33, 7036, 4672, 365, 18, 4688, 46...
return user_page(request, request.user.username) else: return public_page(request)
return HttpResponseRedirect('/bookmarks/user/%s/' % request.user.username) else: return HttpResponseRedirect('/bookmarks/public/')
def main_page(request): logging.debug("bookmarks.views.main_page()"); logging.debug("lang_code: %s" % request.LANGUAGE_CODE); if request.user.is_authenticated(): return user_page(request, request.user.username) else: return public_page(request)
21dc630bb00c51c3e84c9f958c48915afee4d71a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10474/21dc630bb00c51c3e84c9f958c48915afee4d71a/views.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 67, 2433, 12, 2293, 4672, 2907, 18, 4148, 2932, 3618, 17439, 18, 7061, 18, 5254, 67, 2433, 1435, 8863, 2907, 18, 4148, 2932, 4936, 67, 710, 30, 738, 87, 6, 738, 590, 18, 15547, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 67, 2433, 12, 2293, 4672, 2907, 18, 4148, 2932, 3618, 17439, 18, 7061, 18, 5254, 67, 2433, 1435, 8863, 2907, 18, 4148, 2932, 4936, 67, 710, 30, 738, 87, 6, 738, 590, 18, 15547, ...
self.assertEquals(cmd.library_dirs, ['my_lib_dir'])
self.assert_('my_lib_dir' in cmd.library_dirs)
def test_finalize_options(self): # Make sure Python's include directories (for Python.h, pyconfig.h, # etc.) are in the include search path. modules = [Extension('foo', ['xxx'], optional=False)] dist = Distribution({'name': 'xx', 'ext_modules': modules}) cmd = build_ext(dist) cmd.finalize_options()
2bb084e643dc423b8f3efb37e0136ae24e530c02 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8546/2bb084e643dc423b8f3efb37e0136ae24e530c02/test_build_ext.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 30343, 67, 2116, 12, 2890, 4672, 468, 4344, 3071, 6600, 1807, 2341, 6402, 261, 1884, 6600, 18, 76, 16, 2395, 1425, 18, 76, 16, 468, 5527, 12998, 854, 316, 326, 2341, 1623, 58...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 30343, 67, 2116, 12, 2890, 4672, 468, 4344, 3071, 6600, 1807, 2341, 6402, 261, 1884, 6600, 18, 76, 16, 2395, 1425, 18, 76, 16, 468, 5527, 12998, 854, 316, 326, 2341, 1623, 58...
msg = self.idb.clear_all_file_breaks(filename) if msg: text.bell() return
self.idb.clear_all_file_breaks(filename)
def clear_file_breaks(self, filename): msg = self.idb.clear_all_file_breaks(filename) if msg: text.bell() return
b57b3220632f27ec7ae552e1b48e1b2c8acf1383 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/b57b3220632f27ec7ae552e1b48e1b2c8acf1383/Debugger.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2424, 67, 768, 67, 29292, 12, 2890, 16, 1544, 4672, 1234, 273, 365, 18, 350, 70, 18, 8507, 67, 454, 67, 768, 67, 29292, 12, 3459, 13, 309, 1234, 30, 977, 18, 70, 1165, 1435, 327, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2424, 67, 768, 67, 29292, 12, 2890, 16, 1544, 4672, 1234, 273, 365, 18, 350, 70, 18, 8507, 67, 454, 67, 768, 67, 29292, 12, 3459, 13, 309, 1234, 30, 977, 18, 70, 1165, 1435, 327, 2...
class FedoraPeopleApp(AppFactory)
class FedoraPeopleApp(AppFactory):
def __str__(self): return "<%s %s>" % (self.__class__.__name__, self.id)
119677750f88be27d1f7df8652e5457e5a424008 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12732/119677750f88be27d1f7df8652e5457e5a424008/widgets.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 701, 972, 12, 2890, 4672, 327, 3532, 9, 87, 738, 87, 2984, 738, 261, 2890, 16186, 1106, 972, 16186, 529, 972, 16, 365, 18, 350, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 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, 701, 972, 12, 2890, 4672, 327, 3532, 9, 87, 738, 87, 2984, 738, 261, 2890, 16186, 1106, 972, 16186, 529, 972, 16, 365, 18, 350, 13, 2, -100, -100, -100, -100, -100, -100, -100, ...
else: return w, t
def _listCellGeom(self, V,w,s,W=None,H=None,aH=72000): aW = w-s.leftPadding-s.rightPadding aH = aH - s.topPadding - s.bottomPadding t = 0 w = 0 canv = getattr(self,'canv',None) for v in V: vw, vh = v.wrapOn(canv,aW, aH) if W is not None: W.append(vw) if H is not None: H.append(vh) w = max(w,vw) t = t + vh + v.getSpaceBefore()+v.getSpaceAfter() else: return w, t return w, t - V[0].getSpaceBefore()-V[-1].getSpaceAfter()
784c5948085e74f56562a2535d8913c0d6a4fcbf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3878/784c5948085e74f56562a2535d8913c0d6a4fcbf/tables.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1098, 4020, 16972, 12, 2890, 16, 776, 16, 91, 16, 87, 16, 59, 33, 7036, 16, 44, 33, 7036, 16, 69, 44, 33, 9060, 3784, 4672, 279, 59, 273, 341, 17, 87, 18, 4482, 9485, 17, 87...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1098, 4020, 16972, 12, 2890, 16, 776, 16, 91, 16, 87, 16, 59, 33, 7036, 16, 44, 33, 7036, 16, 69, 44, 33, 9060, 3784, 4672, 279, 59, 273, 341, 17, 87, 18, 4482, 9485, 17, 87...
debug(s, _("remote removed, remove"))
debug(s, "remote removed, remove")
def debug(s, msg, r=""): if r: r = "%s:%s" % r repo.ui.debug(_(" subrepo %s: %s %s\n") % (s, msg, r))
d6aaf60c9841c343758480b8e42079d5f533c0e1 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11312/d6aaf60c9841c343758480b8e42079d5f533c0e1/subrepo.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1198, 12, 87, 16, 1234, 16, 436, 1546, 6, 4672, 309, 436, 30, 436, 273, 2213, 87, 5319, 87, 6, 738, 436, 3538, 18, 4881, 18, 4148, 24899, 2932, 225, 720, 7422, 738, 87, 30, 738, 87...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1198, 12, 87, 16, 1234, 16, 436, 1546, 6, 4672, 309, 436, 30, 436, 273, 2213, 87, 5319, 87, 6, 738, 436, 3538, 18, 4881, 18, 4148, 24899, 2932, 225, 720, 7422, 738, 87, 30, 738, 87...
elif pattern[index] == 'mM':
elif pattern[index] in 'mM':
def compile(pattern, flags=0): stack = [] index = 0 label = 0 register = 1 groupindex = {} callouts = [] while (index < len(pattern)): char = pattern[index] index = index + 1 if char == '\\': if index < len(pattern): next = pattern[index] index = index + 1 if next == 't': stack.append([Exact(chr(9))]) elif next == 'n': stack.append([Exact(chr(10))]) elif next == 'r': stack.append([Exact(chr(13))]) elif next == 'f': stack.append([Exact(chr(12))]) elif next == 'a': stack.append([Exact(chr(7))]) elif next == 'e': stack.append([Exact(chr(27))]) elif next in '0123456789': value = next while (index < len(pattern)) and \ (pattern[index] in string.digits): value = value + pattern[index] index = index + 1 if (len(value) == 3) or \ ((len(value) == 2) and (value[0] == '0')): value = string.atoi(value, 8) if value > 255: raise error, 'octal char out of range' stack.append([Exact(chr(value))]) elif value == '0': stack.append([Exact(chr(0))]) elif len(value) > 3: raise error, 'too many digits' else: value = string.atoi(value) if value >= register: raise error, ('cannot reference a register ' 'not yet used') elif value == 0: raise error, ('register 0 cannot be used ' 'during match') stack.append([MatchMemory(value)]) elif next == 'x': value = '' while (index < len(pattern)) and \ (pattern[index] in string.hexdigits): value = value + pattern[index] index = index + 1 value = string.atoi(value, 16) if value > 255: raise error, 'hex char out of range' stack.append([Exact(chr(value))]) elif next == 'c': if index >= len(pattern): raise error, '\\c at end of re' elif pattern[index] in 'abcdefghijklmnopqrstuvwxyz': stack.append(Exact(chr(ord(pattern[index]) - ord('a') + 1))) else: stack.append(Exact(chr(ord(pattern[index]) ^ 64))) index = index + 1 elif next == 'A': stack.append([BegBuf()]) elif next == 'Z': stack.append([EndBuf()]) elif next == 'b': stack.append([WordBound()]) elif next == 'B': stack.append([NotWordBound()]) elif next == 'w': stack.append([SyntaxSpec('word')]) elif next == 'W': stack.append([NotSyntaxSpec('word')]) elif next == 's': stack.append([SyntaxSpec('whitespace')]) elif next == 'S': stack.append([NotSyntaxSpec('whitespace')]) elif next == 'd': stack.append([SyntaxSpec('digit')]) elif next == 'D': stack.append([NotSyntaxSpec('digit')]) elif next in 'GluLUQE': # some perl-isms that we don't support raise error, '\\' + next + ' not supported' else: stack.append([Exact(pattern[index])]) else: raise error, 'backslash at the end of a string' elif char == '|': if len(stack) == 0: raise error, 'nothing to alternate' expr = [] while (len(stack) != 0) and \ (stack[-1][0].name != '(') and \ (stack[-1][0].name != '|'): expr = stack[-1] + expr del stack[-1] stack.append([FailureJump(label)] + \ expr + \ [Jump(-1), Label(label)]) stack.append([('|',)]) label = label + 1 elif char == '(': if index >= len(pattern): raise error, 'no matching close paren' elif pattern[index] == '?': # Perl style (?...) extensions index = index + 1 if index >= len(pattern): raise error, 'extension ends prematurely' elif pattern[index] == 'P': # Python extensions index = index + 1 if index >= len(pattern): raise error, 'extension ends prematurely' elif pattern[index] == '<': # Handle Python symbolic group names (?<...>...) index = index + 1 end = string.find(pattern, '>', index) if end == -1: raise error, 'no end to symbolic group name' name = pattern[index:end] # XXX check syntax of name index = end + 1 groupindex[name] = register stack.append([OpenParen(register)]) register = register + 1 elif pattern[index] == '=': # backreference to symbolic group name if index >= len(pattern): raise error, '(?P= at the end of the pattern' start = index + 1 end = string.find(pattern, ')', start) if end == -1: raise error, 'no ) to end symbolic group name' name = pattern[start:end] if name not in groupindex: raise error, ('symbolic group name ' + name + \ ' has not been used yet') stack.append([MatchMemory(groupindex[name])]) index = end + 1 elif pattern[index] == '!': # function callout if index >= len(pattern): raise error, 'no function callout name' start = index + 1 end = string.find(pattern, ')', start) if end == -1: raise error, 'no ) to end function callout name' name = pattern[start:end] if name not in callouts: raise error, ('function callout name not listed ' 'in callouts dict') stack.append([FunctionCallout(name)]) else: raise error, 'unknown Python extension' elif pattern[index] == ':': # grouping, but no registers index = index + 1 stack.append([('(', -1)]) elif pattern[index] == '#': # comment index = index + 1 end = string.find(pattern, ')', index) if end == -1: raise error, 'no end to comment' index = end + 1 elif pattern[index] == '=': raise error, ('zero-width positive lookahead ' 'assertion is unsupported') elif pattern[index] == '!': raise error, ('zero-width negative lookahead ' 'assertion is unsupported') elif pattern[index] in 'iImMsSxX': while (index < len(pattern)) and (pattern[index] != ')'): if pattern[index] == 'iI': flags = flags | IGNORECASE elif pattern[index] == 'mM': flags = flags | MULTILINE elif pattern[index] == 'sS': flags = flags | DOTALL elif pattern[index] in 'xX': flags = flags | VERBOSE else: raise error, 'unknown flag' index = index + 1 index = index + 1 else: raise error, 'unknown extension' else: stack.append([OpenParen(register)]) register = register + 1 elif char == ')': # make one expression out of everything on the stack up to # the marker left by the last parenthesis expr = [] while (len(stack) > 0) and (stack[-1][0].name != '('): expr = stack[-1] + expr del stack[-1] if len(stack) == 0: raise error, 'too many close parens' if len(expr) == 0: raise error, 'nothing inside parens' # check to see if alternation used correctly if (expr[-1].name == '|'): raise error, 'alternation with nothing on the right' # remove markers left by alternation expr = filter(lambda x: x.name != '|', expr) # clean up jumps inserted by alternation need_label = 0 for i in range(len(expr)): if (expr[i].name == 'jump') and (expr[i].label == -1): expr[i] = JumpOpcode(label) need_label = 1 if need_label: expr.append(Label(label)) label = label + 1 if stack[-1][0].register > 0: expr = [StartMemory(stack[-1][0].register)] + \ expr + \ [EndMemory(stack[-1][0].register)] del stack[-1] stack.append(expr) elif char == '{': if len(stack) == 0: raise error, 'no expression to repeat' end = string.find(pattern, '}', index) if end == -1: raise error, ('no close curly bracket to match' ' open curly bracket') fields = map(string.strip, string.split(pattern[index:end], ',')) index = end + 1 minimal = 0 if (index < len(pattern)) and (pattern[index] == '?'): minimal = 1 index = index + 1 if len(fields) == 1: # {n} or {n}? (there's really no difference) try: count = string.atoi(fields[0]) except ValueError: raise error, ('count must be an integer ' 'inside curly braces') if count > 65535: raise error, 'repeat count out of range' expr = [] while count > 0: expr = expr + stack[-1] count = count - 1 del stack[-1] stack.append(expr) elif len(fields) == 2: # {n,} or {n,m} if fields[1] == '': # {n,} try: min = string.atoi(fields[0]) except ValueError: raise error, ('minimum must be an integer ' 'inside curly braces') if min > 65535: raise error, 'minimum repeat count out of range' expr = [] while min > 0: expr = expr + stack[-1] min = min - 1 registers = registers_used(stack[-1]) if minimal: expr = expr + \ ([Jump(label + 1), Label(label)] + \ stack[-1] + \ [Label(label + 1), FailureJump(label, registers)]) else: expr = expr + \ ([Label(label), FailureJump(label + 1, registers)] + stack[-1] + [StarJump(label), Label(label + 1)]) del stack[-1] stack.append(expr) label = label + 2 else: # {n,m} try: min = string.atoi(fields[0]) except ValueError: raise error, ('minimum must be an integer ' 'inside curly braces') try: max = string.atoi(fields[1]) except ValueError: raise error, ('maximum must be an integer ' 'inside curly braces') if min > 65535: raise error, ('minumim repeat count out ' 'of range') if max > 65535: raise error, ('maximum repeat count out ' 'of range') if min > max: raise error, ('minimum repeat count must be ' 'less than the maximum ' 'repeat count') expr = [] while min > 0: expr = expr + stack[-1] min = min - 1 max = max - 1 if minimal: while max > 0: expr = expr + \ [FailureJump(label), Jump(label + 1), Label(label)] + \ stack[-1] + \ [Label(label + 1)] label = label + 2 del stack[-1] stack.append(expr) else: while max > 0: expr = expr + \ [FailureJump(label)] + \ stack[-1] max = max - 1 del stack[-1] stack.append(expr + [Label(label)]) label = label + 1 else: raise error, ('there need to be one or two fields ' 'in a {} expression') index = end + 1 elif char == '}': raise error, 'unbalanced close curly brace' elif char == '*': # Kleene closure if len(stack) == 0: raise error, 'the Kleene closure needs something to repeat' registers = registers_used(stack[-1]) if (index < len(pattern)) and (pattern[index] == '?'): # non-greedy matching expr = [JumpInstructions(label + 1), Label(label)] + \ stack[-1] + \ [Label(label + 1), FailureJump(label)] index = index + 1 else: # greedy matching expr = [Label(label), FailureJump(label + 1)] + \ stack[-1] + \ [StarJump(label), Label(label + 1)] del stack[-1] stack.append(expr) label = label + 2 elif char == '+': # positive closure if len(stack) == 0: raise error, 'the positive closure needs something to repeat' registers = registers_used(stack[-1]) if (index < len(pattern)) and (pattern[index] == '?'): # non-greedy expr = [Label(label)] + \ stack[-1] + \ [FailureJump(label)] label = label + 1 index = index + 1 else: # greedy expr = [DummyFailureJump(label + 1), Label(label), FailureJump(label + 2), Label(label + 1)] + \ stack[-1] + \ [StarJump(label), Label(label + 2)] label = label + 3 del stack[-1] stack.append(expr) elif char == '?': if len(stack) == 0: raise error, 'need something to be optional' registers = registers_used(stack[-1]) if (index < len(pattern)) and (pattern[index] == '?'): # non-greedy matching expr = [FailureJump(label), Jump(label + 1), Label(label)] + \ stack[-1] + \ [Label(label + 1)] label = label + 2 index = index + 1 else: # greedy matching expr = [FailureJump(label)] + \ stack[-1] + \ [Label(label)] label = label + 1 del stack[-1] stack.append(expr) elif char == '.': if flags & DOTALL: stack.append(Set(map(chr, range(256)))) else: stack.append([AnyChar()]) elif char == '^': if flags & MULTILINE: stack.append([Bol()]) else: stack.append([BegBuf()]) elif char == '$': if flags & MULTILINE: stack.append([Eol()]) else: stack.append([EndBuf()]) elif char == '#': if flags & VERBOSE: # comment index = index + 1 end = string.find(pattern, '\n', index) if end == -1: index = len(pattern) else: index = end + 1 else: stack.append([Exact(char)]) elif char in string.whitespace: if flags & VERBOSE: stack.append([Exact(char)]) elif char == '[': if index >= len(pattern): raise error, 'incomplete set' negate = 0 last = '' set = [] if pattern[index] == '^': negate = 1 index = index + 1 if index >= len(pattern): raise error, 'incomplete set' if pattern[index] in ']-': set.append(pattern[index]) last = pattern[index] index = index + 1 while (index < len(pattern)) and (pattern[index] != ']'): next = pattern[index] index = index + 1 if next == '-': if (index >= len(pattern)) or (pattern[index] == ']'): raise error, 'incomplete range in set' if last > pattern[index]: raise error, 'range arguments out of order in set' for next in map(chr, \ range(ord(last), \ ord(pattern[index]) + 1)): if next not in set: set.append(next) last = '' index = index + 1 elif next == '\\': # expand syntax meta-characters and add to set if index >= len(pattern): raise error, 'incomplete set' elif (pattern[index] == ']'): raise error, 'backslash at the end of a set' elif pattern[index] == 'w': for next in syntax_table.keys(): if 'word' in syntax_table[next]: set.append(next) elif pattern[index] == 'W': for next in syntax_table.keys(): if 'word' not in syntax_table[next]: set.append(next) elif pattern[index] == 'd': for next in syntax_table.keys(): if 'digit' in syntax_table[next]: set.append(next) elif pattern[index] == 'D': for next in syntax_table.keys(): if 'digit' not in syntax_table[next]: set.append(next) elif pattern[index] == 's': for next in syntax_table.keys(): if 'whitespace' in syntax_table[next]: set.append(next) elif pattern[index] == 'S': for next in syntax_table.keys(): if 'whitespace' not in syntax_table[next]: set.append(next) else: raise error, 'unknown meta in set' last = '' index = index + 1 else: if next not in set: set.append(next) last = next if pattern[index] != ']': raise error, 'incomplete set' index = index + 1 if negate: notset = [] for char in map(chr, range(256)): if char not in set: notset.append(char) stack.append([Set(notset)]) else: stack.append([Set(set)]) else: stack.append([Exact(char)]) code = [] while len(stack) > 0: if stack[-1][0].name == '(': raise error, 'too many open parens' code = stack[-1] + code del stack[-1] if len(code) == 0: raise error, 'no code generated' if (code[-1].name == '|'): raise error, 'alternation with nothing on the right' code = filter(lambda x: x.name != '|', code) need_label = 0 for i in range(len(code)): if (code[i].name == 'jump') and (code[i].label == -1): code[i] = Jump(label) need_label = 1 if need_label: code.append(Label(label)) label = label + 1 code.append(End()) return RegexObject(pattern, flags, code, register, groupindex, callouts)
b2202eddd973943cab19b3439da4266d52557ad9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b2202eddd973943cab19b3439da4266d52557ad9/re.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4074, 12, 4951, 16, 2943, 33, 20, 4672, 2110, 273, 5378, 770, 273, 374, 1433, 273, 374, 1744, 273, 404, 1041, 1615, 273, 2618, 1443, 383, 12940, 273, 5378, 1323, 261, 1615, 411, 562, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4074, 12, 4951, 16, 2943, 33, 20, 4672, 2110, 273, 5378, 770, 273, 374, 1433, 273, 374, 1744, 273, 404, 1041, 1615, 273, 2618, 1443, 383, 12940, 273, 5378, 1323, 261, 1615, 411, 562, 1...
if parent is not None: if e_name not in self.parents: self.parents[e_name] = list() self.parents[e_name].append(parent.getName())
def processLeaf(self, element, parent): """ Process an element (a leaf). """ logging.debug("Processing leaf: (%s) --> (%s)" % (parent, element)) e = element e_name = e.getName() e_type = e.getType() if not e.isExplicitDefine() \ and (e_name not in EXPLICIT_DEFINE_OVERRIDE or not e.topLevel): logging.info("Element %s.%s not an explicit define, skipping." % (parent, e)) if parent is not None: if e_name not in self.parents: self.parents[e_name] = list() self.parents[e_name].append(parent.getName()) return if e.getMixedExtensionError(): logging.error("Element %s.%s extension chain contains mixed and non-mixed content, skipping." % (parent, e)) return if e_type != e_name and e_name not in EXPLICIT_DEFINE_OVERRIDE: logging.info("Element %s.%s is not a concrete type (%s != %s), skipping." % (parent, e, e_type, e_name)) return obj = OMEModelObject(e, parent, self) self.addObject(e, obj) self.processAttributes(e)
64ddbb44c48b689f118adfc88062569679b6a7dd /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1844/64ddbb44c48b689f118adfc88062569679b6a7dd/fu.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 9858, 12, 2890, 16, 930, 16, 982, 4672, 3536, 4389, 392, 930, 261, 69, 7839, 2934, 3536, 2907, 18, 4148, 2932, 7798, 7839, 30, 6142, 87, 13, 15431, 6142, 87, 2225, 738, 261, 2938...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 9858, 12, 2890, 16, 930, 16, 982, 4672, 3536, 4389, 392, 930, 261, 69, 7839, 2934, 3536, 2907, 18, 4148, 2932, 7798, 7839, 30, 6142, 87, 13, 15431, 6142, 87, 2225, 738, 261, 2938...
jointsAndWeights = zip(jointList,weightList)
try: actualJointNames = [joints[j] for j in jointList] actualJointsAsSet = set(actualJointNames) if len( actualJointsAsSet ) != len(actualJointNames): actualJointNames,weightList = regatherWeights(actualJointNames,weightList) except KeyError: jointListSet = set(jointList) diff = missingJoints.difference(jointListSet) weightList = renormalizeWeights(jointList,weightList,diff) actualJointNames = [joints[j] for j in jointList] jointsAndWeights = zip(actualJointNames,weightList)
def loadWeights( geos=None, filepath=DEFAULT_PATH, usePosition=True, tolerance=1e-6 ): '''loads weights back on to a model given a file. NOTE: the tolerance is an axis tolerance NOT a distance tolerance. ie each axis must fall within the value of the given vector to be considered a match - this makes matching a heap faster because vectors can be culled from the a sorted list. possibly implementing some sort of oct-tree class might speed up the matching more, but... the majority of weight loading time at this stage is spent by maya actually applying skin weights, not the positional searching''' start = time.clock() miscData,geoAndData = loadData(filepath) #the miscData contains a dictionary with a bunch of data stored from when the weights was saved - do some #sanity checking to make sure we're not loading weights from some completely different source curFile = cmd.file(q=True,sn=True) origFile = miscData['file'] if curFile != origFile: response = cmd.confirmDialog(t='files differ...',m='the file these weights were saved from was %s\nthis is different from your currently opened file.\n\nis that OK?'%miscData['file'],b=('Proceed','Cancel')) if response == 'Cancel': return #if the geo is None, then check for data in the verts arg - the user may just want weights #loaded on a specific list of verts - we can get the geo name from those verts skinCluster = '' verts = cmd.ls(cmd.polyListComponentConversion(geos,toVertex=True),fl=True) geoVertDict = {} for vert in verts: geo = vert[:vert.rfind('.')] try: geoVertDict[geo].append(vert) except KeyError: geoVertDict[geo] = [vert] #cache heavily access method objects as locals... skinPercent = cmd.skinPercent progressWindow = cmd.progressWindow xform = cmd.xform clock = time.clock numItems = len(geoVertDict) curItem = 1 mayaTime = 0 #records the amount of time spent performing maya cmds... progressWindow(title='loading weights from file %d items'%numItems) for geo,verts in geoVertDict.iteritems(): try: joints,weightData = geoAndData[geo] except KeyError: continue #sort the weightData by ascending x values so we can search faster weightData = sortByIdx(weightData) #are all the joints in the scene? joints = list(joints) for j in joints: if not cmd.objExists(j): raise Exception('missing joint %s'%j) #do we have a skinCluster on the geo already? if not, build one skinCluster = cmd.ls(cmd.listHistory(geo),type='skinCluster') if not skinCluster: cmd.delete(geo,ch=True) skinCluster = cmd.skinCluster(geo,joints)[0] verts = cmd.ls(cmd.polyListComponentConversion(geo,toVertex=True),fl=True) else: skinCluster = skinCluster[0] num = len(verts) cur = 0.0 inc = 100.0/num if usePosition: progressWindow(edit=True,status='by position: %s (%d/%d)'%(geo,curItem,numItems)) for vert in verts: progressWindow(edit=True,progress=cur) cur += inc time1 = clock() ###--- time spent by maya... pos = Vector( xform(vert,q=True,ws=True,t=True) ) mayaTime += clock() - time1 ###--- time spent by maya... vertData = findBestVector(pos,weightData,tolerance) try: id, jointList, weightList = vertData.id, vertData.joints, vertData.weights jointsAndWeights = zip(jointList,weightList) time1 = clock() ###--- time spent by maya... skinPercent(skinCluster,vert,tv=jointsAndWeights) mayaTime += clock() - time1 ###--- time spent by maya... except AttributeError: print '### no point found for %s'%vert else: progressWindow(status='by id: %s (%d/%d)'%(geo,curItem,numItems)) for item in weightData: progressWindow(edit=True,progress=cur/float(num)*100) cur += 1 id, jointList, weightList = item.id, item.joints, item.weights jointsAndWeights = zip(jointList,weightList) vertName = '%s.vtx[%d]'%(geo,id) time1 = clock() ### skinPercent(skinCluster,vertName,tv=jointsAndWeights) mayaTime += clock() - time1 ### curItem += 1 progressWindow(ep=True) end = clock() print 'time for weight load %.02f secs'%(end-start) print 'time spent doing maya cmds %.02f secs'%mayaTime
2ade017cab8b7824a24175b7b016a28e5619e2c6 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1810/2ade017cab8b7824a24175b7b016a28e5619e2c6/skinWeights.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1262, 16595, 12, 8244, 538, 33, 7036, 16, 3608, 33, 5280, 67, 4211, 16, 999, 2555, 33, 5510, 16, 10673, 33, 21, 73, 17, 26, 262, 30, 9163, 17135, 5376, 1473, 603, 358, 279, 938, 864,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1262, 16595, 12, 8244, 538, 33, 7036, 16, 3608, 33, 5280, 67, 4211, 16, 999, 2555, 33, 5510, 16, 10673, 33, 21, 73, 17, 26, 262, 30, 9163, 17135, 5376, 1473, 603, 358, 279, 938, 864,...
if isinstance(parent, Function):
if isinstance(parent, Function) and not param.scope:
def _parse_param(self, parent, param, tag): options = getattr(tag, 'options', {}) if isinstance(parent, Function): scope = options.get(OPT_SCOPE) if scope: param.scope = scope.one() param.transfer = PARAM_TRANSFER_NONE destroy = options.get(OPT_DESTROY) if destroy: param.destroy_index = parent.get_parameter_index(destroy.one()) self._fixup_param_destroy(parent, param) closure = options.get(OPT_CLOSURE) if closure: param.closure_index = parent.get_parameter_index(closure.one()) self._fixup_param_closure(parent, param) if isinstance(parent, Callback): if OPT_CLOSURE in options: param.closure_index = parent.get_parameter_index(param.name) self._fixup_param_closure(parent, param)
f74823dbcb647dee950c066119876db9f0edc32f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2770/f74823dbcb647dee950c066119876db9f0edc32f/annotationparser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2670, 67, 891, 12, 2890, 16, 982, 16, 579, 16, 1047, 4672, 702, 273, 3869, 12, 2692, 16, 296, 2116, 2187, 2618, 13, 309, 1549, 12, 2938, 16, 4284, 13, 471, 486, 579, 18, 4887, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2670, 67, 891, 12, 2890, 16, 982, 16, 579, 16, 1047, 4672, 702, 273, 3869, 12, 2692, 16, 296, 2116, 2187, 2618, 13, 309, 1549, 12, 2938, 16, 4284, 13, 471, 486, 579, 18, 4887, ...
'fedoraGroupDesc' : str(fedoraGroupDesc).encode('utf8'), 'fedoraGroupOwner' : str(fedoraGroupOwner).encode('utf8'),
'fedoraGroupDesc' : fedoraGroupDesc, 'fedoraGroupOwner' : fedoraGroupOwner,
def newGroup(self, cn, fedoraGroupDesc, fedoraGroupOwner, fedoraGroupNeedsSponsor, fedoraGroupUserCanRemove, fedoraGroupRequires, fedoraGroupJoinMsg): ''' Create a new group ''' attributes = { 'cn' : cn, 'objectClass' : ('fedoraGroup'), 'fedoraGroupDesc' : str(fedoraGroupDesc).encode('utf8'), 'fedoraGroupOwner' : str(fedoraGroupOwner).encode('utf8'), 'fedoraGroupType' : '1', 'fedoraGroupNeedsSponsor' : str(fedoraGroupNeedsSponsor).encode('utf8'), 'fedoraGroupUserCanRemove' : str(fedoraGroupUserCanRemove).encode('utf8'), 'fedoraGroupRequires' : str(fedoraGroupRequires).encode('utf8'), 'fedoraGroupJoinMsg' : str(fedoraGroupJoinMsg).encode('utf8'), }
f0bb66f2bd8aeeeb4e764ba73f43725601c75529 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9952/f0bb66f2bd8aeeeb4e764ba73f43725601c75529/fasLDAP.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 394, 1114, 12, 2890, 16, 6227, 16, 28869, 1114, 4217, 16, 28869, 1114, 5541, 16, 28869, 1114, 26419, 55, 500, 2467, 16, 28869, 1114, 1299, 2568, 3288, 16, 28869, 1114, 21671, 16, 28869, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1114, 12, 2890, 16, 6227, 16, 28869, 1114, 4217, 16, 28869, 1114, 5541, 16, 28869, 1114, 26419, 55, 500, 2467, 16, 28869, 1114, 1299, 2568, 3288, 16, 28869, 1114, 21671, 16, 28869, ...
def all_deps(self, filename, path=None):
def all_deps(self, filename, ext_module, path=None):
def all_deps(self, filename, path=None): """ Returns all files directly or indirectly referenced by this file.
031b02486f3aa60bbe6ec46c81307116288d5734 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9417/031b02486f3aa60bbe6ec46c81307116288d5734/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 777, 67, 14877, 12, 2890, 16, 1544, 16, 1110, 67, 2978, 16, 589, 33, 7036, 4672, 3536, 2860, 777, 1390, 5122, 578, 16807, 715, 8042, 635, 333, 585, 18, 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, 777, 67, 14877, 12, 2890, 16, 1544, 16, 1110, 67, 2978, 16, 589, 33, 7036, 4672, 3536, 2860, 777, 1390, 5122, 578, 16807, 715, 8042, 635, 333, 585, 18, 2, -100, -100, -100, -100, -100,...
args = string.translate(match.group(2), commatospace) args = map(float, split(args))
args = argsf = string.translate(match.group(2), commatospace) args = map(str, split(args))
def parse_transform(self, trafo_string): trafo = self.trafo #print trafo trafo_string = as_latin1(trafo_string) while trafo_string: #print trafo_string match = rx_trafo.match(trafo_string) if match: function = match.group(1) args = string.translate(match.group(2), commatospace) args = map(float, split(args)) trafo_string = trafo_string[match.end(0):] if function == 'matrix': trafo = trafo(apply(Trafo, tuple(args))) elif function == 'scale': if len(args) == 1: sx = sy = args[0] else: sx, sy = args trafo = trafo(Scale(sx, sy)) elif function == 'translate': if len(args) == 1: dx, dy = args[0], 0 else: dx, dy = args trafo = trafo(Translation(dx, dy)) elif function == 'rotate': if len(args) == 1: trafo = trafo(Rotation(args[0] * degrees)) else: angle, cx, cy = args trafo = trafo(Rotation(angle * degrees, Point(cx * .8, cy * .8))) elif function == 'skewX': trafo = trafo(Trafo(1, 0, tan(args[0] * degrees), 1, 0, 0)) elif function == 'skewY': trafo = trafo(Trafo(1, tan(args[0] * degrees), 0, 1, 0, 0)) else: trafo_string = '' #print trafo self.trafo = trafo
20f97a1a1862b824365b83f00419d19bd29be2c5 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3123/20f97a1a1862b824365b83f00419d19bd29be2c5/svgloader.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 6547, 12, 2890, 16, 1284, 617, 67, 1080, 4672, 1284, 617, 273, 365, 18, 2033, 617, 468, 1188, 1284, 617, 1284, 617, 67, 1080, 273, 487, 67, 26578, 21, 12, 2033, 617, 67, 10...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 6547, 12, 2890, 16, 1284, 617, 67, 1080, 4672, 1284, 617, 273, 365, 18, 2033, 617, 468, 1188, 1284, 617, 1284, 617, 67, 1080, 273, 487, 67, 26578, 21, 12, 2033, 617, 67, 10...
_StartInstanceDisks(self.cfg, inst, None)
_StartInstanceDisks(self, inst, None)
def Exec(self, feedback_fn): """Reinstall the instance.
b9bddb6bdf7ac5841c732845ce0122c64bb026b1 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7542/b9bddb6bdf7ac5841c732845ce0122c64bb026b1/cmdlib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3889, 12, 2890, 16, 10762, 67, 4293, 4672, 3536, 426, 5425, 326, 791, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3889, 12, 2890, 16, 10762, 67, 4293, 4672, 3536, 426, 5425, 326, 791, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
install_descriptor = env.Install( install_dirs.lib+'/pkgconfig', lib_descriptor ) install_soname = env.SonameLink( install_dirs.lib + '/' + soname, install_lib ) install_linkername = env.LinkerNameLink( install_dirs.lib+'/'+linker_name, install_lib)
env.Depends(install_lib, [linkername_lib, soname_lib] ) install_descriptor = env.Install( install_dirs.pc, pcfile ) install_soname = env.SonameLink( os.path.join( install_dirs.lib, soname), install_lib ) install_linkername = env.LinkerNameLink( os.path.join(install_dirs.lib,linker_name), install_lib)
def posix_lib_rules( name, version, headers, sources, install_dirs, env, moduleDependencies=[]) : #for file in sources : # print "file to compile: " + str(file) lib_descriptor = env.File( 'clam_'+name+'.pc' ) # We expect a version like " X.Y-possibleextrachars " versionnumbers = version.split('.') libversion = "%s%s.%s"%(versionnumbers[0], versionnumbers[1], versionnumbers[2]) if len(versionnumbers) != 3: print " ERROR in buildtools.posix_lib_rules: version name does not follow CLAM standard " print " Check the variable 'version' in the main SConstruct" sys.exit(1) if sys.platform == 'linux2' : libname = 'libclam_'+name+'.so.%s%s.%s' % (versionnumbers[0], versionnumbers[1], versionnumbers[2]) soname = 'libclam_'+name+'.so.%s%s' % (versionnumbers[0], versionnumbers[1]) linker_name = 'libclam_'+name+'.so' env.Append(SHLINKFLAGS=['-Wl,-soname,%s'%soname ] ) lib = env.SharedLibrary( 'clam_' + name, sources, SHLIBSUFFIX='.so.%s'%libversion ) soname_lib = env.SonameLink( soname, lib ) # lib***.so.XY -> lib***.so.XY.Z linkername_lib = env.LinkerNameLink( linker_name, soname_lib ) # lib***.so -> lib***.so.X env.Depends(lib, ['../%s/libclam_%s.so.%s'%(module,module,versionnumbers[0]) for module in moduleDependencies ]) else : #darwin soname = 'libclam_'+name+'.%s.dylib' % versionnumbers[0] middle_linker_name = 'libclam_'+name+'.%s.%s.dylib' % (versionnumbers[0], versionnumbers[1]) linker_name = 'libclam_'+name+'.dylib' env.Append( CCFLAGS=['-fno-common'] ) env.Append( SHLINKFLAGS=['-dynamic', '-Wl,-install_name,%s'%(install_dirs.lib + '/' + 'libclam_' + name + '.%s.dylib'%(version))] ) lib = env.SharedLibrary( 'clam_' + name, sources, SHLIBSUFFIX='.%s.dylib'%version ) soname_lib = env.LinkerNameLink( middle_linker_name, lib ) # lib***.X.Y.dylib -> lib***.X.Y.Z.dylib middlelinkername_lib = env.LinkerNameLink( soname, soname_lib ) # lib***.so.X -> lib***.so.X.Y linkername_lib = env.LinkerNameLink( linker_name, middlelinkername_lib) # lib***.dylib -> lib***.X.dylib env.Append(CPPDEFINES="CLAM_MODULE='\"%s\"'"%name) install_headers = env.Install( install_dirs.inc+'/CLAM', headers ) env.AddPostAction( install_headers, "chmod 644 $TARGET" ) install_lib = env.Install( install_dirs.lib, lib) install_descriptor = env.Install( install_dirs.lib+'/pkgconfig', lib_descriptor ) install_soname = env.SonameLink( install_dirs.lib + '/' + soname, install_lib ) install_linkername = env.LinkerNameLink( install_dirs.lib+'/'+linker_name, install_lib)
4e6fc18a4b043b553e20f344f8b3d30856a2b3be /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1456/4e6fc18a4b043b553e20f344f8b3d30856a2b3be/clam_build_helpers.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 16366, 67, 2941, 67, 7482, 12, 508, 16, 1177, 16, 1607, 16, 5550, 16, 3799, 67, 8291, 16, 1550, 16, 1605, 8053, 22850, 5717, 294, 225, 468, 1884, 585, 316, 5550, 294, 468, 202, 1188, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 16366, 67, 2941, 67, 7482, 12, 508, 16, 1177, 16, 1607, 16, 5550, 16, 3799, 67, 8291, 16, 1550, 16, 1605, 8053, 22850, 5717, 294, 225, 468, 1884, 585, 316, 5550, 294, 468, 202, 1188, ...
version = "$Id: delta.py,v 1.6 2005-06-16 19:16:33 eefi Exp $"[1:-1]
version = "$Id: delta.py,v 1.7 2005-06-16 19:47:22 eefi Exp $"[1:-1]
def main(): testFiles = [] diffFiles = [] assumptions = Set() global ploughOn # even if error ploughOn = 0 global verbose global lumped verbose = 0 lumped = 1 try: opts, args = getopt.getopt(sys.argv[1:], "hf:t:m:v:g", ["help", "from=", "to=", "meta=", "verbose=", "granularity="]) except getopt.GetoptError: # print help information and exit: usage() sys.exit(2) output = None for o, a in opts: if o in ("-h", "--help"): usage() sys.exit() if o in ("-v", "--verbose"): try: verbose = int(a) except ValueError: verbose = 10 if o in ("-l", "--granularity"): lumped = int(a) if o in ("-f", "--from"): testFiles.append(a) if o in ("-t", "--to"): diffFiles.append(a) if o in ("-m", "--meta"): assumptions.add(a)
e0cdb64d330d757535e0c2962e618a137239e623 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3308/e0cdb64d330d757535e0c2962e618a137239e623/delta.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 1842, 2697, 273, 5378, 3122, 2697, 273, 5378, 6287, 573, 273, 1000, 1435, 2552, 293, 383, 2127, 1398, 468, 5456, 309, 555, 293, 383, 2127, 1398, 273, 374, 2552, 3988, 2552, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1842, 2697, 273, 5378, 3122, 2697, 273, 5378, 6287, 573, 273, 1000, 1435, 2552, 293, 383, 2127, 1398, 468, 5456, 309, 555, 293, 383, 2127, 1398, 273, 374, 2552, 3988, 2552, ...
sage: user.set_hashed_password(self, 'Crrc!')
sage: user.set_hashed_password('Crrc!')
def set_hashed_password(self, password): """ sage: from sage.server.notebook.user import User sage: user = User('bob', 'Aisfa!!', 'bob@pizzaisyummy.net', 'admin') sage: user.set_hashed_password(self, 'Crrc!') sage: user.password() 'Crrc!' """ self.__password = password
ec61e8f90e0d9ac7561ed74fc06d3a6e3fa01ee4 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/ec61e8f90e0d9ac7561ed74fc06d3a6e3fa01ee4/user.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 2816, 329, 67, 3664, 12, 2890, 16, 2201, 4672, 3536, 272, 410, 30, 628, 272, 410, 18, 3567, 18, 24422, 18, 1355, 1930, 2177, 272, 410, 30, 729, 273, 2177, 2668, 70, 947, 218...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 2816, 329, 67, 3664, 12, 2890, 16, 2201, 4672, 3536, 272, 410, 30, 628, 272, 410, 18, 3567, 18, 24422, 18, 1355, 1930, 2177, 272, 410, 30, 729, 273, 2177, 2668, 70, 947, 218...
def addAnnotation(self, annType, imPos, rad, tags=None, doResize=True, **kargs):
def addAnnotation(self, annType, imPos, rad, tags=None, isImSize=True, **kargs):
def addAnnotation(self, annType, imPos, rad, tags=None, doResize=True, **kargs): """Add an annotation.
862ddc6db44e0f15ce4be898eafea39343ed98b7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6236/862ddc6db44e0f15ce4be898eafea39343ed98b7/GrayImageDispWdg.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24145, 12, 2890, 16, 8226, 559, 16, 709, 1616, 16, 6719, 16, 2342, 33, 7036, 16, 353, 1170, 1225, 33, 5510, 16, 2826, 79, 1968, 4672, 3536, 986, 392, 3204, 18, 2, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 24145, 12, 2890, 16, 8226, 559, 16, 709, 1616, 16, 6719, 16, 2342, 33, 7036, 16, 353, 1170, 1225, 33, 5510, 16, 2826, 79, 1968, 4672, 3536, 986, 392, 3204, 18, 2, -100, -100, -100, -...
self._CollectModuleMapBuffer(MapBuffer, ModuleList)
if self.LoadFixAddress != 0: self._CollectModuleMapBuffer(MapBuffer, ModuleList)
def _BuildPlatform(self): for BuildTarget in self.BuildTargetList: for ToolChain in self.ToolChainList: Wa = WorkspaceAutoGen( self.WorkspaceDir, self.Platform, BuildTarget, ToolChain, self.ArchList, self.BuildDatabase, self.TargetTxt, self.ToolDef, self.Fdf, self.FdList, self.FvList, self.SkuId ) self.BuildReport.AddPlatformReport(Wa) self.Progress.Stop("done!") self._Build(self.Target, Wa) # Create MAP file when Load Fix Address is enabled. if self.Target in ["", "all", "fds"] and self.LoadFixAddress != 0: for Arch in self.ArchList: # # Check whether the set fix address is above 4G for 32bit image. # if (Arch == 'IA32' or Arch == 'ARM') and self.LoadFixAddress != 0xFFFFFFFFFFFFFFFF and self.LoadFixAddress >= 0x100000000: EdkLogger.error("build", PARAMETER_INVALID, "FIX_LOAD_TOP_MEMORY_ADDRESS can't be set to larger than or equal to 4G for the platorm with IA32 or ARM arch modules") # # Get Module List # ModuleList = [] for Pa in Wa.AutoGenObjectList: for Ma in Pa.ModuleAutoGenList: if Ma == None: continue if not Ma.IsLibrary: ModuleList.append (Ma)
9ff69f35c75043c955fc92ca465db39f6bf1ead5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/914/9ff69f35c75043c955fc92ca465db39f6bf1ead5/build.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3116, 8201, 12, 2890, 4672, 364, 3998, 2326, 316, 365, 18, 3116, 2326, 682, 30, 364, 13288, 3893, 316, 365, 18, 6364, 3893, 682, 30, 678, 69, 273, 14396, 4965, 7642, 12, 365, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3116, 8201, 12, 2890, 4672, 364, 3998, 2326, 316, 365, 18, 3116, 2326, 682, 30, 364, 13288, 3893, 316, 365, 18, 6364, 3893, 682, 30, 678, 69, 273, 14396, 4965, 7642, 12, 365, 18, ...
pass def check_log_neg(self): """ Later have log(-1) raise warning, not error """ try: val = logn(3,-1) assert(0) except ValueError:
def check_log_0(self): """ Later have log(0) raise warning, not error """ try: val = logn(3,0) assert(0) except OverflowError: pass
c9316d1d2ba5e114019481f968becf25226dff17 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/c9316d1d2ba5e114019481f968becf25226dff17/test_misc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 1330, 67, 20, 12, 2890, 4672, 3536, 511, 2045, 1240, 613, 12, 20, 13, 1002, 3436, 16, 486, 555, 3536, 775, 30, 1244, 273, 613, 82, 12, 23, 16, 20, 13, 1815, 12, 20, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 1330, 67, 20, 12, 2890, 4672, 3536, 511, 2045, 1240, 613, 12, 20, 13, 1002, 3436, 16, 486, 555, 3536, 775, 30, 1244, 273, 613, 82, 12, 23, 16, 20, 13, 1815, 12, 20, 13, ...
<<<<<<< HEAD:pylal/bin/makeCheckList.py
def getFileMatchingTrigger(jobname,string_id,file_list=False): if os.access(jobname,os.F_OK): filesInDir = os.listdir(jobname) fileList = [] for paramFile in filesInDir: if fnmatch.fnmatch(paramFile, "*"+string_id+"*.html"): if file_list: fileList.append("../"+jobname+"/"+paramFile) else: return "../"+jobname+"/"+paramFile if fileList: return fileList else: return False else: return False
5817daa1a441fb0b130af380bec1b5875307e6e4 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3592/5817daa1a441fb0b130af380bec1b5875307e6e4/makeCheckList.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6034, 9517, 6518, 12, 4688, 529, 16, 1080, 67, 350, 16, 768, 67, 1098, 33, 8381, 4672, 309, 1140, 18, 3860, 12, 4688, 529, 16, 538, 18, 42, 67, 3141, 4672, 1390, 382, 1621, 273, 1140...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6034, 9517, 6518, 12, 4688, 529, 16, 1080, 67, 350, 16, 768, 67, 1098, 33, 8381, 4672, 309, 1140, 18, 3860, 12, 4688, 529, 16, 538, 18, 42, 67, 3141, 4672, 1390, 382, 1621, 273, 1140...
for GL_CLIP_PLANEi in self.clip_planes: glDisable(GL_CLIP_PLANEi)
for plane_i in self.clip_planes: glDisable(clip_constants[plane_i])
def draw(self, selection_box=None): # gl_context sensitive method # This function is called when the color and depth buffers have to be # refreshed, or when the user points to an object and you want to # identify it. viewport = glGetIntegerv(GL_VIEWPORT) width = viewport[2] height = viewport[3] universe = context.application.model.universe
e938fe9cb31891551a5add5eda4566b18297a74a /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11052/e938fe9cb31891551a5add5eda4566b18297a74a/scene.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3724, 12, 2890, 16, 4421, 67, 2147, 33, 7036, 4672, 468, 5118, 67, 2472, 16692, 707, 468, 1220, 445, 353, 2566, 1347, 326, 2036, 471, 3598, 9664, 1240, 358, 506, 468, 27880, 16, 578, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3724, 12, 2890, 16, 4421, 67, 2147, 33, 7036, 4672, 468, 5118, 67, 2472, 16692, 707, 468, 1220, 445, 353, 2566, 1347, 326, 2036, 471, 3598, 9664, 1240, 358, 506, 468, 27880, 16, 578, 1...
self.assert_(isinstance(vi, tuple))
self.assert_(isinstance(vi[:], tuple))
def test_attributes(self): self.assert_(isinstance(sys.api_version, int)) self.assert_(isinstance(sys.argv, list)) self.assert_(sys.byteorder in ("little", "big")) self.assert_(isinstance(sys.builtin_module_names, tuple)) self.assert_(isinstance(sys.copyright, basestring)) self.assert_(isinstance(sys.exec_prefix, basestring)) self.assert_(isinstance(sys.executable, basestring)) self.assertEqual(len(sys.float_info), 11) self.assertEqual(sys.float_info.radix, 2) self.assert_(isinstance(sys.hexversion, int)) self.assert_(isinstance(sys.maxint, int)) if test.test_support.have_unicode: self.assert_(isinstance(sys.maxunicode, int)) self.assert_(isinstance(sys.platform, basestring)) self.assert_(isinstance(sys.prefix, basestring)) self.assert_(isinstance(sys.version, basestring)) vi = sys.version_info self.assert_(isinstance(vi, tuple)) self.assertEqual(len(vi), 5) self.assert_(isinstance(vi[0], int)) self.assert_(isinstance(vi[1], int)) self.assert_(isinstance(vi[2], int)) self.assert_(vi[3] in ("alpha", "beta", "candidate", "final")) self.assert_(isinstance(vi[4], int))
4521252960c005c0f149a67b90cc0baf46a54471 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12029/4521252960c005c0f149a67b90cc0baf46a54471/test_sys.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 4350, 12, 2890, 4672, 365, 18, 11231, 67, 12, 291, 1336, 12, 9499, 18, 2425, 67, 1589, 16, 509, 3719, 365, 18, 11231, 67, 12, 291, 1336, 12, 9499, 18, 19485, 16, 666, 3719,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4350, 12, 2890, 4672, 365, 18, 11231, 67, 12, 291, 1336, 12, 9499, 18, 2425, 67, 1589, 16, 509, 3719, 365, 18, 11231, 67, 12, 291, 1336, 12, 9499, 18, 19485, 16, 666, 3719,...
msgName = operation.getOutputMessage().name
msgName = operation.output.name if not msgName: msgName = operation.name + 'Response'
def GetWSAActionOutput(operation): """Find wsa:Action attribute, and return value or the default.""" attr = operation.output.action if attr is not None: return attr.value targetNamespace = operation.getPortType().getWSDL().targetNamespace ptName = operation.getPortType().name msgName = operation.getOutputMessage().name if targetNamespace.endswith('/'): return '%s%s/%s' %(targetNamespace, ptName, msgName) return '%s/%s/%s' %(targetNamespace, ptName, msgName)
717c9537839cf2655e5eb151c8cd820c699ea538 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/13054/717c9537839cf2655e5eb151c8cd820c699ea538/WSDLTools.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 968, 2651, 37, 1803, 1447, 12, 7624, 4672, 3536, 3125, 4945, 69, 30, 1803, 1566, 16, 471, 327, 460, 578, 326, 805, 12123, 1604, 273, 1674, 18, 2844, 18, 1128, 309, 1604, 353, 486, 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, 968, 2651, 37, 1803, 1447, 12, 7624, 4672, 3536, 3125, 4945, 69, 30, 1803, 1566, 16, 471, 327, 460, 578, 326, 805, 12123, 1604, 273, 1674, 18, 2844, 18, 1128, 309, 1604, 353, 486, 599,...
if self.closed: raise ValueError, "I/O operation on closed file"
_complain_ifclosed(self.closed)
def flush(self): if self.closed: raise ValueError, "I/O operation on closed file"
5166db7c9a6294c039dc958e33d19139c1282f92 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/5166db7c9a6294c039dc958e33d19139c1282f92/StringIO.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3663, 12, 2890, 4672, 309, 365, 18, 12204, 30, 1002, 2068, 16, 315, 45, 19, 51, 1674, 603, 4375, 585, 6, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3663, 12, 2890, 4672, 309, 365, 18, 12204, 30, 1002, 2068, 16, 315, 45, 19, 51, 1674, 603, 4375, 585, 6, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
candidates.sort(cmp=lambda x,y: cmp(len(x), len(y)), reverse=True) return candidates[0]
return ': '.join(candidates)
def get_title(self, entry): candidates = [x.text for x in title(entry)] candidates.sort(cmp=lambda x,y: cmp(len(x), len(y)), reverse=True) return candidates[0]
209980eb0442a0c254100c4415b63a9b46c01e83 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9125/209980eb0442a0c254100c4415b63a9b46c01e83/google_books.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 2649, 12, 2890, 16, 1241, 4672, 7965, 273, 306, 92, 18, 955, 364, 619, 316, 2077, 12, 4099, 25887, 7965, 18, 3804, 12, 9625, 33, 14661, 619, 16, 93, 30, 9411, 12, 1897, 12, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 2649, 12, 2890, 16, 1241, 4672, 7965, 273, 306, 92, 18, 955, 364, 619, 316, 2077, 12, 4099, 25887, 7965, 18, 3804, 12, 9625, 33, 14661, 619, 16, 93, 30, 9411, 12, 1897, 12, ...
@param str: a string as a user enters it for Search Text in Core
@param searchstr: a string as a user enters it for Search Text in Core
def FindBinary(ea, flag, str, radix=16): """ @param ea: start address @param flag: combination of SEARCH_* flags @param str: a string as a user enters it for Search Text in Core @param radix: radix of the numbers (default=16) @return: ea of result or BADADDR if not found @note: Example: "41 42" - find 2 bytes 41h,42h (radix is 16) """ endea = flag & 1 and idaapi.cvar.inf.maxEA or idaapi.cvar.inf.minEA return idaapi.find_binary(ea, endea, str, radix, flag)
76aa24fecdace41c9fc827e500b95cfdf5053272 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4773/76aa24fecdace41c9fc827e500b95cfdf5053272/idc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4163, 5905, 12, 24852, 16, 2982, 16, 609, 16, 19015, 33, 2313, 4672, 3536, 632, 891, 24164, 30, 787, 1758, 632, 891, 2982, 30, 10702, 434, 24053, 67, 14, 2943, 632, 891, 1623, 701, 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, 4163, 5905, 12, 24852, 16, 2982, 16, 609, 16, 19015, 33, 2313, 4672, 3536, 632, 891, 24164, 30, 787, 1758, 632, 891, 2982, 30, 10702, 434, 24053, 67, 14, 2943, 632, 891, 1623, 701, 30,...
params['quality_log'] = '\n'.join(data['quality_log'])
params['quality_log'] = base64.encodestring('\n'.join(data['quality_log']))
def create_test_step_log(step_object = None, step_name = ''): source = step_object.build.builder.test_ids properties = step_object.build.builder.openerp_properties openerp_host = properties.get('openerp_host', 'localhost') openerp_port = properties.get('openerp_port',8069) openerp_dbname = properties.get('openerp_dbname','buildbot') openerp_userid = properties.get('openerp_userid','admin') openerp_userpwd = properties.get('openerp_userpwd','a') revision = step_object.build.source.changes[0].revision openerp = buildbot_xmlrpc(host = openerp_host, port = openerp_port, dbname = openerp_dbname) openerp_uid = openerp.execute('common','login', openerp.dbname, openerp_userid, openerp_userpwd) tested_branch = step_object.build.source.changes[0].branch args = [('url','ilike',tested_branch),('is_test_branch','=',False),('is_root_branch','=',False)] tested_branch_ids = openerp.execute('object', 'execute', openerp.dbname, openerp_uid, openerp_userpwd, 'buildbot.lp.branch','search',args) tested_branch_id = tested_branch_ids[0] last_revision_no_stored = properties.get(tested_branch_id, {}).get('latest_rev_no',0) last_revision_id_stored = properties.get(tested_branch_id, {}).get('latest_rev_id','') test_id = source.get(revision, False) summary = step_object.summaries for logname, data in summary.items(): state = data.get('state', 'pass') if step_name in ('bzr-update', 'bzr_merge'): if state == 'fail': test_values = {'failure_reason':'This test has been skipped because the step %s has failed ! \n for more details please refer the Test steps tab.'%(step_name),'state':state} branch_values = {'latest_rev_no':last_revision_no_stored,'latest_rev_id':last_revision_id_stored} openerp.execute('object', 'execute', openerp.dbname, openerp_uid, openerp_userpwd, 'buildbot.lp.branch','write', [int(tested_branch_id)], branch_values) openerp.execute('object', 'execute', openerp.dbname, openerp_uid, openerp_userpwd, 'buildbot.test','write', [int(test_id)], test_values) openerp.execute('object', 'execute', openerp.dbname, openerp_uid, openerp_userpwd, 'buildbot.test','write', [int(test_id)],{'environment':step_object.env_info}) params = {} params['name'] = logname params['test_id'] = int(test_id) if data.get('quality_log', False): params['quality_log'] = '\n'.join(data['quality_log']) if data.get('log', False): params['log'] = '\n'.join(data['log'])
6d6c07318e72f2cfd641fd0e817cf381725a024d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12355/6d6c07318e72f2cfd641fd0e817cf381725a024d/buildstep.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 3813, 67, 4119, 67, 1330, 12, 4119, 67, 1612, 273, 599, 16, 2235, 67, 529, 273, 875, 4672, 1084, 273, 2235, 67, 1612, 18, 3510, 18, 9574, 18, 3813, 67, 2232, 1790, 273, 2235...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3813, 67, 4119, 67, 1330, 12, 4119, 67, 1612, 273, 599, 16, 2235, 67, 529, 273, 875, 4672, 1084, 273, 2235, 67, 1612, 18, 3510, 18, 9574, 18, 3813, 67, 2232, 1790, 273, 2235...
self.out.append( '\\end{verbatim}\n' ) self.verbatim = False
self.depart_literal_block(node)
def depart_doctest_block(self, node): self.out.append( '\\end{verbatim}\n' ) self.verbatim = False
076d00bd0605d15972b6cbdbbe03a606124d2cc8 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8194/076d00bd0605d15972b6cbdbbe03a606124d2cc8/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 26000, 67, 2896, 299, 395, 67, 2629, 12, 2890, 16, 756, 4672, 365, 18, 659, 18, 6923, 12, 3718, 409, 95, 16629, 22204, 6280, 82, 11, 262, 365, 18, 16629, 22204, 273, 1083, 2, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 26000, 67, 2896, 299, 395, 67, 2629, 12, 2890, 16, 756, 4672, 365, 18, 659, 18, 6923, 12, 3718, 409, 95, 16629, 22204, 6280, 82, 11, 262, 365, 18, 16629, 22204, 273, 1083, 2, -100, -...
out, errs = self.runcmd("gdb --batch " + "-ex 'break main' -ex 'run' -ex 'step' link/testtmp </dev/null") self.assert_equal(errs, '')
f = open('gdb_commands', 'w') f.write('break main\nrun\nstep\n') f.close() out, errs = self.runcmd("gdb --batch --command=gdb_commands " "link/testtmp </dev/null") error_message = 'Failed to read a valid object file image from memory.\n' if errs: self.assert_equal(errs, error_message)
def checkBuiltProgram(self): # Run gdb and verify that it is able to correctly locate the # testtmp.c source file. out, errs = self.runcmd("gdb --batch " + "-ex 'break main' -ex 'run' -ex 'step' link/testtmp </dev/null") self.assert_equal(errs, '') self.assert_re_search('puts\\(HELLO_WORLD\\);', out) self.assert_re_search('testtmp.c:5', out)
fdaf4c739372bb2a573823fa0779dc82dc60ac67 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7392/fdaf4c739372bb2a573823fa0779dc82dc60ac67/testdistcc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 16409, 9459, 12, 2890, 4672, 468, 1939, 314, 1966, 471, 3929, 716, 518, 353, 7752, 358, 8783, 10627, 326, 468, 1842, 5645, 18, 71, 1084, 585, 18, 565, 284, 273, 1696, 2668, 75, 19...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 16409, 9459, 12, 2890, 4672, 468, 1939, 314, 1966, 471, 3929, 716, 518, 353, 7752, 358, 8783, 10627, 326, 468, 1842, 5645, 18, 71, 1084, 585, 18, 565, 284, 273, 1696, 2668, 75, 19...
res[-1]['tax_code_id'] = tax['base_code_id'] res[-1]['tax_amount'] = tax['price_unit'] * line['quantity'] * tax['base_sign']
tax_code_id = tax['base_code_id'] tax_amount = tax['price_unit'] * \ line['quantity'] * tax['base_sign']
def move_line_get(self, cr, uid, invoice_id, context={}): res = [] tax_grouped = {} tax_obj = self.pool.get('account.tax') cur_obj = self.pool.get('res.currency') ait_obj = self.pool.get('account.invoice.tax') inv = self.pool.get('account.invoice').browse(cr, uid, invoice_id) cur = inv.currency_id
2dc533b969687458f10362d76b0d0320bfe478db /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7397/2dc533b969687458f10362d76b0d0320bfe478db/invoice.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3635, 67, 1369, 67, 588, 12, 2890, 16, 4422, 16, 4555, 16, 9179, 67, 350, 16, 819, 12938, 4672, 400, 273, 5378, 5320, 67, 25472, 273, 2618, 5320, 67, 2603, 273, 365, 18, 6011, 18, 58...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3635, 67, 1369, 67, 588, 12, 2890, 16, 4422, 16, 4555, 16, 9179, 67, 350, 16, 819, 12938, 4672, 400, 273, 5378, 5320, 67, 25472, 273, 2618, 5320, 67, 2603, 273, 365, 18, 6011, 18, 58...
"Retrieve saved game."
"Retrieve saved game."
def thaw(): "Retrieve saved game." game.passwd[0] = '\0' key = scanner.next() if key == "IHEOL": proutn(_("File name: ")) key = scanner.next() if key != "IHALPHA": huh() return True scanner.chew() if '.' not in scanner.token: scanner.token += ".trk" try: fp = open(scanner.token, "rb") except IOError: prout(_("Can't thaw game in %s") % scanner.token) return game = cPickle.load(fp) fp.close() return False
eafdd35f1af1e4e93d3609a0adbe768b562907e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3176/eafdd35f1af1e4e93d3609a0adbe768b562907e0/sst.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 286, 2219, 13332, 315, 5767, 5198, 7920, 1199, 7920, 18, 24002, 63, 20, 65, 273, 2337, 20, 11, 498, 273, 7683, 18, 4285, 1435, 309, 498, 422, 315, 45, 3900, 1741, 6877, 450, 322, 82, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 286, 2219, 13332, 315, 5767, 5198, 7920, 1199, 7920, 18, 24002, 63, 20, 65, 273, 2337, 20, 11, 498, 273, 7683, 18, 4285, 1435, 309, 498, 422, 315, 45, 3900, 1741, 6877, 450, 322, 82, ...
TabPageLayout_6.addItem(spacer47,0,1)
TabPageLayout_7.addItem(spacer47,0,1)
def __init__(self,parent = None,name = None,modal = 0,fl = 0): QDialog.__init__(self,parent,name,modal,fl)
7cc18611a6df93ebc9707a8878e31fb8451f8ff6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/7cc18611a6df93ebc9707a8878e31fb8451f8ff6/UserPrefsDialog.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2938, 273, 599, 16, 529, 273, 599, 16, 17638, 273, 374, 16, 2242, 273, 374, 4672, 2238, 6353, 16186, 2738, 972, 12, 2890, 16, 2938, 16, 529, 16, 17638, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2938, 273, 599, 16, 529, 273, 599, 16, 17638, 273, 374, 16, 2242, 273, 374, 4672, 2238, 6353, 16186, 2738, 972, 12, 2890, 16, 2938, 16, 529, 16, 17638, ...
move = False;
no_move = True
def Parse(self, name, oname=None): self.files_open(name,oname) #self.begin_ncblock() #self.begin_path(None) #self.add_line(z=500) #self.end_path() #self.end_ncblock() path_col = None f = None arc = 0
9819f19aa4c4ab39b057b35d4cd7e3ad69069bae /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12576/9819f19aa4c4ab39b057b35d4cd7e3ad69069bae/iso_read.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2884, 12, 2890, 16, 508, 16, 603, 339, 33, 7036, 4672, 365, 18, 2354, 67, 3190, 12, 529, 16, 265, 339, 13, 225, 468, 2890, 18, 10086, 67, 14202, 2629, 1435, 468, 2890, 18, 10086, 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, 2884, 12, 2890, 16, 508, 16, 603, 339, 33, 7036, 4672, 365, 18, 2354, 67, 3190, 12, 529, 16, 265, 339, 13, 225, 468, 2890, 18, 10086, 67, 14202, 2629, 1435, 468, 2890, 18, 10086, 67,...
oldnode = self.node_filters(oldnode) if hasattr(oldnode, 'gwikiremove'): continue
if oldnode: oldnode = self.node_filters(oldnode) if hasattr(oldnode, 'gwikiremove'): continue
def traverse(self, outgraph, nodes): newnodes = nodes
9d182c77eb012f5a1c544a716c4514e94e52fd76 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/888/9d182c77eb012f5a1c544a716c4514e94e52fd76/ShowGraph.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10080, 12, 2890, 16, 596, 4660, 16, 2199, 4672, 394, 4690, 273, 2199, 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, 10080, 12, 2890, 16, 596, 4660, 16, 2199, 4672, 394, 4690, 273, 2199, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
def fl_set_browser_dblclick_callback(ob, pycb, a): """ fl_set_browser_dblclick_callback(ob, pycb, a) """
def fl_set_browser_dblclick_callback(pObject, pycb, a): """ fl_set_browser_dblclick_callback(pObject, pycb, a) """
def fl_set_browser_dblclick_callback(ob, pycb, a): """ fl_set_browser_dblclick_callback(ob, pycb, a) """ c_cb = FL_CALLBACKPTR(pycb) _cfunc_refs[get_rand_dictkey()] = c_cb _fl_set_browser_dblclick_callback(ob, c_cb, a)
9942dac8ce2b35a1e43615a26fd8e7054ef805d3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2429/9942dac8ce2b35a1e43615a26fd8e7054ef805d3/xformslib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1183, 67, 542, 67, 11213, 67, 1966, 80, 7475, 67, 3394, 12, 84, 921, 16, 2395, 7358, 16, 279, 4672, 3536, 1183, 67, 542, 67, 11213, 67, 1966, 80, 7475, 67, 3394, 12, 84, 921, 16, 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, 1183, 67, 542, 67, 11213, 67, 1966, 80, 7475, 67, 3394, 12, 84, 921, 16, 2395, 7358, 16, 279, 4672, 3536, 1183, 67, 542, 67, 11213, 67, 1966, 80, 7475, 67, 3394, 12, 84, 921, 16, 2...
"redhat-config-securitylevel", "rhn-applet", "rhnlib", "rhpl",
"redhat-config-securitylevel", "redhat-logos", "redhat-release", "rhn-applet", "rhnlib", "rhpl",
def extractSrpm(pkg, pkgdir, filecache, repodir, oldpkg): files = pkg.getFilenames() i = pkg.getSpecfile(files) specfile = files[i] if os.path.exists("%s/%s" % (pkgdir, specfile)): checksum = getChecksum("%s/%s" % (pkgdir, specfile)) # same spec file in repo and in rpm: nothing to do if checksum == pkg["filemd5s"][i]: return os.system('rm -rf "%s"' % pkgdir) makeDirs(pkgdir) extractRpm(pkg, pkgdir + "/") for f in os.listdir(pkgdir): if f not in files and f not in ("Makefile", "sources"): fsrc = pkgdir + "/" + f os.unlink(fsrc) os.system("cd %s && git-update-index --remove %s" % (pkgdir, f)) if "sources" in files or "Makefile" in files: raise ValueError, \ "src.rpm contains sources/Makefile: %s" % pkg.filename EXTRACT_SOURCE_FOR = ["MAKEDEV", "anaconda", "anaconda-help", "anaconda-product", "basesystem", "booty", "chkconfig", "device-mapper", "dmraid", "firstboot", "glibc-kernheaders", "hwdata", "initscripts", "iscsi-initiator-utils", "kudzu", "mkinitrd", "pam_krb5", "passwd", "redhat-config-kickstart", "redhat-config-netboot", "redhat-config-network", "redhat-config-securitylevel", "rhn-applet", "rhnlib", "rhpl", "sysklogd", "system-config-printer", "system-config-securitylevel", "tux", "udev"] sources = [] if filecache: for i in xrange(len(files)): f = files[i] if not S_ISREG(pkg["filemodes"][i]) or not isBinary(f): continue fsrc = pkgdir + "/" + f # should we use sha instead of md5: #md5data = getChecksum(fsrc, "sha") md5data = pkg["filemd5s"][i] fdir = "%s/%s" % (filecache, md5data[0:2]) fname = "%s/%s.bin" % (fdir, md5data) # XXX disable this until my machine has more disk space if None and not os.path.isfile(fname): makeDirs(fdir) doLnOrCopy(fsrc, fname) if pkg["name"] in EXTRACT_SOURCE_FOR: if fsrc.find(".tar") >= 0: tempdir = "%s/e.tar" % pkgdir os.mkdir(tempdir) dirname = explodeFile(fsrc, tempdir, "0") os.rename(dirname, "%s/tar" % pkgdir) os.rmdir(tempdir) os.unlink(fsrc) sources.append("%s %s\n" % (md5data, f)) sources.sort(cmpNoMD5) writeFile(pkgdir + "/sources", sources) writeFile(pkgdir + "/Makefile", [ "include ../pyrpm/Makefile.srpm\n", "NAME:=%s\nSPECFILE:=%s\n" % (pkg["name"], specfile)]) # XXX: also checkin the data into a per-package repo os.system("cd %s && { find . -path ./.git -prune -o -type f -print | sed -e 's|^./||' | xargs git-update-index --add --refresh; }" % pkgdir) os.system('cd %s && { for file in $(git-ls-files); do [ ! -f "$file" ] && git-update-index --remove "$file"; done; }' % pkgdir) if oldpkg: (fd, tmpfile) = mkstemp_file("/tmp", special=1) fd.write("update %s from %s-%s to %s-%s\n\nchangelog:\n\n" % \ (pkg["name"], oldpkg["version"], oldpkg["release"], pkg["version"], pkg["release"]) + \ getChangeLogDiff(oldpkg, pkg)) fd.close() del fd changelog = "-F " + tmpfile user = "cvs@devel.redhat.com" email = user if pkg["changelogname"]: user = pkg["changelogname"][0] if user.rfind("> ") != -1: user = user[:user.rfind("> ") + 1] email = user if email.find("<") != -1: email = email[email.find("<") + 1:email.rfind(">") + 1] if user.rfind(" <") != -1: user = user[:user.rfind(" <")] # XXX if we monitor trees, we could change the checkin time to # first day of release of the rpm package instead of rpm buildtime # XXX git knows about an "order" file which gives information on # how to order files for a diff: "*.spec" (.spec first) buildtime = str(pkg.hdr.getOne("buildtime")) os.system("cd " + repodir + " && GIT_AUTHOR_NAME=\"" + user + \ "\" GIT_AUTHOR_EMAIL=\"" + email + "\" GIT_AUTHOR_DATE=" + \ buildtime + " GIT_COMMITTER_NAME=\"" + user + \ "\" GIT_COMMITTER_EMAIL=\"" + email + "\" GIT_COMMITTER_DATE=" + \ buildtime + " git commit " + changelog) if tmpfile != None: os.unlink(tmpfile)
d4a3970fa3f1947aabfdd4eca421bbf58568d6ba /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1143/d4a3970fa3f1947aabfdd4eca421bbf58568d6ba/oldpyrpm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2608, 55, 86, 7755, 12, 10657, 16, 3475, 1214, 16, 585, 2493, 16, 2071, 369, 481, 16, 1592, 10657, 4672, 1390, 273, 3475, 18, 588, 25579, 6809, 1435, 277, 273, 3475, 18, 588, 1990, 768...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2608, 55, 86, 7755, 12, 10657, 16, 3475, 1214, 16, 585, 2493, 16, 2071, 369, 481, 16, 1592, 10657, 4672, 1390, 273, 3475, 18, 588, 25579, 6809, 1435, 277, 273, 3475, 18, 588, 1990, 768...
if event == PLAY_END and event.arg: self.player.stop() if self.try_next_player(): return True if event in ( STOP, PLAY_END, USER_END ):
if event == STOP:
def eventhandler(self, event): """ React on some events or send them to the real player or the item belongig to the player """ if event == PLAY_END and event.arg: self.player.stop() if self.try_next_player(): return True if event in ( STOP, PLAY_END, USER_END ): self.stop() return self.item.eventhandler(event)
c625fd022e9c07023fcf392ffa3303e8d2b32768 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/c625fd022e9c07023fcf392ffa3303e8d2b32768/player.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 871, 4176, 12, 2890, 16, 871, 4672, 3536, 13732, 603, 2690, 2641, 578, 1366, 2182, 358, 326, 2863, 7291, 578, 326, 761, 10957, 360, 358, 326, 7291, 3536, 282, 309, 871, 422, 17815, 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, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 871, 4176, 12, 2890, 16, 871, 4672, 3536, 13732, 603, 2690, 2641, 578, 1366, 2182, 358, 326, 2863, 7291, 578, 326, 761, 10957, 360, 358, 326, 7291, 3536, 282, 309, 871, 422, 17815, 30, ...
break return off_source_segment, list(ifo_combo)
if off_source_segment.duration()==(1+max_trials)*on_source.duration()+2*padding_time: return off_source_segment, list(ifo_combo) return None, []
def multi_ifo_compute_offsource_segment(analyzable_dict, on_source, **kwargs): """ Return the off-source segment determined for multiple IFO times along with the IFO combo that determined that segment. Calls compute_offsource_segment as necessary, passing all kwargs as necessary. """ # sieve down to relevant segments new_analyzable_dict = segments.segmentlistdict() for ifo, seglist in analyzable_dict.iteritems(): try: ind = seglist.find(on_source) except ValueError: continue new_analyzable_dict[ifo] = segments.segmentlist([seglist[ind]]) analyzable_ifos = new_analyzable_dict.keys() # now try getting off-source segments; start trying with all IFOs, then # work our way to smaller and smaller subsets; exclude single IFOs. off_source_segment = None make_ifo_combos = lambda n: iterutils.choices(analyzable_ifos, n) countdown = xrange(len(analyzable_ifos), 1, -1) for ifo_combo in itertools.chain(*itertools.imap(make_ifo_combos, countdown)): trial_seglist = new_analyzable_dict.union(list(ifo_combo)) off_source_segment = compute_offsource_segment(trial_seglist, on_source, **kwargs) if off_source_segment is not None: break return off_source_segment, list(ifo_combo)
56d34618858cf3a95544bac51ec0c731ae71be5e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5758/56d34618858cf3a95544bac51ec0c731ae71be5e/grbsummary.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3309, 67, 20299, 67, 9200, 67, 26600, 552, 67, 9273, 12, 304, 4647, 429, 67, 1576, 16, 603, 67, 3168, 16, 2826, 4333, 4672, 3536, 2000, 326, 3397, 17, 3168, 3267, 11383, 364, 3229, 467...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3309, 67, 20299, 67, 9200, 67, 26600, 552, 67, 9273, 12, 304, 4647, 429, 67, 1576, 16, 603, 67, 3168, 16, 2826, 4333, 4672, 3536, 2000, 326, 3397, 17, 3168, 3267, 11383, 364, 3229, 467...
if callable(default): default = default() if isinstance(default, basestring): default = "'%s'" % default.replace("'", "''") elif isinstance(default, datetime.date): default = "'%s'" % default sql += " DEFAULT %s" sqlparams = (default)
if default is not None: if callable(default): default = default() if isinstance(default, basestring): default = "'%s'" % default.replace("'", "''") elif isinstance(default, datetime.date): default = "'%s'" % default sql += " DEFAULT %s" sqlparams = (default)
def column_sql(self, table_name, field_name, field, tablespace=''): """ Creates the SQL snippet for a column. Used by add_column and add_table. """ qn = connection.ops.quote_name
228cb922ff8e03548162d5b541caeaa9bcab42ad /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/13142/228cb922ff8e03548162d5b541caeaa9bcab42ad/generic.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1057, 67, 4669, 12, 2890, 16, 1014, 67, 529, 16, 652, 67, 529, 16, 652, 16, 4606, 909, 2218, 11, 4672, 3536, 10210, 326, 3063, 13016, 364, 279, 1057, 18, 10286, 635, 527, 67, 2827, 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, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1057, 67, 4669, 12, 2890, 16, 1014, 67, 529, 16, 652, 67, 529, 16, 652, 16, 4606, 909, 2218, 11, 4672, 3536, 10210, 326, 3063, 13016, 364, 279, 1057, 18, 10286, 635, 527, 67, 2827, 4...
return pygments.highlight(data, lexer, HtmlFormatter()).splitlines()
return pygments.highlight(data, lexer, NoWrapperHtmlFormatter()).splitlines()
def apply_pygments(data, filename): # XXX Guessing is preferable but really slow, especially on XML # files. #if filename.endswith(".xml"): lexer = get_lexer_for_filename(filename, stripnl=False, encoding='utf-8') #else: # lexer = guess_lexer_for_filename(filename, data, stripnl=False)
15860e8ec75844bb97196c1eb75fabe7d38c3b93 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1600/15860e8ec75844bb97196c1eb75fabe7d38c3b93/diffutils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2230, 67, 2074, 75, 1346, 12, 892, 16, 1544, 4672, 468, 11329, 30282, 310, 353, 13256, 429, 1496, 8654, 11816, 16, 29440, 603, 3167, 468, 377, 1390, 18, 468, 430, 1544, 18, 5839, 1918, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2230, 67, 2074, 75, 1346, 12, 892, 16, 1544, 4672, 468, 11329, 30282, 310, 353, 13256, 429, 1496, 8654, 11816, 16, 29440, 603, 3167, 468, 377, 1390, 18, 468, 430, 1544, 18, 5839, 1918, ...
(instance.name, result.stdout, result.stderr, result.fail_reason))
(command, instance_name, result.stdout, result.stderr, result.fail_reason))
def _CallMonitorCommand(self, instance_name, command): """Invoke a command on the instance monitor.
9798fcae7b05028177f442c90d432c2e298a4c48 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7542/9798fcae7b05028177f442c90d432c2e298a4c48/hv_kvm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1477, 7187, 2189, 12, 2890, 16, 791, 67, 529, 16, 1296, 4672, 3536, 10969, 279, 1296, 603, 326, 791, 6438, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1477, 7187, 2189, 12, 2890, 16, 791, 67, 529, 16, 1296, 4672, 3536, 10969, 279, 1296, 603, 326, 791, 6438, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
def dispatch_depart(self, node, method_name):
def dispatch_departure(self, node, method_name):
def dispatch_depart(self, node, method_name): method = getattr(self, 'depart_' + method_name, self.unknown_departure) return method(node)
d8675c9c45c0a12e21b9b26f33f8ec324d406168 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5620/d8675c9c45c0a12e21b9b26f33f8ec324d406168/nodes.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3435, 67, 323, 2680, 594, 12, 2890, 16, 756, 16, 707, 67, 529, 4672, 707, 273, 3869, 12, 2890, 16, 296, 323, 2680, 4623, 397, 707, 67, 529, 16, 365, 18, 8172, 67, 323, 2680, 594, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3435, 67, 323, 2680, 594, 12, 2890, 16, 756, 16, 707, 67, 529, 4672, 707, 273, 3869, 12, 2890, 16, 296, 323, 2680, 4623, 397, 707, 67, 529, 16, 365, 18, 8172, 67, 323, 2680, 594, 1...
convert_unicode = True
conn_params['engine_kwargs']['convert_unicode'] = True conn_params['engine_kwargs']['pool_recycle'] = int(config.get('pool_recycle', 3600, section='database'))
def __init__(self, config, griffith_dir, fallback=True): #mapper = Session.mapper self.config = config self.data_dir = griffith_dir
99f25dfdd3c0a9ef6970a2f3a8bb4c4ac4090c3d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2687/99f25dfdd3c0a9ef6970a2f3a8bb4c4ac4090c3d/sql.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 642, 16, 3821, 3048, 483, 67, 1214, 16, 5922, 33, 5510, 4672, 468, 13919, 273, 3877, 18, 13919, 365, 18, 1425, 273, 642, 365, 18, 892, 67, 1214, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 642, 16, 3821, 3048, 483, 67, 1214, 16, 5922, 33, 5510, 4672, 468, 13919, 273, 3877, 18, 13919, 365, 18, 1425, 273, 642, 365, 18, 892, 67, 1214, 273, 3...
if (not os.path.exists(f)) and '_' in iso_lang:
if (not f) and '_' in iso_lang:
def update_translations(self, cr, uid, ids, filter_lang=None, context={}): logger = logging.getLogger('i18n') if not filter_lang: pool = pooler.get_pool(cr.dbname) lang_obj = pool.get('res.lang') lang_ids = lang_obj.search(cr, uid, [('translatable', '=', True)]) filter_lang = [lang.code for lang in lang_obj.browse(cr, uid, lang_ids)] elif not isinstance(filter_lang, (list, tuple)): filter_lang = [filter_lang]
ad7090c219b5bf48019e18685e544b5d84865c13 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12853/ad7090c219b5bf48019e18685e544b5d84865c13/module.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 67, 13457, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 1034, 67, 4936, 33, 7036, 16, 819, 12938, 4672, 1194, 273, 2907, 18, 588, 3328, 2668, 77, 2643, 82, 6134, 309, 486, 1034, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 13457, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 1034, 67, 4936, 33, 7036, 16, 819, 12938, 4672, 1194, 273, 2907, 18, 588, 3328, 2668, 77, 2643, 82, 6134, 309, 486, 1034, ...
for a in r.get_iterator():
for a in r:
def _handle_PDB_exception(self, message, line_counter): """ This method catches an exception that occurs in the StructureBuilder object (if PERMISSIVE==1), or raises it again, this time adding the PDB line number to the error message. """ message="%s at line %i." % (message, line_counter) if self.PERMISSIVE: # just print a warning - some residues/atoms will be missing print "PDBConstructionException: %s" % message print "Exception ignored.\nSome atoms or residues will be missing in the data structure." else: # exceptions are fatal - raise again with new message (including line nr) raise PDBConstructionException, message
45139bc26c13b1367f13203d5d2562c75233b508 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7167/45139bc26c13b1367f13203d5d2562c75233b508/PDBParser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4110, 67, 52, 2290, 67, 4064, 12, 2890, 16, 883, 16, 980, 67, 7476, 4672, 3536, 1220, 707, 1044, 281, 392, 1520, 716, 9938, 316, 326, 13348, 1263, 733, 261, 430, 10950, 7492, 1260...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4110, 67, 52, 2290, 67, 4064, 12, 2890, 16, 883, 16, 980, 67, 7476, 4672, 3536, 1220, 707, 1044, 281, 392, 1520, 716, 9938, 316, 326, 13348, 1263, 733, 261, 430, 10950, 7492, 1260...
self._set_rect(maparea.rect)
if maparea is not None: self._set_rect(maparea.rect)
def from_maparea(cls, maparea, owner): self = super(XywhMapArea, cls).from_maparea(maparea, owner) self._set_rect(maparea.rect) return self
81de20deaac2b084507ef02f4d0c7d8cef8d3dcf /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3683/81de20deaac2b084507ef02f4d0c7d8cef8d3dcf/annotations.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 628, 67, 1458, 5036, 12, 6429, 16, 852, 5036, 16, 3410, 4672, 365, 273, 2240, 12, 60, 93, 3350, 863, 5484, 16, 2028, 2934, 2080, 67, 1458, 5036, 12, 1458, 5036, 16, 3410, 13, 309, 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, 628, 67, 1458, 5036, 12, 6429, 16, 852, 5036, 16, 3410, 4672, 365, 273, 2240, 12, 60, 93, 3350, 863, 5484, 16, 2028, 2934, 2080, 67, 1458, 5036, 12, 1458, 5036, 16, 3410, 13, 309, 85...
if crls: rpki.log.warn("CMS CRL support disabled due to an OpenSSL bug I haven't tracked down yet, ignoring CRL") crls = ()
def sign(self, keypair, certs, crls = None, no_certs = False): """Sign and wrap inner content."""
7c36a0a73c06aeec425ce270b79c516bc1a8534c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/119/7c36a0a73c06aeec425ce270b79c516bc1a8534c/x509.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1573, 12, 2890, 16, 25298, 16, 13870, 16, 18789, 87, 273, 599, 16, 1158, 67, 24596, 273, 1083, 4672, 3536, 2766, 471, 2193, 3443, 913, 12123, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1573, 12, 2890, 16, 25298, 16, 13870, 16, 18789, 87, 273, 599, 16, 1158, 67, 24596, 273, 1083, 4672, 3536, 2766, 471, 2193, 3443, 913, 12123, 2, -100, -100, -100, -100, -100, -100, -100,...
op.add_option("-g", "--group-address", dest="groupAddrs", type="string", action="append", help="print only this group address(es) (can be repeated)", metavar="<GROUP ADDR>") op.add_option("-t", "--type", dest="types", action="append", choices=["%", "time", "temp"], help="convert value to specified type", metavar="<TYPE>")
op.add_option("-g", "--group-address", action="callback", callback=groupAddr_callback, help="Specify which group address(es) to print, and optionally " "what type to convert the value to")
def readParseAndPrint(devicesfilename, groupaddrfilename, infilenames, dumpGAtable, groupAddrs, types, flanksOnly, tail, plot): # # Read in all the files... # lines = [] for infilename in infilenames: try: inf = open(infilename, "r") except IOError: print "%s: Unable to open file: %s" %(sys.argv[0], infilename) sys.exit(1); except: op.print_help() sys.exit(1); print "Reading file: %s" % infilename lines.extend(inf.readlines()) inf.close() print "Creating parser..." knx = KnxParser(devicesfilename, groupaddrfilename, dumpGAtable, flanksOnly, types) if tail != 0: if tail < len(lines): lines = lines[len(lines) - tail :] # # Parsing the input... # basetime = 0 lineNo = 0 for line in lines: # Skip empty lines... if len(line.strip()) < 1: continue lineNo += 1 # Split timestamp from rest... try: timestamp, pdu = line.split(":LPDU:") except ValueError: timestamp, pdu = line.split("LPDU:") try: if basetime == 0: basetime = time.mktime(time.strptime(timestamp, "%a %b %d %H:%M:%S %Y")) # print timestamp knx.setTimeBase(basetime) except ValueError: printVerbose("timestamp error: %s" %timestamp) knx.parseVbusOutput(lineNo, timestamp, pdu) if lineNo % 10000 == 0: print "Parsed %d lines..." %lineNo print "Parsed %d lines..." %lineNo # # Ok, file(s) read and parsed # if not plot: knx.printStreams(groupAddrs) else: knx.plotStreams(groupAddrs)
ed330f6b89df5e36da27e444855e0b166dc9eda1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10061/ed330f6b89df5e36da27e444855e0b166dc9eda1/knxmonitor_decoder.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 3201, 1876, 5108, 12, 12506, 3459, 16, 1041, 4793, 3459, 16, 316, 19875, 16, 4657, 43, 861, 429, 16, 1041, 13811, 16, 1953, 16, 1183, 19965, 3386, 16, 5798, 16, 3207, 4672, 225, 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, 855, 3201, 1876, 5108, 12, 12506, 3459, 16, 1041, 4793, 3459, 16, 316, 19875, 16, 4657, 43, 861, 429, 16, 1041, 13811, 16, 1953, 16, 1183, 19965, 3386, 16, 5798, 16, 3207, 4672, 225, 4...
gdal2tiles.process()
gdal2tiles.process()
def generate_openlayers( self ): """ Template for openlayers.html implementing overlay of available Spherical Mercator layers.
c3d8df74eef052268add49773dc5efec101e76b2 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10290/c3d8df74eef052268add49773dc5efec101e76b2/gdal2tiles.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 67, 3190, 10396, 12, 365, 262, 30, 3536, 5035, 364, 1696, 10396, 18, 2620, 19981, 9218, 434, 2319, 348, 21570, 490, 12610, 639, 6623, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 67, 3190, 10396, 12, 365, 262, 30, 3536, 5035, 364, 1696, 10396, 18, 2620, 19981, 9218, 434, 2319, 348, 21570, 490, 12610, 639, 6623, 18, 2, -100, -100, -100, -100, -100, -100, -10...
3*zeta156^26 + 2*zeta156^13 - 3
3*zeta12^2 + 2*zeta12 - 3
def jacobi_sum(self, char, check=True): """ Return the Jacobi sum associated to these Dirichlet characters (i.e., J(self,char)).
9c9051916e82d8e6549f10cbafc69b92d5f2a89f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9417/9c9051916e82d8e6549f10cbafc69b92d5f2a89f/dirichlet.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 20138, 30875, 67, 1364, 12, 2890, 16, 1149, 16, 866, 33, 5510, 4672, 3536, 2000, 326, 804, 1077, 30875, 2142, 3627, 358, 4259, 8446, 1354, 1810, 3949, 261, 77, 18, 73, 12990, 804, 12, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 20138, 30875, 67, 1364, 12, 2890, 16, 1149, 16, 866, 33, 5510, 4672, 3536, 2000, 326, 804, 1077, 30875, 2142, 3627, 358, 4259, 8446, 1354, 1810, 3949, 261, 77, 18, 73, 12990, 804, 12, ...
return SearchResults(catalog, Query(Query.OP_AND, [self._xquery, xquery]))
return SearchResults(catalog, Query(OP_AND, [self._xquery, xquery]))
def search(self, query=None, **kw): catalog = self._catalog
85023dcdde8b7afb3f3ab2553b9e226ae1122e12 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12681/85023dcdde8b7afb3f3ab2553b9e226ae1122e12/catalog.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1623, 12, 2890, 16, 843, 33, 7036, 16, 2826, 9987, 4672, 6222, 273, 365, 6315, 7199, 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, 1623, 12, 2890, 16, 843, 33, 7036, 16, 2826, 9987, 4672, 6222, 273, 365, 6315, 7199, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
root = RO.Wdg.PythonTk() parentTL = root parentMenu = Tkinter.Menu(parentTL) parentTL["menu"] = parentMenu scriptMenu = getScriptMenu(parentMenu) parentMenu.add_cascade(label="Scripts", menu=scriptMenu)
root = Tkinter.Tk() newTl = RO.Wdg.Toplevel(root, title="Other") menuBar = Tkinter.Menu(root) root["menu"] = menuBar scriptMenu = getScriptMenu(menuBar) menuBar.add_cascade(label="Scripts", menu=scriptMenu)
def makeWdg(self, master):
f7f984453fea5c8a275532ae423e62bc0cf51828 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6236/f7f984453fea5c8a275532ae423e62bc0cf51828/ScriptMenu.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 59, 72, 75, 12, 2890, 16, 4171, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 59, 72, 75, 12, 2890, 16, 4171, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
return ('_'+name+'()'+\
fname = name.replace('-', '_') return ('_'+fname+'()'+\
def opts_and_words(name, op, words): opts = '|'.join(options(op)) words = '|'.join([w.replace("'", "\\'") for w in words]) return ('_'+name+'()'+\
1b828d5f33700d4755b26a80e5d9dcfd0cdd1830 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9125/1b828d5f33700d4755b26a80e5d9dcfd0cdd1830/linux.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1500, 67, 464, 67, 3753, 12, 529, 16, 1061, 16, 4511, 4672, 1500, 225, 273, 8030, 18, 5701, 12, 2116, 12, 556, 3719, 4511, 273, 8030, 18, 5701, 3816, 91, 18, 2079, 29823, 3113, 1548, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1500, 67, 464, 67, 3753, 12, 529, 16, 1061, 16, 4511, 4672, 1500, 225, 273, 8030, 18, 5701, 12, 2116, 12, 556, 3719, 4511, 273, 8030, 18, 5701, 3816, 91, 18, 2079, 29823, 3113, 1548, ...
self.sliceplot.setData(self.getSlice(), norm=self.norm)
cset = self.sliceplot.setData(self.getSlice(), norm=self.norm)
def updateSlice(self): self.setNorm() self.sliceplot.setData(self.getSlice(), norm=self.norm) self.rowplot.setData(self.getRow()) self.colplot.setData(self.getCol()) self.status.cbar.setRange(self.sliceDataRange(), norm=self.norm)
12103a63872d82631066300b2fbb6fbbaf4d63ee /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7241/12103a63872d82631066300b2fbb6fbbaf4d63ee/new_sliceview.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 5959, 12, 2890, 4672, 365, 18, 542, 14624, 1435, 276, 542, 273, 365, 18, 6665, 4032, 18, 542, 751, 12, 2890, 18, 588, 5959, 9334, 4651, 33, 2890, 18, 7959, 13, 365, 18, 492, 40...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 5959, 12, 2890, 4672, 365, 18, 542, 14624, 1435, 276, 542, 273, 365, 18, 6665, 4032, 18, 542, 751, 12, 2890, 18, 588, 5959, 9334, 4651, 33, 2890, 18, 7959, 13, 365, 18, 492, 40...
bb.methodpool.insert_method(funcname, text, fn)
bb.methodpool.insert_method(funcname, text, self.fn)
text = "def %s(d):\n" % (funcname) + '\n'.join(self.body)
7cfe3a5e1548c97de8842cfffa8cecc0c6b01690 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8123/7cfe3a5e1548c97de8842cfffa8cecc0c6b01690/ast.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 977, 273, 315, 536, 738, 87, 12, 72, 4672, 64, 82, 6, 738, 261, 644, 529, 13, 397, 2337, 82, 10332, 5701, 12, 2890, 18, 3432, 13, 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, 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, 977, 273, 315, 536, 738, 87, 12, 72, 4672, 64, 82, 6, 738, 261, 644, 529, 13, 397, 2337, 82, 10332, 5701, 12, 2890, 18, 3432, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
if not resultDict.has_key(siteFullName):
if not resultDict.has_key( siteFullName ):
def getSiteSummaryWeb(self,selectDict, sortList, startItem, maxItems): """ Get the summary of jobs in a given status on all the sites in the standard Web form """
99c1bc850ba087890925b3180df206f65bb1d4b3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/99c1bc850ba087890925b3180df206f65bb1d4b3/JobDB.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11021, 4733, 4079, 12, 2890, 16, 4025, 5014, 16, 1524, 682, 16, 787, 1180, 16, 943, 3126, 4672, 3536, 968, 326, 4916, 434, 6550, 316, 279, 864, 1267, 603, 777, 326, 9180, 316, 326, 452...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 11021, 4733, 4079, 12, 2890, 16, 4025, 5014, 16, 1524, 682, 16, 787, 1180, 16, 943, 3126, 4672, 3536, 968, 326, 4916, 434, 6550, 316, 279, 864, 1267, 603, 777, 326, 9180, 316, 326, 452...
break except socket.error, EOFError: self.cleanupAfterError() print "Socket exception in the controller daemon" traceback.print_exc()
def controllerLoop(self): try: while True: self.connectToDownloader() try: self.listenLoop() print "Controller listen loop completed" break except socket.error, EOFError: # On socket errors, the downloader dies, but the # controller stays alive and restarts the downloader self.cleanupAfterError() print "Socket exception in the controller daemon" traceback.print_exc() except Exception, e: # Exception that we don't anticipate, make a crash dialog self.cleanupAfterError() import util util.failedExn("While talking to downloader backend") finally: self.shutDown = True
931d41513640f9d30968362491535372d393afc4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12354/931d41513640f9d30968362491535372d393afc4/daemon.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2596, 6452, 12, 2890, 4672, 775, 30, 1323, 1053, 30, 365, 18, 3612, 774, 4164, 6714, 1435, 775, 30, 365, 18, 18085, 6452, 1435, 1172, 315, 2933, 6514, 2798, 5951, 6, 898, 1335, 2987, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2596, 6452, 12, 2890, 4672, 775, 30, 1323, 1053, 30, 365, 18, 3612, 774, 4164, 6714, 1435, 775, 30, 365, 18, 18085, 6452, 1435, 1172, 315, 2933, 6514, 2798, 5951, 6, 898, 1335, 2987, 1...
"list-saved", "purged-saved", "purge-failed", "comment-config"])
"list-saved", "purge-saved", "purge-failed", "comment-config"])
def _main(arglist): try: (argp, rest) = getopt.gnu_getopt(arglist[1:], "sdfrokc:h", longopts=["state", "daemon", "full-help", "run", "runonce", "kill", "config=", "set-default-config=", "help", "list-failed", "list-saved", "purged-saved", "purge-failed", "comment-config"]) except getopt.GetoptError: print >> sys.stderr, helpMessage sys.exit(1) global _action, _runOnce, configFile, REDIRECT_TO, saved for param, argum in argp: if param == "--daemon" or param == "-d": _action = "daemon" elif param == "--run" or param == "-r": _action = "run" elif param == "--runonce" or param == "-o": _action = "run" _runOnce = True elif param =="--state" or param == "-s": _action = 'state' elif param == "--kill" or param == "-k": _action = "kill" elif param == "--config" or param == "-c": configFile = argum elif param == "--purge-failed": _action="purge-failed" elif param == "--help" or param == "-h": _action = 'help' elif param == "--full-help" or param == "-f": _action = 'fullhelp' elif param == "--set-default-config": _action ='set-default-config' elif param == "--list-failed": _action = 'list-failed' elif param == "--list-saved": _action = 'list-saved' elif param == "--purge-saved": _action = 'purge-saved' elif param == "--comment-config": _action = 'comment-config' signal.signal(signal.SIGINT, signalHandler) sys.excepthook = setDebug #this is NOT supposed to be called! if _action == 'comment-config': print(commentConfig) raise SystemExit elif _action == "daemon": getConfig(filename=configFile, reload=True) if os.name == u'nt' or os.name == u'dos' or os.name == u'ce': print >> sys.stderr, u"daemon mode not supported on Windows. will try to continue, but this is likely to crash" elif os.name == u'mac' or os.name == u"os2": print >> sys.stderr, (
e0c39b87367080658afd1c2cb6444ebd5e10c5e0 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1664/e0c39b87367080658afd1c2cb6444ebd5e10c5e0/rssdler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5254, 12, 3175, 1098, 4672, 775, 30, 261, 3175, 84, 16, 3127, 13, 273, 225, 336, 3838, 18, 1600, 89, 67, 588, 3838, 12, 3175, 1098, 63, 21, 30, 6487, 315, 87, 2180, 3250, 71, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5254, 12, 3175, 1098, 4672, 775, 30, 261, 3175, 84, 16, 3127, 13, 273, 225, 336, 3838, 18, 1600, 89, 67, 588, 3838, 12, 3175, 1098, 63, 21, 30, 6487, 315, 87, 2180, 3250, 71, ...
data = sys.stdin.read(16)
data = sys.stdin.read(16).encode()
def MDFilter(): mdContext = md5() while 1: data = sys.stdin.read(16) if not data: break mdContext.update(data) MDPrint(mdContext.digest()) print()
fdbdd7a797e9b10cbe724bed4f700a7995695ac5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3187/fdbdd7a797e9b10cbe724bed4f700a7995695ac5/md5driver.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10852, 1586, 13332, 3481, 1042, 273, 3481, 25, 1435, 225, 1323, 404, 30, 501, 273, 2589, 18, 21772, 18, 896, 12, 2313, 2934, 3015, 1435, 309, 486, 501, 30, 898, 3481, 1042, 18, 2725, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10852, 1586, 13332, 3481, 1042, 273, 3481, 25, 1435, 225, 1323, 404, 30, 501, 273, 2589, 18, 21772, 18, 896, 12, 2313, 2934, 3015, 1435, 309, 486, 501, 30, 898, 3481, 1042, 18, 2725, 1...
cwd = cwd or os.path.join(self._root_dir, self.relpath)
cwd = cwd or self.checkout_path
def _RunAndGetFileList(self, args, options, file_list, cwd=None): """Runs a commands that goes to stdout and grabs the file listed.""" cwd = cwd or os.path.join(self._root_dir, self.relpath) scm.SVN.RunAndGetFileList(options.verbose, args, cwd=cwd, file_list=file_list, stdout=options.stdout)
338ead09dbd34566cb60d324c2eb7366229ad94e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6076/338ead09dbd34566cb60d324c2eb7366229ad94e/gclient_scm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1997, 14042, 26098, 12, 2890, 16, 833, 16, 702, 16, 585, 67, 1098, 16, 7239, 33, 7036, 4672, 3536, 9361, 279, 4364, 716, 13998, 358, 3909, 471, 3087, 2038, 326, 585, 12889, 12123, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1997, 14042, 26098, 12, 2890, 16, 833, 16, 702, 16, 585, 67, 1098, 16, 7239, 33, 7036, 4672, 3536, 9361, 279, 4364, 716, 13998, 358, 3909, 471, 3087, 2038, 326, 585, 12889, 12123, ...
if not hasattr(errno, 'EOPNOTSUPP') or why.errno != errno.EOPNOTSUPP:
if (not hasattr(errno, 'EOPNOTSUPP') or why.errno != errno.EOPNOTSUPP):
def copystat(src, dst): """Copy all stat info (mode bits, atime, mtime, flags) from src to dst""" st = os.stat(src) mode = stat.S_IMODE(st.st_mode) if hasattr(os, 'utime'): os.utime(dst, (st.st_atime, st.st_mtime)) if hasattr(os, 'chmod'): os.chmod(dst, mode) if hasattr(os, 'chflags') and hasattr(st, 'st_flags'): try: os.chflags(dst, st.st_flags) except OSError, why: if not hasattr(errno, 'EOPNOTSUPP') or why.errno != errno.EOPNOTSUPP: raise
86e74e375fd447f428a802074cd795415a51f923 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3187/86e74e375fd447f428a802074cd795415a51f923/shutil.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6529, 1094, 270, 12, 4816, 16, 3046, 4672, 3536, 2951, 777, 610, 1123, 261, 3188, 4125, 16, 622, 494, 16, 13158, 16, 2943, 13, 628, 1705, 358, 3046, 8395, 384, 273, 1140, 18, 5642, 12,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6529, 1094, 270, 12, 4816, 16, 3046, 4672, 3536, 2951, 777, 610, 1123, 261, 3188, 4125, 16, 622, 494, 16, 13158, 16, 2943, 13, 628, 1705, 358, 3046, 8395, 384, 273, 1140, 18, 5642, 12,...
difference = psutil_avail_phymem - sysctl_avail_phymem
difference = abs(psutil_avail_phymem - sysctl_avail_phymem)
def test_avail_phymem(self): # This test is not particularly accurate and may fail if the OS is # consuming memory for other applications. # We just want to test that the difference between psutil result # and sysctl's is not too high. _sum = sum((sysctl("sysctl vm.stats.vm.v_inactive_count"), sysctl("sysctl vm.stats.vm.v_cache_count"), sysctl("sysctl vm.stats.vm.v_free_count") )) _pagesize = sysctl("sysctl hw.pagesize") sysctl_avail_phymem = _sum * _pagesize psutil_avail_phymem = psutil.avail_phymem() difference = psutil_avail_phymem - sysctl_avail_phymem # On my system both sysctl and psutil report the same values. # Let's use a tollerance of 0.5 MB and consider the test as failed # if we go over it. if difference > (0.5 * 2**20): self.fail("sysctl=%s; psutil=%s; difference=%s;" %( sysctl_avail_phymem, psutil_avail_phymem, difference))
9ae9420bcb2fa72be3a928b4e9f0478207431c1c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7296/9ae9420bcb2fa72be3a928b4e9f0478207431c1c/_bsd.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 842, 671, 67, 844, 2942, 351, 12, 2890, 4672, 468, 1220, 1842, 353, 486, 6826, 715, 22380, 471, 2026, 2321, 309, 326, 5932, 353, 468, 27815, 3778, 364, 1308, 12165, 18, 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, 1842, 67, 842, 671, 67, 844, 2942, 351, 12, 2890, 4672, 468, 1220, 1842, 353, 486, 6826, 715, 22380, 471, 2026, 2321, 309, 326, 5932, 353, 468, 27815, 3778, 364, 1308, 12165, 18, 468, ...
self._nframes == self._nframeswritten:
self._nframes == self._nframeswritten and \ self._marklength == 0:
def _patchheader(self): curpos = self._file.tell() if self._datawritten & 1: datalength = self._datawritten + 1 self._file.write(chr(0)) else: datalength = self._datawritten if datalength == self._datalength and \ self._nframes == self._nframeswritten: self._file.seek(curpos, 0) return self._file.seek(self._form_length_pos, 0) dummy = self._write_form_length(datalength) self._file.seek(self._nframes_pos, 0) _write_long(self._file, self._nframeswritten) self._file.seek(self._ssnd_length_pos, 0) _write_long(self._file, datalength + 8) self._file.seek(curpos, 0) self._nframes = self._nframeswritten self._datalength = datalength
7564a641e50de5f4aa569e1413269d71701dee5b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/7564a641e50de5f4aa569e1413269d71701dee5b/aifc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2272, 3374, 12, 2890, 4672, 662, 917, 273, 365, 6315, 768, 18, 88, 1165, 1435, 309, 365, 6315, 892, 9748, 473, 404, 30, 18462, 1288, 273, 365, 6315, 892, 9748, 397, 404, 365, 6315...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2272, 3374, 12, 2890, 4672, 662, 917, 273, 365, 6315, 768, 18, 88, 1165, 1435, 309, 365, 6315, 892, 9748, 473, 404, 30, 18462, 1288, 273, 365, 6315, 892, 9748, 397, 404, 365, 6315...
Compute the matrix of the Hecke operator T_n acting on self.
Compute the matrix of the Hecke operator `T_n` acting on self.
def _compute_hecke_matrix(self, n): r""" Compute the matrix of the Hecke operator T_n acting on self.
626e7a3867af44ed7e2e05c2445f512cf64bcc9b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/626e7a3867af44ed7e2e05c2445f512cf64bcc9b/module.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 9200, 67, 1129, 73, 67, 5667, 12, 2890, 16, 290, 4672, 436, 8395, 8155, 326, 3148, 434, 326, 670, 762, 73, 3726, 399, 67, 82, 1328, 310, 603, 365, 18, 2, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 9200, 67, 1129, 73, 67, 5667, 12, 2890, 16, 290, 4672, 436, 8395, 8155, 326, 3148, 434, 326, 670, 762, 73, 3726, 399, 67, 82, 1328, 310, 603, 365, 18, 2, -100, -100, -100, -100,...
if field_name == 'bug_severity': field_name = 'severity' elif field_name == 'assigned_to': field_name = 'owner' elif field_name == 'bug_status': field_name = 'status'
if field_name == "bug_severity": field_name = "severity" elif field_name == "assigned_to": field_name = "owner" elif field_name == "bug_status": field_name = "status"
def convert(_db, _host, _user, _password, _env, _force): activityFields = FieldTranslator() # account for older versions of bugzilla if BZ_VERSION == '2.11': print 'Using Buzvilla v%s schema.' % BZ_VERSION activityFields['removed'] = 'oldvalue' activityFields['added'] = 'newvalue' # init Bugzilla environment print "Bugzilla MySQL('%s':'%s':'%s':'%s'): connecting..." % (_db, _host, _user, _password) mysql_con = MySQLdb.connect(host=_host, user=_user, passwd=_password, db=_db, compress=1, cursorclass=MySQLdb.cursors.DictCursor) mysql_cur = mysql_con.cursor() # init Trac environment print "Trac SQLite('%s'): connecting..." % (_env) trac = TracDatabase(_env) # force mode... if _force == 1: print "cleaning all tickets..." c = trac.db().cursor() c.execute("""DELETE FROM ticket_change""") trac.db().commit() c.execute("""DELETE FROM ticket""") trac.db().commit() c.execute("""DELETE FROM attachment""") os.system('rm -rf %s' % trac.env.get_attachments_dir()) os.mkdir(trac.env.get_attachments_dir()) trac.db().commit() print print "1. import severities..." severities = (('blocker', '1'), ('critical', '2'), ('major', '3'), ('normal', '4'), ('minor', '5'), ('trivial', '6'), ('enhancement', '7')) trac.setSeverityList(severities) print print "2. import components..." sql = "SELECT value, initialowner AS owner FROM components" if PRODUCTS: sql += " WHERE %s" % productFilter('program', PRODUCTS) mysql_cur.execute(sql) components = mysql_cur.fetchall() for component in components: component['owner'] = trac.getLoginName(mysql_cur, component['owner']) trac.setComponentList(components, 'value') print print "3. import priorities..." priorities = (('P1', '1'), ('P2', '2'), ('P3', '3'), ('P4', '4'), ('P5', '5')) trac.setPriorityList(priorities) print print "4. import versions..." sql = "SELECT DISTINCTROW value FROM versions" if PRODUCTS: sql += " WHERE %s" % productFilter('program', PRODUCTS) mysql_cur.execute(sql) versions = mysql_cur.fetchall() trac.setVersionList(versions, 'value') print print "5. import milestones..." mysql_cur.execute("SELECT value FROM milestones") milestones = mysql_cur.fetchall() if milestones[0] == '---': trac.setMilestoneList(milestones, 'value') else: trac.setMilestoneList([], '') print print '6. retrieving bugs...' sql = "SELECT * FROM bugs " if PRODUCTS: sql += " WHERE %s" % productFilter('product', PRODUCTS) sql += " ORDER BY bug_id" mysql_cur.execute(sql) bugs = mysql_cur.fetchall() print print "7. import bugs and bug activity..." for bug in bugs: bugid = bug['bug_id'] ticket = {} keywords = [] ticket['id'] = bugid ticket['time'] = bug['creation_ts'] ticket['changetime'] = bug['delta_ts'] ticket['component'] = bug['component'] ticket['severity'] = bug['bug_severity'] ticket['priority'] = bug['priority'] ticket['owner'] = trac.getLoginName(mysql_cur, bug['assigned_to']) ticket['reporter'] = trac.getLoginName(mysql_cur, bug['reporter']) mysql_cur.execute("SELECT * FROM cc WHERE bug_id = %s" % bugid) cc_records = mysql_cur.fetchall() cc_list = [] for cc in cc_records: cc_list.append(trac.getLoginName(mysql_cur, cc['who'])) ticket['cc'] = string.join(cc_list, ', ') ticket['version'] = bug['version'] if bug['target_milestone'] == '---': ticket['milestone'] = '' else: ticket['milestone'] = bug['target_milestone'] bug_status = bug['bug_status'].lower() ticket['status'] = statusXlator[bug_status] ticket['resolution'] = bug['resolution'].lower() # a bit of extra work to do open tickets if bug_status == 'open': if owner != '': ticket['status'] = 'assigned' else: ticket['status'] = 'new' ticket['summary'] = bug['short_desc'] keywords = string.split(bug['keywords'], ' ') mysql_cur.execute("SELECT * FROM longdescs WHERE bug_id = %s" % bugid) longdescs = list(mysql_cur.fetchall()) # check for empty 'longdescs[0]' field... if len(longdescs) == 0: ticket['description'] = '' else: ticket['description'] = longdescs[0]['thetext'] del longdescs[0] for desc in longdescs: ignore = False for comment in IGNORE_COMMENTS: if re.match(comment, desc['thetext']): ignore = True if ignore: continue trac.addTicketComment(ticket=bugid, time=desc['bug_when'], author=trac.getLoginName(mysql_cur, desc['who']), value=desc['thetext']) mysql_cur.execute("SELECT * FROM bugs_activity WHERE bug_id = %s ORDER BY bug_when" % bugid) bugs_activity = mysql_cur.fetchall() resolution = '' ticketChanges = [] for activity in bugs_activity: field_name = trac.getFieldName(mysql_cur, activity['fieldid']).lower() removed = activity[activityFields['removed']] added = activity[activityFields['added']] # statuses and resolutions are in lowercase in trac if field_name == 'resolution' or field_name == 'bug_status': removed = removed.lower() added = added.lower() # remember most recent resolution, we need this later if field_name == 'resolution': resolution = added.lower() keywordChange = False oldKeywords = string.join(keywords, " ") # convert bugzilla field names... if field_name == 'bug_severity': field_name = 'severity' elif field_name == 'assigned_to': field_name = 'owner' elif field_name == 'bug_status': field_name = 'status' if removed in STATUS_KEYWORDS: kw = STATUS_KEYWORDS[removed] if kw in keywords: keywords.remove(kw) else: oldKeywords = string.join(keywords + [ kw ], " ") keywordChange = True if added in STATUS_KEYWORDS: kw = STATUS_KEYWORDS[added] keywords.append(kw) keywordChange = True added = statusXlator[added] removed = statusXlator[removed] elif field_name == 'short_desc': field_name = 'summary' elif field_name == 'product': if removed in PRODUCT_KEYWORDS: kw = PRODUCT_KEYWORDS[removed] if kw in keywords: keywords.remove(kw) else: oldKeywords = string.join(keywords + [ kw ], " ") keywordChange = True if added in PRODUCT_KEYWORDS: kw = PRODUCT_KEYWORDS[added] keywords.append(kw) keywordChange = True ticketChange = {} ticketChange['ticket'] = bugid ticketChange['time'] = activity['bug_when'] ticketChange['author'] = trac.getLoginName(mysql_cur, activity['who']) ticketChange['field'] = field_name ticketChange['oldvalue'] = removed ticketChange['newvalue'] = added if keywordChange: newKeywords = string.join(keywords, " ") ticketChangeKw = ticketChange ticketChangeKw['field'] = 'keywords' ticketChangeKw['oldvalue'] = oldKeywords ticketChangeKw['newvalue'] = newKeywords #trac.addTicketChange(ticket=bugid, time=activity['bug_when'], # author=trac.getLoginName(mysql_cur, activity['who']), # field='keywords', oldvalue=oldKeywords, newvalue=newKeywords) ticketChanges.append(ticketChangeKw) if field_name in IGNORED_ACTIVITY_FIELDS: continue # skip changes that have no effect (think translation!) if added == removed: continue # bugzilla splits large summary changes into two records for oldChange in ticketChanges: if (field_name == 'summary' and oldChange['field'] == ticketChange['field'] and oldChange['time'] == ticketChange['time'] and oldChange['author'] == ticketChange['author']): oldChange['oldvalue'] += " " + ticketChange['oldvalue'] oldChange['newvalue'] += " " + ticketChange['newvalue'] break else: #trac.addTicketChange(ticket=bugid, time=activity['bug_when'], # author=trac.getLoginName(mysql_cur, activity['who']), # field=field_name, oldvalue=removed, newvalue=added) ticketChanges.append (ticketChange) for ticketChange in ticketChanges: trac.addTicketChange (**ticketChange) # for some reason, bugzilla v2.11 seems to clear the resolution # when you mark a bug as closed. let's remember it and restore # it if the ticket is closed but there's no resolution. if not ticket['resolution'] and ticket['status'] == 'closed': ticket['resolution'] = resolution if bug['bug_status'] in STATUS_KEYWORDS: kw = STATUS_KEYWORDS[bug['bug_status']] # may have already been added during activity import if kw not in keywords: keywords.append(kw) if bug['product'] in PRODUCT_KEYWORDS: kw = PRODUCT_KEYWORDS[bug['product']] # may have already been added during activity import if kw not in keywords: keywords.append(kw) mysql_cur.execute("SELECT * FROM attachments WHERE bug_id = %s" % bugid) attachments = mysql_cur.fetchall() for a in attachments: author = trac.getLoginName(mysql_cur, a['submitter_id']) tracAttachment = Attachment(a['filename'], a['thedata']) trac.addAttachment(bugid, tracAttachment, a['description'], author) ticket['keywords'] = string.join(keywords) ticketid = trac.addTicket(**ticket) print "Success!"
d0a718cdc641402f4871e728629c7ce1e81b3158 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2831/d0a718cdc641402f4871e728629c7ce1e81b3158/bugzilla2trac.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1765, 24899, 1966, 16, 389, 2564, 16, 389, 1355, 16, 389, 3664, 16, 389, 3074, 16, 389, 5734, 4672, 5728, 2314, 273, 2286, 12233, 1435, 225, 468, 2236, 364, 12156, 5244, 434, 7934, 15990...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 24899, 1966, 16, 389, 2564, 16, 389, 1355, 16, 389, 3664, 16, 389, 3074, 16, 389, 5734, 4672, 5728, 2314, 273, 2286, 12233, 1435, 225, 468, 2236, 364, 12156, 5244, 434, 7934, 15990...
if depth > maxDepth: maxDepth = depth
def findDepth(self, insts): depth = 0 maxDepth = 0 for i in insts: opname = i[0] delta = self.effect.get(opname, 0) if delta > 1: depth = depth + delta elif delta < 0: if depth > maxDepth: maxDepth = depth depth = depth + delta else: if depth > maxDepth: maxDepth = depth # now check patterns for pat, pat_delta in self.patterns: if opname[:len(pat)] == pat: delta = pat_delta depth = depth + delta break # if we still haven't found a match if delta == 0: meth = getattr(self, opname, None) if meth is not None: depth = depth + meth(i[1]) if depth < 0: depth = 0 return maxDepth
138d90eb73415e48a0e7f09a7c9603b1164bcaed /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/138d90eb73415e48a0e7f09a7c9603b1164bcaed/pyassem.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 6148, 12, 2890, 16, 1804, 87, 4672, 3598, 273, 374, 22074, 273, 374, 364, 277, 316, 1804, 87, 30, 30273, 273, 277, 63, 20, 65, 3622, 273, 365, 18, 13867, 18, 588, 12, 556, 529,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 6148, 12, 2890, 16, 1804, 87, 4672, 3598, 273, 374, 22074, 273, 374, 364, 277, 316, 1804, 87, 30, 30273, 273, 277, 63, 20, 65, 3622, 273, 365, 18, 13867, 18, 588, 12, 556, 529,...
labeltabColsTitle=Label(frameIndentSize,justify=LEFT, text='when tab key inserts tabs,\ncolumns per tab') self.scaleTabCols=Scale(frameIndentSize,variable=self.tabCols, orient='horizontal',tickinterval=2,from_=2,to=8)
def CreatePageFontTab(self): #tkVars self.fontSize=StringVar(self) self.fontBold=BooleanVar(self) self.fontName=StringVar(self) self.spaceNum=IntVar(self) self.tabCols=IntVar(self) self.indentBySpaces=BooleanVar(self) self.editFont=tkFont.Font(self,('courier',12,'normal')) ##widget creation #body frame frame=self.tabPages.pages['Fonts/Tabs']['page'] #body section frames frameFont=Frame(frame,borderwidth=2,relief=GROOVE) frameIndent=Frame(frame,borderwidth=2,relief=GROOVE) #frameFont labelFontTitle=Label(frameFont,text='Set Base Editor Font') frameFontName=Frame(frameFont) frameFontParam=Frame(frameFont) labelFontNameTitle=Label(frameFontName,justify=LEFT, text='Font :') self.listFontName=Listbox(frameFontName,height=5,takefocus=FALSE, exportselection=FALSE) self.listFontName.bind('<ButtonRelease-1>',self.OnListFontButtonRelease) scrollFont=Scrollbar(frameFontName) scrollFont.config(command=self.listFontName.yview) self.listFontName.config(yscrollcommand=scrollFont.set) labelFontSizeTitle=Label(frameFontParam,text='Size :') self.optMenuFontSize=DynOptionMenu(frameFontParam,self.fontSize,None, command=self.SetFontSample) checkFontBold=Checkbutton(frameFontParam,variable=self.fontBold, onvalue=1,offvalue=0,text='Bold',command=self.SetFontSample) frameFontSample=Frame(frameFont,relief=SOLID,borderwidth=1) self.labelFontSample=Label(frameFontSample, text='AaBbCcDdEe\nFfGgHhIiJjK\n1234567890\n#:+=(){}[]', justify=LEFT,font=self.editFont) #frameIndent labelIndentTitle=Label(frameIndent,text='Set Indentation Defaults') frameIndentType=Frame(frameIndent) frameIndentSize=Frame(frameIndent) labelIndentTypeTitle=Label(frameIndentType, text='Choose indentation type :') radioUseSpaces=Radiobutton(frameIndentType,variable=self.indentBySpaces, value=1,text='Tab key inserts spaces') radioUseTabs=Radiobutton(frameIndentType,variable=self.indentBySpaces, value=0,text='Tab key inserts tabs') labelIndentSizeTitle=Label(frameIndentSize, text='Choose indentation size :') labelSpaceNumTitle=Label(frameIndentSize,justify=LEFT, text='when tab key inserts spaces,\nspaces per tab') self.scaleSpaceNum=Scale(frameIndentSize,variable=self.spaceNum, orient='horizontal',tickinterval=2,from_=2,to=8) labeltabColsTitle=Label(frameIndentSize,justify=LEFT, text='when tab key inserts tabs,\ncolumns per tab') self.scaleTabCols=Scale(frameIndentSize,variable=self.tabCols, orient='horizontal',tickinterval=2,from_=2,to=8) #widget packing #body frameFont.pack(side=LEFT,padx=5,pady=10,expand=TRUE,fill=BOTH) frameIndent.pack(side=LEFT,padx=5,pady=10,fill=Y) #frameFont labelFontTitle.pack(side=TOP,anchor=W,padx=5,pady=5) frameFontName.pack(side=TOP,padx=5,pady=5,fill=X) frameFontParam.pack(side=TOP,padx=5,pady=5,fill=X) labelFontNameTitle.pack(side=TOP,anchor=W) self.listFontName.pack(side=LEFT,expand=TRUE,fill=X) scrollFont.pack(side=LEFT,fill=Y) labelFontSizeTitle.pack(side=LEFT,anchor=W) self.optMenuFontSize.pack(side=LEFT,anchor=W) checkFontBold.pack(side=LEFT,anchor=W,padx=20) frameFontSample.pack(side=TOP,padx=5,pady=5,expand=TRUE,fill=BOTH) self.labelFontSample.pack(expand=TRUE,fill=BOTH) #frameIndent labelIndentTitle.pack(side=TOP,anchor=W,padx=5,pady=5) frameIndentType.pack(side=TOP,padx=5,fill=X) frameIndentSize.pack(side=TOP,padx=5,pady=5,fill=BOTH) labelIndentTypeTitle.pack(side=TOP,anchor=W,padx=5,pady=5) radioUseSpaces.pack(side=TOP,anchor=W,padx=5) radioUseTabs.pack(side=TOP,anchor=W,padx=5) labelIndentSizeTitle.pack(side=TOP,anchor=W,padx=5,pady=5) labelSpaceNumTitle.pack(side=TOP,anchor=W,padx=5) self.scaleSpaceNum.pack(side=TOP,padx=5,fill=X) labeltabColsTitle.pack(side=TOP,anchor=W,padx=5) self.scaleTabCols.pack(side=TOP,padx=5,fill=X) return frame
22cc40d7b201cf9033ebbca4fe11980daac2a344 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/22cc40d7b201cf9033ebbca4fe11980daac2a344/configDialog.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1788, 1964, 5711, 5661, 12, 2890, 4672, 468, 16099, 5555, 365, 18, 5776, 1225, 33, 780, 1537, 12, 2890, 13, 365, 18, 5776, 38, 1673, 33, 5507, 1537, 12, 2890, 13, 365, 18, 5776, 461, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1788, 1964, 5711, 5661, 12, 2890, 4672, 468, 16099, 5555, 365, 18, 5776, 1225, 33, 780, 1537, 12, 2890, 13, 365, 18, 5776, 38, 1673, 33, 5507, 1537, 12, 2890, 13, 365, 18, 5776, 461, ...
notification_center = NotificationCenter()
if self.state == 'terminated': return
def _NH_SIPInvitationChangedState(self, notification): notification_center = NotificationCenter() if self.greenlet is not None: if notification.data.state == 'disconnected' and notification.data.prev_state != 'disconnecting': self._channel.send_exception(InvitationDidFailError(notification.sender, notification.data)) else: self._channel.send(notification) else: self.greenlet = api.getcurrent() try: if notification.data.state == 'connected' and notification.data.sub_state == 'received_proposal': self.state = 'received_proposal' try: proposed_remote_sdp = self._invitation.sdp.proposed_remote active_remote_sdp = self._invitation.sdp.active_remote for stream in self.streams: if not stream.validate_update(proposed_remote_sdp, stream.index): engine = Engine() self._invitation.send_response(488, extra_headers=[WarningHeader(399, engine.user_agent, 'Failed to update media stream index %d' % stream.index)]) self.state = 'connected' notification_center.post_notification('SIPSessionDidProcessTransaction', self, TimestampedNotificationData(originator='remote', method='INVITE', code=488, reason=sip_status_messages[488], ack_received='unknown')) return # These tests are here because some ALGs mess up the SDP and the behaviour # of pjsip in these situations is unexpected (eg. loss of audio). -Luci for attr in ('user', 'net_type', 'address_type', 'address'): if getattr(proposed_remote_sdp, attr) != getattr(active_remote_sdp, attr): engine = Engine() self._invitation.send_response(488, extra_headers=[WarningHeader(399, engine.user_agent, 'Difference in contents of o= line')]) self.state = 'connected' notification_center.post_notification('SIPSessionDidProcessTransaction', self, TimestampedNotificationData(originator='remote', method='INVITE', code=488, reason=sip_status_messages[488], ack_received='unknown')) return added_media_indexes = set() removed_media_indexes = set() for index, media_stream in enumerate(proposed_remote_sdp.media): if index >= len(active_remote_sdp.media): added_media_indexes.add(index) elif media_stream.media != active_remote_sdp.media[index].media: added_media_indexes.add(index) removed_media_indexes.add(index) elif not media_stream.port and active_remote_sdp.media[index].port: removed_media_indexes.add(index) removed_media_indexes.update(xrange(len(proposed_remote_sdp.media), len(active_remote_sdp.media))) if added_media_indexes and removed_media_indexes: engine = Engine() self._invitation.send_response(488, extra_headers=[WarningHeader(399, engine.user_agent, 'Both removing AND adding a media stream is currently not supported')]) notification_center.post_notification('SIPSessionDidProcessTransaction', self, TimestampedNotificationData(originator='remote', method='INVITE', code=488, reason=sip_status_messages[488], ack_received='unknown')) elif added_media_indexes: self.proposed_streams = [] for index in added_media_indexes: media_stream = proposed_remote_sdp.media[index] if media_stream.port != 0: for stream_type in MediaStreamRegistry(): try: stream = stream_type.new_from_sdp(self.account, proposed_remote_sdp, index) except InvalidStreamError: break except UnknownStreamError: continue else: stream.index = index self.proposed_streams.append(stream) break if self.proposed_streams: self._invitation.send_response(100) notification_center.post_notification('SIPSessionGotProposal', sender=self, data=TimestampedNotificationData(originator='remote', streams=self.proposed_streams)) return else: self._invitation.send_response(488) notification_center.post_notification('SIPSessionDidProcessTransaction', self, TimestampedNotificationData(originator='remote', method='INVITE', code=488, reason=sip_status_messages[488], ack_received='unknown')) else: local_sdp = SDPSession.new(self._invitation.sdp.active_local) local_sdp.version += 1 removed_streams = [stream for stream in self.streams if stream.index in removed_media_indexes] prev_on_hold_streams = set(stream for stream in self.streams if stream.hold_supported and stream.on_hold_by_remote) for stream in removed_streams: notification_center.remove_observer(self, sender=stream) stream.deactivate() local_sdp.media[stream.index].port = 0 for stream in self.streams: local_sdp.media[stream.index] = stream.get_local_media(for_offer=False) try: self._invitation.send_response(200, sdp=local_sdp) except PJSIPError, e: if 'PJMEDIA_SDPNEG' in str(e): engine = Engine() self._invitation.send_response(488, extra_headers=[WarningHeader(399, engine.user_agent, 'Changing the codec of an audio stream is currently not supported')]) self.state = 'connected' notification_center.post_notification('SIPSessionDidProcessTransaction', self, TimestampedNotificationData(originator='remote', method='INVITE', code=488, reason=sip_status_messages[488], ack_received='unknown')) return else: raise else: for stream in removed_streams: self.streams.remove(stream) stream.end() notification_center.post_notification('SIPSessionDidProcessTransaction', self, TimestampedNotificationData(originator='remote', method='INVITE', code=200, reason=sip_status_messages[200], ack_received='unknown'))
f3f2db7ba56f28d231295d924c2ea5f9f5e4a8af /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3449/f3f2db7ba56f28d231295d924c2ea5f9f5e4a8af/session.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 50, 44, 67, 17739, 19896, 5033, 1119, 12, 2890, 16, 3851, 4672, 309, 365, 18, 2019, 422, 296, 29133, 4278, 327, 309, 365, 18, 11571, 1810, 353, 486, 599, 30, 309, 3851, 18, 892, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 50, 44, 67, 17739, 19896, 5033, 1119, 12, 2890, 16, 3851, 4672, 309, 365, 18, 2019, 422, 296, 29133, 4278, 327, 309, 365, 18, 11571, 1810, 353, 486, 599, 30, 309, 3851, 18, 892, ...
if len( channel) > 0: if libgpodder.isDebugging(): print "(getmodel) " + channel.title new_iter = new_model.append() new_model.set( new_iter, 0, channel.url) new_model.set( new_iter, 1, channel.title)
if libgpodder.isDebugging(): print "(getmodel) " + channel.title new_iter = new_model.append() new_model.set( new_iter, 0, channel.url) new_model.set( new_iter, 1, channel.title)
def getDownloadedChannelsModel( self): new_model = gtk.ListStore( gobject.TYPE_STRING, gobject.TYPE_STRING) for channel in self.getDownloadedChannelsList(): if len( channel) > 0: if libgpodder.isDebugging(): print "(getmodel) " + channel.title new_iter = new_model.append() new_model.set( new_iter, 0, channel.url) new_model.set( new_iter, 1, channel.title) return new_model
08bf010f31ee8ebfbbb3f5aff5ad63f5dceaa904 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12778/08bf010f31ee8ebfbbb3f5aff5ad63f5dceaa904/liblocaldb.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2343, 995, 4230, 10585, 1488, 12, 365, 4672, 394, 67, 2284, 273, 22718, 18, 682, 2257, 12, 314, 1612, 18, 2399, 67, 5804, 16, 314, 1612, 18, 2399, 67, 5804, 13, 225, 364, 1904, 316, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2343, 995, 4230, 10585, 1488, 12, 365, 4672, 394, 67, 2284, 273, 22718, 18, 682, 2257, 12, 314, 1612, 18, 2399, 67, 5804, 16, 314, 1612, 18, 2399, 67, 5804, 13, 225, 364, 1904, 316, ...
cprop = inst.properties[pname] cprop.value = pywbem.tocimobj(cprop.type, pval)
try: cprop = inst.properties[pname] cprop.value = tocimobj(cprop.type, pval) except KeyError: ce = CIMError(CIM_ERR_INVALID_PARAMETER, 'Invalid property: %s' % pname) ce.file_line = (p.parser.file, p.lexer.lineno) raise ce except ValueError, ve: ce = CIMError(CIM_ERR_INVALID_PARAMETER, 'Invalid value for property: %s: %s' % (pname,ve.message)) ce.file_line = (p.parser.file, p.lexer.lineno) raise ce
def p_instanceDeclaration(p): """instanceDeclaration : INSTANCE OF className '{' valueInitializerList '}' ';' | INSTANCE OF className alias '{' valueInitializerList '}' ';' | qualifierList INSTANCE OF className '{' valueInitializerList '}' ';' | qualifierList INSTANCE OF className alias '{' valueInitializerList '}' ';' """ alias = None quals = {} ns = p.parser.handle.default_namespace if isinstance(p[1], basestring): # no qualifiers cname = p[3] if p[4] == '{': props = p[5] else: props = p[6] alias = p[4] else: cname = p[4] #quals = p[1] # qualifiers on instances are deprecated -- rightly so. if p[5] == '{': props = p[6] else: props = p[7] alias = p[5] try: cc = p.parser.handle.GetClass(cname, LocalOnly=False, IncludeQualifiers=True) p.parser.classnames[ns].append(cc.classname.lower()) except pywbem.CIMError, ce: ce.file_line = (p.parser.file, p.lexer.lineno) if ce.args[0] == pywbem.CIM_ERR_NOT_FOUND: file = p.parser.mofcomp.find_mof(cname) if p.parser.verbose: p.parser.log('Class %s does not exist' % cname) if file: p.parser.mofcomp.compile_file(file, ns) cc = p.parser.handle.GetClass(cname, LocalOnly=False, IncludeQualifiers=True) else: if p.parser.verbose: p.parser.log("Can't find file to satisfy class") ce = pywbem.CIMError(pywbem.CIM_ERR_INVALID_CLASS, cname) ce.file_line = (p.parser.file, p.lexer.lineno) raise ce else: raise path = pywbem.CIMInstanceName(cname, namespace=ns) inst = pywbem.CIMInstance(cname, properties=cc.properties, qualifiers=quals, path=path) for prop in props: pname = prop[1] pval = prop[2] cprop = inst.properties[pname] cprop.value = pywbem.tocimobj(cprop.type, pval) for prop in inst.properties.values(): if 'key' not in prop.qualifiers or not prop.qualifiers['key']: continue if prop.value is None: ce = pywbem.CIMError(pywbem.CIM_ERR_FAILED, 'Key property %s.%s is not set' % (cname, prop.name)) ce.file_line = (p.parser.file, p.lexer.lineno) raise ce inst.path.keybindings[prop.name] = prop.value if alias: p.parser.aliases[alias] = inst.path p[0] = inst
d1a547f385819908b15c26774bc5fc75671b5883 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10648/d1a547f385819908b15c26774bc5fc75671b5883/mof_compiler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 293, 67, 1336, 6094, 12, 84, 4672, 3536, 1336, 6094, 294, 6937, 15932, 2658, 9790, 460, 14729, 682, 9571, 7554, 571, 6937, 15932, 2658, 2308, 9790, 460, 14729, 682, 9571, 7554, 571, 12327,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 293, 67, 1336, 6094, 12, 84, 4672, 3536, 1336, 6094, 294, 6937, 15932, 2658, 9790, 460, 14729, 682, 9571, 7554, 571, 6937, 15932, 2658, 2308, 9790, 460, 14729, 682, 9571, 7554, 571, 12327,...
namestr = "%s %s"%(child.node().getType(), child.node().getName()) newItem = self.tree.AppendItem(item, namestr)
namestr = "%s.%s"%(child.node().getType(), child.node().getName()) newItem = self.tree.PrependItem(parent, namestr)
def traversePandaObjects(self, item, objNodePath): itemId = self.tree.GetItemPyData(item) i = 0 # import pdb;pdb.set_trace() for child in objNodePath.getChildren(): namestr = "%s %s"%(child.node().getType(), child.node().getName()) newItem = self.tree.AppendItem(item, namestr) newItemId = "%s.%s"%(itemId, i) self.tree.SetItemPyData(newItem, newItemId) # recursing... self.traversePandaObjects(newItem, child) i = i + 1
bc84a2c412b80a4333c92706942270a55cc827a4 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8543/bc84a2c412b80a4333c92706942270a55cc827a4/SceneGraphUI.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10080, 52, 464, 69, 4710, 12, 2890, 16, 761, 16, 1081, 907, 743, 4672, 18424, 273, 365, 18, 3413, 18, 967, 1180, 9413, 751, 12, 1726, 13, 277, 273, 374, 468, 1930, 10892, 31, 17414, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10080, 52, 464, 69, 4710, 12, 2890, 16, 761, 16, 1081, 907, 743, 4672, 18424, 273, 365, 18, 3413, 18, 967, 1180, 9413, 751, 12, 1726, 13, 277, 273, 374, 468, 1930, 10892, 31, 17414, ...
factor = 1 if callers is not None: if len(callers) == 1: factor = 0.3
def inlining_heuristic(graph, callers=None, callees=None): # XXX ponderation factors? factor = 1 if callers is not None: if len(callers) == 1: factor = 0.3 return (0.9999 * measure_median_execution_cost(graph) + static_instruction_count(graph)) * factor
12c6db7a72dbf64b0f584fab03d72f06265d2a20 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/12c6db7a72dbf64b0f584fab03d72f06265d2a20/inline.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 316, 7511, 310, 67, 580, 18219, 12, 4660, 16, 19932, 33, 7036, 16, 1443, 298, 281, 33, 7036, 4672, 468, 11329, 293, 265, 765, 367, 14490, 35, 327, 261, 20, 18, 7991, 380, 6649, 67, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 316, 7511, 310, 67, 580, 18219, 12, 4660, 16, 19932, 33, 7036, 16, 1443, 298, 281, 33, 7036, 4672, 468, 11329, 293, 265, 765, 367, 14490, 35, 327, 261, 20, 18, 7991, 380, 6649, 67, 2...
check_mk [-c] -I {tcp|snmp} [HOST1 ...] inventory - find new services check_mk -c, --cleanup-autochecks reorder autochecks files
check_mk [-u] -I {tcp|snmp} [HOST1 ...] inventory - find new services check_mk -u, --cleanup-autochecks reorder autochecks files
def usage(): print """WAYS TO CALL: check_mk [-n] [-v] [-p] HOST [IPADDRESS] check all services on HOST check_mk [-c] -I {tcp|snmp} [HOST1 ...] inventory - find new services check_mk -c, --cleanup-autochecks reorder autochecks files check_mk -S|-H|--timeperiods output Nagios configuration files check_mk -C, --compile precompile host checks check_mk -U, --update precompile + create Nagios config check_mk -R, --restart precompile + config + Nagios restart check_mk -D, --dump [H1 H2 ..] dump all or some hosts check_mk -d HOSTNAME|IPADDRESS show raw information from agent check_mk --check-inventory HOSTNAME check for items not yet checked check_mk --list-hosts [G1 G2 ...] print list of hosts check_mk --list-tag TAG1 TAG2 ... list hosts having certain tags check_mk -L, --list-checks list all available check types check_mk -M, --man [CHECKTYPE] show manpage for check CHECKTYPE check_mk --paths list all pathnames and directories check_mk -X, --check-config check configuration for invalid vars check_mk --backup BACKUPFILE.tar.gz make backup of configuration and data check_mk --restore BACKUPFILE.tar.gz restore configuration and data check_mk --flush [HOST1 HOST2...] flush all data of some or all hosts check_mk --donate Email data of configured hosts to MK check_mk --snmpwalk HOST1 HOST2 ... Do snmpwalk on host check_mk -P, --package COMMAND do package operations check_mk -V, --version print version check_mk -h, --help print this help
8c58579f1bb6e16ea9366736e6a6e120bdad071f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5589/8c58579f1bb6e16ea9366736e6a6e120bdad071f/check_mk.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4084, 13332, 1172, 3536, 29295, 8493, 22753, 30, 866, 67, 24816, 23059, 82, 65, 23059, 90, 65, 23059, 84, 65, 21425, 306, 2579, 15140, 65, 225, 866, 777, 4028, 603, 21425, 866, 67, 24816...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4084, 13332, 1172, 3536, 29295, 8493, 22753, 30, 866, 67, 24816, 23059, 82, 65, 23059, 90, 65, 23059, 84, 65, 21425, 306, 2579, 15140, 65, 225, 866, 777, 4028, 603, 21425, 866, 67, 24816...
def pickline(self, ptlist, point, logic, **xx):
def pickline(self, ptlist, origin, logic, **xx):
def pickline(self, ptlist, point, logic, **xx): """Add a new curve to the shape. Args define the curve (see curve) and the logic operator for the curve telling whether it adds or removes material. """ self.havelist = 0 c = curve(self, ptlist, point, logic, **xx) self.bbox.merge(c.bbox) self.curves += [c]
e55864700cb47a43fd0848009d3f1957e082ccc8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/e55864700cb47a43fd0848009d3f1957e082ccc8/shape.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6002, 1369, 12, 2890, 16, 5818, 1098, 16, 4026, 16, 4058, 16, 2826, 5279, 4672, 3536, 986, 279, 394, 8882, 358, 326, 2179, 18, 6634, 4426, 326, 8882, 261, 5946, 8882, 13, 471, 326, 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, 6002, 1369, 12, 2890, 16, 5818, 1098, 16, 4026, 16, 4058, 16, 2826, 5279, 4672, 3536, 986, 279, 394, 8882, 358, 326, 2179, 18, 6634, 4426, 326, 8882, 261, 5946, 8882, 13, 471, 326, 405...
for data in row: tblstr += '<td class="admintd">%s</td>\n' % (data,)
for i in range(len(row)): tblstr += '<td class="%s">%s</td>\n' % (align[i], row[i])
def tupletotable(header=[], tuple=[], start='', end='', extracolumn=''): """create html table for a tuple. header - optional header for the columns tuple - create table of this start - text to be added in the beginning, most likely beginning of a form end - text to be added in the end, mot likely end of a form. extracolumn - mainly used to put in a button. """ tblstr = '' for h in header + ['']: tblstr += ' <th class="adminheader">%s</th>\n' % (h, ) if tblstr: tblstr = ' <tr>\n%s\n </tr>\n' % (tblstr, ) tblstr = start + '<table class="admin_wvar_nomargin">\n' + tblstr # extra column try: extra = '<tr>' row = tuple[0] if type(row) not in [int, long, str, dict]: for data in row: extra += '<td class="admintd">%s</td>\n' % (data,) else: extra += ' <td class="admintd">%s</td>\n' % (row, ) extra += '<td rowspan="%s" style="vertical-align: bottom">\n%s\n</td>\n</tr>\n' % (len(tuple), extracolumn) except IndexError: extra = '' tblstr += extra for row in tuple[1:]: tblstr += ' <tr>\n' if type(row) not in [int, long, str, dict]: for data in row: tblstr += '<td class="admintd">%s</td>\n' % (data,) else: tblstr += ' <td class="admintd">%s</td>\n' % (row, ) tblstr += ' </tr> \n' tblstr += '</table> \n ' tblstr += end return tblstr
d5c421bd0fb517578e6a485b6cc1f60455de2c85 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12027/d5c421bd0fb517578e6a485b6cc1f60455de2c85/webaccessadmin_lib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 28325, 1469, 352, 429, 12, 3374, 22850, 6487, 3193, 22850, 6487, 787, 2218, 2187, 679, 2218, 2187, 7582, 1077, 355, 755, 2218, 11, 4672, 3536, 2640, 1729, 1014, 364, 279, 3193, 18, 225, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 28325, 1469, 352, 429, 12, 3374, 22850, 6487, 3193, 22850, 6487, 787, 2218, 2187, 679, 2218, 2187, 7582, 1077, 355, 755, 2218, 11, 4672, 3536, 2640, 1729, 1014, 364, 279, 3193, 18, 225, ...
self.assertEqual(self.event.getCustomDescription(), "every 2 weeks until 8/1/05")
self.assertEqual(self.event.getCustomDescription(), "every 3 weeks until 8/15/05")
def testRuleChange(self): self.event.rruleset = self._createRuleSetItem('weekly') # self and an automatically generated backup occurrence should exist self.assertEqual(len(self.event.occurrences), 2)
ebd062a8c7f04ba8a4db5b3d794548e09ca279cf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/ebd062a8c7f04ba8a4db5b3d794548e09ca279cf/TestRecurringEvent.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 2175, 3043, 12, 2890, 4672, 365, 18, 2575, 18, 523, 1513, 278, 273, 365, 6315, 2640, 21474, 1180, 2668, 10741, 715, 6134, 468, 365, 471, 392, 6635, 4374, 5114, 13083, 1410, 1005, 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, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 2175, 3043, 12, 2890, 4672, 365, 18, 2575, 18, 523, 1513, 278, 273, 365, 6315, 2640, 21474, 1180, 2668, 10741, 715, 6134, 468, 365, 471, 392, 6635, 4374, 5114, 13083, 1410, 1005, 3...
compareToWiki = not False
compareToWiki = False
def pluginsTreeToString(): global firstNode firstNode = True return treeToString(allElements.get(''))
3e42ae7e1143a162719514526cd43fdd11ef5616 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12827/3e42ae7e1143a162719514526cd43fdd11ef5616/plugin-list-parser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4799, 2471, 5808, 13332, 2552, 1122, 907, 1122, 907, 273, 1053, 327, 2151, 5808, 12, 454, 3471, 18, 588, 2668, 26112, 565, 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, 0, 0, 0, 0, 0, 0, 0, 0, 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, 4799, 2471, 5808, 13332, 2552, 1122, 907, 1122, 907, 273, 1053, 327, 2151, 5808, 12, 454, 3471, 18, 588, 2668, 26112, 565, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
self.app = wx.App(True, "mlox.err")
self.app = wx.App(True, None)
def __init__(self): wx.Locale(wx.LOCALE_LOAD_DEFAULT) self.app = wx.App(True, "mlox.err") sys.excepthook = lambda typ, val, tb: self.error_handler(typ, val, tb) self.can_update = True self.dir = os.getcwd() # setup widgets default_font = wx.Font(-1, family=wx.FONTFAMILY_DEFAULT, style=wx.FONTSTYLE_NORMAL, weight=wx.FONTWEIGHT_NORMAL, underline=False, face="", encoding=wx.FONTENCODING_SYSTEM) size = default_font.GetPointSize() self.label_font = wx.Font(size + 2, family=wx.FONTFAMILY_DEFAULT, style=wx.FONTSTYLE_NORMAL, weight=wx.FONTWEIGHT_BOLD) self.button_font = wx.Font(size + 6, family=wx.FONTFAMILY_DEFAULT, style=wx.FONTSTYLE_NORMAL, weight=wx.FONTWEIGHT_BOLD) self.frame = wx.Frame(None, wx.ID_ANY, ("mlox %s" % Version)) self.frame.SetSizeHints(800,600) self.frame.SetBackgroundColour(wx.SystemSettings.GetColour(wx.SYS_COLOUR_3DFACE)) # logo doubles as a "reload" button img = wx.Image("mlox.gif", wx.BITMAP_TYPE_GIF).ConvertToBitmap() self.logo = wx.BitmapButton(self.frame, -1, img, (0,0), (img.GetWidth()+5, img.GetHeight()+5)) self.logo.Bind(wx.EVT_BUTTON, self.on_reload) self.logo.SetToolTip(wx.ToolTip(_["Click to Reload"])) self.label_stats = wx.StaticText(self.frame, -1, _["Statistics"]) self.label_stats.SetFont(self.label_font) self.txt_stats = wx.TextCtrl(self.frame, -1, "", style=wx.TE_READONLY|wx.TE_MULTILINE|wx.TE_RICH2) self.txt_stats.SetFont(default_font) if Opt.AutoFocus: self.txt_stats.Bind(wx.EVT_ENTER_WINDOW, lambda e: self.txt_stats.SetFocus())
f19ebb230afa23151a4d59c8472125be9ec6d093 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2827/f19ebb230afa23151a4d59c8472125be9ec6d093/mlox.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 7075, 18, 3916, 12, 27226, 18, 25368, 67, 7783, 67, 5280, 13, 365, 18, 2910, 273, 7075, 18, 3371, 12, 5510, 16, 599, 13, 2589, 18, 14137, 4476, 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, 2890, 4672, 7075, 18, 3916, 12, 27226, 18, 25368, 67, 7783, 67, 5280, 13, 365, 18, 2910, 273, 7075, 18, 3371, 12, 5510, 16, 599, 13, 2589, 18, 14137, 4476, 273, ...
""" Generate Changeset belonging to the given time period (start, stop).
"""Generate Changeset belonging to the given time period (start, stop).
def get_changesets(self, start, stop): """ Generate Changeset belonging to the given time period (start, stop). """ rev = self.youngest_rev while rev: if self.authz.has_permission_for_changeset(rev): chgset = self.get_changeset(rev) if chgset.date < start: return if chgset.date < stop: yield chgset rev = self.previous_rev(rev)
3d49bda6767e9de61cc951b87411bf3eea2b250a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2831/3d49bda6767e9de61cc951b87411bf3eea2b250a/api.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 6329, 2413, 12, 2890, 16, 787, 16, 2132, 4672, 3536, 4625, 17776, 278, 17622, 358, 326, 864, 813, 3879, 261, 1937, 16, 2132, 2934, 3536, 5588, 273, 365, 18, 93, 465, 17592, 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, 336, 67, 6329, 2413, 12, 2890, 16, 787, 16, 2132, 4672, 3536, 4625, 17776, 278, 17622, 358, 326, 864, 813, 3879, 261, 1937, 16, 2132, 2934, 3536, 5588, 273, 365, 18, 93, 465, 17592, 67...
')'
'))'
def products_by_location(self, cursor, user, location_ids, product_ids=None, with_childs=False, skip_zero=True, context=None): """ Compute for each location and product the stock quantity in the default uom of the product.
62dd82a73f81c502cd51a77e9014499bded294a6 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9298/62dd82a73f81c502cd51a77e9014499bded294a6/product.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10406, 67, 1637, 67, 3562, 12, 2890, 16, 3347, 16, 729, 16, 2117, 67, 2232, 16, 3017, 67, 2232, 33, 7036, 16, 598, 67, 3624, 87, 33, 8381, 16, 2488, 67, 7124, 33, 5510, 16, 819, 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, 10406, 67, 1637, 67, 3562, 12, 2890, 16, 3347, 16, 729, 16, 2117, 67, 2232, 16, 3017, 67, 2232, 33, 7036, 16, 598, 67, 3624, 87, 33, 8381, 16, 2488, 67, 7124, 33, 5510, 16, 819, 33...