rem
stringlengths
2
226k
add
stringlengths
0
227k
context
stringlengths
8
228k
meta
stringlengths
156
215
input_ids
list
attention_mask
list
labels
list
if removedInstanceId is not None:
if provNodeIdx is not None:
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...
('s', 'subject', '', _('subject of first message (intro or single patch)')), ('t', 'to', [], _('email addresses of recipients')),
def getaddrs(opt, prpt, default = None): addrs = opts.get(opt) or (ui.config('email', opt) or ui.config('patchbomb', opt) or prompt(prpt, default = default)).split(',') return [mail.addressencode(ui, a.strip(), _charsets, opts.get('test')) for a in addrs if a.strip()]
f14374c6eae8796224a9dd8d4162432d4993d667 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11312/f14374c6eae8796224a9dd8d4162432d4993d667/patchbomb.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 23305, 12, 3838, 16, 846, 337, 16, 805, 273, 599, 4672, 11755, 273, 1500, 18, 588, 12, 3838, 13, 578, 261, 4881, 18, 1425, 2668, 3652, 2187, 2153, 13, 578, 5915, 18, 1425, 2668, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 23305, 12, 3838, 16, 846, 337, 16, 805, 273, 599, 4672, 11755, 273, 1500, 18, 588, 12, 3838, 13, 578, 261, 4881, 18, 1425, 2668, 3652, 2187, 2153, 13, 578, 5915, 18, 1425, 2668, ...
if self.selectedItem.name == self.assy.name: self.partmenu.popup(pos, 1)
if self.selectedItem.name == self.assy.name: self.partmenu.popup(pos, 1)
def menuReq(self, listItem, pos, col): """ Context menu items function handler for the Model Tree View """ if listItem: self.selectedItem = listItem.object sdaddy = self.selectedItem.whosurdaddy() if sdaddy in ["ROOT","Data"]: if self.selectedItem.name == self.assy.name: self.partmenu.popup(pos, 1) return else: self.selectedItem = None # Figure out which menu to display treepicked = self.assy.tree.nodespicked() clippicked = self.assy.shelf.nodespicked()
d351032a96e4fcdd636be278950a3189d3d3c4a7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/d351032a96e4fcdd636be278950a3189d3d3c4a7/modelTree.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3824, 6113, 12, 2890, 16, 19859, 16, 949, 16, 645, 4672, 3536, 1772, 3824, 1516, 445, 1838, 364, 326, 3164, 4902, 4441, 3536, 309, 19859, 30, 365, 18, 8109, 1180, 273, 19859, 18, 1612, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3824, 6113, 12, 2890, 16, 19859, 16, 949, 16, 645, 4672, 3536, 1772, 3824, 1516, 445, 1838, 364, 326, 3164, 4902, 4441, 3536, 309, 19859, 30, 365, 18, 8109, 1180, 273, 19859, 18, 1612, ...
html = '<img alt="The beach" src="beach.jpg" />'
html = '<img alt="The beach" src="beach.jpg"/>'
def test_case5(self): """Test translation of an element content""" html = '<img alt="The beach" src="beach.jpg" />' po = 'msgid "The beach"\n' \ 'msgstr "La playa"'
a3c81c1d735ba1868ba3eb465b674f362e597962 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12681/a3c81c1d735ba1868ba3eb465b674f362e597962/test_parsers.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 3593, 25, 12, 2890, 4672, 3536, 4709, 4794, 434, 392, 930, 913, 8395, 1729, 273, 2368, 6081, 3770, 1546, 1986, 506, 497, 6, 1705, 1546, 2196, 497, 18, 14362, 6, 18280, 8275, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3593, 25, 12, 2890, 4672, 3536, 4709, 4794, 434, 392, 930, 913, 8395, 1729, 273, 2368, 6081, 3770, 1546, 1986, 506, 497, 6, 1705, 1546, 2196, 497, 18, 14362, 6, 18280, 8275, ...
except ParseError, e: parse_error = str(e) except ImportError, e:
except (ParseError, ImportError, IOError, OSError), e:
def _get_docs_from_module_file(filename, options, progress_estimator, parent_docs=(None,None)): """ Construct and return the API documentation for the python module with the given filename. @param parent_docs: The C{ModuleDoc} of the containing package. If C{parent_docs} is not provided, then this method will check if the given filename is contained in a package; and if so, it will construct a stub C{ModuleDoc} for the containing package(s). C{parent_docs} is a tuple, where the first element is the parent from introspection, and the second element is the parent from parsing. """ # Record our progress. modulename = os.path.splitext(os.path.split(filename)[1])[0] if modulename == '__init__': modulename = os.path.split(os.path.split(filename)[0])[1] if parent_docs[0]: modulename = DottedName(parent_docs[0].canonical_name, modulename) elif parent_docs[1]: modulename = DottedName(parent_docs[1].canonical_name, modulename) if options.must_introspect(modulename) or options.must_parse(modulename): log.progress(progress_estimator.progress(), '%s (%s)' % (modulename, filename)) progress_estimator.complete += 1 # Normalize the filename. filename = os.path.normpath(os.path.abspath(filename)) # When possible, use the source version of the file. try: filename = py_src_filename(filename) src_file_available = True except ValueError: src_file_available = False # Get the introspected & parsed docs (as appropriate) introspect_doc = parse_doc = None introspect_error = parse_error = None if options.must_introspect(modulename): try: introspect_doc = introspect_docs( filename=filename, context=parent_docs[0]) if introspect_doc.canonical_name is UNKNOWN: introspect_doc.canonical_name = modulename except ImportError, e: introspect_error = str(e) if src_file_available and options.must_parse(modulename): try: parse_doc = parse_docs( filename=filename, context=parent_docs[1]) except ParseError, e: parse_error = str(e) except ImportError, e: parse_error = str(e) # Report any errors we encountered. _report_errors(filename, introspect_doc, parse_doc, introspect_error, parse_error) # Return the docs we found. return (introspect_doc, parse_doc)
7728c48d0ee0dca203c062e1c06284aa1974a664 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11420/7728c48d0ee0dca203c062e1c06284aa1974a664/docbuilder.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 8532, 67, 2080, 67, 2978, 67, 768, 12, 3459, 16, 702, 16, 4007, 67, 395, 12502, 16, 982, 67, 8532, 28657, 7036, 16, 7036, 3719, 30, 3536, 14291, 471, 327, 326, 1491, 73...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 8532, 67, 2080, 67, 2978, 67, 768, 12, 3459, 16, 702, 16, 4007, 67, 395, 12502, 16, 982, 67, 8532, 28657, 7036, 16, 7036, 3719, 30, 3536, 14291, 471, 327, 326, 1491, 73...
'path':'./build',
'path': buildRoot,
def runCompiled(self, parts, packages, boot, variants): if not self._config.get("compile/file"): return
9bea567a96612482bbe0de57f71e9ff6ea04a1ee /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5718/9bea567a96612482bbe0de57f71e9ff6ea04a1ee/Generator.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 20733, 12, 2890, 16, 2140, 16, 5907, 16, 4835, 16, 12935, 4672, 309, 486, 365, 6315, 1425, 18, 588, 2932, 11100, 19, 768, 6, 4672, 327, 2, 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, 1086, 20733, 12, 2890, 16, 2140, 16, 5907, 16, 4835, 16, 12935, 4672, 309, 486, 365, 6315, 1425, 18, 588, 2932, 11100, 19, 768, 6, 4672, 327, 2, -100, -100, -100, -100, -100, -100, -10...
tfirstvar = ExprVar('T__First')
# - typedef to hack around placement delete limitations
e3e6464b83e55ade2c6b8ad4df84a169462184ee /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11102/e3e6464b83e55ade2c6b8ad4df84a169462184ee/lower.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 468, 225, 300, 618, 536, 358, 11769, 6740, 12607, 1430, 31810, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 468, 225, 300, 618, 536, 358, 11769, 6740, 12607, 1430, 31810, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
with test_support._check_py3k_warnings(): self.assertIs(operator.isCallable(0), False) self.assertIs(operator.isCallable(len), True)
self.assertIs(operator.isCallable(0), False) self.assertIs(operator.isCallable(len), True)
def test_operator(self): import operator self.assertIs(operator.truth(0), False) self.assertIs(operator.truth(1), True) with test_support._check_py3k_warnings(): self.assertIs(operator.isCallable(0), False) self.assertIs(operator.isCallable(len), True) self.assertIs(operator.isNumberType(None), False) self.assertIs(operator.isNumberType(0), True) self.assertIs(operator.not_(1), False) self.assertIs(operator.not_(0), True) self.assertIs(operator.isSequenceType(0), False) self.assertIs(operator.isSequenceType([]), True) self.assertIs(operator.contains([], 1), False) self.assertIs(operator.contains([1], 1), True) self.assertIs(operator.isMappingType(1), False) self.assertIs(operator.isMappingType({}), True) self.assertIs(operator.lt(0, 0), False) self.assertIs(operator.lt(0, 1), True) self.assertIs(operator.is_(True, True), True) self.assertIs(operator.is_(True, False), False) self.assertIs(operator.is_not(True, True), False) self.assertIs(operator.is_not(True, False), True)
a2d80a83624f985c350f586d77be17165f37bfc0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12029/a2d80a83624f985c350f586d77be17165f37bfc0/test_bool.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 9497, 12, 2890, 4672, 1930, 3726, 365, 18, 11231, 2520, 12, 9497, 18, 313, 795, 12, 20, 3631, 1083, 13, 365, 18, 11231, 2520, 12, 9497, 18, 313, 795, 12, 21, 3631, 1053, 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, 1842, 67, 9497, 12, 2890, 4672, 1930, 3726, 365, 18, 11231, 2520, 12, 9497, 18, 313, 795, 12, 20, 3631, 1083, 13, 365, 18, 11231, 2520, 12, 9497, 18, 313, 795, 12, 21, 3631, 1053, 13...
print "prefixes", prefixes print "timeout", timeout
def setup_invalidation_processor(): from openlibrary.core import processors config = infogami.config.get("invalidation", {}) prefixes = config.get('prefixes', []) timeout = config.get("timeout", 60) cookie_name = config.get("cookie", "invalidation_timestamp") print "prefixes", prefixes print "timeout", timeout if prefixes: p = processors.InvalidationProcessor(prefixes, timeout=timeout, cookie_name=cookie_name) delegate.app.add_processor(p) client.hooks.append(p.hook)
e223208b6a7752b690e335c6dd016088341bbd19 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3913/e223208b6a7752b690e335c6dd016088341bbd19/code.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 67, 5387, 367, 67, 8700, 13332, 628, 1696, 12083, 18, 3644, 1930, 13399, 225, 642, 273, 1123, 75, 26223, 18, 1425, 18, 588, 2932, 5387, 367, 3113, 2618, 13, 225, 9419, 273, 642, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 67, 5387, 367, 67, 8700, 13332, 628, 1696, 12083, 18, 3644, 1930, 13399, 225, 642, 273, 1123, 75, 26223, 18, 1425, 18, 588, 2932, 5387, 367, 3113, 2618, 13, 225, 9419, 273, 642, ...
True if the resource is found, False otherwise.
The new resource (which may or may not have been saved successfully).
def create(cls, attributes): """Create and save a resource with the given attributes.
baa6828ab0d873a03298b52faf12644388ac807d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6884/baa6828ab0d873a03298b52faf12644388ac807d/activeresource.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 12, 6429, 16, 1677, 4672, 3536, 1684, 471, 1923, 279, 1058, 598, 326, 864, 1677, 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, 752, 12, 6429, 16, 1677, 4672, 3536, 1684, 471, 1923, 279, 1058, 598, 326, 864, 1677, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
self.addheader('Range', 'bytes=%s-' % (current_size))
if current_size > 0: self.addheader('Range', 'bytes=%s-' % (current_size))
def retrieve_resume(self, url, filename, reporthook=None, data=None): """retrieve_resume(url) returns (filename, headers) for a local object or (tempfilename, headers) for a remote object.
90c2f31cf034a041901221bf39e632966e8f71c5 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12778/90c2f31cf034a041901221bf39e632966e8f71c5/download.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4614, 67, 25158, 12, 2890, 16, 880, 16, 1544, 16, 2071, 7825, 1184, 33, 7036, 16, 501, 33, 7036, 4672, 3536, 17466, 67, 25158, 12, 718, 13, 1135, 261, 3459, 16, 1607, 13, 364, 279, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4614, 67, 25158, 12, 2890, 16, 880, 16, 1544, 16, 2071, 7825, 1184, 33, 7036, 16, 501, 33, 7036, 4672, 3536, 17466, 67, 25158, 12, 718, 13, 1135, 261, 3459, 16, 1607, 13, 364, 279, 1...
p, s = title.split(":", 1) s = pattern.replace("$1", s) return "%s:%s" % (p, s)
if ':' in title: p, s = title.split(":", 1) s = pattern.replace("$1", s) return '%s:%s' % (p, s) else: return pattern.replace("$1", title)
def make_print_template(title): p, s = title.split(":", 1) s = pattern.replace("$1", s) return "%s:%s" % (p, s)
1d4bb3308f9bd4674ad0654fa55c0fc29bd94d5d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12391/1d4bb3308f9bd4674ad0654fa55c0fc29bd94d5d/utils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 67, 1188, 67, 3202, 12, 2649, 4672, 309, 3921, 316, 2077, 30, 293, 16, 272, 273, 2077, 18, 4939, 2932, 2773, 16, 404, 13, 272, 273, 1936, 18, 2079, 2932, 8, 21, 3113, 272, 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, 1221, 67, 1188, 67, 3202, 12, 2649, 4672, 309, 3921, 316, 2077, 30, 293, 16, 272, 273, 2077, 18, 4939, 2932, 2773, 16, 404, 13, 272, 273, 1936, 18, 2079, 2932, 8, 21, 3113, 272, 13, ...
C3 = -4.5 * phidot / (a*H**2) * self.k C4 = -phidot/(a*H**2) / self.k
C3 = -4.5 * phidot / (a*H**2) * k C4 = -phidot/(a*H**2) / k
def full_source_from_model(self, m, nix): """Use the data from a model at a timestep nix to calculate the full source term S.""" try: #Get background values phi, phidot, H = m.yresult[nix, 0:3, 0] a = m.ainit*np.exp(m.tresult[nix]) except AttributeError: raise if np.any(np.isnan(phi)): raise AttributeError("Background values not available for this timestep.") #Get potentials V, Vp, Vpp, Vppp = m.potentials(np.array([phi])) #Set alpha and beta alpha = 1/(a*np.sqrt(2)) beta = a*H #Set ones array with same shape as self.k onekshape = np.ones(self.k.shape) #Set C_i values C1 = 1/H**2 * (Vppp + phidot/a**2 * (3 * a**2 * Vpp + 2 * self.k**2 )) C2 = 3.5 * phidot /((a*H)**2) * onekshape C3 = -4.5 * phidot / (a*H**2) * self.k C4 = -phidot/(a*H**2) / self.k C5 = -1.5 * phidot * onekshape C6 = 2 * phidot * self.k C7 = - phidot / self.k #Get component integrals J_A = self.J_A(self.k, alpha, C1, C2) J_B = self.J_B(self.k, alpha, C3, C4) J_C = self.J_C(self.k, alpha, beta, C5) J_D = self.J_D(self.k, alpha, beta, C6, C7) src = 1 / ((2*np.pi)**2) * (J_A + J_B + J_C + J_D) return src
4524b99dac07be77cc9bc3fc94936385814e33de /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7283/4524b99dac07be77cc9bc3fc94936385814e33de/analyticsolution.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1983, 67, 3168, 67, 2080, 67, 2284, 12, 2890, 16, 312, 16, 290, 697, 4672, 3536, 3727, 326, 501, 628, 279, 938, 622, 279, 27072, 290, 697, 358, 4604, 326, 1983, 1084, 2481, 348, 12123,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1983, 67, 3168, 67, 2080, 67, 2284, 12, 2890, 16, 312, 16, 290, 697, 4672, 3536, 3727, 326, 501, 628, 279, 938, 622, 279, 27072, 290, 697, 358, 4604, 326, 1983, 1084, 2481, 348, 12123,...
' <li><a href="webtlsmd.cgi">Job Status</a></li>', ' <li><a href="%s/examples/index.html">Examples</a></li>' % (conf.TLSMD_BASE_URL), ' <li><a href="%s/documentation.html">Documentation</a></li>' % (conf.TLSMD_BASE_URL), ' </ul>', '</div>'
' <li><a href="webtlsmd.cgi">Job Status</a></li>', ' <li><a href="%s/examples/index.html">Examples</a></li>' % (conf.TLSMD_BASE_URL), ' <li><a href="%s/documentation.html">Documentation</a></li>' % (conf.TLSMD_BASE_URL), ' </ul>', '</div>'
def html_nav_bar(page_name=None): """Site navigation bar. """ l = ['<div id="navcontainer">', ' <ul>', ' <li><a href="%s/index.html">Home</a></li>' % (conf.TLSMD_BASE_URL), ' <li><a href="webtlsmd.cgi?page=submit1">Start a New Job</a></li>', ' <li><a href="webtlsmd.cgi">Job Status</a></li>', ' <li><a href="%s/examples/index.html">Examples</a></li>' % (conf.TLSMD_BASE_URL), ' <li><a href="%s/documentation.html">Documentation</a></li>' % (conf.TLSMD_BASE_URL), ' </ul>', '</div>' ] return "\n".join(l)
bb3b5e8c7c0e2fcb8020d92f6dcfef34849d771b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10674/bb3b5e8c7c0e2fcb8020d92f6dcfef34849d771b/webtlsmd.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1729, 67, 11589, 67, 3215, 12, 2433, 67, 529, 33, 7036, 4672, 3536, 4956, 10394, 4653, 18, 3536, 328, 273, 10228, 32, 2892, 612, 1546, 11589, 3782, 7918, 16, 296, 225, 411, 332, 1870, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1729, 67, 11589, 67, 3215, 12, 2433, 67, 529, 33, 7036, 4672, 3536, 4956, 10394, 4653, 18, 3536, 328, 273, 10228, 32, 2892, 612, 1546, 11589, 3782, 7918, 16, 296, 225, 411, 332, 1870, ...
if verbose:
if config.verbose:
def run(config, tim): """ This method is where the data reduction process gets done. @param config: Object containing the data reduction configuration information. @type config: L{hlr_utils.Configure} @param tim: Object that will allow the method to perform timing evaluations. @type tim: C{sns_time.DiffTime} """ import sys import DST if tim is not None: tim.getTime(False) old_time = tim.getOldTime() if config.data is None: raise RuntimeError("Need to pass a data filename to the driver "\ +"script.") dst_type = hlr_utils.file_peeker(config.data[0]) if config.verbose: print "Initial file type:", config.dst_type d_som1 = None counter = 0 for data_file in config.data: if config.verbose: print "File:", data_file try: data_dst = DST.getInstance(dst_type, data_file) except SystemError: print "ERROR: Failed to data read file %s" % data_file sys.exit(-1) if verbose: print "Reading data file %d" % counter if counter == 0: d_som1 = data_dst.getSOM() if tim is not None: tim.getTime(msg="After reading data") else: d_som_t = data_dst.getSOM() if tim is not None: tim.getTime(msg="After reading data") d_som1 = common_lib.add_ncerr(d_som_t, d_som1) if tim is not None: tim.getTime(msg="After adding spectra") del d_som_t if tim is not None: tim.getTime(msg="After SOM deletion") data_dst.release_resource() del data_dst counter += 1 if tim is not None: tim.getTime(msg="After resource release and DST deletion") hlr_utils.write_file(config.output, dst_type, d_som1, verbose=config.verbose, message="combined file") if tim is not None: tim.setOldTime(old_time) tim.getTime(msg="Total Running Time")
00a2f2ab04a3d2c100930f95188f9e40495d16d3 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/763/00a2f2ab04a3d2c100930f95188f9e40495d16d3/agg_dr_files.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 1425, 16, 1658, 4672, 3536, 1220, 707, 353, 1625, 326, 501, 20176, 1207, 5571, 2731, 18, 225, 632, 891, 642, 30, 1033, 4191, 326, 501, 20176, 1664, 1779, 18, 632, 723, 642, 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, 1086, 12, 1425, 16, 1658, 4672, 3536, 1220, 707, 353, 1625, 326, 501, 20176, 1207, 5571, 2731, 18, 225, 632, 891, 642, 30, 1033, 4191, 326, 501, 20176, 1664, 1779, 18, 632, 723, 642, 3...
joiner = '\n--' + boundary + '\n' self._fp.write(joiner.join(msgtexts)) print >> self._fp, '\n--' + boundary + '--',
if msgtexts: self._fp.write(msgtexts.pop(0)) for body_part in msgtexts: print >> self._fp, '\n--' + boundary self._fp.write(body_part) self._fp.write('\n--' + boundary + '--')
def _handle_multipart(self, msg): # The trick here is to write out each part separately, merge them all # together, and then make sure that the boundary we've chosen isn't # present in the payload. msgtexts = [] subparts = msg.get_payload() if subparts is None: # Nothing has ever been attached boundary = msg.get_boundary(failobj=_make_boundary()) print >> self._fp, '--' + boundary print >> self._fp, '\n' print >> self._fp, '--' + boundary + '--' return elif _isstring(subparts): # e.g. a non-strict parse of a message with no starting boundary. self._fp.write(subparts) return elif not isinstance(subparts, ListType): # Scalar payload subparts = [subparts] for part in subparts: s = StringIO() g = self.clone(s) g.flatten(part, unixfrom=False) msgtexts.append(s.getvalue()) # Now make sure the boundary we've selected doesn't appear in any of # the message texts. alltext = NL.join(msgtexts) # BAW: What about boundaries that are wrapped in double-quotes? boundary = msg.get_boundary(failobj=_make_boundary(alltext)) # If we had to calculate a new boundary because the body text # contained that string, set the new boundary. We don't do it # unconditionally because, while set_boundary() preserves order, it # doesn't preserve newlines/continuations in headers. This is no big # deal in practice, but turns out to be inconvenient for the unittest # suite. if msg.get_boundary() <> boundary: msg.set_boundary(boundary) # Write out any preamble if msg.preamble is not None: self._fp.write(msg.preamble) # If preamble is the empty string, the length of the split will be # 1, but the last element will be the empty string. If it's # anything else but does not end in a line separator, the length # will be > 1 and not end in an empty string. We need to # guarantee a newline after the preamble, but don't add too many. plines = NLCRE.split(msg.preamble) if plines <> [''] and plines[-1] <> '': self._fp.write('\n') # First boundary is a bit different; it doesn't have a leading extra # newline. print >> self._fp, '--' + boundary # Join and write the individual parts joiner = '\n--' + boundary + '\n' self._fp.write(joiner.join(msgtexts)) print >> self._fp, '\n--' + boundary + '--', # Write out any epilogue if msg.epilogue is not None: if not msg.epilogue.startswith('\n'): print >> self._fp self._fp.write(msg.epilogue)
06f820621b37df5c977e2d2239c494cb51a805fb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/06f820621b37df5c977e2d2239c494cb51a805fb/Generator.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4110, 67, 16404, 12, 2890, 16, 1234, 4672, 468, 1021, 28837, 2674, 353, 358, 1045, 596, 1517, 1087, 18190, 16, 2691, 2182, 777, 468, 9475, 16, 471, 1508, 1221, 3071, 716, 326, 7679,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4110, 67, 16404, 12, 2890, 16, 1234, 4672, 468, 1021, 28837, 2674, 353, 358, 1045, 596, 1517, 1087, 18190, 16, 2691, 2182, 777, 468, 9475, 16, 471, 1508, 1221, 3071, 716, 326, 7679,...
r = re.compile(r"(?P<name>[a-zA_Z0-9_*]+)(?P<default>=.*?)?, ")
r = re.compile(r"(?P<name>[a-zA-Z0-9_*]+)(?P<default>=.*?)?, ")
def mangle_signature(sig, max_chars=30): """Reformat a function signature to a more compact form.""" sig = re.sub(r"^\((.*)\)$", r"\1", sig) + ", " r = re.compile(r"(?P<name>[a-zA_Z0-9_*]+)(?P<default>=.*?)?, ") items = r.findall(sig) args = [] opts = [] total_len = 4 for name, default in items: if default: opts.append(name) else: args.append(name) total_len += len(name) + 2 if total_len > max_chars: if opts: opts.append('...') else: args.append('...') break if opts and args: sig = ", ".join(args) + "[, " + ", ".join(opts) + "]" elif opts and not args: sig = "[" + ", ".join(opts) + "]" else: sig = ", ".join(args) sig = unicode(sig).replace(u" ", u"\u00a0") return u"(%s)" % sig
29d1ac5cbcffa13c5fbe4e9d8768d9df6d57299a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7032/29d1ac5cbcffa13c5fbe4e9d8768d9df6d57299a/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 312, 4341, 67, 8195, 12, 7340, 16, 943, 67, 7549, 33, 5082, 4672, 3536, 426, 2139, 279, 445, 3372, 358, 279, 1898, 6739, 646, 12123, 3553, 273, 283, 18, 1717, 12, 86, 6, 17134, 12, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 312, 4341, 67, 8195, 12, 7340, 16, 943, 67, 7549, 33, 5082, 4672, 3536, 426, 2139, 279, 445, 3372, 358, 279, 1898, 6739, 646, 12123, 3553, 273, 283, 18, 1717, 12, 86, 6, 17134, 12, 2...
return b2a_hex(kd_value( b2a_hex(h_value(a1)),"%s:%s:%s:%s:%s" % (
return b2a_hex(_kd_value( b2a_hex(_h_value(a1)),"%s:%s:%s:%s:%s" % (
def compute_response_auth(urp_hash,nonce,cnonce,nonce_count,authzid,digest_uri): """Compute DIGEST-MD5 rspauth value. :Parameters: - `urp_hash`: MD5 sum of username:realm:password. - `nonce`: nonce value from a server challenge. - `cnonce`: cnonce value from the client response. - `nonce_count`: nonce count value. - `authzid`: authorization id. - `digest_uri`: digest-uri value. :Types: - `urp_hash`: `str` - `nonce`: `str` - `nonce_count`: `int` - `authzid`: `str` - `digest_uri`: `str` :return: the computed rspauth value. :returntype: `str`""" if authzid: a1="%s:%s:%s:%s" % (urp_hash,nonce,cnonce,authzid) else: a1="%s:%s:%s" % (urp_hash,nonce,cnonce) a2=":"+digest_uri return b2a_hex(kd_value( b2a_hex(h_value(a1)),"%s:%s:%s:%s:%s" % ( nonce,nonce_count, cnonce,"auth",b2a_hex(h_value(a2)) ) ))
1e1db4225095c220966b09e2e9bd16f3ebaf7760 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12769/1e1db4225095c220966b09e2e9bd16f3ebaf7760/digest_md5.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3671, 67, 2740, 67, 1944, 12, 295, 84, 67, 2816, 16, 12824, 16, 71, 12824, 16, 12824, 67, 1883, 16, 1944, 94, 350, 16, 10171, 67, 1650, 4672, 3536, 7018, 24313, 11027, 17, 6188, 25, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3671, 67, 2740, 67, 1944, 12, 295, 84, 67, 2816, 16, 12824, 16, 71, 12824, 16, 12824, 67, 1883, 16, 1944, 94, 350, 16, 10171, 67, 1650, 4672, 3536, 7018, 24313, 11027, 17, 6188, 25, ...
methods = [] cbNames = [] if condition & gtk.GDK.INPUT_READ: methods.append(getattr(source, 'doRead')) cbNames.append('doRead') if (condition & gtk.GDK.INPUT_WRITE): method = getattr(source, 'doWrite') if not (method in methods): methods.append(method) cbNames.append('doWrite') for method, cbName in zip(methods, cbNames): why = None
log.logOwner.own(source) why = None if 0: pass else:
def callback(self, source, condition): methods = [] cbNames = []
75b1765d5873ffbeeadd2a889fd326eea2bf41b0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/75b1765d5873ffbeeadd2a889fd326eea2bf41b0/gtkreactor.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1348, 12, 2890, 16, 1084, 16, 2269, 4672, 2590, 273, 5378, 2875, 1557, 273, 5378, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1348, 12, 2890, 16, 1084, 16, 2269, 4672, 2590, 273, 5378, 2875, 1557, 273, 5378, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
r""" Tribonacci numbers: a(n) = a(n-1) + a(n-2) + a(n-3). Starting with 0, 0, 1, ... INPUT: n -- non negative integer OUTPUT: integer -- function value EXAMPLES: sage: a = sloane.A000073;a Tribonacci numbers: a(n) = a(n-1) + a(n-2) + a(n-3). sage: a(0) 0 sage: a(1) 0 sage: a(2) 1 sage: a(11) 149 sage: a.list(12) [0, 0, 1, 1, 2, 4, 7, 13, 24, 44, 81, 149] AUTHOR: -- Jaap Spies (2007-01-19) """ def __init__(self):
def __init__(self): r""" Tribonacci numbers: a(n) = a(n-1) + a(n-2) + a(n-3). Starting with 0, 0, 1, ... INPUT: n -- non negative integer OUTPUT: integer -- function value EXAMPLES: sage: a = sloane.A000073;a Tribonacci numbers: a(n) = a(n-1) + a(n-2) + a(n-3). sage: a(0) 0 sage: a(1) 0 sage: a(2) 1 sage: a(11) 149 sage: a.list(12) [0, 0, 1, 1, 2, 4, 7, 13, 24, 44, 81, 149] AUTHOR: -- Jaap Spies (2007-01-19) """
def list(self, n): self._eval(n) # force computation return self._b[:n]
7b02e5455d5d52d6dcc7f2314cdd56803031a1c6 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/7b02e5455d5d52d6dcc7f2314cdd56803031a1c6/sloane_functions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 666, 12, 2890, 16, 290, 4672, 365, 6315, 8622, 12, 82, 13, 282, 468, 2944, 16039, 327, 365, 6315, 70, 10531, 82, 65, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 666, 12, 2890, 16, 290, 4672, 365, 6315, 8622, 12, 82, 13, 282, 468, 2944, 16039, 327, 365, 6315, 70, 10531, 82, 65, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
for idx in range(len(self.OPTIONAL_HEADER.DATA_DIRECTORY)):
for idx in xrange(len(self.OPTIONAL_HEADER.DATA_DIRECTORY)):
def dump_info(self, dump=None): """Dump all the PE header information into human readable string.""" if dump is None: dump = Dump() warnings = self.get_warnings() if warnings: dump.add_header('Parsing Warnings') for warning in warnings: dump.add_line(warning) dump.add_newline() dump.add_header('DOS_HEADER') dump.add_lines(self.DOS_HEADER.dump()) dump.add_newline() dump.add_header('NT_HEADERS') dump.add_lines(self.NT_HEADERS.dump()) dump.add_newline() dump.add_header('FILE_HEADER') dump.add_lines(self.FILE_HEADER.dump()) image_flags = self.retrieve_flags(IMAGE_CHARACTERISTICS, 'IMAGE_FILE_') dump.add('Flags: ') flags = [] for flag in image_flags: if getattr(self.FILE_HEADER, flag[0]): flags.append(flag[0]) dump.add_line(', '.join(flags)) dump.add_newline() if hasattr(self, 'OPTIONAL_HEADER') and self.OPTIONAL_HEADER is not None: dump.add_header('OPTIONAL_HEADER') dump.add_lines(self.OPTIONAL_HEADER.dump())
21cbdaf9ea57ad8ceb3b39cbd606211597c127d9 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/213/21cbdaf9ea57ad8ceb3b39cbd606211597c127d9/pefile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4657, 67, 1376, 12, 2890, 16, 4657, 33, 7036, 4672, 3536, 10628, 777, 326, 16628, 1446, 1779, 1368, 8672, 7471, 533, 12123, 282, 309, 4657, 353, 599, 30, 4657, 273, 18242, 1435, 225, 559...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4657, 67, 1376, 12, 2890, 16, 4657, 33, 7036, 4672, 3536, 10628, 777, 326, 16628, 1446, 1779, 1368, 8672, 7471, 533, 12123, 282, 309, 4657, 353, 599, 30, 4657, 273, 18242, 1435, 225, 559...
None, [cty.POINTER(FL_OBJECT), cty.c_double],
None, [cty.POINTER(FL_OBJECT), cty.c_double],
def fl_set_positioner_xstep(ob, value): """ fl_set_positioner_xstep(ob, value) """ _fl_set_positioner_xstep(ob, value)
9942dac8ce2b35a1e43615a26fd8e7054ef805d3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2429/9942dac8ce2b35a1e43615a26fd8e7054ef805d3/xformslib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1183, 67, 542, 67, 3276, 264, 67, 92, 4119, 12, 947, 16, 460, 4672, 3536, 1183, 67, 542, 67, 3276, 264, 67, 92, 4119, 12, 947, 16, 460, 13, 3536, 225, 389, 2242, 67, 542, 67, 3276,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1183, 67, 542, 67, 3276, 264, 67, 92, 4119, 12, 947, 16, 460, 4672, 3536, 1183, 67, 542, 67, 3276, 264, 67, 92, 4119, 12, 947, 16, 460, 13, 3536, 225, 389, 2242, 67, 542, 67, 3276,...
dbapi = MockDBAPI() p = pool.QueuePool(creator=lambda: dbapi.connect('foo.db'), pool_size=1, max_overflow=0, use_threadlocal=False)
p = self._queuepool_fixture(pool_size=1, max_overflow=0)
def test_properties(self): dbapi = MockDBAPI() p = pool.QueuePool(creator=lambda: dbapi.connect('foo.db'), pool_size=1, max_overflow=0, use_threadlocal=False)
7513b46730d1b57a6b8addde8dfb4f83ee1e6cb4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1074/7513b46730d1b57a6b8addde8dfb4f83ee1e6cb4/test_pool.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 4738, 12, 2890, 4672, 1319, 2425, 273, 7867, 2290, 2557, 1435, 293, 273, 2845, 18, 3183, 2864, 12, 20394, 33, 14661, 30, 1319, 2425, 18, 3612, 2668, 11351, 18, 1966, 19899, 284...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 4738, 12, 2890, 4672, 1319, 2425, 273, 7867, 2290, 2557, 1435, 293, 273, 2845, 18, 3183, 2864, 12, 20394, 33, 14661, 30, 1319, 2425, 18, 3612, 2668, 11351, 18, 1966, 19899, 284...
try: return rawval % d except KeyError, key: raise InterpolationError(key, option, section, rawval)
value = rawval while 1: if not string.find(value, "%("): try: value = value % d except KeyError, key: raise InterpolationError(key, option, section, rawval) else: return value
def get(self, section, option, raw=0): """Get an option value for a given section.
1f513386280039f6b48cee0b120d5d901ec92f20 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/1f513386280039f6b48cee0b120d5d901ec92f20/ConfigParser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 12, 2890, 16, 2442, 16, 1456, 16, 1831, 33, 20, 4672, 3536, 967, 392, 1456, 460, 364, 279, 864, 2442, 18, 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, 336, 12, 2890, 16, 2442, 16, 1456, 16, 1831, 33, 20, 4672, 3536, 967, 392, 1456, 460, 364, 279, 864, 2442, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
self.write("Unsupported characters in input")
self.write("Unsupported characters in input\n")
def runsource(self, source): "Extend base class method: Stuff the source in the line cache first" filename = self.stuffsource(source) self.more = 0 self.save_warnings_filters = warnings.filters[:] warnings.filterwarnings(action="error", category=SyntaxWarning) if isinstance(source, types.UnicodeType): import IOBinding try: source = source.encode(IOBinding.encoding) except UnicodeError: self.tkconsole.resetoutput() self.write("Unsupported characters in input") return try: # InteractiveInterpreter.runsource() calls its runcode() method, # which is overridden (see below) return InteractiveInterpreter.runsource(self, source, filename) finally: if self.save_warnings_filters is not None: warnings.filters[:] = self.save_warnings_filters self.save_warnings_filters = None
cd3d8bee022cda55c43c2130122d092f5059d115 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/cd3d8bee022cda55c43c2130122d092f5059d115/PyShell.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 3168, 12, 2890, 16, 1084, 4672, 315, 16675, 1026, 667, 707, 30, 934, 3809, 326, 1084, 316, 326, 980, 1247, 1122, 6, 1544, 273, 365, 18, 334, 696, 2556, 552, 12, 3168, 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, 1086, 3168, 12, 2890, 16, 1084, 4672, 315, 16675, 1026, 667, 707, 30, 934, 3809, 326, 1084, 316, 326, 980, 1247, 1122, 6, 1544, 273, 365, 18, 334, 696, 2556, 552, 12, 3168, 13, 365, ...
try: model, rows = self.get_selection().get_selected_rows()
try: model, paths = self.get_selection().get_selected_rows()
def get_selected(self): try: model, rows = self.get_selection().get_selected_rows() except AttributeError: return [] else: return [model[row][0] for row in rows]
65c353a2f58dd189cd3918d5836dbf8ca05e5f5f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4764/65c353a2f58dd189cd3918d5836dbf8ca05e5f5f/paned.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 8109, 12, 2890, 4672, 775, 30, 938, 16, 2953, 273, 365, 18, 588, 67, 10705, 7675, 588, 67, 8109, 67, 3870, 1435, 1335, 6394, 30, 327, 5378, 469, 30, 327, 306, 2284, 63, 492,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 336, 67, 8109, 12, 2890, 4672, 775, 30, 938, 16, 2953, 273, 365, 18, 588, 67, 10705, 7675, 588, 67, 8109, 67, 3870, 1435, 1335, 6394, 30, 327, 5378, 469, 30, 327, 306, 2284, 63, 492,...
req.hdf['search.q'] = query
def perform_query(self, req, query, changeset, tickets, wiki, page=0): if not query: return ([], 0) keywords = query.split(' ')
cd1b1b32cec26187b1c9fa71e55a76888f1c342e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/cd1b1b32cec26187b1c9fa71e55a76888f1c342e/Search.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3073, 67, 2271, 12, 2890, 16, 1111, 16, 843, 16, 22463, 16, 24475, 16, 9050, 16, 1363, 33, 20, 4672, 309, 486, 843, 30, 327, 23265, 6487, 374, 13, 7093, 273, 843, 18, 4939, 2668, 862...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3073, 67, 2271, 12, 2890, 16, 1111, 16, 843, 16, 22463, 16, 24475, 16, 9050, 16, 1363, 33, 20, 4672, 309, 486, 843, 30, 327, 23265, 6487, 374, 13, 7093, 273, 843, 18, 4939, 2668, 862...
file = os.path.abspath(file)
def add(self, files, options=''): """ Add the given list of files (or file) or directories to your HG repository. They must exist already.
d0cd56771da2be85c4c0f0ebdfda11e36b0917cf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9417/d0cd56771da2be85c4c0f0ebdfda11e36b0917cf/hg.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 12, 2890, 16, 1390, 16, 702, 2218, 11, 4672, 3536, 1436, 326, 864, 666, 434, 1390, 261, 280, 585, 13, 578, 6402, 358, 3433, 670, 43, 3352, 18, 225, 16448, 1297, 1005, 1818, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 12, 2890, 16, 1390, 16, 702, 2218, 11, 4672, 3536, 1436, 326, 864, 666, 434, 1390, 261, 280, 585, 13, 578, 6402, 358, 3433, 670, 43, 3352, 18, 225, 16448, 1297, 1005, 1818, 18, ...
('gazpach+document+redo', 'Cut'), ('gazpach+document+redo', 'Copy'), ('gazpach+document+redo', 'Paste'), ('gazpach+document+redo', 'Delete'),
('gazpach+document+cut', 'Cut'), ('gazpach+document+copy', 'Copy'), ('gazpach+document+paste', 'Paste'), ('gazpach+document+delete', 'Delete'),
def connect_actions(self): for pact, gact in [('gazpach+document+save', 'Save'), ('gazpach+document+save_as', 'SaveAs'), ('gazpach+document+undo', 'Undo'), ('gazpach+document+redo', 'Redo'), ('gazpach+document+redo', 'Cut'), ('gazpach+document+redo', 'Copy'), ('gazpach+document+redo', 'Paste'), ('gazpach+document+redo', 'Delete'), ]: self.__connect_action(pact, gact)
d6f1ff8ff54ab06c74ba6809a4dbb874ac63bdef /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2233/d6f1ff8ff54ab06c74ba6809a4dbb874ac63bdef/gazpach.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3077, 67, 4905, 12, 2890, 4672, 364, 293, 621, 16, 314, 621, 316, 306, 2668, 75, 1561, 84, 497, 15, 5457, 15, 5688, 2187, 296, 4755, 19899, 7707, 75, 1561, 84, 497, 15, 5457, 15, 568...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3077, 67, 4905, 12, 2890, 4672, 364, 293, 621, 16, 314, 621, 316, 306, 2668, 75, 1561, 84, 497, 15, 5457, 15, 5688, 2187, 296, 4755, 19899, 7707, 75, 1561, 84, 497, 15, 5457, 15, 568...
self.menu.SetMenuItem
self.menu.SetMenuItemKeyGlyph(item, shortcut[2])
def additem(self, label, shortcut=None, callback=None, kind=None): self.menu.AppendMenu('x') # add a dummy string self.items.append(label, shortcut, callback, kind) item = len(self.items) self.menu.SetMenuItemText(item, label) # set the actual text if shortcut and type(shortcut) == type(()): modifiers, char = shortcut[:2] self.menu.SetItemCmd(item, ord(char)) self.menu.SetMenuItemModifiers(item, modifiers) if len(shortcut) > 2: self.menu.SetMenuItem elif shortcut: self.menu.SetItemCmd(item, ord(shortcut)) return item
5fc9371e555582216aac97abfdf3250228752ea4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/5fc9371e555582216aac97abfdf3250228752ea4/FrameWork.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 1726, 12, 2890, 16, 1433, 16, 10995, 33, 7036, 16, 1348, 33, 7036, 16, 3846, 33, 7036, 4672, 365, 18, 5414, 18, 5736, 4599, 2668, 92, 6134, 202, 202, 7, 527, 279, 9609, 533, 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, 527, 1726, 12, 2890, 16, 1433, 16, 10995, 33, 7036, 16, 1348, 33, 7036, 16, 3846, 33, 7036, 4672, 365, 18, 5414, 18, 5736, 4599, 2668, 92, 6134, 202, 202, 7, 527, 279, 9609, 533, 365...
if len(taxes[0]) >= 3 and taxes[0][2]: taxes=tax_obj.browse(cr, uid, taxes[0][2])
if taxes: if context.get('client','') == 'web': tax_ids = taxes elif len(taxes[0]) >= 3 and taxes[0][2]: tax_ids = taxes[0][2] else: continue taxes = tax_obj.browse(cr, uid, tax_ids)
def _price_unit_default(self, cr, uid, context=None): if context is None: context = {} if 'check_total' in context: t = context['check_total'] for l in context.get('invoice_line', {}): if isinstance(l, (list, tuple)) and len(l) >= 3 and l[2]: tax_obj = self.pool.get('account.tax') p = l[2].get('price_unit', 0) * (1-l[2].get('discount', 0)/100.0) t = t - (p * l[2].get('quantity')) taxes = l[2].get('invoice_line_tax_id') if len(taxes[0]) >= 3 and taxes[0][2]: taxes=tax_obj.browse(cr, uid, taxes[0][2]) for tax in tax_obj.compute(cr, uid, taxes, p,l[2].get('quantity'), context.get('address_invoice_id', False), l[2].get('product_id', False), context.get('partner_id', False)): t = t - tax['amount'] return t return 0
20992e6297ca732271251173797b929add70bbdf /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/20992e6297ca732271251173797b929add70bbdf/invoice.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8694, 67, 4873, 67, 1886, 12, 2890, 16, 4422, 16, 4555, 16, 819, 33, 7036, 4672, 309, 819, 353, 599, 30, 819, 273, 2618, 309, 296, 1893, 67, 4963, 11, 316, 819, 30, 268, 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, 8694, 67, 4873, 67, 1886, 12, 2890, 16, 4422, 16, 4555, 16, 819, 33, 7036, 4672, 309, 819, 353, 599, 30, 819, 273, 2618, 309, 296, 1893, 67, 4963, 11, 316, 819, 30, 268, 273, ...
for lfn in args: result = dirac.getReplicas(args,printOutput=True) if not result['OK']: errorList.append( (lfn, result['Message']) ) exitCode = 2 for error in errorList: print "ERROR %s: %s" % error
result = dirac.getReplicas(args,printOutput=True) if not result['OK']: exitCode = 2 print "ERROR:", result['Message']
def usage(): print 'Usage: %s <LFN> [<LFN>]' %(Script.scriptName) DIRAC.exit(2)
c7a9f1e632a2d15c14adab6bfeba2496febac2a0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/c7a9f1e632a2d15c14adab6bfeba2496febac2a0/dirac-dms-lfn-replicas.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4084, 13332, 1172, 296, 5357, 30, 738, 87, 411, 9105, 50, 34, 306, 32, 9105, 50, 34, 3864, 8975, 3651, 18, 4263, 461, 13, 18544, 2226, 18, 8593, 12, 22, 13, 225, 2, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4084, 13332, 1172, 296, 5357, 30, 738, 87, 411, 9105, 50, 34, 306, 32, 9105, 50, 34, 3864, 8975, 3651, 18, 4263, 461, 13, 18544, 2226, 18, 8593, 12, 22, 13, 225, 2, -100, -100, -100,...
self._docmap[None] = None
documented = self._docmap.copy() documented[None] = None is_documented = documented.has_key
def _write_project_toc(self, public, private): """ @return: An HTML page containing the table of contents page for the whole project. This page lists the classes, exceptions, functions, and variables defined by any module or package in the project. @rtype: C{string} """ # Header and name. str = self._header('Everything') str += ('<center><font size="+1"><b>Everything</b>' + '</font></center>\n<hr>\n') public.write(str); private.write(str)
dad6dd09c82d3878a78d977cc13da79d4420db2b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/dad6dd09c82d3878a78d977cc13da79d4420db2b/html.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2626, 67, 4406, 67, 1391, 12, 2890, 16, 1071, 16, 3238, 4672, 3536, 632, 2463, 30, 1922, 3982, 1363, 4191, 326, 1014, 434, 2939, 1363, 364, 326, 7339, 1984, 18, 225, 1220, 1363, 6...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2626, 67, 4406, 67, 1391, 12, 2890, 16, 1071, 16, 3238, 4672, 3536, 632, 2463, 30, 1922, 3982, 1363, 4191, 326, 1014, 434, 2939, 1363, 364, 326, 7339, 1984, 18, 225, 1220, 1363, 6...
'''An alias for reload()'''
'''An alias for refresh()'''
def reload(self): '''An alias for reload()''' self.refresh()
c56f01c31189e0f10469416b01690c6f59e12094 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5050/c56f01c31189e0f10469416b01690c6f59e12094/base.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7749, 12, 2890, 4672, 9163, 979, 2308, 364, 4460, 1435, 26418, 365, 18, 9144, 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, ...
[ 1, 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, 7749, 12, 2890, 4672, 9163, 979, 2308, 364, 4460, 1435, 26418, 365, 18, 9144, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
return self._value
return bool(self._value)
def __nonzero__(self): if self._track and self._value is not None: self._used = True return self._value
54f4ecb60ca7822eaf866d7338e843c77cdc5d0a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8747/54f4ecb60ca7822eaf866d7338e843c77cdc5d0a/use.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 26449, 972, 12, 2890, 4672, 309, 365, 6315, 4101, 471, 365, 6315, 1132, 353, 486, 599, 30, 365, 6315, 3668, 273, 1053, 327, 365, 6315, 1132, 2, 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, 26449, 972, 12, 2890, 4672, 309, 365, 6315, 4101, 471, 365, 6315, 1132, 353, 486, 599, 30, 365, 6315, 3668, 273, 1053, 327, 365, 6315, 1132, 2, -100, -100, -100, -100, -100, -100, ...
if elevmask is not None:
if elevmask is not None and numpy.any(elevmask):
def setmask(mask,newmask): if mask is None: zshape = list(elev.shape) zshape.insert(1,self.store['z'].getShape()[1]) mask = numpy.empty(zshape,dtype=numpy.bool) mask[...] = newmask else: mask = numpy.logical_or(mask,newmask) return mask
139f8463dbb589a260c52e7a969ab5c4018360d0 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/381/139f8463dbb589a260c52e7a969ab5c4018360d0/data.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 4455, 12, 4455, 16, 2704, 4455, 4672, 309, 3066, 353, 599, 30, 998, 4867, 273, 666, 12, 6516, 90, 18, 4867, 13, 998, 4867, 18, 6387, 12, 21, 16, 2890, 18, 2233, 3292, 94, 29489,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 4455, 12, 4455, 16, 2704, 4455, 4672, 309, 3066, 353, 599, 30, 998, 4867, 273, 666, 12, 6516, 90, 18, 4867, 13, 998, 4867, 18, 6387, 12, 21, 16, 2890, 18, 2233, 3292, 94, 29489,...
{'british_thermal_unit':'Defined to be the amount of energy required to raise the temperature of one pound of liquid water from 60 degrees Fahrenheit to 61 degrees Fahrenheit at a constant pressure of one atmosphere.\nApproximately equal to 1055.05585 joules.', 'btu':'Abbreviation for British thermal unit.\nApproximately equal to 1055.05585 joules.', 'calorie':'Defined to be the amount of energy required to raise the temperature of one gram of liquid water one degree Celsius.\nEqual to 4.1868 joules.', 'electron_volt':'Defined to be the amount of kinetic energy gained by a single unbound electron when it accelerates through an electrostatic potential difference of 1 volt.\nApproximately equal to 1.602*10^-19 joules.', 'erg':'CGS unit for energy defined to be gram*centimeter^2/second^2.\nEqual to 10^-7 joules.', 'ev':'Abbreviation for electron volt.\nApproximately equal to 1.602*10^-19 joules.', 'joule':'SI derived unit of energy.\nDefined to be kilogram*meter^2/second^2.', 'rydberg':'Defined to be the absolute value of the binding energy of the electron in the ground state hydrogen atom.\nApproximately equal to 2.17987*10^-18 joules.', 'therm':'Defined to be 100,000 British thermal units.\nApproximately equal to 1.05505585*10^8 joules.'},
{'british_thermal_unit':'Defined to be the amount of energy required to raise the temperature of one pound of liquid water from 60 degrees Fahrenheit to 61 degrees Fahrenheit at a constant pressure of one atmosphere.\nApproximately equal to 1055.05585 joules.', 'btu':'Abbreviation for British thermal unit.\nApproximately equal to 1055.05585 joules.', 'calorie':'Defined to be the amount of energy required to raise the temperature of one gram of liquid water one degree Celsius.\nEqual to 4.1868 joules.', 'electron_volt':'Defined to be the amount of kinetic energy gained by a single unbound electron when it accelerates through an electrostatic potential difference of 1 volt.\nApproximately equal to 1.602*10^-19 joules.', 'erg':'CGS unit for energy defined to be gram*centimeter^2/second^2.\nEqual to 10^-7 joules.', 'ev':'Abbreviation for electron volt.\nApproximately equal to 1.602*10^-19 joules.', 'joule':'SI derived unit of energy.\nDefined to be kilogram*meter^2/second^2.', 'rydberg':'Defined to be the absolute value of the binding energy of the electron in the ground state hydrogen atom.\nApproximately equal to 2.17987*10^-18 joules.', 'therm':'Defined to be 100,000 British thermal units.\nApproximately equal to 1.05505585*10^8 joules.'},
def evalunitdict(): """ Replace all the string values of the unitdict variable by their evaluated forms, and builds some other tables for ease of use. This function is mainly used internally, for efficiency (and flexibility) purposes, making it easier to describe the units. EXAMPLES:: sage: sage.symbolic.units.evalunitdict() """ from sage.misc.all import sage_eval for key, value in unitdict.iteritems(): unitdict[key] = dict([(a,sage_eval(repr(b))) for a, b in value.iteritems()]) # FEATURE IDEA: create a function that would allow users to add # new entries to the table without having to know anything about # how the table is stored internally. # # Format the table for easier use. # for k, v in unitdict.iteritems(): for a in v: unit_to_type[a] = k for w in unitdict.iterkeys(): for j in unitdict[w].iterkeys(): if type(unitdict[w][j]) == tuple: unitdict[w][j] = unitdict[w][j][0] value_to_unit[w] = dict(zip(unitdict[w].itervalues(), unitdict[w].iterkeys()))
ed891e5784edd8a5e4d544f1ef837edc82b93924 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/ed891e5784edd8a5e4d544f1ef837edc82b93924/units.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5302, 4873, 1576, 13332, 3536, 6910, 777, 326, 533, 924, 434, 326, 2836, 1576, 2190, 635, 3675, 12697, 10138, 16, 471, 10736, 2690, 1308, 4606, 364, 28769, 434, 999, 18, 1220, 445, 353, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5302, 4873, 1576, 13332, 3536, 6910, 777, 326, 533, 924, 434, 326, 2836, 1576, 2190, 635, 3675, 12697, 10138, 16, 471, 10736, 2690, 1308, 4606, 364, 28769, 434, 999, 18, 1220, 445, 353, ...
(\]_)
(?P<fnend>\]_)
def parse(self, text, lineno, memo, parent): """ Return 2 lists: nodes (text and inline elements), and system_messages.
6782c922e166489b456fc617b1d5765e9532726e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1532/6782c922e166489b456fc617b1d5765e9532726e/states.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 12, 2890, 16, 977, 16, 7586, 16, 11063, 16, 982, 4672, 3536, 2000, 576, 6035, 30, 2199, 261, 955, 471, 6370, 2186, 3631, 471, 2619, 67, 6833, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 12, 2890, 16, 977, 16, 7586, 16, 11063, 16, 982, 4672, 3536, 2000, 576, 6035, 30, 2199, 261, 955, 471, 6370, 2186, 3631, 471, 2619, 67, 6833, 18, 2, -100, -100, -100, -100, -100,...
msg += "\n\nEither you wrongly customised this view, or some modules bringing those views are not compatible with your current data model"
msg += "\n\nEither you wrongly customized this view, or some modules bringing those views are not compatible with your current data model"
fields_def = self.__view_look_dom(cr, user, node, view_id, context=context)
26bb219a74ca586de0f935e544991a9202da311f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/26bb219a74ca586de0f935e544991a9202da311f/orm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1466, 67, 536, 273, 365, 16186, 1945, 67, 7330, 67, 9859, 12, 3353, 16, 729, 16, 756, 16, 1476, 67, 350, 16, 819, 33, 2472, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1466, 67, 536, 273, 365, 16186, 1945, 67, 7330, 67, 9859, 12, 3353, 16, 729, 16, 756, 16, 1476, 67, 350, 16, 819, 33, 2472, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
file_info = file.query_info('*') icon = file_info.get_icon() for icon_name in icon.get_names(): if icon_theme.has_icon(icon_name): status_icon = icon_name break
if file.query_exists(): file_info = file.query_info('*') icon = file_info.get_icon() for icon_name in icon.get_names(): if icon_theme.has_icon(icon_name): status_icon = icon_name break
def update_by_iter(self, iter, downloading=None, include_description=False, \ generate_thumbnails=False): episode = self.get_value(iter, self.C_EPISODE) episode.reload_from_db()
9eafa4426a1ca5711ac958173fad4e5508ef0946 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12778/9eafa4426a1ca5711ac958173fad4e5508ef0946/model.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 67, 1637, 67, 2165, 12, 2890, 16, 1400, 16, 23742, 33, 7036, 16, 2341, 67, 3384, 33, 8381, 16, 521, 2103, 67, 14904, 87, 33, 8381, 4672, 17054, 273, 365, 18, 588, 67, 1132, 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, 1089, 67, 1637, 67, 2165, 12, 2890, 16, 1400, 16, 23742, 33, 7036, 16, 2341, 67, 3384, 33, 8381, 16, 521, 2103, 67, 14904, 87, 33, 8381, 4672, 17054, 273, 365, 18, 588, 67, 1132, 12,...
url = YT_GET_VIDEO_URL % (video_id, t, fmt)
url = fmts_info[str(fmt)]
def GetYouTubeVideo(video_id): yt_page = HTTP.Request(YT_VIDEO_PAGE % (video_id), cacheTime=1) t = re.findall('&t=([^&]+)', yt_page)[0] fmt_list = re.findall('&fmt_list=([^&]+)', yt_page)[0] fmt_list = String.Unquote(fmt_list, usePlus=False) fmts = re.findall('([0-9]+)[^,]*', fmt_list) index = YT_VIDEO_FORMATS.index( Prefs.Get('ytfmt') ) if YT_FMT[index] in fmts: fmt = YT_FMT[index] else: for i in reversed( range(0, index+1) ): if str(YT_FMT[i]) in fmts: fmt = YT_FMT[i] break else: fmt = 5 url = YT_GET_VIDEO_URL % (video_id, t, fmt) return url
4bb0a776176091830105c9761cf4a92e6bc21491 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14804/4bb0a776176091830105c9761cf4a92e6bc21491/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 968, 6225, 27195, 10083, 12, 9115, 67, 350, 4672, 677, 88, 67, 2433, 273, 2239, 18, 691, 12, 61, 56, 67, 58, 27242, 67, 11219, 738, 261, 9115, 67, 350, 3631, 1247, 950, 33, 21, 13, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 968, 6225, 27195, 10083, 12, 9115, 67, 350, 4672, 677, 88, 67, 2433, 273, 2239, 18, 691, 12, 61, 56, 67, 58, 27242, 67, 11219, 738, 261, 9115, 67, 350, 3631, 1247, 950, 33, 21, 13, ...
self.assertIsNot(p.wait(), None)
self.assertNotEqual(p.wait(), 0)
def test_terminate(self): p = subprocess.Popen([sys.executable, "-c", "input()"])
78fd521f1a233016af31ebd37eee31a094236041 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8546/78fd521f1a233016af31ebd37eee31a094236041/test_subprocess.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 30017, 12, 2890, 4672, 293, 273, 6652, 18, 52, 3190, 3816, 9499, 18, 17751, 16, 3701, 71, 3113, 315, 2630, 10031, 5717, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 30017, 12, 2890, 4672, 293, 273, 6652, 18, 52, 3190, 3816, 9499, 18, 17751, 16, 3701, 71, 3113, 315, 2630, 10031, 5717, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
asn1.set_string('990807053011Z') assert str(asn1) == 'Aug 7 05:30:11 1999 GMT'
format = '%b %d %H:%M:%S %Y GMT' utcformat = '%y%m%d%H%M%SZ' s = '990807053011Z' asn1.set_string(s) t1 = time.strptime(str(asn1), format) t2 = time.strptime(s, utcformat) assert t1 == t2
def check_UTCTIME(self): asn1 = ASN1.ASN1_UTCTIME() assert str(asn1) == 'Bad time value' asn1.set_string('990807053011Z') assert str(asn1) == 'Aug 7 05:30:11 1999 GMT' asn1.set_time(500) assert str(asn1) == 'Jan 1 00:08:20 1970 GMT' t = long(time.time()) + time.timezone asn1.set_time(t) t2 = time.strftime('%b %d %H:%M:%S %Y', time.gmtime(t)) assert str(asn1)[:-4] == str(t2)
51fe75c78fae05538006cd82d0731474064ac3dd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8055/51fe75c78fae05538006cd82d0731474064ac3dd/test_asn1.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 1693, 1268, 3114, 12, 2890, 4672, 12211, 21, 273, 18598, 21, 18, 22269, 21, 67, 1693, 1268, 3114, 1435, 1815, 609, 12, 31432, 21, 13, 422, 296, 6434, 813, 460, 11, 225, 740, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1693, 1268, 3114, 12, 2890, 4672, 12211, 21, 273, 18598, 21, 18, 22269, 21, 67, 1693, 1268, 3114, 1435, 1815, 609, 12, 31432, 21, 13, 422, 296, 6434, 813, 460, 11, 225, 740, ...
if url[:2] == '//' and url[2:3] != '/':
if url[:2] == '//' and url[2:3] != '/' and url[2:12] != 'localhost/':
def open_file(self, url): """Use local file or FTP depending on form of URL.""" if url[:2] == '//' and url[2:3] != '/': return self.open_ftp(url) else: return self.open_local_file(url)
3ae2dc5e5ea7521426ce3f34afa18147435ede5c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/3ae2dc5e5ea7521426ce3f34afa18147435ede5c/urllib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1696, 67, 768, 12, 2890, 16, 880, 4672, 3536, 3727, 1191, 585, 578, 19324, 8353, 603, 646, 434, 1976, 12123, 309, 880, 10531, 22, 65, 422, 19696, 471, 880, 63, 22, 30, 23, 65, 480, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1696, 67, 768, 12, 2890, 16, 880, 4672, 3536, 3727, 1191, 585, 578, 19324, 8353, 603, 646, 434, 1976, 12123, 309, 880, 10531, 22, 65, 422, 19696, 471, 880, 63, 22, 30, 23, 65, 480, 2...
conditions += " %s `%s` %s '%s'" % (
conditions += " %s %s" % (
def on_template(self, button, t): current_table = self.get_selected_table() current_fc_table = current_table; if t.find("$table$") != -1: if not current_table: show_message("info", "no table selected!\nyou can't execute a template with $table$ in it, if you have no table selected!") return t = t.replace("$table$", self.escape_fieldname(current_table.name)) pos = t.find("$primary_key$") if pos != -1: if not current_table: show_message("info", "no table selected!\nyou can't execute a template with $primary_key$ in it, if you have no table selected!") return if not current_table.fields: show_message("info", "sorry, can't execute this template, because table '%s' has no fields!" % current_table.name) return # is the next token desc or asc? result = re.search("(?i)[ \t\r\n]*(de|a)sc", t[pos:]) order_dir = "" if result: o = result.group(1).lower() if o == "a": order_dir = "asc" else: order_dir = "desc" replace = "" while 1: primary_key = "" for name in current_table.field_order: props = current_table.fields[name] if props[3] != "PRI": continue if primary_key: primary_key += " " + order_dir + ", " primary_key += "`%s`" % self.escape_fieldname(name) if primary_key: replace = primary_key break key = "" for name in current_table.field_order: props = current_table.fields[name] if props[3] != "UNI": continue if key: key += " " + order_dir + ", " key += "`%s`" % self.escape_fieldname(name) if key: replace = key break replace = "`%s`" % self.escape_fieldname(current_table.field_order[0]) break t = t.replace("$primary_key$", replace) if t.find("$field_conditions$") != -1: if not self.field_conditions_initialized: self.field_conditions_initialized = True self.fc_count = 4 self.fc_window = self.xml.get_widget("field_conditions") table = self.xml.get_widget("fc_table") table.resize(1 + self.fc_count, 4) self.fc_entry = [] self.fc_combobox = [] self.fc_op_combobox = [] self.fc_logic_combobox = [] for i in range(self.fc_count): self.fc_entry.append(gtk.Entry()) self.fc_entry[i].connect("activate", lambda *e: self.fc_window.response(gtk.RESPONSE_OK)) self.fc_combobox.append(gtk.combo_box_new_text()) self.fc_op_combobox.append(gtk.combo_box_new_text()) self.fc_op_combobox[i].append_text("=") self.fc_op_combobox[i].append_text("<") self.fc_op_combobox[i].append_text(">") self.fc_op_combobox[i].append_text("!=") self.fc_op_combobox[i].append_text("LIKE") if i: self.fc_logic_combobox.append(gtk.combo_box_new_text()) self.fc_logic_combobox[i - 1].append_text("disabled") self.fc_logic_combobox[i - 1].append_text("AND") self.fc_logic_combobox[i - 1].append_text("OR") table.attach(self.fc_logic_combobox[i - 1], 0, 1, i + 1, i + 2) self.fc_logic_combobox[i - 1].show() table.attach(self.fc_combobox[i], 1, 2, i + 1, i + 2); table.attach(self.fc_op_combobox[i], 2, 3, i + 1, i + 2) table.attach(self.fc_entry[i], 3, 4, i + 1, i + 2); self.fc_combobox[i].show(); self.fc_op_combobox[i].show(); self.fc_entry[i].show(); if not current_table: show_message("info", "no table selected!\nyou can't execute a template with $field_conditions$ in it, if you have no table selected!") return last_field = [] for i in range(self.fc_count): last_field.append(self.fc_combobox[i].get_active_text()) self.fc_combobox[i].get_model().clear() if i: self.fc_logic_combobox[i - 1].set_active(0) fc = 0 for field_name in current_table.field_order: for k in range(self.fc_count): self.fc_combobox[k].append_text(field_name) if last_field[k] == field_name: self.fc_combobox[k].set_active(fc) fc += 1 if not self.fc_op_combobox[0].get_active_text(): self.fc_op_combobox[0].set_active(0) if not self.fc_combobox[0].get_active_text(): self.fc_combobox[0].set_active(0) answer = self.fc_window.run() self.fc_window.hide() if answer != gtk.RESPONSE_OK: return conditions = "`%s` %s '%s'" % ( self.fc_combobox[0].get_active_text(), self.fc_op_combobox[0].get_active_text(), self.current_host.escape(self.fc_entry[0].get_text()) ) for i in range(1, self.fc_count): if self.fc_logic_combobox[i - 1].get_active_text() == "disabled" or self.fc_combobox[i].get_active_text() == "" or self.fc_op_combobox[i].get_active_text() == "": continue conditions += " %s `%s` %s '%s'" % ( self.fc_logic_combobox[i - 1].get_active_text(), self.fc_combobox[i].get_active_text(), self.fc_op_combobox[i].get_active_text(), self.current_host.escape(self.fc_entry[i].get_text()) ) t = t.replace("$field_conditions$", conditions) try: new_order = self.stored_orders[self.current_host.current_db.name][current_table.name] print "found stored order", new_order query = t try: r = self.query_order_re except: r = self.query_order_re = re.compile(re_src_query_order) match = re.search(r, query) if match: before, order, after = match.groups() order = "" addition = "" else: match = re.search(re_src_after_order, query) if not match: before = query after = "" else: before = query[0:match.start()] after = match.group() addition = "\norder by\n\t" order = "" for col, o in new_order: if order: order += ",\n\t" order += col if not o: order += " desc" if order: new_query = ''.join([before, addition, order, after]) else: new_query = re.sub("(?i)order[ \r\n\t]+by[ \r\n\t]+", "", before + after) t = new_query except: pass self.on_execute_query_clicked(None, t)
7dda6efe0ce5eb9252a0950001c0288c1a84bb9f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8147/7dda6efe0ce5eb9252a0950001c0288c1a84bb9f/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 3202, 12, 2890, 16, 3568, 16, 268, 4672, 783, 67, 2121, 273, 365, 18, 588, 67, 8109, 67, 2121, 1435, 783, 67, 7142, 67, 2121, 273, 783, 67, 2121, 31, 225, 309, 268, 18, 47...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 3202, 12, 2890, 16, 3568, 16, 268, 4672, 783, 67, 2121, 273, 365, 18, 588, 67, 8109, 67, 2121, 1435, 783, 67, 7142, 67, 2121, 273, 783, 67, 2121, 31, 225, 309, 268, 18, 47...
def reduce(self, f): """ Reduce an element modulo a standard basis for this ideal. This returns 0 if and only if the element is in this ideal. EXAMPLES: sage: R.<x,y> = PolynomialRing(QQ, 2) sage: I = (x^3 + y, y)*R sage: I.reduce(y) 0 sage: I.reduce(x^3) 0 sage: I.reduce(x - y) x sage: I = (y^2 - (x^3 + x))*R sage: I.reduce(x^3) y^2 - x sage: I.reduce(x^6) y^4 - 2*x*y^2 + x^2 sage: (y^2 - x)^2 y^4 - 2*x*y^2 + x^2 NOTE: Requires computation of a Groebner basis, which is a very expensive operation. """ if self.base_ring() == sage.rings.integer_ring.ZZ: return self._reduce_using_macaulay2(f) try: singular = self._singular_groebner_basis().parent() except (AttributeError, RuntimeError): singular = self._singular_groebner_basis().parent() f = self.ring()(f) g = singular(f) try: self.ring()._singular_(singular).set_ring() h = g.reduce(self._singular_groebner_basis()) except TypeError: return f try: return self.ring()(h) except (TypeError, RuntimeError): return self.ring()(h[1])
def reduce(self, f): """ Reduce an element modulo a standard basis for this ideal. This returns 0 if and only if the element is in this ideal.
d67b3984da9465b82860880eb70dd6fc632b037b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/d67b3984da9465b82860880eb70dd6fc632b037b/multi_polynomial_ideal.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5459, 12, 2890, 16, 284, 4672, 3536, 24614, 392, 930, 26109, 279, 4529, 10853, 364, 333, 23349, 18, 1220, 1135, 374, 309, 471, 1338, 309, 326, 930, 353, 316, 333, 23349, 18, 2, 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, 5459, 12, 2890, 16, 284, 4672, 3536, 24614, 392, 930, 26109, 279, 4529, 10853, 364, 333, 23349, 18, 1220, 1135, 374, 309, 471, 1338, 309, 326, 930, 353, 316, 333, 23349, 18, 2, -100, -...
@unittest.skipIf(sys.flags.optimize >= 2, "Docstrings are omitted with -O2 and above")
def test_crlf_newlines(self): old_sep = os.linesep os.linesep = "\r\n" try: fn = os.path.join(TEST_DATA_DIR, "crlf.py") fixes = refactor.get_fixers_from_package("lib2to3.fixes") self.check_file_refactoring(fn, fixes) finally: os.linesep = old_sep
effb24b31bbce50582014455c98a83522fd5ba67 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8546/effb24b31bbce50582014455c98a83522fd5ba67/test_refactor.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 71, 1321, 74, 67, 31276, 12, 2890, 4672, 1592, 67, 10814, 273, 1140, 18, 3548, 881, 1140, 18, 3548, 881, 273, 1548, 86, 64, 82, 6, 775, 30, 2295, 273, 1140, 18, 803, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 71, 1321, 74, 67, 31276, 12, 2890, 4672, 1592, 67, 10814, 273, 1140, 18, 3548, 881, 1140, 18, 3548, 881, 273, 1548, 86, 64, 82, 6, 775, 30, 2295, 273, 1140, 18, 803, 18, ...
'name': fields.char('Description',size=64,required=True),
'name': fields.char('Description', size=1024, required=True),
def _get_log_ids(self, cr, uid, ids, field_names, arg, context={}): result = {} history_obj = False model_obj = self.pool.get('ir.model') if 'history_line' in field_names: history_obj = self.pool.get('crm.case.history') name = 'history_line' if 'log_ids' in field_names: history_obj = self.pool.get('crm.case.log') name = 'log_ids' if not history_obj: return result for case in self.browse(cr, uid, ids, context): model_ids = model_obj.search(cr, uid, [('model','=',case._name)]) history_ids = history_obj.search(cr, uid, [('model_id','=',model_ids[0]),('res_id','=',case.id)]) if history_ids: result[case.id] = {name:history_ids} else: result[case.id] = {name:[]} return result
57125a1002f15acdc61a9882a94156e371ef2767 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/57125a1002f15acdc61a9882a94156e371ef2767/crm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 1330, 67, 2232, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 652, 67, 1973, 16, 1501, 16, 819, 12938, 4672, 563, 273, 2618, 4927, 67, 2603, 273, 1083, 938, 67, 2603, 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, 588, 67, 1330, 67, 2232, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 652, 67, 1973, 16, 1501, 16, 819, 12938, 4672, 563, 273, 2618, 4927, 67, 2603, 273, 1083, 938, 67, 2603, 273...
self.dnsmasq_hook = 'DNSMASQ_OPTS="--no-hosts --no-resolv --server=%s
self.dnsmasq_hook = 'DNSMASQ_OPTS="--no-hosts --no-resolv --server=%s
def __init__(self, gp, filetowatch = None): self.fout = gp.fout if gp.use_alt_port: alt_port = gp.bind_alt_port else: alt_port = 0
572c9d21b2ecb1f6eba6f9f9370f837d8ef82089 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6933/572c9d21b2ecb1f6eba6f9f9370f837d8ef82089/dnsproxy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 4178, 16, 661, 278, 543, 505, 273, 599, 4672, 365, 18, 617, 322, 273, 4178, 18, 617, 322, 309, 4178, 18, 1202, 67, 2390, 67, 655, 30, 3770, 67, 655, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 4178, 16, 661, 278, 543, 505, 273, 599, 4672, 365, 18, 617, 322, 273, 4178, 18, 617, 322, 309, 4178, 18, 1202, 67, 2390, 67, 655, 30, 3770, 67, 655, ...
self.api_data["size"] = int(lines[1])
self.api_data["size"] = int(lines[1])
def download_api_data(self): url = self.parent.url match = re.compile(self.__pattern__).search(url) if match: src = self.load("http://uploaded.to/api/file", cookies=False, get={"id": match.group(1).split("/")[0]}) if not src.find("404 Not Found"): return self.api_data = {} lines = src.splitlines() self.api_data["filename"] = lines[0] self.api_data["size"] = int(lines[1]) # in kbytes self.api_data["checksum"] = lines[2] #sha1
89737cad3e9ae4545613f068c674da39cc15aa14 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9838/89737cad3e9ae4545613f068c674da39cc15aa14/UploadedTo.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4224, 67, 2425, 67, 892, 12, 2890, 4672, 880, 273, 365, 18, 2938, 18, 718, 845, 273, 283, 18, 11100, 12, 2890, 16186, 4951, 972, 2934, 3072, 12, 718, 13, 309, 845, 30, 1705, 273, 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, 4224, 67, 2425, 67, 892, 12, 2890, 4672, 880, 273, 365, 18, 2938, 18, 718, 845, 273, 283, 18, 11100, 12, 2890, 16186, 4951, 972, 2934, 3072, 12, 718, 13, 309, 845, 30, 1705, 273, 365...
' AND gu.uid = %s ' , (model_name, uid,)
' AND (gu.uid = %s OR gu.uid IS NULL) ' ' GROUP BY (gu.uid IS NULL) ORDER BY MIN(gu.uid) ' , (model_name, uid,), debug= self._debug
def check(self, cr, uid, model, mode='read', raise_exception=True, context=None): if uid==1: # User root have all accesses # TODO: exclude xml-rpc requests return True
380a800b3643b4bb2a6b0c9db31c5e59baffe152 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12853/380a800b3643b4bb2a6b0c9db31c5e59baffe152/ir_model.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 12, 2890, 16, 4422, 16, 4555, 16, 938, 16, 1965, 2218, 896, 2187, 1002, 67, 4064, 33, 5510, 16, 819, 33, 7036, 4672, 309, 4555, 631, 21, 30, 468, 2177, 1365, 1240, 777, 2006, 28...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 12, 2890, 16, 4422, 16, 4555, 16, 938, 16, 1965, 2218, 896, 2187, 1002, 67, 4064, 33, 5510, 16, 819, 33, 7036, 4672, 309, 4555, 631, 21, 30, 468, 2177, 1365, 1240, 777, 2006, 28...
>>> a2.layers [CorruptLayer..., SimpleLayer..., SharedLayer...] >>> theano.pp(a2.layers[-1].W)
>>> a2.noise 0.01 >>> theano.pp(a2.W2)
def __init__(self, n_in, n_out, tied=False, nlin=tanh, noise=0.0, err=mse, dtype=theano.config.floatX, name=None): r""" Tests: >>> a = Autoencoder(20, 16, tied=True, noise=0.01) >>> a.layers [CorruptLayer..., SimpleLayer..., SharedLayer...] >>> a2 = test_saveload(a) >>> a2.layers [CorruptLayer..., SimpleLayer..., SharedLayer...] >>> theano.pp(a2.layers[-1].W) 'W.T' >>> a2.layers[-1].b b2 """ self.tied = tied layer1 = SimpleLayer(n_in, n_out, activation=nlin, dtype=dtype) if self.tied: self._b = theano.shared(value=numpy.random.random((n_in,)).astype(dtype), name='b2') layer2 = SharedLayer(layer1.W.T, self._b, activation=nlin) else: layer2 = SimpleLayer(n_out, n_in, activation=nlin, dtype=dtype) NNet.__init__(self, [CorruptLayer(noise), layer1, layer2], error=err, name=name)
a6060fe8868cf28c2f2bc69175c0996c73b51ff5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3400/a6060fe8868cf28c2f2bc69175c0996c73b51ff5/autoencoder.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 290, 67, 267, 16, 290, 67, 659, 16, 268, 2092, 33, 8381, 16, 290, 7511, 33, 88, 304, 76, 16, 10825, 33, 20, 18, 20, 16, 393, 33, 81, 307, 16, 3182,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 290, 67, 267, 16, 290, 67, 659, 16, 268, 2092, 33, 8381, 16, 290, 7511, 33, 88, 304, 76, 16, 10825, 33, 20, 18, 20, 16, 393, 33, 81, 307, 16, 3182,...
if 'PYTHONPATH' in os.environ: os.environ['PYTHONPATH'] = \ os.environ['PYTHONPATH'] + ':' + \ os.path.abspath(opts.install_dir) +'/lib' else: os.environ['PYTHONPATH'] = \ os.path.abspath(opts.install_dir) +'/lib'
os.environ['PYTHONPATH'] = os.environ['PYTHONPATH'] + ':' + os.path.abspath(opts.install_dir) +'/lib' os.environ['PYTHONPATH'] = os.environ['PYTHONPATH'] + ':' + os.path.abspath(opts.install_dir)
def non_root_initialisation(): """ Creating directories where to install the data (non-root usage) If a non-root installation is required, we need to : - check the existence of the opts.install_die directory - create the lib and bin directories - add a shared-lib.pth file with the appropriate path to the libs - create and/or check the .pydistutils content - update the PYTHONPATH for this session """ # check existence of ./lib and ./bin if non-root if opts.install_dir: print """
3ebeaffc4958c43062e348de5bc9734e77636d8a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4914/3ebeaffc4958c43062e348de5bc9734e77636d8a/ez_alea_setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1661, 67, 3085, 67, 6769, 10742, 13332, 3536, 21837, 6402, 1625, 358, 3799, 326, 501, 261, 5836, 17, 3085, 4084, 13, 225, 971, 279, 1661, 17, 3085, 13193, 353, 1931, 16, 732, 1608, 358, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1661, 67, 3085, 67, 6769, 10742, 13332, 3536, 21837, 6402, 1625, 358, 3799, 326, 501, 261, 5836, 17, 3085, 4084, 13, 225, 971, 279, 1661, 17, 3085, 13193, 353, 1931, 16, 732, 1608, 358, ...
sys.stderr.write('<DTR %s>' % (self.dtr_state and 'active' or 'inactive'))
sys.stderr.write('--- DTR %s ---\n' % (self.dtr_state and 'active' or 'inactive'))
def writer(self): """loop and copy console->serial until EXITCHARCTER character is found. when MENUCHARACTER is found, interpret the next key locally. """ menu_active = False try: while self.alive: try: c = console.getkey() except KeyboardInterrupt: c = '\x03' if menu_active: if c == MENUCHARACTER or c == EXITCHARCTER: # Menu character again/exit char -> send itself self.serial.write(c) # send character if self.echo: sys.stdout.write(c) elif c == '\x15': # CTRL+U -> upload file sys.stderr.write('\n> File to upload: ') sys.stderr.flush() console.cleanup() filename = sys.stdin.readline().rstrip('\r\n') if filename: try: file = open(filename, 'r') sys.stderr.write('> Sending file %s ' % filename) while True: line = file.readline().rstrip('\r\n') if not line: break self.serial.write(line) self.serial.write('\r\n') # Wait for output buffer to drain. self.serial.flush() sys.stderr.write('.') # Progress indicator. sys.stderr.write('\n> File %s sent.\n' % filename) except IOError, e: sys.stderr.write('> Error opening file %s: %s\n' % (filename, e)) console.setup() elif c in '\x08hH?': # CTRL+H, h, H, ? -> Show help sys.stderr.write(get_help_text()) elif c == '\x12': # CTRL+R -> Toggle RTS self.rts_state = not self.rts_state self.serial.setRTS(self.rts_state) sys.stderr.write('<RTS %s>' % (self.rts_state and 'active' or 'inactive')) elif c == '\x04': # CTRL+D -> Toggle DTR self.dtr_state = not self.dtr_state self.serial.setDTR(self.dtr_state) sys.stderr.write('<DTR %s>' % (self.dtr_state and 'active' or 'inactive')) elif c == '\x02': # CTRL+B -> toggle BREAK condition self.break_state = not self.break_state self.serial.setBreak(self.break_state) sys.stderr.write('<BREAK %s>' % (self.break_state and 'active' or 'inactive')) elif c == '\x05': # CTRL+E -> toggle local echo self.echo = not self.echo sys.stderr.write('<local echo %s>' % (self.echo and 'active' or 'inactive')) elif c == '\x09': # CTRL+I -> info self.dump_port_settings() #~ elif c in 'pP': # P -> change port XXX reader thread would exit elif c in 'bB': # B -> change baudrate sys.stderr.write('\n> Baudrate: ') sys.stderr.flush() console.cleanup() backup = self.serial.baudrate try: self.serial.baudrate = int(sys.stdin.readline().strip()) except ValueError, e: sys.stderr.write('\n> Error setting baudrate: %s' % (e,)) self.serial.baudrate = backup console.setup() self.dump_port_settings() elif c == '8': # 8 -> change to 8 bits self.serial.bytesize = serial.EIGHTBITS self.dump_port_settings() elif c == '7': # 7 -> change to 8 bits self.serial.bytesize = serial.SEVENBITS self.dump_port_settings() elif c in 'eE': # E -> change to even parity self.serial.parity = serial.PARITY_EVEN self.dump_port_settings() elif c in 'oO': # O -> change to odd parity self.serial.parity = serial.PARITY_ODD self.dump_port_settings() elif c in 'mM': # M -> change to mark parity self.serial.parity = serial.PARITY_MARK self.dump_port_settings() elif c in 'sS': # S -> change to space parity self.serial.parity = serial.PARITY_SPACE self.dump_port_settings() elif c in 'nN': # N -> change to no parity self.serial.parity = serial.PARITY_NONE self.dump_port_settings() elif c == '1': # 1 -> change to 1 stop bits self.serial.stopbits = serial.STOPBITS_ONE self.dump_port_settings() elif c == '2': # 2 -> change to 2 stop bits self.serial.stopbits = serial.STOPBITS_TWO self.dump_port_settings() elif c == '3': # 3 -> change to 1.5 stop bits self.serial.stopbits = serial.STOPBITS_ONE_POINT_FIVE self.dump_port_settings() elif c in 'xX': # X -> change software flow control self.serial.xonxoff = (c == 'X') self.dump_port_settings() elif c in 'rR': # R -> change hardware flow control self.serial.rtscts = (c == 'R') self.dump_port_settings() else: sys.stderr.write('<unknown menu character %s>' % key_description(c)) menu_active = False elif c == MENUCHARACTER: # next char will be for menu menu_active = True elif c == EXITCHARCTER: self.stop() break # exit app elif c == '\n': self.serial.write(self.newline) # send newline character(s) if self.echo: sys.stdout.write(c) # local echo is a real newline in any case else: self.serial.write(c) # send character if self.echo: sys.stdout.write(c) except: self.alive = False raise
c61cb24df3b85c0b769f2fa31ac2433f3c0e4b39 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10955/c61cb24df3b85c0b769f2fa31ac2433f3c0e4b39/miniterm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2633, 12, 2890, 4672, 3536, 6498, 471, 1610, 2983, 2122, 8818, 3180, 28407, 7305, 1268, 654, 3351, 353, 1392, 18, 1347, 490, 1157, 57, 27858, 353, 1392, 16, 10634, 326, 1024, 498, 13760, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2633, 12, 2890, 4672, 3536, 6498, 471, 1610, 2983, 2122, 8818, 3180, 28407, 7305, 1268, 654, 3351, 353, 1392, 18, 1347, 490, 1157, 57, 27858, 353, 1392, 16, 10634, 326, 1024, 498, 13760, ...
_("Do you can call flag when the clock is with you, <b>Actions</b> > <b>Call Flag</b>."),
_("Do you know that you can call flag when the clock is with you, <b>Actions</b> > <b>Call Flag</b>."),
def set_currentIndex (cls, value): if len(tips) == 0: return if value < 0: value = len(tips)-1 elif value >= len(tips): value = 0 cls.currentIndex = value cls.widgets["tipfield"].set_markup(tips[value])
51337d593dc848d58f1da650b6410810c92e3244 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5339/51337d593dc848d58f1da650b6410810c92e3244/tipOfTheDay.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 2972, 1016, 261, 6429, 16, 460, 4672, 309, 562, 12, 88, 7146, 13, 422, 374, 30, 327, 309, 460, 411, 374, 30, 460, 273, 562, 12, 88, 7146, 24950, 21, 1327, 460, 1545, 562, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 2972, 1016, 261, 6429, 16, 460, 4672, 309, 562, 12, 88, 7146, 13, 422, 374, 30, 327, 309, 460, 411, 374, 30, 460, 273, 562, 12, 88, 7146, 24950, 21, 1327, 460, 1545, 562, ...
self.h5fname, 'w', title = "Test for comparing 64-bit times")
self.h5fname, 'w', title = "Test for comparing Time64 VL arrays")
def test01_Compare64VLArray(self): "Comparing written 64-bit time data with read data in a VLArray."
2953f06c72e2521b548ca4dd99aecff040aeab6e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12687/2953f06c72e2521b548ca4dd99aecff040aeab6e/test_timetype.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 1611, 67, 8583, 1105, 58, 48, 1076, 12, 2890, 4672, 315, 799, 12583, 5941, 5178, 17, 3682, 813, 501, 598, 855, 501, 316, 279, 776, 48, 1076, 1199, 2, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 1611, 67, 8583, 1105, 58, 48, 1076, 12, 2890, 4672, 315, 799, 12583, 5941, 5178, 17, 3682, 813, 501, 598, 855, 501, 316, 279, 776, 48, 1076, 1199, 2, -100, -100, -100, -100, -100...
r.append('\\%s{%s}' % (_unicodeToTex.combined_math[cm],ch))
r.append('\\%s{%s}' % (_unicodeToTex.combchar_math[cm],ch))
def texescape(self,data,r): pos = 0 #unicoderegex = re.compile(u'[\u0080-\u8000]') for o in re.finditer(ur'(?P<backslash>\\)|(?P<spctex>{|}|<|>|#|\$|\^|_|&|%)|(?P<combined>[a-zA-Z][\u0300-\u036f]+)|(?P<unicodecombined>[\u0080-\u8000][\u0300-\u036f]?)',data): # backslash -> '\' # spctex -> single char special tex characters # combined -> combining character: normal char + combining chars (one or more, but we only support one) # combined unicode -> Any unicode char followed by one or more combining chars if o.start(0) > pos: r.append(str(data[pos:o.start(0)])) pos = o.end(0) if o.group('backslash'): if self.__mode is self.TextMode: r.append('$\\tt\\backslash$') else: r.append('\\tt\\backslash{}') elif o.group('spctex'): t = o.group('spctex') if t in [ '^','_' ]: if self.__mode == self.MathMode: r.append('\\%s' % str(t)) else: r.append('\\char%d{}' % ord(t)) elif t in [ '<', '>' ]: if self.__mode == self.MathMode: r.append(str(t)) else: r.append('\\char%d{}' % ord(t)) else: r.append('\\%s' % str(t)) elif o.group('combined'): t = o.group('combined') ch = t[0] cm = t[1:] if len(cm) > 1: raise UnicodeError('Multiple combining characters are not supported.') else: cm = ord(cm)
f6393c1a3f616acff3ef7fe6fe0bad7799f9b54f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4638/f6393c1a3f616acff3ef7fe6fe0bad7799f9b54f/e2html.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 16573, 6939, 12, 2890, 16, 892, 16, 86, 4672, 949, 273, 374, 468, 318, 335, 369, 11877, 338, 273, 283, 18, 11100, 12, 89, 11, 7438, 89, 713, 3672, 6943, 89, 26021, 3864, 13, 364, 320...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 16573, 6939, 12, 2890, 16, 892, 16, 86, 4672, 949, 273, 374, 468, 318, 335, 369, 11877, 338, 273, 283, 18, 11100, 12, 89, 11, 7438, 89, 713, 3672, 6943, 89, 26021, 3864, 13, 364, 320...
command, cwd=path, filter_fn=filterer.Filter, stdout=options.stdout)
['git', 'diff', merge_base], cwd=self.checkout_path, filter_fn=DiffFilterer(self.relpath, options.stdout).Filter, stdout=options.stdout)
def pack(self, options, args, file_list): """Generates a patch file which can be applied to the root of the repository.
338ead09dbd34566cb60d324c2eb7366229ad94e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6076/338ead09dbd34566cb60d324c2eb7366229ad94e/gclient_scm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2298, 12, 2890, 16, 702, 16, 833, 16, 585, 67, 1098, 4672, 3536, 6653, 279, 4729, 585, 1492, 848, 506, 6754, 358, 326, 1365, 434, 326, 3352, 18, 2, 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, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2298, 12, 2890, 16, 702, 16, 833, 16, 585, 67, 1098, 4672, 3536, 6653, 279, 4729, 585, 1492, 848, 506, 6754, 358, 326, 1365, 434, 326, 3352, 18, 2, -100, -100, -100, -100, -100, -100, ...
rng_seed = numpy.random.RandomState(234).randint(2**30)
rng_seed = numpy.random.RandomState(utt.fetch_seed()).randint(2**30)
def test_uniform(self): """Test that RandomStreams.uniform generates the same results as numpy""" # Check over two calls to see if the random state is correctly updated. m = Module() m.random = RandomStreams(234) m.fn = Method([], m.random.uniform((2,2), -1, 1))
b90ec1d2718d658a78f6697ba4a7a2577c493f3e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12438/b90ec1d2718d658a78f6697ba4a7a2577c493f3e/test_randomstreams.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 24120, 12, 2890, 4672, 3536, 4709, 716, 8072, 10301, 18, 24120, 6026, 326, 1967, 1686, 487, 3972, 8395, 468, 2073, 1879, 2795, 4097, 358, 2621, 309, 326, 2744, 919, 353, 8783, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 24120, 12, 2890, 4672, 3536, 4709, 716, 8072, 10301, 18, 24120, 6026, 326, 1967, 1686, 487, 3972, 8395, 468, 2073, 1879, 2795, 4097, 358, 2621, 309, 326, 2744, 919, 353, 8783, ...
elif self.ship.threatCounter:
elif self.ship.threatCounter:
def handleAvatarControls(self, task): """ Check on the arrow keys and update the "avatar" (ship). """ if __debug__: if self.wantDebugIndicator: onScreenDebug.append("localAvatar pos = %s\n"%( base.localAvatar.getPos().pPrintValues(),)) onScreenDebug.append("localAvatar hpr = %s\n"%( base.localAvatar.getHpr().pPrintValues(),)) assert self.debugPrint("handleAvatarControls(task=%s)"%(task,)) physObject = self.actorNode.getPhysicsObject() contact = self.actorNode.getContactVector() # get the button states: forward = inputState.isSet("forward") reverse = inputState.isSet("reverse") turnLeft = inputState.isSet("slideLeft") or inputState.isSet("turnLeft") turnRight = inputState.isSet("slideRight") or inputState.isSet("turnRight") slide = inputState.isSet("slide") slideLeft = 0 slideRight = 0 jump = inputState.isSet("jump") # Determine what the speeds are based on the buttons: # Check for Auto-Sailing if self.ship.getIsAutoSailing(): forward = 1 reverse = 0 else: forward = 0 # How far did we move based on the amount of time elapsed? dt = ClockObject.getGlobalClock().getDt() if reverse: # Reverse kills Travel Speed totally self.straightHeading = 0 elif (self.__speed < (self.ship.acceleration + self.ship.speedboost) * self.ship.speednerf) and forward: # If not at MinSpeed, Accelerate regardless self.straightHeading += dt * 1.5 elif self.ship.threatCounter: # If ship is recently damaged, do not increase Travel Speed self.straightHeading = min(1.0 / self.MAX_STRAIGHT_SAIL_BONUS * self.STRAIGHT_SAIL_BONUS_TIME * self.ship.speednerf, self.straightHeading) elif turnLeft or turnRight or not forward: # Reset Straight Sailing Bonus self.straightHeading -= dt * self.TURNING_BONUS_REDUCTION else: # Add in the Straight Sailing Time self.straightHeading += dt self.straightHeading = max(0, min(self.STRAIGHT_SAIL_BONUS_TIME, self.straightHeading)) # Straight Sailing Acceleration Bonus straightSailBonus = 0.0 straightSailBonus = self.straightHeading / self.STRAIGHT_SAIL_BONUS_TIME straightSailBonus = min(self.MAX_STRAIGHT_SAIL_BONUS, straightSailBonus * self.MAX_STRAIGHT_SAIL_BONUS) self.__speed=(forward and self.ship.acceleration) or \ (reverse and -self.ship.reverseAcceleration) avatarSlideSpeed=self.ship.acceleration * 0.5 * straightSailBonus #self.__slideSpeed=slide and ( # (turnLeft and -avatarSlideSpeed) or # (turnRight and avatarSlideSpeed)) self.__slideSpeed=(forward or reverse) and ( (slideLeft and -avatarSlideSpeed) or (slideRight and avatarSlideSpeed)) self.__rotationSpeed=not slide and ( (turnLeft and self.ship.turnRate) or (turnRight and -self.ship.turnRate)) # Add in Straight Sailing Multiplier self.__speed *= straightSailBonus self.__speed += self.ship.speedboost self.__slideSpeed *= straightSailBonus maxSpeed = self.ship.maxSpeed self.__speed *= self.ship.speednerf # Enable debug turbo modec debugRunning = inputState.isSet("debugRunning") if(debugRunning): self.__speed*=base.debugRunningMultiplier self.__slideSpeed*=base.debugRunningMultiplier self.__rotationSpeed*=1.25 maxSpeed = self.ship.maxSpeed * base.debugRunningMultiplier #*# self.currentTurning += self.__rotationSpeed if self.currentTurning > self.ship.maxTurn: self.currentTurning = self.ship.maxTurn elif self.currentTurning < -self.ship.maxTurn: self.currentTurning = -self.ship.maxTurn if turnLeft or turnRight: mult = .9 elif forward or reverse: mult = .82 else: mult = .8 self.currentTurning *= mult if self.currentTurning < 0.001 and self.currentTurning > -0.001: self.currentTurning = 0.0 self.__rotationSpeed = self.currentTurning #print "########################" #print self.__speed #print self.ship.baseAcceleration #print self.ship.acceleration #print self.ship.speedboost #print straightSailBonus # Broadcast Event to Handlers (ShipStatusMeter) messenger.send("setShipSpeed-%s" % (self.ship.getDoId()), [self.__speed, self.getMaxSpeed()]) if self.wantDebugIndicator: self.displayDebugInfo() if self.needToDeltaPos: self.setPriorParentVector() self.needToDeltaPos = 0 #------------------------------ #debugTempH=self.shipNodePath.getH() if __debug__: q1=self.shipNodePath.getQuat() q2=physObject.getOrientation() q1.normalize() q2.normalize() assert q1.isSameDirection(q2) or (q1.getHpr() == q2.getHpr()) assert self.shipNodePath.getPos().almostEqual( physObject.getPosition(), 0.0001) #------------------------------
9aafee4e4afd1a297615b085bf344b65c9f76ce1 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8543/9aafee4e4afd1a297615b085bf344b65c9f76ce1/ShipPilot.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 23999, 16795, 12, 2890, 16, 1562, 4672, 3536, 2073, 603, 326, 12274, 1311, 471, 1089, 326, 315, 19660, 6, 261, 3261, 2934, 3536, 309, 1001, 4148, 972, 30, 309, 365, 18, 17369, 2829...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 23999, 16795, 12, 2890, 16, 1562, 4672, 3536, 2073, 603, 326, 12274, 1311, 471, 1089, 326, 315, 19660, 6, 261, 3261, 2934, 3536, 309, 1001, 4148, 972, 30, 309, 365, 18, 17369, 2829...
self.start('302 REDIRECT', response_headers)
request['start']('302 REDIRECT', response_headers)
def redirect(self, redirect_url): """Send a redirect response to the given URL to the browser.""" response_headers = [('Content-type', 'text/plain'), ('Location', redirect_url)] self.start('302 REDIRECT', response_headers) return ["Redirecting to %s" % redirect_url]
3613973e0dba8bc750646a30918b4dc7828ea1b1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2097/3613973e0dba8bc750646a30918b4dc7828ea1b1/open_id.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3136, 12, 2890, 16, 3136, 67, 718, 4672, 3536, 3826, 279, 3136, 766, 358, 326, 864, 1976, 358, 326, 4748, 12123, 766, 67, 2485, 273, 306, 2668, 1350, 17, 723, 2187, 296, 955, 19, 7446,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3136, 12, 2890, 16, 3136, 67, 718, 4672, 3536, 3826, 279, 3136, 766, 358, 326, 864, 1976, 358, 326, 4748, 12123, 766, 67, 2485, 273, 306, 2668, 1350, 17, 723, 2187, 296, 955, 19, 7446,...
for ins in ns:
is_category = False for namespace in wikipedia.family.category_namespaces(wikipedia.mylang):
def articles(self, recurse = 0): ns = wikipedia.family.category_namespaces(wikipedia.mylang) articles = [] titles = self.catlist(recurse) for title in titles: for ins in ns: # if the current link points to a subcategory if title.startswith(ins + ':'): # don't return this link titles.remove(title) for title in titles: npage = wikipedia.PageLink(self.code(), title) articles.append(npage) return articles
13ce473923728df90efda6c47abd2f1080187b2c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4404/13ce473923728df90efda6c47abd2f1080187b2c/catlib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15828, 12, 2890, 16, 11502, 273, 374, 4672, 3153, 273, 21137, 18, 9309, 18, 4743, 67, 16078, 12, 11999, 13744, 18, 4811, 4936, 13, 15828, 273, 5378, 14693, 273, 365, 18, 2574, 1098, 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, 15828, 12, 2890, 16, 11502, 273, 374, 4672, 3153, 273, 21137, 18, 9309, 18, 4743, 67, 16078, 12, 11999, 13744, 18, 4811, 4936, 13, 15828, 273, 5378, 14693, 273, 365, 18, 2574, 1098, 12, ...
def SetSegmentType(segea, type):
def SetSegmentType(segea, segtype):
def SetSegmentType(segea, type): """ Set segment type @param segea: any address within segment @param type: new segment type: @return: !=0 - ok """ seg = idaapi.getseg(segea) if not seg: return False seg.type = type return seg.update()
76aa24fecdace41c9fc827e500b95cfdf5053272 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4773/76aa24fecdace41c9fc827e500b95cfdf5053272/idc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1000, 4131, 559, 12, 307, 908, 69, 16, 2291, 723, 4672, 3536, 1000, 3267, 618, 225, 632, 891, 695, 908, 69, 30, 1281, 1758, 3470, 3267, 632, 891, 618, 30, 394, 3267, 618, 30, 225, 63...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1000, 4131, 559, 12, 307, 908, 69, 16, 2291, 723, 4672, 3536, 1000, 3267, 618, 225, 632, 891, 695, 908, 69, 30, 1281, 1758, 3470, 3267, 632, 891, 618, 30, 394, 3267, 618, 30, 225, 63...
mail=msg,
mail=msg.message,
def listMail(self, REQUEST): # Shifted from MailBoxer till reintegration project # Send a mail to all members of the list. mailString = self.getMailFromRequest(REQUEST) msg = EmailMessage(mailString, list_title=self.getProperty('title', ''), group_id=self.getId(), site_id=self.getProperty('siteId', ''), sender_id_cb=self.get_mailUserId) # store mail in the archive? get context for the mail... post_id = msg.post_id if self.getValueFor('archived') <> self.archive_options[0]: (post_id, file_ids) = self.manage_addMail(msg) # We *always* distribute plain mail at the moment. if msg.has_key('content-type'): msg.replace_header('content-type', 'text/plain; charset=utf-8;') else: msg.add_header('content-type', 'text/plain; charset=utf-8;') # The custom header is actually capable of replacing the top of the # message, for example with a banner, so we need to parse it again customHeader = EmailMessage(self.mail_header(self, REQUEST, getValueFor=self.getValueFor, title=self.getValueFor('title'), mail=msg, body=msg.body, file_ids=file_ids, post_id=post_id).strip()) # unlike the header, the footer is just a footer customFooter = self.mail_footer(self, REQUEST, getValueFor=self.getValueFor, title=self.getValueFor('title'), mail=msg, body=msg.body, file_ids=file_ids, post_id=post_id).strip() for hdr in customHeader.keys(): if customHeader[hdr].strip(): if msg.message.has_key(hdr): msg.message.replace_header(hdr, customHeader[hdr]) else: msg.message.add_header(hdr, customHeader[hdr]) else: # if the header was blank, it means we want it to be removed del(msg[hdr])
9cf45cc8afc69c0ad41b6080fca2d984e4be1f10 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6274/9cf45cc8afc69c0ad41b6080fca2d984e4be1f10/XWFMailingList.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 666, 6759, 12, 2890, 16, 12492, 4672, 468, 21444, 329, 628, 11542, 3514, 264, 21364, 283, 27667, 1984, 225, 468, 2479, 279, 4791, 358, 777, 4833, 434, 326, 666, 18, 4791, 780, 273, 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, 666, 6759, 12, 2890, 16, 12492, 4672, 468, 21444, 329, 628, 11542, 3514, 264, 21364, 283, 27667, 1984, 225, 468, 2479, 279, 4791, 358, 777, 4833, 434, 326, 666, 18, 4791, 780, 273, 365, ...
{'file':'foo-0.1-5.i386.rpm', 'name':'foo', 'version':'0.1', 'release':'5', 'arch':'i386'}, {'file':'foo-0.2-3.i386.rpm', 'name':'foo', 'version':'0.2', 'release':'3', 'arch':'i386'}],
{'file':'foo-0.1-5.i386.rpm', 'name':'foo', 'version':'0.1', 'release':'5', 'subarch':'i386'}, {'file':'foo-0.2-3.i386.rpm', 'name':'foo', 'version':'0.2', 'release':'3', 'subarch':'i386'}],
def get_pkgs(rpmdir): """scan a dir of rpms and generate a pkgs structure.""" pkgs = {} """
a3e467705967c9bd663a934cca8f3c746d746f6f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11867/a3e467705967c9bd663a934cca8f3c746d746f6f/rpmlisting.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 25376, 12, 86, 7755, 1214, 4672, 3536, 9871, 279, 1577, 434, 8715, 959, 471, 2103, 279, 16922, 3695, 12123, 16922, 273, 2618, 3536, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 25376, 12, 86, 7755, 1214, 4672, 3536, 9871, 279, 1577, 434, 8715, 959, 471, 2103, 279, 16922, 3695, 12123, 16922, 273, 2618, 3536, 2, -100, -100, -100, -100, -100, -100, -100, ...
if 'description' in req.args or 'reporter' in req.args:
if 'description' in req.args.keys() or 'reporter' in req.args.keys():
def save_changes(self, req, id): if self.perm.has_permission(perm.TICKET_CHGPROP): # TICKET_CHGPROP gives permission to edit the ticket if not req.args.get('summary'): raise util.TracError('Tickets must contain summary.')
597a7234970c2b1061e2e8fa39d2efa8422efa7d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/597a7234970c2b1061e2e8fa39d2efa8422efa7d/Ticket.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1923, 67, 6329, 12, 2890, 16, 1111, 16, 612, 4672, 309, 365, 18, 12160, 18, 5332, 67, 9827, 12, 12160, 18, 56, 16656, 1584, 67, 1792, 43, 15811, 4672, 468, 399, 16656, 1584, 67, 1792, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1923, 67, 6329, 12, 2890, 16, 1111, 16, 612, 4672, 309, 365, 18, 12160, 18, 5332, 67, 9827, 12, 12160, 18, 56, 16656, 1584, 67, 1792, 43, 15811, 4672, 468, 399, 16656, 1584, 67, 1792, ...
self.parser.parseError(_("XXXXX FRAMESET?"))
self.parser.parseError(_("Unexpected end of file. Expected end " u"tag (" + self.tree.openElements[1].name + u") first."))
def processEOF(self): self.tree.generateImpliedEndTags() if len(self.tree.openElements) > 2: self.parser.parseError(_("Unexpected end of file. " u"Missing closing tags.")) elif len(self.tree.openElements) == 2 and\ self.tree.openElements[1].name != "body": # This happens for framesets or something? self.parser.parseError(_("XXXXX FRAMESET?")) elif self.parser.innerHTML and len(self.tree.openElements) > 1 : # XXX This is not what the specification says. Not sure what to do # here. self.parser.parseError(_("XXX innerHTML EOF")) # Betting ends.
ec5e094a6a52f8da9e7b8aa46a66e9159657940e /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/10463/ec5e094a6a52f8da9e7b8aa46a66e9159657940e/html5parser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 12706, 12, 2890, 4672, 365, 18, 3413, 18, 7163, 2828, 2092, 1638, 3453, 1435, 309, 562, 12, 2890, 18, 3413, 18, 3190, 3471, 13, 405, 576, 30, 365, 18, 4288, 18, 2670, 668, 24899,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 12706, 12, 2890, 4672, 365, 18, 3413, 18, 7163, 2828, 2092, 1638, 3453, 1435, 309, 562, 12, 2890, 18, 3413, 18, 3190, 3471, 13, 405, 576, 30, 365, 18, 4288, 18, 2670, 668, 24899,...
item = gtk.MenuItem(_("Set rating..."))
item = gtk.MenuItem(_("Set Rating"))
def prep_main_popup(self, header, button, time): if "~" in header[1:]: header = header.lstrip("~").split("~")[0] menu = gtk.Menu()
f60df8133cf1de007f4b4ee626107d2f3c6bfdff /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4764/f60df8133cf1de007f4b4ee626107d2f3c6bfdff/widgets.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13237, 67, 5254, 67, 16086, 12, 2890, 16, 1446, 16, 3568, 16, 813, 4672, 309, 31964, 316, 1446, 63, 21, 30, 14542, 1446, 273, 1446, 18, 80, 6406, 2932, 98, 20387, 4939, 2932, 98, 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, 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, 13237, 67, 5254, 67, 16086, 12, 2890, 16, 1446, 16, 3568, 16, 813, 4672, 309, 31964, 316, 1446, 63, 21, 30, 14542, 1446, 273, 1446, 18, 80, 6406, 2932, 98, 20387, 4939, 2932, 98, 7923,...
id = c.insert_id()
id = c.lastrowid
def _queryInsertID(self, conn, soInstance, id, names, values): table = soInstance._table idName = soInstance._idName c = conn.cursor() if id is not None: names = [idName] + names values = [id] + values q = self._insertSQL(table, names, values) if self.debug: self.printDebug(conn, q, 'QueryIns') self._executeRetry(conn, c, q) if id is None: id = c.insert_id() if self.debugOutput: self.printDebug(conn, id, 'QueryIns', 'result') return id
9ee194c38537f3a9e44b934d901d63e132451f86 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8798/9ee194c38537f3a9e44b934d901d63e132451f86/mysqlconnection.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2271, 4600, 734, 12, 2890, 16, 1487, 16, 1427, 1442, 16, 612, 16, 1257, 16, 924, 4672, 1014, 273, 1427, 1442, 6315, 2121, 612, 461, 273, 1427, 1442, 6315, 350, 461, 276, 273, 1487...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2271, 4600, 734, 12, 2890, 16, 1487, 16, 1427, 1442, 16, 612, 16, 1257, 16, 924, 4672, 1014, 273, 1427, 1442, 6315, 2121, 612, 461, 273, 1427, 1442, 6315, 350, 461, 276, 273, 1487...
self._lastlineno += 1 if self._use_defaults: for part in self.defaultDirectives.get(self._lastlineno, []): self._handleDirective(part)
if not self._continuing: self._lastlineno += 1 if self._use_defaults: for part in self.defaultDirectives.get(self._lastlineno, []): word = part.split()[0] if word not in self._directives_used_in_this_line: self._handleDirective(part)
def _handleText(self, line): self._lastlineno += 1 if self._use_defaults: for part in self.defaultDirectives.get(self._lastlineno, []): self._handleDirective(part) self.slides[-1].addText(line)
5d2eefc042f1fcbcae28d9c4fe65326e0f207f37 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7434/5d2eefc042f1fcbcae28d9c4fe65326e0f207f37/mgp2pdf.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4110, 1528, 12, 2890, 16, 980, 4672, 309, 486, 365, 6315, 1213, 6860, 310, 30, 365, 6315, 2722, 17782, 1011, 404, 309, 365, 6315, 1202, 67, 7606, 30, 364, 1087, 316, 365, 18, 1886...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4110, 1528, 12, 2890, 16, 980, 4672, 309, 486, 365, 6315, 1213, 6860, 310, 30, 365, 6315, 2722, 17782, 1011, 404, 309, 365, 6315, 1202, 67, 7606, 30, 364, 1087, 316, 365, 18, 1886...
cr.execute('select id from res_users where id=%s and password=%s', (uid, passwd)) res = cr.fetchone() cr.close() if not res: raise security.ExceptionNoTb('Bad username or password') return res[0]
try: cr.execute('SELECT id FROM res_users WHERE id=%s AND password=%s', (uid, passwd)) res = cr.fetchone() if not res: raise security.ExceptionNoTb('Bad username or password') return res[0] finally: cr.close()
def access(self, db, uid, passwd, sec_level, ids): if not passwd: return False cr = pooler.get_db(db).cursor() cr.execute('select id from res_users where id=%s and password=%s', (uid, passwd)) res = cr.fetchone() cr.close() if not res: raise security.ExceptionNoTb('Bad username or password') return res[0]
b4e5c513112036bb6d6eee7e16eda547ccda80eb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/b4e5c513112036bb6d6eee7e16eda547ccda80eb/res_user.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2006, 12, 2890, 16, 1319, 16, 4555, 16, 19093, 16, 1428, 67, 2815, 16, 3258, 4672, 309, 486, 19093, 30, 327, 1083, 4422, 273, 2845, 264, 18, 588, 67, 1966, 12, 1966, 2934, 9216, 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, 2006, 12, 2890, 16, 1319, 16, 4555, 16, 19093, 16, 1428, 67, 2815, 16, 3258, 4672, 309, 486, 19093, 30, 327, 1083, 4422, 273, 2845, 264, 18, 588, 67, 1966, 12, 1966, 2934, 9216, 1435, ...
recipients.append(u)
recipients.append(u)
def buildMessage(self, name, build, results): """Send an email about the result. Don't attach the patch as MailNotifier.buildMessage do."""
d09b5709e163d35440f472144fc6a75155c9b191 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12355/d09b5709e163d35440f472144fc6a75155c9b191/mail.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 1079, 12, 2890, 16, 508, 16, 1361, 16, 1686, 4672, 3536, 3826, 392, 2699, 2973, 326, 563, 18, 7615, 1404, 3306, 326, 4729, 487, 11542, 14889, 18, 3510, 1079, 741, 12123, 2, 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, 1361, 1079, 12, 2890, 16, 508, 16, 1361, 16, 1686, 4672, 3536, 3826, 392, 2699, 2973, 326, 563, 18, 7615, 1404, 3306, 326, 4729, 487, 11542, 14889, 18, 3510, 1079, 741, 12123, 2, -100, ...
battery_level) = track.positions[f]
battery_level, external_power, reachability) = track.positions[f]
def generate_track(track, output): """f(Track, io-bbject) -> None Outputs valid kml xml for the track. """ times = [x[9] for x in track.positions] min_time, max_time = min(times), max(times) min_hour, min_min = time.localtime(min_time)[3:5] max_hour, max_min = time.localtime(max_time)[3:5] output.write("""<Folder><name>%02d:%02d-%02d:%02d, %s positions</name>
82a8c71674337f3a0e7f64834ca98540ee370149 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14255/82a8c71674337f3a0e7f64834ca98540ee370149/csv_to_kml.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 67, 4101, 12, 4101, 16, 876, 4672, 3536, 74, 12, 4402, 16, 2527, 17, 70, 489, 13, 317, 599, 225, 26168, 923, 417, 781, 2025, 364, 326, 3298, 18, 3536, 4124, 273, 306, 92, 63, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 67, 4101, 12, 4101, 16, 876, 4672, 3536, 74, 12, 4402, 16, 2527, 17, 70, 489, 13, 317, 599, 225, 26168, 923, 417, 781, 2025, 364, 326, 3298, 18, 3536, 4124, 273, 306, 92, 63, ...
length = values.get('length')
length = array_values.get('length')
def _parse_array(self, parent, node, options): array_opt = options.get('array') if array_opt: values = array_opt.all() else: values = {} container_type = Array(node.type.ctype, node.type.name) if 'zero-terminated' in values: container_type.zeroterminated = values.get( 'zero-terminated') == '1' length = values.get('length') if length is not None: param_index = parent.get_parameter_index(length) container_type.length_param_index = param_index container_type.size = values.get('fized-size') return container_type
3e466d06a81200d7ff3a7958b8a5fea52caf5b12 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2770/3e466d06a81200d7ff3a7958b8a5fea52caf5b12/annotationparser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2670, 67, 1126, 12, 2890, 16, 982, 16, 756, 16, 702, 4672, 526, 67, 3838, 273, 702, 18, 588, 2668, 1126, 6134, 309, 526, 67, 3838, 30, 924, 273, 526, 67, 3838, 18, 454, 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, 2670, 67, 1126, 12, 2890, 16, 982, 16, 756, 16, 702, 4672, 526, 67, 3838, 273, 702, 18, 588, 2668, 1126, 6134, 309, 526, 67, 3838, 30, 924, 273, 526, 67, 3838, 18, 454, 1435, ...
templateName = self.template.title().split(':', 1)[1] templateRegex = re.compile('\{\{([mM][sS][gG]:)?[' + templateName[0].upper() + templateName[0].lower() + ']' + templateName[1:] + '}}')
templateName = self.template.titleWithoutNamespace() if wikipedia.getSite().nocapitalize: old = self.old else: templateName = '[' + templateName[0].upper() + templateName[0].lower() + ']' + templateName[1:] templateName = re.sub(' ', '[_ ]', templateName) templateRegex = re.compile(r'\{\{([mM][sS][gG]:)?' + templateName + '(?P<parameters>\|[^}]+|)}}')
def __iter__(self): import xmlreader mysite = wikipedia.getSite() dump = xmlreader.XmlDump(self.xmlfilename) # regular expression to find the original template. # {{msg:vfd}} does the same thing as {{msg:Vfd}}, so both will be found. # The new syntax, {{vfd}}, will also be found. templateName = self.template.title().split(':', 1)[1] templateRegex = re.compile('\{\{([mM][sS][gG]:)?[' + templateName[0].upper() + templateName[0].lower() + ']' + templateName[1:] + '}}') for entry in dump.parse(): if templateRegex.search(entry.text): page = wikipedia.Page(mysite, entry.title) yield page
df1c4b20c08053f360a6f225e5e88a060b3540f7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4404/df1c4b20c08053f360a6f225e5e88a060b3540f7/template.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2165, 972, 12, 2890, 4672, 1930, 2025, 10530, 312, 1900, 1137, 273, 21137, 18, 588, 4956, 1435, 4657, 273, 2025, 10530, 18, 4432, 10628, 12, 2890, 18, 2902, 3459, 13, 468, 6736, 26...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2165, 972, 12, 2890, 4672, 1930, 2025, 10530, 312, 1900, 1137, 273, 21137, 18, 588, 4956, 1435, 4657, 273, 2025, 10530, 18, 4432, 10628, 12, 2890, 18, 2902, 3459, 13, 468, 6736, 26...
show(entry, entries) else:
show(entry) elif not options.affix:
def show(entry, entries): entry = b(entry.replace('h', "'"))
9e0587fba07937933c2d46e1e83aab97377f2c09 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14853/9e0587fba07937933c2d46e1e83aab97377f2c09/jbo.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 12, 4099, 16, 3222, 4672, 1241, 273, 324, 12, 4099, 18, 2079, 2668, 76, 2187, 5862, 3719, 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, 2405, 12, 4099, 16, 3222, 4672, 1241, 273, 324, 12, 4099, 18, 2079, 2668, 76, 2187, 5862, 3719, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
dev.trigger(self.ctx, devCtxs)))
dev.triggerDevs(self.ctx, devCtxs), dev.triggerRunContext(self.ctx, devCtxs)))
def makePackets(self, devs, timingOrder, page, reps, sync=249, multiBlockBoards=[]): """Make packets to run a sequence on this board group.
97aacac55223d004344b9e3eafadb46664709251 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7016/97aacac55223d004344b9e3eafadb46664709251/ghz_dacs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 27328, 12, 2890, 16, 4461, 87, 16, 15538, 2448, 16, 1363, 16, 283, 1121, 16, 3792, 33, 3247, 29, 16, 3309, 1768, 13809, 14727, 33, 8526, 4672, 3536, 6464, 12640, 358, 1086, 279, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 27328, 12, 2890, 16, 4461, 87, 16, 15538, 2448, 16, 1363, 16, 283, 1121, 16, 3792, 33, 3247, 29, 16, 3309, 1768, 13809, 14727, 33, 8526, 4672, 3536, 6464, 12640, 358, 1086, 279, ...
c2pread, c2pwrite = CreatePipe(None, 0)
c2pread, c2pwrite = _subprocess.CreatePipe(None, 0)
def _get_handles(self, stdin, stdout, stderr): """Construct and return tuple with IO objects: p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite """ if stdin is None and stdout is None and stderr is None: return (None, None, None, None, None, None)
7d139c76c8e23ecba07fdb99f6a8ba8c60fd6097 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12029/7d139c76c8e23ecba07fdb99f6a8ba8c60fd6097/subprocess.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 24111, 12, 2890, 16, 8801, 16, 3909, 16, 4514, 4672, 3536, 7249, 471, 327, 3193, 598, 1665, 2184, 30, 293, 22, 71, 896, 16, 293, 22, 71, 2626, 16, 276, 22, 84, 896, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 24111, 12, 2890, 16, 8801, 16, 3909, 16, 4514, 4672, 3536, 7249, 471, 327, 3193, 598, 1665, 2184, 30, 293, 22, 71, 896, 16, 293, 22, 71, 2626, 16, 276, 22, 84, 896, 1...
yearbutton = ui.button() yearbuttonvbox = gtk.VBox() self.tags_win_create_apply_all_button(yearbutton, yearbuttonvbox, yearentry) trackbutton = ui.button() trackbuttonvbox = gtk.VBox() self.tags_win_create_apply_all_button(trackbutton, trackbuttonvbox, trackentry, True) yearandtrackhbox = gtk.HBox() yearandtrackhbox.pack_start(yearlabel, False, False, 2) yearandtrackhbox.pack_start(yearentry, True, True, 2) yearandtrackhbox.pack_start(yearbuttonvbox, False, False, 2) yearandtrackhbox.pack_start(tracklabel, False, False, 2) yearandtrackhbox.pack_start(trackentry, True, True, 2) yearandtrackhbox.pack_start(trackbuttonvbox, False, False, 2)
def on_tags_edit(self, files, temp_mpdpaths, music_dir): """Display the editing dialog""" # Try loading module global tagpy if tagpy is None: try: import tagpy # Set default tag encoding to utf8.. fixes some reported bugs. import tagpy.id3v2 as id3v2 id3v2.FrameFactory.instance().setDefaultTextEncoding(tagpy.StringType.UTF8) except: pass if tagpy is None: ui.show_msg(self.window, _("Taglib and/or tagpy not found, tag editing support disabled."), _("Edit Tags"), 'editTagsError', gtk.BUTTONS_CLOSE, response_cb=ui.dialog_destroy) ui.change_cursor(None) return if not os.path.isdir(misc.file_from_utf8(music_dir)): ui.show_msg(self.window, _("The path") + " " + music_dir + " " + _("does not exist. Please specify a valid music directory in preferences."), _("Edit Tags"), 'editTagsError', gtk.BUTTONS_CLOSE, response_cb=ui.dialog_destroy) ui.change_cursor(None) return
28fcba0e29af1c09d48bf18063cbf8f66985ca38 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2312/28fcba0e29af1c09d48bf18063cbf8f66985ca38/tagedit.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 4156, 67, 4619, 12, 2890, 16, 1390, 16, 1906, 67, 1291, 72, 4481, 16, 26225, 67, 1214, 4672, 3536, 4236, 326, 15755, 6176, 8395, 468, 6161, 7153, 1605, 2552, 1047, 2074, 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, 603, 67, 4156, 67, 4619, 12, 2890, 16, 1390, 16, 1906, 67, 1291, 72, 4481, 16, 26225, 67, 1214, 4672, 3536, 4236, 326, 15755, 6176, 8395, 468, 6161, 7153, 1605, 2552, 1047, 2074, 309, ...
sol_dict=[dict([[eq.left(),eq.right()] for eq in solution]) for solution in sol_list]
if isinstance(sol_list[0], list): sol_dict=[dict([[eq.left(),eq.right()] for eq in solution]) for solution in sol_list] else: sol_dict=[{eq.left():eq.right()} for eq in sol_list]
def solve(f, *args, **kwds): r""" Algebraically solve an equation of system of equations for given variables. INPUT: - ``f`` - equation or system of equations (given by a list or tuple) - ``*args`` - variables to solve for. - ``solution_dict = True`` - return a list of dictionaries containing the solutions. EXAMPLES:: sage: x, y = var('x, y') sage: solve([x+y==6, x-y==4], x, y) [[x == 5, y == 1]] sage: solve([x^2+y^2 == 1, y^2 == x^3 + x + 1], x, y) [[x == -1/2*I*sqrt(3) - 1/2, y == -1/2*sqrt(-I*sqrt(3) + 3)*sqrt(2)], [x == -1/2*I*sqrt(3) - 1/2, y == 1/2*sqrt(-I*sqrt(3) + 3)*sqrt(2)], [x == 1/2*I*sqrt(3) - 1/2, y == -1/2*sqrt(I*sqrt(3) + 3)*sqrt(2)], [x == 1/2*I*sqrt(3) - 1/2, y == 1/2*sqrt(I*sqrt(3) + 3)*sqrt(2)], [x == 0, y == -1], [x == 0, y == 1]] sage: solutions=solve([x^2+y^2 == 1, y^2 == x^3 + x + 1], x, y, solution_dict=True) sage: for solution in solutions: print solution[x].n(digits=3), ",", solution[y].n(digits=3) -0.500 - 0.866*I , -1.27 + 0.341*I -0.500 - 0.866*I , 1.27 - 0.341*I -0.500 + 0.866*I , -1.27 - 0.341*I -0.500 + 0.866*I , 1.27 + 0.341*I 0.000 , -1.00 0.000 , 1.00 sage: z = 5 sage: solve([8*z + y == 3, -z +7*y == 0],y,z) Traceback (most recent call last): ... TypeError: 5 is not a valid variable. If ``True`` appears in the list of equations it is ignored, and if ``False`` appears in the list then no solutions are returned. E.g., note that the first ``3==3`` evaluates to ``True``, not to a symbolic equation. :: sage: solve([3==3, 1.00000000000000*x^3 == 0], x) [x == 0] sage: solve([1.00000000000000*x^3 == 0], x) [x == 0] Here, the first equation evaluates to ``False``, so there are no solutions:: sage: solve([1==3, 1.00000000000000*x^3 == 0], x) [] :: sage: var('s,j,b,m,g') (s, j, b, m, g) sage: sys = [ m*(1-s) - b*s*j, b*s*j-g*j ]; sage: solve(sys,s,j) [[s == 1, j == 0], [s == g/b, j == (b - g)*m/(b*g)]] sage: solve(sys,(s,j)) [[s == 1, j == 0], [s == g/b, j == (b - g)*m/(b*g)]] sage: solve(sys,[s,j]) [[s == 1, j == 0], [s == g/b, j == (b - g)*m/(b*g)]] """ try: return f.solve(*args,**kwds) except AttributeError: from sage.symbolic.ring import is_SymbolicVariable if is_SymbolicVariable(args[0]): variables = args else: variables = tuple(args[0]) for v in variables: if not is_SymbolicVariable(v): raise TypeError, "%s is not a valid variable."%v try: f = [s for s in f if s is not True] except TypeError: raise ValueError, "Unable to solve %s for %s"%(f, args) if any(s is False for s in f): return [] m = maxima(f) try: s = m.solve(variables) except: raise ValueError, "Unable to solve %s for %s"%(f, args) sol_list = string_to_list_of_solutions(repr(s)) if 'solution_dict' in kwds and kwds['solution_dict']==True: sol_dict=[dict([[eq.left(),eq.right()] for eq in solution]) for solution in sol_list] return sol_dict else: return sol_list
ae79ca6f1101375bc1fc517cce8a9982eec12cad /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/ae79ca6f1101375bc1fc517cce8a9982eec12cad/relation.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12439, 12, 74, 16, 380, 1968, 16, 2826, 25577, 4672, 436, 8395, 2262, 29087, 6478, 12439, 392, 15778, 434, 2619, 434, 30369, 364, 864, 3152, 18, 225, 12943, 30, 225, 300, 225, 12176, 74,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12439, 12, 74, 16, 380, 1968, 16, 2826, 25577, 4672, 436, 8395, 2262, 29087, 6478, 12439, 392, 15778, 434, 2619, 434, 30369, 364, 864, 3152, 18, 225, 12943, 30, 225, 300, 225, 12176, 74,...
childEnv = dict(os.environ) del childEnv['DISPLAY']
del os.environ['DISPLAY']
def __init__(self): vte.Terminal.__init__(self) self.set_color_foreground(gtk.gdk.color_parse('Black')) self.set_color_background(gtk.gdk.color_parse('White')) editor = os.environ.get('EDITOR', 'vim') childEnv = dict(os.environ) del childEnv['DISPLAY'] self.fork_command('sh', ('sh', '-c', editor), ["=".join(i) for i in childEnv.iteritems()], os.getcwd(), gtk.FALSE, gtk.FALSE, gtk.FALSE)
f9e45a633366be614f4f7f85cb43edfa11b156c4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6757/f9e45a633366be614f4f7f85cb43edfa11b156c4/pyg.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 331, 736, 18, 11336, 16186, 2738, 972, 12, 2890, 13, 365, 18, 542, 67, 3266, 67, 1405, 2915, 12, 4521, 79, 18, 75, 2883, 18, 3266, 67, 2670, 2668, 13...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 331, 736, 18, 11336, 16186, 2738, 972, 12, 2890, 13, 365, 18, 542, 67, 3266, 67, 1405, 2915, 12, 4521, 79, 18, 75, 2883, 18, 3266, 67, 2670, 2668, 13...
idx, 0)
idx, self.op.debug_level)
def Exec(self, feedback_fn): """Export an instance to an image in the cluster.
dd713605f548fa11acc0d16b87fe2e004e68ec9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7542/dd713605f548fa11acc0d16b87fe2e004e68ec9c/cmdlib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3889, 12, 2890, 16, 10762, 67, 4293, 4672, 3536, 6144, 392, 791, 358, 392, 1316, 316, 326, 2855, 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, 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, 3889, 12, 2890, 16, 10762, 67, 4293, 4672, 3536, 6144, 392, 791, 358, 392, 1316, 316, 326, 2855, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
if literal_text is None:
if literal_text: result.append(literal_text) if field_name is not None:
def vformat(self, format_string, args, kwargs): used_args = self.get_empty_used_args() result = [] for literal_text, field_name, format_spec, conversion in \ self.parse(format_string): if literal_text is None: # this is some markup, find the object and do # the formatting
61bfb0589bb8fe161bee757cd7fd33877e6d7cda /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3187/61bfb0589bb8fe161bee757cd7fd33877e6d7cda/string.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 331, 2139, 12, 2890, 16, 740, 67, 1080, 16, 833, 16, 1205, 4672, 1399, 67, 1968, 273, 365, 18, 588, 67, 5531, 67, 3668, 67, 1968, 1435, 563, 273, 5378, 364, 7158, 67, 955, 16, 652, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 331, 2139, 12, 2890, 16, 740, 67, 1080, 16, 833, 16, 1205, 4672, 1399, 67, 1968, 273, 365, 18, 588, 67, 5531, 67, 3668, 67, 1968, 1435, 563, 273, 5378, 364, 7158, 67, 955, 16, 652, ...
item.Catalog.addColumn('id') item.Catalog.addColumn('mailSubject') item.Catalog.addColumn('mailFrom') item.Catalog.addColumn('mailDate')
for md in ('id','mailSubject','mailFrom','mailDate'): try: item.Catalog.addColumn(md) except CatalogError: pass
def manage_afterAdd(self, item, container): """ For configuring the object post-instantiation. """ if getattr(self, '__initialised', 1): return 1 item._setObject('Catalog', XWFCatalog()) wordsplitter = Record() wordsplitter.group = 'Word Splitter' wordsplitter.name = 'HTML aware splitter' casenormalizer = Record() casenormalizer.group = 'Case Normalizer' casenormalizer.name = 'Case Normalizer' stopwords = Record() stopwords.group = 'Stop Words' stopwords.name = 'Remove listed and single char words' item.Catalog.manage_addProduct['ZCTextIndex'].manage_addLexicon( 'Lexicon', 'Default Lexicon', (wordsplitter, casenormalizer, stopwords)) zctextindex_extras = Record() zctextindex_extras.index_type = 'Okapi BM25 Rank' zctextindex_extras.lexicon_id = 'Lexicon' for key, index in self.get_metadataIndexMap().items(): if index == 'ZCTextIndex': zctextindex_extras.doc_attr = key item.Catalog.addIndex(key, index, zctextindex_extras) elif index == 'MultiplePathIndex': # we need to shortcut this one item.Catalog._catalog.addIndex(key, MultiplePathIndex(key)) else: item.Catalog.addIndex(key, index) # add the metadata we need item.Catalog.addColumn('id') item.Catalog.addColumn('mailSubject') item.Catalog.addColumn('mailFrom') item.Catalog.addColumn('mailDate') item.manage_addProduct['MailHost'].manage_addMailHost('MailHost', smtp_host='127.0.0.1') return True
4d315aa55816c9429c4e833bd4884c6f7dbeecc0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6274/4d315aa55816c9429c4e833bd4884c6f7dbeecc0/XWFMailingListManager.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10680, 67, 5205, 986, 12, 2890, 16, 761, 16, 1478, 4672, 3536, 2457, 642, 4017, 326, 733, 1603, 17, 24628, 7072, 18, 225, 3536, 309, 3869, 12, 2890, 16, 4940, 6769, 5918, 2187, 404, 46...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 5205, 986, 12, 2890, 16, 761, 16, 1478, 4672, 3536, 2457, 642, 4017, 326, 733, 1603, 17, 24628, 7072, 18, 225, 3536, 309, 3869, 12, 2890, 16, 4940, 6769, 5918, 2187, 404, 46...
preOps = [
preOps = maSelector(loci=0, wildtype=0, fitness=[1, 1.05, 1.1]), postOps = [
def contextMut(allele, context): if context == [0, 0]: if allele == 0 and random.random() < 0.1: return 1 elif context == [1, 1]: if allele == 0: return 1 # do not mutate return allele
505ded08bbab01d6828bb201d31e079f6d9e3b55 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/401/505ded08bbab01d6828bb201d31e079f6d9e3b55/userGuide.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 819, 7420, 12, 21962, 16, 819, 4672, 309, 819, 422, 306, 20, 16, 374, 14542, 309, 14551, 422, 374, 471, 2744, 18, 9188, 1435, 411, 374, 18, 21, 30, 327, 404, 1327, 819, 422, 306, 21,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 819, 7420, 12, 21962, 16, 819, 4672, 309, 819, 422, 306, 20, 16, 374, 14542, 309, 14551, 422, 374, 471, 2744, 18, 9188, 1435, 411, 374, 18, 21, 30, 327, 404, 1327, 819, 422, 306, 21,...
if not alnum_re.search(self.clean_data['username']):
if not ALNUM_REGEXP.search(self.clean_data['username']):
def clean_username(self): """ Validate that the username is alphanumeric and is not already in use. """ if not alnum_re.search(self.clean_data['username']): raise forms.ValidationError(_(u'Uživatelské jméno může obsahovat pouze písmena, číslice a podtržítko')) try: user = User.objects.get(username__iexact=self.clean_data['username']) except User.DoesNotExist: return self.clean_data['username'] raise forms.ValidationError(_(u'Toto uživatelské jméno už je zabráno'))
9e9268c1b2c5431b69bdbe531ccd55c0da37a8d6 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7994/9e9268c1b2c5431b69bdbe531ccd55c0da37a8d6/forms.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2721, 67, 5053, 12, 2890, 4672, 3536, 3554, 716, 326, 2718, 353, 27374, 471, 353, 486, 1818, 316, 999, 18, 3536, 309, 486, 7981, 6069, 67, 28225, 18, 3072, 12, 2890, 18, 6200, 67, 892,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2721, 67, 5053, 12, 2890, 4672, 3536, 3554, 716, 326, 2718, 353, 27374, 471, 353, 486, 1818, 316, 999, 18, 3536, 309, 486, 7981, 6069, 67, 28225, 18, 3072, 12, 2890, 18, 6200, 67, 892,...
sels, filtered = read_proxy(request, ImageSelections.objects.all().order_by('name'))
sels, filtered = read_proxy(request, ImageSelections.objects.all().order_by('date'))
def ims_get_collection(request, name): """ Returns a collection for the image selector """ if name == 'object': data = Image.objects.all().distinct().values_list('object', flat = True).order_by('object') elif name == 'ingestionid': data = Ingestion.objects.all().distinct().values_list('label', flat = True).order_by('label') elif name == 'channel': data = Channel.objects.all().distinct().values_list('name', flat = True).order_by('name') elif name == 'instrument': data = Instrument.objects.all().distinct().values_list('name', flat = True).order_by('name') elif name == 'run': data = Run.objects.all().distinct().values_list('name', flat = True).order_by('name') elif name == 'tag': data = Tag.objects.all().distinct().values_list('name', flat = True).order_by('name') elif name == 'grade': data = [g[0] for g in GRADE_SET] elif name == 'savedselections': sels, filtered = read_proxy(request, ImageSelections.objects.all().order_by('name')) data = [] for s in sels: sList = marshal.loads(base64.decodestring(s.data)) if len(sList) == 1: data.append(s.name) else: return HttpResponseBadRequest('Incorrect POST data') return HttpResponse(json.encode({'name': name, 'data': [str(d) for d in data]}), mimetype = 'text/plain')
62c3a65120bf36c7d6becd2a0040db8e9246ecff /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11651/62c3a65120bf36c7d6becd2a0040db8e9246ecff/preingestion.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 709, 87, 67, 588, 67, 5548, 12, 2293, 16, 508, 4672, 3536, 2860, 279, 1849, 364, 326, 1316, 3451, 3536, 309, 508, 422, 296, 1612, 4278, 501, 273, 3421, 18, 6911, 18, 454, 7675, 24592, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 709, 87, 67, 588, 67, 5548, 12, 2293, 16, 508, 4672, 3536, 2860, 279, 1849, 364, 326, 1316, 3451, 3536, 309, 508, 422, 296, 1612, 4278, 501, 273, 3421, 18, 6911, 18, 454, 7675, 24592, ...
print 'Percent of iterations that best was not updated:'
print 'Individual Particles: (Percent stagnant, percent particle'+\ ' was the gbest)' num_worthless = 0 for pid in self.stagnant_count: percentstag = self.stagnant_count[pid]/self.iters if percentstag > .9 and self.counter[pid] == 0: num_worthless += 1 print pid, percentstag, self.counter[pid]/self.changes print 'Percent of iterations that gbest was not updated:'
def finish(self): print 'Stats:' print 'Percent of iterations that best was not updated:' print self.not_updated/self.iters print 'Number of stagnant iterations: %d (%d\%)' % (self.stagnant_iters, self.stagnant_iters/self.iters) print 'Percent of best updates that were by the same particle:' print self.consistent_changes/self.changes print 'Percent of best updates that were by recently seen particles:' print self.recently_seen_changes/self.changes
c073122bd7062775f03509342c521cb736323525 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/966/c073122bd7062775f03509342c521cb736323525/output.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4076, 12, 2890, 4672, 1172, 296, 4195, 2497, 1172, 296, 29834, 6393, 8383, 30, 261, 8410, 384, 346, 82, 970, 16, 5551, 20036, 11, 16971, 296, 1703, 326, 314, 12729, 2506, 818, 67, 91, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4076, 12, 2890, 4672, 1172, 296, 4195, 2497, 1172, 296, 29834, 6393, 8383, 30, 261, 8410, 384, 346, 82, 970, 16, 5551, 20036, 11, 16971, 296, 1703, 326, 314, 12729, 2506, 818, 67, 91, ...
filenames = ['*.asm']
filenames = ['*.asm', '*.ASM']
def __init__(self, **options): super(CObjdumpLexer, self).__init__(CLexer, ObjdumpLexer, **options)
b6ce7d0cf98b629bc5009838b648486c0cdc569a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6148/b6ce7d0cf98b629bc5009838b648486c0cdc569a/asm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2826, 2116, 4672, 2240, 12, 39, 2675, 8481, 13356, 16, 365, 2934, 972, 2738, 972, 12, 5017, 8913, 16, 18760, 8481, 13356, 16, 2826, 2116, 13, 2, 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, 1001, 2738, 972, 12, 2890, 16, 2826, 2116, 4672, 2240, 12, 39, 2675, 8481, 13356, 16, 365, 2934, 972, 2738, 972, 12, 5017, 8913, 16, 18760, 8481, 13356, 16, 2826, 2116, 13, 2, -100, -1...
demo_main(PlotFrame, size=size, title=title)
try: demo_main(PlotFrame, size=size, title=title) finally: if _stream is not None: _stream.close()
def closeEvent(self, event): # stop the timer if getattr(self, "timer", None): self.timer.stop() return super(PlotFrame, self).closeEvent(event)
62a694dbe985bb9e9007d6bf4cb21d6776a985ef /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13167/62a694dbe985bb9e9007d6bf4cb21d6776a985ef/spectrum.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1746, 1133, 12, 2890, 16, 871, 4672, 468, 2132, 326, 5441, 309, 3869, 12, 2890, 16, 315, 12542, 3113, 599, 4672, 365, 18, 12542, 18, 5681, 1435, 327, 2240, 12, 11532, 3219, 16, 365, 29...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1746, 1133, 12, 2890, 16, 871, 4672, 468, 2132, 326, 5441, 309, 3869, 12, 2890, 16, 315, 12542, 3113, 599, 4672, 365, 18, 12542, 18, 5681, 1435, 327, 2240, 12, 11532, 3219, 16, 365, 29...
print p1.before print p2.before
def test_constructor (self):
ee46358fb5dcd033e5e693b83fb38f34727af8b0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9386/ee46358fb5dcd033e5e693b83fb38f34727af8b0/test_constructor.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 12316, 261, 2890, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 12316, 261, 2890, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
bertos_utils.setEnabledModules(dialog.version_page.project(), enabled_modules)
bertos_utils.setEnabledModules(dialog.version_page.project, enabled_modules)
def changeBertosVersion(self):
c52326c3ff542f02e9c739a952f24077e8b4687f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9114/c52326c3ff542f02e9c739a952f24077e8b4687f/BEditingDialog.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2549, 38, 1051, 538, 1444, 12, 2890, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 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, 2549, 38, 1051, 538, 1444, 12, 2890, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
w("\t%s = { isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = \"%s.app\" ; sourceTree = BUILT_PRODUCTS_DIR; };\n" % (d.applicationId, d.projectName))
w("\t%s = {\n\t\tisa = PBXFileReference;\n\t\texplicitFileType = wrapper.application;\n\t\tincludeInIndex = 0;\n\t\tpath = \"%s.app\";\n\t\tsourceTree = BUILT_PRODUCTS_DIR;\n\t};\n" % (d.applicationId, d.projectName))
def writePBXFileReference(self): w = self.file.write w("/* Begin PBXFileReference section */\n") for name, setting, buildfile, fileref in self.buildSettingsId[1]: w("\t%s = { isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = \"%s\"; path = \"%s\" ; sourceTree = \"SOURCE_ROOT\"; };\n" % (fileref, name+'.xcconfig', os.path.join('mak', 'xcode', name+'.xcconfig'))) for d in self.projects: d.targetId = newid() d.phaseId = [newid(), newid(), newid()] d.applicationId = newid() if d.usemaster: w("\t%s = { isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.cpp; name = \"%s\"; path = \"%s\" ; sourceTree = \"SOURCE_ROOT\"; };\n" % (d.masterid, os.path.split(d.masterfilename)[1], d.masterfilename)) self.pbxFileRefTree(d.sourceTree) if d.type in ['game', 'tool']: w("\t%s = { isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = \"%s.app\" ; sourceTree = BUILT_PRODUCTS_DIR; };\n" % (d.applicationId, d.projectName)) elif d.type in ['library', 'static_library', 'plugin']: w("\t%s = { isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = \"lib%s.a\" ; sourceTree = BUILT_PRODUCTS_DIR; };\n" % (d.applicationId, d.projectName)) d.buildSettingsId = (newid(), [('iphone-debug', newid()), ('iphone-profile', newid()), ('iphone-final', newid()), ('osx-debug', newid()), ('osx-profile', newid()), ('osx-final', newid())]) w("/* End PBXFileReference section */\n\n")
d7aadbc0a472761177dc3ee9ceac6f02c9a19b91 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7302/d7aadbc0a472761177dc3ee9ceac6f02c9a19b91/xcode.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 20724, 60, 812, 2404, 12, 2890, 4672, 341, 273, 365, 18, 768, 18, 2626, 341, 2932, 20308, 14323, 20819, 60, 812, 2404, 2442, 1195, 64, 82, 7923, 364, 508, 16, 3637, 16, 1361, 768...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 20724, 60, 812, 2404, 12, 2890, 4672, 341, 273, 365, 18, 768, 18, 2626, 341, 2932, 20308, 14323, 20819, 60, 812, 2404, 2442, 1195, 64, 82, 7923, 364, 508, 16, 3637, 16, 1361, 768...
self.parent.focus_set()
if self.parent is not None: self.parent.focus_set()
def cancel(self, event=None):
fd222c17326c70116943d773e88167c6c755ebfd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/fd222c17326c70116943d773e88167c6c755ebfd/tkSimpleDialog.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3755, 12, 2890, 16, 871, 33, 7036, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3755, 12, 2890, 16, 871, 33, 7036, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
locales = set()
def GenResIndex(dat_list_file_path): res_index = "res_index.txt" locales = set() brkitrs = set() colls = set() currs = set() langs = set() regions = set() zones = set() rbnfs = set() for line in open(dat_list_file_path, "r"): if line.find("root.") >= 0: continue if line.find("res_index") >= 0: continue if line.find("_.res") >= 0: continue; if line.find("brkitr/") >= 0: end = line.find(".res") if end > 0: brkitrs.add(line[line.find("/")+1:end]) elif line.find("coll/") >= 0: end = line.find(".res") if end > 0: colls.add(line[line.find("/")+1:end]) elif line.find("curr/") >= 0: end = line.find(".res") if end > 0: currs.add(line[line.find("/")+1:end]) elif line.find("lang/") >= 0: end = line.find(".res") if end > 0: langs.add(line[line.find("/")+1:end]) elif line.find("region/") >= 0: end = line.find(".res") if end > 0: regions.add(line[line.find("/")+1:end]) elif line.find("zone/") >= 0: end = line.find(".res") if end > 0: zones.add(line[line.find("/")+1:end]) elif line.find("rbnf/") >= 0: end = line.find(".res") if end > 0: rbnfs.add(line[line.find("/")+1:end]) elif line.find(".res") >= 0: # We need to determine the resource is locale resource or misc resource. # To determine the locale resource, we assume max script length is 3. end = line.find(".res") if end <= 3 or (line.find("_") <= 3 and line.find("_") > 0): locales.add(line[:end]) ShowMissing(brkitrs, locales, "brkitr", dat_list_file_path) ShowMissing(colls, locales, "coll", dat_list_file_path) ShowMissing(currs, locales, "curr", dat_list_file_path) ShowMissing(langs, locales, "lang", dat_list_file_path) ShowMissing(regions, locales, "region", dat_list_file_path) ShowMissing(zones, locales, "zone", dat_list_file_path) ShowMissing(rbnfs, locales, "rbnf", dat_list_file_path) WriteIndex(os.path.join(TMP_DAT_PATH, res_index), locales, CLDR_VERSION) WriteIndex(os.path.join(TMP_DAT_PATH, "brkitr", res_index), brkitrs) WriteIndex(os.path.join(TMP_DAT_PATH, "coll", res_index), colls) WriteIndex(os.path.join(TMP_DAT_PATH, "curr", res_index), currs) WriteIndex(os.path.join(TMP_DAT_PATH, "lang", res_index), langs) WriteIndex(os.path.join(TMP_DAT_PATH, "region", res_index), regions) WriteIndex(os.path.join(TMP_DAT_PATH, "zone", res_index), zones) WriteIndex(os.path.join(TMP_DAT_PATH, "rbnf", res_index), rbnfs) # Call genrb to generate new res_index.res. InvokeIcuTool("genrb", TMP_DAT_PATH, [res_index]) InvokeIcuTool("genrb", os.path.join(TMP_DAT_PATH, "brkitr"), [res_index]) InvokeIcuTool("genrb", os.path.join(TMP_DAT_PATH, "coll"), [res_index]) InvokeIcuTool("genrb", os.path.join(TMP_DAT_PATH, "curr"), [res_index]) InvokeIcuTool("genrb", os.path.join(TMP_DAT_PATH, "lang"), [res_index]) InvokeIcuTool("genrb", os.path.join(TMP_DAT_PATH, "region"), [res_index]) InvokeIcuTool("genrb", os.path.join(TMP_DAT_PATH, "zone"), [res_index]) if len(rbnfs): InvokeIcuTool("genrb", os.path.join(TMP_DAT_PATH, "rbnf"), [res_index])
89f309f809ddaba6a3ba4a31a8ee74cfa5e85be3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10672/89f309f809ddaba6a3ba4a31a8ee74cfa5e85be3/icu_dat_generator.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10938, 607, 1016, 12, 3404, 67, 1098, 67, 768, 67, 803, 4672, 400, 67, 1615, 273, 315, 455, 67, 1615, 18, 5830, 6, 225, 5186, 8691, 5453, 273, 444, 1435, 645, 3251, 273, 444, 1435, 4...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10938, 607, 1016, 12, 3404, 67, 1098, 67, 768, 67, 803, 4672, 400, 67, 1615, 273, 315, 455, 67, 1615, 18, 5830, 6, 225, 5186, 8691, 5453, 273, 444, 1435, 645, 3251, 273, 444, 1435, 4...
connection = self._getConnection( connection )
def getReplicaStatus( self, lfns, connection = False ): connection = self._getConnection( connection ) """ Get replica status from the catalog """ res = self._findFiles( lfns, connection = connection ) failed = res['Value']['Failed'] fileIDLFNs = {} for lfn, fileDict in res['Value']['Successful'].items(): fileID = fileDict['FileID'] fileIDLFNs[fileID] = lfn successful = {} if fileIDLFNs: res = self._getFileReplicas( fileIDLFNs.keys(), connection = connection ) if not res['OK']: return res for fileID, seDict in res['Value'].items(): lfn = fileIDLFNs[fileID] requestedSE = lfns[lfn] if not requestedSE: failed[lfn] = "Replica info not supplied" elif requestedSE not in seDict.keys(): failed[lfn] = "No replica at supplied site" else: successful[lfn] = seDict[requestedSE]['Status'] return S_OK( {'Successful':successful, 'Failed':failed} )
730c8c8e8acbd225fa02fcc8d670bcbd786db665 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/730c8c8e8acbd225fa02fcc8d670bcbd786db665/FileManagerBase.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5561, 6996, 1482, 12, 365, 16, 18594, 2387, 16, 1459, 273, 1083, 262, 30, 3536, 968, 12335, 1267, 628, 326, 6222, 3536, 400, 273, 365, 6315, 4720, 2697, 12, 18594, 2387, 16, 1459, 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, 5561, 6996, 1482, 12, 365, 16, 18594, 2387, 16, 1459, 273, 1083, 262, 30, 3536, 968, 12335, 1267, 628, 326, 6222, 3536, 400, 273, 365, 6315, 4720, 2697, 12, 18594, 2387, 16, 1459, 273, ...
raise dtella.Reject
raise Reject
def gotSyncTopic(self, src_ipp, ack_key, topic):
8cdfc22c2b13a13391c4a0ab0cafff0e071e6da2 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4752/8cdfc22c2b13a13391c4a0ab0cafff0e071e6da2/dtella.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2363, 4047, 6657, 12, 2890, 16, 1705, 67, 15491, 16, 8479, 67, 856, 16, 3958, 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...
[ 1, 1, 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, 2363, 4047, 6657, 12, 2890, 16, 1705, 67, 15491, 16, 8479, 67, 856, 16, 3958, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
def print_short_list(self, entries=None):
def print_short_list(self, entries):
def print_short_list(self, entries=None): """Prints all `entries` in a short format: If `entries` is None, all entries are printed""" if entries is None: entries = self.phonebook for entry in entries: print repr(entry)
500a390f053c916fbb5e449916c39bcc41901f78 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2215/500a390f053c916fbb5e449916c39bcc41901f78/tel.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1652, 1172, 67, 6620, 67, 1098, 12, 2890, 16, 3222, 4672, 3536, 15402, 777, 1375, 8219, 68, 316, 279, 3025, 740, 30, 971, 1375, 8219, 68, 353, 599, 16, 777, 3222, 854, 14099, 8395, 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, 282, 1652, 1172, 67, 6620, 67, 1098, 12, 2890, 16, 3222, 4672, 3536, 15402, 777, 1375, 8219, 68, 316, 279, 3025, 740, 30, 971, 1375, 8219, 68, 353, 599, 16, 777, 3222, 854, 14099, 8395, 309,...
res = a and opj(a, *args) or False if zipfile.is_zipfile( a +'.zip') :
if not a: return False res = opj(a, *args) if os.path.isfile(res): return res elif zipfile.is_zipfile( a +'.zip') :
def get_module_resource(module, *args): """Return the full path of a resource of the given module. @param module: the module @param args: the resource path components @return: absolute path to the resource """ a = get_module_path(module) res = a and opj(a, *args) or False if zipfile.is_zipfile( a +'.zip') : zip = zipfile.ZipFile( a + ".zip") files = ['/'.join(f.split('/')[1:]) for f in zip.namelist()] res = '/'.join(args) if res in files: return opj(a, res) elif os.path.isfile(res): return res return False
a62e74f8d8e5af6ed1b785521ad319f9d3ed9b5e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12853/a62e74f8d8e5af6ed1b785521ad319f9d3ed9b5e/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 2978, 67, 3146, 12, 2978, 16, 380, 1968, 4672, 3536, 990, 326, 1983, 589, 434, 279, 1058, 434, 326, 864, 1605, 18, 225, 632, 891, 1605, 30, 326, 1605, 632, 891, 833, 30, 326...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 2978, 67, 3146, 12, 2978, 16, 380, 1968, 4672, 3536, 990, 326, 1983, 589, 434, 279, 1058, 434, 326, 864, 1605, 18, 225, 632, 891, 1605, 30, 326, 1605, 632, 891, 833, 30, 326...
raise "\nERROR: Invalid Tree Item. "
raise Exception("\nERROR: Invalid Tree Item. ")
def SetItemTextColour(self, item, col): """Sets the item text colour."""
e1463b9df091ad0e9d76292564d4389882b28de1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/e1463b9df091ad0e9d76292564d4389882b28de1/customtreectrl.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1000, 1180, 1528, 26404, 12, 2890, 16, 761, 16, 645, 4672, 3536, 2785, 326, 761, 977, 15046, 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...
[ 1, 1, 1, 1, 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, 1000, 1180, 1528, 26404, 12, 2890, 16, 761, 16, 645, 4672, 3536, 2785, 326, 761, 977, 15046, 12123, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...