rem
stringlengths
2
226k
add
stringlengths
0
227k
context
stringlengths
8
228k
meta
stringlengths
156
215
input_ids
list
attention_mask
list
labels
list
globalvar.makeWelcomLog = False
globalvar.makeWelcomeLog = False
def load_word_function(raw): """ This is a function used to load the badword and the whitelist.""" page = re.compile(r"(?:\"|\')(.*?)(?:\"|\')(?:, |\))", re.UNICODE) list_loaded = page.findall(raw) if len(list_loaded) == 0: wikipedia.output(u'There was no input on the real-time page.') return list_loaded
76a9be428ee708fba178529483ff20338bedcab7 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4404/76a9be428ee708fba178529483ff20338bedcab7/welcome.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1262, 67, 1095, 67, 915, 12, 1899, 4672, 3536, 1220, 353, 279, 445, 1399, 358, 1262, 326, 5570, 1095, 471, 326, 10734, 12123, 1363, 273, 283, 18, 11100, 12, 86, 6, 6503, 2412, 96, 3730...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1262, 67, 1095, 67, 915, 12, 1899, 4672, 3536, 1220, 353, 279, 445, 1399, 358, 1262, 326, 5570, 1095, 471, 326, 10734, 12123, 1363, 273, 283, 18, 11100, 12, 86, 6, 6503, 2412, 96, 3730...
self.nodes = getlist(t)
self.nodes = get_objects(t)
def from_tree(self, t): f = gettreeitem(t, 'funDecls') if f.symbol == "dict": func_decl = [from_tree(f),] elif f.symbol == "list": func_decl = [from_tree(x) for x in f.children] else: func_decl = [] v = gettreeitem(t, 'varDecls') if v.symbol == "dict": var_decl = [from_tree(v),] elif v.symbol == "list": var_decl = [from_tree(x) for x in v.children] else: var_decl = [] self.nodes = getlist(t) self.var_decl = var_decl self.func_decl = func_decl
48bed23139fcbb7150e0ac6137ec3ef5e47635f5 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6934/48bed23139fcbb7150e0ac6137ec3ef5e47635f5/interpreter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 628, 67, 3413, 12, 2890, 16, 268, 4672, 284, 273, 336, 3413, 1726, 12, 88, 16, 296, 12125, 1799, 3251, 6134, 309, 284, 18, 7175, 422, 315, 1576, 6877, 1326, 67, 8840, 273, 306, 2080, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 628, 67, 3413, 12, 2890, 16, 268, 4672, 284, 273, 336, 3413, 1726, 12, 88, 16, 296, 12125, 1799, 3251, 6134, 309, 284, 18, 7175, 422, 315, 1576, 6877, 1326, 67, 8840, 273, 306, 2080, ...
emitter = [ create_distinct_builders, ] )
emitter = [ copyto_emitter, ] )
def copy_action_str(target, source, env): return env.subst_target_source(env['COPYSTR'], 0, target, source)
faff0834984101a38b4a4d63c58811f961ac5754 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12817/faff0834984101a38b4a4d63c58811f961ac5754/filesystem.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1610, 67, 1128, 67, 701, 12, 3299, 16, 1084, 16, 1550, 4672, 327, 1550, 18, 1717, 334, 67, 3299, 67, 3168, 12, 3074, 3292, 24875, 3902, 17337, 374, 16, 1018, 16, 1084, 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, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1610, 67, 1128, 67, 701, 12, 3299, 16, 1084, 16, 1550, 4672, 327, 1550, 18, 1717, 334, 67, 3299, 67, 3168, 12, 3074, 3292, 24875, 3902, 17337, 374, 16, 1018, 16, 1084, 13, 2, -100, -...
def _coerce_impl(self, x):
def _coerce_from_special_method(self, x): """ Tries to coerce to self by calling a special underscore method. If no such method is defined, raises an AttributeError instead of a TypeError. """
def __call__(self, x): r""" Create a new object in self from x.
93d02cb52aea2868509a2ffddba71ce82e819eff /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/93d02cb52aea2868509a2ffddba71ce82e819eff/expect.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 619, 4672, 436, 8395, 1788, 279, 394, 733, 316, 365, 628, 619, 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...
[ 1, 1, 1, 1, 1, 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, 1001, 1991, 972, 12, 2890, 16, 619, 4672, 436, 8395, 1788, 279, 394, 733, 316, 365, 628, 619, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
Debug.write('Average ratio: %.2f' % (ratio / len(images))
Debug.write('Average ratio: %.2f' % (ratio / len(images)))
def _integrate_prepare(self): '''Prepare for integration - note that if there is a reason why this is needed to be run again, set self._intgr_prepare_done as False.'''
b6e062ecce0536bfa9ed6190fdc0a20a3c09db46 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3290/b6e062ecce0536bfa9ed6190fdc0a20a3c09db46/Mosflm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 14970, 5141, 67, 9366, 12, 2890, 4672, 9163, 7543, 364, 12040, 300, 4721, 716, 309, 1915, 353, 279, 3971, 11598, 333, 353, 3577, 358, 506, 1086, 3382, 16, 444, 365, 6315, 474, 3197,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 14970, 5141, 67, 9366, 12, 2890, 4672, 9163, 7543, 364, 12040, 300, 4721, 716, 309, 1915, 353, 279, 3971, 11598, 333, 353, 3577, 358, 506, 1086, 3382, 16, 444, 365, 6315, 474, 3197,...
this = apply(_quickfix.new_NoRoutingIDs, args)
this = _quickfix.new_NoRoutingIDs(*args)
def __init__(self, *args): this = apply(_quickfix.new_NoRoutingIDs, args) try: self.this.append(this) except: self.this = this
7e632099fd421880c8c65fb0cf610d338d115ee9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8819/7e632099fd421880c8c65fb0cf610d338d115ee9/quickfix.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 380, 1968, 4672, 333, 273, 389, 19525, 904, 18, 2704, 67, 2279, 13966, 5103, 30857, 1968, 13, 775, 30, 365, 18, 2211, 18, 6923, 12, 2211, 13, 1335, 30, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 380, 1968, 4672, 333, 273, 389, 19525, 904, 18, 2704, 67, 2279, 13966, 5103, 30857, 1968, 13, 775, 30, 365, 18, 2211, 18, 6923, 12, 2211, 13, 1335, 30, ...
self.esema.acquire() elif timeout >= 0: delay = 0.0005
while self._empty(): self.not_empty.wait() else: if timeout < 0: raise ValueError("'timeout' must be a positive number")
def get(self, block=True, timeout=None): """Remove and return an item from the queue.
5af0e414822e0e5da17566e1156005df520d1ae0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/5af0e414822e0e5da17566e1156005df520d1ae0/Queue.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 12, 2890, 16, 1203, 33, 5510, 16, 2021, 33, 7036, 4672, 3536, 3288, 471, 327, 392, 761, 628, 326, 2389, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 12, 2890, 16, 1203, 33, 5510, 16, 2021, 33, 7036, 4672, 3536, 3288, 471, 327, 392, 761, 628, 326, 2389, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
(UnicodeTranslateError, ("\u3042", 0, 1, str8("ouch")),
(UnicodeTranslateError, ("\u3042", 0, 1, "ouch"),
def testAttributes(self): # test that exception attributes are happy
240d497db68b1863b11addabb52bb2fea8d8f479 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12029/240d497db68b1863b11addabb52bb2fea8d8f479/test_exceptions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 2498, 12, 2890, 4672, 468, 1842, 716, 1520, 1677, 854, 5622, 2074, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 2498, 12, 2890, 4672, 468, 1842, 716, 1520, 1677, 854, 5622, 2074, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
t.do_script(with_command=cmd)
t.do_script(cmd)
def _run_with_cl_interpreter(self): import Terminal interp_path = os.path.join(sys.exec_prefix, "bin", "python") file_path = self.path if not os.path.exists(interp_path): # This "can happen" if we are running IDE under MacPython-OS9. raise W.AlertError, "Can't find command-line Python" cmd = '"%s" "%s" ; exit' % (interp_path, file_path) t = Terminal.Terminal() t.do_script(with_command=cmd)
30184f3611d867124f7030dfcb182ab89245f47a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/30184f3611d867124f7030dfcb182ab89245f47a/PyEdit.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2681, 67, 1918, 67, 830, 67, 2761, 11599, 12, 2890, 4672, 1930, 18778, 8174, 67, 803, 273, 1140, 18, 803, 18, 5701, 12, 9499, 18, 4177, 67, 3239, 16, 315, 4757, 3113, 315, 8103, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2681, 67, 1918, 67, 830, 67, 2761, 11599, 12, 2890, 4672, 1930, 18778, 8174, 67, 803, 273, 1140, 18, 803, 18, 5701, 12, 9499, 18, 4177, 67, 3239, 16, 315, 4757, 3113, 315, 8103, ...
parent_str = super(ExtensionError, self).__str__()
parent_str = SphinxError.__str__(self)
def __str__(self): parent_str = super(ExtensionError, self).__str__() if self.orig_exc: return '%s (exception: %s)' % (parent_str, self.orig_exc) return parent_str
b1dbe952552cd265c4e554f0068a47a1afca8b69 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5532/b1dbe952552cd265c4e554f0068a47a1afca8b69/errors.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 701, 972, 12, 2890, 4672, 982, 67, 701, 273, 348, 15922, 668, 16186, 701, 972, 12, 2890, 13, 309, 365, 18, 4949, 67, 10075, 30, 327, 1995, 87, 261, 4064, 30, 738, 87, 2506, 738...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 701, 972, 12, 2890, 4672, 982, 67, 701, 273, 348, 15922, 668, 16186, 701, 972, 12, 2890, 13, 309, 365, 18, 4949, 67, 10075, 30, 327, 1995, 87, 261, 4064, 30, 738, 87, 2506, 738...
def cluster_file_hashes(glob_pattern): """Get the hashes of all the test expectations in the tree. We cheat and use git's hashes. Args: glob_pattern: a pattern to filter the files. Returns: A dictionary mapping (test name, hash of content) => [paths] """
hashes = deduplicate_tests.parse_git_output(git_output, '*.png') expected = {('animage.png', 'abcdebc762e3aec5df03b5c04485b2cb3b65ffb1'): set(['platform/chromium-linux/animage.png', 'platform/chromium-win/animage.png'])} self.assertEquals(expected, hashes)
def cluster_file_hashes(glob_pattern): """Get the hashes of all the test expectations in the tree. We cheat and use git's hashes. Args: glob_pattern: a pattern to filter the files. Returns: A dictionary mapping (test name, hash of content) => [paths] """ # A map of file hash => set of all files with that hash. hashes = collections.defaultdict(set) # Fill in the map. cmd = ('git', 'ls-tree', '-r', 'HEAD', 'LayoutTests') try: git_output = executive.Executive().run_command(cmd) except OSError, e: if e.errno == 2: # No such file or directory. _log.error("Error: 'No such file' when running git.") _log.error("This script requires git.") sys.exit(1) raise e return parse_git_output(git_output, glob_pattern)
7673a64b67960bceb356d6d41836b16e41937677 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9392/7673a64b67960bceb356d6d41836b16e41937677/deduplicate_tests_unittest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 9869, 273, 11140, 9025, 67, 16341, 18, 2670, 67, 6845, 67, 2844, 12, 6845, 67, 2844, 16, 19962, 6446, 6134, 2665, 273, 288, 2668, 304, 2730, 18, 6446, 2187, 296, 18947, 323, 13459, 6669, 22, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 9869, 273, 11140, 9025, 67, 16341, 18, 2670, 67, 6845, 67, 2844, 12, 6845, 67, 2844, 16, 19962, 6446, 6134, 2665, 273, 288, 2668, 304, 2730, 18, 6446, 2187, 296, 18947, 323, 13459, 6669, 22, ...
model = {loc_A: None, loc_B: None}
def make_agent_program (self): model = self.model
def __init__(self): super(ModelBasedVacuumAgent, self).__init__() model = {loc_A: None, loc_B: None} def program((location, status)): "Same as ReflexVacuumAgent, except if everything is clean, do NoOp" model[location] = status ## Update the model here if model[loc_A] == model[loc_B] == 'Clean': return 'NoOp' elif status == 'Dirty': return 'Suck' elif location == loc_A: return 'Right' elif location == loc_B: return 'Left' self.program = program
612bb0a1ea26afcd5519fa87593eb8d9e538dbb4 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/16/612bb0a1ea26afcd5519fa87593eb8d9e538dbb4/agents.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 2240, 12, 1488, 9802, 58, 1077, 89, 379, 3630, 16, 365, 2934, 972, 2738, 972, 1435, 225, 1652, 1221, 67, 5629, 67, 12890, 261, 2890, 4672, 938, 273, 36...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 2240, 12, 1488, 9802, 58, 1077, 89, 379, 3630, 16, 365, 2934, 972, 2738, 972, 1435, 225, 1652, 1221, 67, 5629, 67, 12890, 261, 2890, 4672, 938, 273, 36...
return install_dir
return instdir
def cmakeinst(basedir, instdir, name, url, defstrings = ""): topdir = os.getcwd() src_dir = getep(basedir,name,url) install_dir = join(instdir, name) print "Building %s" % name build_dir = join(basedir, "%s-build" % name) try: os.makedirs(build_dir) except os.error: print "Directory %s exists, using it" % build_dir os.chdir(build_dir) if os.system("cmake %s -DCMAKE_INSTALL_PREFIX=%s %s" % (src_dir, install_dir, " ".join(defstrings))) != 0: print "%s configuration in %s failed" % (name, build_dir) sys.exit() if os.system("make -j%i" % ncpus()) != 0: print "build in %s failed" % build_dir sys.exit() if os.system("make install") != 0: print "build in %s failed" % build_dir sys.exit() os.chdir(topdir) print "Build of %s Completed" % name return install_dir
8bab93a888e56b877ddefcb8d140a539b78882c6 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5491/8bab93a888e56b877ddefcb8d140a539b78882c6/getbuildtest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5003, 911, 8591, 12, 31722, 16, 1804, 1214, 16, 508, 16, 880, 16, 1652, 10219, 273, 1408, 4672, 1760, 1214, 273, 1140, 18, 588, 11089, 1435, 1705, 67, 1214, 273, 336, 881, 12, 31722, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5003, 911, 8591, 12, 31722, 16, 1804, 1214, 16, 508, 16, 880, 16, 1652, 10219, 273, 1408, 4672, 1760, 1214, 273, 1140, 18, 588, 11089, 1435, 1705, 67, 1214, 273, 336, 881, 12, 31722, 1...
if child_cls is not None and (True if child_cls is [c for c in [UrisTypeEntry]] else False):
if child_cls is not None and child_cls is UrisTypeEntry:
def _parse_element(self, element, *args, **kwargs): for child in element: child_cls = self._xml_application.get_element(child.tag) if child_cls is not None and (True if child_cls is [c for c in [UrisTypeEntry]] else False): try: list.append(self, child_cls.from_element(child, *args, **kwargs)) except ValidationError: pass
15fe0700dabe8824d207729fba65b9c17692c40c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5703/15fe0700dabe8824d207729fba65b9c17692c40c/conference.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2670, 67, 2956, 12, 2890, 16, 930, 16, 380, 1968, 16, 2826, 4333, 4672, 364, 1151, 316, 930, 30, 1151, 67, 6429, 273, 365, 6315, 2902, 67, 3685, 18, 588, 67, 2956, 12, 3624, 18,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2670, 67, 2956, 12, 2890, 16, 930, 16, 380, 1968, 16, 2826, 4333, 4672, 364, 1151, 316, 930, 30, 1151, 67, 6429, 273, 365, 6315, 2902, 67, 3685, 18, 588, 67, 2956, 12, 3624, 18,...
cr.execute("select (now() - min(write_date)) <= '%s'::interval from %s where id in (%s)"% (delta,self._table,",".join(map(str, ids))) )
cr.execute("select (now() - min(write_date)) <= '%s'::interval from \"%s\" where id in (%s)"% (delta,self._table,",".join(map(str, ids))) )
def unlink(self, cr, uid, ids, context=None): if not context: context={} if not ids: return True if isinstance(ids, (int, long)): ids = [ids] delta= context.get('read_delta',False) if delta and self._log_access: cr.execute("select (now() - min(write_date)) <= '%s'::interval from %s where id in (%s)"% (delta,self._table,",".join(map(str, ids))) ) res= cr.fetchone() if res and res[0]: raise except_orm('ConcurrencyException', 'This record was modified in the meanwhile')
21e2436edcfd48b26e17230380299a3196aac8b0 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7397/21e2436edcfd48b26e17230380299a3196aac8b0/orm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8255, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 819, 33, 7036, 4672, 309, 486, 819, 30, 819, 12938, 309, 486, 3258, 30, 327, 1053, 309, 1549, 12, 2232, 16, 261, 474, 16, 1525, 3719...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8255, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 819, 33, 7036, 4672, 309, 486, 819, 30, 819, 12938, 309, 486, 3258, 30, 327, 1053, 309, 1549, 12, 2232, 16, 261, 474, 16, 1525, 3719...
self.megapov_path_linedit.setGeometry(QRect(113,98,350,24))
def __init__(self,parent = None,name = None,modal = 0,fl = 0): QDialog.__init__(self,parent,name,modal,fl)
7cc18611a6df93ebc9707a8878e31fb8451f8ff6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/7cc18611a6df93ebc9707a8878e31fb8451f8ff6/UserPrefsDialog.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2938, 273, 599, 16, 529, 273, 599, 16, 17638, 273, 374, 16, 2242, 273, 374, 4672, 2238, 6353, 16186, 2738, 972, 12, 2890, 16, 2938, 16, 529, 16, 17638, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2938, 273, 599, 16, 529, 273, 599, 16, 17638, 273, 374, 16, 2242, 273, 374, 4672, 2238, 6353, 16186, 2738, 972, 12, 2890, 16, 2938, 16, 529, 16, 17638, ...
""" Creates a new catalog in the given uri. The 'id' parameter is the name
"""Creates a new catalog in the given uri. The 'id' parameter is the name
def make_catalog(uri, *fields): """ Creates a new catalog in the given uri. The 'id' parameter is the name of the field that will be considered the external id; it will be used when unindexing a document, and to retrieve the original document; this field must be "indexed" and "stored". The positional arguments define the fields to be indexed (and/or stored). The first field (there must be at least one) defines the "external id", which is a unique identifier used to unindex the document and to load the original document; this field must be both indexed and stored. """ if len(fields) == 0: raise ValueError, 'at least one field must be provided' master = fields[0] if master.is_indexed is False or master.is_stored is False: msg = 'the first field (master) must be both indexed and stored' raise ValueError, msg uri = get_absolute_reference(uri) vfs.make_folder(uri) base = vfs.open(uri) base.make_folder('data') # Create the indexes metadata = [] for i, field in enumerate(fields): # The metadata file metadata.append('%d#%s#%s#%d#%d\n' % (i, field.name, field.type, field.is_indexed, field.is_stored)) # Create the index file base.make_file('data/%d_docs' % i) file = base.make_file('data/%d_tree' % i) try: file.write(''.join([VERSION, ZERO, NULL, NULL])) finally: file.close() # Write the metadata file file = base.make_file('fields') try: file.write(''.join(metadata)) finally: file.close() # Create the documents base.make_file('data/documents') base.make_file('data/documents_index') # Create the backup data base.copy('data', 'data.bak') file = base.make_file('state') try: file.write('OK\n') finally: file.close() return Catalog(uri)
78d81817463acbe5a10737c561d712ddd9736c09 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12681/78d81817463acbe5a10737c561d712ddd9736c09/catalog.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 67, 7199, 12, 1650, 16, 380, 2821, 4672, 3536, 2729, 279, 394, 6222, 316, 326, 864, 2003, 18, 1021, 296, 350, 11, 1569, 353, 326, 508, 434, 326, 652, 716, 903, 506, 7399, 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, 1221, 67, 7199, 12, 1650, 16, 380, 2821, 4672, 3536, 2729, 279, 394, 6222, 316, 326, 864, 2003, 18, 1021, 296, 350, 11, 1569, 353, 326, 508, 434, 326, 652, 716, 903, 506, 7399, 326, ...
self.log("HTTPS %s cert %r issuer %s [%s] subject %s [%s]" % (tag, x, x.getIssuer(), x.hAKI(), x.getSubject(), x.hSKI()))
rpki.log.debug("%r: HTTPS %s cert %r issuer %s [%s] subject %s [%s]" % (self, tag, x, x.getIssuer(), x.hAKI(), x.getSubject(), x.hSKI()))
def log_cert(self, tag, x): if debug_tls_certs: self.log("HTTPS %s cert %r issuer %s [%s] subject %s [%s]" % (tag, x, x.getIssuer(), x.hAKI(), x.getSubject(), x.hSKI()))
4cf293b56d548079b41a398c8c1c61cd9b778e92 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/119/4cf293b56d548079b41a398c8c1c61cd9b778e92/https.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 613, 67, 7593, 12, 2890, 16, 1047, 16, 619, 4672, 309, 1198, 67, 17116, 67, 24596, 30, 365, 18, 1330, 2932, 18657, 738, 87, 3320, 738, 86, 9715, 738, 87, 9799, 87, 65, 3221, 738, 87,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 613, 67, 7593, 12, 2890, 16, 1047, 16, 619, 4672, 309, 1198, 67, 17116, 67, 24596, 30, 365, 18, 1330, 2932, 18657, 738, 87, 3320, 738, 86, 9715, 738, 87, 9799, 87, 65, 3221, 738, 87,...
file=os.path.join(c_dir, file) if os.path.isfile(file): return file if os.path.isfile("%s_%sx%s.png" % (file, config.CONF.width,
dfile=os.path.join(c_dir, file) if os.path.isfile(dfile): return dfile if os.path.isfile("%s_%sx%s.png" % (dfile, config.CONF.width,
def attr_file(node, attr, default, c_dir): if node.attrs.has_key(('', attr)): file = node.attrs[('', attr)].encode('latin-1') if file: file=os.path.join(c_dir, file) if os.path.isfile(file): return file if os.path.isfile("%s_%sx%s.png" % (file, config.CONF.width, config.CONF.height)): return "%s_%sx%s.png" % (file, config.CONF.width, config.CONF.height) if os.path.isfile("%s_%sx%s.jpg" % (file, config.CONF.width, config.CONF.height)): return "%s_%sx%s.jpg" % (file, config.CONF.width, config.CONF.height) if config.CONF.width == 720 and os.path.isfile("%s_768x576.png" % file): return "%s_768x576.png" % file if config.CONF.width == 720 and os.path.isfile("%s_768x576.jpg" % file): return "%s_768x576.jpg" % file if os.path.isfile("%s_800x600.png" % file): return "%s_800x600.png" % file if os.path.isfile("%s_800x600.jpg" % file): return "%s_800x600.jpg" % file return file return default
5b00e18952b799bcb6428c0d98ce150703eb2055 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/5b00e18952b799bcb6428c0d98ce150703eb2055/xml_skin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1604, 67, 768, 12, 2159, 16, 1604, 16, 805, 16, 276, 67, 1214, 4672, 309, 756, 18, 7039, 18, 5332, 67, 856, 12, 2668, 2187, 1604, 3719, 30, 585, 273, 756, 18, 7039, 63, 2668, 2187, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1604, 67, 768, 12, 2159, 16, 1604, 16, 805, 16, 276, 67, 1214, 4672, 309, 756, 18, 7039, 18, 5332, 67, 856, 12, 2668, 2187, 1604, 3719, 30, 585, 273, 756, 18, 7039, 63, 2668, 2187, ...
done = []
def selection_field(in_field): col_obj = self.pool.get(in_field.keys()[0]) if f[i] in col_obj._columns.keys(): return col_obj._columns[f[i]] elif f[i] in col_obj._inherits.keys(): selection_field(col_obj._inherits) else: return False
602815a5adcdd7d92cfe88ee9efad5b97a89e1ef /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/602815a5adcdd7d92cfe88ee9efad5b97a89e1ef/orm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4421, 67, 1518, 12, 267, 67, 1518, 4672, 645, 67, 2603, 273, 365, 18, 6011, 18, 588, 12, 267, 67, 1518, 18, 2452, 1435, 63, 20, 5717, 309, 284, 63, 77, 65, 316, 645, 67, 2603, 6315...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4421, 67, 1518, 12, 267, 67, 1518, 4672, 645, 67, 2603, 273, 365, 18, 6011, 18, 588, 12, 267, 67, 1518, 18, 2452, 1435, 63, 20, 5717, 309, 284, 63, 77, 65, 316, 645, 67, 2603, 6315...
if type == 'cube':
if format == 'cube':
def read(filename, index=-1): p = filename.rfind('@') if p != -1: try: index = string2index(filename[p + 1:]) except ValueError: pass else: filename = filename[:p] type = filetype(filename) if type.startswith('gpw'): from gpaw import Calculator atoms = Calculator(filename, txt=None).get_atoms() atoms.set_calculator(None) return atoms if type == 'xyz': from ase.io.xyz import read_xyz return read_xyz(filename, index) if type == 'traj': from ase.io.trajectory import read_trajectory return read_trajectory(filename, index) if type == 'cube': from ase.io.cube import read_cube return read_cube(filename, index) if type == 'nc': from ase.io.netcdf import read_netcdf return read_netcdf(filename, index) if type == 'gpaw-text': from ase.io.gpawtext import read_gpaw_text return read_gpaw_text(filename, index) if type == 'dacapo-text': from ase.io.dacapo import read_dacapo_text return read_dacapo_text(filename) if type == 'dacapo': from ase.io.dacapo import read_dacapo return read_dacapo(filename) raise RuntimeError('That can *not* happen!')
ed91493e39dbfd0ffd1dbf4fdedcf8833d9bd2f0 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5735/ed91493e39dbfd0ffd1dbf4fdedcf8833d9bd2f0/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 12, 3459, 16, 770, 29711, 21, 4672, 293, 273, 1544, 18, 86, 4720, 2668, 36, 6134, 309, 293, 480, 300, 21, 30, 775, 30, 770, 273, 533, 22, 1615, 12, 3459, 63, 84, 397, 404, 30,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 12, 3459, 16, 770, 29711, 21, 4672, 293, 273, 1544, 18, 86, 4720, 2668, 36, 6134, 309, 293, 480, 300, 21, 30, 775, 30, 770, 273, 533, 22, 1615, 12, 3459, 63, 84, 397, 404, 30,...
check(unicode('abc', codecname), u'abc') check(unicode('xdef', codecname), u'abcdef') check(unicode('defx', codecname), u'defabc') check(unicode('dxf', codecname), u'dabcf') check(unicode('dxfx', codecname), u'dabcfabc')
class CharmapCodecTest(unittest.TestCase): def test_constructorx(self): self.assertEquals(unicode('abc', codecname), u'abc') self.assertEquals(unicode('xdef', codecname), u'abcdef') self.assertEquals(unicode('defx', codecname), u'defabc') self.assertEquals(unicode('dxf', codecname), u'dabcf') self.assertEquals(unicode('dxfx', codecname), u'dabcfabc')
def check(a, b): if a != b: print '*** check failed: %s != %s' % (repr(a), repr(b)) else: print '%s == %s: OK' % (a, b)
1413fdd21de7ea15a17172fb1461ea80e82f70fc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/1413fdd21de7ea15a17172fb1461ea80e82f70fc/test_charmapcodec.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 12, 69, 16, 324, 4672, 309, 279, 480, 324, 30, 1172, 296, 14465, 866, 2535, 30, 738, 87, 480, 738, 87, 11, 738, 261, 12715, 12, 69, 3631, 8480, 12, 70, 3719, 469, 30, 1172, 19...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 12, 69, 16, 324, 4672, 309, 279, 480, 324, 30, 1172, 296, 14465, 866, 2535, 30, 738, 87, 480, 738, 87, 11, 738, 261, 12715, 12, 69, 3631, 8480, 12, 70, 3719, 469, 30, 1172, 19...
j = i + (n+3)/4*4
j = i + (n+3)//4*4
def unpack_fstring(self, n): if n < 0: raise ValueError, 'fstring size must be nonnegative' i = self.__pos j = i + (n+3)/4*4 if j > len(self.__buf): raise EOFError self.__pos = j return self.__buf[i:i+n]
4f564bd68a5bf3e22c81c0c74f0e781fa0d3f70a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/4f564bd68a5bf3e22c81c0c74f0e781fa0d3f70a/xdrlib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6167, 67, 74, 1080, 12, 2890, 16, 290, 4672, 309, 290, 411, 374, 30, 1002, 2068, 16, 296, 74, 1080, 963, 1297, 506, 1661, 13258, 11, 277, 273, 365, 16186, 917, 525, 273, 277, 397, 26...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6167, 67, 74, 1080, 12, 2890, 16, 290, 4672, 309, 290, 411, 374, 30, 1002, 2068, 16, 296, 74, 1080, 963, 1297, 506, 1661, 13258, 11, 277, 273, 365, 16186, 917, 525, 273, 277, 397, 26...
"svn:ignore": "*.tmp",
"svn:ignore": "*.tmp\n",
def py_create_dump_file( filename, fileid, data, tmpdir ): """Creates a svn dump file using the python classes.""" lines = "line A\nline B\nline C\nline D\nline E\n" dump = SvnDumpFile() rev = data[0] revnr = rev["nr"] if revnr == 0: dump.create_with_rev_0( filename, rev["uuid"], rev["date"] ) else: dump.create_with_rev_n( filename, rev["uuid"], revnr ) revnr = revnr - 1 nodeprops = {} nrev = len(data) irev = 1 while irev < nrev: rev = data[irev] irev = irev + 1 revnr = revnr + 1 print " rev %d" % revnr revprops = {} revprops["svn:date"] = rev["date"] if rev.has_key( "author" ): revprops["svn:author"] = rev["author"] else: revprops["svn:author"] = "t%d" % revnr if rev.has_key( "log" ): revprops["svn:log"] = rev["log"] else: revprops["svn:log"] = "log for file '%s' rev %d" % \ ( fileid, revnr ) dump.add_rev( revprops ) nodes = rev["nodes"] nnode = len(nodes) inode = 0 while inode < nnode: nodedata = nodes[inode] inode = inode + 1 action = nodedata["action"] kind = nodedata["kind"] path = nodedata["path"] print " %s %s '%s'" % ( action, kind, path ) node = SvnDumpNode( path, action, kind ) if nodedata.has_key( "copyfrom" ): copyfrom = nodedata["copyfrom"] node.set_copy_from( copyfrom[0], copyfrom[1] ) if nodedata.has_key( "text" ): textfile = "%s/text-%d" % ( tmpdir, inode ) filerevtxt = "file %s rev %d\n" % ( fileid, revnr ) text = lines * 3 + filerevtxt + lines * 3 if nodedata["text"] == "binary": print "gzip !?!?!" text = zlib.compress( text ) elif nodedata["text"] == "broken-eol": text = text.replace( "B\n", "B\r\n" ) text = text.replace( "D\n", "D\r" ) fileobj = open( textfile, "wb" ) fileobj.write( text ) fileobj.close() node.set_text_file( textfile ) if action == "delete": del nodeprops[path] elif action == "add": if nodedata.has_key("props"): props = nodedata["props"].copy() else: props = {} node.set_properties( props ) nodeprops[path] = props elif nodedata.has_key("props"): for name, value in nodedata["props"].items(): if value == None: del nodeprops[path][name] else: nodeprops[path][name] = value node.set_properties( nodeprops[path] ) dump.add_node( node ) dump.close()
ea426dfb93d645bcd795a74b9f5557fd11fb9429 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/13212/ea426dfb93d645bcd795a74b9f5557fd11fb9429/svndumptest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2395, 67, 2640, 67, 8481, 67, 768, 12, 1544, 16, 585, 350, 16, 501, 16, 20213, 262, 30, 3536, 2729, 279, 5893, 82, 4657, 585, 1450, 326, 5790, 3318, 12123, 225, 2362, 273, 315, 1369, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2395, 67, 2640, 67, 8481, 67, 768, 12, 1544, 16, 585, 350, 16, 501, 16, 20213, 262, 30, 3536, 2729, 279, 5893, 82, 4657, 585, 1450, 326, 5790, 3318, 12123, 225, 2362, 273, 315, 1369, ...
print 'OwnedCollectionDTC'
def SetName(self, oldName, newName): print 'OwnedCollectionDTC' CollectionDTC.SetName(self, oldName, newName)
e6d3b1101435c39fbaff23b10ac5d7e8db0c67f3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/e6d3b1101435c39fbaff23b10ac5d7e8db0c67f3/UtilCompanions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17823, 12, 2890, 16, 22916, 16, 13253, 4672, 2200, 9081, 39, 18, 11924, 12, 2890, 16, 22916, 16, 13253, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 17823, 12, 2890, 16, 22916, 16, 13253, 4672, 2200, 9081, 39, 18, 11924, 12, 2890, 16, 22916, 16, 13253, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
imagecache = ImageCache(cache_dir, store, 5)
imagecache = ImageCache(cache_dir, store, 30000)
def run(disk, cachedir, *middleware): global store, cache_dir, imagecache store = Store(disk) cache_dir = cachedir imagecache = ImageCache(cache_dir, store, 5) web.run(urls, globals(), *middleware)
26ccf78233cd2d46ce710437a097c8a2c29d4af7 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3913/26ccf78233cd2d46ce710437a097c8a2c29d4af7/code.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 10863, 16, 3472, 481, 16, 380, 17352, 4672, 2552, 1707, 16, 1247, 67, 1214, 16, 1316, 2493, 1707, 273, 4994, 12, 10863, 13, 1247, 67, 1214, 273, 3472, 481, 1316, 2493, 273, 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, 10863, 16, 3472, 481, 16, 380, 17352, 4672, 2552, 1707, 16, 1247, 67, 1214, 16, 1316, 2493, 1707, 273, 4994, 12, 10863, 13, 1247, 67, 1214, 273, 3472, 481, 1316, 2493, 273, 3...
if self._docmap.has_key(cls):
if self._docmap.has_key(foverrides.cls()):
def _func_details(self, functions, cls, heading='Function Details'): """ @return: The HTML code for a function details table. This is used by L{_module_to_html} to describe the functions in a module; and by L{_class_to_html} to describe member functions. @rtype: C{string} """ functions = self._sort(functions) if len(functions) == 0: return '' str = self._table_header(heading, 'details')+'</table>'
62ff4e473663c51d0a945a451e36120f11d9450a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11420/62ff4e473663c51d0a945a451e36120f11d9450a/html.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 644, 67, 6395, 12, 2890, 16, 4186, 16, 2028, 16, 11053, 2218, 2083, 21897, 11, 4672, 3536, 632, 2463, 30, 1021, 3982, 981, 364, 279, 445, 3189, 1014, 18, 225, 1220, 353, 1399, 635...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 644, 67, 6395, 12, 2890, 16, 4186, 16, 2028, 16, 11053, 2218, 2083, 21897, 11, 4672, 3536, 632, 2463, 30, 1021, 3982, 981, 364, 279, 445, 3189, 1014, 18, 225, 1220, 353, 1399, 635...
self.outputs[0] = self.nextval
self.outputs[0] = self.nextval
def eval(self): """ Return True if the node need a reevaluation """ try: if self.iterable == "Empty": self.iterable = iter(self.inputs[0])
5fda268de0dda4bab796970bd52b0229fd793da1 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11338/5fda268de0dda4bab796970bd52b0229fd793da1/systemnodes.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5302, 12, 2890, 4672, 3536, 2000, 1053, 309, 326, 756, 1608, 279, 283, 14168, 367, 3536, 775, 30, 309, 365, 18, 15364, 422, 315, 1921, 6877, 365, 18, 15364, 273, 1400, 12, 2890, 18, 10...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5302, 12, 2890, 4672, 3536, 2000, 1053, 309, 326, 756, 1608, 279, 283, 14168, 367, 3536, 775, 30, 309, 365, 18, 15364, 422, 315, 1921, 6877, 365, 18, 15364, 273, 1400, 12, 2890, 18, 10...
assert sum(dist[1:]) == 2
assert sum(dist[1:]) == 2, dist
def test_abundance_dist(self): dist = self.kh.abundance_distribution() assert dist[0] == 4**4 assert sum(dist[1:]) == 0 n = self.kh.consume('AAAA') n = self.kh.consume('AACT') dist = self.kh.abundance_distribution() assert sum(dist[1:]) == 2 assert dist[1] == 2
ec4e41e6b1a2bcd2d2887f22b60662148c31e9ac /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11148/ec4e41e6b1a2bcd2d2887f22b60662148c31e9ac/test_hashtable.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 378, 30274, 67, 4413, 12, 2890, 4672, 2411, 273, 365, 18, 79, 76, 18, 378, 30274, 67, 16279, 1435, 1815, 2411, 63, 20, 65, 422, 1059, 636, 24, 1815, 2142, 12, 4413, 63, 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, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 378, 30274, 67, 4413, 12, 2890, 4672, 2411, 273, 365, 18, 79, 76, 18, 378, 30274, 67, 16279, 1435, 1815, 2411, 63, 20, 65, 422, 1059, 636, 24, 1815, 2142, 12, 4413, 63, 21,...
self.failUnlessIn(MM_NETWORK_MODE_ANY, get_network_modes(modes))
self.failIfIn(MM_NETWORK_MODE_ANY, get_network_modes(modes))
def test_CardSupportedModesProperty(self): """Test for Card.SupportedModes property""" modes = self.device.Get(CRD_INTFACE, 'SupportedModes', dbus_interface=dbus.PROPERTIES_IFACE) if not modes: raise unittest.SkipTest("Cannot be tested")
770e3633e1b87b1eb33c89c5938f2436b5be087c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12036/770e3633e1b87b1eb33c89c5938f2436b5be087c/test_dbus.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 6415, 7223, 18868, 1396, 12, 2890, 4672, 3536, 4709, 364, 14338, 18, 7223, 18868, 1272, 8395, 12382, 273, 365, 18, 5964, 18, 967, 12, 5093, 40, 67, 3217, 11300, 16, 296, 7223, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 6415, 7223, 18868, 1396, 12, 2890, 4672, 3536, 4709, 364, 14338, 18, 7223, 18868, 1272, 8395, 12382, 273, 365, 18, 5964, 18, 967, 12, 5093, 40, 67, 3217, 11300, 16, 296, 7223, ...
@prerequisite: Vi emulation is enabled and editor in Normal mode
@keyword do_cmd: Specify a command to run, if not specified the command in the cache will be used by default.
def ViCmdDispatch(self): """Processes vi commands @prerequisite: Vi emulation is enabled and editor in Normal mode
d023c5b12ecce0dc6442a431f190efefba5a2da8 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3530/d023c5b12ecce0dc6442a431f190efefba5a2da8/ed_stc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 23910, 5931, 5325, 12, 2890, 4672, 3536, 10599, 13206, 4364, 632, 683, 822, 16608, 1137, 30, 23910, 801, 6234, 353, 3696, 471, 4858, 316, 8769, 1965, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 23910, 5931, 5325, 12, 2890, 4672, 3536, 10599, 13206, 4364, 632, 683, 822, 16608, 1137, 30, 23910, 801, 6234, 353, 3696, 471, 4858, 316, 8769, 1965, 2, -100, -100, -100, -100, -100, -100,...
textbuffer = field.get_buffer()
textbuffer = field.get_child().get_buffer()
def save(self): new_vcard = vobject.vCard() new_vcard.add("prodid").value = "Arkadas 1.0" if has_child(self.vcard, "uid"): new_vcard.add("uid").value = uuid()
a8a4c6ca09f6afe3062c9a37ce6363c545145985 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2651/a8a4c6ca09f6afe3062c9a37ce6363c545145985/arkadas.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1923, 12, 2890, 4672, 394, 67, 90, 3327, 273, 331, 1612, 18, 90, 6415, 1435, 394, 67, 90, 3327, 18, 1289, 2932, 685, 14044, 20387, 1132, 273, 315, 686, 79, 361, 345, 404, 18, 20, 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, 1923, 12, 2890, 4672, 394, 67, 90, 3327, 273, 331, 1612, 18, 90, 6415, 1435, 394, 67, 90, 3327, 18, 1289, 2932, 685, 14044, 20387, 1132, 273, 315, 686, 79, 361, 345, 404, 18, 20, 6, ...
note = (object.im_self and ' method of %s instance' + object.im_self.__class__ or ' unbound %s method' % classname(imclass, mod))
inst = object.im_self note = (inst and ' method of %s instance' % classname(inst.__class__, mod) or ' unbound %s method' % classname(imclass, mod))
def docroutine(self, object, name=None, mod=None, cl=None): """Produce text documentation for a function or method object.""" realname = object.__name__ name = name or realname note = '' skipdocs = 0 if inspect.ismethod(object): imclass = object.im_class if cl: if imclass is not cl: note = ' from ' + classname(imclass, mod) skipdocs = 1 else: note = (object.im_self and ' method of %s instance' + object.im_self.__class__ or ' unbound %s method' % classname(imclass, mod)) object = object.im_func
7210e381bb7378e2878d4df18b834682eb760267 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/7210e381bb7378e2878d4df18b834682eb760267/pydoc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 997, 22640, 12, 2890, 16, 733, 16, 508, 33, 7036, 16, 681, 33, 7036, 16, 927, 33, 7036, 4672, 3536, 25884, 977, 7323, 364, 279, 445, 578, 707, 733, 12123, 2863, 529, 273, 733, 16186, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 997, 22640, 12, 2890, 16, 733, 16, 508, 33, 7036, 16, 681, 33, 7036, 16, 927, 33, 7036, 4672, 3536, 25884, 977, 7323, 364, 279, 445, 578, 707, 733, 12123, 2863, 529, 273, 733, 16186, ...
methodNames = self.methodNames
def _setUpClassError(tm): tm.errors.extend(setUpClass.errors) reporter.startTest(tm) self.methodsWithStatus.setdefault(tm.status, []).append(tm) reporter.endTest(tm)
6ea5552633d0904aa5ac8f0b93adaf4a1c9d5402 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/6ea5552633d0904aa5ac8f0b93adaf4a1c9d5402/runner.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 542, 1211, 797, 668, 12, 16925, 4672, 6118, 18, 4324, 18, 14313, 12, 542, 1211, 797, 18, 4324, 13, 11528, 18, 1937, 4709, 12, 16925, 13, 365, 18, 5163, 1190, 1482, 18, 542, 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, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 542, 1211, 797, 668, 12, 16925, 4672, 6118, 18, 4324, 18, 14313, 12, 542, 1211, 797, 18, 4324, 13, 11528, 18, 1937, 4709, 12, 16925, 13, 365, 18, 5163, 1190, 1482, 18, 542, 1886, ...
return 10585
return 85
def __int__(self): return 10585
30117f8486d0beab41eb919e163ec1a2e4d7df48 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12029/30117f8486d0beab41eb919e163ec1a2e4d7df48/test_struct.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 474, 972, 12, 2890, 4672, 327, 23633, 7140, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 474, 972, 12, 2890, 4672, 327, 23633, 7140, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
if compute: str += "compute='%s' " % compute
def run(self, params, args): for app in self.getApplianceNames(args): self.db.execute("""select shortname, graph, node from appliances where name='%s'""" % app)
df5e6db6c890055faa678f4b02aa8869278fadba /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7066/df5e6db6c890055faa678f4b02aa8869278fadba/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 16, 859, 16, 833, 4672, 364, 595, 316, 365, 18, 588, 1294, 10671, 1557, 12, 1968, 4672, 365, 18, 1966, 18, 8837, 2932, 3660, 4025, 23879, 16, 2667, 16, 756, 628, 27808,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 16, 859, 16, 833, 4672, 364, 595, 316, 365, 18, 588, 1294, 10671, 1557, 12, 1968, 4672, 365, 18, 1966, 18, 8837, 2932, 3660, 4025, 23879, 16, 2667, 16, 756, 628, 27808,...
raise ConflictError, oid
raise ConflictError, "transaction already invalidated"
def tpc_begin(self, transaction, sub=None): if self._invalid(None): # Some nitwit invalidated everything! raise ConflictError, oid self._invalidating=[]
14ebbc297165d4b3f298a95161d5f00be5c99f7c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/14ebbc297165d4b3f298a95161d5f00be5c99f7c/Connection.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 268, 2436, 67, 10086, 12, 2890, 16, 2492, 16, 720, 33, 7036, 4672, 309, 365, 6315, 5387, 12, 7036, 4672, 468, 10548, 290, 305, 28450, 28711, 7756, 5, 1002, 23460, 668, 16, 315, 7958, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 268, 2436, 67, 10086, 12, 2890, 16, 2492, 16, 720, 33, 7036, 4672, 309, 365, 6315, 5387, 12, 7036, 4672, 468, 10548, 290, 305, 28450, 28711, 7756, 5, 1002, 23460, 668, 16, 315, 7958, 1...
output.write(" <section>%s</section>\n" % section);
output.write(" <section>%s</section>\n" % escape(section));
def parse(filename, output): global symbols global sections parser = CParser(filename) parser.collect_references() idx = parser.parse() info = parse_top_comment(filename, parser.top_comment) output.write(" <example filename='%s'>\n" % filename) try: synopsis = info['synopsis'] output.write(" <synopsis>%s</synopsis>\n" % synopsis); except: print "Example %s lacks a synopsis description" % (filename) try: purpose = info['purpose'] output.write(" <purpose>%s</purpose>\n" % purpose); except: print "Example %s lacks a purpose description" % (filename) try: usage = info['usage'] output.write(" <usage>%s</usage>\n" % usage); tests.append(usage) except: print "Example %s lacks an usage description" % (filename) try: author = info['author'] output.write(" <author>%s</author>\n" % author); except: print "Example %s lacks an author description" % (filename) try: copy = info['copy'] output.write(" <copy>%s</copy>\n" % copy); except: print "Example %s lacks a copyright description" % (filename) try: section = info['section'] output.write(" <section>%s</section>\n" % section); if sections.has_key(section): sections[section].append(filename) else: sections[section] = [filename] except: print "Example %s lacks a section description" % (filename) for topic in info.keys(): if topic != "purpose" and topic != "usage" and \ topic != "author" and topic != "copy" and \ topic != "section" and topic != "synopsis": str = info[topic] output.write(" <extra topic='%s'>%s</extra>\n" % str) output.write(" <includes>\n") for include in idx.includes.keys(): if include.find("libxml") != -1: output.write(" <include>%s</include>\n" % (escape(include))) output.write(" </includes>\n") output.write(" <uses>\n") for ref in idx.references.keys(): id = idx.references[ref] name = id.get_name() line = id.get_lineno() if symbols.has_key(name): sinfo = symbols[name] refs = sinfo[0] # gather at most 5 references per symbols if refs > 5: continue sinfo[refs] = filename sinfo[0] = refs + 1 else: symbols[name] = [1, filename] info = find_symbol(name) if info != None: type = info[0] file = info[1] output.write(" <%s line='%d' file='%s' name='%s'/>\n" % (type, line, file, name)) else: type = id.get_type() output.write(" <%s line='%d' name='%s'/>\n" % (type, line, name)) output.write(" </uses>\n") output.write(" </example>\n") return idx
241e19d4afea87d71e761803877ba9371d70d816 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12659/241e19d4afea87d71e761803877ba9371d70d816/index.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 12, 3459, 16, 876, 4672, 2552, 7963, 2552, 7178, 225, 2082, 273, 385, 2678, 12, 3459, 13, 2082, 18, 14676, 67, 14353, 1435, 2067, 273, 2082, 18, 2670, 1435, 1123, 273, 1109, 67, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 12, 3459, 16, 876, 4672, 2552, 7963, 2552, 7178, 225, 2082, 273, 385, 2678, 12, 3459, 13, 2082, 18, 14676, 67, 14353, 1435, 2067, 273, 2082, 18, 2670, 1435, 1123, 273, 1109, 67, ...
return self._group_by_letter(items)
return sorted(items, key=lambda v:v[0].lower())
def build_identifier_index(self): items = [] for doc in self.indexed_docs: name = doc.canonical_name[-1] url = self.url(doc) if not url: continue container = self.docindex.container(doc) items.append( (name, url, container) ) return self._group_by_letter(items)
5c410b5b6e25df3bdbc6da266f7773518165cb02 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/5c410b5b6e25df3bdbc6da266f7773518165cb02/html.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 67, 5644, 67, 1615, 12, 2890, 4672, 1516, 273, 5378, 364, 997, 316, 365, 18, 19626, 67, 8532, 30, 508, 273, 997, 18, 18288, 67, 529, 18919, 21, 65, 880, 273, 365, 18, 718, 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, 1361, 67, 5644, 67, 1615, 12, 2890, 4672, 1516, 273, 5378, 364, 997, 316, 365, 18, 19626, 67, 8532, 30, 508, 273, 997, 18, 18288, 67, 529, 18919, 21, 65, 880, 273, 365, 18, 718, 12, ...
if len(output) > MAX_OUTPUT:
if len(output) > MAX_OUTPUT or output.count('\n') > MAX_OUTPUT_LINES:
def set_output_text(self, output, html, sage=None): if output.count('<?__SAGE__TEXT>') > 1: html = '<h3><font color="red">WARNING: multiple @interacts in one cell disabled (not yet implemented).</font></h3>' output = ''
05ea8112e511d5e2735a3b0f74aba5f7564c5e31 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/05ea8112e511d5e2735a3b0f74aba5f7564c5e31/cell.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 2844, 67, 955, 12, 2890, 16, 876, 16, 1729, 16, 272, 410, 33, 7036, 4672, 309, 876, 18, 1883, 2668, 12880, 972, 55, 2833, 972, 5151, 1870, 13, 405, 404, 30, 1729, 273, 2368,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 2844, 67, 955, 12, 2890, 16, 876, 16, 1729, 16, 272, 410, 33, 7036, 4672, 309, 876, 18, 1883, 2668, 12880, 972, 55, 2833, 972, 5151, 1870, 13, 405, 404, 30, 1729, 273, 2368,...
volume_mapper = vtk.vtkVolumeRayCastMapper()
volume_mapper = vtk.vtkFixedPointVolumeRayCastMapper()
def LoadVolume(self): proj = Project() image = proj.imagedata
8f6722c0ec701c0388681c4d85c9eb9c0b037b63 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10228/8f6722c0ec701c0388681c4d85c9eb9c0b037b63/volume.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4444, 4545, 12, 2890, 4672, 10296, 273, 5420, 1435, 1316, 273, 10296, 18, 381, 11349, 396, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 4444, 4545, 12, 2890, 4672, 10296, 273, 5420, 1435, 1316, 273, 10296, 18, 381, 11349, 396, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
popup = self._AddControl( None, constants.msoControlPopup, None, None, Caption="SpamBayes", TooltipText = "SpamBayes anti-spam filters and functions", Enabled = True, Tag = "SpamBayesCommand.Popup") if popup is not None:
popup = None for attempt in range(2): popup = self._AddControl( None, constants.msoControlPopup, None, None, Caption="SpamBayes", TooltipText = "SpamBayes anti-spam filters and functions", Enabled = True, Tag = "SpamBayesCommand.Popup") if popup is None: break
def SetupUI(self): manager = self.manager assert self.toolbar is None, "Should not yet have a toolbar"
46430cce28804d72cb5e927097370d8b732ba39d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9857/46430cce28804d72cb5e927097370d8b732ba39d/addin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10939, 5370, 12, 2890, 4672, 3301, 273, 365, 18, 4181, 1815, 365, 18, 18849, 353, 599, 16, 315, 14309, 486, 4671, 1240, 279, 12748, 6, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10939, 5370, 12, 2890, 4672, 3301, 273, 365, 18, 4181, 1815, 365, 18, 18849, 353, 599, 16, 315, 14309, 486, 4671, 1240, 279, 12748, 6, 2, -100, -100, -100, -100, -100, -100, -100, -100, ...
key = key[4:] start, end = self.elements.get(key, (None, None))
tag = key[4:] start, end = self.elements.get(tag, (None, None))
def __fixdict(self, dict): for key, val in dict.items(): if key[:6] == 'start_': key = key[6:] start, end = self.elements.get(key, (None, None)) if start is None: self.elements[key] = val, end elif key[:4] == 'end_': key = key[4:] start, end = self.elements.get(key, (None, None)) if end is None: self.elements[key] = start, val
8c6117203386cee5e01c906d59759a6387af33b5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/8c6117203386cee5e01c906d59759a6387af33b5/xmllib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 904, 1576, 12, 2890, 16, 2065, 4672, 364, 498, 16, 1244, 316, 2065, 18, 3319, 13332, 309, 498, 10531, 26, 65, 422, 296, 1937, 67, 4278, 498, 273, 498, 63, 26, 26894, 787, 16, 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, 1001, 904, 1576, 12, 2890, 16, 2065, 4672, 364, 498, 16, 1244, 316, 2065, 18, 3319, 13332, 309, 498, 10531, 26, 65, 422, 296, 1937, 67, 4278, 498, 273, 498, 63, 26, 26894, 787, 16, 6...
s1 = ByteArraySubclass(b"abcd") s2 = bytearray().join([s1])
s1 = self.subclass2test(b"abcd") s2 = self.type2test().join([s1])
def test_join(self): # Make sure join returns a NEW object for single item sequences # involving a subclass. # Make sure that it is of the appropriate type. s1 = ByteArraySubclass(b"abcd") s2 = bytearray().join([s1]) self.assertTrue(s1 is not s2) self.assertTrue(type(s2) is bytearray, type(s2))
ba7cec6a9528c9fadb893e08b3ba866089442024 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8125/ba7cec6a9528c9fadb893e08b3ba866089442024/test_bytes.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 5701, 12, 2890, 4672, 468, 4344, 3071, 1233, 1135, 279, 12887, 733, 364, 2202, 761, 8463, 468, 29876, 6282, 279, 10177, 18, 468, 4344, 3071, 716, 518, 353, 434, 326, 5505, 618,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 5701, 12, 2890, 4672, 468, 4344, 3071, 1233, 1135, 279, 12887, 733, 364, 2202, 761, 8463, 468, 29876, 6282, 279, 10177, 18, 468, 4344, 3071, 716, 518, 353, 434, 326, 5505, 618,...
def skipIfItemFileIsMissing(self, anItem): path = anItem.getPath() if not os.path.exists(path): print "DTV: movie file '%s' is missing, skipping to next" % path return self.skip(1) else: return anItem
def skip(self, direction): nextItem = None if self.currentPlaylist is not None: if direction == 1: nextItem = self.currentPlaylist.getNext() else: frame = controller.frame currentDisplay = frame.getDisplay(frame.mainDisplay) if not hasattr(currentDisplay, 'getCurrentTime') or currentDisplay.getCurrentTime() <= 2.0: nextItem = self.currentPlaylist.getPrev() else: currentDisplay.goToBeginningOfMovie() return self.currentPlaylist.cur() if nextItem is None: self.stop() else: self.playItem(nextItem) return nextItem
8ea436849ebb0a77df3d96fd7988d218c2b7e012 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12354/8ea436849ebb0a77df3d96fd7988d218c2b7e012/app.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2488, 12, 2890, 16, 4068, 4672, 1024, 1180, 273, 599, 309, 365, 18, 2972, 30194, 353, 486, 599, 30, 309, 4068, 422, 404, 30, 1024, 1180, 273, 365, 18, 2972, 30194, 18, 588, 2134, 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, 2488, 12, 2890, 16, 4068, 4672, 1024, 1180, 273, 599, 309, 365, 18, 2972, 30194, 353, 486, 599, 30, 309, 4068, 422, 404, 30, 1024, 1180, 273, 365, 18, 2972, 30194, 18, 588, 2134, 1435,...
except (SystemExit, KeyboardInterrupt): raise
def close(self, isOK=True, reason=None): """Start closing the serial port. Does nothing if the serial is already closed or failed. Inputs: - isOK: if True, mark state as Closed, else Failed - reason: a string explaining why, or None to leave unchanged; please specify if isOK is false. """ #print "%s.close(isOK=%s, reason=%s)" % (self.__class__.__name__, isOK, reason) if self._state <= self.Closed: return
5eed45bbd5254c44a87c429e6fa71ff31f08cd74 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6354/5eed45bbd5254c44a87c429e6fa71ff31f08cd74/TkSerial.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1746, 12, 2890, 16, 353, 3141, 33, 5510, 16, 3971, 33, 7036, 4672, 3536, 1685, 7647, 326, 2734, 1756, 18, 225, 9637, 5083, 309, 326, 2734, 353, 1818, 4375, 578, 2535, 18, 225, 24472, 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, 1746, 12, 2890, 16, 353, 3141, 33, 5510, 16, 3971, 33, 7036, 4672, 3536, 1685, 7647, 326, 2734, 1756, 18, 225, 9637, 5083, 309, 326, 2734, 353, 1818, 4375, 578, 2535, 18, 225, 24472, 3...
chisq = self.get_column('chisq') chisq_dof = self.get_column('chisq_dof') rchisq = chisq/ (2*chisq_dof - 2)
rchisq = self.get_column('chisq')/(2*self.get_column('chisq_dof') - 2)
def get_new_snr(self, index=6.0): # the kwarg 'index' is to be assigned to the parameter chisq_index occurring in the .ini files etc # the parameter nhigh gives the asymptotic behaviour d (ln chisq) / d (ln rho) at large rho # nhigh=2 means chisq~rho^2 along contours of new_snr as expected from the behaviour of mismatched templates snr = self.get_column('snr') chisq = self.get_column('chisq') chisq_dof = self.get_column('chisq_dof') rchisq = chisq/ (2*chisq_dof - 2) nhigh = 2. if rchisq > 1.: return snr/ ((1+rchisq**(index/nhigh))/2)**(1./index) else: return snr
e21de5318dfc3b29847d5b52e9ded53b71a95883 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3589/e21de5318dfc3b29847d5b52e9ded53b71a95883/lsctables.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 2704, 67, 8134, 86, 12, 2890, 16, 770, 33, 26, 18, 20, 4672, 468, 326, 19554, 296, 1615, 11, 353, 358, 506, 6958, 358, 326, 1569, 462, 291, 85, 67, 1615, 3334, 8022, 316, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 2704, 67, 8134, 86, 12, 2890, 16, 770, 33, 26, 18, 20, 4672, 468, 326, 19554, 296, 1615, 11, 353, 358, 506, 6958, 358, 326, 1569, 462, 291, 85, 67, 1615, 3334, 8022, 316, ...
label = version.branch().label() if label in matchingLabels: continue matchingLabels.add(label)
if self.getLeaves: label = version.branch().label() if label in matchingLabels: continue matchingLabels.add(label)
def filterTroveMatches(self, name, versionFlavorDict): """ Take the results found in QueryByLabelPath.findAll for name and filter them based on if they match the given revision for name. Return a versionFlavorDict """ versionFlavorDict = QueryByLabelPath.filterTroveMatches(self, name, versionFlavorDict)
a2ea993adf451f48424cf3c73759a6d91abb3759 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8747/a2ea993adf451f48424cf3c73759a6d91abb3759/findtrove.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1034, 56, 303, 537, 6869, 12, 2890, 16, 508, 16, 1177, 2340, 9444, 5014, 4672, 3536, 17129, 326, 1686, 1392, 316, 2770, 858, 2224, 743, 18, 4720, 1595, 364, 508, 471, 1034, 2182, 2511, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1034, 56, 303, 537, 6869, 12, 2890, 16, 508, 16, 1177, 2340, 9444, 5014, 4672, 3536, 17129, 326, 1686, 1392, 316, 2770, 858, 2224, 743, 18, 4720, 1595, 364, 508, 471, 1034, 2182, 2511, ...
char *cStr = PyString_AsString(v); *p_itself = CFStringCreateWithCString((CFAllocatorRef)NULL, cStr, 0);
char *cStr; if (!PyArg_Parse(v, "et", "ascii", &cStr)) return NULL; *p_itself = CFStringCreateWithCString((CFAllocatorRef)NULL, cStr, kCFStringEncodingASCII);
def outputCheckConvertArg(self): Out(""" if (v == Py_None) { *p_itself = NULL; return 1; } if (PyString_Check(v)) { char *cStr = PyString_AsString(v); *p_itself = CFStringCreateWithCString((CFAllocatorRef)NULL, cStr, 0); return 1; } if (PyUnicode_Check(v)) { /* We use the CF types here, if Python was configured differently that will give an error */ CFIndex size = PyUnicode_GetSize(v); UniChar *unichars = PyUnicode_AsUnicode(v); if (!unichars) return 0; *p_itself = CFStringCreateWithCharacters((CFAllocatorRef)NULL, unichars, size); return 1; } """)
ef02ebfce44923ec0c63d19c7b906bafda5929ed /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/ef02ebfce44923ec0c63d19c7b906bafda5929ed/cfsupport.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 876, 1564, 2723, 4117, 12, 2890, 4672, 2976, 2932, 3660, 309, 261, 90, 422, 4707, 67, 7036, 13, 288, 380, 84, 67, 1282, 19079, 273, 3206, 31, 327, 404, 31, 289, 309, 261, 9413, 780, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 876, 1564, 2723, 4117, 12, 2890, 4672, 2976, 2932, 3660, 309, 261, 90, 422, 4707, 67, 7036, 13, 288, 380, 84, 67, 1282, 19079, 273, 3206, 31, 327, 404, 31, 289, 309, 261, 9413, 780, ...
return pAdic(self.__parent, u, self.__prec+self.__ordp, self.__ordp)
if self.__prec is infinity: prec = self.__parent.prec() else: prec = self.__prec return pAdic(self.__parent, u, prec + self.__ordp, self.__ordp)
def __neg__(self): u = - self.__unit return pAdic(self.__parent, u, self.__prec+self.__ordp, self.__ordp)
10ce4ffd13ba19146db5dc3b78b4ad38056c2b1c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9417/10ce4ffd13ba19146db5dc3b78b4ad38056c2b1c/padic.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 14518, 972, 12, 2890, 4672, 582, 273, 300, 365, 16186, 4873, 327, 293, 1871, 335, 12, 2890, 16186, 2938, 16, 582, 16, 365, 16186, 4036, 15, 2890, 16186, 517, 84, 16, 365, 16186, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 14518, 972, 12, 2890, 4672, 582, 273, 300, 365, 16186, 4873, 327, 293, 1871, 335, 12, 2890, 16186, 2938, 16, 582, 16, 365, 16186, 4036, 15, 2890, 16186, 517, 84, 16, 365, 16186, ...
elif len(shape(matrix)) == 2:
elif len(matrix.shape) == 2:
def _copy_and_check(matrix, desired_shape): # Copy the matrix. matrix = array(matrix, MATCODE, copy=1) # Check the dimensions. if shape(matrix) != desired_shape: raise ValuError("Incorrect dimension") # Make sure it's normalized. if len(shape(matrix)) == 1: if fabs(sum(matrix)-1.0) > 0.01: raise ValueError("matrix not normalized to 1.0") elif len(shape(matrix)) == 2: for i in range(len(matrix)): if fabs(sum(matrix[i])-1.0) > 0.01: raise ValueError("matrix %d not normalized to 1.0" % i) else: raise ValueError("I don't handle matrices > 2 dimensions") return matrix
9f6ccc18a75e2a2d3871e2b69f0ac7d071a00baf /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7167/9f6ccc18a75e2a2d3871e2b69f0ac7d071a00baf/MarkovModel.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3530, 67, 464, 67, 1893, 12, 5667, 16, 6049, 67, 4867, 4672, 468, 5631, 326, 3148, 18, 3148, 273, 526, 12, 5667, 16, 490, 789, 5572, 16, 1610, 33, 21, 13, 468, 2073, 326, 5769, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3530, 67, 464, 67, 1893, 12, 5667, 16, 6049, 67, 4867, 4672, 468, 5631, 326, 3148, 18, 3148, 273, 526, 12, 5667, 16, 490, 789, 5572, 16, 1610, 33, 21, 13, 468, 2073, 326, 5769, ...
},
}
def __init__(self): family.Family.__init__(self) self.name = 'wikibooks' # Known wikibooks languages, given as a dictionary mapping the language code # to the hostname of the site hosting that wiktibooks. For human consumption, # the full name of the language is given behind each line as a comment self.langs = { 'minnan':'zh-min-nan.wiktionary.org', 'nb':'no.wiktionary.org', 'zh-cn':'zh.wiktionary.org', 'zh-tw':'zh.wiktionary.org' } for lang in self.knownlanguages: self.langs[lang] = lang+'.wiktionary.org'
aa64dee93f8d80124b8fa645b6cae5cb0ea34252 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4404/aa64dee93f8d80124b8fa645b6cae5cb0ea34252/wikibooks_family.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 6755, 18, 9203, 16186, 2738, 972, 12, 2890, 13, 365, 18, 529, 273, 296, 11999, 495, 1184, 87, 11, 468, 30036, 341, 1766, 495, 1184, 87, 8191, 16, 864, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 6755, 18, 9203, 16186, 2738, 972, 12, 2890, 13, 365, 18, 529, 273, 296, 11999, 495, 1184, 87, 11, 468, 30036, 341, 1766, 495, 1184, 87, 8191, 16, 864, ...
if any([ not edges[(s,u)] for u in G.neighbors(s)]):
if any([ not edges[(s,u)] for u in G.neighbors(s)]) and p[v] not in C:
def blocks_and_cut_vertices(self): """ Computes the blocks and cut vertices of the graph. In the case of a digraph, this computation is done on the underlying graph.
592545f3bcbdce40614121ff33879bf7c4995e08 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9417/592545f3bcbdce40614121ff33879bf7c4995e08/graph.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4398, 67, 464, 67, 5150, 67, 17476, 12, 2890, 4672, 3536, 14169, 281, 326, 4398, 471, 6391, 6928, 434, 326, 2667, 18, 657, 326, 648, 434, 279, 3097, 1483, 16, 333, 16039, 353, 2731, 60...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4398, 67, 464, 67, 5150, 67, 17476, 12, 2890, 4672, 3536, 14169, 281, 326, 4398, 471, 6391, 6928, 434, 326, 2667, 18, 657, 326, 648, 434, 279, 3097, 1483, 16, 333, 16039, 353, 2731, 60...
zipcode = models.CharField(max_length=10, help_text='The zipcode that the check should be mailed to.')
zipcode = models.CharField( max_length=10, help_text='The zipcode that the check should be mailed to.')
def upload_to(instance, filename): """ Given an instance of a Photo or Video as well as the filename, generate an appropriate storage location for this photo. """ return "artist/%s/%s" % (instance.artist.name, filename)
10d3cb3eea3d43cbc19c1f0cf59d425b0af97026 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10992/10d3cb3eea3d43cbc19c1f0cf59d425b0af97026/models.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3617, 67, 869, 12, 1336, 16, 1544, 4672, 3536, 16803, 392, 791, 434, 279, 26867, 578, 14030, 487, 5492, 487, 326, 1544, 16, 2103, 392, 5505, 2502, 2117, 364, 333, 10701, 18, 3536, 327, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3617, 67, 869, 12, 1336, 16, 1544, 4672, 3536, 16803, 392, 791, 434, 279, 26867, 578, 14030, 487, 5492, 487, 326, 1544, 16, 2103, 392, 5505, 2502, 2117, 364, 333, 10701, 18, 3536, 327, ...
'''
"""
def checkPageSize(self,canv,doc): '''This gets called by the template framework If canv size != template size then the canv size is set to the template size or if that's not available to the doc size. ''' #### NEVER EVER EVER COMPARE FLOATS FOR EQUALITY #RGB converting pagesizes to ints means we are accurate to one point #RGB I suggest we should be aiming a little better cp = None dp = None sp = None if canv._pagesize: cp = map(int, canv._pagesize) if self.pagesize: sp = map(int, self.pagesize) if doc.pagesize: dp = map(int, doc.pagesize) if cp!=sp: if sp: canv.setPageSize(self.pagesize) elif cp!=dp: canv.setPageSize(doc.pagesize)
0412b4bea50440fc4540b89bc95387eb07c71f92 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3878/0412b4bea50440fc4540b89bc95387eb07c71f92/doctemplate.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 24035, 12, 2890, 16, 4169, 90, 16, 2434, 4672, 9163, 2503, 5571, 2566, 635, 326, 1542, 8257, 971, 848, 90, 963, 480, 1542, 963, 1508, 326, 848, 90, 963, 353, 444, 358, 326, 1542, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 24035, 12, 2890, 16, 4169, 90, 16, 2434, 4672, 9163, 2503, 5571, 2566, 635, 326, 1542, 8257, 971, 848, 90, 963, 480, 1542, 963, 1508, 326, 848, 90, 963, 353, 444, 358, 326, 1542, ...
testText = ( " This line is \n" " quoted and has a couple of soft \n" " breaks in it.\n\n"
testText = ( "This line is \n" "quoted and has a couple of soft \n" "breaks in it.\n\n"
def testUnwrapUsenetSignature(self): flow = flowtext.FormatText() testText = ( " This line is \n" " quoted and has a couple of soft \n" " breaks in it.\n\n" ">This line is also \n" ">quoted and has an \n" ">example of embaressing wrap\n" "-- \n" "And this is a usenet signature") expectedText = ( " This line is " "quoted and has a couple of soft " "breaks in it.\n\n" ">This line is also " "quoted and has an " "example of embaressing wrap\n" "-- \n" "And this is a usenet signature") debug = False if(debug): print "\n---------------------------\ninput text\n" print testText outputText = flow.unwrap( testText, debug ) if(debug): print "\n---------------------------\nExpected text\n" print expectedText print "\n---------------------------\noutput text\n" print outputText self.assertEqual( expectedText, outputText )
cc51013487f745756918fc318b0766d15880fb14 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2512/cc51013487f745756918fc318b0766d15880fb14/flowtexttests.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 984, 4113, 3477, 31034, 5374, 12, 2890, 4672, 4693, 273, 4693, 955, 18, 1630, 1528, 1435, 1842, 1528, 273, 261, 315, 2503, 980, 353, 521, 82, 6, 315, 15179, 471, 711, 279, 1825, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 984, 4113, 3477, 31034, 5374, 12, 2890, 4672, 4693, 273, 4693, 955, 18, 1630, 1528, 1435, 1842, 1528, 273, 261, 315, 2503, 980, 353, 521, 82, 6, 315, 15179, 471, 711, 279, 1825, ...
self.treeCtrl.SetItemText(node, str(item.getUUID()), 3)
u = str(item.getUUID()) self.treeCtrl.SetItemText(node, u, 3) self.treeItemsByUUID[u] = node
def LoadItem(self, item, node): """Populates the tree's table with details of this particular item. """
39515bce12cb6c4d7eaef4203159c8ba01d8fabd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/39515bce12cb6c4d7eaef4203159c8ba01d8fabd/RepositoryViewer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4444, 1180, 12, 2890, 16, 761, 16, 756, 4672, 3536, 29193, 326, 2151, 1807, 1014, 598, 3189, 434, 333, 6826, 761, 18, 3536, 2, 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, 4444, 1180, 12, 2890, 16, 761, 16, 756, 4672, 3536, 29193, 326, 2151, 1807, 1014, 598, 3189, 434, 333, 6826, 761, 18, 3536, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
self.assertEqual(m.find(slice + 'x'), -1)
self.assertEqual(m.find(slice + b'x'), -1)
def test_tougher_find(self): # Do a tougher .find() test. SF bug 515943 pointed out that, in 2.2, # searching for data with embedded \0 bytes didn't work. f = open(TESTFN, 'w+')
3c5b3f3090b6007274572d236a3d5ae5856203ec /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12029/3c5b3f3090b6007274572d236a3d5ae5856203ec/test_mmap.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 869, 637, 1614, 67, 4720, 12, 2890, 4672, 468, 2256, 279, 358, 637, 1614, 263, 4720, 1435, 1842, 18, 225, 21318, 7934, 1381, 24872, 8942, 25874, 596, 716, 16, 316, 576, 18, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 869, 637, 1614, 67, 4720, 12, 2890, 4672, 468, 2256, 279, 358, 637, 1614, 263, 4720, 1435, 1842, 18, 225, 21318, 7934, 1381, 24872, 8942, 25874, 596, 716, 16, 316, 576, 18, 2...
self.text = self["text"].getText()[:-1] self["text"].setText(self.text)
self.text = self.text[:-1] self["text"].setText(self.text.encode("utf-8"))
def okClicked(self): if self.shiftMode: list = self.shiftkeys_list else: list = self.keys_list selectedKey = self.selectedKey
03cb6400b917948218555e9a19cc78435e88ed5b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6652/03cb6400b917948218555e9a19cc78435e88ed5b/VirtualKeyBoard.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1529, 27633, 12, 2890, 4672, 309, 365, 18, 4012, 2309, 30, 666, 273, 365, 18, 4012, 2452, 67, 1098, 469, 30, 666, 273, 365, 18, 2452, 67, 1098, 225, 3170, 653, 273, 365, 18, 8109, 65...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1529, 27633, 12, 2890, 4672, 309, 365, 18, 4012, 2309, 30, 666, 273, 365, 18, 4012, 2452, 67, 1098, 469, 30, 666, 273, 365, 18, 2452, 67, 1098, 225, 3170, 653, 273, 365, 18, 8109, 65...
doc.package not in self.valdocs):
doc.package not in self.module_set):
def write_module_tree(self, out): # Get all modules. modules = [doc for doc in self.valdocs if isinstance(doc, ModuleDoc)] if not modules: return # [XX] sort?
28d88ae14617650a4a829fae94668100dc4e2b05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/28d88ae14617650a4a829fae94668100dc4e2b05/html.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 67, 2978, 67, 3413, 12, 2890, 16, 596, 4672, 468, 968, 777, 4381, 18, 4381, 273, 306, 2434, 364, 997, 316, 365, 18, 1125, 8532, 309, 1549, 12, 2434, 16, 5924, 1759, 25887, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 67, 2978, 67, 3413, 12, 2890, 16, 596, 4672, 468, 968, 777, 4381, 18, 4381, 273, 306, 2434, 364, 997, 316, 365, 18, 1125, 8532, 309, 1549, 12, 2434, 16, 5924, 1759, 25887, 309, ...
data += w.error(_("Group %s doesn't exist (%s)!") % (name, "group = g[groups.name_to_gid(name)]", e))
data += w.error(_("Group %s doesn't exist (%s, %s)!") % (name, "group = g[groups.name_to_gid(name)]", e))
def user_line(login) : uid = users.login_to_uid(login) return '''<tr><td>%s</td><td>%s</td><td>%s</td></tr>''' % (u[uid]['gecos'], login, uid)
690f3241794eb1e9043f01ac59d34922393aa298 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7650/690f3241794eb1e9043f01ac59d34922393aa298/groups.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 729, 67, 1369, 12, 5819, 13, 294, 4555, 273, 3677, 18, 5819, 67, 869, 67, 1911, 12, 5819, 13, 327, 9163, 32, 313, 4438, 4465, 9822, 87, 1757, 4465, 4438, 4465, 9822, 87, 1757, 4465, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 729, 67, 1369, 12, 5819, 13, 294, 4555, 273, 3677, 18, 5819, 67, 869, 67, 1911, 12, 5819, 13, 327, 9163, 32, 313, 4438, 4465, 9822, 87, 1757, 4465, 4438, 4465, 9822, 87, 1757, 4465, ...
dirs = string.splitfields(path, '/')
dirs = path.split('/')
def open_ftp(self, url): """Use FTP protocol.""" host, path = splithost(url) if not host: raise IOError, ('ftp error', 'no host given') host, port = splitport(host) user, host = splituser(host) if user: user, passwd = splitpasswd(user) else: passwd = None host = unquote(host) user = unquote(user or '') passwd = unquote(passwd or '') host = socket.gethostbyname(host) if not port: import ftplib port = ftplib.FTP_PORT else: port = int(port) path, attrs = splitattr(path) path = unquote(path) dirs = string.splitfields(path, '/') dirs, file = dirs[:-1], dirs[-1] if dirs and not dirs[0]: dirs = dirs[1:] if dirs and not dirs[0]: dirs[0] = '/' key = user, host, port, string.join(dirs, '/') # XXX thread unsafe! if len(self.ftpcache) > MAXFTPCACHE: # Prune the cache, rather arbitrarily for k in self.ftpcache.keys(): if k != key: v = self.ftpcache[k] del self.ftpcache[k] v.close() try: if not self.ftpcache.has_key(key): self.ftpcache[key] = \ ftpwrapper(user, passwd, host, port, dirs) if not file: type = 'D' else: type = 'I' for attr in attrs: attr, value = splitvalue(attr) if string.lower(attr) == 'type' and \ value in ('a', 'A', 'i', 'I', 'd', 'D'): type = string.upper(value) (fp, retrlen) = self.ftpcache[key].retrfile(file, type) if retrlen is not None and retrlen >= 0: import mimetools, StringIO headers = mimetools.Message(StringIO.StringIO( 'Content-Length: %d\n' % retrlen)) else: headers = noheaders() return addinfourl(fp, headers, "ftp:" + url) except ftperrors(), msg: raise IOError, ('ftp error', msg), sys.exc_info()[2]
2aa671823938e593ea9dedd33b3cc4194fde8a0a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/2aa671823938e593ea9dedd33b3cc4194fde8a0a/urllib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1696, 67, 11727, 12, 2890, 16, 880, 4672, 3536, 3727, 19324, 1771, 12123, 1479, 16, 589, 273, 6121, 483, 669, 12, 718, 13, 309, 486, 1479, 30, 1002, 8340, 16, 7707, 11727, 555, 2187, 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, 11727, 12, 2890, 16, 880, 4672, 3536, 3727, 19324, 1771, 12123, 1479, 16, 589, 273, 6121, 483, 669, 12, 718, 13, 309, 486, 1479, 30, 1002, 8340, 16, 7707, 11727, 555, 2187, 2...
'-I', 'ext/', '-o', 'tests/test_external', 'ext/disco.c', 'tests/test_external.c'],
'-I', path.join(home, 'ext'), '-o', path.join(home, 'tests', 'test_external'), path.join(home, 'ext', 'disco.c'), path.join(home, 'tests', 'test_external.c')],
def setUp(self): from subprocess import check_call, STDOUT from os import uname if uname()[0] == 'Darwin': self.skipTest('Cannot build static test_external on OS X') else: check_call(['gcc', '-g', '-O3', '-static', '-Wall', '-l', 'Judy', '-I', 'ext/', '-o', 'tests/test_external', 'ext/disco.c', 'tests/test_external.c'], stderr=STDOUT) self.map = external(['tests/test_external']) super(ExternalTestCase, self).setUp()
0615fd647531295653f60cd74c645fe31af174e9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/373/0615fd647531295653f60cd74c645fe31af174e9/test_external.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24292, 12, 2890, 4672, 628, 6652, 1930, 866, 67, 1991, 16, 19331, 628, 1140, 1930, 31444, 309, 31444, 1435, 63, 20, 65, 422, 296, 40, 19992, 4278, 365, 18, 7457, 4709, 2668, 4515, 1361, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24292, 12, 2890, 4672, 628, 6652, 1930, 866, 67, 1991, 16, 19331, 628, 1140, 1930, 31444, 309, 31444, 1435, 63, 20, 65, 422, 296, 40, 19992, 4278, 365, 18, 7457, 4709, 2668, 4515, 1361, ...
return MSRPSession(sip, msrp, self.incoming_queue, self.incoming_queue)
session = MSRPSession(sip, msrp) self.add_session(session, msrp)
def new_session(sip, msrp): return MSRPSession(sip, msrp, self.incoming_queue, self.incoming_queue)
86486162e8822068c3835c02e4ea7cd8afd6a0ba /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3449/86486162e8822068c3835c02e4ea7cd8afd6a0ba/chatroom.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 394, 67, 3184, 12, 28477, 16, 4086, 13832, 4672, 327, 9238, 54, 52, 2157, 12, 28477, 16, 4086, 13832, 16, 365, 18, 31033, 67, 4000, 16, 365, 18, 31033, 67, 4000, 13, 2, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 394, 67, 3184, 12, 28477, 16, 4086, 13832, 4672, 327, 9238, 54, 52, 2157, 12, 28477, 16, 4086, 13832, 16, 365, 18, 31033, 67, 4000, 16, 365, 18, 31033, 67, 4000, 13, 2, -100, -100, -...
average += (int(float(linecache.getline(tc,lines-i))*1000000) - int(float(linecache.getline(tc,lines-i-1))*1000000))
average += (int(float(linecache.getline(tc,lines-i))*10**6) - int(float(linecache.getline(tc,lines-i-1))*10**6))
def Ts(fn,tc,tcType=1): """Returns timestamps (in ms) from a frame number and timecodes file.""" # CFR if tcType == 1: fps = rat.search(tc).groups() if rat.search(tc) else [re.search('(\d+)',tc).group(0),'1'] ts = int(round((1000 * fn * float(fps[1])) / int(fps[0]))) return [ts,] # VFR elif tcType >= 2: ts = linecache.getline(tc,fn+2) if ts == '': lines = 0 with open(tc,"r") as file: for line in file: lines += 1 nLines = math.ceil(lines / 100) average = 0 for i in range(nLines): average += (int(float(linecache.getline(tc,lines-i))*1000000) - int(float(linecache.getline(tc,lines-i-1))*1000000)) average = average / nLines lastTs = int(float(linecache.getline(tc,lines))*1000000) secdTs = int(float(linecache.getline(tc,lines-1))*1000000) ts = int(fn * average) if fn != lines-1: print("Warning: Trim {} goes beyond last frame. Audio cutting not recommended.".format(fn)) return [ts,'out-of-bounds'] return [int(float(ts)*1000000),] elif len(tc) != 2: print("tc needs a list with timecode file and format determined by determineFormat()") else: sys.exit("Couldn't get timestamps")
71f96ef73d9915935425b67dfff621761ff6819f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14863/71f96ef73d9915935425b67dfff621761ff6819f/vfr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24709, 12, 4293, 16, 5111, 16, 5111, 559, 33, 21, 4672, 3536, 1356, 11267, 261, 267, 4086, 13, 628, 279, 2623, 1300, 471, 813, 7000, 585, 12123, 468, 6123, 54, 309, 1715, 559, 422, 404...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24709, 12, 4293, 16, 5111, 16, 5111, 559, 33, 21, 4672, 3536, 1356, 11267, 261, 267, 4086, 13, 628, 279, 2623, 1300, 471, 813, 7000, 585, 12123, 468, 6123, 54, 309, 1715, 559, 422, 404...
drawable.drawOn(self.canvas, self.x, self.y - h) self.y = self.y - h
drawable.drawOn(self.canvas, self.x, y) self.y = y
def add(self, drawable): """ Draws the object at the current position. Returns 1 if successful, 0 if it would not fit. Raises a LayoutError if the object is too wide, or if it is too high for a totally empty frame, to avoid infinite loops""" w, h = drawable.wrap(self.width, self.y - self.bottomMargin - self.bottomPadding)
b84d697ebfdc6a6adcb88bc03a632af5167c1e5d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/b84d697ebfdc6a6adcb88bc03a632af5167c1e5d/layout.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 12, 2890, 16, 19021, 4672, 3536, 10184, 87, 326, 733, 622, 326, 783, 1754, 18, 2860, 404, 309, 6873, 16, 374, 309, 518, 4102, 486, 4845, 18, 20497, 279, 9995, 668, 309, 326, 733, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 12, 2890, 16, 19021, 4672, 3536, 10184, 87, 326, 733, 622, 326, 783, 1754, 18, 2860, 404, 309, 6873, 16, 374, 309, 518, 4102, 486, 4845, 18, 20497, 279, 9995, 668, 309, 326, 733, ...
if not next or next.isblocknode or prev or prev.isblocknode:
if not next or next.isblocknode or not prev or prev.isblocknode:
def removeNewlines(node): """ remove newlines, tabs, spaces if we are next to a blockNode """ if node.__class__ == Text and not node.getParentNodesByClass(PreFormatted): if node.caption.strip() == u"": prev = node.previous or node.parent # previous sibling node or parentnode next = node.next or node.parent.next if not next or next.isblocknode or prev or prev.isblocknode: node.parent.removeChild(node) node.caption = node.caption.replace("\n", " ") for c in node.children[:]: removeNewlines(c)
d3472b7e2b5c8abb03c3b00070dcb82deaf202a1 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12391/d3472b7e2b5c8abb03c3b00070dcb82deaf202a1/advtree.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1206, 1908, 3548, 12, 2159, 4672, 3536, 1206, 19181, 16, 10920, 16, 7292, 309, 732, 854, 1024, 358, 279, 1203, 907, 3536, 309, 756, 16186, 1106, 972, 422, 3867, 471, 486, 756, 18, 588, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1206, 1908, 3548, 12, 2159, 4672, 3536, 1206, 19181, 16, 10920, 16, 7292, 309, 732, 854, 1024, 358, 279, 1203, 907, 3536, 309, 756, 16186, 1106, 972, 422, 3867, 471, 486, 756, 18, 588, ...
registerRequestDict = {'Attributes':{'TargetSE': fileDict['TargetSE'],'Operation':'registerFile'},'Files':[{'LFN': fileDict['LFN'],'PFN':fileDict['PFN'], 'Size':fileDict['Size'], 'Addler':fileDict['Addler'], 'GUID':fileDict['GUID']}]} gLogger.info("TransferAgent.execute: Setting registration request for failed file.") oRequest.addSubRequest(registerRequestDict,'register')
registerRequestDict = {'Attributes':{'TargetSE': fileDict['TargetSE'], 'Operation':'registerFile'}, 'Files':[{'LFN': fileDict['LFN'], 'PFN':fileDict['PFN'], 'Size':fileDict['Size'], 'Addler':fileDict['Addler'], 'GUID':fileDict['GUID']}]} gLogger.info( "TransferAgent.execute: Setting registration request for failed file." ) oRequest.addSubRequest( registerRequestDict, 'register' )
def executeRequest(self): ################################################ # Get a request from request DB gMonitor.addMark( "Iteration", 1 ) res = self.RequestDBClient.getRequest('transfer') if not res['OK']: gLogger.info("TransferAgent.execute: Failed to get request from database.") return S_OK() elif not res['Value']: gLogger.info("TransferAgent.execute: No requests to be executed found.") return S_OK() requestString = res['Value']['RequestString'] requestName = res['Value']['RequestName'] sourceServer= res['Value']['Server'] try: jobID = int(res['Value']['JobID']) except: jobID = 0 gLogger.info("TransferAgent.execute: Obtained request %s" % requestName)
e9b27a9be4536012e60823ee81099deb0a1fbe85 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/e9b27a9be4536012e60823ee81099deb0a1fbe85/TransferAgent.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1836, 691, 12, 2890, 4672, 19709, 26487, 13151, 468, 968, 279, 590, 628, 590, 2383, 314, 7187, 18, 1289, 3882, 12, 315, 10795, 3113, 404, 262, 400, 273, 365, 18, 691, 2290, 1227, 18, 5...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1836, 691, 12, 2890, 4672, 19709, 26487, 13151, 468, 968, 279, 590, 628, 590, 2383, 314, 7187, 18, 1289, 3882, 12, 315, 10795, 3113, 404, 262, 400, 273, 365, 18, 691, 2290, 1227, 18, 5...
global FILE,SCREEN if evt == EXPORT_EVT: Blender.Window.FileSelector(exportfile, "Export .sc", FILENAME) if evt == DOF_CAMERA: if DOF.val == 1: if SPHERICALCAMERA.val == 1: SPHERICALCAMERA.val = 0 Draw.Redraw() if evt == SPHER_CAMERA: if SPHERICALCAMERA.val == 1: if DOF.val == 1: DOF.val = 0 Draw.Redraw() if evt == IRR_EVENT: if GIIRR.val == 1: if GIPATH.val == 1: GIPATH.val = 0 Draw.Redraw() if evt == FILTER_EVENT: Draw.Redraw() if evt == CHANGE_AA: SCREEN=0 Draw.Redraw() return if evt == CHANGE_CAM: SCREEN=2 Draw.Redraw() return if evt == CHANGE_LIGHT: SCREEN=4 Draw.Redraw() return if evt == CHANGE_AO: SCREEN=5 Draw.Redraw() return
global FILE, SCREEN, SETPATH, SETJAVAPATH, FILENAME if evt == EXP_EVT: Blender.Window.FileSelector(exportfile, "Export .sc", FILENAME) if evt == SET_PATH: Blender.Window.FileSelector(setpath, "SET SF PATH", SFPATH) setpath(SFPATH) if evt == SET_JAVAPATH: Blender.Window.FileSelector(setjavapath, "SET JAVA PATH", JAVAPATH) setjavapath(JAVAPATH) if evt == REND_EVT: render() if evt == DOF_CAMERA: if DOF.val == 1: if SPHERICALCAMERA.val == 1: SPHERICALCAMERA.val = 0 Draw.Redraw() elif FISHEYECAMERA.val == 1: FISHEYECAMERA.val = 0 Draw.Redraw() if evt == SPHER_CAMERA: if SPHERICALCAMERA.val == 1: if DOF.val == 1: DOF.val = 0 Draw.Redraw() elif FISHEYECAMERA.val == 1: FISHEYECAMERA.val = 0 Draw.Redraw() if evt == FISH_CAMERA: if FISHEYECAMERA.val == 1: if DOF.val == 1: DOF.val = 0 Draw.Redraw() elif SPHERICALCAMERA.val == 1: SPHERICALCAMERA.val = 0 Draw.Redraw() if evt == FILTER_EVENT: Draw.Redraw() if evt == FORCE_INSTANTGI: if INSTANTGI.val == 1: if IRRCACHE.val == 1: IRRCACHE.val = 0 Draw.Redraw() if USEGLOBALS.val == 1: USEGLOBALS.val = 0 Draw.Redraw() if PATHTRACE.val == 1: PATHTRACE.val = 0 Draw.Redraw() if INSTANTGI.val == 0 and IRRCACHE.val == 0 and PATHTRACE.val == 0: if VIEWGI.val == 1: VIEWGI.val = 0 Draw.Redraw() if INSTANTGI.val == 1 or PATHTRACE.val == 1: if VIEWGLOBALS.val == 1: VIEWGLOBALS.val = 0 Draw.Redraw() if evt == FORCE_IRRCACHE: if IRRCACHE.val == 1: if INSTANTGI.val == 1: INSTANTGI.val = 0 Draw.Redraw() if PATHTRACE.val == 1: PATHTRACE.val = 0 Draw.Redraw() if IRRCACHE.val == 0: if USEGLOBALS.val == 1: USEGLOBALS.val = 0 Draw.Redraw() if INSTANTGI.val == 0 and IRRCACHE.val == 0 and PATHTRACE.val == 0: if VIEWGI.val == 1: VIEWGI.val = 0 Draw.Redraw() if evt == FORCE_PATHTRACE: if PATHTRACE.val == 1: if IRRCACHE.val == 1: IRRCACHE.val = 0 Draw.Redraw() if USEGLOBALS.val == 1: USEGLOBALS.val = 0 Draw.Redraw() if INSTANTGI.val == 1: INSTANTGI.val = 0 Draw.Redraw() if INSTANTGI.val == 0 and IRRCACHE.val == 0 and PATHTRACE.val == 0: if VIEWGI.val == 1: VIEWGI.val = 0 Draw.Redraw() if INSTANTGI.val == 1 or PATHTRACE.val == 1: if VIEWGLOBALS.val == 1: VIEWGLOBALS.val = 0 Draw.Redraw() if evt == FORCE_GLOBALS: if USEGLOBALS.val == 1: if PATHTRACE.val == 1: PATHTRACE.val = 0 Draw.Redraw() if INSTANTGI.val == 1: INSTANTGI.val = 0 Draw.Redraw() if IRRCACHE.val == 0: if USEGLOBALS.val == 1: USEGLOBALS.val = 0 Draw.Redraw() if USEGLOBALS.val == 0: if VIEWGLOBALS.val == 1: VIEWGLOBALS.val = 0 Draw.Redraw() if INSTANTGI.val == 0 and IRRCACHE.val == 0 and PATHTRACE.val == 0: if VIEWGI.val == 1: VIEWGI.val = 0 Draw.Redraw() if evt == EVENT_CAUSTICS: if CAUSTICS.val == 0: if VIEWCAUSTICS.val == 1: VIEWCAUSTICS.val = 0 Draw.Redraw() if evt == OVERRIDE_CAUSTICS: if CAUSTICS.val == 0: if VIEWCAUSTICS.val == 1: VIEWCAUSTICS.val = 0 Draw.Redraw() if evt == OVERRIDE_GLOBALS: if USEGLOBALS.val == 0: if VIEWGLOBALS.val == 1: VIEWGLOBALS.val = 0 Draw.Redraw() if evt == OVERRIDE_GI: if INSTANTGI.val == 0 and IRRCACHE.val == 0 and PATHTRACE.val == 0: if VIEWGI.val == 1: VIEWGI.val = 0 Draw.Redraw() if evt == IBL_EVENT: if IBL.val == 0: if IBLLOCK.val == 1: IBLLOCK.val = 0 Draw.Redraw() if IMP_SUN.val == 1: IMP_SUN.val = 0 Draw.Redraw() if IMP_BCKGRD.val == 1: IMP_BCKGRD.val = 0 Draw.Redraw() if BACKGROUND.val == 1: BACKGROUND.val = 0 Draw.Redraw() if evt == LOCK_EVENT: if IBL.val == 0: if IBLLOCK.val == 1: IBLLOCK.val = 0 Draw.Redraw() if evt == SUN_EVENT: if IMP_BCKGRD.val == 1: IMP_BCKGRD.val = 0 Draw.Redraw() if BACKGROUND.val == 1: BACKGROUND.val = 0 Draw.Redraw() if IBL.val == 1: IBL.val = 0 Draw.Redraw() if IBLLOCK.val == 1: IBLLOCK.val = 0 Draw.Redraw() if evt == BCKGRD_EVENT: if IMP_SUN.val == 1: IMP_SUN.val = 0 Draw.Redraw() if IBL.val == 1: IBL.val = 0 Draw.Redraw() if BACKGROUND.val == 1: BACKGROUND.val = 0 Draw.Redraw() if IBLLOCK.val == 1: IBLLOCK.val = 0 Draw.Redraw() if evt == CBCKGRD_EVENT: if IMP_SUN.val == 1: IMP_SUN.val = 0 Draw.Redraw() if IBL.val == 1: IBL.val = 0 Draw.Redraw() if IMP_BCKGRD.val == 1: IMP_BCKGRD.val = 0 Draw.Redraw() if IBLLOCK.val == 1: IBLLOCK.val = 0 Draw.Redraw() if evt == QUICK_OPT: if QUICKOCC.val == 1: QUICKOCC.val = 0 Draw.Redraw() if evt == QUICK_OCC: QUICKOPT.val = 1 Draw.Redraw(0) if evt == CHANGE_AA: SCREEN=0 Draw.Redraw() return if evt == CHANGE_CAM: SCREEN=2 Draw.Redraw() return if evt == CHANGE_BCKGRD: SCREEN=3 Draw.Redraw() return if evt == CHANGE_LIGHT: SCREEN=4 Draw.Redraw() return if evt == CHANGE_GI: SCREEN=5 Draw.Redraw() return if evt == CHANGE_SHAD: SCREEN=6 Draw.Redraw() return if evt == CHANGE_EXP: SCREEN=7 Draw.Redraw() return if evt == CHANGE_CFG: SCREEN=8 Draw.Redraw() return if evt == REND_EVT and trial == False: SCREEN=8 Draw.Redraw() return
def buttonEvent(evt): global FILE,SCREEN if evt == EXPORT_EVT: Blender.Window.FileSelector(exportfile, "Export .sc", FILENAME) if evt == DOF_CAMERA: if DOF.val == 1: if SPHERICALCAMERA.val == 1: SPHERICALCAMERA.val = 0 Draw.Redraw() if evt == SPHER_CAMERA: if SPHERICALCAMERA.val == 1: if DOF.val == 1: DOF.val = 0 Draw.Redraw() if evt == IRR_EVENT: if GIIRR.val == 1: if GIPATH.val == 1: GIPATH.val = 0 Draw.Redraw() if evt == FILTER_EVENT: Draw.Redraw() if evt == CHANGE_AA: SCREEN=0 Draw.Redraw() return if evt == CHANGE_CAM: SCREEN=2 Draw.Redraw() return if evt == CHANGE_LIGHT: SCREEN=4 Draw.Redraw() return if evt == CHANGE_AO: SCREEN=5 Draw.Redraw() return
cbe7db97c14dab7ad62f558e33819d3bd283fe7b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12400/cbe7db97c14dab7ad62f558e33819d3bd283fe7b/sunflow_export.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3568, 1133, 12, 73, 11734, 4672, 2552, 7527, 16, 27908, 309, 6324, 422, 5675, 6354, 67, 24427, 56, 30, 8069, 2345, 18, 3829, 18, 812, 4320, 12, 6530, 768, 16, 315, 6144, 263, 1017, 311...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3568, 1133, 12, 73, 11734, 4672, 2552, 7527, 16, 27908, 309, 6324, 422, 5675, 6354, 67, 24427, 56, 30, 8069, 2345, 18, 3829, 18, 812, 4320, 12, 6530, 768, 16, 315, 6144, 263, 1017, 311...
if (y + h >= self.height): h = self.image.nrows - y - 2 if (x + w >= self.width): w = self.image.ncols - x - 2
if (y + h >= self.image.lr_y): h = self.image.lr_y - y - 2 if (x + w >= self.image.lr_x): w = self.image.lr_x - x - 2
def PaintArea(self, x, y, w, h, check=1): dc = wxPaintDC(self) dc.SetLogicalFunction(wxCOPY) scaling = self.scaling origin = [a * self.scroll_amount for a in self.GetViewStart()] origin_scaled = [a / scaling for a in origin] size_scaled = [a / scaling for a in self.GetSizeTuple()] if check: if ((x + w < origin_scaled[0]) and (y + h < origin_scaled[1]) or (x > origin_scaled[0] + size_scaled[0] and y > origin_scaled[1] + size_scaled[1]) or (w == 0 or h == 0)): return if (y + h >= self.height): h = self.image.nrows - y - 2 if (x + w >= self.width): w = self.image.ncols - x - 2
2933083de4a9e93226072bcc8aa7851a6a2b86c7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9927/2933083de4a9e93226072bcc8aa7851a6a2b86c7/gamera_display.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 30001, 5484, 12, 2890, 16, 619, 16, 677, 16, 341, 16, 366, 16, 866, 33, 21, 4672, 6744, 273, 7075, 12699, 5528, 12, 2890, 13, 6744, 18, 694, 17955, 2083, 12, 91, 14626, 16505, 13, 10...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 30001, 5484, 12, 2890, 16, 619, 16, 677, 16, 341, 16, 366, 16, 866, 33, 21, 4672, 6744, 273, 7075, 12699, 5528, 12, 2890, 13, 6744, 18, 694, 17955, 2083, 12, 91, 14626, 16505, 13, 10...
for customInclude in conf.customIncludes: f.write('
def writeIncludesForInterface(iface): assert iface.kind == 'interface' resulttypes = [] for member in iface.stubMembers: resulttype = writeIncludesForMember(member) if resulttype is not None and not isVariantType(resulttype): resulttypes.append(resulttype.name) includeType(iface)
6f558ca9eddc5be4f0e7a99f5054cd7d74be2155 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11102/6f558ca9eddc5be4f0e7a99f5054cd7d74be2155/qsgen.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 16815, 1290, 1358, 12, 31479, 4672, 1815, 9751, 18, 9224, 422, 296, 5831, 11, 563, 2352, 273, 5378, 364, 3140, 316, 9751, 18, 12847, 6918, 30, 563, 723, 273, 1045, 16815, 1290, 441...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 16815, 1290, 1358, 12, 31479, 4672, 1815, 9751, 18, 9224, 422, 296, 5831, 11, 563, 2352, 273, 5378, 364, 3140, 316, 9751, 18, 12847, 6918, 30, 563, 723, 273, 1045, 16815, 1290, 441...
perc_unsure = 100.0 * self.num_unsure / num_seen
perc_unsure = 100.0 * num_unsure / num_seen
def GetStats(self, session_only=False): """Return a description of the statistics.
ff894be814c62fc9544a2f5e67f3bca03b9d9e58 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6126/ff894be814c62fc9544a2f5e67f3bca03b9d9e58/oastats.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 968, 4195, 12, 2890, 16, 1339, 67, 3700, 33, 8381, 4672, 3536, 990, 279, 2477, 434, 326, 7691, 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, 968, 4195, 12, 2890, 16, 1339, 67, 3700, 33, 8381, 4672, 3536, 990, 279, 2477, 434, 326, 7691, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
v.trim_snapshot(True)
v.trim_snapshots(True)
def main(self): try: ec2 = boto.connect_ec2() self.run("/usr/sbin/xfs_freeze -f ${mount_point}") snapshot = ec2.create_snapshot('${volume_id}') boto.log.info("Snapshot created: %s " % snapshot) except Exception, e: self.notify(subject="${instance_id} Backup Failed", body=traceback.format_exc()) boto.log.info("Snapshot created: ${volume_id}") except Exception, e: self.notify(subject="${instance_id} Backup Failed", body=traceback.format_exc()) finally: self.run("/usr/sbin/xfs_freeze -u ${mount_point}")
dc26cdba6054ea9e0f5dd12207a0c8b42c485d6c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1098/dc26cdba6054ea9e0f5dd12207a0c8b42c485d6c/ebs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 2890, 4672, 775, 30, 6557, 22, 273, 17228, 18, 3612, 67, 557, 22, 1435, 365, 18, 2681, 2932, 19, 13640, 19, 87, 4757, 19, 92, 2556, 67, 29631, 300, 74, 3531, 4778, 67, 1153...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 2890, 4672, 775, 30, 6557, 22, 273, 17228, 18, 3612, 67, 557, 22, 1435, 365, 18, 2681, 2932, 19, 13640, 19, 87, 4757, 19, 92, 2556, 67, 29631, 300, 74, 3531, 4778, 67, 1153...
if not actions:
if not actions and not earlyabort:
def do_all(self, maxdepth=0, init=None, actions=None): """Testing update runner
e6d3628aeffb52ce858eb954a86dae5f5f654513 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2784/e6d3628aeffb52ce858eb954a86dae5f5f654513/britney.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 454, 12, 2890, 16, 943, 5979, 33, 20, 16, 1208, 33, 7036, 16, 4209, 33, 7036, 4672, 3536, 22218, 1089, 8419, 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, 741, 67, 454, 12, 2890, 16, 943, 5979, 33, 20, 16, 1208, 33, 7036, 16, 4209, 33, 7036, 4672, 3536, 22218, 1089, 8419, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
self.textview.set_wrap_mode(True)
self.textview.set_right_margin(50)
def __init__(self, handle): "The entry point to the Activity" activity.Activity.__init__(self, handle)
ec2d816270546616258518cdc9befcfd8fb8204c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5566/ec2d816270546616258518cdc9befcfd8fb8204c/GetIABooksActivity.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1640, 4672, 315, 1986, 1241, 1634, 358, 326, 9621, 6, 5728, 18, 6193, 16186, 2738, 972, 12, 2890, 16, 1640, 13, 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, 2738, 972, 12, 2890, 16, 1640, 4672, 315, 1986, 1241, 1634, 358, 326, 9621, 6, 5728, 18, 6193, 16186, 2738, 972, 12, 2890, 16, 1640, 13, 2, -100, -100, -100, -100, -100, -100, -1...
for res in cur:
for res in cur.fetchall():
def _iter(self, tag): cur = self._primarydb_cursor cur.execute("SELECT * FROM %s" % tag) for res in cur: pkg = self.getPkgByKey(res['pkgKey']) if pkg is None: continue version = functions.evrMerge(res['epoch'], res['version'], res['release']) yield res['name'], res['flags'], version, pkg
9dbdc96b580415ade15bb958606bc2fd1266cc25 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1143/9dbdc96b580415ade15bb958606bc2fd1266cc25/sqliterepodb.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2165, 12, 2890, 16, 1047, 4672, 662, 273, 365, 6315, 8258, 1966, 67, 9216, 662, 18, 8837, 2932, 4803, 380, 4571, 738, 87, 6, 738, 1047, 13, 364, 400, 316, 662, 18, 5754, 454, 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, 389, 2165, 12, 2890, 16, 1047, 4672, 662, 273, 365, 6315, 8258, 1966, 67, 9216, 662, 18, 8837, 2932, 4803, 380, 4571, 738, 87, 6, 738, 1047, 13, 364, 400, 316, 662, 18, 5754, 454, 13...
_os.rename(self._dirfile, self._bakfile) except _os.error:
self._os.rename(self._dirfile, self._bakfile) except self._os.error:
def _commit(self): try: _os.unlink(self._bakfile) except _os.error: pass
e537360e3cd2d172a702caeb084007fd253b56e1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/e537360e3cd2d172a702caeb084007fd253b56e1/dumbdbm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 7371, 12, 2890, 4672, 775, 30, 389, 538, 18, 318, 1232, 12, 2890, 6315, 31170, 768, 13, 1335, 389, 538, 18, 1636, 30, 1342, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 7371, 12, 2890, 4672, 775, 30, 389, 538, 18, 318, 1232, 12, 2890, 6315, 31170, 768, 13, 1335, 389, 538, 18, 1636, 30, 1342, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100...
control.set_interpolation_mode("volume", gst.INTERPOLATE_LINEAR)
control.set_interpolation_mode("freq", gst.INTERPOLATE_LINEAR)
def main(): pipeline = gst.Pipeline("audiocontroller") src = gst.element_factory_make("audiotestsrc", "src") sink = gst.element_factory_make("alsasink", "sink") pipeline.add(src, sink) src.link(sink) control = gst.Controller(src, "freq", "volume") control.set_interpolation_mode("volume", gst.INTERPOLATE_LINEAR) control.set_interpolation_mode("volume", gst.INTERPOLATE_LINEAR) control.set("volume", 0, 0.0) control.set("volume", 2 * gst.SECOND, 1.0) control.set("volume", 4 * gst.SECOND, 0.0) control.set("volume", 6 * gst.SECOND, 1.0) control.set("freq", 0, 440.0) control.set("freq", 3 * gst.SECOND, 3000.0) control.set("freq", 6 * gst.SECOND, 880.0) pipeline.set_state(gst.STATE_PLAYING) time.sleep(7)
d4a8830b7bb39eea2fca0312c8e8b270ea14f36a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1020/d4a8830b7bb39eea2fca0312c8e8b270ea14f36a/audio-controller.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 5873, 273, 314, 334, 18, 8798, 2932, 24901, 77, 504, 1580, 1539, 7923, 1705, 273, 314, 334, 18, 2956, 67, 6848, 67, 6540, 2932, 24901, 77, 352, 395, 4816, 3113, 315, 4816, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 5873, 273, 314, 334, 18, 8798, 2932, 24901, 77, 504, 1580, 1539, 7923, 1705, 273, 314, 334, 18, 2956, 67, 6848, 67, 6540, 2932, 24901, 77, 352, 395, 4816, 3113, 315, 4816, ...
self.treeAreaWidth*cluster.height/self.treeHeight
self.treeAreaWidth*cluster.height/(self.treeHeight or 1)
def drawTree(self, cluster, l): level=l+1 if cluster.branches and (level<=self.parent.PrintDepth or \ not self.parent.PrintDepthCheck): (leftR, hi)=self.drawTree(cluster.left, level) (rightR,low)=self.drawTree(cluster.right, level) top=leftMargin+self.treeAreaWidth- \ self.treeAreaWidth*cluster.height/self.treeHeight rectW=self.width()-self.textAreaWidth-top rectH=low-hi rect=MyCanvasRect(top, hi, rectW+2, rectH) self.addItem(rect) rect.left=leftR rect.right=rightR rect.cluster=cluster rect.setBrush(self.brush) rect.setPen(self.pen) rect.setZValue(self.gZPos) self.gZPos-=1 rect.show() self.rectObj.append(rect) return (rect, (hi+low)/2) else: text=MyCanvasText(self, font=self.font, alignment=Qt.AlignLeft) text.setPlainText(" ") text.cluster=cluster text.setPos(leftMargin+self.treeAreaWidth+5,math.ceil(self.gTextPos)) text.setZValue(1) self.textObj.append(text) self.gTextPos+=self.gTextPosInc return (None, self.gTextPos-self.gTextPosInc/2)
94b725165088a81ea27b58e2ace96e30782609f4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6366/94b725165088a81ea27b58e2ace96e30782609f4/OWHierarchicalClustering.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3724, 2471, 12, 2890, 16, 2855, 16, 328, 4672, 1801, 33, 80, 15, 21, 309, 2855, 18, 18078, 471, 261, 2815, 32, 33, 2890, 18, 2938, 18, 5108, 6148, 578, 521, 486, 365, 18, 2938, 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, 3724, 2471, 12, 2890, 16, 2855, 16, 328, 4672, 1801, 33, 80, 15, 21, 309, 2855, 18, 18078, 471, 261, 2815, 32, 33, 2890, 18, 2938, 18, 5108, 6148, 578, 521, 486, 365, 18, 2938, 18, ...
if room in self.rooms.keys(): dest = xmpp.JID(room)
if room in self.rooms:
def set_subject(self, room, subject): """Set a new subject on specified room."""
2ce11521e3351e67561d9ed1ef6472bf6e0df5e6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14221/2ce11521e3351e67561d9ed1ef6472bf6e0df5e6/bot.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 7857, 12, 2890, 16, 7725, 16, 3221, 4672, 3536, 694, 279, 394, 3221, 603, 1269, 7725, 12123, 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, 444, 67, 7857, 12, 2890, 16, 7725, 16, 3221, 4672, 3536, 694, 279, 394, 3221, 603, 1269, 7725, 12123, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
"""
EXAMPLES: sage: from sage.rings.polynomial.polynomial_singular_interface import can_convert_to_singular sage: can_convert_to_singular(PolynomialRing(QQ, names=['x'])) True sage: can_convert_to_singular(PolynomialRing(QQ, names=[])) False """ if R.ngens() == 0: return False;
def can_convert_to_singular(R): """ Returns True if this ring's base field or ring can be represented in Singular. If this is True then this polynomial ring can be represented in Singular. The following base rings are supported: $GF(p)$, $GF(p^n)$, rationals, number fields, and real and complex fields. """ base_ring = R.base_ring() return ( sage.rings.ring.is_FiniteField(base_ring) or is_RationalField(base_ring) or (base_ring.is_prime_field() and base_ring.characteristic() <= 2147483647) or is_RealField(base_ring) or is_ComplexField(base_ring) or is_RealDoubleField(base_ring) or is_ComplexDoubleField(base_ring) or number_field.all.is_NumberField(base_ring) or base_ring is ZZ )
e458d8d08d95bda7b525f1f0ea065146a1faccbc /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/e458d8d08d95bda7b525f1f0ea065146a1faccbc/polynomial_singular_interface.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 848, 67, 6283, 67, 869, 67, 17835, 12, 54, 4672, 225, 5675, 8900, 11386, 30, 272, 410, 30, 628, 272, 410, 18, 86, 899, 18, 3915, 13602, 18, 3915, 13602, 67, 17835, 67, 5831, 1930, 84...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 848, 67, 6283, 67, 869, 67, 17835, 12, 54, 4672, 225, 5675, 8900, 11386, 30, 272, 410, 30, 628, 272, 410, 18, 86, 899, 18, 3915, 13602, 18, 3915, 13602, 67, 17835, 67, 5831, 1930, 84...
while count != 1:
while count <= 1:
def main(): if len(argv) != 3: print "to few arguments in call to %s" %argv[0] print "usage: %s input.png output.png" %argv[0] exit(-1) init_gamera() from gamera.toolkits import tss input_image = argv[1] output_image = argv[2] image0 = load_image(r"%s"%input_image) onebit0 = image0.to_onebit() print "Performing area ratio filter:" ccs = onebit0.area_ratio_filter() avg_height = calcAvgHeight(ccs) print "Average Heigth of all remaining ccs = ", avg_height R = 0.2 * avg_height count = 0 print "R = ", R print "Performing hough transformation:" args = [] floatImage = tss.plugins.TextStringSep.hough_transform(ccs, args, [0.0,5.0,85.0,95.0,175.0,180.0],R,1.0,onebit0.ncols,onebit0.nrows) RT_c = 20
69b5bb9017bd106b070f14f72121ba350eb10df5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2794/69b5bb9017bd106b070f14f72121ba350eb10df5/main.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 309, 562, 12, 19485, 13, 480, 890, 30, 1172, 315, 869, 11315, 1775, 316, 745, 358, 738, 87, 6, 738, 19485, 63, 20, 65, 1172, 315, 9167, 30, 738, 87, 810, 18, 6446, 876, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 309, 562, 12, 19485, 13, 480, 890, 30, 1172, 315, 869, 11315, 1775, 316, 745, 358, 738, 87, 6, 738, 19485, 63, 20, 65, 1172, 315, 9167, 30, 738, 87, 810, 18, 6446, 876, ...
self.aps = 15
self.aps = 40
def __init__(self, distance, callback, is_angle): self.callback = callback #distance in m*10 self.distance = distance self.is_angle = is_angle #meters per second self.mps = 1 #amount of angles turned per second self.aps = 15
7a0ddd099fada0a3f6e4fed9ca330783b2a45ec2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5698/7a0ddd099fada0a3f6e4fed9ca330783b2a45ec2/motor_queue_proc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 3888, 16, 1348, 16, 353, 67, 4341, 4672, 365, 18, 3394, 273, 1348, 468, 8969, 316, 312, 14, 2163, 365, 18, 8969, 273, 3888, 365, 18, 291, 67, 4341, 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, 1001, 2738, 972, 12, 2890, 16, 3888, 16, 1348, 16, 353, 67, 4341, 4672, 365, 18, 3394, 273, 1348, 468, 8969, 316, 312, 14, 2163, 365, 18, 8969, 273, 3888, 365, 18, 291, 67, 4341, 273...
output.write(input.read())
return output.write(input.read())
def encode(input, output, encoding): """Encode common content-transfer-encodings (base64, quopri, uuencode).""" if encoding == 'base64': import base64 return base64.encode(input, output) if encoding == 'quoted-printable': import quopri return quopri.encode(input, output, 0) if encoding in ('uuencode', 'x-uuencode', 'uue', 'x-uue'): import uu return uu.encode(input, output) if encoding in ('7bit', '8bit'): output.write(input.read()) if encodetab.has_key(encoding): pipethrough(input, encodetab[encoding], output) else: raise ValueError, \ 'unknown Content-Transfer-Encoding: %s' % encoding
3aa06505841825f6f822558d5c3a87990bbdcbe2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/3aa06505841825f6f822558d5c3a87990bbdcbe2/mimetools.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2017, 12, 2630, 16, 876, 16, 2688, 4672, 3536, 5509, 2975, 913, 17, 13866, 17, 1331, 369, 899, 261, 1969, 1105, 16, 719, 556, 566, 16, 582, 89, 3015, 13, 12123, 309, 2688, 422, 296, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2017, 12, 2630, 16, 876, 16, 2688, 4672, 3536, 5509, 2975, 913, 17, 13866, 17, 1331, 369, 899, 261, 1969, 1105, 16, 719, 556, 566, 16, 582, 89, 3015, 13, 12123, 309, 2688, 422, 296, ...
self._save_index()
try: self._save_index() except: pass
def close(self): self._file.close() self._lock_file.close() self._tfile.close() self._save_index()
e9aa3bd398cba329c8a421eb6d47f4dba6e400a9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/e9aa3bd398cba329c8a421eb6d47f4dba6e400a9/FileStorage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1746, 12, 2890, 4672, 365, 6315, 768, 18, 4412, 1435, 365, 6315, 739, 67, 768, 18, 4412, 1435, 365, 6315, 88, 768, 18, 4412, 1435, 775, 30, 365, 6315, 5688, 67, 1615, 1435, 1335, 30, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1746, 12, 2890, 4672, 365, 6315, 768, 18, 4412, 1435, 365, 6315, 739, 67, 768, 18, 4412, 1435, 365, 6315, 88, 768, 18, 4412, 1435, 775, 30, 365, 6315, 5688, 67, 1615, 1435, 1335, 30, ...
logging.info('Removed tempdir = %s', temp_dir)
logging.debug('Removed tempdir = %s', temp_dir)
def CleanUp(temp_dir): """Cleans up the tempdir Args: temp_dir = name of the directory to cleanup """ if os.path.exists(temp_dir): shutil.rmtree(temp_dir, ignore_errors=True) logging.info('Removed tempdir = %s', temp_dir)
230756fc83931697a28aa94b51d9c58f53e1e35d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/230756fc83931697a28aa94b51d9c58f53e1e35d/generate_au_zip.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9645, 1211, 12, 5814, 67, 1214, 4672, 3536, 31948, 731, 326, 23101, 6634, 30, 1906, 67, 1214, 273, 508, 434, 326, 1867, 358, 6686, 3536, 309, 1140, 18, 803, 18, 1808, 12, 5814, 67, 121...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9645, 1211, 12, 5814, 67, 1214, 4672, 3536, 31948, 731, 326, 23101, 6634, 30, 1906, 67, 1214, 273, 508, 434, 326, 1867, 358, 6686, 3536, 309, 1140, 18, 803, 18, 1808, 12, 5814, 67, 121...
allowed_sites["Panda"] = [site["ddm"] for site in Client.getSiteSpecs()[1].values()]
allowed_sites["Panda"] = Client.PandaSites.keys()
def check(self): super(AnaTransform,self).check() if not self.inputdata.dataset: return if not self.backend: logger.warning("Determining backend and cloud...")
3865b22693b9fc4fc569b65e316611e7091ab973 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1488/3865b22693b9fc4fc569b65e316611e7091ab973/AnaTransform.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 12, 2890, 4672, 2240, 12, 979, 69, 4059, 16, 2890, 2934, 1893, 1435, 309, 486, 365, 18, 2630, 892, 18, 8682, 30, 327, 309, 486, 365, 18, 9993, 30, 1194, 18, 8551, 2932, 9139, 31...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 12, 2890, 4672, 2240, 12, 979, 69, 4059, 16, 2890, 2934, 1893, 1435, 309, 486, 365, 18, 2630, 892, 18, 8682, 30, 327, 309, 486, 365, 18, 9993, 30, 1194, 18, 8551, 2932, 9139, 31...
self.attributes[att_name] = att_value
if att_name != "name" : self.attributes[att_name] = att_value self.save() elif self.name == att_value : self.attributes[att_name] = att_value
def set_attribute(self,att_name,att_value) : #FIXME : we have to be careful when changing the name #if att_name == "name" : self.attributes[att_name] = att_value
13303fcbf7bee804a4a080c995745885e5d57d24 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8234/13303fcbf7bee804a4a080c995745885e5d57d24/tagstore.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 4589, 12, 2890, 16, 4558, 67, 529, 16, 4558, 67, 1132, 13, 294, 468, 25810, 294, 732, 1240, 358, 506, 26850, 1347, 12770, 326, 508, 468, 430, 2403, 67, 529, 422, 315, 529, 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, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 4589, 12, 2890, 16, 4558, 67, 529, 16, 4558, 67, 1132, 13, 294, 468, 25810, 294, 732, 1240, 358, 506, 26850, 1347, 12770, 326, 508, 468, 430, 2403, 67, 529, 422, 315, 529, 6...
If no ``length`` is provided the standard state space size is
If no ``length`` is provided, the standard state space size is
def lin_matrix(self, length = None): """ Return the ``Lin`` matrix. If no ``length`` is provided the standard state space size is used. The key schedule calls this method with an explicit length argument because only ``self.r`` S-Box applications are performed in the key schedule. INPUT: - ``length`` - length of state space. (default: ``None``) EXAMPLE:: sage: sr = mq.SR(1, 1, 1, 4) sage: sr.lin_matrix() [ a^2 + 1 1 a^3 + a^2 a^2 + 1] [ a a 1 a^3 + a^2 + a + 1] [ a^3 + a a^2 a^2 1] [ 1 a^3 a + 1 a + 1] """ r = self.r c = self.c e = self.e k = self.k
3cd6b553ebc89e43967234049b07b4477c5b3b3d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/3cd6b553ebc89e43967234049b07b4477c5b3b3d/sr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4739, 67, 5667, 12, 2890, 16, 769, 273, 599, 4672, 3536, 2000, 326, 12176, 48, 267, 10335, 3148, 18, 225, 971, 1158, 12176, 2469, 10335, 353, 2112, 16, 326, 4529, 919, 3476, 963, 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, 4739, 67, 5667, 12, 2890, 16, 769, 273, 599, 4672, 3536, 2000, 326, 12176, 48, 267, 10335, 3148, 18, 225, 971, 1158, 12176, 2469, 10335, 353, 2112, 16, 326, 4529, 919, 3476, 963, 353, ...
return False
return False
def KillJob(webtlsmdd, job_id): """Kills jobs in state "running" by pid and moves them to the "Completed Jobs" section as "killed" state """ ## Christoph Champ, 2008-03-13 ## NOTE: We want to keep the job_id around in order to inform the user ## that their job has been "killed". if not webtlsmdd.jobdb.job_exists(job_id): return False job_dir = webtlsmdd.job_get_job_dir(job_id) if job_dir and job_dir.startswith(conf.TLSMD_WORK_DIR) and os.path.isdir(job_dir): try: ## Switched to storing pid in database. Christoph Champ, 2008-03-14 tmp_pid = webtlsmdd.job_get_pid(job_id) pid = int(tmp_pid) except: return False try: os.kill(pid, SIGHUP) except: return False return True
0049fea0a8babe00b08f3932abf09fa0bc010db6 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10674/0049fea0a8babe00b08f3932abf09fa0bc010db6/webtlsmdd.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 20520, 2278, 12, 4875, 17116, 81, 449, 16, 1719, 67, 350, 4672, 3536, 19045, 87, 6550, 316, 919, 315, 8704, 6, 635, 4231, 471, 13934, 2182, 358, 326, 315, 9556, 26909, 6, 2442, 487, 31...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 20520, 2278, 12, 4875, 17116, 81, 449, 16, 1719, 67, 350, 4672, 3536, 19045, 87, 6550, 316, 919, 315, 8704, 6, 635, 4231, 471, 13934, 2182, 358, 326, 315, 9556, 26909, 6, 2442, 487, 31...
% (self.enum, self.enum(self.dflt),
% (self.enum, self.enum(self.dflt.tolist()),
def __repr__(self): underptype = numpy.sctypeNA[self.dtype.base.type] return ('EnumCol(%s, %r, dtype=\'%s\', shape=%s, pos=%s, indexed=%s)' % (self.enum, self.enum(self.dflt), underptype, self.dtype.shape, self._v_pos, self.indexed))
90b1a9e85a0d53bd97f485d74e1631fb859b98d7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12687/90b1a9e85a0d53bd97f485d74e1631fb859b98d7/IsDescription.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 12715, 972, 12, 2890, 4672, 3613, 27672, 273, 3972, 18, 87, 12387, 11277, 63, 2890, 18, 8972, 18, 1969, 18, 723, 65, 327, 7707, 3572, 914, 9275, 87, 16, 738, 86, 16, 3182, 31343,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 12715, 972, 12, 2890, 4672, 3613, 27672, 273, 3972, 18, 87, 12387, 11277, 63, 2890, 18, 8972, 18, 1969, 18, 723, 65, 327, 7707, 3572, 914, 9275, 87, 16, 738, 86, 16, 3182, 31343,...
self.control.SetSelection(0, self.control.GetLastPosition())
self.control.SetSelection(-1, -1)
def onGainFocus(self, event): if self.showingSample: self.control.SetSelection(0, self.control.GetLastPosition()) event.Skip()
ac77433d3606ff9a17df83116cb1cb9178164089 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/ac77433d3606ff9a17df83116cb1cb9178164089/AttributeEditors.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 43, 530, 9233, 12, 2890, 16, 871, 4672, 309, 365, 18, 4500, 310, 8504, 30, 365, 18, 7098, 18, 694, 6233, 19236, 21, 16, 300, 21, 13, 871, 18, 6368, 1435, 225, 2, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 43, 530, 9233, 12, 2890, 16, 871, 4672, 309, 365, 18, 4500, 310, 8504, 30, 365, 18, 7098, 18, 694, 6233, 19236, 21, 16, 300, 21, 13, 871, 18, 6368, 1435, 225, 2, -100, -100, -...
tab_ids = eval_container(cursor.fetchone()[0]) tab_ids.append(max_id + 1) cursor.execute('UPDATE taborder_order SET tab_ids=? WHERE type=?', (repr(tab_ids), 'site'))
row = cursor.fetchone() if row is not None: tab_ids = eval_container(row[0]) tab_ids.append(max_id + 1) cursor.execute('UPDATE taborder_order SET tab_ids=? WHERE type=?', (repr(tab_ids), 'site')) else: pass
def upgrade100(cursor): """Adds the Miro audio guide as a site for anyone who doesn't already have it and isn't using a theme. """ # if the user is using a theme, we don't do anything if not config.get(prefs.THEME_NAME) == prefs.THEME_NAME.default: return audio_guide_url = u'https://www.miroguide.com/audio/' favicon_url = u'https://www.miroguide.com/favicon.ico' cursor.execute("SELECT count(*) FROM channel_guide WHERE url=?", (audio_guide_url,)) count = cursor.fetchone()[0] if count > 0: return max_id = 0 for table in ('channel_folder', 'playlist_folder_item_map', 'channel_guide', 'playlist_item_map', 'feed', 'directory_feed_impl', 'remote_downloader', 'directory_watch_feed_impl', 'rss_feed_impl', 'rss_multi_feed_impl', 'scraper_feed_impl', 'feed_impl', 'search_downloads_feed_impl', 'http_auth_password', 'search_feed_impl', 'icon_cache', 'single_feed_impl', 'item', 'taborder_order', 'manual_feed_impl', 'theme_history', 'playlist', 'widgets_frontend_state', 'playlist_folder'): cursor.execute("SELECT MAX(id) from %s" % table) max_id = max(max_id, cursor.fetchone()[0]) cursor.execute("INSERT INTO channel_guide " "(id, url, allowedURLs, updated_url, favicon, firstTime) VALUES (?, ?, ?, ?, ?, ?)", (max_id + 1, audio_guide_url, "[]", audio_guide_url, favicon_url, True)) # add the new Audio Guide to the site tablist cursor.execute('SELECT tab_ids FROM taborder_order WHERE type=?',('site',)) tab_ids = eval_container(cursor.fetchone()[0]) tab_ids.append(max_id + 1) cursor.execute('UPDATE taborder_order SET tab_ids=? WHERE type=?', (repr(tab_ids), 'site'))
0d334f224f7034b3d64f60f0da3df0630a7d58f9 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12354/0d334f224f7034b3d64f60f0da3df0630a7d58f9/databaseupgrade.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8400, 6625, 12, 9216, 4672, 3536, 3655, 326, 490, 11373, 7447, 7343, 487, 279, 2834, 364, 1281, 476, 10354, 3302, 1404, 1818, 1240, 518, 471, 5177, 1404, 1450, 279, 5006, 18, 3536, 468, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8400, 6625, 12, 9216, 4672, 3536, 3655, 326, 490, 11373, 7447, 7343, 487, 279, 2834, 364, 1281, 476, 10354, 3302, 1404, 1818, 1240, 518, 471, 5177, 1404, 1450, 279, 5006, 18, 3536, 468, ...
res = "<table><tr>"+"".join('<td align="right"><b>&nbsp;&nbsp;%s&nbsp;&nbsp;</b></td>' % n for n in ("ID", "Items", "Fitness", "BIC")) + "</tr>\n" for i in range(self.K): res += "<tr>"+"".join('<td align="right">&nbsp;&nbsp;%s&nbsp;&nbsp;</td>' % str(self.table.item(i, j).text()) for j in range(4)) + "</tr>\n" res += "<tr>"+"".join('<td align="right"><b>&nbsp;&nbsp;%s&nbsp;&nbsp;</b></td>' % str(self.table.item(self.K, j).text()) for j in range(4)) + "</tr>\n" res += "</table>" self.reportRaw(res)
import OWReport self.reportRaw(OWReport.reportTable(self.table))
def sendReport(self): self.reportSettings("Settings", [("Distance measure", self.distanceMeasures[self.distanceMeasure]), ("Number of clusters", self.K)]) self.reportData(self.data) self.reportSection("Cluster data") res = "<table><tr>"+"".join('<td align="right"><b>&nbsp;&nbsp;%s&nbsp;&nbsp;</b></td>' % n for n in ("ID", "Items", "Fitness", "BIC")) + "</tr>\n" for i in range(self.K): res += "<tr>"+"".join('<td align="right">&nbsp;&nbsp;%s&nbsp;&nbsp;</td>' % str(self.table.item(i, j).text()) for j in range(4)) + "</tr>\n" res += "<tr>"+"".join('<td align="right"><b>&nbsp;&nbsp;%s&nbsp;&nbsp;</b></td>' % str(self.table.item(self.K, j).text()) for j in range(4)) + "</tr>\n" res += "</table>" self.reportRaw(res)
b5200d400a472ae12720d7772ce15d5dcc3a721d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6366/b5200d400a472ae12720d7772ce15d5dcc3a721d/OWKMeans.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 4820, 12, 2890, 4672, 365, 18, 6006, 2628, 2932, 2628, 3113, 306, 2932, 7200, 6649, 3113, 365, 18, 8969, 23177, 1823, 63, 2890, 18, 8969, 7197, 65, 3631, 7566, 1854, 434, 9566, 311...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 4820, 12, 2890, 4672, 365, 18, 6006, 2628, 2932, 2628, 3113, 306, 2932, 7200, 6649, 3113, 365, 18, 8969, 23177, 1823, 63, 2890, 18, 8969, 7197, 65, 3631, 7566, 1854, 434, 9566, 311...
self._methods.append(Link(field, make_uid(val)))
self._methods.append(Link(field, vuid))
def _inherit_methods(self, base): for (field, val) in base.__dict__.items(): # Convert functions to methods. (Since we're getting # values via __dict__) if self._methodbyname.has_key(field): continue if type(val) is types.FunctionType: val = new.instancemethod(val, None, self._uid.value()) vuid = make_uid(val, self._uid, field) if vuid is None: continue if not vuid.is_routine(): continue self._methodbyname[field] = 1 self._methods.append(Link(field, make_uid(val)))
8f1ba4e51fb97670b4ac510d74d0146e80814342 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11420/8f1ba4e51fb97670b4ac510d74d0146e80814342/objdoc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 6018, 67, 5163, 12, 2890, 16, 1026, 4672, 364, 261, 1518, 16, 1244, 13, 316, 1026, 16186, 1576, 25648, 3319, 13332, 468, 4037, 4186, 358, 2590, 18, 225, 261, 9673, 732, 4565, 8742, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 6018, 67, 5163, 12, 2890, 16, 1026, 4672, 364, 261, 1518, 16, 1244, 13, 316, 1026, 16186, 1576, 25648, 3319, 13332, 468, 4037, 4186, 358, 2590, 18, 225, 261, 9673, 732, 4565, 8742, ...
(use update -r to check out earlier revisions, revert does not change the working directory parents)
(Use update -r to check out earlier revisions, revert does not change the working directory parents.)
def revert(ui, repo, *pats, **opts): """restore individual files or directories to an earlier state (use update -r to check out earlier revisions, revert does not change the working directory parents) With no revision specified, revert the named files or directories to the contents they had in the parent of the working directory. This restores the contents of the affected files to an unmodified state and unschedules adds, removes, copies, and renames. If the working directory has two parents, you must explicitly specify the revision to revert to. Using the -r/--rev option, revert the given files or directories to their contents as of a specific revision. This can be helpful to "roll back" some or all of an earlier change. See 'hg help dates' for a list of formats valid for -d/--date. Revert modifies the working directory. It does not commit any changes, or change the parent of the working directory. If you revert to a revision other than the parent of the working directory, the reverted files will thus appear modified afterwards. If a file has been deleted, it is restored. If the executable mode of a file was changed, it is reset. If names are given, all files matching the names are reverted. If no arguments are given, no files are reverted. Modified files are saved with a .orig suffix before reverting. To disable these backups, use --no-backup. """ if opts["date"]: if opts["rev"]: raise util.Abort(_("you can't specify a revision and a date")) opts["rev"] = cmdutil.finddate(ui, repo, opts["date"]) if not pats and not opts.get('all'): raise util.Abort(_('no files or directories specified; ' 'use --all to revert the whole repo')) parent, p2 = repo.dirstate.parents() if not opts.get('rev') and p2 != nullid: raise util.Abort(_('uncommitted merge - please provide a ' 'specific revision')) ctx = repo[opts.get('rev')] node = ctx.node() mf = ctx.manifest() if node == parent: pmf = mf else: pmf = None # need all matching names in dirstate and manifest of target rev, # so have to walk both. do not print errors if files exist in one # but not other. names = {} wlock = repo.wlock() try: # walk dirstate. m = cmdutil.match(repo, pats, opts) m.bad = lambda x,y: False for abs in repo.walk(m): names[abs] = m.rel(abs), m.exact(abs) # walk target manifest. def badfn(path, msg): if path in names: return False path_ = path + '/' for f in names: if f.startswith(path_): return False repo.ui.warn("%s: %s\n" % (m.rel(path), msg)) return False m = cmdutil.match(repo, pats, opts) m.bad = badfn for abs in repo[node].walk(m): if abs not in names: names[abs] = m.rel(abs), m.exact(abs) m = cmdutil.matchfiles(repo, names) changes = repo.status(match=m)[:4] modified, added, removed, deleted = map(set, changes) # if f is a rename, also revert the source cwd = repo.getcwd() for f in added: src = repo.dirstate.copied(f) if src and src not in names and repo.dirstate[src] == 'r': removed.add(src) names[src] = (repo.pathto(src, cwd), True) def removeforget(abs): if repo.dirstate[abs] == 'a': return _('forgetting %s\n') return _('removing %s\n') revert = ([], _('reverting %s\n')) add = ([], _('adding %s\n')) remove = ([], removeforget) undelete = ([], _('undeleting %s\n')) disptable = ( # dispatch table: # file state # action if in target manifest # action if not in target manifest # make backup if in target manifest # make backup if not in target manifest (modified, revert, remove, True, True), (added, revert, remove, True, False), (removed, undelete, None, False, False), (deleted, revert, remove, False, False), ) for abs, (rel, exact) in sorted(names.items()): mfentry = mf.get(abs) target = repo.wjoin(abs) def handle(xlist, dobackup): xlist[0].append(abs) if dobackup and not opts.get('no_backup') and util.lexists(target): bakname = "%s.orig" % rel ui.note(_('saving current version of %s as %s\n') % (rel, bakname)) if not opts.get('dry_run'): util.copyfile(target, bakname) if ui.verbose or not exact: msg = xlist[1] if not isinstance(msg, basestring): msg = msg(abs) ui.status(msg % rel) for table, hitlist, misslist, backuphit, backupmiss in disptable: if abs not in table: continue # file has changed in dirstate if mfentry: handle(hitlist, backuphit) elif misslist is not None: handle(misslist, backupmiss) break else: if abs not in repo.dirstate: if mfentry: handle(add, True) elif exact: ui.warn(_('file not managed: %s\n') % rel) continue # file has not changed in dirstate if node == parent: if exact: ui.warn(_('no changes needed to %s\n') % rel) continue if pmf is None: # only need parent manifest in this unlikely case, # so do not read by default pmf = repo[parent].manifest() if abs in pmf: if mfentry: # if version of file is same in parent and target # manifests, do nothing if (pmf[abs] != mfentry or pmf.flags(abs) != mf.flags(abs)): handle(revert, False) else: handle(remove, False) if not opts.get('dry_run'): def checkout(f): fc = ctx[f] repo.wwrite(f, fc.data(), fc.flags()) audit_path = util.path_auditor(repo.root) for f in remove[0]: if repo.dirstate[f] == 'a': repo.dirstate.forget(f) continue audit_path(f) try: util.unlink(repo.wjoin(f)) except OSError: pass repo.dirstate.remove(f) normal = None if node == parent: # We're reverting to our parent. If possible, we'd like status # to report the file as clean. We have to use normallookup for # merges to avoid losing information about merged/dirty files. if p2 != nullid: normal = repo.dirstate.normallookup else: normal = repo.dirstate.normal for f in revert[0]: checkout(f) if normal: normal(f) for f in add[0]: checkout(f) repo.dirstate.add(f) normal = repo.dirstate.normallookup if node == parent and p2 == nullid: normal = repo.dirstate.normal for f in undelete[0]: checkout(f) normal(f) finally: wlock.release()
210724bafdf5de80453bb19042eaa1bfb525ba86 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11312/210724bafdf5de80453bb19042eaa1bfb525ba86/commands.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15226, 12, 4881, 16, 3538, 16, 380, 84, 2323, 16, 2826, 4952, 4672, 3536, 13991, 7327, 1390, 578, 6402, 358, 392, 13805, 919, 225, 261, 3727, 1089, 300, 86, 358, 866, 596, 13805, 18325, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15226, 12, 4881, 16, 3538, 16, 380, 84, 2323, 16, 2826, 4952, 4672, 3536, 13991, 7327, 1390, 578, 6402, 358, 392, 13805, 919, 225, 261, 3727, 1089, 300, 86, 358, 866, 596, 13805, 18325, ...
confautoprc=ReadFile("makepanda/confauto.in")
confautoprc = ReadFile("makepanda/confauto.in")
pandaversion_h += "\n#undef PANDA_OFFICIAL_VERSION\n"
397a7f9736d1ffe1daf985de6c0bb8e5fc4b1c61 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8543/397a7f9736d1ffe1daf985de6c0bb8e5fc4b1c61/makepanda.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 293, 464, 842, 722, 67, 76, 1011, 1548, 82, 7, 318, 536, 225, 453, 4307, 37, 67, 3932, 1653, 39, 6365, 67, 5757, 64, 82, 6, 2, 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, 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, 293, 464, 842, 722, 67, 76, 1011, 1548, 82, 7, 318, 536, 225, 453, 4307, 37, 67, 3932, 1653, 39, 6365, 67, 5757, 64, 82, 6, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
if len(arg[2]):
if len(arg2):
def _rec_get(ids, table, parent): if not ids: return [] ids2 = table.search(cursor, user, [(parent, 'in', ids), (parent, '!=', False)], context=context) return ids + _rec_get(ids2, table, parent)
74267e3f4ebaefed2078fa2ad692d305059fb9cf /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9266/74267e3f4ebaefed2078fa2ad692d305059fb9cf/orm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3927, 67, 588, 12, 2232, 16, 1014, 16, 982, 4672, 309, 486, 3258, 30, 327, 5378, 3258, 22, 273, 1014, 18, 3072, 12, 9216, 16, 729, 16, 306, 12, 2938, 16, 296, 267, 2187, 3258, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3927, 67, 588, 12, 2232, 16, 1014, 16, 982, 4672, 309, 486, 3258, 30, 327, 5378, 3258, 22, 273, 1014, 18, 3072, 12, 9216, 16, 729, 16, 306, 12, 2938, 16, 296, 267, 2187, 3258, ...
self.execute()
if self.execute: self.execute()
def finish(self): self._finished.append(1) self.execute()
0d9b5b3750615f58c2d0f754f5d516173a671ffa /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/0d9b5b3750615f58c2d0f754f5d516173a671ffa/flow.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4076, 12, 2890, 4672, 365, 6315, 13527, 18, 6923, 12, 21, 13, 365, 18, 8837, 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, 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, 4076, 12, 2890, 4672, 365, 6315, 13527, 18, 6923, 12, 21, 13, 365, 18, 8837, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
class ConcatenateString(vistrails_module.Module):
class ConcatenateString(Module):
def compute(self): values = tuple([self.getInputFromPort(i) for i in range(self.length)]) self.setResult("value", values)
bbb89ebe493db9587a30f7ab1f63c48c2c8e5e95 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6341/bbb89ebe493db9587a30f7ab1f63c48c2c8e5e95/basic_modules.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3671, 12, 2890, 4672, 924, 273, 3193, 3816, 2890, 18, 588, 1210, 1265, 2617, 12, 77, 13, 364, 277, 316, 1048, 12, 2890, 18, 2469, 13, 5717, 365, 18, 542, 1253, 2932, 1132, 3113, 924, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3671, 12, 2890, 4672, 924, 273, 3193, 3816, 2890, 18, 588, 1210, 1265, 2617, 12, 77, 13, 364, 277, 316, 1048, 12, 2890, 18, 2469, 13, 5717, 365, 18, 542, 1253, 2932, 1132, 3113, 924, ...