rem stringlengths 1 226k | add stringlengths 0 227k | context stringlengths 6 326k | meta stringlengths 143 403 | input_ids listlengths 256 256 | attention_mask listlengths 256 256 | labels listlengths 128 128 |
|---|---|---|---|---|---|---|
0.74204877583656470 + 0.19883137022991071*I | 0.742048775836564 + 0.198831370229910*I | def eta(self, omit_frac=False): r""" Return the value of the Dedekind $\eta$ function on self, intelligently computed using $\SL(2,\Z)$ transformations. | 193380da4580283517e8b5d85f0bf8d1c6d47fce /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9890/193380da4580283517e8b5d85f0bf8d1c6d47fce/complex_number.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
14251,
12,
2890,
16,
14088,
67,
22187,
33,
8381,
4672,
436,
8395,
2000,
326,
460,
434,
326,
1505,
323,
9224,
271,
64,
1066,
8,
445,
603,
365,
16,
509,
1165,
360,
23351,
8470,
1450,
271... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
14251,
12,
2890,
16,
14088,
67,
22187,
33,
8381,
4672,
436,
8395,
2000,
326,
460,
434,
326,
1505,
323,
9224,
271,
64,
1066,
8,
445,
603,
365,
16,
509,
1165,
360,
23351,
8470,
1450,
271... |
}))) | })) | def _get_bug_stats(self, package, collection='Fedora'): """ Returns (# of open bugs, # of new bugs, # of closed bugs) """ results = [] last_week = str(datetime.utcnow() - timedelta(days=7)), | db7abe949e3fbab840693ccf5a932baa23e6ea8d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12732/db7abe949e3fbab840693ccf5a932baa23e6ea8d/bugzillaconnector.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
67,
925,
67,
5296,
12,
2890,
16,
2181,
16,
1849,
2218,
42,
15534,
11,
4672,
3536,
2860,
23885,
434,
1696,
22398,
16,
468,
434,
394,
22398,
16,
468,
434,
4375,
22398,
13,
3536... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
67,
925,
67,
5296,
12,
2890,
16,
2181,
16,
1849,
2218,
42,
15534,
11,
4672,
3536,
2860,
23885,
434,
1696,
22398,
16,
468,
434,
394,
22398,
16,
468,
434,
4375,
22398,
13,
3536... |
d1 = open(CERTFILE, 'rb').read() | with open(CERTFILE, 'rb') as f: d1 = f.read() | def testSocketServer(self): | 3945c867d60b1d53299799dd09b6753dcd0a9546 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8546/3945c867d60b1d53299799dd09b6753dcd0a9546/test_ssl.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
4534,
2081,
12,
2890,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
4534,
2081,
12,
2890,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
aFileName=string.split(string.join(string.split(aFullPNString,':')[1:],'-'),'/')[-1] aECDDataFile = ecell.ECDDataFile.ECDDataFile() | aRootIndex=find(aFullPNString,':/') aFileName=aFullPNString[:aRootIndex]+aFullPNString[aRootIndex+1:] aFileName=replace(aFileName,':','_') aFileName=replace(aFileName,'/','_') aECDDataFile = ECDDataFile() | def saveLoggerData( self, aFullPNString='', aStartTime=-1, aEndTime=-1, aInterval=-1, aSaveDirectory='./Data'): | ea4e8e2718af60beede467ccee0cb1bdb0f1e349 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12724/ea4e8e2718af60beede467ccee0cb1bdb0f1e349/Session.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1923,
3328,
751,
12,
365,
16,
279,
5080,
15124,
780,
2218,
2187,
279,
13649,
29711,
21,
16,
279,
25255,
29711,
21,
16,
279,
4006,
29711,
21,
16,
279,
4755,
2853,
2218,
18,
19,
751,
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,
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,
1923,
3328,
751,
12,
365,
16,
279,
5080,
15124,
780,
2218,
2187,
279,
13649,
29711,
21,
16,
279,
25255,
29711,
21,
16,
279,
4006,
29711,
21,
16,
279,
4755,
2853,
2218,
18,
19,
751,
11,... |
formatter.setPage(MinimalPage()) | formatter.setPage(page) | def do(self, text, output): text = text.lstrip('\n') output = output.strip('\n') output = "<p>%s </p>" % output request = MinimalRequest() formatter = MoinMoin.formatter.text_gedit.Formatter(request) formatter.setPage(MinimalPage()) MoinMoin.parser.wiki.Parser(text, request).format(formatter) repeat = ''.join(request.result).strip('\n') self.failUnlessEqual(repeat, output) out = self.do_convert_real([request, repeat]) out = out.rstrip('\n') self.failUnlessEqual(text, out) | ba2b39fcd04c590a84d41429669714ca936397e8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/888/ba2b39fcd04c590a84d41429669714ca936397e8/test_converter_text_html_text_x_moin.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
12,
2890,
16,
977,
16,
876,
4672,
977,
273,
977,
18,
80,
6406,
2668,
64,
82,
6134,
876,
273,
876,
18,
6406,
2668,
64,
82,
6134,
876,
273,
3532,
84,
9822,
87,
7765,
84,
2984,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
12,
2890,
16,
977,
16,
876,
4672,
977,
273,
977,
18,
80,
6406,
2668,
64,
82,
6134,
876,
273,
876,
18,
6406,
2668,
64,
82,
6134,
876,
273,
3532,
84,
9822,
87,
7765,
84,
2984,
7... |
msg = string.join(msg, '\n') | msg = '\n'.join(msg) | def open_data(self, url, data=None): """Use "data" URL.""" # ignore POSTed data # # syntax of data URLs: # dataurl := "data:" [ mediatype ] [ ";base64" ] "," data # mediatype := [ type "/" subtype ] *( ";" parameter ) # data := *urlchar # parameter := attribute "=" value import StringIO, mimetools, time try: [type, data] = string.split(url, ',', 1) except ValueError: raise IOError, ('data error', 'bad data URL') if not type: type = 'text/plain;charset=US-ASCII' semi = string.rfind(type, ';') if semi >= 0 and '=' not in type[semi:]: encoding = type[semi+1:] type = type[:semi] else: encoding = '' msg = [] msg.append('Date: %s'%time.strftime('%a, %d %b %Y %T GMT', time.gmtime(time.time()))) msg.append('Content-type: %s' % type) if encoding == 'base64': import base64 data = base64.decodestring(data) else: data = unquote(data) msg.append('Content-length: %d' % len(data)) msg.append('') msg.append(data) msg = string.join(msg, '\n') f = StringIO.StringIO(msg) headers = mimetools.Message(f, 0) f.fileno = None # needed for addinfourl return addinfourl(f, headers, url) | 2aa671823938e593ea9dedd33b3cc4194fde8a0a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/2aa671823938e593ea9dedd33b3cc4194fde8a0a/urllib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1696,
67,
892,
12,
2890,
16,
880,
16,
501,
33,
7036,
4672,
3536,
3727,
315,
892,
6,
1976,
12123,
468,
2305,
5485,
329,
501,
468,
468,
6279,
434,
501,
10414,
30,
468,
501,
718,
282,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1696,
67,
892,
12,
2890,
16,
880,
16,
501,
33,
7036,
4672,
3536,
3727,
315,
892,
6,
1976,
12123,
468,
2305,
5485,
329,
501,
468,
468,
6279,
434,
501,
10414,
30,
468,
501,
718,
282,
5... |
class HardwareDeviceTests(TestCase): | class HardwareDeviceTests(unittest.TestCase): | def test_get_json_attr_types(self): self.assertEqual(HardwareContext.get_json_attr_types(), {'devices': [HardwareDevice]}) | 33350b1918e806e4c10a301b469914de84b03dfb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7382/33350b1918e806e4c10a301b469914de84b03dfb/test_dashboard_bundle_format_1_0.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
588,
67,
1977,
67,
1747,
67,
2352,
12,
2890,
4672,
365,
18,
11231,
5812,
12,
44,
14519,
1042,
18,
588,
67,
1977,
67,
1747,
67,
2352,
9334,
13666,
12506,
4278,
306,
44,
14519,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1842,
67,
588,
67,
1977,
67,
1747,
67,
2352,
12,
2890,
4672,
365,
18,
11231,
5812,
12,
44,
14519,
1042,
18,
588,
67,
1977,
67,
1747,
67,
2352,
9334,
13666,
12506,
4278,
306,
44,
14519,... |
def context_save(mode): def parts_save(): if hasattr(self, "_prevparts"): return self._prevparts = [] for p_name in self.e.parts: real_part = self.e.part_get(p_name) s_name = real_part.state_selected_get() self._prevparts.append((p_name, s_name)) def animations_save(): pass def signals_save(): pass save_contexts = \ {"Parts": parts_save, "Animations": animations_save, "Signals": signals_save} save_contexts[mode]() def context_restore(mode): def parts_restore(): if not hasattr(self, "_prevparts"): return for p_name, s_name in self._prevparts: real_part = self.e.part_get(p_name) real_part.state_selected_set(*s_name) if p_name == self.e.part.name: self.e.part.state.name = s_name[0] del self._prevparts self.e.animation.name = None self.e.signal.name = None def animations_restore(): self.e.part.name = None self.e.signal.name = None self.e.animation.name = None def signals_restore(): self.e.part.name = None self.e.animation.name = None restore_contexts = \ {"Parts": parts_restore, "Animations": animations_restore, "Signals": signals_restore} restore_contexts[mode]() | def context_save(mode): | 1ca368b854c22f53676914be861b8e938845c34f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12343/1ca368b854c22f53676914be861b8e938845c34f/editje.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
819,
67,
5688,
12,
3188,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
819,
67,
5688,
12,
3188,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... | |
for root, dirs, files in fs.walk('/', unalloc=True, inodes=True): for d in dirs: insert(d[0], 'd/d', root[1], d[1]) for f in files: insert(f[0], 'r/r', root[1], f[1]) | insert_inode(fs.root_inum) | def insert_inode(inode): inodestr = "%s|D%d" % (ios, inode) if inode.alloc: status = 'a' else: status = 'f' try: s = fs.stat(inode=str(inode)) print "INSERT INTO inode (`inode`,`status`,`uid`, `gid`,`mtime`,`atime`, `ctime`,`dtime`,`mode`, `links`,`link`,`size`) VALUES(%r,%r,'%r','%r',from_unixtime(%d), from_unixtime(%d),from_unixtime(%d), from_unixtime(%d),'%r','%r',%r,'%r');" % (inodestr, status, s.st_uid, s.st_gid, s.st_mtime, s.st_atime, s.st_ctime, 0, s.st_mode, s.st_nlink, "", s.st_size) except IOError: pass | ab0581dd8b0678dd7456a37fda5c8a1031b1d3d1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5568/ab0581dd8b0678dd7456a37fda5c8a1031b1d3d1/dbtool.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2243,
67,
267,
390,
12,
267,
390,
4672,
316,
1145,
313,
273,
2213,
87,
96,
40,
9,
72,
6,
738,
261,
7441,
16,
17870,
13,
225,
309,
17870,
18,
9853,
30,
1267,
273,
296,
69,
11,
469,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2243,
67,
267,
390,
12,
267,
390,
4672,
316,
1145,
313,
273,
2213,
87,
96,
40,
9,
72,
6,
738,
261,
7441,
16,
17870,
13,
225,
309,
17870,
18,
9853,
30,
1267,
273,
296,
69,
11,
469,
... |
startFile, startPv, plan = fromPv.getRecreateFilePlan() | startFile, startPv, plan = fromPv.getRecreateFilePlan(alreadyVisited) | def getRecreateFilePlan(self): """ Returns the tuple (startFile, startPv, plan), describing how to recreate the archive file for this version. startFile and startPv is the Filename and packageVersion of the file to start with, and plan is a list of tuples (patchfile, pv), listing the patches to apply in sequence, and the packageVersion object associated with each patch. Returns (None, None) if there is no way to recreate this archive file. """ if self.tempFile: return (self.tempFile, self, []) | 6b0f19f13eaefba82c196a0b6b9074980a4bdbba /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8543/6b0f19f13eaefba82c196a0b6b9074980a4bdbba/PatchMaker.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5561,
2640,
812,
5365,
12,
2890,
4672,
3536,
2860,
326,
3193,
261,
1937,
812,
16,
787,
52,
90,
16,
4995,
3631,
16868,
3661,
358,
23052,
326,
5052,
585,
364,
333,
1177,
18,
225,
787,
81... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5561,
2640,
812,
5365,
12,
2890,
4672,
3536,
2860,
326,
3193,
261,
1937,
812,
16,
787,
52,
90,
16,
4995,
3631,
16868,
3661,
358,
23052,
326,
5052,
585,
364,
333,
1177,
18,
225,
787,
81... |
[x1^20 + x1^16*x2^4 + x1^12*x2^8 + x1^8*x2^12 + x1^4*x2^16 + x2^20, x1^20*x2^4 + x1^16*x2^8 + x1^12*x2^12 + x1^8*x2^16 + x1^4*x2^20] | [x1^20 + x1^16*x2^4 + x1^12*x2^8 + x1^8*x2^12 + x1^4*x2^16 + x2^20, x1^20*x2^4 + x1^16*x2^8 + x1^12*x2^12 + x1^8*x2^16 + x1^4*x2^20] | def invariant_generators(self): """ Wraps Singular's invariant_algebra_reynolds and invariant_ring in finvar.lib, with help from Simon King and Martin Albrecht. Computes generators for the polynomial ring $F[x_1,\ldots,x_n]^G$, where G in GL(n,F) is a finite matrix group. | c3123f85790eb9956f168d8f6a0294be56507714 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/c3123f85790eb9956f168d8f6a0294be56507714/matrix_group.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
22514,
67,
25959,
12,
2890,
4672,
3536,
678,
7506,
348,
17830,
1807,
22514,
67,
287,
29087,
67,
266,
878,
1673,
87,
471,
22514,
67,
8022,
316,
574,
1401,
18,
2941,
16,
598,
2809,
628,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
22514,
67,
25959,
12,
2890,
4672,
3536,
678,
7506,
348,
17830,
1807,
22514,
67,
287,
29087,
67,
266,
878,
1673,
87,
471,
22514,
67,
8022,
316,
574,
1401,
18,
2941,
16,
598,
2809,
628,
... |
files that this program would delete use the -vn options. | files that this program would delete use the --print option. | def purge(ui, repo, *dirs, **opts): '''removes files not tracked by mercurial Delete files not known to mercurial, this is useful to test local and uncommitted changes in the otherwise clean source tree. This means that purge will delete: - Unknown files: files marked with "?" by "hg status" - Ignored files: files usually ignored by Mercurial because they match a pattern in a ".hgignore" file - Empty directories: infact Mercurial ignores directories unless they contain files under source control managment But it will leave untouched: - Unmodified tracked files - Modified tracked files - New files added to the repository (with "hg add") If directories are given on the command line, only files in these directories are considered. Be careful with purge, you could irreversibly delete some files you forgot to add to the repository. If you only want to print the list of files that this program would delete use the -vn options. ''' act = not opts['print'] abort_on_err = bool(opts['abort_on_err']) eol = opts['print0'] and '\0' or '\n' if eol == '\0': # --print0 implies --print act = False p = Purge(act, abort_on_err, eol) p.purge(ui, repo, dirs) | 1130ec31a49611a0b42afd3bc7e20f7d6b9fc251 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11312/1130ec31a49611a0b42afd3bc7e20f7d6b9fc251/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11668,
12,
4881,
16,
3538,
16,
380,
8291,
16,
2826,
4952,
4672,
9163,
2764,
10829,
1390,
486,
15200,
635,
4045,
1397,
649,
225,
2504,
1390,
486,
4846,
358,
4045,
1397,
649,
16,
333,
353,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11668,
12,
4881,
16,
3538,
16,
380,
8291,
16,
2826,
4952,
4672,
9163,
2764,
10829,
1390,
486,
15200,
635,
4045,
1397,
649,
225,
2504,
1390,
486,
4846,
358,
4045,
1397,
649,
16,
333,
353,... |
__slots__ = ["instance_name"] | __slots__ = OpCode.__slots__ + ["instance_name"] | def Summary(self): """Generates a summary description of this opcode. | 4f05fd3bdb49a9f1628b9915afde3c0d83367f6d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7542/4f05fd3bdb49a9f1628b9915afde3c0d83367f6d/opcodes.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
17967,
12,
2890,
4672,
3536,
6653,
279,
4916,
2477,
434,
333,
11396,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
17967,
12,
2890,
4672,
3536,
6653,
279,
4916,
2477,
434,
333,
11396,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
return apply(self.tk.call, ('tix', configure) + self._options(cnf,kw) ) | if kw: cnf = _cnfmerge((cnf, kw)) elif cnf: cnf = _cnfmerge(cnf) if cnf is None: cnf = {} for x in self.tk.split(self.tk.call('tix', 'configure')): cnf[x[0][1:]] = (x[0][1:],) + x[1:] return cnf if isinstance(cnf, StringType): x = self.tk.split(self.tk.call('tix', 'configure', '-'+cnf)) return (x[0][1:],) + x[1:] return self.tk.call(('tix', 'configure') + self._options(cnf)) | def tix_configure(self, cnf=None, **kw): """Query or modify the configuration options of the Tix application context. If no option is specified, returns a list describing all of the available options (see Tk_ConfigureInfo for information on the format of this list). If option is specified with no value, then the command returns a list describing the one named option (this list will be identical to the corresponding sublist of the value returned if no option is specified). If one or more option-value pairs are specified, then the command modifies the given option(s) to have the given value(s); in this case the command returns an empty string. Option may be any of the options described in the CONFIGURATION OPTIONS section. """ return apply(self.tk.call, ('tix', configure) + self._options(cnf,kw) ) | 723293cb49f479a41dc893d72c2d6502587d52cb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/723293cb49f479a41dc893d72c2d6502587d52cb/Tix.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
268,
697,
67,
14895,
12,
2890,
16,
23118,
33,
7036,
16,
2826,
9987,
4672,
3536,
1138,
578,
5612,
326,
1664,
225,
702,
225,
434,
225,
326,
399,
697,
2521,
819,
18,
971,
1158,
1456,
353,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
268,
697,
67,
14895,
12,
2890,
16,
23118,
33,
7036,
16,
2826,
9987,
4672,
3536,
1138,
578,
5612,
326,
1664,
225,
702,
225,
434,
225,
326,
399,
697,
2521,
819,
18,
971,
1158,
1456,
353,... |
jump(-3) """ self.optimize_loop(ops, 'Not', expected) | jump() """ expected = """ [] jump() """ self.optimize_loop(ops, 'Not', expected, preamble) | def test_guard_value_on_nonbool(self): ops = """ [i] i1 = int_add(i, 3) guard_value(i1, 0) [i] jump(i) """ expected = """ [i] i1 = int_add(i, 3) guard_value(i1, 0) [i] jump(-3) """ self.optimize_loop(ops, 'Not', expected) | 86d3ac7fcd8c34942685a0bee0fe0514a1a06a5a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6934/86d3ac7fcd8c34942685a0bee0fe0514a1a06a5a/test_optimizeopt.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
24594,
67,
1132,
67,
265,
67,
5836,
6430,
12,
2890,
4672,
6727,
273,
3536,
306,
77,
65,
277,
21,
273,
509,
67,
1289,
12,
77,
16,
890,
13,
11026,
67,
1132,
12,
77,
21,
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,
1842,
67,
24594,
67,
1132,
67,
265,
67,
5836,
6430,
12,
2890,
4672,
6727,
273,
3536,
306,
77,
65,
277,
21,
273,
509,
67,
1289,
12,
77,
16,
890,
13,
11026,
67,
1132,
12,
77,
21,
16,... |
Interpretive.parseOperand(context, operands, checkForOperand) | Interpretive._parseOperand(context, operands, checkForOperand) | def parse(self, context, operands): # Case 1: One interpretive opcode. # Case 2: Two packed interpretive opcodes. # Case 3: Interpretive opcode, simple operand. # Case 4: Interpretive opcode, operand expression with 2 components (e.g. ['A', '+1']). # Case 5: Interpretive opcode, operand expression with 3 components (e.g. ['A', '-', '1']). | 20f4c08ff5ce7650861e94b3f425191cc64628fb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8152/20f4c08ff5ce7650861e94b3f425191cc64628fb/interpretive.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
12,
2890,
16,
819,
16,
14883,
4672,
468,
12605,
404,
30,
6942,
10634,
688,
11396,
18,
468,
12605,
576,
30,
16896,
12456,
10634,
688,
1061,
7000,
18,
468,
12605,
890,
30,
5294,
1508... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
12,
2890,
16,
819,
16,
14883,
4672,
468,
12605,
404,
30,
6942,
10634,
688,
11396,
18,
468,
12605,
576,
30,
16896,
12456,
10634,
688,
1061,
7000,
18,
468,
12605,
890,
30,
5294,
1508... |
return self.vis / 1.609344 | if self.vis is not None: return self.vis / 1.609344 | def getVisibilityMiles(self): """ Return visibility in miles. """ return self.vis / 1.609344 | ab666ac50812806dd63e8776be2a8cc62dbd6727 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4602/ab666ac50812806dd63e8776be2a8cc62dbd6727/pymetar.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
10135,
49,
1449,
12,
2890,
4672,
3536,
2000,
9478,
316,
312,
1449,
18,
3536,
327,
365,
18,
3516,
342,
404,
18,
4848,
29,
5026,
24,
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,
336,
10135,
49,
1449,
12,
2890,
4672,
3536,
2000,
9478,
316,
312,
1449,
18,
3536,
327,
365,
18,
3516,
342,
404,
18,
4848,
29,
5026,
24,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
other = ProgramSlot.objects.filter(time__end__lte=end).order_by('time__start') | other = ProgramSlot.objects.filter(active=True, time__end__lte=end).order_by('time__start') | def next_n_hours(n): now = datetime.now().time() now = time(now.hour) end_hour = now.hour + n end = now.replace(hour=end_hour%24) | 4d1862aa1f64db2806f2490069c436df88550740 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14634/4d1862aa1f64db2806f2490069c436df88550740/models.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1024,
67,
82,
67,
16814,
12,
82,
4672,
2037,
273,
3314,
18,
3338,
7675,
957,
1435,
2037,
273,
813,
12,
3338,
18,
12091,
13,
679,
67,
12091,
273,
2037,
18,
12091,
397,
290,
679,
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,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1024,
67,
82,
67,
16814,
12,
82,
4672,
2037,
273,
3314,
18,
3338,
7675,
957,
1435,
2037,
273,
813,
12,
3338,
18,
12091,
13,
679,
67,
12091,
273,
2037,
18,
12091,
397,
290,
679,
273,
... |
self._index_to_anchor(term), link.name())) | self._term_index_to_anchor(term), link.name())) | def _index_to_html(self): """ @return: An HTML page containing the index terms. @rtype: C{string} """ # Header and navigation bar. str = self._header('Index') str += self._navbar('epydoc-index', 1) str += '<br>\n' | 7e1af2abc702612461ceeb001b4b551d49cb71d3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/7e1af2abc702612461ceeb001b4b551d49cb71d3/html.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1615,
67,
869,
67,
2620,
12,
2890,
4672,
3536,
632,
2463,
30,
1922,
3982,
1363,
4191,
326,
770,
6548,
18,
632,
86,
723,
30,
385,
95,
1080,
97,
3536,
468,
4304,
471,
10394,
4653,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1615,
67,
869,
67,
2620,
12,
2890,
4672,
3536,
632,
2463,
30,
1922,
3982,
1363,
4191,
326,
770,
6548,
18,
632,
86,
723,
30,
385,
95,
1080,
97,
3536,
468,
4304,
471,
10394,
4653,
... |
ui.show_msg(self.window, _("Taglib and/or tagpy not found, tag editing support disabled."), _("Edit Tags"), 'editTagsError', gtk.BUTTONS_CLOSE, self.dialog_destroy) | ui.show_msg(self.window, _("Taglib and/or tagpy not found, tag editing support disabled."), _("Edit Tags"), 'editTagsError', gtk.BUTTONS_CLOSE, response_cb=self.dialog_destroy) | def on_tags_edit(self, widget): # Try loading module global tagpy if tagpy is None: try: import tagpy try: # Set default tag encoding to utf8.. fixes some reported bugs. import tagpy.id3v2 as id3v2 id3v2.FrameFactory.instance().setDefaultTextEncoding(tagpy.StringType.UTF8) except: pass except: pass if tagpy is None: ui.show_msg(self.window, _("Taglib and/or tagpy not found, tag editing support disabled."), _("Edit Tags"), 'editTagsError', gtk.BUTTONS_CLOSE, self.dialog_destroy) return if not os.path.isdir(misc.file_from_utf8(self.musicdir[self.profile_num])): ui.show_msg(self.window, _("The path") + " " + self.musicdir[self.profile_num] + " " + _("does not exist. Please specify a valid music directory in preferences."), _("Edit Tags"), 'editTagsError', gtk.BUTTONS_CLOSE, self.dialog_destroy) return ui.change_cursor(gtk.gdk.Cursor(gtk.gdk.WATCH)) self.edit_style_orig = self.searchtext.get_style() while gtk.events_pending(): gtk.main_iteration() files = [] temp_mpdpaths = [] if self.current_tab == self.TAB_INFO: if self.status and self.status['state'] in ['play', 'pause']: # Use current file in songinfo: mpdpath = mpdh.get(self.songinfo, 'file') fullpath = self.musicdir[self.profile_num] + mpdpath files.append(fullpath) temp_mpdpaths.append(mpdpath) elif self.current_tab == self.TAB_LIBRARY: # Populates files array with selected library items: items = self.library_get_recursive_filenames(False) for item in items: files.append(self.musicdir[self.profile_num] + item) temp_mpdpaths.append(item) elif self.current_tab == self.TAB_CURRENT: # Populates files array with selected current playlist items: model, selected = self.current_selection.get_selected_rows() for path in selected: if not self.filterbox_visible: item = mpdh.get(self.songs[path[0]], 'file') else: item = mpdh.get(self.songs[self.filter_row_mapping[path[0]]], 'file') files.append(self.musicdir[self.profile_num] + item) temp_mpdpaths.append(item) if len(files) == 0: ui.change_cursor(None) return self.tagpy_is_91 = None # Initialize tags: tags = [] for filenum in range(len(files)): tags.append({'title':'', 'artist':'', 'album':'', 'year':'', 'track':'', 'genre':'', 'comment':'', 'title-changed':False, 'artist-changed':False, 'album-changed':False, 'year-changed':False, 'track-changed':False, 'genre-changed':False, 'comment-changed':False, 'fullpath':misc.file_from_utf8(files[filenum]), 'mpdpath':temp_mpdpaths[filenum]}) self.tagnum = -1 if not os.path.exists(tags[0]['fullpath']): ui.change_cursor(None) ui.show_msg(self.window, _("File ") + "\"" + tags[0]['fullpath'] + "\"" + _(" not found. Please specify a valid music directory in preferences."), _("Edit Tags"), 'editTagsError', gtk.BUTTONS_CLOSE, self.dialog_destroy) return if self.tags_next_tag(tags) == False: ui.change_cursor(None) ui.show_msg(self.window, _("No music files with editable tags found."), _("Edit Tags"), 'editTagsError', gtk.BUTTONS_CLOSE, self.dialog_destroy) return editwindow = ui.dialog(parent=self.window, flags=gtk.DIALOG_MODAL, role='editTags', resizable=False, separator=False) editwindow.set_size_request(375, -1) table = gtk.Table(9, 2, False) table.set_row_spacings(2) filelabel = ui.label(select=True, wrap=True) filehbox = gtk.HBox() sonataicon = ui.image(stock='sonata', stocksize=gtk.ICON_SIZE_DND, x=1) blanklabel = ui.label(w=15, h=12) filehbox.pack_start(sonataicon, False, False, 2) filehbox.pack_start(filelabel, True, True, 2) filehbox.pack_start(blanklabel, False, False, 2) titlelabel = ui.label(text=_("Title") + ":", x=1) titleentry = ui.entry() titlebutton = ui.button() titlebuttonvbox = gtk.VBox() self.tags_win_create_apply_all_button(titlebutton, titlebuttonvbox, titleentry) titlehbox = gtk.HBox() titlehbox.pack_start(titlelabel, False, False, 2) titlehbox.pack_start(titleentry, True, True, 2) titlehbox.pack_start(titlebuttonvbox, False, False, 2) artistlabel = ui.label(text=_("Artist") + ":", x=1) artistentry = ui.entry() artisthbox = gtk.HBox() artistbutton = ui.button() artistbuttonvbox = gtk.VBox() self.tags_win_create_apply_all_button(artistbutton, artistbuttonvbox, artistentry) artisthbox.pack_start(artistlabel, False, False, 2) artisthbox.pack_start(artistentry, True, True, 2) artisthbox.pack_start(artistbuttonvbox, False, False, 2) albumlabel = ui.label(text=_("Album") + ":", x=1) albumentry = ui.entry() albumhbox = gtk.HBox() albumbutton = ui.button() albumbuttonvbox = gtk.VBox() self.tags_win_create_apply_all_button(albumbutton, albumbuttonvbox, albumentry) albumhbox.pack_start(albumlabel, False, False, 2) albumhbox.pack_start(albumentry, True, True, 2) albumhbox.pack_start(albumbuttonvbox, False, False, 2) yearlabel = ui.label(text=" " + _("Year") + ":", x=1) yearentry = ui.entry(w=50) handlerid = yearentry.connect("insert_text", self.tags_win_entry_constraint, True) yearentry.set_data('handlerid', handlerid) tracklabel = ui.label(text=" " + _("Track") + ":", x=1) trackentry = ui.entry(w=50) handlerid2 = trackentry.connect("insert_text", self.tags_win_entry_constraint, False) trackentry.set_data('handlerid2', handlerid2) yearbutton = ui.button() yearbuttonvbox = gtk.VBox() self.tags_win_create_apply_all_button(yearbutton, yearbuttonvbox, yearentry) trackbutton = ui.button() trackbuttonvbox = gtk.VBox() self.tags_win_create_apply_all_button(trackbutton, trackbuttonvbox, trackentry, True) yearandtrackhbox = gtk.HBox() yearandtrackhbox.pack_start(yearlabel, False, False, 2) yearandtrackhbox.pack_start(yearentry, True, True, 2) yearandtrackhbox.pack_start(yearbuttonvbox, False, False, 2) yearandtrackhbox.pack_start(tracklabel, False, False, 2) yearandtrackhbox.pack_start(trackentry, True, True, 2) yearandtrackhbox.pack_start(trackbuttonvbox, False, False, 2) genrelabel = ui.label(text=_("Genre") + ":", x=1) genrecombo = ui.comboentry(list=self.tags_win_genres(), wrap=2) genreentry = genrecombo.get_child() genrehbox = gtk.HBox() genrebutton = ui.button() genrebuttonvbox = gtk.VBox() self.tags_win_create_apply_all_button(genrebutton, genrebuttonvbox, genreentry) genrehbox.pack_start(genrelabel, False, False, 2) genrehbox.pack_start(genrecombo, True, True, 2) genrehbox.pack_start(genrebuttonvbox, False, False, 2) commentlabel = ui.label(text=_("Comment") + ":", x=1) commententry = ui.entry() commenthbox = gtk.HBox() commentbutton = ui.button() commentbuttonvbox = gtk.VBox() self.tags_win_create_apply_all_button(commentbutton, commentbuttonvbox, commententry) commenthbox.pack_start(commentlabel, False, False, 2) commenthbox.pack_start(commententry, True, True, 2) commenthbox.pack_start(commentbuttonvbox, False, False, 2) ui.set_widths_equal([titlelabel, artistlabel, albumlabel, yearlabel, genrelabel, commentlabel, sonataicon]) genrecombo.set_size_request(-1, titleentry.size_request()[1]) tablewidgets = [ui.label(), filehbox, ui.label(), titlehbox, artisthbox, albumhbox, yearandtrackhbox, genrehbox, commenthbox, ui.label()] for i in range(len(tablewidgets)): table.attach(tablewidgets[i], 1, 2, i+1, i+2, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 2, 0) editwindow.vbox.pack_start(table) saveall_button = None if len(files) > 1: # Only show save all button if more than one song being edited. saveall_button = ui.button(text=_("Save _All")) editwindow.action_area.pack_start(saveall_button) cancelbutton = editwindow.add_button(gtk.STOCK_CANCEL, gtk.RESPONSE_REJECT) savebutton = editwindow.add_button(gtk.STOCK_SAVE, gtk.RESPONSE_ACCEPT) editwindow.connect('delete_event', self.tags_win_hide, tags) entries = [titleentry, artistentry, albumentry, yearentry, trackentry, genreentry, commententry, filelabel] buttons = [titlebutton, artistbutton, albumbutton, yearbutton, trackbutton, genrebutton, commentbutton] entries_names = ["title", "artist", "album", "year", "track", "genre", "comment"] editwindow.connect('response', self.tags_win_response, tags, entries, entries_names) if saveall_button: saveall_button.connect('clicked', self.tags_win_save_all, editwindow, tags, entries, entries_names) for i in range(len(entries)-1): entries[i].connect('changed', self.tags_win_entry_changed) for i in range(len(buttons)): buttons[i].connect('clicked', self.tags_win_apply_all, entries_names[i], tags, entries) self.tags_win_update(editwindow, tags, entries, entries_names) ui.change_cursor(None) entries[7].set_size_request(editwindow.size_request()[0] - titlelabel.size_request()[0] - 50, -1) editwindow.show_all() | 42ec8106d5d9032fcd77e092d270c87208745f84 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2312/42ec8106d5d9032fcd77e092d270c87208745f84/main.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
67,
4156,
67,
4619,
12,
2890,
16,
3604,
4672,
468,
6161,
7153,
1605,
2552,
1047,
2074,
309,
1047,
2074,
353,
599,
30,
775,
30,
1930,
1047,
2074,
775,
30,
468,
1000,
805,
1047,
268... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4156,
67,
4619,
12,
2890,
16,
3604,
4672,
468,
6161,
7153,
1605,
2552,
1047,
2074,
309,
1047,
2074,
353,
599,
30,
775,
30,
1930,
1047,
2074,
775,
30,
468,
1000,
805,
1047,
268... |
testme[:42] testme[:42] = "The Answer" del testme[:42] | import sys if sys.platform[:4] != 'java': testme[:42] testme[:42] = "The Answer" del testme[:42] else: print "__getitem__: (slice(0, 42, None),)" print "__setitem__: (slice(0, 42, None), 'The Answer')" print "__delitem__: (slice(0, 42, None),)" | exec """def __%(method)s__(self, *args): print "__%(method)s__:", args | 07d8d6415fcddd1149981a9d8de9afd5d829178b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/07d8d6415fcddd1149981a9d8de9afd5d829178b/test_class.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1196,
3536,
536,
1001,
17105,
2039,
13,
87,
972,
12,
2890,
16,
380,
1968,
4672,
1172,
10425,
17105,
2039,
13,
87,
972,
2773,
16,
833,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1196,
3536,
536,
1001,
17105,
2039,
13,
87,
972,
12,
2890,
16,
380,
1968,
4672,
1172,
10425,
17105,
2039,
13,
87,
972,
2773,
16,
833,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
gLogger.info("%s: %d files, %d sub-directories" % (currentDir,len(files),len(subdirs))) return S_OK(allFiles) def __isOlderThan(self,stringTime,days): timeDelta = timedelta(days=days) st = time.strptime(stringTime, "%a %b %d %H:%M:%S %Y") cTimeStruct = datetime(st[0],st[1],st[2],st[3],st[4],st[5],st[6],None) maxCTime = datetime.utcnow() - timeDelta | gLogger.info( "%s: %d files, %d sub-directories" % ( currentDir, len( files ), len( subdirs ) ) ) return S_OK( allFiles ) def __isOlderThan( self, stringTime, days ): timeDelta = timedelta( days=days ) st = time.strptime( stringTime, "%a %b %d %H:%M:%S %Y" ) cTimeStruct = datetime( st[0], st[1], st[2], st[3], st[4], st[5], st[6], None ) maxCTime = datetime.utcnow() - timeDelta | def getFilesFromDirectory(self,directory,days=0,wildcard='*'): if type(directory) in types.StringTypes: directories = [directory] else: directories = directory gLogger.info("Obtaining the files older than %d days in %d directories:" % (days,len(directories))) for directory in directories: gLogger.info(directory) activeDirs = directories allFiles = [] while len(activeDirs) > 0: currentDir = activeDirs[0] res = self.getCatalogListDirectory(currentDir,True,singleFile=True) activeDirs.remove(currentDir) if not res['OK']: gLogger.error("Error retrieving directory contents", "%s %s" % (currentDir, res['Message'])) else: dirContents = res['Value'] subdirs = dirContents['SubDirs'] for subdir,metadata in subdirs.items(): if (not days) or self.__isOlderThan(metadata['CreationTime'],days): activeDirs.append(subdir) for filename,fileInfo in dirContents['Files'].items(): metadata = fileInfo['MetaData'] if (not days) or self.__isOlderThan(metadata['CreationTime'],days): if fnmatch.fnmatch(filename,wildcard): allFiles.append(filename) files = dirContents['Files'].keys() gLogger.info("%s: %d files, %d sub-directories" % (currentDir,len(files),len(subdirs))) return S_OK(allFiles) | 9fabceb719d19d46d8b75011d2932552dbe360f9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/9fabceb719d19d46d8b75011d2932552dbe360f9/ReplicaManager.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
18262,
1265,
2853,
12,
2890,
16,
5149,
16,
9810,
33,
20,
16,
22887,
2218,
4035,
4672,
309,
618,
12,
5149,
13,
316,
1953,
18,
780,
2016,
30,
6402,
273,
306,
5149,
65,
469,
30,
6402,
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,
18262,
1265,
2853,
12,
2890,
16,
5149,
16,
9810,
33,
20,
16,
22887,
2218,
4035,
4672,
309,
618,
12,
5149,
13,
316,
1953,
18,
780,
2016,
30,
6402,
273,
306,
5149,
65,
469,
30,
6402,
2... |
if self.conf.history_record and not self.ts.isTsFlagSet(rpm.RPMTRANS_FLAG_TEST): | if (not self.conf.history_record or self.ts.isTsFlagSet(rpm.RPMTRANS_FLAG_TEST)): frpmdbv = self.tsInfo.futureRpmDBVersion() else: | def runTransaction(self, cb): """takes an rpm callback object, performs the transaction""" | 8a3c10072407640724399f547ef60d6916db6b93 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/8a3c10072407640724399f547ef60d6916db6b93/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
3342,
12,
2890,
16,
2875,
4672,
3536,
88,
3223,
392,
25228,
1348,
733,
16,
11199,
326,
2492,
8395,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
3342,
12,
2890,
16,
2875,
4672,
3536,
88,
3223,
392,
25228,
1348,
733,
16,
11199,
326,
2492,
8395,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
print lastid, 'fields in', t1-t0, 'msec', print '--', 0.1 * int(lastid * 10000.0 / (t1-t0)), 'fields/sec' | print lastid, 'fields in', round(t1-t0, 3), 'sec', print '--', round(lastid/(t1-t0), 1), 'fields/sec' | def record(v, info, filename, audiofilename, mono, grey, greybits, \ monotreshold, fields, preallocspace): import thread format, x, y, qsize, rate = info fps = 59.64 # Fields per second # XXX (Strange: need fps of Indigo monitor, not of PAL or NTSC!) tpf = 1000.0 / fps # Time per field in msec if filename: vout = VFile.VoutFile(filename) if mono: format = 'mono' elif grey and greybits == 8: format = 'grey' elif grey: format = 'grey'+`abs(greybits)` else: format = 'rgb8' vout.setformat(format) vout.setsize(x, y) if fields: vout.setpf((1, -2)) vout.writeheader() if preallocspace: print 'Preallocating space...' vout.prealloc(preallocspace) print 'done.' MAXSIZE = 20 # XXX should be a user option import Queue queue = Queue.Queue(MAXSIZE) done = thread.allocate_lock() done.acquire_lock() convertor = None if grey: if greybits == 2: convertor = imageop.grey2grey2 elif greybits == 4: convertor = imageop.grey2grey4 elif greybits == -2: convertor = imageop.dither2grey2 thread.start_new_thread(saveframes, \ (vout, queue, done, mono, monotreshold, convertor)) if audiofilename: audiodone = thread.allocate_lock() audiodone.acquire_lock() audiostop = [] initaudio(audiofilename, audiostop, audiodone) gl.wintitle('(rec) ' + filename) lastid = 0 t0 = time.millitimer() count = 0 ids = [] v.InitContinuousCapture(info) while not gl.qtest(): try: cd, id = v.GetCaptureData() except sv.error: #time.millisleep(10) # XXX is this necessary? sgi.nap(1) # XXX Try by Jack continue ids.append(id) id = id + 2*rate | 7911430d00ceaac39d086959bf7b8de3452bd9fc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/7911430d00ceaac39d086959bf7b8de3452bd9fc/Vrec.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1409,
12,
90,
16,
1123,
16,
1544,
16,
20232,
77,
792,
2550,
16,
6921,
83,
16,
5174,
93,
16,
5174,
93,
6789,
16,
521,
6921,
352,
3444,
16,
1466,
16,
675,
9853,
2981,
4672,
1930,
2650,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1409,
12,
90,
16,
1123,
16,
1544,
16,
20232,
77,
792,
2550,
16,
6921,
83,
16,
5174,
93,
16,
5174,
93,
6789,
16,
521,
6921,
352,
3444,
16,
1466,
16,
675,
9853,
2981,
4672,
1930,
2650,... |
path = path + "/" base = urlparse.urlunparse(("http", netloc, path, params, query, fragment)) logging.info("Guessed Google Code base = %s", base) else: path = path + "/" base = urlparse.urlunparse((scheme, netloc, path, params, query, fragment)) logging.info("Guessed base = %s", base) | scheme = "http" guess = "Google Code " path = path + "/" base = urlparse.urlunparse((scheme, netloc, path, params, query, fragment)) logging.info("Guessed %sbase = %s", guess, base) | def _GuessBase(self, required): """Returns the SVN base URL. | f1a1421aef0b4c5d48e921c69f1856ba8323c2d4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/476/f1a1421aef0b4c5d48e921c69f1856ba8323c2d4/upload.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
15977,
2171,
12,
2890,
16,
1931,
4672,
3536,
1356,
326,
29537,
50,
1026,
1976,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
15977,
2171,
12,
2890,
16,
1931,
4672,
3536,
1356,
326,
29537,
50,
1026,
1976,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
redirect_to(controller='home', action='index', id=None) | default_redirect = dict(action='index', id=None) self.redirect_to('delete', default_redirect) | def delete(self): """Delete the proposal type | bd34a7d0f2acaed56a038af68b6a8901e7a71365 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12856/bd34a7d0f2acaed56a038af68b6a8901e7a71365/crud.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1430,
12,
2890,
4672,
3536,
2613,
326,
14708,
618,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1430,
12,
2890,
4672,
3536,
2613,
326,
14708,
618,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
assert b[0] == 'x' assert b[1] == '\x00' assert b[2] == '\x00' assert b[3] == '\x00' assert b[4] == 'y' | if sys.maxunicode > 65535: assert b[0] == 'x' assert b[1] == '\x00' assert b[2] == '\x00' assert b[3] == '\x00' assert b[4] == 'y' else: assert b[0] == 'x' assert b[1] == '\x00' assert b[2] == 'y' | def test_wide_char(self): import _rawffi A = _rawffi.Array('u') a = A(3) a[0] = u'x' a[1] = u'y' a[2] = u'z' assert a[0] == u'x' b = _rawffi.Array('c').fromaddress(a.buffer, 38) assert b[0] == 'x' assert b[1] == '\x00' assert b[2] == '\x00' assert b[3] == '\x00' assert b[4] == 'y' a.free() | 14ab6c7584853e124e250e8dcc794d0ad33a47ea /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6934/14ab6c7584853e124e250e8dcc794d0ad33a47ea/test__rawffi.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
26767,
67,
3001,
12,
2890,
4672,
1930,
389,
1899,
1403,
77,
432,
273,
389,
1899,
1403,
77,
18,
1076,
2668,
89,
6134,
279,
273,
432,
12,
23,
13,
279,
63,
20,
65,
273,
582,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
26767,
67,
3001,
12,
2890,
4672,
1930,
389,
1899,
1403,
77,
432,
273,
389,
1899,
1403,
77,
18,
1076,
2668,
89,
6134,
279,
273,
432,
12,
23,
13,
279,
63,
20,
65,
273,
582,
... |
self.svc = ScopedXMLFile("%s/etc/services.xml"%(datastore), self.core.fam) | try: self.svc = ScopedXMLFile("%s/etc/services.xml"%(datastore), self.core.fam) except OSError: self.LogError("Failed to load service definition file") raise PluginInitError | def __init__(self, core, datastore): Plugin.__init__(self, core, datastore) self.svc = ScopedXMLFile("%s/etc/services.xml"%(datastore), self.core.fam) self.Entries = self.svc.__provides__ | aa2a5259cebfc629bf1394a9e1a9079c210ce590 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11867/aa2a5259cebfc629bf1394a9e1a9079c210ce590/Svcmgr.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
2922,
16,
9290,
4672,
6258,
16186,
2738,
972,
12,
2890,
16,
2922,
16,
9290,
13,
775,
30,
365,
18,
30992,
273,
2850,
8889,
4201,
812,
27188,
87,
19,
14175... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2922,
16,
9290,
4672,
6258,
16186,
2738,
972,
12,
2890,
16,
2922,
16,
9290,
13,
775,
30,
365,
18,
30992,
273,
2850,
8889,
4201,
812,
27188,
87,
19,
14175... |
treebuilder = __import__("treebuilders." + opts.treebuilder, None,None,"treebuilders").TreeBuilder | treebuilder = __import__("src.treebuilders." + opts.treebuilder, None,None,"src").TreeBuilder | def parse(): optParser = getOptParser() opts,args = optParser.parse_args() try: f = args[-1] # Try opening from the internet if f.startswith('http://'): try: import urllib f = urllib.urlopen(f).read() except: pass else: try: # Try opening from file system f = open(f) except IOError: pass except IndexError: print "No filename provided. Use -h for help" sys.exit(1) if opts.treebuilder is not None: try: treebuilder = __import__("treebuilders." + opts.treebuilder, None,None,"treebuilders").TreeBuilder except ImportError, name: print "Treebuilder %s not found"%name raise except Exception, foo: import treebuilders.simpletree treebuilder = treebuilders.simpletree.TreeBuilder else: import treebuilders.simpletree treebuilder = treebuilders.simpletree.TreeBuilder p = html5parser.HTMLParser(tree=treebuilder) if opts.profile: import hotshot import hotshot.stats prof = hotshot.Profile('stats.prof') prof.runcall(p.parse, f, False) prof.close() # XXX - We should use a temp file here stats = hotshot.stats.load('stats.prof') stats.strip_dirs() stats.sort_stats('time') stats.print_stats() elif opts.time: import time t0 = time.time() document = p.parse(f) t1 = time.time() if opts.xml: print document.toxml('utf-8') else: print p.tree.testSerializer(document).encode("utf-8") if opts.error: print "\nParse errors:\n" + "\n".join(p.errors) t2 = time.time() print "\n\nRun took: %fs (plus %fs to print the output)"%(t1-t0, t2-t1) else: document = p.parse(f) if opts.xml: print document.toxml('utf-8') else: print p.tree.testSerializer(document).encode("utf-8") if opts.error: print "\nParse errors:\n" + "\n".join(p.errors) | 88ba00e1e0f85f0af97ab32de680a8e3b54f158f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/10463/88ba00e1e0f85f0af97ab32de680a8e3b54f158f/parse.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
13332,
2153,
2678,
273,
28959,
2678,
1435,
1500,
16,
1968,
273,
2153,
2678,
18,
2670,
67,
1968,
1435,
225,
775,
30,
284,
273,
833,
18919,
21,
65,
468,
6161,
10890,
628,
326,
24264,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
13332,
2153,
2678,
273,
28959,
2678,
1435,
1500,
16,
1968,
273,
2153,
2678,
18,
2670,
67,
1968,
1435,
225,
775,
30,
284,
273,
833,
18919,
21,
65,
468,
6161,
10890,
628,
326,
24264,... |
def layer_name(self, step): | def layer_name(self, size_x, size_y, step): | def layer_name(self, step): if not self._layer_dict.has_key(step): width, height = self.size x = (self.pos_x * step) / width y = (self.pos_y * step) / height self._layer_dict[step] = '%d_%d__%d__%s.%s' % (x, y, step, self.issue.slug, THUMB_EXTENSION_IMAGE) return self._layer_dict[step] | 96f602a240e8eda2dce2d2a3128ca85df528f316 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4038/96f602a240e8eda2dce2d2a3128ca85df528f316/models.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3018,
67,
529,
12,
2890,
16,
963,
67,
92,
16,
963,
67,
93,
16,
2235,
4672,
309,
486,
365,
6315,
6363,
67,
1576,
18,
5332,
67,
856,
12,
4119,
4672,
1835,
16,
2072,
273,
365,
18,
146... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3018,
67,
529,
12,
2890,
16,
963,
67,
92,
16,
963,
67,
93,
16,
2235,
4672,
309,
486,
365,
6315,
6363,
67,
1576,
18,
5332,
67,
856,
12,
4119,
4672,
1835,
16,
2072,
273,
365,
18,
146... |
self.menu.items = copy.copy(self.menu.item_dir) self.menu.items = copy.copy(self.menu.item_pl) | self.menu.items.default = copy.copy(self.menu.items.default) self.menu.items.dir = copy.copy(self.menu.items.dir) self.menu.items.pl = copy.copy(self.menu.items.pl) | def parseItems(self, node, data, copy_content): data.x = self.attr_int(node, "x", data.x) data.y = self.attr_int(node, "y", data.y) data.height = self.attr_int(node, "height", data.height) data.width = self.attr_int(node, "width", data.width) | c5d331242e5c2388114f2cc0b7c8e2adadf8a0db /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/c5d331242e5c2388114f2cc0b7c8e2adadf8a0db/xml_skin.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
3126,
12,
2890,
16,
756,
16,
501,
16,
1610,
67,
1745,
4672,
501,
18,
92,
273,
365,
18,
1747,
67,
474,
12,
2159,
16,
315,
92,
3113,
501,
18,
92,
13,
501,
18,
93,
273,
365,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
3126,
12,
2890,
16,
756,
16,
501,
16,
1610,
67,
1745,
4672,
501,
18,
92,
273,
365,
18,
1747,
67,
474,
12,
2159,
16,
315,
92,
3113,
501,
18,
92,
13,
501,
18,
93,
273,
365,
1... |
e = storeconsumer() | e = storeconsumer(elvin_url, elvin_scope) | def ReadConfig( filename ): """Read the configuration from the given filename.""" rrddict = {} try: fp = open(filename, 'r') except IOError: print "Cannot open configuration file '%s', exiting." % (filename) re_comment = "^\s*#.*$" re_empty = "^\s*$" re_line = "^\s*(.+)=(.+?)$" sre_comment = re.compile(re_comment) sre_empty = re.compile(re_empty) sre_line = re.compile(re_line) line = fp.readline() entry = 0 # not processing an entry yet elvinrrd = None rrdfile = None store = None create = None while len(line) > 0: if sre_comment.match(line) or sre_empty.match(line): # commented or empty lines are ignored # if we were processing an entry, store that entry if entry == 1: # create new store object rrdobj = RRDstore( elvinrrd, rrdfile, store, create ) rrddict[elvinrrd] = rrdobj entry = 0 elvinrrd = None rrdfile = None store = None create = None else: inx = sre_line.match(line) if inx == None: print "Parse error, invalid line follows:\n%s" % (line) sys.exit(1) else: entry = 1 # we are processing an entry if inx.group(1) == 'elvinrrd': elvinrrd = inx.group(2) elif inx.group(1) == 'rrdfile': rrdfile = inx.group(2) elif inx.group(1) == 'store': store = inx.group(2) elif inx.group(1) == 'create': create = inx.group(2) else: print "Parse error, unknown keyword '%s' on following line:\n%s" % (inx.group(1),line) sys.exit(1) line = fp.readline() if entry == 1: # create new store object rrdobj = RRDstore( elvinrrd, rrdfile, store, create ) rrddict[elvinrrd] = rrdobj fp.close() return rrddict | dbd18abb3b7486c00964cbd1506a90b2bd96974e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3643/dbd18abb3b7486c00964cbd1506a90b2bd96974e/elvinrrd.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2720,
809,
12,
1544,
262,
30,
3536,
1994,
326,
1664,
628,
326,
864,
1544,
12123,
225,
8354,
449,
933,
273,
2618,
225,
775,
30,
4253,
273,
1696,
12,
3459,
16,
296,
86,
6134,
1335,
8340,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2720,
809,
12,
1544,
262,
30,
3536,
1994,
326,
1664,
628,
326,
864,
1544,
12123,
225,
8354,
449,
933,
273,
2618,
225,
775,
30,
4253,
273,
1696,
12,
3459,
16,
296,
86,
6134,
1335,
8340,... |
for="zope.app.component.tests.views.IC" attribute="index" permission="zope.Public" /> """ | for="zope.app.component.tests.views.IC" attribute="index" permission="zope.Public" /> ''' | def test_class_w_implements(self): xmlconfig(StringIO(template % """ <browser:page name="test" class=" zope.app.publisher.browser.tests.test_directives.C_w_implements" for="zope.app.component.tests.views.IC" attribute="index" permission="zope.Public" /> """ )) | 1cfc7ddd1cac0110cca3e909215477e1c59bbca3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9523/1cfc7ddd1cac0110cca3e909215477e1c59bbca3/test_directives.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
1106,
67,
91,
67,
17061,
12,
2890,
4672,
2025,
1425,
12,
780,
4294,
12,
3202,
738,
3536,
411,
11213,
30,
2433,
508,
1546,
3813,
6,
667,
1546,
998,
1306,
18,
2910,
18,
26018,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1106,
67,
91,
67,
17061,
12,
2890,
4672,
2025,
1425,
12,
780,
4294,
12,
3202,
738,
3536,
411,
11213,
30,
2433,
508,
1546,
3813,
6,
667,
1546,
998,
1306,
18,
2910,
18,
26018,
... |
optimizer = optimizerClass( self.optimizerName, self.containerName ) | optimizer = optimizerClass( '%sAgent' % self.optimizerName, self.containerName ) | def __loadOptimizer( self ): #Need to load an optimizer gLogger.info( "Loading optimizer %s" % self.optimizerName ) optList = List.fromChar( self.optimizerName, "/" ) optList[1] = "/".join( optList[1:] ) systemName = optList[0] agentName = optList[1] rootModulesToLook = gConfig.getValue( "/LocalSite/Extensions", [] ) + [ 'DIRAC' ] for rootModule in rootModulesToLook: try: gLogger.info( "Trying to load from root module %s" % rootModule ) opPyPath = '%s.%sSystem.Agent.%s' % ( rootModule, systemName, agentName ) optimizerModule = __import__( opPyPath, globals(), locals(), agentName ) except ImportError, e: gLogger.info( "Can't load %s: %s" % ( opPyPath, str( e ) ) ) continue try: optimizerClass = getattr( optimizerModule, agentName ) optimizer = optimizerClass( self.optimizerName, self.containerName ) result = optimizer.am_initialize( self.jobDB, self.jobLoggingDB ) if not result[ 'OK' ]: return S_ERROR( "Can't initialize optimizer %s: %s" % ( self.optimizerName, result[ 'Message' ] ) ) return S_OK( optimizer ) except Exception, e: gLogger.exception( "Can't load optimizer %s with root module %s" % ( self.optimizerName, rootModule ) ) return S_ERROR( "Can't load optimizer %s" % self.optimizerName ) | 1a6014f602d8d57734e04d0bff8e636bb9acf8eb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/1a6014f602d8d57734e04d0bff8e636bb9acf8eb/ThreadedMightyOptimizer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
945,
29789,
12,
365,
262,
30,
468,
14112,
358,
1262,
392,
13066,
314,
3328,
18,
1376,
12,
315,
10515,
13066,
738,
87,
6,
738,
365,
18,
29594,
461,
262,
2153,
682,
273,
987,
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,
945,
29789,
12,
365,
262,
30,
468,
14112,
358,
1262,
392,
13066,
314,
3328,
18,
1376,
12,
315,
10515,
13066,
738,
87,
6,
738,
365,
18,
29594,
461,
262,
2153,
682,
273,
987,
18,
... |
price = line_obj.price_by_product_OLD(cr, uid, [], | price = line_obj.price_by_product(cr, uid, [], | def add_product(self, cr, uid, order_id, product_id, qty, context=None): | cf44617d4b4a5eb6212740174011fdb0d3ae48aa /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/cf44617d4b4a5eb6212740174011fdb0d3ae48aa/pos.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
67,
5896,
12,
2890,
16,
4422,
16,
4555,
16,
1353,
67,
350,
16,
3017,
67,
350,
16,
26667,
16,
819,
33,
7036,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
67,
5896,
12,
2890,
16,
4422,
16,
4555,
16,
1353,
67,
350,
16,
3017,
67,
350,
16,
26667,
16,
819,
33,
7036,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
print height, lineHeight, self.linesPerCol | def initializeAndShowInitialView (self): width, height = self.GetClientSizeTuple () self.columnWidth = width / numTotalColumns lineHeight = self.TextHeight (0) self.linesPerCol = height / lineHeight - 5 charWidth = self.TextWidth (stc.STC_STYLE_DEFAULT, 'a') self.charsPerCol = width / charWidth / numTotalColumns print height, lineHeight, self.linesPerCol | 513ea9e3632f6125e7084e93021c89c4164c09ee /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9028/513ea9e3632f6125e7084e93021c89c4164c09ee/candy.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4046,
1876,
5706,
4435,
1767,
261,
2890,
4672,
1835,
16,
2072,
273,
365,
18,
967,
1227,
1225,
9038,
1832,
365,
18,
2827,
2384,
273,
1835,
342,
818,
5269,
3380,
980,
2686,
273,
365,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4046,
1876,
5706,
4435,
1767,
261,
2890,
4672,
1835,
16,
2072,
273,
365,
18,
967,
1227,
1225,
9038,
1832,
365,
18,
2827,
2384,
273,
1835,
342,
818,
5269,
3380,
980,
2686,
273,
365,
18,
... | |
line_fields.insert(2, haplotype_alternate_value) | line_fields.insert(0, haplotype_alternate_value) | def is_valid_chrpos(line): try: # Compute the line key line_key(line) return True except Exception, e: #print(str(e)) return False | f120a004331fcf829080afce769d15027525ad7c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2773/f120a004331fcf829080afce769d15027525ad7c/ConvertTableToAnnotatorRod.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
353,
67,
877,
67,
15182,
917,
12,
1369,
4672,
775,
30,
468,
8155,
326,
980,
498,
980,
67,
856,
12,
1369,
13,
327,
1053,
1335,
1185,
16,
425,
30,
468,
1188,
12,
701,
12,
73,
3719,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
353,
67,
877,
67,
15182,
917,
12,
1369,
4672,
775,
30,
468,
8155,
326,
980,
498,
980,
67,
856,
12,
1369,
13,
327,
1053,
1335,
1185,
16,
425,
30,
468,
1188,
12,
701,
12,
73,
3719,
3... |
c.execute("INSERT INTO version (name) VALUES (%s)", (vers[key],)) | c.execute("INSERT INTO version (name) VALUES (%s)", (vers[key].encode('utf-8'),)) | def setVersionList(self, v, key): """Remove all versions, set them to `v`""" self.assertNoTickets() c = self.db().cursor() c.execute("DELETE FROM version") for vers in v: print " inserting version '%s'" % (vers[key]) c.execute("INSERT INTO version (name) VALUES (%s)", (vers[key],)) self.db().commit() | 64d7085aa21a3f96fa3773e8e3dc44bb3c9d9365 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2831/64d7085aa21a3f96fa3773e8e3dc44bb3c9d9365/bugzilla2trac.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
16770,
682,
12,
2890,
16,
331,
16,
498,
4672,
3536,
3288,
777,
5244,
16,
444,
2182,
358,
1375,
90,
68,
8395,
365,
18,
11231,
2279,
6264,
2413,
1435,
225,
276,
273,
365,
18,
1966,
7675,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
16770,
682,
12,
2890,
16,
331,
16,
498,
4672,
3536,
3288,
777,
5244,
16,
444,
2182,
358,
1375,
90,
68,
8395,
365,
18,
11231,
2279,
6264,
2413,
1435,
225,
276,
273,
365,
18,
1966,
7675,... |
return self.key.verify(self.input) except error: | return self.key.public().verify(self.input) except PyCryptoError: | def verify(self): """returns if the signature in input is valid.""" try: return self.key.verify(self.input) except error: raise CryptoError | 97699db37a7660cb45cb4f14d3907af22642e989 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9938/97699db37a7660cb45cb4f14d3907af22642e989/crypto.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3929,
12,
2890,
4672,
3536,
6154,
309,
326,
3372,
316,
810,
353,
923,
12123,
775,
30,
327,
365,
18,
856,
18,
482,
7675,
8705,
12,
2890,
18,
2630,
13,
1335,
4707,
18048,
668,
30,
1002,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3929,
12,
2890,
4672,
3536,
6154,
309,
326,
3372,
316,
810,
353,
923,
12123,
775,
30,
327,
365,
18,
856,
18,
482,
7675,
8705,
12,
2890,
18,
2630,
13,
1335,
4707,
18048,
668,
30,
1002,
... |
sage: Partition([3,2,1]).boxes() [(0, 0), (0, 1), (0, 2), (1, 0), (1, 1), (2, 0)] | sage: Partition([3,2]).boxes() [(0, 0), (0, 1), (0, 2), (1, 0), (1, 1)] | def boxes(self): """ Return the coordinates of the boxes of self. | 9683db4d95158b54c00baed7b5cbffa0cffe3831 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/9683db4d95158b54c00baed7b5cbffa0cffe3831/partition.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
14356,
12,
2890,
4672,
3536,
2000,
326,
5513,
434,
326,
14356,
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,
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,
14356,
12,
2890,
4672,
3536,
2000,
326,
5513,
434,
326,
14356,
434,
365,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
csv_data = open('%s', 'rb').read().decode('latin-1') | csv_data = open('%s', 'rb').read() | def suite(): s = DocutilsTestSupport.ParserTestSuite() s.generateTests(totest) return s | 2775b7f3a1a5c863a208080f5b8254de4e2611df /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8194/2775b7f3a1a5c863a208080f5b8254de4e2611df/test_tables.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11371,
13332,
272,
273,
3521,
5471,
4709,
6289,
18,
2678,
4709,
13587,
1435,
272,
18,
7163,
14650,
12,
3307,
395,
13,
327,
272,
225,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11371,
13332,
272,
273,
3521,
5471,
4709,
6289,
18,
2678,
4709,
13587,
1435,
272,
18,
7163,
14650,
12,
3307,
395,
13,
327,
272,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
archs.sort() archs = tuple(archs) | archs = tuple(sorted(set(archs))) | def get_platform (): """Return a string that identifies the current platform. This is used mainly to distinguish platform-specific build directories and platform-specific built distributions. Typically includes the OS name and version and the architecture (as supplied by 'os.uname()'), although the exact information included depends on the OS; eg. for IRIX the architecture isn't particularly important (IRIX only runs on SGI hardware), but for Linux the kernel version isn't particularly important. Examples of returned values: linux-i586 linux-alpha (?) solaris-2.6-sun4u irix-5.3 irix64-6.2 Windows will return one of: win-amd64 (64bit Windows on AMD64 (aka x86_64, Intel64, EM64T, etc) win-ia64 (64bit Windows on Itanium) win32 (all others - specifically, sys.platform is returned) For other non-POSIX platforms, currently just returns 'sys.platform'. """ if os.name == 'nt': # sniff sys.version for architecture. prefix = " bit (" i = sys.version.find(prefix) if i == -1: return sys.platform j = sys.version.find(")", i) look = sys.version[i+len(prefix):j].lower() if look == 'amd64': return 'win-amd64' if look == 'itanium': return 'win-ia64' return sys.platform if os.name != "posix" or not hasattr(os, 'uname'): # XXX what about the architecture? NT is Intel or Alpha, # Mac OS is M68k or PPC, etc. return sys.platform # Try to distinguish various flavours of Unix (osname, host, release, version, machine) = os.uname() # Convert the OS name to lowercase, remove '/' characters # (to accommodate BSD/OS), and translate spaces (for "Power Macintosh") osname = osname.lower().replace('/', '') machine = machine.replace(' ', '_') machine = machine.replace('/', '-') if osname[:5] == "linux": # At least on Linux/Intel, 'machine' is the processor -- # i386, etc. # XXX what about Alpha, SPARC, etc? return "%s-%s" % (osname, machine) elif osname[:5] == "sunos": if release[0] >= "5": # SunOS 5 == Solaris 2 osname = "solaris" release = "%d.%s" % (int(release[0]) - 3, release[2:]) # fall through to standard osname-release-machine representation elif osname[:4] == "irix": # could be "irix64"! return "%s-%s" % (osname, release) elif osname[:3] == "aix": return "%s-%s.%s" % (osname, version, release) elif osname[:6] == "cygwin": osname = "cygwin" rel_re = re.compile (r'[\d.]+', re.ASCII) m = rel_re.match(release) if m: release = m.group() elif osname[:6] == "darwin": # # For our purposes, we'll assume that the system version from # distutils' perspective is what MACOSX_DEPLOYMENT_TARGET is set # to. This makes the compatibility story a bit more sane because the # machine is going to compile and link as if it were # MACOSX_DEPLOYMENT_TARGET. from distutils.sysconfig import get_config_vars cfgvars = get_config_vars() macver = os.environ.get('MACOSX_DEPLOYMENT_TARGET') if not macver: macver = cfgvars.get('MACOSX_DEPLOYMENT_TARGET') if 1: # Always calculate the release of the running machine, # needed to determine if we can build fat binaries or not. macrelease = macver # Get the system version. Reading this plist is a documented # way to get the system version (see the documentation for # the Gestalt Manager) try: f = open('/System/Library/CoreServices/SystemVersion.plist') except IOError: # We're on a plain darwin box, fall back to the default # behaviour. pass else: m = re.search( r'<key>ProductUserVisibleVersion</key>\s*' + r'<string>(.*?)</string>', f.read()) f.close() if m is not None: macrelease = '.'.join(m.group(1).split('.')[:2]) # else: fall back to the default behaviour if not macver: macver = macrelease if macver: from distutils.sysconfig import get_config_vars release = macver osname = "macosx" if (macrelease + '.') >= '10.4.' and \ '-arch' in get_config_vars().get('CFLAGS', '').strip(): # The universal build will build fat binaries, but not on # systems before 10.4 # # Try to detect 4-way universal builds, those have machine-type # 'universal' instead of 'fat'. machine = 'fat' cflags = get_config_vars().get('CFLAGS') archs = re.findall('-arch\s+(\S+)', cflags) archs.sort() archs = tuple(archs) if len(archs) == 1: machine = archs[0] elif archs == ('i386', 'ppc'): machine = 'fat' elif archs == ('i386', 'x86_64'): machine = 'intel' elif archs == ('i386', 'ppc', 'x86_64'): machine = 'fat3' elif archs == ('ppc64', 'x86_64'): machine = 'fat64' elif archs == ('i386', 'ppc', 'ppc64', 'x86_64'): machine = 'universal' else: raise ValueError( "Don't know machine value for archs=%r"%(archs,)) elif machine == 'i386': # On OSX the machine type returned by uname is always the # 32-bit variant, even if the executable architecture is # the 64-bit variant if sys.maxsize >= 2**32: machine = 'x86_64' elif machine in ('PowerPC', 'Power_Macintosh'): # Pick a sane name for the PPC architecture. machine = 'ppc' # See 'i386' case if sys.maxsize >= 2**32: machine = 'ppc64' return "%s-%s-%s" % (osname, release, machine) | e933d1dbfd8b9159f8892cb84903030e3ef32db7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12029/e933d1dbfd8b9159f8892cb84903030e3ef32db7/util.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
9898,
1832,
30,
3536,
990,
279,
533,
716,
25283,
326,
783,
4072,
18,
225,
1220,
353,
1399,
31457,
358,
23926,
4072,
17,
12524,
1361,
6402,
471,
4072,
17,
12524,
6650,
23296,
18,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
9898,
1832,
30,
3536,
990,
279,
533,
716,
25283,
326,
783,
4072,
18,
225,
1220,
353,
1399,
31457,
358,
23926,
4072,
17,
12524,
1361,
6402,
471,
4072,
17,
12524,
6650,
23296,
18,... |
d += [Dependency(['zlib1', 'z'], ['zlib.h'])] | d += [Dependency(['zlib', 'zlib1', 'z'], ['zlib.h'])] | def CheckHeadersAndLibraries(env, conf): print "\nChecking headers and libraries" boost_common = Dependency([], ['boost/cstdint.hpp']) boost_thread = Dependency(['boost_thread'], ['boost/thread.hpp']) boost_regex = Dependency(['boost_regex'], ['boost/regex.hpp']) boost_serial = Dependency([], ['boost/serialization/split_member.hpp']) if env.Dictionary('CC').find('gcc') != -1: gcc = True else: gcc = False for boost in (boost_thread, boost_regex): l = boost.libraries[0] if gcc: boost.libraries = [l+'-gcc-mt', l+'-mt', l+'-gcc', l] else: boost.libraries = [l+'-mt', l] d = [boost_common, boost_regex, boost_serial, boost_thread] d += [Dependency(['GL', 'opengl32'], ['GL/gl.h'])] d += [Dependency(['GLU', 'glu32'], ['GL/glu.h'])] d += [Dependency(['GLEW', 'glew32'], ['GL/glew.h'])] d += [Dependency(['zlib1', 'z'], ['zlib.h'])] d += [Dependency(['freetype6', 'freetype'], ['ft2build.h'])] d += [Dependency(['IL', 'devil'], ['IL/il.h'])] d += [Dependency(['ILU', 'ilu'], ['IL/ilu.h'])] d += [Dependency(['openal', 'openal32', 'OpenAL32'], ['AL/al.h'])] if env['platform'] == 'windows': d += [Dependency(['imagehlp'], [])] d += [Dependency(['gdi32'], [])] d += [Dependency(['winmm'], [])] d += [Dependency(['wsock32'], [])] d += [Dependency(['ole32'], [])] d += [Dependency(['mingw32'], [])] d += [Dependency(['SDLmain'], [])] else: d += [Dependency(['Xcursor'], ['X11/Xcursor/Xcursor.h'])] d += [Dependency(['X11'], ['X11/X.h'])] #d += [Dependency(['jvm'], ['jni.h'])] d += [Dependency(['vorbisfile'], ['vorbis/vorbisfile.h'])] d += [Dependency(['vorbis'], [])] d += [Dependency(['ogg'], ['ogg/ogg.h'])] d += [Dependency(['SDL', 'SDL-1.1'], ['SDL/SDL.h', 'SDL11/SDL.h'])] d += [Dependency(['python2.6', 'python26', 'python2.5', 'python25', 'python2.4', 'python24'], ['Python.h'])] d += [Dependency([], ['jni.h'])] if env['use_tcmalloc']: d += [Dependency(['tcmalloc'], [])] all_succes = True for c in d: if not c.CheckHeaders(conf) or not c.CheckLibraries(conf): all_succes = False if not all_succes: print "Not all tests finished succesfully. You are probably missing one of the" print "build dependencies. See config.log for details." env.Exit(1) | 267b2d305ea07e50f7609f8a1925c070ddb399c8 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1030/267b2d305ea07e50f7609f8a1925c070ddb399c8/config.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2073,
3121,
1876,
31909,
12,
3074,
16,
2195,
4672,
1172,
1548,
82,
14294,
1607,
471,
14732,
6,
225,
14994,
67,
6054,
273,
11993,
3816,
6487,
10228,
25018,
19,
71,
5084,
474,
18,
76,
1185... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2073,
3121,
1876,
31909,
12,
3074,
16,
2195,
4672,
1172,
1548,
82,
14294,
1607,
471,
14732,
6,
225,
14994,
67,
6054,
273,
11993,
3816,
6487,
10228,
25018,
19,
71,
5084,
474,
18,
76,
1185... |
db = pgdb.connect(user=datasource['user'], password=datasource['password'], host=datasource['host'], database=datasource['dbname']) | db = psycopg2.connect(user=datasource['user'], password=datasource['password'], host=datasource['host'], database=datasource['dbname']) db.set_client_encoding('utf8') | def __init__(self, config_file=None, city_name=None, boundingbox=None, osmid=None, language=None): """Creates a new OCitySMap renderer instance for the given city. | 0280212f34e2e8635e73455f44e90ed69c35e6cc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9326/0280212f34e2e8635e73455f44e90ed69c35e6cc/street_index.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
642,
67,
768,
33,
7036,
16,
12797,
67,
529,
33,
7036,
16,
12638,
33,
7036,
16,
1140,
13138,
33,
7036,
16,
2653,
33,
7036,
4672,
3536,
2729,
279,
394,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
642,
67,
768,
33,
7036,
16,
12797,
67,
529,
33,
7036,
16,
12638,
33,
7036,
16,
1140,
13138,
33,
7036,
16,
2653,
33,
7036,
4672,
3536,
2729,
279,
394,
5... |
-0.58853274398186273 | -0.588532743981862... | def find_root(self, a, b, var=None, xtol=10e-13, rtol=4.5e-16, maxiter=100, full_output=False): """ Numerically find a root of self on the closed interval [a,b] (or [b,a]) if possible, where self is a function in the one variable. | 626141ba9c3cbca78019d790e9a4dc37c42794e6 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/626141ba9c3cbca78019d790e9a4dc37c42794e6/calculus.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1104,
67,
3085,
12,
2890,
16,
279,
16,
324,
16,
569,
33,
7036,
16,
619,
3490,
33,
2163,
73,
17,
3437,
16,
436,
3490,
33,
24,
18,
25,
73,
17,
2313,
16,
25743,
33,
6625,
16,
1983,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1104,
67,
3085,
12,
2890,
16,
279,
16,
324,
16,
569,
33,
7036,
16,
619,
3490,
33,
2163,
73,
17,
3437,
16,
436,
3490,
33,
24,
18,
25,
73,
17,
2313,
16,
25743,
33,
6625,
16,
1983,
... |
import pdb; pdb.set_trace() | def gettimeout(): timeout = option.timeout.lower() if timeout.endswith('mp'): megapystone = float(timeout[:-2]) t, stone = pystone.Proc0(10000) pystonetime = t/stone seconds = megapystone * 1000000 * pystonetime import pdb; pdb.set_trace() return seconds return float(timeout) | 764c84b8b971c0c6fc294de9513640343fed4507 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6934/764c84b8b971c0c6fc294de9513640343fed4507/conftest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
4538,
13332,
2021,
273,
1456,
18,
4538,
18,
8167,
1435,
309,
2021,
18,
5839,
1918,
2668,
1291,
11,
4672,
312,
1332,
438,
1094,
476,
273,
1431,
12,
4538,
10531,
17,
22,
5717,
268,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
4538,
13332,
2021,
273,
1456,
18,
4538,
18,
8167,
1435,
309,
2021,
18,
5839,
1918,
2668,
1291,
11,
4672,
312,
1332,
438,
1094,
476,
273,
1431,
12,
4538,
10531,
17,
22,
5717,
268,
... | |
newAmazonCollection = AmazonCollection(view=repView, keywords=keywords) return cpiaView.postEventByName('AddToSidebarWithoutCopying', {'items' : [newAmazonCollection]}) | if isEmpty(keywords): """The user did not enter any text to search on or hit the cancel button""" return try: results = amazon.searchByKeyword(keywords) newAmazonCollection = AmazonCollection(results, view=repView, keywords=keywords) return cpiaView.postEventByName('AddToSidebarWithoutCopying', {'items' : [newAmazonCollection]}) except (AmazonError, AttributeError), e: log.exception(e) showError(_(u"No Amazon Wishlist was found for search keywords '%(keywords)s'") % {'keywords': keywords}) | def CreateCollection(repView, cpiaView): keywords = application.dialogs.Util.promptUser(wx.GetApp().mainFrame, _(u"New Amazon Collection"), _(u"Enter your Amazon search keywords:"), u"Theodore Leung") newAmazonCollection = AmazonCollection(view=repView, keywords=keywords) return cpiaView.postEventByName('AddToSidebarWithoutCopying', {'items' : [newAmazonCollection]}) | d6c94c62c7cbbc9f5c098c6d4dd09f098c99ae5a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/d6c94c62c7cbbc9f5c098c6d4dd09f098c99ae5a/AmazonKinds.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1788,
2532,
12,
14462,
1767,
16,
3283,
1155,
1767,
4672,
7093,
273,
2521,
18,
25909,
14072,
18,
1304,
18,
13325,
1299,
12,
27226,
18,
967,
3371,
7675,
5254,
3219,
16,
389,
12,
89,
6,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1788,
2532,
12,
14462,
1767,
16,
3283,
1155,
1767,
4672,
7093,
273,
2521,
18,
25909,
14072,
18,
1304,
18,
13325,
1299,
12,
27226,
18,
967,
3371,
7675,
5254,
3219,
16,
389,
12,
89,
6,
1... |
args[x] = _args[x].value | argv = _args[x] if type(argv) == list: argv = argv[0] args[x] = argv.value | def real_main(): import sync import Href import perm import auth from util import dict_get_with_default, redirect path_info = os.getenv('PATH_INFO') remote_addr = os.getenv('REMOTE_ADDR') remote_user = os.getenv('REMOTE_USER') http_cookie = os.getenv('HTTP_COOKIE') http_referer = os.getenv('HTTP_REFERER') cgi_location = os.getenv('SCRIPT_NAME') database = open_database() config = database.load_config() Href.initialize(cgi_location) # Authenticate the user cookie = Cookie.SimpleCookie(http_cookie) if cookie.has_key('trac_auth'): auth_cookie = cookie['trac_auth'].value else: auth_cookie = None authenticator = auth.Authenticator(database, auth_cookie, remote_addr) if path_info == '/logout': authenticator.logout() redirect (http_referer or Href.href.wiki()) elif remote_user and authenticator.authname == 'anonymous': auth_cookie = authenticator.login(remote_user, remote_addr) # send the cookie to the browser as a http header cookie = Cookie.SimpleCookie() cookie['trac_auth'] = auth_cookie cookie['trac_auth']['path'] = cgi_location print cookie.output() if path_info == '/login': redirect (http_referer or Href.href.wiki()) # Parse arguments args = parse_args(path_info) _args = cgi.FieldStorage() for x in _args.keys(): args[x] = _args[x].value # Load the selected module mode = dict_get_with_default(args, 'mode', 'wiki') module_name, constructor_name, need_svn = modules[mode] module = __import__(module_name, globals(), locals(), []) constructor = getattr(module, constructor_name) module = constructor(config, args) module._name = mode module.db = database module.authname = authenticator.authname module.remote_addr = remote_addr module.cgi_location = cgi_location module.perm = perm.PermissionCache(database, authenticator.authname) module.perm.add_to_hdf(module.cgi.hdf) # Only open the subversion repository for the modules that really # need it. This saves us some precious time. if need_svn: from svn import util, repos, core core.apr_initialize() pool = core.svn_pool_create(None) repos_dir = config['general']['repository_dir'] # Remove any trailing slash or else subversion might abort if not os.path.split(repos_dir)[1]: repos_dir = os.path.split(repos_dir)[0] rep = repos.svn_repos_open(repos_dir, pool) fs_ptr = repos.svn_repos_fs(rep) module.repos = rep module.fs_ptr = fs_ptr sync.sync(database, rep, fs_ptr, pool) else: pool = None # Let the wiki module build a dictionary of all page names import Wiki Wiki.populate_page_dict(database) module.pool = pool module.run() if pool: core.svn_pool_destroy(pool) core.apr_terminate() | 837d81fbe138f5e15a48495694532425c9e23a69 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2831/837d81fbe138f5e15a48495694532425c9e23a69/trac.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2863,
67,
5254,
13332,
1930,
3792,
1930,
670,
1734,
1930,
4641,
1930,
1357,
628,
1709,
1930,
2065,
67,
588,
67,
1918,
67,
1886,
16,
3136,
225,
589,
67,
1376,
273,
1140,
18,
588,
3074,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2863,
67,
5254,
13332,
1930,
3792,
1930,
670,
1734,
1930,
4641,
1930,
1357,
628,
1709,
1930,
2065,
67,
588,
67,
1918,
67,
1886,
16,
3136,
225,
589,
67,
1376,
273,
1140,
18,
588,
3074,
... |
client_filename = a | input_filename = a | def usage(): """Displays program usage information. """ progname = os.path.basename( sys.argv[0] ) print 'Usage: ', progname + ' [-d LEVEL] [-s] [-f FILENAME]' print print 'Options:' print ' -?, -h, --help show this help message and exit' print ' -l PATH, --lisp=PATH path of Lisp interpreter' print ' -r PATH, --run=PATH full command to run the server' print ' -p PORT, --port=PORT port number to use by the server/client' print ' -d LEVEL, --debug=LEVEL set debug LEVEL (0..3)' print ' -s start server' print ' -f FILENAME, --file=FILENAME start client and send contents of file' print ' named FILENAME to server' print ' -c LINE1 LINE2 ... LINEn start client and send LINE1...LINEn to server' print ' (if present, this option must be the last one,' print ' mutually exclusive with the -f option)' | 7c7a679102e6ac5ef4702ffb14ac6f40280d6ba5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10890/7c7a679102e6ac5ef4702ffb14ac6f40280d6ba5/slimv.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4084,
13332,
3536,
16900,
5402,
4084,
1779,
18,
3536,
11243,
529,
273,
1140,
18,
803,
18,
13909,
12,
2589,
18,
19485,
63,
20,
65,
262,
1172,
296,
5357,
30,
2265,
11243,
529,
397,
296,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4084,
13332,
3536,
16900,
5402,
4084,
1779,
18,
3536,
11243,
529,
273,
1140,
18,
803,
18,
13909,
12,
2589,
18,
19485,
63,
20,
65,
262,
1172,
296,
5357,
30,
2265,
11243,
529,
397,
296,
... |
ideal (- x + y , x - y) <BLANKLINE> o36 : Ideal of sage7 | ideal (-x^3+y^2,x-y) | def ideal(self, *gens): """ Return the ideal generated by gens. INPUT: gens -- list or tuple of Macaulay2 objects (or objects that can be made into Macaulay2 objects via evaluation) OUTPUT: the Macaulay2 ideal generated by the given list of gens | 6a92bceac2fb4770d07e6b60770c91aac9c8257b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9890/6a92bceac2fb4770d07e6b60770c91aac9c8257b/macaulay2.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
23349,
12,
2890,
16,
380,
23730,
4672,
3536,
2000,
326,
23349,
4374,
635,
314,
773,
18,
225,
12943,
30,
314,
773,
1493,
666,
578,
3193,
434,
13217,
69,
332,
528,
22,
2184,
261,
280,
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,
23349,
12,
2890,
16,
380,
23730,
4672,
3536,
2000,
326,
23349,
4374,
635,
314,
773,
18,
225,
12943,
30,
314,
773,
1493,
666,
578,
3193,
434,
13217,
69,
332,
528,
22,
2184,
261,
280,
21... |
def main(args = sys.argv[1:], out = sys.stdout): | def main(args = sys.argv[1:], out=sys.stdout): | def main(args = sys.argv[1:], out = sys.stdout): global fnfilter, rmode, bufsize try: opts, args = getopt.getopt(args, 'blts:') except getopt.error, msg: sys.stderr.write('%s: %s\n%s' % (sys.argv[0], msg, usage)) return 2 for o, a in opts: if o == '-l': fnfilter = os.path.basename if o == '-b': rmode = 'rb' if o == '-t': rmode = 'r' if o == '-s': bufsize = int(a) if not args: args = ['-'] return sum(args, out) | ae76efc5f32c0b52c062a486453cfc570826b88a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/ae76efc5f32c0b52c062a486453cfc570826b88a/md5sum.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
12,
1968,
273,
2589,
18,
19485,
63,
21,
30,
6487,
596,
33,
9499,
18,
10283,
4672,
2552,
2295,
2188,
16,
436,
3188,
16,
1681,
1467,
775,
30,
1500,
16,
833,
273,
336,
3838,
18,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
12,
1968,
273,
2589,
18,
19485,
63,
21,
30,
6487,
596,
33,
9499,
18,
10283,
4672,
2552,
2295,
2188,
16,
436,
3188,
16,
1681,
1467,
775,
30,
1500,
16,
833,
273,
336,
3838,
18,
5... |
"netscape", "opera"): | "netscape", "opera", iexplore): | def open(self, url, new=0, autoraise=1): os.startfile(url) return True # Oh, my... | 65651bea05f337dff247bbe21dd81e05627974a4 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8125/65651bea05f337dff247bbe21dd81e05627974a4/webbrowser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1696,
12,
2890,
16,
880,
16,
394,
33,
20,
16,
2059,
10610,
784,
33,
21,
4672,
1140,
18,
1937,
768,
12,
718,
13,
327,
1053,
468,
531,
76,
16,
3399,
2777,
2,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1696,
12,
2890,
16,
880,
16,
394,
33,
20,
16,
2059,
10610,
784,
33,
21,
4672,
1140,
18,
1937,
768,
12,
718,
13,
327,
1053,
468,
531,
76,
16,
3399,
2777,
2,
-100,
-100,
-100,
-100,
... |
self.parser.read(self.filename) | self.parser.readfp(open(self.filename)) | def parse_if_needed(self): if not self.filename: return modtime = os.path.getmtime(self.filename) if modtime > self.__lastmtime: self.parser.read(self.filename) self.__lastmtime = modtime | b2ee511a1ce476f155f9ddc273e08d607005fb30 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2831/b2ee511a1ce476f155f9ddc273e08d607005fb30/config.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
67,
430,
67,
17471,
12,
2890,
4672,
309,
486,
365,
18,
3459,
30,
327,
681,
957,
273,
1140,
18,
803,
18,
588,
10838,
12,
2890,
18,
3459,
13,
309,
681,
957,
405,
365,
16186,
2722... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
430,
67,
17471,
12,
2890,
4672,
309,
486,
365,
18,
3459,
30,
327,
681,
957,
273,
1140,
18,
803,
18,
588,
10838,
12,
2890,
18,
3459,
13,
309,
681,
957,
405,
365,
16186,
2722... |
assert 'textarea' in result | assert ' assert ' assert ' assert ' assert ' assert ' | def test_edit_renders_ok(): system = processPackage('basic') root = server.EditingPyDoctorResource(system) args = {'ob':'basic.mod.C'} result = getTextOfPage(root, 'edit', args=args) # very weak, but it's an assert that things didn't explode assert 'textarea' in result args = {'ob':'does.not.exist'} result = getTextOfPage(root, 'edit', args=args) assert 'An error occurred' in result | 36c87f94fa5d6ceabe63f0f233ca951baafd5594 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5471/36c87f94fa5d6ceabe63f0f233ca951baafd5594/test_server.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
4619,
67,
1187,
6794,
67,
601,
13332,
2619,
273,
1207,
2261,
2668,
13240,
6134,
1365,
273,
1438,
18,
28029,
9413,
3244,
30206,
1420,
12,
4299,
13,
833,
273,
13666,
947,
11,
249... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4619,
67,
1187,
6794,
67,
601,
13332,
2619,
273,
1207,
2261,
2668,
13240,
6134,
1365,
273,
1438,
18,
28029,
9413,
3244,
30206,
1420,
12,
4299,
13,
833,
273,
13666,
947,
11,
249... |
zipopen2 = zipfp.open("another.name") while True: read_data = zipopen2.read(256) if not read_data: break zipdata2.append(read_data) | with zipfp.open("another.name") as zipopen2: while True: read_data = zipopen2.read(256) if not read_data: break zipdata2.append(read_data) | def zip_open_test(self, f, compression): self.make_test_archive(f, compression) | 00da94b6ed796d43d8a0465e223f639d495e9b68 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8125/00da94b6ed796d43d8a0465e223f639d495e9b68/test_zipfile.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3144,
67,
3190,
67,
3813,
12,
2890,
16,
284,
16,
9154,
4672,
365,
18,
6540,
67,
3813,
67,
10686,
12,
74,
16,
9154,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3144,
67,
3190,
67,
3813,
12,
2890,
16,
284,
16,
9154,
4672,
365,
18,
6540,
67,
3813,
67,
10686,
12,
74,
16,
9154,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
} while (i < input.length); | } | def notebook_lib(): s= r""" | 987c529ad5d59c3d520b5fef5298055cb014103c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/987c529ad5d59c3d520b5fef5298055cb014103c/js.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
14718,
67,
2941,
13332,
272,
33,
436,
8395,
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,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
14718,
67,
2941,
13332,
272,
33,
436,
8395,
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... |
resource = memory.File(TEST_DATA_2) handler = CSV(resource) | handler = CSV() handler.load_state_from_string(TEST_DATA_2) | def test_get_row(self): resource = memory.File(TEST_DATA_2) handler = CSV(resource) self.assertEqual(handler.get_row(1), ['four', 'five', 'six']) | 7404f7e83f01f05f84fa82ab4b9b9fcd644b8aa8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12681/7404f7e83f01f05f84fa82ab4b9b9fcd644b8aa8/test_csv.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
588,
67,
492,
12,
2890,
4672,
1838,
273,
10381,
1435,
1838,
18,
945,
67,
2019,
67,
2080,
67,
1080,
12,
16961,
67,
4883,
67,
22,
13,
365,
18,
11231,
5812,
12,
4176,
18,
588,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
588,
67,
492,
12,
2890,
4672,
1838,
273,
10381,
1435,
1838,
18,
945,
67,
2019,
67,
2080,
67,
1080,
12,
16961,
67,
4883,
67,
22,
13,
365,
18,
11231,
5812,
12,
4176,
18,
588,... |
print 'col 3' | def setData(self, index, value, role=Qt.EditRole): """change data in the model""" try: if index.isValid() and role == Qt.EditRole: column = index.column() item = index.internalPointer() data = item.content print 'setData:rule, column, value:', data.name, column, value if isinstance(data, Ruleset) and column == 0: name = str(value.toString()) data.rename(english.get(name, name)) print 'rename ruleset name' elif isinstance(data, Ruleset) and column == 3: data.description = unicode(value.toString()) print 'rename ruleset descr' elif isinstance(data, Rule): print 'data is a rule' ruleset = item.ruleset() if column == 0: print 'col 0' name = str(value.toString()) data.name = english.get(name, name) elif column == 1: print 'col 1' if data in ruleset.intRules: print 'in intrules' data.integer = value.toInt()[0] print 'setData: intrule:',data.integer elif data in ruleset.strRules: print 'in strrules' data.string = str(value.toString()) print 'setData: strrule:',data.string else: newval = value.toInt()[0] print 'in otherrules:', newval data.score.value = value.toInt()[0] print 'setData: sore:',data.score.value elif column == 2: print 'col 2' data.score.unit = value.toInt()[0] elif column == 3: print 'col 3' data.definition = str(value.toString()) else: print 'col x' print 'rule column not implemented', column else: return False self.emit(SIGNAL("dataChanged(QModelIndex,QModelIndex)"), index, index) return True return False except BaseException: return False | f4ebc70913d540288664e74be0928c16cfecec73 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1679/f4ebc70913d540288664e74be0928c16cfecec73/rulesetselector.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7929,
12,
2890,
16,
770,
16,
460,
16,
2478,
33,
23310,
18,
4666,
2996,
4672,
3536,
3427,
501,
316,
326,
938,
8395,
775,
30,
309,
770,
18,
26810,
1435,
471,
2478,
422,
7354,
18,
4666,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7929,
12,
2890,
16,
770,
16,
460,
16,
2478,
33,
23310,
18,
4666,
2996,
4672,
3536,
3427,
501,
316,
326,
938,
8395,
775,
30,
309,
770,
18,
26810,
1435,
471,
2478,
422,
7354,
18,
4666,
... | |
if action.parent in (result.vertices and | if (action.parent in result.vertices and | def getVersionGraph(self): """getVersionGraph() -> Graph Returns the version graph """ result = Graph() result.add_vertex(0) | 0cfcc166d262810983f4031c0dadf8fe839801e9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6341/0cfcc166d262810983f4031c0dadf8fe839801e9/vistrail.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8343,
4137,
12,
2890,
4672,
3536,
588,
1444,
4137,
1435,
317,
5601,
2860,
326,
1177,
2667,
225,
3536,
563,
273,
5601,
1435,
563,
18,
1289,
67,
15281,
12,
20,
13,
2,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
8343,
4137,
12,
2890,
4672,
3536,
588,
1444,
4137,
1435,
317,
5601,
2860,
326,
1177,
2667,
225,
3536,
563,
273,
5601,
1435,
563,
18,
1289,
67,
15281,
12,
20,
13,
2,
-100,
-100,
-100,
-... |
isomorphic to self after adjoining sqrt(D) to the base | isomorphic to self after adjoining sqrt(D) to the base. | def quadratic_twist(self, D): """ Return the quadratic twist of this curve by D, which must be nonzero except in characteristic 2. | b731b462902660c0112a8494ebc6f58ef36102b5 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/b731b462902660c0112a8494ebc6f58ef36102b5/ell_generic.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
26146,
67,
11246,
376,
12,
2890,
16,
463,
4672,
3536,
2000,
326,
26146,
2339,
376,
434,
333,
8882,
635,
463,
16,
1492,
1297,
506,
16966,
1335,
316,
23158,
576,
18,
2,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
26146,
67,
11246,
376,
12,
2890,
16,
463,
4672,
3536,
2000,
326,
26146,
2339,
376,
434,
333,
8882,
635,
463,
16,
1492,
1297,
506,
16966,
1335,
316,
23158,
576,
18,
2,
-100,
-100,
-100,
... |
result = instance.trash(File(filename)) | result = instance.trash(file_to_trash) | def test_trash(self) : #instance instance=TrashDirectory(File("sandbox/.local/sharetestTrashDirectory"), Volume(File("/"))) | 5d14555f878edcc3f1dd18e70706c47baedb74c8 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11994/5d14555f878edcc3f1dd18e70706c47baedb74c8/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
28665,
12,
2890,
13,
294,
468,
1336,
791,
33,
29420,
2853,
12,
812,
2932,
27004,
15865,
3729,
19,
14419,
3813,
29420,
2853,
6,
3631,
7404,
12,
812,
2932,
4898,
20349,
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,
1842,
67,
28665,
12,
2890,
13,
294,
468,
1336,
791,
33,
29420,
2853,
12,
812,
2932,
27004,
15865,
3729,
19,
14419,
3813,
29420,
2853,
6,
3631,
7404,
12,
812,
2932,
4898,
20349,
2,
-100,
... |
Integral Homology of Jacobian of the modular curve associated to the congruence subgroup Gamma0(389) | Integral Homology of Abelian variety J0(389) of dimension 32 | def homology(self, base_ring=ZZ): """ Return the homology of this modular abelian variety. | 62147d82541f9aed0900f78cd10df5f262f228f5 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/62147d82541f9aed0900f78cd10df5f262f228f5/abvar.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13995,
4676,
12,
2890,
16,
1026,
67,
8022,
33,
27096,
4672,
3536,
2000,
326,
13995,
4676,
434,
333,
681,
2490,
1223,
292,
2779,
1394,
14369,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
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,
13995,
4676,
12,
2890,
16,
1026,
67,
8022,
33,
27096,
4672,
3536,
2000,
326,
13995,
4676,
434,
333,
681,
2490,
1223,
292,
2779,
1394,
14369,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
request_uri.path = uri.Path('/%s%s' % (base_path,request_uri.path)) | diff_path = base_path.get_pathto(request_uri.path) request_uri.path = uri.Path('/%s' % diff_path) | def __init__(self, request): self.request = request self.response = Response() | 3607004ea82fcaac87f765463271f53ae3e3c265 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12681/3607004ea82fcaac87f765463271f53ae3e3c265/context.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
590,
4672,
365,
18,
2293,
273,
590,
365,
18,
2740,
273,
2306,
1435,
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,
1001,
2738,
972,
12,
2890,
16,
590,
4672,
365,
18,
2293,
273,
590,
365,
18,
2740,
273,
2306,
1435,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
self.membernames = [] | def __init__(self, name=None, mode="r", fileobj=None): """Open an (uncompressed) tar archive `name'. `mode' is either 'r' to read from an existing archive, 'a' to append data to an existing file or 'w' to create a new file overwriting an existing one. `mode' defaults to 'r'. If `fileobj' is given, it is used for reading or writing data. If it can be determined, `mode' is overridden by `fileobj's mode. `fileobj' is not closed, when TarFile is closed. """ self.name = name | d0fb0ac63c5db48d344c6e8e8dab57214f04e854 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/d0fb0ac63c5db48d344c6e8e8dab57214f04e854/tarfile.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
508,
33,
7036,
16,
1965,
1546,
86,
3113,
17041,
33,
7036,
4672,
3536,
3678,
392,
261,
551,
362,
10906,
13,
8232,
5052,
1375,
529,
10332,
1375,
3188,
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,
1001,
2738,
972,
12,
2890,
16,
508,
33,
7036,
16,
1965,
1546,
86,
3113,
17041,
33,
7036,
4672,
3536,
3678,
392,
261,
551,
362,
10906,
13,
8232,
5052,
1375,
529,
10332,
1375,
3188,
11,
... | |
self.bossTask = self.bossLiteSession.loadTask( bossJob['taskId'], bossJob['jobId'] ) | def prepareResubmission(self, bossJob): """ __prepareResubmission__ | de293df74bea8cc7253c8703e21bdfdeb0f8245a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8887/de293df74bea8cc7253c8703e21bdfdeb0f8245a/BossLiteBulkInterface.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2911,
607,
373,
3951,
12,
2890,
16,
324,
8464,
2278,
4672,
3536,
1001,
9366,
607,
373,
3951,
972,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2911,
607,
373,
3951,
12,
2890,
16,
324,
8464,
2278,
4672,
3536,
1001,
9366,
607,
373,
3951,
972,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... | |
altdep = "built/bin/interrogate.exe" | altdep = "built/bin/interrogate.exe" | def EnqueueIgate(ipath=0, opts=0, outd=0, obj=0, src=0, module=0, library=0, also=0, skip=0): if ((ipath==0)|(opts==0)|(outd==0)|(obj==0)|(src==0)|(module==0)|(library==0)|(also==0)|(skip==0)): exit("syntax error in EnqueueIgate directive") if (COMPILER=="MSVC7"): altdep = "built/bin/interrogate.exe" wobj = "built/tmp/"+obj fn = CompileIgateMSVC7 if (COMPILER=="LINUXA"): altdep = "built/bin/interrogate" wobj = "built/tmp/"+obj[:-4]+".o" fn = CompileIgateLINUXA if (SLAVEBUILD!=0) and (SLAVEBUILD!=wobj): return ALLIN.append(outd) outd = 'built/pandac/input/'+outd dirlisting = os.listdir(src) files = fnmatch.filter(dirlisting,"*.h") if (skip=='ALL'): files=[] else: files.sort() for x in skip: if (files.count(x)!=0): files.remove(x) for x in also: files.append(x) ipath = ["built/tmp"] + ipath + ["built/include"] dep = ["built/tmp/dtool_have_python.dat"] dep = dep + CxxCalcDependenciesAll(xpaths(src+"/",files,""), ipath) outc = "built/tmp/"+obj[:-4]+".cxx" DependencyQueue(fn, [ipath,opts,outd,outc,wobj,src,module,library,files], [wobj, outd], dep, [altdep]) | c92b9d824116f0d2cc2e67ded17a2f353593d4fb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8543/c92b9d824116f0d2cc2e67ded17a2f353593d4fb/makepanda.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1374,
4000,
45,
10115,
12,
625,
421,
33,
20,
16,
1500,
33,
20,
16,
596,
72,
33,
20,
16,
1081,
33,
20,
16,
1705,
33,
20,
16,
1605,
33,
20,
16,
5313,
33,
20,
16,
2546,
33,
20,
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,
1374,
4000,
45,
10115,
12,
625,
421,
33,
20,
16,
1500,
33,
20,
16,
596,
72,
33,
20,
16,
1081,
33,
20,
16,
1705,
33,
20,
16,
1605,
33,
20,
16,
5313,
33,
20,
16,
2546,
33,
20,
16... |
move_id = self.copy(cr, uid, move.id, {'product_qty':r[0], 'location_id':r[1]}) | move_id = self.copy(cr, uid, move.id, {'product_qty': r[0], 'location_id': r[1]}) | def check_assign(self, cr, uid, ids, context={}): done = [] count=0 pickings = {} for move in self.browse(cr, uid, ids): if move.product_id.type == 'consu': if move.state in ('confirmed', 'waiting'): done.append(move.id) pickings[move.picking_id.id] = 1 continue if move.state in ('confirmed','waiting'): res = self.pool.get('stock.location')._product_reserve(cr, uid, [move.location_id.id], move.product_id.id, move.product_qty, {'uom': move.product_uom.id}) if res: done.append(move.id) pickings[move.picking_id.id] = 1 r = res.pop(0) cr.execute('update stock_move set location_id=%s, product_qty=%s where id=%s', (r[1],r[0], move.id)) | 369221b47101072e094ad2d02fe2edd2b47690aa /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/369221b47101072e094ad2d02fe2edd2b47690aa/stock.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
67,
6145,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
819,
12938,
4672,
2731,
273,
5378,
1056,
33,
20,
6002,
899,
273,
2618,
364,
3635,
316,
365,
18,
25731,
12,
3353,
16,
4555,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
67,
6145,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
819,
12938,
4672,
2731,
273,
5378,
1056,
33,
20,
6002,
899,
273,
2618,
364,
3635,
316,
365,
18,
25731,
12,
3353,
16,
4555,
... |
inherit = (container != cls.uid() and container.value() is not types.ClassType) | inherit = (container != cls.uid()) | def _func_details(self, functions, cls, heading='Function Details'): """ @return: The HTML code for a function details table. This is used by L{_module_to_html} to describe the functions in a module; and by L{_class_to_html} to describe member functions. @rtype: C{string} """ functions = self._filtersort_links(functions) if len(functions) == 0: return '' str = self._table_header(heading, 'details')+'</table>\n' | 89beeb44626de4d9afe03ace070b1fe843378269 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/89beeb44626de4d9afe03ace070b1fe843378269/html.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
644,
67,
6395,
12,
2890,
16,
4186,
16,
2028,
16,
11053,
2218,
2083,
21897,
11,
4672,
3536,
632,
2463,
30,
1021,
3982,
981,
364,
279,
445,
3189,
1014,
18,
225,
1220,
353,
1399,
635... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
644,
67,
6395,
12,
2890,
16,
4186,
16,
2028,
16,
11053,
2218,
2083,
21897,
11,
4672,
3536,
632,
2463,
30,
1021,
3982,
981,
364,
279,
445,
3189,
1014,
18,
225,
1220,
353,
1399,
635... |
'%(libdir)s/pkgconfig/', | def updateArgs(self, *args, **keywords): | 1c69e2bfc9a8ff6cce0ef87817276fe83b37b1b9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8747/1c69e2bfc9a8ff6cce0ef87817276fe83b37b1b9/packagepolicy.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
2615,
12,
2890,
16,
380,
1968,
16,
2826,
11771,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
2615,
12,
2890,
16,
380,
1968,
16,
2826,
11771,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... | |
ipo = self._createInstPackage('bar', '1') | ipo = self.instPackage('bar', '1') | def testConflictWithInstalled(self): ''' update fails, because it conflicts with installed foo 1.0 -> 2.0 update fails, because foo-2.0 conflict with bar-1.0 the update get skipped and the transaction is now empty ''' po1 = self._createInstPackage('foo', '1') po2 = self._createRepoPackage('foo', '2') po2.addConflicts('bar', 'EQ', ('0', '1', '0')) | f29fddfeba059aed51f7896bf712a7e74ea6c59d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5445/f29fddfeba059aed51f7896bf712a7e74ea6c59d/skipbroken-tests.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
10732,
1190,
16747,
12,
2890,
4672,
9163,
1089,
6684,
16,
2724,
518,
14450,
598,
5876,
8431,
404,
18,
20,
317,
576,
18,
20,
1089,
6684,
16,
2724,
8431,
17,
22,
18,
20,
7546,
598,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
10732,
1190,
16747,
12,
2890,
4672,
9163,
1089,
6684,
16,
2724,
518,
14450,
598,
5876,
8431,
404,
18,
20,
317,
576,
18,
20,
1089,
6684,
16,
2724,
8431,
17,
22,
18,
20,
7546,
598,... |
return self.tk.call(self._w, 'info', 'next', entry) | return self.tk.call(self._w, 'info', 'next', entry) | def info_next(self, entry): | b0e44d61d9e592e1acd6aa05eac9704ba5776f61 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/b0e44d61d9e592e1acd6aa05eac9704ba5776f61/Tix.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1123,
67,
4285,
12,
2890,
16,
1241,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1123,
67,
4285,
12,
2890,
16,
1241,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
w.addItem(QtCore.QString()) | w.addItem("") | def handleItem(self, elem): if self.stack.topIsLayout(): elem[0].attrib["grid-position"] = gridPosition(elem) self.traverseWidgetTree(elem) else: w = self.stack.topwidget | 6529ae258b4c3783cebf9eca6dd14a0fa0a712fd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12642/6529ae258b4c3783cebf9eca6dd14a0fa0a712fd/uiparser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
1180,
12,
2890,
16,
3659,
4672,
309,
365,
18,
3772,
18,
3669,
2520,
3744,
13332,
3659,
63,
20,
8009,
14588,
9614,
5222,
17,
3276,
11929,
273,
3068,
2555,
12,
10037,
13,
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,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
1180,
12,
2890,
16,
3659,
4672,
309,
365,
18,
3772,
18,
3669,
2520,
3744,
13332,
3659,
63,
20,
8009,
14588,
9614,
5222,
17,
3276,
11929,
273,
3068,
2555,
12,
10037,
13,
365,
18,
... |
except ParseError, e: parse_error = str(e) except ImportError, e: | except (ParseError, ImportError, IOError, OSError), e: | def _get_docs_from_module_file(filename, options, progress_estimator, parent_docs=(None,None)): """ Construct and return the API documentation for the python module with the given filename. @param parent_docs: The C{ModuleDoc} of the containing package. If C{parent_docs} is not provided, then this method will check if the given filename is contained in a package; and if so, it will construct a stub C{ModuleDoc} for the containing package(s). C{parent_docs} is a tuple, where the first element is the parent from introspection, and the second element is the parent from parsing. """ # Record our progress. modulename = os.path.splitext(os.path.split(filename)[1])[0] if modulename == '__init__': modulename = os.path.split(os.path.split(filename)[0])[1] if parent_docs[0]: modulename = DottedName(parent_docs[0].canonical_name, modulename) elif parent_docs[1]: modulename = DottedName(parent_docs[1].canonical_name, modulename) if options.must_introspect(modulename) or options.must_parse(modulename): log.progress(progress_estimator.progress(), '%s (%s)' % (modulename, filename)) progress_estimator.complete += 1 # Normalize the filename. filename = os.path.normpath(os.path.abspath(filename)) # When possible, use the source version of the file. try: filename = py_src_filename(filename) src_file_available = True except ValueError: src_file_available = False # Get the introspected & parsed docs (as appropriate) introspect_doc = parse_doc = None introspect_error = parse_error = None if options.must_introspect(modulename): try: introspect_doc = introspect_docs( filename=filename, context=parent_docs[0]) if introspect_doc.canonical_name is UNKNOWN: introspect_doc.canonical_name = modulename except ImportError, e: introspect_error = str(e) if src_file_available and options.must_parse(modulename): try: parse_doc = parse_docs( filename=filename, context=parent_docs[1]) except ParseError, e: parse_error = str(e) except ImportError, e: parse_error = str(e) # Report any errors we encountered. _report_errors(filename, introspect_doc, parse_doc, introspect_error, parse_error) # Return the docs we found. return (introspect_doc, parse_doc) | d7852487be5b1ae11bafe68deec33a2724362cb8 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3512/d7852487be5b1ae11bafe68deec33a2724362cb8/docbuilder.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
67,
8532,
67,
2080,
67,
2978,
67,
768,
12,
3459,
16,
702,
16,
4007,
67,
395,
12502,
16,
982,
67,
8532,
28657,
7036,
16,
7036,
3719,
30,
3536,
14291,
471,
327,
326,
1491,
73... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
67,
8532,
67,
2080,
67,
2978,
67,
768,
12,
3459,
16,
702,
16,
4007,
67,
395,
12502,
16,
982,
67,
8532,
28657,
7036,
16,
7036,
3719,
30,
3536,
14291,
471,
327,
326,
1491,
73... |
if '.' not in path: path.insert(0,'.') | if not noCWD and '.' not in path: path.insert(0,'.') | def recursiveImport(modulename, baseDir=None): """Dynamically imports possible packagized module, or raises ImportError""" import imp parts = string.split(modulename, '.') part = parts[0] path = list(baseDir and (type(baseDir) not in SeqTypes and [baseDir] or filter(None,baseDir)) or None) if '.' not in path: path.insert(0,'.') #make import errors a bit more informative try: (file, pathname, description) = imp.find_module(part, path) childModule = parentModule = imp.load_module(part, file, pathname, description) for name in parts[1:]: (file, pathname, description) = imp.find_module(name, parentModule.__path__) childModule = imp.load_module(name, file, pathname, description) setattr(parentModule, name, childModule) parentModule = childModule except ImportError: msg = "cannot import '%s' while attempting recursive import of '%s'" % (part, modulename) if baseDir: msg = msg + " under paths '%s'" % `path` raise ImportError, msg return childModule | f0f6a55bf072756e72e64c68b21801f403e5f233 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3878/f0f6a55bf072756e72e64c68b21801f403e5f233/utils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5904,
5010,
12,
1711,
332,
1069,
16,
14078,
33,
7036,
4672,
3536,
9791,
1230,
10095,
3323,
2298,
346,
1235,
1605,
16,
578,
14183,
11308,
8395,
1930,
1646,
2140,
273,
533,
18,
4939,
12,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5904,
5010,
12,
1711,
332,
1069,
16,
14078,
33,
7036,
4672,
3536,
9791,
1230,
10095,
3323,
2298,
346,
1235,
1605,
16,
578,
14183,
11308,
8395,
1930,
1646,
2140,
273,
533,
18,
4939,
12,
1... |
Arguments: | Args: | def _WaitForCompletion(self, spawned_tests): """Waits for tests to complete and returns a list of failed tests. | 3bab0321232e7900a9e827658ca48c5797d77023 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/3bab0321232e7900a9e827658ca48c5797d77023/cros_run_parallel_vm_tests.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
29321,
11238,
12,
2890,
16,
12560,
329,
67,
16341,
4672,
3536,
26153,
364,
7434,
358,
3912,
471,
1135,
279,
666,
434,
2535,
7434,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
29321,
11238,
12,
2890,
16,
12560,
329,
67,
16341,
4672,
3536,
26153,
364,
7434,
358,
3912,
471,
1135,
279,
666,
434,
2535,
7434,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
cell.set_property('text', unicode(value)) | cell.set_property('text', unicode(value or "")) | def cell_data_func(self, column, cell, model, iter, index): value = model.get_value(iter, index) cell.set_property('text', unicode(value)) | d0072a331e9921957163cf8510d4c6b35695c5b5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2510/d0072a331e9921957163cf8510d4c6b35695c5b5/proprenderer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2484,
67,
892,
67,
644,
12,
2890,
16,
1057,
16,
2484,
16,
938,
16,
1400,
16,
770,
4672,
460,
273,
938,
18,
588,
67,
1132,
12,
2165,
16,
770,
13,
2484,
18,
542,
67,
4468,
2668,
955,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2484,
67,
892,
67,
644,
12,
2890,
16,
1057,
16,
2484,
16,
938,
16,
1400,
16,
770,
4672,
460,
273,
938,
18,
588,
67,
1132,
12,
2165,
16,
770,
13,
2484,
18,
542,
67,
4468,
2668,
955,... |
msg = self.reporter.info( | msg = self.reporter.warning( | def underline(self, match, context, next_state): """Section title.""" lineno = self.state_machine.abs_line_number() if not self.state_machine.match_titles: blocktext = context[0] + '\n' + self.state_machine.line msg = self.reporter.severe( 'Unexpected section title at line %s.' % lineno, '', nodes.literal_block(blocktext, blocktext)) self.parent += msg return [], next_state, [] title = context[0].rstrip() underline = match.string.rstrip() source = title + '\n' + underline if len(title) > len(underline): blocktext = context[0] + '\n' + self.state_machine.line msg = self.reporter.info( 'Title underline too short at line %s.' % lineno, '', nodes.literal_block(blocktext, blocktext)) self.parent += msg style = underline[0] context[:] = [] self.section(title, source, style, lineno - 1) return [], next_state, [] | 8b49a4012469652ced7dea443429debf919c0539 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1532/8b49a4012469652ced7dea443429debf919c0539/states.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
25985,
12,
2890,
16,
845,
16,
819,
16,
1024,
67,
2019,
4672,
3536,
5285,
2077,
12123,
7586,
273,
365,
18,
2019,
67,
9149,
18,
5113,
67,
1369,
67,
2696,
1435,
309,
486,
365,
18,
2019,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
25985,
12,
2890,
16,
845,
16,
819,
16,
1024,
67,
2019,
4672,
3536,
5285,
2077,
12123,
7586,
273,
365,
18,
2019,
67,
9149,
18,
5113,
67,
1369,
67,
2696,
1435,
309,
486,
365,
18,
2019,
... |
class Stylizer(object): | class Stylizer(object): | def __repr__(self): return '<%s %s for %r>' % ( self.__class__.__name__, hex(abs(id(self)))[2:], self.css) | 5ac7ff5bf2ee81c4148e1d7d8e29b0f8a6bdd6bb /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9125/5ac7ff5bf2ee81c4148e1d7d8e29b0f8a6bdd6bb/stylizer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
12715,
972,
12,
2890,
4672,
327,
2368,
9,
87,
738,
87,
364,
738,
86,
1870,
738,
261,
365,
16186,
1106,
972,
16186,
529,
972,
16,
3827,
12,
5113,
12,
350,
12,
2890,
20349,
63,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
12715,
972,
12,
2890,
4672,
327,
2368,
9,
87,
738,
87,
364,
738,
86,
1870,
738,
261,
365,
16186,
1106,
972,
16186,
529,
972,
16,
3827,
12,
5113,
12,
350,
12,
2890,
20349,
63,
2... |
ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp') | ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/test.shp') | def ogr_vrt_14(): if gdaltest.vrt_ds is None: return 'skip' try: ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp') except: pass shp_ds = ogr.GetDriverByName('ESRI Shapefile').CreateDataSource('tmp/test.shp') shp_lyr = shp_ds.CreateLayer('test') feat = ogr.Feature(shp_lyr.GetLayerDefn()) geom = ogr.CreateGeometryFromWkt('POINT (-10 49)') feat.SetGeometryDirectly(geom) shp_lyr.CreateFeature(feat) feat.Destroy() feat = ogr.Feature(shp_lyr.GetLayerDefn()) geom = ogr.CreateGeometryFromWkt('POINT (-10 49)') feat.SetGeometryDirectly(geom) shp_lyr.CreateFeature(feat) feat.Destroy() feat = ogr.Feature(shp_lyr.GetLayerDefn()) geom = ogr.CreateGeometryFromWkt('POINT (2 49)') feat.SetGeometryDirectly(geom) shp_lyr.CreateFeature(feat) feat.Destroy() feat = ogr.Feature(shp_lyr.GetLayerDefn()) geom = ogr.CreateGeometryFromWkt('POINT (-10 49)') feat.SetGeometryDirectly(geom) shp_lyr.CreateFeature(feat) feat.Destroy() shp_ds.ExecuteSQL('CREATE SPATIAL INDEX on test'); shp_ds.Destroy() vrt_xml = """ | 334e0eceee48f2d7233a943cc61920823bd1a90a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10290/334e0eceee48f2d7233a943cc61920823bd1a90a/ogr_vrt.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
320,
3197,
67,
90,
3797,
67,
3461,
13332,
309,
15551,
2390,
395,
18,
90,
3797,
67,
2377,
353,
599,
30,
327,
296,
7457,
11,
775,
30,
320,
3197,
18,
967,
4668,
5911,
2668,
3991,
2259,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
320,
3197,
67,
90,
3797,
67,
3461,
13332,
309,
15551,
2390,
395,
18,
90,
3797,
67,
2377,
353,
599,
30,
327,
296,
7457,
11,
775,
30,
320,
3197,
18,
967,
4668,
5911,
2668,
3991,
2259,
... |
model.PackageListing.collectionid==DEVEL, | model.PackageListing.collectionid==DEVEL, | def index(self): if identity.current.anonymous: own = 'need to be logged in' else: own = model.PackageListing.query.filter_by(owner=fasid).count() # most packages owned in DEVEL collection top_owners_select = sqlalchemy.select( [func.count(model.PackageListing.owner).label('numpkgs'), model.PackageListing.owner], and_( model.PackageListing.collectionid==DEVEL, model.PackageListing.owner!=ORPHAN_ID)).group_by( model.PackageListing.owner).order_by( desc('numpkgs')).limit(20) top_owners_names = [] for listing in top_owners_select.execute(): top_owners_names.append(self.fas.cache[int(listing.owner)]['username']) | 9632e88aef7435300565e923e2057e435e2b7f8d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9953/9632e88aef7435300565e923e2057e435e2b7f8d/stats.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
770,
12,
2890,
4672,
309,
4215,
18,
2972,
18,
19070,
30,
4953,
273,
296,
14891,
358,
506,
7545,
316,
11,
469,
30,
4953,
273,
938,
18,
2261,
19081,
18,
2271,
18,
2188,
67,
1637,
12,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
770,
12,
2890,
4672,
309,
4215,
18,
2972,
18,
19070,
30,
4953,
273,
296,
14891,
358,
506,
7545,
316,
11,
469,
30,
4953,
273,
938,
18,
2261,
19081,
18,
2271,
18,
2188,
67,
1637,
12,
8... |
dep = dep.replace("[","") dep = dep.replace("]","") | dep = dep.strip("[]") | def deps_check(target): deps = [] # run the "file" command and see if it's ELF filetype = os.popen("file " + target).read() if re.search("ELF", filetype): if not re.search("statically linked", filetype): elfcall = "readelf -d " + target for elfdata in os.popen(elfcall).readlines(): # lines we want all have "NEEDED" if re.search("NEEDED", elfdata): # library is the 5th field dep = string.split(elfdata)[4] dep = dep.replace("[","") dep = dep.replace("]","") deps.append(dep) if do_static: deps.extend(static_deps_check(target)) else: raise NotELFError, "not an ELF file" return deps | 89ba6d56319b5570ed0de187a733e3a224e3b917 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4228/89ba6d56319b5570ed0de187a733e3a224e3b917/readelf.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8740,
67,
1893,
12,
3299,
4672,
8740,
273,
5378,
468,
1086,
326,
315,
768,
6,
1296,
471,
2621,
309,
518,
1807,
512,
9105,
18902,
273,
1140,
18,
84,
3190,
2932,
768,
315,
397,
1018,
293... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8740,
67,
1893,
12,
3299,
4672,
8740,
273,
5378,
468,
1086,
326,
315,
768,
6,
1296,
471,
2621,
309,
518,
1807,
512,
9105,
18902,
273,
1140,
18,
84,
3190,
2932,
768,
315,
397,
1018,
293... |
if t: | if look_for_link and t: | def elem_to_link(elem, href, counter): text = (u''.join(elem.xpath('string()'))).strip() if not text: return None, None, None t = elem.xpath('descendant-or-self::a[@href]') if t: _href = 'content/' + t[0].get('href', '') parts = _href.split('#') _href = parts[0] frag = None if len(parts) == 1 else parts[-1] else: _href = href id = elem.get('id', 'calibre_chapter_%d'%counter) elem.set('id', id) frag = id return text, _href, frag | f626ae027098dba64367daa0ad6e264c26b443b7 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9125/f626ae027098dba64367daa0ad6e264c26b443b7/html.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3659,
67,
869,
67,
1232,
12,
10037,
16,
3897,
16,
3895,
4672,
977,
273,
261,
89,
6309,
18,
5701,
12,
10037,
18,
18644,
2668,
1080,
11866,
3719,
2934,
6406,
1435,
309,
486,
977,
30,
327... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3659,
67,
869,
67,
1232,
12,
10037,
16,
3897,
16,
3895,
4672,
977,
273,
261,
89,
6309,
18,
5701,
12,
10037,
18,
18644,
2668,
1080,
11866,
3719,
2934,
6406,
1435,
309,
486,
977,
30,
327... |
_tryorder = ["galeon", "mozilla", "netscape", "kfm", "grail", "links", "lynx", "w3m",] | _tryorder = ["links", "lynx", "w3m"] | def open_new(self, url): self.open(url) | 84020218d1d14d642fbe4498588255ae9cb28f92 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/84020218d1d14d642fbe4498588255ae9cb28f92/webbrowser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1696,
67,
2704,
12,
2890,
16,
880,
4672,
365,
18,
3190,
12,
718,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
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,
1696,
67,
2704,
12,
2890,
16,
880,
4672,
365,
18,
3190,
12,
718,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
corner_angles = hlr_utils.get_corner_geometry(corner_geom) | corner_angles = hlr_utils.get_corner_geometry(config.corner_geom) | def run(config, tim=None): """ This method is where the data reduction process gets done. @param config: Object containing the data reduction configuration information. @type config: L{hlr_utils.Configure} @param tim: (OPTIONAL) Object that will allow the method to perform timing evaluations. @type tim: C{sns_time.DiffTime} """ import common_lib import dr_lib import DST if tim is not None: tim.getTime(False) old_time = tim.getOldTime() if config.data is None: raise RuntimeError("Need to pass a data filename to the driver "\ +"script.") # Read in geometry if one is provided if config.inst_geom is not None: if config.verbose: print "Reading in instrument geometry file" inst_geom_dst = DST.getInstance("application/x-NxsGeom", config.inst_geom) else: inst_geom_dst = None config.so_axis = "time_of_flight" if type(config.mask_file) == type([]): config.mask_file = hlr_utils.merge_roi_files(config.mask_file) # Steps 1-3: Produce a scaled summed dark current dataset dc_som = dr_lib.scaled_summed_data(config.dkcur, config, dataset_type="dark_current", timer=tim) # Perform Steps 3-6 on black can data if config.bcan is not None: b_som1 = dr_lib.calibrate_dgs_data(config.bcan, config, dc_som, dataset_type="black_can", inst_geom_dst=inst_geom_dst, tib_const=config.tib_const, timer=tim) else: b_som1 = None # Perform Steps 3-6 on empty can data if config.ecan is not None: e_som1 = dr_lib.calibrate_dgs_data(config.ecan, config, dc_som, dataset_type="empty_can", inst_geom_dst=inst_geom_dst, tib_const=config.tib_const, timer=tim) else: e_som1 = None # Perform Steps 3-6 on normalization data if config.norm is not None: n_som1 = dr_lib.calibrate_dgs_data(config.norm, config, dc_som, dataset_type="normalization", inst_geom_dst=inst_geom_dst, tib_const=config.tib_const, timer=tim) else: n_som1 = None # Perform Steps 3-6 on sample data d_som1 = dr_lib.calibrate_dgs_data(config.data, config, dc_som, inst_geom_dst=inst_geom_dst, tib_const=config.tib_const, timer=tim) # Perform Steps 7-16 on sample data if config.data_trans_coeff is None: data_trans_coeff = None else: data_trans_coeff = config.data_trans_coeff.toValErrTuple() d_som2 = dr_lib.process_dgs_data(d_som1, config, b_som1, e_som1, data_trans_coeff, timer=tim) del d_som1 # Perform Steps 7-16 on normalization data if n_som1 is not None: if config.norm_trans_coeff is None: norm_trans_coeff = None else: norm_trans_coeff = config.norm_trans_coeff.toValErrTuple() n_som2 = dr_lib.process_dgs_data(n_som1, config, b_som1, e_som1, norm_trans_coeff, dataset_type="normalization", timer=tim) else: n_som2 = n_som1 del n_som1, b_som1, e_som1 # Step 17: Integrate normalization spectra if n_som2 is not None: if config.verbose: print "Integrating normalization spectra" if tim is not None: tim.getTime(False) if config.norm_int_range is None: start_val = float("inf") end_val = float("inf") else: start_val = common_lib.energy_to_wavelength(\ (config.norm_int_range[1], 0.0))[0] end_val = common_lib.energy_to_wavelength(\ (config.norm_int_range[0], 0.0))[0] norm_int = dr_lib.integrate_spectra(n_som2, start=start_val, end=end_val, width=True) if tim is not None: tim.getTime(msg="After integrating normalization spectra ") if config.dump_norm: file_comment = "Normalization Integration range: %0.3fA, %0.3fA" \ % (start_val, end_val) hlr_utils.write_file(config.output, "text/num-info", norm_int, output_ext="norm", data_ext=config.ext_replacement, path_replacement=config.path_replacement, verbose=config.verbose, message="normalization values", comments=[file_comment], tag="Integral", units="counts") else: norm_int = n_som2 del n_som2 # Step 18: Normalize sample data by integrated values if norm_int is not None: if config.verbose: print "Normalizing data by normalization data" if tim is not None: tim.getTime(False) d_som3 = common_lib.div_ncerr(d_som2, norm_int) if tim is not None: tim.getTime(msg="After normalizing data ") else: d_som3 = d_som2 del d_som2, norm_int # Step 19: Calculate the initial energy if config.initial_energy is not None: d_som3.attr_list["Initial_Energy"] = config.initial_energy # Steps 20-21: Calculate the energy transfer if config.verbose: print "Calculating energy transfer" if tim is not None: tim.getTime(False) #import profile #profiler = profile.Profile() #d_som4 = profiler.runcall(dr_lib.energy_transfer, d_som3, "DGS", # "Initial_Energy", lojac=True, # scale=config.lambda_ratio) #profiler.dump_stats("et_profile.dat") d_som4 = dr_lib.energy_transfer(d_som3, "DGS", "Initial_Energy", lojac=True, scale=config.lambda_ratio) if tim is not None: tim.getTime(msg="After calculating energy transfer ") del d_som3 # Rebin energy transfer spectra if config.verbose: print "Rebinning to final energy transfer axis" if tim is not None: tim.getTime(False) d_som5 = common_lib.rebin_axis_1D(d_som4, config.E_bins.toNessiList()) if tim is not None: tim.getTime(msg="After rebinning energy transfer ") del d_som4 if config.dump_et_comb: d_som5_1 = dr_lib.sum_all_spectra(d_som5) hlr_utils.write_file(config.output, "text/Spec", d_som5_1, output_ext="et", data_ext=config.ext_replacement, path_replacement=config.path_replacement, verbose=config.verbose, message="combined energy transfer information") del d_som5_1 # Get the corner geometry information if config.verbose: print "Reading in corner geometry information" if tim is not None: tim.getTime(False) corner_angles = hlr_utils.get_corner_geometry(corner_geom) if tim is not None: tim.getTime(msg="After reading in corner geometry information ") if config.verbose: print "Creating S(Q, E)" if tim is not None: tim.getTime(False) d_som5_2 = dr_lib.create_E_vs_Q_dgs(d_som5, config.initial_energy.toValErrTuple(), config.Q_bins.toNessiList(), corner_geom=corner_angles, split=config.split, configure=config, timer=tim) # Writing 2D DAVE file if not config.split: hlr_utils.write_file(config.output, "text/Dave2d", d_som5_2, output_ext="sqe", data_ext=config.ext_replacement, path_replacement=config.path_replacement, verbose=config.verbose, message="S(Q,E)") if tim is not None: tim.getTime(msg="After calculating S(Q,E) spectrum ") del d_som5_2 if config.qmesh: # Create Qvec vs E spectrum if config.verbose: print "Creating S(Qvec, E)" if tim is not None: tim.getTime(False) dr_lib.create_Qvec_vs_E_dgs(d_som5, config.initial_energy.toValErrTuple(), config, corner_geom=corner_angles, make_fixed=config.fixed, output=config.output, timer=tim) if tim is not None: tim.getTime(msg="After calculating final spectrum ") # Write out RMD file d_som5.attr_list["config"] = config hlr_utils.write_file(config.output, "text/rmd", d_som5, output_ext="rmd", data_ext=config.ext_replacement, path_replacement=config.path_replacement, verbose=config.verbose, message="metadata") if tim is not None: tim.setOldTime(old_time) tim.getTime(msg="Total Running Time") | bdca593e4c0d600c2718e12374db475f3f9600b7 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/763/bdca593e4c0d600c2718e12374db475f3f9600b7/dgs_reduction.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
1425,
16,
1658,
33,
7036,
4672,
3536,
1220,
707,
353,
1625,
326,
501,
20176,
1207,
5571,
2731,
18,
225,
632,
891,
642,
30,
1033,
4191,
326,
501,
20176,
1664,
1779,
18,
632,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
1425,
16,
1658,
33,
7036,
4672,
3536,
1220,
707,
353,
1625,
326,
501,
20176,
1207,
5571,
2731,
18,
225,
632,
891,
642,
30,
1033,
4191,
326,
501,
20176,
1664,
1779,
18,
632,
7... |
self.conn = self.connect() cursor = self.conn.cursor(MySQLdb.cursors.DictCursor) except MySQLdb.Error: self.conn = self.connect(invalidate = True) cursor = self.conn.cursor(MySQLdb.cursors.DictCursor) | cursor = self.conn.cursor(MySQLdb.cursors.DictCursor) except MySQLdb.Error: self.conn = self.connect() self.redo() cursor = self.conn.cursor(MySQLdb.cursors.DictCursor) | def getMergeToBeDoneAgain(self, datasetId): | f6d38da4b0910650112bd5df8a6e148fb35b760b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8887/f6d38da4b0910650112bd5df8a6e148fb35b760b/MergeSensorDB.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2108,
1583,
15360,
7387,
23530,
12,
2890,
16,
3709,
548,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2108,
1583,
15360,
7387,
23530,
12,
2890,
16,
3709,
548,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
s.setUsername("Flo") | def setShowUserDetails(self, p_show_user_details): self._show_user_details = p_show_user_details | b7f5df494b99e39a936d0de2f1ba0d7a82606c81 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4919/b7f5df494b99e39a936d0de2f1ba0d7a82606c81/Settings.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
5706,
1299,
3790,
12,
2890,
16,
293,
67,
4500,
67,
1355,
67,
6395,
4672,
365,
6315,
4500,
67,
1355,
67,
6395,
273,
293,
67,
4500,
67,
1355,
67,
6395,
2,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
5706,
1299,
3790,
12,
2890,
16,
293,
67,
4500,
67,
1355,
67,
6395,
4672,
365,
6315,
4500,
67,
1355,
67,
6395,
273,
293,
67,
4500,
67,
1355,
67,
6395,
2,
-100,
-100,
-100,
-100,
... | |
game.state.galaxy[game.quadrant.x][game.quadrant.y].stars -= 1 | game.state.galaxy[game.quadrant.i][game.quadrant.j].stars -= 1 | def nova(nov): "Star goes nova." course = (0.0, 10.5, 12.0, 1.5, 9.0, 0.0, 3.0, 7.5, 6.0, 4.5) newc = coord(); neighbor = coord(); bump = coord(0, 0) if withprob(0.05): # Wow! We've supernova'ed supernova(False, nov) return # handle initial nova game.quad[nov.x][nov.y] = IHDOT prout(crmena(False, IHSTAR, "sector", nov) + _(" novas.")) game.state.galaxy[game.quadrant.x][game.quadrant.y].stars -= 1 game.state.starkl += 1 # Set up queue to recursively trigger adjacent stars hits = [nov] kount = 0 while hits: offset = coord() start = hits.pop() for offset.x in range(-1, 1+1): for offset.y in range(-1, 1+1): if offset.y==0 and offset.x==0: continue neighbor = start + offset if not VALID_SECTOR(neighbor.y, neighbor.x): continue iquad = game.quad[neighbor.x][neighbor.y] # Empty space ends reaction if iquad in (IHDOT, IHQUEST, IHBLANK, IHT, IHWEB): pass elif iquad == IHSTAR: # Affect another star if withprob(0.05): # This star supernovas supernova(False) return else: hits.append(neighbor) game.state.galaxy[game.quadrant.x][game.quadrant.y].stars -= 1 game.state.starkl += 1 proutn(crmena(True, IHSTAR, "sector", neighbor)) prout(_(" novas.")) game.quad[neighbor.x][neighbor.y] = IHDOT kount += 1 elif iquad in (IHP, IHW): # Destroy planet game.state.galaxy[game.quadrant.x][game.quadrant.y].planet = None if iquad == IHP: game.state.nplankl += 1 else: game.state.worldkl += 1 prout(crmena(True, IHB, "sector", neighbor) + _(" destroyed.")) game.iplnet.pclass = "destroyed" game.iplnet = None game.plnet.invalidate() if game.landed: finish(FPNOVA) return game.quad[neighbor.x][neighbor.y] = IHDOT elif iquad == IHB: # Destroy base game.state.galaxy[game.quadrant.x][game.quadrant.y].starbase = False game.state.baseq = filter(lambda x: x!= game.quadrant, game.state.baseq) game.base.invalidate() game.state.basekl += 1 newcnd() prout(crmena(True, IHB, "sector", neighbor) + _(" destroyed.")) game.quad[neighbor.x][neighbor.y] = IHDOT elif iquad in (IHE, IHF): # Buffet ship prout(_("***Starship buffeted by nova.")) if game.shldup: if game.shield >= 2000.0: game.shield -= 2000.0 else: diff = 2000.0 - game.shield game.energy -= diff game.shield = 0.0 game.shldup = False prout(_("***Shields knocked out.")) game.damage[DSHIELD] += 0.005*game.damfac*randreal()*diff else: game.energy -= 2000.0 if game.energy <= 0: finish(FNOVA) return # add in course nova contributes to kicking starship bump += (game.sector-hits[mm]).sgn() elif iquad == IHK: # kill klingon deadkl(neighbor, iquad, neighbor) elif iquad in (IHC,IHS,IHR): # Damage/destroy big enemies for ll in range(len(game.enemies)): if game.enemies[ll].kloc == neighbor: break game.enemies[ll].kpower -= 800.0 # If firepower is lost, die if game.enemies[ll].kpower <= 0.0: deadkl(neighbor, iquad, neighbor) break newc = neighbor + neighbor - hits[mm] proutn(crmena(True, iquad, "sector", neighbor) + _(" damaged")) if not VALID_SECTOR(newc.x, newc.y): # can't leave quadrant skip(1) break iquad1 = game.quad[newc.x][newc.y] if iquad1 == IHBLANK: proutn(_(", blasted into ") + crmena(False, IHBLANK, "sector", newc)) skip(1) deadkl(neighbor, iquad, newc) break if iquad1 != IHDOT: # can't move into something else skip(1) break proutn(_(", buffeted to Sector %s") % newc) game.quad[neighbor.x][neighbor.y] = IHDOT game.quad[newc.x][newc.y] = iquad game.enemies[ll].move(newc) # Starship affected by nova -- kick it away. game.dist = kount*0.1 game.direc = course[3*(bump.x+1)+bump.y+2] if game.direc == 0.0: game.dist = 0.0 if game.dist == 0.0: return game.optime = 10.0*game.dist/16.0 skip(1) prout(_("Force of nova displaces starship.")) imove(novapush=True) game.optime = 10.0*game.dist/16.0 return | e67cf36a789c4ab1cd905a9a08e91d219395f538 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3176/e67cf36a789c4ab1cd905a9a08e91d219395f538/sst.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1158,
15304,
12,
82,
1527,
4672,
315,
18379,
13998,
1158,
15304,
1199,
4362,
273,
261,
20,
18,
20,
16,
1728,
18,
25,
16,
2593,
18,
20,
16,
404,
18,
25,
16,
2468,
18,
20,
16,
374,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1158,
15304,
12,
82,
1527,
4672,
315,
18379,
13998,
1158,
15304,
1199,
4362,
273,
261,
20,
18,
20,
16,
1728,
18,
25,
16,
2593,
18,
20,
16,
404,
18,
25,
16,
2468,
18,
20,
16,
374,
1... |
num = '.' + unicode( int( filenameList[-2] ) +1) | num = u'.' + unicodeC( int( filenameList[-2] ) +1) | def findNewFile(filename, directory): u"""find a filename in the given directory that isn't already taken. adds '.1' before the file extension, or just .1 on the end if no file extension""" if os.path.isfile( os.path.join(directory, filename) ): logStatusMsg(u"filename already taken, looking for another: %s" % filename, 2) filenameList = filename.split('.') if len( filenameList ) >1: try: num = '.' + unicode( int( filenameList[-2] ) +1) del filenameList[-2] filename = '.'.join( filenameList[:-1] ) + num + '.' + filenameList[-1] except (ValueError, IndexError, UnicodeEncodeError): try: num = '.' + unicode( int( filenameList[-1] ) + 1 ) del filenameList[-1] filename = '.'.join( filenameList ) + num except (ValueError, IndexError, UnicodeEncodeError) : num = '.' + unicode( 1 ) filename = '.'.join( filenameList[:-1] ) + num + '.' + filenameList[-1] else: filename += u'.1' return findNewFile( filename, directory ) else: return directory, filename | 15efa811c3a3c7e375db44557ec2cc39fdd58d98 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1664/15efa811c3a3c7e375db44557ec2cc39fdd58d98/rssdler.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1104,
1908,
812,
12,
3459,
16,
1867,
4672,
582,
8395,
4720,
279,
1544,
316,
326,
864,
1867,
716,
5177,
1404,
1818,
9830,
18,
4831,
2418,
21,
11,
1865,
326,
585,
2710,
16,
578,
2537,
26... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1104,
1908,
812,
12,
3459,
16,
1867,
4672,
582,
8395,
4720,
279,
1544,
316,
326,
864,
1867,
716,
5177,
1404,
1818,
9830,
18,
4831,
2418,
21,
11,
1865,
326,
585,
2710,
16,
578,
2537,
26... |
yield i+start, t, v | yield i, t, v | def heredoc_callback(self, match, ctx): # okay, this is the hardest part of parsing Ruby... # match: 1 = <<-?, 2 = quote? 3 = name 4 = quote? 5 = rest of line | 04c3875b39975bed91f0439166774b1694afc6a0 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2885/04c3875b39975bed91f0439166774b1694afc6a0/agile.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
22336,
329,
504,
67,
3394,
12,
2890,
16,
845,
16,
1103,
4672,
468,
21194,
16,
333,
353,
326,
7877,
395,
1087,
434,
5811,
19817,
2777,
468,
845,
30,
404,
273,
2296,
17,
35,
16,
576,
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,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
22336,
329,
504,
67,
3394,
12,
2890,
16,
845,
16,
1103,
4672,
468,
21194,
16,
333,
353,
326,
7877,
395,
1087,
434,
5811,
19817,
2777,
468,
845,
30,
404,
273,
2296,
17,
35,
16,
576,
2... |
if x is None or prod(x.shape) == 0: return None | if x is None or (hasattr(x, 'shape') and prod(x.shape) == 0): return None | def Matrix(x): if x is None or prod(x.shape) == 0: return None if isspmatrix(x): if min(x.shape) > 1: from scipy.sparse import find I, J, values = find(x) return Sparse(array(values, float).tolist(), I.tolist(), J.tolist()) else: x = x.toarray() x = asfarray(x) if x.ndim > 1 and x.nonzero()[0].size < 0.3*x.size: #todo: replace 0.3 by prob param return sparse(x.tolist()).T # without tolist currently it doesn't work else: return matrix(x, tc='d') | f168e4592045ca12616366ac5caf68c691a4b749 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6196/f168e4592045ca12616366ac5caf68c691a4b749/cvxopt_misc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7298,
12,
92,
4672,
309,
619,
353,
599,
578,
261,
5332,
1747,
12,
92,
16,
296,
4867,
6134,
471,
10791,
12,
92,
18,
4867,
13,
422,
374,
4672,
327,
599,
309,
353,
1752,
5667,
12,
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,
7298,
12,
92,
4672,
309,
619,
353,
599,
578,
261,
5332,
1747,
12,
92,
16,
296,
4867,
6134,
471,
10791,
12,
92,
18,
4867,
13,
422,
374,
4672,
327,
599,
309,
353,
1752,
5667,
12,
92,
... |
if row[0] is not 'dummy': | if row[0] is not u'': | def list_groups(): conn = sqlite3.connect(db_file_path) c = conn.cursor() groups = [] for row in c.execute("""select grp from groups order by grp"""): if row[0] is not 'dummy': groups.append(row[0]) c.close() return groups | eb9268c56074e60c9baf0d8e0bb92c6db50dd879 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10994/eb9268c56074e60c9baf0d8e0bb92c6db50dd879/wordgroupz.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
666,
67,
4650,
13332,
1487,
273,
16184,
23,
18,
3612,
12,
1966,
67,
768,
67,
803,
13,
276,
273,
1487,
18,
9216,
1435,
3252,
273,
5378,
364,
1027,
316,
276,
18,
8837,
2932,
3660,
4025,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
666,
67,
4650,
13332,
1487,
273,
16184,
23,
18,
3612,
12,
1966,
67,
768,
67,
803,
13,
276,
273,
1487,
18,
9216,
1435,
3252,
273,
5378,
364,
1027,
316,
276,
18,
8837,
2932,
3660,
4025,
... |
def test_standardtypes(self): | def test_objecttypes(self): | def test_standardtypes(self): h = self.header size = self.calcsize # bool self.check_sizeof(True, size(h + 'l')) # buffer self.check_sizeof(buffer(''), size(h + '2P2Pil')) # cell def get_cell(): x = 42 def inner(): return x return inner self.check_sizeof(get_cell().func_closure[0], size(h + 'P')) # old-style class class class_oldstyle(): def method(): pass self.check_sizeof(class_oldstyle, size(h + '6P')) # instance self.check_sizeof(class_oldstyle(), size(h + '3P')) # method self.check_sizeof(class_oldstyle().method, size(h + '4P')) # code self.check_sizeof(get_cell().func_code, size(h + '4i8Pi2P')) # complex self.check_sizeof(complex(0,1), size(h + '2d')) # enumerate self.check_sizeof(enumerate([]), size(h + 'l3P')) # reverse self.check_sizeof(reversed(''), size(h + 'PP')) # file self.check_sizeof(self.file, size(h + '4P2i4P3i3Pi')) # float self.check_sizeof(float(0), size(h + 'd')) # function def func(): pass self.check_sizeof(func, size(h + '9P')) class c(): @staticmethod def foo(): pass @classmethod def bar(cls): pass # staticmethod self.check_sizeof(foo, size(h + 'P')) # classmethod self.check_sizeof(bar, size(h + 'P')) # generator def get_gen(): yield 1 self.check_sizeof(get_gen(), size(h + 'Pi2P')) # integer self.check_sizeof(1, size(h + 'l')) # builtin_function_or_method self.check_sizeof(abs, size(h + '3P')) # module self.check_sizeof(unittest, size(h + 'P')) # xrange self.check_sizeof(xrange(1), size(h + '3l')) # slice self.check_sizeof(slice(0), size(h + '3P')) | c700714ccabb5f69025ec56a9f27a4d3f1c4ffa0 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8125/c700714ccabb5f69025ec56a9f27a4d3f1c4ffa0/test_sys.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
1612,
2352,
12,
2890,
4672,
225,
366,
273,
365,
18,
3374,
963,
273,
365,
18,
12448,
1467,
468,
1426,
365,
18,
1893,
67,
1467,
792,
12,
5510,
16,
963,
12,
76,
397,
296,
80,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
1612,
2352,
12,
2890,
4672,
225,
366,
273,
365,
18,
3374,
963,
273,
365,
18,
12448,
1467,
468,
1426,
365,
18,
1893,
67,
1467,
792,
12,
5510,
16,
963,
12,
76,
397,
296,
80,
... |
0.0583793793052... - 1.65905485529...e-17*I """ if alg=="pari": | 0.0583793793052000 - ...e-17*I """ if algorithm=="pari": | def bessel_J(nu,z,alg="pari",prec=53): r""" Return value of the "J-Bessel function", or "Bessel function, 1st kind", with index (or "order") nu and argument z. \begin{verbatim} Defn: Maxima: inf ==== - nu - 2 k nu + 2 k \ (-1)^k 2 z > ------------------------- / k! Gamma(nu + k + 1) ==== k = 0 Pari: inf ==== - 2k 2k \ (-1)^k 2 z Gamma(nu + 1) > ---------------------------- / k! Gamma(nu + k + 1) ==== k = 0 \end{verbatim} Sometimes bessel_J(nu,z) is denoted J_nu(z) in the literature. WARNING: Inaccurate for small values of z. EXAMPLES: sage: bessel_J(2,1.1) 0.13656415395665... sage: bessel_J(0,1.1) 0.71962201852751... sage: bessel_J(0,1) 0.76519768655796... We check consistency of PARI and Maxima: sage: n(bessel_J(3,10,"maxima")) 0.0583793793051... sage: n(bessel_J(3,10,"pari")) 0.0583793793051... sage: bessel_J(3,10,"scipy") 0.0583793793052... - 1.65905485529...e-17*I """ if alg=="pari": from sage.libs.pari.all import pari nu = pari(nu) z = pari(z) if nu.imag() or z.imag(): K,a = _setup_CC(prec) else: K,a = _setup(prec) b = K(nu.besselj(z)) pari.set_real_precision(a) return b elif alg=="scipy": import scipy.special ans = str(scipy.special.jv(float(nu),complex(real(z),imag(z)))) ans = ans.replace("(","") ans = ans.replace(")","") ans = ans.replace("j","*I") return sage_eval(ans) else: return meval("bessel_j(%s,%s)"%(nu, z)) | 6634f9ab85d7944da6788aaab93ffaa3f22ce5ac /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/6634f9ab85d7944da6788aaab93ffaa3f22ce5ac/special.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
324,
403,
292,
67,
46,
12,
13053,
16,
94,
16,
18413,
1546,
1065,
77,
3113,
4036,
33,
8643,
4672,
436,
8395,
2000,
460,
434,
326,
315,
46,
17,
38,
403,
292,
445,
3113,
578,
315,
38,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
324,
403,
292,
67,
46,
12,
13053,
16,
94,
16,
18413,
1546,
1065,
77,
3113,
4036,
33,
8643,
4672,
436,
8395,
2000,
460,
434,
326,
315,
46,
17,
38,
403,
292,
445,
3113,
578,
315,
38,
... |
if kwargs.has_key('command') | if kwargs.has_key('command'): | def __init__(self, master, variable, value, *values, **kwargs): kw = {"borderwidth": 2, "textvariable": variable, "indicatoron": 1, "relief": RAISED, "anchor": "c", "highlightthickness": 2} Widget.__init__(self, master, "menubutton", kw) self.widgetName = 'tk_optionMenu' menu = self.__menu = Menu(self, name="menu", tearoff=0) self.menuname = menu._w # 'command' is the only supported keyword callback = kwargs.get('command') if kwargs.has_key('command') del kwargs['command'] if kwargs: raise TclError, 'unknown option -'+kwargs.keys()[0] menu.add_command(label=value, command=_setit(variable, value, callback)) for v in values: menu.add_command(label=v, command=_setit(variable, v, callback)) self["menu"] = menu | 715e7a32f2322d5d5d08068ee5d2554c93576297 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/715e7a32f2322d5d5d08068ee5d2554c93576297/Tkinter.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
4171,
16,
2190,
16,
460,
16,
380,
2372,
16,
2826,
4333,
4672,
5323,
273,
12528,
8815,
2819,
6877,
576,
16,
315,
955,
6105,
6877,
2190,
16,
315,
18741,
26... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
4171,
16,
2190,
16,
460,
16,
380,
2372,
16,
2826,
4333,
4672,
5323,
273,
12528,
8815,
2819,
6877,
576,
16,
315,
955,
6105,
6877,
2190,
16,
315,
18741,
26... |
speech.speakTextInfo(info) | speech.speakTextInfo(info,reason=speech.REASON_CARET,extraDetail=True,handleSymbols=True) | def script_review_nextWord(self,keyPress): info=api.getReviewPosition().copy() info.expand(textHandler.UNIT_WORD) info.collapse() res=info.move(textHandler.UNIT_WORD,1) api.setReviewPosition(info.copy()) info.expand(textHandler.UNIT_WORD) if res==0: speech.speakMessage(_("bottom")) speech.speakTextInfo(info) | 1e2d131a7d8d70b498e9aae3e42edec16faba621 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9340/1e2d131a7d8d70b498e9aae3e42edec16faba621/_default.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2728,
67,
16041,
67,
4285,
3944,
12,
2890,
16,
856,
11840,
4672,
1123,
33,
2425,
18,
588,
9159,
2555,
7675,
3530,
1435,
1123,
18,
12320,
12,
955,
1503,
18,
15736,
67,
7952,
13,
1123,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2728,
67,
16041,
67,
4285,
3944,
12,
2890,
16,
856,
11840,
4672,
1123,
33,
2425,
18,
588,
9159,
2555,
7675,
3530,
1435,
1123,
18,
12320,
12,
955,
1503,
18,
15736,
67,
7952,
13,
1123,
1... |
elif form['display_account'] == 'balance': | elif form['display_account'] == 'bal_solde': | def get_children_accounts(self, account, form): res = [] ids_acc = self.pool.get('account.account')._get_children_and_consol(self.cr, self.uid, account.id) for child_account in self.pool.get('account.account').browse(self.cr, self.uid, ids_acc): sql = """ SELECT count(id) FROM account_move_line l WHERE %s AND l.account_id = %%s """ % (self.query) self.cr.execute(sql, (child_account.id,)) num_entry = self.cr.fetchone()[0] or 0 sold_account = self._sum_balance_account(child_account,form) self.sold_accounts[child_account.id] = sold_account if form['display_account'] == 'movement': if child_account.type != 'view' and num_entry <> 0 : res.append(child_account) elif form['display_account'] == 'balance': if child_account.type != 'view' and num_entry <> 0 : if ( sold_account <> 0.0): res.append(child_account) else: res.append(child_account) if not len(res): return [account] return res | 861a151467642540c3e8c4b9ccdad5cc88a2e90e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/861a151467642540c3e8c4b9ccdad5cc88a2e90e/account_general_ledger.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
5906,
67,
13739,
12,
2890,
16,
2236,
16,
646,
4672,
400,
273,
5378,
3258,
67,
8981,
273,
365,
18,
6011,
18,
588,
2668,
4631,
18,
4631,
16063,
67,
588,
67,
5906,
67,
464,
67,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
5906,
67,
13739,
12,
2890,
16,
2236,
16,
646,
4672,
400,
273,
5378,
3258,
67,
8981,
273,
365,
18,
6011,
18,
588,
2668,
4631,
18,
4631,
16063,
67,
588,
67,
5906,
67,
464,
67,... |
Remote loging. | Remote logging. | def xmlrpc_logClientAction(self, mac, level, phase, message): """ Remote loging. | 66fed1a25e8d46f4bb5b4dfbc0898c1998453ad8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5988/66fed1a25e8d46f4bb5b4dfbc0898c1998453ad8/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
31811,
67,
1330,
1227,
1803,
12,
2890,
16,
5318,
16,
1801,
16,
6855,
16,
883,
4672,
3536,
6304,
613,
310,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
31811,
67,
1330,
1227,
1803,
12,
2890,
16,
5318,
16,
1801,
16,
6855,
16,
883,
4672,
3536,
6304,
613,
310,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
return cmp( (self.n,self.r,self.c,self.e,self._postfix,self._order,self._allow_zero_inversions, self._aes_mode, self._gf2, self._star ), (other.n,other.r,other.c,other.e,other._postfix,other._order,other._allow_zero_inversions, other._aes_mode, other._gf2, other._star ) ) | return cmp( (self.n, self.r, self.c, self.e, self._postfix, self._order, self._allow_zero_inversions, self._aes_mode, self._gf2, self._star ), (other.n, other.r, other.c, other.e, other._postfix, other._order, other._allow_zero_inversions, other._aes_mode, other._gf2, other._star ) ) | def __cmp__(self, other): """ Two generators are considered equal if they agree on all parameters passed to them during construction. EXAMPLE: sage: sr1 = mq.SR(2,2,2,4) sage: sr2 = mq.SR(2,2,2,4) sage: sr1 == sr2 True | cd82551727ddbae04c5b28f55b59ec14654a84ab /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/cd82551727ddbae04c5b28f55b59ec14654a84ab/sr.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
9625,
972,
12,
2890,
16,
1308,
4672,
3536,
16896,
13327,
854,
7399,
3959,
309,
2898,
1737,
992,
603,
777,
1472,
2275,
358,
2182,
4982,
16171,
18,
225,
5675,
21373,
30,
272,
410,
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,
1001,
9625,
972,
12,
2890,
16,
1308,
4672,
3536,
16896,
13327,
854,
7399,
3959,
309,
2898,
1737,
992,
603,
777,
1472,
2275,
358,
2182,
4982,
16171,
18,
225,
5675,
21373,
30,
272,
410,
30... |
except NotImplementedError: | except pythoncom.com_error, exc: if exc.hresult != winerror.E_NOTIMPL: raise | def check_is_admin(): global _is_admin if _is_admin is None: from win32com.shell.shell import IsUserAnAdmin try: _is_admin = IsUserAnAdmin() except NotImplementedError: # not impl on this platform - must be old - assume is admin _is_admin = True return _is_admin | 6c0d076dc007e2b4150c733f5681745e2a7a8f68 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/992/6c0d076dc007e2b4150c733f5681745e2a7a8f68/pywin32_testutil.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
67,
291,
67,
3666,
13332,
2552,
389,
291,
67,
3666,
309,
389,
291,
67,
3666,
353,
599,
30,
628,
5657,
1578,
832,
18,
10304,
18,
10304,
1930,
2585,
1299,
979,
4446,
775,
30,
389,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
67,
291,
67,
3666,
13332,
2552,
389,
291,
67,
3666,
309,
389,
291,
67,
3666,
353,
599,
30,
628,
5657,
1578,
832,
18,
10304,
18,
10304,
1930,
2585,
1299,
979,
4446,
775,
30,
389,
... |
import thread | def preWait(self, key): import thread global ioThread if thread.get_ident() == ioThread: return _Waiter.preWait(self, key) import thread import threading cond = self.conditions[key] = threading.Condition() cond.acquire() | f487c5bb3d90eb7d11459e5303877cfbb82272aa /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/f487c5bb3d90eb7d11459e5303877cfbb82272aa/threadable.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
675,
5480,
12,
2890,
16,
498,
4672,
2552,
2527,
3830,
309,
2650,
18,
588,
67,
6392,
1435,
422,
2527,
3830,
30,
327,
389,
5480,
264,
18,
1484,
5480,
12,
2890,
16,
498,
13,
1930,
17254,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
675,
5480,
12,
2890,
16,
498,
4672,
2552,
2527,
3830,
309,
2650,
18,
588,
67,
6392,
1435,
422,
2527,
3830,
30,
327,
389,
5480,
264,
18,
1484,
5480,
12,
2890,
16,
498,
13,
1930,
17254,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.