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 |
|---|---|---|---|---|---|---|
self.title = None | def __init__(self, path_to_html_file, level, encoding, verbose, referrer=None): ''' :param level: The level of this file. Should be 0 for the root file. :param encoding: Use `encoding` to decode HTML. :param referrer: The :class:`HTMLFile` that first refers to this file. ''' self.path = unicode_path(path_to_html_file, abs=True) self.title = os.path.splitext(os.path.basename(self.path))[0] self.base = os.path.dirname(self.path) self.level = level self.referrer = referrer self.links = [] try: with open(self.path, 'rb') as f: src = f.read() except IOError, err: msg = 'Could not read from file: %s with error: %s'%(self.path, unicode(err)) if level == 0: raise IOError(msg) raise IgnoreFile(msg, err.errno) self.is_binary = not bool(self.HTML_PAT.search(src[:1024])) self.title = None if not self.is_binary: if encoding is None: encoding = xml_to_unicode(src[:4096], verbose=verbose)[-1] self.encoding = encoding else: self.encoding = encoding | 731b76779ba537b235d76b1af732665956c4d2f2 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9125/731b76779ba537b235d76b1af732665956c4d2f2/html.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
589,
67,
869,
67,
2620,
67,
768,
16,
1801,
16,
2688,
16,
3988,
16,
14502,
33,
7036,
4672,
9163,
294,
891,
1801,
30,
1021,
1801,
434,
333,
585,
18,
9363... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
589,
67,
869,
67,
2620,
67,
768,
16,
1801,
16,
2688,
16,
3988,
16,
14502,
33,
7036,
4672,
9163,
294,
891,
1801,
30,
1021,
1801,
434,
333,
585,
18,
9363... | |
path = self._short_name(path).replace(os.sep, '/') | return self._dir_name(path) in self._index() def _listdir(self,path): return list(self._index().get(self._dir_name(path), ())) def _dir_name(self,path): if path.startswith(self.module_path+os.sep): path = path[len(self.module_path+os.sep):] path = path.replace(os.sep,'/') | def _isdir(self,path): path = self._short_name(path).replace(os.sep, '/') if path.endswith('/'): path = path[:-1] return path in self._index() | 6c25a62d1e94ac73189cd997f86a8aa18ee761b3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/495/6c25a62d1e94ac73189cd997f86a8aa18ee761b3/pkg_resources.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
291,
1214,
12,
2890,
16,
803,
4672,
327,
365,
6315,
1214,
67,
529,
12,
803,
13,
316,
365,
6315,
1615,
1435,
225,
1652,
389,
1098,
1214,
12,
2890,
16,
803,
4672,
327,
666,
12,
28... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
291,
1214,
12,
2890,
16,
803,
4672,
327,
365,
6315,
1214,
67,
529,
12,
803,
13,
316,
365,
6315,
1615,
1435,
225,
1652,
389,
1098,
1214,
12,
2890,
16,
803,
4672,
327,
666,
12,
28... |
screen_style_id = int(x.attrib.get('id', None) or '0') if style_id is None or screen_style_id == style_id: | screen_style_id = x.attrib.get('id', None) if screen_style_id is None and name.find('Summary') > 0: screen_style_id = 1 if screen_style_id is None or screen_style_id == style_id: | def lookupScreen(name, style_id = None): for (path, skin) in dom_skins: # first, find the corresponding screen element for x in skin.findall("screen"): if x.attrib.get('name', '') == name: screen_style_id = int(x.attrib.get('id', None) or '0') if style_id is None or screen_style_id == style_id: return x, path return None, None | 22a7d3d31a7ea48ab27b2790d0e4b9acfbe02bde /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6652/22a7d3d31a7ea48ab27b2790d0e4b9acfbe02bde/skin.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3689,
7956,
12,
529,
16,
2154,
67,
350,
273,
599,
4672,
364,
261,
803,
16,
18705,
13,
316,
4092,
67,
7771,
2679,
30,
468,
1122,
16,
1104,
326,
4656,
5518,
930,
364,
619,
316,
18705,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3689,
7956,
12,
529,
16,
2154,
67,
350,
273,
599,
4672,
364,
261,
803,
16,
18705,
13,
316,
4092,
67,
7771,
2679,
30,
468,
1122,
16,
1104,
326,
4656,
5518,
930,
364,
619,
316,
18705,
... |
__counter = 0 | __counter = itertools.count() | from pypy.annotation.listdef import ListItem | 304ac4dc56dfc58449591a81efafe9f921b09977 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/304ac4dc56dfc58449591a81efafe9f921b09977/hintcontainer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
628,
18951,
93,
18,
11495,
18,
1098,
536,
1930,
987,
1180,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
628,
18951,
93,
18,
11495,
18,
1098,
536,
1930,
987,
1180,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
self.assertEqual(rows[2]['object'].summary, | self.assertEqual(datagrid.rows[2]['object'].summary, | def testDashboard1(self): """Testing dashboard view (incoming)""" self.client.login(username='doc', password='doc') | 68436132cbfb1a72c8b6c31673ac62d4c83d91ef /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1600/68436132cbfb1a72c8b6c31673ac62d4c83d91ef/tests.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
14830,
21,
12,
2890,
4672,
3536,
22218,
11825,
1476,
261,
31033,
15574,
365,
18,
2625,
18,
5819,
12,
5053,
2218,
2434,
2187,
2201,
2218,
2434,
6134,
2,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
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,
14830,
21,
12,
2890,
4672,
3536,
22218,
11825,
1476,
261,
31033,
15574,
365,
18,
2625,
18,
5819,
12,
5053,
2218,
2434,
2187,
2201,
2218,
2434,
6134,
2,
-100,
-100,
-100,
-100,
-100,
... |
if raw_input() == 'n': self.player.set_state(gst.STATE_NULL) self.playmode = False break else: time.sleep(1) loop.quit() | rlist, _, _ = select([sys.stdin], [], [], 1) if rlist: s = sys.stdin.readline() if s[0] == 'n': self.player.set_state(gst.STATE_NULL) self.playmode = False break | def start(self): rets = json.loads(urllib2.urlopen(self.ch).read()) for r in rets['song']: song_uri = r['url'] self.playmode = True print u'正在播放: '+r['title']+u' 歌手: '+r['artist'] self.player.set_property("uri", song_uri) self.player.set_state(gst.STATE_PLAYING) while self.playmode: if raw_input() == 'n': self.player.set_state(gst.STATE_NULL) self.playmode = False break else: time.sleep(1) loop.quit() | 9bbff09e4823e6e34fe8117baadcbf996e2e3b0b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14235/9bbff09e4823e6e34fe8117baadcbf996e2e3b0b/doubanfm.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
787,
12,
2890,
4672,
325,
87,
273,
1163,
18,
17135,
12,
718,
2941,
22,
18,
295,
18589,
12,
2890,
18,
343,
2934,
896,
10756,
364,
436,
316,
325,
87,
3292,
816,
75,
3546,
30,
17180,
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,
787,
12,
2890,
4672,
325,
87,
273,
1163,
18,
17135,
12,
718,
2941,
22,
18,
295,
18589,
12,
2890,
18,
343,
2934,
896,
10756,
364,
436,
316,
325,
87,
3292,
816,
75,
3546,
30,
17180,
67... |
s.tk.call( s.f.plf._w, CMD, 'plssub', nx, ny ) | s.cmd( 'plssub', nx, ny ) | def plssub( s, nx, ny ): | 5e1e7ef2c61ed08af7184e16b0bac6bebfbe213e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2933/5e1e7ef2c61ed08af7184e16b0bac6bebfbe213e/Plframe.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
886,
1049,
373,
12,
272,
16,
9264,
16,
15308,
262,
30,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
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,
886,
1049,
373,
12,
272,
16,
9264,
16,
15308,
262,
30,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
if kind[0] == 'f' and not re.search('\$IN\b', cmd): | if kind[0] == 'f' and not re.search(r'\$IN\b', cmd): | def append(self, cmd, kind): """t.append(cmd, kind) adds a new step at the end.""" if type(cmd) is not type(''): raise TypeError, \ 'Template.append: cmd must be a string' if kind not in stepkinds: raise ValueError, \ 'Template.append: bad kind ' + `kind` if kind == SOURCE: raise ValueError, \ 'Template.append: SOURCE can only be prepended' if self.steps and self.steps[-1][1] == SINK: raise ValueError, \ 'Template.append: already ends with SINK' if kind[0] == 'f' and not re.search('\$IN\b', cmd): raise ValueError, \ 'Template.append: missing $IN in cmd' if kind[1] == 'f' and not re.search('\$OUT\b', cmd): raise ValueError, \ 'Template.append: missing $OUT in cmd' self.steps.append((cmd, kind)) | 527541fbec89bbfc18f9051d8e7d71d016f93fba /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/527541fbec89bbfc18f9051d8e7d71d016f93fba/pipes.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
714,
12,
2890,
16,
1797,
16,
3846,
4672,
3536,
88,
18,
6923,
12,
4172,
16,
3846,
13,
4831,
279,
394,
2235,
622,
326,
679,
12123,
309,
618,
12,
4172,
13,
353,
486,
618,
2668,
11,
4672... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
714,
12,
2890,
16,
1797,
16,
3846,
4672,
3536,
88,
18,
6923,
12,
4172,
16,
3846,
13,
4831,
279,
394,
2235,
622,
326,
679,
12123,
309,
618,
12,
4172,
13,
353,
486,
618,
2668,
11,
4672... |
price = self.price_by_product_OLD(cr, uid, 0, pricelist_id[0]['pricelist_id'][0], product_id[0], 1) | price = self.price_by_product(cr, uid, 0, pricelist_id[0]['pricelist_id'][0], product_id[0], 1) | def _scan_product(self, cr, uid, ean, qty, order): # search pricelist_id product_obj=self.pool.get('product.product') pricelist_id = self.pool.get('pos.order').read(cr, uid, [order], ['pricelist_id'] ) if not pricelist_id: return False | 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,
389,
9871,
67,
5896,
12,
2890,
16,
4422,
16,
4555,
16,
425,
304,
16,
26667,
16,
1353,
4672,
468,
1623,
846,
335,
5449,
67,
350,
3017,
67,
2603,
33,
2890,
18,
6011,
18,
588,
2668,
589... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
9871,
67,
5896,
12,
2890,
16,
4422,
16,
4555,
16,
425,
304,
16,
26667,
16,
1353,
4672,
468,
1623,
846,
335,
5449,
67,
350,
3017,
67,
2603,
33,
2890,
18,
6011,
18,
588,
2668,
589... |
kAvoidDevNull = platform.system() == 'Windows' | kAvoidDevNull = kIsWindows | def __init__(self, command, message): self.command = command self.message = message | bb1245491bd80bbbd016bf26b7f29ae85a1f378f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6277/bb1245491bd80bbbd016bf26b7f29ae85a1f378f/TestRunner.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1296,
16,
883,
4672,
365,
18,
3076,
273,
1296,
365,
18,
2150,
273,
883,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1296,
16,
883,
4672,
365,
18,
3076,
273,
1296,
365,
18,
2150,
273,
883,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
md5hash = md5.new() sha1hash = sha.new() sha256hash = None try: md5hash = hashlib.md5() sha1hash = hashlib.sha1() sha256hash = hashlib.sha256() except: | md5hash = md5.md5() sha1hash = sha1.sha1() if sha256: sha256hash = sha256.sha256() else: sha256hash = None | def scan_file(self, filename, use_chunks=True, max_chunks=255, chunk_size=256, progresslistener=None): print "\nScanning file..." # Filename and size self.filename = os.path.basename(filename) self.size = int(os.stat(filename).st_size) # Calculate piece length if use_chunks: minlength = chunk_size*1024 self.piecelength = 1024 while self.size / self.piecelength > max_chunks or self.piecelength < minlength: self.piecelength *= 2 print "Using piecelength", self.piecelength, "(" + str(self.piecelength / 1024) + " KiB)" numpieces = self.size / self.piecelength if numpieces < 2: use_chunks = False # Hashes fp = open(filename, "rb") md5hash = md5.new() sha1hash = sha.new() sha256hash = None # Try to use hashlib try: md5hash = hashlib.md5() sha1hash = hashlib.sha1() sha256hash = hashlib.sha256() except: print "Hashlib not available. No support for SHA-256." piecehash = sha.new() piecenum = 0 length = 0 self.pieces = [] self.piecetype = "sha1" num_reads = math.ceil(self.size / 4096.0) reads_per_progress = int(math.ceil(num_reads / 100.0)) reads_left = reads_per_progress progress = 0 while True: data = fp.read(4096) if data == "": break # Progress updating if progresslistener: reads_left -= 1 if reads_left <= 0: reads_left = reads_per_progress progress += 1 result = progresslistener.Update(progress) if get_first(result) == False: print "Canceling scan!" return False # Process the data if md5hash != None: md5hash.update(data) if sha1hash != None: sha1hash.update(data) if sha256hash != None: sha256hash.update(data) if use_chunks: left = len(data) while left > 0: if length + left <= self.piecelength: piecehash.update(data) length += left left = 0 else: numbytes = self.piecelength - length piecehash.update(data[:numbytes]) length += numbytes data = data[numbytes:] left -= numbytes if length == self.piecelength: print "Done with piece hash", len(self.pieces) self.pieces.append(piecehash.hexdigest()) piecehash = sha.new() length = 0 if use_chunks: if length > 0: print "Done with piece hash", len(self.pieces) self.pieces.append(piecehash.hexdigest()) piecehash = sha.new() print "Total number of pieces:", len(self.pieces) fp.close() self.hashlist["md5"] = md5hash.hexdigest() self.hashlist["sha1"] = sha1hash.hexdigest() if sha256hash != None: self.hashlist["sha256"] = sha256hash.hexdigest() | 2af4eda499322233eb01b256c6240b48cd0ad9f1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6425/2af4eda499322233eb01b256c6240b48cd0ad9f1/metalinkc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4135,
67,
768,
12,
2890,
16,
1544,
16,
999,
67,
14691,
33,
5510,
16,
943,
67,
14691,
33,
10395,
16,
2441,
67,
1467,
33,
5034,
16,
4007,
12757,
33,
7036,
4672,
1172,
1548,
82,
1541,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4135,
67,
768,
12,
2890,
16,
1544,
16,
999,
67,
14691,
33,
5510,
16,
943,
67,
14691,
33,
10395,
16,
2441,
67,
1467,
33,
5034,
16,
4007,
12757,
33,
7036,
4672,
1172,
1548,
82,
1541,
1... |
boom | Traceback (most recent call last): ... TypeError | #def _singular_(self, singular): | b4b3245d1251e91c0a285bb11f7d5d67dd1a7536 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/b4b3245d1251e91c0a285bb11f7d5d67dd1a7536/constants.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
468,
536,
389,
17835,
67,
12,
2890,
16,
10048,
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,... | [
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,
468,
536,
389,
17835,
67,
12,
2890,
16,
10048,
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,
... |
if self.events[i + 1:i + 3] == ["LIST","SUCCESS"]: if len(self.events) > int(self.events[i + 4]): self.handler.Send.remotelist = self.events[i + 5:(int(self.events[i + 4]) + 5)] else: if [self.events[i + 1].split()[0], self.events[i + 2]] == ["LIST","SUCCESS"]: self.remote = self.events[i + 1].split()[1] if self.remote != "": if len(self.events) > int(self.events[i + 4]): self.checknum = 0 self.checkmatch = 0 for self.check in self.handler.Send.remotes: if self.remote == self.check[0]: self.handler.Send.remotes[self.checknum] = [ self.remote, self.events[i + 5:(int(self.events[i + 4]) + i + 5)] ] self.checkmatch = 1 if self.checkmatch == 0: self.handler.Send.remotes.append( [ self.remote, self.events[i + 5:(int(self.events[i + 4]) + i + 5)] ] ) | try: if self.events[i + 3] == "ERROR": eg.actionThread.Call(self.handler.HandleWarning, self.text.erroneousresponse) if self.events[i + 1:i + 3] == ["LIST","SUCCESS"]: if len(self.events) > int(self.events[i + 4]): self.handler.Send.remotelist = self.events[i + 5:(int(self.events[i + 4]) + 5)] else: if [self.events[i + 1].split()[0], self.events[i + 2]] == ["LIST","SUCCESS"]: self.remote = self.events[i + 1].split()[1] if self.remote != "": if len(self.events) > int(self.events[i + 4]): self.checknum = 0 self.checkmatch = 0 for self.check in self.handler.Send.remotes: if self.remote == self.check[0]: self.handler.Send.remotes[self.checknum] = [ self.remote, self.events[i + 5:(int(self.events[i + 4]) + i + 5)] ] self.checkmatch = 1 if self.checkmatch == 0: self.handler.Send.remotes.append( [ self.remote, self.events[i + 5:(int(self.events[i + 4]) + i + 5)] ] ) except IndexError: eg.actionThread.Call(self.handler.HandleWarning, self.text.malformedresponse) | def handle_read(self): # Append data from the socket onto a buffer self.buffer += self.recv(4096) # (if theres anything on the right of the last linebreak, it must be # some incomplete data caused by tcp/ip fragmenting our strings..) # hopefully the rest of it will be there on the next run.. self.events = self.buffer.split("\n") self.buffer = self.events.pop() | 557c0eeadf70bf4d431bf0cc1545dd9eec9af875 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8076/557c0eeadf70bf4d431bf0cc1545dd9eec9af875/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
67,
896,
12,
2890,
4672,
468,
6181,
501,
628,
326,
2987,
10170,
279,
1613,
365,
18,
4106,
1011,
365,
18,
18334,
12,
24,
5908,
26,
13,
468,
261,
430,
286,
11737,
6967,
603,
326,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
67,
896,
12,
2890,
4672,
468,
6181,
501,
628,
326,
2987,
10170,
279,
1613,
365,
18,
4106,
1011,
365,
18,
18334,
12,
24,
5908,
26,
13,
468,
261,
430,
286,
11737,
6967,
603,
326,
... |
logging.debug("Killing any qemu processes that might be left behind") utils.system("pkill qemu", ignore_status=True) | kill_qemu_processes() | def load_kvm_modules(module_dir): """ Unload previously loaded kvm modules, then load modules present on any sub directory of module_dir. Function will walk through module_dir until it finds the modules. @param module_dir: Directory where the KVM modules are located. """ vendor = "intel" if os.system("grep vmx /proc/cpuinfo 1>/dev/null") != 0: vendor = "amd" logging.debug("Detected CPU vendor as '%s'" %(vendor)) logging.debug("Killing any qemu processes that might be left behind") utils.system("pkill qemu", ignore_status=True) logging.info("Unloading previously loaded KVM modules") kvm_utils.unload_module("kvm") if utils.module_is_loaded("kvm"): message = "Failed to remove old KVM modules" logging.error(message) raise error.TestError(message) logging.info("Loading new KVM modules...") kvm_module_path = None kvm_vendor_module_path = None # Search for the built KVM modules for folder, subdirs, files in os.walk(module_dir): if "kvm.ko" in files: kvm_module_path = os.path.join(folder, "kvm.ko") kvm_vendor_module_path = os.path.join(folder, "kvm-%s.ko" % vendor) abort = False if not kvm_module_path: logging.error("Need a directory containing both kernel module and " "userspace sources.") logging.error("If you are trying to build only KVM userspace and use " "the KVM modules you have already loaded, put " "'load_modules': 'no' on the control file 'params' " "dictionary.") raise error.TestError("Could not find a built kvm.ko module on the " "source dir.") elif not os.path.isfile(kvm_vendor_module_path): logging.error("Could not find KVM (%s) module that was supposed to be" " built on the source dir", vendor) abort = True if abort: raise error.TestError("Could not load KVM modules.") utils.system("/sbin/insmod %s" % kvm_module_path) time.sleep(1) utils.system("/sbin/insmod %s" % kvm_vendor_module_path) if not utils.module_is_loaded("kvm"): message = "Failed to load the KVM modules built for the test" logging.error(message) raise error.TestError(message) | 687d23ea9f18a65343962f7bd26bb7c78d3dcea5 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12268/687d23ea9f18a65343962f7bd26bb7c78d3dcea5/build.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1262,
67,
79,
3489,
67,
6400,
12,
2978,
67,
1214,
4672,
3536,
1351,
945,
7243,
4203,
417,
3489,
4381,
16,
1508,
1262,
4381,
3430,
603,
1281,
720,
1867,
434,
1605,
67,
1214,
18,
4284,
9... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1262,
67,
79,
3489,
67,
6400,
12,
2978,
67,
1214,
4672,
3536,
1351,
945,
7243,
4203,
417,
3489,
4381,
16,
1508,
1262,
4381,
3430,
603,
1281,
720,
1867,
434,
1605,
67,
1214,
18,
4284,
9... |
userSearchFilter = "(sambaAcctFlags=[U*])" for data in ldapQuery.search(userSearchFilter, ['uid', 'userPassword', 'gidNumber']): try: users[data[1]['uid'][0]] = (data[1]['uid'][0], data[1]['userPassword'][0], data[1]['gidNumber'][0]) except KeyError: pass | for data in ldapQuery.search(userSearchFilter, ['uid', 'userPassword', 'gidNumber', 'uidNumber']): users[data[1]['uid'][0]] = (data[1]['uid'][0], data[1]['userPassword'][0], int(data[1]['gidNumber'][0]), int(data[1]['uidNumber'][0])) | def any(iteravel): for item in iteravel: if item: return True | 984656e818c1ba0939416f7ea8bd2282e8308bf2 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8537/984656e818c1ba0939416f7ea8bd2282e8308bf2/migracao_ldap_zimbra.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1281,
12,
2165,
7882,
4672,
364,
761,
316,
1400,
7882,
30,
309,
761,
30,
327,
1053,
225,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1281,
12,
2165,
7882,
4672,
364,
761,
316,
1400,
7882,
30,
309,
761,
30,
327,
1053,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
error.set_linenum_offset(startline+1) | error.set_linenum_offset(startline) | def report_errors(api_doc, docindex, parse_errors, field_warnings): if not parse_errors and not field_warnings: return # Get the name of the item containing the error, and the # filename of its containing module. name = api_doc.canonical_name module = docindex.module_that_defines(api_doc) if module is not None and module.filename not in (None, UNKNOWN): try: filename = py_src_filename(module.filename) except: filename = module.filename else: filename = '??' # [xx] Don't report markup errors for standard builtins. if (isinstance(api_doc, ValueDoc) and api_doc != module and (api_doc.pyval in __builtin__.__dict__.values() or (module is not None and module.pyval in (__builtin__, exceptions)))): return # Get the start line of the docstring containing the error. startline = api_doc.docstring_lineno if startline in (None, UNKNOWN): startline = inspect_docstring_lineno(api_doc) if startline in (None, UNKNOWN): startline = None # Display a block header. header = 'File %s, ' % filename if startline is not None: header += 'line %d, ' % startline header += 'in %s' % name log.start_block(header) # Display all parse errors. But first, combine any errors # with duplicate description messages. if startline is None: # remove dups, but keep original order: dups = {} for error in parse_errors: message = error.descr() if message not in dups: log.docstring_warning(message) dups[message] = 1 else: # Combine line number fields for dup messages: messages = {} # maps message -> list of linenum for error in parse_errors: error.set_linenum_offset(startline+1) message = error.descr() messages.setdefault(message, []).append(error.linenum()) message_items = messages.items() message_items.sort(lambda a,b:cmp(min(a[1]), min(b[1]))) for message, linenums in message_items: if len(linenums) == 1: log.docstring_warning("Line %s: %s" % (linenums[0], message)) else: linenums = ', '.join(['%s' % l for l in linenums]) log.docstring_warning("Lines %s: %s" % (linenums, message)) # Display all field warnings. for warning in field_warnings: log.docstring_warning(warning) # End the message block. log.end_block() | b1ff8ad1d87ba73b776d56747d78eff5de4e4276 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/b1ff8ad1d87ba73b776d56747d78eff5de4e4276/docstringparser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2605,
67,
4324,
12,
2425,
67,
2434,
16,
997,
1615,
16,
1109,
67,
4324,
16,
652,
67,
12103,
4672,
309,
486,
1109,
67,
4324,
471,
486,
652,
67,
12103,
30,
327,
225,
468,
968,
326,
508,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2605,
67,
4324,
12,
2425,
67,
2434,
16,
997,
1615,
16,
1109,
67,
4324,
16,
652,
67,
12103,
4672,
309,
486,
1109,
67,
4324,
471,
486,
652,
67,
12103,
30,
327,
225,
468,
968,
326,
508,... |
elif chunks[i] in entitydefs: chunks[i]=entitydefs[chunks[i]] | elif chunks[i] in name2codepoint: chunks[i]=unichr(name2codepoint[chunks[i]]) | def decodehtml(data): chunks=re.split('&#?(\w+);',data) for i in range(1,len(chunks),2): if chunks[i].isdigit(): | 53e9ac24b99b512adbe72db896880cf6c8955563 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5012/53e9ac24b99b512adbe72db896880cf6c8955563/validators.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2495,
2620,
12,
892,
4672,
6055,
33,
266,
18,
4939,
2668,
18642,
35,
4713,
91,
15,
1769,
2187,
892,
13,
225,
364,
277,
316,
1048,
12,
21,
16,
1897,
12,
14691,
3631,
22,
4672,
309,
60... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2495,
2620,
12,
892,
4672,
6055,
33,
266,
18,
4939,
2668,
18642,
35,
4713,
91,
15,
1769,
2187,
892,
13,
225,
364,
277,
316,
1048,
12,
21,
16,
1897,
12,
14691,
3631,
22,
4672,
309,
60... |
if (VOName and VOName != vo_info[VOName]): | if (VOName and VOName != vo_info['VOName']): | def SendXMLFiles(fileDir, removeOriginal = False): global Config global failedSendCount path = os.path.join(fileDir, "*") files = glob.glob(path) probeNamePattern = re.compile(r'<\s*(?:[^:]*:)?ProbeName\s*>') siteNamePattern = re.compile(r'<\s*(?:[^:]*:)?SiteName\s*>') endUsageRecordPattern = re.compile(r'<\s*/\s*(?:[^:]*:)?UsageRecord\s*>') LocalUserIdPattern = re.compile(r'<\s*(?:[^:]*:)?LocalUserId\s*>\s*(?P<Value>.*?)\s*<\s*/') VONamePattern = re.compile(r'<\s*(?:[^:]*:)?VOName\s*>\s*(?P<Value>.*?)\s*<\s*/') ReportableVONamePattern = re.compile(r'<\s*(?:[^:]*:)?ReportableVOName\s*>\s*(?P<Value>.*?)\s*<\s*/') endUserIdentityPattern = re.compile(r'<\s*/\s*(?:[^:]*:)?UserIdentity\s*>') responseString = "" for xmlFilename in files: DebugPrint(0, "***********************************************************") DebugPrint(1,"xmlFilename: ",xmlFilename) if (failedSendCount + len(OutstandingRecord)) >= Config.get_MaxPendingFiles(): responseString = "Fatal Error: too many pending files" DebugPrint(0, responseString) DebugPrint(0, "***********************************************************") return responseString # Open the XML file in_file = open(xmlFilename, "r") xmlData = [] # Need to check for keys that may be missing and add them: hasProbeName = False hasSiteName = False LocalUserId = None VOName = None ReportableVOName = None seenEndUserIdentity = None for line in in_file: if probeNamePattern.match(line): hasProbeName = True if siteNamePattern.match(line): hasSiteName = True match = LocalUserIdPattern.search(line, re.IGNORECASE) if match and not seenEndUserIdentity: LocalUserId = match.group('Value') match = VONamePattern.search(line, re.IGNORECASE) if match and not seenEndUserIdentity: VOName = match.group('Value') match = ReportableVONamePattern.search(line, re.IGNORECASE) if match and not seenEndUserIdentity: ReportableVOName = match.group('Value') if endUserIdentityPattern.match(line, re.IGNORECASE): # Check for VOName and ReportableVOName in UserIdentity # clause and update or add if necessary seenEndUserIdentity = True if LocalUserId and not \ (VOName and ReportableVOName): vo_info = VOfromUser(LocalUserId) if vo_info: if (VOName and VOName != vo_info[VOName]): # Update entry xmlData = map(lambda x: re.sub(r'(<\s*(?:[^:]*:)?VOName\s*>\s*).*?(\s*<\s*/)', r'\1' + vo_info[VOName] + r'\2', x)) elif (not VOName): # New entry xmlData.append('<VOName>' + vo_info[VOName] + '</VOName>\n') if (ReportableVOName and ReportableVOName != vo_info[ReportableVOName]): # Update entry xmlData = map(lambda x: re.sub(r'(<\s*(?:[^:]*:)?ReportableVOName\s*>\s*).*?(\s*<\s*/)', r'\1' + vo_info[ReportableVOName] + r'\2', x)) elif (not ReportableVOName): # New entry xmlData.append('<ReportableVOName>' + vo_info[ReportableVOName] + '</ReportableVOName>\n') if endUsageRecordPattern.match(line): if not hasProbeName: xmlData.append('<ProbeName>' + Config.get_MeterName() + '</ProbeName>\n') if not hasSiteName: xmlData.append('<SiteName>' + Config.get_SiteName() + '</SiteName>\n') xmlData.append(line) in_file.close() # Open the back up file # fill the back up file dirIndex = 0 recordIndex = 0 success = False ind = 0 f = 0 while not success: (f,dirIndex,recordIndex) = OpenNewRecordFile(dirIndex,recordIndex) DebugPrint(1,"Will save in the record in:",f.name) DebugPrint(3,"DirIndex=",dirIndex," RecordIndex=",recordIndex) if f.name == "<stdout>": responseString = "Fatal Error: unable to save record prior to send attempt" DebugPrint(0, responseString) DebugPrint(0, "***********************************************************") return responseString else: try: for line in xmlData: f.write(line) f.flush() if f.tell() > 0: success = True DebugPrint(3,"suceeded to fill: ",f.name) else: DebugPrint(0,"failed to fill: ",f.name) if f.name != "<stdout>": os.remove(f.name) except: DebugPrint(0,"failed to fill with exception: ",f.name,"--", sys.exc_info(),"--",sys.exc_info()[0],"++",sys.exc_info()[1]) if f.name != "<stdout>": os.remove(f.name) if removeOriginal and f.name != "<stdout>": os.remove(xmlFilename) DebugPrint(0, 'Saved record to ' + f.name) # Currently, the recordXml is in a list format, with each # item being a line of xml. The collector web service # requires the xml to be sent as a string. This logic here # turns the xml list into a single xml string. usageXmlString = "" for line in xmlData: usageXmlString = usageXmlString + line DebugPrint(1, 'UsageXml: ' + usageXmlString) # Attempt to send the record to the collector response = __sendUsageXML(Config.get_MeterName(), usageXmlString) DebugPrint(0, 'Response code: ' + str(response.get_code())) DebugPrint(0, 'Response message: ' + response.get_message()) # Determine if the call was successful based on the # response code. Currently, 0 = success if response.get_code() == 0: DebugPrint(1, 'Response indicates success, ' + f.name + ' will be deleted') os.remove(f.name) else: failedSendCount += 1 DebugPrint(1, 'Response indicates failure, ' + f.name + ' will not be deleted') DebugPrint(0, responseString) DebugPrint(0, "***********************************************************") return responseString | ed079cc8386b0c71f7e89f256baa3372ec964a7b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/637/ed079cc8386b0c71f7e89f256baa3372ec964a7b/Gratia.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2479,
4201,
2697,
12,
768,
1621,
16,
1206,
8176,
273,
1083,
4672,
2552,
1903,
2552,
2535,
3826,
1380,
225,
589,
273,
1140,
18,
803,
18,
5701,
12,
768,
1621,
16,
10971,
13,
1390,
273,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2479,
4201,
2697,
12,
768,
1621,
16,
1206,
8176,
273,
1083,
4672,
2552,
1903,
2552,
2535,
3826,
1380,
225,
589,
273,
1140,
18,
803,
18,
5701,
12,
768,
1621,
16,
10971,
13,
1390,
273,
4... |
def getPkgsNewest(self, arch=None, verbose=1): | def getPkgsNewest(self, arch=None, verbose=0): if arch: for rpms in self.h.values(): for rpm in rpms: rpm.mdistance = None | def getPkgsNewest(self, arch=None, verbose=1): self.keepNewest(arch, verbose) pkgs = [] for p in self.h.values(): pkgs.extend(p) if arch: # Add all rpms into a hash by their name. h = {} for rpm in pkgs: h.setdefault(rpm["name"], []).append(rpm) # By name find the newest rpm and then decide if a noarch # rpm is the newest (and all others are deleted) or if an # arch-dependent rpm is newest and all noarchs are removed. for rpms in h.values(): newest = selectNewestRpm(rpms, arch, verbose) if newest["arch"] == "noarch": for r in rpms: if r != newest: pkgs.remove(r) else: for r in rpms: if r["arch"] == "noarch": pkgs.remove(r) return pkgs | b74ca6d66a12237e53cef4262f44b2bac15e7255 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1143/b74ca6d66a12237e53cef4262f44b2bac15e7255/oldpyrpm.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1689,
79,
564,
1908,
395,
12,
2890,
16,
6637,
33,
7036,
16,
3988,
33,
20,
4672,
309,
6637,
30,
364,
8715,
959,
316,
365,
18,
76,
18,
2372,
13332,
364,
25228,
316,
8715,
959,
30,
2522... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1689,
79,
564,
1908,
395,
12,
2890,
16,
6637,
33,
7036,
16,
3988,
33,
20,
4672,
309,
6637,
30,
364,
8715,
959,
316,
365,
18,
76,
18,
2372,
13332,
364,
25228,
316,
8715,
959,
30,
2522... |
self.core.stop_downloads() | self.sm.stop_downloads() | def event_stop(self, args): if not args: self.core.stop_downloads() return ["INFO: All downloads stopped."] lines = [] for val in args: id = int(val.strip()) self.core.stop_download("", id) lines.append("INFO: Download #%d stopped." % id) return lines | f6597059303316c4ff1c6e04602082b1c3184c14 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9838/f6597059303316c4ff1c6e04602082b1c3184c14/IRCInterface.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
871,
67,
5681,
12,
2890,
16,
833,
4672,
309,
486,
833,
30,
365,
18,
4808,
18,
5681,
67,
7813,
87,
1435,
327,
8247,
5923,
30,
4826,
23011,
9627,
1199,
65,
225,
2362,
273,
5378,
364,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
871,
67,
5681,
12,
2890,
16,
833,
4672,
309,
486,
833,
30,
365,
18,
4808,
18,
5681,
67,
7813,
87,
1435,
327,
8247,
5923,
30,
4826,
23011,
9627,
1199,
65,
225,
2362,
273,
5378,
364,
1... |
codewriter.load(last_exc_value_var, lltype_of_exception_value, 'last_exception_value') | codewriter.load(last_exc_value_var, 'last_exception_value', []) | def fetch_exceptions(self, codewriter, exc_found_labels, lltype_of_exception_type, lltype_of_exception_value): for label, target, last_exc_type_var, last_exc_value_var in exc_found_labels: codewriter.label(label) if last_exc_type_var: codewriter.load(last_exc_type_var, lltype_of_exception_type, 'last_exception_type') if last_exc_value_var: codewriter.load(last_exc_value_var, lltype_of_exception_value, 'last_exception_value') codewriter.br_uncond(target) | 11354dcb5ef05322fcbe1201ca7cb6f7e5284502 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/11354dcb5ef05322fcbe1201ca7cb6f7e5284502/exception.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2158,
67,
11855,
12,
2890,
16,
981,
6299,
16,
3533,
67,
7015,
67,
5336,
16,
6579,
723,
67,
792,
67,
4064,
67,
723,
16,
6579,
723,
67,
792,
67,
4064,
67,
1132,
4672,
364,
1433,
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,
2158,
67,
11855,
12,
2890,
16,
981,
6299,
16,
3533,
67,
7015,
67,
5336,
16,
6579,
723,
67,
792,
67,
4064,
67,
723,
16,
6579,
723,
67,
792,
67,
4064,
67,
1132,
4672,
364,
1433,
16,
... |
os.write(self.child_fd, termios.CEOF) | os.write (self.child_fd, '%c' % termios.CEOF) | def sendeof(self): """This sends an EOF to the child. | 62eb7523b96100d8e635518b41b897312807f15a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9386/62eb7523b96100d8e635518b41b897312807f15a/pexpect.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
28901,
323,
792,
12,
2890,
4672,
3536,
2503,
9573,
392,
6431,
358,
326,
1151,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
28901,
323,
792,
12,
2890,
4672,
3536,
2503,
9573,
392,
6431,
358,
326,
1151,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
if self._isinfinity(): return Decimal(self) | def sqrt(self, context=None): """Return the square root of self. | 1a63da64df2af26e1f050749c19281f1de9084fa /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/1a63da64df2af26e1f050749c19281f1de9084fa/decimal.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5700,
12,
2890,
16,
819,
33,
7036,
4672,
3536,
990,
326,
8576,
1365,
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,... | [
1,
1,
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,
5700,
12,
2890,
16,
819,
33,
7036,
4672,
3536,
990,
326,
8576,
1365,
434,
365,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... | |
olditems = self.cfs.GetLoop('_sitem_5') | olditems = self.cfs.GetLoop('_sitem_5').items() | def testLoopDataInOut(self): """Test writing in and out loop data""" olditems = self.cf.GetLoop('_item_5') for key,value in olditems: self.failUnless(tuple(map(str,value))==tuple(self.df[key])) # save frame test olditems = self.cfs.GetLoop('_sitem_5') for key,value in olditems: self.failUnless(tuple(map(str,value))==tuple(self.dfs[key])) | a65d099e46f5afda94b5df0a69c7bb8d7605c42c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3057/a65d099e46f5afda94b5df0a69c7bb8d7605c42c/TestPyCifRW.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
6452,
751,
382,
1182,
12,
2890,
4672,
3536,
4709,
7410,
316,
471,
596,
2798,
501,
8395,
1592,
3319,
273,
365,
18,
8522,
18,
967,
6452,
2668,
67,
1726,
67,
25,
6134,
364,
498,
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,
6452,
751,
382,
1182,
12,
2890,
4672,
3536,
4709,
7410,
316,
471,
596,
2798,
501,
8395,
1592,
3319,
273,
365,
18,
8522,
18,
967,
6452,
2668,
67,
1726,
67,
25,
6134,
364,
498,
16,... |
self._tofill = [] | def reset(self): """ Clear the screen, re-center the pen, and set variables to the default values. | 70a17faf4e4e8896faec18608fcc2098b0932d58 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/70a17faf4e4e8896faec18608fcc2098b0932d58/turtle.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2715,
12,
2890,
4672,
3536,
10121,
326,
5518,
16,
283,
17,
5693,
326,
14264,
16,
471,
444,
3152,
358,
326,
805,
924,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2715,
12,
2890,
4672,
3536,
10121,
326,
5518,
16,
283,
17,
5693,
326,
14264,
16,
471,
444,
3152,
358,
326,
805,
924,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... | |
self.zdstatus() def zdcommand(self, command): """Send a command to the zdaemon server and return the response. | self.do_status() if self.zd_status: m = re.search("(?m)^args=(.*)$", self.zd_status) if m: s = m.group(1) args = eval(s, {"__builtins__": {}}) if args != self.options.program: print "WARNING! zdaemon is managing a different program!" print "our program =", self.options.program print "daemon's args =", args def send_action(self, action): """Send an action to the zdaemon server and return the response. | def __init__(self, options): self.options = options cmd.Cmd.__init__(self) self.zdstatus() | 62025f58079f2271c5bf6a4bc0455b164c06d413 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9782/62025f58079f2271c5bf6a4bc0455b164c06d413/zdctl.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
702,
4672,
365,
18,
2116,
273,
702,
1797,
18,
5931,
16186,
2738,
972,
12,
2890,
13,
365,
18,
94,
72,
2327,
1435,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
702,
4672,
365,
18,
2116,
273,
702,
1797,
18,
5931,
16186,
2738,
972,
12,
2890,
13,
365,
18,
94,
72,
2327,
1435,
2,
-100,
-100,
-100,
-100,
-100,
-100,
... |
prop = 'timestamp|user|comment|url|size|sha1|metadata') | iiprop = 'timestamp|user|comment|url|size|sha1|metadata') | def imagehistory(self): return listing.PageProperty(self, 'imageinfo', 'ii', prop = 'timestamp|user|comment|url|size|sha1|metadata') | 95a8143b347631ac5bbbedb972804cc0bf9dda39 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10117/95a8143b347631ac5bbbedb972804cc0bf9dda39/page.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1316,
8189,
12,
2890,
4672,
327,
11591,
18,
1964,
1396,
12,
2890,
16,
296,
2730,
1376,
2187,
296,
2835,
2187,
2270,
273,
296,
5508,
96,
1355,
96,
3469,
96,
718,
96,
1467,
96,
7819,
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,
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,
1316,
8189,
12,
2890,
4672,
327,
11591,
18,
1964,
1396,
12,
2890,
16,
296,
2730,
1376,
2187,
296,
2835,
2187,
2270,
273,
296,
5508,
96,
1355,
96,
3469,
96,
718,
96,
1467,
96,
7819,
21,... |
settings = cPickle.load(file) if hasattr(self, "settingsList"): self.setSettings(settings) contextHandlers = getattr(self, "contextHandlers", {}) for contextHandler in contextHandlers.values(): if not getattr(contextHandler, "globalContexts", False): contexts = settings.get(contextHandler.localContextName, False) if contexts: contextHandler.globalContexts = contexts | try: settings = cPickle.load(file) except: settings = None if settings: if hasattr(self, "settingsList"): self.setSettings(settings) contextHandlers = getattr(self, "contextHandlers", {}) for contextHandler in contextHandlers.values(): if not getattr(contextHandler, "globalContexts", False): contexts = settings.get(contextHandler.localContextName, False) if contexts: contextHandler.globalContexts = contexts | def loadSettings(self, file = None): file = self.getSettingsFile(file) if file: settings = cPickle.load(file) | 71aeb7d52eab35d50d4b23ab9173c48ff0ccc9fb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6366/71aeb7d52eab35d50d4b23ab9173c48ff0ccc9fb/OWBaseWidget.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1262,
2628,
12,
2890,
16,
585,
273,
599,
4672,
585,
273,
365,
18,
588,
2628,
812,
12,
768,
13,
309,
585,
30,
1947,
273,
276,
17968,
298,
18,
945,
12,
768,
13,
2,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1262,
2628,
12,
2890,
16,
585,
273,
599,
4672,
585,
273,
365,
18,
588,
2628,
812,
12,
768,
13,
309,
585,
30,
1947,
273,
276,
17968,
298,
18,
945,
12,
768,
13,
2,
-100,
-100,
-100,
... |
ipshell = IPShellEmbed(['-pi1','interact In <\\ | ipshell = IPShellEmbed(['-pdb', '-pi1','interact In <\\ | def run(self): import sys # Invoke the 'build' command to "build" pure Python modules # (ie. copy 'em into the build tree) self.run_command('build') | 80e30eaaf1f4a0e2745954d0fc29602a9cf89a9a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8914/80e30eaaf1f4a0e2745954d0fc29602a9cf89a9a/custom_commands.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
4672,
1930,
2589,
468,
14373,
326,
296,
3510,
11,
1296,
358,
315,
3510,
6,
16618,
6600,
4381,
468,
261,
1385,
18,
1610,
296,
351,
1368,
326,
1361,
2151,
13,
365,
18,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
4672,
1930,
2589,
468,
14373,
326,
296,
3510,
11,
1296,
358,
315,
3510,
6,
16618,
6600,
4381,
468,
261,
1385,
18,
1610,
296,
351,
1368,
326,
1361,
2151,
13,
365,
18,
26... |
return pooler.get_pool(self.cr.dbname).get('account.period').browse(self.cr,self.uid,form['period_from']).name | if form['filter'] == 'filter_period': if form['period_from']: return pooler.get_pool(self.cr.dbname).get('account.period').browse(self.cr,self.uid,form['period_from']).name return '' | def get_start_period(self, form): return pooler.get_pool(self.cr.dbname).get('account.period').browse(self.cr,self.uid,form['period_from']).name | 2f81b78ca6861b10a66bc7e08209114bbd4d6653 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/2f81b78ca6861b10a66bc7e08209114bbd4d6653/general_ledger.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
1937,
67,
6908,
12,
2890,
16,
646,
4672,
309,
646,
3292,
2188,
3546,
422,
296,
2188,
67,
6908,
4278,
309,
646,
3292,
6908,
67,
2080,
3546,
30,
327,
2845,
264,
18,
588,
67,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
1937,
67,
6908,
12,
2890,
16,
646,
4672,
309,
646,
3292,
2188,
3546,
422,
296,
2188,
67,
6908,
4278,
309,
646,
3292,
6908,
67,
2080,
3546,
30,
327,
2845,
264,
18,
588,
67,
6... |
nose.tools.assert_raises(sundials.SundialsSimulationException, | nose.tools.assert_raises(jmodelica.simulation.SimulationException, | def test_absolute_tolerance(self): """Basic testing of setting absolute tolerance. The abstol can be set through a property or a setter. The abstol can be gotten through a property or a getter. """ simulator = self.simulator default_tolerance = simulator.get_absolute_tolerance() MY_TOLERANCE = 4e-5 nose.tools.assert_not_equal(default_tolerance, MY_TOLERANCE, "This test is useless.") simulator.set_absolute_tolerance(MY_TOLERANCE) nose.tools.assert_almost_equal(MY_TOLERANCE, simulator.get_absolute_tolerance()) # Testing the property abstol MY_TOLERANCE2 = 3e-5 simulator.abstol = MY_TOLERANCE2 nose.tools.assert_equal(MY_TOLERANCE2, simulator.get_absolute_tolerance()) # Testing error checking nose.tools.assert_raises(sundials.SundialsSimulationException, simulator.set_absolute_tolerance, -1e-4) nose.tools.assert_raises(sundials.SundialsSimulationException, simulator.set_absolute_tolerance, 0) | 63143040b3d38c49bba2407a4f2867db2f233ad7 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7711/63143040b3d38c49bba2407a4f2867db2f233ad7/test_sundials.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
12547,
67,
25456,
12,
2890,
4672,
3536,
8252,
7769,
434,
3637,
4967,
10673,
18,
225,
1021,
1223,
334,
355,
848,
506,
444,
3059,
279,
1272,
578,
279,
7794,
18,
1021,
1223,
334,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
12547,
67,
25456,
12,
2890,
4672,
3536,
8252,
7769,
434,
3637,
4967,
10673,
18,
225,
1021,
1223,
334,
355,
848,
506,
444,
3059,
279,
1272,
578,
279,
7794,
18,
1021,
1223,
334,
... |
return "0.5.2" | return "0.6.0" | def get_version(): '''Returns version of munkitools''' return "0.5.2" | 5efa8ad816897ea49708a1d55ecbc236c323cc7a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6241/5efa8ad816897ea49708a1d55ecbc236c323cc7a/munkicommon.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
1589,
13332,
9163,
1356,
1177,
434,
312,
1683,
305,
8192,
26418,
327,
315,
20,
18,
26,
18,
20,
6,
282,
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,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
1589,
13332,
9163,
1356,
1177,
434,
312,
1683,
305,
8192,
26418,
327,
315,
20,
18,
26,
18,
20,
6,
282,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
self.daemon_logfile, self.daemon_pidfile, self.server_port)) | _ShellSafe(self.daemon_logfile), _ShellSafe(self.daemon_pidfile), self.server_port)) | def daemon_command(self): """Return command to start the daemon""" return (self.distccd() + "--verbose --lifetime=%d --daemon --log-file %s " "--pid-file %s --port %d --allow 127.0.0.1" % (self.daemon_lifetime(), self.daemon_logfile, self.daemon_pidfile, self.server_port)) | c113ba17e90da226b1e0b4c65576f800ab939f6a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4521/c113ba17e90da226b1e0b4c65576f800ab939f6a/testdistcc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8131,
67,
3076,
12,
2890,
4672,
3536,
990,
1296,
358,
787,
326,
8131,
8395,
327,
261,
2890,
18,
4413,
952,
72,
1435,
397,
5238,
11369,
1493,
17155,
5095,
72,
1493,
21511,
1493,
1330,
17,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8131,
67,
3076,
12,
2890,
4672,
3536,
990,
1296,
358,
787,
326,
8131,
8395,
327,
261,
2890,
18,
4413,
952,
72,
1435,
397,
5238,
11369,
1493,
17155,
5095,
72,
1493,
21511,
1493,
1330,
17,... |
if not sofar or id not in sofar: if sofar: | if sofar==None or id not in sofar: if sofar!=None: | def __parse_results(self, cursor, callback, sofar=None): """Call callback on all the results, in the correct order. | 43dd1c6a3981dfe31ac4b33531b337e92ef7587c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2342/43dd1c6a3981dfe31ac4b33531b337e92ef7587c/catalog.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2670,
67,
4717,
12,
2890,
16,
3347,
16,
1348,
16,
272,
792,
297,
33,
7036,
4672,
3536,
1477,
1348,
603,
777,
326,
1686,
16,
316,
326,
3434,
1353,
18,
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,
1001,
2670,
67,
4717,
12,
2890,
16,
3347,
16,
1348,
16,
272,
792,
297,
33,
7036,
4672,
3536,
1477,
1348,
603,
777,
326,
1686,
16,
316,
326,
3434,
1353,
18,
2,
-100,
-100,
-100,
-100,
... |
new.append("\trotateOrigin center") | new.append("\trotateOrigin leftBaseline") | def remove_figinset(lines): i = 0 while 1: i = find_token(lines, "\\begin_inset Figure", i) if i == -1: break j = find_end_of_inset(lines, i) lyxwidth = string.split(lines[i])[3]+"pt" lyxheight = string.split(lines[i])[4]+"pt" filename = get_value(lines, "file", i+1, j) width = get_length(lines, "width", i+1, j) # what does width=5 mean ? height = get_length(lines, "height", i+1, j) rotateAngle = get_value(lines, "angle", i+1, j) if width == "" and height == "": size_type = "0" else: size_type = "1" flags = get_value(lines, "flags", i+1, j) x = int(flags)%4 if x == 1: display = "monochrome" elif x == 2: display = "gray" else: display = "color" subcaptionText = get_value(lines, "subcaption", i+1, j) if subcaptionText != "": subcaptionText = '"'+subcaptionText+'"' k = find_token(lines, "subfigure", i+1,j) if k == -1: subcaption = 0 else: subcaption = 1 new = ["\\begin_inset Graphics FormatVersion 1"] append(new, "filename", filename) append(new, "display", display) if subcaption: new.append("\tsubcaption") append(new, "subcaptionText", subcaptionText) append(new, "size_type", size_type) append(new, "width", width) append(new, "height", height) if rotateAngle != "": new.append("\trotate") append(new, "rotateAngle", rotateAngle) new.append("\trotateOrigin center") new.append("\tlyxsize_type 1") append(new, "lyxwidth", lyxwidth) append(new, "lyxheight", lyxheight) new = new + ["\end_inset"] lines[i:j+1] = new | 9467fcfe57267965250cb3e6227f832c5ec961d1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7514/9467fcfe57267965250cb3e6227f832c5ec961d1/lyxconvert_218.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1206,
67,
470,
267,
542,
12,
3548,
4672,
277,
273,
374,
1323,
404,
30,
277,
273,
1104,
67,
2316,
12,
3548,
16,
8422,
10086,
67,
267,
542,
18818,
3113,
277,
13,
309,
277,
422,
300,
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,
1206,
67,
470,
267,
542,
12,
3548,
4672,
277,
273,
374,
1323,
404,
30,
277,
273,
1104,
67,
2316,
12,
3548,
16,
8422,
10086,
67,
267,
542,
18818,
3113,
277,
13,
309,
277,
422,
300,
21... |
if isinstance(widget, gtk.Notebook): print "connecting", widget, "end", "for", self def cb (*args): print "hallo?" widget.connect("drag-end", cb) | def moveAndChain (widget, context, x, y, timestamp, function): r = widget.get_allocation() s = self.get_allocation() function(widget, context, x-s.x+r.x, y-s.y+r.y, timestamp) | b74bada3c4a52655d2f0ff893e7a277c37cc7231 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5339/b74bada3c4a52655d2f0ff893e7a277c37cc7231/pydock.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3635,
1876,
3893,
261,
6587,
16,
819,
16,
619,
16,
677,
16,
2858,
16,
445,
4672,
436,
273,
3604,
18,
588,
67,
29299,
1435,
272,
273,
365,
18,
588,
67,
29299,
1435,
445,
12,
6587,
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,
3635,
1876,
3893,
261,
6587,
16,
819,
16,
619,
16,
677,
16,
2858,
16,
445,
4672,
436,
273,
3604,
18,
588,
67,
29299,
1435,
272,
273,
365,
18,
588,
67,
29299,
1435,
445,
12,
6587,
16,... | |
index = str(self.sender().parentWidget().objectName())[-2:] | index = str(self.focusWidget().parentWidget().objectName())[-2:] | def EffectChanged(self, value): index = str(self.sender().objectName())[-2:] if not index[-1].isdigit(): index = str(self.sender().parentWidget().objectName())[-2:] if not index[0].isdigit(): index = index[1:] wascalc = self.nocalc self.nocalc = 1 self.modified = 1 self.UpdateCombo(1, int(index) - 1) self.storeItem(self.itemattrlist[self.currentTabLabel]) self.nocalc = wascalc self.calculate() | 5102b1d6692953c402c64c81b6035068f52bb951 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6671/5102b1d6692953c402c64c81b6035068f52bb951/ScWindow.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
30755,
5033,
12,
2890,
16,
460,
4672,
770,
273,
609,
12,
2890,
18,
15330,
7675,
1612,
461,
10756,
18919,
22,
26894,
309,
486,
770,
18919,
21,
8009,
291,
11052,
13332,
770,
273,
609,
12,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
30755,
5033,
12,
2890,
16,
460,
4672,
770,
273,
609,
12,
2890,
18,
15330,
7675,
1612,
461,
10756,
18919,
22,
26894,
309,
486,
770,
18919,
21,
8009,
291,
11052,
13332,
770,
273,
609,
12,
... |
self._worker_list = [] for worker_num in range(self._num_workers): self._worker_list.append(SimWorker()) | self._worker_list = [SimWorker() for worker_num in range(self._num_workers)] | def __init__(self, trace_files=""): self._num_workers = 10 self._num_executed_tasks = 0 self._worker_list = [] for worker_num in range(self._num_workers): self._worker_list.append(SimWorker()) | 59e43bcbd4268227c074c57e24b291856aa6f88f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8868/59e43bcbd4268227c074c57e24b291856aa6f88f/grid_simulator.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
2606,
67,
2354,
1546,
6,
4672,
365,
6315,
2107,
67,
15625,
273,
1728,
365,
6315,
2107,
67,
4177,
4817,
67,
9416,
273,
374,
365,
6315,
10124,
67,
1098,
27... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
2606,
67,
2354,
1546,
6,
4672,
365,
6315,
2107,
67,
15625,
273,
1728,
365,
6315,
2107,
67,
4177,
4817,
67,
9416,
273,
374,
365,
6315,
10124,
67,
1098,
27... |
smtp = smtplib.SMTP(self.MAILHOST) smtp.sendmail(self.ADMIN_EMAIL, sendto, message.getvalue()) | if ROUNDUPDBSENDMAILDEBUG: print 'From: %s\nTo: %s\n%s\n=-=-=-=-=-=-=-='%( self.ADMIN_EMAIL, sendto, message.getvalue()) else: smtp = smtplib.SMTP(self.MAILHOST) smtp.sendmail(self.ADMIN_EMAIL, sendto, message.getvalue()) | def sendmessage(self, nodeid, msgid, change_note): """Send a message to the members of an issue's nosy list. | 78fc9e2f636e41f3a8f75b25290ac7fd7af7ead1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/78fc9e2f636e41f3a8f75b25290ac7fd7af7ead1/roundupdb.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1366,
2150,
12,
2890,
16,
756,
350,
16,
24389,
16,
2549,
67,
7652,
4672,
3536,
3826,
279,
883,
358,
326,
4833,
434,
392,
5672,
1807,
26628,
93,
666,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1366,
2150,
12,
2890,
16,
756,
350,
16,
24389,
16,
2549,
67,
7652,
4672,
3536,
3826,
279,
883,
358,
326,
4833,
434,
392,
5672,
1807,
26628,
93,
666,
18,
2,
-100,
-100,
-100,
-100,
-100... |
self._record_member(tarinfo) | self.members.append(tarinfo) | def proc_sparse(self, tarinfo): """Analyze a GNU sparse header plus extra headers. """ buf = tarinfo.tobuf() sp = _ringbuffer() pos = 386 lastpos = 0L realpos = 0L # There are 4 possible sparse structs in the # first header. for i in xrange(4): try: offset = int(buf[pos:pos + 12], 8) numbytes = int(buf[pos + 12:pos + 24], 8) except ValueError: break if offset > lastpos: sp.append(_hole(lastpos, offset - lastpos)) sp.append(_data(offset, numbytes, realpos)) realpos += numbytes lastpos = offset + numbytes pos += 24 | 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,
5418,
67,
17472,
12,
2890,
16,
8232,
1376,
4672,
3536,
31984,
279,
611,
50,
57,
9387,
1446,
8737,
2870,
1607,
18,
3536,
1681,
273,
8232,
1376,
18,
869,
4385,
1435,
1694,
273,
389,
8022,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5418,
67,
17472,
12,
2890,
16,
8232,
1376,
4672,
3536,
31984,
279,
611,
50,
57,
9387,
1446,
8737,
2870,
1607,
18,
3536,
1681,
273,
8232,
1376,
18,
869,
4385,
1435,
1694,
273,
389,
8022,
... |
self.version, server_name, self.map = bits[:3] | self.version, server_name, map_name = bits[:3] | def _sync(self): s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) s.settimeout(1) s.sendto('\xff\xff\xff\xff\xff\xff\xff\xff\xff\xffgief', self.addr) bits = s.recvfrom(1024)[0][14:].split('\x00') s.close() self.version, server_name, self.map = bits[:3] self.name = server_name.decode('latin1') self.gametype_id, self.flags, self.progression, player_count, \ self.max_players = map(int, bits[3:8]) self.gametype = GAMETYPES.get(self.gametype_id, 'unknown') | 9e1c8c1b2b66888c937f431f09f3b07d8f04bf4d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/14437/9e1c8c1b2b66888c937f431f09f3b07d8f04bf4d/network.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
8389,
12,
2890,
4672,
272,
273,
2987,
18,
7814,
12,
7814,
18,
6799,
67,
18819,
16,
2987,
18,
3584,
3507,
67,
40,
15370,
13,
272,
18,
542,
4538,
12,
21,
13,
272,
18,
4661,
869,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
8389,
12,
2890,
4672,
272,
273,
2987,
18,
7814,
12,
7814,
18,
6799,
67,
18819,
16,
2987,
18,
3584,
3507,
67,
40,
15370,
13,
272,
18,
542,
4538,
12,
21,
13,
272,
18,
4661,
869,
... |
pManager.manager.DebugStr('cOwlManager '+ __version__ +': domType Error! Should never get here!') | pManager.manager.DebugStr('cOwlManager '+ __version__ +': domType Error! Should never get here!', 1) | def Answer(self, cNetPackage): """Send an Answer to it's destination owl | d6524ab4f406c1563beee1f9b91eaca1c0e08db5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2853/d6524ab4f406c1563beee1f9b91eaca1c0e08db5/cOwlManager.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
21019,
12,
2890,
16,
276,
7308,
2261,
4672,
3536,
3826,
392,
21019,
358,
518,
1807,
2929,
2523,
80,
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,
21019,
12,
2890,
16,
276,
7308,
2261,
4672,
3536,
3826,
392,
21019,
358,
518,
1807,
2929,
2523,
80,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
if self.wantAvatarPhysicsIndicator: | if self.wantDebugIndicator: | def setupAvatarPhysicsIndicator(self): if self.wantAvatarPhysicsIndicator: indicator=loader.loadModelCopy('phase_5/models/props/dagger') #self.walkControls.setAvatarPhysicsIndicator(indicator) | 6bf0ce7b64dbc472e517058dc6c231bb0d06d617 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8543/6bf0ce7b64dbc472e517058dc6c231bb0d06d617/ShipPilot.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3875,
23999,
3731,
1900,
2102,
13140,
12,
2890,
4672,
309,
365,
18,
17369,
2829,
13140,
30,
10664,
33,
6714,
18,
945,
1488,
2951,
2668,
13961,
67,
25,
19,
7665,
19,
9693,
19,
72,
7594,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3875,
23999,
3731,
1900,
2102,
13140,
12,
2890,
4672,
309,
365,
18,
17369,
2829,
13140,
30,
10664,
33,
6714,
18,
945,
1488,
2951,
2668,
13961,
67,
25,
19,
7665,
19,
9693,
19,
72,
7594,
... |
if not os.path.isdir(os.path.join(directory, subdir)): | if not os.path.exists(os.path.join(directory, subdir)): | def allIsDir(directory, subdirs): for subdir in subdirs: if not os.path.isdir(os.path.join(directory, subdir)): return False return True | 06a01ae812b082d2afa4149584a57243cdf95272 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12354/06a01ae812b082d2afa4149584a57243cdf95272/setup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
777,
2520,
1621,
12,
5149,
16,
720,
8291,
4672,
364,
16921,
316,
720,
8291,
30,
309,
486,
1140,
18,
803,
18,
1808,
12,
538,
18,
803,
18,
5701,
12,
5149,
16,
16921,
3719,
30,
327,
108... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
777,
2520,
1621,
12,
5149,
16,
720,
8291,
4672,
364,
16921,
316,
720,
8291,
30,
309,
486,
1140,
18,
803,
18,
1808,
12,
538,
18,
803,
18,
5701,
12,
5149,
16,
16921,
3719,
30,
327,
108... |
if sys.platform not in ['mac', 'win32']: | if platform not in ['mac', 'win32']: | def detect_modules(self): # Ensure that /usr/local is always used if '/usr/local/lib' not in self.compiler.library_dirs: self.compiler.library_dirs.append('/usr/local/lib') if '/usr/local/include' not in self.compiler.include_dirs: self.compiler.include_dirs.append( '/usr/local/include' ) | 1fc6b0d7db91d541a72639988978bef873a18f5f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/1fc6b0d7db91d541a72639988978bef873a18f5f/setup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5966,
67,
6400,
12,
2890,
4672,
468,
7693,
716,
342,
13640,
19,
3729,
353,
3712,
1399,
309,
1173,
13640,
19,
3729,
19,
2941,
11,
486,
316,
365,
18,
9576,
18,
12083,
67,
8291,
30,
365,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5966,
67,
6400,
12,
2890,
4672,
468,
7693,
716,
342,
13640,
19,
3729,
353,
3712,
1399,
309,
1173,
13640,
19,
3729,
19,
2941,
11,
486,
316,
365,
18,
9576,
18,
12083,
67,
8291,
30,
365,
... |
expected = ['EGGS: %s' % l1, 'info: %s' % l2, 'SPAM: %s' % l3] | if __debug__: expected = ['EGGS: %s' % l1, 'info: %s' % l2, 'SPAM: %s' % l3] else: expected = ['EGGS: %s' % l1, 'SPAM: %s' % l3] | def test_log_info(self): d = asyncore.dispatcher() | 78e19616f3f30adfe8845aa80f03c4b822626f13 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8546/78e19616f3f30adfe8845aa80f03c4b822626f13/test_asyncore.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
1330,
67,
1376,
12,
2890,
4672,
302,
273,
4326,
479,
18,
18495,
1435,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
1330,
67,
1376,
12,
2890,
4672,
302,
273,
4326,
479,
18,
18495,
1435,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
'<small><ul class="expandable">\n <li class="subtopic"><a href="http://nohost/test_folder_1_/wiki/RootPage" name="RootPage">RootPage</a> <b><-- You are here.</b> ...\n </li>\n</ul>\n</small>' | '<small><ul class="outline expandable">\n <li><a href="http://nohost/test_folder_1_/wiki/RootPage" name="RootPage">RootPage</a> <b><-- You are here.</b> ...\n </li>\n</ul>\n</small>' | def test_context(self): self.assertEquals(self.wiki.RootPage.context(), ' ') # XXX should be as below I think self.assertEquals(self.wiki.RootPage.context(with_siblings=1), '<small><ul class="expandable">\n <li class="subtopic"><a href="http://nohost/test_folder_1_/wiki/RootPage" name="RootPage">RootPage</a> <b><-- You are here.</b> ...\n </li>\n</ul>\n</small>' ) self.assertEquals(self.wiki.ChildPage.context(), '<small><ul class="expandable">\n <li class="subtopic"><a href="http://nohost/test_folder_1_/wiki/RootPage" name="RootPage">RootPage</a>\n<ul class="expandable">\n <li class="subtopic"><a href="http://nohost/test_folder_1_/wiki/ChildPage" name="ChildPage">ChildPage</a> <b><-- You are here.</b></li>\n</ul>\n </li>\n</ul>\n</small>' ) | 7eb712a46ebabf4b972fe73fbc356f07a9dd4afa /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5225/7eb712a46ebabf4b972fe73fbc356f07a9dd4afa/OutlineSupport_tests.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
2472,
12,
2890,
4672,
365,
18,
11231,
8867,
12,
2890,
18,
13044,
18,
2375,
1964,
18,
2472,
9334,
5183,
10600,
4359,
13,
468,
11329,
1410,
506,
487,
5712,
467,
15507,
365,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
2472,
12,
2890,
4672,
365,
18,
11231,
8867,
12,
2890,
18,
13044,
18,
2375,
1964,
18,
2472,
9334,
5183,
10600,
4359,
13,
468,
11329,
1410,
506,
487,
5712,
467,
15507,
365,
18,
... |
filename = u'%s/%s%s.%s' % (self.config['posterdir'][0], sanitiseFileName(self.program_seriesid), self.graphic_suffix[rel_type], fileExtension) | filename = u'%s/%s%s.%s' % (self.config['posterdir'][0], self.sanitiseFileName(self.program_seriesid), self.graphic_suffix[rel_type], fileExtension) | def _getSecondarySourceGraphics(self, cfile, graphic_type, watched=False): '''Download from secondary source such as movieposter.com return None return full qualified path and filename of downloaded graphic ''' if not len(self.config['myth_secondary_sources']): return None | d7120a7dc6b48c0861502d071fe4f1897fab913e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/13713/d7120a7dc6b48c0861502d071fe4f1897fab913e/jamu.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
14893,
1830,
17558,
12,
2890,
16,
276,
768,
16,
19548,
67,
723,
16,
23135,
33,
8381,
4672,
9163,
7109,
628,
9946,
1084,
4123,
487,
7344,
522,
881,
29811,
18,
832,
327,
599,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
14893,
1830,
17558,
12,
2890,
16,
276,
768,
16,
19548,
67,
723,
16,
23135,
33,
8381,
4672,
9163,
7109,
628,
9946,
1084,
4123,
487,
7344,
522,
881,
29811,
18,
832,
327,
599,
3... |
if nick in self.greets: util.say(bot, channel, self.greets[nick]) | greet = self.greets.get(nick) if greet: util.say(bot, channel, greet) | def join(self, bot, channel, user): ''' Called when user joins a channel. ''' # Retrieve the nick nick = util.get_nick(user) if nick == bot.nickname: return # Only interested in others joining # Check if we have greeting and serve it if nick in self.greets: util.say(bot, channel, self.greets[nick]) | b170789b9ab824b2624236dbaeb7f84787fe2df5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12347/b170789b9ab824b2624236dbaeb7f84787fe2df5/greet.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1233,
12,
2890,
16,
2512,
16,
1904,
16,
729,
4672,
9163,
11782,
1347,
729,
13471,
279,
1904,
18,
9163,
468,
10708,
326,
10909,
10909,
273,
1709,
18,
588,
67,
17091,
12,
1355,
13,
309,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1233,
12,
2890,
16,
2512,
16,
1904,
16,
729,
4672,
9163,
11782,
1347,
729,
13471,
279,
1904,
18,
9163,
468,
10708,
326,
10909,
10909,
273,
1709,
18,
588,
67,
17091,
12,
1355,
13,
309,
... |
shift, bin1, bin2 = best return bin1, bin2, shift | t1, t2, shift = best if trace: print >>sys.stderr, "Best:", dump(t1, t2, shift, bytes) if __debug__: mask = ~((~0) << shift) for i in xrange(len(t)): assert t[i] == t2[(t1[i >> shift] << shift) + (i & mask)] return best | def splitbins(bins): # split a sparse integer table into two tables, such as: # value = t2[(t1[char>>shift]<<shift)+(char&mask)] # and value == 0 means no data bytes = sys.maxint for shift in range(16): bin1 = [] bin2 = [] size = 2**shift bincache = {} for i in range(0, len(bins), size): bin = bins[i:i+size] index = bincache.get(tuple(bin)) if index is None: index = len(bin2) bincache[tuple(bin)] = index for v in bin: if v is None: bin2.append(0) else: bin2.append(v) bin1.append(index>>shift) # determine memory size b = len(bin1)*getsize(bin1) + len(bin2)*getsize(bin2) if b < bytes: best = shift, bin1, bin2 bytes = b shift, bin1, bin2 = best | 20c6c6a885ef170c8c80b25320c00639f6714b7b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/20c6c6a885ef170c8c80b25320c00639f6714b7b/makeunicodedata.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1416,
11862,
12,
11862,
4672,
468,
1416,
279,
9387,
3571,
1014,
1368,
2795,
4606,
16,
4123,
487,
30,
468,
282,
460,
273,
268,
22,
63,
12,
88,
21,
63,
3001,
9778,
4012,
65,
17685,
4012,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1416,
11862,
12,
11862,
4672,
468,
1416,
279,
9387,
3571,
1014,
1368,
2795,
4606,
16,
4123,
487,
30,
468,
282,
460,
273,
268,
22,
63,
12,
88,
21,
63,
3001,
9778,
4012,
65,
17685,
4012,... |
if self._urlalreadyincluded(absurl): | if self._isalreadyincluded(includetuple): | def _pushfile( self, url ): """ Opens the url specified, pushes it on the stack, and returns a file like object. Returns None if the url has previously been included. If the file can not be opened this function exits. """ # absolutize this url using the including files url # as a base url. absurl = self._absurl(url) # check if this has previously been included. if self._urlalreadyincluded(absurl): return None try: fo = urlgrabber.grabber.urlopen(absurl) except urlgrabber.grabber.URLGrabError, e: fo = None if fo is not None: self.name = absurl self._incstack.append( fo ) self._alreadyincluded.append(absurl) else: raise Errors.ConfigError, \ 'Error accessing file for config %s' % (absurl) | e6d536cb812874a5689f2f96e847ca97f217bb6c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5445/e6d536cb812874a5689f2f96e847ca97f217bb6c/parser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
6206,
768,
12,
365,
16,
880,
262,
30,
3536,
6066,
773,
326,
880,
1269,
16,
27351,
518,
603,
326,
2110,
16,
471,
1135,
279,
585,
3007,
733,
18,
2860,
599,
309,
326,
880,
711,
724... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6206,
768,
12,
365,
16,
880,
262,
30,
3536,
6066,
773,
326,
880,
1269,
16,
27351,
518,
603,
326,
2110,
16,
471,
1135,
279,
585,
3007,
733,
18,
2860,
599,
309,
326,
880,
711,
724... |
elif self.outputFreq == "time_step": | elif numTimeSteps > 0 and self.outputFreq == "time_step": | def open(self, totalTime, numTimeSteps): """ Prepare for writing data. """ logEvent = "%sopen" % self._loggingPrefix self._logger.eventBegin(logEvent) | 446e3c02f38b6695257a5c611431f04ac97e26f6 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8645/446e3c02f38b6695257a5c611431f04ac97e26f6/OutputManager.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1696,
12,
2890,
16,
2078,
950,
16,
818,
950,
11811,
4672,
3536,
7730,
364,
7410,
501,
18,
3536,
25424,
273,
2213,
87,
3190,
6,
738,
365,
6315,
11167,
2244,
365,
6315,
4901,
18,
2575,
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,
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,
2078,
950,
16,
818,
950,
11811,
4672,
3536,
7730,
364,
7410,
501,
18,
3536,
25424,
273,
2213,
87,
3190,
6,
738,
365,
6315,
11167,
2244,
365,
6315,
4901,
18,
2575,
8... |
sage: f = Piecewise([[(0,pi/2),f1],[(pi/2,pi),f2]]) | sage: f = Piecewise([[(-pi,pi/2),f1],[(pi/2,pi),f2]]) | def fourier_series_partial_sum_hann(self,N,L): r""" Returns the Hann-filtered partial sum (named after von Hann, not Hamming) \[ f(x) \sim \frac{a_0}{2} + \sum_{n=1}^N H_N(n)*[a_n\cos(\frac{n\pi x}{L}) + b_n\sin(\frac{n\pi x}{L})], \] as a string, where $H_N(x) = (1+\cos(\pi x/N))/2$. This is a "smoother" partial sum - the Gibbs phenomenon is mollified. | 07280a8b6fa4d850d9f2f5771eb969f4ee406c9c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/07280a8b6fa4d850d9f2f5771eb969f4ee406c9c/piecewise.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12792,
2453,
67,
10222,
67,
11601,
67,
1364,
67,
76,
1072,
12,
2890,
16,
50,
16,
48,
4672,
436,
8395,
2860,
326,
670,
1072,
17,
12071,
4702,
2142,
261,
13188,
1839,
331,
265,
670,
1072... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12792,
2453,
67,
10222,
67,
11601,
67,
1364,
67,
76,
1072,
12,
2890,
16,
50,
16,
48,
4672,
436,
8395,
2860,
326,
670,
1072,
17,
12071,
4702,
2142,
261,
13188,
1839,
331,
265,
670,
1072... |
self.__name = name self.__status = [] | self._name = name self._status = [] | def __init__(self, name, potfile, podir): self.__name = name self.__status = [] #PO files... for itemname in os.listdir(podir): #For all dir items... fullitempath = os.path.abspath(os.path.join(podir, itemname)) if os.path.isfile(fullitempath): #If a file... filename = os.path.splitext(itemname) if str.lower(filename[1]) == '.po': #If a PO file... self.__status.append(PoStatus(fullitempath, False)) #POT file... self.__status.append(PoStatus(os.path.abspath(potfile), True)) | 569cb008f201fd5615072299951acfa2ed026f12 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5857/569cb008f201fd5615072299951acfa2ed026f12/GetTranslationsStatus.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
508,
16,
5974,
768,
16,
3713,
481,
4672,
365,
6315,
529,
273,
508,
365,
6315,
2327,
273,
5378,
225,
468,
2419,
1390,
2777,
364,
761,
529,
316,
1140,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
508,
16,
5974,
768,
16,
3713,
481,
4672,
365,
6315,
529,
273,
508,
365,
6315,
2327,
273,
5378,
225,
468,
2419,
1390,
2777,
364,
761,
529,
316,
1140,
18,
... |
r""" Return the recurrence matrix satisfied by the coefficients of U, | r""" Return the recurrence matrix satisfied by the coefficients of `U`, | def recurrence_matrix(self, use_smithline=True): r""" Return the recurrence matrix satisfied by the coefficients of U, that is a matrix `R =(r_{rs})_{r,s=1 \dots p}` such that `u_{ij} = \sum_{r,s=1}^p r_{rs} u_{i-r, j-s}`. Uses an elegant construction which I believe is due to Smithline. See my paper in IMRN (full citation in reference manual). | 51aabb4f4c1d25de708da4cd9e8295aeb8a186e7 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/51aabb4f4c1d25de708da4cd9e8295aeb8a186e7/genus0.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
25939,
67,
5667,
12,
2890,
16,
999,
67,
4808,
483,
1369,
33,
5510,
4672,
436,
8395,
2000,
326,
25939,
3148,
18958,
635,
326,
14229,
434,
1375,
57,
9191,
716,
353,
279,
3148,
225,
1375,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
25939,
67,
5667,
12,
2890,
16,
999,
67,
4808,
483,
1369,
33,
5510,
4672,
436,
8395,
2000,
326,
25939,
3148,
18958,
635,
326,
14229,
434,
1375,
57,
9191,
716,
353,
279,
3148,
225,
1375,
... |
assert zip(*selection_pairs[0]) == [(0, 20)] | assert zip(*selection_pairs[0]) == [(20, 0)] | def exercise_pair_registry_basic(): registry = ncs.restraints.pair_registry(30, 3) assert registry.n_seq() == 30 assert registry.number_of_additional_isolated_sites == 0 selection_pairs = registry.selection_pairs() assert len(selection_pairs) == 2 assert zip(*selection_pairs[0]) == [] assert zip(*selection_pairs[1]) == [] assert registry.enter(i_seq=0, j_seq=10, j_ncs=2) == 1 assert registry.enter(i_seq=10, j_seq=0, j_ncs=2) == 0 assert registry.enter(i_seq=0, j_seq=10, j_ncs=1) == -2 assert registry.enter(i_seq=21, j_seq=1, j_ncs=1) == 1 assert registry.enter(i_seq=0, j_seq=20, j_ncs=1) == 1 selection_pairs = registry.selection_pairs() assert len(selection_pairs) == 2 assert zip(*selection_pairs[0]) == [(0, 20), (1, 21)] assert zip(*selection_pairs[1]) == [(0, 10)] selection = flex.bool(30, False) sel_registry = registry.proxy_select(iselection=selection.iselection()) selection_pairs = sel_registry.selection_pairs() assert len(selection_pairs) == 2 assert zip(*selection_pairs[0]) == [] assert zip(*selection_pairs[1]) == [] selection = flex.bool(30, True) sel_registry = registry.proxy_select(iselection=selection.iselection()) selection_pairs = sel_registry.selection_pairs() assert len(selection_pairs) == 2 assert zip(*selection_pairs[0]) == [(0, 20), (1, 21)] assert zip(*selection_pairs[1]) == [(0, 10)] selection[0] = False sel_registry = registry.proxy_select(iselection=selection.iselection()) selection_pairs = sel_registry.selection_pairs() assert len(selection_pairs) == 2 assert zip(*selection_pairs[0]) == [(0, 20)] assert zip(*selection_pairs[1]) == [] selection[0] = True selection[1] = False sel_registry = registry.proxy_select(iselection=selection.iselection()) selection_pairs = sel_registry.selection_pairs() assert len(selection_pairs) == 2 assert zip(*selection_pairs[0]) == [(0, 19)] assert zip(*selection_pairs[1]) == [(0, 9)] selection[1] = True selection[2] = False selection[4] = False sel_registry = registry.proxy_select(iselection=selection.iselection()) selection_pairs = sel_registry.selection_pairs() assert len(selection_pairs) == 2 assert zip(*selection_pairs[0]) == [(0, 18),(1,19)] assert zip(*selection_pairs[1]) == [(0, 8)] registry.register_additional_isolated_sites(number=10) assert registry.number_of_additional_isolated_sites == 10 registry.register_additional_isolated_sites(number=3) assert registry.number_of_additional_isolated_sites == 13 selection.resize(43, False) sel_registry = registry.proxy_select(iselection=selection.iselection()) assert sel_registry.number_of_additional_isolated_sites == 0 selection[35] = True sel_registry = registry.proxy_select(iselection=selection.iselection()) assert sel_registry.number_of_additional_isolated_sites == 1 selection[38] = True selection[42] = True sel_registry = registry.proxy_select(iselection=selection.iselection()) assert sel_registry.number_of_additional_isolated_sites == 3 selection_pairs = sel_registry.selection_pairs() assert len(selection_pairs) == 2 assert zip(*selection_pairs[0]) == [(0, 18),(1,19)] assert zip(*selection_pairs[1]) == [(0, 8)] # iselection = flex.size_t([ # random permutation with omissions first 30 8, 10, 6, 12, 20, 15, 16, 22, 11, 23, 14, 27, 3, 13, 5, 28, 17, 0, 19, 26, 9, 4, 1, 29, 18, # random permutation with omissions other 13 32, 37, 34, 41, 38, 42, 33, 35, 30]) sel_registry = registry.proxy_select(iselection=iselection) assert sel_registry.number_of_additional_isolated_sites == 9 selection_pairs = sel_registry.selection_pairs() assert len(selection_pairs) == 2 assert zip(*selection_pairs[0]) == [(17, 4)] assert zip(*selection_pairs[1]) == [(17, 1)] # iselection = flex.size_t([0,1,30]) sel_registry = registry.proxy_select(iselection=iselection) assert sel_registry.number_of_additional_isolated_sites == 1 iselection = flex.size_t([0,30,1]) try: registry.proxy_select(iselection=iselection) except RuntimeError, e: assert str(e).endswith( "): MMTBX_ASSERT(" "result_i_seq < result_n_seq || iselection[result_i_seq] >= n_seq)" " failure.") else: raise Exception_expected | 2978e6ae7c069a548fde5752777cc3161cb26787 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/696/2978e6ae7c069a548fde5752777cc3161cb26787/tst_restraints.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
24165,
67,
6017,
67,
9893,
67,
13240,
13332,
4023,
273,
290,
2143,
18,
455,
313,
1598,
87,
18,
6017,
67,
9893,
12,
5082,
16,
890,
13,
1815,
4023,
18,
82,
67,
5436,
1435,
422,
5196,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
24165,
67,
6017,
67,
9893,
67,
13240,
13332,
4023,
273,
290,
2143,
18,
455,
313,
1598,
87,
18,
6017,
67,
9893,
12,
5082,
16,
890,
13,
1815,
4023,
18,
82,
67,
5436,
1435,
422,
5196,
1... |
def __init__(self, player_ui, navigator, service_locator): Window.__init__(self, player_ui, navigator) | def __init__(self, quit_handler, navigator, service_locator): Window.__init__(self, quit_handler, navigator) | def __init__(self, player_ui, navigator, service_locator): Window.__init__(self, player_ui, navigator) self.__music_repository = service_locator.music_repository self.body = appuifw.Listbox([u"empty"], self.go_to) self.menu = self.get_menu_items() | 43a0f8d3d71fafa93f66b7de5c6311692b8b2ccd /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5169/43a0f8d3d71fafa93f66b7de5c6311692b8b2ccd/aspyplayer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
9706,
67,
4176,
16,
19796,
16,
1156,
67,
20048,
4672,
6076,
16186,
2738,
972,
12,
2890,
16,
9706,
67,
4176,
16,
19796,
13,
365,
16186,
81,
14894,
67,
907... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
9706,
67,
4176,
16,
19796,
16,
1156,
67,
20048,
4672,
6076,
16186,
2738,
972,
12,
2890,
16,
9706,
67,
4176,
16,
19796,
13,
365,
16186,
81,
14894,
67,
907... |
dprint(path) | if cls.debug: dprint(path) | def make_folder(cls, ref): if cls.exists(ref): if cls.is_folder(ref): return raise OSError("[Errno 20] Not a directory: '%s'" % ref) parent = utils.get_dirname(ref) if not cls.is_folder(parent): raise OSError("[Errno 20] Not a directory: '%s'" % parent) ref, client = cls._get_client(ref) path = str(ref.path) dprint(path) responses = client.mkcol(path) # It's also possible (but not required) the parent could be cached, so # clean out its cache as well dprint(parent) cls._purge_cache(parent) | 23c171bfd81964bb1a082d8d21ffb71c855ace35 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11522/23c171bfd81964bb1a082d8d21ffb71c855ace35/http.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1221,
67,
5609,
12,
6429,
16,
1278,
4672,
309,
2028,
18,
1808,
12,
1734,
4672,
309,
2028,
18,
291,
67,
5609,
12,
1734,
4672,
327,
1002,
10002,
2932,
63,
2524,
2135,
4200,
65,
2288,
279... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1221,
67,
5609,
12,
6429,
16,
1278,
4672,
309,
2028,
18,
1808,
12,
1734,
4672,
309,
2028,
18,
291,
67,
5609,
12,
1734,
4672,
327,
1002,
10002,
2932,
63,
2524,
2135,
4200,
65,
2288,
279... |
self.assertTrue(len(dirs), 2) | self.assertEqual(len(dirs), 2) | def test_getsitepackages(self): site.PREFIXES = ['xoxo'] dirs = site.getsitepackages() | 05e637951517fc748c84fe3e71d41d7d21cd1131 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12029/05e637951517fc748c84fe3e71d41d7d21cd1131/test_site.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
14665,
305,
881,
484,
1023,
12,
2890,
4672,
2834,
18,
6307,
3991,
273,
10228,
92,
2409,
83,
3546,
7717,
273,
2834,
18,
14665,
305,
881,
484,
1023,
1435,
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,
1842,
67,
14665,
305,
881,
484,
1023,
12,
2890,
4672,
2834,
18,
6307,
3991,
273,
10228,
92,
2409,
83,
3546,
7717,
273,
2834,
18,
14665,
305,
881,
484,
1023,
1435,
2,
-100,
-100,
-100,
... |
ret = self._escapeString(key) | ret = self._escapeString( key ) | def setJobParameter(self,jobID,key,value): """ Set a parameter specified by name,value pair for the job JobID """ | 99c1bc850ba087890925b3180df206f65bb1d4b3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/99c1bc850ba087890925b3180df206f65bb1d4b3/JobDB.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
2278,
1662,
12,
2890,
16,
4688,
734,
16,
856,
16,
1132,
4672,
3536,
1000,
279,
1569,
1269,
635,
508,
16,
1132,
3082,
364,
326,
1719,
22137,
3536,
2,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
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,
2278,
1662,
12,
2890,
16,
4688,
734,
16,
856,
16,
1132,
4672,
3536,
1000,
279,
1569,
1269,
635,
508,
16,
1132,
3082,
364,
326,
1719,
22137,
3536,
2,
-100,
-100,
-100,
-100,
-100,
... |
history_vals={ 'offer_id' : camp.offer_id.id, 'date' : camp.date_start, 'campaign_id' : camp.id, 'code' : camp.code1, 'responsible_id' : camp.responsible_id.id, | history_vals = { 'offer_id': camp.offer_id.id, 'date': camp.date_start, 'campaign_id': camp.id, 'code': camp.code1, 'responsible_id': camp.responsible_id.id, | def state_open_set(self, cr, uid, ids, *args): camp = self.browse(cr,uid,ids)[0] if not camp.date_start or not camp.dealer_id or not camp.trademark_id or not camp.lang_id or not camp.currency_id: raise osv.except_osv("Error","Informations are missing. Check Drop Date, Dealer, Trademark, Language and Currency") | 7ee897432c7e7d5a5c8e889fc429c3c1b66627fd /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7339/7ee897432c7e7d5a5c8e889fc429c3c1b66627fd/dm_campaign.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
919,
67,
3190,
67,
542,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
380,
1968,
4672,
20787,
273,
365,
18,
25731,
12,
3353,
16,
1911,
16,
2232,
25146,
20,
65,
309,
486,
20787,
18,
712... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
919,
67,
3190,
67,
542,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
380,
1968,
4672,
20787,
273,
365,
18,
25731,
12,
3353,
16,
1911,
16,
2232,
25146,
20,
65,
309,
486,
20787,
18,
712... |
self.assertTrue(u.fp._sock.fp._sock.gettimeout() is None) | self.assertTrue(u.fp.raw.fp._sock.gettimeout() is None) | def test_http_basic(self): u = urllib2.urlopen("http://www.python.org") self.assertTrue(u.fp._sock.fp._sock.gettimeout() is None) | 51b2a8d774e7420ac15a785d34fb4344035675fd /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8125/51b2a8d774e7420ac15a785d34fb4344035675fd/test_urllib2net.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
2505,
67,
13240,
12,
2890,
4672,
582,
273,
11527,
22,
18,
295,
18589,
2932,
2505,
2207,
5591,
18,
8103,
18,
3341,
7923,
365,
18,
11231,
5510,
12,
89,
18,
7944,
6315,
15031,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
2505,
67,
13240,
12,
2890,
4672,
582,
273,
11527,
22,
18,
295,
18589,
2932,
2505,
2207,
5591,
18,
8103,
18,
3341,
7923,
365,
18,
11231,
5510,
12,
89,
18,
7944,
6315,
15031,
1... |
cmds = [] (num_index1, num_index2) = (self.index(index1), self.index(index2)) if (num_index1 is not None) and (num_index2 is not None): for i in range(num_index1, num_index2 + 1): if 'command' in self.entryconfig(i): c = str(self.entrycget(i, 'command')) if c in self._tclCommands: cmds.append(c) | num_index1, num_index2 = self.index(index1), self.index(index2) if (num_index1 is None) or (num_index2 is None): num_index1, num_index2 = 0, -1 for i in range(num_index1, num_index2 + 1): if 'command' in self.entryconfig(i): c = str(self.entrycget(i, 'command')) if c: self.deletecommand(c) | def delete(self, index1, index2=None): """Delete menu items between INDEX1 and INDEX2 (not included).""" if index2 is None: index2 = index1 cmds = [] (num_index1, num_index2) = (self.index(index1), self.index(index2)) if (num_index1 is not None) and (num_index2 is not None): for i in range(num_index1, num_index2 + 1): if 'command' in self.entryconfig(i): c = str(self.entrycget(i, 'command')) if c in self._tclCommands: cmds.append(c) self.tk.call(self._w, 'delete', index1, index2) for c in cmds: self.deletecommand(c) | bb89364c29b1ff9a067c4993a6508699ac633480 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12029/bb89364c29b1ff9a067c4993a6508699ac633480/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1430,
12,
2890,
16,
770,
21,
16,
770,
22,
33,
7036,
4672,
3536,
2613,
3824,
1516,
3086,
12425,
21,
471,
12425,
22,
261,
902,
5849,
13,
12123,
309,
770,
22,
353,
599,
30,
770,
22,
273... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1430,
12,
2890,
16,
770,
21,
16,
770,
22,
33,
7036,
4672,
3536,
2613,
3824,
1516,
3086,
12425,
21,
471,
12425,
22,
261,
902,
5849,
13,
12123,
309,
770,
22,
353,
599,
30,
770,
22,
273... |
self.set_editor_prefs(editor, editor.uri, editor.contexts) | self.set_editor_prefs(editor, editor.uri, editor.lang) | def on_editor_settings_changed(self, editor): self.set_editor_prefs(editor, editor.uri, editor.contexts) for e in self.editors: if e is not editor: idle(self.set_editor_prefs, e, e.uri, e.contexts) | 17ca749558063a6f4af9d92adefa36e8191e939e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14800/17ca749558063a6f4af9d92adefa36e8191e939e/manager.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
67,
9177,
67,
4272,
67,
6703,
12,
2890,
16,
4858,
4672,
365,
18,
542,
67,
9177,
67,
1484,
2556,
12,
9177,
16,
4858,
18,
1650,
16,
4858,
18,
4936,
13,
364,
425,
316,
365,
18,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
67,
9177,
67,
4272,
67,
6703,
12,
2890,
16,
4858,
4672,
365,
18,
542,
67,
9177,
67,
1484,
2556,
12,
9177,
16,
4858,
18,
1650,
16,
4858,
18,
4936,
13,
364,
425,
316,
365,
18,
4... |
show_comments = [] for c in comments: if c[1] != 0: show_comments.append( '%2.02f%% lines ' % ((c[1]*100.0)/stats['lines'])+ c[0]) | show_comments = [ '%5.02f%% lines ' % ((value*100.0)/stats['lines']) + comment for comment, value in comments if value != 0 ] | def analyse(filenames): """ Analyse a list of files """ stats = { 'lines': 0, 'bad_length': 0, 'bad_end': 0, 'tabs': 0, 'tokens': 0, 'string_exception': 0, 'except_all': 0, 'bad_indentation':0, 'bad_import': 0, 'syntax_error': 0} files_db = [] for filename in filenames: f_stats = analyse_file(filename) if f_stats['lines'] != 0: for key, value in f_stats.iteritems(): stats[key] += value f_stats['filename'] = filename files_db.append(f_stats) # Show quality summary print print 'Code length: %d lines, %d tokens' % (stats['lines'], stats['tokens']) print # Aesthetics (and readibility) comments = [ ('with tabulators', stats['tabs']), ('bad indented', stats['bad_indentation']), ('longer than 79 characters', stats['bad_length']), ('with trailing whitespaces', stats['bad_end'])] show_comments = [] for c in comments: if c[1] != 0: show_comments.append( '%2.02f%% lines ' % ((c[1]*100.0)/stats['lines'])+ c[0]) print_list('Aesthetics (and readibility)', show_comments) print_worses(files_db, ['tabs', 'bad_indentation', 'bad_length', 'bad_end']) # Exception handling comments = [ ('string exceptions are used', stats['string_exception']), ('all exceptions are catched', stats['except_all'])] show_comments = [] for c in comments: if c[1] != 0: show_comments.append('%d times ' % c[1] + c[0]) print_list('Exception handling', show_comments) print_worses(files_db, ['string_exception', 'except_all']) # Imports if stats['bad_import'] != 0: show_comments = ['%d misplaced imports' % stats['bad_import']] else: show_comments = [] print_list('Imports', show_comments) print_worses(files_db, ['bad_import']) | af565785323d1b591dab09bacaf0d4136682605b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12681/af565785323d1b591dab09bacaf0d4136682605b/isetup-quality.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
31087,
12,
19875,
4672,
3536,
1922,
3450,
307,
279,
666,
434,
1390,
3536,
3177,
273,
288,
296,
3548,
4278,
374,
16,
296,
8759,
67,
2469,
4278,
374,
16,
296,
8759,
67,
409,
4278,
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,
31087,
12,
19875,
4672,
3536,
1922,
3450,
307,
279,
666,
434,
1390,
3536,
3177,
273,
288,
296,
3548,
4278,
374,
16,
296,
8759,
67,
2469,
4278,
374,
16,
296,
8759,
67,
409,
4278,
374,
1... |
entries = filter(lambda e, key=key: key in e, entries) | entries = [e for e in entries if key in e] | def lookup(caps, MIMEtype, key=None): entries = [] if MIMEtype in caps: entries = entries + caps[MIMEtype] MIMEtypes = MIMEtype.split('/') MIMEtype = MIMEtypes[0] + '/*' if MIMEtype in caps: entries = entries + caps[MIMEtype] if key is not None: entries = filter(lambda e, key=key: key in e, entries) return entries | 556e8b968f23ff694c9d953b0ab4b6293f05047e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3187/556e8b968f23ff694c9d953b0ab4b6293f05047e/mailcap.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3689,
12,
22984,
16,
13195,
723,
16,
498,
33,
7036,
4672,
3222,
273,
5378,
309,
13195,
723,
316,
15788,
30,
3222,
273,
3222,
397,
15788,
63,
18178,
723,
65,
13195,
2352,
273,
13195,
723,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3689,
12,
22984,
16,
13195,
723,
16,
498,
33,
7036,
4672,
3222,
273,
5378,
309,
13195,
723,
316,
15788,
30,
3222,
273,
3222,
397,
15788,
63,
18178,
723,
65,
13195,
2352,
273,
13195,
723,... |
first_results = first_results + "\nRETURN:" + link + '<br>' | first_results = first_results + "\nRETURN:" + link + "<br>" | def send_to_graph(results_server, results_link, title, date, browser_config, results): tbox = title url_format = "http://%s/%s" link_format= "<a href=\"%s\">%s</a>" #value, testname, tbox, timeval, date, branch, buildid, type, data result_format = "%.2f,%s,%s,%d,%d,%s,%s,%s,%s,\n" result_format2 = "%.2f,%s,%s,%d,%d,%s,%s,%s,\n" links = '' for res in results: browser_dump, counter_dump = results[res] utils.debug("Working with test: " + res) utils.debug("Sending results: " + " ".join(browser_dump)) utils.stamped_msg("Transmitting test: " + res, "Started") filename = tempfile.mktemp() tmpf = open(filename, "w") if res in ('ts', 'twinopen'): i = 0 for val in browser_dump: val_list = val.split('|') for v in val_list: tmpf.write(result_format % (float(v), res, tbox, i, date, browser_config['branch'], browser_config['buildid'], "discrete", "ms")) i += 1 else: # each line of the string is of the format i;page_name;median;mean;min;max;time vals\n name = '' if ((res == 'tp') or (res == 'tp_js')): name = '_loadtime' for bd in browser_dump: bd.rstrip('\n') page_results = bd.splitlines() i = 0 for mypage in page_results: r = mypage.split(';') #skip this line if it isn't the correct format if len(r) == 1: continue r[1] = r[1].rstrip('/') if r[1].find('/') > -1 : page = r[1].split('/')[1] else: page = r[1] try: val = float(r[2]) except ValueError: print 'WARNING: value error for median in tp' val = 0 tmpf.write(result_format % (val, res + name, tbox, i, date, browser_config['branch'], browser_config['buildid'], "discrete", page)) i += 1 tmpf.flush() tmpf.close() links += post_chunk(results_server, results_link, res, filename) os.remove(filename) for cd in counter_dump: for count_type in cd: val_list = cd[count_type] chunks = chunk_list(val_list) chunk_link = '' i = 0 for chunk in chunks: filename = tempfile.mktemp() tmpf = open(filename, "w") for val in chunk: tmpf.write(result_format2 % (float(val), res + "_" + count_type.replace("%", "Percent"), tbox, i, date, browser_config['branch'], browser_config['buildid'], "discrete")) i += 1 tmpf.flush() tmpf.close() chunk_link = post_chunk(results_server, results_link, '%s_%s (%d values)' % (res, count_type, len(chunk)), filename) os.remove(filename) links += chunk_link utils.stamped_msg("Transmitting test: " + res, "Stopped") first_results = '' last_results = '' full_results = '\nRETURN:<p style="font-size:smaller;">Details:<br>' lines = links.split('\n') for line in lines: if line == "": continue values = line.split(":") linkName = values[1] if linkName in ('tp_pbytes', 'tp_%cpu'): continue if float(values[2]) > 0: linkName += ": " + str(values[2]) url = url_format % (results_server, values[0]) link = link_format % (url, linkName) first_results = first_results + "\nRETURN:" + link + '<br>' else: url = url_format % (results_server, values[0]) link = link_format % (url, linkName) last_results = last_results + '| ' + link + ' ' full_results = first_results + full_results + last_results + '|</p>' print full_results | 3abf9f12e545975ecded085fff492caca1506b26 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12156/3abf9f12e545975ecded085fff492caca1506b26/run_tests.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1366,
67,
869,
67,
4660,
12,
4717,
67,
3567,
16,
1686,
67,
1232,
16,
2077,
16,
1509,
16,
4748,
67,
1425,
16,
1686,
4672,
268,
2147,
273,
2077,
880,
67,
2139,
273,
315,
2505,
23155,
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,
1366,
67,
869,
67,
4660,
12,
4717,
67,
3567,
16,
1686,
67,
1232,
16,
2077,
16,
1509,
16,
4748,
67,
1425,
16,
1686,
4672,
268,
2147,
273,
2077,
880,
67,
2139,
273,
315,
2505,
23155,
8... |
rpmfn = os.path.basename(l) base = conf.serverpkgdir[i] return base + '/' + rpmfn | if self.localrpmpath.has_key((name, arch)): return self.localrpmpath[(name, arch)] else: rpmfn = os.path.basename(l) base = conf.serverpkgdir[i] return base + '/' + rpmfn | def localRpmPath(self, name, arch=None): ((e,v,r,a,l,i),state) = self._get_data(name, arch) if state == None: return None if l == 'in_rpm_db': return l rpmfn = os.path.basename(l) base = conf.serverpkgdir[i] return base + '/' + rpmfn | b0a23b8bd2779adf2024df2174399d37c00fddc4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5445/b0a23b8bd2779adf2024df2174399d37c00fddc4/nevral.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1191,
54,
7755,
743,
12,
2890,
16,
508,
16,
6637,
33,
7036,
4672,
14015,
73,
16,
90,
16,
86,
16,
69,
16,
80,
16,
77,
3631,
2019,
13,
273,
365,
6315,
588,
67,
892,
12,
529,
16,
66... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1191,
54,
7755,
743,
12,
2890,
16,
508,
16,
6637,
33,
7036,
4672,
14015,
73,
16,
90,
16,
86,
16,
69,
16,
80,
16,
77,
3631,
2019,
13,
273,
365,
6315,
588,
67,
892,
12,
529,
16,
66... |
$(' | $('.version').text('%s'); | def apply_config(): version = 'ver %s (%s)'% (hotot.__version__, hotot.__codename__) exts_enabled = json.dumps(get_prefs('exts_enabled')) webv.execute_script(''' $('#version').text('%s'); ext.exts_enabled = %s; ''' % (version , exts_enabled)) apply_prefs() pass | 74eccfd09ddcbe622a677c0d056483bd548dcb1f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12179/74eccfd09ddcbe622a677c0d056483bd548dcb1f/agent.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2230,
67,
1425,
13332,
1177,
273,
296,
502,
738,
87,
6142,
87,
2506,
9,
261,
15224,
352,
16186,
1589,
972,
16,
12811,
352,
16186,
1559,
1069,
972,
13,
20793,
67,
5745,
273,
1163,
18,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2230,
67,
1425,
13332,
1177,
273,
296,
502,
738,
87,
6142,
87,
2506,
9,
261,
15224,
352,
16186,
1589,
972,
16,
12811,
352,
16186,
1559,
1069,
972,
13,
20793,
67,
5745,
273,
1163,
18,
1... |
ConditionalWriteFile('built/include/pandaVersion.h',conf); | ConditionalWriteFile(PREFIX+'/include/pandaVersion.h',conf) | #undef PANDA_OFFICIAL_VERSION | 4a71a3ad56d88a79d9aba6c9d9fa1abc8c3a885e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8543/4a71a3ad56d88a79d9aba6c9d9fa1abc8c3a885e/makepanda.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
468,
318,
536,
225,
453,
4307,
37,
67,
3932,
1653,
39,
6365,
67,
5757,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
468,
318,
536,
225,
453,
4307,
37,
67,
3932,
1653,
39,
6365,
67,
5757,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
paths = [ os.path.join(base, p) for p in ['..','libraries'] ] add_paths(paths, to_beginning=True) | add_path(os.path.join(ROBOTDIR, 'libraries'), to_beginning=True) add_path(PARENTDIR, to_beginning=True) if fnmatch.fnmatchcase(os.path.basename(PARENTDIR), 'robotframework-*.egg'): add_path(os.path.dirname(PARENTDIR), to_beginning=True) | def remove_path(path): path = norm_path(path) while path in sys.path: sys.path.remove(path) | b2ebefb3ebf0602f1b37020cde2082d7c1870e1c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6988/b2ebefb3ebf0602f1b37020cde2082d7c1870e1c/pythonpathsetter.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1206,
67,
803,
12,
803,
4672,
589,
273,
4651,
67,
803,
12,
803,
13,
1323,
589,
316,
2589,
18,
803,
30,
2589,
18,
803,
18,
4479,
12,
803,
13,
282,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1206,
67,
803,
12,
803,
4672,
589,
273,
4651,
67,
803,
12,
803,
13,
1323,
589,
316,
2589,
18,
803,
30,
2589,
18,
803,
18,
4479,
12,
803,
13,
282,
2,
-100,
-100,
-100,
-100,
-100,
-... |
user_pass = base64.encode_string(unquote(user_passw)).strip() req.addheader('Proxy-Authorization', user_pass) | user_pass = base64.encodestring(unquote(user_pass)).strip() req.add_header('Proxy-Authorization', 'Basic '+user_pass) | def proxy_open(self, req, proxy, type): orig_type = req.get_type() type, r_type = splittype(proxy) host, XXX = splithost(r_type) if '@' in host: user_pass, host = host.split('@', 1) user_pass = base64.encode_string(unquote(user_passw)).strip() req.addheader('Proxy-Authorization', user_pass) host = unquote(host) req.set_proxy(host, type) if orig_type == type: # let other handlers take care of it # XXX this only makes sense if the proxy is before the # other handlers return None else: # need to start over, because the other handlers don't # grok the proxy's URL type return self.parent.open(req) | 5bde527db1a7e1610cc6f794a0c0d6ce509f0e90 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/5bde527db1a7e1610cc6f794a0c0d6ce509f0e90/urllib2.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2889,
67,
3190,
12,
2890,
16,
1111,
16,
2889,
16,
618,
4672,
1647,
67,
723,
273,
1111,
18,
588,
67,
723,
1435,
618,
16,
436,
67,
723,
273,
1416,
723,
12,
5656,
13,
1479,
16,
11329,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2889,
67,
3190,
12,
2890,
16,
1111,
16,
2889,
16,
618,
4672,
1647,
67,
723,
273,
1111,
18,
588,
67,
723,
1435,
618,
16,
436,
67,
723,
273,
1416,
723,
12,
5656,
13,
1479,
16,
11329,
... |
def dump (self, file=None, header=1, deep=1): time_fmt = "%Y-%m-%d %H:%M:%S" ctime = strftime(time_fmt, localtime(self.__creation_time)) atime = strftime(time_fmt, localtime(self.__access_time)) if header: file.write('session %s:' % self.id) file.write(' user %s' % self.user) file.write(' __remote_address: %s' % self.__remote_address) file.write(' created %s, last accessed %s' % (ctime, atime)) file.write(' _form_tokens: %s\n' % self._form_tokens) | def dump (self, file=None, header=1, deep=1): time_fmt = "%Y-%m-%d %H:%M:%S" ctime = strftime(time_fmt, localtime(self.__creation_time)) atime = strftime(time_fmt, localtime(self.__access_time)) | 26d2ecde87643091805a7b214e68c325315efc1e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12027/26d2ecde87643091805a7b214e68c325315efc1e/session.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4657,
261,
2890,
16,
585,
33,
7036,
16,
1446,
33,
21,
16,
4608,
33,
21,
4672,
813,
67,
8666,
273,
2213,
61,
6456,
81,
6456,
72,
738,
44,
5319,
49,
5319,
55,
6,
276,
957,
273,
10405... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4657,
261,
2890,
16,
585,
33,
7036,
16,
1446,
33,
21,
16,
4608,
33,
21,
4672,
813,
67,
8666,
273,
2213,
61,
6456,
81,
6456,
72,
738,
44,
5319,
49,
5319,
55,
6,
276,
957,
273,
10405... | |
if not exporters.importing: | def AddExporter(self, exporter): if not exporters.importing: if exporter not in exporters.exporters: exporters.exporters.append(exporter) exporter.interface_file = exporters.current_interface | bdf80a683c2c8a6da29db1a5a8ec312f3c004038 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9978/bdf80a683c2c8a6da29db1a5a8ec312f3c004038/infos.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1436,
22305,
12,
2890,
16,
16204,
4672,
565,
309,
16204,
486,
316,
16204,
87,
18,
26444,
87,
30,
16204,
87,
18,
26444,
87,
18,
6923,
12,
26444,
13,
16204,
18,
5831,
67,
768,
273,
16204... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1436,
22305,
12,
2890,
16,
16204,
4672,
565,
309,
16204,
486,
316,
16204,
87,
18,
26444,
87,
30,
16204,
87,
18,
26444,
87,
18,
6923,
12,
26444,
13,
16204,
18,
5831,
67,
768,
273,
16204... | |
CHANGER_RESERVED_BIT = 0x80000000L CHANGER_PREDISMOUNT_ALIGN_TO_SLOT = 0x80000001L CHANGER_PREDISMOUNT_ALIGN_TO_DRIVE = 0x80000002L CHANGER_CLEANER_AUTODISMOUNT = 0x80000004L CHANGER_TRUE_EXCHANGE_CAPABLE = 0x80000008L CHANGER_SLOTS_USE_TRAYS = 0x80000010L CHANGER_RTN_MEDIA_TO_ORIGINAL_ADDR = 0x80000020L CHANGER_CLEANER_OPS_NOT_SUPPORTED = 0x80000040L CHANGER_IEPORT_USER_CONTROL_OPEN = 0x80000080L CHANGER_IEPORT_USER_CONTROL_CLOSE = 0x80000100L CHANGER_MOVE_EXTENDS_IEPORT = 0x80000200L CHANGER_MOVE_RETRACTS_IEPORT = 0x80000400L | CHANGER_RESERVED_BIT = 0x80000000 CHANGER_PREDISMOUNT_ALIGN_TO_SLOT = 0x80000001 CHANGER_PREDISMOUNT_ALIGN_TO_DRIVE = 0x80000002 CHANGER_CLEANER_AUTODISMOUNT = 0x80000004 CHANGER_TRUE_EXCHANGE_CAPABLE = 0x80000008 CHANGER_SLOTS_USE_TRAYS = 0x80000010 CHANGER_RTN_MEDIA_TO_ORIGINAL_ADDR = 0x80000020 CHANGER_CLEANER_OPS_NOT_SUPPORTED = 0x80000040 CHANGER_IEPORT_USER_CONTROL_OPEN = 0x80000080 CHANGER_IEPORT_USER_CONTROL_CLOSE = 0x80000100 CHANGER_MOVE_EXTENDS_IEPORT = 0x80000200 CHANGER_MOVE_RETRACTS_IEPORT = 0x80000400 | def DEVICE_TYPE_FROM_CTL_CODE(ctrlCode): return (ctrlCode & 0xffff0000L) >> 16 | a5e168c82a8f27171f14324614a0fe58633b3c87 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/677/a5e168c82a8f27171f14324614a0fe58633b3c87/winioctlcon.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
23996,
67,
2399,
67,
11249,
67,
1268,
48,
67,
5572,
12,
16277,
1085,
4672,
327,
261,
16277,
1085,
473,
374,
20431,
2787,
48,
13,
1671,
2872,
225,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
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,
23996,
67,
2399,
67,
11249,
67,
1268,
48,
67,
5572,
12,
16277,
1085,
4672,
327,
261,
16277,
1085,
473,
374,
20431,
2787,
48,
13,
1671,
2872,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
... |
navtrail_previous_links = bibformatadminlib.getnavtrail(''' > <a class=navtrail href="%s/admin/bibformat/bibformatadmin.py/format_templates_manage?ln=%s">%s </a>''' % (config.weburl, ln, _("Manage Output Formats"))) | navtrail_previous_links = bibformatadminlib.getnavtrail(''' > <a class="navtrail" href="%s/admin/bibformat/bibformatadmin.py/format_templates_manage?ln=%s">%s </a>''' % (config.weburl, ln, _("Manage Output Formats"))) | def output_format_show_dependencies(req, bfo, ln=config.cdslang): """ Show the dependencies of the given output format. @param ln language @param bfo the filename of the output format to show """ ln = wash_language(ln) _ = gettext_set_language(ln) navtrail_previous_links = bibformatadminlib.getnavtrail(''' > <a class=navtrail href="%s/admin/bibformat/bibformatadmin.py/format_templates_manage?ln=%s">%s </a>''' % (config.weburl, ln, _("Manage Output Formats"))) try: uid = getUid(req) except MySQLdb.Error, e: return error_page(req) (auth_code, auth_msg) = check_user(req, 'cfgbibformat') if not auth_code: bfo = wash_url_argument(bfo, 'str') if not bibformatadminlib.can_read_output_format(bfo): #No read permission return page(title=_("Restricted Output Format"), body = """You don't have permission to view this output format.""", language=ln, navtrail = navtrail_previous_links, errors = [("ERR_BIBFORMAT_CANNOT_READ_OUTPUT_FILE", bfo , "")], lastupdated=__lastupdated__, req=req) format_name = bibformat_engine.get_output_format_attrs(bfo)['names']['generic'] return page(title=_("Output Format %s Dependencies" % format_name), body=bibformatadminlib.perform_request_output_format_show_dependencies(bfo, ln=ln), uid=uid, language=ln, navtrail = navtrail_previous_links, lastupdated=__lastupdated__, req=req) else: return page_not_authorized(req=req, text=auth_msg) | f08fe81d00d74f462e6a931c4d621a61c821b5b1 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12027/f08fe81d00d74f462e6a931c4d621a61c821b5b1/bibformatadmin.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
876,
67,
2139,
67,
4500,
67,
11037,
12,
3658,
16,
324,
617,
16,
7211,
33,
1425,
18,
4315,
2069,
539,
4672,
3536,
9674,
326,
5030,
434,
326,
864,
876,
740,
18,
225,
632,
891,
7211,
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,
876,
67,
2139,
67,
4500,
67,
11037,
12,
3658,
16,
324,
617,
16,
7211,
33,
1425,
18,
4315,
2069,
539,
4672,
3536,
9674,
326,
5030,
434,
326,
864,
876,
740,
18,
225,
632,
891,
7211,
26... |
def fl_add_timer(type, x, y, w, h, label): """ fl_add_timer(type, x, y, w, h, label) -> object """ retval = _fl_add_timer(type, x, y, w, h, label) | def fl_add_timer(timer_type, x, y, w, h, label): """ fl_add_timer(timer_type, x, y, w, h, label) -> pObject """ retval = _fl_add_timer(timer_type, x, y, w, h, label) | def fl_add_timer(type, x, y, w, h, label): """ fl_add_timer(type, x, y, w, h, label) -> object """ retval = _fl_add_timer(type, x, y, w, h, label) return retval | 9942dac8ce2b35a1e43615a26fd8e7054ef805d3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2429/9942dac8ce2b35a1e43615a26fd8e7054ef805d3/xformslib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1183,
67,
1289,
67,
12542,
12,
12542,
67,
723,
16,
619,
16,
677,
16,
341,
16,
366,
16,
1433,
4672,
3536,
1183,
67,
1289,
67,
12542,
12,
12542,
67,
723,
16,
619,
16,
677,
16,
341,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1183,
67,
1289,
67,
12542,
12,
12542,
67,
723,
16,
619,
16,
677,
16,
341,
16,
366,
16,
1433,
4672,
3536,
1183,
67,
1289,
67,
12542,
12,
12542,
67,
723,
16,
619,
16,
677,
16,
341,
1... |
self.glpane.mode.change2ClipboardPage() | self.glpane.mode.propMgr.change2ClipboardPage() | def editPaste(self): if self.assy.shelf.members: env.history.message(greenmsg("Paste:")) if self.glpane.mode.modename != "DEPOSIT": | 7f00815a0d2e66c07a796dfbf84e37d4a095572b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11221/7f00815a0d2e66c07a796dfbf84e37d4a095572b/MWsemantics.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3874,
52,
14725,
12,
2890,
4672,
309,
365,
18,
428,
93,
18,
674,
19079,
18,
7640,
30,
1550,
18,
8189,
18,
2150,
12,
11571,
3576,
2932,
52,
14725,
2773,
3719,
309,
365,
18,
7043,
29009,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3874,
52,
14725,
12,
2890,
4672,
309,
365,
18,
428,
93,
18,
674,
19079,
18,
7640,
30,
1550,
18,
8189,
18,
2150,
12,
11571,
3576,
2932,
52,
14725,
2773,
3719,
309,
365,
18,
7043,
29009,... |
self.settings["CFLAGS"]="-O2 -mtune=G4 -maltivec -mabi=altivec -fno-strict-aliasing -pipe" | self.settings["CFLAGS"]="-O2 -mcpu=G4 -mtune=G4 -maltivec -mabi=altivec -fno-strict-aliasing -pipe" | def __init__(self,myspec): generic_ppc.__init__(self,myspec) self.settings["CFLAGS"]="-O2 -mtune=G4 -maltivec -mabi=altivec -fno-strict-aliasing -pipe" self.settings["HOSTUSE"]=["altivec"] | 7e86939d1a46a2f73dfb4fc7a8cd0046dde53dd7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7327/7e86939d1a46a2f73dfb4fc7a8cd0046dde53dd7/ppc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
81,
1900,
705,
4672,
5210,
67,
84,
2436,
16186,
2738,
972,
12,
2890,
16,
81,
1900,
705,
13,
365,
18,
4272,
9614,
8955,
6552,
55,
11929,
1546,
17,
51,
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,
1001,
2738,
972,
12,
2890,
16,
81,
1900,
705,
4672,
5210,
67,
84,
2436,
16186,
2738,
972,
12,
2890,
16,
81,
1900,
705,
13,
365,
18,
4272,
9614,
8955,
6552,
55,
11929,
1546,
17,
51,
2... |
"""Arguments: filename Outputs the multiple alignment to file 'filename'.""" | """Arguments: filename [minPairs] Outputs the multiple alignment to file 'filename'. If an integer minPairs is given, no sites aligned with less than that number of pairwise alignments, is reported.""" | def saveMultiAlign(self,arglist): """Arguments: filename Outputs the multiple alignment to file 'filename'.""" fname=arglist[0] if not hasattr(self,"malignment"): print "No multiple alignment to save!" return m="w" for i in self.malignment: if len(i)<2:continue if len(self.seq)>0: i.strAln(self.seq) Output.savealign(str(i)+"\n",fname,m) m="a" | 86edb6a3e978b0b9ac0e842570c16d50ddcbfab3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11674/86edb6a3e978b0b9ac0e842570c16d50ddcbfab3/Interface.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1923,
5002,
10044,
12,
2890,
16,
3175,
1098,
4672,
3536,
4628,
30,
1544,
306,
1154,
10409,
65,
26168,
326,
3229,
8710,
358,
585,
296,
3459,
10332,
971,
392,
3571,
1131,
10409,
353,
864,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1923,
5002,
10044,
12,
2890,
16,
3175,
1098,
4672,
3536,
4628,
30,
1544,
306,
1154,
10409,
65,
26168,
326,
3229,
8710,
358,
585,
296,
3459,
10332,
971,
392,
3571,
1131,
10409,
353,
864,
... |
kwds = '' | def _repr_(self, simplify=True): if simplify: return self.simplify()._repr_(simplify=False) else: kwds = '' args = ', '.join([x._repr_(simplify=simplify) for x in self._args]) if not self._kwds is None: kwds = ', '.join(["%s=%s" %(x, y) for x,y in self._kwds.iteritems()]) if kwds == '': return '%s(%s)' % (self._f._name, args) else: return '%s(%s, %s)' % (self._f._name, args, kwds) | a4685c6da478e62ddcc82716b5a2f537c37c8995 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/a4685c6da478e62ddcc82716b5a2f537c37c8995/calculus.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
12715,
67,
12,
2890,
16,
16499,
33,
5510,
4672,
309,
16499,
30,
327,
365,
18,
9812,
412,
1164,
1435,
6315,
12715,
67,
12,
9812,
412,
1164,
33,
8381,
13,
469,
30,
833,
273,
2265,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
12715,
67,
12,
2890,
16,
16499,
33,
5510,
4672,
309,
16499,
30,
327,
365,
18,
9812,
412,
1164,
1435,
6315,
12715,
67,
12,
9812,
412,
1164,
33,
8381,
13,
469,
30,
833,
273,
2265,
... | |
self.debug = self.cmd_channel.debug | def __init__(self, cmd_channel): asynchat.async_chat.__init__(self) self.cmd_channel = cmd_channel self.debug = self.cmd_channel.debug | 9823b54e0adb251c778ec0e5e7af765a3a25ec44 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3782/9823b54e0adb251c778ec0e5e7af765a3a25ec44/FTPServer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1797,
67,
4327,
4672,
487,
2515,
270,
18,
3810,
67,
10880,
16186,
2738,
972,
12,
2890,
13,
225,
365,
18,
4172,
67,
4327,
273,
1797,
67,
4327,
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,
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,
1797,
67,
4327,
4672,
487,
2515,
270,
18,
3810,
67,
10880,
16186,
2738,
972,
12,
2890,
13,
225,
365,
18,
4172,
67,
4327,
273,
1797,
67,
4327,
365,
18,
... | |
self.socket = socket.socket(self.address_family, self.socket_type) self.server_bind() self.server_activate() def server_bind(self): """Called by constructor to bind the socket. May be overridden. """ if self.allow_reuse_address: self.socket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) self.socket.bind(self.server_address) | def __init__(self, server_address, RequestHandlerClass): """Constructor. May be extended, do not override.""" self.server_address = server_address self.RequestHandlerClass = RequestHandlerClass self.socket = socket.socket(self.address_family, self.socket_type) self.server_bind() self.server_activate() | 31b1d2cf2952010fab0c20dd8e660867dc2ec703 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/31b1d2cf2952010fab0c20dd8e660867dc2ec703/SocketServer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1438,
67,
2867,
16,
25106,
797,
4672,
3536,
6293,
18,
225,
16734,
506,
7021,
16,
741,
486,
3849,
12123,
365,
18,
3567,
67,
2867,
273,
1438,
67,
2867,
365... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1438,
67,
2867,
16,
25106,
797,
4672,
3536,
6293,
18,
225,
16734,
506,
7021,
16,
741,
486,
3849,
12123,
365,
18,
3567,
67,
2867,
273,
1438,
67,
2867,
365... | |
if game.state.rembase: maxloop = game.state.rembase for loop in range(maxloop): if game.state.baseq[loop] == nq: game.state.baseq[loop] = game.state.baseq[game.state.rembase] game.state.baseq[game.state.rembase].invalidate() game.state.rembase -= 1 break | game.state.baseq = filter(lambda x: x != nq, game.state.baseq) game.state.rembase = len(game.state.baseq) | def supernova(induced, w=None): # star goes supernova num = 0; npdead = 0 nq = coord() if w != None: nq = w else: stars = 0 # Scheduled supernova -- select star # logic changed here so that we won't favor quadrants in top # left of universe for nq.x in range(GALSIZE): for nq.y in range(GALSIZE): stars += game.state.galaxy[nq.x][nq.y].stars if stars == 0: return # nothing to supernova exists num = randrange(stars) + 1 for nq.x in range(GALSIZE): for nq.y in range(GALSIZE): num -= game.state.galaxy[nq.x][nq.y].stars if num <= 0: break if num <=0: break if idebug: proutn("=== Super nova here?") if ja() == True: nq = game.quadrant if not nq == game.quadrant or game.justin: # it isn't here, or we just entered (treat as enroute) if communicating(): skip(1) prout(_("Message from Starfleet Command Stardate %.2f") % game.state.date) prout(_(" Supernova in Quadrant %s; caution advised.") % nq) else: ns = coord() # we are in the quadrant! num = randrange(game.state.galaxy[nq.x][nq.y].stars) + 1 for ns.x in range(QUADSIZE): for ns.y in range(QUADSIZE): if game.quad[ns.x][ns.y]==IHSTAR: num -= 1 if num==0: break if num==0: break skip(1) prouts(_("***RED ALERT! RED ALERT!")) skip(1) prout(_("***Incipient supernova detected at Sector %s") % ns) if (ns-game - sector).distance() <= 2.1**0.5: proutn(_("Emergency override attempts t")) prouts("***************") skip(1) stars() game.alldone = True # destroy any Klingons in supernovaed quadrant kldead = game.state.galaxy[nq.x][nq.y].klingons game.state.galaxy[nq.x][nq.y].klingons = 0 if nq == game.state.kscmdr: # did in the Supercommander! game.state.nscrem = game.state.kscmdr.x = game.state.kscmdr.y = game.isatb = 0 game.iscate = False unschedule(FSCMOVE) unschedule(FSCDBAS) survivors = filter(lambda w: w != nq, game.state.kcmdr) comkills = len(game.state.kcmdr) - len(survivors) game.state.kcmdr = survivors kldead -= comkills game.state.remcom -= comkills if game.state.remcom==0: unschedule(FTBEAM) game.state.remkl -= kldead # destroy Romulans and planets in supernovaed quadrant nrmdead = game.state.galaxy[nq.x][nq.y].romulans game.state.galaxy[nq.x][nq.y].romulans = 0 game.state.nromrem -= nrmdead # Destroy planets for loop in range(game.inplan): if game.state.planets[loop].w == nq: game.state.planets[loop].pclass = "destroyed" npdead += 1 # Destroy any base in supernovaed quadrant if game.state.rembase: maxloop = game.state.rembase for loop in range(maxloop): if game.state.baseq[loop] == nq: game.state.baseq[loop] = game.state.baseq[game.state.rembase] game.state.baseq[game.state.rembase].invalidate() game.state.rembase -= 1 break # If starship caused supernova, tally up destruction if induced: game.state.starkl += game.state.galaxy[nq.x][nq.y].stars game.state.basekl += game.state.galaxy[nq.x][nq.y].starbase game.state.nplankl += npdead # mark supernova in galaxy and in star chart if game.quadrant == nq or communicating(): game.state.galaxy[nq.x][nq.y].supernova = True # If supernova destroys last Klingons give special message if (game.state.remkl + game.state.remcom + game.state.nscrem)==0 and not nq == game.quadrant: skip(2) if not induced: prout(_("Lucky you!")) proutn(_("A supernova in %s has just destroyed the last Klingons.") % nq) finish(FWON) return # if some Klingons remain, continue or die in supernova if game.alldone: finish(FSNOVAED) return | ab4d7f5dd82fc30c4db6597dd6dd68b4dc33f98b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3176/ab4d7f5dd82fc30c4db6597dd6dd68b4dc33f98b/sst.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2240,
82,
16739,
12,
728,
26372,
16,
341,
33,
7036,
4672,
468,
10443,
13998,
2240,
82,
16739,
818,
273,
374,
31,
1130,
22097,
273,
374,
290,
85,
273,
2745,
1435,
309,
341,
480,
599,
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,
2240,
82,
16739,
12,
728,
26372,
16,
341,
33,
7036,
4672,
468,
10443,
13998,
2240,
82,
16739,
818,
273,
374,
31,
1130,
22097,
273,
374,
290,
85,
273,
2745,
1435,
309,
341,
480,
599,
30... |
""" fl_make_object(objclass, type, x, y, w, h, label, py_handle) -> object ref. | """ fl_make_object(objclass, type, x, y, w, h, label, py_handle) -> object | def fl_make_object(objclass, type, x, y, w, h, label, py_handle): """ fl_make_object(objclass, type, x, y, w, h, label, py_handle) -> object ref. """ c_handle = FL_HANDLEPTR(py_handle) retval = _fl_make_object(objclass, type, x, y, w, h, label, c_handle) _cfunc_refs[tmpval1] = c_handle return retval | 8765c710f695de392f6fc7c664c746ec98668b1d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2429/8765c710f695de392f6fc7c664c746ec98668b1d/xformslib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1183,
67,
6540,
67,
1612,
12,
2603,
1106,
16,
618,
16,
619,
16,
677,
16,
341,
16,
366,
16,
1433,
16,
2395,
67,
4110,
4672,
3536,
1183,
67,
6540,
67,
1612,
12,
2603,
1106,
16,
618,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1183,
67,
6540,
67,
1612,
12,
2603,
1106,
16,
618,
16,
619,
16,
677,
16,
341,
16,
366,
16,
1433,
16,
2395,
67,
4110,
4672,
3536,
1183,
67,
6540,
67,
1612,
12,
2603,
1106,
16,
618,
... |
self.activated = True | def onTaskOpened(self, plugin_api): self.activated = True if not self.checkTomboyPresent(): return False #NOTE: get_textview() only works in this function # (see GTG/core/plugins/api.py docs) self.textview = plugin_api.get_textview() self.addButtonToToolbar(plugin_api) self.convertTokensToWidgets() | 0a2e0df0f5d6a4abd70cf987933fe105e8e4dd7e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7036/0a2e0df0f5d6a4abd70cf987933fe105e8e4dd7e/tomboy.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
2174,
23115,
12,
2890,
16,
1909,
67,
2425,
4672,
309,
486,
365,
18,
1893,
56,
362,
1075,
93,
6351,
13332,
327,
1083,
468,
17857,
30,
336,
67,
955,
1945,
1435,
1338,
6330,
316,
333... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2174,
23115,
12,
2890,
16,
1909,
67,
2425,
4672,
309,
486,
365,
18,
1893,
56,
362,
1075,
93,
6351,
13332,
327,
1083,
468,
17857,
30,
336,
67,
955,
1945,
1435,
1338,
6330,
316,
333... | |
op = Operation("animation (%s) frame (%s) deletion" % \ (anim_name, t)) op.redo_callback_add(self._remove_time_point, t, anim_name, anim_frame) op.undo_callback_add( self._frame_readd, t, anim_name, saved_states, trans) self._operation_stack_cb(op) | def _timeremove_cb(self, obj, emission, source): t = float(source) anim_name = self.e.animation.name anim_frame = self.e.animation.state prog = "@%s@%.2f" % (anim_name, t) | 1b2034f9ef331c82253c8c9a298d71ea30046bfb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12343/1b2034f9ef331c82253c8c9a298d71ea30046bfb/animations.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
12542,
351,
841,
67,
7358,
12,
2890,
16,
1081,
16,
801,
19710,
16,
1084,
4672,
268,
273,
1431,
12,
3168,
13,
10536,
67,
529,
273,
365,
18,
73,
18,
30822,
18,
529,
10536,
67,
378... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
12542,
351,
841,
67,
7358,
12,
2890,
16,
1081,
16,
801,
19710,
16,
1084,
4672,
268,
273,
1431,
12,
3168,
13,
10536,
67,
529,
273,
365,
18,
73,
18,
30822,
18,
529,
10536,
67,
378... | |
sleep, smtpuser, smtppassword, use_tls): | smtpuser, smtppassword, use_tls): | def __send_message(smtpserver, from_addr, to_addr_list, msg, sleep, smtpuser, smtppassword, use_tls): """Message sending dispatcher. """ if smtpserver.startswith('/'): # Use the sendmail tool __send_message_sendmail(smtpserver, msg) else: # Use the SMTP server (we have host and port information) __send_message_smtp(smtpserver, from_addr, to_addr_list, msg, smtpuser, smtppassword, use_tls) # give recipients a chance of receiving patches in the correct order time.sleep(sleep) | 4a545fa1dd24bf0e23477b5e8afd2c5500bfe600 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12366/4a545fa1dd24bf0e23477b5e8afd2c5500bfe600/mail.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
4661,
67,
2150,
12,
20278,
3567,
16,
628,
67,
4793,
16,
358,
67,
4793,
67,
1098,
16,
1234,
16,
17660,
1355,
16,
17660,
3664,
16,
999,
67,
17116,
4672,
3536,
1079,
5431,
7393,
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,
4661,
67,
2150,
12,
20278,
3567,
16,
628,
67,
4793,
16,
358,
67,
4793,
67,
1098,
16,
1234,
16,
17660,
1355,
16,
17660,
3664,
16,
999,
67,
17116,
4672,
3536,
1079,
5431,
7393,
18,... |
(channel, target, nick, n, '\n'.join(self.logs[channel])), expect_id=True) | (channel, target, nick, n, '\n'.join(self.logs[channel])), expect_id=True) | def doKickban(self, irc, channel, nick, target, kickmsg = None): if not self.registryValue('enabled', channel): return n = now() id = self.db_run("INSERT INTO bans (channel, mask, operator, time, log) values(%s, %s, %s, %s, %s)", (channel, target, nick, n, '\n'.join(self.logs[channel])), expect_id=True) if kickmsg and id and not (kickmsg == nick): self.db_run("INSERT INTO comments (ban_id, who, comment, time) values(%s,%s,%s,%s)", (id, nick, kickmsg, n)) if channel not in self.bans: self.bans[channel] = [] self.bans[channel].append(Ban(mask=target, who=nick, when=time.mktime(time.gmtime()))) | 353e8a3cb6570f78f25b8d8c4070231630fbefe3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3106/353e8a3cb6570f78f25b8d8c4070231630fbefe3/plugin.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
47,
1200,
21515,
12,
2890,
16,
277,
1310,
16,
1904,
16,
10909,
16,
1018,
16,
23228,
3576,
273,
599,
4672,
309,
486,
365,
18,
9893,
620,
2668,
5745,
2187,
1904,
4672,
327,
290,
273... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
47,
1200,
21515,
12,
2890,
16,
277,
1310,
16,
1904,
16,
10909,
16,
1018,
16,
23228,
3576,
273,
599,
4672,
309,
486,
365,
18,
9893,
620,
2668,
5745,
2187,
1904,
4672,
327,
290,
273... |
cache.writemulti(cacheId, deps) | classInfo[cacheId] = deps self._writeClassCache(classInfo) | def transitiveDepsAreFresh(depsStruct, cacheModTime): if cacheModTime is None: # TODO: this can currently only occur with a Cache.memcache result return False for dep in depsStruct["load"]: if dep.requestor != self.id: # this was included through a recursive traversal if dep.name in self._classesObj: classObj = self._classesObj[dep.name] if cacheModTime < classObj.m_time(): console.debug("Invalidating dep cache for %s, as %s is newer" % (self.id, classObj.id)) return False return True | a1279da621ac20b7821dec8ec07f0f8f6cdff441 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5718/a1279da621ac20b7821dec8ec07f0f8f6cdff441/Class.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
30442,
14430,
4704,
42,
1955,
12,
14877,
3823,
16,
1247,
1739,
950,
4672,
309,
1247,
1739,
950,
353,
599,
30,
225,
468,
2660,
30,
333,
848,
4551,
1338,
3334,
598,
279,
4379,
18,
3917,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
30442,
14430,
4704,
42,
1955,
12,
14877,
3823,
16,
1247,
1739,
950,
4672,
309,
1247,
1739,
950,
353,
599,
30,
225,
468,
2660,
30,
333,
848,
4551,
1338,
3334,
598,
279,
4379,
18,
3917,
... |
sys.exit(0) | exit_status = 0 return | def __getattr__(self, attr): return getattr(self.file, attr) | 77a4a0b62f82e4ceaaaffa12224fa6d22e6e2873 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12817/77a4a0b62f82e4ceaaaffa12224fa6d22e6e2873/Main.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
588,
1747,
972,
12,
2890,
16,
1604,
4672,
327,
3869,
12,
2890,
18,
768,
16,
1604,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
588,
1747,
972,
12,
2890,
16,
1604,
4672,
327,
3869,
12,
2890,
18,
768,
16,
1604,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
h.status, h.priority, h.consultant, h.comments) | h.status, h.priority, h.consultant, comments) | def manageHelpDeskImport(self, hdpath='', REQUEST=None): """ Import data from an older version of HelpDeskAgent """ hd = self.unrestrictedTraverse(hdpath, None) if hd is not None: #import ref tables self.deleteIssuePriority(self.__issuepriority.keys()) for x in hd.getListIssuePriority(): o = IssuePriority(x.id, x.title, x.description, x.value) self.addIssuePriority(x.id, o) self.deleteIssueStatus(self.__issuestatus.keys()) for x in hd.getListIssueStatus(): o = IssueStatus(x.id, x.title, x.description, x.order) self.addIssueStatus(x.id, o) self.deleteIssueSendType(self.__issuesendtype.keys()) for x in hd.getListIssueSendType(): o = IssueSendType(x.id, x.title, x.description) self.addIssueSendType(x.id, o) self.deleteIssueCategory(self.__issuecategory.keys()) for x in hd.getListIssueCategory(): o = IssueCategory(x.id, x.title, x.description, x.priority, x.advice, x.advicelink, x.issuesconsultant) self.addIssueCategory(x.id, o) #import issues for issue in hd.getAllIssues(): ob = Issue.Issue(issue.id, issue.title, issue.date_open, issue.consultant, issue.user_name, issue.user_email, issue.user_phone, issue.subject, issue.category, issue.sendtype, issue.priority, issue.status, issue.description, issue.link, issue.security) self._setObject(issue.id, ob) ob = self._getOb(issue.id) ob.date_modify = issue.date_modify ob.data_close = issue.date_close ob.solution_time = issue.solution_time ob._Issue__issuecomment = {} ob._Issue__historycounter = issue._Issue__historycounter ob._Issue__issuehistory = {} #comments for c in issue.getListIssueComment(): cob = IssueComment(c.id, c.date, c.username, c.content_type, c.content) ob._Issue__issuecomment[c.id] = cob #history for h in issue.getListIssueHistory(): hob = IssueHistory(h.id, h.date, h.username, h.action, h.status, h.priority, h.consultant, h.comments) ob._Issue__issuehistory[h.id] = hob #attachements for x in issue.objectValues('File'): ob.manage_addFile(x.getId(), str(x.data), x.title, content_type=x.content_type) ob._p_changed = 1 self.CatalogIssue(ob) if REQUEST: REQUEST.RESPONSE.redirect('admin_html?pagetab=8') | 4ebbc91ee1c53df41cb3d19eca2e4dcffd934786 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3287/4ebbc91ee1c53df41cb3d19eca2e4dcffd934786/HelpDesk.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10680,
6696,
6305,
79,
5010,
12,
2890,
16,
15921,
803,
2218,
2187,
12492,
33,
7036,
4672,
3536,
6164,
501,
628,
392,
12156,
1177,
434,
11288,
6305,
79,
3630,
3536,
15921,
273,
365,
18,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10680,
6696,
6305,
79,
5010,
12,
2890,
16,
15921,
803,
2218,
2187,
12492,
33,
7036,
4672,
3536,
6164,
501,
628,
392,
12156,
1177,
434,
11288,
6305,
79,
3630,
3536,
15921,
273,
365,
18,
3... |
repository = None, extra_env = extra_env): | repository = None, extra_env = None): | def __init__(self, name, projects, revision, autogenargs='', | 9d52d189314355706cae2695667a42797fe19e14 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4596/9d52d189314355706cae2695667a42797fe19e14/mozillamodule.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
508,
16,
10137,
16,
6350,
16,
7608,
275,
1968,
2218,
2187,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
508,
16,
10137,
16,
6350,
16,
7608,
275,
1968,
2218,
2187,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
+ " Home : " + self.configuration.users.base_path + "/" + ProfilesList.profiles[profile]['primary_group'] + "\n" \ | + " Home : " + self.configuration.users.base_path + "\n" \ | def ExportCLI(self) : """ Export the user profiles list to human readable form. """ data = "" | 9c95c92c3217cdd4dd1577f04f77f5e841d45aa2 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7650/9c95c92c3217cdd4dd1577f04f77f5e841d45aa2/profiles.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11054,
7697,
12,
2890,
13,
294,
3536,
11054,
326,
729,
11788,
666,
358,
8672,
7471,
646,
18,
3536,
501,
273,
1408,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11054,
7697,
12,
2890,
13,
294,
3536,
11054,
326,
729,
11788,
666,
358,
8672,
7471,
646,
18,
3536,
501,
273,
1408,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
self._postText = text | self._postText.append(text) | def postArticle(self, text): log.msg('%s: postArticle()') self.sendLine('POST') self._newState(None, self.postFailed, self._headerPost) self._postText = text | 985ff3035a15b42df933b663791277355aa6409d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/985ff3035a15b42df933b663791277355aa6409d/nntp.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1603,
7880,
12,
2890,
16,
977,
4672,
613,
18,
3576,
29909,
87,
30,
1603,
7880,
1435,
6134,
365,
18,
4661,
1670,
2668,
3798,
6134,
365,
6315,
2704,
1119,
12,
7036,
16,
365,
18,
2767,
29... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1603,
7880,
12,
2890,
16,
977,
4672,
613,
18,
3576,
29909,
87,
30,
1603,
7880,
1435,
6134,
365,
18,
4661,
1670,
2668,
3798,
6134,
365,
6315,
2704,
1119,
12,
7036,
16,
365,
18,
2767,
29... |
k in " ".join(ctx.files()[3]).lower()): | k in " ".join(ctx.files()).lower()): | def getrenamed(fn, rev): '''looks up all renames for a file (up to endrev) the first time the file is given. It indexes on the changerev and only parses the manifest if linkrev != changerev. Returns rename info for fn at changerev rev.''' if fn not in rcache: rcache[fn] = {} ncache[fn] = {} fl = repo.file(fn) for i in fl: node = fl.node(i) lr = fl.linkrev(i) renamed = fl.renamed(node) rcache[fn][lr] = renamed if renamed: ncache[fn][node] = renamed if lr >= endrev: break if rev in rcache[fn]: return rcache[fn][rev] | e165ac277ab9f863df2614d6eac3ac8116e38222 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11312/e165ac277ab9f863df2614d6eac3ac8116e38222/commands.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
1187,
2808,
12,
4293,
16,
5588,
4672,
9163,
7330,
87,
731,
777,
1654,
753,
364,
279,
585,
261,
416,
358,
679,
9083,
13,
326,
1122,
813,
326,
585,
353,
864,
18,
2597,
5596,
603,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1187,
2808,
12,
4293,
16,
5588,
4672,
9163,
7330,
87,
731,
777,
1654,
753,
364,
279,
585,
261,
416,
358,
679,
9083,
13,
326,
1122,
813,
326,
585,
353,
864,
18,
2597,
5596,
603,
... |
if(logLevel != self.getEffectiveLevel()): | if (logLevel != self.getEffectiveLevel()): | def update_config(self, config_data): """Update logger's configuration. | 153b6b2c6735f83b37f8d94c65310ce1d7df6263 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6792/153b6b2c6735f83b37f8d94c65310ce1d7df6263/log.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
67,
1425,
12,
2890,
16,
642,
67,
892,
4672,
3536,
1891,
1194,
1807,
1664,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
67,
1425,
12,
2890,
16,
642,
67,
892,
4672,
3536,
1891,
1194,
1807,
1664,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
def finalize(self, colormap=None, colorbar=True): | def finalize(self, colorbar=True, **kwargs): | def finalize(self, colormap=None, colorbar=True): if self.image is None: raise ValueError, "nothing to finalize" | 5d9d4f27ec8d1356b4dfb95ceea7a26d5136659e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3592/5d9d4f27ec8d1356b4dfb95ceea7a26d5136659e/plotutils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12409,
12,
2890,
16,
20644,
33,
5510,
16,
2826,
4333,
4672,
309,
365,
18,
2730,
353,
599,
30,
1002,
2068,
16,
315,
30874,
358,
12409,
6,
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,
12409,
12,
2890,
16,
20644,
33,
5510,
16,
2826,
4333,
4672,
309,
365,
18,
2730,
353,
599,
30,
1002,
2068,
16,
315,
30874,
358,
12409,
6,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
self.status = error is None and 'PASS' or 'FAIL' | self.status = 'PASS' if not error else 'FAIL' | def run(self, output, namespace): self.starttime = utils.get_timestamp() output.start_keyword(self) try: self._run(output, namespace) except ExecutionFailed, err: error = err except DataError, err: msg = utils.unic(err) output.fail(msg) error = ExecutionFailed(msg) else: error = None self.status = error is None and 'PASS' or 'FAIL' self.endtime = utils.get_timestamp() self.elapsedtime = utils.get_elapsed_time(self.starttime, self.endtime) output.end_keyword(self) if error is not None: raise error | 0ec40629cd09b4a0b3bda8e23e0d6bc4cd28e4cb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7408/0ec40629cd09b4a0b3bda8e23e0d6bc4cd28e4cb/keywords.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
16,
876,
16,
1981,
4672,
365,
18,
1937,
957,
273,
2990,
18,
588,
67,
5508,
1435,
876,
18,
1937,
67,
11041,
12,
2890,
13,
775,
30,
365,
6315,
2681,
12,
2844,
16,
1981,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2890,
16,
876,
16,
1981,
4672,
365,
18,
1937,
957,
273,
2990,
18,
588,
67,
5508,
1435,
876,
18,
1937,
67,
11041,
12,
2890,
13,
775,
30,
365,
6315,
2681,
12,
2844,
16,
1981,... |
print bold("[error]: Value between 0 and 1") | print bold("> Error: Value between 0 and 1") | def e17_bshade(): import pyetun_bshade try: print "> Border Shade Options:" # border shade animate if pyetun_bshade.get_bshade() == "1": print bold_yellow("=> "), print "Border shade animation - ENABLED (1)" elif pyetun_bshade.get_bshade() == "0": print bold_yellow("=> "), print "Border shade animation - DISABLED (0)" #border shade transition print bold_yellow("=> "), print "Shading animation algorithm -", print pyetun_bshade.get_trans_alg() #shading speed (pixels/sec) print bold_yellow("=> "), print "Shading Speed -", print pyetun_bshade.get_shade_speed(), print "pixels/sec" #Options print bold_red("> Options: ") print bold_green("[B]ORDER SHADE ANIMATION <0/1>") print bold_green("[A]NIMATION ALGORITHM <value between 0 and 3>") print bold_green("[S]HADING SPEED <value>") print "> CTRL+C - Main Menu" valu=raw_input("Option: ") while 1: try: t=valu.split(" ") opt=t[0] value=t[1] except: print bold ("> Error: m00, wrong move! Try again..") e17_bshade() if opt=="b": try: value=int(value) if value>=0 and value<=1: pyetun_bshade.set_bshade(value) print bold("Done!") e17_bshade() else: print bold("[error]: Value between 0 and 1") e17_bshade() except ValueError: print bold("[error]: Value between 0 and 1") e17_bshade() elif opt=="a": try: value=int(value) if value>=0 and value<=3: pyetun_bshade.set_trans_alg(value) print bold("Done!") e17_bshade() else: print bold("[error]: Value between 0 and 1") e17_bshade() except ValueError: print bold("[error]: Value between 0 and 1") e17_bshade() elif opt=="s": try: value=float(value) pyetun_bshade.set_shade_speed(value) print bold("Done!") e17_bshade() except ValueError: print bold("[error]: Value must be a valid number") e17_bshade() else: print bold("[error] m000 wrong option!") e17_bshade() except KeyboardInterrupt: print "\nOops! exiting ;)" console() | 2dc56bf12f43e29753088b6cfaeea43096646f6a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2281/2dc56bf12f43e29753088b6cfaeea43096646f6a/pyetun.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
425,
4033,
67,
70,
674,
2486,
13332,
1930,
2395,
278,
318,
67,
70,
674,
2486,
775,
30,
1172,
14402,
13525,
2638,
2486,
5087,
2773,
225,
468,
5795,
699,
2486,
14671,
309,
2395,
278,
318,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
425,
4033,
67,
70,
674,
2486,
13332,
1930,
2395,
278,
318,
67,
70,
674,
2486,
775,
30,
1172,
14402,
13525,
2638,
2486,
5087,
2773,
225,
468,
5795,
699,
2486,
14671,
309,
2395,
278,
318,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.