rem stringlengths 2 226k | add stringlengths 0 227k | context stringlengths 8 228k | meta stringlengths 156 215 | input_ids list | attention_mask list | labels list |
|---|---|---|---|---|---|---|
block_auto_load = True, | block_auto_load = block_auto_load, | def _instance(cls, subject, vals, context = None, store = None): """ Create an instance from the `subject` and it's associated `concept` (`vals`) URIs. | d541fd4e6d6db6a036edb044a52cc83c9fb21f94 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13812/d541fd4e6d6db6a036edb044a52cc83c9fb21f94/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1336,
12,
6429,
16,
3221,
16,
5773,
16,
819,
273,
599,
16,
1707,
273,
599,
4672,
3536,
1788,
392,
791,
628,
326,
1375,
7857,
68,
471,
518,
1807,
3627,
1375,
25770,
68,
21863,
4524... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1336,
12,
6429,
16,
3221,
16,
5773,
16,
819,
273,
599,
16,
1707,
273,
599,
4672,
3536,
1788,
392,
791,
628,
326,
1375,
7857,
68,
471,
518,
1807,
3627,
1375,
25770,
68,
21863,
4524... |
if self.moh: extensions.appendExten(self.ext, "SetMusicOnHold(%s)" % self.moh) | def createAsteriskConfig(self): needModule("app_queue") needModule("res_monitor") | 9d4de284956523b5f2992f0d750ca7a716400d45 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2627/9d4de284956523b5f2992f0d750ca7a716400d45/cfg_phone_queue.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
37,
8190,
10175,
809,
12,
2890,
4672,
1608,
3120,
2932,
2910,
67,
4000,
7923,
1608,
3120,
2932,
455,
67,
10259,
7923,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
37,
8190,
10175,
809,
12,
2890,
4672,
1608,
3120,
2932,
2910,
67,
4000,
7923,
1608,
3120,
2932,
455,
67,
10259,
7923,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... | |
dl_file = wx.StaticText(self, wx.ID_ANY, _("Downloading: %s") % fname) dl_loc = wx.StaticText(self, wx.ID_ANY, | dl_file = wx.StaticText(self._panel, wx.ID_ANY, _("Downloading: %s") % fname) dl_loc = wx.StaticText(self._panel, wx.ID_ANY, | def __init__(self, parent, id, title, pos = wx.DefaultPosition, size = wx.DefaultSize, style = wx.DEFAULT_DIALOG_STYLE | wx.MINIMIZE_BOX): """Creates a standalone window that is used for downloading updates for the editor. """ wx.Frame.__init__(self, parent, id, title, pos, size, style) try: if wx.Platform == "__WXMSW__": ed_icon = ed_glob.CONFIG['SYSPIX_DIR'] + u"editra.ico" self.SetIcon(wx.Icon(ed_icon, wx.BITMAP_TYPE_ICO)) else: ed_icon = ed_glob.CONFIG['SYSPIX_DIR'] + u"editra.png" self.SetIcon(wx.Icon(ed_icon, wx.BITMAP_TYPE_PNG)) finally: pass | 843e5a514f51011229f95772d2def38c61b1b96d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3530/843e5a514f51011229f95772d2def38c61b1b96d/updater.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
982,
16,
612,
16,
2077,
16,
949,
273,
7075,
18,
1868,
2555,
16,
963,
273,
7075,
18,
1868,
1225,
16,
2154,
273,
7075,
18,
5280,
67,
2565,
18683,
67,
150... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
982,
16,
612,
16,
2077,
16,
949,
273,
7075,
18,
1868,
2555,
16,
963,
273,
7075,
18,
1868,
1225,
16,
2154,
273,
7075,
18,
5280,
67,
2565,
18683,
67,
150... |
retval = idaapi.gen_file(type, f, ea1, ea2, flags) | retval = idaapi.gen_file(filetype, f, ea1, ea2, flags) | def GenerateFile(type, path, ea1, ea2, flags): """ Generate an output file @param type: type of output file. One of OFILE_... symbols. See below. @param path: the output file path (will be overwritten!) @param ea1: start address. For some file types this argument is ignored @param ea2: end address. For some file types this argument is ignored @param flags: bit combination of GENFLG_... @returns: number of the generated lines. -1 if an error occured OFILE_EXE: 0-can't generate exe file, 1-ok """ f = idaapi.fopenWT(path) if f: retval = idaapi.gen_file(type, f, ea1, ea2, flags) idaapi.eclose(f) return retval else: return -1 | 244a3cd02a580c0095170004ec30e922f0d1a8a6 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6984/244a3cd02a580c0095170004ec30e922f0d1a8a6/idc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6654,
812,
12,
723,
16,
589,
16,
24164,
21,
16,
24164,
22,
16,
2943,
4672,
3536,
6654,
392,
876,
585,
225,
632,
891,
618,
30,
225,
618,
434,
876,
585,
18,
6942,
434,
531,
3776,
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,
6654,
812,
12,
723,
16,
589,
16,
24164,
21,
16,
24164,
22,
16,
2943,
4672,
3536,
6654,
392,
876,
585,
225,
632,
891,
618,
30,
225,
618,
434,
876,
585,
18,
6942,
434,
531,
3776,
67,
... |
logging.basicConfig(level=logging.DEBUG, format='%(asctime)s %(levelname)-8s %(message)s', filename=config.get(prefs.LOG_PATHNAME), filemode="w") console = logging.StreamHandler (sys.stdout) | def setup_logging (inDownloader=False): if inDownloader: logging.basicConfig(level=logging.INFO, format='%(levelname)-8s %(message)s', stream=sys.stdout) else: logging.basicConfig(level=logging.DEBUG, format='%(asctime)s %(levelname)-8s %(message)s', filename=config.get(prefs.LOG_PATHNAME), filemode="w") console = logging.StreamHandler (sys.stdout) if config.get(prefs.APP_VERSION).endswith("svn"): level = logging.DEBUG else: level = logging.WARN console.setLevel(level) formatter = logging.Formatter('%(levelname)-8s %(message)s') console.setFormatter(formatter) logging.getLogger('').addHandler(console) | 02650981ccb380102a4d2e42d5927ca0107f77e6 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12354/02650981ccb380102a4d2e42d5927ca0107f77e6/utils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3875,
67,
11167,
261,
267,
4164,
6714,
33,
8381,
4672,
309,
316,
4164,
6714,
30,
2907,
18,
13240,
809,
12,
2815,
33,
11167,
18,
5923,
16,
740,
2218,
17105,
31994,
24950,
28,
87,
8975,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3875,
67,
11167,
261,
267,
4164,
6714,
33,
8381,
4672,
309,
316,
4164,
6714,
30,
2907,
18,
13240,
809,
12,
2815,
33,
11167,
18,
5923,
16,
740,
2218,
17105,
31994,
24950,
28,
87,
8975,
... | |
((1, 3), 2) ((1, 0), 2) ((0, 2), 3) | def out_degree_iterator(self, vertices=None, labels=False): """ Same as degree_iterator, but for out degree. EXAMPLES: sage: D = graphs.Grid2dGraph(2,4).to_directed() sage: for i in D.out_degree_iterator(): ... print i 3 3 2 2 3 2 2 3 sage: for i in D.out_degree_iterator(labels=True): ... print i ((0, 1), 3) ((1, 2), 3) ((0, 0), 2) ((0, 3), 2) ((1, 1), 3) ((1, 3), 2) ((1, 0), 2) ((0, 2), 3) | c6ee9b8c95a50319119e91b8cfe37d340af4ae88 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/c6ee9b8c95a50319119e91b8cfe37d340af4ae88/graph.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
596,
67,
21361,
67,
9838,
12,
2890,
16,
6928,
33,
7036,
16,
3249,
33,
8381,
4672,
3536,
17795,
487,
10782,
67,
9838,
16,
1496,
364,
596,
10782,
18,
225,
5675,
8900,
11386,
30,
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,
596,
67,
21361,
67,
9838,
12,
2890,
16,
6928,
33,
7036,
16,
3249,
33,
8381,
4672,
3536,
17795,
487,
10782,
67,
9838,
16,
1496,
364,
596,
10782,
18,
225,
5675,
8900,
11386,
30,
272,
410... | |
raise osv.except_osv(_('Error !'), _('You can not modify an entry in a confirmed timesheet !')) | raise osv.except_osv(_('Error !'), _('You cannot modify an entry in a confirmed timesheet !')) | def _check(self, cr, uid, ids): for att in self.browse(cr, uid, ids): if att.sheet_id and att.sheet_id.state not in ('draft', 'new'): raise osv.except_osv(_('Error !'), _('You can not modify an entry in a confirmed timesheet !')) return True | b563f23652c9dbc74e61cb4facfce4e6c07d4b66 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/b563f23652c9dbc74e61cb4facfce4e6c07d4b66/hr_timesheet_sheet.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1893,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
4672,
364,
2403,
316,
365,
18,
25731,
12,
3353,
16,
4555,
16,
3258,
4672,
309,
2403,
18,
8118,
67,
350,
471,
2403,
18,
8118,
67,
35... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1893,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
4672,
364,
2403,
316,
365,
18,
25731,
12,
3353,
16,
4555,
16,
3258,
4672,
309,
2403,
18,
8118,
67,
350,
471,
2403,
18,
8118,
67,
35... |
def testSocketServer(self): | def test_socketserver(self): """Using a SocketServer to create and manage SSL connections.""" | def testSocketServer(self): | f08683542eada763321715f558eac5b2baec28e9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12029/f08683542eada763321715f558eac5b2baec28e9/test_ssl.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
4534,
2081,
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,
1842,
4534,
2081,
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,
-... |
self.ownTarget = properties.getValue(Log.TARGET_PROPERTY_PREFIX+path) | self.ownTarget = properties.getValue(Log.TARGET_PROPERTY_PREFIX+path.lower()) | def __init__(self,path,properties=None,options=None): self.path = path self.fh = None self.inode = None self.size = None self.loglevel = None self.properties = properties self.ownOutputColor = None self.ownTarget = None self.inactivityTimer = None self.inactivityAccTime = 0 self.mailTimer = Timer(60) self.mailTimer.startTimer() if properties: self.ownOutputColor = properties.getValue(path.lower()) self.ownTarget = properties.getValue(Log.TARGET_PROPERTY_PREFIX+path) if options and options.inactivity: self.inactivityTimer = Timer(float(options.inactivity)) self.inactivityTimer.startTimer() self.triggeredNotSent = False | b2db6cb08859edd6f97df241c9016290bb2fc399 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5602/b2db6cb08859edd6f97df241c9016290bb2fc399/Log.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
803,
16,
4738,
33,
7036,
16,
2116,
33,
7036,
4672,
365,
18,
803,
273,
589,
365,
18,
19260,
273,
599,
365,
18,
267,
390,
273,
599,
365,
18,
1467,
273,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
803,
16,
4738,
33,
7036,
16,
2116,
33,
7036,
4672,
365,
18,
803,
273,
589,
365,
18,
19260,
273,
599,
365,
18,
267,
390,
273,
599,
365,
18,
1467,
273,
... |
self.Refresh() | self.Refresh() | def update(self): #print 'update' #print 'plot_canvas.update:', self self.client_size = (0,0) # forces the layout self.Refresh() | a213b5ad25e11f85b416deac9b90f96de37b72ae /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/a213b5ad25e11f85b416deac9b90f96de37b72ae/wxplt.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
12,
2890,
4672,
468,
1188,
296,
2725,
11,
468,
1188,
296,
4032,
67,
15424,
18,
2725,
30,
2187,
365,
365,
18,
2625,
67,
1467,
273,
261,
20,
16,
20,
13,
468,
26376,
326,
3511,
36... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4672,
468,
1188,
296,
2725,
11,
468,
1188,
296,
4032,
67,
15424,
18,
2725,
30,
2187,
365,
365,
18,
2625,
67,
1467,
273,
261,
20,
16,
20,
13,
468,
26376,
326,
3511,
36... |
IEEEFormatTestCase, IEEEOperationsTestCase, ) | IEEEFormatTestCase) | def test_main(): test_support.run_unittest( FormatFunctionsTestCase, UnknownFormatTestCase, IEEEFormatTestCase, IEEEOperationsTestCase, ) | 348dc88097412cc229254f20f2759ce4cd192261 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/348dc88097412cc229254f20f2759ce4cd192261/test_float.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
5254,
13332,
1842,
67,
13261,
18,
2681,
67,
4873,
3813,
12,
4077,
7503,
4709,
2449,
16,
9077,
1630,
4709,
2449,
16,
467,
9383,
41,
1630,
4709,
2449,
13,
225,
2,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
5254,
13332,
1842,
67,
13261,
18,
2681,
67,
4873,
3813,
12,
4077,
7503,
4709,
2449,
16,
9077,
1630,
4709,
2449,
16,
467,
9383,
41,
1630,
4709,
2449,
13,
225,
2,
-100,
-100,
-... |
return self.path=="*" or re.match(self.path, filename) | return self.path=="*" or filename.startswith(self.path) | def applies_to(self, filename): return self.path=="*" or re.match(self.path, filename) | 9f86ae009f1e74ee040c0d6e683bcba6894a674b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4845/9f86ae009f1e74ee040c0d6e683bcba6894a674b/robotparser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10294,
67,
869,
12,
2890,
16,
1544,
4672,
327,
365,
18,
803,
31713,
7388,
578,
283,
18,
1916,
12,
2890,
18,
803,
16,
1544,
13,
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,
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,
10294,
67,
869,
12,
2890,
16,
1544,
4672,
327,
365,
18,
803,
31713,
7388,
578,
283,
18,
1916,
12,
2890,
18,
803,
16,
1544,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
def create_channel(key, label, name, summary, arch, parent): | def create_channel(key, label, channels, name, summary, arch, parent): | def create_channel(key, label, name, summary, arch, parent): '''Creates a temporary channel, then clones it with GPG key location, then deletes temp channel''' if PLATFORM_INDEPENDENT in label: channel_map = { 'name' : name, 'label' : label, 'summary' : summary, 'parent_label' : parent, 'gpg_url' : options.gpg_url + 'RPM-GPG-KEY-libsmbios' } else: channel_map = { 'name' : name, 'label' : label, 'summary' : summary, 'parent_label' : parent, 'gpg_url' : options.gpg_url + 'RPM-GPG-KEY-dell' } try: if options.verbose: print timestamp(), "+ Creating temporary channel:", label + '-tmp' if options.debug: print timestamp(), "DEBUG: Running: client.channel.software.create(", key, label + '-tmp', name + '-tmp', summary, arch, parent, ")" client.channel.software.create(key, label + '-tmp', name + '-tmp', summary, arch, parent) except: print timestamp(), "! Error creating temporary channel:", label + '-tmp' raise try: if options.verbose: print timestamp(), "+ Cloning temporary channel into real channel:", label if options.debug: print timestamp(), "+ Running: client.channel.software.clone(", key, label + '-tmp', channel_map, True, ")" client.channel.software.clone(key, label + '-tmp', channel_map, True) except: print timestamp(), "! Error cloning channel:", label raise try: if options.verbose: print timestamp(), "+ Deleting temporary channel:", label + '-tmp' if options.debug: print timestamp(), "+ Running: client.channel.software.delete(", key, label + '-tmp', ")" client.channel.software.delete(key, label + '-tmp') except: print timestamp(), "! Error deleting channel:", label + '-tmp' raise | 47bf7c5912da2993d3407be03ab7a0b52c21819b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3457/47bf7c5912da2993d3407be03ab7a0b52c21819b/dell-satellite-sync.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
67,
4327,
12,
856,
16,
1433,
16,
5750,
16,
508,
16,
4916,
16,
6637,
16,
982,
4672,
9163,
2729,
279,
6269,
1904,
16,
1508,
927,
5322,
518,
598,
28378,
498,
2117,
16,
1508,
9792,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
67,
4327,
12,
856,
16,
1433,
16,
5750,
16,
508,
16,
4916,
16,
6637,
16,
982,
4672,
9163,
2729,
279,
6269,
1904,
16,
1508,
927,
5322,
518,
598,
28378,
498,
2117,
16,
1508,
9792,
... |
sage: eg = euler_gamma + euler_gamma;eg (euler_gamma + euler_gamma) | sage: eg = euler_gamma + euler_gamma; eg 2*euler_gamma | def floor(self): return Integer(0) | b4b3245d1251e91c0a285bb11f7d5d67dd1a7536 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/b4b3245d1251e91c0a285bb11f7d5d67dd1a7536/constants.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6346,
12,
2890,
4672,
327,
2144,
12,
20,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6346,
12,
2890,
4672,
327,
2144,
12,
20,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
buf += " .stop_session = " + fabric_mod_name + "_stop_session,\n" buf += " .fall_back_to_erl0 = " + fabric_mod_name + "_reset_nexus,\n" buf += " .sess_logged_in = " + fabric_mod_name + "_sess_logged_in,\n" | def tcm_mod_build_configfs(proto_ident, fabric_mod_dir_var, fabric_mod_name): buf = "" f = fabric_mod_dir_var + "/" + fabric_mod_name + "_configfs.c" print "Writing file: " + f p = open(f, 'w'); if not p: tcm_mod_err("Unable to open file: " + f) buf = "#include <linux/module.h>\n" buf += "#include <linux/moduleparam.h>\n" buf += "#include <linux/version.h>\n" buf += "#include <generated/utsrelease.h>\n" buf += "#include <linux/utsname.h>\n" buf += "#include <linux/init.h>\n" buf += "#include <linux/slab.h>\n" buf += "#include <linux/kthread.h>\n" buf += "#include <linux/types.h>\n" buf += "#include <linux/string.h>\n" buf += "#include <linux/configfs.h>\n" buf += "#include <linux/ctype.h>\n" buf += "#include <asm/unaligned.h>\n\n" buf += "#include <target/target_core_base.h>\n" buf += "#include <target/target_core_fabric.h>\n" buf += "#include <target/target_core_fabric_configfs.h>\n" buf += "#include <target/target_core_configfs.h>\n" buf += "#include <target/configfs_macros.h>\n\n" buf += "#include \"" + fabric_mod_name + "_base.h\"\n" buf += "#include \"" + fabric_mod_name + "_fabric.h\"\n\n" buf += "/* Local pointer to allocated TCM configfs fabric module */\n" buf += "struct target_fabric_configfs *" + fabric_mod_name + "_fabric_configfs;\n\n" buf += "static struct se_node_acl *" + fabric_mod_name + "_make_nodeacl(\n" buf += " struct se_portal_group *se_tpg,\n" buf += " struct config_group *group,\n" buf += " const char *name)\n" buf += "{\n" buf += " struct se_node_acl *se_nacl, *se_nacl_new;\n" buf += " struct " + fabric_mod_name + "_nacl *nacl;\n" if proto_ident == "FC" or proto_ident == "SAS": buf += " u64 wwpn = 0;\n" buf += " u32 nexus_depth;\n\n" buf += " /* " + fabric_mod_name + "_parse_wwn(name, &wwpn, 1) < 0)\n" buf += " return ERR_PTR(-EINVAL); */\n" buf += " se_nacl_new = " + fabric_mod_name + "_alloc_fabric_acl(se_tpg);\n" buf += " if (!se_nacl_new)\n" buf += " return ERR_PTR(-ENOMEM);\n" buf += "//#warning FIXME: Hardcoded nexus depth in " + fabric_mod_name + "_make_nodeacl()\n" buf += " nexus_depth = 1;\n" buf += " /*\n" buf += " * se_nacl_new may be released by core_tpg_add_initiator_node_acl()\n" buf += " * when converting a NodeACL from demo mode -> explict\n" buf += " */\n" buf += " se_nacl = core_tpg_add_initiator_node_acl(se_tpg, se_nacl_new,\n" buf += " name, nexus_depth);\n" buf += " if (IS_ERR(se_nacl)) {\n" buf += " " + fabric_mod_name + "_release_fabric_acl(se_tpg, se_nacl_new);\n" buf += " return se_nacl;\n" buf += " }\n" buf += " /*\n" buf += " * Locate our struct " + fabric_mod_name + "_nacl and set the FC Nport WWPN\n" buf += " */\n" buf += " nacl = container_of(se_nacl, struct " + fabric_mod_name + "_nacl, se_node_acl);\n" if proto_ident == "FC" or proto_ident == "SAS": buf += " nacl->" + fabric_mod_init_port + "_wwpn = wwpn;\n" buf += " /* " + fabric_mod_name + "_format_wwn(&nacl->" + fabric_mod_init_port + "_name[0], " + fabric_mod_name.upper() + "_NAMELEN, wwpn); */\n\n" buf += " return se_nacl;\n" buf += "}\n\n" buf += "static void " + fabric_mod_name + "_drop_nodeacl(struct se_node_acl *se_acl)\n" buf += "{\n" buf += " struct " + fabric_mod_name + "_nacl *nacl = container_of(se_acl,\n" buf += " struct " + fabric_mod_name + "_nacl, se_node_acl);\n" buf += " core_tpg_del_initiator_node_acl(se_acl->se_tpg, se_acl, 1);\n" buf += " kfree(nacl);\n" buf += "}\n\n" buf += "static struct se_portal_group *" + fabric_mod_name + "_make_tpg(\n" buf += " struct se_wwn *wwn,\n" buf += " struct config_group *group,\n" buf += " const char *name)\n" buf += "{\n" buf += " struct " + fabric_mod_name + "_" + fabric_mod_port + "*" + fabric_mod_port + " = container_of(wwn,\n" buf += " struct " + fabric_mod_name + "_" + fabric_mod_port + ", " + fabric_mod_port + "_wwn);\n\n" buf += " struct " + fabric_mod_name + "_tpg *tpg;\n" buf += " unsigned long tpgt;\n" buf += " int ret;\n\n" buf += " if (strstr(name, \"tpgt_\") != name)\n" buf += " return ERR_PTR(-EINVAL);\n" buf += " if (kstrtoul(name + 5, 10, &tpgt) || tpgt > UINT_MAX)\n" buf += " return ERR_PTR(-EINVAL);\n\n" buf += " tpg = kzalloc(sizeof(struct " + fabric_mod_name + "_tpg), GFP_KERNEL);\n" buf += " if (!tpg) {\n" buf += " printk(KERN_ERR \"Unable to allocate struct " + fabric_mod_name + "_tpg\");\n" buf += " return ERR_PTR(-ENOMEM);\n" buf += " }\n" buf += " tpg->" + fabric_mod_port + " = " + fabric_mod_port + ";\n" buf += " tpg->" + fabric_mod_port + "_tpgt = tpgt;\n\n" buf += " ret = core_tpg_register(&" + fabric_mod_name + "_fabric_configfs->tf_ops, wwn,\n" buf += " &tpg->se_tpg, (void *)tpg,\n" buf += " TRANSPORT_TPG_TYPE_NORMAL);\n" buf += " if (ret < 0) {\n" buf += " kfree(tpg);\n" buf += " return NULL;\n" buf += " }\n" buf += " return &tpg->se_tpg;\n" buf += "}\n\n" buf += "static void " + fabric_mod_name + "_drop_tpg(struct se_portal_group *se_tpg)\n" buf += "{\n" buf += " struct " + fabric_mod_name + "_tpg *tpg = container_of(se_tpg,\n" buf += " struct " + fabric_mod_name + "_tpg, se_tpg);\n\n" buf += " core_tpg_deregister(se_tpg);\n" buf += " kfree(tpg);\n" buf += "}\n\n" buf += "static struct se_wwn *" + fabric_mod_name + "_make_" + fabric_mod_port + "(\n" buf += " struct target_fabric_configfs *tf,\n" buf += " struct config_group *group,\n" buf += " const char *name)\n" buf += "{\n" buf += " struct " + fabric_mod_name + "_" + fabric_mod_port + " *" + fabric_mod_port + ";\n" if proto_ident == "FC" or proto_ident == "SAS": buf += " u64 wwpn = 0;\n\n" buf += " /* if (" + fabric_mod_name + "_parse_wwn(name, &wwpn, 1) < 0)\n" buf += " return ERR_PTR(-EINVAL); */\n\n" buf += " " + fabric_mod_port + " = kzalloc(sizeof(struct " + fabric_mod_name + "_" + fabric_mod_port + "), GFP_KERNEL);\n" buf += " if (!" + fabric_mod_port + ") {\n" buf += " printk(KERN_ERR \"Unable to allocate struct " + fabric_mod_name + "_" + fabric_mod_port + "\");\n" buf += " return ERR_PTR(-ENOMEM);\n" buf += " }\n" if proto_ident == "FC" or proto_ident == "SAS": buf += " " + fabric_mod_port + "->" + fabric_mod_port + "_wwpn = wwpn;\n" buf += " /* " + fabric_mod_name + "_format_wwn(&" + fabric_mod_port + "->" + fabric_mod_port + "_name[0], " + fabric_mod_name.upper() + "_NAMELEN, wwpn); */\n\n" buf += " return &" + fabric_mod_port + "->" + fabric_mod_port + "_wwn;\n" buf += "}\n\n" buf += "static void " + fabric_mod_name + "_drop_" + fabric_mod_port + "(struct se_wwn *wwn)\n" buf += "{\n" buf += " struct " + fabric_mod_name + "_" + fabric_mod_port + " *" + fabric_mod_port + " = container_of(wwn,\n" buf += " struct " + fabric_mod_name + "_" + fabric_mod_port + ", " + fabric_mod_port + "_wwn);\n" buf += " kfree(" + fabric_mod_port + ");\n" buf += "}\n\n" buf += "static ssize_t " + fabric_mod_name + "_wwn_show_attr_version(\n" buf += " struct target_fabric_configfs *tf,\n" buf += " char *page)\n" buf += "{\n" buf += " return sprintf(page, \"" + fabric_mod_name.upper() + " fabric module %s on %s/%s\"\n" buf += " \"on \"UTS_RELEASE\"\\n\", " + fabric_mod_name.upper() + "_VERSION, utsname()->sysname,\n" buf += " utsname()->machine);\n" buf += "}\n\n" buf += "TF_WWN_ATTR_RO(" + fabric_mod_name + ", version);\n\n" buf += "static struct configfs_attribute *" + fabric_mod_name + "_wwn_attrs[] = {\n" buf += " &" + fabric_mod_name + "_wwn_version.attr,\n" buf += " NULL,\n" buf += "};\n\n" buf += "static struct target_core_fabric_ops " + fabric_mod_name + "_ops = {\n" buf += " .get_fabric_name = " + fabric_mod_name + "_get_fabric_name,\n" buf += " .get_fabric_proto_ident = " + fabric_mod_name + "_get_fabric_proto_ident,\n" buf += " .tpg_get_wwn = " + fabric_mod_name + "_get_fabric_wwn,\n" buf += " .tpg_get_tag = " + fabric_mod_name + "_get_tag,\n" buf += " .tpg_get_default_depth = " + fabric_mod_name + "_get_default_depth,\n" buf += " .tpg_get_pr_transport_id = " + fabric_mod_name + "_get_pr_transport_id,\n" buf += " .tpg_get_pr_transport_id_len = " + fabric_mod_name + "_get_pr_transport_id_len,\n" buf += " .tpg_parse_pr_out_transport_id = " + fabric_mod_name + "_parse_pr_out_transport_id,\n" buf += " .tpg_check_demo_mode = " + fabric_mod_name + "_check_false,\n" buf += " .tpg_check_demo_mode_cache = " + fabric_mod_name + "_check_true,\n" buf += " .tpg_check_demo_mode_write_protect = " + fabric_mod_name + "_check_true,\n" buf += " .tpg_check_prod_mode_write_protect = " + fabric_mod_name + "_check_false,\n" buf += " .tpg_alloc_fabric_acl = " + fabric_mod_name + "_alloc_fabric_acl,\n" buf += " .tpg_release_fabric_acl = " + fabric_mod_name + "_release_fabric_acl,\n" buf += " .tpg_get_inst_index = " + fabric_mod_name + "_tpg_get_inst_index,\n" buf += " .release_cmd = " + fabric_mod_name + "_release_cmd,\n" buf += " .shutdown_session = " + fabric_mod_name + "_shutdown_session,\n" buf += " .close_session = " + fabric_mod_name + "_close_session,\n" buf += " .stop_session = " + fabric_mod_name + "_stop_session,\n" buf += " .fall_back_to_erl0 = " + fabric_mod_name + "_reset_nexus,\n" buf += " .sess_logged_in = " + fabric_mod_name + "_sess_logged_in,\n" buf += " .sess_get_index = " + fabric_mod_name + "_sess_get_index,\n" buf += " .sess_get_initiator_sid = NULL,\n" buf += " .write_pending = " + fabric_mod_name + "_write_pending,\n" buf += " .write_pending_status = " + fabric_mod_name + "_write_pending_status,\n" buf += " .set_default_node_attributes = " + fabric_mod_name + "_set_default_node_attrs,\n" buf += " .get_task_tag = " + fabric_mod_name + "_get_task_tag,\n" buf += " .get_cmd_state = " + fabric_mod_name + "_get_cmd_state,\n" buf += " .queue_data_in = " + fabric_mod_name + "_queue_data_in,\n" buf += " .queue_status = " + fabric_mod_name + "_queue_status,\n" buf += " .queue_tm_rsp = " + fabric_mod_name + "_queue_tm_rsp,\n" buf += " .is_state_remove = " + fabric_mod_name + "_is_state_remove,\n" buf += " /*\n" buf += " * Setup function pointers for generic logic in target_core_fabric_configfs.c\n" buf += " */\n" buf += " .fabric_make_wwn = " + fabric_mod_name + "_make_" + fabric_mod_port + ",\n" buf += " .fabric_drop_wwn = " + fabric_mod_name + "_drop_" + fabric_mod_port + ",\n" buf += " .fabric_make_tpg = " + fabric_mod_name + "_make_tpg,\n" buf += " .fabric_drop_tpg = " + fabric_mod_name + "_drop_tpg,\n" buf += " .fabric_post_link = NULL,\n" buf += " .fabric_pre_unlink = NULL,\n" buf += " .fabric_make_np = NULL,\n" buf += " .fabric_drop_np = NULL,\n" buf += " .fabric_make_nodeacl = " + fabric_mod_name + "_make_nodeacl,\n" buf += " .fabric_drop_nodeacl = " + fabric_mod_name + "_drop_nodeacl,\n" buf += "};\n\n" buf += "static int " + fabric_mod_name + "_register_configfs(void)\n" buf += "{\n" buf += " struct target_fabric_configfs *fabric;\n" buf += " int ret;\n\n" buf += " printk(KERN_INFO \"" + fabric_mod_name.upper() + " fabric module %s on %s/%s\"\n" buf += " \" on \"UTS_RELEASE\"\\n\"," + fabric_mod_name.upper() + "_VERSION, utsname()->sysname,\n" buf += " utsname()->machine);\n" buf += " /*\n" buf += " * Register the top level struct config_item_type with TCM core\n" buf += " */\n" buf += " fabric = target_fabric_configfs_init(THIS_MODULE, \"" + fabric_mod_name[4:] + "\");\n" buf += " if (IS_ERR(fabric)) {\n" buf += " printk(KERN_ERR \"target_fabric_configfs_init() failed\\n\");\n" buf += " return PTR_ERR(fabric);\n" buf += " }\n" buf += " /*\n" buf += " * Setup fabric->tf_ops from our local " + fabric_mod_name + "_ops\n" buf += " */\n" buf += " fabric->tf_ops = " + fabric_mod_name + "_ops;\n" buf += " /*\n" buf += " * Setup default attribute lists for various fabric->tf_cit_tmpl\n" buf += " */\n" buf += " fabric->tf_cit_tmpl.tfc_wwn_cit.ct_attrs = " + fabric_mod_name + "_wwn_attrs;\n" buf += " fabric->tf_cit_tmpl.tfc_tpg_base_cit.ct_attrs = NULL;\n" buf += " fabric->tf_cit_tmpl.tfc_tpg_attrib_cit.ct_attrs = NULL;\n" buf += " fabric->tf_cit_tmpl.tfc_tpg_param_cit.ct_attrs = NULL;\n" buf += " fabric->tf_cit_tmpl.tfc_tpg_np_base_cit.ct_attrs = NULL;\n" buf += " fabric->tf_cit_tmpl.tfc_tpg_nacl_base_cit.ct_attrs = NULL;\n" buf += " fabric->tf_cit_tmpl.tfc_tpg_nacl_attrib_cit.ct_attrs = NULL;\n" buf += " fabric->tf_cit_tmpl.tfc_tpg_nacl_auth_cit.ct_attrs = NULL;\n" buf += " fabric->tf_cit_tmpl.tfc_tpg_nacl_param_cit.ct_attrs = NULL;\n" buf += " /*\n" buf += " * Register the fabric for use within TCM\n" buf += " */\n" buf += " ret = target_fabric_configfs_register(fabric);\n" buf += " if (ret < 0) {\n" buf += " printk(KERN_ERR \"target_fabric_configfs_register() failed\"\n" buf += " \" for " + fabric_mod_name.upper() + "\\n\");\n" buf += " return ret;\n" buf += " }\n" buf += " /*\n" buf += " * Setup our local pointer to *fabric\n" buf += " */\n" buf += " " + fabric_mod_name + "_fabric_configfs = fabric;\n" buf += " printk(KERN_INFO \"" + fabric_mod_name.upper() + "[0] - Set fabric -> " + fabric_mod_name + "_fabric_configfs\\n\");\n" buf += " return 0;\n" buf += "};\n\n" buf += "static void __exit " + fabric_mod_name + "_deregister_configfs(void)\n" buf += "{\n" buf += " if (!" + fabric_mod_name + "_fabric_configfs)\n" buf += " return;\n\n" buf += " target_fabric_configfs_deregister(" + fabric_mod_name + "_fabric_configfs);\n" buf += " " + fabric_mod_name + "_fabric_configfs = NULL;\n" buf += " printk(KERN_INFO \"" + fabric_mod_name.upper() + "[0] - Cleared " + fabric_mod_name + "_fabric_configfs\\n\");\n" buf += "};\n\n" buf += "static int __init " + fabric_mod_name + "_init(void)\n" buf += "{\n" buf += " int ret;\n\n" buf += " ret = " + fabric_mod_name + "_register_configfs();\n" buf += " if (ret < 0)\n" buf += " return ret;\n\n" buf += " return 0;\n" buf += "};\n\n" buf += "static void __exit " + fabric_mod_name + "_exit(void)\n" buf += "{\n" buf += " " + fabric_mod_name + "_deregister_configfs();\n" buf += "};\n\n" buf += "MODULE_DESCRIPTION(\"" + fabric_mod_name.upper() + " series fabric driver\");\n" buf += "MODULE_LICENSE(\"GPL\");\n" buf += "module_init(" + fabric_mod_name + "_init);\n" buf += "module_exit(" + fabric_mod_name + "_exit);\n" ret = p.write(buf) if ret: tcm_mod_err("Unable to write f: " + f) p.close() return | 8b55836b9045a75a0b74cb25d8a39f3bc6e2ea50 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5327/8b55836b9045a75a0b74cb25d8a39f3bc6e2ea50/tcm_mod_builder.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1715,
81,
67,
1711,
67,
3510,
67,
1425,
2556,
12,
9393,
67,
6392,
16,
21127,
67,
1711,
67,
1214,
67,
1401,
16,
21127,
67,
1711,
67,
529,
4672,
1681,
273,
1408,
225,
284,
273,
21127,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1715,
81,
67,
1711,
67,
3510,
67,
1425,
2556,
12,
9393,
67,
6392,
16,
21127,
67,
1711,
67,
1214,
67,
1401,
16,
21127,
67,
1711,
67,
529,
4672,
1681,
273,
1408,
225,
284,
273,
21127,
... | |
_lock = None | if thread: _lock = threading.RLock() else: _lock = None | def addLevelName(level, levelName): """ Associate 'levelName' with 'level'. This is used when converting levels to text during message formatting. """ _acquireLock() try: #unlikely to cause an exception, but you never know... _levelNames[level] = levelName _levelNames[levelName] = level finally: _releaseLock() | e9c5a0410e55a7ef5a3ca9cab1df46ecfeb367a2 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8546/e9c5a0410e55a7ef5a3ca9cab1df46ecfeb367a2/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
2355,
461,
12,
2815,
16,
1801,
461,
4672,
3536,
14008,
296,
2815,
461,
11,
598,
296,
2815,
10332,
225,
1220,
353,
1399,
1347,
14540,
7575,
358,
977,
4982,
883,
10407,
18,
3536,
389,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
2355,
461,
12,
2815,
16,
1801,
461,
4672,
3536,
14008,
296,
2815,
461,
11,
598,
296,
2815,
10332,
225,
1220,
353,
1399,
1347,
14540,
7575,
358,
977,
4982,
883,
10407,
18,
3536,
389,... |
from sage.misc.misc import delete_tmpfiles delete_tmpfiles() | def quit_sage(verbose=True): """ If you use SAGE in library mode, you should call this function when your application quits. It makes sure any child processes are also killed, etc. """ if verbose: t1 = cputime(_cpu_time_) t1m = int(t1/60); t1s=t1-t1m*60 t2 = walltime(_wall_time_) t2m = int(t2/60); t2s=t2-t2m*60 print "Exiting SAGE (CPU time %sm%.2fs, Wall time %sm%.2fs)."%( t1m,t1s,t2m,t2s) from sage.interfaces.quit import expect_quitall expect_quitall(verbose=verbose) # The following code close all open file descriptors, # so that on shared file systems the delete_tmpfiles # command below works. # AUTHOR: # * Kate Minola (2007-05-03) import resource # Resource usage information. maxfd = resource.getrlimit(resource.RLIMIT_NOFILE)[1] if maxfd != resource.RLIM_INFINITY: # Iterate through and close all file descriptors. for fd in range(0, maxfd): try: os.close(fd) except OSError: # ERROR, fd wasn't open to begin with (ignored) pass # Now delete the temp files from sage.misc.misc import delete_tmpfiles delete_tmpfiles() try: # stop the twisted reactor from twisted.internet import reactor if reactor.running: reactor.callFromThread(reactor.stop) except ImportError: pass | 850ed059b068072a18c7492a9293c940b95bde7c /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/850ed059b068072a18c7492a9293c940b95bde7c/all.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9706,
67,
87,
410,
12,
11369,
33,
5510,
4672,
3536,
971,
1846,
999,
348,
2833,
316,
5313,
1965,
16,
1846,
1410,
745,
333,
445,
1347,
3433,
2521,
719,
1282,
18,
225,
2597,
7297,
3071,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9706,
67,
87,
410,
12,
11369,
33,
5510,
4672,
3536,
971,
1846,
999,
348,
2833,
316,
5313,
1965,
16,
1846,
1410,
745,
333,
445,
1347,
3433,
2521,
719,
1282,
18,
225,
2597,
7297,
3071,
1... | |
base = '/'.join(path[:-1]) + '/' | base = '/'.join(path[:-1]) + '/' | def __init__(self, argv, base=None): """ All operation that Buxon need to run """ try: global widgets global callbacks global buxon if (base == None): path = __file__.split('/') base = '/'.join(path[:-1]) + '/' widgets = ObjectBuilder(base + 'includes/ui/graphical/buxon.glade') callbacks = Callbacks() widgets.signal_autoconnect(Callbacks.__dict__) buxon = Buxon(base) if ('-h' in argv or '--help' in argv): buxon.usage() if (len(argv)>0): buxon.main(argv[0]) else: buxon.main() except KeyboardInterrupt: print 'Received Ctrl+C or another break signal. Exiting...' sys.exit() | c08d158defc83ac14f33215ce56a545df7f37fef /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2232/c08d158defc83ac14f33215ce56a545df7f37fef/buxon.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
5261,
16,
1026,
33,
7036,
4672,
3536,
4826,
1674,
716,
605,
2616,
265,
1608,
358,
1086,
3536,
225,
775,
30,
2552,
10965,
2552,
6689,
2552,
324,
2616,
265,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5261,
16,
1026,
33,
7036,
4672,
3536,
4826,
1674,
716,
605,
2616,
265,
1608,
358,
1086,
3536,
225,
775,
30,
2552,
10965,
2552,
6689,
2552,
324,
2616,
265,
... |
a, b = eqs.equations() | eqs.finalise() a, b = eqs.reduced_equations() | def exercise_normal_equations_separating_scale_factor(): eqs = lstbx.normal_equations_separating_scale_factor(3) eqs.add_equation(y_calc=1, grad_y_calc=flex.double((1, 2, 3)), y_obs=1, weight=1) a, b = eqs.equations() assert a.size() == 6 assert list(b) == [0, 0, 0] | 6c9b2325c50aaa75ab72d901ad27c116731cdf8e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/696/6c9b2325c50aaa75ab72d901ad27c116731cdf8e/tst_normal_equations.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
24165,
67,
6130,
67,
14298,
1012,
67,
16627,
1776,
67,
5864,
67,
6812,
13332,
7555,
87,
273,
9441,
70,
92,
18,
6130,
67,
14298,
1012,
67,
16627,
1776,
67,
5864,
67,
6812,
12,
23,
13,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
24165,
67,
6130,
67,
14298,
1012,
67,
16627,
1776,
67,
5864,
67,
6812,
13332,
7555,
87,
273,
9441,
70,
92,
18,
6130,
67,
14298,
1012,
67,
16627,
1776,
67,
5864,
67,
6812,
12,
23,
13,
... |
self._mergePackage(fromId, toId, partPackages, packageClasses) | self._mergePackage(fromId, toId, partPackages, packageClasses, None) | def _optimizePackages(self, packageClasses, packageUsers, partPackages, variants, minPackageSize): # Support for merging small packages # The first common package before the selected package between two # or more parts is allowed to merge with. As the package which should be merged # may have requirements, these must be solved. The easiest way to be sure regarding # this issue, is to look out for another common package. | 4c33c51127eb20d83847a720ca9b676e0d1feb8e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5718/4c33c51127eb20d83847a720ca9b676e0d1feb8e/PartBuilder.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
29155,
11425,
12,
2890,
16,
2181,
4818,
16,
2181,
6588,
16,
1087,
11425,
16,
12935,
16,
1131,
2261,
1225,
4672,
468,
13619,
364,
17256,
5264,
5907,
468,
1021,
1122,
2975,
2181,
1865,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
29155,
11425,
12,
2890,
16,
2181,
4818,
16,
2181,
6588,
16,
1087,
11425,
16,
12935,
16,
1131,
2261,
1225,
4672,
468,
13619,
364,
17256,
5264,
5907,
468,
1021,
1122,
2975,
2181,
1865,
... |
self.result = self.fontlist.get() | self.result = self.fontlist.chosen.get() | def apply(self): """Set the selected font. """ self.result = self.fontlist.get() | be5e4dc250f5757d5c74b37a1af87925815855a0 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4675/be5e4dc250f5757d5c74b37a1af87925815855a0/support.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2230,
12,
2890,
4672,
3536,
694,
326,
3170,
3512,
18,
3536,
365,
18,
2088,
273,
365,
18,
5776,
1098,
18,
588,
1435,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2230,
12,
2890,
4672,
3536,
694,
326,
3170,
3512,
18,
3536,
365,
18,
2088,
273,
365,
18,
5776,
1098,
18,
588,
1435,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
def _checkme(self): n = self.valuestackdepth assert 0 <= n <= len(self.valuestack_w) assert None not in self.valuestack_w[:n] assert self.valuestack_w[n:] == [None] * (len(self.valuestack_w)-n) | def restorevaluestack(self, items_w): assert None not in items_w self.valuestack_w[:len(items_w)] = items_w self.dropvaluesuntil(len(items_w)) | 8fc109cbc472f1192978cdd91012f9fc407c486b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6934/8fc109cbc472f1192978cdd91012f9fc407c486b/pyframe.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5217,
4531,
395,
484,
12,
2890,
16,
1516,
67,
91,
4672,
1815,
599,
486,
316,
1516,
67,
91,
365,
18,
4531,
395,
484,
67,
91,
10531,
1897,
12,
3319,
67,
91,
25887,
273,
1516,
67,
91,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5217,
4531,
395,
484,
12,
2890,
16,
1516,
67,
91,
4672,
1815,
599,
486,
316,
1516,
67,
91,
365,
18,
4531,
395,
484,
67,
91,
10531,
1897,
12,
3319,
67,
91,
25887,
273,
1516,
67,
91,
... | |
if last < 0: last=first-last+1 | if last < 0: last=first-last+1 | def undoLog(self, first=0, last=-20, filter=None): if last < 0: last=first-last+1 self._lock_acquire() try: packt=self._packt if packt is None: raise UndoError( 'Undo is currently disabled for database maintenance.<p>') pos=self._pos if pos < 39: return [] file=self._file seek=file.seek read=file.read unpack=struct.unpack strip=string.strip encode=base64.encodestring r=[] append=r.append i=0 while i < last and pos > 39: seek(pos-8) pos=pos-U64(read(8))-8 seek(pos) h=read(TRANS_HDR_LEN) tid, tl, status, ul, dl, el = unpack(">8s8scHHH", h) if tid < packt: break if status != ' ': continue u=ul and read(ul) or '' d=dl and read(dl) or '' d={'id': encode(tid+p64(pos))[:22], 'time': TimeStamp(tid).timeTime(), 'user_name': u, 'description': d} if el: try: e=loads(read(el)) d.update(e) except: pass if filter is None or filter(d): if i >= first: append(d) i=i+1 return r finally: self._lock_release() | 606639c4e5cffab1a4e8d25df6976c1eb540036e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/606639c4e5cffab1a4e8d25df6976c1eb540036e/FileStorage.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
15436,
1343,
12,
2890,
16,
1122,
33,
20,
16,
1142,
29711,
3462,
16,
1034,
33,
7036,
4672,
309,
1142,
411,
374,
30,
1142,
33,
3645,
17,
2722,
15,
21,
365,
6315,
739,
67,
1077,
1039,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
15436,
1343,
12,
2890,
16,
1122,
33,
20,
16,
1142,
29711,
3462,
16,
1034,
33,
7036,
4672,
309,
1142,
411,
374,
30,
1142,
33,
3645,
17,
2722,
15,
21,
365,
6315,
739,
67,
1077,
1039,
1... |
def __init__(data = None) | def __init__(data = None): | def __init__(data = None) if data == None: quickfix.UtcTimeStampField.__init__(self, 515) else quickfix.UtcTimeStampField.__init__(self, 515, data) | 484890147d4b23aac4b9d0e85e84fceab7e137c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8819/484890147d4b23aac4b9d0e85e84fceab7e137c3/quickfix_fields.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
892,
273,
599,
4672,
309,
501,
422,
599,
30,
9549,
904,
18,
57,
5111,
21536,
974,
16186,
2738,
972,
12,
2890,
16,
1381,
3600,
13,
469,
9549,
904,
18,
57,
5111,
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,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
892,
273,
599,
4672,
309,
501,
422,
599,
30,
9549,
904,
18,
57,
5111,
21536,
974,
16186,
2738,
972,
12,
2890,
16,
1381,
3600,
13,
469,
9549,
904,
18,
57,
5111,
2... |
def testNonBlockingHandshake(self): | def test_non_blocking_handshake(self): | def testNonBlockingHandshake(self): s = socket.socket(socket.AF_INET) s.connect(("svn.python.org", 443)) s.setblocking(False) s = ssl.wrap_socket(s, cert_reqs=ssl.CERT_NONE, do_handshake_on_connect=False) count = 0 while True: try: count += 1 s.do_handshake() break except ssl.SSLError, err: if err.args[0] == ssl.SSL_ERROR_WANT_READ: select.select([s], [], []) elif err.args[0] == ssl.SSL_ERROR_WANT_WRITE: select.select([], [s], []) else: raise s.close() if test_support.verbose: sys.stdout.write("\nNeeded %d calls to do_handshake() to establish session.\n" % count) | cb62a4cb12d8f0f9904d111d93c76ea857434a52 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8125/cb62a4cb12d8f0f9904d111d93c76ea857434a52/test_ssl.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
5836,
67,
18926,
67,
2349,
7478,
12,
2890,
4672,
272,
273,
2987,
18,
7814,
12,
7814,
18,
6799,
67,
18819,
13,
272,
18,
3612,
12,
2932,
31505,
18,
8103,
18,
3341,
3113,
23796,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5836,
67,
18926,
67,
2349,
7478,
12,
2890,
4672,
272,
273,
2987,
18,
7814,
12,
7814,
18,
6799,
67,
18819,
13,
272,
18,
3612,
12,
2932,
31505,
18,
8103,
18,
3341,
3113,
23796,... |
msg = email.MIMEMultipart.MIMEMultipart() msg['Subject'] = '[PATCH 0 of %d] %s' % ( len(patches), opts['subject'] or prompt('Subject:', rest = ' [PATCH 0 of %d] ' % len(patches))) | def close(self): self.container.append(''.join(self.lines).split('\n')) self.lines = [] | cdaf16d02416bfc3f41bf26b39f721059d9d4c96 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11312/cdaf16d02416bfc3f41bf26b39f721059d9d4c96/patchbomb.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1746,
12,
2890,
4672,
365,
18,
3782,
18,
6923,
2668,
10332,
5701,
12,
2890,
18,
3548,
2934,
4939,
2668,
64,
82,
26112,
365,
18,
3548,
273,
5378,
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,
1746,
12,
2890,
4672,
365,
18,
3782,
18,
6923,
2668,
10332,
5701,
12,
2890,
18,
3548,
2934,
4939,
2668,
64,
82,
26112,
365,
18,
3548,
273,
5378,
2,
-100,
-100,
-100,
-100,
-100,
-100,
... | |
self.autoCommit = autoCommit | self.autoCommit = Boolean(autoCommit) | def __init__(self, name=None, debug=False, debugOutput=False, cache=True, style=None, autoCommit=True, debugThreading=False, registry=None, logger=None, loglevel=None): self.name = name self.debug = debug self.debugOutput = debugOutput self.debugThreading = debugThreading self.debugWriter = makeDebugWriter(logger, loglevel) self.cache = CacheSet(cache=cache) self.doCache = cache self.style = style self._connectionNumbers = {} self._connectionCount = 1 self.autoCommit = autoCommit self.registry = registry or None classregistry.registry(self.registry).addCallback( self.soClassAdded) registerConnectionInstance(self) atexit.register(_closeConnection, weakref.ref(self)) | 0ad9a097e3ca618ec3c8385483f1773da64724d5 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8798/0ad9a097e3ca618ec3c8385483f1773da64724d5/dbconnection.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
508,
33,
7036,
16,
1198,
33,
8381,
16,
1198,
1447,
33,
8381,
16,
1247,
33,
5510,
16,
2154,
33,
7036,
16,
3656,
5580,
33,
5510,
16,
1198,
3830,
310,
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,
1001,
2738,
972,
12,
2890,
16,
508,
33,
7036,
16,
1198,
33,
8381,
16,
1198,
1447,
33,
8381,
16,
1247,
33,
5510,
16,
2154,
33,
7036,
16,
3656,
5580,
33,
5510,
16,
1198,
3830,
310,
33,... |
logging.info("Resubmitting job %s" % self.singleSpecName) | logging.info("Submitting job %s" % self.singleSpecName) | def submitSingleJob(self, schedSession, submissionAttrs ): """ __submitJob__ | b75bb79a8cbe0fd645ec0baaa0d756821ae5c045 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8887/b75bb79a8cbe0fd645ec0baaa0d756821ae5c045/BossLiteBulkInterface.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4879,
5281,
2278,
12,
2890,
16,
23964,
2157,
16,
8515,
8262,
262,
30,
3536,
1001,
9297,
2278,
972,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
4879,
5281,
2278,
12,
2890,
16,
23964,
2157,
16,
8515,
8262,
262,
30,
3536,
1001,
9297,
2278,
972,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
>>> d._fancy_replace(['abcDefghiJkl\n'], 0, 1, ['abcdefGhijkl\n'], 0, 1) >>> print ''.join(d.results), | >>> results = d._fancy_replace(['abcDefghiJkl\n'], 0, 1, ... ['abcdefGhijkl\n'], 0, 1) >>> print ''.join(results), | def _fancy_replace(self, a, alo, ahi, b, blo, bhi): r""" When replacing one block of lines with another, search the blocks for *similar* lines; the best-matching pair (if any) is used as a synch point, and intraline difference marking is done on the similar pair. Lots of work, but often worth it. | 062b6fe7b69cae874c7735e26cf6847541085107 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/062b6fe7b69cae874c7735e26cf6847541085107/difflib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
74,
12514,
67,
2079,
12,
2890,
16,
279,
16,
279,
383,
16,
279,
12266,
16,
324,
16,
324,
383,
16,
324,
12266,
4672,
436,
8395,
5203,
13993,
1245,
1203,
434,
2362,
598,
4042,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
74,
12514,
67,
2079,
12,
2890,
16,
279,
16,
279,
383,
16,
279,
12266,
16,
324,
16,
324,
383,
16,
324,
12266,
4672,
436,
8395,
5203,
13993,
1245,
1203,
434,
2362,
598,
4042,
16,
... |
(code,msg)=self.getreply() return code | return self.getreply() | def docmd(self, cmd, args=""): """Send a command, and return its response code.""" self.putcmd(cmd,args) (code,msg)=self.getreply() return code | df0320a7ccf9b73e33c7b9b5d44674b3de8ddb2a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/df0320a7ccf9b73e33c7b9b5d44674b3de8ddb2a/smtplib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
997,
1264,
12,
2890,
16,
1797,
16,
833,
1546,
6,
4672,
3536,
3826,
279,
1296,
16,
471,
327,
2097,
766,
981,
12123,
365,
18,
458,
4172,
12,
4172,
16,
1968,
13,
261,
710,
16,
3576,
13,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
997,
1264,
12,
2890,
16,
1797,
16,
833,
1546,
6,
4672,
3536,
3826,
279,
1296,
16,
471,
327,
2097,
766,
981,
12123,
365,
18,
458,
4172,
12,
4172,
16,
1968,
13,
261,
710,
16,
3576,
13,... |
this = apply(_quickfix.new_AgreementID, args) | this = _quickfix.new_AgreementID(*args) | def __init__(self, *args): this = apply(_quickfix.new_AgreementID, args) try: self.this.append(this) except: self.this = this | 7e632099fd421880c8c65fb0cf610d338d115ee9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8819/7e632099fd421880c8c65fb0cf610d338d115ee9/quickfix.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
380,
1968,
4672,
333,
273,
389,
19525,
904,
18,
2704,
67,
17420,
734,
30857,
1968,
13,
775,
30,
365,
18,
2211,
18,
6923,
12,
2211,
13,
1335,
30,
365,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
380,
1968,
4672,
333,
273,
389,
19525,
904,
18,
2704,
67,
17420,
734,
30857,
1968,
13,
775,
30,
365,
18,
2211,
18,
6923,
12,
2211,
13,
1335,
30,
365,
1... |
types.BuiltinFunctionType, types.MethodType, types.BuiltinMethodType, types.FunctionType, _WrapperDescriptorType, types.ClassType) and | types.BuiltinFunctionType, types.MethodType, types.BuiltinMethodType, types.FunctionType, _WrapperDescriptorType, types.ClassType, _ZopeType, _ZopeMethodType, _ZopeCMethodType) and | def add(self, obj): """ Add the documentation for an object, and everything contained by that object, to this documentation map. | fbb38d93ab1136c273fd45759c6a87495172bbad /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/fbb38d93ab1136c273fd45759c6a87495172bbad/objdoc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
12,
2890,
16,
1081,
4672,
3536,
1436,
326,
7323,
364,
392,
733,
16,
471,
7756,
7542,
635,
716,
733,
16,
358,
333,
7323,
852,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
12,
2890,
16,
1081,
4672,
3536,
1436,
326,
7323,
364,
392,
733,
16,
471,
7756,
7542,
635,
716,
733,
16,
358,
333,
7323,
852,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
from re import escape | def _applyChangeset(self, changeset): """ Do the actual work of applying the changeset to the working copy. """ | 5e5b4967e89c99046884bacd6b13974d01087474 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5981/5e5b4967e89c99046884bacd6b13974d01087474/darcs.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
9010,
29743,
12,
2890,
16,
22463,
4672,
3536,
2256,
326,
3214,
1440,
434,
13650,
326,
22463,
358,
326,
5960,
1610,
18,
3536,
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,
389,
9010,
29743,
12,
2890,
16,
22463,
4672,
3536,
2256,
326,
3214,
1440,
434,
13650,
326,
22463,
358,
326,
5960,
1610,
18,
3536,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... | |
except os.error: shutil.rmtree(self.path) | except os.error: if Globals.fsync_directories: self.fsync() self.conn.shutil.rmtree(self.path) | def delete(self): """Delete file at self.path. Recursively deletes directories.""" log.Log("Deleting %s" % self.path, 7) if self.isdir(): try: self.rmdir() except os.error: shutil.rmtree(self.path) else: self.conn.os.unlink(self.path) self.setdata() | b2e75777e1081c89ebe160332b55fbfc6508f36b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8033/b2e75777e1081c89ebe160332b55fbfc6508f36b/rpath.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1430,
12,
2890,
4672,
3536,
2613,
585,
622,
365,
18,
803,
18,
225,
31362,
9792,
6402,
12123,
613,
18,
1343,
2932,
20433,
738,
87,
6,
738,
365,
18,
803,
16,
2371,
13,
309,
365,
18,
29... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1430,
12,
2890,
4672,
3536,
2613,
585,
622,
365,
18,
803,
18,
225,
31362,
9792,
6402,
12123,
613,
18,
1343,
2932,
20433,
738,
87,
6,
738,
365,
18,
803,
16,
2371,
13,
309,
365,
18,
29... |
columns = ischema.columns | columns = self.uppercase_table(ischema.columns) | def has_table(self, connection, tablename): import sqlalchemy.databases.information_schema as ischema | facbaa3333a5ca24f1cd4d09e5f84b63d3faefe5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1074/facbaa3333a5ca24f1cd4d09e5f84b63d3faefe5/mssql.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
711,
67,
2121,
12,
2890,
16,
1459,
16,
19096,
4672,
1930,
1847,
24182,
18,
3404,
19684,
18,
13117,
67,
4821,
487,
353,
1243,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
711,
67,
2121,
12,
2890,
16,
1459,
16,
19096,
4672,
1930,
1847,
24182,
18,
3404,
19684,
18,
13117,
67,
4821,
487,
353,
1243,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
for r in results: print (r) def calculateWinner(self,e): print ('start calc') e.output() results = self.calculateVotes(e) winner = results[-1] loser = results[0] while winner[1]<(e.getNumberOfVoters % 2): e.transferVote(loser[0]) results = self.calculateVotes(e) winner = results[-1] loser = results[0] print ('winner, loser ') print (winner, loser) print ('winner') print ( winner ) | def outputResults(self,results): | d44f653312c93ad0252074fbb5d642d893a127f8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13778/d44f653312c93ad0252074fbb5d642d893a127f8/transferableVoting.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
876,
3447,
12,
2890,
16,
4717,
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,
876,
3447,
12,
2890,
16,
4717,
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... | |
pass | t = int(time.time()) if t > self.last_time: self.last_time = t self.canvas.redraw( ) self.last_time = t | def handle_main( self, evt, obj ): pass | e2410abef65d7e825b807c6c26ccf2af9042c869 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9962/e2410abef65d7e825b807c6c26ccf2af9042c869/test.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
67,
5254,
12,
365,
16,
6324,
16,
1081,
262,
30,
1342,
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,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
67,
5254,
12,
365,
16,
6324,
16,
1081,
262,
30,
1342,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
scale = pow(10,math.floor(math.log10(0.5*(abs(desired)+abs(actual))))) | scale = float(pow(10,math.floor(math.log10(0.5*(abs(desired)+abs(actual)))))) | def assert_approx_equal(actual,desired,significant=7,err_msg='',verbose=1): """ Raise an assertion if two items are not equal. I think this should be part of unittest.py Approximately equal is defined as the number of significant digits correct """ msg = '\nItems are not equal to %d significant digits:\n' % significant msg += err_msg actual, desired = map(float, (actual, desired)) # Normalized the numbers to be in range (-10.0,10.0) scale = pow(10,math.floor(math.log10(0.5*(abs(desired)+abs(actual))))) try: sc_desired = desired/scale except ZeroDivisionError: sc_desired = 0.0 try: sc_actual = actual/scale except ZeroDivisionError: sc_actual = 0.0 try: if ( verbose and len(repr(desired)) < 100 and len(repr(actual)) ): msg = msg \ + 'DESIRED: ' + repr(desired) \ + '\nACTUAL: ' + repr(actual) except: msg = msg \ + 'DESIRED: ' + repr(desired) \ + '\nACTUAL: ' + repr(actual) assert math.fabs(sc_desired - sc_actual) < pow(10.,-1*significant), msg | 80a598c2820e332e26f758206eaa71133b6b84c1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14925/80a598c2820e332e26f758206eaa71133b6b84c1/testing.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1815,
67,
26742,
67,
9729,
12,
18672,
16,
30458,
16,
2977,
11120,
33,
27,
16,
370,
67,
3576,
2218,
2187,
11369,
33,
21,
4672,
3536,
20539,
392,
11240,
309,
2795,
1516,
854,
486,
3959,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1815,
67,
26742,
67,
9729,
12,
18672,
16,
30458,
16,
2977,
11120,
33,
27,
16,
370,
67,
3576,
2218,
2187,
11369,
33,
21,
4672,
3536,
20539,
392,
11240,
309,
2795,
1516,
854,
486,
3959,
... |
def is_unavailable_exception(e): '''Returns True if the given ProtocolError is the product of a server-side exception caused by the 'temporarily unavailable' response sometimes given by operations on non-blocking sockets.''' if e.errcode == -1 or e.headers is None: return True exc_mess = e.headers.get('X-exception') if exc_mess and 'temporarily unavailable' in exc_mess.lower(): return True return False | def is_unavailable_exception(e): '''Returns True if the given ProtocolError is the product of a server-side exception caused by the 'temporarily unavailable' response sometimes given by operations on non-blocking sockets.''' # sometimes we get a -1 error code and/or empty headers if e.errcode == -1 or e.headers is None: return True exc_mess = e.headers.get('X-exception') if exc_mess and 'temporarily unavailable' in exc_mess.lower(): return True return False | 04000b10e0285335543140e4ee28912351b863dd /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3187/04000b10e0285335543140e4ee28912351b863dd/test_xmlrpc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
353,
67,
318,
5699,
67,
4064,
12,
73,
4672,
9163,
1356,
1053,
309,
326,
864,
4547,
668,
353,
326,
3017,
434,
279,
1438,
17,
5564,
1520,
15848,
635,
326,
296,
874,
3831,
10243,
15781,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
318,
5699,
67,
4064,
12,
73,
4672,
9163,
1356,
1053,
309,
326,
864,
4547,
668,
353,
326,
3017,
434,
279,
1438,
17,
5564,
1520,
15848,
635,
326,
296,
874,
3831,
10243,
15781,
1... | |
left join account_analytic_line l on (l.id = hrt.line_id) group by l.date::date, hrt.sheet_id | left join (account_analytic_line l LEFT JOIN hr_timesheet_sheet_sheet s ON (s.date_to >= l.date AND s.date_from <= l.date AND s.user_id = l.user_id)) on (l.id = hrt.line_id) group by l.date::date, s.id | def init(self, cr): cr.execute("""create or replace view hr_timesheet_sheet_sheet_day as SELECT id, name, sheet_id, total_timesheet, total_attendance, (total_attendance - total_timesheet) AS total_difference FROM (( SELECT MAX(id) as id, name, sheet_id, SUM(total_timesheet) as total_timesheet, CASE WHEN SUM(total_attendance) < 0 THEN (SUM(total_attendance) + CASE WHEN current_date <> name THEN 1440 ELSE (EXTRACT(hour FROM current_time) * 60) + EXTRACT(minute FROM current_time) END ) ELSE SUM(total_attendance) END /60 as total_attendance FROM (( select min(hrt.id) as id, l.date::date as name, hrt.sheet_id as sheet_id, sum(l.unit_amount) as total_timesheet, 0.0 as total_attendance from hr_analytic_timesheet hrt left join account_analytic_line l on (l.id = hrt.line_id) group by l.date::date, hrt.sheet_id ) union ( select -min(a.id) as id, a.name::date as name, a.sheet_id as sheet_id, 0.0 as total_timesheet, SUM(((EXTRACT(hour FROM a.name) * 60) + EXTRACT(minute FROM a.name)) * (CASE WHEN a.action = 'sign_in' THEN -1 ELSE 1 END)) as total_attendance from hr_attendance a WHERE action in ('sign_in', 'sign_out') group by a.name::date, a.sheet_id )) AS foo GROUP BY name, sheet_id )) AS bar""") | 79f8455aadedd62976f313be75d3d2ab7c5a5e1f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7397/79f8455aadedd62976f313be75d3d2ab7c5a5e1f/hr_timesheet_sheet.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1208,
12,
2890,
16,
4422,
4672,
4422,
18,
8837,
2932,
3660,
2640,
578,
1453,
1476,
15407,
67,
8293,
2963,
67,
8118,
67,
8118,
67,
2881,
487,
9111,
612,
16,
508,
16,
6202,
67,
350,
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,
1208,
12,
2890,
16,
4422,
4672,
4422,
18,
8837,
2932,
3660,
2640,
578,
1453,
1476,
15407,
67,
8293,
2963,
67,
8118,
67,
8118,
67,
2881,
487,
9111,
612,
16,
508,
16,
6202,
67,
350,
16,
... |
print "SIGUSR1 received. ldtpd ready for requests." | if _ldtp_debug: print "SIGUSR1 received. ldtpd ready for requests." | def _handle_signal(self, signum, frame): if os.environ.has_key('LDTP_DEBUG'): if signum == signal.SIGCHLD: print "ldtpd exited!" elif signum == signal.SIGUSR1: print "SIGUSR1 received. ldtpd ready for requests." elif signum == signal.SIGALRM: print "SIGALRM received. Timeout waiting for SIGUSR1." | 7fc4e329b2fb61c2e3a4520c94120c45bcc72810 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11266/7fc4e329b2fb61c2e3a4520c94120c45bcc72810/client.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
4110,
67,
10420,
12,
2890,
16,
26006,
16,
2623,
4672,
309,
1140,
18,
28684,
18,
5332,
67,
856,
2668,
48,
9081,
52,
67,
9394,
11,
4672,
309,
26006,
422,
4277,
18,
18513,
1792,
1206... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
4110,
67,
10420,
12,
2890,
16,
26006,
16,
2623,
4672,
309,
1140,
18,
28684,
18,
5332,
67,
856,
2668,
48,
9081,
52,
67,
9394,
11,
4672,
309,
26006,
422,
4277,
18,
18513,
1792,
1206... |
w_argv = space.sys.get('argv') space.setitem(w_argv, space.newslice(None, None, None), space.newlist([space.wrap(filename)])) | callex(space, set_argv, space, space.wrap(filename)) | def run(self): space = self.space filename = str(self.fspath) w_argv = space.sys.get('argv') space.setitem(w_argv, space.newslice(None, None, None), space.newlist([space.wrap(filename)])) callex(space, run_testcase_method, space, self.w_method) | d62853ca1121d04607fb7786697b772ebd68385e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/d62853ca1121d04607fb7786697b772ebd68385e/conftest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
4672,
3476,
273,
365,
18,
2981,
1544,
273,
609,
12,
2890,
18,
2556,
803,
13,
1443,
4149,
12,
2981,
16,
444,
67,
19485,
16,
3476,
16,
3476,
18,
4113,
12,
3459,
3719,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
4672,
3476,
273,
365,
18,
2981,
1544,
273,
609,
12,
2890,
18,
2556,
803,
13,
1443,
4149,
12,
2981,
16,
444,
67,
19485,
16,
3476,
16,
3476,
18,
4113,
12,
3459,
3719,
1... |
self.finishEvaluation(self.evaluatedProjectionsCount) def finishEvaluation(self, evaluatedProjections): if self.__class__.__name__ == "OWVizRank": secs = time.time() - self.startTime self.setStatusBarText("Finished evaluation (evaluated %s projections in %d min, %d sec)" % (orngVisFuncts.createStringFromNumber(evaluatedProjections), secs/60, secs%60)) self.parentWidget.progressBarFinished() self.enableControls() self.finishedAddingResults() from qt import qApp; qApp.processEvents() if self.parentWidget: self.parentWidget.showSelectedAttributes() | return self.evaluatedProjectionsCount | def evaluateProjections(self): random.seed(0) # always use the same seed to make results repeatable if not self.data: return self.correctSettingsIfNecessary() if self.timeLimit == self.projectionLimit == 0 and self.__class__.__name__ == "VizRank": print "Evaluation of projections was started without any time or projection restrictions. To prevent an indefinite projection evaluation a time limit of 2 hours was set." self.timeLimit = 2 * 60 self.evaluatedProjectionsCount = 0 self.optimizedProjectionsCount = 0 self.startTime = time.time() self.evaluationData = {} # clear all previous data about tested permutations and stuff self.evaluationData["triedCombinations"] = {} | b9e52e096e6043bf925f92bc9842c2a83b088af5 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6366/b9e52e096e6043bf925f92bc9842c2a83b088af5/orngVizRank.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5956,
14789,
87,
12,
2890,
4672,
2744,
18,
12407,
12,
20,
13,
1377,
468,
3712,
999,
326,
1967,
5009,
358,
1221,
1686,
7666,
429,
309,
486,
365,
18,
892,
30,
327,
365,
18,
6746,
2628,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5956,
14789,
87,
12,
2890,
4672,
2744,
18,
12407,
12,
20,
13,
1377,
468,
3712,
999,
326,
1967,
5009,
358,
1221,
1686,
7666,
429,
309,
486,
365,
18,
892,
30,
327,
365,
18,
6746,
2628,
... |
trac.addTicketChange(ticket=bugid, time=activity['bug_when'], author=trac.getLoginName(mysql_cur, activity['who']), field=field_name, oldvalue=removed, newvalue=added) | for oldChange in ticketChanges: if (field_name == 'summary' and oldChange['field'] == ticketChange['field'] and oldChange['time'] == ticketChange['time'] and oldChange['author'] == ticketChange['author']): oldChange['oldvalue'] += " " + ticketChange['oldvalue'] oldChange['newvalue'] += " " + ticketChange['newvalue'] break else: ticketChanges.append (ticketChange) for ticketChange in ticketChanges: trac.addTicketChange (**ticketChange) | def convert(_db, _host, _user, _password, _env, _force): activityFields = FieldTranslator() # account for older versions of bugzilla if BZ_VERSION == '2.11': print 'Using Buzvilla v%s schema.' % BZ_VERSION activityFields['removed'] = 'oldvalue' activityFields['added'] = 'newvalue' # init Bugzilla environment print "Bugzilla MySQL('%s':'%s':'%s':'%s'): connecting..." % (_db, _host, _user, _password) mysql_con = MySQLdb.connect(host=_host, user=_user, passwd=_password, db=_db, compress=1, cursorclass=MySQLdb.cursors.DictCursor) mysql_cur = mysql_con.cursor() # init Trac environment print "Trac SQLite('%s'): connecting..." % (_env) trac = TracDatabase(_env) # force mode... if _force == 1: print "cleaning all tickets..." c = trac.db().cursor() c.execute("""DELETE FROM ticket_change""") trac.db().commit() c.execute("""DELETE FROM ticket""") trac.db().commit() c.execute("""DELETE FROM attachment""") os.system('rm -rf %s' % trac.env.get_attachments_dir()) os.mkdir(trac.env.get_attachments_dir()) trac.db().commit() print print "1. import severities..." severities = (('blocker', '1'), ('critical', '2'), ('major', '3'), ('normal', '4'), ('minor', '5'), ('trivial', '6'), ('enhancement', '7')) trac.setSeverityList(severities) print print "2. import components..." sql = "SELECT DISTINCTROW value FROM components" if PRODUCTS: sql += " WHERE %s" % productFilter('program', PRODUCTS) mysql_cur.execute(sql) components = mysql_cur.fetchall() trac.setComponentList(components, 'value') print print "3. import priorities..." priorities = (('P1', '1'), ('P2', '2'), ('P3', '3'), ('P4', '4'), ('P5', '5')) trac.setPriorityList(priorities) print print "4. import versions..." sql = "SELECT DISTINCTROW value FROM versions" if PRODUCTS: sql += " WHERE %s" % productFilter('program', PRODUCTS) mysql_cur.execute(sql) versions = mysql_cur.fetchall() trac.setVersionList(versions, 'value') print print "5. import milestones..." mysql_cur.execute("SELECT value FROM milestones") milestones = mysql_cur.fetchall() if milestones[0] == '---': trac.setMilestoneList(milestones, 'value') else: trac.setMilestoneList([], '') print print '6. retrieving bugs...' sql = "SELECT * FROM bugs " if PRODUCTS: sql += " WHERE %s" % productFilter('product', PRODUCTS) sql += " ORDER BY bug_id" mysql_cur.execute(sql) bugs = mysql_cur.fetchall() print print "7. import bugs and bug activity..." for bug in bugs: bugid = bug['bug_id'] ticket = {} keywords = [] ticket['id'] = bugid ticket['time'] = bug['creation_ts'] ticket['changetime'] = bug['delta_ts'] ticket['component'] = bug['component'] ticket['severity'] = bug['bug_severity'] ticket['priority'] = bug['priority'] ticket['owner'] = trac.getLoginName(mysql_cur, bug['assigned_to']) ticket['reporter'] = trac.getLoginName(mysql_cur, bug['reporter']) mysql_cur.execute("SELECT * FROM cc WHERE bug_id = %s" % bugid) cc_records = mysql_cur.fetchall() cc_list = [] for cc in cc_records: cc_list.append(trac.getLoginName(mysql_cur, cc['who'])) ticket['cc'] = string.join(cc_list, ', ') ticket['version'] = bug['version'] if bug['target_milestone'] == '---': ticket['milestone'] = '' else: ticket['milestone'] = bug['target_milestone'] bug_status = bug['bug_status'].lower() ticket['status'] = statusXlator[bug_status] ticket['resolution'] = bug['resolution'].lower() # a bit of extra work to do open tickets if bug_status == 'open': if owner != '': ticket['status'] = 'assigned' else: ticket['status'] = 'new' ticket['summary'] = bug['short_desc'] keywords = string.split(bug['keywords'], ' ') mysql_cur.execute("SELECT * FROM longdescs WHERE bug_id = %s" % bugid) longdescs = list(mysql_cur.fetchall()) # check for empty 'longdescs[0]' field... if len(longdescs) == 0: ticket['description'] = '' else: ticket['description'] = longdescs[0]['thetext'] del longdescs[0] for desc in longdescs: ignore = False for comment in IGNORE_COMMENTS: if re.match(comment, desc['thetext']): ignore = True if ignore: continue trac.addTicketComment(ticket=bugid, time=desc['bug_when'], author=trac.getLoginName(mysql_cur, desc['who']), value=desc['thetext']) mysql_cur.execute("SELECT * FROM bugs_activity WHERE bug_id = %s ORDER BY bug_when" % bugid) bugs_activity = mysql_cur.fetchall() resolution = '' for activity in bugs_activity: field_name = trac.getFieldName(mysql_cur, activity['fieldid']).lower() removed = activity[activityFields['removed']] added = activity[activityFields['added']] # statuses and resolutions are in lowercase in trac if field_name == 'resolution' or field_name == 'bug_status': removed = removed.lower() added = added.lower() # remember most recent resolution, we need this later if field_name == 'resolution': resolution = added.lower() keywordChange = False oldKeywords = string.join(keywords, " ") # convert bugzilla field names... if field_name == 'bug_severity': field_name = 'severity' elif field_name == 'assigned_to': field_name = 'owner' elif field_name == 'bug_status': field_name = 'status' if removed in STATUS_KEYWORDS: kw = STATUS_KEYWORDS[removed] if kw in keywords: keywords.remove(kw) else: oldKeywords = string.join(keywords + [ kw ], " ") keywordChange = True if added in STATUS_KEYWORDS: kw = STATUS_KEYWORDS[added] keywords.append(kw) keywordChange = True added = statusXlator[added] removed = statusXlator[removed] elif field_name == 'short_desc': field_name = 'summary' elif field_name == 'product': if removed in PRODUCT_KEYWORDS: kw = PRODUCT_KEYWORDS[removed] if kw in keywords: keywords.remove(kw) else: oldKeywords = string.join(keywords + [ kw ], " ") keywordChange = True if added in PRODUCT_KEYWORDS: kw = PRODUCT_KEYWORDS[added] keywords.append(kw) keywordChange = True if keywordChange: newKeywords = string.join(keywords, " ") trac.addTicketChange(ticket=bugid, time=activity['bug_when'], author=trac.getLoginName(mysql_cur, activity['who']), field='keywords', oldvalue=oldKeywords, newvalue=newKeywords) if field_name in IGNORED_ACTIVITY_FIELDS: continue # skip changes that have no effect (think translation!) if added == removed: continue trac.addTicketChange(ticket=bugid, time=activity['bug_when'], author=trac.getLoginName(mysql_cur, activity['who']), field=field_name, oldvalue=removed, newvalue=added) # for some reason, bugzilla v2.11 seems to clear the resolution # when you mark a bug as closed. let's remember it and restore # it if the ticket is closed but there's no resolution. if not ticket['resolution'] and ticket['status'] == 'closed': ticket['resolution'] = resolution if bug['bug_status'] in STATUS_KEYWORDS: kw = STATUS_KEYWORDS[bug['bug_status']] # may have already been added during activity import if kw not in keywords: keywords.append(kw) if bug['product'] in PRODUCT_KEYWORDS: kw = PRODUCT_KEYWORDS[bug['product']] # may have already been added during activity import if kw not in keywords: keywords.append(kw) mysql_cur.execute("SELECT * FROM attachments WHERE bug_id = %s" % bugid) attachments = mysql_cur.fetchall() for a in attachments: author = trac.getLoginName(mysql_cur, a['submitter_id']) tracAttachment = Attachment(a['filename'], a['thedata']) trac.addAttachment(bugid, tracAttachment, a['description'], author) ticket['keywords'] = string.join(keywords) ticketid = trac.addTicket(**ticket) print "Success!" | 07933404cd3c6d8d1b0920e0a7194f09369331e1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2831/07933404cd3c6d8d1b0920e0a7194f09369331e1/bugzilla2trac.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1765,
24899,
1966,
16,
389,
2564,
16,
389,
1355,
16,
389,
3664,
16,
389,
3074,
16,
389,
5734,
4672,
5728,
2314,
273,
2286,
12233,
1435,
225,
468,
2236,
364,
12156,
5244,
434,
7934,
15990... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1765,
24899,
1966,
16,
389,
2564,
16,
389,
1355,
16,
389,
3664,
16,
389,
3074,
16,
389,
5734,
4672,
5728,
2314,
273,
2286,
12233,
1435,
225,
468,
2236,
364,
12156,
5244,
434,
7934,
15990... |
f.write(data[0]) f.write(data[1]) self.checkinlinesize(transaction, f) | ifh.write(data[0]) ifh.write(data[1]) self.checkinlinesize(transaction, ifh) | def addrevision(self, text, transaction, link, p1=None, p2=None, d=None): """add a revision to the log | 7331974d3fca91704af17f0e8306f87bbf410fe8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11312/7331974d3fca91704af17f0e8306f87bbf410fe8/revlog.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
13057,
12,
2890,
16,
977,
16,
2492,
16,
1692,
16,
293,
21,
33,
7036,
16,
293,
22,
33,
7036,
16,
302,
33,
7036,
4672,
3536,
1289,
279,
6350,
358,
326,
613,
2,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
13057,
12,
2890,
16,
977,
16,
2492,
16,
1692,
16,
293,
21,
33,
7036,
16,
293,
22,
33,
7036,
16,
302,
33,
7036,
4672,
3536,
1289,
279,
6350,
358,
326,
613,
2,
-100,
-100,
-100,
... |
self._strokeColorRGB = rgb | self._fillColorRGB = rgb | def setFillColor(self, aColor): """Takes a color object, allowing colors to be referred to by name""" if type(aColor) == ColorType: rgb = (aColor.red, aColor.green, aColor.blue) self._strokeColorRGB = rgb self._code.append('%0.2f %0.2f %0.2f rg' % rgb ) elif type(aColor) in _SeqTypes: l = len(aColor) if l==3: self._strokeColorRGB = aColor self._code.append('%0.2f %0.2f %0.2f rg' % aColor ) elif l==4: self.setFillColorCMYK(self, aColor[0], aColor[1], aColor[2], aColor[3]) else: raise 'Unknown color', str(aColor) else: raise 'Unknown color', str(aColor) | 0952c62198d44f397dc72c980ced18075d265da8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3878/0952c62198d44f397dc72c980ced18075d265da8/canvas.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
27101,
2957,
12,
2890,
16,
279,
2957,
4672,
3536,
11524,
279,
2036,
733,
16,
15632,
5740,
358,
506,
29230,
358,
635,
508,
8395,
309,
618,
12,
69,
2957,
13,
422,
5563,
559,
30,
6917,
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,
27101,
2957,
12,
2890,
16,
279,
2957,
4672,
3536,
11524,
279,
2036,
733,
16,
15632,
5740,
358,
506,
29230,
358,
635,
508,
8395,
309,
618,
12,
69,
2957,
13,
422,
5563,
559,
30,
6917,
27... |
"""Returns ``True'' if the task is (being) cancelled.""" | """Returns :const:`True` if the task is (being) cancelled.""" | def is_cancelled(self): """Returns ``True'' if the task is (being) cancelled.""" return self.backend.get_status(self.task_id) == CANCELLED | f8ead15a7e902dea9b579ff580ed4a95ee48275f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2024/f8ead15a7e902dea9b579ff580ed4a95ee48275f/cancelable.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
353,
67,
10996,
1259,
12,
2890,
4672,
3536,
1356,
294,
10248,
28288,
5510,
68,
309,
326,
1562,
353,
261,
2196,
310,
13,
13927,
12123,
327,
365,
18,
9993,
18,
588,
67,
2327,
12,
2890,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
353,
67,
10996,
1259,
12,
2890,
4672,
3536,
1356,
294,
10248,
28288,
5510,
68,
309,
326,
1562,
353,
261,
2196,
310,
13,
13927,
12123,
327,
365,
18,
9993,
18,
588,
67,
2327,
12,
2890,
1... |
def get_sweep(file): | def get_sweep(f): | def get_sweep(file): global known_sweeps if not is_image_name(file): return try: template, directory = image2template_directory(file) key = (directory, template) if not known_sweeps.has_key(key): sweeplist = SweepFactory(template, directory) known_sweeps[key] = sweeplist except exceptions.Exception, e: print 'Exception: %s' % str(e) return | a3a255c1c2edd60e5e61291959fb299b23bf458e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3290/a3a255c1c2edd60e5e61291959fb299b23bf458e/xia2setup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
87,
25236,
12,
74,
4672,
225,
2552,
4846,
67,
87,
1814,
13058,
225,
309,
486,
353,
67,
2730,
67,
529,
12,
768,
4672,
327,
225,
775,
30,
1542,
16,
1867,
273,
1316,
22,
3202,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
87,
25236,
12,
74,
4672,
225,
2552,
4846,
67,
87,
1814,
13058,
225,
309,
486,
353,
67,
2730,
67,
529,
12,
768,
4672,
327,
225,
775,
30,
1542,
16,
1867,
273,
1316,
22,
3202,
... |
index = len(self.playbackSink.get_model()) - 1 self.playbackSink.set_active(index) | index = len(self.recordingSoundSystem.get_model()) - 1 self.recordingSoundSystem.set_active(index) | def __init__(self, project, mainwindow, icon=None): """ Creates a new instance of PreferencesDialog. Parameters: project -- the currently active Project. mainwindow -- the main Jokosher window (MainApp). icon -- the icon for the window manager to display for this window (optional). """ | 97b71cd0436fc5b60a3c1d8ec0f046e303b7263f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10033/97b71cd0436fc5b60a3c1d8ec0f046e303b7263f/PreferencesDialog.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1984,
16,
2774,
5668,
16,
4126,
33,
7036,
4672,
3536,
10210,
279,
394,
791,
434,
28310,
6353,
18,
225,
7012,
30,
1984,
1493,
326,
4551,
2695,
5420,
18,
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,
1984,
16,
2774,
5668,
16,
4126,
33,
7036,
4672,
3536,
10210,
279,
394,
791,
434,
28310,
6353,
18,
225,
7012,
30,
1984,
1493,
326,
4551,
2695,
5420,
18,
2... |
self.assertEquals(xmlEncoding.decode('utf-8', '<x>\xc2\xa3</x>', loggedEvents), u'<x>\u00a3</x>') | self.assertEquals(xmlEncoding.decode(ctAX, 'utf-8', '<x>\xc2\xa3</x>', loggedEvents), u'<x>\u00a3</x>') | def testDecodeUTF8(self): loggedEvents=[] self.assertEquals(xmlEncoding.decode('utf-8', '<x>\xc2\xa3</x>', loggedEvents), u'<x>\u00a3</x>') self.assertEquals(loggedEvents, []) | c9bc8bbd0880a77ea6553e5286a8d6b8bd59e622 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5012/c9bc8bbd0880a77ea6553e5286a8d6b8bd59e622/testXmlEncodingDecode.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
6615,
5159,
28,
12,
2890,
4672,
7545,
3783,
33,
8526,
365,
18,
11231,
8867,
12,
2902,
4705,
18,
3922,
12,
299,
2501,
16,
296,
3158,
17,
28,
2187,
2368,
92,
5333,
6511,
22,
64,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6615,
5159,
28,
12,
2890,
4672,
7545,
3783,
33,
8526,
365,
18,
11231,
8867,
12,
2902,
4705,
18,
3922,
12,
299,
2501,
16,
296,
3158,
17,
28,
2187,
2368,
92,
5333,
6511,
22,
64,
... |
sage: C.minimum_distance() | sage: C.minimum_distance() | def ExtendedBinaryGolayCode(): """ ExtendedBinaryGolayCode() returns the extended binary Golay code. This is a perfect [24,12,8] code. This code is self-dual. EXAMPLES: sage: C = ExtendedBinaryGolayCode() sage: C Linear code of length 24, dimension 12 over Finite Field of size 2 sage: C.minimum_distance() # long 8 AUTHOR: David Joyner (11-2005) """ F = GF(2) gap.eval("C:=ExtendedBinaryGolayCode()") gap.eval("G:=GeneratorMat(C)") k = eval(gap.eval("Length(G)")) n = eval(gap.eval("Length(G[1])")) G = [[gap_to_sage(gap.eval("G["+str(i)+"]["+str(j)+"]"),F) for j in range(1,n+1)] for i in range(1,k+1)] MS = MatrixSpace(F,k,n) return LinearCode(MS(G)) | d5d38c59a0e04077fe8442bc7dec6d8a4821a553 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9890/d5d38c59a0e04077fe8442bc7dec6d8a4821a553/guava.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
14094,
5905,
43,
355,
528,
1085,
13332,
3536,
14094,
5905,
43,
355,
528,
1085,
1435,
1135,
326,
7021,
3112,
611,
355,
528,
981,
18,
1220,
353,
279,
24746,
306,
3247,
16,
2138,
16,
28,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
14094,
5905,
43,
355,
528,
1085,
13332,
3536,
14094,
5905,
43,
355,
528,
1085,
1435,
1135,
326,
7021,
3112,
611,
355,
528,
981,
18,
1220,
353,
279,
24746,
306,
3247,
16,
2138,
16,
28,
... |
myURL=filename.replace(self.commonString,(self.commonURL+os.path.sep)) | myURL=filename.replace(self.commonString,self.commonURL) if myURL == filename: sys.stderr.write("Improper conversion for :%s\n"%filename) sys.stderr.write("web-url : %s\n"%self.pURL) sys.stderr.write("publication dir: %s\n"%self.pDIR) sys.stderr.write("Common String : %s\n"%self.commonString) sys.stderr.write("Common URL : %s\n"%self.commonURL) raise Warning, "object:filenameToURLMapper improperly initialized or given bad args\n" | def convert(self,filename=None): #Strip of common path and create full blown URL myURL=filename.replace(self.commonString,(self.commonURL+os.path.sep)) return myURL | d467b114918cb68deee88aee25e47969ed7efaf6 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5758/d467b114918cb68deee88aee25e47969ed7efaf6/makeCheckListWiki.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1765,
12,
2890,
16,
3459,
33,
7036,
4672,
468,
16632,
434,
2975,
589,
471,
752,
1983,
324,
821,
82,
1976,
3399,
1785,
33,
3459,
18,
2079,
12,
2890,
18,
6054,
780,
16,
2890,
18,
6054,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1765,
12,
2890,
16,
3459,
33,
7036,
4672,
468,
16632,
434,
2975,
589,
471,
752,
1983,
324,
821,
82,
1976,
3399,
1785,
33,
3459,
18,
2079,
12,
2890,
18,
6054,
780,
16,
2890,
18,
6054,
... |
self.setWait(wait) | self.setWait(int(wait)+3) | def handleFree(self): if r'<div id="captchaArea" style="display:none;">' in self.html or \ r'/showCaptcha\(\);' in self.html: # we got a captcha id = re.search(r"var reCAPTCHA_publickey='(.*?)';", self.html).group(1) recaptcha = ReCaptcha(self) challenge, code = recaptcha.challenge(id) shortencode = re.search(r'name="recaptcha_shortencode_field" value="(.*?)"', self.html).group(1) | 57aa9e6de2f6cea96bcc9c1f698d1e7036160b4e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9838/57aa9e6de2f6cea96bcc9c1f698d1e7036160b4e/FileserveCom.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
9194,
12,
2890,
4672,
225,
309,
436,
11,
32,
2892,
612,
1546,
27267,
5484,
6,
2154,
1546,
5417,
30,
6102,
4868,
1870,
316,
365,
18,
2620,
578,
521,
436,
11,
19,
4500,
26837,
64,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
9194,
12,
2890,
4672,
225,
309,
436,
11,
32,
2892,
612,
1546,
27267,
5484,
6,
2154,
1546,
5417,
30,
6102,
4868,
1870,
316,
365,
18,
2620,
578,
521,
436,
11,
19,
4500,
26837,
64,
... |
if sort: | if self.is_commutative() and sort: | def __init__(self, x, unit=None, cr=False, sort=True): if not isinstance(x, list): raise TypeError, "x must be a list" if isinstance(x, Factorization): if unit is None: unit = x.__unit else: unit = x.__unit * unit from sage.rings.integer import Integer for t in x: if not (isinstance(t, tuple) and len(t) == 2 and isinstance(t[1],(int, long, Integer))): raise TypeError, "x must be a list of tuples of length 2" if unit is None: if len(x) > 0: try: unit = x[0][0].parent()(1) except AttributeError: unit = Integer(1) else: unit = Integer(1) list.__init__(self, x) self.__unit = unit self.__cr = cr if sort: self.sort() | 366d01f87cfaf5726fd23f49c23799fb32b771dd /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/366d01f87cfaf5726fd23f49c23799fb32b771dd/factorization.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
619,
16,
2836,
33,
7036,
16,
4422,
33,
8381,
16,
1524,
33,
5510,
4672,
309,
486,
1549,
12,
92,
16,
666,
4672,
1002,
3580,
16,
315,
92,
1297,
506,
279,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
619,
16,
2836,
33,
7036,
16,
4422,
33,
8381,
16,
1524,
33,
5510,
4672,
309,
486,
1549,
12,
92,
16,
666,
4672,
1002,
3580,
16,
315,
92,
1297,
506,
279,
... |
if source.values[property] != values[property]: print "%s changed from %s to %s" % (property, source.values[property], values[property]) | if self.source_get_value(property) != values[property]: print "%s changed from %s to %s" % (property, self.source_get_value(property), values[property]) | def apply (self, data): values = {} for page in [self.appearance, self.behaviour, self.globals, self.colours]: for property in page: widget = self.widgets[property] | cbf2bcbf5b7ec333322b8903983160004c5c706d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1032/cbf2bcbf5b7ec333322b8903983160004c5c706d/prefs_profile.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2230,
261,
2890,
16,
501,
4672,
924,
273,
2618,
364,
1363,
316,
306,
2890,
18,
438,
27668,
16,
365,
18,
31772,
477,
16,
365,
18,
16227,
16,
365,
18,
1293,
4390,
14542,
364,
1272,
316,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2230,
261,
2890,
16,
501,
4672,
924,
273,
2618,
364,
1363,
316,
306,
2890,
18,
438,
27668,
16,
365,
18,
31772,
477,
16,
365,
18,
16227,
16,
365,
18,
1293,
4390,
14542,
364,
1272,
316,
... |
""" | r""" Coerces the element x into this Laurent series ring. INPUT: x -- the element to coerce n -- the result of the coercion will be multiplied by $t^n$ (default: 0) | def __call__(self, x, n=0): """ EXAMPLES: sage: R.<u> = LaurentSeriesRing(Qp(5, 10)) sage: S.<t> = LaurentSeriesRing(RationalField()) sage: print R(t + t^2 + O(t^3)) (1 + O(5^10))*u + (1 + O(5^10))*u^2 + O(u^3) | aa9d69eb0e0e4ff7fcd17003488aba8033b6ec43 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/aa9d69eb0e0e4ff7fcd17003488aba8033b6ec43/laurent_series_ring.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1991,
972,
12,
2890,
16,
619,
16,
290,
33,
20,
4672,
436,
8395,
7695,
264,
764,
326,
930,
619,
1368,
333,
511,
8377,
547,
4166,
9221,
18,
225,
12943,
30,
619,
1493,
326,
930,
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,
1001,
1991,
972,
12,
2890,
16,
619,
16,
290,
33,
20,
4672,
436,
8395,
7695,
264,
764,
326,
930,
619,
1368,
333,
511,
8377,
547,
4166,
9221,
18,
225,
12943,
30,
619,
1493,
326,
930,
3... |
cr.execute('select model,res_id from ir_model_data where noupdate=%s and module=%s order by id desc', (False, mod_name,)) | cr.execute('SELECT model, res_id FROM ir_model_data ' 'WHERE noupdate=%s AND module=%s AND model <> \'ir.module.module\' ' 'ORDER BY id DESC', (False, mod_name,)) | def check_module_name(cr, mods, state): for mod in mods: id = modobj.search(cr, 1, ['&', ('state', '=', state), ('name', '=', mod)]) if id: getattr(modobj, states[state])(cr, 1, id) elif mod != 'all': logger.notifyChannel('init', netsvc.LOG_WARNING, 'module %s: invalid module name!' % (mod)) | b2aa61b0b0ef5ef5d2b88ffd3b2b4d81e5571f8e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12853/b2aa61b0b0ef5ef5d2b88ffd3b2b4d81e5571f8e/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
67,
2978,
67,
529,
12,
3353,
16,
15546,
16,
919,
4672,
364,
681,
316,
15546,
30,
612,
273,
681,
2603,
18,
3072,
12,
3353,
16,
404,
16,
10228,
10,
2187,
7707,
2019,
2187,
15196,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2978,
67,
529,
12,
3353,
16,
15546,
16,
919,
4672,
364,
681,
316,
15546,
30,
612,
273,
681,
2603,
18,
3072,
12,
3353,
16,
404,
16,
10228,
10,
2187,
7707,
2019,
2187,
15196,
... |
args_list = expand_as_command_line(command_string) | try: args_list = expand_as_command_line(command_string) except Error, err: LOG.error(err) continue | def run_interactive(parser): """Run an interactive shell for the google commands. Keyword arguments: parser: Object capable of parsing a list of arguments via parse_args. """ history_file = googlecl.get_data_path(googlecl.HISTORY_FILENAME) try: import readline try: readline.read_history_file(history_file) except IOError: pass except ImportError: pass while True: try: command_string = raw_input('> ') if command_string.startswith('python '): LOG.info('HINT: No need to include "python" in interactive mode') command_string = command_string.replace('python ', '', 1) if command_string.startswith('google '): LOG.info('HINT: No need to include "google" in interactive mode') command_string = command_string.replace('google ', '', 1) if not command_string: continue elif command_string == '?': print_help() elif command_string == 'quit': break else: args_list = expand_as_command_line(command_string) (options, args) = parser.parse_args(args_list) run_once(options, args) except (KeyboardInterrupt, ValueError), err: # It would be nice if we could simply unregister or reset the # signal handler defined in the initial if __name__ block. if str(err).find('I/O operation on closed file') == -1: raise err print '' print 'Quit via keyboard interrupt' break except EOFError: print '' break except SystemExit: # optparse.OptParser prints the usage statement and calls # sys.exit when there are any option errors. # Printing usage good, SystemExit bad. So catch it and do nothing. pass except BaseException: from traceback import print_exc print_exc() if 'readline' in sys.modules: readline.write_history_file(history_file) | a00d819420b88a935f429ee59bbd406706d0b453 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2899/a00d819420b88a935f429ee59bbd406706d0b453/google.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
67,
24761,
12,
4288,
4672,
3536,
1997,
392,
12625,
5972,
364,
326,
5200,
4364,
18,
225,
18317,
1775,
30,
2082,
30,
1033,
22863,
434,
5811,
279,
666,
434,
1775,
3970,
1109,
67,
1968... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
67,
24761,
12,
4288,
4672,
3536,
1997,
392,
12625,
5972,
364,
326,
5200,
4364,
18,
225,
18317,
1775,
30,
2082,
30,
1033,
22863,
434,
5811,
279,
666,
434,
1775,
3970,
1109,
67,
1968... |
key = win32api.RegOpenKeyEx( win32con.HKEY_LOCAL_MACHINE, tzRegKeyPath, 0, win32con.KEY_READ ) tzIndex, type = win32api.RegQueryValueEx( key, 'Index' ) | key = _winreg.OpenKeyEx( _winreg.HKEY_LOCAL_MACHINE, tzRegKeyPath ) tzIndex, type = _winreg.QueryValueEx( key, index_key ) | def GetIndexedTimeZoneNames( ): """Returns the names of the time zones as defined in the registry, but includes the index by which they may be sorted longitudinally.""" for timeZoneName in GetTimeZoneNames(): tzRegKeyPath = os.path.join( TimeZoneInfo.tzRegKey, timeZoneName ) key = win32api.RegOpenKeyEx( win32con.HKEY_LOCAL_MACHINE, tzRegKeyPath, 0, win32con.KEY_READ ) tzIndex, type = win32api.RegQueryValueEx( key, 'Index' ) yield ( tzIndex, timeZoneName ) | bd8808a18d9ded3524e77d1c8054398a60ba7dd7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/992/bd8808a18d9ded3524e77d1c8054398a60ba7dd7/win32timezone.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
968,
15034,
16760,
1557,
12,
262,
30,
3536,
1356,
326,
1257,
434,
326,
813,
13975,
487,
2553,
316,
326,
4023,
16,
1496,
6104,
326,
770,
635,
1492,
2898,
2026,
506,
3115,
1525,
305,
1100,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
968,
15034,
16760,
1557,
12,
262,
30,
3536,
1356,
326,
1257,
434,
326,
813,
13975,
487,
2553,
316,
326,
4023,
16,
1496,
6104,
326,
770,
635,
1492,
2898,
2026,
506,
3115,
1525,
305,
1100,... |
registerConverter(type(TRUE), BoolConverter) | if type(TRUE) == InstanceType: registerConverter(BOOL, BoolConverter) else: registerConverter(type(TRUE), BoolConverter) | def BoolConverter(value, db): if db in ('postgres',): if value: return "'t'" else: return "'f'" else: if value: return '1' else: return '0' | 531ed57f6e782ed4e60bf95d0183981cebe357f8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8798/531ed57f6e782ed4e60bf95d0183981cebe357f8/converters.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9166,
5072,
12,
1132,
16,
1319,
4672,
309,
1319,
316,
7707,
2767,
14107,
2187,
4672,
309,
460,
30,
327,
2491,
88,
4970,
469,
30,
327,
2491,
74,
4970,
469,
30,
309,
460,
30,
327,
296,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9166,
5072,
12,
1132,
16,
1319,
4672,
309,
1319,
316,
7707,
2767,
14107,
2187,
4672,
309,
460,
30,
327,
2491,
88,
4970,
469,
30,
327,
2491,
74,
4970,
469,
30,
309,
460,
30,
327,
296,
... |
imgListRight = createImageList(self.utility.friends) | imgListRight = createImageList(self.utility,friends) | def __init__(self, parent, dialog): wx.Panel.__init__(self, parent, -1) | 2838b8bbc6c01edbd17a4631d86d87a968c52a0c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9686/2838b8bbc6c01edbd17a4631d86d87a968c52a0c/dlhelperframe.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
982,
16,
6176,
4672,
7075,
18,
5537,
16186,
2738,
972,
12,
2890,
16,
982,
16,
300,
21,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
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,
982,
16,
6176,
4672,
7075,
18,
5537,
16186,
2738,
972,
12,
2890,
16,
982,
16,
300,
21,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
name="index.html" template="%s" permission="zope.Public" for="zope.app.component.tests.views.IC" /> """ % path | name="index.html" template="%s" permission="zope.Public" for="zope.app.component.tests.views.IC" /> ''' % path | def test_template_page(self): path = os.path.join(tests_path, 'testfiles', 'test.pt') | 1cfc7ddd1cac0110cca3e909215477e1c59bbca3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9523/1cfc7ddd1cac0110cca3e909215477e1c59bbca3/test_directives.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
3202,
67,
2433,
12,
2890,
4672,
589,
273,
1140,
18,
803,
18,
5701,
12,
16341,
67,
803,
16,
296,
3813,
2354,
2187,
296,
3813,
18,
337,
6134,
2,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
3202,
67,
2433,
12,
2890,
4672,
589,
273,
1140,
18,
803,
18,
5701,
12,
16341,
67,
803,
16,
296,
3813,
2354,
2187,
296,
3813,
18,
337,
6134,
2,
-100,
-100,
-100,
-100,
-100,
... |
records.extend(pymarc_extract(responseData)) nextPosition = self._get_next_id(responseData) return records | records.extend(self._build_recs(pymarc_extract(responseData))) nextPosition = self._get_next_id(responseData) else: nextPosition = None return sorted(records) | def _get_records(self, q): records = [] query = self._build_query(q) code = q['code'] subj = q['subj'] type = q['type'] | f8b9426bc1e3306bbf3491dbbd29014b4920b6b7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8937/f8b9426bc1e3306bbf3491dbbd29014b4920b6b7/worldcat2olac.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
67,
7094,
12,
2890,
16,
1043,
4672,
3853,
273,
5378,
843,
273,
365,
6315,
3510,
67,
2271,
12,
85,
13,
981,
273,
1043,
3292,
710,
3546,
15333,
273,
1043,
3292,
1717,
78,
3546,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
67,
7094,
12,
2890,
16,
1043,
4672,
3853,
273,
5378,
843,
273,
365,
6315,
3510,
67,
2271,
12,
85,
13,
981,
273,
1043,
3292,
710,
3546,
15333,
273,
1043,
3292,
1717,
78,
3546,... |
if c>255 or c<0: cjc_globals.screen.beep() return c=chr(c) | def _keypressed(self,c,escape): if c>255 or c<0: cjc_globals.screen.beep() return c=chr(c) if self.is_printable(c): self.key_char(c) else: cjc_globals.screen.beep() | 9998dc286dda0c2b743894df68d05bd2d9e8280d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12768/9998dc286dda0c2b743894df68d05bd2d9e8280d/choice_input.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
856,
10906,
12,
2890,
16,
71,
16,
6939,
4672,
309,
365,
18,
291,
67,
1188,
429,
12,
71,
4672,
365,
18,
856,
67,
3001,
12,
71,
13,
469,
30,
18896,
71,
67,
16227,
18,
9252,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
856,
10906,
12,
2890,
16,
71,
16,
6939,
4672,
309,
365,
18,
291,
67,
1188,
429,
12,
71,
4672,
365,
18,
856,
67,
3001,
12,
71,
13,
469,
30,
18896,
71,
67,
16227,
18,
9252,
18,
... | |
else: return value | return value | def process(value): if value and isinstance(value, datetime.date): return datetime.datetime(value.year, value.month, value.day) else: return value | 46720f0bbcf78a609cbcc1b7af55a8f4fb4ec319 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1074/46720f0bbcf78a609cbcc1b7af55a8f4fb4ec319/mssql.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
12,
1132,
4672,
309,
460,
471,
1549,
12,
1132,
16,
3314,
18,
712,
4672,
327,
3314,
18,
6585,
12,
1132,
18,
6874,
16,
460,
18,
7496,
16,
460,
18,
2881,
13,
469,
30,
327,
460,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
12,
1132,
4672,
309,
460,
471,
1549,
12,
1132,
16,
3314,
18,
712,
4672,
327,
3314,
18,
6585,
12,
1132,
18,
6874,
16,
460,
18,
7496,
16,
460,
18,
2881,
13,
469,
30,
327,
460,
... |
def _pprint_var_value(self, var, multiline=1, summary_linelen=0): | def _pprint_var_value(self, var, multiline=1, summary_linelen=0): """ @return: A string representation of the value of the variable C{var}, suitable for use in a C{<pre>...</pre>} HTML block. @type var: L{Lar} """ | def _pprint_var_value(self, var, multiline=1, summary_linelen=0): if not var.has_value(): return '' val = var.uid().value() | 6ecda71cd0e7e4752ddec3a0c1619699a3092855 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/6ecda71cd0e7e4752ddec3a0c1619699a3092855/html.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
84,
1188,
67,
1401,
67,
1132,
12,
2890,
16,
569,
16,
19431,
33,
21,
16,
4916,
67,
7511,
292,
275,
33,
20,
4672,
3536,
632,
2463,
30,
432,
533,
4335,
434,
326,
460,
434,
326,
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,
389,
84,
1188,
67,
1401,
67,
1132,
12,
2890,
16,
569,
16,
19431,
33,
21,
16,
4916,
67,
7511,
292,
275,
33,
20,
4672,
3536,
632,
2463,
30,
432,
533,
4335,
434,
326,
460,
434,
326,
2... |
flash('New entry was successfully posted') | def add_entry(): if not session.get('logged_in'): abort(401) form = EntryForm() if form.validate(): entry = Entry() form.populate_obj(entry) db.session.add(entry) db.session.commit() flash('New entry was successfully posted') return redirect(url_for('show_entries')) | c5e50c58600cdba544439fd21026cf4b75d3f012 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11490/c5e50c58600cdba544439fd21026cf4b75d3f012/flaskr.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
67,
4099,
13332,
309,
486,
1339,
18,
588,
2668,
19385,
67,
267,
11,
4672,
6263,
12,
27002,
13,
225,
646,
273,
3841,
1204,
1435,
309,
646,
18,
5662,
13332,
1241,
273,
3841,
1435,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
67,
4099,
13332,
309,
486,
1339,
18,
588,
2668,
19385,
67,
267,
11,
4672,
6263,
12,
27002,
13,
225,
646,
273,
3841,
1204,
1435,
309,
646,
18,
5662,
13332,
1241,
273,
3841,
1435,
6... | |
pipe %= (event.LEVEL_INTERVAL * gst.SECOND, encodeString, event.file.replace(" ", "\ ")) | pipe %= (event.LEVEL_INTERVAL * gst.SECOND, encodeString, event.file.replace("\\","\\\\").replace(" ", "\ ")) | def __RecordingPadAddedCb(self, elem, pad, recInstruments, bin): """ Handles new pad creation on the GStreamer channel split element when recording multiple streams at once. This method will be called when the new pad is ready to be connected to the encoder. Parameters: elem -- the GStreamer channel split element. pad -- the new src pad on the channel split element. recInstruments -- list with all Instruments currently recording. bin -- the bin that stores all the recording elements. """ # SRC template: 'src%d' padname = pad.get_name() try: index = int(padname[3:]) except ValueError: Globals.debug("Cannot start multichannel record: pad name does not match 'src%d':", padname) return | 2e7a2b9a815c59889c984711fa550fab4a044bea /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10033/2e7a2b9a815c59889c984711fa550fab4a044bea/Project.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
21037,
14878,
8602,
15237,
12,
2890,
16,
3659,
16,
4627,
16,
1950,
19228,
87,
16,
4158,
4672,
3536,
27020,
394,
4627,
6710,
603,
326,
611,
1228,
264,
1904,
1416,
930,
1347,
14949,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
21037,
14878,
8602,
15237,
12,
2890,
16,
3659,
16,
4627,
16,
1950,
19228,
87,
16,
4158,
4672,
3536,
27020,
394,
4627,
6710,
603,
326,
611,
1228,
264,
1904,
1416,
930,
1347,
14949,
... |
self.blockno += 1 | def print_block (self): self.blockno += 1 prefix = '%s.changes.%d.blocks.%d' % (self.prefix, self.changeno, self.blockno) if self.p_type == '-' and self.ttype == '+': self._write_block(prefix, 'mod', old=string.join(self.p_block, '<br />'), new=string.join(self.block, '<br />')) elif self.ttype == '+': self._write_block(prefix, 'add', new=string.join(self.block, '<br />')) elif self.ttype == '-': self._write_block(prefix, 'rem', old=string.join(self.block, '<br />')) elif self.ttype == ' ': self._write_block(prefix, 'unmod', old=string.join(self.block, '<br />'), new=string.join(self.block, '<br />')) self.block = self.p_block = [] | fadface95df7a3617a141c86fb5ec1a9219977d6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/fadface95df7a3617a141c86fb5ec1a9219977d6/Changeset.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1172,
67,
2629,
261,
2890,
4672,
1633,
273,
1995,
87,
18,
6329,
7866,
72,
18,
7996,
7866,
72,
11,
738,
261,
2890,
18,
3239,
16,
365,
18,
24083,
5764,
16,
365,
18,
2629,
2135,
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,
1172,
67,
2629,
261,
2890,
4672,
1633,
273,
1995,
87,
18,
6329,
7866,
72,
18,
7996,
7866,
72,
11,
738,
261,
2890,
18,
3239,
16,
365,
18,
24083,
5764,
16,
365,
18,
2629,
2135,
13,
309... | |
--num-slides 50 --zero-data exclude_play --cluster-time 10 --cluster-infinity" | --num-slides 50 --zero-data exclude_play "+\ "--cluster-infinity --coinc-stat " +stat_dict["statistic"] + \ " --h1-bittenl-a "+stat_dict["bittenl_a"]+ " --h1-bittenl-b "+stat_dict["bittenl_b"]+\ " --h2-bittenl-a "+stat_dict["bittenl_a"]+ " --h2-bittenl-b "+stat_dict["bittenl_b"]+\ " --l1-bittenl-a "+stat_dict["bittenl_a"]+ " --l1-bittenl-b "+stat_dict["bittenl_b"] | def symlinksafe( target, linkname ): """ Creates a link, does not nag about when it already exists """ try: os.symlink( target, linkname ) except OSError, (errno, strerror): if errno==17: print "WARNING: link %s already exist" % (linkname) else: raise | 8df8a6d85329fcb14aa2997b4a9f6708e492bf9b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3592/8df8a6d85329fcb14aa2997b4a9f6708e492bf9b/upperlimit.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10563,
4626,
12,
1018,
16,
1692,
529,
262,
30,
3536,
10210,
279,
1692,
16,
1552,
486,
290,
346,
2973,
1347,
518,
1818,
1704,
3536,
775,
30,
1140,
18,
21278,
12,
1018,
16,
1692,
529,
26... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10563,
4626,
12,
1018,
16,
1692,
529,
262,
30,
3536,
10210,
279,
1692,
16,
1552,
486,
290,
346,
2973,
1347,
518,
1818,
1704,
3536,
775,
30,
1140,
18,
21278,
12,
1018,
16,
1692,
529,
26... |
return None if self.__current_realm is None: self.__current_realm = realm else: self.__current_realm = realm | def get_authorization(self, req, chal): try: realm = chal['realm'] nonce = chal['nonce'] algorithm = chal.get('algorithm', 'MD5') # mod_digest doesn't send an opaque, even though it isn't # supposed to be optional opaque = chal.get('opaque', None) except KeyError: return None | 479d224bbcd6d456b2b35514bc272be9a92e5143 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/479d224bbcd6d456b2b35514bc272be9a92e5143/urllib2.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
12218,
12,
2890,
16,
1111,
16,
462,
287,
4672,
775,
30,
11319,
273,
462,
287,
3292,
24056,
3546,
7448,
273,
462,
287,
3292,
12824,
3546,
4886,
273,
462,
287,
18,
588,
2668,
12... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
12218,
12,
2890,
16,
1111,
16,
462,
287,
4672,
775,
30,
11319,
273,
462,
287,
3292,
24056,
3546,
7448,
273,
462,
287,
3292,
12824,
3546,
4886,
273,
462,
287,
18,
588,
2668,
12... | |
public_scan = (e_public_scan and epublic_scan.text == 'true') or (e_ia is not None), overdrive = (e_overdrive.text.split(';') if e_overdrive else []), lending_edition = (e_lending_edition.text if e_lending_edition else None), | public_scan = ((e_public_scan.text == 'true') if e_public_scan is not None else (e_ia is not None)), overdrive = (e_overdrive.text.split(';') if e_overdrive is not None else []), lending_edition = (e_lending_edition.text if e_lending_edition is not None else None), | def get_doc(doc): e_ia = doc.find("arr[@name='ia']") first_pub = None e_first_pub = doc.find("int[@name='first_publish_year']") if e_first_pub is not None: first_pub = e_first_pub.text e_first_edition = doc.find("str[@name='first_edition']") first_edition = None if e_first_edition is not None: first_edition = e_first_edition.text work_subtitle = None e_subtitle = doc.find("str[@name='subtitle']") if e_subtitle is not None: work_subtitle = e_subtitle.text if doc.find("arr[@name='author_key']") is None: assert doc.find("arr[@name='author_name']") is None authors = [] else: ak = [e.text for e in doc.find("arr[@name='author_key']")] an = [e.text for e in doc.find("arr[@name='author_name']")] authors = [web.storage(key=key, name=name, url="/authors/%s/%s" % (key, (urlsafe(name) if name is not None else 'noname'))) for key, name in zip(ak, an)] cover = doc.find("str[@name='cover_edition_key']") e_public_scan = doc.find("bool[@name='public_scan_b]") e_overdrive = doc.find("str[@name='overdrive_s]") e_lending_edition = doc.find("str[@name='lending_edition_s]") doc = web.storage( key = doc.find("str[@name='key']").text, title = doc.find("str[@name='title']").text, edition_count = int(doc.find("int[@name='edition_count']").text), ia = [e.text for e in (e_ia if e_ia is not None else [])], has_fulltext = (doc.find("bool[@name='has_fulltext']").text == 'true'), public_scan = (e_public_scan and epublic_scan.text == 'true') or (e_ia is not None), overdrive = (e_overdrive.text.split(';') if e_overdrive else []), lending_edition = (e_lending_edition.text if e_lending_edition else None), authors = authors, first_publish_year = first_pub, first_edition = first_edition, subtitle = work_subtitle, cover_edition_key = (cover.text if cover is not None else None), ) doc.url = '/works/' + doc.key + '/' + urlsafe(doc.title) return doc | 6a2c7c779a9c4cffa9fa2c650f549c71fb64df77 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3913/6a2c7c779a9c4cffa9fa2c650f549c71fb64df77/code.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
2434,
12,
2434,
4672,
425,
67,
1155,
273,
997,
18,
4720,
2932,
5399,
14782,
529,
2218,
1155,
3546,
7923,
1122,
67,
10174,
273,
599,
425,
67,
3645,
67,
10174,
273,
997,
18,
472... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2434,
12,
2434,
4672,
425,
67,
1155,
273,
997,
18,
4720,
2932,
5399,
14782,
529,
2218,
1155,
3546,
7923,
1122,
67,
10174,
273,
599,
425,
67,
3645,
67,
10174,
273,
997,
18,
472... |
if version and int(version) == int(doc.getLatestVersion()): | if version and int(version) == int(doc.get_latest_version()): | def _getfile_py(req,c=CFG_SITE_NAME,ln=CFG_SITE_LANG,recid="",docid="",version="",name="",format=""): _ = gettext_set_language(ln) | 382a1f25f9b0d159df208291e44a573986f659ca /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12027/382a1f25f9b0d159df208291e44a573986f659ca/websubmit_webinterface.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
768,
67,
2074,
12,
3658,
16,
71,
33,
19727,
67,
20609,
67,
1985,
16,
2370,
33,
19727,
67,
20609,
67,
10571,
16,
3927,
350,
1546,
3113,
2434,
350,
1546,
3113,
1589,
1546,
3113... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
768,
67,
2074,
12,
3658,
16,
71,
33,
19727,
67,
20609,
67,
1985,
16,
2370,
33,
19727,
67,
20609,
67,
10571,
16,
3927,
350,
1546,
3113,
2434,
350,
1546,
3113,
1589,
1546,
3113... |
etree.SubElement(self.element, '{%s}unknown' % self._xml_namespace, nsmap=self._xml_application.xml_nsmap) | if self.element.find('{%s}unknown' % self._xml_namespace) is None: etree.SubElement(self.element, '{%s}unknown' % self._xml_namespace, nsmap=self._xml_application.xml_nsmap) | def _build_element(self, *args, **kwargs): for note in self.notes: note.to_element(*args, **kwargs) if self.unknown: etree.SubElement(self.element, '{%s}unknown' % self._xml_namespace, nsmap=self._xml_application.xml_nsmap) else: for child in self: child.to_element(*args, **kwargs) | d2935bc41445a8ed8cb13386e25dd0387f3148e3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3449/d2935bc41445a8ed8cb13386e25dd0387f3148e3/rpid.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3510,
67,
2956,
12,
2890,
16,
380,
1968,
16,
2826,
4333,
4672,
364,
4721,
316,
365,
18,
12903,
30,
4721,
18,
869,
67,
2956,
30857,
1968,
16,
2826,
4333,
13,
309,
365,
18,
8172,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3510,
67,
2956,
12,
2890,
16,
380,
1968,
16,
2826,
4333,
4672,
364,
4721,
316,
365,
18,
12903,
30,
4721,
18,
869,
67,
2956,
30857,
1968,
16,
2826,
4333,
13,
309,
365,
18,
8172,
... |
options = ExtMap({}) ppsettings = ExtMap(self._config.get("pretty-print")) setattr(options, 'prettyPrint', True) | ppsettings = ExtMap(self._config.get("pretty-print")) parser = optparse.OptionParser() compiler.addCommandLineOptions(parser) (options, args) = parser.parse_args([]) setattr(options, 'prettyPrint', True) | def runPrettyPrinting(self, classes): "Gather all relevant config settings and pass them to the compiler" if not self._config.get("pretty-print", False): return self._console.info("Pretty-printing code...") self._console.indent() | f85de0d8e3e4e961d9d6af1c938ed6a7f55215bf /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5718/f85de0d8e3e4e961d9d6af1c938ed6a7f55215bf/Generator.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
20491,
5108,
310,
12,
2890,
16,
3318,
4672,
315,
26092,
777,
9368,
642,
1947,
471,
1342,
2182,
358,
326,
5274,
6,
225,
309,
486,
365,
6315,
1425,
18,
588,
2932,
19073,
17,
1188,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
20491,
5108,
310,
12,
2890,
16,
3318,
4672,
315,
26092,
777,
9368,
642,
1947,
471,
1342,
2182,
358,
326,
5274,
6,
225,
309,
486,
365,
6315,
1425,
18,
588,
2932,
19073,
17,
1188,
... |
% (child.id, node.id, seg[0], seg[1])) | def walk(self, node, seg, errh, seg_count, cur_line, ls_id): """ Handle required segment/loop missed (not found in seg) Handle found segment = Not used """ | bb619bf611150eaa5b70d0f12ddff224e1468784 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11528/bb619bf611150eaa5b70d0f12ddff224e1468784/map_walker.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5442,
12,
2890,
16,
756,
16,
2291,
16,
393,
76,
16,
2291,
67,
1883,
16,
662,
67,
1369,
16,
7180,
67,
350,
4672,
3536,
5004,
1931,
3267,
19,
6498,
25143,
261,
902,
1392,
316,
2291,
13... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5442,
12,
2890,
16,
756,
16,
2291,
16,
393,
76,
16,
2291,
67,
1883,
16,
662,
67,
1369,
16,
7180,
67,
350,
4672,
3536,
5004,
1931,
3267,
19,
6498,
25143,
261,
902,
1392,
316,
2291,
13... | |
def __init__(self, sprite, get, set): self.sprite = sprite self.get = get self.set = set | def __init__(self, im, get, set): self.im = im self.getfn = get self.setfn = set def refresh(self, im): """ Underlying sprite array has changed -- update link/cache. This is for when the sprite is resized or rescaled, etc """ self.im = im | def __init__(self, sprite, get, set): self.sprite = sprite self.get = get self.set = set | 225862206915a937b75b16306d39fcee962cb426 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5701/225862206915a937b75b16306d39fcee962cb426/sprite.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
709,
16,
336,
16,
444,
4672,
365,
18,
381,
225,
273,
709,
365,
18,
588,
4293,
273,
336,
365,
18,
542,
4293,
273,
444,
225,
1652,
4460,
12,
2890,
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,
709,
16,
336,
16,
444,
4672,
365,
18,
381,
225,
273,
709,
365,
18,
588,
4293,
273,
336,
365,
18,
542,
4293,
273,
444,
225,
1652,
4460,
12,
2890,
16,
... |
self.pool.map_async(func, iterable, chunksize, callback) | result = self.pool.map_async(func, iterable, chunksize, callback) return result.get() | def map_async (self, func, iterable, chunksize=None, callback=None) : if self.enable_multiprocessing : self.pool.map_async(func, iterable, chunksize, callback) else : map(func, iterable) | 22fb523cb11178bf561cf52ac705b0ff452b9269 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/696/22fb523cb11178bf561cf52ac705b0ff452b9269/smp_utils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
852,
67,
3810,
261,
2890,
16,
1326,
16,
6087,
16,
23256,
33,
7036,
16,
1348,
33,
7036,
13,
294,
309,
365,
18,
7589,
67,
5421,
625,
19507,
294,
563,
273,
365,
18,
6011,
18,
1458,
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,
852,
67,
3810,
261,
2890,
16,
1326,
16,
6087,
16,
23256,
33,
7036,
16,
1348,
33,
7036,
13,
294,
309,
365,
18,
7589,
67,
5421,
625,
19507,
294,
563,
273,
365,
18,
6011,
18,
1458,
67,
... |
if [fd for fd in w if fd not in client_map]: | if [fd for fd in w if fd not in map]: | def client_loop(): map = client_map read = asyncore.read write = asyncore.write _exception = asyncore._exception loop_failures = 0 while map: try: # The next two lines intentionally don't use # iterators. Other threads can close dispatchers, causeing # the socket map to shrink. r = e = client_map.keys() w = [fd for (fd, obj) in map.items() if obj.writable()] try: r, w, e = select.select(r, w, e, client_timeout) except select.error, err: if err[0] != errno.EINTR: if err[0] == errno.EBADF: # If a connection is closed while we are # calling select on it, we can get a bad # file-descriptor error. We'll check for this # case by looking for entries in r and w that # are not in the socket map. if [fd for fd in r if fd not in client_map]: continue if [fd for fd in w if fd not in client_map]: continue raise else: continue if not (r or w or e): for obj in client_map.itervalues(): if isinstance(obj, Connection): # Send a heartbeat message as a reply to a # non-existent message id. try: obj.send_reply(-1, None) except DisconnectedError: pass global client_timeout_count client_timeout_count += 1 continue for fd in r: obj = map.get(fd) if obj is None: continue read(obj) for fd in w: obj = map.get(fd) if obj is None: continue write(obj) for fd in e: obj = map.get(fd) if obj is None: continue _exception(obj) except: if map: try: client_logger.critical('The ZEO client loop failed.', exc_info=sys.exc_info()) except: pass for fd, obj in map.items(): if obj is client_trigger: continue try: obj.mgr.client.close() except: map.pop(fd, None) try: client_logger.critical("Couldn't close a dispatcher.", exc_info=sys.exc_info()) except: pass | 96933dd70337c5e1b8f2c2666b8e0ed1fd9358a7 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10048/96933dd70337c5e1b8f2c2666b8e0ed1fd9358a7/connection.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1004,
67,
6498,
13332,
852,
273,
1004,
67,
1458,
225,
855,
273,
4326,
479,
18,
896,
1045,
273,
4326,
479,
18,
2626,
389,
4064,
273,
4326,
479,
6315,
4064,
2798,
67,
26268,
273,
374,
22... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1004,
67,
6498,
13332,
852,
273,
1004,
67,
1458,
225,
855,
273,
4326,
479,
18,
896,
1045,
273,
4326,
479,
18,
2626,
389,
4064,
273,
4326,
479,
6315,
4064,
2798,
67,
26268,
273,
374,
22... |
pkt = [hdr, 0] + [0]*11 + encode(r[0]) + encode(r[1]-1 + 1024*blockDelay) + [0]*37 | pkt = [hdr, 0] + [0]*11 + encode(r[0]) + encode(r[1]-1 + SRAM_DELAY_LEN * blockDelay) + [0]*37 | def run_sram(self, c, data, loop=False, blockDelay=0): """Loads data into the SRAM and executes. | e8dbdaa606786bd6adf63e48c5376707f023bd7a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7016/e8dbdaa606786bd6adf63e48c5376707f023bd7a/ghz_dacs.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
67,
87,
1940,
12,
2890,
16,
276,
16,
501,
16,
2798,
33,
8381,
16,
1203,
6763,
33,
20,
4672,
3536,
7968,
501,
1368,
326,
19145,
2192,
471,
11997,
18,
2,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
67,
87,
1940,
12,
2890,
16,
276,
16,
501,
16,
2798,
33,
8381,
16,
1203,
6763,
33,
20,
4672,
3536,
7968,
501,
1368,
326,
19145,
2192,
471,
11997,
18,
2,
-100,
-100,
-100,
-100,
... |
u"""\nAll messages added to Chandler folders will show up in your All Dashboard. Note: Chandler folders may take a while to appear in your email application.""") | u"""\nMessages added to these Chandler IMAP folders will appear in your Dashboard. Note: Folders may take a while to appear in your email application.""") | def getSuccessText(self, statusValue): descriptions = { constants.CHANDLER_MAIL_FOLDER: _(u"Add messages to this folder to add them to your Mail Dashboard."), constants.CHANDLER_STARRED_FOLDER: _(u"Add messages to this folder to add them to your Starred Items Dashboard."), constants.CHANDLER_EVENTS_FOLDER: _(u"Add messages to this folder to add them to your Calendar.") } formatArgNames = { constants.CHANDLER_MAIL_FOLDER: "%(ChandlerMailFolder)s", constants.CHANDLER_TASKS_FOLDER: "%(ChandlerTasksFolder)s", constants.CHANDLER_STARRED_FOLDER: "%(ChandlerStarredFolder)s", constants.CHANDLER_EVENTS_FOLDER: "%(ChandlerEventsFolder)s", } created = "" renamed = "" unchanged = "" for t in statusValue[0]: if t[0] == 'created': created += "%s - %s\n\n" % ( formatArgNames[t[1]], descriptions[t[1]] ) elif t[0] == 'renamed': desc = _(u"%(oldMailboxName)s has been renamed to %(newMailboxName)s") % { 'oldMailboxName': formatArgNames[t[1]], 'newMailboxName': formatArgNames[t[2]] } renamed += "%s - %s\n\n" % ( desc, descriptions[t[2]] ) elif t[0] == 'exists': unchanged += "%s - %s\n\n" % ( formatArgNames[t[1]], descriptions[t[1]] ) | 3b831f9b81323b15070a42b9b890c2c02ace7a8b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9228/3b831f9b81323b15070a42b9b890c2c02ace7a8b/AccountPreferencesDialogs.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1322,
2825,
1528,
12,
2890,
16,
1267,
620,
4672,
15550,
273,
288,
6810,
18,
1792,
4307,
14668,
67,
18191,
67,
17357,
30,
389,
12,
89,
6,
986,
2743,
358,
333,
3009,
358,
527,
2182,
358,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1322,
2825,
1528,
12,
2890,
16,
1267,
620,
4672,
15550,
273,
288,
6810,
18,
1792,
4307,
14668,
67,
18191,
67,
17357,
30,
389,
12,
89,
6,
986,
2743,
358,
333,
3009,
358,
527,
2182,
358,... |
"Sets the state of a SAX2 feature." raise SAXNotRecognizedException("Feature '%s' not recognized" % name) | if self._parsing: raise SAXNotSupportedException("Cannot set features while parsing") if name == feature_namespaces: self._namespaces = state else: raise SAXNotRecognizedException("Feature '%s' not recognized" % name) | def setFeature(self, name, state): "Sets the state of a SAX2 feature." raise SAXNotRecognizedException("Feature '%s' not recognized" % name) | f3aad55432f710e7a4433a626b69fef255f2a419 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/f3aad55432f710e7a4433a626b69fef255f2a419/expatreader.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
28669,
12,
2890,
16,
508,
16,
919,
4672,
315,
2785,
326,
919,
434,
279,
10168,
22,
2572,
1199,
1002,
10168,
1248,
5650,
9367,
503,
2932,
4595,
1995,
87,
11,
486,
16332,
6,
738,
508,
13... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
28669,
12,
2890,
16,
508,
16,
919,
4672,
315,
2785,
326,
919,
434,
279,
10168,
22,
2572,
1199,
1002,
10168,
1248,
5650,
9367,
503,
2932,
4595,
1995,
87,
11,
486,
16332,
6,
738,
508,
13... |
use_reloader=True, use_debugger=True, | def make_app(): return Blikit('.') | 22b0b59da12dff7665ab8b66a3d05a1efc228fe9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13899/22b0b59da12dff7665ab8b66a3d05a1efc228fe9/blikit-manage.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1221,
67,
2910,
13332,
327,
605,
549,
8691,
2668,
1093,
13,
225,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
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,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1221,
67,
2910,
13332,
327,
605,
549,
8691,
2668,
1093,
13,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... | |
s = format_exception(s, ncols) | s = format_exception(format_html(s), ncols) | def format_html(x): return self.process_cell_urls(x) | f403620404e2fffc45865fb228d8e5e1ffeee4c8 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/f403620404e2fffc45865fb228d8e5e1ffeee4c8/cell.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
740,
67,
2620,
12,
92,
4672,
327,
365,
18,
2567,
67,
3855,
67,
10518,
12,
92,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
740,
67,
2620,
12,
92,
4672,
327,
365,
18,
2567,
67,
3855,
67,
10518,
12,
92,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
get().open(url, 1) def _synthesize(browser): | return open(url, 1) def open_new_tab(url): return open(url, 2) def _synthesize(browser, update_tryorder=1): | def open_new(url): get().open(url, 1) | e8f244305ef4f257f6999b69601f4316b31faa5e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/e8f244305ef4f257f6999b69601f4316b31faa5e/webbrowser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1696,
67,
2704,
12,
718,
4672,
336,
7675,
3190,
12,
718,
16,
404,
13,
282,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1696,
67,
2704,
12,
718,
4672,
336,
7675,
3190,
12,
718,
16,
404,
13,
282,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
preOps = [parentsTagger()], | duringOps = parentsTagger(), | def checkSexMode(ms): '''Check the assignment of sex to offspring''' simu = simulator( population(size=[40]), matingScheme=ms) simu.evolve(initOps = initSex(), gen=1) # return individual sex as a string return ''.join([ind.sexChar() for ind in simu.population(0).individuals()]) | 505ded08bbab01d6828bb201d31e079f6d9e3b55 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/401/505ded08bbab01d6828bb201d31e079f6d9e3b55/userGuide.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
55,
338,
2309,
12,
959,
4672,
9163,
1564,
326,
6661,
434,
19631,
358,
21174,
11638,
26418,
3142,
89,
273,
3142,
11775,
12,
11209,
12,
1467,
22850,
7132,
65,
3631,
312,
1776,
9321,
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,
866,
55,
338,
2309,
12,
959,
4672,
9163,
1564,
326,
6661,
434,
19631,
358,
21174,
11638,
26418,
3142,
89,
273,
3142,
11775,
12,
11209,
12,
1467,
22850,
7132,
65,
3631,
312,
1776,
9321,
3... |
%s | %(start_string_prefix)s | def parse(self, text, lineno, memo, parent): """ Return 2 lists: nodes (text and inline elements), and system_messages. | 816927c350eab6c8d1baf3e3aa09f53b2caab704 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1278/816927c350eab6c8d1baf3e3aa09f53b2caab704/states.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
12,
2890,
16,
977,
16,
7586,
16,
11063,
16,
982,
4672,
3536,
2000,
576,
6035,
30,
2199,
261,
955,
471,
6370,
2186,
3631,
471,
2619,
67,
6833,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
12,
2890,
16,
977,
16,
7586,
16,
11063,
16,
982,
4672,
3536,
2000,
576,
6035,
30,
2199,
261,
955,
471,
6370,
2186,
3631,
471,
2619,
67,
6833,
18,
2,
-100,
-100,
-100,
-100,
-100,... |
print_section(len(angles), "THETA") for counter, (index1, index2, index3) in enumerate(angles): print >> f, "% 7i% 7i% 7i" % (index1+1, index2+1, index3+1), if counter % 3 == 2: | if len(angles) > 0: print_section(len(angles), "THETA") for counter, (index1, index2, index3) in enumerate(angles): print >> f, "% 7i% 7i% 7i" % (index1+1, index2+1, index3+1), if counter % 3 == 2: print >> f if counter % 3 != 2: | def print_section(count, name): print >> f print >> f, "% 7i !N%s" % (count, name) | bca6260b20603e4b8548e3cd4269c77d165487ac /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11052/bca6260b20603e4b8548e3cd4269c77d165487ac/psf.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1172,
67,
3464,
12,
1883,
16,
508,
4672,
1172,
1671,
284,
1172,
1671,
284,
16,
2213,
2371,
77,
401,
50,
9,
87,
6,
738,
261,
1883,
16,
508,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1172,
67,
3464,
12,
1883,
16,
508,
4672,
1172,
1671,
284,
1172,
1671,
284,
16,
2213,
2371,
77,
401,
50,
9,
87,
6,
738,
261,
1883,
16,
508,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
... |
fallbackCacheDir=self.args['ComponentDir'] + "/%s"%fjr[0].jobSpecId | def archiveJob(self,success,jobId): """ _archiveJob_ copy(self.reportfilename,newPath) | 19db9a7e0aa0beca168779d8fe6979e1cee04630 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8887/19db9a7e0aa0beca168779d8fe6979e1cee04630/TrackingComponent.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5052,
2278,
12,
2890,
16,
4768,
16,
4688,
548,
4672,
3536,
389,
10686,
2278,
67,
1610,
12,
2890,
18,
6006,
3459,
16,
2704,
743,
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,
5052,
2278,
12,
2890,
16,
4768,
16,
4688,
548,
4672,
3536,
389,
10686,
2278,
67,
1610,
12,
2890,
18,
6006,
3459,
16,
2704,
743,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... | |
self.glpane.scale = self.assy.bbox.scale() self.glpane.gl_update() self.mt.mt_update() | def fileOpenBabelExport(self): # Fixed up by Mark. 2007-06-05 """ Slot method for 'File > Export'. Exported files contain all atoms, including invisible and hidden atoms. This is considered a bug. """ # To Do: Mark 2007-06-05 # # - Export only visible atoms, etc. | 3fffc74d4543bd35c1416542a2c993ffcb039e5f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11221/3fffc74d4543bd35c1416542a2c993ffcb039e5f/ops_files.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
585,
3678,
38,
873,
6144,
12,
2890,
4672,
468,
15038,
731,
635,
6622,
18,
4044,
27,
17,
7677,
17,
6260,
3536,
23195,
707,
364,
296,
812,
405,
11054,
10332,
1312,
1798,
1390,
912,
777,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
585,
3678,
38,
873,
6144,
12,
2890,
4672,
468,
15038,
731,
635,
6622,
18,
4044,
27,
17,
7677,
17,
6260,
3536,
23195,
707,
364,
296,
812,
405,
11054,
10332,
1312,
1798,
1390,
912,
777,
... | |
resultDay = self.getCounters('Jobs',['Site','Status'], {},newer=last_day, timeStamp='EndExecTime') | resultDay = self.getCounters( 'Jobs', ['Site', 'Status'], {}, newer = last_day, timeStamp = 'EndExecTime' ) | def getSiteSummaryWeb(self,selectDict, sortList, startItem, maxItems): """ Get the summary of jobs in a given status on all the sites in the standard Web form """ | 99c1bc850ba087890925b3180df206f65bb1d4b3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/99c1bc850ba087890925b3180df206f65bb1d4b3/JobDB.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11021,
4733,
4079,
12,
2890,
16,
4025,
5014,
16,
1524,
682,
16,
787,
1180,
16,
943,
3126,
4672,
3536,
968,
326,
4916,
434,
6550,
316,
279,
864,
1267,
603,
777,
326,
9180,
316,
326,
452... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11021,
4733,
4079,
12,
2890,
16,
4025,
5014,
16,
1524,
682,
16,
787,
1180,
16,
943,
3126,
4672,
3536,
968,
326,
4916,
434,
6550,
316,
279,
864,
1267,
603,
777,
326,
9180,
316,
326,
452... |
s += '\n\\begin{center}$\\displaystyle %s $\\end{center}\n'%L | if "latex" in self._input[n]: s+= "\\begin{verbatim}%s\\end{verbatim}" %L else: s += '\n\\begin{center}$\\displaystyle %s $\\end{center}\n'%L | def _get_output(self, n): s = '' self._after_output = True if self._in_verbatim: s += '\\end{verbatim}\n' self._in_verbatim = False L = latex.latex(self._output[n]) s += '\n\\begin{center}$\\displaystyle %s $\\end{center}\n'%L return s | 88c21ab18e6327f137093dec53417bbc774b09b9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9417/88c21ab18e6327f137093dec53417bbc774b09b9/log.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
67,
2844,
12,
2890,
16,
290,
4672,
272,
273,
875,
365,
6315,
5205,
67,
2844,
273,
1053,
309,
365,
6315,
267,
67,
16629,
22204,
30,
272,
1011,
3718,
409,
95,
16629,
22204,
628... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
67,
2844,
12,
2890,
16,
290,
4672,
272,
273,
875,
365,
6315,
5205,
67,
2844,
273,
1053,
309,
365,
6315,
267,
67,
16629,
22204,
30,
272,
1011,
3718,
409,
95,
16629,
22204,
628... |
def generator(source, replacements, exceptions, regex, textfilename = None, sqlfilename = None, pagenames = None): | def generator(source, replacements, exceptions, regex, namespace, textfilename = None, sqlfilename = None, pagenames = None): | def generator(source, replacements, exceptions, regex, textfilename = None, sqlfilename = None, pagenames = None): ''' Generator which will yield PageLinks for pages that might contain text to replace. These pages might be retrieved from a local SQL dump file or a text file, or as a list of pages entered by the user. Arguments: * source - where the bot should retrieve the page list from. can be 'sqldump', 'textfile' or 'userinput'. * replacements - a dictionary where keys are original texts and values are replacement texts. * exceptions - a list of strings; pages which contain one of these won't be changed. * regex - if the entries of replacements and exceptions should be interpreted as regular expressions * textfilename - the textfile's path, either absolute or relative, which will be used when source is 'textfile'. * sqlfilename - the dump's path, either absolute or relative, which will be used when source is 'sqldump'. * pagenames - a list of pages which will be used when source is 'userinput'. ''' if source == 'sqldump': for pl in read_pages_from_sql_dump(sqlfilename, replacements, exceptions, regex): yield pl elif source == 'textfile': for pl in read_pages_from_text_file(textfilename): yield pl elif source == 'userinput': for pagename in pagenames: yield wikipedia.PageLink(wikipedia.mylang, pagename) | d4b4944c8e5c69f758d1be95405dc813ac10b3da /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4404/d4b4944c8e5c69f758d1be95405dc813ac10b3da/replace.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4456,
12,
3168,
16,
11413,
16,
4798,
16,
3936,
16,
1981,
16,
977,
3459,
273,
599,
16,
1847,
3459,
273,
599,
16,
4262,
6809,
273,
599,
4672,
9163,
10159,
1492,
903,
2824,
3460,
7100,
36... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4456,
12,
3168,
16,
11413,
16,
4798,
16,
3936,
16,
1981,
16,
977,
3459,
273,
599,
16,
1847,
3459,
273,
599,
16,
4262,
6809,
273,
599,
4672,
9163,
10159,
1492,
903,
2824,
3460,
7100,
36... |
if delta.seconds >= (60*5): | if delta.seconds >= (5): | def restart(self): """ Restarts the current worker. """ try: delta = datetime.datetime.now() - self.job_start_time if delta.seconds >= (60*5): # more than 5 minutes, do a hard reset self.stop(hard_reset=True) else: self.stop() except TypeError: self.stop(hard_reset=True) self.job_start_time = None self.start() self.reset_checker() log.msg('[Worker: %s] Restarting...' % (self.id)) | 24e96da265978e450e8d89068efd3326da5ed2b8 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/24e96da265978e450e8d89068efd3326da5ed2b8/dsage_worker.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7870,
12,
2890,
4672,
3536,
20709,
87,
326,
783,
4322,
18,
225,
3536,
225,
775,
30,
3622,
273,
3314,
18,
6585,
18,
3338,
1435,
300,
365,
18,
4688,
67,
1937,
67,
957,
309,
3622,
18,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7870,
12,
2890,
4672,
3536,
20709,
87,
326,
783,
4322,
18,
225,
3536,
225,
775,
30,
3622,
273,
3314,
18,
6585,
18,
3338,
1435,
300,
365,
18,
4688,
67,
1937,
67,
957,
309,
3622,
18,
7... |
if __doc__ is not None: self.__doc__=__doc__ | if __doc__ is not None: self.__doc__=__doc__ else: self.__doc__ = "" | def __init__(self, name, bases=(), attrs=None, __doc__=None): """Create a new interface """ for b in bases: if not isinstance(b, Interface): raise TypeError, 'Expected base interfaces' self.__bases__=bases self.__name__=name | 1e479c3ef6694168b5a56840a052f5efd32ef517 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/1e479c3ef6694168b5a56840a052f5efd32ef517/iclass.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
508,
16,
8337,
33,
9334,
3422,
33,
7036,
16,
1001,
2434,
972,
33,
7036,
4672,
3536,
1684,
279,
394,
1560,
3536,
364,
324,
316,
8337,
30,
309,
486,
1549,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
8337,
33,
9334,
3422,
33,
7036,
16,
1001,
2434,
972,
33,
7036,
4672,
3536,
1684,
279,
394,
1560,
3536,
364,
324,
316,
8337,
30,
309,
486,
1549,
... |
symbol = self.symbol def get_data(exchange=''): """ This function is used internally. EXAMPLES: This indirectly tests the use of get_data. sage: finance.Stock('aapl').historical()[:2] [ 2-Jan-90 8.81 9.38 8.75 9.31 6542800, 3-Jan-90 9.50 9.50 9.38 9.38 7428400 ] """ url = 'http://finance.google.com/finance/historical?q=%s%s&output=csv&startdate=%s'%( exchange, symbol.upper(),startdate) return urllib.urlopen(url).read() if ':' in symbol: R = get_data() else: R = get_data('NASDAQ:') if "Bad Request" in R: R = get_data("NYSE:") if "Bad Request" in R: raise RuntimeError | return TimeSeries([x.open for x in self.google(*args, **kwds)]) def close(self, *args, **kwds): r""" Return the time series of all historical closing prices for this stock. If no arguments are given, will return last aquired historical data. Otherwise, data will be gotten from Google Finance. INPUT: startdate -- string, (default: 'Jan+1,+1900') enddate -- string, (default: current date) histperiod -- string, ('daily' or 'weekly') OUTPUT: TimeSeries -- Close price data EXAMPLES: You can directly obtain close data as so: sage: finance.Stock('vmw').close(startdate='Jan+1,+2008', enddate='Feb+1,+2008') [84.9900, 84.6000, 83.9500, 80.4900, 72.9900 ... 83.0000, 54.8700, 56.4200, 56.6700, 57.8500] Or, you can initialize stock data first and then extract the Close data: sage: c = finance.Stock('vmw') sage: c.google(startdate='Feb+1,+2008', enddate='Mar+1,+2008')[:5] [ 31-Jan-08 55.60 57.35 55.52 56.67 2607800, 1-Feb-08 56.98 58.14 55.06 57.85 2489400, 4-Feb-08 58.00 60.47 56.91 58.05 1840300, 5-Feb-08 57.60 59.30 57.17 59.30 1711700, 6-Feb-08 60.32 62.00 59.50 61.52 2209700 ] sage: c.close() [56.6700, 57.8500, 58.0500, 59.3000, 61.5200 ... 58.2900, 60.1800, 59.8600, 59.9500, 58.6700] Otherwise, \code{self.google()} will be called with the default arguements returning a year's worh of data: sage: finance.Stock('vmw').close() [57.7100, 56.9900, 55.5500, 57.3300, 65.9900 ... 84.9900, 84.6000, 83.9500, 80.4900, 72.9900] """ from time_series import TimeSeries if len(args) != 0: return TimeSeries([x.close for x in self.google(*args, **kwds)]) try: return TimeSeries([x.close for x in self.__historical]) except AttributeError: pass return TimeSeries([x.close for x in self.google(*args, **kwds)]) def load_from_file(self, file): """ Load historical data from a local csv formatted data file. Note that no symbol data is included in Google Finance's csv data. The csv file must be formatted in the following way, just as on Google Finance: Timestamp,Open,High,Low,Close,Volume INPUT: file -- local file with Google Finance formatted OHLC data OUTPUTS: Sequence -- OHLC data EXAMPLES: Suppose you have a file in your home directoy containing Apple stock OHLC data, such as that from Google Finance, called AAPL-minutely.csv. One can load this information into a Stock object like so. Note that the path must be explicit: sage: finance.Stock('aapl').load_from_file(SAGE_ROOT + '/examples/finance/AAPL-minutely.csv')[:5] [ 1212408060 188.00 188.00 188.00 188.00 687, 1212408000 188.00 188.11 188.00 188.00 2877, 1212407700 188.00 188.00 188.00 188.00 1000, 1212407640 187.75 188.00 187.75 188.00 2000, 1212405780 187.80 187.80 187.80 187.80 100 ] Note that since the source file doesn't contain information on which equity the information comes from, the symbol designated at initialization of Stock need not match the source of the data. For example, we can initialize a Stock object with the symbol 'goog', but load data from 'aapl' stock prices: sage: finance.Stock('goog').load_from_file(SAGE_ROOT + '/examples/finance/AAPL-minutely.csv')[:5] [ 1212408060 188.00 188.00 188.00 188.00 687, 1212408000 188.00 188.11 188.00 188.00 2877, 1212407700 188.00 188.00 188.00 188.00 1000, 1212407640 187.75 188.00 187.75 188.00 2000, 1212405780 187.80 187.80 187.80 187.80 100 ] This tests a file that doesn't exist: sage: finance.Stock("AAPL").load_from_file("I am not a file") Bad path or file name """ try: file_obj = open(file, 'r') R = file_obj.read(); self.__historical = self._load_from_csv(R) file_obj.close() return self.__historical except IOError, msg: print "Bad path or file name" def _load_from_csv(self, R): """ EXAMPLES: This indirectly tests _load_from_csv(): sage: finance.Stock('aapl').load_from_file(SAGE_ROOT + "/examples/finance/AAPL-minutely.csv") [ 1212408060 188.00 188.00 188.00 188.00 687, 1212408000 188.00 188.11 188.00 188.00 2877, 1212407700 188.00 188.00 188.00 188.00 1000, 1212407640 187.75 188.00 187.75 188.00 2000, 1212405780 187.80 187.80 187.80 187.80 100 ] """ | def historical(self,startdate='Jan+1,+1990'): """ Return an immutable sequence of historical price data for this stock, obtained from Google. | a7213fc06b60e05eff34efa07d539c0f6047977d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/a7213fc06b60e05eff34efa07d539c0f6047977d/stock.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
23922,
12,
2890,
16,
1937,
712,
2218,
46,
304,
15,
21,
16,
15,
19818,
20,
11,
4672,
3536,
2000,
392,
11732,
3102,
434,
23922,
6205,
501,
364,
333,
12480,
16,
12700,
628,
6124,
18,
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,
23922,
12,
2890,
16,
1937,
712,
2218,
46,
304,
15,
21,
16,
15,
19818,
20,
11,
4672,
3536,
2000,
392,
11732,
3102,
434,
23922,
6205,
501,
364,
333,
12480,
16,
12700,
628,
6124,
18,
2,
... |
def block(*args): return apply(_quickfix.Acceptor_block, args) def poll(*args): return apply(_quickfix.Acceptor_poll, args) def stop(*args): return apply(_quickfix.Acceptor_stop, args) def isLoggedOn(*args): return apply(_quickfix.Acceptor_isLoggedOn, args) def getSessions(*args): return apply(_quickfix.Acceptor_getSessions, args) def getSession(*args): return apply(_quickfix.Acceptor_getSession, args) def getSessionSettings(*args): return apply(_quickfix.Acceptor_getSessionSettings, args) def has(*args): return apply(_quickfix.Acceptor_has, args) def isStopped(*args): return apply(_quickfix.Acceptor_isStopped, args) def getApplication(*args): return apply(_quickfix.Acceptor_getApplication, args) def getMessageStoreFactory(*args): return apply(_quickfix.Acceptor_getMessageStoreFactory, args) | def block(*args): return _quickfix.Acceptor_block(*args) def poll(*args): return _quickfix.Acceptor_poll(*args) def stop(*args): return _quickfix.Acceptor_stop(*args) def isLoggedOn(*args): return _quickfix.Acceptor_isLoggedOn(*args) def getSessions(*args): return _quickfix.Acceptor_getSessions(*args) def getSession(*args): return _quickfix.Acceptor_getSession(*args) def getSessionSettings(*args): return _quickfix.Acceptor_getSessionSettings(*args) def has(*args): return _quickfix.Acceptor_has(*args) def isStopped(*args): return _quickfix.Acceptor_isStopped(*args) def getApplication(*args): return _quickfix.Acceptor_getApplication(*args) def getMessageStoreFactory(*args): return _quickfix.Acceptor_getMessageStoreFactory(*args) | def block(*args): return apply(_quickfix.Acceptor_block, args) | 7e632099fd421880c8c65fb0cf610d338d115ee9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8819/7e632099fd421880c8c65fb0cf610d338d115ee9/quickfix.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1203,
30857,
1968,
4672,
327,
2230,
24899,
19525,
904,
18,
5933,
280,
67,
2629,
16,
833,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1203,
30857,
1968,
4672,
327,
2230,
24899,
19525,
904,
18,
5933,
280,
67,
2629,
16,
833,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
if isdigest: joiner += '\n' | def _handle_multipart(self, msg, isdigest=0): # The trick here is to write out each part separately, merge them all # together, and then make sure that the boundary we've chosen isn't # present in the payload. msgtexts = [] subparts = msg.get_payload() if subparts is None: # Nothing has every been attached boundary = msg.get_boundary(failobj=_make_boundary()) print >> self._fp, '--' + boundary print >> self._fp, '\n' print >> self._fp, '--' + boundary + '--' return elif not isinstance(subparts, ListType): # Scalar payload subparts = [subparts] for part in subparts: s = StringIO() g = self.__class__(s, self._mangle_from_, self.__maxheaderlen) g.flatten(part, unixfrom=0) msgtexts.append(s.getvalue()) # Now make sure the boundary we've selected doesn't appear in any of # the message texts. alltext = NL.join(msgtexts) # BAW: What about boundaries that are wrapped in double-quotes? boundary = msg.get_boundary(failobj=_make_boundary(alltext)) # If we had to calculate a new boundary because the body text # contained that string, set the new boundary. We don't do it # unconditionally because, while set_boundary() preserves order, it # doesn't preserve newlines/continuations in headers. This is no big # deal in practice, but turns out to be inconvenient for the unittest # suite. if msg.get_boundary() <> boundary: msg.set_boundary(boundary) # Write out any preamble if msg.preamble is not None: self._fp.write(msg.preamble) # First boundary is a bit different; it doesn't have a leading extra # newline. print >> self._fp, '--' + boundary if isdigest: print >> self._fp # Join and write the individual parts joiner = '\n--' + boundary + '\n' if isdigest: # multipart/digest types effectively add an extra newline between # the boundary and the body part. joiner += '\n' self._fp.write(joiner.join(msgtexts)) print >> self._fp, '\n--' + boundary + '--', # Write out any epilogue if msg.epilogue is not None: if not msg.epilogue.startswith('\n'): print >> self._fp self._fp.write(msg.epilogue) | 9da64eb307eacf1137c4ed86bae0736aad6f8069 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/9da64eb307eacf1137c4ed86bae0736aad6f8069/Generator.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
4110,
67,
16404,
12,
2890,
16,
1234,
16,
353,
10171,
33,
20,
4672,
468,
1021,
28837,
2674,
353,
358,
1045,
596,
1517,
1087,
18190,
16,
2691,
2182,
777,
468,
9475,
16,
471,
1508,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
4110,
67,
16404,
12,
2890,
16,
1234,
16,
353,
10171,
33,
20,
4672,
468,
1021,
28837,
2674,
353,
358,
1045,
596,
1517,
1087,
18190,
16,
2691,
2182,
777,
468,
9475,
16,
471,
1508,
1... | |
elif opt in ("-d", "--dir=") and arg: | elif opt in ("-d", "--dir") and arg: | def args(self, argv, config): "Getting params of default input" | 743592d88dab2964394ae1a0a7a16d49c98eb769 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2232/743592d88dab2964394ae1a0a7a16d49c98eb769/swaml.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
833,
12,
2890,
16,
5261,
16,
642,
4672,
315,
19213,
859,
434,
805,
810,
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,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
833,
12,
2890,
16,
5261,
16,
642,
4672,
315,
19213,
859,
434,
805,
810,
6,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
'given to the --config-sect-filename option. It is an error to use ' | 'given to the --chunk-basename option. It is an error to use ' | def main(): try: import locale locale.setlocale(locale.LC_ALL, '') except ImportError: pass desc = default_description + ( ' ' 'For chunked HTML output, <destination> is the filename of the ' 'root chunk. The other chunks are written to the same directory ' 'as the root chunk, but their names are generated from the value ' 'given to the --config-sect-filename option. It is an error to use ' 'stdout as <destination> if there is more than one chunk to write.' ) publish_cmdline(writer=ChunkedHTMLWriter(), description=desc) | 1b3aa663325b7a051a2eaab8f4de83ea69872164 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1278/1b3aa663325b7a051a2eaab8f4de83ea69872164/rst2chunkedhtml.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
775,
30,
1930,
2573,
2573,
18,
542,
6339,
12,
6339,
18,
13394,
67,
4685,
16,
28707,
1335,
11308,
30,
1342,
3044,
273,
805,
67,
3384,
397,
261,
296,
225,
296,
296,
1290,
19... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
775,
30,
1930,
2573,
2573,
18,
542,
6339,
12,
6339,
18,
13394,
67,
4685,
16,
28707,
1335,
11308,
30,
1342,
3044,
273,
805,
67,
3384,
397,
261,
296,
225,
296,
296,
1290,
19... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.