rem stringlengths 1 322k | add stringlengths 0 2.05M | context stringlengths 4 228k | meta stringlengths 156 215 |
|---|---|---|---|
def butter(N, Wn, bandtype='band', analog=0, output=''): """Butterworth digital and analog filter design. Description: Design an Nth order lowpass digital Butterworth filter and return the filter coefficients in (B,A) form. Inputs: """ #pre-warp frequencies for digital filter design if not analog: warped = 2*fs*ta... | 52477d3d8b9098fa5178fb8886e5ea9d40db9bb3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/52477d3d8b9098fa5178fb8886e5ea9d40db9bb3/filter_design.py | ||
if btype in ['lowpass', 'highpass']: wo = warped else: bw = warped[1] - warped[0] wo = sqrt(warped[0]*warped[1]) | def butter(N, Wn, bandtype='band', analog=0, output=''): """Butterworth digital and analog filter design. Description: Design an Nth order lowpass digital Butterworth filter and return the filter coefficients in (B,A) form. Inputs: """ #pre-warp frequencies for digital filter design if not analog: warped = 2*fs*ta... | 52477d3d8b9098fa5178fb8886e5ea9d40db9bb3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/52477d3d8b9098fa5178fb8886e5ea9d40db9bb3/filter_design.py | |
if typefunc in [buttap, besselap]: z, p, k = typefunc(N) elif typefunc == cheb1ap: if rp is None: raise ValueError, "passband ripple (rp) must be provided to design a Chebyshev I filter." z, p, k = typefunc(N, rp) elif typefunc == cheb2ap: if rs is None: raise ValueError, "stopband atteunatuion (rs) must be provided to... | def butter(N, Wn, bandtype='band', analog=0, output=''): """Butterworth digital and analog filter design. Description: Design an Nth order lowpass digital Butterworth filter and return the filter coefficients in (B,A) form. Inputs: """ #pre-warp frequencies for digital filter design if not analog: warped = 2*fs*ta... | 52477d3d8b9098fa5178fb8886e5ea9d40db9bb3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/52477d3d8b9098fa5178fb8886e5ea9d40db9bb3/filter_design.py | |
pass | b, a = bilinear(b, a, fs=fs) | def butter(N, Wn, bandtype='band', analog=0, output=''): """Butterworth digital and analog filter design. Description: Design an Nth order lowpass digital Butterworth filter and return the filter coefficients in (B,A) form. Inputs: """ #pre-warp frequencies for digital filter design if not analog: warped = 2*fs*ta... | 52477d3d8b9098fa5178fb8886e5ea9d40db9bb3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/52477d3d8b9098fa5178fb8886e5ea9d40db9bb3/filter_design.py |
pass def cheby1(): pass def cheby2(): pass def ellip(): pass def besself(): pass | if output == 'zpk': return tf2zpk(b,a) else: return b,a def butter(N, Wn, btype='low', analog=0, output='ba'): """Butterworth digital and analog filter design. Description: Design an Nth order lowpass digital or analog Butterworth filter and return the filter coefficients in (B,A) or (Z,P,K) form. See also buttord... | def butter(N, Wn, bandtype='band', analog=0, output=''): """Butterworth digital and analog filter design. Description: Design an Nth order lowpass digital Butterworth filter and return the filter coefficients in (B,A) form. Inputs: """ #pre-warp frequencies for digital filter design if not analog: warped = 2*fs*ta... | 52477d3d8b9098fa5178fb8886e5ea9d40db9bb3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/52477d3d8b9098fa5178fb8886e5ea9d40db9bb3/filter_design.py |
try: return ret[0] except IndexError, TypeError: return ret | return ret | def vratio(u, ineps, mp): [s,c,d,phi] = special.ellpj(u,mp) ret = abs(ineps - s/c) try: return ret[0] except IndexError, TypeError: return ret | 52477d3d8b9098fa5178fb8886e5ea9d40db9bb3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/52477d3d8b9098fa5178fb8886e5ea9d40db9bb3/filter_design.py |
try: return abs(r)[0] except TypeError: return abs(r) | return abs(r) | def kratio(m, k_ratio): if m < 0: m = 0.0 if m > 1: m = 1.0 if abs(m) > EPSILON and (abs(m) + EPSILON) < 1: k = special.ellpk([1-m,m]) r = k[0] / k[1] - k_ratio elif abs(m) > EPSILON: r = -k_ratio else: r = 1e20 try: return abs(r)[0] except TypeError: return abs(r) | 52477d3d8b9098fa5178fb8886e5ea9d40db9bb3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/52477d3d8b9098fa5178fb8886e5ea9d40db9bb3/filter_design.py |
maxfun=250, maxiter=250, printmessg=0) v0 = capk * r / (N*capck1[0]) | maxfun=250, maxiter=250, disp=0) v0 = capk * r / (N*val[0]) | def ellipap(N,rp,rs): """Return (z,p,k) zeros, poles, and gain of an Nth order normalized prototype elliptic analog lowpass filter with rp decibels of ripple in the passband and a stopband rs decibels down. Broken... """ if N == 1: p = -sqrt(1.0/(10**(0.1*rp)-1.0)) k = -p z = [] return z, p, k eps = Num.sqrt(10**(0.1... | 52477d3d8b9098fa5178fb8886e5ea9d40db9bb3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/52477d3d8b9098fa5178fb8886e5ea9d40db9bb3/filter_design.py |
def ellipap(N,rp,rs): """Return (z,p,k) zeros, poles, and gain of an Nth order normalized prototype elliptic analog lowpass filter with rp decibels of ripple in the passband and a stopband rs decibels down. Broken... """ if N == 1: p = -sqrt(1.0/(10**(0.1*rp)-1.0)) k = -p z = [] return z, p, k eps = Num.sqrt(10**(0.1... | 52477d3d8b9098fa5178fb8886e5ea9d40db9bb3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/52477d3d8b9098fa5178fb8886e5ea9d40db9bb3/filter_design.py | ||
return where(c>0,val,1-val) | cond = c + 0*val return where(cond>0,val,1-val) | def _cdf(self, x, a, c): val = special.gammainc(a,x**c) return where(c>0,val,1-val) | 2e1459d7db55ceda99d2149f964d8af198d5f89a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/2e1459d7db55ceda99d2149f964d8af198d5f89a/distributions.py |
val2 = special.gammaincinv(a,1-q) | val2 = special.gammaincinv(a,1.0-q) | def _ppf(self, q, a, c): val1 = special.gammaincinv(a,q) val2 = special.gammaincinv(a,1-q) ic = 1.0/c return where(c>0,pow(val1,ic),pow(val2,ic)) | 2e1459d7db55ceda99d2149f964d8af198d5f89a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/2e1459d7db55ceda99d2149f964d8af198d5f89a/distributions.py |
return where(c>0,pow(val1,ic),pow(val2,ic)) | cond = c+0*val1+0*val2 return where(cond > 0,val1**ic,val2**ic) | def _ppf(self, q, a, c): val1 = special.gammaincinv(a,q) val2 = special.gammaincinv(a,1-q) ic = 1.0/c return where(c>0,pow(val1,ic),pow(val2,ic)) | 2e1459d7db55ceda99d2149f964d8af198d5f89a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/2e1459d7db55ceda99d2149f964d8af198d5f89a/distributions.py |
if tmp.dtype in (scipy.Complex32, scipy.Complex64): | if tmp.dtypechar in (scipy.Complex32, scipy.Complex64): | def diff(x,order=1,period=None, _cache = _cache): """ diff(x, order=1, period=2*pi) -> y Return k-th derivative (or integral) of a periodic sequence x. If x_j and y_j are Fourier coefficients of periodic functions x and y, respectively, then y_j = pow(sqrt(-1)*j*2*pi/period, order) * x_j y_0 = 0 if order is not 0. ... | f2ab2a6643e678bf384d9d6adc8b5df46b5d57a2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/f2ab2a6643e678bf384d9d6adc8b5df46b5d57a2/pseudo_diffs.py |
if tmp.dtype in (scipy.Complex32, scipy.Complex64): | if tmp.dtypechar in (scipy.Complex32, scipy.Complex64): | def tilbert(x,h,period=None, _cache = _cache): """ tilbert(x, h, period=2*pi) -> y Return h-Tilbert transform of a periodic sequence x. If x_j and y_j are Fourier coefficients of periodic functions x and y, respectively, then y_j = -sqrt(-1)*coth(j*h*2*pi/period) * x_j y_0 = 0 Input: h Defines the parameter of the ... | f2ab2a6643e678bf384d9d6adc8b5df46b5d57a2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/f2ab2a6643e678bf384d9d6adc8b5df46b5d57a2/pseudo_diffs.py |
if tmp.dtype in (scipy.Complex32, scipy.Complex64): | if tmp.dtypechar in (scipy.Complex32, scipy.Complex64): | def itilbert(x,h,period=None, _cache = _cache): """ itilbert(x, h, period=2*pi) -> y Return inverse h-Tilbert transform of a periodic sequence x. If x_j and y_j are Fourier coefficients of periodic functions x and y, respectively, then y_j = sqrt(-1)*tanh(j*h*2*pi/period) * x_j y_0 = 0 Optional input: see tilbert._... | f2ab2a6643e678bf384d9d6adc8b5df46b5d57a2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/f2ab2a6643e678bf384d9d6adc8b5df46b5d57a2/pseudo_diffs.py |
if tmp.dtype in (scipy.Complex32, scipy.Complex64): | if tmp.dtypechar in (scipy.Complex32, scipy.Complex64): | def hilbert(x, _cache=_cache): """ hilbert(x) -> y Return Hilbert transform of a periodic sequence x. If x_j and y_j are Fourier coefficients of periodic functions x and y, respectively, then y_j = -sqrt(-1)*sign(j) * x_j y_0 = 0 Notes: If sum(x)==0 then hilbert(ihilbert(x)) == x For even len(x), the Nyquist mode o... | f2ab2a6643e678bf384d9d6adc8b5df46b5d57a2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/f2ab2a6643e678bf384d9d6adc8b5df46b5d57a2/pseudo_diffs.py |
if tmp.dtype in (scipy.Complex32, scipy.Complex64): | if tmp.dtypechar in (scipy.Complex32, scipy.Complex64): | def cs_diff(x, a, b, period=None, _cache = _cache): """ cs_diff(x, a, b, period=2*pi) -> y Return (a,b)-cosh/sinh pseudo-derivative of a periodic sequence x. If x_j and y_j are Fourier coefficients of periodic functions x and y, respectively, then y_j = -sqrt(-1)*cosh(j*a*2*pi/period)/sinh(j*b*2*pi/period) * x_j y_0... | f2ab2a6643e678bf384d9d6adc8b5df46b5d57a2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/f2ab2a6643e678bf384d9d6adc8b5df46b5d57a2/pseudo_diffs.py |
if tmp.dtype in (scipy.Complex32, scipy.Complex64): | if tmp.dtypechar in (scipy.Complex32, scipy.Complex64): | def sc_diff(x, a, b, period=None, _cache = _cache): """ sc_diff(x, a, b, period=2*pi) -> y Return (a,b)-sinh/cosh pseudo-derivative of a periodic sequence x. If x_j and y_j are Fourier coefficients of periodic functions x and y, respectively, then y_j = sqrt(-1)*sinh(j*a*2*pi/period)/cosh(j*b*2*pi/period) * x_j y_0 ... | f2ab2a6643e678bf384d9d6adc8b5df46b5d57a2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/f2ab2a6643e678bf384d9d6adc8b5df46b5d57a2/pseudo_diffs.py |
if tmp.dtype in (scipy.Complex32, scipy.Complex64): | if tmp.dtypechar in (scipy.Complex32, scipy.Complex64): | def ss_diff(x, a, b, period=None, _cache = _cache): """ ss_diff(x, a, b, period=2*pi) -> y Return (a,b)-sinh/sinh pseudo-derivative of a periodic sequence x. If x_j and y_j are Fourier coefficients of periodic functions x and y, respectively, then y_j = sinh(j*a*2*pi/period)/sinh(j*b*2*pi/period) * x_j y_0 = a/b * x... | f2ab2a6643e678bf384d9d6adc8b5df46b5d57a2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/f2ab2a6643e678bf384d9d6adc8b5df46b5d57a2/pseudo_diffs.py |
if tmp.dtype in (scipy.Complex32, scipy.Complex64): | if tmp.dtypechar in (scipy.Complex32, scipy.Complex64): | def cc_diff(x, a, b, period=None, _cache = _cache): """ cc_diff(x, a, b, period=2*pi) -> y Return (a,b)-cosh/cosh pseudo-derivative of a periodic sequence x. If x_j and y_j are Fourier coefficients of periodic functions x and y, respectively, then y_j = cosh(j*a*2*pi/period)/cosh(j*b*2*pi/period) * x_j Input: a,b D... | f2ab2a6643e678bf384d9d6adc8b5df46b5d57a2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/f2ab2a6643e678bf384d9d6adc8b5df46b5d57a2/pseudo_diffs.py |
if tmp.dtype in (scipy.Complex32, scipy.Complex64): | if tmp.dtypechar in (scipy.Complex32, scipy.Complex64): | def shift(x, a, period=None, _cache = _cache): """ shift(x, a, period=2*pi) -> y Shift periodic sequence x by a: y(u) = x(u+a). If x_j and y_j are Fourier coefficients of periodic functions x and y, respectively, then y_j = exp(j*a*2*pi/period*sqrt(-1)) * x_f Optional input: period The period of the sequences x and... | f2ab2a6643e678bf384d9d6adc8b5df46b5d57a2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/f2ab2a6643e678bf384d9d6adc8b5df46b5d57a2/pseudo_diffs.py |
return abs(norm(loc=c,size=self._size)) | return abs(norm(mu=c,size=self._size)) | def _rvs(self, c): return abs(norm(loc=c,size=self._size)) | 29db706bee63a46ee93ab4810eb413a2d1b03718 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/29db706bee63a46ee93ab4810eb413a2d1b03718/distributions.py |
return norm(loc=nc,size=self._size)*sqrt(df) / sqrt(chi2(df,size=self._size)) | return norm(mu=nc,size=self._size)*sqrt(df) / sqrt(chi2(df,size=self._size)) | def _rvs(self, df, nc): return norm(loc=nc,size=self._size)*sqrt(df) / sqrt(chi2(df,size=self._size)) | 29db706bee63a46ee93ab4810eb413a2d1b03718 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/29db706bee63a46ee93ab4810eb413a2d1b03718/distributions.py |
if not atype[k] in "".join(Numeric.typecodes.values()): | if not atype[k] in typecodes: | def read_array(fileobject, separator=default, columns=default, comment="#", lines=default, atype=Numeric.Float, linesep='\n', rowsize=10000, missing=0): """Return an array or arrays from ascii_formatted data in |fileobject|. Inputs: fileobject -- An open file object or a string for a valid filename. The string can be... | 7b6a896ba7e4c97162a6b885ed3d990868b2bdd5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/7b6a896ba7e4c97162a6b885ed3d990868b2bdd5/array_import.py |
outarr[k].resize((outarr[k].shape[0] + rowsize,colsize)) | outarr[k].resize((outarr[k].shape[0] + rowsize,colsize[k])) | def read_array(fileobject, separator=default, columns=default, comment="#", lines=default, atype=Numeric.Float, linesep='\n', rowsize=10000, missing=0): """Return an array or arrays from ascii_formatted data in |fileobject|. Inputs: fileobject -- An open file object or a string for a valid filename. The string can be... | 7b6a896ba7e4c97162a6b885ed3d990868b2bdd5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/7b6a896ba7e4c97162a6b885ed3d990868b2bdd5/array_import.py |
fft_opt_info = get_info('fft_opt') | djbfft_info = {} mkl_info = get_info('mkl') if mkl_info: mkl_info.setdefault('define_macros', []).append(('SCIPY_MKL_H', None)) fft_opt_info = mkl_info else: fft_opt_info = get_info('fftw3') or get_info('fftw2') \ or get_info('dfftw') djbfft_info = get_info('djbfft') | def configuration(parent_package='',top_path=None): from numpy.distutils.misc_util import Configuration from numpy.distutils.system_info import get_info config = Configuration('fftpack',parent_package, top_path) fft_opt_info = get_info('fft_opt') config.add_data_dir('tests') config.add_library('dfftpack', sources=[jo... | e6df4f9da588ebde3b652de8d07b242580d5e77b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/e6df4f9da588ebde3b652de8d07b242580d5e77b/setup.py |
extra_info = fft_opt_info | extra_info = [fft_opt_info, djbfft_info], | def configuration(parent_package='',top_path=None): from numpy.distutils.misc_util import Configuration from numpy.distutils.system_info import get_info config = Configuration('fftpack',parent_package, top_path) fft_opt_info = get_info('fft_opt') config.add_data_dir('tests') config.add_library('dfftpack', sources=[jo... | e6df4f9da588ebde3b652de8d07b242580d5e77b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/e6df4f9da588ebde3b652de8d07b242580d5e77b/setup.py |
raise "Couldn't load level" | raise ("Couldn't load level: ", filename) | def __init__(self, *params): if len(params) == 2: (width, height) = params self.name = "No Name" self.author = "No Author" | cba6613b98a89504e883f433877d9e98d1b54491 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6395/cba6613b98a89504e883f433877d9e98d1b54491/supertux.py |
print "Got: ", type, x, y | def find(lst, obj): for i in lst: if i[0] == obj: return i return None | cba6613b98a89504e883f433877d9e98d1b54491 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6395/cba6613b98a89504e883f433877d9e98d1b54491/supertux.py | |
ObjectBrush(make_sprite(config.datadir + object[1]), make_metadata(object[0])).add_to_layer(self.objects, CL_Point(x, y)) | self.objects.add_object(ObjMapSpriteObject(make_sprite(config.datadir + object[1]), CL_Point(x, y), make_metadata(BadGuy(object[0]))).to_object()) | def find(lst, obj): for i in lst: if i[0] == obj: return i return None | cba6613b98a89504e883f433877d9e98d1b54491 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6395/cba6613b98a89504e883f433877d9e98d1b54491/supertux.py |
for (obj, data) in []: pos = obj.get_pos() f.write(" (%s (x %d) (y %d))" % (data, pos.x, pos.y)) | for obj in self.objects.get_objects(): badguy = get_python_object(obj.get_metadata()) pos = obj.get_pos() f.write(" (%s (x %d) (y %d))\n" % (badguy.type, pos.x, pos.y)) | def save(self, filename): f = file(filename, 'w') f.write(";; Generated by Flexlay Editor\n" "(supertux-level\n") f.write(" (version 1)\n") f.write(" (name \"%s\")\n" % self.name) f.write(" (author \"%s\")\n" % self.author) f.write(" (width %d)\n" % self.width) f.write(" (height %d)\n" % self.height) | cba6613b98a89504e883f433877d9e98d1b54491 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6395/cba6613b98a89504e883f433877d9e98d1b54491/supertux.py |
make_metadata(object[0]))) | make_metadata(BadGuy(object[0])))) | def __init__(self, tileset, gui): self.selector_window = Panel(CL_Rect(CL_Point(800-134, 23+33), CL_Size(128 + 6, 558)), gui.get_component()) self.tileselector = TileSelector(CL_Rect(CL_Point(3, 3), CL_Size(128, 552)), self.selector_window) self.tileselector.set_tileset(tileset) self.tileselector.set_tiles(range(1,100)... | cba6613b98a89504e883f433877d9e98d1b54491 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6395/cba6613b98a89504e883f433877d9e98d1b54491/supertux.py |
self.foreground = TilemapLayer(tileset, self.width, self.height) | self.foreground = TilemapLayer(supertux_tileset, self.width, self.height) | def __init__(self, filename): print "SuperTuxLevel:__init__" self.me = self | 05a8d4b12cb2ff47384f9003192268f87fa16086 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6395/05a8d4b12cb2ff47384f9003192268f87fa16086/supertux.py |
self.interactive = TilemapLayer(tileset, self.width, self.height) | self.interactive = TilemapLayer(supertux_tileset, self.width, self.height) | def __init__(self, filename): print "SuperTuxLevel:__init__" self.me = self | 05a8d4b12cb2ff47384f9003192268f87fa16086 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6395/05a8d4b12cb2ff47384f9003192268f87fa16086/supertux.py |
self.background = TilemapLayer(tileset, self.width, self.height) | self.background = TilemapLayer(supertux_tileset, self.width, self.height) | def __init__(self, filename): print "SuperTuxLevel:__init__" self.me = self | 05a8d4b12cb2ff47384f9003192268f87fa16086 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6395/05a8d4b12cb2ff47384f9003192268f87fa16086/supertux.py |
workspace.set_current_map(self.editormap) | workspace.set_map(self.editormap) | def activate(self, workspace): #editor_tilemap_set_current(self.interactive.to_layer()) workspace.set_current_map(self.editormap) | 05a8d4b12cb2ff47384f9003192268f87fa16086 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6395/05a8d4b12cb2ff47384f9003192268f87fa16086/supertux.py |
window = CL_Window(CL_Rect(50, 50, 350, 300), "My Window", gui.get_component()) | def __init__(self): self.tileselector_window = CL_Window(CL_Rect(CL_Point(150, 150), CL_Size(210, 210)), "Tile Selector", gui.get_component()) self.tileselector = TileSelector(5, 3, self.tileselector_window.get_client_area()) self.tileselector.set_tileset(tileset) self.tileselector.set_tiles(range(1,100)) | 15a625105deac2c4f1e5d80bcf212e1fc5fd1332 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6395/15a625105deac2c4f1e5d80bcf212e1fc5fd1332/supertux.py | |
def load_game_tiles(tileset, filename): tree = sexpr_read_from_file(filename) tree = tree[1:] for i in tree: if i[0] == "tile": data = i[1:] id = get_value_from_tree(['id', '_'], data, -1) image = get_value_from_tree(['editor-images', '_'], data, False) if not(image): image = get_value_from_tree(['images', '_'], d... | 43b90ffa52b9aa64a24adec670111ff4dee36213 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6395/43b90ffa52b9aa64a24adec670111ff4dee36213/editor.py | ||
def load_game_tiles(tileset, filename): tree = sexpr_read_from_file(filename) tree = tree[1:] for i in tree: if i[0] == "tile": data = i[1:] id = get_value_from_tree(['id', '_'], data, -1) image = get_value_from_tree(['editor-images', '_'], data, False) if not(image): image = get_value_from_tree(['images', '_'], d... | 43b90ffa52b9aa64a24adec670111ff4dee36213 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6395/43b90ffa52b9aa64a24adec670111ff4dee36213/editor.py | ||
def load_game_tiles(tileset, filename): tree = sexpr_read_from_file(filename) tree = tree[1:] for i in tree: if i[0] == "tile": data = i[1:] id = get_value_from_tree(['id', '_'], data, -1) image = get_value_from_tree(['editor-images', '_'], data, False) if not(image): image = get_value_from_tree(['images', '_'], d... | 43b90ffa52b9aa64a24adec670111ff4dee36213 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6395/43b90ffa52b9aa64a24adec670111ff4dee36213/editor.py | ||
def __init__(self, filename): print "SuperTuxLevel:__init__" self.me = self tree = sexpr_read_from_file(filename) data = tree[1:] | 43b90ffa52b9aa64a24adec670111ff4dee36213 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6395/43b90ffa52b9aa64a24adec670111ff4dee36213/editor.py | ||
editor = Editor() gui = editor.get_gui_manager() editor_map = EditorMapComponent(CL_Rect(0, 0, 799, 599), gui.get_component()) workspace = Workspace(799, 599) editor_map.set_workspace(workspace) m = EditorMap() workspace.set_current_map(m) | def activate(self, workspace): #editor_tilemap_set_current(self.interactive.to_layer()) workspace.set_current_map(self.editormap) | 43b90ffa52b9aa64a24adec670111ff4dee36213 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6395/43b90ffa52b9aa64a24adec670111ff4dee36213/editor.py | |
tilemap = TilemapLayer(tileset, 20, 10) m.add_layer(tilemap.to_layer()) tile = Tile("/home/ingo/cvs/supertux/supertux/data/images/tilesets/bonus1.png", CL_Color(255, 255, 255, 255), CL_Color(255, 0, 0, 128)) tileset.add_tile(0, tile) tileset.add_tile(1, tile) tileset.add_tile(2, tile) | def activate(self, workspace): #editor_tilemap_set_current(self.interactive.to_layer()) workspace.set_current_map(self.editormap) | 43b90ffa52b9aa64a24adec670111ff4dee36213 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6395/43b90ffa52b9aa64a24adec670111ff4dee36213/editor.py | |
TilemapLayer_set_current(tilemap) tilemap_paint_tool_set_tilemap(tilemap) editor_set_brush_tile(1) def foo(): print "---My Callback---" gui.quit() g = None def draw_something(): print "Draw something" brush = TileBrush(2, 2) brush.set_opaque() _ = PaintCommand(tilemap, brush) _.add_point(CL_Point(1,1)) _.add_point(... | def do_editor(): editor = Editor() gui = editor.get_gui_manager() editor_map = EditorMapComponent(CL_Rect(0, 0, 799, 599), gui.get_component()) workspace = Workspace(799, 599) editor_map.set_workspace(workspace) m = EditorMap() workspace.set_current_map(m) tilemap = TilemapLayer(tileset, 20, 10) m.add_layer(tilemap... | def activate(self, workspace): #editor_tilemap_set_current(self.interactive.to_layer()) workspace.set_current_map(self.editormap) | 43b90ffa52b9aa64a24adec670111ff4dee36213 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6395/43b90ffa52b9aa64a24adec670111ff4dee36213/editor.py |
self.author = get_value_from_tree(["name", "_"], data, "no author") | self.author = get_value_from_tree(["author", "_"], data, "no author") | def __init__(self, *params): if len(params) == 2: (width, height) = params self.name = "No Name" self.author = "No Author" | d2471da187236e19e40ebee19818bbfbfa26569b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6395/d2471da187236e19e40ebee19818bbfbfa26569b/supertux.py |
f.write(" (%s (x %d) (y %d))\n" % (badguy.type, pos.x, pos.y)) | if (badguy.type != "resetpoint"): f.write(" (%s (x %d) (y %d))\n" % (badguy.type, pos.x, pos.y)) f.write(" )\n\n") f.write(" (reset-points\n") for obj in self.objects.get_objects(): badguy = get_python_object(obj.get_metadata()) pos = obj.get_pos() if (badguy.type == "resetpoint"): f.write(" (point (x %d)... | def save(self, filename): f = file(filename, 'w') f.write(";; Generated by Flexlay Editor\n" "(supertux-level\n") f.write(" (version 1)\n") f.write(" (name \"%s\")\n" % self.name) f.write(" (author \"%s\")\n" % self.author) f.write(" (width %d)\n" % self.width) f.write(" (height %d)\n" % self.height) | d2471da187236e19e40ebee19818bbfbfa26569b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6395/d2471da187236e19e40ebee19818bbfbfa26569b/supertux.py |
PART_REGEXP = re.compile(r'^(?:\*\*\*|-->)\s.*(quit|left)') | PART_REGEXP = re.compile(r'^(?:\*\*\*|<--)\s.*(quit|left)') | def __repr__(self): return self.value | cf4766a5ac913594bcf6b23b643082bf0dbef7e6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9464/cf4766a5ac913594bcf6b23b643082bf0dbef7e6/irclog2html.py |
for filename in sorted(glob.glob(os.path.join(logfile_path, '*.log'))): | files = glob.glob(os.path.join(logfile_path, '*.log')) files.sort() for filename in files: | def search_irc_logs(query, stats=None): if not stats: stats = SearchStats() # will be discarded, but, oh, well query = query.lower() for filename in sorted(glob.glob(os.path.join(logfile_path, '*.log'))): date = date_from_filename(filename) link = link_from_filename(filename) stats.files += 1 for time, event, info in L... | 31611d4df6fd69740dcaaf4f20b54d1c9d189643 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9464/31611d4df6fd69740dcaaf4f20b54d1c9d189643/irclogsearch.py |
self.navbar(prev, index, next) | self.navbar(self.prev, self.index, self.next) | def foot(self): print >> self.outfile, self.suffix self.navbar(prev, index, next) print >> self.outfile, """ | babbdd40a3787aebac49db515737be23863262cb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9464/babbdd40a3787aebac49db515737be23863262cb/irclog2html.py |
nick_old = m.group(1) nick_new = m.group(2) | oldnick = m.group(1) newnick = m.group(2) | def __iter__(self): for line in self.infile: line = line.rstrip('\r\n') if not line: continue | e4d2cf6685ed86ab9635938c8b5f004133b7f2d0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9464/e4d2cf6685ed86ab9635938c8b5f004133b7f2d0/irclog2html.py |
def nickchange(self, oldnick, newnick): | def change(self, oldnick, newnick): | def nickchange(self, oldnick, newnick): if oldnick in self.nick_colour: self.nick_colour[newnick] = self.nick_colour.pop(oldnick) | e4d2cf6685ed86ab9635938c8b5f004133b7f2d0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9464/e4d2cf6685ed86ab9635938c8b5f004133b7f2d0/irclog2html.py |
if time: | if time: | def servermsg(self, time, what, text): """Output a generic server message. | 6676e2400f0ca3479cc06dc09d9e8288ea884518 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9464/6676e2400f0ca3479cc06dc09d9e8288ea884518/irclog2html.py |
'<a href="t | '<a href=" | def nicktext(self, time, nick, text, htmlcolour): """Output a comment uttered by someone. | 6676e2400f0ca3479cc06dc09d9e8288ea884518 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9464/6676e2400f0ca3479cc06dc09d9e8288ea884518/irclog2html.py |
if time: | if time: | def servermsg(self, time, what, text): text = escape(text) text = createlinks(text) | 6676e2400f0ca3479cc06dc09d9e8288ea884518 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9464/6676e2400f0ca3479cc06dc09d9e8288ea884518/irclog2html.py |
if time: | if time: | def nicktext(self, time, nick, text, htmlcolour): nick = escape(nick) text = escape(text) text = createlinks(text) text = text.replace(' ', ' ') | 6676e2400f0ca3479cc06dc09d9e8288ea884518 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9464/6676e2400f0ca3479cc06dc09d9e8288ea884518/irclog2html.py |
md.push(treeData) | md._push(treeData) | def tpRender(self, md, section, args): data=[] try: # see if we are being run as a sub-document root=md['tree-root-url'] url=md['tree-item-url'] state=md['tree-state'] or md['state'] substate=md['-tree-substate-'] colspan=md['tree-colspan'] level=md['tree-level'] except KeyError: # Check for collapse all, expand all, ... | 4bfabee08bc58b7d857ce85c5add2cdd6cc571dd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/4bfabee08bc58b7d857ce85c5add2cdd6cc571dd/TreeTag.py |
finally: md.pop(1) | finally: md._pop(1) | def tpRender(self, md, section, args): data=[] try: # see if we are being run as a sub-document root=md['tree-root-url'] url=md['tree-item-url'] state=md['tree-state'] or md['state'] substate=md['-tree-substate-'] colspan=md['tree-colspan'] level=md['tree-level'] except KeyError: # Check for collapse all, expand all, ... | 4bfabee08bc58b7d857ce85c5add2cdd6cc571dd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/4bfabee08bc58b7d857ce85c5add2cdd6cc571dd/TreeTag.py |
md.push(treeData) | md._push(treeData) | def tpRenderTABLE(self, root_url, url, state, substate, data, colspan, section, md, treeData, level=0, args=None): have_arg=args.has_key try: items=self.tpValues() except: items=None if not items and have_arg('leaves'): items=1 tpUrl=self.tpURL() url = (url and ('%s/%s' % (url, tpUrl))) or tpUrl treeData['tree-ite... | 4bfabee08bc58b7d857ce85c5add2cdd6cc571dd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/4bfabee08bc58b7d857ce85c5add2cdd6cc571dd/TreeTag.py |
md.pop(1) | md._pop(1) | def tpRenderTABLE(self, root_url, url, state, substate, data, colspan, section, md, treeData, level=0, args=None): have_arg=args.has_key try: items=self.tpValues() except: items=None if not items and have_arg('leaves'): items=1 tpUrl=self.tpURL() url = (url and ('%s/%s' % (url, tpUrl))) or tpUrl treeData['tree-ite... | 4bfabee08bc58b7d857ce85c5add2cdd6cc571dd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/4bfabee08bc58b7d857ce85c5add2cdd6cc571dd/TreeTag.py |
md.push(treeData) | md._push(treeData) | def tpRenderTABLE(self, root_url, url, state, substate, data, colspan, section, md, treeData, level=0, args=None): have_arg=args.has_key try: items=self.tpValues() except: items=None if not items and have_arg('leaves'): items=1 tpUrl=self.tpURL() url = (url and ('%s/%s' % (url, tpUrl))) or tpUrl treeData['tree-ite... | 4bfabee08bc58b7d857ce85c5add2cdd6cc571dd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/4bfabee08bc58b7d857ce85c5add2cdd6cc571dd/TreeTag.py |
md.pop(1) | md._pop(1) | def tpRenderTABLE(self, root_url, url, state, substate, data, colspan, section, md, treeData, level=0, args=None): have_arg=args.has_key try: items=self.tpValues() except: items=None if not items and have_arg('leaves'): items=1 tpUrl=self.tpURL() url = (url and ('%s/%s' % (url, tpUrl))) or tpUrl treeData['tree-ite... | 4bfabee08bc58b7d857ce85c5add2cdd6cc571dd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/4bfabee08bc58b7d857ce85c5add2cdd6cc571dd/TreeTag.py |
i = rfind(name, ":") + 1 | i = name.rfind(":") + 1 | def attrAction(self, item): name, value, action = item[:3] if action == 1 or (action > 1 and not self.showtal): return 0, name, value macs = self.macroStack if action == 2 and self.metal and macs: if len(macs) > 1 or not macs[-1][2]: # Drop all METAL attributes at a use-depth above one. return 0, name, value # Clear 'e... | e2dfd2194a3f95622d4450c302e4764f1bb245a7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/e2dfd2194a3f95622d4450c302e4764f1bb245a7/TALInterpreter.py |
if self.html and lower(name) in BOOLEAN_HTML_ATTRS: | if self.html and name.lower() in BOOLEAN_HTML_ATTRS: | def attrAction_tal(self, item): name, value, action = item[:3] if action > 1: return self.attrAction(item) ok = 1 if self.html and lower(name) in BOOLEAN_HTML_ATTRS: evalue = self.engine.evaluateBoolean(item[3]) if evalue is self.Default: if action == 1: # Cancelled insert ok = 0 elif evalue: value = None else: ok = 0 ... | e2dfd2194a3f95622d4450c302e4764f1bb245a7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/e2dfd2194a3f95622d4450c302e4764f1bb245a7/TALInterpreter.py |
i = rfind(s, '\n') | i = s.rfind('\n') | def do_insertText_tal(self, stuff): text = self.engine.evaluateText(stuff[0]) if text is None: return if text is self.Default: self.interpret(stuff[1]) return s = escape(text) self._stream_write(s) i = rfind(s, '\n') if i < 0: self.col = self.col + len(s) else: self.col = len(s) - (i + 1) | e2dfd2194a3f95622d4450c302e4764f1bb245a7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/e2dfd2194a3f95622d4450c302e4764f1bb245a7/TALInterpreter.py |
return sys.modules[__name__].__path__[0] | m=sys.modules[__name__] if hasattr(m,'__path__'): return m.__path__[0] return sys.modules[__name__[:rfind(__name__,'.')]].__path__[0] | def package_home(globals_dict): __name__=globals_dict['__name__'] return sys.modules[__name__].__path__[0] | 495d69c21a221e8cca9a5b933a8ee9a01aa13e62 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/495d69c21a221e8cca9a5b933a8ee9a01aa13e62/Globals.py |
self.notifyAdd(item) | def new(self, key): | 18641731f655985768112dae1780da7904a4576e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/18641731f655985768112dae1780da7904a4576e/Transience.py | |
if self._addCallback: | callback = self._addCallback if type(callback) is type(''): callback = self.aq_parent.unrestrictedTraverse(callback) if callable(callback): | def notifyAdd(self, item): if self._addCallback: try: self._addCallback(item, self) # Use self as context except: pass # Eat all errors | 18641731f655985768112dae1780da7904a4576e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/18641731f655985768112dae1780da7904a4576e/Transience.py |
self._addCallback(item, self) | callback(item, self) | def notifyAdd(self, item): if self._addCallback: try: self._addCallback(item, self) # Use self as context except: pass # Eat all errors | 18641731f655985768112dae1780da7904a4576e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/18641731f655985768112dae1780da7904a4576e/Transience.py |
if self._delCallback: | callback = self._delCallback if type(callback) is type(''): callback = self.aq_parent.unrestrictedTraverse(callback) if callable(callback): | def notifyDestruct(self, item): if self._delCallback: try: self._delCallback(item, self) # Use self as context except: pass # Eat all errors | 18641731f655985768112dae1780da7904a4576e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/18641731f655985768112dae1780da7904a4576e/Transience.py |
self._delCallback(item, self) | callback(item, self) | def notifyDestruct(self, item): if self._delCallback: try: self._delCallback(item, self) # Use self as context except: pass # Eat all errors | 18641731f655985768112dae1780da7904a4576e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/18641731f655985768112dae1780da7904a4576e/Transience.py |
self.notifyDestruct(index[k]) | self.notifyDestruct(index[k][k]) | def _clean(self, b, index): | 18641731f655985768112dae1780da7904a4576e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/18641731f655985768112dae1780da7904a4576e/Transience.py |
cmdline = ( '%s -c "from Zope import configure;' | cmdline = ( '%s -c "from Zope2 import configure;' | def get_startup_cmd(self, python, more): cmdline = ( '%s -c "from Zope import configure;' 'configure(\'%s\');' % (python, self.options.configfile) ) return cmdline + more + '\"' | 95fe803925ed402191819cde6a9cba503aeab5c4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/95fe803925ed402191819cde6a9cba503aeab5c4/zopectl.py |
$Id: Publish.py,v 1.36 1997/03/20 22:31:46 jim Exp $""" | $Id: Publish.py,v 1.37 1997/03/26 19:05:56 jim Exp $""" | def taste(spam): "a favorable reviewer" return spam,'yum yum, I like ' + spam | 09f5b1db455435c5f09abbc280b9c25669d23fd1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/09f5b1db455435c5f09abbc280b9c25669d23fd1/Publish.py |
__version__='$Revision: 1.36 $'[11:-2] | __version__='$Revision: 1.37 $'[11:-2] | def taste(spam): "a favorable reviewer" return spam,'yum yum, I like ' + spam | 09f5b1db455435c5f09abbc280b9c25669d23fd1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/09f5b1db455435c5f09abbc280b9c25669d23fd1/Publish.py |
query['self']=parents[0] | selfarg=parents[0] for i in range(len(parents)): try: p=parents[i].aq_self parents[i]=p except: pass | def function_with_empty_signature(): pass | 09f5b1db455435c5f09abbc280b9c25669d23fd1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/09f5b1db455435c5f09abbc280b9c25669d23fd1/Publish.py |
if name_index < nrequired: | if argument_name=='self': args.append(selfarg) elif name_index < nrequired: | def function_with_empty_signature(): pass | 09f5b1db455435c5f09abbc280b9c25669d23fd1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/09f5b1db455435c5f09abbc280b9c25669d23fd1/Publish.py |
def doc_img( self, s, expr1=re.compile('\"([ _a-zA-Z0-9*.:/;,\-\n\~]+)\":img:([a-zA-Z0-9\-.:/;,\n\~]+)').search, expr2=re.compile('\"([ _a-zA-Z0-9*.:/;,\-\n\~]+)\":img:([a-zA-Z0-9\-.:/;,\n\~]+):([a-zA-Z0-9\-.:/;,\n\~]+)').search ): | 1cddf0c9bdfb194e2398d17770298b8b3745d84b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/1cddf0c9bdfb194e2398d17770298b8b3745d84b/DocumentWithImages.py | ||
startk, endk = r.span(2) starth, endh = r.span(3) | starth, endh = r.span(2) | def doc_img( self, s, expr1=re.compile('\"([ _a-zA-Z0-9*.:/;,\-\n\~]+)\":img:([a-zA-Z0-9\-.:/;,\n\~]+)').search, expr2=re.compile('\"([ _a-zA-Z0-9*.:/;,\-\n\~]+)\":img:([a-zA-Z0-9\-.:/;,\n\~]+):([a-zA-Z0-9\-.:/;,\n\~]+)').search ): | 1cddf0c9bdfb194e2398d17770298b8b3745d84b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/1cddf0c9bdfb194e2398d17770298b8b3745d84b/DocumentWithImages.py |
return (StructuredTextImage(s[startt:endt], href=s[starth:endh], key=s[startk:endk]), | return (StructuredTextImage(s[startt:endt], href=s[starth:endh]), | def doc_img( self, s, expr1=re.compile('\"([ _a-zA-Z0-9*.:/;,\-\n\~]+)\":img:([a-zA-Z0-9\-.:/;,\n\~]+)').search, expr2=re.compile('\"([ _a-zA-Z0-9*.:/;,\-\n\~]+)\":img:([a-zA-Z0-9\-.:/;,\n\~]+):([a-zA-Z0-9\-.:/;,\n\~]+)').search ): | 1cddf0c9bdfb194e2398d17770298b8b3745d84b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/1cddf0c9bdfb194e2398d17770298b8b3745d84b/DocumentWithImages.py |
else: r=expr1(s) | return None | def doc_img( self, s, expr1=re.compile('\"([ _a-zA-Z0-9*.:/;,\-\n\~]+)\":img:([a-zA-Z0-9\-.:/;,\n\~]+)').search, expr2=re.compile('\"([ _a-zA-Z0-9*.:/;,\-\n\~]+)\":img:([a-zA-Z0-9\-.:/;,\n\~]+):([a-zA-Z0-9\-.:/;,\n\~]+)').search ): | 1cddf0c9bdfb194e2398d17770298b8b3745d84b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/1cddf0c9bdfb194e2398d17770298b8b3745d84b/DocumentWithImages.py |
if r: startt, endt = r.span(1) starth, endh = r.span(2) start, end = r.span() return (StructuredTextImage(s[startt:endt], href=s[starth:endh]), start, end) return None | def doc_img( self, s, expr1=re.compile('\"([ _a-zA-Z0-9*.:/;,\-\n\~]+)\":img:([a-zA-Z0-9\-.:/;,\n\~]+)').search, expr2=re.compile('\"([ _a-zA-Z0-9*.:/;,\-\n\~]+)\":img:([a-zA-Z0-9\-.:/;,\n\~]+):([a-zA-Z0-9\-.:/;,\n\~]+)').search ): | 1cddf0c9bdfb194e2398d17770298b8b3745d84b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/1cddf0c9bdfb194e2398d17770298b8b3745d84b/DocumentWithImages.py | |
try: src=self(REQUEST, src__=1) if find(src,'\0'): src=join(split(src,'\0'),'\n'+'-'*60+'\n') result=self(REQUEST) if result._searchable_result_columns(): r=custom_default_report(self.id, result) else: r='This was not a query.' except: r=( '<strong>Error, <em>%s</em>:</strong> %s' % (sys.exc_type, sys.exc_value)) repo... | t=v=tb=None try: try: src=self(REQUEST, src__=1) if find(src,'\0'): src=join(split(src,'\0'),'\n'+'-'*60+'\n') result=self(REQUEST) if result._searchable_result_columns(): r=custom_default_report(self.id, result) else: r='This was not a query.' except: t, v, tb = sys.exc_info() r='<strong>Error, <em>%s</em>:</strong> %... | def manage_test(self, REQUEST): | 72c4bde3885179772b8dd6e2d69e07dc1aa79fdc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/72c4bde3885179772b8dd6e2d69e07dc1aa79fdc/DA.py |
self.assertEqual(starter.startup_handler.level, logging.DEBUG) | self.assertEqual(starter.startup_handler.level, 15) | def testSetupStartupHandler(self): import zLOG import sys conf = self.load_config_text(""" instancehome <<INSTANCE_HOME>> debug-mode on <eventlog> level info <logfile> path <<INSTANCE_HOME>>/event.log level info </logfile> </eventlog>""") starter = ZopeStarter(conf) starter.setupStartupHandler() self.assert_(not zLOG._... | 359b97aaf7503f7f4b58e23b4ff89ac0b8c2b176 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/359b97aaf7503f7f4b58e23b4ff89ac0b8c2b176/testStarter.py |
self.assertEqual(zLOG.EventLogger.EventLogger.logger.level, logging.DEBUG) self.assertEqual(starter.startup_handler.level, logging.DEBUG) | def testSetupStartupHandler(self): import zLOG import sys conf = self.load_config_text(""" instancehome <<INSTANCE_HOME>> debug-mode on <eventlog> level info <logfile> path <<INSTANCE_HOME>>/event.log level info </logfile> </eventlog>""") starter = ZopeStarter(conf) starter.setupStartupHandler() self.assert_(not zLOG._... | 359b97aaf7503f7f4b58e23b4ff89ac0b8c2b176 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/359b97aaf7503f7f4b58e23b4ff89ac0b8c2b176/testStarter.py | |
debug-mode off | debug-mode off | def testSetupConfiguredLoggers(self): import zLOG import logging import sys conf = self.load_config_text(""" instancehome <<INSTANCE_HOME>> debug-mode off <eventlog> level info <logfile> path <<INSTANCE_HOME>>/event.log level info </logfile> </eventlog> <logger access> level info <logfile> path <<INSTANCE_HOME>>/Z2.log... | 359b97aaf7503f7f4b58e23b4ff89ac0b8c2b176 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/359b97aaf7503f7f4b58e23b4ff89ac0b8c2b176/testStarter.py |
print id(A) print A | def __str__(self): context=getattr(self, 'aq_parent', None) if context is None: return self.__name__ return "(%s: %s of %s)" % (uid(self), self.aq_self, context) | d0e91377c6facafac5dc0acc57312f54bde08f69 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/d0e91377c6facafac5dc0acc57312f54bde08f69/test_AqAlg.py | |
class ExternalMethod(OFS.SimpleItem.Item, Persistent, Explicit, | class ExternalMethod(OFS.SimpleItem.Item, Persistent, Acquisition.Explicit, | def manage_addExternalMethod(self, id, title, module, function, REQUEST=None): """Add an external method to a folder Un addition to the standard Principia object-creation arguments, 'id' and title, the following arguments are defined: function -- The name of the python function. This can be a an ordinary Python funct... | a00ac2fa672bc196265ece86e47442336f3c44f9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/a00ac2fa672bc196265ece86e47442336f3c44f9/ExternalMethod.py |
def isFolderish(self): return self.getClassAttr('isPrincipiaFolderish', 0) | def isFolderish(self): return self.getClassAttr('isPrincipiaFolderish', 0, 1) | def isFolderish(self): return self.getClassAttr('isPrincipiaFolderish', 0) | 802ecdcf72a4edfea6253dd24fa957c122b14336 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/802ecdcf72a4edfea6253dd24fa957c122b14336/ObjectManager.py |
def addIndex(self, name, type,extra=None): # Convert the type by finding an appropriate product which supports # this interface by that name. Bleah | 23927884a0274df201d06bf46b30e30c89eacf13 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/23927884a0274df201d06bf46b30e30c89eacf13/ZCatalog.py | ||
index = base(name, self) | index = base(name) | def addIndex(self, name, type,extra=None): # Convert the type by finding an appropriate product which supports # this interface by that name. Bleah | 23927884a0274df201d06bf46b30e30c89eacf13 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/23927884a0274df201d06bf46b30e30c89eacf13/ZCatalog.py |
if 0 and Globals.DevelopmentMode: try: mtime=os.stat(self.file) except: mtime=0 if mtime != self._v_last_read: self.obj = open(self.file).read() self._v_last_read=mtime self.reindex_object() | self._check_for_update() | def index_html(self, REQUEST=None): "View the Help Topic" if 0 and Globals.DevelopmentMode: try: mtime=os.stat(self.file) except: mtime=0 if mtime != self._v_last_read: self.obj = open(self.file).read() self._v_last_read=mtime self.reindex_object() | 63acae73ea281ab2508c6c35fbbdfe55f6fd5ac5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/63acae73ea281ab2508c6c35fbbdfe55f6fd5ac5/HelpTopic.py |
if 0 and Globals.DevelopmentMode: try: mtime=os.stat(self.file) except: mtime=0 if mtime != self._v_last_read: self.obj = open(self.file).read() self._v_last_read=mtime self.reindex_object() | self._check_for_update() | def index_html(self, REQUEST=None): """ View the STX Help Topic """ if 0 and Globals.DevelopmentMode: try: mtime=os.stat(self.file) except: mtime=0 if mtime != self._v_last_read: self.obj = open(self.file).read() self._v_last_read=mtime self.reindex_object() | 63acae73ea281ab2508c6c35fbbdfe55f6fd5ac5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/63acae73ea281ab2508c6c35fbbdfe55f6fd5ac5/HelpTopic.py |
if 0 and Globals.DevelopmentMode: try: mtime=os.stat(self.file) except: mtime=0 if mtime != self._v_last_read: self.obj = open(self.file).read() self._v_last_read=mtime self.reindex_object() | self._check_for_update() | def index_html(self, REQUEST, RESPONSE): "View the Help Topic" if 0 and Globals.DevelopmentMode: try: mtime=os.stat(self.file) except: mtime=0 if mtime != self._v_last_read: self.obj = open(self.file).read() self._v_last_read=mtime self.reindex_object() | 63acae73ea281ab2508c6c35fbbdfe55f6fd5ac5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/63acae73ea281ab2508c6c35fbbdfe55f6fd5ac5/HelpTopic.py |
self.__app._manage_add_product_meta_type( | app._manage_add_product_meta_type( | def registerClass(self, instance_class=None, meta_type='', permission=None, constructors=(), icon=None, permissions=None, legacy=(), ): """Register a constructor | a3bd01a812c00af3ceacad81e9adb4aa0d4ff1cd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/a3bd01a812c00af3ceacad81e9adb4aa0d4ff1cd/ProductContext.py |
meta_type='', CreateFactory=1, REQUEST=None): | meta_type='', CreateFactory=0, REQUEST=None): | def manage_addZClass(self, id, title='', baseclasses=[], meta_type='', CreateFactory=1, REQUEST=None): """Add a Z Class """ bases=[] for b in baseclasses: if Products.meta_classes.has_key(b): bases.append(Products.meta_classes[b]) else: bases.append(getattr(self, b)) Z=ZClass(id,title,bases) if meta_type: Z._zclass_.m... | 86cc67d44d194cdca703de85c83e57863ac59c4a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/86cc67d44d194cdca703de85c83e57863ac59c4a/ZClass.py |
bases.append(getattr(self, b)) | bases.append(self._getOb(b)) | def manage_addZClass(self, id, title='', baseclasses=[], meta_type='', CreateFactory=1, REQUEST=None): """Add a Z Class """ bases=[] for b in baseclasses: if Products.meta_classes.has_key(b): bases.append(Products.meta_classes[b]) else: bases.append(getattr(self, b)) Z=ZClass(id,title,bases) if meta_type: Z._zclass_.m... | 86cc67d44d194cdca703de85c83e57863ac59c4a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/86cc67d44d194cdca703de85c83e57863ac59c4a/ZClass.py |
d=parse_cookie(self.environ['HTTP_COOKIE']) for k,item in d.items(): cookies[k]=item if not form.has_key(k): form[k]=item | parse_cookie(self.environ['HTTP_COOKIE'],cookies) for k,item in cookies.items(): if not other.has_key(k): other[k]=item | def __init__(self, | 15388227e36ab34c95c423a0656f48390c69411b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/15388227e36ab34c95c423a0656f48390c69411b/Publish.py |
if hasattr(self, 'getSize'): RESPONSE.setHeader('Content-Length', absattr(self.getSize)) | else: url=urlfix(REQUEST['URL'], 'HEAD') name=filter(None, string.split(url, '/'))[-1] ct, ce=mimetypes.guess_type(name) ct=ct or 'application/octet-stream' ct=string.lower(ct) RESPONSE.setHeader('Content-Type', ct) if hasattr(aq_base(self), 'get_size'): RESPONSE.setHeader('Content-Length', absattr(self.get_size)) if ... | def HEAD(self, REQUEST, RESPONSE): """Retrieve resource information without a response body.""" self.dav__init(REQUEST, RESPONSE) if hasattr(self, 'content_type'): RESPONSE.setHeader('Content-Type', absattr(self.content_type)) if hasattr(self, 'getSize'): RESPONSE.setHeader('Content-Length', absattr(self.getSize)) RESP... | 690e647709ef6e4f3b76bdb4526272659e0efef0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/690e647709ef6e4f3b76bdb4526272659e0efef0/Resource.py |
product=self.aq_acquire('_getProducts')()._product(name) dispatcher=FactoryDispatcher(product, self.aq_parent) return dispatcher.__of__(self) | return self.__bobo_traverse__(None, name) | def __getitem__(self, name): product=self.aq_acquire('_getProducts')()._product(name) dispatcher=FactoryDispatcher(product, self.aq_parent) return dispatcher.__of__(self) | a593fea82fd275dda0573d6b643f08fb9cf2e980 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/a593fea82fd275dda0573d6b643f08fb9cf2e980/FactoryDispatcher.py |
dispatcher=FactoryDispatcher(product, self.aq_parent, REQUEST) | dispatcher_class=getattr( getattr(Products, name, None), '__FactoryDispatcher__', FactoryDispatcher) dispatcher=dispatcher_class(product, self.aq_parent, REQUEST) | def __bobo_traverse__(self, REQUEST, name): product=self.aq_acquire('_getProducts')()._product(name) dispatcher=FactoryDispatcher(product, self.aq_parent, REQUEST) return dispatcher.__of__(self) | a593fea82fd275dda0573d6b643f08fb9cf2e980 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/a593fea82fd275dda0573d6b643f08fb9cf2e980/FactoryDispatcher.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.