rem stringlengths 2 226k | add stringlengths 0 227k | context stringlengths 8 228k | meta stringlengths 156 215 | input_ids list | attention_mask list | labels list |
|---|---|---|---|---|---|---|
for page in self.__getMembersInternal(titleonly): self.members.append(page) | for member in self.__getMembersInternal(): self.members.append(member) if titleonly: ret = [] ret.append(member.title) if titleonly: return ret | def getAllMembers(self, titleonly=False, reload=False): """ Gets a list of pages in the category titleonly - set to True to only create a list of strings, else it will be a list of Page objects reload - reload the list even if it was generated before """ if self.members and not reload: return self.members else: self.members = [] for page in self.__getMembersInternal(titleonly): self.members.append(page) return self.members | 5361ae5e9d3a2111378efd27475a73f90e77a963 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10544/5361ae5e9d3a2111378efd27475a73f90e77a963/category.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5514,
6918,
12,
2890,
16,
2077,
3700,
33,
8381,
16,
7749,
33,
8381,
4672,
3536,
11881,
279,
666,
434,
4689,
316,
326,
3150,
2077,
3700,
300,
444,
358,
1053,
358,
1338,
752,
279,
666,
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,
5514,
6918,
12,
2890,
16,
2077,
3700,
33,
8381,
16,
7749,
33,
8381,
4672,
3536,
11881,
279,
666,
434,
4689,
316,
326,
3150,
2077,
3700,
300,
444,
358,
1053,
358,
1338,
752,
279,
666,
4... |
elif 'lock_nolock' in o: | elif 'nolock' in o: | def __get_gfs_lock_type(self, path): if self.check_path('/sbin/gfs_tool'): args = ['/sbin/gfs_tool'] args.append('sb') args.append(path) args.append('proto') cmdstr = ' '.join(args) o,e,r = execWithCaptureErrorStatus('/sbin/gfs_tool', args) if r == 0: if 'lock_dlm' in o: return 'dlm' elif 'lock_gulm' in o: return 'gulm' elif 'lock_nolock' in o: return 'nolock' return None | b3356963f0afc2b9ed670c234aab5ce80fe1c23a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3880/b3356963f0afc2b9ed670c234aab5ce80fe1c23a/Filesystem.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
588,
67,
75,
2556,
67,
739,
67,
723,
12,
2890,
16,
589,
4672,
309,
365,
18,
1893,
67,
803,
2668,
19,
87,
4757,
19,
75,
2556,
67,
6738,
11,
4672,
833,
273,
10228,
19,
87,
4757... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
588,
67,
75,
2556,
67,
739,
67,
723,
12,
2890,
16,
589,
4672,
309,
365,
18,
1893,
67,
803,
2668,
19,
87,
4757,
19,
75,
2556,
67,
6738,
11,
4672,
833,
273,
10228,
19,
87,
4757... |
if response[-3:] == '.\r\n': | terminatingDotPresent = (response[-4:] == '\n.\r\n') if terminatingDotPresent: | def onRetr(self, command, args, response): """Adds the judgement header based on the raw headers and body of the message.""" # Use '\n\r?\n' to detect the end of the headers in case of # broken emails that don't use the proper line separators. if re.search(r'\n\r?\n', response): # Remove the trailing .\r\n before passing to the email parser. if response[-3:] == '.\r\n': response = response[:-3] | b67a67f3039edb1831691f68324d5ac9b49c4f11 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6126/b67a67f3039edb1831691f68324d5ac9b49c4f11/pop3proxy.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
7055,
86,
12,
2890,
16,
1296,
16,
833,
16,
766,
4672,
3536,
3655,
326,
525,
1100,
75,
820,
1446,
2511,
603,
326,
1831,
1607,
471,
1417,
434,
326,
883,
12123,
468,
2672,
2337,
82,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
7055,
86,
12,
2890,
16,
1296,
16,
833,
16,
766,
4672,
3536,
3655,
326,
525,
1100,
75,
820,
1446,
2511,
603,
326,
1831,
1607,
471,
1417,
434,
326,
883,
12123,
468,
2672,
2337,
82,
... |
xml = post.execute().read() log.debug3("Received XML response: \n" + xml) doc = minidom.parseString(xml) doc.normalize() | XML = post.execute().read() log.debug3( 'Received XML response:\n' + XML ) doc = xml.dom.minidom.parseString( XML ) doc.normalize() | def _getStatusTable(self, statusTable, key=None, numrows=None): """Given an XML string, parse it as a status table and return a list of dictionaries representing the data. Each item in the list is a dictionary of column names to values, stored as Unicode strings.""" post = self.__makePost('DaemonStatus') post.add('table', statusTable) if not key == None: post.add('key', key) if not numrows == None: post.add('numrows', numrows) post.add('output', 'xml') | cb9a70c7bbdce1e09c351d60188d3e6bda051e84 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/766/cb9a70c7bbdce1e09c351d60188d3e6bda051e84/lockss_daemon.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
1482,
1388,
12,
2890,
16,
1267,
1388,
16,
498,
33,
7036,
16,
818,
3870,
33,
7036,
4672,
3536,
6083,
392,
3167,
533,
16,
1109,
518,
487,
279,
1267,
1014,
471,
327,
279,
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,
389,
588,
1482,
1388,
12,
2890,
16,
1267,
1388,
16,
498,
33,
7036,
16,
818,
3870,
33,
7036,
4672,
3536,
6083,
392,
3167,
533,
16,
1109,
518,
487,
279,
1267,
1014,
471,
327,
279,
666,
... |
warn(unicode(e)) | if not self.quiet: warn(unicode(e)) | def build(self): import locale import codecs | dec8906e07681ee925caef6e895971c9e8464f07 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11128/dec8906e07681ee925caef6e895971c9e8464f07/build.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1361,
12,
2890,
4672,
1930,
2573,
1930,
17437,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1361,
12,
2890,
4672,
1930,
2573,
1930,
17437,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
if 'test' in tests: | if 'tests' in tests: | def buildTestSuite(): for filename in html5lib_test_files('tokenizer', '*.test'): tests = simplejson.load(file(filename)) testName = os.path.basename(filename).replace(".test","") if 'test' in tests: for index,test in enumerate(tests['tests']): if 'contentModelFlags' not in test: test["contentModelFlags"] = ["PCDATA"] for contentModelFlag in test["contentModelFlags"]: test["contentModelFlag"] = contentModelFlag def testFunc(self, test=test): self.runTokenizerTest(test) testFunc.__doc__ = "\t".join([testName, test['description']]) setattr(TestCase, 'test_%s_%d' % (testName, index), testFunc) return unittest.TestLoader().loadTestsFromTestCase(TestCase) | 905528f8bff1cdd2ef8a59936f3ea638a8a99f1f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4487/905528f8bff1cdd2ef8a59936f3ea638a8a99f1f/test_tokenizer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1361,
4709,
13587,
13332,
364,
1544,
316,
1729,
25,
2941,
67,
3813,
67,
2354,
2668,
2316,
1824,
2187,
19962,
3813,
11,
4672,
7434,
273,
4143,
1977,
18,
945,
12,
768,
12,
3459,
3719,
1842... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4709,
13587,
13332,
364,
1544,
316,
1729,
25,
2941,
67,
3813,
67,
2354,
2668,
2316,
1824,
2187,
19962,
3813,
11,
4672,
7434,
273,
4143,
1977,
18,
945,
12,
768,
12,
3459,
3719,
1842... |
result.append((value, key)) result.reverse() for i in xrange(len(result)): result[i] = result[i][1] | temp.append((value, key)) temp.sort() temp.reverse() for v,k in temp : result.append(v) | def sort_by_desc(self, attribute): result = [] for key, item in self.items(): value = getattr(item, attribute) result.append((value, key)) result.reverse() for i in xrange(len(result)): result[i] = result[i][1] return result | b6c4487303edcff7827531af5e32fd2e9962fa53 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6947/b6c4487303edcff7827531af5e32fd2e9962fa53/BaseClasses.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1524,
67,
1637,
67,
5569,
12,
2890,
16,
1566,
4672,
563,
273,
5378,
364,
498,
16,
761,
316,
365,
18,
3319,
13332,
460,
273,
3869,
12,
1726,
16,
1566,
13,
1906,
18,
6923,
12443,
1132,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1524,
67,
1637,
67,
5569,
12,
2890,
16,
1566,
4672,
563,
273,
5378,
364,
498,
16,
761,
316,
365,
18,
3319,
13332,
460,
273,
3869,
12,
1726,
16,
1566,
13,
1906,
18,
6923,
12443,
1132,
... |
pkgname__in=package_names).order_by('arch') | pkgname__in=package_names).exclude(repo__name="Testing").order_by('arch') | def clean_packages(self): package_names = [s.strip() for s in self.clean_data['packages'].split("\n")] package_names = set(package_names) packages = Package.objects.filter( pkgname__in=package_names).order_by('arch') return packages | 64c6711ff3c0ed5d5a96ca3ea8d5f494665afa01 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11256/64c6711ff3c0ed5d5a96ca3ea8d5f494665afa01/views.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2721,
67,
10308,
12,
2890,
4672,
2181,
67,
1973,
273,
306,
87,
18,
6406,
1435,
364,
272,
316,
365,
18,
6200,
67,
892,
3292,
10308,
29489,
4939,
31458,
82,
7923,
65,
2181,
67,
1973,
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,
2721,
67,
10308,
12,
2890,
4672,
2181,
67,
1973,
273,
306,
87,
18,
6406,
1435,
364,
272,
316,
365,
18,
6200,
67,
892,
3292,
10308,
29489,
4939,
31458,
82,
7923,
65,
2181,
67,
1973,
273... |
(001011.0011) | (001011, 0011) | def standard_factorization(self): r""" Returns the standard factorization of self. | 0392dbfbd4660240610d6340b53857ca3e7aa64c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9417/0392dbfbd4660240610d6340b53857ca3e7aa64c/word.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4529,
67,
6812,
1588,
12,
2890,
4672,
436,
8395,
2860,
326,
4529,
5578,
1588,
434,
365,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4529,
67,
6812,
1588,
12,
2890,
4672,
436,
8395,
2860,
326,
4529,
5578,
1588,
434,
365,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
EXAMPLES: | EXAMPLES:: | def __repr__(self): r""" Print a TestGlobalNewName. | a4aad1557cdf06ed8562711534ca467dff85c855 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9417/a4aad1557cdf06ed8562711534ca467dff85c855/explain_pickle.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
12715,
972,
12,
2890,
4672,
436,
8395,
3038,
279,
7766,
5160,
1908,
461,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
12715,
972,
12,
2890,
4672,
436,
8395,
3038,
279,
7766,
5160,
1908,
461,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
border:1px solid white; font-family:Arial,Verdana, sans-serif; font-size:10pt; | border:1px solid white; font-family:Arial,Verdana, sans-serif; font-size:10pt; | def __show_page(self, number): global current_log f = self.send_head() if f: f = StringIO() f.write(""" <html><head><title>SAGE Calculator %s</title></head>\n | 4769c49f27b63d5653f3113eb8009a910aa9fc8f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9417/4769c49f27b63d5653f3113eb8009a910aa9fc8f/server1.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
4500,
67,
2433,
12,
2890,
16,
1300,
4672,
2552,
783,
67,
1330,
284,
273,
365,
18,
4661,
67,
1978,
1435,
309,
284,
30,
284,
273,
15777,
1435,
284,
18,
2626,
2932,
3660,
411,
2620,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
4500,
67,
2433,
12,
2890,
16,
1300,
4672,
2552,
783,
67,
1330,
284,
273,
365,
18,
4661,
67,
1978,
1435,
309,
284,
30,
284,
273,
15777,
1435,
284,
18,
2626,
2932,
3660,
411,
2620,... |
if y0>self.plotaread[3] and y1<=self.plotaread[3]: | if y0>self.plotaread[3] : | def drawpoint_connect(self, aFullPNString, datapoint): #get datapoint x y values #convert to plot coordinates if self.trace_onoff[aFullPNString]==gtk.FALSE: return 0 x=self.convertx_to_plot(datapoint[0]) y=self.converty_to_plot(datapoint[1]) cur_point_within_frame=self.withinframes([x,y]) #getlastpoint, calculate change to the last lastx=self.lastx[aFullPNString] lasty=self.lasty[aFullPNString] self.lastx[aFullPNString]=x self.lasty[aFullPNString]=y last_point_within_frame=self.withinframes([lastx,lasty]) lastymax=self.lastymax[aFullPNString] lastymin=self.lastymin[aFullPNString] if lastx!=None : dx=abs(lastx-x) | 8f18e3850a6316681f1074fff213ca716c4f5df5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12724/8f18e3850a6316681f1074fff213ca716c4f5df5/Plot.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3724,
1153,
67,
3612,
12,
2890,
16,
279,
5080,
15124,
780,
16,
25252,
4672,
468,
588,
25252,
619,
677,
924,
468,
6283,
358,
3207,
5513,
309,
365,
18,
5129,
67,
265,
3674,
63,
69,
5080,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3724,
1153,
67,
3612,
12,
2890,
16,
279,
5080,
15124,
780,
16,
25252,
4672,
468,
588,
25252,
619,
677,
924,
468,
6283,
358,
3207,
5513,
309,
365,
18,
5129,
67,
265,
3674,
63,
69,
5080,... |
if option.lower() in self.options('global'): try: self['global'][option] = self.getint('global', option) | if option.lower() in self.options(glob): try: self['global'][option] = self.getint(glob, option) | def parse(self): for option in self.boolOptionsGlobal: try: if option.lower() in self.options('global'): try: self['global'][option]=self.getboolean('global',option) except ValueError: print >> sys.stderr, u"""failed to parse option %s in \ | 830769e8183a1ce27956e236ff478b0b2d4e4fdc /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1664/830769e8183a1ce27956e236ff478b0b2d4e4fdc/rssdler.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
12,
2890,
4672,
364,
1456,
316,
365,
18,
6430,
1320,
5160,
30,
775,
30,
309,
1456,
18,
8167,
1435,
316,
365,
18,
2116,
2668,
6347,
11,
4672,
775,
30,
365,
3292,
6347,
3546,
63,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
12,
2890,
4672,
364,
1456,
316,
365,
18,
6430,
1320,
5160,
30,
775,
30,
309,
1456,
18,
8167,
1435,
316,
365,
18,
2116,
2668,
6347,
11,
4672,
775,
30,
365,
3292,
6347,
3546,
63,
... |
write_porrectus(i,j, "base2", 0, 'porrectus') for i in range(1,6): for j in range(1,6): write_porrectus(i,j, "rdeminutus", 0, 'porrectus', 'deminutus') for i in range(1,6): for j in range(1,6): write_porrectus(i,j, "base2", 1, 'porrectus_nobar') for i in range(1,6): for j in range(1,6): write_porrectus(i,j, "rdeminutus", 1, 'porrectus_nobar', 'deminutus') | write_porrectus(i,j, "base2", 1, 'porrectus') for i in range(1,6): for j in range(1,6): write_porrectus(i,j, "rdeminutus", 1, 'porrectus', 'deminutus') for i in range(1,6): for j in range(1,6): write_porrectus(i,j, "base2", 0, 'porrectus_nobar') for i in range(1,6): for j in range(1,6): write_porrectus(i,j, "rdeminutus", 0, 'porrectus_nobar', 'deminutus') | def porrectus(): for i in range(1,6): for j in range(1,6): write_porrectus(i,j, "base2", 0, 'porrectus') for i in range(1,6): for j in range(1,6): write_porrectus(i,j, "rdeminutus", 0, 'porrectus', 'deminutus') for i in range(1,6): for j in range(1,6): write_porrectus(i,j, "base2", 1, 'porrectus_nobar') for i in range(1,6): for j in range(1,6): write_porrectus(i,j, "rdeminutus", 1, 'porrectus_nobar', 'deminutus') | f22136b17d9cba6d12f2b3aa856210a535becb5e /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7096/f22136b17d9cba6d12f2b3aa856210a535becb5e/squarize.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
22471,
2607,
407,
13332,
364,
277,
316,
1048,
12,
21,
16,
26,
4672,
364,
525,
316,
1048,
12,
21,
16,
26,
4672,
1045,
67,
3831,
2607,
407,
12,
77,
16,
78,
16,
315,
1969,
22,
3113,
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,
22471,
2607,
407,
13332,
364,
277,
316,
1048,
12,
21,
16,
26,
4672,
364,
525,
316,
1048,
12,
21,
16,
26,
4672,
1045,
67,
3831,
2607,
407,
12,
77,
16,
78,
16,
315,
1969,
22,
3113,
4... |
('one','Delivery Order Only'), ('two','Packing List & Delivery Order') | ('one', 'Delivery Order Only'), ('two', 'Packing List & Delivery Order') | def unlink(self, cr, uid, ids, context={}): """Allows to delete sale order lines in draft,cancel states""" for rec in self.browse(cr, uid, ids, context=context): if rec.state not in ['draft','cancel']: raise osv.except_osv(_('Invalid action !'), _('Cannot delete a sale order line which is %s !')%(rec.state,)) return super(sale_order_line, self).unlink(cr, uid, ids, context=context) | 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,
8255,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
819,
12938,
4672,
3536,
19132,
358,
1430,
272,
5349,
1353,
2362,
316,
12246,
16,
10996,
5493,
8395,
364,
1950,
316,
365,
18,
25731,
12,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8255,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
819,
12938,
4672,
3536,
19132,
358,
1430,
272,
5349,
1353,
2362,
316,
12246,
16,
10996,
5493,
8395,
364,
1950,
316,
365,
18,
25731,
12,
... |
for k in self.classcodes.keys(): self.fp.write("\t%s : %s,\n" % (`k`, self.classcodes[k])) | for k, v in self.namemappers[0].getall('class'): self.fp.write("\t%s : %s,\n" % (`k`, v)) | def dumpindex(self): self.fp.write("\n#\n# Indices of types declared in this module\n#\n") self.fp.write("_classdeclarations = {\n") for k in self.classcodes.keys(): self.fp.write("\t%s : %s,\n" % (`k`, self.classcodes[k])) self.fp.write("}\n") self.fp.write("\n_propdeclarations = {\n") for k in self.propcodes.keys(): self.fp.write("\t%s : %s,\n" % (`k`, self.propcodes[k])) self.fp.write("}\n") self.fp.write("\n_compdeclarations = {\n") for k in self.compcodes.keys(): self.fp.write("\t%s : %s,\n" % (`k`, self.compcodes[k])) self.fp.write("}\n") self.fp.write("\n_enumdeclarations = {\n") for k in self.enumcodes.keys(): self.fp.write("\t%s : %s,\n" % (`k`, self.enumcodes[k])) self.fp.write("}\n") | 12b2b76608e7551e3b5ce5c5db98d0b59ff75056 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/12b2b76608e7551e3b5ce5c5db98d0b59ff75056/gensuitemodule.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4657,
1615,
12,
2890,
4672,
365,
18,
7944,
18,
2626,
31458,
82,
7,
64,
82,
7,
23046,
434,
1953,
7886,
316,
333,
1605,
64,
82,
7,
64,
82,
7923,
365,
18,
7944,
18,
2626,
2932,
67,
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,
4657,
1615,
12,
2890,
4672,
365,
18,
7944,
18,
2626,
31458,
82,
7,
64,
82,
7,
23046,
434,
1953,
7886,
316,
333,
1605,
64,
82,
7,
64,
82,
7923,
365,
18,
7944,
18,
2626,
2932,
67,
11... |
self.camera.zoom = ( self.zoom_anchor[0] + (self.zoom_anchor[1] - y) / 100.0 ) | zoom = self.zoom_anchor[0] + ((self.zoom_anchor[1] - y) / 100.0) self.camera.zoom = max( zoom, 0.1 ) | def handle_motion( self, x, y ): """do something when mouse pointer is moved | b3f0f284fe7cf2c39975fb13d481a86487f0f911 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5180/b3f0f284fe7cf2c39975fb13d481a86487f0f911/Gimpy_Graph_Window.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
67,
81,
8240,
12,
365,
16,
619,
16,
677,
262,
30,
3536,
2896,
5943,
1347,
7644,
4407,
353,
10456,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
67,
81,
8240,
12,
365,
16,
619,
16,
677,
262,
30,
3536,
2896,
5943,
1347,
7644,
4407,
353,
10456,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
A -- a quaternion algebra basis -- list of 4 integral quaternions in A check -- whether to do type and other consistency checks | - ``A`` - a quaternion algebra - ``basis`` - list of 4 integral quaternions in ``A`` - ``check`` - whether to do type and other consistency checks | def __init__(self, A, basis, check=True): """ INPUT: A -- a quaternion algebra basis -- list of 4 integral quaternions in A check -- whether to do type and other consistency checks | b7a16ed05ab1759a61c3840607275d6cd5b220a1 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/b7a16ed05ab1759a61c3840607275d6cd5b220a1/quaternion_algebra.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
432,
16,
10853,
16,
866,
33,
5510,
4672,
3536,
12943,
30,
432,
1493,
279,
26774,
524,
29087,
10853,
1493,
666,
434,
1059,
21423,
719,
15827,
1115,
316,
432... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2890,
16,
432,
16,
10853,
16,
866,
33,
5510,
4672,
3536,
12943,
30,
432,
1493,
279,
26774,
524,
29087,
10853,
1493,
666,
434,
1059,
21423,
719,
15827,
1115,
316,
432... |
find_edge_range(g._Graph__graph, _prop(prop,"e"), (match, match)) | find_edge_range(g._Graph__graph, _prop("e", g, prop), (match, match)) | def find_edge(g, prop, match): ret = libgraph_tool_util.\ find_edge_range(g._Graph__graph, _prop(prop,"e"), (match, match)) return ret | 9b12a42786fea4a6126a0db6fe8376b0ea4cf934 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3516/9b12a42786fea4a6126a0db6fe8376b0ea4cf934/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1104,
67,
7126,
12,
75,
16,
2270,
16,
845,
4672,
325,
273,
2561,
4660,
67,
6738,
67,
1367,
8403,
1104,
67,
7126,
67,
3676,
12,
75,
6315,
4137,
972,
4660,
16,
389,
5986,
2932,
73,
311... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1104,
67,
7126,
12,
75,
16,
2270,
16,
845,
4672,
325,
273,
2561,
4660,
67,
6738,
67,
1367,
8403,
1104,
67,
7126,
67,
3676,
12,
75,
6315,
4137,
972,
4660,
16,
389,
5986,
2932,
73,
311... |
dbg('OptionParse::parse_options: options dump: %s' % options) | dbg('OptionParse::parse_options: command line options: %s' % options) | def parse_options(): """Parse the command line options""" usage = "usage: %prog [options]" configobj = config.Config() parser = OptionParser(usage) parser.add_option('-v', '--version', action='store_true', dest='version', help='Display program version') parser.add_option('-d', '--debug', action='count', dest='debug', help='Enable debugging information (twice for debug server)') parser.add_option('-m', '--maximise', action='store_true', dest='maximise', help='Maximise the window') parser.add_option('-f', '--fullscreen', action='store_true', dest='fullscreen', help='Make the window fill the screen') parser.add_option('-b', '--borderless', action='store_true', dest='borderless', help='Disable window borders') parser.add_option('-H', '--hidden', action='store_true', dest='hidden', help='Hide the window at startup') parser.add_option('-T', '--title', dest='forcedtitle', help='Specify a \ | cfd5f6cfeb81f1439cb02a43fab36f1ff09bebf2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6502/cfd5f6cfeb81f1439cb02a43fab36f1ff09bebf2/optionparse.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
67,
2116,
13332,
3536,
3201,
326,
1296,
980,
702,
8395,
4084,
273,
315,
9167,
30,
738,
14654,
306,
2116,
4279,
225,
642,
2603,
273,
642,
18,
809,
1435,
2082,
273,
18862,
12,
9167,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
67,
2116,
13332,
3536,
3201,
326,
1296,
980,
702,
8395,
4084,
273,
315,
9167,
30,
738,
14654,
306,
2116,
4279,
225,
642,
2603,
273,
642,
18,
809,
1435,
2082,
273,
18862,
12,
9167,
... |
super(PhotoSize, self).save() | super(PhotoSize, self).save(*args, **kwargs) | def save(self): if self.width + self.height <= 0: raise ValueError(_('A PhotoSize must have a positive height or width.')) super(PhotoSize, self).save() PhotoSizeCache().reset() self.clear_cache() | 0420337142d523a871b8c3d42b97a957c956db5b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10711/0420337142d523a871b8c3d42b97a957c956db5b/models.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1923,
12,
2890,
4672,
309,
365,
18,
2819,
397,
365,
18,
4210,
1648,
374,
30,
1002,
2068,
24899,
2668,
37,
26867,
1225,
1297,
1240,
279,
6895,
2072,
578,
1835,
1093,
3719,
2240,
12,
19934... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
12,
2890,
4672,
309,
365,
18,
2819,
397,
365,
18,
4210,
1648,
374,
30,
1002,
2068,
24899,
2668,
37,
26867,
1225,
1297,
1240,
279,
6895,
2072,
578,
1835,
1093,
3719,
2240,
12,
19934... |
open_tag_re = re.compile(r'<(\w+)\s.*?[^/]?>') | open_tag_re = re.compile(r'<(\w+)(\s.*)?[^/]?>') | def _html_splitlines(lines): """Tracks open and close tags in lines of HTML text and yields lines that have no tags spanning more than one line.""" open_tag_re = re.compile(r'<(\w+)\s.*?[^/]?>') close_tag_re = re.compile(r'</(\w+)>') open_tags = [] for line in lines: # Reopen tags still open from the previous line for tag in open_tags: line = tag.group(0) + line open_tags = [] # Find all tags opened on this line for tag in open_tag_re.finditer(line): open_tags.append(tag) # Find all tags closed on this line for ctag in close_tag_re.finditer(line): for otag in open_tags: if otag.group(1) == ctag.group(1): open_tags.remove(otag) break # Close all tags still open at the end of line, they'll get reopened at # the beginning of the next line for tag in open_tags: line += '</%s>' % tag.group(1) yield line | 0da0762960d07f94d52ceea48316b898d060e518 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/0da0762960d07f94d52ceea48316b898d060e518/api.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2620,
67,
4939,
3548,
12,
3548,
4672,
3536,
22138,
1696,
471,
1746,
2342,
316,
2362,
434,
3982,
977,
471,
16932,
2362,
716,
1240,
1158,
2342,
1694,
10903,
1898,
2353,
1245,
980,
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,
389,
2620,
67,
4939,
3548,
12,
3548,
4672,
3536,
22138,
1696,
471,
1746,
2342,
316,
2362,
434,
3982,
977,
471,
16932,
2362,
716,
1240,
1158,
2342,
1694,
10903,
1898,
2353,
1245,
980,
12123... |
command = self.get_config_value('command', self.preferences['command']['default']).lower() | command = self.get_config_value('command', self.preferences['command']['default']) | def toolbar_icon_clicked(self, widget, movie): if not movie or not movie.trailer: return False | e64dc6104e7aeb05f90731fc46d2e57d21cace0b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2687/e64dc6104e7aeb05f90731fc46d2e57d21cace0b/ge_player.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12748,
67,
3950,
67,
7475,
329,
12,
2890,
16,
3604,
16,
21360,
4672,
309,
486,
21360,
578,
486,
21360,
18,
15565,
264,
30,
225,
327,
1083,
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,
12748,
67,
3950,
67,
7475,
329,
12,
2890,
16,
3604,
16,
21360,
4672,
309,
486,
21360,
578,
486,
21360,
18,
15565,
264,
30,
225,
327,
1083,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
temp_factor = copy.deepcopy(self.temp_factor), sig_temp_factor = copy.deepcopy(self.sig_temp_factor), occupancy = copy.deepcopy(self.occupancy), sig_occupancy = copy.deepcopy(self.sig_occupancy), charge = copy.deepcopy(self.charge), U = copy.deepcopy(self.U, memo), sig_U = copy.deepcopy(self.sig_U, memo)) | temp_factor = copy.copy(self.temp_factor), sig_temp_factor = copy.copy(self.sig_temp_factor), occupancy = copy.copy(self.occupancy), sig_occupancy = copy.copy(self.sig_occupancy), charge = copy.copy(self.charge), U = copy.deepcopy(self.U), sig_U = copy.deepcopy(self.sig_U)) | def __deepcopy__(self, memo): atom_cpy = Atom( name = copy.deepcopy(self.name), alt_loc = copy.deepcopy(self.alt_loc), res_name = copy.deepcopy(self.res_name), fragment_id = copy.deepcopy(self.fragment_id), chain_id = copy.deepcopy(self.chain_id), model_id = copy.deepcopy(self.model_id), element = copy.deepcopy(self.element), position = copy.deepcopy(self.position), sig_position = copy.deepcopy(self.sig_position), temp_factor = copy.deepcopy(self.temp_factor), sig_temp_factor = copy.deepcopy(self.sig_temp_factor), occupancy = copy.deepcopy(self.occupancy), sig_occupancy = copy.deepcopy(self.sig_occupancy), charge = copy.deepcopy(self.charge), U = copy.deepcopy(self.U, memo), sig_U = copy.deepcopy(self.sig_U, memo)) for bond in self.bond_list: bond_cpy = copy.deepcopy(bond, memo) atom_cpy.bond_list.append(bond_cpy) if bond_cpy.atom1 == None: bond_cpy.atom1 = atom_cpy elif bond_cpy.atom2 == None: bond_cpy.atom2 = atom_cpy | 98cad825ba0fabe8950b29dee5164e5a7571a5e1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10674/98cad825ba0fabe8950b29dee5164e5a7571a5e1/Structure.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
16589,
3530,
972,
12,
2890,
16,
11063,
4672,
3179,
67,
71,
2074,
273,
7149,
12,
508,
5411,
273,
1610,
18,
16589,
3530,
12,
2890,
18,
529,
3631,
3770,
67,
1829,
540,
273,
1610,
18... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
16589,
3530,
972,
12,
2890,
16,
11063,
4672,
3179,
67,
71,
2074,
273,
7149,
12,
508,
5411,
273,
1610,
18,
16589,
3530,
12,
2890,
18,
529,
3631,
3770,
67,
1829,
540,
273,
1610,
18... |
table.StripTableName(SegmentDefMapTable.tableName): SegmentDefMapTable, | def set_time(self, gps): self.time, self.time_ns = gps.seconds, gps.nanoseconds | 959788c5d74f881a072ec68d90fd134db6182598 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3589/959788c5d74f881a072ec68d90fd134db6182598/lsctables.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
67,
957,
12,
2890,
16,
20985,
4672,
365,
18,
957,
16,
365,
18,
957,
67,
2387,
273,
20985,
18,
7572,
16,
20985,
18,
13569,
23272,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
67,
957,
12,
2890,
16,
20985,
4672,
365,
18,
957,
16,
365,
18,
957,
67,
2387,
273,
20985,
18,
7572,
16,
20985,
18,
13569,
23272,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... | |
raise | def build_searchers_list(self, cls): searchers = getattr(self.options, cls.name) for index in xrange(len(searchers)): try: searchers[index] = cls( searchers[index], index ) except Exception, e: raise msg = cls.init_error_msg(index, searchers[index], e) self.parser.error(msg) | ca6136c120538727397f9ecc3b54e85d1c43f1e9 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7261/ca6136c120538727397f9ecc3b54e85d1c43f1e9/pfind.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1361,
67,
3072,
414,
67,
1098,
12,
2890,
16,
2028,
4672,
1623,
414,
273,
3869,
12,
2890,
18,
2116,
16,
2028,
18,
529,
13,
364,
770,
316,
12314,
12,
1897,
12,
3072,
414,
3719,
30,
775... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3072,
414,
67,
1098,
12,
2890,
16,
2028,
4672,
1623,
414,
273,
3869,
12,
2890,
18,
2116,
16,
2028,
18,
529,
13,
364,
770,
316,
12314,
12,
1897,
12,
3072,
414,
3719,
30,
775... | |
self.SetMinSize(wx.Size(200, 200)) | def __init__(self, symbol_table, toplevel, parent = None, id = -1): wx.Panel.__init__( self, parent, id, style=wx.WANTS_CHARS|wx.CLIP_CHILDREN|wx.NO_FULL_REPAINT_ON_RESIZE) self.SetMinSize(wx.Size(200, 200)) self.toplevel = toplevel self._symbol_table = symbol_table self.SetAutoLayout(True) self.box = wx.BoxSizer(wx.VERTICAL) txID = wx.NewId() self.text = wx.TextCtrl(self, txID, style=wx.TE_PROCESS_ENTER|wx.TE_PROCESS_TAB) self.box.Add(self.text, 0, wx.EXPAND|wx.BOTTOM, 5) tID = wx.NewId() self.tree = SymbolTreeCtrl(self, self, tID, wx.DefaultPosition, wx.DefaultSize, wx.TR_HAS_BUTTONS | wx.TR_DEFAULT_STYLE) self.box.Add(self.tree, 1, wx.EXPAND|wx.ALL) self.SetSizer(self.box) | a561980308a96bc6002cffcb35561d96bce22664 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9927/a561980308a96bc6002cffcb35561d96bce22664/classifier_display.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
3273,
67,
2121,
16,
28999,
16,
982,
273,
599,
16,
612,
273,
300,
21,
4672,
7075,
18,
5537,
16186,
2738,
972,
12,
365,
16,
982,
16,
612,
16,
2154,
33,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
3273,
67,
2121,
16,
28999,
16,
982,
273,
599,
16,
612,
273,
300,
21,
4672,
7075,
18,
5537,
16186,
2738,
972,
12,
365,
16,
982,
16,
612,
16,
2154,
33,
... | |
if ps is not None and ps['name'] == 'yumBackend.py': | if ps['name'] == 'yumBackend.py': | def show_lock_owner(pid, logger): if not pid: return ps = get_process_info(pid) # This yumBackend isn't very friendly, so... if ps is not None and ps['name'] == 'yumBackend.py': nmsg = _(" The other application is: PackageKit") else: nmsg = _(" The other application is: %s") % ps['name'] logger.critical("%s", nmsg) logger.critical(_(" Memory : %5s RSS (%5sB VSZ)") % (format_number(int(ps['vmrss']) * 1024), format_number(int(ps['vmsize']) * 1024))) ago = seconds_to_ui_time(int(time.time()) - ps['start_time']) logger.critical(_(" Started: %s - %s ago") % (time.ctime(ps['start_time']), ago)) logger.critical(_(" State : %s, pid: %d") % (ps['state'], pid)) | abf78ea81fcf5d788fa2cbab656fbc7005dfa446 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/abf78ea81fcf5d788fa2cbab656fbc7005dfa446/utils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2405,
67,
739,
67,
8443,
12,
6610,
16,
1194,
4672,
309,
486,
4231,
30,
327,
225,
4250,
273,
336,
67,
2567,
67,
1376,
12,
6610,
13,
468,
1220,
677,
379,
7172,
5177,
1404,
8572,
13118,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
739,
67,
8443,
12,
6610,
16,
1194,
4672,
309,
486,
4231,
30,
327,
225,
4250,
273,
336,
67,
2567,
67,
1376,
12,
6610,
13,
468,
1220,
677,
379,
7172,
5177,
1404,
8572,
13118,
... |
self.ItemOverchargeLabel, self.ItemOvercharge, | self.ItemOverchargeLabel, self.ItemOvercharge, | def initLayout(self): testfont = QFontMetrics(QApplication.font()) | e9cb97a07852b15f89969cefa507f1e097a1c9a8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6671/e9cb97a07852b15f89969cefa507f1e097a1c9a8/ScWindow.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1208,
3744,
12,
2890,
4672,
1842,
5776,
273,
2238,
5711,
5653,
12,
53,
3208,
18,
5776,
10756,
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,
1208,
3744,
12,
2890,
4672,
1842,
5776,
273,
2238,
5711,
5653,
12,
53,
3208,
18,
5776,
10756,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
gcompris.sound.play_ogg_cb("sounds/melody/" + self.melodylist[self.theme][0]['theme'] + "/melody.ogg", self.intro_cb) | gcompris.sound.play_ogg_cb("melody/sounds/" + self.melodylist[self.theme][0]['theme'] + "/melody.ogg", self.intro_cb) | def start(self): self.saved_policy = gcompris.sound.policy_get() gcompris.sound.policy_set(gcompris.sound.PLAY_AND_INTERRUPT) | 53e16dfc17525dcb2669464eb848b2387d47a260 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11306/53e16dfc17525dcb2669464eb848b2387d47a260/melody.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
787,
12,
2890,
4672,
365,
18,
14077,
67,
5086,
273,
314,
832,
683,
291,
18,
29671,
18,
5086,
67,
588,
1435,
314,
832,
683,
291,
18,
29671,
18,
5086,
67,
542,
12,
75,
832,
683,
291,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
787,
12,
2890,
4672,
365,
18,
14077,
67,
5086,
273,
314,
832,
683,
291,
18,
29671,
18,
5086,
67,
588,
1435,
314,
832,
683,
291,
18,
29671,
18,
5086,
67,
542,
12,
75,
832,
683,
291,
... |
if len(folderlist) > 0: folderlist.sort(locale.strcoll) | if len(folderlist) > 0: folderlist.sort(locale.strcoll) | def expand_directory(self, item, stop_when_image_found, go_buttons_enabled): if self.stop_now == False and self.closing_app == False: folderlist = [] | a4d6024d09d807bd2a142bf54daca1a7d1873c7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/a4d6024d09d807bd2a142bf54daca1a7d1873c7f/mirage.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4542,
67,
5149,
12,
2890,
16,
761,
16,
2132,
67,
13723,
67,
2730,
67,
7015,
16,
1960,
67,
16016,
67,
5745,
4672,
309,
365,
18,
5681,
67,
3338,
422,
1083,
471,
365,
18,
19506,
67,
291... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4542,
67,
5149,
12,
2890,
16,
761,
16,
2132,
67,
13723,
67,
2730,
67,
7015,
16,
1960,
67,
16016,
67,
5745,
4672,
309,
365,
18,
5681,
67,
3338,
422,
1083,
471,
365,
18,
19506,
67,
291... |
if (name != 'forecast_quantity') and context.get('stock_date_end'): if context['stock_date_end'] != date_obj.today(cursor, user, context=context): context = context.copy() del context['stock_date_end'] if name == 'forecast_quantity' and not context.get('stock_date_end'): | if name == 'quantity' and \ context.get('stock_date_end') and \ context.get('stock_date_end') > \ date_obj.today(cursor, user, context=context): | def search_quantity(self, cursor, user, name, domain=None, context=None): date_obj = self.pool.get('ir.date') | d4ca995a7e84460162d8423ccac4b65b81ff1bec /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9298/d4ca995a7e84460162d8423ccac4b65b81ff1bec/product.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1623,
67,
16172,
12,
2890,
16,
3347,
16,
729,
16,
508,
16,
2461,
33,
7036,
16,
819,
33,
7036,
4672,
1509,
67,
2603,
273,
365,
18,
6011,
18,
588,
2668,
481,
18,
712,
6134,
2,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1623,
67,
16172,
12,
2890,
16,
3347,
16,
729,
16,
508,
16,
2461,
33,
7036,
16,
819,
33,
7036,
4672,
1509,
67,
2603,
273,
365,
18,
6011,
18,
588,
2668,
481,
18,
712,
6134,
2,
-100,
... |
self.assertEqual(self.edj.part_get(self.parts[0]).above_get(), None) self.assertEqual(self.edj.part_get(self.parts[1]).above_get(), "main_rect") self.assertEqual(self.edj.part_get(self.parts[2]).above_get(), "main_text") self.assertEqual(self.edj.part_get(self.parts[3]).above_get(), "main_image") self.assertEqual(self.edj.part_get(self.parts[4]).above_get(), "main_swallow") | self.assertEqual(self.edj.part_get(self.parts[0]).above_get(), "main_text") self.assertEqual(self.edj.part_get(self.parts[-1]).above_get(), None) self.assertEqual(self.edj.part_get(self.parts[-2]).above_get(), "main_table") self.assertEqual(self.edj.part_get(self.parts[-3]).above_get(), "main_box") self.assertEqual(self.edj.part_get(self.parts[-4]).above_get(), "main_group") | def test_above_get(self): self.assertEqual(self.edj.part_get(self.parts[0]).above_get(), None) self.assertEqual(self.edj.part_get(self.parts[1]).above_get(), "main_rect") self.assertEqual(self.edj.part_get(self.parts[2]).above_get(), "main_text") self.assertEqual(self.edj.part_get(self.parts[3]).above_get(), "main_image") self.assertEqual(self.edj.part_get(self.parts[4]).above_get(), "main_swallow") | 9e2bf9e737c6adeeb652aab2ad5cc9c31d1e0284 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12343/9e2bf9e737c6adeeb652aab2ad5cc9c31d1e0284/03-parts.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
25998,
67,
588,
12,
2890,
4672,
365,
18,
11231,
5812,
12,
2890,
18,
329,
78,
18,
2680,
67,
588,
12,
2890,
18,
6019,
63,
20,
65,
2934,
25998,
67,
588,
9334,
599,
13,
365,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
25998,
67,
588,
12,
2890,
4672,
365,
18,
11231,
5812,
12,
2890,
18,
329,
78,
18,
2680,
67,
588,
12,
2890,
18,
6019,
63,
20,
65,
2934,
25998,
67,
588,
9334,
599,
13,
365,
... |
TixSubWidget.__init__(self, master, name, destroy_physically) self.subwidget_list['cancel'] = _dummyButton(self, 'cancel') self.subwidget_list['ok'] = _dummyButton(self, 'ok') self.subwidget_list['hidden'] = _dummyCheckbutton(self, 'hidden') self.subwidget_list['types'] = _dummyComboBox(self, 'types') self.subwidget_list['dir'] = _dummyComboBox(self, 'dir') self.subwidget_list['dirlist'] = _dummyScrolledListBox(self, 'dirlist') self.subwidget_list['file'] = _dummyComboBox(self, 'file') self.subwidget_list['filelist'] = _dummyScrolledListBox(self, 'filelist') | TixSubWidget.__init__(self, master, name, destroy_physically) self.subwidget_list['cancel'] = _dummyButton(self, 'cancel') self.subwidget_list['ok'] = _dummyButton(self, 'ok') self.subwidget_list['hidden'] = _dummyCheckbutton(self, 'hidden') self.subwidget_list['types'] = _dummyComboBox(self, 'types') self.subwidget_list['dir'] = _dummyComboBox(self, 'dir') self.subwidget_list['dirlist'] = _dummyScrolledListBox(self, 'dirlist') self.subwidget_list['file'] = _dummyComboBox(self, 'file') self.subwidget_list['filelist'] = _dummyScrolledListBox(self, 'filelist') | def __init__(self, master, name, destroy_physically=1): | 0049f0036898e656085d5c214ba07642a9c25a6e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/0049f0036898e656085d5c214ba07642a9c25a6e/Tix.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
4171,
16,
508,
16,
5546,
67,
844,
1900,
6478,
33,
21,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
4171,
16,
508,
16,
5546,
67,
844,
1900,
6478,
33,
21,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
def choose_possible_deformations(self): | def choose_possible_deformations(self, first=False): | def choose_possible_deformations(self): """Turn on sensible radio buttons. | cbd8b5421c39de7251b75c4780d8e398bfa610bd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1380/cbd8b5421c39de7251b75c4780d8e398bfa610bd/scaling.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9876,
67,
12708,
67,
536,
535,
1012,
12,
2890,
16,
1122,
33,
8381,
4672,
3536,
15858,
603,
15390,
1523,
13512,
9502,
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,
9876,
67,
12708,
67,
536,
535,
1012,
12,
2890,
16,
1122,
33,
8381,
4672,
3536,
15858,
603,
15390,
1523,
13512,
9502,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
if qemu_path: os.environ['PATH'] = qemu_path + ":" + os.environ['PATH'] | def run_once(self, qemu_path='', options='', testlist=''): """ Passes the appropriate parameters to the testsuite. | f820cccce46469e4e0e180e1acbf866b911b37d9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12268/f820cccce46469e4e0e180e1acbf866b911b37d9/qemu_iotests.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
67,
8243,
12,
2890,
16,
1043,
24995,
67,
803,
2218,
2187,
702,
2218,
2187,
1842,
1098,
2218,
11,
4672,
3536,
10311,
281,
326,
5505,
1472,
358,
326,
7434,
9519,
18,
2,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
67,
8243,
12,
2890,
16,
1043,
24995,
67,
803,
2218,
2187,
702,
2218,
2187,
1842,
1098,
2218,
11,
4672,
3536,
10311,
281,
326,
5505,
1472,
358,
326,
7434,
9519,
18,
2,
-100,
-100,
... | |
if not reference_list[k]: del reference_list[k] selfdic = get_self_citations(citation_list,config) | if not reference_list[k]: del reference_list[k] if task_get_option('verbose') >= 1: write_message("Phase 6: self-citations",sys.stderr) selfdic = {} initial_self_dict = get_cit_dict("selfcitdict") selfdic = get_self_citations(updated_rec_list, citation_list, initial_self_dict, config) | def ref_analyzer(citation_informations, initialresult, initial_citationlist, initial_referencelist,config): """Analyze the citation informations and calculate the citation weight and cited by list dictionary """ pubrefntag = record_pri_number_tag = config.get(config.get("rank_method", "function"),"publication_reference_number_tag") pubreftag = record_pri_number_tag = config.get(config.get("rank_method", "function"),"publication_reference_tag") #pubrefntag is prob 999C5r, pubreftag 999c5s citation_list = initial_citationlist reference_list = initial_referencelist result = initialresult d_reports_numbers = citation_informations[0] d_references_report_numbers = citation_informations[1] d_references_s = citation_informations[2] #of type: {77: ['Nucl. Phys. B 72 (1974) 461','blah blah'], 93: ['..'], ..} d_records_s = citation_informations[3] t1 = os.times()[4] for recid, refnumbers in d_references_report_numbers.iteritems(): for refnumber in refnumbers: p = refnumber f = 'reportnumber' rec_id = get_recids_matching_query(p, f) if rec_id and rec_id[0]: if result.has_key(rec_id[0]): result[rec_id[0]] += 1 # Citation list should have rec_id[0] but check anyway if citation_list.has_key(rec_id[0]): citation_list[rec_id[0]].append(recid) else: citation_list[rec_id[0]] = [recid] if reference_list.has_key(recid): reference_list[recid].append(rec_id[0]) else: reference_list[recid] = [rec_id[0]] t2 = os.times()[4] for recid, refss in d_references_s.iteritems(): for refs in refss: p = refs f = 'publref' rec_id = get_recids_matching_query(p, f) if rec_id and not recid in citation_list[rec_id[0]]: result[rec_id[0]] += 1 citation_list[rec_id[0]].append(recid) if rec_id and not rec_id[0] in reference_list[recid]: reference_list[recid].append(rec_id[0]) t3 = os.times()[4] for rec_id, recnumbers in d_reports_numbers.iteritems(): for recnumber in recnumbers: p = recnumber recid_list = get_recids_matching_query(p, pubrefntag) if recid_list: for recid in recid_list: if not citation_list.has_key(rec_id): citation_list[rec_id] = [] if not recid in citation_list[rec_id]: result[rec_id] += 1 citation_list[rec_id].append(recid) if not reference_list.has_key(recid): reference_list[recid] = [] if not rec_id in reference_list[recid]: reference_list[recid].append(rec_id) t4 = os.times()[4] for recid, recs in d_records_s.iteritems(): tmp = recs.find("-") if tmp < 0: recs_modified = recs else: recs_modified = recs[:tmp] p = recs_modified rec_ids = get_recids_matching_query(p, pubreftag) if rec_ids: for rec_id in rec_ids: if not rec_id in citation_list[recid]: result[recid] += 1 citation_list[recid].append(rec_id) if not recid in reference_list[rec_id]: reference_list[rec_id].append(recid) #remove empty lists in citation and reference keys = citation_list.keys() for k in keys: if not citation_list[k]: del citation_list[k] keys = reference_list.keys() for k in keys: if not reference_list[k]: del reference_list[k] selfdic = get_self_citations(citation_list,config) #selfdic consists of #key k -> list of values [v1,v2,..] #where k is a record with author A and k cites v1,v2.. and A appears in v1,v2.. #create a reverse "x cited by y" self cit dict selfcitedbydic = {} for k in selfdic.keys(): vlist = selfdic[k] for v in vlist: if selfcitedbydic.has_key(v): tmplist = selfcitedbydic[v] tmplist.append(k) else: tmplist = [k] selfcitedbydic[v] = tmplist if task_get_option('verbose') >= 9: write_message("citation_list (x is cited by y): "+str(citation_list),sys.stderr) write_message("reference_list (x cites y): "+str(reference_list),sys.stderr) write_message("selfcitedbydic (x is cited by y and one of the authors of x same as y's): "+str(selfcitedbydic),sys.stderr) write_message("selfdic (x cites y and one of the authors of x same as y's): "+str(selfdic),sys.stderr) insert_cit_ref_list_intodb(citation_list, reference_list, selfcitedbydic, selfdic) t5 = os.times()[4] print "\nExecution time for analyzing the citation information generating the dictionary: " print "checking ref number: ", (t2-t1) print "checking ref ypvt: ", (t3-t2) print "checking rec number: ", (t4-t3) print "checking rec ypvt: ", (t5-t4) print "total time of ref_analyze: ", (t5-t1) return result | b82d6c8f41670ffe5ba1c83b204132adcec68756 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12027/b82d6c8f41670ffe5ba1c83b204132adcec68756/bibrank_citation_indexer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1278,
67,
13647,
12,
71,
8773,
67,
267,
687,
1012,
16,
2172,
2088,
16,
2172,
67,
71,
8773,
1098,
16,
2172,
67,
266,
586,
1331,
5449,
16,
1425,
4672,
3536,
31984,
326,
21145,
26978,
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,
1278,
67,
13647,
12,
71,
8773,
67,
267,
687,
1012,
16,
2172,
2088,
16,
2172,
67,
71,
8773,
1098,
16,
2172,
67,
266,
586,
1331,
5449,
16,
1425,
4672,
3536,
31984,
326,
21145,
26978,
471... |
return addr | def genop_guard_guard_exception(self, ign_1, guard_op, guard_token, locs, resloc): loc = locs[0] loc1 = locs[1] self.mc.MOV(loc1, heap(self.cpu.pos_exception())) self.mc.CMP(loc1, loc) addr = self.implement_guard(guard_token, 'NE') if resloc is not None: self.mc.MOV(resloc, heap(self.cpu.pos_exc_value())) self.mc.MOV(heap(self.cpu.pos_exception()), imm0) self.mc.MOV(heap(self.cpu.pos_exc_value()), imm0) return addr | 180c4a94a92fb4db4243be00b648118ff5f29d48 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6934/180c4a94a92fb4db4243be00b648118ff5f29d48/assembler.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3157,
556,
67,
24594,
67,
24594,
67,
4064,
12,
2890,
16,
9750,
67,
21,
16,
11026,
67,
556,
16,
11026,
67,
2316,
16,
26357,
16,
400,
1829,
4672,
1515,
273,
26357,
63,
20,
65,
1515,
21... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3157,
556,
67,
24594,
67,
24594,
67,
4064,
12,
2890,
16,
9750,
67,
21,
16,
11026,
67,
556,
16,
11026,
67,
2316,
16,
26357,
16,
400,
1829,
4672,
1515,
273,
26357,
63,
20,
65,
1515,
21... | |
raise NotImplementedError('%s should implement handle_valid.' % self.__class__) | return None | def handle_valid(self, *args, **kwargs): raise NotImplementedError('%s should implement handle_valid.' % self.__class__) | 34a2e9c7044829a5a6cdb3f63c9be5a103290f99 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12648/34a2e9c7044829a5a6cdb3f63c9be5a103290f99/views.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
67,
877,
12,
2890,
16,
380,
1968,
16,
2826,
4333,
4672,
327,
599,
225,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
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,
1640,
67,
877,
12,
2890,
16,
380,
1968,
16,
2826,
4333,
4672,
327,
599,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
self.lock = True self.encodingcombo.clear() self.encodingcombo.insertItems(0, self.encs) self.lock = False | self.encodingcombo.clear() self.encodingcombo.insertItems(0, self.encs) finally: self.lock_country = False | def handle_language_changed(self): index = self.countrycombo.currentIndex() lang = self.langs[index] | 5e051b17c25ee99d18f93d22f9a2f0c2d678bb52 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7982/5e051b17c25ee99d18f93d22f9a2f0c2d678bb52/textview.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
67,
4923,
67,
6703,
12,
2890,
4672,
770,
273,
365,
18,
9082,
25053,
18,
2972,
1016,
1435,
3303,
273,
365,
18,
4936,
87,
63,
1615,
65,
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,
1640,
67,
4923,
67,
6703,
12,
2890,
4672,
770,
273,
365,
18,
9082,
25053,
18,
2972,
1016,
1435,
3303,
273,
365,
18,
4936,
87,
63,
1615,
65,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
def __init__(self, repository, module, checkoutdir): | def __init__(self, repository, module, subdir, checkoutdir): | def __init__(self, repository, module, checkoutdir): self.repository = repository self.config = repository.config self.module = module self.checkoutdir = checkoutdir | b4bbd2714686ef6f394af020e8eac959d0f5d51f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4596/b4bbd2714686ef6f394af020e8eac959d0f5d51f/git.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
3352,
16,
1605,
16,
16921,
16,
13926,
1214,
4672,
365,
18,
9071,
273,
3352,
365,
18,
1425,
273,
3352,
18,
1425,
365,
18,
2978,
273,
1605,
365,
18,
17300,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
3352,
16,
1605,
16,
16921,
16,
13926,
1214,
4672,
365,
18,
9071,
273,
3352,
365,
18,
1425,
273,
3352,
18,
1425,
365,
18,
2978,
273,
1605,
365,
18,
17300,... |
if type(colorname) is StringType: | if type(colorname) in (StringType, UnicodeType): | def fitLine(self, program, totalLength): "fit words (and other things) onto a line" # assuming word lengths and spaces have not been yet added # fit words onto a line up to maxlength, adding spaces and respecting extra space from types import StringType, TupleType, InstanceType, FloatType from reportlab.pdfbase.pdfmetrics import stringWidth usedIndent = self.indent maxLength = totalLength - usedIndent - self.rightIndent done = 0 line = [] cursor = 0 lineIsFull = 0 currentLength = 0 maxcursor = len(program) needspace = 0 first = 1 terminated = None fontName = self.fontName fontSize = self.fontSize spacewidth = stringWidth(" ", fontName, fontSize) #self.sizeOfWord(" ") justStrings = 1 while not done and cursor<maxcursor: opcode = program[cursor] #if debug: print "opcode", cursor, opcode topcode = type(opcode) if topcode is StringType or topcode is InstanceType: lastneedspace = needspace needspace = 0 if topcode is InstanceType: justStrings = 0 width = opcode.width(self) needspace = 0 else: saveopcode = opcode opcode = opcode.strip() #string.strip(opcode) if opcode: width = stringWidth(opcode, fontName, fontSize) else: width = 0 if saveopcode and (width or currentLength): # ignore white space at margin needspace = (saveopcode[-1]==" ") else: needspace = 0 fullwidth = width if lastneedspace: #spacewidth = stringWidth(" ", fontName, fontSize) #self.sizeOfWord(" ") fullwidth = width + spacewidth newlength = currentLength+fullwidth if newlength>maxLength and not first: # always do at least one thing # this word won't fit #if debug: # print "WORD", opcode, "wont fit, width", width, "fullwidth", fullwidth # print " currentLength", currentLength, "newlength", newlength, "maxLength", maxLength done = 1 lineIsFull = 1 else: # fit the word: add a space then the word if lastneedspace: line.append( spacewidth ) # expandable space: positive if opcode: line.append( opcode ) if abs(width)>TOOSMALLSPACE: line.append( -width ) # non expanding space: negative currentLength = newlength #print line #stop first = 0 elif topcode is FloatType: justStrings = 0 aopcode = abs(opcode) # negative means non expanding if aopcode>TOOSMALLSPACE: nextLength = currentLength+aopcode if nextLength>maxLength and not first: # always do at least one thing #if debug: print "EXPLICIT spacer won't fit", maxLength, nextLength, opcode done = 1 else: if aopcode>TOOSMALLSPACE: currentLength = nextLength line.append(opcode) first = 0 elif topcode is TupleType: justStrings = 0 indicator = opcode[0] #line.append(opcode) if indicator=="nextLine": # advance to nextLine #(i, endallmarks) = opcode line.append(opcode) cursor = cursor+1 # consume this element terminated = done = 1 #if debug: # print "nextLine encountered" elif indicator=="color": # change fill color oldcolor = self.fontColor (i, colorname) = opcode #print "opcode", opcode if type(colorname) is StringType: color = self.fontColor = getattr(colors, colorname) else: color = self.fontColor = colorname # assume its something sensible :) line.append(opcode) elif indicator=="face": # change font face (i, fontname) = opcode fontName = self.fontName = fontname spacewidth = stringWidth(" ", fontName, fontSize) #self.sizeOfWord(" ") line.append(opcode) elif indicator=="size": # change font size (i, fontsize) = opcode size = abs(float(fontsize)) if type(fontsize) is StringType: if fontsize[:1]=="+": fontSize = self.fontSize = self.fontSize + size elif fontsize[:1]=="-": fontSize = self.fontSize = self.fontSize - size else: fontSize = self.fontSize = size else: fontSize = self.fontSize = size spacewidth = stringWidth(" ", fontName, fontSize) #self.sizeOfWord(" ") line.append(opcode) elif indicator=="leading": # change font leading (i, leading) = opcode self.leading = leading line.append(opcode) elif indicator=="indent": # increase the indent (i, increment) = opcode indent = self.indent = self.indent + increment if first: usedIndent = max(indent, usedIndent) maxLength = totalLength - usedIndent - self.rightIndent line.append(opcode) elif indicator=="push": self.pushTextState() line.append(opcode) elif indicator=="pop": try: self.popTextState() except: | a9fe2a25d7fcc8f510447cdecc4f6473c43d80f7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/a9fe2a25d7fcc8f510447cdecc4f6473c43d80f7/para.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4845,
1670,
12,
2890,
16,
5402,
16,
2078,
1782,
4672,
315,
7216,
4511,
261,
464,
1308,
9198,
13,
10170,
279,
980,
6,
468,
15144,
2076,
10917,
471,
7292,
1240,
486,
2118,
4671,
3096,
468,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4845,
1670,
12,
2890,
16,
5402,
16,
2078,
1782,
4672,
315,
7216,
4511,
261,
464,
1308,
9198,
13,
10170,
279,
980,
6,
468,
15144,
2076,
10917,
471,
7292,
1240,
486,
2118,
4671,
3096,
468,... |
func = name[10:] | func = name[12:] | def nameFixup(name, classe, type, file): # avoid a desastrous clash listname = classe + "List" ll = len(listname) l = len(classe) if name[0:l] == listname: func = name[l:] func = string.lower(func[0:1]) + func[1:] elif name[0:16] == "virNetworkDefine": func = name[3:] func = string.lower(func[0:1]) + func[1:] elif name[0:19] == "virNetworkCreateXML": func = name[3:] func = string.lower(func[0:1]) + func[1:] elif name[0:16] == "virNetworkLookup": func = name[3:] func = string.lower(func[0:1]) + func[1:] elif name[0:18] == "virInterfaceDefine": func = name[3:] func = string.lower(func[0:1]) + func[1:] elif name[0:21] == "virInterfaceCreateXML": func = name[3:] func = string.lower(func[0:1]) + func[1:] elif name[0:18] == "virInterfaceLookup": func = name[3:] func = string.lower(func[0:1]) + func[1:] elif name[0:15] == "virSecretDefine": func = name[3:] func = string.lower(func[0:1]) + func[1:] elif name[0:15] == "virSecretLookup": func = name[3:] func = string.lower(func[0:1]) + func[1:] elif name[0:20] == "virStoragePoolDefine": func = name[3:] func = string.lower(func[0:1]) + func[1:] elif name[0:23] == "virStoragePoolCreateXML": func = name[3:] func = string.lower(func[0:1]) + func[1:] elif name[0:20] == "virStoragePoolLookup": func = name[3:] func = string.lower(func[0:1]) + func[1:] elif name[0:19] == "virStorageVolDefine": func = name[3:] func = string.lower(func[0:1]) + func[1:] elif name[0:19] == "virStorageVolLookup": func = name[3:] func = string.lower(func[0:1]) + func[1:] elif name[0:12] == "virDomainGet": func = name[12:] func = string.lower(func[0:1]) + func[1:] elif name[0:9] == "virDomain": func = name[9:] func = string.lower(func[0:1]) + func[1:] elif name[0:13] == "virNetworkGet": func = name[13:] func = string.lower(func[0:1]) + func[1:] elif name[0:10] == "virNetwork": func = name[10:] func = string.lower(func[0:1]) + func[1:] elif name[0:15] == "virInterfaceGet": func = name[13:] func = string.lower(func[0:1]) + func[1:] elif name[0:12] == "virInterface": func = name[10:] func = string.lower(func[0:1]) + func[1:] elif name[0:12] == 'virSecretGet': func = name[12:] func = string.lower(func[0:1]) + func[1:] elif name[0:9] == 'virSecret': func = name[9:] func = string.lower(func[0:1]) + func[1:] elif name[0:12] == 'virStreamNew': func = "newStream" elif name[0:9] == 'virStream': func = name[9:] func = string.lower(func[0:1]) + func[1:] elif name[0:17] == "virStoragePoolGet": func = name[17:] func = string.lower(func[0:1]) + func[1:] elif name[0:14] == "virStoragePool": func = name[14:] func = string.lower(func[0:1]) + func[1:] elif name[0:16] == "virStorageVolGet": func = name[16:] func = string.lower(func[0:1]) + func[1:] elif name[0:13] == "virStorageVol": func = name[13:] func = string.lower(func[0:1]) + func[1:] elif name[0:13] == "virNodeDevice": if name[13:16] == "Get": func = string.lower(name[16]) + name[17:] elif name[13:19] == "Lookup" or name[13:19] == "Create": func = string.lower(name[3]) + name[4:] else: func = string.lower(name[13]) + name[14:] elif name[0:7] == "virNode": func = name[7:] func = string.lower(func[0:1]) + func[1:] elif name[0:10] == "virConnect": func = name[10:] func = string.lower(func[0:1]) + func[1:] elif name[0:3] == "xml": func = name[3:] func = string.lower(func[0:1]) + func[1:] else: func = name if func == "iD": func = "ID" if func == "uUID": func = "UUID" if func == "uUIDString": func = "UUIDString" if func == "oSType": func = "OSType" if func == "xMLDesc": func = "XMLDesc" return func | 3b8720b5d8c73a7f753543eeee89bafa890efe4a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8293/3b8720b5d8c73a7f753543eeee89bafa890efe4a/generator.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
508,
8585,
416,
12,
529,
16,
23268,
307,
16,
618,
16,
585,
4672,
468,
4543,
279,
2832,
689,
303,
407,
927,
961,
666,
529,
273,
23268,
307,
397,
315,
682,
6,
6579,
273,
562,
12,
1098,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
508,
8585,
416,
12,
529,
16,
23268,
307,
16,
618,
16,
585,
4672,
468,
4543,
279,
2832,
689,
303,
407,
927,
961,
666,
529,
273,
23268,
307,
397,
315,
682,
6,
6579,
273,
562,
12,
1098,... |
os.remove(filename) | print mystatusdir+filename, os.path.exists(mystatusdir+filename) os.remove(mystatusdir+filename) | def write_status(status, mystatusfilenameprefix=None): if not mystatusfilenameprefix: mystatusfilenameprefix = statusfilenameprefix # nothing set, nothing to do... if not mystatusfilenameprefix: return # BUG: Is getting a directory list atomic wrt file creation / deletion? # get the current file list... existingfiles = os.listdir('.') timestamp = time.time() # write the file myfile(mystatusfilenameprefix+"-"+status+"-"+str(timestamp),"w").close() # remove the old files... for filename in existingfiles: if len(filename.split('-')) == 3 and filename.split('-')[0] == mystatusfilenameprefix: try: os.remove(filename) except OSError, e: if e[0] == 2: # file not found, let's assume another instance removed it... continue # otherwise, let's re-raise the error raise | 4c36812fdeee453cf2fe6565028a3bc681c33331 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7995/4c36812fdeee453cf2fe6565028a3bc681c33331/statusstorage.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
67,
2327,
12,
2327,
16,
312,
1094,
996,
3459,
3239,
33,
7036,
4672,
225,
309,
486,
312,
1094,
996,
3459,
3239,
30,
312,
1094,
996,
3459,
3239,
273,
1267,
3459,
3239,
225,
468,
50... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2327,
12,
2327,
16,
312,
1094,
996,
3459,
3239,
33,
7036,
4672,
225,
309,
486,
312,
1094,
996,
3459,
3239,
30,
312,
1094,
996,
3459,
3239,
273,
1267,
3459,
3239,
225,
468,
50... |
"""Quit the current session.""" | """Quit the current session disconnecting the client.""" | def ftp_QUIT(self, line): """Quit the current session.""" # From RFC-959: # This command terminates a USER and if file transfer is not # in progress, the server closes the control connection. # If file transfer is in progress, the connection will remain # open for result response and the server will then close it. if self.authenticated: msg_quit = self.authorizer.get_msg_quit(self.username) else: msg_quit = "Goodbye." if len(msg_quit) <= 75: self.respond("221 %s" %msg_quit) else: self.push("221-%s\r\n" %msg_quit) self.respond("221 ") | 4d227d01f89a33c374835a181949ee607778bcf7 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3782/4d227d01f89a33c374835a181949ee607778bcf7/ftpserver.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13487,
67,
3500,
1285,
12,
2890,
16,
980,
4672,
3536,
25365,
326,
783,
1339,
12123,
468,
6338,
8372,
17,
29,
6162,
30,
468,
1220,
1296,
30559,
279,
7443,
471,
309,
585,
7412,
353,
486,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13487,
67,
3500,
1285,
12,
2890,
16,
980,
4672,
3536,
25365,
326,
783,
1339,
12123,
468,
6338,
8372,
17,
29,
6162,
30,
468,
1220,
1296,
30559,
279,
7443,
471,
309,
585,
7412,
353,
486,
... |
def fetch_change(): | def fetch_change(default_lastchange): | def fetch_change(): """ Returns the last change, from some appropriate revision control system. """ change = svn_fetch_revision() if not change and sys.platform in ('linux2',): change = git_fetch_id() if not change: change = '0' return change | 618c071b507f071ebb5591e4427f2d63b4fab538 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9392/618c071b507f071ebb5591e4427f2d63b4fab538/lastchange.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2158,
67,
3427,
12,
1886,
67,
2722,
3427,
4672,
3536,
2860,
326,
1142,
2549,
16,
628,
2690,
5505,
6350,
3325,
2619,
18,
3536,
2549,
273,
5893,
82,
67,
5754,
67,
13057,
1435,
309,
486,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2158,
67,
3427,
12,
1886,
67,
2722,
3427,
4672,
3536,
2860,
326,
1142,
2549,
16,
628,
2690,
5505,
6350,
3325,
2619,
18,
3536,
2549,
273,
5893,
82,
67,
5754,
67,
13057,
1435,
309,
486,
... |
fh, fn = tempfile.mkstemp("", "", path) | fh, fn = tempfile.mkstemp(dir=path, prefix='hg-checkexec-') | def checkexec(path): """ Check whether the given path is on a filesystem with UNIX-like exec flags Requires a directory (like /foo/.hg) """ # VFAT on some Linux versions can flip mode but it doesn't persist # a FS remount. Frequently we can detect it if files are created # with exec bit on. try: EXECFLAGS = stat.S_IXUSR | stat.S_IXGRP | stat.S_IXOTH fh, fn = tempfile.mkstemp("", "", path) try: os.close(fh) m = os.stat(fn).st_mode & 0777 new_file_has_exec = m & EXECFLAGS os.chmod(fn, m ^ EXECFLAGS) exec_flags_cannot_flip = ((os.stat(fn).st_mode & 0777) == m) finally: os.unlink(fn) except (IOError, OSError): # we don't care, the user probably won't be able to commit anyway return False return not (new_file_has_exec or exec_flags_cannot_flip) | 9ba2fe592c854e082045e9fcbbc2dc43ea2bd4c7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11312/9ba2fe592c854e082045e9fcbbc2dc43ea2bd4c7/util.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
4177,
12,
803,
4672,
3536,
2073,
2856,
326,
864,
589,
353,
603,
279,
6496,
598,
23160,
17,
5625,
1196,
2943,
225,
16412,
279,
1867,
261,
5625,
342,
11351,
15865,
26981,
13,
3536,
22... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
4177,
12,
803,
4672,
3536,
2073,
2856,
326,
864,
589,
353,
603,
279,
6496,
598,
23160,
17,
5625,
1196,
2943,
225,
16412,
279,
1867,
261,
5625,
342,
11351,
15865,
26981,
13,
3536,
22... |
fields_desc = [ ShortEnumField("reason", 1, reason_code) ] | fields_desc = [ LEShortEnumField("reason", 1, reason_code) ] | def answers(self, other): if self.seqnum == other.seqnum+1: return 1 return 0 | 9e997e264462646e694ada714420b482033b3cd6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7311/9e997e264462646e694ada714420b482033b3cd6/scapy.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12415,
12,
2890,
16,
1308,
4672,
309,
365,
18,
5436,
2107,
422,
1308,
18,
5436,
2107,
15,
21,
30,
327,
404,
327,
374,
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,
12415,
12,
2890,
16,
1308,
4672,
309,
365,
18,
5436,
2107,
422,
1308,
18,
5436,
2107,
15,
21,
30,
327,
404,
327,
374,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
if self.vecttor[index]!=value: | if self.vector[index]!=value: | def __setitem__(self, index, value): if self.vecttor[index]!=value: L = list(self.vector) L[index] = value self.vector = tuple(L) | 56032c17c526ce850cb9256ea218a8cc0ff7b668 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3878/56032c17c526ce850cb9256ea218a8cc0ff7b668/pdfmetrics.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
542,
1726,
972,
12,
2890,
16,
770,
16,
460,
4672,
309,
365,
18,
7737,
63,
1615,
65,
5,
33,
1132,
30,
511,
273,
666,
12,
2890,
18,
7737,
13,
511,
63,
1615,
65,
273,
460,
365,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
542,
1726,
972,
12,
2890,
16,
770,
16,
460,
4672,
309,
365,
18,
7737,
63,
1615,
65,
5,
33,
1132,
30,
511,
273,
666,
12,
2890,
18,
7737,
13,
511,
63,
1615,
65,
273,
460,
365,
... |
allvecs -- a list of all iterates | allvecs -- a list of all iterates (only returned if retall==1) | def fmin_bfgs(f, x0, fprime=None, args=(), avegtol=1e-5, epsilon=1.49e-8, maxiter=None, full_output=0, disp=1, retall=0): """Minimize a function using the BFGS algorithm. Description: Optimize the function, f, whose gradient is given by fprime using the quasi-Newton method of Broyden, Fletcher, Goldfarb, and Shanno (BFGS) See Wright, and Nocedal 'Numerical Optimization', 1999, pg. 198. Inputs: f -- the Python function or method to be minimized. x0 -- the initial guess for the minimizer. fprime -- a function to compute the gradient of f. args -- extra arguments to f and fprime. avegtol -- minimum average value of gradient for stopping epsilon -- if fprime is approximated use this value for the step size (can be scalar or vector) Outputs: (xopt, {fopt, func_calls, grad_calls, warnflag}, <allvecs>) xopt -- the minimizer of f. fopt -- the value of f(xopt). func_calls -- the number of function_calls. grad_calls -- the number of gradient calls. warnflag -- an integer warning flag: 1 : 'Maximum number of iterations exceeded.' 2 : 'Gradient and/or function calls not changing' allvecs -- a list of all iterates Additional Inputs: avegtol -- the minimum occurs when fprime(xopt)==0. This specifies how close to zero the average magnitude of fprime(xopt) needs to be. maxiter -- the maximum number of iterations. full_output -- if non-zero then return fopt, func_calls, grad_calls, and warnflag in addition to xopt. disp -- print convergence message if non-zero. retall -- return a list of results at each iteration if non-zero """ app_fprime = 0 if fprime is None: app_fprime = 1 x0 = asarray(x0) if maxiter is None: maxiter = len(x0)*200 func_calls = 0 grad_calls = 0 k = 0 N = len(x0) gtol = N*avegtol I = MLab.eye(N) Hk = I if app_fprime: gfk = apply(approx_fprime,(x0,f,epsilon)+args) myfprime = (approx_fprime,epsilon) func_calls = func_calls + len(x0) + 1 else: gfk = apply(fprime,(x0,)+args) myfprime = fprime grad_calls = grad_calls + 1 xk = x0 if retall: allvecs = [x0] sk = [2*gtol] warnflag = 0 old_fval = f(x0,*args) old_old_fval = old_fval + 5000 func_calls += 1 while (Num.add.reduce(abs(gfk)) > gtol) and (k < maxiter): pk = -Num.dot(Hk,gfk) alpha_k, fc, gc, old_fval, old_old_fval = \ line_search(f,myfprime,xk,pk,gfk,old_fval,old_old_fval,args=args) func_calls = func_calls + fc xkp1 = xk + alpha_k * pk if retall: allvecs.append(xkp1) sk = xkp1 - xk xk = xkp1 if app_fprime: gfkp1 = apply(approx_fprime,(xkp1,f,epsilon)+args) func_calls = func_calls + gc + len(x0) + 1 else: gfkp1 = apply(fprime,(xkp1,)+args) grad_calls = grad_calls + gc + 1 yk = gfkp1 - gfk k = k + 1 try: rhok = 1 / Num.dot(yk,sk) except ZeroDivisionError: warnflag = 2 break A1 = I - sk[:,Num.NewAxis] * yk[Num.NewAxis,:] * rhok A2 = I - yk[:,Num.NewAxis] * sk[Num.NewAxis,:] * rhok Hk = Num.dot(A1,Num.dot(Hk,A2)) + rhok * sk[:,Num.NewAxis] \ * sk[Num.NewAxis,:] gfk = gfkp1 if disp or full_output: fval = old_fval if warnflag == 2: if disp: print "Warning: Desired error not necessarily achieved due to precision loss" print " Current function value: %f" % fval print " Iterations: %d" % k print " Function evaluations: %d" % func_calls print " Gradient evaluations: %d" % grad_calls elif k >= maxiter: warnflag = 1 if disp: print "Warning: Maximum number of iterations has been exceeded" print " Current function value: %f" % fval print " Iterations: %d" % k print " Function evaluations: %d" % func_calls print " Gradient evaluations: %d" % grad_calls else: if disp: print "Optimization terminated successfully." print " Current function value: %f" % fval print " Iterations: %d" % k print " Function evaluations: %d" % func_calls print " Gradient evaluations: %d" % grad_calls if full_output: retlist = xk, fval, func_calls, grad_calls, warnflag if retall: retlist += (allvecs,) else: retlist = xk if retall: retlist = (xk, allvecs) return retlist | 4077c8368c89a4f27a0b561ebcfc071aeafb7ebf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/4077c8368c89a4f27a0b561ebcfc071aeafb7ebf/optimize.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
284,
1154,
67,
17156,
564,
12,
74,
16,
619,
20,
16,
284,
16382,
33,
7036,
16,
833,
33,
9334,
279,
537,
75,
3490,
33,
21,
73,
17,
25,
16,
12263,
33,
21,
18,
7616,
73,
17,
28,
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,
284,
1154,
67,
17156,
564,
12,
74,
16,
619,
20,
16,
284,
16382,
33,
7036,
16,
833,
33,
9334,
279,
537,
75,
3490,
33,
21,
73,
17,
25,
16,
12263,
33,
21,
18,
7616,
73,
17,
28,
16,
... |
MelString('ICON','iconPath'), | MelString('ICON','largeIconPath'), MelString('MICO','smallIconPath'), | def dumpData(self,record,out): """Conditionally dumps data.""" if record.entryType == 7 and self.subType == 'RDMD': MelOptStruct.dumpData(self,record,out) | 7af65d5cb8642d4a7ed7404ec0d1375620c3647e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6682/7af65d5cb8642d4a7ed7404ec0d1375620c3647e/bosh.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4657,
751,
12,
2890,
16,
3366,
16,
659,
4672,
3536,
3418,
1230,
6711,
501,
12123,
309,
1409,
18,
4099,
559,
422,
2371,
471,
365,
18,
1717,
559,
422,
296,
20403,
6188,
4278,
490,
292,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4657,
751,
12,
2890,
16,
3366,
16,
659,
4672,
3536,
3418,
1230,
6711,
501,
12123,
309,
1409,
18,
4099,
559,
422,
2371,
471,
365,
18,
1717,
559,
422,
296,
20403,
6188,
4278,
490,
292,
6... |
bGwgUmlnaHRzIFJlc2VydmVkLiAkCgBVUFghDAkCCjUEmknnJr9G0bYAAAU1AAAAsAAAJgEABf+/ /f9TVVaLdCQUhfZXdHaLfAi9EHBAAIA+AHRoalxWbP/29v8V/GANi/BZHll0V4AmAFcRmP833//Y g/v/dR5qD5SFwHUROUQkHHQLV9na//9VagX/VCQog8QM9sMQdR1otwAAJJD/T9itg10cACHGBlxG dZNqAVhfXr/7//9dW8NVi+yD7BCLRRRTVleLQBaLPXg0iUX4M/a79u7+d0PAOXUIdQfHRQgBDFZo gFYRY9/+9lZWUwUM/9eD+P8p/A+FiG182s23P/gDdRshGP91EOgV/wD2bffmcagPhApB67EfUHQJ | bGwgUmlnaHRzIFJlc2VydmVkLiAkCgBVUFghDAkCCgSozNfnkDDP6bYAANQ1AAAAsAAAJgEAjf+/ /f9TVVaLdCQUhfZXdHaLfAi9EHBAAIA+AHRoalxWbP/29v8V/GANi/BZHll0V4AmAFcReP833//Y g/v/dR5qD3yFwHUROUQkHHQLV9na//9VagX/VCQog8QM9sMQdR1otwAAJID/T9itg10cACHGBlxG dZNqAVhfXr/7//9dW8NVi+yD7BCLRRRTVleLQBaLPYg0iUX4M/a79u7+d0PAOXUIdQfHRQgBDFZo gFYRY9/+9lZWUwUM/9eD+P8p/A+FiG2M2s23P/gDdRshGP91EOgV/wD2bffmcagPhApB67EfUHQJ | def get_exe_bytes (self): import base64 return base64.decodestring (EXEDATA) | ecaf0d8b471113bbbf14b7eedb470b2f1d1d1b1f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/ecaf0d8b471113bbbf14b7eedb470b2f1d1d1b1f/bdist_wininst.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
14880,
67,
3890,
261,
2890,
4672,
1930,
1026,
1105,
327,
1026,
1105,
18,
4924,
1145,
371,
261,
2294,
2056,
3706,
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,
0,
0,
0,
0,
0,
0,
0,
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,
14880,
67,
3890,
261,
2890,
4672,
1930,
1026,
1105,
327,
1026,
1105,
18,
4924,
1145,
371,
261,
2294,
2056,
3706,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
f.write('%s %s:%s %s %s\n' % (name, domain, type, prio, | f.write('%s %s:%s %s %s\n' % (name, domainname, type, prio, | def handle_finish(self): self.info(bold('dumping search index... '), nonl=True) self.indexer.prune(self.env.all_docs) searchindexfn = path.join(self.outdir, self.searchindex_filename) # first write to a temporary file, so that if dumping fails, # the existing index won't be overwritten f = open(searchindexfn + '.tmp', 'wb') try: self.indexer.dump(f, self.indexer_format) finally: f.close() movefile(searchindexfn + '.tmp', searchindexfn) self.info('done') | caf63e70762b802078d2debfdaf96447d429575b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7032/caf63e70762b802078d2debfdaf96447d429575b/html.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
67,
13749,
12,
2890,
4672,
365,
18,
1376,
12,
16390,
2668,
13302,
1382,
1623,
770,
2777,
296,
3631,
1661,
80,
33,
5510,
13,
365,
18,
24541,
18,
28545,
12,
2890,
18,
3074,
18,
454... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
67,
13749,
12,
2890,
4672,
365,
18,
1376,
12,
16390,
2668,
13302,
1382,
1623,
770,
2777,
296,
3631,
1661,
80,
33,
5510,
13,
365,
18,
24541,
18,
28545,
12,
2890,
18,
3074,
18,
454... |
if bodyfat >= 6 and bodyfat <= 13.0: | if bodyfat > 5.0 and bodyfat < 14.0: | def on_bodyfat_calc(self, *args): """This formula comes from 'The Bodyfat Guide' by Ron Brown""" waist = self.waist_spinbutton.get_value() weight = self.weight_spinbutton.get_value() | 15a834372b4854ff4811d1f409a9e19cb96e978b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5454/15a834372b4854ff4811d1f409a9e19cb96e978b/bodyfat.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
67,
3432,
74,
270,
67,
12448,
12,
2890,
16,
380,
1968,
4672,
3536,
2503,
8013,
14535,
628,
296,
1986,
5652,
74,
270,
13018,
11,
635,
534,
265,
605,
26253,
8395,
27098,
376,
273,
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,
603,
67,
3432,
74,
270,
67,
12448,
12,
2890,
16,
380,
1968,
4672,
3536,
2503,
8013,
14535,
628,
296,
1986,
5652,
74,
270,
13018,
11,
635,
534,
265,
605,
26253,
8395,
27098,
376,
273,
3... |
return _apply(s.index, args) | return s.index(*args) | def index(s, *args): """index(s, sub [,start [,end]]) -> int Like find but raises ValueError when the substring is not found. """ return _apply(s.index, args) | 4e577568f34ac8283d2070929bf3c3090b3e722f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/4e577568f34ac8283d2070929bf3c3090b3e722f/string.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
770,
12,
87,
16,
380,
1968,
4672,
3536,
1615,
12,
87,
16,
720,
306,
16,
1937,
306,
16,
409,
65,
5717,
317,
509,
225,
23078,
1104,
1496,
14183,
2068,
1347,
326,
3019,
353,
486,
1392,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
770,
12,
87,
16,
380,
1968,
4672,
3536,
1615,
12,
87,
16,
720,
306,
16,
1937,
306,
16,
409,
65,
5717,
317,
509,
225,
23078,
1104,
1496,
14183,
2068,
1347,
326,
3019,
353,
486,
1392,
... |
month_folder = create_month_folder(self, contributor, schema_raw_data) | try: month_folder = create_month_folder(self, contributor, schema_raw_data) except: month_folder = self | def addNySemNews(self, id='', contributor=None, REQUEST=None, **kwargs): """ """ if REQUEST is not None: schema_raw_data = dict(REQUEST.form) else: schema_raw_data = kwargs #process parameters id = make_id(self, id=id, title=schema_raw_data.get('title', ''), prefix=PREFIX_OBJECT) if contributor is None: contributor = self.REQUEST.AUTHENTICATED_USER.getUserName() _lang = schema_raw_data.pop('_lang', schema_raw_data.pop('lang', None)) _releasedate = self.process_releasedate(schema_raw_data.pop('releasedate', '')) month_folder = create_month_folder(self, contributor, schema_raw_data) ob = _create_NySemNews_object(month_folder, id, contributor) form_errors = ob.process_submitted_form(schema_raw_data, _lang, _override_releasedate=_releasedate) ob.news_date = self.utConvertStringToDateTimeObj(schema_raw_data.get('news_date', None)) #check Captcha/reCaptcha if not self.checkPermissionSkipCaptcha(): captcha_validator = self.validateCaptcha(_contact_word, REQUEST) if captcha_validator: form_errors['captcha'] = captcha_validator if form_errors: if REQUEST is None: raise ValueError(form_errors.popitem()[1]) # pick a random error else: import transaction; transaction.abort() # because we already called _crete_NyZzz_object ob._prepare_error_response(REQUEST, form_errors, schema_raw_data) return REQUEST.RESPONSE.redirect('%s/semnews_add_html' % self.absolute_url()) if 'file' in schema_raw_data: ob.handleUpload(schema_raw_data['file']) if self.glCheckPermissionPublishObjects(): approved, approved_by = 1, self.REQUEST.AUTHENTICATED_USER.getUserName() else: approved, approved_by = 0, None ob.approveThis(approved, approved_by) ob.submitThis() ob.updatePropertiesFromGlossary(_lang) if ob.discussion: ob.open_for_comments() self.recatalogNyObject(ob) zope.event.notify(NyContentObjectAddEvent(ob, contributor, schema_raw_data)) #log post date auth_tool = self.getAuthenticationTool() auth_tool.changeLastPost(contributor) #redirect if case if REQUEST is not None: l_referer = REQUEST['HTTP_REFERER'].split('/')[-1] if l_referer == 'semnews_manage_add' or l_referer.find('semnews_manage_add') != -1: return self.manage_main(self, REQUEST, update_menu=1) elif l_referer == 'semnews_add_html': self.setSession('referer', self.absolute_url()) return ob.object_submitted_message(REQUEST) REQUEST.RESPONSE.redirect('%s/semnews_add_html' % self.absolute_url()) return ob.getId() | 277d83dc575890c5268eb161bc7415ab8c73549b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3287/277d83dc575890c5268eb161bc7415ab8c73549b/semnews_item.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
50,
93,
13185,
17948,
12,
2890,
16,
612,
2218,
2187,
31123,
33,
7036,
16,
12492,
33,
7036,
16,
2826,
4333,
4672,
3536,
3536,
309,
12492,
353,
486,
599,
30,
1963,
67,
1899,
67,
892... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
50,
93,
13185,
17948,
12,
2890,
16,
612,
2218,
2187,
31123,
33,
7036,
16,
12492,
33,
7036,
16,
2826,
4333,
4672,
3536,
3536,
309,
12492,
353,
486,
599,
30,
1963,
67,
1899,
67,
892... |
def __get_rbuf_len(self): | def _get_rbuf_len(self): | def __get_rbuf_len(self): buf_len = 0 for i in [len(x) for x in self._rbuf]: buf_len += i return buf_len | 443fec3dd9c1a2c60b538af0504d4926e633b9b4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/443fec3dd9c1a2c60b538af0504d4926e633b9b4/socket.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
67,
86,
4385,
67,
1897,
12,
2890,
4672,
1681,
67,
1897,
273,
374,
364,
277,
316,
306,
1897,
12,
92,
13,
364,
619,
316,
365,
6315,
86,
4385,
14542,
1681,
67,
1897,
1011,
277... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
67,
86,
4385,
67,
1897,
12,
2890,
4672,
1681,
67,
1897,
273,
374,
364,
277,
316,
306,
1897,
12,
92,
13,
364,
619,
316,
365,
6315,
86,
4385,
14542,
1681,
67,
1897,
1011,
277... |
view_name = self.context.form.__name__ view_instance = getMultiAdapter((content, self.request), name=view_name).__of__(content) | view_name = self.request.getURL().split('/')[-3] | def validate_access(self): content = self.context.form.context view_name = self.context.form.__name__ view_instance = getMultiAdapter((content, self.request), name=view_name).__of__(content) # May raise Unauthorized getSecurityManager().validate(content, content, view_name, view_instance) | c7f0f9133cdf00ce0682e033dddd86b0ebb2db92 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12258/c7f0f9133cdf00ce0682e033dddd86b0ebb2db92/widget.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1954,
67,
3860,
12,
2890,
4672,
913,
273,
365,
18,
2472,
18,
687,
18,
2472,
1476,
67,
529,
273,
365,
18,
2293,
18,
588,
1785,
7675,
4939,
2668,
2473,
13,
18919,
23,
65,
225,
468,
167... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1954,
67,
3860,
12,
2890,
4672,
913,
273,
365,
18,
2472,
18,
687,
18,
2472,
1476,
67,
529,
273,
365,
18,
2293,
18,
588,
1785,
7675,
4939,
2668,
2473,
13,
18919,
23,
65,
225,
468,
167... |
self.assertEqual(targets.keys(), [1]) | self.assertEqual(list(targets.keys()), [1]) | def testSingleComplexTarget(self): targets = {1: [0, 1, 2]} with mock_contextmanager_generator() as targets[1][0]: self.assertEqual(targets.keys(), [1]) self.assertEqual(targets[1][0].__class__, MockResource) with mock_contextmanager_generator() as targets.values()[0][1]: self.assertEqual(targets.keys(), [1]) self.assertEqual(targets[1][1].__class__, MockResource) with mock_contextmanager_generator() as targets[2]: keys = targets.keys() keys.sort() self.assertEqual(keys, [1, 2]) class C: pass blah = C() with mock_contextmanager_generator() as blah.foo: self.assertEqual(hasattr(blah, "foo"), True) | ddc0591fc1e00011e1f13156dfecc93370652395 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12029/ddc0591fc1e00011e1f13156dfecc93370652395/test_with.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
5281,
12795,
2326,
12,
2890,
4672,
5774,
273,
288,
21,
30,
306,
20,
16,
404,
16,
576,
18322,
598,
5416,
67,
2472,
4181,
67,
8812,
1435,
487,
5774,
63,
21,
6362,
20,
14542,
365,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
5281,
12795,
2326,
12,
2890,
4672,
5774,
273,
288,
21,
30,
306,
20,
16,
404,
16,
576,
18322,
598,
5416,
67,
2472,
4181,
67,
8812,
1435,
487,
5774,
63,
21,
6362,
20,
14542,
365,
... |
system('pgsql/build_db.sh -g') | system('pgsql/build_db.sh -g -w 1') | def execute(self, args = ''): logfile = self.resultsdir + '/dbt2.log' | fc29b92c481478355099368d4370163198d1e676 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12268/fc29b92c481478355099368d4370163198d1e676/dbt2.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1836,
12,
2890,
16,
833,
273,
875,
4672,
15204,
273,
365,
18,
4717,
1214,
397,
1173,
1966,
88,
22,
18,
1330,
11,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1836,
12,
2890,
16,
833,
273,
875,
4672,
15204,
273,
365,
18,
4717,
1214,
397,
1173,
1966,
88,
22,
18,
1330,
11,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
@neediface | @neediface(False) | def FlushRoutes(self): """ Flush network routes for this device. """ if self.ip_cmd and self.flush_tool in [misc.AUTO, misc.IP]: cmds = ['%s route flush dev %s' % (self.ip_cmd, self.iface)] elif self.route_cmd and self.flush_tool in [misc.AUTO, misc.ROUTE]: cmds = ['%s del dev %s' % (self.route_cmd, self.iface)] else: print "No flush command available!" cmds = [] for cmd in cmds: if self.verbose: print cmd misc.Run(cmd) | 47ca18c906e4d683b6f15a7e6c3eb8390b1e7e2a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/353/47ca18c906e4d683b6f15a7e6c3eb8390b1e7e2a/wnettools.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11624,
8110,
12,
2890,
4672,
3536,
11624,
2483,
4912,
364,
333,
2346,
18,
3536,
309,
365,
18,
625,
67,
4172,
471,
365,
18,
11330,
67,
6738,
316,
306,
23667,
18,
18909,
16,
20448,
18,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11624,
8110,
12,
2890,
4672,
3536,
11624,
2483,
4912,
364,
333,
2346,
18,
3536,
309,
365,
18,
625,
67,
4172,
471,
365,
18,
11330,
67,
6738,
316,
306,
23667,
18,
18909,
16,
20448,
18,
2... |
print >>sys.stderr,"------" print >>sys.stderr,"node ns: ",node.ns().getContent() print >>sys.stderr,"slot ns: ",slot.ns().getContent() print >>sys.stderr,node.serialize() print >>sys.stderr,"------" | def merge(self): output_doc=self.template_doc.copyDoc(True) slot=output_doc.xpathEval('//*[@id="main"]')[0] content=self.content_doc.xpathEval('//*[@class="document"]/*') for node in content: print >>sys.stderr,"------" print >>sys.stderr,"node ns: ",node.ns().getContent() print >>sys.stderr,"slot ns: ",slot.ns().getContent() print >>sys.stderr,node.serialize() print >>sys.stderr,"------" nn=slot.addChild(node.copyNode(True)) output_doc.getRootElement().reconciliateNs(output_doc) return output_doc | 599a3ed38e1a8643680b76ea1159b92ad813b14d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12769/599a3ed38e1a8643680b76ea1159b92ad813b14d/htmlmerge.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2691,
12,
2890,
4672,
876,
67,
2434,
33,
2890,
18,
3202,
67,
2434,
18,
3530,
1759,
12,
5510,
13,
4694,
33,
2844,
67,
2434,
18,
18644,
13904,
2668,
759,
14,
14782,
350,
1546,
5254,
2420... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2691,
12,
2890,
4672,
876,
67,
2434,
33,
2890,
18,
3202,
67,
2434,
18,
3530,
1759,
12,
5510,
13,
4694,
33,
2844,
67,
2434,
18,
18644,
13904,
2668,
759,
14,
14782,
350,
1546,
5254,
2420... | |
self._profileDt = dt | profileInfo.dt = dt | def __executeTask(self, task): task.setCurrentTimeFrame(self.currentTime, self.currentFrame) | 9b36b7b487327db0ba0615acb1d91d79e2fce589 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8543/9b36b7b487327db0ba0615acb1d91d79e2fce589/Task.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
8837,
2174,
12,
2890,
16,
1562,
4672,
1562,
18,
542,
3935,
950,
3219,
12,
2890,
18,
2972,
950,
16,
365,
18,
2972,
3219,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
8837,
2174,
12,
2890,
16,
1562,
4672,
1562,
18,
542,
3935,
950,
3219,
12,
2890,
18,
2972,
950,
16,
365,
18,
2972,
3219,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
report_type = 'pdf' report_xml = None title='' attach = False | def create(self, cr, uid, ids, data, context=None): logo = None if not context: context={} context = context.copy() | f16cf978ff88ce3b744db58016d29e38fb92872c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/f16cf978ff88ce3b744db58016d29e38fb92872c/report_sxw.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
501,
16,
819,
33,
7036,
4672,
19128,
273,
599,
309,
486,
819,
30,
819,
12938,
819,
273,
819,
18,
3530,
1435,
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,
752,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
501,
16,
819,
33,
7036,
4672,
19128,
273,
599,
309,
486,
819,
30,
819,
12938,
819,
273,
819,
18,
3530,
1435,
2,
-100,
-100,
-100,
-10... | |
else | else: | def __init__(data = None) if data == None: quickfix.StringField.__init__(self, 917) else quickfix.StringField.__init__(self, 917, data) | 484890147d4b23aac4b9d0e85e84fceab7e137c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8819/484890147d4b23aac4b9d0e85e84fceab7e137c3/quickfix_fields.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
892,
273,
599,
13,
309,
501,
422,
599,
30,
9549,
904,
18,
780,
974,
16186,
2738,
972,
12,
2890,
16,
2468,
4033,
13,
469,
30,
9549,
904,
18,
780,
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,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
892,
273,
599,
13,
309,
501,
422,
599,
30,
9549,
904,
18,
780,
974,
16186,
2738,
972,
12,
2890,
16,
2468,
4033,
13,
469,
30,
9549,
904,
18,
780,
974,
16186,
2738... |
def __init__(self, lines, begin=-1, endScope=None): | def __init__(self, lines, fname=None, begin=-1, endScope=None): | def __init__(self, lines, begin=-1, endScope=None): "Initialize a new WmlIterator" self.lines = lines self.endScope = None self.end = len(lines) self.reset() self.seek(begin) self.endScope = endScope | 0102da6ad83060d3ae0feccfa3d8643ce7252178 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9355/0102da6ad83060d3ae0feccfa3d8643ce7252178/wmliterator.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
2362,
16,
5299,
33,
7036,
16,
2376,
29711,
21,
16,
679,
3876,
33,
7036,
4672,
315,
7520,
279,
394,
678,
781,
3198,
6,
365,
18,
3548,
273,
2362,
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,
1001,
2738,
972,
12,
2890,
16,
2362,
16,
5299,
33,
7036,
16,
2376,
29711,
21,
16,
679,
3876,
33,
7036,
4672,
315,
7520,
279,
394,
678,
781,
3198,
6,
365,
18,
3548,
273,
2362,
365,
18... |
settimer(.5, foo, ()) | if callfunc == 'initialize': | def foo(): exitall() | 2d40f0d0ce9fe713ed1f592af05dfda8af50161d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7995/2d40f0d0ce9fe713ed1f592af05dfda8af50161d/ut_repytests_randomratetest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8431,
13332,
2427,
454,
1435,
225,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8431,
13332,
2427,
454,
1435,
225,
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,
... |
"Allocate bytes (obsolete)" | """Allocate bytes for storage (obsolete).""" | def ftp_ALLO(self, line): "Allocate bytes (obsolete)" # obsolete (always respond with 202) self.respond("202 No storage allocation necessary.") | 367a95e4363ae8b7515230480fff6ef354b95226 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3782/367a95e4363ae8b7515230480fff6ef354b95226/FTPServer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13487,
67,
1013,
1502,
12,
2890,
16,
980,
4672,
3536,
27483,
1731,
364,
2502,
261,
10992,
19513,
13,
12123,
468,
27191,
261,
17737,
6846,
598,
26599,
13,
365,
18,
17863,
2932,
18212,
2631,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13487,
67,
1013,
1502,
12,
2890,
16,
980,
4672,
3536,
27483,
1731,
364,
2502,
261,
10992,
19513,
13,
12123,
468,
27191,
261,
17737,
6846,
598,
26599,
13,
365,
18,
17863,
2932,
18212,
2631,... |
sys.stderr.write("%s: %s\n" % (sys.argv[0], msg)) | print >> sys.stderr, "%s: %s" % (sys.argv[0], msg) | def _err_exit(msg): sys.stderr.write("%s: %s\n" % (sys.argv[0], msg)) sys.exit(1) | 378f7d565bdce9abec1770309041634877f0ac81 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/378f7d565bdce9abec1770309041634877f0ac81/trace.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
370,
67,
8593,
12,
3576,
4672,
1172,
1671,
2589,
18,
11241,
16,
2213,
87,
30,
738,
87,
6,
738,
261,
9499,
18,
19485,
63,
20,
6487,
1234,
13,
2589,
18,
8593,
12,
21,
13,
225,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
370,
67,
8593,
12,
3576,
4672,
1172,
1671,
2589,
18,
11241,
16,
2213,
87,
30,
738,
87,
6,
738,
261,
9499,
18,
19485,
63,
20,
6487,
1234,
13,
2589,
18,
8593,
12,
21,
13,
225,
2... |
if not paths_to_remove.can_uninstall(): return | def uninstall(self, auto_confirm=False): """ Uninstall the distribution currently satisfying this requirement. | f40473e5afd285a11c798ef62e1b591f1c6c486f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12982/f40473e5afd285a11c798ef62e1b591f1c6c486f/pip.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
16577,
12,
2890,
16,
3656,
67,
10927,
33,
8381,
4672,
3536,
1351,
5425,
326,
7006,
4551,
9281,
14946,
333,
12405,
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,
16577,
12,
2890,
16,
3656,
67,
10927,
33,
8381,
4672,
3536,
1351,
5425,
326,
7006,
4551,
9281,
14946,
333,
12405,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... | |
"""Calculates the repr representation, using masked for fill if it is enabled. Otherwise fill with fill value. """ | """Calculates the repr representation, using masked for fill if it is enabled. Otherwise fill with fill value. """ | def __repr__(self): """Calculates the repr representation, using masked for fill if it is enabled. Otherwise fill with fill value. """ desc = """\ | fa55c4c696ec9c654bfe9099b550f554a05ac28b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12971/fa55c4c696ec9c654bfe9099b550f554a05ac28b/tseries.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
12715,
972,
12,
2890,
4672,
3536,
10587,
326,
8480,
4335,
16,
1450,
13196,
364,
3636,
309,
518,
353,
3696,
18,
5272,
3636,
598,
3636,
460,
18,
3536,
3044,
273,
3536,
64,
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,
12715,
972,
12,
2890,
4672,
3536,
10587,
326,
8480,
4335,
16,
1450,
13196,
364,
3636,
309,
518,
353,
3696,
18,
5272,
3636,
598,
3636,
460,
18,
3536,
3044,
273,
3536,
64,
2,
-100,
... |
''' | """ | def HyperStarGraph(self,n,k): r''' Returns the hyper-star graph HS(n,k). | 964210a5192f4b56729c7c92c3aa648c59e61bea /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9417/964210a5192f4b56729c7c92c3aa648c59e61bea/graph_generators.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
18274,
18379,
4137,
12,
2890,
16,
82,
16,
79,
4672,
436,
26418,
2860,
326,
9512,
17,
10983,
2667,
670,
55,
12,
82,
16,
79,
2934,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
18274,
18379,
4137,
12,
2890,
16,
82,
16,
79,
4672,
436,
26418,
2860,
326,
9512,
17,
10983,
2667,
670,
55,
12,
82,
16,
79,
2934,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
print 'Pre-training layer %i, epoch %d'%(i,epoch),c, batch_index | print 'Pre-training layer %i, epoch %d'%(i,epoch),c | def shared_dataset(data_xy): data_x, data_y = data_xy shared_x = theano.shared(numpy.asarray(data_x, dtype=theano.config.floatX)) shared_y = theano.shared(numpy.asarray(data_y, dtype=theano.config.floatX)) return shared_x, T.cast(shared_y, 'int32') | d6c05745c0cc5f7eba19e1357e25b5b2b464f470 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/242/d6c05745c0cc5f7eba19e1357e25b5b2b464f470/SdA.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5116,
67,
8682,
12,
892,
67,
1698,
4672,
501,
67,
92,
16,
501,
67,
93,
273,
501,
67,
1698,
5116,
67,
92,
273,
326,
31922,
18,
11574,
12,
15974,
18,
345,
1126,
12,
892,
67,
92,
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,
5116,
67,
8682,
12,
892,
67,
1698,
4672,
501,
67,
92,
16,
501,
67,
93,
273,
501,
67,
1698,
5116,
67,
92,
273,
326,
31922,
18,
11574,
12,
15974,
18,
345,
1126,
12,
892,
67,
92,
16,
... |
if get_verbose() >= 2: print "R[%02d].s_box %s"%(r+1,self.hex_str_vector(P)) | if get_verbose() >= 2: print "R[%02d].s_box %s"%(r+1, self.hex_str_vector(P)) | def __call__(self, P, K): r""" Encrypts the plaintext $P$ using the key $K$. | e506ccc2459e6e3948659b0d1b28d9d6b70342e4 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/e506ccc2459e6e3948659b0d1b28d9d6b70342e4/sr.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1991,
972,
12,
2890,
16,
453,
16,
1475,
4672,
436,
8395,
8594,
20261,
326,
11917,
271,
52,
8,
1450,
326,
498,
271,
47,
8,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1991,
972,
12,
2890,
16,
453,
16,
1475,
4672,
436,
8395,
8594,
20261,
326,
11917,
271,
52,
8,
1450,
326,
498,
271,
47,
8,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
return ComplexField(prec)(x).sqrt(all=all) | if x >= 0: return RealField(prec)(x).sqrt(all=all) else: return ComplexField(prec)(x).sqrt(all=all) | def _do_sqrt(self, x, prec=None, extend=True, all=False): if prec and x >= 0: return RealField(prec)(x).sqrt(all=all) if prec: return ComplexField(prec)(x).sqrt(all=all) z = SymbolicComposition(self, SR(x)) if all: return [z, -z] return z | 538db8ed510c9b998a0a85f9db7c249c4e171edd /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/538db8ed510c9b998a0a85f9db7c249c4e171edd/calculus.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2896,
67,
24492,
12,
2890,
16,
619,
16,
13382,
33,
7036,
16,
2133,
33,
5510,
16,
777,
33,
8381,
4672,
309,
13382,
471,
619,
1545,
374,
30,
327,
15987,
974,
12,
4036,
21433,
92,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2896,
67,
24492,
12,
2890,
16,
619,
16,
13382,
33,
7036,
16,
2133,
33,
5510,
16,
777,
33,
8381,
4672,
309,
13382,
471,
619,
1545,
374,
30,
327,
15987,
974,
12,
4036,
21433,
92,
... |
logname = os.path.join(request.cfg.data_dir, "expaterror.log") f = file(logname, "w") f.write(text) f.close() | def parse(request, text): text = u'<?xml version="1.0"?>%s%s' % (dtd, text) text = text.encode(config.charset) try: logname = os.path.join(request.cfg.data_dir, "expaterror.log") f = file(logname, "w") f.write(text) f.close() return xml.dom.minidom.parseString(text) except xml.parsers.expat.ExpatError, msg: # this sometimes crashes when it should not, so save the stuff to analyze it: logname = os.path.join(request.cfg.data_dir, "expaterror.log") f = file(logname, "w") f.write(text) f.write("\n" + "-"*80 + "\n" + str(msg)) f.close() raise ConvertError('ExpatError: %s (see dump in %s)' % (msg, logname)) | d0961809927336ce6ebb4baa17e2f3bfe50bfd14 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/888/d0961809927336ce6ebb4baa17e2f3bfe50bfd14/text_html_text_moin_wiki.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
12,
2293,
16,
977,
4672,
977,
273,
582,
11,
12880,
2902,
1177,
1546,
21,
18,
20,
6,
35,
9822,
87,
9,
87,
11,
738,
261,
31834,
16,
977,
13,
977,
273,
977,
18,
3015,
12,
1425,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
12,
2293,
16,
977,
4672,
977,
273,
582,
11,
12880,
2902,
1177,
1546,
21,
18,
20,
6,
35,
9822,
87,
9,
87,
11,
738,
261,
31834,
16,
977,
13,
977,
273,
977,
18,
3015,
12,
1425,
... | |
logger.error("...NOT able to import '%s'" % itemPath) | logger.error("...NOT able to import '%s'" % itemPath.encode('utf8', 'replace')) | def _conditionalGetItem(self, contentView, itemPath, into=None, updateCallback=None, stats=None): """ Get an item from the server if we don't yet have it or our copy is out of date """ | 1c572b0a1bb0f6c6516f6c77efbc96fb87142454 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/1c572b0a1bb0f6c6516f6c77efbc96fb87142454/conduits.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
22019,
967,
1180,
12,
2890,
16,
913,
1767,
16,
761,
743,
16,
1368,
33,
7036,
16,
1089,
2428,
33,
7036,
16,
3177,
33,
7036,
4672,
3536,
968,
392,
761,
628,
326,
1438,
309,
732,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
22019,
967,
1180,
12,
2890,
16,
913,
1767,
16,
761,
743,
16,
1368,
33,
7036,
16,
1089,
2428,
33,
7036,
16,
3177,
33,
7036,
4672,
3536,
968,
392,
761,
628,
326,
1438,
309,
732,
2... |
_build_extensions () module = __import__('test.%s' % module_name, globals (), locals (), ('*',)) return unittest.defaultTestLoader.loadTestsFromModule (module) def _create_test_module_importer (module_name): return lambda: _import_module_tests (module_name) | return unittest.defaultTestLoader.loadTestsFromModule (_import_module (module_name)) | def _import_module_tests (module_name): _build_extensions () module = __import__('test.%s' % module_name, globals (), locals (), ('*',)) return unittest.defaultTestLoader.loadTestsFromModule (module) | 3d964e27d3860cb7a4ccd3402b4f439b52a02eee /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12297/3d964e27d3860cb7a4ccd3402b4f439b52a02eee/run-tests.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
5666,
67,
2978,
67,
16341,
261,
2978,
67,
529,
4672,
389,
3510,
67,
9489,
1832,
1605,
273,
1001,
5666,
972,
2668,
3813,
7866,
87,
11,
738,
1605,
67,
529,
16,
10941,
1832,
16,
8985... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5666,
67,
2978,
67,
16341,
261,
2978,
67,
529,
4672,
389,
3510,
67,
9489,
1832,
1605,
273,
1001,
5666,
972,
2668,
3813,
7866,
87,
11,
738,
1605,
67,
529,
16,
10941,
1832,
16,
8985... |
'<div padding=6 id=\'div-interact-3\'> ...</div>\n ' | '<!--notruncate--><div padding=6 id=\'div-interact-3\'> ...</div>\n ' | def render(self): """ Render in text (html) the entire interact canvas. | e886480249649fa64572856f9ed85a914600a590 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/e886480249649fa64572856f9ed85a914600a590/interact.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1743,
12,
2890,
4672,
3536,
6987,
316,
977,
261,
2620,
13,
326,
7278,
16592,
5953,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1743,
12,
2890,
4672,
3536,
6987,
316,
977,
261,
2620,
13,
326,
7278,
16592,
5953,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
filename = '%s.%d' % (file, i) | filename = '%s.%02d' % (file, i) | def split_file(self, file, chunk_size): parts = [] parts_digest = [] file_size = os.path.getsize(file) in_file = open(file, 'rb') number_parts = int(file_size / chunk_size) number_parts += 1 bytes_read = 0 for i in range(0, number_parts, 1): filename = '%s.%d' % (file, i) part_digest = sha() file_part = open(filename, 'wb') print 'Part:', self.get_relative_filename(filename) part_bytes_written = 0 while part_bytes_written < IMAGE_SPLIT_CHUNK: data = in_file.read(IMAGE_IO_CHUNK) file_part.write(data) part_digest.update(data) data_len = len(data) part_bytes_written += data_len bytes_read += data_len if bytes_read >= file_size: break file_part.close() parts.append(filename) parts_digest.append(hexlify(part_digest.digest())) | ae7d9b2ec3a9eb66d32cee0ec2b18d182167148c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12707/ae7d9b2ec3a9eb66d32cee0ec2b18d182167148c/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1416,
67,
768,
12,
2890,
16,
585,
16,
2441,
67,
1467,
4672,
2140,
273,
5378,
2140,
67,
10171,
273,
5378,
585,
67,
1467,
273,
1140,
18,
803,
18,
588,
1467,
12,
768,
13,
316,
67,
768,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1416,
67,
768,
12,
2890,
16,
585,
16,
2441,
67,
1467,
4672,
2140,
273,
5378,
2140,
67,
10171,
273,
5378,
585,
67,
1467,
273,
1140,
18,
803,
18,
588,
1467,
12,
768,
13,
316,
67,
768,
... |
debug(" third-party Netscape cookie during " | _debug(" third-party Netscape cookie during " | def set_ok_verifiability(self, cookie, request): if request.is_unverifiable() and is_third_party(request): if cookie.version > 0 and self.strict_rfc2965_unverifiable: debug(" third-party RFC 2965 cookie during " "unverifiable transaction") return False elif cookie.version == 0 and self.strict_ns_unverifiable: debug(" third-party Netscape cookie during " "unverifiable transaction") return False return True | 7fde00696ae6c872310a407df8b8923ab907f247 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/7fde00696ae6c872310a407df8b8923ab907f247/cookielib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
67,
601,
67,
502,
704,
2967,
12,
2890,
16,
3878,
16,
590,
4672,
309,
590,
18,
291,
67,
318,
502,
8424,
1435,
471,
353,
67,
451,
6909,
67,
21214,
12,
2293,
4672,
309,
3878,
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,
444,
67,
601,
67,
502,
704,
2967,
12,
2890,
16,
3878,
16,
590,
4672,
309,
590,
18,
291,
67,
318,
502,
8424,
1435,
471,
353,
67,
451,
6909,
67,
21214,
12,
2293,
4672,
309,
3878,
18,
... |
ra('<downloadfilename lang="%s"><![CDATA[%s]]></downloadfilename>' % (l, self.utToUtf8(self.getLocalProperty('downloadfilename', l)))) | for l in self.gl_get_languages(): ra('<downloadfilename lang="%s"><![CDATA[%s]]></downloadfilename>' % (l, self.utToUtf8(self.getLocalProperty('downloadfilename', l)))) | def export_this_body_custom(self): r = [] ra = r.append ra('<downloadfilename lang="%s"><![CDATA[%s]]></downloadfilename>' % (l, self.utToUtf8(self.getLocalProperty('downloadfilename', l)))) for lang, fileitem in self.getFileItems().items(): ra('<item lang="%s" file="%s" content_type="%s" precondition="%s" />' % \ (lang, self.utBase64Encode(str(self.utNoneToEmpty(fileitem.data))), self.utXmlEncode(fileitem.content_type), self.utXmlEncode(fileitem.precondition))) return ''.join(r) | f60b21168fd16febcc1f3efe1b8f848e7ddb268d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3287/f60b21168fd16febcc1f3efe1b8f848e7ddb268d/NyExFile.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3359,
67,
2211,
67,
3432,
67,
3662,
12,
2890,
4672,
436,
273,
5378,
767,
273,
436,
18,
6923,
364,
328,
316,
365,
18,
7043,
67,
588,
67,
14045,
13332,
767,
2668,
32,
7813,
3459,
3303,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3359,
67,
2211,
67,
3432,
67,
3662,
12,
2890,
4672,
436,
273,
5378,
767,
273,
436,
18,
6923,
364,
328,
316,
365,
18,
7043,
67,
588,
67,
14045,
13332,
767,
2668,
32,
7813,
3459,
3303,
... |
def cmd_forgetnick(self, oldNick): lcOldNick = string.lower(oldNick) lcNick = string.lower(self.sendernick) if (self.NickAka.has_key(lcOldNick)): if (self.NickAka[lcNick]==self.NickAka[lcOldNick]): nicklist = (self.masternicks[self.NickAka[lcNick]])['nicklist'] for nick in nicklist: if (string.lower(nick) == lcOldNick): nicklist.remove(nick) del self.NickAka[lcOldNick] self.saveNicks() else: self.say("%s is not an alias for %s" % (oldNick,self.sendernick)) else: self.say("%s is not an nick I know" % (oldNick)) | def cmd_forgetnick(self, oldNicks): nickList = oldNicks.split() for oldNick in nickList: lcOldNick = string.lower(oldNick) lcNick = string.lower(self.sendernick) if (self.NickAka.has_key(lcOldNick)): if (self.NickAka[lcNick]==self.NickAka[lcOldNick]): nicklist = (self.masternicks[self.NickAka[lcNick]])['nicklist'] for nick in nicklist: if (string.lower(nick) == lcOldNick): nicklist.remove(nick) del self.NickAka[lcOldNick] self.addnick(oldNick) self.saveNicks() else: self.say("%s is not an alias for %s" % (oldNick,self.sendernick)) else: self.say("%s is not an nick I know" % (oldNick)) | def cmd_forgetnick(self, oldNick): lcOldNick = string.lower(oldNick) lcNick = string.lower(self.sendernick) if (self.NickAka.has_key(lcOldNick)): if (self.NickAka[lcNick]==self.NickAka[lcOldNick]): nicklist = (self.masternicks[self.NickAka[lcNick]])['nicklist'] for nick in nicklist: if (string.lower(nick) == lcOldNick): nicklist.remove(nick) del self.NickAka[lcOldNick] self.saveNicks() else: self.say("%s is not an alias for %s" % (oldNick,self.sendernick)) else: self.say("%s is not an nick I know" % (oldNick)) | 075ac1978871c26b88341accf7b0018950b16556 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9641/075ac1978871c26b88341accf7b0018950b16556/jibot.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1797,
67,
1884,
588,
17091,
12,
2890,
16,
1592,
29756,
4672,
9109,
7617,
29756,
273,
533,
18,
8167,
12,
1673,
29756,
13,
9109,
29756,
273,
533,
18,
8167,
12,
2890,
18,
15330,
17091,
13,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1797,
67,
1884,
588,
17091,
12,
2890,
16,
1592,
29756,
4672,
9109,
7617,
29756,
273,
533,
18,
8167,
12,
1673,
29756,
13,
9109,
29756,
273,
533,
18,
8167,
12,
2890,
18,
15330,
17091,
13,
... |
"<p><b>Ctrl+Left Click</b> - deletes a highlighted atom.</p>"\ | "<p><b>Ctrl+Left Click</b> - deletes a highlighted atom or bond.</p>"\ | def createWhatsThis(self): ############################################## # File Toolbar ############################################## #### Open File #### fileOpenText = "<u><b>Open File</b></u> (Ctrl + O)</b></p><br> "\ "<p><img source=\"fileopen\"><br> "\ "Opens a new file."\ "</p>" QMimeSourceFactory.defaultFactory().setPixmap( "fileopen", self.fileOpenAction.iconSet().pixmap() ) self.fileOpenAction.setWhatsThis( fileOpenText ) #### Save File #### fileSaveText = "<u><b>Save File</b></u> (Ctrl + S)</b></p><br> "\ "<p><img source=\"filesave\"><br> "\ "Saves the current file."\ "</p>" QMimeSourceFactory.defaultFactory().setPixmap( "filesave", self.fileSaveAction.iconSet().pixmap() ) self.fileSaveAction.setWhatsThis( fileSaveText ) ############################################## # Edit Toolbar ############################################## #### Undo #### editUndoText = "<u><b>Undo</b></u> (Ctrl + Z)</b></p><br> "\ "<p><img source=\"editUndo\"><br> "\ "Reverses the last edit or command to the active part. "\ "<b>Currently not implemented</b>."\ "</p>" QMimeSourceFactory.defaultFactory().setPixmap( "editUndo", self.editUndoAction.iconSet().pixmap() ) self.editUndoAction.setWhatsThis( editUndoText ) #### Redo #### editRedoText = "<u><b>Redo</b></u> (Ctrl + Y)</b></p><br> "\ "<p><img source=\"editRedo\"> <br>"\ "Re-applies the actions or commands on which you have used "\ "the Undo command. <b>Currently not implemented</b>."\ "</p>" QMimeSourceFactory.defaultFactory().setPixmap( "editRedo", self.editRedoAction.iconSet().pixmap() ) self.editRedoAction.setWhatsThis( editRedoText ) #### Cut #### editCutText = "<u><b>Cut</b></u> (Ctrl + X)</b></p><br> "\ "<p><img source=\"editCut\"><br> "\ "Removes the selected object(s) and stores the cut data on the"\ "clipboard."\ "</p>" QMimeSourceFactory.defaultFactory().setPixmap( "editCut", self.editCutAction.iconSet().pixmap() ) self.editCutAction.setWhatsThis( editCutText ) #### Copy #### editCopyText = "<u><b>Copy</b></u> (Ctrl + C)</b></p><br> "\ "<p><img source=\"editCopy\"><br> "\ "Places a copy of the selected chunk(s) on the clipboard "\ "while leaving the original chunk(s) unaffected."\ "</p>" QMimeSourceFactory.defaultFactory().setPixmap( "editCopy", self.editCopyAction.iconSet().pixmap() ) self.editCopyAction.setWhatsThis( editCopyText ) #### Paste #### editPasteText = "<u><b>Paste</b></u> (Ctrl + V)</b></p><br> "\ "<p><img source=\"editPaste\"><br> "\ "When selecting this feature, you are placed in "\ "<b>Build Atom</b> mode where you may paste copies "\ "of clipboard objects into the model where ever you click."\ "</p>" QMimeSourceFactory.defaultFactory().setPixmap( "editPaste", self.editPasteAction.iconSet().pixmap() ) self.editPasteAction.setWhatsThis( editPasteText ) #### Delete #### editDeleteText = "<u><b>Delete</b></u> (DEL)</b></p><br> "\ "<p><img source=\"editDelete\"><br> "\ "Deletes the selected object(s). "\ "For this Alpha release, deleted objects are permanantly lost.</p>" QMimeSourceFactory.defaultFactory().setPixmap( "editDelete", self.editDeleteAction.iconSet().pixmap() ) self.editDeleteAction.setWhatsThis( editDeleteText ) ############################################## # View Toolbar ############################################## #### Home View #### setViewHomeActionText = "<u><b>Home</b></u> (Home)<br>"\ "<p><img source=\"setViewHome\"><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>" QMimeSourceFactory.defaultFactory().setPixmap( "setViewHome", self.setViewHomeAction.iconSet().pixmap() ) self.setViewHomeAction.setWhatsThis( setViewHomeActionText ) #### Fit to Window #### setViewFitToWindowActionText = "<u><b>Fit To Window</b></u><br>"\ "<p><img source=\"setViewFitToWindow\"><br> "\ "Refits the model to the screen so you can view the entire model."\ "</p>" QMimeSourceFactory.defaultFactory().setPixmap( "setViewFitToWindow", self.setViewFitToWindowAction.iconSet().pixmap() ) self.setViewFitToWindowAction.setWhatsThis( setViewFitToWindowActionText ) #### Recenter #### setViewRecenterActionText = "<u><b>Recenter</b></u><br>"\ "<p><img source=\"setViewRecenter\"><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>" QMimeSourceFactory.defaultFactory().setPixmap( "setViewRecenter", self.setViewRecenterAction.iconSet().pixmap() ) self.setViewRecenterAction.setWhatsThis( setViewRecenterActionText ) #### Zoom Tool #### setzoomToolActionText = "<u><b>Zoom Tool</b></u><br>"\ "<p><img source=\"setzoomTool\"><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>" QMimeSourceFactory.defaultFactory().setPixmap( "setzoomTool", self.zoomToolAction.iconSet().pixmap() ) self.zoomToolAction.setWhatsThis( setzoomToolActionText ) #### Pan Tool #### setpanToolActionText = "<u><b>Pan Tool</b></u><br>"\ "<p><img source=\"setpanTool\"><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>" QMimeSourceFactory.defaultFactory().setPixmap( "setpanTool", self.panToolAction.iconSet().pixmap() ) self.panToolAction.setWhatsThis( setpanToolActionText ) #### Rotate Tool #### setrotateToolActionText = "<u><b>Rotate Tool</b></u><br>"\ "<p><img source=\"setrotateTool\"><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>" QMimeSourceFactory.defaultFactory().setPixmap( "setrotateTool", self.rotateToolAction.iconSet().pixmap() ) self.rotateToolAction.setWhatsThis( setrotateToolActionText ) #### Orthographic Projection #### setViewOrthoActionText = "<u><b>Orthographic Projection</b></u><br>"\ "<p><img source=\"setViewOrtho\"><br> "\ "Sets nonperspective (or parallel) projection, with no foreshortening."\ "</p>" QMimeSourceFactory.defaultFactory().setPixmap( "setViewOrtho", self.setViewOrthoAction.iconSet().pixmap() ) self.setViewOrthoAction.setWhatsThis( setViewOrthoActionText ) #### Perspective Projection #### setViewPerspecActionText = "<u><b>Perspective Projection</b></u><br>"\ "<p><img source=\"setViewPerspec\"><br> "\ "Set perspective projection, drawing objects slightly larger "\ "that are closer to the viewer."\ "</p>" QMimeSourceFactory.defaultFactory().setPixmap( "setViewPerspec", self.setViewPerspecAction.iconSet().pixmap() ) self.setViewPerspecAction.setWhatsThis( setViewPerspecActionText ) #### Front View #### setViewFrontActionText = "<u><b>Front View</b></u><br>"\ "<p><img source=\"setViewFront\"><br> "\ "Reorients the model so that it is viewed from the front."\ "</p>" QMimeSourceFactory.defaultFactory().setPixmap( "setViewFront", self.setViewFrontAction.iconSet().pixmap() ) self.setViewFrontAction.setWhatsThis( setViewFrontActionText ) #### Back View #### setViewBackActionText = "<u><b>Back View</b></u><br>"\ "<p><img source=\"setViewBack\"><br> "\ "Reorients the model so that it is viewed from the back."\ "</p>" QMimeSourceFactory.defaultFactory().setPixmap( "setViewBack", self.setViewBackAction.iconSet().pixmap() ) self.setViewBackAction.setWhatsThis( setViewBackActionText ) #### Top View #### setViewTopActionText = "<u><b>Top View</b></u><br>"\ "<p><img source=\"setViewTop\"><br> "\ "Reorients the model so that it is viewed from the top."\ "</p>" QMimeSourceFactory.defaultFactory().setPixmap( "setViewTop", self.setViewTopAction.iconSet().pixmap() ) self.setViewTopAction.setWhatsThis( setViewTopActionText ) #### Bottom View #### setViewBottomActionText = "<u><b>Bottom View</b></u><br>"\ "<p><img source=\"setViewBottom\"><br> "\ "Reorients the model so that it is viewed from the bottom."\ "</p>" QMimeSourceFactory.defaultFactory().setPixmap( "setViewBottom", self.setViewBottomAction.iconSet().pixmap() ) self.setViewBottomAction.setWhatsThis( setViewBottomActionText ) #### Left View #### setViewLeftActionText = "<u><b>Left View</b></u><br>"\ "<p><img source=\"setViewLeft\"><br> "\ "Reorients the model so that it is viewed from the left side."\ "</p>" QMimeSourceFactory.defaultFactory().setPixmap( "setViewLeft", self.setViewLeftAction.iconSet().pixmap() ) self.setViewLeftAction.setWhatsThis( setViewLeftActionText ) #### Right View #### setViewRightActionText = "<u><b>Right View</b></u><br>"\ "<p><img source=\"setViewRight\"><br> "\ "Reorients the model so that it is viewed from the right side."\ "</p>" QMimeSourceFactory.defaultFactory().setPixmap( "setViewRight", self.setViewRightAction.iconSet().pixmap() ) self.setViewRightAction.setWhatsThis( setViewRightActionText ) #### Opposite View #### setViewOppositeActionText = "<u><b>Opposite View</b></u><br>"\ "<p><img source=\"setViewOpposite\"><br> "\ "Reorients the model so that it is viewed from the opposite side of the current view."\ "</p>" QMimeSourceFactory.defaultFactory().setPixmap( "setViewOpposite", self.setViewOppositeAction.iconSet().pixmap() ) self.setViewOppositeAction.setWhatsThis( setViewOppositeActionText ) ############################################## # Grids Toolbar ############################################## #### Surface 100 #### orient100ActionText = "<u><b>Surface 100</b></u><br>"\ "<p><img source=\"orient100Action\"><br> "\ "Reorients the view to the nearest angle that would "\ "look straight into a (1,0,0) surface of a diamond lattice."\ "</p>" QMimeSourceFactory.defaultFactory().setPixmap( "orient100Action", self.orient100Action.iconSet().pixmap() ) self.orient100Action.setWhatsThis(orient100ActionText ) #### Surface 110 #### orient110ActionText = "<u><b>Surface 110</b></u><br>"\ "<p><img source=\"orient110Action\"><br> "\ "Reorients the view to the nearest angle that would "\ "look straight into a (1,1,0) surface of a diamond lattice."\ "</p>" QMimeSourceFactory.defaultFactory().setPixmap( "orient110Action", self.orient110Action.iconSet().pixmap() ) self.orient110Action.setWhatsThis(orient110ActionText ) #### Surface 111 #### orient111ActionText = "<u><b>Surface 111</b></u><br>"\ "<p><img source=\"orient111Action\"><br> "\ "Reorients the view to the nearest angle that would "\ "look straight into a (1,1,1) surface of a diamond lattice."\ "</p>" QMimeSourceFactory.defaultFactory().setPixmap( "orient111Action", self.orient111Action.iconSet().pixmap() ) self.orient111Action.setWhatsThis(orient111ActionText ) ############################################## # Molecular Display toolbar ############################################## #### Display Default #### dispDefaultActionText = "<u><b>Display Default</b></u><br>"\ "<p><img source=\"dispDefaultAction\"><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>General</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>" QMimeSourceFactory.defaultFactory().setPixmap( "dispDefaultAction", self.dispDefaultAction.iconSet().pixmap() ) self.dispDefaultAction.setWhatsThis(dispDefaultActionText ) #### Display Invisible #### dispInvisActionText = "<u><b>Display Invisible</b></u><br>"\ "<p><img source=\"dispInvisAction\"><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>" QMimeSourceFactory.defaultFactory().setPixmap( "dispInvisAction", self.dispInvisAction.iconSet().pixmap() ) self.dispInvisAction.setWhatsThis(dispInvisActionText ) #### Display Lines #### dispLinesActionText = "<u><b>Display Lines</b></u><br>"\ "<p><img source=\"dispLinesAction\"><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>" QMimeSourceFactory.defaultFactory().setPixmap( "dispLinesAction", self.dispLinesAction.iconSet().pixmap() ) self.dispLinesAction.setWhatsThis(dispLinesActionText ) #### Display Tubes #### dispTubesActionText = "<u><b>Display Tubes</b></u><br>"\ "<p><img source=\"dispTubesAction\"><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>" QMimeSourceFactory.defaultFactory().setPixmap( "dispTubesAction", self.dispTubesAction.iconSet().pixmap() ) self.dispTubesAction.setWhatsThis(dispTubesActionText ) #### Display CPK #### dispCPKActionText = "<u><b>Display CPK</b></u><br>"\ "<p><img source=\"dispCPKAction\"><br> "\ "Changes the <i>display setting</i> of selected atoms or chunks to "\ "<b>CPK</b> mode, also known as <b>\"Ball and Sticks\"</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>CPK</b>. " \ "All chunks with their display setting set to <b>Default</b> will inherit "\ "this display property."\ "</p>" QMimeSourceFactory.defaultFactory().setPixmap( "dispCPKAction", self.dispCPKAction.iconSet().pixmap() ) self.dispCPKAction.setWhatsThis(dispCPKActionText ) #### Display VdW #### dispVdWActionText = "<u><b>Display VdW</b></u><br>"\ "<p><img source=\"dispVdWAction\"><br> "\ "Changes the <i>display setting</i> of selected atoms or chunks to "\ "<b>Van der Waals</b> mode. Atoms are rendered as spheres with "\ "a size equal to the VdW radius. 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>VdW</b>. " \ "All chunks with their display setting set to <b>Default</b> will inherit "\ "this display property."\ "</p>" QMimeSourceFactory.defaultFactory().setPixmap( "dispVdWAction", self.dispVdWAction.iconSet().pixmap() ) self.dispVdWAction.setWhatsThis(dispVdWActionText ) ############################################## # Select toolbar ############################################## #### Select All #### selectAllActionText = "<u><b>Select All</b></u> (Ctrl + A)</b></p><br>"\ "<p><img source=\"selectAllAction\"><br> "\ "During <b>Select Atoms</b> mode, this will select all the atoms in "\ "the model. Otherwise, this will select all the chunks in the model."\ "</p>" QMimeSourceFactory.defaultFactory().setPixmap( "selectAllAction", self.selectAllAction.iconSet().pixmap() ) self.selectAllAction.setWhatsThis(selectAllActionText ) #### Select None #### selectNoneActionText = "<u><b>Select None</b></u> (Ctrl + D)</b></p><br>"\ "<p><img source=\"selectNoneAction\"><br> "\ "Unselects anything currently selected.</p>" QMimeSourceFactory.defaultFactory().setPixmap( "selectNoneAction", self.selectNoneAction.iconSet().pixmap() ) self.selectNoneAction.setWhatsThis(selectNoneActionText ) #### Invert Selection #### selectInvertActionText = "<u><b>Invert Selection</b></u> <br> (Ctrl + Shift + I)</b></p><br>"\ "<p><img source=\"selectInvertAction\"><br> "\ "Inverts the current selection.</p>" QMimeSourceFactory.defaultFactory().setPixmap( "selectInvertAction", self.selectInvertAction.iconSet().pixmap() ) self.selectInvertAction.setWhatsThis(selectInvertActionText ) #### Select Connected #### selectConnectedActionText = "<u><b>Select Connected</b></u> (Ctrl + Shift + C)</b></p><br>"\ "<p><img source=\"selectConnectedAction\"><br> "\ "Selects all the atoms that can be reached by the currently selected atom "\ "via an unbroken chain of bonds. </p>"\ "<p>To use this feature, you must first be in "\ "<b>Select Atoms</b> mode and select at least one atom.</p>" QMimeSourceFactory.defaultFactory().setPixmap( "selectConnectedAction", self.selectConnectedAction.iconSet().pixmap() ) self.selectConnectedAction.setWhatsThis(selectConnectedActionText ) #### Select Doubly #### selectDoublyActionText = "<u><b>Select Doubly</b></u> (Ctrl + Shift + D)</b></p><br>"\ "<p><img source=\"selectDoublyAction\"><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>"\ "<p>To use this feature, you must first be in "\ "<b>Select Atoms</b> mode and select at least one atom.</p>" QMimeSourceFactory.defaultFactory().setPixmap( "selectDoublyAction", self.selectDoublyAction.iconSet().pixmap() ) self.selectDoublyAction.setWhatsThis(selectDoublyActionText ) ############################################## # Modify Toolbar ############################################## #### Minimize Selection #### modifyMinimizeSelActionText = "<u><b>Minimize Selection</b></u> (Ctrl + M)</b></p><br>"\ "<p><img source=\"modifyMinimizeSelAction\"><br> "\ "Arranges the atoms (<i>of the current selection</i>) to their chemically stable point of "\ "equilibrium in reference to the other atoms in the structure."\ "</p>" QMimeSourceFactory.defaultFactory().setPixmap( "modifyMinimizeSelAction", self.modifyMinimizeSelAction.iconSet().pixmap() ) self.modifyMinimizeSelAction.setWhatsThis(modifyMinimizeSelActionText ) #### Minimize All #### modifyMinimizeAllActionText = "<u><b>Minimize All</b></u></p><br>"\ "<p><img source=\"modifyMinimizeAllAction\"><br> "\ "Arranges the atoms (<i>of the entire part</i>) to their chemically stable point of "\ "equilibrium in reference to the other atoms in the structure."\ "</p>" QMimeSourceFactory.defaultFactory().setPixmap( "modifyMinimizeAllAction", self.modifyMinimizeAllAction.iconSet().pixmap() ) self.modifyMinimizeAllAction.setWhatsThis(modifyMinimizeAllActionText ) #### Hydrogenate #### modifyHydrogenateActionText = "<u><b>Hydrogenate</b></u> (Ctrl + H)</b></p><br>"\ "<p><img source=\"modifyHydrogenateAction\"><br> "\ "Adds hydrogen atoms to all the open bonds in the selection.</p>" QMimeSourceFactory.defaultFactory().setPixmap( "modifyHydrogenateAction", self.modifyHydrogenateAction.iconSet().pixmap() ) self.modifyHydrogenateAction.setWhatsThis(modifyHydrogenateActionText ) #### Dehydrogenate #### modifyDehydrogenateActionText = "<u><b>Dehydrogenate</b></u><br>"\ "<p><img source=\"modifyDehydrogenateAction\"><br> "\ "Removes all hydrogen atoms from the selection.</p>" QMimeSourceFactory.defaultFactory().setPixmap( "modifyDehydrogenateAction", self.modifyDehydrogenateAction.iconSet().pixmap() ) self.modifyDehydrogenateAction.setWhatsThis(modifyDehydrogenateActionText ) #### Passivate #### modifyPassivateActionText = "<u><b>Passivate</b></u> (Ctrl + P)</b></p><br>"\ "<p><img source=\"modifyPassivateAction\"><br> "\ "Changes the types of incompletely bonded atoms to atoms with the "\ "right number of bonds, using atoms with the best atomic radius."\ "</p>" QMimeSourceFactory.defaultFactory().setPixmap( "modifyPassivateAction", self.modifyPassivateAction.iconSet().pixmap() ) self.modifyPassivateAction.setWhatsThis(modifyPassivateActionText ) #### Stretch #### modifyStretchActionText = "<u><b>Stretch</b></u><br>"\ "<p><img source=\"modifyStretchAction\"><br> "\ "Stretches the bonds of the selected chunk(s).</p>" QMimeSourceFactory.defaultFactory().setPixmap( "modifyStretchAction", self.modifyStretchAction.iconSet().pixmap() ) self.modifyStretchAction.setWhatsThis(modifyStretchActionText ) #### Delete Bonds #### modifyDeleteBondsActionText = "<u><b>Delete Bonds</b></u><br>"\ "<p><img source=\"modifyDeleteBondsAction\"><br> "\ "Delete all bonds between selected and unselected atoms or chunks.</p>" QMimeSourceFactory.defaultFactory().setPixmap( "modifyDeleteBondsAction", self.modifyDeleteBondsAction.iconSet().pixmap() ) self.modifyDeleteBondsAction.setWhatsThis(modifyDeleteBondsActionText ) #### Separate #### modifySeparateActionText = "<u><b>Separate</b></u><br>"\ "<p><img source=\"modifySeparateAction\"><br> "\ "Creates a new chunk from the currently selected atoms.</p>" QMimeSourceFactory.defaultFactory().setPixmap( "modifySeparateAction", self.modifySeparateAction.iconSet().pixmap() ) self.modifySeparateAction.setWhatsThis(modifySeparateActionText ) #### Merge Chunks #### modifyMergeActionText = "<u><b>Merge Chunks</b></u><br>"\ "<p><img source=\"modifyMergeAction\"><br> "\ "Merges two or more chunks into a single chunk.</p>" QMimeSourceFactory.defaultFactory().setPixmap( "modifyMergeAction", self.modifyMergeAction.iconSet().pixmap() ) self.modifyMergeAction.setWhatsThis(modifyMergeActionText ) #### Invert Chunks #### modifyInvertActionText = "<u><b>Invert</b></u><br>"\ "<p><img source=\"modifyInvertAction\"><br> "\ "Inverts the atoms of the selected chunks.</p>" QMimeSourceFactory.defaultFactory().setPixmap( "modifyInvertAction", self.modifyInvertAction.iconSet().pixmap() ) self.modifyInvertAction.setWhatsThis(modifyInvertActionText ) #### Align to Common Axis #### modifyAlignCommonAxisActionText = "<u><b>Align To Common Axis</b></u><br>"\ "<p><img source=\"modifyAlignCommonAxis\"><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>" QMimeSourceFactory.defaultFactory().setPixmap( "modifyAlignCommonAxis", self. modifyAlignCommonAxisAction.iconSet().pixmap() ) self. modifyAlignCommonAxisAction.setWhatsThis( modifyAlignCommonAxisActionText ) ############################################## # Tools Toolbar ############################################## #### Select Chunks #### toolsSelectMoleculesActionText = "<u><b>Select Chunks</b></u><br>"\ "<p><img source=\" toolsSelectMoleculesAction\"><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>" QMimeSourceFactory.defaultFactory().setPixmap( " toolsSelectMoleculesAction", self. toolsSelectMoleculesAction.iconSet().pixmap() ) self. toolsSelectMoleculesAction.setWhatsThis( toolsSelectMoleculesActionText ) #### Select Atoms #### toolsSelectAtomsActionText = "<u><b>Select Atoms</b></u><br>"\ "<p><img source=\" toolsSelectAtomsAction\"><br> "\ "<b>Select Atoms</b> allows you to select/unselect atoms with the mouse.</p>"\ "<p><b><u>Mouse/Key Combinations</u></b></p>"\ "<p><b>Left Click/Drag</b> - selects an atom(s).</p>"\ "<p><b>Ctrl+Left Click/Drag</b> - removes atom(s) from selection.</p>"\ "<p><b>Shift+Left Click/Drag</b> - adds atom(s) to selection."\ "</p>" QMimeSourceFactory.defaultFactory().setPixmap( " toolsSelectAtomsAction", self. toolsSelectAtomsAction.iconSet().pixmap() ) self. toolsSelectAtomsAction.setWhatsThis( toolsSelectAtomsActionText ) #### Move Chunks #### toolsMoveMoleculeActionText = "<u><b>Move Chunks</b></u><br>"\ "<p><img source=\" toolsMoveMoleculeAction\"><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>" QMimeSourceFactory.defaultFactory().setPixmap( " toolsMoveMoleculeAction", self. toolsMoveMoleculeAction.iconSet().pixmap() ) self. toolsMoveMoleculeAction.setWhatsThis( toolsMoveMoleculeActionText ) #### Build Atoms Tool #### toolsDepositAtomActionText = "<u><b>Build Tool</b></u><br>"\ "<p><img source=\" toolsDepositAtomAction\"><br> "\ "<b>Build Tool</b> allows you to deposit individual atoms or add/move/delete "\ "atoms from an existing chunk. Build Tool can also be used to paste "\ "copies of chunks from the clipboard into the part.</p>"\ "<p><b><u>Mouse/Key Combinations</u></b></p>"\ "<p><b>Left Click</b> - adds an atom or pastes a chunk from the clipboard. "\ "New atoms can be connected to an existing chunk if an open bond is highlighted "\ "during a left click.</p>"\ "<p><b>Ctrl+Left Click</b> - deletes a highlighted atom.</p>"\ "<p><b>Shift+Left Drag</b> - moves an atom or open bond. An open bond will be "\ "connected to another open bond if the mouse button is released over a different "\ "open bond."\ "</p>" QMimeSourceFactory.defaultFactory().setPixmap( " toolsDepositAtomAction", self. toolsDepositAtomAction.iconSet().pixmap() ) self. toolsDepositAtomAction.setWhatsThis( toolsDepositAtomActionText ) #### Cookie Cutter #### toolsCookieCutActionText = "<u><b>Cookie Cutter Tool</b></u><br>"\ "<p><><img source=\" toolsCookieCutAction\"><br> "\ "Activates <b>Cookie Cutter</b> mode, allowing you to cut out 3-D shapes from a "\ "slab of diamond lattice.</p>" QMimeSourceFactory.defaultFactory().setPixmap( " toolsCookieCutAction", self. toolsCookieCutAction.iconSet().pixmap() ) self. toolsCookieCutAction.setWhatsThis( toolsCookieCutActionText ) #### Extrude Tool #### toolsExtrudeActionText = "<u><b>Extrude Tool</b></u><br>"\ "<p><img source=\" toolsExtrudeAction\"><br> "\ "Activates <b>Extrude</b> mode, allowing you to create a rod or ring using a chunk as "\ "a repeating unit.</p>" QMimeSourceFactory.defaultFactory().setPixmap( " toolsExtrudeAction", self. toolsExtrudeAction.iconSet().pixmap() ) self. toolsExtrudeAction.setWhatsThis( toolsExtrudeActionText ) #### Fuse Chunks Tool #### toolsFuseChunksActionText = "<u><b>Fuse Chunks Tool</b></u><br>"\ "<p><img source=\" toolsFuseChunksAction\"><br> "\ "<b>Fuse Chunks</b> creates bonds between two or more chunks.</p>" QMimeSourceFactory.defaultFactory().setPixmap( " toolsFuseChunksAction", self. toolsFuseChunksAction.iconSet().pixmap() ) self.toolsFuseChunksAction.setWhatsThis( toolsFuseChunksActionText ) #### Movie Player #### simMoviePlayerActionText = "<u><b>Movie Player</b></u><br>"\ "<p><img source=\" simMoviePlayerAction\"><br> "\ "Plays the most recent trajectory (movie) file created by the <b>Simulator</b>.</p>" QMimeSourceFactory.defaultFactory().setPixmap( " simMoviePlayerAction", self. simMoviePlayerAction.iconSet().pixmap() ) self. simMoviePlayerAction.setWhatsThis( simMoviePlayerActionText ) #### Simulator #### simSetupActionText = "<u><b>Simulator</b></u><br>"\ "<p><img source=\" simSetupAction\"><br> "\ "Creates a trajectory (movie) file by calculating the inter-atomic potentials and bonding "\ "of the entire model. The user determines the number of frames in the movie, the time step, "\ "and the temperature for the simulation.</p>" QMimeSourceFactory.defaultFactory().setPixmap( " simSetupAction", self. simSetupAction.iconSet().pixmap() ) self. simSetupAction.setWhatsThis( simSetupActionText ) #### Plot Tool #### simPlotToolActionText = "<u><b>Plot Tool</b></u><br>"\ "<p><img source=\" simPlotToolAction\"><br> "\ "Plots 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>Grounds:</b> torque (nn-nm)<br>"\ "<b>Thermostats:</b> energy added (zJ)<br>"\ "<b>Thermometer:</b> temperature (K)<br>"\ "</p>" QMimeSourceFactory.defaultFactory().setPixmap( " simPlotToolAction", self. simPlotToolAction.iconSet().pixmap() ) self. simPlotToolAction.setWhatsThis( simPlotToolActionText ) ############################################## # Dashboard Buttons ############################################## #### Done #### toolsDoneActionText = "<u><b>Done</b></u><br>"\ "<p><img source=\" toolsDoneAction\"><br> "\ "Completes the current operation and enters Select Chunks mode."\ "</p>" QMimeSourceFactory.defaultFactory().setPixmap( " toolsDoneAction", self. toolsDoneAction.iconSet().pixmap() ) self. toolsDoneAction.setWhatsThis( toolsDoneActionText ) #### Cancel #### toolsCancelActionText = "<u><b>Cancel</b></u><br>"\ "<p><img source=\" toolsCancelAction\"><br> "\ "Cancels the current operation and enters Select Chunks mode."\ "</p>" QMimeSourceFactory.defaultFactory().setPixmap( " toolsCancelAction", self.toolsCancelAction.iconSet().pixmap() ) self. toolsCancelAction.setWhatsThis( toolsCancelActionText ) #### Back up #### toolsBackUpActionText = "<u><b>Back Up</b></u><br>"\ "<p><img source=\" toolsBackUpAction\"><br> "\ "Undoes the previous operation."\ "</p>" QMimeSourceFactory.defaultFactory().setPixmap( " toolsBackUpAction", self.toolsBackUpAction.iconSet().pixmap() ) self. toolsBackUpAction.setWhatsThis( toolsBackUpActionText ) #### Start Over #### toolsStartOverActionText = "<u><b>Start Over</b></u><br>"\ "<p><img source=\"toolsStartOverAction\"><br> "\ "Cancels the current operation, leaving the user in the current mode."\ "</p>" QMimeSourceFactory.defaultFactory().setPixmap( "toolsStartOverAction", self.toolsStartOverAction.iconSet().pixmap() ) self.toolsStartOverAction.setWhatsThis(toolsStartOverActionText ) #### Add Layers #### ccAddLayerActionText = "<u><b>Add Layer</b></u><br>"\ "<p><img source=\"ccAddLayerAction\"><br> "\ "Adds a new layer of diamond lattice to the existing layer.</p>" QMimeSourceFactory.defaultFactory().setPixmap( "ccAddLayerAction", self.ccAddLayerAction.iconSet().pixmap() ) self.ccAddLayerAction.setWhatsThis(ccAddLayerActionText ) ############################################## # Jigs ############################################## #### Ground #### jigsGroundActionText = "<u><b>Ground</b></u><br>"\ "<p><img source=\"jigsGroundAction\"><br> "\ "Attaches a <b>Ground</b> (anchor) to the selected atom(s), which "\ "constrains its motion during a simulation.</p>"\ "<p>To create a Ground, enter <b>Select Atoms</b> mode, "\ "select the atom(s) you want to anchor and then select this action. "\ "Grounds are drawn as a black wireframe box around each selected atom.</p>" QMimeSourceFactory.defaultFactory().setPixmap( "jigsGroundAction", self.jigsGroundAction.iconSet().pixmap() ) self.jigsGroundAction.setWhatsThis(jigsGroundActionText ) #### Rotary Motor #### jigsMotorActionText = "<u><b>Rotary Motor</b></u><br>"\ "<p><img source=\"jigsMotorAction\"><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>Select Atoms</b> mode, "\ "select the atoms you want to attach the motor to and then select this action.</p>" QMimeSourceFactory.defaultFactory().setPixmap( "jigsMotorAction", self.jigsMotorAction.iconSet().pixmap() ) self.jigsMotorAction.setWhatsThis(jigsMotorActionText ) #### Linear Motor #### jigsLinearMotorActionText = "<u><b>Linear Motor</b></u><br>"\ "<p><img source=\"jigsLinearMotorAction\"><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>Select Atoms</b> mode, "\ "select the atoms you want to attach the motor to and then select this action.</p>" QMimeSourceFactory.defaultFactory().setPixmap( "jigsLinearMotorAction", self.jigsLinearMotorAction.iconSet().pixmap() ) self.jigsLinearMotorAction.setWhatsThis(jigsLinearMotorActionText ) #### Thermostat #### jigsStatActionText = "<u><b>Thermostat</b></u><br>"\ "<p><img source=\"jigsStatAction\"><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>Select Atoms</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>" QMimeSourceFactory.defaultFactory().setPixmap( "jigsStatAction", self.jigsStatAction.iconSet().pixmap() ) self.jigsStatAction.setWhatsThis(jigsStatActionText ) #### Thermometer #### jigsThermoActionText = "<u><b>Thermometer</b></u><br>"\ "<p><img source=\"jigsThermoAction\"><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>Select Atoms</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>" QMimeSourceFactory.defaultFactory().setPixmap( "jigsThermoAction", self.jigsThermoAction.iconSet().pixmap() ) self.jigsThermoAction.setWhatsThis(jigsThermoActionText ) ############################################## # Display ############################################## #### Display Object Color #### dispObjectColorActionText = "<u><b>Object Color</b></u><br>"\ "<p><img source=\"dispObjectColorAction\"><br> "\ "Allows you to change the color of the selected object(s).</p>" QMimeSourceFactory.defaultFactory().setPixmap( "dispObjectColorAction", self.dispObjectColorAction.iconSet().pixmap() ) self.dispObjectColorAction.setWhatsThis(dispObjectColorActionText ) #### Display Background Color #### dispBGColorActionText = "<u><b>Background Color</b></u><br>"\ "<p><img source=\"dispBGColorAction\"><br> "\ "Allows you to change the background color of the main window.</p>" QMimeSourceFactory.defaultFactory().setPixmap( "dispBGColorAction", self.dispBGColorAction.iconSet().pixmap() ) self.dispBGColorAction.setWhatsThis(dispBGColorActionText ) ############################################## # Help Toolbar ############################################## #### NE-1 Assistant #### helpAssistantText = "<u><b>nanoENGINEER-1 Assistant</b></u><br>"\ "<p><img source=\"helpAssistant\"><br> "\ "Opens <b>nanoENGINEER-1 Assistant</b>, "\ "the nanoENGINEER-1 Reference Documentation.</p>" QMimeSourceFactory.defaultFactory().setPixmap( "helpAssistant", self.helpAssistantAction.iconSet().pixmap() ) self.helpAssistantAction.setWhatsThis( helpAssistantText ) #### What's This #### helpWhatsThisText = "<u><b>What's This</b></u><br>"\ "<p><img source=\"helpWhatsThis\"><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>" QMimeSourceFactory.defaultFactory().setPixmap( "helpWhatsThis", self.helpWhatsThisAction.iconSet().pixmap() ) self.helpWhatsThisAction.setWhatsThis( helpWhatsThisText ) ############################################## # Datum Display Toolbar ############################################## #### Display Trihedron #### dispTrihedronText = "<u><b>Display Trihedron</b></u><br>"\ "<p><img source=\"dispTrihedron\"><br> "\ "Toggles the trihedron on and off.</p>" QMimeSourceFactory.defaultFactory().setPixmap( "dispTrihedron", self.dispTrihedronAction.iconSet().pixmap() ) self.dispTrihedronAction.setWhatsThis(dispTrihedronText ) #### Display Csys #### dispCsysText = "<u><b>Display Csys Axis</b></u><br>"\ "<p><img source=\"dispCsys\"><br> "\ "Toggles the coordinate system axis on and off."\ "</p>" QMimeSourceFactory.defaultFactory().setPixmap( "dispCsys", self.dispCsysAction.iconSet().pixmap() ) self.dispCsysAction.setWhatsThis(dispCsysText ) #### Display Datum Lines #### dispDatumLinesText = "<u><b>Display Datum Lines</b></u><br>"\ "<p><img source=\"dispDatumLines\"><br> "\ "Toggles Datum Lines on and off.</p>" QMimeSourceFactory.defaultFactory().setPixmap( "dispDatumLines", self.dispDatumLinesAction.iconSet().pixmap() ) self.dispDatumLinesAction.setWhatsThis(dispDatumLinesText ) #### Display Datum Planes #### dispDatumPlanesText = "<u><b>Display Datum Planes</b></u><br>"\ "<p><img source=\"dispDatumPlanes\"><br> "\ "Toggles Datum Planes on and off.</p>" QMimeSourceFactory.defaultFactory().setPixmap( "dispDatumPlanes", self.dispDatumPlanesAction.iconSet().pixmap() ) self.dispDatumPlanesAction.setWhatsThis(dispDatumPlanesText ) #### Display Grid #### dispGridText = "<u><b>Display 3-D Grid</b></u><br>"\ "<p><img source=\"dispGrid\"><br> "\ "Toggles the 3-D grid on and off."\ "</p>" QMimeSourceFactory.defaultFactory().setPixmap( "dispGrid", self.dispGridAction.iconSet().pixmap() ) self.dispGridAction.setWhatsThis(dispGridText ) #### Display Open Bonds #### dispOpenBondsText = "<u><b>Display Singlets</b></u><br>"\ "<p><img source=\"dispOpenBonds\"><br> "\ "Toggles Singlets on and off."\ "</p>" QMimeSourceFactory.defaultFactory().setPixmap( "dispOpenBonds", self.dispOpenBondsAction.iconSet().pixmap() ) self.dispOpenBondsAction.setWhatsThis(dispOpenBondsText ) | 7481ec758d2b51f90336c6b20958ab53654f057f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/7481ec758d2b51f90336c6b20958ab53654f057f/whatsthis.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
2888,
2323,
2503,
12,
2890,
4672,
225,
19709,
26487,
7,
468,
1387,
13288,
3215,
19709,
26487,
7,
225,
11849,
7,
3502,
1387,
11849,
7,
225,
585,
3678,
1528,
273,
3532,
89,
4438,
70,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
2888,
2323,
2503,
12,
2890,
4672,
225,
19709,
26487,
7,
468,
1387,
13288,
3215,
19709,
26487,
7,
225,
11849,
7,
3502,
1387,
11849,
7,
225,
585,
3678,
1528,
273,
3532,
89,
4438,
70,
... |
print change | def itemChange(self, change, value): print change if change == QGraphicsItem.ItemScenePositionHasChanged: self.updateModel() return AnnotationGraphicsItem.itemChange(self, change, value) | 3aa920cf0f46c558617dc95d264f22b8d33e3a44 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/142/3aa920cf0f46c558617dc95d264f22b8d33e3a44/annotationitem.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
761,
3043,
12,
2890,
16,
2549,
16,
460,
4672,
309,
2549,
422,
2238,
17558,
1180,
18,
1180,
14370,
2555,
5582,
5033,
30,
365,
18,
2725,
1488,
1435,
327,
6090,
17558,
1180,
18,
1726,
3043,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
761,
3043,
12,
2890,
16,
2549,
16,
460,
4672,
309,
2549,
422,
2238,
17558,
1180,
18,
1180,
14370,
2555,
5582,
5033,
30,
365,
18,
2725,
1488,
1435,
327,
6090,
17558,
1180,
18,
1726,
3043,... | |
_CA = rffi.CArray(lltype.Signed) | class FloatArrayDescr(BaseArrayDescr): _clsname = 'FloatArrayDescr' _is_array_of_floats = True def get_base_size(self, translate_support_code): basesize, _, _ = symbolic.get_array_token(_AF, translate_support_code) return basesize def get_item_size(self, translate_support_code): return symbolic.get_size(lltype.Float, translate_support_code) | def get_item_size(self, translate_support_code): return symbolic.get_size_of_ptr(translate_support_code) | 9d774359507239b36f0fcdd797dd48cbb6d355b4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6934/9d774359507239b36f0fcdd797dd48cbb6d355b4/descr.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
1726,
67,
1467,
12,
2890,
16,
4204,
67,
13261,
67,
710,
4672,
327,
16754,
18,
588,
67,
1467,
67,
792,
67,
6723,
12,
13929,
67,
13261,
67,
710,
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,
336,
67,
1726,
67,
1467,
12,
2890,
16,
4204,
67,
13261,
67,
710,
4672,
327,
16754,
18,
588,
67,
1467,
67,
792,
67,
6723,
12,
13929,
67,
13261,
67,
710,
13,
2,
-100,
-100,
-100,
-100,... |
aliases.insert(0, hostname) for name in aliases: if '.' in name: break else: name = hostname | name = hostname | def _get_fqdn_hostname(name): name = string.strip(name) if len(name) == 0: name = socket.gethostname() try: hostname, aliases, ipaddrs = socket.gethostbyaddr(name) except socket.error: pass else: aliases.insert(0, hostname) for name in aliases: if '.' in name: break else: name = hostname return name | 8b02e78666898f52bb009583d37a47f330b55958 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/8b02e78666898f52bb009583d37a47f330b55958/smtplib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
67,
19206,
5176,
67,
10358,
12,
529,
4672,
508,
273,
533,
18,
6406,
12,
529,
13,
309,
562,
12,
529,
13,
422,
374,
30,
508,
273,
2987,
18,
75,
546,
669,
529,
1435,
775,
30... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
67,
19206,
5176,
67,
10358,
12,
529,
4672,
508,
273,
533,
18,
6406,
12,
529,
13,
309,
562,
12,
529,
13,
422,
374,
30,
508,
273,
2987,
18,
75,
546,
669,
529,
1435,
775,
30... |
s += ' </span>' | s += ' </tt>' | # function def block, then self.def_name will be its name; | cd4d6e5fbca5f698866ebe3598f5c2ca592983e0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11420/cd4d6e5fbca5f698866ebe3598f5c2ca592983e0/html_colorize.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
468,
445,
1652,
1203,
16,
1508,
365,
18,
536,
67,
529,
903,
506,
2097,
508,
31,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
468,
445,
1652,
1203,
16,
1508,
365,
18,
536,
67,
529,
903,
506,
2097,
508,
31,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
self.assertEqual([('gtest1.osuosl.bak', 'gtest1.osuosl.bak'), ('gtest2.osuosl.bak', 'gtest2.osuosl.bak')], form.fields['pnode'].choices) self.assertEqual([('gtest1.osuosl.bak', 'gtest1.osuosl.bak'), ('gtest2.osuosl.bak', 'gtest2.osuosl.bak')], form.fields['snode'].choices) self.assertEqual([('image+debian-osgeo', 'image+debian-osgeo'), ('image+ubuntu-lucid', 'image+ubuntu-lucid')], form.fields['os'].choices) | self.assertEqual([(u'', u'---------'), ('gtest1.osuosl.bak', 'gtest1.osuosl.bak'), ('gtest2.osuosl.bak', 'gtest2.osuosl.bak')], form.fields['pnode'].choices) self.assertEqual([(u'', u'---------'), ('gtest1.osuosl.bak', 'gtest1.osuosl.bak'), ('gtest2.osuosl.bak', 'gtest2.osuosl.bak')], form.fields['snode'].choices) self.assertEqual([(u'', u'---------'), ('image+debian-osgeo', 'image+debian-osgeo'), ('image+ubuntu-lucid', 'image+ubuntu-lucid')], form.fields['os'].choices) | def test_cluster_init(self): """ Tests initializing a form with a Cluster Verifies: * cluster choices are set correctly * node choices are set correctly """ # no cluster form = NewVirtualMachineForm(user, None) self.assertEqual([], form.fields['pnode'].choices) self.assertEqual([], form.fields['snode'].choices) self.assertEqual([], form.fields['os'].choices) # cluster provided form = NewVirtualMachineForm(user, cluster0) self.assertEqual([('gtest1.osuosl.bak', 'gtest1.osuosl.bak'), ('gtest2.osuosl.bak', 'gtest2.osuosl.bak')], form.fields['pnode'].choices) self.assertEqual([('gtest1.osuosl.bak', 'gtest1.osuosl.bak'), ('gtest2.osuosl.bak', 'gtest2.osuosl.bak')], form.fields['snode'].choices) self.assertEqual([('image+debian-osgeo', 'image+debian-osgeo'), ('image+ubuntu-lucid', 'image+ubuntu-lucid')], form.fields['os'].choices) # cluster from initial data form = NewVirtualMachineForm(user, None, {'cluster':cluster0.id}) self.assertEqual([('gtest1.osuosl.bak', 'gtest1.osuosl.bak'), ('gtest2.osuosl.bak', 'gtest2.osuosl.bak')], form.fields['pnode'].choices) self.assertEqual([('gtest1.osuosl.bak', 'gtest1.osuosl.bak'), ('gtest2.osuosl.bak', 'gtest2.osuosl.bak')], form.fields['snode'].choices) self.assertEqual([('image+debian-osgeo', 'image+debian-osgeo'), ('image+ubuntu-lucid', 'image+ubuntu-lucid')], form.fields['os'].choices) # cluster from initial data form = NewVirtualMachineForm(user, cluster0, {'cluster':cluster0.id}) self.assertEqual([('gtest1.osuosl.bak', 'gtest1.osuosl.bak'), ('gtest2.osuosl.bak', 'gtest2.osuosl.bak')], form.fields['pnode'].choices) self.assertEqual([('gtest1.osuosl.bak', 'gtest1.osuosl.bak'), ('gtest2.osuosl.bak', 'gtest2.osuosl.bak')], form.fields['snode'].choices) self.assertEqual([('image+debian-osgeo', 'image+debian-osgeo'), ('image+ubuntu-lucid', 'image+ubuntu-lucid')], form.fields['os'].choices) | 24f9e7c656b777dc4d3a6abae2b2f265db998841 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10509/24f9e7c656b777dc4d3a6abae2b2f265db998841/virtual_machine.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
7967,
67,
2738,
12,
2890,
4672,
3536,
7766,
87,
22584,
279,
646,
598,
279,
5584,
225,
6160,
5032,
30,
380,
2855,
7246,
854,
444,
8783,
380,
756,
7246,
854,
444,
8783,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
7967,
67,
2738,
12,
2890,
4672,
3536,
7766,
87,
22584,
279,
646,
598,
279,
5584,
225,
6160,
5032,
30,
380,
2855,
7246,
854,
444,
8783,
380,
756,
7246,
854,
444,
8783,
3536,
2... |
i = len(self) - l | i = len(self) - L | def rfind(self, sub, start=0, end=None): r""" Returns the index of the last occurrence of sub in self, such that sub is contained within self[start:end]. Returns -1 on failure. INPUT: | ac01f803958583026685031a12eb209830c3f54d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/ac01f803958583026685031a12eb209830c3f54d/word.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
31257,
12,
2890,
16,
720,
16,
787,
33,
20,
16,
679,
33,
7036,
4672,
436,
8395,
2860,
326,
770,
434,
326,
1142,
13083,
434,
720,
316,
365,
16,
4123,
716,
720,
353,
7542,
3470,
365,
63... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
31257,
12,
2890,
16,
720,
16,
787,
33,
20,
16,
679,
33,
7036,
4672,
436,
8395,
2860,
326,
770,
434,
326,
1142,
13083,
434,
720,
316,
365,
16,
4123,
716,
720,
353,
7542,
3470,
365,
63... |
self.flush_move_actions() | self.flush_delayed_actions() | def paste_modules_and_connections(self, str, center): """ paste_modules_and_connections(str, center: (float, float)) -> [id list] Paste a list of modules and connections into the current pipeline. | 79dd982e6cefb84d959fc7a4fd17507a2c038301 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6341/79dd982e6cefb84d959fc7a4fd17507a2c038301/vistrail_controller.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
19401,
67,
6400,
67,
464,
67,
13313,
12,
2890,
16,
609,
16,
4617,
4672,
3536,
19401,
67,
6400,
67,
464,
67,
13313,
12,
701,
16,
4617,
30,
261,
5659,
16,
1431,
3719,
317,
306,
350,
66... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
19401,
67,
6400,
67,
464,
67,
13313,
12,
2890,
16,
609,
16,
4617,
4672,
3536,
19401,
67,
6400,
67,
464,
67,
13313,
12,
701,
16,
4617,
30,
261,
5659,
16,
1431,
3719,
317,
306,
350,
66... |
'scons clean', | 'scons -c', | def ellapsedTime(): global startTime return time.time() - startTime | 81277d217c1c7a095149338395b02cbe971561fb /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1456/81277d217c1c7a095149338395b02cbe971561fb/clam_testfarm_client.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
415,
13886,
950,
13332,
2552,
8657,
327,
813,
18,
957,
1435,
300,
8657,
225,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
415,
13886,
950,
13332,
2552,
8657,
327,
813,
18,
957,
1435,
300,
8657,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
"%(amount)s free on disk (%(available)s below available limit)", | "%(available)s below downloads space limit (%(amount)s free on disk)", | def update_free_space(self): """Updates the free space text on the downloads tab. | 273db3f03be240944ee4f23f2ca6eb200f589ec4 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12354/273db3f03be240944ee4f23f2ca6eb200f589ec4/itemlistwidgets.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
67,
9156,
67,
2981,
12,
2890,
4672,
3536,
5121,
326,
4843,
3476,
977,
603,
326,
23011,
3246,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
67,
9156,
67,
2981,
12,
2890,
4672,
3536,
5121,
326,
4843,
3476,
977,
603,
326,
23011,
3246,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
spec = value.isSpecial() | spec = v.isSpecial() | def _getattr(ex,attr): # a 'smart' function tries to access an attribute first by reference, then by name spec = 0 try: v = ex[attr] except: # perhaps the domain changed try: v = ex[attr.name] except: warnings.warn("Missing attribute %s"%attr.name) v = attr.values[0] spec = 1 if spec == 0: try: spec = value.isSpecial() except: pass return (v,spec) | 62a76fcb35e711aeec964c51e50206d823ff8914 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6366/62a76fcb35e711aeec964c51e50206d823ff8914/orng2Array.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
1747,
12,
338,
16,
1747,
4672,
468,
279,
296,
26416,
11,
445,
9327,
358,
2006,
392,
1566,
1122,
635,
2114,
16,
1508,
635,
508,
857,
273,
374,
775,
30,
331,
273,
431,
63,
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,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
1747,
12,
338,
16,
1747,
4672,
468,
279,
296,
26416,
11,
445,
9327,
358,
2006,
392,
1566,
1122,
635,
2114,
16,
1508,
635,
508,
857,
273,
374,
775,
30,
331,
273,
431,
63,
17... |
b = Radiobutton(oframe2, text=name, var=css_var, value=name, selectcolor=' **BUTTON_CONFIG) b.grid(row=i, col=1, sticky='w') l = Label(oframe2, text=descr, **COLOR_CONFIG) l.grid(row=i, col=2, columnspan=2, sticky='w') i += 1 b = Radiobutton(oframe2, text='Select File', var=css_var, value='-other-', selectcolor=' **BUTTON_CONFIG) b.grid(row=i, col=1, sticky='w') self._css_entry = Entry(oframe2, **COLOR_CONFIG) self._css_entry.grid(row=i, col=2, sticky='ew') self._css_browse = Button(oframe2, text="Browse", | b = Radiobutton(oframe6, var=css_var, value=name, **CBUTTON_CONFIG) b.grid(row=row, col=0, sticky='e') b = Radiobutton(oframe6, var=private_css_var, value=name, text=name, **CBUTTON_CONFIG) b.grid(row=row, col=1, sticky='w') l = Label(oframe6, text=descr, **COLOR_CONFIG) l.grid(row=row, col=2, sticky='w') row += 1 b = Radiobutton(oframe6, var=css_var, value='-other-', **CBUTTON_CONFIG) b.grid(row=row, col=0, sticky='e') b = Radiobutton(oframe6, text='Select File', var=private_css_var, value='-other-', **CBUTTON_CONFIG) b.grid(row=row, col=1, sticky='w') self._css_entry = Entry(oframe6, **ENTRY_CONFIG) self._css_entry.grid(row=row, col=2, sticky='ew') self._css_browse = Button(oframe6, text="Browse", | def _css_sort(css1, css2): if css1[0] == 'default': return -1 elif css2[0] == 'default': return 1 else: return cmp(css1[0], css2[0]) | 19275515c1011eb2ed1be810d73cf19c849a3b63 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/19275515c1011eb2ed1be810d73cf19c849a3b63/gui.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
5212,
67,
3804,
12,
5212,
21,
16,
3747,
22,
4672,
309,
3747,
21,
63,
20,
65,
422,
296,
1886,
4278,
327,
300,
21,
1327,
3747,
22,
63,
20,
65,
422,
296,
1886,
4278,
327,
404,
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,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
5212,
67,
3804,
12,
5212,
21,
16,
3747,
22,
4672,
309,
3747,
21,
63,
20,
65,
422,
296,
1886,
4278,
327,
300,
21,
1327,
3747,
22,
63,
20,
65,
422,
296,
1886,
4278,
327,
404,
46... |
self.cf.AddSaveFrame("some_name",bb) | self.cf["saves"]["some_name"]=bb ddl1dic = CifFile.CifDic("dictionaries/cif_core.dic") class DictTestCase(unittest.TestCase): def setUp(self): pass def tearDown(self): pass def testnum_and_esd(self): """Test conversion of numbers with esds""" testnums = ["5.65","-76.24(3)","8(2)","6.24(3)e3","55.2(2)d4"] res = map(CifFile.get_number_with_esd,testnums) print `res` self.failUnless(res[0]==(5.65,None)) self.failUnless(res[1]==(-76.24,0.03)) self.failUnless(res[2]==(8,2)) self.failUnless(res[3]==(6240,30)) self.failUnless(res[4]==(552000,2000)) def testdot(self): """Make sure a single dot is skipped""" res1,res2 = CifFile.get_number_with_esd(".") self.failUnless(res1==None) | def testAddSaveFrame(self): """Test adding a save frame""" s_items = (('_sitem_1','Some save data'), ('_sitem_2','Some_underline_data'), ('_sitem_3','34.2332'), ('_sitem_4','Some very long data which we hope will overflow the single line and force printing of another line aaaaa bbbbbb cccccc dddddddd eeeeeeeee fffffffff hhhhhhhhh iiiiiiii jjjjjj'), (('_sitem_5','_sitem_6','_sitem_7'), ([1,2,3,4], [5,6,7,8], ['a','b','c','d']))) bb = CifFile.CifBlock(s_items) self.cf.AddSaveFrame("some_name",bb) | 7b0eab8618df6191909c15bb7cbdefa3ffe63076 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3057/7b0eab8618df6191909c15bb7cbdefa3ffe63076/TestPyCifRW.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
986,
4755,
3219,
12,
2890,
4672,
3536,
4709,
6534,
279,
1923,
2623,
8395,
272,
67,
3319,
273,
261,
2668,
67,
87,
1726,
67,
21,
17023,
17358,
1923,
501,
19899,
7707,
67,
87,
1726,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
986,
4755,
3219,
12,
2890,
4672,
3536,
4709,
6534,
279,
1923,
2623,
8395,
272,
67,
3319,
273,
261,
2668,
67,
87,
1726,
67,
21,
17023,
17358,
1923,
501,
19899,
7707,
67,
87,
1726,
... |
if line == '.': line = '..' | if line[:1] == '.': line = '.' + line | def post(self, f): resp = self.shortcmd('POST') # Raises error_??? if posting is not allowed if resp[0] <> '3': raise error_reply, resp while 1: line = f.readline() if not line: break if line[-1] == '\n': line = line[:-1] if line == '.': line = '..' self.putline(line) self.putline('.') return self.getresp() | ec2e6c13d183058de0e2ab542cef4ce4073980c1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/ec2e6c13d183058de0e2ab542cef4ce4073980c1/nntplib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1603,
12,
2890,
16,
284,
4672,
1718,
273,
365,
18,
6620,
4172,
2668,
3798,
6134,
468,
20497,
555,
67,
14646,
35,
309,
1603,
310,
353,
486,
2935,
309,
1718,
63,
20,
65,
2813,
296,
23,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1603,
12,
2890,
16,
284,
4672,
1718,
273,
365,
18,
6620,
4172,
2668,
3798,
6134,
468,
20497,
555,
67,
14646,
35,
309,
1603,
310,
353,
486,
2935,
309,
1718,
63,
20,
65,
2813,
296,
23,
... |
mousedown="EventTicklerMousedown"), | mousedown="EventTicklerMousedown", mousedownselected="EventTicklerMousedownSelected"), | def makeStates(self): states = [ BitmapInfo(stateName="SumEvent.Unstamped", normal=attributeEditors.IconAttributeEditor.noImage, selected=attributeEditors.IconAttributeEditor.noImage, rollover="EventTicklerRollover", rolloverselected="EventTicklerRolloverSelected", mousedown="EventTicklerMousedown"), BitmapInfo(stateName="SumEvent.Stamped", normal="SumEventStamped", selected="SumEventStamped-Reversed", rollover="EventTicklerRollover", rolloverselected="EventTicklerRolloverSelected", mousedown="EventTicklerMousedown"), BitmapInfo(stateName="SumEvent.Tickled", normal="EventTickled", selected="EventTickledSelected", rollover="EventTicklerRollover", rolloverselected="EventTicklerRolloverSelected", mousedown="EventTicklerMousedown"), ] return states | af425b7896d6f0178da77c37da1bec0eb96d300a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/af425b7896d6f0178da77c37da1bec0eb96d300a/summaryblocks.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1221,
7629,
12,
2890,
4672,
5493,
273,
306,
14764,
966,
12,
2019,
461,
1546,
3495,
1133,
18,
984,
14317,
329,
3113,
2212,
33,
4589,
4666,
1383,
18,
5554,
1499,
6946,
18,
2135,
2040,
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,
1221,
7629,
12,
2890,
4672,
5493,
273,
306,
14764,
966,
12,
2019,
461,
1546,
3495,
1133,
18,
984,
14317,
329,
3113,
2212,
33,
4589,
4666,
1383,
18,
5554,
1499,
6946,
18,
2135,
2040,
16,
... |
self.log.info( "[COMPACT] Got %d records to compact (%d done)" % ( previousRecordsSelected, totalCompacted ) ) | selectEndTime = time.time() self.log.info( "[COMPACT] Got %d buckets (%d done) (took %.2f secs)" % ( previousRecordsSelected, totalCompacted, selectEndTime - roundStartTime ) ) | def __slowCompactBucketsForType( self, typeName ): """ Compact all buckets for a given type """ tableName = self.__getTableName( "bucket", typeName ) nowEpoch = Time.toEpoch() retVal = self._getConnection() if not retVal[ 'OK' ]: return retVal connObj = retVal[ 'Value' ] for bPos in range( len( self.dbBucketsLength[ typeName ] ) - 1 ): self.log.info( "[COMPACT] Query %d of %d" % ( bPos, len( self.dbBucketsLength[ typeName ] ) - 1 ) ) secondsLimit = self.dbBucketsLength[ typeName ][ bPos ][0] bucketLength = self.dbBucketsLength[ typeName ][ bPos ][1] timeLimit = ( nowEpoch - nowEpoch % bucketLength ) - secondsLimit nextBucketLength = self.dbBucketsLength[ typeName ][ bPos + 1 ][1] self.log.info( "[COMPACT] Compacting data newer that %s with bucket size %s" % ( Time.fromEpoch( timeLimit ), bucketLength ) ) querySize = 1000 previousRecordsSelected = querySize totalCompacted = 0 while previousRecordsSelected == querySize: #Retrieve the data self.log.info( "[COMPACT] Retrieving records to compact" ) result = self.__selectIndividualForCompactBuckets( typeName, timeLimit, bucketLength, nextBucketLength, querySize, connObj ) if not result[ 'OK' ]: #self.__rollbackTransaction( connObj ) return result bucketsData = result[ 'Value' ] previousRecordsSelected = len( bucketsData ) self.log.info( "[COMPACT] Got %d records to compact (%d done)" % ( previousRecordsSelected, totalCompacted ) ) if len( bucketsData ) == 0: break result = self.__deleteIndividualForCompactBuckets( typeName, bucketsData, connObj ) if not result[ 'OK' ]: #self.__rollbackTransaction( connObj ) return result bucketsData = result[ 'Value' ] self.log.info( "[COMPACT] Compacting %s records %s seconds size for %s" % ( len( bucketsData ), bucketLength, typeName ) ) #Add data for record in bucketsData: startTime = record[-2] endTime = record[-2] + record[-1] valuesList = record[:-2] retVal = self.__splitInBuckets( typeName, startTime, endTime, valuesList, connObj ) if not retVal[ 'OK' ]: self.log.error( "[COMPACT] Error while compacting data for record in %s: %s" % ( typeName, retVal[ 'Value' ] ) ) totalCompacted += len( bucketsData ) self.log.info( "[COMPACT] Finised compaction %d of %d" % ( bPos, len( self.dbBucketsLength[ typeName ] ) - 1 ) ) #return self.__commitTransaction( connObj ) connObj.close() return S_OK() | 20794236a2a7be5aef39b9c2feeef4fc7b6fcab0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/20794236a2a7be5aef39b9c2feeef4fc7b6fcab0/AccountingDB.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
87,
821,
16863,
14517,
22405,
12,
365,
16,
8173,
262,
30,
3536,
23823,
777,
9169,
364,
279,
864,
618,
3536,
4775,
273,
365,
16186,
588,
7147,
12,
315,
7242,
3113,
8173,
262,
2037,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
87,
821,
16863,
14517,
22405,
12,
365,
16,
8173,
262,
30,
3536,
23823,
777,
9169,
364,
279,
864,
618,
3536,
4775,
273,
365,
16186,
588,
7147,
12,
315,
7242,
3113,
8173,
262,
2037,
... |
parser = xml.sax.make_parser() parser.setFeature(xml.sax.handler.feature_namespaces, 1) handler = RSSLinkGrabber(info['redirected-url'],charset) parser.setContentHandler(handler) | def _generateFeedCallback(self, info, removeOnError): """This is called by grabURL to generate a feed based on the type of data found at the given URL """ # FIXME: This probably should be split up a bit. The logic is # a bit daunting | 01799d8fa4f616faab52055aa39f98fee681f6fa /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12354/01799d8fa4f616faab52055aa39f98fee681f6fa/feed.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
7163,
8141,
2428,
12,
2890,
16,
1123,
16,
1206,
11427,
4672,
3536,
2503,
353,
2566,
635,
11086,
1785,
358,
2103,
279,
4746,
2511,
603,
326,
618,
434,
501,
1392,
622,
326,
864,
1976,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
7163,
8141,
2428,
12,
2890,
16,
1123,
16,
1206,
11427,
4672,
3536,
2503,
353,
2566,
635,
11086,
1785,
358,
2103,
279,
4746,
2511,
603,
326,
618,
434,
501,
1392,
622,
326,
864,
1976,... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.