rem stringlengths 2 226k | add stringlengths 0 227k | context stringlengths 8 228k | meta stringlengths 156 215 | input_ids list | attention_mask list | labels list |
|---|---|---|---|---|---|---|
try: path = os.path.join(const.RAYCASTING_PRESETS_DIRECTORY, | path = os.path.join(const.RAYCASTING_PRESETS_DIRECTORY, | def LoadRaycastingPreset(self, pubsub_evt): label = pubsub_evt.data if label != const.RAYCASTING_OFF_LABEL: if label in const.RAYCASTING_FILES.keys(): path = os.path.join(const.RAYCASTING_PRESETS_DIRECTORY, const.RAYCASTING_FILES[label]) else: try: path = os.path.join(const.RAYCASTING_PRESETS_DIRECTORY, label+".plist") except IOError: path = os.path.join(const.USER_RAYCASTING_PRESETS_DIRECTORY, label+".plist") preset = plistlib.readPlist(path) prj.Project().raycasting_preset = preset # Notify volume # TODO: Chamar grafico tb! ps.Publisher().sendMessage('Update raycasting preset') else: prj.Project().raycasting_preset = 0 ps.Publisher().sendMessage('Update raycasting preset') ps.Publisher().sendMessage("Hide raycasting volume") | cab6049e038b224303ee7498cd27bb74846e0015 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10228/cab6049e038b224303ee7498cd27bb74846e0015/control.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4444,
54,
528,
4155,
310,
18385,
12,
2890,
16,
23288,
67,
73,
11734,
4672,
1433,
273,
23288,
67,
73,
11734,
18,
892,
309,
1433,
480,
1866,
18,
6722,
21871,
1360,
67,
8797,
67,
13545,
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,
4444,
54,
528,
4155,
310,
18385,
12,
2890,
16,
23288,
67,
73,
11734,
4672,
1433,
273,
23288,
67,
73,
11734,
18,
892,
309,
1433,
480,
1866,
18,
6722,
21871,
1360,
67,
8797,
67,
13545,
3... |
seq_id_sale_refund = seq_id_sale seq_id_purchase_refund = seq_id_purchase | def generate_configurable_chart(self, cr, uid, ids, context=None): obj_acc = self.pool.get('account.account') obj_acc_tax = self.pool.get('account.tax') obj_journal = self.pool.get('account.journal') obj_sequence = self.pool.get('ir.sequence') obj_acc_template = self.pool.get('account.account.template') obj_fiscal_position_template = self.pool.get('account.fiscal.position.template') obj_fiscal_position = self.pool.get('account.fiscal.position') mod_obj = self.pool.get('ir.model.data') analytic_journal_obj = self.pool.get('account.analytic.journal') | 7676a0740d502c403459953096357b1bd84fb9e5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/7676a0740d502c403459953096357b1bd84fb9e5/installer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2103,
67,
1425,
7463,
67,
11563,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
819,
33,
7036,
4672,
1081,
67,
8981,
273,
365,
18,
6011,
18,
588,
2668,
4631,
18,
4631,
6134,
1081,
67,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2103,
67,
1425,
7463,
67,
11563,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
819,
33,
7036,
4672,
1081,
67,
8981,
273,
365,
18,
6011,
18,
588,
2668,
4631,
18,
4631,
6134,
1081,
67,
8... | |
self.read_slice(self.tmp.sorted, nslice, ssorted[ss:]) self.read_slice(self.tmp.indices, nslice, sindices[ss:]) | self.read_slice(tmp_sorted, nslice, ssorted[ss:]) self.read_slice(tmp_indices, nslice, sindices[ss:]) | def reorder_slice(self, nslice): """Copy & reorder the slice in source to final destination.""" ss = self.slicesize ssorted = self.slice_sorted; sindices = self.slice_indices # Load the second part in buffers self.read_slice(self.tmp.sorted, nslice, ssorted[ss:]) self.read_slice(self.tmp.indices, nslice, sindices[ss:]) indexesExtension.keysort(ssorted, sindices) # Write the first part of the buffers to the regular indices self.write_slice(self.sorted, nslice-1, ssorted[:ss]) self.write_slice(self.indices, nslice-1, sindices[:ss]) # Update caches self.update_caches(nslice-1, ssorted[:ss]) # Shift the slice in the end to the beginning ssorted[:ss] = ssorted[ss:]; sindices[:ss] = sindices[ss:] | 4ec73663a9c5b2970b2d92f44b26adce15ac2395 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12687/4ec73663a9c5b2970b2d92f44b26adce15ac2395/index.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
19427,
67,
6665,
12,
2890,
16,
3153,
2008,
4672,
3536,
2951,
473,
19427,
326,
2788,
316,
1084,
358,
727,
2929,
12123,
5202,
273,
365,
18,
21562,
554,
272,
10350,
273,
365,
18,
6665,
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,
19427,
67,
6665,
12,
2890,
16,
3153,
2008,
4672,
3536,
2951,
473,
19427,
326,
2788,
316,
1084,
358,
727,
2929,
12123,
5202,
273,
365,
18,
21562,
554,
272,
10350,
273,
365,
18,
6665,
67,
... |
def __init__(self, s): self.__lines = s.split('\n') | def __init__(self, name, data, files=(), dirs=()): self.__name = name self.__data = data self.__files = files self.__dirs = dirs self.__lines = None def __setup(self): if self.__lines: return data = None for dir in self.__dirs: for file in self.__files: file = os.path.join(dir, file) try: fp = open(file) data = fp.read() fp.close() break except IOError: pass if data: break if not data: data = self.__data self.__lines = data.split('\n') | def __init__(self, s): self.__lines = s.split('\n') self.__linecnt = len(self.__lines) | 3cac24eafd34f1475e50c6d6f7a9b0ecabdd1481 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/3cac24eafd34f1475e50c6d6f7a9b0ecabdd1481/site.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
508,
16,
501,
16,
1390,
33,
9334,
7717,
33,
1435,
4672,
365,
16186,
529,
273,
508,
365,
16186,
892,
273,
501,
365,
16186,
2354,
273,
1390,
365,
16186,
82... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
508,
16,
501,
16,
1390,
33,
9334,
7717,
33,
1435,
4672,
365,
16186,
529,
273,
508,
365,
16186,
892,
273,
501,
365,
16186,
2354,
273,
1390,
365,
16186,
82... |
tmphbox2.Add(self.bindAndCursor(wx.StaticBitmap(panel, -1, DV.listicons.getRawBitmap(icons[d+f])), launchfile=d+f), 0, wx.ALIGN_CENTER_VERTICAL) tmphbox2.Add((DV.border_padding/2,0)) tmphbox2.Add(self.makeLabel(panel, f, launchfile=d+f)) mainvbox.Add((0,DV.border_padding)) | tmphbox2.Add(self.bindAndCursor(wx.StaticBitmap(panel, -1, DV.listicons.getRawBitmap(icons[d + f])), launchfile=d + f), 0, wx.ALIGN_CENTER_VERTICAL) tmphbox2.Add((DV.border_padding / 2, 0)) tmphbox2.Add(self.makeLabel(panel, f, launchfile=d + f)) mainvbox.Add((0, DV.border_padding)) | def __init__(self, content, aborted=False, main=None): Damnlog('Done dialog opening with parameters content =',content,'; aborted?',aborted) dirs=[] files={} icons={} for i in content: if i[1] not in dirs: dirs.append(i[1]) files[i[1]]=[] files[i[1]].append(i[0]) icons[i[1]+i[0]]=i[2] dirs.sort() for i in dirs: files[i].sort() Damnlog('Done dialog parsed content; dirs =',dirs,'; files =',files) self.parent=main title='Processing done.' if aborted: title='Processing aborted.' wx.Dialog.__init__(self, None, -1, DV.l(title)) absbox1 = wx.BoxSizer(wx.VERTICAL) absbox2 = wx.BoxSizer(wx.HORIZONTAL) self.SetSizer(absbox1) absbox1.Add((0, DV.border_padding)) absbox1.Add(absbox2) absbox1.Add((0, DV.border_padding)) topvbox = wx.BoxSizer(wx.VERTICAL) absbox2.Add((DV.border_padding, 0)) absbox2.Add(topvbox) absbox2.Add((DV.border_padding, 0)) panel = wx.Panel(self, -1) topvbox.Add(panel, 1, wx.EXPAND) mainvbox=wx.BoxSizer(wx.VERTICAL) panel.SetSizer(mainvbox) self.underlined=wx.SystemSettings.GetFont(wx.SYS_DEFAULT_GUI_FONT) self.underlined.SetUnderlined(True) # Build UI Damnlog('Building center UI of done dialog.') if aborted: title = wx.StaticText(panel, -1, DV.l('Video conversion aborted.')) title.SetFont(wx.Font(14, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_BOLD)) else: title = wx.StaticText(panel, -1, DV.l('Video conversion successful.')) title.SetFont(wx.Font(14, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_BOLD)) mainvbox.Add(title) mainvbox.Add((0,DV.border_padding*2)) if len(content): Damnlog('There is content, so we\'re gonna build tree.') mainvbox.Add(wx.StaticText(panel,-1,DV.l('The following videos have been processed:'))) foldericon=wx.Bitmap(DV.images_path + 'foldermovie.png') for d in dirs: Damnlog('Building videos list for directory',d) tmpvbox=wx.BoxSizer(wx.VERTICAL) mainvbox.Add(tmpvbox) tmphbox=wx.BoxSizer(wx.HORIZONTAL) tmpvbox.Add(tmphbox) tmphbox.Add(self.bindAndCursor(wx.StaticBitmap(panel, -1, foldericon), launchdir=d), 0, wx.ALIGN_CENTER_VERTICAL) tmphbox.Add((DV.border_padding/2,0)) tmphbox.Add(self.makeLabel(panel, d, launchdir=d)) tmpinnerhbox=wx.BoxSizer(wx.HORIZONTAL) tmpvbox.Add(tmpinnerhbox) tmpinnerhbox.Add((foldericon.GetWidth()+DV.border_padding,0)) tmpinnervbox=wx.BoxSizer(wx.VERTICAL) tmpinnerhbox.Add(tmpinnervbox,1) for f in files[d]: tmphbox2=wx.BoxSizer(wx.HORIZONTAL) tmpinnervbox.Add(tmphbox2) tmphbox2.Add(self.bindAndCursor(wx.StaticBitmap(panel, -1, DV.listicons.getRawBitmap(icons[d+f])), launchfile=d+f), 0, wx.ALIGN_CENTER_VERTICAL) tmphbox2.Add((DV.border_padding/2,0)) tmphbox2.Add(self.makeLabel(panel, f, launchfile=d+f)) mainvbox.Add((0,DV.border_padding)) else: Damnlog('There\'s no content, so we\'re not gonna build much.') mainvbox.Add(wx.StaticText(panel,-1,DV.l('No videos were processed.'))) mainvbox.Add((0,DV.border_padding)) mainvbox.Add((0,DV.border_padding)) # Again! okhbox=wx.BoxSizer(wx.HORIZONTAL) mainvbox.Add(okhbox,0,wx.ALIGN_RIGHT) okButton = wx.Button(panel,-1,DV.l('OK')) okhbox.Add(okButton) self.Bind(wx.EVT_BUTTON, self.onOK, okButton) Damnlog('Finished building done dialog UI, displaying it.') # Finished building UI self.SetClientSize(self.GetBestSize()) self.Center() Damnlog('Done dialog displayed and centered.') | 2e4d33b2a8b84c7e2a1d15176545dae986a39d07 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11142/2e4d33b2a8b84c7e2a1d15176545dae986a39d07/DamnVid.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
913,
16,
18166,
33,
8381,
16,
2774,
33,
7036,
4672,
463,
301,
82,
1330,
2668,
7387,
6176,
10890,
598,
1472,
913,
273,
2187,
1745,
11189,
31,
18166,
35,
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,
1001,
2738,
972,
12,
2890,
16,
913,
16,
18166,
33,
8381,
16,
2774,
33,
7036,
4672,
463,
301,
82,
1330,
2668,
7387,
6176,
10890,
598,
1472,
913,
273,
2187,
1745,
11189,
31,
18166,
35,
2... |
dc.SetTextForeground(wxWHITE) | dc.SetTextForeground(wx.WHITE) | def Draw(self, dc): dc.DrawBitmap(self.submaps[self.sequence[self.current]], 0, 0, True) if self.overlay and self.showOverlay: dc.DrawBitmap(self.overlay, self.overlayX, self.overlayY, True) if self.label and self.showLabel: dc.DrawText(self.label, self.labelX, self.labelY) dc.SetTextForeground(wxWHITE) dc.DrawText(self.label, self.labelX-1, self.labelY-1) | 52fcf3b1bd3b312d4bcabbeec39d749d73f7be40 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/52fcf3b1bd3b312d4bcabbeec39d749d73f7be40/throbber.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10184,
12,
2890,
16,
6744,
4672,
6744,
18,
6493,
12224,
12,
2890,
18,
1717,
10711,
63,
2890,
18,
6178,
63,
2890,
18,
2972,
65,
6487,
374,
16,
374,
16,
1053,
13,
309,
365,
18,
17312,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10184,
12,
2890,
16,
6744,
4672,
6744,
18,
6493,
12224,
12,
2890,
18,
1717,
10711,
63,
2890,
18,
6178,
63,
2890,
18,
2972,
65,
6487,
374,
16,
374,
16,
1053,
13,
309,
365,
18,
17312,
... |
if (linenum < len(lines)): | if (linenum < len(lines)-1): | def isLastTextLine(linenum): if (linenum < len(lines)): if getLineType(linenum+1) != 'text': return 1 else: return 0 else: return 0 | 205dc77afcd0947155f1616e31da8b63c19d81a9 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6154/205dc77afcd0947155f1616e31da8b63c19d81a9/otl2tags.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
23075,
1528,
1670,
12,
7511,
7924,
4672,
309,
261,
7511,
7924,
411,
562,
12,
3548,
24950,
21,
4672,
309,
9851,
559,
12,
7511,
7924,
15,
21,
13,
480,
296,
955,
4278,
327,
404,
469,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
23075,
1528,
1670,
12,
7511,
7924,
4672,
309,
261,
7511,
7924,
411,
562,
12,
3548,
24950,
21,
4672,
309,
9851,
559,
12,
7511,
7924,
15,
21,
13,
480,
296,
955,
4278,
327,
404,
469,
30,
... |
visitor.document.reporter.debug(self.__class__.__name__, category='nodes.Node.walkabout') visitor.dispatch_depart(self, self.__class__.__name__) | visitor.document.reporter.debug( 'depart_' + self.__class__.__name__, category='nodes.Node.walkabout') visitor.dispatch_departure(self, self.__class__.__name__) | def walkabout(self, visitor): """ Perform a tree traversal similarly to `Node.walk()` (which see), except also call ``depart_...`` methods before exiting each node. If there is no ``depart_particular_node`` method for a node of type ``particular_node``, the ``unknown_departure`` method is called. | d8675c9c45c0a12e21b9b26f33f8ec324d406168 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5620/d8675c9c45c0a12e21b9b26f33f8ec324d406168/nodes.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5442,
21071,
12,
2890,
16,
8000,
4672,
3536,
11217,
279,
2151,
15940,
7281,
715,
358,
1375,
907,
18,
11348,
20338,
261,
12784,
2621,
3631,
1335,
2546,
745,
12176,
323,
2680,
67,
2777,
1033... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5442,
21071,
12,
2890,
16,
8000,
4672,
3536,
11217,
279,
2151,
15940,
7281,
715,
358,
1375,
907,
18,
11348,
20338,
261,
12784,
2621,
3631,
1335,
2546,
745,
12176,
323,
2680,
67,
2777,
1033... |
d = Domain_ctl(opts['DB_URI'], multi_rpc(opts)) | d = Domain_ctl(opts['DB_URI'], any_rpc(opts)) | def domain(command, *domain, **opts): force = opts['FORCE'] cmd = CMD.get(command) idtype = get_idtype(opts) if cmd == CMD_ADD: if len(domain) < 1: raise Error (ENOARG, 'domain') d = Domain_ctl(opts['DB_URI'], multi_rpc(opts)) d.add(domain[0], domain[1:], idtype, force) elif cmd == CMD_RM: d = Domain_ctl(opts['DB_URI'], multi_rpc(opts)) d.rm(domain, force) elif cmd == CMD_SHOW: if not domain: domain = None else: domain = domain[0] cols, fformat, limit, rsep, lsep, astab = show_opts(opts) u = Domain(opts['DB_URI']) if opts['DID']: uri_list, desc = u.show_did(domain, cols=cols, fformat=fformat, limit=limit) elif opts['DEPTH']: uri_list, desc = u.show_did_for_domain(domain, cols=cols, fformat=fformat, limit=limit) else: uri_list, desc = u.show_domain(domain, cols=cols, fformat=fformat, limit=limit) tabprint(uri_list, desc, rsep, lsep, astab) else: raise Error (EINVAL, command) | b4a657ef4918a45665cfe8dcdcbcc873a2f84b6c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2855/b4a657ef4918a45665cfe8dcdcbcc873a2f84b6c/ctlctl.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2461,
12,
3076,
16,
380,
4308,
16,
2826,
4952,
4672,
2944,
273,
1500,
3292,
27817,
3546,
1797,
273,
18052,
18,
588,
12,
3076,
13,
612,
723,
273,
336,
67,
350,
723,
12,
4952,
13,
309,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2461,
12,
3076,
16,
380,
4308,
16,
2826,
4952,
4672,
2944,
273,
1500,
3292,
27817,
3546,
1797,
273,
18052,
18,
588,
12,
3076,
13,
612,
723,
273,
336,
67,
350,
723,
12,
4952,
13,
309,
... |
for dict in dicts: if dict.has_key(object): return '<a href="%s">%s</a>' % (dict[object], name) | if sys.modules.has_key(object.__module__) and \ getattr(sys.modules[object.__module__], object.__name__) is object: return '<a href="%s.html object.__module__, object.__name__, name) | def classlink(self, object, modname, *dicts): """Make a link for a class.""" name = classname(object, modname) for dict in dicts: if dict.has_key(object): return '<a href="%s">%s</a>' % (dict[object], name) return name | a5cd89f93dfc2b451a5a589ac3cd84fbcdd53c4f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/a5cd89f93dfc2b451a5a589ac3cd84fbcdd53c4f/pydoc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
667,
1232,
12,
2890,
16,
733,
16,
16037,
16,
380,
16287,
4672,
3536,
6464,
279,
1692,
364,
279,
667,
12123,
508,
273,
7479,
12,
1612,
16,
16037,
13,
309,
2589,
18,
6400,
18,
5332,
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,
667,
1232,
12,
2890,
16,
733,
16,
16037,
16,
380,
16287,
4672,
3536,
6464,
279,
1692,
364,
279,
667,
12123,
508,
273,
7479,
12,
1612,
16,
16037,
13,
309,
2589,
18,
6400,
18,
5332,
67,
... |
db.sql('select m._Marker_key into | db.sql('select distinct m._Marker_key into | def initialize(): global fpA, fpB global rep, seqs, markers, mgiIDs fpA = reportlib.init(reportNameA, outputdir = os.environ['INPARANOIDDIR'], printHeading = None, fileExt = fileExtension) fpB = reportlib.init(reportNameB, outputdir = os.environ['INPARANOIDDIR'], printHeading = None, fileExt = fileExtension) # deleted sequences db.sql('select s._Sequence_key into #deletedsequences ' + \ 'from SEQ_Sequence s ' + \ 'where s._SequenceStatus_key = 316343', None) db.sql('create index idx1 on #deletedsequences(_Sequence_key)', None) # markers with deleted sequences db.sql('select m._Marker_key into #excludemarkers ' + \ 'from #deletedsequences d, SEQ_Marker_Cache m ' + \ 'where d._Sequence_key = m._Sequence_key ' + \ 'and m._Organism_key = 1 ', None) db.sql('create index idx1 on #excludemarkers(_Marker_key)', None) # # marker/polypeptide sequences that are not excluded # markers of type gene only # db.sql('select s.accID, s._Marker_key, s._Qualifier_key into #sequences ' + \ 'from SEQ_Marker_Cache s, MRK_Marker m ' + \ 'where s._SequenceType_key = 316348 ' + \ 'and s._Organism_key = 1 ' + \ 'and s._Marker_key = m._Marker_key ' + \ 'and m._Marker_Type_key = 1 '+ \ 'and not exists (select 1 from #excludemarkers x where ' + \ 's._Marker_key = x._Marker_key)', None) db.sql('create index idx1 on #sequences(accID)', None) db.sql('create index idx2 on #sequences(_Marker_key)', None) # # cache the representative polypeptide # results = db.sql('select accID, _Marker_key from #sequences where _Qualifier_key = 615421', 'auto') for r in results: key = r['accID'] value = r['_Marker_key'] rep[key] = value # # cache the seq id:marker key # results = db.sql('select accID, _Marker_key from #sequences', 'auto') for r in results: key = r['accID'] value = r['_Marker_key'] seqs[key] = value # # cache the marker key:symbol # results = db.sql('select s._Marker_key, m.symbol ' + \ 'from #sequences s, MRK_Marker m ' + \ 'where s._Marker_key = m._Marker_key', 'auto') for r in results: key = r['_Marker_key'] value = r['symbol'] markers[key] = value # # cache the marker key:mgi id # results = db.sql('select s._Marker_key, a.accID ' + \ 'from #sequences s, ACC_Accession a ' + \ 'where s._Marker_key = a._Object_key ' + \ 'and a._MGIType_key = 2 ' + \ 'and a._LogicalDB_key = 1 ' + \ 'and a.prefixPart = "MGI:" ' + \ 'and a.preferred = 1', 'auto') for r in results: key = r['_Marker_key'] value = r['accID'] mgiIDs[key] = value | df9ef0b34df5984da1b0df8d82707ffdc56e1be6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/341/df9ef0b34df5984da1b0df8d82707ffdc56e1be6/MGI_InParanoid_FASTA.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4046,
13332,
225,
2552,
4253,
37,
16,
4253,
38,
2552,
2071,
16,
19472,
16,
11754,
16,
312,
10052,
5103,
225,
4253,
37,
273,
2605,
2941,
18,
2738,
12,
6006,
461,
37,
16,
876,
1214,
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,
4046,
13332,
225,
2552,
4253,
37,
16,
4253,
38,
2552,
2071,
16,
19472,
16,
11754,
16,
312,
10052,
5103,
225,
4253,
37,
273,
2605,
2941,
18,
2738,
12,
6006,
461,
37,
16,
876,
1214,
273,... |
version = version_read | prog.version = version_read | def main(argv): version = '' ver_file = '' if len(argv) > 0: opts, args = getopt.getopt(argv, "hclv:f:", [ "help", "cleanup", "libraries", "version=", "file="]) for opt, arg in opts: if opt in ("-h", "--help"): usage() sys.exit() if opt in ("-v", "--version"): version = arg print "Start building WinMerge release version " + version if opt in ("-c", "--cleanup"): if cleanup_build() == True: print 'Cleanup done.' sys.exit() if opt in ("-l", "--libraries"): build_libraries() sys.exit() if opt in ("-f", "--file"): ver_file = arg if ver_file == '' and version == '': print 'WARNING: No version number or INI file given, using default' print ' version number of 0.0.0.0 where applicable in this script.' version = '0.0.0.0' # Check all required tools are found (script configuration) if check_tools() == False: sys.exit() # Check we are running from correct folder (and go to root if found) if find_winmerge_root() == False: print 'ERROR: Cannot find WinMerge root folder!' print 'The script must be run from WinMerge tree\'s root folder' print '(which has Src- and Filter -folders as subfolders) or from' print 'Tools/Scripts -folder (where this script is located).' sys.exit() # Check 64-bit ShellExtension is compiled if check_x64shellext() == False: sys.exit() # Create the distribution folder if it doesn't exist try: if not os.path.exists(dist_root_folder): os.mkdir(dist_root_folder) except EnvironmentError, einst: print 'Error creating distribution folder: ' + dist_root_folder print einst sys.exit() # Remove old build's files if cleanup_build() == False: sys.exit() if len(ver_file) > 0: version_read = get_product_version(ver_file) if len(version_read) > 0: version = version_read set_resource_version(ver_file) version_folder = 'WinMerge-' + version dist_folder = get_and_create_dist_folder(version_folder) if dist_folder == '': sys.exit(1) dist_src_folder = get_src_dist_folder(dist_folder, version_folder) svn_export(dist_src_folder) setup_translations() build_targets() build_manual() build_innosetup_installer(dist_folder) dist_bin_folder = get_and_create_bin_folder(dist_folder, version_folder) create_bin_folders(dist_bin_folder, dist_src_folder) # Do the cleanup after creating binary distrib folders, as some files # and folders are copied from source folders to binary folders. cleanup_dlls_from_plugins(dist_src_folder) runtimes_folder = get_and_create_runtimes_folder(dist_folder, version) create_runtime_folder(runtimes_folder) print 'WinMerge release script ready!' | 7f222394e7f848573cfa1d04c8f7002cca97d45b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5857/7f222394e7f848573cfa1d04c8f7002cca97d45b/create_release.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
12,
19485,
4672,
1177,
273,
875,
1924,
67,
768,
273,
875,
309,
562,
12,
19485,
13,
405,
374,
30,
1500,
16,
833,
273,
336,
3838,
18,
588,
3838,
12,
19485,
16,
315,
76,
830,
90,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
12,
19485,
4672,
1177,
273,
875,
1924,
67,
768,
273,
875,
309,
562,
12,
19485,
13,
405,
374,
30,
1500,
16,
833,
273,
336,
3838,
18,
588,
3838,
12,
19485,
16,
315,
76,
830,
90,
... |
pid = modname[1] | pid = split(modname, '.')[1] | def registerIcon(klass, iconspec, _prefix=None): modname = klass.__module__ pid = modname[1] name = path.split(iconspec)[1] klass.icon = 'misc_/%s/%s' % (pid, name) icon = Globals.ImageFile(iconspec, _prefix) icon.__roles__=None if not hasattr(OFS.misc_.misc_, pid): setattr(OFS.misc_.misc_, pid, OFS.misc_.Misc_(pid, {})) getattr(OFS.misc_.misc_, pid)[name]=icon | e0bc7c614a1424b85a481b9b8922cab3c4e45746 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1843/e0bc7c614a1424b85a481b9b8922cab3c4e45746/utils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1744,
5554,
12,
22626,
16,
4126,
2793,
16,
389,
3239,
33,
7036,
4672,
16037,
273,
7352,
16186,
2978,
972,
4231,
273,
1416,
12,
1711,
529,
16,
2611,
25146,
21,
65,
508,
273,
589,
18,
49... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1744,
5554,
12,
22626,
16,
4126,
2793,
16,
389,
3239,
33,
7036,
4672,
16037,
273,
7352,
16186,
2978,
972,
4231,
273,
1416,
12,
1711,
529,
16,
2611,
25146,
21,
65,
508,
273,
589,
18,
49... |
dirname=None | dirname=None | def __init__(self, username, password, host, basename, https=False, port=None, domain=None, httpauth_username=None, httpauth_password=None, logger = None, # Not actually needed, just here for compatibility name=None, cookie_str=None, dirname=None ): | 8053783209194a2f333bce2e624aaa02c0d8a987 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11461/8053783209194a2f333bce2e624aaa02c0d8a987/user.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
2718,
16,
2201,
16,
1479,
16,
4882,
16,
2333,
33,
8381,
16,
1756,
33,
7036,
16,
2461,
33,
7036,
16,
1062,
1944,
67,
5053,
33,
7036,
16,
1062,
1944,
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,
1001,
2738,
972,
12,
2890,
16,
2718,
16,
2201,
16,
1479,
16,
4882,
16,
2333,
33,
8381,
16,
1756,
33,
7036,
16,
2461,
33,
7036,
16,
1062,
1944,
67,
5053,
33,
7036,
16,
1062,
1944,
67,... |
raise SystemError('PyThreadState_SetAsyncExc failed') | raise _ThreadInterruptionError('PyThreadState_SetAsyncExc failed') | def _raise_exception_in_thread(tid, exc_type): """ Raises an exception in the threads with id tid. """ assert inspect.isclass(exc_type) # NOTE this returns the number of threads that it modified, which should # only be 1 or 0 (if the thread id wasn't found) long_tid = ctypes.c_long(tid) exc_ptr = ctypes.py_object(exc_type) num = ctypes.pythonapi.PyThreadState_SetAsyncExc(long_tid, exc_ptr) if num == 1: return if num == 0: raise ValueError('Invalid thread id') # NOTE if it returns a number greater than one, you're in trouble, # and you should call it again with exc=NULL to revert the effect null_ptr = ctypes.py_object() ctypes.pythonapi.PyThreadState_SetAsyncExc(long_tid, null_ptr) raise SystemError('PyThreadState_SetAsyncExc failed') | f77917bedf614ae1d5578db0777d40fbf9bec6e3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10692/f77917bedf614ae1d5578db0777d40fbf9bec6e3/thread.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
11628,
67,
4064,
67,
267,
67,
5930,
12,
18081,
16,
3533,
67,
723,
4672,
3536,
20497,
392,
1520,
316,
326,
7403,
598,
612,
11594,
18,
3536,
1815,
5334,
18,
291,
1106,
12,
10075,
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,
11628,
67,
4064,
67,
267,
67,
5930,
12,
18081,
16,
3533,
67,
723,
4672,
3536,
20497,
392,
1520,
316,
326,
7403,
598,
612,
11594,
18,
3536,
1815,
5334,
18,
291,
1106,
12,
10075,
67... |
min, max = 0, sys.maxint | min, max = 0, MAXREPEAT | def _parse(source, pattern, flags=()): # parse regular expression pattern into an operator list. subpattern = SubPattern(pattern) this = None while 1: if str(source.next) in ("|", ")"): break # end of subpattern this = source.get() if this is None: break # end of pattern if this and this[0] not in SPECIAL_CHARS: subpattern.append((LITERAL, this)) elif this == "[": # character set set = [] | 842e911e887411eb043a164240fdb6b694895e87 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/842e911e887411eb043a164240fdb6b694895e87/sre_parse.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2670,
12,
3168,
16,
1936,
16,
2943,
33,
1435,
4672,
225,
468,
1109,
6736,
2652,
1936,
1368,
392,
3726,
666,
18,
225,
720,
4951,
273,
2592,
3234,
12,
4951,
13,
225,
333,
273,
599,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2670,
12,
3168,
16,
1936,
16,
2943,
33,
1435,
4672,
225,
468,
1109,
6736,
2652,
1936,
1368,
392,
3726,
666,
18,
225,
720,
4951,
273,
2592,
3234,
12,
4951,
13,
225,
333,
273,
599,
... |
'd' => direct""" | 'd' => direct Notes - For changes to be commited, you must explictly use the "commit" or "close" methods (changes are commited on close). Changes are NOT committed when the database object is deleted.""" | def __setitem__(self, key, item): if hasattr(key, 'upper'): key = key.upper() super(CaseInsensitiveDict, self).__setitem__(key, item) | 9a931e02283bbf6d8fe5efbf776f3c06a5418dbe /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12971/9a931e02283bbf6d8fe5efbf776f3c06a5418dbe/fame.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
542,
1726,
972,
12,
2890,
16,
498,
16,
761,
4672,
309,
3859,
12,
856,
16,
296,
5797,
11,
4672,
498,
273,
498,
18,
5797,
1435,
2240,
12,
2449,
21931,
5014,
16,
365,
2934,
972,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
542,
1726,
972,
12,
2890,
16,
498,
16,
761,
4672,
309,
3859,
12,
856,
16,
296,
5797,
11,
4672,
498,
273,
498,
18,
5797,
1435,
2240,
12,
2449,
21931,
5014,
16,
365,
2934,
972,
5... |
if self.lastHotspotChunk: self.lastHotspotChunk.set_hotspot(None) self.lastHotspotChunk = mol | if self.lastHotspotChunk: if mol.part is self.lastHotspotChunk.part and mol.part is not None: if env.debug() and self.lastHotspotChunk.hotspot: print "debug: unsetting hotspot of %r (was %r)" % \ (self.lastHotspotChunk, self.lastHotspotChunk.hotspot) self.lastHotspotChunk.set_hotspot(None) else: if env.debug() and self.lastHotspotChunk.hotspot: print "debug: NOT unsetting hotspot of %r" % (self.lastHotspotChunk, ) pass self.lastHotspotChunk = mol | def leftDown(self, event): '''When in clipboard mode, set hotspot if a Singlet is highlighted. ''' if self.elementMode: return obj = self.selectedObj if isinstance(obj, atom) and (obj.element is Singlet): mol = obj.molecule if not mol is self.lastHotspotChunk: if self.lastHotspotChunk: # Unset previous hotspot self.lastHotspotChunk.set_hotspot(None) self.lastHotspotChunk = mol mol.set_hotspot(obj) | 461ab7c22acee89a59cfeb47dcdb4e0bb1604338 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/461ab7c22acee89a59cfeb47dcdb4e0bb1604338/ThumbView.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2002,
4164,
12,
2890,
16,
871,
4672,
9163,
9434,
316,
20304,
1965,
16,
444,
12811,
19032,
309,
279,
348,
310,
1810,
353,
24375,
18,
9163,
309,
365,
18,
2956,
2309,
30,
327,
225,
1081,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2002,
4164,
12,
2890,
16,
871,
4672,
9163,
9434,
316,
20304,
1965,
16,
444,
12811,
19032,
309,
279,
348,
310,
1810,
353,
24375,
18,
9163,
309,
365,
18,
2956,
2309,
30,
327,
225,
1081,
... |
text='Font :') | text='Font Face :') | def CreatePageFontTab(self): #tkVars self.fontSize=StringVar(self) self.fontBold=BooleanVar(self) self.fontName=StringVar(self) self.spaceNum=IntVar(self) self.editFont=tkFont.Font(self,('courier',10,'normal')) ##widget creation #body frame frame=self.tabPages.pages['Fonts/Tabs']['page'] #body section frames frameFont=Frame(frame,borderwidth=2,relief=GROOVE) frameIndent=Frame(frame,borderwidth=2,relief=GROOVE) #frameFont labelFontTitle=Label(frameFont,text='Set Base Editor Font') frameFontName=Frame(frameFont) frameFontParam=Frame(frameFont) labelFontNameTitle=Label(frameFontName,justify=LEFT, text='Font :') self.listFontName=Listbox(frameFontName,height=5,takefocus=FALSE, exportselection=FALSE) self.listFontName.bind('<ButtonRelease-1>',self.OnListFontButtonRelease) scrollFont=Scrollbar(frameFontName) scrollFont.config(command=self.listFontName.yview) self.listFontName.config(yscrollcommand=scrollFont.set) labelFontSizeTitle=Label(frameFontParam,text='Size :') self.optMenuFontSize=DynOptionMenu(frameFontParam,self.fontSize,None, command=self.SetFontSample) checkFontBold=Checkbutton(frameFontParam,variable=self.fontBold, onvalue=1,offvalue=0,text='Bold',command=self.SetFontSample) frameFontSample=Frame(frameFont,relief=SOLID,borderwidth=1) self.labelFontSample=Label(frameFontSample, text='AaBbCcDdEe\nFfGgHhIiJjK\n1234567890\n#:+=(){}[]', justify=LEFT,font=self.editFont) #frameIndent frameIndentSize=Frame(frameIndent) labelSpaceNumTitle=Label(frameIndentSize, justify=LEFT, text='Python Standard: 4 Spaces!') self.scaleSpaceNum=Scale(frameIndentSize, variable=self.spaceNum, label='Indentation Width', orient='horizontal', tickinterval=2, from_=2, to=16) #widget packing #body frameFont.pack(side=LEFT,padx=5,pady=10,expand=TRUE,fill=BOTH) frameIndent.pack(side=LEFT,padx=5,pady=10,fill=Y) #frameFont labelFontTitle.pack(side=TOP,anchor=W,padx=5,pady=5) frameFontName.pack(side=TOP,padx=5,pady=5,fill=X) frameFontParam.pack(side=TOP,padx=5,pady=5,fill=X) labelFontNameTitle.pack(side=TOP,anchor=W) self.listFontName.pack(side=LEFT,expand=TRUE,fill=X) scrollFont.pack(side=LEFT,fill=Y) labelFontSizeTitle.pack(side=LEFT,anchor=W) self.optMenuFontSize.pack(side=LEFT,anchor=W) checkFontBold.pack(side=LEFT,anchor=W,padx=20) frameFontSample.pack(side=TOP,padx=5,pady=5,expand=TRUE,fill=BOTH) self.labelFontSample.pack(expand=TRUE,fill=BOTH) #frameIndent frameIndentSize.pack(side=TOP,padx=5,pady=5,fill=BOTH) labelSpaceNumTitle.pack(side=TOP,anchor=W,padx=5) self.scaleSpaceNum.pack(side=TOP,padx=5,fill=X) return frame | e3fde8f8cd8baf8f82469f2f2f1f2c2e19bfb2c7 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8546/e3fde8f8cd8baf8f82469f2f2f1f2c2e19bfb2c7/configDialog.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1788,
1964,
5711,
5661,
12,
2890,
4672,
468,
16099,
5555,
365,
18,
5776,
1225,
33,
780,
1537,
12,
2890,
13,
365,
18,
5776,
38,
1673,
33,
5507,
1537,
12,
2890,
13,
365,
18,
5776,
461,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1788,
1964,
5711,
5661,
12,
2890,
4672,
468,
16099,
5555,
365,
18,
5776,
1225,
33,
780,
1537,
12,
2890,
13,
365,
18,
5776,
38,
1673,
33,
5507,
1537,
12,
2890,
13,
365,
18,
5776,
461,
... |
self.dbg('transient: %s', filename) | self.dbg(filename) | def doFile(self, filename): | fdcc7a462e60018d17b3f2fd5006cb363fdf5e2f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8747/fdcc7a462e60018d17b3f2fd5006cb363fdf5e2f/packagepolicy.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
812,
12,
2890,
16,
1544,
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,
1652,
741,
812,
12,
2890,
16,
1544,
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,... |
if not self.debug: page.put(contents, comment = commenttext_top, minorEdit = self.minor) | contents = contents + page.get() comment = comment_top | def create(self, title, contents): mysite = wikipedia.getSite() | ef2afd5d6d074404e1c0113955c6b72515e5cf25 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4404/ef2afd5d6d074404e1c0113955c6b72515e5cf25/pagefromfile.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
12,
2890,
16,
2077,
16,
2939,
4672,
312,
1900,
1137,
273,
21137,
18,
588,
4956,
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,... | [
1,
1,
1,
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,
752,
12,
2890,
16,
2077,
16,
2939,
4672,
312,
1900,
1137,
273,
21137,
18,
588,
4956,
1435,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
list.append(getConfigListEntry(_("use TXT colors and position"), config.subtitles.txt_subtitle_colors, None)) list.append(getConfigListEntry(_("TXT subtitle position"), config.subtitles.txt_subtitle_position, None)) | list.append(getConfigListEntry(_("use TXT colors and position"), config.subtitles.txt_subtitle_colors)) list.append(getConfigListEntry(_("TXT subtitle position"), config.subtitles.txt_subtitle_position)) | def fillList(self): list = self.list del list[:] print "self.list", list if self.subtitlesEnabled(): list.append(getConfigListEntry(_("Disable Subtitles"), ConfigNothing(), None)) sel = self.infobar.selected_subtitle else: sel = None for x in self.getSubtitleList(): if sel and sel[:4] == x[:4]: #ignore Language code in compare text = _("Running") else: text = _("Enable") if x[0] == 0: if LanguageCodes.has_key(x[4]): list.append(getConfigListEntry(text+" DVB "+LanguageCodes[x[4]][0], ConfigNothing(), x)) else: list.append(getConfigListEntry(text+" DVB "+x[4], ConfigNothing(), x)) elif x[0] == 1: if x[4] == 'und': #undefined list.append(getConfigListEntry(text+" TTX "+_("Page")+" %x%02x"%(x[3] and x[3] or 8, x[2]), ConfigNothing(), x)) else: if LanguageCodes.has_key(x[4]): list.append(getConfigListEntry(text+" TTX "+_("Page")+" %x%02x"%(x[3] and x[3] or 8, x[2])+" "+LanguageCodes[x[4]][0], ConfigNothing(), x)) else: list.append(getConfigListEntry(text+" TTX "+_("Page")+" %x%02x"%(x[3] and x[3] or 8, x[2])+" "+x[4], ConfigNothing(), x)) elif x[0] == 2: types = (" UTF-8 text "," SSA / AAS "," .SRT file ") if x[4] == 'und': #undefined list.append(getConfigListEntry(text+types[x[2]]+_("Subtitles")+" %d" % x[1], ConfigNothing(), x)) else: if LanguageCodes.has_key(x[4]): list.append(getConfigListEntry(text+types[x[2]]+_("Subtitles") + ' ' + LanguageCodes[x[4]][0], ConfigNothing(), x)) else: list.append(getConfigListEntry(text+types[x[2]]+_("Subtitles")+" %d " % x[1] +x[4], ConfigNothing(), x)) list.append(getConfigListEntry(_("use TXT colors and position"), config.subtitles.txt_subtitle_colors, None)) list.append(getConfigListEntry(_("TXT subtitle position"), config.subtitles.txt_subtitle_position, None)) | 467cacb9234be00649e220fc469c1b7d9eec5714 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6652/467cacb9234be00649e220fc469c1b7d9eec5714/Subtitles.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3636,
682,
12,
2890,
4672,
666,
273,
365,
18,
1098,
1464,
666,
10531,
65,
1172,
315,
2890,
18,
1098,
3113,
666,
309,
365,
18,
1717,
17643,
1526,
13332,
666,
18,
6923,
12,
588,
809,
278... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3636,
682,
12,
2890,
4672,
666,
273,
365,
18,
1098,
1464,
666,
10531,
65,
1172,
315,
2890,
18,
1098,
3113,
666,
309,
365,
18,
1717,
17643,
1526,
13332,
666,
18,
6923,
12,
588,
809,
278... |
ifaces = implementedBy(class_) | def widget(self, _context, field, class_, **kw): attrs = kw ifaces = implementedBy(class_) # Try to do better than accepting the string value by looking through # the interfaces and trying to find the field, so that we can use # 'fromUnicode()' for name, value in kw.items(): for iface in ifaces: if name in iface: attrs[name] = iface[name].fromUnicode(value) break | 701b5a3d03ed8c553c182a89f057f84502000019 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9530/701b5a3d03ed8c553c182a89f057f84502000019/metaconfigure.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3604,
12,
2890,
16,
389,
2472,
16,
652,
16,
667,
67,
16,
2826,
9987,
4672,
3422,
273,
5323,
468,
6161,
358,
741,
7844,
2353,
25806,
326,
533,
460,
635,
7849,
3059,
468,
326,
7349,
471,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3604,
12,
2890,
16,
389,
2472,
16,
652,
16,
667,
67,
16,
2826,
9987,
4672,
3422,
273,
5323,
468,
6161,
358,
741,
7844,
2353,
25806,
326,
533,
460,
635,
7849,
3059,
468,
326,
7349,
471,... | |
def _is_some_method(object): return inspect.ismethod(object) or inspect.ismethoddescriptor(object) | def _is_some_method(obj): return inspect.ismethod(obj) or inspect.ismethoddescriptor(obj) | def _is_some_method(object): return inspect.ismethod(object) or inspect.ismethoddescriptor(object) | c6c1f478d9236ed92312f55b0421497b4f86a302 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/c6c1f478d9236ed92312f55b0421497b4f86a302/pydoc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
291,
67,
19068,
67,
2039,
12,
2603,
4672,
327,
5334,
18,
291,
2039,
12,
2603,
13,
578,
5334,
18,
291,
2039,
12628,
12,
2603,
13,
225,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
291,
67,
19068,
67,
2039,
12,
2603,
4672,
327,
5334,
18,
291,
2039,
12,
2603,
13,
578,
5334,
18,
291,
2039,
12628,
12,
2603,
13,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
def eval(self, command, **kwds): | def eval(self, command, *args, **kwds): | def eval(self, command, **kwds): """ Evaluates commands. | cc95ff1ad583ed813ff13f278a0dcd73e8ffd4bc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/cc95ff1ad583ed813ff13f278a0dcd73e8ffd4bc/scilab.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5302,
12,
2890,
16,
1296,
16,
380,
1968,
16,
2826,
25577,
4672,
3536,
10271,
815,
4364,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
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,
5302,
12,
2890,
16,
1296,
16,
380,
1968,
16,
2826,
25577,
4672,
3536,
10271,
815,
4364,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
def testInstReqOldVer2(self): """ zap-2.0 updates zap-1.0, but zap-2.0 needs barlib-2.0 provided by bar-2.0, but the installed foo, needs barlib-1.0, so it need to be updated to foo-2.0, that requires barlib-2.0 But it only work if foo-1.0 -> foo-2.0 is added as an update, it is not pulled in by it self. FIXME: This test case will fail for now """ ipo1 = self.instPackage('foo', '1') ipo1.addRequires('barlib', 'EQ', ('0', '1', '0')) ipo2 = self.instPackage('bar', '1') ipo2.addProvides('barlib', 'EQ', ('0', '1', '0')) ipo3 = self.instPackage('zap', '1') po1 = self.repoPackage('foo', '2') po1.addRequires('barlib', 'EQ', ('0', '2', '0')) po2 = self.repoPackage('bar', '2') po2.addProvides('barlib', 'EQ', ('0', '2', '0')) po3 = self.repoPackage('zap', '2') po3.addRequires('barlib', 'EQ', ('0', '2', '0')) self.tsInfo.addUpdate(po3, oldpo=ipo3) self.assertEquals('ok', *self.resolveCode(skip=True)) self.assertResult([po1,po2,po3]) | def testInstReqOldVer2(self): """ zap-2.0 updates zap-1.0, but zap-2.0 needs barlib-2.0 provided by bar-2.0, but the installed foo, needs barlib-1.0, so it need to be updated to foo-2.0, that requires barlib-2.0 But it only work if foo-1.0 -> foo-2.0 is added as an update, it is not pulled in by it self. FIXME: This test case will fail for now """ ipo1 = self.instPackage('foo', '1') ipo1.addRequires('barlib', 'EQ', ('0', '1', '0')) ipo2 = self.instPackage('bar', '1') ipo2.addProvides('barlib', 'EQ', ('0', '1', '0')) ipo3 = self.instPackage('zap', '1') po1 = self.repoPackage('foo', '2') po1.addRequires('barlib', 'EQ', ('0', '2', '0')) po2 = self.repoPackage('bar', '2') po2.addProvides('barlib', 'EQ', ('0', '2', '0')) po3 = self.repoPackage('zap', '2') po3.addRequires('barlib', 'EQ', ('0', '2', '0')) #self.tsInfo.addUpdate(po1, oldpo=ipo1) # why is this needed, it should work without ? self.tsInfo.addUpdate(po3, oldpo=ipo3) self.assertEquals('ok', *self.resolveCode(skip=True)) self.assertResult([po1,po2,po3]) | a71482d1f45a2dfa531fedbef16dd3c7ffc7c607 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5445/a71482d1f45a2dfa531fedbef16dd3c7ffc7c607/skipbroken-tests.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
10773,
6113,
7617,
3945,
22,
12,
2890,
4672,
3536,
11419,
17,
22,
18,
20,
4533,
11419,
17,
21,
18,
20,
16,
1496,
11419,
17,
22,
18,
20,
4260,
4653,
2941,
17,
22,
18,
20,
2112,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
10773,
6113,
7617,
3945,
22,
12,
2890,
4672,
3536,
11419,
17,
22,
18,
20,
4533,
11419,
17,
21,
18,
20,
16,
1496,
11419,
17,
22,
18,
20,
4260,
4653,
2941,
17,
22,
18,
20,
2112,
... | |
self.god.stub_function(os.path, "abspath") | def setUp(self): # create god self.god = mock.mock_god() | 5a090a051ac82d1d29a529851b1fb0af310c94d1 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12268/5a090a051ac82d1d29a529851b1fb0af310c94d1/autotest_unittest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
24292,
12,
2890,
4672,
468,
752,
314,
369,
365,
18,
75,
369,
273,
5416,
18,
22851,
67,
75,
369,
1435,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
24292,
12,
2890,
4672,
468,
752,
314,
369,
365,
18,
75,
369,
273,
5416,
18,
22851,
67,
75,
369,
1435,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... | |
self.assertEqual(key_set, set([b'a', b'12345678910'])) | self.assertEqual(key_set, set([b'a', b'bytes', b'12345678910'])) | def test_key_methods(self): self.g = gdbm.open(filename, 'c') self.assertEqual(self.g.keys(), []) self.g['a'] = 'b' self.g['12345678910'] = '019237410982340912840198242' self.g[b'bytes'] = b'data' key_set = set(self.g.keys()) self.assertEqual(key_set, set([b'a', b'12345678910'])) self.assert_(b'a' in self.g) self.assertEqual(self.g[b'bytes'], b'data') key = self.g.firstkey() while key: self.assert_(key in key_set) key_set.remove(key) key = self.g.nextkey(key) self.assertRaises(KeyError, lambda: self.g['xxx']) | c88823558064c32d876ffdb96b87b4a481822ee2 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8125/c88823558064c32d876ffdb96b87b4a481822ee2/test_dbm_gnu.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
856,
67,
5163,
12,
2890,
4672,
365,
18,
75,
273,
314,
1966,
81,
18,
3190,
12,
3459,
16,
296,
71,
6134,
365,
18,
11231,
5812,
12,
2890,
18,
75,
18,
2452,
9334,
5378,
13,
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,
1842,
67,
856,
67,
5163,
12,
2890,
4672,
365,
18,
75,
273,
314,
1966,
81,
18,
3190,
12,
3459,
16,
296,
71,
6134,
365,
18,
11231,
5812,
12,
2890,
18,
75,
18,
2452,
9334,
5378,
13,
3... |
defined by the `edges` argument. If many cliques are formed by | defined by the 'edges' argument. If many cliques are formed by | def kcliquesByEdges(edges, k): """Generate k-cliques from edges. Generator function that generates a list of cliques of size k in the order they are formed when edges are added in the order defined by the `edges` argument. If many cliques are formed by adding one edge, the order of the cliques is arbitrary. This generator will pass through any EvaluationEvent objects that are passed to it in the `edges`. Parameters ---------- edges : iterable with elements (node_1, node_2, weight) The edges that form the network. `edges` may also contain EvaluationEvent objects, which are simply passed through. k : int The function returns `k`-cliques, that is, induced full subnets of `k` nodes. Yield ----- kclique : KClique object When a new k-clique is formed, it is returned as a KClique object. Notes ----- If an edge is included in `edges` multiple times, the all k-cliques in the network constructed do far will be returned every time. Most of the time this is not what is wanted, so take care not the supply multiple edges. (LK 31.7.2009) """ newNet=pynet.SymmNet() # Edges are added to an empty network one by one for edge in edges: if isinstance(edge, EvaluationEvent): yield edge else: # First we find all new triangles that are born when the new edge is added triangleEnds=set() # We keep track of the tip nodes of the new triangles for adjacentNode in newNet[edge[0]]: # Neighbor of one node of the edge ... if newNet[adjacentNode,edge[1]] != 0: #...is a neighbor of the other node of the edge... triangleEnds.add(adjacentNode) #...then the neighbor is a tip of a new triangle # New k-cliques are now (k-2)-cliques at the triangle end points plus # the two nodes at the tips of the edge we are adding to the network for kclique in kcliquesAtSubnet(triangleEnds,newNet,k-2): yield kclique+KClique([edge[0],edge[1]]) newNet[edge[0],edge[1]]=edge[2] # Finally we add the new edge to the network | aedcbc095d687b4ff7e65010866f483adf54eb65 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/768/aedcbc095d687b4ff7e65010866f483adf54eb65/percolator.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
417,
4857,
29896,
858,
10697,
12,
8746,
16,
417,
4672,
3536,
4625,
417,
17,
4857,
29896,
628,
5231,
18,
225,
10159,
445,
716,
6026,
279,
666,
434,
4942,
29896,
434,
963,
417,
316,
326,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
417,
4857,
29896,
858,
10697,
12,
8746,
16,
417,
4672,
3536,
4625,
417,
17,
4857,
29896,
628,
5231,
18,
225,
10159,
445,
716,
6026,
279,
666,
434,
4942,
29896,
434,
963,
417,
316,
326,
... |
if not len(jobList) == 1: msg = " Cannot get BOSS task information for %s\n" % jobSpecId msg += " This job has not been submitted or has finished\n" msg += " Any case, it will not be resubmitted" logging.error(msg) raise JobNotSubmittedException, msg job = jobList[0] except (SchedulerError, DbError), err: msg = "Cannot get information for task %s, BOSS error: %s" % \ | except BossLiteError, err: msg = "Cannot get information for job %s, BOSS error: %s" % \ | def killJob(self, jobSpecId, erase=False): """ | 816c7c30814438d8c9489740376256b3aef8ff85 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8887/816c7c30814438d8c9489740376256b3aef8ff85/BossLiteKiller.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8673,
2278,
12,
2890,
16,
1719,
1990,
548,
16,
22038,
33,
8381,
4672,
3536,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8673,
2278,
12,
2890,
16,
1719,
1990,
548,
16,
22038,
33,
8381,
4672,
3536,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
if self.verbose>2: | if self.verbose>1: | def c_src_callkernel(self, node, nodename): # # This function serves three main goals: # # The first is stride unpacking: # it accepts input and output arguments as # float * , int* # pairs, and it constructs a kernel function call where inputs and arguments are named # like # float *, int, int, int ... # # The second is to recognize when trailing (right-most in numpy) dimensions can be collapsed as # being contiguous... (confusing... read code) # # The thrid is to make a special case for scalar element. We allow the collapsing of them. # In the ccontiguous and not contiguous case, we use registers to lower the number of memory access. | 36786abeff51a6a0001aa5e3eff879f3e04bfd25 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12438/36786abeff51a6a0001aa5e3eff879f3e04bfd25/elemwise.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
276,
67,
4816,
67,
1991,
8111,
12,
2890,
16,
756,
16,
14003,
1069,
4672,
468,
468,
1220,
445,
26255,
8925,
2774,
1960,
1031,
30,
468,
468,
1021,
1122,
353,
11084,
6167,
310,
30,
468,
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,
276,
67,
4816,
67,
1991,
8111,
12,
2890,
16,
756,
16,
14003,
1069,
4672,
468,
468,
1220,
445,
26255,
8925,
2774,
1960,
1031,
30,
468,
468,
1021,
1122,
353,
11084,
6167,
310,
30,
468,
5... |
if errs: | if errs: | def test(self): self.state = 'testing' self.logfile = os.path.join(self.logdir, self.name+"-test.xml") remove_file(self.logfile) pmess("TEST",self.name,self.blddir) ok, errs = self._test() if errs: cprint('YELLOW', "%s OK, %s FAIL" % (ok, errs)) else: cprint('GREEN', "%s OK" % ok) return ok, errs | 8686567b97c375cd0139ecb4d70441b115ada507 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5963/8686567b97c375cd0139ecb4d70441b115ada507/build_packages.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
12,
2890,
4672,
365,
18,
2019,
273,
296,
3813,
310,
11,
365,
18,
28806,
273,
1140,
18,
803,
18,
5701,
12,
2890,
18,
1330,
1214,
16,
365,
18,
529,
9078,
17,
3813,
18,
2902,
7923... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
12,
2890,
4672,
365,
18,
2019,
273,
296,
3813,
310,
11,
365,
18,
28806,
273,
1140,
18,
803,
18,
5701,
12,
2890,
18,
1330,
1214,
16,
365,
18,
529,
9078,
17,
3813,
18,
2902,
7923... |
('RenamePlaylist', None, menubar.getLabel('RenamePlaylist'), menubar.getShortcut('RenamePlaylist').GTKString(), None, self.on_rename_playlist_activate), | ('RenamePlaylist', None, _(menubar.getLabel('RenamePlaylist')), menubar.getShortcut('RenamePlaylist').GTKString(), None, self.on_rename_playlist_activate), | def actionGroups (self): confirmMainThread() actionGroups = {} actionGroups["VideoSelected"] = gtk.ActionGroup("VideoSelected") actionGroups["VideosSelected"] = gtk.ActionGroup("VideosSelected") actionGroups["VideoPlaying"] = gtk.ActionGroup("VideoPlaying") actionGroups["VideoPlayable"] = gtk.ActionGroup("VideoPlayable") actionGroups["ChannelSelected"] = gtk.ActionGroup("ChannelSelected") actionGroups["ChannelsSelected"] = gtk.ActionGroup("ChannelsSelected") actionGroups["ChannelFolderSelected"] = gtk.ActionGroup("ChannelFolderSelected") actionGroups["ChannelLikeSelected"] = gtk.ActionGroup("ChannelLikeSelected") actionGroups["ChannelLikesSelected"] = gtk.ActionGroup("ChannelLikesSelected") actionGroups["PlaylistLikeSelected"] = gtk.ActionGroup("PlaylistLikeSelected") actionGroups["PlaylistLikesSelected"] = gtk.ActionGroup("PlaylistLikesSelected") actionGroups["Ubiquitous"] = gtk.ActionGroup("Ubiquitous") | 02b643760c3610b49adef3a30a46f9e196a9b641 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12354/02b643760c3610b49adef3a30a46f9e196a9b641/callbackhandler.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1301,
3621,
261,
2890,
4672,
6932,
6376,
3830,
1435,
1301,
3621,
273,
2618,
1301,
3621,
9614,
10083,
7416,
11929,
273,
22718,
18,
1803,
1114,
2932,
10083,
7416,
7923,
1301,
3621,
9614,
58,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1301,
3621,
261,
2890,
4672,
6932,
6376,
3830,
1435,
1301,
3621,
273,
2618,
1301,
3621,
9614,
10083,
7416,
11929,
273,
22718,
18,
1803,
1114,
2932,
10083,
7416,
7923,
1301,
3621,
9614,
58,
... |
for s in self.sessions: | for s in self.sessions[:]: | def _dispatch_message(self, session, message): for s in self.sessions: if s is not session: try: # TODO: add the chunk to the other session's queue s.send_message(message.data, message.content_type) except: import traceback traceback.print_exc() | 86486162e8822068c3835c02e4ea7cd8afd6a0ba /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3449/86486162e8822068c3835c02e4ea7cd8afd6a0ba/chatroom.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
10739,
67,
2150,
12,
2890,
16,
1339,
16,
883,
4672,
364,
272,
316,
365,
18,
16794,
10531,
14542,
309,
272,
353,
486,
1339,
30,
775,
30,
468,
2660,
30,
527,
326,
2441,
358,
326,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
10739,
67,
2150,
12,
2890,
16,
1339,
16,
883,
4672,
364,
272,
316,
365,
18,
16794,
10531,
14542,
309,
272,
353,
486,
1339,
30,
775,
30,
468,
2660,
30,
527,
326,
2441,
358,
326,
... |
"It's mandatory only when dealing with CVS, and used but " "not required with SVN, but since it's used in " "the description of the target repository, you " "are encouraged to give it a value with darcs too."), | "This has different meanings under the various upstream " "systems: with CVS it indicates the module, while under " "SVN it's the prefix of the tree you want and must begin " "with a slash. Since it's used in the description of the " "target repository, you may want to give it a value with " "darcs too even if it is otherwise ignored."), | def update(self, single_commit, concatenate_logs): """ Update an existing tailorized project. | 6880e00258c7ec1e1ae2ba1ef3ce4d55ad792af4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5981/6880e00258c7ec1e1ae2ba1ef3ce4d55ad792af4/tailor.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
12,
2890,
16,
2202,
67,
7371,
16,
11361,
67,
10011,
4672,
3536,
2315,
392,
2062,
5798,
280,
1235,
1984,
18,
2,
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,
1089,
12,
2890,
16,
2202,
67,
7371,
16,
11361,
67,
10011,
4672,
3536,
2315,
392,
2062,
5798,
280,
1235,
1984,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
gnucap += ".print dc + v(%s) i(%s)\n" %(gnucap_name, gnucap_name) return gnucap | return [gnucap, ".print dc + v(%s) i(%s)\n" %(gnucap_name, gnucap_name)] | def to_gnucap_res(self, gnucap_name, node_id1, node_id2, gnucap_value): # Ignore the component if there is some unconnected nodes. for i in (node_id1, node_id2): node = self.nodes[i] if not node.get_wires(): gnucap = "* %s: component ignored: not connected\n" %(gnucap_name) return gnucap | 13ee6c41f57e9506834260f5eae4b05b66b6faeb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11306/13ee6c41f57e9506834260f5eae4b05b66b6faeb/electric.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
358,
67,
1600,
5286,
438,
67,
455,
12,
2890,
16,
22908,
5286,
438,
67,
529,
16,
756,
67,
350,
21,
16,
756,
67,
350,
22,
16,
22908,
5286,
438,
67,
1132,
4672,
468,
8049,
326,
1794,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
358,
67,
1600,
5286,
438,
67,
455,
12,
2890,
16,
22908,
5286,
438,
67,
529,
16,
756,
67,
350,
21,
16,
756,
67,
350,
22,
16,
22908,
5286,
438,
67,
1132,
4672,
468,
8049,
326,
1794,
... |
d.category_view.setCurrentIndex(d.category_view.model().index(2)) | d.category_view.setCurrentIndex(d.category_view.model().index(0)) | def check_done(self, bad, err): if err: error_dialog(self, _('Error'), _('Failed to check database integrity'), det_msg=err, show=True) elif bad: titles = [self.db.title(x, index_is_id=True) for x in bad] det_msg = '\n'.join(titles) warning_dialog(self, _('Some inconsistencies found'), _('The following books had formats listed in the ' 'database that are not actually available. ' 'The entries for the formats have been removed. ' 'You should check them manually. This can ' 'happen if you manipulate the files in the ' 'library folder directly.'), det_msg=det_msg, show=True) self.reset() | b3de4fa7b1af80acd9dbdaa9a7ed242fabe97c3a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9125/b3de4fa7b1af80acd9dbdaa9a7ed242fabe97c3a/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
67,
8734,
12,
2890,
16,
5570,
16,
393,
4672,
309,
393,
30,
555,
67,
12730,
12,
2890,
16,
389,
2668,
668,
19899,
389,
2668,
2925,
358,
866,
2063,
24425,
19899,
3023,
67,
3576,
33,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
67,
8734,
12,
2890,
16,
5570,
16,
393,
4672,
309,
393,
30,
555,
67,
12730,
12,
2890,
16,
389,
2668,
668,
19899,
389,
2668,
2925,
358,
866,
2063,
24425,
19899,
3023,
67,
3576,
33,
... |
if 0 : buildPackage( "directx", | if 1 : buildPackage( "directx", | def buildPackage(name, uri, checkVersion, downloadUri, tarballName, buildCommand, srcdir=None, deps="", pinnedVersion = None, ) : print "Module:", name subst = dict( sandbox = sandbox, prefix = prefix, target = target, sfmirror = sfmirror, apachemirror = apachemirror, name = name, pinned = pinnedVersion if pinnedVersion else "None", ) availableVersion = output(checkVersion).strip() availableVersion or die("No online version found for the package\n Command used:\n%s" % checkVersion) print "Found version: '%s'" % availableVersion if (pinnedVersion and pinnedVersion != availableVersion) : warning("Package: Pinning to version %s, although version %s is available" % (pinnedVersion, availableVersion)) version = pinnedVersion if pinnedVersion else availableVersion subst.update ( version = version, majorversion = ".".join(version.split(".")[:1]), minorversion = ".".join(version.split(".")[:2]), ) subst.update( tarball = tarballName % subst, srcdir = ("%(sandbox)s/src/" + (srcdir or "%(name)s-%(version)s/")) % subst, ) print "srcdir:", subst['srcdir'] download(downloadUri % subst) extractSource(subst['tarball']) patches = glob.glob(scriptRelative("mingw-"+name+"*")) patches.sort() print patches for patch in patches : applyPatch(subst['srcdir'], patch, level=1) run(buildCommand % subst) | 9516624bdaf457fb48cb287da6115af5d509bbca /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1456/9516624bdaf457fb48cb287da6115af5d509bbca/setup_mingw.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1361,
2261,
12,
529,
16,
2003,
16,
866,
1444,
16,
4224,
3006,
16,
29441,
461,
16,
1361,
2189,
16,
1705,
1214,
33,
7036,
16,
8740,
1546,
3113,
26193,
1444,
273,
599,
16,
262,
294,
1172,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1361,
2261,
12,
529,
16,
2003,
16,
866,
1444,
16,
4224,
3006,
16,
29441,
461,
16,
1361,
2189,
16,
1705,
1214,
33,
7036,
16,
8740,
1546,
3113,
26193,
1444,
273,
599,
16,
262,
294,
1172,... |
p3a = new_with_vtable(ConstClass(node_vtable)) escape(p3a) setfield_gc(p3, p2, descr=otherdescr) jump(p2a, p3a) """ expected = """ [p2, p3] guard_class(p2, ConstClass(node_vtable)) [] guard_class(p3, ConstClass(node_vtable)) [] | def test_bug_3(self): ops = """ [p1] guard_nonnull(p1) [] guard_class(p1, ConstClass(node_vtable2)) [] p2 = getfield_gc(p1, descr=nextdescr) guard_nonnull(12) [] guard_class(p2, ConstClass(node_vtable)) [] p3 = getfield_gc(p1, descr=otherdescr) guard_nonnull(12) [] guard_class(p3, ConstClass(node_vtable)) [] setfield_gc(p3, p2, descr=otherdescr) p1a = new_with_vtable(ConstClass(node_vtable2)) p2a = new_with_vtable(ConstClass(node_vtable)) p3a = new_with_vtable(ConstClass(node_vtable)) escape(p3a) setfield_gc(p1a, p2a, descr=nextdescr) setfield_gc(p1a, p3a, descr=otherdescr) jump(p1a) """ preamble = """ [p1] guard_nonnull(p1) [] guard_class(p1, ConstClass(node_vtable2)) [] p2 = getfield_gc(p1, descr=nextdescr) guard_class(p2, ConstClass(node_vtable)) [] p3 = getfield_gc(p1, descr=otherdescr) guard_class(p3, ConstClass(node_vtable)) [] p3a = new_with_vtable(ConstClass(node_vtable)) escape(p3a) setfield_gc(p3, p2, descr=otherdescr) jump(p2a, p3a) """ expected = """ [p2, p3] guard_class(p2, ConstClass(node_vtable)) [] guard_class(p3, ConstClass(node_vtable)) [] setfield_gc(p3, p2, descr=otherdescr) p3a = new_with_vtable(ConstClass(node_vtable)) escape(p3a) p2a = new_with_vtable(ConstClass(node_vtable)) jump(p2a, p3a) """ self.optimize_loop(ops, expected) # XXX Virtual(node_vtable2, nextdescr=Not, otherdescr=Not) | 893f08b60e03797cab81954ee504e9e6db0b6642 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6934/893f08b60e03797cab81954ee504e9e6db0b6642/test_optimizeopt.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
925,
67,
23,
12,
2890,
4672,
6727,
273,
3536,
306,
84,
21,
65,
11026,
67,
5836,
2011,
12,
84,
21,
13,
5378,
11026,
67,
1106,
12,
84,
21,
16,
9333,
797,
12,
2159,
67,
90,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
925,
67,
23,
12,
2890,
4672,
6727,
273,
3536,
306,
84,
21,
65,
11026,
67,
5836,
2011,
12,
84,
21,
13,
5378,
11026,
67,
1106,
12,
84,
21,
16,
9333,
797,
12,
2159,
67,
90,
... | |
d = client.do_task("foo", "bar") print "DUDE:", d | t1 = Task("foo", "bar", on_complete=lambda res:sys.stdout.write("bar: %s\n" % res)) t2 = Task("foo", "pie", on_complete=lambda res:sys.stdout.write("pie: %s\n" % res)) ts = Taskset( [t1, t2] ) client.do_taskset( ts ) for t in ts.itervalues(): print "DUDE:", t.result | def _command_handler(conn, cmd, args): _D( "HANDLING:", cmd, args ) if cmd != 'job_created': task = taskset.get( taskset.handles.get( args.get('handle', None), None), None) if not task or task.is_finished: raise self.CommandDupe if cmd == 'work_complete': task.is_finished = True task.result = args['result'] task.on_complete( args['result'] ) elif cmd == 'work_fail': task.is_finished = True task.on_fail() elif cmd == 'work_status': task.on_status(int(args['numerator']), int(args['denominator'])) elif cmd == 'job_created': handle = args['handle'] task = conn.waiting_for_handles.pop() task.handle = handle taskset.handles[handle] = task_hash elif cmd == 'error': raise self.CommandError(str(args)) # TODO make better | 83db44ffe7277f6d68ca153766fe4f8947e8c62f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/14772/83db44ffe7277f6d68ca153766fe4f8947e8c62f/sync.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3076,
67,
4176,
12,
4646,
16,
1797,
16,
833,
4672,
389,
40,
12,
315,
12346,
26789,
2773,
16,
1797,
16,
833,
262,
225,
309,
1797,
480,
296,
4688,
67,
4824,
4278,
1562,
273,
1562,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3076,
67,
4176,
12,
4646,
16,
1797,
16,
833,
4672,
389,
40,
12,
315,
12346,
26789,
2773,
16,
1797,
16,
833,
262,
225,
309,
1797,
480,
296,
4688,
67,
4824,
4278,
1562,
273,
1562,
... |
if similarity >= self.threshold: | if similarity >= threshold: | def search(self, query): """Get items from the index that share some N-grams with the query and meet the similaroty threshold. @param query: Item to match against the candidate items. | 3494fa39678f2e5bc57cacb7df60645ab385db6a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12095/3494fa39678f2e5bc57cacb7df60645ab385db6a/ngram.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1623,
12,
2890,
16,
843,
4672,
3536,
967,
1516,
628,
326,
770,
716,
7433,
2690,
423,
17,
28854,
598,
326,
843,
471,
18721,
326,
7281,
352,
93,
5573,
18,
225,
632,
891,
843,
30,
4342,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1623,
12,
2890,
16,
843,
4672,
3536,
967,
1516,
628,
326,
770,
716,
7433,
2690,
423,
17,
28854,
598,
326,
843,
471,
18721,
326,
7281,
352,
93,
5573,
18,
225,
632,
891,
843,
30,
4342,
... |
query = '%s.%s IS NOT NULL and %s.%s != false' % (table._table, left,table._table, left) | query = '(%s.%s IS NOT NULL and %s.%s != false)' % (table._table, left,table._table, left) | def __leaf_to_sql(self, leaf, table): if leaf == self.__DUMMY_LEAF: return ('(1=1)', []) left, operator, right = leaf | 4a966c47e13d409b6b05994cd08ac6d23b1a8c73 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/4a966c47e13d409b6b05994cd08ac6d23b1a8c73/expression.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
12070,
67,
869,
67,
4669,
12,
2890,
16,
7839,
16,
1014,
4672,
309,
7839,
422,
365,
16186,
40,
2799,
22114,
67,
900,
6799,
30,
327,
7707,
12,
21,
33,
21,
13,
2187,
5378,
13,
200... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1001,
12070,
67,
869,
67,
4669,
12,
2890,
16,
7839,
16,
1014,
4672,
309,
7839,
422,
365,
16186,
40,
2799,
22114,
67,
900,
6799,
30,
327,
7707,
12,
21,
33,
21,
13,
2187,
5378,
13,
200... |
self._colorize_str(pyval, state, 'u', 'unicode-escape') | if self.ESCAPE_UNICODE: self._colorize_str(pyval, state, 'u', 'unicode-escape') else: self._colorize_str(pyval, state, 'u', None) | def _colorize(self, pyval, state): pyval_type = type(pyval) state.score += 1 if pyval is None or pyval is True or pyval is False: self._output(unicode(pyval), self.CONST_TAG, state) elif pyval_type in (int, float, long, types.ComplexType): self._output(unicode(pyval), self.NUMBER_TAG, state) elif pyval_type is str: self._colorize_str(pyval, state, '', 'string-escape') elif pyval_type is unicode: self._colorize_str(pyval, state, 'u', 'unicode-escape') elif pyval_type is list: self._multiline(self._colorize_iter, pyval, state, '[', ']') elif pyval_type is tuple: self._multiline(self._colorize_iter, pyval, state, '(', ')') elif pyval_type is set: self._multiline(self._colorize_iter, self._sort(pyval), state, 'set([', '])') elif pyval_type is frozenset: self._multiline(self._colorize_iter, self._sort(pyval), state, 'frozenset([', '])') elif pyval_type is dict: self._multiline(self._colorize_dict, self._sort(pyval.items()), state, '{', '}') elif is_re_pattern(pyval): self._colorize_re(pyval, state) else: try: pyval_repr = repr(pyval) if not isinstance(pyval_repr, (str, unicode)): pyval_repr = unicode(pyval_repr) pyval_repr_ok = True except KeyboardInterrupt: raise except: pyval_repr_ok = False state.score -= 100 | c0879f3b9ca18a7a5b57a0e46723c3ce3d399c17 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3512/c0879f3b9ca18a7a5b57a0e46723c3ce3d399c17/pyval_repr.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3266,
554,
12,
2890,
16,
2395,
1125,
16,
919,
4672,
2395,
1125,
67,
723,
273,
618,
12,
2074,
1125,
13,
919,
18,
6355,
1011,
404,
225,
309,
2395,
1125,
353,
599,
578,
2395,
1125,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3266,
554,
12,
2890,
16,
2395,
1125,
16,
919,
4672,
2395,
1125,
67,
723,
273,
618,
12,
2074,
1125,
13,
919,
18,
6355,
1011,
404,
225,
309,
2395,
1125,
353,
599,
578,
2395,
1125,
... |
if value == "": return | return | def setText(self, value, **kwargs): """Body text mutator | c31def2a01340af5f8e9d93c13ca7577e8da26ca /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11956/c31def2a01340af5f8e9d93c13ca7577e8da26ca/ATDocument.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7883,
12,
2890,
16,
460,
16,
2826,
4333,
4672,
3536,
2250,
977,
29156,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
7883,
12,
2890,
16,
460,
16,
2826,
4333,
4672,
3536,
2250,
977,
29156,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
function, values = node.items()[0] | function, params = node.items()[0] | def process_function(self, node): function, values = node.items()[0] if self.isnoupdate(function) and self.mode != 'init': return context = self.get_context(function, self.eval_context) args = [] if function.eval: args = eval(function.eval, self.eval_context) for value in values: if not 'model' in value and (not 'eval' in value or not 'search' in value): raise YamlImportException('You must provide a "model" and an "eval" or "search" to evaluate.') value_model = self.get_model(value['model']) local_context = {'obj': lambda x: value_model.browse(self.cr, self.uid, x, context=context)} local_context.update(self.id_map) id = eval(value['eval'], self.eval_context, local_context) if id != None: args.append(id) model = self.get_model(function.model) method = function.name getattr(model, method)(self.cr, self.uid, *args) | 60cd823fa36df6749813124441c9c36d3eb493a7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/60cd823fa36df6749813124441c9c36d3eb493a7/yaml_import.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
67,
915,
12,
2890,
16,
756,
4672,
445,
16,
859,
273,
756,
18,
3319,
1435,
63,
20,
65,
309,
365,
18,
291,
2135,
2725,
12,
915,
13,
471,
365,
18,
3188,
480,
296,
2738,
4278,
32... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
67,
915,
12,
2890,
16,
756,
4672,
445,
16,
859,
273,
756,
18,
3319,
1435,
63,
20,
65,
309,
365,
18,
291,
2135,
2725,
12,
915,
13,
471,
365,
18,
3188,
480,
296,
2738,
4278,
32... |
if shouldround: | if context._rounding_decision == ALWAYS_ROUND: | def __pow__(self, n, modulo = None, context=None): """Return self ** n (mod modulo) | 8ba896ad541ea1d2fc9fe67ed0a591eccacd10c5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/8ba896ad541ea1d2fc9fe67ed0a591eccacd10c5/decimal.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
23509,
972,
12,
2890,
16,
290,
16,
26109,
273,
599,
16,
819,
33,
7036,
4672,
3536,
990,
365,
2826,
290,
261,
1711,
26109,
13,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
23509,
972,
12,
2890,
16,
290,
16,
26109,
273,
599,
16,
819,
33,
7036,
4672,
3536,
990,
365,
2826,
290,
261,
1711,
26109,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
self._jmim.w = w | self._m.w = w | def setAlgebraics(self, w): self._jmim.w = w | 733964346bd705d3e3fa78795693f8a99289c936 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7711/733964346bd705d3e3fa78795693f8a99289c936/shooting.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
1067,
29087,
2102,
12,
2890,
16,
341,
4672,
365,
6315,
81,
18,
91,
273,
341,
225,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
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,
444,
1067,
29087,
2102,
12,
2890,
16,
341,
4672,
365,
6315,
81,
18,
91,
273,
341,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
cmd = 'cd "%s"; ln -sf "%s"/* .'%(build_dir, abs_base) os.system(cmd) | if not os.path.exists("%s/sage" % abs_base) and not os.path.exists("%s/c_lib" % abs_base): cmd = 'cd "%s"; ln -sf "%s"/* .'%(build_dir, abs_base) os.system(cmd) if os.path.exists("%s/setup.py" % build_dir): os.unlink("%s/setup.py" % build_dir) | def cython(filename, verbose=False, compile_message=False, use_cache=False, create_local_c_file=False, annotate=True, sage_namespace=True, create_local_so_file=False): if not filename.endswith('pyx'): print "File (=%s) should have extension .pyx"%filename # base is the name of the .so module that we create. If we are # creating a local shared object file, we use a more natural # naming convention. If we are not creating a local shared object # file, the main constraint is that it is unique and determined by # the file that we're running Cython on, so that in some cases we # can cache the result (e.g., recompiling the same pyx file during # the same session). if create_local_so_file: base, ext = os.path.splitext(os.path.basename(filename)) base = sanitize(base) else: base = sanitize(os.path.abspath(filename)) # This is the *temporary* directory where we build the pyx file. # This is deleted when sage exits, which means pyx files must be # rebuilt every time Sage is restarted at present. build_dir = '%s/%s'%(SPYX_TMP, base) if os.path.exists(build_dir): # There is already a module here. Maybe we do not have to rebuild? # Find the name. if use_cache: prev_so = [F for F in os.listdir(build_dir) if F[-3:] == '.so'] if len(prev_so) > 0: prev_so = prev_so[0] # should have length 1 because of deletes below if os.path.getmtime(filename) <= os.path.getmtime('%s/%s'%(build_dir, prev_so)): # We do not have to rebuild. return prev_so[:-3], build_dir else: os.makedirs(build_dir) for F in os.listdir(build_dir): G = '%s/%s'%(build_dir,F) try: if not os.path.isdir(G): os.unlink(G) except OSError: pass # Get the absolute path to the directory that contains the pyx file. # We will use this only to make some convenient symbolic links. abs_base = os.path.split(os.path.abspath(filename))[0] cmd = 'cd "%s"; ln -sf "%s"/* .'%(build_dir, abs_base) os.system(cmd) if compile_message: print "Compiling %s..."%filename F = open(filename).read() F, libs, includes, language, additional_source_files = pyx_preparse(F) # add the working directory to the includes so custom headers etc. work includes.append(os.path.split(os.path.splitext(filename)[0])[0]) if language == 'c++': extension = "cpp" else: extension = "c" if create_local_so_file: name = base else: global sequence_number if not sequence_number.has_key(base): sequence_number[base] = 0 name = '%s_%s'%(base, sequence_number[base]) # increment the sequence number so will use a different one next time. sequence_number[base] += 1 additional_source_files = ",".join(["'"+os.path.abspath(os.curdir)+"/"+fname+"'" \ for fname in additional_source_files]) pyx = '%s/%s.pyx'%(build_dir, name) open(pyx,'w').write(F) setup=""" | 9b4ad1ccdf984eeea5c88daf3e4db2cfeb4e613b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/9b4ad1ccdf984eeea5c88daf3e4db2cfeb4e613b/cython.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6143,
3041,
12,
3459,
16,
3988,
33,
8381,
16,
4074,
67,
2150,
33,
8381,
16,
999,
67,
2493,
33,
8381,
16,
752,
67,
3729,
67,
71,
67,
768,
33,
8381,
16,
13795,
33,
5510,
16,
272,
410... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6143,
3041,
12,
3459,
16,
3988,
33,
8381,
16,
4074,
67,
2150,
33,
8381,
16,
999,
67,
2493,
33,
8381,
16,
752,
67,
3729,
67,
71,
67,
768,
33,
8381,
16,
13795,
33,
5510,
16,
272,
410... |
bound = self.makeBound() | bound = self.makeRandomBound() | def doIntersectingBounds(self, numBounds): self.makeTree(numBounds) numTests = 25 if numBounds: numTests = (int)( math.log10( numBounds ) + 1 ) * 25 for j in range(0, numTests): bound = self.makeBound() bIdxArray = self.tree.intersectingBounds( bound ) for bIdx in bIdxArray: self.assert_(bIdx >= 0) self.assert_(bIdx < numBounds) nearestBound = self.bounds[bIdx] self.assert_( nearestBound.intersects( bound ) ) | 4ad6372a07364aefd9c635be6abf8692f532b8cb /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9042/4ad6372a07364aefd9c635be6abf8692f532b8cb/BoundedKDTree.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
22541,
310,
5694,
12,
2890,
16,
818,
5694,
4672,
225,
365,
18,
6540,
2471,
12,
2107,
5694,
13,
225,
818,
14650,
273,
6969,
309,
818,
5694,
30,
818,
14650,
273,
261,
474,
21433,
42... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
22541,
310,
5694,
12,
2890,
16,
818,
5694,
4672,
225,
365,
18,
6540,
2471,
12,
2107,
5694,
13,
225,
818,
14650,
273,
6969,
309,
818,
5694,
30,
818,
14650,
273,
261,
474,
21433,
42... |
msg = "ERROR: No Resource Control Entry for site: %s" % siteName | msg = "ERROR: No Resource Control Entry for site: %s \n" % siteName | def __call__(self): """ _operator()_ | 47a6028d668fe39b06ffe7da18863c318f75f645 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8887/47a6028d668fe39b06ffe7da18863c318f75f645/SimpleMonitors.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1991,
972,
12,
2890,
4672,
3536,
389,
9497,
1435,
67,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1991,
972,
12,
2890,
4672,
3536,
389,
9497,
1435,
67,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
_self.usb_list.currentRowChanged.connect(self.on_select_device) | _self.usb_list.currentRowChanged.connect(_self.on_select_device) | def create_device_chooser_layout(_self): _self.usb_list = QtGui.QListWidget() _self.usb_list.currentRowChanged.connect(self.on_select_device) | a70e957ae62024bb854ab7edb509c3b57e010d96 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1208/a70e957ae62024bb854ab7edb509c3b57e010d96/ufo_dd.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
67,
5964,
67,
2599,
13164,
67,
6741,
24899,
2890,
4672,
389,
2890,
18,
25525,
67,
1098,
273,
23425,
18,
53,
682,
4609,
1435,
389,
2890,
18,
25525,
67,
1098,
18,
2972,
1999,
5033,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
67,
5964,
67,
2599,
13164,
67,
6741,
24899,
2890,
4672,
389,
2890,
18,
25525,
67,
1098,
273,
23425,
18,
53,
682,
4609,
1435,
389,
2890,
18,
25525,
67,
1098,
18,
2972,
1999,
5033,
... |
application.propagateAsynchronousNotifications() | if not isinstance (sentToWidget, wx.TextCtrl): application.propagateAsynchronousNotifications() | def focusShouldLookLikeNewFocusWindow (focusWindow, newFocusWindow): if type (newFocusWindow) is str: assert focusWindow is NameToWidget (newFocusWindow), "An unexpected window has the focus" else: (theClass, id) = newFocusWindow assert isinstance (focusWindow, theClass), "The window with the focus is of the wrong class" if id > 0: assert focusWindow.GetId() == id, "Focus window has unexpected id" else: assert focusWindow.GetId() < 0, "Focus window has unexpected id" | 3a9d183616c32463233c6f6e68c5a3d1726952b3 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9228/3a9d183616c32463233c6f6e68c5a3d1726952b3/script_lib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7155,
14309,
9794,
8804,
1908,
9233,
3829,
261,
13923,
3829,
16,
394,
9233,
3829,
4672,
309,
618,
261,
2704,
9233,
3829,
13,
353,
609,
30,
1815,
7155,
3829,
353,
1770,
774,
4609,
261,
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,
7155,
14309,
9794,
8804,
1908,
9233,
3829,
261,
13923,
3829,
16,
394,
9233,
3829,
4672,
309,
618,
261,
2704,
9233,
3829,
13,
353,
609,
30,
1815,
7155,
3829,
353,
1770,
774,
4609,
261,
27... |
self._decoded_text = "" self._snapshot = None | self._clear_decoded_text() | def seek(self, cookie, whence=0): if not self._seekable: raise IOError("underlying stream is not seekable") if whence == 1: # seek relative to current position if cookie != 0: raise IOError("can't do nonzero cur-relative seeks") # Seeking to the current position should attempt to # sync the underlying buffer with the current position. whence = 0 cookie = self.tell() if whence == 2: # seek relative to end of file if cookie != 0: raise IOError("can't do nonzero end-relative seeks") self.flush() position = self.buffer.seek(0, 2) self._decoded_text = "" self._snapshot = None if self._decoder: self._decoder.reset() return position if whence != 0: raise ValueError("invalid whence (%r, should be 0, 1 or 2)" % (whence,)) if cookie < 0: raise ValueError("negative seek position %r" % (cookie,)) self.flush() | 420084188486cbed54ef83ecc334c8781c1f1af3 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12029/420084188486cbed54ef83ecc334c8781c1f1af3/io.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6520,
12,
2890,
16,
3878,
16,
23692,
33,
20,
4672,
309,
486,
365,
6315,
16508,
429,
30,
1002,
8340,
2932,
9341,
6291,
1407,
353,
486,
6520,
429,
7923,
309,
23692,
422,
404,
30,
468,
65... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6520,
12,
2890,
16,
3878,
16,
23692,
33,
20,
4672,
309,
486,
365,
6315,
16508,
429,
30,
1002,
8340,
2932,
9341,
6291,
1407,
353,
486,
6520,
429,
7923,
309,
23692,
422,
404,
30,
468,
65... |
if "pause".startswith(cmd.split()[0].lower()): self._paused = not self._paused | def command(self, cmd): """Send a command to MPlayer. | d4e0e399dc13f222a89f851901bf3cccaade9fa8 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12327/d4e0e399dc13f222a89f851901bf3cccaade9fa8/pymplayer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1296,
12,
2890,
16,
1797,
4672,
3536,
3826,
279,
1296,
358,
490,
12148,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1296,
12,
2890,
16,
1797,
4672,
3536,
3826,
279,
1296,
358,
490,
12148,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... | |
Lets try a spline | Let's try a spline. | def list_plot3d(v, interpolation_type='default', texture="automatic", point_list=None,**kwds): """ A 3-dimensional plot of a surface defined by the list $v$ of points in 3-dimensional space. INPUT: v -- something that defines a set of points in 3 space, for example: * a matrix * a list of 3-tuples * a list of lists (all of the same length) -- this is treated the same as a matrix. texture -- (default: "automatic"), solid light blue OPTIONAL KEYWORDS: interpolation_type - 'linear', 'nn' (nearest neighbor), 'spline' 'linear' will perform linear interpolation The option 'nn' will interpolate by averaging the value of the nearest neighbors, this produces an interpolating function that is smoother than a linear interpolation, it has one derivative everywhere except at the sample points. The option 'spline' interpolates using a bivariate B-spline. When v is a matrix the default is to use linear interpolation, when v is a list of points the default is nearest neighbor. degree - an integer between 1 and 5, controls the degree of spline used for spline interpolation. For data that is highly oscillatory use higher values point_list - If point_list=True is passed, then if the array is a list of lists of length three, it will be treated as an array of points rather than a 3xn array. num_points - Number of points to sample interpolating function in each direction. By default for an nxn array this is n. **kwds -- all other arguments are passed to the surface function OUTPUT: a 3d plot EXAMPLES: We plot a matrix that illustrates summation modulo $n$. sage: n = 5; list_plot3d(matrix(RDF,n,[(i+j)%n for i in [1..n] for j in [1..n]])) We plot a matrix of values of sin. sage: pi = float(pi) sage: m = matrix(RDF, 6, [sin(i^2 + j^2) for i in [0,pi/5,..,pi] for j in [0,pi/5,..,pi]]) sage: list_plot3d(m, texture='yellow', frame_aspect_ratio=[1,1,1/3]) Though it doesn't change the shap of the graph, increasing num_points can increase the clarity of the graph sage: list_plot3d(m, texture='yellow', frame_aspect_ratio=[1,1,1/3],num_points=40) We can change the interpolation type sage: list_plot3d(m, texture='yellow', interpolation_type='nn',frame_aspect_ratio=[1,1,1/3]) We can make this look better by increasing the number of samples sage: list_plot3d(m, texture='yellow', interpolation_type='nn',frame_aspect_ratio=[1,1,1/3],num_points=40) Lets try a spline sage: list_plot3d(m, texture='yellow', interpolation_type='spline',frame_aspect_ratio=[1,1,1/3]) That spline doesn't capture the oscillation very well, lets try a higher degree spline sage: list_plot3d(m, texture='yellow', interpolation_type='spline', degree=5, frame_aspect_ratio=[1,1,1/3]) We plot a list of lists: sage: show(list_plot3d([[1, 1, 1, 1], [1, 2, 1, 2], [1, 1, 3, 1], [1, 2, 1, 4]])) We plot a list of points: As a first example we can extract the (x,y,z) coordinates from the above example and make a list plot out of it. By default we do linear interpolation. sage: l=[] sage: for i in range(6): ... for j in range(6): ... l.append((float(i*pi/5),float(j*pi/5),m[i,j])) sage: list_plot3d(l,texture='yellow') Note that the points do not have to be regularly sampled. For example sage: l=[] sage: for i in range(-5,5): ... for j in range(-5,5): ... l.append((normalvariate(0,1),normalvariate(0,1),normalvariate(0,1))) sage: list_plot3d(l,interpolation_type='nn',texture='yellow',num_points=100) TESTS: We plot 0, 1, and 2 points: sage: list_plot3d([]) sage: list_plot3d([(2,3,4)]) sage: list_plot3d([(0,0,1), (2,3,4)]) However, if two points with the same x,y coordinates are given and different z coordinates an exception will be raised sage: pts =[(-4/5, -2/5, -2/5), (-4/5, -2/5, 2/5), (-4/5, 2/5, -2/5), (-4/5, 2/5, 2/5), (-2/5, -4/5, -2/5), (-2/5, -4/5, 2/5), (-2/5, -2/5, -4/5), (-2/5, -2/5, 4/5), (-2/5, 2/5, -4/5), (-2/5, 2/5, 4/5), (-2/5, 4/5, -2/5), (-2/5, 4/5, 2/5), (2/5, -4/5, -2/5), (2/5, -4/5, 2/5), (2/5, -2/5, -4/5), (2/5, -2/5, 4/5), (2/5, 2/5, -4/5), (2/5, 2/5, 4/5), (2/5, 4/5, -2/5), (2/5, 4/5, 2/5), (4/5, -2/5, -2/5), (4/5, -2/5, 2/5), (4/5, 2/5, -2/5), (4/5, 2/5, 2/5)] sage: show(list_plot3d(pts, interpolation_type='nn')) Traceback (most recent call last): ... ValueError: Two points with same x,y coordinates and different z coordinates were given. Interpolation cannot handle this. Additionally we need at least 3 points to do the interpolation sage: pts=[(0,0,0)] sage: show(list_plot3d(pts,interpolation_type='nn')) Traceback (most recent call last): ... ValueError: We need at least 3 points to perform the interpolation """ import numpy if texture == "automatic": texture = "lightblue" if is_Matrix(v): if interpolation_type=='default' or interpolation_type=='linear' and not kwds.has_key('num_points'): return list_plot3d_matrix(v, texture=texture, **kwds) else: l=[] for i in xrange(v.nrows()): for j in xrange(v.ncols()): l.append((i,j,v[i,j])) return list_plot3d_tuples(l,interpolation_type,texture,**kwds) if type(v)==numpy.ndarray: return list_plot3d(matrix(v),interpolation_type,texture,**kwds) if isinstance(v, list): if len(v) == 0: # return empty 3d graphic from base import Graphics3d return Graphics3d() elif len(v) == 1: # return a point from shapes2 import point3d return point3d(v[0], **kwds) elif len(v) == 2: # return a line from shapes2 import line3d return line3d(v, **kwds) elif isinstance(v[0],tuple) or point_list==True and len(v[0]) == 3: return list_plot3d_tuples(v,interpolation_type,texture=texture, **kwds) else: return list_plot3d_array_of_arrays(v, interpolation_type,texture, **kwds) raise TypeError, "v must be a matrix or list" | fa2b506f18cc0b9ea9ece1d8b4480686c054f008 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/fa2b506f18cc0b9ea9ece1d8b4480686c054f008/list_plot3d.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
666,
67,
4032,
23,
72,
12,
90,
16,
12851,
67,
723,
2218,
1886,
2187,
11428,
1546,
5854,
4941,
3113,
1634,
67,
1098,
33,
7036,
16,
636,
25577,
4672,
3536,
432,
890,
17,
31236,
3207,
434... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
666,
67,
4032,
23,
72,
12,
90,
16,
12851,
67,
723,
2218,
1886,
2187,
11428,
1546,
5854,
4941,
3113,
1634,
67,
1098,
33,
7036,
16,
636,
25577,
4672,
3536,
432,
890,
17,
31236,
3207,
434... |
self._logger.addHandler(logging.StreamHandler()) | if not self._logger.handlers: self._logger.addHandler(logging.StreamHandler()) | def __init__(self): | 0e88eab9f635e06c92326e32860c0f2af63b1336 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/0e88eab9f635e06c92326e32860c0f2af63b1336/RepositoryView.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
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,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
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,
-1... |
dbg ("VSGConf: profile '%s' not found, but 'Default' exists"%profile) | dbg (" VSGConf: profile '%s' not found, but 'Default' exists"%profile) | def __init__ (self, profile = None): self.type = "GConf" | 97fddf31bc2ef801dda7a7eeec7896241ab0c044 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6502/97fddf31bc2ef801dda7a7eeec7896241ab0c044/terminatorconfig.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
261,
2890,
16,
3042,
273,
599,
4672,
365,
18,
723,
273,
315,
43,
3976,
6,
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,
1001,
2738,
972,
261,
2890,
16,
3042,
273,
599,
4672,
365,
18,
723,
273,
315,
43,
3976,
6,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
if not new is None: | if new is not None: | def name(self, new=None, set_to_none=False): """ Returns the name of the (di)graph. INPUT: new -- if not None, then this becomes the new name of the (di)graph. set_to_none -- if True, removes any name EXAMPLE: sage: d = {0: [1,4,5], 1: [2,6], 2: [3,7], 3: [4,8], 4: [9], 5: [7, 8], 6: [8,9], 7: [9]} sage: G = Graph(d); G Graph on 10 vertices sage: G.name("Petersen Graph"); G 'Petersen Graph' Petersen Graph: Graph on 10 vertices sage: G.name(set_to_none=True); G Graph on 10 vertices | 7d819cbf1df622e9f76b4801233dbb334f44d362 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/7d819cbf1df622e9f76b4801233dbb334f44d362/graph.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
508,
12,
2890,
16,
394,
33,
7036,
16,
444,
67,
869,
67,
6102,
33,
8381,
4672,
3536,
2860,
326,
508,
434,
326,
261,
3211,
13,
4660,
18,
225,
12943,
30,
394,
1493,
309,
486,
599,
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,
508,
12,
2890,
16,
394,
33,
7036,
16,
444,
67,
869,
67,
6102,
33,
8381,
4672,
3536,
2860,
326,
508,
434,
326,
261,
3211,
13,
4660,
18,
225,
12943,
30,
394,
1493,
309,
486,
599,
16,
... |
if isinstance(x, Formula) or x.asList() != None: if self.neededFor[p]!= []: | if isinstance(x, Formula): if self.neededToRun[p]!= []: | def bindNew(self, newBindings): """Take into account new bindings from query processing to date | 9014f1b29ec001a58490a448dc6782aa1860acf4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3308/9014f1b29ec001a58490a448dc6782aa1860acf4/llyn.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1993,
1908,
12,
2890,
16,
394,
10497,
4672,
3536,
13391,
1368,
2236,
394,
7394,
628,
843,
4929,
358,
1509,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1993,
1908,
12,
2890,
16,
394,
10497,
4672,
3536,
13391,
1368,
2236,
394,
7394,
628,
843,
4929,
358,
1509,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
fd = fileutils.open(filename) | fd = open(filename, 'wb') | def anything(prompt, default=None): """Because supybot is pure fail""" from supybot.questions import expect return expect(prompt, [], default=default) | b2193d52ad9353e3581ae854c5da52d2073f1610 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3102/b2193d52ad9353e3581ae854c5da52d2073f1610/config.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6967,
12,
13325,
16,
805,
33,
7036,
4672,
3536,
38,
11884,
1169,
93,
4819,
353,
16618,
2321,
8395,
628,
1169,
93,
4819,
18,
9758,
1930,
4489,
327,
4489,
12,
13325,
16,
5378,
16,
805,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6967,
12,
13325,
16,
805,
33,
7036,
4672,
3536,
38,
11884,
1169,
93,
4819,
353,
16618,
2321,
8395,
628,
1169,
93,
4819,
18,
9758,
1930,
4489,
327,
4489,
12,
13325,
16,
5378,
16,
805,
3... |
if (ASSERT_FLAG && !(${{cvec[0]}})) { | if (!(${{cvec[0]}})) { | def generate(self, code): machine = self.state_machine | b82cf0e60274c75efc3d025539a5934ace46d58b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7385/b82cf0e60274c75efc3d025539a5934ace46d58b/FuncCallExprAST.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2103,
12,
2890,
16,
981,
4672,
5228,
273,
365,
18,
2019,
67,
9149,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2103,
12,
2890,
16,
981,
4672,
5228,
273,
365,
18,
2019,
67,
9149,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
Args: filename: file to modify that is in a git repo already key: board or host package type e.g. x86-dogfood value: string representing the version of the prebuilt that has been uploaded. """ prebuilt_branch = 'prebuilt_branch' old_cwd = os.getcwd() os.chdir(os.path.dirname(filename)) cros_build_lib.RunCommand('repo start %s .' % prebuilt_branch, shell=True) UpdateLocalFile(filename, key, value) description = 'Update BINHOST key/value %s %s' % (key, value) print description git_ssh_config_cmd = ('git config ' 'url.ssh://git@gitrw.chromium.org:9222.pushinsteadof ' 'http://git.chromium.org/git') try: cros_build_lib.RunCommand(git_ssh_config_cmd, shell=True) cros_build_lib.RunCommand('git config push.default tracking', shell=True) cros_build_lib.RunCommand('git commit -am "%s"' % description, shell=True) cros_build_lib.RunCommand('git push', shell=True) finally: cros_build_lib.RunCommand('repo abandon %s .' % prebuilt_branch, shell=True) os.chdir(old_cwd) | def tearDown(self): self.mox.UnsetStubs() self.mox.VerifyAll() | def RevGitFile(filename, key, value): """Update and push the git file. Args: filename: file to modify that is in a git repo already key: board or host package type e.g. x86-dogfood value: string representing the version of the prebuilt that has been uploaded. """ prebuilt_branch = 'prebuilt_branch' old_cwd = os.getcwd() os.chdir(os.path.dirname(filename)) cros_build_lib.RunCommand('repo start %s .' % prebuilt_branch, shell=True) UpdateLocalFile(filename, key, value) description = 'Update BINHOST key/value %s %s' % (key, value) print description git_ssh_config_cmd = ('git config ' 'url.ssh://git@gitrw.chromium.org:9222.pushinsteadof ' 'http://git.chromium.org/git') try: cros_build_lib.RunCommand(git_ssh_config_cmd, shell=True) cros_build_lib.RunCommand('git config push.default tracking', shell=True) cros_build_lib.RunCommand('git commit -am "%s"' % description, shell=True) cros_build_lib.RunCommand('git push', shell=True) finally: cros_build_lib.RunCommand('repo abandon %s .' % prebuilt_branch, shell=True) os.chdir(old_cwd) | 4f33955508ba50045082608b1047ea86854e7297 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/4f33955508ba50045082608b1047ea86854e7297/prebuilt_unittest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
14477,
11540,
812,
12,
3459,
16,
498,
16,
460,
4672,
3536,
1891,
471,
1817,
326,
5071,
585,
18,
225,
1652,
268,
2091,
4164,
12,
2890,
4672,
365,
18,
81,
2409,
18,
13250,
11974,
87,
143... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
14477,
11540,
812,
12,
3459,
16,
498,
16,
460,
4672,
3536,
1891,
471,
1817,
326,
5071,
585,
18,
225,
1652,
268,
2091,
4164,
12,
2890,
4672,
365,
18,
81,
2409,
18,
13250,
11974,
87,
143... |
startup_pipe.write(struct.pack('=L', server_data_len)) startup_pipe.write(server_data_json) | startup_pipe.write(struct.pack('@H', listen_port)) | def main(options, args): logfile = open('testserver.log', 'w') sys.stdout = FileMultiplexer(sys.stdout, logfile) sys.stderr = FileMultiplexer(sys.stderr, logfile) port = options.port if options.server_type == SERVER_HTTP: if options.cert: # let's make sure the cert file exists. if not os.path.isfile(options.cert): print 'specified server cert file not found: ' + options.cert + \ ' exiting...' return for ca_cert in options.ssl_client_ca: if not os.path.isfile(ca_cert): print 'specified trusted client CA file not found: ' + ca_cert + \ ' exiting...' return server = HTTPSServer(('127.0.0.1', port), TestPageHandler, options.cert, options.ssl_client_auth, options.ssl_client_ca, options.ssl_bulk_cipher) print 'HTTPS server started on port %d...' % server.server_port else: server = StoppableHTTPServer(('127.0.0.1', port), TestPageHandler) print 'HTTP server started on port %d...' % server.server_port server.data_dir = MakeDataDir() server.file_root_url = options.file_root_url listen_port = server.server_port server._device_management_handler = None elif options.server_type == SERVER_SYNC: server = SyncHTTPServer(('127.0.0.1', port), SyncPageHandler) print 'Sync HTTP server started on port %d...' % server.server_port listen_port = server.server_port # means FTP Server else: my_data_dir = MakeDataDir() # Instantiate a dummy authorizer for managing 'virtual' users authorizer = pyftpdlib.ftpserver.DummyAuthorizer() # Define a new user having full r/w permissions and a read-only # anonymous user authorizer.add_user('chrome', 'chrome', my_data_dir, perm='elradfmw') authorizer.add_anonymous(my_data_dir) # Instantiate FTP handler class ftp_handler = pyftpdlib.ftpserver.FTPHandler ftp_handler.authorizer = authorizer # Define a customized banner (string returned when client connects) ftp_handler.banner = ("pyftpdlib %s based ftpd ready." % pyftpdlib.ftpserver.__ver__) # Instantiate FTP server class and listen to 127.0.0.1:port address = ('127.0.0.1', port) server = pyftpdlib.ftpserver.FTPServer(address, ftp_handler) listen_port = server.socket.getsockname()[1] print 'FTP server started on port %d...' % listen_port # Notify the parent that we've started. (BaseServer subclasses # bind their sockets on construction.) if options.startup_pipe is not None: server_data = { 'port': listen_port } server_data_json = json.dumps(server_data) debug('sending server_data: %s' % server_data_json) server_data_len = len(server_data_json) if sys.platform == 'win32': fd = msvcrt.open_osfhandle(options.startup_pipe, 0) else: fd = options.startup_pipe startup_pipe = os.fdopen(fd, "w") # First write the data length as an unsigned 4-byte value. This # is _not_ using network byte ordering since the other end of the # pipe is on the same machine. startup_pipe.write(struct.pack('=L', server_data_len)) startup_pipe.write(server_data_json) startup_pipe.close() try: server.serve_forever() except KeyboardInterrupt: print 'shutting down server' server.stop = True | dd8ae4c88678d44aa064598d5747cf0b3b0a14c7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9392/dd8ae4c88678d44aa064598d5747cf0b3b0a14c7/testserver.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
12,
2116,
16,
833,
4672,
15204,
273,
1696,
2668,
3813,
3567,
18,
1330,
2187,
296,
91,
6134,
2589,
18,
10283,
273,
1387,
8438,
92,
264,
12,
9499,
18,
10283,
16,
15204,
13,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
12,
2116,
16,
833,
4672,
15204,
273,
1696,
2668,
3813,
3567,
18,
1330,
2187,
296,
91,
6134,
2589,
18,
10283,
273,
1387,
8438,
92,
264,
12,
9499,
18,
10283,
16,
15204,
13,
2589,
1... |
import sys; sys.stderr.write("DEBUG - Calling 2x link_to(**%r)\n" % (kw)) | def pagelink(self, on, pagename='', page=None, **kw): """ Link to a page. | 42eb2829de93d5f6e1a7f8dbe81a29c26e96eec2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/888/42eb2829de93d5f6e1a7f8dbe81a29c26e96eec2/text_html.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4262,
27269,
12,
2890,
16,
603,
16,
4262,
1069,
2218,
2187,
1363,
33,
7036,
16,
2826,
9987,
4672,
3536,
4048,
358,
279,
1363,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4262,
27269,
12,
2890,
16,
603,
16,
4262,
1069,
2218,
2187,
1363,
33,
7036,
16,
2826,
9987,
4672,
3536,
4048,
358,
279,
1363,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... | |
sources = ['sage/rings/padics/padic_capped_absolute_element.pyx', \ 'sage/rings/padics/padic_generic_element.c'], | sources = ['sage/rings/padics/padic_capped_absolute_element.pyx'], | def is_newer(file1, file2): """ Return True if either file2 does not exist or is older than file1. If file1 does not exist, always return False. """ if not os.path.exists(file1): return False if not os.path.exists(file2): return True if os.path.getmtime(file2) < os.path.getmtime(file1): return True return False | 12aff705aa1e2b2dc6e401b763fe2e9e51bdf02d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/12aff705aa1e2b2dc6e401b763fe2e9e51bdf02d/setup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
353,
67,
2704,
264,
12,
768,
21,
16,
585,
22,
4672,
3536,
2000,
1053,
309,
3344,
585,
22,
1552,
486,
1005,
578,
353,
12156,
2353,
585,
21,
18,
225,
971,
585,
21,
1552,
486,
1005,
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,
353,
67,
2704,
264,
12,
768,
21,
16,
585,
22,
4672,
3536,
2000,
1053,
309,
3344,
585,
22,
1552,
486,
1005,
578,
353,
12156,
2353,
585,
21,
18,
225,
971,
585,
21,
1552,
486,
1005,
16,... |
linkR = re.compile(r'http[s]?://[^\]\s<>}"]*?[^\]\s\)\.:;,<>}"](?=\'\')|http[s]?://[^\]\s<>}"]*[^\]\s\)\.:;,<>}"]') | linkR = re.compile(r'http[s]?://[^\]\s<>}"]*?[^\]\s\)\.:;,<>}\|"](?=\'\')|http[s]?://[^\]\s<>}"]*[^\]\s\)\.:;,<>}"\|]') | def checkLinksIn(self, page): try: text = page.get() except wikipedia.NoPage: wikipedia.output(u'%s does not exist.' % page.title()) return # RFC 2396 says that URLs may only contain certain characters. # For this regex we also accept non-allowed characters, so that the bot # will later show these links as broken ('Non-ASCII Characters in URL'). # Note: While allowing parenthesis inside URLs, MediaWiki will regard # right parenthesis at the end of the URL as not part of that URL. # The same applies to dot, comma, colon and some other characters. # So characters inside the URL can be anything except whitespace, # closing squared brackets, quotation marks, greater than and less # than, and the last character also can't be parenthesis or another # character disallowed by MediaWiki. # MediaWiki allows closing curly braces inside links, but such braces # often come from templates where URLs are parameters, so as a # workaround we won't allow them inside links here. # The first half of this regular expression is required because '' is # not allowed inside links. linkR = re.compile(r'http[s]?://[^\]\s<>}"]*?[^\]\s\)\.:;,<>}"](?=\'\')|http[s]?://[^\]\s<>}"]*[^\]\s\)\.:;,<>}"]') # Remove HTML comments in URLs as well as URLs in HTML comments. # Also remove text inside nowiki links text = re.sub('(?s)<nowiki>.*?</nowiki>|<!--.*?-->', '', text) urls = linkR.findall(text) for url in urls: ignoreUrl = False for ignoreR in ignorelist: if ignoreR.match(url): ignoreUrl = True if not ignoreUrl: # Limit the number of threads started at the same time. Each # thread will check one page, then die. while threading.activeCount() >= config.max_external_links: # wait 100 ms time.sleep(0.1) thread = LinkCheckThread(page, url, self.history) # thread dies when program terminates thread.setDaemon(True) thread.start() | 716cee344a2f14bfcfa16d4a3166e1d381dd7d7a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4404/716cee344a2f14bfcfa16d4a3166e1d381dd7d7a/weblinkchecker.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
7100,
382,
12,
2890,
16,
1363,
4672,
775,
30,
977,
273,
1363,
18,
588,
1435,
1335,
21137,
18,
2279,
1964,
30,
21137,
18,
2844,
12,
89,
11,
9,
87,
1552,
486,
1005,
1093,
738,
136... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
7100,
382,
12,
2890,
16,
1363,
4672,
775,
30,
977,
273,
1363,
18,
588,
1435,
1335,
21137,
18,
2279,
1964,
30,
21137,
18,
2844,
12,
89,
11,
9,
87,
1552,
486,
1005,
1093,
738,
136... |
output(url2unicode("Changing page [[%s:%s]]" % site.lang, name, site = site)) | output(url2unicode("Changing page [[%s:%s]]" % (site.lang, name), site = site)) | def putPage(site, name, text, comment = None, watchArticle = False, minorEdit = True, newPage = False, token = None, gettoken = False): """Upload 'text' on page 'name' to the 'site' wiki. Use of this routine can normally be avoided; use Page.put instead. """ safetuple = () # safetuple keeps the old value, but only if we did not get a token yet could if site.version() >= "1.4": if gettoken or not token: token = site.getToken(getagain = gettoken) else: safetuple = (site,name,text,comment,watchArticle,minorEdit,newPage) # Check whether we are not too quickly after the previous putPage, and # wait a bit until the interval is acceptable put_throttle() # Which web-site host are we submitting to? host = site.hostname() # Get the address of the page on that host. address = site.put_address(space2underline(name)) # If no comment is given for the change, use the default if comment is None: comment=action # Use the proper encoding for the comment comment = comment.encode(site.encoding()) try: # Encode the text into the right encoding for the wiki if type(text) != type(u''): print 'Warning: wikipedia.putPage() got non-unicode page content. Please report this.' print text text = text.encode(site.encoding()) predata = [ ('wpSave', '1'), ('wpSummary', comment), ('wpTextbox1', text)] # Except if the page is new, we need to supply the time of the # previous version to the wiki to prevent edit collisions if newPage: predata.append(('wpEdittime', '')) else: predata.append(('wpEdittime', edittime[repr(site), link2url(name, site = site)])) # Pass the minorEdit and watchArticle arguments to the Wiki. if minorEdit and minorEdit != '0': predata.append(('wpMinoredit', '1')) if watchArticle and watchArticle != '0': predata.append(('wpWatchthis', '1')) # Give the token, but only if one is supplied. if token: predata.append(('wpEditToken', token)) # Encode all of this into a HTTP request data = urlencode(tuple(predata)) except KeyError: print edittime raise if newPage: output(url2unicode("Creating page [[%s:%s]]" % site.lang, name, site = site)) else: output(url2unicode("Changing page [[%s:%s]]" % site.lang, name, site = site)) # Submit the prepared information conn = httplib.HTTPConnection(host) conn.putrequest("POST", address) conn.putheader('Content-Length', str(len(data))) conn.putheader("Content-type", "application/x-www-form-urlencoded") conn.putheader("User-agent", "PythonWikipediaBot/1.0") if site.cookies(): conn.putheader('Cookie',site.cookies()) conn.endheaders() conn.send(data) # Prepare the return values response = conn.getresponse() data = response.read().decode(myencoding()) conn.close() if data != u'': editconflict = mediawiki_messages.get('editconflict').replace('$1', '') if '<title>%s' % editconflict in data: raise EditConflict() elif safetuple and "<" in data: # We might have been using an outdated token print "Changing page has failed. Retrying." putPage(safetuple[0], safetuple[1], safetuple[2], comment=safetuple[3], watchArticle=safetuple[4], minorEdit=safetuple[5], newPage=safetuple[6], token=None,gettoken=True) else: output(data) return response.status, response.reason, data | 89131f4c75abaccf39272af28ed8bc7adef6c128 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4404/89131f4c75abaccf39272af28ed8bc7adef6c128/wikipedia.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1378,
1964,
12,
4256,
16,
508,
16,
977,
16,
2879,
273,
599,
16,
4267,
7880,
273,
1083,
16,
8439,
4666,
273,
1053,
16,
394,
1964,
273,
1083,
16,
1147,
273,
599,
16,
336,
2316,
273,
10... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1378,
1964,
12,
4256,
16,
508,
16,
977,
16,
2879,
273,
599,
16,
4267,
7880,
273,
1083,
16,
8439,
4666,
273,
1053,
16,
394,
1964,
273,
1083,
16,
1147,
273,
599,
16,
336,
2316,
273,
10... |
self.methodDescriptionTextView.setString_(methodDescription) | methodDescription = self._methodDescriptions[selectedMethod] self.methodDescriptionTextView.setString_(methodDescription) | def work(): self.setStatusTextFieldMessage_("Retrieving signature for method %s..." % selectedMethod) methodDescription = getattr(self._server, self._methodPrefix + "methodHelp")(selectedMethod) if not methodDescription: methodDescription = "No description available." self._methodDescriptions[selectedMethod] = methodDescription self.setStatusTextFieldMessage_(None) self.methodDescriptionTextView.setString_(methodDescription) self.stopWorking() | c851354cec54ab85417ead275c27995a38df9c91 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/c851354cec54ab85417ead275c27995a38df9c91/WSTConnectionWindowControllerClass.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1440,
13332,
365,
18,
542,
1482,
16157,
1079,
67,
2932,
3848,
6282,
3372,
364,
707,
738,
87,
7070,
738,
3170,
1305,
13,
707,
3291,
273,
3869,
12,
2890,
6315,
3567,
16,
365,
6315,
2039,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1440,
13332,
365,
18,
542,
1482,
16157,
1079,
67,
2932,
3848,
6282,
3372,
364,
707,
738,
87,
7070,
738,
3170,
1305,
13,
707,
3291,
273,
3869,
12,
2890,
6315,
3567,
16,
365,
6315,
2039,
... |
self._set_metadata_element('dc:Identifier', str(val), [('scheme', 'libprs'), ('id', 'libprs_id')], | self._set_metadata_element('dc:identifier', str(val), [('scheme', 'libprs'), ('id', 'libprs_id')], | def set_libprs_id(self, val): if val: self._set_metadata_element('dc:Identifier', str(val), [('scheme', 'libprs'), ('id', 'libprs_id')], replace=True) | 2c5802676d8f80b76da4279238a911c51e9c213f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9125/2c5802676d8f80b76da4279238a911c51e9c213f/opf.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
67,
2941,
683,
87,
67,
350,
12,
2890,
16,
1244,
4672,
309,
1244,
30,
365,
6315,
542,
67,
4165,
67,
2956,
2668,
7201,
30,
5644,
2187,
609,
12,
1125,
3631,
306,
2668,
9068,
2187,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
67,
2941,
683,
87,
67,
350,
12,
2890,
16,
1244,
4672,
309,
1244,
30,
365,
6315,
542,
67,
4165,
67,
2956,
2668,
7201,
30,
5644,
2187,
609,
12,
1125,
3631,
306,
2668,
9068,
2187,
... |
pop, dad = 0, mom = 1, off = 2) | pop, pop, dad = 0, mom = 1, off = 2) | def testMendelianGenoTransmitter(self): 'Testing operator MendelianGenoTransmitter()' pop = self.getPop(size=100, loci=[20]*5) applyDuringMatingOperator(MendelianGenoTransmitter(), pop, dad = 0, mom = 1, off = 2) for ch in range(5): # check if 1 is copied to 2. g1 = pop.individual(2).genotype(0, ch) g2 = pop.individual(2).genotype(1, ch) p1 = [pop.individual(1).genotype(p, ch) for p in range(2)] p2 = [pop.individual(0).genotype(p, ch) for p in range(2)] self.assertEqual(g1 in p1, True) self.assertEqual(g2 in p2, True) # # customized chromosomes are NOT copied pop = self.getPop(size=100, loci=[20]*7, chromTypes=[AUTOSOME]*5 + [CUSTOMIZED]*2) applyDuringMatingOperator(MendelianGenoTransmitter(), pop, dad = 0, mom = 1, off = 2) for ch in range(7): # check if 1 is copied to 2. g1 = pop.individual(2).genotype(0, ch) g2 = pop.individual(2).genotype(1, ch) p1 = [pop.individual(1).genotype(p, ch) for p in range(2)] p2 = [pop.individual(0).genotype(p, ch) for p in range(2)] if ch < 5: self.assertEqual(g1 in p1, True) self.assertEqual(g2 in p2, True) else: self.assertNotEqual(g1 in p1, True) self.assertNotEqual(g2 in p2, True) # MALE... pop = self.getPop(size=100, loci=[20]*9, chromTypes=[AUTOSOME]*5 + [CHROMOSOME_X, CHROMOSOME_Y] + [CUSTOMIZED]*2) pop.individual(2).setSex(MALE) applyDuringMatingOperator(MendelianGenoTransmitter(), pop, dad = 0, mom = 1, off = 2) for ch in range(9): # check if 1 is copied to 2. g1 = pop.individual(2).genotype(0, ch) g2 = pop.individual(2).genotype(1, ch) p1 = [pop.individual(1).genotype(p, ch) for p in range(2)] p2 = [pop.individual(0).genotype(p, ch) for p in range(2)] if ch < 5: self.assertEqual(g1 in p1, True) self.assertEqual(g2 in p2, True) elif ch == 5: # get chrom X from mother self.assertEqual(g1 in p1, True) elif ch == 6: # get chrom Y from father self.assertEqual(g2, pop.individual(0).genotype(1, ch)) else: self.assertNotEqual(g1 in p1, True) self.assertNotEqual(g2 in p2, True) # FEMALE ... pop = self.getPop(size=100, loci=[20]*9, chromTypes=[AUTOSOME]*5 + [CHROMOSOME_X, CHROMOSOME_Y] + [CUSTOMIZED]*2) pop.individual(2).setSex(FEMALE) applyDuringMatingOperator(MendelianGenoTransmitter(), pop, dad = 0, mom = 1, off = 2) for ch in range(9): # check if 1 is copied to 2. g1 = pop.individual(2).genotype(0, ch) g2 = pop.individual(2).genotype(1, ch) p1 = [pop.individual(1).genotype(p, ch) for p in range(2)] p2 = [pop.individual(0).genotype(p, ch) for p in range(2)] if ch < 5: self.assertEqual(g1 in p1, True) self.assertEqual(g2 in p2, True) elif ch == 5: # get chrom X from mother self.assertEqual(g1 in p1, True) # get chrom X from father self.assertEqual(g2, pop.individual(0).genotype(0, ch)) elif ch == 6: # unused. self.assertEqual(g1 in p1, False) self.assertEqual(g2 in p2, False) else: self.assertNotEqual(g1 in p1, True) self.assertNotEqual(g2 in p2, True) | 413376e42263886141c9a591f1c5ee892c441cab /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/401/413376e42263886141c9a591f1c5ee892c441cab/test_14_transmitter.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
49,
409,
292,
2779,
43,
5764,
1429,
1938,
387,
12,
2890,
4672,
296,
22218,
3726,
490,
409,
292,
2779,
43,
5764,
1429,
1938,
387,
11866,
1843,
273,
365,
18,
588,
7049,
12,
1467,
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,
1842,
49,
409,
292,
2779,
43,
5764,
1429,
1938,
387,
12,
2890,
4672,
296,
22218,
3726,
490,
409,
292,
2779,
43,
5764,
1429,
1938,
387,
11866,
1843,
273,
365,
18,
588,
7049,
12,
1467,
3... |
addr = 0 | if isinstance(src, str): src = cStringIO.StringIO(src) | def hexDump(src, dest, bytesPerLine=16, wordSize=4): """A pretty standard hex dumper routine. Dumps the stream 'src' to the stream 'dest' """ addr = 0 while 1: srcLine = src.read(bytesPerLine) if not srcLine: break # Address dest.write("%04X: " % addr) addr += len(srcLine) # Hex values for i in xrange(bytesPerLine): if i < len(srcLine): dest.write("%02X" % ord(srcLine[i])) else: dest.write(" ") if not (i+1) % wordSize: dest.write(" ") dest.write(" ") # ASCII representation for byte in srcLine: if ord(byte) >= 32 and ord(byte) < 127: dest.write(byte) else: dest.write(".") for i in xrange(bytesPerLine - len(srcLine)): dest.write(" ") dest.write("\n") | 5287977b4851c463ea1f8828a7ec564f152e2a17 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6757/5287977b4851c463ea1f8828a7ec564f152e2a17/spime.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3827,
10628,
12,
4816,
16,
1570,
16,
31148,
1670,
33,
2313,
16,
2076,
1225,
33,
24,
4672,
3536,
37,
7517,
4529,
3827,
24826,
12245,
18,
21250,
1121,
326,
1407,
296,
4816,
11,
358,
326,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3827,
10628,
12,
4816,
16,
1570,
16,
31148,
1670,
33,
2313,
16,
2076,
1225,
33,
24,
4672,
3536,
37,
7517,
4529,
3827,
24826,
12245,
18,
21250,
1121,
326,
1407,
296,
4816,
11,
358,
326,
... |
buffer.write('/>') | buffer.write(' />') | def serialize_guide(self): buffer = self.buffer hrefs = self.oeb.manifest.hrefs buffer.write('<guide>') for ref in self.oeb.guide.values(): path, frag = urldefrag(ref.href) if hrefs[path].media_type not in OEB_DOCS: continue buffer.write('<reference title="%s" type="%s" ' % (ref.title, ref.type)) self.serialize_href(ref.href) buffer.write('/>') buffer.write('</guide>') | c4299cd17a33e7fa4d594f74730409c4dff60709 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9125/c4299cd17a33e7fa4d594f74730409c4dff60709/writer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4472,
67,
12118,
12,
2890,
4672,
1613,
273,
365,
18,
4106,
3897,
87,
273,
365,
18,
15548,
70,
18,
14357,
18,
7547,
87,
1613,
18,
2626,
2668,
32,
12118,
1870,
13,
364,
1278,
316,
365,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4472,
67,
12118,
12,
2890,
4672,
1613,
273,
365,
18,
4106,
3897,
87,
273,
365,
18,
15548,
70,
18,
14357,
18,
7547,
87,
1613,
18,
2626,
2668,
32,
12118,
1870,
13,
364,
1278,
316,
365,
... |
negs=unique(labeled[-1]) positives[negs]=False | negs = np.unique(labeled[-1]) positives[negs] = False | def border_regions(mask_or_labeled): ''' positives = border_regions(mask_or_labeled) Removes anything that touches the border. ''' nr_objs = mask_or_labeled.max() if mask_or_labeled.max() == 1: labeled,nr_objs=ndimage.label(mask_or_labeled) else: labeled = mask_or_labeled positives = numpy.ones(nr_objs+1,numpy.bool) r,c=labeled.shape negs=unique(labeled[0]) positives[negs]=False negs=unique(labeled[-1]) positives[negs]=False negs=unique(labeled[:,0]) positives[negs]=False negs=unique(labeled[:,-1]) positives[negs]=False return positives | b661ac13250f72232d0c217ee6ef04a767cd4c1b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12199/b661ac13250f72232d0c217ee6ef04a767cd4c1b/filters.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5795,
67,
15923,
12,
4455,
67,
280,
67,
1925,
329,
4672,
9163,
949,
28737,
273,
5795,
67,
15923,
12,
4455,
67,
280,
67,
1925,
329,
13,
225,
20284,
6967,
716,
18796,
326,
5795,
18,
9163... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5795,
67,
15923,
12,
4455,
67,
280,
67,
1925,
329,
4672,
9163,
949,
28737,
273,
5795,
67,
15923,
12,
4455,
67,
280,
67,
1925,
329,
13,
225,
20284,
6967,
716,
18796,
326,
5795,
18,
9163... |
return [] | return ['/usr/lib/'] | def library_dirs_for_libffi(self): return [] | 2e95c59182380ec25487978faa6c3be3411ba9df /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6934/2e95c59182380ec25487978faa6c3be3411ba9df/darwin.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5313,
67,
8291,
67,
1884,
67,
2941,
1403,
77,
12,
2890,
4672,
327,
5378,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5313,
67,
8291,
67,
1884,
67,
2941,
1403,
77,
12,
2890,
4672,
327,
5378,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
if snmpNotifyType == 1: | if notifyType == 1: | def sendNotification( self, snmpEngine, notificationTarget, notificationName, additionalNames=None, contextName='', cbFun=None, cbCtx=None ): # 3.3 ( notifyTag, notifyType ) = config.getNotificationInfo( snmpEngine, notificationTarget ) pendingReqsCount = { 0: 0 } for targetAddrName in config.getTargetNames(snmpEngine, notifyTag): ( transportDomain, transportAddress, timeout, retryCount, params ) = config.getTargetAddr(snmpEngine, targetAddrName) ( messageProcessingModel, securityModel, securityName, securityLevel ) = config.getTargetParams(snmpEngine, params) | 2ef6d66432dc958997df2634ee4c2d01795d156e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/587/2ef6d66432dc958997df2634ee4c2d01795d156e/ntforg.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1366,
4386,
12,
365,
16,
15366,
4410,
16,
3851,
2326,
16,
3851,
461,
16,
3312,
1557,
33,
7036,
16,
819,
461,
2218,
2187,
2875,
22783,
33,
7036,
16,
2875,
6442,
33,
7036,
262,
30,
468,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1366,
4386,
12,
365,
16,
15366,
4410,
16,
3851,
2326,
16,
3851,
461,
16,
3312,
1557,
33,
7036,
16,
819,
461,
2218,
2187,
2875,
22783,
33,
7036,
16,
2875,
6442,
33,
7036,
262,
30,
468,
... |
self.__exp[i] = ('id', 'in', right1) | if right1 == []: self.__exp[i] = ( 'id', '=', 0 ) else: self.__exp[i] = ('id', 'in', right1) | def rg(ids, table, parent): if not ids: return [] ids2 = table.search(cr, uid, [(parent, 'in', ids)], context=context) return ids + rg(ids2, table, parent) | a0ac26777dc2e3c9fde30a01173ae4e630e7dd52 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12853/a0ac26777dc2e3c9fde30a01173ae4e630e7dd52/expression.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
14524,
12,
2232,
16,
1014,
16,
982,
4672,
309,
486,
3258,
30,
327,
5378,
3258,
22,
273,
1014,
18,
3072,
12,
3353,
16,
4555,
16,
306,
12,
2938,
16,
296,
267,
2187,
3258,
13,
6487,
819... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
14524,
12,
2232,
16,
1014,
16,
982,
4672,
309,
486,
3258,
30,
327,
5378,
3258,
22,
273,
1014,
18,
3072,
12,
3353,
16,
4555,
16,
306,
12,
2938,
16,
296,
267,
2187,
3258,
13,
6487,
819... |
rc_entry = [r'\converter sxw latex "%%" ""' ]) | rc_entry = [ r'\converter sxw latex "%%" ""' ]) | def checkProg(description, progs, rc_entry = [], path = [] ): ''' This function will search a program in $PATH plus given path If found, return directory and program name (not the options). description: description of the program progs: check programs, for each prog, the first word is used for searching but the whole string is used to replace %% for a rc_entry. So, feel free to add '$$i' etc for programs. path: additional path rc_entry: entry to outfile, can be emtpy, one pattern (%% for chosen prog or 'none'), or one for each prog and 'none'. NOTE: if you do not want 'none' entry to be added to the RC file, specify an entry for each prog and use '' for 'none' entry. FIXME: under windows, we should check registry instead of $PATH ''' # one rc entry for each progs plus none entry if len(rc_entry) > 1 and len(rc_entry) != len(progs) + 1: print "rc entry should have one item or item for each prog and none." sys.exit(2) print 'checking for ' + description + '...' ## print '(' + ','.join(progs) + ')', for idx in range(len(progs)): # ac_prog may have options, ac_word is the command name ac_prog = progs[idx] ac_word = ac_prog.split(' ')[0] print '+checking for "' + ac_word + '"... ', path = os.environ["PATH"].split(os.pathsep) + path for ac_dir in path: # check both ac_word and ac_word.exe (for windows system) if os.path.isfile( os.path.join(ac_dir, ac_word) ) or \ os.path.isfile( os.path.join(ac_dir, ac_word + ".exe") ): print ' yes' # write rc entries for this command if len(rc_entry) == 1: addToRC(rc_entry[0].replace('%%', ac_prog)) elif len(rc_entry) > 1: addToRC(rc_entry[idx].replace('%%', ac_prog)) return [ac_dir, ac_word] # if not successful print ' no' # write rc entries for 'not found' if len(rc_entry) > 0: # the last one. addToRC(rc_entry[-1].replace('%%', 'none')) return ['', 'none'] | 41dd4f0be3188829e0dccd1c1ec13e281f4fc00d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7514/41dd4f0be3188829e0dccd1c1ec13e281f4fc00d/configure.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
626,
75,
12,
3384,
16,
450,
564,
16,
4519,
67,
4099,
273,
5378,
16,
589,
273,
5378,
262,
30,
9163,
1220,
445,
903,
1623,
279,
5402,
316,
271,
4211,
8737,
864,
589,
971,
1392,
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,
866,
626,
75,
12,
3384,
16,
450,
564,
16,
4519,
67,
4099,
273,
5378,
16,
589,
273,
5378,
262,
30,
9163,
1220,
445,
903,
1623,
279,
5402,
316,
271,
4211,
8737,
864,
589,
971,
1392,
16... |
if lfn in res['Value']['Failed'].keys(): self.__abortTransaction() return S_ERROR(res['Value']['Failed'][lfn]) if not res['Value']['Successful']: res = self.__makeDirs(bdir) if not res['OK']: self.__abortTransaction() return S_ERROR(res['Message']) fullLfn = '%s%s' % (self.prefix+lfn) value = lfc.lfc_creatg(fullLfn,guid,0664) if value != 0: self.__abortTransaction() errStr = lfc.sstrerror(lfc.cvar.serrno) res = self.removeFile(lfn) return S_ERROR("__addFile: Failed to create GUID: %s" % errStr) value = lfc.lfc_setfsizeg(guid,size,'','') if value != 0: self.__abortTransaction() errStr = lfc.sstrerror(lfc.cvar.serrno) res = self.removeFile(lfn) return S_ERROR("__addFile: Failed to set file size: %s" % errStr) self.__endTransaction() | fullLfn = '%s%s' % (self.prefix,lfn) value = lfc.lfc_creatg(fullLfn,guid,0664) if value != 0: self.__abortTransaction() errStr = lfc.sstrerror(lfc.cvar.serrno) res = self.removeFile(lfn) return S_ERROR("__addFile: Failed to create GUID: %s" % errStr) value = lfc.lfc_setfsizeg(guid,size,'','') if value != 0: self.__abortTransaction() errStr = lfc.sstrerror(lfc.cvar.serrno) res = self.removeFile(lfn) return S_ERROR("__addFile: Failed to set file size: %s" % errStr) self.__endTransaction() return S_OK() def __checkAddFile(self,lfn,pfn,size,se,guid): errStr = "" try: size = long(size) except: errStr += "The size of the file must be an 'int','long' or 'string'" if not guid: errStr += "There is no GUID, don't be silly" res = self.__existsGuid(guid) if res['OK'] and res['Value']: errStr += "You can't register the same GUID twice" if not se: errStr += "You really want to register a file without giving the SE?!?!?" if not pfn: errStr += "Without a PFN a registration is nothing" if not lfn: errStr += "You really are rubbish!!!! Sort it out" res = self.exists(lfn) if res['OK'] and res['Value']['Successful'].has_key(lfn): if res['Value']['Successful'][lfn]: errStr += "This LFN is already taken, try another one" if errStr: return S_ERROR(errStr) else: | def __addFile(self,lfn,pfn,size,se,guid): self.__startTransaction() bdir = os.path.dirname(lfn) res = self.exists(bdir) # If we failed to find out whether the directory exists if not res['OK']: self.__abortTransaction() return S_ERROR(res['Message']) # If we failed to find out whether the directory exists if lfn in res['Value']['Failed'].keys(): self.__abortTransaction() return S_ERROR(res['Value']['Failed'][lfn]) # If the directory doesn't exist if not res['Value']['Successful']: #Make the directories recursively if needed res = self.__makeDirs(bdir) # If we failed to make the directory for the file if not res['OK']: self.__abortTransaction() return S_ERROR(res['Message']) #Create a new file fullLfn = '%s%s' % (self.prefix+lfn) value = lfc.lfc_creatg(fullLfn,guid,0664) if value != 0: self.__abortTransaction() errStr = lfc.sstrerror(lfc.cvar.serrno) # Remove the file we just attempted to add res = self.removeFile(lfn) return S_ERROR("__addFile: Failed to create GUID: %s" % errStr) #Set the size of the file value = lfc.lfc_setfsizeg(guid,size,'','') if value != 0: self.__abortTransaction() errStr = lfc.sstrerror(lfc.cvar.serrno) # Remove the file we just attempted to add res = self.removeFile(lfn) return S_ERROR("__addFile: Failed to set file size: %s" % errStr) self.__endTransaction() return S_OK() | 95f2ea774520863ead2cd9f2cf913232cd97cf6b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12864/95f2ea774520863ead2cd9f2cf913232cd97cf6b/LcgFileCatalogClient.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1289,
812,
12,
2890,
16,
80,
4293,
16,
84,
4293,
16,
1467,
16,
307,
16,
14066,
4672,
365,
16186,
1937,
3342,
1435,
324,
1214,
273,
1140,
18,
803,
18,
12287,
12,
80,
4293,
13,
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,
12,
2890,
16,
80,
4293,
16,
84,
4293,
16,
1467,
16,
307,
16,
14066,
4672,
365,
16186,
1937,
3342,
1435,
324,
1214,
273,
1140,
18,
803,
18,
12287,
12,
80,
4293,
13,
4... |
self._do_action(self._action, packages) | self._do_action(self._action, packages, pyvers) | def main(self): """Main loop. Here executing the minimerge tasks: - calculate dependencies - for each dependencies: | 76d5bf95735327499584c9cda2384ba15a856ab6 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9393/76d5bf95735327499584c9cda2384ba15a856ab6/core.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
12,
2890,
4672,
3536,
6376,
2798,
18,
13743,
11274,
326,
18172,
1583,
4592,
30,
300,
4604,
5030,
300,
364,
1517,
5030,
30,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
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,
2774,
12,
2890,
4672,
3536,
6376,
2798,
18,
13743,
11274,
326,
18172,
1583,
4592,
30,
300,
4604,
5030,
300,
364,
1517,
5030,
30,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
x = u.var('x') | x = sp.var('x') | def test_many_threads_reading_one_var(self): conss = [Consumer() for i in range(10)] x = u.var('x') for cons in conss: cons.give_var(x) cons.start() u.bind(x, 42) for cons in conss: cons.join() assert cons.var.val == 42 | 50b8fd3666df00823a923a91776f1cf8144d3ffe /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/50b8fd3666df00823a923a91776f1cf8144d3ffe/test_variable.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
9353,
67,
12495,
67,
21803,
67,
476,
67,
1401,
12,
2890,
4672,
356,
1049,
273,
306,
5869,
1435,
364,
277,
316,
1048,
12,
2163,
25887,
619,
273,
1694,
18,
1401,
2668,
92,
6134... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
9353,
67,
12495,
67,
21803,
67,
476,
67,
1401,
12,
2890,
4672,
356,
1049,
273,
306,
5869,
1435,
364,
277,
316,
1048,
12,
2163,
25887,
619,
273,
1694,
18,
1401,
2668,
92,
6134... |
user = api.create(user_data['login'], user_data['password'], user_data['name']) | user = api.create(login=user_data['login'], password=user_data['password'], name=user_data['name']) | def PUT(self): """ Create a new user @return: user that was created """ user_data = self.params() user = api.create(user_data['login'], user_data['password'], user_data['name']) return self.created(user['id'], user) | 1dae69b57b1f0060d67f9c4d0beafde23c775811 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10692/1dae69b57b1f0060d67f9c4d0beafde23c775811/users.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11443,
12,
2890,
4672,
3536,
1788,
279,
394,
729,
632,
2463,
30,
729,
716,
1703,
2522,
3536,
729,
67,
892,
273,
365,
18,
2010,
1435,
729,
273,
1536,
18,
2640,
12,
5819,
33,
1355,
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,
11443,
12,
2890,
4672,
3536,
1788,
279,
394,
729,
632,
2463,
30,
729,
716,
1703,
2522,
3536,
729,
67,
892,
273,
365,
18,
2010,
1435,
729,
273,
1536,
18,
2640,
12,
5819,
33,
1355,
67,
... |
roi_info = (min_pix,min_line,max_pix-min_pix,max_line-min_line) | roi_info = (min_pix, min_line, max_pix-min_pix, max_line-min_line) | def refresh_roiinfo(self,*args): try: roi_info = self.app.toolbar.get_roi() except: # if roi has been disabled (eg. if current selection # mode is poi), leave it at the latest value roi_info = None | 18bebfddf000a5af98d1ab83e4246e700756e2a4 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11090/18bebfddf000a5af98d1ab83e4246e700756e2a4/Tool_Export.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4460,
67,
303,
77,
1376,
12,
2890,
16,
14,
1968,
4672,
775,
30,
25017,
67,
1376,
273,
365,
18,
2910,
18,
18849,
18,
588,
67,
303,
77,
1435,
1335,
30,
468,
309,
25017,
711,
2118,
5673... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4460,
67,
303,
77,
1376,
12,
2890,
16,
14,
1968,
4672,
775,
30,
25017,
67,
1376,
273,
365,
18,
2910,
18,
18849,
18,
588,
67,
303,
77,
1435,
1335,
30,
468,
309,
25017,
711,
2118,
5673... |
listmatching = forbidfiles = [] | listmatching = [] | def find_nomasked_files(self, forbidpattern, basedir='.'): """ Finds files who do NOT have 'forbidpattern' in their file name starting from 'basedir' -> list """ | fe2e351748d118a1134e817ff51744c4ca47fbdf /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2163/fe2e351748d118a1134e817ff51744c4ca47fbdf/pyfind_revdep.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1104,
67,
12306,
835,
329,
67,
2354,
12,
2890,
16,
364,
19773,
4951,
16,
15573,
2218,
1093,
4672,
3536,
4163,
87,
1390,
10354,
741,
4269,
1240,
296,
1884,
19773,
4951,
11,
316,
3675,
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,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1104,
67,
12306,
835,
329,
67,
2354,
12,
2890,
16,
364,
19773,
4951,
16,
15573,
2218,
1093,
4672,
3536,
4163,
87,
1390,
10354,
741,
4269,
1240,
296,
1884,
19773,
4951,
11,
316,
3675,
585... |
f.FaceSize(int(2.3 * self.res)) | h = int(2.6*self.res) f.FaceSize(h) | def paint_axes(self): glLoadIdentity() | d28be66047f60ec194bbac93531e8ff6eb03e8fb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2743/d28be66047f60ec194bbac93531e8ff6eb03e8fb/giraffe.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12574,
67,
10855,
12,
2890,
4672,
5118,
2563,
4334,
1435,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
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,
12574,
67,
10855,
12,
2890,
4672,
5118,
2563,
4334,
1435,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
t[0] = createList( 'matrixlist', t ) | t[0] = createListleft( t ) | def p_matrixlist(t): ''' matrixlist : matrix matrixlist | matrix ''' t[0] = createList( 'matrixlist', t ) | 1a8e540808c326b13fcc3d7ecf1906c80d3bce53 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12724/1a8e540808c326b13fcc3d7ecf1906c80d3bce53/emparser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
293,
67,
5667,
1098,
12,
88,
4672,
9163,
3148,
1098,
294,
3148,
3148,
1098,
571,
3148,
9163,
268,
63,
20,
65,
273,
225,
752,
682,
12,
296,
5667,
1098,
2187,
268,
262,
225,
2,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
293,
67,
5667,
1098,
12,
88,
4672,
9163,
3148,
1098,
294,
3148,
3148,
1098,
571,
3148,
9163,
268,
63,
20,
65,
273,
225,
752,
682,
12,
296,
5667,
1098,
2187,
268,
262,
225,
2,
-100,
-... |
source_obj = self.getSourceObj(source.getId()) groups_roles_map = source_obj.get_groups_roles_map() for group, roles in groups_roles_map.iteritems(): if source_obj.user_in_group(user, group): | if not hasattr(source, 'get_groups_roles_map'): continue for group, roles in source.get_groups_roles_map().iteritems(): if source.user_in_group(user, group): | def getAuthenticatedUserRoles(self, p_meta_types=None): """ Returns a list with all roles of the authenticated user. | e5a845e68a96163f666cf6d2849542c932f607c1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3287/e5a845e68a96163f666cf6d2849542c932f607c1/AuthenticationTool.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
14191,
6096,
1299,
6898,
12,
2890,
16,
293,
67,
3901,
67,
2352,
33,
7036,
4672,
3536,
2860,
279,
666,
598,
777,
4900,
434,
326,
9370,
729,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
14191,
6096,
1299,
6898,
12,
2890,
16,
293,
67,
3901,
67,
2352,
33,
7036,
4672,
3536,
2860,
279,
666,
598,
777,
4900,
434,
326,
9370,
729,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
def open(self, url, new=0): | def open(self, url, new=0, autoraise=1): | def open(self, url, new=0): if new: self._remote("LOADNEW " + url) else: self._remote("LOAD " + url) | 68aafcbdf63829c3dfb854b8cff029508602999e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/68aafcbdf63829c3dfb854b8cff029508602999e/webbrowser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1696,
12,
2890,
16,
880,
16,
394,
33,
20,
16,
2059,
10610,
784,
33,
21,
4672,
309,
394,
30,
365,
6315,
7222,
2932,
7783,
12917,
315,
397,
880,
13,
469,
30,
365,
6315,
7222,
2932,
778... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1696,
12,
2890,
16,
880,
16,
394,
33,
20,
16,
2059,
10610,
784,
33,
21,
4672,
309,
394,
30,
365,
6315,
7222,
2932,
7783,
12917,
315,
397,
880,
13,
469,
30,
365,
6315,
7222,
2932,
778... |
def __init__(self, statusLog, logger, buildTroves, logDir): | def __init__(self, statusLog, logger, buildTroves, logDir=None): | def __init__(self, statusLog, logger, buildTroves, logDir): self.depState = DependencyBasedBuildState(buildTroves, logger) self.logger = logger self.logDir = logDir self.graphCount = 0 self._resolving = {} self.priorities = [] self._delayed = {} self._cycleTroves = [] self._allowFastResolution = True | 8da04465a90b18730972f7e7234d65ecfe36b1a5 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8749/8da04465a90b18730972f7e7234d65ecfe36b1a5/dephandler.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1267,
1343,
16,
1194,
16,
1361,
56,
303,
3324,
16,
31101,
33,
7036,
4672,
365,
18,
15037,
1119,
273,
11993,
9802,
3116,
1119,
12,
3510,
56,
303,
3324,
16... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1267,
1343,
16,
1194,
16,
1361,
56,
303,
3324,
16,
31101,
33,
7036,
4672,
365,
18,
15037,
1119,
273,
11993,
9802,
3116,
1119,
12,
3510,
56,
303,
3324,
16... |
QApplication.processEvents() | def savePlotToFile(self, filename): """Save the plot visible in the figure.""" plot_path = self.plot_settings.getPlotPath() if not os.path.exists(plot_path): os.makedirs(plot_path) | ea81291531705a5a4d2fa714658335833c1c859b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10268/ea81291531705a5a4d2fa714658335833c1c859b/plotgenerator.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1923,
11532,
15450,
12,
2890,
16,
1544,
4672,
3536,
4755,
326,
3207,
6021,
316,
326,
7837,
12123,
3207,
67,
803,
273,
365,
18,
4032,
67,
4272,
18,
588,
11532,
743,
1435,
309,
486,
1140,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1923,
11532,
15450,
12,
2890,
16,
1544,
4672,
3536,
4755,
326,
3207,
6021,
316,
326,
7837,
12123,
3207,
67,
803,
273,
365,
18,
4032,
67,
4272,
18,
588,
11532,
743,
1435,
309,
486,
1140,
... | |
try: driver = app.device.getDriver(dpy) except dri.XMLError: driver = None if driver and driver.validate (app.options): pass else: pass | path = self.model.getPathFromNode (app) iter = self.model.get_iter (path) self.model.row_changed (path, iter) | def validateAppNode (self, app): try: driver = app.device.getDriver(dpy) except dri.XMLError: driver = None if driver and driver.validate (app.options): #style = self.get_style().copy() #style.fg[gtk.STATE_NORMAL] = self.defaultFg #self.node_set_row_style(app.node, style) pass else: #style = self.get_style().copy() #style.fg[gtk.STATE_NORMAL] = gtk.gdk.Color (65535, 0, 0) #self.node_set_row_style(app.node, style) pass | 5679b097fffb4b6fb7fd7bf13c850e60d8d6bf50 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4580/5679b097fffb4b6fb7fd7bf13c850e60d8d6bf50/driconf.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1954,
3371,
907,
261,
2890,
16,
595,
4672,
775,
30,
3419,
273,
595,
18,
5964,
18,
588,
4668,
12,
72,
2074,
13,
1335,
302,
566,
18,
4201,
668,
30,
3419,
273,
599,
309,
3419,
471,
3419... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1954,
3371,
907,
261,
2890,
16,
595,
4672,
775,
30,
3419,
273,
595,
18,
5964,
18,
588,
4668,
12,
72,
2074,
13,
1335,
302,
566,
18,
4201,
668,
30,
3419,
273,
599,
309,
3419,
471,
3419... |
d = drawing | d = drawing or Drawing(400, 200) | def sample3(drawing=None): "Add sample swatches to a diagram." d = drawing swatches = Legend0() swatches.alignment = 'right' swatches.x = 80 swatches.y = 160 swatches.deltax = 60 swatches.dxTextSpace = 10 swatches.columnMaximum = 4 items = [(colors.red, 'before'), (colors.green, 'after')] swatches.colorNamePairs = items d.add(swatches, 'legend') return d | c909007534f8e443d7a452e60568f3b1287fc262 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/c909007534f8e443d7a452e60568f3b1287fc262/test_graphics_charts.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3296,
23,
12,
9446,
310,
33,
7036,
4672,
315,
986,
3296,
1352,
505,
281,
358,
279,
19750,
1199,
225,
302,
273,
16327,
578,
10184,
310,
12,
16010,
16,
4044,
13,
225,
1352,
505,
281,
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,
3296,
23,
12,
9446,
310,
33,
7036,
4672,
315,
986,
3296,
1352,
505,
281,
358,
279,
19750,
1199,
225,
302,
273,
16327,
578,
10184,
310,
12,
16010,
16,
4044,
13,
225,
1352,
505,
281,
273... |
def handle_error (self): | def handle_error(self): | def handle_error (self): nil, t, v, tbinfo = compact_traceback() | d560ace3a76d1fa162fa40ec90a158d4d3540036 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/d560ace3a76d1fa162fa40ec90a158d4d3540036/asyncore.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
67,
1636,
12,
2890,
4672,
515,
16,
268,
16,
331,
16,
8739,
1376,
273,
6739,
67,
21696,
1435,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
67,
1636,
12,
2890,
4672,
515,
16,
268,
16,
331,
16,
8739,
1376,
273,
6739,
67,
21696,
1435,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
notif.details = _('<a href="/annuaire/%(userid)d/">%(userperson)s</a> proposed the creation of the organization <em>%(orgname)s</em>. Please visit <a href="/manage/organizations/proposals/register/%(proposalid)d/">this page</a> to check for correctness and possibly confirm.' % {'userid': request.user.id, 'userperson': p, 'orgname': modifiedOrg.name, 'proposalid': orgprop.id}) | notif.details = _('<a href="/annuaire/%(userid)d/">%(userperson)s</a> proposed the creation of the organization <em>%(orgname)s</em>. Please visit <a href="/manage/organizations/proposals/register/%(proposalid)d/">this page</a> to check for correctness and possibly confirm.') % {'userid': request.user.id, 'userperson': p, 'orgname': modifiedOrg.name, 'proposalid': orgprop.id} | def company_create(request, user_id=None): p = get_object_or_404(Person, user=user_id) # 1er passage : on propose un formulaire vide if request.method == 'GET': f = OrganizationForm() return ain7_render_to_response(request, 'emploi/office_create.html', {'form': f, 'person': p, 'object': 'company'}) # 2e passage : sauvegarde, notification et redirection if request.method == 'POST': f = OrganizationForm(request.POST.copy()) if f.is_valid(): # create the OrganizationProposal modifiedOrg = f.save(is_a_proposal=True) orgprop = OrganizationProposal() orgprop.original = None orgprop.modified = modifiedOrg orgprop.author = p orgprop.action = 0 orgprop.save() # create the notification notif = Notification() notif.title = unicode(_('Proposal for adding an organization'),'utf8') notif.details = _('<a href="/annuaire/%(userid)d/">%(userperson)s</a> proposed the creation of the organization <em>%(orgname)s</em>. Please visit <a href="/manage/organizations/proposals/register/%(proposalid)d/">this page</a> to check for correctness and possibly confirm.' % {'userid': request.user.id, 'userperson': p, 'orgname': modifiedOrg.name, 'proposalid': orgprop.id}) notif.proposal_type = 0 # organization notif.proposal_action = 0 # creation notif.proposal_object = orgprop.id notif.save() request.user.message_set.create(message=_('Your proposal for adding an organization has been sent to moderators.')) else: request.user.message_set.create(message=_('Something was wrong in the form you filled. No modification done.')) ain7member = get_object_or_404(AIn7Member, person=p) return ain7_render_to_response(request, 'emploi/cv_edit.html', {'person': p, 'ain7member': ain7member}) | c3bea06142998225772ca8cf4fc6c7142d882469 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5417/c3bea06142998225772ca8cf4fc6c7142d882469/views.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9395,
67,
2640,
12,
2293,
16,
729,
67,
350,
33,
7036,
4672,
225,
293,
273,
336,
67,
1612,
67,
280,
67,
11746,
12,
8346,
16,
729,
33,
1355,
67,
350,
13,
225,
468,
404,
264,
1342,
41... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9395,
67,
2640,
12,
2293,
16,
729,
67,
350,
33,
7036,
4672,
225,
293,
273,
336,
67,
1612,
67,
280,
67,
11746,
12,
8346,
16,
729,
33,
1355,
67,
350,
13,
225,
468,
404,
264,
1342,
41... |
One boolean per atom indicating if the atom should be constrained or not. | One boolean per atom indicating if the atom should remain visible or not. | def __init__(self, atoms, indices=None, mask=None): """Filter atoms. | 275b2932b16d019ca79b1322c5e21e4e6e1cf861 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5735/275b2932b16d019ca79b1322c5e21e4e6e1cf861/constraints.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
9006,
16,
4295,
33,
7036,
16,
3066,
33,
7036,
4672,
3536,
1586,
9006,
18,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
9006,
16,
4295,
33,
7036,
16,
3066,
33,
7036,
4672,
3536,
1586,
9006,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
from eg.greenlet import greenlet | from greenlet import greenlet | def DoLog(self2, level, msg, timestamp): if (level >= 6):# and not self.debugLevel: return sys.stderr.write("Error%d: %s\n" % (level, msg)) | 1f29e12312300ed92154ab3fb6eb6a183036170d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8076/1f29e12312300ed92154ab3fb6eb6a183036170d/Init.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2256,
1343,
12,
2890,
22,
16,
1801,
16,
1234,
16,
2858,
4672,
309,
261,
2815,
1545,
1666,
4672,
7,
471,
486,
365,
18,
4148,
2355,
30,
327,
2589,
18,
11241,
18,
2626,
2932,
668,
9,
72... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2256,
1343,
12,
2890,
22,
16,
1801,
16,
1234,
16,
2858,
4672,
309,
261,
2815,
1545,
1666,
4672,
7,
471,
486,
365,
18,
4148,
2355,
30,
327,
2589,
18,
11241,
18,
2626,
2932,
668,
9,
72... |
return cls('%s/database') | return cls('%s/database' % target) | def get_root(target): # Get the root resource metadata = Metadata('%s/database/.metadata' % target) format = metadata.get_property('format') # Build and return the root handler cls = registry.get_object_class(format) return cls('%s/database') | d0b7d44415c6df5609cebc417b3ed6e90e0e2c2e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12681/d0b7d44415c6df5609cebc417b3ed6e90e0e2c2e/server.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
3085,
12,
3299,
4672,
468,
968,
326,
1365,
1058,
1982,
273,
6912,
29909,
87,
19,
6231,
15865,
4165,
11,
738,
1018,
13,
740,
273,
1982,
18,
588,
67,
4468,
2668,
2139,
6134,
468... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
3085,
12,
3299,
4672,
468,
968,
326,
1365,
1058,
1982,
273,
6912,
29909,
87,
19,
6231,
15865,
4165,
11,
738,
1018,
13,
740,
273,
1982,
18,
588,
67,
4468,
2668,
2139,
6134,
468... |
if not ids: return [] ids2 = table.search(cr, uid, [(parent, 'in', ids)], context=context) return [(prefix+left, 'in', ids + _rec_get(ids2, table, parent))] | def rg(ids, table, parent): if not ids: return [] ids2 = table.search(cr, uid, [(parent, 'in', ids)], context=context) return ids+rg(ids2, table, parent) return [(prefix+left, 'in', rg(ids2, table, parent))] | def _rec_get(ids, table, parent, left='id', prefix=''): if table._parent_store and (not table.pool._init): | 6fa9175cc58f83eb39e8d988734b1d27c57f4a5c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7397/6fa9175cc58f83eb39e8d988734b1d27c57f4a5c/expression.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3927,
67,
588,
12,
2232,
16,
1014,
16,
982,
16,
2002,
2218,
350,
2187,
1633,
2218,
11,
4672,
309,
1014,
6315,
2938,
67,
2233,
471,
261,
902,
1014,
18,
6011,
6315,
2738,
4672,
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,
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,
3927,
67,
588,
12,
2232,
16,
1014,
16,
982,
16,
2002,
2218,
350,
2187,
1633,
2218,
11,
4672,
309,
1014,
6315,
2938,
67,
2233,
471,
261,
902,
1014,
18,
6011,
6315,
2738,
4672,
2,
... |
else: | elif refId is not None: | def _getCycles(self, index, cycleSets=None): # detect garbage cycles for a particular item of garbage assert self.notify.debugCall() # returns list of lists, sublists are garbage reference cycles cycles = [] # sets of cycle members, to avoid duplicates if cycleSets is None: cycleSets = [] stateStack = Stack() rootId = index stateStack.push(([rootId], rootId, 0)) while True: yield None if len(stateStack) == 0: break candidateCycle, curId, resumeIndex = stateStack.pop() if self.notify.getDebug(): print 'restart: %s root=%s cur=%s resume=%s' % ( candidateCycle, rootId, curId, resumeIndex) for index in xrange(resumeIndex, len(self.referentsByNumber[curId])): yield None refId = self.referentsByNumber[curId][index] if self.notify.getDebug(): print ' : %s -> %s' % (curId, refId) if refId == rootId: # we found a cycle! mark it down and move on to the next refId if not set(candidateCycle) in cycleSets: if self.notify.getDebug(): print ' FOUND: ', list(candidateCycle) + [refId] cycles.append(list(candidateCycle) + [refId]) cycleSets.append(set(candidateCycle)) elif refId in candidateCycle: pass else: # this refId does not complete a cycle. Mark down # where we are in this list of referents, then # start looking through the referents of the new refId stateStack.push((list(candidateCycle), curId, index+1)) stateStack.push((list(candidateCycle) + [refId], refId, 0)) break yield cycles | 0131783182b03e276b4eddac9e42891ddafb28c3 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7242/0131783182b03e276b4eddac9e42891ddafb28c3/GarbageReport.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
17992,
9558,
12,
2890,
16,
770,
16,
8589,
2785,
33,
7036,
4672,
468,
5966,
15340,
15139,
364,
279,
6826,
761,
434,
15340,
1815,
365,
18,
12336,
18,
4148,
1477,
1435,
468,
1135,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
17992,
9558,
12,
2890,
16,
770,
16,
8589,
2785,
33,
7036,
4672,
468,
5966,
15340,
15139,
364,
279,
6826,
761,
434,
15340,
1815,
365,
18,
12336,
18,
4148,
1477,
1435,
468,
1135,... |
'''Return the number of variables''' | '''Return the number of attributes''' | def numAttr(self): '''Return the number of variables''' #assert self.data.shape[1] == len(self.varNames) return len(self.dataDict) | 45268ff49ddb4f963530947d7202a5e0642e2fda /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2720/45268ff49ddb4f963530947d7202a5e0642e2fda/storage.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
818,
3843,
12,
2890,
4672,
9163,
990,
326,
1300,
434,
3152,
26418,
468,
11231,
365,
18,
892,
18,
4867,
63,
21,
65,
422,
562,
12,
2890,
18,
1401,
1557,
13,
327,
562,
12,
2890,
18,
892... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
818,
3843,
12,
2890,
4672,
9163,
990,
326,
1300,
434,
3152,
26418,
468,
11231,
365,
18,
892,
18,
4867,
63,
21,
65,
422,
562,
12,
2890,
18,
1401,
1557,
13,
327,
562,
12,
2890,
18,
892... |
py_compile.compile(fullname, None, dfile) | ok = py_compile.compile(fullname, None, dfile) | def compile_dir(dir, maxlevels=10, ddir=None, force=0): """Byte-compile all modules in the given directory tree. Arguments (only dir is required): dir: the directory to byte-compile maxlevels: maximum recursion level (default 10) ddir: if given, purported directory name (this is the directory name that will show up in error messages) force: if 1, force compilation, even if timestamps are up-to-date """ print 'Listing', dir, '...' try: names = os.listdir(dir) except os.error: print "Can't list", dir names = [] names.sort() success = 1 for name in names: fullname = os.path.join(dir, name) if ddir: dfile = os.path.join(ddir, name) else: dfile = None if os.path.isfile(fullname): head, tail = name[:-3], name[-3:] if tail == '.py': cfile = fullname + (__debug__ and 'c' or 'o') ftime = os.stat(fullname)[stat.ST_MTIME] try: ctime = os.stat(cfile)[stat.ST_MTIME] except os.error: ctime = 0 if (ctime > ftime) and not force: continue print 'Compiling', fullname, '...' try: py_compile.compile(fullname, None, dfile) except KeyboardInterrupt: raise KeyboardInterrupt except: if type(sys.exc_type) == type(''): exc_type_name = sys.exc_type else: exc_type_name = sys.exc_type.__name__ print 'Sorry:', exc_type_name + ':', print sys.exc_value success = 0 elif maxlevels > 0 and \ name != os.curdir and name != os.pardir and \ os.path.isdir(fullname) and \ not os.path.islink(fullname): compile_dir(fullname, maxlevels - 1, dfile, force) return success | 59776b466a8795b66b9c91444afb05cff217b099 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/59776b466a8795b66b9c91444afb05cff217b099/compileall.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4074,
67,
1214,
12,
1214,
16,
943,
12095,
33,
2163,
16,
302,
1214,
33,
7036,
16,
2944,
33,
20,
4672,
3536,
3216,
17,
11100,
777,
4381,
316,
326,
864,
1867,
2151,
18,
225,
13599,
261,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4074,
67,
1214,
12,
1214,
16,
943,
12095,
33,
2163,
16,
302,
1214,
33,
7036,
16,
2944,
33,
20,
4672,
3536,
3216,
17,
11100,
777,
4381,
316,
326,
864,
1867,
2151,
18,
225,
13599,
261,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.