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 |
|---|---|---|---|---|---|---|
path = os.path.split()[:-1] | path = os.path.split(path)[0] | def debug(*msg): _logger.debug(_logger_name+'DEBUG: '+' '.join(str(m) for m in msg)) | 3115470a02d038b53547bfcc5660552d7c343d2e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12438/3115470a02d038b53547bfcc5660552d7c343d2e/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1198,
30857,
3576,
4672,
389,
4901,
18,
4148,
24899,
4901,
67,
529,
6797,
9394,
30,
10058,
2418,
5701,
12,
701,
12,
81,
13,
364,
312,
316,
1234,
3719,
282,
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,
0,
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,
1198,
30857,
3576,
4672,
389,
4901,
18,
4148,
24899,
4901,
67,
529,
6797,
9394,
30,
10058,
2418,
5701,
12,
701,
12,
81,
13,
364,
312,
316,
1234,
3719,
282,
2,
-100,
-100,
-100,
-100,
-... |
def window_resized(self, widget, allocation): | def window_resized(self, widget, allocation): | def window_resized(self, widget, allocation): # Update the image size on window resize if the current image was last fit: | a4d6024d09d807bd2a142bf54daca1a7d1873c7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/a4d6024d09d807bd2a142bf54daca1a7d1873c7f/mirage.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2742,
67,
455,
1235,
12,
2890,
16,
3604,
16,
13481,
4672,
468,
2315,
326,
1316,
963,
603,
2742,
7041,
309,
326,
783,
1316,
1703,
1142,
4845,
30,
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,
2742,
67,
455,
1235,
12,
2890,
16,
3604,
16,
13481,
4672,
468,
2315,
326,
1316,
963,
603,
2742,
7041,
309,
326,
783,
1316,
1703,
1142,
4845,
30,
2,
-100,
-100,
-100,
-100,
-100,
-100,
... |
self.proxyPorts = map(int, map(string.strip, splitPorts)) | self.proxyPorts = map(_addressAndPort, splitPorts) | def __init__(self): """Initialises the State object that holds the state of the app. The default settings are read from Options.py and bayescustomize.ini and are then overridden by the command-line processing code in the __main__ code below.""" # Open the log file. if options.verbose: self.logFile = open('_pop3proxy.log', 'wb', 0) | b884f18ef56894a928978d545e419ddd51d55363 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6126/b884f18ef56894a928978d545e419ddd51d55363/pop3proxy.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
3536,
4435,
6141,
326,
3287,
733,
716,
14798,
326,
919,
434,
326,
595,
18,
1021,
805,
1947,
854,
855,
628,
5087,
18,
2074,
471,
324,
528,
742,
1192,
55... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4672,
3536,
4435,
6141,
326,
3287,
733,
716,
14798,
326,
919,
434,
326,
595,
18,
1021,
805,
1947,
854,
855,
628,
5087,
18,
2074,
471,
324,
528,
742,
1192,
55... |
self.StyleClearAll() | def SetNullSyntax(self): self.SetLexer(wx.stc.STC_LEX_NULL) self.SetKeyWords(0, "") self.StyleClearAll() self.StyleSetFontAttr(wx.stc.STC_STYLE_DEFAULT, 10, fontface, False, False, False) self.StyleSetSpec(wx.stc.STC_STYLE_DEFAULT, "") self.SetIndent(4) self.SetTabWidth(8) self.SetUseTabs(False) | 726b186b3fae58b601cf94096128acfbe1610d4b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11441/726b186b3fae58b601cf94096128acfbe1610d4b/editor.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1000,
2041,
8070,
12,
2890,
4672,
365,
18,
694,
13356,
12,
27226,
18,
334,
71,
18,
882,
39,
67,
21130,
67,
8560,
13,
365,
18,
30267,
7363,
12,
20,
16,
1408,
13,
365,
18,
2885,
694,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1000,
2041,
8070,
12,
2890,
4672,
365,
18,
694,
13356,
12,
27226,
18,
334,
71,
18,
882,
39,
67,
21130,
67,
8560,
13,
365,
18,
30267,
7363,
12,
20,
16,
1408,
13,
365,
18,
2885,
694,
... | |
attachments=None, charset=None): | Date=None, attachments=None, charset=None): | def __init__(self, To=None, From=None, Subject=None, Body=None, Html=None, attachments=None, charset=None): self.attachments = [] if attachments: for attachment in attachments: if isinstance(attachment, basestring): self.attachments.append((attachment, None)) else: try: filename, cid = attachment except (TypeError, IndexError): self.attachments.append((attachment, None)) else: self.attachments.append((filename, cid)) self.To = To """string or iterable""" self.From = From """string""" self.Subject = Subject self.Body = Body self.Html = Html self.charset = charset or 'us-ascii' | d3a31e4171988c9f5947cb209a2a8e81f0da2389 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12159/d3a31e4171988c9f5947cb209a2a8e81f0da2389/mailer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
2974,
33,
7036,
16,
6338,
33,
7036,
16,
9912,
33,
7036,
16,
5652,
33,
7036,
16,
5430,
33,
7036,
16,
2167,
33,
7036,
16,
10065,
33,
7036,
16,
4856,
33,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
2974,
33,
7036,
16,
6338,
33,
7036,
16,
9912,
33,
7036,
16,
5652,
33,
7036,
16,
5430,
33,
7036,
16,
2167,
33,
7036,
16,
10065,
33,
7036,
16,
4856,
33,
... |
show if the tv is locked or not | Informs you, when the xmltv-listings expires. Activate with: plugin.activate('idlebar.tv', level=20, args=(listings_threshold,)) listings_threshold must be a number in hours. For example if you put args=(12, ) then 12 hours befor your xmltv listings run out the tv icon will present a warning. Once your xmltv data is expired it will present a more severe warning. If no args are given then no warnings will be given. | def draw(self, (type, object), x, osd): if self.checkmail() > 0: return osd.draw_image(self.MAILIMAGE, (x, osd.y + 10, -1, -1))[0] else: return osd.draw_image(self.NO_MAILIMAGE, (x, osd.y + 10, -1, -1))[0] | d4bead8f4304ca81687cb0fe137a4c581dbf6103 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/d4bead8f4304ca81687cb0fe137a4c581dbf6103/idlebar.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3724,
12,
2890,
16,
261,
723,
16,
733,
3631,
619,
16,
1140,
72,
4672,
309,
365,
18,
1893,
4408,
1435,
405,
374,
30,
327,
1140,
72,
18,
9446,
67,
2730,
12,
2890,
18,
5535,
45,
2053,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3724,
12,
2890,
16,
261,
723,
16,
733,
3631,
619,
16,
1140,
72,
4672,
309,
365,
18,
1893,
4408,
1435,
405,
374,
30,
327,
1140,
72,
18,
9446,
67,
2730,
12,
2890,
18,
5535,
45,
2053,
... |
lang=False, update_tax=True, date_order=False): | lang=False, update_tax=True, date_order=False, packaging=False): | def product_id_change(self, cr, uid, ids, pricelist, product, qty=0, uom=False, qty_uos=0, uos=False, name='', partner_id=False, lang=False, update_tax=True, date_order=False): | 92ca3690bf4227ac77549ab3a875b7e2cf8bd8d2 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7339/92ca3690bf4227ac77549ab3a875b7e2cf8bd8d2/sale.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3017,
67,
350,
67,
3427,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
846,
335,
5449,
16,
3017,
16,
26667,
33,
20,
16,
582,
362,
33,
8381,
16,
26667,
67,
89,
538,
33,
20,
16,
582,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3017,
67,
350,
67,
3427,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
846,
335,
5449,
16,
3017,
16,
26667,
33,
20,
16,
582,
362,
33,
8381,
16,
26667,
67,
89,
538,
33,
20,
16,
582,
... |
c.bookmarkPage("P2_FITV",fitType="FitV",left=10*inch) | c.bookmarkPage("P2_FITV",fit="FitV",left=10*inch) | def test1(self): | b3e8a12158cd0879ec0ae788465c6732c3f6ea3f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/b3e8a12158cd0879ec0ae788465c6732c3f6ea3f/test_pdfgen_links.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
21,
12,
2890,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
21,
12,
2890,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
sqlite_setup_debug = True | sqlite_setup_debug = False | def detect_modules(self): # Ensure that /usr/local is always used add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') | 786df3f8cf03ebf870c59afb32547f187e45b5db /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8125/786df3f8cf03ebf870c59afb32547f187e45b5db/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,
527,
67,
1214,
67,
869,
67,
1098,
12,
2890,
18,
9576,
18,
12083,
67,
8291,
16,
1173,
13640,
19,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
527,
67,
1214,
67,
869,
67,
1098,
12,
2890,
18,
9576,
18,
12083,
67,
8291,
16,
1173,
13640,
19,
... |
if options.source is not None: parser.error('option --import not allowed in this context') if options.root is not None: parser.error('option --root not allowed in this context') | def start(parser, options, target): if options.source is not None: parser.error('option --import not allowed in this context') if options.root is not None: parser.error('option --root not allowed in this context') # Load the config config = RawConfigParser() config.add_section('instance') config.read(['%s/config.ini' % target]) # Load the root resource storage = FileStorage('%s/database.fs' % target) database = zodb.Database(storage) root_resource = database.get_resource('/') # Import the root class if is not the default if config.has_option('instance', 'root'): exec('import %s' % config.get('instance', 'root')) # Load the root handler and start the server metadata = root_resource.get_resource('.metadata') metadata = Metadata(metadata) format = metadata.get_property('format') root = Root.build_handler(root_resource, format=format) root.name = root.class_title # Start the server if options.port: port = options.port elif config.has_option('instance', 'port'): port = config.getint('instance', 'port') else: port = None server = Server(root, port=port, access_log='%s/access_log' % target, error_log='%s/error_log' % target, pid_file='%s/pid' % target) server.start() | fa68d086a1fe877a8ae1d77a6739a1d5a8a6179f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12681/fa68d086a1fe877a8ae1d77a6739a1d5a8a6179f/icms.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
787,
12,
4288,
16,
702,
16,
1018,
4672,
468,
4444,
326,
642,
642,
273,
6576,
809,
2678,
1435,
642,
18,
1289,
67,
3464,
2668,
1336,
6134,
642,
18,
896,
12,
3292,
9,
87,
19,
1425,
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,
787,
12,
4288,
16,
702,
16,
1018,
4672,
468,
4444,
326,
642,
642,
273,
6576,
809,
2678,
1435,
642,
18,
1289,
67,
3464,
2668,
1336,
6134,
642,
18,
896,
12,
3292,
9,
87,
19,
1425,
18,
... | |
cmds.append('CXXFLAGS="$CFLAGS"') cmds.append(" for x in cmds: mylines.insert(pos,x+"\n") pos += 1 myconf=open(self.settings["chroot_path"]+"/etc/make.conf","w") myconf.write(string.join(mylines)) myconf.close() | myf.write('CXXFLAGS="$CFLAGS"\n') myf.close() | def chroot_setup(self): cmd("cp /etc/resolv.conf "+self.settings["chroot_path"]+"/etc","Could not copy resolv.conf into place.") myconf=open(self.settings["chroot_path"]+"/etc/make.conf","r") mylines=myconf.readlines() myconf.close() pos = 0 while pos < len(mylines): if mylines[pos][:16]=="# catalyst start": while (pos < len(mylines)) and mylines[pos][:14]!="# catalyst end": del mylines[pos] elif (mylines[pos][:7]=="CFLAGS=") or (mylines[pos][:6]=="CHOST=") or (mylines[pos][:4]=="USE="): mylines[pos]="#"+mylines[pos] pos += 1 pos = 0 while (pos < len(mylines)) and mylines[pos][0]=="#": pos += 1 cmds=["","# catalyst start","# These settings were added by the catalyst build script that automatically built this stage", 'CFLAGS="'+self.settings["CFLAGS"]+'"', 'CHOST="'+self.settings["CHOST"]+'"'] myusevars=[] if self.settings.has_key("HOSTUSE"): myusevars.extend(self.settings["HOSTUSE"]) if self.settings["target"]=="grp": myusevars.append("bindist") myusevars.extend(self.settings["grp/use"]) cmds.append('USE="'+string.join(myusevars)+'"') if self.settings.has_key("CXXFLAGS"): cmds.append('CXXFLAGS="'+self.settings["CXXFLAGS"]+'"') else: cmds.append('CXXFLAGS="$CFLAGS"') cmds.append("# catalyst end") | bad3d1e6291a9229e051d32beff05fcf0601c302 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7327/bad3d1e6291a9229e051d32beff05fcf0601c302/targets.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
462,
3085,
67,
8401,
12,
2890,
4672,
1797,
2932,
4057,
342,
14175,
19,
7818,
90,
18,
3923,
13773,
2890,
18,
4272,
9614,
343,
3085,
67,
803,
6,
3737,
6,
19,
14175,
15937,
4445,
486,
161... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
462,
3085,
67,
8401,
12,
2890,
4672,
1797,
2932,
4057,
342,
14175,
19,
7818,
90,
18,
3923,
13773,
2890,
18,
4272,
9614,
343,
3085,
67,
803,
6,
3737,
6,
19,
14175,
15937,
4445,
486,
161... |
self.n = self.crd.readline().split()[0] | self.n, self.time = self.crd.readline().split() | def getXyz( self ): """ Get coordinate array. @return: coordinates, N.array( N x 3, 'f') @rtype: array @raise ParseError: if can't interprete second line """ if not self.xyz: | 6561fff7ef3f1bdce874a4f2653fa69f6a6cb913 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/482/6561fff7ef3f1bdce874a4f2653fa69f6a6cb913/AmberRstParser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6538,
93,
94,
12,
365,
262,
30,
3536,
968,
7799,
526,
18,
225,
632,
2463,
30,
5513,
16,
423,
18,
1126,
12,
423,
619,
890,
16,
296,
74,
6134,
632,
86,
723,
30,
526,
225,
632,
11628,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6538,
93,
94,
12,
365,
262,
30,
3536,
968,
7799,
526,
18,
225,
632,
2463,
30,
5513,
16,
423,
18,
1126,
12,
423,
619,
890,
16,
296,
74,
6134,
632,
86,
723,
30,
526,
225,
632,
11628,... |
[("MyInBuffer", 'inDataPtr', "InMode")]) | [("MyInBuffer", 'inDataPtr', "InMode")]), ([("Boolean", 'ioWasInRgn', "OutMode")], [("Boolean", 'ioWasInRgn', "InOutMode")]), | def makerepairinstructions(self): return [ ([("UInt32", 'inSize', "InMode"), ("void_ptr", 'inDataPtr', "InMode")], [("MyInBuffer", 'inDataPtr', "InMode")]) ] | d0852a006811d8fa9ee5e9e2578c831d0ff162ec /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/d0852a006811d8fa9ee5e9e2578c831d0ff162ec/CarbonEvtscan.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
29796,
822,
6017,
25758,
12,
2890,
4672,
327,
306,
23265,
2932,
14342,
1578,
3113,
296,
267,
1225,
2187,
315,
382,
2309,
6,
3631,
7566,
6459,
67,
6723,
3113,
296,
267,
751,
5263,
2187,
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,
29796,
822,
6017,
25758,
12,
2890,
4672,
327,
306,
23265,
2932,
14342,
1578,
3113,
296,
267,
1225,
2187,
315,
382,
2309,
6,
3631,
7566,
6459,
67,
6723,
3113,
296,
267,
751,
5263,
2187,
3... |
a = self.model.index(0,0, QtCore.QModelIndex()) b = self.model.index(0,0, QtCore.QModelIndex()) assert(a==b) | idx1 = self.model.index(0, 0, QtCore.QModelIndex()) idx2 = self.model.index(0, 0, QtCore.QModelIndex()) assert(idx1==idx2) | def index(self): """ Tests self.model's implementation of QtCore.QAbstractItemModel::index() """ # Make sure that invalid values returns an invalid index assert(self.model.index(-2,-2, QtCore.QModelIndex()) == QtCore.QModelIndex()) assert(self.model.index(-2,0, QtCore.QModelIndex()) == QtCore.QModelIndex()) assert(self.model.index(0,-2, QtCore.QModelIndex()) == QtCore.QModelIndex()) | ed4ea4fec39587cca2aeb18d36a0fa5f722ca150 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1679/ed4ea4fec39587cca2aeb18d36a0fa5f722ca150/modeltest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
770,
12,
2890,
4672,
3536,
7766,
87,
365,
18,
2284,
1807,
4471,
434,
20193,
18,
53,
7469,
1180,
1488,
2866,
1615,
1435,
3536,
468,
4344,
3071,
716,
2057,
924,
1135,
392,
2057,
770,
1815,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
770,
12,
2890,
4672,
3536,
7766,
87,
365,
18,
2284,
1807,
4471,
434,
20193,
18,
53,
7469,
1180,
1488,
2866,
1615,
1435,
3536,
468,
4344,
3071,
716,
2057,
924,
1135,
392,
2057,
770,
1815,... |
var.type().to_plaintext().strip().lower() == 'none'): | var.type().to_plaintext(None).strip().lower() == 'none'): | def _check_var(self, var, name, check_type=1): """ Run checks on the variable whose documentation is C{var} and whose name is C{name}. @param var: The documentation for the variable to check. @type var: L{Var} @param name: The name of the variable to check. @type name: C{string} @param check_type: Whether or not the variable's type should be checked. This is used to allow varargs and keyword parameters to have no type specified. @rtype: C{None} """ if not self._check_name_publicity(name): return if var == None: return if not self._check_name_publicity(var.name()): return if var.name() == 'return': if (var.type() and var.type().to_plaintext().strip().lower() == 'none'): return if (self._checks & DocChecker.DESCR) and (not var.descr()): self._warn('No descr', name+'.'+var.name()) if ((self._checks & DocChecker.TYPE) and (not var.type()) and check_type): self._warn('No type', name+'.'+var.name()) | 72f5f8055b4b8b2c2b558e5b0139a8065ee85076 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11420/72f5f8055b4b8b2c2b558e5b0139a8065ee85076/checker.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1893,
67,
1401,
12,
2890,
16,
569,
16,
508,
16,
866,
67,
723,
33,
21,
4672,
3536,
1939,
4271,
603,
326,
2190,
8272,
7323,
353,
385,
95,
1401,
97,
471,
8272,
508,
353,
385,
95,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1893,
67,
1401,
12,
2890,
16,
569,
16,
508,
16,
866,
67,
723,
33,
21,
4672,
3536,
1939,
4271,
603,
326,
2190,
8272,
7323,
353,
385,
95,
1401,
97,
471,
8272,
508,
353,
385,
95,
... |
if crash_exception: print("Fatal: " + str(crash_exception)) if arg.debug or arg.clean: raise crash_exception else: print("A traceback has been saved to " + dumpname) print("Please include it in a bugreport.") | if crash_traceback: print(crash_traceback) print("Ranger crashed. " \ "Please report it (including the traceback) at:") print("http://savannah.nongnu.org/bugs/?group=ranger&func=additem") | def print_function(string): print(string) | 2749081931a2c86cac2b8e37920006843f06e246 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5729/2749081931a2c86cac2b8e37920006843f06e246/__main__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1172,
67,
915,
12,
1080,
4672,
1172,
12,
1080,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1172,
67,
915,
12,
1080,
4672,
1172,
12,
1080,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
self.check_sizeof(s, basicsize,\ size2=basicsize + sys.getsizeof(str(s))) | check(s, basicsize, size2=basicsize + sys.getsizeof(str(s))) | def test_specialtypes(self): h = self.header size = self.calcsize # dict self.check_sizeof({}, size(h + '3P2P') + 8*size('P2P')) longdict = {1:1, 2:2, 3:3, 4:4, 5:5, 6:6, 7:7, 8:8} self.check_sizeof(longdict, size(h + '3P2P') + (8+16)*size('P2P')) # unicode usize = len(u'\0'.encode('unicode-internal')) samples = [u'', u'1'*100] # we need to test for both sizes, because we don't know if the string # has been cached for s in samples: basicsize = size(h + 'PPlP') + usize * (len(s) + 1) self.check_sizeof(s, basicsize,\ size2=basicsize + sys.getsizeof(str(s))) # XXX trigger caching encoded version as Python string s = samples[1] try: getattr(sys, s) except AttributeError: pass finally: self.check_sizeof(s, basicsize + sys.getsizeof(str(s))) | d2cd86ddd5c3d90911a98a1440563118297e45db /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8546/d2cd86ddd5c3d90911a98a1440563118297e45db/test_sys.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
9371,
2352,
12,
2890,
4672,
366,
273,
365,
18,
3374,
963,
273,
365,
18,
12448,
1467,
468,
2065,
365,
18,
1893,
67,
1467,
792,
23506,
16,
963,
12,
76,
397,
296,
23,
52,
22,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
9371,
2352,
12,
2890,
4672,
366,
273,
365,
18,
3374,
963,
273,
365,
18,
12448,
1467,
468,
2065,
365,
18,
1893,
67,
1467,
792,
23506,
16,
963,
12,
76,
397,
296,
23,
52,
22,
... |
if not account.enabled: | if account is not None and not account.enabled: | def _set_default_account(self, account): if not account.enabled: raise ValueError("account %s is not enabled" % account.id) settings = SIPSimpleSettings() old_account = self.accounts.get(settings.default_account, None) if account is old_account: return if account is None: settings.default_account = None else: settings.default_account = account.id settings.save() notification_center = NotificationCenter() notification_center.post_notification('SIPAccountManagerDidChangeDefaultAccount', sender=self, data=TimestampedNotificationData(old_account=old_account, account=account)) | 37cb2792bdbae80d844638de0c4619c5bbfc1c3d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5703/37cb2792bdbae80d844638de0c4619c5bbfc1c3d/account.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
542,
67,
1886,
67,
4631,
12,
2890,
16,
2236,
4672,
309,
2236,
353,
486,
599,
471,
486,
2236,
18,
5745,
30,
1002,
2068,
2932,
4631,
738,
87,
353,
486,
3696,
6,
738,
2236,
18,
350... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
542,
67,
1886,
67,
4631,
12,
2890,
16,
2236,
4672,
309,
2236,
353,
486,
599,
471,
486,
2236,
18,
5745,
30,
1002,
2068,
2932,
4631,
738,
87,
353,
486,
3696,
6,
738,
2236,
18,
350... |
long_description=" | long_description=""" | def non_matching_config(): print "*** The version of your configuration template does not match" print "*** the version of the setup script. Please re-run configure." sys.exit(1) | 47699a41081e57df29390c4894fd9f93d5863e4f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10081/47699a41081e57df29390c4894fd9f93d5863e4f/setup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1661,
67,
16271,
67,
1425,
13332,
1172,
315,
14465,
1021,
1177,
434,
3433,
1664,
1542,
1552,
486,
845,
6,
1172,
315,
14465,
326,
1177,
434,
326,
3875,
2728,
18,
7801,
283,
17,
2681,
5068... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1661,
67,
16271,
67,
1425,
13332,
1172,
315,
14465,
1021,
1177,
434,
3433,
1664,
1542,
1552,
486,
845,
6,
1172,
315,
14465,
326,
1177,
434,
326,
3875,
2728,
18,
7801,
283,
17,
2681,
5068... |
self.id = self.utGenerateUID() | ut = utils() self.id = ut.utGenerateUID() | def __init__(self, start, end, current, institution): self.id = self.utGenerateUID() self.start = start self.end = end self.current = current self.institution = institution | 5f7a4e8b46bc1ada79828041f8381a1253054a88 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3287/5f7a4e8b46bc1ada79828041f8381a1253054a88/expert_item.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
787,
16,
679,
16,
783,
16,
1804,
305,
1421,
4672,
5218,
273,
2990,
1435,
365,
18,
350,
273,
5218,
18,
322,
4625,
3060,
1435,
365,
18,
1937,
273,
787,
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,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
787,
16,
679,
16,
783,
16,
1804,
305,
1421,
4672,
5218,
273,
2990,
1435,
365,
18,
350,
273,
5218,
18,
322,
4625,
3060,
1435,
365,
18,
1937,
273,
787,
3... |
elif valueInListOfDict(self.standardQMenuItem,'clean name',cleanline): | elif valueInListOfDict(self.allSaveMenuItemsRequiringFilename+ \ self.allSaveButtonsRequiringFilename,'clean name',cleanline): | def testMacroValidity(self,filename): specialMacroMarkups = ['end loop'] | abae46ac242a5c403d574eba08c1a66f400ce23b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8973/abae46ac242a5c403d574eba08c1a66f400ce23b/MacroMode.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
17392,
19678,
12,
2890,
16,
3459,
4672,
4582,
17392,
13111,
87,
273,
10228,
409,
2798,
3546,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
17392,
19678,
12,
2890,
16,
3459,
4672,
4582,
17392,
13111,
87,
273,
10228,
409,
2798,
3546,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
handle = Entrez.efetch(db="nucleotide", id="57240072", rettype="genbank") | handle = Entrez.efetch(db="nucleotide", id="57240072", rettype="gb") | def efetch(db, cgi=None, **keywds): """Fetches Entrez results which are returned as a handle. EFetch retrieves records in the requested format from a list of one or more UIs or from user's environment. See the online documentation for an explanation of the parameters: http://www.ncbi.nlm.nih.gov/entrez/query/static/efetch_help.html Return a handle to the results. Raises an IOError exception if there's a network error. Short example: from Bio import Entrez handle = Entrez.efetch(db="nucleotide", id="57240072", rettype="genbank") print handle.read() """ if cgi: import warnings warnings.warn("Using a URL other than NCBI's main url for the E-Utilities is deprecated.", DeprecationWarning) cgi='http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi' variables = {'db' : db} variables.update(keywds) return _open(cgi, variables) | b216cf6c7b682e369219ab48022ffe97bc65d111 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7167/b216cf6c7b682e369219ab48022ffe97bc65d111/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
425,
5754,
12,
1966,
16,
276,
10052,
33,
7036,
16,
2826,
856,
91,
2377,
4672,
3536,
14288,
512,
496,
266,
94,
1686,
1492,
854,
2106,
487,
279,
1640,
18,
225,
512,
5005,
9023,
3853,
316... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
425,
5754,
12,
1966,
16,
276,
10052,
33,
7036,
16,
2826,
856,
91,
2377,
4672,
3536,
14288,
512,
496,
266,
94,
1686,
1492,
854,
2106,
487,
279,
1640,
18,
225,
512,
5005,
9023,
3853,
316... |
if (ASSERT_FLAG && !(${{cvec[0]}})) { | if (!(${{cvec[0]}})) { | def generate(self, code): machine = self.state_machine | 7e42b753e7cc03bf7271dfc98e69aa56973df9ba /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6787/7e42b753e7cc03bf7271dfc98e69aa56973df9ba/FuncCallExprAST.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2103,
12,
2890,
16,
981,
4672,
5228,
273,
365,
18,
2019,
67,
9149,
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,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2103,
12,
2890,
16,
981,
4672,
5228,
273,
365,
18,
2019,
67,
9149,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
'state' : lambda * a : 'draft' | 'state': 'draft' | def create_period(self,cr, uid, ids, context={}, interval=0, name='Daily'): for p in self.browse(cr, uid, ids, context): dt = p.date_start ds = mx.DateTime.strptime(p.date_start, '%Y-%m-%d') while ds.strftime('%Y-%m-%d')<p.date_stop: de = ds + RelativeDateTime(days=interval, minutes =-1) if name=='Daily': new_name=de.strftime('%Y-%m-%d') if name=="Weekly": new_name=de.strftime('%Y, week %W') self.pool.get('stock.period').create(cr, uid, { 'name': new_name, 'date_start': ds.strftime('%Y-%m-%d'), 'date_stop': de.strftime('%Y-%m-%d %H:%M:%S'), }) ds = ds + RelativeDateTime(days=interval) + 1 return { 'view_type': 'form', "view_mode": 'tree', 'res_model': 'stock.period', 'type': 'ir.actions.act_window', } | 6a21b5d661b74602c870fac41f3c8c42e8bc6c33 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/6a21b5d661b74602c870fac41f3c8c42e8bc6c33/stock_planning.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
67,
6908,
12,
2890,
16,
3353,
16,
4555,
16,
3258,
16,
819,
28793,
3673,
33,
20,
16,
508,
2218,
40,
12857,
11,
4672,
364,
293,
316,
365,
18,
25731,
12,
3353,
16,
4555,
16,
3258,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
67,
6908,
12,
2890,
16,
3353,
16,
4555,
16,
3258,
16,
819,
28793,
3673,
33,
20,
16,
508,
2218,
40,
12857,
11,
4672,
364,
293,
316,
365,
18,
25731,
12,
3353,
16,
4555,
16,
3258,
... |
if version > 7.0: self.set_macro("FrameworkSDKDir", net, "sdkinstallrootv1.1") else: self.set_macro("FrameworkSDKDir", net, "sdkinstallroot") | try: if version > 7.0: self.set_macro("FrameworkSDKDir", net, "sdkinstallrootv1.1") else: self.set_macro("FrameworkSDKDir", net, "sdkinstallroot") except KeyError, exc: raise DistutilsPlatformError, \ ("The .NET Framework SDK needs to be installed before " "building extensions for Python.") | def load_macros(self, version): vsbase = r"Software\Microsoft\VisualStudio\%0.1f" % version self.set_macro("VCInstallDir", vsbase + r"\Setup\VC", "productdir") self.set_macro("VSInstallDir", vsbase + r"\Setup\VS", "productdir") net = r"Software\Microsoft\.NETFramework" self.set_macro("FrameworkDir", net, "installroot") if version > 7.0: self.set_macro("FrameworkSDKDir", net, "sdkinstallrootv1.1") else: self.set_macro("FrameworkSDKDir", net, "sdkinstallroot") | dbe9df771b52068510777bb73fbdcf6915e2aa80 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/dbe9df771b52068510777bb73fbdcf6915e2aa80/msvccompiler.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1262,
67,
5821,
6973,
12,
2890,
16,
1177,
4672,
6195,
1969,
273,
436,
6,
21742,
64,
22350,
64,
25780,
510,
4484,
64,
9,
20,
18,
21,
74,
6,
738,
1177,
365,
18,
542,
67,
26448,
2932,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5821,
6973,
12,
2890,
16,
1177,
4672,
6195,
1969,
273,
436,
6,
21742,
64,
22350,
64,
25780,
510,
4484,
64,
9,
20,
18,
21,
74,
6,
738,
1177,
365,
18,
542,
67,
26448,
2932,
... |
sys.stderr.write("Warning: Undefined behaviour for start tag %s"%name) | def startTagNew(self, name, attributes): """New HTML5 elements, "event-source", "section", "nav", "article", "aside", "header", "footer", "datagrid", "command" """ sys.stderr.write("Warning: Undefined behaviour for start tag %s"%name) self.startTagOther(name, attributes) #raise NotImplementedError | 8a4c71b84ea2ac869752973f5ff2eebb8dc2b06d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9368/8a4c71b84ea2ac869752973f5ff2eebb8dc2b06d/html5parser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
787,
1805,
1908,
12,
2890,
16,
508,
16,
1677,
4672,
3536,
1908,
3982,
25,
2186,
16,
315,
2575,
17,
3168,
3113,
315,
3464,
3113,
315,
11589,
3113,
315,
11480,
3113,
315,
345,
831,
3113,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1805,
1908,
12,
2890,
16,
508,
16,
1677,
4672,
3536,
1908,
3982,
25,
2186,
16,
315,
2575,
17,
3168,
3113,
315,
3464,
3113,
315,
11589,
3113,
315,
11480,
3113,
315,
345,
831,
3113,
... | |
self.timer_inc = gtk.timeout_add(self.ballinc, self.ball_move) | self.timer_inc = gobject.timeout_add(self.ballinc, self.ball_move) | def timer_inc_display(self): | 47c7b2de69f2ef74a5ccace1a52699180780bde1 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11306/47c7b2de69f2ef74a5ccace1a52699180780bde1/ballcatch.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5441,
67,
9523,
67,
5417,
12,
2890,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5441,
67,
9523,
67,
5417,
12,
2890,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
self.wpa_driver) liface = wnettools.WiredInterface(self.wired_interface) | self.debug, self.wpa_driver) liface = wnettools.WiredInterface(self.wired_interface, self.debug) | def run(self): """ The main function of the connection thread. | e2069a353a320cc778dfcd6dc5a382cfad0eed64 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/353/e2069a353a320cc778dfcd6dc5a382cfad0eed64/networking.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
4672,
3536,
1021,
2774,
445,
434,
326,
1459,
2650,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
4672,
3536,
1021,
2774,
445,
434,
326,
1459,
2650,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
height = 1/4*printHeight | height = min(1/4*printHeight, h * inch/100) | def writeParagraph(self,obj): txt = [] elements = [] for node in obj: x = self.write(node) if isInline(x): txt.extend(x) else: _txt = ''.join(txt) if len(_txt.strip()) > 0: elements.append(Paragraph(''.join(txt),p_style)) #filter txt = [] elements.extend(x) | 59b0374c3cfd6c96acae89b405f9f96df713fcec /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12390/59b0374c3cfd6c96acae89b405f9f96df713fcec/rlwriter.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
17719,
12,
2890,
16,
2603,
4672,
6463,
273,
5378,
2186,
273,
5378,
364,
756,
316,
1081,
30,
619,
273,
365,
18,
2626,
12,
2159,
13,
309,
8048,
1369,
12,
92,
4672,
6463,
18,
14313,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
17719,
12,
2890,
16,
2603,
4672,
6463,
273,
5378,
2186,
273,
5378,
364,
756,
316,
1081,
30,
619,
273,
365,
18,
2626,
12,
2159,
13,
309,
8048,
1369,
12,
92,
4672,
6463,
18,
14313,... |
n.setAttribute("parent:connect", "%s:%d" % (connector.host, str(connector.portno))) | n.setAttribute("parent:connect", "%s:%d" % (connector.host, connector.portno)) | def jellyToDOM_1(self, jellier, node): if hasattr(self, 'uid'): node.setAttribute("uid", str(self.uid)) node.setAttribute("gid", str(self.gid)) node.setAttribute("name", self.name) tcpnode = jellier.document.createElement("tcp") node.appendChild(tcpnode) svcnode = jellier.document.createElement("services") node.appendChild(svcnode) delaynode = jellier.document.createElement("delayeds") node.appendChild(delaynode) authnode = jellier.document.createElement("authorizer") node.appendChild(authnode) for svc in self.services.values(): svcnode.appendChild(jellier.jellyToNode(svc)) for port, factory, backlog, interface in self.tcpPorts: n = jellier.jellyToNode(factory) n.setAttribute("parent:listen", str(port)) if backlog != 5: n.setAttribute("parent:backlog", str(backlog)) if interface != '': n.setAttribute("parent:interface", str(interface)) tcpnode.appendChild(n) for connector in self.connectors: n = jellier.jellyToNode(connector.factory) n.setAttribute("parent:connect", "%s:%d" % (connector.host, str(connector.portno))) if connector.timeout != 30: n.setAttribute("parent:timeout", connector.timeout) tcpnode.appendChild(n) for delayed in self.delayeds: n = jellier.jellyToNode(delayed) delaynode.appendChild(n) authnode.appendChild(jellier.jellyToNode(self.authorizer)) | 7b4ee68921149b350d529dc0e8b836a224cc0c76 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/7b4ee68921149b350d529dc0e8b836a224cc0c76/app.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
525,
292,
715,
774,
8168,
67,
21,
12,
2890,
16,
525,
292,
9800,
16,
756,
4672,
309,
3859,
12,
2890,
16,
296,
1911,
11,
4672,
756,
18,
542,
1499,
2932,
1911,
3113,
609,
12,
2890,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
525,
292,
715,
774,
8168,
67,
21,
12,
2890,
16,
525,
292,
9800,
16,
756,
4672,
309,
3859,
12,
2890,
16,
296,
1911,
11,
4672,
756,
18,
542,
1499,
2932,
1911,
3113,
609,
12,
2890,
18,
... |
again with a new id.""" | again with a new id. """ | def delete(self): """Marks this object for deletion in the database. The object will then be reset and ready for use again with a new id.""" (sql, ) = self._prepareSQL("DELETE") curs = self.cursor() curs.execute(sql, self._getID()) curs.close() self.reset() | 6f065d7f40e2cd8ad1cba00bf68d639f5bb58726 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1051/6f065d7f40e2cd8ad1cba00bf68d639f5bb58726/forgetSQL.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1430,
12,
2890,
4672,
3536,
20981,
333,
733,
364,
10899,
316,
326,
2063,
18,
1021,
733,
903,
1508,
506,
2715,
471,
5695,
364,
999,
3382,
598,
279,
394,
612,
18,
3536,
261,
4669,
16,
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,
1430,
12,
2890,
4672,
3536,
20981,
333,
733,
364,
10899,
316,
326,
2063,
18,
1021,
733,
903,
1508,
506,
2715,
471,
5695,
364,
999,
3382,
598,
279,
394,
612,
18,
3536,
261,
4669,
16,
26... |
print( "platform: {0}".format( platform.platform() ), file = timing_file ) print( "python: {0}".format( platform.python_version() ), file = timing_file ) print( "wall time (s): {0}".format( wall_time ), file = timing_file ) print( "user time (s): {0}".format( user_time ), file = timing_file ) print( "sys time (s): {0}".format( sys_time ), file = timing_file ) print( "cpu time (s): {0}".format( cpu_time), file = timing_file ) print( "max memory (kB): {0}".format( max_rss ), file = timing_file ) | info = [ "node: {0}".format( platform.node() ), "platform: {0}".format( platform.platform() ), "python: {0}".format( platform.python_version() ), "date (Y/M/D h:m:s): {0}".format( datetime.now().strftime("%Y/%m/%d %H:%M:%S") ), "wall time (s): {0}".format( wall_time ), "user time (s): {0}".format( user_time ), "sys time (s): {0}".format( sys_time ), "cpu time (s): {0}".format( cpu_time), "max memory (kB): {0}".format( max_rss ), ] | def dump_data(self, extra_information = {}): if self.is_running(): self.stop() # Yes, this is a race condition. self.__profile_file.close() self.__profile.dump_stats( self.__profile_file.name ) | 8c3213d1cd42162a32b568732093724083e1b2e4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10264/8c3213d1cd42162a32b568732093724083e1b2e4/running.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4657,
67,
892,
12,
2890,
16,
2870,
67,
13117,
273,
2618,
4672,
309,
365,
18,
291,
67,
8704,
13332,
365,
18,
5681,
1435,
225,
468,
19925,
16,
333,
353,
279,
17996,
2269,
18,
365,
16186,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
67,
892,
12,
2890,
16,
2870,
67,
13117,
273,
2618,
4672,
309,
365,
18,
291,
67,
8704,
13332,
365,
18,
5681,
1435,
225,
468,
19925,
16,
333,
353,
279,
17996,
2269,
18,
365,
16186,... |
has_detail = False | has_detail = True | def get_unique_fields(list_record): # not necessarily primary key, but for this script's purposes # these are the fields that in combination uniquely identify # an article. # TODO: 'id' is all we need for uniqueness, but what i'm doing # here is really cleaning? date = datetime.date(*list_record['updated_parsed'][:3]) summary_detail = list_record['summary_detail']['value'] addr = address_re.search(summary_detail) if addr: addr = addr.group(1) location_name = ', '.join([part.strip() for part in addr.split(',')]) else: location_name = u'' return dict(id=list_record['id'], item_date=date, location_name=location_name, title=list_record['title'], ) | 8800415fdfe5733eacf7b02f35bafd51005ee12a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10327/8800415fdfe5733eacf7b02f35bafd51005ee12a/seeclickfix_retrieval.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
6270,
67,
2821,
12,
1098,
67,
3366,
4672,
468,
486,
23848,
3354,
498,
16,
1496,
364,
333,
2728,
1807,
13694,
468,
4259,
854,
326,
1466,
716,
316,
10702,
30059,
9786,
468,
392,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
6270,
67,
2821,
12,
1098,
67,
3366,
4672,
468,
486,
23848,
3354,
498,
16,
1496,
364,
333,
2728,
1807,
13694,
468,
4259,
854,
326,
1466,
716,
316,
10702,
30059,
9786,
468,
392,
... |
Sub(pick, "phase_compu").text = | Sub(pick, "phase_compu").text | def threeDLoc2XML(self): """ Returns output of 3dloc as xml file """ xml = Element("event") Sub(Sub(xml, "event_id"), "value").text = self.xmlEventID Sub(Sub(xml, "event_type"), "value").text = "manual" # we save P picks on Z-component and S picks on N-component # XXX standard values for unset keys!!!???!!!??? epidists = [] for i in range(len(self.streams)): if self.dicts[i].has_key('P'): pick = Sub(xml, "pick") wave = Sub(pick, "waveform") wave.set("networkCode", self.streams[i][0].stats.network) wave.set("stationCode", self.streams[i][0].stats.station) wave.set("channelCode", self.streams[i][0].stats.channel) wave.set("locationCode", "") date = Sub(pick, "time") # prepare time of pick picktime = self.streams[i][0].stats.starttime picktime += (self.dicts[i]['P'] / self.streams[i][0].stats.sampling_rate) Sub(date, "value").text = picktime.isoformat() # + '.%06i' % picktime.microsecond) if self.dicts[i].has_key('PErr1') and self.dicts[i].has_key('PErr2'): temp = float(self.dicts[i]['PErr2'] - self.dicts[i]['PErr1']) temp /= self.streams[i][0].stats.sampling_rate Sub(date, "uncertainty").text = str(temp) else: Sub(date, "uncertainty") Sub(pick, "phaseHint").text = "P" if self.dicts[i].has_key('POnset'): Sub(pick, "onset").text = self.dicts[i]['POnset'] else: Sub(pick, "onset") if self.dicts[i].has_key('PPol'): if self.dicts[i]['PPol'] == 'up' or self.dicts[i]['PPol'] == 'poorup': Sub(pick, "polarity").text = 'positive' elif self.dicts[i]['PPol'] == 'down' or self.dicts[i]['PPol'] == 'poordown': Sub(pick, "polarity").text = 'negative' else: Sub(pick, "polarity") if self.dicts[i].has_key('PWeight'): Sub(pick, "weight").text = '%i' % self.dicts[i]['PWeight'] else: Sub(pick, "weight") Sub(Sub(pick, "min_amp"), "value") #XXX what is min_amp??? if self.dicts[i].has_key('Psynth'): Sub(pick, "phase_compu").text #XXX this is redundant. can be constructed from above info Sub(Sub(pick, "phase_res"), "value").text = '%s' % self.dicts[i]['Pres'] Sub(Sub(pick, "phase_weight"), "value") #wird von hypoXX ausgespuckt Sub(Sub(pick, "phase_delay"), "value") Sub(Sub(pick, "azimuth"), "value").text = '%s' % self.dicts[i]['PAzim'] Sub(Sub(pick, "incident"), "value").text = '%s' % self.dicts[i]['PInci'] Sub(Sub(pick, "epi_dist"), "value").text = '%s' % self.dicts[i]['distEpi'] Sub(Sub(pick, "hyp_dist"), "value").text = '%s' % self.dicts[i]['distHypo'] if self.dicts[i].has_key('S'): axind = self.dicts[i]['Saxind'] pick = Sub(xml, "pick") wave = Sub(pick, "waveform") wave.set("networkCode", self.streams[i][axind].stats.network) wave.set("stationCode", self.streams[i][axind].stats.station) wave.set("channelCode", self.streams[i][axind].stats.channel) wave.set("locationCode", "") date = Sub(pick, "time") # prepare time of pick picktime = self.streams[i][axind].stats.starttime picktime += (self.dicts[i]['S'] / self.streams[i][axind].stats.sampling_rate) Sub(date, "value").text = picktime.isoformat() # + '.%06i' % picktime.microsecond) if self.dicts[i].has_key('SErr1') and self.dicts[i].has_key('SErr2'): temp = float(self.dicts[i]['SErr2'] - self.dicts[i]['SErr1']) temp /= self.streams[i][axind].stats.sampling_rate Sub(date, "uncertainty").text = str(temp) else: Sub(date, "uncertainty") Sub(pick, "phaseHint").text = "S" if self.dicts[i].has_key('SOnset'): Sub(pick, "onset").text = self.dicts[i]['SOnset'] else: Sub(pick, "onset") if self.dicts[i].has_key('SPol'): if self.dicts[i]['SPol'] == 'up' or self.dicts[i]['SPol'] == 'poorup': Sub(pick, "polarity").text = 'positive' elif self.dicts[i]['SPol'] == 'down' or self.dicts[i]['SPol'] == 'poordown': Sub(pick, "polarity").text = 'negative' else: Sub(pick, "polarity") if self.dicts[i].has_key('SWeight'): Sub(pick, "weight").text = '%i' % self.dicts[i]['SWeight'] else: Sub(pick, "weight") Sub(Sub(pick, "min_amp"), "value") #XXX what is min_amp??? if self.dicts[i].has_key('Ssynth'): Sub(pick, "phase_compu").text = #XXX this is redundant. can be constructed from above info Sub(Sub(pick, "phase_res"), "value").text = '%s' % self.dicts[i]['Sres'] Sub(Sub(pick, "phase_weight"), "value") #wird von hypoXX ausgespuckt Sub(Sub(pick, "phase_delay"), "value") Sub(Sub(pick, "azimuth"), "value").text = '%s' % self.dicts[i]['SAzim'] Sub(Sub(pick, "incident"), "value").text = '%s' % self.dicts[i]['SInci'] Sub(Sub(pick, "epi_dist"), "value").text = '%s' % self.dicts[i]['distEpi'] Sub(Sub(pick, "hyp_dist"), "value").text = '%s' % self.dicts[i]['distHypo'] origin = Sub(xml, "origin") date = Sub(origin, "time") Sub(date, "value").text = self.EventTime.isoformat() # + '.%03i' % self.EventTime.microsecond Sub(date, "uncertainty") lat = Sub(origin, "latitude") Sub(lat, "value").text = '%s' % self.EventLat Sub(lat, "uncertainty").text = '%s' % self.EventErrY #XXX Lat Error in km??!! lon = Sub(origin, "longitude") Sub(lon, "value").text = '%s' % self.EventLon Sub(lon, "uncertainty").text = '%s' % self.EventErrX #XXX Lon Error in km??!! depth = Sub(origin, "depth") Sub(depth, "value").text = '%s' % self.EventZ Sub(depth, "uncertainty").text = '%s' % self.EventErrZ Sub(origin, "depth_type").text = "from location program" Sub(origin, "earth_mod").text = "STAUFEN" Sub(origin, "originUncertainty") quality = Sub(origin, "originQuality") Sub(quality, "P_usedPhaseCount").text = '%i' % self.PCount Sub(quality, "S_usedPhaseCount").text = '%i' % self.SCount Sub(quality, "usedPhaseCount").text = '%i' % (self.PCount + self.SCount) Sub(quality, "usedStationCount").text = '%i' % self.usedStationsCount Sub(quality, "associatedPhaseCount").text = '%i' % (self.PCount + self.SCount) Sub(quality, "associatedStationCount").text = '%i' % len(self.dicts) Sub(quality, "depthPhaseCount").text = "0" Sub(quality, "standardError").text = '%s' % self.EventStdErr Sub(quality, "secondaryAzimuthalGap").text = '%s' % self.EventAzimGap Sub(quality, "groundTruthLevel") Sub(quality, "minimumDistance").text = '%s' % self.epidistMin Sub(quality, "maximumDistance").text = '%s' % self.epidistMax Sub(quality, "medianDistance").text = '%s' % self.epidistMedian magnitude = Sub(xml, "magnitude") mag = Sub(magnitude, "mag") if np.isnan(self.netMag): Sub(mag, "value") Sub(mag, "uncertainty") else: Sub(mag, "value").text = '%s' % self.netMag Sub(mag, "uncertainty").text = '%s' % self.netMagVar Sub(magnitude, "type").text = "Ml" Sub(magnitude, "stationCount").text = '%i' % self.staMagCount for i in range(len(self.streams)): stationMagnitude = Sub(xml, "stationMagnitude") if self.dicts[i].has_key('Mag'): mag = Sub(stationMagnitude, 'mag') Sub(mag, 'value').text = '%s' % self.dicts[i]['Mag'] Sub(mag, 'uncertainty').text Sub(stationMagnitude, 'station').text = '%s' % self.dicts[i]['Station'] if self.dicts[i]['MagUse']: Sub(stationMagnitude, 'weight').text = '%s' % (1. / self.staMagCount) else: Sub(stationMagnitude, 'weight').text = '0' Sub(stationMagnitude, 'channels').text = '%s' % self.dicts[i]['MagChannel'] return tostring(xml,pretty_print=True,xml_declaration=True) | cdb296935764c4f637eb405e18bf7388bd815e22 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10470/cdb296935764c4f637eb405e18bf7388bd815e22/obspyck.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8925,
40,
1333,
22,
4201,
12,
2890,
4672,
3536,
2860,
876,
434,
890,
72,
1829,
487,
2025,
585,
3536,
2025,
273,
225,
3010,
2932,
2575,
7923,
2592,
12,
1676,
12,
2902,
16,
315,
2575,
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,
8925,
40,
1333,
22,
4201,
12,
2890,
4672,
3536,
2860,
876,
434,
890,
72,
1829,
487,
2025,
585,
3536,
2025,
273,
225,
3010,
2932,
2575,
7923,
2592,
12,
1676,
12,
2902,
16,
315,
2575,
67... |
self._findSMS(a_lower, a_upper, b_lower, b_upper, find_minimal) | self._find_sms(a_lower, a_upper, b_lower, b_upper, find_minimal) | def _lcs(self, a_lower, a_upper, b_lower, b_upper, find_minimal): """ The divide-and-conquer implementation of the Longest Common Subsequence (LCS) algorithm. """ # Fast walkthrough equal lines at the start while a_lower < a_upper and b_lower < b_upper and \ self.a_data.undiscarded[a_lower] == \ self.b_data.undiscarded[b_lower]: a_lower += 1 b_lower += 1 | 6032f1f276cc140ea6e56126cabe641972d83df6 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1600/6032f1f276cc140ea6e56126cabe641972d83df6/myersdiff.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
80,
2143,
12,
2890,
16,
279,
67,
8167,
16,
279,
67,
5797,
16,
324,
67,
8167,
16,
324,
67,
5797,
16,
1104,
67,
1154,
2840,
4672,
3536,
1021,
12326,
17,
464,
17,
591,
25734,
4471,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
80,
2143,
12,
2890,
16,
279,
67,
8167,
16,
279,
67,
5797,
16,
324,
67,
8167,
16,
324,
67,
5797,
16,
1104,
67,
1154,
2840,
4672,
3536,
1021,
12326,
17,
464,
17,
591,
25734,
4471,... |
if self['album_part']: | if self['album_part'] and song('part'): | def copy(self, songlist, song): self.__load_db() track = gpod.itdb_track_new() | 397ae1e5aca90ed5fb3e318d890ef846a87b048e /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4764/397ae1e5aca90ed5fb3e318d890ef846a87b048e/ipod.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1610,
12,
2890,
16,
17180,
1098,
16,
17180,
4672,
365,
16186,
945,
67,
1966,
1435,
3298,
273,
4178,
369,
18,
305,
1966,
67,
4101,
67,
2704,
1435,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1610,
12,
2890,
16,
17180,
1098,
16,
17180,
4672,
365,
16186,
945,
67,
1966,
1435,
3298,
273,
4178,
369,
18,
305,
1966,
67,
4101,
67,
2704,
1435,
2,
-100,
-100,
-100,
-100,
-100,
-100,
... |
formats = kw.get('formats') | formats = kw.get('formats', []) | def __init__(self, gyp=None, *args, **kw): self.origin_cwd = os.path.abspath(os.path.dirname(sys.argv[0])) | 48f7697d8ee83b7e96e269b05fdd1f0a0c8275dc /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6220/48f7697d8ee83b7e96e269b05fdd1f0a0c8275dc/TestGyp.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
314,
879,
33,
7036,
16,
380,
1968,
16,
2826,
9987,
4672,
365,
18,
10012,
67,
11089,
273,
1140,
18,
803,
18,
5113,
803,
12,
538,
18,
803,
18,
12287,
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,
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,
314,
879,
33,
7036,
16,
380,
1968,
16,
2826,
9987,
4672,
365,
18,
10012,
67,
11089,
273,
1140,
18,
803,
18,
5113,
803,
12,
538,
18,
803,
18,
12287,
12,... |
encodedText += '\n' | text += u'\n' | def output(self, text, colors = None, newline = True): """ If a character can't be displayed in the encoding used by the user's terminal, it will be replaced with a question mark or by a transliteration. | 67acc624b465432a38a423663787556a577973e8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4404/67acc624b465432a38a423663787556a577973e8/terminal_interface.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
876,
12,
2890,
16,
977,
16,
5740,
273,
599,
16,
9472,
273,
1053,
4672,
3536,
971,
279,
3351,
848,
1404,
506,
10453,
316,
326,
2688,
1399,
635,
326,
729,
1807,
8651,
16,
518,
903,
506,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
876,
12,
2890,
16,
977,
16,
5740,
273,
599,
16,
9472,
273,
1053,
4672,
3536,
971,
279,
3351,
848,
1404,
506,
10453,
316,
326,
2688,
1399,
635,
326,
729,
1807,
8651,
16,
518,
903,
506,
... |
if revisions[historypage][1] == "success": | if revisions[historypage][rev_number][1] == "success": | def stats(self, user=None, totals=True): done = dict() doing = dict() | e10d86029894587ffbbcf5d0340e2c7249473177 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/888/e10d86029894587ffbbcf5d0340e2c7249473177/pages.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3177,
12,
2890,
16,
729,
33,
7036,
16,
19489,
33,
5510,
4672,
2731,
273,
2065,
1435,
9957,
273,
2065,
1435,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3177,
12,
2890,
16,
729,
33,
7036,
16,
19489,
33,
5510,
4672,
2731,
273,
2065,
1435,
9957,
273,
2065,
1435,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
The command sequences used here (``@Can`` etc.) are generated from the given | The command sequences used here (``@PYan`` etc.) are generated from the given | @Can[def ]@Cax[foo](bar): @Can[pass] | c1ff3dec7399c0b88356f268039128c6a6e8dc7a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6148/c1ff3dec7399c0b88356f268039128c6a6e8dc7a/latex.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
632,
2568,
63,
536,
308,
36,
39,
651,
63,
11351,
29955,
3215,
4672,
632,
2568,
63,
5466,
65,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
632,
2568,
63,
536,
308,
36,
39,
651,
63,
11351,
29955,
3215,
4672,
632,
2568,
63,
5466,
65,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
__swig_setmethods__["PunishCnt"] = _micropolisengine.Micropolis_PunishCnt_set __swig_getmethods__["PunishCnt"] = _micropolisengine.Micropolis_PunishCnt_get if _newclass:PunishCnt = _swig_property(_micropolisengine.Micropolis_PunishCnt_get, _micropolisengine.Micropolis_PunishCnt_set) | def MakeExplosionAt(*args): return _micropolisengine.Micropolis_MakeExplosionAt(*args) | 03c21c78bb21eb1b4a4ddfc117101aeeba1374c5 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12485/03c21c78bb21eb1b4a4ddfc117101aeeba1374c5/micropolisengine.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4344,
2966,
383,
87,
285,
861,
30857,
1968,
4672,
327,
389,
27593,
1764,
355,
291,
8944,
18,
49,
335,
1764,
355,
291,
67,
6464,
2966,
383,
87,
285,
861,
30857,
1968,
13,
2,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4344,
2966,
383,
87,
285,
861,
30857,
1968,
4672,
327,
389,
27593,
1764,
355,
291,
8944,
18,
49,
335,
1764,
355,
291,
67,
6464,
2966,
383,
87,
285,
861,
30857,
1968,
13,
2,
-100,
-100,... | |
ofp.write(oldcontent.encode(config.console_encoding)) | if self.options.new_data == '': ofp.write(oldcontent.encode(config.console_encoding)) else: ofp.write(oldcontent.encode(config.console_encoding)+'\n===========\n'+self.options.new_data) | def edit(self): """Edit the page using the editor. It returns two strings: the old version and the new version.""" ofn = tempfile.mktemp() ofp = open(ofn, 'w') try: oldcontent = self.pagelink.get() except wikipedia.NoPage: oldcontent = "" except wikipedia.IsRedirectPage: if self.options.redirect: oldcontent = self.pagelink.get(force=True, get_redirect=redirect) else: raise ofp.write(oldcontent.encode(config.console_encoding)) # FIXME: encoding of wiki ofp.close() os.system("%s %s" % (self.options.editor, ofn)) newcontent = open(ofn).read().decode(config.console_encoding) os.unlink(ofn) return oldcontent, newcontent | aeddb7058383d8c5f0a828e7266d379679a81647 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4404/aeddb7058383d8c5f0a828e7266d379679a81647/editarticle.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3874,
12,
2890,
4672,
3536,
4666,
326,
1363,
1450,
326,
4858,
18,
225,
2597,
1135,
2795,
2064,
30,
326,
1592,
1177,
471,
326,
394,
1177,
12123,
434,
82,
273,
13275,
18,
24816,
5814,
1435... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3874,
12,
2890,
4672,
3536,
4666,
326,
1363,
1450,
326,
4858,
18,
225,
2597,
1135,
2795,
2064,
30,
326,
1592,
1177,
471,
326,
394,
1177,
12123,
434,
82,
273,
13275,
18,
24816,
5814,
1435... |
PolyLineM (23), or PolygonM (25) | PolyLineM (23), PolygonM (25), or MultiPatch (31) | def _readRecordPoly(self, fp): """ Type: PolyLine (3), Polygon (5), PolyLineZ (13), PolygonZ (15), PolyLineM (23), or PolygonM (25) | cee1e2f589119aefad7297765d214b12caa3cd3b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1821/cee1e2f589119aefad7297765d214b12caa3cd3b/shapefile.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
896,
2115,
12487,
12,
2890,
16,
4253,
4672,
3536,
1412,
30,
18394,
1670,
261,
23,
3631,
12681,
261,
25,
3631,
18394,
1670,
62,
261,
3437,
3631,
12681,
62,
261,
3600,
3631,
18394,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
896,
2115,
12487,
12,
2890,
16,
4253,
4672,
3536,
1412,
30,
18394,
1670,
261,
23,
3631,
12681,
261,
25,
3631,
18394,
1670,
62,
261,
3437,
3631,
12681,
62,
261,
3600,
3631,
18394,
16... |
sys.exit(1) if env['VERBOSE']: print 'yes' env.ParseConfig ('pkg-config --cflags --libs %s' % lib) | ok = False else: if env['VERBOSE']: print 'yes' env.ParseConfig ('pkg-config --cflags --libs %s' % lib) return ok | def CheckLibrary (env, libs = []): """ Check for libraries using pkg-config """ for lib in libs: if env['VERBOSE']: print 'Checking for C library %s... ' % lib, if os.system ('pkg-config --exists %s' % lib) == 1: if env['VERBOSE']: print 'no' sys.exit(1) if env['VERBOSE']: print 'yes' env.ParseConfig ('pkg-config --cflags --libs %s' % lib) | 30398c7b3e33daa9dbb9ae8a221c36a06c686581 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12213/30398c7b3e33daa9dbb9ae8a221c36a06c686581/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2073,
9313,
261,
3074,
16,
15042,
273,
5378,
4672,
3536,
2073,
364,
14732,
1450,
3475,
17,
1425,
3536,
364,
2561,
316,
15042,
30,
309,
1550,
3292,
21900,
3546,
30,
1172,
296,
14294,
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,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2073,
9313,
261,
3074,
16,
15042,
273,
5378,
4672,
3536,
2073,
364,
14732,
1450,
3475,
17,
1425,
3536,
364,
2561,
316,
15042,
30,
309,
1550,
3292,
21900,
3546,
30,
1172,
296,
14294,
364,
... |
req_host, erhn = eff_request_host(request) strict_non_domain = ( self._policy.strict_ns_domain & self._policy.DomainStrictNonDomain) | def add_cookie_header(self, request): """Add correct Cookie: header to request (urllib2.Request object). | f4a89ca97bf2644a9472a27549ad13cfbb81502d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/f4a89ca97bf2644a9472a27549ad13cfbb81502d/cookielib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
67,
8417,
67,
3374,
12,
2890,
16,
590,
4672,
3536,
986,
3434,
10201,
30,
1446,
358,
590,
261,
718,
2941,
22,
18,
691,
733,
2934,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
67,
8417,
67,
3374,
12,
2890,
16,
590,
4672,
3536,
986,
3434,
10201,
30,
1446,
358,
590,
261,
718,
2941,
22,
18,
691,
733,
2934,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... | |
for package in packages: | for package in PACKAGES: | def main(prefix): python = sys.executable source = os.path.abspath('..') zine_source = join(source, 'zine') lib_dir = join(prefix, 'lib', 'zine') share_dir = join(prefix, 'share', 'zine') print 'Installing to ' + prefix print 'Using ' + python # create some folders for us silent(os.makedirs, join(lib_dir, 'zine')) silent(os.makedirs, share_dir) # copy the packages and modules into the zine package copy_folder(zine_source, join(lib_dir, 'zine'), recurse=False) for package in packages: copy_folder(join(zine_source, package), join(lib_dir, 'zine', package)) # copy the plugins over copy_folder(join(zine_source, 'plugins'), join(lib_dir, 'plugins')) # compile all files run([sys.executable, '-O', '-mcompileall', '-qf', join(lib_dir, 'zine'), join(lib_dir, 'plugins')]) # templates and shared data copy_folder(join(zine_source, 'shared'), join(share_dir, 'htdocs')) copy_folder(join(zine_source, 'templates'), join(share_dir, 'templates')) # copy the server files copy_servers(join(source, 'servers'), join(share_dir, 'servers'), lib_dir, python) # copy the scripts copy_scripts(join(source, 'scripts'), join(share_dir, 'scripts'), lib_dir) print 'All done.' | 15dcf4124084c6287728e9693e19e179e4457b16 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12815/15dcf4124084c6287728e9693e19e179e4457b16/_install-posix.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
12,
3239,
4672,
5790,
273,
2589,
18,
17751,
1084,
273,
1140,
18,
803,
18,
5113,
803,
2668,
838,
6134,
998,
558,
67,
3168,
273,
1233,
12,
3168,
16,
296,
94,
558,
6134,
2561,
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,
2774,
12,
3239,
4672,
5790,
273,
2589,
18,
17751,
1084,
273,
1140,
18,
803,
18,
5113,
803,
2668,
838,
6134,
998,
558,
67,
3168,
273,
1233,
12,
3168,
16,
296,
94,
558,
6134,
2561,
67,
... |
src = 'http://protobuf.googlecode.com/files/protobuf-2.2.0.tar.gz' chksum = '4c2473fc58d674b3f42bce5c9bcb99a241d6e4da' | src = 'http://protobuf.googlecode.com/files/protobuf-2.2.0.tar.gz', chksum = '4c2473fc58d674b3f42bce5c9bcb99a241d6e4da', | def install(self): d = P.join('%(NOINSTALL_DIR)s' % self.env, 'include', 'naif') self.helper('mkdir', '-p', d) cmd = ['cp', '-vf'] + glob(P.join(self.workdir, 'include', '*.h')) + [d] self.helper(*cmd) | cd6e398cf8e5efa5c82e88404031617d53bbf644 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13144/cd6e398cf8e5efa5c82e88404031617d53bbf644/Packages.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3799,
12,
2890,
4672,
302,
273,
453,
18,
5701,
2668,
17105,
3417,
28865,
67,
4537,
13,
87,
11,
738,
365,
18,
3074,
16,
296,
6702,
2187,
296,
6582,
430,
6134,
365,
18,
4759,
2668,
26686... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3799,
12,
2890,
4672,
302,
273,
453,
18,
5701,
2668,
17105,
3417,
28865,
67,
4537,
13,
87,
11,
738,
365,
18,
3074,
16,
296,
6702,
2187,
296,
6582,
430,
6134,
365,
18,
4759,
2668,
26686... |
if navtool.getProperty('enable_wf_state_filtering', False): | if query and navtool.getProperty('enable_wf_state_filtering', False): | def buildQuery(self, **kw): """Build Query """ | 97b2a528a822940531f1364fd1194938ee0e9a00 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9787/97b2a528a822940531f1364fd1194938ee0e9a00/bibliotopic.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
29279,
12,
2890,
16,
2826,
9987,
4672,
3536,
3116,
2770,
3536,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
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,
29279,
12,
2890,
16,
2826,
9987,
4672,
3536,
3116,
2770,
3536,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
def specialize_valdoc_node(node, val_doc, context, url): | def specialize_valdoc_node(node, val_doc, context, linker): | def specialize_valdoc_node(node, val_doc, context, url): """ Update the style attributes of `node` to reflext its type and context. """ # We can only use html-style nodes if dot_version>2. dot_version = get_dot_version() # If val_doc or context is a variable, get its value. if isinstance(val_doc, VariableDoc) and val_doc.value is not UNKNOWN: val_doc = val_doc.value if isinstance(context, VariableDoc) and context.value is not UNKNOWN: context = context.value # Set the URL. (Do this even if it points to the page we're # currently on; otherwise, the tooltip is ignored.) node['href'] = url or NOOP_URL if url is None: node['fillcolor'] = UNDOCUMENTED_BG node['style'] = 'filled' if isinstance(val_doc, ModuleDoc) and dot_version >= [2]: node['shape'] = 'plaintext' if val_doc == context: color = SELECTED_BG else: color = MODULE_BG node['tooltip'] = node['label'] node['html_label'] = MODULE_NODE_HTML % (color, color, url, val_doc.canonical_name, node['label']) node['width'] = node['height'] = 0 node.port = 'body' elif isinstance(val_doc, RoutineDoc): node['shape'] = 'box' node['style'] = 'rounded' node['width'] = 0 node['height'] = 0 node['label'] = '%s()' % node['label'] node['tooltip'] = node['label'] if val_doc == context: node['fillcolor'] = SELECTED_BG node['style'] = 'filled,rounded,bold' else: node['shape'] = 'box' node['width'] = 0 node['height'] = 0 node['tooltip'] = node['label'] if val_doc == context: node['fillcolor'] = SELECTED_BG node['style'] = 'filled,bold' | ba73093f8917d395c8b7fb450f7be685a6ea79a6 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3512/ba73093f8917d395c8b7fb450f7be685a6ea79a6/dotgraph.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
857,
1710,
67,
1125,
2434,
67,
2159,
12,
2159,
16,
1244,
67,
2434,
16,
819,
16,
28058,
4672,
3536,
2315,
326,
2154,
1677,
434,
1375,
2159,
68,
358,
1278,
4149,
88,
2097,
618,
471,
819,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
857,
1710,
67,
1125,
2434,
67,
2159,
12,
2159,
16,
1244,
67,
2434,
16,
819,
16,
28058,
4672,
3536,
2315,
326,
2154,
1677,
434,
1375,
2159,
68,
358,
1278,
4149,
88,
2097,
618,
471,
819,... |
DamnSpawner('TASKKILL /PID '+str(self.process.pid)+' /F').wait() | DamnSpawner(DV_BIN_PATH+'taskkill.exe /PID '+str(self.process.pid)+' /F').wait() | def abortProcess(self): # Cannot send "q" because it's not a shell'd subprocess. Got to kill ffmpeg. self.abort=True # This prevents the converter from going to the next file if self.profile!=-1: if DV_OS_NAME=='nt': DamnSpawner('TASKKILL /PID '+str(self.process.pid)+' /F').wait() elif DV_OS_NAME=='mac': DamnSpawner('kill -SIGTERM '+str(self.process.pid)).wait() # Untested, from http://www.cs.cmu.edu/~benhdj/Mac/unix.html but with SIGTERM instead of SIGSTOP else: os.kill(self.process.pid,signal.SIGTERM) time.sleep(.5) # Wait a bit, let the files get unlocked try: os.remove(self.outdir+self.tmpfilename) except: pass # Maybe the file wasn't created yet | f27250737f78523bfec1b1c3076be5fba709cfcd /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11142/f27250737f78523bfec1b1c3076be5fba709cfcd/DamnVid.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6263,
2227,
12,
2890,
4672,
468,
14143,
1366,
315,
85,
6,
2724,
518,
1807,
486,
279,
5972,
14271,
6652,
18,
19578,
358,
8673,
6875,
19951,
18,
365,
18,
18623,
33,
5510,
468,
1220,
17793,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6263,
2227,
12,
2890,
4672,
468,
14143,
1366,
315,
85,
6,
2724,
518,
1807,
486,
279,
5972,
14271,
6652,
18,
19578,
358,
8673,
6875,
19951,
18,
365,
18,
18623,
33,
5510,
468,
1220,
17793,... |
<th width="150">%s</th> <td> | <th width="150">%s</th> <td> | def tmpl_register_ill_article_request_step1(self, infos, admin=True, ln=CFG_SITE_LANG): """ @param infos: informations @type infos: list """ | 648f0875a183c65548d6b2535cea8cf25a2a9827 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12027/648f0875a183c65548d6b2535cea8cf25a2a9827/bibcirculation_templates.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10720,
67,
4861,
67,
737,
67,
11480,
67,
2293,
67,
4119,
21,
12,
2890,
16,
10626,
16,
3981,
33,
5510,
16,
7211,
33,
19727,
67,
20609,
67,
10571,
4672,
3536,
632,
891,
10626,
30,
26978,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10720,
67,
4861,
67,
737,
67,
11480,
67,
2293,
67,
4119,
21,
12,
2890,
16,
10626,
16,
3981,
33,
5510,
16,
7211,
33,
19727,
67,
20609,
67,
10571,
4672,
3536,
632,
891,
10626,
30,
26978,... |
error.encode('ascii', 'replace')) | stringify(error)) | def _updateErrback(self, error): if not self.ufeed.id_exists(): return logging.info("WARNING: error in Feed.update for %s -- %s", self.ufeed, error.encode('ascii', 'replace')) self.scheduleUpdateEvents(-1) self.updating = False self.ufeed.signal_change(needs_save=False) | a3acd50bf9a62c24debba5f48ad647e26b7ce02b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12354/a3acd50bf9a62c24debba5f48ad647e26b7ce02b/feed.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2725,
2524,
823,
12,
2890,
16,
555,
4672,
309,
486,
365,
18,
696,
73,
329,
18,
350,
67,
1808,
13332,
327,
2907,
18,
1376,
2932,
9511,
30,
555,
316,
14013,
18,
2725,
364,
738,
87... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2725,
2524,
823,
12,
2890,
16,
555,
4672,
309,
486,
365,
18,
696,
73,
329,
18,
350,
67,
1808,
13332,
327,
2907,
18,
1376,
2932,
9511,
30,
555,
316,
14013,
18,
2725,
364,
738,
87... |
if id == -1: | if not id: | def save_milestone(self, id): self.perm.assert_permission(perm.MILESTONE_MODIFY) if self.args.has_key('save'): name = self.args.get('name', '') if not name: raise TracError('You must provide a name for the milestone.', 'Required Field Missing') datemode = self.args.get('datemode', 'manual') if datemode == 'now': date = int(time.time()) else: datestr = self.args.get('date', '') date = 0 if datestr: date = self.parse_date(datestr) descr = self.args.get('descr', '') if id == -1: self.create_milestone(name, date, descr) else: self.update_milestone(id, name, date, descr) elif id != -1: self.req.redirect(self.env.href.milestone(id)) else: self.req.redirect(self.env.href.roadmap()) | 865afa0fee741b5a3c4444d3f435c0a530f5e045 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2831/865afa0fee741b5a3c4444d3f435c0a530f5e045/Milestone.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1923,
67,
81,
18270,
12,
2890,
16,
612,
4672,
365,
18,
12160,
18,
11231,
67,
9827,
12,
12160,
18,
7492,
900,
882,
5998,
67,
6720,
12096,
13,
309,
365,
18,
1968,
18,
5332,
67,
856,
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,
1923,
67,
81,
18270,
12,
2890,
16,
612,
4672,
365,
18,
12160,
18,
11231,
67,
9827,
12,
12160,
18,
7492,
900,
882,
5998,
67,
6720,
12096,
13,
309,
365,
18,
1968,
18,
5332,
67,
856,
26... |
s=re.sub("(<\s*?img.*?src=['\"]?)([^\s'\"]*)",find_url,s) | s=sanitise_re.sub(find_url,s) | def sanitise(s): """ Sanitises s from javascript and rewrites the img tags so they point back at flag for reconstruction """ #Find all the urls: s=re.sub("(<\s*?img.*?src=['\"]?)([^\s'\"]*)",find_url,s) return s | a7e636341df3cf7f8b6128c8fe3fbdfbafbd870c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5568/a7e636341df3cf7f8b6128c8fe3fbdfbafbd870c/TCPDumpAnalysis.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6764,
784,
12,
87,
4672,
3536,
348,
5241,
6141,
272,
628,
11341,
471,
283,
13284,
326,
3774,
2342,
1427,
2898,
1634,
1473,
622,
2982,
364,
25792,
4549,
3536,
468,
3125,
777,
326,
6903,
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,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6764,
784,
12,
87,
4672,
3536,
348,
5241,
6141,
272,
628,
11341,
471,
283,
13284,
326,
3774,
2342,
1427,
2898,
1634,
1473,
622,
2982,
364,
25792,
4549,
3536,
468,
3125,
777,
326,
6903,
3... |
self.setSessionInfo([MESSAGE_SAVEDCHANGES % self.utGetTodayDate()]) | self.setSessionInfoTrans(MESSAGE_SAVEDCHANGES, date=self.utGetTodayDate()) | def saveProperties(self, title='', description='', sortorder='', start_date='', end_date='', public_registration='', allow_file='', file='', lang='', REQUEST=None): """ """ | 0432e1b23f7d941ebabbbf4f7136c970fc2ebdeb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3287/0432e1b23f7d941ebabbbf4f7136c970fc2ebdeb/NySimpleConsultation.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1923,
2297,
12,
2890,
16,
2077,
2218,
2187,
2477,
2218,
2187,
1524,
1019,
2218,
2187,
787,
67,
712,
2218,
2187,
679,
67,
712,
2218,
2187,
1071,
67,
14170,
2218,
2187,
1699,
67,
768,
2218... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1923,
2297,
12,
2890,
16,
2077,
2218,
2187,
2477,
2218,
2187,
1524,
1019,
2218,
2187,
787,
67,
712,
2218,
2187,
679,
67,
712,
2218,
2187,
1071,
67,
14170,
2218,
2187,
1699,
67,
768,
2218... |
X = list(X) | return Set_object_enumerated(list(X)) | def Set(X): r""" Create the underlying set of $X$. If $X$ is a list, tuple, Python set, or ``X.is_finite()`` is true, this returns a wrapper around Python's enumerated immutable frozenset type with extra functionality. Otherwise it returns a more formal wrapper. If you need the functionality of mutable sets, use Python's builtin set type. EXAMPLES:: sage: X = Set(GF(9,'a')) sage: X {0, 1, 2, a, a + 1, a + 2, 2*a, 2*a + 1, 2*a + 2} sage: type(X) <class 'sage.sets.set.Set_object_enumerated'> sage: Y = X.union(Set(QQ)) sage: Y Set-theoretic union of {0, 1, 2, a, a + 1, a + 2, 2*a, 2*a + 1, 2*a + 2} and Set of elements of Rational Field sage: type(Y) <class 'sage.sets.set.Set_object_union'> Usually sets can be used as dictionary keys. :: sage: d={Set([2*I,1+I]):10} sage: d # key is randomly ordered {{I + 1, 2*I}: 10} sage: d[Set([1+I,2*I])] 10 sage: d[Set((1+I,2*I))] 10 The original object is often forgotten. :: sage: v = [1,2,3] sage: X = Set(v) sage: X {1, 2, 3} sage: v.append(5) sage: X {1, 2, 3} sage: 5 in X False Set also accepts iterators, but be careful to only give *finite* sets. :: sage: list(Set(iter([1, 2, 3, 4, 5]))) [1, 2, 3, 4, 5] TESTS:: sage: Set(Primes()) Set of all prime numbers: 2, 3, 5, 7, ... sage: Set(Subsets([1,2,3])).cardinality() 8 """ if is_Set(X): return X if isinstance(X, Element): raise TypeError, "Element has no defined underlying set" elif isinstance(X, (list, tuple, set, frozenset)): return Set_object_enumerated(frozenset(X)) try: if X.is_finite(): return Set_object_enumerated(X) except AttributeError: pass if is_iterator(X): # Note we are risking an infinite loop here, # but this is the way Python behaves too: try # sage: set(an iterator which does not terminate) X = list(X) return Set_object(X) | 0fccbc2fd43f9020220c9b658459175e92556187 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/0fccbc2fd43f9020220c9b658459175e92556187/set.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1000,
12,
60,
4672,
436,
8395,
1788,
326,
6808,
444,
434,
271,
60,
8,
18,
225,
971,
271,
60,
8,
353,
279,
666,
16,
3193,
16,
6600,
444,
16,
578,
12176,
60,
18,
291,
67,
9551,
1435,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1000,
12,
60,
4672,
436,
8395,
1788,
326,
6808,
444,
434,
271,
60,
8,
18,
225,
971,
271,
60,
8,
353,
279,
666,
16,
3193,
16,
6600,
444,
16,
578,
12176,
60,
18,
291,
67,
9551,
1435,... |
self.dad.addmember(self) | self.dad.addchild(self) | def __init__(self, assembly, parent, name=None): ###@@@ fix inconsistent arg order self.assy = assembly self.name = name or "" # assumed to be a string by some code self.picked = False # whether it's selected # (for highlighting in all views, and being affected by operations) self.hidden = False # whether to make it temporarily invisible in the glpane # (note: self.hidden is defined, but always False, for Groups; # it might be set for any leaf node whether or not that node is ever actually # shown in the glpane.) self.open = False # bruce 050125; kluge to make it easier to count open nodes in a tree # (this will never become True except for Groups) # (when more than one tree widget can show the same node, .open will need replacement # with treewidget-specific state #e) self.dad = parent # another Node (which must be a Group), or None if self.dad: self.dad.addmember(self) return | de35ebb12a253c01b1a5811524ca45a3694bb609 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/de35ebb12a253c01b1a5811524ca45a3694bb609/Utility.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
19931,
16,
982,
16,
508,
33,
7036,
4672,
11849,
30989,
36,
2917,
27403,
1501,
1353,
365,
18,
428,
93,
273,
19931,
365,
18,
529,
273,
508,
578,
1408,
468,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
19931,
16,
982,
16,
508,
33,
7036,
4672,
11849,
30989,
36,
2917,
27403,
1501,
1353,
365,
18,
428,
93,
273,
19931,
365,
18,
529,
273,
508,
578,
1408,
468,... |
def read_data(cls, input_fname, input_alphabet=0, turn_into_integer=1, double_header=0): """ | def read_data(cls, input_fname, input_alphabet=0, turn_into_integer=1, double_header=0, delimiter='\t'): """ 2008-05-12 add delimiter | def read_data(cls, input_fname, input_alphabet=0, turn_into_integer=1, double_header=0): """ 2008-05-07 add option double_header 2007-03-06 different from the one from SelectStrains.py is map(int, data_row) 2007-05-14 add input_alphabet 2007-10-09 add turn_into_integer """ sys.stderr.write("Reading data ...") reader = csv.reader(open(input_fname), delimiter='\t') header = reader.next() if double_header: header = [header, reader.next()] data_matrix = [] strain_acc_list = [] category_list = [] for row in reader: strain_acc_list.append(row[0]) category_list.append(row[1]) data_row = row[2:] no_of_snps = len(data_row) if input_alphabet: data_row = dict_map(nt2number, data_row) if no_of_snps!=len(data_row): print row else: if turn_into_integer: data_row = map(int, data_row) data_matrix.append(data_row) del reader sys.stderr.write("Done.\n") return header, strain_acc_list, category_list, data_matrix | 9c37de4822440ddecb9d7de412265d707bdb9dbc /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9645/9c37de4822440ddecb9d7de412265d707bdb9dbc/FilterStrainSNPMatrix.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
67,
892,
12,
6429,
16,
810,
67,
12749,
16,
810,
67,
287,
8907,
33,
20,
16,
7005,
67,
18591,
67,
7745,
33,
21,
16,
1645,
67,
3374,
33,
20,
16,
5654,
2218,
64,
88,
11,
4672,
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,
855,
67,
892,
12,
6429,
16,
810,
67,
12749,
16,
810,
67,
287,
8907,
33,
20,
16,
7005,
67,
18591,
67,
7745,
33,
21,
16,
1645,
67,
3374,
33,
20,
16,
5654,
2218,
64,
88,
11,
4672,
3... |
comp.append(reader.Value()) | seg_data.set(subele_id, reader.Value()) | def convert(filename, fd_out): global logger try: reader = libxml2.newTextReaderFilename(filename) ret = reader.Read() found_text = False while ret == 1: tmpNodeType = reader.NodeType() #print tmpNodeType, reader.Name(), reader.Value() if tmpNodeType == NodeType['element_start']: found_text = False cur_name = reader.Name() if cur_name == 'seg': while reader.MoveToNextAttribute(): if reader.Name() == 'id': #fd_out.write(reader.Value()) seg_data = pyx12.segment.segment(reader.Value(), \ '~', '*', ':') #if reader.Value() == 'NM1': # pdb.set_trace() elif cur_name == 'comp': comp = [] #elif cur_name == 'ele' and not reader.HasValue(): # seg_data.append('') elif tmpNodeType == NodeType['CData2']: #pdb.set_trace() if cur_name in ('ele', 'subele'): seg_data.append(reader.Value().replace('\n', '')) found_text = True elif tmpNodeType == NodeType['text']: if cur_name == 'ele': seg_data.append(reader.Value()) found_text = True elif cur_name == 'subele': comp.append(reader.Value()) found_text = True elif tmpNodeType == NodeType['element_end']: cur_name = reader.Name() if cur_name == 'seg': fd_out.write(seg_data.format()) fd_out.write('\n') elif cur_name == 'ele' and not found_text: seg_data.append('') found_text = True elif cur_name == 'subele' and not found_text: comp.append('') found_text = True elif cur_name == 'comp': seg_data.append(string.join(comp, ':')) #elif cur_name == 'subele': # fd_out.write(':') cur_name = None ret = reader.Read() except: logger.error('Read of file "%s" failed' % (filename)) raise return False return True | bda32697ead937dfc940e1f5db60c58616560c33 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11528/bda32697ead937dfc940e1f5db60c58616560c33/xmlx12.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1765,
12,
3459,
16,
5194,
67,
659,
4672,
2552,
1194,
775,
30,
2949,
273,
16394,
22,
18,
2704,
1528,
2514,
5359,
12,
3459,
13,
325,
273,
2949,
18,
1994,
1435,
1392,
67,
955,
273,
1083,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1765,
12,
3459,
16,
5194,
67,
659,
4672,
2552,
1194,
775,
30,
2949,
273,
16394,
22,
18,
2704,
1528,
2514,
5359,
12,
3459,
13,
325,
273,
2949,
18,
1994,
1435,
1392,
67,
955,
273,
1083,
... |
if aliased: _platform_aliased_cache[bool(terse)] = platform | if aliased and terse: _platform_aliased_cache_terse = platform elif aliased and not terse: _platform_aliased_cache_not_terse = platform | def platform(aliased=0, terse=0): """ Returns a single string identifying the underlying platform with as much useful information as possible (but no more :). The output is intended to be human readable rather than machine parseable. It may look different on different platforms and this is intended. If "aliased" is true, the function will use aliases for various platforms that report system names which differ from their common names, e.g. SunOS will be reported as Solaris. The system_alias() function is used to implement this. Setting terse to true causes the function to return only the absolute minimum information needed to identify the platform. """ global _platform_cache,_platform_aliased_cache if not aliased and (_platform_cache[bool(terse)] is not None): return _platform_cache[bool(terse)] elif _platform_aliased_cache[bool(terse)] is not None: return _platform_aliased_cache[bool(terse)] # Get uname information and then apply platform specific cosmetics # to it... system,node,release,version,machine,processor = uname() if machine == processor: processor = '' if aliased: system,release,version = system_alias(system,release,version) if system == 'Windows': # MS platforms rel,vers,csd,ptype = win32_ver(version) if terse: platform = _platform(system,release) else: platform = _platform(system,release,version,csd) elif system in ('Linux',): # Linux based systems distname,distversion,distid = dist('') if distname and not terse: platform = _platform(system,release,machine,processor, 'with', distname,distversion,distid) else: # If the distribution name is unknown check for libc vs. glibc libcname,libcversion = libc_ver(sys.executable) platform = _platform(system,release,machine,processor, 'with', libcname+libcversion) elif system == 'Java': # Java platforms r,v,vminfo,(os_name,os_version,os_arch) = java_ver() if terse: platform = _platform(system,release,version) else: platform = _platform(system,release,version, 'on', os_name,os_version,os_arch) elif system == 'MacOS': # MacOS platforms if terse: platform = _platform(system,release) else: platform = _platform(system,release,machine) else: # Generic handler if terse: platform = _platform(system,release) else: bits,linkage = architecture(sys.executable) platform = _platform(system,release,machine,processor,bits,linkage) if aliased: _platform_aliased_cache[bool(terse)] = platform elif terse: pass else: _platform_cache[bool(terse)] = platform return platform | 9001cde559ef1b4f6b700c76bc2c86aef14b4e9d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/9001cde559ef1b4f6b700c76bc2c86aef14b4e9d/platform.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4072,
12,
18083,
8905,
33,
20,
16,
19272,
307,
33,
20,
4672,
225,
3536,
2860,
279,
2202,
533,
29134,
326,
6808,
4072,
598,
487,
9816,
5301,
1779,
487,
3323,
261,
12885,
1158,
1898,
294,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4072,
12,
18083,
8905,
33,
20,
16,
19272,
307,
33,
20,
4672,
225,
3536,
2860,
279,
2202,
533,
29134,
326,
6808,
4072,
598,
487,
9816,
5301,
1779,
487,
3323,
261,
12885,
1158,
1898,
294,
... |
outRegion += "* <span style=\"color:blue\">'''''{0}''''' </span>\n".format( getThisNodesInfoAsText(parameterNode, "label")) | outRegion += "* <span style=\"color:blue\">'''''{0}''''' </span>: {1}\n".format( getThisNodesInfoAsText(parameterNode, "label"), getThisNodesInfoAsText(parameterNode, "description")) | def DumpSEMMediaWikiFeatures(executableNode): outRegion = "" outRegion += "===Quick Tour of Features and Use===\n\n" outRegion += "{0}{1}".format("A list panels in the interface,", " their features, what they mean, and how to use them.\n") outRegion += "{|\n" outRegion += "|\n" # Now print all the command line arguments and the labels # that showup in the GUI interface for parameterNode in executableNode.getElementsByTagName("parameters"): outRegion += "* <span style=\"color:blue\">'''''{0}''''' </span>\n".format( getThisNodesInfoAsText(parameterNode, "label")) currentNode = parameterNode.firstChild while currentNode is not None: if currentNode.nodeType == currentNode.ELEMENT_NODE: #If this node doe not have a "label" element, then skip it. if getThisNodesInfoAsText(currentNode, "label") != "": # if this node has a default value -- document it! if getThisNodesInfoAsText(currentNode, "default") != "": outRegion += "{0} {1} {2}: {3} {4}\n".format( getLabelDefinition(currentNode), getLongFlagDefinition(currentNode), getFlagDefinition(currentNode), getThisNodesInfoAsText(currentNode, "description"), getDefaultValueDefinition(currentNode)) else: outRegion += "{0} {1} {2}: {3}\n\n".format( getLabelDefinition(currentNode), getLongFlagDefinition(currentNode), getFlagDefinition(currentNode), getThisNodesInfoAsText(currentNode, "description")) currentNode = currentNode.nextSibling outRegion += "{0}{1}\n".format("|[[Image:screenshotBlankNotOptional.png|", "thumb|280px|User Interface]]") outRegion += "|}\n\n" return outRegion | bb4c200dee1fedd27e9c4ea11af1fe11302490e5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12580/bb4c200dee1fedd27e9c4ea11af1fe11302490e5/SEMToMediaWiki.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
18242,
1090,
49,
5419,
25438,
8696,
12,
17751,
907,
4672,
596,
5165,
273,
1408,
596,
5165,
1011,
315,
12275,
13663,
399,
477,
434,
28920,
471,
2672,
12275,
64,
82,
64,
82,
6,
596,
5165,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
18242,
1090,
49,
5419,
25438,
8696,
12,
17751,
907,
4672,
596,
5165,
273,
1408,
596,
5165,
1011,
315,
12275,
13663,
399,
477,
434,
28920,
471,
2672,
12275,
64,
82,
64,
82,
6,
596,
5165,
... |
self.output_paramters.setdefault('method', method) writer_class = self._lookup(self.output_paramters) | self.output_parameters.setdefault('method', method) writer_class = self._lookup(self.output_parameters) | def _finalize(self, method): self.output_paramters.setdefault('method', method) writer_class = self._lookup(self.output_paramters) # Save our instance variables for use after reinitializing stack = self._stack del self._stack | 74e87f1564798d630a4711cb91fd8cf5e7718ea0 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/14078/74e87f1564798d630a4711cb91fd8cf5e7718ea0/proxywriter.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
30343,
12,
2890,
16,
707,
4672,
365,
18,
2844,
67,
3977,
18,
542,
1886,
2668,
2039,
2187,
707,
13,
2633,
67,
1106,
273,
365,
6315,
8664,
12,
2890,
18,
2844,
67,
3977,
13,
468,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
30343,
12,
2890,
16,
707,
4672,
365,
18,
2844,
67,
3977,
18,
542,
1886,
2668,
2039,
2187,
707,
13,
2633,
67,
1106,
273,
365,
6315,
8664,
12,
2890,
18,
2844,
67,
3977,
13,
468,
7... |
"""Create a viewlet that can simply insert a javascript link.""" | """Create a viewlet that can simply insert a CSS link.""" | def CSSViewlet(path, media="all", rel="stylesheet"): """Create a viewlet that can simply insert a javascript link.""" src = os.path.join(os.path.dirname(__file__), 'css_viewlet.pt') klass = type('CSSViewlet', (CSSResourceViewletBase, ViewletBase), {'index': ViewPageTemplateFile(src), '_path': path, '_media':media, '_rel':rel}) return klass | 99c2f6d935a7f22547fd855590a0b317fe977ca5 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9711/99c2f6d935a7f22547fd855590a0b317fe977ca5/viewlet.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6765,
1767,
1810,
12,
803,
16,
3539,
1546,
454,
3113,
1279,
1546,
19403,
6,
4672,
3536,
1684,
279,
1476,
1810,
716,
848,
8616,
2243,
279,
6765,
1692,
12123,
1705,
273,
1140,
18,
803,
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,
6765,
1767,
1810,
12,
803,
16,
3539,
1546,
454,
3113,
1279,
1546,
19403,
6,
4672,
3536,
1684,
279,
1476,
1810,
716,
848,
8616,
2243,
279,
6765,
1692,
12123,
1705,
273,
1140,
18,
803,
18,... |
result = cls(id=ci.sha, repo=repo) | result = cls(id=ci.hexsha, repo=repo) | def from_repo_object(cls, ci, repo): result = cls(id=ci.sha, repo=repo) result.__dict__['_impl'] = ci return result | 6dd3f30cfab3eff24e4737478bce74242ed9d2ae /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1036/6dd3f30cfab3eff24e4737478bce74242ed9d2ae/git_repo.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
628,
67,
7422,
67,
1612,
12,
6429,
16,
9039,
16,
3538,
4672,
563,
273,
2028,
12,
350,
33,
8450,
18,
7118,
7819,
16,
3538,
33,
7422,
13,
563,
16186,
1576,
972,
3292,
67,
11299,
3546,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
628,
67,
7422,
67,
1612,
12,
6429,
16,
9039,
16,
3538,
4672,
563,
273,
2028,
12,
350,
33,
8450,
18,
7118,
7819,
16,
3538,
33,
7422,
13,
563,
16186,
1576,
972,
3292,
67,
11299,
3546,
... |
document = self.get_handler('d%d' % doc_number) | document = self.get_handler('d%07d' % doc_number) | def unindex_document(self, doc_number): if doc_number in self.added_documents: document = self.added_documents.pop(doc_number) else: document = self.get_handler('d%d' % doc_number) self.removed_documents.append(doc_number) for name in document.resource.get_resource_names(): if name.startswith('i'): field = document.get_handler(name) ii = self.get_handler('f' + name[1:]) for term in field.terms: ii.unindex_term(term, doc_number) | 404ff3d3e92cba5a136d06cad03e121ebbacf340 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12681/404ff3d3e92cba5a136d06cad03e121ebbacf340/Catalog.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
640,
1615,
67,
5457,
12,
2890,
16,
997,
67,
2696,
4672,
309,
997,
67,
2696,
316,
365,
18,
9665,
67,
24795,
30,
1668,
273,
365,
18,
9665,
67,
24795,
18,
5120,
12,
2434,
67,
2696,
13,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
640,
1615,
67,
5457,
12,
2890,
16,
997,
67,
2696,
4672,
309,
997,
67,
2696,
316,
365,
18,
9665,
67,
24795,
30,
1668,
273,
365,
18,
9665,
67,
24795,
18,
5120,
12,
2434,
67,
2696,
13,
... |
OPTS=['DIR:direct/src/plugin_standalone', 'DIR:direct/src/plugin', 'DIR:dtool/src/dtoolbase', 'DIR:dtool/src/dtoolutil', 'DIR:dtool/src/pystub', 'DIR:dtool/src/prc', 'DIR:dtool/src/dconfig', 'DIR:panda/src/express', 'DIR:panda/src/downloader', 'RUNTIME', 'P3DEMBED', 'TINYXML', 'OPENSSL', 'JPEG', 'PNG', 'ZLIB'] DefSymbol("P3DEMBED", "BUILDING_P3D_PLUGIN", "") | OPTS=['BUILDING:P3D_PLUGIN', 'DIR:direct/src/plugin_standalone', 'DIR:direct/src/plugin', 'DIR:dtool/src/dtoolbase', 'DIR:dtool/src/dtoolutil', 'DIR:dtool/src/pystub', 'DIR:dtool/src/prc', 'DIR:dtool/src/dconfig', 'DIR:panda/src/express', 'DIR:panda/src/downloader', 'RUNTIME', 'P3DEMBED', 'TINYXML', 'OPENSSL', 'JPEG', 'PNG', 'ZLIB'] | pandaversion_h += "\n#undef PANDA_OFFICIAL_VERSION\n" | 8aee3e51d88b06313a41ec0b855c64622f94cbd7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7242/8aee3e51d88b06313a41ec0b855c64622f94cbd7/makepanda.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
293,
464,
842,
722,
67,
76,
1011,
1548,
82,
7,
318,
536,
225,
453,
4307,
37,
67,
3932,
1653,
39,
6365,
67,
5757,
64,
82,
6,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
293,
464,
842,
722,
67,
76,
1011,
1548,
82,
7,
318,
536,
225,
453,
4307,
37,
67,
3932,
1653,
39,
6365,
67,
5757,
64,
82,
6,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
pricetype=self.pool.get('product.price.type').browse(cr,uid,price_type_id) amount_unit=move_line.product_id.price_get(pricetype.field, context)[move_line.product_id.id] | pricetype=self.pool.get('product.price.type').browse(cr,uid,price_type_id) amount_unit=move_line.product_id.price_get(pricetype.field, context)[move_line.product_id.id] | def _get_price_unit_invoice(self, cursor, user, move_line, type): '''Return the price unit for the move line''' if type in ('in_invoice', 'in_refund'): # Take the user company and pricetype price_type_id=self.pool.get('res.users').browse(cr,users,users).company_id.property_valuation_price_type.id pricetype=self.pool.get('product.price.type').browse(cr,uid,price_type_id) amount_unit=move_line.product_id.price_get(pricetype.field, context)[move_line.product_id.id] return amount_unit else: return move_line.product_id.list_price | d1c818f1f1c2c2310b1b2eff79c5c8c61511f900 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/d1c818f1f1c2c2310b1b2eff79c5c8c61511f900/stock.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
67,
8694,
67,
4873,
67,
16119,
12,
2890,
16,
3347,
16,
729,
16,
3635,
67,
1369,
16,
618,
4672,
9163,
990,
326,
6205,
2836,
364,
326,
3635,
980,
26418,
309,
618,
316,
7707,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
67,
8694,
67,
4873,
67,
16119,
12,
2890,
16,
3347,
16,
729,
16,
3635,
67,
1369,
16,
618,
4672,
9163,
990,
326,
6205,
2836,
364,
326,
3635,
980,
26418,
309,
618,
316,
7707,
... |
nanfiller = m.getfoystart(m.tresult[nix], N.array([nix])) | nanfiller = m.getfoystart(m.tresult[nix].copy(), N.array([nix])) | def getsourceintegrand(m, savefile=None): """Return source term (slow-roll for now), once first order system has been executed.""" #Initialize variables to store result lenmk = len(m.k) s2shape = (lenmk, lenmk) source_logger.debug("Shape of m.k is " + str(lenmk)) #Get atom shape for savefile atomshape = (0, lenmk, lenmk) #Set up file for results if not savefile or not os.path.isdir(os.path.dirname(savefile)): date = time.strftime("%Y%m%d") savefile = RESULTSDIR + "source" + date + ".hf5" source_logger.info("Saving source results in file " + savefile) #Main try block for file IO try: sf, sarr = opensourcefile(savefile, atomshape, sourcetype="int") try: #Main loop over each time step for nix, n in enumerate(m.tresult): #Get first order ICs: nanfiller = m.getfoystart(m.tresult[nix], N.array([nix])) #switch nans for ICs in m.yresult myr = m.yresult[nix].copy() are_nan = N.isnan(myr) myr[are_nan] = nanfiller[are_nan] #Get first order results (from file or variables) phi, phidot, H, dphi1real, dphi1dotreal, dphi1imag, dphi1dotimag = [myr[i,:] for i in range(7)] dphi1 = dphi1real + dphi1imag*1j dphi1dot = dphi1dotreal + dphi1dotimag*1j pottuple = m.potentials(myr) #Get potentials in right shape pt = [] for p in pottuple: if N.shape(p) != N.shape(pottuple[0]): pt.append(p*N.ones_like(pottuple[0])) else: pt.append(p) U, dU, dU2, dU3 = pt #Single time step a = m.ainit*N.exp(n) #Initialize result variable for k modes s2 = N.empty(s2shape) for kix, k in enumerate(m.k): #Single k mode #Result variable for source s1 = N.empty_like(m.k) for qix, q in enumerate(m.k): #Single q mode #Check abs(qix-kix)-1 is not negative dphi1ix = N.abs(qix-kix) -1 if dphi1ix < 0: dp1diff = dp1dotdiff = 0 else: dp1diff = dphi1[dphi1ix] dp1dotdiff = dphi1dot[dphi1ix] #First major term: term1 = (1/(2*N.pi**2) * (1/H[kix]**2) * (dU3[kix] + 3*phidot[kix]*dU2[kix]) * q**2*dp1diff*dphi1[qix]) #Second major term: term2 = (1/(2*N.pi**2) * ((1/(a*H[kix]) + 0.5)*q**2 - 2*(q**4/k**2)) * dp1dotdiff * dphi1dot[qix]) #Third major term: term3 = (1/(2*N.pi**2) * 1/(a*H[kix])**2 * (2*(q**6/k**2) + 2.5*q**4 + 2*(k*q)**2) * phidot[kix] * dp1diff * dphi1[qix]) s1[qix] = term1 + term2 + term3 #add sourceterm for each q s2[kix] = s1 #save results for each q sarr.append(s2[N.newaxis]) finally: #source = N.array(source) sf.close() except IOError: raise return savefile | 6b54f97aa02f920aaa135ad35cf0dcaaade8dc5e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7283/6b54f97aa02f920aaa135ad35cf0dcaaade8dc5e/sosource.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
3168,
14970,
7884,
12,
81,
16,
1923,
768,
33,
7036,
4672,
3536,
990,
1084,
2481,
261,
87,
821,
17,
2693,
364,
2037,
3631,
3647,
1122,
1353,
2619,
711,
2118,
7120,
12123,
225,
468,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
3168,
14970,
7884,
12,
81,
16,
1923,
768,
33,
7036,
4672,
3536,
990,
1084,
2481,
261,
87,
821,
17,
2693,
364,
2037,
3631,
3647,
1122,
1353,
2619,
711,
2118,
7120,
12123,
225,
468,
... |
def export_updateSoftware(self,version): | def export_updateSoftware( self, version ): | def export_updateSoftware(self,version): """ Update the local DIRAC software installation to version """ result = shellCall(0,DIRACROOT+'/scripts/update_sw.sh %s' % version) return result | 12be5ded5b2add0661f20d7fa8bd6def28fb091b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/12be5ded5b2add0661f20d7fa8bd6def28fb091b/SystemAdministratorHandler.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3359,
67,
2725,
21742,
12,
365,
16,
1177,
262,
30,
3536,
2315,
326,
1191,
18544,
2226,
17888,
13193,
358,
1177,
3536,
563,
273,
5972,
1477,
12,
20,
16,
4537,
2226,
9185,
6797,
19,
12827,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3359,
67,
2725,
21742,
12,
365,
16,
1177,
262,
30,
3536,
2315,
326,
1191,
18544,
2226,
17888,
13193,
358,
1177,
3536,
563,
273,
5972,
1477,
12,
20,
16,
4537,
2226,
9185,
6797,
19,
12827,... |
self._view.modelfield.set_client(self._view.model, model[iter][0]) | self._view.modelfield.set_client(self._view.model, int(model[iter][0])) | def on_completion_match(self, completion, model, iter): self._view.modelfield.set_client(self._view.model, model[iter][0]) self.display(self._view.model, self._view.modelfield) return True | 427c4500660a0fb83dbad6cbcd0b1a7f3a38f5a0 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9151/427c4500660a0fb83dbad6cbcd0b1a7f3a38f5a0/many2one.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
67,
11469,
67,
1916,
12,
2890,
16,
8364,
16,
938,
16,
1400,
4672,
365,
6315,
1945,
18,
2284,
1518,
18,
542,
67,
2625,
12,
2890,
6315,
1945,
18,
2284,
16,
509,
12,
2284,
63,
2165... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
11469,
67,
1916,
12,
2890,
16,
8364,
16,
938,
16,
1400,
4672,
365,
6315,
1945,
18,
2284,
1518,
18,
542,
67,
2625,
12,
2890,
6315,
1945,
18,
2284,
16,
509,
12,
2284,
63,
2165... |
list, tuple, or vector | list, tuple, or vector. | def frame3d(lower_left, upper_right, **kwds): """ Draw a frame in 3D. Primarily used as a helper function for creating frames for 3D graphics viewing. INPUT: - ``lower_left`` - the lower left corner of the frame, as a list, tuple, or vector - ``upper_right`` - the upper right corner of the frame, as a list, tuple, or vector Type ``line3d.options`` for a dictionary of the default options for lines, which are also available. EXAMPLES: A frame:: sage: from sage.plot.plot3d.shapes2 import frame3d sage: frame3d([1,3,2],vector([2,5,4]),color='red') This is usually used for making an actual plot:: sage: y = var('y') sage: plot3d(sin(x^2+y^2),(x,0,pi),(y,0,pi)) """ x0,y0,z0 = lower_left x1,y1,z1 = upper_right L1 = line3d([(x0,y0,z0), (x0,y1,z0), (x1,y1,z0), (x1,y0,z0), (x0,y0,z0), # top square (x0,y0,z1), (x0,y1,z1), (x1,y1,z1), (x1,y0,z1), (x0,y0,z1)], # bottom square **kwds) # 3 additional lines joining top to bottom v2 = line3d([(x0,y1,z0), (x0,y1,z1)], **kwds) v3 = line3d([(x1,y0,z0), (x1,y0,z1)], **kwds) v4 = line3d([(x1,y1,z0), (x1,y1,z1)], **kwds) F = L1 + v2 + v3 + v4 F._set_extra_kwds(kwds) return F | 25144c93b092a09ccf947d595af3b9e9d463ccf2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/25144c93b092a09ccf947d595af3b9e9d463ccf2/shapes2.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2623,
23,
72,
12,
8167,
67,
4482,
16,
3854,
67,
4083,
16,
2826,
25577,
4672,
3536,
10184,
279,
2623,
316,
890,
40,
18,
225,
2301,
381,
10243,
1399,
487,
279,
4222,
445,
364,
4979,
7793... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2623,
23,
72,
12,
8167,
67,
4482,
16,
3854,
67,
4083,
16,
2826,
25577,
4672,
3536,
10184,
279,
2623,
316,
890,
40,
18,
225,
2301,
381,
10243,
1399,
487,
279,
4222,
445,
364,
4979,
7793... |
resultDict.pop(taskID) gLogger.warn("Can not find corresponding site for se",se) return S_OK(resultDict) def deleteTasks(self,transName,taskIDbottom, taskIDtop,author='',connection=False): | resultDict.pop( taskID ) gLogger.warn( "Can not find corresponding site for se", se ) return S_OK( resultDict ) def deleteTasks( self, transName, taskIDbottom, taskIDtop, author = '', connection = False ): | def getTasksForSubmission(self,transName,numTasks=1,site='',statusList=['Created'],older=None,newer=None,connection=False): """ Select tasks with the given status (and site) for submission """ res = self._getConnectionTransID(connection,transName) if not res['OK']: return res connection = res['Value']['Connection'] transID = res['Value']['TransformationID'] condDict = {"TransformationID":transID} if statusList: condDict["ExternalStatus"] = statusList if site: numTasks=0 res = self.getTransformationTasks(condDict=condDict,older=older, newer=newer, timeStamp='CreationTime', orderAttribute=None, limit=numTasks,inputVector=True,connection=connection) if not res['OK']: return res tasks = res['Value'] # Prepare Site->SE resolution mapping selSEs = [] if site: res = getSEsForSite(site) if not res['OK']: return res selSEs = res['Value'] # Now prepare the tasks resultDict = {} for taskDict in tasks: if len(resultDict) >= numTasks: break taskDict['Status'] = taskDict.pop('ExternalStatus') taskDict['InputData'] = taskDict.pop('InputVector') taskDict.pop('LastUpdateTime') taskDict.pop('CreationTime') taskDict.pop('ExternalID') taskID = taskDict['TaskID'] se = taskDict['TargetSE'] resultDict[taskID] = taskDict if not site: if taskDict['InputData']: res = getSitesForSE(se,'LCG') if not res['OK']: continue usedSite = res['Value'] if len(usedSite) == 1: usedSite = usedSite[0] else: usedSite = 'ANY' resultDict[taskID]['Site'] = usedSite elif site and (se in selSEs): resultDict[taskID]['Site'] = usedSite else: resultDict.pop(taskID) gLogger.warn("Can not find corresponding site for se",se) return S_OK(resultDict) | 9ad007ea503b29694fc081c1646b7c5ecd07b1f2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/9ad007ea503b29694fc081c1646b7c5ecd07b1f2/TransformationDB.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
6685,
1290,
17865,
12,
2890,
16,
2338,
461,
16,
2107,
6685,
33,
21,
16,
4256,
2218,
2187,
2327,
682,
33,
3292,
6119,
17337,
1498,
33,
7036,
16,
2704,
264,
33,
7036,
16,
4071,
33,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
6685,
1290,
17865,
12,
2890,
16,
2338,
461,
16,
2107,
6685,
33,
21,
16,
4256,
2218,
2187,
2327,
682,
33,
3292,
6119,
17337,
1498,
33,
7036,
16,
2704,
264,
33,
7036,
16,
4071,
33,
... |
self.assertEquals(where.as_sql(), "(cn=\\28test\\29)") | self.assertEquals(where.as_sql(), ("(cn=\\28test\\29)", [])) | def test_char_field_exact(self): where = WhereNode() where.add((Constraint("cn", "cn", CharField()), 'exact', "test"), AND) self.assertEquals(where.as_sql(), "(cn=test)") | d16779d7edb93416524eae1081f4238208ccdc6b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12933/d16779d7edb93416524eae1081f4238208ccdc6b/tests.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
3001,
67,
1518,
67,
17165,
12,
2890,
4672,
1625,
273,
12177,
907,
1435,
1625,
18,
1289,
12443,
5806,
2932,
10305,
3113,
315,
10305,
3113,
3703,
974,
1435,
3631,
296,
17165,
2187,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3001,
67,
1518,
67,
17165,
12,
2890,
4672,
1625,
273,
12177,
907,
1435,
1625,
18,
1289,
12443,
5806,
2932,
10305,
3113,
315,
10305,
3113,
3703,
974,
1435,
3631,
296,
17165,
2187,... |
if special_char: encoded_char = special_char.decode(locale_encoding) temp_mod_name = 'test_imp_helper_' + encoded_char test_package_name = 'test_imp_helper_package_' + encoded_char init_file_name = os.path.join(test_package_name, '__init__.py') try: with open(temp_mod_name + '.py', 'w') as file: file.write('a = 1\n') file, filename, info = imp.find_module(temp_mod_name) self.assertNotEquals(None, file) self.assertTrue(filename[:-3].endswith(temp_mod_name)) self.assertEquals('.py', info[0]) self.assertEquals('U', info[1]) self.assertEquals(imp.PY_SOURCE, info[2]) | if not special_char: self.skipTest("can't run this test with %s as preferred encoding" % locale_encoding) decoded_char = special_char.decode(locale_encoding) temp_mod_name = 'test_imp_helper_' + decoded_char test_package_name = 'test_imp_helper_package_' + decoded_char init_file_name = os.path.join(test_package_name, '__init__.py') try: with open(temp_mod_name + '.py', 'w') as file: file.write('a = 1\n') file, filename, info = imp.find_module(temp_mod_name) self.assertNotEquals(None, file) self.assertTrue(filename[:-3].endswith(temp_mod_name)) self.assertEquals('.py', info[0]) self.assertEquals('U', info[1]) self.assertEquals(imp.PY_SOURCE, info[2]) | def test_issue5604(self): # Test cannot cover imp.load_compiled function. # Martin von Loewis note what shared library cannot have non-ascii # character because init_xxx function cannot be compiled # and issue never happens for dynamic modules. # But sources modified to follow generic way for processing pathes. | 9a7d5ac9f647bad9e48c98255ab54b71ec366127 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8546/9a7d5ac9f647bad9e48c98255ab54b71ec366127/test_imp.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
13882,
4313,
3028,
12,
2890,
4672,
468,
7766,
2780,
5590,
1646,
18,
945,
67,
19397,
445,
18,
468,
490,
485,
267,
331,
265,
3176,
359,
291,
4721,
4121,
5116,
5313,
2780,
1240,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
13882,
4313,
3028,
12,
2890,
4672,
468,
7766,
2780,
5590,
1646,
18,
945,
67,
19397,
445,
18,
468,
490,
485,
267,
331,
265,
3176,
359,
291,
4721,
4121,
5116,
5313,
2780,
1240,
... |
delta = (-1 if IS_MAC else 0) | def DrawEventRectangle(self, dc, rect, brush, radius, hasLeftRounded=False, hasTopRightRounded=True, hasBottomRightRounded=True, clipRightSide=False, addDashes = False, styles = None): """ Make a rounded rectangle, optionally specifying if the top and bottom right side of the rectangle should have rounded corners. Uses clip rect tricks to make sure it is drawn correctly. | e662fbce5562028070c8f92218749a881110202e /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9228/e662fbce5562028070c8f92218749a881110202e/CalendarCanvas.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10184,
1133,
19463,
12,
2890,
16,
6744,
16,
4917,
16,
5186,
1218,
16,
5725,
16,
711,
3910,
54,
12002,
33,
8381,
16,
711,
3401,
4726,
54,
12002,
33,
5510,
16,
711,
10393,
4726,
54,
1200... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10184,
1133,
19463,
12,
2890,
16,
6744,
16,
4917,
16,
5186,
1218,
16,
5725,
16,
711,
3910,
54,
12002,
33,
8381,
16,
711,
3401,
4726,
54,
12002,
33,
5510,
16,
711,
10393,
4726,
54,
1200... | |
""" Check that a page handler actually wrote something, and properly finish the apache request.""" | """ Check that a page handler actually wrote something, and properly finish the apache request. @param req: the request. @param result: the produced output. @type result: string @return: an apache error code @rtype: int @raise apache.SERVER_RETURN: in case of a HEAD request. @note: that this function actually takes care of writing the result to the client. """ | def _check_result(req, result): """ Check that a page handler actually wrote something, and properly finish the apache request.""" if result or req.bytes_sent > 0: if result is None: result = "" else: result = str(result) # unless content_type was manually set, we will attempt # to guess it if not req.content_type_set_p: # make an attempt to guess content-type if result[:100].strip()[:6].lower() == '<html>' \ or result.find('</') > 0: req.content_type = 'text/html' else: req.content_type = 'text/plain' if req.header_only: if req.status in (apache.HTTP_NOT_FOUND, ): raise apache.SERVER_RETURN, req.status else: req.write(result) return apache.OK else: req.log_error("publisher: %s returned nothing." % `object`) return apache.HTTP_INTERNAL_SERVER_ERROR | 34e3759fd8d988daf736478f488636d4ab5bc8a2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2111/34e3759fd8d988daf736478f488636d4ab5bc8a2/webinterface_handler.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1893,
67,
2088,
12,
3658,
16,
563,
4672,
3536,
2073,
716,
279,
1363,
1838,
6013,
341,
21436,
5943,
16,
471,
8214,
4076,
326,
12291,
590,
18,
225,
632,
891,
1111,
30,
326,
590,
18,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1893,
67,
2088,
12,
3658,
16,
563,
4672,
3536,
2073,
716,
279,
1363,
1838,
6013,
341,
21436,
5943,
16,
471,
8214,
4076,
326,
12291,
590,
18,
225,
632,
891,
1111,
30,
326,
590,
18,... |
'today': True, | 'today': False, | def __init__(self): super(Date, self).__init__() self._rpc.update({ 'today': True, }) | 5d672dcfb6297e6eaed1d850e8bd4d5b0ca60e51 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9266/5d672dcfb6297e6eaed1d850e8bd4d5b0ca60e51/date.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
2240,
12,
1626,
16,
365,
2934,
972,
2738,
972,
1435,
365,
6315,
7452,
18,
2725,
12590,
296,
30064,
4278,
1083,
16,
289,
13,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
2240,
12,
1626,
16,
365,
2934,
972,
2738,
972,
1435,
365,
6315,
7452,
18,
2725,
12590,
296,
30064,
4278,
1083,
16,
289,
13,
2,
-100,
-100,
-100,
-100,
... |
def _main(): | if __name__ == '__main__': | def _main(): from optparse import OptionParser version = '%prog ' + __revision__.strip('$').replace('Rev: ', 'r') parser = OptionParser(version=version) parser.add_option('-i', dest='interface', action='store', type='string', metavar='<ip>', default='', help="listen on this interface only (default all)") parser.add_option('-p', dest='port', action='store', type='int', metavar='<number>', default=8080, help="listen on this port number (default 8080)") parser.add_option('-d', dest='download', action='store', type='float', metavar='<kbps>', default=28.8, help="download bandwidth in kbps (default 28.8)") parser.add_option('-u', dest='upload', action='store', type='float', metavar='<kbps>', default=28.8, help="upload bandwidth in kbps (default 28.8)") parser.add_option('-R', dest='allow_remote', default=False, action='store_true', help="allow remote clients (WARNING: open proxy)") options, args = parser.parse_args() monitor = BandwidthMonitor( int(options.upload * KILO) / 8, int(options.download * KILO) / 8) proxy = ProxyServer(options.interface, options.port, monitor, options.allow_remote) try: asyncore.loop(timeout=0.1) except: proxy.shutdown(2) proxy.close() raise | 725dbcf9e6a2f04d073a510ec639ef16f089cda5 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3111/725dbcf9e6a2f04d073a510ec639ef16f089cda5/throxy.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
309,
1001,
529,
972,
422,
4940,
5254,
972,
4278,
628,
2153,
2670,
1930,
18862,
1177,
273,
1995,
14654,
296,
397,
1001,
13057,
25648,
6406,
2668,
9227,
2934,
2079,
2668,
10070,
30,
2265,
296,
86,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
309,
1001,
529,
972,
422,
4940,
5254,
972,
4278,
628,
2153,
2670,
1930,
18862,
1177,
273,
1995,
14654,
296,
397,
1001,
13057,
25648,
6406,
2668,
9227,
2934,
2079,
2668,
10070,
30,
2265,
296,
86,... |
row("total number of files", model.totalfiles, " "), | row("total number of files", model.totalfiles, raw(" ")), | def viewlocsummary(model): t = html.table( row("total number of lines", model.totallines, " "), row("number of testlines", model.testlines, percent(model.testlines, model.totallines)), row("number of non-testlines", model.notestlines, percent(model.notestlines, model.totallines)), row("total number of files", model.totalfiles, " "), row("number of testfiles", model.testfiles, percent(model.testfiles, model.totalfiles)), row("number of non-testfiles", model.notestfiles, percent(model.notestfiles, model.totalfiles)), ) if model.docfiles: t.append(row("number of docfiles", model.docfiles, percent(model.docfiles, model.totalfiles))) t.append(row("number of doclines", model.doclines, percent(model.doclines, model.totallines))) return t | c32907d3f15eb3268a98e1b8aef84e19dd8bd094 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6934/c32907d3f15eb3268a98e1b8aef84e19dd8bd094/genstatistic.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1476,
1829,
7687,
12,
2284,
4672,
268,
273,
1729,
18,
2121,
12,
1027,
2932,
4963,
1300,
434,
2362,
3113,
938,
18,
3307,
454,
1465,
16,
7830,
10600,
4868,
3631,
1027,
2932,
2696,
434,
184... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1476,
1829,
7687,
12,
2284,
4672,
268,
273,
1729,
18,
2121,
12,
1027,
2932,
4963,
1300,
434,
2362,
3113,
938,
18,
3307,
454,
1465,
16,
7830,
10600,
4868,
3631,
1027,
2932,
2696,
434,
184... |
value=utils.weighted_average(val, err2, start, end) | value = utils.weighted_average(val, err2, start, end) | def weighted_average(obj,**kwargs): """ This function takes a SOM or SO and calculates the weighted average for the primary axis. Parameters: ---------- -> obj is a SOM or SO that will have the weighted average calculated from it -> kwargs is a list of key word arguments that the function accepts: start=<index of starting bin> end=<index of ending bin> Return: ------ <- A tuple (for a SO) or a list of tuples (for a SOM) containing the weighted average and the uncertainty squared associated with the weighted average Exceptions: ---------- <- TypeError is raised if a tuple or another construct (besides a SOM or SO) is passed to the function """ # import the helper functions import hlr_utils # set up for working through data # This time highest object in the hierarchy is NOT what we need result = [] if(hlr_utils.get_length(obj) > 1): res_descr = "list" else: res_descr = "number" (o_descr,d_descr)=hlr_utils.get_descr(obj) if(kwargs.has_key("start")): start=int(kwargs["start"]) else: start=0 if(kwargs.has_key("end")): end=int(kwargs["end"]) else: end=hlr_utils.get_length(obj)-1 result=hlr_utils.copy_som_attr(result,res_descr,obj,o_descr) # iterate through the values import utils for i in range(hlr_utils.get_length(obj)): val = hlr_utils.get_value(obj,i,o_descr,"y") err2 = hlr_utils.get_err2(obj,i,o_descr,"y") value=utils.weighted_average(val, err2, start, end) hlr_utils.result_insert(result,res_descr,value,None,"all") import copy return copy.deepcopy(result) | ab79edf433672f6155274e6964e46e97c3dbeb1c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/763/ab79edf433672f6155274e6964e46e97c3dbeb1c/hlr_weighted_average.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13747,
67,
15621,
12,
2603,
16,
636,
4333,
4672,
3536,
1220,
445,
5530,
279,
348,
1872,
578,
7460,
471,
17264,
326,
13747,
8164,
364,
326,
3354,
2654,
18,
225,
7012,
30,
12181,
317,
1081... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13747,
67,
15621,
12,
2603,
16,
636,
4333,
4672,
3536,
1220,
445,
5530,
279,
348,
1872,
578,
7460,
471,
17264,
326,
13747,
8164,
364,
326,
3354,
2654,
18,
225,
7012,
30,
12181,
317,
1081... |
if self.is_finite(): | if not self.is_finite(): | def cardinality(self): """ Return the cardinality of this set, which is either an integer or Infinity. | 07be4f823b0ad423229a252fc851b2c02eea5b30 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/07be4f823b0ad423229a252fc851b2c02eea5b30/set.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
14379,
12,
2890,
4672,
3536,
2000,
326,
14379,
434,
333,
444,
16,
1492,
353,
3344,
392,
3571,
578,
19454,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
14379,
12,
2890,
4672,
3536,
2000,
326,
14379,
434,
333,
444,
16,
1492,
353,
3344,
392,
3571,
578,
19454,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
This worker is run in a seperate process. | This worker is run in a separate process. | def _process_worker(call_queue, result_queue, shutdown): """Evaluates calls from call_queue and places the results in result_queue. This worker is run in a seperate process. Args: call_queue: A multiprocessing.Queue of _CallItems that will be read and evaluated by the worker. result_queue: A multiprocessing.Queue of _ResultItems that will written to by the worker. shutdown: A multiprocessing.Event that will be set as a signal to the worker that it should exit when call_queue is empty. """ while True: try: call_item = call_queue.get(block=True, timeout=0.1) except queue.Empty: if shutdown.is_set(): return else: try: r = call_item.fn(*call_item.args, **call_item.kwargs) except BaseException as e: result_queue.put(_ResultItem(call_item.work_id, exception=e)) else: result_queue.put(_ResultItem(call_item.work_id, result=r)) | 277c68b4daa19e9b05a2066895aface9063ce0d4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12029/277c68b4daa19e9b05a2066895aface9063ce0d4/process.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2567,
67,
10124,
12,
1991,
67,
4000,
16,
563,
67,
4000,
16,
5731,
4672,
3536,
23533,
4097,
628,
745,
67,
4000,
471,
12576,
326,
1686,
316,
563,
67,
4000,
18,
225,
1220,
4322,
353,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2567,
67,
10124,
12,
1991,
67,
4000,
16,
563,
67,
4000,
16,
5731,
4672,
3536,
23533,
4097,
628,
745,
67,
4000,
471,
12576,
326,
1686,
316,
563,
67,
4000,
18,
225,
1220,
4322,
353,... |
iface, impl = name_to_impl[bit] | iface, impl, arch = name_to_impl[bit] | def add_iface(uri, arch): """Name implementations from feed, assign costs and assert that one one can be selected.""" if uri in ifaces_processed: return ifaces_processed.add(uri) iface_name = 'i%d' % len(ifaces_processed) | 610ea29b0e86a2424837dec24b74503f8b98810a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10543/610ea29b0e86a2424837dec24b74503f8b98810a/solver.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
67,
31479,
12,
1650,
16,
6637,
4672,
3536,
461,
16164,
628,
4746,
16,
2683,
22793,
471,
1815,
716,
1245,
1245,
848,
506,
3170,
12123,
309,
2003,
316,
309,
2307,
67,
11005,
30,
327,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
67,
31479,
12,
1650,
16,
6637,
4672,
3536,
461,
16164,
628,
4746,
16,
2683,
22793,
471,
1815,
716,
1245,
1245,
848,
506,
3170,
12123,
309,
2003,
316,
309,
2307,
67,
11005,
30,
327,
... |
self.SetToolBitmapSize(wx.Size(16,16)) | self._size = 16 self.SetToolBitmapSize(wx.Size(self._size,self._size)) | def __init__(self, parent): wx.ToolBar.__init__(self, parent, -1, wx.DefaultPosition, wx.DefaultSize, wx.TB_FLAT|wx.TB_NODIVIDER) if sys.platform == 'darwin': self.SetToolBitmapSize(wx.Size(25,25)) else: self.SetToolBitmapSize(wx.Size(16,16)) self.parent = parent self.__init_items() self.__bind_events() | 7b2c767a7799f85e09921f72c3bc22f8711533e9 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10228/7b2c767a7799f85e09921f72c3bc22f8711533e9/frame.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
982,
4672,
7075,
18,
6364,
5190,
16186,
2738,
972,
12,
2890,
16,
982,
16,
300,
21,
16,
7075,
18,
1868,
2555,
16,
7075,
18,
1868,
1225,
16,
7075,
18,
25... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
982,
4672,
7075,
18,
6364,
5190,
16186,
2738,
972,
12,
2890,
16,
982,
16,
300,
21,
16,
7075,
18,
1868,
2555,
16,
7075,
18,
1868,
1225,
16,
7075,
18,
25... |
imagedata = DupePage.getFileVersionHistory()[-1][0] try: data = time.strptime(imagedata, "%H:%M, %d %b %Y") except ValueError: data = time.strptime(imagedata, "%H:%M, %d %B %Y") | imagedata = DupePage.getLatestUploader()[1] data = time.strptime(imagedata, "%Y-%m-%dT%H:%M:%SZ") | def checkImageDuplicated(self, image): """ Function to check the duplicated images. """ # {{Dupe|Image:Blanche_Montel.jpg}} dupText = wikipedia.translate(self.site, duplicatesText) dupRegex = wikipedia.translate(self.site, duplicatesRegex) dupTalkHead = wikipedia.translate(self.site, duplicate_user_talk_head) dupTalkText = wikipedia.translate(self.site, duplicates_user_talk_text) dupComment_talk = wikipedia.translate(self.site, duplicates_comment_talk) dupComment_image = wikipedia.translate(self.site, duplicates_comment_image) | 820243cac73319191b4863f66386e3a2af6a5ddc /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4404/820243cac73319191b4863f66386e3a2af6a5ddc/checkimages.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
2040,
19682,
690,
12,
2890,
16,
1316,
4672,
3536,
4284,
358,
866,
326,
16975,
4602,
18,
3536,
468,
10179,
40,
89,
347,
96,
2040,
30,
4802,
304,
18706,
67,
49,
1580,
292,
18,
14362... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
2040,
19682,
690,
12,
2890,
16,
1316,
4672,
3536,
4284,
358,
866,
326,
16975,
4602,
18,
3536,
468,
10179,
40,
89,
347,
96,
2040,
30,
4802,
304,
18706,
67,
49,
1580,
292,
18,
14362... |
if self.debug > 0: print 'running calculation_required' | log.debug('running calculation_required') | def calculation_required(self, atoms=None, quantities=None): ''' determines if a calculation is needed. | efb0053a692e68241ce5b5d3e00d105383545b1a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5572/efb0053a692e68241ce5b5d3e00d105383545b1a/jacapo.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11096,
67,
4718,
12,
2890,
16,
9006,
33,
7036,
16,
10251,
1961,
33,
7036,
4672,
9163,
12949,
309,
279,
11096,
353,
3577,
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,
11096,
67,
4718,
12,
2890,
16,
9006,
33,
7036,
16,
10251,
1961,
33,
7036,
4672,
9163,
12949,
309,
279,
11096,
353,
3577,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
self.send_header('Cache-control', 'must-revalidate') | self.send_header('Cache-Control', 'must-revalidate') | def send_error(self, exc_info, template='error.html', content_type='text/html', status=500, env=None, data={}): try: if template.endswith('.cs') and self.hdf: # FIXME: remove this if self.args.has_key('hdfdump'): self.perm.require('TRAC_ADMIN') content_type = 'text/plain' data = str(self.hdf) else: data = self.hdf.render(template) | 4e24ececa69c28c268afffd5eaf4d03f6df65428 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2831/4e24ececa69c28c268afffd5eaf4d03f6df65428/api.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1366,
67,
1636,
12,
2890,
16,
3533,
67,
1376,
16,
1542,
2218,
1636,
18,
2620,
2187,
913,
67,
723,
2218,
955,
19,
2620,
2187,
1267,
33,
12483,
16,
1550,
33,
7036,
16,
501,
12938,
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,
1366,
67,
1636,
12,
2890,
16,
3533,
67,
1376,
16,
1542,
2218,
1636,
18,
2620,
2187,
913,
67,
723,
2218,
955,
19,
2620,
2187,
1267,
33,
12483,
16,
1550,
33,
7036,
16,
501,
12938,
4672,
... |
if not internal and self.haslayer(Padding): p += self.getlayer(Padding).load | if not internal: pkt = self while pkt.haslayer(Padding): pkt = pkt.getlayer(Padding) p += pkt.load pkt = pkt.payload | def build(self,internal=0): p = self.post_build(self.do_build()) if not internal and self.haslayer(Padding): p += self.getlayer(Padding).load return p | 5faca6204c5d17e04983bc9b5b920220eef6dab5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7311/5faca6204c5d17e04983bc9b5b920220eef6dab5/scapy.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1361,
12,
2890,
16,
7236,
33,
20,
4672,
293,
273,
365,
18,
2767,
67,
3510,
12,
2890,
18,
2896,
67,
3510,
10756,
309,
486,
2713,
30,
11536,
273,
365,
1323,
11536,
18,
5332,
6363,
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,
1361,
12,
2890,
16,
7236,
33,
20,
4672,
293,
273,
365,
18,
2767,
67,
3510,
12,
2890,
18,
2896,
67,
3510,
10756,
309,
486,
2713,
30,
11536,
273,
365,
1323,
11536,
18,
5332,
6363,
12,
... |
config = type('config', (object,), {'command_char': '!'}) | config = {'command_char': '!'} | def test_privmsg_command_char(self): '''Calling bot.privmsg with custom command char''' # set up command char config _COMMAND_CHAR = ircbot.COMMAND_CHAR | 6b75b1f25506c5f8b27aad76f81b2f775743bae2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5759/6b75b1f25506c5f8b27aad76f81b2f775743bae2/test_events.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
11365,
3576,
67,
3076,
67,
3001,
12,
2890,
4672,
9163,
19677,
2512,
18,
11365,
3576,
598,
1679,
1296,
1149,
26418,
468,
444,
731,
1296,
1149,
642,
389,
19104,
67,
7305,
273,
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,
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,
11365,
3576,
67,
3076,
67,
3001,
12,
2890,
4672,
9163,
19677,
2512,
18,
11365,
3576,
598,
1679,
1296,
1149,
26418,
468,
444,
731,
1296,
1149,
642,
389,
19104,
67,
7305,
273,
27... |
os.environ['PATH'] = self.streamit_home + \ ":/usr/uns/jdk1.5.0_01/bin" + \ ":/usr/uns/bin:/usr/bin/X11:/bin:/usr/bin" | os.environ['PATH'] = self.streamit_home + ':' + fixed_path | def make_paths(self): self.working_dir = regtest_root + "/" + self.get_clean_timedate_stamp() self.streamit_home = os.path.join(self.working_dir, 'streams') # Are changes to os.environm passed on through spawn and open2? os.environ['STREAMIT_HOME'] = self.streamit_home #os.environ['TOPDIR'] = os.path.join(self.streamit_home, 'misc', 'raw') os.environ['TOPDIR'] = '/home/bits6/mgordon/starsearch' os.environ['PATH'] = self.streamit_home + \ ":/usr/uns/jdk1.5.0_01/bin" + \ ":/usr/uns/bin:/usr/bin/X11:/bin:/usr/bin" | b0e1170efef37d711fa81b630021308784b25708 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8781/b0e1170efef37d711fa81b630021308784b25708/run-reg-tests.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1221,
67,
4481,
12,
2890,
4672,
365,
18,
20478,
67,
1214,
273,
960,
3813,
67,
3085,
397,
4016,
397,
365,
18,
588,
67,
6200,
67,
20905,
340,
67,
14317,
1435,
365,
18,
3256,
305,
67,
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,
1221,
67,
4481,
12,
2890,
4672,
365,
18,
20478,
67,
1214,
273,
960,
3813,
67,
3085,
397,
4016,
397,
365,
18,
588,
67,
6200,
67,
20905,
340,
67,
14317,
1435,
365,
18,
3256,
305,
67,
8... |
bb.msg.debug(1, bb.msg.domain.Provider, "selecting %s as PREFERRED_VERSION %s of package %s" % (preferred_file, pv_str, pn)) | bb.msg.debug(1, bb.msg.domain.Provider, "selecting %s as PREFERRED_VERSION %s of package %s%s" % (preferred_file, pv_str, pn, itemstr)) | def findBestProvider(pn, cfgData, dataCache, pkg_pn = None): """ If there is a PREFERRED_VERSION, find the highest-priority bbfile providing that version. If not, find the latest version provided by an bbfile in the highest-priority set. """ if not pkg_pn: pkg_pn = dataCache.pkg_pn files = pkg_pn[pn] priorities = {} for f in files: priority = dataCache.bbfile_priority[f] if priority not in priorities: priorities[priority] = [] priorities[priority].append(f) p_list = priorities.keys() p_list.sort(lambda a, b: a - b) tmp_pn = [] for p in p_list: tmp_pn = [priorities[p]] + tmp_pn preferred_file = None localdata = data.createCopy(cfgData) bb.data.setVar('OVERRIDES', "%s:%s" % (pn, data.getVar('OVERRIDES', localdata)), localdata) bb.data.update_data(localdata) preferred_v = bb.data.getVar('PREFERRED_VERSION_%s' % pn, localdata, True) if preferred_v: m = re.match('(.*)_(.*)', preferred_v) if m: preferred_v = m.group(1) preferred_r = m.group(2) else: preferred_r = None for file_set in tmp_pn: for f in file_set: pv,pr = dataCache.pkg_pvpr[f] if preferred_v == pv and (preferred_r == pr or preferred_r == None): preferred_file = f preferred_ver = (pv, pr) break if preferred_file: break; if preferred_r: pv_str = '%s-%s' % (preferred_v, preferred_r) else: pv_str = preferred_v if preferred_file is None: bb.msg.note(1, bb.msg.domain.Provider, "preferred version %s of %s not available" % (pv_str, pn)) else: bb.msg.debug(1, bb.msg.domain.Provider, "selecting %s as PREFERRED_VERSION %s of package %s" % (preferred_file, pv_str, pn)) del localdata # get highest priority file set files = tmp_pn[0] latest = None latest_p = 0 latest_f = None for file_name in files: pv,pr = dataCache.pkg_pvpr[file_name] dp = dataCache.pkg_dp[file_name] if (latest is None) or ((latest_p == dp) and (utils.vercmp(latest, (pv, pr)) < 0)) or (dp > latest_p): latest = (pv, pr) latest_f = file_name latest_p = dp if preferred_file is None: preferred_file = latest_f preferred_ver = latest return (latest,latest_f,preferred_ver, preferred_file) | f02e98377460564c581d61ba6bc6ad493f67c1f1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2672/f02e98377460564c581d61ba6bc6ad493f67c1f1/providers.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1104,
14173,
2249,
12,
7449,
16,
2776,
751,
16,
501,
1649,
16,
3475,
67,
7449,
273,
599,
4672,
3536,
971,
1915,
353,
279,
19175,
67,
5757,
16,
1104,
326,
9742,
17,
8457,
7129,
768,
177... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1104,
14173,
2249,
12,
7449,
16,
2776,
751,
16,
501,
1649,
16,
3475,
67,
7449,
273,
599,
4672,
3536,
971,
1915,
353,
279,
19175,
67,
5757,
16,
1104,
326,
9742,
17,
8457,
7129,
768,
177... |
that if it returns `False` the sub-scopes are not ignored. That is it is assumed that `should_analyze` returns `False for all of its subscopes. | that if it returns `False` the sub-scopes are all ignored. That is it is assumed that `should_analyze` returns `False` for all of its subscopes. | def analyze_module(self, resource, should_analyze=lambda py: True, search_subscopes=lambda py: True, followed_calls=None): """Analyze `resource` module for static object inference | 1f0cd6db3e75853206b4f2f663bf332e5ca48167 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8286/1f0cd6db3e75853206b4f2f663bf332e5ca48167/pycore.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12375,
67,
2978,
12,
2890,
16,
1058,
16,
1410,
67,
304,
9508,
33,
14661,
2395,
30,
1053,
16,
1623,
67,
1717,
17915,
33,
14661,
2395,
30,
1053,
16,
10860,
67,
12550,
33,
7036,
4672,
353... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12375,
67,
2978,
12,
2890,
16,
1058,
16,
1410,
67,
304,
9508,
33,
14661,
2395,
30,
1053,
16,
1623,
67,
1717,
17915,
33,
14661,
2395,
30,
1053,
16,
10860,
67,
12550,
33,
7036,
4672,
353... |
"""Fail if the two objects are unequal as determined by the '!=' | """Fail if the two objects are unequal as determined by the '==' | def failUnlessEqual(self, first, second, msg=None): """Fail if the two objects are unequal as determined by the '!=' operator. """ if first != second: raise self.failureException, \ (msg or '%s != %s' % (`first`, `second`)) | 11ff6a48747f91a816288da36fa99b0727ae78b2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/11ff6a48747f91a816288da36fa99b0727ae78b2/unittest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2321,
984,
2656,
5812,
12,
2890,
16,
1122,
16,
2205,
16,
1234,
33,
7036,
4672,
3536,
3754,
309,
326,
2795,
2184,
854,
640,
9729,
487,
11383,
635,
326,
22853,
3726,
18,
3536,
309,
1122,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2321,
984,
2656,
5812,
12,
2890,
16,
1122,
16,
2205,
16,
1234,
33,
7036,
4672,
3536,
3754,
309,
326,
2795,
2184,
854,
640,
9729,
487,
11383,
635,
326,
22853,
3726,
18,
3536,
309,
1122,
... |
md.push(treeData) | md._push(treeData) | def tpRender(self, md, section, args): data=[] try: # see if we are being run as a sub-document root=md['tree-root-url'] url=md['tree-item-url'] state=md['tree-state'] or md['state'] substate=md['-tree-substate-'] colspan=md['tree-colspan'] level=md['tree-level'] except KeyError: # Check for collapse all, expand all, and state try: collapse_all=md['collapse_all'] except: collapse_all=None if collapse_all: state=[] else: try: expand_all=md['expand_all'] except: expand_all=None if expand_all: state=tpValuesIds(self) else: try: state=md['tree-state'] or md['state'] or md['-tree-state-'] if state[0] != '[': state=unquote(state) state=list(eval(state,{'__builtins__':{}})) except: state=[] colspan=1+tpStateLevel(state) level = 0 substate=state root=md['URL'] l=rfind(root, '/') if l >= 0: root=root[l+1:] url='' # Save state in a cookie if state: md['RESPONSE'].setCookie('tree-state',quote(str(state)[1:-1]+',')) else: md['RESPONSE'].expireCookie('tree-state') if substate==state: data.append('<TABLE CELLSPACING="0">\n') #level=0 treeData={'tree-root-url': root, 'tree-colspan': colspan, 'tree-state': state } md.push(treeData) try: for item in self.tpValues(): data=tpRenderTABLE(item,root,url,state,substate,data,colspan, section,md,treeData, level, args) if state is substate: data.append('</TABLE>\n') result=join(data,'') finally: md.pop(1) return result | 4bfabee08bc58b7d857ce85c5add2cdd6cc571dd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/4bfabee08bc58b7d857ce85c5add2cdd6cc571dd/TreeTag.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8071,
3420,
12,
2890,
16,
3481,
16,
2442,
16,
833,
4672,
501,
33,
8526,
225,
775,
30,
468,
2621,
309,
732,
854,
3832,
1086,
487,
279,
720,
17,
5457,
1365,
33,
1264,
3292,
3413,
17,
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,
8071,
3420,
12,
2890,
16,
3481,
16,
2442,
16,
833,
4672,
501,
33,
8526,
225,
775,
30,
468,
2621,
309,
732,
854,
3832,
1086,
487,
279,
720,
17,
5457,
1365,
33,
1264,
3292,
3413,
17,
3... |
trac.addTicketChange(ticket=bugid, time=activity['bug_when'], author=trac.getLoginName(mysql_cur, activity['who']), field='keywords', oldvalue=oldKeywords, newvalue=newKeywords) | ticketChangeKw = ticketChange ticketChangeKw['field'] = 'keywords' ticketChangeKw['oldvalue'] = oldKeywords ticketChangeKw['newvalue'] = newKeywords ticketChanges.append(ticketChangeKw) | def convert(_db, _host, _user, _password, _env, _force): activityFields = FieldTranslator() # account for older versions of bugzilla if BZ_VERSION == '2.11': print 'Using Buzvilla v%s schema.' % BZ_VERSION activityFields['removed'] = 'oldvalue' activityFields['added'] = 'newvalue' # init Bugzilla environment print "Bugzilla MySQL('%s':'%s':'%s':'%s'): connecting..." % (_db, _host, _user, _password) mysql_con = MySQLdb.connect(host=_host, user=_user, passwd=_password, db=_db, compress=1, cursorclass=MySQLdb.cursors.DictCursor) mysql_cur = mysql_con.cursor() # init Trac environment print "Trac SQLite('%s'): connecting..." % (_env) trac = TracDatabase(_env) # force mode... if _force == 1: print "cleaning all tickets..." c = trac.db().cursor() c.execute("""DELETE FROM ticket_change""") trac.db().commit() c.execute("""DELETE FROM ticket""") trac.db().commit() c.execute("""DELETE FROM attachment""") os.system('rm -rf %s' % trac.env.get_attachments_dir()) os.mkdir(trac.env.get_attachments_dir()) trac.db().commit() print print "1. import severities..." severities = (('blocker', '1'), ('critical', '2'), ('major', '3'), ('normal', '4'), ('minor', '5'), ('trivial', '6'), ('enhancement', '7')) trac.setSeverityList(severities) print print "2. import components..." sql = "SELECT DISTINCTROW value FROM components" if PRODUCTS: sql += " WHERE %s" % productFilter('program', PRODUCTS) mysql_cur.execute(sql) components = mysql_cur.fetchall() trac.setComponentList(components, 'value') print print "3. import priorities..." priorities = (('P1', '1'), ('P2', '2'), ('P3', '3'), ('P4', '4'), ('P5', '5')) trac.setPriorityList(priorities) print print "4. import versions..." sql = "SELECT DISTINCTROW value FROM versions" if PRODUCTS: sql += " WHERE %s" % productFilter('program', PRODUCTS) mysql_cur.execute(sql) versions = mysql_cur.fetchall() trac.setVersionList(versions, 'value') print print "5. import milestones..." mysql_cur.execute("SELECT value FROM milestones") milestones = mysql_cur.fetchall() if milestones[0] == '---': trac.setMilestoneList(milestones, 'value') else: trac.setMilestoneList([], '') print print '6. retrieving bugs...' sql = "SELECT * FROM bugs " if PRODUCTS: sql += " WHERE %s" % productFilter('product', PRODUCTS) sql += " ORDER BY bug_id" mysql_cur.execute(sql) bugs = mysql_cur.fetchall() print print "7. import bugs and bug activity..." for bug in bugs: bugid = bug['bug_id'] ticket = {} keywords = [] ticket['id'] = bugid ticket['time'] = bug['creation_ts'] ticket['changetime'] = bug['delta_ts'] ticket['component'] = bug['component'] ticket['severity'] = bug['bug_severity'] ticket['priority'] = bug['priority'] ticket['owner'] = trac.getLoginName(mysql_cur, bug['assigned_to']) ticket['reporter'] = trac.getLoginName(mysql_cur, bug['reporter']) mysql_cur.execute("SELECT * FROM cc WHERE bug_id = %s" % bugid) cc_records = mysql_cur.fetchall() cc_list = [] for cc in cc_records: cc_list.append(trac.getLoginName(mysql_cur, cc['who'])) ticket['cc'] = string.join(cc_list, ', ') ticket['version'] = bug['version'] if bug['target_milestone'] == '---': ticket['milestone'] = '' else: ticket['milestone'] = bug['target_milestone'] bug_status = bug['bug_status'].lower() ticket['status'] = statusXlator[bug_status] ticket['resolution'] = bug['resolution'].lower() # a bit of extra work to do open tickets if bug_status == 'open': if owner != '': ticket['status'] = 'assigned' else: ticket['status'] = 'new' ticket['summary'] = bug['short_desc'] keywords = string.split(bug['keywords'], ' ') mysql_cur.execute("SELECT * FROM longdescs WHERE bug_id = %s" % bugid) longdescs = list(mysql_cur.fetchall()) # check for empty 'longdescs[0]' field... if len(longdescs) == 0: ticket['description'] = '' else: ticket['description'] = longdescs[0]['thetext'] del longdescs[0] for desc in longdescs: ignore = False for comment in IGNORE_COMMENTS: if re.match(comment, desc['thetext']): ignore = True if ignore: continue trac.addTicketComment(ticket=bugid, time=desc['bug_when'], author=trac.getLoginName(mysql_cur, desc['who']), value=desc['thetext']) mysql_cur.execute("SELECT * FROM bugs_activity WHERE bug_id = %s ORDER BY bug_when" % bugid) bugs_activity = mysql_cur.fetchall() resolution = '' for activity in bugs_activity: field_name = trac.getFieldName(mysql_cur, activity['fieldid']).lower() removed = activity[activityFields['removed']] added = activity[activityFields['added']] # statuses and resolutions are in lowercase in trac if field_name == 'resolution' or field_name == 'bug_status': removed = removed.lower() added = added.lower() # remember most recent resolution, we need this later if field_name == 'resolution': resolution = added.lower() keywordChange = False oldKeywords = string.join(keywords, " ") # convert bugzilla field names... if field_name == 'bug_severity': field_name = 'severity' elif field_name == 'assigned_to': field_name = 'owner' elif field_name == 'bug_status': field_name = 'status' if removed in STATUS_KEYWORDS: kw = STATUS_KEYWORDS[removed] if kw in keywords: keywords.remove(kw) else: oldKeywords = string.join(keywords + [ kw ], " ") keywordChange = True if added in STATUS_KEYWORDS: kw = STATUS_KEYWORDS[added] keywords.append(kw) keywordChange = True added = statusXlator[added] removed = statusXlator[removed] elif field_name == 'short_desc': field_name = 'summary' elif field_name == 'product': if removed in PRODUCT_KEYWORDS: kw = PRODUCT_KEYWORDS[removed] if kw in keywords: keywords.remove(kw) else: oldKeywords = string.join(keywords + [ kw ], " ") keywordChange = True if added in PRODUCT_KEYWORDS: kw = PRODUCT_KEYWORDS[added] keywords.append(kw) keywordChange = True if keywordChange: newKeywords = string.join(keywords, " ") trac.addTicketChange(ticket=bugid, time=activity['bug_when'], author=trac.getLoginName(mysql_cur, activity['who']), field='keywords', oldvalue=oldKeywords, newvalue=newKeywords) if field_name in IGNORED_ACTIVITY_FIELDS: continue # skip changes that have no effect (think translation!) if added == removed: continue trac.addTicketChange(ticket=bugid, time=activity['bug_when'], author=trac.getLoginName(mysql_cur, activity['who']), field=field_name, oldvalue=removed, newvalue=added) # for some reason, bugzilla v2.11 seems to clear the resolution # when you mark a bug as closed. let's remember it and restore # it if the ticket is closed but there's no resolution. if not ticket['resolution'] and ticket['status'] == 'closed': ticket['resolution'] = resolution if bug['bug_status'] in STATUS_KEYWORDS: kw = STATUS_KEYWORDS[bug['bug_status']] # may have already been added during activity import if kw not in keywords: keywords.append(kw) if bug['product'] in PRODUCT_KEYWORDS: kw = PRODUCT_KEYWORDS[bug['product']] # may have already been added during activity import if kw not in keywords: keywords.append(kw) mysql_cur.execute("SELECT * FROM attachments WHERE bug_id = %s" % bugid) attachments = mysql_cur.fetchall() for a in attachments: author = trac.getLoginName(mysql_cur, a['submitter_id']) tracAttachment = Attachment(a['filename'], a['thedata']) trac.addAttachment(bugid, tracAttachment, a['description'], author) ticket['keywords'] = string.join(keywords) ticketid = trac.addTicket(**ticket) print "Success!" | 7dc75b6f874a1c4ea363862966b7500491a9499d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/7dc75b6f874a1c4ea363862966b7500491a9499d/bugzilla2trac.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1765,
24899,
1966,
16,
389,
2564,
16,
389,
1355,
16,
389,
3664,
16,
389,
3074,
16,
389,
5734,
4672,
5728,
2314,
273,
2286,
12233,
1435,
225,
468,
2236,
364,
12156,
5244,
434,
7934,
15990... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1765,
24899,
1966,
16,
389,
2564,
16,
389,
1355,
16,
389,
3664,
16,
389,
3074,
16,
389,
5734,
4672,
5728,
2314,
273,
2286,
12233,
1435,
225,
468,
2236,
364,
12156,
5244,
434,
7934,
15990... |
of Python servers installed on the machine. | of Python servers installed on the machine. If None (the default) then it will be registered when running from python source, but not registered if running in a frozen environment. | def RegisterServer(clsid, pythonInstString=None, desc=None, progID=None, verProgID=None, defIcon=None, threadingModel="both", policy=None, catids=[], other={}, # Default is to register in Python categories when not frozen addPyComCat=not hasattr(sys, 'frozen'), dispatcher = None, clsctx = None, addnPath = None, ): """Registers a Python object as a COM Server. This enters almost all necessary information in the system registry, allowing COM to use the object. clsid -- The (unique) CLSID of the server. pythonInstString -- A string holding the instance name that will be created whenever COM requests a new object. desc -- The description of the COM object. progID -- The user name of this object (eg, Word.Document) verProgId -- The user name of this version's implementation (eg Word.6.Document) defIcon -- The default icon for the object. threadingModel -- The threading model this object supports. policy -- The policy to use when creating this object. catids -- A list of category ID's this object belongs in. other -- A dictionary of extra items to be registered. addPyComCat -- A flag indicating if the object should be added to the list of Python servers installed on the machine. dispatcher -- The dispatcher to use when creating this object. clsctx -- One of the CLSCTX_* constants. addnPath -- An additional path the COM framework will add to sys.path before attempting to create the object. """ ### backwards-compat check ### Certain policies do not require a "class name", just the policy itself. if not pythonInstString and not policy: raise TypeError, 'You must specify either the Python Class or Python Policy which implement the COM object.' keyNameRoot = "CLSID\\%s" % str(clsid) _set_string(keyNameRoot, desc) # Also register as an "Application" so DCOM etc all see us. _set_string("AppID\\%s" % clsid, progID) # Depending on contexts requested, register the specified server type. # Set default clsctx. if not clsctx: clsctx = pythoncom.CLSCTX_INPROC_SERVER | pythoncom.CLSCTX_LOCAL_SERVER # And if we are frozen, ignore the ones that don't make sense in this # context. if pythoncom.frozen: assert sys.frozen, "pythoncom is frozen, but sys.frozen is not set - don't know the context!" if sys.frozen == "dll": clsctx = clsctx & pythoncom.CLSCTX_INPROC_SERVER else: clsctx = clsctx & pythoncom.CLSCTX_LOCAL_SERVER # Now setup based on the clsctx left over. if clsctx & pythoncom.CLSCTX_INPROC_SERVER: # get the module to use for registration. # nod to Gordon's installer - if sys.frozen and sys.frozendllhandle # exist, then we are being registered via a DLL - use this DLL as the # file name. if pythoncom.frozen: if hasattr(sys, "frozendllhandle"): dllName = win32api.GetModuleFileName(sys.frozendllhandle) else: raise RuntimeError, "We appear to have a frozen DLL, but I don't know the DLL to use" else: # Normal case - running from .py file, so register pythoncom's DLL. dllName = os.path.basename(pythoncom.__file__) _set_subkeys(keyNameRoot + "\\InprocServer32", { None : dllName, "ThreadingModel" : threadingModel, }) else: # Remove any old InProcServer32 registrations _remove_key(keyNameRoot + "\\InprocServer32") if clsctx & pythoncom.CLSCTX_LOCAL_SERVER: if pythoncom.frozen: # If we are frozen, we write "{exe} /Automate", just # like "normal" .EXEs do exeName = win32api.GetShortPathName(sys.executable) command = '%s /Automate' % (exeName,) else: # Running from .py sources - we need to write # 'python.exe win32com\server\localserver.py {clsid}" exeName = _find_localserver_exe(1) exeName = win32api.GetShortPathName(exeName) pyfile = _find_localserver_module() command = '%s "%s" %s' % (exeName, pyfile, str(clsid)) _set_string(keyNameRoot + '\\LocalServer32', command) else: # Remove any old LocalServer32 registrations _remove_key(keyNameRoot + "\\LocalServer32") if pythonInstString: _set_string(keyNameRoot + '\\PythonCOM', pythonInstString) else: _remove_key(keyNameRoot + '\\PythonCOM') if policy: _set_string(keyNameRoot + '\\PythonCOMPolicy', policy) else: _remove_key(keyNameRoot + '\\PythonCOMPolicy') if dispatcher: _set_string(keyNameRoot + '\\PythonCOMDispatcher', dispatcher) else: _remove_key(keyNameRoot + '\\PythonCOMDispatcher') if defIcon: _set_string(keyNameRoot + '\\DefaultIcon', defIcon) if addnPath: _set_string(keyNameRoot + "\\PythonCOMPath", addnPath) else: _remove_key(keyNameRoot + "\\PythonCOMPath") if addPyComCat: catids = catids + [ CATID_PythonCOMServer ] # Set up the implemented categories if catids: regCat = _cat_registrar() regCat.RegisterClassImplCategories(clsid, catids) # set up any other reg values they might have if other: for key, value in other.items(): _set_string(keyNameRoot + '\\' + key, value) if progID: # set the progID as the most specific that was given to us if verProgID: _set_string(keyNameRoot + '\\ProgID', verProgID) else: _set_string(keyNameRoot + '\\ProgID', progID) # Set up the root entries - version independent. if desc: _set_string(progID, desc) _set_string(progID + '\\CLSID', str(clsid)) # Set up the root entries - version dependent. if verProgID: # point from independent to the current version _set_string(progID + '\\CurVer', verProgID) # point to the version-independent one _set_string(keyNameRoot + '\\VersionIndependentProgID', progID) # set up the versioned progID if desc: _set_string(verProgID, desc) _set_string(verProgID + '\\CLSID', str(clsid)) | 15f93c939ad3e6e1ef2e961ea9c17ad8d1b15ddf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/992/15f93c939ad3e6e1ef2e961ea9c17ad8d1b15ddf/register.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5433,
2081,
12,
6429,
350,
16,
5790,
10773,
780,
33,
7036,
16,
3044,
33,
7036,
16,
11243,
734,
33,
7036,
16,
1924,
626,
75,
734,
33,
7036,
16,
1652,
5554,
33,
7036,
16,
17254,
1488,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5433,
2081,
12,
6429,
350,
16,
5790,
10773,
780,
33,
7036,
16,
3044,
33,
7036,
16,
11243,
734,
33,
7036,
16,
1924,
626,
75,
734,
33,
7036,
16,
1652,
5554,
33,
7036,
16,
17254,
1488,
... |
result[id] = price | result[id] = price result['item_id'] = {id: item_id} | def price_get(self, cr, uid, ids, prod_id, qty, partner=None, context=None): ''' context = { 'uom': Unit of Measure (int), 'partner': Partner ID (int), 'date': Date of the pricelist (%Y-%m-%d), } ''' context = context or {} currency_obj = self.pool.get('res.currency') product_obj = self.pool.get('product.product') supplierinfo_obj = self.pool.get('product.supplierinfo') price_type_obj = self.pool.get('product.price.type') | e72c090ed9ab83f8857499ac40273aed7dc04fd0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/e72c090ed9ab83f8857499ac40273aed7dc04fd0/pricelist.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6205,
67,
588,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
10791,
67,
350,
16,
26667,
16,
19170,
33,
7036,
16,
819,
33,
7036,
4672,
9163,
819,
273,
288,
296,
89,
362,
4278,
8380,
434... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6205,
67,
588,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
10791,
67,
350,
16,
26667,
16,
19170,
33,
7036,
16,
819,
33,
7036,
4672,
9163,
819,
273,
288,
296,
89,
362,
4278,
8380,
434... |
if (fileid in self.inventory and isinstance(self.inventory[fileid], inventory.InventoryDirectory)): for child_path in self.inventory[fileid].children.keys(): self._delete_item(osutils.pathjoin(path, child_path)) | if (fileid in inv and isinstance(inv[fileid], inventory.InventoryDirectory)): for child_path in inv[fileid].children.keys(): self._delete_item(osutils.pathjoin(path, child_path), inv) | def _delete_item(self, path): # NOTE: I'm retaining this method for now, instead of using the # one in the superclass, because it's taken quite a lot of tweaking # to cover all the edge cases seen in the wild. Long term, it can # probably go once the higher level method does "warn_unless_in_merges" # and handles all the various special cases ... fileid = self.bzr_file_id(path) dirname, basename = osutils.split(path) if (fileid in self.inventory and isinstance(self.inventory[fileid], inventory.InventoryDirectory)): for child_path in self.inventory[fileid].children.keys(): self._delete_item(osutils.pathjoin(path, child_path)) try: if self.inventory.id2path(fileid) == path: del self.inventory[fileid] else: # already added by some other name? if dirname in self.cache_mgr.file_ids: parent_id = self.cache_mgr.file_ids[dirname] del self.inventory[parent_id].children[basename] except KeyError: self._warn_unless_in_merges(fileid, path) except errors.NoSuchId: self._warn_unless_in_merges(fileid, path) except AttributeError, ex: if ex.args[0] == 'children': # A directory has changed into a file and then one # of it's children is being deleted! self._warn_unless_in_merges(fileid, path) else: raise try: self.cache_mgr.delete_path(path) except KeyError: pass | 8066c53cd6bd231c2bf35baa22cd07e397f2a068 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8703/8066c53cd6bd231c2bf35baa22cd07e397f2a068/bzr_commit_handler.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3733,
67,
1726,
12,
2890,
16,
589,
4672,
468,
5219,
30,
467,
17784,
325,
3280,
333,
707,
364,
2037,
16,
3560,
434,
1450,
326,
468,
1245,
316,
326,
12098,
16,
2724,
518,
1807,
9830... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3733,
67,
1726,
12,
2890,
16,
589,
4672,
468,
5219,
30,
467,
17784,
325,
3280,
333,
707,
364,
2037,
16,
3560,
434,
1450,
326,
468,
1245,
316,
326,
12098,
16,
2724,
518,
1807,
9830... |
(buildscript.config.prefix, buildscript.config.autogenargs, self.autogenargs) | (buildscript.config.prefix, self.autogenargs, buildscript.config.autogenargs) | def do_configure(self, buildscript): checkoutdir = self.get_builddir(buildscript) os.chdir(checkoutdir) buildscript.setAction('Configuring', self) cmd = './autogen.sh --prefix %s %s %s' % \ (buildscript.config.prefix, buildscript.config.autogenargs, self.autogenargs) if buildscript.execute(cmd) == 0: return (self.STATE_BUILD, None, None) else: return (self.STATE_BUILD, 'could not configure module', [self.STATE_FORCE_CHECKOUT]) | 6c447b47b60f1214043de68fa63e10f27622c76a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4596/6c447b47b60f1214043de68fa63e10f27622c76a/module.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
67,
14895,
12,
2890,
16,
1361,
4263,
4672,
13926,
1214,
273,
365,
18,
588,
67,
70,
89,
330,
449,
481,
12,
3510,
4263,
13,
1140,
18,
343,
1214,
12,
17300,
1214,
13,
1361,
4263,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
67,
14895,
12,
2890,
16,
1361,
4263,
4672,
13926,
1214,
273,
365,
18,
588,
67,
70,
89,
330,
449,
481,
12,
3510,
4263,
13,
1140,
18,
343,
1214,
12,
17300,
1214,
13,
1361,
4263,
1... |
(child, parentToken)) | (repr(child), parentToken)) | def requestReparent(self, child, parentToken): if parentToken in self.token2nodepath.keys(): # this parent has registered self.notify.debug("performing wrtReparent of %s to '%s'" % (child, parentToken)) child.wrtReparentTo(self.token2nodepath[parentToken]) else: self.notify.warning( "child %s requested reparent to '%s', not in list" % (child, parentToken)) if not self.pendingChildren.has_key(parentToken): self.pendingChildren[parentToken] = [] self.pendingChildren[parentToken].append(child) | 965f5a3cc4a1ff3ada0a33684d9aaf0ac8ab2ff3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7242/965f5a3cc4a1ff3ada0a33684d9aaf0ac8ab2ff3/ParentMgr.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
590,
426,
2938,
12,
2890,
16,
1151,
16,
982,
1345,
4672,
309,
982,
1345,
316,
365,
18,
2316,
22,
2159,
803,
18,
2452,
13332,
468,
333,
982,
711,
4104,
365,
18,
12336,
18,
4148,
2932,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
590,
426,
2938,
12,
2890,
16,
1151,
16,
982,
1345,
4672,
309,
982,
1345,
316,
365,
18,
2316,
22,
2159,
803,
18,
2452,
13332,
468,
333,
982,
711,
4104,
365,
18,
12336,
18,
4148,
2932,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.