rem stringlengths 1 226k | add stringlengths 0 227k | context stringlengths 6 326k | meta stringlengths 143 403 | input_ids listlengths 256 256 | attention_mask listlengths 256 256 | labels listlengths 128 128 |
|---|---|---|---|---|---|---|
''' Print up an index of the available instances | ''' Print up an index of the available trackers | def index(self): ''' Print up an index of the available instances ''' self.send_response(200) self.send_header('Content-Type', 'text/html') self.end_headers() w = self.wfile.write w(_('<html><head><title>Roundup instances index</title></head>\n')) w(_('<body><h1>Roundup instances index</h1><ol>\n')) for instance in self.TRACKER_HOMES.keys(): w(_('<li><a href="%(instance_url)s/index">%(instance_name)s</a>\n')%{ 'instance_url': urllib.quote(instance), 'instance_name': cgi.escape(instance)}) w(_('</ol></body></html>')) | e18361038688011601501a65fdc81b5cb7e88e34 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/e18361038688011601501a65fdc81b5cb7e88e34/roundup_server.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
770,
12,
2890,
4672,
9163,
3038,
731,
392,
770,
434,
326,
2319,
3298,
414,
9163,
365,
18,
4661,
67,
2740,
12,
6976,
13,
365,
18,
4661,
67,
3374,
2668,
1350,
17,
559,
2187,
296,
955,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
770,
12,
2890,
4672,
9163,
3038,
731,
392,
770,
434,
326,
2319,
3298,
414,
9163,
365,
18,
4661,
67,
2740,
12,
6976,
13,
365,
18,
4661,
67,
3374,
2668,
1350,
17,
559,
2187,
296,
955,
... |
self.assertRaises(OverflowError, '%c'.__mod__, 0x1234) | self.assertRaises(OverflowError, '%c'.__mod__, 0x12341234) | def test_formatting(self): string_tests.MixinStrUnicodeUserStringTest.test_formatting(self) self.assertRaises(OverflowError, '%c'.__mod__, 0x1234) | bfc13eccd79b8651edd9f291c1520ceccdbde215 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8125/bfc13eccd79b8651edd9f291c1520ceccdbde215/test_str.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
2139,
1787,
12,
2890,
4672,
533,
67,
16341,
18,
14439,
1585,
16532,
1299,
780,
4709,
18,
3813,
67,
2139,
1787,
12,
2890,
13,
365,
18,
11231,
12649,
6141,
12,
15526,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
2139,
1787,
12,
2890,
4672,
533,
67,
16341,
18,
14439,
1585,
16532,
1299,
780,
4709,
18,
3813,
67,
2139,
1787,
12,
2890,
13,
365,
18,
11231,
12649,
6141,
12,
15526,
668,
16,
... |
sage: K.hilbert_class_polynomial() | sage: K.hilbert_class_field_defining_polynomial() | def hilbert_class_polynomial(self): r""" Returns a polynomial over $\QQ$ whose roots generate the Hilbert class field of this quadratic field. | 2a259e3659e2fbb631c618303984449cc23e8057 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/2a259e3659e2fbb631c618303984449cc23e8057/number_field.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
366,
330,
25925,
67,
1106,
67,
3915,
13602,
12,
2890,
4672,
436,
8395,
2860,
279,
16991,
1879,
271,
64,
53,
53,
8,
8272,
12876,
2103,
326,
670,
330,
25925,
667,
652,
434,
333,
26146,
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,
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,
366,
330,
25925,
67,
1106,
67,
3915,
13602,
12,
2890,
4672,
436,
8395,
2860,
279,
16991,
1879,
271,
64,
53,
53,
8,
8272,
12876,
2103,
326,
670,
330,
25925,
667,
652,
434,
333,
26146,
6... |
for prop in \ self.propertyNames: | for prop in self.propertyNames: | def __str__(self): l = [] for prop in \ self.propertyNames: | 8fe460093ad5673927f98753e514878f4b1cf006 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/578/8fe460093ad5673927f98753e514878f4b1cf006/Atom.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
701,
972,
12,
2890,
4672,
328,
273,
5378,
364,
2270,
316,
521,
365,
18,
4468,
1557,
30,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
701,
972,
12,
2890,
4672,
328,
273,
5378,
364,
2270,
316,
521,
365,
18,
4468,
1557,
30,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
shutil.rmtree(os.path.join(self.workdir, 'os-unified'), ignore_errors=True) shutil.move('%s-disc1' % self.topdir, os.path.join(self.workdir, 'os-unified')) | if not self.config.get('default', 'arch') == 'source': shutil.rmtree(os.path.join(self.workdir, 'os-unified'), ignore_errors=True) shutil.move('%s-disc1' % self.topdir, os.path.join(self.workdir, 'os-unified')) | def doCreateIsos(self, split=True): """Create isos of the tree, optionally splitting the tree for split media.""" | aa358c15177650addd547369b409d82d719f19ea /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8489/aa358c15177650addd547369b409d82d719f19ea/pungi.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
1684,
2520,
538,
12,
2890,
16,
1416,
33,
5510,
4672,
3536,
1684,
353,
538,
434,
326,
2151,
16,
8771,
20347,
326,
2151,
364,
1416,
3539,
12123,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
1684,
2520,
538,
12,
2890,
16,
1416,
33,
5510,
4672,
3536,
1684,
353,
538,
434,
326,
2151,
16,
8771,
20347,
326,
2151,
364,
1416,
3539,
12123,
2,
-100,
-100,
-100,
-100,
-100,
-100,... |
global _task_params _task_params["task_name"] = os.path.basename(sys.argv[0]) | def main(): """Main function that analyzes command line input and calls whatever is appropriate. """ ## parse command line: # set user-defined options: global _task_params # Small trick to let bibtask.authenticate framework to work for non tasks. _task_params["task_name"] = os.path.basename(sys.argv[0]) options = {'user' : '', 'reset' : 0, 'compile' : 0, 'add' : 0, 'demo' : 0} try: opts, args = getopt.getopt(sys.argv[1:], "hVu:racD", ["help", "version", "user=", "reset", "add", "compile", "demo"]) except getopt.GetoptError, err: usage(1, err) try: for opt in opts: if opt[0] in ("-h", "--help"): usage(0) elif opt[0] in ("-V", "--version"): print __revision__ sys.exit(0) elif opt[0] in ("-u", "--user"): options["user"] = opt[1] elif opt[0] in ("-r", "--reset"): options["reset"] = 1 elif opt[0] in ("-a", "--add"): options["add"] = 1 elif opt[0] in ("-c", "--compile"): options["compile"] = 1 elif opt[0] in ("-D", "--demo"): options["demo"] = 1 else: usage(1) if options['add'] or options['reset'] or options['compile']: if acca.acc_get_action_id('cfgwebaccess'): # Action exists hence authentication works :-) options['user'] = authenticate(options['user'], authorization_msg="WebAccess Administration", authorization_action="cfgwebaccess") if options['reset'] and options['demo']: acca.acc_reset_default_settings([supportemail], DEF_DEMO_USER_ROLES, DEF_DEMO_ROLES, DEF_DEMO_AUTHS) print "Reset default Demo Site settings." elif options['reset']: acca.acc_reset_default_settings([supportemail]) print "Reset default settings." elif options['add'] and options['demo']: acca.acc_add_default_settings([supportemail], DEF_DEMO_USER_ROLES, DEF_DEMO_ROLES, DEF_DEMO_AUTHS) print "Added default Demo Site settings." elif options['add']: acca.acc_add_default_settings([supportemail]) print "Added default settings." if options['compile']: repair_role_definitions() print "Compiled firewall like role definitions." else: usage(1, "You must specify at least one command") except StandardError, e: usage(e) return | 3ca17b519f4fe7da5456b5836f7a90a2f2c16e2f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1931/3ca17b519f4fe7da5456b5836f7a90a2f2c16e2f/webaccessadmin_lib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
3536,
6376,
445,
716,
392,
4647,
281,
1296,
980,
810,
471,
4097,
15098,
353,
5505,
18,
3536,
225,
7541,
1109,
1296,
980,
30,
468,
444,
729,
17,
2178,
702,
30,
2552,
389,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
3536,
6376,
445,
716,
392,
4647,
281,
1296,
980,
810,
471,
4097,
15098,
353,
5505,
18,
3536,
225,
7541,
1109,
1296,
980,
30,
468,
444,
729,
17,
2178,
702,
30,
2552,
389,
4... | |
print('usage: %s order.html input_file_1 input_file_2 ... ' | print('usage: %s order.html input_source_dir_1 input_source_dir_2 ... ' | def main(argv): if len(argv) < 3: print('usage: %s order.html input_file_1 input_file_2 ... ' 'output_file' % argv[0]) return 1 output_file_name = argv.pop() full_paths = {} for full_path in argv[2:]: file_name = os.path.basename(full_path) if file_name.endswith('.js'): full_paths[file_name] = full_path extractor = OrderedJSFilesExtractor(argv[1]) output = StringIO() for input_file_name in extractor.ordered_js_files: if not input_file_name in full_paths: print('A full path to %s isn\'t specified in command line. ' 'Probably, you have an obsolete script entry in %s' % (input_file_name, argv[1])) output.write('/* %s */\n\n' % input_file_name) input_file = open(full_paths[input_file_name], 'r') output.write(input_file.read()) output.write('\n') input_file.close() output_file = open(output_file_name, 'w') output_file.write(output.getvalue()) output_file.close() output.close() # Touch output file directory to make sure that Xcode will copy # modified resource files. if sys.platform == 'darwin': output_dir_name = os.path.dirname(output_file_name) os.utime(output_dir_name, None) | 0e20df92d79799ae285040cb0cf1d5fb898e9db2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/0e20df92d79799ae285040cb0cf1d5fb898e9db2/concatenate_js_files.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
12,
19485,
4672,
225,
309,
562,
12,
19485,
13,
411,
890,
30,
1172,
2668,
9167,
30,
738,
87,
1353,
18,
2620,
810,
67,
3168,
67,
1214,
67,
21,
810,
67,
3168,
67,
1214,
67,
22,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
12,
19485,
4672,
225,
309,
562,
12,
19485,
13,
411,
890,
30,
1172,
2668,
9167,
30,
738,
87,
1353,
18,
2620,
810,
67,
3168,
67,
1214,
67,
21,
810,
67,
3168,
67,
1214,
67,
22,
... |
files.append(('.', [('bin/import_xml.rng')])) | files.append(('.', [(opj('bin', 'import_xml.rng'))])) | def data_files(): '''Build list of data files to be installed''' files = [] if os.name == 'nt': os.chdir('bin') for (dp,dn,names) in os.walk('addons'): files.append((dp, map(lambda x: opj('bin', dp, x), names))) for (dp,dn,names) in os.walk('i18n'): files.append((dp, map(lambda x: opj('bin', dp, x), names))) os.chdir('..') for (dp,dn,names) in os.walk('doc'): files.append((dp, map(lambda x: opj(dp, x), names))) files.append(('.', [('bin/import_xml.rng')])) else: man_directory = opj('share', 'man') files.append((opj(man_directory, 'man1'), ['man/openerp-server.1'])) files.append((opj(man_directory, 'man5'), ['man/openerp_serverrc.5'])) doc_directory = opj('share', 'doc', 'openerp-server-%s' % version) files.append((doc_directory, [f for f in glob.glob('doc/*') if os.path.isfile(f)])) files.append((opj(doc_directory, 'migrate', '3.3.0-3.4.0'), [f for f in glob.glob('doc/migrate/3.3.0-3.4.0/*') if os.path.isfile(f)])) files.append((opj(doc_directory, 'migrate', '3.4.0-4.0.0'), [f for f in glob.glob('doc/migrate/3.4.0-4.0.0/*') if os.path.isfile(f)])) openerp_site_packages = opj('lib', 'python%s' % py_short_version, 'site-packages', 'openerp-server') files.append((opj(openerp_site_packages, 'i18n'), glob.glob('bin/i18n/*'))) files.append((opj(openerp_site_packages, 'addons', 'custom'), glob.glob('bin/addons/custom/*xml') + glob.glob('bin/addons/custom/*rml') + glob.glob('bin/addons/custom/*xsl'))) files.append((openerp_site_packages, [('bin/import_xml.rng')])) for addon in find_addons(): add_path = addon.replace('.', os.path.sep).replace('openerp-server', 'bin', 1) addon_path = opj('lib', 'python%s' % py_short_version, 'site-packages', add_path.replace('bin', 'openerp-server', 1)) pathfiles = [ ( addon_path, glob.glob(opj(add_path, '*xml')) + glob.glob(opj(add_path, '*csv')) + glob.glob(opj(add_path, '*sql')) ), ( opj(addon_path, 'data'), glob.glob(opj(add_path, 'data', '*xml')) ), ( opj(addon_path, 'report'), glob.glob(opj(add_path, 'report', '*xml')) + glob.glob(opj(add_path, 'report', '*rml')) + glob.glob(opj(add_path, 'report', '*sxw')) + glob.glob(opj(add_path, 'report', '*xsl')) ), ( opj(addon_path, 'security'), glob.glob(opj(add_path, 'security', '*csv')) + glob.glob(opj(add_path, 'security', '*xml')) ), ( opj(addon_path, 'rng'), glob.glob(opj(add_path, 'rng', '*rng')) ) ] files.extend(pathfiles) return files | 114a2bfad8f7bffe707350dbdb33d347f9acb87b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12853/114a2bfad8f7bffe707350dbdb33d347f9acb87b/setup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
501,
67,
2354,
13332,
9163,
3116,
666,
434,
501,
1390,
358,
506,
5876,
26418,
1390,
273,
5378,
309,
1140,
18,
529,
422,
296,
496,
4278,
1140,
18,
343,
1214,
2668,
4757,
6134,
364,
261,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
501,
67,
2354,
13332,
9163,
3116,
666,
434,
501,
1390,
358,
506,
5876,
26418,
1390,
273,
5378,
309,
1140,
18,
529,
422,
296,
496,
4278,
1140,
18,
343,
1214,
2668,
4757,
6134,
364,
261,
... |
"""__exitCurrent(self) Exit the current state""" | """ Exit the current state """ | def __exitCurrent(self, argList): """__exitCurrent(self) Exit the current state""" assert(self.__internalStateInFlux) assert(ClassicFSM.notify.debug("[%s]: exiting %s" % (self.__name, self.__currentState.getName()))) self.__currentState.exit(argList) # Only send the state change event if we are inspecting it # If this event turns out to be generally useful, we can # turn it on all the time, but for now nobody else is using it if self.inspecting: messenger.send(self.getName() + '_' + self.__currentState.getName() + '_exited') self.__currentState = None | 32374b1b273c5130841307c0da81e0e6e1ce336c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8543/32374b1b273c5130841307c0da81e0e6e1ce336c/ClassicFSM.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
8593,
3935,
12,
2890,
16,
1501,
682,
4672,
3536,
9500,
326,
783,
919,
3536,
1815,
12,
2890,
16186,
7236,
1119,
382,
2340,
2616,
13,
1815,
12,
797,
335,
4931,
49,
18,
12336,
18,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
8593,
3935,
12,
2890,
16,
1501,
682,
4672,
3536,
9500,
326,
783,
919,
3536,
1815,
12,
2890,
16186,
7236,
1119,
382,
2340,
2616,
13,
1815,
12,
797,
335,
4931,
49,
18,
12336,
18,
4... |
return self._c_arch_flags() | return [] | def get_flags_arch(self): return self._c_arch_flags() | 435c7262592e94c8519f4288a19035de054758fd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14925/435c7262592e94c8519f4288a19035de054758fd/gnu.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
7133,
67,
991,
12,
2890,
4672,
327,
365,
6315,
71,
67,
991,
67,
7133,
1435,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
7133,
67,
991,
12,
2890,
4672,
327,
365,
6315,
71,
67,
991,
67,
7133,
1435,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
"\\\")'") | "\\\")\"") | def byte_compile(): os.system(options['emacs'] + " --batch" + " --eval \"(byte-compile-file \\\"" + options['dest'] + "\\\")'") | 7ee3296d567a56ea61f09552fa7c755538c1345f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12942/7ee3296d567a56ea61f09552fa7c755538c1345f/compile.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1160,
67,
11100,
13332,
1140,
18,
4299,
12,
2116,
3292,
351,
28965,
3546,
397,
315,
1493,
5303,
6,
397,
315,
1493,
8622,
1239,
12,
7229,
17,
11100,
17,
768,
521,
1695,
3660,
397,
702,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1160,
67,
11100,
13332,
1140,
18,
4299,
12,
2116,
3292,
351,
28965,
3546,
397,
315,
1493,
5303,
6,
397,
315,
1493,
8622,
1239,
12,
7229,
17,
11100,
17,
768,
521,
1695,
3660,
397,
702,
... |
'.', 'HDF5 files (*.h5 *.hdf5)', f+'.h5' | './'+f+'.h5', 'HDF5 files (*.h5 *.hdf5)' | def importSpecFile(self, force=False): f = '%s'% QtGui.QFileDialog.getOpenFileName(self, 'Open File', '.', "Spec datafiles (*.dat *.mca);;All files (*)") if f: h5_filename = str( QtGui.QFileDialog.getSaveFileName( self, 'Save HDF5 File', '.', 'HDF5 files (*.h5 *.hdf5)', f+'.h5' ) ) if h5_filename: self.statusBar.showMessage('Converting spec data...') QtGui.qApp.processEvents() from xpaxs.io.spec import convert_to_phynx f = convert_to_phynx(f, h5_filename=h5_filename, force=True) f.close() del f self.statusBar.clearMessage() self.openFile(h5_filename) | d906b02b09dd98f7f7567d705d18bcdd5d8602b3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/14949/d906b02b09dd98f7f7567d705d18bcdd5d8602b3/mainwindow.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1930,
1990,
812,
12,
2890,
16,
2944,
33,
8381,
4672,
284,
273,
1995,
87,
11,
9,
23425,
18,
53,
812,
6353,
18,
588,
3678,
4771,
12,
2890,
16,
296,
3678,
1387,
2187,
2611,
16,
315,
199... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1930,
1990,
812,
12,
2890,
16,
2944,
33,
8381,
4672,
284,
273,
1995,
87,
11,
9,
23425,
18,
53,
812,
6353,
18,
588,
3678,
4771,
12,
2890,
16,
296,
3678,
1387,
2187,
2611,
16,
315,
199... |
_confifgure_galaxy_env() | _configure_galaxy_env() | def _configure_environment(): _configure_ec2_autorun() _clean_rabbitmq_env() _configure_sge() _confifgure_galaxy_env() _configure_nfs() _configure_bash() | cc8ad7b01125bbdbb9c0d09835e97fe06920ac73 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11876/cc8ad7b01125bbdbb9c0d09835e97fe06920ac73/mi_fabfile.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
14895,
67,
10274,
13332,
389,
14895,
67,
557,
22,
67,
69,
3408,
318,
1435,
389,
6200,
67,
20727,
3682,
11636,
67,
3074,
1435,
389,
14895,
67,
87,
908,
1435,
389,
14895,
67,
25030,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
389,
14895,
67,
10274,
13332,
389,
14895,
67,
557,
22,
67,
69,
3408,
318,
1435,
389,
6200,
67,
20727,
3682,
11636,
67,
3074,
1435,
389,
14895,
67,
87,
908,
1435,
389,
14895,
67,
25030,
... |
self.check_sizeof(1, size(h + 'l')) self.check_sizeof(abs, size(h + '3P')) | check(1, size(h + 'l')) check(100, size(h + 'l')) check(iter('abc'), size(h + 'lP')) import re check(re.finditer('',''), size(h + '2P')) samples = [[], [1,2,3], ['1', '2', '3']] for sample in samples: check(sample, size(vh + 'PP') + len(sample)*self.P) check(iter([]), size(h + 'lP')) check(reversed([]), size(h + 'lP')) check(0L, size(vh + 'H')) check(1L, size(vh + 'H')) check(-1L, size(vh + 'H')) check(32768L, size(vh + 'H') + self.H) check(32768L*32768L-1, size(vh + 'H') + self.H) check(32768L*32768L, size(vh + 'H') + 2*self.H) | def get_gen(): yield 1 | 2a9c012d274c588c51bc5660baff9bd0676bd399 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3187/2a9c012d274c588c51bc5660baff9bd0676bd399/test_sys.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
4507,
13332,
2824,
404,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
4507,
13332,
2824,
404,
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... |
close() | def plot_systematics(filelist,cp,dir,epoch,dag,opts): flist = [] for file in filelist: if os.path.split(file)[-1][:8] == "out-bin-": flist.append(file) freq = [] freqfile = cp.get('noisecomp','freq-file') for line in open(freqfile,'r').readlines(): freq.append(float(line.strip())) hfr1 = {} hfi1 = {} htr1 = {} hti1 = {} htrfr = {} htifi = {} htrfi = {} htifr = {} Ai = {} Ar = {} N = {} amp = {} amphf = {} Nt = 0 for f in freq: hfr1[f] = 0.0 hfi1[f] = 0.0 htr1[f] = 0.0 hti1[f] = 0.0 htrfr[f] = 0 htifi[f] = 0 htrfi[f] = 0 htifr[f] = 0 Ai[f] = 0.0 Ar[f] = 0.0 N[f] = 0.0 amp[f] = 0.0 amphf[f] = 0.0 freqcnt = 0; print "\tfirst pass through systematics files..." for file in flist: try: input = open(file,'r') except: print "WARNING: file " + file + " doesn't exist" continue for line in input.readlines(): tmp = line.split() if len(tmp) == 1: Nt += 1 continue ampt = float(tmp[0])**2 + float(tmp[1])**2 ampf = float(tmp[2])**2 + float(tmp[3])**2 N[freq[freqcnt]] += 1.0 amp[freq[freqcnt]] += ampt/2.0 + ampf/2.0 amphf[freq[freqcnt]] += ampf htr1[freq[freqcnt]] += float(tmp[0]) hti1[freq[freqcnt]] += float(tmp[1]) hfr1[freq[freqcnt]] += float(tmp[2]) hfi1[freq[freqcnt]] += float(tmp[3]) htrfr[freq[freqcnt]] += float(tmp[0])*float(tmp[2])#/ampf htifi[freq[freqcnt]] += float(tmp[1])*float(tmp[3])#/ampf htrfi[freq[freqcnt]] += float(tmp[0])*float(tmp[3])#/ampf htifr[freq[freqcnt]] += float(tmp[1])*float(tmp[2])#/ampf freqcnt += 1 if freqcnt >= len(freq): freqcnt = 0 #if N[freq[freqcnt]] > 100: break #Actually make it the mean for f in freq: #print "...found " + str(N[f]) + " of " + str(Nt) + " for " + str(f) htr1[f] /= N[f] hti1[f] /= N[f] hfr1[f] /= N[f] hfi1[f] /= N[f] #Ai[f] = (htifr[f]-htrfi[f])/N[f] #Ar[f] = (htrfr[f]+htifi[f])/N[f] Ai[f] = (htifr[f]-htrfi[f])/(amp[f]) Ar[f] = (htrfr[f]+htifi[f])/(amp[f]) amp[f] = sqrt(amp[f]/N[f]) fname = "Ar_Ai_"+epoch[1]+"-"+epoch[2]+".txt" fl = open(fname,'w') fl.write("#freq h(t) re sys\th(t) im sys\th(t) mag sys\th(t) phase sys\n") mag = {} phase = {} for f in freq: mag[f] = sqrt(Ar[f]*Ar[f]+Ai[f]*Ai[f]) phase[f] = atan2(Ai[f],Ar[f])*180.0/3.14159 fl.write(str(f) + "\t"+str(Ar[f])+"\t"+str(Ai[f])+"\t"+str(mag[f])+"\t"+str(phase[f])+"\n") fl.close() realHistVecs = {} imagHistVecs = {} binVec = [] nbins = int(ceil(float(N.values()[0])/50.0)); for f in freq: realHistVecs[f] = zeros(2*nbins) imagHistVecs[f] = zeros(2*nbins) for b in range(-nbins,nbins): binVec.append(float(b)/nbins) xr1 = {} xi1 = {} xr2 = {} xi2 = {} xr3 = {} xi3 = {} xr4 = {} xi4 = {} N = {} for f in freq: xr1[f] = 0.0 xi1[f] = 0.0 xr2[f] = 0.0 xi2[f] = 0.0 xr3[f] = 0.0 xi3[f] = 0.0 xr4[f] = 0.0 xi4[f] = 0.0 N[f] = 0.0 freqcnt = 0; print "\tsecond pass through systematics files..." #Compute the moments of the distribution for file in flist: try: input = open(file,'r') except: print "WARNING: file " + file + " doesn't exist" continue for line in input.readlines(): tmp = line.split() if len(tmp) == 1: continue N[freq[freqcnt]] += 1.0 htr = float(tmp[0]) hti = float(tmp[1]) hfr = float(tmp[2]) hfi = float(tmp[3]) xr = htr-Ar[freq[freqcnt]]*hfr + Ai[freq[freqcnt]]*hfi xi = hti-Ar[freq[freqcnt]]*hfi - Ai[freq[freqcnt]]*hfr bin(binVec,realHistVecs[freq[freqcnt]],xr/amp[freq[freqcnt]]) bin(binVec,imagHistVecs[freq[freqcnt]],xi/amp[freq[freqcnt]]) xr1[freq[freqcnt]] += xr xi1[freq[freqcnt]] += xi xr2[freq[freqcnt]] += xr*xr xi2[freq[freqcnt]] += xi*xi xr3[freq[freqcnt]] += xr*xr*xr xi3[freq[freqcnt]] += xi*xi*xi xr4[freq[freqcnt]] += xr*xr*xr*xr xi4[freq[freqcnt]] += xi*xi*xi*xi freqcnt += 1 if freqcnt >= len(freq): freqcnt = 0 #if N[freq[freqcnt]] > 100: break #Put them in units of the noise amplitude for f in freq: xr1[f] /= N[f]*amp[f] xi1[f] /= N[f]*amp[f] xr2[f] = sqrt(xr2[f]/N[f])/amp[f] xi2[f] = sqrt(xi2[f]/N[f])/amp[f] if xr3[f]: xr3[f] = pow(abs(xr3[f]/N[f]),1.0/3.0)/amp[f]*xr3[f]/abs(xr3[f]) else: xr3[f] = 0.0 if xi3[f]: xi3[f] = pow(abs(xi3[f]/N[f]),1.0/3.0)/amp[f]*xi3[f]/abs(xi3[f]) else: xi3[f] = 0.0 xr4[f] = pow(abs(xr4[f]/N[f]-3.0*pow(xr2[f]*amp[f],4)),1.0/4.0)/amp[f]*(xr4[f]/N[f]-3.0*pow(xr2[f]*amp[f],4))/abs(xr4[f]/N[f]-3.0*pow(xr2[f]*amp[f],4)) xi4[f] = pow(abs(xi4[f]/N[f]-3.0*pow(xi2[f]*amp[f],4)),1.0/4.0)/amp[f]*(xi4[f]/N[f]-3.0*pow(xi2[f]*amp[f],4))/abs(xi4[f]/N[f]-3.0*pow(xi2[f]*amp[f],4)) fname = "x1_x2_x3_x4_"+epoch[1]+"-"+epoch[2]+".txt" fl = open(fname,'w') fl.write("#freq \t xr \t xi \t xr^2 \t xi^2 \t xr^3 \t xi^3 \t xr^4 \t xi^4 \n") for f in freq: fl.write(str(f) + '\t' + str(xr1[f]) + '\t' + str(xi1[f]) + '\t' + str(xr2[f]) + '\t' + str(xi2[f]) + '\t' + str(xr3[f]) + '\t' + str(xi3[f]) + '\t' + str(xr4[f]) + '\t' + str(xi4[f]) + '\n') rootN = [] rootNdeg = [] for f in N.values(): rootN.append(1/sqrt(f)) rootNdeg.append(180/sqrt(f)/3.14159) fl.close() # Plot the results print "\tplotting..." # Plot the systematic in magnitude magfigname = "sys_mag"+epoch[1]+"-"+epoch[2]+".png" figure(1) errorbar(mag.keys(),mag.values(),rootN) title('h(t) and h(f) magnitude systematics '+epoch[1]+"-"+epoch[2]+'\n') xlabel('Freq') ylabel('Mag') grid() savefig(dir + '/'+ magfigname) thumb = 'thumb-'+magfigname savefig(dir + '/'+ thumb,dpi=20) clf() close() # Plot the systematic in phase phasefigname = "sys_phase"+epoch[1]+"-"+epoch[2]+".png" figure(1) errorbar(phase.keys(),phase.values(),rootNdeg) title('h(t) and h(f) phase systematics '+epoch[1]+"-"+epoch[2]+'\n') xlabel('Freq') ylabel('Phase (degrees)') grid() savefig(dir + '/'+ phasefigname) thumb = 'thumb-'+phasefigname savefig(dir + '/'+ thumb,dpi=20) clf() close() # Plot the residual moments x1figname = "sys_x1_"+epoch[1]+"-"+epoch[2]+".png" figure(1) plot(xr1.keys(),xr1.values()) plot(xi1.keys(),xi1.values(),'r') legend(['real','imaginary']) title('mean '+epoch[1]+"-"+epoch[2]+'\n') xlabel('Freq') ylabel('mean') grid() savefig(dir + '/'+ x1figname) thumb = 'thumb-'+x1figname savefig(dir + '/'+ thumb,dpi=20) clf() close() # Plot the residual moments x2figname = "sys_x2_"+epoch[1]+"-"+epoch[2]+".png" figure(1) plot(xr2.keys(),xr2.values()) plot(xi2.keys(),xi2.values(),'r') legend(['real','imaginary']) title('residual noise sqrt of second moment '+epoch[1]+"-"+epoch[2]+'\n') xlabel('Freq') ylabel('sigma') grid() savefig(dir + '/'+ x2figname) thumb = 'thumb-'+x2figname savefig(dir + '/'+ thumb,dpi=20) clf() close() # Plot the residual moments x3figname = "sys_x3_"+epoch[1]+"-"+epoch[2]+".png" figure(1) plot(xr3.keys(),xr3.values()) plot(xi3.keys(),xi3.values(),'r') legend(['real','imaginary']) title('residual noise cube root of third moment '+epoch[1]+"-"+epoch[2]+'\n') xlabel('Freq') ylabel('cube root of skew') grid() savefig(dir + '/'+ x3figname) thumb = 'thumb-'+x3figname savefig(dir + '/'+ thumb,dpi=20) clf() close() # Plot the residual moments x4figname = "sys_x4_"+epoch[1]+"-"+epoch[2]+".png" figure(1) plot(xr4.keys(),xr4.values()) plot(xi4.keys(),xi4.values(),'r') legend(['real','imaginary']) title('residual noise fourth root of excess kurtosis '+epoch[1]+"-"+epoch[2]+'\n') xlabel('Freq') ylabel('fourth root of excess kurtosis') grid() savefig(dir + '/'+ x4figname) thumb = 'thumb-'+x4figname savefig(dir + '/'+ thumb,dpi=20) clf() close() pgname = dir + '/' + "sys_plots"+epoch[1]+"-"+epoch[2]+".html" page = open(pgname,'w') page.write('<h2>Plots of systematic errors between h(t) and h(f) '+epoch[1]+"-"+epoch[2]+'</h2><hr><br><br>\n') page.write('<h3>Systematics in magnitude and phase and moments of the residual distributions</h3><hr>\n') page.write('<img src='+magfigname+' width=600>\n') page.write('<img src='+phasefigname+' width=600>\n') page.write('<img src='+x1figname+' width=600>\n') page.write('<img src='+x2figname+' width=600>\n') page.write('<img src='+x3figname+' width=600>\n') page.write('<img src='+x4figname+' width=600><br><br>\n') page.write('<h3>Raw distribution of residual noise</h3><hr><br>\n') for f in freq: figname = "n_hist_"+str(f)+'_'+epoch[1]+"-"+epoch[2]+".png" figure(1) plot(binVec,realHistVecs[f]) plot(binVec,imagHistVecs[f],'r') legend(['real','imaginary']) title('residual noise distribution '+epoch[1]+"-"+epoch[2]+'\n'+'freq = '+str(f)) ylabel('Number') xlabel('n / amp of h(t)') thumb = 'thumb-'+figname savefig(dir + '/'+ thumb,dpi=20) grid() savefig(dir + '/'+ figname) clf() close() page.write('<a href='+figname+'><img src='+thumb+'></a>\n') page.close | da21469de3d5dc0444d38910fa554bbd3b46754d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5758/da21469de3d5dc0444d38910fa554bbd3b46754d/strain.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3207,
67,
4299,
270,
2102,
12,
7540,
5449,
16,
4057,
16,
1214,
16,
12015,
16,
30204,
16,
4952,
4672,
284,
1098,
273,
5378,
364,
585,
316,
26204,
30,
309,
1140,
18,
803,
18,
4939,
12,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3207,
67,
4299,
270,
2102,
12,
7540,
5449,
16,
4057,
16,
1214,
16,
12015,
16,
30204,
16,
4952,
4672,
284,
1098,
273,
5378,
364,
585,
316,
26204,
30,
309,
1140,
18,
803,
18,
4939,
12,
... | |
subprocess.check_call(['mw-zip', | err = subprocess.call(['mw-zip', | def setup_class(cls): cls.tmpdir = tempfile.mkdtemp() cls.zipfn = os.path.join(cls.tmpdir, 'test.zip') cls.nuwikidir = cls.zipfn + '.nuwiki' subprocess.check_call(['mw-zip', '-o', cls.zipfn, '-c', ':de', '--keep-tmpfiles', '--print-template-pattern', '$1/Druck', '--template-exclusion-category', 'Vom Druck ausschließen', 'Monty Python', ]) assert os.path.isdir(cls.nuwikidir) | 78daa60c55968f00eaf442dee8e6b3b20ea35d31 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12391/78daa60c55968f00eaf442dee8e6b3b20ea35d31/test_nuwiki.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3875,
67,
1106,
12,
6429,
4672,
2028,
18,
5645,
1214,
273,
13275,
18,
24816,
72,
5814,
1435,
2028,
18,
4450,
4293,
273,
1140,
18,
803,
18,
5701,
12,
6429,
18,
5645,
1214,
16,
296,
3813... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3875,
67,
1106,
12,
6429,
4672,
2028,
18,
5645,
1214,
273,
13275,
18,
24816,
72,
5814,
1435,
2028,
18,
4450,
4293,
273,
1140,
18,
803,
18,
5701,
12,
6429,
18,
5645,
1214,
16,
296,
3813... |
self.non_cash_benefits_sub_2010_map() | def createMappings(self): self.export_map() self.source_map() self.source_export_link_2010_map() self.region_2010_map() self.agency_2010_map() self.agency_child_2010_map() self.service_group_2010_map() self.license_accreditation_2010_map() self.agency_service_2010_map() self.service_2010_map() self.site_2010_map() self.url_2010_map() self.spatial_location_2010_map() self.other_address_2010_map() self.cross_street_2010_map() self.aka_2010_map() self.site_service_2010_map() self.seasonal_2010_map() self.residency_requirements_2010_map() self.pit_count_set_2010_map() self.pit_counts_2010_map() self.other_requirements_2010_map() self.languages_2010_map() self.time_open_2010_map() self.inventory_2010_map() self.income_requirements_2010_map() self.hmis_asset_2010_map() self.assignment_2010_map() self.assignment_period_2010_map() self.geographic_area_served_2010_map() self.documents_required_2010_map() self.aid_requirements_2010_map() self.age_requirements_2010_map() self.person_map() self.site_service_participation_map() self.reasons_for_leaving_2010_map() self.application_process_2010_map() self.need_map() self.taxonomy_2010_map() self.service_event_map() self.service_event_notes_2010_map() self.family_requirements_2010_map() self.person_historical_map() self.housing_status_2010_map() self.veteran_military_branches_2010_map() self.veteran_military_service_duration_2010_map() self.veteran_served_in_war_zone_2010_map() self.veteran_service_era_2010_map() self.veteran_veteran_status_2010_map() self.veteran_warzones_served_2010_map() self.vocational_training_2010_map() self.substance_abuse_problem_2010_map() self.pregnancy_2010_map() self.prior_residence_2010_map() self.physical_disability_2010_map() self.non_cash_benefits_2010_map() self.non_cash_benefits_last_30_days_2010_map() self.non_cash_benefits_sub_2010_map() self.mental_health_problem_2010_map() self.length_of_stay_at_prior_residence_2010_map() self.income_total_monthly_2010_map() self.hud_chronic_homeless_2010_map() self.income_last_30_days_2010_map() self.highest_school_level_2010_map() self.hiv_aids_status_2010_map() self.health_status_2010_map() self.engaged_date_2010_map() self.employment_2010_map() self.domestic_violence_2010_map() self.disabling_condition_2010_map() self.developmental_disability_2010_map() self.destinations_2010_map() self.degree_2010_map() self.degree_code_2010_map() self.currently_in_school_2010_map() self.contact_made_2010_map() self.child_enrollment_status_2010_map() self.child_enrollment_status_barrier_2010_map() self.chronic_health_condition_2010_map() self.release_of_information_map() self.income_and_sources_map() self.veteran_map() self.drug_history_map() self.emergency_contact_map() self.hud_homeless_episodes_map() self.person_address_map() self.other_names_map() self.races_map() self.household_map() self.member_map() self.funding_source_2010_map() self.resource_info_2010_map() self.contact_2010_map() self.email_2010_map() self.phone_2010_map() # SBB20100303 Adding objects to deduplicate the DB Entries self.dedup_link_map() # SBB20100327 adding object to maintain odbid's for each site. Svcpoint requires these for valid xml uploads self.system_configuration_map() | 88818f8d8f7a51ab2308fbf722a2c8b9101e678b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9116/88818f8d8f7a51ab2308fbf722a2c8b9101e678b/DBObjects.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
7742,
12,
2890,
4672,
365,
18,
6530,
67,
1458,
1435,
365,
18,
3168,
67,
1458,
1435,
365,
18,
3168,
67,
6530,
67,
1232,
67,
6734,
20,
67,
1458,
1435,
365,
18,
6858,
67,
6734,
20,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
7742,
12,
2890,
4672,
365,
18,
6530,
67,
1458,
1435,
365,
18,
3168,
67,
1458,
1435,
365,
18,
3168,
67,
6530,
67,
1232,
67,
6734,
20,
67,
1458,
1435,
365,
18,
6858,
67,
6734,
20,... | |
for entry in dependencies: if entry == className or entry in result: | dependencies = classObj.getDependencies() for depClassName in dependencies: if depClassName == className or depClassName in result: | def __resolveDependencies(self, className, available, result=None): if result == None: result = set() | ce6ddc5dd5613bc0ee91ffee09cb076c12f6397b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12949/ce6ddc5dd5613bc0ee91ffee09cb076c12f6397b/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
10828,
8053,
12,
2890,
16,
2658,
16,
2319,
16,
563,
33,
7036,
4672,
309,
563,
422,
599,
30,
563,
273,
444,
1435,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
10828,
8053,
12,
2890,
16,
2658,
16,
2319,
16,
563,
33,
7036,
4672,
309,
563,
422,
599,
30,
563,
273,
444,
1435,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
self.bIsRunning = 0 | self.m_bIsRunning = 0 | def __init__(self, sConfigFileName): """Constructor.""" | 54ffec807df4acdcdd8fab12b225a27dbe06e238 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2853/54ffec807df4acdcdd8fab12b225a27dbe06e238/pManager.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
272,
809,
4771,
4672,
3536,
6293,
12123,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
272,
809,
4771,
4672,
3536,
6293,
12123,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
site_root = self.site_root() | site_root = self.site_root() | def set_password(self, newPassword): """Sets the user's password to 'newPassword'. | c1e472f185662eb960cbdc2abb51cbf242ccd17d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6270/c1e472f185662eb960cbdc2abb51cbf242ccd17d/CustomUser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
67,
3664,
12,
2890,
16,
394,
3913,
4672,
3536,
2785,
326,
729,
1807,
2201,
358,
296,
2704,
3913,
10332,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
67,
3664,
12,
2890,
16,
394,
3913,
4672,
3536,
2785,
326,
729,
1807,
2201,
358,
296,
2704,
3913,
10332,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
jobDict[attrList[i]] = str(attrValues[i]) | jobDict[attr_tmp_list[i]] = str(attrValues[i]) | def getAttributesForJobList(self,jobIDList,attrList=[]): """ Get attributes for the jobs in the the jobIDList. Returns an S_OK structure with a dictionary of dictionaries as its Value: ValueDict[jobID][attribute_name] = attribute_value """ | 2cdc052871bad4a94040dc59b4de126b09c4e209 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12864/2cdc052871bad4a94040dc59b4de126b09c4e209/JobDB.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10183,
1290,
2278,
682,
12,
2890,
16,
4688,
24583,
16,
1747,
682,
33,
8526,
4672,
3536,
968,
1677,
364,
326,
6550,
316,
326,
326,
1719,
24583,
18,
2860,
392,
348,
67,
3141,
3695,
598,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10183,
1290,
2278,
682,
12,
2890,
16,
4688,
24583,
16,
1747,
682,
33,
8526,
4672,
3536,
968,
1677,
364,
326,
6550,
316,
326,
326,
1719,
24583,
18,
2860,
392,
348,
67,
3141,
3695,
598,
... |
print self.nohelp % (arg,) | self.stdout.write("%s\n"%str(self.nohelp % (arg,))) | def do_help(self, arg): if arg: # XXX check arg syntax try: func = getattr(self, 'help_' + arg) except AttributeError: try: doc=getattr(self, 'do_' + arg).__doc__ if doc: print doc return except AttributeError: pass print self.nohelp % (arg,) return func() else: names = self.get_names() cmds_doc = [] cmds_undoc = [] help = {} for name in names: if name[:5] == 'help_': help[name[5:]]=1 names.sort() # There can be duplicates if routines overridden prevname = '' for name in names: if name[:3] == 'do_': if name == prevname: continue prevname = name cmd=name[3:] if cmd in help: cmds_doc.append(cmd) del help[cmd] elif getattr(self, name).__doc__: cmds_doc.append(cmd) else: cmds_undoc.append(cmd) print self.doc_leader self.print_topics(self.doc_header, cmds_doc, 15,80) self.print_topics(self.misc_header, help.keys(),15,80) self.print_topics(self.undoc_header, cmds_undoc, 15,80) | 156c8cacd5b24e96aca73a09979e4d4cc9691d70 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/156c8cacd5b24e96aca73a09979e4d4cc9691d70/cmd.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
67,
5201,
12,
2890,
16,
1501,
4672,
309,
1501,
30,
468,
11329,
866,
1501,
6279,
775,
30,
1326,
273,
3869,
12,
2890,
16,
296,
5201,
4623,
397,
1501,
13,
1335,
6394,
30,
775,
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,
741,
67,
5201,
12,
2890,
16,
1501,
4672,
309,
1501,
30,
468,
11329,
866,
1501,
6279,
775,
30,
1326,
273,
3869,
12,
2890,
16,
296,
5201,
4623,
397,
1501,
13,
1335,
6394,
30,
775,
30,
... |
return read_image(d, size) | try: return read_image(d, size) except IOError: raise web.notfound() | def redirect(id): size_part = size and ("-" + size) or "" url = "/%s/id/%s%s.jpg" % (category, id, size_part) query = web.ctx.env.get('QUERY_STRING') if query: url += '?' + query raise web.found(url) | e2814666e312228b22d490e0604b0dc48beca092 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3913/e2814666e312228b22d490e0604b0dc48beca092/code.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3136,
12,
350,
4672,
963,
67,
2680,
273,
963,
471,
7566,
10951,
397,
963,
13,
578,
1408,
880,
273,
2206,
9,
87,
19,
350,
5258,
87,
9,
87,
18,
14362,
6,
738,
261,
4743,
16,
612,
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,
3136,
12,
350,
4672,
963,
67,
2680,
273,
963,
471,
7566,
10951,
397,
963,
13,
578,
1408,
880,
273,
2206,
9,
87,
19,
350,
5258,
87,
9,
87,
18,
14362,
6,
738,
261,
4743,
16,
612,
16,... |
self.gridEnv = gConfig.getValue( mySection+'/GridEnv ' , self.gridEnv ) | self.gridEnv = gConfig.getValue( mySection+'/GridEnv' , self.gridEnv ) | def configureFromSection( self, mySection ): | 98f1b9943c2ca121fafc9f4c67ebd8030aa7cbee /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12864/98f1b9943c2ca121fafc9f4c67ebd8030aa7cbee/Director.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5068,
1265,
5285,
12,
365,
16,
3399,
5285,
262,
30,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5068,
1265,
5285,
12,
365,
16,
3399,
5285,
262,
30,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
match = re.search(regex, text, re.IGNORECASE) | match = re.search(regex, text, flags=re.IGNORECASE) | def processImage(self, page): ''' Work on a single image ''' if page.exists() and (page.namespace() == 6) and \ (not page.isRedirectPage()): imagepage = pywikibot.ImagePage(page.site(), page.title()) | ada806f6ba140022c0ebdd89945e2b51ab46aa82 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4404/ada806f6ba140022c0ebdd89945e2b51ab46aa82/imagecopy_self.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
2040,
12,
2890,
16,
1363,
4672,
9163,
4147,
603,
279,
2202,
1316,
9163,
309,
1363,
18,
1808,
1435,
471,
261,
2433,
18,
4937,
1435,
422,
1666,
13,
471,
521,
261,
902,
1363,
18,
29... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
2040,
12,
2890,
16,
1363,
4672,
9163,
4147,
603,
279,
2202,
1316,
9163,
309,
1363,
18,
1808,
1435,
471,
261,
2433,
18,
4937,
1435,
422,
1666,
13,
471,
521,
261,
902,
1363,
18,
29... |
kernel32 = ctypes.windll.kernel32 buf = ctypes.create_string_buffer("", 100) if kernel32.GetVolumeInformationA(root, None, 0, None, None, None, buf, len(buf)): | from ctypes.wintypes import LPCWSTR, LPWSTR, DWORD LPDWORD = ctypes.POINTER(DWORD) f = ctypes.windll.kernel32.GetVolumeInformationW f.argtypes = (LPCWSTR, LPWSTR, DWORD, LPDWORD, LPDWORD, LPDWORD, LPWSTR, DWORD) buf = ctypes.create_unicode_buffer("", 100) if f(root, None, 0, None, None, None, buf, len(buf)): | def get_file_system(path): import os root = os.path.splitdrive(os.path.realpath("."))[0] + '\\' import ctypes kernel32 = ctypes.windll.kernel32 buf = ctypes.create_string_buffer("", 100) if kernel32.GetVolumeInformationA(root, None, 0, None, None, None, buf, len(buf)): return buf.value | 534c6e6e622faa08acf3381b5bbf71a9b19b030e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8546/534c6e6e622faa08acf3381b5bbf71a9b19b030e/test_os.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
768,
67,
4299,
12,
803,
4672,
1930,
1140,
1365,
273,
1140,
18,
803,
18,
4939,
25431,
12,
538,
18,
803,
18,
7688,
803,
2932,
1199,
3719,
63,
20,
65,
397,
5282,
1930,
6983,
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,
336,
67,
768,
67,
4299,
12,
803,
4672,
1930,
1140,
1365,
273,
1140,
18,
803,
18,
4939,
25431,
12,
538,
18,
803,
18,
7688,
803,
2932,
1199,
3719,
63,
20,
65,
397,
5282,
1930,
6983,
62... |
dbg = None | action = None | def trace (message): if classname == trace_type and peer_object_id in trace_ids: message_verbose('TRACE>>'+message) | be959d0158ffaff6d50158269f03ba7f2c1da56f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7598/be959d0158ffaff6d50158269f03ba7f2c1da56f/RefreshPeer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2606,
261,
2150,
4672,
309,
7479,
422,
2606,
67,
723,
471,
4261,
67,
1612,
67,
350,
316,
2606,
67,
2232,
30,
883,
67,
11369,
2668,
23827,
34,
1870,
15,
2150,
13,
2,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2606,
261,
2150,
4672,
309,
7479,
422,
2606,
67,
723,
471,
4261,
67,
1612,
67,
350,
316,
2606,
67,
2232,
30,
883,
67,
11369,
2668,
23827,
34,
1870,
15,
2150,
13,
2,
-100,
-100,
-100,
... |
None. | Returns True if commhandle was successfully closed, False if the handle cannot be closed (i.e. it was already closed). | def stopcomm(commhandle): """ <Purpose> Stop handling events for a commhandle. This works for both message and connection based event handlers. <Arguments> commhandle: A commhandle as returned by recvmess or waitforconn. <Exceptions> None. <Side Effects> This has an undefined effect on a socket-like object if it is currently in use. <Returns> None. """ # Armon: Check that the handle is valid, an exception needs to be raised otherwise. if not is_valid_commhandle(commhandle): raise Exception("Invalid commhandle specified!") # if it has already been cleaned up, exit. if commhandle not in comminfo: # Armon: Semantic update, stopcomm needs to return True/False # since the handle does not exist we will return False return False restrictions.assertisallowed('stopcomm',comminfo[commhandle]) cleanup(commhandle) # Armon: Semantic update, we successfully closed # if we made it here, since cleanup blocks. return True | 0dbab99960c75805243ad4ca128a6b56bbb7638d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7272/0dbab99960c75805243ad4ca128a6b56bbb7638d/emulcomm.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2132,
5702,
12,
5702,
4110,
4672,
3536,
411,
10262,
4150,
34,
5131,
5057,
2641,
364,
279,
1543,
4110,
18,
282,
1220,
6330,
364,
3937,
883,
471,
1459,
2511,
871,
4919,
18,
225,
411,
4628,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2132,
5702,
12,
5702,
4110,
4672,
3536,
411,
10262,
4150,
34,
5131,
5057,
2641,
364,
279,
1543,
4110,
18,
282,
1220,
6330,
364,
3937,
883,
471,
1459,
2511,
871,
4919,
18,
225,
411,
4628,... |
cur_data_node.children.append(new_node) new_node.parent = cur_data_node | if cur_loop_node.type != 'loop': raise errors.EngineError, 'cur_loop_node must be a loop "%s", "%s"' \ % (cur_loop_node.type, cur_loop_node.id) cur_loop_node.children.append(new_node) new_node.parent = cur_loop_node | def _add_loop_node(self, x12_loop_node, cur_data_node): #, seg_x12_node): """ Add a loop data node the the current tree location @param x12_loop_node: X12 Loop node @type x12_loop_node: L{node<map_if.loop_if>} @param cur_data_node: Current X12 Data Node @type cur_data_node: L{node<x12context.X12DataNode>} @param seg_x12_node: Segment Map Node @type seg_x12_node: L{node<map_if.x12_node>} @return: New X12 Data Node @rtype: L{node<x12context.X12DataNode>} """ #parent_loop = self._get_parent_x12_loop(loop_id, seg_x12_node) new_node = X12LoopDataNode(x12_loop_node) cur_data_node.children.append(new_node) new_node.parent = cur_data_node return new_node | 09c30cfc6be6d90b67e07b06b85dacd6663fba93 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11528/09c30cfc6be6d90b67e07b06b85dacd6663fba93/x12context.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1289,
67,
6498,
67,
2159,
12,
2890,
16,
619,
2138,
67,
6498,
67,
2159,
16,
662,
67,
892,
67,
2159,
4672,
468,
16,
2291,
67,
92,
2138,
67,
2159,
4672,
3536,
1436,
279,
2798,
501,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1289,
67,
6498,
67,
2159,
12,
2890,
16,
619,
2138,
67,
6498,
67,
2159,
16,
662,
67,
892,
67,
2159,
4672,
468,
16,
2291,
67,
92,
2138,
67,
2159,
4672,
3536,
1436,
279,
2798,
501,... |
self.thr_async = 1 | self.thr_async = True | def check_mgr_async(self): if not self.thr_async and self.mgr.thr_async: assert self.mgr.trigger is not None, \ "manager (%s) has no trigger" % self.mgr self.thr_async = 1 self.trigger = self.mgr.trigger return 1 return 0 | c8dc49bdef9be96c2639ee661f583dd6f7ce2243 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/c8dc49bdef9be96c2639ee661f583dd6f7ce2243/connection.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
67,
13552,
67,
3810,
12,
2890,
4672,
309,
486,
365,
18,
451,
86,
67,
3810,
471,
365,
18,
13552,
18,
451,
86,
67,
3810,
30,
1815,
365,
18,
13552,
18,
10668,
353,
486,
599,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
67,
13552,
67,
3810,
12,
2890,
4672,
309,
486,
365,
18,
451,
86,
67,
3810,
471,
365,
18,
13552,
18,
451,
86,
67,
3810,
30,
1815,
365,
18,
13552,
18,
10668,
353,
486,
599,
16,
... |
full_module_name = module.__name__+'.'+short_module_name test_dir = os.path.join(d,'tests') fn = self.get_testfile(short_module_name) test_file = os.path.join(test_dir,fn) local_test_dir = os.path.join(os.getcwd(),'tests') local_test_file = os.path.join(local_test_dir, fn) if os.path.basename(os.path.dirname(local_test_dir)) \ == os.path.basename(os.path.dirname(test_dir)) \ and os.path.isfile(local_test_file): test_file = local_test_file | test_file = self.get_testfile(module, verbosity) if test_file is None: return [] | def _get_module_tests(self,module,level,verbosity): mstr = self._module_str d,f = os.path.split(module.__file__) | 7adb2e2d0abc93ca9572ff451ff3ca1acdfce4cb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14925/7adb2e2d0abc93ca9572ff451ff3ca1acdfce4cb/numpytest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
67,
2978,
67,
16341,
12,
2890,
16,
2978,
16,
2815,
16,
16629,
8807,
4672,
312,
701,
273,
365,
6315,
2978,
67,
701,
302,
16,
74,
273,
1140,
18,
803,
18,
4939,
12,
2978,
1618... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
389,
588,
67,
2978,
67,
16341,
12,
2890,
16,
2978,
16,
2815,
16,
16629,
8807,
4672,
312,
701,
273,
365,
6315,
2978,
67,
701,
302,
16,
74,
273,
1140,
18,
803,
18,
4939,
12,
2978,
1618... |
filePath = unicode(os.path.join(os.path.dirname(siblingPath), fileName)) | filePath = unicode(os.path.join(os.path.dirname(siblingPath), fileName), sys.getfilesystemencoding()) | def set_file(self, fileName, siblingPath): fileName = fileName.encode(sys.getfilesystemencoding()) filePath = unicode(os.path.join(os.path.dirname(siblingPath), fileName)) self.bodyString = self.file_contents(filePath) self.filePath = filePath | 22e4f5de6d47af39b8062ace33c8910ffd5a019b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/22e4f5de6d47af39b8062ace33c8910ffd5a019b/scripting.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
67,
768,
12,
2890,
16,
3968,
16,
10841,
743,
4672,
3968,
273,
3968,
18,
3015,
12,
9499,
18,
588,
17846,
5999,
10756,
225,
4612,
273,
5252,
12,
538,
18,
803,
18,
5701,
12,
538,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
67,
768,
12,
2890,
16,
3968,
16,
10841,
743,
4672,
3968,
273,
3968,
18,
3015,
12,
9499,
18,
588,
17846,
5999,
10756,
225,
4612,
273,
5252,
12,
538,
18,
803,
18,
5701,
12,
538,
1... |
logger.info('PlonePAS: Wrapping method at %s.%s', (klass.__name__, name)) | logger.info('PlonePAS: Wrapping method at %s.%s', klass.__name__, name) | def wrap_method(klass, name, method, pattern=PATTERN): old_method = getattr(klass, name) if isWrapperMethod(old_method): logger.info('PlonePAS: *NOT* wrapping already wrapped method at %s.%s', (klass.__name__, name)) return else: logger.info('PlonePAS: Wrapping method at %s.%s', (klass.__name__, name)) new_name = pattern % name setattr(klass, new_name, old_method) setattr(method, ORIG_NAME, new_name) setattr(method, WRAPPER, True) setattr(klass, name, method) | e68ac78ad1ea75f7978bc16766ed98a14102e6b8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12230/e68ac78ad1ea75f7978bc16766ed98a14102e6b8/patch.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2193,
67,
2039,
12,
22626,
16,
508,
16,
707,
16,
1936,
33,
10831,
4672,
1592,
67,
2039,
273,
3869,
12,
22626,
16,
508,
13,
309,
353,
3611,
1305,
12,
1673,
67,
2039,
4672,
1194,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2193,
67,
2039,
12,
22626,
16,
508,
16,
707,
16,
1936,
33,
10831,
4672,
1592,
67,
2039,
273,
3869,
12,
22626,
16,
508,
13,
309,
353,
3611,
1305,
12,
1673,
67,
2039,
4672,
1194,
18,
1... |
if self.scriptSite: raise Exception(scode=winerror.E_UNEXPECTED) | def SetScriptSite(self, site): if self.scriptSite: raise Exception(scode=winerror.E_UNEXPECTED) self.scriptSite = site import traceback try: import debug self.debugManager = debug.DebugManager(self) except pythoncom.com_error: # COM errors will occur if the debugger interface has never been # seen on the target system trace("Debugging interfaces not available - debugging is disabled..") self.debugManager = None except: traceback.print_exc() trace("*** Debugger Manager could not initialize - %s: %s" % (sys.exc_info()[0],sys.exc_info()[1])) self.debugManager = None | 832080d7cc4afd6a307e24ca214107c81368fe8f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/677/832080d7cc4afd6a307e24ca214107c81368fe8f/framework.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1000,
3651,
4956,
12,
2890,
16,
2834,
4672,
225,
365,
18,
4263,
4956,
273,
2834,
1930,
10820,
775,
30,
1930,
1198,
365,
18,
4148,
1318,
273,
1198,
18,
2829,
1318,
12,
2890,
13,
1335,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1000,
3651,
4956,
12,
2890,
16,
2834,
4672,
225,
365,
18,
4263,
4956,
273,
2834,
1930,
10820,
775,
30,
1930,
1198,
365,
18,
4148,
1318,
273,
1198,
18,
2829,
1318,
12,
2890,
13,
1335,
5... | |
command = [lambda:app.htmlapp.newDownload(url), "Open HTTP Audio"] | messages.DownloadURL(url).send_to_backend() | def openURL_withReplyEvent_(self, event, replyEvent): keyDirectObject = struct.unpack(">i", "----")[0] url = event.paramDescriptorForKeyword_(keyDirectObject).stringValue().decode('utf8') | 018bbc7d1624aa1bbb3fadb11711c555376ee49b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12354/018bbc7d1624aa1bbb3fadb11711c555376ee49b/application.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1696,
1785,
67,
1918,
7817,
1133,
67,
12,
2890,
16,
871,
16,
4332,
1133,
4672,
498,
5368,
921,
273,
1958,
18,
17309,
2932,
34,
77,
3113,
315,
553,
7923,
63,
20,
65,
880,
273,
871,
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,
1696,
1785,
67,
1918,
7817,
1133,
67,
12,
2890,
16,
871,
16,
4332,
1133,
4672,
498,
5368,
921,
273,
1958,
18,
17309,
2932,
34,
77,
3113,
315,
553,
7923,
63,
20,
65,
880,
273,
871,
18... |
sage: [E6(fw).branch(F4,rule="symmetric") for fw in E6.fundamental_weights()] | sage: [E6(fw).branch(F4,rule="symmetric") for fw in E6.fundamental_weights()] | def branch_weyl_character(chi, R, S, rule="default"): r""" A Branching rule describes the restriction of representations from a Lie group or algebra G to a smaller one. See for example, R. C. King, Branching rules for classical Lie groups using tensor and spinor methods. J. Phys. A 8 (1975), 429-449, Howe, Tan and Willenbring, Stable branching rules for classical symmetric pairs, Trans. Amer. Math. Soc. 357 (2005), no. 4, 1601-1626, McKay and Patera, Tables of Dimensions, Indices and Branching Rules for Representations of Simple Lie Algebras (Marcel Dekker, 1981), and Fauser, Jarvis, King and Wybourne, New branching rules induced by plethysm. J. Phys. A 39 (2006), no. 11, 2611--2655. INPUT: - ``chi`` - a character of G - ``R`` - the Weyl Character Ring of G - ``S`` - the Weyl Character Ring of H - ``rule`` - a set of r dominant weights in H where r is the rank of G. You may use a predefined rule by specifying rule = one of"levi", "automorphic", "symmetric", "extended", "triality" or "miscellaneous". The use of these rules will be explained next. After the examples we will explain how to write your own branching rules for cases that we have omitted. To explain the predefined rules we survey the most important branching rules. These may be classified into several cases, and once this is understood, the detailed classification can be read off from the Dynkin diagrams. Dynkin classified the maximal subgroups of Lie groups in Mat. Sbornik N.S. 30(72):349-462 (1952). We will list give predefined rules that cover most cases where the branching rule is to a maximal subgroup. For convenience, we also give some branching rules to subgroups that are not maximal. For example, a Levi subgroup may or may not be maximal. LEVI TYPE. These can be read off from the Dynkin diagram. If removing a node from the Dynkin diagram produces another Dynkin diagram, there is a branching rule. Currently we require that the smaller diagram be connected. For these rules use the option rule="levi":: ['A',r] => ['A',r-1] ['B',r] => ['A',r-1] ['B',r] => ['B',r-1] ['C',r] => ['A',r-1] ['C',r] => ['C',r-1] ['D',r] => ['A',r-1] ['D',r] => ['D',r-1] ['E',r] => ['A',r-1] r = 7,8 ['E',r] => ['D',r-1] r = 6,7,8 ['E',r] => ['E',r-1] F4 => B3 F4 => C3 G2 => A1 (short root) Not all Levi subgroups are maximal subgroups. If the Levi is not maximal there may or may not be a preprogrammed rule="levi" for it. If there is not, the branching rule may still be obtained by going through an intermediate subgroup that is maximal using rule="extended". Thus the other Levi branching rule from G2 => A1 corresponding to the long root is available by first branching G2 => A_2 then A2 => A1. Similarly the branching rules to the Levi subgroup:: ['E',r] => ['A',r-1] r = 6,7,8 may be obtained by first branching E6=>A5xA1, E7=>A7 or E8=>A8. AUTOMORPHIC TYPE. If the Dynkin diagram has a symmetry, then there is an automorphism that is a special case of a branching rule. There is also an exotic "triality" automorphism of D4 having order 3. Use rule="automorphic" or (for D4) rule="triality":: ['A',r] => ['A',r] ['D',r] => ['D',r] E6 => E6 SYMMETRIC TYPE. Related to the automorphic type, when either the Dynkin diagram or the extended diagram has a symmetry there is a branching rule to the subalgebra (or subgroup) of invariants under the automorphism. Use rule="symmetric". The last branching rule, D4=>G2 is not to a maximal subgroup since D4=>B3=>G2, but it is included for convenience. :: ['A',2r+1] => ['B',r] ['A',2r] => ['C',r] ['A',2r] => ['D',r] ['D',r] => ['B',r-1] E6 => F4 D4 => G2 EXTENDED TYPE. If removing a node from the extended Dynkin diagram results in a Dynkin diagram, then there is a branching rule. Use rule="extended" for these. We will also use this classification for some rules that are not of this type, mainly involving type B, such as D6 => B3xB3. Here is the extended Dynkin diagram for D6:: 0 6 O O | | | | O---O---O---O---O 1 2 3 4 6 Removing the node 3 results in an embedding D3xD3 -> D6. This corresponds to the embedding SO(6)xSO(6) -> SO(12), and is of extended type. On the other hand the embedding SO(5)xSO(7)-->SO(12) (e.g. B2xB3 -> D6) cannot be explained this way but for uniformity is implemented under rule="extended". Using rule="extended" you can get any branching rule SO(n) => SO(a) x SO(b) x SO(c) x ... where n = a+b+c+ ... Sp(2n) => Sp(2a) x Sp(2b) x Sp(2c) x ... where n = a+b+c+ ... where O(a) = ['D',r] (a=2r) or ['B',r] (a=2r+1) and Sp(2r)=['C',r]. The following rules are implemented as special cases of rule="extended". :: E6 => A5xA1, A2xA2xA2 E7 => A7, D6xA1, A3xA3xA1 E8 => A8, D8, E7xA1, A4xA4, D5xA3, E6xA2 F4 => B4, C3xA1, A2xA2, A3xA1 G2 => A1xA1 Note that E8 has only a limited number of representations of reasonably low degree. TENSOR: There are branching rules: :: ['A', rs-1] => ['A',r-1] x ['A',s-1] ['B',2rs+r+s] => ['B',r] x ['B',s] ['D',2rs+s] => ['B',r] x ['D',s] ['D',2rs] => ['D',r] x ['D',s] ['D',2rs] => ['C',r] x ['C',s] ['C',2rs+s] => ['B',r] x ['C',s] ['C',2rs] => ['C',r] x ['D',s]. corresponding to the tensor product homomorphism. For type A, the homomorphism is GL(r) x GL(s) -> GL(rs). For the classical types, the relevant fact is that if V,W are orthogonal or symplectic spaces, that is, spaces endowed with symmetric or skew-symmetric bilinear forms, then V tensor W is also an orthogonal space (if V and W are both orthogonal or both symplectic) or symplectic (if one of V and W is orthogonal and the other symplectic). The corresponding branching rules are obtained using rule="tensor". SYMMETRIC POWER: The k-th symmetric and exterior power homomorphisms map GL(n) --> GL(binomial(n+k-1,k)) and GL(binomial(n,k)). The corresponding branching rules are not implemented but a special case is. The k-th symmetric power homomorphism SL(2) --> GL(k+1) has its image inside of SO(2r+1) if k=2r and inside of Sp(2r) if k=2r-1. Hence there are branching rules:: ['B',r] => A1 ['C',r] => A1 and these may be obtained using the rule "symmetric_power". MISCELLANEOUS: Use rule="miscellaneous" for the following rules:: B3 => G2 F4 => G2xA1 (not implemented yet) BRANCHING RULES FROM PLETHYSMS Nearly all branching rules G => H where G is of type A,B,C or D are covered by the preceding rules. The function branching_rules_from_plethysm covers the remaining cases. ISOMORPHIC TYPE: Although not usually referred to as a branching rule, the effects of the accidental isomorphisms may be handled using rule="isomorphic":: B2 => C2 C2 => B2 A3 => D3 D3 => A3 D2 => A1xA1 B1 => A1 C1 => A1 EXAMPLES: (Levi type) :: sage: A1 = WeylCharacterRing("A1") sage: A2 = WeylCharacterRing("A2") sage: A3 = WeylCharacterRing("A3") sage: A4 = WeylCharacterRing("A4") sage: A5 = WeylCharacterRing("A5") sage: B2 = WeylCharacterRing("B2") sage: B3 = WeylCharacterRing("B3") sage: B4 = WeylCharacterRing("B4") sage: C2 = WeylCharacterRing("C2") sage: C3 = WeylCharacterRing("C3") sage: D3 = WeylCharacterRing("D3") sage: D4 = WeylCharacterRing("D4") sage: D5 = WeylCharacterRing("D5") sage: G2 = WeylCharacterRing("G2") sage: F4 = WeylCharacterRing("F4",style="coroots") # long time sage: E6=WeylCharacterRing("E6",style="coroots") sage: D5=WeylCharacterRing("D5",style="coroots") sage: [B3(w).branch(A2,rule="levi") for w in B3.fundamental_weights()] [A2(0,0,-1) + A2(0,0,0) + A2(1,0,0), A2(0,-1,-1) + A2(0,0,-1) + A2(0,0,0) + A2(1,0,-1) + A2(1,0,0) + A2(1,1,0), A2(-1/2,-1/2,-1/2) + A2(1/2,-1/2,-1/2) + A2(1/2,1/2,-1/2) + A2(1/2,1/2,1/2)] The last example must be understood as follows. The representation of B3 being branched is spin, which is not a representation of SO(7) but of its double cover spin(7). The group A2 is really GL(3) and the double cover of SO(7) induces a cover of GL(3) that is trivial over SL(3) but not over the center of GL(3). The weight lattice for this GL(3) consists of triples (a,b,c) of half integers such that a-b and b-c are in `\ZZ`, and this is reflected in the last decomposition. :: sage: [C3(w).branch(A2,rule="levi") for w in C3.fundamental_weights()] [A2(0,0,-1) + A2(1,0,0), A2(0,-1,-1) + A2(1,0,-1) + A2(1,1,0), A2(-1,-1,-1) + A2(1,-1,-1) + A2(1,1,-1) + A2(1,1,1)] sage: [D4(w).branch(A3,rule="levi") for w in D4.fundamental_weights()] [A3(0,0,0,-1) + A3(1,0,0,0), A3(0,0,-1,-1) + A3(0,0,0,0) + A3(1,0,0,-1) + A3(1,1,0,0), A3(1/2,-1/2,-1/2,-1/2) + A3(1/2,1/2,1/2,-1/2), A3(-1/2,-1/2,-1/2,-1/2) + A3(1/2,1/2,-1/2,-1/2) + A3(1/2,1/2,1/2,1/2)] sage: [B3(w).branch(B2,rule="levi") for w in B3.fundamental_weights()] [2*B2(0,0) + B2(1,0), B2(0,0) + 2*B2(1,0) + B2(1,1), 2*B2(1/2,1/2)] sage: C3 = WeylCharacterRing(['C',3]) sage: [C3(w).branch(C2,rule="levi") for w in C3.fundamental_weights()] [2*C2(0,0) + C2(1,0), C2(0,0) + 2*C2(1,0) + C2(1,1), C2(1,0) + 2*C2(1,1)] sage: [D5(w).branch(D4,rule="levi") for w in D5.fundamental_weights()] [2*D4(0,0,0,0) + D4(1,0,0,0), D4(0,0,0,0) + 2*D4(1,0,0,0) + D4(1,1,0,0), D4(1,0,0,0) + 2*D4(1,1,0,0) + D4(1,1,1,0), D4(1/2,1/2,1/2,-1/2) + D4(1/2,1/2,1/2,1/2), D4(1/2,1/2,1/2,-1/2) + D4(1/2,1/2,1/2,1/2)] sage: G2(1,0,-1).branch(A1,rule="levi") A1(0,-1) + A1(1,-1) + A1(1,0) sage: E6=WeylCharacterRing("E6",style="coroots") # long time sage: D5=WeylCharacterRing("D5",style="coroots") # long time sage: fw = E6.fundamental_weights() # long time sage: [E6(fw[i]).branch(D5,rule="levi") for i in [1,2,6]] # long time [D5(0,0,0,0,0) + D5(0,0,0,0,1) + D5(1,0,0,0,0), D5(0,0,0,0,0) + D5(0,0,0,1,0) + D5(0,0,0,0,1) + D5(0,1,0,0,0), D5(0,0,0,0,0) + D5(0,0,0,1,0) + D5(1,0,0,0,0)] sage: E7=WeylCharacterRing("E7",style="coroots") # long time sage: D6=WeylCharacterRing("D6",style="coroots") # long time sage: fw = E7.fundamental_weights() # long time sage: [E7(fw[i]).branch(D6,rule="levi") for i in [1,2,7]] # long time [3*D6(0,0,0,0,0,0) + 2*D6(0,0,0,0,1,0) + D6(0,1,0,0,0,0), 3*D6(0,0,0,0,0,1) + 2*D6(1,0,0,0,0,0) + 2*D6(0,0,1,0,0,0) + D6(1,0,0,0,1,0), D6(0,0,0,0,0,1) + 2*D6(1,0,0,0,0,0)] sage: D7=WeylCharacterRing("D7",style="coroots",cache=True) # long time sage: E8=WeylCharacterRing("E8",style="coroots",cache=True) # long time sage: D7=WeylCharacterRing("D7",style="coroots",cache=True) # long time sage: E8(1,0,0,0,0,0,0,0).branch(D7,rule="levi") # long time 3*D7(0,0,0,0,0,0,0) + 2*D7(0,0,0,0,0,1,0) + 2*D7(0,0,0,0,0,0,1) + 2*D7(1,0,0,0,0,0,0) + D7(0,1,0,0,0,0,0) + 2*D7(0,0,1,0,0,0,0) + D7(0,0,0,1,0,0,0) + D7(1,0,0,0,0,1,0) + D7(1,0,0,0,0,0,1) + D7(2,0,0,0,0,0,0) sage: E8(0,0,0,0,0,0,0,1).branch(D7,rule="levi") # long time D7(0,0,0,0,0,0,0) + D7(0,0,0,0,0,1,0) + D7(0,0,0,0,0,0,1) + 2*D7(1,0,0,0,0,0,0) + D7(0,1,0,0,0,0,0) sage: [F4(fw).branch(B3,rule="levi") for fw in F4.fundamental_weights()] # long time [B3(0,0,0) + 2*B3(1/2,1/2,1/2) + 2*B3(1,0,0) + B3(1,1,0), B3(0,0,0) + 6*B3(1/2,1/2,1/2) + 5*B3(1,0,0) + 7*B3(1,1,0) + 3*B3(1,1,1) + 6*B3(3/2,1/2,1/2) + 2*B3(3/2,3/2,1/2) + B3(2,0,0) + 2*B3(2,1,0) + B3(2,1,1), 3*B3(0,0,0) + 6*B3(1/2,1/2,1/2) + 4*B3(1,0,0) + 3*B3(1,1,0) + B3(1,1,1) + 2*B3(3/2,1/2,1/2), 3*B3(0,0,0) + 2*B3(1/2,1/2,1/2) + B3(1,0,0)] sage: [F4(fw).branch(C3,rule="levi") for fw in F4.fundamental_weights()] # long time [3*C3(0,0,0) + 2*C3(1,1,1) + C3(2,0,0), 3*C3(0,0,0) + 6*C3(1,1,1) + 4*C3(2,0,0) + 2*C3(2,1,0) + 3*C3(2,2,0) + C3(2,2,2) + C3(3,1,0) + 2*C3(3,1,1), 2*C3(1,0,0) + 3*C3(1,1,0) + C3(2,0,0) + 2*C3(2,1,0) + C3(2,1,1), 2*C3(1,0,0) + C3(1,1,0)] sage: A1xA1 = WeylCharacterRing("A1xA1") sage: [A3(hwv).branch(A1xA1,rule="levi") for hwv in A3.fundamental_weights()] [A1xA1(0,0,1,0) + A1xA1(1,0,0,0), A1xA1(0,0,1,1) + A1xA1(1,0,1,0) + A1xA1(1,1,0,0), A1xA1(1,0,1,1) + A1xA1(1,1,1,0)] sage: A1xB1=WeylCharacterRing("A1xB1",style="coroots") sage: [B3(x).branch(A1xB1,rule="levi") for x in B3.fundamental_weights()] [A1xB1(0,2) + 2*A1xB1(1,0), 3*A1xB1(0,0) + A1xB1(0,2) + 2*A1xB1(1,2) + A1xB1(2,0), 2*A1xB1(0,1) + A1xB1(1,1)] EXAMPLES: (Automorphic type, including D4 triality) :: sage: [A3(chi).branch(A3,rule="automorphic") for chi in A3.fundamental_weights()] [A3(0,0,0,-1), A3(0,0,-1,-1), A3(0,-1,-1,-1)] sage: [D4(chi).branch(D4,rule="automorphic") for chi in D4.fundamental_weights()] [D4(1,0,0,0), D4(1,1,0,0), D4(1/2,1/2,1/2,1/2), D4(1/2,1/2,1/2,-1/2)] sage: [D4(chi).branch(D4,rule="triality") for chi in D4.fundamental_weights()] [D4(1/2,1/2,1/2,-1/2), D4(1,1,0,0), D4(1/2,1/2,1/2,1/2), D4(1,0,0,0)] EXAMPLES: (Symmetric type) :: sage: [w.branch(B2,rule="symmetric") for w in [A4(1,0,0,0,0),A4(1,1,0,0,0),A4(1,1,1,0,0),A4(2,0,0,0,0)]] [B2(1,0), B2(1,1), B2(1,1), B2(0,0) + B2(2,0)] sage: [A5(w).branch(C3,rule="symmetric") for w in A5.fundamental_weights()] [C3(1,0,0), C3(0,0,0) + C3(1,1,0), C3(1,0,0) + C3(1,1,1), C3(0,0,0) + C3(1,1,0), C3(1,0,0)] sage: [A5(w).branch(D3,rule="symmetric") for w in A5.fundamental_weights()] [D3(1,0,0), D3(1,1,0), D3(1,1,-1) + D3(1,1,1), D3(1,1,0), D3(1,0,0)] sage: [D4(x).branch(B3,rule="symmetric") for x in D4.fundamental_weights()] [B3(0,0,0) + B3(1,0,0), B3(1,0,0) + B3(1,1,0), B3(1/2,1/2,1/2), B3(1/2,1/2,1/2)] sage: [D4(x).branch(G2,rule="symmetric") for x in D4.fundamental_weights()] [G2(0,0,0) + G2(1,0,-1), 2*G2(1,0,-1) + G2(2,-1,-1), G2(0,0,0) + G2(1,0,-1), G2(0,0,0) + G2(1,0,-1)] sage: [E6(fw).branch(F4,rule="symmetric") for fw in E6.fundamental_weights()] # long time [F4(0,0,0,0) + F4(0,0,0,1), F4(0,0,0,1) + F4(1,0,0,0), F4(0,0,0,1) + F4(1,0,0,0) + F4(0,0,1,0), F4(1,0,0,0) + 2*F4(0,0,1,0) + F4(1,0,0,1) + F4(0,1,0,0), F4(0,0,0,1) + F4(1,0,0,0) + F4(0,0,1,0), F4(0,0,0,0) + F4(0,0,0,1)] EXAMPLES: (Extended type) :: sage: [B3(x).branch(D3,rule="extended") for x in B3.fundamental_weights()] [D3(0,0,0) + D3(1,0,0), D3(1,0,0) + D3(1,1,0), D3(1/2,1/2,-1/2) + D3(1/2,1/2,1/2)] sage: [G2(w).branch(A2, rule="extended") for w in G2.fundamental_weights()] [A2(0,0,0) + A2(1/3,1/3,-2/3) + A2(2/3,-1/3,-1/3), A2(1/3,1/3,-2/3) + A2(2/3,-1/3,-1/3) + A2(1,0,-1)] sage: [F4(fw).branch(B4,rule="extended") for fw in F4.fundamental_weights()] # long time [B4(1/2,1/2,1/2,1/2) + B4(1,1,0,0), B4(1,1,0,0) + B4(1,1,1,0) + B4(3/2,1/2,1/2,1/2) + B4(3/2,3/2,1/2,1/2) + B4(2,1,1,0), B4(1/2,1/2,1/2,1/2) + B4(1,0,0,0) + B4(1,1,0,0) + B4(1,1,1,0) + B4(3/2,1/2,1/2,1/2), B4(0,0,0,0) + B4(1/2,1/2,1/2,1/2) + B4(1,0,0,0)] sage: E6 = WeylCharacterRing("E6", style="coroots") # long time sage: A2xA2xA2=WeylCharacterRing("A2xA2xA2",style="coroots") sage: A5xA1=WeylCharacterRing("A5xA1",style="coroots") sage: G2 = WeylCharacterRing("G2", style="coroots") sage: A1xA1 = WeylCharacterRing("A1xA1", style="coroots") sage: F4 = WeylCharacterRing("F4",style="coroots") sage: A3xA1 = WeylCharacterRing("A3xA1", style="coroots") sage: A2xA2 = WeylCharacterRing("A2xA2", style="coroots") sage: A1xC3 = WeylCharacterRing("A1xC3",style="coroots") sage: E6(1,0,0,0,0,0).branch(A5xA1,rule="extended") # long time A5xA1(0,0,0,1,0,0) + A5xA1(1,0,0,0,0,1) sage: E6(1,0,0,0,0,0).branch(A2xA2xA2, rule="extended") # long time A2xA2xA2(0,0,0,1,1,0) + A2xA2xA2(0,1,1,0,0,0) + A2xA2xA2(1,0,0,0,0,1) sage: E7=WeylCharacterRing("E7",style="coroots") # long time sage: A7=WeylCharacterRing("A7",style="coroots") # long time sage: E7(1,0,0,0,0,0,0).branch(A7,rule="extended") # long time A7(0,0,0,1,0,0,0) + A7(1,0,0,0,0,0,1) sage: E8=WeylCharacterRing("E8",cache=true,style="coroots") # long time sage: D8=WeylCharacterRing("D8",cache=true,style="coroots") # long time sage: E8(0,0,0,0,0,0,0,1).branch(D8,rule="extended") # long time D8(0,0,0,0,0,0,1,0) + D8(0,1,0,0,0,0,0,0) sage: F4(1,0,0,0).branch(A1xC3,rule="extended") # long time A1xC3(0,2,0,0) + A1xC3(1,0,0,1) + A1xC3(2,0,0,0) sage: G2(0,1).branch(A1xA1, rule="extended") A1xA1(0,2) + A1xA1(2,0) + A1xA1(3,1) sage: F4(0,0,0,1).branch(A2xA2, rule="extended") # long time A2xA2(0,0,1,1) + A2xA2(0,1,0,1) + A2xA2(1,0,1,0) sage: F4(0,0,0,1).branch(A3xA1,rule="extended") # long time A3xA1(0,0,0,0) + A3xA1(0,0,0,2) + A3xA1(0,0,1,1) + A3xA1(0,1,0,0) + A3xA1(1,0,0,1) sage: D4=WeylCharacterRing("D4",style="coroots") sage: D2xD2=WeylCharacterRing("D2xD2",style="coroots") # We get D4 => A1xA1xA1xA1 by remembering that A1xA1 = D2. sage: [D4(fw).branch(D2xD2, rule="extended") for fw in D4.fundamental_weights()] [D2xD2(0,0,1,1) + D2xD2(1,1,0,0), D2xD2(0,0,2,0) + D2xD2(0,0,0,2) + D2xD2(2,0,0,0) + D2xD2(1,1,1,1) + D2xD2(0,2,0,0), D2xD2(1,0,0,1) + D2xD2(0,1,1,0), D2xD2(1,0,1,0) + D2xD2(0,1,0,1)] EXAMPLES: (Tensor type) :: sage: A5=WeylCharacterRing("A5", style="coroots") sage: A2xA1=WeylCharacterRing("A2xA1", style="coroots") sage: [A5(hwv).branch(A2xA1, rule="tensor") for hwv in A5.fundamental_weights()] [A2xA1(1,0,1), A2xA1(0,1,2) + A2xA1(2,0,0), A2xA1(0,0,3) + A2xA1(1,1,1), A2xA1(1,0,2) + A2xA1(0,2,0), A2xA1(0,1,1)] sage: B4=WeylCharacterRing("B4",style="coroots") sage: B1xB1=WeylCharacterRing("B1xB1",style="coroots") sage: [B4(f).branch(B1xB1,rule="tensor") for f in B4.fundamental_weights()] [B1xB1(2,2), B1xB1(0,2) + B1xB1(2,0) + B1xB1(2,4) + B1xB1(4,2), B1xB1(0,2) + B1xB1(0,6) + B1xB1(2,0) + B1xB1(2,2) + B1xB1(2,4) + B1xB1(4,2) + B1xB1(4,4) + B1xB1(6,0), B1xB1(1,3) + B1xB1(3,1)] sage: D4=WeylCharacterRing("D4",style="coroots") sage: C2xC1=WeylCharacterRing("C2xC1",style="coroots") sage: [D4(f).branch(C2xC1,rule="tensor") for f in D4.fundamental_weights()] [C2xC1(1,0,1), C2xC1(0,0,2) + C2xC1(0,1,2) + C2xC1(2,0,0), C2xC1(1,0,1), C2xC1(0,0,2) + C2xC1(0,1,0)] sage: C3=WeylCharacterRing("C3",style="coroots") sage: B1xC1=WeylCharacterRing("B1xC1",style="coroots") sage: [C3(f).branch(B1xC1,rule="tensor") for f in C3.fundamental_weights()] [B1xC1(2,1), B1xC1(2,2) + B1xC1(4,0), B1xC1(0,3) + B1xC1(4,1)] EXAMPLES: (Symmetric Power) :: sage: A1=WeylCharacterRing("A1",style="coroots") sage: B3=WeylCharacterRing("B3",style="coroots") sage: C3=WeylCharacterRing("C3",style="coroots") sage: [B3(fw).branch(A1,rule="symmetric_power") for fw in B3.fundamental_weights()] [A1(6), A1(2) + A1(6) + A1(10), A1(0) + A1(6)] sage: [C3(fw).branch(A1,rule="symmetric_power") for fw in C3.fundamental_weights()] [A1(5), A1(4) + A1(8), A1(3) + A1(9)] EXAMPLES: (Miscellaneous type) :: sage: G2 = WeylCharacterRing("G2") sage: [fw1, fw2, fw3] = B3.fundamental_weights() sage: B3(fw1+fw3).branch(G2, rule="miscellaneous") G2(1,0,-1) + G2(2,-1,-1) + G2(2,0,-2) EXAMPLES: (Isomorphic type) :: sage: [B2(x).branch(C2, rule="isomorphic") for x in B2.fundamental_weights()] [C2(1,1), C2(1,0)] sage: [C2(x).branch(B2, rule="isomorphic") for x in C2.fundamental_weights()] [B2(1/2,1/2), B2(1,0)] sage: [A3(x).branch(D3,rule="isomorphic") for x in A3.fundamental_weights()] [D3(1/2,1/2,1/2), D3(1,0,0), D3(1/2,1/2,-1/2)] sage: [D3(x).branch(A3,rule="isomorphic") for x in D3.fundamental_weights()] [A3(1/2,1/2,-1/2,-1/2), A3(1/4,1/4,1/4,-3/4), A3(3/4,-1/4,-1/4,-1/4)] Here A3(x,y,z,w) can be understood as a representation of SL(4). The weights x,y,z,w and x+t,y+t,z+t,w+t represent the same representation of SL(4) - though not of GL(4) - since A3(x+t,y+t,z+t,w+t) is the same as A3(x,y,z,w) tensored with `det^t`. So as a representation of SL(4), A3(1/4,1/4,1/4,-3/4) is the same as A3(1,1,1,0). The exterior square representation SL(4) -> GL(6) admits an invariant symmetric bilinear form, so is a representation SL(4) -> SO(6) that lifts to an isomorphism SL(4) -> Spin(6). Conversely, there are two isomorphisms SO(6) -> SL(4), of which we've selected one. In cases like this you might prefer style="coroots". :: sage: A3 = WeylCharacterRing("A3",style="coroots") sage: D3 = WeylCharacterRing("D3",style="coroots") sage: [D3(fw) for fw in D3.fundamental_weights()] [D3(1,0,0), D3(0,1,0), D3(0,0,1)] sage: [D3(fw).branch(A3,rule="isomorphic") for fw in D3.fundamental_weights()] [A3(0,1,0), A3(0,0,1), A3(1,0,0)] sage: D2 = WeylCharacterRing("D2", style="coroots") sage: A1xA1 = WeylCharacterRing("A1xA1", style="coroots") sage: [D2(fw).branch(A1xA1,rule="isomorphic") for fw in D2.fundamental_weights()] [A1xA1(1,0), A1xA1(0,1)] EXAMPLES: (Branching rules from plethysms) This is a general rule that includes any branching rule from types A,B,C or D as a special case. Thus it could be used in place of the above rules and would give the same results. However it is most useful when branching from G to a maximal subgroup H such that rank(H) < rank(G)-1. We consider a homomorphism H --> G where G is one of SL(r+1), SO(2r+1), Sp(2r) or SO(2r). The function branching_rule_from_plethysm produces the corresponding branching rule. The main ingredient is the character chi of the representation of H that is the homomorphism to GL(r+1), GL(2r+1) or GL(2r). This rule is so powerful that it contains the other rules implemented above as special cases. First let us consider the symmetric fifth power representation of SL(2). :: sage: A1=WeylCharacterRing("A1",style="coroots") sage: chi=A1([5]) sage: chi.degree() 6 sage: chi.frobenius_schur_indicator() -1 This confirms that the character has degree 6 and is symplectic, so it corresponds to a homomorphism SL(2) --> Sp(6), and there is a corresponding branching rule C3 => A1. :: sage: C3 = WeylCharacterRing("C3",style="coroots") sage: sym5rule = branching_rule_from_plethysm(chi,"C3") sage: [C3(hwv).branch(A1,rule=sym5rule) for hwv in C3.fundamental_weights()] [A1(5), A1(4) + A1(8), A1(3) + A1(9)] This is identical to the results we would obtain using rule="symmetric_power". The next example gives a branching not available by other standard rules. :: sage: G2 = WeylCharacterRing("G2",style="coroots") sage: D7 = WeylCharacterRing("D7",style="coroots") sage: ad=G2(0,1); ad.degree(); ad.frobenius_schur_indicator() 14 1 sage: spin = D7(0,0,0,0,0,1,0); spin.degree() 64 sage: spin.branch(G2, rule=branching_rule_from_plethysm(ad, "D7")) G2(1,1) We have confirmed that the adjoint representation of G2 gives a homomorphism into SO(14), and that the pullback of the one of the two 64 dimensional spin representations to SO(14) is an irreducible representation of G2. BRANCHING FROM A REDUCIBLE ROOT SYSTEM If you are branching from a reducible root system, the rule is a list of rules, one for each component type in the root system. The rules in the list are given in pairs [type, rule], where type is the root system to be branched to, and rule is the branching rule. :: sage: D4 = WeylCharacterRing("D4",style="coroots") sage: D2xD2 = WeylCharacterRing("D2xD2",style="coroots") sage: A1xA1xA1xA1 = WeylCharacterRing("A1xA1xA1xA1",style="coroots") sage: rr = [["A1xA1","isomorphic"],["A1xA1","isomorphic"]] sage: [D4(fw) for fw in D4.fundamental_weights()] [D4(1,0,0,0), D4(0,1,0,0), D4(0,0,1,0), D4(0,0,0,1)] sage: [D4(fw).branch(D2xD2,rule="extended").branch(A1xA1xA1xA1,rule=rr) for fw in D4.fundamental_weights()] [A1xA1xA1xA1(0,0,1,1) + A1xA1xA1xA1(1,1,0,0), A1xA1xA1xA1(0,0,0,2) + A1xA1xA1xA1(0,0,2,0) + A1xA1xA1xA1(0,2,0,0) + A1xA1xA1xA1(1,1,1,1) + A1xA1xA1xA1(2,0,0,0), A1xA1xA1xA1(0,1,1,0) + A1xA1xA1xA1(1,0,0,1), A1xA1xA1xA1(0,1,0,1) + A1xA1xA1xA1(1,0,1,0)] WRITING YOUR OWN RULES Suppose you want to branch from a group G to a subgroup H. Arrange the embedding so that a Cartan subalgebra U of H is contained in a Cartan subalgebra T of G. There is thus a mapping from the weight spaces Lie(T)* --> Lie(U)*. Two embeddings will produce identical branching rules if they differ by an element of the Weyl group of H. The RULE is this map Lie(T)* = G.space() to Lie(U)* = H.space(), which you may implement as a function. As an example, let us consider how to implement the branching rule A3 => C2. Here H = C2 = Sp(4) embedded as a subgroup in A3 = GL(4). The Cartan subalgebra U consists of diagonal matrices with eigenvalues u1, u2, -u2, -u1. The C2.space() is the two dimensional vector spaces consisting of the linear functionals u1 and u2 on U. On the other hand Lie(T) is RR^4. A convenient way to see the restriction is to think of it as the adjoint of the map [u1,u2] -> [u1,u2,-u2,-u1], that is, [x0,x1,x2,x3] -> [x0-x3,x1-x2]. Hence we may encode the rule: :: def rule(x): return [x[0]-x[3],x[1]-x[2]] or simply: :: rule = lambda x : [x[0]-x[3],x[1]-x[2]] EXAMPLES:: sage: A3 = WeylCharacterRing(['A',3]) sage: C2 = WeylCharacterRing(['C',2]) sage: rule = lambda x : [x[0]-x[3],x[1]-x[2]] sage: branch_weyl_character(A3([1,1,0,0]),A3,C2,rule) C2(0,0) + C2(1,1) sage: A3(1,1,0,0).branch(C2, rule) == C2(0,0) + C2(1,1) True """ if type(rule) == str: rule = get_branching_rule(R._cartan_type, S._cartan_type, rule) elif R._cartan_type.is_compound(): Rtypes = R._cartan_type.component_types() Stypes = [CartanType(l[0]) for l in rule] rules = [l[1] for l in rule] ntypes = len(Rtypes) rule_list = [get_branching_rule(Rtypes[i], Stypes[i], rules[i]) for i in range(ntypes)] shifts = R._cartan_type._shifts def rule(x): yl = [] for i in range(ntypes): yl.append(rule_list[i](x[shifts[i]:shifts[i+1]])) return flatten(yl) mdict = {} for k in chi._mdict: if S._style == "coroots": if S._cartan_type.is_atomic() and S._cartan_type[0] == 'E': if S._cartan_type[1] == 6: h = S._space(rule(list(k.to_vector()))) h = S.coerce_to_e6(h) elif S._cartan_type[1] == 7: h = S.coerce_to_e7(S._space(rule(list(k.to_vector())))) else: h = S.coerce_to_sl(S._space(rule(list(k.to_vector())))) else: h = S._space(rule(list(k.to_vector()))) if h in mdict: mdict[h] += chi._mdict[k] else: mdict[h] = chi._mdict[k] hdict = S.char_from_weights(mdict) return WeylCharacter(S, hdict, mdict) | 68056760eb3ea24c9f38e98e013d2a603dceb54d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/68056760eb3ea24c9f38e98e013d2a603dceb54d/weyl_characters.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3803,
67,
91,
402,
80,
67,
11560,
12,
24010,
16,
534,
16,
348,
16,
1720,
1546,
1886,
6,
4672,
436,
8395,
432,
15449,
310,
1720,
19605,
326,
9318,
434,
27851,
628,
279,
511,
1385,
1041,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3803,
67,
91,
402,
80,
67,
11560,
12,
24010,
16,
534,
16,
348,
16,
1720,
1546,
1886,
6,
4672,
436,
8395,
432,
15449,
310,
1720,
19605,
326,
9318,
434,
27851,
628,
279,
511,
1385,
1041,... |
lrecs = list(recs) | combined_recs = GuiRecommendations() default_recs = load_defaults('%s_input' % d.input_format) specific_recs = load_specifics(db, book_id) for key in default_recs: combined_recs[key] = default_recs[key] for key in specific_recs: combined_recs[key] = specific_recs[key] for item in user_recs: combined_recs[item[0]] = item[1] save_specifics(db, book_id, combined_recs) lrecs = list(combined_recs.to_recommendations()) | def convert_bulk_ebook(parent, db, book_ids, out_format=None): changed = False jobs = [] bad = [] total = len(book_ids) if total == 0: return None, None, None parent.status_bar.showMessage(_('Starting conversion of %d books') % total, 2000) d = BulkConfig(parent, db, out_format) if d.exec_() != QDialog.Accepted: return jobs, changed, bad output_format = d.output_format recs = cPickle.loads(d.recommendations) book_ids = convert_existing(parent, db, book_ids, output_format) for i, book_id in enumerate(book_ids): temp_files = [] try: d = SingleConfig(parent, db, book_id, None, output_format) d.accept() mi = db.get_metadata(book_id, True) in_file = db.format_abspath(book_id, d.input_format, True) out_file = PersistentTemporaryFile('.' + output_format) out_file.write(output_format) out_file.close() temp_files = [] lrecs = list(recs) if d.opf_file is not None: lrecs.append(('read_metadata_from_opf', d.opf_file.name, OptionRecommendation.HIGH)) temp_files.append(d.opf_file) if d.cover_file is not None: lrecs.append(('cover', d.cover_file.name, OptionRecommendation.HIGH)) temp_files.append(d.cover_file) for x in list(lrecs): if x[0] == 'debug_pipeline': lrecs.remove(x) desc = _('Convert book %d of %d (%s)') % (i + 1, total, repr(mi.title)) args = [in_file, out_file.name, lrecs] temp_files.append(out_file) jobs.append(('gui_convert', args, desc, d.output_format.upper(), book_id, temp_files)) changed = True except NoSupportedInputFormats: bad.append(book_id) if bad != []: res = [] for id in bad: title = db.title(id, True) res.append('%s'%title) msg = '%s' % '\n'.join(res) warning_dialog(parent, _('Could not convert some books'), _('Could not convert %d of %d books, because no suitable ' 'source format was found.') % (len(res), total), msg).exec_() return jobs, changed, bad | 812fae59edbc2245f37125c748d20b892910bd6b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9125/812fae59edbc2245f37125c748d20b892910bd6b/tools.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1765,
67,
14597,
67,
73,
3618,
12,
2938,
16,
1319,
16,
6978,
67,
2232,
16,
596,
67,
2139,
33,
7036,
4672,
3550,
273,
1083,
6550,
273,
5378,
5570,
273,
5378,
225,
2078,
273,
562,
12,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1765,
67,
14597,
67,
73,
3618,
12,
2938,
16,
1319,
16,
6978,
67,
2232,
16,
596,
67,
2139,
33,
7036,
4672,
3550,
273,
1083,
6550,
273,
5378,
5570,
273,
5378,
225,
2078,
273,
562,
12,
... |
print >> sys.stderr, 'OptCheck PASS' | def f(): for x in no_recycling: x[0] = None try: equiv_vals = {} problematic = set() r_vals = {} assert len(thunks) == len(order) | 824f5fa7b84eb253df9a3f639549ef01ca9e7834 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12438/824f5fa7b84eb253df9a3f639549ef01ca9e7834/debugmode.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
284,
13332,
364,
619,
316,
1158,
67,
266,
2431,
830,
310,
30,
619,
63,
20,
65,
273,
599,
775,
30,
1298,
427,
67,
4524,
273,
2618,
6199,
2126,
273,
444,
1435,
436,
67,
4524,
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,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
284,
13332,
364,
619,
316,
1158,
67,
266,
2431,
830,
310,
30,
619,
63,
20,
65,
273,
599,
775,
30,
1298,
427,
67,
4524,
273,
2618,
6199,
2126,
273,
444,
1435,
436,
67,
4524,
273,
2618... | |
response = conn.request("POST", urlparse.urlunparse(protocol, host, path, p, "", f), parameters) | conn.request("POST", urlparse.urlunparse((protocol, host, path, p, "", f)), parameters) response = conn.getresponse() | def _result(self, req, p_sibling_result=None, child_results=[]): """ Attempts to retrieve XML from the URI and return an ElementTree representation of it. """ | 0a6059570d63ff4a3e8d34dd17e0705b9c3aa7aa /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2030/0a6059570d63ff4a3e8d34dd17e0705b9c3aa7aa/http_generator.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2088,
12,
2890,
16,
1111,
16,
293,
67,
22734,
67,
2088,
33,
7036,
16,
1151,
67,
4717,
33,
8526,
4672,
3536,
6020,
9585,
358,
4614,
3167,
628,
326,
3699,
471,
327,
392,
22566,
4335... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
389,
2088,
12,
2890,
16,
1111,
16,
293,
67,
22734,
67,
2088,
33,
7036,
16,
1151,
67,
4717,
33,
8526,
4672,
3536,
6020,
9585,
358,
4614,
3167,
628,
326,
3699,
471,
327,
392,
22566,
4335... |
if info.has_key('title'): if type(info['title']) not in (UnicodeType, ): info['title'] = udecode(info['title']).encode(enc) if info.has_key('description'): if type(info['description']) not in (UnicodeType, ): info['description'] = udecode(info['description']).encode(enc) | encoding = parsed_data.get('encoding', 'ascii') for key in ('description', 'tagline', 'title'): if isinstance(info[key], basestring) and not isinstance(info[key], unicode): info[key] = udecode(info[key], encoding) | def encode(self, parsed_data): # Get site encoding | e11c9872c13a4a486365851f6e035af4bce3aecc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5227/e11c9872c13a4a486365851f6e035af4bce3aecc/SinTool.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2017,
12,
2890,
16,
2707,
67,
892,
4672,
468,
968,
2834,
2688,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2017,
12,
2890,
16,
2707,
67,
892,
4672,
468,
968,
2834,
2688,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
self._old_visible = self.visible self.visible = False | if self._old_visible is None: self._old_visible = self.visible self.visible = False | def normal_mouse_leave(self, event): self._old_visible = self.visible self.visible = False | 8f876c9f4dc6bc568bb1a3d1526a747d56682545 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/13167/8f876c9f4dc6bc568bb1a3d1526a747d56682545/image_inspector_tool.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2212,
67,
11697,
67,
19574,
12,
2890,
16,
871,
4672,
365,
6315,
1673,
67,
8613,
273,
365,
18,
8613,
365,
18,
8613,
273,
1083,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2212,
67,
11697,
67,
19574,
12,
2890,
16,
871,
4672,
365,
6315,
1673,
67,
8613,
273,
365,
18,
8613,
365,
18,
8613,
273,
1083,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
value.decode(join(self._data, "")) | value.decode(data) | def end_dateTime(self, join=string.join): value = DateTime() value.decode(join(self._data, "")) self.append(value) | cd906440fbd0694e165a09262268a608df82deeb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/cd906440fbd0694e165a09262268a608df82deeb/xmlrpclib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
679,
67,
712,
950,
12,
2890,
16,
1233,
33,
1080,
18,
5701,
4672,
460,
273,
3716,
1435,
460,
18,
3922,
12,
892,
13,
365,
18,
6923,
12,
1132,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
679,
67,
712,
950,
12,
2890,
16,
1233,
33,
1080,
18,
5701,
4672,
460,
273,
3716,
1435,
460,
18,
3922,
12,
892,
13,
365,
18,
6923,
12,
1132,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,... |
if amount < 0: | if amount <= 0: | def send_post(self, data, testing=False, amount=NOTSET): """Execute the post to Authorize Net. Params: - data: dictionary as returned by get_standard_charge_data - testing: if true, then don't record the payment Returns: - ProcessorResult """ self.log.info("About to send a request to authorize.net: %(connection)s\n%(logPostString)s", data) | cf8d548e42abb0d06c513df96f11c24ab2bc5436 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/13656/cf8d548e42abb0d06c513df96f11c24ab2bc5436/processor.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1366,
67,
2767,
12,
2890,
16,
501,
16,
7769,
33,
8381,
16,
3844,
33,
4400,
4043,
4672,
3536,
5289,
326,
1603,
358,
23859,
8503,
18,
225,
8861,
30,
300,
501,
30,
3880,
487,
2106,
635,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
67,
2767,
12,
2890,
16,
501,
16,
7769,
33,
8381,
16,
3844,
33,
4400,
4043,
4672,
3536,
5289,
326,
1603,
358,
23859,
8503,
18,
225,
8861,
30,
300,
501,
30,
3880,
487,
2106,
635,
... |
cur_field_name = rev_field_name new_field_name = self.field_name if cur_field_name: | cur_column_id = rev_column_id new_column_id = self.id if cur_column_id: | def get_header(self): """ Displays a sortable column header. | 88e532ecfb9f3e56993bd98da84bb2c03beb5954 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6757/88e532ecfb9f3e56993bd98da84bb2c03beb5954/grids.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
3374,
12,
2890,
4672,
3536,
9311,
87,
279,
18092,
1057,
1446,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
3374,
12,
2890,
4672,
3536,
9311,
87,
279,
18092,
1057,
1446,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
super(StudentInfoForm, self).__init__(user=user, *args, **kwargs) | super(StudentInfoForm, self).__init__(*args, **kwargs) | def __init__(self, user = None, *args, **kwargs): from esp.users.models import ESPUser if user is None or not (hasattr(user, 'other_user') and user.other_user): makeRequired = True else: makeRequired = False | 8017ee2dce98074784d46c6e4d0bb3a35a009b75 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12041/8017ee2dce98074784d46c6e4d0bb3a35a009b75/user_profile.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
729,
273,
599,
16,
380,
1968,
16,
2826,
4333,
4672,
628,
5001,
84,
18,
5577,
18,
7665,
1930,
512,
3118,
1299,
309,
729,
353,
599,
578,
486,
261,
5332,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
729,
273,
599,
16,
380,
1968,
16,
2826,
4333,
4672,
628,
5001,
84,
18,
5577,
18,
7665,
1930,
512,
3118,
1299,
309,
729,
353,
599,
578,
486,
261,
5332,
... |
return matrix(N.divide(other, self.arr)) | return asmatrix(N.divide(other, self.arr)) | def __rdiv__(self, other): try: if other.ndim == 0: return matrix(N.divide(other, self.arr)) else: raise NotImplementedError, "matrix division not yet implemented" except AttributeError: return matrix(N.divide(other, self.arr)) | 9f57eaeaee4fa542932b99f4bea5dc7e44538184 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14925/9f57eaeaee4fa542932b99f4bea5dc7e44538184/matrix.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
86,
2892,
972,
12,
2890,
16,
1308,
4672,
775,
30,
309,
1308,
18,
82,
3509,
422,
374,
30,
327,
487,
5667,
12,
50,
18,
2892,
831,
12,
3011,
16,
365,
18,
5399,
3719,
469,
30,
10... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
86,
2892,
972,
12,
2890,
16,
1308,
4672,
775,
30,
309,
1308,
18,
82,
3509,
422,
374,
30,
327,
487,
5667,
12,
50,
18,
2892,
831,
12,
3011,
16,
365,
18,
5399,
3719,
469,
30,
10... |
all_filters, all_columns, show_display_form, show_customization) | all_filters, all_columns, show_customization) | def render(self, filterspec={}, filter=[], columns=[], sort=[], group=[], show_display_form=1, nodeids=None, show_customization=1): self.filterspec = filterspec | 9c1add44636f634b2798063c55aebb0854afb265 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/9c1add44636f634b2798063c55aebb0854afb265/htmltemplate.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1743,
12,
2890,
16,
1034,
2793,
28793,
1034,
22850,
6487,
2168,
22850,
6487,
1524,
22850,
6487,
1041,
22850,
6487,
2405,
67,
5417,
67,
687,
33,
21,
16,
756,
2232,
33,
7036,
16,
2405,
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,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1743,
12,
2890,
16,
1034,
2793,
28793,
1034,
22850,
6487,
2168,
22850,
6487,
1524,
22850,
6487,
1041,
22850,
6487,
2405,
67,
5417,
67,
687,
33,
21,
16,
756,
2232,
33,
7036,
16,
2405,
67,... |
return [],[] else: | phantom=False if not phantom: | def _bom_explode(self, cr, uid, bom, factor, properties, addthis=False, level=10): factor = factor / (bom.product_efficiency or 1.0) factor = rounding(factor, bom.product_rounding) if factor<bom.product_rounding: factor = bom.product_rounding result = [] result2 = [] if bom.type=='phantom' and not bom.bom_lines: newbom = self._bom_find(cr, uid, bom.product_id.id, bom.product_uom.id, properties) if newbom: res = self._bom_explode(cr, uid, self.browse(cr, uid, [newbom])[0], factor*bom.product_qty, properties, addthis=True, level=level+10) result = result + res[0] result2 = result2 + res[1] else: return [],[] else: if addthis and not bom.bom_lines: result.append( { 'name': bom.product_id.name, 'product_id': bom.product_id.id, 'product_qty': bom.product_qty * factor, 'product_uom': bom.product_uom.id, 'product_uos_qty': bom.product_uos and bom.product_uos_qty * factor or False, 'product_uos': bom.product_uos and bom.product_uos.id or False, }) if bom.routing_id: for wc_use in bom.routing_id.workcenter_lines: wc = wc_use.workcenter_id d, m = divmod(factor, wc_use.workcenter_id.capacity_per_cycle) cycle = (d + (m and 1.0 or 0.0)) * wc_use.cycle_nbr result2.append({ 'name': bom.routing_id.name, 'workcenter_id': wc.id, 'sequence': level, 'cycle': cycle, 'hour': float(wc_use.hour_nbr + (wc.time_start+wc.time_stop+cycle*wc.time_cycle) * (wc.time_efficiency or 1.0)), }) for bom2 in bom.bom_lines: res = self._bom_explode(cr, uid, bom2, factor, properties, addthis=True, level=level+10) result = result + res[0] result2 = result2 + res[1] return result, result2 | 3a240624d0c25871cae5749fc2d923109528a0a0 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/3a240624d0c25871cae5749fc2d923109528a0a0/mrp.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
70,
362,
67,
2749,
2034,
12,
2890,
16,
4422,
16,
4555,
16,
28626,
16,
5578,
16,
1790,
16,
527,
2211,
33,
8381,
16,
1801,
33,
2163,
4672,
5578,
273,
5578,
342,
261,
70,
362,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
70,
362,
67,
2749,
2034,
12,
2890,
16,
4422,
16,
4555,
16,
28626,
16,
5578,
16,
1790,
16,
527,
2211,
33,
8381,
16,
1801,
33,
2163,
4672,
5578,
273,
5578,
342,
261,
70,
362,
18,
... |
def dprint(str=''): | def writeToLog(logfh, text): | def dprint(str=''): if TRACING: _traceoff() caller=inspect.stack()[1] try: namespace=caller[0].f_locals if 'self' in namespace: cls=namespace['self'].__class__.__name__+'.' else: cls='' if isinstance(str, unicode): str = str.encode("utf-8") dlogfh.write("%s:%d %s%s: %s%s" % (os.path.basename(caller[1]),caller[2],cls,caller[3],str,os.linesep)) finally: del caller if TRACING: _traceon() return True | 8f5b7f0ca129204ff5878e55f9ec1fee212ec24d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11522/8f5b7f0ca129204ff5878e55f9ec1fee212ec24d/debug.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12870,
1343,
12,
1330,
19260,
16,
977,
4672,
309,
4235,
2226,
1360,
30,
389,
5129,
3674,
1435,
4894,
33,
12009,
18,
3772,
1435,
63,
21,
65,
775,
30,
1981,
33,
16140,
63,
20,
8009,
74,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12870,
1343,
12,
1330,
19260,
16,
977,
4672,
309,
4235,
2226,
1360,
30,
389,
5129,
3674,
1435,
4894,
33,
12009,
18,
3772,
1435,
63,
21,
65,
775,
30,
1981,
33,
16140,
63,
20,
8009,
74,
... |
self.on_hotplug.append(self.createConfig) | def __init__(self): self.last_modes_preferred = [ ] self.on_hotplug = CList() | c797d4040a1dfac3873b481111a84a5c557432f3 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6652/c797d4040a1dfac3873b481111a84a5c557432f3/VideoHardware.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
365,
18,
2722,
67,
19282,
67,
23616,
273,
225,
306,
308,
365,
18,
265,
67,
15224,
22045,
273,
385,
682,
1435,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
365,
18,
2722,
67,
19282,
67,
23616,
273,
225,
306,
308,
365,
18,
265,
67,
15224,
22045,
273,
385,
682,
1435,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-1... | |
def on_link_click(self, type): | def on_link_click(self, linktype): | def on_link_click(self, type): browser_not_loaded = False if type == 'artist': browser_not_loaded = not misc.browser_load("http://www.wikipedia.org/wiki/Special:Search/" + urllib.quote(mpdh.get(self.songinfo, 'artist')), self.config.url_browser, self.window) elif type == 'album': browser_not_loaded = not misc.browser_load("http://www.wikipedia.org/wiki/Special:Search/" + urllib.quote(mpdh.get(self.songinfo, 'album')), self.config.url_browser, self.window) elif type == 'edit': if self.songinfo: self.on_tags_edit(None) elif type == 'search': self.on_lyrics_search(None) elif type == 'editlyrics': browser_not_loaded = not misc.browser_load(self.info.lyricwiki_editlink(self.songinfo), self.config.url_browser, self.window) if browser_not_loaded: ui.show_msg(self.window, _('Unable to launch a suitable browser.'), _('Launch Browser'), 'browserLoadError', gtk.BUTTONS_CLOSE) | a611157e0fc7d242d58df67886095dce4cc46388 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2312/a611157e0fc7d242d58df67886095dce4cc46388/main.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
67,
1232,
67,
7475,
12,
2890,
16,
1692,
723,
4672,
4748,
67,
902,
67,
4230,
273,
1083,
309,
618,
422,
296,
25737,
4278,
4748,
67,
902,
67,
4230,
273,
486,
20448,
18,
11213,
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,
603,
67,
1232,
67,
7475,
12,
2890,
16,
1692,
723,
4672,
4748,
67,
902,
67,
4230,
273,
1083,
309,
618,
422,
296,
25737,
4278,
4748,
67,
902,
67,
4230,
273,
486,
20448,
18,
11213,
67,
... |
def __init__(self, master=None, cnf={}, **kw): | def __init__(self, master=None, cnf=None, **kw): if cnf is None: cnf = {} | def __init__(self, master=None, cnf={}, **kw): if kw: cnf = _cnfmerge((cnf, kw)) fcnf = {} for k in cnf.keys(): if type(k) == ClassType or k == 'name': fcnf[k] = cnf[k] del cnf[k] self.frame = apply(Frame, (master,), fcnf) self.vbar = Scrollbar(self.frame, name='vbar') self.vbar.pack(side=RIGHT, fill=Y) cnf['name'] = 'text' apply(Text.__init__, (self, self.frame), cnf) self.pack(side=LEFT, fill=BOTH, expand=1) self['yscrollcommand'] = self.vbar.set self.vbar['command'] = self.yview | c5a4d6bcfcb31c35941aedab35629e7dd3bcaac5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/c5a4d6bcfcb31c35941aedab35629e7dd3bcaac5/ScrolledText.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
4171,
33,
7036,
16,
23118,
33,
7036,
16,
2826,
9987,
4672,
309,
23118,
353,
599,
30,
23118,
273,
2618,
309,
5323,
30,
23118,
273,
389,
10305,
74,
2702,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4171,
33,
7036,
16,
23118,
33,
7036,
16,
2826,
9987,
4672,
309,
23118,
353,
599,
30,
23118,
273,
2618,
309,
5323,
30,
23118,
273,
389,
10305,
74,
2702,
1... |
self.message("Updating the Latest table... 3/3") | def migrate(self): self.message("Updating the Latest table... 1/3") self.cu.execute("ALTER TABLE Latest ADD COLUMN " "latestType INTEGER NOT NULL") self.db.dropIndex("Latest", "LatestIdx") self.db.loadSchema() createLatest(self.db) | bbfff219ccf39d00feb8bc71bdaf370b147dfb15 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8747/bbfff219ccf39d00feb8bc71bdaf370b147dfb15/schema.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13187,
12,
2890,
4672,
365,
18,
2150,
2932,
17858,
326,
29830,
1014,
2777,
404,
19,
23,
7923,
365,
18,
6319,
18,
8837,
2932,
18843,
7567,
29830,
11689,
13473,
315,
315,
13550,
559,
1377,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13187,
12,
2890,
4672,
365,
18,
2150,
2932,
17858,
326,
29830,
1014,
2777,
404,
19,
23,
7923,
365,
18,
6319,
18,
8837,
2932,
18843,
7567,
29830,
11689,
13473,
315,
315,
13550,
559,
1377,
... | |
os.write(handle, contents) | os.write(handle, contents.encode('utf-8')) | def preview_changes(self, req, page): """ Preview suggested changes. """ page_id = self.env.get_real_filename(page) if page_id is None: raise NotFound() author = req.form.get('name') email = req.form.get('email') contents = req.form.get('contents') | 19eade9b10e3b3980bcdd1c9e30202dcf87b9a6b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5620/19eade9b10e3b3980bcdd1c9e30202dcf87b9a6b/application.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10143,
67,
6329,
12,
2890,
16,
1111,
16,
1363,
4672,
3536,
22289,
22168,
3478,
18,
3536,
1363,
67,
350,
273,
365,
18,
3074,
18,
588,
67,
7688,
67,
3459,
12,
2433,
13,
309,
1363,
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,
10143,
67,
6329,
12,
2890,
16,
1111,
16,
1363,
4672,
3536,
22289,
22168,
3478,
18,
3536,
1363,
67,
350,
273,
365,
18,
3074,
18,
588,
67,
7688,
67,
3459,
12,
2433,
13,
309,
1363,
67,
... |
if __name__ == "__main__": app = MainWindow() app.main() | def main(self): gtk.main() | 337e2628519817abde9df50dbed69c769add8439 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2651/337e2628519817abde9df50dbed69c769add8439/arkadas.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
12,
2890,
4672,
22718,
18,
5254,
1435,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
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,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
12,
2890,
4672,
22718,
18,
5254,
1435,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... | |
result = self.jobDB.selectJobs( {'Status':'Failed', 'MinorStatus': minor } ) | result = self.jobDB.selectJobs( {'Status':'Failed', 'MinorStatus': minor, 'AccountedFlag': 'False' } ) | def __failStalledJobs( self, failedTime ): """ Changes the Stalled status to Failed for jobs long in the Stalled status """ | e611f774225fa663926967220039f0f76b231367 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/e611f774225fa663926967220039f0f76b231367/StalledJobAgent.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
6870,
510,
4502,
7276,
12,
365,
16,
2535,
950,
262,
30,
3536,
17776,
326,
934,
4502,
1267,
358,
11175,
364,
6550,
1525,
316,
326,
934,
4502,
1267,
3536,
2,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
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,
6870,
510,
4502,
7276,
12,
365,
16,
2535,
950,
262,
30,
3536,
17776,
326,
934,
4502,
1267,
358,
11175,
364,
6550,
1525,
316,
326,
934,
4502,
1267,
3536,
2,
-100,
-100,
-100,
-100,
... |
for mF in ( 'startime', 'endtime' ): | for mF in ( 'starttime', 'endtime' ): | def convertUTCToLocal( metadata, data ): """ Convert epoch times from utc to local bucketsData must be a list of lists where each list contains - field 0: datetime - field 1: bucketLength - fields 2-n: numericalFields """ for mF in ( 'startime', 'endtime' ): if mF in metadata: metadata[ mF ] = metadata[ mF ] - time.altzone for kF in data: convertedData = {} for iP in data[ kF ]: convertedData[ iP - time.altzone ] = data[kF][iP] data[kF] = convertedData return metadata, data | 137f3ee65ed1005fd43580751a807b9e233e814a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12864/137f3ee65ed1005fd43580751a807b9e233e814a/Plots.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1765,
11471,
774,
2042,
12,
1982,
16,
501,
262,
30,
3536,
4037,
7632,
4124,
628,
9439,
358,
1191,
9169,
751,
1297,
506,
279,
666,
434,
6035,
1625,
1517,
666,
1914,
300,
652,
374,
30,
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,
1765,
11471,
774,
2042,
12,
1982,
16,
501,
262,
30,
3536,
4037,
7632,
4124,
628,
9439,
358,
1191,
9169,
751,
1297,
506,
279,
666,
434,
6035,
1625,
1517,
666,
1914,
300,
652,
374,
30,
3... |
s1 = os.stat(path) s2 = os.stat(join(path, '..')) | s1 = os.lstat(path) s2 = os.lstat(join(path, '..')) | def ismount(path): """Test whether a path is a mount point""" try: s1 = os.stat(path) s2 = os.stat(join(path, '..')) except os.error: return False # It doesn't exist -- so not a mount point :-) dev1 = s1.st_dev dev2 = s2.st_dev if dev1 != dev2: return True # path/.. on a different device as path ino1 = s1.st_ino ino2 = s2.st_ino if ino1 == ino2: return True # path/.. is the same i-node as path return False | 12f03ccece461264acbddea8c9db9a85614483be /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8546/12f03ccece461264acbddea8c9db9a85614483be/posixpath.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
353,
4778,
12,
803,
4672,
3536,
4709,
2856,
279,
589,
353,
279,
5344,
1634,
8395,
775,
30,
272,
21,
273,
1140,
18,
80,
5642,
12,
803,
13,
272,
22,
273,
1140,
18,
80,
5642,
12,
5701,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
353,
4778,
12,
803,
4672,
3536,
4709,
2856,
279,
589,
353,
279,
5344,
1634,
8395,
775,
30,
272,
21,
273,
1140,
18,
80,
5642,
12,
803,
13,
272,
22,
273,
1140,
18,
80,
5642,
12,
5701,
... |
termStr = """<span rel="rdfs:subClassOf" href="%s"><a href=" | termStr = """<span rel="rdfs:subClassOf" href="%s"><a href=" | def termlist(self): """Term List for html doc""" queries = '' c_ids, p_ids = self.vocab.azlist() tl = """<div class="termlist">""" tl = """%s<h3>Classes and Properties (full detail)</h3>\n<div class='termdetails'><br />\n\n""" % tl # first classes, then properties eg = """<div class="specterm" id="term_%s" about="%s" typeof="%s"> <h3>%s: %s</h3> <em>%s</em> - %s <br /><table style="th { float: top; }"> <tr><th>Status:</th> <td><span rel="vs:status" href="http://www.w3.org/2003/06/sw-vocab-status/ns#%s">%s</span></td></tr> %s %s </table> %s <p style="float: right; font-size: small;">[<a href="#term_%s">#</a>] <!-- %s --> [<a href="#glance">back to top</a>]</p> <br/> </div>""" | 7097fb263011e2b399e0c0f1c08ffe8279110249 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3661/7097fb263011e2b399e0c0f1c08ffe8279110249/libvocab.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
19272,
781,
376,
12,
2890,
4672,
3536,
4065,
987,
364,
1729,
997,
8395,
6218,
273,
875,
276,
67,
2232,
16,
293,
67,
2232,
273,
365,
18,
15913,
18,
1561,
1098,
1435,
8332,
273,
3536,
32... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
19272,
781,
376,
12,
2890,
4672,
3536,
4065,
987,
364,
1729,
997,
8395,
6218,
273,
875,
276,
67,
2232,
16,
293,
67,
2232,
273,
365,
18,
15913,
18,
1561,
1098,
1435,
8332,
273,
3536,
32... |
- a list containing the projective points of X of height up to B, sorted. | - a list containing the projective points of ``X`` of height up to ``B``, sorted. | def enum_projective_rational_field(X,B): """ Enumerates projective, rational points on scheme X of height up to bound B. INPUT: - ``X`` - a scheme or set of abstract rational points of a scheme. - ``B`` - a positive integer bound OUTPUT: - a list containing the projective points of X of height up to B, sorted. EXAMPLES:: sage: P.<X,Y,Z> = ProjectiveSpace(2,QQ) sage: C = P.subscheme([X+Y-Z]) sage: from sage.schemes.generic.rational_point import enum_projective_rational_field sage: enum_projective_rational_field(C(QQ),6) [(-5 : 6 : 1), (-4 : 5 : 1), (-3 : 4 : 1), (-2 : 3 : 1), (-3/2 : 5/2 : 1), (-1 : 1 : 0), (-1 : 2 : 1), (-2/3 : 5/3 : 1), (-1/2 : 3/2 : 1), (-1/3 : 4/3 : 1), (-1/4 : 5/4 : 1), (-1/5 : 6/5 : 1), (0 : 1 : 1), (1/6 : 5/6 : 1), (1/5 : 4/5 : 1), (1/4 : 3/4 : 1), (1/3 : 2/3 : 1), (2/5 : 3/5 : 1), (1/2 : 1/2 : 1), (3/5 : 2/5 : 1), (2/3 : 1/3 : 1), (3/4 : 1/4 : 1), (4/5 : 1/5 : 1), (5/6 : 1/6 : 1), (1 : 0 : 1), (6/5 : -1/5 : 1), (5/4 : -1/4 : 1), (4/3 : -1/3 : 1), (3/2 : -1/2 : 1), (5/3 : -2/3 : 1), (2 : -1 : 1), (5/2 : -3/2 : 1), (3 : -2 : 1), (4 : -3 : 1), (5 : -4 : 1), (6 : -5 : 1)] sage: enum_projective_rational_field(C,6) == enum_projective_rational_field(C(QQ),6) True :: sage: P3.<W,X,Y,Z> = ProjectiveSpace(3,QQ) sage: enum_projective_rational_field(P3,1) [(-1 : -1 : -1 : 1), (-1 : -1 : 0 : 1), (-1 : -1 : 1 : 0), (-1 : -1 : 1 : 1), (-1 : 0 : -1 : 1), (-1 : 0 : 0 : 1), (-1 : 0 : 1 : 0), (-1 : 0 : 1 : 1), (-1 : 1 : -1 : 1), (-1 : 1 : 0 : 0), (-1 : 1 : 0 : 1), (-1 : 1 : 1 : 0), (-1 : 1 : 1 : 1), (0 : -1 : -1 : 1), (0 : -1 : 0 : 1), (0 : -1 : 1 : 0), (0 : -1 : 1 : 1), (0 : 0 : -1 : 1), (0 : 0 : 0 : 1), (0 : 0 : 1 : 0), (0 : 0 : 1 : 1), (0 : 1 : -1 : 1), (0 : 1 : 0 : 0), (0 : 1 : 0 : 1), (0 : 1 : 1 : 0), (0 : 1 : 1 : 1), (1 : -1 : -1 : 1), (1 : -1 : 0 : 1), (1 : -1 : 1 : 0), (1 : -1 : 1 : 1), (1 : 0 : -1 : 1), (1 : 0 : 0 : 0), (1 : 0 : 0 : 1), (1 : 0 : 1 : 0), (1 : 0 : 1 : 1), (1 : 1 : -1 : 1), (1 : 1 : 0 : 0), (1 : 1 : 0 : 1), (1 : 1 : 1 : 0), (1 : 1 : 1 : 1)] ALGORITHM: We just check all possible projective points in correct dimension of projective space to see if they lie on X. AUTHORS: John Cremona and Charlie Turner (06-2010) """ if is_Scheme(X): X = X(X.base_ring()) n = X.codomain().ambient_space().ngens()-1 zero=tuple([0 for _ in range(n+1)]) | 4968c6606a1d4065f615cfb67c0adf8d6828df4e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/4968c6606a1d4065f615cfb67c0adf8d6828df4e/rational_point.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2792,
67,
4406,
688,
67,
7034,
287,
67,
1518,
12,
60,
16,
38,
4672,
3536,
6057,
264,
815,
1984,
688,
16,
436,
8371,
3143,
603,
4355,
1139,
434,
2072,
731,
358,
2489,
605,
18,
225,
12... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2792,
67,
4406,
688,
67,
7034,
287,
67,
1518,
12,
60,
16,
38,
4672,
3536,
6057,
264,
815,
1984,
688,
16,
436,
8371,
3143,
603,
4355,
1139,
434,
2072,
731,
358,
2489,
605,
18,
225,
12... |
find(ob.PrincipiaSearchSource(), obj_searchterm) >= 0 | string.find(ob.PrincipiaSearchSource(), obj_searchterm) >= 0 | def ZopeFindAndApply(self, obj, obj_ids=None, obj_metatypes=None, obj_searchterm=None, obj_expr=None, obj_mtime=None, obj_mspec=None, obj_permission=None, obj_roles=None, search_sub=0, REQUEST=None, result=None, pre='', apply_func=None, apply_path=''): """Zope Find interface and apply | 7a7e961113aa82943bda0b80ae0d82c6e931a54d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/7a7e961113aa82943bda0b80ae0d82c6e931a54d/ZCatalog.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2285,
1306,
3125,
1876,
7001,
12,
2890,
16,
1081,
16,
1081,
67,
2232,
33,
7036,
16,
1081,
67,
10578,
13373,
33,
7036,
16,
1081,
67,
3072,
6408,
33,
7036,
16,
1081,
67,
8638,
33,
7036,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2285,
1306,
3125,
1876,
7001,
12,
2890,
16,
1081,
16,
1081,
67,
2232,
33,
7036,
16,
1081,
67,
10578,
13373,
33,
7036,
16,
1081,
67,
3072,
6408,
33,
7036,
16,
1081,
67,
8638,
33,
7036,
... |
occured. Please put there the version of sageq at the time of deprecation. | occurred. Please put there the version of sage at the time of deprecation. | def deprecation(message, version=None): r""" Issue a deprecation warning. INPUT: - ``message`` - an explanation why things are deprecated and by what it should be replaced. - ``version`` - (optional) on which version and when the deprecation occured. Please put there the version of sageq at the time of deprecation. EXAMPLES:: sage: def foo(): ... sage.misc.misc.deprecation("The function foo is replaced by bar.") sage: foo() doctest:...: DeprecationWarning: The function foo is replaced by bar. sage: def bar(): ... sage.misc.misc.deprecation("The function bar is removed.", ... 'Sage Version 4.2') sage: bar() doctest:...: DeprecationWarning: (Since Sage Version 4.2) The function bar is removed. """ # Stack level 3 to get the line number of the code which called # the deprecated function which called this function. if version is not None: message = "(Since " + version + ") " + message warn(message, DeprecationWarning, stacklevel=3) | d0f200e83e34bef4894fcde4f074509b55cc1799 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/d0f200e83e34bef4894fcde4f074509b55cc1799/misc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
20097,
12,
2150,
16,
1177,
33,
7036,
4672,
436,
8395,
11820,
279,
20097,
3436,
18,
225,
12943,
30,
225,
300,
12176,
2150,
10335,
300,
392,
21285,
11598,
9198,
854,
6849,
471,
635,
4121,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
20097,
12,
2150,
16,
1177,
33,
7036,
4672,
436,
8395,
11820,
279,
20097,
3436,
18,
225,
12943,
30,
225,
300,
12176,
2150,
10335,
300,
392,
21285,
11598,
9198,
854,
6849,
471,
635,
4121,
... |
global _notfound | def _execvpe(file, args, env=None): if env is not None: func = execve argrest = (args, env) else: func = execv argrest = (args,) env = environ global _notfound head, tail = path.split(file) if head: apply(func, (file,) + argrest) return if 'PATH' in env: envpath = env['PATH'] else: envpath = defpath PATH = envpath.split(pathsep) if not _notfound: if sys.platform[:4] == 'beos': # Process handling (fork, wait) under BeOS (up to 5.0) # doesn't interoperate reliably with the thread interlocking # that happens during an import. The actual error we need # is the same on BeOS for posix.open() et al., ENOENT. try: unlink('/_#.# ## #.#') except error, _notfound: pass else: import tempfile t = tempfile.mktemp() # Exec a file that is guaranteed not to exist try: execv(t, ('blah',)) except error, _notfound: pass exc, arg = error, _notfound for dir in PATH: fullname = path.join(dir, file) try: apply(func, (fullname,) + argrest) except error, (errno, msg): if errno != arg[0]: exc, arg = error, (errno, msg) raise exc, arg | aed51d8121f321e37274171b695cd0e3876465c6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/aed51d8121f321e37274171b695cd0e3876465c6/os.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
4177,
90,
347,
12,
768,
16,
833,
16,
1550,
33,
7036,
4672,
309,
1550,
353,
486,
599,
30,
1326,
273,
1196,
537,
1501,
8792,
273,
261,
1968,
16,
1550,
13,
469,
30,
1326,
273,
1196... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4177,
90,
347,
12,
768,
16,
833,
16,
1550,
33,
7036,
4672,
309,
1550,
353,
486,
599,
30,
1326,
273,
1196,
537,
1501,
8792,
273,
261,
1968,
16,
1550,
13,
469,
30,
1326,
273,
1196... | |
if args and "-w" in args: | if options.no_webbrowser: | def main( args ): change_to_main_dir() cherrypy.config.update( Common.settings ) if args and "-d" in args: from config import Development settings = Development.settings # sys.frozen is from py2exe elif args and "-l" in args or hasattr( sys, "frozen" ): from config import Desktop settings = Desktop.settings else: from config import Production settings = Production.settings cherrypy.config.update( settings ) # Don't launch web browser if -w flag is set if args and "-w" in args: launch_browser = False else: launch_browser = cherrypy.config.configMap[ u"global" ].get( u"luminotes.launch_browser" ) socket.setdefaulttimeout( INITIAL_SOCKET_TIMEOUT_SECONDS ) port_filename = cherrypy.config.configMap[ u"global" ].get( u"luminotes.port_file" ) socket_port = cherrypy.config.configMap[ u"global" ].get( u"server.socket_port" ) existing_socket_port = port_filename and os.path.exists( port_filename ) and file( port_filename ).read() or socket_port server_url = u"http://localhost:%s/" % existing_socket_port server_present = True # if requested, attempt to shutdown an existing server and exit if args and "-k" in args: try: urllib.urlopen( "%sshutdown" % server_url ) except urllib.URLError: pass sys.exit( 0 ) # check to see if the server is already running try: urllib.urlopen( "%sping" % server_url ) except urllib.URLError: server_present = False if server_present is True: print "Luminotes server is already running. aborting" if launch_browser is True: webbrowser.open_new( server_url ) sys.exit( 0 ) server_url = u"http://localhost:%s/" % socket_port # remove the existing log files, if any try: log_access_file = cherrypy.config.configMap[ u"global" ].get( u"server.log_access_file" ) if log_access_file: os.remove( log_access_file ) except OSError: pass try: log_file = cherrypy.config.configMap[ u"global" ].get( u"server.log_file" ) if log_file: os.remove( log_file ) except OSError: pass socket.setdefaulttimeout( SOCKET_TIMEOUT_SECONDS ) database = Database( host = cherrypy.config.configMap[ u"global" ].get( u"luminotes.db_host" ), ssl_mode = cherrypy.config.configMap[ u"global" ].get( u"luminotes.db_ssl_mode" ), ) # if necessary, upgrade the database schema to match this current version of the code schema_upgrader = Schema_upgrader( database ) schema_upgrader.upgrade_schema( to_version = VERSION ) cherrypy.lowercase_api = True root = Root( database, cherrypy.config.configMap ) cherrypy.root = root cherrypy.server.start_with_callback( callback, ( log_access_file, log_file, server_url, port_filename, socket_port, launch_browser ) ) | 3486ddedbe23834090e40961d0b36e4dcea7dc51 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6754/3486ddedbe23834090e40961d0b36e4dcea7dc51/luminotes.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
12,
833,
262,
30,
2549,
67,
869,
67,
5254,
67,
1214,
1435,
225,
462,
370,
28398,
18,
1425,
18,
2725,
12,
5658,
18,
4272,
262,
225,
309,
833,
471,
3701,
72,
6,
316,
833,
30,
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,
2774,
12,
833,
262,
30,
2549,
67,
869,
67,
5254,
67,
1214,
1435,
225,
462,
370,
28398,
18,
1425,
18,
2725,
12,
5658,
18,
4272,
262,
225,
309,
833,
471,
3701,
72,
6,
316,
833,
30,
6... |
if data['result'].has_key("captcha"): captype = data['result']['captcha']['type'] id = data['result']['captcha']['id'] | if data.has_key("captcha"): captype = data['captcha']['type'] id = data['captcha']['id'] | def solveCaptcha(self, data): if type(data) == dict: # API Mode result if data['result'].has_key("captcha"): captype = data['result']['captcha']['type'] id = data['result']['captcha']['id'] if captype in ['simple', 'math', 'question']: answer = input('What is the answer to the captcha "%s" ?' % data['result']['captcha']['question']) elif captype == 'image': url = self.protocol() + '://' + self.hostname() + self.captcha_image_address(id) answer = ui.askForCaptcha(url) else: #no captcha id result, maybe ReCaptcha. raise CaptchaError('We have been prompted for a ReCaptcha, but pywikipedia does not yet support ReCaptchas') return {'id':id, 'answer':answer} return None else: captchaW = re.compile('<label for="wpCaptchaWord">(?P<question>[^<]*)</label>') captchaR = re.compile('<input type="hidden" name="wpCaptchaId" id="wpCaptchaId" value="(?P<id>\d+)" />') match = captchaR.search(data) if match: id = match.group('id') match = captchaW.search(data) if match: answer = input('What is the answer to the captcha "%s" ?' % match.group('question')) else: if not config.solve_captcha: raise CaptchaError(id) url = self.protocol() + '://' + self.hostname() + self.captcha_image_address(id) answer = ui.askForCaptcha(url) return {'id':id, 'answer':answer} Recaptcha = re.compile('<script type="text/javascript" src="http://api\.recaptcha\.net/[^"]*"></script>') if Recaptcha.search(data): raise CaptchaError('We have been prompted for a ReCaptcha, but pywikipedia does not yet support ReCaptchas') return None | a9c13738b1b5c85b2f392d56a95826baae0cb816 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4404/a9c13738b1b5c85b2f392d56a95826baae0cb816/wikipedia.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12439,
26837,
12,
2890,
16,
501,
4672,
309,
618,
12,
892,
13,
422,
2065,
30,
468,
1491,
8126,
563,
309,
501,
18,
5332,
67,
856,
2932,
27267,
6,
4672,
9656,
388,
273,
501,
3292,
27267,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12439,
26837,
12,
2890,
16,
501,
4672,
309,
618,
12,
892,
13,
422,
2065,
30,
468,
1491,
8126,
563,
309,
501,
18,
5332,
67,
856,
2932,
27267,
6,
4672,
9656,
388,
273,
501,
3292,
27267,
... |
print >> f, "%_topdir %( echo", RPMBUILD_HOME, ")" print >> f, "%_tmppath %{_topdir}/tmp" | print >> f, "%_topdir %( echo", os.path.join(cwd, RPMBUILD_HOME), ")" print >> f, "%_tmppath %( echo", os.path.join(cwd, RPMBUILD_HOME, "tmp"), ")" | def setup_rpmbuild(): """ Prepare local rpmbuild directory. """ cleanup_rpm() os.mkdir(RPMBUILD_HOME) for d in [ 'BUILD', 'SOURCES', 'SPECS', 'SRPMS', 'tmp', 'RPMS' ]: os.mkdir(os.path.join(RPMBUILD_HOME, d)) cwd = os.getcwd() os.chdir(os.path.join(RPMBUILD_HOME, 'RPMS')) for d in [ 'i386', 'i586', 'i686', 'noarch', 'x86_64' ]: os.mkdir(d) os.chdir(cwd) # Create ~/.rpmmacros fname = os.path.join(os.path.expanduser("~"), ".rpmmacros"); try: f = open(fname, "w") print >> f, "%_topdir %( echo", RPMBUILD_HOME, ")" print >> f, "%_tmppath %{_topdir}/tmp" print >> f print >> f, "%packager Christiam E. Camacho (camacho@ncbi.nlm.nih.gov)" finally: f.close() if verbose: print "Created ~/.rpmmacros" | f92405ae22c50a96730129b94e2496921b919d78 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/310/f92405ae22c50a96730129b94e2496921b919d78/make_rpm.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3875,
67,
13832,
1627,
680,
13332,
3536,
7730,
1191,
8715,
1627,
680,
1867,
18,
3536,
6686,
67,
86,
7755,
1435,
1140,
18,
26686,
12,
54,
12728,
20215,
67,
14209,
13,
364,
302,
316,
306,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3875,
67,
13832,
1627,
680,
13332,
3536,
7730,
1191,
8715,
1627,
680,
1867,
18,
3536,
6686,
67,
86,
7755,
1435,
1140,
18,
26686,
12,
54,
12728,
20215,
67,
14209,
13,
364,
302,
316,
306,
... |
descr='''Check if privilege list is up to date after group deletion''' ''' (fix | descr='''Check if privilege list is up to date after group deletion ''' '''(fix | def chk_acls_cmds(group, subdir=None): return [ 'getfacl', '-R', '%s/%s/%s%s' % ( configuration.defaults.home_base_path, configuration.groups.names.plural, group, '/%s' % subdir if subdir else '') ] | 38a496a61795ec7fb8b2f6589579ac75d0b90d9d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/38a496a61795ec7fb8b2f6589579ac75d0b90d9d/core.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
15000,
67,
69,
6429,
67,
24680,
12,
1655,
16,
16921,
33,
7036,
4672,
327,
306,
296,
588,
507,
830,
2187,
2400,
54,
2187,
1995,
87,
5258,
87,
5258,
87,
9,
87,
11,
738,
261,
1664,
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,
15000,
67,
69,
6429,
67,
24680,
12,
1655,
16,
16921,
33,
7036,
4672,
327,
306,
296,
588,
507,
830,
2187,
2400,
54,
2187,
1995,
87,
5258,
87,
5258,
87,
9,
87,
11,
738,
261,
1664,
18,
... |
filename = os.path.realpath(filename) | def recognize_directory(self, filename): """ Determine what to do with a directory. """ basename = os.path.split(filename)[-1] if (self.skip_hidden_dirs and basename.startswith('.') and basename not in ('.', '..')): return 'skip' if self.skip_symlink_dirs and os.path.islink(filename): return 'link' if basename in self.skip_dirs: return 'skip' # Follow any possible symlink to the real file in order to check its # permissions. filename = os.path.realpath(filename) if os.access(filename, os.R_OK|os.X_OK): return 'directory' | 51d932db446e0142e0d3d9d4bedea80519297966 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10903/51d932db446e0142e0d3d9d4bedea80519297966/grin.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
21431,
67,
5149,
12,
2890,
16,
1544,
4672,
3536,
10229,
4121,
358,
741,
598,
279,
1867,
18,
3536,
4882,
273,
1140,
18,
803,
18,
4939,
12,
3459,
13,
18919,
21,
65,
309,
261,
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,
21431,
67,
5149,
12,
2890,
16,
1544,
4672,
3536,
10229,
4121,
358,
741,
598,
279,
1867,
18,
3536,
4882,
273,
1140,
18,
803,
18,
4939,
12,
3459,
13,
18919,
21,
65,
309,
261,
2890,
18,
... | |
self._reflect_table() | if 'primaryjoin' not in self.kwargs or \ 'secondaryjoin' not in self.kwargs: self._build_join_clauses() | def create_tables(self): # Warning: if the table was specified manually, the join clauses won't # be computed. We might want to autodetect joins based on fk, as for # autoloaded entities if self.secondary_table: self._reflect_table() return | f17bbe0181fb7042a4b1a289d48201e73ea09dc2 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11921/f17bbe0181fb7042a4b1a289d48201e73ea09dc2/relationships.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
67,
9373,
12,
2890,
4672,
468,
9728,
30,
309,
326,
1014,
1703,
1269,
10036,
16,
326,
1233,
14093,
8462,
1404,
468,
506,
8470,
18,
1660,
4825,
2545,
358,
2059,
369,
278,
386,
13471,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
9373,
12,
2890,
4672,
468,
9728,
30,
309,
326,
1014,
1703,
1269,
10036,
16,
326,
1233,
14093,
8462,
1404,
468,
506,
8470,
18,
1660,
4825,
2545,
358,
2059,
369,
278,
386,
13471,
... |
thrust_pt = (base_pt + self._node.orientation * self.direction) * self._force | thrust_pt = (orientation * -self.direction) * self._force | def _draw_thrust_line(self): base_pt = Ogre.Vector3(0,0,0) thrust_pt = (base_pt + self._node.orientation * self.direction) * self._force self._thrust_line.position(base_pt) self._thrust_line.position(thrust_pt) | 6950bac452fff39fd7c5129833b16fc6d2ffe60f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10608/6950bac452fff39fd7c5129833b16fc6d2ffe60f/robot.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
9446,
67,
451,
86,
641,
67,
1369,
12,
2890,
4672,
1026,
67,
337,
273,
531,
11556,
18,
5018,
23,
12,
20,
16,
20,
16,
20,
13,
225,
29142,
641,
67,
337,
273,
261,
19235,
380,
300... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
9446,
67,
451,
86,
641,
67,
1369,
12,
2890,
4672,
1026,
67,
337,
273,
531,
11556,
18,
5018,
23,
12,
20,
16,
20,
16,
20,
13,
225,
29142,
641,
67,
337,
273,
261,
19235,
380,
300... |
if self._exp == 'n': return 1 elif self._exp == 'N': return 2 | if self._is_special: exp = self._exp if exp == 'n': return 1 elif exp == 'N': return 2 | def _isnan(self): """Returns whether the number is not actually one. | 55342e783760513207a56d5a31fa49e579a96cd3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/55342e783760513207a56d5a31fa49e579a96cd3/decimal.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
291,
13569,
12,
2890,
4672,
3536,
1356,
2856,
326,
1300,
353,
486,
6013,
1245,
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,... | [
1,
1,
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,
389,
291,
13569,
12,
2890,
4672,
3536,
1356,
2856,
326,
1300,
353,
486,
6013,
1245,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
if self.editCommand and self.editCommand.struct: | if self.editCommand is not None and self.editCommand.hasValidStructure(): | def _editDnaSegment(self): """ """ if self.editCommand and self.editCommand.struct: selectedSegments = self.editCommand.struct.getSelectedSegments() if len(selectedSegments) == 1: selectedSegments[0].edit() | 3fbac43f0a3fcb545b2eb64da2fd9f24ee8a1079 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11221/3fbac43f0a3fcb545b2eb64da2fd9f24ee8a1079/BuildDna_PropertyManager.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
4619,
40,
6582,
4131,
12,
2890,
4672,
3536,
3536,
309,
365,
18,
4619,
2189,
353,
486,
599,
471,
365,
18,
4619,
2189,
18,
5332,
1556,
6999,
13332,
3170,
7946,
273,
365,
18,
4619,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
4619,
40,
6582,
4131,
12,
2890,
4672,
3536,
3536,
309,
365,
18,
4619,
2189,
353,
486,
599,
471,
365,
18,
4619,
2189,
18,
5332,
1556,
6999,
13332,
3170,
7946,
273,
365,
18,
4619,
2... |
(dom, b, d, f) = self.find_parent() | dev = self.find_parent() if dev is None: return None (dom, b, d, f) = dev | def find_the_uppermost_pci_bridge(self): # Find the uppermost PCI/PCI-X bridge (dom, b, d, f) = self.find_parent() dev = dev_parent = PciDevice(dom, b, d, f) while dev_parent.dev_type != DEV_TYPE_PCIe_BRIDGE: parent = dev_parent.find_parent() if parent is None: break (dom, b, d, f) = parent dev = dev_parent dev_parent = PciDevice(dom, b, d, f) return dev | 076b0d96e0a66281e8a29a8ff077abc4f304781e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6195/076b0d96e0a66281e8a29a8ff077abc4f304781e/pci.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1104,
67,
5787,
67,
5797,
10329,
67,
2436,
77,
67,
18337,
12,
2890,
4672,
468,
4163,
326,
3854,
10329,
453,
7266,
19,
3513,
45,
17,
60,
10105,
4461,
273,
365,
18,
4720,
67,
2938,
1435,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1104,
67,
5787,
67,
5797,
10329,
67,
2436,
77,
67,
18337,
12,
2890,
4672,
468,
4163,
326,
3854,
10329,
453,
7266,
19,
3513,
45,
17,
60,
10105,
4461,
273,
365,
18,
4720,
67,
2938,
1435,... |
if inpackage: | if inpackage is not None: | def _readmodule(module, path, inpackage=None): '''Do the hard work for readmodule[_ex].''' # Compute the full module name (prepending inpackage if set) if inpackage: fullmodule = "%s.%s" % (inpackage, module) else: fullmodule = module # Check in the cache if fullmodule in _modules: return _modules[fullmodule] # Initialize the dict for this module's contents dict = {} # Check if it is a built-in module; we don't do much for these if module in sys.builtin_module_names and not inpackage: _modules[module] = dict return dict # Check for a dotted module name i = module.rfind('.') if i >= 0: package = module[:i] submodule = module[i+1:] parent = _readmodule(package, path, inpackage) if inpackage: package = "%s.%s" % (inpackage, package) return _readmodule(submodule, parent['__path__'], package) # Search the path for the module f = None if inpackage: f, file, (suff, mode, type) = imp.find_module(module, path) else: f, file, (suff, mode, type) = imp.find_module(module, path + sys.path) if type == imp.PKG_DIRECTORY: dict['__path__'] = [file] path = [file] + path f, file, (suff, mode, type) = imp.find_module('__init__', [file]) _modules[fullmodule] = dict if type != imp.PY_SOURCE: # not Python source, can't do anything with this module f.close() return dict stack = [] # stack of (class, indent) pairs g = tokenize.generate_tokens(f.readline) try: for tokentype, token, start, end, line in g: if tokentype == DEDENT: lineno, thisindent = start # close nested classes and defs while stack and stack[-1][1] >= thisindent: del stack[-1] elif token == 'def': lineno, thisindent = start # close previous nested classes and defs while stack and stack[-1][1] >= thisindent: del stack[-1] tokentype, meth_name, start, end, line = g.next() if tokentype != NAME: continue # Syntax error if stack: cur_class = stack[-1][0] if isinstance(cur_class, Class): # it's a method cur_class._addmethod(meth_name, lineno) # else it's a nested def else: # it's a function dict[meth_name] = Function(fullmodule, meth_name, file, lineno) stack.append((None, thisindent)) # Marker for nested fns elif token == 'class': lineno, thisindent = start # close previous nested classes and defs while stack and stack[-1][1] >= thisindent: del stack[-1] tokentype, class_name, start, end, line = g.next() if tokentype != NAME: continue # Syntax error # parse what follows the class name tokentype, token, start, end, line = g.next() inherit = None if token == '(': names = [] # List of superclasses # there's a list of superclasses level = 1 super = [] # Tokens making up current superclass while True: tokentype, token, start, end, line = g.next() if token in (')', ',') and level == 1: n = "".join(super) if n in dict: # we know this super class n = dict[n] else: c = n.split('.') if len(c) > 1: # super class is of the form # module.class: look in module for # class m = c[-2] c = c[-1] if m in _modules: d = _modules[m] if c in d: n = d[c] names.append(n) super = [] if token == '(': level += 1 elif token == ')': level -= 1 if level == 0: break elif token == ',' and level == 1: pass # only use NAME and OP (== dot) tokens for type name elif tokentype in (NAME, OP) and level == 1: super.append(token) # expressions in the base list are not supported inherit = names cur_class = Class(fullmodule, class_name, inherit, file, lineno) if not stack: dict[class_name] = cur_class stack.append((cur_class, thisindent)) elif token == 'import' and start[1] == 0: modules = _getnamelist(g) for mod, mod2 in modules: try: # Recursively read the imported module if not inpackage: _readmodule(mod, path) else: try: _readmodule(mod, path, inpackage) except ImportError: _readmodule(mod, []) except: # If we can't find or parse the imported module, # too bad -- don't die here. pass elif token == 'from' and start[1] == 0: mod, token = _getname(g) if not mod or token != "import": continue names = _getnamelist(g) try: # Recursively read the imported module d = _readmodule(mod, path, inpackage) except: # If we can't find or parse the imported module, # too bad -- don't die here. continue # add any classes that were defined in the imported module # to our name space if they were mentioned in the list for n, n2 in names: if n in d: dict[n2 or n] = d[n] elif n == '*': # don't add names that start with _ for n in d: if n[0] != '_': dict[n] = d[n] except StopIteration: pass f.close() return dict | 7d4cac5de777aad61727f6a068b3c392bb76f3e3 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8125/7d4cac5de777aad61727f6a068b3c392bb76f3e3/pyclbr.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
896,
2978,
12,
2978,
16,
589,
16,
316,
5610,
33,
7036,
4672,
9163,
3244,
326,
7877,
1440,
364,
855,
2978,
63,
67,
338,
65,
1093,
6309,
468,
8155,
326,
1983,
1605,
508,
261,
1484,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
896,
2978,
12,
2978,
16,
589,
16,
316,
5610,
33,
7036,
4672,
9163,
3244,
326,
7877,
1440,
364,
855,
2978,
63,
67,
338,
65,
1093,
6309,
468,
8155,
326,
1983,
1605,
508,
261,
1484,
... |
return ispythonprog.match(name) >= 0 | return bool(ispythonprog.match(name)) | def ispython(name): return ispythonprog.match(name) >= 0 | 56c54edd697e115b58cc816c27128e8b823290b2 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3187/56c54edd697e115b58cc816c27128e8b823290b2/pathfix.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
353,
8103,
12,
529,
4672,
327,
1426,
12,
291,
8103,
14654,
18,
1916,
12,
529,
3719,
225,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
353,
8103,
12,
529,
4672,
327,
1426,
12,
291,
8103,
14654,
18,
1916,
12,
529,
3719,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
value = attrs.get('state') if value is not None: already_processed.append('state') self.state = value super(AbstractMapping, self).buildAttributes(node, attrs, already_processed) | super(AbstractSet, self).buildAttributes(node, attrs, already_processed) | def buildAttributes(self, node, attrs, already_processed): value = attrs.get('state') if value is not None: already_processed.append('state') self.state = value super(AbstractMapping, self).buildAttributes(node, attrs, already_processed) | 10f2a4b3101435822c472af9b202a5a0bb496366 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14016/10f2a4b3101435822c472af9b202a5a0bb496366/_nexml.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1361,
2498,
12,
2890,
16,
756,
16,
3422,
16,
1818,
67,
11005,
4672,
460,
273,
3422,
18,
588,
2668,
2019,
6134,
309,
460,
353,
486,
599,
30,
1818,
67,
11005,
18,
6923,
2668,
2019,
6134,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1361,
2498,
12,
2890,
16,
756,
16,
3422,
16,
1818,
67,
11005,
4672,
460,
273,
3422,
18,
588,
2668,
2019,
6134,
309,
460,
353,
486,
599,
30,
1818,
67,
11005,
18,
6923,
2668,
2019,
6134,... |
btn.setFixedWidth(62) | btn.setFixedWidth(68) | def _createFlyoutToolBar(self, obj): | 0ffbba9ed1c32b5eb8dee364dac54496887a973f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11221/0ffbba9ed1c32b5eb8dee364dac54496887a973f/CommandManager.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2640,
42,
715,
659,
6364,
5190,
12,
2890,
16,
1081,
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,
... | [
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,
389,
2640,
42,
715,
659,
6364,
5190,
12,
2890,
16,
1081,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
elif isinstance(x, str): | elif isinstance(x, (bytes, bytearray)): | def dis(x=None): """Disassemble classes, methods, functions, or code. With no argument, disassemble the last traceback. """ if x is None: distb() return if hasattr(x, '__func__'): x = x.__func__ if hasattr(x, '__code__'): x = x.__code__ if hasattr(x, '__dict__'): items = sorted(x.__dict__.items()) for name, x1 in items: if isinstance(x1, (types.MethodType, types.FunctionType, types.CodeType, type)): print("Disassembly of %s:" % name) try: dis(x1) except TypeError as msg: print("Sorry:", msg) print() elif hasattr(x, 'co_code'): disassemble(x) elif isinstance(x, str): disassemble_string(x) else: raise TypeError("don't know how to disassemble %s objects" % type(x).__name__) | 267d41737711a3277869c61bde77009b5fea6315 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8546/267d41737711a3277869c61bde77009b5fea6315/dis.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1015,
12,
92,
33,
7036,
4672,
3536,
1669,
29676,
3318,
16,
2590,
16,
4186,
16,
578,
981,
18,
225,
3423,
1158,
1237,
16,
1015,
29676,
326,
1142,
10820,
18,
225,
3536,
309,
619,
353,
599... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1015,
12,
92,
33,
7036,
4672,
3536,
1669,
29676,
3318,
16,
2590,
16,
4186,
16,
578,
981,
18,
225,
3423,
1158,
1237,
16,
1015,
29676,
326,
1142,
10820,
18,
225,
3536,
309,
619,
353,
599... |
return False except OSError: try: mkdir(current) except OSError: return False | try: os.mkdir(current) except OSError: return False | def InstallConfigFile(self, entry): '''Install ConfigFile Entry''' if entry.text == None: self.CondPrint('verbose', "Incomplete information for ConfigFile %s. Cannot install" % (entry.get('name'))) return False self.CondPrint('verbose', "Installing ConfigFile %s" % (entry.get('name'))) | 6b7fe3dffd69efeeeabbce0bcd6cab97bde94cef /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11867/6b7fe3dffd69efeeeabbce0bcd6cab97bde94cef/Toolset.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10284,
13705,
12,
2890,
16,
1241,
4672,
9163,
6410,
31988,
3841,
26418,
309,
1241,
18,
955,
422,
599,
30,
365,
18,
12441,
5108,
2668,
11369,
2187,
315,
27531,
1779,
364,
31988,
738,
87,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10284,
13705,
12,
2890,
16,
1241,
4672,
9163,
6410,
31988,
3841,
26418,
309,
1241,
18,
955,
422,
599,
30,
365,
18,
12441,
5108,
2668,
11369,
2187,
315,
27531,
1779,
364,
31988,
738,
87,
... |
def _render_one_prefix(self, title, output_prefix, format, | def _render_one_prefix(self, title, output_prefix, file_type, | def _render_one_prefix(self, title, output_prefix, format, paperwidth, paperheight): format = format.lower() frame_width = int(max(paperheight / 20., 30)) | 8b09151b1833450debb3177e948c23c1751f0dbe /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9326/8b09151b1833450debb3177e948c23c1751f0dbe/street_index.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
5902,
67,
476,
67,
3239,
12,
2890,
16,
2077,
16,
876,
67,
3239,
16,
585,
67,
723,
16,
15181,
2819,
16,
15181,
4210,
4672,
740,
1377,
273,
740,
18,
8167,
1435,
2623,
67,
2819,
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,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
5902,
67,
476,
67,
3239,
12,
2890,
16,
2077,
16,
876,
67,
3239,
16,
585,
67,
723,
16,
15181,
2819,
16,
15181,
4210,
4672,
740,
1377,
273,
740,
18,
8167,
1435,
2623,
67,
2819,
27... |
return self.fp.tell() - self.start | return self.fp.tell() - len(self.readahead) - self.start | def tell(self): if self.level > 0: return self.lastpos return self.fp.tell() - self.start | ab4ae4454020df9de19a9140e63a4e15d2ca3894 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/ab4ae4454020df9de19a9140e63a4e15d2ca3894/multifile.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9276,
12,
2890,
4672,
309,
365,
18,
2815,
405,
374,
30,
327,
365,
18,
2722,
917,
327,
365,
18,
7944,
18,
88,
1165,
1435,
300,
365,
18,
1937,
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,
9276,
12,
2890,
4672,
309,
365,
18,
2815,
405,
374,
30,
327,
365,
18,
2722,
917,
327,
365,
18,
7944,
18,
88,
1165,
1435,
300,
365,
18,
1937,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
This function uses the algorithm of [Edmonds74] to calculate the | This function uses the algorithm of [Edmonds74]_ to calculate the | def wigner_9j(j_1, j_2, j_3, j_4, j_5, j_6, j_7, j_8, j_9, prec=None): r""" Calculate the Wigner 9j symbol `Wigner9j(j_1,j_2,j_3,j_4,j_5,j_6,j_7,j_8,j_9)`. INPUT: - ``j_1``, ..., ``j_9`` - integer or half integer - ``prec`` - precision, default: None. Providing a precision can drastically speed up the calculation. OUTPUT: rational number times the square root of a rational number (if prec=None), or real number if a precision is given EXAMPLES: A couple of examples and test cases, note that for speed reasons a precision is given:: sage: wigner_9j(1,1,1, 1,1,1, 1,1,0 ,prec=64) # ==1/18 0.0555555555555555555 sage: wigner_9j(1,1,1, 1,1,1, 1,1,1) 0 sage: wigner_9j(1,1,1, 1,1,1, 1,1,2 ,prec=64) # ==1/18 0.0555555555555555556 sage: wigner_9j(1,2,1, 2,2,2, 1,2,1 ,prec=64) # ==-1/150 -0.00666666666666666667 sage: wigner_9j(3,3,2, 2,2,2, 3,3,2 ,prec=64) # ==157/14700 0.0106802721088435374 sage: wigner_9j(3,3,2, 3,3,2, 3,3,2 ,prec=64) # ==3221*sqrt(70)/(246960*sqrt(105)) - 365/(3528*sqrt(70)*sqrt(105)) 0.00944247746651111739 sage: wigner_9j(3,3,1, 3.5,3.5,2, 3.5,3.5,1 ,prec=64) # ==3221*sqrt(70)/(246960*sqrt(105)) - 365/(3528*sqrt(70)*sqrt(105)) 0.0110216678544351364 sage: wigner_9j(100,80,50, 50,100,70, 60,50,100 ,prec=1000)*1.0 1.05597798065761e-7 sage: wigner_9j(30,30,10, 30.5,30.5,20, 30.5,30.5,10 ,prec=1000)*1.0 # ==(80944680186359968990/95103769817469)*sqrt(1/682288158959699477295) 0.0000325841699408828 sage: wigner_9j(64,62.5,114.5, 61.5,61,112.5, 113.5,110.5,60, prec=1000)*1.0 -3.41407910055520e-39 sage: wigner_9j(15,15,15, 15,3,15, 15,18,10, prec=1000)*1.0 -0.0000778324615309539 sage: wigner_9j(1.5,1,1.5, 1,1,1, 1.5,1,1.5) 0 It is an error to have arguments that are not integer or half integer values or do not fulfil the triangle relation:: sage: wigner_9j(0.5,0.5,0.5, 0.5,0.5,0.5, 0.5,0.5,0.5,prec=64) Traceback (most recent call last): ... ValueError: j values must be integer or half integer and fulfil the triangle relation sage: wigner_9j(1,1,1, 0.5,1,1.5, 0.5,1,2.5,prec=64) Traceback (most recent call last): ... ValueError: j values must be integer or half integer and fulfil the triangle relation ALGORITHM: This function uses the algorithm of [Edmonds74] to calculate the value of the 3j symbol exactly. Note that the formula contains alternating sums over large factorials and is therefore unsuitable for finite precision arithmetic and only useful for a computer algebra system [Rasch03]. REFERENCES: - [Edmonds74] 'Angular Momentum in Quantum Mechanics', A. R. Edmonds, Princeton University Press (1974) - [Rasch03] 'Efficient Storage Scheme for Pre-calculated Wigner 3j, 6j and Gaunt Coefficients', J. Rasch and A. C. H. Yu, SIAM J. Sci. Comput. Volume 25, Issue 4, pp. 1416-1428 (2003) """ imin = 0 imax = min(j_1 + j_9, j_2 + j_6, j_4 + j_8) sumres = 0 for kk in range(imin, imax + 1): sumres = sumres + (2 * kk + 1) * \ racah(j_1, j_2, j_9, j_6, j_3, kk, prec) * \ racah(j_4, j_6, j_8, j_2, j_5, kk, prec) * \ racah(j_1, j_4, j_9, j_8, j_7, kk, prec) return sumres | 2aae1a34350173041dcaa920c230128b23fb8288 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/2aae1a34350173041dcaa920c230128b23fb8288/wigner.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
341,
724,
264,
67,
29,
78,
12,
78,
67,
21,
16,
525,
67,
22,
16,
525,
67,
23,
16,
525,
67,
24,
16,
525,
67,
25,
16,
525,
67,
26,
16,
525,
67,
27,
16,
525,
67,
28,
16,
525,
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,
341,
724,
264,
67,
29,
78,
12,
78,
67,
21,
16,
525,
67,
22,
16,
525,
67,
23,
16,
525,
67,
24,
16,
525,
67,
25,
16,
525,
67,
26,
16,
525,
67,
27,
16,
525,
67,
28,
16,
525,
6... |
def _update( self, cmd, conn=False ): | def _update( self, cmd, conn = False ): | def _update( self, cmd, conn=False ): start = time.time() ret = DB._update( self, cmd, conn ) if DEBUG: print >> debugFile, time.time() - start, cmd.replace('\n','') debugFile.flush() return ret | 99c1bc850ba087890925b3180df206f65bb1d4b3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/99c1bc850ba087890925b3180df206f65bb1d4b3/JobDB.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2725,
12,
365,
16,
1797,
16,
1487,
273,
1083,
262,
30,
787,
273,
813,
18,
957,
1435,
325,
273,
2383,
6315,
2725,
12,
365,
16,
1797,
16,
1487,
262,
309,
6369,
30,
1172,
1671,
119... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2725,
12,
365,
16,
1797,
16,
1487,
273,
1083,
262,
30,
787,
273,
813,
18,
957,
1435,
325,
273,
2383,
6315,
2725,
12,
365,
16,
1797,
16,
1487,
262,
309,
6369,
30,
1172,
1671,
119... |
raise zc.buildout.UserError("Can't contact egg server at '%s': %s" % (url, exc)) index = PackageIndex(url, search_path=[]) | msg = "Can't contact egg server at '%s': %s" % (url, exc) raise zc.buildout.UserError(msg) index = PackageIndex(url, search_path=search_path) | def install(self): startdir = os.getcwd() if os.path.exists(self.bundledir): self.logger.debug('removing old bundle directory %s' % self.bundledir) shutil.rmtree(self.bundledir) if os.path.exists(self.bundle_cache): shutil.rmtree(self.bundle_cache) os.makedirs(os.path.join(self.bundledir, 'buildout', 'eggs')) os.makedirs(self.bundle_cache) try: self._build_dev_eggs(startdir) finally: os.chdir(startdir) eggdir = os.path.join(self.bundledir, 'buildout', 'eggs') env = Environment([self.buildout['buildout']['eggs-directory'], eggdir, os.path.join(self.buildout['buildout']['directory'], 'setup'), self.buildout['buildout']['develop-eggs-directory']]) reqs = [Requirement.parse(x.strip()) for x in self.options['eggs'].split()] self.dists = WorkingSet().resolve(reqs, env) self._setup_buildout_dir() # Check that we can contact the egg server. url = self.buildout['buildout']['index'] if self.dists: proxy_support = urllib2.ProxyHandler({}) opener = urllib2.build_opener(proxy_support) try: opener.open(url).read() except urllib2.URLError, exc: raise zc.buildout.UserError("Can't contact egg server at '%s': %s" % (url, exc)) | 8889dc3621b3c44eb4c510e66e4a14e059574175 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12610/8889dc3621b3c44eb4c510e66e4a14e059574175/bundler.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3799,
12,
2890,
4672,
787,
1214,
273,
1140,
18,
588,
11089,
1435,
309,
1140,
18,
803,
18,
1808,
12,
2890,
18,
9991,
1214,
4672,
365,
18,
4901,
18,
4148,
2668,
2764,
13767,
1592,
3440,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3799,
12,
2890,
4672,
787,
1214,
273,
1140,
18,
588,
11089,
1435,
309,
1140,
18,
803,
18,
1808,
12,
2890,
18,
9991,
1214,
4672,
365,
18,
4901,
18,
4148,
2668,
2764,
13767,
1592,
3440,
... |
special_cases = {"start": "html", "page": "html", "style": "css", "functions":"js"} | def get_table_structure(self, table): '''Returns a list of tuples (name, type) with the table columns name and type''' | d037e4afe2100713a7968a292954e9e47e6da291 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13558/d037e4afe2100713a7968a292954e9e47e6da291/fusqldb.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
2121,
67,
7627,
12,
2890,
16,
1014,
4672,
9163,
1356,
279,
666,
434,
10384,
261,
529,
16,
618,
13,
598,
326,
1014,
2168,
508,
471,
618,
26418,
2,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
2121,
67,
7627,
12,
2890,
16,
1014,
4672,
9163,
1356,
279,
666,
434,
10384,
261,
529,
16,
618,
13,
598,
326,
1014,
2168,
508,
471,
618,
26418,
2,
-100,
-100,
-100,
-100,
-100,... | |
print "ROI count: %d" % len(rois) | n_roi = len(rois) print "Total ROI count: %d" % n_roi for i in range((len(rois) / 1000) + 1): | def parse_result_files(self): raw_file_store = self.service_factory.createRawFileStore() try: for result_file in result_files: print "Parsing: %s" % result_file.name.val image = self.image_from_original_file(result_file) unloaded_image = ImageI(image.id.val, False) raw_file_store.setFileId(result_file.id.val) data = raw_file_store.read(0L, result_file.size.val) rows = list(csv.reader(StringIO(data), delimiter='\t')) rows.reverse() columns = self.get_empty_columns(len(rows[0])) rois = list() for row in rows: try: for i, value in enumerate(row): value = float(value) columns[i + 2].values.append(value) columns[self.IMAGE_COL].values.append(image.id.val) rois.append(self.parse_roi(unloaded_image, row)) except ValueError: for i, value in enumerate(row): columns[i + 2].name = value break print "ROI count: %d" % len(rois) t0 = int(time.time() * 1000) rois = self.update_service.saveAndReturnArray(rois) print "ROI update took %sms" % (int(time.time() * 1000) - t0) for roi in rois: columns[self.ROI_COL].values.append(roi.id.val) self.update_table(columns) finally: raw_file_store.close() | 0b62b2420d1a6095ae91c928a3fdb4677392f99e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12409/0b62b2420d1a6095ae91c928a3fdb4677392f99e/populate_roi.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
67,
2088,
67,
2354,
12,
2890,
4672,
1831,
67,
768,
67,
2233,
273,
365,
18,
3278,
67,
6848,
18,
2640,
4809,
812,
2257,
1435,
775,
30,
364,
563,
67,
768,
316,
563,
67,
2354,
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,
1109,
67,
2088,
67,
2354,
12,
2890,
4672,
1831,
67,
768,
67,
2233,
273,
365,
18,
3278,
67,
6848,
18,
2640,
4809,
812,
2257,
1435,
775,
30,
364,
563,
67,
768,
316,
563,
67,
2354,
30,
... |
c = self.db.cursor() c.execute("SELECT intid FROM videocast WHERE lower(cast) = %s", (cast_name,)) row = c.fetchone() c.close() if row is not None: return row[0] c = self.db.cursor() c.execute("INSERT INTO videocast(cast) VALUES (%s)", (cast_name,)) c.close() c = self.db.cursor() c.execute("SELECT intid FROM videocast WHERE lower(cast) = %s", (cast_name,)) row = c.fetchone() c.close() return row[0] | return self.setFieldId('cast', cast_name) | def getCastId(self, cast_name): """ Find the id of the given cast from MythDB. | 5b53e77a87b7ea5cec0896e51918eaa1c68ff306 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/13713/5b53e77a87b7ea5cec0896e51918eaa1c68ff306/MythVideo.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1927,
689,
548,
12,
2890,
16,
4812,
67,
529,
4672,
3536,
4163,
326,
612,
434,
326,
864,
4812,
628,
8005,
451,
2290,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1927,
689,
548,
12,
2890,
16,
4812,
67,
529,
4672,
3536,
4163,
326,
612,
434,
326,
864,
4812,
628,
8005,
451,
2290,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
if os.path.exists('/tmp/bmovl'): | if os.path.exists('/tmp/bmovl') and config.MPLAYER_SOFTWARE_SCALER: | def play(self, filename, options, item, mode = None): """ play a videoitem with mplayer """ | 8002a43e128c90f513df889209e2bbe7c99ba648 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/8002a43e128c90f513df889209e2bbe7c99ba648/mplayer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6599,
12,
2890,
16,
1544,
16,
702,
16,
761,
16,
1965,
273,
599,
4672,
3536,
6599,
279,
6191,
1726,
598,
312,
14872,
3536,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6599,
12,
2890,
16,
1544,
16,
702,
16,
761,
16,
1965,
273,
599,
4672,
3536,
6599,
279,
6191,
1726,
598,
312,
14872,
3536,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
elif o in ('--title'): | elif o in ('--title',): | def do_mem(self, argv): | 67b8280e3e3a5fcdde21a536adf595f1d889e4da /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12817/67b8280e3e3a5fcdde21a536adf595f1d889e4da/scons-time.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
67,
3917,
12,
2890,
16,
5261,
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,
... | [
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,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
67,
3917,
12,
2890,
16,
5261,
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,
... |
ans = self._check_nans(other, context) if ans: return ans | if (self._is_special or other and other._is_special): ans = self._check_nans(other, context) if ans: return ans | def compare(self, other, context=None): """Compares one to another. | 1a63da64df2af26e1f050749c19281f1de9084fa /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/1a63da64df2af26e1f050749c19281f1de9084fa/decimal.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3400,
12,
2890,
16,
1308,
16,
819,
33,
7036,
4672,
3536,
19199,
1245,
358,
4042,
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,
... | [
1,
1,
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,
3400,
12,
2890,
16,
1308,
16,
819,
33,
7036,
4672,
3536,
19199,
1245,
358,
4042,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
ImageVolume = N.zeros(imagedesc['layers']*imagedesc['rows']*imagedesc['cols'], dtype=N.uint16).reshape(imagedesc['layers'], imagedesc['rows'], imagedesc['cols']) | ImageVolume = NP.zeros(imagedesc['layers']*imagedesc['rows']*imagedesc['cols'], dtype=NP.uint16).reshape(imagedesc['layers'], imagedesc['rows'], imagedesc['cols']) | def load_volume(imagedesc, imagename=None, threshold=0.999, debug=0): """ image = load_volume(imagedesc, imagename=None, threshold=0.999, debug=0) --- OR --- image, h, ih, index = load_volume(imagedesc, imagename=None, threshold=0.999, debug=0) gets an image descriptor and optional filename and returns a scaled 8 bit volume. The scaling is designed to make full use of the 8 bits (ignoring high amplitude outliers). The current method uses numpy fromfile and will be replaced by neuroimage nifti load. Parameters ....... imagedesc : {dictionary} imagedesc is the descriptor of the image to be read. imagename : {string} : optional name of image file. No name creates a blank image that is used for creating a rotated test image or image rescaling. threshold : {float} : optional this is the threshold for upper cutoff in the 8 bit scaling. The volume histogram and integrated histogram is computed and the upper amplitude cutoff is where the integrated histogram crosses the value set in the threshold. setting threshold to 1.0 means the scaling is done over the min to max amplitude range. debug : {0, 1} : optional when debug=1 the method returns the volume histogram, integrated histogram and the amplitude index where the provided threshold occured. Returns ....... image : {dictionary} the volume data assoicated with the filename or a blank volume of the same dimensions as specified in imagedesc. --- OR --- (if debug = 1) image : {dictionary} the volume data assoicated with the filename or a blank volume of the same dimensions as specified in imagedesc. h : {nd_array} the volume 1D amplitude histogram ih : {nd_array} the volume 1D amplitude integrated histogram index : {int} the amplitude (histogram index) where the integrated histogram crosses the 'threshold' provided. Examples ........ >>> import numpy as N >>> import _registration as reg >>> anat_desc = reg.load_anatMRI_desc() >>> image_anat, h, ih, index = reg.load_volume(anat_desc, imagename='ANAT1_V0001.img', debug=1) >>> index 210 """ # load MRI or fMRI volume and return an autoscaled 8 bit image. # autoscale is using integrated histogram to deal with outlier high amplitude voxels if imagename == None: # imagename of none means to create a blank image ImageVolume = N.zeros(imagedesc['layers']*imagedesc['rows']*imagedesc['cols'], dtype=N.uint16).reshape(imagedesc['layers'], imagedesc['rows'], imagedesc['cols']) else: ImageVolume = N.fromfile(imagename, dtype=N.uint16).reshape(imagedesc['layers'], imagedesc['rows'], imagedesc['cols']); # the mat (voxel to physical) matrix M = N.eye(4, dtype=N.float64); # for now just the sample size (mm units) in x, y and z M[0][0] = imagedesc['sample_x'] M[1][1] = imagedesc['sample_y'] M[2][2] = imagedesc['sample_z'] # dimensions D = N.zeros(3, dtype=N.int32); # Gaussian kernel - fill in with build_fwhm() F = N.zeros(3, dtype=N.float64); D[0] = imagedesc['rows'] D[1] = imagedesc['cols'] D[2] = imagedesc['layers'] if imagename == None: # no voxels to scale to 8 bits ImageVolume = ImageVolume.astype(N.uint8) image = {'data' : ImageVolume, 'mat' : M, 'dim' : D, 'fwhm' : F} return image # 8 bit scale with threshold clip of the volume integrated histogram max = ImageVolume.max() min = ImageVolume.min() ih = N.zeros(max-min+1, dtype=N.float64); h = N.zeros(max-min+1, dtype=N.float64); if threshold <= 0: threshold = 0.999 elif threshold > 1.0: threshold = 1.0 # get the integrated histogram of the volume and get max from # the threshold crossing in the integrated histogram index = R.register_image_threshold(ImageVolume, h, ih, threshold) scale = 255.0 / (index-min) # generate the scaled 8 bit image images = (scale*(ImageVolume.astype(N.float)-min)) images[images>255] = 255 image = {'data' : images.astype(N.uint8), 'mat' : M, 'dim' : D, 'fwhm' : F} if debug == 1: return image, h, ih, index else: return image | de681f926e982b0212f2f58bf637917926737f89 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12971/de681f926e982b0212f2f58bf637917926737f89/_registration.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1262,
67,
9491,
12,
381,
11349,
742,
16,
8902,
1069,
33,
7036,
16,
5573,
33,
20,
18,
11984,
16,
1198,
33,
20,
4672,
225,
3536,
1316,
273,
1262,
67,
9491,
12,
381,
11349,
742,
16,
890... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1262,
67,
9491,
12,
381,
11349,
742,
16,
8902,
1069,
33,
7036,
16,
5573,
33,
20,
18,
11984,
16,
1198,
33,
20,
4672,
225,
3536,
1316,
273,
1262,
67,
9491,
12,
381,
11349,
742,
16,
890... |
d1, d2 = self.pool.get('ir.rule').domain_get(cr, user, self._name) | d1, d2, tables = self.pool.get('ir.rule').domain_get(cr, user, self._name) | def _read_flat(self, cr, user, ids, fields, context=None, load='_classic_read'): if not context: context={} if not ids: return [] | c5d41a033c771d541bb8180ab97ee58fb5b17bb5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/c5d41a033c771d541bb8180ab97ee58fb5b17bb5/account_analytic_analysis.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
896,
67,
15401,
12,
2890,
16,
4422,
16,
729,
16,
3258,
16,
1466,
16,
819,
33,
7036,
16,
1262,
2218,
67,
1106,
335,
67,
896,
11,
4672,
309,
486,
819,
30,
819,
12938,
309,
486,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
896,
67,
15401,
12,
2890,
16,
4422,
16,
729,
16,
3258,
16,
1466,
16,
819,
33,
7036,
16,
1262,
2218,
67,
1106,
335,
67,
896,
11,
4672,
309,
486,
819,
30,
819,
12938,
309,
486,
... |
insert_to = decls | value = None | def override(decldict, overides): for o, v in overides.items(): v = v.upper() has_it = False for k, d in decldict.items(): if d.has_key(o): has_it = True del d[o] if has_it: decldict[v][o] = 1 | f7d9779be336dd165ada7dd3923f3f7d87d4a728 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6171/f7d9779be336dd165ada7dd3923f3f7d87d4a728/vim-syn-gen.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3849,
12,
8840,
1576,
16,
1879,
4369,
4672,
364,
320,
16,
331,
316,
1879,
4369,
18,
3319,
13332,
331,
273,
331,
18,
5797,
1435,
711,
67,
305,
273,
1083,
364,
417,
16,
302,
316,
3496,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3849,
12,
8840,
1576,
16,
1879,
4369,
4672,
364,
320,
16,
331,
316,
1879,
4369,
18,
3319,
13332,
331,
273,
331,
18,
5797,
1435,
711,
67,
305,
273,
1083,
364,
417,
16,
302,
316,
3496,
... |
webbrowser.open('http://cse.wustl.edu/~ssa1/gorgon/pages/userGuide.php') | self.openPage('http://cse.wustl.edu/~ssa1/gorgon/pages/userGuide.php') | def userGuide(self): webbrowser.open('http://cse.wustl.edu/~ssa1/gorgon/pages/userGuide.php') | e5598ec01f75b827cbd5f56b7682b41a65c017af /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4399/e5598ec01f75b827cbd5f56b7682b41a65c017af/about_form.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
729,
17424,
12,
2890,
4672,
365,
18,
3190,
1964,
2668,
2505,
2207,
71,
307,
18,
91,
641,
80,
18,
28049,
19,
98,
1049,
69,
21,
19,
3022,
75,
265,
19,
7267,
19,
1355,
17424,
18,
2684,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
729,
17424,
12,
2890,
4672,
365,
18,
3190,
1964,
2668,
2505,
2207,
71,
307,
18,
91,
641,
80,
18,
28049,
19,
98,
1049,
69,
21,
19,
3022,
75,
265,
19,
7267,
19,
1355,
17424,
18,
2684,
... |
chunk.filename()) or \ prompt(_('record change %d/%d to %r?') % (pos, total, chunk.filename())) | chunk.filename()) \ or prompt(_('record change %d/%d to %r?') % (pos, total, chunk.filename())) | def prompt(query): """prompt query, and process base inputs | 06d3117212c0a92a6d479e82454d15a44fd943dc /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11312/06d3117212c0a92a6d479e82454d15a44fd943dc/record.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6866,
12,
2271,
4672,
3536,
13325,
843,
16,
471,
1207,
1026,
4540,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6866,
12,
2271,
4672,
3536,
13325,
843,
16,
471,
1207,
1026,
4540,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
fiscalyear = self.pool.get('account.fiscalyear').browse(self.cr, self.uid, form['fiscalyear']) period_query_cond=self.pool.get('account.period').search(self.cr, self.uid, [('fiscalyear_id', '=', form['fiscalyear'])]) | fiscalyear = self.pool.get('account.fiscalyear').browse(self.cr, self.uid, form['fiscalyear_id']) period_ids=self.pool.get('account.period').search(self.cr, self.uid, [('fiscalyear_id', '=', form['fiscalyear_id'])]) | def _load(self, name, form): fiscalyear = self.pool.get('account.fiscalyear').browse(self.cr, self.uid, form['fiscalyear']) period_query_cond=self.pool.get('account.period').search(self.cr, self.uid, [('fiscalyear_id', '=', form['fiscalyear'])]) | 5bebd204b83275adc470cfe0c2a616ca7b2f64fd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/5bebd204b83275adc470cfe0c2a616ca7b2f64fd/base_report.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
945,
12,
2890,
16,
508,
16,
646,
4672,
15324,
771,
6874,
273,
365,
18,
6011,
18,
588,
2668,
4631,
18,
74,
291,
771,
6874,
16063,
25731,
12,
2890,
18,
3353,
16,
365,
18,
1911,
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,
945,
12,
2890,
16,
508,
16,
646,
4672,
15324,
771,
6874,
273,
365,
18,
6011,
18,
588,
2668,
4631,
18,
74,
291,
771,
6874,
16063,
25731,
12,
2890,
18,
3353,
16,
365,
18,
1911,
16... |
self.logging.info('Your server credential will expire in:\n\t%s hours %s minutes %s seconds\n'%(hours,minutes,seconds)) | logMsg = 'Your credential for the required server will expire in:\n\t' logMsg += '%s hours %s minutes %s seconds\n'%(hours,minutes,seconds) self.logging.info(logMsg) | def checkMyProxy( self , proxy=None, Time=4, checkRetrieverRenewer=False): """ """ if proxy == None: proxy=self.getUserProxy() ## check the myproxy server valid = True | f0bd01537c0ae70e1453b436a022850421b21f04 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8886/f0bd01537c0ae70e1453b436a022850421b21f04/Proxy.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
12062,
3886,
12,
365,
269,
2889,
33,
7036,
16,
2647,
33,
24,
16,
866,
30801,
24058,
264,
33,
8381,
4672,
3536,
3536,
309,
2889,
422,
599,
30,
2889,
33,
2890,
18,
588,
1299,
3886,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
866,
12062,
3886,
12,
365,
269,
2889,
33,
7036,
16,
2647,
33,
24,
16,
866,
30801,
24058,
264,
33,
8381,
4672,
3536,
3536,
309,
2889,
422,
599,
30,
2889,
33,
2890,
18,
588,
1299,
3886,
... |
cl = choice(colors) | cl = choice(self.colors) | def hashcolor(self, string): if string in self.used_colorlabels: return self.used_colors[self.used_colorlabels.index(string)] | fcbf54a129adc8c713beb87d1c6c88092bc15be6 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/888/fcbf54a129adc8c713beb87d1c6c88092bc15be6/ShowGraph.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1651,
3266,
12,
2890,
16,
533,
4672,
309,
533,
316,
365,
18,
3668,
67,
3266,
5336,
30,
327,
365,
18,
3668,
67,
9724,
63,
2890,
18,
3668,
67,
3266,
5336,
18,
1615,
12,
1080,
25887,
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,
1651,
3266,
12,
2890,
16,
533,
4672,
309,
533,
316,
365,
18,
3668,
67,
3266,
5336,
30,
327,
365,
18,
3668,
67,
9724,
63,
2890,
18,
3668,
67,
3266,
5336,
18,
1615,
12,
1080,
25887,
2,... |
return self.parts | def assemble_parts(self): writers.Writer.assemble_parts(self) for part in self.visitor_attributes: if part.startswith('body'): # body contains inline elements, so join without newline self.parts[part] = ''.join(getattr(self, part)) else: self.parts[part] = '\n'.join(getattr(self, part)) return self.parts | 72029aee8394eeb4400f5487aabbec1a1dfbd5cd /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5620/72029aee8394eeb4400f5487aabbec1a1dfbd5cd/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
19540,
67,
6019,
12,
2890,
4672,
18656,
18,
2289,
18,
29676,
67,
6019,
12,
2890,
13,
364,
1087,
316,
365,
18,
3516,
1811,
67,
4350,
30,
309,
1087,
18,
17514,
1918,
2668,
3432,
11,
4672... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
19540,
67,
6019,
12,
2890,
4672,
18656,
18,
2289,
18,
29676,
67,
6019,
12,
2890,
13,
364,
1087,
316,
365,
18,
3516,
1811,
67,
4350,
30,
309,
1087,
18,
17514,
1918,
2668,
3432,
11,
4672... | |
for dir in extension_dirs: for path in glob.glob(os.path.join(dir, '*.py')): | for dir_ in extension_dirs: dir_ = os.path.normpath(dir_) for path in glob.glob(os.path.join(dir_, '*.py')): | def get_dynamic_modules(): """ Returns dynamic modules to be bundled by default. """ print "enumerating dynamic modules" includes = [] service_dir = 'solipsis/services' # 1. Dynamically-loaded service plugins for filename in os.listdir(service_dir): path = os.path.join(service_dir, filename) if os.path.isdir(path) and not filename.startswith('_') and not filename.startswith('.'): package = path.replace('/', '.') # packages.append(package) includes.append(package + '.plugin') extension_dirs = ['solipsis/node/discovery', 'solipsis/node/controller', 'solipsis/lib/shtoom'] # 2. Dynamically-loaded behaviour extensions for dir in extension_dirs: for path in glob.glob(os.path.join(dir, '*.py')): filename = os.path.basename(path) if not filename.startswith('_'): module = path.replace('/', '.')[:-3] includes.append(module) | c3a021da62fe65603b7803fe38c3b8cd77b55fc6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2522/c3a021da62fe65603b7803fe38c3b8cd77b55fc6/commonsetup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
14507,
67,
6400,
13332,
3536,
2860,
5976,
4381,
358,
506,
324,
24467,
635,
805,
18,
3536,
1172,
315,
7924,
264,
1776,
5976,
4381,
6,
6104,
273,
5378,
225,
1156,
67,
1214,
273,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
14507,
67,
6400,
13332,
3536,
2860,
5976,
4381,
358,
506,
324,
24467,
635,
805,
18,
3536,
1172,
315,
7924,
264,
1776,
5976,
4381,
6,
6104,
273,
5378,
225,
1156,
67,
1214,
273,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.