rem
stringlengths
2
226k
add
stringlengths
0
227k
context
stringlengths
8
228k
meta
stringlengths
156
215
input_ids
list
attention_mask
list
labels
list
return http.Response(stream = '')
return HTMLResponse(stream = '')
def render(self, ctx): #self.worksheet.ping(self.username) self.worksheet.ping(username=None) # None so doesn't save a revision return http.Response(stream = '')
5da3b1cd72cd4a94421b8bc914d7957cdbe6b56d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/5da3b1cd72cd4a94421b8bc914d7957cdbe6b56d/twist.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 12, 2890, 16, 1103, 4672, 468, 2890, 18, 1252, 8118, 18, 1382, 12, 2890, 18, 5053, 13, 365, 18, 1252, 8118, 18, 1382, 12, 5053, 33, 7036, 13, 225, 468, 599, 1427, 3302, 1404, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1743, 12, 2890, 16, 1103, 4672, 468, 2890, 18, 1252, 8118, 18, 1382, 12, 2890, 18, 5053, 13, 365, 18, 1252, 8118, 18, 1382, 12, 5053, 33, 7036, 13, 225, 468, 599, 1427, 3302, 1404, 1...
print settings
def config(self, action=None, **kwargs): settings = Settings() print settings if action == 'save': error = False with settings: # hack for environmental variables env = {} if 'Env' in kwargs: try: env = kwargs['Env'].split("\r\n") env = filter(lambda x: len(x) > 0, env) env = map(lambda x: tuple(x.split('=')), env) env = dict(env) except: raise ValueError, 'Malformed environment variables' finally: kwargs['Env'] = env for k,v in kwargs.items(): try: settings[k] = v except ValueError as e: settings.item(k).message = str(e) error = True if not error: settings.persist() raise cherrypy.HTTPRedirect('/maintenance') return template.render(settings=settings)
ef82691967c07b6bf5ce5b83edb2cdb4710aac62 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/364/ef82691967c07b6bf5ce5b83edb2cdb4710aac62/maintenance.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 642, 12, 2890, 16, 1301, 33, 7036, 16, 2826, 4333, 4672, 1947, 273, 8709, 1435, 225, 309, 1301, 422, 296, 5688, 4278, 555, 273, 1083, 598, 1947, 30, 468, 11769, 364, 3330, 287, 3152, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 642, 12, 2890, 16, 1301, 33, 7036, 16, 2826, 4333, 4672, 1947, 273, 8709, 1435, 225, 309, 1301, 422, 296, 5688, 4278, 555, 273, 1083, 598, 1947, 30, 468, 11769, 364, 3330, 287, 3152, 1...
except BaseException, e:
except Exception, e:
def file_finder_plugin(dirname="."): """ Find the files in ``dirname`` under Mercurial version control according to the setuptools spec (see http://peak.telecommunity.com/DevCenter/setuptools#adding-support-for-other-revision-control-systems ). """ import distutils.log dirname = dirname or '.' try: for mgr in HGRepoManager.get_valid_managers(dirname): try: return mgr.find_files() except BaseException, e: distutils.log.warn("Error in hgtools.%s: %s", mgr, e) except BaseException, e: distutils.log.warn("Error getting managers in hgtools.file_finder_plugin: %s", e) return []
8ea53b311bb76488e9a09a0e9da11d3dd7e7b7fe /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/833/8ea53b311bb76488e9a09a0e9da11d3dd7e7b7fe/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 585, 67, 15356, 67, 4094, 12, 12287, 1546, 1199, 4672, 3536, 4163, 326, 1390, 316, 12176, 12287, 10335, 3613, 14940, 1397, 649, 1177, 3325, 4888, 358, 326, 444, 30693, 857, 261, 5946, 1062...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 585, 67, 15356, 67, 4094, 12, 12287, 1546, 1199, 4672, 3536, 4163, 326, 1390, 316, 12176, 12287, 10335, 3613, 14940, 1397, 649, 1177, 3325, 4888, 358, 326, 444, 30693, 857, 261, 5946, 1062...
self._cached_build_root = executive.run_command(["webkit-build-directory", "--base"]).rstrip()
self._cached_build_root = executive.run_command(["webkit-build-directory", "--top-level"]).rstrip()
def _build_path(self, *comps): if not self._cached_build_root: self._cached_build_root = executive.run_command(["webkit-build-directory", "--base"]).rstrip() return os.path.join(self._cached_build_root, self._options.target, *comps)
85159a03902ffaaa8bf45c396c6672a82b9c5ef8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9392/85159a03902ffaaa8bf45c396c6672a82b9c5ef8/mac.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3510, 67, 803, 12, 2890, 16, 380, 31532, 4672, 309, 486, 365, 6315, 7097, 67, 3510, 67, 3085, 30, 365, 6315, 7097, 67, 3510, 67, 3085, 273, 28743, 688, 18, 2681, 67, 3076, 3816, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3510, 67, 803, 12, 2890, 16, 380, 31532, 4672, 309, 486, 365, 6315, 7097, 67, 3510, 67, 3085, 30, 365, 6315, 7097, 67, 3510, 67, 3085, 273, 28743, 688, 18, 2681, 67, 3076, 3816, ...
raise error_proto, resp
raise NNTPProtocolError(resp)
def getresp(self): """Internal: get a response from the server. Raise various errors if the response indicates an error.""" resp = self.getline() if self.debugging: print '*resp*', `resp` c = resp[:1] if c == '4': raise error_temp, resp if c == '5': raise error_perm, resp if c not in '123': raise error_proto, resp return resp
4e07be6953691f89f9e6cbb75dc0fc194ecbf3e8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/4e07be6953691f89f9e6cbb75dc0fc194ecbf3e8/nntplib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 12243, 12, 2890, 4672, 3536, 3061, 30, 336, 279, 766, 628, 326, 1438, 18, 20539, 11191, 1334, 309, 326, 766, 8527, 392, 555, 12123, 1718, 273, 365, 18, 588, 1369, 1435, 309, 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, 336, 12243, 12, 2890, 4672, 3536, 3061, 30, 336, 279, 766, 628, 326, 1438, 18, 20539, 11191, 1334, 309, 326, 766, 8527, 392, 555, 12123, 1718, 273, 365, 18, 588, 1369, 1435, 309, 365, ...
sender = msg.get_sender().lower() os.environ['LANG'] = self.GetPreferredLanguage(sender) sender = sender.split('@')[0]
sender = msg.get_sender().lower().split('@')[0]
def ParseMailCommands(self, msg): # Break any infloops. If this has come from a Mailman server then # it'll have this header. It's still possible to infloop between two # servers because there's no guaranteed way to know it came from a # bot. if msg['x-beenthere'] or msg['list-id']: return # check the autoresponse stuff if self.autorespond_requests: # TBD: this is a hack and is not safe with respect to errors in # the Replybot module. It should be redesigned to work with the # robust delivery scheme. from Mailman.Handlers import Replybot Replybot.process(self, msg, msgdata={'torequest':1}) if self.autorespond_requests == 1: # Yes, auto-respond and discard return
fd50f6ba3c52ce475f91f07aef2835cffeada335 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2120/fd50f6ba3c52ce475f91f07aef2835cffeada335/MailCommandHandler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2884, 6759, 9127, 12, 2890, 16, 1234, 4672, 468, 17030, 1281, 8286, 383, 4473, 18, 225, 971, 333, 711, 12404, 628, 279, 11542, 4728, 1438, 1508, 468, 518, 5614, 1240, 333, 1446, 18, 225,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2884, 6759, 9127, 12, 2890, 16, 1234, 4672, 468, 17030, 1281, 8286, 383, 4473, 18, 225, 971, 333, 711, 12404, 628, 279, 11542, 4728, 1438, 1508, 468, 518, 5614, 1240, 333, 1446, 18, 225,...
pat = re.compile(r'^\s*def\s')
pat = re.compile(r'^(\s*def\s)|(.*\slambda(:|\s))')
def findsource(object): """Return the entire source file and starting line number for an object. The argument may be a module, class, method, function, traceback, frame, or code object. The source code is returned as a list of all the lines in the file and the line number indexes a line in that list. An IOError is raised if the source code cannot be retrieved.""" file = getsourcefile(object) or getfile(object) lines = linecache.getlines(file) if not lines: raise IOError, 'could not get source code' if ismodule(object): return lines, 0 if isclass(object): name = object.__name__ pat = re.compile(r'^\s*class\s*' + name + r'\b') for i in range(len(lines)): if pat.match(lines[i]): return lines, i else: raise IOError, 'could not find class definition' if ismethod(object): object = object.im_func if isfunction(object): object = object.func_code if istraceback(object): object = object.tb_frame if isframe(object): object = object.f_code if iscode(object): if not hasattr(object, 'co_firstlineno'): raise IOError, 'could not find function definition' lnum = object.co_firstlineno - 1 pat = re.compile(r'^\s*def\s') while lnum > 0: if pat.match(lines[lnum]): break lnum = lnum - 1 return lines, lnum raise IOError, 'could not find code object'
2d375f78a570dc627daf61df9d12473633055cdf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/2d375f78a570dc627daf61df9d12473633055cdf/inspect.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 3168, 12, 1612, 4672, 3536, 990, 326, 7278, 1084, 585, 471, 5023, 980, 1300, 364, 392, 733, 18, 225, 1021, 1237, 2026, 506, 279, 1605, 16, 667, 16, 707, 16, 445, 16, 10820, 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, 1104, 3168, 12, 1612, 4672, 3536, 990, 326, 7278, 1084, 585, 471, 5023, 980, 1300, 364, 392, 733, 18, 225, 1021, 1237, 2026, 506, 279, 1605, 16, 667, 16, 707, 16, 445, 16, 10820, 16, ...
for trace_NP, context in find_all(node, expr, with_context=True): pp, p, t, s = (context[n] for n in "PP P T S".split())
for trace_NP, ctx in find_all(node, expr, with_context=True): pp, p, t, s = ctx.pp, ctx.p, ctx.t, ctx.s
def fix_subject_extraction(self, _, n, pred, w=None, reduced=False): debug("%s", reduced) node = n debug("Fixing subject extraction: %s", lrp_repr(node)) if not reduced: self.remove_null_element(node)
6550bb6489583e5c02c61dbb907bc6e2b4b74174 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8383/6550bb6489583e5c02c61dbb907bc6e2b4b74174/fix_rc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2917, 67, 7857, 67, 14523, 1128, 12, 2890, 16, 389, 16, 290, 16, 3479, 16, 341, 33, 7036, 16, 13162, 33, 8381, 4672, 1198, 27188, 87, 3113, 13162, 13, 756, 273, 290, 1198, 2932, 8585, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2917, 67, 7857, 67, 14523, 1128, 12, 2890, 16, 389, 16, 290, 16, 3479, 16, 341, 33, 7036, 16, 13162, 33, 8381, 4672, 1198, 27188, 87, 3113, 13162, 13, 756, 273, 290, 1198, 2932, 8585, ...
elif len(unboxed) == 0: return rtyper.type_system.rclass.InstanceRepr(rtyper, classdef, gcflavor) else: assert rtyper.type_system.name == 'lltypesystem'
elif len(unboxed) > 0 and rtyper.type_system.name == 'lltypesystem':
unboxed = [subdef for subdef in classdef.getallsubdefs() if subdef.classdesc.pyobj is not None and issubclass(subdef.classdesc.pyobj, UnboxedValue)]
4a0a98868ca83d0f0c688165ba220dad09479b40 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6934/4a0a98868ca83d0f0c688165ba220dad09479b40/rclass.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 26773, 329, 273, 306, 1717, 536, 364, 720, 536, 316, 667, 536, 18, 588, 454, 1717, 12537, 1435, 309, 720, 536, 18, 1106, 5569, 18, 2074, 2603, 353, 486, 599, 471, 14664, 12, 1717, 536, 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, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 26773, 329, 273, 306, 1717, 536, 364, 720, 536, 316, 667, 536, 18, 588, 454, 1717, 12537, 1435, 309, 720, 536, 18, 1106, 5569, 18, 2074, 2603, 353, 486, 599, 471, 14664, 12, 1717, 536, 18, ...
and self.bgcolor == other.bgcolor
and self.bgcolor == other.bgcolor \ and self.fgcolor == other.fgcolor \ and self.strikethrough == other.strikethrough
def __eq__(self, other): return self.fsize == other.fsize \ and self.italic == other.italic \ and self.bold == other.bold \ and self.href == other.href \ and self.valign == other.valign \ and self.preserve == other.preserve \ and self.family == other.family \ and self.bgcolor == other.bgcolor
927868c69a9f32e44c2546eb6ab5c8f174cc7d55 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9125/927868c69a9f32e44c2546eb6ab5c8f174cc7d55/mobiml.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 11253, 972, 12, 2890, 16, 1308, 4672, 327, 365, 18, 74, 1467, 422, 1308, 18, 74, 1467, 521, 471, 365, 18, 7053, 335, 422, 1308, 18, 7053, 335, 521, 471, 365, 18, 16390, 422, 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, 1001, 11253, 972, 12, 2890, 16, 1308, 4672, 327, 365, 18, 74, 1467, 422, 1308, 18, 74, 1467, 521, 471, 365, 18, 7053, 335, 422, 1308, 18, 7053, 335, 521, 471, 365, 18, 16390, 422, 13...
print "uu test" MAX_UU = 45 lines = [] for i in range(0, len(testdata), MAX_UU): b = testdata[i:i+MAX_UU] a = binascii.b2a_uu(b) lines.append(a) print a, res = "" for line in lines: b = binascii.a2b_uu(line) res = res + b verify(res == testdata) crc = binascii.crc32("Test the CRC-32 of") crc = binascii.crc32(" this string.", crc) if crc != 1571220330: print "binascii.crc32() failed." s = '{s\005\000\000\000worldi\002\000\000\000s\005\000\000\000helloi\001\000\000\0000' t = binascii.b2a_hex(s) u = binascii.a2b_hex(t) if s != u: print 'binascii hexlification failed' try: binascii.a2b_hex(t[:-1]) except TypeError: pass else: print 'expected TypeError not raised' try: binascii.a2b_hex(t[:-1] + 'q') except TypeError: pass else: print 'expected TypeError not raised' if have_unicode: verify(binascii.hexlify(unicode('a', 'ascii')) == '61', "hexlify failed for Unicode") try: binascii.a2b_qp("", **{1:1}) except TypeError: pass else: raise TestFailed, "binascii..a2b_qp(**{1:1}) didn't raise TypeError"
if __name__ == "__main__": test_main()
def addnoise(line): noise = fillers ratio = len(line) // len(noise) res = "" while line and noise: if len(line) // len(noise) > ratio: c, line = line[0], line[1:] else: c, noise = noise[0], noise[1:] res = res + c return res + noise + line
46cb568c7f48672eda08b3d15f7013b06a02b01f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/46cb568c7f48672eda08b3d15f7013b06a02b01f/test_binascii.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 17814, 12, 1369, 4672, 10825, 273, 661, 3135, 7169, 273, 562, 12, 1369, 13, 368, 562, 12, 17814, 13, 400, 273, 1408, 1323, 980, 471, 10825, 30, 309, 562, 12, 1369, 13, 368, 562, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 17814, 12, 1369, 4672, 10825, 273, 661, 3135, 7169, 273, 562, 12, 1369, 13, 368, 562, 12, 17814, 13, 400, 273, 1408, 1323, 980, 471, 10825, 30, 309, 562, 12, 1369, 13, 368, 562, ...
"<li> <b>TO</b>: Dirrect test/example optional dependency\n"+\
"<li> <b>TO</b>: Direct test/example optional dependency\n"+\
def createHtmlTableLegend(self, libsOnly):
6a41a827e58ad33fa2b8233b1acbc009d78bc227 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1130/6a41a827e58ad33fa2b8233b1acbc009d78bc227/TrilinosDependencies.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 4353, 1388, 16812, 12, 2890, 16, 15042, 3386, 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, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 4353, 1388, 16812, 12, 2890, 16, 15042, 3386, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
self.play_move(pos)
self.move(pos)
def replay(self, history): for pos in history: self.play_move(pos)
e50c90e49a6204f87f5ffa1463e313de25a5c846 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4470/e50c90e49a6204f87f5ffa1463e313de25a5c846/go.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 16033, 12, 2890, 16, 4927, 4672, 364, 949, 316, 4927, 30, 365, 18, 1601, 67, 8501, 12, 917, 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, ...
[ 1, 1, 1, 1, 1, 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, 16033, 12, 2890, 16, 4927, 4672, 364, 949, 316, 4927, 30, 365, 18, 1601, 67, 8501, 12, 917, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
self.hboxlayout56.addWidget(self.povdir_lbl) self.gridlayout36.addLayout(self.hboxlayout56,4,0,1,1) self.hboxlayout57 = QtGui.QHBoxLayout() self.hboxlayout57.setMargin(0) self.hboxlayout57.setSpacing(6) self.hboxlayout57.setObjectName("hboxlayout57")
self.hboxlayout54.addWidget(self.povdir_lbl) self.gridlayout32.addLayout(self.hboxlayout54,4,0,1,1) self.hboxlayout55 = QtGui.QHBoxLayout() self.hboxlayout55.setMargin(0) self.hboxlayout55.setSpacing(6) self.hboxlayout55.setObjectName("hboxlayout55")
def setupUi(self, UserPrefsDialog): UserPrefsDialog.setObjectName("UserPrefsDialog") UserPrefsDialog.resize(QtCore.QSize(QtCore.QRect(0,0,917,661).size()).expandedTo(UserPrefsDialog.minimumSizeHint()))
752b48c67dcf97437d2cb83fa267b09487665da0 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11221/752b48c67dcf97437d2cb83fa267b09487665da0/UserPrefsDialog.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 13943, 12, 2890, 16, 2177, 1386, 2556, 6353, 4672, 2177, 1386, 2556, 6353, 18, 542, 16707, 2932, 1299, 1386, 2556, 6353, 7923, 2177, 1386, 2556, 6353, 18, 15169, 12, 23310, 4670, 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, 3875, 13943, 12, 2890, 16, 2177, 1386, 2556, 6353, 4672, 2177, 1386, 2556, 6353, 18, 542, 16707, 2932, 1299, 1386, 2556, 6353, 7923, 2177, 1386, 2556, 6353, 18, 15169, 12, 23310, 4670, 18,...
if diff_rorp.isspecial():
if rf.metadata_rorp.isspecial():
def fast_process(self, index, rf): """Process when nothing is a directory""" if not rf.metadata_rorp.equal_loose(rf.mirror_rp): log.Log("Regressing file %s" % (rf.metadata_rorp.get_indexpath()), 5) if rf.metadata_rorp.isreg(): self.restore_orig_regfile(rf) else: if rf.mirror_rp.lstat(): rf.mirror_rp.delete() if diff_rorp.isspecial(): robust.check_common_error(None, rpath.copy_with_attribs, (rf.metadata_rorp, rf.mirror_rp)) else: rpath.copy_with_attribs(rf.metadata_rorp, rf.mirror_rp) if rf.regress_inc: log.Log("Deleting increment " + rf.regress_inc.path, 5) rf.regress_inc.delete()
6f1fe00a4f3338a50df271d91df8965a8278a2c0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/783/6f1fe00a4f3338a50df271d91df8965a8278a2c0/regress.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4797, 67, 2567, 12, 2890, 16, 770, 16, 9075, 4672, 3536, 2227, 1347, 5083, 353, 279, 1867, 8395, 309, 486, 9075, 18, 4165, 67, 86, 280, 84, 18, 9729, 67, 383, 2584, 12, 5809, 18, 271...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4797, 67, 2567, 12, 2890, 16, 770, 16, 9075, 4672, 3536, 2227, 1347, 5083, 353, 279, 1867, 8395, 309, 486, 9075, 18, 4165, 67, 86, 280, 84, 18, 9729, 67, 383, 2584, 12, 5809, 18, 271...
if linkName in ('tp_memset', 'tp_rss', 'tp_memset_nochrome', 'tp_rss_nochrome', 'tp_memset_fast', 'tp_rss_fast'):
if linkName in ('tp_memset', 'tp_rss', 'tp_memset_nochrome', 'tp_rss_nochrome', 'tp_fast_memset', 'tp_fast_rss'):
def results_from_graph(links, results_server): #take the results from the graph server collection script and put it into a pretty format for the waterfall url_format = "http://%s/%s" link_format= "<a href=\'%s\'>%s</a>" first_results = 'RETURN:<br>' last_results = '' full_results = '\nRETURN:<p style="font-size:smaller;">Details:<br>' lines = links.split('\n') for line in lines: if line == "": continue linkvalue = -1 linkdetail = "" values = line.split("\t") linkName = values[0] if len(values) == 2: linkdetail = values[1] else: linkvalue = float(values[1]) linkdetail = values[2] if linkName in ('tp_pbytes', 'tp_%cpu', 'tp_pbytes_nochrome', 'tp_%cpu_nochrome', 'tp_pbytes_fast', 'tp_%cpu_fast'): continue if linkvalue > -1: if linkName in ('tp_memset', 'tp_rss', 'tp_memset_nochrome', 'tp_rss_nochrome', 'tp_memset_fast', 'tp_rss_fast'): #measured in bytes linkName += ": " + filesizeformat(linkvalue) else: linkName += ": " + str(linkvalue) url = url_format % (results_server, linkdetail) link = link_format % (url, linkName) first_results = first_results + "\nRETURN:" + link + "<br>" else: url = url_format % (results_server, linkdetail) link = link_format % (url, linkName) last_results = last_results + '| ' + link + ' ' full_results = first_results + full_results + last_results + '|</p>' print 'RETURN: new graph links' print full_results
dc97e865c335179de478790ab31a743da5486193 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12156/dc97e865c335179de478790ab31a743da5486193/run_tests.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1686, 67, 2080, 67, 4660, 12, 7135, 16, 1686, 67, 3567, 4672, 468, 22188, 326, 1686, 628, 326, 2667, 1438, 1849, 2728, 471, 1378, 518, 1368, 279, 7517, 740, 364, 326, 16313, 25602, 880, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1686, 67, 2080, 67, 4660, 12, 7135, 16, 1686, 67, 3567, 4672, 468, 22188, 326, 1686, 628, 326, 2667, 1438, 1849, 2728, 471, 1378, 518, 1368, 279, 7517, 740, 364, 326, 16313, 25602, 880, ...
soup = BeautifulSoup(urllib2.urlopen(url))
soup = BeautifulSoup(urllib2.urlopen(url), convertEntities=BeautifulSoup.HTML_ENTITIES)
def fetch_tracks(user, request_delay=0.5): """Fetch all tracks from a profile page and return a list.""" url = 'http://last.fm/user/%s/tracks' % user soup = BeautifulSoup(urllib2.urlopen(url)) try: num_pages = int(soup.find('a', 'lastpage').contents[0]) except: num_pages = 1 for cur_page in range(1, num_pages + 1): tracks = parse_page(url + '?page=' + str(cur_page)) for artist, track, timestamp in tracks: yield (artist, track, timestamp) if cur_page < num_pages: time.sleep(request_delay)
4b8a80ae1c37b95cab73e178444c66710b4f7e0d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6447/4b8a80ae1c37b95cab73e178444c66710b4f7e0d/lastscrape.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2158, 67, 21499, 12, 1355, 16, 590, 67, 10790, 33, 20, 18, 25, 4672, 3536, 5005, 777, 13933, 628, 279, 3042, 1363, 471, 327, 279, 666, 12123, 880, 273, 296, 2505, 2207, 2722, 18, 25089...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2158, 67, 21499, 12, 1355, 16, 590, 67, 10790, 33, 20, 18, 25, 4672, 3536, 5005, 777, 13933, 628, 279, 3042, 1363, 471, 327, 279, 666, 12123, 880, 273, 296, 2505, 2207, 2722, 18, 25089...
This illustrates interfaces: sage: f = gp('2/3') sage: type(f) <class 'sage.interfaces.gp.GpElement'> sage: f._sage_() 2/3 sage: type(f._sage_()) <type 'sage.rings.rational.Rational'> sage: a = gap(939393/2433) sage: a._sage_() 313131/811 sage: type(a._sage_()) <type 'sage.rings.rational.Rational'>
def sage_eval(source, locals={}): r""" Obtain a \SAGE object from the input string by evaluate it using SAGE. This means calling eval after preparsing and with globals equal to everything included in the scope of \code{from sage.all import *}.). If the object has an _sage_ method it is called and the value is returned. Otherwise str is called on the object, and all preparsing is applied and the resulting expression is evaluated in the context of \code{from sage.all import *}. To evaluate the expression with certain variables set, use the locals argument, which should be a dictionary. EXAMPLES: This example illustrates that preparsing is applied. sage: eval('2^3') 1 sage: sage_eval('2^3') 8 Note that you have explicitly define variables and pass them as the second option: sage: x = PolynomialRing(RationalField(),"x").gen() sage: sage_eval('x^2+1', locals={'x':x}) x^2 + 1 This illustrates interfaces: sage: f = gp('2/3') sage: type(f) <class 'sage.interfaces.gp.GpElement'> sage: f._sage_() 2/3 sage: type(f._sage_()) <type 'sage.rings.rational.Rational'> sage: a = gap(939393/2433) sage: a._sage_() 313131/811 sage: type(a._sage_()) <type 'sage.rings.rational.Rational'> This example illustrates that evaluation occurs in the context of \code{from sage.all import *}. Even though bernoulli has been redefined in the local scope, when calling \code{sage_eval} the default value meaning of bernoulli is used. Likewise for QQ below. sage: bernoulli = lambda x : x^2 sage: bernoulli(6) 36 sage: eval('bernoulli(6)') 36 sage: sage_eval('bernoulli(6)') 1/42 sage: QQ = lambda x : x^2 sage: QQ(2) 4 sage: sage_eval('QQ(2)') 2 sage: parent(sage_eval('QQ(2)')) Rational Field This example illustrates setting a variable for use in evaluation. sage: x = 5 sage: eval('4/3 + x', {'x':25}) 26 sage: sage_eval('4/3 + x', locals={'x':25}) 79/3 This example illustrates how \code{sage_eval} can be useful when evaluating the output of other computer algebra systems. sage: R.<x> = PolynomialRing(RationalField()) sage: gap.eval('R:=PolynomialRing(Rationals,["x"]);') 'PolynomialRing(..., [ x ])' sage: ff = gap.eval('x:=IndeterminatesOfPolynomialRing(R);; f:=x^2+1;'); ff 'x^2+1' sage: sage_eval(ff, locals={'x':x}) x^2 + 1 sage: eval(ff) Traceback (most recent call last): ... RuntimeError: Use ** for exponentiation, not '^', which means xor in Python, and has the wrong precedence. Here you can see eval simply will not work but \code{sage_eval} will. """ if not isinstance(source, basestring): raise TypeError, "source must be a string." import sage.all p = preparse(source) try: return eval(p, sage.all.__dict__, locals) except SyntaxError, msg: raise SyntaxError, "%s\nError using SAGE to evaluate '%s'"%(msg, p)
1b4ae08b7fd14b38a52e7d5db5cbe13f4bdbe525 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/1b4ae08b7fd14b38a52e7d5db5cbe13f4bdbe525/sage_eval.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 272, 410, 67, 8622, 12, 3168, 16, 8985, 12938, 4672, 436, 8395, 24850, 279, 521, 55, 2833, 733, 628, 326, 810, 533, 635, 5956, 518, 1450, 348, 2833, 18, 225, 1220, 4696, 4440, 5302, 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, 272, 410, 67, 8622, 12, 3168, 16, 8985, 12938, 4672, 436, 8395, 24850, 279, 521, 55, 2833, 733, 628, 326, 810, 533, 635, 5956, 518, 1450, 348, 2833, 18, 225, 1220, 4696, 4440, 5302, 18...
crack_slab.edge_mask[logical_or(abs(crack_slab.pos[2:1]-miny) < params.selection_edge_tol,
crack_slab.edge_mask[logical_or(abs(crack_slab.pos[2,:]-miny) < params.selection_edge_tol,
def makecrack(params): """Given a CrackParams object `param`, construct and return a new crack slab Atoms object.""" print_title('Initialisation') verbosity_push(params.io_verbosity) params.print_() print("Initialising classical potential with args " + params.classical_args.strip() + " from file " + xmlfilename) xmlfile.rewind() classicalpot = Potential(params.classical_args, xmlfile) classicalpot.print_() mpi_glob = MPI_context() print('Initialising potential') simple = Potential('Simple', classicalpot, mpi_obj=mpi_glob) simple.print_() crack_slab, width, height, E, v, v2, bulk = crack_make_slab(params, classicalpot, simple) # Save bulk cube (used for qm_rescale_r parameter in crack code) bulk.write(stem+'_bulk.xyz') crack_slab.params['OrigWidth'] = width crack_slab.params['OrigHeight'] = height crack_slab.params['YoungsModulus'] = E crack_slab.params['PoissonRatio_yx'] = v crack_slab.params['PoissonRatio_yz'] = v2 # Open surfaces, remain periodic in z direction (normal to plane) # and optionally also in x direction if crack_double_ended is true if not params.crack_double_ended: crack_slab.lattice[1,1] = crack_slab.lattice[1,1] + params.crack_vacuum_size crack_slab.lattice[2,2] = crack_slab.lattice[2,2] + params.crack_vacuum_size crack_slab.set_lattice(crack_slab.lattice, False) # 3D crack with free surfaces at z = +/- depth/2 if params.crack_free_surfaces: crack_slab.lattice[3,3] = crack_slab.lattice[3,3] + params.crack_vacuum_size crack_slab.set_lattice(crack_slab.lattice, False) # Add various properties to crack_slab crack_slab.add_property('hybrid', 0) crack_slab.add_property('hybrid_mark', HYBRID_NO_MARK) crack_slab.add_property('changed_nn', 0) crack_slab.add_property('move_mask', 0) crack_slab.add_property('nn', 0) crack_slab.add_property('old_nn', 0) crack_slab.add_property('md_old_changed_nn', 0) crack_slab.add_property('edge_mask', 0) print_title('Fixing Atoms') # Fix top and bottom edges - anything within crack_edge_fix_tol of ymax or ymin is fixed miny, maxy = crack_slab.pos[2,:].min(), crack_slab.pos[2,:].max() crack_slab.move_mask[:] = 1 crack_slab.move_mask[logical_or(abs(crack_slab.pos[2,:]-maxy) < params.crack_edge_fix_tol, abs(crack_slab.pos[2,:]-miny) < params.crack_edge_fix_tol)] = 0 print('%d atoms. %d fixed atoms' % (crack_slab.n, crack_slab.n - crack_slab.move_mask.count())) print_title('Setting edge mask') crack_setup_marks(crack_slab, params) crack_slab.edge_mask[:] = 0 minx, maxx = crack_slab.pos[1,:].min(), crack_slab.pos[1,:].max() crack_slab.edge_mask[logical_or(abs(crack_slab.pos[1,:]-minx) < params.selection_edge_tol, abs(crack_slab.pos[1,:]-maxx) < params.selection_edge_tol)] = 1 miny, maxy = crack_slab.pos[2,:].min(), crack_slab.pos[2,:].max() crack_slab.edge_mask[logical_or(abs(crack_slab.pos[2:1]-miny) < params.selection_edge_tol, abs(crack_slab.pos[2,:]-maxy) < params.selection_edge_tol)] = 1 if params.crack_free_surfaces: # Open surfaces at +/- z minz, maxz = crack_slab.pos[3,:].min(), crack_slab.pos[3,:].max() crack_slab.edge_mask[logical_or(abs(crack_slab.pos[3,:]-minz) < params.selection_edge_tol, abs(crack_slab.pos[3,:]-maxz) < params.selection_edge_tol)] = 1 #crack_make_seed(crack_slab, params) if (params.crack_apply_initial_load): crack_calc_load_field(crack_slab, params, classicalpot, simple, params.crack_loading, overwrite_pos=True, mpi=mpi_glob) if (not params.simulation_classical): crack_update_selection(crack_slab, params) return crack_slab
e7d537235877b5b10eef751790412437979dac45 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8914/e7d537235877b5b10eef751790412437979dac45/makecrack.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 29796, 557, 21580, 12, 2010, 4672, 3536, 6083, 279, 385, 21580, 1370, 733, 1375, 891, 9191, 4872, 471, 327, 279, 394, 276, 21580, 27679, 7149, 87, 733, 12123, 225, 1172, 67, 2649, 2668, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 29796, 557, 21580, 12, 2010, 4672, 3536, 6083, 279, 385, 21580, 1370, 733, 1375, 891, 9191, 4872, 471, 327, 279, 394, 276, 21580, 27679, 7149, 87, 733, 12123, 225, 1172, 67, 2649, 2668, ...
else: if self._precedence < lop._precedence: lparens = False else: if op is l_operator: if self._l_assoc: lparens = False elif self._precedence == lop._precedence: if self._l_assoc: lparens = False elif self._precedence < lop._precedence: lparens = False
def _repr_(self, simplify=True): """ TESTS: sage: a = (1-1/r)^(-1); a 1/(1 - 1/r) sage: a.derivative(r) -1/((1 - 1/r)^2*r^2)
b2c455b8e585ade22b0fb1919e933859d587da58 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9417/b2c455b8e585ade22b0fb1919e933859d587da58/calculus.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 12715, 67, 12, 2890, 16, 16499, 33, 5510, 4672, 3536, 22130, 55, 30, 272, 410, 30, 279, 273, 261, 21, 17, 21, 19, 86, 13, 66, 19236, 21, 1769, 279, 404, 19, 12, 21, 300, 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, 389, 12715, 67, 12, 2890, 16, 16499, 33, 5510, 4672, 3536, 22130, 55, 30, 272, 410, 30, 279, 273, 261, 21, 17, 21, 19, 86, 13, 66, 19236, 21, 1769, 279, 404, 19, 12, 21, 300, 404, ...
elif action == 'raw':
elif c.action == 'raw':
def diff(self, repo_name, f_path): hg_model = HgModel() diff1 = request.GET.get('diff1') diff2 = request.GET.get('diff2') c.action = action = request.GET.get('diff') c.no_changes = diff1 == diff2 c.f_path = f_path c.repo = hg_model.get_repo(c.repo_name)
6e7e6bd3674b3fd92d68b6012e1ee192793b63ed /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4230/6e7e6bd3674b3fd92d68b6012e1ee192793b63ed/files.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3122, 12, 2890, 16, 3538, 67, 529, 16, 284, 67, 803, 4672, 22576, 67, 2284, 273, 670, 75, 1488, 1435, 3122, 21, 273, 590, 18, 3264, 18, 588, 2668, 5413, 21, 6134, 3122, 22, 273, 590,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3122, 12, 2890, 16, 3538, 67, 529, 16, 284, 67, 803, 4672, 22576, 67, 2284, 273, 670, 75, 1488, 1435, 3122, 21, 273, 590, 18, 3264, 18, 588, 2668, 5413, 21, 6134, 3122, 22, 273, 590,...
yield ('ticket', _("Opened and closed tickets"))
yield ('ticket', _("Tickets opened and closed"))
def get_timeline_filters(self, req): if 'TICKET_VIEW' in req.perm: yield ('ticket', _("Opened and closed tickets")) if self.timeline_details: yield ('ticket_details', _("Ticket updates"), False)
97859ab8c09b26b943545e114e203153227fbf5e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9317/97859ab8c09b26b943545e114e203153227fbf5e/web_ui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 26237, 67, 6348, 12, 2890, 16, 1111, 4672, 309, 296, 56, 16656, 1584, 67, 12145, 11, 316, 1111, 18, 12160, 30, 2824, 7707, 16282, 2187, 389, 2932, 6264, 2413, 10191, 471, 4375, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 26237, 67, 6348, 12, 2890, 16, 1111, 4672, 309, 296, 56, 16656, 1584, 67, 12145, 11, 316, 1111, 18, 12160, 30, 2824, 7707, 16282, 2187, 389, 2932, 6264, 2413, 10191, 471, 4375, ...
related_tags_with_count.append((tag, Delicious.getTagInfo(tag)))
related_tags_with_count.append((tag, Delicious.getTagInfo( (tag, ))))
def getRelatedTags( tags ): """ returns a the count of related tags @param list/tuple of tags @returns list of related tags with a count of their occurence """
c479feb96f4ba784f2fee97dcb334030029fda3d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6604/c479feb96f4ba784f2fee97dcb334030029fda3d/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 21531, 3453, 12, 2342, 262, 30, 3536, 1135, 279, 326, 1056, 434, 3746, 2342, 632, 891, 666, 19, 8052, 434, 2342, 632, 6154, 666, 434, 3746, 2342, 598, 279, 1056, 434, 3675, 9145, 25267, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 21531, 3453, 12, 2342, 262, 30, 3536, 1135, 279, 326, 1056, 434, 3746, 2342, 632, 891, 666, 19, 8052, 434, 2342, 632, 6154, 666, 434, 3746, 2342, 598, 279, 1056, 434, 3675, 9145, 25267, ...
if 'Rms positional error (mm) as a function of' in o:
if 'Rms positional error (mm) as a function of' in o and False:
def _mosflm_refine_cell(self): '''Perform the refinement of the unit cell. This will populate all of the information needed to perform the integration.'''
890d6b2c2230ed67fec4f8ed56f084bc3a312356 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3290/890d6b2c2230ed67fec4f8ed56f084bc3a312356/Mosflm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 26719, 2242, 81, 67, 1734, 558, 67, 3855, 12, 2890, 4672, 9163, 4990, 326, 25994, 820, 434, 326, 2836, 2484, 18, 1220, 903, 6490, 777, 434, 326, 1779, 3577, 358, 3073, 326, 12040, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 26719, 2242, 81, 67, 1734, 558, 67, 3855, 12, 2890, 4672, 9163, 4990, 326, 25994, 820, 434, 326, 2836, 2484, 18, 1220, 903, 6490, 777, 434, 326, 1779, 3577, 358, 3073, 326, 12040, ...
outSource = \ FilteredCollection.update(parcel, 'outSource', source=mailCollection, filterExpression=u'getattr(item, \'isOutbound\', False)', filterAttributes=['isOutbound'])
outSource = FilteredCollection.update( parcel, 'outSource', source=mailCollection, filterExpression=u'getattr(item, \'isOutbound\', False)', filterAttributes=['isOutbound'])
def GetColorForHue (hue): rgb = wx.Image.HSVtoRGB (wx.Image_HSVValue (hue / 360.0, 0.5, 1.0)) return ColorType (rgb.red, rgb.green, rgb.blue, 255)
b08eb6642354633e4de341cadb8747c0ebfabaa4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/b08eb6642354633e4de341cadb8747c0ebfabaa4/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 968, 2957, 1290, 44, 344, 261, 76, 344, 4672, 6917, 273, 7075, 18, 2040, 18, 13173, 58, 869, 11343, 261, 27226, 18, 2040, 67, 13173, 58, 620, 261, 76, 344, 342, 12360, 18, 20, 16, 37...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 968, 2957, 1290, 44, 344, 261, 76, 344, 4672, 6917, 273, 7075, 18, 2040, 18, 13173, 58, 869, 11343, 261, 27226, 18, 2040, 67, 13173, 58, 620, 261, 76, 344, 342, 12360, 18, 20, 16, 37...
self.failUnlessEqual(3, getargs_H(3.14))
self.assertRaises(TypeError, getargs_H, 3.14)
def test_H(self): from _testcapi import getargs_H # H returns 'unsigned short', no range checking self.failUnlessEqual(3, getargs_H(3.14)) self.failUnlessEqual(99, getargs_H(Long())) self.failUnlessEqual(99, getargs_H(Int()))
4995fad8b88b0660d17e06de8de078d7faa2ab94 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/4995fad8b88b0660d17e06de8de078d7faa2ab94/test_getargs2.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 44, 12, 2890, 4672, 628, 389, 3813, 71, 2425, 1930, 336, 1968, 67, 44, 468, 670, 1135, 296, 22297, 3025, 2187, 1158, 1048, 6728, 365, 18, 11231, 12649, 6141, 12, 19030, 16, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 44, 12, 2890, 4672, 628, 389, 3813, 71, 2425, 1930, 336, 1968, 67, 44, 468, 670, 1135, 296, 22297, 3025, 2187, 1158, 1048, 6728, 365, 18, 11231, 12649, 6141, 12, 19030, 16, 3...
print filename
def cleanMovieFilename(filename): import os.path filename = os.path.basename(filename) print filename seps = [ ' ', '-', '.' ] for sep in seps: filename = filename.replace(sep, ' ') name = filename.split(' ') properties = { 'format': [ 'DVDRip', 'HDDVD' ], 'container': [ 'avi', 'mkv', 'ogv', 'wmv', 'mp4', 'mov' ], 'screenSize': [ '720p' ], 'videoCodec': [ 'XviD', 'DivX', 'x264' ], 'audioCodec': [ 'AC3', 'DTS' ], 'language': [ 'english', 'eng', 'spanish', 'esp', ], 'releaseGroup': [ 'ESiR', 'WAF' ] } # ensure they're all lowercase for prop, value in properties.items(): properties[prop] = [ s.lower() for s in value ] md = {} # get specific properties for prop, value in properties.items(): for part in list(name): if part.lower() in value: md[prop] = part name.remove(part) # get year def validYear(year): try: return int(year) > 1920 and int(year) < 2015 except ValueError: return False for part in list(name): year = stripBrackets(part) if validYear(year): md['year'] = int(year) name.remove(part) # remove ripper name for by, who in zip(name[:-1], name[1:]): if by.lower() == 'by': name.remove(by) name.remove(who) md['ripper'] = who # get CD number (if any) cdrexp = re.compile('[Cc][Dd]([0-9]+)') for part in list(name): try: md['cdNumber'] = int(cdrexp.search(part).groups()[0]) name.remove(part) except AttributeError: pass return (' '.join(name), md)
188a6f9dcf0bb17c7067317dad6e110441d8cefb /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11141/188a6f9dcf0bb17c7067317dad6e110441d8cefb/movieimdb.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2721, 16727, 13120, 5359, 12, 3459, 4672, 1930, 1140, 18, 803, 1544, 273, 1140, 18, 803, 18, 13909, 12, 3459, 13, 225, 695, 1121, 273, 306, 296, 2265, 2400, 2187, 2611, 308, 364, 5478, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2721, 16727, 13120, 5359, 12, 3459, 4672, 1930, 1140, 18, 803, 1544, 273, 1140, 18, 803, 18, 13909, 12, 3459, 13, 225, 695, 1121, 273, 306, 296, 2265, 2400, 2187, 2611, 308, 364, 5478, ...
(Option, "username", NODEFAULT, "SMTP login name\n" "Set this if your mail host requires authenticated access"),
(Option, "username", "", "SMTP login name\n" "Set this if your mail host requires authenticated access.\n" "If username is not empty, password (below) MUST be set!"),
def set(self, value): try: _val = int(value) except ValueError: raise OptionValueError(self, value, "Integer number required") else: Option.set(self, _val)
092f01b48ed42c60558ac679f8ab88ea5a6f5fbc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/092f01b48ed42c60558ac679f8ab88ea5a6f5fbc/configuration.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 12, 2890, 16, 460, 4672, 775, 30, 389, 1125, 273, 509, 12, 1132, 13, 1335, 2068, 30, 1002, 2698, 23610, 12, 2890, 16, 460, 16, 315, 4522, 1300, 1931, 7923, 469, 30, 2698, 18, 54...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 12, 2890, 16, 460, 4672, 775, 30, 389, 1125, 273, 509, 12, 1132, 13, 1335, 2068, 30, 1002, 2698, 23610, 12, 2890, 16, 460, 16, 315, 4522, 1300, 1931, 7923, 469, 30, 2698, 18, 54...
'__module__', '__name__']: return 0
'__module__', '__name__', '__slots__']: return 0
def visiblename(name, all=None): """Decide whether to show documentation on a variable.""" # Certain special names are redundant. if name in ['__builtins__', '__doc__', '__file__', '__path__', '__module__', '__name__']: return 0 # Private names are hidden, but special names are displayed. if name.startswith('__') and name.endswith('__'): return 1 if all is not None: # only document that which the programmer exported in __all__ return name in all else: return not name.startswith('_')
9ddb3005986dae244935c670cdd58cc08b09f752 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/9ddb3005986dae244935c670cdd58cc08b09f752/pydoc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2281, 495, 14724, 12, 529, 16, 777, 33, 7036, 4672, 3536, 1799, 831, 2856, 358, 2405, 7323, 603, 279, 2190, 12123, 468, 11921, 530, 4582, 1257, 854, 19530, 18, 309, 508, 316, 10228, 972,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2281, 495, 14724, 12, 529, 16, 777, 33, 7036, 4672, 3536, 1799, 831, 2856, 358, 2405, 7323, 603, 279, 2190, 12123, 468, 11921, 530, 4582, 1257, 854, 19530, 18, 309, 508, 316, 10228, 972,...
if self.wantAvatarPhysicsIndicator: onScreenDebug.append("localToon pos = %s\n"%(toonbase.localToon.getPos().pPrintValues(),)) onScreenDebug.append("localToon h = % 10.4f\n"%(toonbase.localToon.getH(),)) onScreenDebug.append("localToon anim = %s\n"%(toonbase.localToon.animFSM.getCurrentState().getName(),))
if __debug__: if self.wantAvatarPhysicsIndicator: onScreenDebug.append("localToon pos = %s\n"%(toonbase.localToon.getPos().pPrintValues(),)) onScreenDebug.append("localToon h = % 10.4f\n"%(toonbase.localToon.getH(),)) onScreenDebug.append("localToon anim = %s\n"%(toonbase.localToon.animFSM.getCurrentState().getName(),))
def handleAvatarControls(self, task): """ Check on the arrow keys and update the avatar. """ if self.wantAvatarPhysicsIndicator: onScreenDebug.append("localToon pos = %s\n"%(toonbase.localToon.getPos().pPrintValues(),)) onScreenDebug.append("localToon h = % 10.4f\n"%(toonbase.localToon.getH(),)) onScreenDebug.append("localToon anim = %s\n"%(toonbase.localToon.animFSM.getCurrentState().getName(),)) #assert(self.debugPrint("handleAvatarControls(task=%s)"%(task,))) physObject=self.actorNode.getPhysicsObject() #rotAvatarToPhys=Mat3.rotateMatNormaxis(-self.avatarNodePath.getH(), Vec3.up()) #rotPhysToAvatar=Mat3.rotateMatNormaxis(self.avatarNodePath.getH(), Vec3.up()) contact=self.actorNode.getContactVector() # hack fix for falling through the floor: if contact==Vec3.zero() and self.avatarNodePath.getZ()<-50.0: # reset: # DCR: don't reset X and Y; allow player to move self.avatarNodePath.setZ(50.0) self.resetPhys()
4d92e63fdd59070a3d2b21f20eb98c01489610bc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8543/4d92e63fdd59070a3d2b21f20eb98c01489610bc/PhysicsWalker.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 23999, 16795, 12, 2890, 16, 1562, 4672, 3536, 2073, 603, 326, 12274, 1311, 471, 1089, 326, 16910, 18, 3536, 309, 1001, 4148, 972, 30, 309, 365, 18, 17369, 23999, 3731, 1900, 2102, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 23999, 16795, 12, 2890, 16, 1562, 4672, 3536, 2073, 603, 326, 12274, 1311, 471, 1089, 326, 16910, 18, 3536, 309, 1001, 4148, 972, 30, 309, 365, 18, 17369, 23999, 3731, 1900, 2102, ...
return S_ERROR(lfc.sstrerror(lfc.cvar.serrno)) def __changeOwner(self,lfn,userID): fullLfn = '%s%s' % (self.prefix,lfn) res = lfc.lfc_chown(fullLfn,userID,-1)
return S_ERROR( lfc.sstrerror( lfc.cvar.serrno ) ) def __changeOwner( self, lfn, userID ): fullLfn = '%s%s' % ( self.prefix, lfn ) res = lfc.lfc_chown( fullLfn, userID, -1 )
def __addUserDN(self,userID,dn): res = lfc.lfc_enterusrmap(userID,dn) if res == 0: return S_OK() errorNo = lfc.cvar.serrno if errorNo == 17: # User DN already exists return S_OK() else: return S_ERROR(lfc.sstrerror(lfc.cvar.serrno))
6280f3782654b93320f684f56a83a6624459bcec /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/6280f3782654b93320f684f56a83a6624459bcec/LcgFileCatalogClient.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1289, 1299, 8609, 12, 2890, 16, 1355, 734, 16, 5176, 4672, 400, 273, 328, 7142, 18, 80, 7142, 67, 2328, 13640, 1458, 12, 1355, 734, 16, 5176, 13, 309, 400, 422, 374, 30, 327, 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, 1001, 1289, 1299, 8609, 12, 2890, 16, 1355, 734, 16, 5176, 4672, 400, 273, 328, 7142, 18, 80, 7142, 67, 2328, 13640, 1458, 12, 1355, 734, 16, 5176, 13, 309, 400, 422, 374, 30, 327, 3...
except ValueError, e:
except HeaderError, 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
6c5bb832f0b5724716184d3dcf33270dab252de7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/6c5bb832f0b5724716184d3dcf33270dab252de7/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,...
cc_args = self.compile_options + \
cc_args = compile_options + \
def compile (self, sources, output_dir=None, macros=None, include_dirs=None, debug=0, extra_preargs=None, extra_postargs=None):
c837262ef94eead8791627cf8e4948350e528cd0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/c837262ef94eead8791627cf8e4948350e528cd0/msvccompiler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4074, 261, 2890, 16, 5550, 16, 876, 67, 1214, 33, 7036, 16, 24302, 33, 7036, 16, 2341, 67, 8291, 33, 7036, 16, 1198, 33, 20, 16, 2870, 67, 1484, 1968, 33, 7036, 16, 2870, 67, 2767, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4074, 261, 2890, 16, 5550, 16, 876, 67, 1214, 33, 7036, 16, 24302, 33, 7036, 16, 2341, 67, 8291, 33, 7036, 16, 1198, 33, 20, 16, 2870, 67, 1484, 1968, 33, 7036, 16, 2870, 67, 2767, ...
if anyTime:
if anyTime or isDate:
def importProcess(self, text, extension=None, item=None): # the item parameter is so that a share item can be passed in for us # to populate.
3ca4a775ef4c1680b25b009c70efc4375dbbae88 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/3ca4a775ef4c1680b25b009c70efc4375dbbae88/ICalendar.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1930, 2227, 12, 2890, 16, 977, 16, 2710, 33, 7036, 16, 761, 33, 7036, 4672, 468, 326, 761, 1569, 353, 1427, 716, 279, 7433, 761, 848, 506, 2275, 316, 364, 584, 468, 358, 6490, 18, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1930, 2227, 12, 2890, 16, 977, 16, 2710, 33, 7036, 16, 761, 33, 7036, 4672, 468, 326, 761, 1569, 353, 1427, 716, 279, 7433, 761, 848, 506, 2275, 316, 364, 584, 468, 358, 6490, 18, 2,...
self.colors_pool.remove(color)
if color in self.colors_pool: self.colors_pool.remove(color)
def remove_from_pool(self,color): self.colors_pool.remove(color)
1f06afeab7217be7b570f65c45105242712918de /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3123/1f06afeab7217be7b570f65c45105242712918de/colormanager.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1206, 67, 2080, 67, 6011, 12, 2890, 16, 3266, 4672, 309, 2036, 316, 365, 18, 9724, 67, 6011, 30, 365, 18, 9724, 67, 6011, 18, 4479, 12, 3266, 13, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1206, 67, 2080, 67, 6011, 12, 2890, 16, 3266, 4672, 309, 2036, 316, 365, 18, 9724, 67, 6011, 30, 365, 18, 9724, 67, 6011, 18, 4479, 12, 3266, 13, 225, 2, -100, -100, -100, -100, -100...
node.__class__ = DefinitionDefinition
node.__class__ = DefinitionDescription
def fixStyle(node): """ parser.Style Nodes are mapped to logical markup dection of DefinitionList depends on removeNodes and removeNewlines """ if not node.__class__ == Style: return # replace this node by a more apporiate if node.caption == "''": node.__class__ = Emphasized node.caption = "" elif node.caption=="'''''": node.__class__ = Strong node.caption = "" em = Emphasized("''") em.children = node.children node.children = [em] elif node.caption == "'''": node.__class__ = Strong node.caption = "" elif node.caption == ";": # this starts a definition list ? DL [DT->DD, ...] # check if previous node is DefinitionList, if not create one if node.previous.__class__ == DefinitionList: node.__class__ = DefinitionTerm node.moveto(node.previous.lastchild) else: node.__class__ = DefinitionList dt = DefinitionTerm() dt.children = node.children node.children = [] node.appendChild(dt) elif node.caption.startswith(":"): if node.previous.__class__ == DefinitionList: node.__class__ = DefinitionDefinition node.moveto(node.previous.lastchild) node.caption = "" else: node.__class__ = Indented elif node.caption in _styleNodeMap: node.__class__ = _styleNodeMap[node.caption] node.caption = "" else: raise Exception, "unknown style %s" % node.caption # FIXME return node
bc195954d03474c713a92209b210282b9b7b7c79 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12391/bc195954d03474c713a92209b210282b9b7b7c79/advtree.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2917, 2885, 12, 2159, 4672, 3536, 2082, 18, 2885, 14037, 854, 5525, 358, 6374, 9813, 443, 349, 434, 10849, 682, 10935, 603, 1206, 3205, 471, 1206, 1908, 3548, 3536, 309, 486, 756, 16186, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2917, 2885, 12, 2159, 4672, 3536, 2082, 18, 2885, 14037, 854, 5525, 358, 6374, 9813, 443, 349, 434, 10849, 682, 10935, 603, 1206, 3205, 471, 1206, 1908, 3548, 3536, 309, 486, 756, 16186, ...
if self.databases[channel].time < time.time - 3600:
if self.databases[channel].time < time.time() - 3600:
def get_db(self, channel): db = self.registryValue('database',channel) if channel in self.databases: if self.databases[channel].time < time.time - 3600: self.databases[channel].close() self.databases.pop(channel) if channel not in self.databases: self.databases[channel] = sqlite.connect(os.path.join(self.registryValue('datadir'), '%s.db' % db)) self.databases[channel].name = db self.databases[channel].time = time.time() return self.databases[channel]
4faecb0a6a46c2b4e02ea8398049ab54040d394a /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3105/4faecb0a6a46c2b4e02ea8398049ab54040d394a/plugin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 1966, 12, 2890, 16, 1904, 4672, 1319, 273, 365, 18, 9893, 620, 2668, 6231, 2187, 4327, 13, 309, 1904, 316, 365, 18, 3404, 19684, 30, 309, 365, 18, 3404, 19684, 63, 4327, 8009,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1966, 12, 2890, 16, 1904, 4672, 1319, 273, 365, 18, 9893, 620, 2668, 6231, 2187, 4327, 13, 309, 1904, 316, 365, 18, 3404, 19684, 30, 309, 365, 18, 3404, 19684, 63, 4327, 8009,...
query += " AND " + d1
query += " AND " + (' OR '.join(d1))
def convert_field(f): if f in ('create_date', 'write_date'): return "date_trunc('second', %s) as %s" % (f, f) if f == self.CONCURRENCY_CHECK_FIELD: if self._log_access: return "COALESCE(%s.write_date, %s.create_date, now())::timestamp AS %s" % (self._table, self._table, f,) return "now()::timestamp AS %s" % (f,) if isinstance(self._columns[f], fields.binary) and context.get('bin_size', False): return 'length("%s") as "%s"' % (f, f) return '"%s"' % (f,)
9584b1b46826c262b6b4d5a584d7df21d2aa012a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/9584b1b46826c262b6b4d5a584d7df21d2aa012a/orm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1765, 67, 1518, 12, 74, 4672, 309, 284, 316, 7707, 2640, 67, 712, 2187, 296, 2626, 67, 712, 11, 4672, 327, 315, 712, 67, 23558, 2668, 8538, 2187, 738, 87, 13, 487, 738, 87, 6, 738, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1765, 67, 1518, 12, 74, 4672, 309, 284, 316, 7707, 2640, 67, 712, 2187, 296, 2626, 67, 712, 11, 4672, 327, 315, 712, 67, 23558, 2668, 8538, 2187, 738, 87, 13, 487, 738, 87, 6, 738, ...
self._row_animation = ScrollBehaviour(self, start, stop, secs, 0)
if secs == 0: self._set_scroll_step(start - stop, 0) else: self._row_animation = ScrollBehaviour(self, start, stop, secs, 0)
def scroll(self, (rows, cols), secs): """ Scroll by cells rows and cols """ while True: # check if it possible to go there if self._orientation == Grid.HORIZONTAL: num = (self._cell0[0] + rows) * self.num_rows + (self._cell0[1] + cols) if self._orientation == Grid.VERTICAL: num = (self._cell0[1] + cols) * self.num_cols + (self._cell0[0] + rows) if num >= 0 and num < len(self._items): # there is an item in the upper left corner break # remove one cell in scroll, start with rows and use cols if # there are no rows to scroll anymore if rows: rows -= (rows / abs(rows)) else: cols -= (cols / abs(cols)) if rows: start = self._cell0[0] * self._col_size if self._row_animation and self._row_animation.is_playing(): start -= self._row_animation.stop() self._cell0[0] += rows stop = self._cell0[0] * self._col_size self._row_animation = ScrollBehaviour(self, start, stop, secs, 0) if cols: start = self._cell0[1] * self._row_size if self._col_animation and self._col_animation.is_playing(): start -= self._col_animation.stop() self._cell0[1] += cols stop = self._cell0[1] * self._row_size self._col_animation = ScrollBehaviour(self, start, stop, secs, 1)
572f292cd6c4cb21a58e9c35f4bec5f39fc4a0df /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11702/572f292cd6c4cb21a58e9c35f4bec5f39fc4a0df/grid.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5532, 12, 2890, 16, 261, 3870, 16, 5347, 3631, 18043, 4672, 3536, 23134, 635, 5983, 2595, 471, 5347, 3536, 1323, 1053, 30, 468, 866, 309, 518, 3323, 358, 1960, 1915, 309, 365, 6315, 1923...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 5532, 12, 2890, 16, 261, 3870, 16, 5347, 3631, 18043, 4672, 3536, 23134, 635, 5983, 2595, 471, 5347, 3536, 1323, 1053, 30, 468, 866, 309, 518, 3323, 358, 1960, 1915, 309, 365, 6315, 1923...
elif (type(object) is _PropertyType or (base_uid is not None and shortname is not None)):
elif base_uid is not None and shortname is not None:
def make_uid(object, base_uid=None, shortname=None): """ Create a globally unique identifier for the given object. """ if (type(object) in (_ModuleType, _ClassType, _BuiltinFunctionType, _BuiltinMethodType, _FunctionType, _MethodType, _WrapperDescriptorType, _MethodDescriptorType) or isinstance(object, _TypeType)): # If we've already seen this object, return its UID. if type(object) is _MethodType: key = id(object.im_func) else: key = id(object) try: return _object_uids[key] except: pass # We haven't seen this object before; create a new UID. uid = ObjectUID(object) _object_uids[key] = uid # Make sure there's no naming conflict. if uid.shortname() != '__new__': if _name_to_uid.has_key(uid.name()): if sys.stderr.softspace: print >>sys.stderr print >>sys.stderr, ('Warning: UID conflict '+ 'detected: %s' % uid) _name_to_uid[uid.name()] = uid # Return the UID. return uid elif (type(object) is _PropertyType or (base_uid is not None and shortname is not None)): # If we've already seen this variable, return its UID key = (base_uid.id(), shortname) try: return _variable_uids[key] except: pass # We haven't seen this variable before; create a new UID. if type(object) is _PropertyType: uid = PropertyUID(object, base_uid, shortname) else: uid = VariableUID(object, base_uid, shortname) _variable_uids[key] = uid # Make sure there's no naming conflict. if _name_to_uid.has_key(uid.name()): if sys.stderr.softspace: print >>sys.stderr print >>sys.stderr, ('Warning: UID conflict '+ 'detected: %s' % uid) _name_to_uid[uid.name()] = uid return uid else: raise TypeError('Cannot create a UID for a '+ type(object).__name__+ ' without a base UID.')
11c51f7aeb3eb7698a6e75c408180358fd15f51e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11420/11c51f7aeb3eb7698a6e75c408180358fd15f51e/uid.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 67, 1911, 12, 1612, 16, 1026, 67, 1911, 33, 7036, 16, 23879, 33, 7036, 4672, 3536, 1788, 279, 25654, 3089, 2756, 364, 326, 864, 733, 18, 3536, 309, 261, 723, 12, 1612, 13, 316, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 67, 1911, 12, 1612, 16, 1026, 67, 1911, 33, 7036, 16, 23879, 33, 7036, 4672, 3536, 1788, 279, 25654, 3089, 2756, 364, 326, 864, 733, 18, 3536, 309, 261, 723, 12, 1612, 13, 316, ...
if self.name: return self.name else: return "%s: (%dx %s)" % (self.type.name, self.quantity, self.material_type.name)
return "%s: (%dx %s)" % (self.type.name, self.quantity, self.material_type.name)
def __unicode__(self): if self.name: return self.name else: return "%s: (%dx %s)" % (self.type.name, self.quantity, self.material_type.name)
33ee5f24b70b7ed122d2d69cbb151d1e5f3d2669 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13782/33ee5f24b70b7ed122d2d69cbb151d1e5f3d2669/inventory.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 9124, 972, 12, 2890, 4672, 327, 2213, 87, 30, 6142, 13437, 738, 87, 2225, 738, 261, 2890, 18, 723, 18, 529, 16, 365, 18, 16172, 16, 365, 18, 20542, 67, 723, 18, 529, 13, 225, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 9124, 972, 12, 2890, 4672, 327, 2213, 87, 30, 6142, 13437, 738, 87, 2225, 738, 261, 2890, 18, 723, 18, 529, 16, 365, 18, 16172, 16, 365, 18, 20542, 67, 723, 18, 529, 13, 225, ...
raise self.error(dat)
raise self.error(dat[-1])
def login(self, user, password): """Identify client using plaintext password.
30d7469fec69eeeae9057b22a126d4a00278147c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/30d7469fec69eeeae9057b22a126d4a00278147c/imaplib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3925, 12, 2890, 16, 729, 16, 2201, 4672, 3536, 25787, 1004, 1450, 11917, 2201, 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, ...
[ 1, 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, 3925, 12, 2890, 16, 729, 16, 2201, 4672, 3536, 25787, 1004, 1450, 11917, 2201, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
pass else: self.parser.parseError() def processStartTag(self, tagname, attributes):
self.parser.document.appendChild(TextNode(data)) else: self.parser.parseError() self.parser.switchPhase("rootElement") self.parser.processCharacter(data) def processStartTag(self, name, attributes):
def processCharacter(self, data): if data in spaceCharacters: # XXX these should be appended to the Document node as Text node. pass else: # XXX self.parser.parseError()
2a3965276b7b0b922773b962df7914ef25499f97 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4487/2a3965276b7b0b922773b962df7914ef25499f97/parser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 7069, 12, 2890, 16, 501, 4672, 309, 501, 316, 3476, 11600, 30, 468, 11329, 4259, 1410, 506, 12317, 358, 326, 4319, 756, 487, 3867, 756, 18, 1342, 469, 30, 468, 11329, 365, 18, 42...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 7069, 12, 2890, 16, 501, 4672, 309, 501, 316, 3476, 11600, 30, 468, 11329, 4259, 1410, 506, 12317, 358, 326, 4319, 756, 487, 3867, 756, 18, 1342, 469, 30, 468, 11329, 365, 18, 42...
if front(str): start,end = front(str).span() return end-start-1
result = front(str) if result is not None: start, end = result.span() return end-start
def indention(str,front = re.compile("^\s+").match): """ Convert all tabs to the appropriate number of spaces. Find the number of leading spaces. If none, return 0 """ if front(str): start,end = front(str).span() return end-start-1 else: return 0 # no leading spaces
26fc2d04e153a8de76b129a45035addad30bfe75 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/26fc2d04e153a8de76b129a45035addad30bfe75/ST.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3504, 285, 12, 701, 16, 10211, 273, 283, 18, 11100, 2932, 17134, 87, 9078, 2934, 1916, 4672, 3536, 4037, 777, 10920, 358, 326, 5505, 1300, 434, 7292, 18, 4163, 326, 1300, 434, 7676, 7292...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3504, 285, 12, 701, 16, 10211, 273, 283, 18, 11100, 2932, 17134, 87, 9078, 2934, 1916, 4672, 3536, 4037, 777, 10920, 358, 326, 5505, 1300, 434, 7292, 18, 4163, 326, 1300, 434, 7676, 7292...
log.debug('populating admin areas')
def __init__(self, shop, contact, *args, **kwargs): self.shippable = True if kwargs.has_key('shippable'): self.shippable = kwargs['shippable'] del(kwargs['shippable']) self._billing_data_optional = config_value(SHOP_GROUP, 'BILLING_DATA_OPTIONAL'), super(ContactInfoForm, self).__init__(*args, **kwargs) self._local_only = shop.in_country_only areas = shop.areas() if shop.in_country_only and areas and areas.count()>0: log.debug('populating admin areas') areas = [(area.abbrev or area.name, area.name) for area in areas] self.fields['state'] = forms.ChoiceField(choices=areas, initial=selection) self.fields['ship_state'] = forms.ChoiceField(choices=areas, initial=selection, required=False)
ee4e1486c68d9e1c6870b61b5e55c294fb67e2aa /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/13656/ee4e1486c68d9e1c6870b61b5e55c294fb67e2aa/forms.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 12122, 16, 5388, 16, 380, 1968, 16, 2826, 4333, 4672, 365, 18, 3261, 19586, 273, 1053, 309, 1205, 18, 5332, 67, 856, 2668, 3261, 19586, 11, 4672, 365, 18...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 12122, 16, 5388, 16, 380, 1968, 16, 2826, 4333, 4672, 365, 18, 3261, 19586, 273, 1053, 309, 1205, 18, 5332, 67, 856, 2668, 3261, 19586, 11, 4672, 365, 18...
self.simulate()
def addReader(self, reader): if not hasReader(reader): reads[reader] = gtk.input_add(reader, gtk.GDK.INPUT_READ, self.callback) self.simulate()
8db6c74d280eec4eed6a130892c293242f600ed5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/8db6c74d280eec4eed6a130892c293242f600ed5/gtkreactor.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 2514, 12, 2890, 16, 2949, 4672, 309, 486, 711, 2514, 12, 10530, 4672, 6838, 63, 10530, 65, 273, 22718, 18, 2630, 67, 1289, 12, 10530, 16, 22718, 18, 43, 3398, 18, 15934, 67, 6949,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 527, 2514, 12, 2890, 16, 2949, 4672, 309, 486, 711, 2514, 12, 10530, 4672, 6838, 63, 10530, 65, 273, 22718, 18, 2630, 67, 1289, 12, 10530, 16, 22718, 18, 43, 3398, 18, 15934, 67, 6949,...
"--ui-test-action-max-timeout=180000"])
"--ui-test-action-max-timeout=180000", "--ui-test-terminate-timeout=60000"])
def TestUI(self): return self.SimpleTest("chrome", "ui_tests", valgrind_test_args=[ "--timeout=120000", "--trace_children", "--indirect"], cmd_args=[ "--ui-test-timeout=120000", "--ui-test-action-timeout=80000", "--ui-test-action-max-timeout=180000"])
54f5d998f904cf14c4a5287f30dfc6f62cd770d4 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5060/54f5d998f904cf14c4a5287f30dfc6f62cd770d4/chrome_tests.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7766, 5370, 12, 2890, 4672, 327, 365, 18, 5784, 4709, 2932, 343, 10896, 3113, 315, 4881, 67, 16341, 3113, 1244, 3197, 728, 67, 3813, 67, 1968, 22850, 5238, 4538, 33, 2138, 2787, 3113, 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, 7766, 5370, 12, 2890, 4672, 327, 365, 18, 5784, 4709, 2932, 343, 10896, 3113, 315, 4881, 67, 16341, 3113, 1244, 3197, 728, 67, 3813, 67, 1968, 22850, 5238, 4538, 33, 2138, 2787, 3113, 52...
print sender, ':', repr(data)
print (str(sender) + ' ' + repr(data))
def receiver(): # Open and initialize the socket s = openmcastsock(MYGROUP, MYPORT) # # Loop, printing any data we receive while 1: data, sender = s.recvfrom(1500) while data[-1:] == '\0': data = data[:-1] # Strip trailing \0's print sender, ':', repr(data)
98a3aff92cd94e5ecb782fa05d5b5471ecf9fc97 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12029/98a3aff92cd94e5ecb782fa05d5b5471ecf9fc97/mcast.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5971, 13332, 468, 3502, 471, 4046, 326, 2987, 272, 273, 1696, 81, 4155, 15031, 12, 22114, 8468, 16, 22069, 6354, 13, 468, 468, 9720, 16, 19171, 1281, 501, 732, 6798, 1323, 404, 30, 501, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 5971, 13332, 468, 3502, 471, 4046, 326, 2987, 272, 273, 1696, 81, 4155, 15031, 12, 22114, 8468, 16, 22069, 6354, 13, 468, 468, 9720, 16, 19171, 1281, 501, 732, 6798, 1323, 404, 30, 501, ...
debug(" RFC 2965 cookies are switched off")
_debug(" RFC 2965 cookies are switched off")
def set_ok_version(self, cookie, request): if cookie.version is None: # Version is always set to 0 by parse_ns_headers if it's a Netscape # cookie, so this must be an invalid RFC 2965 cookie. debug(" Set-Cookie2 without version attribute (%s=%s)", cookie.name, cookie.value) return False if cookie.version > 0 and not self.rfc2965: debug(" RFC 2965 cookies are switched off") return False elif cookie.version == 0 and not self.netscape: debug(" Netscape cookies are switched off") return False return True
e3485b205e7bc77f437c4e5fc2d8b00eefb7fc77 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/e3485b205e7bc77f437c4e5fc2d8b00eefb7fc77/cookielib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 601, 67, 1589, 12, 2890, 16, 3878, 16, 590, 4672, 309, 3878, 18, 1589, 353, 599, 30, 468, 4049, 353, 3712, 444, 358, 374, 635, 1109, 67, 2387, 67, 2485, 309, 518, 1807, 279,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 601, 67, 1589, 12, 2890, 16, 3878, 16, 590, 4672, 309, 3878, 18, 1589, 353, 599, 30, 468, 4049, 353, 3712, 444, 358, 374, 635, 1109, 67, 2387, 67, 2485, 309, 518, 1807, 279,...
_block_update(other=1)
self._block_update(other=1)
def set_result(self, type): # combination of self.tally() and self.history() self.history(type[0]) self.tally(type=type) if type: if type[0] == 'C': _block_update(correct=1) elif type[0] == 'E': _block_update(error=1) else: _block_update(other=1)
1111420d4e59d089954755446e90abfedd49d671 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5701/1111420d4e59d089954755446e90abfedd49d671/pype.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 2088, 12, 2890, 16, 618, 4672, 468, 10702, 434, 365, 18, 88, 1230, 1435, 471, 365, 18, 8189, 1435, 365, 18, 8189, 12, 723, 63, 20, 5717, 365, 18, 88, 1230, 12, 723, 33, 72...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 2088, 12, 2890, 16, 618, 4672, 468, 10702, 434, 365, 18, 88, 1230, 1435, 471, 365, 18, 8189, 1435, 365, 18, 8189, 12, 723, 63, 20, 5717, 365, 18, 88, 1230, 12, 723, 33, 72...
From a q-expansion::
From a `q`-expansion::
def __call__(self, input): r""" Create an element of this space. Allowable inputs are: - elements of compatible spaces of modular forms or overconvergent modular forms - arbitrary power series in q - lists of elements of the base ring (interpreted as vectors in the basis given by self.gens()).
d7c9d61652cabcfb658c91a720989214f7a469bd /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/d7c9d61652cabcfb658c91a720989214f7a469bd/genus0.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 810, 4672, 436, 8395, 1788, 392, 930, 434, 333, 3476, 18, 7852, 429, 4540, 854, 30, 225, 300, 2186, 434, 7318, 7292, 434, 681, 2490, 10138, 578, 1879, 59...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1991, 972, 12, 2890, 16, 810, 4672, 436, 8395, 1788, 392, 930, 434, 333, 3476, 18, 7852, 429, 4540, 854, 30, 225, 300, 2186, 434, 7318, 7292, 434, 681, 2490, 10138, 578, 1879, 59...
kw = t.value[1:].lstrip() if kw.startswith("if") or kw.startswith("el") or kw.startswith("endif"): implementation.write(t.value) implementation.write("\n")
def t_preprocessor(t): r'\#([^\\\n]|(\\.)|(\\\n))*' kw = t.value[1:].lstrip() if kw.startswith("if") or kw.startswith("el") or kw.startswith("endif"): implementation.write(t.value) implementation.write("\n") t.lexer.lineno += t.value.count('\n') pass
d892df33853c6638e2334a73d8c57d84bce47fd8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7302/d892df33853c6638e2334a73d8c57d84bce47fd8/ddf.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 268, 67, 1484, 8700, 12, 88, 4672, 436, 8314, 7, 8178, 19662, 82, 12369, 24480, 12998, 96, 12, 19662, 82, 3719, 4035, 268, 18, 31731, 18, 17782, 1011, 268, 18, 1132, 18, 1883, 2668, 64...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 268, 67, 1484, 8700, 12, 88, 4672, 436, 8314, 7, 8178, 19662, 82, 12369, 24480, 12998, 96, 12, 19662, 82, 3719, 4035, 268, 18, 31731, 18, 17782, 1011, 268, 18, 1132, 18, 1883, 2668, 64...
if (i.datas_fname.lower() or '').endswith(format):
if (i.datas_fname and i.datas_fname.lower() or '').endswith(format):
def _get_preview(self, cr, uid, ids, name, arg, context=None): result = {} if context is None: context = {} context['bin_size'] = False for i in self.browse(cr, uid, ids, context=context): result[i.id] = False for format in ('png','jpg','jpeg','gif','bmp'): if (i.datas_fname.lower() or '').endswith(format): result[i.id]= i.datas break return result
f4f142aede917bf640dc9b5d9db6067db92c9540 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12853/f4f142aede917bf640dc9b5d9db6067db92c9540/ir_attachment.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 12102, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 508, 16, 1501, 16, 819, 33, 7036, 4672, 563, 273, 2618, 309, 819, 353, 599, 30, 819, 273, 2618, 819, 3292, 4757, 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, 389, 588, 67, 12102, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 508, 16, 1501, 16, 819, 33, 7036, 4672, 563, 273, 2618, 309, 819, 353, 599, 30, 819, 273, 2618, 819, 3292, 4757, 67, ...
def __init__(self, screenName=None, baseName=None, className='Tk'):
def __init__(self, screenName=None, baseName=None, className='Tix'):
def __init__(self, screenName=None, baseName=None, className='Tk'): Tkinter.Tk.__init__(self, screenName, baseName, className) tixlib = os.environ.get('TIX_LIBRARY') if tixlib is not None: self.tk.eval('global auto_path; lappend auto_path {%s}' % tixlib) self.tk.eval('global tcl_pkgPath; lappend tcl_pkgPath {%s}' % tixlib) # Load Tix - this should work dynamically or statically # If it's static, lib/tix8.1/pkgIndex.tcl should have 'load {} Tix' # If it's dynamic, it should have 'load libtix8.1.8.2.so Tix' self.tk.eval('package require Tix')
b7b32601281f25ffed50f8187c78a3802fa14039 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/b7b32601281f25ffed50f8187c78a3802fa14039/Tix.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 5518, 461, 33, 7036, 16, 16162, 33, 7036, 16, 2658, 2218, 56, 697, 11, 4672, 399, 79, 2761, 18, 56, 79, 16186, 2738, 972, 12, 2890, 16, 5518, 461, 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, 1001, 2738, 972, 12, 2890, 16, 5518, 461, 33, 7036, 16, 16162, 33, 7036, 16, 2658, 2218, 56, 697, 11, 4672, 399, 79, 2761, 18, 56, 79, 16186, 2738, 972, 12, 2890, 16, 5518, 461, 16, ...
if ns.fastest_check_duration > cutoff: self.remove(ns) if idx >= max_servers: break
if (ns.fastest_check_duration > cutoff) or idx > max_servers: self.remove(ns)
def DisableDistantServers(self, multiplier=TOO_DISTANT_MULTIPLIER, max_servers=MAX_NEARBY_SERVERS): """Disable servers who's fastest duration is multiplier * average of best 10.""" self.RemoveBrokenServers(delete_unwanted=True) secondaries = self.secondaries best_10 = util.CalculateListAverage([x.fastest_check_duration for x in secondaries[:10]]) cutoff = best_10 * multiplier self.msg("Removing secondary nameservers slower than %0.2fms (max=%s)" % (cutoff, max_servers)) for idx, ns in enumerate(secondaries): if ns.fastest_check_duration > cutoff: self.remove(ns) if idx >= max_servers: break
352465fa0a4c8fb048c2f2c241b9c1ede2fa5db0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4170/352465fa0a4c8fb048c2f2c241b9c1ede2fa5db0/nameserver_list.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10639, 5133, 970, 11913, 12, 2890, 16, 15027, 33, 4296, 51, 67, 2565, 15379, 67, 24683, 2053, 654, 16, 943, 67, 14247, 33, 6694, 67, 5407, 985, 6486, 67, 4370, 55, 4672, 3536, 11879, 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, 10639, 5133, 970, 11913, 12, 2890, 16, 15027, 33, 4296, 51, 67, 2565, 15379, 67, 24683, 2053, 654, 16, 943, 67, 14247, 33, 6694, 67, 5407, 985, 6486, 67, 4370, 55, 4672, 3536, 11879, 7...
source = open(source_name, 'w')
with open(source_name, 'w') as source:
def test_checkcache(self): getline = linecache.getline try: # Create a source file and cache its contents source_name = support.TESTFN + '.py' with open(source_name, 'w') as source: source.write(SOURCE_1) source.close() getline(source_name, 1)
044e4c9c6da3b4e39f47e76304c6d9c5e30271e1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8125/044e4c9c6da3b4e39f47e76304c6d9c5e30271e1/test_linecache.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 1893, 2493, 12, 2890, 4672, 336, 1369, 273, 4739, 557, 807, 18, 588, 1369, 775, 30, 468, 1788, 279, 1084, 585, 471, 1247, 2097, 2939, 1084, 67, 529, 273, 2865, 18, 16961, 197...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 1893, 2493, 12, 2890, 4672, 336, 1369, 273, 4739, 557, 807, 18, 588, 1369, 775, 30, 468, 1788, 279, 1084, 585, 471, 1247, 2097, 2939, 1084, 67, 529, 273, 2865, 18, 16961, 197...
sc_re = re.compile("%s:(.*)\n" % \
sc_re = re.compile("%s:\s*([\d.]+)" % \
def onClassify(self, file, text, which): """Classify an uploaded or pasted message.""" message = file or text message = message.replace('\r\n', '\n').replace('\r', '\n') # For Macs results = self._buildCluesTable(message) results.classifyAnother = self._buildClassifyBox() self._writePreamble("Classify") self.write(results) self._writePostamble()
fb446449eb8f69fbc4b2450c0fe1d1c7c66e9e9f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9857/fb446449eb8f69fbc4b2450c0fe1d1c7c66e9e9f/UserInterface.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 797, 1164, 12, 2890, 16, 585, 16, 977, 16, 1492, 4672, 3536, 797, 1164, 392, 9140, 578, 8854, 329, 883, 12123, 883, 273, 585, 578, 977, 883, 273, 883, 18, 2079, 2668, 64, 86, 64...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 797, 1164, 12, 2890, 16, 585, 16, 977, 16, 1492, 4672, 3536, 797, 1164, 392, 9140, 578, 8854, 329, 883, 12123, 883, 273, 585, 578, 977, 883, 273, 883, 18, 2079, 2668, 64, 86, 64...
file.write(' file.write('
file.write(' file.write('
file.write('#ifndef APP_GFX_GL_GL_BINDINGS_AUTOGEN_%s_H_\n' % setName.upper())
218a5a204661ad6185f01d6233b35b2d5f86027b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9392/218a5a204661ad6185f01d6233b35b2d5f86027b/generate_bindings.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 585, 18, 2626, 2668, 7, 430, 82, 536, 9146, 67, 43, 25172, 67, 11261, 67, 11261, 67, 2739, 55, 67, 18909, 16652, 10185, 87, 67, 44, 22202, 82, 11, 738, 6788, 18, 5797, 10756, 2, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 585, 18, 2626, 2668, 7, 430, 82, 536, 9146, 67, 43, 25172, 67, 11261, 67, 11261, 67, 2739, 55, 67, 18909, 16652, 10185, 87, 67, 44, 22202, 82, 11, 738, 6788, 18, 5797, 10756, 2, -100, -100...
print "done (%f s)"%(time.time()-self.dump_start_time)
print "done (%.01f s)"%(time.time()-self.dump_start_time)
def observe_running_experiment(self): """ periodically look at running threads """ # look at components and update them # test whether backend and scripts are done e=self.si.data.get("__recentexperiment",-1)+1 r=self.si.data.get("__recentresult",-1)+1 e_text=None r_text=None b_text=None if self.si.exp_handling is not None: if not self.si.exp_handling.isAlive(): self.si.exp_handling.join() if self.si.exp_handling.raised_exception: print "experiment script failed at line %d (function %s): %s"%(self.si.exp_handling.location[0], self.si.exp_handling.location[1], self.si.exp_handling.raised_exception) print "Full traceback", self.si.exp_handling.traceback e_text="Experiment Script Failed (%d)"%e else: e_text="Experiment Script Finished (%d)"%e print "experiment script finished" self.si.exp_handling = None else: e_text="Experiment Script Running (%d)"%e
f8bcdd88130834e09b0b3e2ab0c4de7a63fa426b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2646/f8bcdd88130834e09b0b3e2ab0c4de7a63fa426b/DamarisGUI.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 19389, 67, 8704, 67, 18142, 12, 2890, 4672, 3536, 26736, 2324, 622, 3549, 7403, 3536, 468, 2324, 622, 4085, 471, 1089, 2182, 468, 1842, 2856, 4221, 471, 8873, 854, 2731, 425, 33, 2890, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 19389, 67, 8704, 67, 18142, 12, 2890, 4672, 3536, 26736, 2324, 622, 3549, 7403, 3536, 468, 2324, 622, 4085, 471, 1089, 2182, 468, 1842, 2856, 4221, 471, 8873, 854, 2731, 425, 33, 2890, 1...
test_files = list(self._test_files) if self._options.randomize_order: random.shuffle(test_files) else: test_files.sort(self.TestFilesSort)
test_files = self._test_files_list
def Run(self): """Run all our tests on all our test files.
be1ebe6f583ad04e309ad1a1f351a66edc3625d1 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9392/be1ebe6f583ad04e309ad1a1f351a66edc3625d1/run_webkit_tests.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1939, 12, 2890, 4672, 3536, 1997, 777, 3134, 7434, 603, 777, 3134, 1842, 1390, 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, ...
[ 1, 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, 1939, 12, 2890, 4672, 3536, 1997, 777, 3134, 7434, 603, 777, 3134, 1842, 1390, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
self.opacity = self.parser.getint("looks", "opacity")
try: self.opacity = self.parser.getint("looks", "opacity") except: self.opacity = 50
def load_config(self, config): if config == None: config = '/etc/openbox-logout.conf' if not os.path.exists(config): self.logger.error('Unable to find config file %s' % config) exit() self.parser = ConfigParser.SafeConfigParser() self.parser.read(config) # Read config file values self.opacity = self.parser.getint("looks", "opacity") # Validate theme configuration self.img_path = "%s/themes" % self.determine_path() try: self.button_theme = self.parser.get("looks", "buttontheme") except: self.button_theme = "default" if os.path.exists("%s/.themes/%s/oblogout" % (os.environ['HOME'], self.button_theme)): # Found a valid theme folder in the userdir, use that self.img_path = "%s/.themes/%s/oblogout" % (os.environ['HOME'], self.button_theme) self.logger.info("Using user theme at %s" % self.img_path) else: if not os.path.exists('%s/%s/' % (self.img_path, self.button_theme)): self.logger.warning("Button theme %s not found, reverting to default" % self.button_theme) self.button_theme = 'default' # Set background color try: self.bgcolor = gtk.gdk.Color(self.parser.get("looks", "bgcolor")) except ValueError: self.logger.warning("Color %s is not a valid color, defaulting to black" % self.parser.get("looks", "bgcolor")) self.bgcolor = gtk.gdk.Color("black")
14376b0d4cf756cbbe6be4574e7c1917dcf73287 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11198/14376b0d4cf756cbbe6be4574e7c1917dcf73287/openboxlogout.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1262, 67, 1425, 12, 2890, 16, 642, 4672, 225, 309, 642, 422, 599, 30, 642, 273, 1173, 14175, 19, 3190, 2147, 17, 21229, 18, 3923, 11, 225, 309, 486, 1140, 18, 803, 18, 1808, 12, 1425...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1425, 12, 2890, 16, 642, 4672, 225, 309, 642, 422, 599, 30, 642, 273, 1173, 14175, 19, 3190, 2147, 17, 21229, 18, 3923, 11, 225, 309, 486, 1140, 18, 803, 18, 1808, 12, 1425...
py_pjsua.call_answer(call_id, 486, "", None)
py_pjsua.call_answer(call_id, 486, None, None)
def on_incoming_call(acc_id, call_id, rdata): global g_current_call if g_current_call != py_pjsua.PJSUA_INVALID_ID: py_pjsua.call_answer(call_id, 486, "", None) return g_current_call = call_id ci = py_pjsua.call_get_info(call_id) write_log(3, "Incoming call: " + call_name(call_id)) py_pjsua.call_answer(call_id, 200, "", None)
94d801bcce557204b3f735d38b1c443bc3e78836 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1375/94d801bcce557204b3f735d38b1c443bc3e78836/pjsua_app.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 31033, 67, 1991, 12, 8981, 67, 350, 16, 745, 67, 350, 16, 24291, 4672, 2552, 314, 67, 2972, 67, 1991, 309, 314, 67, 2972, 67, 1991, 480, 2395, 67, 84, 2924, 11886, 18, 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, 603, 67, 31033, 67, 1991, 12, 8981, 67, 350, 16, 745, 67, 350, 16, 24291, 4672, 2552, 314, 67, 2972, 67, 1991, 309, 314, 67, 2972, 67, 1991, 480, 2395, 67, 84, 2924, 11886, 18, 52, ...
ext = ('pyc' if __debug__ else 'pyo') expected = [base.format(ext) for base in ('__init__.{}', 'bar.{}')] expected.extend(['__init__.py', 'bar.py']) expected.sort()
expected = sorted(['__init__.py', '__init__.pyc', 'bar.py', 'bar.pyc'])
def test_legacy_paths(self): # Ensure that with the proper switch, compileall leaves legacy # pyc/pyo files, and no __pycache__ directory. retcode = subprocess.call( (sys.executable, '-m', 'compileall', '-b', '-q', self.pkgdir)) self.assertEqual(retcode, 0) # Verify the __pycache__ directory contents. cachedir = os.path.join(self.pkgdir, '__pycache__') self.assertFalse(os.path.exists(cachedir)) ext = ('pyc' if __debug__ else 'pyo') expected = [base.format(ext) for base in ('__init__.{}', 'bar.{}')] expected.extend(['__init__.py', 'bar.py']) expected.sort() self.assertEqual(sorted(os.listdir(self.pkgdir)), expected)
76084c35c0f92a4dba963da65cfc616d3d01c0b1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12029/76084c35c0f92a4dba963da65cfc616d3d01c0b1/test_compileall.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 17386, 67, 4481, 12, 2890, 4672, 468, 7693, 716, 598, 326, 5338, 1620, 16, 4074, 454, 15559, 8866, 468, 2395, 71, 19, 2074, 83, 1390, 16, 471, 1158, 1001, 2074, 2493, 972, 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, 1842, 67, 17386, 67, 4481, 12, 2890, 4672, 468, 7693, 716, 598, 326, 5338, 1620, 16, 4074, 454, 15559, 8866, 468, 2395, 71, 19, 2074, 83, 1390, 16, 471, 1158, 1001, 2074, 2493, 972, 18...
class Huffman():
class Huffman(SageObject):
def frequency_table(string): r""" Return the frequency table corresponding to the given string. INPUT: - ``string`` -- a string EXAMPLE:: sage: from sage.coding.source_coding.huffman import frequency_table sage: str = "Sage is my most favorite general purpose computer algebra system" sage: frequency_table(str) {'a': 5, ' ': 9, 'c': 1, 'b': 1, 'e': 8, 'g': 3, 'f': 1, 'i': 2, 'm': 4, 's': 5, 'o': 4, 'n': 1, 'p': 3, 'S': 1, 'r': 5, 'u': 2, 't': 4, 'v': 1, 'y': 2, 'l': 2} """ d = {} for l in string: d[l] = d.get(l,0) + 1 return d
d36ada9fa8d1207afa7f17ab966193d7d807e471 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/d36ada9fa8d1207afa7f17ab966193d7d807e471/huffman.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8670, 67, 2121, 12, 1080, 4672, 436, 8395, 2000, 326, 8670, 1014, 4656, 358, 326, 864, 533, 18, 225, 12943, 30, 225, 300, 12176, 1080, 10335, 1493, 279, 533, 225, 5675, 21373, 2866, 225,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8670, 67, 2121, 12, 1080, 4672, 436, 8395, 2000, 326, 8670, 1014, 4656, 358, 326, 864, 533, 18, 225, 12943, 30, 225, 300, 12176, 1080, 10335, 1493, 279, 533, 225, 5675, 21373, 2866, 225,...
if not fiscalyear_ids: fiscalyear_ids = [0]
fiscalyear_id = fiscalyear_ids and fiscalyear_ids[0] or 0
def query_get(self, cursor, user, obj='l', context=None): ''' Return SQL clause and fiscal years for account move line depending of the context.
d2bdf21175ec074a6f1eca1fb1afd7d859fc2674 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9290/d2bdf21175ec074a6f1eca1fb1afd7d859fc2674/move.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 843, 67, 588, 12, 2890, 16, 3347, 16, 729, 16, 1081, 2218, 80, 2187, 819, 33, 7036, 4672, 9163, 2000, 3063, 6591, 471, 15324, 771, 11387, 364, 2236, 3635, 980, 8353, 434, 326, 819, 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, 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, 843, 67, 588, 12, 2890, 16, 3347, 16, 729, 16, 1081, 2218, 80, 2187, 819, 33, 7036, 4672, 9163, 2000, 3063, 6591, 471, 15324, 771, 11387, 364, 2236, 3635, 980, 8353, 434, 326, 819, 18,...
SOBLOBCol.__init__(self, **kw)
super(SOPickleCol, self).__init__(**kw)
def __init__(self, **kw): self.pickleProtocol = popKey(kw, 'pickleProtocol', 1) SOBLOBCol.__init__(self, **kw)
a481bb3f6ed300085a3e3effca6953568446c784 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6718/a481bb3f6ed300085a3e3effca6953568446c784/col.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2826, 9987, 4672, 365, 18, 20847, 5752, 273, 1843, 653, 12, 9987, 16, 296, 20847, 5752, 2187, 404, 13, 348, 5704, 6038, 914, 16186, 2738, 972, 12, 2890, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2826, 9987, 4672, 365, 18, 20847, 5752, 273, 1843, 653, 12, 9987, 16, 296, 20847, 5752, 2187, 404, 13, 348, 5704, 6038, 914, 16186, 2738, 972, 12, 2890, ...
def test(self, tag):
def test(self):
def test(self, tag): start = time.time() self.raw_write() self.raw_write_rate = self.megabytes / (time.time() - start)
78d0de9a4ea0aea82dcea1ab0f66f6cad50990a1 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12268/78d0de9a4ea0aea82dcea1ab0f66f6cad50990a1/parallel_dd.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 12, 2890, 4672, 787, 273, 813, 18, 957, 1435, 365, 18, 1899, 67, 2626, 1435, 365, 18, 1899, 67, 2626, 67, 5141, 273, 365, 18, 81, 1332, 24383, 1078, 342, 261, 957, 18, 957, 143...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1842, 12, 2890, 4672, 787, 273, 813, 18, 957, 1435, 365, 18, 1899, 67, 2626, 1435, 365, 18, 1899, 67, 2626, 67, 5141, 273, 365, 18, 81, 1332, 24383, 1078, 342, 261, 957, 18, 957, 143...
time.sleep(5)
def pushDir(self, localDir, remoteDir): if (self.debug >= 2): print "pushing directory: " + localDir + " to " + remoteDir for root, dirs, files in os.walk(localDir): parts = root.split(localDir) for file in files: remoteRoot = remoteDir + '/' + parts[1] remoteName = remoteRoot + '/' + file if (parts[1] == ""): remoteRoot = remoteDir if (self.pushFile(os.path.join(root, file), remoteName) == None): time.sleep(5) self.removeFile(remoteName) time.sleep(5) if (self.pushFile(os.path.join(root, file), remoteName) == None): return None return True
02223128cd056cb013609966605554a83eff291d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11102/02223128cd056cb013609966605554a83eff291d/devicemanager.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1817, 1621, 12, 2890, 16, 1191, 1621, 16, 2632, 1621, 4672, 309, 261, 2890, 18, 4148, 1545, 576, 4672, 1172, 315, 6206, 310, 1867, 30, 315, 397, 1191, 1621, 397, 315, 358, 315, 397, 26...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1817, 1621, 12, 2890, 16, 1191, 1621, 16, 2632, 1621, 4672, 309, 261, 2890, 18, 4148, 1545, 576, 4672, 1172, 315, 6206, 310, 1867, 30, 315, 397, 1191, 1621, 397, 315, 358, 315, 397, 26...
try: args = args.split( ' ' ) if len( args ) >= 5: return False if len( args ) == 1: action = args[0] action = action.lower() if action == 'reload': char.log( LOG_MESSAGE, "Reloaded accounts.\n" % char.serial ) wolfpack.accounts.reload() return True elif action == 'save': char.log( LOG_MESSAGE, "Saved accounts.\n" % char.serial ) wolfpack.accounts.save() return True else: return False elif len( args ) == 2: ( action, username ) = args action = action.lower() username = username.lower() if action == 'remove': accountRemove( socket, username ) return True else: return False elif len( args ) == 3: ( action, username, key ) = args action = action.lower() username = username.lower() if len( action ) == 0 or len( username ) == 0 or len( key ) == 0: return False if action == 'create': accountCreate( socket, username, key ) return True elif action == 'show': accountShow( socket, username, key ) return True else: return False elif len( args ) == 4: ( action, username, key, value ) = args action = action.lower() username = username.lower() key = key.lower() if len( action ) == 0 or len( username ) == 0 or len( key ) == 0 or len( value ) == 0: return False if action.lower() == 'set': accountSet( socket, username, key, value ) return True else: return False else: return False except: socket.sysmessage( usage0 ) socket.sysmessage( usage1 ) socket.sysmessage( usage2 ) socket.sysmessage( usage3 ) socket.sysmessage( usage4 ) return False
args = args.split( ' ' ) if len( args ) >= 5: useageerror( socket ) return False if len( args ) == 1: action = args[0] action = action.lower() if action == 'reload': char.log( LOG_MESSAGE, "Reloaded accounts.\n" % char.serial ) wolfpack.accounts.reload() return True elif action == 'save': char.log( LOG_MESSAGE, "Saved accounts.\n" % char.serial ) wolfpack.accounts.save() return True else: useageerror( socket ) return False elif len( args ) == 2: ( action, username ) = args action = action.lower() username = username.lower() if action == 'remove': accountRemove( socket, username ) return True else: useageerror( socket ) return False elif len( args ) == 3: ( action, username, key ) = args action = action.lower() username = username.lower() if len( action ) == 0 or len( username ) == 0 or len( key ) == 0: useageerror( socket ) return False if action == 'create': accountCreate( socket, username, key ) return True elif action == 'show': accountShow( socket, username, key ) return True else: useageerror( socket ) return False elif len( args ) == 4: ( action, username, key, value ) = args action = action.lower() username = username.lower() key = key.lower() if len( action ) == 0 or len( username ) == 0 or len( key ) == 0 or len( value ) == 0: useageerror( socket ) return False if action.lower() == 'set': accountSet( socket, username, key, value ) return True else: useageerror( socket ) return False else: useageerror( socket ) return False def usageerror( socket ): socket.sysmessage( usage0 ) socket.sysmessage( usage1 ) socket.sysmessage( usage2 ) socket.sysmessage( usage3 ) socket.sysmessage( usage4 ) return
def commandAccount( socket, cmd, args ): char = socket.player args = args.strip() if len(args) == 0: socket.sysmessage( usage0 ) socket.sysmessage( usage1 ) socket.sysmessage( usage2 ) socket.sysmessage( usage3 ) socket.sysmessage( usage4 ) return False elif len( args ) > 0: # Command with arguments try: args = args.split( ' ' ) # Error Check if len( args ) >= 5: return False # One Argument if len( args ) == 1: action = args[0] action = action.lower() # Reload Accounts if action == 'reload': char.log( LOG_MESSAGE, "Reloaded accounts.\n" % char.serial ) wolfpack.accounts.reload() return True # Save Accounts elif action == 'save': char.log( LOG_MESSAGE, "Saved accounts.\n" % char.serial ) wolfpack.accounts.save() return True else: return False # Two Arguments elif len( args ) == 2: ( action, username ) = args action = action.lower() username = username.lower() # Remove Accounts if action == 'remove': accountRemove( socket, username ) return True else: return False # Three Arguments elif len( args ) == 3: ( action, username, key ) = args action = action.lower() username = username.lower() if len( action ) == 0 or len( username ) == 0 or len( key ) == 0: return False # Create Accounts if action == 'create': accountCreate( socket, username, key ) return True # Show Accounts elif action == 'show': accountShow( socket, username, key ) return True else: return False # Four Arguments elif len( args ) == 4: ( action, username, key, value ) = args action = action.lower() username = username.lower() key = key.lower() if len( action ) == 0 or len( username ) == 0 or len( key ) == 0 or len( value ) == 0: return False # Set Accounts if action.lower() == 'set': accountSet( socket, username, key, value ) return True else: return False # Error else: return False except: socket.sysmessage( usage0 ) socket.sysmessage( usage1 ) socket.sysmessage( usage2 ) socket.sysmessage( usage3 ) socket.sysmessage( usage4 ) return False
ce12bb8246b5f95ae00872ac6a4fe4d7f5d8a568 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/ce12bb8246b5f95ae00872ac6a4fe4d7f5d8a568/account.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1296, 3032, 12, 2987, 16, 1797, 16, 833, 262, 30, 1149, 273, 2987, 18, 14872, 833, 273, 833, 18, 6406, 1435, 309, 562, 12, 1968, 13, 422, 374, 30, 2987, 18, 9499, 2150, 12, 4084, 20,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1296, 3032, 12, 2987, 16, 1797, 16, 833, 262, 30, 1149, 273, 2987, 18, 14872, 833, 273, 833, 18, 6406, 1435, 309, 562, 12, 1968, 13, 422, 374, 30, 2987, 18, 9499, 2150, 12, 4084, 20,...
Real Field with 200 bits of precision
Complex Field with 200 bits of precision
#def _singular_(self, singular):
31372fdd844298d220161205b3a0ae85555e880b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/31372fdd844298d220161205b3a0ae85555e880b/constants.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 468, 536, 389, 17835, 67, 12, 2890, 16, 10048, 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, 468, 536, 389, 17835, 67, 12, 2890, 16, 10048, 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, ...
sort_order = models.PositiveIntegrerField(default=0)
sort_order = models.PositiveIntegerField(default=0)
def get_next_post(self): return self.get_next_by_publish(status__gte=2)
770947e7f4670d2ad591099146fa6bed93b9bf2b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11830/770947e7f4670d2ad591099146fa6bed93b9bf2b/models.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 4285, 67, 2767, 12, 2890, 4672, 327, 365, 18, 588, 67, 4285, 67, 1637, 67, 6543, 12, 2327, 972, 27225, 33, 22, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 4285, 67, 2767, 12, 2890, 4672, 327, 365, 18, 588, 67, 4285, 67, 1637, 67, 6543, 12, 2327, 972, 27225, 33, 22, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
vsts_path = None, lcov_converter_path = None):
src_path = None, tools_path = None): """Init method for the Coverage class. Args: revision: Revision number of the Chromium source tree. src_path: Location of the Chromium source base. tools_path: Location of the Visual Studio Team Tools. (Win32 only) """
def __init__(self, revision, vsts_path = None, lcov_converter_path = None): google.logging_utils.config_root() self.revision = revision self.instrumented = False self.vsts_path = vsts_path self.lcov_converter_path = lcov_converter_path self._dir = None
bc410f64b906bf3a5ca7721d73b3632fcccaeae2 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9392/bc410f64b906bf3a5ca7721d73b3632fcccaeae2/coverage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 6350, 16, 1705, 67, 803, 273, 599, 16, 8513, 67, 803, 273, 599, 4672, 3536, 2570, 707, 364, 326, 30856, 667, 18, 225, 6634, 30, 6350, 30, 13132, 1300, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 6350, 16, 1705, 67, 803, 273, 599, 16, 8513, 67, 803, 273, 599, 4672, 3536, 2570, 707, 364, 326, 30856, 667, 18, 225, 6634, 30, 6350, 30, 13132, 1300, ...
" xpc_GetGlobalForObject(wrapper) ==\n" " xpc_GetGlobalForObject(obj)) {\n"
" cx->compartment == wrapper->compartment()) {\n"
def writeTraceableResultConv(f, type): typeName = getBuiltinOrNativeTypeName(type) assert typeName is not '[jsval]' if typeName is not None: template = traceableResultConvTemplates.get(typeName) if template is not None: values = { 'errorStr': getFailureString( getTraceInfoDefaultReturn(type), 2) } f.write(substitute(template, values)) return # else fall through; this type isn't supported yet elif isInterfaceType(type): if isVariantType(type): f.write(" JSBool ok = xpc_qsVariantToJsval(lccx, result, " "&vp.array[0]);\n") else: f.write(" nsWrapperCache* cache = xpc_qsGetWrapperCache(result);\n" " if (cache) {\n" " JSObject* wrapper = cache->GetWrapper();\n" " if (wrapper &&\n" # FIXME: Bug 585786, this check should go away " IS_SLIM_WRAPPER_OBJECT(wrapper) &&\n" # FIXME: Bug 585787 this should compare compartments " xpc_GetGlobalForObject(wrapper) ==\n" " xpc_GetGlobalForObject(obj)) {\n" " vp.array[0] = OBJECT_TO_JSVAL(wrapper);\n" " return wrapper;\n" " }\n" " }\n" " // After this point do not use 'result'!\n" " qsObjectHelper helper(result, cache);\n" " JSBool ok = xpc_qsXPCOMObjectToJsval(lccx, " "helper, &NS_GET_IID(%s), &interfaces[k_%s], " "&vp.array[0]);\n" % (type.name, type.name)) f.write(" if (!ok) {\n"); writeFailure(f, getTraceInfoDefaultReturn(type), 2) f.write(" return JSVAL_TO_OBJECT(vp.array[0]);\n") return warn("Unable to convert result of type %s" % typeName) f.write(" !; // TODO - Convert `result` to jsval, store in rval.\n") f.write(" return xpc_qsThrow(cx, NS_ERROR_UNEXPECTED); // FIXME\n")
1a336b5c03a215ab7c04b7e84b3e32c081034690 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11102/1a336b5c03a215ab7c04b7e84b3e32c081034690/qsgen.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 3448, 429, 1253, 17467, 12, 74, 16, 618, 4672, 8173, 273, 2882, 4853, 267, 1162, 9220, 7947, 12, 723, 13, 1815, 8173, 353, 486, 5271, 2924, 1125, 3864, 309, 8173, 353, 486, 599, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 3448, 429, 1253, 17467, 12, 74, 16, 618, 4672, 8173, 273, 2882, 4853, 267, 1162, 9220, 7947, 12, 723, 13, 1815, 8173, 353, 486, 5271, 2924, 1125, 3864, 309, 8173, 353, 486, 599, ...
if '?' in self.script: assert query_string is None, ( "You cannot have '?' in your script name (%r) and also " "give a query_string (%r)" % (self.script, query_string)) self.script, query_string = self.script.split('?', 1)
def __init__(self, script, path=None, include_os_environ=True, query_string=None): self.script_filename = script if isinstance(path, (str, unicode)): path = [path] if path is None: path = os.environ.get('PATH', '').split(':') self.path = path if os.path.abspath(script) != script: # relative path for path_dir in self.path: if os.path.exists(os.path.join(path_dir, script)): self.script = os.path.join(path_dir, script) break else: raise CGIError( "Script %r not found in path %r" % (script, self.path)) else: self.script = script self.include_os_environ = include_os_environ if '?' in self.script: assert query_string is None, ( "You cannot have '?' in your script name (%r) and also " "give a query_string (%r)" % (self.script, query_string)) self.script, query_string = self.script.split('?', 1) self.query_string = query_string
22ea9a8bc503d9e0301483cb73605e014ea6e50a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2097/22ea9a8bc503d9e0301483cb73605e014ea6e50a/cgiapp.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2728, 16, 589, 33, 7036, 16, 2341, 67, 538, 67, 28684, 33, 5510, 16, 843, 67, 1080, 33, 7036, 4672, 365, 18, 4263, 67, 3459, 273, 2728, 309, 1549, 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, 1001, 2738, 972, 12, 2890, 16, 2728, 16, 589, 33, 7036, 16, 2341, 67, 538, 67, 28684, 33, 5510, 16, 843, 67, 1080, 33, 7036, 4672, 365, 18, 4263, 67, 3459, 273, 2728, 309, 1549, 12, ...
self.browser = None
def __init__(self, hits): global _resultscounter hits = map(lambda (path, hits): (sucktitle(path), path, hits), hits) hits.sort() self.hits = hits nicehits = map( lambda (title, path, hits): title + '\r' + string.join( map(lambda (c, p): "%s (%d)" % (p, c), hits), ', '), hits) nicehits.sort() self.w = W.Window((440, 300), "Search results %d" % _resultscounter, minsize = (200, 100)) self.w.results = TwoLineList((-1, -1, 1, -14), nicehits, self.listhit) self.w.open() self.w.bind('return', self.listhit) self.w.bind('enter', self.listhit) _resultscounter = _resultscounter + 1 self.browser = None
c4637cd08a9bbc96efb42cb813b77be74b9dae66 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/c4637cd08a9bbc96efb42cb813b77be74b9dae66/PyDocSearch.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 11076, 4672, 2552, 389, 2088, 1017, 2096, 11076, 273, 852, 12, 14661, 261, 803, 16, 11076, 4672, 261, 87, 9031, 2649, 12, 803, 3631, 589, 16, 11076, 3631, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 11076, 4672, 2552, 389, 2088, 1017, 2096, 11076, 273, 852, 12, 14661, 261, 803, 16, 11076, 4672, 261, 87, 9031, 2649, 12, 803, 3631, 589, 16, 11076, 3631, ...
return u_symb.encode('utf8')
return u_symb.encode('utf8')[:self.size]
def _symbol_set_char(self, symb): #TODO: # * we need to remove the "symb==False" from the next line BUT # for now too many things rely on this broken behavior # * the symb==None test should be common to all data types if symb==None or symb==False: return None
6ce917b1bd4c1b7a0fb77041f2eac00a30b5b08f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7397/6ce917b1bd4c1b7a0fb77041f2eac00a30b5b08f/fields.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 7175, 67, 542, 67, 3001, 12, 2890, 16, 1393, 1627, 4672, 468, 6241, 30, 468, 380, 732, 1608, 358, 1206, 326, 315, 9009, 1627, 631, 8381, 6, 628, 326, 1024, 980, 605, 1693, 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, 389, 7175, 67, 542, 67, 3001, 12, 2890, 16, 1393, 1627, 4672, 468, 6241, 30, 468, 380, 732, 1608, 358, 1206, 326, 315, 9009, 1627, 631, 8381, 6, 628, 326, 1024, 980, 605, 1693, 468, ...
DefaultErrorHandler(), HTTPBasicAuthHandler(passwordManager))
DefaultErrorHandler(), ContextualBasicAuthHandler(passwordManager))
def post(self, url, payload, contentType, username=None, password=None, **kwargs):
d59717e93607c3776066da1bf1d1e4a1f08ed316 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11664/d59717e93607c3776066da1bf1d1e4a1f08ed316/net.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1603, 12, 2890, 16, 880, 16, 2385, 16, 5064, 16, 2718, 33, 7036, 16, 2201, 33, 7036, 16, 2826, 4333, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1603, 12, 2890, 16, 880, 16, 2385, 16, 5064, 16, 2718, 33, 7036, 16, 2201, 33, 7036, 16, 2826, 4333, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
assert not bar.has_key(child.itsName)
if __debug__: if not child in bar: if bar.has_key(child.itsName): logging.warning("%s already has a %s named %s" % (bar.itsName, child.itsKind, child.itsName))
def rebuildChildren(block, containers): """ scan one level of the static hierarchy looking for dynamic children. """ parent = block.parentBlock if (parent): rebuildChildren (parent, containers) for child in block.childrenBlocks: # pick up children if isinstance (child, DynamicChild): """ Use location to look up the container that contains the entry or container If you get an exception here, it's probably because the name of the location isn't the name of an existing bar (bar needs to be listed before items). """ locationName = child.location if not locationName: locationName = 'MenuBar' bar = containers [locationName] if child.operation == 'InsertBefore': # Shouldn't have items with the same name assert not bar.has_key(child.itsName) i = bar.index(child.itemLocation) bar.insert(i, child) elif child.operation == 'Replace': bar[child.itemLocation] = child elif child.operation == 'Delete': """ If you get an exception here, it's probably because you're trying to remove a bar item that doesn't exist. """ del bar[child.itemLocation] else: assert (False)
6ed3cdcbb2d2f6796287ccd28992bdf8d2a26a7d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/6ed3cdcbb2d2f6796287ccd28992bdf8d2a26a7d/DynamicContainerBlocks.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13419, 4212, 12, 2629, 16, 8475, 4672, 3536, 4135, 1245, 1801, 434, 326, 760, 9360, 7849, 364, 5976, 2325, 18, 3536, 982, 273, 1203, 18, 2938, 1768, 309, 261, 2938, 4672, 13419, 4212, 26...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13419, 4212, 12, 2629, 16, 8475, 4672, 3536, 4135, 1245, 1801, 434, 326, 760, 9360, 7849, 364, 5976, 2325, 18, 3536, 982, 273, 1203, 18, 2938, 1768, 309, 261, 2938, 4672, 13419, 4212, 26...
Enumerates projective points on scheme X defined over a finite field
Enumerates projective points on scheme ``X`` defined over a finite field.
def enum_projective_finite_field(X): """ Enumerates projective points on scheme X defined over a finite field INPUT: - ``X`` - a scheme defined over a finite field or set of abstract rational points of such a scheme OUTPUT: - a list containing the projective points of X over the finite field, sorted EXAMPLES:: sage: F = GF(53) sage: P.<X,Y,Z> = ProjectiveSpace(2,F) sage: from sage.schemes.generic.rational_point import enum_projective_finite_field sage: len(enum_projective_finite_field(P(F))) 2863 sage: 53^2+53+1 2863 :: sage: F = GF(9,'a') sage: P.<X,Y,Z> = ProjectiveSpace(2,F) sage: C = Curve(X^3-Y^3+Z^2*Y) sage: enum_projective_finite_field(C(F)) [(0 : 0 : 1), (0 : 1 : 1), (0 : 2 : 1), (1 : 1 : 0), (a + 1 : 2*a : 1), (a + 1 : 2*a + 1 : 1), (a + 1 : 2*a + 2 : 1), (2*a + 2 : a : 1), (2*a + 2 : a + 1 : 1), (2*a + 2 : a + 2 : 1)] :: sage: F = GF(5) sage: P2F.<X,Y,Z> = ProjectiveSpace(2,F) sage: enum_projective_finite_field(P2F) [(0 : 0 : 1), (0 : 1 : 0), (0 : 1 : 1), (0 : 2 : 1), (0 : 3 : 1), (0 : 4 : 1), (1 : 0 : 0), (1 : 0 : 1), (1 : 1 : 0), (1 : 1 : 1), (1 : 2 : 1), (1 : 3 : 1), (1 : 4 : 1), (2 : 0 : 1), (2 : 1 : 0), (2 : 1 : 1), (2 : 2 : 1), (2 : 3 : 1), (2 : 4 : 1), (3 : 0 : 1), (3 : 1 : 0), (3 : 1 : 1), (3 : 2 : 1), (3 : 3 : 1), (3 : 4 : 1), (4 : 0 : 1), (4 : 1 : 0), (4 : 1 : 1), (4 : 2 : 1), (4 : 3 : 1), (4 : 4 : 1)] ALGORITHM: Checks all points in projective space to see if they lie on X. NOTE: Warning:if X given as input is defined over an infinite field then this code will not finish! AUTHORS: John Cremona and Charlie Turner (06-2010) """ if is_Scheme(X): X = X(X.base_ring()) n = X.codomain().ambient_space().ngens()-1 F = X.value_ring() pts = [] for k in range(n+1): for c in cartesian_product_iterator([F for _ in range(k)]): try: pts.append(X(list(c)+[1]+[0]*(n-k))) except: pass pts.sort() return pts
0c1f24a85f1dccaf5341fcaca9e87554c8bacafa /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/0c1f24a85f1dccaf5341fcaca9e87554c8bacafa/rational_point.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2792, 67, 4406, 688, 67, 9551, 67, 1518, 12, 60, 4672, 3536, 6057, 264, 815, 1984, 688, 3143, 603, 4355, 12176, 60, 10335, 2553, 1879, 279, 25922, 652, 18, 225, 12943, 30, 225, 300, 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, 2792, 67, 4406, 688, 67, 9551, 67, 1518, 12, 60, 4672, 3536, 6057, 264, 815, 1984, 688, 3143, 603, 4355, 12176, 60, 10335, 2553, 1879, 279, 25922, 652, 18, 225, 12943, 30, 225, 300, 12...
"""try to push the parser to/over it's limits.
"""try to push the parser to/over its limits.
def test_compile_badunicode(self): st = parser.suite('a = "\\U12345678"') self.assertRaises(SyntaxError, parser.compilest, st) st = parser.suite('a = "\\u1"') self.assertRaises(SyntaxError, parser.compilest, st)
1972c5db7cef69e1e51483738a9cb2a3d4bbf873 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12029/1972c5db7cef69e1e51483738a9cb2a3d4bbf873/test_parser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 11100, 67, 8759, 9124, 12, 2890, 4672, 384, 273, 2082, 18, 30676, 2668, 69, 273, 8422, 57, 28462, 4313, 8285, 5187, 13, 365, 18, 11231, 12649, 6141, 12, 22510, 16, 2082, 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, 1842, 67, 11100, 67, 8759, 9124, 12, 2890, 4672, 384, 273, 2082, 18, 30676, 2668, 69, 273, 8422, 57, 28462, 4313, 8285, 5187, 13, 365, 18, 11231, 12649, 6141, 12, 22510, 16, 2082, 18, ...
if self.outputSavePath == "": self.outputSavePath = self.gui.AskSavePath() if self.outputSavePath == "":
if saveAs or self.outputSavePath == "": outputSavePath = self.gui.AskSavePath() if outputSavePath == None:
def Save(self, saveAs = False):
b0f76d6cc53a49cf1edd98d08659d2b45278a1e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11741/b0f76d6cc53a49cf1edd98d08659d2b45278a1e0/core.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7074, 12, 2890, 16, 1923, 1463, 273, 1083, 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, ...
[ 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, 7074, 12, 2890, 16, 1923, 1463, 273, 1083, 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...
this = apply(_quickfix.new_CashSettlAgentContactPhone, args)
this = _quickfix.new_CashSettlAgentContactPhone(*args)
def __init__(self, *args): this = apply(_quickfix.new_CashSettlAgentContactPhone, args) try: self.this.append(this) except: self.this = this
7e632099fd421880c8c65fb0cf610d338d115ee9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8819/7e632099fd421880c8c65fb0cf610d338d115ee9/quickfix.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 380, 1968, 4672, 333, 273, 389, 19525, 904, 18, 2704, 67, 39, 961, 694, 6172, 3630, 6567, 9451, 30857, 1968, 13, 775, 30, 365, 18, 2211, 18, 6923, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 380, 1968, 4672, 333, 273, 389, 19525, 904, 18, 2704, 67, 39, 961, 694, 6172, 3630, 6567, 9451, 30857, 1968, 13, 775, 30, 365, 18, 2211, 18, 6923, 12, ...
drawhex((x * hexsize * 0.75 + 0.25, y * hexsize * math.sqrt(3)/2 + math.sqrt(3)/4), hexsize * 0.98)
drawhex((x * hexsize * 0.75 + 0.25 * hexsize, y * hexsize * math.sqrt(3)/2 + math.sqrt(3)/4 * hexsize), hexsize * 0.98)
def drawhexgrid(gridsize, hexsize): for x in xrange(gridsize[0]): for y in xrange(gridsize[1]): if x % 2 == 0: drawhex((x * hexsize * 0.75 + 0.25, y * hexsize * math.sqrt(3)/2), hexsize * 0.98) else: drawhex((x * hexsize * 0.75 + 0.25, y * hexsize * math.sqrt(3)/2 + math.sqrt(3)/4), hexsize * 0.98)
938bb72a8e3a628e45782480db1a7e296c82abd4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4455/938bb72a8e3a628e45782480db1a7e296c82abd4/world.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3724, 7118, 5222, 12, 5222, 1467, 16, 3827, 1467, 4672, 364, 619, 316, 12314, 12, 5222, 1467, 63, 20, 65, 4672, 364, 677, 316, 12314, 12, 5222, 1467, 63, 21, 65, 4672, 309, 619, 738, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3724, 7118, 5222, 12, 5222, 1467, 16, 3827, 1467, 4672, 364, 619, 316, 12314, 12, 5222, 1467, 63, 20, 65, 4672, 364, 677, 316, 12314, 12, 5222, 1467, 63, 21, 65, 4672, 309, 619, 738, ...
def __init__(self, p, prec, print_mode, names, element_class): sage.rings.padics.local_generic.LocalGeneric.__init__(self, prec, names)
def __init__(self, base, p, prec, print_mode, names, element_class): sage.rings.padics.local_generic.LocalGeneric.__init__(self, base, prec, names)
def __init__(self, p, prec, print_mode, names, element_class): sage.rings.padics.local_generic.LocalGeneric.__init__(self, prec, names) #if prec <= 100: # self.prime_pow = PowComputer(p, prec, prec, self.is_field()) #else: # self.prime_pow = PowComputer(p, 3, prec, self.is_field()) self._printer = pAdicPrinter(self, print_mode, True, None, None, None) self._element_class = element_class
adf23321ab0d8113b262a7379774d8ec4086f577 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/adf23321ab0d8113b262a7379774d8ec4086f577/padic_generic.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1026, 16, 293, 16, 13382, 16, 1172, 67, 3188, 16, 1257, 16, 930, 67, 1106, 4672, 272, 410, 18, 86, 899, 18, 6982, 2102, 18, 3729, 67, 13540, 18, 2042, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1026, 16, 293, 16, 13382, 16, 1172, 67, 3188, 16, 1257, 16, 930, 67, 1106, 4672, 272, 410, 18, 86, 899, 18, 6982, 2102, 18, 3729, 67, 13540, 18, 2042, ...
inClass = False inStruct = False inPublic = False inProtected = False inPrivate = False
inClass = False inStruct = False inPublic = False inProtected = False inPrivate = False inNestedClass = False inNestedStruct = False
def flagLines(lines): inClass = False inStruct = False inPublic = False inProtected = False inPrivate = False nNested = 0 className = "" structName = "" for line in lines: # class information m = re.search("^\s*class\s+(\w+)\s*:?\s+", line.stripped) if m: className = m.group(1) inClass, inStruct, inPublic, inProtected, inPrivate = True, False, False, False, False # struct information m = re.search("^\s*struct\s+(\w+)\s*:?\s+", line.stripped) if m: structName = m.group(1) inClass, inStruct, inPublic, inProtected, inPrivate = False, True, False, False, False if ((inClass or inStruct) and re.search("^\s*public:", line.stripped)): inPublic, inProtected, inPrivate = True, False, False if ((inClass or inStruct) and re.search("^\s*protected:", line.stripped)): inPublic, inProtected, inPrivate = False, True, False if ((inClass or inStruct) and re.search("^\s*private:", line.stripped)): inPublic, inProtected, inPrivate = False, False, True if ((inClass or inStruct) and re.search("^};\s*", line.stripped)): inClass, inStruct, inPublic, inProtected, inPrivate = False, False, False, False, False line.inClass = inClass line.inStruct = inStruct line.inPublic = inPublic line.inProtected = inProtected line.inPrivate = inPrivate if inClass: line.className = className if inStruct: line.structName = structName if (re.search("\{", line.stripped)): nNested += 1 if (re.search("\}", line.stripped)): nNested -= 1 line.nNested = nNested #char = "" #if inClass: char += "C" #if inPrivate: char += "V" #if inProtected: char += "T" #if inPublic: char += "B" #print char + " " + line.stripped, # variables, functions, templates line.variableNames = getVariableNames(line.stripped) line.functionNames = getFunctionNames(line.stripped) line.templateNames = getTemplateNames(line.stripped) return lines
5432dc4fee5b9db163a86ec3ee3f1ecc4222856d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6529/5432dc4fee5b9db163a86ec3ee3f1ecc4222856d/style.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2982, 5763, 12, 3548, 4672, 225, 316, 797, 3639, 273, 1083, 316, 3823, 4202, 273, 1083, 316, 4782, 4202, 273, 1083, 316, 15933, 565, 273, 1083, 316, 6014, 1377, 273, 1083, 316, 8649, 797...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2982, 5763, 12, 3548, 4672, 225, 316, 797, 3639, 273, 1083, 316, 3823, 4202, 273, 1083, 316, 4782, 4202, 273, 1083, 316, 15933, 565, 273, 1083, 316, 6014, 1377, 273, 1083, 316, 8649, 797...
target = self.model.get_iter(target_path)
def on_drag_data_received(self, treeview, drag_context, x, y, selection_data, info, eventtime): # determine destination row dest_row = treeview.get_dest_row_at_pos(x, y) if dest_row is None: drag_context.finish(False, False, eventtime) return # process node drops if "drop_node" in drag_context.targets or \ "drop_selector" in drag_context.targets: # get target and source info target_path, drop_position = dest_row source_widget = drag_context.get_source_widget() source_node = source_widget.get_drag_node() target_node = self.model.get_data(target_path) source_path = self.model.get_path_from_data(source_node) # determine if drop is allowed if not self.drop_allowed(source_node, target_node, drop_position): drag_context.finish(False, False, eventtime) return # do tree move if source path is in our tree if source_path is not None: # get target and source iters target = self.model.get_iter(target_path) source = self.model.get_iter(source_path) # record old and new parent paths old_parent = source_node.get_parent() old_parent_path = source_path[:-1] new_path = compute_new_path(self.model, target, drop_position) new_parent_path = new_path[:-1] new_parent = self.model.get_data(new_parent_path)
594f1c108ffe3bf5b4c53f58baae8e98bcb5a9b3 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4738/594f1c108ffe3bf5b4c53f58baae8e98bcb5a9b3/gui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 15997, 67, 892, 67, 15213, 12, 2890, 16, 2151, 1945, 16, 8823, 67, 2472, 16, 619, 16, 677, 16, 4421, 67, 892, 16, 1123, 16, 871, 957, 4672, 282, 468, 4199, 2929, 1027, 1570,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 15997, 67, 892, 67, 15213, 12, 2890, 16, 2151, 1945, 16, 8823, 67, 2472, 16, 619, 16, 677, 16, 4421, 67, 892, 16, 1123, 16, 871, 957, 4672, 282, 468, 4199, 2929, 1027, 1570,...
self.assertEqual(len(self.page.folder().objectIds(spec='DTML Method')),2)
self.assertEqual(len(self.page.folder().objectIds(spec='DTML Method')),3)
def test_setupDtmlMethods(self): self.assertEqual(len(self.page.folder().objectIds(spec='DTML Method')),0) self.assert_(not safe_hasattr(self.page.folder().aq_base,'index_html')) self.assert_(not safe_hasattr(self.page.folder().aq_base,'standard_error_message')) self.page.setupDtmlMethods() self.assertEqual(len(self.page.folder().objectIds(spec='DTML Method')),2) self.assert_(safe_hasattr(self.page.folder().aq_base,'index_html')) self.assert_(safe_hasattr(self.page.folder().aq_base,'standard_error_message')) self.page.setupDtmlMethods() self.assertEqual(len(self.page.folder().objectIds(spec='DTML Method')),2)
4ce9f720c3c2312d6727291028205196d977f12c /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5225/4ce9f720c3c2312d6727291028205196d977f12c/Admin_tests.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 8401, 40, 1419, 4712, 12, 2890, 4672, 365, 18, 11231, 5812, 12, 1897, 12, 2890, 18, 2433, 18, 5609, 7675, 1612, 2673, 12, 2793, 2218, 40, 2838, 2985, 6134, 3631, 20, 13, 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, 1842, 67, 8401, 40, 1419, 4712, 12, 2890, 4672, 365, 18, 11231, 5812, 12, 1897, 12, 2890, 18, 2433, 18, 5609, 7675, 1612, 2673, 12, 2793, 2218, 40, 2838, 2985, 6134, 3631, 20, 13, 365,...
def clean_subject(subject):
def clean_subject(subject, drop_prefixes = None): """ Clean a Subject: header from an incoming patch. Removes Re: and Fwd: strings, as well as [PATCH]-style prefixes. By default, only [PATCH] is removed, and we keep any other bracketed data in the subject. If drop_prefixes is provided, remove those too, comparing case-insensitively. >>> clean_subject('meep') 'meep' >>> clean_subject('Re: meep') 'meep' >>> clean_subject('[PATCH] meep') 'meep' >>> clean_subject('[PATCH RFC] meep') '[RFC] meep' >>> clean_subject('[PATCH,RFC] meep') '[RFC] meep' >>> clean_subject('[PATCH,1/2] meep') '[1/2] meep' >>> clean_subject('[PATCH RFC 1/2] meep') '[RFC,1/2] meep' >>> clean_subject('[PATCH] [RFC] meep') '[RFC] meep' >>> clean_subject('[PATCH] [RFC,1/2] meep') '[RFC,1/2] meep' >>> clean_subject('[PATCH] [RFC] [1/2] meep') '[RFC,1/2] meep' >>> clean_subject('[PATCH] rewrite [a-z] regexes') 'rewrite [a-z] regexes' >>> clean_subject('[PATCH] [RFC] rewrite [a-z] regexes') '[RFC] rewrite [a-z] regexes' >>> clean_subject('[foo] [bar] meep', ['foo']) '[bar] meep' >>> clean_subject('[FOO] [bar] meep', ['foo']) '[bar] meep' """ if drop_prefixes is None: drop_prefixes = [] else: drop_prefixes = [ s.lower() for s in drop_prefixes ] drop_prefixes.append('patch')
def clean_subject(subject): subject = re_re.sub(' ', subject) subject = prefix_re.sub('', subject) subject = whitespace_re.sub(' ', subject) return subject.strip()
96467db48884d72bc04fc23c8f957190fa004779 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7754/96467db48884d72bc04fc23c8f957190fa004779/parsemail.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2721, 67, 7857, 12, 7857, 16, 3640, 67, 17777, 273, 599, 4672, 3536, 9645, 279, 9912, 30, 1446, 628, 392, 6935, 4729, 18, 225, 20284, 868, 30, 471, 478, 3623, 30, 2064, 16, 487, 5492, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2721, 67, 7857, 12, 7857, 16, 3640, 67, 17777, 273, 599, 4672, 3536, 9645, 279, 9912, 30, 1446, 628, 392, 6935, 4729, 18, 225, 20284, 868, 30, 471, 478, 3623, 30, 2064, 16, 487, 5492, ...
assert self.innerHtml
assert self.innerHTML
def endTagBody(self, name): if self.parser.openElements[1].name != "body": assert self.innerHtml self.parser.parseError() else: if self.parser.openElements[-1].name != "body": assert self.innerHtml self.parser.switchInsertionMode("afterBody")
3f6081e8cdf476677cbd0ea3842a280aa8d91840 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4487/3f6081e8cdf476677cbd0ea3842a280aa8d91840/parser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 29765, 2250, 12, 2890, 16, 508, 4672, 309, 365, 18, 4288, 18, 3190, 3471, 63, 21, 8009, 529, 480, 315, 3432, 6877, 1815, 365, 18, 7872, 4870, 365, 18, 4288, 18, 2670, 668, 1435, 469, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2250, 12, 2890, 16, 508, 4672, 309, 365, 18, 4288, 18, 3190, 3471, 63, 21, 8009, 529, 480, 315, 3432, 6877, 1815, 365, 18, 7872, 4870, 365, 18, 4288, 18, 2670, 668, 1435, 469, ...
print subVars("Headings","numbered-heading")
def handleHeading(): global linePtr, lines, level, v, exitlevel, parents v["%%"] = lstrip(rstrip(lines[linePtr])) if getHeadingType(linePtr) == 'normal': if isFirstChild(linePtr): level = level + 1 print subVars("Headings","before-headings") print subVars("Headings","heading") if isParent(linePtr): parents.append(linePtr) linePtr = linePtr + 1 dprint("ho:",linePtr) handleObjects() dprint("xl:",level) dprint("lp:",linePtr,"ml:",level) if isLastChild(linePtr,level): print subVars("Headings","after-headings") level = level - 1 exitlevel = 1 dprint("lc") parents.pop() elif getHeadingType(linePtr) == 'bulleted': v["%%"] = dashStrip(v["%%"]) if isFirstChild(linePtr): level = level + 1 print subVars("Headings","before-bulleted-headings") print subVars("Headings","bulleted-heading") if isParent(linePtr): parents.append(linePtr) linePtr = linePtr + 1 handleObjects() if isLastChild(linePtr,level): print subVars("Headings","after-bulleted-headings") level = level - 1 exitlevel = 1 parents.pop() elif getHeadingType(linePtr) == 'numbered': v["%%"] = plusStrip(v["%%"]) if isFirstChild(linePtr): level = level + 1 print subVars("Headings","before-numbered-headings") print subVars("Headings","numbered-heading") if isParent(linePtr): parents.append(linePtr) linePtr = linePtr + 1 handleObjects() if isLastChild(linePtr,level): print subVars("Headings","after-numbered-headings") level = level - 1 exitlevel = 1 parents.pop() else: print print "Error: unknown heading type" sys.exit(1)
ee9b6de81c1ba03a51715d840d91e079fc45b8cd /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6154/ee9b6de81c1ba03a51715d840d91e079fc45b8cd/otl2tags.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 21867, 13332, 225, 2552, 980, 5263, 16, 2362, 16, 1801, 16, 331, 16, 431, 1280, 941, 16, 6298, 225, 331, 9614, 11438, 11929, 273, 14730, 12, 86, 6406, 12, 3548, 63, 1369, 5263, 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, 1640, 21867, 13332, 225, 2552, 980, 5263, 16, 2362, 16, 1801, 16, 331, 16, 431, 1280, 941, 16, 6298, 225, 331, 9614, 11438, 11929, 273, 14730, 12, 86, 6406, 12, 3548, 63, 1369, 5263, 2...
*pendantic*: [ True | False ]
*pedantic*: [ True | False ]
def vo_read(self, filename, pedantic=False, tid=-1, verbose=True): ''' Read a table from a VOT file
fb5bd4b4ba601f95313106c2126000e74ccbb6bf /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13233/fb5bd4b4ba601f95313106c2126000e74ccbb6bf/votable.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 19993, 67, 896, 12, 2890, 16, 1544, 16, 31840, 9941, 33, 8381, 16, 11594, 29711, 21, 16, 3988, 33, 5510, 4672, 9163, 2720, 279, 1014, 628, 279, 776, 1974, 585, 2, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 19993, 67, 896, 12, 2890, 16, 1544, 16, 31840, 9941, 33, 8381, 16, 11594, 29711, 21, 16, 3988, 33, 5510, 4672, 9163, 2720, 279, 1014, 628, 279, 776, 1974, 585, 2, -100, -100, -100, -10...
def getStorageFileExists( self, physicalFile, storageElementName, singleFile=False ):
def getStorageFileExists( self, physicalFile, storageElementName, singleFile = False ):
def getStorageFileExists( self, physicalFile, storageElementName, singleFile=False ): """ Determine the existance of the physical files 'physicalFile' is the pfn(s) to be checked 'storageElementName' is the Storage Element """ if singleFile: return self._executeSingleStorageElementFunction( storageElementName, physicalFile, 'exists' ) else: return self._executeStorageElementFunction( storageElementName, physicalFile, 'exists' )
8cfc8d124489ba672254aee3d1fff4f748757c6c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/8cfc8d124489ba672254aee3d1fff4f748757c6c/ReplicaManager.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13840, 812, 4002, 12, 365, 16, 11640, 812, 16, 2502, 30584, 16, 2202, 812, 273, 1083, 262, 30, 3536, 10229, 326, 1005, 1359, 434, 326, 11640, 1390, 225, 296, 20441, 812, 11, 353, 326, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13840, 812, 4002, 12, 365, 16, 11640, 812, 16, 2502, 30584, 16, 2202, 812, 273, 1083, 262, 30, 3536, 10229, 326, 1005, 1359, 434, 326, 11640, 1390, 225, 296, 20441, 812, 11, 353, 326, ...
def setup(self, tarball = 'ltp-full-20080229.tar.bz2'):
def setup(self, tarball = 'ltp-full-20091231.tar.bz2'):
def initialize(self): self._import_site_config() self.job.require_gcc()
6180ffc701ee4bc415b934f83dc1a570a46c4533 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10349/6180ffc701ee4bc415b934f83dc1a570a46c4533/ltp.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4046, 12, 2890, 4672, 365, 6315, 5666, 67, 4256, 67, 1425, 1435, 365, 18, 4688, 18, 6528, 67, 75, 952, 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, 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, 4046, 12, 2890, 4672, 365, 6315, 5666, 67, 4256, 67, 1425, 1435, 365, 18, 4688, 18, 6528, 67, 75, 952, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
elif form_entry.form.type in self._form_lookups.keys() and not hasattr(message,"reporter"):
elif form_entry.form.type in self._form_lookups.keys() and (not hasattr(message,"reporter") or not message.reporter):
def validate(self, *args, **kwargs): message = args[0] form_entry = args[1] if form_entry.form.type == "register": data = form_entry.to_dict() print "\n\n%r\n\n" % data # check that ALL FIELDS were provided required = ["location", "role", "password", "name"] missing = [t for t in required if data[t] is None] # in case we need help, build a valid reminder string help = ("%s register " % form_entry.domain.code.lower()) +\ " ".join(["<%s>" % t for t in required]) # missing fields! collate them, and # send back a friendly non-localized # error message, then abort if missing: mis_str = ", ".join(missing) return ["Missing fields: %s" % mis_str, help] try: # attempt to load the location and role objects # via their codes, which will raise if nothing # was found TODO: combine the exceptions data["location"] = Location.objects.get(code__iexact=data["location"]) data["role"] = Role.objects.get(code__iexact=data["role"]) except Location.DoesNotExist: return ["Invalid location code: %s" % data["location"], help] except Role.DoesNotExist: return ["Invalid role code: %s" % data["role"], help] # parse the name via Reporter data["alias"], data["first_name"], data["last_name"] =\ Reporter.parse_name(data.pop("name")) # check that the name/alias # hasn't already been registered reps = Reporter.objects.filter(alias=data["alias"]) if len(reps): return ["Already been registed: %s" % data["alias"], help] # all fields were present and correct, so copy them into the # form_entry, for "actions" to pick up again without re-fetching form_entry.rep_data = data # nothing went wrong. the data structure # is ready to spawn a Reporter object return None elif form_entry.form.type in self._form_lookups.keys() and not hasattr(message,"reporter"): return [ "You must register your phone before submitting data" ]
3d886a994063f71fb0456c6f2bdc483603636b12 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11809/3d886a994063f71fb0456c6f2bdc483603636b12/formslogic.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1954, 12, 2890, 16, 380, 1968, 16, 2826, 4333, 4672, 883, 273, 833, 63, 20, 65, 646, 67, 4099, 273, 833, 63, 21, 65, 309, 646, 67, 4099, 18, 687, 18, 723, 422, 315, 4861, 6877, 501...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1954, 12, 2890, 16, 380, 1968, 16, 2826, 4333, 4672, 883, 273, 833, 63, 20, 65, 646, 67, 4099, 273, 833, 63, 21, 65, 309, 646, 67, 4099, 18, 687, 18, 723, 422, 315, 4861, 6877, 501...
except Exception,e:
except Exception,e:
def create(self, node, objname, mode): objname=_to_unicode(objname) cr = node.cr uid = node.uid pool = pooler.get_pool(cr.dbname) child = node.child(objname) if child: if child.type in ('collection','database'): raise OSError(1, 'Operation not permited.') if child.type=='content': s = content_wrapper(cr.dbname, uid, pool, child) return s try: fobj = pool.get('ir.attachment') ext = objname.find('.') >0 and objname.split('.')[1] or False
2550e886e7b6a1124a8488dd00110929919ffa50 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/2550e886e7b6a1124a8488dd00110929919ffa50/abstracted_fs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 12, 2890, 16, 756, 16, 1081, 529, 16, 1965, 4672, 1081, 529, 33, 67, 869, 67, 9124, 12, 2603, 529, 13, 4422, 273, 756, 18, 3353, 4555, 273, 756, 18, 1911, 2845, 273, 2845, 264, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 12, 2890, 16, 756, 16, 1081, 529, 16, 1965, 4672, 1081, 529, 33, 67, 869, 67, 9124, 12, 2603, 529, 13, 4422, 273, 756, 18, 3353, 4555, 273, 756, 18, 1911, 2845, 273, 2845, 264, ...
unittest.main()
unittest.main(TestBuiltinsWithProcesses, 'testSin')
def testPred(self): in_data = [1.0, 2.1, 100.123, 1e4+1.0, 0.0] expected_data = [0.0, 1.1, 99.123, 1e4, -1.0] self.feedUnaryFloatOperation(in_data, expected_data, builtins.Pred)
cc8fa694fe2a35a8d4a0dd6abe32834453e713e8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10307/cc8fa694fe2a35a8d4a0dd6abe32834453e713e8/test_builtins.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 10391, 12, 2890, 4672, 316, 67, 892, 273, 306, 21, 18, 20, 16, 576, 18, 21, 16, 2130, 18, 12936, 16, 404, 73, 24, 15, 21, 18, 20, 16, 374, 18, 20, 65, 2665, 67, 892, 273, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 10391, 12, 2890, 4672, 316, 67, 892, 273, 306, 21, 18, 20, 16, 576, 18, 21, 16, 2130, 18, 12936, 16, 404, 73, 24, 15, 21, 18, 20, 16, 374, 18, 20, 65, 2665, 67, 892, 273, ...
strangeIds = ['home', 'version', 'icon']
strangeIds = ['home', 'version']
def test_strangeUnallowedIds(self): """ Certain IDs give an error and are unusable
d1f85d09073dbf074e7a2e490b28f334d4dcfea0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11956/d1f85d09073dbf074e7a2e490b28f334d4dcfea0/test_atfolder.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 701, 726, 984, 8151, 2673, 12, 2890, 4672, 3536, 11921, 530, 7115, 8492, 392, 555, 471, 854, 640, 16665, 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, 1842, 67, 701, 726, 984, 8151, 2673, 12, 2890, 4672, 3536, 11921, 530, 7115, 8492, 392, 555, 471, 854, 640, 16665, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
cty.c_int, [STRING],
cty.c_int, [STRING],
def fl_free_all_dirlist(): """ fl_free_all_dirlist() """ _fl_free_all_dirlist()
9942dac8ce2b35a1e43615a26fd8e7054ef805d3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2429/9942dac8ce2b35a1e43615a26fd8e7054ef805d3/xformslib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1183, 67, 9156, 67, 454, 67, 1214, 1098, 13332, 3536, 1183, 67, 9156, 67, 454, 67, 1214, 1098, 1435, 3536, 225, 389, 2242, 67, 9156, 67, 454, 67, 1214, 1098, 1435, 282, 2, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1183, 67, 9156, 67, 454, 67, 1214, 1098, 13332, 3536, 1183, 67, 9156, 67, 454, 67, 1214, 1098, 1435, 3536, 225, 389, 2242, 67, 9156, 67, 454, 67, 1214, 1098, 1435, 282, 2, -100, -100, ...
if owner != entry.get('owner'):
if owner != str(normUid(entry)):
def VerifyDirectory(self, entry, _): '''Verify Directory Entry''' while len(entry.get('perms', '')) < 4: entry.set('perms', '0' + entry.get('perms', '')) try: ondisk = os.stat(entry.get('name')) except OSError: entry.set('current_exists', 'false') self.logger.debug("%s %s does not exist" % (entry.tag, entry.get('name'))) return False try: owner = pwd.getpwuid(ondisk[ST_UID])[0] group = grp.getgrgid(ondisk[ST_GID])[0] except (OSError, KeyError): self.logger.error('User/Group resolution failed for path %s' % (entry.get('name'))) owner = 'root' group = '0' finfo = os.stat(entry.get('name')) perms = oct(finfo[ST_MODE])[-4:] if entry.get('mtime', '-1') != '-1': mtime = str(finfo[ST_MTIME]) else: mtime = '-1' if ((owner == entry.get('owner')) and (group == entry.get('group')) and (perms == entry.get('perms')) and (mtime == entry.get('mtime', '-1'))): return True else: if owner != entry.get('owner'): entry.set('current_owner', owner) self.logger.debug("%s %s ownership wrong" % (entry.tag, entry.get('name'))) nqtext = entry.get('qtext', '') + '\n' nqtext += "%s owner wrong. is %s should be %s" % \ (entry.get('name'), owner, entry.get('owner')) entry.set('qtext', nqtext) if group != entry.get('group'): entry.set('current_group', group) self.logger.debug("%s %s group wrong" % (entry.tag, entry.get('name'))) nqtext = entry.get('qtext', '') + '\n' nqtext += "%s group is %s should be %s" % \ (entry.get('name'), group, entry.get('group')) entry.set('qtext', nqtext) if perms != entry.get('perms'): entry.set('current_perms', perms) self.logger.debug("%s %s permissions are %s should be %s" % (entry.tag, entry.get('name'), perms, entry.get('perms'))) nqtext = entry.get('qtext', '') + '\n' nqtext += "%s perms are %s should be %s" % \ (entry.get('name'), perms, entry.get('perms')) entry.set('qtext', nqtext) if mtime != entry.get('mtime', '-1'): entry.set('current_mtime', mtime) self.logger.debug("%s %s mtime is %s should be %s" \ % (entry.tag, entry.get('name'), mtime, entry.get('mtime'))) nqtext = entry.get('qtext', '') + '\n' nqtext += "%s mtime is %s should be %s" % \ (entry.get('name'), mtime, entry.get('mtime')) entry.set('qtext', nqtext) if entry.tag != 'ConfigFile': nnqtext = entry.get('qtext') nnqtext += '\nInstall %s %s: (y/N) ' % (entry.tag, entry.get('name')) entry.set('qtext', nnqtext) return False
02190b66aa42d44362a57ba7de27b511a8aa50ef /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11867/02190b66aa42d44362a57ba7de27b511a8aa50ef/POSIX.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8553, 2853, 12, 2890, 16, 1241, 16, 389, 4672, 9163, 8097, 8930, 3841, 26418, 1323, 562, 12, 4099, 18, 588, 2668, 15969, 2187, 875, 3719, 411, 1059, 30, 1241, 18, 542, 2668, 15969, 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, 8553, 2853, 12, 2890, 16, 1241, 16, 389, 4672, 9163, 8097, 8930, 3841, 26418, 1323, 562, 12, 4099, 18, 588, 2668, 15969, 2187, 875, 3719, 411, 1059, 30, 1241, 18, 542, 2668, 15969, 2187,...
value = b""
value = []
def _read_chunked(self, amt): assert self.chunked != _UNKNOWN chunk_left = self.chunk_left value = b""
5a86acb6d643dd798673dbc59f314952a4514b17 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8546/5a86acb6d643dd798673dbc59f314952a4514b17/client.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 896, 67, 6551, 329, 12, 2890, 16, 25123, 4672, 1815, 365, 18, 6551, 329, 480, 389, 14737, 2441, 67, 4482, 273, 365, 18, 6551, 67, 4482, 460, 273, 324, 3660, 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, 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, 896, 67, 6551, 329, 12, 2890, 16, 25123, 4672, 1815, 365, 18, 6551, 329, 480, 389, 14737, 2441, 67, 4482, 273, 365, 18, 6551, 67, 4482, 460, 273, 324, 3660, 2, -100, -100, -100, ...