rem
stringlengths
1
226k
add
stringlengths
0
227k
context
stringlengths
6
326k
meta
stringlengths
143
403
input_ids
listlengths
256
256
attention_mask
listlengths
256
256
labels
listlengths
128
128
self.copyHtmlFile(libraryName, versionName, variant, demoVersion, demoBrowser)
self.copyHtmlFile(libraryName, versionName, variant.name, buildTarget, demoBrowser) demoData = self.getDemoData(libraryName, versionName, variant.name) versionData["tests"].append(demoData)
def buildAllDemos(self, demoVersion="build", demoBrowser=None, copyDemos=False): if demoBrowser: demoBrowser = os.path.abspath(demoBrowser) console.info("Generating demos for all known libraries") repositoryData = [] console.indent() for libraryName in self.libraries: library = self.libraries[libraryName] libraryData = { "classname": libraryName, "children" : [] } validDemo = False for versionName in library: version = library[versionName] versionData = { "classname" : versionName, "tags" : [libraryName], "tests" : [], "manifest" : version.getManifest() } qooxdooVersions = version.getManifest()["info"]["qooxdoo-versions"] for ver in qooxdooVersions: versionData["tags"].append("qxVersion_" + ver) # getting the library's top-level readme here since we only have path # information for the library versions if not "readme" in libraryData: libDir = os.path.dirname(version.path) readme = self.getReadmeContent(libDir) if readme: libraryData["readme"] = readme else: libraryData["readme"] = "No readme file found." # get the version's readme if not "readme" in versionData: readme = self.getReadmeContent(version.path) if readme: versionData["readme"] = readme else: versionData["readme"] = "No readme file found." if not version.hasDemoDir: continue demoVariants = version.getDemoVariants() if not demoVariants: continue for variant in demoVariants: # source/build dirs at this level means the demo has a non-standard structure if variant == "source" or variant == "build": continue status = version.buildDemo(variant, demoVersion) #DEBUG: #status = {"buildError" : None} if demoBrowser and not status["buildError"]: if copyDemos: sourceDir = os.path.join(version.path, "demo", variant, demoVersion) targetDir = os.path.join(demoBrowser, demoVersion, "demo", libraryName, versionName, variant) #self.copyDemo(sourceDir, targetDir) copier = CopyTool() copier.parse_args(["-u", sourceDir, targetDir]) copier.do_work() self.copyHtmlFile(libraryName, versionName, variant, demoVersion, demoBrowser, local=True) else: self.copyHtmlFile(libraryName, versionName, variant, demoVersion, demoBrowser) demoData = self.getDemoData(libraryName, versionName, variant) demoData["manifest"] = version.getDemoManifest(variant) versionData["tests"].append(demoData) validDemo = True if validDemo: libraryData["children"].append(versionData) repositoryData.append(libraryData)
610bd392cd356830d4652a775532be95d83a132a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5718/610bd392cd356830d4652a775532be95d83a132a/repository.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 1595, 15058, 538, 12, 2890, 16, 21477, 1444, 1546, 3510, 3113, 21477, 9132, 33, 7036, 16, 1610, 15058, 538, 33, 8381, 4672, 309, 21477, 9132, 30, 21477, 9132, 273, 1140, 18, 803, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 1595, 15058, 538, 12, 2890, 16, 21477, 1444, 1546, 3510, 3113, 21477, 9132, 33, 7036, 16, 1610, 15058, 538, 33, 8381, 4672, 309, 21477, 9132, 30, 21477, 9132, 273, 1140, 18, 803, 1...
self.add_module(filename)
self.add_module(filename, check=1)
def _browse_module(self, *e): ftypes = [('Python module', '.py'), ('All files', '*')] filename = askopenfilename(filetypes=ftypes, defaultextension='.py') if not filename: return self.add_module(filename)
4cf6d74130c32443c10897614b39d1c2c512796c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11420/4cf6d74130c32443c10897614b39d1c2c512796c/gui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 25731, 67, 2978, 12, 2890, 16, 380, 73, 4672, 284, 2352, 273, 306, 2668, 15774, 1605, 2187, 2418, 2074, 19899, 7707, 1595, 1390, 2187, 5306, 25887, 1544, 273, 6827, 3190, 3459, 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, 389, 25731, 67, 2978, 12, 2890, 16, 380, 73, 4672, 284, 2352, 273, 306, 2668, 15774, 1605, 2187, 2418, 2074, 19899, 7707, 1595, 1390, 2187, 5306, 25887, 1544, 273, 6827, 3190, 3459, 12, ...
Returns triple (g,s,t) such that `g = s*a+t*b = gcd(a,b)`.
Returns triple ``(g,s,t)`` such that `g = s\*a+t\*b = \mathop{\mathrm{gcd}}(a,b)`.
def xgcd(a, b): """ Returns triple (g,s,t) such that `g = s*a+t*b = gcd(a,b)`. INPUT: - ``a, b`` - integers or univariate polynomials (or any type with an xgcd method). OUTPUT: - ``g, s, t`` - such that g = s\*a + t\*b .. note:: There is no guarantee that the returned cofactors (s and t) are minimal. In the integer case, see Integer._xgcd() for minimal cofactors. EXAMPLES:: sage: xgcd(56, 44) (4, 4, -5) sage: 4*56 + (-5)*44 4 sage: g, a, b = xgcd(5/1, 7/1); g, a, b (1, 3, -2) sage: a*(5/1) + b*(7/1) == g True sage: x = polygen(QQ) sage: xgcd(x^3 - 1, x^2 - 1) (x - 1, 1, -x) sage: K.<g> = NumberField(x^2-3) sage: R.<a,b> = K[] sage: S.<y> = R.fraction_field()[] sage: xgcd(y^2, a*y+b) (b^2/a^2, 1, ((-1)/a)*y + b/a^2) sage: xgcd((b+g)*y^2, (a+g)*y+b) ((b^3 + (g)*b^2)/(a^2 + (2*g)*a + 3), 1, ((-b + (-g))/(a + (g)))*y + (b^2 + (g)*b)/(a^2 + (2*g)*a + 3)) """ try: return a.xgcd(b) except AttributeError: pass if not isinstance(a, sage.rings.integer.Integer): a = ZZ(a) return a.xgcd(ZZ(b))
08206c95546f1db2a947692b19f3ca4ec939d5d9 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/08206c95546f1db2a947692b19f3ca4ec939d5d9/arith.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 619, 75, 4315, 12, 69, 16, 324, 4672, 3536, 2860, 14543, 12176, 12, 75, 16, 87, 16, 88, 13, 10335, 4123, 716, 1375, 75, 273, 272, 64, 14, 69, 15, 88, 64, 14, 70, 273, 521, 15949, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 619, 75, 4315, 12, 69, 16, 324, 4672, 3536, 2860, 14543, 12176, 12, 75, 16, 87, 16, 88, 13, 10335, 4123, 716, 1375, 75, 273, 272, 64, 14, 69, 15, 88, 64, 14, 70, 273, 521, 15949, ...
sysv,sysu,sysa = _mac_ver_lookup(('sysv','sysu','sysa'))
sysv,sysa = _mac_ver_lookup(('sysv','sysa'))
def mac_ver(release='',versioninfo=('','',''),machine=''): """ Get MacOS version information and return it as tuple (release, versioninfo, machine) with versioninfo being a tuple (version, dev_stage, non_release_version). Entries which cannot be determined are set to the paramter values which default to ''. All tuple entries are strings. Thanks to Mark R. Levinson for mailing documentation links and code examples for this function. Documentation for the gestalt() API is available online at: http://www.rgaros.nl/gestalt/ """ # Check whether the version info module is available try: import gestalt import MacOS except ImportError: return release,versioninfo,machine # Get the infos sysv,sysu,sysa = _mac_ver_lookup(('sysv','sysu','sysa')) # Decode the infos if sysv: major = (sysv & 0xFF00) >> 8 minor = (sysv & 0x00F0) >> 4 patch = (sysv & 0x000F) if (major, minor) >= (10, 4): # the 'sysv' gestald cannot return patchlevels # higher than 9. Apple introduced 3 new # gestalt codes in 10.4 to deal with this # issue (needed because patch levels can # run higher than 9, such as 10.4.11) major,minor,patch = _mac_ver_lookup(('sys1','sys2','sys3')) release = '%i.%i.%i' %(major, minor, patch) else: release = '%s.%i.%i' % (_bcd2str(major),minor,patch) if sysu: # NOTE: this block is left as documentation of the # intention of this function, the 'sysu' gestalt is no # longer available and there are no alternatives. major = int((sysu & 0xFF000000L) >> 24) minor = (sysu & 0x00F00000) >> 20 bugfix = (sysu & 0x000F0000) >> 16 stage = (sysu & 0x0000FF00) >> 8 nonrel = (sysu & 0x000000FF) version = '%s.%i.%i' % (_bcd2str(major),minor,bugfix) nonrel = _bcd2str(nonrel) stage = {0x20:'development', 0x40:'alpha', 0x60:'beta', 0x80:'final'}.get(stage,'') versioninfo = (version,stage,nonrel) if sysa: machine = {0x1: '68k', 0x2: 'PowerPC', 0xa: 'i386'}.get(sysa,'') return release,versioninfo,machine
713b19562ddadec8e0cdf9b8c6d197f41fb283e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3187/713b19562ddadec8e0cdf9b8c6d197f41fb283e0/platform.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5318, 67, 502, 12, 9340, 2218, 2187, 1589, 1376, 33, 2668, 17023, 2187, 6309, 3631, 9149, 2218, 11, 4672, 225, 3536, 968, 13217, 4618, 1177, 1779, 471, 327, 518, 487, 3193, 261, 9340, 16...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5318, 67, 502, 12, 9340, 2218, 2187, 1589, 1376, 33, 2668, 17023, 2187, 6309, 3631, 9149, 2218, 11, 4672, 225, 3536, 968, 13217, 4618, 1177, 1779, 471, 327, 518, 487, 3193, 261, 9340, 16...
names.append('z') if 'z1' in self.getcdf().variables: names.append('z1')
ncvars = self.getcdf().variables if self.hname in ncvars and self.elevname in ncvars: names.append('z') if 'z1' in self.getcdf().variables: names.append('z1')
def getVariableNames_raw(self): names = list(NetCDFStore.getVariableNames_raw(self)) names.append('z') # Only add alternative depth coordinate if it is actually used in the NetCDF file. # (note: GETM does not use it, but GOTM does) if 'z1' in self.getcdf().variables: names.append('z1') return names
ee2b18a734892a1bffad705826e29486ec831008 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/381/ee2b18a734892a1bffad705826e29486ec831008/data.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13522, 1557, 67, 1899, 12, 2890, 4672, 1257, 273, 666, 12, 7308, 39, 4577, 2257, 18, 588, 3092, 1557, 67, 1899, 12, 2890, 3719, 1257, 18, 6923, 2668, 94, 6134, 225, 468, 5098, 527, 103...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 13522, 1557, 67, 1899, 12, 2890, 4672, 1257, 273, 666, 12, 7308, 39, 4577, 2257, 18, 588, 3092, 1557, 67, 1899, 12, 2890, 3719, 1257, 18, 6923, 2668, 94, 6134, 225, 468, 5098, 527, 103...
text = cgi.escape(fl.read(n))
text = fl.read(n)
def filerevision(self, f, node): fl = self.repo.file(f) n = bin(node) text = cgi.escape(fl.read(n)) changerev = fl.linkrev(n) cl = self.repo.changelog cn = cl.node(changerev) cs = cl.read(cn) p1, p2 = fl.parents(n) t = float(cs[2].split(' ')[0]) mfn = cs[0]
67df6715c948c4f7c6d7d2e72c3c108141d13150 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11312/67df6715c948c4f7c6d7d2e72c3c108141d13150/hgweb.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 661, 822, 2820, 12, 2890, 16, 284, 16, 756, 4672, 1183, 273, 365, 18, 7422, 18, 768, 12, 74, 13, 290, 273, 4158, 12, 2159, 13, 977, 273, 1183, 18, 896, 12, 82, 13, 9435, 822, 90, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 661, 822, 2820, 12, 2890, 16, 284, 16, 756, 4672, 1183, 273, 365, 18, 7422, 18, 768, 12, 74, 13, 290, 273, 4158, 12, 2159, 13, 977, 273, 1183, 18, 896, 12, 82, 13, 9435, 822, 90, ...
p = path[1:] if p and p[-1] != "/": p += "/" l = len(p)
if path and path[-1] != "/": path += "/" l = len(path) abspath = "/" + path
def manifest(self, ctx, path): mf = ctx.manifest() node = ctx.node()
8cd3bcd6805318c02bbc054a6543b549daaf60a9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11312/8cd3bcd6805318c02bbc054a6543b549daaf60a9/hgweb_mod.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5643, 12, 2890, 16, 1103, 16, 589, 4672, 14749, 273, 1103, 18, 14357, 1435, 756, 273, 1103, 18, 2159, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5643, 12, 2890, 16, 1103, 16, 589, 4672, 14749, 273, 1103, 18, 14357, 1435, 756, 273, 1103, 18, 2159, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
Search \Sage librrary source code for lines containing \code{string}.
Search \Sage library source code for lines containing \code{string}.
def search_src(string, extra1='', extra2='', extra3='', extra4='', extra5='', interact=True): r""" Search \Sage librrary source code for lines containing \code{string}. The search is not case sensitive. INPUT: -- string: a string to find in the \Sage source code. -- extra1, ..., extra5: additional strings to require. NOTE: The extraN parameters are present only because search_src(string, *extras, interact=None) is not parsed correctly by Python 2.6; see http://bugs.python.org/issue1909. EXAMPLES: sage: print search_src(" fetch(", "def", interact=False) # random # long matrix/matrix0.pyx: cdef fetch(self, key): matrix/matrix0.pxd: cdef fetch(self, key) sage: print search_src(" fetch(", "def", interact=False) # random # long matrix/matrix0.pyx: cdef fetch(self, key): matrix/matrix0.pxd: cdef fetch(self, key) sage: print search_src(" fetch(", "def", "pyx", interact=False) # random # long matrix/matrix0.pyx: cdef fetch(self, key): """ cmd = 'sage -grep "%s"' % string for extra in [ extra1, extra2, extra3, extra4, extra5 ]: if not extra: continue cmd += '| grep "%s"' % extra r = os.popen(cmd).read() if not interact: return r from sage.server.support import EMBEDDED_MODE if EMBEDDED_MODE: # I.e., running from the notebook print format_search_as_html('Source Code', r, string + extra) else: from sage.misc.all import pager pager()(r)
434b765cfe24dbe02cee3c598641104087ccb55d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/434b765cfe24dbe02cee3c598641104087ccb55d/sagedoc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1623, 67, 4816, 12, 1080, 16, 2870, 21, 2218, 2187, 2870, 22, 2218, 2187, 2870, 23, 2218, 2187, 2870, 24, 2218, 2187, 2870, 25, 2218, 2187, 16592, 33, 5510, 4672, 436, 8395, 5167, 521, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 67, 4816, 12, 1080, 16, 2870, 21, 2218, 2187, 2870, 22, 2218, 2187, 2870, 23, 2218, 2187, 2870, 24, 2218, 2187, 2870, 25, 2218, 2187, 16592, 33, 5510, 4672, 436, 8395, 5167, 521, ...
CleanAll = 0 for t in args: t = t.lower() if t == 'genc': GenC = 1 elif t == 'genmake': GenMake = 1 elif t == 'cleanall': CleanAll = 1
All = 0 t = t.lower() if t == 'genc': GenC = 1 elif t == 'genmake': GenMake = 1 elif t == '' or t == 'all': All = 1
def Process(ModuleFile, PlatformFile, ewb, opt, args, StartTime): t = str(' '.join(args)) GenC = 0 GenMake = 0 CleanAll = 0 for t in args: t = t.lower() if t == 'genc': GenC = 1 elif t == 'genmake': GenMake = 1 elif t == 'cleanall': CleanAll = 1
f6fa8f13c92899402ca363e2f27f994ff988148c /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/914/f6fa8f13c92899402ca363e2f27f994ff988148c/Bld.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4389, 12, 3120, 812, 16, 11810, 812, 16, 22722, 70, 16, 2153, 16, 833, 16, 28043, 4672, 225, 268, 273, 609, 2668, 2418, 5701, 12, 1968, 3719, 10938, 39, 273, 374, 10938, 6464, 273, 374...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4389, 12, 3120, 812, 16, 11810, 812, 16, 22722, 70, 16, 2153, 16, 833, 16, 28043, 4672, 225, 268, 273, 609, 2668, 2418, 5701, 12, 1968, 3719, 10938, 39, 273, 374, 10938, 6464, 273, 374...
job.runningJob['schedulerId'] = jobAttributes[ job['name'] ]
def submit ( self, obj, requirements='' ) : """ set up submission parameters and submit """
c2af932155b0254b34396ef56160a5241a3874b1 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8886/c2af932155b0254b34396ef56160a5241a3874b1/Scheduler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4879, 261, 365, 16, 1081, 16, 8433, 2218, 11, 262, 294, 3536, 444, 731, 8515, 1472, 471, 4879, 3536, 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, 4879, 261, 365, 16, 1081, 16, 8433, 2218, 11, 262, 294, 3536, 444, 731, 8515, 1472, 471, 4879, 3536, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
def __init__(self, poly, prec, halt, print_mode, names): prec = prec // poly.degree() ntl_poly = ntl_ZZ_pX([a.lift() for a in poly.list()], poly.base_ring().prime()**prec)
def __init__(self, prepoly, poly, prec, halt, print_mode, shift_seed, names): unram_prec = (prec + poly.degree() - 1) // poly.degree() ntl_poly = ntl_ZZ_pX([a.lift() for a in poly.list()], poly.base_ring().prime()**unram_prec) shift_poly = ntl_ZZ_pX([a.lift() for a in shift_seed.list()], shift_seed.base_ring().prime()**unram_prec)
def __init__(self, poly, prec, halt, print_mode, names): prec = prec // poly.degree() ntl_poly = ntl_ZZ_pX([a.lift() for a in poly.list()], poly.base_ring().prime()**prec) #print poly.base_ring().prime(), prec, poly.degree(), ntl_poly # deal with prec not a multiple of e better. self.prime_pow = PowComputer_ext_maker(poly.base_ring().prime(), max(min(prec - 1, 30), 1), prec, False, ntl_poly, "FM", "e") EisensteinExtensionGeneric.__init__(self, poly, prec, print_mode, names, EisensteinFixedModElement)
0f057e2127f2ea6d70a9e20884218a7ef6dea886 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/0f057e2127f2ea6d70a9e20884218a7ef6dea886/padic_extension_leaves.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 675, 16353, 16, 7573, 16, 13382, 16, 18389, 16, 1172, 67, 3188, 16, 4654, 67, 12407, 16, 1257, 4672, 640, 1940, 67, 4036, 273, 261, 4036, 397, 7573, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 675, 16353, 16, 7573, 16, 13382, 16, 18389, 16, 1172, 67, 3188, 16, 4654, 67, 12407, 16, 1257, 4672, 640, 1940, 67, 4036, 273, 261, 4036, 397, 7573, 18, ...
rendered = tag(added, added and remvd and '; ', remvd)
rendered = tag(added, added and remvd and _("; "), remvd)
def _render_property_diff(self, req, ticket, field, old, new, resource_new=None): rendered = None # per type special rendering of diffs type_ = None for f in ticket.fields: if f['name'] == field: type_ = f['type'] break if type_ == 'checkbox': rendered = new == '1' and _('set') or _('unset') elif type_ == 'textarea': if not resource_new: rendered = _('modified') else: href = get_resource_url(self.env, resource_new, req.href, action='diff') # TRANSLATOR: modified ('diff') (link) diff = tag.a(_('diff'), href=href) rendered = tag_('modified (%(diff)s)', diff=diff)
a8a6442302dc21bfc63206a71113b0375cb3c946 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9317/a8a6442302dc21bfc63206a71113b0375cb3c946/web_ui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5902, 67, 4468, 67, 5413, 12, 2890, 16, 1111, 16, 9322, 16, 652, 16, 1592, 16, 394, 16, 1058, 67, 2704, 33, 7036, 4672, 7935, 273, 599, 468, 1534, 618, 4582, 9782, 434, 15250, 6...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5902, 67, 4468, 67, 5413, 12, 2890, 16, 1111, 16, 9322, 16, 652, 16, 1592, 16, 394, 16, 1058, 67, 2704, 33, 7036, 4672, 7935, 273, 599, 468, 1534, 618, 4582, 9782, 434, 15250, 6...
self.targets.add(dbsgmlfile, [sourcefile.file_only], [Command('wt2db -n -s ' + dbsgmlfile + ' -o ' + sourcefile.file_only, errors_to='wt2db.log', stderr_check=1)])
self.targets.add(dbsgmlfile, [sourcefile.file_only], [Command('wt2db -n -s ' + sourcefile.file_only + ' -o ' + dbsgmlfile, output_to='log/wt2db.log', stderr_check=1)])
def __init__(self, doc_id): self.doc_id = int(doc_id) self.doc = lampadas.docs[self.doc_id] self.workdir = config.cache_dir + str(self.doc_id) + '/work/' self.filename = '' self.targets = Targets() # If the file is not to be published (Archived or Normal status), # or if it has not been mirrored successfully, skip it. if (self.doc.pub_status_code<>'A' and self.doc.pub_status_code<>'N') \ or (self.doc.mirror_time==''): return
c5cf8f4ae1a429b28e984120fcb3d9f85cb106ab /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6947/c5cf8f4ae1a429b28e984120fcb3d9f85cb106ab/Makefile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 997, 67, 350, 4672, 365, 18, 2434, 67, 350, 273, 509, 12, 2434, 67, 350, 13, 365, 18, 2434, 273, 328, 931, 361, 345, 18, 8532, 63, 2890, 18, 2434, 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, 1001, 2738, 972, 12, 2890, 16, 997, 67, 350, 4672, 365, 18, 2434, 67, 350, 273, 509, 12, 2434, 67, 350, 13, 365, 18, 2434, 273, 328, 931, 361, 345, 18, 8532, 63, 2890, 18, 2434, 67...
if type(obj) == types.ModuleType:
if isinstance(obj, types.ModuleType):
def loadTestsFromName(self, name, module=None): """Return a suite of all tests cases given a string specifier.
dae1a6a4889a67d29c7e1638472625cc4ca3cdf3 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8546/dae1a6a4889a67d29c7e1638472625cc4ca3cdf3/unittest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1262, 14650, 29732, 12, 2890, 16, 508, 16, 1605, 33, 7036, 4672, 3536, 990, 279, 11371, 434, 777, 7434, 6088, 864, 279, 533, 24562, 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, 1262, 14650, 29732, 12, 2890, 16, 508, 16, 1605, 33, 7036, 4672, 3536, 990, 279, 11371, 434, 777, 7434, 6088, 864, 279, 533, 24562, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100,...
i_next = oldI[ c1+2 ] if len( oldI ) > c1+2 else len( self )
if len( oldI ) > c1+2: i_next = oldI[ c1+2 ] else: i_next = len( self )
def mergeChains( self, c1, id='', segid='', rmOxt=True, renumberAtoms=False, renumberResidues=True): """ Merge two adjacent chains. This merely removes all internal markers for a chain boundary. Atom content or coordinates are not modified.
30315f0376caff0228230982275607bab8580692 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/482/30315f0376caff0228230982275607bab8580692/PDBModel.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2691, 15945, 12, 365, 16, 276, 21, 16, 612, 2218, 2187, 2291, 350, 2218, 2187, 6692, 51, 15239, 33, 5510, 16, 1654, 1226, 14280, 33, 8381, 16, 1654, 1226, 607, 350, 3610, 33, 5510, 467...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2691, 15945, 12, 365, 16, 276, 21, 16, 612, 2218, 2187, 2291, 350, 2218, 2187, 6692, 51, 15239, 33, 5510, 16, 1654, 1226, 14280, 33, 8381, 16, 1654, 1226, 607, 350, 3610, 33, 5510, 467...
lwords.append((term, methods[rank_method_code]["rnkWORD_table"]))
lwords.append((term, methods[rank_method_code]["rnkWORD_table"]))
def word_similarity(rank_method_code, lwords, hitset, rank_limit_relevance,verbose): """Ranking a records containing specified words and returns a sorted list. input: rank_method_code - the code of the method, from the name field in rnkMETHOD lwords - a list of words from the query hitset - a list of hits for the query found by search_engine rank_limit_relevance - show only records with a rank value above this verbose - verbose value output: reclist - a list of sorted records: [[23,34], [344,24], [1,01]] prefix - what to show before the rank value postfix - what to show after the rank value voutput - contains extra information, content dependent on verbose value""" global voutput startCreate = time.time() if verbose > 0: voutput += "<br>Running rank method: %s, using word_frequency function in bibrank_record_sorter<br>" % rank_method_code lwords_old = lwords lwords = [] #Check terms, remove non alphanumeric characters. Use both unstemmed and stemmed version of all terms. for i in range(0, len(lwords_old)): term = string.lower(lwords_old[i]) if not methods[rank_method_code]["stopwords"] == "True" or methods[rank_method_code]["stopwords"] and not is_stopword(term, 1): lwords.append((term, methods[rank_method_code]["rnkWORD_table"])) terms = string.split(string.lower(re.sub(methods[rank_method_code]["chars_alphanumericseparators"], ' ', term))) for term in terms: if methods[rank_method_code].has_key("stemmer"): # stem word term = stem(string.replace(term, ' ', ''), methods[rank_method_code]["stemmer"]) if lwords_old[i] != term: #add if stemmed word is different than original word lwords.append((term, methods[rank_method_code]["rnkWORD_table"])) (recdict, rec_termcount, lrecIDs_remove) = ({}, {}, {}) #For each term, if accepted, get a list of the records using the term #calculate then relevance for each term before sorting the list of records for (term, table) in lwords: term_recs = run_sql("""SELECT term, hitlist FROM %s WHERE term=%s""", (methods[rank_method_code]["rnkWORD_table"], term)) if term_recs: #if term exists in database, use for ranking term_recs = deserialize_via_marshal(term_recs[0][1]) (recdict, rec_termcount) = calculate_record_relevance((term, int(term_recs["Gi"][1])) , term_recs, hitset, recdict, rec_termcount, verbose, quick=None) del term_recs if len(recdict) == 0 or (len(lwords) == 1 and lwords[0] == ""): return (None, "Records not ranked. The query is not detailed enough, or not enough records found, for ranking to be possible.", "", voutput) else: #sort if we got something to sort (reclist, hitset) = sort_record_relevance(recdict, rec_termcount, hitset, rank_limit_relevance, verbose) #Add any documents not ranked to the end of the list if hitset: hitset.calculate_nbhits() lrecIDs = hitset.tolist() #using 2-3mb reclist = zip(lrecIDs, [0] * len(lrecIDs)) + reclist #using 6mb if verbose > 0: voutput += "<br>Current number of recIDs: %s<br>" % (methods[rank_method_code]["col_size"]) voutput += "Number of terms: %s<br>" % run_sql("SELECT count(id) FROM %s" % methods[rank_method_code]["rnkWORD_table"])[0][0] voutput += "Terms: %s<br>" % lwords voutput += "Prepare and pre calculate time: %s<br>" % (str(time.time() - startCreate)) voutput += "Total time used: %s<br>" % (str(time.time() - startCreate)) rank_method_stat(rank_method_code, reclist, lwords) return (reclist, methods[rank_method_code]["prefix"], methods[rank_method_code]["postfix"], voutput)
65057a59d7844e5dc821df793923e70a6a071b3b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12027/65057a59d7844e5dc821df793923e70a6a071b3b/bibrank_record_sorter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2076, 67, 22985, 560, 12, 11500, 67, 2039, 67, 710, 16, 328, 3753, 16, 6800, 542, 16, 6171, 67, 3595, 67, 16599, 5882, 16, 11369, 4672, 3536, 12925, 310, 279, 3853, 4191, 1269, 4511, 4...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2076, 67, 22985, 560, 12, 11500, 67, 2039, 67, 710, 16, 328, 3753, 16, 6800, 542, 16, 6171, 67, 3595, 67, 16599, 5882, 16, 11369, 4672, 3536, 12925, 310, 279, 3853, 4191, 1269, 4511, 4...
res = self._query(req)
res = self._query( req )
def getDistinctPrognosis(self): """ Get a list of all the current problematic types """ req = "SELECT DISTINCT Prognosis from Problematics;" res = self._query(req) if not res['OK']: return res if not res['Value'][0]: return S_OK() prognosisList = [] for prognosis in res['Value'][0]: prognosisList.append(prognosis) return S_OK(prognosisList)
c0ad35468416f798369c9462d5f8a11a19686a43 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/c0ad35468416f798369c9462d5f8a11a19686a43/DataIntegrityDB.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2343, 376, 7694, 626, 1600, 538, 291, 12, 2890, 4672, 3536, 968, 279, 666, 434, 777, 326, 783, 6199, 2126, 1953, 3536, 1111, 273, 315, 4803, 23286, 1186, 1600, 538, 291, 628, 21685, 270,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2343, 376, 7694, 626, 1600, 538, 291, 12, 2890, 4672, 3536, 968, 279, 666, 434, 777, 326, 783, 6199, 2126, 1953, 3536, 1111, 273, 315, 4803, 23286, 1186, 1600, 538, 291, 628, 21685, 270,...
elif afeElement not in self.parser.activeFormattingElements:
elif afeElement not in self.parser.openElements:
def endTagFormatting(self, name): """The much-feared adoption agency algorithm""" afeElement = self.parser.elementInActiveFormattingElements(name) if not afeElement or (afeElement in self.parser.openElements and not self.parser.elementInScope(afeElement)): self.parser.parseError() return elif afeElement not in self.parser.activeFormattingElements: self.parser.parseError() self.parser.activeFormattingElements.remove(afeElement) return
8bba3576f693fe36a77f0bcdc248cfe7c5a6dbde /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9368/8bba3576f693fe36a77f0bcdc248cfe7c5a6dbde/parser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 29765, 23974, 12, 2890, 16, 508, 4672, 3536, 1986, 9816, 17, 3030, 2258, 1261, 3482, 1737, 2075, 4886, 8395, 279, 3030, 1046, 273, 365, 18, 4288, 18, 2956, 382, 3896, 23974, 3471, 12, 52...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 29765, 23974, 12, 2890, 16, 508, 4672, 3536, 1986, 9816, 17, 3030, 2258, 1261, 3482, 1737, 2075, 4886, 8395, 279, 3030, 1046, 273, 365, 18, 4288, 18, 2956, 382, 3896, 23974, 3471, 12, 52...
print "Intel CPU detected, using psyco charge profiler."
def activatePsyco(): # Get cpu type info = os.uname() cpu = info[-1] # Activate only if we are on an Intel Mac. if cpu == 'i386': try: import psyco print "Intel CPU detected, using psyco charge profiler." psyco.profile() except: pass
c5b81d9e5854907622f0f9defbdf6f6bf0e1cfbc /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12354/c5b81d9e5854907622f0f9defbdf6f6bf0e1cfbc/Miro.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10235, 52, 9009, 2894, 13332, 468, 968, 8326, 618, 1123, 273, 1140, 18, 318, 339, 1435, 8326, 273, 1123, 18919, 21, 65, 225, 468, 30936, 1338, 309, 732, 854, 603, 392, 3094, 292, 13217, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 10235, 52, 9009, 2894, 13332, 468, 968, 8326, 618, 1123, 273, 1140, 18, 318, 339, 1435, 8326, 273, 1123, 18919, 21, 65, 225, 468, 30936, 1338, 309, 732, 854, 603, 392, 3094, 292, 13217, ...
("dict", "__init__"): "(self, *args, **kwargs)",
("dict", "__init__"): "(self, seq=None, **kwargs)",
def outDocAttr(self, p_object, indent, p_class=None): if hasattr(p_object, "__doc__"): the_doc = p_object.__doc__ if p_class and the_doc == object.__init__.__doc__ and p_object is not object.__init__ and p_class.__doc__: the_doc = p_class.__doc__ # replace stock init's doc with class's the_doc += "\n# (copied from class doc)" self.outDocstring(the_doc, indent) else: self.out("# no doc", indent)
a88fb5099426bad579e4e28f8695975a4ae3c8aa /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12157/a88fb5099426bad579e4e28f8695975a4ae3c8aa/generator3.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 596, 1759, 3843, 12, 2890, 16, 293, 67, 1612, 16, 3504, 16, 293, 67, 1106, 33, 7036, 4672, 309, 3859, 12, 84, 67, 1612, 16, 10425, 2434, 14437, 4672, 326, 67, 2434, 273, 293, 67, 161...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 596, 1759, 3843, 12, 2890, 16, 293, 67, 1612, 16, 3504, 16, 293, 67, 1106, 33, 7036, 4672, 309, 3859, 12, 84, 67, 1612, 16, 10425, 2434, 14437, 4672, 326, 67, 2434, 273, 293, 67, 161...
Checks if the lock file exists """ return os.path.exists(get_lockname())
Checks if another instance of this code is running. See http://code.activestate.com/recipes/546512/ """ lockname = get_lockname() if os.path.exists(lockname): pid=open(lockname, 'r').read().strip() pidRunning=commands.getoutput('ls /proc | grep %s' % pid) if pidRunning: return pid else: return None return None
def check_lock(): """ Checks if the lock file exists """ return os.path.exists(get_lockname())
220a011764b979db0735a926a9c357f113032bd5 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5758/220a011764b979db0735a926a9c357f113032bd5/pylal_exttrig_llutils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 739, 13332, 3536, 13074, 309, 4042, 791, 434, 333, 981, 353, 3549, 18, 2164, 1062, 2207, 710, 18, 11422, 395, 340, 18, 832, 19, 266, 3449, 281, 19, 6564, 9222, 2138, 19, 3536,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 67, 739, 13332, 3536, 13074, 309, 4042, 791, 434, 333, 981, 353, 3549, 18, 2164, 1062, 2207, 710, 18, 11422, 395, 340, 18, 832, 19, 266, 3449, 281, 19, 6564, 9222, 2138, 19, 3536,...
day_id = self.getRequiredTextFromCell(sh, row, 0)
if data['model'] == 'WeeklyTimetableModel': day_id = self.getWeeklyDayId(sh, row, 0) else: day_id = self.getRequiredTextFromCell(sh, row, 0)
def import_school_timetable(self, sh, row): num_errors = len(self.errors) data = {} data['title'] = self.getRequiredTextFromCell(sh, row, 1) data['__name__'] = self.getRequiredTextFromCell(sh, row+1, 1) data['school_year'] = self.getRequiredTextFromCell(sh, row+2, 1) data['model'] = self.getRequiredTextFromCell(sh, row+3, 1) if num_errors < len(self.errors): return
e866f69737046ff6dd0ad5d28cbc44e235fb6cb3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7127/e866f69737046ff6dd0ad5d28cbc44e235fb6cb3/importer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1930, 67, 28204, 1371, 67, 8584, 278, 429, 12, 2890, 16, 699, 16, 1027, 4672, 818, 67, 4324, 273, 562, 12, 2890, 18, 4324, 13, 501, 273, 2618, 501, 3292, 2649, 3546, 273, 365, 18, 58...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1930, 67, 28204, 1371, 67, 8584, 278, 429, 12, 2890, 16, 699, 16, 1027, 4672, 818, 67, 4324, 273, 562, 12, 2890, 18, 4324, 13, 501, 273, 2618, 501, 3292, 2649, 3546, 273, 365, 18, 58...
sorted_edges_iterator=iter(sorted(self.edges(), cmp=cmp))
sorted_edges_iterator=iter(sorted(self.edges(), cmp=lambda x,y: cmp(weight_function(x),weight_function(y))))
def min_spanning_tree(self, weight_function=lambda e: 1, algorithm='Kruskal', starting_vertex=None ): """ Returns the edges of a minimum spanning tree, if one exists, otherwise returns False.
ba77682fec95ae8e4e7909d908eb8fc4fb23dae6 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/ba77682fec95ae8e4e7909d908eb8fc4fb23dae6/graph.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1131, 67, 1752, 10903, 67, 3413, 12, 2890, 16, 3119, 67, 915, 33, 14661, 425, 30, 404, 16, 4886, 2218, 47, 8010, 79, 287, 2187, 5023, 67, 15281, 33, 7036, 262, 30, 3536, 2860, 326, 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, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1131, 67, 1752, 10903, 67, 3413, 12, 2890, 16, 3119, 67, 915, 33, 14661, 425, 30, 404, 16, 4886, 2218, 47, 8010, 79, 287, 2187, 5023, 67, 15281, 33, 7036, 262, 30, 3536, 2860, 326, 5...
allowed_force_states = { 'completed' : ['completing'],
allowed_force_states = { 'completed' : ['completing','failed'],
def fail(self,force=False): """Deprecated. Use force_status('failed') instead.""" raise JobError('fail() method is deprecated, use force_status("failed") instead.')
19cf05b37da27d4cf6a59e27bd5e829dd26d81b2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1488/19cf05b37da27d4cf6a59e27bd5e829dd26d81b2/Job.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2321, 12, 2890, 16, 5734, 33, 8381, 4672, 3536, 13534, 18, 2672, 2944, 67, 2327, 2668, 7307, 6134, 3560, 12123, 1002, 3956, 668, 2668, 6870, 1435, 707, 353, 6849, 16, 999, 2944, 67, 2327...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2321, 12, 2890, 16, 5734, 33, 8381, 4672, 3536, 13534, 18, 2672, 2944, 67, 2327, 2668, 7307, 6134, 3560, 12123, 1002, 3956, 668, 2668, 6870, 1435, 707, 353, 6849, 16, 999, 2944, 67, 2327...
def make_re(self): dst = self.add_module("re") src = self.r_import("pre") for name in dir(src): if name != "__name__": setattr(dst, name, getattr(src, name))
def make_osname(self): osname = os.name src = __import__(osname) dst = self.copy_only(src, self.ok_posix_names) dst.environ = e = {} for key, value in os.environ.items(): e[key] = value
56b5fdd295d7e4be64036529cbbb6ffd252ac6bc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/56b5fdd295d7e4be64036529cbbb6ffd252ac6bc/rexec.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 67, 538, 529, 12, 2890, 4672, 1140, 529, 273, 1140, 18, 529, 1705, 273, 1001, 5666, 972, 12, 538, 529, 13, 3046, 273, 365, 18, 3530, 67, 3700, 12, 4816, 16, 365, 18, 601, 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, 1221, 67, 538, 529, 12, 2890, 4672, 1140, 529, 273, 1140, 18, 529, 1705, 273, 1001, 5666, 972, 12, 538, 529, 13, 3046, 273, 365, 18, 3530, 67, 3700, 12, 4816, 16, 365, 18, 601, 67, ...
self.assertEquals(1.0, float(ctxt.eval("this.version")))
self.assertEquals(1.0, float(ctxt.eval("this.version")))
def testThis(self): class Global(JSClass): version = 1.0 with JSContext(Global()) as ctxt: self.assertEquals("[object Global]", str(ctxt.eval("this"))) self.assertEquals(1.0, float(ctxt.eval("this.version")))
39238494c6380764c75b46d3d726c011640ecf54 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5828/39238494c6380764c75b46d3d726c011640ecf54/PyV8.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 2503, 12, 2890, 4672, 667, 8510, 12, 6479, 797, 4672, 1177, 273, 404, 18, 20, 225, 598, 6756, 1042, 12, 5160, 10756, 487, 14286, 30, 365, 18, 11231, 8867, 2932, 63, 1612, 8510, 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, 1842, 2503, 12, 2890, 4672, 667, 8510, 12, 6479, 797, 4672, 1177, 273, 404, 18, 20, 225, 598, 6756, 1042, 12, 5160, 10756, 487, 14286, 30, 365, 18, 11231, 8867, 2932, 63, 1612, 8510, 6...
if self.isWriteable(outname, mimetype, filestream): fd = os.fdopen(os.open(outname, os.O_WRONLY | os.O_CREAT, self.permissions), 'w', 0) stream.readIntoFile(filestream, fd)
if self.isSafeToWrite(filename, mimetype, filestream): outname = self.makeUniqueName(filename) fileobject = os.fdopen(os.open(outname, os.O_WRONLY | os.O_CREAT | os.O_EXCL, self.permissions), 'w', 0) stream.readIntoFile(filestream, fileobject)
def writeFile(self, filename, mimetype, fileobject): """does the I/O dirty work after it calls isWriteable to make sure it's safe to write this file """ outname = self.makeUniqueName(os.path.join(self.destination, filename)) filestream = stream.FileStream(fileobject)
4484bc934084bd79c718f3023b2eb4f8ca9e607e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/4484bc934084bd79c718f3023b2eb4f8ca9e607e/static.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13286, 12, 2890, 16, 1544, 16, 12595, 16, 585, 1612, 4672, 3536, 20657, 326, 467, 19, 51, 9603, 1440, 1839, 518, 4097, 353, 3067, 429, 358, 1221, 3071, 518, 1807, 4183, 358, 1045, 333, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13286, 12, 2890, 16, 1544, 16, 12595, 16, 585, 1612, 4672, 3536, 20657, 326, 467, 19, 51, 9603, 1440, 1839, 518, 4097, 353, 3067, 429, 358, 1221, 3071, 518, 1807, 4183, 358, 1045, 333, ...
categories = {} for sec in classes: categories[sec.parent_class.category_id] = {'id': sec.parent_class.category_id, 'category': sec.parent_class.category.category} printers = [ x.name for x in GetNode('V/Publish/Print').children() ] context.update({'prog': prog, 'current_time': curtime, 'classes': classes, 'one': one, 'two': two, 'categories': categories.values(), 'printers': printers})
context.update({'prog': prog, 'current_time': curtime, 'classes': classes, 'one': one, 'two': two})
def cmp_section(one, other): p1 = one.parent_class p2 = other.parent_class if cmp(p1.category.id, p2.category.id) != 0: return cmp(p1.category.id, p2.category.id) else: return cmp(one.start_time(), other.start_time())
ab8839e90cf85f97b4e187fd4636a1edcfe1fd1e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12041/ab8839e90cf85f97b4e187fd4636a1edcfe1fd1e/onsiteclasslist.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9411, 67, 3464, 12, 476, 16, 1308, 4672, 293, 21, 273, 1245, 18, 2938, 67, 1106, 293, 22, 273, 1308, 18, 2938, 67, 1106, 309, 9411, 12, 84, 21, 18, 4743, 18, 350, 16, 293, 22, 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, 9411, 67, 3464, 12, 476, 16, 1308, 4672, 293, 21, 273, 1245, 18, 2938, 67, 1106, 293, 22, 273, 1308, 18, 2938, 67, 1106, 309, 9411, 12, 84, 21, 18, 4743, 18, 350, 16, 293, 22, 18, ...
response = Response(status=405, allowed='POST') response = self.dispatch(request)
response = Response(status=405) else: response = self.dispatch(request)
def __call__(self, environ, start_response): request = Request(environ)
8393ae5d024ab27592d49bf2f495e6144623f543 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12391/8393ae5d024ab27592d49bf2f495e6144623f543/serve.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 5473, 16, 787, 67, 2740, 4672, 590, 273, 1567, 12, 28684, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 5473, 16, 787, 67, 2740, 4672, 590, 273, 1567, 12, 28684, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
rtn = [] for line in text.split('\n'): splitline = [] if len(line.replace('\t', SPACE8)) <= maxheaderlen: splitline.append(line) rtn.append(SEMINLTAB.join(splitline)) else: oldlen = len(line) while len(line) > maxheaderlen: i = line.rfind(';', 0, maxheaderlen) if i < 0: break splitline.append(line[:i]) line = line[i+1:].lstrip() if len(line) <> oldlen: splitline.append(line) rtn.append(SEMINLTAB.join(splitline)) continue parts = re.split(r'(\s+)', line) if parts[0].endswith(':') and len(parts) == 3: rtn.append(line) continue first = parts.pop(0) sublines = [first] acc = len(first) while parts: len0 = len(parts[0]) len1 = len(parts[1]) if acc + len0 + len1 < maxheaderlen: sublines.append(parts.pop(0)) sublines.append(parts.pop(0)) acc += len0 + len1 else: splitline.append(EMPTYSTRING.join(sublines)) del parts[0] first = parts.pop(0) sublines = [first] acc = len(first) splitline.append(EMPTYSTRING.join(sublines)) rtn.append(NLTAB.join(splitline)) return NL.join(rtn)
h = Header(text, maxlinelen=maxheaderlen, continuation_ws='\t') return h.encode()
def _split_header(self, text): maxheaderlen = self.__maxheaderlen # Find out whether any lines in the header are really longer than # maxheaderlen characters wide. There could be continuation lines # that actually shorten it. Also, replace hard tabs with 8 spaces. lines = [s.replace('\t', SPACE8) for s in text.split('\n')] for line in lines: if len(line) > maxheaderlen: break else: # No line was actually longer than maxheaderlen characters, so # just return the original unchanged. return text rtn = [] for line in text.split('\n'): splitline = [] # Short lines can remain unchanged if len(line.replace('\t', SPACE8)) <= maxheaderlen: splitline.append(line) rtn.append(SEMINLTAB.join(splitline)) else: oldlen = len(line) # Try to break the line on semicolons, but if that doesn't # work, try to split on folding whitespace. while len(line) > maxheaderlen: i = line.rfind(';', 0, maxheaderlen) if i < 0: break splitline.append(line[:i]) line = line[i+1:].lstrip() if len(line) <> oldlen: # Splitting on semis worked splitline.append(line) rtn.append(SEMINLTAB.join(splitline)) continue # Splitting on semis didn't help, so try to split on # whitespace. parts = re.split(r'(\s+)', line) # Watch out though for "Header: longnonsplittableline" if parts[0].endswith(':') and len(parts) == 3: rtn.append(line) continue first = parts.pop(0) sublines = [first] acc = len(first) while parts: len0 = len(parts[0]) len1 = len(parts[1]) if acc + len0 + len1 < maxheaderlen: sublines.append(parts.pop(0)) sublines.append(parts.pop(0)) acc += len0 + len1 else: # Split it here, but don't forget to ignore the # next whitespace-only part splitline.append(EMPTYSTRING.join(sublines)) del parts[0] first = parts.pop(0) sublines = [first] acc = len(first) splitline.append(EMPTYSTRING.join(sublines)) rtn.append(NLTAB.join(splitline)) return NL.join(rtn)
9c54d8a782b36e843b35e10a09a65914f90f8757 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/9c54d8a782b36e843b35e10a09a65914f90f8757/Generator.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4939, 67, 3374, 12, 2890, 16, 977, 4672, 943, 3374, 1897, 273, 365, 16186, 1896, 3374, 1897, 468, 4163, 596, 2856, 1281, 2362, 316, 326, 1446, 854, 8654, 7144, 2353, 468, 943, 3374,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4939, 67, 3374, 12, 2890, 16, 977, 4672, 943, 3374, 1897, 273, 365, 16186, 1896, 3374, 1897, 468, 4163, 596, 2856, 1281, 2362, 316, 326, 1446, 854, 8654, 7144, 2353, 468, 943, 3374,...
information
>>> obj.info 'information' >>> v = obj[1:] >>> type(v)
def __array_finalize__(self,obj): # reset the attribute from passed original object self.info = getattr(obj, 'info', None) # We do not need to return anything
aee35b25ca906c24bf067815ab8f989e993590fb /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/14925/aee35b25ca906c24bf067815ab8f989e993590fb/subclassing.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1126, 67, 30343, 972, 12, 2890, 16, 2603, 4672, 468, 2715, 326, 1566, 628, 2275, 2282, 733, 365, 18, 1376, 273, 3869, 12, 2603, 16, 296, 1376, 2187, 599, 13, 468, 1660, 741, 486,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1126, 67, 30343, 972, 12, 2890, 16, 2603, 4672, 468, 2715, 326, 1566, 628, 2275, 2282, 733, 365, 18, 1376, 273, 3869, 12, 2603, 16, 296, 1376, 2187, 599, 13, 468, 1660, 741, 486,...
self.AddToResponse('\n***** End: ' + line) self.AddToResponse('\nThe rest of the message is ignored:')
self.AddToResponse('\n***** End: ' + line + '\n' 'The rest of the message is ignored:')
def ParseMailCommands(self):
5551c37235c9c603bd7ae608093198c4c4d929f5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2120/5551c37235c9c603bd7ae608093198c4c4d929f5/MailCommandHandler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2884, 6759, 9127, 12, 2890, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 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, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2884, 6759, 9127, 12, 2890, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
cif_row["atom1"], cif_row["atom2"], cif_row["atom3"], cif_row["atom4"])
cif_row["atom1"], cif_row["atom2"], cif_row["atom3"], cif_row["atom4"])
def library_construct_monomer_desc(res_name): """Constructs the MonomerDesc object for the given residue name. """ ## return None when the res_name is the empty string if len(res_name) < 1: return None if ALT_RES_NAME_DICT.has_key(res_name): lookup_name = ALT_RES_NAME_DICT[res_name] else: lookup_name = res_name.upper() libfil = library_open_monomer_lib_file(lookup_name) if libfil is None: ConsoleOutput.warning("monomer description not found for '%s'" % (res_name)) return None ## generate monomer description mon_desc = MonomerDesc() ## data from RCSB library rcsb_cif_file = mmCIF.mmCIFFile() rcsb_cif_file.load_file(libfil) rcsb_cif_data = rcsb_cif_file[0] libfil.close() chem_comp = rcsb_cif_data.get_table("chem_comp")[0] mon_desc.res_name = chem_comp.get_lower("res_name") mon_desc.full_name = chem_comp.get_lower("name") mon_desc.type = chem_comp.get_lower("type") mon_desc.pdbx_type = chem_comp.get_lower("pdbx_type") mon_desc.formula = chem_comp.get_lower("formula") mon_desc.rcsb_class_1 = chem_comp.get_lower("rcsb_class_1") chem_comp_atom = rcsb_cif_data.get_table("chem_comp_atom") if chem_comp_atom is not None: for cif_row in chem_comp_atom: name = cif_row.getitem_lower("atom_id") symbol = cif_row.getitem_lower("type_symbol") mon_desc.atom_list.append({"name": name, "symbol": symbol}) mon_desc.atom_dict[name] = symbol try: alt_name = cif_row.getitem_lower("alt_atom_id") except KeyError: pass else: mon_desc.alt_atom_dict[name] = alt_name chem_comp_bond = rcsb_cif_data.get_table("chem_comp_bond") if chem_comp_bond is not None: for cif_row in chem_comp_bond: atom1 = cif_row.getitem_lower("atom_id_1") atom2 = cif_row.getitem_lower("atom_id_2") mon_desc.bond_list.append({"atom1": atom1, "atom2": atom2}) ## data from mmLib supplimental library in mmLib/Monomers/monomers.cif mmlib_cif_data = MMLIB_MONOMERS_CIF.get_data(res_name) if mmlib_cif_data is not None: ## get additional chemical information on amino acids chem_comp = mmlib_cif_data.get_table("chem_comp") if chem_comp is not None: mon_desc.one_letter_code = chem_comp["one_letter_code"] mon_desc.chem_type = chem_comp["chem_type"] ## get torsion angle definitions torsion_angles = mmlib_cif_data.get_table("torsion_angles") if torsion_angles is not None: for cif_row in torsion_angles: mon_desc.torsion_angle_dict[cif_row["name"]] = ( cif_row["atom1"], cif_row["atom2"], cif_row["atom3"], cif_row["atom4"]) ## set some derived flags on the monomer description mon_type = mon_desc.type.upper() if mon_type == "L-PEPTIDE LINKING": mon_desc.amino_acid = True elif mon_type == "DNA LINKING" or mon_type == "RNA LINKING": mon_desc.nucleic_acid = True elif mon_type == "HOH" or mon_type == "WAT": mon_desc.water = True return mon_desc
77a7715eeee16b28eff9bdc43f0f3b82014306ea /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10674/77a7715eeee16b28eff9bdc43f0f3b82014306ea/Library.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5313, 67, 10062, 67, 2586, 362, 264, 67, 5569, 12, 455, 67, 529, 4672, 3536, 13262, 326, 27082, 4217, 733, 364, 326, 864, 14765, 508, 18, 3536, 7541, 327, 599, 1347, 326, 400, 67, 529,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 5313, 67, 10062, 67, 2586, 362, 264, 67, 5569, 12, 455, 67, 529, 4672, 3536, 13262, 326, 27082, 4217, 733, 364, 326, 864, 14765, 508, 18, 3536, 7541, 327, 599, 1347, 326, 400, 67, 529,...
self.assertEquals(results.df_resid(), 31)
self.assertEquals(results.df_resid, 31)
def testARdegenerate(self): X = W((40,10)) X[:,0] = X[:,1] + X[:,2] Y = W((40,)) model = S.regression.ARModel(design=X, rho=0.9) results = model.fit(Y) self.assertEquals(results.df_resid(), 31)
ad1747597131f8eaa72d71751cd5732fe7df3e3c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12658/ad1747597131f8eaa72d71751cd5732fe7df3e3c/test_regression.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 985, 323, 7163, 12, 2890, 4672, 1139, 273, 678, 12443, 7132, 16, 2163, 3719, 1139, 10531, 16, 20, 65, 273, 1139, 10531, 16, 21, 65, 397, 1139, 10531, 16, 22, 65, 1624, 273, 678, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 985, 323, 7163, 12, 2890, 4672, 1139, 273, 678, 12443, 7132, 16, 2163, 3719, 1139, 10531, 16, 20, 65, 273, 1139, 10531, 16, 21, 65, 397, 1139, 10531, 16, 22, 65, 1624, 273, 678, ...
else:
else:
def read(self,size=None):
b16a3b84509f6f66f60bb3c7521b2bee70ac1b1c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/b16a3b84509f6f66f60bb3c7521b2bee70ac1b1c/gzip.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 12, 2890, 16, 1467, 33, 7036, 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, 855, 12, 2890, 16, 1467, 33, 7036, 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, ...
method_name = method_name.value
method_name = method_name.value._str
def _load_func(self, gen, fn, obj, method_name): db = gen.db if fn.value: # Standalone function: find the delegate class and # instantiate it. assert method_name.value is None smimpl = fn.value # ootype._static_meth db.record_delegate(smimpl._TYPE) # _TYPE is a StaticMethod ty = db.record_delegate_standalone_func_impl(smimpl.graph) gen.new_with_jtype(ty) else: # Bound method: create a wrapper bound to the given # object, using the "bind()" static method that bound # method wrapper classes have. INSTANCE = obj.concretetype method_name = method_name.value ty = db.record_delegate_bound_method_impl(INSTANCE, method_name) gen.load(obj) gen.emit(ty.bind_method)
74635f0aa75ab5279112e8c3ec11ec4753ced63d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6934/74635f0aa75ab5279112e8c3ec11ec4753ced63d/metavm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 945, 67, 644, 12, 2890, 16, 3157, 16, 2295, 16, 1081, 16, 707, 67, 529, 4672, 1319, 273, 3157, 18, 1966, 309, 2295, 18, 1132, 30, 468, 934, 464, 12451, 445, 30, 1104, 326, 7152,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 945, 67, 644, 12, 2890, 16, 3157, 16, 2295, 16, 1081, 16, 707, 67, 529, 4672, 1319, 273, 3157, 18, 1966, 309, 2295, 18, 1132, 30, 468, 934, 464, 12451, 445, 30, 1104, 326, 7152,...
tx.setXPos(m)
setXPos(tx,m)
def _centerDrawParaLineX( tx, offset, line, last=0): m = offset+0.5*line.extraSpace tx.setXPos(m) _putFragLine(tx, line.words)
b2cf1e4f93a7f349035e282e7cc45fb5c48720b0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/b2cf1e4f93a7f349035e282e7cc45fb5c48720b0/paragraph.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5693, 6493, 23529, 1670, 60, 12, 2229, 16, 1384, 16, 980, 16, 1142, 33, 20, 4672, 312, 273, 1384, 15, 20, 18, 25, 14, 1369, 18, 7763, 3819, 23733, 1616, 12, 978, 16, 81, 13, 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, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5693, 6493, 23529, 1670, 60, 12, 2229, 16, 1384, 16, 980, 16, 1142, 33, 20, 4672, 312, 273, 1384, 15, 20, 18, 25, 14, 1369, 18, 7763, 3819, 23733, 1616, 12, 978, 16, 81, 13, 3...
if bracketCounter == 0: end -= 1
print(bracketCounter) if bracketCounter == 0: end -= 2 end += 1
def buildCleanExpr(self, expr): self.recursionLevel += 1 expr = expr.replace(" ", "") print(self.getDebugPrefix() + " * buildCleanExpr: " + expr) # For every operator level for opLevel in self.operatorLevels: # For every operator in the current level for op in opLevel.operators: lastOccurence = expr.find(op.text) while lastOccurence is not -1: if lastOccurence == len(expr) - 1: raise CompilerException("Missing operand") if isVarChar(expr[lastOccurence + len(op.text)]) or expr[lastOccurence + len(op.text)] == '(' or op.text == '(': if op.type == Operator.BINARY: # Left operand start = lastOccurence - 1 while start >= 0 and (isVarChar(expr[start]) or (expr[start] == ')' and start == lastOccurence - 1)): if expr[start] == ')': bracketCounter = 1 else: bracketCounter = 0 # Move to last part of the bracket while bracketCounter > 0 and start > 0: start -= 1 if expr[start] == ')': bracketCounter += 1 elif expr[start] == '(': bracketCounter -= 1 start -= 1 operandLeft = expr[start+1:lastOccurence]; # Right operand end = lastOccurence + op.textLen while end < len(expr) and (isVarChar(expr[end]) or (expr[end] == '(' and end == lastOccurence + 1)): if op.text == '[' or op.text == '(' or (expr[end] == '(' and end == lastOccurence + 1): bracketCounter = 1 else: bracketCounter = 0 # Move to last part of the bracket while bracketCounter > 0 and end < len(expr)-1: end += 1 if expr[end] == '(' or expr[end] == '[': bracketCounter += 1 elif expr[end] == ')' or expr[end] == ']': bracketCounter -= 1 if bracketCounter == 0: end -= 1 end += 1 operandRight = expr[lastOccurence + op.textLen:end]; print(self.getDebugPrefix() + " * buildCleanExpr.operators: " + operandLeft + " [" + op.text + "] " + operandRight) # Bind #=================================================== # #======================================================= # print(expr) # if start >= 0: # print("START[" + str(start) + "]: " + expr[start]) # else: # print("START: " + "OUT OF STRING") # # if end < len(expr): # print("END[" + str(end) + "]: " + expr[end]) # else: # print("END: " + "OUT OF STRING") # #======================================================= #=================================================== if operandLeft and (operandRight and ((start < 0 or expr[start] != '(') or (end >= len(expr) or expr[end] != ')')) or op.text == "("): if op.text == "(": newOpText = "#" expr = expr[:lastOccurence - len(operandLeft)] + "(" + operandLeft + ")" + newOpText + "(" + operandRight + ")" + expr[lastOccurence + len(op.text) + len(operandRight) + 1:] elif op.text == "[": newOpText = "@" expr = expr[:lastOccurence - len(operandLeft)] + "(" + operandLeft + ")" + newOpText + "(" + operandRight + ")" + expr[lastOccurence + len(op.text) + len(operandRight) + 1:] else: expr = expr[:lastOccurence - len(operandLeft)] + "(" + operandLeft + op.text + operandRight + ")" + expr[lastOccurence + len(op.text) + len(operandRight):] print(self.getDebugPrefix() + " * Expression changed: " + expr) else: pass print(self.getDebugPrefix() + " * Expression change denied for operator: [" + op.text + "]") elif op.type == Operator.UNARY and (lastOccurence <= 0 or (isVarChar(expr[lastOccurence - 1]) == False and expr[lastOccurence - 1] != ')')): #print("Unary check for operator [" + op.text + "]") #print(" Unary.lastOccurence: " + str(lastOccurence)) #print(" Unary.expr[lastOccurence - 1]: " + expr[lastOccurence - 1]) #print(" Unary.isVarChar(expr[lastOccurence - 1]): " + str(isVarChar(expr[lastOccurence - 1]))) # Right operand end = lastOccurence + op.textLen while end < len(expr) and (isVarChar(expr[end]) or (expr[end] == '(' and end == lastOccurence + 1)): if expr[end] == '(' and end == lastOccurence + 1: bracketCounter = 1 else: bracketCounter = 0 # Move to last part of the bracket while bracketCounter > 0 and end < len(expr)-1: end += 1 if expr[end] == '(': bracketCounter += 1 elif expr[end] == ')': bracketCounter -= 1 end += 1 operandRight = expr[lastOccurence+op.textLen:end]; #print("[" + op.text + "] " + operandRight) start = lastOccurence - 1 if (start < 0 or expr[start] != '(') or (end >= len(expr) or expr[end] != ')'): expr = expr[:lastOccurence] + "(" + op.text + operandRight + ")" + expr[lastOccurence + len(op.text) + len(operandRight):] lastOccurence += 1 #print("EX.UNARY: " + expr) else: pass #print("EX.UNARY expression change denied: [" + op.text + "]") else: # If a binary version does not exist it means the operator has been used incorrectly if not self.similarOperatorExists(op): raise CompilerException("Syntax error concerning the unary operator [" + op.text + "]") elif expr[lastOccurence + len(op.text)] != '(': if self.similarOperatorExists(op): pass else: raise CompilerException("Operator [" + op.text + "] expects a valid expression (encountered '" + expr[lastOccurence + len(op.text)] + "')") lastOccurence = expr.find(op.text, lastOccurence + len(op.text)) self.recursionLevel -= 1 return expr
4c217d7807466cdefe0b561d5d9163c266360b72 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14498/4c217d7807466cdefe0b561d5d9163c266360b72/ExpressionParser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 7605, 4742, 12, 2890, 16, 3065, 4672, 365, 18, 31347, 2355, 1011, 404, 225, 3065, 273, 3065, 18, 2079, 2932, 3104, 1408, 13, 225, 1172, 12, 2890, 18, 588, 2829, 2244, 1435, 397, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 7605, 4742, 12, 2890, 16, 3065, 4672, 365, 18, 31347, 2355, 1011, 404, 225, 3065, 273, 3065, 18, 2079, 2932, 3104, 1408, 13, 225, 1172, 12, 2890, 18, 588, 2829, 2244, 1435, 397, ...
raise ParserError, 'enumerator sequence not matched'
raise ParserError('enumerator sequence not matched')
def parse_enumerator(self, match, expected_sequence=None): """ Analyze an enumerator and return the results.
67604a1c88bd372a821eedfd740b5ecf5dcf9e21 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5620/67604a1c88bd372a821eedfd740b5ecf5dcf9e21/states.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 7924, 7385, 12, 2890, 16, 845, 16, 2665, 67, 6178, 33, 7036, 4672, 3536, 1922, 9508, 392, 24679, 471, 327, 326, 1686, 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, 1109, 67, 7924, 7385, 12, 2890, 16, 845, 16, 2665, 67, 6178, 33, 7036, 4672, 3536, 1922, 9508, 392, 24679, 471, 327, 326, 1686, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -...
for line in self.gen_score_map(self.left_score_map) : self.context.add_line(line)
map(lambda line: self.context.add_line(line), self.gen_score_map(self.left_score_map))
def do_some_calc(self): if self.count <= 0: self.add_line("Game Count: %d" % (self.count)) return
ea21cf2f227e6680d6e79971a408072ed68a6347 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/600/ea21cf2f227e6680d6e79971a408072ed68a6347/process.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 19068, 67, 12448, 12, 2890, 4672, 309, 365, 18, 1883, 1648, 374, 30, 365, 18, 1289, 67, 1369, 2932, 12496, 6974, 30, 738, 72, 6, 738, 261, 2890, 18, 1883, 3719, 327, 2, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 741, 67, 19068, 67, 12448, 12, 2890, 4672, 309, 365, 18, 1883, 1648, 374, 30, 365, 18, 1289, 67, 1369, 2932, 12496, 6974, 30, 738, 72, 6, 738, 261, 2890, 18, 1883, 3719, 327, 2, -100...
exts.append( Extension('ossaudiodev', ['ossaudiodev.c']) )
def detect_modules(self): # Ensure that /usr/local is always used add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
95e40cc3f6ae9dad8cd6720426732acba875bd71 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/95e40cc3f6ae9dad8cd6720426732acba875bd71/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5966, 67, 6400, 12, 2890, 4672, 468, 7693, 716, 342, 13640, 19, 3729, 353, 3712, 1399, 527, 67, 1214, 67, 869, 67, 1098, 12, 2890, 18, 9576, 18, 12083, 67, 8291, 16, 1173, 13640, 19, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5966, 67, 6400, 12, 2890, 4672, 468, 7693, 716, 342, 13640, 19, 3729, 353, 3712, 1399, 527, 67, 1214, 67, 869, 67, 1098, 12, 2890, 18, 9576, 18, 12083, 67, 8291, 16, 1173, 13640, 19, ...
if not self.mode:
if self.stopped:
def _irc_nick_callback(self, error, arguments=None): if not error: if not self.mode: return self.irc_connection.join(self.irc_room, callback=self._irc_join_callback) else: self.mode = None self.say(say_levels.error, 'failed to connect to the IRC chan, leaving ...', on_irc=False) if error in ['nicknameinuse', 'nickcollision']: reason = '"'+self.bot.nickname+'" is already used or reserved on the IRC server' elif error == 'erroneusnickname': reason = '"'+self.bot.nickname+'" got "erroneusnickname"' elif error == 'nicknametoolong': reason = '"'+self.bot.nickname+'" got "nicknametoolong", limit seems to be '+str(len(self.irc_connection.real_nickname)) else: reason = error self._join_irc_failed(reason)
1c428761fad5529b2fa3940d261d3286f3d1fd2e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9915/1c428761fad5529b2fa3940d261d3286f3d1fd2e/bridge.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 481, 71, 67, 17091, 67, 3394, 12, 2890, 16, 555, 16, 1775, 33, 7036, 4672, 309, 486, 555, 30, 309, 365, 18, 24228, 30, 327, 365, 18, 481, 71, 67, 4071, 18, 5701, 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, 389, 481, 71, 67, 17091, 67, 3394, 12, 2890, 16, 555, 16, 1775, 33, 7036, 4672, 309, 486, 555, 30, 309, 365, 18, 24228, 30, 327, 365, 18, 481, 71, 67, 4071, 18, 5701, 12, 2890, 18,...
class PyShell(MultiEditorWindow):
class PyShell(PyShellEditorWindow):
def write(self, s): # Override base class write self.tkconsole.console.write(s)
6cc30cf0dd8dfcc402a00fc2e1e213407f2eac1f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/6cc30cf0dd8dfcc402a00fc2e1e213407f2eac1f/PyShell.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 12, 2890, 16, 272, 4672, 468, 1439, 1026, 667, 1045, 365, 18, 16099, 8698, 18, 8698, 18, 2626, 12, 87, 13, 225, 2, 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, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 12, 2890, 16, 272, 4672, 468, 1439, 1026, 667, 1045, 365, 18, 16099, 8698, 18, 8698, 18, 2626, 12, 87, 13, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
return '0x%04x' % t
return '0x%0*X' % (precision, t)
def hexrepr(t): if t is None: return 'None' try: len(t) except: return '0x%04x' % t try: return '(' + ', '.join(map(lambda t: '0x%04x' % t, t)) + ')' except TypeError, why: print '* failed to convert %r: %s' % (t, why) raise
489293afae138cacb82b94b69bee6266f1364acd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/489293afae138cacb82b94b69bee6266f1364acd/gencodec.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3827, 12715, 12, 88, 4672, 225, 309, 268, 353, 599, 30, 327, 296, 7036, 11, 775, 30, 562, 12, 88, 13, 1335, 30, 327, 296, 20, 92, 9, 20, 14, 60, 11, 738, 261, 14548, 16, 268, 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, 3827, 12715, 12, 88, 4672, 225, 309, 268, 353, 599, 30, 327, 296, 7036, 11, 775, 30, 562, 12, 88, 13, 1335, 30, 327, 296, 20, 92, 9, 20, 14, 60, 11, 738, 261, 14548, 16, 268, 13,...
ypname += ".%s" % (inst.get('arch')) return ypname
d['arch'] = inst.get('arch') return d
def build_yname(pkgname, inst): """Build yum appropriate package name.""" ypname = pkgname if inst.get('version') != 'any': ypname += '-' if inst.get('epoch', False): ypname += "%s:" % inst.get('epoch') if inst.get('version', False) and inst.get('version') != 'any': ypname += "%s" % (inst.get('version')) if inst.get('release', False) and inst.get('release') != 'any': ypname += "-%s" % (inst.get('release')) if inst.get('arch', False) and inst.get('arch') != 'any': ypname += ".%s" % (inst.get('arch')) return ypname
806c613f255b54d2c580b303361a7934d0324f08 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11867/806c613f255b54d2c580b303361a7934d0324f08/YUMng.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 67, 93, 529, 12, 10657, 529, 16, 1804, 4672, 3536, 3116, 677, 379, 5505, 2181, 508, 12123, 29647, 529, 273, 29348, 309, 1804, 18, 588, 2668, 1589, 6134, 480, 296, 2273, 4278, 29647...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 67, 93, 529, 12, 10657, 529, 16, 1804, 4672, 3536, 3116, 677, 379, 5505, 2181, 508, 12123, 29647, 529, 273, 29348, 309, 1804, 18, 588, 2668, 1589, 6134, 480, 296, 2273, 4278, 29647...
parts = map(int, parts)
parts = list(map(int, parts))
def ip2num(ipAddr): parts = ipAddr.split('.') parts = map(int, parts) if len(parts) != 4: parts = (parts + [0, 0, 0, 0])[:4] return (parts[0] << 24) | (parts[1] << 16) | (parts[2] << 8) | parts[3]
0a482a9f81c043d8370b6b3fd6349394cdc397f2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3187/0a482a9f81c043d8370b6b3fd6349394cdc397f2/request.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2359, 22, 2107, 12, 625, 3178, 4672, 2140, 273, 2359, 3178, 18, 4939, 2668, 1093, 13, 2140, 273, 666, 12, 1458, 12, 474, 16, 2140, 3719, 309, 562, 12, 6019, 13, 480, 1059, 30, 2140, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2359, 22, 2107, 12, 625, 3178, 4672, 2140, 273, 2359, 3178, 18, 4939, 2668, 1093, 13, 2140, 273, 666, 12, 1458, 12, 474, 16, 2140, 3719, 309, 562, 12, 6019, 13, 480, 1059, 30, 2140, ...
if e[0] not in [11,errno.EWOULDBLOCK]: raise
def run(self): """ receive information from rover (if any) and put it into `messages` field """ self.running = True try: while self.running: received = self.socket.recv(1024) if len(received) == 0: # socket closed self.running = False continue self.buf += received m = re.search(";",self.buf) while m: command = self.buf[:m.end()]
4299470c4f52e16ecf70c2ab98c2a90205e1567a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5773/4299470c4f52e16ecf70c2ab98c2a90205e1567a/protocol.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 3536, 6798, 1779, 628, 721, 502, 261, 430, 1281, 13, 471, 1378, 518, 1368, 1375, 6833, 68, 652, 3536, 365, 18, 8704, 273, 1053, 775, 30, 1323, 365, 18, 8704, 30, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 3536, 6798, 1779, 628, 721, 502, 261, 430, 1281, 13, 471, 1378, 518, 1368, 1375, 6833, 68, 652, 3536, 365, 18, 8704, 273, 1053, 775, 30, 1323, 365, 18, 8704, 30, ...
pass
SimpleXMLRPCServer.SimpleXMLRPCRequestHandler.rpc_paths = ('/xmlrpc/db', '/xmlrpc/common', '/xmlrpc/object', '/xmlrpc/report', '/xmlrpc/wizard')
def _dispatch(self, method, params): import traceback try: n=self.path.split("/")[-1]
4b364768f02dd0cb810618831497796305db99fd /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12853/4b364768f02dd0cb810618831497796305db99fd/netsvc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 10739, 12, 2890, 16, 707, 16, 859, 4672, 1930, 10820, 775, 30, 290, 33, 2890, 18, 803, 18, 4939, 2932, 4898, 13, 18919, 21, 65, 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, 389, 10739, 12, 2890, 16, 707, 16, 859, 4672, 1930, 10820, 775, 30, 290, 33, 2890, 18, 803, 18, 4939, 2932, 4898, 13, 18919, 21, 65, 2, -100, -100, -100, -100, -100, -100, -100, -100, ...
res = csc * other return res
return csc * other
def __mul__(self, other): csc = self.tocsc() res = csc * other return res
bdabf856b614694a8ef20c73a7d82bda3a7cf386 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/bdabf856b614694a8ef20c73a7d82bda3a7cf386/sparse.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 16411, 972, 12, 2890, 16, 1308, 4672, 276, 1017, 273, 365, 18, 1391, 1017, 1435, 400, 273, 276, 1017, 380, 1308, 327, 400, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 16411, 972, 12, 2890, 16, 1308, 4672, 276, 1017, 273, 365, 18, 1391, 1017, 1435, 400, 273, 276, 1017, 380, 1308, 327, 400, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
out += '<record>\n' out += '\t<controlfield tag="001">%i</controlfield>\n' % recid
def ffts_to_xml(ffts): """Transform a dictionary: recid -> ffts where ffts is a list of fft dictionary into xml. """ out = '' for recid, ffts in ffts.iteritems(): if ffts: out += '<record>\n' out += '\t<controlfield tag="001">%i</controlfield>\n' % recid for fft in ffts: out += _xml_fft_creator(fft) out += '</record>\n' return out
acdcae7bb74ad7ea78514285c104b3e3b2770626 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12027/acdcae7bb74ad7ea78514285c104b3e3b2770626/bibdocfilecli.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15741, 87, 67, 869, 67, 2902, 12, 25174, 87, 4672, 3536, 4059, 279, 3880, 30, 1950, 350, 317, 15741, 87, 1625, 15741, 87, 353, 279, 666, 434, 15741, 3880, 1368, 2025, 18, 3536, 596, 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, 15741, 87, 67, 869, 67, 2902, 12, 25174, 87, 4672, 3536, 4059, 279, 3880, 30, 1950, 350, 317, 15741, 87, 1625, 15741, 87, 353, 279, 666, 434, 15741, 3880, 1368, 2025, 18, 3536, 596, 27...
msg = ('Verify failed\n' + str(e) + '\n' + traceback.format_exc())
msg = ('Verify failed\n' + str(e) + '\n' + traceback.format_exc())
def verify(self): if not self.machines: raise error.AutoservError('No machines specified to verify') try: namespace = {'machines' : self.machines, 'job' : self, 'ssh_user' : self.ssh_user, 'ssh_port' : self.ssh_port, 'ssh_pass' : self.ssh_pass} self._execute_code(VERIFY_CONTROL_FILE, namespace, protect=False) except Exception, e: msg = ('Verify failed\n' + str(e) + '\n' + traceback.format_exc()) self.record('ABORT', None, None, msg) raise
de3b947fa13191b5aa3e650f64a2581f6921c95c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12268/de3b947fa13191b5aa3e650f64a2581f6921c95c/server_job.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3929, 12, 2890, 4672, 309, 486, 365, 18, 81, 10635, 30, 1002, 555, 18, 7150, 13164, 90, 668, 2668, 2279, 15942, 1269, 358, 3929, 6134, 775, 30, 1981, 273, 13666, 81, 10635, 11, 294, 36...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3929, 12, 2890, 4672, 309, 486, 365, 18, 81, 10635, 30, 1002, 555, 18, 7150, 13164, 90, 668, 2668, 2279, 15942, 1269, 358, 3929, 6134, 775, 30, 1981, 273, 13666, 81, 10635, 11, 294, 36...
def __getattr__(self, name):
def __getattr__(self, name):
def complete(self, **keyw): """ Complete the option values with keyword arguments. Do not overwrite existing values. Only use arguments that do not have a corresponding attribute in `self`, """ for key in keyw: if not self.__dict__.has_key(key): setattr(self, key, keyw[key])
6298e01579e8917b7d42c1bc1af5b0a3dda46ba8 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2348/6298e01579e8917b7d42c1bc1af5b0a3dda46ba8/pylit.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3912, 12, 2890, 16, 2826, 856, 91, 4672, 3536, 14575, 326, 1456, 924, 598, 4932, 1775, 18, 225, 2256, 486, 6156, 2062, 924, 18, 5098, 999, 1775, 716, 741, 486, 1240, 279, 4656, 1566, 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, 3912, 12, 2890, 16, 2826, 856, 91, 4672, 3536, 14575, 326, 1456, 924, 598, 4932, 1775, 18, 225, 2256, 486, 6156, 2062, 924, 18, 5098, 999, 1775, 716, 741, 486, 1240, 279, 4656, 1566, 3...
terms = index_terms.keys() terms.sort() for term in terms: termtext = index_terms[term].to_plaintext(None) str = ' <tr><td width="15%">'+termtext
for (key, term, links) in index: str = ' <tr><td width="15%">' + term.to_plaintext(None)
def _write_indices(self, public, private): """ Write the index to the given file-like object. I write directly to the file (unlike most other pages, which are converted to strings, and then written) because the index page can be quite large. For example, for the Python standard library, the index page is over 1.5mb. @param out: The stream to which the index should be written. @type out: C{stream} @rtype: C{None} """ # Header and navigation bar. header = self._header('Index') public.write(header); private.write(header) self._write_navbar(public, private, 'indices', top=1) public.write('<br />\n'); private.write('<br />\n')
dad6dd09c82d3878a78d977cc13da79d4420db2b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/dad6dd09c82d3878a78d977cc13da79d4420db2b/html.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2626, 67, 6836, 12, 2890, 16, 1071, 16, 3238, 4672, 3536, 2598, 326, 770, 358, 326, 864, 585, 17, 5625, 733, 18, 225, 467, 1045, 5122, 358, 326, 585, 261, 318, 5625, 4486, 1308, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2626, 67, 6836, 12, 2890, 16, 1071, 16, 3238, 4672, 3536, 2598, 326, 770, 358, 326, 864, 585, 17, 5625, 733, 18, 225, 467, 1045, 5122, 358, 326, 585, 261, 318, 5625, 4486, 1308, ...
s = idaapi.get_struc(id)
s = idaapi.get_struc(sid)
def SetStrucIdx(id, index): """ Change structure index @param id: structure type ID @param index: new index of the structure @return: != 0 - ok @note: See GetFirstStrucIdx() for the explanation of structure indices and IDs. """ s = idaapi.get_struc(id) if not s: return 0 return idaapi.set_struc_idx(s, index)
4f22943d42ee1d5013421d280b3bd776bee83fb9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3410/4f22943d42ee1d5013421d280b3bd776bee83fb9/idc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1000, 1585, 5286, 4223, 12, 350, 16, 770, 4672, 3536, 7576, 3695, 770, 225, 632, 891, 612, 30, 3695, 618, 1599, 632, 891, 770, 30, 394, 770, 434, 326, 3695, 225, 632, 2463, 30, 480, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1000, 1585, 5286, 4223, 12, 350, 16, 770, 4672, 3536, 7576, 3695, 770, 225, 632, 891, 612, 30, 3695, 618, 1599, 632, 891, 770, 30, 394, 770, 434, 326, 3695, 225, 632, 2463, 30, 480, ...
are quite straightforwardly expressed with this Python idiom.
are quite straightforwardly expressed with this Python idiom. The problem is that this creates the same kind of reference cycle as the m235() implementation above, and again we have to explicitly close the innermost generator to clean up the cycle.
... def _m235():
51c9372f720649999a4a773e64f9945b63519da5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/51c9372f720649999a4a773e64f9945b63519da5/test_generators.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1372, 377, 1652, 389, 81, 30803, 13332, 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...
[ 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, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1372, 377, 1652, 389, 81, 30803, 13332, 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, -...
class TranssysInstanceCoordinates(transsys.TranssysInstance) :
class TranssysInstanceCoordinated(transsys.TranssysInstance) :
def random_value(self) : """ Returns the constant value.
4e4693a52c95717018319fd37fd5d71cecb79c4f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1770/4e4693a52c95717018319fd37fd5d71cecb79c4f/translattice.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2744, 67, 1132, 12, 2890, 13, 294, 3536, 2860, 326, 5381, 460, 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, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2744, 67, 1132, 12, 2890, 13, 294, 3536, 2860, 326, 5381, 460, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
[2.903211925911553?, 1, 1, 1, 1, 0.8060634335253695?, -1.709275359436923?, -2, -2, -2]
[2.9032119259..., 1, 1, 1, 1, 0.8060634335..., -1.7092753594..., -2, -2, -2]
def spectrum(self, laplacian=False): r""" Returns a list of the eigenvalues of the adjacency matrix.
456c1ca56da63ed9d7cc522503947fcb22f73c4b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/456c1ca56da63ed9d7cc522503947fcb22f73c4b/graph.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17970, 12, 2890, 16, 7125, 30538, 2779, 33, 8381, 4672, 436, 8395, 2860, 279, 666, 434, 326, 29831, 434, 326, 25220, 3148, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17970, 12, 2890, 16, 7125, 30538, 2779, 33, 8381, 4672, 436, 8395, 2860, 279, 666, 434, 326, 29831, 434, 326, 25220, 3148, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
server_job.open.expect_call(self.control, 'r').and_return(file_obj)
server_job.open.expect_call(self.control, 'r').and_return(file_obj)
def construct_server_job(self): # setup recording for constructor file_obj = self.god.create_mock_class(file, "file") server_job.open.expect_call(self.control, 'r').and_return(file_obj) file_obj.read.expect_call().and_return('') os.path.exists.expect_call( mock.is_string_comparator()).and_return(False) os.mkdir.expect_call(mock.is_string_comparator()) os.path.exists.expect_call( mock.is_string_comparator()).and_return(False) os.mkdir.expect_call(mock.is_string_comparator()) os.path.exists.expect_call( mock.is_string_comparator()).and_return(True) os.unlink.expect_call(mock.is_string_comparator()) cls = server_job.base_server_job compare = mock.is_instance_comparator(cls) server_job.get_site_job_data.expect_call( compare).and_return({}) utils.write_keyval.expect_call(mock.is_string_comparator(), mock.is_instance_comparator(dict))
aeee8b4525dce759db07cbe16cbd0ae13d07253d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12268/aeee8b4525dce759db07cbe16cbd0ae13d07253d/server_job_unittest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4872, 67, 3567, 67, 4688, 12, 2890, 4672, 468, 3875, 14949, 364, 3885, 585, 67, 2603, 273, 365, 18, 75, 369, 18, 2640, 67, 22851, 67, 1106, 12, 768, 16, 315, 768, 7923, 1438, 67, 468...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4872, 67, 3567, 67, 4688, 12, 2890, 4672, 468, 3875, 14949, 364, 3885, 585, 67, 2603, 273, 365, 18, 75, 369, 18, 2640, 67, 22851, 67, 1106, 12, 768, 16, 315, 768, 7923, 1438, 67, 468...
handler_class = here.get_handler_class(uri)
handler_class = self.get_handler_class(uri)
def _get_handler(self, segment, uri): handler_class = here.get_handler_class(uri) return handler_class(uri)
2ef49b3d1f9a90928a6d679f118fb320c1ac6500 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12681/2ef49b3d1f9a90928a6d679f118fb320c1ac6500/Folder.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 4176, 12, 2890, 16, 3267, 16, 2003, 4672, 1838, 67, 1106, 273, 365, 18, 588, 67, 4176, 67, 1106, 12, 1650, 13, 327, 1838, 67, 1106, 12, 1650, 13, 2, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 4176, 12, 2890, 16, 3267, 16, 2003, 4672, 1838, 67, 1106, 273, 365, 18, 588, 67, 4176, 67, 1106, 12, 1650, 13, 327, 1838, 67, 1106, 12, 1650, 13, 2, -100, -100, -100, ...
version = 0
def add(self, handle): ref_date = time.time() tmp_date = "" if len(handle.headers.getheaders("date")) == 1: tmp_date = handle.headers.getheaders("date")[0] for regexp in ["%a, %d-%b-%Y %H:%M:%S %Z", "%a %b %d %H:%M:%S %Y %Z", "%a, %b %d %H:%M:%S %Y %Z", "%a, %d %b %Y %H:%M:%S %Z"]: try: ref_date = time.mktime( time.strptime(tmp_date, regexp) ) except ValueError: continue
dc72c34609c007cf5b00328d2a693b9b37523f05 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6330/dc72c34609c007cf5b00328d2a693b9b37523f05/libcookie.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 12, 2890, 16, 1640, 4672, 1278, 67, 712, 273, 813, 18, 957, 1435, 1853, 67, 712, 273, 1408, 309, 562, 12, 4110, 18, 2485, 18, 75, 546, 684, 414, 2932, 712, 6, 3719, 422, 404, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 12, 2890, 16, 1640, 4672, 1278, 67, 712, 273, 813, 18, 957, 1435, 1853, 67, 712, 273, 1408, 309, 562, 12, 4110, 18, 2485, 18, 75, 546, 684, 414, 2932, 712, 6, 3719, 422, 404, ...
query = session.query(WaveformFile, WaveformChannel)
query = session.query(WaveformFile, WaveformChannel, WaveformPath) query = query.filter(WaveformPath.id == WaveformFile.path_id)
def _update_or_insert(self, dataset): """ Add a new file into or modifies existing file in database. """ if len(dataset) < 1: return session = self.session() data = dataset[0] # check for duplicates if self.options.check_duplicates: query = session.query(WaveformFile, WaveformChannel) query = query.filter(WaveformFile.id == WaveformChannel.file_id) query = query.filter(WaveformFile.file == data['file']) query = query.filter(WaveformChannel.network == data['network']) query = query.filter(WaveformChannel.station == data['station']) query = query.filter(WaveformChannel.location == data['location']) query = query.filter(WaveformChannel.channel == data['channel']) query = query.filter(WaveformChannel.starttime == data['starttime']) query = query.filter(WaveformChannel.endtime == data['endtime']) if query.count() > 0: msg = "Duplicate entry '%s' in '%s'." self.log.error(msg % (data['file'], data['path'])) return # fetch or create path try: # search for existing path query = session.query(WaveformPath) path = query.filter_by(path=data['path']).one() except: # create new path entry path = WaveformPath(data) session.add(path) # search and delete existing file entry msg = "Inserted" if path.id is not None: # search for existing file query = session.query(WaveformFile) files = query.filter_by(path_id=path.id, file=data['file']).all() if files: msg = "Updated" # delete existing file entry and all related information for file in files: session.delete(file) # create new file entry file = WaveformFile(data) path.files.append(file) # add channel entries for data in dataset: # create new channel entry channel = WaveformChannel(data) file.channels.append(channel) # add gaps for gap in data['gaps']: channel.gaps.append(WaveformGaps(gap)) # add features for feature in data['features']: channel.features.append(WaveformFeatures(feature)) try: session.commit() except Exception, e: session.rollback() self.log.error(str(e)) else: self.log.debug("%s '%s' in '%s'" % (msg, data['file'], data['path'])) session.close()
8670e6d79660c12551cf215ac936bac4f701f120 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10470/8670e6d79660c12551cf215ac936bac4f701f120/indexer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2725, 67, 280, 67, 6387, 12, 2890, 16, 3709, 4672, 3536, 1436, 279, 394, 585, 1368, 578, 23934, 2062, 585, 316, 2063, 18, 3536, 309, 562, 12, 8682, 13, 411, 404, 30, 327, 1339, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2725, 67, 280, 67, 6387, 12, 2890, 16, 3709, 4672, 3536, 1436, 279, 394, 585, 1368, 578, 23934, 2062, 585, 316, 2063, 18, 3536, 309, 562, 12, 8682, 13, 411, 404, 30, 327, 1339, ...
output += " "
output += " "
def _reference_line(self): """Output for REFERENCE lines. """ output = Record.BASE_FORMAT % "REFERENCE" if self.number: output += "%s" % self.number if self.number and self.bases: output += " " if self.bases: output += "%s" % self.bases output += "\n" return output
e05c41b65627aad1bc7d6b0728db5ffe770e12ae /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7167/e05c41b65627aad1bc7d6b0728db5ffe770e12ae/Record.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 6180, 67, 1369, 12, 2890, 4672, 3536, 1447, 364, 22898, 2362, 18, 3536, 876, 273, 5059, 18, 8369, 67, 7254, 738, 315, 14617, 6, 309, 365, 18, 2696, 30, 876, 1011, 2213, 87, 6, 7...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 6180, 67, 1369, 12, 2890, 4672, 3536, 1447, 364, 22898, 2362, 18, 3536, 876, 273, 5059, 18, 8369, 67, 7254, 738, 315, 14617, 6, 309, 365, 18, 2696, 30, 876, 1011, 2213, 87, 6, 7...
raise TypeError('%r is not a Python function' % func)
raise TypeError('{!r} is not a Python function'.format(func))
def getargspec(func): """Get the names and default values of a function's arguments. A tuple of four things is returned: (args, varargs, varkw, defaults). 'args' is a list of the argument names (it may contain nested lists). 'varargs' and 'varkw' are the names of the * and ** arguments or None. 'defaults' is an n-tuple of the default values of the last n arguments. """ if ismethod(func): func = func.im_func if not isfunction(func): raise TypeError('%r is not a Python function' % func) args, varargs, varkw = getargs(func.func_code) return ArgSpec(args, varargs, varkw, func.func_defaults)
4b941017d7d1f338edaaca77d3e613717ece0b68 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3187/4b941017d7d1f338edaaca77d3e613717ece0b68/inspect.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 23172, 12, 644, 4672, 3536, 967, 326, 1257, 471, 805, 924, 434, 279, 445, 1807, 1775, 18, 225, 432, 3193, 434, 12792, 9198, 353, 2106, 30, 261, 1968, 16, 19732, 16, 569, 9987, 16,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 23172, 12, 644, 4672, 3536, 967, 326, 1257, 471, 805, 924, 434, 279, 445, 1807, 1775, 18, 225, 432, 3193, 434, 12792, 9198, 353, 2106, 30, 261, 1968, 16, 19732, 16, 569, 9987, 16,...
def open(self): self.wid = NewWindow((40, 40, 400, 400), self.__class__.__name__, 1,
def open(self, bounds=(40, 40, 400, 400), resid=None): if resid <> None: self.wid = GetNewWindow(resid, -1) else: self.wid = NewWindow(bounds, self.__class__.__name__, 1,
def open(self): self.wid = NewWindow((40, 40, 400, 400), self.__class__.__name__, 1, 0, -1, 1, 0) self.do_postopen()
2d4636cdd8b259545c358f8e044ee0d2e7fb858f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/2d4636cdd8b259545c358f8e044ee0d2e7fb858f/FrameWork.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1696, 12, 2890, 16, 4972, 28657, 7132, 16, 8063, 16, 7409, 16, 7409, 3631, 10043, 33, 7036, 4672, 309, 10043, 2813, 599, 30, 365, 18, 30902, 273, 968, 1908, 3829, 12, 15567, 16, 300, 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, 1696, 12, 2890, 16, 4972, 28657, 7132, 16, 8063, 16, 7409, 16, 7409, 3631, 10043, 33, 7036, 4672, 309, 10043, 2813, 599, 30, 365, 18, 30902, 273, 968, 1908, 3829, 12, 15567, 16, 300, 2...
return unicode(self.node.prep("jid"),"utf-8")
return JID(self.node.prop("jid"))
def jid(self): return unicode(self.node.prep("jid"),"utf-8")
c5c9bc0fda36b704982068c3cb9177aefedd9b10 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12769/c5c9bc0fda36b704982068c3cb9177aefedd9b10/roster.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14201, 12, 2890, 4672, 327, 5252, 12, 2890, 18, 2159, 18, 19109, 2932, 18252, 6, 3631, 6, 3158, 17, 28, 7923, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14201, 12, 2890, 4672, 327, 5252, 12, 2890, 18, 2159, 18, 19109, 2932, 18252, 6, 3631, 6, 3158, 17, 28, 7923, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
def __init__(self, sock, debuglevel=0):
def __init__(self, sock, debuglevel=0, strict=0):
def __init__(self, sock, debuglevel=0): self.fp = sock.makefile('rb', 0) self.debuglevel = debuglevel
d46aa37d35811a37397104f02074c8a44e7dbec1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/d46aa37d35811a37397104f02074c8a44e7dbec1/httplib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1850, 1652, 1001, 2738, 972, 12, 2890, 16, 7313, 16, 1198, 2815, 33, 20, 16, 5490, 33, 20, 4672, 365, 18, 7944, 273, 7313, 18, 6540, 768, 2668, 6731, 2187, 374, 13, 365, 18, 4148, 2815, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1850, 1652, 1001, 2738, 972, 12, 2890, 16, 7313, 16, 1198, 2815, 33, 20, 16, 5490, 33, 20, 4672, 365, 18, 7944, 273, 7313, 18, 6540, 768, 2668, 6731, 2187, 374, 13, 365, 18, 4148, 2815, 27...
for var in const.affectedVariables():
for var in const.affected_variables():
def satisfy_all(self): """really PROPAGATE""" const_q = [(const.estimateCost(), const) for const in self.constraints] affected_constraints = set() while True: if not const_q: const_q = [(const.estimateCost(), const) for const in affected_constraints] if not const_q: break const_q.sort() affected_constraints.clear() cost, const = const_q.pop(0) entailed = const.revise3() for var in const.affectedVariables(): dom = self.dom(var) if not dom.has_changed(): continue for dependant_const in self.dependant_constraints(var): if dependant_const is not const: affected_constraints.add(dependant_const) dom.reset_flags() if entailed: # we should also remove the constraint from # the set of satifiable constraints if const in affected_constraints: affected_constraints.remove(const)
617bab291499a7d2579c0901c4e68e67e54519b6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/617bab291499a7d2579c0901c4e68e67e54519b6/computationspace.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 18866, 67, 454, 12, 2890, 4672, 3536, 266, 1230, 16258, 1781, 1777, 8395, 1866, 67, 85, 273, 306, 12, 10248, 18, 23562, 8018, 9334, 1866, 13, 364, 1866, 316, 365, 18, 11967, 65, 9844, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 18866, 67, 454, 12, 2890, 4672, 3536, 266, 1230, 16258, 1781, 1777, 8395, 1866, 67, 85, 273, 306, 12, 10248, 18, 23562, 8018, 9334, 1866, 13, 364, 1866, 316, 365, 18, 11967, 65, 9844, ...
"on_ButtonConvertAll_clicked" : self.on_ButtonConvertAll_clicked, "on_ButtonStopAll_clicked" : self.on_ButtonStopAll_clicked,
def __init__ (self, _gettext): global _ _ = _gettext
e6c1d8b8aa1eeead3142f41f1d3380b7665838c0 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2524/e6c1d8b8aa1eeead3142f41f1d3380b7665838c0/gui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 261, 2890, 16, 389, 29967, 4672, 2552, 389, 389, 273, 389, 29967, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 261, 2890, 16, 389, 29967, 4672, 2552, 389, 389, 273, 389, 29967, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
raise '''
print ''' Warning:
def copyright(): return "bpext pyre module: Copyright (c) 2004-2007 Jiao Lin";
60e81eaee7bf9dc04b4893df22202674cb2db80f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/578/60e81eaee7bf9dc04b4893df22202674cb2db80f/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 22245, 13332, 327, 315, 17152, 408, 2395, 266, 1605, 30, 25417, 261, 71, 13, 4044, 24, 17, 6976, 27, 804, 1155, 83, 27865, 14432, 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, 0, 0, 0, 0, 0, 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, 22245, 13332, 327, 315, 17152, 408, 2395, 266, 1605, 30, 25417, 261, 71, 13, 4044, 24, 17, 6976, 27, 804, 1155, 83, 27865, 14432, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, ...
periodsperyear = 4 locs = N.asarray(locs) (vmin, vmax) = locs[[0,-1]]
periodsperyear = 4
def _quarterly_finder(locs, freqstr, aslocator): if freqstr != 'Q': raise ValueError("unexpected frequency") periodsperyear = 4 locs = N.asarray(locs) (vmin, vmax) = locs[[0,-1]] (vmin, vmax) = (int(vmin), int(vmax+1)) span = vmax - vmin + 1 #............................................ dates = N.arange(vmin, vmax+1) format = N.empty(span, dtype="|S8") format.flat = '' year_start = (dates % 4 == 1).nonzero()[0] #............................................ if span <= 3.5 * periodsperyear: if aslocator: major = dates[year_start] minor = dates else: format[:] = 'Q%q' format[year_start] = 'Q%q\n%Y' if not year_start.size: if dates.size > 1: idx = 1 else: idx = 0 format[idx] = 'Q%q\n%Y' #............................................ elif span <= 11 * periodsperyear: if aslocator: major = dates[year_start] minor = dates else: format[year_start] = '%Y' #............................................ else: years = dates[year_start]//4 + 1 nyears = span/periodsperyear (min_anndef, maj_anndef) = _get_default_annual_spacing(nyears) major_idx = year_start[(years % maj_anndef == 0)] if aslocator: major = dates[major_idx] minor = dates[year_start[(years % min_anndef == 0)]] else: print "major_idx",major_idx format[major_idx] = '%Y' #............................................ if aslocator: return minor, major else: formatted = (format != '') return dict([(d,f) for (d,f) in zip(dates[formatted],format[formatted])])
7a3c507a500aec86f9240f3a0e8437c36eeb7238 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12971/7a3c507a500aec86f9240f3a0e8437c36eeb7238/mpl_timeseries_pgm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 372, 14153, 715, 67, 15356, 12, 24323, 16, 7684, 701, 16, 487, 20048, 4672, 309, 7684, 701, 480, 296, 53, 4278, 1002, 2068, 2932, 21248, 8670, 7923, 12777, 457, 6874, 273, 1059, 261...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 372, 14153, 715, 67, 15356, 12, 24323, 16, 7684, 701, 16, 487, 20048, 4672, 309, 7684, 701, 480, 296, 53, 4278, 1002, 2068, 2932, 21248, 8670, 7923, 12777, 457, 6874, 273, 1059, 261...
return tuple.__new__(segment, (self[0], other[0])) return tuple.__new__(segment, (other[1], self[1]))
return tuple.__new__(self.__class__, (self[0], other[0])) return tuple.__new__(self.__class__, (other[1], self[1]))
def __sub__(self, other): """ Return the segment that is that part of self which is not contained in other. Raises ValueError if the result cannot be represented as a single segment. """ if (self[1] <= other[0]) or (self[0] >= other[1]): # self and other do not intersect return self if (self in other) or ((self[0] < other[0]) and (self[1] > other[1])): # result is not exactly 1 segment raise ValueError, other if self[0] < other[0]: return tuple.__new__(segment, (self[0], other[0])) return tuple.__new__(segment, (other[1], self[1]))
e491438bed2fa0957ffff38a54bfe167e128109c /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3589/e491438bed2fa0957ffff38a54bfe167e128109c/segments.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1717, 972, 12, 2890, 16, 1308, 4672, 3536, 2000, 326, 3267, 716, 353, 716, 1087, 434, 365, 1492, 353, 486, 7542, 316, 1308, 18, 225, 20497, 2068, 309, 326, 563, 2780, 506, 10584, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1717, 972, 12, 2890, 16, 1308, 4672, 3536, 2000, 326, 3267, 716, 353, 716, 1087, 434, 365, 1492, 353, 486, 7542, 316, 1308, 18, 225, 20497, 2068, 309, 326, 563, 2780, 506, 10584, ...
return saxutils.escape(str).decode('utf-8').encode('ascii', 'xmlcharrefreplace')
return saxutils.escape(str).replace('"', '&apos;').decode('utf-8').encode('ascii', 'xmlcharrefreplace')
def __escape(str): from xml.sax import saxutils return saxutils.escape(str).decode('utf-8').encode('ascii', 'xmlcharrefreplace')
6be68e3aaf26c50b016b7d6b4b1e60904e3b126c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/766/6be68e3aaf26c50b016b7d6b4b1e60904e3b126c/tdbxml.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 6939, 12, 701, 4672, 628, 2025, 18, 87, 651, 1930, 20319, 5471, 327, 20319, 5471, 18, 6939, 12, 701, 2934, 2079, 22076, 2187, 5183, 438, 538, 4359, 2934, 3922, 2668, 3158, 17, 28, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 6939, 12, 701, 4672, 628, 2025, 18, 87, 651, 1930, 20319, 5471, 327, 20319, 5471, 18, 6939, 12, 701, 2934, 2079, 22076, 2187, 5183, 438, 538, 4359, 2934, 3922, 2668, 3158, 17, 28, ...
f.write("XPC_QS_DEFINE_XPCNATIVEINTERFACE_GETTER(%s, interfaces[%d])\n" % (type, i))
f.write("static const PRUint32 k_%s = %d;\n" % (type, i))
def writeResultXPCInterfacesArray(f, conf, resulttypes): f.write("// === XPCNativeInterface cache \n\n") count = len(resulttypes) if count > 0: f.write("static XPCNativeInterface* interfaces[%d];\n\n" % count) f.write("void %s_MarkInterfaces()\n" "{\n" % conf.name) if count > 0: f.write(" for (PRUint32 i = 0; i < %d; ++i)\n" " if (interfaces[i])\n" " interfaces[i]->Mark();\n" % count) f.write("}\n") f.write("void %s_ClearInterfaces()\n" "{\n" % conf.name) if count > 0: f.write(" memset(interfaces, 0, %d * " "sizeof(XPCNativeInterface*));\n" % count) f.write("}\n\n") i = 0 for type in resulttypes: f.write("XPC_QS_DEFINE_XPCNATIVEINTERFACE_GETTER(%s, interfaces[%d])\n" % (type, i)) i += 1 if count > 0: f.write("\n\n")
6a1f237207f51d1463e1c61da017872f3721beeb /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11102/6a1f237207f51d1463e1c61da017872f3721beeb/qsgen.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 1253, 60, 3513, 10273, 1076, 12, 74, 16, 2195, 16, 563, 2352, 4672, 284, 18, 2626, 2932, 759, 757, 1139, 3513, 9220, 1358, 1247, 521, 82, 64, 82, 7923, 1056, 273, 562, 12, 2088, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 1253, 60, 3513, 10273, 1076, 12, 74, 16, 2195, 16, 563, 2352, 4672, 284, 18, 2626, 2932, 759, 757, 1139, 3513, 9220, 1358, 1247, 521, 82, 64, 82, 7923, 1056, 273, 562, 12, 2088, ...
raise SCons.Errors.UserError, "Export of non-existant variable '%s'"%x
raise SCons.Errors.UserError, "Export of non-existent variable '%s'"%x
def compute_exports(exports): """Compute a dictionary of exports given one of the parameters to the Export() function or the exports argument to SConscript().""" loc, glob = get_calling_namespaces() retval = {} try: for export in exports: if SCons.Util.is_Dict(export): retval.update(export) else: try: retval[export] = loc[export] except KeyError: retval[export] = glob[export] except KeyError, x: raise SCons.Errors.UserError, "Export of non-existant variable '%s'"%x return retval
8829ef9ae3372136769634d97d6e6ddf3eb8fc42 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7126/8829ef9ae3372136769634d97d6e6ddf3eb8fc42/SConscript.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3671, 67, 23732, 12, 23732, 4672, 3536, 7018, 279, 3880, 434, 8095, 864, 1245, 434, 326, 1472, 358, 326, 11054, 1435, 445, 578, 326, 8095, 1237, 358, 348, 442, 4263, 1435, 12123, 225, 15...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3671, 67, 23732, 12, 23732, 4672, 3536, 7018, 279, 3880, 434, 8095, 864, 1245, 434, 326, 1472, 358, 326, 11054, 1435, 445, 578, 326, 8095, 1237, 358, 348, 442, 4263, 1435, 12123, 225, 15...
self.o.shape.pickline(self.o.backlist, -self.o.pov, selSense,
self.sellist += [p1] self.sellist += [self.sellist[0]] self.o.backlist += [p2] self.o.backlist += [self.o.backlist[0]] self.o.shape=SelectionShape(self.o.right, self.o.up, self.o.lineOfSight) eyeball = (-self.o.quat).rot(V(0,0,6*self.o.scale)) - self.o.pov if self.selLassRect: self.o.shape.pickrect(self.o.backlist[0], p2, -self.o.pov, selSense, (not self.o.ortho) and eyeball) else: self.o.shape.pickline(self.o.backlist, -self.o.pov, selSense,
def EndPick(self, event, selSense): """Close a selection curve and do the selection """ if not self.picking: return self.picking = False
5aa5552a6d34b6b134ad8d88b5e59bd218738926 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/5aa5552a6d34b6b134ad8d88b5e59bd218738926/selectMode.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4403, 17968, 12, 2890, 16, 871, 16, 357, 29713, 4672, 3536, 4605, 279, 4421, 8882, 471, 741, 326, 4421, 3536, 309, 486, 365, 18, 11503, 310, 30, 327, 365, 18, 11503, 310, 273, 1083, 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, 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, 4403, 17968, 12, 2890, 16, 871, 16, 357, 29713, 4672, 3536, 4605, 279, 4421, 8882, 471, 741, 326, 4421, 3536, 309, 486, 365, 18, 11503, 310, 30, 327, 365, 18, 11503, 310, 273, 1083, 2,...
def update_20060430(self): stack = [self] while stack: folder = stack.pop() for name in folder.get_handler_names(): handler = folder.get_handler(name) if isinstance(handler, Metadata) and name != '.metadata': folder.del_handler(name) short_name, type, language = FileName.decode(name[1:-9]) folder.set_handler(name[1:], handler) elif name.startswith('.'): continue elif isinstance(handler, FolderHandler): stack.append(handler) def update_20060504(self):
def update_20060424(self): # Add '.admins.users' admins = self.get_handler('admins/.users').get_usernames() self.set_handler('.admins.users', ListOfUsers(users=admins)) # Remove handlers self.del_handler('.users') self.del_handler('admins') self.del_handler('.admins.metadata') self.del_handler('reviewers') self.del_handler('.reviewers.metadata')
fcbec363ed2f0d29116ee7428e1cfa2873cffa88 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12681/fcbec363ed2f0d29116ee7428e1cfa2873cffa88/root.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 67, 6976, 26, 3028, 3247, 12, 2890, 4672, 468, 1436, 2418, 3666, 87, 18, 5577, 11, 31116, 273, 365, 18, 588, 67, 4176, 2668, 3666, 87, 15865, 5577, 16063, 588, 67, 1355, 1973, 14...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 67, 6976, 26, 3028, 3247, 12, 2890, 4672, 468, 1436, 2418, 3666, 87, 18, 5577, 11, 31116, 273, 365, 18, 588, 67, 4176, 2668, 3666, 87, 15865, 5577, 16063, 588, 67, 1355, 1973, 14...
'${OS_DIR}/${PRJ_USER_FORMAT}.qws' ),
'${OS_DIR}/${PRJ_NAME}.qws' ),
def create_prj (self, prj):
b7ebd402d56f98417cdc77f1e3c4dac8aaa43b68 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8002/b7ebd402d56f98417cdc77f1e3c4dac8aaa43b68/ide_project.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 683, 78, 261, 2890, 16, 27378, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 683, 78, 261, 2890, 16, 27378, 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, ...
data.dmesg["suspend_early"]['end'] = ktime phase = "suspend_noirq"
data.dmesg['suspend_late']['end'] = ktime phase = 'suspend_noirq'
def analyzeKernelLog(): global sysvals, data print("PROCESSING DATA") data.vprint("Analyzing the dmesg data...") if(os.path.exists(sysvals.dmesgfile) == False): print("ERROR: %s doesn't exist") % sysvals.dmesgfile return False lf = sortKernelLog() phase = "suspend_runtime" dm = { 'suspend_general': r"PM: Syncing filesystems.*", 'suspend_early': r"PM: suspend of devices complete after.*", 'suspend_noirq': r"PM: late suspend of devices complete after.*", 'suspend_cpu': r"PM: noirq suspend of devices complete after.*", 'resume_cpu': r"ACPI: Low-level resume complete.*", 'resume_noirq': r"ACPI: Waking up from system sleep state.*", 'resume_early': r"PM: noirq resume of devices complete after.*", 'resume_general': r"PM: early resume of devices complete after.*", 'resume_complete': r".*Restarting tasks \.\.\..*", } if(sysvals.suspendmode == "standby"): dm['resume_cpu'] = r"PM: Restoring platform NVS memory" elif(sysvals.suspendmode == "disk"): dm['suspend_early'] = r"PM: freeze of devices complete after.*" dm['suspend_noirq'] = r"PM: late freeze of devices complete after.*" dm['suspend_cpu'] = r"PM: noirq freeze of devices complete after.*" dm['resume_cpu'] = r"PM: Restoring platform NVS memory" dm['resume_early'] = r"PM: noirq restore of devices complete after.*" dm['resume_general'] = r"PM: early restore of devices complete after.*" action_start = 0.0 for line in lf: # -- preprocessing -- # parse each dmesg line into the time and message m = re.match(r".*(\[ *)(?P<ktime>[0-9\.]*)(\]) (?P<msg>.*)", line) if(m): ktime = float(m.group("ktime")) msg = m.group("msg") else: print line continue # -- phase changes -- # suspend_general start if(re.match(dm['suspend_general'], msg)): phase = "suspend_general" data.dmesg[phase]['start'] = ktime data.start = ktime # action start: syncing filesystems action_start = ktime # suspend_early start elif(re.match(dm['suspend_early'], msg)): data.dmesg["suspend_general"]['end'] = ktime phase = "suspend_early" data.dmesg[phase]['start'] = ktime # suspend_noirq start elif(re.match(dm['suspend_noirq'], msg)): data.dmesg["suspend_early"]['end'] = ktime phase = "suspend_noirq" data.dmesg[phase]['start'] = ktime # suspend_cpu start elif(re.match(dm['suspend_cpu'], msg)): data.dmesg["suspend_noirq"]['end'] = ktime phase = "suspend_cpu" data.dmesg[phase]['start'] = ktime # resume_cpu start elif(re.match(dm['resume_cpu'], msg)): data.tSuspended = ktime data.dmesg["suspend_cpu"]['end'] = ktime phase = "resume_cpu" data.dmesg[phase]['start'] = ktime # resume_noirq start elif(re.match(dm['resume_noirq'], msg)): data.dmesg["resume_cpu"]['end'] = ktime phase = "resume_noirq" data.dmesg[phase]['start'] = ktime # action end: ACPI resume data.newAction("resume_cpu", "ACPI", -1, "", action_start, ktime) # resume_early start elif(re.match(dm['resume_early'], msg)): data.dmesg["resume_noirq"]['end'] = ktime phase = "resume_early" data.dmesg[phase]['start'] = ktime # resume_general start elif(re.match(dm['resume_general'], msg)): data.dmesg["resume_early"]['end'] = ktime phase = "resume_general" data.dmesg[phase]['start'] = ktime # resume complete start elif(re.match(dm['resume_complete'], msg)): data.dmesg["resume_general"]['end'] = ktime data.end = ktime phase = "resume_runtime" break # -- device callbacks -- if(phase in data.phases): # device init call if(re.match(r"calling (?P<f>.*)\+ @ .*, parent: .*", msg)): sm = re.match(r"calling (?P<f>.*)\+ @ (?P<n>.*), parent: (?P<p>.*)", msg); f = sm.group("f") n = sm.group("n") p = sm.group("p") if(f and n and p): data.newAction(phase, f, int(n), p, ktime, -1) # device init return elif(re.match(r"call (?P<f>.*)\+ returned .* after (?P<t>.*) usecs", msg)): sm = re.match(r"call (?P<f>.*)\+ returned .* after (?P<t>.*) usecs(?P<a>.*)", msg); f = sm.group("f") t = sm.group("t") list = data.dmesg[phase]['list'] if(f in list): dev = list[f] dev['length'] = int(t) dev['end'] = ktime data.vprint("%15s [%f - %f] %s(%d) %s" % (phase, dev['start'], dev['end'], f, dev['pid'], dev['par'])) # -- phase specific actions -- if(phase == "suspend_general"): if(re.match(r"PM: Preparing system for mem sleep.*", msg)): data.newAction(phase, "filesystem-sync", -1, "", action_start, ktime) elif(re.match(r"Freezing user space processes .*", msg)): action_start = ktime elif(re.match(r"Freezing remaining freezable tasks.*", msg)): data.newAction(phase, "freeze-user-processes", -1, "", action_start, ktime) action_start = ktime elif(re.match(r"PM: Entering (?P<mode>[a-z,A-Z]*) sleep.*", msg)): data.newAction(phase, "freeze-tasks", -1, "", action_start, ktime) elif(phase == "suspend_cpu"): m = re.match(r"smpboot: CPU (?P<cpu>[0-9]*) is now offline", msg) if(m): cpu = "CPU"+m.group("cpu") data.newAction(phase, cpu, -1, "", action_start, ktime) action_start = ktime elif(re.match(r"ACPI: Preparing to enter system sleep state.*", msg)): action_start = ktime elif(re.match(r"Disabling non-boot CPUs .*", msg)): data.newAction(phase, "ACPI", -1, "", action_start, ktime) action_start = ktime elif(phase == "resume_cpu"): m = re.match(r"CPU(?P<cpu>[0-9]*) is up", msg) if(m): cpu = "CPU"+m.group("cpu") data.newAction(phase, cpu, -1, "", action_start, ktime) action_start = ktime elif(re.match(r"Enabling non-boot CPUs .*", msg)): action_start = ktime # fill in any missing phases lp = "suspend_general" for p in data.phases: if(p == "suspend_general"): continue if(data.dmesg[p]['start'] < 0): data.dmesg[p]['start'] = data.dmesg[lp]['end'] if(p == "resume_cpu"): data.tSuspended = data.dmesg[lp]['end'] if(data.dmesg[p]['end'] < 0): data.dmesg[p]['end'] = data.dmesg[p]['start'] lp = p data.fixupInitcallsThatDidntReturn() return True
0c52bda8f6c5785b5982bc3636b627b4ccd59c3f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5327/0c52bda8f6c5785b5982bc3636b627b4ccd59c3f/analyze_suspend.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12375, 11286, 1343, 13332, 2552, 2589, 4524, 16, 501, 225, 1172, 2932, 16560, 1360, 8730, 7923, 501, 18, 90, 1188, 2932, 979, 4647, 310, 326, 9113, 281, 75, 501, 7070, 13, 309, 12, 538, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 12375, 11286, 1343, 13332, 2552, 2589, 4524, 16, 501, 225, 1172, 2932, 16560, 1360, 8730, 7923, 501, 18, 90, 1188, 2932, 979, 4647, 310, 326, 9113, 281, 75, 501, 7070, 13, 309, 12, 538, ...
if options.ontology == []:
if not options.ontology:
def getSamples( gene2go, genes, background, options ): sample_size = options.sample # List of all minimum probabilities in simulation simulation_min_pvalues = [] E.info( "sampling: calculating %i samples: " % (sample_size)) counts = {} prob_overs = {} prob_unders = {} samples = {} options.stdlog.write("# ") options.stdlog.flush() for x in range(sample_size): if options.loglevel >= 1: options.stdlog.write( "." ) options.stdlog.flush() ## get shuffled array of genes from background sample_genes = random.sample( background, len(genes) ) go_results = AnalyseGO( gene2go , sample_genes, background ) pairs = go_results.mResults.items() for k, v in pairs: if k not in counts: counts[k] = [] prob_overs[k] = [] prob_unders[k] = [] counts[k].append( v.mSampleCountsCategory ) prob_overs[k].append( v.mProbabilityOverRepresentation ) prob_unders[k].append( v.mProbabilityUnderRepresentation ) simulation_min_pvalues.append( min( v.mProbabilityUnderRepresentation, v.mProbabilityOverRepresentation ) ) if options.loglevel >= 1: sys.stdout.write("\n") sys.stdout.flush() E.info("sampling: sorting %i P-Values" % len(simulation_min_pvalues) ) simulation_min_pvalues.sort() simulation_min_pvalues = numpy.array(simulation_min_pvalues) samples = {} if options.output_filename_pattern: filename = options.output_filename_pattern % { 'go': ontology, 'section': "samples" } E.info( "sampling results go to %s" % filename ) outfile = open(filename, "w") else: outfile = sys.stdout outfile.write( "\t".join( ("goid", "min", "max", "mean", "median", "stddev", "CI95lower", "CI95upper", "pover", "punder", "goid", "category", "description") ) + "\n" ) for k in counts.keys(): c = counts[k] prob_overs[k].sort() prob_unders[k].sort() s = GOSample(min(c), max(c), scipy.mean(c), numpy.std(c), numpy.array(prob_overs[k]), numpy.array(prob_unders[k]), counts[k] ) samples[k] = s if k in go2info: n = go2info[k] else: n = "?" outfile.write( "%s\t%i\t%i\t%f\t%f\t%f\t%f\t%f\t%f\t%f\t%s\n" %\ (k, min(c), max(c), scipy.mean(c), scipy.median(c), numpy.std(c), scipy.stats.scoreatpercentile( c, 5 ), scipy.stats.scoreatpercentile( c, 95 ), min(prob_overs[k]), min(prob_unders[k]), n )) if options.output_filename_pattern: outfile.close() return samples, simulation_min_pvalues
8e3e9a260a8b958467531637be88865e7c1a1170 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4322/8e3e9a260a8b958467531637be88865e7c1a1170/GO.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1322, 2995, 12, 7529, 22, 3240, 16, 11423, 16, 5412, 16, 702, 262, 30, 225, 3296, 67, 1467, 273, 702, 18, 6358, 468, 987, 434, 777, 5224, 17958, 316, 14754, 14754, 67, 1154, 67, 84, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1322, 2995, 12, 7529, 22, 3240, 16, 11423, 16, 5412, 16, 702, 262, 30, 225, 3296, 67, 1467, 273, 702, 18, 6358, 468, 987, 434, 777, 5224, 17958, 316, 14754, 14754, 67, 1154, 67, 84, ...
_debug(1, "-> Refcount++ on object", objid)
_debug(1, "-> Refcount++ on local object", objid)
def handle_request_incref(self, objid): if objid not in self._proxied_objects: return _debug(1, "-> Refcount++ on object", objid) self._incref_proxied_object(objid)
3ba78ab154465b2ff0620e0ded429951a6f040f0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11722/3ba78ab154465b2ff0620e0ded429951a6f040f0/ipc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 67, 2293, 67, 9523, 1734, 12, 2890, 16, 1081, 350, 4672, 309, 1081, 350, 486, 316, 365, 6315, 20314, 2092, 67, 6911, 30, 327, 389, 4148, 12, 21, 16, 315, 2122, 3941, 1883, 9904, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 67, 2293, 67, 9523, 1734, 12, 2890, 16, 1081, 350, 4672, 309, 1081, 350, 486, 316, 365, 6315, 20314, 2092, 67, 6911, 30, 327, 389, 4148, 12, 21, 16, 315, 2122, 3941, 1883, 9904, ...
raise ReadError, str(e)
raise ReadError("empty, unreadable or compressed " "file: %s" % e)
def next(self): """Return the next member of the archive as a TarInfo object, when TarFile is opened for reading. Return None if there is no more available. """ self._check("ra") if self.firstmember is not None: m = self.firstmember self.firstmember = None return m
b4f9e5b91e72c3fe0ed21adc8fcc43e75b037e05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b4f9e5b91e72c3fe0ed21adc8fcc43e75b037e05/tarfile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1024, 12, 2890, 4672, 3536, 990, 326, 1024, 3140, 434, 326, 5052, 487, 279, 20334, 966, 733, 16, 1347, 20334, 812, 353, 10191, 364, 6453, 18, 2000, 599, 309, 1915, 353, 1158, 1898, 2319,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1024, 12, 2890, 4672, 3536, 990, 326, 1024, 3140, 434, 326, 5052, 487, 279, 20334, 966, 733, 16, 1347, 20334, 812, 353, 10191, 364, 6453, 18, 2000, 599, 309, 1915, 353, 1158, 1898, 2319,...
self.completion.set_text_column(0) for i, word in enumerate(ids): if word[1][0] == '[': i = word[1].find(']') str1 = word[1][1:i] str2 = word[1][i+2:] self.liststore.append([("%s %s" % (str1, str2)), str2]) else: self.liststore.append([word[1], word[1]])
self.completion.set_text_column(1) for object_id, name in names: self.liststore.append([object_id, name])
def load_completion(self, ids): self.completion.set_match_func(self.match_func, None) self.completion.connect("match-selected", self.on_completion_match) self.wid_text.set_completion(self.completion) self.completion.set_model(self.liststore) self.completion.set_text_column(0) for i, word in enumerate(ids): if word[1][0] == '[': i = word[1].find(']') str1 = word[1][1:i] str2 = word[1][i+2:] self.liststore.append([("%s %s" % (str1, str2)), str2]) else: self.liststore.append([word[1], word[1]])
4225f5449fb945fc0badd9a5713a1d27a2300615 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9151/4225f5449fb945fc0badd9a5713a1d27a2300615/many2one.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1262, 67, 11469, 12, 2890, 16, 3258, 4672, 365, 18, 11469, 18, 542, 67, 1916, 67, 644, 12, 2890, 18, 1916, 67, 644, 16, 599, 13, 365, 18, 11469, 18, 3612, 2932, 1916, 17, 8109, 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, 1262, 67, 11469, 12, 2890, 16, 3258, 4672, 365, 18, 11469, 18, 542, 67, 1916, 67, 644, 12, 2890, 18, 1916, 67, 644, 16, 599, 13, 365, 18, 11469, 18, 3612, 2932, 1916, 17, 8109, 3113,...
MARKER_TOPMENUCOLOR_START, MARKER_TOPMENUCOLOR_END, topmenucolor) if r is not None: style_src = r r = self.handle_scheme_css(style_src, MARKER_RIGHTPORTLETOUTLINE_START, MARKER_RIGHTPORTLETOUTLINE_END, rightportletoutline) if r is not None: style_src = r r = self.handle_scheme_css(style_src, MARKER_ENTIRE_SITE_FONT_START, MARKER_ENTIRE_SITE_FONT_END, entire_site_font) if r is not None: style_src = r r = self.handle_scheme_css(style_src, MARKER_ENTIRE_SITE_FONT_AR_START, MARKER_ENTIRE_SITE_FONT_AR_END, entire_site_font_ar) if r is not None: style_src = r r = self.handle_scheme_css(style_src, MARKER_HEADINGS_FONT_START, MARKER_HEADINGS_FONT_END, headings_font) if r is not None: style_src = r r = self.handle_scheme_css(style_src, MARKER_HEADINGS_FONT_AR_START, MARKER_HEADINGS_FONT_AR_END, headings_font_ar) if r is not None: style_src = r r = self.handle_scheme_css(style_src, MARKER_MAIN_NAVIGATION_FONT_START, MARKER_MAIN_NAVIGATION_FONT_END, main_navigation_font) if r is not None: style_src = r r = self.handle_scheme_css(style_src, MARKER_MAIN_NAVIGATION_FONT_AR_START, MARKER_MAIN_NAVIGATION_FONT_AR_END, main_navigation_font_ar) if r is not None: style_src = r r = self.handle_scheme_css(style_src, MARKER_LEFT_SECOND_FONT_START, MARKER_LEFT_SECOND_FONT_END, left_second_font) if r is not None: style_src = r r = self.handle_scheme_css(style_src, MARKER_LEFT_SECOND_FONT_AR_START, MARKER_LEFT_SECOND_FONT_AR_END, left_second_font_ar) if r is not None: style_src = r r = self.handle_scheme_css(style_src, MARKER_LEFT_THIRD_FONT_START, MARKER_LEFT_THIRD_FONT_END, left_third_font) if r is not None: style_src = r r = self.handle_scheme_css(style_src, MARKER_LEFT_THIRD_FONT_AR_START, MARKER_LEFT_THIRD_FONT_AR_END, left_third_font_ar) if r is not None: style_src = r r = self.handle_scheme_css(style_src, MARKER_LEFT_TITLE_FONT_START, MARKER_LEFT_TITLE_FONT_END, left_title_font) if r is not None: style_src = r r = self.handle_scheme_css(style_src, MARKER_LEFT_TITLE_FONT_AR_START, MARKER_LEFT_TITLE_FONT_AR_END, left_title_font_ar) if r is not None: style_src = r r = self.handle_scheme_css(style_src, MARKER_LEFT_TITLE_COLOR_START, MARKER_LEFT_TITLE_COLOR_END, left_title_color) if r is not None: style_src = r r = self.handle_scheme_css(style_src, MARKER_LEFT_TITLE_BG_START, MARKER_LEFT_TITLE_BG_END, left_title_bg) if r is not None: style_src = r r = self.handle_scheme_css(style_src, MARKER_LEFT_TITLE_BORDER_START, MARKER_LEFT_TITLE_BORDER_END, left_title_border) if r is not None: style_src = r r = self.handle_scheme_css(style_src, MARKER_LEFT_ACTIVE_BG_START, MARKER_LEFT_ACTIVE_BG_END, left_active_bg) if r is not None: style_src = r r = self.handle_scheme_css(style_src, MARKER_LEFT_ACTIVE_COLOR_START, MARKER_LEFT_ACTIVE_COLOR_END, left_active_color) if r is not None: style_src = r r = self.handle_scheme_css(style_src, MARKER_LEFT_ACTIVE_SIZE_START, MARKER_LEFT_ACTIVE_SIZE_END, left_active_size) if r is not None: style_src = r r = self.handle_scheme_css(style_src, MARKER_RIGHT_BG_START, MARKER_RIGHT_BG_END, right_bg) if r is not None: style_src = r r = self.handle_scheme_css(style_src, MARKER_RIGHT_FONT_START, MARKER_RIGHT_FONT_END, right_font) if r is not None: style_src = r r = self.handle_scheme_css(style_src, MARKER_RIGHT_FONT_AR_START, MARKER_RIGHT_FONT_AR_END, right_font_ar) if r is not None: style_src = r r = self.handle_scheme_css(style_src, MARKER_RIGHT_COLOR_START, MARKER_RIGHT_COLOR_END, right_color) if r is not None: style_src = r r = self.handle_scheme_css(style_src, MARKER_RIGHT_SIZE_START, MARKER_RIGHT_SIZE_END, right_size) if r is not None: style_src = r r = self.handle_scheme_css(style_src, MARKER_RIGHT_TITLE_FONT_START, MARKER_RIGHT_TITLE_FONT_END, right_title_font) if r is not None: style_src = r r = self.handle_scheme_css(style_src, MARKER_RIGHT_TITLE_FONT_AR_START, MARKER_RIGHT_TITLE_FONT_AR_END, right_title_font_ar) if r is not None: style_src = r r = self.handle_scheme_css(style_src, MARKER_RIGHT_TITLE_COLOR_START, MARKER_RIGHT_TITLE_COLOR_END, right_title_color) if r is not None: style_src = r r = self.handle_scheme_css(style_src, MARKER_RIGHT_TITLE_SIZE_START, MARKER_RIGHT_TITLE_SIZE_END, right_title_size) if r is not None: style_src = r r = self.handle_scheme_css(style_src, MARKER_BREAD_COLOR_START, MARKER_BREAD_COLOR_END, bread_color) if r is not None: style_src = r r = self.handle_scheme_css(style_src, MARKER_BREAD_SIZE_START, MARKER_BREAD_SIZE_END, bread_size) if r is not None: style_src = r r = self.handle_scheme_css(style_src, MARKER_BREAD_SIZE_AR_START, MARKER_BREAD_SIZE_AR_END, bread_size_ar) if r is not None: style_src = r r = self.handle_scheme_css(style_src, MARKER_BREADBAR_BG_START, MARKER_BREADBAR_BG_END, breadbar_bg) if r is not None: style_src = r r = self.handle_scheme_css(style_src, MARKER_SEARCH_BG_START, MARKER_SEARCH_BG_END, search_bg) if r is not None: style_src = r r = self.handle_scheme_css(style_src, MARKER_QUICK_BG_START, MARKER_QUICK_BG_END, quick_bg) if r is not None: style_src = r r = self.handle_scheme_css(style_src, MARKER_QUICK_RIGHT_BORDER_START, MARKER_QUICK_RIGHT_BORDER_END, quick_right_border) if r is not None: style_src = r r = self.handle_scheme_css(style_src, MARKER_SEARCH_LEFT_BORDER_START, MARKER_SEARCH_LEFT_BORDER_END, search_left_border) if r is not None: style_src = r r = self.handle_scheme_css(style_src, MARKER_BREADBAR_MIDDLE_BG_START, MARKER_BREADBAR_MIDDLE_BG_END, breadbar_middle_bg) if r is not None: style_src = r r = self.handle_scheme_css(style_src, MARKER_BREADBAR_MIDDLE_WIDTH_START, MARKER_BREADBAR_MIDDLE_WIDTH_END, breadbar_middle_width) if r is not None: style_src = r r = self.handle_scheme_css(style_src, MARKER_BREADBAR_UPPER_BORDER_START, MARKER_BREADBAR_UPPER_BORDER_END, breadbar_upper_border) if r is not None: style_src = r r = self.handle_scheme_css(style_src, MARKER_BREADBAR_LOWER_BORDER_START, MARKER_BREADBAR_LOWER_BORDER_END, breadbar_lower_border) if r is not None: style_src = r r = self.handle_scheme_css(style_src, MARKER_SEARCH_BGIMG_START, MARKER_SEARCH_BGIMG_END, search_bgimg) if r is not None: style_src = r r = self.handle_scheme_css(style_src, MARKER_SEARCH_BGIMG_AR_START, MARKER_SEARCH_BGIMG_AR_END, search_bgimg_ar) if r is not None: style_src = r r = self.handle_scheme_css(style_src, MARKER_QUICK_BGIMG_START, MARKER_QUICK_BGIMG_END, quick_bgimg) if r is not None: style_src = r r = self.handle_scheme_css(style_src, MARKER_QUICK_BGIMG_AR_START, MARKER_QUICK_BGIMG_AR_END, quick_bgimg_ar) if r is not None: style_src = r r = self.handle_scheme_css(style_src, MARKER_BREADBAR_BGIMG_START, MARKER_BREADBAR_BGIMG_END, breadbar_bgimg) if r is not None: style_src = r r = self.handle_scheme_css(style_src, MARKER_BREADBAR_BGIMG_AR_START, MARKER_BREADBAR_BGIMG_AR_END, breadbar_bgimg_ar)
MARKER_TOPMENUCOLOR_START, MARKER_TOPMENUCOLOR_END, topmenucolor) if r is not None: style_src = r r = self.handle_scheme_css(style_src, MARKER_RIGHTPORTLETOUTLINE_START, MARKER_RIGHTPORTLETOUTLINE_END, rightportletoutline) if r is not None: style_src = r r = self.handle_scheme_css(style_src, MARKER_ENTIRE_SITE_FONT_START, MARKER_ENTIRE_SITE_FONT_END, entire_site_font) if r is not None: style_src = r r = self.handle_scheme_css(style_src, MARKER_ENTIRE_SITE_FONT_AR_START, MARKER_ENTIRE_SITE_FONT_AR_END, entire_site_font_ar) if r is not None: style_src = r r = self.handle_scheme_css(style_src, MARKER_HEADINGS_FONT_START, MARKER_HEADINGS_FONT_END, headings_font) if r is not None: style_src = r r = self.handle_scheme_css(style_src, MARKER_HEADINGS_FONT_AR_START, MARKER_HEADINGS_FONT_AR_END, headings_font_ar) if r is not None: style_src = r r = self.handle_scheme_css(style_src, MARKER_MAIN_NAVIGATION_FONT_START, MARKER_MAIN_NAVIGATION_FONT_END, main_navigation_font) if r is not None: style_src = r r = self.handle_scheme_css(style_src, MARKER_MAIN_NAVIGATION_FONT_AR_START, MARKER_MAIN_NAVIGATION_FONT_AR_END, main_navigation_font_ar) if r is not None: style_src = r r = self.handle_scheme_css(style_src, MARKER_LEFT_SECOND_FONT_START, MARKER_LEFT_SECOND_FONT_END, left_second_font) if r is not None: style_src = r r = self.handle_scheme_css(style_src, MARKER_LEFT_SECOND_FONT_AR_START, MARKER_LEFT_SECOND_FONT_AR_END, left_second_font_ar) if r is not None: style_src = r r = self.handle_scheme_css(style_src, MARKER_LEFT_THIRD_FONT_START, MARKER_LEFT_THIRD_FONT_END, left_third_font) if r is not None: style_src = r r = self.handle_scheme_css(style_src, MARKER_LEFT_THIRD_FONT_AR_START, MARKER_LEFT_THIRD_FONT_AR_END, left_third_font_ar) if r is not None: style_src = r r = self.handle_scheme_css(style_src, MARKER_LEFT_TITLE_FONT_START, MARKER_LEFT_TITLE_FONT_END, left_title_font) if r is not None: style_src = r r = self.handle_scheme_css(style_src, MARKER_LEFT_TITLE_FONT_AR_START, MARKER_LEFT_TITLE_FONT_AR_END, left_title_font_ar) if r is not None: style_src = r r = self.handle_scheme_css(style_src, MARKER_LEFT_TITLE_COLOR_START, MARKER_LEFT_TITLE_COLOR_END, left_title_color) if r is not None: style_src = r r = self.handle_scheme_css(style_src, MARKER_LEFT_TITLE_BG_START, MARKER_LEFT_TITLE_BG_END, left_title_bg) if r is not None: style_src = r r = self.handle_scheme_css(style_src, MARKER_LEFT_TITLE_BORDER_START, MARKER_LEFT_TITLE_BORDER_END, left_title_border) if r is not None: style_src = r r = self.handle_scheme_css(style_src, MARKER_LEFT_ACTIVE_BG_START, MARKER_LEFT_ACTIVE_BG_END, left_active_bg) if r is not None: style_src = r r = self.handle_scheme_css(style_src, MARKER_LEFT_ACTIVE_COLOR_START, MARKER_LEFT_ACTIVE_COLOR_END, left_active_color) if r is not None: style_src = r r = self.handle_scheme_css(style_src, MARKER_LEFT_ACTIVE_SIZE_START, MARKER_LEFT_ACTIVE_SIZE_END, left_active_size) if r is not None: style_src = r r = self.handle_scheme_css(style_src, MARKER_RIGHT_BG_START, MARKER_RIGHT_BG_END, right_bg) if r is not None: style_src = r r = self.handle_scheme_css(style_src, MARKER_RIGHT_FONT_START, MARKER_RIGHT_FONT_END, right_font) if r is not None: style_src = r r = self.handle_scheme_css(style_src, MARKER_RIGHT_FONT_AR_START, MARKER_RIGHT_FONT_AR_END, right_font_ar) if r is not None: style_src = r r = self.handle_scheme_css(style_src, MARKER_RIGHT_COLOR_START, MARKER_RIGHT_COLOR_END, right_color) if r is not None: style_src = r r = self.handle_scheme_css(style_src, MARKER_RIGHT_SIZE_START, MARKER_RIGHT_SIZE_END, right_size) if r is not None: style_src = r r = self.handle_scheme_css(style_src, MARKER_RIGHT_TITLE_FONT_START, MARKER_RIGHT_TITLE_FONT_END, right_title_font) if r is not None: style_src = r r = self.handle_scheme_css(style_src, MARKER_RIGHT_TITLE_FONT_AR_START, MARKER_RIGHT_TITLE_FONT_AR_END, right_title_font_ar) if r is not None: style_src = r r = self.handle_scheme_css(style_src, MARKER_RIGHT_TITLE_COLOR_START, MARKER_RIGHT_TITLE_COLOR_END, right_title_color) if r is not None: style_src = r r = self.handle_scheme_css(style_src, MARKER_RIGHT_TITLE_SIZE_START, MARKER_RIGHT_TITLE_SIZE_END, right_title_size) if r is not None: style_src = r r = self.handle_scheme_css(style_src, MARKER_BREAD_COLOR_START, MARKER_BREAD_COLOR_END, bread_color) if r is not None: style_src = r r = self.handle_scheme_css(style_src, MARKER_BREAD_SIZE_START, MARKER_BREAD_SIZE_END, bread_size) if r is not None: style_src = r r = self.handle_scheme_css(style_src, MARKER_BREAD_SIZE_AR_START, MARKER_BREAD_SIZE_AR_END, bread_size_ar) if r is not None: style_src = r r = self.handle_scheme_css(style_src, MARKER_BREADBAR_BG_START, MARKER_BREADBAR_BG_END, breadbar_bg) if r is not None: style_src = r r = self.handle_scheme_css(style_src, MARKER_SEARCH_BG_START, MARKER_SEARCH_BG_END, search_bg) if r is not None: style_src = r r = self.handle_scheme_css(style_src, MARKER_QUICK_BG_START, MARKER_QUICK_BG_END, quick_bg) if r is not None: style_src = r r = self.handle_scheme_css(style_src, MARKER_QUICK_RIGHT_BORDER_START, MARKER_QUICK_RIGHT_BORDER_END, quick_right_border) if r is not None: style_src = r r = self.handle_scheme_css(style_src, MARKER_SEARCH_LEFT_BORDER_START, MARKER_SEARCH_LEFT_BORDER_END, search_left_border) if r is not None: style_src = r r = self.handle_scheme_css(style_src, MARKER_BREADBAR_MIDDLE_BG_START, MARKER_BREADBAR_MIDDLE_BG_END, breadbar_middle_bg) if r is not None: style_src = r r = self.handle_scheme_css(style_src, MARKER_BREADBAR_MIDDLE_WIDTH_START, MARKER_BREADBAR_MIDDLE_WIDTH_END, breadbar_middle_width) if r is not None: style_src = r r = self.handle_scheme_css(style_src, MARKER_BREADBAR_UPPER_BORDER_START, MARKER_BREADBAR_UPPER_BORDER_END, breadbar_upper_border) if r is not None: style_src = r r = self.handle_scheme_css(style_src, MARKER_BREADBAR_LOWER_BORDER_START, MARKER_BREADBAR_LOWER_BORDER_END, breadbar_lower_border) if r is not None: style_src = r r = self.handle_scheme_css(style_src, MARKER_SEARCH_BGIMG_START, MARKER_SEARCH_BGIMG_END, search_bgimg) if r is not None: style_src = r r = self.handle_scheme_css(style_src, MARKER_SEARCH_BGIMG_AR_START, MARKER_SEARCH_BGIMG_AR_END, search_bgimg_ar) if r is not None: style_src = r r = self.handle_scheme_css(style_src, MARKER_QUICK_BGIMG_START, MARKER_QUICK_BGIMG_END, quick_bgimg) if r is not None: style_src = r r = self.handle_scheme_css(style_src, MARKER_QUICK_BGIMG_AR_START, MARKER_QUICK_BGIMG_AR_END, quick_bgimg_ar) if r is not None: style_src = r r = self.handle_scheme_css(style_src, MARKER_BREADBAR_BGIMG_START, MARKER_BREADBAR_BGIMG_END, breadbar_bgimg) if r is not None: style_src = r r = self.handle_scheme_css(style_src, MARKER_BREADBAR_BGIMG_AR_START, MARKER_BREADBAR_BGIMG_AR_END, breadbar_bgimg_ar)
def admin_appearance(self, bckg_left='', bckg_left_ar='', bck_topmenu='', topmenucolor='', bck_search='', bck_search_ar='', europe='', europe_ar='', rightportletoutline='', entire_site_font='', entire_site_font_ar='', headings_font='', headings_font_ar='', main_navigation_font='', main_navigation_font_ar='', left_second_font='', left_second_font_ar='', left_third_font='', left_third_font_ar='', left_title_font='', left_title_font_ar='', left_title_color='', left_title_bg='', left_title_border='', left_active_bg='', left_active_color='', left_active_size='', right_bg='', right_font='', right_font_ar='', right_color='', right_size='', right_title_font='', right_title_font_ar='', right_title_color='', right_title_size='', bread_color='', bread_size='', bread_size_ar='', breadbar_bg='', search_bg='', quick_bg='', quick_right_border='', search_left_border='', breadbar_middle_bg='', breadbar_middle_width='', breadbar_upper_border='', breadbar_lower_border='', search_bgimg=' ', search_bgimg_ar=' ', quick_bgimg=' ', quick_bgimg_ar=' ', bg_search='', bg_search_ar='', bg_quickaccess='', bg_quickaccess_ar='', breadbar_bgimg=' ', breadbar_bgimg_ar=' ', REQUEST=None): """ """ scheme = self.getLayoutTool().getCurrentSkinScheme() style = scheme._getOb('style') style_src = style.document_src() buf = '' #upload images self.handle_scheme_img_upload(scheme, 'bckg_left.jpg', bckg_left) self.handle_scheme_img_upload(scheme, 'bckg_left_ar.jpg', bckg_left_ar) self.handle_scheme_img_upload(scheme, 'bck_search.jpg', bck_search) self.handle_scheme_img_upload(scheme, 'bck_search_ar.jpg', bck_search_ar) self.handle_scheme_img_upload(scheme, 'europe.jpg', europe) self.handle_scheme_img_upload(scheme, 'europe_ar.jpg', europe_ar)
ffeb211164a19371c4ffa202b70c9aa9c9628d54 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3287/ffeb211164a19371c4ffa202b70c9aa9c9628d54/SEMIDESite.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3981, 67, 438, 27668, 12, 2890, 16, 324, 363, 75, 67, 4482, 2218, 2187, 324, 363, 75, 67, 4482, 67, 297, 2218, 2187, 324, 363, 67, 3669, 5414, 2218, 2187, 1760, 5414, 3266, 2218, 2187,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3981, 67, 438, 27668, 12, 2890, 16, 324, 363, 75, 67, 4482, 2218, 2187, 324, 363, 75, 67, 4482, 67, 297, 2218, 2187, 324, 363, 67, 3669, 5414, 2218, 2187, 1760, 5414, 3266, 2218, 2187,...
return self.get_value(iter, COLUMN_ENTRY).copy()
e = self.get_value(iter, COLUMN_ENTRY) if e is None: return None else: return e.copy()
def get_entry(self, iter): "Fetches data for an entry"
31eb1a8d2bbb0adac74b66b59dc35829faaf1f0c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11787/31eb1a8d2bbb0adac74b66b59dc35829faaf1f0c/data.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 4099, 12, 2890, 16, 1400, 4672, 315, 14288, 501, 364, 392, 1241, 6, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 4099, 12, 2890, 16, 1400, 4672, 315, 14288, 501, 364, 392, 1241, 6, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
if invalid(oid): raise ConflictError, `oid`
if serial == '\0\0\0\0\0\0\0\0': self._creating.append(oid) else: if invalid(oid) or invalid(None): raise ConflictError, `oid` self._invalidating.append(oid)
# def persistent_id(object,
c223ab347b8ac8efc83d162ecfbefdc3c8b0b9ab /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/c223ab347b8ac8efc83d162ecfbefdc3c8b0b9ab/Connection.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 468, 1652, 9195, 67, 350, 12, 1612, 16, 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, ...
[ 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, 468, 1652, 9195, 67, 350, 12, 1612, 16, 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, ...
for entry in map(str, value):
for entry in value: if type(entry) != type(''): raise ValueError, 'link value must be String'
def set(self, nodeid, **propvalues): """Modify a property on an existing node of this class. 'nodeid' must be the id of an existing node of this class or an IndexError is raised.
f585d0fd8b97406c94bbd0235dd528198f965caf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/f585d0fd8b97406c94bbd0235dd528198f965caf/hyperdb.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 12, 2890, 16, 756, 350, 16, 2826, 5986, 2372, 4672, 3536, 11047, 279, 1272, 603, 392, 2062, 756, 434, 333, 667, 18, 225, 296, 2159, 350, 11, 1297, 506, 326, 612, 434, 392, 2062, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 444, 12, 2890, 16, 756, 350, 16, 2826, 5986, 2372, 4672, 3536, 11047, 279, 1272, 603, 392, 2062, 756, 434, 333, 667, 18, 225, 296, 2159, 350, 11, 1297, 506, 326, 612, 434, 392, 2062, ...
utils.system(dd + ' > /dev/null')
if self.seq_read: utils.system(dd + ' > /dev/null') else: p.append(subprocess.Popen(dd + ' > /dev/null', shell=True)) if self.seq_read: return logging.info("Waiting for %d streams", self.streams) for i in range(self.streams): logging.info("Waiting for %d", p[i].pid) sys.stdout.flush() os.waitpid(p[i].pid, 0)
def fs_read(self): for i in range(self.streams): file = os.path.join(self.job.tmpdir, 'poo%d' % (i+1)) dd = 'dd if=%s of=/dev/null bs=4k count=%d' % \ (file, self.blocks_per_file) utils.system(dd + ' > /dev/null')
da8e74dca93e92fa5374faa34f8dcd8c3bf6f296 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10349/da8e74dca93e92fa5374faa34f8dcd8c3bf6f296/parallel_dd.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2662, 67, 896, 12, 2890, 4672, 364, 277, 316, 1048, 12, 2890, 18, 16320, 4672, 585, 273, 1140, 18, 803, 18, 5701, 12, 2890, 18, 4688, 18, 5645, 1214, 16, 296, 1631, 83, 9, 72, 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, 2662, 67, 896, 12, 2890, 4672, 364, 277, 316, 1048, 12, 2890, 18, 16320, 4672, 585, 273, 1140, 18, 803, 18, 5701, 12, 2890, 18, 4688, 18, 5645, 1214, 16, 296, 1631, 83, 9, 72, 11, ...
for iy in range(self.y):
iy = 0 while iy < self.y:
def generate(self): for iy in range(self.y): ix = 0 while ix < self.x: c = complex(self.x_range[ix], self.y_range[iy]) z = self.z0 colour = 0 mind = 2
1dee91fc2847b1740447874f59d98413760e0afc /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6934/1dee91fc2847b1740447874f59d98413760e0afc/ansi_mandelbrot.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 12, 2890, 4672, 23466, 273, 374, 1323, 23466, 411, 365, 18, 93, 30, 8288, 273, 374, 1323, 8288, 411, 365, 18, 92, 30, 276, 273, 7233, 12, 2890, 18, 92, 67, 3676, 63, 697, 6487,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2103, 12, 2890, 4672, 23466, 273, 374, 1323, 23466, 411, 365, 18, 93, 30, 8288, 273, 374, 1323, 8288, 411, 365, 18, 92, 30, 276, 273, 7233, 12, 2890, 18, 92, 67, 3676, 63, 697, 6487,...
c = self.read(1) line = line + c if c=='\n' or c=="": break return line
c = self.read(readsize) i = string.find(c, '\n') if i >= 0 or c == '': bufs.append(c[:i]) self._unread(c[i+1:]) return string.join(bufs, '') bufs.append(c) readsize = readsize * 2
def readline(self):
b16a3b84509f6f66f60bb3c7521b2bee70ac1b1c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/b16a3b84509f6f66f60bb3c7521b2bee70ac1b1c/gzip.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12023, 12, 2890, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12023, 12, 2890, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
if set(db.databases) != set(db2.databases):
if set(db1.databases) != set(db2.databases):
def gc(conf, days=1, conf2=None): db = ZODB.config.databaseFromFile(open(conf)) if conf2 is None: db2 = db else: logger.info("Using secondary configuration, %s, for analysis", conf2) db2 = ZODB.config.databaseFromFile(open(conf2)) if set(db.databases) != set(db2.databases): raise ValueError("primary and secondary databases don't match.") databases = db2.databases storages = dict((name, d.storage) for (name, d) in databases.items()) ptid = repr( ZODB.TimeStamp.TimeStamp(*time.gmtime(time.time() - 86400*days)[:6]) ) # Pre-populate good with roots and recently-written objects good = oidset(databases) bad = oidset(databases) baddir = tempfile.mkdtemp() for name in storages: os.mkdir(os.path.join(baddir, name)) for name, storage in storages.iteritems(): # Make sure we can get the roots _ = storage.load(z64, '') good.insert(name, z64) # All new records are good for trans in storage.iterator(ptid): for record in trans: good.insert(name, record.oid) # and anything they reference for ref in getrefs(record.data, name): good.insert(*ref) # Now iterate over older records for trans in storage.iterator(None, ptid): for record in trans: oid = record.oid data = record.data if good.has(name, oid): if not data: continue for ref in getrefs(data, name): if good.insert(*ref) and bad.has(*ref): bad_to_good(baddir, bad, good, *ref) else: bad.insert(name, oid) if not data: continue refs = tuple(ref for ref in getrefs(data, name) if not good.has(*ref)) if not refs: continue # leaves are common f = open(os.path.join(baddir, name, base64.urlsafe_b64encode(oid)), 'ab') marshal.dump(refs, f) f.close() # Now, we have the garbage in bad. Remove it. for name, db in db.databases.iteritems(): storage = db.storage t = transaction.begin() storage.tpc_begin(t) nd = 0 for oid in bad.iterator(name): p, s = storage.load(oid, '') storage.deleteObject(oid, s, t) nd += 1 logger.info("Removed %s objects from %s", nd, name) if nd: storage.tpc_vote(t) storage.tpc_finish(t) transaction.commit() else: storage.tpc_abort(t) transaction.abort() db.close() shutil.rmtree(baddir) return bad
710f636d20110b254b274c75d4a5a9d62854e89a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5364/710f636d20110b254b274c75d4a5a9d62854e89a/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8859, 12, 3923, 16, 4681, 33, 21, 16, 2195, 22, 33, 7036, 4672, 1319, 273, 2285, 19786, 18, 1425, 18, 6231, 13087, 12, 3190, 12, 3923, 3719, 309, 2195, 22, 353, 599, 30, 1319, 22, 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, 8859, 12, 3923, 16, 4681, 33, 21, 16, 2195, 22, 33, 7036, 4672, 1319, 273, 2285, 19786, 18, 1425, 18, 6231, 13087, 12, 3190, 12, 3923, 3719, 309, 2195, 22, 353, 599, 30, 1319, 22, 27...
self.msrp_options = self.session_manager.msrp_config.__dict__.copy()
self.msrp_options = copy(self.session_manager.msrp_config)
def __init__(self): """Instatiates a new Session object for an incoming or outgoing SIP session. Initially the object is in the NULL state.""" self.session_manager = SessionManager() self.notification_center = NotificationCenter() self.rtp_options = self.session_manager.rtp_config.__dict__.copy() self.msrp_options = self.session_manager.msrp_config.__dict__.copy() self.state = "NULL" self.remote_user_agent = None self.on_hold_by_local = False self.on_hold_by_remote = False self.start_time = None self.stop_time = None self.direction = None self.audio_transport = None self.chat_transport = None # TODO: make the following two attributes reflect the current proposal in all states, not just PROPOSING self.proposed_audio = False self.proposed_chat = False self._lock = allocate_lock() self._inv = None self._audio_sdp_index = -1 self._chat_sdp_index = -1 self._queue = deque() self._ringtone = None self._sdpneg_failure_reason = None self._no_audio_timer = None self._audio_rec = None
db32412a9d0019f9248c848b4c506600510ed7da /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3449/db32412a9d0019f9248c848b4c506600510ed7da/session.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 3536, 382, 5642, 16020, 279, 394, 3877, 733, 364, 392, 6935, 578, 12902, 348, 2579, 1339, 18, 4378, 6261, 326, 733, 353, 316, 326, 3206, 919, 12123, 365,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 3536, 382, 5642, 16020, 279, 394, 3877, 733, 364, 392, 6935, 578, 12902, 348, 2579, 1339, 18, 4378, 6261, 326, 733, 353, 316, 326, 3206, 919, 12123, 365,...
We illustrate each check flag -- the output is the same but in case the function would run ever so slightly faster:
We illustrate each check flag -- the output is the same but in case the function would run ever so slightly faster:
def absolute_order_from_module_generators(gens, check_integral=True, check_rank=True, check_is_ring=True, is_maximal=None, allow_subfield = False): """ INPUT: gens -- list of elements of an absolute number field that generates an order in that number field as a ZZ *module*. check_integral -- check that each gen is integral check_rank -- check that the gens span a module of the correct rank check_is_ring -- check that the module is closed under multiplication (this is very expensive) is_maximal -- bool (or None); set if maximality of the generated order is known OUTPUT: an absolute order EXAMPLES: We have to explicitly import the function, since it isn't meant for regular usage: sage: from sage.rings.number_field.order import absolute_order_from_module_generators sage: K.<a> = NumberField(x^4 - 5) sage: O = K.maximal_order(); O Maximal Order in Number Field in a with defining polynomial x^4 - 5 sage: O.basis() [1/2*a^2 + 1/2, 1/2*a^3 + 1/2*a, a^2, a^3] sage: O.module() Free module of degree 4 and rank 4 over Integer Ring Echelon basis matrix: [1/2 0 1/2 0] [ 0 1/2 0 1/2] [ 0 0 1 0] [ 0 0 0 1] sage: g = O.gens(); g [1/2*a^2 + 1/2, 1/2*a^3 + 1/2*a, a^2, a^3] sage: absolute_order_from_module_generators(g) Order in Number Field in a with defining polynomial x^4 - 5 We illustrate each check flag -- the output is the same but in case the function would run ever so slightly faster: sage: absolute_order_from_module_generators(g, check_is_ring=False) Order in Number Field in a with defining polynomial x^4 - 5 sage: absolute_order_from_module_generators(g, check_rank=False) Order in Number Field in a with defining polynomial x^4 - 5 sage: absolute_order_from_module_generators(g, check_integral=False) Order in Number Field in a with defining polynomial x^4 - 5 Next we illustrate constructing "fake" to illustrate turning off various check flags: sage: k.<i> = NumberField(x^2 + 1) sage: R = absolute_order_from_module_generators([2, 2*i], check_is_ring=False); R Order in Number Field in i with defining polynomial x^2 + 1 sage: R.basis() [2, 2*i] sage: R = absolute_order_from_module_generators([k(1)], check_rank=False); R Order in Number Field in i with defining polynomial x^2 + 1 sage: R.basis() [1] If the order contains a non-integral element, even if we don't check that, we'll find that the rank is wrong or that the order isn't closed under multiplication: sage: absolute_order_from_module_generators([1/2, i], check_integral=False) Traceback (most recent call last): ... ValueError: the module span of the gens is not closed under multiplication. sage: R = absolute_order_from_module_generators([1/2, i], check_is_ring=False, check_integral=False); R Order in Number Field in i with defining polynomial x^2 + 1 sage: R.basis() [1/2, i] We turn off all check flags and make a really messed up order. sage: R = absolute_order_from_module_generators([1/2, i], check_is_ring=False, check_integral=False, check_rank=False); R Order in Number Field in i with defining polynomial x^2 + 1 sage: R.basis() [1/2, i] """ if len(gens) == 0: raise ValueError, "gens must span an order over ZZ" gens = Sequence(gens) if check_integral and not each_is_integral(gens): raise ValueError, "each generator must be integral" K = gens.universe() if is_NumberFieldOrder(K): K = K.number_field() V, from_V, to_V = K.vector_space() mod_gens = [to_V(x) for x in gens] ambient = ZZ**V.dimension() W = ambient.span(mod_gens) if allow_subfield: if W.rank() < K.degree(): # We have to make the order in a smaller field. # We do this by choosing a random element of W, # moving it back to K, and checking that it defines # a field of degree equal to the degree of W. # Then we move everything into that field, where # W does define an order. while True: z = W.random_element() alpha = from_V(z) if alpha.minpoly() == W.rank(): break # Now alpha generates a subfield there W is an order # (with the right rank). # We move each element of W to this subfield. c = alpha.coordinates_in_terms_of_powers() elif check_rank: if W.rank() != K.degree(): raise ValueError, "the rank of the span of gens is wrong" if check_is_ring: # Is there a faster way? alg = [to_V(x) for x in monomials(gens, [f.absolute_minpoly().degree() for f in gens])] if ambient.span(alg) != W: raise ValueError, "the module span of the gens is not closed under multiplication." return AbsoluteOrder(K, W, check=False, is_maximal=is_maximal) # we have already checked everything
e523b3c439fa132a1905b21fdc9900972e1ea34c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/e523b3c439fa132a1905b21fdc9900972e1ea34c/order.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4967, 67, 1019, 67, 2080, 67, 2978, 67, 25959, 12, 23730, 16, 866, 67, 14970, 23811, 33, 5510, 16, 866, 67, 11500, 33, 5510, 16, 866, 67, 291, 67, 8022, 33, 5510, 16, 353, 67, 1896, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4967, 67, 1019, 67, 2080, 67, 2978, 67, 25959, 12, 23730, 16, 866, 67, 14970, 23811, 33, 5510, 16, 866, 67, 11500, 33, 5510, 16, 866, 67, 291, 67, 8022, 33, 5510, 16, 353, 67, 1896, ...
DebugPrint(-1, "result = " + str(result))
def get_BundleSize(self): global BundleSize result = self.__getConfigAttribute("BundleSize") DebugPrint(-1, "result = " + str(result)) if result: BundleSize = int(result) elif result == None or result == "": BundleSize = 100 DebugPrint(-1, "BundleSize = " + str(BundleSize)) maxpending = self.get_MaxPendingFiles() if (BundleSize > maxpending): BundleSize = maxpending return BundleSize
7c0c4068bdc92b19c96096c38da3f0acbea57dbf /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/637/7c0c4068bdc92b19c96096c38da3f0acbea57dbf/Gratia.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 3405, 1225, 12, 2890, 4672, 2552, 8539, 1225, 563, 273, 365, 16186, 588, 809, 1499, 2932, 3405, 1225, 7923, 309, 563, 30, 8539, 1225, 273, 509, 12, 2088, 13, 1327, 563, 422, 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, 336, 67, 3405, 1225, 12, 2890, 4672, 2552, 8539, 1225, 563, 273, 365, 16186, 588, 809, 1499, 2932, 3405, 1225, 7923, 309, 563, 30, 8539, 1225, 273, 509, 12, 2088, 13, 1327, 563, 422, 5...
"""add(sprite, list, or group, ...) add sprite to group Add a sprite or sequence of sprites to a group."""
"""add sprite(s) to group Group.add(sprite, list, group, ...): return None Adds a sprite or sequence of sprites to a group. """
def add(self, *sprites): """add(sprite, list, or group, ...) add sprite to group
d9760f3e4782abb02dd98080337626eefdad67ee /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1298/d9760f3e4782abb02dd98080337626eefdad67ee/sprite.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 12, 2890, 16, 380, 1752, 24047, 4672, 3536, 1289, 12, 1752, 796, 16, 666, 16, 578, 1041, 16, 1372, 13, 527, 16839, 358, 1041, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 12, 2890, 16, 380, 1752, 24047, 4672, 3536, 1289, 12, 1752, 796, 16, 666, 16, 578, 1041, 16, 1372, 13, 527, 16839, 358, 1041, 2, -100, -100, -100, -100, -100, -100, -100, -100, -1...
print repr(row)
def exec_checked(self, curs, sql, args): curs.execute(sql, args) ok = True for row in curs.fetchall(): print repr(row) if (row[0] / 100) == 2: self.log.info("%d %s" % (row[0], row[1])) else: self.log.error("%d %s" % (row[0], row[1])) ok = False return ok
31fee997438682a3301e680706f83308c0632eb3 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/14597/31fee997438682a3301e680706f83308c0632eb3/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1196, 67, 4532, 12, 2890, 16, 25326, 16, 1847, 16, 833, 4672, 25326, 18, 8837, 12, 4669, 16, 833, 13, 1529, 273, 1053, 364, 1027, 316, 25326, 18, 5754, 454, 13332, 309, 261, 492, 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, 1196, 67, 4532, 12, 2890, 16, 25326, 16, 1847, 16, 833, 4672, 25326, 18, 8837, 12, 4669, 16, 833, 13, 1529, 273, 1053, 364, 1027, 316, 25326, 18, 5754, 454, 13332, 309, 261, 492, 63, ...
if 'rev' in parm:
if 'rev' in ud.parm:
def localpath(self, url, ud, d): if not "module" in ud.parm: raise MissingParameterError("svn method needs a 'module' parameter") else: ud.module = ud.parm["module"]
8c43d9db5d8c22c9d2c3852a711fc5795de575e3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2672/8c43d9db5d8c22c9d2c3852a711fc5795de575e3/svn.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1191, 803, 12, 2890, 16, 880, 16, 23969, 16, 302, 4672, 309, 486, 315, 2978, 6, 316, 23969, 18, 1065, 81, 30, 1002, 10230, 1662, 668, 2932, 31505, 707, 4260, 279, 296, 2978, 11, 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, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1191, 803, 12, 2890, 16, 880, 16, 23969, 16, 302, 4672, 309, 486, 315, 2978, 6, 316, 23969, 18, 1065, 81, 30, 1002, 10230, 1662, 668, 2932, 31505, 707, 4260, 279, 296, 2978, 11, 1569, ...
where.append(('name','=',name)) if self.res_id and directory.ressource_tree:
where.append(('name','=',name)) if self.res_id and directory.ressource_tree: where1 = where
def _child_get(self,cr,name = None): dirobj = self.context._dirobj uid = self.context.uid ctx = self.context.context.copy() ctx.update(self.dctx) directory = dirobj.browse(cr, uid, self.dir_id) obj = dirobj.pool.get(self.res_model) where = [] res = [] if name: where.append(('name','=',name)) if self.res_id and directory.ressource_tree: if obj._parent_name in obj.fields_get(cr, uid): where.append((obj._parent_name, '=', self.res_id)) resids = obj.search(cr,uid, where, context=ctx) for bo in obj.browse(cr,uid,resids,context=ctx): namefield = directory.resource_field or 'name' if not bo: continue name = getattr(bo, namefield) if not name: continue res.append(node_res_obj(name, self, self.context, self.res_model, res_bo = bo)) if name: where.append(('name','=',name)) where = [('parent_id','=',self.dir_id) ] ids = dirobj.search(cr, uid, where,context=ctx) if ids: for dirr in dirobj.browse(cr,uid,ids,context=ctx): if dirr.type == 'directory': res.append(node_res_obj(dirr.name,self,self.context,self.res_model,res_bo = None, res_id = self.res_id)) elif dirr.type == 'ressource': # child resources can be controlled by properly set dctx res.append(node_res_dir(dirr.name,self,self.context,dirr)) fil_obj=dirobj.pool.get('ir.attachment') where2 = where + [('res_model', '=', self.res_model), ('res_id','=',self.res_id)] # print "where clause for dir_obj", where2 ids = fil_obj.search(cr,uid,where2,context=ctx) if ids: for fil in fil_obj.browse(cr,uid,ids,context=ctx): res.append(node_file(fil.name,self,self.context,fil)) return res
4a6d0a4a5112de7c89e8fe468f5ea0470ab01acf /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/4a6d0a4a5112de7c89e8fe468f5ea0470ab01acf/nodes.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3624, 67, 588, 12, 2890, 16, 3353, 16, 529, 273, 599, 4672, 4314, 303, 441, 273, 365, 18, 2472, 6315, 3211, 303, 441, 4555, 273, 365, 18, 2472, 18, 1911, 1103, 273, 365, 18, 247...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3624, 67, 588, 12, 2890, 16, 3353, 16, 529, 273, 599, 4672, 4314, 303, 441, 273, 365, 18, 2472, 6315, 3211, 303, 441, 4555, 273, 365, 18, 2472, 18, 1911, 1103, 273, 365, 18, 247...
self.sqlPath=self.myHome
self.sqlPath=self.myHome+"/"
def __init__(self,default=False): """ The __init__ method which can be overrridden using other methods defined in this class. """ self.defaultVersion=99 self.activeRecords="1" self.db=None self.dbSocket=None self.myHome=None self.myHome=os.getenv("HOME") self.urlPattern="http://ldas-cit.ligo.caltech.edu/segments/S5/%s/dq_segments.txt" self.pathPattern="%s/%s/dq_segments.txt" self.sqlFile="/followupDQ.sqlite" self.sqlPath=self.myHome self.ifoList=["L1","H1","H2"] self.dbFiles=[] for ifo in self.ifoList: thisFile=self.pathPattern%(self.myHome,ifo) thisUrl=self.urlPattern%(ifo) thisIfo=ifo thisFileExists=os.path.isfile(thisFile) self.dbFiles.append([thisIfo,thisFile,thisUrl,thisFileExists]) #Default Behavior Code Below if not(default) and os.path.isfile(self.sqlPath+self.sqlFile): self.__connectDB__() try: x=self.__createRawCursor__() for table in self.ifoList: x.execute("select * from %s limit 100"%(table)) del x except: sys.stderr.write("Sqlite database at %s seems\
b00c1b91a8e32adcc0a750187453e01c14d069f0 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3592/b00c1b91a8e32adcc0a750187453e01c14d069f0/fu_utils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1886, 33, 8381, 4672, 3536, 1021, 1001, 2738, 972, 707, 1492, 848, 506, 5713, 1691, 13002, 1450, 1308, 2590, 2553, 316, 333, 667, 18, 3536, 365, 18, 1886, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1886, 33, 8381, 4672, 3536, 1021, 1001, 2738, 972, 707, 1492, 848, 506, 5713, 1691, 13002, 1450, 1308, 2590, 2553, 316, 333, 667, 18, 3536, 365, 18, 1886, ...
def show_window(self, window):
def __show_window(self, window):
def show_window(self, window): window.move(*window.__position) window.show()
1518cc810432a6e15b3d9f134759190405b665ce /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4764/1518cc810432a6e15b3d9f134759190405b665ce/trayicon.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 4500, 67, 5668, 12, 2890, 16, 2742, 4672, 2742, 18, 8501, 30857, 5668, 16186, 3276, 13, 2742, 18, 4500, 1435, 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, 1001, 4500, 67, 5668, 12, 2890, 16, 2742, 4672, 2742, 18, 8501, 30857, 5668, 16186, 3276, 13, 2742, 18, 4500, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
except:
except IOError:
def doGlobal(screen): screen["clock"] = Clock()
55bd830d52a2961ec57a6dec5969e8e7c0294c35 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6652/55bd830d52a2961ec57a6dec5969e8e7c0294c35/Menu.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 5160, 12, 9252, 4672, 5518, 9614, 18517, 11929, 273, 18051, 1435, 282, 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, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 5160, 12, 9252, 4672, 5518, 9614, 18517, 11929, 273, 18051, 1435, 282, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...