rem stringlengths 2 226k | add stringlengths 0 227k | context stringlengths 8 228k | meta stringlengths 156 215 | input_ids list | attention_mask list | labels list |
|---|---|---|---|---|---|---|
if not reg.event_id.product_id: raise wizard.except_wizard('Warning !', 'No Product defined in the Event ') if not reg.partner_address_id: raise wizard.except_wizard('Warning !', 'No "Partner Contact" defined on Registration ') if not reg.partner_invoice_id: raise wizard.except_wizard('Warning !', 'No "Partner to Invoice" defined on the Registration ') | def _makeInvoices(self, cr, uid, data, context): invoices = {} invoice_ids = [] create_ids=[] tax_ids=[] pool_obj=pooler.get_pool(cr.dbname) inv_create = 0 inv_reject = 0 list_inv = [] obj_event_reg=pool_obj.get('event.registration') data_event_reg=obj_event_reg.browse(cr,uid,data['ids']) obj_lines=pool_obj.get('account.invoice.line') for reg in data_event_reg: if (not reg.tobe_invoiced) or (reg.invoice_id) or (reg.check_mode) or (not reg.check_ids): inv_reject = inv_reject + 1 continue inv_create = inv_create + 1 value=obj_lines.product_id_change(cr, uid, [], reg.event_id.product_id.id,uom =False, partner_id=reg.partner_invoice_id.id) if not reg.event_id.product_id: raise wizard.except_wizard('Warning !', 'No Product defined in the Event ') if not reg.partner_address_id: raise wizard.except_wizard('Warning !', 'No "Partner Contact" defined on Registration ') if not reg.partner_invoice_id: raise wizard.except_wizard('Warning !', 'No "Partner to Invoice" defined on the Registration ') data_product=pool_obj.get('product.product').browse(cr,uid,[reg.event_id.product_id.id]) a = reg.partner_invoice_id.property_account_receivable.id for tax in data_product[0].taxes_id: tax_ids.append(tax.id) inv_id =pool_obj.get('account.invoice.line').create(cr, uid, { 'name': reg.invoice_label, 'account_id':value['value']['account_id'], 'price_unit': reg.unit_price,# value['value']['price_unit'], 'quantity': reg.nb_register, 'discount': False, 'uos_id': value['value']['uos_id'], 'product_id':reg.event_id.product_id.id, 'invoice_line_tax_id': [(6,0,tax_ids)], 'note':False, }) create_ids.append(inv_id) inv = { 'name': reg.invoice_label, 'origin': reg.invoice_label, 'type': 'out_invoice', 'reference': False, 'account_id': reg.partner_invoice_id.property_account_receivable.id, 'partner_id': reg.partner_invoice_id.id, 'address_invoice_id':reg.partner_address_id.id, 'address_contact_id':reg.partner_address_id.id, 'invoice_line': [(6,0,create_ids)], 'currency_id' :reg.partner_invoice_id.property_product_pricelist.currency_id.id,# 1, 'comment': "", 'payment_term':reg.partner_invoice_id.property_payment_term.id, } inv_obj = pool_obj.get('account.invoice') inv_id = inv_obj.create(cr, uid, inv) list_inv.append(inv_id) obj_event_reg.write(cr, uid,data['ids'], {'invoice_id' : inv_id}) if (not reg.tobe_invoiced) or reg.check_mode or (not reg.check_ids): pass #raise wizard.except_wizard('Warning !', 'This registration should not be invoiced ') if reg.invoice_id: pass #raise wizard.except_wizard('Warning !', 'This registration already has an invoice linked ') return {'inv_created' : str(inv_create) , 'inv_rejected' : str(inv_reject) , 'invoice_ids': list_inv} | 00731c66c67338761a9586bc8fbbd08b85ad5b5c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7339/00731c66c67338761a9586bc8fbbd08b85ad5b5c/make_invoice.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
6540,
3605,
17725,
12,
2890,
16,
4422,
16,
4555,
16,
501,
16,
819,
4672,
2198,
17725,
273,
2618,
9179,
67,
2232,
273,
5378,
752,
67,
2232,
33,
8526,
5320,
67,
2232,
33,
8526,
2845... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
6540,
3605,
17725,
12,
2890,
16,
4422,
16,
4555,
16,
501,
16,
819,
4672,
2198,
17725,
273,
2618,
9179,
67,
2232,
273,
5378,
752,
67,
2232,
33,
8526,
5320,
67,
2232,
33,
8526,
2845... | |
detailpage.append('<h1>Performance Variance for the previous 7 days</h1>\n') | detailpage.append('<h1>Performance Standard Deviation for the previous 7 days</h1>\n') | def generateVarianceDetailPage(self, pagename, tests, startdate, enddate): # tests { testname: { build: { date: { hour: [ (testname, itemDateTime, delta.days, buildname, hour, revision, runs, total, average) ] }}}} | 529018113dc78215bd476acf6fba265caad9be59 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/529018113dc78215bd476acf6fba265caad9be59/perf.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2103,
25987,
6109,
1964,
12,
2890,
16,
4262,
1069,
16,
7434,
16,
787,
712,
16,
679,
712,
4672,
468,
7434,
288,
1842,
529,
30,
288,
1361,
30,
288,
1509,
30,
288,
6126,
30,
306,
261,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2103,
25987,
6109,
1964,
12,
2890,
16,
4262,
1069,
16,
7434,
16,
787,
712,
16,
679,
712,
4672,
468,
7434,
288,
1842,
529,
30,
288,
1361,
30,
288,
1509,
30,
288,
6126,
30,
306,
261,
3... |
self.config.set_removeable_target_volume(False) | self.config.target_volume_removeable = False | def on_permanent_mode_changed(self, widget, data=None): if widget.get_active(): self.config.set_removeable_target_volume(False) | b8eb09d77c6c5b344494faa001ce2dc4706eac45 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/736/b8eb09d77c6c5b344494faa001ce2dc4706eac45/cozy-configdialog.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
67,
457,
4728,
319,
67,
3188,
67,
6703,
12,
2890,
16,
3604,
16,
501,
33,
7036,
4672,
309,
3604,
18,
588,
67,
3535,
13332,
365,
18,
1425,
18,
542,
67,
4479,
429,
67,
3299,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
67,
457,
4728,
319,
67,
3188,
67,
6703,
12,
2890,
16,
3604,
16,
501,
33,
7036,
4672,
309,
3604,
18,
588,
67,
3535,
13332,
365,
18,
1425,
18,
542,
67,
4479,
429,
67,
3299,
67,
... |
return False | return chg | def update (config, baseurl, dryrun=False, log=None): """Update the given configuration object with .zap files found at baseurl. If dryrun is True, only print out the changes but do nothing throws IOError on error """ url = baseurl+"filter-md5sums.txt" try: page = open_url(url) except IOError, msg: print >>log, "error fetching %s:"%url, msg return False chg = False filemap = {} for filename in filterconf_files(): filemap[os.path.basename(filename)] = filename lines = page.read().splitlines() for line in lines: if "<" in line: print >>log, "error fetching", url return False if not line: continue md5sum, filename = line.split() assert filename.endswith('.zap') fullname = os.path.join(ConfigDir, filename) # compare checksums if filemap.has_key(filename): f = file(fullname) data = f.read() digest = list(md5.new(data).digest()) f.close() digest = "".join([ "%0.2x"%ord(c) for c in digest ]) if digest==md5sum: print >>log, "filter", filename, "not changed, ignoring" continue print >>log, "updating filter", filename else: print >>log, "adding new filter", filename url = baseurl+filename+".gz" page = open_url(url) p = ZapperParser(fullname) p.parse(page, config) chg = config.merge_folder(p.folder, dryrun=dryrun, log=log) or chg url = baseurl+"extern-md5sums.txt" try: page = open_url(url) except IOError, msg: print >>log, "error fetching %s:"%url, msg return False lines = page.read().splitlines() for line in lines: if "<" in line: print >>log, "error fetching", url return False if not line: continue md5sum, filename = line.split() # XXX UNIX-generated md5sum filenames with subdirs are not portable fullname = os.path.join(ConfigDir, filename) # compare checksums if os.path.exists(fullname): f = file(fullname) data = f.read() digest = list(md5.new(data).digest()) f.close() digest = "".join([ "%0.2x"%ord(c) for c in digest ]) if digest==md5sum: print >>log, "extern filter", filename, "not changed, ignoring" continue print >>log, "updating extern filter", filename else: print >>log, "adding new extern filter", filename chg = True if not dryrun: url = baseurl+filename try: page = open_url(url) except IOError, msg: print >>log, "error fetching", url continue f = file(fullname, 'wb') f.write(page.read()) f.close() return chg | ff26d3c4dce7bb18e52370745ecc28f73cd601b5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3948/ff26d3c4dce7bb18e52370745ecc28f73cd601b5/update.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
261,
1425,
16,
25427,
16,
10299,
2681,
33,
8381,
16,
613,
33,
7036,
4672,
3536,
1891,
326,
864,
1664,
733,
598,
263,
94,
438,
1390,
1392,
622,
25427,
18,
971,
10299,
2681,
353,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
261,
1425,
16,
25427,
16,
10299,
2681,
33,
8381,
16,
613,
33,
7036,
4672,
3536,
1891,
326,
864,
1664,
733,
598,
263,
94,
438,
1390,
1392,
622,
25427,
18,
971,
10299,
2681,
353,
1... |
"expected-one-end-tag-but-got-another", {"expectedName": "body", "gotName": node.name}) | "end-tag-too-early", {"name": token["name"]}) node = self.tree.openElements.pop() while node.name != token["name"]: node = self.tree.openElements.pop() def endTagHeading(self, token): for item in headingElements: if self.tree.elementInScope(item): self.tree.generateImpliedEndTags() | def endTagBody(self, token): if not self.tree.elementInScope("body"): self.parser.parseError() return elif self.tree.openElements[-1].name != "body": for node in self.tree.openElements[2:]: if node.name not in frozenset(("dd", "dt", "li", "optgroup", "option", "p", "rp", "rt", "tbody", "td", "tfoot", "th", "thead", "tr", "body", "html")): #Not sure this is the correct name for the parse error self.parser.parseError( "expected-one-end-tag-but-got-another", {"expectedName": "body", "gotName": node.name}) break self.parser.phase = self.parser.phases["afterBody"] | d34b631d2e45870e85a6b7e5f824aa96f5632111 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9368/d34b631d2e45870e85a6b7e5f824aa96f5632111/html5parser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
29765,
2250,
12,
2890,
16,
1147,
4672,
309,
486,
365,
18,
3413,
18,
2956,
382,
3876,
2932,
3432,
6,
4672,
365,
18,
4288,
18,
2670,
668,
1435,
327,
1327,
365,
18,
3413,
18,
3190,
3471,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
29765,
2250,
12,
2890,
16,
1147,
4672,
309,
486,
365,
18,
3413,
18,
2956,
382,
3876,
2932,
3432,
6,
4672,
365,
18,
4288,
18,
2670,
668,
1435,
327,
1327,
365,
18,
3413,
18,
3190,
3471,
... |
return getattr(self.task[len(self.task.task) - 1], attr) | return getattr(self.task[len(self.task) - 1], attr) | def __get_rtm_task_attribute(self, attr): if hasattr(self.task, 'task'): if hasattr(self.task.task, 'list'): return getattr(self.task.task.list, attr) elif type(self.task.task) == list: return getattr(self.task.task[len(self.task.task) - 1], attr) else: return getattr(self.task.task, attr) else: if type(self.task) == list: return getattr(self.task[len(self.task.task) - 1], attr) else: return getattr(self.task, attr) | f57538aa7e0d646af5cb0953a9ae039bf21c3fbe /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/f57538aa7e0d646af5cb0953a9ae039bf21c3fbe/rtmTask.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
588,
67,
3797,
81,
67,
4146,
67,
4589,
12,
2890,
16,
1604,
4672,
309,
3859,
12,
2890,
18,
4146,
16,
296,
4146,
11,
4672,
309,
3859,
12,
2890,
18,
4146,
18,
4146,
16,
296,
1098,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
588,
67,
3797,
81,
67,
4146,
67,
4589,
12,
2890,
16,
1604,
4672,
309,
3859,
12,
2890,
18,
4146,
16,
296,
4146,
11,
4672,
309,
3859,
12,
2890,
18,
4146,
18,
4146,
16,
296,
1098,... |
MelFid('SCRI','script'), MelFid('ENAM','enchantment'), MelOptStruct('ANAM','H','enchantPoints'), | MelDestructable(), | # def __init__(self,attr='model',index=0): | cfbf8dc67593fbc5417e401d5773edc2dddcbf80 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6682/cfbf8dc67593fbc5417e401d5773edc2dddcbf80/bosh.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
468,
377,
1652,
1001,
2738,
972,
12,
2890,
16,
1747,
2218,
2284,
2187,
1615,
33,
20,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
468,
377,
1652,
1001,
2738,
972,
12,
2890,
16,
1747,
2218,
2284,
2187,
1615,
33,
20,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
def connect(self, host='', port=0): | def connect(self, host='', port=ftplib.FTP_PORT): | def connect(self, host='', port=0): self.host=host self.port=port ftplib.FTP.connect(host, port) | c8cffff10ef78cf492bbfb8f8336fa90bf4133c6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2304/c8cffff10ef78cf492bbfb8f8336fa90bf4133c6/ftpfs.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3077,
12,
2890,
16,
1479,
2218,
2187,
1756,
33,
1222,
6673,
18,
17104,
67,
6354,
4672,
365,
18,
2564,
33,
2564,
365,
18,
655,
33,
655,
11038,
6673,
18,
17104,
18,
3612,
12,
2564,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3077,
12,
2890,
16,
1479,
2218,
2187,
1756,
33,
1222,
6673,
18,
17104,
67,
6354,
4672,
365,
18,
2564,
33,
2564,
365,
18,
655,
33,
655,
11038,
6673,
18,
17104,
18,
3612,
12,
2564,
16,
... |
class SOAPServer(SocketServer.TCPServer, SOAPServerBase): | class SOAPServer(SOAPServerBase, SocketServer.TCPServer): | def log_message(self, format, *args): if self.server.log: BaseHTTPServer.BaseHTTPRequestHandler.\ log_message (self, format, *args) | edd6ae82ee812a90957cc99a3b0fee5434f7b901 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/edd6ae82ee812a90957cc99a3b0fee5434f7b901/Server.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
613,
67,
2150,
12,
2890,
16,
740,
16,
380,
1968,
4672,
309,
365,
18,
3567,
18,
1330,
30,
3360,
3693,
2081,
18,
2171,
23891,
1503,
8403,
613,
67,
2150,
261,
2890,
16,
740,
16,
380,
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,
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,
613,
67,
2150,
12,
2890,
16,
740,
16,
380,
1968,
4672,
309,
365,
18,
3567,
18,
1330,
30,
3360,
3693,
2081,
18,
2171,
23891,
1503,
8403,
613,
67,
2150,
261,
2890,
16,
740,
16,
380,
19... |
self.text.append("\n") | self.text.append(self.new_line) | def process_dl(self, node): self.depth += 1 markup = ":: " # can there be a dl dd without dt? for i in node.childNodes: if i.nodeType == Node.ELEMENT_NODE: name = i.localName if name == 'dt': before, indent, markup = self._get_list_item_markup(node, i) self.text.append(before+indent) text = self.node_list_text_only(i.childNodes) self.text.append(text.replace("\n", " ")) elif name == 'dd': self.text.append(markup) self.process_list_item(i, indent) else: raise ConvertError("Illegal list element %s" % i.localName) self.depth -= 1 if self.depth == 0: self.text.append("\n") | 4b03df1cf340caeb2a0e882fb5c853890be75c31 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/888/4b03df1cf340caeb2a0e882fb5c853890be75c31/text_html_text_x_moin.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
67,
5761,
12,
2890,
16,
756,
4672,
365,
18,
5979,
1011,
404,
9813,
273,
315,
2866,
315,
468,
848,
1915,
506,
279,
8910,
6957,
2887,
3681,
35,
364,
277,
316,
756,
18,
3624,
3205,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
67,
5761,
12,
2890,
16,
756,
4672,
365,
18,
5979,
1011,
404,
9813,
273,
315,
2866,
315,
468,
848,
1915,
506,
279,
8910,
6957,
2887,
3681,
35,
364,
277,
316,
756,
18,
3624,
3205,
... |
k = win32api.RegOpenKeyEx(base,K) | k = _RegOpenKeyEx(base,K) | def get_msvc_paths (path, version='6.0', platform='x86'): """Get a list of devstudio directories (include, lib or path). Return a list of strings; will be empty list if unable to access the registry or appropriate registry keys not found.""" try: import win32api import win32con except ImportError: return [] L = [] if path=='lib': path= 'Library' path = string.upper(path + ' Dirs') K = ('Software\\Microsoft\\Devstudio\\%s\\' + 'Build System\\Components\\Platforms\\Win32 (%s)\\Directories') % \ (version,platform) for base in (win32con.HKEY_CLASSES_ROOT, win32con.HKEY_LOCAL_MACHINE, win32con.HKEY_CURRENT_USER, win32con.HKEY_USERS): try: k = win32api.RegOpenKeyEx(base,K) i = 0 while 1: try: (p,v,t) = win32api.RegEnumValue(k,i) if string.upper(p) == path: V = string.split(v,';') for v in V: if v == '' or v in L: continue L.append(v) break i = i + 1 except win32api.error: break except win32api.error: pass return L | a7bdf4c41f468872cf58877a70eddba91276467e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/a7bdf4c41f468872cf58877a70eddba91276467e/msvccompiler.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
959,
4227,
67,
4481,
261,
803,
16,
1177,
2218,
26,
18,
20,
2187,
4072,
2218,
92,
5292,
11,
4672,
3536,
967,
279,
666,
434,
4461,
334,
4484,
6402,
261,
6702,
16,
2561,
578,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
959,
4227,
67,
4481,
261,
803,
16,
1177,
2218,
26,
18,
20,
2187,
4072,
2218,
92,
5292,
11,
4672,
3536,
967,
279,
666,
434,
4461,
334,
4484,
6402,
261,
6702,
16,
2561,
578,
5... |
file.readline(); | file.readline(); | def load_msh(filename,orbiterpath,convert_coords): '''Read MSH file''' print("filepath=",filename,"orbiterpath=",orbiterpath) file=open(filename,"r") s=file.readline(); if s!='MSHX1\n': print("This file is not orbiter mesh: ",s) return else: print("Orbiter mesh format detected ") n_groups=0 #N of groups from header n_materials=0 #N of mats from header n_textures=0 #N of texs from header n_grp=0 #real N of groups mat=[] #mats in group (int) tex=[] #texs in group (int) groups=[] #groups description [label(str),mat(int),tex(int),nv(int),nt(int),obj(bpy.data.object)] materials=[] #materials description [name,[diff RGBA],[amb RGBA],[spec RGBAP],[emit RGBA]] textures=[] #[texture filename, texture name] while True: s=file.readline() if s=='': break; v=s.split() #print (v) #------Reading GROUPS section------------- if v[0]=="GROUPS": print("Reading groups:") n_groups=int(v[1]); n_mat=0; n_tex=0 #group material and texture label="" while n_grp<n_groups: s1=file.readline(); v1=s1.split() #if v1[0]=="NONORMAL": # print("NONORMAL!") if v1[0]=="LABEL": label=v1[1] if v1[0]=="MATERIAL": n_mat=int(v1[1]) #1..n if v1[0]=="TEXTURE": n_tex=int(v1[1]) #1..n #Reading geometry if v1[0]=="GEOM": vtx=[] tri=[] norm=[] uv=[] nv=int(v1[1]) nt=int(v1[2]) #print ("Group No:",n_grp," verts=",nv," tris=",nt) for n in range(nv): s2=file.readline(); v2=s2.split(); #print(v2); if convert_coords: vtx.append([-float(v2[0]),-float(v2[2]),float(v2[1])])# convert from left-handed coord system else: vtx.append([float(v2[0]),float(v2[1]),float(v2[2])]) #without conversion if len(v2)>5: #there are normals (not vtx+uvs only) #should I convert the normals? norm.append([float(v2[3]),float(v2[4]),float(v2[5])]) if len(v2)==8: #there are normals and uvs if convert_coords: #in Blender, (0,0) is the upper-left corner. #in Orbiter -- lower-left corner. So I must invert V axis uv.append([float(v2[6]),1.0-float(v2[7])]) else: uv.append([float(v2[6]),float(v2[7])]) elif len(v2)==5: #there are only uvs if convert_coords: uv.append([float(v2[3]),1.0-float(v2[4])]) else: uv.append([float(v2[3]),float(v2[4])]) for n in range(nt): #read triangles s2=file.readline(); v2=s2.split(); if convert_coords: tri.append([int(v2[0]),int(v2[2]),int(v2[1])]) #reverted triangle else: tri.append([int(v2[0]),int(v2[1]),int(v2[2])]) #non reverted triangle #print (vtx) #print(norm) n_grp=n_grp+1; if label=='': label="ORBGroup"+str(n_grp) obj=create_mesh(label,vtx,tri,norm,uv) if n_mat!=0: mat.append(n_mat) if n_tex!=0: tex.append(n_tex) groups.append([label,n_mat,n_tex,nv,nt,obj]) label="" #--------------Reading MATERIALS section----------------------- elif v[0]=="MATERIALS": n_materials=int(v[1]) print("-------Reading Materials section,nmats=",n_materials,"------------") #material names for i in range (n_materials): materials.append([file.readline().strip()]) #material properties for i in range (n_materials): file.readline(); # TODO: name checking for n in range(4): s1=file.readline() v1=s1.split() print("Reading material component,n=",n," comp=",v1) if (n==2)and(len(v1)==5): #Specular,5 components materials[i].append([float(v1[0]),float(v1[1]),float(v1[2]),float(v1[3]),float(v1[4])]) else: #Other, 4 components materials[i].append([float(v1[0]),float(v1[1]),float(v1[2]),float(v1[3])]) #---------------Reading TEXTURES section------------------ elif v[0]=="TEXTURES": n_textures=int(v[1]); for i in range(n_textures): textures.append([file.readline().strip(),"ORBTexture"+str(i)]) print(""); print("==========================Summary===========================================") print("Headers: groups=",n_groups," materials=",n_materials," textures=",n_textures) print("\nData:\nGroups:") print(groups,"\nReal No=",len(groups)) print("Materials:",materials) print("Textures:",textures) print("Materials in groups:",mat) print("Textures in groups:",tex) #file file.close() create_materials(groups,materials,textures,orbiterpath) return{"FINISHED"} | a742957b6ee3c17a1d5ddaf38dbe115cb0e00154 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10993/a742957b6ee3c17a1d5ddaf38dbe115cb0e00154/io_import_msh.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1262,
67,
81,
674,
12,
3459,
16,
16640,
2165,
803,
16,
6283,
67,
9076,
4672,
9163,
1994,
490,
2664,
585,
26418,
1172,
2932,
10561,
1546,
16,
3459,
10837,
16640,
2165,
803,
1546,
16,
1664... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
67,
81,
674,
12,
3459,
16,
16640,
2165,
803,
16,
6283,
67,
9076,
4672,
9163,
1994,
490,
2664,
585,
26418,
1172,
2932,
10561,
1546,
16,
3459,
10837,
16640,
2165,
803,
1546,
16,
1664... |
def stopcomm(): | def stopcomm(self): | def stopcomm(): """ <Purpose> Stops the listener thread from waitforconn. <Side effects> The virtual sockets will no longer get data buffered. """ self.stopcomm = True | 67cd0076600d34842ab89638d144dd99685df4ce /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7995/67cd0076600d34842ab89638d144dd99685df4ce/NATLayer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2132,
5702,
12,
2890,
4672,
3536,
411,
10262,
4150,
34,
934,
4473,
326,
2991,
2650,
628,
2529,
1884,
4646,
18,
225,
411,
8895,
16605,
34,
1021,
5024,
16762,
903,
1158,
7144,
336,
501,
11... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2132,
5702,
12,
2890,
4672,
3536,
411,
10262,
4150,
34,
934,
4473,
326,
2991,
2650,
628,
2529,
1884,
4646,
18,
225,
411,
8895,
16605,
34,
1021,
5024,
16762,
903,
1158,
7144,
336,
501,
11... |
not (len(path_info[0]) == 4 and path_info[0].isdigit()): | not (len(path_info[0]) == 4 and path_info[0].isdigit()): | def blosxom_process_path_info(args): """ Process HTTP PATH_INFO for URI according to path specifications, fill in data dict accordingly. The paths specification looks like this: - C{/foo.html} and C{/cat/foo.html} - file foo.* in / and /cat - C{/cat} - category - C{/2002} - category - C{/2002} - year - C{/2002/Feb} (or 02) - Year and Month - C{/cat/2002/Feb/31} - year and month day in category. @param args: dict containing the incoming Request object @type args: object """ request = args['request'] config = request.getConfiguration() data = request.getData() pyhttp = request.getHttp() form = request.getForm() # figure out which flavour to use. the flavour is determined # by looking at the "flav" post-data variable, the "flav" # query string variable, the "default_flavour" setting in the # config.py file, or "html" flav = config.get("default_flavour", "html") if form.has_key("flav"): flav = form["flav"].value data['flavour'] = flav data['pi_yr'] = '' data['pi_mo'] = '' data['pi_da'] = '' path_info = pyhttp.get("PATH_INFO", "") data['root_datadir'] = config['datadir'] data["pi_bl"] = path_info # first we check to see if this is a request for an index and we can pluck # the extension (which is certainly a flavour) right off. newpath, ext = os.path.splitext(path_info) if newpath.endswith("/index") and ext: # there is a flavour-like thing, so that's our new flavour # and we adjust the path_info to the new filename data["flavour"] = ext[1:] path_info = newpath while path_info and path_info.startswith("/"): path_info = path_info[1:] absolute_path = os.path.join(config["datadir"], path_info) path_info = path_info.split("/") if os.path.isdir(absolute_path): # this is an absolute path data['root_datadir'] = absolute_path data['bl_type'] = 'dir' elif absolute_path.endswith("/index") and \ os.path.isdir(absolute_path[:-6]): # this is an absolute path with /index at the end of it data['root_datadir'] = absolute_path[:-6] data['bl_type'] = 'dir' else: # this is either a file or a date ext = tools.what_ext(data["extensions"].keys(), absolute_path) if not ext: # it's possible we didn't find the file because it's got a flavour # thing at the end--so try removing it and checking again. newpath, flav = os.path.splitext(absolute_path) if flav: ext = tools.what_ext(data["extensions"].keys(), newpath) if ext: # there is a flavour-like thing, so that's our new flavour # and we adjust the absolute_path and path_info to the new # filename data["flavour"] = flav[1:] absolute_path = newpath path_info, flav = os.path.splitext("/".join(path_info)) path_info = path_info.split("/") if ext: # this is a file data["bl_type"] = "file" data["root_datadir"] = absolute_path + "." + ext else: data["bl_type"] = "dir" # it's possible to have category/category/year/month/day # (or something like that) so we pluck off the categories # here. pi_bl = "" while len(path_info) > 0 and \ not (len(path_info[0]) == 4 and path_info[0].isdigit()): pi_bl = os.path.join(pi_bl, path_info.pop(0)) # handle the case where we do in fact have a category # preceeding the date. if pi_bl: pi_bl = pi_bl.replace("\\", "/") data["pi_bl"] = pi_bl data["root_datadir"] = os.path.join(config["datadir"], pi_bl) if len(path_info) > 0: item = path_info.pop(0) # handle a year token if len(item) == 4 and item.isdigit(): data['pi_yr'] = item item = "" if (len(path_info) > 0): item = path_info.pop(0) # handle a month token if item in tools.MONTHS: data['pi_mo'] = item item = "" if (len(path_info) > 0): item = path_info.pop(0) # handle a day token if len(item) == 2 and item.isdigit(): data["pi_da"] = item item = "" if len(path_info) > 0: item = path_info.pop(0) # if the last item we picked up was "index", then we # just ditch it because we don't need it. if item == "index": item = "" # if we picked off an item we don't recognize and/or # there is still stuff in path_info to pluck out, then # it's likely this wasn't a date. if item or len(path_info) > 0: data["bl_type"] = "dir" data["root_datadir"] = absolute_path # construct our final URL url = config['base_url'] if data['pi_bl'].startswith("/") and url.endswith("/"): url = url[:-1] + data['pi_bl'] elif data['pi_bl'].startswith("/") or url.endswith("/"): url = url + data["pi_bl"] else: url = url + "/" + data['pi_bl'] data['url'] = url # set path_info to our latest path_info data['path_info'] = path_info | 2d889182f07a1e20247eba2168cf4d18f81fcdab /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11836/2d889182f07a1e20247eba2168cf4d18f81fcdab/pyblosxom.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
324,
383,
30319,
362,
67,
2567,
67,
803,
67,
1376,
12,
1968,
4672,
3536,
4389,
2239,
7767,
67,
5923,
364,
3699,
4888,
358,
589,
21950,
16,
3636,
316,
501,
2065,
15905,
18,
225,
1021,
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,
324,
383,
30319,
362,
67,
2567,
67,
803,
67,
1376,
12,
1968,
4672,
3536,
4389,
2239,
7767,
67,
5923,
364,
3699,
4888,
358,
589,
21950,
16,
3636,
316,
501,
2065,
15905,
18,
225,
1021,
2... |
self.insertionModes["inHead"](self.parser).processStartTag(name, attributes) | self.parser.insertionModes["inHead"](self.parser).processStartTag(name, attributes) | def startTagFromHead(self, name, attributes): self.parser.parseError() self.insertionModes["inHead"](self.parser).processStartTag(name, attributes) | 2f9678746a2d8465e8e27da93a34f3f4cc26e64a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10463/2f9678746a2d8465e8e27da93a34f3f4cc26e64a/parser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
787,
1805,
1265,
1414,
12,
2890,
16,
508,
16,
1677,
4672,
365,
18,
4288,
18,
2670,
668,
1435,
365,
18,
6387,
285,
18868,
9614,
267,
1414,
11929,
12,
2890,
18,
4288,
2934,
2567,
30512,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
787,
1805,
1265,
1414,
12,
2890,
16,
508,
16,
1677,
4672,
365,
18,
4288,
18,
2670,
668,
1435,
365,
18,
6387,
285,
18868,
9614,
267,
1414,
11929,
12,
2890,
18,
4288,
2934,
2567,
30512,
... |
self.assertEquals(z._1._elemsname, 'item') self.assertEquals(z._1, x) | self.assertEquals(z.v1._elemsname, 'item') self.assertEquals(z.v1, x) | def testStringArray1(self): x = arrayType(['a', 'b', 'c']) y = buildSOAP(x) z = parseSOAP(y) self.assertEquals(z._1._elemsname, 'item') self.assertEquals(z._1, x) | 5011d69d8c35bbb8b43777f4f7529738464399b8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/5011d69d8c35bbb8b43777f4f7529738464399b8/SOAPtest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
28547,
21,
12,
2890,
4672,
619,
273,
526,
559,
12,
3292,
69,
2187,
296,
70,
2187,
296,
71,
19486,
677,
273,
1361,
27952,
12,
92,
13,
998,
273,
1109,
27952,
12,
93,
13,
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,
1842,
28547,
21,
12,
2890,
4672,
619,
273,
526,
559,
12,
3292,
69,
2187,
296,
70,
2187,
296,
71,
19486,
677,
273,
1361,
27952,
12,
92,
13,
998,
273,
1109,
27952,
12,
93,
13,
365,
18,... |
self.assertEqual(sys.stdout.getvalue().splitlines(), ['0', '0.5', '0']) | if 1/2 == 0: expected = ['0', '0.5', '0'] else: expected = ['0.5', '0.5', '0.5'] self.assertEqual(sys.stdout.getvalue().splitlines(), expected) | def test_input_and_raw_input(self): self.write_testfile() fp = open(TESTFN, 'r') savestdin = sys.stdin savestdout = sys.stdout # Eats the echo try: sys.stdin = fp sys.stdout = BitBucket() self.assertEqual(input(), 2) self.assertEqual(input('testing\n'), 2) self.assertEqual(raw_input(), 'The quick brown fox jumps over the lazy dog.') self.assertEqual(raw_input('testing\n'), 'Dear John') sys.stdin = cStringIO.StringIO("NULL\0") self.assertRaises(TypeError, input, 42, 42) sys.stdin = cStringIO.StringIO(" 'whitespace'") self.assertEqual(input(), 'whitespace') sys.stdin = cStringIO.StringIO() self.assertRaises(EOFError, input) | 192467e7bd12a0aa0f2c52ed83df5267b697c374 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/192467e7bd12a0aa0f2c52ed83df5267b697c374/test_builtin.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
2630,
67,
464,
67,
1899,
67,
2630,
12,
2890,
4672,
365,
18,
2626,
67,
3813,
768,
1435,
4253,
273,
1696,
12,
16961,
19793,
16,
296,
86,
6134,
4087,
395,
72,
267,
273,
2589,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2630,
67,
464,
67,
1899,
67,
2630,
12,
2890,
4672,
365,
18,
2626,
67,
3813,
768,
1435,
4253,
273,
1696,
12,
16961,
19793,
16,
296,
86,
6134,
4087,
395,
72,
267,
273,
2589,
... |
loading config earlier. | having url_prefix in a server config. | def do_GET(self): """ Handle GET requests | d871f754d57a7326d4110c5ba7c8f1edcbe12207 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/888/d871f754d57a7326d4110c5ba7c8f1edcbe12207/standalone.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
67,
3264,
12,
2890,
4672,
3536,
5004,
4978,
3285,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
67,
3264,
12,
2890,
4672,
3536,
5004,
4978,
3285,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
points in the fine grid are the values | points in the fine grid are the values and (2) (for debugging purposes) returns a list of points in the fine grid that didn't make it NB: *** should work alright if the resolution isn't too coarse (because it uses the infinitesimal form of the metric); 5 is at the upper end of ok *** there is a fudge factor (epsilon) in the distance computation to help account for not using the integrated distance and to help with floating point comparisons | def map_grids(coarsegrid,finegrid,coarseres=4.0): """ takes the two grids (lists of lat/lon tuples) and returns a dictionary where the points in the coarse grid are the keys and lists of tuples of points in the fine grid are the values """ fgtemp = finegrid[:] coarsedict = {} ds = coarseres*pi/180.0 for cpt in coarsegrid: flist = [] for fpt in fgtemp: if (cpt[0]-fpt[0])*(cpt[0]-fpt[0]) <= ds*ds/4.0 and \ (cpt[1]-fpt[1])*(cpt[1]-fpt[1])*sin(cpt[0])*sin(cpt[0]) \ <= ds*ds/4.0: flist.append(fpt) coarsedict[cpt] = flist for rpt in flist: fgtemp.remove(rpt) return coarsedict, fgtemp | d69ffde23efc993920516ab5cdf9a1e2e5274f4b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/d69ffde23efc993920516ab5cdf9a1e2e5274f4b/skylocutils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
852,
67,
5222,
87,
12,
2894,
24378,
5222,
16,
74,
558,
5222,
16,
2894,
297,
550,
281,
33,
24,
18,
20,
4672,
3536,
5530,
326,
2795,
3068,
87,
261,
9772,
434,
2516,
19,
9379,
10384,
13... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
852,
67,
5222,
87,
12,
2894,
24378,
5222,
16,
74,
558,
5222,
16,
2894,
297,
550,
281,
33,
24,
18,
20,
4672,
3536,
5530,
326,
2795,
3068,
87,
261,
9772,
434,
2516,
19,
9379,
10384,
13... |
for menu in self.browse(cr, uid, ids): | for menu in self.browse(cr, uid, ids, context=context): | def search(self, cr, uid, args, offset=0, limit=None, order=None, context=None, count=False): | 498a04ae2d5f9cbb170ea1d2f08e9ab773d9a8a9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/498a04ae2d5f9cbb170ea1d2f08e9ab773d9a8a9/ir_ui_menu.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1623,
12,
2890,
16,
4422,
16,
4555,
16,
833,
16,
1384,
33,
20,
16,
1800,
33,
7036,
16,
1353,
33,
7036,
16,
819,
33,
7036,
16,
1056,
33,
8381,
4672,
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,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1623,
12,
2890,
16,
4422,
16,
4555,
16,
833,
16,
1384,
33,
20,
16,
1800,
33,
7036,
16,
1353,
33,
7036,
16,
819,
33,
7036,
16,
1056,
33,
8381,
4672,
2,
-100,
-100,
-100,
-100,
-100,
... |
for pilot in resDict: if pilot['PilotID'] in result['Value']: pilot['Jobs'] = result['Value'][pilot['PilotID']] | jobsDict = result[ 'Value' ] for pilotRef in resDict: pilotInfo = resDict[ pilotRef ] pilotID = pilotInfo[ 'PilotID' ] if pilotID in jobsDict: pilotInfo[ 'Jobs' ] = jobsDict[ pilotID ] | def getPilotInfo( self, pilotRef = False, parentId = False, conn = False ): """ Get all the information for the pilot job reference or reference list """ | e48ece4398c84d3b6783e3fe62b5294addbd27d8 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12864/e48ece4398c84d3b6783e3fe62b5294addbd27d8/PilotAgentsDB.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1689,
22797,
966,
12,
365,
16,
293,
22797,
1957,
273,
1083,
16,
11582,
273,
1083,
16,
1487,
273,
1083,
262,
30,
3536,
968,
777,
326,
1779,
364,
326,
293,
22797,
1719,
2114,
578,
2114,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1689,
22797,
966,
12,
365,
16,
293,
22797,
1957,
273,
1083,
16,
11582,
273,
1083,
16,
1487,
273,
1083,
262,
30,
3536,
968,
777,
326,
1779,
364,
326,
293,
22797,
1719,
2114,
578,
2114,
... |
"Mac OS X deny the creation of a directory with an invalid utf8 name") | "Mac OS X denies the creation of a directory with an invalid utf8 name") | def test_abspath_issue3426(self): # Check that abspath returns unicode when the arg is unicode # with both ASCII and non-ASCII cwds. abspath = self.pathmodule.abspath for path in ('', 'fuu', 'f\xf9\xf9', '/fuu', 'U:\\'): self.assertIsInstance(abspath(path), str) | 9d4007501c848f04493e05eade1dda82cdfc627c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3187/9d4007501c848f04493e05eade1dda82cdfc627c/test_genericpath.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
5113,
803,
67,
13882,
5026,
5558,
12,
2890,
4672,
468,
2073,
716,
9488,
1135,
5252,
1347,
326,
1501,
353,
5252,
468,
598,
3937,
11768,
471,
1661,
17,
13756,
14098,
2377,
18,
94... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5113,
803,
67,
13882,
5026,
5558,
12,
2890,
4672,
468,
2073,
716,
9488,
1135,
5252,
1347,
326,
1501,
353,
5252,
468,
598,
3937,
11768,
471,
1661,
17,
13756,
14098,
2377,
18,
94... |
namespaceHTMLElements = True): | namespaceHTMLElements = True, debug=False): | def __init__(self, tree = simpletree.TreeBuilder, tokenizer = tokenizer.HTMLTokenizer, strict = False, namespaceHTMLElements = True): """ strict - raise an exception when a parse error is encountered | d34b631d2e45870e85a6b7e5f824aa96f5632111 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9368/d34b631d2e45870e85a6b7e5f824aa96f5632111/html5parser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
2151,
273,
3142,
1469,
992,
18,
25060,
16,
10123,
273,
10123,
18,
4870,
10524,
16,
5490,
273,
1083,
16,
1981,
5062,
11155,
87,
273,
1053,
16,
1198,
33,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
2151,
273,
3142,
1469,
992,
18,
25060,
16,
10123,
273,
10123,
18,
4870,
10524,
16,
5490,
273,
1083,
16,
1981,
5062,
11155,
87,
273,
1053,
16,
1198,
33,
8... |
log.warn('Could not get random articles') time.sleep(0.5) | time.sleep(5) | def getRandomArticles(api, min=1, max=100): #"http://en.wikipedia.org/w/api.php?action=query&list=random&rnnamespace=0&rnlimit=10" num = random.randint(min, max) articles = set() while len(articles) < num: res = api.query(list="random", rnnamespace=0, rnlimit=10) if res is None or 'random' not in res: log.warn('Could not get random articles') time.sleep(0.5) continue res = res["random"] for x in res: articles.add(x["title"]) return list(articles)[:max] | bc22bdeac16c2de983b5d3ea970c42baf3c5467e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12391/bc22bdeac16c2de983b5d3ea970c42baf3c5467e/mw-serve-stresser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
20581,
19001,
12,
2425,
16,
1131,
33,
21,
16,
943,
33,
6625,
4672,
31526,
2505,
2207,
275,
18,
11999,
13744,
18,
3341,
19,
91,
19,
2425,
18,
2684,
35,
1128,
33,
2271,
10,
1098,
33,
9... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
20581,
19001,
12,
2425,
16,
1131,
33,
21,
16,
943,
33,
6625,
4672,
31526,
2505,
2207,
275,
18,
11999,
13744,
18,
3341,
19,
91,
19,
2425,
18,
2684,
35,
1128,
33,
2271,
10,
1098,
33,
9... |
if inp[0] == 'constraint_relaxation': | if inp[0] == 'constrain_relaxation': | def read_aims(filename): """Import FHI-aims geometry type files. Reads unitcell, atom positions and constraints from a geometry.in file. """ from ase import Atoms, FixAtoms, FixCartesian import numpy as np atoms = Atoms() fd = open(filename, 'r') lines = fd.readlines() fd.close() positions = [] cell = [] symbols = [] fix = [] fix_cart = [] xyz = np.array([0, 0, 0]) i = -1 for n, line in enumerate(lines): inp = line.split() if inp == []: continue if inp[0] == 'atom': if xyz.all(): fix.append(i) elif xyz.any(): print 1 fix_cart.append(FixCartesian(i, xyz)) floatvect = float(inp[1]), float(inp[2]), float(inp[3]) positions.append(floatvect) symbols.append(inp[-1]) i += 1 xyz = np.array([0, 0, 0]) elif inp[0] == 'lattice_vector': floatvect = float(inp[1]), float(inp[2]), float(inp[3]) cell.append(floatvect) if inp[0] == 'constraint_relaxation': if inp[1] == '.true.': fix.append(i) elif inp[1] == 'x': xyz[0] = 1 elif inp[1] == 'y': xyz[1] = 1 elif inp[1] == 'z': xyz[2] = 1 if xyz.all(): fix.append(i) elif xyz.any(): fix_cart.append(FixCartesian(i, xyz)) atoms = Atoms(symbols, positions) if len(cell)==3: atoms.set_cell(cell) if len(fix): atoms.set_constraint([FixAtoms(indices=fix)]+fix_cart) else: atoms.set_constraint(fix_cart) return atoms | 1b6d0873336685bfd7a94a7676d2f6bf3b5b1a71 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1380/1b6d0873336685bfd7a94a7676d2f6bf3b5b1a71/aims.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
67,
4581,
87,
12,
3459,
4672,
3536,
5010,
28705,
45,
17,
4581,
87,
5316,
618,
1390,
18,
225,
29185,
2836,
3855,
16,
3179,
6865,
471,
6237,
628,
279,
5316,
18,
267,
585,
18,
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,
855,
67,
4581,
87,
12,
3459,
4672,
3536,
5010,
28705,
45,
17,
4581,
87,
5316,
618,
1390,
18,
225,
29185,
2836,
3855,
16,
3179,
6865,
471,
6237,
628,
279,
5316,
18,
267,
585,
18,
3536,
... |
return self._download('%s/%s' % (canonizetag(tag), attr), | return self._download(self._tagattr(tag, attr), | def delattr(self, tag, attr, token=None): """Delete the attribute ``attr` of the tag ``tag``.""" return self._download('%s/%s' % (canonizetag(tag), attr), method='DELETE', token=token) | 9b52d1d23e22532a8e63e5161c82bae87d39fbd1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/373/9b52d1d23e22532a8e63e5161c82bae87d39fbd1/ddfs.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1464,
1747,
12,
2890,
16,
1047,
16,
1604,
16,
1147,
33,
7036,
4672,
3536,
2613,
326,
1566,
12176,
1747,
68,
434,
326,
1047,
12176,
2692,
10335,
12123,
327,
365,
6315,
7813,
12,
2890,
631... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1464,
1747,
12,
2890,
16,
1047,
16,
1604,
16,
1147,
33,
7036,
4672,
3536,
2613,
326,
1566,
12176,
1747,
68,
434,
326,
1047,
12176,
2692,
10335,
12123,
327,
365,
6315,
7813,
12,
2890,
631... |
DestructorList.extend(lib.DestructorList) | DestructorList.append(lib.DestructorList) | def CreateLibraryDestructorCode(self): # # Library Destructors # DestructorList = [] for lib in self.LibraryList: if len(lib.DestructorList) <= 0: continue DestructorList.extend(lib.DestructorList) | 502c7f8e852c690f3cb00ab852f2902d8eb0db4f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/914/502c7f8e852c690f3cb00ab852f2902d8eb0db4f/AutoGen.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1788,
9313,
6305,
8813,
280,
1085,
12,
2890,
4672,
468,
468,
18694,
10597,
8813,
1383,
468,
10597,
8813,
280,
682,
273,
5378,
364,
2561,
316,
365,
18,
9313,
682,
30,
309,
562,
12,
2941,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
9313,
6305,
8813,
280,
1085,
12,
2890,
4672,
468,
468,
18694,
10597,
8813,
1383,
468,
10597,
8813,
280,
682,
273,
5378,
364,
2561,
316,
365,
18,
9313,
682,
30,
309,
562,
12,
2941,
... |
def copy(self,src,dst,overwrite=False,chunk_size=16384): return self.wrapped_fs.copy(self._encode(src),self._encode(dst),overwrite,chunk_size) @rewrite_errors def move(self,src,dst,overwrite=False,chunk_size=16384): return self.wrapped_fs.move(self._encode(src),self._encode(dst),overwrite,chunk_size) @rewrite_errors def movedir(self,src,dst,overwrite=False,ignore_errors=False,chunk_size=16384): return self.wrapped_fs.movedir(self._encode(src),self._encode(dst),overwrite,ignore_errors,chunk_size) @rewrite_errors def copydir(self,src,dst,overwrite=False,ignore_errors=False,chunk_size=16384): return self.wrapped_fs.copydir(self._encode(src),self._encode(dst),overwrite,ignore_errors,chunk_size) | def copy(self,src,dst,**kwds): return self.wrapped_fs.copy(self._encode(src),self._encode(dst),**kwds) @rewrite_errors def move(self,src,dst,**kwds): return self.wrapped_fs.move(self._encode(src),self._encode(dst),**kwds) @rewrite_errors def movedir(self,src,dst,**kwds): return self.wrapped_fs.movedir(self._encode(src),self._encode(dst),**kwds) @rewrite_errors def copydir(self,src,dst,**kwds): return self.wrapped_fs.copydir(self._encode(src),self._encode(dst),**kwds) | def copy(self,src,dst,overwrite=False,chunk_size=16384): return self.wrapped_fs.copy(self._encode(src),self._encode(dst),overwrite,chunk_size) | 77e42485d83aade774b3b837cb43ab6e888dc384 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5578/77e42485d83aade774b3b837cb43ab6e888dc384/wrapfs.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1610,
12,
2890,
16,
4816,
16,
11057,
16,
19274,
33,
8381,
16,
6551,
67,
1467,
33,
2313,
17295,
4672,
327,
365,
18,
18704,
67,
2556,
18,
3530,
12,
2890,
6315,
3015,
12,
4816,
3631,
2890... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1610,
12,
2890,
16,
4816,
16,
11057,
16,
19274,
33,
8381,
16,
6551,
67,
1467,
33,
2313,
17295,
4672,
327,
365,
18,
18704,
67,
2556,
18,
3530,
12,
2890,
6315,
3015,
12,
4816,
3631,
2890... |
return self.get_all_primary_ids() | return self.adaptor.list_bioentry_ids(self.dbid) | def keys(self): """List of ids which may not be meaningful outside this database.""" return self.get_all_primary_ids() | a8f59afd6241b110dcb129cea5960e9675161e82 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7167/a8f59afd6241b110dcb129cea5960e9675161e82/BioSeqDatabase.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1311,
12,
2890,
4672,
3536,
682,
434,
3258,
1492,
2026,
486,
506,
26271,
8220,
333,
2063,
12123,
327,
365,
18,
588,
67,
454,
67,
8258,
67,
2232,
1435,
225,
2,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1311,
12,
2890,
4672,
3536,
682,
434,
3258,
1492,
2026,
486,
506,
26271,
8220,
333,
2063,
12123,
327,
365,
18,
588,
67,
454,
67,
8258,
67,
2232,
1435,
225,
2,
-100,
-100,
-100,
-100,
-... |
<unittest.TestResult run=3 errors=0 failures=2> | <unittest.TestResult run=3 errors=0 failures=1> | >>> def tearDown(t): | b1a9f2772ba21f268a8164908714e5a106be50d1 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8546/b1a9f2772ba21f268a8164908714e5a106be50d1/test_doctest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4080,
1652,
268,
2091,
4164,
12,
88,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4080,
1652,
268,
2091,
4164,
12,
88,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
n_samples = self.n_streams(size) | n_samples = numpy.prod(size) | def normal(self, size=None, avg=0.0, std=1.0, ndim=None, dtype=config.floatX): # We need an even number of ]0,1[ samples. Then we split them # in two halves. First half becomes our U1's for Box-Muller, # second half our U2's. See Wikipedia page: # http://en.wikipedia.org/wiki/Box%E2%80%93Muller_transform | 4f88815cf0a8e1bbb62f8848e4539d203ff76ee5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12438/4f88815cf0a8e1bbb62f8848e4539d203ff76ee5/rng_mrg.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2212,
12,
2890,
16,
963,
33,
7036,
16,
11152,
33,
20,
18,
20,
16,
2044,
33,
21,
18,
20,
16,
9209,
33,
7036,
16,
3182,
33,
1425,
18,
5659,
60,
4672,
468,
1660,
1608,
392,
5456,
1300... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2212,
12,
2890,
16,
963,
33,
7036,
16,
11152,
33,
20,
18,
20,
16,
2044,
33,
21,
18,
20,
16,
9209,
33,
7036,
16,
3182,
33,
1425,
18,
5659,
60,
4672,
468,
1660,
1608,
392,
5456,
1300... |
SANITY_TEST_SUPPRESSIONS_LINUX = { | SANITY_TEST_SUPPRESSIONS = { | def find_and_truncate(f): f.seek(0) while True: line = f.readline() if line == "": return False if '</valgrindoutput>' in line: # valgrind often has garbage after </valgrindoutput> upon crash f.truncate() return True | fa838769cab3de8c8bf7e78f8423737bd4da4a8f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9392/fa838769cab3de8c8bf7e78f8423737bd4da4a8f/memcheck_analyze.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1104,
67,
464,
67,
27201,
12,
74,
4672,
284,
18,
16508,
12,
20,
13,
1323,
1053,
30,
980,
273,
284,
18,
896,
1369,
1435,
309,
980,
422,
1408,
30,
327,
1083,
309,
4357,
1125,
3197,
728... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1104,
67,
464,
67,
27201,
12,
74,
4672,
284,
18,
16508,
12,
20,
13,
1323,
1053,
30,
980,
273,
284,
18,
896,
1369,
1435,
309,
980,
422,
1408,
30,
327,
1083,
309,
4357,
1125,
3197,
728... |
return | return None | def includeType(type): type = unaliasType(type) if type.kind in ('builtin', 'native'): return file = conf.irregularFilenames.get(type.name, type.name) + '.h' if file not in filesIncluded: f.write('#include "%s"\n' % file) filesIncluded.add(file) | 77f7c863c783916adfbfd3df09dc83b3fe318e54 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11102/77f7c863c783916adfbfd3df09dc83b3fe318e54/qsgen.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2341,
559,
12,
723,
4672,
618,
273,
640,
4930,
559,
12,
723,
13,
309,
618,
18,
9224,
316,
7707,
24553,
2187,
296,
13635,
11,
4672,
327,
599,
585,
273,
2195,
18,
481,
16819,
25579,
6809... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2341,
559,
12,
723,
4672,
618,
273,
640,
4930,
559,
12,
723,
13,
309,
618,
18,
9224,
316,
7707,
24553,
2187,
296,
13635,
11,
4672,
327,
599,
585,
273,
2195,
18,
481,
16819,
25579,
6809... |
notes = ("(): callable, C: type/class; detail counts module functions, attrs and " "contained class/type methods and attrs") | notes = ("(): callable, C: type/class") | def navig(self): return html.p(html.span(self.title,**{'class': 'title'}), "|",mods_report.link(None),"|",cls_report.link(None)) | ff0d2b538803dd460f5457f2817d7dd8bbd96981 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/ff0d2b538803dd460f5457f2817d7dd8bbd96981/delta.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
290,
4911,
12,
2890,
4672,
327,
1729,
18,
84,
12,
2620,
18,
3969,
12,
2890,
18,
2649,
16,
636,
27828,
1106,
4278,
296,
2649,
11,
97,
3631,
11747,
3113,
22760,
67,
6006,
18,
1232,
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,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
290,
4911,
12,
2890,
4672,
327,
1729,
18,
84,
12,
2620,
18,
3969,
12,
2890,
18,
2649,
16,
636,
27828,
1106,
4278,
296,
2649,
11,
97,
3631,
11747,
3113,
22760,
67,
6006,
18,
1232,
12,
... |
self.parent.set_dirty() | repaint_buf = buf[scroll_top - 1:scroll_bottom - 1] for row in repaint_buf: row.set_dirty() | def insert_row(self, num=1): buf = self.get_buffer() (row, col) = self.cursor.get_row_col() new_rows = [TerminalRow(self.width, self) for x in range(0, num)] buf.insert(row, '') buf[row:row + 1] = new_rows self.log.debug("Inserted %s row(s): %s" % (num, len(buf))) | eb395ad9a2761db0588f1339c232928c3c2e4c94 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13269/eb395ad9a2761db0588f1339c232928c3c2e4c94/terminal.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2243,
67,
492,
12,
2890,
16,
818,
33,
21,
4672,
1681,
273,
365,
18,
588,
67,
4106,
1435,
261,
492,
16,
645,
13,
273,
365,
18,
9216,
18,
588,
67,
492,
67,
1293,
1435,
394,
67,
3870,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2243,
67,
492,
12,
2890,
16,
818,
33,
21,
4672,
1681,
273,
365,
18,
588,
67,
4106,
1435,
261,
492,
16,
645,
13,
273,
365,
18,
9216,
18,
588,
67,
492,
67,
1293,
1435,
394,
67,
3870,... |
if node.type in [ "block", "file", "switch" ]: | if node.type in [ "block", "file" ] or (node.type == "statement" and node.parent.type == "switch" and node.parent.get("switchType") == "case"): | def compileNode(node, enableDebug=False): global newline global hasbreak global pretty if node.get("eolBefore", False): # print "EOL BEFORE" pass if node.get("breakBefore", False): # print "BREAK BEFORE" hasbreak = True # Omit on first childs if node.isFirstChild(True): hasbreak = False if node.getChild("commentsBefore", False) != None: commentCounter = 0 if node.getPreviousSibling(False): prevCase = node.getPreviousSibling().type == "case" else: prevCase = False for comment in node.getChild("commentsBefore").children: if not prevCase: if not node.isFirstChild() or commentCounter > 0: if commentCounter == 0 or comment.get("multiline") == True: line() if not pretty.endswith("\n"): newline = True out(comment.get("text").strip()) newline = True # Additional new line in cases, where the multi line comment # is not for documentation reasons (separators, etc.) if comment.get("multiline") == True and not comment.get("detail") in [ "javadoc", "qtdoc" ]: line() commentCounter += 1 ################################################################## # Opening... ################################################################## if node.type == "map": if node.hasChildren(): newline = True out("{") if node.hasChildren(): plus() newline = True elif node.type == "array": if node.hasChildren(): newline = True out("[") if node.hasChildren(): plus() newline = True elif node.type == "block": if node.hasChildren(): if node.get("compact"): out(" ") else: newline = True else: out(" ") out("{") if node.hasChildren(): plus() newline = True elif node.type == "params": out("(") elif node.type == "group": out("(") elif node.type == "case": if not node.isFirstChild(): # Force a new line between all case members if not node.getPreviousSibling().type in [ "case", "expression" ]: line() minus() newline = True out("case ") elif node.type == "catch": # If this statement block or the previous try were compact, be compact here, too if node.getChild("statement").getChild("block").get("compact") and node.parent.getChild("statement").getChild("block").get("compact"): newline = False out(" ") out("catch") elif node.type == "finally": out("finally") elif node.type == "delete": out("delete ") elif node.type == "break": out("break") if node.get("label", False): out(" " + node.get("label", False)) elif node.type == "continue": out("continue") if node.get("label", False): out(" " + node.get("label", False)) elif node.type == "elseStatement": # If this statement block and the previous if were compact, be compact here, too child = node.getChild("block", False) if child == None: child = node.getChild("loop", False) if child != None: child = child.getChild("statement").getChild("block") if child.get("compact") and node.parent.getChild("statement").getChild("block").get("compact"): newline = False out(" ") out("else") # This is a elseStatement without a block around (a set of {}) if not node.hasChild("block"): out(" ") elif node.type == "switch" and node.get("switchType") == "case": out("switch") elif node.type == "switch" and node.get("switchType") == "catch": out("try") elif node.type == "throw": out("throw ") elif node.type == "instantiation": out("new ") elif node.type == "return": if node.parent.type == "block" and not node.parent.get("compact"): #and node.parent.parent.type == "body" and node.parent.parent.parent.type == "function": if node.isLastChild() and not node.isFirstChild(): line() out("return") if node.hasChildren(): out(" ") elif node.type == "definitionList": out("var ") elif node.type == "default": minus() line() newline = True out("default:") plus() newline = True elif node.type == "keyvalue": keyString = node.get("key") keyQuote = node.get("quote", False) if keyQuote != None: # print "USE QUOTATION" if keyQuote == "doublequotes": keyString = '"' + keyString + '"' else: keyString = "'" + keyString + "'" elif keyString in config.JSPROTECTED or not KEY.match(keyString): print "ATTENTION: Auto protect key: %s" % keyString keyString = "\"" + keyString + "\"" out(keyString + " : ") elif node.type == "expression": if node.parent.type == "loop": loopType = node.parent.get("loopType") if loopType == "DO": out("while ") # open expression block of IF/WHILE/DO-WHILE/FOR statements out("(") elif node.parent.type == "catch": # open expression block of CATCH statement out("(") elif node.parent.type == "switch" and node.parent.get("switchType") == "case": # open expression block of SWITCH statement out("(") elif node.type == "loop": # Additional new line before each loop if not node.isFirstChild(True) and not node.getChild("commentsBefore", False): line() loopType = node.get("loopType") if loopType == "IF": out("if ") elif loopType == "WHILE": out("while ") elif loopType == "FOR": out("for ") elif loopType == "DO": out("do ") elif loopType == "WITH": out("with ") else: print "UNKNOWN LOOP TYPE: %s" % loopType elif node.type == "function": functionDeclHasParams = False out("function") functionName = node.get("name", False) if functionName != None: out(" %s" % functionName) elif node.type == "identifier": name = node.get("name", False) if name != None: out(name) elif node.type == "call": callHasParams = False elif node.type == "definition": if node.parent.type != "definitionList": out("var ") out(node.get("identifier")) elif node.type == "constant": if node.get("constantType") == "string": if node.get("detail") == "singlequotes": out("'") else: out('"') out(node.get("value")) if node.get("detail") == "singlequotes": out("'") else: out('"') else: out(node.get("value")) elif node.type == "third": if node.parent.type == "operation": if node.parent.get("operator") == "HOOK": out(" : ") else: print "Unknown third argument... Not a hook" elif node.type == "labelTerminator": out(":") ################################################################## # Children content ################################################################## if node.hasChildren(): childPosition = 1 childrenNumber = 0 # We need to ignore comment blocks # childrenNumber = len(node.children) for child in node.children: if child.type == "comment" or child.type == "commentsBefore" or child.type == "commentsAfter": pass else: childrenNumber += 1 for child in node.children: if child.type == "commentsBefore" or child.type == "commentsAfter": continue if child.type == "comment": out(child.get("text")) continue # Hints for close of node later if node.type == "call" and child.type == "params": callHasParams = True elif node.type == "function": if child.type == "params": functionDeclHasParams = True elif child.type == "body" and not functionDeclHasParams: # has no params before body, fix it here, and add body afterwards out("()") functionDeclHasParams = True elif node.type == "definition" and child.type == "assignment": oper = child.get("operator", False) realNode = node.parent inForLoop = realNode.hasParent() and realNode.parent.type in [ "first", "second", "third" ] and realNode.parent.parent.type == "loop" and realNode.parent.parent.get("loopType") == "FOR" if not inForLoop and not oper in [ "INC", "DEC" ]: out(" ") if oper != None: out(getTokenSource(oper)) else: out("=") if not inForLoop and not oper in [ "INC", "DEC" ]: out(" ") elif node.type == "accessor" and child.type == "key": out("[") elif node.type == "accessor" and child.type == "right": out(".") elif node.type == "loop" and node.get("loopType") == "FOR": if child.type == "first": out("(") elif child.type == "statement": out(")") else: if child.type == "second" and node.getChild("first", False) == None: out("(") if child.type == "third" and node.getChild("first", False) == None and node.getChild("second", False) == None: out("(") if not pretty.endswith(";") and not pretty.endswith("\n"): out("; ") elif node.type == "operation" and node.get("left", False) == True: oper = node.get("operator") if oper == "TYPEOF": out("typeof ") elif oper == None: print "BAD OPERATOR [A]: %s" % oper else: inForLoop = False if node.parent.type == "statementList": realNode = node.parent else: realNode = node out(getTokenSource(oper)) # Add child compileNode(child, enableDebug) if node.type == "operation" and child.type == "first" and node.get("left", False) != True: oper = node.get("operator") if node.parent.type == "statementList": realNode = node.parent else: realNode = node inForLoop = realNode.hasParent() and realNode.parent.type in [ "first", "second", "third" ] and realNode.parent.parent.type == "loop" and realNode.parent.parent.get("loopType") == "FOR" if not inForLoop and not oper in [ "INC", "DEC" ]: out(" ") if oper == "IN": out("in") elif oper == "INSTANCEOF": out("instanceof") elif oper == None: print "BAD OPERATOR [B]: %s" % oper else: out(getTokenSource(oper)) if not inForLoop and not oper in [ "INC", "DEC" ]: out(" ") elif node.type == "assignment" and child.type == "left": oper = node.get("operator", False) if node.parent.type == "statementList": realNode = node.parent else: realNode = node inForLoop = realNode.hasParent() and realNode.parent.type in [ "first", "second", "third" ] and realNode.parent.parent.type == "loop" and realNode.parent.parent.get("loopType") == "FOR" if not inForLoop and not oper in [ "INC", "DEC" ]: out(" ") if oper != None: out(getTokenSource(oper)) else: out("=") if not inForLoop and not oper in [ "INC", "DEC" ]: out(" ") elif node.type == "accessor" and child.type == "key": out("]") # Separate children in parent list if childPosition < childrenNumber: if node.type == "variable": out(".") elif node.type == "map": newline = False out(", ") newline = True elif node.type == "array": newline = False out(", ") newline = True elif node.type == "definitionList": out(", ") elif node.type == "params": out(", ") elif node.type == "statementList": out(", ") separators = [ "block", "assignment", "call", "operation", "definition", "definitionList", "return", "break", "continue", "delete", "accessor", "instantiation", "throw", "variable", "function" ] if node.type in [ "block", "file", "switch" ]: if child.type in separators: semicolon() # not last child if childPosition == childrenNumber and node.type in [ "block", "switch", "file" ]: pass else: newline = True # Next... childPosition += 1 ################################################################## # Closing... ################################################################## commentText = "" if node.getChild("commentsAfter", False): for comment in node.getChild("commentsAfter").children: commentText += comment.get("text") if node.type == "map": if node.hasChildren(): minus() newline = True out("}") elif node.type == "array": if node.hasChildren(): minus() newline = True out("]") elif node.type == "block": if node.hasChildren(): minus() newline = True out("}") if commentText != "": out(commentText) commentText = "" if node.hasChildren(): # Not in function assignment and param blocks if node.parent.type == "body" and node.parent.parent.type == "function" and node.parent.parent.parent.type in [ "right", "params" ]: pass else: newline = True elif node.type == "params": out(")") elif node.type == "switch" and node.get("switchType") == "case": minus() minus() newline = True out("}") if commentText != "": out(commentText) commentText = "" newline = True elif node.type == "group": out(")") elif node.type == "case": out(":") if commentText != "": out(commentText) commentText = "" plus() newline = True elif node.type == "call" and not callHasParams: out("()") elif node.type == "function" and not functionDeclHasParams: out("()") elif node.type == "expression": if node.parent.type == "loop": out(")") elif node.parent.type == "catch": out(")") elif node.parent.type == "switch" and node.parent.get("switchType") == "case": out(")") if commentText != "": out(commentText) commentText = "" newline = True out("{") plus() plus() elif node.type == "loop": # Force a additinal line feed after each loop if not node.isLastChild(): if commentText != "": out(commentText) commentText = "" line() if commentText != "": out(commentText) | 7bc1d36686b092a3ef081fcf467b34351ff2cc8e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5718/7bc1d36686b092a3ef081fcf467b34351ff2cc8e/prettyprint.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4074,
907,
12,
2159,
16,
4237,
2829,
33,
8381,
4672,
2552,
9472,
2552,
711,
8820,
2552,
7517,
225,
309,
756,
18,
588,
2932,
30951,
4649,
3113,
1083,
4672,
468,
1172,
315,
5842,
21203,
6,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4074,
907,
12,
2159,
16,
4237,
2829,
33,
8381,
4672,
2552,
9472,
2552,
711,
8820,
2552,
7517,
225,
309,
756,
18,
588,
2932,
30951,
4649,
3113,
1083,
4672,
468,
1172,
315,
5842,
21203,
6,... |
self.packagebuildid | self.packagebuildid = packagebuildid | def __init__(self, name, packagebuildid=None): super(RpmFiles, self).__init__() self.name = name self.packagebuildid | acf0edd9aee9fda3b81ad389ee700e39eda79f19 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9953/acf0edd9aee9fda3b81ad389ee700e39eda79f19/prcof.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
508,
16,
2181,
3510,
350,
33,
7036,
4672,
2240,
12,
54,
7755,
2697,
16,
365,
2934,
972,
2738,
972,
1435,
365,
18,
529,
273,
508,
365,
18,
5610,
3510,
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,
1001,
2738,
972,
12,
2890,
16,
508,
16,
2181,
3510,
350,
33,
7036,
4672,
2240,
12,
54,
7755,
2697,
16,
365,
2934,
972,
2738,
972,
1435,
365,
18,
529,
273,
508,
365,
18,
5610,
3510,
3... |
The formal group power series w. | The formal group inverse law i(t), which satisfies F(t, i(t)) = 0. | def inverse(self, prec=20): r""" The formal group power series w. | e2dc0eb52bc3f60716936de019f57db0860e8d21 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/e2dc0eb52bc3f60716936de019f57db0860e8d21/formal_group.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8322,
12,
2890,
16,
13382,
33,
3462,
4672,
436,
8395,
1021,
25739,
1041,
7212,
4166,
341,
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,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8322,
12,
2890,
16,
13382,
33,
3462,
4672,
436,
8395,
1021,
25739,
1041,
7212,
4166,
341,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
test.must_exist(test.workpath('src', 'f.out')) test.must_exist(test.workpath('src', 'f.out.foo')) test.must_exist(test.workpath('var1', 'f.out')) test.must_exist(test.workpath('var1', 'f.out.foo')) | test.run(arguments='var2') | def emit2(t, s, e): return (t + ['emit.2'], s) | aee6eac66e471946c33a2e3581f62168906a7c24 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12817/aee6eac66e471946c33a2e3581f62168906a7c24/emitter.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3626,
22,
12,
88,
16,
272,
16,
425,
4672,
327,
261,
88,
397,
10228,
18356,
18,
22,
17337,
272,
13,
225,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3626,
22,
12,
88,
16,
272,
16,
425,
4672,
327,
261,
88,
397,
10228,
18356,
18,
22,
17337,
272,
13,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
smallSave = os.path.join(options.themedir, "default", "images") wideSave = os.path.join(options.themedir, "default-wide", "images") try: checkdirs = [ options.themedir, smallSave, wideSave ] | layerBackground = gimp.Layer(image, "background", imageWidth, imageHeight, RGBA_IMAGE, 100, NORMAL_MODE) image.add_layer(layerBackground, 1) | def main(): parser = OptionParser() defaultThemeDir = os.path.normpath(os.path.join(os.getcwd(), "..", "theme")) parser.add_option("--theme-directory", dest="themedir", default=defaultThemeDir) (options, args) = parser.parse_args() smallSave = os.path.join(options.themedir, "default", "images") wideSave = os.path.join(options.themedir, "default-wide", "images") try: checkdirs = [ options.themedir, smallSave, wideSave ] for dir in checkdirs: if not (os.path.exists(dir) and os.path.isdir(dir)): raise DirError(dir) except DirError, e: print(e.name) print("Error: missing theme directory \"%s\"" % (str(e),)) sys.exit(1) images = [ { "name" : ("MythVideo-SearchSelect", "mv_results_popup.png"), "Small" : (387, 400), "Wide" : (592, 400), }, { "name" : ("MythVideo-ItemDetailPopup", "mv_itemdetail_popup.png"), "Small" : (720, 540), # 800x600 - 10% "Wide" : (1152, 648), # 1280x720 - 10% }, ] savepath = { "Small" : smallSave, "Wide" : wideSave, } for image in images: for size in [ "Small", "Wide" ]: name = "%s-%s" % (image['name'][0], size) xcfname = os.path.join(os.getcwd(), name) pngname = os.path.join(savepath[size], image['name'][1]) GIMPCreateDialog(xcfname, pngname, image[size][0], image[size][1]) | e2c03d1fd04dc50dc4ad9ec4c41799301ff80998 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/13713/e2c03d1fd04dc50dc4ad9ec4c41799301ff80998/mythvideofu.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
2082,
273,
18862,
1435,
805,
8335,
1621,
273,
1140,
18,
803,
18,
7959,
803,
12,
538,
18,
803,
18,
5701,
12,
538,
18,
588,
11089,
9334,
315,
838,
3113,
315,
7997,
6,
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,
2774,
13332,
2082,
273,
18862,
1435,
805,
8335,
1621,
273,
1140,
18,
803,
18,
7959,
803,
12,
538,
18,
803,
18,
5701,
12,
538,
18,
588,
11089,
9334,
315,
838,
3113,
315,
7997,
6,
3719,
... |
if width == 0: width == 1 | if width == 0: width = 1 | def MakeGradientBrush(self, offset, width, leftColor, rightColor): """ Creates a gradient brush from leftColor to rightColor, specified as color tuples (r,g,b) The brush is a bitmap, width of self.dayWidth, height 1. The color gradient is made by varying the color saturation from leftColor to rightColor. This means that the Hue and Value should be the same, or the resulting color on the right won't match rightColor """ # mac requires bitmaps to have a height and width that are powers of 2 # use frexp to round up to the nearest power of 2 # (frexp(x) returns (m,e) where x = m * 2**e, and we just want e) bitmapWidth = 2**math.frexp(width-1)[1] # There is probably a nicer way to do this, without: # - going through wxImage # - individually setting each RGB pixel image = wx.EmptyImage(bitmapWidth, 1) leftHSV = rgb_to_hsv(*color2rgb(*leftColor)) rightHSV = rgb_to_hsv(*color2rgb(*rightColor)) | 9e641173eb3f6fa76b5507ed4c969d447af5e40e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/9e641173eb3f6fa76b5507ed4c969d447af5e40e/DrawingUtilities.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4344,
15651,
19114,
1218,
12,
2890,
16,
1384,
16,
1835,
16,
2002,
2957,
16,
2145,
2957,
4672,
3536,
10210,
279,
10292,
5186,
1218,
628,
2002,
2957,
358,
2145,
2957,
16,
1269,
487,
2036,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4344,
15651,
19114,
1218,
12,
2890,
16,
1384,
16,
1835,
16,
2002,
2957,
16,
2145,
2957,
4672,
3536,
10210,
279,
10292,
5186,
1218,
628,
2002,
2957,
358,
2145,
2957,
16,
1269,
487,
2036,
... |
def _msgobj(self, filename): | def _msgobj(self, filename, strict=False): | def _msgobj(self, filename): fp = openfile(findfile(filename)) try: msg = email.message_from_file(fp) finally: fp.close() return msg | 1abdc903fc08a89b4695728d372aaf3594fcb8c8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/1abdc903fc08a89b4695728d372aaf3594fcb8c8/test_email.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3576,
2603,
12,
2890,
16,
1544,
16,
5490,
33,
8381,
4672,
4253,
273,
1696,
768,
12,
4720,
768,
12,
3459,
3719,
775,
30,
1234,
273,
2699,
18,
2150,
67,
2080,
67,
768,
12,
7944,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3576,
2603,
12,
2890,
16,
1544,
16,
5490,
33,
8381,
4672,
4253,
273,
1696,
768,
12,
4720,
768,
12,
3459,
3719,
775,
30,
1234,
273,
2699,
18,
2150,
67,
2080,
67,
768,
12,
7944,
1... |
if not is_valid_ip_address(localip): raise Exception("Local IP address is invalid.") | def waitforconn(localip, localport,function): """ <Purpose> Waits for a connection to a port. Calls function with a socket-like object if it succeeds. <Arguments> localip: The local IP to listen on localport: The local port to bind to function: The function to call. It should take five arguments: (remoteip, remoteport, socketlikeobj, thiscommhandle, maincommhandle) If your function has an uncaught exception, the socket-like object it is using will be closed. <Exceptions> None. <Side Effects> Starts an event handler that listens for connections. <Returns> A handle to the comm object. This can be used to stop listening """ if not localip or localip == '0.0.0.0': raise Exception("Must specify a local IP address") if not is_valid_ip_address(localip): raise Exception("Local IP address is invalid.") if not is_valid_network_port(localport): raise Exception("Local port number must be an integer, between 1 and 65535.") # Check that the user specified function exists and takes 5 arguments try: # Get the argument count arg_count = function.func_code.co_argcount # We need the function to take 5 parameters assert(arg_count == 5) except: # If this is not a function, an exception will be raised. raise Exception("Specified function must be valid, and take 5 parameters. See waitforconn.") restrictions.assertisallowed('waitforconn',localip,localport) nanny.tattle_check('connport',localport) # Armon: Check if the specified local ip is allowed if not ip_is_allowed(localip): raise Exception, "IP '"+localip+"' is not allowed." # check if I'm already listening on this port / ip oldhandle = find_tipo_commhandle('TCP', localip, localport, False) if oldhandle: # if it was already there, update the function and return comminfo[oldhandle]['function'] = function return oldhandle handle = idhelper.getuniqueid() # we'll need to add it, so add a socket... nanny.tattle_add_item('insockets',handle) # get the socket try: mainsock = get_real_socket(localip,localport) # NOTE: Should this be anything other than a hardcoded number? mainsock.listen(5) # set up our table entry comminfo[handle] = {'type':'TCP','remotehost':None, 'remoteport':None,'localip':localip,'localport':localport,'socket':mainsock, 'outgoing':False, 'function':function} except: nanny.tattle_remove_item('insockets',handle) raise # start the selector if it's not running already check_selector() return handle | 8228b37312d2b3f2706dcbdcde4744a487a0022b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7272/8228b37312d2b3f2706dcbdcde4744a487a0022b/emulcomm.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2529,
1884,
4646,
12,
3729,
625,
16,
1191,
655,
16,
915,
4672,
3536,
411,
10262,
4150,
34,
678,
12351,
364,
279,
1459,
358,
279,
1756,
18,
282,
23665,
445,
598,
279,
2987,
17,
5625,
73... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2529,
1884,
4646,
12,
3729,
625,
16,
1191,
655,
16,
915,
4672,
3536,
411,
10262,
4150,
34,
678,
12351,
364,
279,
1459,
358,
279,
1756,
18,
282,
23665,
445,
598,
279,
2987,
17,
5625,
73... | |
assert isinstance(peer_id, str) | assert len(peer_id) == 20 | def create(cls, peer_id): assert isinstance(peer_id, str) msg = cls() msg.peer_id = peer_id msg.protocol_id = 'Pixtream Protocol' msg.extensions = '00000000' return msg | 34740751dd642760c3fd25eee131ebd7390af78c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10501/34740751dd642760c3fd25eee131ebd7390af78c/specs.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
12,
6429,
16,
4261,
67,
350,
4672,
1815,
562,
12,
12210,
67,
350,
13,
422,
4200,
1234,
273,
2028,
1435,
1234,
18,
12210,
67,
350,
273,
4261,
67,
350,
1234,
18,
8373,
67,
350,
27... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
12,
6429,
16,
4261,
67,
350,
4672,
1815,
562,
12,
12210,
67,
350,
13,
422,
4200,
1234,
273,
2028,
1435,
1234,
18,
12210,
67,
350,
273,
4261,
67,
350,
1234,
18,
8373,
67,
350,
27... |
raise StageOutFailure(msg, Command = command, | raise StageOutFailure(msg, Command = fbParams['command'], | def fallbackStageOut(self, lfn, localPfn, fbParams): """ _fallbackStageOut_ | 8426c3f45920119dc42ededac61f9d1e3db1c1ae /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8887/8426c3f45920119dc42ededac61f9d1e3db1c1ae/RuntimeStageOut.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5922,
8755,
1182,
12,
2890,
16,
328,
4293,
16,
1191,
52,
4293,
16,
12754,
1370,
4672,
3536,
389,
16471,
8755,
1182,
67,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5922,
8755,
1182,
12,
2890,
16,
328,
4293,
16,
1191,
52,
4293,
16,
12754,
1370,
4672,
3536,
389,
16471,
8755,
1182,
67,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
cursor, user, product.default_uom, product.list_price, | cursor, user, product.default_uom, product[field], | def get_list_price_uom(self, cursor, user, ids, name, arg, context=None): product_uom_obj = self.pool.get('product.uom') res = {} if context is None: context = {} if context.get('uom'): to_uom = self.pool.get('product.uom').browse( cursor, user, context['uom'], context=context) for product in self.browse(cursor, user, ids, context=context): res[product.id] = product_uom_obj.compute_price( cursor, user, product.default_uom, product.list_price, to_uom) else: for product in self.browse(cursor, user, ids, context=context): res[product.id] = product.list_price return res | b89b097f4c2bbe8802c6eae0a0b32cd93430063c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9285/b89b097f4c2bbe8802c6eae0a0b32cd93430063c/template.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
1098,
67,
8694,
67,
89,
362,
12,
2890,
16,
3347,
16,
729,
16,
3258,
16,
508,
16,
1501,
16,
819,
33,
7036,
4672,
3017,
67,
89,
362,
67,
2603,
273,
365,
18,
6011,
18,
588,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1098,
67,
8694,
67,
89,
362,
12,
2890,
16,
3347,
16,
729,
16,
3258,
16,
508,
16,
1501,
16,
819,
33,
7036,
4672,
3017,
67,
89,
362,
67,
2603,
273,
365,
18,
6011,
18,
588,
... |
self._RunNamedFile(context, result, 'run_cluster') | test_home_dir = context_to_dir(context) if os.access(os.path.join(test_home_dir,'fusion'), os.F_OK): self._RunNamedFile(context, result, 'fusion') else: self._RunNamedFile(context, result, 'run_cluster') | def _RunClu(self, context, result): self._RunNamedFile(context, result, 'run_cluster') | 03c8871a9e4cb2d6f7486a39eecc30579058643a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12935/03c8871a9e4cb2d6f7486a39eecc30579058643a/streamit.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1997,
2009,
89,
12,
2890,
16,
819,
16,
563,
4672,
365,
6315,
1997,
7604,
812,
12,
2472,
16,
563,
16,
296,
2681,
67,
7967,
6134,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1997,
2009,
89,
12,
2890,
16,
819,
16,
563,
4672,
365,
6315,
1997,
7604,
812,
12,
2472,
16,
563,
16,
296,
2681,
67,
7967,
6134,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
def _tz_get(self,cr,uid, context={}): | def _tz_get(self,cr,uid, context=None): | def _tz_get(self,cr,uid, context={}): return [(x, x) for x in pytz.all_timezones] | ac8483791a14842bf596422088f38a3ac9fea2af /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12853/ac8483791a14842bf596422088f38a3ac9fea2af/res_user.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
12994,
67,
588,
12,
2890,
16,
3353,
16,
1911,
16,
819,
33,
7036,
4672,
327,
306,
12,
92,
16,
619,
13,
364,
619,
316,
29039,
18,
454,
67,
957,
14203,
65,
225,
2,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
12994,
67,
588,
12,
2890,
16,
3353,
16,
1911,
16,
819,
33,
7036,
4672,
327,
306,
12,
92,
16,
619,
13,
364,
619,
316,
29039,
18,
454,
67,
957,
14203,
65,
225,
2,
-100,
-100,
-1... |
self.handleAvatarZoneChange(self.visAvatar, zoneId) | messenger.send("avatarZoneChanged", [self.visAvatar, self.doId, zoneId]) | def processVisibility(self, task): if self.visAvatar == None: # no avatar to process visibility for return Task.done if self.visAvatar.gameFSM.state == 'Cutscene': return Task.cont pos = self.visAvatar.getPos(self) # Check to make sure our x and y are positive dx = self.cellWidth * self.gridSize * .5 x = pos[0] + dx y = pos[1] + dx col = x // self.cellWidth row = y // self.cellWidth assert self.notify.debug( "processVisibility: %s: avatar pos: %s %s" % (self.doId, x, y)) if (row < 0) or (col < 0) or (row > self.gridSize) or (col > self.gridSize): assert self.notify.debug("processVisibility: %s: not on the grid" % (self.doId)) # If we are viewingRadius away from this entire grid, # remove interest in any current visZone we may have if self.gridVisContext: self.cr.removeInterest(self.gridVisContext) self.visZone = None self.gridVisContext = None return Task.cont # Compute which zone we are in zoneId = int(self.startingZone + ((row * self.gridSize) + col)) assert self.notify.debug("processVisibility: %s: row: %s col: %s zoneId: %s" % (self.doId, row, col, zoneId)) if (zoneId == self.visZone): assert self.notify.debug( "processVisibility: %s: interest did not change" % (self.doId)) if self.visDirty: messenger.send(self.uniqueName("visibility")) self.visDirty = False return Task.cont else: assert self.notify.debug( "processVisibility: %s: new interest" % (self.doId)) self.visZone = zoneId if not self.gridVisContext: self.gridVisContext = self.cr.addInterest( self.getDoId(), self.visZone, self.uniqueName("visibility"), event = self.uniqueName("visibility")) else: assert self.notify.debug( "processVisibility: %s: altering interest to zoneId: %s" % (self.doId, zoneId)) event = None if self.visDirty: event = self.uniqueName("visibility") self.cr.alterInterest( self.gridVisContext, self.getDoId(), self.visZone, event = event) # If the visAvatar is parented to this grid, also do a # setLocation parentId = self.visAvatar.parentId oldZoneId = self.visAvatar.zoneId assert self.notify.debug( "processVisibility: %s: parentId: %s oldZoneId: %s" % (self.doId, parentId, oldZoneId)) if parentId == self.doId: assert self.notify.debug( "processVisibility: %s: changing location" % (self.doId)) self.handleAvatarZoneChange(self.visAvatar, zoneId) self.visDirty = False return Task.cont | 1590f437435c31d3b9e3f371ffd8347ccbcf5868 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7242/1590f437435c31d3b9e3f371ffd8347ccbcf5868/DistributedCartesianGrid.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
10135,
12,
2890,
16,
1562,
4672,
309,
365,
18,
3516,
23999,
422,
599,
30,
468,
1158,
16910,
358,
1207,
9478,
364,
327,
3837,
18,
8734,
309,
365,
18,
3516,
23999,
18,
13957,
4931,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
10135,
12,
2890,
16,
1562,
4672,
309,
365,
18,
3516,
23999,
422,
599,
30,
468,
1158,
16910,
358,
1207,
9478,
364,
327,
3837,
18,
8734,
309,
365,
18,
3516,
23999,
18,
13957,
4931,
... |
extract_old_files(i[1], new_path) | self.extract_old_files(i[1], new_path) | def extract_old_files(self, l, path): for i in l: name = i[0] if type(i[1]) != type([]): # A file. load, exec_addr, length = i[2], i[3], i[4] if filetypes == 0: # Load and execution addresses assumed to be valid. # Create the INF file out_file = os.path.join(path, name) inf_file = os.path.join(path, name) + suffix + "inf" try: out = open(out_file, "wb") out.write(i[1]) out.close() except IOError: print "Couldn't open the file, %s" % out_file try: inf = open(inf_file, "w") load, exec_addr, length = i[2], i[3], i[4] inf.write( "$.%s\t%X\t%X\t%X" % \ ( name, load, exec_addr, length ) ) inf.close() except IOError: print "Couldn't open the file, %s" % inf_file else: # Interpret the load address as a filetype. out_file = os.path.join(path, name) + separator + "%x" % \ ((load >> 8) & 0xfff) try: out = open(out_file, "wb") out.write(i[1]) out.close() except IOError: print "Couldn't open the file, %s" % out_file else: if name != '$': new_path = create_directory(path, name) if new_path != "": extract_old_files(i[1], new_path) else: extract_old_files(i[1], path) | 25f0ef7dc7411ab5a651cc7127ed79f5bcd54fc3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3059/25f0ef7dc7411ab5a651cc7127ed79f5bcd54fc3/ADF2INF.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2608,
67,
1673,
67,
2354,
12,
2890,
16,
328,
16,
589,
4672,
225,
364,
277,
316,
328,
30,
225,
508,
273,
277,
63,
20,
65,
309,
618,
12,
77,
63,
21,
5717,
480,
618,
3816,
65,
4672,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2608,
67,
1673,
67,
2354,
12,
2890,
16,
328,
16,
589,
4672,
225,
364,
277,
316,
328,
30,
225,
508,
273,
277,
63,
20,
65,
309,
618,
12,
77,
63,
21,
5717,
480,
618,
3816,
65,
4672,
... |
def getAttributesForJobList(self,jobIDList,attrList=[]): | def getAttributesForJobList( self, jobIDList, attrList = [] ): | def getAttributesForJobList(self,jobIDList,attrList=[]): """ Get attributes for the jobs in the the jobIDList. Returns an S_OK structure with a dictionary of dictionaries as its Value: ValueDict[jobID][attribute_name] = attribute_value """ if not jobIDList: return S_OK({}) if attrList: attrNames = string.join(map(lambda x: str(x),attrList ),',') attr_tmp_list = attrList else: attrNames = string.join(map(lambda x: str(x),self.jobAttributeNames),',') attr_tmp_list = self.jobAttributeNames jobList = string.join(map(lambda x: str(x),jobIDList),',') | 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,
10183,
1290,
2278,
682,
12,
365,
16,
1719,
24583,
16,
1604,
682,
273,
5378,
262,
30,
3536,
968,
1677,
364,
326,
6550,
316,
326,
326,
1719,
24583,
18,
2860,
392,
348,
67,
3141,
3695,
59... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10183,
1290,
2278,
682,
12,
365,
16,
1719,
24583,
16,
1604,
682,
273,
5378,
262,
30,
3536,
968,
1677,
364,
326,
6550,
316,
326,
326,
1719,
24583,
18,
2860,
392,
348,
67,
3141,
3695,
59... |
line = apply(self._handle.readline, args, keywds) | line = self._handle.readline(*args,**keywds) | def readline(self, *args, **keywds): if self._saved: line = self._saved.pop(0) else: line = apply(self._handle.readline, args, keywds) return line | e1a31f242986a28884876916a414146caed5d49c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7167/e1a31f242986a28884876916a414146caed5d49c/File.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12023,
12,
2890,
16,
380,
1968,
16,
2826,
856,
91,
2377,
4672,
309,
365,
6315,
14077,
30,
980,
273,
365,
6315,
14077,
18,
5120,
12,
20,
13,
469,
30,
225,
980,
273,
365,
6315,
4110,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12023,
12,
2890,
16,
380,
1968,
16,
2826,
856,
91,
2377,
4672,
309,
365,
6315,
14077,
30,
980,
273,
365,
6315,
14077,
18,
5120,
12,
20,
13,
469,
30,
225,
980,
273,
365,
6315,
4110,
1... |
signal.alarm(math.ceil(prevTimeout - passed)) | signal.alarm(int(math.ceil(prevTimeout - passed))) | def alarmhandler(signum,stackframe): raise alarmExc("timeout expired") | ebfbe156a3336a42b3334ae4d47107d94c1e99aa /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/34/ebfbe156a3336a42b3334ae4d47107d94c1e99aa/pycompat.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13721,
4176,
12,
2977,
379,
16,
3772,
3789,
4672,
1002,
13721,
29924,
2932,
4538,
7708,
7923,
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,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13721,
4176,
12,
2977,
379,
16,
3772,
3789,
4672,
1002,
13721,
29924,
2932,
4538,
7708,
7923,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
return lambda data2, remover=self.removerConstructor(data), imputer=self.imputerConstructor(data): imputer(remover(data2)) | return lambda data2, remover=self.removerConstructor(data), imputer=self.imputerConstructor(data): imputer(data2 if isinstance(data2, orange.Example) else remover(data2)) | def __call__(self, data): return lambda data2, remover=self.removerConstructor(data), imputer=self.imputerConstructor(data): imputer(remover(data2)) | f11472802b4b83b38cffc6da2d85b15695d2dbb3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6366/f11472802b4b83b38cffc6da2d85b15695d2dbb3/OWImpute.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1991,
972,
12,
2890,
16,
501,
4672,
327,
3195,
501,
22,
16,
849,
1643,
33,
2890,
18,
2764,
1643,
6293,
12,
892,
3631,
709,
458,
264,
33,
2890,
18,
381,
458,
264,
6293,
12,
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,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1991,
972,
12,
2890,
16,
501,
4672,
327,
3195,
501,
22,
16,
849,
1643,
33,
2890,
18,
2764,
1643,
6293,
12,
892,
3631,
709,
458,
264,
33,
2890,
18,
381,
458,
264,
6293,
12,
892,... |
lis.append( self.dict[key] ) return lis def items( self ): lis = [] | result.append(self.dict[key]) return result def items(self): result = [] | def values( self ): lis = [] for key in self.keys(): try: lis.append( self[key] ) except IndexError: lis.append( self.dict[key] ) return lis | a3c6a8a30ea6fe481aa7397c8acb53f8a483c93d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/a3c6a8a30ea6fe481aa7397c8acb53f8a483c93d/cgi.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
924,
12,
365,
262,
30,
328,
291,
273,
5378,
364,
498,
316,
365,
18,
2452,
13332,
775,
30,
328,
291,
18,
6923,
12,
365,
63,
856,
65,
262,
1335,
10195,
30,
328,
291,
18,
6923,
12,
36... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
924,
12,
365,
262,
30,
328,
291,
273,
5378,
364,
498,
316,
365,
18,
2452,
13332,
775,
30,
328,
291,
18,
6923,
12,
365,
63,
856,
65,
262,
1335,
10195,
30,
328,
291,
18,
6923,
12,
36... |
if l[:2] == ' | if l[:2] == ' | def make(filename, outfile): ID = 1 STR = 2 # Compute .mo name from .po name and arguments if filename.endswith('.po'): infile = filename else: infile = filename + '.po' if outfile is None: outfile = os.path.splitext(infile)[0] + '.mo' try: lines = open(infile).readlines() except IOError, msg: print >> sys.stderr, msg sys.exit(1) section = None fuzzy = 0 # Parse the catalog lno = 0 for l in lines: lno += 1 # If we get a comment line after a msgstr, this is a new entry if l[0] == '#' and section == STR: add(msgid, msgstr, fuzzy) section = None fuzzy = 0 # Record a fuzzy mark if l[:2] == '#,' and l.find('fuzzy'): fuzzy = 1 # Skip comments if l[0] == '#': continue # Now we are in a msgid section, output previous section if l.startswith('msgid'): if section == STR: add(msgid, msgstr, fuzzy) section = ID l = l[5:] msgid = msgstr = '' # Now we are in a msgstr section elif l.startswith('msgstr'): section = STR l = l[6:] # Skip empty lines l = l.strip() if not l: continue # XXX: Does this always follow Python escape semantics? l = eval(l) if section == ID: msgid += l elif section == STR: msgstr += l else: print >> sys.stderr, 'Syntax error on %s:%d' % (infile, lno), \ 'before:' print >> sys.stderr, l sys.exit(1) # Add last entry if section == STR: add(msgid, msgstr, fuzzy) # Compute output output = generate() try: open(outfile,"wb").write(output) except IOError,msg: print >> sys.stderr, msg | 22af628302f538072778d230df0d9219bc128721 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/22af628302f538072778d230df0d9219bc128721/msgfmt.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1221,
12,
3459,
16,
8756,
4672,
1599,
273,
404,
7128,
273,
576,
225,
468,
8155,
263,
8683,
508,
628,
263,
1631,
508,
471,
1775,
309,
1544,
18,
5839,
1918,
2668,
18,
1631,
11,
4672,
145... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1221,
12,
3459,
16,
8756,
4672,
1599,
273,
404,
7128,
273,
576,
225,
468,
8155,
263,
8683,
508,
628,
263,
1631,
508,
471,
1775,
309,
1544,
18,
5839,
1918,
2668,
18,
1631,
11,
4672,
145... |
name = header[RPM.RPMTAG_REQUIRENAME] flags = header[RPM.RPMTAG_REQUIREFLAGS] vers = header[RPM.RPMTAG_REQUIREVERSION] | name = header[RPM.REQUIRENAME] flags = header[RPM.REQUIREFLAGS] vers = header[RPM.REQUIREVERSION] | def _insertRequires(self, rpm_id, header): name = header[RPM.RPMTAG_REQUIRENAME] flags = header[RPM.RPMTAG_REQUIREFLAGS] vers = header[RPM.RPMTAG_REQUIREVERSION] | 6014113d22e21912656bbeda22b8bd5be54c6adb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5092/6014113d22e21912656bbeda22b8bd5be54c6adb/currentdb.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
6387,
21671,
12,
2890,
16,
25228,
67,
350,
16,
1446,
4672,
508,
273,
1446,
63,
54,
12728,
18,
54,
52,
6152,
1781,
67,
862,
28689,
1985,
65,
2943,
273,
1446,
63,
54,
12728,
18,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
6387,
21671,
12,
2890,
16,
25228,
67,
350,
16,
1446,
4672,
508,
273,
1446,
63,
54,
12728,
18,
54,
52,
6152,
1781,
67,
862,
28689,
1985,
65,
2943,
273,
1446,
63,
54,
12728,
18,
5... |
return setArch, targetArch | return setArch, targetArchName | def getTargetArch(flavor, currentArch = None): if currentArch is None: currentArchName = arch.getMajorArch(arch.currentArch[0]).name | be69916359af5a65c8f3fcf60d692c640e365481 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8749/be69916359af5a65c8f3fcf60d692c640e365481/flavorutil.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8571,
12269,
12,
2242,
9444,
16,
783,
12269,
273,
599,
4672,
309,
783,
12269,
353,
599,
30,
783,
12269,
461,
273,
6637,
18,
588,
17581,
12269,
12,
991,
18,
2972,
12269,
63,
20,
65,
293... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
8571,
12269,
12,
2242,
9444,
16,
783,
12269,
273,
599,
4672,
309,
783,
12269,
353,
599,
30,
783,
12269,
461,
273,
6637,
18,
588,
17581,
12269,
12,
991,
18,
2972,
12269,
63,
20,
65,
293... |
extras=extras, | extras=current_extras, deleted_extras=deleted_extras, | def test_edit_all_fields(self): # Create new item rev = model.repo.new_revision() pkg_name = u'new_editpkgtest' pkg = model.Package(name=pkg_name) pkg.title = u'This is a Test Title' pkg.url = u'editpkgurl.com' pr1 = model.PackageResource(url=u'editpkgurl1', format=u'plain text', description=u'Full text', hash=u'123abc',) pr2 = model.PackageResource(url=u'editpkgurl2', format=u'plain text2', description=u'Full text2', hash=u'456abc',) pkg.resources.append(pr1) pkg.resources.append(pr2) pkg.notes= u'this is editpkg' pkg.version = u'2.2' t1 = model.Tag(name=u'one') t2 = model.Tag(name=u'two') pkg.tags = [t1, t2] pkg.state = model.State.DELETED pkg.license = model.License.by_name(u'OKD Compliant::Other') extras = {'key1':'value1', 'key2':'value2', 'key3':'value3'} for key, value in extras.items(): pkg.extras[unicode(key)] = unicode(value) for obj in [pkg, t1, t2, pr1, pr2]: model.Session.add(obj) model.repo.commit_and_remove() pkg = model.Package.by_name(pkg_name) model.setup_default_user_roles(pkg, [self.admin]) | 066e1d1fbd45eed44c3885eb476bafafdf723709 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/265/066e1d1fbd45eed44c3885eb476bafafdf723709/test_package.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
4619,
67,
454,
67,
2821,
12,
2890,
4672,
468,
1788,
394,
761,
5588,
273,
938,
18,
7422,
18,
2704,
67,
13057,
1435,
3475,
67,
529,
273,
582,
11,
2704,
67,
4619,
10657,
3813,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4619,
67,
454,
67,
2821,
12,
2890,
4672,
468,
1788,
394,
761,
5588,
273,
938,
18,
7422,
18,
2704,
67,
13057,
1435,
3475,
67,
529,
273,
582,
11,
2704,
67,
4619,
10657,
3813,
... |
""" | """ | def flimage_getcolormap(pImage): """ flimage_getcolormap(pImage) -> num. """ retval = _flimage_getcolormap(pImage) return retval | 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,
2730,
67,
588,
1293,
18804,
12,
84,
2040,
4672,
3536,
1183,
2730,
67,
588,
1293,
18804,
12,
84,
2040,
13,
317,
818,
18,
3536,
225,
5221,
273,
389,
2242,
2730,
67,
588,
1293,
1880... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1183,
2730,
67,
588,
1293,
18804,
12,
84,
2040,
4672,
3536,
1183,
2730,
67,
588,
1293,
18804,
12,
84,
2040,
13,
317,
818,
18,
3536,
225,
5221,
273,
389,
2242,
2730,
67,
588,
1293,
1880... |
return width+2, list | return width+2, stat_list | def get_print_list(self, sel_list): width = self.max_name_len if self.fcn_list: list = self.fcn_list[:] msg = " Ordered by: " + self.sort_type + '\n' else: list = self.stats.keys() msg = " Random listing order was used\n" | 401c4c60c38ffdcfe94d253cbc3c890a8ec5830d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12029/401c4c60c38ffdcfe94d253cbc3c890a8ec5830d/pstats.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
1188,
67,
1098,
12,
2890,
16,
357,
67,
1098,
4672,
1835,
273,
365,
18,
1896,
67,
529,
67,
1897,
309,
365,
18,
7142,
82,
67,
1098,
30,
666,
273,
365,
18,
7142,
82,
67,
1098... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1188,
67,
1098,
12,
2890,
16,
357,
67,
1098,
4672,
1835,
273,
365,
18,
1896,
67,
529,
67,
1897,
309,
365,
18,
7142,
82,
67,
1098,
30,
666,
273,
365,
18,
7142,
82,
67,
1098... |
def _makefile(self, mode='rw', bufsize=1024): ssl = m2.ssl_dup(self.ssl) m2.ssl_set_bio(ssl, sockbio, sockbio) sslbio = m2.bio_dup_chain(self.sslbio) m2.bio_set_ssl(sslbio, ssl, 0) m2.bio_push(sslbio, sockbio) return BIO.IOBuffer(sslbio, mode, bufsize) | def get_cipher_list(self, idx=0): return m2.ssl_get_cipher_list(self.ssl, idx) def set_cipher_list(self, cipher_list): return m2.ssl_set_cipher_list(self.ssl, cipher_list) | def _makefile(self, mode='rw', bufsize=1024): # XXX Doesn't work. #sockbio = m2.bio_dup_chain(self.sockbio) ssl = m2.ssl_dup(self.ssl) m2.ssl_set_bio(ssl, sockbio, sockbio) sslbio = m2.bio_dup_chain(self.sslbio) m2.bio_set_ssl(sslbio, ssl, 0) m2.bio_push(sslbio, sockbio) return BIO.IOBuffer(sslbio, mode, bufsize) | e1347b27876e03d959e3573b2dbb5d37e1b6f6cf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10522/e1347b27876e03d959e3573b2dbb5d37e1b6f6cf/Connection.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
6540,
768,
12,
2890,
16,
1965,
2218,
21878,
2187,
1681,
1467,
33,
2163,
3247,
4672,
468,
11329,
9637,
82,
1404,
1440,
18,
468,
15031,
21010,
273,
312,
22,
18,
21010,
67,
26427,
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,
389,
6540,
768,
12,
2890,
16,
1965,
2218,
21878,
2187,
1681,
1467,
33,
2163,
3247,
4672,
468,
11329,
9637,
82,
1404,
1440,
18,
468,
15031,
21010,
273,
312,
22,
18,
21010,
67,
26427,
67,
... |
for lfn,pfn,se in fileTuples: fileID = lfnFileIDs[lfn] res = self.__addReplica(fileID,se,pfn,connection=connection) if not res['OK']: lfnFileIDs.pop(lfn) return S_OK(lfnFileIDs) | for lfn, pfn, se in fileTuples: fileID = lfnFileIDs[lfn] res = self.__addReplica( fileID, se, pfn, connection = connection ) if not res['OK']: lfnFileIDs.pop( lfn ) return S_OK( lfnFileIDs ) | def __addFileTuples(self,fileTuples,connection=False): """ Add files and replicas """ lfns = [x[0] for x in fileTuples ] res = self.__addDataFiles(lfns,connection=connection) if not res['OK']: return res lfnFileIDs = res['Value'] toRemove = [] for lfn,pfn,se in fileTuples: fileID = lfnFileIDs[lfn] res = self.__addReplica(fileID,se,pfn,connection=connection) if not res['OK']: lfnFileIDs.pop(lfn) return S_OK(lfnFileIDs) | 9ad007ea503b29694fc081c1646b7c5ecd07b1f2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/9ad007ea503b29694fc081c1646b7c5ecd07b1f2/TransformationDB.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1289,
812,
25813,
12,
2890,
16,
768,
25813,
16,
4071,
33,
8381,
4672,
3536,
1436,
1390,
471,
21545,
3536,
18594,
2387,
273,
306,
92,
63,
20,
65,
364,
619,
316,
585,
25813,
308,
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,
1001,
1289,
812,
25813,
12,
2890,
16,
768,
25813,
16,
4071,
33,
8381,
4672,
3536,
1436,
1390,
471,
21545,
3536,
18594,
2387,
273,
306,
92,
63,
20,
65,
364,
619,
316,
585,
25813,
308,
4... |
elif flag.lower() == "sortspans": | elif c.lower() == "sortspans": | def export_obj(self,obj,SceneNodeRef,isdynamic,softVolParser, water = False): | 164ef561549d0244904d99089185815ae8d59c49 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12286/164ef561549d0244904d99089185815ae8d59c49/prp_DrawClasses.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3359,
67,
2603,
12,
2890,
16,
2603,
16,
14370,
907,
1957,
16,
291,
14507,
16,
9269,
17431,
2678,
16,
16313,
273,
1083,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3359,
67,
2603,
12,
2890,
16,
2603,
16,
14370,
907,
1957,
16,
291,
14507,
16,
9269,
17431,
2678,
16,
16313,
273,
1083,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
print "Command-" +`c` | if DEBUG: print "Command-" +`c` | def do_key(self, event): (what, message, when, where, modifiers) = event c = chr(message & charCodeMask) if modifiers & cmdKey: if c == '.': raise self else: result = MenuKey(ord(c)) id = (result>>16) & 0xffff # Hi word item = result & 0xffff # Lo word if id: self.do_rawmenu(id, item, None, event) elif c == 'w': w = FrontWindow() if w: self.do_close(w) else: print 'Command-W without front window' else: print "Command-" +`c` else: self.do_char(c, event) | a67a39b61261e14a924785aee0199e094d466e35 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/a67a39b61261e14a924785aee0199e094d466e35/FrameWork.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
67,
856,
12,
2890,
16,
871,
4672,
261,
23770,
16,
883,
16,
1347,
16,
1625,
16,
10429,
13,
273,
871,
276,
273,
4513,
12,
2150,
473,
13096,
5796,
13,
309,
10429,
473,
1797,
653,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
67,
856,
12,
2890,
16,
871,
4672,
261,
23770,
16,
883,
16,
1347,
16,
1625,
16,
10429,
13,
273,
871,
276,
273,
4513,
12,
2150,
473,
13096,
5796,
13,
309,
10429,
473,
1797,
653,
3... |
resps = groups.all_members(configuration.groups.resp_prefix + name) resps.sort() guests = \ groups.all_members(configuration.groups.guest_prefix + name) guests.sort() | resps = groups.all_members(configuration.groups.resp_prefix + name) | def user_line(login): uid = users.login_to_uid(login) return '''<tr><td>%s</td><td>%s</td><td>%s</td></tr>''' % ( u[uid]['gecos'], login, uid) | eb92fc56664814fed9f428d02ee7bb3f8903a836 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/eb92fc56664814fed9f428d02ee7bb3f8903a836/groups.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
729,
67,
1369,
12,
5819,
4672,
4555,
273,
3677,
18,
5819,
67,
869,
67,
1911,
12,
5819,
13,
327,
9163,
32,
313,
4438,
4465,
9822,
87,
1757,
4465,
4438,
4465,
9822,
87,
1757,
4465,
4438,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
729,
67,
1369,
12,
5819,
4672,
4555,
273,
3677,
18,
5819,
67,
869,
67,
1911,
12,
5819,
13,
327,
9163,
32,
313,
4438,
4465,
9822,
87,
1757,
4465,
4438,
4465,
9822,
87,
1757,
4465,
4438,... |
img = agg.GraphicsContextArray(desired, pix_format="bgra32",interpolation=scheme) | img = agg.GraphicsContextArray(desired, pix_format="bgra32", interpolation=scheme) | def generic_timing(self,scheme,size,iters): gc = agg.GraphicsContextArray(size,pix_format = "bgra32") desired = solid_bgra32(size,self.color) img = agg.GraphicsContextArray(desired, pix_format="bgra32",interpolation=scheme) t1 = time.clock() for i in range(iters): gc.draw_image(img) t2 = time.clock() img_per_sec = iters/(t2-t1) print "'%s' interpolation -> img per sec: %4.2f" % (scheme, img_per_sec) return img_per_sec | 1d96ab014629902ff0c3275273182d01de39da50 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/13166/1d96ab014629902ff0c3275273182d01de39da50/image_test_case.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5210,
67,
8584,
310,
12,
2890,
16,
9068,
16,
1467,
16,
27270,
4672,
8859,
273,
10421,
18,
17558,
1042,
1076,
12,
1467,
16,
14861,
67,
2139,
273,
315,
70,
2752,
1578,
7923,
6049,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5210,
67,
8584,
310,
12,
2890,
16,
9068,
16,
1467,
16,
27270,
4672,
8859,
273,
10421,
18,
17558,
1042,
1076,
12,
1467,
16,
14861,
67,
2139,
273,
315,
70,
2752,
1578,
7923,
6049,
273,
1... |
cookie as specified in pep-0263. If both a bom and a cookie are present, but disagree, a SyntaxError will be raised. If the encoding cookie is an invalid charset, raise a SyntaxError. Note that if a utf-8 bom is found, | cookie as specified in pep-0263. If both a bom and a cookie are present, but disagree, a SyntaxError will be raised. If the encoding cookie is an invalid charset, raise a SyntaxError. Note that if a utf-8 bom is found, | def detect_encoding(readline): """ The detect_encoding() function is used to detect the encoding that should be used to decode a Python source file. It requires one argment, readline, in the same way as the tokenize() generator. It will call readline a maximum of twice, and return the encoding used (as a string) and a list of any lines (left as bytes) it has read in. It detects the encoding from the presence of a utf-8 bom or an encoding cookie as specified in pep-0263. If both a bom and a cookie are present, but disagree, a SyntaxError will be raised. If the encoding cookie is an invalid charset, raise a SyntaxError. Note that if a utf-8 bom is found, 'utf-8-sig' is returned. If no encoding is specified, then the default of 'utf-8' will be returned. """ bom_found = False encoding = None default = 'utf-8' def read_or_stop(): try: return readline() except StopIteration: return b'' def find_cookie(line): try: line_string = line.decode('ascii') except UnicodeDecodeError: return None matches = cookie_re.findall(line_string) if not matches: return None encoding = _get_normal_name(matches[0]) try: codec = lookup(encoding) except LookupError: # This behaviour mimics the Python interpreter raise SyntaxError("unknown encoding: " + encoding) if bom_found: if codec.name != 'utf-8': # This behaviour mimics the Python interpreter raise SyntaxError('encoding problem: utf-8') encoding += '-sig' return encoding first = read_or_stop() if first.startswith(BOM_UTF8): bom_found = True first = first[3:] default = 'utf-8-sig' if not first: return default, [] encoding = find_cookie(first) if encoding: return encoding, [first] second = read_or_stop() if not second: return default, [first] encoding = find_cookie(second) if encoding: return encoding, [first, second] return default, [first, second] | 3a5e25a332b7cc719a2378705db96c827ba64b93 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12029/3a5e25a332b7cc719a2378705db96c827ba64b93/tokenize.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5966,
67,
5999,
12,
896,
1369,
4672,
3536,
1021,
5966,
67,
5999,
1435,
445,
353,
1399,
358,
5966,
326,
2688,
716,
1410,
506,
1399,
358,
2495,
279,
6600,
1084,
585,
18,
2597,
4991,
1245,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5966,
67,
5999,
12,
896,
1369,
4672,
3536,
1021,
5966,
67,
5999,
1435,
445,
353,
1399,
358,
5966,
326,
2688,
716,
1410,
506,
1399,
358,
2495,
279,
6600,
1084,
585,
18,
2597,
4991,
1245,
... |
pref_value = bool(config.get(descriptor)) | pref_value = config.get(descriptor) | def radio_changed(widget): for w, v in widget_values: if widget is w: config.set(descriptor, v) | fa5f24949cc5baf942dc9e33ecd1da6388370be1 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12354/fa5f24949cc5baf942dc9e33ecd1da6388370be1/prefpanel.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13512,
67,
6703,
12,
6587,
4672,
364,
341,
16,
331,
316,
3604,
67,
2372,
30,
309,
3604,
353,
341,
30,
642,
18,
542,
12,
12628,
16,
331,
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,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13512,
67,
6703,
12,
6587,
4672,
364,
341,
16,
331,
316,
3604,
67,
2372,
30,
309,
3604,
353,
341,
30,
642,
18,
542,
12,
12628,
16,
331,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
break else: if create_new is None: raise KeyError, time_slide id = tisitable.sync_ids().next() for instrument, offset in time_slide.iteritems(): row = lsctables.TimeSlide() row.process_id = create_new.process_id row.time_slide_id = id row.instrument = instrument row.offset = offset tisitable.append(row) | return id if create_new is None: raise KeyError, time_slide id = tisitable.sync_ids().next() for instrument, offset in time_slide.iteritems(): row = lsctables.TimeSlide() row.process_id = create_new.process_id row.time_slide_id = id row.instrument = instrument row.offset = offset tisitable.append(row) | def get_time_slide_id(xmldoc, time_slide, create_new = None): """ Return the time_slide_id corresponding to the time slide described by time_slide, a dictionary of instrument/offset pairs. If the document does not contain exactly 1 time_slide table, or the table does not describe a matching time slide, then KeyError is raised. If, however, the optional create_new argument is set to an lsctables.Process object (or any other object with a process_id attribute), then a time slide table will be created if needed and or the missing time slide description added to the table, and indicated as having been created by the given process. """ try: tisitable = table.get_table(xmldoc, lsctables.TimeSlideTable.tableName) except ValueError: # table not found if create_new is None: raise KeyError, time_slide tisitable = lsctables.New(lsctables.TimeSlideTable) xmldoc.childNodes[0].appendChild(tisitable) for id in tisitable.dict.iterkeys(): if tisitable.get_offset_dict(id) == time_slide: break else: # time slide not found in table if create_new is None: raise KeyError, time_slide id = tisitable.sync_ids().next() for instrument, offset in time_slide.iteritems(): row = lsctables.TimeSlide() row.process_id = create_new.process_id row.time_slide_id = id row.instrument = instrument row.offset = offset tisitable.append(row) return id | 746dc24fef0e7b9b0196c6c520b606157fa47211 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3592/746dc24fef0e7b9b0196c6c520b606157fa47211/llwapp.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
957,
67,
26371,
67,
350,
12,
2902,
2434,
16,
813,
67,
26371,
16,
752,
67,
2704,
273,
599,
4672,
3536,
2000,
326,
813,
67,
26371,
67,
350,
4656,
358,
326,
813,
12701,
11893,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
957,
67,
26371,
67,
350,
12,
2902,
2434,
16,
813,
67,
26371,
16,
752,
67,
2704,
273,
599,
4672,
3536,
2000,
326,
813,
67,
26371,
67,
350,
4656,
358,
326,
813,
12701,
11893,
... |
self.create() self.mk_release_dir() | def run(self, opts): self.opts = opts self.create() self.mk_release_dir() self.upload_installers() | 30e0be1170dca2e7b577fb474425655d4268a27e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9125/30e0be1170dca2e7b577fb474425655d4268a27e/upload.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
16,
1500,
4672,
365,
18,
4952,
273,
1500,
365,
18,
6327,
67,
5425,
414,
1435,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
16,
1500,
4672,
365,
18,
4952,
273,
1500,
365,
18,
6327,
67,
5425,
414,
1435,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... | |
raise errors.BlockDeviceError("LV create failed (%s): %s" % (result.fail_reason, result.output)) | _ThrowError("LV create failed (%s): %s", result.fail_reason, result.output) | def Create(cls, unique_id, children, size): """Create a new logical volume. | 82463074c0c011a83cf2239affbdb44cb2940801 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7542/82463074c0c011a83cf2239affbdb44cb2940801/bdev.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1788,
12,
6429,
16,
3089,
67,
350,
16,
2325,
16,
963,
4672,
3536,
1684,
279,
394,
6374,
3940,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1788,
12,
6429,
16,
3089,
67,
350,
16,
2325,
16,
963,
4672,
3536,
1684,
279,
394,
6374,
3940,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
CreateTestData.create_arbitrary(package_dicts=[data or kwds], admins=admins) | CreateTestData.create_arbitrary(package_dicts=[data or kwds]) | def create_package(self, data={}, admins=[], **kwds): # Todo: A simpler method for just creating a package. CreateTestData.create_arbitrary(package_dicts=[data or kwds], admins=admins) | ef4011cdcdcaa5438d493402ef36983bb4592cf4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/265/ef4011cdcdcaa5438d493402ef36983bb4592cf4/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
67,
5610,
12,
2890,
16,
501,
28793,
31116,
22850,
6487,
2826,
25577,
4672,
468,
399,
7370,
30,
432,
9330,
264,
707,
364,
2537,
4979,
279,
2181,
18,
1788,
4709,
751,
18,
2640,
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,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
67,
5610,
12,
2890,
16,
501,
28793,
31116,
22850,
6487,
2826,
25577,
4672,
468,
399,
7370,
30,
432,
9330,
264,
707,
364,
2537,
4979,
279,
2181,
18,
1788,
4709,
751,
18,
2640,
67,
... |
check('' in '', "'' not in ''") check('' in 'abc', "'' not in 'abc'") | self.assertRaises(TypeError, lambda: None in unicode('abc')) | def check(ok, *args): if not ok: raise TestFailed, " ".join(map(str, args)) | 2ee30f8a6455291ff090aa80c6736686ef3f04e9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8125/2ee30f8a6455291ff090aa80c6736686ef3f04e9/test_contains.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
12,
601,
16,
380,
1968,
4672,
309,
486,
1529,
30,
1002,
7766,
2925,
16,
315,
3552,
5701,
12,
1458,
12,
701,
16,
833,
3719,
225,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
12,
601,
16,
380,
1968,
4672,
309,
486,
1529,
30,
1002,
7766,
2925,
16,
315,
3552,
5701,
12,
1458,
12,
701,
16,
833,
3719,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
"Return the system identifier for the current event." return None | "Return the system identifier for the current event." return None | def getSystemId(self): | 27c75fe806fd4e5fcdccb398bd43691a6d25d3ca /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/27c75fe806fd4e5fcdccb398bd43691a6d25d3ca/xmlreader.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12996,
548,
12,
2890,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12996,
548,
12,
2890,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
self.request = urllib2.Request(wiki.apibase, self.encodeddata, self.headers) | self.request = urllib2.Request(self.wiki.apibase, self.encodeddata, self.headers) | def changeParam(self, param, value): """Change or add a parameter after making the request object Simply changing self.data won't work as it needs to update other things. | ee06038a7627145e8235233659a2d5e5b56fc557 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8398/ee06038a7627145e8235233659a2d5e5b56fc557/api.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2549,
786,
12,
2890,
16,
579,
16,
460,
4672,
3536,
3043,
578,
527,
279,
1569,
1839,
10480,
326,
590,
733,
225,
9587,
1283,
12770,
365,
18,
892,
8462,
1404,
1440,
487,
518,
4260,
358,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2549,
786,
12,
2890,
16,
579,
16,
460,
4672,
3536,
3043,
578,
527,
279,
1569,
1839,
10480,
326,
590,
733,
225,
9587,
1283,
12770,
365,
18,
892,
8462,
1404,
1440,
487,
518,
4260,
358,
1... |
if self.iconCache.isValid(): | if self.iconCache is not None and self.iconCache.isValid(): | def getThumbnail (self): self.confirmDBThread() if self.showMoreInfo: width, height = Item.BIG_ICON_SIZE else: width, height = Item.SMALL_ICON_SIZE if self.iconCache.isValid(): path = self.iconCache.getResizedFilename(width, height) return resources.absoluteUrl(fileutil.expand_filename(path)) elif self.screenshot: path = self.getResizedScreenshot(width, height) return resources.absoluteUrl(fileutil.expand_filename(path)) elif self.isContainerItem: return resources.url(u"images/container-icon.png") else: feedThumbnail = self.getFeed().getItemThumbnail(width, height) if feedThumbnail is not None: return feedThumbnail elif self.showMoreInfo: return resources.url(u"images/thumb-default_large.png") else: return resources.url(u"images/thumb-default_small.png") | 3b8efb780d4d06e5f82cf0cc64206a0acb09969a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12354/3b8efb780d4d06e5f82cf0cc64206a0acb09969a/item.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
16270,
261,
2890,
4672,
365,
18,
10927,
2290,
3830,
1435,
309,
365,
18,
4500,
7417,
966,
30,
1835,
16,
2072,
273,
4342,
18,
19044,
67,
21745,
67,
4574,
469,
30,
1835,
16,
2072,
27... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
16270,
261,
2890,
4672,
365,
18,
10927,
2290,
3830,
1435,
309,
365,
18,
4500,
7417,
966,
30,
1835,
16,
2072,
273,
4342,
18,
19044,
67,
21745,
67,
4574,
469,
30,
1835,
16,
2072,
27... |
Bantracker.type.setValue(type) Bantracker.ignore.setValue(ignore) Bantracker.forward.setValue(forward) Bantracker.channels.setValue(channels) Bantracker.review.setValue(review) | Bantracker.request.type.setValue(type) Bantracker.request.ignore.setValue(ignore) Bantracker.request.forward.setValue(forward) Bantracker.request.forward.channels.setValue(channels) Bantracker.request.review.setValue(review) | def getReviewTime(): output("How many days should the bot wait before requesting a ban/quiet review?") review = something("Can be an integer or decimal value. Zero disables reviews.", default=str(Bantracker.review._default)) | 5e4cd4efc7e0b9287648ba0ba010e20a8486cc0a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3106/5e4cd4efc7e0b9287648ba0ba010e20a8486cc0a/config.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5561,
1945,
950,
13332,
876,
2932,
44,
543,
4906,
4681,
1410,
326,
2512,
2529,
1865,
18709,
279,
25732,
19,
20380,
10725,
7225,
13,
10725,
273,
5943,
2932,
2568,
506,
392,
3571,
578,
6970,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5561,
1945,
950,
13332,
876,
2932,
44,
543,
4906,
4681,
1410,
326,
2512,
2529,
1865,
18709,
279,
25732,
19,
20380,
10725,
7225,
13,
10725,
273,
5943,
2932,
2568,
506,
392,
3571,
578,
6970,... |
tid = threading._get_ident() print tid, 'wanting to acquire' | def get_cnx(self, timeout=None): start = time.time() tid = threading._get_ident() print tid, 'wanting to acquire' self._available.acquire() print tid, 'ok' try: tid = threading._get_ident() if tid in self._active: num, cnx = self._active.get(tid) if num == 0: # was pushed back (see _cleanup) if not try_rollback(cnx): del self._active[tid] cnx = None if cnx: self._active[tid][0] = num + 1 return PooledConnection(self, cnx, tid) while True: if self._dormant: if tid in self._dormant: # prefer same thread cnx = self._dormant.pop(tid) else: # pick a random one cnx = self._dormant.pop(self._dormant.keys()[0]) if try_rollback(cnx): break else: self._cursize -= 1 elif self._maxsize and self._cursize < self._maxsize: cnx = self._connector.get_connection(**self._kwargs) self._cursize += 1 break else: if timeout: if (time.time() - start) >= timeout: print tid, 'timeout reached!' raise TimeoutError('Unable to get database ' 'connection within %d seconds' % timeout) print tid, 'waiting on timeout' self._available.wait(timeout / 10) self._available.release() print tid, 'sleeping...' time.sleep(1) print tid, 'reacquiring...' self._available.acquire() else: # Warning: without timeout, Trac *might* hang self._available.wait() self._active[tid] = [1, cnx] return PooledConnection(self, cnx, tid) finally: self._available.release() | 92971a0be28ac91221b53254e92f1a74131533b8 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9317/92971a0be28ac91221b53254e92f1a74131533b8/pool.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
10305,
92,
12,
2890,
16,
2021,
33,
7036,
4672,
787,
273,
813,
18,
957,
1435,
365,
6315,
5699,
18,
1077,
1039,
1435,
1172,
11594,
16,
296,
601,
11,
775,
30,
11594,
273,
17254,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
10305,
92,
12,
2890,
16,
2021,
33,
7036,
4672,
787,
273,
813,
18,
957,
1435,
365,
6315,
5699,
18,
1077,
1039,
1435,
1172,
11594,
16,
296,
601,
11,
775,
30,
11594,
273,
17254,
... | |
button = gtk.RadioButton(button, ' '+self._poll.options[choice]) | button = gtk.RadioButton(group, ' '+self._poll.options[choice]) | def draw_poll_details_box(self): """(Re)draw the poll details box self.poll_details_box should be already defined on the canvas. """ poll_details_box = self.poll_details_box poll_details_box.remove_all() | aab56394c440066113dba4b20e4ceb2c478b61e8 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6691/aab56394c440066113dba4b20e4ceb2c478b61e8/poll.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3724,
67,
13835,
67,
6395,
67,
2147,
12,
2890,
4672,
3536,
12,
426,
13,
9446,
326,
7672,
3189,
3919,
225,
365,
18,
13835,
67,
6395,
67,
2147,
1410,
506,
1818,
2553,
603,
326,
5953,
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,
3724,
67,
13835,
67,
6395,
67,
2147,
12,
2890,
4672,
3536,
12,
426,
13,
9446,
326,
7672,
3189,
3919,
225,
365,
18,
13835,
67,
6395,
67,
2147,
1410,
506,
1818,
2553,
603,
326,
5953,
18,... |
[allsrv.remove(svc.get('name')) for svc in csrv if svc.get('status') == 'on'] | [allsrv.remove(svc.get('name')) for svc in csrv if svc.get('status') == 'on' and svc.get('name') in allsrv] | def Inventory(self): '''Inventory system status''' self.CondPrint('verbose', "Inventorying system...") Toolset.Inventory(self) self.pkgwork = {'add':[], 'update':[], 'remove':[]} all = deepcopy(self.installed) desired = {} for entry in self.cfg.findall(".//Package"): desired[entry.attrib['name']] = entry | 413d2050d50aa4c50ec7f9432e040c58edf58b04 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11867/413d2050d50aa4c50ec7f9432e040c58edf58b04/Debian.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
24835,
12,
2890,
4672,
9163,
15059,
2619,
1267,
26418,
365,
18,
12441,
5108,
2668,
11369,
2187,
315,
15059,
310,
2619,
7070,
13,
13288,
542,
18,
15059,
12,
2890,
13,
365,
18,
10657,
1252,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
24835,
12,
2890,
4672,
9163,
15059,
2619,
1267,
26418,
365,
18,
12441,
5108,
2668,
11369,
2187,
315,
15059,
310,
2619,
7070,
13,
13288,
542,
18,
15059,
12,
2890,
13,
365,
18,
10657,
1252,
... |
print "res: ", res | def _get_diff_hours(self, cr, uid, ids, name, args, context=None): res={} for line in self.browse(cr, uid, ids, context): res[line.id] = line.hour_to - line.hour_from print "res: ", res return res | ba3bceee25d31d715d07372d039460c92836e966 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7339/ba3bceee25d31d715d07372d039460c92836e966/cci_timesheet.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
67,
5413,
67,
16814,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
508,
16,
833,
16,
819,
33,
7036,
4672,
400,
12938,
364,
980,
316,
365,
18,
25731,
12,
3353,
16,
4555,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
67,
5413,
67,
16814,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
508,
16,
833,
16,
819,
33,
7036,
4672,
400,
12938,
364,
980,
316,
365,
18,
25731,
12,
3353,
16,
4555,
16,
... | |
self.assertEquals('Date', typename('var_time')) | self.assertEquals('Date', typename('var_time')) | def testExactConverter(self): class MyInteger(int, JSClass): pass class MyString(str, JSClass): pass class MyUnicode(unicode, JSClass): pass class MyDateTime(datetime.time, JSClass): pass class Global(JSClass): var_bool = True var_int = 1 var_float = 1.0 var_str = 'str' var_unicode = u'unicode' var_datetime = datetime.datetime.now() var_date = datetime.date.today() var_time = datetime.time() var_myint = MyInteger() var_mystr = MyString('mystr') var_myunicode = MyUnicode('myunicode') var_mytime = MyDateTime() with JSContext(Global()) as ctxt: typename = ctxt.eval("(function (name) { return this[name].constructor.name; })") typeof = ctxt.eval("(function (name) { return typeof(this[name]); })") self.assertEquals('Boolean', typename('var_bool')) self.assertEquals('Number', typename('var_int')) self.assertEquals('Number', typename('var_float')) self.assertEquals('String', typename('var_str')) self.assertEquals('String', typename('var_unicode')) self.assertEquals('Date', typename('var_datetime')) self.assertEquals('Date', typename('var_date')) self.assertEquals('Date', typename('var_time')) self.assertEquals('MyInteger', typename('var_myint')) self.assertEquals('MyString', typename('var_mystr')) self.assertEquals('MyUnicode', typename('var_myunicode')) self.assertEquals('MyDateTime', typename('var_mytime')) self.assertEquals('object', typeof('var_myint')) self.assertEquals('object', typeof('var_mystr')) self.assertEquals('object', typeof('var_myunicode')) self.assertEquals('object', typeof('var_mytime')) | 550f86f8e1997ee990877076421feaf1936da8eb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5451/550f86f8e1997ee990877076421feaf1936da8eb/PyV8.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
14332,
5072,
12,
2890,
4672,
667,
8005,
4522,
12,
474,
16,
6756,
797,
4672,
1342,
225,
667,
8005,
780,
12,
701,
16,
6756,
797,
4672,
1342,
225,
667,
8005,
16532,
12,
9124,
16,
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,
1842,
14332,
5072,
12,
2890,
4672,
667,
8005,
4522,
12,
474,
16,
6756,
797,
4672,
1342,
225,
667,
8005,
780,
12,
701,
16,
6756,
797,
4672,
1342,
225,
667,
8005,
16532,
12,
9124,
16,
67... |
c.addElement("not-allowed") | def onActivateStream(self, iq): sid = hashSID(iq.query["sid"], iq["from"], str(iq.query.activate)) log.msg("Activation requested for: ", sid) | 94bdb83c491d4eaf4defb0e0bb1457355ce9df23 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5317/94bdb83c491d4eaf4defb0e0bb1457355ce9df23/proxy65.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
21370,
1228,
12,
2890,
16,
24288,
4672,
7348,
273,
1651,
30287,
12,
18638,
18,
2271,
9614,
7453,
6,
6487,
24288,
9614,
2080,
6,
6487,
609,
12,
18638,
18,
2271,
18,
10014,
3719,
613,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
21370,
1228,
12,
2890,
16,
24288,
4672,
7348,
273,
1651,
30287,
12,
18638,
18,
2271,
9614,
7453,
6,
6487,
24288,
9614,
2080,
6,
6487,
609,
12,
18638,
18,
2271,
18,
10014,
3719,
613,... | |
return self.assert_(repr(self.f).startswith("<open file '" + TESTFN)) | self.assertEquals(repr(self.f), "_fileio._FileIO(%d, %s)" % (self.f.fileno(), repr(self.f.mode))) | def testRepr(self): # verify repr works return # XXX doesn't work yet self.assert_(repr(self.f).startswith("<open file '" + TESTFN)) | 5f09a00bf3f4c3a5aff32b959fecc9ca3ada82e1 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12029/5f09a00bf3f4c3a5aff32b959fecc9ca3ada82e1/test_fileio.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
426,
683,
12,
2890,
4672,
468,
3929,
8480,
6330,
327,
468,
11329,
3302,
1404,
1440,
4671,
365,
18,
11231,
67,
12,
12715,
12,
2890,
18,
74,
2934,
17514,
1918,
2932,
32,
3190,
585,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
426,
683,
12,
2890,
4672,
468,
3929,
8480,
6330,
327,
468,
11329,
3302,
1404,
1440,
4671,
365,
18,
11231,
67,
12,
12715,
12,
2890,
18,
74,
2934,
17514,
1918,
2932,
32,
3190,
585,
... |
os.renames(fullnukepath, nukemoveto) | shutil.move(fullnukepath, nukemoveto) | def find_relink(fullnukepath, nukemoveto): for x in os.listdir(download_dir): linkpath = os.path.join(download_dir, x) if os.path.islink(linkpath): if fullnukepath == os.readlink(linkpath): os.unlink(linkpath) os.symlink(nukemoveto, linkpath) break | e74602d00d0a0bc97cb32331f86d15c2f3ca6221 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13915/e74602d00d0a0bc97cb32331f86d15c2f3ca6221/tvwrangler.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1104,
67,
266,
1232,
12,
2854,
29705,
803,
16,
9244,
79,
351,
1527,
11453,
4672,
364,
619,
316,
1140,
18,
1098,
1214,
12,
7813,
67,
1214,
4672,
1692,
803,
273,
1140,
18,
803,
18,
5701,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1104,
67,
266,
1232,
12,
2854,
29705,
803,
16,
9244,
79,
351,
1527,
11453,
4672,
364,
619,
316,
1140,
18,
1098,
1214,
12,
7813,
67,
1214,
4672,
1692,
803,
273,
1140,
18,
803,
18,
5701,... |
repoXML=old_repo_XML) | repoXML=old_repo_XML) | def _groupLoadDataMD(self, mdtypes=None): """ Check all the possible "files" in the new repomd.xml and make sure they are here/valid (via. downloading checking). If they aren't, we revert to the old repomd.xml data. """ if mdtypes is None: mdtypes = self.retrieved.keys() reverts = [] if 'old_repo_XML' not in self._oldRepoMDData: old_repo_XML = None else: old_repo_XML = self._oldRepoMDData['old_repo_XML'] self._oldRepoMDData['old_MD_files'] = reverts for mdtype in mdtypes: (nmdtype, ndata) = self._get_mdtype_data(mdtype) if ndata is None: # Doesn't exist in this repo continue | 9a15e59f7bfd79c7044f78888e4fc3ba4bb4b6a7 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5445/9a15e59f7bfd79c7044f78888e4fc3ba4bb4b6a7/yumRepo.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1655,
2563,
751,
6188,
12,
2890,
16,
3481,
2352,
33,
7036,
4672,
3536,
2073,
777,
326,
3323,
315,
2354,
6,
316,
326,
394,
2071,
362,
72,
18,
2902,
471,
1221,
3071,
2898,
854,
2674... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1655,
2563,
751,
6188,
12,
2890,
16,
3481,
2352,
33,
7036,
4672,
3536,
2073,
777,
326,
3323,
315,
2354,
6,
316,
326,
394,
2071,
362,
72,
18,
2902,
471,
1221,
3071,
2898,
854,
2674... |
if os.platform == 'win32': | if sys.platform == 'win32': | def get_nh_home_ORIG(): '''Return the Nano-Hive home directory''' nanohive_exe = env.prefs[nanohive_path_prefs_key] # On Windows, the default location of the Nano-Hive executable is # C:\Program Files\Nano-Hive\bin\win32-x86\NanoHive.exe # The home directory is retreived by stripping off the last two directories # from the Nano-Hive executable path, which is # C:\Program Files\Nano-Hive if os.platform == 'win32': head, tail = os.path.split(nanohive_exe) head, tail = os.path.split(head) nh_home, tail = os.path.split(head) return nh_home | 1b966391f6900115c05261114f9b9f7f92d09fea /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11221/1b966391f6900115c05261114f9b9f7f92d09fea/NanoHiveUtils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
82,
76,
67,
8712,
67,
22358,
13332,
9163,
990,
326,
23294,
83,
17,
44,
688,
6382,
1867,
26418,
225,
15110,
76,
688,
67,
14880,
273,
1550,
18,
1484,
2556,
63,
13569,
16699,
688... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
82,
76,
67,
8712,
67,
22358,
13332,
9163,
990,
326,
23294,
83,
17,
44,
688,
6382,
1867,
26418,
225,
15110,
76,
688,
67,
14880,
273,
1550,
18,
1484,
2556,
63,
13569,
16699,
688... |
rspcode = MCAP_RSP_SUCCESS if new_tmstamp != tmstamp_dontset: self.reset_timestamp(new_tmstamp) | reset = new_tmstamp != tmstamp_dontset | def set_request_phase2(self, update, sched_btclock, new_tmstamp, ito): rspcode = MCAP_RSP_SUCCESS if new_tmstamp != tmstamp_dontset: self.reset_timestamp(new_tmstamp) | b6a911ca007263a3ed9a26b5c39a03280e4ed817 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8028/b6a911ca007263a3ed9a26b5c39a03280e4ed817/mcap_csp.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
67,
2293,
67,
13961,
22,
12,
2890,
16,
1089,
16,
23964,
67,
70,
5111,
739,
16,
394,
67,
16925,
14317,
16,
518,
83,
4672,
12049,
710,
273,
490,
17296,
67,
54,
3118,
67,
12778,
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,
444,
67,
2293,
67,
13961,
22,
12,
2890,
16,
1089,
16,
23964,
67,
70,
5111,
739,
16,
394,
67,
16925,
14317,
16,
518,
83,
4672,
12049,
710,
273,
490,
17296,
67,
54,
3118,
67,
12778,
30... |
def pprint_pyval(self, pyval, multiline=True, summary_linelen=0): | def pprint_pyval(self, pyval): | def pprint_pyval(self, pyval, multiline=True, summary_linelen=0): # Handle the most common cases first. The following types # will never need any line wrapping, etc; and they cover most # variable values (esp int, for constants). I leave out # LongType on purpose, since long values may need line- # wrapping. if (type(pyval) is types.IntType or type(pyval) is types.FloatType or type(pyval) is types.NoneType or type(pyval) is types.ComplexType): # none of these should contain '&', '<' or '>'. vstr = repr(pyval) return vstr + ' ' * (self._variable_linelen-len(vstr)) | 5c410b5b6e25df3bdbc6da266f7773518165cb02 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/5c410b5b6e25df3bdbc6da266f7773518165cb02/html.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
18771,
67,
2074,
1125,
12,
2890,
16,
2395,
1125,
4672,
468,
5004,
326,
4486,
2975,
6088,
1122,
18,
225,
1021,
3751,
1953,
468,
903,
5903,
1608,
1281,
980,
14702,
16,
5527,
31,
471,
2898,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
18771,
67,
2074,
1125,
12,
2890,
16,
2395,
1125,
4672,
468,
5004,
326,
4486,
2975,
6088,
1122,
18,
225,
1021,
3751,
1953,
468,
903,
5903,
1608,
1281,
980,
14702,
16,
5527,
31,
471,
2898,... |
if n[0] != '_' and not n in dict: | if n[0] != '_': | def readmodule_ex(module, path=[], inpackage=None): '''Read a module file and return a dictionary of classes. Search for MODULE in PATH and sys.path, read and parse the module and return a dictionary with one entry for each class found in the module. If INPACKAGE is true, it must be the dotted name of the package in which we are searching for a submodule, and then PATH must be the package search path; otherwise, we are searching for a top-level module, and PATH is combined with sys.path. ''' # Compute the full module name (prepending inpackage if set) if inpackage: fullmodule = "%s.%s" % (inpackage, module) else: fullmodule = module # Check in the cache if fullmodule in _modules: return _modules[fullmodule] # Initialize the dict for this module's contents dict = {} # Check if it is a built-in module; we don't do much for these if module in sys.builtin_module_names and not inpackage: _modules[module] = dict return dict # Check for a dotted module name i = module.rfind('.') if i >= 0: package = module[:i] submodule = module[i+1:] parent = readmodule_ex(package, path, inpackage) if inpackage: package = "%s.%s" % (inpackage, package) return readmodule_ex(submodule, parent['__path__'], package) # Search the path for the module f = None if inpackage: f, file, (suff, mode, type) = imp.find_module(module, path) else: f, file, (suff, mode, type) = imp.find_module(module, path + sys.path) if type == imp.PKG_DIRECTORY: dict['__path__'] = [file] path = [file] + path f, file, (suff, mode, type) = imp.find_module('__init__', [file]) _modules[fullmodule] = dict if type != imp.PY_SOURCE: # not Python source, can't do anything with this module f.close() return dict classstack = [] # stack of (class, indent) pairs g = tokenize.generate_tokens(f.readline) try: for tokentype, token, start, end, line in g: if token == 'def': lineno, thisindent = start tokentype, meth_name, start, end, line = g.next() if tokentype != NAME: continue # Syntax error # close all classes indented at least as much while classstack and \ classstack[-1][1] >= thisindent: del classstack[-1] if classstack: # it's a class method cur_class = classstack[-1][0] cur_class._addmethod(meth_name, lineno) else: # it's a function dict[meth_name] = Function(module, meth_name, file, lineno) elif token == 'class': lineno, thisindent = start tokentype, class_name, start, end, line = g.next() if tokentype != NAME: continue # Syntax error # close all classes indented at least as much while classstack and \ classstack[-1][1] >= thisindent: del classstack[-1] # parse what follows the class name tokentype, token, start, end, line = g.next() inherit = None if token == '(': names = [] # List of superclasses # there's a list of superclasses level = 1 super = [] # Tokens making up current superclass while True: tokentype, token, start, end, line = g.next() if token in (')', ',') and level == 1: n = "".join(super) if n in dict: # we know this super class n = dict[n] else: c = n.split('.') if len(c) > 1: # super class is of the form # module.class: look in module for # class m = c[-2] c = c[-1] if m in _modules: d = _modules[m] if c in d: n = d[c] names.append(n) if token == '(': level += 1 elif token == ')': level -= 1 if level == 0: break elif token == ',' and level == 1: pass else: super.append(token) inherit = names cur_class = Class(module, class_name, inherit, file, lineno) dict[class_name] = cur_class classstack.append((cur_class, thisindent)) elif token == 'import' and start[1] == 0: modules = _getnamelist(g) for mod, mod2 in modules: try: # Recursively read the imported module if not inpackage: readmodule_ex(mod, path) else: try: readmodule_ex(mod, path, inpackage) except ImportError: readmodule_ex(mod) except: # If we can't find or parse the imported module, # too bad -- don't die here. pass elif token == 'from' and start[1] == 0: mod, token = _getname(g) if not mod or token != "import": continue names = _getnamelist(g) try: # Recursively read the imported module d = readmodule_ex(mod, path, inpackage) except: # If we can't find or parse the imported module, # too bad -- don't die here. continue # add any classes that were defined in the imported module # to our name space if they were mentioned in the list for n, n2 in names: if n in d: dict[n2 or n] = d[n] elif n == '*': # only add a name if not already there (to mimic # what Python does internally) also don't add # names that start with _ for n in d: if n[0] != '_' and not n in dict: dict[n] = d[n] except StopIteration: pass f.close() return dict | 0a6f954766cd091b117a1c5b16bdb0d2a837c2a8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/0a6f954766cd091b117a1c5b16bdb0d2a837c2a8/pyclbr.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
2978,
67,
338,
12,
2978,
16,
589,
22850,
6487,
316,
5610,
33,
7036,
4672,
9163,
1994,
279,
1605,
585,
471,
327,
279,
3880,
434,
3318,
18,
225,
5167,
364,
14057,
316,
7767,
471,
25... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
2978,
67,
338,
12,
2978,
16,
589,
22850,
6487,
316,
5610,
33,
7036,
4672,
9163,
1994,
279,
1605,
585,
471,
327,
279,
3880,
434,
3318,
18,
225,
5167,
364,
14057,
316,
7767,
471,
25... |
newobj = _animate.new_GIFAnimation(*args, **kwargs) self.this = newobj.this self.thisown = 1 del newobj.thisown def __del__(self, destroy=_animate.delete_GIFAnimation): """__del__(self)""" try: if self.thisown: destroy(self) except: pass | this = _animate.new_GIFAnimation(*args, **kwargs) try: self.this.append(this) except: self.this = this __swig_destroy__ = _animate.delete_GIFAnimation __del__ = lambda self : None; | def __init__(self, *args, **kwargs): """__init__(self) -> GIFAnimation""" newobj = _animate.new_GIFAnimation(*args, **kwargs) self.this = newobj.this self.thisown = 1 del newobj.thisown | 97025b9bc4f0f31eaaa081a99a191e1105973470 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/97025b9bc4f0f31eaaa081a99a191e1105973470/animate.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
380,
1968,
16,
2826,
4333,
4672,
3536,
972,
2738,
972,
12,
2890,
13,
317,
31978,
10816,
8395,
394,
2603,
273,
389,
304,
4988,
18,
2704,
67,
43,
5501,
108... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
380,
1968,
16,
2826,
4333,
4672,
3536,
972,
2738,
972,
12,
2890,
13,
317,
31978,
10816,
8395,
394,
2603,
273,
389,
304,
4988,
18,
2704,
67,
43,
5501,
108... |
command = "M2", | command = "M2 --no-debug --no-readline --silent ", | def __init__(self, maxread=10000, script_subdirectory="", logfile=None, server=None): Expect.__init__(self, name = 'macaulay2', prompt = 'i[0-9]* : ', command = "M2", maxread = maxread, server = server, script_subdirectory = script_subdirectory, verbose_start = False, logfile = None, eval_using_file_cutoff=500) | 70ba73b22c7d8b1cfa3745cb60d06622ac8be798 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9890/70ba73b22c7d8b1cfa3745cb60d06622ac8be798/macaulay2.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
943,
896,
33,
23899,
16,
2728,
67,
1717,
5149,
1546,
3113,
15204,
33,
7036,
16,
1438,
33,
7036,
4672,
15510,
16186,
2738,
972,
12,
2890,
16,
508,
273,
29... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
943,
896,
33,
23899,
16,
2728,
67,
1717,
5149,
1546,
3113,
15204,
33,
7036,
16,
1438,
33,
7036,
4672,
15510,
16186,
2738,
972,
12,
2890,
16,
508,
273,
29... |
cu.execute(full).fetchall() | def _resolve(self, depSetList, selectTemplate, restrictor=None, restrictBy=None): | ec784ec4f12ff6d0b54065cf32fc2019327dcf4a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8747/ec784ec4f12ff6d0b54065cf32fc2019327dcf4a/deptable.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
10828,
12,
2890,
16,
5993,
694,
682,
16,
2027,
2283,
16,
13108,
280,
33,
7036,
16,
13108,
858,
33,
7036,
4672,
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,
10828,
12,
2890,
16,
5993,
694,
682,
16,
2027,
2283,
16,
13108,
280,
33,
7036,
16,
13108,
858,
33,
7036,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... | |
other.parseAction is None and | not(other.parseAction) and | def streamline( self ): super(ParseExpression,self).streamline() | 0d5c070900efe583f55b5d4d6525eb2686936701 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12364/0d5c070900efe583f55b5d4d6525eb2686936701/pyparsing.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1407,
1369,
12,
365,
262,
30,
2240,
12,
3201,
2300,
16,
2890,
2934,
3256,
1369,
1435,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
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,
1407,
1369,
12,
365,
262,
30,
2240,
12,
3201,
2300,
16,
2890,
2934,
3256,
1369,
1435,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
if self.mapChanged: | if len(self.unmapCodes) > 0: | def finish_send(self): if self.mapChanged: unmapCodes = self.unmapCodes mapping = self.localDisplay.get_keyboard_mapping(min(unmapCodes), max(unmapCodes) - min(unmapCodes) + 1) firstCode = min(unmapCodes) | 6684a2c421059ead515a177aabc668d9f834f6a3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6143/6684a2c421059ead515a177aabc668d9f834f6a3/interface.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4076,
67,
4661,
12,
2890,
4672,
309,
562,
12,
2890,
18,
318,
1458,
6295,
13,
405,
374,
30,
640,
1458,
6295,
273,
365,
18,
318,
1458,
6295,
2874,
273,
365,
18,
3729,
4236,
18,
588,
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,
4076,
67,
4661,
12,
2890,
4672,
309,
562,
12,
2890,
18,
318,
1458,
6295,
13,
405,
374,
30,
640,
1458,
6295,
273,
365,
18,
318,
1458,
6295,
2874,
273,
365,
18,
3729,
4236,
18,
588,
67... |
imgObjectName = image.readerName | if image is None: raise ValueError, "You must specify an image object" | def mapImageToPlane(self,image): """ Maps an Image object onto a Plane object """ if _debug: print "\t%s: Called Plane.mapImageToPlane()" % rendererName | 14a27bcd280a0a7884be8bd64c5e85ab15303932 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8476/14a27bcd280a0a7884be8bd64c5e85ab15303932/plane.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
852,
2040,
774,
19505,
12,
2890,
16,
2730,
4672,
3536,
19837,
392,
3421,
733,
10170,
279,
3008,
8806,
733,
3536,
309,
389,
4148,
30,
1172,
1548,
88,
9,
87,
30,
11782,
3008,
8806,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
852,
2040,
774,
19505,
12,
2890,
16,
2730,
4672,
3536,
19837,
392,
3421,
733,
10170,
279,
3008,
8806,
733,
3536,
309,
389,
4148,
30,
1172,
1548,
88,
9,
87,
30,
11782,
3008,
8806,
18,
1... |
if self._signal_handlers[signal][i][0] == method: | if self._signal_handlers[signal][i][0] is method: | def disconnect(self, signal, method): """Remove registration to receive notifications of signal.""" | a6dbc7361cb77fde332cfc6b0fee3b1e6b5a8e29 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12852/a6dbc7361cb77fde332cfc6b0fee3b1e6b5a8e29/observable.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9479,
12,
2890,
16,
4277,
16,
707,
4672,
3536,
3288,
7914,
358,
6798,
9208,
434,
4277,
12123,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9479,
12,
2890,
16,
4277,
16,
707,
4672,
3536,
3288,
7914,
358,
6798,
9208,
434,
4277,
12123,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
if not is_debug_mode and 'debug' in options: continue | if 'release' in options or 'debug' in options: if is_debug_mode and 'debug' not in options: continue if not is_debug_mode and 'release' not in options: continue | def _Read(self, path, is_debug_mode): """For each test in an expectations file, generate the expectations for it. | b8b3212fb15006904eebf18a299f1e1bfd0bff8e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5060/b8b3212fb15006904eebf18a299f1e1bfd0bff8e/test_expectations.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1994,
12,
2890,
16,
589,
16,
353,
67,
4148,
67,
3188,
4672,
3536,
1290,
1517,
1842,
316,
392,
26305,
585,
16,
2103,
326,
26305,
364,
518,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1994,
12,
2890,
16,
589,
16,
353,
67,
4148,
67,
3188,
4672,
3536,
1290,
1517,
1842,
316,
392,
26305,
585,
16,
2103,
326,
26305,
364,
518,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100... |
if not line: self.cmd_missing_arg() return | def ftp_USER(self, line): if not line: self.cmd_missing_arg() return # warning: we always treat anonymous user as lower-case string. if line.lower() == "anonymous": self.username = "anonymous" else: self.username = line self.respond('331 Username ok, send password.') | 42cfb92815cfe91b8e9573da1b07cf8dce19a9ff /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7236/42cfb92815cfe91b8e9573da1b07cf8dce19a9ff/FTPServer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13487,
67,
4714,
12,
2890,
16,
980,
4672,
468,
3436,
30,
732,
3712,
10116,
13236,
729,
487,
2612,
17,
3593,
533,
18,
309,
980,
18,
8167,
1435,
422,
315,
19070,
6877,
365,
18,
5053,
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,
13487,
67,
4714,
12,
2890,
16,
980,
4672,
468,
3436,
30,
732,
3712,
10116,
13236,
729,
487,
2612,
17,
3593,
533,
18,
309,
980,
18,
8167,
1435,
422,
315,
19070,
6877,
365,
18,
5053,
273... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.