rem
stringlengths
2
226k
add
stringlengths
0
227k
context
stringlengths
8
228k
meta
stringlengths
156
215
input_ids
list
attention_mask
list
labels
list
elif sym == 7:
elif enc == 7:
def convert_case(sym): """ return (lower, upper) for internal use. :note: direct port of http://cgit.freedesktop.org/xcb/util/tree/keysyms/keysyms.c#n361 """ lower = sym upper = sym enc = sym >> 8 if sym == 0: # latin1 if ((sym >= keysymdef.XK_A) and (sym <= keysymdef.XK_Z)): lower += (keysymdef.XK_a - keysymdef.XK_A) elif ((sym >= keysymdef.XK_a) and (sym <= keysymdef.XK_z)): upper -= (keysymdef.XK_a - keysymdef.XK_A) elif ((sym >= keysymdef.XK_Agrave) and (sym <= keysymdef.XK_Odiaeresis)): lower += (keysymdef.XK_agrave - keysymdef.XK_Agrave) elif ((sym >= keysymdef.XK_agrave) and (sym <= keysymdef.XK_odiaeresis)): upper -= (keysymdef.XK_agrave - keysymdef.XK_Agrave) elif ((sym >= keysymdef.XK_Ooblique) and (sym <= keysymdef.XK_Thorn)): lower += (keysymdef.XK_oslash - keysymdef.XK_Ooblique) elif ((sym >= keysymdef.XK_oslash) and (sym <= keysymdef.XK_thorn)): upper -= (keysymdef.XK_oslash - keysymdef.XK_Ooblique) elif sym == 1: # latin2 # Assume the KeySym is a legal value (ignore discontinuities) if (sym == keysymdef.XK_Aogonek): lower = keysymdef.XK_aogonek elif (sym >= keysymdef.XK_Lstroke and sym <= keysymdef.XK_Sacute): lower += (keysymdef.XK_lstroke - keysymdef.XK_Lstroke) elif (sym >= keysymdef.XK_Scaron and sym <= keysymdef.XK_Zacute): lower += (keysymdef.XK_scaron - keysymdef.XK_Scaron) elif (sym >= keysymdef.XK_Zcaron and sym <= keysymdef.XK_Zabovedot): lower += (keysymdef.XK_zcaron - keysymdef.XK_Zcaron) elif (sym == keysymdef.XK_aogonek): upper = keysymdef.XK_Aogonek elif (sym >= keysymdef.XK_lstroke and sym <= keysymdef.XK_sacute): upper -= (keysymdef.XK_lstroke - keysymdef.XK_Lstroke) elif (sym >= keysymdef.XK_scaron and sym <= keysymdef.XK_zacute): upper -= (keysymdef.XK_scaron - keysymdef.XK_Scaron) elif (sym >= keysymdef.XK_zcaron and sym <= keysymdef.XK_zabovedot): upper -= (keysymdef.XK_zcaron - keysymdef.XK_Zcaron) elif (sym >= keysymdef.XK_Racute and sym <= keysymdef.XK_Tcedilla): lower += (keysymdef.XK_racute - keysymdef.XK_Racute) elif (sym >= keysymdef.XK_racute and sym <= keysymdef.XK_tcedilla): upper -= (keysymdef.XK_racute - keysymdef.XK_Racute) elif sym == 2: # latin3 # Assume the KeySym is a legal value (ignore discontinuities) if (sym >= keysymdef.XK_Hstroke and sym <= keysymdef.XK_Hcircumflex): lower += (keysymdef.XK_hstroke - keysymdef.XK_Hstroke) elif (sym >= keysymdef.XK_Gbreve and sym <= keysymdef.XK_Jcircumflex): lower += (keysymdef.XK_gbreve - keysymdef.XK_Gbreve) elif (sym >= keysymdef.XK_hstroke and sym <= keysymdef.XK_hcircumflex): upper -= (keysymdef.XK_hstroke - keysymdef.XK_Hstroke) elif (sym >= keysymdef.XK_gbreve and sym <= keysymdef.XK_jcircumflex): upper -= (keysymdef.XK_gbreve - keysymdef.XK_Gbreve) elif (sym >= keysymdef.XK_Cabovedot and sym <= keysymdef.XK_Scircumflex): lower += (keysymdef.XK_cabovedot - keysymdef.XK_Cabovedot) elif (sym >= keysymdef.XK_cabovedot and sym <= keysymdef.XK_scircumflex): upper -= (keysymdef.XK_cabovedot - keysymdef.XK_Cabovedot) elif sym == 3: # latin4 # Assume the KeySym is a legal value (ignore discontinuities) if (sym >= keysymdef.XK_Rcedilla and sym <= keysymdef.XK_Tslash): lower += (keysymdef.XK_rcedilla - keysymdef.XK_Rcedilla) elif (sym >= keysymdef.XK_rcedilla and sym <= keysymdef.XK_tslash): upper -= (keysymdef.XK_rcedilla - keysymdef.XK_Rcedilla) elif (sym == keysymdef.XK_ENG): lower = keysymdef.XK_eng elif (sym == keysymdef.XK_eng): upper = keysymdef.XK_ENG elif (sym >= keysymdef.XK_Amacron and sym <= keysymdef.XK_Umacron): lower += (keysymdef.XK_amacron - keysymdef.XK_Amacron) elif (sym >= keysymdef.XK_amacron and sym <= keysymdef.XK_umacron): upper -= (keysymdef.XK_amacron - keysymdef.XK_Amacron) elif sym == 6: # cyrillic # Assume the KeySym is a legal value (ignore discontinuities) if (sym >= keysymdef.XK_Serbian_DJE and sym <= keysymdef.XK_Serbian_DZE): lower -= (keysymdef.XK_Serbian_DJE - keysymdef.XK_Serbian_dje) elif (sym >= keysymdef.XK_Serbian_dje and sym <= keysymdef.XK_Serbian_dze): upper += (keysymdef.XK_Serbian_DJE - keysymdef.XK_Serbian_dje) elif (sym >= keysymdef.XK_Cyrillic_YU and sym <= keysymdef.XK_Cyrillic_HARDSIGN): lower -= (keysymdef.XK_Cyrillic_YU - keysymdef.XK_Cyrillic_yu) elif (sym >= keysymdef.XK_Cyrillic_yu and sym <= keysymdef.XK_Cyrillic_hardsign): upper += (keysymdef.XK_Cyrillic_YU - keysymdef.XK_Cyrillic_yu) elif sym == 7: # greek if (sym >= keysymdef.XK_Greek_ALPHAaccent and sym <= keysymdef.XK_Greek_OMEGAaccent): lower += (keysymdef.XK_Greek_alphaaccent - keysymdef.XK_Greek_ALPHAaccent) elif (sym >= keysymdef.XK_Greek_alphaaccent and sym <= keysymdef.XK_Greek_omegaaccent and sym != keysymdef.XK_Greek_iotaaccentdieresis and sym != keysymdef.XK_Greek_upsilonaccentdieresis): upper -= (keysymdef.XK_Greek_alphaaccent - keysymdef.XK_Greek_ALPHAaccent) elif (sym >= keysymdef.XK_Greek_ALPHA and sym <= keysymdef.XK_Greek_OMEGA): lower += (keysymdef.XK_Greek_alpha - keysymdef.XK_Greek_ALPHA) elif (sym >= keysymdef.XK_Greek_alpha and sym <= keysymdef.XK_Greek_omega and sym != keysymdef.XK_Greek_finalsmallsigma): upper -= (keysymdef.XK_Greek_alpha - keysymdef.XK_Greek_ALPHA) elif sym == 0x14: # armenian if (sym >= keysymdef.XK_Armenian_AYB and sym <= keysymdef.XK_Armenian_fe): lower = sym | 1 upper = sym & ~1 return lower, upper
fcc1b7c56d3ac296156afd7a5dd9eff2848a18d5 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10761/fcc1b7c56d3ac296156afd7a5dd9eff2848a18d5/keysyms.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1765, 67, 3593, 12, 8117, 4672, 3536, 327, 261, 8167, 16, 3854, 13, 364, 2713, 999, 18, 225, 294, 7652, 30, 2657, 1756, 434, 1062, 2207, 71, 6845, 18, 74, 15656, 281, 11869, 18, 3341, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1765, 67, 3593, 12, 8117, 4672, 3536, 327, 261, 8167, 16, 3854, 13, 364, 2713, 999, 18, 225, 294, 7652, 30, 2657, 1756, 434, 1062, 2207, 71, 6845, 18, 74, 15656, 281, 11869, 18, 3341, ...
self.session.openWithCallback(self.returnVal, PicView, self.filelist.getFileList(), self.filelist.getSelection()[0], self.filelist.getCurrentDirectory())
self.session.openWithCallback(self.returnVal, PicView, self.filelist.getFileList(), self.filelist.getFilename(), self.filelist.getCurrentDirectory())
def KeyOk(self): if self.filelist.canDescent(): self.filelist.descent() else: self.session.openWithCallback(self.returnVal, PicView, self.filelist.getFileList(), self.filelist.getSelection()[0], self.filelist.getCurrentDirectory())
79de1c2ae4ba012707b99336dc4ce9e74734c6f9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6652/79de1c2ae4ba012707b99336dc4ce9e74734c6f9/plugin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1929, 8809, 12, 2890, 4672, 309, 365, 18, 7540, 5449, 18, 4169, 4217, 319, 13332, 365, 18, 7540, 5449, 18, 5569, 319, 1435, 469, 30, 365, 18, 3184, 18, 3190, 1190, 2428, 12, 2890, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1929, 8809, 12, 2890, 4672, 309, 365, 18, 7540, 5449, 18, 4169, 4217, 319, 13332, 365, 18, 7540, 5449, 18, 5569, 319, 1435, 469, 30, 365, 18, 3184, 18, 3190, 1190, 2428, 12, 2890, 18, ...
checkProg('a LaTeX/Noweb -> LyX converter', ['tex2lyx', 'tex2lyx' + version_suffix],
checkProg('a LaTeX/Noweb -> LyX converter', ['tex2lyx' + version_suffix, 'tex2lyx'],
def checkConverterEntries(): ''' Check all converters (\converter entries) ''' checkProg('the pdflatex program', ['pdflatex $$i'], rc_entry = [ r'\converter pdflatex pdf2 "%%" "latex=pdflatex"' ]) checkProg('XeTeX', ['xelatex $$i'], rc_entry = [ r'\converter xetex pdf4 "%%" "latex=xelatex"' ]) checkProg('LuaTeX', ['lualatex $$i'], rc_entry = [ r'\converter luatex pdf5 "%%" "latex=lualatex"' ]) checkProg('LuaTeX (DVI)', ['dvilualatex $$i'], rc_entry = [ r'\converter luatex dvi3 "%%" "latex=lualatex"' ]) ''' 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" ""
225c1dbe55635a97b183909ea7194b8d92051378 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7514/225c1dbe55635a97b183909ea7194b8d92051378/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...
file.Write(" uint32 data_size = 0; // TODO(gman): get correct size!\n") for arg in func.GetOriginalArgs(): arg.WriteGetAddress(file) func.WriteHandlerValidation(file) func.WriteHandlerImplementation(file) file.Write(" return parse_error::kParseNoError;\n") file.Write("}\n") file.Write("\n")
file.Write("// uint32 data_size = 0; // TODO(gman): get correct size!\n")
def WriteServiceImplementation(self, func, file): """Overrriden from TypeHandler.""" file.Write( "parse_error::ParseError GLES2DecoderImpl::Handle%s(\n" % func.name) file.Write( " uint32 immediate_data_size, const gles2::%s& c) {\n" % func.name) for arg in func.GetCmdArgs(): arg.WriteGetCode(file)
07f54fcc277a2d8fc3e6cecc5df5ea5c3d5ed080 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9392/07f54fcc277a2d8fc3e6cecc5df5ea5c3d5ed080/build_gles2_cmd_buffer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2598, 1179, 13621, 12, 2890, 16, 1326, 16, 585, 4672, 3536, 22042, 1691, 275, 628, 1412, 1503, 12123, 585, 18, 3067, 12, 315, 2670, 67, 1636, 2866, 21004, 611, 11386, 22, 7975, 2828, 286...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2598, 1179, 13621, 12, 2890, 16, 1326, 16, 585, 4672, 3536, 22042, 1691, 275, 628, 1412, 1503, 12123, 585, 18, 3067, 12, 315, 2670, 67, 1636, 2866, 21004, 611, 11386, 22, 7975, 2828, 286...
gnome2.addmod('gtkmm-1.3',dependencies=['gtk+']) gnome2.addmod('gnomemm/libgnomemm',dependencies=['libgnome', 'gtkmm-1.3']) gnome2.addmod('gnomemm/libbonobomm',dependencies=['libbonobo']) gnome2.addmod('gnomemm/libbonobouimm',dependencies=['libbonoboui', 'gnomemm/libbonobomm']) gnome2.addmod('gnomemm/libgnomecanvasmm',dependencies=['libgnomecanvas']) gnome2.addmod('gnomemm/gconfmm',dependencies=['gconf', 'gtkmm-1.3']) gnome2.addmod('gnomemm/libgnomeuimm',dependencies=['gtkmm-1.3', 'libgnomeui', 'gnomemm/libgnomemm', 'gnomemm/gconfmm'])
gnome2.addmod('gtkmm-1.3', dependencies=['gtk+']) gnome2.addmod('gnomemm/libgnomemm', dependencies=['libgnome', 'gtkmm-1.3']) gnome2.addmod('gnomemm/libbonobomm', dependencies=['libbonobo']) gnome2.addmod('gnomemm/libbonobouimm', dependencies=['libbonoboui', 'gnomemm/libbonobomm']) gnome2.addmod('gnomemm/libgnomecanvasmm', dependencies=['libgnomecanvas', 'gtkmm-1.3']) gnome2.addmod('gnomemm/gconfmm', dependencies=['gconf', 'gtkmm-1.3']) gnome2.addmod('gnomemm/libgnomeuimm', dependencies=['gtkmm-1.3', 'libgnomeui', 'gnomemm/libgnomemm', 'gnomemm/gconfmm'])
def sfcvsroot(project): return ':pserver:anonymous@cvs.%s.sourceforge.net:/cvsroot/%s' % \ (project, project)
6597327c9806408d8b6bddc480f68267e4f0a08e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4596/6597327c9806408d8b6bddc480f68267e4f0a08e/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, ...
'start' : 0, 'reason' : 'ordinal not in range(128)'}),
'start' : 0, 'reason' : 'ordinal not in range'}),
def testAttributes(self): # test that exception attributes are happy try: str(u'Hello \u00E1') except Exception, e: sampleUnicodeEncodeError = e
f770301979422dc943c856c910e393f7ed206d4f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/f770301979422dc943c856c910e393f7ed206d4f/test_exceptions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 2498, 12, 2890, 4672, 468, 1842, 716, 1520, 1677, 854, 5622, 2074, 775, 30, 609, 12, 89, 11, 18601, 521, 89, 713, 41, 21, 6134, 1335, 1185, 16, 425, 30, 3296, 16532, 5509, 668, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1842, 2498, 12, 2890, 4672, 468, 1842, 716, 1520, 1677, 854, 5622, 2074, 775, 30, 609, 12, 89, 11, 18601, 521, 89, 713, 41, 21, 6134, 1335, 1185, 16, 425, 30, 3296, 16532, 5509, 668, ...
def OnEdit(self, event): pass
def gotoSourceForItem(self, sel): bp = self.bps[sel] filename = bp['filename'] if not filename: return editor = self.debugger.editor editor.SetFocus() editor.openOrGotoModule(filename) sourceView = editor.getActiveModulePage().model.views['Source'] sourceView.focus() #sourceView.SetFocus() #sourceView.selectLine(bp['lineno'] - 1) sourceView.GotoLine(bp['lineno'] - 1)
5670e50e1632ce1c246206653a7700bc0df89b49 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/5670e50e1632ce1c246206653a7700bc0df89b49/Debugger.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2897, 1830, 1290, 1180, 12, 2890, 16, 357, 4672, 9107, 273, 365, 18, 70, 1121, 63, 1786, 65, 1544, 273, 9107, 3292, 3459, 3546, 309, 486, 1544, 30, 327, 4858, 273, 365, 18, 4148, 693, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2897, 1830, 1290, 1180, 12, 2890, 16, 357, 4672, 9107, 273, 365, 18, 70, 1121, 63, 1786, 65, 1544, 273, 9107, 3292, 3459, 3546, 309, 486, 1544, 30, 327, 4858, 273, 365, 18, 4148, 693, ...
self.SetOverview(self.overviewText, overview) self.txt = DemoCodeViewer(self.nb, -1) self.nb.AddPage(self.txt, "Demo Code") self.LoadDemoSource('Main.py')
if "gtk2" in wx.PlatformInfo: self.ovr.NormalizeFontSizes() self.SetOverview(self.overviewText, mainOverview) self.log = wx.TextCtrl(splitter2, -1, style = wx.TE_MULTILINE|wx.TE_READONLY|wx.HSCROLL) wx.Log_SetActiveTarget(MyLog(self.log))
def OnOvrSize(evt, ovr=self.ovr): ovr.SetSize(evt.GetSize())
08ecc92023f15aaa5695a616f9712c980650c7c7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/08ecc92023f15aaa5695a616f9712c980650c7c7/Main.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2755, 51, 18090, 1225, 12, 73, 11734, 16, 320, 18090, 33, 2890, 18, 1527, 86, 4672, 320, 18090, 18, 694, 1225, 12, 73, 11734, 18, 967, 1225, 10756, 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, 2755, 51, 18090, 1225, 12, 73, 11734, 16, 320, 18090, 33, 2890, 18, 1527, 86, 4672, 320, 18090, 18, 694, 1225, 12, 73, 11734, 18, 967, 1225, 10756, 2, -100, -100, -100, -100, -100, -10...
assert res == (a == 1.0)
assert_equal(res,(a == 1.0))
def check_double(self,level=5): a = 1 res = inline_tools.inline('return_val = (a == 1.0);',['a']) assert res == (a == 1.0)
267b08d9c3e7613c126729a179f4503c91625e9c /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7416/267b08d9c3e7613c126729a179f4503c91625e9c/test_scxx_object.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 9056, 12, 2890, 16, 2815, 33, 25, 4672, 279, 273, 404, 400, 273, 6370, 67, 6642, 18, 10047, 2668, 2463, 67, 1125, 273, 261, 69, 422, 404, 18, 20, 1769, 2187, 3292, 69, 19486...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 866, 67, 9056, 12, 2890, 16, 2815, 33, 25, 4672, 279, 273, 404, 400, 273, 6370, 67, 6642, 18, 10047, 2668, 2463, 67, 1125, 273, 261, 69, 422, 404, 18, 20, 1769, 2187, 3292, 69, 19486...
class Asomething:
class A_Something:
def m(self, i): return 1 + i
921ebf7bb6b67d78d6e2f6c4c3a4cb212997b867 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/921ebf7bb6b67d78d6e2f6c4c3a4cb212997b867/test_squeaktrans.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 312, 12, 2890, 16, 277, 4672, 327, 404, 397, 277, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 312, 12, 2890, 16, 277, 4672, 327, 404, 397, 277, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
if len(self.removedAtt)==0:
if len(self.removed)==0:
def setTable(self): self.res.setNumCols(2) self.res.setNumRows(len(self.discretizedAtts) - len(self.removedAtt))
dd1d765dc3e19161f4c3e8769c6d619e4b07ec77 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6366/dd1d765dc3e19161f4c3e8769c6d619e4b07ec77/OWCategorize.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 30146, 12, 2890, 4672, 365, 18, 455, 18, 542, 2578, 8011, 12, 22, 13, 365, 18, 455, 18, 542, 2578, 4300, 12, 1897, 12, 2890, 18, 2251, 71, 1349, 1235, 3075, 87, 13, 300, 562, 12, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 30146, 12, 2890, 4672, 365, 18, 455, 18, 542, 2578, 8011, 12, 22, 13, 365, 18, 455, 18, 542, 2578, 4300, 12, 1897, 12, 2890, 18, 2251, 71, 1349, 1235, 3075, 87, 13, 300, 562, 12, 2...
cnt = cnt.replace('@NUMPY_INSTALLER_NAME@', installer_name)
cnt = cnt.replace('@SCIPY_INSTALLER_NAME@', installer_name)
def prepare_nsis_script(pyver, numver): if not os.path.exists(SUPERPACK_BUILD): os.makedirs(SUPERPACK_BUILD) tpl = os.path.join('tools/win32/build_scripts/nsis_scripts', 'scipy-superinstaller.nsi.in') source = open(tpl, 'r') target = open(os.path.join(SUPERPACK_BUILD, 'scipy-superinstaller.nsi'), 'w') installer_name = superpack_name(pyver, numver) cnt = "".join(source.readlines()) cnt = cnt.replace('@NUMPY_INSTALLER_NAME@', installer_name) for arch in ['nosse', 'sse2', 'sse3']: cnt = cnt.replace('@%s_BINARY@' % arch.upper(), internal_wininst_name(arch)) target.write(cnt)
6d54df7a95a305d63d38f64cd30dae6c1152d311 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12971/6d54df7a95a305d63d38f64cd30dae6c1152d311/pavement.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2911, 67, 2387, 291, 67, 4263, 12, 2074, 502, 16, 818, 502, 4672, 309, 486, 1140, 18, 803, 18, 1808, 12, 13272, 654, 12231, 67, 20215, 4672, 1140, 18, 81, 9477, 10539, 12, 13272, 654, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2911, 67, 2387, 291, 67, 4263, 12, 2074, 502, 16, 818, 502, 4672, 309, 486, 1140, 18, 803, 18, 1808, 12, 13272, 654, 12231, 67, 20215, 4672, 1140, 18, 81, 9477, 10539, 12, 13272, 654, ...
m[:] = 'd'*mapsize self.assertEqual(m[:], 'd' * mapsize,
m[:] = b'd'*mapsize self.assertEqual(m[:], b'd' * mapsize,
def test_access_parameter(self): # Test for "access" keyword parameter mapsize = 10 open(TESTFN, "wb").write("a"*mapsize) f = open(TESTFN, "rb") m = mmap.mmap(f.fileno(), mapsize, access=mmap.ACCESS_READ) self.assertEqual(m[:], 'a'*mapsize, "Readonly memory map data incorrect.")
d5ab51392e332ac6a7a37b2fca62a82b1aee9ec7 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8125/d5ab51392e332ac6a7a37b2fca62a82b1aee9ec7/test_mmap.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 3860, 67, 6775, 12, 2890, 4672, 468, 7766, 364, 315, 3860, 6, 4932, 1569, 852, 1467, 273, 1728, 1696, 12, 16961, 19793, 16, 315, 9464, 20387, 2626, 2932, 69, 6, 14, 1458, 146...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 3860, 67, 6775, 12, 2890, 4672, 468, 7766, 364, 315, 3860, 6, 4932, 1569, 852, 1467, 273, 1728, 1696, 12, 16961, 19793, 16, 315, 9464, 20387, 2626, 2932, 69, 6, 14, 1458, 146...
install_python = True
if os.path.exists('python') : install_python = True
def prettylibs(libraries): libs = [] for lib in libraries: for p,v in replacetable: if p[0] == '=' : if p[1:] == lib : lib = v break else : if p in lib : lib = v break if lib: libs.append(lib) return ' '.join(libs)
54ab9426c36bf852c031db78b4ebf9d25862a29a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9140/54ab9426c36bf852c031db78b4ebf9d25862a29a/genCMake.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7517, 21571, 12, 31417, 4672, 15042, 273, 5378, 364, 2561, 316, 14732, 30, 364, 293, 16, 90, 316, 6831, 1077, 278, 429, 30, 309, 293, 63, 20, 65, 422, 5214, 294, 309, 293, 63, 21, 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, 7517, 21571, 12, 31417, 4672, 15042, 273, 5378, 364, 2561, 316, 14732, 30, 364, 293, 16, 90, 316, 6831, 1077, 278, 429, 30, 309, 293, 63, 20, 65, 422, 5214, 294, 309, 293, 63, 21, 26...
'comment' : None, 'contact' : None, 'exdate' : None, 'exrule' : None, 'rstatus' : None, 'related' : None, 'resources' : None, 'rdate' : None, 'rrule' : {'field':'rrule', 'type':'text'}, 'x-openobject-id' : {'field':'id', 'type':'text'}, 'x-openobject-model' : {'value':_name, 'type':'text'}, 'dtend' : {'field':'date_closed', 'type':'datetime'},
'comment' : None, 'contact' : None, 'exdate' : None, 'exrule' : None, 'rstatus' : None, 'related' : None, 'resources' : None, 'rdate' : None, 'rrule' : {'field':'rrule', 'type':'text'}, 'x-openobject-id' : {'field':'id', 'type':'text'}, 'x-openobject-model' : {'value':_name, 'type':'text'}, 'dtend' : {'field':'date_closed', 'type':'datetime'},
def import_cal(self, cr, uid, ids, context={}): self.import_ical(cr, uid) # get all property of CalDAV
6ef425eb9ba53031aed0c6d62efd20dc99d4dc99 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/6ef425eb9ba53031aed0c6d62efd20dc99d4dc99/crm_calendar.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1930, 67, 771, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 819, 12938, 4672, 365, 18, 5666, 67, 1706, 12, 3353, 16, 4555, 13, 468, 336, 777, 1272, 434, 3596, 17735, 2, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1930, 67, 771, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 819, 12938, 4672, 365, 18, 5666, 67, 1706, 12, 3353, 16, 4555, 13, 468, 336, 777, 1272, 434, 3596, 17735, 2, -100, -100, -1...
words = []
words = {}
def CreateTestMessage(self, spam_status): words = [] if spam_status != SPAM: words.extend(FindTopWords(self.manager.bayes, 50, False)) if spam_status != HAM: words.extend(FindTopWords(self.manager.bayes, 50, True)) # Create a new blank message with our words msg = self.manager.outlook.CreateItem(0) msg.Body = "\n".join(words) msg.Subject = TEST_SUBJECT return msg
dd7298bdea1152d90803967bf28763a9a3f36f01 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9857/dd7298bdea1152d90803967bf28763a9a3f36f01/tester.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1788, 4709, 1079, 12, 2890, 16, 24824, 67, 2327, 4672, 4511, 273, 2618, 309, 24824, 67, 2327, 480, 11405, 2192, 30, 4511, 18, 14313, 12, 3125, 3401, 7363, 12, 2890, 18, 4181, 18, 70, 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, 1788, 4709, 1079, 12, 2890, 16, 24824, 67, 2327, 4672, 4511, 273, 2618, 309, 24824, 67, 2327, 480, 11405, 2192, 30, 4511, 18, 14313, 12, 3125, 3401, 7363, 12, 2890, 18, 4181, 18, 70, 5...
c = Channel(station, channel_id + 1, q)
c = Channel(station, channel_id + 1, channel_timer, q)
def run(self): self.conf = self.get_conf_dict() #print self.conf
f301a42ec88d17568c5e38c8fe8c40e8d96caaea /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12047/f301a42ec88d17568c5e38c8fe8c40e8d96caaea/d-fuzz.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 365, 18, 3923, 273, 365, 18, 588, 67, 3923, 67, 1576, 1435, 468, 1188, 365, 18, 3923, 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, 1086, 12, 2890, 4672, 365, 18, 3923, 273, 365, 18, 588, 67, 3923, 67, 1576, 1435, 468, 1188, 365, 18, 3923, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
cmd = cmd + ' "' + THIRDPARTY + 'miles/lib/mss32.lib"'
cmd = cmd + ' ' + THIRDPARTY + 'miles/lib/mss32.lib'
def CompileLink(dll=0, obj=[], opts=[], xdep=[]): if (dll==0): sys.exit("Syntax error in CompileLink directive") if (COMPILER=="MSVC7"): ALLTARGETS.append(PREFIX+"/bin/"+dll) lib = PREFIX+"/lib/"+dll[:-4]+".lib" dll = PREFIX+"/bin/"+dll wobj = [] for x in obj: suffix = x[-4:] if (suffix==".obj"): wobj.append(PREFIX+"/tmp/"+x) elif (suffix==".dll"): wobj.append(PREFIX+"/lib/"+x[:-4]+".lib") elif (suffix==".lib"): wobj.append(PREFIX+"/lib/"+x) elif (suffix==".res"): wobj.append(PREFIX+"/tmp/"+x) else: sys.exit("unknown suffix in object list.") if (older(dll, wobj+xdep)): cmd = 'link.exe /nologo /NODEFAULTLIB:LIBCI.LIB' if (dll[-4:]!=".exe"): cmd = cmd + " /DLL" if (OPTIMIZE==1): cmd = cmd + " /DEBUG /NODEFAULTLIB:MSVCRT.LIB " if (OPTIMIZE==2): cmd = cmd + " /DEBUG /NODEFAULTLIB:MSVCRT.LIB " if (OPTIMIZE==3): cmd = cmd + " /DEBUG /NODEFAULTLIB:MSVCRTD.LIB /OPT:REF " if (OPTIMIZE==4): cmd = cmd + " /DEBUG /NODEFAULTLIB:MSVCRTD.LIB /OPT:REF /LTCG " cmd = cmd + " /MAP /MAPINFO:EXPORTS /MAPINFO:LINES /fixed:no /incremental:no /stack:4194304 " if (opts.count("NOLIBCI")): cmd = cmd + " /NODEFAULTLIB:LIBCI.LIB " if (opts.count("MAXEGGDEF")): cmd = cmd + ' /DEF:pandatool/src/maxegg/MaxEgg.def' cmd = cmd + ' /OUT:"' + dll + '" /IMPLIB:"' + lib + '" /MAP:NUL' cmd = cmd + ' /LIBPATH:"' + PREFIX + '/python/libs" ' for x in wobj: cmd = cmd + ' "' + x + '"' if (dll[-4:]==".exe"): cmd = cmd + ' "' + PREFIX + '/tmp/pandaIcon.res"' if (opts.count("D3D8") or opts.count("D3D9") or opts.count("DXDRAW") or opts.count("DXSOUND") or opts.count("DXGUID")): cmd = cmd + ' /LIBPATH:"' + DIRECTXSDK + 'lib/x86"' cmd = cmd + ' /LIBPATH:"' + DIRECTXSDK + 'lib"' if (opts.count("D3D8")): cmd = cmd + ' d3d8.lib d3dx8.lib dxerr8.lib' if (opts.count("D3D9")): cmd = cmd + ' d3d9.lib d3dx9.lib dxerr9.lib' if (opts.count("DXDRAW")): cmd = cmd + ' ddraw.lib' if (opts.count("DXSOUND")): cmd = cmd + ' dsound.lib' if (opts.count("DXGUID")): cmd = cmd + ' dxguid.lib' if (opts.count("WINSOCK")): cmd = cmd + " wsock32.lib" if (opts.count("WINSOCK2")): cmd = cmd + " wsock32.lib ws2_32.lib" if (opts.count("WINCOMCTL")): cmd = cmd + ' comctl32.lib' if (opts.count("WINUSER")): cmd = cmd + " user32.lib" if (opts.count("WINMM")): cmd = cmd + " winmm.lib" if (opts.count("WINIMM")): cmd = cmd + " imm32.lib" if (opts.count("WINKERNEL")): cmd = cmd + " kernel32.lib" if (opts.count("WINOLDNAMES")): cmd = cmd + " oldnames.lib" if (opts.count("WINGDI")): cmd = cmd + " gdi32.lib" if (opts.count("ADVAPI")): cmd = cmd + " advapi32.lib" if (opts.count("GLUT")): cmd = cmd + " opengl32.lib glu32.lib" if (PkgSelected(opts,"ZLIB")): cmd = cmd + ' "' + THIRDPARTY + 'zlib/lib/libz.lib"' if (PkgSelected(opts,"PNG")): cmd = cmd + ' "' + THIRDPARTY + 'png/lib/libpng.lib"' if (PkgSelected(opts,"JPEG")): cmd = cmd + ' "' + THIRDPARTY + 'jpeg/lib/libjpeg.lib"' if (PkgSelected(opts,"TIFF")): cmd = cmd + ' "' + THIRDPARTY + 'tiff/lib/libtiff.lib"' if (PkgSelected(opts,"VRPN")): cmd = cmd + ' "' + THIRDPARTY + 'vrpn/lib/vrpn.lib"' cmd = cmd + ' "' + THIRDPARTY + 'vrpn/lib/quat.lib"' if (PkgSelected(opts,"FMOD")): cmd = cmd + ' "' + THIRDPARTY + 'fmod/lib/fmod.lib"' if (PkgSelected(opts,"MILES")): cmd = cmd + ' "' + THIRDPARTY + 'miles/lib/mss32.lib"' if (PkgSelected(opts,"NVIDIACG")): if (opts.count("CGGL")): cmd = cmd + ' "' + THIRDPARTY + 'nvidiacg/lib/cgGL.lib"' cmd = cmd + ' "' + THIRDPARTY + 'nvidiacg/lib/cg.lib"' if (PkgSelected(opts,"HELIX")): cmd = cmd + ' "' + THIRDPARTY + 'helix/lib/runtlib.lib"' cmd = cmd + ' "' + THIRDPARTY + 'helix/lib/syslib.lib"' cmd = cmd + ' "' + THIRDPARTY + 'helix/lib/contlib.lib"' cmd = cmd + ' "' + THIRDPARTY + 'helix/lib/debuglib.lib"' cmd = cmd + ' "' + THIRDPARTY + 'helix/lib/utillib.lib"' cmd = cmd + ' "' + THIRDPARTY + 'helix/lib/stlport_vc7.lib"' if (PkgSelected(opts,"NSPR")): cmd = cmd + ' "' + THIRDPARTY + 'nspr/lib/libnspr4.lib"' if (PkgSelected(opts,"SSL")): cmd = cmd + ' "' + THIRDPARTY + 'ssl/lib/ssleay32.lib"' cmd = cmd + ' "' + THIRDPARTY + 'ssl/lib/libeay32.lib"' if (PkgSelected(opts,"FREETYPE")): cmd = cmd + ' "' + THIRDPARTY + 'freetype/lib/libfreetype.lib"' if (PkgSelected(opts,"FFTW")): cmd = cmd + ' "' + THIRDPARTY + 'fftw/lib/rfftw.lib"' cmd = cmd + ' "' + THIRDPARTY + 'fftw/lib/fftw.lib"' if (PkgSelected(opts,"MAYA5")): cmd = cmd + ' "' + Maya5SDK + 'lib/Foundation.lib"' cmd = cmd + ' "' + Maya5SDK + 'lib/OpenMaya.lib"' cmd = cmd + ' "' + Maya5SDK + 'lib/OpenMayaAnim.lib"' if (PkgSelected(opts,"MAYA6")): cmd = cmd + ' "' + Maya6SDK + 'lib/Foundation.lib"' cmd = cmd + ' "' + Maya6SDK + 'lib/OpenMaya.lib"' cmd = cmd + ' "' + Maya6SDK + 'lib/OpenMayaAnim.lib"' for max in ["MAX5","MAX6","MAX7"]: if PkgSelected(opts,max): cmd = cmd + ' "' + MAXSDK[max] + 'lib/core.lib"' cmd = cmd + ' "' + MAXSDK[max] + 'lib/mesh.lib"' cmd = cmd + ' "' + MAXSDK[max] + 'lib/maxutil.lib"' cmd = cmd + ' "' + MAXSDK[max] + 'lib/paramblk2.lib"' oscmd(cmd) updatefiledate(dll) if ((OPTIMIZE == 1) and (dll[-4:]==".dll")): CopyFile(dll[:-4]+"_d.dll", dll) if (COMPILER=="LINUXA"): ALLTARGETS.append(PREFIX+"/lib/"+dll[:-4]+".so") if (dll[-4:]==".exe"): wdll = PREFIX+"/bin/"+dll[:-4] else: wdll = PREFIX+"/lib/"+dll[:-4]+".so" wobj = [] for x in obj: suffix = x[-4:] if (suffix==".obj"): wobj.append(PREFIX+"/tmp/"+x[:-4]+".o") elif (suffix==".dll"): wobj.append(PREFIX+"/lib/"+x[:-4]+".so") elif (suffix==".lib"): wobj.append(PREFIX+"/lib/"+x[:-4]+".a") else: sys.exit("unknown suffix in object list.") if (older(wdll, wobj+xdep)): if (dll[-4:]==".exe"): cmd = 'g++ -o "' + wdll + '" -L"' + PREFIX + '/lib"' else: cmd = 'g++ -shared -o "' + wdll + '" -L"' + PREFIX + '/lib"' for x in obj: suffix = x[-4:] if (suffix==".obj"): cmd = cmd + ' "' + PREFIX + '/tmp/' + x[:-4] + '.o"' elif (suffix==".dll"): cmd = cmd + ' -l' + x[3:-4] elif (suffix==".lib"): cmd = cmd + ' "' + PREFIX + '/lib/' + x[:-4] + '.a"' if (PkgSelected(opts,"FMOD")): cmd = cmd + ' -L"' + THIRDPARTY + 'fmod/lib" -lfmod-3.74' if (PkgSelected(opts,"NVIDIACG")): cmd = cmd + ' -L"' + THIRDPARTY + 'nvidiacg/lib" ' if (opts.count("CGGL")): cmd = cmd + " -lCgGL" cmd = cmd + " -lCg" if (PkgSelected(opts,"NSPR")): cmd = cmd + ' -L"' + THIRDPARTY + 'nspr/lib" -lpandanspr4' if (PkgSelected(opts,"ZLIB")): cmd = cmd + " -lz" if (PkgSelected(opts,"PNG")): cmd = cmd + " -lpng" if (PkgSelected(opts,"JPEG")): cmd = cmd + " -ljpeg" if (PkgSelected(opts,"TIFF")): cmd = cmd + " -ltiff" if (PkgSelected(opts,"SSL")): cmd = cmd + " -lssl" if (PkgSelected(opts,"FREETYPE")): cmd = cmd + " -lfreetype" if (PkgSelected(opts,"VRPN")): cmd = cmd + ' -L"' + THIRDPARTY + 'vrpn/lib" -lvrpn -lquat' if (PkgSelected(opts,"FFTW")): cmd = cmd + ' -L"' + THIRDPARTY + 'fftw/lib" -lrfftw -lfftw' if (opts.count("GLUT")): cmd = cmd + " -lGL -lGLU" oscmd(cmd) updatefiledate(wdll)
c85190276cd6a9b01b212e9fdd00c907bf653374 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8543/c85190276cd6a9b01b212e9fdd00c907bf653374/makepanda.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 16143, 2098, 12, 27670, 33, 20, 16, 1081, 22850, 6487, 1500, 22850, 6487, 619, 15037, 33, 8526, 4672, 309, 261, 27670, 631, 20, 4672, 2589, 18, 8593, 2932, 8070, 555, 316, 16143, 2098, 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, 16143, 2098, 12, 27670, 33, 20, 16, 1081, 22850, 6487, 1500, 22850, 6487, 619, 15037, 33, 8526, 4672, 309, 261, 27670, 631, 20, 4672, 2589, 18, 8593, 2932, 8070, 555, 316, 16143, 2098, 8...
fabricate was developed by Brush Technology for in-house use, but we thought
builder was developed by Brush Technology for in-house use, but we thought
def clean(): autoclean()
35a4c940cd25ac86249d9109056febf30a36afd7 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7381/35a4c940cd25ac86249d9109056febf30a36afd7/fabricate.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2721, 13332, 23173, 298, 304, 1435, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2721, 13332, 23173, 298, 304, 1435, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
if attribute.lower() != ("@court" or "@casename" or "@docstatus" or "@doctext"):
if validRegex.search(attribute.lower()) == None:
def showResults(request, queryType="search"): """Show the results for a query as either an alert or a search""" if queryType == "alert/preview": queryType = "alert" elif queryType == "search/results": queryType = "search" try: query = request.GET['q'] except: # if somebody is URL hacking at /search/results/ or alert/preview/ query = "" # this handles the alert creation form. if request.method == 'POST': from alert.userHandling.models import Alert # an alert has been created alertForm = CreateAlertForm(request.POST) if alertForm.is_valid(): cd = alertForm.cleaned_data # save the alert a = CreateAlertForm(cd) alert = a.save() # this method saves it and returns it # associate the user with the alert try: # This works...but only if they already have an account. up = request.user.get_profile() except: # if the user doesn't have a profile yet, we make them one, and # associate it with their username. u = request.user up = UserProfile() up.user = u up.save() up.alert.add(alert) messages.add_message(request, messages.SUCCESS, 'Your alert was created successfully.') # and redirect to the alerts page return HttpResponseRedirect('/profile/alerts/') else: # the form is loading for the first time, load it, then load the rest # of the page! alertForm = CreateAlertForm(initial = {'alertText': query}) # OLD SEARCH METHOD # results = Document.objects.filter(documentPlainText__icontains=query).order_by("-dateFiled") # Sphinx search """Known problems: - date fields don't work""" # before searching, check that all attributes are valid. Create message if not. attributes = re.findall('@\w*', query) badAttrs = [] for attribute in attributes: if attribute.lower() != ("@court" or "@casename" or "@docstatus" or "@doctext"): badAttrs.append(attribute) # pluralization is a pain, but we must do it... if len(badAttrs) == 1: messageText = 'We completed your search, but <strong>' + \ oxford_comma(badAttrs) + '</strong> is not a valid attribute.<br>\ Valid attributes are @court, @caseName, @docStatus and @docText.' else: messageText = 'We completed your search, but <strong>' + \ oxford_comma(badAttrs) + '</strong> are not valid attributes.<br>\ Valid attributes are @court, @caseName, @docStatus and @docText.' messages.add_message(request, messages.INFO, messageText) try: queryset = Document.search.query(query) results = queryset.set_options(mode="SPH_MATCH_EXTENDED2")\ .order_by('-dateFiled') except: results = [] # next, we paginate we will show ten results/page paginator = Paginator(results, 10) # Make sure page request is an int. If not, deliver first page. try: page = int(request.GET.get('page', '1')) except ValueError: page = 1 # If page request is out of range, deliver last page of results. try: results = paginator.page(page) except (EmptyPage, InvalidPage): results = paginator.page(paginator.num_pages) except: results = [] return render_to_response('search/results.html', {'results': results, 'queryType': queryType, 'query': query, 'alertForm': alertForm}, RequestContext(request))
f24a2c70d62e718293ada80a428894af53cf3d5c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6762/f24a2c70d62e718293ada80a428894af53cf3d5c/views.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 3447, 12, 2293, 16, 843, 559, 1546, 3072, 6, 4672, 3536, 5706, 326, 1686, 364, 279, 843, 487, 3344, 392, 6881, 578, 279, 1623, 8395, 309, 843, 559, 422, 315, 11798, 19, 12102, 68...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 3447, 12, 2293, 16, 843, 559, 1546, 3072, 6, 4672, 3536, 5706, 326, 1686, 364, 279, 843, 487, 3344, 392, 6881, 578, 279, 1623, 8395, 309, 843, 559, 422, 315, 11798, 19, 12102, 68...
<!-- <p>Affects: <label><input type=checkbox name=affects_authors checked> <img src="icons/authors" alt=""> Authors</label> <label><input type=checkbox name=affects_conformance-checkers checked> <img src="icons/conformance-checkers" alt=""> Validators</label> <label><input type=checkbox name=affects_gecko checked> <img src="icons/gecko" alt=""> Gecko</label> <label><input type=checkbox name=affects_internet-explorer checked> <img src="icons/internet-explorer" alt=""> IE</label> <label><input type=checkbox name=affects_opera checked> <img src="icons/opera" alt=""> Opera</label> <label><input type=checkbox name=affects_webkit checked> <img src="icons/webkit" alt=""> WebKit</label> <label><input type=checkbox name=affects_google-gears checked> <img src="icons/google-gears" alt=""> Gears</label> <label><input type=checkbox name=affects_tools checked> <img src="icons/tools" alt=""> Tools</label> <label><input type=checkbox name=affects_none checked> None</label> <p>Stability: <label class=draft-content><input type=checkbox name=stability_draft-content checked> Draft content</label> <label class=stable-draft><input type=checkbox name=stability_stable-draft checked> Stable draft</label> <label class=implemented><input type=checkbox name=stability_implemented checked> Implemented</label> <label class=stable><input type=checkbox name=stability_stable checked> Stable</label> --> <label class=editorial>Show editorial changes <input type=checkbox name=editorial checked></label>
<label class="editorial">Show editorial changes <input type="checkbox" id="editorial" checked="" onchange="updateEditorial()"></label>
def startFormatting(title, identifier, source): document = """Content-Type:text/html;charset=UTF-8
f5f4c3ed6200811f1911f1b21ca420f1c2697ec6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5033/f5f4c3ed6200811f1911f1b21ca420f1c2697ec6/trackerlib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 787, 23974, 12, 2649, 16, 2756, 16, 1084, 4672, 1668, 273, 3536, 1350, 17, 559, 30, 955, 19, 2620, 31, 9999, 33, 5159, 17, 28, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 787, 23974, 12, 2649, 16, 2756, 16, 1084, 4672, 1668, 273, 3536, 1350, 17, 559, 30, 955, 19, 2620, 31, 9999, 33, 5159, 17, 28, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, ...
topSizer.Add((50,1))
topSizer.Add((30,1))
def Configure( self, choices=[], fore = (0, 0, 0), back = (255, 255, 255), fontInfo = None
5a9e24db893d311594502a931adac4c0bc74b70e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8076/5a9e24db893d311594502a931adac4c0bc74b70e/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11758, 12, 365, 16, 7246, 22850, 6487, 895, 273, 261, 20, 16, 374, 16, 374, 3631, 1473, 273, 261, 10395, 16, 4561, 16, 4561, 3631, 3512, 966, 273, 599, 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, 11758, 12, 365, 16, 7246, 22850, 6487, 895, 273, 261, 20, 16, 374, 16, 374, 3631, 1473, 273, 261, 10395, 16, 4561, 16, 4561, 3631, 3512, 966, 273, 599, 2, -100, -100, -100, -100, -100,...
yield Bytes(self, "value", self['size'].value) self.xml=lambda prefix:prefix + "<data>\n%s\n%s</data>"%(self['value'].value.encode('base64').strip(),prefix)
if self['size'].value: yield Bytes(self, "value", self['size'].value) self.xml=lambda prefix:prefix + "<data>\n%s\n%s</data>"%(self['value'].value.encode('base64').strip(),prefix) else: self.xml=lambda prefix:prefix + '<data></data>'
def createFields(self): yield Enum(Bits(self, "marker_type", 4), {0: "Simple", 1: "Int", 2: "Real", 3: "Date", 4: "Data", 5: "ASCII String", 6: "UTF-16-BE String", 8: "UID", 10: "Array", 13: "Dict",}) markertype = self['marker_type'].value if markertype == 0: # Simple (Null) yield Enum(Bits(self, "value", 4), {0: "Null", 8: "False", 9: "True", 15: "Fill Byte",}) if self['value'].display == "False": self.xml=lambda prefix:prefix + "<false/>" elif self['value'].display == "True": self.xml=lambda prefix:prefix + "<true/>" else: self.xml=lambda prefix:prefix + ""
739f4752fd699eb9a057be40ba3871da271297c7 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9327/739f4752fd699eb9a057be40ba3871da271297c7/bplist.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 2314, 12, 2890, 4672, 2824, 6057, 12, 6495, 12, 2890, 16, 315, 11145, 67, 723, 3113, 1059, 3631, 288, 20, 30, 315, 5784, 3113, 404, 30, 315, 1702, 3113, 576, 30, 315, 6955, 3113, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 2314, 12, 2890, 4672, 2824, 6057, 12, 6495, 12, 2890, 16, 315, 11145, 67, 723, 3113, 1059, 3631, 288, 20, 30, 315, 5784, 3113, 404, 30, 315, 1702, 3113, 576, 30, 315, 6955, 3113, ...
output = query(lines = text.splitlines())
output = SearchEngine().query(lines = text.splitlines())
def main(): gen = None # pages which will be processed when the -page parameter is used PageTitles = [] # IDs which will be processed when the -ids parameter is used ids = None # Which namespaces should be processed? # default to [] which means all namespaces will be processed namespaces = [] # repeat = False # text = None # Number of pages to load at a time by Preload generator pageNumber = 40 # Default number of pages for NewPages generator number = 60 firstPageTitle = None # This factory is responsible for processing command line arguments # that are also used by other scripts and that determine on which pages # to work on. genFactory = pagegenerators.GeneratorFactory() # Read commandline parameters. for arg in wikipedia.handleArgs(): if arg == '-y': config.copyright_yahoo = True elif arg == '-g': config.copyright_google = True elif arg == '-l': config.copyright_msn = True elif arg == '-ny': config.copyright_yahoo = False elif arg == '-ng': config.copyright_google = False elif arg == '-nl': config.copyright_msn = False elif arg.startswith('-output'): if len(arg) >= 8: setSavepath(arg[8:]) elif arg.startswith('-maxquery'): if len(arg) >= 10: config.copyright_max_query_for_page = int(arg[10:]) elif arg.startswith('-skipquery'): if len(arg) >= 11: config.copyright_skip_query = int(arg[11:]) elif arg.startswith('-nwords'): if len(arg) >= 8: number_of_words = int(arg[8:]) elif arg.startswith('-text'): if len(arg) >= 6: text = arg[6:] elif arg.startswith('-page'): if len(arg) == 5: PageTitles.append(wikipedia.input(u'Which page do you want to change?')) else: PageTitles.append(arg[6:]) elif arg.startswith('-namespace:'): try: namespaces.append(int(arg[11:])) except ValueError: namespaces.append(arg[11:]) elif arg.startswith('-forceupdate'): URLExclusion().update() elif arg == '-repeat': repeat = True elif arg.startswith('-new'): if len(arg) >=5: number = int(arg[5:]) gen = pagegenerators.NewpagesPageGenerator(number = number, repeat = repeat) # Preload generator work better if 'pageNumber' is not major than 'number', # this avoid unnecessary delay. if number < pageNumber: pageNumber = number else: genFactory.handleArg(arg) if PageTitles: pages = [wikipedia.Page(wikipedia.getSite(), PageTitle) for PageTitle in PageTitles] gen = iter(pages) config.copyright_yahoo = check_config(config.copyright_yahoo, config.yahoo_appid, "Yahoo AppID") config.copyright_google = check_config(config.copyright_google, config.google_key, "Google Web API license key") config.copyright_msn = check_config(config.copyright_msn, config.msn_appid, "Live Search AppID") if ids: checks_by_ids(ids) if not gen: gen = genFactory.getCombinedGenerator() if not gen and not ids and not text: # syntax error, show help text from the top of this file wikipedia.output(__doc__, 'utf-8') if text: output = query(lines = text.splitlines()) if output: wikipedia.output(output) if not gen: return if namespaces != []: gen = pagegenerators.NamespaceFilterPageGenerator(gen, namespaces) preloadingGen = pagegenerators.PreloadingGenerator(gen, pageNumber = pageNumber) bot = CheckRobot(preloadingGen) bot.run()
7e45715708331d0e763b295fedfe7f4f6aee82ca /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4404/7e45715708331d0e763b295fedfe7f4f6aee82ca/copyright.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 3157, 273, 599, 468, 4689, 1492, 903, 506, 5204, 1347, 326, 300, 2433, 1569, 353, 1399, 3460, 25088, 273, 5378, 468, 7115, 1492, 903, 506, 5204, 1347, 326, 300, 2232, 1569, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 13332, 3157, 273, 599, 468, 4689, 1492, 903, 506, 5204, 1347, 326, 300, 2433, 1569, 353, 1399, 3460, 25088, 273, 5378, 468, 7115, 1492, 903, 506, 5204, 1347, 326, 300, 2232, 1569, ...
self.log_path = os.path.join(log_folder, "conversion-%d-to-%s-log" % (self.item_info.id, self.converter_info.identifier))
self.log_path = os.path.join(log_folder, "conversion-%d-to-%s.log" % (self.item_info.id, self.converter_info.identifier))
def _start_logging(self, executable, params): log_folder = os.path.dirname(config.get(prefs.LOG_PATHNAME)) self.log_path = os.path.join(log_folder, "conversion-%d-to-%s-log" % (self.item_info.id, self.converter_info.identifier)) self.log_file = file(self.log_path, "w") self._log_progress("STARTING CONVERSION") self._log_progress("-> Item: %s" % util.stringify(self.item_info.name)) self._log_progress("-> Converter used: %s" % self.converter_info.name) self._log_progress("-> Executable: %s" % executable) self._log_progress("-> Parameters: %s" % ' '.join(params)) self._log_progress("")
b639c0dfd11759e2a218e8a5b3fc23377572d362 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12354/b639c0dfd11759e2a218e8a5b3fc23377572d362/videoconversion.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1937, 67, 11167, 12, 2890, 16, 9070, 16, 859, 4672, 613, 67, 5609, 273, 1140, 18, 803, 18, 12287, 12, 1425, 18, 588, 12, 1484, 2556, 18, 4842, 67, 4211, 1985, 3719, 365, 18, 133...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1937, 67, 11167, 12, 2890, 16, 9070, 16, 859, 4672, 613, 67, 5609, 273, 1140, 18, 803, 18, 12287, 12, 1425, 18, 588, 12, 1484, 2556, 18, 4842, 67, 4211, 1985, 3719, 365, 18, 133...
f = open(filename, 'rb')
f = open(filename, 'rT')
def showframe(self, stackindex): (frame, lineno) = self.stack[stackindex] W.SetCursor('watch') filename = frame.f_code.co_filename if filename <> self.file: editor = self.geteditor(filename) if editor: self.w.panes.bottom.src.source.set(editor.get(), filename) else: try: f = open(filename, 'rb') data = f.read() f.close() except IOError: if filename[-3:] == '.py': import imp modname = os.path.basename(filename)[:-3] try: f, filename, (suff, mode, dummy) = imp.find_module(modname) except ImportError: self.w.panes.bottom.src.source.set("can't find file") else: if f: f.close() if f and suff == '.py': f = open(filename, 'rb') data = f.read() f.close() self.w.panes.bottom.src.source.set(data, filename) else: self.w.panes.bottom.src.source.set("can't find file") else: self.w.panes.bottom.src.source.set("can't find file") else: self.w.panes.bottom.src.source.set(data, filename) self.file = filename self.w.panes.bottom.srctitle.set('Source: ' + filename + ((lineno > 0) and (' (line %d)' % lineno) or ' ')) self.goto_line(lineno) self.lineno = lineno self.showvars((frame, lineno))
b8225b026906a9a6f3e751f60a4db164266bb85b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/b8225b026906a9a6f3e751f60a4db164266bb85b/PyDebugger.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 3789, 12, 2890, 16, 2110, 1615, 4672, 261, 3789, 16, 7586, 13, 273, 365, 18, 3772, 63, 3772, 1615, 65, 678, 18, 694, 6688, 2668, 7585, 6134, 1544, 273, 2623, 18, 74, 67, 710, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 3789, 12, 2890, 16, 2110, 1615, 4672, 261, 3789, 16, 7586, 13, 273, 365, 18, 3772, 63, 3772, 1615, 65, 678, 18, 694, 6688, 2668, 7585, 6134, 1544, 273, 2623, 18, 74, 67, 710, 1...
output(u"ERROR> link from %s to %s:%s has leading colon?!" % (self.linkname(), newsite, newname))
output(u"ERROR: link from %s to [[%s:%s]] has leading colon?!" % (self.aslink(), newsite, newname))
def interwiki(self): """A list of interwiki links in the page. This will retrieve the page text to do its work, so it can raise the same exceptions that are raised by the get() method.
4d4b100c0c4a5b0a22bf72174e33f887a4a5106f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4404/4d4b100c0c4a5b0a22bf72174e33f887a4a5106f/wikipedia.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1554, 13044, 12, 2890, 4672, 3536, 37, 666, 434, 1554, 13044, 4716, 316, 326, 1363, 18, 1220, 903, 4614, 326, 1363, 977, 358, 741, 2097, 1440, 16, 1427, 518, 848, 1002, 326, 1967, 4798, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1554, 13044, 12, 2890, 4672, 3536, 37, 666, 434, 1554, 13044, 4716, 316, 326, 1363, 18, 1220, 903, 4614, 326, 1363, 977, 358, 741, 2097, 1440, 16, 1427, 518, 848, 1002, 326, 1967, 4798, ...
except DistutilsExecError, msg:
except DistutilsExecError as msg:
def link(self, target_desc, objects, output_filename, output_dir=None, libraries=None, library_dirs=None, runtime_library_dirs=None, export_symbols=None, debug=0, extra_preargs=None, extra_postargs=None, build_temp=None, target_lang=None):
4fca9553791a03c69c398ad5bd01c118b49b73e3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3187/4fca9553791a03c69c398ad5bd01c118b49b73e3/msvc9compiler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1692, 12, 2890, 16, 1018, 67, 5569, 16, 2184, 16, 876, 67, 3459, 16, 876, 67, 1214, 33, 7036, 16, 14732, 33, 7036, 16, 5313, 67, 8291, 33, 7036, 16, 3099, 67, 12083, 67, 8291, 33, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1692, 12, 2890, 16, 1018, 67, 5569, 16, 2184, 16, 876, 67, 3459, 16, 876, 67, 1214, 33, 7036, 16, 14732, 33, 7036, 16, 5313, 67, 8291, 33, 7036, 16, 3099, 67, 12083, 67, 8291, 33, ...
return self.tk.call(self._w, 'info', 'down', index)
return self.tk.call(self._w, 'info', 'down', index)
def info_down(self, index):
b0e44d61d9e592e1acd6aa05eac9704ba5776f61 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/b0e44d61d9e592e1acd6aa05eac9704ba5776f61/Tix.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1123, 67, 2378, 12, 2890, 16, 770, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1123, 67, 2378, 12, 2890, 16, 770, 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, ...
if sites is not None:
if sites is not None:
def makeBlockList(self, onlyClosedBlocks = False, sites=None, providedOnlyBlocks=None): """ _makeBlockList_
1d2e2ee1b3fce9fc44394ff757ed95b41e944755 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8887/1d2e2ee1b3fce9fc44394ff757ed95b41e944755/TwoFileFeeder.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 1768, 682, 12, 2890, 16, 1338, 7395, 6450, 273, 1083, 16, 9180, 33, 7036, 16, 2112, 3386, 6450, 33, 7036, 4672, 3536, 389, 6540, 1768, 682, 67, 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, 1221, 1768, 682, 12, 2890, 16, 1338, 7395, 6450, 273, 1083, 16, 9180, 33, 7036, 16, 2112, 3386, 6450, 33, 7036, 4672, 3536, 389, 6540, 1768, 682, 67, 2, -100, -100, -100, -100, -100, -...
def _get_index_items(self, tree, link, dict=None):
def _get_index_items(self, tree, link, dict): """ @param dict: in/out parameter. """
def _get_index_items(self, tree, link, dict=None): if tree is None: return if dict == None: dict = {} if isinstance(tree, _Text): return dict elif tree.tagName != 'index': for child in tree.childNodes: self._get_index_items(child, link, dict) else: children = [self._dom_to_html(c) for c in tree.childNodes] key = ''.join(children).lower().strip() if dict.has_key(key): dict[key].append(link) else: dict[key] = [link] return dict
60b4598f963657af72659f4c3492b6028c51c37e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/60b4598f963657af72659f4c3492b6028c51c37e/html.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 1615, 67, 3319, 12, 2890, 16, 2151, 16, 1692, 16, 2065, 4672, 3536, 632, 891, 2065, 30, 316, 19, 659, 1569, 18, 3536, 309, 2151, 353, 599, 30, 327, 309, 2065, 422, 599,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 1615, 67, 3319, 12, 2890, 16, 2151, 16, 1692, 16, 2065, 4672, 3536, 632, 891, 2065, 30, 316, 19, 659, 1569, 18, 3536, 309, 2151, 353, 599, 30, 327, 309, 2065, 422, 599,...
open(path, 'wb').write(getattr(css, 'cssText', css).encode('utf-8'))
raw = getattr(css, 'cssText', css) if isinstance(raw, unicode): raw = raw.encode('utf-8') open(path, 'wb').write(raw)
def parse_content(filelist, opts, tdir): os.makedirs(os.path.join(tdir, 'content', 'resources')) resource_map, stylesheets = {}, {} toc = TOC(base_path=tdir, type='root') stylesheet_map = {} for htmlfile in filelist: logging.getLogger('html2epub').debug('Processing %s...'%htmlfile) hp = HTMLProcessor(htmlfile, opts, os.path.join(tdir, 'content'), resource_map, filelist, stylesheets) hp.populate_toc(toc) hp.save() stylesheet_map[os.path.basename(hp.save_path())] = \ [s for s in hp.external_stylesheets + [hp.stylesheet, hp.font_css, hp.override_css] if s is not None] logging.getLogger('html2epub').debug('Saving stylesheets...') if opts.base_font_size2 > 0: Rationalizer.remove_font_size_information(stylesheets.values()) for path, css in stylesheets.items(): open(path, 'wb').write(getattr(css, 'cssText', css).encode('utf-8')) if toc.count('chapter') > opts.toc_threshold: toc.purge(['file', 'link', 'unknown']) if toc.count('chapter') + toc.count('file') > opts.toc_threshold: toc.purge(['link', 'unknown']) toc.purge(['link'], max=opts.max_toc_links) return resource_map, hp.htmlfile_map, toc, stylesheet_map
fce9c872517d4774c54339f5d38b589e073f1027 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9125/fce9c872517d4774c54339f5d38b589e073f1027/from_html.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 1745, 12, 7540, 5449, 16, 1500, 16, 268, 1214, 4672, 1140, 18, 81, 9477, 10539, 12, 538, 18, 803, 18, 5701, 12, 88, 1214, 16, 296, 1745, 2187, 296, 4683, 26112, 1058, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 1745, 12, 7540, 5449, 16, 1500, 16, 268, 1214, 4672, 1140, 18, 81, 9477, 10539, 12, 538, 18, 803, 18, 5701, 12, 88, 1214, 16, 296, 1745, 2187, 296, 4683, 26112, 1058, 67, 1...
def quiter(ctx, args, this): global interactive interactive = False
def quiter(ctx, args, this): global interactive interactive = False
bd19b42ca09ea480e52dc53b0497f6b27d555c95 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6934/bd19b42ca09ea480e52dc53b0497f6b27d555c95/js_interactive.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 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, 0, 0, 0, 0, 0, 0, ...
[ 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, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 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, -100, -100, -100, -100, ...
if (not PyUnicode_Check(result)):
if (not isinstance(result,unicode)):
def PyUnicode_Decode(s,size,encoding,errors): if (encoding == None): encoding = PyUnicode_GetDefaultEncoding()
0e540b97b49394c1d38eed66d9b3eec5969d6c9a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/0e540b97b49394c1d38eed66d9b3eec5969d6c9a/unicodecodec.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4707, 16532, 67, 6615, 12, 87, 16, 1467, 16, 5999, 16, 4324, 4672, 225, 309, 261, 5999, 422, 599, 4672, 2688, 273, 4707, 16532, 67, 967, 1868, 4705, 1435, 225, 2, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4707, 16532, 67, 6615, 12, 87, 16, 1467, 16, 5999, 16, 4324, 4672, 225, 309, 261, 5999, 422, 599, 4672, 2688, 273, 4707, 16532, 67, 967, 1868, 4705, 1435, 225, 2, -100, -100, -100, -10...
el1 = etree.SubElement(root, 'dc:creator')
el1 = SubElement(root, 'dc:creator')
def create_meta(self): root = etree.Element('office:document-meta', attrib=META_NAMESPACE_DICT) doc = etree.ElementTree(root) root = etree.SubElement(root, 'office:meta') el1 = etree.SubElement(root, 'meta:generator') el1.text = 'Docutils/rst2odf.py/%s' % (VERSION, ) s1 = os.environ.get('USER', '') el1 = etree.SubElement(root, 'meta:initial-creator') el1.text = s1 s2 = time.strftime('%Y-%m-%dT%H:%M:%S', time.localtime()) el1 = etree.SubElement(root, 'meta:creation-date') el1.text = s2 el1 = etree.SubElement(root, 'dc:creator') el1.text = s1 el1 = etree.SubElement(root, 'dc:date') el1.text = s2 el1 = etree.SubElement(root, 'dc:language') el1.text = 'en-US' el1 = etree.SubElement(root, 'meta:editing-cycles') el1.text = '1' el1 = etree.SubElement(root, 'meta:editing-duration') el1.text = 'PT00M01S' title = self.visitor.get_title() el1 = etree.SubElement(root, 'dc:title') if title: el1.text = title else: el1.text = '[no title]' s1 = etree.tostring(doc) #doc = minidom.parseString(s1) #s1 = doc.toprettyxml(' ') return s1
57ceb741b8ea9b94d9b9e314a03912d12bd3c5c5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1278/57ceb741b8ea9b94d9b9e314a03912d12bd3c5c5/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 3901, 12, 2890, 4672, 1365, 273, 12031, 18, 1046, 2668, 19789, 30, 5457, 17, 3901, 2187, 5885, 33, 19294, 67, 11368, 67, 31456, 13, 997, 273, 12031, 18, 1046, 2471, 12, 3085, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 3901, 12, 2890, 4672, 1365, 273, 12031, 18, 1046, 2668, 19789, 30, 5457, 17, 3901, 2187, 5885, 33, 19294, 67, 11368, 67, 31456, 13, 997, 273, 12031, 18, 1046, 2471, 12, 3085, ...
def resolve_internal_targets(self): """ Given:: <paragraph> <reference refname="direct internal"> direct internal <target id="id1" name="direct internal"> The "refname" attribute is replaced by "refid" linking to the target's "id":: <paragraph> <reference refid="id1"> direct internal <target id="id1" name="direct internal"> """
class InternalTargets(Transform): """ Given:: <paragraph> <reference refname="direct internal"> direct internal <target id="id1" name="direct internal"> The "refname" attribute is replaced by "refid" linking to the target's "id":: <paragraph> <reference refid="id1"> direct internal <target id="id1" name="direct internal"> """ default_priority = 660 def apply(self):
def resolve_internal_targets(self): """ Given::
8f79e17adb34ec6ac6e9aef23e7b146a9221ec29 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8194/8f79e17adb34ec6ac6e9aef23e7b146a9221ec29/references.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2245, 67, 7236, 67, 11358, 12, 2890, 4672, 3536, 16803, 2866, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2245, 67, 7236, 67, 11358, 12, 2890, 4672, 3536, 16803, 2866, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
try: val = `val` if len(val) > maxwidth: val = val[:maxwidth-3] + '...' val = self._text_to_latex(val, 1, 1)
try: val = `val`
def _pprint_var_value(self, var, maxwidth=100): val = var.uid().value() try: val = `val` if len(val) > maxwidth: val = val[:maxwidth-3] + '...' val = self._text_to_latex(val, 1, 1) except: val = '...' return '\\texttt{%s}' % val
f84aee6945de1bd0d9a58c39dc9c17b7755e8f52 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/f84aee6945de1bd0d9a58c39dc9c17b7755e8f52/latex.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 84, 1188, 67, 1401, 67, 1132, 12, 2890, 16, 569, 16, 943, 2819, 33, 6625, 4672, 1244, 273, 569, 18, 1911, 7675, 1132, 1435, 775, 30, 1244, 273, 1375, 1125, 68, 1335, 30, 1244, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 84, 1188, 67, 1401, 67, 1132, 12, 2890, 16, 569, 16, 943, 2819, 33, 6625, 4672, 1244, 273, 569, 18, 1911, 7675, 1132, 1435, 775, 30, 1244, 273, 1375, 1125, 68, 1335, 30, 1244, 2...
'process_type_id' :fields.many2one('change.process.type','Type Change'),
'process_type_id' :fields.many2one('document.change.process.type','Type Change'),
def _latestmodification(self, cr, uid, ids, field_name, arg, context={}): res = {} #TODOto calculate latest modified date from all related documents return res
0fee286988daca3188403f8491e42faad892fccb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/0fee286988daca3188403f8491e42faad892fccb/document_change.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 13550, 31064, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 652, 67, 529, 16, 1501, 16, 819, 12938, 4672, 400, 273, 2618, 468, 6241, 869, 4604, 4891, 4358, 1509, 628, 777, 3746, 742...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 389, 13550, 31064, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 652, 67, 529, 16, 1501, 16, 819, 12938, 4672, 400, 273, 2618, 468, 6241, 869, 4604, 4891, 4358, 1509, 628, 777, 3746, 742...
file.Write("namespace command_buffer {\n")
file.Write("namespace gpu {\n")
def WriteNamespaceOpen(self, file): """Writes the code for the namespace.""" file.Write("namespace command_buffer {\n") file.Write("namespace gles2 {\n") file.Write("\n")
a7a27ace0760f1ed19016822a45c6ec5300e861c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9392/a7a27ace0760f1ed19016822a45c6ec5300e861c/build_gles2_cmd_buffer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2598, 3402, 3678, 12, 2890, 16, 585, 4672, 3536, 8368, 326, 981, 364, 326, 1981, 12123, 585, 18, 3067, 2932, 4937, 21810, 18890, 82, 7923, 585, 18, 3067, 2932, 4937, 314, 1040, 22, 18890...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2598, 3402, 3678, 12, 2890, 16, 585, 4672, 3536, 8368, 326, 981, 364, 326, 1981, 12123, 585, 18, 3067, 2932, 4937, 21810, 18890, 82, 7923, 585, 18, 3067, 2932, 4937, 314, 1040, 22, 18890...
url = string.strip(url)
url = url.strip()
def unwrap(url): """unwrap('<URL:type://host/path>') --> 'type://host/path'.""" url = string.strip(url) if url[:1] == '<' and url[-1:] == '>': url = string.strip(url[1:-1]) if url[:4] == 'URL:': url = string.strip(url[4:]) return url
71b965f6e0b5f68cbaa0e8ee02f092736e43e951 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/71b965f6e0b5f68cbaa0e8ee02f092736e43e951/urllib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11014, 12, 718, 4672, 3536, 318, 4113, 2668, 32, 1785, 30, 723, 2207, 2564, 19, 803, 1870, 13, 15431, 296, 723, 2207, 2564, 19, 803, 11, 12123, 880, 273, 880, 18, 6406, 1435, 309, 880,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11014, 12, 718, 4672, 3536, 318, 4113, 2668, 32, 1785, 30, 723, 2207, 2564, 19, 803, 1870, 13, 15431, 296, 723, 2207, 2564, 19, 803, 11, 12123, 880, 273, 880, 18, 6406, 1435, 309, 880,...
INPUT::
INPUT:
def HyperStarGraph(self,n,k): r''' Returns the hyper-star graph HS(n,k). The vertices of the hyper-star graph are the set of binary strings of length n which contain k 1s. Two vertices, u and v, are adjacent only if u can be obtained from v by swapping the first bit with a different symbol in another position. INPUT:: - ``n`` - ``k`` EXAMPLES:: sage: g = graphs.HyperStarGraph(6,3) sage: g.plot() # long time REFERENCES: - Lee, Hyeong-Ok, Jong-Seok Kim, Eunseuk Oh, and Hyeong-Seok Lim. "Hyper-Star Graph: A New Interconnection Network Improving the Network Cost of the Hypercube." In Proceedings of the First EurAsian Conference on Information and Communication Technology, 858-865. Springer-Verlag, 2002. AUTHORS: - Michael Yurko (2009-09-01)
8a1fde824a0f61c02dc074d7262b217e10a072d2 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/8a1fde824a0f61c02dc074d7262b217e10a072d2/graph_generators.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 18274, 18379, 4137, 12, 2890, 16, 82, 16, 79, 4672, 436, 26418, 2860, 326, 9512, 17, 10983, 2667, 670, 55, 12, 82, 16, 79, 2934, 225, 1021, 6928, 434, 326, 9512, 17, 10983, 2667, 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, 18274, 18379, 4137, 12, 2890, 16, 82, 16, 79, 4672, 436, 26418, 2860, 326, 9512, 17, 10983, 2667, 670, 55, 12, 82, 16, 79, 2934, 225, 1021, 6928, 434, 326, 9512, 17, 10983, 2667, 854, ...
print 'Starting depth %s at %0.2f' % (depth, time())
def go (queue): """ Finds and prints the best move from the current position """ searchLock.acquire() try: queue.put(None) # TODO: Length info should be put in the book. # Btw. 10 is not enough. Try 20 if len(board.history) < 14: movestr = getBestOpening(board) if movestr: mvs = [parseSAN(board, movestr)] if len(board.history) >= 14 or not movestr: global mytime, increment, scr lsearch.searching = True if mytime == None: mvs, scr = alphaBeta (board, sd) else: # We bet that the game will be about 40 moves. That gives us # starttime / 40 seconds per turn + the incremnt. # TODO: Create more sophisticated method. if mytime <= 60: usetime = float(mytime) / 30 else: usetime = float(mytime) / max((40-len(board.history)/2), 2) usetime = max (usetime, 0.5) # We don't wan't to search for e.g. 0 secs starttime = time() lsearch.endtime = starttime + usetime prevtime = 0 print "Time left: %3.2f seconds; Plan to thinking for %3.2f seconds; Endtime at %0.2f" % \ (mytime, usetime, lsearch.endtime) for depth in range(1, sd+1): # Heuristic time saving # Don't waste time, if the estimated isn't enough to complete next depth if usetime > prevtime*4 or usetime <= 1: print 'Starting depth %s at %0.2f' % (depth, time()) lsearch.timecheck_counter = lsearch.TIMECHECK_FREQ search_result = alphaBeta(board, depth) if lsearch.searching: mvs, scr = search_result if time() > lsearch.endtime: print 'Endtime occured after depth %s' % depth break else: print 'Endtime occured in depth %s' % depth break prevtime = time()-starttime - prevtime else: print 'Not enough time for depth %s' % depth break print 'Move at %0.1f' % time() mytime -= time() - starttime mytime += increment if not mvs: if not lsearch.searching: # We were interupted lsearch.movesearches = 0 lsearch.nodes = 0 searchLock.release() return if lsearch.last == 4: print "resign" else: if scr == 0: print "result", reprResult[DRAW] elif scr < 0: if board.color == WHITE: print "result", reprResult[BLACKWON] else: print "result", reprResult[WHITEWON] else: if board.color == WHITE: print "result", reprResult[WHITEWON] else: print "result", reprResult[BLACKWON] print "last:", lsearch.last, scr return print "moves were:", " ".join(listToSan(board, mvs)), scr lsearch.movesearches = 0 lsearch.nodes = 0 lsearch.searching = False move = mvs[0] print "move", toSAN(board, move) board.applyMove(move) finally: searchLock.release()
6195ab01b21d419f1148d6c07190f7630a4d17fb /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5339/6195ab01b21d419f1148d6c07190f7630a4d17fb/PyChess.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1960, 261, 4000, 4672, 3536, 4163, 87, 471, 14971, 326, 3796, 3635, 628, 326, 783, 1754, 3536, 1623, 2531, 18, 1077, 1039, 1435, 775, 30, 2389, 18, 458, 12, 7036, 13, 468, 2660, 30, 11...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1960, 261, 4000, 4672, 3536, 4163, 87, 471, 14971, 326, 3796, 3635, 628, 326, 783, 1754, 3536, 1623, 2531, 18, 1077, 1039, 1435, 775, 30, 2389, 18, 458, 12, 7036, 13, 468, 2660, 30, 11...
Draw a frame made of 3D rulers, with major and minor ticks.
Draw a frame made of 3-D rulers, with major and minor ticks.
def ruler_frame(lower_left, upper_right, ticks=4, sub_ticks=4, **kwds): """ Draw a frame made of 3D rulers, with major and minor ticks. INPUT: - ``lower_left`` - the lower left corner of the frame, as a list, tuple, or vector - ``upper_right`` - the upper right corner of the frame, as a list, tuple, or vector - ``ticks`` - (default: 4) the number of major ticks shown on each ruler - ``sub_ticks`` - (default: 4) the number of shown subdivisions between each major tick Type ``line3d.options`` for a dictionary of the default options for lines which are also available. EXAMPLES: A ruler frame:: sage: from sage.plot.plot3d.shapes2 import ruler_frame sage: F = ruler_frame([1,2,3],vector([2,3,4])); F A ruler frame with some options:: sage: F = ruler_frame([1,2,3],vector([2,3,4]),ticks=6, sub_ticks=2, color='red'); F """ return ruler(lower_left, (upper_right[0], lower_left[1], lower_left[2]), ticks=ticks, sub_ticks=sub_ticks, absolute=True, **kwds) \ + ruler(lower_left, (lower_left[0], upper_right[1], lower_left[2]), ticks=ticks, sub_ticks=sub_ticks, absolute=True, **kwds) \ + ruler(lower_left, (lower_left[0], lower_left[1], upper_right[2]), ticks=ticks, sub_ticks=sub_ticks, absolute=True, **kwds)
25144c93b092a09ccf947d595af3b9e9d463ccf2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/25144c93b092a09ccf947d595af3b9e9d463ccf2/shapes2.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 436, 17040, 67, 3789, 12, 8167, 67, 4482, 16, 3854, 67, 4083, 16, 13003, 33, 24, 16, 720, 67, 11767, 33, 24, 16, 2826, 25577, 4672, 3536, 10184, 279, 2623, 7165, 434, 890, 17, 40, 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, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 436, 17040, 67, 3789, 12, 8167, 67, 4482, 16, 3854, 67, 4083, 16, 13003, 33, 24, 16, 720, 67, 11767, 33, 24, 16, 2826, 25577, 4672, 3536, 10184, 279, 2623, 7165, 434, 890, 17, 40, 43...
return {'H1':[],'H2':[],'L1':[],'H1H2':[], \ 'H1L1':[],'H2L1':[],'H1H2L1':[]}
return {'H1':[],'H2':[],'L1':[],'V1':[],'H1H2':[], 'H1L1':[],'H2L1':[], \ 'H1V1':[],'H2V1':[],'L1V1':[],'H1H2L1':[],'H1H2V1':[], \ 'H1L1V1':[],'H2L1V1':[],'H1H2L1V1':[]}
def ifoDict(self): return {'H1':[],'H2':[],'L1':[],'H1H2':[], \ 'H1L1':[],'H2L1':[],'H1H2L1':[]}
bbfb9d5951b943975f4b18b4cf9f16aff1996eaa /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3592/bbfb9d5951b943975f4b18b4cf9f16aff1996eaa/fu_utils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 21479, 5014, 12, 2890, 4672, 327, 13666, 44, 21, 4278, 63, 6487, 11, 44, 22, 4278, 63, 6487, 11, 48, 21, 4278, 63, 6487, 11, 44, 21, 44, 22, 4278, 63, 6487, 521, 296, 44, 21, 48, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 21479, 5014, 12, 2890, 4672, 327, 13666, 44, 21, 4278, 63, 6487, 11, 44, 22, 4278, 63, 6487, 11, 48, 21, 4278, 63, 6487, 11, 44, 21, 44, 22, 4278, 63, 6487, 521, 296, 44, 21, 48, ...
return self.__disk.delete_all()
if self.__disk.delete_all(): self._refreshPartitions = True return True else: return False
def deleteAllPartitions(self): """Removes and destroys all Partitions in this Disk.""" return self.__disk.delete_all()
6c5023786f21173a96a177fedf7b1e979538307b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5978/6c5023786f21173a96a177fedf7b1e979538307b/disk.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 27283, 13738, 12, 2890, 4672, 3536, 6220, 471, 1570, 28599, 777, 6393, 5029, 316, 333, 12951, 12123, 327, 365, 16186, 10863, 18, 3733, 67, 454, 1435, 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, 0, 0, 0, 0, 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, 27283, 13738, 12, 2890, 4672, 3536, 6220, 471, 1570, 28599, 777, 6393, 5029, 316, 333, 12951, 12123, 327, 365, 16186, 10863, 18, 3733, 67, 454, 1435, 2, -100, -100, -100, -100, -100, -100,...
kernel.build_timed(threads, output = logfile)
kernel.build_timed(threads, output=logfile)
def execute(self, iterations = 1, threads = None, dir = None, version = None): if not threads: threads = self.job.cpu_count()*2 if dir: build_dir = dir else: build_dir = os.path.join(self.tmpdir, "src") if not os.path.exists(build_dir): os.makedirs(build_dir)
c165c11c6c397f0e290ddf6858a3e6d088599bf5 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10349/c165c11c6c397f0e290ddf6858a3e6d088599bf5/kernbench.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1836, 12, 2890, 16, 11316, 273, 404, 16, 7403, 273, 599, 16, 1577, 273, 599, 16, 1177, 273, 599, 4672, 309, 486, 7403, 30, 7403, 273, 365, 18, 4688, 18, 11447, 67, 1883, 1435, 14, 22...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1836, 12, 2890, 16, 11316, 273, 404, 16, 7403, 273, 599, 16, 1577, 273, 599, 16, 1177, 273, 599, 4672, 309, 486, 7403, 30, 7403, 273, 365, 18, 4688, 18, 11447, 67, 1883, 1435, 14, 22...
import gui
def main(): """NVDA's core main loop.
9b9bf7c5411b3f6b8906ee86a76346702a65bdfc /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9340/9b9bf7c5411b3f6b8906ee86a76346702a65bdfc/core.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 3536, 11679, 9793, 1807, 2922, 2774, 2798, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 3536, 11679, 9793, 1807, 2922, 2774, 2798, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
stdout_thread.setDaemon(True)
stdout_thread.set_daemon(True)
def _communicate(self, input): stdout = None # Return stderr = None # Return
d0e8e83cfbcadb18e751fb2a4229c0e51df93456 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12029/d0e8e83cfbcadb18e751fb2a4229c0e51df93456/subprocess.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5702, 318, 2659, 12, 2890, 16, 810, 4672, 3909, 273, 599, 468, 2000, 4514, 273, 599, 468, 2000, 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, 389, 5702, 318, 2659, 12, 2890, 16, 810, 4672, 3909, 273, 599, 468, 2000, 4514, 273, 599, 468, 2000, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
elif sys.platform[:5] == "hp-ux":
elif sys.platform[:5] == "hp-ux":
def runtime_library_dir_option(self, dir): # XXX Hackish, at the very least. See Python bug #445902: # http://sourceforge.net/tracker/index.php # ?func=detail&aid=445902&group_id=5470&atid=105470 # Linkers on different platforms need different options to # specify that directories need to be added to the list of # directories searched for dependencies when a dynamic library # is sought. GCC has to be told to pass the -R option through # to the linker, whereas other compilers just know this. # Other compilers may need something slightly different. At # this time, there's no way to determine this information from # the configuration data stored in the Python installation, so # we use this hack. compiler = os.path.basename(sysconfig.get_config_var("CC")) if sys.platform[:6] == "darwin": # MacOSX's linker doesn't understand the -R flag at all return "-L" + dir elif sys.platform[:5] == "hp-ux": return "+s -L" + dir elif compiler[:3] == "gcc" or compiler[:3] == "g++": return "-Wl,-R" + dir else: return "-R" + dir
b27cf34f04461c30d60bc807c118537b02bf010a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/b27cf34f04461c30d60bc807c118537b02bf010a/unixccompiler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3099, 67, 12083, 67, 1214, 67, 3482, 12, 2890, 16, 1577, 4672, 468, 11329, 670, 484, 1468, 16, 622, 326, 8572, 4520, 18, 225, 2164, 6600, 7934, 468, 6334, 6162, 3103, 30, 468, 1062, 22...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3099, 67, 12083, 67, 1214, 67, 3482, 12, 2890, 16, 1577, 4672, 468, 11329, 670, 484, 1468, 16, 622, 326, 8572, 4520, 18, 225, 2164, 6600, 7934, 468, 6334, 6162, 3103, 30, 468, 1062, 22...
if self.category == 'BUG':
if self.category == tr('BUG'):
def type(self): if self.category == 'BUG': return 0 elif self.category == 'STUCK': return 1 elif self.category == 'GAMEPLAY': return 2 else: return 3
d8b7b7c1b9e926bd4732e104ef67fe1e1cc770bf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/d8b7b7c1b9e926bd4732e104ef67fe1e1cc770bf/pages.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 618, 12, 2890, 4672, 309, 365, 18, 4743, 422, 433, 2668, 4827, 11, 4672, 327, 374, 1327, 365, 18, 4743, 422, 296, 882, 57, 3507, 4278, 327, 404, 1327, 365, 18, 4743, 422, 296, 43, 16...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 618, 12, 2890, 4672, 309, 365, 18, 4743, 422, 433, 2668, 4827, 11, 4672, 327, 374, 1327, 365, 18, 4743, 422, 296, 882, 57, 3507, 4278, 327, 404, 1327, 365, 18, 4743, 422, 296, 43, 16...
if debug: print 'Next end tag found at ' + str(pos + next_end_tag.start())
if debug: print "Next end tag found at " + str(pos + next_end_tag.start())
def get_table(text): pos = 0 # find first start tag first_start_tag = re.search(startR, text) if not first_start_tag: if debug: print 'No table found' pass else: if debug: print 'First start tag found at ' + str(first_start_tag.start()) pos = first_start_tag.end() table_level = 1 remaining_text = text while table_level != 0: remaining_text = text[pos:] next_start_tag = re.search(startR, remaining_text, pos) next_end_tag = re.search(endR, remaining_text, pos) if not next_end_tag: if debug: print 'Error: missing end tag' pass if next_start_tag and next_start_tag.start() < next_end_tag.start(): if debug: print 'Next start tag found at ' + str(pos + next_start_tag.start()) pos += next_start_tag.end() table_level += 1 if debug: print 'Table level is ' + str(table_level) else: if debug: print 'Next end tag found at ' + str(pos + next_end_tag.start()) pos += next_end_tag.end() table_level -= 1 if debug: print 'Table level is ' + str(table_level) if debug: print 'Table starts at ' + str(first_start_tag.start()) + ' and ends at ' + str(pos) if debug: print text[first_start_tag.start():pos] return text[first_start_tag.start():pos]
4fdfce26072f0411d6e124ab82fef024a3154034 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4404/4fdfce26072f0411d6e124ab82fef024a3154034/copy_table.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 2121, 12, 955, 4672, 949, 273, 374, 468, 1104, 1122, 787, 1047, 1122, 67, 1937, 67, 2692, 273, 283, 18, 3072, 12, 1937, 54, 16, 977, 13, 309, 486, 1122, 67, 1937, 67, 2692, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 2121, 12, 955, 4672, 949, 273, 374, 468, 1104, 1122, 787, 1047, 1122, 67, 1937, 67, 2692, 273, 283, 18, 3072, 12, 1937, 54, 16, 977, 13, 309, 486, 1122, 67, 1937, 67, 2692, ...
'WHERE name = %s' \
'WHERE name = %s ' \
def import_record(self, model, values, fs_id):
ba7282c405a39811a159dd8edfcee9f6702fe8d6 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9266/ba7282c405a39811a159dd8edfcee9f6702fe8d6/convert.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1930, 67, 3366, 12, 2890, 16, 938, 16, 924, 16, 2662, 67, 350, 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, ...
[ 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, 1930, 67, 3366, 12, 2890, 16, 938, 16, 924, 16, 2662, 67, 350, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
def setEndExecTime(self,jobID,endDate=None):
def setEndExecTime( self, jobID, endDate = None ):
def setEndExecTime(self,jobID,endDate=None): """ Set EndExecTime time stamp """
99c1bc850ba087890925b3180df206f65bb1d4b3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/99c1bc850ba087890925b3180df206f65bb1d4b3/JobDB.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 19743, 1905, 950, 12, 365, 16, 28913, 16, 13202, 273, 599, 262, 30, 3536, 1000, 4403, 1905, 950, 813, 14429, 3536, 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, 19743, 1905, 950, 12, 365, 16, 28913, 16, 13202, 273, 599, 262, 30, 3536, 1000, 4403, 1905, 950, 813, 14429, 3536, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
txt = self.doc.createTextNode(datas[atr['value']].decode('utf-8'))
txt = self.doc.createTextNode(datas[atr['value']])
def parse_result_tree(node, parent, datas): if node.nodeType == node.ELEMENT_NODE: el = self.doc.createElement(node.localName) parent.appendChild(el) atr = self.node_attrs_get(node) if 'value' in atr: if not isinstance(datas[atr['value']], (str, unicode)): txt = self.doc.createTextNode(str(datas[atr['value']])) else: txt = self.doc.createTextNode(datas[atr['value']].decode('utf-8')) el.appendChild(txt) else: el_cld = node.firstChild while el_cld: parse_result_tree(el_cld, el, datas) el_cld = el_cld.nextSibling elif node.nodeType==node.TEXT_NODE: el = self.doc.createTextNode(node.nodeValue) parent.appendChild(el) else: pass
a1072bed43b4612a810b9ac3dc5cb190ee487e1d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/a1072bed43b4612a810b9ac3dc5cb190ee487e1d/print_xml.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 2088, 67, 3413, 12, 2159, 16, 982, 16, 5386, 4672, 309, 756, 18, 2159, 559, 422, 756, 18, 10976, 67, 8744, 30, 415, 273, 365, 18, 2434, 18, 2640, 1046, 12, 2159, 18, 3729, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 2088, 67, 3413, 12, 2159, 16, 982, 16, 5386, 4672, 309, 756, 18, 2159, 559, 422, 756, 18, 10976, 67, 8744, 30, 415, 273, 365, 18, 2434, 18, 2640, 1046, 12, 2159, 18, 3729, ...
if not self.results:
if (self.results == None):
def getunread(self): if not self.results: self.scan() return self.unread
6948f718ab847aa74edb0d4bd19dc64968411422 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3083/6948f718ab847aa74edb0d4bd19dc64968411422/vfolder.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 318, 896, 12, 2890, 4672, 309, 261, 2890, 18, 4717, 422, 599, 4672, 365, 18, 9871, 1435, 327, 365, 18, 318, 896, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 318, 896, 12, 2890, 4672, 309, 261, 2890, 18, 4717, 422, 599, 4672, 365, 18, 9871, 1435, 327, 365, 18, 318, 896, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
if self.show_lyrics and self.lyrics_location != self.LYRICS_LOCATION_HOME:
if self.show_lyrics and self.lyrics_location != consts.LYRICS_LOCATION_HOME:
def prefs_window_response(self, window, response, prefsnotebook, exit_stop, win_ontop, display_art_combo, win_sticky, direntry, minimize, update_start, autoconnect, currentoptions, libraryoptions, titleoptions, currsongoptions1, currsongoptions2, crossfadecheck, crossfadespin, infopath_options, using_mpd_env_vars, prev_host, prev_port, prev_password): if response == gtk.RESPONSE_CLOSE: self.stop_on_exit = exit_stop.get_active() self.ontop = win_ontop.get_active() self.covers_pref = display_art_combo.get_active() self.sticky = win_sticky.get_active() if self.show_lyrics and self.lyrics_location != self.LYRICS_LOCATION_HOME: if not os.path.isdir(misc.file_from_utf8(self.musicdir[self.profile_num])): ui.show_msg(self.window, _("To save lyrics to the music file's directory, you must specify a valid music directory."), _("Music Dir Verification"), 'musicdirVerificationError', gtk.BUTTONS_CLOSE) # Set music_dir entry focused: prefsnotebook.set_current_page(0) direntry.grab_focus() return if self.show_covers and self.art_location != self.ART_LOCATION_HOMECOVERS: if not os.path.isdir(misc.file_from_utf8(self.musicdir[self.profile_num])): ui.show_msg(self.window, _("To save artwork to the music file's directory, you must specify a valid music directory."), _("Music Dir Verification"), 'musicdirVerificationError', gtk.BUTTONS_CLOSE) # Set music_dir entry focused: prefsnotebook.set_current_page(0) direntry.grab_focus() return self.minimize_to_systray = minimize.get_active() self.update_on_start = update_start.get_active() self.autoconnect = autoconnect.get_active() if self.currentformat != currentoptions.get_text(): self.currentformat = currentoptions.get_text() for column in self.current_treeview.get_columns(): self.current_treeview.remove_column(column) self.current.initialize_columns() self.current.update_format() if self.libraryformat != libraryoptions.get_text(): self.libraryformat = libraryoptions.get_text() self.library.library_browse(root=self.wd) if self.titleformat != titleoptions.get_text(): self.titleformat = titleoptions.get_text() self.update_wintitle() if (self.currsongformat1 != currsongoptions1.get_text()) or (self.currsongformat2 != currsongoptions2.get_text()): self.currsongformat1 = currsongoptions1.get_text() self.currsongformat2 = currsongoptions2.get_text() self.update_cursong() if self.window_owner: if self.ontop: self.window.set_keep_above(True) else: self.window.set_keep_above(False) if self.sticky: self.window.stick() else: self.window.unstick() self.xfade = crossfadespin.get_value_as_int() if crossfadecheck.get_active(): self.xfade_enabled = True if self.conn: mpdh.call(self.client, 'crossfade', self.xfade) else: self.xfade_enabled = False if self.conn: mpdh.call(self.client, 'crossfade', 0) if self.infofile_path != infopath_options.get_text(): self.infofile_path = os.path.expanduser(infopath_options.get_text()) if self.use_infofile: self.update_infofile() if not using_mpd_env_vars: if prev_host != self.host[self.profile_num] or prev_port != self.port[self.profile_num] or prev_password != self.password[self.profile_num]: # Try to connect if mpd connection info has been updated: ui.change_cursor(gtk.gdk.Cursor(gtk.gdk.WATCH)) self.mpd_connect(force=True) if self.as_enabled: gobject.idle_add(self.scrobbler.init) self.settings_save() self.populate_profiles_for_menu() ui.change_cursor(None) window.destroy()
7db37f4b4deed9563bae6ce768b1202d3a5e68f1 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2312/7db37f4b4deed9563bae6ce768b1202d3a5e68f1/main.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15503, 67, 5668, 67, 2740, 12, 2890, 16, 2742, 16, 766, 16, 15503, 24422, 16, 2427, 67, 5681, 16, 5657, 67, 1580, 556, 16, 2562, 67, 485, 67, 25053, 16, 5657, 67, 334, 13055, 16, 302...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15503, 67, 5668, 67, 2740, 12, 2890, 16, 2742, 16, 766, 16, 15503, 24422, 16, 2427, 67, 5681, 16, 5657, 67, 1580, 556, 16, 2562, 67, 485, 67, 25053, 16, 5657, 67, 334, 13055, 16, 302...
html_theme_options = {'stickysidebar':'true'}
html_theme_options = {'stickysidebar':'true','collapsiblesidebar':'true','rightsidebar':'false'}
def setup(app): from sphinx.highlighting import lexers from pygments.lexers.compiled import CppLexer lexers['cpp'] = CppLexer(tabsize=3) lexers['c++'] = CppLexer(tabsize=3) from pygments.lexers.agile import PythonLexer lexers['python'] = PythonLexer(tabsize=3) app.connect('source-read',fixSrc) app.connect('autodoc-skip-member',customExclude) app.connect('autodoc-process-signature',fixSignature) app.connect('autodoc-process-docstring',fixDocstring) app.add_description_unit('ystaticattr',None,objname='static attribute',indextemplate='pair: %s; static method',parse_node=parse_ystaticattr)
17254a8cd489eb47f98883f224b0f6c931c6c0e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2081/17254a8cd489eb47f98883f224b0f6c931c6c0e0/conf.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 12, 2910, 4672, 628, 26296, 18, 15978, 310, 1930, 5275, 414, 628, 2395, 75, 1346, 18, 4149, 414, 18, 19397, 1930, 385, 11858, 13356, 5275, 414, 3292, 4057, 84, 3546, 273, 385, 1185...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 12, 2910, 4672, 628, 26296, 18, 15978, 310, 1930, 5275, 414, 628, 2395, 75, 1346, 18, 4149, 414, 18, 19397, 1930, 385, 11858, 13356, 5275, 414, 3292, 4057, 84, 3546, 273, 385, 1185...
dst = thumbnail_dir + '/failed/pyimlib/'
dst = thumbnail_dir + '/failed/pyimlib2/'
def thumbnail_create(src, thumbnail_dir = ''): """ Create a freedesktop.org thumbnail. """ if thumbnail_dir: dst = thumbnail_dir + '/large/' if not os.path.isdir(dst): os.makedirs(dst, 0700) dst = dst + md5.md5('file://' + src).hexdigest() + '.' else: dst = _thumbnail_dir + md5.md5('file://' + src).hexdigest() + '.' if src.lower().endswith('jpg'): try: _Imlib2.epeg_thumbnail(src, dst + 'jpg', (256,256)) return dst + 'jpg' except IOError: pass try: _Imlib2.png_thumbnail(src, dst + 'png', (256,256)) return dst + 'png' except: # image is broken if thumbnail_dir: dst = thumbnail_dir + '/failed/pyimlib/' if not os.path.isdir(dst): os.makedirs(dst, 0700) dst = dst + md5.md5('file://' + src).hexdigest() + '.png' else: dst = _failed_dir + md5.md5('file://' + src).hexdigest() + '.png' _Imlib2.fail_thumbnail(src, dst) return dst
60c6ea02526356ad5e79eb15934abdab1dc9107d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/60c6ea02526356ad5e79eb15934abdab1dc9107d/Imlib2.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9134, 67, 2640, 12, 4816, 16, 9134, 67, 1214, 273, 875, 4672, 3536, 1788, 279, 28004, 281, 11869, 18, 3341, 9134, 18, 3536, 309, 9134, 67, 1214, 30, 3046, 273, 9134, 67, 1214, 397, 117...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9134, 67, 2640, 12, 4816, 16, 9134, 67, 1214, 273, 875, 4672, 3536, 1788, 279, 28004, 281, 11869, 18, 3341, 9134, 18, 3536, 309, 9134, 67, 1214, 30, 3046, 273, 9134, 67, 1214, 397, 117...
if len(line) >= 3: if (line[:3] == '"""' or line[:3] == "'''"): if line[-3:] == line[:3]: continue incomment = line[:3] continue if line[0] != '
if brackets <= 0 and line[0] not in (' break
def checkline(self, filename, lineno): """Return line number of first line at or after input argument such that if the input points to a 'def', the returned line number is the first non-blank/non-comment line to follow. If the input points to a blank or comment line, return 0. At end of file, also return 0."""
324b341bb176b2e1a3ded859d41ac23010744cc6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/324b341bb176b2e1a3ded859d41ac23010744cc6/pdb.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 1369, 12, 2890, 16, 1544, 16, 7586, 4672, 3536, 990, 980, 1300, 434, 1122, 980, 622, 578, 1839, 810, 1237, 4123, 716, 309, 326, 810, 3143, 358, 279, 296, 536, 2187, 326, 2106, 980...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1369, 12, 2890, 16, 1544, 16, 7586, 4672, 3536, 990, 980, 1300, 434, 1122, 980, 622, 578, 1839, 810, 1237, 4123, 716, 309, 326, 810, 3143, 358, 279, 296, 536, 2187, 326, 2106, 980...
if self.layer is None:
if self.layer is None or self.updating:
def gui_refresh(self, *args): if self.layer is None: return
30093beb2981ba47380749a3f1c597965f66f39e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11090/30093beb2981ba47380749a3f1c597965f66f39e/gvrasterpropdlg.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13238, 67, 9144, 12, 2890, 16, 380, 1968, 4672, 309, 365, 18, 6363, 353, 599, 578, 365, 18, 5533, 1776, 30, 327, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13238, 67, 9144, 12, 2890, 16, 380, 1968, 4672, 309, 365, 18, 6363, 353, 599, 578, 365, 18, 5533, 1776, 30, 327, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
return index_face_set(face_list, point_list, enclosed=True, center=center, size=size, aspect_ratio=[1,1,1], **kwds)
if 'aspect_ratio' not in kwds: kwds['aspect_ratio'] = [1,1,1] return index_face_set(face_list, point_list, enclosed=True, center=center, size=size, **kwds)
def tetrahedron(center=(0,0,0), size=1, **kwds): """ A 3d tetrahedron. INPUTS: center -- (default: (0,0,0)) size -- (default: 1) color -- a word that describes a color rgbcolor -- (r,g,b) with r, g, b between 0 and 1 that describes a color opacity -- (default: 1) if less than 1 then is transparent EXAMPLES: A default colored tetrahedron at the origin: sage: tetrahedron() A transparent green tetrahedron in front of a solid red one: sage: tetrahedron(opacity=0.8, color='green') + tetrahedron((-2,1,0),color='red') A translucent tetrahedron sharing space with a sphere: sage: tetrahedron(color='yellow',opacity=0.7) + sphere(r=.5, color='red') A big tetrahedron: sage: tetrahedron(size=10) A wide tetrahedron: sage: tetrahedron(aspect_ratio=[1,1,1]).scale((4,4,1)) A red and blue tetrahedron touching noses: sage: tetrahedron(color='red') + tetrahedron((0,0,-2)).scale([1,1,-1]) AUTHOR: -- Robert Bradshaw and William Stein """ RR = RDF one = RR(1) sqrt2 = RR(2).sqrt() sqrt6 = RR(6).sqrt() point_list = [(0,0,1), (2*sqrt2/3, 0, -one/3), ( -sqrt2/3, sqrt6/3, -one/3), ( -sqrt2/3, -sqrt6/3, -one/3)] face_list = [[0,1,2],[1,3,2],[0,2,3],[0,3,1]] return index_face_set(face_list, point_list, enclosed=True, center=center, size=size, aspect_ratio=[1,1,1], **kwds)
b07e23896f226c4ad242e2bff78468927abfdd39 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/b07e23896f226c4ad242e2bff78468927abfdd39/platonic.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 268, 30710, 18550, 1949, 12, 5693, 28657, 20, 16, 20, 16, 20, 3631, 963, 33, 21, 16, 2826, 25577, 4672, 3536, 432, 890, 72, 268, 30710, 18550, 1949, 18, 225, 12943, 55, 30, 4617, 1493,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 268, 30710, 18550, 1949, 12, 5693, 28657, 20, 16, 20, 16, 20, 3631, 963, 33, 21, 16, 2826, 25577, 4672, 3536, 432, 890, 72, 268, 30710, 18550, 1949, 18, 225, 12943, 55, 30, 4617, 1493,...
def _fix_legend(self, legend):
def _fix_latex(self, legend):
def _fix_legend(self, legend): """Enclose legend in $$ if latex syntax is detected.""" legend = legend.strip() if len(legend) >= 2 and legend[0] !='$' and legend[-1] != '$': chars = '\\', '^', '_' latex = False for c in chars: if c in legend: latex = True break if latex: legend = '$' + legend + '$' # fix sin, cos, exp, ln, log, etc: def _fix_func(func, newfunc, legend): if re.search(r'[^\\]'+func, legend): legend = legend.replace(func, '\\'+newfunc) return legend funcs = 'sin', 'cos', 'tan', 'exp', 'ln', 'log', \ 'sinh', 'cosh', 'tanh' for func in funcs: legend = _fix_func(func, func, legend) funcs = [('atan', 'arctan'), ('asin', 'arcsin'), ('acos', 'arccos'),] for func, newfunc in funcs: legend = _fix_func(func, newfunc, legend)
b042009462bcf36c413bbe6a4bcd923c6ff0dea7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4727/b042009462bcf36c413bbe6a4bcd923c6ff0dea7/matplotlib_.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 904, 67, 26264, 12, 2890, 16, 7241, 4672, 3536, 4280, 2061, 7241, 316, 5366, 309, 25079, 6279, 353, 8316, 12123, 7241, 273, 7241, 18, 6406, 1435, 309, 562, 12, 16292, 13, 1545, 576,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 904, 67, 26264, 12, 2890, 16, 7241, 4672, 3536, 4280, 2061, 7241, 316, 5366, 309, 25079, 6279, 353, 8316, 12123, 7241, 273, 7241, 18, 6406, 1435, 309, 562, 12, 16292, 13, 1545, 576,...
error_handler=log.err)
error_handler=d.errback)
def get_contact_cb(reply): reply = list(reply) self.assertIn(name, reply) self.assertIn(number, reply) self.assertIn(index, reply)
45c00959c14e666ef31b3f93137f14e6d66959e4 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12036/45c00959c14e666ef31b3f93137f14e6d66959e4/test_dbus.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 8994, 67, 7358, 12, 10629, 4672, 4332, 273, 666, 12, 10629, 13, 365, 18, 11231, 382, 12, 529, 16, 4332, 13, 365, 18, 11231, 382, 12, 2696, 16, 4332, 13, 365, 18, 11231, 382,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 336, 67, 8994, 67, 7358, 12, 10629, 4672, 4332, 273, 666, 12, 10629, 13, 365, 18, 11231, 382, 12, 529, 16, 4332, 13, 365, 18, 11231, 382, 12, 2696, 16, 4332, 13, 365, 18, 11231, 382,...
C{r.Create('%(localstatedir)s/log/acpid', mode=0640)} Demonstrates calling C{r.Create()} specifying the creation of C{%(localstatedir)s/log/acpid} with mode C{0640}.
C{r.MakeFIFO('/path/to/fifo', mode=0640)} Demonstrates calling C{r.MakeFIFO()} specifying the creation of C{/path/to/fifo} with mode C{0640}.
def do(self, macros): for arg in self.args: # specified license and file if isinstance(arg,tuple): if not os.path.isfile(arg[0]): raise RuntimeError, arg[0]+' is not a normal file' text = open(arg[0]).read() self.writeLicenses(text,arg[1])
ca4645f7069c3d8b2fb90cb718f3d09ca707561e /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8747/ca4645f7069c3d8b2fb90cb718f3d09ca707561e/build.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 12, 2890, 16, 24302, 4672, 364, 1501, 316, 365, 18, 1968, 30, 468, 1269, 8630, 471, 585, 309, 1549, 12, 3175, 16, 8052, 4672, 309, 486, 1140, 18, 803, 18, 291, 768, 12, 3175, 63...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 12, 2890, 16, 24302, 4672, 364, 1501, 316, 365, 18, 1968, 30, 468, 1269, 8630, 471, 585, 309, 1549, 12, 3175, 16, 8052, 4672, 309, 486, 1140, 18, 803, 18, 291, 768, 12, 3175, 63...
host = '127.0.0.1' port = 19999 while 1:
for i in range(NPORTS): trigger.portoffset = (trigger.portoffset + 1) % NPORTS port = MINPORT + trigger.portoffset address = (HOST, port)
def __init__(self): a = socket.socket(socket.AF_INET, socket.SOCK_STREAM) w = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
4ff0c9ad8086c2bdec7550cb4c139175ca92a708 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/4ff0c9ad8086c2bdec7550cb4c139175ca92a708/trigger.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 279, 273, 2987, 18, 7814, 12, 7814, 18, 6799, 67, 18819, 16, 2987, 18, 3584, 3507, 67, 13693, 13, 341, 273, 2987, 18, 7814, 12, 7814, 18, 6799, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 279, 273, 2987, 18, 7814, 12, 7814, 18, 6799, 67, 18819, 16, 2987, 18, 3584, 3507, 67, 13693, 13, 341, 273, 2987, 18, 7814, 12, 7814, 18, 6799, 67, 1...
'\\end_inset']
'\\end_inset']
def convert_pagebreaks(document): ' Convert inline Newpage insets to new format ' i = 0 while True: i = find_token(document.body, '\\newpage', i) if i == -1: break document.body[i:i+1] = ['\\begin_inset Newpage newpage', '\\end_inset'] i = 0 while True: i = find_token(document.body, '\\pagebreak', i) if i == -1: break document.body[i:i+1] = ['\\begin_inset Newpage pagebreak', '\\end_inset'] i = 0 while True: i = find_token(document.body, '\\clearpage', i) if i == -1: break document.body[i:i+1] = ['\\begin_inset Newpage clearpage', '\\end_inset'] i = 0 while True: i = find_token(document.body, '\\cleardoublepage', i) if i == -1: break document.body[i:i+1] = ['\\begin_inset Newpage cleardoublepage', '\\end_inset']
a97fbaa6858229f4bef56786ffb07688ef5a4d82 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7514/a97fbaa6858229f4bef56786ffb07688ef5a4d82/lyx_1_6.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1765, 67, 2433, 29292, 12, 5457, 4672, 296, 4037, 6370, 1166, 2433, 23576, 358, 394, 740, 296, 277, 273, 374, 1323, 1053, 30, 277, 273, 1104, 67, 2316, 12, 5457, 18, 3432, 16, 3718, 27...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1765, 67, 2433, 29292, 12, 5457, 4672, 296, 4037, 6370, 1166, 2433, 23576, 358, 394, 740, 296, 277, 273, 374, 1323, 1053, 30, 277, 273, 1104, 67, 2316, 12, 5457, 18, 3432, 16, 3718, 27...
recording.autoincrease = False
self.recording[self.selectedEntry].autoincrease = False
def TimeDateInputClosed(self, ret): if len(ret) > 1: if ret[0]: localendtime = localtime(ret[1]) print "stopping recording at", strftime("%c", localendtime) if self.recording[self.selectedEntry].end != ret[1]: recording.autoincrease = False self.recording[self.selectedEntry].end = ret[1] self.session.nav.RecordTimer.timeChanged(self.recording[self.selectedEntry])
0663e43025ddbeb02efc57343b10e1304681c290 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6652/0663e43025ddbeb02efc57343b10e1304681c290/InfoBarGenerics.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2647, 1626, 1210, 7395, 12, 2890, 16, 325, 4672, 309, 562, 12, 1349, 13, 405, 404, 30, 309, 325, 63, 20, 14542, 1191, 409, 957, 273, 1191, 957, 12, 1349, 63, 21, 5717, 1172, 315, 568...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2647, 1626, 1210, 7395, 12, 2890, 16, 325, 4672, 309, 562, 12, 1349, 13, 405, 404, 30, 309, 325, 63, 20, 14542, 1191, 409, 957, 273, 1191, 957, 12, 1349, 63, 21, 5717, 1172, 315, 568...
mypath = " ".join(mypath[:-1],"/")
mypath = "/".join(mypath[:-1])
def capture(self): if self.check_autoresume("capture"): msg("Resume point detected, skipping capture operation...") else: """ Capture target in a tarball """ mypath=self.settings["target_path"].split("/") """ Remove filename from path """ mypath = " ".join(mypath[:-1],"/")
c5f5c64a5045a6291b2be9dacbc6b837112b91e7 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7327/c5f5c64a5045a6291b2be9dacbc6b837112b91e7/generic_stage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7477, 12, 2890, 4672, 309, 365, 18, 1893, 67, 6079, 25158, 2932, 19250, 6, 4672, 1234, 2932, 20911, 1634, 8316, 16, 14195, 7477, 1674, 7070, 13, 469, 30, 3536, 18477, 1018, 316, 279, 294...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7477, 12, 2890, 4672, 309, 365, 18, 1893, 67, 6079, 25158, 2932, 19250, 6, 4672, 1234, 2932, 20911, 1634, 8316, 16, 14195, 7477, 1674, 7070, 13, 469, 30, 3536, 18477, 1018, 316, 279, 294...
array of indices with the same shape as a.
array of indices with the same shape as v.
def searchsorted(a, v, side='left'): """-> index array. Inserting v[i] before a[index[i]] maintains a in order. Required arguments: a -- sorted 1-D array to be searched. v -- array of keys to be searched for in a. Keyword arguments: side -- {'left', 'right'}, default('left'). Returns: array of indices with the same shape as a. The array to be searched must be 1-D and is assumed to be sorted in ascending order. The function call searchsorted(a, v, side='left') returns an index array with the same shape as v such that for each value i in the index and the corresponding key in v the following holds: a[j] < key <= a[i] for all j < i, If such an index does not exist, a.size() is used. Consequently, i is the index of the first item in 'a' that is >= key. If the key were to be inserted into a in the slot before the index i, then the order of a would be preserved and i would be the smallest index with that property. The function call searchsorted(a, v, side='right') returns an index array with the same shape as v such that for each value i in the index and the corresponding key in v the following holds: a[j] <= key < a[i] for all j < i, If such an index does not exist, a.size() is used. Consequently, i is the index of the first item in 'a' that is > key. If the key were to be inserted into a in the slot before the index i, then the order of a would be preserved and i would be the largest index with that property. """ try: searchsorted = a.searchsorted except AttributeError: return _wrapit(a, 'searchsorted', v, side) return searchsorted(v, side)
6481ff29ec06bce69814dc91dc310442029f0370 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/14925/6481ff29ec06bce69814dc91dc310442029f0370/fromnumeric.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1623, 10350, 12, 69, 16, 331, 16, 4889, 2218, 4482, 11, 4672, 3536, 2122, 770, 526, 18, 8040, 310, 331, 63, 77, 65, 1865, 279, 63, 1615, 63, 77, 13563, 11566, 4167, 279, 316, 1353, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1623, 10350, 12, 69, 16, 331, 16, 4889, 2218, 4482, 11, 4672, 3536, 2122, 770, 526, 18, 8040, 310, 331, 63, 77, 65, 1865, 279, 63, 1615, 63, 77, 13563, 11566, 4167, 279, 316, 1353, 1...
j = titleish(re.sub('</?b>', '', j))
j = titleish(re.sub('</?(b|strong)>(?i)', '', j))
def ParseOffOppPage(fr, gp): m = re.search('offoppose(\d+)_(\d+-\d+-\d+)', gp) (num, filedate) = m.groups() num = int(num) stime = '%02d:%02d' % (num/60, num%60) # Will break at 86,400 :) if num == 37 or num == 79: return "SKIPTHIS", None # Reshuffling #elif num == 38: # sdate = "2005-12-09" # Moved back to date of reshuffle #elif num == 80: # sdate = "2007-07-03" # Moved back to date of reshuffle elif num <= 64: frupdated = re.search('<td class="lastupdated">\s*Updated (.*?)(?:&nbsp;| )(.*?)\s*</td>', fr) if not frupdated: print "Failed to find lastupdated on:", gp lsudate = re.match("(\d\d)/(\d\d)/(\d\d\d\d)$", frupdated.group(1)) if lsudate: sdate = "%s-%s-%s" % (lsudate.group(3), lsudate.group(2), lsudate.group(1)) else: lsudate = re.match("(\d\d)/(\d\d)/(\d\d)$", frupdated.group(1)) y2k = int(lsudate.group(3)) < 50 and "20" or "19" # I don't think our records go back far enough to merit this! sdate = "%s%s-%s-%s" % (y2k, lsudate.group(3), lsudate.group(2), lsudate.group(1)) elif num <= 75: sdate = filedate else: frdate = re.search(">This list was last updated on\s+<(?:b|strong)>\s*(.*?)\s+<", fr) if not frdate: print num, filedate sys.exit() sdate = mx.DateTime.DateTimeFrom(frdate.group(1)).date # extract the alphabetical list if num <= 97: table = re.search("(?s)>HER MAJESTY&#39;S OFFICIAL OPPOSITION<(.*?)</table>", fr) else: table = re.search("(?si)>Her Majesty's\s+Official Opposition<(.*?)</table>", fr) list = re.split("</?tr>(?i)", table.group(1)) res = [ ] pos = '' dept = '' inothermins = False for row in list: cells = re.search('<td[^>]*>\s*(.*?)\s*</td>\s*(?:<td[^>]*>\s*(.*?)\s*</td>\s*)?<td[^>]*>\s*(.*?)\s*</td>(?si)', row) if not cells: continue j = cells.group(1) name = cells.group(3) responsibility = '' if j and j != '&nbsp;': if re.match('\(Also in', j): continue j = re.sub('(?i) \((Lords|Commons)\)', '', j) if (not name or name == '&nbsp;') and not re.search('Shadow Ministers', j): dept = titleish(re.sub('</?(font|b)[^>]*>', '', j)) if re.match('Opposition Whip', dept): dept = 'Whips' inothermins = False continue j = re.sub('<br>', ' ', j) j = re.sub('</?font[^>]*>', '', j) j = re.sub('&nbsp;|\s+', ' ', j) j = titleish(re.sub('</?b>', '', j)) if j=='Whips': j = 'Whip' resp = re.match('Shadow Minister for (.*)', j) if resp and inothermins: responsibility = resp.group(1) elif re.match('(Other)?\s*Shadow Ministers?\s*(\(|$)', j): pos = 'Shadow Minister' inothermins = True else: pos = j inothermins = False if not name or name == '&nbsp;' or re.search('vacant(?i)', name): continue name = re.sub("\s+\((until|also|as from) .*?\)", '', name) name = re.sub('\s+', ' ', re.sub('</?b>', '', name.replace('&nbsp;', ' '))) name = re.sub('</?font[^>]*>\s*', '', name) name = re.sub('Rt Hon the |Professor the |The ', '', name) # Don't care about non MP/Lord if name == 'Michael Bates' or re.search('Kulveer Ranger', name): continue names = re.split('\s*<br>\s*(?i)', name) names = [ re.sub('\s*(\*|\*\*|#)$', '', n) for n in names ] for name in names: # Done here instead of alias because two Baroness Morrises if name == 'Baroness Morris': name = 'Baroness Morris of Bolton' if re.search('Sayeeda Warsi', name): name = 'Baroness Warsi' ec = protooffice() ec.OffOppproto((sdate, stime), name, pos, dept, responsibility, "chgpages/offoppose") res.append(ec) return (sdate, stime), res
e6d15b30bbe196bbb3366f06ccd7c43a0171a891 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8428/e6d15b30bbe196bbb3366f06ccd7c43a0171a891/minpostparse.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2884, 7210, 3817, 84, 1964, 12, 4840, 16, 4178, 4672, 312, 273, 283, 18, 3072, 2668, 3674, 556, 4150, 4713, 72, 6975, 67, 4713, 72, 15, 6943, 72, 15, 6943, 72, 6975, 2187, 4178, 13, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2884, 7210, 3817, 84, 1964, 12, 4840, 16, 4178, 4672, 312, 273, 283, 18, 3072, 2668, 3674, 556, 4150, 4713, 72, 6975, 67, 4713, 72, 15, 6943, 72, 15, 6943, 72, 6975, 2187, 4178, 13, ...
_log('< %s' % line)
self._log('< %s' % line)
def _get_line(self): line = self._readline() if not line: raise self.abort('socket error: EOF') # Protocol mandates all lines terminated by CRLF line = line[:-2] if __debug__: if self.debug >= 4: _mesg('< %s' % line) else: _log('< %s' % line) return line
462597f79dfd214c27990197f9e742d00e0c9fed /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9777/462597f79dfd214c27990197f9e742d00e0c9fed/managesieve.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 1369, 12, 2890, 4672, 980, 273, 365, 6315, 896, 1369, 1435, 309, 486, 980, 30, 1002, 365, 18, 18623, 2668, 7814, 555, 30, 6431, 6134, 468, 4547, 312, 464, 815, 777, 2362,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 1369, 12, 2890, 4672, 980, 273, 365, 6315, 896, 1369, 1435, 309, 486, 980, 30, 1002, 365, 18, 18623, 2668, 7814, 555, 30, 6431, 6134, 468, 4547, 312, 464, 815, 777, 2362,...
2*5 + 2*5^2 + 4*5^3 + 3*5^4 + 5^5 + 3*5^7 + 2*5^8 + 4*5^9 + 2*5^10 + 2*5^11 + 5^12 + 5^14 + 3*5^15 + 5^16 + 4*5^18 + 4*5^19 + 5^20 + 3*5^21 + 2*5^22 + 2*5^23 + 5^24 + 5^25 + 3*5^27 + 2*5^28 + 4*5^29 + O(5^30)
2*5 + 2*5^2 + 4*5^3 + 3*5^4 + 5^5 + 3*5^7 + 2*5^8 + 4*5^9 + 2*5^10 + 2*5^11 + 5^12 + 5^14 + 3*5^15 + 5^16 + 4*5^18 + 4*5^19 + 5^20 + 3*5^21 + 2*5^22 + 2*5^23 + 5^24 + 5^25 + 3*5^27 + 2*5^28 + 3*5^29 + O(5^30) Check that results are consistent over a range of precision: sage: max_prec = 40 sage: p = 3 sage: K = pAdicField(p, max_prec) sage: full_log = (1 + p + O(p**max_prec)).log() sage: for prec in range(2, max_prec): ... assert (1 + p + O(p**prec)).log() == full_log AUTHORS: -- David Harvey (2006-09-13): corrected subtle precision bug (need to take denominators into account! -- see trac TODO: -- Surely there must exist an $O(N^{1+\epsilon})$ time algorithm for this? The current one is pretty much quadratic in the precision.
def log(self): r""" Compute the p-adic logarithm of any nonzero element of $\Q_p$. (See below for normalization.) The usual power series for log with values in the additive group of $\Q_p$ only converges for 1-units (units congruent to 1 modulo p). However, there is a unique extension of log to a homomorphism defined on all the units. If u = a*v is a unit with v = 1 (mod p), then we define log(u) = log(v). This is the correct extension because the units U of Z_p splits as a product U = V x <w>, where V is the subgroup of 1-units and w is a (p-1)st root of unity. The <w> factor is torsion, so must go to 0 under any homomorphism to the torsion free group $(\Q_p, +)$.
376368d00b58b0a2c4b9a9b77c4fa848862c2747 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9890/376368d00b58b0a2c4b9a9b77c4fa848862c2747/padic.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 613, 12, 2890, 4672, 436, 8395, 8155, 326, 293, 17, 20333, 613, 31249, 434, 1281, 16966, 930, 434, 271, 64, 53, 67, 84, 8, 18, 261, 9704, 5712, 364, 13728, 12998, 225, 1021, 25669, 721...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 613, 12, 2890, 4672, 436, 8395, 8155, 326, 293, 17, 20333, 613, 31249, 434, 1281, 16966, 930, 434, 271, 64, 53, 67, 84, 8, 18, 261, 9704, 5712, 364, 13728, 12998, 225, 1021, 25669, 721...
sage: J.basis()
sage: J.basis()
def basis(self): """ Return an immutable sequence of elements of this ideal (note: their parent is the number field) that form a basis for this ideal viewed as a ZZ-module.
bc4a4d2755a402e5fd9f962479b2ebb5e686adb6 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9417/bc4a4d2755a402e5fd9f962479b2ebb5e686adb6/number_field_ideal.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10853, 12, 2890, 4672, 3536, 2000, 392, 11732, 3102, 434, 2186, 434, 333, 23349, 261, 7652, 30, 3675, 982, 353, 326, 1300, 652, 13, 716, 646, 279, 10853, 364, 333, 23349, 1476, 329, 487,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10853, 12, 2890, 4672, 3536, 2000, 392, 11732, 3102, 434, 2186, 434, 333, 23349, 261, 7652, 30, 3675, 982, 353, 326, 1300, 652, 13, 716, 646, 279, 10853, 364, 333, 23349, 1476, 329, 487,...
if type==2: res += LazyExpression.slices2prettystring(self.slice,self.args[0].getDimensions()) else: res += LazyExpression.slices2string(self.slice)
res += LazyExpression.slices2prettystring(self.slice,self.args[0].getDimensions())
def getText(self,type=0,addparentheses=True): assert type>=0 and type<=2, 'Argument "type" must be 0, 1 or 2.' if type==0 or type==1: # Return the short name of the object (optionally with slice specification). res = self.args[0].getName() if self.slice!=None: if type==2: res += LazyExpression.slices2prettystring(self.slice,self.args[0].getDimensions()) else: res += LazyExpression.slices2string(self.slice) return res else: # Return the long name of the object (optionally with slice specification). res = self.args[0].getLongName() if self.slice!=None: if type==2: res += LazyExpression.slices2prettystring(self.slice,self.args[0].getDimensions()) else: res += LazyExpression.slices2string(self.slice) return res
7cd2a2d4dddc4c0f3964e3677772561675ef9a44 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/381/7cd2a2d4dddc4c0f3964e3677772561675ef9a44/plot.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6701, 12, 2890, 16, 723, 33, 20, 16, 1289, 13012, 7915, 281, 33, 5510, 4672, 1815, 618, 34, 33, 20, 471, 618, 32, 33, 22, 16, 296, 1379, 315, 723, 6, 1297, 506, 374, 16, 404, 578, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6701, 12, 2890, 16, 723, 33, 20, 16, 1289, 13012, 7915, 281, 33, 5510, 4672, 1815, 618, 34, 33, 20, 471, 618, 32, 33, 22, 16, 296, 1379, 315, 723, 6, 1297, 506, 374, 16, 404, 578, ...
workers.append(proc.spawn(stream.start, sdp_notification.local_sdp.media[index], sdp_notification.remote_sdp, index))
workers.append(proc.spawn(stream.start, sdp_notification.local_sdp, sdp_notification.remote_sdp, index))
def accept(self): assert self.state == 'INCOMING', self.state self.greenlet = api.getcurrent() ERROR = (500, None, 'local') # code, reason, originator self._set_state('ACCEPTING') streams = self.streams try: workers = [proc.spawn(stream.initialize, self) for stream in streams] proc.waitall(workers) workers = [] media = [stream.get_local_media(False) for stream in streams] remote_sdp = self.inv.get_offered_remote_sdp() local_ip = SIPSimpleSettings().local_ip.normalized local_sdp = SDPSession(local_ip, connection=SDPConnection(local_ip), media=media, start_time=remote_sdp.start_time, stop_time=remote_sdp.stop_time) self.inv.set_offered_local_sdp(local_sdp) self.start_time = datetime.datetime.now() confirmed_notification, sdp_notification = self.inv.accept_invite() for index, stream in enumerate(streams): workers.append(proc.spawn(stream.start, sdp_notification.local_sdp.media[index], sdp_notification.remote_sdp, index)) proc.waitall(workers) ERROR = None except: typ, exc, tb = sys.exc_info() ERROR = (500, str(exc) or str(typ.__name__), 'local') raise finally: self.greenlet = None if ERROR is None: self._set_state('ESTABLISHED') self.notification_center.post_notification("SIPSessionDidStart", self) else: code, reason, originator = ERROR if code is not None: data = TimestampedNotificationData(originator=originator, code=code, reason=reason) self.notification_center.post_notification("SIPSessionDidFail", self, data) proc.spawn_greenlet(self._terminate, code or 486) killall(workers, wait=False) for stream in streams: proc.spawn_greenlet(stream.end)
8bbd23515c32720a8942a54618e75e89143ff511 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3449/8bbd23515c32720a8942a54618e75e89143ff511/session2.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2791, 12, 2890, 4672, 1815, 365, 18, 2019, 422, 296, 706, 4208, 1360, 2187, 365, 18, 2019, 365, 18, 11571, 1810, 273, 1536, 18, 588, 2972, 1435, 5475, 273, 261, 12483, 16, 599, 16, 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, 2791, 12, 2890, 4672, 1815, 365, 18, 2019, 422, 296, 706, 4208, 1360, 2187, 365, 18, 2019, 365, 18, 11571, 1810, 273, 1536, 18, 588, 2972, 1435, 5475, 273, 261, 12483, 16, 599, 16, 296...
print 'fsme: ', fsme
def map_fs(fs, mp): """Try to map the filesystem to one of the env variables.""" for k in mp.keys(): if k == fs: return mp[k] # Failed exact path match, try to match to path by chopping off a component # from the end and replacing it with the username. This should deal with # the automounter wildcard mounts hopefully without accidentally matching # incorrectly. fschop = os.path.dirname(fs) fsme = os.path.join(fschop, os.getenv("LOGNAME")) print 'fsme: ', fsme foundme = False for line in open("/etc/mtab"): ls = line.split()[0] if ls == fsme: foundme = True if foundme: if fsme in mp.keys(): return mp[fsme] else: return fsme return fs
919978fe56451bf91a166f10200fc30ef36dfd96 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8733/919978fe56451bf91a166f10200fc30ef36dfd96/fysquota.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 852, 67, 2556, 12, 2556, 16, 6749, 4672, 3536, 7833, 358, 852, 326, 6496, 358, 1245, 434, 326, 1550, 3152, 12123, 364, 417, 316, 6749, 18, 2452, 13332, 309, 417, 422, 2662, 30, 327, 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, 852, 67, 2556, 12, 2556, 16, 6749, 4672, 3536, 7833, 358, 852, 326, 6496, 358, 1245, 434, 326, 1550, 3152, 12123, 364, 417, 316, 6749, 18, 2452, 13332, 309, 417, 422, 2662, 30, 327, 67...
""" Test cases for DaemonContext._make_signal_handler function """ def setUp(self): """ Set up test fixtures """
""" Test cases for DaemonContext._make_signal_handler function. """ def setUp(self): """ Set up test fixtures. """
def test_returns_empty_list_if_no_files(self): """ Should return empty list if no file options """ instance = self.test_instance for name in ['files_preserve', 'stdin', 'stdout', 'stderr']: setattr(instance, name, None) expect_result = [] result = instance._get_exclude_file_descriptors() self.failUnlessEqual(sorted(expect_result), sorted(result))
33a5bfc655a6417210c5c80d9f942714bf596533 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4939/33a5bfc655a6417210c5c80d9f942714bf596533/test_daemon.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 6154, 67, 5531, 67, 1098, 67, 430, 67, 2135, 67, 2354, 12, 2890, 4672, 3536, 9363, 327, 1008, 666, 309, 1158, 585, 702, 3536, 791, 273, 365, 18, 3813, 67, 1336, 364, 508, 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, 1842, 67, 6154, 67, 5531, 67, 1098, 67, 430, 67, 2135, 67, 2354, 12, 2890, 4672, 3536, 9363, 327, 1008, 666, 309, 1158, 585, 702, 3536, 791, 273, 365, 18, 3813, 67, 1336, 364, 508, 3...
if self.existsABetterSimilarProjection(i, allowedPercentOfEqualAttributes = percents):
if self.existsABetterSimilarProjection(i, allowedPercentOfEqualAttributes = allowedPercentOfEqualAttributes):
def removeTooSimilarProjections(self): (text, ok) = QInputDialog.getText('Qt Allowed Similarity', 'How many attributes can be present in some better projection for a projection to be still considered as different (in pecents. Default = 70)?') if not ok: return percents = int(str(text)) qApp.setOverrideCursor(QWidget.waitCursor) self.setStatusBarText("Removing similar projections") i=0 while i < self.resultList.count(): qApp.processEvents() if self.existsABetterSimilarProjection(i, allowedPercentOfEqualAttributes = percents): self.results.pop(i) self.shownResults.pop(i) self.resultList.removeItem(i) else: i += 1 self.setStatusBarText("") qApp.restoreOverrideCursor()
0e455036d7905fe252ea1c33a7b2b3eb0f3b722a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6366/0e455036d7905fe252ea1c33a7b2b3eb0f3b722a/OWkNNOptimization.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1206, 10703, 16891, 14789, 87, 12, 2890, 4672, 261, 955, 16, 1529, 13, 273, 2238, 1210, 6353, 18, 588, 1528, 2668, 23310, 16740, 22967, 560, 2187, 296, 44, 543, 4906, 1677, 848, 506, 343...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1206, 10703, 16891, 14789, 87, 12, 2890, 4672, 261, 955, 16, 1529, 13, 273, 2238, 1210, 6353, 18, 588, 1528, 2668, 23310, 16740, 22967, 560, 2187, 296, 44, 543, 4906, 1677, 848, 506, 343...
scope -- see the documentaion of this class.
scope -- see the documentation of this class.
def set_synthesis_voice(self, value, scope=Scope.SELF): """Set voice by its real name.
7c9633115d399a569dd8e2ac33c37854b07f2e0f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7484/7c9633115d399a569dd8e2ac33c37854b07f2e0f/client.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 11982, 20432, 67, 25993, 12, 2890, 16, 460, 16, 2146, 33, 3876, 18, 26280, 4672, 3536, 694, 15063, 635, 2097, 2863, 508, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 11982, 20432, 67, 25993, 12, 2890, 16, 460, 16, 2146, 33, 3876, 18, 26280, 4672, 3536, 694, 15063, 635, 2097, 2863, 508, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, ...
renwin.StereoRenderOn() exec("renwin.SetStereoTypeTo"+mode+"()")
exec("iren.GetRenderWindow().SetStereoTypeTo"+mode+"()")
def set_stereo_mode(self, on=True, mode="CrystalEyes"): """set_stereo_mode(on = [_True_, False], type = [_"CrystalEyes"_, "RedBlue", "Interlaced", "Left", "Right", "Dresden"] """ iren = self.iren renwin = iren.GetRenderWindow() if on: renwin.StereoRenderOn() exec("renwin.SetStereoTypeTo"+mode+"()") else: renwin.StereoRenderOff() iren.Render()
aebed9d98ec54bc8a1c5961fd6686f014ca2a21d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5000/aebed9d98ec54bc8a1c5961fd6686f014ca2a21d/data_viewer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 334, 822, 83, 67, 3188, 12, 2890, 16, 603, 33, 5510, 16, 1965, 1546, 12893, 31365, 41, 9707, 6, 4672, 3536, 542, 67, 334, 822, 83, 67, 3188, 12, 265, 273, 306, 67, 5510, 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, 444, 67, 334, 822, 83, 67, 3188, 12, 2890, 16, 603, 33, 5510, 16, 1965, 1546, 12893, 31365, 41, 9707, 6, 4672, 3536, 542, 67, 334, 822, 83, 67, 3188, 12, 265, 273, 306, 67, 5510, 6...
dc.DrawRotatedText(label, (width-tw)/2+dx, height+dy, 90.0)
dc.DrawRotatedText(label, (width-tw)/2+dx, height + dy - item.border, 90.0)
def DrawLabel(self, item, dc, width, height, dx=0, dy=0): dc.SetFont(item.GetFont()) if item.IsEnabled(): dc.SetTextForeground(item.GetForegroundColour()) else: dc.SetTextForeground(wx.SystemSettings.GetColour(wx.SYS_COLOUR_GRAYTEXT)) label = item.GetLabel() th, tw = dc.GetTextExtent(label) #dc.DrawText(label, (width-tw)/2+dx, (height-th)/2+dy) dc.DrawRotatedText(label, (width-tw)/2+dx, height+dy, 90.0)
dfb0001908470a3c66065d87e9916623f9a610ff /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11522/dfb0001908470a3c66065d87e9916623f9a610ff/springtabs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10184, 2224, 12, 2890, 16, 761, 16, 6744, 16, 1835, 16, 2072, 16, 6633, 33, 20, 16, 7732, 33, 20, 4672, 6744, 18, 694, 5711, 12, 1726, 18, 967, 5711, 10756, 309, 761, 18, 2520, 1526,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10184, 2224, 12, 2890, 16, 761, 16, 6744, 16, 1835, 16, 2072, 16, 6633, 33, 20, 16, 7732, 33, 20, 4672, 6744, 18, 694, 5711, 12, 1726, 18, 967, 5711, 10756, 309, 761, 18, 2520, 1526,...
line_surf = font.render(line, True, (255,255,255)) self.notes_surface.blit(line_surf, (0,y)) y = y + font.get_linesize()
if not fixed_mode and line == '{': fixed_mode = True continue if fixed_mode and line == '}': fixed_mode = False continue if not fixed_mode: line_surf = font.render(line, True, (255,255,255)) self.notes_surface.blit(line_surf, (0,y)) y = y + font.get_linesize() else: line_surf = fixed_font.render(line, True, (255,255,255)) self.notes_surface.blit(line_surf, (0,y)) y = y + fixed_font.get_linesize()
def paint_notes(self): screen_size = self.screen.get_size() margin_x = self.screen.get_size()[0]/50 margin_y = self.screen.get_size()[1]/50 if not self.notes_surface: if self.font_size == None: self.font_size = self.screen.get_size()[1] / 12 font = pygame.font.SysFont("Helvetica, Sans, Arial", size=self.font_size) line_height = font.get_linesize()
571640c83813b5ab1f297405a6ec6fab9e453edc /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3598/571640c83813b5ab1f297405a6ec6fab9e453edc/xpressent-remote.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12574, 67, 12903, 12, 2890, 4672, 5518, 67, 1467, 273, 365, 18, 9252, 18, 588, 67, 1467, 1435, 7333, 67, 92, 273, 365, 18, 9252, 18, 588, 67, 1467, 1435, 63, 20, 18537, 3361, 7333, 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, 12574, 67, 12903, 12, 2890, 4672, 5518, 67, 1467, 273, 365, 18, 9252, 18, 588, 67, 1467, 1435, 7333, 67, 92, 273, 365, 18, 9252, 18, 588, 67, 1467, 1435, 63, 20, 18537, 3361, 7333, 6...
sage: q.time()
sage.: q.time()
def data_to_list(out, n, time): """ Convert output of Hart's sieve and n to a list and time. INPUT: out -- snapshot of text output of Hart's QuadraticSieve program n -- the integer being factored OUTPUT: list -- proper factors found so far str -- time information """ i = out.find('FACTORS:') if i == -1: return [], '', out # whole thing else: verbose = out[:i] out = out[i+len('FACTORS:')+1:].strip() if time: w = out.split('\n') for i in range(len(w)): if 'user' in w[i]: break if i < len(w): t = w[i].strip() out = '\n'.join([w[j] for j in range(i)]) else: t = '' else: t = '' Z = sage.rings.integer.Integer v = out.split() v = list(set([Z(m) for m in v if Z(m) != n])) v.sort() return v, t, verbose
2deb32b0c430790b2ca2a961fbc8993d90dc478c /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/2deb32b0c430790b2ca2a961fbc8993d90dc478c/qsieve.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 501, 67, 869, 67, 1098, 12, 659, 16, 290, 16, 813, 4672, 3536, 4037, 876, 434, 670, 485, 1807, 272, 21271, 471, 290, 358, 279, 666, 471, 813, 18, 225, 12943, 30, 596, 1493, 4439, 434...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 501, 67, 869, 67, 1098, 12, 659, 16, 290, 16, 813, 4672, 3536, 4037, 876, 434, 670, 485, 1807, 272, 21271, 471, 290, 358, 279, 666, 471, 813, 18, 225, 12943, 30, 596, 1493, 4439, 434...
continue if c == 27:
elif c == 10: break elif c == 27:
def bs(s): y, x = self.win.getyx() if x == ix: return s s = s[:-1] self.win.delch(y, x - 1) self.win.move(y, x - 1) return s
18f3d519035beea0ede3d85f69fec3a24f7e26c1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6932/18f3d519035beea0ede3d85f69fec3a24f7e26c1/cli.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7081, 12, 87, 4672, 677, 16, 619, 273, 365, 18, 8082, 18, 588, 93, 92, 1435, 309, 619, 422, 8288, 30, 327, 272, 272, 273, 272, 10531, 17, 21, 65, 365, 18, 8082, 18, 3771, 343, 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, 7081, 12, 87, 4672, 677, 16, 619, 273, 365, 18, 8082, 18, 588, 93, 92, 1435, 309, 619, 422, 8288, 30, 327, 272, 272, 273, 272, 10531, 17, 21, 65, 365, 18, 8082, 18, 3771, 343, 12, ...
if not self.getHasBeenRendered(): self.setRange( datetime.now().date() ) self.setHasBeenRendered()
super(CalendarControl, self).instantiateWidget()
def instantiateWidget(self): if not self.getHasBeenRendered(): self.setRange( datetime.now().date() ) self.setHasBeenRendered() w = wxCalendarControl(self.parentBlock.widget, -1, tzCharacterStyle=self.tzCharacterStyle) return w
2f4dad4f9db6b78f40ef58923c0b547c2c24460b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9228/2f4dad4f9db6b78f40ef58923c0b547c2c24460b/CalendarCanvas.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10275, 4609, 12, 2890, 4672, 2240, 12, 7335, 3367, 16, 365, 2934, 24628, 3840, 4609, 1435, 341, 273, 7075, 7335, 3367, 12, 2890, 18, 2938, 1768, 18, 6587, 16, 300, 21, 16, 6016, 7069, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 10275, 4609, 12, 2890, 4672, 2240, 12, 7335, 3367, 16, 365, 2934, 24628, 3840, 4609, 1435, 341, 273, 7075, 7335, 3367, 12, 2890, 18, 2938, 1768, 18, 6587, 16, 300, 21, 16, 6016, 7069, ...
if self.path.find("/echoheader") != 0:
if not self._ShouldHandleRequest("/echoheader"):
def EchoHeader(self): """This handler echoes back the value of a specific request header."""
41f6cf83747d6ca25a473f2e42d08288be9d7a5d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9392/41f6cf83747d6ca25a473f2e42d08288be9d7a5d/testserver.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 28995, 1864, 12, 2890, 4672, 3536, 2503, 1838, 3376, 281, 1473, 326, 460, 434, 279, 2923, 590, 1446, 12123, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 28995, 1864, 12, 2890, 4672, 3536, 2503, 1838, 3376, 281, 1473, 326, 460, 434, 279, 2923, 590, 1446, 12123, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
linkName += "_T: " + values[2]
linkName += ":&nbsp;" + values[2] url = url_format % (results_server, values[0]) link = link_format % (url, linkName) first_results = first_results + "RETURN:" + link + '<br>'
def send_to_graph(results_server, results_link, title, date, browser_config, results): tbox = title url_format = "http://%s/%s" link_format= "<a href = \"%s\">%s</a>" #value, testname, tbox, timeval, date, branch, buildid, type, data result_format = "%.2f,%s,%s,%d,%d,%s,%s,%s,%s,\n" result_format2 = "%.2f,%s,%s,%d,%d,%s,%s,%s,\n" links = '' for res in results: browser_dump, counter_dump = results[res] utils.debug("Working with test: " + res) utils.debug("Sending results: " + " ".join(browser_dump)) filename = tempfile.mktemp() tmpf = open(filename, "w") if res in ('ts', 'twinopen'): i = 0 for val in browser_dump: val_list = val.split('|') for v in val_list: tmpf.write(result_format % (float(v), res, tbox, i, date, browser_config['branch'], browser_config['buildid'], "discrete", "ms")) i += 1 else: # each line of the string is of the format i;page_name;median;mean;min;max;time vals\n name = '' if ((res == 'tp') or (res == 'tp_js')): name = '_loadtime' for bd in browser_dump: bd.rstrip('\n') page_results = bd.splitlines() i = 0 for mypage in page_results: r = mypage.split(';') #skip this line if it isn't the correct format if len(r) == 1: continue r[1] = r[1].rstrip('/') if r[1].find('/') > -1 : page = r[1].split('/')[1] else: page = r[1] try: val = float(r[2]) except ValueError: print 'WARNING: value error for median in tp' val = 0 tmpf.write(result_format % (val, res + name, tbox, i, date, browser_config['branch'], browser_config['buildid'], "discrete", page)) i += 1 tmpf.flush() tmpf.close() links += post_chunk(results_server, results_link, res, filename) os.remove(filename) for cd in counter_dump: for count_type in cd: val_list = cd[count_type] chunks = chunk_list(val_list) chunk_link = '' i = 0 for chunk in chunks: filename = tempfile.mktemp() tmpf = open(filename, "w") for val in chunk: tmpf.write(result_format2 % (float(val), res + "_" + count_type.replace("%", "Percent"), tbox, i, date, browser_config['branch'], browser_config['buildid'], "discrete")) i += 1 tmpf.flush() tmpf.close() chunk_link = post_chunk(results_server, results_link, '%s_%s (%d values)' % (res, count_type, len(chunk)), filename) os.remove(filename) links += chunk_link lines = links.split('\n') for line in lines: if line == "": continue values = line.split(":") linkName = values[1] if float(values[2]) > 0: linkName += "_T: " + values[2] else: linkName += "_1" url = url_format % (results_server, values[0],) link = link_format % (url, linkName,) print "RETURN: " + link
6cfc8f3ee9fb233d5eb99b068036fc3bc4546c1e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/13067/6cfc8f3ee9fb233d5eb99b068036fc3bc4546c1e/run_tests.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 67, 869, 67, 4660, 12, 4717, 67, 3567, 16, 1686, 67, 1232, 16, 2077, 16, 1509, 16, 4748, 67, 1425, 16, 1686, 4672, 268, 2147, 273, 2077, 880, 67, 2139, 273, 315, 2505, 23155, 8...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 67, 869, 67, 4660, 12, 4717, 67, 3567, 16, 1686, 67, 1232, 16, 2077, 16, 1509, 16, 4748, 67, 1425, 16, 1686, 4672, 268, 2147, 273, 2077, 880, 67, 2139, 273, 315, 2505, 23155, 8...
self.db = sqlite3.connect(dbpath) self.cursor = self.db.cursor()
try: self.db = sqlite3.connect(dbpath) self.cursor = self.db.cursor() except sqlite3.Error, msg: print 'Error:', msg print 'DBpath:', dbpath
def __init__(self, dbpath): self.db = sqlite3.connect(dbpath) self.cursor = self.db.cursor()
5b918ae9990c06e40525ab6dcdfececdce95b6fc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8874/5b918ae9990c06e40525ab6dcdfececdce95b6fc/dbsearch.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1319, 803, 4672, 775, 30, 365, 18, 1966, 273, 16184, 23, 18, 3612, 12, 1966, 803, 13, 365, 18, 9216, 273, 365, 18, 1966, 18, 9216, 1435, 1335, 16184, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1319, 803, 4672, 775, 30, 365, 18, 1966, 273, 16184, 23, 18, 3612, 12, 1966, 803, 13, 365, 18, 9216, 273, 365, 18, 1966, 18, 9216, 1435, 1335, 16184, 2...
result = self._dbmtype.open(self._dbmfile, 'c')
result = self._dbmtype.open(self._dbmfile, 'c', stat.S_IRUSR | stat.S_IWUSR | stat.S_IRGRP)
def _get_dbm(self): result = self._dbmtype.open(self._dbmfile, 'c') if self._dbmtype is anydbm: self._set_dbm_type() return result
fcd73b380b082bdd416fee01c9e158c54741697b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10002/fcd73b380b082bdd416fee01c9e158c54741697b/Session.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 1966, 81, 12, 2890, 4672, 563, 273, 365, 6315, 1966, 81, 723, 18, 3190, 12, 2890, 6315, 1966, 81, 768, 16, 296, 71, 2187, 610, 18, 55, 67, 7937, 27984, 571, 610, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 1966, 81, 12, 2890, 4672, 563, 273, 365, 6315, 1966, 81, 723, 18, 3190, 12, 2890, 6315, 1966, 81, 768, 16, 296, 71, 2187, 610, 18, 55, 67, 7937, 27984, 571, 610, 18, ...
for dirname in rl_config.TTFSearchPath: abp = os.path.abspath(dirname) if os.path.isdir(abp): dirpath.append(abp)
searchpath = [] if config.get_misc('ttfonts', 'search_path', False): searchpath += map(str.strip, config.get_misc('ttfonts', 'search_path').split(',')) if os.name == 'nt': pass elif os.uname()[0] == 'Linux': searchpath += TTFSearchPath_Linux else: pass if config.get_misc('ttfonts', 'use_default_path', True): searchpath += rl_config.TTFSearchPath for dirglob in searchpath: dirglob = os.path.expanduser(dirglob) for dirname in glob.iglob(dirglob): abp = os.path.abspath(dirname) if os.path.isdir(abp): dirpath.append(abp)
def FindCustomFonts(): """Fill the __foundFonts list with those filenames, whose fonts can be found in the reportlab ttf font path. This process needs only be done once per loading of this module, it is cached. But, if the system admin adds some font in the meanwhile, the server must be restarted eventually. """ dirpath = [] log = logging.getLogger('report.fonts') global __foundFonts for dirname in rl_config.TTFSearchPath: abp = os.path.abspath(dirname) if os.path.isdir(abp): dirpath.append(abp) for k, (name, font, fname, mode) in enumerate(CustomTTFonts): if fname in __foundFonts: continue for d in dirpath: if os.path.exists(os.path.join(d, fname)): log.debug("Found font %s in %s as %s", fname, d, name) __foundFonts.append(fname) break # print "Found fonts:", __foundFonts
fef5091319af2da11c67fb7bd6097c038b894880 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12853/fef5091319af2da11c67fb7bd6097c038b894880/customfonts.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4163, 3802, 5711, 87, 13332, 3536, 8026, 326, 1001, 7015, 5711, 87, 666, 598, 5348, 9066, 16, 8272, 16450, 848, 506, 1392, 316, 326, 2605, 7411, 26826, 3512, 589, 18, 225, 1220, 1207, 42...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4163, 3802, 5711, 87, 13332, 3536, 8026, 326, 1001, 7015, 5711, 87, 666, 598, 5348, 9066, 16, 8272, 16450, 848, 506, 1392, 316, 326, 2605, 7411, 26826, 3512, 589, 18, 225, 1220, 1207, 42...
self.field_id = res and res[0] return self.field_id
self.field_id[cr.dbname] = res and res[0] return self.field_id[cr.dbname]
def _field_get(self, self2, cr, uid, prop): if not self.field_id: cr.execute('select id from ir_model_fields where name=%s and model=%s', (prop, self2._name)) res = cr.fetchone() self.field_id = res and res[0] return self.field_id
a230dfb364a5586ae582f6ae99d35a124c64e563 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7397/a230dfb364a5586ae582f6ae99d35a124c64e563/fields.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1518, 67, 588, 12, 2890, 16, 365, 22, 16, 4422, 16, 4555, 16, 2270, 4672, 309, 486, 365, 18, 1518, 67, 350, 30, 4422, 18, 8837, 2668, 4025, 612, 628, 9482, 67, 2284, 67, 2821, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1518, 67, 588, 12, 2890, 16, 365, 22, 16, 4422, 16, 4555, 16, 2270, 4672, 309, 486, 365, 18, 1518, 67, 350, 30, 4422, 18, 8837, 2668, 4025, 612, 628, 9482, 67, 2284, 67, 2821, ...
log.error("No handler found for '%s'" % subject)
log.err("No handler found for '%s'" % subject)
def main(): """ Here we do the job """ global MBOT_ADDRESS, CONFIG_FILE, LOG_LEVEL, MODULES config_file = CONFIG_FILE try: opts, args = getopt.getopt(sys.argv[1:], "c:") except getopt.GetoptError: # print help information and exit: usage() sys.exit(2) for o, a in opts: if o == "-c": config_file = a Conf = read_defaults(config_file) log = Logger.Logger(LOG_LEVEL) log.notice("Using config file %s\n" % config_file) log.debug("Configuration values: MBOT_ADDRESS='%s'" \ % MBOT_ADDRESS + \ "LOG_LEVEL='%s' MODULES='%s'" \ % (LOG_LEVEL, MODULES)) # we read the mail mesg = read_email() sender = mesg.get('From') subject = mime_decode_header(mesg.get('Subject')) mesg_id = mesg.get('Message-Id') date = mesg.get('Date') dest = mesg.get('To') log.notice("Incoming mail: the %s, from '%s' [%s] to '%s' " \ % (date, sender, mesg_id, dest) + \ "with subject '%s'" % subject) # we only consider (parse) the text/plain parts of message if mesg.is_multipart(): body = [] for part in mesg.walk(): if part.get_content_type() == "text/plain": body.append(part.get_payload(decode=1)) else: body.append(part) else: body = [mesg.get_payload()] log.notice("message: %s %s %s \n" % (mesg_id, sender, subject)) # we prepare the response resp = MIMEMultipart() resp['Subject'] = 'Re: %s' % subject resp['To'] = sender resp['In-Reply-To'] = mesg_id # we initialize a handler corresponding to the given subject # first we create a new dict reverse from module one rev_modules = {} for m in MODULES: log.debug("m: %s" % m) for s in MODULES[m]: log.debug("s: %s" % s) rev_modules[s] = m # now we can try to import appropriate module and use it h = None for s in rev_modules: if subject.find(s) == 0: handler = rev_modules[s] log.debug("using handler: %s" % handler) try: handlerModule = __import__(handler) log.notice("Using handler: %s" % handler) handlerClass = getattr(handlerModule, handler) log.debug("handlerClass: %s" % handlerClass) h = handlerClass(log, subject[len(s):], dest, sender, date) log.debug("Instanciate handler %s for '%s'" \ % (handler, subject[len(s):])) except: log.error("Impossible to load handler: %s" \ % handler) log.error("%s: %s" \ % (sys.exc_type, sys.exc_value)) break # If we have no handler, we send an error mail if h is None: log.error("No handler found for '%s'" % subject) mesg = "Sorry, mbot is not configured to handle your request" resp.attach(MIMEText(mesg)) # Here we apply the found handler else: # then we read the handler config h.read_conf(Conf) # we pass each part of the message to the handler for part in body: for (type, out) in h.handle(part): maintype, subtype = type.split('/', 1) log.debug("%s part type" % maintype) if maintype == 'text': data = MIMEText(out, _subtype=subtype) log.debug("Result is:\n%s" % out) elif maintype == 'image': data = MIMEImage(out, _subtype=subtype) elif maintype == 'audio': data = MIMEAudio(out, _subtype=subtype) else: # Generic mime encoding data = MIMEBase(maintype, subtype) data.set_payload(out) Encoders.encode_base64(data) resp.attach(data) # Then we send the mail log.notice("Sending from %s to %s \n" % (MBOT_ADDRESS, sender)) s = smtplib.SMTP() s.connect() s.sendmail(MBOT_ADDRESS, sender, resp.as_string()) s.close()
2169b15d1ec57f89b4b007ebbd0c6ca0dd857283 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3144/2169b15d1ec57f89b4b007ebbd0c6ca0dd857283/mbot.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 3536, 13743, 732, 741, 326, 1719, 3536, 2552, 17897, 1974, 67, 15140, 16, 9128, 67, 3776, 16, 2018, 67, 10398, 16, 14057, 55, 225, 642, 67, 768, 273, 9128, 67, 3776, 775, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 3536, 13743, 732, 741, 326, 1719, 3536, 2552, 17897, 1974, 67, 15140, 16, 9128, 67, 3776, 16, 2018, 67, 10398, 16, 14057, 55, 225, 642, 67, 768, 273, 9128, 67, 3776, 775, ...
from errno import ENOENT, ENOTDIR
def _execvpe(file, args, env=None): from errno import ENOENT, ENOTDIR if env is not None: func = execve argrest = (args, env) else: func = execv argrest = (args,) env = environ head, tail = path.split(file) if head: func(file, *argrest) return if 'PATH' in env: envpath = env['PATH'] else: envpath = defpath PATH = envpath.split(pathsep) saved_exc = None saved_tb = None for dir in PATH: fullname = path.join(dir, file) try: func(fullname, *argrest) except error, e: tb = sys.exc_info()[2] if (e.errno != ENOENT and e.errno != ENOTDIR and saved_exc is None): saved_exc = e saved_tb = tb if saved_exc: raise error, saved_exc, saved_tb raise error, e, tb
13c3e26f5044f63c940ac463612ee9161b2be422 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/13c3e26f5044f63c940ac463612ee9161b2be422/os.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4177, 90, 347, 12, 768, 16, 833, 16, 1550, 33, 7036, 4672, 309, 1550, 353, 486, 599, 30, 1326, 273, 1196, 537, 1501, 8792, 273, 261, 1968, 16, 1550, 13, 469, 30, 1326, 273, 1196...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4177, 90, 347, 12, 768, 16, 833, 16, 1550, 33, 7036, 4672, 309, 1550, 353, 486, 599, 30, 1326, 273, 1196, 537, 1501, 8792, 273, 261, 1968, 16, 1550, 13, 469, 30, 1326, 273, 1196...
ll_lines2 = []
ll_lines2, calltag, declaretag = [], 'call ', 'declare '
def get_ll(ccode, extern_dir, functions=[]): # goto codespeak and compile our c code request = urllib.urlencode({'ccode':ccode}) llcode = urllib.urlopen('http://codespeak.net/pypy/llvm-gcc.cgi', request).read() # get rid of the struct that llvm-gcc introduces to struct types llcode = llcode.replace("%struct.", "%") #find function names, declare them internal with fastcc calling convertion ll_lines = [] funcnames = { "%ll_frexp_result__Float_Signed" : True, "%prepare_and_raise_ZeroDivisionError" : True, "%prepare_and_raise_OverflowError" : True, "%prepare_and_raise_ValueError" : True, } for line in llcode.split('\n'): comment = line.find(';') if comment >= 0: line = line[:comment] line = line.rstrip() if line[-1:] == '{': returntype, s = line.split(' ', 1) funcname , s = s.split('(', 1) funcnames[funcname] = True line = 'internal fastcc ' + line ll_lines.append(line) #patch calls to function that we just declared fastcc ll_lines2 = [] for line in ll_lines: calltag = 'call ' i = line.find(calltag) if i >= 0: cconv = 'ccc' for funcname in funcnames.keys(): if line.find(funcname) >= 0: cconv = 'fastcc' break line = "%scall %s %s" % (line[:i], cconv, line[i+len(calltag):]) ll_lines2.append(line) llcode = '\n'.join(ll_lines2) # create file llfilename = extern_dir.join("externs").new(ext='.ll') f = open(str(llfilename), 'w') f.write(llcode) f.close() # create bytecode os.chdir(str(extern_dir)) cmdexec('llvm-as externs.ll') bcfilename = extern_dir.join("externs").new(ext='.bc') if functions: for func in functions: # extract cmdexec('llvm-extract -func %s -o %s.bc externs.bc' % (func, func)) # link all the ll files functions_bcs = ' '.join(['%s.bc' % func for func in functions]) cmdexec('llvm-link -o externs_linked.bc ' + functions_bcs) bcfilename = extern_dir.join("externs_linked").new(ext='.bc') return bcfilename
4e54dbd41ea7bee20e17169a68acd168f028c9bd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/4e54dbd41ea7bee20e17169a68acd168f028c9bd/genllvm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 2906, 12, 71, 710, 16, 18885, 67, 1214, 16, 4186, 33, 8526, 4672, 225, 468, 2897, 6198, 10244, 471, 4074, 3134, 276, 981, 590, 273, 11527, 18, 718, 3015, 12590, 11, 71, 710, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 2906, 12, 71, 710, 16, 18885, 67, 1214, 16, 4186, 33, 8526, 4672, 225, 468, 2897, 6198, 10244, 471, 4074, 3134, 276, 981, 590, 273, 11527, 18, 718, 3015, 12590, 11, 71, 710, ...
self.check_prerequisite_command('umount')
Util().check_prerequisite_command('umount')
def unmount_image(self, mount_point): try: self.check_prerequisite_command('umount') except NotFoundError: sys.exit(1)
7af1f9e3c7085c3b64dfc2df7ca7079cf56f25b4 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12707/7af1f9e3c7085c3b64dfc2df7ca7079cf56f25b4/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 25670, 67, 2730, 12, 2890, 16, 5344, 67, 1153, 4672, 775, 30, 3564, 7675, 1893, 67, 683, 822, 16608, 1137, 67, 3076, 2668, 379, 592, 6134, 1335, 25576, 30, 2589, 18, 8593, 12, 21, 13, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 25670, 67, 2730, 12, 2890, 16, 5344, 67, 1153, 4672, 775, 30, 3564, 7675, 1893, 67, 683, 822, 16608, 1137, 67, 3076, 2668, 379, 592, 6134, 1335, 25576, 30, 2589, 18, 8593, 12, 21, 13, ...
LOG.info("Connecting to cluster at: %s" % self.HeadNode)
def DoIt(self): scheduler = Scheduler() # make a connection to the cluster LOG.info("Connecting to cluster at: %s" % self.HeadNode) try: scheduler.Connect(self.HeadNode) except Exception, e: LOG.error("Unable to reach cluster head node: %s" % self.HeadNode) LOG.error(e) LOG.info("Exiting...") sys.exit(2)
577cb2bd2414a26ea5fdbfa305c7c8f61ea2a861 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14622/577cb2bd2414a26ea5fdbfa305c7c8f61ea2a861/hpc-spool-script.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2256, 7193, 12, 2890, 4672, 8129, 273, 12620, 1435, 468, 1221, 279, 1459, 358, 326, 2855, 698, 30, 8129, 18, 5215, 12, 2890, 18, 1414, 907, 13, 1335, 1185, 16, 425, 30, 2018, 18, 1636,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2256, 7193, 12, 2890, 4672, 8129, 273, 12620, 1435, 468, 1221, 279, 1459, 358, 326, 2855, 698, 30, 8129, 18, 5215, 12, 2890, 18, 1414, 907, 13, 1335, 1185, 16, 425, 30, 2018, 18, 1636,...
flist += operator+'('+f+') as '+f
flist += group_operator+'('+f+') as '+f
def read_group(self, cr, uid, domain, fields, groupby, offset=0, limit=None, context=None): """ Get the list of records in list view grouped by the given ``groupby`` fields
99608428f8798699de8a678ed91f2ea221f5030b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/99608428f8798699de8a678ed91f2ea221f5030b/orm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 67, 1655, 12, 2890, 16, 4422, 16, 4555, 16, 2461, 16, 1466, 16, 13126, 16, 1384, 33, 20, 16, 1800, 33, 7036, 16, 819, 33, 7036, 4672, 3536, 968, 326, 666, 434, 3853, 316, 666, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 67, 1655, 12, 2890, 16, 4422, 16, 4555, 16, 2461, 16, 1466, 16, 13126, 16, 1384, 33, 20, 16, 1800, 33, 7036, 16, 819, 33, 7036, 4672, 3536, 968, 326, 666, 434, 3853, 316, 666, ...
oldrating = self.lastratinglabel self.lastratinglabel = rating if self.chainbox.active and self.__clamp(rating) != self.__clamp(oldrating): oldclamp = self.__clamp(oldrating) oldcenter = int(self.widgets["ratingCenterSlider"].get_value()) * RATING_SLIDER_STEP difference = oldclamp - oldcenter newclamp = self.__clamp(rating) self.widgets["ratingCenterSlider"].set_value((newclamp - difference) / RATING_SLIDER_STEP)
center = int(self.widgets["ratingCenterSlider"].get_value()) * RATING_SLIDER_STEP newclamp = self.__clamp(rating) difference = newclamp - center if self.chainbox.active and difference is not self.lastdifference: newsliderval = (newclamp - self.lastdifference) / RATING_SLIDER_STEP self.widgets["ratingCenterSlider"].set_value(newsliderval) else: self.lastdifference = difference
def __updateYourRatingHBox (self): if self.finger == None: return if self.widgets["untimedCheck"].get_active(): gameTypeName = self.__getNameOfTimeControl(0, 0) ratingType = self.__getTypeOfTimeControl(0, 0) elif self.widgets["noVariantRadio"].get_active(): min = int(self.widgets["minutesSpin"].get_value()) gain = int(self.widgets["gainSpin"].get_value()) gameTypeName = self.__getNameOfTimeControl(min, gain) ratingType = self.__getTypeOfTimeControl(min, gain) else: variant_combo_getter = self.seekEditorWidgetGettersSetters["variantCombo"][0] variant = variant_combo_getter(self.widgets["variantCombo"]) gameTypeName = variants[variant].name ratingType = self.variants[variant]
722dcd889fab912f15e7688b07f1ddcedb21e013 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5339/722dcd889fab912f15e7688b07f1ddcedb21e013/ICLounge.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2725, 15446, 20388, 44, 3514, 261, 2890, 4672, 309, 365, 18, 74, 6658, 422, 599, 30, 327, 225, 309, 365, 18, 18148, 9614, 318, 20905, 1564, 6, 8009, 588, 67, 3535, 13332, 7920, 7...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2725, 15446, 20388, 44, 3514, 261, 2890, 4672, 309, 365, 18, 74, 6658, 422, 599, 30, 327, 225, 309, 365, 18, 18148, 9614, 318, 20905, 1564, 6, 8009, 588, 67, 3535, 13332, 7920, 7...
res += char.lower()
res += char.upper()
def _format_iban(string): ''' This function removes all characters from given 'string' that isn't a alpha numeric and converts it to lower case. ''' res = "" for char in string: if char.isalnum(): res += char.lower() return res
562dcd893fb70e74d5bfd2f49f79f2220c9fce86 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/562dcd893fb70e74d5bfd2f49f79f2220c9fce86/base_iban.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2139, 67, 495, 304, 12, 1080, 4672, 9163, 1220, 445, 7157, 777, 3949, 628, 864, 296, 1080, 11, 716, 5177, 1404, 279, 4190, 6389, 471, 7759, 518, 358, 2612, 648, 18, 9163, 400, 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, 389, 2139, 67, 495, 304, 12, 1080, 4672, 9163, 1220, 445, 7157, 777, 3949, 628, 864, 296, 1080, 11, 716, 5177, 1404, 279, 4190, 6389, 471, 7759, 518, 358, 2612, 648, 18, 9163, 400, 273...
for widget in self._loaded_types[group]:
types = self._loaded_types[group] types.sort(key=lambda x: (str.lower(x[0]))) for widget in types:
def _group_selected_cb(self, li, it): group = it.label_get() self._group = group
84350fb0160c5c85d522d3c62131e70edbcf7975 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12343/84350fb0160c5c85d522d3c62131e70edbcf7975/widgets_list.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1655, 67, 8109, 67, 7358, 12, 2890, 16, 4501, 16, 518, 4672, 1041, 273, 518, 18, 1925, 67, 588, 1435, 365, 6315, 1655, 273, 1041, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1655, 67, 8109, 67, 7358, 12, 2890, 16, 4501, 16, 518, 4672, 1041, 273, 518, 18, 1925, 67, 588, 1435, 365, 6315, 1655, 273, 1041, 2, -100, -100, -100, -100, -100, -100, -100, -100...