rem
stringlengths
1
226k
add
stringlengths
0
227k
context
stringlengths
6
326k
meta
stringlengths
143
403
input_ids
listlengths
256
256
attention_mask
listlengths
256
256
labels
listlengths
128
128
label = config_value(module, 'LABEL', default = module_name)
label = _(config_value(module, 'LABEL', default = module_name))
def labelled_payment_choices(): active_payment_modules = config_choice_values('PAYMENT', 'MODULES', translate=True) choices = [] for module, module_name in active_payment_modules: label = config_value(module, 'LABEL', default = module_name) choices.append((module, label)) signals.payment_choices.send(None, choices=choices) return choices
3c761bdc946a96166f3a054ab6b3dc82db4b7622 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/171/3c761bdc946a96166f3a054ab6b3dc82db4b7622/config.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1433, 1259, 67, 9261, 67, 11937, 13332, 2695, 67, 9261, 67, 6400, 273, 642, 67, 11569, 67, 2372, 2668, 16436, 2187, 296, 12194, 55, 2187, 4204, 33, 5510, 13, 225, 7246, 273, 5378, 364, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1433, 1259, 67, 9261, 67, 11937, 13332, 2695, 67, 9261, 67, 6400, 273, 642, 67, 11569, 67, 2372, 2668, 16436, 2187, 296, 12194, 55, 2187, 4204, 33, 5510, 13, 225, 7246, 273, 5378, 364, ...
title=u"The object this facet is augmenting"
title=u"The object this facet is augmenting",
def __call__(self, event): """Invoke the callback."""
4cfce9d57348b7ed94f6b09155319ab42f11a84e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7127/4cfce9d57348b7ed94f6b09155319ab42f11a84e/interfaces.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 871, 4672, 3536, 10969, 326, 1348, 12123, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 871, 4672, 3536, 10969, 326, 1348, 12123, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
""" Log file name. """)
"Log file name")
def _set_log_filename(self, log_filename): self._log_filename = log_filename
217d12136ccc1d46d76fbe600da287bfa7ff002b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12617/217d12136ccc1d46d76fbe600da287bfa7ff002b/test_result.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 542, 67, 1330, 67, 3459, 12, 2890, 16, 613, 67, 3459, 4672, 365, 6315, 1330, 67, 3459, 273, 613, 67, 3459, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 542, 67, 1330, 67, 3459, 12, 2890, 16, 613, 67, 3459, 4672, 365, 6315, 1330, 67, 3459, 273, 613, 67, 3459, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
self.GetParent ().GetParent ().switchPane ()
self.getFrame ().switchPane () self.afterDirChange ()
def switchPane (self): self.GetParent ().GetParent ().switchPane ()
c77a99f1e1d289d91f9bcbf2b7c6c8e572e3ab89 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9028/c77a99f1e1d289d91f9bcbf2b7c6c8e572e3ab89/candy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1620, 8485, 261, 2890, 4672, 365, 18, 967, 3054, 1832, 18, 967, 3054, 1832, 18, 9610, 8485, 1832, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 1620, 8485, 261, 2890, 4672, 365, 18, 967, 3054, 1832, 18, 967, 3054, 1832, 18, 9610, 8485, 1832, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
file = open(filename)
try: file = open(filename) except IOError: return None
def synopsis(filename, cache={}): """Get the one-line summary out of a module file.""" mtime = os.stat(filename).st_mtime lastupdate, result = cache.get(filename, (0, None)) if lastupdate < mtime: info = inspect.getmoduleinfo(filename) file = open(filename) if info and 'b' in info[2]: # binary modules have to be imported try: module = imp.load_module('__temp__', file, filename, info[1:]) except: return None result = split(module.__doc__ or '', '\n')[0] del sys.modules['__temp__'] else: # text modules can be directly examined line = file.readline() while line[:1] == '#' or not strip(line): line = file.readline() if not line: break line = strip(line) if line[:4] == 'r"""': line = line[1:] if line[:3] == '"""': line = line[3:] if line[-1:] == '\\': line = line[:-1] while not strip(line): line = file.readline() if not line: break result = strip(split(line, '"""')[0]) else: result = None file.close() cache[filename] = (mtime, result) return result
26fd2e1dcc6f07f6c58127a790312850849c1c60 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/26fd2e1dcc6f07f6c58127a790312850849c1c60/pydoc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6194, 29522, 12, 3459, 16, 1247, 12938, 4672, 3536, 967, 326, 1245, 17, 1369, 4916, 596, 434, 279, 1605, 585, 12123, 13158, 273, 1140, 18, 5642, 12, 3459, 2934, 334, 67, 10838, 1142, 272...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6194, 29522, 12, 3459, 16, 1247, 12938, 4672, 3536, 967, 326, 1245, 17, 1369, 4916, 596, 434, 279, 1605, 585, 12123, 13158, 273, 1140, 18, 5642, 12, 3459, 2934, 334, 67, 10838, 1142, 272...
self._order += data.order
self._order += data._order def __add__(self,data): """Add two ODicts's together, returning the result.""" self.update(data) return self
def update(self,data={}): """Add a dictionary to the ODict object.
1df35147be135fd9b068f1474fe68dd7aeccc827 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2499/1df35147be135fd9b068f1474fe68dd7aeccc827/odict.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 12, 2890, 16, 892, 12938, 4672, 3536, 986, 279, 3880, 358, 326, 531, 5014, 733, 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, ...
[ 1, 1, 1, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 12, 2890, 16, 892, 12938, 4672, 3536, 986, 279, 3880, 358, 326, 531, 5014, 733, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
except DistutilsExecError, msg:
except DistutilsExecError as msg:
def compile(self, sources, output_dir=None, macros=None, include_dirs=None, debug=0, extra_preargs=None, extra_postargs=None, depends=None):
b3c6ed5e10916734bf0bd96fcf21743ab916efd4 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8546/b3c6ed5e10916734bf0bd96fcf21743ab916efd4/msvc9compiler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4074, 12, 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, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4074, 12, 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, ...
return FortranArray(numpy.array(seq,order='F'))
na = numpy.array(seq,order='F') if isinstance(seq,tuple) or isinstance(seq,list): na = na.transpose() return FortranArray(na)
def farray(seq): """Convert seq to a FortranArray with Fortran ordering. >>> fa = farray([1,2,3]) A copy of the data in seq will be made if necessary.""" return FortranArray(numpy.array(seq,order='F'))
ce23e8f09f38a59b3eda64bcd0f7dcdf9fa7b8d8 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8914/ce23e8f09f38a59b3eda64bcd0f7dcdf9fa7b8d8/farray.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 284, 1126, 12, 5436, 4672, 3536, 2723, 3833, 358, 279, 2457, 13171, 1076, 598, 2457, 13171, 9543, 18, 225, 4080, 11087, 273, 284, 1126, 3816, 21, 16, 22, 16, 23, 5717, 225, 432, 1610, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 284, 1126, 12, 5436, 4672, 3536, 2723, 3833, 358, 279, 2457, 13171, 1076, 598, 2457, 13171, 9543, 18, 225, 4080, 11087, 273, 284, 1126, 3816, 21, 16, 22, 16, 23, 5717, 225, 432, 1610, ...
py_version=py_version or PY_MAJOR, platform=platform
py_version=py_version, platform=platform
def from_filename(cls,filename,metadata=None): name,version,py_version,platform = [None]*4 basename,ext = os.path.splitext(os.path.basename(filename)) if ext.lower()==".egg": match = EGG_NAME(basename) if match: name,version,py_version,platform = match.group( 'name','ver','pyver','plat' ) return cls( filename, metadata, name=name, version=version, py_version=py_version or PY_MAJOR, platform=platform )
9d3222c5a0a78f47be05b2e5ac2e720998035afb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8186/9d3222c5a0a78f47be05b2e5ac2e720998035afb/pkg_resources.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 628, 67, 3459, 12, 6429, 16, 3459, 16, 4165, 33, 7036, 4672, 508, 16, 1589, 16, 2074, 67, 1589, 16, 9898, 273, 306, 7036, 5772, 24, 4882, 16, 408, 273, 1140, 18, 803, 18, 4939, 408, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 628, 67, 3459, 12, 6429, 16, 3459, 16, 4165, 33, 7036, 4672, 508, 16, 1589, 16, 2074, 67, 1589, 16, 9898, 273, 306, 7036, 5772, 24, 4882, 16, 408, 273, 1140, 18, 803, 18, 4939, 408, ...
self.fileobj.unlink(self.fileobj.name)
def handle_timeout_listen(self): self.ftp.fail() self.fileobj.unlink(self.fileobj.name) return False
534780d2d0cd8b994789e014dc1562197e5cd86b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8801/534780d2d0cd8b994789e014dc1562197e5cd86b/ftp.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 67, 4538, 67, 18085, 12, 2890, 4672, 365, 18, 11727, 18, 6870, 1435, 327, 1083, 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, ...
[ 1, 1, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 67, 4538, 67, 18085, 12, 2890, 4672, 365, 18, 11727, 18, 6870, 1435, 327, 1083, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
except (socket.error, httplib.HTTPException), e: retry = (errno.ECONNRESET, errno.ECONNABORTED, httplib.BadStatusLine) if i or e[0] not in retry:
except socket.error, e: if i or e.errno not in (errno.ECONNRESET, errno.ECONNABORTED): raise except http.client.BadStatusLine: if i:
def request(self, host, handler, request_body, verbose=0): #retry request once if cached connection has gone cold for i in (0, 1): try: return self.single_request(host, handler, request_body, verbose) except (socket.error, httplib.HTTPException), e: retry = (errno.ECONNRESET, errno.ECONNABORTED, httplib.BadStatusLine) #close after we sent request if i or e[0] not in retry: raise
81415647b4531d6819e7337e6837f113c0b6eb95 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8125/81415647b4531d6819e7337e6837f113c0b6eb95/xmlrpclib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 590, 12, 2890, 16, 1479, 16, 1838, 16, 590, 67, 3432, 16, 3988, 33, 20, 4672, 468, 9620, 590, 3647, 309, 3472, 1459, 711, 22296, 645, 72, 364, 277, 316, 261, 20, 16, 404, 4672, 775, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 590, 12, 2890, 16, 1479, 16, 1838, 16, 590, 67, 3432, 16, 3988, 33, 20, 4672, 468, 9620, 590, 3647, 309, 3472, 1459, 711, 22296, 645, 72, 364, 277, 316, 261, 20, 16, 404, 4672, 775, ...
def callWhenRunning(self, callable, *args, **kw):
def callWhenRunning(self, _callable, *args, **kw):
def callWhenRunning(self, callable, *args, **kw): """See twisted.internet.interfaces.IReactorCore.callWhenRunning. """ if self.running: callable(*args, **kw) else: return self.addSystemEventTrigger('after', 'startup', callable, *args, **kw)
2be731a1ed281980caf599001b09591be5493949 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/2be731a1ed281980caf599001b09591be5493949/base.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 745, 9434, 7051, 12, 2890, 16, 389, 7293, 16, 380, 1968, 16, 2826, 9987, 4672, 3536, 9704, 2339, 25444, 18, 267, 14726, 18, 15898, 18, 45, 426, 3362, 4670, 18, 1991, 9434, 7051, 18, 35...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 745, 9434, 7051, 12, 2890, 16, 389, 7293, 16, 380, 1968, 16, 2826, 9987, 4672, 3536, 9704, 2339, 25444, 18, 267, 14726, 18, 15898, 18, 45, 426, 3362, 4670, 18, 1991, 9434, 7051, 18, 35...
cursor.execute("SELECT id, xml FROM stats_messages WHERE target_path = %s ORDER BY id DESC%s" %
cursor.execute("SELECT id, xml FROM stats_messages FORCE INDEX (target_path_2, id) " "WHERE target_path = %s ORDER BY id DESC%s" %
def _getLatest(self, cursor, limit): if limit is None: limitClause = '' else: limitClause = " LIMIT %d" % limit cursor.execute("SELECT id, xml FROM stats_messages WHERE target_path = %s ORDER BY id DESC%s" % (Database.quote(self.target.path, 'varchar'), limitClause)) return cursor.fetchall()
1d7bfe2a8a9d8b471adaef4079bc0841b03d3299 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6757/1d7bfe2a8a9d8b471adaef4079bc0841b03d3299/Target.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 18650, 12, 2890, 16, 3347, 16, 1800, 4672, 309, 1800, 353, 599, 30, 1800, 7044, 273, 875, 469, 30, 1800, 7044, 273, 315, 13319, 738, 72, 6, 738, 1800, 3347, 18, 8837, 2932, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 18650, 12, 2890, 16, 3347, 16, 1800, 4672, 309, 1800, 353, 599, 30, 1800, 7044, 273, 875, 469, 30, 1800, 7044, 273, 315, 13319, 738, 72, 6, 738, 1800, 3347, 18, 8837, 2932, ...
def read_pages_from_sql_dump(sqlfilename, old, regex):
def read_pages_from_sql_dump(sqlfilename, replacements, exceptions, regex):
def read_pages_from_sql_dump(sqlfilename, old, regex): import sqldump dump = sqldump.SQLdump(sqlfilename, wikipedia.myencoding()) for entry in dump.entries(): if regex: if old.search(entry.text): yield wikipedia.PageLink(wikipedia.mylang, entry.full_title()) else: if entry.text.find(old) != -1: yield wikipedia.PageLink(wikipedia.mylang, entry.full_title())
d3596dc42562932cbc3b84fdd463983c3a41dcb7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4404/d3596dc42562932cbc3b84fdd463983c3a41dcb7/replace.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 67, 7267, 67, 2080, 67, 4669, 67, 8481, 12, 4669, 3459, 16, 11413, 16, 4798, 16, 3936, 4672, 1930, 1847, 8481, 4657, 273, 1847, 8481, 18, 3997, 8481, 12, 4669, 3459, 16, 21137, 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, 855, 67, 7267, 67, 2080, 67, 4669, 67, 8481, 12, 4669, 3459, 16, 11413, 16, 4798, 16, 3936, 4672, 1930, 1847, 8481, 4657, 273, 1847, 8481, 18, 3997, 8481, 12, 4669, 3459, 16, 21137, 18...
if string.find(gdal.GetLastErrorMsg(),'No translation') != -1: return 'success'
pass if string.find(gdal.GetLastErrorMsg(),'No translation') != -1: return 'success'
def osr_proj4_4(): srs = osr.SpatialReference() srs.SetFromUserInput( '+proj=utm +zone=11 +datum=WGS84' ) srs.SetAttrValue( 'PROJCS|PROJECTION', 'FakeTransverseMercator' ) try: proj4 = srs.ExportToProj4() except RuntimeError: if string.find(gdal.GetLastErrorMsg(),'No translation') != -1: return 'success' gdaltest.post_reason( 'unknown srs not handled properly' ) return 'fail'
b617567bc8e84a2af0b9dc941500856277a3701f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/10290/b617567bc8e84a2af0b9dc941500856277a3701f/osr_proj4.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1140, 86, 67, 17995, 24, 67, 24, 13332, 225, 26200, 273, 1140, 86, 18, 24648, 2404, 1435, 26200, 18, 694, 1265, 29423, 12, 15126, 17995, 33, 322, 81, 397, 3486, 33, 2499, 397, 3404, 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, 1140, 86, 67, 17995, 24, 67, 24, 13332, 225, 26200, 273, 1140, 86, 18, 24648, 2404, 1435, 26200, 18, 694, 1265, 29423, 12, 15126, 17995, 33, 322, 81, 397, 3486, 33, 2499, 397, 3404, 37...
XML_DECL = '<?xml version="1.0" encoding="UTF-8"?>\n' DOCTYPE_DECL = """<!DOCTYPE %s PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" "http://www.oasis-open.org/docbook/xml/4.0/docbookx.dtd">\n"""
XML_DECL = '<?xml version="1.0" encoding="%s"?>\n' DOCTYPE_DECL = """<!DOCTYPE %s PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" "http://www.oasis-open.org/docbook/xml/4.0/docbookx.dtd">\n"""
def record(self): self.recordfile(self.output, self.destination)
81818dd428bfab36de0c7775dcdb742978a01329 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5620/81818dd428bfab36de0c7775dcdb742978a01329/docbook.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1409, 12, 2890, 4672, 365, 18, 3366, 768, 12, 2890, 18, 2844, 16, 365, 18, 10590, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 1409, 12, 2890, 4672, 365, 18, 3366, 768, 12, 2890, 18, 2844, 16, 365, 18, 10590, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
fname = STANDARD_TYPES.get(ttype, '')
fname = STANDARD_TYPES.get(ttype)
def _get_ttype_class(ttype): fname = STANDARD_TYPES.get(ttype) if fname: return fname aname = '' while fname is None: aname = '-' + ttype[-1] + aname ttype = ttype.parent fname = STANDARD_TYPES.get(ttype, '') return fname + aname
6814d2a14c2d363f5397d6127012c603e4c63e7a /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2885/6814d2a14c2d363f5397d6127012c603e4c63e7a/html.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 88, 723, 67, 1106, 12, 88, 723, 4672, 5299, 273, 23255, 67, 10564, 18, 588, 12, 88, 723, 13, 309, 5299, 30, 327, 5299, 392, 339, 273, 875, 1323, 5299, 353, 599, 30, 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, 389, 588, 67, 88, 723, 67, 1106, 12, 88, 723, 4672, 5299, 273, 23255, 67, 10564, 18, 588, 12, 88, 723, 13, 309, 5299, 30, 327, 5299, 392, 339, 273, 875, 1323, 5299, 353, 599, 30, 3...
icon = getIconURL(o2, icon_base_url) title = o2.title_and_id() url_tool = getToolByName(self, 'portal_url') path = escape(url_tool.getRelativeUrl(obj))
icon = escape(getIconURL(o2, icon_base_url).encode('utf8')) title = escape(o2.title_and_id().encode('utf8')) path = obj.absolute_url()
def _render_editing(self, obj, text, icon_base_url): o2 = obj.dereference() icon = getIconURL(o2, icon_base_url) title = o2.title_and_id() url_tool = getToolByName(self, 'portal_url') path = escape(url_tool.getRelativeUrl(obj)) composite_tool = getToolByName(self, TOOL_ID) viewlets_info = composite_tool.getViewletsFor(o2) allowed_viewlets_ids = [] allowed_viewlets_titles = [] if viewlets_info: allowed_viewlets_ids.append(viewlets_info['default']["id"]) allowed_viewlets_titles.append(viewlets_info['default']["viewlet"].title_or_id()) for viewlet in viewlets_info['viewlets']: allowed_viewlets_ids.append(viewlet["id"]) allowed_viewlets_titles.append(viewlet["viewlet"].title_or_id()) return edit_tag % (path, escape(icon), escape(title), " ".join(allowed_viewlets_ids), "%".join(allowed_viewlets_titles), text)
e38256c85e714174e2df1990e42cc9e5ec7e55a0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1807/e38256c85e714174e2df1990e42cc9e5ec7e55a0/cmfcompositepage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5902, 67, 4619, 310, 12, 2890, 16, 1081, 16, 977, 16, 4126, 67, 1969, 67, 718, 4672, 320, 22, 273, 1081, 18, 765, 73, 1134, 1435, 4126, 273, 4114, 12, 588, 5554, 1785, 12, 83, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5902, 67, 4619, 310, 12, 2890, 16, 1081, 16, 977, 16, 4126, 67, 1969, 67, 718, 4672, 320, 22, 273, 1081, 18, 765, 73, 1134, 1435, 4126, 273, 4114, 12, 588, 5554, 1785, 12, 83, ...
usage = "usage: %prog (-b BEGIN -e END) | -a"
usage = "usage: %prog (-b BEGIN -e END) | -a [-s]"
def main(): usage = "usage: %prog (-b BEGIN -e END) | -a" parser = OptionParser(usage) parser.add_option('-b', '--begin', dest='begin', matavar="BEGIN", help="The ID in the database where fixing should begin (inclusive).") parser.add_option('-e', '--end', dest='end', metavar="END", help="The ID in the database where fixing should end (inclusive).") parser.add_option('-a', '--all', action="store_true", dest='all', default=False, help='Run the script across the entire database ' + \ '(use caution, as this is a resource intensive operation).') (options, args) = parser.parse_args() begin = options.begin end = options.end all = options.all if all: # run the script across the entire DB queryset = queryset_iterator(Document.objects.all()) for doc in queryset: doc.update_dates() exit(0) else: # run the script for the start and end points queryset = queryset_iterator(Document.objects.filter(documentUUID__gte=begin, documentUUID__lte=end) for doc in queryset: update_date(doc) exit(0)
0fffbe31b93e4d2573c8412e927b93c2ddb12333 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6762/0fffbe31b93e4d2573c8412e927b93c2ddb12333/pdf_date_fixer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 4084, 273, 315, 9167, 30, 738, 14654, 24927, 70, 19270, 300, 73, 7273, 13, 571, 300, 69, 23059, 87, 4279, 2082, 273, 18862, 12, 9167, 13, 2082, 18, 1289, 67, 3482, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 4084, 273, 315, 9167, 30, 738, 14654, 24927, 70, 19270, 300, 73, 7273, 13, 571, 300, 69, 23059, 87, 4279, 2082, 273, 18862, 12, 9167, 13, 2082, 18, 1289, 67, 3482, 2668, 1...
f = open(os.path.join(netcdf4_dir,'include/netcdf.h'))
f = open(os.path.join(netcdf4_includedir,'netcdf.h'))
def check_ifnetcdf4(netcdf4_dir): try: f = open(os.path.join(netcdf4_dir,'include/netcdf.h')) except IOError: return False isnetcdf4 = False for line in f: if line.startswith('nc_inq_compound'): isnetcdf4 = True return isnetcdf4
c01e6408fe27e6458627abbf01fb6379fe1f2926 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8103/c01e6408fe27e6458627abbf01fb6379fe1f2926/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 430, 2758, 24799, 24, 12, 2758, 24799, 24, 67, 1214, 4672, 775, 30, 284, 273, 1696, 12, 538, 18, 803, 18, 5701, 12, 2758, 24799, 24, 67, 20405, 481, 11189, 2758, 24799, 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, 866, 67, 430, 2758, 24799, 24, 12, 2758, 24799, 24, 67, 1214, 4672, 775, 30, 284, 273, 1696, 12, 538, 18, 803, 18, 5701, 12, 2758, 24799, 24, 67, 20405, 481, 11189, 2758, 24799, 18, ...
if record[5]: decomposition = '"%s"' % record[5] else: decomposition = "NULL"
def maketable(): unicode = UnicodeData(UNICODE_DATA) # extract unicode properties dummy = (0, 0, 0, 0, "NULL") table = [dummy] cache = {0: dummy} index = [0] * len(unicode.chars) DECOMPOSITION = [""] for char in unicode.chars: record = unicode.table[char] if record: # extract database properties category = CATEGORY_NAMES.index(record[2]) combining = int(record[3]) bidirectional = BIDIRECTIONAL_NAMES.index(record[4]) mirrored = record[9] == "Y" if record[5]: decomposition = '"%s"' % record[5] else: decomposition = "NULL" item = ( category, combining, bidirectional, mirrored, decomposition ) # add entry to index and item tables i = cache.get(item) if i is None: cache[item] = i = len(table) table.append(item) index[char] = i # FIXME: we really should compress the decomposition stuff # (see the unidb utilities for one way to do this) FILE = "unicodedata_db.h" sys.stdout = open(FILE, "w") print "/* this file was generated by %s %s */" % (SCRIPT, VERSION) print print "/* a list of unique database records */" print "const _PyUnicode_DatabaseRecord _PyUnicode_Database_Records[] = {" for item in table: print " {%d, %d, %d, %d, %s}," % item print "};" print print "/* string literals */" print "const char *_PyUnicode_CategoryNames[] = {" for name in CATEGORY_NAMES: print " \"%s\"," % name print " NULL" print "};" print "const char *_PyUnicode_BidirectionalNames[] = {" for name in BIDIRECTIONAL_NAMES: print " \"%s\"," % name print " NULL" print "};" # split index table index1, index2, shift = splitbins(index) print "/* index tables used to find the right database record */" print "#define SHIFT", shift Array("index1", index1).dump(sys.stdout) Array("index2", index2).dump(sys.stdout) sys.stdout = sys.__stdout__
52c6d7a9e9afe3d0a9ad29e7a71c205b3bb17a83 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/52c6d7a9e9afe3d0a9ad29e7a71c205b3bb17a83/makeunicodedata.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 29796, 278, 429, 13332, 225, 5252, 273, 9633, 751, 12, 26642, 67, 4883, 13, 225, 468, 2608, 5252, 1790, 9609, 273, 261, 20, 16, 374, 16, 374, 16, 374, 16, 315, 8560, 7923, 1014, 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, 29796, 278, 429, 13332, 225, 5252, 273, 9633, 751, 12, 26642, 67, 4883, 13, 225, 468, 2608, 5252, 1790, 9609, 273, 261, 20, 16, 374, 16, 374, 16, 374, 16, 315, 8560, 7923, 1014, 273, ...
browser = googlecl.CONFIG.get('GENERAL', 'auth_browser') except ConfigParser.NoOptionError: browser = os.getenv('BROWSER')
try: browser_str = googlecl.CONFIG.get('GENERAL', 'auth_browser') except ConfigParser.NoOptionError: browser = webbrowser.get() else: browser = webbrowser.get(browser_str) browser.open(auth_url) except webbrowser.Error, err: print 'Failed to launch web browser: ' + str(err)
def request_access(self): """Do all the steps involved with getting an OAuth access token. Return: True if access token was succesfully retrieved and set, otherwise False. """ import ConfigParser import os import subprocess # Installed applications do not have a pre-registration and so follow # directions for unregistered applications self.SetOAuthInputParameters(gdata.auth.OAuthSignatureMethod.HMAC_SHA1, consumer_key='anonymous', consumer_secret='anonymous') display_name = '"GoogleCL for account: ' + self.email + '"' params = {'xoauth_displayname':display_name} try: request_token = self.FetchOAuthRequestToken(extra_parameters=params) except gdata.service.FetchingOAuthRequestTokenFailed, err: print err[0]['body'].strip() + '; Request token retrieval failed!' return False auth_url = self.GenerateOAuthAuthorizationURL(request_token=request_token) try: browser = googlecl.CONFIG.get('GENERAL', 'auth_browser') except ConfigParser.NoOptionError: browser = os.getenv('BROWSER') message = 'Please log in and/or grant access via your browser at ' +\ auth_url + ' then hit enter.' if browser: try: subprocess.call([browser, auth_url]) except OSError, err: print 'Error using browser "' + browser + '": ' + str(err) else: print '(Hint: You can automatically launch your browser by adding ' +\ '"auth_browser = <browser>" to your config file under the ' +\ 'GENERAL section, or define the BROWSER environment variable.)' raw_input(message) # This upgrades the token, and if successful, sets the access token try: self.UpgradeToOAuthAccessToken(request_token) except gdata.service.TokenUpgradeFailed: print 'Token upgrade failed! Could not get OAuth access token.' return False else: return True
7c1778034a2c5f5ff296afd637fce7a7b19d32a9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2899/7c1778034a2c5f5ff296afd637fce7a7b19d32a9/service.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 590, 67, 3860, 12, 2890, 4672, 3536, 3244, 777, 326, 6075, 24589, 598, 8742, 392, 7270, 2006, 1147, 18, 225, 2000, 30, 1053, 309, 2006, 1147, 1703, 8667, 764, 4095, 10295, 471, 444, 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, 590, 67, 3860, 12, 2890, 4672, 3536, 3244, 777, 326, 6075, 24589, 598, 8742, 392, 7270, 2006, 1147, 18, 225, 2000, 30, 1053, 309, 2006, 1147, 1703, 8667, 764, 4095, 10295, 471, 444, 16, ...
def generate_html() : html_content = g_html_head for client in sorted(g_client_message_board.keys()) : html_content += '<p><strong>' + client + '</strong>: ' + g_client_message_board[client] + '</p>\n' html_content += g_html_tail index_html = open('index.html', 'w') index_html.write(html_content) index_html.close()
def generate_html() : html_content = g_html_head for client in sorted(g_client_message_board.keys()) : html_content += '<p><strong>' + client + '</strong>: ' + g_client_message_board[client] + '</p>\n' html_content += g_html_tail index_html = open('index.html', 'w') index_html.write(html_content) index_html.close()
8e5e1b423b795a8573942cfd8c3b7178278fed38 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/228/8e5e1b423b795a8573942cfd8c3b7178278fed38/server.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 67, 2620, 1435, 294, 1729, 67, 1745, 273, 314, 67, 2620, 67, 1978, 364, 1004, 316, 3115, 12, 75, 67, 2625, 67, 2150, 67, 3752, 18, 2452, 10756, 294, 1729, 67, 1745, 1011, 2368, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 67, 2620, 1435, 294, 1729, 67, 1745, 273, 314, 67, 2620, 67, 1978, 364, 1004, 316, 3115, 12, 75, 67, 2625, 67, 2150, 67, 3752, 18, 2452, 10756, 294, 1729, 67, 1745, 1011, 2368, ...
self._insert_matrix_into_matrix(lin,Z,i*e,i*e)
self._insert_matrix_into_matrix(lin, Z, i*e, i*e)
def lin_matrix(self, length=None): """ Return the Lin matrix.
62424369e932ac59629cb4d40b7e47ae2a712293 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/62424369e932ac59629cb4d40b7e47ae2a712293/sr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4739, 67, 5667, 12, 2890, 16, 769, 33, 7036, 4672, 3536, 2000, 326, 27865, 3148, 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, ...
[ 1, 1, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4739, 67, 5667, 12, 2890, 16, 769, 33, 7036, 4672, 3536, 2000, 326, 27865, 3148, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
raise
log.debug_traceback()
def initplayer(id, config): """ initialize player with id defined by config return id (or None if player is turned off) """ # only the first player has a playlist if id == "main": playlistid = "main" else: playlistid = None type = config.type if type=="off": return None elif type=="internal": import players.internal driver = config.driver if driver in ("alsa09", "alsa"): aooptions = {"dev": config.device} elif driver=="oss": aooptions = {"dsp": config.device} elif driver=="sun": aooptions = {"dev": config.device} else: aooptions = {} # add options given by user in config file for aooption in config.aooptions.split(): key, value = aooption.split("=") aooptions[key] = value try: p = players.internal.player(id, playlistid, autoplay=config.autoplay, aodevice=driver, aooptions=aooptions, bufsize=config.bufsize, crossfading=config.crossfading, crossfadingstart=config.crossfadingstart, crossfadingduration=config.crossfadingduration, ) except: raise RuntimeError("Cannot initialize %s player: type=internal, device=%s" % (id, config.device)) elif type=="xmms": import players.xmmsplayer try: p = players.xmmsplayer.player(id, playlistid, autoplay=config.autoplay, session=config.session, noqueue=config.noqueue) except: raise RuntimeError("Cannot initialize %s player: type=xmms, session=%d" % (id, config.session)) elif type=="mpg123": import players.mpg123 try: p = players.mpg123.player(id, playlistid, autoplay=config.autoplay, cmdline=config.cmdline) except: raise RuntimeError("Cannot initialize %s player: type=mpg123, cmdline=%s" % (id, config.cmdline)) elif type=="remote": import players.remote try: p = players.remote.player(id, playlistid, config.networklocation) except: raise raise RuntimeError("Cannot initialize %s player: type=remote, location=%s" % (id, config.networklocation)) p.setName("player thread (id=%s)" % id) if type != "remote" and id == "main": services.playlist.initplaylist(id, id, id) # start player only after the playlist service has been started since # playlist requests may already be issued during the player startup p.start() return id
133d22648b00f022f730821618caab3813959ed3 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/348/133d22648b00f022f730821618caab3813959ed3/player.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1208, 14872, 12, 350, 16, 642, 4672, 3536, 4046, 7291, 598, 612, 2553, 635, 642, 327, 612, 261, 280, 599, 309, 7291, 353, 21826, 3397, 13, 3536, 225, 468, 1338, 326, 1122, 7291, 711, 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, 1208, 14872, 12, 350, 16, 642, 4672, 3536, 4046, 7291, 598, 612, 2553, 635, 642, 327, 612, 261, 280, 599, 309, 7291, 353, 21826, 3397, 13, 3536, 225, 468, 1338, 326, 1122, 7291, 711, 2...
self.tags.append(self.tag_bold)
self.tags.append(parent.tag_bold)
def handle_starttag(self, tag, attrs): self.flush() if tag in ('h1', 'h2', 'h3', 'h4'): self._append(u'\n\n') self.tags.append(self.tag_big) elif tag == 'p' or tag == 'br' or tag == 'div': self.tags = [] self._append(u'\n') self.slurp_space = True elif tag == 'tr': self.tags = [] self._append(u'\n') self.slurp_space = True elif tag == 'td': self._append(u'\t') elif tag == 'i' or tag == 'em': self.tags.append(self.tag_emph) elif tag == 'b' or tag == 'strong' or tag == 'bold': self.tags.append(self.tag_bold) elif tag == 'hr': self._append(u'\n') elif tag == 'body': self.in_body = True elif tag == 'style': self.omit += 1 elif tag == 'meta' and not self.in_body: self.handle_meta(attrs) elif tag == 'img': attrs = dict(attrs) if 'alt' in attrs and attrs['alt'].strip(): self.handle_data(u'[IMAGE: ') self.handle_data(attrs['alt'].strip().upper()) self.handle_data(u']') else: self.handle_data(u'[IMAGE]')
213738e766cfb357f1771bca6ca20230e5532367 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/14744/213738e766cfb357f1771bca6ca20230e5532367/model_text.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 67, 1937, 2692, 12, 2890, 16, 1047, 16, 3422, 4672, 365, 18, 11330, 1435, 309, 1047, 316, 7707, 76, 21, 2187, 296, 76, 22, 2187, 296, 76, 23, 2187, 296, 76, 24, 11, 4672, 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, 1640, 67, 1937, 2692, 12, 2890, 16, 1047, 16, 3422, 4672, 365, 18, 11330, 1435, 309, 1047, 316, 7707, 76, 21, 2187, 296, 76, 22, 2187, 296, 76, 23, 2187, 296, 76, 24, 11, 4672, 365, ...
Warning: font directory '...test_main.py' does not exist.
Warning: font directory '...test_main...' does not exist.
>>> def setupStub(fontdir):
eb57419e6f0cb688eb32047598a81a30f930f1e2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7127/eb57419e6f0cb688eb32047598a81a30f930f1e2/test_main.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 4080, 1652, 3875, 11974, 12, 5776, 1214, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 4080, 1652, 3875, 11974, 12, 5776, 1214, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
allpkg = [ pkgtup for (hdr, pkgtup, idx) in self._search(name=name, arch=arch) ]
allpkg = [ po.pkgtup for po in self._search(name=name, arch=arch) ]
def returnNewestByNameArch(self, naTup=None, patterns=None):
32e0bb632f841936571ce3db59a89332c96ea39c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5445/32e0bb632f841936571ce3db59a89332c96ea39c/rpmsack.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 327, 1908, 395, 5911, 12269, 12, 2890, 16, 9583, 56, 416, 33, 7036, 16, 6884, 33, 7036, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 327, 1908, 395, 5911, 12269, 12, 2890, 16, 9583, 56, 416, 33, 7036, 16, 6884, 33, 7036, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
return self.parent()(self._singular_().gcd(f._singular_()))
P._singular_().set_ring() return P(self._singular_().gcd(f._singular_()))
def gcd(self, f): """ Compute the greatest common divisor of this polynomial and f.
19c1ae930c46317fcba1a822e38435a3b8cf71a9 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/19c1ae930c46317fcba1a822e38435a3b8cf71a9/multi_polynomial_element.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14876, 12, 2890, 16, 284, 4672, 3536, 8155, 326, 18825, 395, 2975, 15013, 434, 333, 16991, 471, 284, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14876, 12, 2890, 16, 284, 4672, 3536, 8155, 326, 18825, 395, 2975, 15013, 434, 333, 16991, 471, 284, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
return self.canonical_name.get(user, '-')
value = self.canonical_name.get(user, '-') if isinstance(value, str): value = value.decode(self.default_encoding) return value
def getUserCanonicalName(self, user): return self.canonical_name.get(user, '-')
4eb8964dd591fec41e0955b4e7187f0e7e52f162 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3287/4eb8964dd591fec41e0955b4e7187f0e7e52f162/plugLDAPUserFolder.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4735, 15512, 461, 12, 2890, 16, 729, 4672, 327, 365, 18, 18288, 67, 529, 18, 588, 12, 1355, 16, 4014, 13, 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, 4735, 15512, 461, 12, 2890, 16, 729, 4672, 327, 365, 18, 18288, 67, 529, 18, 588, 12, 1355, 16, 4014, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
newdtype = (name, data.dtype)
def add_column(self, name, data, unit='', null='', description='', \ format=None, dtype=None): ''' Add a column to the table
715e59fc8e55ba0d03505e01dd63a64ca0c65562 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/13233/715e59fc8e55ba0d03505e01dd63a64ca0c65562/basetable.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 2827, 12, 2890, 16, 508, 16, 501, 16, 2836, 2218, 2187, 446, 2218, 2187, 2477, 2218, 2187, 521, 740, 33, 7036, 16, 3182, 33, 7036, 4672, 9163, 1436, 279, 1057, 358, 326, 1014,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 527, 67, 2827, 12, 2890, 16, 508, 16, 501, 16, 2836, 2218, 2187, 446, 2218, 2187, 2477, 2218, 2187, 521, 740, 33, 7036, 16, 3182, 33, 7036, 4672, 9163, 1436, 279, 1057, 358, 326, 1014,...
>>> check(y.trace(0, 1));
>>> check(y.trace(0, 0));
def _numarray_tests(): ''' >>> from numpy_ext import * >>> x = new_array() >>> y = x.copy() >>> p = _printer() >>> check = p.check >>> exercise_numarray(x, p) >>> check(y.astype()); >>> check(y.argmax()); >>> check(y.argmax(0)); >>> check(y.argmin()); >>> check(y.argmin(0)); >>> check(y.argsort()); >>> check(y.argsort(1)); >>> y.byteswap(); >>> check(y); >>> check(y.diagonal()); >>> check(y.diagonal(1)); >>> check(y.diagonal(0, 1)); >>> check(y.diagonal(0, 1, 0)); >>> check(y.is_c_array()); >>> check(y.isbyteswapped()); >>> check(y.trace()); >>> check(y.trace(1)); >>> check(y.trace(0, 1)); >>> check(y.trace(0, 1, 0)); >>> check(y.new('D')); >>> y.sort(); >>> check(y); >>> check(y.type()); >>> check(y.factory((1.2, 3.4))); >>> check(y.factory((1.2, 3.4), "Double")); >>> check(y.factory((1.2, 3.4), "Double", (1,2,1))); >>> check(y.factory((1.2, 3.4), "Double", (2,1,1), false)); >>> check(y.factory((1.2, 3.4), "Double", (2,), true, true)); >>> p.results [] >>> del p ''' pass
d78836b82844e73bca9310699a0c2339eb90f5df /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9978/d78836b82844e73bca9310699a0c2339eb90f5df/numpy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2107, 1126, 67, 16341, 13332, 9163, 4080, 628, 3972, 67, 408, 1930, 380, 4080, 619, 273, 394, 67, 1126, 1435, 4080, 677, 273, 619, 18, 3530, 1435, 4080, 293, 273, 389, 30439, 1435, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2107, 1126, 67, 16341, 13332, 9163, 4080, 628, 3972, 67, 408, 1930, 380, 4080, 619, 273, 394, 67, 1126, 1435, 4080, 677, 273, 619, 18, 3530, 1435, 4080, 293, 273, 389, 30439, 1435, ...
return tuple(temp_list)
retval = tuple(temp_list)
def _copy(self, obj): """ <Purpose> Create a deep copy of an object without using the python 'copy' module. Using copy.deepcopy() doesn't work because builtins like id and hasattr aren't available when this is called. <Arguments> self obj The object to make a deep copy of. <Exceptions> TypeError If an object is encountered that we don't know how to make a copy of. NamespaceViolationError If an unexpected error occurs while copying. This isn't the greatest solution, but in general the idea is we just need to abort the wrapped function call. <Side Effects> A new reference is created to every non-simple type of object. That is, everything except objects of type str, unicode, int, etc. <Returns> The deep copy of obj. """ try: # types.InstanceType is included because the user can provide an instance # of a class of their own in the list of callback args to settimer. if _is_in(type(obj), [str, unicode, int, long, float, complex, bool, types.NoneType, types.FunctionType, types.LambdaType, types.MethodType, types.InstanceType]): return obj elif _is_in(type(obj), [tuple, list, set, frozenset]): temp_list = [] for item in obj: temp_list.append(self._copy(item)) if type(obj) is tuple: return tuple(temp_list) elif type(obj) is set: return set(temp_list) elif type(obj) is frozenset: return frozenset(temp_list) else: return temp_list elif type(obj) is dict: temp_dict = {} for key in obj: temp_dict[key] = self._copy(obj[key]) return temp_dict # We don't copy certain objects. This is because copying an emulated file # object, for example, will cause the destructor of the original one to # be invoked, which will close the actual underlying file. As the object # is wrapped and the client does not have access to it, it's safe to not # wrap it. elif isinstance(obj, (NamespaceObjectWrapper, emulfile.emulated_file, emulcomm.emulated_socket, thread.LockType, virtual_namespace.VirtualNamespace)): return obj else: raise TypeError("_copy is not implemented for objects of type " + str(type(obj))) except Exception, e: self._handle_violation("_copy failed on " + str(obj) + " with message " + str(e))
c959c9c65443dac1f3ae7a53dcecaf13328c218e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7263/c959c9c65443dac1f3ae7a53dcecaf13328c218e/namespace.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3530, 12, 2890, 16, 1081, 4672, 3536, 411, 10262, 4150, 34, 1788, 279, 4608, 1610, 434, 392, 733, 2887, 1450, 326, 5790, 296, 3530, 11, 1605, 18, 11637, 1610, 18, 16589, 3530, 1435,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3530, 12, 2890, 16, 1081, 4672, 3536, 411, 10262, 4150, 34, 1788, 279, 4608, 1610, 434, 392, 733, 2887, 1450, 326, 5790, 296, 3530, 11, 1605, 18, 11637, 1610, 18, 16589, 3530, 1435,...
parent = None for n in self.n_files.getElementsByTagName('File'): if n.attributes['RelativePath'].nodeValue == path: parent = n break
parent = self.n_files_dict.get(path)
def AddFileConfig(self, path, config, attrs=None, tools=None): """Adds a configuration to a file.
a545a414cae69fb417bf84e22f63558bc438af1a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6220/a545a414cae69fb417bf84e22f63558bc438af1a/MSVSProject.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1436, 812, 809, 12, 2890, 16, 589, 16, 642, 16, 3422, 33, 7036, 16, 8513, 33, 7036, 4672, 3536, 3655, 279, 1664, 358, 279, 585, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1436, 812, 809, 12, 2890, 16, 589, 16, 642, 16, 3422, 33, 7036, 16, 8513, 33, 7036, 4672, 3536, 3655, 279, 1664, 358, 279, 585, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, ...
else: urlopen = ClientCookie.urlopen Request = ClientCookie.Request cj = ClientCookie.LWPCookieJar() else: urlopen = urllib2.urlopen Request = urllib2.Request cj = cookielib.LWPCookieJar() if cj is not None: if os.path.isfile(COOKIEFILE): cj.load(COOKIEFILE) if cookielib is not None: opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cj)) urllib2.install_opener(opener) else: opener = ClientCookie.build_opener(ClientCookie.HTTPCookieProcessor(cj)) ClientCookie.install_opener(opener) def getcookies ():
cj = cookielib.LWPCookieJar() if cj is not None: if cookielib is not None: opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cj)) urllib2.install_opener(opener) else: opener = ClientCookie.build_opener(ClientCookie.HTTPCookieProcessor(cj)) ClientCookie.install_opener(opener)
def get_unread_messages(self): unread = [] for _feed in self.feed_collection: if _feed.new == True or _feed.updated == True: unread.append(_feed) return unread
4d647835219aecf1d3f697e499209585351b03a9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10818/4d647835219aecf1d3f697e499209585351b03a9/watch_web_greader.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 318, 896, 67, 6833, 12, 2890, 4672, 19541, 273, 5378, 364, 389, 7848, 316, 365, 18, 7848, 67, 5548, 30, 309, 389, 7848, 18, 2704, 422, 1053, 578, 389, 7848, 18, 7007, 422, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 318, 896, 67, 6833, 12, 2890, 4672, 19541, 273, 5378, 364, 389, 7848, 316, 365, 18, 7848, 67, 5548, 30, 309, 389, 7848, 18, 2704, 422, 1053, 578, 389, 7848, 18, 7007, 422, 1...
line number is only used for issuing warnings and errors.
line number is only used for issuing errors.
def _add_list(doc, bullet_token, stack, indent_stack, errors, warnings): """ Add a new list item or field to the DOM tree, with the given bullet or field tag. When necessary, create the associated list. """ # Determine what type of bullet it is. if bullet_token.contents[-1] == '-': list_type = 'ulist' elif bullet_token.contents[-1] == '.': list_type = 'olist' elif bullet_token.contents[-1] == ':': list_type = 'fieldlist' else: raise AssertionError('Bad Bullet: %r' % bullet_token.contents) # Is this a new list? newlist = 0 if stack[-1].tagName != list_type: newlist = 1 elif list_type == 'olist' and stack[-1].tagName == 'olist': old_listitem = stack[-1].childNodes[-1] old_bullet = old_listitem.getAttribute("bullet").split('.')[:-1] new_bullet = bullet_token.contents.split('.')[:-1] if (new_bullet[:-1] != old_bullet[:-1] or int(new_bullet[-1]) != int(old_bullet[-1])+1): newlist = 1 # Create the new list. if newlist: if stack[-1].tagName in ('ulist', 'olist', 'fieldlist'): stack.pop() indent_stack.pop() if (list_type != 'fieldlist' and indent_stack[-1] is not None and bullet_token.indent == indent_stack[-1]): # Ignore this error if there's text on the same line as # the comment-opening quote -- epydoc can't reliably # determine the indentation for that line. if bullet_token.startline != 1 or bullet_token.indent != 0: estr = "Lists must be indented." errors.append(StructuringError(estr, bullet_token)) if list_type == 'fieldlist': # Fieldlist should be at the top-level. for tok in stack[2:]: if tok.tagName != "section": estr = "Fields must be at the top level." errors.append(StructuringError(estr, bullet_token)) break stack[2:] = [] indent_stack[2:] = [] # Add the new list. lst = doc.createElement(list_type) stack[-1].appendChild(lst) stack.append(lst) indent_stack.append(bullet_token.indent) if list_type == 'olist': start = bullet_token.contents.split('.')[:-1] if start != '1': lst.setAttribute("start", start[-1]) # Fields are treated somewhat specially: A "fieldlist" # node is created to make the parsing simpler, but fields # are adjoined directly into the "epytext" node, not into # the "fieldlist" node. if list_type == 'fieldlist': li = doc.createElement("field") token_words = bullet_token.contents[1:-1].split(None, 1) tag_elt = doc.createElement("tag") tag_elt.appendChild(doc.createTextNode(token_words[0])) li.appendChild(tag_elt) if len(token_words) > 1: arg_elt = doc.createElement("arg") arg_elt.appendChild(doc.createTextNode(token_words[1])) li.appendChild(arg_elt) else: li = doc.createElement("li") if list_type == 'olist': li.setAttribute("bullet", bullet_token.contents) # Add the bullet. stack[-1].appendChild(li) stack.append(li) indent_stack.append(None)
36ace726c8fc4e9c1a450d16c75087d594ead7cf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11420/36ace726c8fc4e9c1a450d16c75087d594ead7cf/epytext.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1289, 67, 1098, 12, 2434, 16, 31650, 67, 2316, 16, 2110, 16, 3504, 67, 3772, 16, 1334, 16, 5599, 4672, 3536, 1436, 279, 394, 666, 761, 578, 652, 358, 326, 4703, 2151, 16, 598, 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, 389, 1289, 67, 1098, 12, 2434, 16, 31650, 67, 2316, 16, 2110, 16, 3504, 67, 3772, 16, 1334, 16, 5599, 4672, 3536, 1436, 279, 394, 666, 761, 578, 652, 358, 326, 4703, 2151, 16, 598, 3...
tuple = urlparse.urlparse(sound_file.get_uri()) path = tuple[2] generator.set_folder(os.path.dirname(path))
generator.set_folder(sound_file.get_base_path())
def generate_filename(self, sound_file): self.gconf.clear_cache() output_type = self.get_string("output-mime-type") output_suffix = { "audio/x-vorbis": ".ogg", "audio/x-flac": ".flac", "audio/x-wav": ".wav", "audio/mpeg": ".mp3", }.get(output_type, None)
00c7950d95780419f81f22b1df74d95c2287e517 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2369/00c7950d95780419f81f22b1df74d95c2287e517/soundconverter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 67, 3459, 12, 2890, 16, 14190, 67, 768, 4672, 365, 18, 75, 3923, 18, 8507, 67, 2493, 1435, 876, 67, 723, 273, 365, 18, 588, 67, 1080, 2932, 2844, 17, 11757, 17, 723, 7923, 876,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 67, 3459, 12, 2890, 16, 14190, 67, 768, 4672, 365, 18, 75, 3923, 18, 8507, 67, 2493, 1435, 876, 67, 723, 273, 365, 18, 588, 67, 1080, 2932, 2844, 17, 11757, 17, 723, 7923, 876,...
y = ((R[:-1] - R[-1])**2).sum(1).min()**0.5
y = ((R[:-nads] - R[-nads])**2).sum(1).min()**0.5
def build(): p = OptionParser(usage='%prog [options] [ads@]surf [output file]', version='%prog 0.1', description='Example ads/surf: CO@2x2Ru0001') p.add_option('-l', '--layers', type='int', default=4, help='Number of layers.') p.add_option('-v', '--vacuum', type='float', default=5.0, help='Vacuum.') p.add_option('-x', '--crystal-structure', help='Crystal structure.', choices=['sc', 'fcc', 'bcc', 'hcp']) p.add_option('-a', '--lattice-constant', type='float', help='Lattice constant in Angstrom.') p.add_option('--c_over_a', type='float', help='c/a ratio.') p.add_option('--height', type='float', help='Height of adsorbate over surface.') p.add_option('--distance', type='float', help='Distance between adsorbate and nearest surface atoms.') p.add_option('--site', help='Adsorption site.', choices=['fcc', 'hcc', 'hollow', 'bridge']) p.add_option('-M', '--magnetic-moment', type='float', default=0.0, help='Magnetic moment.') p.add_option('-G', '--gui', action='store_true', help="Pop up ASE's GUI.") opt, args = p.parse_args() if not 1 <= len(args) <= 2: p.error("incorrect number of arguments") if '@' in args[0]: ads, surf = args[0].split('@') else: ads = None surf = args[0] if surf[0].isdigit(): i1 = surf.index('x') n = int(surf[:i1]) i2 = i1 + 1 while surf[i2].isdigit(): i2 += 1 m = int(surf[i1 + 1:i2]) surf = surf[i2:] else: n = 1 m = 1 if surf[-1].isdigit(): if surf[1].isdigit(): face = surf[1:] surf = surf[0] else: face = surf[2:] surf = surf[:2] else: face = None Z = atomic_numbers[surf] state = reference_states[Z] if opt.crystal_structure: x = opt.crystal_structure else: x = state['symmetry'].lower() if opt.lattice_constant: a = opt.lattice_constant else: a = estimate_lattice_constant(surf, x, opt.c_over_a) if x == 'fcc': if face is None: face = '111' slab = fcc111(surf, (n, m, opt.layers), a, opt.vacuum) r = a / np.sqrt(2) / 2 elif x == 'bcc': if face is None: face = '110' slab = bcc110(surf, (n, m, opt.layers), a, opt.vacuum) r = a * np.sqrt(3) / 4 elif x == 'hcp': if face is None: face = '0001' slab = hcp0001(surf, (n, m, opt.layers), a, opt.c_over_a, opt.vacuum) r = a / 2 else: raise NotImplementedError magmom = opt.magnetic_moment if magmom is None: magmom = {'Ni': 0.6, 'Co': 1.2, 'Fe': 2.3}.get(surf, 0.0) slab.set_initial_magnetic_moments([magmom] * len(slab)) slab.pbc = 1 name = '%dx%d%s%s' % (n, m, surf, face) if ads: site = 'ontop' if '-' in ads: site, ads = ads.split('-') name = site + '-' + ads + '@' + name symbols = string2symbols(ads) if len(symbols) == 1: ads = Atoms(ads) else: ads = molecules(ads) add_adsorbate(slab, ads, 0.0, site) d = opt.distance if d is None: d = r + covalent_radii[ads[0].number] / 2 h = opt.height if h is None: R = slab.positions y = ((R[:-1] - R[-1])**2).sum(1).min()**0.5 print y h = (d**2 - y**2)**0.5 print h else: assert opt.distance is None slab[-1].z += h if len(args) == 2: write(args[1], slab) elif not opt.gui: write(name + '.traj', slab) if opt.gui: view(slab)
6c55c86b784d7854b677ee5f0d833a95898655bc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5735/6c55c86b784d7854b677ee5f0d833a95898655bc/adsorb.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 13332, 293, 273, 18862, 12, 9167, 28713, 14654, 225, 306, 2116, 65, 306, 17318, 36, 65, 10050, 74, 306, 2844, 585, 65, 2187, 1177, 28713, 14654, 374, 18, 21, 2187, 2477, 2218, 1090...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 13332, 293, 273, 18862, 12, 9167, 28713, 14654, 225, 306, 2116, 65, 306, 17318, 36, 65, 10050, 74, 306, 2844, 585, 65, 2187, 1177, 28713, 14654, 374, 18, 21, 2187, 2477, 2218, 1090...
sage: B = J.free_module(); B Free module of degree 6 and rank 6 over Integer Ring User basis matrix: [ 1 0 0 0 0 0] [ 0 1 0 0 0 0] [ 0 0 1 0 0 0] [10/11 6/11 7/11 1/11 0 0] [ 7/11 1/11 1/11 0 1/11 0] [ 7/11 8/11 2/11 1/11 1/11 1/11]
sage: B = J.free_module() sage: B.echelonized_basis_matrix() [ 1/11 0 0 7/11 1/11 1/11] [ 0 1/11 0 1/11 1/11 5/11] [ 0 0 1/11 5/11 4/11 10/11] [ 0 0 0 1 0 0] [ 0 0 0 0 1 0] [ 0 0 0 0 0 1]
def free_module(self): """ Return the free ZZ-module contained in the vector space associated to the ambient number field, that corresponds to this ideal.
1500189e7c96fb63b9ce3a0b2e9857b8fcf2164f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/1500189e7c96fb63b9ce3a0b2e9857b8fcf2164f/number_field_ideal.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4843, 67, 2978, 12, 2890, 4672, 3536, 2000, 326, 4843, 2285, 62, 17, 2978, 7542, 316, 326, 3806, 3476, 3627, 358, 326, 13232, 1979, 1300, 652, 16, 716, 13955, 358, 333, 23349, 18, 2, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4843, 67, 2978, 12, 2890, 4672, 3536, 2000, 326, 4843, 2285, 62, 17, 2978, 7542, 316, 326, 3806, 3476, 3627, 358, 326, 13232, 1979, 1300, 652, 16, 716, 13955, 358, 333, 23349, 18, 2, -...
if copyfromrevs.has_key(revnr): copyfromrevs[revnr] = filedict.keys()[:]
if copyfromrevs.has_key(revnr): copyfromrevs[revnr] = filedict.keys()[:]
def execute( self, dumpfilename ): """ Print file list of a dump file.
8a5482d11e10f6d000145d13fc43ddefaf704519 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/13212/8a5482d11e10f6d000145d13fc43ddefaf704519/tools.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1836, 12, 365, 16, 4657, 3459, 262, 30, 3536, 3038, 585, 666, 434, 279, 4657, 585, 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...
[ 1, 1, 1, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1836, 12, 365, 16, 4657, 3459, 262, 30, 3536, 3038, 585, 666, 434, 279, 4657, 585, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
return myHist, timestamps, query_time
return lines, myHist, timestamps, query_time
def execute_unreviewed_changes_query(db): query = """ SELECT page_id,page_title,page_latest,fp_stable, rev_len, rev_timestamp FROM page,flaggedpages, revision WHERE fp_page_id=page_id AND page_latest<>fp_stable AND page_namespace=0 AND rev_id=page_latest ORDER BY rev_timestamp; """ cursor = db.cursor() cursor.execute( 'use dewiki_p' ) start = time.time() cursor.execute( query ) end = time.time() query_time = end - start lines = cursor.fetchall() today = datetime.date.today() now = datetime.datetime.now() now_unix = time.mktime( now.timetuple() ) timestamps = [] ll = lines[0][-1] myHist = [0 for i in range(1000)] for l in lines: ll = l[-1] tuple = time.strptime(ll, "%Y%m%d%H%M%S") unix_lag = now_unix - time.mktime( tuple ) myHist[ int(unix_lag) / (3600*24) ] += 1 timestamps.append( unix_lag ) #shorten myHist a bit so that there are fewer zeros i= 0 for entry in reversed( myHist ): if entry != 0: break i += 1 myHist = myHist[ : 1000-i] return myHist, timestamps, query_time
55c2d5d3119c95218884da44fabf535e76d954c2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14207/55c2d5d3119c95218884da44fabf535e76d954c2/replag_lib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1836, 67, 318, 16041, 329, 67, 6329, 67, 2271, 12, 1966, 4672, 843, 273, 3536, 9111, 1363, 67, 350, 16, 2433, 67, 2649, 16, 2433, 67, 13550, 16, 7944, 67, 15021, 16, 5588, 67, 1897, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1836, 67, 318, 16041, 329, 67, 6329, 67, 2271, 12, 1966, 4672, 843, 273, 3536, 9111, 1363, 67, 350, 16, 2433, 67, 2649, 16, 2433, 67, 13550, 16, 7944, 67, 15021, 16, 5588, 67, 1897, ...
def GET(self, id, action_name):
def GET(self):
def GET(self, id, action_name): ''' Retrieve a map of all repository IDs to their associated synchronization schedules.
bf585b29f96375917499d850d93859e00088c4fd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10692/bf585b29f96375917499d850d93859e00088c4fd/repositories.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4978, 12, 2890, 4672, 9163, 10708, 279, 852, 434, 777, 3352, 7115, 358, 3675, 3627, 24488, 26720, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 4978, 12, 2890, 4672, 9163, 10708, 279, 852, 434, 777, 3352, 7115, 358, 3675, 3627, 24488, 26720, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
elif ' ' <= c <= '~': return c else: return repr(c)[1:-1]
class ReadlineError(exceptions.Exception): pass
def quote_char(c): if c in printable_chars_in_codepage: return c elif ' ' <= c <= '~': return c else: return repr(c)[1:-1]
fb08d6540fbf4459d2f68c94f7539db2b7709668 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12063/fb08d6540fbf4459d2f68c94f7539db2b7709668/pyreadline.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3862, 67, 3001, 12, 71, 4672, 309, 276, 316, 23474, 67, 7549, 67, 267, 67, 710, 2433, 30, 327, 276, 225, 667, 2720, 1369, 668, 12, 11855, 18, 503, 4672, 1342, 225, 2, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3862, 67, 3001, 12, 71, 4672, 309, 276, 316, 23474, 67, 7549, 67, 267, 67, 710, 2433, 30, 327, 276, 225, 667, 2720, 1369, 668, 12, 11855, 18, 503, 4672, 1342, 225, 2, -100, -100, -10...
mod = True
modObjectClasses = True if modObjectClasses: mod.append((ldap.MOD_REPLACE, 'objectClass', objectClasses)) if 'hordePrefs' not in res[1][0][1]: prefs = ['identities:' + base64.encodestring( """a:1:{i:0;a:4:{s:2:"id";s:%(fullname_len)s:"%(fullname)s";s:8:"fullname";s:%(fullname_len)s:"%(fullname)s";s:9:"from_addr";s:%(email_len)s:"%(email)s";s:16:"default_identity";s:1:"0";}}""" % {'fullname': Grimoire.Utils.encode(res[1][0][1]['cn'][0], 'utf-8'), 'fullname_len': str(len(Grimoire.Utils.encode(res[1][0][1]['cn'][0], 'utf-8'))), 'email': Grimoire.Utils.encode(res[1][0][1]['mail'][0], 'utf-8'), 'email_len': str(len(Grimoire.Utils.encode(res[1][0][1]['mail'][0], 'utf-8'))) }), 'default_identity:' + base64.encodestring('0')] mod.append((ldap.MOD_REPLACE, 'hordePrefs', prefs))
def _call(self, path): conn = self._callWithUnlockedTree( lambda: self._getpath(Grimoire.Types.TreeRoot ).directory.get.parameters(['local', 'ldap', 'admin', 'conn'], cache=True)) oupath = [ "ou="+elem for elem in path[:-1]] # Add 'ou' or 'uid' to all parts of the path baseDn = string.join(Grimoire.Utils.Reverse(['ou=People'] + oupath + ["uid="+path[-1]]) + [conn.realm], ',') args = {'base': baseDn, 'scope': ldap.SCOPE_BASE, 'filterstr': 'uid=*', 'attrlist': ['objectClass']} res = conn.result(conn.search(**args)) objectClasses = list(res[1][0][1]['objectClass']) mod = False if 'hordePerson' not in objectClasses: objectClasses.append('hordePerson') mod = True if 'top' not in objectClasses: objectClasses.append('top') mod = True if mod: conn.modify_s(baseDn, [(ldap.MOD_REPLACE, 'objectClass', objectClasses)]) else: return A(None, "Horde web interface already enabled for account") return A(None, "Horde web interface enabled for account")
56a5a5fbe720e08fd5a73ca720c6bdcb84d59253 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9377/56a5a5fbe720e08fd5a73ca720c6bdcb84d59253/horde.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1991, 12, 2890, 16, 589, 4672, 1487, 273, 365, 6315, 1991, 1190, 7087, 329, 2471, 12, 3195, 30, 365, 6315, 588, 803, 12, 20799, 381, 19847, 18, 2016, 18, 2471, 2375, 262, 18, 5149...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1991, 12, 2890, 16, 589, 4672, 1487, 273, 365, 6315, 1991, 1190, 7087, 329, 2471, 12, 3195, 30, 365, 6315, 588, 803, 12, 20799, 381, 19847, 18, 2016, 18, 2471, 2375, 262, 18, 5149...
if self.etag != self.md5:
if self.etag != '"%s"' % self.md5:
def send_file(self, fp): http_conn = self.bucket.connection.connection headers = {'Content-MD5':self.base64md5} if self.content_type: headers['Content-Type'] = self.content_type headers['Content-Length'] = self.size final_headers = boto.utils.merge_meta(headers, self.metadata); path = '/%s/%s' % (self.bucket.name, self.key) path = urllib.quote(path) self.bucket.connection.add_aws_auth_header(final_headers, 'PUT', path) http_conn.putrequest('PUT', path) for key in final_headers: http_conn.putheader(key,final_headers[key]) http_conn.endheaders() l = fp.read(4096) while len(l) > 0: http_conn.send(l) l = fp.read(4096) response = http_conn.getresponse() body = response.read() if response.status != 200: raise S3ResponseError(response.status, response.reason) self.etag = response.getheader('etag') if self.etag != self.md5: raise S3DataError('Injected data did not return correct MD5')
e3c353b5fe697e9ace6b4d5f201f89dcd1dcb70a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1098/e3c353b5fe697e9ace6b4d5f201f89dcd1dcb70a/key.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 67, 768, 12, 2890, 16, 4253, 4672, 1062, 67, 4646, 273, 365, 18, 7242, 18, 4071, 18, 4071, 1607, 273, 13666, 1350, 17, 6188, 25, 4278, 2890, 18, 1969, 1105, 1264, 25, 97, 309, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 67, 768, 12, 2890, 16, 4253, 4672, 1062, 67, 4646, 273, 365, 18, 7242, 18, 4071, 18, 4071, 1607, 273, 13666, 1350, 17, 6188, 25, 4278, 2890, 18, 1969, 1105, 1264, 25, 97, 309, ...
try: temp = open(tempname, 'w') except IOError: print '*** Cannot create temp file', `tempname` return
temp = open(tempname, 'w')
def pipethrough(input, command, output): tempname = tempfile.mktemp() try: temp = open(tempname, 'w') except IOError: print '*** Cannot create temp file', `tempname` return copyliteral(input, temp) temp.close() pipe = os.popen(command + ' <' + tempname, 'r') copybinary(pipe, output) pipe.close() os.unlink(tempname)
808d269087ff6f0fb8f7ad2a9b4359fbdf5e4f1a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/808d269087ff6f0fb8f7ad2a9b4359fbdf5e4f1a/mimetools.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8341, 546, 2642, 12, 2630, 16, 1296, 16, 876, 4672, 1906, 529, 273, 13275, 18, 24816, 5814, 1435, 1906, 273, 1696, 12, 5814, 529, 16, 296, 91, 6134, 1610, 13107, 12, 2630, 16, 1906, 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, 8341, 546, 2642, 12, 2630, 16, 1296, 16, 876, 4672, 1906, 529, 273, 13275, 18, 24816, 5814, 1435, 1906, 273, 1696, 12, 5814, 529, 16, 296, 91, 6134, 1610, 13107, 12, 2630, 16, 1906, 13...
res = Resource(self.thumb_url[0], 'http-get:*:%s:%s' % (self.mimetype,';'.join([dlna_pn]+dlna_tags)))
if self.store.proxy == False: res = Resource(self.thumb_url[0], 'http-get:*:%s:%s' % (self.mimetype,';'.join([dlna_pn]+dlna_tags))) else: res = Resource(self.url+'?attachment=thumb', 'http-get:*:%s:%s' % (self.mimetype,';'.join([dlna_pn]+dlna_tags))) self.item.attachments['thumb'] = ProxyImage(self.thumb_url[0])
def process(result): for size in result.getiterator('size'): #print size.get('label'), size.get('source') if size.get('label') == 'Original': self.original_url = (size.get('source'),size.get('width')+'x'+size.get('height')) self.url = self.original_url[0] elif size.get('label') == 'Large': self.large_url = (size.get('source'),size.get('width')+'x'+size.get('height')) self.url = self.large_url[0] elif size.get('label') == 'Medium': self.medium_url = (size.get('source'),size.get('width')+'x'+size.get('height')) elif size.get('label') == 'Small': self.small_url = (size.get('source'),size.get('width')+'x'+size.get('height')) elif size.get('label') == 'Thumbnail': self.thumb_url = (size.get('source'),size.get('width')+'x'+size.get('height'))
73c28ccf68f8b60798e81e4544ed7810a1750ecc /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11626/73c28ccf68f8b60798e81e4544ed7810a1750ecc/flickr_storage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 12, 2088, 4672, 364, 963, 316, 563, 18, 588, 9838, 2668, 1467, 11, 4672, 468, 1188, 963, 18, 588, 2668, 1925, 19899, 963, 18, 588, 2668, 3168, 6134, 309, 963, 18, 588, 2668, 1925...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 12, 2088, 4672, 364, 963, 316, 563, 18, 588, 9838, 2668, 1467, 11, 4672, 468, 1188, 963, 18, 588, 2668, 1925, 19899, 963, 18, 588, 2668, 3168, 6134, 309, 963, 18, 588, 2668, 1925...
return Query(Query.OP_PHRASE, words)
return Query(OP_PHRASE, words)
def _make_PhraseQuery(field_type, value, prefix): if field_type == 'text': # XXX TEST field = get_field('text') words = [] stemmer = Stem('en') for word in field.split(value): words.append(prefix+stemmer(word[0])) return Query(Query.OP_PHRASE, words) # A common field or a new field field = get_field(field_type) words = [] for word in field.split(value): words.append(prefix+word[0]) return Query(Query.OP_PHRASE, words)
85023dcdde8b7afb3f3ab2553b9e226ae1122e12 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12681/85023dcdde8b7afb3f3ab2553b9e226ae1122e12/catalog.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 6540, 67, 12812, 1138, 12, 1518, 67, 723, 16, 460, 16, 1633, 4672, 309, 652, 67, 723, 422, 296, 955, 4278, 468, 11329, 22130, 652, 273, 336, 67, 1518, 2668, 955, 6134, 4511, 273, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 6540, 67, 12812, 1138, 12, 1518, 67, 723, 16, 460, 16, 1633, 4672, 309, 652, 67, 723, 422, 296, 955, 4278, 468, 11329, 22130, 652, 273, 336, 67, 1518, 2668, 955, 6134, 4511, 273, ...
SELECT depId, depNum, RemovedTroveIds.troveId, RemovedTroveIds.nodeId, provInstanceId
SELECT depId, depNum, reqInstanceId, Required.nodeId, provInstanceId, Provided.nodeId
def _orderComponents(compGraph):
b0aa60d90d28202f26527f76ea371821df6d3309 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8747/b0aa60d90d28202f26527f76ea371821df6d3309/deptable.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1019, 7171, 12, 2919, 4137, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1019, 7171, 12, 2919, 4137, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
return pickle.loads(str(value)) except Exception: return value def get_db_prep_save(self, value): """get_db_prep_save""" if value is not None and not isinstance(value, PickledObject): value = PickledObject(pickle.dumps(value))
value = dbsafe_decode(value, self.compress) except: if isinstance(value, PickledObject): raise
def to_python(self, value): """Convert the database value to a python value.""" if isinstance(value, PickledObject): # If the value is a definite pickle; and an error is # raised in de-pickling it should be allowed to propogate. return pickle.loads(str(value)) else: try: return pickle.loads(str(value)) except Exception: # If an error was raised, just return the plain value return value
cb4d9f5f4dcec07525395cf3c5e8dbf3caadb214 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2024/cb4d9f5f4dcec07525395cf3c5e8dbf3caadb214/fields.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 358, 67, 8103, 12, 2890, 16, 460, 4672, 3536, 2723, 326, 2063, 460, 358, 279, 5790, 460, 12123, 309, 1549, 12, 1132, 16, 23038, 1259, 921, 4672, 468, 971, 326, 460, 353, 279, 2217, 113...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 358, 67, 8103, 12, 2890, 16, 460, 4672, 3536, 2723, 326, 2063, 460, 358, 279, 5790, 460, 12123, 309, 1549, 12, 1132, 16, 23038, 1259, 921, 4672, 468, 971, 326, 460, 353, 279, 2217, 113...
def changed_this_week(self): """Returns 3 lists of new/modified/obsolete PDB entries for weekly updates. Returns all three lists (new, modified, obsolete) pdb codes for this week. Uses get_recent_status() and get_list() for that. """ urls = self.get_recent_filenames() tw = [] tw.append(self.get_list(urls[0])) tw.append(self.get_list(urls[1])) tw.append(self.get_list(urls[2])) return tw def retrieve_pdb_file(self,pdb_code, compression='.Z', uncompress="gunzip", dir=None, exist=0):
def retrieve_pdb_file(self,pdb_code, obsolete=0, compression='.Z', uncompress="gunzip", pdir=None):
def changed_this_week(self): """Returns 3 lists of new/modified/obsolete PDB entries for weekly updates. Returns all three lists (new, modified, obsolete) pdb codes for this week. Uses get_recent_status() and get_list() for that. """ urls = self.get_recent_filenames() tw = [] tw.append(self.get_list(urls[0])) tw.append(self.get_list(urls[1])) tw.append(self.get_list(urls[2])) return tw
09feacabd5a3d2f3244213b17b5431745b1fa01c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7167/09feacabd5a3d2f3244213b17b5431745b1fa01c/PDBList.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3550, 67, 2211, 67, 10741, 12, 2890, 4672, 3536, 1356, 890, 6035, 434, 394, 19, 7342, 19, 10992, 19513, 21601, 3222, 364, 4860, 715, 4533, 18, 225, 2860, 777, 8925, 6035, 261, 2704, 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, 3550, 67, 2211, 67, 10741, 12, 2890, 4672, 3536, 1356, 890, 6035, 434, 394, 19, 7342, 19, 10992, 19513, 21601, 3222, 364, 4860, 715, 4533, 18, 225, 2860, 777, 8925, 6035, 261, 2704, 16, ...
self._save_log(log_data)
self._save_log(log_data, portal)
def update(self, portal, do_dry_run): self._setup_logger()
71782f3151ecace52cfdd4398afd21107bffd097 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3287/71782f3151ecace52cfdd4398afd21107bffd097/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 12, 2890, 16, 11899, 16, 741, 67, 25011, 67, 2681, 4672, 365, 6315, 8401, 67, 4901, 1435, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 1089, 12, 2890, 16, 11899, 16, 741, 67, 25011, 67, 2681, 4672, 365, 6315, 8401, 67, 4901, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
else:
elif self.kernel_srcdir and self.modules_build_succeed:
def __load_modules(self): if self.kmod_srcdir: load_kvm_modules(module_dir=self.kmod_srcdir, extra_modules=self.extra_modules) else: load_kvm_modules(module_dir=self.userspace_srcdir, extra_modules=self.extra_modules)
af1538fa0992fc47a0e974597fc4ce7c48f4d4a8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12268/af1538fa0992fc47a0e974597fc4ce7c48f4d4a8/build.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 945, 67, 6400, 12, 2890, 4672, 309, 365, 18, 79, 1711, 67, 4816, 1214, 30, 1262, 67, 79, 3489, 67, 6400, 12, 2978, 67, 1214, 33, 2890, 18, 79, 1711, 67, 4816, 1214, 16, 2870, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 945, 67, 6400, 12, 2890, 4672, 309, 365, 18, 79, 1711, 67, 4816, 1214, 30, 1262, 67, 79, 3489, 67, 6400, 12, 2978, 67, 1214, 33, 2890, 18, 79, 1711, 67, 4816, 1214, 16, 2870, ...
connect.connect(o['host'], int(o['port']), o, vhk, uao) util.spinWhile(lambda: not p.done)
d = connect.connect(o['host'], int(o['port']), o, vhk, uao) d.addErrback(lambda f: unittest.fail('Failure connecting to test server: %s' % f)) util.spinWhile(lambda: not p.done, timeout=10)
def _(host, *args): o['host'] = host
25136b6da0a4cc78083f453648d9d96e9dd1c1be /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/25136b6da0a4cc78083f453648d9d96e9dd1c1be/test_conch.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 12, 2564, 16, 380, 1968, 4672, 320, 3292, 2564, 3546, 273, 1479, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 12, 2564, 16, 380, 1968, 4672, 320, 3292, 2564, 3546, 273, 1479, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
if (f.tell() != pointer):
if f.tell() != pointer:
def read_full_index_item(self, pointer): if (pointer >= self.header.articles_offset): print 'Warning: attempt to read word from illegal position in dict file' return None f = self.file if (f.tell() != pointer): f.seek(pointer) next_word = read_short(f.read(2)) prev_word = read_short(f.read(2)) article_pointer = read_int(f.read(4)) if next_word != 0: word_length = next_word - 8 word = f.read(word_length) else: word = None return FullIndexItem(next_word, prev_word, word, article_pointer)
f1e8b77781e42ed464cca102c7f27e2045fe1a73 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/14305/f1e8b77781e42ed464cca102c7f27e2045fe1a73/sdict.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 67, 2854, 67, 1615, 67, 1726, 12, 2890, 16, 4407, 4672, 309, 261, 10437, 1545, 365, 18, 3374, 18, 16462, 67, 3348, 4672, 1172, 296, 6210, 30, 4395, 358, 855, 2076, 628, 16720, 175...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 67, 2854, 67, 1615, 67, 1726, 12, 2890, 16, 4407, 4672, 309, 261, 10437, 1545, 365, 18, 3374, 18, 16462, 67, 3348, 4672, 1172, 296, 6210, 30, 4395, 358, 855, 2076, 628, 16720, 175...
elif attr.name == 'background': if os.path.isfile(value): self.background = value else: msg = "WARNING: background image not found: %s\n" % value sys.stderr.write(msg) elif attr.name == 'numbered': self.numbered = value
def setAttributes(self, attrs): for attr in attrs: value = re.sub('^"?(.*?)"?$', '\\1', attr.value) if attr.name == 'label': self.label = value elif attr.name == 'color': self.color = value elif attr.name == 'style': style = value.lower() if style in ('solid', 'dotted', 'dashed'): self.style = style else: msg = "WARNING: unknown edge style: %s\n" % style sys.stderr.write(msg) elif attr.name == 'width': self.width = int(value) elif attr.name == 'height': self.height = int(value) elif attr.name == 'background': if os.path.isfile(value): self.background = value else: msg = "WARNING: background image not found: %s\n" % value sys.stderr.write(msg) elif attr.name == 'numbered': self.numbered = value else: msg = "Unknown node attribute: %s.%s" % (self.id, attr.name) raise AttributeError(msg)
f8c7124938b5926e3d42de3bf34ffa32d74fe30b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/81/f8c7124938b5926e3d42de3bf34ffa32d74fe30b/blockdiag.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 21175, 12, 2890, 16, 3422, 4672, 364, 1604, 316, 3422, 30, 460, 273, 283, 18, 1717, 2668, 66, 6, 35, 7444, 35, 2225, 35, 8, 2187, 3718, 21, 2187, 1604, 18, 1132, 13, 309, 1604, 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, 21175, 12, 2890, 16, 3422, 4672, 364, 1604, 316, 3422, 30, 460, 273, 283, 18, 1717, 2668, 66, 6, 35, 7444, 35, 2225, 35, 8, 2187, 3718, 21, 2187, 1604, 18, 1132, 13, 309, 1604, 18, ...
for z3iface in z3parentnames: print >> outfile, utils.indent("zope.interface.implements(%s)" % z3iface, 1)
concatstring = ', '.join(z3reparentnames) print >> outfile, utils.indent("zope.interface.implements(%s)" % concatstring, 1)
def generateImplements(self,element,parentnames): outfile = StringIO() # "__implements__" line -> handle realization parents reparents = element.getRealizationParents() reparentnames = [p.getName() for p in reparents if not p.hasStereoType('z3')] z3parentnames = [p.getName() for p in reparents if p.hasStereoType('z3')] if reparents:
27bf1936123b4d3c1da2de6b495fe444c073aafb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11941/27bf1936123b4d3c1da2de6b495fe444c073aafb/BaseGenerator.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 17516, 12, 2890, 16, 2956, 16, 2938, 1973, 4672, 8756, 273, 15777, 1435, 468, 10425, 17061, 14437, 980, 317, 1640, 2863, 1588, 6298, 2071, 817, 87, 273, 930, 18, 588, 6955, 1588, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 17516, 12, 2890, 16, 2956, 16, 2938, 1973, 4672, 8756, 273, 15777, 1435, 468, 10425, 17061, 14437, 980, 317, 1640, 2863, 1588, 6298, 2071, 817, 87, 273, 930, 18, 588, 6955, 1588, 1...
this = apply(_quickfix.new_AdjustmentType, args)
this = _quickfix.new_AdjustmentType(*args)
def __init__(self, *args): this = apply(_quickfix.new_AdjustmentType, 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, 19985, 559, 30857, 1968, 13, 775, 30, 365, 18, 2211, 18, 6923, 12, 2211, 13, 1335, 30, 365, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 380, 1968, 4672, 333, 273, 389, 19525, 904, 18, 2704, 67, 19985, 559, 30857, 1968, 13, 775, 30, 365, 18, 2211, 18, 6923, 12, 2211, 13, 1335, 30, 365, 1...
dirname = os.path.dirname(path)
dirname = urllib.unquote( os.path.dirname(path) )
def new_decoded_pad(self, decoder, pad, is_last): if self.added_pad_already: return if "audio" not in pad.get_caps()[0].get_name(): return
37326ea493a249727d3240d6ab4a0da5f158cb85 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2369/37326ea493a249727d3240d6ab4a0da5f158cb85/soundconverter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 394, 67, 26646, 67, 6982, 12, 2890, 16, 8320, 16, 4627, 16, 353, 67, 2722, 4672, 309, 365, 18, 9665, 67, 6982, 67, 17583, 30, 327, 309, 315, 11509, 6, 486, 316, 4627, 18, 588, 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, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 394, 67, 26646, 67, 6982, 12, 2890, 16, 8320, 16, 4627, 16, 353, 67, 2722, 4672, 309, 365, 18, 9665, 67, 6982, 67, 17583, 30, 327, 309, 315, 11509, 6, 486, 316, 4627, 18, 588, 67, ...
return http.Response(stream="saved")
return HTMLResponse(stream="saved")
def render(self, ctx): self.worksheet.save_snapshot(self.username) self.worksheet.quit() return http.Response(stream="saved")
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, 365, 18, 1252, 8118, 18, 5688, 67, 11171, 12, 2890, 18, 5053, 13, 365, 18, 1252, 8118, 18, 27176, 1435, 327, 1062, 18, 1064, 12, 3256, 1546, 14077, 7923...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1743, 12, 2890, 16, 1103, 4672, 365, 18, 1252, 8118, 18, 5688, 67, 11171, 12, 2890, 18, 5053, 13, 365, 18, 1252, 8118, 18, 27176, 1435, 327, 1062, 18, 1064, 12, 3256, 1546, 14077, 7923...
LogSuiteSerializer.start_suite(self, suite)
LogSerializer.start_suite(self, suite)
def start_suite(self, suite): suite._init_suite(NonResolvingVariableScopes()) LogSuiteSerializer.start_suite(self, suite)
f33f03560eaa42dec6e8352d9e273211d12d6c41 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7408/f33f03560eaa42dec6e8352d9e273211d12d6c41/testdoc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 787, 67, 30676, 12, 2890, 16, 11371, 4672, 11371, 6315, 2738, 67, 30676, 12, 3989, 2903, 6282, 3092, 12668, 10756, 1827, 13587, 6306, 18, 1937, 67, 30676, 12, 2890, 16, 11371, 13, 2, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 787, 67, 30676, 12, 2890, 16, 11371, 4672, 11371, 6315, 2738, 67, 30676, 12, 3989, 2903, 6282, 3092, 12668, 10756, 1827, 13587, 6306, 18, 1937, 67, 30676, 12, 2890, 16, 11371, 13, 2, -10...
self.drawroundbox(x0 + hskip + r.x, y0 + vskip + r.y, r.width, r.height, r)
self.drawroundbox(x0 + r.x, y0 + r.y, r.width, r.height, r)
def update_content(self): """ update the listing area """
89d3a48576954c634545f1e0e240fa334f6245a2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/89d3a48576954c634545f1e0e240fa334f6245a2/listing_area.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 67, 1745, 12, 2890, 4672, 3536, 1089, 326, 11591, 5091, 3536, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 1089, 67, 1745, 12, 2890, 4672, 3536, 1089, 326, 11591, 5091, 3536, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
if system: return '' else: return '''
return '' if system else \ '''
def permissive(perm, system):
b115301aa7a3230e2ebf55808ae6e08d4c08f2cc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/b115301aa7a3230e2ebf55808ae6e08d4c08f2cc/groups.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 293, 1840, 688, 12, 12160, 16, 2619, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 293, 1840, 688, 12, 12160, 16, 2619, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
self._setup_for_raycast()
self._setup_for_fixed_point()
def config_to_logic(self): self._volume_property.SetInterpolationType(self._config.interpolation)
610ce2b4deca0cd38615e52e616691b347625099 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4494/610ce2b4deca0cd38615e52e616691b347625099/VolumeRender.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 642, 67, 869, 67, 28339, 12, 2890, 4672, 365, 6315, 9491, 67, 4468, 18, 694, 31516, 559, 12, 2890, 6315, 1425, 18, 18676, 367, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 642, 67, 869, 67, 28339, 12, 2890, 4672, 365, 6315, 9491, 67, 4468, 18, 694, 31516, 559, 12, 2890, 6315, 1425, 18, 18676, 367, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -1...
exported to <pre>%s</pre>." % (id,f),
exported to <pre>%s</pre>." % (id, f),
def manage_exportObject(self,id=None,download=None,RESPONSE=None): """Exports an object to a file and returns that file.""" if id is None: o=self else: o=getattr(self,id) if download: f=StringIO() o._p_jar.export_file(o,f) RESPONSE.setHeader('Content-type','application/data') RESPONSE.setHeader('Content-Disposition', 'inline;filename=%s.bbe' % id) return f.getvalue() f=Globals.data_dir+'/%s.bbe' % id o._p_jar.export_file(o,f) if RESPONSE is not None: return MessageDialog( title="Object exported", message="<EM>%s</EM> sucessfully\ exported to <pre>%s</pre>." % (id,f), action="manage_main")
b94b21d273bd0349b78f6576694ee29f9744529a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/b94b21d273bd0349b78f6576694ee29f9744529a/Folder.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10680, 67, 6530, 921, 12, 2890, 16, 350, 33, 7036, 16, 7813, 33, 7036, 16, 14508, 33, 7036, 4672, 3536, 15352, 392, 733, 358, 279, 585, 471, 1135, 716, 585, 12123, 309, 612, 353, 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, 10680, 67, 6530, 921, 12, 2890, 16, 350, 33, 7036, 16, 7813, 33, 7036, 16, 14508, 33, 7036, 4672, 3536, 15352, 392, 733, 358, 279, 585, 471, 1135, 716, 585, 12123, 309, 612, 353, 599, ...
parser.add_option("-A", "--aspect-ratio", action="store", dest="aspect_ratio", default=DEFAULT_ASPECT, help="Set a non-default aspect ratio since gtk.Socket is too brain-damaged to listen to MPlayer.")
parser.add_option("-A", "--aspect-ratio", action="store", dest="aspect_ratio", default=DEFAULT_ASPECT, metavar="RATIO", help="Set RATIO as the aspect ratio. (Default is %s) Autodetection is currently broken since gtk.Socket is too brain-damaged to listen to MPlayer." % DEFAULT_ASPECT)
def play(entries, playAll=False, aspect=DEFAULT_ASPECT): if isinstance(entries, basestring): entries = [entries] playlist = [] for entry in entries: if os.path.isdir(entry): if playAll: playlist += [os.path.join(entry, x) for x in os.listdir(entry)] else: playlist += get_unplayed_contents(entry) else: playlist.append(entry) if playlist: pl = Player(playlist, aspect=aspect) gtk.main() else: gtk.MessageDialog(type=gtk.MESSAGE_ERROR, buttons=gtk.BUTTONS_OK, message_format="No un-watched episodes found.").run()
387301779c916b3e1e4f315415440597c4aaf926 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/13137/387301779c916b3e1e4f315415440597c4aaf926/main.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6599, 12, 8219, 16, 6599, 1595, 33, 8381, 16, 9648, 33, 5280, 67, 3033, 1423, 1268, 4672, 309, 1549, 12, 8219, 16, 10699, 4672, 3222, 273, 306, 8219, 65, 225, 16428, 273, 5378, 364, 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, 6599, 12, 8219, 16, 6599, 1595, 33, 8381, 16, 9648, 33, 5280, 67, 3033, 1423, 1268, 4672, 309, 1549, 12, 8219, 16, 10699, 4672, 3222, 273, 306, 8219, 65, 225, 16428, 273, 5378, 364, 12...
args.append('--keep-going')
margs.append('--keep-going')
def make(ctxt, target=None, file_=None, keep_going=False): """Execute a Makefile target. :param ctxt: the build context :type ctxt: `Context` :param file\_: name of the Makefile :param keep_going: whether make should keep going when errors are encountered """ executable = ctxt.config.get_filepath('make.path') or 'make' args = ['--directory', ctxt.basedir] if file_: args += ['--file', ctxt.resolve(file_)] if keep_going: args.append('--keep-going') if target: args.append(target) from bitten.build import shtools returncode = shtools.execute(ctxt, executable=executable, args=args) if returncode != 0: ctxt.error('make failed (%s)' % returncode)
a8229bf1cb2f568adce3c329c24ddc8f0387f30e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4547/a8229bf1cb2f568adce3c329c24ddc8f0387f30e/ctools.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 12, 20364, 16, 1018, 33, 7036, 16, 585, 67, 33, 7036, 16, 3455, 67, 8162, 33, 8381, 4672, 3536, 5289, 279, 4344, 768, 1018, 18, 225, 294, 891, 14286, 30, 326, 1361, 819, 294, 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, 1221, 12, 20364, 16, 1018, 33, 7036, 16, 585, 67, 33, 7036, 16, 3455, 67, 8162, 33, 8381, 4672, 3536, 5289, 279, 4344, 768, 1018, 18, 225, 294, 891, 14286, 30, 326, 1361, 819, 294, 7...
iformat = __import__('totalopenstation.models.%s' % module,
imodel = __import__('totalopenstation.models.%s' % module,
def connect_action(self, event):
e13bcd56a59ec96602d1ae56413a2e14db8c7392 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5205/e13bcd56a59ec96602d1ae56413a2e14db8c7392/totalopenstation-gui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3077, 67, 1128, 12, 2890, 16, 871, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3077, 67, 1128, 12, 2890, 16, 871, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
except sqlite.Error, e:
except sqlite3.Error, e:
def main(): pygame.init() try: w = 640 h = 480 screen = pygame.display.set_mode((w, h)) font = pygame.font.SysFont('Arial Black', 20) pygame.mouse.set_visible(False) clock = pygame.time.Clock() ch = CollisionHandler() TIMEEVENT = USEREVENT + 1 pygame.time.set_timer(TIMEEVENT, 15) # Load our balls balls = [ Ball(screen, (70, 15), (random.randint(1,3),random.randint(1,3)) ), Ball(screen, (200, 60), (random.randint(1,3),random.randint(1,3)) ), Ball(screen, (random.randint(50, 200), 75), (3,2) ), Ball(screen, (50, 45), (3,2) ), Ball(screen, (100, 200), (1,3) ) ] for ball in balls: ch.addBall(ball) # Insert walls walls = [ Wall( screen, (0,30), (10, screen.get_height()) ), Wall( screen, (screen.get_width()-10,30), (10, screen.get_height()) ), Wall( screen, (0,30), (screen.get_width(), 10) ) ] for wall in walls: ch.addObject(wall) paddle = Paddle(screen) ch.addObject(paddle) # Game variables run = True gameover = False viewHighScore = False; lifes = len(balls)-1 time = 0 name = "Johan" score = 0 # Sqllite init connection = sqlite.connect('test.db') cursor = connection.cursor() try: cursor.execute('CREATE TABLE highscore (id INTEGER PRIMARY KEY, name VARCHAR(50), score INTEGER)') except sqlite.Error, e: print "Create table:", e.args[0] # Load scoreboard scoreBoard = font.render("Life: " + str(lifes) + " Score: ", True, (255, 0, 0)) while not gameover: # Check for quits for event in pygame.event.get(): if event.type == pygame.QUIT: gameover = True cursor.close() connection.commit() connection.close() if event.type == TIMEEVENT: time += 1 # Update positions for balls for ball in balls: if ball.update(): lifes -= 1 # Update positions for paddle paddle.update() # Update collision handler if ch.update(): score += 1 # Draw background screen.fill((0, 0, 0)) # Draw walls for wall in walls: wall.draw() # Draw paddle paddle.draw() # Draw balls for ball in balls: ball.draw() #Draw scoreboard if run: scoreBoard = font.render("Life: " + str(lifes) + " Score: " + str(score), True, (255, 0, 0)) pygame.draw.rect(screen, (0, 255, 255), (0, 0, time, 30)) screen.blit(scoreBoard, (0, 5)) if time >= screen.get_width(): time = 0; balls.append(ch.addBall(Ball(screen, (random.randint(50, 100), random.randint(100, 200)), (random.randint(1,3),random.randint(1,3)) ))) if lifes <= 0 and run: pygame.time.set_timer(TIMEEVENT, 0) finalScore = score viewHighScore = True run = False name = inputbox.ask(screen, "Your name ") try: cursor.execute("SELECT id FROM highscore WHERE name = ?", (name,)) data=cursor.fetchone() if data is None: print('There is no component named %s'%name) cursor.execute('INSERT INTO highscore VALUES (null, ?, ?)', (name, score)) else: print('Component %s found with rowid %s'%(name,data[0])) except sqlite.Error, e: print "Ooops:", e.args[0] cursor.execute("UPDATE highscore SET score='"+str(finalScore)+"' WHERE name='"+name+"'") cursor.execute('SELECT * FROM highscore ORDER BY score DESC LIMIT 0,10') i = 1 player = [] for row in cursor: #Loopa genom player.append(font.render(str(i) + '. ' + str(row[1]) + ' - ' + str(row[2]), True, (255, 0, 0))) i += 1 print answer scoreBoard = font.render("Life: 0 Score: " + str(finalScore), True, (255, 0, 0)) if viewHighScore: i = 30 gameOverImg = font.render("Game Over", True, (255, 0, 0)) highScoreImg = font.render(" Name Score", True, (255, 0, 0)) for row in player: screen.blit(row, (screen.get_width()/2-100, screen.get_height()/2+50+i)) i += 30 screen.blit(gameOverImg, (screen.get_width()/2, screen.get_height()/2)) screen.blit(highScoreImg, (screen.get_width()/2-100, screen.get_height()/2+50)) # Update screen pygame.display.flip() clock.tick(60) finally: pygame.quit()
8e316c300237ca692a9bcec8a0f1e883f02b7c0f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13880/8e316c300237ca692a9bcec8a0f1e883f02b7c0f/wgb.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 2395, 13957, 18, 2738, 1435, 775, 30, 341, 273, 5178, 20, 366, 273, 1059, 3672, 225, 5518, 273, 2395, 13957, 18, 5417, 18, 542, 67, 3188, 12443, 91, 16, 366, 3719, 3512, 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, 2774, 13332, 2395, 13957, 18, 2738, 1435, 775, 30, 341, 273, 5178, 20, 366, 273, 1059, 3672, 225, 5518, 273, 2395, 13957, 18, 5417, 18, 542, 67, 3188, 12443, 91, 16, 366, 3719, 3512, 2...
moodle_xml_str = elixer.convert(course)
moodle_xml_str = elixer.convert(course).encode('utf-8')
def create_moodle_zip(blackboard_zip_fname, out_name): try: shutil.rmtree('elixer_tmp') shutil.rmtree('course_files') except OSError: pass course = Course(blackboard_zip_fname) moodle_zip = zipfile.ZipFile(out_name, 'w') moodle_xml_str = elixer.convert(course) moodle_zip.writestr('moodle.xml', moodle_xml_str) err_fh = open(os.path.devnull, 'w') command = ('unzip %s -d elixer_tmp' % blackboard_zip_fname).split(' ') subprocess.Popen(command, stdout=err_fh, stderr=err_fh).communicate() skip_parent = False for root, dirs, files in os.walk('elixer_tmp'): if not skip_parent: skip_parent = True continue for fname in files: res_num = root.split(os.sep, 1)[1].split(os.sep)[0].replace('res', '') fixed_filename = elixer.fix_filename(fname, res_num) blackboard_filename = os.path.join(root, fname) moodle_filename = os.path.join('course_files', fixed_filename) moodle_zip.write(blackboard_filename, moodle_filename) shutil.rmtree('elixer_tmp') moodle_zip.close()
5d7bba3f9da5602afaac91a41be90f54e9d7c23b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12927/5d7bba3f9da5602afaac91a41be90f54e9d7c23b/bb9_course.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 14831, 67, 4450, 12, 11223, 3752, 67, 4450, 67, 12749, 16, 596, 67, 529, 4672, 775, 30, 11060, 18, 86, 17371, 2668, 26342, 264, 67, 5645, 6134, 11060, 18, 86, 17371, 2668, 556...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 14831, 67, 4450, 12, 11223, 3752, 67, 4450, 67, 12749, 16, 596, 67, 529, 4672, 775, 30, 11060, 18, 86, 17371, 2668, 26342, 264, 67, 5645, 6134, 11060, 18, 86, 17371, 2668, 556...
def __init__(self, host='', port=None, **x509):
def __init__(self, host='', port=None, key_file=None, cert_file=None, strict=None):
def __init__(self, host='', port=None, **x509): # provide a default host, pass the X509 cert info
d46aa37d35811a37397104f02074c8a44e7dbec1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/d46aa37d35811a37397104f02074c8a44e7dbec1/httplib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1479, 2218, 2187, 1756, 33, 7036, 16, 498, 67, 768, 33, 7036, 16, 3320, 67, 768, 33, 7036, 16, 5490, 33, 7036, 4672, 468, 5615, 279, 805, 1479, 16, 134...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1479, 2218, 2187, 1756, 33, 7036, 16, 498, 67, 768, 33, 7036, 16, 3320, 67, 768, 33, 7036, 16, 5490, 33, 7036, 4672, 468, 5615, 279, 805, 1479, 16, 134...
return "<Fault %s: %s>" % (self.faultcode, self.faultstring)
if self.detail: return "<Fault %s: %s: %s>" % (self.faultcode, self.faultstring, self.detail) else: return "<Fault %s: %s>" % (self.faultcode, self.faultstring)
def __repr__(self): return "<Fault %s: %s>" % (self.faultcode, self.faultstring)
09f854f9a4ae0928fd313f5d59a64d4315cc7e01 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/09f854f9a4ae0928fd313f5d59a64d4315cc7e01/SOAP.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 12715, 972, 12, 2890, 4672, 327, 3532, 7083, 738, 87, 30, 738, 87, 2984, 738, 261, 2890, 18, 643, 710, 16, 365, 18, 643, 1080, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 12715, 972, 12, 2890, 4672, 327, 3532, 7083, 738, 87, 30, 738, 87, 2984, 738, 261, 2890, 18, 643, 710, 16, 365, 18, 643, 1080, 13, 2, -100, -100, -100, -100, -100, -100, -100, ...
self.entries[-1]['links'].append(attrsD)
self.entries[-1]['links'].append(FeedParserDict(attrsD))
def _start_link(self, attrsD): attrsD.setdefault('rel', 'alternate') attrsD.setdefault('type', 'text/html') if attrsD.has_key('href'): attrsD['href'] = self.resolveURI(attrsD['href']) expectingText = self.infeed or self.inentry if self.inentry: self.entries[-1].setdefault('links', []) self.entries[-1]['links'].append(attrsD) elif self.infeed: self.feeddata.setdefault('links', []) self.feeddata['links'].append(attrsD) if attrsD.has_key('href'): expectingText = 0 if attrsD.get('type', '') in self.html_types: if self.inentry: self.entries[-1]['link'] = attrsD['href'] elif self.infeed: self.feeddata['link'] = attrsD['href'] else: self.push('link', expectingText)
972cadc09ab0b2fdf411f1a0962eada0cba30b10 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/972cadc09ab0b2fdf411f1a0962eada0cba30b10/feedparser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1937, 67, 1232, 12, 2890, 16, 3422, 40, 4672, 3422, 40, 18, 542, 1886, 2668, 2878, 2187, 296, 16025, 340, 6134, 3422, 40, 18, 542, 1886, 2668, 723, 2187, 296, 955, 19, 2620, 6134,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1937, 67, 1232, 12, 2890, 16, 3422, 40, 4672, 3422, 40, 18, 542, 1886, 2668, 2878, 2187, 296, 16025, 340, 6134, 3422, 40, 18, 542, 1886, 2668, 723, 2187, 296, 955, 19, 2620, 6134,...
assert type(qname) is dns.name.Name, 'qname is not Name obj' assert type(qclass) is IntType, 'qclass is not Int obj' assert type(qtype) is IntType, 'qtype is not Int obj'
def handle_query(self, msg): """Process a query message."""
2b2b5839b23008a8980ab8eeeca606297c51c416 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4157/2b2b5839b23008a8980ab8eeeca606297c51c416/route53d.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 67, 2271, 12, 2890, 16, 1234, 4672, 3536, 2227, 279, 843, 883, 12123, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 67, 2271, 12, 2890, 16, 1234, 4672, 3536, 2227, 279, 843, 883, 12123, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
facet_params = settings.SEARCH_FACET_PARAMS hl_params = settings.SEARCH_HL_PARAMS
facet_params = settings.SEARCH_FACET_PARAMS[:] hl_params = settings.SEARCH_HL_PARAMS[:]
def clean(self, *args, **kwargs): """ Expects a list of tuples like: [('q', 'model'), ('sort', 'date desc'), ('facet.field', 'model')] """ params = [] if args: if isinstance(args[0], dict): params = [(key, value) for key, value in args[0].items() if value] else: params = list(args) params.extend(kwargs.items()) if not params: return None facet_params = settings.SEARCH_FACET_PARAMS hl_params = settings.SEARCH_HL_PARAMS for key, value in params: if key.startswith('facet'): facet_params.append((key, value),) elif key.startswith('hl'): hl_params.append((key, value),) elif key == 'fq': self.fq.append(value) else: try: v = self[key] if isinstance(v, list): self[key].append(value) else: self[key] = value except KeyError: self.q.append('%s:%s' % (key, value)) self.facet = Facet(facet_params, instance='facet') self.hl = Highlight(hl_params, instance='hl')
1d154f0f039a560f386638c4a29c21e31c50b04f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3331/1d154f0f039a560f386638c4a29c21e31c50b04f/query.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2721, 12, 2890, 16, 380, 1968, 16, 2826, 4333, 4672, 3536, 15510, 87, 279, 666, 434, 10384, 3007, 30, 306, 2668, 85, 2187, 296, 2284, 19899, 7707, 3804, 2187, 296, 712, 3044, 19899, 7707...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 12, 2890, 16, 380, 1968, 16, 2826, 4333, 4672, 3536, 15510, 87, 279, 666, 434, 10384, 3007, 30, 306, 2668, 85, 2187, 296, 2284, 19899, 7707, 3804, 2187, 296, 712, 3044, 19899, 7707...
print e
def _try_inline_malloc(info): """Try to inline the mallocs creation and manipulation of the Variables in the given LifeTime.""" # the values must be only ever created by a "malloc" lltypes = {} for cp in info.creationpoints: if cp[0] != "op": return False op = cp[2] if op.opname != "malloc": return False lltypes[op.result.concretetype] = True # there must be a single largest malloced GcStruct; # all variables can point to it or to initial substructures if len(lltypes) != 1: return False STRUCT = lltypes.keys()[0].TO assert isinstance(STRUCT, lltype.GcStruct) # must be only ever accessed via getfield/setfield or touched by keepalive for up in info.usepoints: if up[0] != "op": return False kind, node, op, index = up if (op.opname, index) in [("getfield", 0), ("setfield", 0), ("keepalive", 0)]: continue # ok return False # must not remove mallocs of structures that have a RTTI with a destructor try: destr_ptr = lltype.getRuntimeTypeInfo(STRUCT)._obj.destructor_funcptr if destr_ptr: return False except (ValueError, AttributeError), e: print e pass # success: replace each variable with a family of variables (one per field) example = STRUCT._container_example() flatnames = [] flatconstants = {} def flatten(S, example): start = 0 if S._names and isinstance(S._flds[S._names[0]], lltype.GcStruct): flatten(S._flds[S._names[0]], getattr(example, S._names[0])) start = 1 for name in S._names[start:]: flatnames.append((S, name)) constant = Constant(getattr(example, name)) constant.concretetype = lltype.typeOf(constant.value) flatconstants[S, name] = constant flatten(STRUCT, example) variables_by_block = {} for block, var in info.variables: vars = variables_by_block.setdefault(block, {}) vars[var] = True for block, vars in variables_by_block.items(): def flowin(var, newvarsmap): # in this 'block', follow where the 'var' goes to and replace # it by a flattened-out family of variables. This family is given # by newvarsmap, whose keys are the 'flatnames'. vars = {var: True} def list_newvars(): return [newvarsmap[key] for key in flatnames] assert block.operations != () newops = [] for op in block.operations: for arg in op.args[1:]: # should be the first arg only assert arg not in vars if op.args and op.args[0] in vars: if op.opname == "getfield": S = op.args[0].concretetype.TO fldname = op.args[1].value newop = SpaceOperation("same_as", [newvarsmap[S, fldname]], op.result) newops.append(newop) elif op.opname == "setfield": S = op.args[0].concretetype.TO fldname = op.args[1].value assert (S, fldname) in newvarsmap newvarsmap[S, fldname] = op.args[2] elif op.opname in ("same_as", "cast_pointer"): assert op.result not in vars vars[op.result] = True # Consider the two pointers (input and result) as # equivalent. We can, and indeed must, use the same # flattened list of variables for both, as a "setfield" # via one pointer must be reflected in the other. elif op.opname == 'keepalive': pass else: raise AssertionError, op.opname elif op.result in vars: assert op.opname == "malloc" assert vars == {var: True} # drop the "malloc" operation else: newops.append(op) block.operations[:] = newops assert block.exitswitch not in vars for link in block.exits: newargs = [] for arg in link.args: if arg in vars: newargs += list_newvars() else: newargs.append(arg) link.args[:] = newargs # look for variables arriving from outside the block for var in vars: if var in block.inputargs: i = block.inputargs.index(var) newinputargs = block.inputargs[:i] newvarsmap = {} for key in flatnames: newvar = Variable() newvar.concretetype = flatconstants[key].concretetype newvarsmap[key] = newvar newinputargs.append(newvar) newinputargs += block.inputargs[i+1:] block.inputargs[:] = newinputargs assert var not in block.inputargs flowin(var, newvarsmap) # look for variables created inside the block by a malloc vars_created_here = [] for op in block.operations: if op.opname == "malloc" and op.result in vars: vars_created_here.append(op.result) for var in vars_created_here: newvarsmap = flatconstants.copy() # dummy initial values flowin(var, newvarsmap) return True
f2aa04514ecbb35738c1dd23432f81293fb5dea4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/f2aa04514ecbb35738c1dd23432f81293fb5dea4/malloc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 698, 67, 10047, 67, 81, 9853, 12, 1376, 4672, 3536, 7833, 358, 6370, 326, 312, 9853, 87, 6710, 471, 27029, 434, 326, 23536, 316, 326, 864, 28128, 950, 12123, 468, 326, 924, 1297, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 698, 67, 10047, 67, 81, 9853, 12, 1376, 4672, 3536, 7833, 358, 6370, 326, 312, 9853, 87, 6710, 471, 27029, 434, 326, 23536, 316, 326, 864, 28128, 950, 12123, 468, 326, 924, 1297, ...
c = Client("blockdev_find", [disk.ToDict()]) self._ConnectNode(c, node) return c.GetResults().get(node, False)
return self._SingleNodeCall(node, "blockdev_find", [disk.ToDict()])
def call_blockdev_find(self, node, disk): """Request identification of a given block device.
9a525d83b2a75f44cc1171e7d715b5bee7a76756 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7542/9a525d83b2a75f44cc1171e7d715b5bee7a76756/rpc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 745, 67, 2629, 5206, 67, 4720, 12, 2890, 16, 756, 16, 4234, 4672, 3536, 691, 24739, 434, 279, 864, 1203, 2346, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 745, 67, 2629, 5206, 67, 4720, 12, 2890, 16, 756, 16, 4234, 4672, 3536, 691, 24739, 434, 279, 864, 1203, 2346, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
("&Center model",center_stl), ("&Rotate model",rotate_stl),
("&Center model",center_surface),
def create_menu(): """Create the STL menu.""" menu = widgets.Menu('STL') MenuData = [ # ("&New project",new_project), ("&Read Surface",read_surface), # ("&Show model",show_model), ("&Show surface",show_surface), ("&Show shrinked surface",show_shrinked), ("&Show volume model",show_volume), ("&Set color",set_color), #("&Print Nodal Coordinates",show_nodes), ("&Combine two models",combine), # ("&Convert STL file to OFF file",convert_stl_to_off), # ("&Sanitize STL file to OFF file",sanitize_stl_to_off), ("&Write Surface Model",write_surface), # ("&Write STL Model",write_stl),
1af2e424e591783871f773a3e3c69a5e039ad4e1 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2499/1af2e424e591783871f773a3e3c69a5e039ad4e1/stl_menu.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 5414, 13332, 3536, 1684, 326, 2347, 48, 3824, 12123, 3824, 273, 10965, 18, 4599, 2668, 882, 48, 6134, 9809, 751, 273, 306, 468, 7566, 10, 1908, 1984, 3113, 2704, 67, 4406, 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, 752, 67, 5414, 13332, 3536, 1684, 326, 2347, 48, 3824, 12123, 3824, 273, 10965, 18, 4599, 2668, 882, 48, 6134, 9809, 751, 273, 306, 468, 7566, 10, 1908, 1984, 3113, 2704, 67, 4406, 3631,...
refnum, dirid = macfs.FindFolder(MACFS.kOnSystemDisk, MACFS.kTemporaryFolderType, 0)
refnum, dirid = macfs.FindFolder(MACFS.kOnSystemDisk, MACFS.kTemporaryFolderType, 0)
def gettempdir(): global tempdir if tempdir is not None: return tempdir attempdirs = ['/usr/tmp', '/tmp', os.getcwd(), os.curdir] if os.name == 'nt': attempdirs.insert(0, 'C:\\TEMP') attempdirs.insert(0, '\\TEMP') elif os.name == 'mac': import macfs, MACFS try: refnum, dirid = macfs.FindFolder(MACFS.kOnSystemDisk, MACFS.kTemporaryFolderType, 0) dirname = macfs.FSSpec((refnum, dirid, '')).as_pathname() attempdirs.insert(0, dirname) except macfs.error: pass for envname in 'TMPDIR', 'TEMP', 'TMP': if os.environ.has_key(envname): attempdirs.insert(0, os.environ[envname]) testfile = gettempprefix() + 'test' for dir in attempdirs: try: filename = os.path.join(dir, testfile) fp = open(filename, 'w') fp.write('blat') fp.close() os.unlink(filename) tempdir = dir break except IOError: pass if tempdir is None: msg = "Can't find a usable temporary directory amongst " + `attempdirs` raise IOError, msg return tempdir
7d1e18f431d98b1bf5b4e8796fd72d91be28c662 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/7d1e18f431d98b1bf5b4e8796fd72d91be28c662/tempfile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 5814, 1214, 13332, 2552, 23101, 309, 23101, 353, 486, 599, 30, 327, 23101, 3547, 84, 8291, 273, 10228, 19, 13640, 19, 5645, 2187, 1173, 5645, 2187, 1140, 18, 588, 11089, 9334, 1140, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 5814, 1214, 13332, 2552, 23101, 309, 23101, 353, 486, 599, 30, 327, 23101, 3547, 84, 8291, 273, 10228, 19, 13640, 19, 5645, 2187, 1173, 5645, 2187, 1140, 18, 588, 11089, 9334, 1140, ...
self.assertEqual(-0x7fffffff, -2147483647)
if platform_long_is_32_bits: self.assertEqual(-0x7fffffff, -2147483647) else: self.assertEqual(-0x7fffffffffffffff, -9223372036854775807)
def test_hex_baseline(self): # Baseline tests self.assertEqual(0x0, 0) self.assertEqual(0x10, 16) self.assertEqual(0x7fffffff, 2147483647) # Ditto with a minus sign and parentheses self.assertEqual(-(0x0), 0) self.assertEqual(-(0x10), -16) self.assertEqual(-(0x7fffffff), -2147483647) # Ditto with a minus sign and NO parentheses self.assertEqual(-0x0, 0) self.assertEqual(-0x10, -16) self.assertEqual(-0x7fffffff, -2147483647)
dca06f414126601662a498a0302f48b20977381b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/dca06f414126601662a498a0302f48b20977381b/test_hexoct.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 7118, 67, 27818, 12, 2890, 4672, 468, 605, 345, 3027, 7434, 365, 18, 11231, 5812, 12, 20, 92, 20, 16, 374, 13, 365, 18, 11231, 5812, 12, 20, 92, 2163, 16, 2872, 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, 7118, 67, 27818, 12, 2890, 4672, 468, 605, 345, 3027, 7434, 365, 18, 11231, 5812, 12, 20, 92, 20, 16, 374, 13, 365, 18, 11231, 5812, 12, 20, 92, 2163, 16, 2872, 13, 365, ...
self.error("expected name token")
self.error("expected name token at %r" % rawdata[declstartpos:declstartpos+20])
def _scan_name(self, i, declstartpos): rawdata = self.rawdata n = len(rawdata) if i == n: return None, -1 m = _declname_match(rawdata, i) if m: s = m.group() name = s.strip() if (i + len(s)) == n: return None, -1 # end of buffer return name.lower(), m.end() else: self.updatepos(declstartpos, i) self.error("expected name token")
5495e33481d4c053ea2bc44dcaea1268ee5724ea /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/5495e33481d4c053ea2bc44dcaea1268ee5724ea/markupbase.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 9871, 67, 529, 12, 2890, 16, 277, 16, 3496, 1937, 917, 4672, 1831, 892, 273, 365, 18, 1899, 892, 290, 273, 562, 12, 1899, 892, 13, 309, 277, 422, 290, 30, 327, 599, 16, 300, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 9871, 67, 529, 12, 2890, 16, 277, 16, 3496, 1937, 917, 4672, 1831, 892, 273, 365, 18, 1899, 892, 290, 273, 562, 12, 1899, 892, 13, 309, 277, 422, 290, 30, 327, 599, 16, 300, 2...
notification = nn % image
notification = nn % imageName
def report(newtext, image, notification, head, notification2 = None, unver = True, commx = None): global botolist while 1: run = main(site = wikipedia.getSite()) secondrun = run.general(newtext, image, notification, head, botolist) if unver == True: try: resPutMex = run.put_mex() except wikipedia.NoPage: wikipedia.output(u"The page has been deleted! Skip!") break except wikipedia.EditConflict: wikipedia.output(u"Edit conflict! Skip!") break else: if resPutMex == False: break else: try: resPutMex = run.put_mex(False) except wikipedia.NoPage: wikipedia.output(u"The page has been deleted!") break except wikipedia.EditConflict: wikipedia.output(u"Edit conflict! Skip!") break else: if resPutMex == False: break try: run.put_talk(notification, head, notification2, commx) except wikipedia.EditConflict: wikipedia.output(u"Edit Conflict! Retrying...") try: run.put_talk(notification, head, notification2, commx) except: wikipedia.output(u"Another error... skipping the user..") break break
ac5b7ba834fe373afd8a095c9b6e449ab8bc6e95 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4404/ac5b7ba834fe373afd8a095c9b6e449ab8bc6e95/checkimages.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2605, 12, 2704, 955, 16, 1316, 16, 3851, 16, 910, 16, 3851, 22, 273, 599, 16, 640, 502, 273, 1053, 16, 1543, 92, 273, 599, 4672, 2552, 2512, 355, 376, 1323, 404, 30, 1086, 273, 2774,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2605, 12, 2704, 955, 16, 1316, 16, 3851, 16, 910, 16, 3851, 22, 273, 599, 16, 640, 502, 273, 1053, 16, 1543, 92, 273, 599, 4672, 2552, 2512, 355, 376, 1323, 404, 30, 1086, 273, 2774,...
def gen_open(): today = '%d%02d%02d' % (datetime.now().year,datetime.now().month,datetime.now().day filename = '/var/spool/torque/server_priv/accounting/' + today)
def gen_cat(): today = '%d%02d%02d' % (datetime.now().year,datetime.now().month,datetime.now().day) filename = '/var/spool/torque/server_priv/accounting/' + today
def gen_open(): today = '%d%02d%02d' % (datetime.now().year,datetime.now().month,datetime.now().day filename = '/var/spool/torque/server_priv/accounting/' + today) s = open(filename,'r') while True: for item in s: yield item + s.name.replace('/var/spool/torque/server_priv/accounting/','') sleep(60) if os.stat(filename).st_size == f.tell() and today != '%d%02d%02d' % (datetime.now().year,datetime.now().month,datetime.now().day today = '%d%02d%02d' % (datetime.now().year,datetime.now().month,datetime.now().day filename = '/var/spool/torque/server_priv/accounting/' + today) s = open(filename,'r')
6d7e515593a673051b9876c756d703e23f40ade9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13786/6d7e515593a673051b9876c756d703e23f40ade9/pbsparse.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3157, 67, 2574, 13332, 10074, 273, 1995, 72, 9, 3103, 72, 9, 3103, 72, 11, 738, 261, 6585, 18, 3338, 7675, 6874, 16, 6585, 18, 3338, 7675, 7496, 16, 6585, 18, 3338, 7675, 2881, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3157, 67, 2574, 13332, 10074, 273, 1995, 72, 9, 3103, 72, 9, 3103, 72, 11, 738, 261, 6585, 18, 3338, 7675, 6874, 16, 6585, 18, 3338, 7675, 7496, 16, 6585, 18, 3338, 7675, 2881, 13, 1...
elif previous_strand_atom is None and next_strand_atom:
if previous_strand_atom is None and next_strand_atom:
def get_strand_end_base_atoms(self): """ Returns a tuple containing the end base atoms of a strand in the following order : (5' end base atom, 3' end base atom). If any or both of these doesn't exist it returns 'None' in place of that non existent atom """ member = None for member in self.members: if isinstance(member, DnaStrandChunk): break if not isinstance(member, DnaStrandChunk): # no DnaStrandChunk members (should not happen) return (None, None) end_baseatoms = member.wholechain.end_baseatoms() if not end_baseatoms: # ring return (None, None) three_prime_end_base_atom = None five_prime_end_base_atom = None for atm in end_baseatoms: if atm is not None: rail = atm.molecule.get_ladder_rail() bond_direction = rail.bond_direction() next_strand_atom = atm.strand_next_baseatom(bond_direction) previous_strand_atom = atm.strand_next_baseatom(-bond_direction) if next_strand_atom is None and previous_strand_atom: three_prime_end_base_atom = atm elif previous_strand_atom is None and next_strand_atom: five_prime_end_base_atom = atm #What should be done in a case if 'atm' has no next or previous base #atoms? - Ninad 2008-03-27 # chain return (five_prime_end_base_atom, three_prime_end_base_atom)
9ce74fc3e2cac78bb9a4b93a3712453737a73963 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11221/9ce74fc3e2cac78bb9a4b93a3712453737a73963/DnaStrand.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 701, 464, 67, 409, 67, 1969, 67, 14937, 12, 2890, 4672, 3536, 2860, 279, 3193, 4191, 326, 679, 1026, 9006, 434, 279, 16706, 316, 326, 3751, 1353, 294, 261, 25, 11, 679, 1026, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 701, 464, 67, 409, 67, 1969, 67, 14937, 12, 2890, 4672, 3536, 2860, 279, 3193, 4191, 326, 679, 1026, 9006, 434, 279, 16706, 316, 326, 3751, 1353, 294, 261, 25, 11, 679, 1026, ...
print 'TEST-PASS | ', result['name']
print '%s-PASS | %s' % (testOrSummary, result['name'])
def prettyPrintResults(): for result in TEST_RESULTS: #pprint.pprint(result) if len(result['fails']) == 0: print 'TEST-PASS | ', result['name'] else: print 'TEST-UNEXPECTED-FAIL | %s | %s' % (prettifyFilename(result['filename']), result['name']) for failure in result['fails']: if 'exception' in failure: prettyPrintException(failure['exception'])
68b35aeacabc869f9a7e01848fc8afd596e1ef2c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11044/68b35aeacabc869f9a7e01848fc8afd596e1ef2c/runtest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 30410, 3447, 13332, 364, 563, 316, 22130, 67, 20602, 30, 468, 84, 1188, 18, 84, 1188, 12, 2088, 13, 309, 562, 12, 2088, 3292, 6870, 87, 19486, 422, 374, 30, 1172, 1995, 87, 17, 10884, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 30410, 3447, 13332, 364, 563, 316, 22130, 67, 20602, 30, 468, 84, 1188, 18, 84, 1188, 12, 2088, 13, 309, 562, 12, 2088, 3292, 6870, 87, 19486, 422, 374, 30, 1172, 1995, 87, 17, 10884, ...
tuple2: [(), (1,2,3)], str2: ["", "123"]
tuple2: {(): (), (1, 2, 3): (1, 2, 3)}, str2: {"": "", "123": "112233"}
def test_filter_subclasses(self): # test, that filter() never returns tuple, str or unicode subclasses funcs = (None, lambda x: True) class tuple2(tuple): pass class str2(str): pass inputs = { tuple2: [(), (1,2,3)], str2: ["", "123"] } if have_unicode: class unicode2(unicode): pass inputs[unicode2] = [unicode(), unicode("123")]
e03cb0dfb74e6fdef0019740b64cdb246fad25fa /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/e03cb0dfb74e6fdef0019740b64cdb246fad25fa/test_builtin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 2188, 67, 1717, 4701, 12, 2890, 4672, 468, 1842, 16, 716, 1034, 1435, 5903, 1135, 3193, 16, 609, 578, 5252, 15320, 15630, 273, 261, 7036, 16, 3195, 619, 30, 1053, 13, 667, 31...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2188, 67, 1717, 4701, 12, 2890, 4672, 468, 1842, 16, 716, 1034, 1435, 5903, 1135, 3193, 16, 609, 578, 5252, 15320, 15630, 273, 261, 7036, 16, 3195, 619, 30, 1053, 13, 667, 31...
menu = Menu(pyduel,("New Game","Options","Quit")) firstScene = Duel(pyduel) while 1: pyduel.start(menu) pyduel.start(firstScene)
firstScene = Menu(pyduel,("New Game","Options","Quit")) pyduel.start(firstScene)
def main(): pyduel = Game(RESOLUTION, CAPTION, ICON) menu = Menu(pyduel,("New Game","Options","Quit")) firstScene = Duel(pyduel) while 1: pyduel.start(menu) pyduel.start(firstScene) # Start the game with a new Duel scene raise SystemExit, 0
52775a33db935d2225a5ee278cf4f542fcbf5d70 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4653/52775a33db935d2225a5ee278cf4f542fcbf5d70/main.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 2395, 2544, 292, 273, 14121, 12, 17978, 13269, 16, 6425, 3725, 16, 467, 2248, 13, 1122, 14370, 273, 9809, 12, 2074, 2544, 292, 16, 2932, 1908, 14121, 15937, 1320, 15937, 25365...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 2395, 2544, 292, 273, 14121, 12, 17978, 13269, 16, 6425, 3725, 16, 467, 2248, 13, 1122, 14370, 273, 9809, 12, 2074, 2544, 292, 16, 2932, 1908, 14121, 15937, 1320, 15937, 25365...
return item.name.lower()
if item.name: return item.name.lower() return item.name
def sort_key(self, item): return item.name.lower()
962a0ec9ceef86d985544b7880664b8159908ae9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12354/962a0ec9ceef86d985544b7880664b8159908ae9/itemlist.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1524, 67, 856, 12, 2890, 16, 761, 4672, 327, 761, 18, 529, 18, 8167, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1524, 67, 856, 12, 2890, 16, 761, 4672, 327, 761, 18, 529, 18, 8167, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
self.nstr = double_fixup(self.n_validator, str(self.chirality_n_spinbox.value()), self.nstr) n = int(self.nstr)
n_previous = int(self.n) m_previous = int(self.m) n = self.chirality_n_spinbox.value() m = self.chirality_m_spinbox.value() if n < 2: n = 2 if m != self.m: if m > n: n = m elif n != self.n: if m > n: m = n
def length_fixup(self): '''Slot for several validators for different parameters. This gets called each time a user types anything into a widget or changes a spinbox. ''' self.nstr = double_fixup(self.n_validator, str(self.chirality_n_spinbox.value()), self.nstr) n = int(self.nstr) self.chirality_n_spinbox.setValue(n) self.m_validator.setRange(0, n) self.mstr = double_fixup(self.m_validator, str(self.chirality_m_spinbox.value()), self.mstr) self.chirality_m_spinbox.setValue(int(self.mstr)) self.lenstr = double_fixup(self.validator, self.length_linedit.text(), self.lenstr) self.length_linedit.setText(self.lenstr) self.blstr = double_fixup(self.validator, self.bond_length_linedit.text(), self.blstr) self.bond_length_linedit.setText(self.blstr) self.zstr = double_fixup(self.validator, self.z_distortion_linedit.text(), self.zstr) self.z_distortion_linedit.setText(self.zstr) self.xystr = double_fixup(self.validator, self.xy_distortion_linedit.text(), self.xystr) self.xy_distortion_linedit.setText(self.xystr) self.spstr = double_fixup(self.validator, self.mwcnt_spacing_linedit.text(), self.spstr) self.mwcnt_spacing_linedit.setText(self.spstr)
093326d437fc3759934ddbf9e21e67aa2dc380db /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/093326d437fc3759934ddbf9e21e67aa2dc380db/NanotubeGenerator.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 769, 67, 904, 416, 12, 2890, 4672, 9163, 8764, 364, 11392, 11632, 364, 3775, 1472, 18, 1220, 5571, 2566, 1517, 813, 279, 729, 1953, 6967, 1368, 279, 3604, 578, 3478, 279, 12490, 2147, 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, 769, 67, 904, 416, 12, 2890, 4672, 9163, 8764, 364, 11392, 11632, 364, 3775, 1472, 18, 1220, 5571, 2566, 1517, 813, 279, 729, 1953, 6967, 1368, 279, 3604, 578, 3478, 279, 12490, 2147, 18...
self.logging.info("Your job identifier is: %s" % jOut['jobid'])
self.logging.debug("Your job identifier is: %s" % jOut['jobid'])
def submit( self, obj, requirements='', config ='', service='' ): """ submit a jdl to glite ends with a call to retrieve wms and job,gridid asssociation """
55a0d373215e2d2c4f99fe71353cbd62af3d7838 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8886/55a0d373215e2d2c4f99fe71353cbd62af3d7838/SchedulerGLite.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4879, 12, 365, 16, 1081, 16, 8433, 2218, 2187, 642, 273, 11, 2187, 1156, 2218, 11, 262, 30, 3536, 4879, 279, 525, 5761, 358, 5118, 1137, 3930, 598, 279, 745, 358, 4614, 341, 959, 471, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4879, 12, 365, 16, 1081, 16, 8433, 2218, 2187, 642, 273, 11, 2187, 1156, 2218, 11, 262, 30, 3536, 4879, 279, 525, 5761, 358, 5118, 1137, 3930, 598, 279, 745, 358, 4614, 341, 959, 471, ...
c, "http://www.acme.com/foo%2f%25/<<%0anew/",
c, "http://www.acme.com/foo%2f%25/<<%0anewå/æøå",
def test_url_encoding(self): # Try some URL encodings of the PATHs. # (the behaviour here has changed from libwww-perl) from cookielib import CookieJar, DefaultCookiePolicy
a9d4fb349a878ab7e6d1af37ff85790d39f08b76 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8125/a9d4fb349a878ab7e6d1af37ff85790d39f08b76/test_cookielib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 718, 67, 5999, 12, 2890, 4672, 468, 6161, 2690, 1976, 24118, 434, 326, 7767, 87, 18, 468, 261, 5787, 14273, 2674, 711, 3550, 628, 2561, 5591, 17, 457, 80, 13, 628, 15860, 77,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 718, 67, 5999, 12, 2890, 4672, 468, 6161, 2690, 1976, 24118, 434, 326, 7767, 87, 18, 468, 261, 5787, 14273, 2674, 711, 3550, 628, 2561, 5591, 17, 457, 80, 13, 628, 15860, 77,...
sage: f = Piecewise([[(0,pi/2),f1],[(pi/2,pi),f2]])
sage: f = Piecewise([[(-pi,pi/2),f1],[(pi/2,pi),f2]])
def fourier_series_cosine_coefficient(self,n,L): r""" Returns the n-th Fourier series coefficient of $\cos(n\pi x/L)$, $a_n$.
0a3244f0e24f11675f8fd4274e0d00343dcc1b20 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/0a3244f0e24f11675f8fd4274e0d00343dcc1b20/piecewise.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12792, 2453, 67, 10222, 67, 14445, 558, 67, 8075, 8714, 12, 2890, 16, 82, 16, 48, 4672, 436, 8395, 2860, 326, 290, 17, 451, 478, 24775, 4166, 16554, 434, 271, 64, 14445, 12, 82, 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, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12792, 2453, 67, 10222, 67, 14445, 558, 67, 8075, 8714, 12, 2890, 16, 82, 16, 48, 4672, 436, 8395, 2860, 326, 290, 17, 451, 478, 24775, 4166, 16554, 434, 271, 64, 14445, 12, 82, 64, ...
class Scope(trellis.Component):
class Scope(InteractionComponent):
def set_value(self, value): return self.rule().set_value(value)
2d846dfc0a2a292c98fc3af53d4fc966746ef936 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12987/2d846dfc0a2a292c98fc3af53d4fc966746ef936/core.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 1132, 12, 2890, 16, 460, 4672, 327, 365, 18, 5345, 7675, 542, 67, 1132, 12, 1132, 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, 444, 67, 1132, 12, 2890, 16, 460, 4672, 327, 365, 18, 5345, 7675, 542, 67, 1132, 12, 1132, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
if '__warningregistry__' in globals(): del globals()['__warningregistry__'] if hasattr(warning_tests, '__warningregistry__'): del warning_tests.__warningregistry__ if hasattr(sys, '__warningregistry__'): del sys.__warningregistry__ test_support.run_unittest(CFilterTests, PyFilterTests, CWarnTests, PyWarnTests,
test_support.run_unittest(CFilterTests, PyFilterTests, CWarnTests, PyWarnTests,
def test_main(): # Obscure hack so that this test passes after reloads or repeated calls # to test_main (regrtest -R). if '__warningregistry__' in globals(): del globals()['__warningregistry__'] if hasattr(warning_tests, '__warningregistry__'): del warning_tests.__warningregistry__ if hasattr(sys, '__warningregistry__'): del sys.__warningregistry__ test_support.run_unittest(CFilterTests, PyFilterTests, CWarnTests, PyWarnTests, CWCmdLineTests, PyWCmdLineTests, _WarningsTests, CWarningsDisplayTests, PyWarningsDisplayTests, )
270c8f6e48b1d2abc6701cad20b23c6ecc1876d9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3187/270c8f6e48b1d2abc6701cad20b23c6ecc1876d9/test_warnings.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 5254, 13332, 468, 19659, 1017, 594, 11769, 1427, 716, 333, 1842, 11656, 1839, 7749, 87, 578, 12533, 4097, 468, 358, 1842, 67, 5254, 261, 1574, 3797, 395, 300, 54, 2934, 309, 49...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 5254, 13332, 468, 19659, 1017, 594, 11769, 1427, 716, 333, 1842, 11656, 1839, 7749, 87, 578, 12533, 4097, 468, 358, 1842, 67, 5254, 261, 1574, 3797, 395, 300, 54, 2934, 309, 49...
os.mkdir(root+"var/db/pkg/"+mycategory+"/"+mypackage,0755)
os.mkdir(root+"var/db/pkg/"+mycategory+"/"+mypackage,0755)
def prepare_db(mycategory,mypackage): if not os.path.isdir(root+"var"): os.mkdir(root+"var",0755) if not os.path.isdir(root+"var/db"): os.mkdir(root+"var/db",0755) if not os.path.isdir(root+"var/db/pkg"): os.mkdir(root+"var/db/pkg",0755) if not os.path.isdir(root+"var/db/pkg/"+mycategory): os.mkdir(root+"var/db/pkg/"+mycategory,0755) if not os.path.isdir(root+"var/db/pkg/"+mycategory+"/"+mypackage): os.mkdir(root+"var/db/pkg/"+mycategory+"/"+mypackage,0755)
7a55aaea33567268281c295278eae5e28a8eccca /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9957/7a55aaea33567268281c295278eae5e28a8eccca/portage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2911, 67, 1966, 12, 4811, 4743, 16, 81, 879, 1270, 4672, 309, 486, 1140, 18, 803, 18, 291, 1214, 12, 3085, 9078, 1401, 6, 4672, 1140, 18, 26686, 12, 3085, 9078, 1401, 3113, 8642, 2539,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2911, 67, 1966, 12, 4811, 4743, 16, 81, 879, 1270, 4672, 309, 486, 1140, 18, 803, 18, 291, 1214, 12, 3085, 9078, 1401, 6, 4672, 1140, 18, 26686, 12, 3085, 9078, 1401, 3113, 8642, 2539,...
def setUp(self): self.msgs = [] self.p = FakeProtocol(self.msgs) def testSingleLevel(self): host = 'domain.tld' m = dns.Message() rr = dns.RRHeader('tld', dns.NS, payload=dns.Record_NS(host)) m.answers.append(rr) self.msgs.append(m) m = dns.Message() rr = dns.RRHeader(host, dns.NS, payload=dns.Record_NS(host)) m.answers.append(rr) self.msgs.append(m) d = root.discoverAuthority(host, ['root.server'], p=self.p) r = unittest.deferredResult(flow.Deferred(d)) self.assertEquals(len(r), 2) self.assertEquals(r[1], 'root.server') m = r[0] self.assertEquals(len(m.answers), 1) self.assertEquals(len(m.additional), 0) self.assertEquals(len(m.authority), 0) a = m.answers[0] self.assertEquals(a, rr) a, kw = self.p.args self.assertEquals(len(a), 2) self.assertEquals(kw, {'timeout': 1}) r = a[0] self.assertEquals(len(r), 3) self.assertEquals(r[1], [dns.Query('tld.', dns.NS)]) r = a[1] self.assertEquals(len(r), 3) self.assertEquals(r[1], [dns.Query('domain.tld', dns.NS)]) def testMultiLevel(self): host = 'big.long.host.name.with.many.many.many.different.parts.tld' dots = host.count('.') for i in range(dots + 1): m = dns.Message() p = host.split('.', dots - i) rr = dns.RRHeader(p[-1], dns.NS, payload=dns.Record_NS('.'.join(p[-2:]))) m.answers.append(rr) self.msgs.append(m) d = root.discoverAuthority(host, ['root.server'], p=self.p) r = unittest.deferredResult(flow.Deferred(d)) self.assertEquals(len(r), 2) self.assertEquals(r[1], 'root.server') m = r[0] self.assertEquals(len(m.answers), 1) self.assertEquals(len(m.additional), 0) self.assertEquals(len(m.authority), 0) a = m.answers[0] self.assertEquals(a, rr) r = self.p.args[0] self.assertEquals(len(r), 3) self.assertEquals(r[1], [dns.Query('tld.', dns.NS)]) for i in range(1, dots + 1): r = self.p.args[i] self.assertEquals(len(r), 3) self.assertEquals(r[1], [dns.Query(host.split('.', dots - i)[-1], dns.NS)])
pass
def setUp(self): self.msgs = [] self.p = FakeProtocol(self.msgs)
e6486e85506bc0f41ed39f239129fe36f6846e72 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/e6486e85506bc0f41ed39f239129fe36f6846e72/test_rootresolve.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24292, 12, 2890, 4672, 365, 18, 27439, 273, 5378, 365, 18, 84, 273, 11551, 5752, 12, 2890, 18, 27439, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24292, 12, 2890, 4672, 365, 18, 27439, 273, 5378, 365, 18, 84, 273, 11551, 5752, 12, 2890, 18, 27439, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
dep_file, dep_time = deps.newest_dep(f)
dep_file, dep_time = deps.newest_dep(f,m)
def compile_command_list(ext_modules, deps): """ Computes a list of commands needed to compile and link the extension modules given in 'ext_modules' """ queue_compile_high = [] queue_compile_med = [] queue_compile_low = [] for m in ext_modules: new_sources = [] for f in m.sources: if f.endswith('.pyx'): dep_file, dep_time = deps.newest_dep(f) dest_file = "%s/%s"%(SITE_PACKAGES, f) dest_time = deps.timestamp(dest_file) if dest_time < dep_time: if dep_file == f: print "Building modified file %s."%f queue_compile_high.append([compile_command, (f,m)]) elif dep_file == (f[:-4] + '.pxd'): print "Building %s because it depends on %s."%(f, dep_file) queue_compile_med.append([compile_command, (f,m)]) else: print "Building %s because it depends on %s."%(f, dep_file) queue_compile_low.append([compile_command, (f,m)]) new_sources.append(process_filename(f, m)) m.sources = new_sources return queue_compile_high + queue_compile_med + queue_compile_low
031b02486f3aa60bbe6ec46c81307116288d5734 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9417/031b02486f3aa60bbe6ec46c81307116288d5734/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4074, 67, 3076, 67, 1098, 12, 408, 67, 6400, 16, 8740, 4672, 3536, 14169, 281, 279, 666, 434, 4364, 3577, 358, 4074, 471, 1692, 326, 2710, 4381, 864, 316, 296, 408, 67, 6400, 11, 3536,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4074, 67, 3076, 67, 1098, 12, 408, 67, 6400, 16, 8740, 4672, 3536, 14169, 281, 279, 666, 434, 4364, 3577, 358, 4074, 471, 1692, 326, 2710, 4381, 864, 316, 296, 408, 67, 6400, 11, 3536,...
for (x,y) in matches: print "%s (%d)" % (y,x)
for match in matches: print "%s (%d)" % match
def main(args): unicode_names= [] for ix in range(sys.maxunicode+1): try: unicode_names.append( (ix, unicodedata.name(unichr(ix))) ) except ValueError: # no name for the character pass for arg in args: pat = re.compile(arg, re.I) matches = [(x,y) for (x,y) in unicode_names if pat.search(y) is not None] if matches: print "***", arg, "matches", "***" for (x,y) in matches: print "%s (%d)" % (y,x)
cca625d446c1f56efb694346bf0b0dd50af88acd /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12029/cca625d446c1f56efb694346bf0b0dd50af88acd/find-uname.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 1968, 4672, 5252, 67, 1973, 33, 5378, 364, 8288, 316, 1048, 12, 9499, 18, 1896, 9124, 15, 21, 4672, 775, 30, 5252, 67, 1973, 18, 6923, 12, 261, 697, 16, 5252, 892, 18, 529,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 1968, 4672, 5252, 67, 1973, 33, 5378, 364, 8288, 316, 1048, 12, 9499, 18, 1896, 9124, 15, 21, 4672, 775, 30, 5252, 67, 1973, 18, 6923, 12, 261, 697, 16, 5252, 892, 18, 529,...
self.runCmd("disassemble")
self.runCmd("disassemble -f")
def do_simple_disasm(self): """Do a bunch of simple disassemble commands.""" exe = os.path.join(os.getcwd(), "a.out") self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
974f010e2f30baf42f1e09c6a4005c708f154fe7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11986/974f010e2f30baf42f1e09c6a4005c708f154fe7/TestFoundationDisassembly.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 9647, 67, 2251, 23522, 12, 2890, 4672, 3536, 3244, 279, 25606, 434, 4143, 1015, 29676, 4364, 12123, 15073, 273, 1140, 18, 803, 18, 5701, 12, 538, 18, 588, 11089, 9334, 315, 69, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 9647, 67, 2251, 23522, 12, 2890, 4672, 3536, 3244, 279, 25606, 434, 4143, 1015, 29676, 4364, 12123, 15073, 273, 1140, 18, 803, 18, 5701, 12, 538, 18, 588, 11089, 9334, 315, 69, ...
warning.warn("Cannot add element of type %s to ParserElement" % type(other),
warnings.warn("Cannot add element of type %s to ParserElement" % type(other),
def __rxor__(self, other ): """Implementation of ^= operator""" if isinstance( other, basestring ): other = Literal( other ) if not isinstance( other, ParserElement ): warning.warn("Cannot add element of type %s to ParserElement" % type(other), SyntaxWarning, stacklevel=2) return other ^ self
f4b669650e45e6329b2a61406dbab3af39cf3582 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3693/f4b669650e45e6329b2a61406dbab3af39cf3582/pyparsing.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 20122, 280, 972, 12, 2890, 16, 1308, 262, 30, 3536, 13621, 434, 10352, 3726, 8395, 309, 1549, 12, 1308, 16, 10699, 262, 30, 1308, 273, 14392, 12, 1308, 262, 309, 486, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 20122, 280, 972, 12, 2890, 16, 1308, 262, 30, 3536, 13621, 434, 10352, 3726, 8395, 309, 1549, 12, 1308, 16, 10699, 262, 30, 1308, 273, 14392, 12, 1308, 262, 309, 486, 1549, 12, 1...