rem stringlengths 2 226k | add stringlengths 0 227k | context stringlengths 8 228k | meta stringlengths 156 215 | input_ids list | attention_mask list | labels list |
|---|---|---|---|---|---|---|
def search_st(self,*args,**kwargs): return self._apply_method_s(SimpleLDAPObject.search_st,self,*args,**kwargs) | def search_ext_s(self,*args,**kwargs): return self._apply_method_s(SimpleLDAPObject.search_ext_s,self,*args,**kwargs) | def search_st(self,*args,**kwargs): return self._apply_method_s(SimpleLDAPObject.search_st,self,*args,**kwargs) | 315ecddad92b6e5c0ee3cb418a4d742b4673bbaf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4610/315ecddad92b6e5c0ee3cb418a4d742b4673bbaf/ldapobject.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1623,
67,
334,
12,
2890,
16,
14,
1968,
16,
636,
4333,
4672,
327,
365,
6315,
9010,
67,
2039,
67,
87,
12,
5784,
15496,
921,
18,
3072,
67,
334,
16,
2890,
16,
14,
1968,
16,
636,
4333,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1623,
67,
334,
12,
2890,
16,
14,
1968,
16,
636,
4333,
4672,
327,
365,
6315,
9010,
67,
2039,
67,
87,
12,
5784,
15496,
921,
18,
3072,
67,
334,
16,
2890,
16,
14,
1968,
16,
636,
4333,
... |
test = [ '0RIBDTCn', (service.ref.toString(), 0, stime) for service in services ] | test = [ (service.ref.toString(), 0, stime) for service in services ] test.insert(0, '0RIBDTCn') | def fillMultiEPG(self, services, stime=-1): t = time() test = [ '0RIBDTCn', (service.ref.toString(), 0, stime) for service in services ] self.list = self.queryEPG(test) self.l.setList(self.list) print time() - t self.selectionChanged() | c2ba4a7d374a9b20f7567478e8bafbad8f3884e1 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6652/c2ba4a7d374a9b20f7567478e8bafbad8f3884e1/EpgList.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3636,
5002,
10541,
43,
12,
2890,
16,
4028,
16,
384,
494,
29711,
21,
4672,
268,
273,
813,
1435,
1842,
273,
306,
261,
3278,
18,
1734,
18,
10492,
9334,
374,
16,
384,
494,
13,
364,
1156,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3636,
5002,
10541,
43,
12,
2890,
16,
4028,
16,
384,
494,
29711,
21,
4672,
268,
273,
813,
1435,
1842,
273,
306,
261,
3278,
18,
1734,
18,
10492,
9334,
374,
16,
384,
494,
13,
364,
1156,
... |
done[name] = value | try: value = string.atoi(value) except ValueError: pass done[name] = string.strip(value) | undef_rx = re.compile("/[*] #undef ([A-Z][A-Z0-9_]+) [*]/\n") | 3a3b7a3206ba4b1bfe6f03c7fbbd83bc6a4ba502 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/3a3b7a3206ba4b1bfe6f03c7fbbd83bc6a4ba502/sysconfig.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
640,
536,
67,
20122,
273,
283,
18,
11100,
2932,
19,
63,
14,
65,
468,
318,
536,
23265,
37,
17,
62,
6362,
37,
17,
62,
20,
17,
29,
67,
7941,
306,
14,
18537,
64,
82,
7923,
2,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
640,
536,
67,
20122,
273,
283,
18,
11100,
2932,
19,
63,
14,
65,
468,
318,
536,
23265,
37,
17,
62,
6362,
37,
17,
62,
20,
17,
29,
67,
7941,
306,
14,
18537,
64,
82,
7923,
2,
-100,
-100,
-... |
opts, args = getopt.getopt(argv[1:], "hve:c:t:b:o:i:d", ["help", "verbose", "executablePath=", "configFilePath=", "title=", "branch=", "output=", "id=", "testDate"]) | opts, args = getopt.getopt(argv[1:], "hvue:c:t:b:o:i:d:", ["help", "verbose", "useId", "executablePath=", "configFilePath=", "title=", "branch=", "output=", "id=", "testDate="]) | def main(argv=None): exePath = executablePath configPath = configFilePath output = "" title = defaultTitle branch = "" testDate = False verbose = False buildid = "" if argv is None: argv = sys.argv try: try: opts, args = getopt.getopt(argv[1:], "hve:c:t:b:o:i:d", ["help", "verbose", "executablePath=", "configFilePath=", "title=", "branch=", "output=", "id=", "testDate"]) except getopt.error, msg: raise Usage(msg) # option processing for option, value in opts: if option in ("-v", "--verbose"): verbose = True if option in ("-h", "--help"): raise Usage(help_message) if option in ("-e", "--executablePath"): exePath = value if option in ("-c", "--configFilePath"): configPath = value if option in ("-t", "--title"): title = value if option in ("-b", "--branch"): branch = value if option in ("-o", "--output"): output = value if option in ("-i", "--id"): buildid = value if option in ("-d", "--testDate"): testDate = True except Usage, err: print >> sys.stderr, sys.argv[0].split("/")[-1] + ": " + str(err.msg) print >> sys.stderr, "\t for help use --help" return 2 configurator = PerfConfigurator(title=title, executablePath=exePath, configFilePath=configPath, buildid=buildid, branch=branch, verbose=verbose, testDate=testDate, outputName=output) try: configurator.writeConfigFile() except Configuration, err: print >> sys.stderr, sys.argv[0].split("/")[-1] + ": " + str(err.msg) return 5 return 0 | 063bd9031798da0e2a14de0d8709374c574f5f99 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/13067/063bd9031798da0e2a14de0d8709374c574f5f99/PerfConfigurator.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
12,
19485,
33,
7036,
4672,
15073,
743,
273,
9070,
743,
16012,
273,
642,
5598,
876,
273,
1408,
2077,
273,
805,
4247,
3803,
273,
1408,
1842,
1626,
273,
1083,
3988,
273,
1083,
1361,
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,
2774,
12,
19485,
33,
7036,
4672,
15073,
743,
273,
9070,
743,
16012,
273,
642,
5598,
876,
273,
1408,
2077,
273,
805,
4247,
3803,
273,
1408,
1842,
1626,
273,
1083,
3988,
273,
1083,
1361,
3... |
lines = self._data.splitlines() | state = self.state lines = state.data.splitlines() | def _load_state(self, resource=None): # Load the resource as a unicode string Text._load_state(self, resource) # Split the raw data in lines. lines = self._data.splitlines() # Append None to signal the end of the data. lines.append(None) # Free the un-needed data structure, 'self._data' del self._data | 107a3ea087947fb4bcce4cb6619d3546a6509baa /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12681/107a3ea087947fb4bcce4cb6619d3546a6509baa/TaskTracker.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
945,
67,
2019,
12,
2890,
16,
1058,
33,
7036,
4672,
468,
4444,
326,
1058,
487,
279,
5252,
533,
3867,
6315,
945,
67,
2019,
12,
2890,
16,
1058,
13,
468,
5385,
326,
1831,
501,
316,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
945,
67,
2019,
12,
2890,
16,
1058,
33,
7036,
4672,
468,
4444,
326,
1058,
487,
279,
5252,
533,
3867,
6315,
945,
67,
2019,
12,
2890,
16,
1058,
13,
468,
5385,
326,
1831,
501,
316,
... |
C = [R(h) for h in C] if len(C) == 1: return [NumberField(C[0], names)] else: name = sage.structure.parent_gens.normalize_names(1, names)[0] return [NumberField(C[i], name + str(i)) for i in range(len(C))] | name = sage.structure.parent_gens.normalize_names(1, names)[0] if not both_maps: C = f.polcompositum(g) C = [ R(h) for h in C ] return [ NumberField(C[i], name + str(i)) for i in range(len(C)) ] C = f.polcompositum(g, 1) rets = [] for i in range(len(C)): r, a, b, k = C[i] F = NumberField(R(r), name + str(i)) into_F1 = self.hom ([F(a)], check=True) into_F2 = other.hom([F(b)], check=True) k = ZZ(k) rets.append( (F, into_F1, into_F2, k) ) return rets | def composite_fields(self, other, names=None): """ List of all possible composite number fields formed from self and other. | 049811df36a994c442eb0b2b7d4344d310ace0db /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/049811df36a994c442eb0b2b7d4344d310ace0db/number_field.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9635,
67,
2821,
12,
2890,
16,
1308,
16,
1257,
33,
7036,
4672,
3536,
987,
434,
777,
3323,
9635,
1300,
1466,
20010,
628,
365,
471,
1308,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9635,
67,
2821,
12,
2890,
16,
1308,
16,
1257,
33,
7036,
4672,
3536,
987,
434,
777,
3323,
9635,
1300,
1466,
20010,
628,
365,
471,
1308,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
diff_str = '' | if options.number != None: n = options.number else: n = -1 diff_list = [] | def show_log(log, options): """List the patch changelog """ commit = git.get_commit(log) diff_str = '' while commit: log = commit.get_log().split('\n') cmd_rev = log[0].split() if len(cmd_rev) >= 2: cmd = cmd_rev[0] rev = cmd_rev[1] elif len(cmd_rev) == 1: cmd = cmd_rev[0] rev = '' else: cmd = rev = '' if options.patch: if cmd in ['refresh', 'undo', 'sync', 'edit']: diff_str = '%s%s\n' % (diff_str, git.pretty_commit(commit.get_id_hash())) else: if len(log) >= 3: notes = log[2] else: notes = '' author_name, author_email, author_date = \ name_email_date(commit.get_author()) secs, tz = author_date.split() date = '%s %s' % (time.ctime(int(secs)), tz) if options.full: out.stdout('%-7s %-40s %s' % (cmd[:7], rev[:40], date)) else: out.stdout('%-8s [%-7s] %-28s %s' % \ (rev[:8], cmd[:7], notes[:28], date)) parent = commit.get_parent() if parent: commit = git.get_commit(parent) else: commit = None if options.patch and diff_str: pager(diff_str.rstrip()) | 380fde1274e37412d348396acb5e0e31daf6ef91 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12366/380fde1274e37412d348396acb5e0e31daf6ef91/log.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2405,
67,
1330,
12,
1330,
16,
702,
4672,
3536,
682,
326,
4729,
21182,
3536,
3294,
273,
5071,
18,
588,
67,
7371,
12,
1330,
13,
309,
702,
18,
2696,
480,
599,
30,
290,
273,
702,
18,
269... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2405,
67,
1330,
12,
1330,
16,
702,
4672,
3536,
682,
326,
4729,
21182,
3536,
3294,
273,
5071,
18,
588,
67,
7371,
12,
1330,
13,
309,
702,
18,
2696,
480,
599,
30,
290,
273,
702,
18,
269... |
'BarTest.Test1', 'BarTest.Test2', 'BarTest.Test3', 'BazTest.Test1', | 'BarTest.TestOne', 'BarTest.TestTwo', 'BarTest.TestThree', 'BazTest.TestOne', | def testNegativeFilters(self): self.RunAndVerify('*-FooTest.Abc', [ 'FooTest.Xyz', | 983b7c5ecb0aef43a6e79188cbc088d72ce3e07c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1989/983b7c5ecb0aef43a6e79188cbc088d72ce3e07c/gtest_filter_unittest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
14959,
5422,
12,
2890,
4672,
365,
18,
1997,
1876,
8097,
2668,
14,
17,
42,
5161,
4709,
18,
5895,
71,
2187,
306,
296,
42,
5161,
4709,
18,
60,
93,
94,
2187,
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,
1842,
14959,
5422,
12,
2890,
4672,
365,
18,
1997,
1876,
8097,
2668,
14,
17,
42,
5161,
4709,
18,
5895,
71,
2187,
306,
296,
42,
5161,
4709,
18,
60,
93,
94,
2187,
2,
-100,
-100,
-100,
-... |
str = '<DL><DT><B>See also:</B>\n <DD>' | str = '<dl><dt><b>See also:</b>\n </dt><dd>' | def _seealso(self, seealso): 'Convert a SEEALSO node to HTML' #!!!!!!!!!!!!!!!!!!!!!!!!!!!! NO SEEALSO YET return '' if not seealso: return '' str = '<DL><DT><B>See also:</B>\n <DD>' for see in seealso: if self._docmap.has_key(see[0]): str += self._uid_to_href(see[0], see[1]) + ', ' else: str += see[1] + ', ' return str[:-2] + '</DD>\n</DT></DL>\n\n' | 1b52b16120989cc834166571a9a1e9b8676d968f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11420/1b52b16120989cc834166571a9a1e9b8676d968f/html.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
5946,
31144,
12,
2890,
16,
2621,
31144,
4672,
296,
2723,
279,
3174,
41,
1013,
3584,
756,
358,
3982,
11,
468,
23045,
23045,
23045,
23045,
23045,
23045,
23045,
3741,
3174,
41,
1013,
358... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
5946,
31144,
12,
2890,
16,
2621,
31144,
4672,
296,
2723,
279,
3174,
41,
1013,
3584,
756,
358,
3982,
11,
468,
23045,
23045,
23045,
23045,
23045,
23045,
23045,
3741,
3174,
41,
1013,
358... |
''' | """ | def log_open (self, filename): '''This opens a log file. All data read from the child application will be written to the log file. This is very useful to use while creating scripts. You can use this to figure out exactly what the child is sending. ''' self.log_fd = os.open (filename, O_APPEND | O_CREAT) | a6436229531e4cc3cceb58c0322f4ecc258e53d4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9386/a6436229531e4cc3cceb58c0322f4ecc258e53d4/pexpect.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
613,
67,
3190,
261,
2890,
16,
1544,
4672,
9163,
2503,
10400,
279,
613,
585,
18,
4826,
501,
855,
628,
326,
1151,
2521,
903,
506,
5941,
358,
326,
613,
585,
18,
1220,
353,
8572,
5301,
358... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
613,
67,
3190,
261,
2890,
16,
1544,
4672,
9163,
2503,
10400,
279,
613,
585,
18,
4826,
501,
855,
628,
326,
1151,
2521,
903,
506,
5941,
358,
326,
613,
585,
18,
1220,
353,
8572,
5301,
358... |
with open(finder_output_file, 'r') as f: infile = f.readlines() | roidata.read_in(finder_output_file) for i, obsID in enumerate(sorted(roidata.dict.keys())): print i + 1, obsID fixed = raw_input('Number of obsID for reference: ') tobeShifted = raw_input('Number of obsID to be shifted (=co-registered): ') | def prev(self, event): self.xOff2 += 1 * self.multiplier self.im2.set_data(self.read_data()) self.ax.set_title('{2}, deltaX: {0}, deltaY: {1}'.\ format(self.xOff2 - self.xOff2Old, self.yOff2 - self.yOff2Old, self.sub2.obsID)) self.fig.canvas.draw() | f792a285b5a6d46ffe6fdfceaf13c9b22268b88a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3185/f792a285b5a6d46ffe6fdfceaf13c9b22268b88a/pyrise_coreg.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2807,
12,
2890,
16,
871,
4672,
365,
18,
92,
7210,
22,
1011,
404,
380,
365,
18,
20538,
365,
18,
381,
22,
18,
542,
67,
892,
12,
2890,
18,
896,
67,
892,
10756,
365,
18,
651,
18,
542,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2807,
12,
2890,
16,
871,
4672,
365,
18,
92,
7210,
22,
1011,
404,
380,
365,
18,
20538,
365,
18,
381,
22,
18,
542,
67,
892,
12,
2890,
18,
896,
67,
892,
10756,
365,
18,
651,
18,
542,
... |
EXAMPLES: We explicitly construct the alternating group on four elements. :: | EXAMPLES: We explicitly construct the alternating group on four elements:: | def _latex_(self): r""" Method for describing self in LaTeX. Encapsulates ``self.gens()`` in angle brackets to denote that self in generated by these elements. Called by the ``latex()`` function. EXAMPLES: We explicitly construct the alternating group on four elements. :: sage: A4 = PermutationGroup([[(1,2,3)],[(2,3,4)]]); A4 Permutation Group with generators [(2,3,4), (1,2,3)] sage: latex(A4) \langle (2,3,4), (1,2,3) \rangle sage: A4._latex_() '\\langle (2,3,4), (1,2,3) \\rangle' """ return '\\langle ' + \ ', '.join([x._latex_() for x in self.gens()]) + ' \\rangle' | 1a05983ebb3835bbd44e7ffd0287f6bbaee2ac36 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/1a05983ebb3835bbd44e7ffd0287f6bbaee2ac36/permgroup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
26264,
67,
12,
2890,
4672,
436,
8395,
2985,
364,
16868,
365,
316,
21072,
21575,
60,
18,
1374,
22984,
17099,
12176,
2890,
18,
23730,
1435,
10335,
316,
5291,
15597,
358,
5545,
1168,
716... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
26264,
67,
12,
2890,
4672,
436,
8395,
2985,
364,
16868,
365,
316,
21072,
21575,
60,
18,
1374,
22984,
17099,
12176,
2890,
18,
23730,
1435,
10335,
316,
5291,
15597,
358,
5545,
1168,
716... |
return "VARCHAR(%(length)s)" % {'length' : self.length} | return "VARCHAR" + (self.length and "(%d)" % self.length or "") | def get_col_spec(self): return "VARCHAR(%(length)s)" % {'length' : self.length} | 61178c5d6d23f3643c54bfb87b42773691c8a0b7 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1074/61178c5d6d23f3643c54bfb87b42773691c8a0b7/mssql.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
1293,
67,
2793,
12,
2890,
4672,
327,
315,
7716,
7305,
9275,
12,
2469,
13,
87,
2225,
738,
13666,
2469,
11,
294,
365,
18,
2469,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
1293,
67,
2793,
12,
2890,
4672,
327,
315,
7716,
7305,
9275,
12,
2469,
13,
87,
2225,
738,
13666,
2469,
11,
294,
365,
18,
2469,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
try: | comment = '' if imageData.has_key('comment'): | def newimages(self, number = 100, lestart = None, leend = None, leuser = None, letitle = None, repeat = False): """ Yield ImagePages from APIs, call: action=query&list=logevents&letype=upload&lelimit=500 | 54fa5c4791af2d684720c89e9fd87b887b78d41c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4404/54fa5c4791af2d684720c89e9fd87b887b78d41c/wikipedia.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
394,
7369,
12,
2890,
16,
1300,
273,
2130,
16,
328,
27893,
273,
599,
16,
884,
409,
273,
599,
16,
884,
1355,
273,
599,
16,
2231,
1280,
273,
599,
16,
7666,
273,
1083,
4672,
3536,
31666,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
394,
7369,
12,
2890,
16,
1300,
273,
2130,
16,
328,
27893,
273,
599,
16,
884,
409,
273,
599,
16,
884,
1355,
273,
599,
16,
2231,
1280,
273,
599,
16,
7666,
273,
1083,
4672,
3536,
31666,
... |
directed graph g. | directed acyclic graph g. | def GraphPaths(g, source=None, target=None): """ Returns the combinatorial class of paths in the directed graph g. EXAMPLES: sage: G = DiGraph({1:[2,2,3], 2:[3,4], 3:[4], 4:[5,5]}, multiedges=True) If source and target are not given, then the returned class contains all paths (including trivial paths containing only one vertex). sage: p = GraphPaths(G); p Paths in Multi-digraph on 5 vertices sage: p.count() 37 sage: p.random() #random [3, 4, 5] If the source is specified, then the returned class contains all of the paths starting at the vertex source (including the trivial path). sage: p = GraphPaths(G, source=3); p Paths in Multi-digraph on 5 vertices starting at 3 sage: p.list() [[3], [3, 4], [3, 4, 5], [3, 4, 5]] If the target is specified, then the returned class contains all of the paths ending at the vertex target (including the trivial path). sage: p = GraphPaths(G, target=3); p Paths in Multi-digraph on 5 vertices ending at 3 sage: p.count() 5 sage: p.list() [[3], [1, 3], [2, 3], [1, 2, 3], [1, 2, 3]] If both the target and source are specified, then the returned class contains all of the paths from source to target. sage: p = GraphPaths(G, source=1, target=3); p Paths in Multi-digraph on 5 vertices starting at 1 and ending at 3 sage: p.count() 3 sage: p.list() [[1, 2, 3], [1, 2, 3], [1, 3]] """ if not isinstance(g, graph.DiGraph): raise TypeError, "g must be a DiGraph" if source is None and target is None: return GraphPaths_all(g) elif source is not None and target is None: if source not in g: raise ValueError, "source must be in g" return GraphPaths_s(g, source) elif source is None and target is not None: if target not in g: raise ValueError, "target must be in g" return GraphPaths_t(g, target) else: if source not in g: raise ValueError, "source must be in g" if target not in g: raise ValueError, "target must be in g" return GraphPaths_st(g, source, target) | 1a8dddcd157667511520f7b08fdb31ef82e2ea3d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/1a8dddcd157667511520f7b08fdb31ef82e2ea3d/graph_path.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5601,
4466,
12,
75,
16,
1084,
33,
7036,
16,
1018,
33,
7036,
4672,
3536,
2860,
326,
3894,
4240,
649,
667,
434,
2953,
316,
326,
20830,
1721,
93,
18964,
2667,
314,
18,
225,
5675,
8900,
11... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5601,
4466,
12,
75,
16,
1084,
33,
7036,
16,
1018,
33,
7036,
4672,
3536,
2860,
326,
3894,
4240,
649,
667,
434,
2953,
316,
326,
20830,
1721,
93,
18964,
2667,
314,
18,
225,
5675,
8900,
11... |
base = os.path.dirname(os.path.abspath(sys.executable)) | base = os.path.dirname(os.path.realpath(sys.executable)) | def get_python_inc(plat_specific=0, prefix=None): """Return the directory containing installed Python header files. If 'plat_specific' is false (the default), this is the path to the non-platform-specific header files, i.e. Python.h and so on; otherwise, this is the path to platform-specific header files (namely pyconfig.h). If 'prefix' is supplied, use it instead of sys.prefix or sys.exec_prefix -- i.e., ignore 'plat_specific'. """ if prefix is None: prefix = plat_specific and EXEC_PREFIX or PREFIX if os.name == "posix": if python_build: # Assume the executable is in the build directory. The # pyconfig.h file should be in the same directory. Since # the build directory may not be the source directory, we # must use "srcdir" from the makefile to find the "Include" # directory. base = os.path.dirname(os.path.abspath(sys.executable)) if plat_specific: return base else: incdir = os.path.join(get_config_var('srcdir'), 'Include') return os.path.normpath(incdir) return os.path.join(prefix, "include", "python" + get_python_version()) elif os.name == "nt": return os.path.join(prefix, "include") elif os.name == "mac": if plat_specific: return os.path.join(prefix, "Mac", "Include") else: return os.path.join(prefix, "Include") elif os.name == "os2": return os.path.join(prefix, "Include") else: raise DistutilsPlatformError( "I don't know where Python installs its C header files " "on platform '%s'" % os.name) | 61567bb0b2ef83bd57d781f891cee6726784ec13 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8125/61567bb0b2ef83bd57d781f891cee6726784ec13/sysconfig.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
8103,
67,
9523,
12,
412,
270,
67,
12524,
33,
20,
16,
1633,
33,
7036,
4672,
3536,
990,
326,
1867,
4191,
5876,
6600,
1446,
1390,
18,
225,
971,
296,
412,
270,
67,
12524,
11,
35... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
8103,
67,
9523,
12,
412,
270,
67,
12524,
33,
20,
16,
1633,
33,
7036,
4672,
3536,
990,
326,
1867,
4191,
5876,
6600,
1446,
1390,
18,
225,
971,
296,
412,
270,
67,
12524,
11,
35... |
if to_uom.factor_data: new_price = new_price * to_uom.factor_data | if to_uom.factor >= 1.0: new_price = new_price * to_uom.factor | def _compute_price(self, cursor, user, from_uom, price, to_uom=False): """ Convert price for given uom's. from_uom and to_uom should be browse records. """ if not from_uom or not price or not to_uom: return price if from_uom.category.id <> to_uom.category.id: return price if from_uom.factor_data: new_price = float(price) / from_uom.factor_data else: new_price = float(price) * from_uom.factor | 4df7058a1bfea50026f1f02f1638f1b380528843 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/533/4df7058a1bfea50026f1f02f1638f1b380528843/uom.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
9200,
67,
8694,
12,
2890,
16,
3347,
16,
729,
16,
628,
67,
89,
362,
16,
6205,
16,
358,
67,
89,
362,
33,
8381,
4672,
3536,
4037,
6205,
364,
864,
582,
362,
1807,
18,
628,
67,
89,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
9200,
67,
8694,
12,
2890,
16,
3347,
16,
729,
16,
628,
67,
89,
362,
16,
6205,
16,
358,
67,
89,
362,
33,
8381,
4672,
3536,
4037,
6205,
364,
864,
582,
362,
1807,
18,
628,
67,
89,... |
s = fp.read(4096) | s = fp.read(self.BufferSize) | def _compute_md5(self, fp): m = md5.new() s = fp.read(4096) while s: m.update(s) s = fp.read(4096) self.md5 = m.hexdigest() self.base64md5 = base64.encodestring(m.digest()) if self.base64md5[-1] == '\n': self.base64md5 = self.base64md5[0:-1] self.size = fp.tell() fp.seek(0) | aef14ab9959c7eb637a2bba40646145bdbdf7b81 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1098/aef14ab9959c7eb637a2bba40646145bdbdf7b81/key.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
9200,
67,
1264,
25,
12,
2890,
16,
4253,
4672,
312,
273,
3481,
25,
18,
2704,
1435,
272,
273,
4253,
18,
896,
12,
2890,
18,
15384,
13,
1323,
272,
30,
312,
18,
2725,
12,
87,
13,
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,
9200,
67,
1264,
25,
12,
2890,
16,
4253,
4672,
312,
273,
3481,
25,
18,
2704,
1435,
272,
273,
4253,
18,
896,
12,
2890,
18,
15384,
13,
1323,
272,
30,
312,
18,
2725,
12,
87,
13,
2... |
qu1 = ' where '+string.join(qu1, ' and ') | qu1 = ' where ' qu1 += ' and '.join(qu1) | def search(self, cr, user, args, offset=0, limit=None, order=None, context=None, count=False): """ Search for record/s with or without domain | a828eea7255bf501d3547db89a206df63cbe9cbc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/a828eea7255bf501d3547db89a206df63cbe9cbc/orm.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1623,
12,
2890,
16,
4422,
16,
729,
16,
833,
16,
1384,
33,
20,
16,
1800,
33,
7036,
16,
1353,
33,
7036,
16,
819,
33,
7036,
16,
1056,
33,
8381,
4672,
3536,
5167,
364,
1409,
19,
87,
59... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1623,
12,
2890,
16,
4422,
16,
729,
16,
833,
16,
1384,
33,
20,
16,
1800,
33,
7036,
16,
1353,
33,
7036,
16,
819,
33,
7036,
16,
1056,
33,
8381,
4672,
3536,
5167,
364,
1409,
19,
87,
59... |
selected_tags = self.get_selected_tags()[0] | selected_tags = self.get_selected_tags() | def on_tag_treeview_button_press_event(self, treeview, event): Log.debug("Received button event #%d at %d,%d" %(event.button, event.x, event.y)) if event.button == 3: x = int(event.x) y = int(event.y) time = event.time pthinfo = treeview.get_path_at_pos(x, y) if pthinfo is not None: path, col, cellx, celly = pthinfo #pylint: disable-msg=W0612 treeview.grab_focus() # The location we want the cursor to return to # after we're done. self.previous_cursor = treeview.get_cursor() # For use in is_task_visible self.previous_tag = self.get_selected_tags() # Let's us know that we're working on a tag. self.tag_active = True | 97495bcbc21cd28c372e999fa4ee213282158099 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/97495bcbc21cd28c372e999fa4ee213282158099/browser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
67,
2692,
67,
3413,
1945,
67,
5391,
67,
1028,
67,
2575,
12,
2890,
16,
2151,
1945,
16,
871,
4672,
1827,
18,
4148,
2932,
8872,
3568,
871,
31974,
72,
622,
738,
72,
15529,
72,
6,
89... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2692,
67,
3413,
1945,
67,
5391,
67,
1028,
67,
2575,
12,
2890,
16,
2151,
1945,
16,
871,
4672,
1827,
18,
4148,
2932,
8872,
3568,
871,
31974,
72,
622,
738,
72,
15529,
72,
6,
89... |
else: top = self._top_page | else: top = self._top_page_url | def write_homepage(self, directory): """ Write an C{index.html} file in the given directory. The contents of this file are copied or linked from an existing page, so this method must be called after all pages have been written. The page used is determined by L{_frames_index} and L{_top_page}: - If L{_frames_index} is true, then C{frames.html} is copied. - Otherwise, the page specified by L{_top_page} is copied. """ filename = os.path.join(directory, 'index.html') if self._frames_index: top = 'frames.html' else: top = self._top_page | 28d88ae14617650a4a829fae94668100dc4e2b05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/28d88ae14617650a4a829fae94668100dc4e2b05/html.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
67,
28729,
12,
2890,
16,
1867,
4672,
3536,
2598,
392,
385,
95,
1615,
18,
2620,
97,
585,
316,
326,
864,
1867,
18,
225,
1021,
2939,
434,
333,
585,
854,
9268,
578,
8459,
628,
392,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
67,
28729,
12,
2890,
16,
1867,
4672,
3536,
2598,
392,
385,
95,
1615,
18,
2620,
97,
585,
316,
326,
864,
1867,
18,
225,
1021,
2939,
434,
333,
585,
854,
9268,
578,
8459,
628,
392,
... |
if ( align and crossLink(left_child, node, align) )\ or ( not align and classify(left_child, node, nPUBetween, model) ): | if ( align != None and crossLink(left_child, node, align) )\ or ( align == None and classify(left_child, node, nPUBetween, model) ): | def reorderVV(node, align, model, bDebug): left_children = [] nPUBetween = 0 while node.left_children: left_child = node.left_children.pop(-1) # for each left bReorder = False if left_child.pos in ['P']: if ( align and crossLink(left_child, node, align) )\ or ( not align and classify(left_child, node, nPUBetween, model) ): if bDebug: extra = dep.CDepNode(); extra.token='('+left_child.pos; extra.pos=""; extra.word_index=-1 node.right_children.append(extra) # append node.right_children.append(left_child) if bDebug: extra = dep.CDepNode(); extra.token=')'; extra.pos=""; extra.word_index=-1 node.right_children.append(extra) bReorder = True elif left_child.pos in ['NT', 'M', 'CD', 'OD']: if ( align and crossLink(left_child, node, align) )\ or ( not align and classify(left_child, node, nPUBetween, model) ): if bDebug: extra = dep.CDepNode(); extra.token=')'; extra.pos=""; extra.word_index=-1 node.right_children.insert(0, extra) # insert node.right_children.insert(0, left_child) if bDebug: extra = dep.CDepNode(); extra.token='('+left_child.pos; extra.pos=""; extra.word_index=-1 node.right_children.insert(0, extra) bReorder = True elif left_child.pos in ['PU']: nPUBetween += 1 if not bReorder: left_children.insert(0, left_child) if align: recordOrder(bReorder, left_child, node, nPUBetween, model) node.left_children = left_children | e6e63854569a7f58d2daf77ad5010c5e0e29804d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6094/e6e63854569a7f58d2daf77ad5010c5e0e29804d/adapt.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
19427,
58,
58,
12,
2159,
16,
5689,
16,
938,
16,
324,
2829,
4672,
2002,
67,
5906,
273,
5378,
290,
17217,
8458,
273,
374,
1323,
756,
18,
4482,
67,
5906,
30,
225,
2002,
67,
3624,
273,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
19427,
58,
58,
12,
2159,
16,
5689,
16,
938,
16,
324,
2829,
4672,
2002,
67,
5906,
273,
5378,
290,
17217,
8458,
273,
374,
1323,
756,
18,
4482,
67,
5906,
30,
225,
2002,
67,
3624,
273,
7... |
entryList = self.dlsApi.getLocations(fileBlockId) except Exception, ex: connected = False while not connected: try: self.dlsApi = self.connectDLS() except Exception, ex: logging.error( \ " failing to reconnect to DLS (exception: %s)" % ex) logging.error( \ " trying again in %s seconds" % self.delayDLS) time.sleep(self.delayDLS) else: connected = True try: entryList = self.dlsApi.getLocations(fileBlockId) except Exception, ex: logging.warning( \ "DLS error, assuming empty SE for fileblock %s" % \ fileBlockId) return [] seList = [] for entry in entryList: for loc in entry.locations: seList.append(str(loc.host)) return seList def getFileListFromDBS(self, datasetId): """ _getFileListFromDBS_ Get the list of files of the dataset from DBS Arguments: datasetId -- the name of the dataset Return: list of tuples (name,size,fileBlockId) for all files in dataset """ fileList = [] blockList = self.getDatasetContents(datasetId) | blocks = self.dbsReader.getFiles(datasetId) except DBSReaderError, ex: logging.error("DBS error: ", ex) return fileList | def getSElist(self, fileBlockId): """ return SE list associated to a file block """ | 87d7e4aaef9a55485525200d47dab0552b5b83de /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8887/87d7e4aaef9a55485525200d47dab0552b5b83de/MergeSensorComponent.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
1090,
1098,
12,
2890,
16,
585,
1768,
548,
4672,
3536,
327,
3174,
666,
3627,
358,
279,
585,
1203,
3536,
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,
336,
1090,
1098,
12,
2890,
16,
585,
1768,
548,
4672,
3536,
327,
3174,
666,
3627,
358,
279,
585,
1203,
3536,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
next = self.index(mark + " lineend +1c") | next = self.index(mark + "+%d lines linestart" % lines_to_get) lines_to_get = min(lines_to_get * 2, 100) | def recolorize_main(self): next = "1.0" was_ok = is_ok = 0 while 1: item = self.tag_nextrange("TODO", next) if not item: break head, tail = item self.tag_remove("SYNC", head, tail) item = self.tag_prevrange("SYNC", head) if item: head = item[1] else: head = "1.0" | 9767526960d2abfa9e089bfad4cb4e9793df223b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/9767526960d2abfa9e089bfad4cb4e9793df223b/ColorDelegator.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
283,
3266,
554,
67,
5254,
12,
2890,
4672,
1024,
273,
315,
21,
18,
20,
6,
1703,
67,
601,
273,
353,
67,
601,
273,
374,
1323,
404,
30,
761,
273,
365,
18,
2692,
67,
82,
14523,
726,
293... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
283,
3266,
554,
67,
5254,
12,
2890,
4672,
1024,
273,
315,
21,
18,
20,
6,
1703,
67,
601,
273,
353,
67,
601,
273,
374,
1323,
404,
30,
761,
273,
365,
18,
2692,
67,
82,
14523,
726,
293... |
self.context.append(('</a>', '')) self.context.append(('<a class="fn-backref" href=" % backrefs[0],)) | self.context.append('') self.context.append('<a class="fn-backref" href=" 'name="%s">' % (backrefs[0], node['id'])) | def footnote_backrefs(self, node): if self.document.options.footnote_backlinks \ and node.hasattr('backrefs'): backrefs = node['backrefs'] if len(backrefs) == 1: self.context.append(('</a>', '')) self.context.append(('<a class="fn-backref" href="#%s">' % backrefs[0],)) else: i = 1 backlinks = [] for backref in backrefs: backlinks.append('<a class="fn-backref" href="#%s">%s</a>' % (backref, i)) i += 1 self.context.append(('', '(%s) ' % ', '.join(backlinks))) self.context.append(('',)) else: self.context.append(('', '')) self.context.append(('',)) | 28b39b6bbb89529016db4792836efaf0aa7509cc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8194/28b39b6bbb89529016db4792836efaf0aa7509cc/html4css1.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
14200,
7652,
67,
823,
9316,
12,
2890,
16,
756,
4672,
309,
365,
18,
5457,
18,
2116,
18,
10923,
7652,
67,
823,
7135,
521,
471,
756,
18,
5332,
1747,
2668,
823,
9316,
11,
4672,
1473,
9316,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
14200,
7652,
67,
823,
9316,
12,
2890,
16,
756,
4672,
309,
365,
18,
5457,
18,
2116,
18,
10923,
7652,
67,
823,
7135,
521,
471,
756,
18,
5332,
1747,
2668,
823,
9316,
11,
4672,
1473,
9316,... |
bitesized_text='bitesized' | bitesized_text='bitesized', documentation_type='key', | def test_miro_bug_object(self, mock_xml_opener): # Parse XML document as if we got it from the web mock_xml_opener.return_value = lxml.etree.XML(open(os.path.join( settings.MEDIA_ROOT, 'sample-data', 'miro-2294-2009-08-06.xml')).read()) | c386306223e60d09ed0ac73512e53a9f59eb6dd1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11976/c386306223e60d09ed0ac73512e53a9f59eb6dd1/tests.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
9197,
303,
67,
925,
67,
1612,
12,
2890,
16,
5416,
67,
2902,
67,
25098,
4672,
468,
2884,
3167,
1668,
487,
309,
732,
2363,
518,
628,
326,
3311,
5416,
67,
2902,
67,
25098,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
9197,
303,
67,
925,
67,
1612,
12,
2890,
16,
5416,
67,
2902,
67,
25098,
4672,
468,
2884,
3167,
1668,
487,
309,
732,
2363,
518,
628,
326,
3311,
5416,
67,
2902,
67,
25098,
18,
... |
self.push("<p><b>Shutdown.</b> Goodbye.</p>") self.push(' ') | """Shutdown the server, saving the pickle if requested to do so.""" if params['how'].lower().find('save') >= 0: if not status.useDB and status.pickleName: self.push("<b>Saving...</b>") self.push(' ') fp = open(status.pickleName, 'wb') cPickle.dump(self.bayes, fp, 1) fp.close() self.push("<b>Shutdown</b>. Goodbye.") self.push(' ') | def onShutdown(self, params): self.push("<p><b>Shutdown.</b> Goodbye.</p>") self.push(' ') # Acts as a flush for small buffers. self.shutdown(2) self.close() raise SystemExit | f52f2d890498484d13b002f537e7616e27a554aa /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9857/f52f2d890498484d13b002f537e7616e27a554aa/pop3proxy.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
10961,
12,
2890,
16,
859,
4672,
3536,
10961,
326,
1438,
16,
12392,
326,
13379,
309,
3764,
358,
741,
1427,
12123,
309,
859,
3292,
13606,
29489,
8167,
7675,
4720,
2668,
5688,
6134,
1545... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
10961,
12,
2890,
16,
859,
4672,
3536,
10961,
326,
1438,
16,
12392,
326,
13379,
309,
3764,
358,
741,
1427,
12123,
309,
859,
3292,
13606,
29489,
8167,
7675,
4720,
2668,
5688,
6134,
1545... |
self._updates_status("Builders [%s] are red. See http://build.webkit.org." % ", ".join(red_builders_names), None) | self._update_status("Builders [%s] are red. See http://build.webkit.org." % ", ".join(red_builders_names), None) | def should_proceed_with_work_item(self, patch): red_builders_names = self.tool.buildbot.red_core_builders_names() if red_builders_names: red_builders_names = map(lambda name: "\"%s\"" % name, red_builders_names) # Add quotes around the names. self._updates_status("Builders [%s] are red. See http://build.webkit.org." % ", ".join(red_builders_names), None) return False self._updates_status("Landing patch %s from bug %s." % (patch["id"], patch["bug_id"]), patch) return True | 3fd2b6b4e7f8062fd3fbd49b83176d8bb431c970 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9392/3fd2b6b4e7f8062fd3fbd49b83176d8bb431c970/queues.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1410,
67,
685,
5288,
67,
1918,
67,
1252,
67,
1726,
12,
2890,
16,
4729,
4672,
1755,
67,
3510,
414,
67,
1973,
273,
365,
18,
6738,
18,
3510,
4819,
18,
1118,
67,
3644,
67,
3510,
414,
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,
1410,
67,
685,
5288,
67,
1918,
67,
1252,
67,
1726,
12,
2890,
16,
4729,
4672,
1755,
67,
3510,
414,
67,
1973,
273,
365,
18,
6738,
18,
3510,
4819,
18,
1118,
67,
3644,
67,
3510,
414,
67,... |
True returns dict keyed by node labels. | True returns dict keyed by vertex labels. | def cluster_triangles(self, nbunch=None, with_labels=False): r""" Returns the number of triangles for nbunch of nodes as an ordered list. The clustering coefficient of a graph is the fraction of possible triangles that are triangles, c_i = triangles_i / (k_i*(k_i-1)/2) where k_i is the degree of node i, [1]. A coefficient for the whole graph is the average of the c_i. Transitivity is the fraction of all possible triangles which are triangles, T = 3*triangles/triads, [1]. INPUT: -- nbunch - The nodes to inspect. If nbunch=None, returns data for all nodes in the graph -- with_labels - (boolean) default False returns list as above True returns dict keyed by node labels. REFERENCE: [1] Aric Hagberg, Dan Schult and Pieter Swart. NetworkX documentation. [Online] Available: https://networkx.lanl.gov/reference/networkx/ EXAMPLES: sage: (graphs.FruchtGraph()).cluster_triangles() [1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 0] sage: (graphs.FruchtGraph()).cluster_triangles(with_labels=True) {0: 1, 1: 1, 2: 0, 3: 1, 4: 1, 5: 1, 6: 1, 7: 1, 8: 0, 9: 1, 10: 1, 11: 0} sage: (graphs.FruchtGraph()).cluster_triangles(nbunch=[0,1,2]) [1, 1, 0] """ import networkx return networkx.triangles(self._nxg, nbunch, with_labels) | 7d819cbf1df622e9f76b4801233dbb334f44d362 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/7d819cbf1df622e9f76b4801233dbb334f44d362/graph.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2855,
67,
16857,
12356,
12,
2890,
16,
4264,
4384,
33,
7036,
16,
598,
67,
5336,
33,
8381,
4672,
436,
8395,
2860,
326,
1300,
434,
19959,
364,
4264,
4384,
434,
2199,
487,
392,
5901,
666,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2855,
67,
16857,
12356,
12,
2890,
16,
4264,
4384,
33,
7036,
16,
598,
67,
5336,
33,
8381,
4672,
436,
8395,
2860,
326,
1300,
434,
19959,
364,
4264,
4384,
434,
2199,
487,
392,
5901,
666,
... |
elif stanza_type == "GlueSiteUniqueID": self.site["Name"] = " ".join(map(str, entry.glue['SiteName'])) self.site["Location"] = " ".join(map(str, entry.glue['SiteLocation'][0])) self.site["Coords"] = "%s/%s" % (entry.glue['SiteLongitude'][0], entry.glue['SiteLatitude'][0]) self.site["Policy"] = " ".join(map(str, entry.glue['SiteWeb'])) self.site["Sponsor"] = ", ".join(map(str, entry.glue['SiteSponsor'])) self.site["TimeStamp"] = "" self.site["Email"] = " ".join(map(str, entry.glue['SiteEmailContact'])) self.site["UserSupport"] = " ".join(map(str, entry.glue['SiteUserSupportContact'])) self.site["Admin"] = " ".join(map(str, entry.glue['SiteSysAdminContact'])) self.site["Security"] = " ".join(map(str, entry.glue['SiteSecurityContact'])) | def parseLdif(self): for entry in self.entries: dn = list(entry.dn) stanza_type = dn[0].split("=")[0] | 56d459e9f05bea1a6dd581ce0dcf014e4da8a175 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12088/56d459e9f05bea1a6dd581ce0dcf014e4da8a175/pretty_gip_info.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
48,
11593,
12,
2890,
4672,
364,
1241,
316,
365,
18,
8219,
30,
8800,
273,
666,
12,
4099,
18,
5176,
13,
21650,
67,
723,
273,
8800,
63,
20,
8009,
4939,
2932,
1546,
25146,
20,
65,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
48,
11593,
12,
2890,
4672,
364,
1241,
316,
365,
18,
8219,
30,
8800,
273,
666,
12,
4099,
18,
5176,
13,
21650,
67,
723,
273,
8800,
63,
20,
8009,
4939,
2932,
1546,
25146,
20,
65,
... | |
"""Tests the addition of two arrays.""" | """Test the addition of two arrays.""" | def test_addition_array(self): """Tests the addition of two arrays.""" | b4921174e8e8618d1e94d342df636db8d27a7407 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12870/b4921174e8e8618d1e94d342df636db8d27a7407/test_abstract_array.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
1289,
608,
67,
1126,
12,
2890,
4672,
3536,
14650,
326,
2719,
434,
2795,
5352,
12123,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
1289,
608,
67,
1126,
12,
2890,
4672,
3536,
14650,
326,
2719,
434,
2795,
5352,
12123,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
types.StringsTypes): | types.StringTypes): | def takeMessage(self, key, fromcorpus, fromCache=False): '''Move a Message from another corpus to this corpus''' msg = fromcorpus[key] msg.load() # ensure that the substance has been loaded | 5fcd3f9c61a02c4689eb75847c1d5e4368097b73 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9857/5fcd3f9c61a02c4689eb75847c1d5e4368097b73/Corpus.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4862,
1079,
12,
2890,
16,
498,
16,
628,
3850,
9861,
16,
628,
1649,
33,
8381,
4672,
9163,
7607,
279,
2350,
628,
4042,
13825,
358,
333,
13825,
26418,
1234,
273,
628,
3850,
9861,
63,
856,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4862,
1079,
12,
2890,
16,
498,
16,
628,
3850,
9861,
16,
628,
1649,
33,
8381,
4672,
9163,
7607,
279,
2350,
628,
4042,
13825,
358,
333,
13825,
26418,
1234,
273,
628,
3850,
9861,
63,
856,
... |
self.showsystemaccounts = self.config.group("Options").readEntry("ShowSystemAccounts") | self.showsystemaccounts = bool(int(self.config.group("Options").readEntry("ShowSystemAccounts"))) | def __loadOptions(self): #self.config.setGroup("General") size = self.config.group("General").readEntry("Geometry") #if size.isEmpty()==False: #self.resize(size) # TODO #self.config.setGroup("Options") self.showsystemaccounts = self.config.group("Options").readEntry("ShowSystemAccounts") self.md.showspecialcheckbox.setChecked(bool(self.showsystemaccounts)) self.showsystemgroups = self.config.group("Options").readEntry("ShowSystemGroups") self.md.showspecialgroupscheckbox.setChecked(bool(self.showsystemgroups)) | f474e77c9e6409e98114f8c4180a2a063b389f4b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1669/f474e77c9e6409e98114f8c4180a2a063b389f4b/userconfig.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
945,
1320,
12,
2890,
4672,
468,
2890,
18,
1425,
18,
542,
1114,
2932,
12580,
7923,
225,
963,
273,
365,
18,
1425,
18,
1655,
2932,
12580,
20387,
896,
1622,
2932,
9823,
7923,
468,
430,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
945,
1320,
12,
2890,
4672,
468,
2890,
18,
1425,
18,
542,
1114,
2932,
12580,
7923,
225,
963,
273,
365,
18,
1425,
18,
1655,
2932,
12580,
20387,
896,
1622,
2932,
9823,
7923,
468,
430,... |
"immutable": [63, RPM_BIN, 16, 0], | "immutable": [63, RPM_BIN, 16, 0], "immutable1": [61, RPM_BIN, 16, 1], | def isErasePreReq(x): return (x & _ERASE_ONLY_MASK) != 0 | 36064e9e7b8187b1d2723e47eb83915d362cf0b4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1143/36064e9e7b8187b1d2723e47eb83915d362cf0b4/oldpyrpm.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
353,
41,
5648,
1386,
6113,
12,
92,
4672,
327,
261,
92,
473,
389,
654,
4429,
67,
10857,
67,
11704,
13,
480,
374,
282,
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,
353,
41,
5648,
1386,
6113,
12,
92,
4672,
327,
261,
92,
473,
389,
654,
4429,
67,
10857,
67,
11704,
13,
480,
374,
282,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
(3) There's a paper at | \item There's a paper at | def exp(self, prec = infinity): r""" Returns exp of this power series to the indicated precision. | c775d7251ec60d71617ffe835544bd7d0b055a49 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9417/c775d7251ec60d71617ffe835544bd7d0b055a49/power_series_ring_element.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1329,
12,
2890,
16,
13382,
273,
27272,
4672,
436,
8395,
2860,
1329,
434,
333,
7212,
4166,
358,
326,
17710,
6039,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1329,
12,
2890,
16,
13382,
273,
27272,
4672,
436,
8395,
2860,
1329,
434,
333,
7212,
4166,
358,
326,
17710,
6039,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
if s in self._storage: self._storage.remove(s) return | if key in self._storage_arr: self._storage_arr.remove(key) else: try: del self._storage_dict[key] except KeyError: pass return def get_storage(self, key): try: return self._storage_dict[key] except KeyError: return None | def remove_storage(self, s): """ Add a reference to an object used during execution of the instruction stream. This cache keeps locally allocated objects from being garbage collected once the stream is built. """ if s in self._storage: self._storage.remove(s) return | ea8fe5605ff094f493b98507c234ba28d8f01555 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9699/ea8fe5605ff094f493b98507c234ba28d8f01555/spe.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1206,
67,
5697,
12,
2890,
16,
272,
4672,
3536,
1436,
279,
2114,
358,
392,
733,
1399,
4982,
4588,
434,
326,
7592,
1407,
18,
225,
1220,
1247,
20948,
13760,
11977,
2184,
628,
3832,
15340,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1206,
67,
5697,
12,
2890,
16,
272,
4672,
3536,
1436,
279,
2114,
358,
392,
733,
1399,
4982,
4588,
434,
326,
7592,
1407,
18,
225,
1220,
1247,
20948,
13760,
11977,
2184,
628,
3832,
15340,
1... |
("soon", _("soon")), ("later", _("later"), ("", "")) | ("soon", _("soon")), ("later", _("later")), ("", "")) | def test_get_canonical_date(self): ''' Tests for "get_canonical_date" ''' known_values = (("1985-03-29", "1985-03-29"), ("now", _("now")), ("soon", _("soon")), ("later", _("later"), ("", "")) for value, result in known_values: date = get_canonical_date(value) self.assertEqual(date.__str__(), result) | 25a5cb933f1f65c2141505a903e7be2e72002ff5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/25a5cb933f1f65c2141505a903e7be2e72002ff5/test_dates.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
588,
67,
18288,
67,
712,
12,
2890,
4672,
9163,
7766,
87,
364,
315,
588,
67,
18288,
67,
712,
6,
9163,
4846,
67,
2372,
273,
261,
2932,
3657,
7140,
17,
4630,
17,
5540,
3113,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
588,
67,
18288,
67,
712,
12,
2890,
4672,
9163,
7766,
87,
364,
315,
588,
67,
18288,
67,
712,
6,
9163,
4846,
67,
2372,
273,
261,
2932,
3657,
7140,
17,
4630,
17,
5540,
3113,
3... |
reportToUpdate - state.getJobReport() | def stageOut(): """ _stageOut_ Main function for this module. Loads data from the task and manages the stage out process for a single attempt """ state = TaskState(os.getcwd()) state.loadRunResDB() config = state.configurationDict() # // # // find inputs by locating the task for which we are staging out #// and loading its TaskState inputTask = config['StageOutParameters']['StageOutFor'][0] inputState = getTaskState(inputTask) reportToUpdate - state.getJobReport() try: manager = StageOutManager(state, inputState) exitCode = manager() except StageOutInitError, ex: exitCode = ex.data['ErrorCode'] inputReport = inputState.getJobReport() errRep = inputReport.addError( ex.data['ErrorCode'], ex.data['ErrorType']) errRep['Description'] = ex.message inputReport.status = "Failed" inputReport.exitCode = ex.data['ErrorCode'] inputState.saveJobReport() reportToUpdate = inputState.getJobReport() # // # // Update primary job report #// toplevelReport = os.path.join(os.environ['PRODAGENT_JOB_DIR'], "FrameworkJobReport.xml") updateReport(toplevelReport, reportToUpdate) print "Stage Out Complete: Exiting: %s " % exitCode return exitCode | d2333b7d81bbcfa8fbf7f72bcdc2ea34411f3897 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8887/d2333b7d81bbcfa8fbf7f72bcdc2ea34411f3897/RuntimeStageOut.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6009,
1182,
13332,
3536,
389,
12869,
1182,
67,
225,
12740,
445,
364,
333,
1605,
18,
4444,
87,
501,
628,
326,
1562,
471,
20754,
281,
326,
6009,
596,
1207,
364,
279,
2202,
4395,
225,
3536,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6009,
1182,
13332,
3536,
389,
12869,
1182,
67,
225,
12740,
445,
364,
333,
1605,
18,
4444,
87,
501,
628,
326,
1562,
471,
20754,
281,
326,
6009,
596,
1207,
364,
279,
2202,
4395,
225,
3536,... | |
memoryFactor = 1 | memoryFactor = 1024**0 | def getOvfMemory(virtualHardware, configId=None): """ Retrieves the maximum amount of memory (kB) to be allocated for the virtual machine from the Ovf file. @note: DSP0004 v2.5.0 outlines the Programmatic Unit forms for OVF. This pertains specifically to rasd:AllocationUnits, which accepts both the current and deprecated forms. New implementations should not use Unit Qualifiers as this form is deprecated. - PUnit form, as in "byte * 2^20" - PUnit form w/ Units Qualifier(deprecated), as in "MegaBytes" @param virtualHardware: Ovf VirtualSystem Node @type virtualHardware: DOM Element @param configId: configuration name @type configId: String @return: memory in kB @rtype: String """ memory = '' # TODO: needs to use bound:max, if it exists rasd = Ovf.getDict(virtualHardware, configId)['children'] for resource in rasd: if(resource.has_key('rasd:ResourceType') and resource['rasd:ResourceType'] == '4'): memoryQuantity = resource['rasd:VirtualQuantity'] memoryUnits = resource['rasd:AllocationUnits'] if(memoryUnits.startswith('byte') or memoryUnits.startswith('bit')): # Calculate PUnit numerical factor memoryUnits = memoryUnits.replace('^','**') # Determine PUnit Quantifier DMTF DSP0004, {byte, bit} memoryUnits = memoryUnits.split(' ', 1) quantifier = memoryUnits[0] if quantifier == 'byte': memoryUnits[0] = '1' elif quantifier == 'bit': memoryUnits[0] = '0.125' else: raise ValueError("Incompatible PUnit quantifier for memory.") memoryUnits = ' '.join(memoryUnits) memoryFactor = eval(memoryUnits) else: if memoryUnits.startswith('Kilo'): memoryFactor = 1 elif memoryUnits.startswith('Mega'): memoryFactor = 1024 elif memoryUnits.startswith('Giga'): memoryFactor = 2048 else: raise ValueError("Incompatible PUnit quantifier for memory.") if memoryUnits.endswith('Bytes'): memoryFactor *= 1 elif memoryUnits.endswith('Bits'): memoryFactor *= 0.125 else: raise ValueError("Incompatible PUnit quantifier for memory.") memory = str(int(memoryQuantity) * memoryFactor) return memory | 193520ceb43bdec32d98a69cc2aa37627ad6b70e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9789/193520ceb43bdec32d98a69cc2aa37627ad6b70e/OvfLibvirt.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
17971,
90,
74,
6031,
12,
12384,
44,
14519,
16,
642,
548,
33,
7036,
4672,
3536,
20507,
326,
4207,
3844,
434,
3778,
261,
79,
38,
13,
358,
506,
11977,
364,
326,
5024,
5228,
628,
326,
531,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
17971,
90,
74,
6031,
12,
12384,
44,
14519,
16,
642,
548,
33,
7036,
4672,
3536,
20507,
326,
4207,
3844,
434,
3778,
261,
79,
38,
13,
358,
506,
11977,
364,
326,
5024,
5228,
628,
326,
531,... |
audioElem.set_property('device', 'spdif:{AES0 0x0 AES1 0x82 AES2 0x0 AES3 0x2 CARD %(spdifCard)s}' % options) | def __init__(self, options, name='audiodec'): super(SpdifAudio, self).__init__(name, """ ( capsselect name=capsselect ! ac3iec958 ! capsaggreg name=capsaggreg ! seamless-queue max-size-bytes=40000 ! { alsasink name=audiosink } | 70235f0b26c68b6a00cbb5861103371054ee2dac /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5222/70235f0b26c68b6a00cbb5861103371054ee2dac/pipeline.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
702,
16,
508,
2218,
24901,
77,
390,
71,
11,
4672,
2240,
12,
3389,
11593,
12719,
16,
365,
2934,
972,
2738,
972,
12,
529,
16,
3536,
261,
3523,
1049,
13759,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
702,
16,
508,
2218,
24901,
77,
390,
71,
11,
4672,
2240,
12,
3389,
11593,
12719,
16,
365,
2934,
972,
2738,
972,
12,
529,
16,
3536,
261,
3523,
1049,
13759,... | |
res = self.getTransformation(transName,extraParams=extraParams,connection=connection) | res = self.getTransformation( transName, extraParams = extraParams, connection = connection ) | def getTransformationParameters(self,transName,parameters,connection=False): """ Get the requested parameters for a supplied transformation """ if type(parameters) in StringTypes: parameters = [parameters] extraParams = False for param in parameters: if not param in self.TRANSPARAMS: extraParams = True res = self.getTransformation(transName,extraParams=extraParams,connection=connection) if not res['OK']: return res transParams = res['Value'] paramDict = {} for reqParam in parameters: if not reqParam in transParams.keys(): return S_ERROR("Parameter %s not defined for transformation" % reqParam) paramDict[reqParam] = transParams[reqParam] if len(paramDict) == 1: return S_OK(paramDict[reqParam]) return S_OK(paramDict) | 9ad007ea503b29694fc081c1646b7c5ecd07b1f2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/9ad007ea503b29694fc081c1646b7c5ecd07b1f2/TransformationDB.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
15292,
2402,
12,
2890,
16,
2338,
461,
16,
3977,
16,
4071,
33,
8381,
4672,
3536,
968,
326,
3764,
1472,
364,
279,
4580,
8620,
3536,
309,
618,
12,
3977,
13,
316,
514,
2016,
30,
1472,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
15292,
2402,
12,
2890,
16,
2338,
461,
16,
3977,
16,
4071,
33,
8381,
4672,
3536,
968,
326,
3764,
1472,
364,
279,
4580,
8620,
3536,
309,
618,
12,
3977,
13,
316,
514,
2016,
30,
1472,... |
if not fSources: fSources = self.getPlatformFactorySources() | def toPlatformDefinition(self): "Create a PlatformDefinition object from this ProductDefinition" nplat = PlatformDefinition() baseFlavor = self.getBaseFlavor() nplat.setBaseFlavor(baseFlavor) | f64f8e3e1ced354ce0b205d693720ffe7038b0c8 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7634/f64f8e3e1ced354ce0b205d693720ffe7038b0c8/api1.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
358,
8201,
1852,
12,
2890,
4672,
315,
1684,
279,
11810,
1852,
733,
628,
333,
8094,
1852,
6,
290,
412,
270,
273,
11810,
1852,
1435,
1026,
2340,
9444,
273,
365,
18,
588,
2171,
2340,
9444,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
358,
8201,
1852,
12,
2890,
4672,
315,
1684,
279,
11810,
1852,
733,
628,
333,
8094,
1852,
6,
290,
412,
270,
273,
11810,
1852,
1435,
1026,
2340,
9444,
273,
365,
18,
588,
2171,
2340,
9444,
... | |
None, [cty.POINTER(FL_OBJECT), cty.c_int], | None, [cty.POINTER(FL_OBJECT), cty.c_int], | def fl_set_xyplot_interpolate(obj, id, deg, grid): """ fl_set_xyplot_interpolate(obj, id, deg, grid) """ _fl_set_xyplot_interpolate(obj, id, deg, grid) | 9942dac8ce2b35a1e43615a26fd8e7054ef805d3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2429/9942dac8ce2b35a1e43615a26fd8e7054ef805d3/xformslib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1183,
67,
542,
67,
1698,
4032,
67,
18676,
340,
12,
2603,
16,
612,
16,
5843,
16,
3068,
4672,
3536,
1183,
67,
542,
67,
1698,
4032,
67,
18676,
340,
12,
2603,
16,
612,
16,
5843,
16,
3068... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1183,
67,
542,
67,
1698,
4032,
67,
18676,
340,
12,
2603,
16,
612,
16,
5843,
16,
3068,
4672,
3536,
1183,
67,
542,
67,
1698,
4032,
67,
18676,
340,
12,
2603,
16,
612,
16,
5843,
16,
3068... |
tmp = "/tmp" for file in os.listdir(tmp): try: if file.startswith("Flash"): filepath = os.path.join(tmp, file) | for filepath in commands.getoutput("pgrep -f flashplayer | xargs -I PID find /proc/PID/fd -lname '/tmp/Flash*'").split("\n"): if filepath != "": try: | def _check_for_Flash(self): try: tmp = "/tmp" ## look for filenames that begin with 'Flash' for file in os.listdir(tmp): try: if file.startswith("Flash"): filepath = os.path.join(tmp, file) duration = utils.getFLVLength(filepath) | a8c195e142a80cd0d8e9d57227b5e2f186bc90ff /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7152/a8c195e142a80cd0d8e9d57227b5e2f186bc90ff/core.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1893,
67,
1884,
67,
11353,
12,
2890,
4672,
775,
30,
1853,
273,
2206,
5645,
6,
7541,
2324,
364,
9066,
716,
2376,
598,
296,
11353,
11,
364,
585,
316,
1140,
18,
1098,
1214,
12,
5645,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1893,
67,
1884,
67,
11353,
12,
2890,
4672,
775,
30,
1853,
273,
2206,
5645,
6,
7541,
2324,
364,
9066,
716,
2376,
598,
296,
11353,
11,
364,
585,
316,
1140,
18,
1098,
1214,
12,
5645,... |
self.sock = socket.socket(af, socktype, proto) if self.debuglevel > 0: print>>stderr, 'connect:', sa self.sock.connect(sa) | self._get_socket(af,socktype,proto,sa) | def connect(self, host='localhost', port = 0): """Connect to a host on a given port. | 43a3b8327e6401a43e4e8f0b4d101646e5fb05ac /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/43a3b8327e6401a43e4e8f0b4d101646e5fb05ac/smtplib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3077,
12,
2890,
16,
1479,
2218,
13014,
2187,
1756,
273,
374,
4672,
3536,
5215,
358,
279,
1479,
603,
279,
864,
1756,
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,
0,
0,
0,
0,
0,
0,
0,
0,
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,
3077,
12,
2890,
16,
1479,
2218,
13014,
2187,
1756,
273,
374,
4672,
3536,
5215,
358,
279,
1479,
603,
279,
864,
1756,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
except OSError, ose: if ose.errno == errno.EPERM: raise unittest.SkiptTest( | except IOError, ioe: if ioe.errno == errno.EACCES: raise unittest.SkipTest( | def _testDetectNewFiles(self): writeFileName = sibpath(plugins.__file__, 'pluginextra.py') try: wf = file(writeFileName, 'w') except OSError, ose: if ose.errno == errno.EPERM: raise unittest.SkiptTest( "No permission to add things to twisted.plugins") else: raise else: try: wf.write(begintest) wf.flush() | b2b7cf44f8ba0e340da4babcd1d3a5e9d2196fe0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/b2b7cf44f8ba0e340da4babcd1d3a5e9d2196fe0/test_plugin.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3813,
12081,
1908,
2697,
12,
2890,
4672,
1045,
4771,
273,
12092,
803,
12,
8057,
16186,
768,
972,
16,
296,
4094,
7763,
18,
2074,
6134,
775,
30,
11578,
273,
585,
12,
2626,
4771,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3813,
12081,
1908,
2697,
12,
2890,
4672,
1045,
4771,
273,
12092,
803,
12,
8057,
16186,
768,
972,
16,
296,
4094,
7763,
18,
2074,
6134,
775,
30,
11578,
273,
585,
12,
2626,
4771,
16,
... |
ps.Publisher().sendMessage('Show surface', (index, flag)) | ps.Publisher().sendMessage('Show surface', (index, flag)) | def OnCheckItem(self, index, flag): ps.Publisher().sendMessage('Show surface', (index, flag)) | 285bc1047c766537617f84d1630080fa16616625 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10228/285bc1047c766537617f84d1630080fa16616625/data_notebook.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2755,
1564,
1180,
12,
2890,
16,
770,
16,
2982,
4672,
4250,
18,
15960,
7675,
4661,
1079,
2668,
5706,
9034,
2187,
261,
1615,
16,
2982,
3719,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
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,
2755,
1564,
1180,
12,
2890,
16,
770,
16,
2982,
4672,
4250,
18,
15960,
7675,
4661,
1079,
2668,
5706,
9034,
2187,
261,
1615,
16,
2982,
3719,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
return; | return | def __init__(cls, name, bases, dict_): super(StructMeta, cls).__init__(name, bases, dict_) | d1ae73f3cf7cebdb74c9ec56b08928a2a53b9de6 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8659/d1ae73f3cf7cebdb74c9ec56b08928a2a53b9de6/types.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
6429,
16,
508,
16,
8337,
16,
2065,
67,
4672,
2240,
12,
3823,
2781,
16,
2028,
2934,
972,
2738,
972,
12,
529,
16,
8337,
16,
2065,
67,
13,
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,
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,
1001,
2738,
972,
12,
6429,
16,
508,
16,
8337,
16,
2065,
67,
4672,
2240,
12,
3823,
2781,
16,
2028,
2934,
972,
2738,
972,
12,
529,
16,
8337,
16,
2065,
67,
13,
2,
-100,
-100,
-100,
-100... |
data += self.sslobj.read(len(data)-size) | data += self.sslobj.read(size-len(data)) | def read(self, size): """Read 'size' bytes from remote.""" # sslobj.read() sometimes returns < size bytes data = self.sslobj.read(size) while len(data) < size: data += self.sslobj.read(len(data)-size) | c92c9e07c6e1c1e594f2b0aa0e38c3a32bb8fd7b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/c92c9e07c6e1c1e594f2b0aa0e38c3a32bb8fd7b/imaplib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
12,
2890,
16,
963,
4672,
3536,
1994,
296,
1467,
11,
1731,
628,
2632,
12123,
468,
5202,
383,
441,
18,
896,
1435,
16594,
1135,
411,
963,
1731,
501,
273,
365,
18,
1049,
383,
441,
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,
855,
12,
2890,
16,
963,
4672,
3536,
1994,
296,
1467,
11,
1731,
628,
2632,
12123,
468,
5202,
383,
441,
18,
896,
1435,
16594,
1135,
411,
963,
1731,
501,
273,
365,
18,
1049,
383,
441,
18,... |
env = {"PYTHONPATH": os.getenv("PYTHONPATH")} | def preprocess(result): return sorted([x.strip() for x in result.strip().split("\n")]) | 90eb2ce6b4c85235ad14c933cdd1563cb1327a7a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11734/90eb2ce6b4c85235ad14c933cdd1563cb1327a7a/runExamples.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
17942,
12,
2088,
4672,
327,
3115,
3816,
92,
18,
6406,
1435,
364,
619,
316,
563,
18,
6406,
7675,
4939,
31458,
82,
7923,
5717,
225,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
17942,
12,
2088,
4672,
327,
3115,
3816,
92,
18,
6406,
1435,
364,
619,
316,
563,
18,
6406,
7675,
4939,
31458,
82,
7923,
5717,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... | |
opts_short = 'hdo:r' opts_long = ['help', 'directory', 'output=', 'recursive'] | opts_short = 'hdo:rn' opts_long = ['help', 'directory', 'output=', 'recursive', 'no-validate'] | def main (): usage = '''%s [-h|--help] [-v|--version] [-d|--directory] [-r|--recursive] [-o|--output output_dir] input1 input2 .. inputN | 4d172ebedb12f0405b343d09ca3fb6ef1f7542f1 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/13309/4d172ebedb12f0405b343d09ca3fb6ef1f7542f1/napi.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
1832,
30,
4084,
273,
9163,
9,
87,
23059,
76,
96,
413,
5201,
65,
23059,
90,
96,
413,
1589,
65,
23059,
72,
96,
413,
5149,
65,
23059,
86,
96,
413,
10543,
65,
23059,
83,
96,
413,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2774,
1832,
30,
4084,
273,
9163,
9,
87,
23059,
76,
96,
413,
5201,
65,
23059,
90,
96,
413,
1589,
65,
23059,
72,
96,
413,
5149,
65,
23059,
86,
96,
413,
10543,
65,
23059,
83,
96,
413,
... |
if (method == 'POST'): result = _post(url, params, headers) | scripts = '' try: if (method == 'POST'): result = _post(url, params, headers) else: result = _get(url, params, headers) except urllib2.HTTPError, e: content = '<p><label>HTTP Code:</label> %s <br/><label>URL:</label> %s<br/><label>Details:</label> %s<br/></p>' % (e.getcode(), e.geturl(), str(e)) scripts = ''' ui.MessageDlg.set_text('%s', '%s'); ui.MessageDlg.show(); lib.twitterapi.error_task_table['%s'](''); ''' % ('Ooops, an Error occurred!', content, uuid); pass | def request(uuid, method, url, params={}, headers={}): if (method == 'POST'): result = _post(url, params, headers) else: result = _get(url, params, headers) scripts = '' if result[0] != '{' and result[0] != '[': scripts = '''lib.twitterapi.success_task_table['%s']('%s'); ''' % (uuid, result) else: scripts = '''lib.twitterapi.success_task_table['%s'](%s); ''' % (uuid, result) gobject.idle_add(webv.execute_script, scripts) pass | df6543a5ac8aa4b412f05900989c253731da5f04 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12179/df6543a5ac8aa4b412f05900989c253731da5f04/agent.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
590,
12,
7080,
16,
707,
16,
880,
16,
859,
28793,
1607,
12938,
4672,
8873,
273,
875,
775,
30,
309,
261,
2039,
422,
296,
3798,
11,
4672,
563,
273,
389,
2767,
12,
718,
16,
859,
16,
1607... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
590,
12,
7080,
16,
707,
16,
880,
16,
859,
28793,
1607,
12938,
4672,
8873,
273,
875,
775,
30,
309,
261,
2039,
422,
296,
3798,
11,
4672,
563,
273,
389,
2767,
12,
718,
16,
859,
16,
1607... |
sage: repr(Permutations(['c','a','t'])) "Permutations of the (multi-)set ['c', 'a', 't']" """ return "Permutations of the (multi-)set %s"%self.mset | sage: repr(Permutations(['c','a','c'])) "Permutations of the multi-set ['c', 'a', 'c']" """ return "Permutations of the multi-set %s"%self.mset | def __repr__(self): """ TESTS: sage: repr(Permutations(['c','a','t'])) "Permutations of the (multi-)set ['c', 'a', 't']" """ return "Permutations of the (multi-)set %s"%self.mset | 2cd989d0145c5f5058eae905bd3f0d97a625d18d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9417/2cd989d0145c5f5058eae905bd3f0d97a625d18d/permutation.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
12715,
972,
12,
2890,
4672,
3536,
22130,
55,
30,
272,
410,
30,
8480,
12,
9123,
22190,
12,
3292,
71,
17023,
69,
17023,
88,
3546,
3719,
315,
9123,
22190,
434,
326,
261,
7027,
17,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
12715,
972,
12,
2890,
4672,
3536,
22130,
55,
30,
272,
410,
30,
8480,
12,
9123,
22190,
12,
3292,
71,
17023,
69,
17023,
88,
3546,
3719,
315,
9123,
22190,
434,
326,
261,
7027,
17,
1... |
delta.x = scanner.real | delta.i = scanner.real | def getcourse(isprobe, akey): "Get a course and distance from the user." key = 0 dquad = copy.copy(game.quadrant) navmode = "unspecified" itemp = "curt" dsect = coord() iprompt = False if game.landed and not isprobe: prout(_("Dummy! You can't leave standard orbit until you")) proutn(_("are back aboard the ship.")) scanner.chew() return False while navmode == "unspecified": if damaged(DNAVSYS): if isprobe: prout(_("Computer damaged; manual navigation only")) else: prout(_("Computer damaged; manual movement only")) scanner.chew() navmode = "manual" key = IHEOL break if isprobe and akey != -1: # For probe launch, use pre-scanned value first time key = akey akey = -1 else: key = scanner.next() if key == IHEOL: proutn(_("Manual or automatic- ")) iprompt = True scanner.chew() elif key == IHALPHA: if scanner.sees("manual"): navmode = "manual" key = scanner.next() break elif scanner.sees("automatic"): navmode = "automatic" key = scanner.next() break else: huh() scanner.chew() return False else: # numeric if isprobe: prout(_("(Manual navigation assumed.)")) else: prout(_("(Manual movement assumed.)")) navmode = "manual" break if navmode == "automatic": while key == IHEOL: if isprobe: proutn(_("Target quadrant or quadrant§or- ")) else: proutn(_("Destination sector or quadrant§or- ")) scanner.chew() iprompt = True key = scanner.next() if key != IHREAL: huh() return False xi = int(round(scanner.real))-1 key = scanner.next() if key != IHREAL: huh() return False xj = int(round(scanner.real))-1 key = scanner.next() if key == IHREAL: # both quadrant and sector specified xk = int(round(scanner.real))-1 key = scanner.next() if key != IHREAL: huh() return False xl = int(round(scanner.real))-1 dquad.x = xi dquad.y = xj dsect.y = xk dsect.x = xl else: # only one pair of numbers was specified if isprobe: # only quadrant specified -- go to center of dest quad dquad.x = xi dquad.y = xj dsect.y = dsect.x = 4 # preserves 1-origin behavior else: # only sector specified dsect.y = xi dsect.x = xj itemp = "normal" if not VALID_QUADRANT(dquad.y,dquad.x) or not VALID_SECTOR(dsect.x,dsect.y): huh() return False skip(1) if not isprobe: if itemp > "curt": if iprompt: prout(_("Helmsman Sulu- \"Course locked in for Sector %s.\"") % dsect) else: prout(_("Ensign Chekov- \"Course laid in, Captain.\"")) # the actual deltas get computed here delta = coord() delta.x = dquad.y-game.quadrant.y + 0.1*(dsect.x-game.sector.y) delta.y = game.quadrant.x-dquad.x + 0.1*(game.sector.x-dsect.y) else: # manual while key == IHEOL: proutn(_("X and Y displacements- ")) scanner.chew() iprompt = True key = scanner.next() itemp = "verbose" if key != IHREAL: huh() return False delta.y = scanner.real key = scanner.next() if key != IHREAL: huh() return False delta.x = scanner.real # Check for zero movement if delta.x == 0 and delta.y == 0: scanner.chew() return False if itemp == "verbose" and not isprobe: skip(1) prout(_("Helmsman Sulu- \"Aye, Sir.\"")) # Course actually laid in. game.dist = delta.distance() game.direc = delta.bearing() if game.direc < 0.0: game.direc += 12.0 scanner.chew() return True | e67cf36a789c4ab1cd905a9a08e91d219395f538 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3176/e67cf36a789c4ab1cd905a9a08e91d219395f538/sst.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
5566,
12,
291,
27230,
16,
279,
856,
4672,
315,
967,
279,
4362,
471,
3888,
628,
326,
729,
1199,
498,
273,
374,
302,
21733,
273,
1610,
18,
3530,
12,
13957,
18,
21733,
6890,
13,
8775... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5566,
12,
291,
27230,
16,
279,
856,
4672,
315,
967,
279,
4362,
471,
3888,
628,
326,
729,
1199,
498,
273,
374,
302,
21733,
273,
1610,
18,
3530,
12,
13957,
18,
21733,
6890,
13,
8775... |
/* ** Parse/generate objsect */ static PyObject * PyMac_BuildFInfo(FInfo *itself) { return Py_BuildValue("O&O&HO&h", PyMac_BuildOSType, itself->fdType, PyMac_BuildOSType, itself->fdCreator, itself->fdFlags, PyMac_BuildPoint, &itself->fdLocation, itself->fdFldr); } static int PyMac_GetFInfo(PyObject *v, FInfo *itself) { return PyArg_ParseTuple(v, "O&O&HO&h", PyMac_GetOSType, &itself->fdType, PyMac_GetOSType, &itself->fdCreator, &itself->fdFlags, PyMac_GetPoint, &itself->fdLocation, &itself->fdFldr); } | #ifdef WITHOUT_FRAMEWORKS | e87663306a989afea3a2ed3e245a6190fd9e1fa9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/e87663306a989afea3a2ed3e245a6190fd9e1fa9/filesupport.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
468,
430,
536,
13601,
5069,
67,
15072,
10566,
55,
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,
468,
430,
536,
13601,
5069,
67,
15072,
10566,
55,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... | |
HTTPSConnection.putrequest(self, method, rest, skip_host, skip_accept_encoding) | if sys.version_info < (2,4): HTTPSConnection.putrequest(self, method, rest, skip_host) else: HTTPSConnection.putrequest(self, method, rest, skip_host, skip_accept_encoding) | def putrequest(self, method, url, skip_host=0, skip_accept_encoding=0): #putrequest is called before connect, so can interpret url and get #real host/port to be used to make CONNECT request to proxy proto, netloc, path, query, fragment = urlsplit(url) if not proto: raise ValueError, "unknown URL type: %s" % url #get host & port try: username_password, host_port = netloc.split('@') except ValueError: host_port = netloc | 6e4415cb7f32917b6e418fdf887f9f1a2902a572 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10522/6e4415cb7f32917b6e418fdf887f9f1a2902a572/httpslib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1378,
2293,
12,
2890,
16,
707,
16,
880,
16,
2488,
67,
2564,
33,
20,
16,
2488,
67,
9436,
67,
5999,
33,
20,
4672,
468,
458,
2293,
353,
2566,
1865,
3077,
16,
1427,
848,
10634,
880,
471,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1378,
2293,
12,
2890,
16,
707,
16,
880,
16,
2488,
67,
2564,
33,
20,
16,
2488,
67,
9436,
67,
5999,
33,
20,
4672,
468,
458,
2293,
353,
2566,
1865,
3077,
16,
1427,
848,
10634,
880,
471,... |
from_model, from_iter = drag_context.get_source_widget().get_selection().get_selected() | from_tree = drag_context.get_source_widget() from_model, from_iter = from_tree.get_selection().get_selected() | def on_drag_drop(self, treeview, drag_context, x, y, selection): to_path, to_pos = treeview.get_dest_row_at_pos(x, y) to_model = treeview.get_model() to_iter = to_model.get_iter(to_path) from_model, from_iter = drag_context.get_source_widget().get_selection().get_selected() self.iterCopy(from_model, from_iter, to_model, to_iter, to_pos) drag_context.finish(True, True) treeview.expand_to_path(to_path) | aa234f33f1f19806935e01b446c096c5d9fc1be1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14563/aa234f33f1f19806935e01b446c096c5d9fc1be1/init_grug_and_drop.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
67,
15997,
67,
7285,
12,
2890,
16,
2151,
1945,
16,
8823,
67,
2472,
16,
619,
16,
677,
16,
4421,
4672,
358,
67,
803,
16,
358,
67,
917,
273,
2151,
1945,
18,
588,
67,
10488,
67,
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,
603,
67,
15997,
67,
7285,
12,
2890,
16,
2151,
1945,
16,
8823,
67,
2472,
16,
619,
16,
677,
16,
4421,
4672,
358,
67,
803,
16,
358,
67,
917,
273,
2151,
1945,
18,
588,
67,
10488,
67,
4... |
(len(parts[ii]) > 0 and not parts[ii][0] == ")") | (len(parts[ii]) > 0 and not parts[ii][0] == ")" and not fptr.match(parts[ii])) | def __FindSplit(self, string): """Finds a place to split a string.""" splitter = string.find('=') if splitter >= 0 and not string[splitter + 1] == '=' and splitter < 80: return splitter parts = string.split('(') if len(parts) > 1: splitter = len(parts[0]) for ii in range(1, len(parts)): if (not parts[ii - 1][-3:] == "if " and (len(parts[ii]) > 0 and not parts[ii][0] == ")") and splitter < 80): return splitter splitter += len(parts[ii]) + 1 done = False end = len(string) last_splitter = -1 while not done: splitter = string[0:end].rfind(',') if splitter < 0: return last_splitter elif splitter >= 80: end = splitter else: return splitter | ac116395b8b80112cbd030b2b3c2a705823d2db0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/ac116395b8b80112cbd030b2b3c2a705823d2db0/build_gles2_cmd_buffer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
3125,
5521,
12,
2890,
16,
533,
4672,
3536,
8947,
279,
3166,
358,
1416,
279,
533,
12123,
21553,
273,
533,
18,
4720,
2668,
2218,
13,
309,
21553,
1545,
374,
471,
486,
533,
63,
4939,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3125,
5521,
12,
2890,
16,
533,
4672,
3536,
8947,
279,
3166,
358,
1416,
279,
533,
12123,
21553,
273,
533,
18,
4720,
2668,
2218,
13,
309,
21553,
1545,
374,
471,
486,
533,
63,
4939,
... |
result[propo.id]='planned Quantity missing in a Segment' | result[propo.id] = 'planned Quantity missing in a Segment' | def _quantity_planned_get(self, cr, uid, ids, name, args, context={}): result ={} for propo in self.browse(cr,uid,ids): if not propo.segment_ids: result[propo.id]='No segments defined' continue qty = 0 for segment in propo.segment_ids: if segment.quantity_planned == 0: result[propo.id]='planned Quantity missing in a Segment' continue qty += segment.quantity_planned result[propo.id]=str(qty) return result | 7ee897432c7e7d5a5c8e889fc429c3c1b66627fd /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7339/7ee897432c7e7d5a5c8e889fc429c3c1b66627fd/dm_campaign.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
16172,
67,
412,
10041,
67,
588,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
508,
16,
833,
16,
819,
12938,
4672,
563,
273,
2916,
364,
450,
1631,
316,
365,
18,
25731,
12,
3353,
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,
16172,
67,
412,
10041,
67,
588,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
508,
16,
833,
16,
819,
12938,
4672,
563,
273,
2916,
364,
450,
1631,
316,
365,
18,
25731,
12,
3353,
16... |
pass | def killTask(self, taskSpecId): """ | 816c7c30814438d8c9489740376256b3aef8ff85 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8887/816c7c30814438d8c9489740376256b3aef8ff85/BossLiteKiller.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8673,
2174,
12,
2890,
16,
1562,
1990,
548,
4672,
3536,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
8673,
2174,
12,
2890,
16,
1562,
1990,
548,
4672,
3536,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... | |
class A(int): pass self.assert_(A(1) < A(2)) self.assert_(A(2) > A(1)) self.assert_(A(1) <= A(2)) self.assert_(A(2) >= A(1)) self.assert_(A(2) <= A(2)) self.assert_(A(2) >= A(2)) | class A(str): pass self.assert_(A("a") < A("b")) self.assert_(A("b") > A("a")) self.assert_(A("a") <= A("b")) self.assert_(A("b") >= A("a")) self.assert_(A("b") <= A("b")) self.assert_(A("b") >= A("b")) | def test_total_ordering_no_overwrite(self): # new methods should not overwrite existing @functools.total_ordering class A(int): pass self.assert_(A(1) < A(2)) self.assert_(A(2) > A(1)) self.assert_(A(1) <= A(2)) self.assert_(A(2) >= A(1)) self.assert_(A(2) <= A(2)) self.assert_(A(2) >= A(2)) | d85a3c3f9e411ef3bcffbb08698a2234c232a04c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8125/d85a3c3f9e411ef3bcffbb08698a2234c232a04c/test_functools.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
4963,
67,
22598,
67,
2135,
67,
19274,
12,
2890,
4672,
468,
394,
2590,
1410,
486,
6156,
2062,
632,
74,
6931,
8192,
18,
4963,
67,
22598,
667,
432,
12,
474,
4672,
1342,
365,
18,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
4963,
67,
22598,
67,
2135,
67,
19274,
12,
2890,
4672,
468,
394,
2590,
1410,
486,
6156,
2062,
632,
74,
6931,
8192,
18,
4963,
67,
22598,
667,
432,
12,
474,
4672,
1342,
365,
18,... |
def comp_args((a, b)=(3, 4)): print a, b comp_args((1, 2)) comp_args() def comp_args(a, (b, c)): print a, b, c comp_args(1, (2, 3)) def comp_args(a=2, (b, c)=(3, 4)): print a, b, c comp_args(1, (2, 3)) comp_args() try: exec 'def f(a=1, (b, c)): pass' raise TestFailed, "non-default args after default" except SyntaxError: pass if verbose: print "testing bad float literals" def expect_error(s): try: eval(s) raise TestFailed("%r accepted" % s) except SyntaxError: pass expect_error("2e") expect_error("2.0e+") expect_error("1e-") expect_error("3-4e/21") if verbose: print "testing compile() of indented block w/o trailing newline" s = """ | def test_indentation(self): s = """ | def comp_args((a, b)=(3, 4)): print a, b | 75f85542b2bfe397d3317ab4cac8ce6b3bf8469a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/75f85542b2bfe397d3317ab4cac8ce6b3bf8469a/test_compile.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1161,
67,
1968,
12443,
69,
16,
324,
13,
28657,
23,
16,
1059,
3719,
30,
1172,
279,
16,
324,
225,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1161,
67,
1968,
12443,
69,
16,
324,
13,
28657,
23,
16,
1059,
3719,
30,
1172,
279,
16,
324,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
dom_window = _dest_to_window[self._target_file.path] del _dest_to_window[self._target_file.path] | file_path = self._target_file.path.encode('utf-8', 'replace') dom_window = _dest_to_window[file_path] del _dest_to_window[file_path] | def init(self, source, target, display_name, mime_info, start_time, temp_file, cancelable): self._source = source self._mime_type = mime_info.MIMEType self._temp_file = temp_file self._target_file = target.queryInterface(interfaces.nsIFileURL).file self._display_name = display_name self.cancelable = cancelable self.datastore_deleted_handler = None | 79dd7673a6bffe1f203faacfa8477926e692ed9a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6905/79dd7673a6bffe1f203faacfa8477926e692ed9a/downloadmanager.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1208,
12,
2890,
16,
1084,
16,
1018,
16,
2562,
67,
529,
16,
4892,
67,
1376,
16,
787,
67,
957,
16,
1906,
67,
768,
16,
3755,
429,
4672,
365,
6315,
3168,
273,
1084,
365,
6315,
11757,
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,
1208,
12,
2890,
16,
1084,
16,
1018,
16,
2562,
67,
529,
16,
4892,
67,
1376,
16,
787,
67,
957,
16,
1906,
67,
768,
16,
3755,
429,
4672,
365,
6315,
3168,
273,
1084,
365,
6315,
11757,
67,... |
elif sdp_index >= len(local_sdp.media): | elif local_sdp[sdp_index] is None: | def _accept_proposal_continue(self, audio_rtp, msrp_chat): self._lock.acquire() try: if self.state != "PROPOSED": return remote_sdp = self._inv.get_offered_remote_sdp() local_sdp = self._make_next_sdp(False) audio_sdp_index = -1 chat_sdp_index = -1 for sdp_index, media in enumerate(remote_sdp.media): if audio_rtp is not None and media.media == "audio" and media.port != 0 and audio_sdp_index == -1: audio_sdp_index = sdp_index local_sdp.media[sdp_index] = self._init_audio(audio_rtp, remote_sdp) if self.rtp_options["use_ice"]: local_sdp.connection.address = self.audio_transport.transport.local_rtp_address elif msrp_chat is not None and media.media == "message" and media.port != 0 and chat_sdp_index == -1: chat_sdp_index = sdp_index self.session_manager.msrp_chat_mapping[msrp_chat] = self local_sdp.media.append(msrp_chat.local_media) elif sdp_index >= len(local_sdp.media): remote_media = remote_sdp.media[sdp_index] local_sdp.media[sdp_index] = SDPMedia(remote_media.media, 0, remote_media.transport, formats=remote_media.formats, attributes=remote_media.attributes) self._inv.set_offered_local_sdp(local_sdp) self._inv.respond_to_reinvite(200) if audio_rtp is not None: self._audio_sdp_index = audio_sdp_index if msrp_chat is not None: self._chat_sdp_index = chat_sdp_index self._change_state("ESTABLISHED") self.notification_center.post_notification("SCSessionAcceptedStreamProposal", self, TimestampedNotificationData(proposer="remote")) except SIPCoreError, e: self._cancel_media() try: self._do_reject_proposal(500, e.args[0]) except SIPCoreError: traceback.print_exc() finally: self._lock.release() | b1c83bed1193c99c6ddcb2d41f53762a5c1a8025 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5703/b1c83bed1193c99c6ddcb2d41f53762a5c1a8025/session.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
9436,
67,
685,
8016,
67,
17143,
12,
2890,
16,
7447,
67,
3797,
84,
16,
4086,
13832,
67,
10880,
4672,
365,
6315,
739,
18,
1077,
1039,
1435,
775,
30,
309,
365,
18,
2019,
480,
315,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
9436,
67,
685,
8016,
67,
17143,
12,
2890,
16,
7447,
67,
3797,
84,
16,
4086,
13832,
67,
10880,
4672,
365,
6315,
739,
18,
1077,
1039,
1435,
775,
30,
309,
365,
18,
2019,
480,
315,
... |
s = [row_signs[i]*col_signs[j]*data[i][j] for i in range(rows)] solver.Add(col_sums[j] == solver.Sum(s)) | col_sums[j].SetMin(0) | def main(): # Create the solver. solver = pywrapcp.Solver('Einav puzzle') # # data # # small problem rows = 3; cols = 3; data = [ [ 33, 30, -10], [-16, 19, 9], [-17, -12, -14] ] # # variables # x = {} for i in range(rows): for j in range(cols): x[i,j] = solver.IntVar(-100, 100, "x[%i,%i]" % (i,j)) x_flat = [x[i,j] for i in range(rows) for j in range(cols)] row_sums = [solver.IntVar(0, 300, "row_sums(%i)" % i) for i in range(rows)] col_sums = [solver.IntVar(0, 300, "col_sums(%i)" % j) for j in range(cols)] row_signs = [solver.IntVar(-1, 1, "row_signs(%i)" % i) for i in range(rows)] col_signs = [solver.IntVar(-1, 1, "col_signs(%i)" % j) for j in range(cols)] # total sum: to be minimized total_sum = solver.IntVar(0, 1000, "total_sum") # # constraints # for i in range(rows): for j in range(cols): solver.Add(x[i,j] == data[i][j]*row_signs[i]*col_signs[j]) total_sum_a = [data[i][j]*row_signs[i]*col_signs[j] for i in range(rows) for j in range(cols) ] solver.Add(total_sum == solver.Sum(total_sum_a)) # row sums for i in range(rows): s = [row_signs[i]*col_signs[j]*data[i][j] for j in range(cols)] solver.Add(row_sums[i] == solver.Sum(s)) # column sums for j in range(cols): s = [row_signs[i]*col_signs[j]*data[i][j] for i in range(rows)] solver.Add(col_sums[j] == solver.Sum(s)) # objective objective = solver.Minimize(total_sum, 1) # # search and result # db = solver.Phase(x_flat + row_sums + col_sums, solver.INT_VAR_SIMPLE, solver.INT_VALUE_SIMPLE) solver.NewSearch(db, [objective]) num_solutions = 0 while solver.NextSolution(): num_solutions += 1 print "row_sums:", [row_sums[i].Value() for i in range(rows)] print "col_sums:", [col_sums[j].Value() for j in range(cols)] for i in range(rows): for j in range(cols): print x[i,j].Value(), print print solver.EndSearch() print print "num_solutions:", num_solutions print "failures:", solver.failures() print "branches:", solver.branches() print "wall_time:", solver.wall_time() | 69f8cb0be3005f9a94238cb760cc9118cc5170e9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3876/69f8cb0be3005f9a94238cb760cc9118cc5170e9/issue5.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
225,
468,
1788,
326,
12776,
18,
12776,
273,
2395,
4113,
4057,
18,
27721,
2668,
41,
267,
842,
293,
31550,
6134,
225,
468,
468,
501,
468,
282,
468,
5264,
6199,
2595,
273,
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,
2774,
13332,
225,
468,
1788,
326,
12776,
18,
12776,
273,
2395,
4113,
4057,
18,
27721,
2668,
41,
267,
842,
293,
31550,
6134,
225,
468,
468,
501,
468,
282,
468,
5264,
6199,
2595,
273,
890,... |
self._cont_handler.endElement(name, None) | self._cont_handler.endElementNS(pair, None) | def end_element_ns(self, name): pair = name.split() if len(pair) == 1: name = (None, name, None) else: name = pair + [None] # prefix is not implemented yet! self._cont_handler.endElement(name, None) | f3aad55432f710e7a4433a626b69fef255f2a419 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/f3aad55432f710e7a4433a626b69fef255f2a419/expatreader.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
679,
67,
2956,
67,
2387,
12,
2890,
16,
508,
4672,
3082,
273,
508,
18,
4939,
1435,
309,
562,
12,
6017,
13,
422,
404,
30,
508,
273,
261,
7036,
16,
508,
16,
599,
13,
469,
30,
508,
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,
679,
67,
2956,
67,
2387,
12,
2890,
16,
508,
4672,
3082,
273,
508,
18,
4939,
1435,
309,
562,
12,
6017,
13,
422,
404,
30,
508,
273,
261,
7036,
16,
508,
16,
599,
13,
469,
30,
508,
273... |
extfd = (extfd,None) | extfd = (extfd,extfd) | def __init__(self, *args, **kargs): external_fd = kargs.pop("external_fd",{}) self.started = thread.allocate_lock() self.threadid = None self.breakpointed = None self.breakpoints = set() self.interception_points = set() self.intercepted_packet = None self.debug_level=0 self.init_args=args self.init_kargs=kargs self.io = type.__new__(type, "IOnamespace",(),{}) self.oi = type.__new__(type, "IOnamespace",(),{}) self.cmdin = ObjectPipe() self.cmdout = ObjectPipe() self.ioin = {} self.ioout = {} for n in self.ionames: extfd = external_fd.get(n) if type(extfd) is not tuple: extfd = (extfd,None) ioin,ioout = extfd if ioin is None: ioin = ObjectPipe() elif type(ioin) is int: ioin = self._IO_fdwrapper(ioin,None) if ioout is None: ioout = ObjectPipe() elif type(ioout) is int: ioin = self._IO_fdwrapper(None,ioout) | b6b0aab4de7db93a0825a78d124ee0a5c87f4d6e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7311/b6b0aab4de7db93a0825a78d124ee0a5c87f4d6e/automaton.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
380,
1968,
16,
2826,
79,
1968,
4672,
3903,
67,
8313,
273,
25916,
18,
5120,
2932,
9375,
67,
8313,
3113,
2916,
13,
365,
18,
14561,
273,
2650,
18,
16247,
67... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
380,
1968,
16,
2826,
79,
1968,
4672,
3903,
67,
8313,
273,
25916,
18,
5120,
2932,
9375,
67,
8313,
3113,
2916,
13,
365,
18,
14561,
273,
2650,
18,
16247,
67... |
text3 += _("Try to type a word beginning with @ here :") | text3 += _("Try to type a word beginning with @ here:") | def populate() : doc,root = cleanxml.emptydoc("project") #Task 0@1 : Getting started with GTG title1 = _("Getting started with GTG") text1 = _("Welcome in Getting Things Gnome!, your new task manager.") text1 += "\n\n" text1 += _("In GTG, everything is a task. From building a bridge over the Pacific Ocean to changing a light bulb or organizing a party. When you edit a task, it is automatically saved.") text1 += "\n\n" text1 += _("Once a task is done, you can push the "Mark as done" button. If the task is not relevant any-more, simply press "Dismiss".") text1 += "\n\n" text1 += _("A task might be composed of multiple subtasks that appear as links in the description. Simply click on the following link :") text1 += "\n" text1 += "<subtask>1@1</subtask>\n" text1 += "\n\n" text1 += _("Don't forget to mark this subtask as done !") text1 += "\n\n" text1 += _("Other stuff you should read :") text1 += "\n" text1 += "<subtask>2@1</subtask>\n" text1 += "<subtask>3@1</subtask>\n" text1 += "<subtask>4@1</subtask>\n" text1 += "\n\n" text1 += _("We hope that you will appreciate GTG. Please send us bug reports and ideas for improvement using : ") text1 += "https://bugs.launchpad.net/gtg" text1 += "\n\n" text1 += _("Thank you for trying out GTG :-)") t1 = addtask(doc,"0@1",title1,text1,["1@1","2@1","3@1","4@1"]) root.appendChild(t1) #Task 1@1 : Learn to use subtasks title2 = _("Learn to use subtasks") text2 = _("In the task description (this window), if you begin a line with "-", it will be considered as a "subtask", something that needs to be done in order to accomplish your task. Just try to write "- test subtask" on the next line and press enter.") text2 += "\n\n" text2 += _("You can also use the "insert subtask" button.") text2 += "\n\n\n" text2 += _("Task and subtasks can be re-organized by drag-n-drop in the tasks list.") text2 += "\n\n" text2 += _("Some concept come with subtasks : for example, a subtask due date can never be after its parent due date.") text2 += "\n\n" text2 += _("Also, marking a parent as done will mark all the subtasks as done.") t2 = addtask(doc,"1@1",title2,text2,[]) root.appendChild(t2) #Task 2@1 : Learn to use tags title3 = _("Learn to use tags") text3 = _("A tag is a simple word that begin with "@".") text3 += "\n\n" text3 += _("Try to type a word beginning with @ here :") text3 += "\n\n" text3 += _("It becomes yellow, it's a tag.") text3 += "\n\n" text3 += _("Tags are useful to sort your tasks. In the view menu, you can enable a sidebar which displays all the tags you are using so you can easily see tasks for a given tag. There's no limit to the number of tags a task can have.") text3 += "\n\n" text3 += _("If you right click on a tag in the sidebar you can also set its color. It will permit you to have a more colorful list of tasks, if you want it that way.") text3 += "\n\n" text3 += _("A new tag is only added to the current task. There's no recursivity and the tag is not applied to subtasks. But when you create a new subtask, this subtask will inherit the tags of its parent as a good primary default (it will also be the case if you add a tag to a parent just after creating a subtask). Of course, you can modify at any time the tags of this particular subtask. It will never be changed by the parent.") t3 = addtask(doc,"2@1",title3,text3,[]) root.appendChild(t3) #Task 3@1 : Using the Workview title4 = _("Using the Workview") text4 = _("If you press the "Workview" button, only actionable tasks will be displayed.") text4 += "\n\n" text4 += _("What is an actionable task? It's a task you can do directly, right now.") text4 += "\n\n" text4 += _("It's a task that is already "start-able", i.e. the start date is already over.") text4 += "\n\n" text4 += _("It's a task that doesn't have open subtasks, i.e. you can do the task itself directly.") text4 += "\n\n" text4 += _("Thus, the workview will only show you tasks you should do right now.") text4 += "\n\n" text4 += _("If you use tags, you can right click on a tag in the sidebar and choose to not display tasks with this particular tag in the workview. It's very useful if you have a tag like "someday" that you use for tasks you would like to do but are not particularly urgent.") t4 = addtask(doc,"3@1",title4,text4,[]) root.appendChild(t4) #Task 4@1 : Reporting bugs title5 = _("Reporting bugs") text5 = _("GTG is still very alpha software. We like it and use it everyday but you will encounter some bugs.") text5 += "\n\n" text5 += _("Please, report them ! We need you to make this software better. Any contribution, any idea is welcome.") text5 += "\n\n" text5 += _("If you have some trouble with GTG, we might be able to help you or to solve your problem really quickly.") t5 = addtask(doc,"4@1",title5,text5,[]) root.appendChild(t5) return doc | 88f87d38f8969fbb3a1bb46f14b705ca8e310947 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8234/88f87d38f8969fbb3a1bb46f14b705ca8e310947/firstrun_tasks.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6490,
1435,
294,
997,
16,
3085,
273,
2721,
2902,
18,
5531,
2434,
2932,
4406,
7923,
468,
2174,
374,
36,
21,
294,
26602,
5746,
598,
19688,
43,
2077,
21,
273,
389,
2932,
19213,
5746,
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,
6490,
1435,
294,
997,
16,
3085,
273,
2721,
2902,
18,
5531,
2434,
2932,
4406,
7923,
468,
2174,
374,
36,
21,
294,
26602,
5746,
598,
19688,
43,
2077,
21,
273,
389,
2932,
19213,
5746,
598,
... |
catName = wikipedia.translate(self.site, category_with_licenses) | catName = wikipedia.translate(self.site, category_with_licenses) | def load_licenses(self): """ Load the list of the licenses """ | 7c5241c0a38e14f453e4f281e81f9eacfc1378df /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4404/7c5241c0a38e14f453e4f281e81f9eacfc1378df/checkimages.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1262,
67,
80,
16548,
12,
2890,
4672,
3536,
4444,
326,
666,
434,
326,
26457,
3536,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1262,
67,
80,
16548,
12,
2890,
4672,
3536,
4444,
326,
666,
434,
326,
26457,
3536,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
MelBase('POEA', 'marker'), | MelBase('POEA', 'marker', ''), | def mapFids(self,record,function,save=False): """Applies function to fids. If save is true, then fid is set to result of function.""" if self.subType == 'PLDT' and record.locType != 5: result = function(record.locId) if save: record.locId = result elif self.subType == 'PLD2' and record.locType2 != 5: result = function(record.locId2) if save: record.locId2 = result elif self.subType == 'PTDT' and record.targetType != 2: result = function(record.targetId) if save: record.targetId = result elif self.subType == 'PTD2' and record.targetType2 != 2: result = function(record.targetId2) if save: record.targetId2 = result | 3cb29fe41b42e40986b283421ccc6eb3772146d6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6682/3cb29fe41b42e40986b283421ccc6eb3772146d6/bosh.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
852,
42,
2232,
12,
2890,
16,
3366,
16,
915,
16,
5688,
33,
8381,
4672,
3536,
13029,
445,
358,
284,
2232,
18,
971,
1923,
353,
638,
16,
1508,
13444,
353,
444,
358,
563,
434,
445,
12123,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
852,
42,
2232,
12,
2890,
16,
3366,
16,
915,
16,
5688,
33,
8381,
4672,
3536,
13029,
445,
358,
284,
2232,
18,
971,
1923,
353,
638,
16,
1508,
13444,
353,
444,
358,
563,
434,
445,
12123,
... |
if event.eventtype() in ['pong', 'privnotice', 'ctcp', 'nochanmodes', 'notexttosend', 'currenttopic', 'topicinfo', '328', 'pubnotice', '042', 'umode', 'welcome', 'yourhost', 'created', 'myinfo', 'featurelist', 'luserclient', 'luserop', 'luserchannels', 'luserme', 'n_local', 'n_global', 'endofnames', 'luserunknown', 'luserconns']: | if event.eventtype() in ['pong', 'privnotice', 'ctcp', 'nochanmodes', 'notexttosend', 'currenttopic', 'topicinfo', '328', 'pubnotice', '042', 'umode', 'welcome', 'yourhost', 'created', 'myinfo', 'featurelist', 'luserclient', 'luserop', 'luserchannels', 'luserme', 'n_local', 'n_global', 'endofnames', 'luserunknown', 'luserconns', 'inviteonlychan', 'bannedfromchan', 'channelisfull', 'badchannelkey']: | def _irc_event_handler(self, connection, event): """[Internal] Manage IRC events""" # Answer ping if event.eventtype() == 'ping': connection.pong(connection.get_server_name()) return # Events we always want to ignore if 'all' in event.eventtype() or 'motd' in event.eventtype() or event.eventtype() in ['nicknameinuse', 'nickcollision', 'erroneusnickname']: return if event.eventtype() in ['pong', 'privnotice', 'ctcp', 'nochanmodes', 'notexttosend', 'currenttopic', 'topicinfo', '328', 'pubnotice', '042', 'umode', 'welcome', 'yourhost', 'created', 'myinfo', 'featurelist', 'luserclient', 'luserop', 'luserchannels', 'luserme', 'n_local', 'n_global', 'endofnames', 'luserunknown', 'luserconns']: self.error(1, 'ignoring IRC '+event.eventtype(), debug=True) return nickname = None if event.source() and '!' in event.source(): nickname = event.source().split('!')[0] # A string representation of the event event_str = '\nconnection='+connection.__str__()+'\neventtype='+event.eventtype()+'\nsource='+repr(event.source())+'\ntarget='+repr(event.target())+'\narguments='+repr(event.arguments()) debug_str = 'Received IRC event.'+event_str printed_event = False if event.eventtype() in ['pubmsg', 'action', 'privmsg', 'quit', 'part', 'nick', 'kick']: if nickname == None: return handled = False if event.eventtype() in ['quit', 'part'] and nickname == self.nickname: return if event.eventtype() in ['quit', 'part', 'nick', 'kick']: if connection.real_nickname != self.nickname: self.error(1, 'ignoring IRC '+event.eventtype()+' not received on bot connection', debug=True) return else: self.error(2, debug_str, debug=True) printed_event = True if event.eventtype() == 'kick' and len(event.arguments()) < 1: self.error(say_levels.debug, 'at least 1 argument is needed for a '+event.eventtype()+' event', no_debug_add=event_str) return if event.eventtype() in ['pubmsg', 'action']: if connection.real_nickname != self.nickname: self.error(1, 'ignoring IRC '+event.eventtype()+' not received on bot connection', debug=True) return if nickname == self.nickname: self.error(1, 'ignoring IRC '+event.eventtype()+' sent by self', debug=True) return # TODO: lock self.bridges for thread safety for bridge in self.bridges: if connection.server != bridge.irc_server: continue try: from_ = bridge.get_participant(nickname) except Bridge.NoSuchParticipantException: continue # Private message if event.eventtype() == 'privmsg': if event.target() == None: return try: to_ = bridge.get_participant(event.target().split('!')[0]) self.error(2, debug_str, debug=True) from_.say_on_xmpp_to(to_.nickname, event.arguments()[0]) return except Bridge.NoSuchParticipantException: if event.target().split('!')[0] == self.nickname: # Message is for the bot self.error(2, debug_str, debug=True) connection.privmsg(from_.nickname, self.respond(event.arguments()[0])) return else: continue # kick handling if event.eventtype() == 'kick': if event.target().lower() == bridge.irc_room: try: kicked = bridge.get_participant(event.arguments()[0]) if isinstance(kicked.irc_connection, irclib.ServerConnection): kicked.irc_connection.join(bridge.irc_room) else: if len(event.arguments()) > 1: bridge.remove_participant('irc', kicked.nickname, 'Kicked by '+nickname+' with reason: '+event.arguments()[1]) else: bridge.remove_participant('irc', kicked.nickname, 'Kicked by '+nickname+' (no reason was given)') return except Bridge.NoSuchParticipantException: self.error(say_levels.debug, 'a participant that was not here has been kicked ? WTF ?', no_debug_add=event_str) return else: continue # Leaving events if event.eventtype() == 'quit' or event.eventtype() == 'part' and event.target().lower() == bridge.irc_room: if len(event.arguments()) > 0: leave_message = event.arguments()[0] elif event.eventtype() == 'quit': leave_message = 'Left server.' elif event.eventtype() == 'part': leave_message = 'Left channel.' else: leave_message = '' bridge.remove_participant('irc', from_.nickname, leave_message) handled = True continue # Nickname change if event.eventtype() == 'nick': from_.change_nickname(event.target(), 'xmpp') handled = True continue # Chan message if event.eventtype() in ['pubmsg', 'action']: if bridge.irc_room == event.target().lower() and bridge.irc_server == connection.server: self.error(2, debug_str, debug=True) message = event.arguments()[0] if event.eventtype() == 'action': action = True else: action = False from_.say_on_xmpp(message, action=action) return else: continue if handled: return # Handle bannedfromchan if event.eventtype() == 'bannedfromchan': if len(event.arguments()) < 1: self.error(1, 'length of arguments should be greater than 0 for a '+event.eventtype()+' event', debug=True) return for bridge in self.bridges: if connection.server != bridge.irc_server or event.arguments()[0].lower() != bridge.irc_room: continue if event.target() == self.nickname: self.error(say_levels.error, 'the nickname "'+event.target()+'" is banned from the IRC chan of bridge "'+str(bridge)+'"') raise Exception('[Error] the nickname "'+event.target()+'" is banned from the IRC chan of bridge "'+str(bridge)+'"') else: try: banned = bridge.get_participant(event.target()) if banned.irc_connection != 'bannedfromchan': banned.irc_connection = 'bannedfromchan' self.error(2, debug_str, debug=True) bridge.say(say_levels.warning, 'the nickname "'+event.target()+'" is banned from the IRC chan', log=True) else: self.error(1, 'ignoring '+event.eventtype(), debug=True) except Bridge.NoSuchParticipantException: self.error(1, 'no such participant. WTF ?', debug=True) return return if event.eventtype() in ['disconnect', 'kill', 'error']: if len(event.arguments()) > 0 and event.arguments()[0] == 'Connection reset by peer': self.error(2, debug_str, debug=True) else: self.error(say_levels.debug, debug_str, send_to_admins=True) return if event.eventtype() in ['cannotsendtochan', 'notonchannel', 'inviteonlychan']: self.error(2, debug_str, debug=True) bridges = self.iter_bridges(irc_room=event.arguments()[0], irc_server=connection.server) if len(bridges) > 1: raise Exception, 'more than one bridge for one irc chan, WTF ?' bridge = bridges[0] if connection.real_nickname == self.nickname: bridge._join_irc_failed(event.eventtype()) else: p = bridge.get_participant(connection.real_nickname) p._close_irc_connection('') p.irc_connection = event.eventtype() return # Ignore events not received on bot connection if connection.real_nickname != self.nickname: self.error(1, 'ignoring IRC '+event.eventtype()+' not received on bridge connection', debug=True) return # Joining events if event.eventtype() in ['namreply', 'join']: if event.eventtype() == 'namreply': bridge = self.get_bridge(irc_room=event.arguments()[1].lower(), irc_server=connection.server) for nickname in re.split('(?:^[&@\+%]?|(?: [&@\+%]?)*)', event.arguments()[2].strip()): if nickname == '' or nickname == self.nickname: continue bridge.add_participant('irc', nickname) return elif event.eventtype() == 'join': bridge = self.get_bridge(irc_room=event.target().lower(), irc_server=connection.server) bridge.add_participant('irc', nickname) return # Mode event if event.eventtype() == 'mode': if len(event.arguments()) < 2: self.error(2, debug_str, debug=True) self.error(1, '2 arguments are needed for a '+event.eventtype()+' event', debug=True) return if event.arguments()[1] != self.nickname or not 'o' in event.arguments()[0]: self.error(1, 'ignoring IRC mode "'+event.arguments()[0]+'" for "'+event.arguments()[1]+'"', debug=True) return self.error(2, debug_str, debug=True) bridges = self.iter_bridges(irc_room=event.target(), irc_server=connection.server) if len(bridges) > 1: raise Exception, 'more than one bridge for one irc chan, WTF ?' bridge = bridges[0] if re.search('\+[^\-]*o', event.arguments()[0]): # bot is channel operator bridge.irc_op = True self.error(say_levels.notice, 'bot has IRC operator privileges in '+event.target()) elif re.search('\-[^\+]*o', event.arguments()[0]): # bot lost channel operator privileges if bridge.irc_op: self.error(say_levels.notice, 'bot lost IRC operator privileges in '+event.target(), send_to_admins=True) bridge.irc_op = False return # Unhandled events if not printed_event: self.error(say_levels.debug, 'The following IRC event was not handled:'+event_str+'\n', send_to_admins=True) else: self.error(1, 'event not handled', debug=True) self._send_message_to_admins(say_levels.debug, 'The following IRC event was not handled:'+event_str) | 99f4d3a822a337055af5fb73bbb4815a3735fb52 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9915/99f4d3a822a337055af5fb73bbb4815a3735fb52/bot.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
481,
71,
67,
2575,
67,
4176,
12,
2890,
16,
1459,
16,
871,
4672,
3536,
63,
3061,
65,
24247,
467,
11529,
2641,
8395,
225,
468,
21019,
10087,
309,
871,
18,
2575,
723,
1435,
422,
296,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
481,
71,
67,
2575,
67,
4176,
12,
2890,
16,
1459,
16,
871,
4672,
3536,
63,
3061,
65,
24247,
467,
11529,
2641,
8395,
225,
468,
21019,
10087,
309,
871,
18,
2575,
723,
1435,
422,
296,... |
Parameters: see `publish_programmatically`. | Parameters: `document` is a `docutils.nodes.document` object, an existing document tree. Other parameters: see `publish_programmatically`. | def publish_from_doctree(document, destination_path=None, writer=None, writer_name='pseudoxml', settings=None, settings_spec=None, settings_overrides=None, config_section=None, enable_exit_status=None): """ Set up & run a `Publisher` to render from an existing document tree data structure, for programmatic use with string I/O. Return a pair of encoded string output and document parts. Note that document.settings is overridden; if you want to use the settings of the original `document` document, pass settings=document.settings. For encoded string output, be sure to set the 'output_encoding' setting to the desired encoding. Set it to 'unicode' for unencoded Unicode string output. Here's one way:: publish_from_doctree( ..., settings_overrides={'output_encoding': 'unicode'}) Parameters: see `publish_programmatically`. """ # Create fresh Transformer object, to be populated from Writer component. document.transformer = Transformer(document) # Don't apply default transforms twice: document.transformer.default_transforms = (document.transformer .reprocess_transforms) reader = docutils.readers.doctree.Reader(parser_name='null') pub = Publisher(reader, None, writer, source=io.DocTreeInput(document), destination_class=io.StringOutput, settings=settings) pub.set_writer(writer_name) pub.process_programmatic_settings( settings_spec, settings_overrides, config_section) pub.set_destination(None, destination_path) output = pub.publish(enable_exit_status=enable_exit_status) return output, pub.writer.parts | 010a12de59446f37522564fea507909ba15edf01 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5620/010a12de59446f37522564fea507909ba15edf01/core.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3808,
67,
2080,
67,
2896,
299,
992,
12,
5457,
16,
2929,
67,
803,
33,
7036,
16,
2633,
33,
7036,
16,
2633,
67,
529,
2218,
84,
23715,
2409,
781,
2187,
1947,
33,
7036,
16,
1947,
67,
2793... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3808,
67,
2080,
67,
2896,
299,
992,
12,
5457,
16,
2929,
67,
803,
33,
7036,
16,
2633,
33,
7036,
16,
2633,
67,
529,
2218,
84,
23715,
2409,
781,
2187,
1947,
33,
7036,
16,
1947,
67,
2793... |
yield ScreenDescriptor(self, "screen", "Screen descriptor") | yield ScreenDescriptor(self, "screen") | def createFields(self): # Header yield String(self, "header", 6, "File header", charset="ASCII") | afbd972cced01d8f53b157f8242f2a47f2587d75 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9327/afbd972cced01d8f53b157f8242f2a47f2587d75/gif.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
2314,
12,
2890,
4672,
468,
4304,
2824,
514,
12,
2890,
16,
315,
3374,
3113,
1666,
16,
315,
812,
1446,
3113,
4856,
1546,
13756,
7923,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
2314,
12,
2890,
4672,
468,
4304,
2824,
514,
12,
2890,
16,
315,
3374,
3113,
1666,
16,
315,
812,
1446,
3113,
4856,
1546,
13756,
7923,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
g = G(self.gens()[2]) | g = G(self.gens()[2]) | def F(self): G = self.group() | 7087002965b3581b6b81385c320535006465955e /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/7087002965b3581b6b81385c320535006465955e/cubegroup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
478,
12,
2890,
4672,
611,
273,
365,
18,
1655,
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,
... | [
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,
478,
12,
2890,
4672,
611,
273,
365,
18,
1655,
1435,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
info = y.get_target_info() if info['target'] == y and info['version_stamp'] == target['info']['version_stamp'] and \ | info = y['info'] if info['target'] == x and info['version_stamp'] == target['info']['version_stamp'] and \ | def build_target_buildplan(): targets = [] config = catalyst.config.config() spec = config.get_spec() spec_values = spec.get_values() targetmap = config.get_targetmap() built_targets = find_built_targets(config.get_conf()['storedir'] + '/builds/') if not "targets" in spec_values or not spec_values['targets']: raise CatalystError, "No target(s) specified." for x in spec_values['targets']: if not x in targetmap: raise CatalystError("Target \"" + x + "\" is not a known target.") config.get_spec().set_target(x) target_tmp = { 'object': targetmap[x](), 'parent': '' } target_tmp['info'] = target_tmp['object'].get_target_info() target_tmp['depends'] = target_tmp['object'].depends targets.append(target_tmp) for i, target in enumerate(targets): if len(target['depends']) == 0: targets[i]['parent'] = 'pass' continue for x in target['depends']: for y in built_targets: info = y.get_target_info() if info['target'] == y and info['version_stamp'] == target['info']['version_stamp'] and \ info['arch'] == target['info']['arch'] and info['rel_type'] == target['info']['rel_type']: targets[i]['parent'] = 'built' break for y in targets: info = y.get_target_info() if info['target'] == y and info['version_stamp'] == target['info']['version_stamp'] and \ info['arch'] == target['info']['arch'] and info['rel_type'] == target['info']['rel_type']: targets[i]['parent'] = info['target'] break if targets[i]['parent']: continue raise CatalystError("Failed to resolve depedencies for target '%s'" % (target['info']['target'],)) while True: did_something = False for i, target in enumerate(targets): if target['parent'] in ('built', 'pass'): continue else: for j, foo in enumerate(targets): if foo['target'] == target['parent']: if i < j: tmp_target = targets.pop(j) targets.insert(i, tmp_target) did_something = True break if did_something: break if not did_something: break return targets | 4a07dcda813568e5669d5af786cd8c32fdbb513b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7327/4a07dcda813568e5669d5af786cd8c32fdbb513b/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1361,
67,
3299,
67,
3510,
7088,
13332,
5774,
273,
5378,
642,
273,
276,
3145,
1094,
18,
1425,
18,
1425,
1435,
857,
273,
642,
18,
588,
67,
2793,
1435,
857,
67,
2372,
273,
857,
18,
588,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1361,
67,
3299,
67,
3510,
7088,
13332,
5774,
273,
5378,
642,
273,
276,
3145,
1094,
18,
1425,
18,
1425,
1435,
857,
273,
642,
18,
588,
67,
2793,
1435,
857,
67,
2372,
273,
857,
18,
588,
... |
part=inv['partner_id'] and inv['partner_id'][0] | part = inv['partner_id'] and inv['partner_id'][0] | def _log_event(self, cr, uid, ids, factor=0.7, name='Open Order'): invs = self.read(cr, uid, ids, ['date_order','partner_id','amount_untaxed']) for inv in invs: part=inv['partner_id'] and inv['partner_id'][0] pr = inv['amount_untaxed'] or 0.0 partnertype = 'customer' eventtype = 'sale' self.pool.get('res.partner.event').create(cr, uid, {'name':'Order: '+name, 'som':False, 'description':'Order '+str(inv['id']), 'document':'', 'partner_id':part, 'date':time.strftime('%Y-%m-%d'), 'canal_id':False, 'user_id':uid, 'partner_type':partnertype, 'probability':1.0, 'planned_revenue':pr, 'planned_cost':0.0, 'type':eventtype}) | fa29dc7d9e6d87f49bc3316e2b56fa977448ad6c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/fa29dc7d9e6d87f49bc3316e2b56fa977448ad6c/sale.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1330,
67,
2575,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
5578,
33,
20,
18,
27,
16,
508,
2218,
3678,
4347,
11,
4672,
2198,
87,
273,
365,
18,
896,
12,
3353,
16,
4555,
16,
325... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1330,
67,
2575,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
5578,
33,
20,
18,
27,
16,
508,
2218,
3678,
4347,
11,
4672,
2198,
87,
273,
365,
18,
896,
12,
3353,
16,
4555,
16,
325... |
libPath = os.environ['DYLD_LIBRARY_PATH'] | libPath = os.environ.get('DYLD_LIBRARY_PATH', '') | def find_library(name): if sys.platform == "darwin": libPath = os.environ['DYLD_LIBRARY_PATH'] else: libPath = os.environ['LD_LIBRARY_PATH'] libPathList = libPath.split(':') for path in libPathList: pathName = path+'/lib%s.so' % name if os.path.exists(pathName): return pathName return find_library_orig(name) | 648858c64011d60bc6b932a823e887e2ef8753f7 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9117/648858c64011d60bc6b932a823e887e2ef8753f7/netsnmp.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1104,
67,
12083,
12,
529,
4672,
309,
2589,
18,
9898,
422,
315,
28076,
6877,
2561,
743,
273,
1140,
18,
28684,
18,
588,
2668,
40,
61,
12069,
67,
2053,
28254,
67,
4211,
2187,
28707,
469,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1104,
67,
12083,
12,
529,
4672,
309,
2589,
18,
9898,
422,
315,
28076,
6877,
2561,
743,
273,
1140,
18,
28684,
18,
588,
2668,
40,
61,
12069,
67,
2053,
28254,
67,
4211,
2187,
28707,
469,
... |
print "converting to rectangle, option 1:" return self.Rectangle(self.dc,points[0][0],points[0][1],points[2][0],points[2][1]) | if self.verbose: print "converting to rectangle, option 1:" return self.Rectangle(points[0][0],points[0][1],points[2][0],points[2][1]) | def Polygon(self,points): """ | 688318604ffe18a54bb261a3bde4bf6e1784a8de /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8136/688318604ffe18a54bb261a3bde4bf6e1784a8de/pyemf.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12681,
12,
2890,
16,
4139,
4672,
3536,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12681,
12,
2890,
16,
4139,
4672,
3536,
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,
-1... |
def __init__(data = None) | def __init__(data = None): | def __init__(data = None) if data == None: quickfix.DoubleField.__init__(self, 218) else quickfix.DoubleField.__init__(self, 218, data) | 484890147d4b23aac4b9d0e85e84fceab7e137c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8819/484890147d4b23aac4b9d0e85e84fceab7e137c3/quickfix_fields.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
892,
273,
599,
4672,
309,
501,
422,
599,
30,
9549,
904,
18,
5265,
974,
16186,
2738,
972,
12,
2890,
16,
576,
2643,
13,
469,
9549,
904,
18,
5265,
974,
16186,
2738,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
892,
273,
599,
4672,
309,
501,
422,
599,
30,
9549,
904,
18,
5265,
974,
16186,
2738,
972,
12,
2890,
16,
576,
2643,
13,
469,
9549,
904,
18,
5265,
974,
16186,
2738,
... |
req.write('<li><a href="%s">%s</a></li>' % (mpr.idx_location + '/' + project, | req.write('<li><a href="%s">%s</a></li>' % (href_join(mpr.idx_location, project), | def send_project_index(req, mpr, dir): req.content_type = 'text/html' req.write('<html><head><title>Available Projects</title></head>') req.write('<body><h1>Available Projects</h1><ul>') for project in os.listdir(dir): req.write('<li><a href="%s">%s</a></li>' % (mpr.idx_location + '/' + project, project)) req.write('</ul></body><html>') | 97f132559aa91f0635ad5f6fe993b3517299b8c5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/97f132559aa91f0635ad5f6fe993b3517299b8c5/ModPythonHandler.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1366,
67,
4406,
67,
1615,
12,
3658,
16,
312,
683,
16,
1577,
4672,
1111,
18,
1745,
67,
723,
273,
296,
955,
19,
2620,
11,
1111,
18,
2626,
2668,
32,
2620,
4438,
1978,
4438,
2649,
34,
52... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4406,
67,
1615,
12,
3658,
16,
312,
683,
16,
1577,
4672,
1111,
18,
1745,
67,
723,
273,
296,
955,
19,
2620,
11,
1111,
18,
2626,
2668,
32,
2620,
4438,
1978,
4438,
2649,
34,
52... |
return set(self) != set(other) | return dict(self.items()) != dict(other.items()) | def __ne__(self, other): return set(self) != set(other) | 224076bd4ce7a8a18ed25ff42c65a5fb75526215 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3187/224076bd4ce7a8a18ed25ff42c65a5fb75526215/_abcoll.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
4644,
972,
12,
2890,
16,
1308,
4672,
327,
444,
12,
2890,
13,
480,
444,
12,
3011,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4644,
972,
12,
2890,
16,
1308,
4672,
327,
444,
12,
2890,
13,
480,
444,
12,
3011,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
if self.database == 'nucleotide': | if format: self.format = format elif self.database == 'nucleotide': | def __init__(self, database='sequences', delay=5.0, parser=None): """NCBIDictionary([database][, delay][, parser]) | f6f7c167006dbb7e55180a542838cbb019e25ec7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7167/f6f7c167006dbb7e55180a542838cbb019e25ec7/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
2063,
2218,
17190,
2187,
4624,
33,
25,
18,
20,
16,
2082,
33,
7036,
4672,
3536,
50,
8876,
734,
3192,
3816,
6231,
6362,
16,
4624,
6362,
16,
2082,
5717,
2,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
2063,
2218,
17190,
2187,
4624,
33,
25,
18,
20,
16,
2082,
33,
7036,
4672,
3536,
50,
8876,
734,
3192,
3816,
6231,
6362,
16,
4624,
6362,
16,
2082,
5717,
2,
... |
+-%(foo)s | +-foo%(obj)s | | +-foo.c | | +-foo.h | | +-bar.h | +-bar%(obj)s | +-bar.c | +-bar.h | +-foo.h | #ifndef BAR_H | 3b7ff720042f1b4863f7d386963392c0698b4cbf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12817/3b7ff720042f1b4863f7d386963392c0698b4cbf/option--debug.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
468,
430,
82,
536,
605,
985,
67,
44,
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,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
468,
430,
82,
536,
605,
985,
67,
44,
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... | |
class A000153(SloaneSequence): r""" $a(n) = n*a(n-1) + (n-2)*a(n-2)$, with $a(0) = 0$, $a(1) = 1$. With offset 1, permanent of (0,1)-matrix of size $n \times (n+d)$ with $d=2$ and $n$ zeros not on a line. This is a special case of Theorem 2.3 of Seok-Zun Song et al. Extremes of permanents of (0,1)-matrices, p. 201-202. INPUT: n -- non negative integer OUTPUT: integer -- function value EXAMPLES: sage: a = sloane.A000153; a a(n) = n*a(n-1) + (n-2)*a(n-2), with a(0) = 0, a(1) = 1. sage: a(0) 0 sage: a(1) 1 sage: a(8) 82508 sage: a(20) 10315043624498196944 sage: a.list(8) [0, 1, 2, 7, 32, 181, 1214, 9403] AUTHOR: -- Jaap Spies (2007-01-13) """ def __init__(self): SloaneSequence.__init__(self, offset=0) self._b = [] self._precompute(2) def _repr_(self): return "a(n) = n*a(n-1) + (n-2)*a(n-2), with a(0) = 0, a(1) = 1." | class ExtremesOfPermanentsSequence(SloaneSequence): | def _eval(self, n): return Integer(n*(n+1)*(2*n+1)//6) | d2510d4232e17c9cea8d1a0271c6be68a81d317b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/d2510d4232e17c9cea8d1a0271c6be68a81d317b/sloane_functions.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
8622,
12,
2890,
16,
290,
4672,
327,
2144,
12,
82,
21556,
82,
15,
21,
17653,
12,
22,
14,
82,
15,
21,
13,
759,
26,
13,
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,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
8622,
12,
2890,
16,
290,
4672,
327,
2144,
12,
82,
21556,
82,
15,
21,
17653,
12,
22,
14,
82,
15,
21,
13,
759,
26,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
print 'setModelData:', index.column() | def setModelData(self, editor, model, index): """move changes into model""" print 'setModelData:', index.column() column = index.column() if column == 2: item = index.internalPointer() rule = item.rawContent assert isinstance(rule, Rule) print 'unit:', rule.score.unit, editor.currentIndex() if rule.score.unit != editor.currentIndex(): rule.score.unit = editor.currentIndex() print 'score neu:', rule.score, rule.score.unit item.ruleset().dirty = True model.emit(SIGNAL("dataChanged(QModelIndex,QModelIndex)"), index, index) return QItemDelegate.setModelData(self, editor, model, index) | ccbba5e8d5bfd813effddf7ed1bc0eb8ebd7a1c3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1679/ccbba5e8d5bfd813effddf7ed1bc0eb8ebd7a1c3/rulesetselector.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
19027,
751,
12,
2890,
16,
4858,
16,
938,
16,
770,
4672,
3536,
8501,
3478,
1368,
938,
8395,
1057,
273,
770,
18,
2827,
1435,
309,
1057,
422,
576,
30,
761,
273,
770,
18,
7236,
4926,
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,
19027,
751,
12,
2890,
16,
4858,
16,
938,
16,
770,
4672,
3536,
8501,
3478,
1368,
938,
8395,
1057,
273,
770,
18,
2827,
1435,
309,
1057,
422,
576,
30,
761,
273,
770,
18,
7236,
4926,
1435,... | |
filename = os.path.splitext(self.sourceFilename)[0] + '.pdf' | if self.sourceFilename: filename = os.path.splitext(self.sourceFilename)[0] + '.pdf' | def saveAsPresentation(self): """Write the PDF document, one slide per page.""" if self.verbose: print 'saving presentation...' pageSize = (self.pageWidth, self.pageHeight) filename = os.path.splitext(self.sourceFilename)[0] + '.pdf' if self.outDir: filename = os.path.join(self.outDir,os.path.basename(filename)) if self.verbose: print filename canv = canvas.Canvas(filename, pagesize = pageSize) canv.setPageCompression(self.compression) | b4313d504cd51f70b053b3b310ed5c2d8ac3ef09 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3878/b4313d504cd51f70b053b3b310ed5c2d8ac3ef09/pythonpoint.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1923,
1463,
6351,
367,
12,
2890,
4672,
3536,
3067,
326,
12667,
1668,
16,
1245,
12701,
1534,
1363,
12123,
309,
365,
18,
11369,
30,
1172,
296,
87,
5339,
22525,
7821,
13387,
273,
261,
2890,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1923,
1463,
6351,
367,
12,
2890,
4672,
3536,
3067,
326,
12667,
1668,
16,
1245,
12701,
1534,
1363,
12123,
309,
365,
18,
11369,
30,
1172,
296,
87,
5339,
22525,
7821,
13387,
273,
261,
2890,
... |
C{warnings}. | C{errors}. | def _tokenize_para(lines, start, para_indent, tokens, warnings): """ Construct a L{Token} containing the paragraph starting at C{lines[start]}, and append it to C{tokens}. C{para_indent} should be the indentation of the paragraph . Any warnings generated while tokenizing the paragraph will be appended to C{warnings}. @param lines: The list of lines to be tokenized @param start: The index into C{lines} of the first line of the paragraph to be tokenized. @param para_indent: The indentation of C{lines[start]}. This is the indentation of the paragraph. @param warnings: A list of the warnings generated by parsing. Any new warnings generated while will tokenizing this paragraph will be appended to this list. @return: The line number of the first line following the paragraph. @type lines: C{list} of C{string} @type start: C{int} @type para_indent: C{int} @type tokens: C{list} of L{Token} @type warnings: C{list} of L{ParseError} @rtype: C{int} """ linenum = start + 1 doublecolon = 0 while linenum < len(lines): # Find the indentation of this line. line = lines[linenum] indent = len(line) - len(line.lstrip()) # "::" markers end paragraphs. if doublecolon: break if line.rstrip()[-2:] == '::': doublecolon = 1 # Blank lines end paragraphs if indent == len(line): break # Indentation changes end paragraphs if indent != para_indent: break # List bullets end paragraphs if _BULLET_RE.match(line, indent): break # Check for mal-formatted field items. if line[indent] == '@': estr = "Possible mal-formatted field item." warnings.append(TokenizationError(estr, linenum, line)) # Go on to the next line. linenum += 1 contents = [line.strip() for line in lines[start:linenum]] # Does this token look like a heading? if ((len(contents) < 2) or (contents[1][0] not in _HEADING_CHARS) or (abs(len(contents[0])-len(contents[1])) > 5)): looks_like_heading = 0 else: looks_like_heading = 1 for char in contents[1]: if char != contents[1][0]: looks_like_heading = 0 break if looks_like_heading: if len(contents[0]) != len(contents[1]): estr = ("Possible heading typo: the number of "+ "underline characters must match the "+ "number of heading characters.") warnings.append(TokenizationError(estr, start, lines[start])) else: level = _HEADING_CHARS.index(contents[1][0]) tokens.append(Token(Token.HEADING, start, contents[0], para_indent, level)) return start+2 # Add the paragraph token, and return the linenum after it ends. contents = ' '.join(contents) tokens.append(Token(Token.PARA, start, contents, para_indent)) return linenum | 7bf7c136593a0f12e906094a55f7b8f591c5abaf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/7bf7c136593a0f12e906094a55f7b8f591c5abaf/epytext.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2316,
554,
67,
25072,
12,
3548,
16,
787,
16,
12602,
67,
9355,
16,
2430,
16,
5599,
4672,
3536,
14291,
279,
511,
95,
1345,
97,
4191,
326,
10190,
5023,
622,
385,
95,
3548,
63,
1937,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2316,
554,
67,
25072,
12,
3548,
16,
787,
16,
12602,
67,
9355,
16,
2430,
16,
5599,
4672,
3536,
14291,
279,
511,
95,
1345,
97,
4191,
326,
10190,
5023,
622,
385,
95,
3548,
63,
1937,
... |
""" Check the result of Eval() for evaluation failures | """ Check the result of Eval() for evaluation failures | def EVAL_FAILURE(code): """ Check the result of Eval() for evaluation failures @param code: result of Eval() @return: True if there was an evaluation error """ return type(code) == types.StringType and code.startswith("IDC_FAILURE: ") | a652b8f961abbef4cd40899bc581de738e39d0c8 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6984/a652b8f961abbef4cd40899bc581de738e39d0c8/idc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
512,
2669,
67,
17623,
12,
710,
4672,
3536,
2073,
326,
563,
434,
13163,
1435,
364,
9873,
11720,
225,
632,
891,
981,
30,
563,
434,
13163,
1435,
225,
632,
2463,
30,
1053,
309,
1915,
1703,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
512,
2669,
67,
17623,
12,
710,
4672,
3536,
2073,
326,
563,
434,
13163,
1435,
364,
9873,
11720,
225,
632,
891,
981,
30,
563,
434,
13163,
1435,
225,
632,
2463,
30,
1053,
309,
1915,
1703,
... |
similars = track.get_similar() | try: similars = track.get_similar() except: LOG.error("Similar not found") return None | def get_album_image_url(self, song): self.current_song_label.set_markup("<b>" + song.getTitle()+"</b>") track = self.last_fm_network.get_track(song.getArtist(), song.getTitle()) #album = self.last_fm_network.get_album(song.getArtist(), song.getTitle()) album = track.get_album() """similar tracks""" similars = track.get_similar() self.similar_songs_cntr.clear() for tsong in similars: try: tsong_item = tsong.item except AttributeError: tsong_item = tsong['item'] #tsong = CommonBean(name=str(tsong_item), type=CommonBean.TYPE_MUSIC_URL) self.similar_songs_cntr.add_item(str(tsong_item)) """similar tags""" tags = track.get_top_tags(20) self.song_tags_model.clear() for tag in tags: try: tag_item = tag.item except AttributeError: tag_item = tag['item'] self.add_tag(tag_item.get_name()) """similar artists""" artist = track.get_artist() similar_artists = artist.get_similar(30) self.similar_artists_model.clear() for artist in similar_artists: try: artist_item = artist.item except AttributeError: artist_item = artist['item'] self.add_similar_artist(artist_item.get_name()) self.album_name.set_markup("<b>" +song.getArtist() + " - " + album.get_name()+"</b>") LOG.info("Find album", album) if self.last_album_name == album.get_name(): LOG.info("Album the same, not need to dowlaod image") #TODO need to implement album image cache return None if not album: return None LOG.info(album) try: image = album.get_cover_image(size=pylast.COVER_EXTRA_LARGE) self.last_album_name = album.get_name() except: LOG.info("image not found for:", song) LOG.info("image:", image) return image | ac0da1b3bf68ec53b19a0735431bdf313733f6c0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14563/ac0da1b3bf68ec53b19a0735431bdf313733f6c0/information_controller.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
25090,
67,
2730,
67,
718,
12,
2890,
16,
17180,
4672,
225,
365,
18,
2972,
67,
816,
75,
67,
1925,
18,
542,
67,
15056,
2932,
32,
70,
2984,
397,
17180,
18,
588,
4247,
1435,
9078... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
25090,
67,
2730,
67,
718,
12,
2890,
16,
17180,
4672,
225,
365,
18,
2972,
67,
816,
75,
67,
1925,
18,
542,
67,
15056,
2932,
32,
70,
2984,
397,
17180,
18,
588,
4247,
1435,
9078... |
print "* som -som :",sub_ncerr(som1,som2) print "* som -so :",sub_ncerr(som1,som1[0]) print "* so -som :",sub_ncerr(som1[0],som1) print "* som -scal:",sub_ncerr(som1,(1,1)) print "* som -slis:",sub_ncerr(som1,[(1,1), (2,1)]) print "* scal-som :",sub_ncerr((1,1),som1) print "* so -so :",sub_ncerr(som1[0],som1[1]) print "* so -scal:",sub_ncerr(som1[0],(1,1)) print "* scal-so :",sub_ncerr((1,1),som1[0]) | print "* som -som :", sub_ncerr(som1, som2) print "* som -so :", sub_ncerr(som1, som1[0]) print "* so -som :", sub_ncerr(som1[0], som1) print "* som -scal:", sub_ncerr(som1, (1, 1)) print "* som -slis:", sub_ncerr(som1, [(1, 1), (2, 1)]) print "* scal-som :", sub_ncerr((1, 1), som1) print "* so -so :", sub_ncerr(som1[0], som1[1]) print "* so -scal:", sub_ncerr(som1[0], (1, 1)) print "* scal-so :", sub_ncerr((1, 1), som1[0]) | def sub_ncerr(left, right, **kwargs): """ This function subtracts two objects (SOM, SO or tuple[val,val_err2]) and returns the result of the subtraction in an SOM. The function does not handle the case of tuple-tuple. Parameters: ---------- -> left Object on the left of the subtraction sign -> right Object on the right of the subtraction sign -> kwargs is a list of key word arguments that the function accepts: axis=<y or x> This is the axis one wishes to manipulate. If no argument is given the default value is y axis_pos=<number> This is position of the axis in the axis array. If no argument is given, the default value is Returns: ------- <- A SOM or SO containing the results of the subtraction Exceptions: ---------- <- TypeError is raised if the tuple/tuple case is presented to the function <- IndexError is raised if the two SOMs do not contain the same number of spectra <- RunTimeError is raised if the x-axis units of the SOMs do not match <- RunTimeError is raised if the y-axis units of the SOMs do not match <- RunTimeError is raised if the x-axes of the two SOs are not equal """ # import the helper functions import hlr_utils # set up for working through data (result,res_descr)=hlr_utils.empty_result(left,right) (l_descr,r_descr)=hlr_utils.get_descr(left,right) # error check information if r_descr=="SOM" and l_descr=="SOM": hlr_utils.hlr_math_compatible(left,l_descr,right,r_descr) elif l_descr=="number" and r_descr=="number": raise RuntimeError, "tuple, tuple operation is not supported!" else: pass # Check for axis keyword argument try: axis = kwargs["axis"] except KeyError: axis = "y" # Check for axis_pos keyword argument try: axis_pos = kwargs["axis_pos"] except KeyError: axis_pos = 0 result=hlr_utils.copy_som_attr(result,res_descr,left,l_descr,right,r_descr) # iterate through the values import array_manip for i in range(hlr_utils.get_length(left,right)): val1 = hlr_utils.get_value(left, i, l_descr, axis, axis_pos) err2_1 = hlr_utils.get_err2(left, i, l_descr, axis, axis_pos) val2 = hlr_utils.get_value(right, i, r_descr, axis, axis_pos) err2_2 = hlr_utils.get_err2(right, i, r_descr, axis, axis_pos) (descr_1,descr_2)=hlr_utils.get_descr(val1, val2) hlr_utils.hlr_math_compatible(val1, descr_1, val2, descr_2) value=array_manip.sub_ncerr(val1, err2_1, val2, err2_2) map_so = hlr_utils.get_map_so(left,right,i) hlr_utils.result_insert(result, res_descr, value, map_so, axis, axis_pos) return result | 098e5a73c055e6e63a6d8d4227199399a5fba749 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/763/098e5a73c055e6e63a6d8d4227199399a5fba749/hlr_sub_ncerr.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
720,
67,
14202,
370,
12,
4482,
16,
2145,
16,
2826,
4333,
4672,
3536,
1220,
445,
10418,
87,
2795,
2184,
261,
55,
1872,
16,
7460,
578,
3193,
63,
1125,
16,
1125,
67,
370,
22,
5717,
471,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
720,
67,
14202,
370,
12,
4482,
16,
2145,
16,
2826,
4333,
4672,
3536,
1220,
445,
10418,
87,
2795,
2184,
261,
55,
1872,
16,
7460,
578,
3193,
63,
1125,
16,
1125,
67,
370,
22,
5717,
471,
... |
pass | self.queue_draw() | def on_select(self,color): pass | cd5fd2a1d2e5c6534f52c057144e393781b87482 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7129/cd5fd2a1d2e5c6534f52c057144e393781b87482/colorsamplerwindow.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
67,
4025,
12,
2890,
16,
3266,
4672,
1342,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
67,
4025,
12,
2890,
16,
3266,
4672,
1342,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
subpartDef = self.__subpartDict.get(partName) if subpartDef: truePartName = subpartDef[0] anim = partDict[truePartName].get(animName) if anim: anim = [anim[0], None] animDict[animName] = anim | for pName in partNameList: subpartDef = self.__subpartDict.get(pName) if subpartDef: truePartName = subpartDef[0] anim = partDict[truePartName].get(animName) if anim: anim = [anim[0], None] animDict[animName] = anim | def getAnimControls(self, animName=None, partName=None, lodName=None): """getAnimControls(self, string, string=None, string=None) | 8833f3ea9232e67609bd3d67854708b690aa49bf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8543/8833f3ea9232e67609bd3d67854708b690aa49bf/Actor.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
20892,
16795,
12,
2890,
16,
10536,
461,
33,
7036,
16,
1087,
461,
33,
7036,
16,
328,
369,
461,
33,
7036,
4672,
3536,
588,
20892,
16795,
12,
2890,
16,
533,
16,
533,
33,
7036,
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,
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,
20892,
16795,
12,
2890,
16,
10536,
461,
33,
7036,
16,
1087,
461,
33,
7036,
16,
328,
369,
461,
33,
7036,
4672,
3536,
588,
20892,
16795,
12,
2890,
16,
533,
16,
533,
33,
7036,
16,
... |
mov t2, t2, rdx, dataSize=4 slli t2, t2, 32, dataSize=8 | def macroop WRMSR | d06221dc7e7924b34aeece6963e381e549ee064d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7385/d06221dc7e7924b34aeece6963e381e549ee064d/msrs.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11522,
556,
12984,
3537,
54,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11522,
556,
12984,
3537,
54,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... | |
unsubscribe_logo = """<img src="http://pcuds36.cern.ch/img/wb-unsubscribe.png" />""" | unsubscribe_logo = """<img src="%s/img/wb-unsubscribe.png" />""" % (CFG_SITE_URL,) | def tmpl_public_basket_footer(self, bskid, nb_items, id_owner, subscription_status, ln=CFG_SITE_LANG): """Template for public basket footer display.""" | 21fbd39770d792689a5af9cad650e20c36ad4f24 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12027/21fbd39770d792689a5af9cad650e20c36ad4f24/webbasket_templates.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10720,
67,
482,
67,
26219,
67,
14723,
12,
2890,
16,
7081,
79,
350,
16,
4264,
67,
3319,
16,
612,
67,
8443,
16,
4915,
67,
2327,
16,
7211,
33,
19727,
67,
20609,
67,
10571,
4672,
3536,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10720,
67,
482,
67,
26219,
67,
14723,
12,
2890,
16,
7081,
79,
350,
16,
4264,
67,
3319,
16,
612,
67,
8443,
16,
4915,
67,
2327,
16,
7211,
33,
19727,
67,
20609,
67,
10571,
4672,
3536,
2... |
jigsMotorActionText = "<u><b>Rotary Motor</b></u><br>"\ "<p><img source=\"ui/actions/Simulation/Rotary_Motor.png\"><br> "\ "Attaches a <b>Rotary Motor</b> to the selected atoms. The Rotary Motor is used by "\ "the simulator to apply rotary motion to a set of atoms during a simulation run. You may "\ "specify the <b>torque (in nN*nm)</b> and <b>speed (in Ghz)</b> of the motor."\ "</p>"\ "<p>To create a Rotary Motor, enter <b>Build</b> mode, "\ "select the atoms you want to attach the motor to and then select this action."\ "</p>" | jigsMotorActionText = \ "<u><b>Rotary Motor</b></u><br>"\ "<p>"\ "<img source=\"ui/actions/Simulation/Rotary_Motor.png\"><br> "\ "Attaches a <b>Rotary Motor</b> to the selected "\ "atoms. The Rotary Motor is used by the simulator to "\ "apply rotary motion to a set of atoms during a "\ "simulation run. You may specify the <b>torque "\ "(in nN*nm)</b> and <b>speed (in Ghz)</b> of the "\ "motor."\ "</p>"\ "<p>To create a Rotary Motor, enter <b>Build</b> mode,"\ " select the atoms you want to attach the motor to "\ "and then select this action."\ "</p>" | def createWhatsThisTextForMainWindowWidgets(win): """ Adds the "What's This" help text to items found in the NE1 mainwindow toolbars and menus . @param win: NE1's mainwindow object. @type win: U{B{QMainWindow}<http://doc.trolltech.com/4/qmainwindow.html>} @note: Property Managers specify "What's This" text for their own widgets, usually in a method called add_whats_this_text(), not in this file. """ # # File Toolbar # # Open File fileOpenText = "<u><b>Open File</b></u> (Ctrl + O)<br> "\ "<p><img source=\"ui/actions/File/Open.png\"><br> "\ "Opens a new file."\ "</p>" win.fileOpenAction.setWhatsThis( fileOpenText ) # Import File fileImportText = "<u><b>Import File</b></u><br>"\ "Inserts a file of any chemical file format supported by "\ "<b>Openbabel</b> into the current Part" win.fileImportAction.setWhatsThis(fileImportText) #Export File fileExportText = "<u><b>Export File</b></u><br>"\ "Save the current Part in any chemical file format supported by "\ "<b>Openbabel</b>. Note that exclusive features of NanoEngineer-1 "\ "are not saved to the exported file" win.fileExportAction.setWhatsThis(fileExportText) # Save File fileSaveText = "<u><b>Save File</b></u> (Ctrl + S)<br> "\ "<p><img source=\"ui/actions//Save.png\"><br> "\ "Saves the current file."\ "</p>" win.fileSaveAction.setWhatsThis( fileSaveText ) # # Edit Toolbar # # Make Checkpoint ### editMakeCheckpointText = \ "<u><b>Make Checkpoint</b></u>"\ "<p>"\ "<img source=\"ui/actions/Edit/Make_CheckPoint.png\"><br> "\ "Make Undo checkpoint."\ "</p>" win.editMakeCheckpointAction.setWhatsThis( editMakeCheckpointText ) # Automatic Checkpointing ### [minor changes, bruce 060319] editAutoCheckpointingText = \ "<u><b>Automatic Checkpointing</b></u>"\ "<p>"\ "Enables/Disables <b>Automatic Checkpointing</b>. When enabled, "\ "the program maintains the Undo stack automatically. When disabled, "\ "the user is required to manually create Undo checkpoints using the "\ "<b>Make Checkpoint</b> button: "\ "</p>"\ "<p><img source=\"ui/actions/Edit/Make_CheckPoint.png\">"\ "</p>"\ "<p><b>Automatic Checkpointing</b> can impact program performance. "\ "By disabling Automatic Checkpointing, the program will run faster. "\ "</p>"\ "<p><b><i>Remember that you must make your own Undo checkpoints "\ "manually when Automatic Checkpointing is disabled.</i></b>"\ "</p>" win.editAutoCheckpointingAction.setWhatsThis( editAutoCheckpointingText ) # Clear Undo Stack ### [minor changes, bruce 060319] editClearUndoStackText = "<u><b>Clear Undo Stack</b></u>"\ "<p>Clears all checkpoints on the Undo and Redo stacks, freeing up memory."\ "</p>" win.editClearUndoStackAction.setWhatsThis( editClearUndoStackText ) # Undo editUndoText = "<u><b>Undo</b></u> (Ctrl + Z)<br> "\ "<p><img source=\"ui/actions/Undo.png\"><br> "\ "Reverses the last edit or command which changed structure or selection. "\ "<br><font color=\"#808080\">"\ "Known bug: the link to wiki help for Undo "\ "only works if you got this popup from the Edit menu item for Undo, "\ "not from the Undo toolbutton."\ "</font>"\ "</p>" #bruce 060317 revised this text to reflect what it does in A7; 060320 added 1421-not-fixed warning win.editUndoAction.setWhatsThis( editUndoText ) win.editUndoText = editUndoText #bruce 060317 to help fix bug 1421 in Undo whatsthis wiki help link # Redo from PlatformDependent import is_macintosh if is_macintosh(): redo_accel = "(Ctrl + Shift + Z)" # note: this is further modified (Ctrl -> Cmd) by other code # changing this is partly redundant with code in undo*.py, but as of 060317 it's desirable in editRedoText too else: redo_accel = "(Ctrl + Y)" editRedoText = "<u><b>Redo</b></u> %s<br> "\ "<p><img source=\"ui/actions/Edit/Redo.png\"> <br>"\ "Restores a change which was undone using the Undo command."\ "<br><font color=\"#808080\">"\ "Known bug: the link to wiki help for Redo "\ "only works if you got this popup from the Edit menu item for Redo, "\ "not from the Redo toolbutton."\ "</font>"\ "</p>" % redo_accel #bruce 060317 revised this text to be more accurate, and split out redo_accel; 060320 added 1421-not-fixed warning win.editRedoAction.setWhatsThis( editRedoText ) win.editRedoText = editRedoText #bruce 060317 to help fix bug 1421 in Redo whatsthis wiki help link # Cut editCutText = "<u><b>Cut</b></u> (Ctrl + X)<br> "\ "<p><img source=\"ui/actions/Edit/Cut.png\"><br> "\ "Removes the selected object(s) and stores the cut data on the"\ "clipboard."\ "</p>" win.editCutAction.setWhatsThis( editCutText ) # Copy editCopyText = "<u><b>Copy</b></u> (Ctrl + C)<br> "\ "<p><img source=\"ui/actions/Edit/Copy.png\"><br> "\ "Places a copy of the selected chunk(s) on the clipboard "\ "while leaving the original chunk(s) unaffected."\ "</p>" win.editCopyAction.setWhatsThis( editCopyText ) # Paste editPasteText = "<u><b>Paste</b></u> (Ctrl + V)<br> "\ "<p><img source=\"ui/actions/Edit/Paste_On.png\"><br> "\ "<b>Paste</b> places the user in <b>Build</b> mode where copied chunks on "\ "the clipboard can be pasted into the model by double clicking in empty space. "\ "If the current clipboard chunk has a <b><i>hotspot</i></b>, it can be bonded to "\ "another chunk by single clicking on one of the chunk's bondpoints."\ "</p>"\ "<p>A <b><i>Hotspot</i></b> is a green bondpoint on a clipboard chunk indicating "\ "it will be the active bondpoint which will connect to another chunk's bondpoint. "\ "To specify a hotspot on the clipboard chunk, click on one of its bondpoints in the "\ "<b><i>MMKit's Thumbview</i></b>."\ "</p>" win.editPasteAction.setWhatsThis( editPasteText ) # Delete editDeleteText = "<u><b>Delete</b></u> (DEL)<br> "\ "<p><img source=\"ui/actions/Delete.png\"><br> "\ "Deletes the selected object(s). "\ "For this Alpha release, deleted objects may be permanently lost, or they might be recoverable using Undo.</p>" #bruce 060212 revised above text (and fixed spelling error); should be revised again before A7 release win.editDeleteAction.setWhatsThis( editDeleteText ) #Preferences Dialog editPrefsText = "<u><b>Preferences Dialog</b></u>"\ "<p>Allows you to edit various user preferences "\ "such as changing atom, bond display properties,"\ "lighting, background color, window position and"\ "size, plugins etc. </p>" win.editPrefsAction.setWhatsThis( editPrefsText ) # # View Toolbar # # Home View setViewHomeActionText = \ "<u><b>Home</b></u> (Home)<br>"\ "<p>"\ "<img source=\"ui/actions/View/Modify/Home.png\"><br>"\ "When you create a new model, it appears in a "\ "default view orientation (FRONT view). When you "\ "open an existing model, it appears in the "\ "orientation it was last saved. You can change the "\ "default orientation by selecting <b>Set Home View "\ "to Current View</b> from the <b>View</b> menu."\ "</p>" win.setViewHomeAction.setWhatsThis( setViewHomeActionText ) # Fit to Window setViewFitToWindowActionText = "<u><b>Fit To Window</b></u><br>"\ "<p><img source=\"ui/actions/View/Modify/Zoom_To_Fit.png\"><br> "\ "Refits the model to the screen so you can view the entire model."\ "</p>" win.setViewFitToWindowAction.setWhatsThis( setViewFitToWindowActionText ) # Recenter setViewRecenterActionText = "<u><b>Recenter</b></u><br>"\ "<p><img source=\"ui/actions/View/Modify/Recenter.png\"><br> "\ "Changes the view center and zoom factor so that the origin is in the "\ "center of the view and you can view the entire model."\ "</p>" win.setViewRecenterAction.setWhatsThis( setViewRecenterActionText ) # Zoom Tool setzoomToolActionText = "<u><b>Zoom Tool</b></u><br>"\ "<p><img source=\"ui/actions/View/Modify/Zoom.png\"><br> "\ "Allows the user to zoom into a specific area of the model by specifying a rectangular area. "\ "This is done by holding down the left button and dragging the mouse.</p>"\ "<p>A mouse with a mouse wheel can also be used to zoom in and out "\ "at any time, without using the Zoom Tool.</p>" win.zoomToolAction.setWhatsThis( setzoomToolActionText ) # Pan Tool setpanToolActionText = "<u><b>Pan Tool</b></u><br>"\ "<p><img source=\"ui/actions/View/Modify/Pan.png\"><br> "\ "Allows X-Y panning using the left mouse button.</p>"\ "<p>Users with a 3-button mouse can pan the model at any time by pressing "\ "the middle mouse button while holding down the Shift key.</p>" win.panToolAction.setWhatsThis( setpanToolActionText ) # Rotate Tool setrotateToolActionText = "<u><b>Rotate Tool</b></u><br>"\ "<p><img source=\"ui/actions/View/Modify/Rotate.png\"><br> "\ "Allows free rotation using the left mouse button.</p>"\ "<p>Users with a 3-button mouse can rotate the model at any time by pressing "\ "the middle mouse button and dragging the mouse.</p>" win.rotateToolAction.setWhatsThis( setrotateToolActionText ) # Orthographic Projection setViewOrthoActionText = "<u><b>Orthographic Projection</b></u><br>"\ "<p>Sets nonperspective (or parallel) projection, with no foreshortening."\ "</p>" win.setViewOrthoAction.setWhatsThis( setViewOrthoActionText ) # Perspective Projection setViewPerspecActionText = "<u><b>Perspective Projection</b></u><br>"\ "<p>Set perspective projection, drawing objects slightly larger "\ "that are closer to the viewer."\ "</p>" win.setViewPerspecAction.setWhatsThis( setViewPerspecActionText ) # Normal To viewNormalToActionText = "<u><b>Set View Normal To</b></u><br>"\ "<p><img source=\"ui/actions/View/Set_View_Normal_To.png/\"><br> "\ "Orients view to the normal vector of the plane defined by "\ "3 or more selected atoms, or a jig's axis."\ "</p>" win.viewNormalToAction.setWhatsThis( viewNormalToActionText ) # Parallel To viewParallelToActionText = "<u><b>Set View Parallel To</b></u><br>"\ "<p><img source=\"ui/actions/View/Set_View_Parallel_To.png\"><br> "\ "Orients view parallel to the vector defined by 2 selected atoms."\ "</p>" win.viewParallelToAction.setWhatsThis( viewParallelToActionText ) # Save Named View saveNamedViewActionText = "<u><b>Save Named View</b></u><br>"\ "<p><img source=\"ui/actions/View/Modify/Save_Named_View.png\"><br> "\ "Saves the current view as a custom <b>named view</b> and places it in the Model Tree.</p>" \ "<p>The view can be restored by selecting <b>Change View</b> from its context menu in the Model Tree."\ "</p>" win.saveNamedViewAction.setWhatsThis( saveNamedViewActionText ) # Front View viewFrontActionText = "<u><b>Front View</b></u><br>"\ "<p><img source=\"ui/actions/View/Front.png\"><br> "\ "Orients the view to the Front View."\ "</p>" win.viewFrontAction.setWhatsThis( viewFrontActionText ) # Back View viewBackActionText = "<u><b>Back View</b></u><br>"\ "<p><img source=\"ui/actions/View/Back.png\"><br> "\ "Orients the view to the Back View."\ "</p>" win.viewBackAction.setWhatsThis( viewBackActionText ) # Top View viewTopActionText = "<u><b>Top View</b></u><br>"\ "<p><img source=\"ui/actions/View/Top.png\"><br> "\ "Orients the view to the Top View."\ "</p>" win.viewTopAction.setWhatsThis( viewTopActionText ) # Bottom View viewBottomActionText = "<u><b>Bottom View</b></u><br>"\ "<p><img source=\"ui/actions/View/Bottom.png\"><br> "\ "Orients the view to the Bottom View."\ "</p>" win.viewBottomAction.setWhatsThis( viewBottomActionText ) # Left View viewLeftActionText = "<u><b>Left View</b></u><br>"\ "<p><img source=\"ui/actions/View/Left.png\"><br> "\ "Orients the view to the Left View."\ "</p>" win.viewLeftAction.setWhatsThis( viewLeftActionText ) # Right View viewRightActionText = "<u><b>Right View</b></u><br>"\ "<p><img source=\"ui/actions/View/Right.png\"><br> "\ "Orients the view to the Right View."\ "</p>" win.viewRightAction.setWhatsThis( viewRightActionText ) #Isometric View viewIsometricActionText = "<u><b>IsometricView</b></u><br>"\ "<p><img source=\"ui/actions/View/Isometric.png\"><br> "\ "Orients the view to the Isometric View."\ "</p>" win.viewIsometricAction.setWhatsThis( viewIsometricActionText ) # Rotate View 180 viewRotate180ActionText = "<u><b>Rotate View 180</b></u><br>"\ "<p><img source=\"ui/actions/View/Rotate_View_180.png.png\"><br> "\ "Rotates the view 180 degrees."\ "</p>" win.viewRotate180Action.setWhatsThis( viewRotate180ActionText ) # Rotate View +90 viewRotatePlus90ActionText = "<u><b>Rotate View +90</b></u><br>"\ "<p><img source=\"ui/actions/View/Rotate_View_+90.png\"><br> "\ "Increment the current view by 90 degrees around the vertical axis."\ "</p>" win.viewRotatePlus90Action.setWhatsThis( viewRotatePlus90ActionText ) # Rotate View -90 viewRotateMinus90ActionText = "<u><b>Rotate View -90</b></u><br>"\ "<p><img source=\"ui/actions/View/Rotate_View_-90.png\"><br> "\ "Decrement the current view by 90 degrees around the vertical axis."\ "</p>" win.viewRotateMinus90Action.setWhatsThis( viewRotateMinus90ActionText ) # QuteMol viewQuteMolActionText = \ "<u><b>QuteMol</b></u><br>"\ "<p><img source=\"ui/actions/View/Display/QuteMol.png\"><br> "\ "Starts QuteMol and loads a PDB file of the current model."\ "</p>" \ "QuteMol must be installed and enabled as a plug-in from "\ "<b>Preferences > Plug-ins</b> for this feature to work." \ "</p>" win.viewQuteMolAction.setWhatsThis( viewQuteMolActionText ) # POV-Ray (was Raytrace Scene) viewRaytraceSceneActionText = "<u><b>POV-Ray</b></u><br>"\ "<p><img source=\"ui/actions/View/Display/Raytrace_Scene.png\"><br> "\ "Raytrace the current scene using POV-Ray. "\ "</p>" \ "POV-Ray must be installed and enabled as a plug-in from "\ "<b>Preferences > Plug-ins</b> for this feature to work." \ "</p>" win.viewRaytraceSceneAction.setWhatsThis( viewRaytraceSceneActionText ) # # Grids Toolbar # # Surface 100 orient100ActionText = "<u><b>Surface 100</b></u><br>"\ "<p><img source=\"ui\actions\Properties Manager/Surface100.png\"><br> "\ "Reorients the view to the nearest angle that would "\ "look straight into a (1,0,0) surface of a diamond lattice."\ "</p>" win.orient100Action.setWhatsThis(orient100ActionText ) # Surface 110 orient110ActionText = "<u><b>Surface 110</b></u><br>"\ "<p><img source=\"ui\actions\Properties Manager/Surface110.png\"><br> "\ "Reorients the view to the nearest angle that would "\ "look straight into a (1,1,0) surface of a diamond lattice."\ "</p>" win.orient110Action.setWhatsThis(orient110ActionText ) # Surface 111 orient111ActionText = "<u><b>Surface 111</b></u><br>"\ "<p><img source=\"ui\actions\Properties Manager/Surface111.png\"><br> "\ "Reorients the view to the nearest angle that would "\ "look straight into a (1,1,1) surface of a diamond lattice."\ "</p>" win.orient111Action.setWhatsThis(orient111ActionText ) # # Insert toolbar # # Graphene insertGrapheneActionText = \ "<u><b>Build Graphene</b></u><br>"\ "<p><img source=\"ui/actions/Tools/Build Structures/Graphene.png\"><br> "\ "Inserts a 2D sheet of graphene in the model "\ "based on the current parameters in the Property Manager. "\ "To preview the structure based on the current parameters, "\ "click the Preview button located at the top of the "\ "Property Manager :<br> "\ "<img source=\"ui/actions/Properties Manager/Preview.png\"> "\ "</p>" win.insertGrapheneAction.setWhatsThis(insertGrapheneActionText ) # Build Nanotube insertNanotubeActionText = \ "<u><b>Build Nanotube</b></u>"\ "<p><img source=\"ui/actions/Tools/Build Structures/Nanotube.png\"> <br>"\ "Inserts a carbon or boron nitride nanotube in the model "\ "based on the current parameters in the Property Manager. "\ "To preview the structure based on the current parameters, "\ "click the Preview button located at the top of the "\ "Property Manager :<br> "\ "<img source=\"ui/actions/Properties Manager/Preview.png\"> "\ "</p>" win.insertNanotubeAction.setWhatsThis(insertNanotubeActionText ) # Build DNA buildDnaActionText = \ "<u><b>Build DNA</b></u><br>"\ "<p><img source=\"ui/actions/Tools/Build Structures/DNA.png\"><br> "\ "Inserts DNA in the model "\ "based on the current parameters in the Property Manager. "\ "To preview the structure based on the current parameters, "\ "click the Preview button located at the top of the "\ "Property Manager :<br> "\ "<img source=\"ui/actions/Properties Manager/Preview.png\"> "\ "</p>" win.buildDnaAction.setWhatsThis(buildDnaActionText ) # POV-Ray Scene insertPovraySceneActionText = "<u><b>Insert POV-Ray Scene</b></u><br>"\ "<p><img source=\"ui/actions/POV-Ray_Scene.png\"><br> "\ "Inserts a POV-Ray Scene file based on the current model and viewpoint. "\ "</p>" win.insertPovraySceneAction.setWhatsThis(insertPovraySceneActionText ) # Comment insertCommentActionText = "<u><b>Insert Comment</b></u><br>"\ "<p><img source=\"ui/actions/Insert/Comment.png\"><br> "\ "Inserts a comment in the current part. "\ "</p>" win.insertCommentAction.setWhatsThis(insertCommentActionText ) # # Display toolbar # # Display Default dispDefaultActionText = "<u><b>Display Default</b></u><br>"\ "<p><img source=\"ui/actions/View/Display/Default.png\"><br> "\ "Changes the <i>display setting</i> of selected atoms or chunks to "\ "<b>Default</b> , rendering them in the <b>Current Display Mode</b>."\ "</p>"\ "<p>If no atoms or chunks are selected, then this action will change the "\ "<b>Current Display Mode</b> of the 3D workspace to the <b>Default Display Mode</b>. " \ "All chunks with their display setting set to <b>Default</b> will be rendered in the "\ "<b>Default Display Mode</b>."\ "</p>"\ "<p>The <b>Default Display Mode</b> can be changed via the "\ "<b>Edit > Preferences</b> menu and selecting the <b>Modes</b> tab."\ "</p>"\ "<p>The <b>Current or Default Display Mode</b> is displayed in the status bar in the "\ "lower right corner of the main window."\ "</p>" win.dispDefaultAction.setWhatsThis(dispDefaultActionText ) # Display Invisible dispInvisActionText = "<u><b>Display Invisible</b></u><br>"\ "<p><img source=\"ui/actions/View/Display/Invisible.png\"><br> "\ "Changes the <i>display setting</i> of selected atoms or chunks to "\ "<b>Invisible</b>, making them invisible."\ "</p>"\ "<p>If no atoms or chunks are selected, then this action will change the "\ "<b>Current Display Mode</b> of the 3D workspace to <b>Invisible</b>. " \ "All chunks with their display setting set to <b>Default</b> will inherit "\ "this display property."\ "</p>" win.dispInvisAction.setWhatsThis(dispInvisActionText ) # Display Lines dispLinesActionText = "<u><b>Display Lines</b></u><br>"\ "<p><img source=\"ui/actions/View/Display/Lines.png\"><br> "\ "Changes the <i>display setting</i> of selected atoms or chunks to "\ " <b>Lines</b>. Only bonds are rendered as colored lines."\ "</p>"\ "<p>If no atoms or chunks are selected, then this action will change the "\ "<b>Current Display Mode</b> of the 3D workspace to <b>Lines</b>. " \ "All chunks with their display setting set to <b>Default</b> will inherit "\ "this display property."\ "</p>" win.dispLinesAction.setWhatsThis(dispLinesActionText ) # Display Tubes dispTubesActionText = "<u><b>Display Tubes</b></u><br>"\ "<p><img source=\"ui/actions/View/Display/Tubes.png\"><br> "\ "Changes the <i>display setting</i> of selected atoms or chunks to "\ "<b>Tubes</b>. Atoms and bonds are rendered as colored tubes."\ "</p>"\ "<p>If no atoms or chunks are selected, then this action will change the "\ "<b>Current Display Mode</b> of the 3D workspace to <b>Tubes</b>. " \ "All chunks with their display setting set to <b>Default</b> will inherit "\ "this display property."\ "</p>" win.dispTubesAction.setWhatsThis(dispTubesActionText ) # Display Ball and Stick dispBallActionText = "<u><b>Display Ball and Stick</b></u><br>"\ "<p><img source=\"ui/actions/View/Display/Ball_and_Stick.png\"><br> "\ "Changes the <i>display setting</i> of selected atoms or chunks to "\ "<b>Ball and Stick</b> mode. Atoms are rendered "\ "as spheres and bonds are rendered as narrow cylinders."\ "</p>"\ "<p>If no atoms or chunks are selected, then this action will change the "\ "<b>Current Display Mode</b> of the 3D workspace to <b>Ball and Stick</b>. " \ "All chunks with their display setting set to <b>Default</b> will inherit "\ "this display property."\ "</p>"\ "<p>The scale of the spheres and cylinders can be changed from the "\ "<b>Atoms</b> and <b>Bonds</b> pages of the <b>Preferences</b> dialog."\ "</p>" win.dispBallAction.setWhatsThis(dispBallActionText ) # Display CPK # [bruce extended and slightly corrected text, 060307] dispCPKActionText = "<u><b>Display CPK</b></u><br>"\ "<p><img source=\"ui/actions/View/Display/CPK.png\"><br> "\ "Changes the <i>display setting</i> of selected atoms or chunks to "\ "<b>CPK</b> mode. Atoms are rendered as spheres with "\ "a size equal to 0.78 of their VdW radius, corresponding "\ "to a contact force of approximately 0.1 nN with neighboring "\ "nonbonded atoms. Bonds are not rendered."\ "</p>"\ "<p>If no atoms or chunks are selected, then this action will change the "\ "<b>Current Display Mode</b> of the 3D workspace to <b>CPK</b>. " \ "All chunks with their display setting set to <b>Default</b> will inherit "\ "this display property."\ "</p>"\ "<p>The scale of the spheres can be changed from the "\ "<b>Atoms</b> and <b>Bonds</b> pages of the <b>Preferences</b> dialog."\ "</p>" win.dispCPKAction.setWhatsThis(dispCPKActionText ) # Display Cylinder dispCylinderActionText = "<u><b>Display Cylinder</b></u><br>"\ "<p><img source=\"ui/actions/View/Display/Cylinder.png\"><br> "\ "Changes the <i>display setting</i> of selected chunks to "\ "<b>Cylinder</b> mode. Chunks are rendered as cylinders."\ "</p>"\ "<p>If no chunks are selected, then this action will change the "\ "<b>Current Display Mode</b> of the 3D workspace to <b>Cylinder</b>. " \ "All chunks with their display setting set to <b>Default</b> will inherit "\ "this display property."\ "</p>" win.dispCylinderAction.setWhatsThis(dispCylinderActionText ) # Display Surface dispSurfaceActionText = "<u><b>Display Surface</b></u><br>"\ "<p><img source=\"ui/actions/View/Display/Surface.png\"><br> "\ "Changes the <i>display setting</i> of selected chunks to "\ "<b>Surface</b> mode. Chunks are rendered as a smooth surface."\ "</p>"\ "<p>If no chunks are selected, then this action will change the "\ "<b>Current Display Mode</b> of the 3D workspace to <b>Surface</b>. " \ "All chunks with their display setting set to <b>Default</b> will inherit "\ "this display property."\ "</p>" win.dispSurfaceAction.setWhatsThis(dispSurfaceActionText ) #Reset Chunk Color dispResetChunkColorText = "<u><b>Reset Chunk Color</b></u><br>"\ "Resets the user defined chunk color and renders the atoms " \ "(in the chunk) with their own element colors" win.dispResetChunkColorAction.setWhatsThis(dispResetChunkColorText ) #Reset Atoms Display dispResetAtomsDisplayText = "<u><b>Reset Atoms Display</b></u><br>"\ "Renders the selected atoms (or the atoms in the"\ "selected chunks) with the same display style as "\ "that of their parent chunk" win.dispResetAtomsDisplayAction.setWhatsThis(dispResetAtomsDisplayText) #Show Invisible Atoms dispShowInvisAtomsText = "<u><b>Show Invisible Atoms</b></u><br>"\ "Renders the selected atoms (or the atoms in the selected "\ "chunks) with the same display style as their parent chunk. "\ "However, if the parent chunk is set as invisible, this feature " \ "will not work. " win.dispShowInvisAtomsAction.setWhatsThis(dispShowInvisAtomsText) #Element Color Settings Dialog dispElementColorSettingsText = "<u><b>Element Color Settings Dialog</b></u><br>"\ "Element colors can be manually changed " \ "using this dialog. Also, the user can load"\ "or save the element colors" win.dispElementColorSettingsAction.setWhatsThis(dispElementColorSettingsText) # # Select toolbar # # Select All selectAllActionText = "<u><b>Select All</b></u> (Ctrl + A)<br>"\ "<p><img source=\"ui/actions/Tools/Select/Select_All.png\"><br> "\ "When in <b>Build</b> mode, this will select all the atoms in "\ "the model. Otherwise, this will select all the chunks in the model."\ "</p>" win.selectAllAction.setWhatsThis(selectAllActionText ) # Select None selectNoneActionText = "<u><b>Select None</b></u></p><br>"\ "<p><img source=\"ui/actions/Tools/Select/Select_None.png\"><br> "\ "Unselects everything currently selected.</p>" win.selectNoneAction.setWhatsThis(selectNoneActionText ) # InvertSelection selectInvertActionText = "<u><b>Invert Selection</b></u> (Ctrl + Shift + I)<br>"\ "<p><img source=\"ui/actions/Tools/Select/Select_Invert.png\"><br> "\ "Inverts the current selection.</p>" win.selectInvertAction.setWhatsThis(selectInvertActionText ) # Select Connected selectConnectedActionText = "<u><b>Select Connected</b></u> (Ctrl + Shift + C)<br>"\ "<p><img source=\"ui/actions/Tools/Select/Select_Connected.png\"><br> "\ "Selects all the atoms that can be reached by the currently selected atom "\ "via an unbroken chain of bonds. </p>"\ "<p>You can also select all connected atoms by double clicking on an atom or bond "\ "while in <b>Build</b> mode.</p>" win.selectConnectedAction.setWhatsThis(selectConnectedActionText ) # Select Doubly selectDoublyActionText = "<u><b>Select Doubly</b></u><br>"\ "<p><img source=\"ui/actions/Tools/Select/Select_Doubly.png\"><br> "\ "Selects all the atoms that can be reached from a currently selected "\ "atom through two disjoint unbroken chains of bonds. Atoms singly "\ "connected to this group and unconnected to anything else are also "\ "included in the selection."\ "</p>" win.selectDoublyAction.setWhatsThis(selectDoublyActionText ) # Expand Selection selectExpandActionText = "<u><b>Expand Selection</b></u> (Ctrl + D)<br>"\ "<p><img source=\"ui/actions/Tools/Select/Expand.png\"><br> "\ "Selects any atom that is a neighbor of a currently selected atom."\ "</p>" win.selectExpandAction.setWhatsThis(selectExpandActionText ) # Contract Selection selectContractActionText = "<u><b>Contract Selection</b></u> (Ctrl + Shift + D)<br>"\ "<p><img source=\"ui/actions/Tools/Select/Contract.png\"><br> "\ "Deselects any atom that is a neighbor of a non-picked atom or has a bondpoint."\ "</p>" win.selectContractAction.setWhatsThis(selectContractActionText ) # # Modify Toolbar # # Adjust Selection modifyAdjustSelActionText = "<u><b>Adjust Selection</b></u><br>"\ "<p><img source=\"ui/actions/Tools/Adjust_Selection.png\"><br> "\ "Adjusts the atom and bond positions (<i>of the selection</i>) to make the geometry more realistic. "\ "The operations used to move the atoms and bonds approximate molecular mechanics methods."\ "</p>" win.modifyAdjustSelAction.setWhatsThis(modifyAdjustSelActionText ) # Adjust All modifyAdjustAllActionText = "<u><b>Adjust All</b></u><br>"\ "<p><img source=\"ui/actions/Tools/Adjust_All.png\"><br> "\ "Adjusts the atom and bond positions (<i>of the entire part</i>) to make the geometry of the part more realistic. "\ "The operations used to move the atoms and bonds approximate molecular mechanics methods."\ "</p>" win.modifyAdjustAllAction.setWhatsThis(modifyAdjustAllActionText ) # Hydrogenate modifyHydrogenateActionText = "<u><b>Hydrogenate</b></u> <br>"\ "<p><img source=\"ui/actions/Tools/Build Tools/Hydrogenate.png\"><br> "\ "Adds hydrogen atoms to all the bondpoints in the selection.</p>" win.modifyHydrogenateAction.setWhatsThis(modifyHydrogenateActionText ) # Dehydrogenate modifyDehydrogenateActionText = "<u><b>Dehydrogenate</b></u><br>"\ "<p><img source=\"ui/actions/Tools/Build Tools/Dehydrogenate.png\"><br> "\ "Removes all hydrogen atoms from the selection.</p>" win.modifyDehydrogenateAction.setWhatsThis(modifyDehydrogenateActionText ) # Passivate modifyPassivateActionText = "<u><b>Passivate</b></u> (Ctrl + P)<br>"\ "<p><img source=\"ui/actions/Tools/Build Tools/Passivate.png\"><br> "\ "Changes the types of incompletely bonded atoms to atoms with the "\ "right number of bonds, using atoms with the best atomic radius."\ "</p>" win.modifyPassivateAction.setWhatsThis(modifyPassivateActionText ) # Stretch modifyStretchActionText = "<u><b>Stretch</b></u><br>"\ "<p><img source=\"ui/actions/Tools/Build Tools/Stretch.png\"><br> "\ "Stretches the bonds of the selected chunk(s).</p>" win.modifyStretchAction.setWhatsThis(modifyStretchActionText ) # Delete Bonds modifyDeleteBondsActionText = "<u><b>Cut Bonds</b></u><br>"\ "<p><img source=\"ui/actions/Tools/Build Tools/Delete_Bonds.png\"><br> "\ "Delete all bonds between selected and unselected atoms or chunks.</p>" win.modifyDeleteBondsAction.setWhatsThis(modifyDeleteBondsActionText ) # Separate/New Chunk modifySeparateActionText = "<u><b>Separate</b></u><br>"\ "<p><img source=\"ui/actions/Tools/Build Tools/Separate.png\"><br> "\ "Creates a new chunk(s) from the currently selected atoms. "\ "If the selected atoms belong to different chunks, multiple new "\ "chunks are created.</p>" win.modifySeparateAction.setWhatsThis(modifySeparateActionText ) # New Chunk makeChunkFromSelectedAtomsActionText = "<u><b>New Chunk</b></u><br>"\ "<p><img source=\"ui/actions/Tools/Build Tools/New_Chunk.png\"><br> "\ "Creates a new chunk from the currently selected atoms. "\ "All atoms end up in a single chunk.</p>" win.makeChunkFromSelectedAtomsAction.setWhatsThis(makeChunkFromSelectedAtomsActionText ) # Merge Chunks modifyMergeActionText = "<u><b>Merge Chunks</b></u><br>"\ "<p><img source=\"ui/actions/Tools/Build Tools/Merge.png\"><br> "\ "Merges two or more chunks into a single chunk.</p>" win.modifyMergeAction.setWhatsThis(modifyMergeActionText ) # Invert Chunks modifyInvertActionText = "<u><b>Invert</b></u><br>"\ "<p><img source=\"ui/actions/Tools/Build Tools/Invert.png\"><br> "\ "Inverts the atoms of the selected chunks.</p>" win.modifyInvertAction.setWhatsThis(modifyInvertActionText ) # Mirror Selected Chunks #Note that the the feature name is intentionally kept "Mirror" instead of "Mirror Chunks" because # in future we will support mirrroing atoms as well. -- ninad060814 modifyMirrorActionText = "<u><b>Mirror</b></u><br>"\ "<p><img source=\"ui/actions/Tools/Build Tools/Mirror.png\"><br> "\ "Mirrors the selected <b> chunks </b> about a reference Grid Plane.<br>"\ "<font color=\"#808080\">Note: In this version, it doesn't mirror jigs or individual atoms.</font> </p>" win.modifyMirrorAction.setWhatsThis(modifyMirrorActionText ) # Align to Common Axis modifyAlignCommonAxisActionText = "<u><b>Align To Common Axis</b></u><br>"\ "<p><img source=\"ui/actions/Tools/Build Tools/AlignToCommonAxis.png\"><br> "\ "Aligns one or more chunks to the axis of the first selected chunk."\ "You must select two or more chunks before using this feature."\ "</p>" win. modifyAlignCommonAxisAction.setWhatsThis( modifyAlignCommonAxisActionText ) #Center on Common Axis modifyCenterCommonAxisActionText= "<u><b>Center On Common Axis</b></u><br>"\ "<p><b> Moves</b> all selected chunks to the center of the <b> first </b> selected chunk "\ "and also <b>aligns</b> them to the axis of the first one ."\ "You must select two or more chunks before using this feature. </p>" win.modifyCenterCommonAxisAction.setWhatsThis(modifyCenterCommonAxisActionText) # # Tools Toolbar # # Select Chunks toolsSelectMoleculesActionText = "<u><b>Select Chunks</b></u><!-- [[Feature:Select Chunks Mode]] --><br>"\ "<p><img source=\"ui/actions/Toolbars/Standard/63.png\"><br> "\ "<b>Select Chunks</b> allows you to select/unselect chunks with the mouse.</p>"\ "<p><b><u>Mouse/Key Combinations</u></b></p>"\ "<p><b>Left Click/Drag</b> - selects a chunk(s).</p>"\ "<p><b>Ctrl+Left Click/Drag</b> - removes chunk(s) from selection.</p>"\ "<p><b>Shift+Left Click/Drag</b> - adds chunk(s) to selection."\ "</p>" win. toolsSelectMoleculesAction.setWhatsThis( toolsSelectMoleculesActionText ) # Move Chunks toolsMoveMoleculeActionText = "<u><b>Move Chunks</b></u><!-- [[Feature:Move Chunks Mode]] --><br>"\ "<p><img source=\"ui/actions/Toolbars/Standard/64.png\"><br> "\ "Activates <b>Move Chunks</b> mode, allowing you to select, "\ "move and rotate one of more chunks with the mouse.</p>"\ "<p><b><u>Mouse/Key Combinations</u></b></p>"\ "<p><b>Left Drag</b> - moves the selected chunk(s).</p>"\ "<p><b>Ctrl+Left Drag</b> - freely rotates selected chunk(s).</p>"\ "<p><b>Shift+Left Drag</b> - constrained movement and rotation of a chunk about its own axis."\ "</p>" win. toolsMoveMoleculeAction.setWhatsThis( toolsMoveMoleculeActionText ) # Build Atoms toolsDepositAtomActionText = \ "<u><b>Build Atoms</b></u><!-- [[Feature:Build Atoms]] --><br>"\ "<p><img source=\"ui/actions/Tools/Build Structures/Atoms.png\"><br> "\ "<b>Build Atoms</b> allows you to build structures one atom at a time or by depositing objects "\ "that are on the paste clipboard. You can also insert structures from the "\ "NanoEngineer-1 Parts Library.</p>"\ "<p>It is also possible to change bond types between atoms using the <b>Bond Tool</b> or by "\ "simply dragging and dropping one bondpoint onto another."\ "</p>" win. toolsDepositAtomAction.setWhatsThis( toolsDepositAtomActionText ) # Build Crystal (was Cookie Cutter Mode) toolsCookieCutActionText = "<u><b>Build Crystal</b></u><!-- [[Feature:Build Crystal]] --><br>"\ "<p><><img source=\"ui/actions/Tools/Build Structures/Cookie_Cutter.png\"><br> "\ "<b>Build Crystal</b> provides tools for cutting out multi-layered shapes from "\ "slabs of diamond or lonsdaleite lattice.</p>" win. toolsCookieCutAction.setWhatsThis( toolsCookieCutActionText ) # Tools > Extrude toolsExtrudeActionText = "<u><b>Extrude</b></u><!-- [[Feature:Extrude Mode]] --><br>"\ "<p><img source=\"ui/actions/Insert/Features/Extrude.png\"><br> "\ "Activates <b>Extrude</b> mode, allowing you to create a rod or ring using a chunk as "\ "a repeating unit.</p>" win. toolsExtrudeAction.setWhatsThis( toolsExtrudeActionText ) # Fuse Chunks Mode toolsFuseChunksActionText = "<u><b>Fuse Chunks Mode</b></u><!-- [[Feature:Fuse Chunks Mode]] --><br>"\ "<p><img source=\"ui/actions/Tools/Build Tools/Fuse.png\"><br> "\ "<b>Fuse Chunks</b> can be used to interactively join two or more "\ "chunks by dragging chunks around and fusing them together. "\ "Two fusing options are supported:<br><br>"\ "<b>Make Bonds</b> creates bonds between the existing bondpoints "\ "of two or more chunks. Bondpoints are highlighted and lines are drawn (and undrawn) as chunks "\ "are dragged to indicate bonding relationships between bondpoints. Bondpoints with "\ "multiple bonding relationships are highlighted in magenta to indicate that they cannot "\ "make bonds.<br><br>"\ "<b>Fuse Atoms</b> fuses pairs of overlapping atoms between chunks. The set of overlapping "\ "atoms in the selected chunk(s) are highlighted in green while the set of atoms that will be deleted "\ "in non-selected chunks are highlighted in dark red. It is possible that deleted atoms will not fuse "\ "properly, leaving bondpoints on the selected chunk(s) atoms. This is a bug. To help "\ "minimize this problem, try to get the bonds of overlapping atoms oriented similarly.<br>"\ "</p>" win.toolsFuseChunksAction.setWhatsThis( toolsFuseChunksActionText ) # # Simulator Toolbar # # Minimize Energy simMinimizeEnergyActionText = "<u><b>Minimize Energy</b></u><br>"\ "<p><img source=\"ui/actions/Simulation/Minimize_Energy.png\"><br> "\ "The potential energy of a chemical structure is a function of the relative positions of its atoms. " \ "To obtain this energy with complete accuracy involves a lot of computer time spent on quantum " \ "mechanical calculations, which cannot be practically done on a desktop computer. "\ "To get an approximate potential energy without all that, we represent the energy as a series of " \ "terms involving geometric properties of the structure: lengths of chemical bonds, angles between " \ "pairs and triples of chemical bonds, etc. </p>" \ "<p>" \ "As is generally the case with physical systems, the gradient of the potential energy represents " \ "the forces acting on various particles. The atoms want to move in the direction that most reduces " \ "the potential energy. Energy minimization is a process of adjusting the atom positions to try to find " \ "a global minimum of the potential energy. Each atom contributes three variables (its x, y, and z " \ "coordinates) so the search space is multi-dimensional. The global minimum is the configuration " \ "that the atoms will settle into if lowered to zero Kelvin. </p>" win. simMinimizeEnergyAction.setWhatsThis( simMinimizeEnergyActionText ) # Run Dynamics (was NanoDynamics-1). Mark 060807. simSetupActionText = "<u><b>Run Dynamics</b></u><br>"\ "<p><img source=\"ui/actions/Simulation/Run_Dynamics.png\"><br> "\ "This is the interface to the NanoEngineer-1 molecular dynamics simulator. "\ "Enter the parameters of the simulation and click <b>Run Simulation</b>."\ "The simulator creates a trajectory (movie) file by calculating the inter-atomic potentials and bonding "\ "of the entire model.</p>" win. simSetupAction.setWhatsThis( simSetupActionText ) # Play Movie (was Movie Player) Mark 060807. simMoviePlayerActionText = "<u><b>Play Movie</b></u><br>"\ "<p><img source=\"ui/actions/Simulation/Play_Movie.png\"><br> "\ "Plays the most recent trajectory (movie) file created by the NanoEngineer-1 molecular dynamics simulator."\ "To create a movie file, select <b>Run Dynamics</b>.</p>" win. simMoviePlayerAction.setWhatsThis( simMoviePlayerActionText ) # Make Graphs (was Plot Tool) Mark 060807. simPlotToolActionText = "<u><b>Make Graphs</b></u><br>"\ "<p><img source=\"ui/actions/Simulation/Make_Graphs.png\"><br> "\ "Make a graph of a simulator trace file using GNUplot. A simulation must be run to create "\ "the trace file and the part must have a jig that writes output to the trace file. <br><br>"\ "The following list of jigs write data to the trace file:<br>"\ "<b>Rotary Motors:</b> speed (GHz) and torque (nn-nm)<br>"\ "<b>Linear Motors:</b> displacement (pm)<br>"\ "<b>Anchors:</b> torque (nn-nm)<br>"\ "<b>Thermostats:</b> energy added (zJ)<br>"\ "<b>Thermometer:</b> temperature (K)<br>"\ "<b>Measure Distance:</b> distance(angstroms)<br>"\ "<b>Measure Angle:</b> angle (degrees)<br>"\ "<b>Measure Dihedral:</b> dihedral(degrees)<br>"\ "</p>" win. simPlotToolAction.setWhatsThis( simPlotToolActionText ) # # Dashboard Buttons # # Done toolsDoneActionText = "<u><b>Done</b></u><br>"\ "<p><img source=\"ui/actions/Properties Manager/Done.png\"><br> "\ "Completes the current operation and enters the default mode."\ "</p>" win. toolsDoneAction.setWhatsThis( toolsDoneActionText ) # Cancel toolsCancelActionText = "<u><b>Cancel</b></u><br>"\ "<p><img source=\"ui/actions/Properties Manager/Cancel.png\"><br> "\ "Cancels the current operation and enters the default mode."\ "</p>" win. toolsCancelAction.setWhatsThis( toolsCancelActionText ) # Back up toolsBackUpActionText = "<u><b>Back Up</b></u><br>"\ "Undoes the previous operation."\ "</p>" win. toolsBackUpAction.setWhatsThis( toolsBackUpActionText ) # Start Over toolsStartOverActionText = "<u><b>Start Over</b></u><br>"\ "Cancels the current operation, leaving the user in the current mode."\ "</p>" win.toolsStartOverAction.setWhatsThis(toolsStartOverActionText ) # Add Layers ccAddLayerActionText = "<u><b>Add Layer</b></u><br>"\ "<p><img source=\"ui/actions/Properties Manager/addlayer.png\"><br> "\ "Adds a new layer of diamond lattice to the existing layer."\ "</p>" win.ccAddLayerAction.setWhatsThis(ccAddLayerActionText ) # # Jigs # # Anchor jigsAnchorActionText = "<u><b>Anchor</b></u><br>"\ "<p><img source=\"ui/actions/Simulation/Anchor.png\"><br> "\ "Attaches an <b>Anchor</b> to the selected atom(s), which "\ "constrains its motion during a minimization or simulation."\ "</p>"\ "<p>To create an Anchor, enter <b>Build</b> mode, "\ "select the atom(s) you want to anchor and then select this action. "\ "Anchors are drawn as a black wireframe box around each selected atom."\ "</p>" win.jigsAnchorAction.setWhatsThis(jigsAnchorActionText ) # Rotary Motor jigsMotorActionText = "<u><b>Rotary Motor</b></u><br>"\ "<p><img source=\"ui/actions/Simulation/Rotary_Motor.png\"><br> "\ "Attaches a <b>Rotary Motor</b> to the selected atoms. The Rotary Motor is used by "\ "the simulator to apply rotary motion to a set of atoms during a simulation run. You may "\ "specify the <b>torque (in nN*nm)</b> and <b>speed (in Ghz)</b> of the motor."\ "</p>"\ "<p>To create a Rotary Motor, enter <b>Build</b> mode, "\ "select the atoms you want to attach the motor to and then select this action."\ "</p>" win.jigsMotorAction.setWhatsThis(jigsMotorActionText ) # Linear Motor jigsLinearMotorActionText = "<u><b>Linear Motor</b></u><br>"\ "<p><img source=\"ui/actions/Simulation/Linear_Motor.png\"><br> "\ "Attaches a <b>Linear Motor</b> to the selected atoms. The Linear Motor is used by "\ "the simulator to apply linear motion to a set of atoms during a simulation run. You may "\ "specify the <b>force (in nN*nm)</b> and <b>stiffness (in N/m)</b> of the motor."\ "</p>"\ "<p>To create a Linear Motor, enter <b>Build</b> mode, "\ "select the atoms you want to attach the motor to and then select this action."\ "</p>" win.jigsLinearMotorAction.setWhatsThis(jigsLinearMotorActionText ) # Thermostat jigsStatActionText = "<u><b>Thermostat</b></u><br>"\ "<p><img source=\"ui/actions/Simulation/Thermostat.png\"><br> "\ "Attaches a <b>Langevin Thermostat</b> to a single selected atom, thereby associating "\ "the themostat to the entire molecule of which the selected atom is a member. The user "\ "specifies the temperature (in Kelvin)."\ "</p>"\ "<p>The Langevin Thermostat is used to set and hold the temperature "\ "of a molecule during a simulation run."\ "</p>"\ "<p>To create a Langevin Thermostat, enter <b>Build</b> mode, "\ "select a single atom and then select this action. The thermostat is drawn as a "\ "blue wireframe box around the selected atom."\ "</p>" win.jigsStatAction.setWhatsThis(jigsStatActionText ) # Thermometer jigsThermoActionText = "<u><b>Thermometer</b></u><br>"\ "<p><img source=\"ui/actions/Simulation/Measurements/Thermometer.png\"><br> "\ "Attaches a <b>Thermometer</b> to a single selected atom, thereby associating "\ "the themometer to the entire molecule of which the selected atom is a member. "\ "<p>The temperature of the molecule will be recorded and written to a trace file "\ "during a simulation run."\ "</p>"\ "<p>To create a Thermometer, enter <b>Build</b> mode, "\ "select a single atom and then select this action. The thermometer is drawn as a "\ "dark red wireframe box around the selected atom."\ "</p>" win.jigsThermoAction.setWhatsThis(jigsThermoActionText ) # ESP Image jigsESPImageActionText = "<u><b>ESP Image</b></u><br>"\ "<p><img source=\"ui/actions/Simulation/ESP_Image.png\"><br> "\ "An <b>ESP Image</b> allows the user to visualize the electrostatic potential "\ "of points on the face of a square 2D surface. Nano-Hive's MPQC ESP Plane plug-in "\ "is used to calculate the electrostatic potential."\ "</p>"\ "<p>To create an ESP Image, enter <b>Build</b> mode, "\ "select three or more atoms and then select this jig. The ESP Image is drawn as a "\ "plane with a bounding volume."\ "</p>" win.jigsESPImageAction.setWhatsThis(jigsESPImageActionText ) # Atom Set jigsAtomSetActionText = "<u><b>Atom Set</b></u><br>"\ "<p><img source=\"ui/actions/Tools/Atom_Set.png\"><br> "\ "An <b>Atom Set</b> jig provides a convienient way to save an atom "\ "selection which can be reselected later."\ "</p>"\ "<p>To create an Atom Set, enter <b>Build</b> mode, "\ "select any number of atoms and then select this jig. The Atom Set is "\ "drawn as a set of wireframe boxes around each atom in the selection."\ "</p>"\ "<p>To reselect the atoms in an Atom Set, select it's context "\ "menu in the Model Tree and click the menu item that states "\ "<b>Select this jig's atoms</b>."\ "</p>" win.jigsAtomSetAction.setWhatsThis(jigsAtomSetActionText ) # Measure Distance jigsDistanceActionText = "<u><b>Measure Distance Jig</b></u><br>"\ "<p><img source=\"ui/actions/Simulation/Measurements/Measure_Distance.png\"><br> "\ "A <b>Measure Distance Jig</b> functions as a dimension to display the "\ "distance between two atoms."\ "</p>"\ "<p>To create the Measure Distance Jig, enter <b>Build</b> mode, "\ "select two atoms and then select this jig. The Measure Distance Jig is "\ "drawn as a pair of wireframe boxes around each atom connected by "\ "a line and a pair of numbers. The first number is the distance between the "\ "VdW radii (this can be a negative number for atoms that are close together). "\ "The second number is the distance between the nuclei."\ "</p>"\ "<p>The Measure Distance Jig will write the two distance values to the trace file "\ "for each frame of a simulation run and can be plotted using the Plot Tool."\ "</p>" win.jigsDistanceAction.setWhatsThis(jigsDistanceActionText ) # Measure Angle jigsAngleActionText = "<u><b>Measure Angle Jig</b></u><br>"\ "<p><img source=\"ui/actions/Simulation/Measurements/Measure_Angle.png\"><br> "\ "A <b>Measure Angle Jig</b> functions as a dimension to display the "\ "angle between three atoms.</p>"\ "<p>To create the Measure Angle Jig, enter <b>Build</b> mode, "\ "select three atoms and then select this jig. The Measure Angle Jig is "\ "drawn as a set of wireframe boxes around each atom and a number "\ "which is the angle between the three atoms."\ "</p>"\ "<p>The Measure Angle Jig will write the angle value to the trace file "\ "for each frame of a simulation run and can be plotted using the Plot Tool."\ "</p>" win.jigsAngleAction.setWhatsThis(jigsAngleActionText ) # Measure Dihedral jigsDihedralActionText = "<u><b>Measure Dihedral Jig</b></u><br>"\ "<p><img source=\"ui/actions/Simulation/Measurements/Measure_Dihedral.png\"><br> "\ "A <b>Measure Dihedral Jig</b> functions as a dimension to display the "\ "dihedral angle of a four atom sequence.</p>"\ "<p>To create the Measure Dihedral Jig, enter <b>Build</b> mode, "\ "select four atoms and then select this jig. The Measure Dihedral Jig is "\ "drawn as a set of wireframe boxes around each atom and a number "\ "which is the dihedral angle value."\ "</p>"\ "<p>The Measure Dihedral Jig will write the dihedral angle value to the trace file "\ "for each frame of a simulation run and can be plotted using the Plot Tool."\ "</p>" win.jigsDihedralAction.setWhatsThis(jigsDihedralActionText ) # GAMESS Jig jigsGamessActionText = "<u><b>GAMESS Jig</b></u><br>"\ "<p><img source=\"ui/actions/Simulation/Gamess.png\"><br> "\ "A <b>GAMESS Jig</b> is used to tag a set of atoms for running a GAMESS "\ "calculation. <b>Energy</b> and <b>Geometry Optimization</b> calculations are supported."\ "</p>"\ "<p>To create the GAMESS Jig, enter <b>Build</b> mode, "\ "select the atoms to tag and then select this jig. The GAMESS Jig is drawn as a "\ "set of magenta wireframe boxes around each atom."\ "</p>" win.jigsGamessAction.setWhatsThis(jigsGamessActionText ) # Grid Plane Jig jigsGridPlaneActionText = "<u><b>Grid Plane</b></u><br>"\ "<p><img source=\"ui/actions/Insert/Reference Geometry/Grid_Plane.png\"><br> "\ "A <b>Grid Plane</b> jig is a rectanglar plane that can display a square or SiC grid "\ "within its boundary. It is often used as an aid in constructing large lattice "\ "structures made of silicon carbide (SiC). It is also used as a visual aid in estimating "\ "distances between atoms and/or other structures."\ "</p>"\ "<p>To create the Grid Plane jig, enter <b>Build</b> mode, "\ "select three or more atoms and then select this jig. "\ "</p>"\ "<p>The Grid Plane jig is drawn as a rectanglar plane with a grid."\ "</p>" win.jigsGridPlaneAction.setWhatsThis(jigsGridPlaneActionText ) # # Help Toolbar # # What's This helpWhatsThisText = "<u><b>What's This</b></u><br>"\ "<p><img source=\"ui/actions/Help/WhatsThis.png\"><br> "\ "Click this option to invoke a small question mark that is attached to the mouse pointer. "\ "Click on a feature which you would like more information about. "\ "A popup box appears with information about the feature.</p>" win.helpWhatsThisAction.setWhatsThis( helpWhatsThisText ) win.helpMouseControlsAction.setWhatsThis('Displays help for mouse controls') win.helpKeyboardShortcutsAction.setWhatsThis('Displays help for keyboard shortcuts') | 596540c24ceb3b478e904a42e26d7d5dd8809d95 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11221/596540c24ceb3b478e904a42e26d7d5dd8809d95/whatsthis.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
2888,
2323,
2503,
1528,
1290,
6376,
3829,
16166,
12,
8082,
4672,
3536,
15605,
326,
315,
23801,
1807,
1220,
6,
2809,
977,
358,
1516,
1392,
316,
326,
12901,
21,
2774,
5668,
12748,
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,
752,
2888,
2323,
2503,
1528,
1290,
6376,
3829,
16166,
12,
8082,
4672,
3536,
15605,
326,
315,
23801,
1807,
1220,
6,
2809,
977,
358,
1516,
1392,
316,
326,
12901,
21,
2774,
5668,
12748,
87,
... |
if (PkgSelected(opts,"FMOD")): cmd = cmd + ' thirdparty/win-libs-vc7/fmod/lib/fmod.lib' | if (ldef!=0): cmd = cmd + ' /DEF:"' + ldef + '"' | c062776b1f6d036a43312d88bd9591e46cb812a8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7242/c062776b1f6d036a43312d88bd9591e46cb812a8/makepanda.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
309,
261,
80,
536,
5,
33,
20,
4672,
1797,
273,
1797,
397,
296,
342,
12904,
2773,
11,
397,
328,
536,
397,
4754,
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,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
309,
261,
80,
536,
5,
33,
20,
4672,
1797,
273,
1797,
397,
296,
342,
12904,
2773,
11,
397,
328,
536,
397,
4754,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... | |
raise YdpParser.SecurityException | raise YdpFormatter.SecurityException(node.tag) | def __call__(self, node): if node.tag.isalpha(): getattr(self, 'parse_%s' % node.tag)(node) else: raise YdpParser.SecurityException | 9de3e0173e8bb2f4eed407a0a8cd9b5e6cb0dc12 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3427/9de3e0173e8bb2f4eed407a0a8cd9b5e6cb0dc12/format_text.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1991,
972,
12,
2890,
16,
756,
4672,
309,
756,
18,
2692,
18,
291,
5429,
13332,
3869,
12,
2890,
16,
296,
2670,
10185,
87,
11,
738,
756,
18,
2692,
21433,
2159,
13,
469,
30,
1002,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1991,
972,
12,
2890,
16,
756,
4672,
309,
756,
18,
2692,
18,
291,
5429,
13332,
3869,
12,
2890,
16,
296,
2670,
10185,
87,
11,
738,
756,
18,
2692,
21433,
2159,
13,
469,
30,
1002,
... |
TimeTable.className_ = _moose.cvar.TimeTable_className_ | def __set_filename(*args): """__set_filename(self, string filename)""" return _moose.TimeTable___set_filename(*args) | 1961c35f540060f41023dcf804a850794a39f350 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2961/1961c35f540060f41023dcf804a850794a39f350/moose.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
542,
67,
3459,
30857,
1968,
4672,
3536,
972,
542,
67,
3459,
12,
2890,
16,
533,
1544,
15574,
327,
389,
8683,
2584,
18,
950,
1388,
31268,
542,
67,
3459,
30857,
1968,
13,
2,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
542,
67,
3459,
30857,
1968,
4672,
3536,
972,
542,
67,
3459,
12,
2890,
16,
533,
1544,
15574,
327,
389,
8683,
2584,
18,
950,
1388,
31268,
542,
67,
3459,
30857,
1968,
13,
2,
-100,
-... | |
assert s == "HELLO0" | assert s == "HELLO" | def llf(): s = '' for i in range(5): s += chr(64+a[i]) assert s == "HELLO0" return 0 | 7e7517be40ce6ea063bc12e98d2b75f5e0d6dec8 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6934/7e7517be40ce6ea063bc12e98d2b75f5e0d6dec8/test_lltype.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6579,
74,
13332,
272,
273,
875,
364,
277,
316,
1048,
12,
25,
4672,
272,
1011,
4513,
12,
1105,
15,
69,
63,
77,
5717,
1815,
272,
422,
315,
20264,
1502,
6,
327,
374,
2,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6579,
74,
13332,
272,
273,
875,
364,
277,
316,
1048,
12,
25,
4672,
272,
1011,
4513,
12,
1105,
15,
69,
63,
77,
5717,
1815,
272,
422,
315,
20264,
1502,
6,
327,
374,
2,
-100,
-100,
-100... |
elif filename: | else: if filename == None: filename = get_credentials_file () | def __init__ (self, username=None, password=None, id=None, filename=None): if username: self.username = username self.password = password elif filename: if os.path.exists (filename): try: f = open (filename) lines = f.readlines () self.username = lines[0].strip () self.password = lines[1].strip () f.close () except: raise ProblemReadingCredentialsFileError, ('Failed to read' ' credentials from %s.' % str (filename)) else: raise CredentialsFileNotFoundError, ('Couldn\'t find or ' 'read credentials from %s.' % str (filename)) else: raise BadCredentialsError, ('Neither a username nor a valid ' 'credentials file was provided.') self.id = id | 635ed1bdd854767b671f02d71a9daf95339913e5 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12637/635ed1bdd854767b671f02d71a9daf95339913e5/fdb.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
261,
2890,
16,
2718,
33,
7036,
16,
2201,
33,
7036,
16,
612,
33,
7036,
16,
1544,
33,
7036,
4672,
309,
2718,
30,
365,
18,
5053,
273,
2718,
365,
18,
3664,
273,
2201,
46... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
261,
2890,
16,
2718,
33,
7036,
16,
2201,
33,
7036,
16,
612,
33,
7036,
16,
1544,
33,
7036,
4672,
309,
2718,
30,
365,
18,
5053,
273,
2718,
365,
18,
3664,
273,
2201,
46... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.