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 |
|---|---|---|---|---|---|---|
CopyAllFiles("built/lib/", STDTHIRDPARTY + pkg.lower() + "/lib/") | CopyAllFiles(PREFIX+"/lib/", STDTHIRDPARTY + pkg.lower() + "/lib/") | if (val == 'UNDEF'): conf = conf + "#undef " + key + "\n" | 4a71a3ad56d88a79d9aba6c9d9fa1abc8c3a885e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8543/4a71a3ad56d88a79d9aba6c9d9fa1abc8c3a885e/makepanda.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
309,
261,
1125,
422,
296,
2124,
12904,
11,
4672,
2195,
273,
2195,
397,
6619,
318,
536,
315,
397,
498,
397,
1548,
82,
6,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
309,
261,
1125,
422,
296,
2124,
12904,
11,
4672,
2195,
273,
2195,
397,
6619,
318,
536,
315,
397,
498,
397,
1548,
82,
6,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
js = ['load %s;' % (pdb_path), | js = ['load %s;' % (pdb_file), | def jmol_animate_html(self, chain, cpartition): """Writes out the HTML page which will display the structure using the JMol Applet. """ basename = "%s_CHAIN%s_NTLS%d_ANIMATE" % (self.struct_id, chain.chain_id, cpartition.num_tls_segments()) | 81092918682cb3b404793cc6abd4020f9621498a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10674/81092918682cb3b404793cc6abd4020f9621498a/html.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
525,
21260,
67,
304,
4988,
67,
2620,
12,
2890,
16,
2687,
16,
276,
10534,
4672,
3536,
8368,
596,
326,
3982,
1363,
1492,
903,
2562,
326,
3695,
1450,
326,
804,
49,
355,
1716,
1469,
18,
35... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
525,
21260,
67,
304,
4988,
67,
2620,
12,
2890,
16,
2687,
16,
276,
10534,
4672,
3536,
8368,
596,
326,
3982,
1363,
1492,
903,
2562,
326,
3695,
1450,
326,
804,
49,
355,
1716,
1469,
18,
35... |
min_avg_rank = select([func.min(RouterStats.avg_rank)]).as_scalar() | def _compute_ranks(): min_r = select([func.min(BwHistory.rank)], BwHistory.table.c.router_idhex == RouterStats.table.c.router_idhex).as_scalar() avg_r = select([func.avg(BwHistory.rank)], BwHistory.table.c.router_idhex == RouterStats.table.c.router_idhex).as_scalar() max_r = select([func.max(BwHistory.rank)], BwHistory.table.c.router_idhex == RouterStats.table.c.router_idhex).as_scalar() avg_bw = select([func.avg(BwHistory.bw)], BwHistory.table.c.router_idhex == RouterStats.table.c.router_idhex).as_scalar() | c8ad6cda0735bca71a66e2ae8dc82c8034ffc7ce /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3224/c8ad6cda0735bca71a66e2ae8dc82c8034ffc7ce/SQLSupport.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
9200,
67,
11500,
87,
13332,
1131,
67,
86,
273,
2027,
3816,
644,
18,
1154,
12,
38,
91,
5623,
18,
11500,
13,
6487,
605,
91,
5623,
18,
2121,
18,
71,
18,
10717,
67,
350,
7118,
422,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
9200,
67,
11500,
87,
13332,
1131,
67,
86,
273,
2027,
3816,
644,
18,
1154,
12,
38,
91,
5623,
18,
11500,
13,
6487,
605,
91,
5623,
18,
2121,
18,
71,
18,
10717,
67,
350,
7118,
422,
... | |
paneInfoC = paneInfo.Caption("Thrusters Currents").Bottom() | paneInfoC = paneInfoC.Caption("Thrusters Currents").Bottom() | def getPanels(subsystems, parent): eventHub = core.Subsystem.getSubsystemOfType(core.QueuedEventHub, subsystems) vehicle = core.Subsystem.getSubsystemOfType(ext.vehicle.IVehicle, subsystems) if vehicle is not None: # Get All the current Thrusters the vehicle has thrusters = [] names = vehicle.getDeviceNames() for i in range(0,len(names)): device = vehicle.getDevice(names[i]) if isinstance(device, ext.vehicle.device.IThruster): thrusters.append(device) # Only create the panel if there are thrusters on the vehicle if len(thrusters): paneInfo = wx.aui.AuiPaneInfo().Name("Thrusters") paneInfo = paneInfo.Caption("Thrusters").Bottom() paneInfoC = wx.aui.AuiPaneInfo().Name("TCurrents") paneInfoC = paneInfo.Caption("Thrusters Currents").Bottom() panel = ThrusterPanel(parent, eventHub, thrusters) panelC = ThrusterCurrentPanel(parent, eventHub, []) return [(paneInfo, panel, [vehicle]), (paneInfoC, panelC, [vehicle])] return [] | 81e0dc93eacad05b37f42cdfedc022e19b8fb6b0 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10608/81e0dc93eacad05b37f42cdfedc022e19b8fb6b0/panels.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1689,
304,
10558,
12,
1717,
4299,
87,
16,
982,
4672,
871,
8182,
273,
2922,
18,
28150,
18,
588,
28150,
18859,
12,
3644,
18,
21039,
1133,
8182,
16,
15359,
87,
13,
225,
24815,
273,
2922,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1689,
304,
10558,
12,
1717,
4299,
87,
16,
982,
4672,
871,
8182,
273,
2922,
18,
28150,
18,
588,
28150,
18859,
12,
3644,
18,
21039,
1133,
8182,
16,
15359,
87,
13,
225,
24815,
273,
2922,
... |
%s | %(non_whitespace_after)s | def parse(self, text, lineno, memo, parent): """ Return 2 lists: nodes (text and inline elements), and system_messages. | 816927c350eab6c8d1baf3e3aa09f53b2caab704 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1278/816927c350eab6c8d1baf3e3aa09f53b2caab704/states.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
12,
2890,
16,
977,
16,
7586,
16,
11063,
16,
982,
4672,
3536,
2000,
576,
6035,
30,
2199,
261,
955,
471,
6370,
2186,
3631,
471,
2619,
67,
6833,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
12,
2890,
16,
977,
16,
7586,
16,
11063,
16,
982,
4672,
3536,
2000,
576,
6035,
30,
2199,
261,
955,
471,
6370,
2186,
3631,
471,
2619,
67,
6833,
18,
2,
-100,
-100,
-100,
-100,
-100,... |
self.updated_text(textItem) | def key_press(self, keyval, commit_str, preedit_str): # # I suppose codec is the stdin one. # codec = sys.stdin.encoding | ddbacc25d5222c2fae4096477be9fae40d454bde /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11306/ddbacc25d5222c2fae4096477be9fae40d454bde/anim.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
498,
67,
1028,
12,
2890,
16,
498,
1125,
16,
3294,
67,
701,
16,
675,
4619,
67,
701,
4672,
468,
468,
467,
1169,
4150,
9196,
353,
326,
8801,
1245,
18,
468,
9196,
273,
2589,
18,
21772,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
498,
67,
1028,
12,
2890,
16,
498,
1125,
16,
3294,
67,
701,
16,
675,
4619,
67,
701,
4672,
468,
468,
467,
1169,
4150,
9196,
353,
326,
8801,
1245,
18,
468,
9196,
273,
2589,
18,
21772,
1... | |
sys.exit(1) | sys.exit( 1 ) | def fixAbsoluteLinks( path ): for entry in os.listdir( path ): entryPath = os.path.join( path, entry ) if os.path.islink( entryPath ): destPath = os.readlink( entryPath ) if os.path.isabs( destPath ): absLinkDirSplit = [ d for d in os.path.abspath( path ).split( "/" ) if d.strip() ] absDestDirSplit = [ d for d in destPath.split( "/" ) if d.strip() ] common = -1 for i in range( min( len( absLinkDirSplit ), len( absDestDirSplit ) ) ): if absLinkDirSplit[ i ] == absDestDirSplit[ i ]: common = i else: break absLinkDirSplit = absLinkDirSplit[ common+1: ] absDestDirSplit = absDestDirSplit[ common+1: ] finalDestination = [ ".." for d in absLinkDirSplit ] finalDestination.extend( absDestDirSplit ) finalDestination = os.path.join( *finalDestination ) print "Relinking %s" % entryPath print " %s -> %s" % ( destPath, finalDestination ) os.unlink( entryPath ) os.symlink( finalDestination, entryPath ) elif os.path.isdir( entryPath ): fixAbsoluteLinks( entryPath ) | 3e1286f49ce012a79f3d2e3a9d45ca63fa48ef73 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/3e1286f49ce012a79f3d2e3a9d45ca63fa48ef73/dirac-compile-externals.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2917,
10368,
7100,
12,
589,
262,
30,
364,
1241,
316,
1140,
18,
1098,
1214,
12,
589,
262,
30,
1241,
743,
273,
1140,
18,
803,
18,
5701,
12,
589,
16,
1241,
262,
309,
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,
2917,
10368,
7100,
12,
589,
262,
30,
364,
1241,
316,
1140,
18,
1098,
1214,
12,
589,
262,
30,
1241,
743,
273,
1140,
18,
803,
18,
5701,
12,
589,
16,
1241,
262,
309,
1140,
18,
803,
18,
... |
s = N.ndarray.sum(self, axis, dtype) if axis==1: return s.transpose() else: return s | return N.ndarray.sum(self, axis, dtype)._align(axis) | def sum(self, axis=None, dtype=None): """Sum the matrix over the given axis. If the axis is None, sum over all dimensions. This preserves the orientation of the result as a row or column. """ s = N.ndarray.sum(self, axis, dtype) if axis==1: return s.transpose() else: return s | 0823dec46c105b43feae508c757cfbc49c0d5471 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14925/0823dec46c105b43feae508c757cfbc49c0d5471/defmatrix.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2142,
12,
2890,
16,
2654,
33,
7036,
16,
3182,
33,
7036,
4672,
3536,
3495,
326,
3148,
1879,
326,
864,
2654,
18,
225,
971,
326,
2654,
353,
599,
16,
2142,
1879,
777,
5769,
18,
225,
1220,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2142,
12,
2890,
16,
2654,
33,
7036,
16,
3182,
33,
7036,
4672,
3536,
3495,
326,
3148,
1879,
326,
864,
2654,
18,
225,
971,
326,
2654,
353,
599,
16,
2142,
1879,
777,
5769,
18,
225,
1220,
... |
proxy_auth = base64.b64encode(proxy_passwd.encode()).strip() | proxy_auth = base64.b64encode(proxy_passwd.encode()).decode('ascii') | def _open_generic_http(self, connection_factory, url, data): """Make an HTTP connection using connection_class. | 5626eec0c2f62999967eff0ab6aa8ad329e8571b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8546/5626eec0c2f62999967eff0ab6aa8ad329e8571b/request.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3190,
67,
13540,
67,
2505,
12,
2890,
16,
1459,
67,
6848,
16,
880,
16,
501,
4672,
3536,
6464,
392,
2239,
1459,
1450,
1459,
67,
1106,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3190,
67,
13540,
67,
2505,
12,
2890,
16,
1459,
67,
6848,
16,
880,
16,
501,
4672,
3536,
6464,
392,
2239,
1459,
1450,
1459,
67,
1106,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
status.statusname, user['human_name']), identity.current.user, pkg) | status.statusname, user['human_name']), identity.current.user, pkg, otherEmail=(user['email'],)) | def set_acl_status(self, pkgid, personid, newAcl, statusname): ### FIXME: Changing Obsolete into "" sounds like it should be # Pushed out to the view (template) instead of being handled in the # controller. | 1513bfa67a1f9e99504b0e00a5c07721f8ecf1c5 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9953/1513bfa67a1f9e99504b0e00a5c07721f8ecf1c5/dispatcher.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
67,
10150,
67,
2327,
12,
2890,
16,
3475,
350,
16,
6175,
350,
16,
394,
13538,
16,
1267,
529,
4672,
11849,
9852,
30,
1680,
18183,
531,
2038,
19513,
1368,
1408,
272,
9284,
3007,
518,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
67,
10150,
67,
2327,
12,
2890,
16,
3475,
350,
16,
6175,
350,
16,
394,
13538,
16,
1267,
529,
4672,
11849,
9852,
30,
1680,
18183,
531,
2038,
19513,
1368,
1408,
272,
9284,
3007,
518,
... |
if elyxer.find('elyxer.py') >= 0: | if elyxer.find('elyxer') >= 0: | def checkConverterEntries(): ''' Check all converters (\converter entries) ''' checkProg('the pdflatex program', ['pdflatex $$i'], rc_entry = [ r'\converter pdflatex pdf2 "%%" "latex"' ]) checkProg('XeTeX', ['xelatex $$i'], rc_entry = [ r'\converter xetex pdf4 "%%" "latex"' ]) ''' If we're running LyX in-place then tex2lyx will be found in ../src/tex2lyx. Add this directory to the PATH temporarily and search for tex2lyx. Use PATH to avoid any problems with paths-with-spaces. ''' path_orig = os.environ["PATH"] os.environ["PATH"] = os.path.join('..', 'src', 'tex2lyx') + \ os.pathsep + path_orig checkProg('a LaTeX/Noweb -> LyX converter', ['tex2lyx', 'tex2lyx' + version_suffix], rc_entry = [r'''\converter latex lyx "%% -f $$i $$o" "" | 533d0c2a9f660adde67f7d3a0b6d4f788eae0dd6 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7514/533d0c2a9f660adde67f7d3a0b6d4f788eae0dd6/configure.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
5072,
5400,
13332,
9163,
2073,
777,
19414,
17938,
15747,
3222,
13,
9163,
866,
626,
75,
2668,
5787,
8169,
26264,
5402,
2187,
10228,
7699,
26264,
5366,
77,
17337,
4519,
67,
4099,
273,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
5072,
5400,
13332,
9163,
2073,
777,
19414,
17938,
15747,
3222,
13,
9163,
866,
626,
75,
2668,
5787,
8169,
26264,
5402,
2187,
10228,
7699,
26264,
5366,
77,
17337,
4519,
67,
4099,
273,
3... |
None, [], | None, [], | def flimage_enable_xbm(): """ flimage_enable_xbm() """ _flimage_enable_xbm() | 9942dac8ce2b35a1e43615a26fd8e7054ef805d3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2429/9942dac8ce2b35a1e43615a26fd8e7054ef805d3/xformslib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1183,
2730,
67,
7589,
67,
6114,
81,
13332,
3536,
1183,
2730,
67,
7589,
67,
6114,
81,
1435,
3536,
225,
389,
2242,
2730,
67,
7589,
67,
6114,
81,
1435,
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,
1183,
2730,
67,
7589,
67,
6114,
81,
13332,
3536,
1183,
2730,
67,
7589,
67,
6114,
81,
1435,
3536,
225,
389,
2242,
2730,
67,
7589,
67,
6114,
81,
1435,
282,
2,
-100,
-100,
-100,
-100,
-10... |
local = ResourceAllocationManager.get_allocator(0) n_servers = local.max_servers({'python_version':sys.version[:3]}) | n_servers = self.local.max_servers({'python_version':sys.version[:3]}) | def test_max_servers(self): logging.debug('') logging.debug('test_max_servers') | b68b2136655ef4577e88a6a76bbb956045ad04ed /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12610/b68b2136655ef4577e88a6a76bbb956045ad04ed/test_resource.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
1896,
67,
14247,
12,
2890,
4672,
2907,
18,
4148,
2668,
6134,
2907,
18,
4148,
2668,
3813,
67,
1896,
67,
14247,
6134,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
1896,
67,
14247,
12,
2890,
4672,
2907,
18,
4148,
2668,
6134,
2907,
18,
4148,
2668,
3813,
67,
1896,
67,
14247,
6134,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
S = deepcopy(f).split(availWidth,aH) | S = cdeepcopy(f).splitOn(canv,availWidth,aH) | def _findSplit(self,canv,availWidth,availHeight,mergeSpace=1,obj=None): '''return max width, required height for a list of flowables F''' W = 0 H = 0 pS = sB = 0 atTop = 1 F = self._content for i,f in enumerate(F): w,h = f.wrapOn(canv,availWidth,0xfffffff) if w<=_FUZZ or h<=_FUZZ: continue W = max(W,w) if not atTop: s = f.getSpaceBefore() if mergeSpace: s = max(s-pS,0) H += s else: if obj is not None: obj._spaceBefore = f.getSpaceBefore() atTop = 0 if H>=availHeight: return W, availHeight, F[:i],F[i:] H += h if H>availHeight: from paragraph import Paragraph aH = availHeight-(H-h) if isinstance(f,(Paragraph,Preformatted)): leading = f.style.leading nH = leading*int(aH/float(leading))+_FUZZ if nH<aH: nH += leading availHeight += nH-aH aH = nH S = deepcopy(f).split(availWidth,aH) if not S: return W, availHeight, F[:i],F[i:] else: return W,availHeight,F[:i]+S[:1],S[1:]+F[i+1:] pS = f.getSpaceAfter() H += pS if obj is not None: obj._spaceAfter = pS return W, H-pS, F, [] | 5c2984c62b4e8b7c9b548eb52e0706dc27d6705f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3878/5c2984c62b4e8b7c9b548eb52e0706dc27d6705f/flowables.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
4720,
5521,
12,
2890,
16,
4169,
90,
16,
842,
671,
2384,
16,
842,
671,
2686,
16,
2702,
3819,
33,
21,
16,
2603,
33,
7036,
4672,
9163,
2463,
943,
1835,
16,
1931,
2072,
364,
279,
66... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
4720,
5521,
12,
2890,
16,
4169,
90,
16,
842,
671,
2384,
16,
842,
671,
2686,
16,
2702,
3819,
33,
21,
16,
2603,
33,
7036,
4672,
9163,
2463,
943,
1835,
16,
1931,
2072,
364,
279,
66... |
""" Function to report the images in the report page when needed. """ | """ Function to report the files in the report page when needed. """ | def report_image(self, image_to_report, rep_page = None, com = None, rep_text = None, addings = True, regex = None): """ Function to report the images in the report page when needed. """ if rep_page == None: rep_page = self.rep_page if com == None: com = self.com if rep_text == None: rep_text = self.rep_text another_page = wikipedia.Page(self.site, rep_page) if regex == None: regex = image_to_report try: text_get = another_page.get() except wikipedia.NoPage: text_get = '' except wikipedia.IsRedirectPage: text_get = another_page.getRedirectTarget().get() if len(text_get) >= self.logFulNumber: raise LogIsFull(u"The log page (%s) is full! Please delete the old images reported." % another_page.title()) pos = 0 # The talk page includes "_" between the two names, in this way i replace them to " " n = re.compile(regex, re.UNICODE|re.M) y = n.search(text_get, pos) if y == None: # Adding the log if addings: rep_text = rep_text % image_to_report # Adding the name of the image in the report if not done already another_page.put(text_get + rep_text, comment = com, minorEdit = False) wikipedia.output(u"...Reported...") reported = True else: pos = y.end() wikipedia.output(u"%s is already in the report page." % image_to_report) reported = False return reported | 8913e1740cb89be9fcacfa047c0f66333f53d469 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4404/8913e1740cb89be9fcacfa047c0f66333f53d469/checkimages.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2605,
67,
2730,
12,
2890,
16,
1316,
67,
869,
67,
6006,
16,
2071,
67,
2433,
273,
599,
16,
532,
273,
599,
16,
2071,
67,
955,
273,
599,
16,
527,
899,
273,
1053,
16,
3936,
273,
599,
46... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2605,
67,
2730,
12,
2890,
16,
1316,
67,
869,
67,
6006,
16,
2071,
67,
2433,
273,
599,
16,
532,
273,
599,
16,
2071,
67,
955,
273,
599,
16,
527,
899,
273,
1053,
16,
3936,
273,
599,
46... |
self.__pairs[3].toUpper() | self.__pairs.toUpper(3) | def fset(self, state): if state == EXPOSED: self.__pairs.toLower() if self.meldType == CLAIMEDKONG: self.__pairs[3].toUpper() elif state == CONCEALED: self.__pairs.toUpper() if len(self.__pairs) == 4: self.__pairs.toLower(0) self.__pairs.toLower(3) else: raise Exception('meld.setState: illegal state %d' % state) for idx, tile in enumerate(self.tiles): tile.element = self.__pairs[idx] | 1544e12c380c49d75d1d079571b4e690244683f6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1679/1544e12c380c49d75d1d079571b4e690244683f6/scoringengine.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
30141,
12,
2890,
16,
919,
4672,
309,
919,
422,
5675,
2419,
18204,
30,
365,
16186,
11545,
18,
869,
4070,
1435,
309,
365,
18,
81,
488,
559,
422,
29859,
3114,
3398,
7390,
30,
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,
30141,
12,
2890,
16,
919,
4672,
309,
919,
422,
5675,
2419,
18204,
30,
365,
16186,
11545,
18,
869,
4070,
1435,
309,
365,
18,
81,
488,
559,
422,
29859,
3114,
3398,
7390,
30,
365,
16186,
... |
fd, name = tempfile.mkstemp() fileobj = os.fdopen(fd, "w+b") try: | with TemporaryFile("w+b") as fileobj: | def test_float_write(self): import array contents = [(20-i)*0.1 for i in range(20)] a = array.array('f', contents) fd, name = tempfile.mkstemp() fileobj = os.fdopen(fd, "w+b") try: writer = csv.writer(fileobj, dialect="excel") writer.writerow(a) expected = ",".join([str(i) for i in a])+"\r\n" fileobj.seek(0) self.assertEqual(fileobj.read(), expected) finally: fileobj.close() os.unlink(name) | 4626458cc57b73dc01edf4987bbc3fe1d4437e59 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8546/4626458cc57b73dc01edf4987bbc3fe1d4437e59/test_csv.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
5659,
67,
2626,
12,
2890,
4672,
1930,
526,
2939,
273,
306,
12,
3462,
17,
77,
17653,
20,
18,
21,
364,
277,
316,
1048,
12,
3462,
25887,
279,
273,
526,
18,
1126,
2668,
74,
218... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5659,
67,
2626,
12,
2890,
4672,
1930,
526,
2939,
273,
306,
12,
3462,
17,
77,
17653,
20,
18,
21,
364,
277,
316,
1048,
12,
3462,
25887,
279,
273,
526,
18,
1126,
2668,
74,
218... |
readsize = 100 | orig_size = size readsize = min(100, size) | def readline(self): bufs = [] readsize = 100 while 1: c = self.read(readsize) i = string.find(c, '\n') if i >= 0 or c == '': bufs.append(c[:i+1]) self._unread(c[i+1:]) return string.join(bufs, '') bufs.append(c) readsize = readsize * 2 | db6b7a680bb447f5c6ea14edab0696d340732c70 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/db6b7a680bb447f5c6ea14edab0696d340732c70/gzip.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12023,
12,
2890,
4672,
1681,
87,
273,
5378,
1647,
67,
1467,
273,
963,
855,
1467,
273,
1131,
12,
6625,
16,
963,
13,
1323,
404,
30,
276,
273,
365,
18,
896,
12,
896,
1467,
13,
277,
273,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12023,
12,
2890,
4672,
1681,
87,
273,
5378,
1647,
67,
1467,
273,
963,
855,
1467,
273,
1131,
12,
6625,
16,
963,
13,
1323,
404,
30,
276,
273,
365,
18,
896,
12,
896,
1467,
13,
277,
273,... |
if e[0] == EINTR: | if e.args[0] == EINTR: | def readline(self, size=-1): buf = self._rbuf buf.seek(0, 2) # seek end if buf.tell() > 0: # check if we already have it in our buffer buf.seek(0) bline = buf.readline(size) if bline.endswith('\n') or len(bline) == size: self._rbuf = StringIO() self._rbuf.write(buf.read()) return bline del bline if size < 0: # Read until \n or EOF, whichever comes first if self._rbufsize <= 1: # Speed up unbuffered case buf.seek(0) buffers = [buf.read()] self._rbuf = StringIO() # reset _rbuf. we consume it via buf. data = None recv = self._sock.recv while True: try: while data != "\n": data = recv(1) if not data: break buffers.append(data) except error, e: # The try..except to catch EINTR was moved outside the # recv loop to avoid the per byte overhead. if e[0] == EINTR: continue raise break return "".join(buffers) | 659074f9ef02a6c3a78b35a8bf2fa0ab12511c2e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3187/659074f9ef02a6c3a78b35a8bf2fa0ab12511c2e/socket.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12023,
12,
2890,
16,
963,
29711,
21,
4672,
1681,
273,
365,
6315,
86,
4385,
1681,
18,
16508,
12,
20,
16,
576,
13,
225,
468,
6520,
679,
309,
1681,
18,
88,
1165,
1435,
405,
374,
30,
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,
12023,
12,
2890,
16,
963,
29711,
21,
4672,
1681,
273,
365,
6315,
86,
4385,
1681,
18,
16508,
12,
20,
16,
576,
13,
225,
468,
6520,
679,
309,
1681,
18,
88,
1165,
1435,
405,
374,
30,
468... |
line = proc.stderr.readline() while line.rstrip() != " if (line != '' and not line.endswith('alias ISO-8859-8-I maps to ISO-8859-8-I already, ' 'but someone is trying to make it map to ' 'ISO-8859-8')): outlines.append(line) line = proc.stderr.readline() | def ProcessOutput(proc, filename, test_uri, test_types, test_args): """Receives the output from a test_shell process, subjects it to a number of tests, and returns a list of failure types the test produced. Args: proc: an active test_shell process filename: path of the test file being run test_types: list of test types to subject the output to test_args: arguments to be passed to each test Returns: a list of failure objects for the test being processed """ outlines = [] failures = [] crash_or_timeout = False # Some test args, such as the image hash, may be added or changed on a # test-by-test basis. local_test_args = copy.copy(test_args) line = proc.stdout.readline() while line.rstrip() != "#EOF": # Make sure we haven't crashed. if line == '' and proc.poll() is not None: failures.append(test_failures.FailureCrash()) # This is hex code 0xc000001d, which is used for abrupt termination. # This happens if we hit ctrl+c from the prompt and we happen to # be waiting on the test_shell. if -1073741510 == proc.returncode: raise KeyboardInterrupt crash_or_timeout = True break # Don't include #URL lines in our output if line.startswith("#URL:"): url = line.rstrip()[5:] if url != test_uri: logging.fatal("Test got out of sync:\n|%s|\n|%s|" % (url, test_uri)) raise AssertionError("test out of sync") elif line.startswith("#MD5:"): local_test_args.hash = line.rstrip()[5:] elif line.startswith("#TEST_TIMED_OUT"): # Test timed out, but we still need to read until #EOF. crash_or_timeout = True failures.append(test_failures.FailureTimeout()) else: outlines.append(line) line = proc.stdout.readline() # If we had any stderr output, append that. This is not ideal, but at least # it'll catch errors. line = proc.stderr.readline() while line.rstrip() != "#EOF": # TODO(pamg): We suppress this stderr message temporarily so we can run # the tests deterministically until someone has a chance to fix the # underlying problem. # See http://code.google.com/p/chromium/issues/detail?id=4285 if (line != '' and not line.endswith('alias ISO-8859-8-I maps to ISO-8859-8-I already, ' 'but someone is trying to make it map to ' 'ISO-8859-8')): outlines.append(line) line = proc.stderr.readline() # Check the output and save the results. for test_type in test_types: new_failures = test_type.CompareOutput(filename, proc, ''.join(outlines), local_test_args) # Don't add any more failures if we already have a crash or timeout, so # we don't double-report those tests. if not crash_or_timeout: failures.extend(new_failures) return failures | edb10a2bfca271fc482c8b6222a17814b44bcdb9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5060/edb10a2bfca271fc482c8b6222a17814b44bcdb9/test_shell_thread.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4389,
1447,
12,
9381,
16,
1544,
16,
1842,
67,
1650,
16,
1842,
67,
2352,
16,
1842,
67,
1968,
4672,
3536,
4779,
3606,
326,
876,
628,
279,
1842,
67,
10304,
1207,
16,
16782,
518,
358,
279,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4389,
1447,
12,
9381,
16,
1544,
16,
1842,
67,
1650,
16,
1842,
67,
2352,
16,
1842,
67,
1968,
4672,
3536,
4779,
3606,
326,
876,
628,
279,
1842,
67,
10304,
1207,
16,
16782,
518,
358,
279,... | |
for line, zipline in zip(self.line_gen, zipfp.open(TESTFN)): self.assertEqual(zipline, line + '\n') | with zipfp.open(TESTFN) as zipopen: for line, zipline in zip(self.line_gen, zipopen): self.assertEqual(zipline, line + '\n') | def zip_iterlines_test(self, f, compression): self.make_test_archive(f, compression) | b851957a42b68791e7491840103c69844875e2e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3187/b851957a42b68791e7491840103c69844875e2e0/test_zipfile.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3144,
67,
2165,
3548,
67,
3813,
12,
2890,
16,
284,
16,
9154,
4672,
365,
18,
6540,
67,
3813,
67,
10686,
12,
74,
16,
9154,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3144,
67,
2165,
3548,
67,
3813,
12,
2890,
16,
284,
16,
9154,
4672,
365,
18,
6540,
67,
3813,
67,
10686,
12,
74,
16,
9154,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
self.args[1]) | self.args[1].exit_status) | def __str__(self): msg = "Command <%s> failed, rc=%d" % (self.args[0], self.args[1]) if self.args[2]: msg += ", " + self.args[2] return msg | 6bc5288e7d071e98cc1bdbfda1955928d7f81385 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12268/6bc5288e7d071e98cc1bdbfda1955928d7f81385/error.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
701,
972,
12,
2890,
4672,
1234,
273,
315,
2189,
23930,
87,
34,
2535,
16,
4519,
5095,
72,
6,
738,
261,
2890,
18,
1968,
63,
20,
6487,
365,
18,
1968,
63,
21,
8009,
8593,
67,
2327,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
701,
972,
12,
2890,
4672,
1234,
273,
315,
2189,
23930,
87,
34,
2535,
16,
4519,
5095,
72,
6,
738,
261,
2890,
18,
1968,
63,
20,
6487,
365,
18,
1968,
63,
21,
8009,
8593,
67,
2327,... |
[(0, 1, None), (0, 10, None), (0, 19, None), (1, 8, None), (1, 2, None), (2, 3, None), (2, 6, None), (3, 19, None), (3, 4, None), (4, 17, None), (4, 5, None), (5, 6, None), (5, 15, None), (6, 7, None), (7, 8, None), (7, 14, None), (8, 9, None), (9, 10, None), (9, 13, None), (10, 11, None), (11, 12, None), (11, 18, None), (12, 16, None), (12, 13, None), (13, 14, None), (14, 15, None), (15, 16, None), (16, 17, None), (17, 18, None), (18, 19, None)] | [(0, 1, None), (0, 10, None), (0, 19, None), (1, 2, None), (1, 8, None), (2, 3, None), (2, 6, None), (3, 4, None), (3, 19, None), (4, 5, None), (4, 17, None), (5, 6, None), (5, 15, None), (6, 7, None), (7, 8, None), (7, 14, None), (8, 9, None), (9, 10, None), (9, 13, None), (10, 11, None), (11, 12, None), (11, 18, None), (12, 13, None), (12, 16, None), (13, 14, None), (14, 15, None), (15, 16, None), (16, 17, None), (17, 18, None), (18, 19, None)] | def edges(self, labels=True, sort=True): """ Return a list of edges. Each edge is a triple (u,v,l) where u and v are vertices and l is a label. INPUT: labels -- (bool; default: True) if False, each edge is a tuple (u,v) of vertices. sort -- (bool; default: True) if True, ensure that the list of edges is sorted. | 110ad8af7371c78db0bef38792a9972850391fa4 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/110ad8af7371c78db0bef38792a9972850391fa4/graph.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5231,
12,
2890,
16,
3249,
33,
5510,
16,
1524,
33,
5510,
4672,
3536,
2000,
279,
666,
434,
5231,
18,
8315,
3591,
353,
279,
14543,
261,
89,
16,
90,
16,
80,
13,
1625,
582,
471,
331,
854,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5231,
12,
2890,
16,
3249,
33,
5510,
16,
1524,
33,
5510,
4672,
3536,
2000,
279,
666,
434,
5231,
18,
8315,
3591,
353,
279,
14543,
261,
89,
16,
90,
16,
80,
13,
1625,
582,
471,
331,
854,... |
configure.start = options.start configure.end = options.end | def run(config): """ This method is where the processing is done. @param config: Object containing the driver configuration information. @type config: L{hlr_utils.Configure} """ if config.data is None: raise RuntimeError("Need to pass a data filename to the driver "\ +"script.") so_axis = "time_of_flight" if config.verbose: print "Reading data file" d_som1 = dr_lib.add_files(config.data, Data_Paths=config.data_paths.toPath(), SO_Axis=so_axis, Verbose=config.verbose)[0] print "A:", config.start, config.end if config.start is None: if config.bin: start_val = 0 else: start_val = d_som1[0].axis[0].val[0] else: start_val = config.start if config.end is None: if config.bin: end_val = -1 else: end_val = d_som1[0].axis[0].val[-1] else: end_val = config.end # Use start and end keywords to make slices (see online docs) d_som2 = dr_lib.integrate_spectra(d_som1, start=start_val, end=end_val, bin_index=config.bin) del d_som1 time_tag_list = [] if config.start is not None: if config.bin: head_str = "sb" else: head_str = "s" time_tag_list.append(head_str+str(int(config.start))) if config.end is not None: if config.bin: head_str = "eb" else: head_str = "e" time_tag_list.append(head_str+str(int(config.end))) time_tag = "_".join(time_tag_list) if time_tag == "": time_tag = None print "G:", time_tag hlr_utils.write_file(config.output, "text/num-info", d_som2, output_ext="xys", data_ext=config.ext_replacement, path_replacement=config.path_replacement, verbose=config.verbose, message="xy sums", extra_tag=time_tag, units="counts") | 8c1099098d6d3f5768258ce1676e4aea62183051 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/763/8c1099098d6d3f5768258ce1676e4aea62183051/xy_sum.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
1425,
4672,
3536,
1220,
707,
353,
1625,
326,
4929,
353,
2731,
18,
225,
632,
891,
642,
30,
1033,
4191,
326,
3419,
1664,
1779,
18,
632,
723,
642,
30,
511,
95,
76,
10826,
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,
1086,
12,
1425,
4672,
3536,
1220,
707,
353,
1625,
326,
4929,
353,
2731,
18,
225,
632,
891,
642,
30,
1033,
4191,
326,
3419,
1664,
1779,
18,
632,
723,
642,
30,
511,
95,
76,
10826,
67,
... | |
if old == False: | if self.flushing == False: | def submit_song_helper(self, old = False): if self.already_submitted == True or self.broken == True: return | 5b94557f563f23e69b10109f319e52ad38bc4aa0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4764/5b94557f563f23e69b10109f319e52ad38bc4aa0/qlscrobbler.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4879,
67,
816,
75,
67,
4759,
12,
2890,
16,
1592,
273,
1083,
4672,
309,
365,
18,
17583,
67,
31575,
422,
1053,
578,
365,
18,
70,
19906,
422,
1053,
30,
327,
2,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4879,
67,
816,
75,
67,
4759,
12,
2890,
16,
1592,
273,
1083,
4672,
309,
365,
18,
17583,
67,
31575,
422,
1053,
578,
365,
18,
70,
19906,
422,
1053,
30,
327,
2,
-100,
-100,
-100,
-100,
-... |
if kshp_logical_top_aligned: | if self.kshp_logical_top_aligned: | def perform(self,node, (img2d, filtersflipped), (z,)): """ By default if len(img2d.shape)==3, we """ # TODO: move these back out to global scope when they no longer cause an atexit error from scipy.signal.signaltools import _valfrommode, _bvalfromboundary from scipy.signal.sigtools import _convolve2d imshp = self.imshp if imshp is None: imshp = tuple(img2d.shape[1:]) kshp = self.kshp if kshp is None: kshp = tuple(filtersflipped.shape[2:]) bsize = self.bsize if bsize is None: bsize = img2d.shape[0] nkern = self.nkern if nkern is None: nkern = filtersflipped.shape[0] imshp_logical = self.imshp_logical if imshp_logical is None: imshp_logical = imshp kshp_logical = self.kshp_logical if kshp_logical is None: kshp_logical = kshp if self.fulloutshp is not None: fulloutshp = tuple(self.fulloutshp) else: fulloutshp = tuple(getFilterOutShp(imshp_logical, kshp_logical, (1,1), self.out_mode)) | e9f64036933bdc0fc50e213bdd85e5ca9e181f9d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12438/e9f64036933bdc0fc50e213bdd85e5ca9e181f9d/conv.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3073,
12,
2890,
16,
2159,
16,
261,
6081,
22,
72,
16,
3415,
12357,
1845,
3631,
261,
94,
16,
3719,
30,
3536,
2525,
805,
309,
562,
12,
6081,
22,
72,
18,
4867,
13,
631,
23,
16,
732,
35... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3073,
12,
2890,
16,
2159,
16,
261,
6081,
22,
72,
16,
3415,
12357,
1845,
3631,
261,
94,
16,
3719,
30,
3536,
2525,
805,
309,
562,
12,
6081,
22,
72,
18,
4867,
13,
631,
23,
16,
732,
35... |
text = mdiff.unidiff(to, date1, tn, date2(f), f, r, opts=opts) | text = mdiff.unidiff(to, date1, tn, util.datestr(ctx2.date()), f, r, opts=opts) | def addmodehdr(header, omode, nmode): if omode != nmode: header.append('old mode %s\n' % omode) header.append('new mode %s\n' % nmode) | 006b7f454a41d9928fdc6679b52665c6141d4219 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11312/006b7f454a41d9928fdc6679b52665c6141d4219/patch.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
3188,
16587,
12,
3374,
16,
320,
3188,
16,
290,
3188,
4672,
309,
320,
3188,
480,
290,
3188,
30,
1446,
18,
6923,
2668,
1673,
1965,
738,
87,
64,
82,
11,
738,
320,
3188,
13,
1446,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
527,
3188,
16587,
12,
3374,
16,
320,
3188,
16,
290,
3188,
4672,
309,
320,
3188,
480,
290,
3188,
30,
1446,
18,
6923,
2668,
1673,
1965,
738,
87,
64,
82,
11,
738,
320,
3188,
13,
1446,
1... |
'parentdir': parentdir, | 'nightly_dir': options.nightly_dir, | def ReleaseToCandidatesDir(options, upload_dir, files): candidatesDir = CANDIDATES_DIR % {'version': options.version, 'buildnumber': options.build_number} candidatesPath = os.path.join(NIGHTLY_PATH, candidatesDir) if options.parentdir: parentdir = options.parentdir else: parentdir = "nightly" candidatesUrl = CANDIDATES_URL_PATH % { 'parentdir': parentdir, 'version': options.version, 'buildnumber': options.build_number, 'product': options.product, } for f in files: realCandidatesPath = candidatesPath if 'win32' in f: realCandidatesPath = os.path.join(realCandidatesPath, 'unsigned') url = os.path.join(candidatesUrl, 'unsigned') else: url = candidatesUrl CopyFileToDir(f, upload_dir, realCandidatesPath, preserve_dirs=True) # Output the URL to the candidate build if f.startswith(upload_dir): relpath = f[len(upload_dir):].lstrip("/") else: relpath = f.lstrip("/") sys.stderr.write("%s\n" % os.path.join(url, relpath)) # We always want release files chmod'ed this way so other users in # the group cannot overwrite them. os.chmod(f, 0644) # Same thing for directories, but 0755 for root,dirs,files in os.walk(candidatesPath): for d in dirs: os.chmod(os.path.join(root, d), 0755) | 24284ca940f5a072336ba3fdfa023c773963c526 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6206/24284ca940f5a072336ba3fdfa023c773963c526/post_upload.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10819,
774,
18455,
1621,
12,
2116,
16,
3617,
67,
1214,
16,
1390,
4672,
7965,
1621,
273,
385,
4307,
734,
1777,
55,
67,
4537,
738,
13666,
1589,
4278,
702,
18,
1589,
16,
296,
3510,
2696,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10819,
774,
18455,
1621,
12,
2116,
16,
3617,
67,
1214,
16,
1390,
4672,
7965,
1621,
273,
385,
4307,
734,
1777,
55,
67,
4537,
738,
13666,
1589,
4278,
702,
18,
1589,
16,
296,
3510,
2696,
... |
ts.get_available_actions(self.req, | self._ts_get_available_actions(ts, | def test_available_actions_create_only(self): ts = TicketSystem(self.env) self.perm.grant_permission('anonymous', 'TICKET_CREATE') self.req.perm = perm.PermissionCache(self.env) self.assertEqual(['leave'], ts.get_available_actions(self.req, {'status': 'new'})) self.assertEqual(['leave'], ts.get_available_actions(self.req, {'status': 'assigned'})) self.assertEqual(['leave'], ts.get_available_actions(self.req, {'status': 'accepted'})) self.assertEqual(['leave'], ts.get_available_actions(self.req, {'status': 'reopened'})) self.assertEqual(['leave', 'reopen'], ts.get_available_actions(self.req, {'status': 'closed'})) | 39d5b6fff4a7b5f237d73c6dfdd3aef15901572d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2831/39d5b6fff4a7b5f237d73c6dfdd3aef15901572d/api.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
5699,
67,
4905,
67,
2640,
67,
3700,
12,
2890,
4672,
3742,
273,
22023,
3163,
12,
2890,
18,
3074,
13,
365,
18,
12160,
18,
16243,
67,
9827,
2668,
19070,
2187,
296,
56,
16656,
15... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5699,
67,
4905,
67,
2640,
67,
3700,
12,
2890,
4672,
3742,
273,
22023,
3163,
12,
2890,
18,
3074,
13,
365,
18,
12160,
18,
16243,
67,
9827,
2668,
19070,
2187,
296,
56,
16656,
15... |
self._settings.show_user_details = p_visible | def _changeUserDetailsVisibilitySlot(self, p_visible): self._user_details.setVisible(p_visible) self._settings.show_user_details = p_visible | 304aa230f4b28f037ade99ea04bd389628e5813c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4919/304aa230f4b28f037ade99ea04bd389628e5813c/MainWindow.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3427,
1299,
3790,
10135,
8764,
12,
2890,
16,
293,
67,
8613,
4672,
365,
6315,
1355,
67,
6395,
18,
542,
6207,
12,
84,
67,
8613,
13,
365,
6315,
4272,
18,
4500,
67,
1355,
67,
6395,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
389,
3427,
1299,
3790,
10135,
8764,
12,
2890,
16,
293,
67,
8613,
4672,
365,
6315,
1355,
67,
6395,
18,
542,
6207,
12,
84,
67,
8613,
13,
365,
6315,
4272,
18,
4500,
67,
1355,
67,
6395,
... | |
if len(strings) != no: raise NameError("Invalid number of parameters %s at line %s" % (len(strings), node.get("line"))) if method == "trc": entry["hint"] = strings[0] entry["id"] = strings[1] else: entry["id"] = strings[0] if method == "trn": entry["plural"] = strings[1] data.append(entry) | lenStrings = len(strings) if lenStrings > 0: if method == "trc": entry["hint"] = strings[0] if lenStrings > 1 and strings[1]: entry["id"] = strings[1] else: if strings[0]: entry["id"] = strings[0] if method == "trn" and lenStrings > 1: entry["plural"] = strings[1] if "id" in entry: data.append(entry) return | def _addTranslationBlock(self, method, data, node, var): entry = { "method" : method, "line" : node.get("line"), "column" : node.get("column") } | ee807d2763090dbf13e7caa178f7ce2c8405e637 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5718/ee807d2763090dbf13e7caa178f7ce2c8405e637/Locale.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1289,
6717,
1768,
12,
2890,
16,
707,
16,
501,
16,
756,
16,
569,
4672,
1241,
273,
288,
315,
2039,
6,
294,
707,
16,
315,
1369,
6,
294,
756,
18,
588,
2932,
1369,
6,
3631,
315,
28... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1289,
6717,
1768,
12,
2890,
16,
707,
16,
501,
16,
756,
16,
569,
4672,
1241,
273,
288,
315,
2039,
6,
294,
707,
16,
315,
1369,
6,
294,
756,
18,
588,
2932,
1369,
6,
3631,
315,
28... |
def __init__(data = None) | def __init__(data = None): | def __init__(data = None) if data == None: quickfix.DoubleField.__init__(self, 12) else quickfix.DoubleField.__init__(self, 12, data) | 484890147d4b23aac4b9d0e85e84fceab7e137c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8819/484890147d4b23aac4b9d0e85e84fceab7e137c3/quickfix_fields.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
892,
273,
599,
4672,
309,
501,
422,
599,
30,
9549,
904,
18,
5265,
974,
16186,
2738,
972,
12,
2890,
16,
2593,
13,
469,
9549,
904,
18,
5265,
974,
16186,
2738,
972,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
892,
273,
599,
4672,
309,
501,
422,
599,
30,
9549,
904,
18,
5265,
974,
16186,
2738,
972,
12,
2890,
16,
2593,
13,
469,
9549,
904,
18,
5265,
974,
16186,
2738,
972,
... |
except: roles=UNSPECIFIED_ROLES | except: pass | def get_module_info(self, server_name, module_name, module): | 8e064df58c28d53362c495730a365e049ce987b0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/8e064df58c28d53362c495730a365e049ce987b0/Publish.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
2978,
67,
1376,
12,
2890,
16,
1438,
67,
529,
16,
1605,
67,
529,
16,
1605,
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,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
2978,
67,
1376,
12,
2890,
16,
1438,
67,
529,
16,
1605,
67,
529,
16,
1605,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
self.connect(self.light_x_linedit,SIGNAL("returnPressed()"),self.change_lighting) self.connect(self.light_y_linedit,SIGNAL("returnPressed()"),self.change_lighting) self.connect(self.light_z_linedit,SIGNAL("returnPressed()"),self.change_lighting) | self.connect(self.light_x_linedit,SIGNAL("returnPressed()"),self.save_lighting) self.connect(self.light_y_linedit,SIGNAL("returnPressed()"),self.save_lighting) self.connect(self.light_z_linedit,SIGNAL("returnPressed()"),self.save_lighting) | def __init__(self,parent = None,name = None,modal = 0,fl = 0): QDialog.__init__(self,parent,name,modal,fl) | 261e5324c71fb19b31d5851fcababd507755e890 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/261e5324c71fb19b31d5851fcababd507755e890/UserPrefsDialog.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
2938,
273,
599,
16,
529,
273,
599,
16,
17638,
273,
374,
16,
2242,
273,
374,
4672,
2238,
6353,
16186,
2738,
972,
12,
2890,
16,
2938,
16,
529,
16,
17638,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
2938,
273,
599,
16,
529,
273,
599,
16,
17638,
273,
374,
16,
2242,
273,
374,
4672,
2238,
6353,
16186,
2738,
972,
12,
2890,
16,
2938,
16,
529,
16,
17638,
... |
elif usage.startswith("usage: "): | elif usage.lower().startswith("usage: "): | def set_usage (self, usage): if usage is None: self.usage = "%prog [options]" elif usage is SUPPRESS_USAGE: self.usage = None elif usage.startswith("usage: "): # for backwards compatibility with Optik 1.3 and earlier self.usage = usage[7:] else: self.usage = usage | 56b1c2c8861be3644d705ba1864643efeafd4e44 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/56b1c2c8861be3644d705ba1864643efeafd4e44/optparse.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
67,
9167,
261,
2890,
16,
4084,
4672,
309,
4084,
353,
599,
30,
365,
18,
9167,
273,
2213,
14654,
306,
2116,
4279,
1327,
4084,
353,
16459,
22526,
67,
29550,
30,
365,
18,
9167,
273,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
67,
9167,
261,
2890,
16,
4084,
4672,
309,
4084,
353,
599,
30,
365,
18,
9167,
273,
2213,
14654,
306,
2116,
4279,
1327,
4084,
353,
16459,
22526,
67,
29550,
30,
365,
18,
9167,
273,
5... |
dependencies=['libbonobo', 'libart_lgpl']) | dependencies=['libart_lgpl']) | def sfcvsroot(project): return ':pserver:anonymous@cvs.%s.sourceforge.net:/cvsroot/%s' % \ (project, project) | 0223e389498626144da7ff5e7a31f6a1828e20cf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4596/0223e389498626144da7ff5e7a31f6a1828e20cf/moduleinfo.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
272,
7142,
6904,
3085,
12,
4406,
4672,
327,
4290,
84,
3567,
30,
19070,
36,
71,
6904,
7866,
87,
18,
3168,
1884,
908,
18,
2758,
27824,
71,
6904,
3085,
5258,
87,
11,
738,
521,
261,
4406,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
272,
7142,
6904,
3085,
12,
4406,
4672,
327,
4290,
84,
3567,
30,
19070,
36,
71,
6904,
7866,
87,
18,
3168,
1884,
908,
18,
2758,
27824,
71,
6904,
3085,
5258,
87,
11,
738,
521,
261,
4406,
... |
sys.excepthook = util.genExcepthook(True, catchSIGUSR1=False) | def main(argv=None, individual=True): cfg = resources.cfg cfg.isIndividual = individual setup() cfg.cleanTestDirs = not individual cfg.coverageExclusions = ['scripts/.*', 'epdb.py', 'stackutil.py', 'test/.*'] cfg.coverageDirs = [ os.environ['PYOVF_PATH'] ] if argv is None: argv = list(sys.argv) topdir = testhelp.getTestPath() if topdir not in sys.path: sys.path.insert(0, topdir) cwd = os.getcwd() if cwd != topdir and cwd not in sys.path: sys.path.insert(0, cwd) from conary.lib import util from conary.lib import coveragehook sys.excepthook = util.genExcepthook(True, catchSIGUSR1=False) handler = testhandler.TestSuiteHandler(cfg, resources) print "This process PID:", os.getpid() results = handler.main(argv) if results is None: sys.exit(0) sys.exit(not results.wasSuccessful()) | ba2f8025114b7220d81ec07a9deab2e660e57cf6 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7640/ba2f8025114b7220d81ec07a9deab2e660e57cf6/testsuite.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
12,
19485,
33,
7036,
16,
7327,
33,
5510,
4672,
2776,
273,
2703,
18,
7066,
2776,
18,
291,
29834,
273,
7327,
225,
3875,
1435,
225,
2776,
18,
6200,
4709,
9872,
273,
486,
7327,
2776,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
12,
19485,
33,
7036,
16,
7327,
33,
5510,
4672,
2776,
273,
2703,
18,
7066,
2776,
18,
291,
29834,
273,
7327,
225,
3875,
1435,
225,
2776,
18,
6200,
4709,
9872,
273,
486,
7327,
2776,
... | |
w,r = os.popen2('smbpasswd -a %s -s' % in_schooladminpw) w.write('%s\n' % passwd) w.write('%s\n' % passwd) | w,r = os.popen2('smbpasswd -a smbadmin -s' %) w.write('%s\n' % in_schooladminpw) w.write('%s\n' % in_schooladminpw) | import skolesys.definitions.hostdef as hostdef | 6f60aa80ab759a7d3739baed1acb0835ec15a330 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2487/6f60aa80ab759a7d3739baed1acb0835ec15a330/init_mainserver.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1930,
4343,
9112,
1900,
18,
13314,
18,
2564,
536,
487,
1479,
536,
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,
1930,
4343,
9112,
1900,
18,
13314,
18,
2564,
536,
487,
1479,
536,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
security.add_option('--no-database-list', action="store_false", dest='list_db', default=True, help="disable the ability to return the list of databases") | security.add_option('--no-database-list', action="store_false", dest='list_db', help="disable the ability to return the list of databases") | def __init__(self, fname=None): self.options = { 'email_from':False, 'xmlrpc_interface': '', # this will bind the server to all interfaces 'xmlrpc_port': 8069, 'netrpc_interface': '', 'netrpc_port': 8070, 'xmlrpcs_interface': '', # this will bind the server to all interfaces 'xmlrpcs_port': 8071, 'db_host': False, 'db_port': False, 'db_name': False, 'db_user': False, 'db_password': False, 'db_maxconn': 64, 'reportgz': False, 'netrpc': True, 'xmlrpc': True, 'xmlrpcs': True, 'translate_in': None, 'translate_out': None, 'language': None, 'pg_path': None, 'admin_passwd': 'admin', 'csv_internal_sep': ',', 'addons_path': None, 'root_path': None, 'debug_mode': False, 'import_partial': "", 'pidfile': None, 'logfile': None, 'logrotate': '1', 'smtp_server': 'localhost', 'smtp_user': False, 'smtp_port':25, 'smtp_ssl':False, 'smtp_password': False, 'stop_after_init': False, # this will stop the server after initialization 'syslog' : False, 'log_level': logging.INFO, 'assert_exit_level': logging.ERROR, # level above which a failed assert will be raised 'cache_timeout': 100000, 'login_message': False, 'list_db' : True, 'timezone' : False, # to override the default TZ 'test_file' : False, 'test_disable' : False, 'test_commit' : False, 'static_http_enable': False, 'static_http_document_root': None, 'static_http_url_prefix': None, } | 417f87440ec5b4bc42abe1f51f61b2309e111672 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/417f87440ec5b4bc42abe1f51f61b2309e111672/config.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
5299,
33,
7036,
4672,
365,
18,
2116,
273,
288,
296,
3652,
67,
2080,
4278,
8381,
16,
296,
2902,
7452,
67,
5831,
4278,
10226,
565,
468,
333,
903,
1993,
326... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
5299,
33,
7036,
4672,
365,
18,
2116,
273,
288,
296,
3652,
67,
2080,
4278,
8381,
16,
296,
2902,
7452,
67,
5831,
4278,
10226,
565,
468,
333,
903,
1993,
326... |
if True : | if True : | def c2text(self,c): ''' provide a textual (html) view of the status of a component ''' comp=ET.Element('div') ET.SubElement(comp,'h1').text='Component details' | 2937a8963dfa97f0c5ac52221d0e5b3e2f073c4f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7019/2937a8963dfa97f0c5ac52221d0e5b3e2f073c4f/Translator.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
276,
22,
955,
12,
2890,
16,
71,
4672,
9163,
5615,
279,
25774,
261,
2620,
13,
1476,
434,
326,
1267,
434,
279,
1794,
9163,
1161,
33,
1584,
18,
1046,
2668,
2892,
6134,
225,
4518,
18,
1676... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
276,
22,
955,
12,
2890,
16,
71,
4672,
9163,
5615,
279,
25774,
261,
2620,
13,
1476,
434,
326,
1267,
434,
279,
1794,
9163,
1161,
33,
1584,
18,
1046,
2668,
2892,
6134,
225,
4518,
18,
1676... |
filename = os.path.basename(fd.name) if not self.authorizer.has_perm(self.username, 'w', filename): | if not self.authorizer.has_perm(self.username, 'w', fd.name): try: fd.close() self.run_as_current_user(self.fs.remove, fd.name) except os.error: pass | def ftp_STOU(self, line): """Store a file on the server with a unique name.""" # Note 1: RFC-959 prohibited STOU parameters, but this # prohibition is obsolete. # Note 2: 250 response wanted by RFC-959 has been declared # incorrect in RFC-1123 that wants 125/150 instead. # Note 3: RFC-1123 also provided an exact output format # defined to be as follow: # > 125 FILE: pppp # ...where pppp represents the unique path name of the # file that will be written. | 2b4813dfadbe4d1adb25c173a85c3044c38d23b3 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3782/2b4813dfadbe4d1adb25c173a85c3044c38d23b3/ftpserver.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13487,
67,
882,
26556,
12,
2890,
16,
980,
4672,
3536,
2257,
279,
585,
603,
326,
1438,
598,
279,
3089,
508,
12123,
468,
3609,
404,
30,
8372,
17,
29,
6162,
450,
29993,
2347,
26556,
1472,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13487,
67,
882,
26556,
12,
2890,
16,
980,
4672,
3536,
2257,
279,
585,
603,
326,
1438,
598,
279,
3089,
508,
12123,
468,
3609,
404,
30,
8372,
17,
29,
6162,
450,
29993,
2347,
26556,
1472,
... |
if isinstance(handler, logging.StreamHandler) and os.name != 'nt': | if (not isinstance(handler, logging.FileHandler)) and os.name != 'nt': | def init_logger(): from tools import config import os if config['logfile']: logf = config['logfile'] # test if the directories exist, else create them try: handler = logging.handlers.TimedRotatingFileHandler(logf,'D',1,30) except: sys.stderr.write("ERROR: couldn't create the logfile directory\n") handler = logging.StreamHandler(sys.stdout) else: handler = logging.StreamHandler(sys.stdout) # create a format for log messages and dates formatter = logging.Formatter('[%(asctime)s] %(levelname)s:%(name)s:%(message)s', '%a %b %d %H:%M:%S %Y') # tell the handler to use this format handler.setFormatter(formatter) # add the handler to the root logger logging.getLogger().addHandler(handler) logging.getLogger().setLevel(logging.INFO) if isinstance(handler, logging.StreamHandler) and os.name != 'nt': # change color of level names # uses of ANSI color codes # see http://pueblo.sourceforge.net/doc/manual/ansi_color_codes.html # maybe use http://code.activestate.com/recipes/574451/ colors = ['black', 'red', 'green', 'yellow', 'blue', 'magenta', 'cyan', 'white', None, 'default'] foreground = lambda f: 30 + colors.index(f) background = lambda f: 40 + colors.index(f) mapping = { 'DEBUG': ('blue', 'default'), 'INFO': ('green', 'default'), 'WARNING': ('yellow', 'default'), 'ERROR': ('red', 'default'), 'CRITICAL': ('white', 'red'), } for level, (fg, bg) in mapping.items(): msg = "\x1b[%dm\x1b[%dm%s\x1b[0m" % (foreground(fg), background(bg), level) logging.addLevelName(getattr(logging, level), msg) | f18db39e9702ac875ba3235f96f52cfa653c0d8c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12853/f18db39e9702ac875ba3235f96f52cfa653c0d8c/netsvc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1208,
67,
4901,
13332,
628,
8513,
1930,
642,
1930,
1140,
225,
309,
642,
3292,
28806,
3546,
30,
27345,
273,
642,
3292,
28806,
3546,
468,
1842,
309,
326,
6402,
1005,
16,
469,
752,
2182,
77... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1208,
67,
4901,
13332,
628,
8513,
1930,
642,
1930,
1140,
225,
309,
642,
3292,
28806,
3546,
30,
27345,
273,
642,
3292,
28806,
3546,
468,
1842,
309,
326,
6402,
1005,
16,
469,
752,
2182,
77... |
self.previous_icon = touchwizard.Icon('previous') self.previous_icon.build() | self.previous_icon = touchwizard.IconRef(touchwizard.Icon('previous')) | def __init__(self, first_page): import touchwizard clutter.Actor.__init__(self) easyevent.User.__init__(self) self.session = touchwizard.Session() self.background = None if touchwizard.canvas_bg: if not os.path.exists(touchwizard.canvas_bg): logger.error('Canvas background %s not found.', touchwizard.canvas_bg) self.background = clutter.Texture(touchwizard.canvas_bg) self.background.set_parent(self) self.infobar = touchwizard.InfoBar() self.infobar.set_parent(self) self.iconbar = touchwizard.IconBar() self.iconbar.set_parent(self) self.home_icon = touchwizard.Icon('shutdown') self.home_icon.build() easyevent.forward_event('icon_shutdown_actioned', 'request_quit') easyevent.forward_event('icon_home_actioned', 'request_quit') self.previous_icon = touchwizard.Icon('previous') self.previous_icon.build() easyevent.forward_event('icon_previous_actioned', 'previous_page') self.history = list() self.first_page = first_page self.available_pages = dict() self.current_page = None self.register_event('next_page', 'previous_page') self.register_event('request_quit') gobject.idle_add(self.lookup_pages) gobject.idle_add(self.display_page, first_page) | 489529b380b6489f8d3a1d00cffbcc4904d7185a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5280/489529b380b6489f8d3a1d00cffbcc4904d7185a/canvas.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1122,
67,
2433,
4672,
1930,
6920,
31837,
927,
18220,
18,
17876,
16186,
2738,
972,
12,
2890,
13,
12779,
2575,
18,
1299,
16186,
2738,
972,
12,
2890,
13,
225,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1122,
67,
2433,
4672,
1930,
6920,
31837,
927,
18220,
18,
17876,
16186,
2738,
972,
12,
2890,
13,
12779,
2575,
18,
1299,
16186,
2738,
972,
12,
2890,
13,
225,... |
continue | break | def parseLine (self, line): #self.lock.acquire() parts = multiWs.split(line.strip()) if self.features["sigint"]: self.engine.sigint() # Illegal Move if parts[0].lower().find("illegal") >= 0: if parts[-2] == "sd" and parts[-1].isdigit(): self.sd = False self.setDepth (int(parts[-1])) return # A Move if self.history: if parts[0] == "move": movestr = parts[1] # Old Variation elif d_plus_dot_expr.match(parts[0]) and parts[1] == "...": movestr = parts[2] else: movestr = False if movestr: move = self.parseMove(movestr) self.history = None self.emit("move", move) return # Analyzing if len(parts) >= 5 and self.forced and isdigits(parts[1:4]): if parts[:4] == ["0","0","0","0"]: # Crafty don't analyze untill it is out of book print >> self.engine, "book off" return board = self.history[-1] boards = [board] moves = [] for m in movre.findall(" ".join(parts[4:])+" "): try: moves.append(self.parseMove(m, board)) except ParsingError: continue except Exception: print boards, moves, parts raise if moves: board = board.move(moves[-1], mvlist=False) boards.append(board) if moves: self.emit("analyze", moves) return # Offers draw if parts[0] == "offer" and parts[1] == "draw": self.emit("draw_offer") return # Resigns if line.find("resign") >= 0: self.emit("resign") return #Tell User Error if parts[0] in ("tellusererror", "Error"): print "Tell User Error", repr(" ".join(parts[1:])) return # Tell Somebody if parts[0][:4] == "tell" and \ parts[0][4:] in ("others", "all", "ics", "icsnoalias"): return #print "Tell", parts[0][4:], repr(" ".join(parts[1:])) # Error if parts[0].lower() in ("illegal", "error"): self.__del__() self.emit('dead') return # Features if parts[0] == "feature": for i, pair in enumerate(parts[1:]): if pair.find("=") < 0: continue key, value = pair.split("=") if value.startswith("\"") and value.endswith("\""): value = value[1:-1] elif value.startswith("\"") and not value.endswith("\""): rest = value[1:]+" "+" ".join(parts[2+i:]) i = rest.find("\"") if i >= 0: value = rest[:i] else: value[1:] else: value = int(value) self.features[key] = value return #self.lock.release() | c9aaf9617dc4a6a04e65e290ec3698f3674a3a38 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5339/c9aaf9617dc4a6a04e65e290ec3698f3674a3a38/CECP.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
1670,
261,
2890,
16,
980,
4672,
468,
2890,
18,
739,
18,
1077,
1039,
1435,
225,
2140,
273,
3309,
15444,
18,
4939,
12,
1369,
18,
6406,
10756,
309,
365,
18,
7139,
9614,
7340,
474,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
1670,
261,
2890,
16,
980,
4672,
468,
2890,
18,
739,
18,
1077,
1039,
1435,
225,
2140,
273,
3309,
15444,
18,
4939,
12,
1369,
18,
6406,
10756,
309,
365,
18,
7139,
9614,
7340,
474,
1... |
ecotype_id2cnv_qc_call_data[row.ecotype_id] = [] cnv_qc_call_data = ecotype_id2cnv_qc_call_data[row.ecotype_id] cnv_qc_call_data.append((row.chromosome, row.start, row.stop, row.size_affected, row.id)) | ecotype_id2cnv_qc_call_data[row.ecotype_id] = RBDict() segmentKey = CNVSegmentBinarySearchTreeKey(chromosome=row.chromosome, span_ls=[row.start, row.stop], \ min_reciprocal_overlap=min_reciprocal_overlap) ecotype_id2cnv_qc_call_data[row.ecotype_id][segmentKey] = (row.chromosome, row.start, row.stop, row.size_affected, row.no_of_probes_covered, row.copy_number, row.id) | def getCNVQCDataFromDB(cls, data_source_id=1, ecotype_id=None, cnv_type_id=1, \ min_QC_segment_size=200, min_no_of_probes=None): """ 2009-11-4 get CNV QC data from database """ sys.stderr.write("Getting CNV QC data ... \n") import Stock_250kDB sql_string = "select a.ecotype_id, c.chromosome, c.start, c.stop, c.size_affected, c.id from %s c,\ %s a where c.accession_id=a.id and a.data_source_id=%s and c.size_affected>=%s \ and c.cnv_type_id=%s"%\ (Stock_250kDB.CNVQCCalls.table.name, Stock_250kDB.CNVQCAccession.table.name, data_source_id,\ min_QC_segment_size, cnv_type_id) if ecotype_id is not None: sql_string += " and a.ecotype_id=%s"%ecotype_id if min_no_of_probes is not None: sql_string += " and c.no_of_probes_covered>=%s"%min_no_of_probes rows = db_250k.metadata.bind.execute(sql_string) count = 0 ecotype_id2cnv_qc_call_data = {} for row in rows: if row.ecotype_id not in ecotype_id2cnv_qc_call_data: ecotype_id2cnv_qc_call_data[row.ecotype_id] = [] cnv_qc_call_data = ecotype_id2cnv_qc_call_data[row.ecotype_id] cnv_qc_call_data.append((row.chromosome, row.start, row.stop, row.size_affected, row.id)) count += 1 for ecotype_id, cnv_qc_call_data in ecotype_id2cnv_qc_call_data.iteritems(): cnv_qc_call_data.sort() ecotype_id2cnv_qc_call_data[ecotype_id] = cnv_qc_call_data sys.stderr.write("%s cnv qc calls for %s ecotypes. Done.\n"%(count, len(ecotype_id2cnv_qc_call_data))) return ecotype_id2cnv_qc_call_data | 1440ce5092ec2e1bfdd9b1e187e40f109bf0000b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9645/1440ce5092ec2e1bfdd9b1e187e40f109bf0000b/misc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1927,
11679,
53,
39,
751,
1265,
2290,
12,
6429,
16,
501,
67,
3168,
67,
350,
33,
21,
16,
6557,
10570,
67,
350,
33,
7036,
16,
6227,
90,
67,
723,
67,
350,
33,
21,
16,
521,
1131,
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,
1927,
11679,
53,
39,
751,
1265,
2290,
12,
6429,
16,
501,
67,
3168,
67,
350,
33,
21,
16,
6557,
10570,
67,
350,
33,
7036,
16,
6227,
90,
67,
723,
67,
350,
33,
21,
16,
521,
1131,
67,
... |
if sys.platform=='darwin' : pass else : libs = [libname] + libs | def gcc_module_compile_str(module_name, src_code, location=None, include_dirs=[], lib_dirs=[], libs=[], preargs=[], tmpdir=None): #TODO: don't to the dlimport in this function if preargs is None: preargs = [] else: preargs = list(preargs) #backport #preargs= [] if preargs is None else list(preargs) preargs.append('-fPIC') if sys.platform=='darwin' : preargs.extend(['-undefined','dynamic_lookup']) no_opt = False include_dirs = [distutils.sysconfig.get_python_inc()] + \ numpy.distutils.misc_util.get_numpy_include_dirs()\ + include_dirs python_inc = distutils.sysconfig.get_python_inc() if sys.platform == 'win32': # Typical include directory: C:\Python26\include libname = os.path.basename(os.path.dirname(python_inc)).lower() # Also add directory containing the Python library to the library # directories. python_lib_dir = os.path.join(os.path.dirname(python_inc), 'libs') lib_dirs = [python_lib_dir] + lib_dirs else: # Typical include directory: /usr/include/python2.6 libname = os.path.basename(python_inc) if sys.platform=='darwin' : #we will not link against -lpython2.5. Instead we will use -undefined dynamic_lookup. This makes it easier to avoid problems with frameworks pass else : libs = [libname] + libs workdir = location cppfilename = os.path.join(workdir, 'mod.cpp') cppfile = file(cppfilename, 'w') debug('Writing module C++ code to', cppfilename) ofiles = [] rval = None cppfile.write(src_code) cppfile.close() lib_filename = os.path.join(workdir, '%s.%s' % (module_name, get_lib_extension())) debug('Generating shared lib', lib_filename) cmd = ['g++', get_gcc_shared_library_arg(), '-g'] if no_opt: cmd.extend(p for p in preargs if not p.startswith('-O')) else: cmd.extend(preargs) cmd.extend('-I%s'%idir for idir in include_dirs) cmd.extend(['-o',lib_filename]) cmd.append(cppfilename) cmd.extend(['-L%s'%ldir for ldir in lib_dirs]) cmd.extend(['-l%s'%l for l in libs]) debug('Running cmd', ' '.join(cmd)) p = subprocess.Popen(cmd) status = p.wait() if status: error('g++ return status', status) else: #touch the __init__ file file(os.path.join(workdir, "__init__.py"),'w').close() rval = dlimport(lib_filename) return rval | 066c2edb54f7c5bbcbc6ecee862ce55cb740e5e1 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12438/066c2edb54f7c5bbcbc6ecee862ce55cb740e5e1/cmodule.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
314,
952,
67,
2978,
67,
11100,
67,
701,
12,
2978,
67,
529,
16,
1705,
67,
710,
16,
2117,
33,
7036,
16,
2341,
67,
8291,
22850,
6487,
2561,
67,
8291,
22850,
6487,
15042,
22850,
6487,
675,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
314,
952,
67,
2978,
67,
11100,
67,
701,
12,
2978,
67,
529,
16,
1705,
67,
710,
16,
2117,
33,
7036,
16,
2341,
67,
8291,
22850,
6487,
2561,
67,
8291,
22850,
6487,
15042,
22850,
6487,
675,... | |
return s.pattern.replace( "$PAGE", name ) | return s.pattern.replace( "$NAME", name ) | def default_for_name(s, name): """ returns a name, made to fit the default page pattern """ if s.pattern == None: return None return s.pattern.replace( "$PAGE", name ) | 853504b06c4a80f7019350c7fa30e83763dde9bc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2338/853504b06c4a80f7019350c7fa30e83763dde9bc/localnames.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
805,
67,
1884,
67,
529,
12,
87,
16,
508,
4672,
3536,
1135,
279,
508,
16,
7165,
358,
4845,
326,
805,
1363,
1936,
3536,
309,
272,
18,
4951,
422,
599,
30,
327,
599,
327,
272,
18,
4951,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
805,
67,
1884,
67,
529,
12,
87,
16,
508,
4672,
3536,
1135,
279,
508,
16,
7165,
358,
4845,
326,
805,
1363,
1936,
3536,
309,
272,
18,
4951,
422,
599,
30,
327,
599,
327,
272,
18,
4951,
... |
if not (start + (count+1) * step)*sign > end*sign: | if not (start + count * step)*sign > end*sign: | def generic_xsrange(start, end, step): sign = 1 if step > 0 else -1 # In order for range to make sense, start, end, and step must lie in a 1-dim real subspace... count = int(float((end-start)/step)) if count <= 0: return # we assume that a+b*c = a + b + ... + b if not (start + (count+1) * step)*sign > end*sign: # we won't get there by adding, perhaps comparison in the ring is bad # rather than enter an infinite loop, do something sensible # the 'not' is hear because incomparable items return False for k in xrange(count): yield start + k*step elif step > 0: while start < end: yield start start += step elif step < 0: while start > end: yield start start += step else: raise ValueError, "step must not be 0" | 5b781f7eaf348560b064f95fb5c58a9bc3a13c10 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/5b781f7eaf348560b064f95fb5c58a9bc3a13c10/misc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5210,
67,
13713,
3676,
12,
1937,
16,
679,
16,
2235,
4672,
1573,
273,
404,
309,
2235,
405,
374,
469,
300,
21,
468,
657,
1353,
364,
1048,
358,
1221,
12764,
16,
787,
16,
679,
16,
471,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5210,
67,
13713,
3676,
12,
1937,
16,
679,
16,
2235,
4672,
1573,
273,
404,
309,
2235,
405,
374,
469,
300,
21,
468,
657,
1353,
364,
1048,
358,
1221,
12764,
16,
787,
16,
679,
16,
471,
2... |
self.toolbar.pan(True) | self.toolbar.pan() self.toolbar.zoom() | def on_togglebuttonShowMap_clicked(self, event): buttons_deactivate = [self.buttonClearAll, self.buttonClearOrigMag, self.buttonClearFocMec, self.buttonDoHyp2000, self.buttonDo3dloc, self.buttonDoNLLoc, self.buttonCalcMag, self.comboboxNLLocModel, self.buttonDoFocmec, self.togglebuttonShowFocMec, self.buttonNextFocMec, self.togglebuttonShowWadati, self.buttonGetNextEvent, self.buttonSendEvent, self.buttonUpdateEventList, self.checkbuttonPublicEvent, self.buttonDeleteEvent, self.buttonPreviousStream, self.buttonNextStream, self.labelStreamName, self.labelStreamNumber, self.comboboxPhaseType, self.togglebuttonFilter, self.comboboxFilterType, self.checkbuttonZeroPhase, self.labelHighpass, self.labelLowpass, self.spinbuttonHighpass, self.spinbuttonLowpass, self.togglebuttonSpectrogram, self.checkbuttonSpectrogramLog] state = self.togglebuttonShowMap.get_active() for button in buttons_deactivate: button.set_sensitive(not state) if state: self.delAxes() self.fig.clear() self.drawEventMap() self.multicursor.visible = False self.toolbar.pan(True) self.toolbar.update() self.canv.draw() self.textviewStdOutImproved.write("http://maps.google.de/maps" + \ "?f=q&q=%.6f,%.6f" % (self.dictOrigin['Latitude'], self.dictOrigin['Longitude'])) else: self.delEventMap() self.fig.clear() self.drawAxes() self.toolbar.update() self.drawSavedPicks() self.multicursorReinit() self.updatePlot() self.updateStreamLabels() self.canv.draw() | 882451ff4771901a53dd2b13074c3b15c9daddc9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10346/882451ff4771901a53dd2b13074c3b15c9daddc9/obspyck.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
67,
14401,
5391,
5706,
863,
67,
7475,
329,
12,
2890,
16,
871,
4672,
9502,
67,
323,
10014,
273,
306,
2890,
18,
5391,
9094,
1595,
16,
365,
18,
5391,
9094,
4741,
11372,
16,
365,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
67,
14401,
5391,
5706,
863,
67,
7475,
329,
12,
2890,
16,
871,
4672,
9502,
67,
323,
10014,
273,
306,
2890,
18,
5391,
9094,
1595,
16,
365,
18,
5391,
9094,
4741,
11372,
16,
365,
18,
... |
raise Unauthorized, 'You are not permitted to create messages.' | raise Unauthorized, _( 'You are not permitted to create messages.') | def handle_message(self, message): ''' message - a Message instance | f9457e5e409c6363bf37d5634a3c77d621f1a603 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/f9457e5e409c6363bf37d5634a3c77d621f1a603/mailgw.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
67,
2150,
12,
2890,
16,
883,
4672,
9163,
883,
300,
279,
2350,
791,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
67,
2150,
12,
2890,
16,
883,
4672,
9163,
883,
300,
279,
2350,
791,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
class NoEOFStringIO(StringIO.StringIO): | class NoEOFStringIO(io.BytesIO): | def makefile(self, mode, bufsize=None): if mode != 'r' and mode != 'rb': raise httplib.UnimplementedFileMode() return self.fileclass(self.text) | 820f90d267e6bd26e7f8a9ef67210d48d3eeb82f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8125/820f90d267e6bd26e7f8a9ef67210d48d3eeb82f/test_httplib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1221,
768,
12,
2890,
16,
1965,
16,
1681,
1467,
33,
7036,
4672,
309,
1965,
480,
296,
86,
11,
471,
1965,
480,
296,
6731,
4278,
1002,
15851,
6673,
18,
984,
21099,
812,
2309,
1435,
327,
36... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1221,
768,
12,
2890,
16,
1965,
16,
1681,
1467,
33,
7036,
4672,
309,
1965,
480,
296,
86,
11,
471,
1965,
480,
296,
6731,
4278,
1002,
15851,
6673,
18,
984,
21099,
812,
2309,
1435,
327,
36... |
a = _castCopyAndTranspose(t, a) | a = _fastCopyAndTranspose(t, a) | def eigvalsh(a, UPLO='L'): _assertRank2(a) _assertSquareness(a) t, result_t = _commonType(a) real_t = _linalgRealType(t) a = _castCopyAndTranspose(t, a) n = a.shape[0] liwork = 5*n+3 iwork = zeros((liwork,), fortran_int) if isComplexType(t): lapack_routine = lapack_lite.zheevd w = zeros((n,), real_t) lwork = 1 work = zeros((lwork,), t) lrwork = 1 rwork = zeros((lrwork,),real_t) results = lapack_routine('N', UPLO, n, a, n, w, work, -1, rwork, -1, iwork, liwork, 0) lwork = int(abs(work[0])) work = zeros((lwork,), t) lrwork = int(rwork[0]) rwork = zeros((lrwork,),real_t) results = lapack_routine('N', UPLO, n, a, n, w, work, lwork, rwork, lrwork, iwork, liwork, 0) else: lapack_routine = lapack_lite.dsyevd w = zeros((n,), t) lwork = 1 work = zeros((lwork,), t) results = lapack_routine('N', UPLO, n, a, n, w, work, -1, iwork, liwork, 0) lwork = int(work[0]) work = zeros((lwork,), t) results = lapack_routine('N', UPLO, n, a, n, w, work, lwork, iwork, liwork, 0) if results['info'] > 0: raise LinAlgError, 'Eigenvalues did not converge' return w.astype(result_t) | 958601cb55c15930a443057d61230a6aa5a45c02 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14925/958601cb55c15930a443057d61230a6aa5a45c02/linalg.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11043,
1125,
674,
12,
69,
16,
7376,
1502,
2218,
48,
11,
4672,
389,
11231,
12925,
22,
12,
69,
13,
389,
11231,
22255,
4496,
12,
69,
13,
268,
16,
563,
67,
88,
273,
389,
6054,
559,
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,
11043,
1125,
674,
12,
69,
16,
7376,
1502,
2218,
48,
11,
4672,
389,
11231,
12925,
22,
12,
69,
13,
389,
11231,
22255,
4496,
12,
69,
13,
268,
16,
563,
67,
88,
273,
389,
6054,
559,
12,
... |
res = csc + other return res | return csc + other | def __add__(self, other): csc = self.tocsc() res = csc + other return res | bdabf856b614694a8ef20c73a7d82bda3a7cf386 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/bdabf856b614694a8ef20c73a7d82bda3a7cf386/sparse.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1289,
972,
12,
2890,
16,
1308,
4672,
276,
1017,
273,
365,
18,
1391,
1017,
1435,
400,
273,
276,
1017,
397,
1308,
327,
400,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1289,
972,
12,
2890,
16,
1308,
4672,
276,
1017,
273,
365,
18,
1391,
1017,
1435,
400,
273,
276,
1017,
397,
1308,
327,
400,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
mod = imgcombo.get_model() exposong.prefs.config['pres.bg'] = mod.get_value(itr, 0) exposong.screen.screen.set_dirty() | if itr: mod = imgcombo.get_model() exposong.prefs.config['pres.bg'] = mod.get_value(itr, 0) exposong.screen.screen.set_dirty() | def _on_image_change(self, imgcombo): 'Change to the selected image.' itr = imgcombo.get_active_iter() mod = imgcombo.get_model() exposong.prefs.config['pres.bg'] = mod.get_value(itr, 0) exposong.screen.screen.set_dirty() | 8c149a0f656a3222c1c9f9aae974c8b5af89a4f5 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5029/8c149a0f656a3222c1c9f9aae974c8b5af89a4f5/bgselect.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
265,
67,
2730,
67,
3427,
12,
2890,
16,
3774,
25053,
4672,
296,
3043,
358,
326,
3170,
1316,
1093,
11176,
273,
3774,
25053,
18,
588,
67,
3535,
67,
2165,
1435,
309,
11176,
30,
681,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
265,
67,
2730,
67,
3427,
12,
2890,
16,
3774,
25053,
4672,
296,
3043,
358,
326,
3170,
1316,
1093,
11176,
273,
3774,
25053,
18,
588,
67,
3535,
67,
2165,
1435,
309,
11176,
30,
681,
2... |
h.flush() h.close() | if h: try: h.flush() h.close() except (IOError, ValueError): pass | def shutdown(handlerList=_handlerList): """ Perform any cleanup actions in the logging system (e.g. flushing buffers). Should be called at application exit. """ for wr in reversed(handlerList[:]): #errors might occur, for example, if files are locked #we just ignore them if raiseExceptions is not set try: h = wr() h.flush() h.close() except: if raiseExceptions: raise #else, swallow | b60d46b2e42ee14a19d6de6edd39025472d9753f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12029/b60d46b2e42ee14a19d6de6edd39025472d9753f/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5731,
12,
4176,
682,
33,
67,
4176,
682,
4672,
3536,
11217,
1281,
6686,
4209,
316,
326,
2907,
2619,
261,
73,
18,
75,
18,
30121,
9664,
2934,
225,
9363,
506,
2566,
622,
2521,
2427,
18,
35... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5731,
12,
4176,
682,
33,
67,
4176,
682,
4672,
3536,
11217,
1281,
6686,
4209,
316,
326,
2907,
2619,
261,
73,
18,
75,
18,
30121,
9664,
2934,
225,
9363,
506,
2566,
622,
2521,
2427,
18,
35... |
scan_share(db, id, proto, host, port, tree_id, command) | scan_share(db, id, proto, host, port, tree_id, hash, command) | def scan_share(db, share_id, proto, host, port, tree_id, command): cursor = db.cursor() hoststr = sharestr(proto, host, port) savepath = share_save_path(proto, host, port) patchmode = tree_id != None and os.path.isfile(savepath) address = socket.gethostbyname(host) log("Scanning %s (%s) ...", (hoststr, address)) start = datetime.datetime.now() if patchmode: data = run_scanner(command, address, proto, port, "-u " + quote_for_shell(savepath)) else: data = run_scanner(command, address, proto, port) save = tempfile.TemporaryFile(bufsize=-1) line_count = 0 line_count_patch = 0 for line in data.stdout: line_count += 1 if line[0] in ('+', '-', '*'): line_count_patch += 1 if line_count > max_lines_from_scanner: kill_process(data) data.stdout.close() data.wait() log("Scanning %s failed. Too many lines from scanner (elapsed time %s).", (hoststr, datetime.datetime.now() - start)) return save.write(line) if data.wait() != 0: # assume next_scan is far away from now and we do not have to # acquire lock on the shares table again cursor.execute(""" UPDATE shares SET next_scan = now() + %(w)s WHERE share_id = %(s)s; """, {'s':share_id, 'w': wait_until_next_scan_failed}) log("Scanning %s failed (elapsed time %s).", (hoststr, datetime.datetime.now() - start)) return if patchmode and (line_count_patch > (line_count - line_count_patch) / patch_fallback): log("Patch is too long for %s (patch %s, non-patch %s). Fallback to non-patching mode", (hoststr, line_count_patch, line_count - line_count_patch)) patchmode = False db.set_isolation_level(psycopg2.extensions.ISOLATION_LEVEL_READ_COMMITTED) scan_time = datetime.datetime.now() - start start = datetime.datetime.now() if tree_id is None: cursor.execute("INSERT INTO trees (share_id) VALUES (%(s)s) RETURNING tree_id", {'s':share_id}) tree_id = cursor.fetchone()['tree_id'] qcache = PsycoCache(cursor) paths_buffer = dict() save.seek(0) if patchmode: for line in save: if line[0] not in ('+', '-', '*'): break scan_line_patch(cursor, tree_id, line.strip('\n'), qcache, paths_buffer) else: cursor.execute("DELETE FROM paths WHERE tree_id = %(t)s", {'t':tree_id}) for line in save: if line[0] in ('+', '-', '*'): continue scan_line(cursor, tree_id, line.strip('\n'), qcache, paths_buffer) qcache.allcommit() try: save.seek(0) file = open(savepath, 'w') shutil.copyfileobj(save, file) file.close() except: log("Failed to save contents of %s to file %s.", (hoststr, savepath)) save.close() cursor.execute(""" UPDATE shares SET tree_id = %(t)s, last_scan = now() WHERE share_id = %(s)s; """, {'s': share_id, 't': tree_id}) if qcache.totalsize >= 0: cursor.execute(""" UPDATE shares SET size = %(sz)s WHERE share_id = %(s)s; """, {'s':share_id, 'sz': qcache.totalsize}) db.commit() if patchmode: deleted = qcache.stat_pdelete + qcache.stat_fdelete added = qcache.stat_padd + qcache.stat_fadd modified = qcache.stat_fmodify log("Scanning %s succeded. Database updated in patching mode: delete %s, add %s, modify %s (scan time %s, update time %s).", (hoststr, str(deleted), str(added), str(modified), scan_time, datetime.datetime.now() - start)) else: log("Scanning %s succeded. Database updated in non-patching mode (scan time %s, update time %s).", (hoststr, scan_time, datetime.datetime.now() - start)) | 5ebc594182d5001f460d9b2bacaa20cc20b426a7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4762/5ebc594182d5001f460d9b2bacaa20cc20b426a7/spider.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4135,
67,
14419,
12,
1966,
16,
7433,
67,
350,
16,
3760,
16,
1479,
16,
1756,
16,
2151,
67,
350,
16,
1296,
4672,
3347,
273,
1319,
18,
9216,
1435,
1479,
701,
273,
24123,
313,
12,
9393,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4135,
67,
14419,
12,
1966,
16,
7433,
67,
350,
16,
3760,
16,
1479,
16,
1756,
16,
2151,
67,
350,
16,
1296,
4672,
3347,
273,
1319,
18,
9216,
1435,
1479,
701,
273,
24123,
313,
12,
9393,
... |
status['backgroundFlushing'].pop('last_finished') except KeyError: pass try: status.pop('localTime') except KeyError: pass | status['backgroundFlushing'].pop('last_finished') except KeyError: pass try: status.pop('localTime') except KeyError: pass | def getMongoDBStatus(self): self.checksLogger.debug('getMongoDBStatus: start') | 5a53ed9f21a5a535b3ea165caa433d405c44a070 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13266/5a53ed9f21a5a535b3ea165caa433d405c44a070/checks.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2108,
5409,
2290,
1482,
12,
2890,
4672,
365,
18,
12366,
3328,
18,
4148,
2668,
588,
16578,
2290,
1482,
30,
787,
6134,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2108,
5409,
2290,
1482,
12,
2890,
4672,
365,
18,
12366,
3328,
18,
4148,
2668,
588,
16578,
2290,
1482,
30,
787,
6134,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
str += self._var_summary(doc.cvariables(), doc.sort_order(), | str += self._var_summary(doc.cvariables(), doc.sortorder(), | def _class_to_html(self, uid): """ @return: An HTML page describing the class identified by C{uid}. @rtype: C{string} @param uid: The unique identifier for the class that should be documented. @type uid: L{UID} """ # Get the module's documentation doc = self._docmap[uid] # Write the header & navigation bar. str = self._header(`uid`) str += self._navbar('class', uid) str += self._public_private_link(uid) | c953b2de7aa23b0dce9a80366ed13af227c1f7f3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/c953b2de7aa23b0dce9a80366ed13af227c1f7f3/html.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1106,
67,
869,
67,
2620,
12,
2890,
16,
4555,
4672,
3536,
632,
2463,
30,
1922,
3982,
1363,
16868,
326,
667,
9283,
635,
385,
95,
1911,
5496,
632,
86,
723,
30,
385,
95,
1080,
97,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1106,
67,
869,
67,
2620,
12,
2890,
16,
4555,
4672,
3536,
632,
2463,
30,
1922,
3982,
1363,
16868,
326,
667,
9283,
635,
385,
95,
1911,
5496,
632,
86,
723,
30,
385,
95,
1080,
97,
6... |
account = schema.ns('osaf.app', self.rv).TestPOPAccount | account = schema.ns('osaf.app', self.rv).TestPOPAccount | def getIncomingAccount(self): self.__StoreFormData(self.currentPanelType, self.currentPanel, self.data[self.currentIndex]['values']) | b1d959dcb6ea3064db41fef843c06b239e066a69 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9228/b1d959dcb6ea3064db41fef843c06b239e066a69/AccountPreferences.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7854,
5522,
3032,
12,
2890,
4672,
365,
16186,
2257,
30079,
12,
2890,
18,
2972,
5537,
559,
16,
365,
18,
2972,
5537,
16,
365,
18,
892,
63,
2890,
18,
2972,
1016,
23962,
2372,
19486,
2,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
7854,
5522,
3032,
12,
2890,
4672,
365,
16186,
2257,
30079,
12,
2890,
18,
2972,
5537,
559,
16,
365,
18,
2972,
5537,
16,
365,
18,
892,
63,
2890,
18,
2972,
1016,
23962,
2372,
19486,
2,
-1... |
print 'Running test: ' + fulltest subprocess.call([fulltest]) def GenerateOutput(self): """Convert profile data to html.""" | print >>sys.stderr, 'Running test: ' + fulltest cmdlist = [fulltest, '--gtest_print_time'] if self.options.fast_test: cmdlist.append('--gtest_filter=TupleTest*') retcode = subprocess.call(cmdlist) if retcode: logging.fatal('COVERAGE: test %s failed; return code: %d' % (fulltest, retcode)) if self.options.strict: sys.exit(retcode) def GenerateLcov(self): """Convert profile data to lcov.""" | def RunTests(self): """Run all unit tests.""" for fulltest in self.tests: if not os.path.exists(fulltest): logging.fatal(fulltest + ' does not exist') # TODO(jrg): add timeout? # TODO(jrg): check return value and choke if it failed? # TODO(jrg): add --gtest_print_time like as run from XCode? print 'Running test: ' + fulltest # subprocess.call([fulltest, '--gtest_filter=TupleTest*']) # quick check subprocess.call([fulltest]) | 36a488557d680de1559113071bc40c4d85ec7d9a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5060/36a488557d680de1559113071bc40c4d85ec7d9a/coverage_posix.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1939,
14650,
12,
2890,
4672,
3536,
1997,
777,
2836,
7434,
12123,
364,
1983,
3813,
316,
365,
18,
16341,
30,
309,
486,
1140,
18,
803,
18,
1808,
12,
2854,
3813,
4672,
2907,
18,
30709,
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,
1939,
14650,
12,
2890,
4672,
3536,
1997,
777,
2836,
7434,
12123,
364,
1983,
3813,
316,
365,
18,
16341,
30,
309,
486,
1140,
18,
803,
18,
1808,
12,
2854,
3813,
4672,
2907,
18,
30709,
12,
... |
print angle(v1, v2, v3) print dihedral(v1, v2, v3, v4) | for v in [v1,v2,v3,v4]: v.normalize() | def right_multiply(self, matrix): "Return Vector=Vector x Matrix" x,y,z=matrixmultiply(self._ar, matrix) return Vector(x,y,z) | 1361533b7b7846e8edc2806567abeb60f5403418 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7167/1361533b7b7846e8edc2806567abeb60f5403418/Vector.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2145,
67,
7027,
1283,
12,
2890,
16,
3148,
4672,
315,
990,
5589,
33,
5018,
619,
7298,
6,
619,
16,
93,
16,
94,
33,
5667,
7027,
1283,
12,
2890,
6315,
297,
16,
3148,
13,
327,
5589,
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,
2145,
67,
7027,
1283,
12,
2890,
16,
3148,
4672,
315,
990,
5589,
33,
5018,
619,
7298,
6,
619,
16,
93,
16,
94,
33,
5667,
7027,
1283,
12,
2890,
6315,
297,
16,
3148,
13,
327,
5589,
12,
... |
(ns, other_ns) = self.input.get_nowait() | try: (ns, other_ns) = self.input.get_nowait() except Queue.Empty: return | def run(self): """Iterate over the queue, processing each item.""" while not self.input.empty(): # check_wildcards is special: it has a tuple of two nameservers if self.action_type == 'wildcard_check': (ns, other_ns) = self.input.get_nowait() if ns.disabled or other_ns.disabled: self.results.put(None) continue else: self.results.put((ns, ns.TestSharedCache(other_ns))) # everything else only has a single nameserver. else: try: ns = self.input.get_nowait() if ns.disabled: self.results.put(None) continue if self.action_type == 'ping': self.results.put(ns.CheckHealth(fast_check=True)) elif self.action_type == 'health': self.results.put(ns.CheckHealth(sanity_checks=self.checks)) elif self.action_type == 'store_wildcards': self.results.put(ns.StoreWildcardCache()) else: raise ValueError('Invalid action type: %s' % self.action_type) except Queue.Empty: pass | c15daedb6598978bf30b005aa8c2b626cee5f1f9 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4170/c15daedb6598978bf30b005aa8c2b626cee5f1f9/nameserver_list.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
4672,
3536,
14916,
1879,
326,
2389,
16,
4929,
1517,
761,
12123,
1323,
486,
365,
18,
2630,
18,
5531,
13332,
468,
866,
67,
22887,
87,
353,
4582,
30,
518,
711,
279,
3193,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
4672,
3536,
14916,
1879,
326,
2389,
16,
4929,
1517,
761,
12123,
1323,
486,
365,
18,
2630,
18,
5531,
13332,
468,
866,
67,
22887,
87,
353,
4582,
30,
518,
711,
279,
3193,
... |
for ext, cmd in ARCHIVE_FORMATS: | for ext, unpackerClass, arg in ARCHIVE_FORMATS: | def unpackPackageOnly(self, output=None): """Unpack a downloaded package archive.""" filename = os.path.split(self.archiveFilename)[1] for ext, cmd in ARCHIVE_FORMATS: if filename[-len(ext):] == ext: break else: return "unknown extension for archive file: %s" % filename self.basename = filename[:-len(ext)] cmd = cmd % self.archiveFilename if self._cmd(output, self._db.preferences.buildDir, cmd): return "unpack command failed" | a57befcef5b0ba55fc6941f6703163ed733a3f07 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/a57befcef5b0ba55fc6941f6703163ed733a3f07/pimp.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6167,
2261,
3386,
12,
2890,
16,
876,
33,
7036,
4672,
3536,
23649,
279,
13549,
2181,
5052,
12123,
225,
1544,
273,
1140,
18,
803,
18,
4939,
12,
2890,
18,
10686,
5359,
25146,
21,
65,
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,
6167,
2261,
3386,
12,
2890,
16,
876,
33,
7036,
4672,
3536,
23649,
279,
13549,
2181,
5052,
12123,
225,
1544,
273,
1140,
18,
803,
18,
4939,
12,
2890,
18,
10686,
5359,
25146,
21,
65,
364,
... |
return this. Otherwise, we return the upper and lower bounds with a warning that these are not the same. | return this. Otherwise, we raise a ValueError with an error message specifying the upper and lower bounds. | def rank(self,verbose=0, lim1=5, lim3=50, limtriv=10, maxprob=20, limbigprime=30): r""" Return the rank of this elliptic curve, if it can be determined. | 16c5d6f4b590776892987400ecee6a836886ccbb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/16c5d6f4b590776892987400ecee6a836886ccbb/ell_number_field.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6171,
12,
2890,
16,
11369,
33,
20,
16,
20167,
21,
33,
25,
16,
20167,
23,
33,
3361,
16,
20167,
313,
427,
33,
2163,
16,
943,
7748,
33,
3462,
16,
20167,
14002,
16382,
33,
5082,
4672,
43... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6171,
12,
2890,
16,
11369,
33,
20,
16,
20167,
21,
33,
25,
16,
20167,
23,
33,
3361,
16,
20167,
313,
427,
33,
2163,
16,
943,
7748,
33,
3462,
16,
20167,
14002,
16382,
33,
5082,
4672,
43... |
return 0 | def SetupNodeDaemon(node, ssh_key_check): """Add a node to the cluster. This function must be called before the actual opcode, and will ssh to the remote node, copy the needed files, and start ganeti-noded, allowing the master to do the rest via normal rpc calls. Args: node: fully qualified domain name for the new node """ cfg = ssconf.SimpleConfigReader() sshrunner = ssh.SshRunner(cfg.GetClusterName()) gntpem = utils.ReadFile(constants.SSL_CERT_FILE) # in the base64 pem encoding, neither '!' nor '.' are valid chars, # so we use this to detect an invalid certificate; as long as the # cert doesn't contain this, the here-document will be correctly # parsed by the shell sequence below if re.search('^!EOF\.', gntpem, re.MULTILINE): raise errors.OpExecError("invalid PEM encoding in the SSL certificate") if not gntpem.endswith("\n"): raise errors.OpExecError("PEM must end with newline") # set up inter-node password and certificate and restarts the node daemon # and then connect with ssh to set password and start ganeti-noded # note that all the below variables are sanitized at this point, # either by being constants or by the checks above mycommand = ("umask 077 && " "cat > '%s' << '!EOF.' && \n" "%s!EOF.\n%s restart" % (constants.SSL_CERT_FILE, gntpem, constants.NODE_INITD_SCRIPT)) result = sshrunner.Run(node, 'root', mycommand, batch=False, ask_key=ssh_key_check, use_cluster_key=False, strict_host_check=ssh_key_check) if result.failed: raise errors.OpExecError("Remote command on node %s, error: %s," " output: %s" % (node, result.fail_reason, result.output)) return 0 | 876228292a42b08ed426a879528a72cda5a5a5ea /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7542/876228292a42b08ed426a879528a72cda5a5a5ea/bootstrap.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10939,
907,
12858,
12,
2159,
16,
7056,
67,
856,
67,
1893,
4672,
3536,
986,
279,
756,
358,
326,
2855,
18,
225,
1220,
445,
1297,
506,
2566,
1865,
326,
3214,
11396,
16,
471,
903,
7056,
35... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10939,
907,
12858,
12,
2159,
16,
7056,
67,
856,
67,
1893,
4672,
3536,
986,
279,
756,
358,
326,
2855,
18,
225,
1220,
445,
1297,
506,
2566,
1865,
326,
3214,
11396,
16,
471,
903,
7056,
35... | |
print 'loading %s' % self._options['configfile'] | def loadConfiguration(self): items = { 'configfile': ('-c', '--config', 's', self._options['configfile'], '', ''), 'verbose': ('-v', '--verbose', 'b', self._options['verbose'], '', ''), 'debug': ('-d', '--debug', 'b', self._options['debug'], '', ''), 'cleanup': ('-x', '--cleanup', 'b', self._options['cleanup'], '', ''), 'tbox_data': ('-t', '--tboxdata', 's', self._options['tbox_data'], '', ''), 'html_data': ('-o', '--htmldata', 's', self._options['html_data'], '', ''), 'perf_data': ('-p', '--perfdata', 's', self._options['perf_data'], '', ''), 'warn': ('-w', '--warn', 'f', self._options['warn'], '', ''), 'alert': ('-a', '--alert', 'f', self._options['alert'], '', ''), 'p_alert': ('-P', '--p_alert', 'f', self._options['p_alert'], '', ''), } | 529018113dc78215bd476acf6fba265caad9be59 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/529018113dc78215bd476acf6fba265caad9be59/perf.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1262,
1750,
12,
2890,
4672,
1516,
273,
288,
296,
1425,
768,
4278,
7707,
17,
71,
2187,
3534,
1425,
2187,
282,
296,
87,
2187,
365,
6315,
2116,
3292,
1425,
768,
17337,
10226,
875,
3631,
296... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1262,
1750,
12,
2890,
4672,
1516,
273,
288,
296,
1425,
768,
4278,
7707,
17,
71,
2187,
3534,
1425,
2187,
282,
296,
87,
2187,
365,
6315,
2116,
3292,
1425,
768,
17337,
10226,
875,
3631,
296... | |
dep_regex = re.compile(r'^ *(?:(?:cimport +([\w\. ,]+))|(?:from +(\w+) +cimport)|(?:include *[\'"]([^\'"]+)[\'"])|(?:cdef *extern *from *[\'"]([^\'"]+)[\'"]))', re.M) | dep_regex = re.compile(r'^ *(?:(?:cimport +([\w\. ,]+))|(?:from +([\w.]+) +cimport)|(?:include *[\'"]([^\'"]+)[\'"])|(?:cdef *extern *from *[\'"]([^\'"]+)[\'"]))', re.M) | dep_regex = re.compile(r'^ *(?:(?:cimport +([\w\. ,]+))|(?:from +(\w+) +cimport)|(?:include *[\'"]([^\'"]+)[\'"])|(?:cdef *extern *from *[\'"]([^\'"]+)[\'"]))', re.M) | 21fdf9d9fb1d32fc8854839deeae01eaea3a25e2 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/21fdf9d9fb1d32fc8854839deeae01eaea3a25e2/setup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
5993,
67,
7584,
273,
283,
18,
11100,
12,
86,
19856,
380,
20473,
71,
5666,
397,
14026,
91,
5834,
269,
3737,
3719,
96,
6503,
2080,
397,
14026,
91,
18,
7941,
397,
71,
5666,
14047,
6503,
6702,
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,
5993,
67,
7584,
273,
283,
18,
11100,
12,
86,
19856,
380,
20473,
71,
5666,
397,
14026,
91,
5834,
269,
3737,
3719,
96,
6503,
2080,
397,
14026,
91,
18,
7941,
397,
71,
5666,
14047,
6503,
6702,
3... |
[A-Zx]| \[[A-Z]+>?\]| \{[A-Z]+\} | [ABCDEFGHIKLMNPQRSTVWXYZx]| \[[ABCDEFGHIKLMNPQRSTVWXYZ]+>?\]| \{[ABCDEFGHIKLMNPQRSTVWXYZ]+\} | def find_terms(pattern): if pattern[-1:] != ".": raise TypeError, "not a prosite pattern - needs a final '.'" pattern = pattern[:-1] terms = string.split(pattern, "-") result = [] i = 0 for term in terms: can_begin = can_end = 0 # Starts with a "<"? if term[:1] == "<": term = term[1:] is_begin = 1 else: is_begin = 0 # Ends with a ">"? if term[-1:] == ">": term = term[:-1] is_end = 1 else: is_end = 0 match = prosite_term_re.match(term) if match is None: raise TypeError, "not a Prosite term (%s)" % repr(term) if match.group(1) is not None: # Single letter ignore = 0 letters = match.group(1) elif match.group(3) is not None: # Letters inside of "[]"s ignore = 0 letters = match.group(3) if match.group(2): can_begin = 1 if i != 0: raise TypeError, \ "[<] only allowed for first term (%s)" % repr(term) if match.group(4): can_end = 1 if i != len(terms) - 1: raise TypeError, \ "[>] only allowed for last term (%s)" % repr(term) elif match.group(5) is not None: # Letters inside of "{}"s ignore = 1 letters = match.group(5) else: raise TypeError, "not a prosite term (%s)" % repr(term) if match.group(6) is not None: # there is a minimum number min_count = int(match.group(6)) else: # no min, so it's 1 min_count = 1 if match.group(7) is not None: # there is a maximum number max_count = int(match.group(7)[1:]) else: # no max specified, so use the same as the min max_count = min_count result.append(PrositeTerm(letters, ignore, is_begin, is_end, min_count, max_count, can_begin, can_end)) i = i + 1 return result | 7963d874b44877e2cccce3ca4a6fcd719305ad4e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7167/7963d874b44877e2cccce3ca4a6fcd719305ad4e/Pattern.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1104,
67,
10112,
12,
4951,
4672,
309,
1936,
18919,
21,
26894,
480,
4585,
30,
1002,
3580,
16,
315,
902,
279,
450,
4256,
1936,
300,
4260,
279,
727,
2611,
6,
1936,
273,
1936,
10531,
17,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1104,
67,
10112,
12,
4951,
4672,
309,
1936,
18919,
21,
26894,
480,
4585,
30,
1002,
3580,
16,
315,
902,
279,
450,
4256,
1936,
300,
4260,
279,
727,
2611,
6,
1936,
273,
1936,
10531,
17,
2... |
eval -- if True, then evaluate the resulting code and return the | - ``eval`` -- if True, then evaluate the resulting code and return the | def explain_pickle(pickle=None, file=None, compress=True, **kwargs): r""" Explain a pickle. (That is, produce source code such that evaluating the code is equivalent to loading the pickle.) Feeding the result of explain_pickle to sage_eval should be totally equivalent to loading the pickle with cPickle. INPUTS: pickle -- the pickle to explain, as a string (default: None) file -- a filename of a pickle (default: None) compress -- if False, don't attempt to decompress the pickle (default: True) in_current_sage -- if True, produce potentially simpler code that is tied to the current version of Sage. (default: False) default_assumptions -- if True, produce potentially simpler code that assumes that generic unpickling code will be used. This code may not actually work. (default: False) eval -- if True, then evaluate the resulting code and return the evaluated result. (default: False) preparse -- if True, then produce code to be evaluated with Sage's preparser; if False, then produce standard Python code; if None, then produce code that will work either with or without the preparser. (default: True) pedantic -- if True, then carefully ensures that the result has at least as much sharing as the result of cPickle (it may have more, for immutable objects). (default: False) Exactly one of pickle (a string containing a pickle) or file (the filename of a pickle) must be provided. EXAMPLES: sage: explain_pickle(dumps({('a', 'b'): [1r, 2r]})) {('a', 'b'):[1r, 2r]} sage: explain_pickle(dumps(RR(pi)), in_current_sage=True) from sage.rings.real_mpfr import __create__RealNumber_version0 from sage.rings.real_mpfr import __create__RealField_version0 __create__RealNumber_version0(__create__RealField_version0(53r, False, 'RNDN'), '3.4gvml245kc0@0', 32r) sage: s = 'hi' sage: explain_pickle(dumps((s, s))) ('hi', 'hi') sage: explain_pickle(dumps((s, s)), pedantic=True) si = 'hi' (si, si) sage: explain_pickle(dumps(5r)) 5r sage: explain_pickle(dumps(5r), preparse=False) 5 sage: explain_pickle(dumps(5r), preparse=None) int(5) sage: explain_pickle(dumps(22/7)) pg_make_rational = unpickle_global('sage.rings.rational', 'make_rational') pg_make_rational('m/7') sage: explain_pickle(dumps(22/7), in_current_sage=True) from sage.rings.rational import make_rational make_rational('m/7') sage: explain_pickle(dumps(22/7), default_assumptions=True) from sage.rings.rational import make_rational make_rational('m/7') """ if pickle is not None: p = pickle elif file is not None: p = open(file).read() else: raise ValueError, "Either pickle or file must be specified" if compress: try: p = comp.decompress(p) except Exception, msg1: try: p = comp_other.decompress(p) except Exception, msg2: # Maybe data is uncompressed? pass return explain_pickle_string(p, **kwargs) | 03555b4381371de7688c2f08f833898ba9658b7b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/03555b4381371de7688c2f08f833898ba9658b7b/explain_pickle.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
19765,
67,
20847,
12,
20847,
33,
7036,
16,
585,
33,
7036,
16,
8099,
33,
5510,
16,
2826,
4333,
4672,
436,
8395,
1312,
7446,
279,
13379,
18,
225,
261,
18163,
353,
16,
11402,
1084,
981,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
19765,
67,
20847,
12,
20847,
33,
7036,
16,
585,
33,
7036,
16,
8099,
33,
5510,
16,
2826,
4333,
4672,
436,
8395,
1312,
7446,
279,
13379,
18,
225,
261,
18163,
353,
16,
11402,
1084,
981,
4... |
def __init__(self, namespace, shlib, includes): | def __init__(self, namespace, shlibs, includes): | def __init__(self, namespace, shlib, includes): super(GIRWriter, self).__init__() self._write_repository(namespace, shlib, includes) | 9045f204f1f911867c2dae885904f13f83b9ddab /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2770/9045f204f1f911867c2dae885904f13f83b9ddab/girwriter.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1981,
16,
699,
21571,
16,
6104,
4672,
2240,
12,
43,
7937,
2289,
16,
365,
2934,
972,
2738,
972,
1435,
365,
6315,
2626,
67,
9071,
12,
4937,
16,
699,
2941,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1981,
16,
699,
21571,
16,
6104,
4672,
2240,
12,
43,
7937,
2289,
16,
365,
2934,
972,
2738,
972,
1435,
365,
6315,
2626,
67,
9071,
12,
4937,
16,
699,
2941,
... |
problem_log.user = user | problem_log.user = student | def post(self): user = util.get_current_user() if not user: self.response.out.write("please login first") elif App.is_dev_server: file_contents = self.request.POST.get('userdata').file.read() import_dict = json.loads(file_contents) user_data_dict = import_dict['UserData'] user_exercises = import_dict['UserExercise'] problems = import_dict['ProblemLog'] user_data = UserData.get_or_insert_for(user) user_data.moderator = user_data_dict['moderator'] user_data.joined = self.datetime_from_str(user_data_dict['joined']) user_data.last_login = self.datetime_from_str(user_data_dict['last_login']) user_data.proficient_exercises = user_data_dict['proficient_exercises'] user_data.all_proficient_exercises = user_data_dict['all_proficient_exercises'] user_data.suggested_exercises = user_data_dict['suggested_exercises'] user_data.assigned_exercises = user_data_dict['assigned_exercises'] user_data.need_to_reassess = user_data_dict['need_to_reassess'] user_data.points = user_data_dict['points'] user_data.coaches = user_data_dict['coaches'] user_data.put() | aa56b8ce3c56598cdf57706e6219774a42d5bac2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12010/aa56b8ce3c56598cdf57706e6219774a42d5bac2/main.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1603,
12,
2890,
4672,
729,
273,
1709,
18,
588,
67,
2972,
67,
1355,
1435,
309,
486,
729,
30,
365,
18,
2740,
18,
659,
18,
2626,
2932,
1802,
448,
3925,
1122,
7923,
1327,
4677,
18,
291,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1603,
12,
2890,
4672,
729,
273,
1709,
18,
588,
67,
2972,
67,
1355,
1435,
309,
486,
729,
30,
365,
18,
2740,
18,
659,
18,
2626,
2932,
1802,
448,
3925,
1122,
7923,
1327,
4677,
18,
291,
... |
setattr(on, name, wrapper) | setattr(on, name, intercept) | def wrapper(self, *args, **kwargs): return hook[0](self, lambda *a, **kw: join_point(self, *a, **kw), *args, **kwargs) | 732bab3c7bfea71607a38e0a445196c422b767b1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14801/732bab3c7bfea71607a38e0a445196c422b767b1/aspect.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4053,
12,
2890,
16,
380,
1968,
16,
2826,
4333,
4672,
327,
3953,
63,
20,
29955,
2890,
16,
3195,
380,
69,
16,
2826,
9987,
30,
1233,
67,
1153,
12,
2890,
16,
380,
69,
16,
2826,
9987,
363... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4053,
12,
2890,
16,
380,
1968,
16,
2826,
4333,
4672,
327,
3953,
63,
20,
29955,
2890,
16,
3195,
380,
69,
16,
2826,
9987,
30,
1233,
67,
1153,
12,
2890,
16,
380,
69,
16,
2826,
9987,
363... |
self.assertEqual([98.9], self.hobj.arr1[0]) | self.assertTrue(all(array([98.9]) == self.hobj.arr1)) | def test_set_to_default(self): self.assertEqual(3.1415926, self.hobj.arr1[0]) self.hobj.add_trait('arr4', Array(iotype='in', units='kg')) self.assertTrue(all(array([]) == self.hobj.arr4)) self.hobj.arr4 = [6.5] self.assertEqual(6.5, self.hobj.arr4[0]) self.hobj.revert_to_defaults() self.assertEqual([98.9], self.hobj.arr1[0]) self.assertTrue(all(array([]) == self.hobj.arr4)) | edf1083fa3e9917f4722345b730b479243081141 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12610/edf1083fa3e9917f4722345b730b479243081141/test_array.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
542,
67,
869,
67,
1886,
12,
2890,
4672,
365,
18,
11231,
5812,
12,
23,
18,
3461,
24872,
5558,
16,
365,
18,
76,
2603,
18,
5399,
21,
63,
20,
5717,
365,
18,
76,
2603,
18,
128... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
542,
67,
869,
67,
1886,
12,
2890,
4672,
365,
18,
11231,
5812,
12,
23,
18,
3461,
24872,
5558,
16,
365,
18,
76,
2603,
18,
5399,
21,
63,
20,
5717,
365,
18,
76,
2603,
18,
128... |
driver_count = _gdal.GDALGetDriverCount() for iDriver in range(driver_count): driver_o = _gdal.GDALGetDriver( iDriver ) if _gdal.GDALGetDriverShortName(driver_o) == name: return Driver(driver_o) return None | driver_o = _gdal.GDALGetDriverByName( name ) if driver_o is None or driver_o == "NULL": return None else: return Driver( driver_o ) | def GetDriverByName(name): _gdal.GDALAllRegister() driver_count = _gdal.GDALGetDriverCount() for iDriver in range(driver_count): driver_o = _gdal.GDALGetDriver( iDriver ) if _gdal.GDALGetDriverShortName(driver_o) == name: return Driver(driver_o) return None | b2e16229b70e93b98d38437267014e859a135acd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10289/b2e16229b70e93b98d38437267014e859a135acd/gdal.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
968,
4668,
5911,
12,
529,
4672,
389,
19016,
287,
18,
27338,
1013,
1595,
3996,
1435,
3419,
67,
83,
273,
389,
19016,
287,
18,
27338,
1013,
967,
4668,
5911,
12,
508,
262,
309,
3419,
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,
968,
4668,
5911,
12,
529,
4672,
389,
19016,
287,
18,
27338,
1013,
1595,
3996,
1435,
3419,
67,
83,
273,
389,
19016,
287,
18,
27338,
1013,
967,
4668,
5911,
12,
508,
262,
309,
3419,
67,
8... |
method : type name LPAREN params_list RPAREN method_modifier_right method : name LPAREN params_list RPAREN method_modifier_right """ pass def p_method_name_opt(t): """ operator_name_opt : operator_name_opt : name SCOPE """ pass def p_method_operator(t): """ method : type operator_name_opt OPERATOR operator LPAREN params_list RPAREN method_modifier_right method : type operator_name_opt OPERATOR LPAREN RPAREN LPAREN params_list RPAREN method_modifier_right method : operator_name_opt OPERATOR type LPAREN params_list RPAREN method_modifier_right | method : type name template_params_opt LPAREN params_list RPAREN method_modifier_right method : name template_params_opt LPAREN params_list RPAREN method_modifier_right | def p_method(t): """ method : type name LPAREN params_list RPAREN method_modifier_right method : name LPAREN params_list RPAREN method_modifier_right """ pass | 1e60b1d83aba98de6104eaada5b72d722cf30cf4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7302/1e60b1d83aba98de6104eaada5b72d722cf30cf4/ddf.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
293,
67,
2039,
12,
88,
4672,
3536,
707,
294,
618,
508,
511,
15111,
859,
67,
1098,
534,
15111,
707,
67,
20597,
67,
4083,
707,
294,
508,
511,
15111,
859,
67,
1098,
534,
15111,
707,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
293,
67,
2039,
12,
88,
4672,
3536,
707,
294,
618,
508,
511,
15111,
859,
67,
1098,
534,
15111,
707,
67,
20597,
67,
4083,
707,
294,
508,
511,
15111,
859,
67,
1098,
534,
15111,
707,
67,
... |
conflist.append(getConfigListEntry(Plugins[0][0], self.settings.dummy)) | conflist.append(getConfigListEntry(Plugins[0][0], ConfigNothing())) | def __call__(self, *args, **kwargs): self.fnc(*self.args) | 68c456f12b1e72cf982997d4d528281734021a85 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6652/68c456f12b1e72cf982997d4d528281734021a85/AudioSelection.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1991,
972,
12,
2890,
16,
380,
1968,
16,
2826,
4333,
4672,
365,
18,
4293,
71,
30857,
2890,
18,
1968,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1991,
972,
12,
2890,
16,
380,
1968,
16,
2826,
4333,
4672,
365,
18,
4293,
71,
30857,
2890,
18,
1968,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
ts = rpmUtils.transaction.TransactionWrapper(self.conf.installroot) | ts = self.rpmdb.readOnlyTS() | def getKeyForPackage(self, po, askcb = None, fullaskcb = None): """ Retrieve a key for a package. If needed, prompt for if the key should be imported using askcb. @param po: Package object to retrieve the key of. @param askcb: Callback function to use for asking for verification. Takes arguments of the po, the userid for the key, and the keyid. @param fullaskcb: Callback function to use for asking for verification of a key. Differs from askcb in that it gets passed a dictionary so that we can expand the values passed. """ repo = self.repos.getRepo(po.repoid) keyurls = repo.gpgkey key_installed = False | ad35fb246e9da9ba6cabb094d31eb37751c6a290 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5445/ad35fb246e9da9ba6cabb094d31eb37751c6a290/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3579,
1290,
2261,
12,
2890,
16,
8275,
16,
6827,
7358,
273,
599,
16,
1983,
835,
7358,
273,
599,
4672,
3536,
10708,
279,
498,
364,
279,
2181,
18,
971,
3577,
16,
6866,
364,
309,
326,
498,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3579,
1290,
2261,
12,
2890,
16,
8275,
16,
6827,
7358,
273,
599,
16,
1983,
835,
7358,
273,
599,
4672,
3536,
10708,
279,
498,
364,
279,
2181,
18,
971,
3577,
16,
6866,
364,
309,
326,
498,... |
ar rc libmoldname.dll.a $OBJS fstat.o | ar rc libmoldname.dll.a $OBJS fstat.o _winver.o | --def moldname-msvcrt.def \ | 5ed962a58a84830cbe0f649aee7072426feb4c22 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1298/5ed962a58a84830cbe0f649aee7072426feb4c22/msys_link_VC_2008_dlls.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1493,
536,
312,
1673,
529,
17,
959,
90,
3353,
88,
18,
536,
521,
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,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1493,
536,
312,
1673,
529,
17,
959,
90,
3353,
88,
18,
536,
521,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
return sys.platform[:3] == 'win': | return sys.platform[:3] == 'win' | def _IsWindows(self): """Checks if the current platform is Windows. """ return sys.platform[:3] == 'win': | 1ad94952bd681814884ac8d6bfb7e25018c6a904 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5060/1ad94952bd681814884ac8d6bfb7e25018c6a904/coverage.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2520,
10399,
12,
2890,
4672,
3536,
4081,
309,
326,
783,
4072,
353,
8202,
18,
3536,
327,
2589,
18,
9898,
10531,
23,
65,
422,
296,
8082,
11,
282,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2520,
10399,
12,
2890,
4672,
3536,
4081,
309,
326,
783,
4072,
353,
8202,
18,
3536,
327,
2589,
18,
9898,
10531,
23,
65,
422,
296,
8082,
11,
282,
2,
-100,
-100,
-100,
-100,
-100,
-1... |
tmpfile.write(line) | wrapped.write(line) | def _add_keywords(root, keywords): """ Do keyword replacement on all files in and under root which has an extension in _keyword_exts. keywords is a dictionary, the key will be replaced with the value. """ keyword_files = [] for base, dirs, files in os.walk(root): keyword_files.extend( [ os.path.join(base, f) for f in files if f.endswith(_keyword_exts)] ) for f in keyword_files: source = codecs.open(f, "r", encoding="utf_8_sig") tmpfd, tmppath = tempfile.mkstemp(".tmp", "dfbuild.") tmpfile = os.fdopen(tmpfd, "w") for line in source: for key, val in keywords.items(): line = line.replace(key, val) tmpfile.write(line) source.close() tmpfile.close() shutil.copy(tmppath, f) os.unlink(tmppath) | ed8bbe53c73426a55c7385a1c925b1fc2183e3bc /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10925/ed8bbe53c73426a55c7385a1c925b1fc2183e3bc/dfbuild.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1289,
67,
11771,
12,
3085,
16,
7093,
4672,
3536,
2256,
4932,
6060,
603,
777,
1390,
316,
471,
3613,
1365,
1492,
711,
392,
2710,
316,
389,
11041,
67,
408,
87,
18,
7093,
353,
279,
38... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1289,
67,
11771,
12,
3085,
16,
7093,
4672,
3536,
2256,
4932,
6060,
603,
777,
1390,
316,
471,
3613,
1365,
1492,
711,
392,
2710,
316,
389,
11041,
67,
408,
87,
18,
7093,
353,
279,
38... |
if not handleInfoFile(dirpath, parts, ".for", sceneryObject, authors): return | def handleForest(dirpath, filename, libraryFileHandle, libraryPlaceholderFileHandle, forests, authors): objectSourcePath = os.path.join(dirpath, filename) parts = dirpath.split("/", 2) print "Handling forest: " + objectSourcePath # Create an instance of the SceneryObject class sceneryObject = classes.SceneryObject(parts[2], filename) # Set up paths and copy files if not copySupportFiles(dirpath, parts): return # Handle the info.txt file if not handleInfoFile(dirpath, parts, ".for", sceneryObject, authors): return # Copy the forest file shutil.copyfile(objectSourcePath, os.path.join(classes.Configuration.osxFolder, parts[2], filename)) # Open the object file = open(objectSourcePath, "rU") objectFileContents = file.readlines() file.close() # Define the regex patterns: texturePattern = re.compile("TEXTURE\s+(.*)") for line in objectFileContents: result = texturePattern.match(line) if result: textureFile = os.path.join(dirpath, result.group(1)) if (result.group(1) == ""): print " WARNING: Object specifies a blank texture - valid but may not be as intended" elif os.path.isfile(textureFile): shutil.copyfile(textureFile, os.path.join(classes.Configuration.osxFolder, parts[2], result.group(1))) break else: print " ERROR: Cannot find texture - object excluded (" + textureFile + ")" return # Forest is valid, append it to the list forests.append(sceneryObject) # Write to the library.txt file for virtualPath in sceneryObject.virtualPaths: libraryFileHandle.write("EXPORT opensceneryx/" + virtualPath + " " + sceneryObject.getFilePath() + "\n") libraryPlaceholderFileHandle.write("EXPORT_BACKUP opensceneryx/" + virtualPath + " opensceneryx/placeholder.for\n") | 5d85d733c345934088eebd21200220a1ee2d66fa /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5176/5d85d733c345934088eebd21200220a1ee2d66fa/functions.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
13573,
334,
12,
1214,
803,
16,
1544,
16,
5313,
812,
3259,
16,
5313,
14038,
812,
3259,
16,
30763,
87,
16,
14494,
4672,
733,
1830,
743,
273,
1140,
18,
803,
18,
5701,
12,
1214,
803,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
13573,
334,
12,
1214,
803,
16,
1544,
16,
5313,
812,
3259,
16,
5313,
14038,
812,
3259,
16,
30763,
87,
16,
14494,
4672,
733,
1830,
743,
273,
1140,
18,
803,
18,
5701,
12,
1214,
803,... | |
else | else: | def __init__(data = None) if data == None: quickfix.StringField.__init__(self, 70) else quickfix.StringField.__init__(self, 70, data) | 484890147d4b23aac4b9d0e85e84fceab7e137c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8819/484890147d4b23aac4b9d0e85e84fceab7e137c3/quickfix_fields.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
892,
273,
599,
13,
309,
501,
422,
599,
30,
9549,
904,
18,
780,
974,
16186,
2738,
972,
12,
2890,
16,
16647,
13,
469,
30,
9549,
904,
18,
780,
974,
16186,
2738,
972... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
892,
273,
599,
13,
309,
501,
422,
599,
30,
9549,
904,
18,
780,
974,
16186,
2738,
972,
12,
2890,
16,
16647,
13,
469,
30,
9549,
904,
18,
780,
974,
16186,
2738,
972... |
sect_text += render('admin/table.mako') | sect_text += render('admin/table_fragment.mako') | def index(self): res = dir(self) exceptions = ['check_permissions', 'dbsession', 'index', 'logged_in', 'permissions', 'start_response'] | a094b6d6bdb843c7e7b5e2fe7707646b82363a1c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12856/a094b6d6bdb843c7e7b5e2fe7707646b82363a1c/admin.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
770,
12,
2890,
4672,
400,
273,
1577,
12,
2890,
13,
4798,
273,
10228,
1893,
67,
9612,
2187,
296,
1966,
3184,
2187,
296,
1615,
2187,
296,
19385,
67,
267,
2187,
296,
9612,
2187,
296,
1937,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
770,
12,
2890,
4672,
400,
273,
1577,
12,
2890,
13,
4798,
273,
10228,
1893,
67,
9612,
2187,
296,
1966,
3184,
2187,
296,
1615,
2187,
296,
19385,
67,
267,
2187,
296,
9612,
2187,
296,
1937,
... |
new = csc_matrix((N, M), nzmax=self.nzmax, dtype=self.dtype.char) | new = csc_matrix((N, M), nzmax=self.nzmax, dtype=self.dtype) | def transpose(self, copy=False): M, N = self.shape new = csc_matrix((N, M), nzmax=self.nzmax, dtype=self.dtype.char) if copy: new.data = self.data.copy() new.rowind = self.colind.copy() new.indptr = self.indptr.copy() else: new.data = self.data new.rowind = self.colind new.indptr = self.indptr new._check() return new | 755141cd47edbf647cfcd8d09fd47ede3320459c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/755141cd47edbf647cfcd8d09fd47ede3320459c/sparse.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10411,
12,
2890,
16,
1610,
33,
8381,
4672,
490,
16,
423,
273,
365,
18,
4867,
394,
273,
276,
1017,
67,
5667,
12443,
50,
16,
490,
3631,
15062,
1896,
33,
2890,
18,
82,
94,
1896,
16,
318... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10411,
12,
2890,
16,
1610,
33,
8381,
4672,
490,
16,
423,
273,
365,
18,
4867,
394,
273,
276,
1017,
67,
5667,
12443,
50,
16,
490,
3631,
15062,
1896,
33,
2890,
18,
82,
94,
1896,
16,
318... |
except Exception as inst: | except Exception, inst: | def send(self, port, length=1, mode=True): """ Send a data of some length | 46ff6381f8d9ff2da59e28fb10194374780fb4a9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12268/46ff6381f8d9ff2da59e28fb10194374780fb4a9/virtio_guest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1366,
12,
2890,
16,
1756,
16,
769,
33,
21,
16,
1965,
33,
5510,
4672,
3536,
2479,
279,
501,
434,
2690,
769,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1366,
12,
2890,
16,
1756,
16,
769,
33,
21,
16,
1965,
33,
5510,
4672,
3536,
2479,
279,
501,
434,
2690,
769,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
sage: K.<a>=NumberField(x^3-2) | sage: K.<a> = NumberField(x^3-2) | def has_nonsplit_multiplicative_reduction(self): r""" Return True if there is non-split multiplicative reduction. | e5919ce2ed8be2ebf365206bac58d89cf855be71 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/e5919ce2ed8be2ebf365206bac58d89cf855be71/ell_local_data.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
711,
67,
5836,
4939,
67,
7027,
28884,
67,
1118,
4062,
12,
2890,
4672,
436,
8395,
2000,
1053,
309,
1915,
353,
1661,
17,
4939,
3309,
28884,
225,
20176,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
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,
711,
67,
5836,
4939,
67,
7027,
28884,
67,
1118,
4062,
12,
2890,
4672,
436,
8395,
2000,
1053,
309,
1915,
353,
1661,
17,
4939,
3309,
28884,
225,
20176,
18,
2,
-100,
-100,
-100,
-100,
-100,... |
def appendToHead(element): | def startTagHead(self, name, attributes): self.parser.insertElement(name, attributes) self.parser.headPointer = self.parser.openElements[-1] self.parser.switchInsertionMode('inHead') def appendToHead(self, element): | def appendToHead(element): if self.headPointer is not None: self.parser.headPointer.appendChild(element) else: assert self.innerHTML self.parser.openElements[-1].append(element) | 71bb2b3bb38e163608588ee19478e6e981a2ee61 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4487/71bb2b3bb38e163608588ee19478e6e981a2ee61/parser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
787,
1805,
1414,
12,
2890,
16,
508,
16,
1677,
4672,
365,
18,
4288,
18,
6387,
1046,
12,
529,
16,
1677,
13,
365,
18,
4288,
18,
1978,
4926,
273,
365,
18,
4288,
18,
3190,
3471,
18919,
21... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
787,
1805,
1414,
12,
2890,
16,
508,
16,
1677,
4672,
365,
18,
4288,
18,
6387,
1046,
12,
529,
16,
1677,
13,
365,
18,
4288,
18,
1978,
4926,
273,
365,
18,
4288,
18,
3190,
3471,
18919,
21... |
logger.info("rc_entry: " + rc_entry[0]) | def checkViewerNoRC(description, progs, rc_entry = [], path = []): ''' The same as checkViewer, but do not add rc entry ''' if len(rc_entry) > 1 and len(rc_entry) != len(progs) + 1: logger.error("rc entry should have one item or item for each prog and not_found.") sys.exit(2) alt_rc_entry = [] for idx in range(len(progs)): if len(rc_entry) == 1: logger.info("rc_entry: " + rc_entry[0]) rcs = rc_entry[0].split('\n') alt = addViewerAlternatives(rcs) alt_rc_entry.insert(0, alt) elif len(rc_entry) > 1: logger.info("rc_entry: " + rc_entry[idx]) rcs = rc_entry[idx].split('\n') alt = addViewerAlternatives(rcs) alt_rc_entry.insert(idx, alt) rc_entry = [] return checkProgAlternatives(description, progs, rc_entry, alt_rc_entry, path, not_found = 'auto') | 95c34cc714d39e09b86893e4755136a687981142 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7514/95c34cc714d39e09b86893e4755136a687981142/configure.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
18415,
2279,
11529,
12,
3384,
16,
450,
564,
16,
4519,
67,
4099,
273,
5378,
16,
589,
273,
5378,
4672,
9163,
1021,
1967,
487,
866,
18415,
16,
1496,
741,
486,
527,
4519,
1241,
9163,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
18415,
2279,
11529,
12,
3384,
16,
450,
564,
16,
4519,
67,
4099,
273,
5378,
16,
589,
273,
5378,
4672,
9163,
1021,
1967,
487,
866,
18415,
16,
1496,
741,
486,
527,
4519,
1241,
9163,
... | |
if self.basetype: Output(" | Output(" | def generate(self): # XXX This should use long strings and %(varname)s substitution! | 5bb2f6497f6b4455e4da64ef049bf43cd1c2215a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/5bb2f6497f6b4455e4da64ef049bf43cd1c2215a/bgenObjectDefinition.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2103,
12,
2890,
4672,
468,
11329,
1220,
1410,
999,
1525,
2064,
471,
8975,
1401,
529,
13,
87,
12785,
5,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2103,
12,
2890,
4672,
468,
11329,
1220,
1410,
999,
1525,
2064,
471,
8975,
1401,
529,
13,
87,
12785,
5,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
rpm_args.append('-bb') | rpm_cmd.append('-bb') | def run (self): | d0e4b42ee241b29cc924b18f4c1efd29723c85cf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/d0e4b42ee241b29cc924b18f4c1efd29723c85cf/bdist_rpm.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
261,
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,
0... | [
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,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
261,
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,
-100,
... |
lccn = re_letters.sub(m.group(1), '').strip() | lccn = re_letters.sub('', m.group(1)).strip() | def read_lccn(line): found = [] for k, v in get_subfields(line, ['a']): lccn = v.strip() if re_question.match(lccn): continue m = re_lccn.search(lccn) if not m: continue lccn = re_letters.sub(m.group(1), '').strip() if lccn: found.append(lccn) return found | 5db33275de1d1c17b23e6bc04be830c353c53c00 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3913/5db33275de1d1c17b23e6bc04be830c353c53c00/fast_parse.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
67,
80,
952,
82,
12,
1369,
4672,
1392,
273,
5378,
364,
417,
16,
331,
316,
336,
67,
1717,
2821,
12,
1369,
16,
10228,
69,
3546,
4672,
328,
952,
82,
273,
331,
18,
6406,
1435,
309,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
67,
80,
952,
82,
12,
1369,
4672,
1392,
273,
5378,
364,
417,
16,
331,
316,
336,
67,
1717,
2821,
12,
1369,
16,
10228,
69,
3546,
4672,
328,
952,
82,
273,
331,
18,
6406,
1435,
309,
... |
pattern = native_path (words[1]) | pattern_list = map(native_path, words[1:]) | def read_template (self): """Read and parse the manifest template file named by 'self.template' (usually "MANIFEST.in"). Process all file specifications (include and exclude) in the manifest template and add the resulting filenames to 'self.files'.""" | d1aa01cb91ac9abec6e7ba7ff3f8be6778f9dbda /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/d1aa01cb91ac9abec6e7ba7ff3f8be6778f9dbda/sdist.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
67,
3202,
261,
2890,
4672,
3536,
1994,
471,
1109,
326,
5643,
1542,
585,
4141,
635,
296,
2890,
18,
3202,
11,
261,
407,
3452,
315,
9560,
30050,
18,
267,
20387,
225,
4389,
777,
585,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3202,
261,
2890,
4672,
3536,
1994,
471,
1109,
326,
5643,
1542,
585,
4141,
635,
296,
2890,
18,
3202,
11,
261,
407,
3452,
315,
9560,
30050,
18,
267,
20387,
225,
4389,
777,
585,
... |
this = apply(_quickfix.new_YieldType, args) | this = _quickfix.new_YieldType(*args) | def __init__(self, *args): this = apply(_quickfix.new_YieldType, args) try: self.this.append(this) except: self.this = this | 7e632099fd421880c8c65fb0cf610d338d115ee9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8819/7e632099fd421880c8c65fb0cf610d338d115ee9/quickfix.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
380,
1968,
4672,
333,
273,
389,
19525,
904,
18,
2704,
67,
16348,
559,
30857,
1968,
13,
775,
30,
365,
18,
2211,
18,
6923,
12,
2211,
13,
1335,
30,
365,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
380,
1968,
4672,
333,
273,
389,
19525,
904,
18,
2704,
67,
16348,
559,
30857,
1968,
13,
775,
30,
365,
18,
2211,
18,
6923,
12,
2211,
13,
1335,
30,
365,
1... |
names = ('a','b','c') | names = ['a','b','c'] | def setUp(self): names = ('a','b','c') shape = (2,3,4) self.a = ones(names,shape,type='Float32') self.b = ones(names[1:],shape[1:],type='Float32') self.names = names self.shape = shape | 66b50e601134e3a00bc725be359aabf9af61b99c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2438/66b50e601134e3a00bc725be359aabf9af61b99c/table.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
24292,
12,
2890,
4672,
1257,
273,
10228,
69,
17023,
70,
17023,
71,
3546,
2179,
273,
261,
22,
16,
23,
16,
24,
13,
365,
18,
69,
273,
5945,
12,
1973,
16,
4867,
16,
723,
2218,
4723,
1578... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
24292,
12,
2890,
4672,
1257,
273,
10228,
69,
17023,
70,
17023,
71,
3546,
2179,
273,
261,
22,
16,
23,
16,
24,
13,
365,
18,
69,
273,
5945,
12,
1973,
16,
4867,
16,
723,
2218,
4723,
1578... |
return hex(myAdler)[-8:] | return hex(myAdler & 0xffffffff)[-9:-1].lower().replace('x','0') | def fileAdler(fileName): """ Calculate alder32 of the supplied file """ try: inputFile = open(fileName) inputFileSize = os.stat(fileName)[6] increment = 1024*1024 fullBlocks = inputFileSize/increment remainder = inputFileSize%increment mbString = inputFile.read(increment) myAdler = adler32(mbString) for i in range(fullBlocks-1): mbString = inputFile.read(increment) myAdler = adler32(mbString,myAdler) mbString = inputFile.read(remainder) myAdler = adler32(mbString,myAdler) inputFile.close() return hex(myAdler)[-8:] except Exception,x: return False | 6e7c671059e33760413b9e4c1a1741aaf6121322 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12864/6e7c671059e33760413b9e4c1a1741aaf6121322/File.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
585,
1871,
749,
12,
17812,
4672,
3536,
9029,
524,
765,
1578,
434,
326,
4580,
585,
3536,
775,
30,
22014,
273,
1696,
12,
17812,
13,
810,
15100,
273,
1140,
18,
5642,
12,
17812,
25146,
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,
585,
1871,
749,
12,
17812,
4672,
3536,
9029,
524,
765,
1578,
434,
326,
4580,
585,
3536,
775,
30,
22014,
273,
1696,
12,
17812,
13,
810,
15100,
273,
1140,
18,
5642,
12,
17812,
25146,
26,
... |
self.failUnless(sel.is_text_present("Temporary Help Information")) | self.failUnless(sel.is_element_present("//div[@class='moduletitle']")) | def test_nav_menu(self): sel = self.selenium sel.wait_for_page_to_load("30000") sel.click("//a[@id='l_events']") # This takes you back to the profile page sel.wait_for_page_to_load("30000") self.failUnless(sel.is_text_present("My Upcoming Events")) | a75ee8305dfd25a2eec4d975506dfb2d03c1a3dc /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5139/a75ee8305dfd25a2eec4d975506dfb2d03c1a3dc/navigation_tabs.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
11589,
67,
5414,
12,
2890,
4672,
357,
273,
365,
18,
1786,
17327,
357,
18,
7048,
67,
1884,
67,
2433,
67,
869,
67,
945,
2932,
23,
2787,
7923,
357,
18,
7475,
2932,
759,
69,
14... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
11589,
67,
5414,
12,
2890,
4672,
357,
273,
365,
18,
1786,
17327,
357,
18,
7048,
67,
1884,
67,
2433,
67,
869,
67,
945,
2932,
23,
2787,
7923,
357,
18,
7475,
2932,
759,
69,
14... |
self.p.enqueue("reset","") | def dispose(self): | 5f0123ac2f4ac530df91229835522db3aadf8b6b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5464/5f0123ac2f4ac530df91229835522db3aadf8b6b/XiboClient.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
15825,
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,
0... | [
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,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
15825,
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,
-100,
... | |
xml1 = get_record_revision(revid1) xml2 = get_record_revision(revid2) | xml1 = get_marcxml_of_record_revision(revid1) xml2 = get_marcxml_of_record_revision(revid2) | def cli_diff_record_revisions(revid1, revid2): """ Return diffs of MARCXML record revisions REVID1, REVID2. Exit if things went wrong. """ for revid in [revid1, revid2]: if not revision_valid_p(revid): print "ERROR: revision %s is invalid; " + \ "must be NNN.YYYYMMDDhhmmss." % revid sys.exit(1) xml1 = get_record_revision(revid1) xml2 = get_record_revision(revid2) print "".join(difflib.unified_diff(xml1.splitlines(1), xml2.splitlines(1), revid1, revid2,)) | 5d0033cc591fb5ff8ff4c5c7a49b3713fde8478e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12027/5d0033cc591fb5ff8ff4c5c7a49b3713fde8478e/bibeditcli.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4942,
67,
5413,
67,
3366,
67,
29892,
12,
266,
1246,
21,
16,
283,
1246,
22,
4672,
3536,
2000,
15250,
434,
490,
27206,
4201,
1409,
18325,
2438,
15472,
21,
16,
2438,
15472,
22,
18,
9500,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4942,
67,
5413,
67,
3366,
67,
29892,
12,
266,
1246,
21,
16,
283,
1246,
22,
4672,
3536,
2000,
15250,
434,
490,
27206,
4201,
1409,
18325,
2438,
15472,
21,
16,
2438,
15472,
22,
18,
9500,
... |
"""makeAllPipes(self) | """ | def makeAllPipes(self): """makeAllPipes(self) Creates all GraphicsPipes that the system knows about and fill up self.pipeList with them. """ shouldPrintPipes = 0 selection = GraphicsPipeSelection.getGlobalPtr() selection.loadAuxModules() | 400889d3cc129f8f738e6553920d9579853414ee /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7242/400889d3cc129f8f738e6553920d9579853414ee/ShowBase.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1221,
1595,
24925,
281,
12,
2890,
4672,
3536,
10210,
777,
16830,
24925,
281,
716,
326,
2619,
21739,
2973,
471,
3636,
731,
365,
18,
14772,
682,
598,
2182,
18,
3536,
1410,
5108,
24925,
281,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1221,
1595,
24925,
281,
12,
2890,
4672,
3536,
10210,
777,
16830,
24925,
281,
716,
326,
2619,
21739,
2973,
471,
3636,
731,
365,
18,
14772,
682,
598,
2182,
18,
3536,
1410,
5108,
24925,
281,
... |
version = Version(self.__env, name) | version = Version(self.env_open(), name) | def _do_version_time(self, name, t): version = Version(self.__env, name) version.time = self._parse_date(t) version.update() | 132f03448459e7c8907500129479bb5f6c5bc47a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2831/132f03448459e7c8907500129479bb5f6c5bc47a/admin.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2896,
67,
1589,
67,
957,
12,
2890,
16,
508,
16,
268,
4672,
1177,
273,
4049,
12,
2890,
18,
3074,
67,
3190,
9334,
508,
13,
1177,
18,
957,
273,
365,
6315,
2670,
67,
712,
12,
88,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
389,
2896,
67,
1589,
67,
957,
12,
2890,
16,
508,
16,
268,
4672,
1177,
273,
4049,
12,
2890,
18,
3074,
67,
3190,
9334,
508,
13,
1177,
18,
957,
273,
365,
6315,
2670,
67,
712,
12,
88,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.