rem stringlengths 2 226k | add stringlengths 0 227k | context stringlengths 8 228k | meta stringlengths 156 215 | input_ids list | attention_mask list | labels list |
|---|---|---|---|---|---|---|
('new_event_from_file_menu_for_performance', ' ('new_event_by_double_clicking_in_the_cal_view_for_performance', ' ('test_new_calendar_for_performance', ' ('importing_3000_event_calendar', ' | ('new_event_from_file_menu_for_performance.event_creation', ' ('new_event_by_double_clicking_in_the_cal_view_for_performance.double_click_in_the_calendar_view', ' ('test_new_calendar_for_performance.collection_creation', ' ('importing_3000_event_calendar.import_large_calendar', ' | def __init__(self): self._app_path = os.getcwd() self._options = { 'tbox_data': '.', # raw .perf files 'html_data': '.', # where to output generated .html 'perf_data': '.', # where to store processed data 'verbose': False, 'debug': False, 'cleanup': False, # remove .perf files when processed 'configfile': 'perf.cfg', 'section': 'base', 'warn': 2.0, # range of values to control color of cells 'alert': 5.0, 'p_alert': 100.0, # percentage change to warn about (for summary only) } | 0232c274e1d4ab15128bbd7222f73745273b795d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/0232c274e1d4ab15128bbd7222f73745273b795d/perf.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
365,
6315,
2910,
67,
803,
273,
1140,
18,
588,
11089,
1435,
365,
6315,
2116,
225,
273,
288,
296,
88,
2147,
67,
892,
4278,
225,
2611,
16,
565,
468,
1831,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
365,
6315,
2910,
67,
803,
273,
1140,
18,
588,
11089,
1435,
365,
6315,
2116,
225,
273,
288,
296,
88,
2147,
67,
892,
4278,
225,
2611,
16,
565,
468,
1831,... |
if not self.token: getpage_result = self.multicall()[0] else: token_result, getpage_result = self.multicall() command.data = getpage_result return token_result | command.data = self._get_multicall_result(command.jid) | def get_page(self, command): """Returns a raw page""" | 25284c0617e77665bbac79aac6877ac6691d5038 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/888/25284c0617e77665bbac79aac6877ac6691d5038/xmlrpcbot.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
2433,
12,
2890,
16,
1296,
4672,
3536,
1356,
279,
1831,
1363,
8395,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
2433,
12,
2890,
16,
1296,
4672,
3536,
1356,
279,
1831,
1363,
8395,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
self._buf = "" | self._buf = b"" | def read(self, size=None): L = [self._buf] avail = len(self._buf) while size is None or avail < size: s = self._read() if s == "": break L.append(s) avail += len(s) all = "".join(L) if size is None: self._buf = "" return all else: self._buf = all[size:] return all[:size] | 0ee5eeb8ffb167d55a746c97c91558cf0e855c94 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8546/0ee5eeb8ffb167d55a746c97c91558cf0e855c94/httplib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
12,
2890,
16,
963,
33,
7036,
4672,
511,
273,
306,
2890,
6315,
4385,
65,
15783,
273,
562,
12,
2890,
6315,
4385,
13,
1323,
963,
353,
599,
578,
15783,
411,
963,
30,
272,
273,
365,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
12,
2890,
16,
963,
33,
7036,
4672,
511,
273,
306,
2890,
6315,
4385,
65,
15783,
273,
562,
12,
2890,
6315,
4385,
13,
1323,
963,
353,
599,
578,
15783,
411,
963,
30,
272,
273,
365,
... |
self.s = [1.] | self.s = [1.] | def update(self, r, f, r_old, f_old): a = np.zeros(self.memory + 1, 'd') self.tmp = self.atoms self.Ho = np.ones((np.shape(r)[0], 3), 'd') if (self.method == 'hess'): self.Ho = self.Ho * self.alpha if(not self.ITR): self.ITR = 1 self.s = [1.] self.y = [1.] self.rho = [1.] else: a1 = abs (np.vdot(f, f_old)) a2 = np.vdot(f_old, f_old) if(self.method == 'line'): if(a1 <= 0.5 * a2 and a2 != 0): reset_flag = 0 else: reset_flag = 1 else: reset_flag = 0 if(reset_flag == 0): ITR = self.ITR if(ITR > self.memory): self.s.pop(1) self.y.pop(1) self.rho.pop(1) ITR = self.memory self.s.append(r - r_old) self.y.append(-(f - f_old)) self.rho.append(1 / np.vdot(self.y[ITR],self.s[ITR])) self.ITR += 1 else: self.ITR = 1 self.s = [1.] self.y = [1.] self.rho = [1.] self.dump((self.ITR, self.s, self.y, self.rho, r_old, f_old)) | 2d4e1402d9c2253b0a1785f13f0f15770bf09787 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5572/2d4e1402d9c2253b0a1785f13f0f15770bf09787/lbfgs.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
12,
2890,
16,
436,
16,
284,
16,
436,
67,
1673,
16,
284,
67,
1673,
4672,
279,
273,
1130,
18,
22008,
12,
2890,
18,
7858,
397,
404,
16,
296,
72,
6134,
365,
18,
5645,
273,
365,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
12,
2890,
16,
436,
16,
284,
16,
436,
67,
1673,
16,
284,
67,
1673,
4672,
279,
273,
1130,
18,
22008,
12,
2890,
18,
7858,
397,
404,
16,
296,
72,
6134,
365,
18,
5645,
273,
365,
1... |
sys.exit(3) | logger.fatal( 'ERROR: virtualenv is not compatible with this system or executable') sys.exit(100) | def create_environment(home_dir, site_packages=True, clear=False): """ Creates a new environment in ``home_dir``. If ``site_packages`` is true (the default) then the global ``site-packages/`` directory will be on the path. If ``clear`` is true (default False) then the environment will first be cleared. """ lib_dir = join(home_dir, 'lib', py_version) inc_dir = join(home_dir, 'include', py_version) bin_dir = join(home_dir, 'bin') if sys.executable.startswith(bin_dir): print 'Please use the *system* python to run this script' return if clear: rmtree(lib_dir) rmtree(inc_dir) ## FIXME: why not delete it? logger.notify('Not deleting %s', bin_dir) prefix = sys.prefix mkdir(lib_dir) stdlib_dir = join(prefix, 'lib', py_version) for fn in os.listdir(stdlib_dir): if fn != 'site-packages' and os.path.splitext(fn)[0] in REQUIRED_MODULES: copyfile(join(stdlib_dir, fn), join(lib_dir, fn)) mkdir(join(lib_dir, 'site-packages')) writefile(join(lib_dir, 'site.py'), SITE_PY) writefile(join(lib_dir, 'orig-prefix.txt'), prefix) site_packages_filename = join(lib_dir, 'no-global-site-packages.txt') if not site_packages: writefile(site_packages_filename, '') else: if os.path.exists(site_packages_filename): logger.info('Deleting %s' % site_packages_filename) os.unlink(site_packages_filename) #mkdir(inc_dir) #stdinc_dir = join(prefix, 'include', py_version) #for fn in os.listdir(stdinc_dir): # copyfile(join(stdinc_dir, fn), join(inc_dir, fn)) if sys.exec_prefix != sys.prefix: exec_dir = join(sys.exec_prefix, 'lib', py_version) for fn in os.listdir(exec_dir): copyfile(join(exec_dir, fn), join(lib_dir, fn)) mkdir(bin_dir) logger.notify('Copying %s to %s', sys.executable, bin_dir) py_executable = join(bin_dir, 'python') if sys.executable != py_executable: ## FIXME: could I just hard link? shutil.copyfile(sys.executable, py_executable) make_exe(py_executable) cmd = [py_executable, '-c', 'import sys; print sys.prefix'] logger.info('Testing executable with %s %s "%s"' % tuple(cmd)) proc = subprocess.Popen(cmd, stdout=subprocess.PIPE) proc_stdout, proc_stderr = proc.communicate() proc_stdout = os.path.abspath(proc_stdout.strip()) if proc_stdout != os.path.abspath(home_dir): logger.fatal( 'The executable %s is not functioning' % py_executable) logger.fatal( 'It thinks sys.prefix is %r (should be %r)' % (proc_stdout, home_dir)) sys.exit(3) else: logger.info('Got sys.prefix result: %r' % proc_stdout) pydistutils = os.path.expanduser('~/.pydistutils.cfg') if os.path.exists(pydistutils): logger.notify('Please make sure you remove any previous custom paths from ' 'your %s file.' % pydistutils) install_setuptools(py_executable) | e83cf0a5d2b049e39403a9459a9e25e28c58915c /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12981/e83cf0a5d2b049e39403a9459a9e25e28c58915c/virtualenv.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
67,
10274,
12,
8712,
67,
1214,
16,
2834,
67,
10308,
33,
5510,
16,
2424,
33,
8381,
4672,
3536,
10210,
279,
394,
3330,
316,
12176,
8712,
67,
1214,
68,
8338,
225,
971,
12176,
4256,
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,
752,
67,
10274,
12,
8712,
67,
1214,
16,
2834,
67,
10308,
33,
5510,
16,
2424,
33,
8381,
4672,
3536,
10210,
279,
394,
3330,
316,
12176,
8712,
67,
1214,
68,
8338,
225,
971,
12176,
4256,
6... |
if r.pace and not PACES[r.pace]: pass else: | if hasattr(r, 'pace') and PACES[r.pace]: | def report(self, r): r.context = self.context if r.pace and not PACES[r.pace]: pass else: self.reports.append(r) | 4b7171b57d27b54ce4d66863e851d660a35b8de1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5012/4b7171b57d27b54ce4d66863e851d660a35b8de1/appclienttest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2605,
12,
2890,
16,
436,
4672,
436,
18,
2472,
273,
365,
18,
2472,
309,
3859,
12,
86,
16,
296,
909,
6134,
471,
453,
6312,
55,
63,
86,
18,
909,
14542,
365,
18,
20195,
18,
6923,
12,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2605,
12,
2890,
16,
436,
4672,
436,
18,
2472,
273,
365,
18,
2472,
309,
3859,
12,
86,
16,
296,
909,
6134,
471,
453,
6312,
55,
63,
86,
18,
909,
14542,
365,
18,
20195,
18,
6923,
12,
8... |
return self.__output_files + self.__job.get_output_files() | output_files = list(self.__output_files) if isinstance(self.job(), CondorDAGJob): output_files = output_files + self.job().get_output_files() return output_files | def get_output_files(self): """ Return list of output files for this DAG node and it's job. """ return self.__output_files + self.__job.get_output_files() | 42a62566f63484551590c84e7ecb2a3ba2074bf3 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5758/42a62566f63484551590c84e7ecb2a3ba2074bf3/pipeline.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
2844,
67,
2354,
12,
2890,
4672,
3536,
2000,
666,
434,
876,
1390,
364,
333,
463,
1781,
756,
471,
518,
1807,
1719,
18,
3536,
327,
365,
16186,
2844,
67,
2354,
397,
365,
16186,
46... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
2844,
67,
2354,
12,
2890,
4672,
3536,
2000,
666,
434,
876,
1390,
364,
333,
463,
1781,
756,
471,
518,
1807,
1719,
18,
3536,
327,
365,
16186,
2844,
67,
2354,
397,
365,
16186,
46... |
ambient_light = 0.5 diffuse_light = 1.0 specular_light = 1.0 ambient = (ambient_light, ambient_light, ambient_light, 1.0) diffuse = (diffuse_light, diffuse_light, diffuse_light, 1.0) specular = (specular_light, specular_light, specular_light, 1.0) glLightModelfv(GL_LIGHT_MODEL_AMBIENT, ambient) | glClear(GL_DEPTH_BUFFER_BIT) | def opengl_render(self): ## setup perspective matrix | 878842438ad5dcf87f49337f7c582fe163496f4b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10674/878842438ad5dcf87f49337f7c582fe163496f4b/glutviewer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1696,
7043,
67,
5902,
12,
2890,
4672,
7541,
3875,
26651,
3148,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1696,
7043,
67,
5902,
12,
2890,
4672,
7541,
3875,
26651,
3148,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
if s != None: p.add_constraint( Sum( f_edge_used(s,u) for u in self.neighbors(s) ), max = 1, min = 1) if t != None: p.add_constraint( Sum( f_edge_used(t,u) for u in self.neighbors(t) ), max = 1, min = 1) | if s is not None: p.add_constraint( Sum(f_edge_used(s,u) for u in self.neighbors(s)), max=1, min=1) if t is not None: p.add_constraint( Sum(f_edge_used(t,u) for u in self.neighbors(t)), max=1, min=1) | def longest_path(self, s = None, t = None, weighted = False, algorithm = "MILP", solver = None, verbose = 0): r""" Returns a longest path of ``self``. | 815c98d316de2356ea416011f877811bcf39fae3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/815c98d316de2356ea416011f877811bcf39fae3/generic_graph.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12163,
67,
803,
12,
2890,
16,
272,
273,
599,
16,
268,
273,
599,
16,
13747,
273,
1083,
16,
4886,
273,
315,
49,
2627,
52,
3113,
12776,
273,
599,
16,
3988,
273,
374,
4672,
436,
8395,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12163,
67,
803,
12,
2890,
16,
272,
273,
599,
16,
268,
273,
599,
16,
13747,
273,
1083,
16,
4886,
273,
315,
49,
2627,
52,
3113,
12776,
273,
599,
16,
3988,
273,
374,
4672,
436,
8395,
28... |
return 0, ('unknown option: "%s"' % detail) | return 0, ('unknown option: "%s"' % detail.args[0]) | def parse_extension_options(self, option_spec, datalines): """ Parse `datalines` for a field list containing extension options matching `option_spec`. | 8e619efd9d198841879909ddde3c0b427a94df24 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5620/8e619efd9d198841879909ddde3c0b427a94df24/states.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
67,
6447,
67,
2116,
12,
2890,
16,
1456,
67,
2793,
16,
18462,
1465,
4672,
3536,
2884,
1375,
72,
3145,
1465,
68,
364,
279,
652,
666,
4191,
2710,
702,
3607,
1375,
3482,
67,
2793,
83... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1109,
67,
6447,
67,
2116,
12,
2890,
16,
1456,
67,
2793,
16,
18462,
1465,
4672,
3536,
2884,
1375,
72,
3145,
1465,
68,
364,
279,
652,
666,
4191,
2710,
702,
3607,
1375,
3482,
67,
2793,
83... |
['Hello', 'tag', 'tag', 'tag', '!'] | ['Hello ', 'tag', 'tag', 'tag', '!'] | def xpath(): """ Test xpath extension functions. >>> root = SAMPLE_XML >>> e = etree.XPathEvaluator(root, extensions=[extension]) >>> e("stringTest('you')") 'Hello you' >>> e(_bytes("stringTest('\\\\xe9lan')").decode("unicode_escape")) u'Hello \\xe9lan' >>> e("stringTest('you','there')") Traceback (most recent call last): ... TypeError: stringTest() takes exactly 2 arguments (3 given) >>> e("floatTest(2)") 6.0 >>> e("booleanTest(true())") False >>> list(map(tag, e("setTest(/body/tag)"))) ['tag'] >>> list(map(tag, e("setTest2(/body/*)"))) ['tag', 'section'] >>> list(map(tag_or_value, e("stringListTest(/body/tag)"))) ['Hello', 'tag', 'tag', 'tag', '!'] >>> e("argsTest1('a',1.5,true(),/body/tag)") "a, 1.5, True, ['tag', 'tag', 'tag']" >>> list(map(tag, e("argsTest2(/body/tag, /body/section)"))) ['tag', 'section', 'tag', 'tag'] >>> e("resultTypesTest()") Traceback (most recent call last): ... XPathResultError: This is not a supported node-set result: None >>> try: ... e("resultTypesTest2()") ... except etree.XPathResultError: ... print("Got error") Got error """ | 0878e377e3859cde852c87cda023a562a407cd95 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/13107/0878e377e3859cde852c87cda023a562a407cd95/test_xpathevaluator.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6748,
13332,
3536,
7766,
6748,
2710,
4186,
18,
225,
4080,
1365,
273,
348,
21373,
67,
4201,
4080,
425,
273,
12031,
18,
14124,
15876,
12,
3085,
16,
4418,
22850,
6447,
5717,
4080,
425,
2932,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6748,
13332,
3536,
7766,
6748,
2710,
4186,
18,
225,
4080,
1365,
273,
348,
21373,
67,
4201,
4080,
425,
273,
12031,
18,
14124,
15876,
12,
3085,
16,
4418,
22850,
6447,
5717,
4080,
425,
2932,
... |
_cfunc_refs[tmpval1] = c_wincb | def fl_add_event_callback(win, ev, py_wincb, user_data): """ fl_add_event_callback(win, ev, py_wincb, user_data) -> event callback ref. """ c_wincb = FL_APPEVENT_CB(py_wincb) retval = _fl_add_event_callback(win, ev, c_wincb, user_data) _cfunc_refs[tmpval1] = c_wincb return retval | 8765c710f695de392f6fc7c664c746ec98668b1d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2429/8765c710f695de392f6fc7c664c746ec98668b1d/xformslib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1183,
67,
1289,
67,
2575,
67,
3394,
12,
8082,
16,
2113,
16,
2395,
67,
8082,
7358,
16,
729,
67,
892,
4672,
3536,
1183,
67,
1289,
67,
2575,
67,
3394,
12,
8082,
16,
2113,
16,
2395,
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,
1183,
67,
1289,
67,
2575,
67,
3394,
12,
8082,
16,
2113,
16,
2395,
67,
8082,
7358,
16,
729,
67,
892,
4672,
3536,
1183,
67,
1289,
67,
2575,
67,
3394,
12,
8082,
16,
2113,
16,
2395,
67,
... | |
prelaunch = [ 'From sfn-mongo-1 do the following:\n' ] + prelaunch | prelaunch = [ 'From sfn-mongo do the following:\n' ] + prelaunch | def make_ticket_text(engineer): tag_prefix = date.today().strftime('release_%Y%m%d') # get release tag existing_tags_today = command('git tag -l %s*' % tag_prefix) if existing_tags_today: tag = '%s.%.2d' % (tag_prefix, len(existing_tags_today)) else: tag = tag_prefix last_release = command('git tag -l release_*') if last_release: last_release = last_release[-1] else: last_release = '' changes = command( 'git', 'log', "--format=* %h %s", last_release.strip() + '..') changes = ''.join(changes) prelaunch = [] postlaunch = ['* allurapaste ensure_index /var/local/config/production.ini'] needs_reactor_setup = raw_input('Does this release require a reactor_setup? [n]') needs_flyway = raw_input('Does this release require a migration? [y]') if needs_reactor_setup[:1].lower() in ('y', '1'): postlaunch.append('* service reactor stop') postlaunch.append('* allurapaste reactor_setup /var/local/config/production.ini') postlaunch.append('* service reactor start') if needs_flyway[:1].lower() in ('', 'y', '1'): prelaunch.append('* dump the database in case we need to roll back') postlaunch.append('* allurapaste flyway --url mongo://sfn-mongo-1:27017/') if postlaunch: postlaunch = [ 'From sfu-scmprocess-1 do the following:\n' ] + postlaunch postlaunch = '\n'.join(postlaunch) else: postlaunch = '-none-' if prelaunch: prelaunch = [ 'From sfn-mongo-1 do the following:\n' ] + prelaunch prelaunch = '\n'.join(prelaunch) else: prelaunch = '-none-' return TICKET_TEMPLATE.substitute(locals()), tag | 3fb46c9ae80f2743b71840db85856c15baac7432 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1036/3fb46c9ae80f2743b71840db85856c15baac7432/push_re.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1221,
67,
16282,
67,
955,
12,
8944,
264,
4672,
1047,
67,
3239,
273,
1509,
18,
30064,
7675,
701,
9982,
2668,
9340,
10185,
61,
9,
81,
9,
72,
6134,
468,
336,
3992,
1047,
2062,
67,
4156,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1221,
67,
16282,
67,
955,
12,
8944,
264,
4672,
1047,
67,
3239,
273,
1509,
18,
30064,
7675,
701,
9982,
2668,
9340,
10185,
61,
9,
81,
9,
72,
6134,
468,
336,
3992,
1047,
2062,
67,
4156,
... |
self.tk.eval('package require Tix') | self.tk.eval('package require Tix') | def __init__(self, screenName=None, baseName=None, className='Tk'): Tkinter.Tk.__init__(self, screenName, baseName, className) | 86af7ef7e3f4448abc89aa941517a84075d99a38 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/86af7ef7e3f4448abc89aa941517a84075d99a38/Tix.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
5518,
461,
33,
7036,
16,
16162,
33,
7036,
16,
2658,
2218,
56,
79,
11,
4672,
399,
79,
2761,
18,
56,
79,
16186,
2738,
972,
12,
2890,
16,
5518,
461,
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,
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,
5518,
461,
33,
7036,
16,
16162,
33,
7036,
16,
2658,
2218,
56,
79,
11,
4672,
399,
79,
2761,
18,
56,
79,
16186,
2738,
972,
12,
2890,
16,
5518,
461,
16,
... |
if (not repo.local() or hgcmd in nokwcommands.split() | if (not repo.local() or _cmd in nokwcommands.split() | def reposetup(ui, repo): '''Sets up repo as kwrepo for keyword substitution. Overrides file method to return kwfilelog instead of filelog if file matches user configuration. Wraps commit to overwrite configured files with updated keyword substitutions. This is done for local repos only, and only if there are files configured at all for keyword substitution.''' global _kwtemplater hgcmd, hgcmdopts = _cmd, _cmdoptions try: if (not repo.local() or hgcmd in nokwcommands.split() or '.hg' in util.splitpath(repo.root) or repo._url.startswith('bundle:')): return except AttributeError: pass inc, exc = [], ['.hg*'] for pat, opt in ui.configitems('keyword'): if opt != 'ignore': inc.append(pat) else: exc.append(pat) if not inc: return if hgcmd == 'diff': # only expand if comparing against working dir node1, node2 = cmdutil.revpair(repo, hgcmdopts.get('rev')) if node2 is not None: return # shrink if rev is not current node if node1 is not None and node1 != repo.changectx().node(): hgcmd = 'diff1' _kwtemplater = kwtemplater(ui, repo, inc, exc, hgcmd) class kwrepo(repo.__class__): def file(self, f, kwmatch=False): if f[0] == '/': f = f[1:] if kwmatch or _kwtemplater.matcher(f): return kwfilelog(self.sopener, f) return filelog.filelog(self.sopener, f) def wread(self, filename): data = super(kwrepo, self).wread(filename) if _kwtemplater.restrict and _kwtemplater.matcher(filename): return _kwtemplater.shrink(data) return data def commit(self, files=None, text='', user=None, date=None, match=util.always, force=False, force_editor=False, p1=None, p2=None, extra={}, empty_ok=False): wlock = lock = None _p1 = _p2 = None try: wlock = self.wlock() lock = self.lock() # store and postpone commit hooks commithooks = {} for name, cmd in ui.configitems('hooks'): if name.split('.', 1)[0] == 'commit': commithooks[name] = cmd ui.setconfig('hooks', name, None) if commithooks: # store parents for commit hook environment if p1 is None: _p1, _p2 = repo.dirstate.parents() else: _p1, _p2 = p1, p2 or nullid _p1 = hex(_p1) if _p2 == nullid: _p2 = '' else: _p2 = hex(_p2) node = super(kwrepo, self).commit(files=files, text=text, user=user, date=date, match=match, force=force, force_editor=force_editor, p1=p1, p2=p2, extra=extra, empty_ok=empty_ok) # restore commit hooks for name, cmd in commithooks.iteritems(): ui.setconfig('hooks', name, cmd) if node is not None: _overwrite(ui, self, node=node) repo.hook('commit', node=node, parent1=_p1, parent2=_p2) return node finally: del wlock, lock repo.__class__ = kwrepo patch.patchfile.__init__ = _kwpatchfile_init webcommands.changeset = webcommands.rev = _kwweb_changeset webcommands.filediff = webcommands.diff = _kwweb_filediff | 82c9a5137de1660a093c6be3df3187bafa014cf7 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11312/82c9a5137de1660a093c6be3df3187bafa014cf7/keyword.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13686,
278,
416,
12,
4881,
16,
3538,
4672,
9163,
2785,
731,
3538,
487,
5323,
7422,
364,
4932,
12785,
18,
531,
9857,
585,
707,
358,
327,
5323,
7540,
12970,
3560,
434,
661,
12970,
309,
585... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13686,
278,
416,
12,
4881,
16,
3538,
4672,
9163,
2785,
731,
3538,
487,
5323,
7422,
364,
4932,
12785,
18,
531,
9857,
585,
707,
358,
327,
5323,
7540,
12970,
3560,
434,
661,
12970,
309,
585... |
def group_list(request, template_name='datagrid/datagrid.html'): | def group_list(request, template_name='reviews/datagrid.html'): | def group_list(request, template_name='datagrid/datagrid.html'): """ Displays a list of all review groups. """ return GroupDataGrid(request).render_to_response(template_name) | 6f4a0165391879a5d504e61e7331d7c6a1359d77 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1600/6f4a0165391879a5d504e61e7331d7c6a1359d77/views.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1041,
67,
1098,
12,
2293,
16,
1542,
67,
529,
2218,
266,
7061,
19,
3404,
22239,
18,
2620,
11,
4672,
3536,
9311,
87,
279,
666,
434,
777,
10725,
3252,
18,
3536,
327,
3756,
751,
6313,
12,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1041,
67,
1098,
12,
2293,
16,
1542,
67,
529,
2218,
266,
7061,
19,
3404,
22239,
18,
2620,
11,
4672,
3536,
9311,
87,
279,
666,
434,
777,
10725,
3252,
18,
3536,
327,
3756,
751,
6313,
12,
... |
return S_OK(tree) def __incrementChosenStrategy(self): | return S_OK( tree ) def __incrementChosenStrategy( self ): | def determineReplicationTree(self,sourceSE,targetSEs,replicas,size,strategy=None,sigma=None): """ """ if not strategy: strategy = self.__selectStrategy() | 9005c0a96ba1bc0698c543bcb4c1886f4eeee344 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/9005c0a96ba1bc0698c543bcb4c1886f4eeee344/ReplicationScheduler.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4199,
8309,
2471,
12,
2890,
16,
3168,
1090,
16,
3299,
1090,
87,
16,
266,
10528,
16,
1467,
16,
14914,
33,
7036,
16,
13201,
33,
7036,
4672,
3536,
3536,
309,
486,
6252,
30,
6252,
273,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4199,
8309,
2471,
12,
2890,
16,
3168,
1090,
16,
3299,
1090,
87,
16,
266,
10528,
16,
1467,
16,
14914,
33,
7036,
16,
13201,
33,
7036,
4672,
3536,
3536,
309,
486,
6252,
30,
6252,
273,
365... |
scrlist.append(("%d" %cnt,"SCR %d" %cnt)) | def configLOFChanged(configElement): if configElement.value == "unicable": x = configElement.slot_id lnb = configElement.lnb_id nim = config.Nims[x] lnbs = nim.advanced.lnb section = lnbs[lnb] if isinstance(section.unicable, ConfigNothing): if lnb == 1: section.unicable = ConfigSelection(unicable_choices, unicable_choices_default) elif lnb == 2: section.unicable = ConfigSelection(choices = {"unicable_matrix": _("Unicable Martix"),"unicable_user": "Unicable "+_("User defined")}, default = "unicable_matrix") else: section.unicable = ConfigSelection(choices = {"unicable_user": _("User defined")}, default = "unicable_user") | a39ea95f5376d25874ebfbae8f10b9e6761f368b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6652/a39ea95f5376d25874ebfbae8f10b9e6761f368b/NimManager.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
642,
1502,
42,
5033,
12,
1425,
1046,
4672,
309,
642,
1046,
18,
1132,
422,
315,
318,
335,
429,
6877,
619,
273,
642,
1046,
18,
14194,
67,
350,
328,
6423,
273,
642,
1046,
18,
2370,
70,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
642,
1502,
42,
5033,
12,
1425,
1046,
4672,
309,
642,
1046,
18,
1132,
422,
315,
318,
335,
429,
6877,
619,
273,
642,
1046,
18,
14194,
67,
350,
328,
6423,
273,
642,
1046,
18,
2370,
70,
... | |
self.lineno += 1 | self.line += 1 | def skip(self): input = self.source while (True): ch = input[self.cursor] self.cursor += 1 next = input[self.cursor] | 50348dc50eb62cab6cb5bf5defc94e9229e847a4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12949/50348dc50eb62cab6cb5bf5defc94e9229e847a4/Tokenizer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2488,
12,
2890,
4672,
810,
273,
365,
18,
3168,
225,
1323,
261,
5510,
4672,
462,
273,
810,
63,
2890,
18,
9216,
65,
365,
18,
9216,
1011,
404,
1024,
273,
810,
63,
2890,
18,
9216,
65,
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,
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,
2488,
12,
2890,
4672,
810,
273,
365,
18,
3168,
225,
1323,
261,
5510,
4672,
462,
273,
810,
63,
2890,
18,
9216,
65,
365,
18,
9216,
1011,
404,
1024,
273,
810,
63,
2890,
18,
9216,
65,
2,... |
def retstartAllDownloaders(): dlCount = len(views.remoteDownloads) | def retstartDownloaders(): dlCount = len(self.pausedDownloaders) | def retstartAllDownloaders(): dlCount = len(views.remoteDownloads) if dlCount > 0: print "DTV: System is awake, resuming downloads." views.remoteDownloads.beginRead() try: for dl in views.remoteDownloads: dl.start() finally: views.remoteDownloads.endRead() | 12b0431b93864e257d407016da168d362a47b23f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12354/12b0431b93864e257d407016da168d362a47b23f/frontend.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
325,
1937,
7109,
414,
13332,
8910,
1380,
273,
562,
12,
2890,
18,
8774,
3668,
7109,
414,
13,
309,
8910,
1380,
405,
374,
30,
1172,
315,
9081,
58,
30,
2332,
353,
1690,
911,
16,
400,
21249... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
325,
1937,
7109,
414,
13332,
8910,
1380,
273,
562,
12,
2890,
18,
8774,
3668,
7109,
414,
13,
309,
8910,
1380,
405,
374,
30,
1172,
315,
9081,
58,
30,
2332,
353,
1690,
911,
16,
400,
21249... |
while i < maxNodeAddr : | while i < self.maxNodeAddr : | def init(self) : print "init()" i = 0 while i < maxNodeAddr : x = (i * 1000) + 1 txt = "CT" + x.toString() print "looking for node " + i.toString() + " using name " + txt node = jmri.jmrix.cmri.serial.SerialAddress.getNodeFromSystemName(txt) if (node != None) : print "found node for " + txt self.nodeList.append(node) self.nodeAddrList.append(i) i = i + 1 return | 03bdc2b410bd965f8f24825301a41964921c5d72 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1660/03bdc2b410bd965f8f24825301a41964921c5d72/CmriNodeTool.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1208,
12,
2890,
13,
294,
1172,
315,
2738,
10031,
277,
273,
374,
1323,
277,
411,
365,
18,
1896,
907,
3178,
294,
619,
273,
261,
77,
380,
4336,
13,
397,
404,
6463,
273,
315,
1268,
6,
39... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
13,
294,
1172,
315,
2738,
10031,
277,
273,
374,
1323,
277,
411,
365,
18,
1896,
907,
3178,
294,
619,
273,
261,
77,
380,
4336,
13,
397,
404,
6463,
273,
315,
1268,
6,
39... |
if (t.token.type == PLUS) | if t.token.type == PLUS: | def UNARY__build(t): # NB t.token.type must be DELETE, VOID, TYPEOF, NOT, BITWISE_NOT, # UNARY_PLUS, UNARY_MINUS, INCREMENT, or DECREMENT. if (t.token.type == PLUS) t.token.type = UNARY_PLUS else if (t.token.type == MINUS) t.token.type = UNARY_MINUS return new Node(t) | 14e57c50767cb32286882c207d0afc37f010f284 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12949/14e57c50767cb32286882c207d0afc37f010f284/Builder.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5019,
6043,
972,
3510,
12,
88,
4672,
468,
20096,
268,
18,
2316,
18,
723,
1297,
506,
8568,
16,
27085,
16,
3463,
3932,
16,
4269,
16,
20469,
23109,
1090,
67,
4400,
16,
468,
5019,
6043,
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,
5019,
6043,
972,
3510,
12,
88,
4672,
468,
20096,
268,
18,
2316,
18,
723,
1297,
506,
8568,
16,
27085,
16,
3463,
3932,
16,
4269,
16,
20469,
23109,
1090,
67,
4400,
16,
468,
5019,
6043,
67... |
scrolledwindow = gtk.ScrolledWindow() | scrolledwindow = hippo.CanvasScrollbars() | def _select_canvas(self): """Show the select canvas where children choose an existing poll.""" self._current_view = 'select' canvasbox = self._canvas_root() | 7cd3394ec8214bc215d2ce2a8d6af2e95f118b35 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6691/7cd3394ec8214bc215d2ce2a8d6af2e95f118b35/poll.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
4025,
67,
15424,
12,
2890,
4672,
3536,
5706,
326,
2027,
5953,
1625,
2325,
9876,
392,
2062,
7672,
12123,
365,
6315,
2972,
67,
1945,
273,
296,
4025,
11,
5953,
2147,
273,
365,
6315,
15... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
4025,
67,
15424,
12,
2890,
4672,
3536,
5706,
326,
2027,
5953,
1625,
2325,
9876,
392,
2062,
7672,
12123,
365,
6315,
2972,
67,
1945,
273,
296,
4025,
11,
5953,
2147,
273,
365,
6315,
15... |
ret.append(" ret.append(" | ret.append(" ret.append(" ret.append(" | ret.append("#compdef %s\n" % self.commandname) | a97a705e11c5553fea2d901f84eae2d6093aa55a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/605/a97a705e11c5553fea2d901f84eae2d6093aa55a/genzshcomp.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
325,
18,
6923,
2932,
7,
2919,
536,
738,
87,
64,
82,
6,
738,
365,
18,
3076,
529,
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,
325,
18,
6923,
2932,
7,
2919,
536,
738,
87,
64,
82,
6,
738,
365,
18,
3076,
529,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
"isMuted", "isSolo", "input", "output", "effects", | "isMuted", "isSolo", "input", "output", | def StoreToXML(self, doc, parent, graveyard=False): if graveyard: ins = doc.createElement("DeadInstrument") else: ins = doc.createElement("Instrument") parent.appendChild(ins) ins.setAttribute("id", str(self.id)) items = ["path", "name", "isArmed", "isMuted", "isSolo", "input", "output", "effects", "isSelected", "pixbufPath", "isVisible", "inTrack"] params = doc.createElement("Parameters") ins.appendChild(params) StoreParametersToXML(self, doc, params, items) for e in self.events: e.StoreToXML(doc, ins) for e in self.graveyard: e.StoreToXML(doc, ins, graveyard=True) | 304738779f58864072eff30b2ebbd33f28e7733f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10033/304738779f58864072eff30b2ebbd33f28e7733f/Instrument.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4994,
774,
4201,
12,
2890,
16,
997,
16,
982,
16,
3087,
9062,
1060,
33,
8381,
4672,
309,
3087,
9062,
1060,
30,
2763,
273,
997,
18,
2640,
1046,
2932,
11852,
19228,
7923,
469,
30,
2763,
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,
4994,
774,
4201,
12,
2890,
16,
997,
16,
982,
16,
3087,
9062,
1060,
33,
8381,
4672,
309,
3087,
9062,
1060,
30,
2763,
273,
997,
18,
2640,
1046,
2932,
11852,
19228,
7923,
469,
30,
2763,
2... |
cell_description = gtk.CellRendererText () cell_description.set_property("editable", True) cell_description.connect("edited", on_cell_edited, 0, str) column_description = gtk.TreeViewColumn (_("Symbol"), cell_description) column_description.set_attributes (cell_description, text=0) self.treeview.append_column(column_description) | def create_cell (view, column, name, typ): cell_description = gtk.CellRendererText () cell_description.set_property("editable", True) cell_description.connect("edited", on_cell_edited, column, typ) column_description = gtk.TreeViewColumn (name, cell_description) if typ == str: column_description.set_attributes (cell_description, text=0) if typ == float: column_description.set_cell_data_func(cell_description, get_cell_data, (float, column)) view.append_column(column_description) | def get_cell_data(column, cell, model, iter, data): typ, col = data if typ == int: cell.set_property('text', "%d" % typ(model[iter][col])) elif typ == float: cell.set_property('text', "%.2f" % typ(model[iter][col])) else: cell.set_property('text', typ(model[iter][col])) | 0c167ed4e5f841973909136b209a893b45246ef0 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11078/0c167ed4e5f841973909136b209a893b45246ef0/preferences.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
3855,
67,
892,
12,
2827,
16,
2484,
16,
938,
16,
1400,
16,
501,
4672,
3815,
16,
645,
273,
501,
309,
3815,
422,
509,
30,
2484,
18,
542,
67,
4468,
2668,
955,
2187,
2213,
72,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
3855,
67,
892,
12,
2827,
16,
2484,
16,
938,
16,
1400,
16,
501,
4672,
3815,
16,
645,
273,
501,
309,
3815,
422,
509,
30,
2484,
18,
542,
67,
4468,
2668,
955,
2187,
2213,
72,
... |
1-d lattice, quotient of 3-d lattice N by Sublattice <N(1, 0, 1), N(0, 1, -1)> | 1-d lattice, quotient of 3-d lattice N by Sublattice <N(1, 0, 1), N(0, 1, -1)> sage: Q.gens() (N[0, 0, 1],) Here, ``sublattice`` happens to be of codimension one in ``N``. If you want to prescribe the sign of the quotient generator, you can do either:: sage: Q = N.quotient(sublattice, positive_point=N(0,0,-1)); Q 1-d lattice, quotient of 3-d lattice N by Sublattice <N(1, 0, 1), N(0, 1, -1)> sage: Q.gens() (N[0, 0, -1],) or:: sage: M = N.dual() sage: Q = N.quotient(sublattice, positive_dual_point=M(0,0,-1)); Q 1-d lattice, quotient of 3-d lattice N by Sublattice <N(1, 0, 1), N(0, 1, -1)> sage: Q.gens() (N[0, 0, -1],) TESTS:: sage: loads(dumps(Q)) == Q True sage: loads(dumps(Q)).gens() == Q.gens() True | def _latex_(self): r""" Return a LaTeX representation of ``self``. | 2ecb64877587a338c723df487639345b09bed118 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9417/2ecb64877587a338c723df487639345b09bed118/toric_lattice.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
26264,
67,
12,
2890,
4672,
436,
8395,
2000,
279,
21072,
21575,
60,
4335,
434,
12176,
2890,
68,
8338,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
26264,
67,
12,
2890,
4672,
436,
8395,
2000,
279,
21072,
21575,
60,
4335,
434,
12176,
2890,
68,
8338,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
buf += " buf += " buf += " | buf += " buf += " buf += " | def tcm_mod_dump_fabric_ops(proto_ident, fabric_mod_dir_var, fabric_mod_name): buf = "" bufi = "" f = fabric_mod_dir_var + "/" + fabric_mod_name + "_fabric.c" print "Writing file: " + f p = open(f, 'w') if not p: tcm_mod_err("Unable to open file: " + f) fi = fabric_mod_dir_var + "/" + fabric_mod_name + "_fabric.h" print "Writing file: " + fi pi = open(fi, 'w') if not pi: tcm_mod_err("Unable to open file: " + fi) buf = "#include <linux/slab.h>\n" buf += "#include <linux/kthread.h>\n" buf += "#include <linux/types.h>\n" buf += "#include <linux/list.h>\n" buf += "#include <linux/types.h>\n" buf += "#include <linux/string.h>\n" buf += "#include <linux/ctype.h>\n" buf += "#include <asm/unaligned.h>\n" buf += "#include <scsi/scsi.h>\n" buf += "#include <scsi/scsi_host.h>\n" buf += "#include <scsi/scsi_device.h>\n" buf += "#include <scsi/scsi_cmnd.h>\n" buf += "#include <scsi/libfc.h>\n\n" buf += "#include <target/target_core_base.h>\n" buf += "#include <target/target_core_transport.h>\n" buf += "#include <target/target_core_fabric_ops.h>\n" buf += "#include <target/target_core_fabric_lib.h>\n" buf += "#include <target/target_core_device.h>\n" buf += "#include <target/target_core_tpg.h>\n" buf += "#include <target/target_core_configfs.h>\n" buf += "#include <" + fabric_mod_name + "_base.h>\n" buf += "#include <" + fabric_mod_name + "_fabric.h>\n\n" buf += "int " + fabric_mod_name + "_check_true(struct se_portal_group *se_tpg)\n" buf += "{\n" buf += " return 1;\n" buf += "}\n\n" bufi += "int " + fabric_mod_name + "_check_true(struct se_portal_group *);\n" buf += "int " + fabric_mod_name + "_check_false(struct se_portal_group *se_tpg)\n" buf += "{\n" buf += " return 0;\n" buf += "}\n\n" bufi += "int " + fabric_mod_name + "_check_false(struct se_portal_group *);\n" total_fabric_ops = len(fabric_ops) i = 0 while i < total_fabric_ops: fo = fabric_ops[i] i += 1 | bf46e29d39b4f6d81e16c315660e137a11c299e5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5327/bf46e29d39b4f6d81e16c315660e137a11c299e5/tcm_mod_builder.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1715,
81,
67,
1711,
67,
8481,
67,
23710,
67,
4473,
12,
9393,
67,
6392,
16,
21127,
67,
1711,
67,
1214,
67,
1401,
16,
21127,
67,
1711,
67,
529,
4672,
1681,
273,
1408,
1681,
77,
273,
14... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
8481,
67,
23710,
67,
4473,
12,
9393,
67,
6392,
16,
21127,
67,
1711,
67,
1214,
67,
1401,
16,
21127,
67,
1711,
67,
529,
4672,
1681,
273,
1408,
1681,
77,
273,
14... |
root = Tk() | root = Tk(className="Idle") | def main(): cmd = None edit = 0 debug = 0 startup = 0 try: opts, args = getopt.getopt(sys.argv[1:], "c:deist:") except getopt.error, msg: sys.stderr.write("Error: %s\n" % str(msg)) sys.stderr.write(usage_msg) sys.exit(2) for o, a in opts: if o == '-c': cmd = a if o == '-d': debug = 1 if o == '-e': edit = 1 if o == '-s': startup = 1 if o == '-t': PyShell.shell_title = a if not edit: if cmd: sys.argv = ["-c"] + args else: sys.argv = args or [""] for i in range(len(sys.path)): sys.path[i] = os.path.abspath(sys.path[i]) pathx = [] if edit: for filename in args: pathx.append(os.path.dirname(filename)) elif args and args[0] != "-": pathx.append(os.path.dirname(args[0])) else: pathx.append(os.curdir) for dir in pathx: dir = os.path.abspath(dir) if not dir in sys.path: sys.path.insert(0, dir) global flist, root root = Tk() fixwordbreaks(root) root.withdraw() flist = PyShellFileList(root) if edit: for filename in args: flist.open(filename) shell = PyShell(flist) interp = shell.interp flist.pyshell = shell if startup: filename = os.environ.get("IDLESTARTUP") or \ os.environ.get("PYTHONSTARTUP") if filename and os.path.isfile(filename): interp.execfile(filename) if debug: shell.open_debugger() if cmd: interp.execsource(cmd) elif not edit and args and args[0] != "-": interp.execfile(args[0]) shell.begin() root.mainloop() root.destroy() | 5eb0afc0f835848f04fe93c93ab0c01a35cb0c97 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/5eb0afc0f835848f04fe93c93ab0c01a35cb0c97/PyShell.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
1797,
273,
599,
3874,
273,
374,
1198,
273,
374,
11850,
273,
374,
225,
775,
30,
1500,
16,
833,
273,
336,
3838,
18,
588,
3838,
12,
9499,
18,
19485,
63,
21,
30,
6487,
315,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1797,
273,
599,
3874,
273,
374,
1198,
273,
374,
11850,
273,
374,
225,
775,
30,
1500,
16,
833,
273,
336,
3838,
18,
588,
3838,
12,
9499,
18,
19485,
63,
21,
30,
6487,
315,
... |
def XXXtest_strip_bytearray(self): | def test_strip_bytearray(self): | def XXXtest_strip_bytearray(self): # XXX memoryview not available self.assertEqual(self.type2test(b'abc').strip(memoryview(b'ac')), b'b') self.assertEqual(self.type2test(b'abc').lstrip(memoryview(b'ac')), b'bc') self.assertEqual(self.type2test(b'abc').rstrip(memoryview(b'ac')), b'ab') | b7cfaf598e2a97ece81d54bf6cdee0465753f955 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3187/b7cfaf598e2a97ece81d54bf6cdee0465753f955/test_bytes.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11329,
3813,
67,
6406,
67,
7229,
1126,
12,
2890,
4672,
468,
11329,
3778,
1945,
486,
2319,
365,
18,
11231,
5812,
12,
2890,
18,
723,
22,
3813,
12,
70,
11,
18947,
16063,
6406,
12,
7858,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11329,
3813,
67,
6406,
67,
7229,
1126,
12,
2890,
4672,
468,
11329,
3778,
1945,
486,
2319,
365,
18,
11231,
5812,
12,
2890,
18,
723,
22,
3813,
12,
70,
11,
18947,
16063,
6406,
12,
7858,
1... |
self.button_dict['Close']=gtk.Button('Close') echbox.pack_end(self.button_dict['Close'],expand=True) self.show_list.append(self.button_dict['Close']) self.button_dict['Export']=gtk.Button('Export') echbox.pack_end(self.button_dict['Export'],expand=True) self.show_list.append(self.button_dict['Export']) self.button_dict['Format_help'].connect('clicked', self.format_help_cb) self.button_dict['Enable_ROI'].connect('clicked',self.set_roitool) self.button_dict['Refresh'].connect('clicked', self.refresh_fileinfo) self.button_dict['Export'].connect('clicked',self.export_cb) self.button_dict['Close'].connect('clicked',self.close) self.button_dict['IP_window'].connect('toggled', self.ip_window_toggled_cb) self.button_dict['Mode'].connect('toggled',self.mode_toggled_cb) | button = gtk.Button(stock=gtk.STOCK_CLOSE) button.connect('clicked', self.close) echbox.pack_end(button) self.show_list.append(button) self.button_dict['Close'] = button button = gtk.Button('Export') button.connect('clicked', self.export_cb) echbox.pack_end(button) self.show_list.append(button) self.button_dict['Export'] = button self.button_dict['Format_help'].connect('clicked', self.format_help_cb) self.button_dict['Enable_ROI'].connect('clicked', self.set_roitool) self.button_dict['Refresh'].connect('clicked', self.refresh_fileinfo) self.button_dict['IP_window'].connect('toggled', self.ip_window_toggled_cb) self.button_dict['Mode'].connect('toggled', self.mode_toggled_cb) | def init_dialog(self): self.dialog = gtk.Window() self.dialog.set_title('GDAL Export Tool') self.dialog.set_border_width(10) self.tips=gtk.Tooltips() #self.dialog.set_default_size(500,400) self.dialog.set_resizable(True) | 18bebfddf000a5af98d1ab83e4246e700756e2a4 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11090/18bebfddf000a5af98d1ab83e4246e700756e2a4/Tool_Export.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1208,
67,
12730,
12,
2890,
4672,
365,
18,
12730,
273,
22718,
18,
3829,
1435,
365,
18,
12730,
18,
542,
67,
2649,
2668,
27338,
1013,
11054,
13288,
6134,
365,
18,
12730,
18,
542,
67,
8815,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
67,
12730,
12,
2890,
4672,
365,
18,
12730,
273,
22718,
18,
3829,
1435,
365,
18,
12730,
18,
542,
67,
2649,
2668,
27338,
1013,
11054,
13288,
6134,
365,
18,
12730,
18,
542,
67,
8815,
... |
self.assertEqual(cls.getField("age").hasModifier("private"),"private","Unable to parse 'private' field modifier") | self.assertEqual(cls.getField("age").hasModifier("private"),True,"Unable to parse 'private' field modifier") | def testFieldModifiers(self): "Parse class modifier" self.builder.addSource(""" package { class MyClass { var iVar:String; public var name:String; private var age:int; protected var salary:Number; static var count:int; mx_internal var mx:String; } } """) #test for valid package self.assertEqual(self.builder.hasPackage(""),True,"Unnamed package not found in testFieldModifiers") #get unnamed package pkg = self.builder.getPackage("") #test that a class has been declared self.assertEqual(pkg.hasClass("MyClass"),True,"Package does not have one or more classes defined") # get class 'MyClass' cls = pkg.getClass("MyClass") #test for 'internal' field modifier self.assertEqual(cls.getField("iVar").hasModifier("internal"),"internal","Unable to parse 'internal' field modifier") #test for 'public' field modifier self.assertEqual(cls.getField("name").hasModifier("public"),"public","Unable to parse 'public' field modifier") #test for 'private' field modifier self.assertEqual(cls.getField("age").hasModifier("private"),"private","Unable to parse 'private' field modifier") #test for 'protected' field modifier self.assertEqual(cls.getField("salary").hasModifier("protected"),"protected","Unable to parse 'protected' field modifier") #test for 'static' field modifier self.assertEqual(cls.getField("count").hasModifier("static"),"static","Unable to parse 'static' field modifier") #test for 'user_defined_namespace' field modifier self.assertEqual(cls.getField("mx").hasModifier("mx_internal"),"mx_internal","Unable to parse user defined namespace 'mx_internal'") | 011c32741749857cae3142e9d20feebc73c806e8 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/886/011c32741749857cae3142e9d20feebc73c806e8/asBuilderTests.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
974,
11948,
12,
2890,
4672,
315,
3201,
667,
9606,
6,
365,
18,
9574,
18,
1289,
1830,
2932,
3660,
2181,
288,
667,
8005,
797,
288,
569,
277,
1537,
30,
780,
31,
1071,
569,
508,
30,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
974,
11948,
12,
2890,
4672,
315,
3201,
667,
9606,
6,
365,
18,
9574,
18,
1289,
1830,
2932,
3660,
2181,
288,
667,
8005,
797,
288,
569,
277,
1537,
30,
780,
31,
1071,
569,
508,
30,
... |
if locale is None: if is_locale_independent(request.path): locale = settings.LANGUAGE_CODE else: return redirect_locale(request, locale) translation.activate(locale) request.LANGUAGE_CODE = translation.get_language() | if locale is not None: translation.activate(locale) request.LANGUAGE_CODE = translation.get_language() elif not is_locale_independent(request.path): return redirect_locale(request) | def process_request(self, request): locale = self.strip_locale_from_request(request) if locale is None: if is_locale_independent(request.path): locale = settings.LANGUAGE_CODE else: return redirect_locale(request, locale) translation.activate(locale) request.LANGUAGE_CODE = translation.get_language() | 211a62ac0170f807cb05e9b8297a560026e03d52 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11458/211a62ac0170f807cb05e9b8297a560026e03d52/middleware.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
67,
2293,
12,
2890,
16,
590,
4672,
2573,
273,
365,
18,
6406,
67,
6339,
67,
2080,
67,
2293,
12,
2293,
13,
309,
2573,
353,
599,
30,
309,
353,
67,
6339,
67,
267,
10891,
12,
2293,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
67,
2293,
12,
2890,
16,
590,
4672,
2573,
273,
365,
18,
6406,
67,
6339,
67,
2080,
67,
2293,
12,
2293,
13,
309,
2573,
353,
599,
30,
309,
353,
67,
6339,
67,
267,
10891,
12,
2293,
... |
invite.addHeader('content-type', 'application/sdp') | def sendRegistration(self, cb=None, auth=None): username = self.sip.app.getPref('username') invite = tpsip.Request('REGISTER', str(self.regServer)) # XXX refactor all the common headers and the like invite.addHeader('via', 'SIP/2.0/UDP %s:%s;rport'% self.getLocalSIPAddress()) invite.addHeader('cseq', '%s REGISTER'%self.getCSeq(incr=1)) invite.addHeader('to', '"anthony baxter" <%s>'%(str(self.regAOR))) invite.addHeader('from', '"anthony baxter" <%s>'%(str(self.regAOR))) invite.addHeader('content-type', 'application/sdp') state = self.getState() if state in ( 'NEW', 'SENT_REGISTER', 'REGISTERED' ): invite.addHeader('expires', 900) elif state in ( 'CANCEL_REGISTER' ): invite.addHeader('expires', 0) invite.addHeader('event', 'registration') invite.addHeader('call-id', self.getCallID()) if auth is not None: invite.addHeader('Authorization', auth) invite.addHeader('user-agent', 'Shtoom/%s'%shtoom.Version) lhost, lport = self.getLocalSIPAddress() invite.addHeader('contact', '"%s" <sip:%s:%s;transport=udp>'%( username, lhost, lport)) invite.addHeader('content-length', '0') invite.creationFinished() try: self.sip.transport.write(invite.toString(), self.getRemoteSIPAddress()) print "register sent", invite.toString() except (socket.error, socket.gaierror): e,v,t = sys.exc_info() self.compDef.errback(e(v)) self.setState('ABORTED') else: if self.getState() in ( 'NEW', 'REGISTERED' ): self.setState('SENT_REGISTER') | 2325b82357bcd81bc9b2f5cef4cce15e9a64d045 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1265/2325b82357bcd81bc9b2f5cef4cce15e9a64d045/sip.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1366,
7843,
12,
2890,
16,
2875,
33,
7036,
16,
1357,
33,
7036,
4672,
2718,
273,
365,
18,
28477,
18,
2910,
18,
588,
23218,
2668,
5053,
6134,
19035,
273,
268,
1121,
625,
18,
691,
2668,
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,
1366,
7843,
12,
2890,
16,
2875,
33,
7036,
16,
1357,
33,
7036,
4672,
2718,
273,
365,
18,
28477,
18,
2910,
18,
588,
23218,
2668,
5053,
6134,
19035,
273,
268,
1121,
625,
18,
691,
2668,
27... | |
chars = list(value) chars.reverse() return "".join(chars) if has_native_qQ: | else: return string_reverse(value) def test_native_qQ(): | def bigendian_to_native(value): if isbigendian: return value chars = list(value) chars.reverse() return "".join(chars) | e41ba9cc86d8aa8a864990837c44991648bbef36 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/e41ba9cc86d8aa8a864990837c44991648bbef36/test_struct.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5446,
22910,
67,
869,
67,
13635,
12,
1132,
4672,
309,
353,
14002,
22910,
30,
327,
460,
5230,
273,
666,
12,
1132,
13,
5230,
18,
9845,
1435,
327,
1408,
18,
5701,
12,
7549,
13,
225,
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,
5446,
22910,
67,
869,
67,
13635,
12,
1132,
4672,
309,
353,
14002,
22910,
30,
327,
460,
5230,
273,
666,
12,
1132,
13,
5230,
18,
9845,
1435,
327,
1408,
18,
5701,
12,
7549,
13,
225,
2,
... |
if attrs: self.data += " " for key,val in attrs.items(): self.data += "%s=\"%s\"" % (key, cgi.escape(val, True)) | for key,val in attrs.items(): self.data += " %s=\"%s\"" % (key, cgi.escape(val, True)) | def unknown_starttag (self, tag, attributes): attrs = {} for key,val in attributes: attrs[key] = val msgid = attrs.get('i18n:translate', None) if msgid == '': if self.tag: raise Exception, "nested i18n:translate is unsupported" self.tag = tag self.data = "" elif msgid is not None: if self.tag: raise Exception, "nested i18n:translate is unsupported" if msgid.startswith("string:"): self.translations.add(msgid[7:].replace(';;', ';')) else: print >>sys.stderr, "tag <%s> has unsupported dynamic msgid %s" % (tag, `msgid`) elif self.tag: # nested tag to translate self.data += "<%s"%tag if attrs: self.data += " " for key,val in attrs.items(): self.data += "%s=\"%s\"" % (key, cgi.escape(val, True)) self.data += ">" argument = attrs.get('i18n:attributes', None) if argument is not None: for name, msgid in get_attribute_list(argument): self.translations.add(msgid) | 7e46f756ae6d7bfb045c5cf8af8cca77002bb7d8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3948/7e46f756ae6d7bfb045c5cf8af8cca77002bb7d8/pygettext.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5917,
67,
1937,
2692,
261,
2890,
16,
1047,
16,
1677,
4672,
3422,
273,
2618,
364,
498,
16,
1125,
316,
1677,
30,
3422,
63,
856,
65,
273,
1244,
24389,
273,
3422,
18,
588,
2668,
77,
2643,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5917,
67,
1937,
2692,
261,
2890,
16,
1047,
16,
1677,
4672,
3422,
273,
2618,
364,
498,
16,
1125,
316,
1677,
30,
3422,
63,
856,
65,
273,
1244,
24389,
273,
3422,
18,
588,
2668,
77,
2643,
... |
creation_points, paths, assignsets, allnodes, csites = ifa_flow_graph(cl, dcpa, node) if len(csites) == 1: | creation_points, paths, assignsets, allnodes, csites, emptycsites = ifa_flow_graph(cl, dcpa, node) if len(csites)+len(emptycsites) == 1: | def ifa_split_vars(cl, dcpa, vars, nr_classes, classes_nr, split): for (varnum, var) in enumerate(vars): if not (var, dcpa, 0) in getgx().cnode: continue node = getgx().cnode[var, dcpa, 0] creation_points, paths, assignsets, allnodes, csites = ifa_flow_graph(cl, dcpa, node) if len(csites) == 1: continue if DEBUG: print 'IFA visit var %s.%s, %d' % (cl.ident, var.name, dcpa) ifa_split_empties(cl, dcpa, allnodes, assignsets, split) if len(merge_simple_types(getgx().types[node])) < 2 or len(assignsets) == 1: continue ifa_split_no_confusion(cl, dcpa, varnum, classes_nr, nr_classes, csites, allnodes, split) if split: if DEBUG: print 'IFA found simple splits, aborting' break for node in allnodes: if not ifa_confluence_point(node, creation_points): continue if not node.thing.formal_arg and not isinstance(node.thing.parent, class_): continue remaining = ifa_determine_split(node, allnodes) if len(remaining) < 2 or len(remaining) >= 10: continue # --- if it exists, perform actual splitting if DEBUG: print 'IFA normal split, remaining:', len(remaining) for splitsites in remaining[1:]: ifa_split_class(cl, dcpa, splitsites, split) return split # --- if all else fails, perform wholesale splitting # XXX assign sets should be different; len(paths) > 1? if len(paths) > 1 and 1 < len(csites) < 10: if DEBUG: print 'IFA wholesale splitting, csites:', len(csites) for csite in csites[1:]: ifa_split_class(cl, dcpa, [csite], split) return split | 1e46cb49994e29bdac7a6514502ee2e2b0d5d451 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4470/1e46cb49994e29bdac7a6514502ee2e2b0d5d451/infer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
309,
69,
67,
4939,
67,
4699,
12,
830,
16,
302,
4057,
69,
16,
4153,
16,
9884,
67,
4701,
16,
3318,
67,
11611,
16,
1416,
4672,
364,
261,
90,
1303,
379,
16,
569,
13,
316,
4241,
12,
469... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
309,
69,
67,
4939,
67,
4699,
12,
830,
16,
302,
4057,
69,
16,
4153,
16,
9884,
67,
4701,
16,
3318,
67,
11611,
16,
1416,
4672,
364,
261,
90,
1303,
379,
16,
569,
13,
316,
4241,
12,
469... |
resp.content_type = 'image/png' | eq_(resp.content_type, 'image/png') | def test_get_map_png(self): resp = self.app.get(self.common_map_req) resp.content_type = 'image/png' data = StringIO(resp.body) assert is_png(data) eq_(Image.open(data).mode, 'RGB') | 3be7b2c342952952c389ace60c678d42073b4715 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11249/3be7b2c342952952c389ace60c678d42073b4715/test_wms.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
588,
67,
1458,
67,
6446,
12,
2890,
4672,
1718,
273,
365,
18,
2910,
18,
588,
12,
2890,
18,
6054,
67,
1458,
67,
3658,
13,
7555,
67,
12,
12243,
18,
1745,
67,
723,
16,
296,
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,
1842,
67,
588,
67,
1458,
67,
6446,
12,
2890,
4672,
1718,
273,
365,
18,
2910,
18,
588,
12,
2890,
18,
6054,
67,
1458,
67,
3658,
13,
7555,
67,
12,
12243,
18,
1745,
67,
723,
16,
296,
2... |
savedOptions.append(("status","0")) | if ("status", "1") not in savedOptions: savedOptions.append(("status","0")) | def setPluginConfParams(self,pathPlugin,savedOptions): info = XMLParser(pathPlugin+"/conf.xml") code = info.getValue("pytrainer-plugin","plugincode") plugindir = self.conf.getValue("plugindir")+"/"+code if not os.path.isdir(plugindir): os.mkdir(plugindir) if not os.path.isfile(plugindir+"/conf.xml"): savedOptions.append(("status","0")) info = XMLParser(plugindir+"/conf.xml") info.createXMLFile("pytrainer-plugin",savedOptions) | 0b6fd43ea2174cd4081abcd3fbfee5841f7becb0 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11865/0b6fd43ea2174cd4081abcd3fbfee5841f7becb0/plugins.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
3773,
3976,
1370,
12,
2890,
16,
803,
3773,
16,
14077,
1320,
4672,
1123,
273,
3167,
2678,
12,
803,
3773,
9078,
19,
3923,
18,
2902,
7923,
981,
273,
1123,
18,
24805,
2932,
2074,
313,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
3773,
3976,
1370,
12,
2890,
16,
803,
3773,
16,
14077,
1320,
4672,
1123,
273,
3167,
2678,
12,
803,
3773,
9078,
19,
3923,
18,
2902,
7923,
981,
273,
1123,
18,
24805,
2932,
2074,
313,
... |
from reportlab.lib.enums import TA_LEFT, TA_CENTER, TA_RIGHT, TA_JUSTIFY | def draw(self): from reportlab.lib.enums import TA_LEFT, TA_CENTER, TA_RIGHT, TA_JUSTIFY style = self.style lines = self.lines rightIndent = style.rightIndent leftIndent = style.leftIndent leading = style.leading font = style.fontName size = style.fontSize alignment = style.alignment firstindent = style.firstLineIndent c = self.canv escape = c._escape #if debug: # print "FAST", id(self), "page number", c.getPageNumber() height = self.height #if debug: # c.rect(0,0,-1, height-size, fill=1, stroke=1) c.translate(0, height-size) textobject = c.beginText() code = textobject._code #textobject.setTextOrigin(0,firstindent) textobject.setFont(font, size) if style.textColor: textobject.setFillColor(style.textColor) first = 1 y = 0 basicWidth = self.availableWidth - rightIndent count = 0 nlines = len(lines) while count<nlines: (text, length, nwords) = lines[count] count = count+1 thisindent = leftIndent if first: thisindent = firstindent if alignment==TA_LEFT: x = thisindent elif alignment==TA_CENTER: extra = basicWidth - length x = thisindent + extra/2.0 elif alignment==TA_RIGHT: extra = basicWidth - length x = thisindent + extra elif alignment==TA_JUSTIFY: x = thisindent if count<nlines and nwords>1: # patch from doug@pennatus.com, 9 Nov 2002, no extraspace on last line textobject.setWordSpace((basicWidth-length)/(nwords-1.0)) else: textobject.setWordSpace(0.0) textobject.setTextOrigin(x,y) text = escape(text) code.append('(%s) Tj' % text) #textobject.textOut(text) y = y-leading c.drawText(textobject) | 041e2d265f4d145658b08edc02ff501d425029d6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3878/041e2d265f4d145658b08edc02ff501d425029d6/para.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3724,
12,
2890,
4672,
2154,
273,
365,
18,
4060,
2362,
273,
365,
18,
3548,
2145,
7790,
273,
2154,
18,
4083,
7790,
2002,
7790,
273,
2154,
18,
4482,
7790,
7676,
273,
2154,
18,
27200,
3512,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3724,
12,
2890,
4672,
2154,
273,
365,
18,
4060,
2362,
273,
365,
18,
3548,
2145,
7790,
273,
2154,
18,
4083,
7790,
2002,
7790,
273,
2154,
18,
4482,
7790,
7676,
273,
2154,
18,
27200,
3512,
... | |
if netCDF4_dir is None: | if netCDF4_includedir is None and netCDF4_dir is None: | def check_ifnetcdf4(netcdf4_dir): try: f = open(os.path.join(netcdf4_dir,'include/netcdf.h')) except IOError: return False isnetcdf4 = False for line in f: if line.startswith('nc_inq_compound'): isnetcdf4 = True return isnetcdf4 | c01e6408fe27e6458627abbf01fb6379fe1f2926 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8103/c01e6408fe27e6458627abbf01fb6379fe1f2926/setup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
67,
430,
2758,
24799,
24,
12,
2758,
24799,
24,
67,
1214,
4672,
775,
30,
284,
273,
1696,
12,
538,
18,
803,
18,
5701,
12,
2758,
24799,
24,
67,
1214,
11189,
6702,
19,
2758,
24799,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
430,
2758,
24799,
24,
12,
2758,
24799,
24,
67,
1214,
4672,
775,
30,
284,
273,
1696,
12,
538,
18,
803,
18,
5701,
12,
2758,
24799,
24,
67,
1214,
11189,
6702,
19,
2758,
24799,
... |
self.redirect("http://ad2.adsovo.com" + self.request.uri) | self.redirect( redirect_to ) | def get(self): ad_type = self.get_argument("ad_type") ad_size = self.get_argument("ad_size") section = self.get_argument("section") referer="" trace = int(self.get_argument("t","0")) if self.request.headers.has_key("referer"): referer = self.request.headers["referer"] referer = self.get_argument("q",referer) referer_url = urlparse.urlsplit(referer) r=ifcmgkernel.scan_url(trace,referer_url.netloc, referer_url.geturl()) | 31d2c2abb965eb287a264aeaa5de65d97b76297e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4021/31d2c2abb965eb287a264aeaa5de65d97b76297e/ifcmgtool_simple_redirector.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
12,
2890,
4672,
1261,
67,
723,
273,
365,
18,
588,
67,
3446,
2932,
361,
67,
723,
7923,
1261,
67,
1467,
273,
365,
18,
588,
67,
3446,
2932,
361,
67,
1467,
7923,
2442,
273,
365,
18,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
12,
2890,
4672,
1261,
67,
723,
273,
365,
18,
588,
67,
3446,
2932,
361,
67,
723,
7923,
1261,
67,
1467,
273,
365,
18,
588,
67,
3446,
2932,
361,
67,
1467,
7923,
2442,
273,
365,
18,... |
sys.stderr.write("\t no valid(non-NA) pairs between %s and %s.\n"%(row_id1, row_id2)) | if hasattr(cls, 'debug') and getattr(cls,'debug'): sys.stderr.write("\t no valid(non-NA) pairs between %s and %s.\n"%(row_id1, row_id2)) | def cmp_row_wise(cls, data_matrix1, data_matrix2, col_id2col_index1, col_id2col_index2, col_id12col_id2, row_id2row_index1, row_id2row_index2, row_id12row_id2): """ 2007-12-18 strain wise 2007-12-20 make it more generic 2007-12-21 even more generic 2008-01-07 change the non_NA criteria from !=0 to >0. in 2010 data matrix, there's substantial amount of -2 (not tried). """ sys.stderr.write("Comparing row-wise for mismatches ...\n") row_id2NA_mismatch_rate = {} for row_id1, row_id2 in row_id12row_id2.iteritems(): row_index1 = row_id2row_index1[row_id1] row_index2 = row_id2row_index2[row_id2] no_of_mismatches = 0 no_of_non_NA_pairs = 0 no_of_NAs = 0 no_of_totals = 0 for col_id1, col_index1 in col_id2col_index1.iteritems(): if col_id1 in col_id12col_id2: col_id2 = col_id12col_id2[col_id1] col_index2 = col_id2col_index2[col_id2] no_of_totals += 1 if data_matrix1[row_index1][col_index1] == 0: no_of_NAs += 1 if data_matrix1[row_index1][col_index1] > 0 and data_matrix2[row_index2][col_index2] > 0: #2008-01-07 no_of_non_NA_pairs += 1 if data_matrix1[row_index1][col_index1] != data_matrix2[row_index2][col_index2]: no_of_mismatches += 1 if no_of_totals >0 and no_of_non_NA_pairs>0: NA_rate = no_of_NAs/float(no_of_totals) mismatch_rate = no_of_mismatches/float(no_of_non_NA_pairs) row_id2NA_mismatch_rate[row_id1] = [NA_rate, mismatch_rate, no_of_NAs, no_of_totals, no_of_mismatches, no_of_non_NA_pairs] else: sys.stderr.write("\t no valid(non-NA) pairs between %s and %s.\n"%(row_id1, row_id2)) sys.stderr.write("Done.\n") return row_id2NA_mismatch_rate | ae739a778d708a9f2615d50aee84a40bf9787368 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9645/ae739a778d708a9f2615d50aee84a40bf9787368/QualityControl.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9411,
67,
492,
67,
2460,
12,
6429,
16,
501,
67,
5667,
21,
16,
501,
67,
5667,
22,
16,
645,
67,
350,
22,
1293,
67,
1615,
21,
16,
645,
67,
350,
22,
1293,
67,
1615,
22,
16,
645,
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,
9411,
67,
492,
67,
2460,
12,
6429,
16,
501,
67,
5667,
21,
16,
501,
67,
5667,
22,
16,
645,
67,
350,
22,
1293,
67,
1615,
21,
16,
645,
67,
350,
22,
1293,
67,
1615,
22,
16,
645,
67,
... |
def _serve_file(self, last_modified, mime_type, content): | def _serve_file(self, lmt, mime_type, content): | def _serve_file(self, last_modified, mime_type, content): ''' guts of serve_file() and serve_static_file() ''' ims = None # see if there's an if-modified-since... if hasattr(self.request, 'headers'): ims = self.request.headers.getheader('if-modified-since') elif self.env.has_key('HTTP_IF_MODIFIED_SINCE'): # cgi will put the header in the env var ims = self.env['HTTP_IF_MODIFIED_SINCE'] if ims: ims = rfc822.parsedate(ims)[:6] lmtt = time.gmtime(lmt)[:6] if lmtt <= ims: raise NotModified | 659ca653dd7b6eb1c7e472caed3915dffd09f88e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/659ca653dd7b6eb1c7e472caed3915dffd09f88e/client.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
30104,
67,
768,
12,
2890,
16,
328,
1010,
16,
4892,
67,
723,
16,
913,
4672,
9163,
314,
12940,
434,
12175,
67,
768,
1435,
471,
12175,
67,
3845,
67,
768,
1435,
9163,
709,
87,
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,
389,
30104,
67,
768,
12,
2890,
16,
328,
1010,
16,
4892,
67,
723,
16,
913,
4672,
9163,
314,
12940,
434,
12175,
67,
768,
1435,
471,
12175,
67,
3845,
67,
768,
1435,
9163,
709,
87,
273,
... |
except OSError: pass try: | if os.path.exists(self.bad_dir_path): | def cleanup(self): """Make sure that the .pth file is deleted, self.imported is not in sys.modules, and that both self.good_dirname and self.bad_dirname are not existing directories.""" try: os.remove(self.file_path) except OSError: pass try: del sys.modules[self.imported] except KeyError: pass try: os.rmdir(self.good_dir_path) except OSError: pass try: os.rmdir(self.bad_dir_path) except OSError: pass | ee86a66dd87787e54772c93c961fa611311b1502 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/ee86a66dd87787e54772c93c961fa611311b1502/test_site.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6686,
12,
2890,
4672,
3536,
6464,
3071,
716,
326,
263,
2397,
585,
353,
4282,
16,
365,
18,
29266,
353,
486,
316,
2589,
18,
6400,
16,
471,
716,
3937,
365,
18,
19747,
67,
12287,
471,
365,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6686,
12,
2890,
4672,
3536,
6464,
3071,
716,
326,
263,
2397,
585,
353,
4282,
16,
365,
18,
29266,
353,
486,
316,
2589,
18,
6400,
16,
471,
716,
3937,
365,
18,
19747,
67,
12287,
471,
365,... |
_acquireLock() try: if wr in _handlerList: _handlerList.remove(wr) finally: _releaseLock() | if _acquireLock is not None: _acquireLock() try: if wr in _handlerList: _handlerList.remove(wr) finally: _releaseLock() | def _removeHandlerRef(wr): """ Remove a handler reference from the internal cleanup list. """ _acquireLock() try: if wr in _handlerList: _handlerList.remove(wr) finally: _releaseLock() | b60d46b2e42ee14a19d6de6edd39025472d9753f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12029/b60d46b2e42ee14a19d6de6edd39025472d9753f/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
4479,
1503,
1957,
12,
91,
86,
4672,
3536,
3581,
279,
1838,
2114,
628,
326,
2713,
6686,
666,
18,
3536,
565,
309,
389,
1077,
1039,
2531,
353,
486,
599,
30,
389,
1077,
1039,
2531,
14... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4479,
1503,
1957,
12,
91,
86,
4672,
3536,
3581,
279,
1838,
2114,
628,
326,
2713,
6686,
666,
18,
3536,
565,
309,
389,
1077,
1039,
2531,
353,
486,
599,
30,
389,
1077,
1039,
2531,
14... |
print 'h=',h | def getentry(self, which): self._check() if which == 'in': cmd = IN_ENTRY_SENSE elif which == 'out': cmd = OUT_ENTRY_SENSE self.replycmd(cmd) h = self._getnumber(2) print 'h=',h m = self._getnumber(2) print 'm=',m s = self._getnumber(2) print 's=',s f = self._getnumber(2) print 'f=',f return (h, m, s, f) | b988d2cb901a9bc6c6110c4a4d8405b22832b696 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/b988d2cb901a9bc6c6110c4a4d8405b22832b696/VCR.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
4099,
12,
2890,
16,
1492,
4672,
365,
6315,
1893,
1435,
309,
1492,
422,
296,
267,
4278,
1797,
273,
2120,
67,
19083,
67,
1090,
50,
1090,
1327,
1492,
422,
296,
659,
4278,
1797,
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,
336,
4099,
12,
2890,
16,
1492,
4672,
365,
6315,
1893,
1435,
309,
1492,
422,
296,
267,
4278,
1797,
273,
2120,
67,
19083,
67,
1090,
50,
1090,
1327,
1492,
422,
296,
659,
4278,
1797,
273,
... | |
self.short_short_desc = unicode(bug.short_short_desc.data, 'utf-8') | bug.short_short_desc = unicode(bug.short_short_desc.data, 'utf-8') return bug def __setitem__(self, index, bug): bug = self.__convert(bug) super(BugList, self).__setitem__(index, bug) def append(self, bug): bug = self.__convert(bug) super(BugList, self).append(bug) | def __init__(self, bug): self.bug_id = bug.bug_id self.url = bug.url self.bug_status = unicode(bug.bug_status, 'utf-8') try: self.short_short_desc = unicode(bug.short_short_desc, 'utf-8') except TypeError: self.short_short_desc = unicode(bug.short_short_desc.data, 'utf-8') | ad6c182ae46a0123425ae9ead4ddb68cf71b59e7 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9953/ad6c182ae46a0123425ae9ead4ddb68cf71b59e7/bugs.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
7934,
4672,
365,
18,
925,
67,
350,
273,
7934,
18,
925,
67,
350,
365,
18,
718,
273,
7934,
18,
718,
365,
18,
925,
67,
2327,
273,
5252,
12,
925,
18,
925... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
7934,
4672,
365,
18,
925,
67,
350,
273,
7934,
18,
925,
67,
350,
365,
18,
718,
273,
7934,
18,
718,
365,
18,
925,
67,
2327,
273,
5252,
12,
925,
18,
925... |
self.dbh.execute("""insert into msn_users set inode=%r,packet_id=%r,transaction_id=%r,session_id=%r,nick=%r,user_data_type=%r,user_data=%r""",(self.fd.inode,self.get_packet_id(),words[1],self.session_id,"%s (Target)" % self.client_id,'locale',words[2])) self.dbh.execute("""insert into msn_users set inode=%r,packet_id=%r,transaction_id=%r,session_id=%r,nick=%r,user_data_type=%r,user_data=%r""",(self.fd.inode,self.get_packet_id(),words[1],self.session_id,"%s (Target)" % self.client_id,'os'," ".join(words[3:6]))) self.dbh.execute("""insert into msn_users set inode=%r,packet_id=%r,transaction_id=%r,session_id=%r,nick=%r,user_data_type=%r,user_data=%r""",(self.fd.inode,self.get_packet_id(),words[1],self.session_id,"%s (Target)" % self.client_id,'client'," ".join(words[6:8]))) self.dbh.execute("""insert into msn_users set inode=%r,packet_id=%r,transaction_id=%r,session_id=%r,nick=%r,user_data_type=%r,user_data=%r""",(self.fd.inode,self.get_packet_id(),words[1],self.session_id,"%s (Target)" % self.client_id,'target_msn_passport',words[9])) | self.insert_user_data("%s (Target)" % self.client_id,'locale',words[2],words[1]) self.insert_user_data("%s (Target)" % self.client_id,'os'," ".join(words[3:6]),words[1]) self.insert_user_data("%s (Target)" % self.client_id,'client'," ".join(words[6:8]),words[1]) self.insert_user_data("%s (Target)" % self.client_id,'target_msn_passport',words[9],words[1]) | def CVR(self): """Version information, including OS information | cf7fac3ff0c735f3f514d4f41c9e494e2787883c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5568/cf7fac3ff0c735f3f514d4f41c9e494e2787883c/MSN.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
385,
10986,
12,
2890,
4672,
3536,
1444,
1779,
16,
6508,
5932,
1779,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
385,
10986,
12,
2890,
4672,
3536,
1444,
1779,
16,
6508,
5932,
1779,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
gcompris.bar_set(0) | gcompris.bar_set(gcompris.BAR_LEVEL) | def start(self): self.gcomprisBoard.level=1 self.gcomprisBoard.maxlevel=4 self.gcomprisBoard.sublevel=1 self.gcomprisBoard.number_of_sublevel=1 | d1fd7f504872649603c3ecc34448c168e28ddf3f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11306/d1fd7f504872649603c3ecc34448c168e28ddf3f/electric.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
787,
12,
2890,
4672,
225,
365,
18,
75,
832,
683,
291,
22233,
18,
2815,
33,
21,
365,
18,
75,
832,
683,
291,
22233,
18,
1896,
2815,
33,
24,
365,
18,
75,
832,
683,
291,
22233,
18,
87,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
787,
12,
2890,
4672,
225,
365,
18,
75,
832,
683,
291,
22233,
18,
2815,
33,
21,
365,
18,
75,
832,
683,
291,
22233,
18,
1896,
2815,
33,
24,
365,
18,
75,
832,
683,
291,
22233,
18,
87,... |
>>> t.rundict(d, "rundict_test_pvt", m1) | >>> t.rundict(m1.__dict__, "rundict_test_pvt", m1) | ... def bar(self): | d0755d8636fa6d67c1e9e5d8fe9d7ff7d40b4bd6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/d0755d8636fa6d67c1e9e5d8fe9d7ff7d40b4bd6/doctest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1372,
565,
1652,
4653,
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,
1372,
565,
1652,
4653,
12,
2890,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
print "ERROR: unable to archive database. Upgrade failed" | print "Error: unable to archive database. Upgrade failed" | def archive_db(): print "STATUS: archiving old database" archive_db = "psql template1 postgres -qc " \ " 'ALTER DATABASE %s RENAME TO %s;';" \ " createdb -U postgres %s > /dev/null; " % \ (database, archived_database, database) exit_status = os.system(archive_db) if exit_status: print "ERROR: unable to archive database. Upgrade failed" sys.exit(1) print "STATUS: %s has been archived. now named %s" % (database, archived_database) | af98851618b632afb0a950644c796b7c633ace40 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7598/af98851618b632afb0a950644c796b7c633ace40/upgrade-db.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5052,
67,
1966,
13332,
225,
1172,
315,
8608,
30,
6637,
9288,
1592,
2063,
6,
5052,
67,
1966,
273,
315,
1121,
1217,
1542,
21,
1603,
14107,
300,
30675,
315,
521,
315,
296,
18843,
17998,
738... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5052,
67,
1966,
13332,
225,
1172,
315,
8608,
30,
6637,
9288,
1592,
2063,
6,
5052,
67,
1966,
273,
315,
1121,
1217,
1542,
21,
1603,
14107,
300,
30675,
315,
521,
315,
296,
18843,
17998,
738... |
self.formatter = None | def __init__(self, strm=None): """ Initialize the handler. | 6c2c9aaaa8d082581e1f6a8438b57be39afd8543 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12029/6c2c9aaaa8d082581e1f6a8438b57be39afd8543/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
609,
81,
33,
7036,
4672,
3536,
9190,
326,
1838,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
609,
81,
33,
7036,
4672,
3536,
9190,
326,
1838,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... | |
if child['left'] <= left: raise Exception('Record (%d): left %d <= parent left %d' % \ (child['id'], child['left'], left)) if child['left'] >= child['right']: raise Exception('Record (%d): left %d >= right %d' % \ (child['id'], child['left'], child['right'])) if right != 0 and child['right'] >= right: raise Exception('Record (%d): right %d >= parent right %d' % \ (child['id'], child['right'], right)) | assert child['left'] > left, \ 'Record (%d): left %d <= parent left %d' % \ (child['id'], child['left'], left) assert child['left'] < child['right'], \ 'Record (%d): left %d >= right %d' % \ (child['id'], child['left'], child['right']) assert right == 0 or child['right'] < right, \ 'Record (%d): right %d >= parent right %d' % \ (child['id'], child['right'], right) | def CheckTree(self, parent_id=False, left=0, right=0): child_ids = self.mptt.search([ ('parent', '=', parent_id), ], 0, None, None, CONTEXT) childs = self.mptt.read(child_ids, ['left', 'right'], CONTEXT) childs.sort(lambda x, y: cmp(child_ids.index(x['id']), child_ids.index(y['id']))) for child in childs: if child['left'] <= left: raise Exception('Record (%d): left %d <= parent left %d' % \ (child['id'], child['left'], left)) if child['left'] >= child['right']: raise Exception('Record (%d): left %d >= right %d' % \ (child['id'], child['left'], child['right'])) if right != 0 and child['right'] >= right: raise Exception('Record (%d): right %d >= parent right %d' % \ (child['id'], child['right'], right)) self.CheckTree(child['id'], left=child['left'], right=child['right']) next_left = 0 for child in childs: if child['left'] <= next_left: raise Exception('Record (%d): left %d <= next left %d' % \ (child['id'], child['left'], next_left)) next_left = child['right'] childs.reverse() previous_right = 0 for child in childs: if previous_right != 0 and child['right'] >= previous_right: raise Exception('Record (%d): right %d >= previous right %d' % \ (child['id'] , child['right'], previous_right)) previous_right = child['left'] | 21ee22919528f4bf15192e77602a6801360c41d2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9266/21ee22919528f4bf15192e77602a6801360c41d2/test_tryton.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2073,
2471,
12,
2890,
16,
982,
67,
350,
33,
8381,
16,
2002,
33,
20,
16,
2145,
33,
20,
4672,
1151,
67,
2232,
273,
365,
18,
81,
337,
88,
18,
3072,
3816,
7707,
2938,
2187,
15196,
2187,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2073,
2471,
12,
2890,
16,
982,
67,
350,
33,
8381,
16,
2002,
33,
20,
16,
2145,
33,
20,
4672,
1151,
67,
2232,
273,
365,
18,
81,
337,
88,
18,
3072,
3816,
7707,
2938,
2187,
15196,
2187,
... |
def getURL(self, name): | def getURL(self, name, size=None): | def getURL(self, name): try: return self.images[name]['url'] except KeyError: return None | 8f6f976866268c4834ec03a758a67b750c538eca /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12391/8f6f976866268c4834ec03a758a67b750c538eca/zipwiki.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
19341,
12,
2890,
16,
508,
16,
963,
33,
7036,
4672,
775,
30,
327,
365,
18,
7369,
63,
529,
23962,
718,
3546,
1335,
4999,
30,
327,
599,
225,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
19341,
12,
2890,
16,
508,
16,
963,
33,
7036,
4672,
775,
30,
327,
365,
18,
7369,
63,
529,
23962,
718,
3546,
1335,
4999,
30,
327,
599,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
orngMisc.printVerbose(" repetition %d" % t, verb) | printVerbose(" repetition %d" % t, verb) | def learningCurveWithTestData(learners, learnset, testset, times=10, proportions=orange.frange(0.1), strat=orange.MakeRandomIndices.StratifiedIfPossible, pps=[], **argkw): verb = argkw.get("verbose", 0) learnset, learnweight = demangleExamples(learnset) testweight = demangleExamples(testset)[1] randomGenerator = argkw.get("indicesrandseed", 0) or argkw.get("randseed", 0) or argkw.get("randomGenerator", 0) pick = orange.MakeRandomIndices2(stratified = strat, randomGenerator = randomGenerator) allResults=[] for p in proportions: orngMisc.printVerbose("Proportion: %5.3f" % p, verb) testResults = ExperimentResults(times, [l.name for l in learners], testset.domain.classVar.values.native(), testweight!=0, testset.domain.classVar.baseValue) testResults.results = [] for t in range(times): orngMisc.printVerbose(" repetition %d" % t, verb) learnAndTestOnTestData(learners, (learnset.selectref(pick(learnset, p), 0), learnweight), testset, testResults, t) allResults.append(testResults) return allResults | ca7968169a574805fc1c8ef05774f2451a2f833e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6366/ca7968169a574805fc1c8ef05774f2451a2f833e/orngTest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13753,
9423,
1190,
4709,
751,
12,
21346,
414,
16,
16094,
542,
16,
1842,
542,
16,
4124,
33,
2163,
16,
450,
655,
1115,
33,
280,
726,
18,
74,
3676,
12,
20,
18,
21,
3631,
609,
270,
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,
13753,
9423,
1190,
4709,
751,
12,
21346,
414,
16,
16094,
542,
16,
1842,
542,
16,
4124,
33,
2163,
16,
450,
655,
1115,
33,
280,
726,
18,
74,
3676,
12,
20,
18,
21,
3631,
609,
270,
33,
... |
__regify(('browser', 'chrome\\/help\\/images\\/[a-z-_]+\\.png'))] | __regify(('browser', 'chrome\\/help\\/images\\/[A-Za-z-_]+\\.png'))] | def __dont_ignore(tpl): for mod, path, key in exceptions: if mod.match(tpl[0]) and path.match(tpl[1]) and key.match(tpl[2]): return False return True | 02d146b4db4a2d25c666fb60d5ef025081c2d743 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/13067/02d146b4db4a2d25c666fb60d5ef025081c2d743/CompareLocales.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
72,
1580,
67,
6185,
12,
10933,
4672,
364,
681,
16,
589,
16,
498,
316,
4798,
30,
309,
681,
18,
1916,
12,
10933,
63,
20,
5717,
471,
589,
18,
1916,
12,
10933,
63,
21,
5717,
471,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
72,
1580,
67,
6185,
12,
10933,
4672,
364,
681,
16,
589,
16,
498,
316,
4798,
30,
309,
681,
18,
1916,
12,
10933,
63,
20,
5717,
471,
589,
18,
1916,
12,
10933,
63,
21,
5717,
471,
... |
found = declarations.matcher.find( criteria1 | criteria2, self.declarations ) | found = declarations.matcher.find( criteria1 | criteria2, self.global_ns ) | def test_or_matcher( self ): criteria1 = declarations.regex_matcher_t( 'oper.*' , lambda decl: decl.name ) criteria2 = declarations.access_type_matcher_t( declarations.ACCESS_TYPES.PUBLIC ) found = declarations.matcher.find( criteria1 | criteria2, self.declarations ) | 6158084cc393df0065b620918b14781beb11cb8b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7398/6158084cc393df0065b620918b14781beb11cb8b/filters_tester.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
280,
67,
22761,
12,
365,
262,
30,
3582,
21,
273,
12312,
18,
7584,
67,
22761,
67,
88,
12,
296,
4063,
25664,
269,
3195,
3496,
30,
3496,
18,
529,
262,
3582,
22,
273,
12312,
18... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
280,
67,
22761,
12,
365,
262,
30,
3582,
21,
273,
12312,
18,
7584,
67,
22761,
67,
88,
12,
296,
4063,
25664,
269,
3195,
3496,
30,
3496,
18,
529,
262,
3582,
22,
273,
12312,
18... |
N2 *= as[axis] | N2 *= as_[axis] | def tensordot(a, b, axes=2): """tensordot returns the product for any (ndim >= 1) arrays. r_{xxx, yyy} = \sum_k a_{xxx,k} b_{k,yyy} where the axes to be summed over are given by the axes argument. the first element of the sequence determines the axis or axes in arr1 to sum over, and the second element in axes argument sequence determines the axis or axes in arr2 to sum over. When there is more than one axis to sum over, the corresponding arguments to axes should be sequences of the same length with the first axis to sum over given first in both sequences, the second axis second, and so forth. If the axes argument is an integer, N, then the last N dimensions of a and first N dimensions of b are summed over. """ try: iter(axes) except: axes_a = range(-axes,0) axes_b = range(0,axes) else: axes_a, axes_b = axes try: na = len(axes_a) axes_a = list(axes_a) except TypeError: axes_a = [axes_a] na = 1 try: nb = len(axes_b) axes_b = list(axes_b) except TypeError: axes_b = [axes_b] nb = 1 a, b = asarray(a), asarray(b) as = a.shape nda = len(a.shape) bs = b.shape ndb = len(b.shape) equal = 1 if (na != nb): equal = 0 else: for k in xrange(na): if as[axes_a[k]] != bs[axes_b[k]]: equal = 0 break if axes_a[k] < 0: axes_a[k] += nda if axes_b[k] < 0: axes_b[k] += ndb if not equal: raise ValueError, "shape-mismatch for sum" # Move the axes to sum over to the end of "a" # and to the front of "b" notin = [k for k in range(nda) if k not in axes_a] newaxes_a = notin + axes_a N2 = 1 for axis in axes_a: N2 *= as[axis] newshape_a = (-1, N2) olda = [as[axis] for axis in notin] notin = [k for k in range(ndb) if k not in axes_b] newaxes_b = axes_b + notin N2 = 1 for axis in axes_b: N2 *= bs[axis] newshape_b = (N2, -1) oldb = [bs[axis] for axis in notin] at = a.transpose(newaxes_a).reshape(newshape_a) bt = b.transpose(newaxes_b).reshape(newshape_b) res = dot(at, bt) return res.reshape(olda + oldb) | 5de193472de880a05e1bdde2b3158dc5a4b44c69 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14925/5de193472de880a05e1bdde2b3158dc5a4b44c69/numeric.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
268,
773,
517,
352,
12,
69,
16,
324,
16,
6515,
33,
22,
4672,
3536,
88,
773,
517,
352,
1135,
326,
3017,
364,
1281,
261,
82,
3509,
1545,
404,
13,
5352,
18,
225,
436,
14147,
18310,
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,
268,
773,
517,
352,
12,
69,
16,
324,
16,
6515,
33,
22,
4672,
3536,
88,
773,
517,
352,
1135,
326,
3017,
364,
1281,
261,
82,
3509,
1545,
404,
13,
5352,
18,
225,
436,
14147,
18310,
16,
... |
EdkLogger.quiet("ERROR: There isn't makefils in %s.\n" % DestDir) | EdkLogger.quiet("ERROR: There is no Makefile in %s.\n" % DestDir) | def LibBuild(self, LibFile, PlatformFile, ewb, a, b, c): LibraryAutoGen = AutoGen(LibFile, PlatformFile, ewb, str(a), b, str(c)) LibraryAutoGen.CreateAutoGenFile() LibraryAutoGen.CreateMakefile() for Platform in ewb.Build[c].PlatformDatabase.values(): d = Platform.OutputDirectory (filename, ext) = os.path.splitext(os.path.normpath(os.path.join(os.environ["WORKSPACE"], d, a + '_' + b, c, str(LibFile)))) DestDir = filename EdkLogger.info('Makefile DestDir is: %s' % DestDir) FileList = glob.glob(os.path.normpath(os.path.join(DestDir, 'makefile'))) FileNum = len(FileList) if FileNum > 0: self.SameTypeFileInDir(FileNum, 'makefile', DestDir) BuildSpawn(self.ReturnCode, self.Sem, FileList[0], 'pbuild', 1).start() else: EdkLogger.quiet("ERROR: There isn't makefils in %s.\n" % DestDir) self.isexit(1) | c0c22cc283a500036bc0474c42e3b19d821583e6 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/914/c0c22cc283a500036bc0474c42e3b19d821583e6/build.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10560,
3116,
12,
2890,
16,
10560,
812,
16,
11810,
812,
16,
22722,
70,
16,
279,
16,
324,
16,
276,
4672,
18694,
4965,
7642,
273,
8064,
7642,
12,
5664,
812,
16,
11810,
812,
16,
22722,
70,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10560,
3116,
12,
2890,
16,
10560,
812,
16,
11810,
812,
16,
22722,
70,
16,
279,
16,
324,
16,
276,
4672,
18694,
4965,
7642,
273,
8064,
7642,
12,
5664,
812,
16,
11810,
812,
16,
22722,
70,... |
t_start = startOfInterval(t, t_length) print timestamp_to_string(t), t_length, timestamp_to_string(t_start) assert(time.localtime(t_start)[0:6] == (2009, 3, 4, 1, 45, 00)) t = time.mktime((2009, 3, 4, 1, 57, 17, 0, 0, 0)) | t_test = time.mktime((2009, 3, 4, 1, 57, 17, 0, 0, 0)) t_ans = time.mktime((2009, 3, 4, 1, 45, 0, 0, 0, 0)) t_start = startOfInterval(t_test, t_length) print timestamp_to_string(t_test), t_length, timestamp_to_string(t_start) assert(t_start == t_ans) | def _get_object(module_class, *args, **kwargs): """Given a path to a class, instantiates an instance of the class with the given args and returns it.""" # Split the path into its parts parts = module_class.split('.') # Strip off the classname: module = '.'.join(parts[:-1]) # Import the top level module mod = __import__(module) # Then recursively work down from the top level module to the class name: for part in parts[1:]: mod = getattr(mod, part) # Instance 'mod' will now be a class. Instantiate an instance and return it: obj = mod(*args, **kwargs) return obj | 19b04500cd89d5b1697673f832aae81e1515f674 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1013/19b04500cd89d5b1697673f832aae81e1515f674/weeutil.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
67,
1612,
12,
2978,
67,
1106,
16,
380,
1968,
16,
2826,
4333,
4672,
3536,
6083,
279,
589,
358,
279,
667,
16,
5934,
16020,
392,
791,
434,
326,
667,
598,
326,
864,
833,
471,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
67,
1612,
12,
2978,
67,
1106,
16,
380,
1968,
16,
2826,
4333,
4672,
3536,
6083,
279,
589,
358,
279,
667,
16,
5934,
16020,
392,
791,
434,
326,
667,
598,
326,
864,
833,
471,
1... |
unittest_modules = "testIterators testvbscript_regexp".split() | class PyCOMTest(unittest.TestCase): def testit(self): fname = os.path.join(os.path.dirname(this_file), "testPyComTest.py") cmd = '%s "%s" -q 2>&1' % (sys.executable, fname) f = os.popen(cmd) data = f.read() rc = f.close() if rc: print data self.fail("Executing '%s' failed (%d)" % (cmd, rc)) data = string.strip(data) if data: print "** testPyCOMTest generated unexpected output" print string.join(string.split(data, "\n"), "\r\n") unittest_modules = """testIterators testvbscript_regexp testStorage testStreams testWMI policySemantics testShell testROT """.split() | def _test_with_import(capture, module_name, fn_name, desc): try: mod = __import__(module_name) except (ImportError, pythoncom.com_error): print "The '%s' test can not be run - failed to import test module" % desc return capture.capture() try: func = getattr(mod, fn_name) func() capture.release() print "%s generated %d lines of output" % (desc, capture.get_num_lines_captured()) except: traceback.print_exc() capture.release() print "***** %s test FAILED after %d lines of output" % (desc, capture.get_num_lines_captured()) | 0feb740a216d1211f3141b53aa07f65dfac437c7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/992/0feb740a216d1211f3141b53aa07f65dfac437c7/testall.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3813,
67,
1918,
67,
5666,
12,
19250,
16,
1605,
67,
529,
16,
2295,
67,
529,
16,
3044,
4672,
775,
30,
681,
273,
1001,
5666,
972,
12,
2978,
67,
529,
13,
1335,
261,
5010,
668,
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,
3813,
67,
1918,
67,
5666,
12,
19250,
16,
1605,
67,
529,
16,
2295,
67,
529,
16,
3044,
4672,
775,
30,
681,
273,
1001,
5666,
972,
12,
2978,
67,
529,
13,
1335,
261,
5010,
668,
16,
... |
return lo + hi * 2 | return -(lo + hi * 2) | def CALL_FUNCTION(self, argc): hi, lo = divmod(argc, 256) return lo + hi * 2 | ff22a17528570ea77a7832f497e0214ff24c7d85 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9633/ff22a17528570ea77a7832f497e0214ff24c7d85/pyassem.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
22753,
67,
7788,
12,
2890,
16,
1501,
71,
4672,
10118,
16,
437,
273,
26105,
12,
3175,
71,
16,
8303,
13,
327,
437,
397,
10118,
380,
576,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
22753,
67,
7788,
12,
2890,
16,
1501,
71,
4672,
10118,
16,
437,
273,
26105,
12,
3175,
71,
16,
8303,
13,
327,
437,
397,
10118,
380,
576,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
prev_index = current_index is not None and current_index - 1 or -1 next_index = current_index is not None and current_index + 1 or -1 | prev_index = len(qs) next_index = len(qs) if current_index is not None: if current_index > 0: prev_index = current_index - 1 next_index = current_index + 1 | def _get_prevnext_unit_ids(qs, unit): """ Gets the previous and next unit ids of C{unit} based on index. @return: previous and next units. If previous or next is missing, None will be returned. """ path = unit.store.pootle_path current_index = _get_index_in_qs(qs, unit) prev_index = current_index is not None and current_index - 1 or -1 next_index = current_index is not None and current_index + 1 or -1 try: prev = qs[prev_index].id except IndexError: prev = None except AssertionError: prev = None try: next = qs[next_index].id except IndexError: next = None except AssertionError: next = None return prev, next | ec8950d9e01684bf065703e8bad918779de40b53 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11388/ec8950d9e01684bf065703e8bad918779de40b53/views.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
67,
10001,
4285,
67,
4873,
67,
2232,
12,
12926,
16,
2836,
4672,
3536,
11881,
326,
2416,
471,
1024,
2836,
3258,
434,
385,
95,
4873,
97,
2511,
603,
770,
18,
225,
632,
2463,
30,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
67,
10001,
4285,
67,
4873,
67,
2232,
12,
12926,
16,
2836,
4672,
3536,
11881,
326,
2416,
471,
1024,
2836,
3258,
434,
385,
95,
4873,
97,
2511,
603,
770,
18,
225,
632,
2463,
30,... |
sage: def h1(x): return sqrt(x^3 - 1) sage: def h2(x): return -sqrt(x^3 - 1) sage: plot([h1, h2], 1,4) | sage: def h1(x): return abs(sqrt(x^3 - 1)) sage: def h2(x): return -abs(sqrt(x^3 - 1)) sage: plot([h1, h2], 1,4) | sage: def h1(x): return sqrt(x^3 - 1) | 28d00b1efa8146794821ace9185cd73da7504ebb /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/28d00b1efa8146794821ace9185cd73da7504ebb/plot.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
272,
410,
30,
1652,
366,
21,
12,
92,
4672,
327,
5700,
12,
92,
66,
23,
225,
300,
404,
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,
... | [
1,
1,
1,
1,
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,
272,
410,
30,
1652,
366,
21,
12,
92,
4672,
327,
5700,
12,
92,
66,
23,
225,
300,
404,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
tmp_room_lines = vals['room_lines'] tmp_service_lines = vals['service_lines'] | tmp_room_lines = vals.get('room_lines',[]) tmp_service_lines = vals.get('service_lines',[]) | def create(self, cr, uid, vals, context=None, check=True): tmp_room_lines = vals['room_lines'] tmp_service_lines = vals['service_lines'] if not vals.has_key("folio_id"): vals.update({'room_lines':[],'service_lines':[]}) folio_id = super(hotel_folio, self).create(cr, uid, vals, context) for line in tmp_room_lines: line[2].update({'folio_id':folio_id}) for line in tmp_service_lines: line[2].update({'folio_id':folio_id}) vals.update({'room_lines':tmp_room_lines,'service_lines':tmp_service_lines}) super(hotel_folio, self).write(cr, uid,[folio_id], vals, context) else: folio_id = super(hotel_folio, self).create(cr, uid, vals, context) return folio_id | 63871fb247ae80f7d5df22f4cdd32ac08a62546d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7339/63871fb247ae80f7d5df22f4cdd32ac08a62546d/hotel.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
12,
2890,
16,
4422,
16,
4555,
16,
5773,
16,
819,
33,
7036,
16,
866,
33,
5510,
4672,
1853,
67,
13924,
67,
3548,
273,
5773,
18,
588,
2668,
13924,
67,
3548,
2187,
63,
5717,
1853,
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,
752,
12,
2890,
16,
4422,
16,
4555,
16,
5773,
16,
819,
33,
7036,
16,
866,
33,
5510,
4672,
1853,
67,
13924,
67,
3548,
273,
5773,
18,
588,
2668,
13924,
67,
3548,
2187,
63,
5717,
1853,
6... |
// *********************************************** // Wait for the next event // This function (optionally) resumes the process // execution and wait for a debugger event until timeout // wfne - combination of WFNE_... constants // timeout - number of seconds to wait, -1-infinity // returns: debugger event codes, see below long GetDebuggerEvent(long wfne, long timeout); // convenience function // wfne flag is combination of the following: // if the process is still running, the database // does not reflect the memory state. you might want // to call RefreshDebuggerMemory() in this case // (to be used with WFNE_CONT) // debugger event codes | def StepUntilRet(): """ Execute instructions in the current thread until a function return instruction is reached. Other threads are kept suspended. See the important note to the StepInto() function @return: success """ return idaapi.step_until_ret() | 0ffa672fe74d2b51e1742b974493692270938976 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3410/0ffa672fe74d2b51e1742b974493692270938976/idc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8693,
9716,
7055,
13332,
3536,
7903,
12509,
316,
326,
783,
2650,
3180,
279,
445,
327,
7592,
353,
8675,
18,
4673,
7403,
854,
16555,
21850,
18,
2164,
326,
10802,
4721,
358,
326,
8693,
5952,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8693,
9716,
7055,
13332,
3536,
7903,
12509,
316,
326,
783,
2650,
3180,
279,
445,
327,
7592,
353,
8675,
18,
4673,
7403,
854,
16555,
21850,
18,
2164,
326,
10802,
4721,
358,
326,
8693,
5952,
... | |
return 0 return 1 | return False return True | def check_spot( x, y, map ): if len( wolfpack.items( x, y, map ) ): return 0 return 1 | f9665c46d91ee48a0931cc8fc760b9852ee4a43f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/f9665c46d91ee48a0931cc8fc760b9852ee4a43f/carpentry_deed.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
67,
19032,
12,
619,
16,
677,
16,
852,
262,
30,
309,
562,
12,
341,
355,
74,
2920,
18,
3319,
12,
619,
16,
677,
16,
852,
262,
262,
30,
327,
1083,
327,
1053,
225,
2,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
866,
67,
19032,
12,
619,
16,
677,
16,
852,
262,
30,
309,
562,
12,
341,
355,
74,
2920,
18,
3319,
12,
619,
16,
677,
16,
852,
262,
262,
30,
327,
1083,
327,
1053,
225,
2,
-100,
-100,
... |
def setIdOnActivation(event): | def setIdOnActivation(permission, event): | def setIdOnActivation(event): """Set the permission id upon registration activation. Let's see how this notifier can be used. First we need to create an event using the permission instance and a registration stub: >>> class Registration: ... def __init__(self, obj, name): ... self.component = obj ... self.name = name >>> perm1 = LocalPermission('Permission 1', 'A first permission') >>> perm1.id u'<permission not activated>' >>> from zope.app.registration import registration >>> event = registration.RegistrationActivatedEvent( ... Registration(perm1, 'perm1')) Now we pass the event into this function, and the id of the permission should be set to 'perm1'. >>> setIdOnActivation(event) >>> perm1.id 'perm1' If the function is called and the component is not a local permission, nothing is done: >>> class Foo: ... id = 'no id' >>> foo = Foo() >>> event = registration.RegistrationActivatedEvent( ... Registration(foo, 'foo')) >>> setIdOnActivation(event) >>> foo.id 'no id' """ perm = event.object.component if isinstance(perm, LocalPermission): perm.id = event.object.name | e267dc5d29490b7d8ea30de5ed3c08f2e6ad84d0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9520/e267dc5d29490b7d8ea30de5ed3c08f2e6ad84d0/permission.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10446,
1398,
14857,
12,
9827,
16,
871,
4672,
3536,
694,
326,
4132,
612,
12318,
7914,
10027,
18,
225,
10559,
1807,
2621,
3661,
333,
19057,
848,
506,
1399,
18,
5783,
732,
1608,
358,
752,
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,
10446,
1398,
14857,
12,
9827,
16,
871,
4672,
3536,
694,
326,
4132,
612,
12318,
7914,
10027,
18,
225,
10559,
1807,
2621,
3661,
333,
19057,
848,
506,
1399,
18,
5783,
732,
1608,
358,
752,
3... |
aString = self.anEml.asString() | aString = anEml.asString() | def saveModel( self , aModel ): # aModel : a file name (string) or a file object # return -> None # This method can thwor exceptions. # creates ana seve an EML instance self.anEml = eml.Eml() | 44d8ce7a7552e0f9ae426d587cd45c327adfc1ea /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12724/44d8ce7a7552e0f9ae426d587cd45c327adfc1ea/Session.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1923,
1488,
12,
365,
269,
279,
1488,
262,
30,
468,
279,
1488,
294,
279,
585,
508,
261,
1080,
13,
578,
279,
585,
733,
468,
327,
317,
599,
468,
1220,
707,
848,
286,
91,
280,
4798,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1923,
1488,
12,
365,
269,
279,
1488,
262,
30,
468,
279,
1488,
294,
279,
585,
508,
261,
1080,
13,
578,
279,
585,
733,
468,
327,
317,
599,
468,
1220,
707,
848,
286,
91,
280,
4798,
18,
... |
converter = type(self.options[full]) | converter = type(program.get(opt)) | def handleOption(self, sec, opt, value): if sec in self.options: # Mirrors or lists to handle | e3d00bde989431745d3c2d68912693a977e97fa9 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2406/e3d00bde989431745d3c2d68912693a977e97fa9/xmlreport.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
1895,
12,
2890,
16,
1428,
16,
2153,
16,
460,
4672,
309,
1428,
316,
365,
18,
2116,
30,
468,
490,
27026,
578,
6035,
358,
1640,
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,
1640,
1895,
12,
2890,
16,
1428,
16,
2153,
16,
460,
4672,
309,
1428,
316,
365,
18,
2116,
30,
468,
490,
27026,
578,
6035,
358,
1640,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
if not mi.title: | if not mi.title or mi.title == _('Unknown'): | def _run(self): self.key = get_isbndb_key() if not self.key: self.key = None self.fetched_metadata = {} self.failures = {} with self.worker: for id, mi in self.metadata.items(): args = {} if mi.isbn: args['isbn'] = mi.isbn else: if not mi.title: self.failures[id] = \ (str(id), _('Book has neither title nor ISBN')) continue args['title'] = mi.title if mi.authors: args['author'] = mi.authors[0] if self.key: args['isbndb_key'] = self.key results, exceptions = search(**args) if results: fmi = results[0] self.fetched_metadata[id] = fmi if fmi.isbn and self.get_covers: self.worker.jobs.put(fmi.isbn) if (not config['overwrite_author_title_metadata']): fmi.authors = mi.authors fmi.author_sort = mi.author_sort fmi.title = mi.title mi.smart_update(fmi) if mi.isbn and self.get_social_metadata: self.social_metadata_exceptions = get_social_metadata(mi) if mi.rating: mi.rating *= 2 if not self.get_social_metadata: mi.tags = [] else: self.failures[id] = (mi.title, _('No matches found for this book')) self.commit_covers() | 24651ed846e2f526c63421a56d7b591fab913d33 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9125/24651ed846e2f526c63421a56d7b591fab913d33/metadata.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2681,
12,
2890,
4672,
365,
18,
856,
273,
336,
67,
291,
13392,
1966,
67,
856,
1435,
309,
486,
365,
18,
856,
30,
365,
18,
856,
273,
599,
365,
18,
5754,
329,
67,
4165,
273,
2618,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2681,
12,
2890,
4672,
365,
18,
856,
273,
336,
67,
291,
13392,
1966,
67,
856,
1435,
309,
486,
365,
18,
856,
30,
365,
18,
856,
273,
599,
365,
18,
5754,
329,
67,
4165,
273,
2618,
... |
res = self.removeLink(links) if not res['OK']: return res elif len(res['Value']['Failed'].keys()): return S_ERROR("Failed to remove all links") else: res = self.__executeOperation(datasetName,'removeDirectory') return res def __removeFilesFromDataset(self,datasetName,lfns): | res = self.removeLink( links ) if not res['OK']: return res elif len( res['Value']['Failed'].keys() ): return S_ERROR( "Failed to remove all links" ) else: res = self.__executeOperation( datasetName, 'removeDirectory' ) return res def __removeFilesFromDataset( self, datasetName, lfns ): | def __removeDataset(self,datasetName): res = self.__getDirectoryContents(datasetName) if not res['OK']: return res #links = res['Value']['Links'].keys() links = res['Value']['Files'].keys() res = self.removeLink(links) if not res['OK']: return res elif len(res['Value']['Failed'].keys()): return S_ERROR("Failed to remove all links") else: res = self.__executeOperation(datasetName,'removeDirectory') return res | 6280f3782654b93320f684f56a83a6624459bcec /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/6280f3782654b93320f684f56a83a6624459bcec/LcgFileCatalogClient.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
4479,
10656,
12,
2890,
16,
8682,
461,
4672,
400,
273,
365,
16186,
588,
2853,
6323,
12,
8682,
461,
13,
309,
486,
400,
3292,
3141,
3546,
30,
327,
400,
468,
7135,
273,
400,
3292,
62... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4479,
10656,
12,
2890,
16,
8682,
461,
4672,
400,
273,
365,
16186,
588,
2853,
6323,
12,
8682,
461,
13,
309,
486,
400,
3292,
3141,
3546,
30,
327,
400,
468,
7135,
273,
400,
3292,
62... |
Ctrl-E Go to right edge (nospaces off) or end of line (nospaces on). | Ctrl-E Go to right edge (stripspaces off) or end of line (stripspaces on). | def rectangle(win, uly, ulx, lry, lrx): "Draw a rectangle." win.vline(uly+1, ulx, curses.ACS_VLINE, lry - uly - 1) win.hline(uly, ulx+1, curses.ACS_HLINE, lrx - ulx - 1) win.hline(lry, ulx+1, curses.ACS_HLINE, lrx - ulx - 1) win.vline(uly+1, lrx, curses.ACS_VLINE, lry - uly - 1) win.addch(uly, ulx, curses.ACS_ULCORNER) win.addch(uly, lrx, curses.ACS_URCORNER) win.addch(lry, lrx, curses.ACS_LRCORNER) win.addch(lry, ulx, curses.ACS_LLCORNER) | ecb4ce01035f420a5b56798053ec52bfbf5f9123 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/ecb4ce01035f420a5b56798053ec52bfbf5f9123/textpad.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11845,
12,
8082,
16,
7493,
93,
16,
7493,
92,
16,
328,
1176,
16,
12226,
92,
4672,
315,
6493,
279,
11845,
1199,
5657,
18,
90,
1369,
12,
332,
93,
15,
21,
16,
7493,
92,
16,
30436,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11845,
12,
8082,
16,
7493,
93,
16,
7493,
92,
16,
328,
1176,
16,
12226,
92,
4672,
315,
6493,
279,
11845,
1199,
5657,
18,
90,
1369,
12,
332,
93,
15,
21,
16,
7493,
92,
16,
30436,
18,
... |
if opt in notate_opt and \ | if (notate_opt is not None) and (opt in notate_opt) and \ | def takeMessage(self, key, fromcorpus, fromCache=False): '''Move a Message from another corpus to this corpus''' msg = fromcorpus[key] msg.load() # ensure that the substance has been loaded | 01b3ad908c52ad1bd65e2eeb6cbc891cb28ecab0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9857/01b3ad908c52ad1bd65e2eeb6cbc891cb28ecab0/Corpus.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4862,
1079,
12,
2890,
16,
498,
16,
628,
3850,
9861,
16,
628,
1649,
33,
8381,
4672,
9163,
7607,
279,
2350,
628,
4042,
13825,
358,
333,
13825,
26418,
1234,
273,
628,
3850,
9861,
63,
856,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4862,
1079,
12,
2890,
16,
498,
16,
628,
3850,
9861,
16,
628,
1649,
33,
8381,
4672,
9163,
7607,
279,
2350,
628,
4042,
13825,
358,
333,
13825,
26418,
1234,
273,
628,
3850,
9861,
63,
856,
... |
l += " " | tab += " " | def colorize(self,dico,style=None): file = open(self.path + "/" + self.name + ".gfs") out = open(self.path + "/" + self.name + ".gfs.html", 'w') path = "../" * (self.path.count("/") + 3) + "reference/" out.write("<html><head><title>\n" + self.name + ".gfs") | 25721c81e5bffc18effe773473152807a6e53f10 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1949/25721c81e5bffc18effe773473152807a6e53f10/gfs2tex.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
21077,
12,
2890,
16,
72,
10764,
16,
4060,
33,
7036,
4672,
585,
273,
1696,
12,
2890,
18,
803,
397,
4016,
397,
365,
18,
529,
397,
3552,
75,
2556,
7923,
596,
273,
1696,
12,
2890,
18,
80... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
21077,
12,
2890,
16,
72,
10764,
16,
4060,
33,
7036,
4672,
585,
273,
1696,
12,
2890,
18,
803,
397,
4016,
397,
365,
18,
529,
397,
3552,
75,
2556,
7923,
596,
273,
1696,
12,
2890,
18,
80... |
def make_target_footnote(self, target, refs): | def make_target_footnote(self, target, refs, notes): | def apply(self): nodelist = [] for target in self.document.external_targets: name = target.get('name') if not name: print >>sys.stderr, 'no name on target: %r' % target continue refs = self.document.refnames.get(name, []) if not refs: continue footnote = self.make_target_footnote(target, refs) if not self.notes.has_key(target['refuri']): self.notes[target['refuri']] = footnote nodelist.append(footnote) if len(self.document.anonymous_targets) \ == len(self.document.anonymous_refs): for target, ref in zip(self.document.anonymous_targets, self.document.anonymous_refs): if target.hasattr('refuri'): footnote = self.make_target_footnote(target, [ref]) if not self.notes.has_key(target['refuri']): self.notes[target['refuri']] = footnote nodelist.append(footnote) self.startnode.parent.replace(self.startnode, nodelist) # @@@ what about indirect links to external targets? | 6e8a47c861efb09c2916f5c6494703c2497717ae /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1278/6e8a47c861efb09c2916f5c6494703c2497717ae/references.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2230,
12,
2890,
4672,
30068,
273,
5378,
364,
1018,
316,
365,
18,
5457,
18,
9375,
67,
11358,
30,
508,
273,
1018,
18,
588,
2668,
529,
6134,
309,
486,
508,
30,
1172,
1671,
9499,
18,
11241... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2230,
12,
2890,
4672,
30068,
273,
5378,
364,
1018,
316,
365,
18,
5457,
18,
9375,
67,
11358,
30,
508,
273,
1018,
18,
588,
2668,
529,
6134,
309,
486,
508,
30,
1172,
1671,
9499,
18,
11241... |
old_valid_thing = v.valid_thing | old_valid_thing = getattr(v, 'valid_thing', True) | def vote(cls, sub, obj, dir, ip, spam = False, organic = False): from admintools import valid_user, valid_thing, update_score from r2.lib.count import incr_counts | d6d33278837731c6b9eb1a2c4feb114911ecc6c4 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6723/d6d33278837731c6b9eb1a2c4feb114911ecc6c4/vote.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12501,
12,
6429,
16,
720,
16,
1081,
16,
1577,
16,
2359,
16,
24824,
273,
1083,
16,
15501,
335,
273,
1083,
4672,
628,
31003,
474,
8192,
1930,
923,
67,
1355,
16,
923,
67,
4274,
16,
1089,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
12501,
12,
6429,
16,
720,
16,
1081,
16,
1577,
16,
2359,
16,
24824,
273,
1083,
16,
15501,
335,
273,
1083,
4672,
628,
31003,
474,
8192,
1930,
923,
67,
1355,
16,
923,
67,
4274,
16,
1089,
... |
return | return 0 | def handle(self): """Handle a single HTTP request. | 3dc5ebef964a116acb492860df90e1165b19cd39 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/3dc5ebef964a116acb492860df90e1165b19cd39/BaseHTTPServer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
12,
2890,
4672,
3536,
3259,
279,
2202,
2239,
590,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
12,
2890,
4672,
3536,
3259,
279,
2202,
2239,
590,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
self._digest_auth_handler.add_password(self.REALM, self.URL, | self.proxy_digest_handler.add_password(self.REALM, self.URL, | def test_proxy_qop_auth_int_works_or_throws_urlerror(self): self._digest_auth_handler.add_password(self.REALM, self.URL, self.USER, self.PASSWD) FakeProxyHandler.digest_auth_handler.set_qop("auth-int") try: result = self.opener.open(self.URL) except urllib2.URLError: # It's okay if we don't support auth-int, but we certainly # shouldn't receive any kind of exception here other than # a URLError. result = None if result: while result.read(): pass result.close() | 687287dc4c0a16cd88f8d63dab0e06fd15e5b096 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8125/687287dc4c0a16cd88f8d63dab0e06fd15e5b096/test_urllib2_localnet.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
5656,
67,
85,
556,
67,
1944,
67,
474,
67,
18597,
67,
280,
67,
15069,
67,
718,
1636,
12,
2890,
4672,
365,
18,
5656,
67,
10171,
67,
4176,
18,
1289,
67,
3664,
12,
2890,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
5656,
67,
85,
556,
67,
1944,
67,
474,
67,
18597,
67,
280,
67,
15069,
67,
718,
1636,
12,
2890,
4672,
365,
18,
5656,
67,
10171,
67,
4176,
18,
1289,
67,
3664,
12,
2890,
18,
... |
return 10585 | return 85 | def __int__(self): return 10585 | 154b7ad07e775f15a0a556c7ec3ae5ab5762ae1e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8546/154b7ad07e775f15a0a556c7ec3ae5ab5762ae1e/test_struct.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
474,
972,
12,
2890,
4672,
327,
23633,
7140,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
474,
972,
12,
2890,
4672,
327,
23633,
7140,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
totest['empty file'] = [ [ """\ """, latex_head + """\ \\title{} \\author{} \\date{} \\raggedbottom \\begin{document} \\maketitle Document empty; must have contents. \\end{document} """ ], ] totest['tables_of_contents'] = [ | totest['table_of_contents'] = [ | def suite(): s = DocutilsTestSupport.LatexPublishTestSuite() s.generateTests(totest) return s | 13580227732d6ec2c749f8103fb0b54d7fc085d9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8194/13580227732d6ec2c749f8103fb0b54d7fc085d9/test_latex2e.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11371,
13332,
272,
273,
3521,
5471,
4709,
6289,
18,
6607,
338,
6024,
4709,
13587,
1435,
272,
18,
7163,
14650,
12,
3307,
395,
13,
327,
272,
282,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11371,
13332,
272,
273,
3521,
5471,
4709,
6289,
18,
6607,
338,
6024,
4709,
13587,
1435,
272,
18,
7163,
14650,
12,
3307,
395,
13,
327,
272,
282,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
return | break | def library_browse_verify(self, root): # Handle special cases, such as if the path has disappeared. # Typically we will keep on traversing up the hierarchy until # we find items that exist. # # Returns lsinfo so that we don't have to do another # self.client.lsinfo() call for self.VIEW_FILESYSTEM try: lsinfo = self.client.lsinfo(root) except: lsinfo = [] while lsinfo == []: if self.lib_view == self.VIEW_FILESYSTEM: if root == '/': return else: # Back up and try the parent root = '/'.join(root.split('/')[:-1]) or '/' elif self.lib_view == self.VIEW_ARTIST or self.lib_view == self.VIEW_GENRE: if self.lib_level == self.LIB_LEVEL_GENRE: break elif self.lib_level == self.LIB_LEVEL_ARTIST: if self.lib_view == self.VIEW_ARTIST: break elif self.lib_view == self.VIEW_GENRE: if root == self.NOTAG: # It's okay for this to not have items... break elif len(self.return_genres()) == 0: # Back up and try the parent: self.lib_level -= 1 else: break elif self.lib_level == self.LIB_LEVEL_ALBUM: if root == self.NOTAG: # It's okay for these to not have items... break elif len(self.return_artist_items(root)) == 0: # Back up and try the parent self.lib_level -= 1 else: break else: break else: break try: lsinfo = self.client.lsinfo(root) except: lsinfo = [] return lsinfo | 0a101b5a30644d262cc9387ee75fbeaeada01c4b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2312/0a101b5a30644d262cc9387ee75fbeaeada01c4b/main.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5313,
67,
25731,
67,
8705,
12,
2890,
16,
1365,
4672,
468,
5004,
4582,
6088,
16,
4123,
487,
309,
326,
589,
711,
1015,
438,
347,
2258,
18,
468,
30195,
732,
903,
3455,
603,
10704,
310,
73... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5313,
67,
25731,
67,
8705,
12,
2890,
16,
1365,
4672,
468,
5004,
4582,
6088,
16,
4123,
487,
309,
326,
589,
711,
1015,
438,
347,
2258,
18,
468,
30195,
732,
903,
3455,
603,
10704,
310,
73... |
self.log.verbose( 'Executing Job Status for TaskQueueID:', taskQueueID ) | self.log.verbose( 'Executing Job Status for TaskQueue', taskQueueID ) | def _getChildrenReferences(self, proxy, parentReference, taskQueueID ): """ Get reference for all Children """ cmd = [ 'glite-wms-job-status', parentReference ] | 6271afc9c4bbb66e2201ad46655c110521589002 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12864/6271afc9c4bbb66e2201ad46655c110521589002/TaskQueueDirector.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
4212,
8221,
12,
2890,
16,
2889,
16,
982,
2404,
16,
1562,
3183,
734,
262,
30,
3536,
968,
2114,
364,
777,
16992,
3536,
1797,
273,
306,
296,
7043,
1137,
17,
91,
959,
17,
4688,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4212,
8221,
12,
2890,
16,
2889,
16,
982,
2404,
16,
1562,
3183,
734,
262,
30,
3536,
968,
2114,
364,
777,
16992,
3536,
1797,
273,
306,
296,
7043,
1137,
17,
91,
959,
17,
4688,
... |
os.system("cd " + prefix + "/seattle_repy/ && ./install.sh") | os.system("cd " + prefix + "/seattle/ && ./install.sh") | def download_and_install(): """ <Purpose> Downloads and installs Seattle <Arguments> None. <Exceptions> None. <Side Effects> Downloads a .tgz file. Unpacks it and installs Seattle (this modifies the user's crontab). <Returns> None. """ integrationtestlib.log("downloading distro for seattle_install_tester...") os.system("wget --no-check-certificate " + seattle_linux_url) integrationtestlib.log("unpacking...") os.system("tar -xzvf " + prefix + "/seattle_linux.tgz") integrationtestlib.log("installing...") os.system("cd " + prefix + "/seattle_repy/ && ./install.sh") return | 2f51ed12d6d07bfeee19df4de62525ed8b849eac /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7995/2f51ed12d6d07bfeee19df4de62525ed8b849eac/downloadandinstallseattle.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4224,
67,
464,
67,
5425,
13332,
3536,
411,
10262,
4150,
34,
13059,
87,
471,
31011,
3265,
4558,
298,
225,
411,
4628,
34,
599,
18,
225,
411,
11416,
34,
599,
18,
225,
411,
8895,
30755,
87... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4224,
67,
464,
67,
5425,
13332,
3536,
411,
10262,
4150,
34,
13059,
87,
471,
31011,
3265,
4558,
298,
225,
411,
4628,
34,
599,
18,
225,
411,
11416,
34,
599,
18,
225,
411,
8895,
30755,
87... |
else | else: | def __init__(data = None) if data == None: quickfix.DoubleField.__init__(self, 898) else quickfix.DoubleField.__init__(self, 898, 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,
13,
309,
501,
422,
599,
30,
9549,
904,
18,
5265,
974,
16186,
2738,
972,
12,
2890,
16,
1725,
10689,
13,
469,
30,
9549,
904,
18,
5265,
974,
16186,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
892,
273,
599,
13,
309,
501,
422,
599,
30,
9549,
904,
18,
5265,
974,
16186,
2738,
972,
12,
2890,
16,
1725,
10689,
13,
469,
30,
9549,
904,
18,
5265,
974,
16186,
2... |
if element.getAttribute('class') in classes: | if self.allowedCodeClasses(element.getAttribute('class')): | def matcher(element, classes=classes): if element.tagName != 'code': return 0 if not element.hasAttribute('class'): return 0 if element.getAttribute('class') in classes: return 0 return 1 | a316feafc21f5ad476880b87db8be2c26be76741 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/a316feafc21f5ad476880b87db8be2c26be76741/lint.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4546,
12,
2956,
16,
3318,
33,
4701,
4672,
309,
930,
18,
2692,
461,
480,
296,
710,
4278,
327,
374,
309,
486,
930,
18,
5332,
1499,
2668,
1106,
11,
4672,
327,
374,
309,
365,
18,
8151,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4546,
12,
2956,
16,
3318,
33,
4701,
4672,
309,
930,
18,
2692,
461,
480,
296,
710,
4278,
327,
374,
309,
486,
930,
18,
5332,
1499,
2668,
1106,
11,
4672,
327,
374,
309,
365,
18,
8151,
1... |
self.qutemol_path_lineedit.setText("") env.prefs[qutemol_path_prefs_key] = '' | def enable_qutemol(self, enable = True): """ Enables/disables QuteMolX plugin. | 4f794b71bc494e823c1131003f367fccfea65215 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11221/4f794b71bc494e823c1131003f367fccfea65215/UserPrefs.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4237,
67,
85,
322,
351,
355,
12,
2890,
16,
4237,
273,
1053,
4672,
3536,
1374,
1538,
19,
2251,
1538,
2238,
624,
49,
355,
60,
1909,
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,
4237,
67,
85,
322,
351,
355,
12,
2890,
16,
4237,
273,
1053,
4672,
3536,
1374,
1538,
19,
2251,
1538,
2238,
624,
49,
355,
60,
1909,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... | |
print 'dirname:',dirname | def processDir (self, dummy, dirname, items): | 352d2c1ef9bc0cd5133b8f2c47f8949c45ba5da7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12443/352d2c1ef9bc0cd5133b8f2c47f8949c45ba5da7/faq.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
1621,
261,
2890,
16,
9609,
16,
4283,
16,
1516,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
1621,
261,
2890,
16,
9609,
16,
4283,
16,
1516,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... | |
output(u"DEBUG:Unexpected response from wiki server.") | output(u"ERROR: Unexpected response from wiki server.") | def _putPage(self, text, comment=None, watchArticle=False, minorEdit=True, newPage=False, token=None, gettoken=False, sysop=False): """Upload 'text' as new content of Page by filling out the edit form. | ee04ad0585ccd0dc7c8db35cd96f52b70267c66c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4404/ee04ad0585ccd0dc7c8db35cd96f52b70267c66c/wikipedia.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
458,
1964,
12,
2890,
16,
977,
16,
2879,
33,
7036,
16,
4267,
7880,
33,
8381,
16,
8439,
4666,
33,
5510,
16,
394,
1964,
33,
8381,
16,
1147,
33,
7036,
16,
336,
2316,
33,
8381,
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,
458,
1964,
12,
2890,
16,
977,
16,
2879,
33,
7036,
16,
4267,
7880,
33,
8381,
16,
8439,
4666,
33,
5510,
16,
394,
1964,
33,
8381,
16,
1147,
33,
7036,
16,
336,
2316,
33,
8381,
16,
... |
if include_sub: folders = item.Folders folder = folders.GetFirst() while folder is not None: self.EnsureOutlookFieldsForFolder(folder.EntryID, True) folder = folders.GetNext() | def EnsureOutlookFieldsForFolder(self, folder_id, include_sub=False): # Ensure that our fields exist on the Outlook *folder* # Setting properties via our msgstore (via Ext Mapi) gets the props # on the message OK, but Outlook doesn't see it as a "UserProperty". # Using MAPI to set them directly on the folder also has no effect. # So until we know better, use Outlook to hack this in. # Should be called once per folder you are watching/filtering etc # # Oh the tribulations of our property grail # We originally wanted to use the "Integer" Outlook field, # but it seems this property type alone is not expose via the Object # model. So we resort to olPercent, and live with the % sign # (which really is OK!) assert self.outlook is not None, "I need outlook :(" msgstore_folder = self.message_store.GetFolder(folder_id) if msgstore_folder is None: print "Checking a folder for our field failed - "\ "there is no such folder." return folder = msgstore_folder.GetOutlookItem() if self.verbose > 1: print "Checking folder '%s' for our field '%s'" \ % (self.config.field_score_name,folder.Name.encode("mbcs", "replace")) items = folder.Items item = items.GetFirst() if item is not None: ups = item.UserProperties # *sigh* - need to search by int index for i in range(ups.Count): up = ups[i+1] if up.Name == self.config.field_score_name: break else: # for not broken try: # Display format is documented as being the 1-based index in # the combo box in the outlook UI for the given data type. # 1 is the first - "Rounded", which seems fine. format = 1 ups.Add(self.config.field_score_name, win32com.client.constants.olPercent, True, # Add to folder format) item.Save() if self.verbose > 1: print "Created the UserProperty!" except pythoncom.com_error, details: print "Warning: failed to create the Outlook " \ "user-property in folder '%s'" \ % (folder.Name.encode("mbcs", "replace"),) print "", details # else no items in this folder - not much worth doing! if include_sub: # Recurse down the folder list. folders = item.Folders folder = folders.GetFirst() while folder is not None: self.EnsureOutlookFieldsForFolder(folder.EntryID, True) folder = folders.GetNext() | 5b5f4ac4b7e14dfc85d57a888d80a91f3d9134f2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9857/5b5f4ac4b7e14dfc85d57a888d80a91f3d9134f2/manager.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7693,
1182,
7330,
2314,
1290,
3899,
12,
2890,
16,
3009,
67,
350,
16,
2341,
67,
1717,
33,
8381,
4672,
468,
7693,
716,
3134,
1466,
1005,
603,
326,
2976,
7330,
380,
5609,
14,
468,
13274,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7693,
1182,
7330,
2314,
1290,
3899,
12,
2890,
16,
3009,
67,
350,
16,
2341,
67,
1717,
33,
8381,
4672,
468,
7693,
716,
3134,
1466,
1005,
603,
326,
2976,
7330,
380,
5609,
14,
468,
13274,
... | |
"([^:]+): *(.*)") | "(?:[A-Z]+:)? *([^:]+): *(.*)") | def __init__(self, config_file="/etc/box/bbackupd.conf", log_file="/var/log/syslog", email_to=None, email_from="report@boxbackup", rotate=False, verbose=False, stats=False, sort=False, debug=False): # Config options self.config_file = config_file self.log_file = log_file self.email_to = email_to self.email_from = email_from self.rotate_log_file = rotate self.verbose_report = verbose self.usage_stats = stats self.sort_files = sort self.debug = debug | 4ee33db288e02576aa1a02214dabe6f26ae5794b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4252/4ee33db288e02576aa1a02214dabe6f26ae5794b/bbreporter.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
642,
67,
768,
1546,
19,
14175,
19,
2147,
19,
70,
823,
5533,
18,
3923,
3113,
613,
67,
768,
1546,
19,
1401,
19,
1330,
19,
9499,
1330,
3113,
2699,
67,
869... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
642,
67,
768,
1546,
19,
14175,
19,
2147,
19,
70,
823,
5533,
18,
3923,
3113,
613,
67,
768,
1546,
19,
1401,
19,
1330,
19,
9499,
1330,
3113,
2699,
67,
869... |
if len(plugin) == 3: if self.run == 1 and self.type == self.DOWNLOAD: if plugin[0] not in self.installedplugins: self.installedplugins.append(plugin[0]) else: if plugin[0] not in self.installedplugins: plugin.append(plugin[0][15:]) self.pluginlist.append(plugin) | if len(plugin) >= 2: if not plugin[0].endswith('-dev') and not plugin[0].endswith('-dbg'): if self.run == 1 and self.type == self.DOWNLOAD: if plugin[0] not in self.installedplugins: self.installedplugins.append(plugin[0]) else: if plugin[0] not in self.installedplugins: if len(plugin) == 2: plugin.append('') plugin.append(plugin[0][15:]) self.pluginlist.append(plugin) | def dataAvail(self, str): #prepend any remaining data from the previous call str = self.remainingdata + str #split in lines lines = str.split('\n') #'str' should end with '\n', so when splitting, the last line should be empty. If this is not the case, we received an incomplete line if len(lines[-1]): #remember this data for next time self.remainingdata = lines[-1] lines = lines[0:-1] else: self.remainingdata = "" | 22a2d6d21137547eb328eb49875662fb6aad6d92 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6652/22a2d6d21137547eb328eb49875662fb6aad6d92/PluginBrowser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
501,
3769,
671,
12,
2890,
16,
609,
4672,
468,
23100,
1281,
4463,
501,
628,
326,
2416,
745,
609,
273,
365,
18,
17956,
892,
397,
609,
468,
4939,
316,
2362,
2362,
273,
609,
18,
4939,
2668... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
501,
3769,
671,
12,
2890,
16,
609,
4672,
468,
23100,
1281,
4463,
501,
628,
326,
2416,
745,
609,
273,
365,
18,
17956,
892,
397,
609,
468,
4939,
316,
2362,
2362,
273,
609,
18,
4939,
2668... |
""" self._blast.reference = self._value | Save this to put on each blast record object """ self._header.reference = self._value | def _end_BlastOutput_reference(self): """a reference to the article describing the algorithm """ self._blast.reference = self._value | 222c25b5ffb6f82620be0e71c5d11e486994dbfb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7167/222c25b5ffb6f82620be0e71c5d11e486994dbfb/NCBIXML.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
409,
67,
38,
2722,
1447,
67,
6180,
12,
2890,
4672,
3536,
69,
2114,
358,
326,
7559,
16868,
326,
4886,
3536,
365,
6315,
30901,
18,
6180,
273,
365,
6315,
1132,
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,
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,
409,
67,
38,
2722,
1447,
67,
6180,
12,
2890,
4672,
3536,
69,
2114,
358,
326,
7559,
16868,
326,
4886,
3536,
365,
6315,
30901,
18,
6180,
273,
365,
6315,
1132,
2,
-100,
-100,
-100,
-... |
order_obj=self.pool.get('pos.order') record_id=context.get('record_id') | order_obj = self.pool.get('pos.order') active_ids = context.get('active_ids') | def default_get(self, cr, uid, fields, context=None): """ To get default values for the object. @param self: The object pointer. @param cr: A database cursor @param uid: ID of the user currently logged in @param fields: List of fields for which we want default values @param context: A standard dictionary @return: A dictionary which of fields with values. """ | 1ec225ce8c6444f7d03770574c22a04544d34f5f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/1ec225ce8c6444f7d03770574c22a04544d34f5f/pos_return.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
805,
67,
588,
12,
2890,
16,
4422,
16,
4555,
16,
1466,
16,
819,
33,
7036,
4672,
3536,
2974,
336,
805,
924,
364,
326,
733,
18,
225,
632,
891,
365,
30,
1021,
733,
4407,
18,
632,
891,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
805,
67,
588,
12,
2890,
16,
4422,
16,
4555,
16,
1466,
16,
819,
33,
7036,
4672,
3536,
2974,
336,
805,
924,
364,
326,
733,
18,
225,
632,
891,
365,
30,
1021,
733,
4407,
18,
632,
891,
... |
from glue.ligolw import table | def __init__(self, cache, coireVetoMissedCache, opts, deltaTime=20): """ Initialize this class and sets up all the cache files. @param cache: the cache of all files @param coireVetoMissedCache: the cache that contains the COIRE-files of the missed injections @param opts: The 'opts' from the main code @param deltaTime: The time window that is used in the time-series plots (in seconds) """ # must do this within here for unknown reason; error instead from glue.ligolw import table rcParams.update({'text.usetex': False}) | 115859e1e4ac66dbab60f88a183f2a4596551391 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5758/115859e1e4ac66dbab60f88a183f2a4596551391/followup_missed.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1247,
16,
1825,
577,
58,
11453,
11729,
730,
1649,
16,
1500,
16,
3622,
950,
33,
3462,
4672,
3536,
9190,
333,
667,
471,
1678,
731,
777,
326,
1247,
1390,
18... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1247,
16,
1825,
577,
58,
11453,
11729,
730,
1649,
16,
1500,
16,
3622,
950,
33,
3462,
4672,
3536,
9190,
333,
667,
471,
1678,
731,
777,
326,
1247,
1390,
18... | |
pl=Category(site, 'Software') print pl.catlist(recurse = False) print pl.subcategories(recurse = False) print pl.articles(recurse = False) | cat = Category(site, 'Category:Software') print cat.catlist(recurse = False) print cat.subcategories(recurse = False) print cat.articles(recurse = False) | def test(): site = wikipedia.getSite() pl=Category(site, 'Software') print pl.catlist(recurse = False) print pl.subcategories(recurse = False) print pl.articles(recurse = False) | f583280497b5eec15556d183bc5d875631f9520e /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4404/f583280497b5eec15556d183bc5d875631f9520e/catlib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
13332,
2834,
273,
21137,
18,
588,
4956,
1435,
225,
6573,
273,
9856,
12,
4256,
16,
296,
4457,
30,
21742,
6134,
225,
1172,
6573,
18,
2574,
1098,
12,
29362,
273,
1083,
13,
225,
1172,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
13332,
2834,
273,
21137,
18,
588,
4956,
1435,
225,
6573,
273,
9856,
12,
4256,
16,
296,
4457,
30,
21742,
6134,
225,
1172,
6573,
18,
2574,
1098,
12,
29362,
273,
1083,
13,
225,
1172,
... |
globalVars.log.warning(repr(attrs)) | def getXMLFieldSpeech(self,attrs,fieldType,extraDetail=False,reason=None): accRole=attrs['iaccessible::role'] accRole=int(accRole) if accRole.isdigit() else accRole role=IAccessibleHandler.IAccessibleRolesToNVDARoles.get(accRole,controlTypes.ROLE_UNKNOWN) if attrs.get('iaccessible2::attribute_tag',"").lower()=="blockquote": role=controlTypes.ROLE_BLOCKQUOTE states=set(IAccessibleHandler.IAccessibleStatesToNVDAStates[x] for x in [1<<y for y in xrange(32)] if int(attrs.get('iaccessible::state_%s'%x,0)) and x in IAccessibleHandler.IAccessibleStatesToNVDAStates) states|=set(IAccessibleHandler.IAccessible2StatesToNVDAStates[x] for x in [1<<y for y in xrange(32)] if int(attrs.get('iaccessible2::state_%s'%x,0)) and x in IAccessibleHandler.IAccessible2StatesToNVDAStates) defaultAction=attrs.get('defaultaction','') if defaultAction=="click": states.add(controlTypes.STATE_CLICKABLE) if role==controlTypes.ROLE_LINK and controlTypes.STATE_LINKED not in states: # This is a named link destination, not a link which can be activated. The user doesn't care about these. role=controlTypes.ROLE_TEXTFRAME globalVars.log.warning(repr(attrs)) level=attrs.get('iaccessible2::attribute_level',"") newAttrs=attrs.copy() newAttrs['role']=role newAttrs['states']=states if level is not "" and level is not None: newAttrs['level']=level return super(Gecko_ia2_TextInfo,self).getXMLFieldSpeech(newAttrs,fieldType,extraDetail=extraDetail,reason=reason) | 394e1a722cea200562146c05dced0a64c6641720 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9340/394e1a722cea200562146c05dced0a64c6641720/gecko_ia2.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
4201,
974,
22334,
12,
2890,
16,
7039,
16,
1518,
559,
16,
7763,
6109,
33,
8381,
16,
10579,
33,
7036,
4672,
4078,
2996,
33,
7039,
3292,
1155,
850,
1523,
2866,
4615,
3546,
4078,
2996,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4201,
974,
22334,
12,
2890,
16,
7039,
16,
1518,
559,
16,
7763,
6109,
33,
8381,
16,
10579,
33,
7036,
4672,
4078,
2996,
33,
7039,
3292,
1155,
850,
1523,
2866,
4615,
3546,
4078,
2996,
... | |
class AttributedList( list ) : def __init__( self, accepted_type=None ) : super( AttributedList, self ).__init__() | class AttributedList(list): def __init__(self, accepted_type=None): super(AttributedList, self).__init__() | def MakeAttributeName( value ) : assert value and type( value ) is StringType value = value.replace( ' ', '' ) return value | 13865299ef9bc077be9a5eaa4326b7a30307d828 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3330/13865299ef9bc077be9a5eaa4326b7a30307d828/PropertySets.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4344,
19240,
12,
460,
262,
294,
1815,
460,
471,
618,
12,
460,
262,
353,
31570,
460,
273,
460,
18,
2079,
12,
296,
2265,
875,
262,
327,
460,
225,
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,
0,
0,
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,
4344,
19240,
12,
460,
262,
294,
1815,
460,
471,
618,
12,
460,
262,
353,
31570,
460,
273,
460,
18,
2079,
12,
296,
2265,
875,
262,
327,
460,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
... |
print >>sys.stderr, """\ the output should be usable as-is.""" print >>sys.stderr, ("""\ * "replace"; look for "?" in the output. "--output-encoding-error-handler" is currently set to "%s". Exiting due to error. Use "--traceback" to diagnose. If the advice above doesn't eliminate the error, please report it to <docutils-users@lists.sf.net>. Include "--traceback" output, Docutils version (%s), Python version (%s), your OS type & version, and the command line used.""" % (self.settings.output_encoding_error_handler, __version__, sys.version.split()[0])) | sys.stderr.write(' the output should be usable as-is.\n') sys.stderr.write( '* "replace"; look for "?" in the output.\n' '\n' '"--output-encoding-error-handler" is currently set to "%s".\n' '\n' 'Exiting due to error. Use "--traceback" to diagnose.\n' 'If the advice above doesn\'t eliminate the error,\n' 'please report it to <docutils-users@lists.sf.net>.\n' 'Include "--traceback" output, Docutils version (%s),\n' 'Python version (%s), your OS type & version, and the\n' 'command line used.\n' % (self.settings.output_encoding_error_handler, __version__, sys.version.split()[0])) | def report_UnicodeError(self, error): print >>sys.stderr, '%s: %s' % (error.__class__.__name__, error) | e21a74ec155459aef1d0abcb5b2911319d648bcf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5620/e21a74ec155459aef1d0abcb5b2911319d648bcf/core.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2605,
67,
16532,
668,
12,
2890,
16,
555,
4672,
1172,
1671,
9499,
18,
11241,
16,
1995,
87,
30,
738,
87,
11,
738,
261,
1636,
16186,
1106,
972,
16186,
529,
972,
16,
555,
13,
2,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2605,
67,
16532,
668,
12,
2890,
16,
555,
4672,
1172,
1671,
9499,
18,
11241,
16,
1995,
87,
30,
738,
87,
11,
738,
261,
1636,
16186,
1106,
972,
16186,
529,
972,
16,
555,
13,
2,
-100,
-1... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.