rem stringlengths 1 322k | add stringlengths 0 2.05M | context stringlengths 4 228k | meta stringlengths 156 215 |
|---|---|---|---|
self.N = ncolors self._i_under = self.N self._i_over = self.N+1 self._i_bad = self.N+2 | def set_source(self, source): """ Define an alternative source for the colormap. *source* can be any other matplotlib colormap object or its registered name, a NumPy array with one RGB triplet per row or the name of a textfile with one RGB triplet per line. Values should be between 0.0 and 1.0. """ self.source = source... | 24ed2bf2192a7e9558edc823cd2e9a65511bb35c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/508/24ed2bf2192a7e9558edc823cd2e9a65511bb35c/mplutil.py | |
def uniconvw_run(): file=None icon=None _pkgdir = __path__[0] app_ver = string.strip(open(os.path.join(_pkgdir, 'VERSION')).read()) | a93cda7fa7405e3cfafbc93a7d6b81bd44eaa3a7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3125/a93cda7fa7405e3cfafbc93a7d6b81bd44eaa3a7/__init__.py | ||
def uniconvw_run(): file=None icon=None _pkgdir = __path__[0] app_ver = string.strip(open(os.path.join(_pkgdir, 'VERSION')).read()) | a93cda7fa7405e3cfafbc93a7d6b81bd44eaa3a7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3125/a93cda7fa7405e3cfafbc93a7d6b81bd44eaa3a7/__init__.py | ||
RE_BEGIN_HASH = re.compile(r'^[ \t]* | RE_BEGIN_HASH = re.compile(r'^[ \t]* | def clean_code(self, text): # remove XML comments text = re.sub(self.RE_XMLCOMMENT, '', text) # remove preprocessor directions text = re.sub(self.RE_PREPROCESSOR, '', text) # substitute multilines with one line text = re.sub(self.RE_MULTILINES, "", text) return text | ee0cba7ed8caf8e8e5efd7b1ddbd40e8fef9fa4b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1500/ee0cba7ed8caf8e8e5efd7b1ddbd40e8fef9fa4b/fortrandoc.py |
f.writelines([self.cmd('sectionerrors'), '\n\n']) | def write_function(self, fn, f): f.writelines([ r'\begin{functiondef}{', self.cmd('returnvalue', fn.return_value), ' ', self.cmd('function', fn.name), '(', ]) if fn.parameters: params = ", ".join(map(lambda s: self.cmd('textbf', s), fn.parameters)) f.writelines([params]) f.writelines([')}\n\n']) | c7a600240f7814227a1cc8b0ed48cbb032734d53 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1500/c7a600240f7814227a1cc8b0ed48cbb032734d53/fortrandoc.py | |
else: f.writelines([self.begin('desc'), 'Error codes missing.\n', self.end('desc')]) | def write_function(self, fn, f): f.writelines([ r'\begin{functiondef}{', self.cmd('returnvalue', fn.return_value), ' ', self.cmd('function', fn.name), '(', ]) if fn.parameters: params = ", ".join(map(lambda s: self.cmd('textbf', s), fn.parameters)) f.writelines([params]) f.writelines([')}\n\n']) | c7a600240f7814227a1cc8b0ed48cbb032734d53 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1500/c7a600240f7814227a1cc8b0ed48cbb032734d53/fortrandoc.py | |
for (error, desc) in sub.errors: | for (error, desc) in fn.errors: | def write_function(self, fn, f): lines = [ '<div class="function_definition">\n', '<a name="function_%s">' % fn.name, '<h3><span class="type">%s</span> <span class="keyword">function</span> <span class="subroutine">%s</span>(<div class="parameters">' % (fn.return_value, fn.name) ] f.writelines(lines) subs = [] for var ... | 287d34b59e696f93858fc8cefd2e41fb3d1bf268 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1500/287d34b59e696f93858fc8cefd2e41fb3d1bf268/fortrandoc.py |
elif name == 'constants': | elif name == 'constants' or name == 'constantblock': | def interpret(self, nodes): "Extract information from the nodes." | 287d34b59e696f93858fc8cefd2e41fb3d1bf268 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1500/287d34b59e696f93858fc8cefd2e41fb3d1bf268/fortrandoc.py |
def extract_subroutine(self, node, text): "Extract subroutine from source code." | 287d34b59e696f93858fc8cefd2e41fb3d1bf268 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1500/287d34b59e696f93858fc8cefd2e41fb3d1bf268/fortrandoc.py | ||
FUNCTION = re.compile(r"\A\s*?(?P<retval>.+?)\s*?function\s+?(?P<name>.+)\s*?\((?P<params>.*)\)\s*?\n") | FUNCTION = re.compile(r"\A\s*?(?P<retval>.+?)\s*?function\s+(?P<name>\w+)\s*\((?P<params>[^\)]*)\)\s*?") | def extract_subroutine(self, node, text): "Extract subroutine from source code." | 287d34b59e696f93858fc8cefd2e41fb3d1bf268 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1500/287d34b59e696f93858fc8cefd2e41fb3d1bf268/fortrandoc.py |
self.current_comment = None | self.current_comment = '' | def extract_variables(self, text, l): "Extract variable and group information from source code." | 287d34b59e696f93858fc8cefd2e41fb3d1bf268 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1500/287d34b59e696f93858fc8cefd2e41fb3d1bf268/fortrandoc.py |
self.current_comment = None | self.current_comment = '' | def end_group(scanner, token): if not self.active_group.variables: error(15, 'No variable found in group: %s' % self.active_group.description) self.active_group = None self.current_comment = None | 287d34b59e696f93858fc8cefd2e41fb3d1bf268 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1500/287d34b59e696f93858fc8cefd2e41fb3d1bf268/fortrandoc.py |
self.current_comment = token.strip() | self.current_comment += token.strip() | def commentblock(scanner, token): self.current_comment = token.strip() | 287d34b59e696f93858fc8cefd2e41fb3d1bf268 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1500/287d34b59e696f93858fc8cefd2e41fb3d1bf268/fortrandoc.py |
self.current_comment = None | self.current_comment = '' | def blank_lines(scanner, token): self.current_comment = None | 287d34b59e696f93858fc8cefd2e41fb3d1bf268 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1500/287d34b59e696f93858fc8cefd2e41fb3d1bf268/fortrandoc.py |
self.current_comment = None | self.current_comment = '' def dump(scanner, token): print "[%s]\n" % token, | def variable_definition(scanner, token): match = re.search(self.VARIABLE, token) if match: m = match.groups() vartype = m[1].split(",")[0].strip() if self.current_comment: self.current_comment = self.clean_description(self.current_comment) v = Variable(m[2], vartype, self.current_comment) else: v = Variable(m[2], varty... | 287d34b59e696f93858fc8cefd2e41fb3d1bf268 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1500/287d34b59e696f93858fc8cefd2e41fb3d1bf268/fortrandoc.py |
(r'(?m)^[^!\n]*?::.*?$', variable_definition), | (r'(?m)[^\n!]*::[^\n]*\n', variable_definition), | def variable_definition(scanner, token): match = re.search(self.VARIABLE, token) if match: m = match.groups() vartype = m[1].split(",")[0].strip() if self.current_comment: self.current_comment = self.clean_description(self.current_comment) v = Variable(m[2], vartype, self.current_comment) else: v = Variable(m[2], varty... | 287d34b59e696f93858fc8cefd2e41fb3d1bf268 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1500/287d34b59e696f93858fc8cefd2e41fb3d1bf268/fortrandoc.py |
(r'<code>.+?</code>', lambda s, t: t.replace('<verb>','\\begin{verbatim}').replace('</verb>', '\\end{verbatim}')), | (r'<code>.+?</code>', lambda s, t: t.replace('<code>','\\begin{verbatim}').replace('</code>', '\\end{verbatim}')), (r'<bf>.+?</bf>', lambda s, t: t.replace('<bf>','\\textbf{').replace('</bf>', '}')), (r'<ul>.+?</ul>', lambda s, t: t.replace('<ul>','\\underline{').replace('</ul>', '}')), (r'<it>.+?</it>', lambda s, t: t... | def write_interface(self, interface, description, f): f.writelines([self.cmd('interface', interface), '\n']) f.writelines([self.env('desc', description), '\n']) | 193cf4facfdd52529e4264af9402bcc38e502a1f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1500/193cf4facfdd52529e4264af9402bcc38e502a1f/fortrandoc.py |
f.writelines([self.cmd('sectionerrors'), '\n\n']) | def write_subroutine(self, sub, f): f.writelines([ r'\begin{subroutinedef}{', self.cmd('subroutine', sub.name), '(', self.cmd('sloppy') ]) if sub.parameters: params = ", ".join(map(lambda s: self.cmd('textbf', s), sub.parameters)) f.writelines([params]) f.writelines([')}\n\n']) | e8fbebc0714f082be31b3fa3ebda93ab4d89b701 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1500/e8fbebc0714f082be31b3fa3ebda93ab4d89b701/fortrandoc.py | |
else: f.writelines([self.begin('desc'), 'Error codes missing.\n', self.end('desc')]) | def write_subroutine(self, sub, f): f.writelines([ r'\begin{subroutinedef}{', self.cmd('subroutine', sub.name), '(', self.cmd('sloppy') ]) if sub.parameters: params = ", ".join(map(lambda s: self.cmd('textbf', s), sub.parameters)) f.writelines([params]) f.writelines([')}\n\n']) | e8fbebc0714f082be31b3fa3ebda93ab4d89b701 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1500/e8fbebc0714f082be31b3fa3ebda93ab4d89b701/fortrandoc.py | |
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 |
outfile = infile + '.graphsize2' | outfile = infile + '.graphsize' | def main(): global done, worker_count done = False worker_count = 0 infile = sys.argv[1] outfile = infile + '.graphsize2' print 'creating ht' ht = khmer.new_hashbits(K, HASHTABLE_SIZE, 1) print 'eating fa', infile total_reads, n_consumed = ht.consume_fasta(infile) outfp = open(outfile, 'w') inqueue = Queue.Queue(50)... | 760dd0f6dd5be7a30634c9ff505488f45fa9b124 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11148/760dd0f6dd5be7a30634c9ff505488f45fa9b124/graph-size.py |
(a, b, c) = ht.divide_tags_into_subsets(1) | (a, b, _, _, c) = ht.divide_tags_into_subsets(1) | def test_3_merge_013(self): ht = khmer.new_hashbits(20, 4**14+1) filename = os.path.join(thisdir, 'test-graph2.fa') | 2c4f9e27acd168e5f22d83058231ab8e29888cdc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11148/2c4f9e27acd168e5f22d83058231ab8e29888cdc/test_subset_graph.py |
(a, b, c) = ht.divide_tags_into_subsets(1) | (a, b, _, _, c) = ht.divide_tags_into_subsets(1) | def test_3_merge_023(self): ht = khmer.new_hashbits(20, 4**14+1) filename = os.path.join(thisdir, 'test-graph2.fa') | 2c4f9e27acd168e5f22d83058231ab8e29888cdc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11148/2c4f9e27acd168e5f22d83058231ab8e29888cdc/test_subset_graph.py |
assert len(divvy) == 2 x = ht.do_subset_partition(divvy[0], divvy[1]) ht.merge_subset(x) y = ht.do_subset_partition(divvy[0], 0) | assert len(divvy) == 4 x = ht.do_subset_partition(divvy[0], divvy[2]) ht.merge_subset(x) y = ht.do_subset_partition(divvy[2], 0) | def test_random_20_a_succ(self): ht = khmer.new_hashbits(20, 4**13+1) filename = os.path.join(thisdir, 'test-data/random-20-a.fa') outfile = filename + '.out' | 2c4f9e27acd168e5f22d83058231ab8e29888cdc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11148/2c4f9e27acd168e5f22d83058231ab8e29888cdc/test_subset_graph.py |
assert len(divvy) == 2 x = ht.do_subset_partition(divvy[0], divvy[1]) y = ht.do_subset_partition(divvy[1], 0) | assert len(divvy) == 4 x = ht.do_subset_partition(divvy[0], divvy[2]) y = ht.do_subset_partition(divvy[2], 0) | def test_random_20_a_succ_II(self): ht = khmer.new_hashbits(20, 4**13+1) filename = os.path.join(thisdir, 'test-data/random-20-a.fa') outfile = filename + '.out' | 2c4f9e27acd168e5f22d83058231ab8e29888cdc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11148/2c4f9e27acd168e5f22d83058231ab8e29888cdc/test_subset_graph.py |
assert len(divvy) == 2, len(divvy) x = ht.do_subset_partition(divvy[0], divvy[1]) y = ht.do_subset_partition(divvy[1], 0) | assert len(divvy) == 4, len(divvy) x = ht.do_subset_partition(divvy[0], divvy[2]) y = ht.do_subset_partition(divvy[2], 0) | def test_random_20_a_succ_III(self): ht = khmer.new_hashbits(20, 4**13+1) filename = os.path.join(thisdir, 'test-data/random-20-a.fa') outfile = filename + '.out' | 2c4f9e27acd168e5f22d83058231ab8e29888cdc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11148/2c4f9e27acd168e5f22d83058231ab8e29888cdc/test_subset_graph.py |
(a, b, c) = divvy | print divvy (a, _, b, _, c) = divvy | def test_save_load_merge(self): ht = khmer.new_hashbits(20, 4**14+1) filename = os.path.join(thisdir, 'test-graph2.fa') | 2c4f9e27acd168e5f22d83058231ab8e29888cdc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11148/2c4f9e27acd168e5f22d83058231ab8e29888cdc/test_subset_graph.py |
assert n == (103, 1, 0), n | assert n == (102, 1, 0), n | def test_complex6_32_12(self): ht = khmer.new_hashtable(20, 4**12+1) | 59baa7d72846b63e34acf7b9cbb7e79b6f89b101 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11148/59baa7d72846b63e34acf7b9cbb7e79b6f89b101/test_graph.py |
assert n == 106, n | assert n == 103, n | def test_complex6_32_12(self): ht = khmer.new_hashtable(20, 4**12+1) | f4261d43b634eec486aea14e928dc1b0bfd8ac4f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11148/f4261d43b634eec486aea14e928dc1b0bfd8ac4f/test_graph.py |
ht = khmer.new_hashtable(K, 1) | ht = khmer.new_hashbits(K, 1, 1) | def main(dir1, dir2, n_threads): # detect all of the relevant partitionmap files subset_filenames = glob.glob(os.path.join(dir1, '*.pmap')) # create empty hashtable structure ht = khmer.new_hashtable(K, 1) # put jobs on queue merge_queue = Queue.Queue() for filename in subset_filenames: merge_queue.put((ht, filename)... | eff72e89775da8c1e9b1e4f775912971d016875f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11148/eff72e89775da8c1e9b1e4f775912971d016875f/do-subset-merge.py |
print 'gorup_d', partition_id, group_n | print 'group_d', partition_id, group_n | def read_partition_file(fp): for n, line in enumerate(fp): if n % 2 == 0: surrendered = False name, partition_id = line[1:].strip().rsplit('\t', 1) if '*' in partition_id: partition_id = int(partition_id[:-1]) surrendered = True else: partition_id = int(partition_id) else: sequence = line.strip() yield name, partitio... | 9c6e3737a226aeb71150d38f537718e5a42b42a9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11148/9c6e3737a226aeb71150d38f537718e5a42b42a9/extract-partitions.py |
ht = khmer.new_hashtable(K, 1) | def main(dir1, dir2, n_threads): # detect all of the relevant partitionmap files subset_filenames = glob.glob(os.path.join(dir1, '*.pmap')) # put on queue merge_queue = Queue.Queue() for filename in subset_filenames: merge_queue.put((ht, filename)) print 'starting threads' threads = [] for n in range(n_threads): t =... | 06f7f78df7adf2e4f73d66c405637189118ff6da /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11148/06f7f78df7adf2e4f73d66c405637189118ff6da/do-subset-merge.py | |
assert len(divvy) == 2 | assert len(divvy) == 2, len(divvy) | def test_random_20_a_succ_III(self): ht = khmer.new_hashbits(20, 4**13+1) filename = os.path.join(thisdir, 'test-data/random-20-a.fa') outfile = filename + '.out' | 3749dbc57b09888c4a058f1d60ad190792428f55 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11148/3749dbc57b09888c4a058f1d60ad190792428f55/test_subset_graph.py |
assert n_unassigned == 1, n_unassigned assert n_surrendered == 16, n_surrendered | assert n_unassigned == 2, n_unassigned assert n_surrendered == 15, n_surrendered | def test_surrendered(self): ht = khmer.new_hashtable(32, 4**15+1) | a930b3146550406c86b1b458b15a209289b36960 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11148/a930b3146550406c86b1b458b15a209289b36960/test_graph.py |
name, partition_id = line[1:].strip().split('\t') | name, partition_id = line[1:].strip().rsplit('\t', 1) | def read_partition_file(fp): for n, line in enumerate(fp): if n % 2 == 0: surrendered = False name, partition_id = line[1:].strip().split('\t') if '*' in partition_id: partition_id = int(partition_id[:-1]) surrendered = True else: partition_id = int(partition_id) else: sequence = line.strip() yield name, partition_id... | 0ea508017a97148ded8da4acf8783b12a7c031a4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11148/0ea508017a97148ded8da4acf8783b12a7c031a4/extract-partitions.py |
partition = int(record['name'].split('\t')[1].rstrip('*')) | partition = int(record['name'].rsplit('\t', 1)[1].rstrip('*')) | def read_partition_file(fp): for n, line in enumerate(fp): if n % 2 == 0: surrendered = False name, partition_id = line[1:].strip().split('\t') if '*' in partition_id: partition_id = int(partition_id[:-1]) surrendered = True else: partition_id = int(partition_id) else: sequence = line.strip() yield name, partition_id... | 0ea508017a97148ded8da4acf8783b12a7c031a4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11148/0ea508017a97148ded8da4acf8783b12a7c031a4/extract-partitions.py |
partition = int(record['name'].split('\t')[1].rstrip('*')) | partition = int(record['name'].rsplit('\t', 1)[1].rstrip('*')) | def read_partition_file(fp): for n, line in enumerate(fp): if n % 2 == 0: surrendered = False name, partition_id = line[1:].strip().split('\t') if '*' in partition_id: partition_id = int(partition_id[:-1]) surrendered = True else: partition_id = int(partition_id) else: sequence = line.strip() yield name, partition_id... | 0ea508017a97148ded8da4acf8783b12a7c031a4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11148/0ea508017a97148ded8da4acf8783b12a7c031a4/extract-partitions.py |
del count[0] | if 0 in count: del count[0] | def read_partition_file(fp): for n, line in enumerate(fp): if n % 2 == 0: surrendered = False name, partition_id = line[1:].strip().split('\t') if '*' in partition_id: partition_id = int(partition_id[:-1]) surrendered = True else: partition_id = int(partition_id) else: sequence = line.strip() yield name, partition_id... | 0ea508017a97148ded8da4acf8783b12a7c031a4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11148/0ea508017a97148ded8da4acf8783b12a7c031a4/extract-partitions.py |
def threaded_calc(ht, filename, start, stop): x = ht.do_subset_partition(filename, start, stop) | def threaded_calc(ht, start, stop): x = ht.do_subset_partition(start, stop) | def threaded_calc(ht, filename, start, stop): x = ht.do_subset_partition(filename, start, stop) print 'done!' results.append(x) | cc452556e825fd5344213fdb08dacfe6b19b284a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11148/cc452556e825fd5344213fdb08dacfe6b19b284a/do-th-subset-calc.py |
def threaded_calc(ht, filename, start, stop): x = ht.do_subset_partition(filename, start, stop) print 'done!' results.append(x) | cc452556e825fd5344213fdb08dacfe6b19b284a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11148/cc452556e825fd5344213fdb08dacfe6b19b284a/do-th-subset-calc.py | ||
for i in range(N_THREADS - 1): start = subset_size * i end = start + subset_size t = threading.Thread(target=threaded_calc, args=(ht, FILENAME, start, end)) | for i in range(n_subsets): start = divvy[i] end = divvy[i+1] t = threading.Thread(target=threaded_calc, args=(ht, start, end)) | def threaded_calc(ht, filename, start, stop): x = ht.do_subset_partition(filename, start, stop) print 'done!' results.append(x) | cc452556e825fd5344213fdb08dacfe6b19b284a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11148/cc452556e825fd5344213fdb08dacfe6b19b284a/do-th-subset-calc.py |
start = subset_size * (N_THREADS - 1) end = total_reads t = threading.Thread(target=threaded_calc, args=(ht, FILENAME, start, end)) threads.append(t) t.start() | def threaded_calc(ht, filename, start, stop): x = ht.do_subset_partition(filename, start, stop) print 'done!' results.append(x) | cc452556e825fd5344213fdb08dacfe6b19b284a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11148/cc452556e825fd5344213fdb08dacfe6b19b284a/do-th-subset-calc.py | |
n = ht.do_partition2(filename, "") | n = ht.do_partition3(filename, "") | def test_simple_20_12(self): ht = khmer.new_hashtable(20, 4**12+1) | 7a5d6f6a5188c5b939b268bf28a0d3c801663adb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11148/7a5d6f6a5188c5b939b268bf28a0d3c801663adb/test_graph.py |
n = ht.do_partition2(filename, "") | n = ht.do_partition3(filename, "") | def test_simple_30_12(self): ht = khmer.new_hashtable(32, 4**12+1) | 7a5d6f6a5188c5b939b268bf28a0d3c801663adb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11148/7a5d6f6a5188c5b939b268bf28a0d3c801663adb/test_graph.py |
n = ht.do_partition2(filename, "") | n = ht.do_partition3(filename, "") | def test_merge_20_12(self): ht = khmer.new_hashtable(20, 4**12+1) | 7a5d6f6a5188c5b939b268bf28a0d3c801663adb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11148/7a5d6f6a5188c5b939b268bf28a0d3c801663adb/test_graph.py |
n = ht.do_partition2(filename, "") | n = ht.do_partition3(filename, "") | def test_merge_32_12(self): ht = khmer.new_hashtable(32, 4**12+1) | 7a5d6f6a5188c5b939b268bf28a0d3c801663adb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11148/7a5d6f6a5188c5b939b268bf28a0d3c801663adb/test_graph.py |
n = ht.do_partition2(filename, "") | n = ht.do_partition3(filename, "") | def test_complex_20_12(self): ht = khmer.new_hashtable(20, 4**12+1) | 7a5d6f6a5188c5b939b268bf28a0d3c801663adb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11148/7a5d6f6a5188c5b939b268bf28a0d3c801663adb/test_graph.py |
n = ht.do_partition2(filename, "") | n = ht.do_partition3(filename, "") | def test_complex_31_12(self): ht = khmer.new_hashtable(31, 4**12+1) | 7a5d6f6a5188c5b939b268bf28a0d3c801663adb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11148/7a5d6f6a5188c5b939b268bf28a0d3c801663adb/test_graph.py |
n = ht.do_partition2(filename, "") | n = ht.do_partition3(filename, "") | def test_complex_32_12(self): ht = khmer.new_hashtable(32, 4**12+1) | 7a5d6f6a5188c5b939b268bf28a0d3c801663adb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11148/7a5d6f6a5188c5b939b268bf28a0d3c801663adb/test_graph.py |
basename = os.path.basename(filename) | basename = os.path.basename(filename) | def main(filename): basename = os.path.basename(filename) # populate the hash table and tag set ht.consume_fasta_and_tag(filename, callback) | 6445d513aff8a6a3ce836d4610e82cdd8316b62c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11148/6445d513aff8a6a3ce836d4610e82cdd8316b62c/get-occupancy2.py |
ht.consume_fasta_and_tag(filename, callback) | ht.consume_fasta(filename, 0, 0, None, True, callback) | def main(filename): basename = os.path.basename(filename) # populate the hash table and tag set ht.consume_fasta_and_tag(filename, callback) | 6445d513aff8a6a3ce836d4610e82cdd8316b62c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11148/6445d513aff8a6a3ce836d4610e82cdd8316b62c/get-occupancy2.py |
main(sys.argv[1]) | main(sys.argv[1]) | def main(filename): basename = os.path.basename(filename) # populate the hash table and tag set ht.consume_fasta_and_tag(filename, callback) | 6445d513aff8a6a3ce836d4610e82cdd8316b62c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11148/6445d513aff8a6a3ce836d4610e82cdd8316b62c/get-occupancy2.py |
'size': number_to_human_size(build['size']), | 'size': format_byte_size(build['size']), | def update_params(self, d): super(SourceDownloadsWidget, self).update_params(d) sources = [] releases = [] dist_tags = {} | f5b8611e785fc5e833d2b257dd05231893aa71b5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12732/f5b8611e785fc5e833d2b257dd05231893aa71b5/downloads.py |
redirect('/', anchor='/'.join(args), params=kwds) | url = pylons.url('/', anchor='/'.join(args), **kwds) if url.startswith('/community'): url = url[10:] redirect(url) | def default(self, *args, **kwds): identity = request.environ.get('repoze.who.identity') if identity: csrf = identity.get('_csrf_token') if csrf: kwds['_csrf_token'] = csrf | 76e5e8ed78d05720ee24cf4589e1336defca0abe /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12732/76e5e8ed78d05720ee24cf4589e1336defca0abe/root.py |
def default(self, *args, **kwds): | def _default(self, *args, **kwds): | def default(self, *args, **kwds): identity = request.environ.get('repoze.who.identity') if identity: csrf = identity.get('_csrf_token') if csrf: kwds['_csrf_token'] = csrf | 0ebabdf2fee62deeb3ba63418f6fbd22f93c08dd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12732/0ebabdf2fee62deeb3ba63418f6fbd22f93c08dd/root.py |
url = pylons.url('/', anchor='/'.join(args), **kwds) if url.startswith('/community'): url = url[10:] | anchor='/'.join(args) if anchor: kwds['anchor'] = anchor | def default(self, *args, **kwds): identity = request.environ.get('repoze.who.identity') if identity: csrf = identity.get('_csrf_token') if csrf: kwds['_csrf_token'] = csrf | 0ebabdf2fee62deeb3ba63418f6fbd22f93c08dd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12732/0ebabdf2fee62deeb3ba63418f6fbd22f93c08dd/root.py |
redirect(url) | redirect(url, **kwds) | def default(self, *args, **kwds): identity = request.environ.get('repoze.who.identity') if identity: csrf = identity.get('_csrf_token') if csrf: kwds['_csrf_token'] = csrf | 0ebabdf2fee62deeb3ba63418f6fbd22f93c08dd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12732/0ebabdf2fee62deeb3ba63418f6fbd22f93c08dd/root.py |
def changed_saved(self, current, previous): if current is None: | def changed_saved(self): items = self.saved_items.selectedItems() if len(items) == 0: | def changed_saved(self, current, previous): if current is None: return d = current.data(QtCore.Qt.UserRole).toMap() username = d[QtCore.QString('username')].toString() password = d[QtCore.QString('password')].toString() host = d[QtCore.QString('host')].toString() port = d[QtCore.QString('port')].toString() self.usernam... | 8ff643f3c3cc95b3308c8ec93abb975815ecf8cc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13269/8ff643f3c3cc95b3308c8ec93abb975815ecf8cc/pytty.py |
print item.text() | def remove_entry(self): items = self.saved_items.selectedItems() for item in items: print item.text() config = SafeConfig(os.path.join(sys.path[0], 'saved.ini')) config.remove_section(str(item.text())) config.write() self.load_saved_items() | 8ff643f3c3cc95b3308c8ec93abb975815ecf8cc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13269/8ff643f3c3cc95b3308c8ec93abb975815ecf8cc/pytty.py | |
self.host_edit.textChanged.connect(self.clear_saved_selection) | self.host_edit.textEdited.connect(self.clear_saved_selection) | def show_connection_page(self): page_hlayout = QtGui.QHBoxLayout() page_vlayout = QtGui.QVBoxLayout() page_layout = QtGui.QGridLayout() new_group = QtGui.QGroupBox("New Connection") layout = QtGui.QFormLayout() | 8ff643f3c3cc95b3308c8ec93abb975815ecf8cc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13269/8ff643f3c3cc95b3308c8ec93abb975815ecf8cc/pytty.py |
self.port_edit.textChanged.connect(self.clear_saved_selection) | self.port_edit.textEdited.connect(self.clear_saved_selection) | def show_connection_page(self): page_hlayout = QtGui.QHBoxLayout() page_vlayout = QtGui.QVBoxLayout() page_layout = QtGui.QGridLayout() new_group = QtGui.QGroupBox("New Connection") layout = QtGui.QFormLayout() | 8ff643f3c3cc95b3308c8ec93abb975815ecf8cc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13269/8ff643f3c3cc95b3308c8ec93abb975815ecf8cc/pytty.py |
self.username_edit.textChanged.connect(self.clear_saved_selection) | self.username_edit.textEdited.connect(self.clear_saved_selection) | def show_connection_page(self): page_hlayout = QtGui.QHBoxLayout() page_vlayout = QtGui.QVBoxLayout() page_layout = QtGui.QGridLayout() new_group = QtGui.QGroupBox("New Connection") layout = QtGui.QFormLayout() | 8ff643f3c3cc95b3308c8ec93abb975815ecf8cc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13269/8ff643f3c3cc95b3308c8ec93abb975815ecf8cc/pytty.py |
self.password_edit.textChanged.connect(self.clear_saved_selection) | self.password_edit.textEdited.connect(self.clear_saved_selection) | def show_connection_page(self): page_hlayout = QtGui.QHBoxLayout() page_vlayout = QtGui.QVBoxLayout() page_layout = QtGui.QGridLayout() new_group = QtGui.QGroupBox("New Connection") layout = QtGui.QFormLayout() | 8ff643f3c3cc95b3308c8ec93abb975815ecf8cc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13269/8ff643f3c3cc95b3308c8ec93abb975815ecf8cc/pytty.py |
self.saved_items.currentItemChanged.connect(self.changed_saved) | self.saved_items.itemSelectionChanged.connect(self.changed_saved) self.saved_items.itemDoubleClicked.connect(self.connect) | def show_connection_page(self): page_hlayout = QtGui.QHBoxLayout() page_vlayout = QtGui.QVBoxLayout() page_layout = QtGui.QGridLayout() new_group = QtGui.QGroupBox("New Connection") layout = QtGui.QFormLayout() | 8ff643f3c3cc95b3308c8ec93abb975815ecf8cc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13269/8ff643f3c3cc95b3308c8ec93abb975815ecf8cc/pytty.py |
def __init__(self, terminal): | def __init__(self, terminal, index): | def __init__(self, terminal): QtCore.QThread.__init__(self) self.terminal = terminal | 8ff643f3c3cc95b3308c8ec93abb975815ecf8cc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13269/8ff643f3c3cc95b3308c8ec93abb975815ecf8cc/pytty.py |
th = ConnectionThread(term) | th = ConnectionThread(term, idx) | def run(self): self.terminal.connect() | 8ff643f3c3cc95b3308c8ec93abb975815ecf8cc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13269/8ff643f3c3cc95b3308c8ec93abb975815ecf8cc/pytty.py |
def connection_finished(): term = th.terminal if term.channel.is_connected(): self.tabs.removeTab(idx) self.tabs.add_new_tab(term, index=idx) else: if term.channel.authentication_error: self.status_label.setText("Authentication Error.") else: self.status_label.setText("Unable to connect.") self.login_button.setDisabled... | 8ff643f3c3cc95b3308c8ec93abb975815ecf8cc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13269/8ff643f3c3cc95b3308c8ec93abb975815ecf8cc/pytty.py | ||
def connection_finished(): term = th.terminal if term.channel.is_connected(): self.tabs.removeTab(idx) self.tabs.add_new_tab(term, index=idx) else: if term.channel.authentication_error: self.status_label.setText("Authentication Error.") else: self.status_label.setText("Unable to connect.") self.login_button.setDisabled... | 8ff643f3c3cc95b3308c8ec93abb975815ecf8cc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13269/8ff643f3c3cc95b3308c8ec93abb975815ecf8cc/pytty.py | ||
if widget == sender: | if widget == sender: | def close_tab(self): sender = self.sender() for idx in range(0, self.tabs.count()): widget = self.tabs.widget(idx) if widget == sender: #or widget is None: self.tabs.close_tab(idx) | 8ff643f3c3cc95b3308c8ec93abb975815ecf8cc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13269/8ff643f3c3cc95b3308c8ec93abb975815ecf8cc/pytty.py |
scroll_bottom = self.get_scroll_bottom() - 1 | scroll_top = self.get_scroll_top() scroll_bottom = self.get_scroll_bottom() | def insert_row(self, num=1): buf = self.get_buffer() (row, col) = self.cursor.get_row_col() new_rows = [TerminalRow(self.width, self) for x in range(0, num)] buf.insert(row, '') buf[row:row + 1] = new_rows self.log.debug("Inserted %s row(s): %s" % (num, len(buf))) | eb395ad9a2761db0588f1339c232928c3c2e4c94 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13269/eb395ad9a2761db0588f1339c232928c3c2e4c94/terminal.py |
self.parent.set_dirty() | repaint_buf = buf[scroll_top - 1:scroll_bottom - 1] for row in repaint_buf: row.set_dirty() | def insert_row(self, num=1): buf = self.get_buffer() (row, col) = self.cursor.get_row_col() new_rows = [TerminalRow(self.width, self) for x in range(0, num)] buf.insert(row, '') buf[row:row + 1] = new_rows self.log.debug("Inserted %s row(s): %s" % (num, len(buf))) | eb395ad9a2761db0588f1339c232928c3c2e4c94 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13269/eb395ad9a2761db0588f1339c232928c3c2e4c94/terminal.py |
for cnt in range(0, times): row = buf.pop(scroll_top - 1) row.reset() buf.insert(scroll_bottom - 1, row) self.parent.set_dirty() self.print_debug() return | first = scroll_top - 1 last = scroll_bottom - 1 rows = [TerminalRow(self.width, self) for x in range(0, times)] del buf[first:first + times] buf.insert(last, '') buf[last:last + 1] = rows repaint_buf = buf[first:last] for row in repaint_buf: row.set_dirty() return | def scroll(self, times=1): self.log.debug("screen scroll") if self.alternate_active: scroll_top = self.get_scroll_top() scroll_bottom = self.get_scroll_bottom() buf = self.get_buffer() for cnt in range(0, times): row = buf.pop(scroll_top - 1) row.reset() buf.insert(scroll_bottom - 1, row) self.parent.set_dirty() self.p... | eb395ad9a2761db0588f1339c232928c3c2e4c94 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13269/eb395ad9a2761db0588f1339c232928c3c2e4c94/terminal.py |
def scroll(self, times=1): self.log.debug("screen scroll") if self.alternate_active: scroll_top = self.get_scroll_top() scroll_bottom = self.get_scroll_bottom() buf = self.get_buffer() for cnt in range(0, times): row = buf.pop(scroll_top - 1) row.reset() buf.insert(scroll_bottom - 1, row) self.parent.set_dirty() self.p... | eb395ad9a2761db0588f1339c232928c3c2e4c94 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13269/eb395ad9a2761db0588f1339c232928c3c2e4c94/terminal.py | ||
try: interface = autobus.lookup_interface(message["interface_name"]) function = interface.lookup_function(message["function"]) | interface_name = message["interface_name"] function_name = message["function"] print ("Attempting to dispatch function call from " + sender + " to interface " + interface_name + " and function " + function_name) try: interface = autobus.lookup_interface(interface_name) function = interface.lookup_function(function_name... | def process_call_function_command(message, sender, connection): try: interface = autobus.lookup_interface(message["interface_name"]) function = interface.lookup_function(message["function"]) except (autobus.NoSuchInterfaceException, autobus.NoSuchFunctionException) as e: connection.send_error(message, text=str(e)) retu... | ff95f68e1a52ea6b848a35ec23a0adb8dc995aaa /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8199/ff95f68e1a52ea6b848a35ec23a0adb8dc995aaa/processors.py |
repeat = (address == last_plc_address and (last_plc_time + PLC_DELAY) > now) | repeat = (last_plc_time + PLC_DELAY) > now | def do_GET(self): global last_plc_time global last_plc_address global last_rf_time global last_rf_address path = self.path if "?" not in path: # Serve the script page print "Serving script page for url " + path self.send_response(200) self.send_header("Content-Type", "text/html") self.end_headers() with open("src/activ... | 0308ccc9978cf272a44d7ebe62b4ac6d2f63e867 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8199/0308ccc9978cf272a44d7ebe62b4ac6d2f63e867/__init__.py |
last_plc_address = address | def do_GET(self): global last_plc_time global last_plc_address global last_rf_time global last_rf_address path = self.path if "?" not in path: # Serve the script page print "Serving script page for url " + path self.send_response(200) self.send_header("Content-Type", "text/html") self.end_headers() with open("src/activ... | 0308ccc9978cf272a44d7ebe62b4ac6d2f63e867 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8199/0308ccc9978cf272a44d7ebe62b4ac6d2f63e867/__init__.py | |
function(*args, **kwargs) | return function(*args, **kwargs) | def wrapper(*args, **kwargs): with lock: function(*args, **kwargs) | 8a882154224fd12aa063fe17ed18d4ccffcfc10e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8199/8a882154224fd12aa063fe17ed18d4ccffcfc10e/concurrent.py |
return "objects.path like ? escape ?", [self.path.replace("/", "//") + "///%", "/"] | return "objects.path like ? escape ?", [self.path.replace("/", "//") .replace("%", "/%") .replace("_", "/_") + "//%", "/"] | def sql(self): return "objects.path like ? escape ?", [self.path.replace("/", "//") + "///%", "/"] | cbc2de45c0d427f59cfb660ab20c87fe943faec0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8199/cbc2de45c0d427f59cfb660ab20c87fe943faec0/query.py |
raise ResponseException("You can't add an empty quote") | raise FactoidException("You can't add an empty quote") | def addquote(sink, arguments, context): """ Syntax: {addquote|<group>|<quote>} -- Adds a new quote to the specified group. This function then evaluates to the number that the new quote was assigned. Numbering starts at 1 for blank groups. Groups must already be present in the quote system configuration before quotes ca... | 0acdf72276645fd4a862601e936ea9513434c9dd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8199/0acdf72276645fd4a862601e936ea9513434c9dd/quote.py |
<%s@%s> from %s on <font color=" | <%s@%s> from %s on <font color=" | def do_GET(self): path = self.path path_components = path[1:].split("/") if len(path_components) == 1 and path_components[0] == "": path_components = [] if len(path_components) > 0 and path_components[-1] == "": path_components = path_components[:-1] if len(path_components) == 0: self.send_response(200) self.send_heade... | 2a0da4602619ff2bc353adbb74f3b555b537c418 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8199/2a0da4602619ff2bc353adbb74f3b555b537c418/quote.py |
display_type = client.propget("svnweb:display", path).values[0] | display_type = client.propget("svnweb:display", path).values()[0] | def do_GET(self): path = self.path if ".." in path: raise Exception("Path can't contain two dots in a row") print "Initial path: " + path if path == "": path = "/" if path[0] != "/": raise Exception("Path doesn't start with a forward slash. It's " + path) path = root_path + path print "Getting result for path " + path ... | dbae861019ffa7731e99a234c0c50395de1dad92 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8199/dbae861019ffa7731e99a234c0c50395de1dad92/svnweb.py |
mime_type = client.propget("svn:mime-type", path).values[0] | mime_type = client.propget("svn:mime-type", path).values()[0] | def do_GET(self): path = self.path if ".." in path: raise Exception("Path can't contain two dots in a row") print "Initial path: " + path if path == "": path = "/" if path[0] != "/": raise Exception("Path doesn't start with a forward slash. It's " + path) path = root_path + path print "Getting result for path " + path ... | dbae861019ffa7731e99a234c0c50395de1dad92 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8199/dbae861019ffa7731e99a234c0c50395de1dad92/svnweb.py |
to them; see ~config global quote. """ with quote_lock: quotegroup = arguments.resolveString(0) quotetext = arguments.resolveString(1) | to them; see ~config global quote. If the specified quote is empty, a ResponseException will be thrown. """ quotegroup = arguments.resolveString(0) quotetext = arguments.resolveString(1) if quotetext.strip() == "": raise ResponseException("You can't add an empty quote") with quote_lock: | def addquote(sink, arguments, context): """ Syntax: {addquote|<group>|<quote>} -- Adds a new quote to the specified group. This function then evaluates to the number that the new quote was assigned. Numbering starts at 1 for blank groups. Groups must already be present in the quote system configuration before quotes ca... | 07756206b5c131fba5ccbce012a0d3354258af2d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8199/07756206b5c131fba5ccbce012a0d3354258af2d/quote.py |
and self.db is other.db) | and self.db is other.db and self.operation_list is other.operation_list) | def __eq__(self, other): return (isinstance(other, Changeset) and self.path == other.path and self.db is other.db) | db61fa0c7b951f4aa93ab2ac3541caee9c9ae6d0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8199/db61fa0c7b951f4aa93ab2ac3541caee9c9ae6d0/changeset.py |
bus = AutobusConnection(host, port, print_exceptions=True) bus.add_interface(interface_name, RPC()) speech_queue_object = bus.add_object(interface_name, "speech_queue", """ This doesn't work yet. """, {}) bus.start_connecting() | def time_format_weekday_month_day(self, time): """ Returns time_format_weekday(time) + " " + time_format_month_day(time) """ return (self.time_format_weekday(time) + " " + self.time_format_month_day(time)) | f91ea5a996e0f948cfac5211b773083210239180 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8199/f91ea5a996e0f948cfac5211b773083210239180/speakd.py | |
print "" print "Speakd has successfully started up. PID is " + str(os.getpid()) try: while not is_shutting_down: sentence_tuple = get_next_sentence() if sentence_tuple is None: time.sleep(0.5) continue priority, sentence = sentence_tuple print "Something to say: " + str(sentence.components) if sentence.voice is not N... | print "Opening audio device..." def main(): global audio_device global autio_stream global bus global speech_queue_object audio_device = pyaudio.PyAudio() audio_stream = audio_device.open(format=audio_device.get_format_from_width(2), channels=1, rate=44100, output=True, frames_per_buffer=1024) audio_stream.stop_stream... | def sanitize_file(name): return name.replace(".", "").replace("\\", "").replace("/", "") | f91ea5a996e0f948cfac5211b773083210239180 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8199/f91ea5a996e0f948cfac5211b773083210239180/speakd.py |
elif isinstance(item, int): print "Pausing for " + str(item) + " milliseconds" time.sleep((item * 1.0) / 1000.0) print "Flushing bus outbound queue" bus.flush() print "Waiting..." time.sleep(1) print "Closing audio stream" audio_stream.stop_stream() print "Done." except KeyboardInterrupt: print "Interrupted, shutting d... | while data != "": audio_stream.write(data) data = wave_file.readframes(1024) elif isinstance(item, int): print "Pausing for " + str(item) + " milliseconds" time.sleep((item * 1.0) / 1000.0) print "Flushing bus outbound queue" bus.flush() print "Waiting..." time.sleep(1) print "Closing audio stream" audio_stream.stop_st... | def sanitize_file(name): return name.replace(".", "").replace("\\", "").replace("/", "") | f91ea5a996e0f948cfac5211b773083210239180 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8199/f91ea5a996e0f948cfac5211b773083210239180/speakd.py |
if self.receive_queues is None: | if self.receive_queues is None or self.input_thread is None: | def query(self, message, timeout=30): """ Sends the specified message from the server, waiting up to the specified timeout for a response. When a response is received, it is returned. If a response is not received within the specified amount of time, a TimeoutException will be raised. Otherwise, the response sent by th... | 9815ea9bfd6504e0869e3a54189808ac56697ec1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8199/9815ea9bfd6504e0869e3a54189808ac56697ec1/__init__.py |
return PrefixFilter("not", SQLFilter(*self.get_filter_sql())) | query = Query(self.db) query.filters.append(PrefixFilter("not", SQLFilter(*self.get_filter_sql()))) return query | def inverse(self): """ Returns a new query that selects objects only if they would not be selected by this query. If you only want to invert a small part of the overall query, you can do that by constructing everything else in your query, creating a separate query, filtering it by the part you want to invert, invertin... | c03ba0e338c1ff71bd738b67f82151436981a77b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8199/c03ba0e338c1ff71bd738b67f82151436981a77b/query.py |
except KeyError: | except (KeyError, IndexError): | def foreign_get(object, item): if object is None or object is Null: return None try: return foreign_translate(object[item]) except KeyError: return None | 4068f0f2fa9389a194fc3c499922fa6c41cd1e8c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8199/4068f0f2fa9389a194fc3c499922fa6c41cd1e8c/libfact.py |
print "Usage: ./cmeansMultiGPU.py INPUT_FILE NUM_CLUSTERS [THRESHOLD=0.0001] [MIN_ITERS=0] [MAX_ITERS=100] [DEVICE=0] [FUZZINESS=2] [DISTANCE_MEASURE=0] [K1=1.0] [K2=0.01] [K3=1.5] [MEMBER_THRESHOLD=0.05] [TABU_ITER=100] [TABU_TENURE=5] [MDL=0] [CPU_ONLY=0]" | print "Usage: ./cmeansMultiGPU.py INPUT_FILE NUM_CLUSTERS [THRESHOLD=0.0001] [MIN_ITERS=0] [MAX_ITERS=100] [DEVICE=0] [FUZZINESS=2] [DISTANCE_MEASURE=0] [K1=1.0] [K2=0.01] [K3=1.5] [MEMBER_THRESHOLD=0.05] [TABU_ITER=100] [TABU_TENURE=5] [MDL=0] [CPU_ONLY=0] [TRUNCATE=1] [RANDOM_SEED=1]" | def usage(): print "Usage: ./cmeansMultiGPU.py INPUT_FILE NUM_CLUSTERS [THRESHOLD=0.0001] [MIN_ITERS=0] [MAX_ITERS=100] [DEVICE=0] [FUZZINESS=2] [DISTANCE_MEASURE=0] [K1=1.0] [K2=0.01] [K3=1.5] [MEMBER_THRESHOLD=0.05] [TABU_ITER=100] [TABU_TENURE=5] [MDL=0] [CPU_ONLY=0]" print print " INPUT_FILE and NUM_CLUSTERS are re... | 7ef63f0d6acaed783b4943ead1066c04c97005ad /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11171/7ef63f0d6acaed783b4943ead1066c04c97005ad/cmeansMultiGPU.py |
if key in ['K1','K2','K3','MEMBER_THRESHOLD','THRESHOLD']: | if key in ['K1','K2','K3','MEMBER_THRESHOLD','THRESHOLD','FUZZINESS']: | def parseInputArgs(): args = sys.argv num_args = len(args) params = { 'INPUT_FILE' : '', 'NUM_CLUSTERS' : 0, 'THRESHOLD' : 0.0001, 'MIN_ITERS' : 0, 'MAX_ITERS' : 100, 'DEVICE' : 0, 'FUZZINESS' : 2, 'DISTANCE_MEASURE': 0, 'K1': 1.0, 'K2': 0.01, 'K3': 1.5, 'MEMBER_THRESHOLD': 0.05, 'TABU_ITER': 100, 'TABU_TENURE': 5, 'M... | 7ef63f0d6acaed783b4943ead1066c04c97005ad /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11171/7ef63f0d6acaed783b4943ead1066c04c97005ad/cmeansMultiGPU.py |
params['NUM_EVENTS'] -= params['NUM_EVENTS'] % 16 print "%d events removed to ensure memory alignment" % (params['NUM_EVENTS'] % 16) | if params['TRUNCATE']: params['NUM_EVENTS'] -= params['NUM_EVENTS'] % (16*num_gpus) print "%d events removed to ensure memory alignment" % (params['NUM_EVENTS'] % (16*num_gpus)) | def parseInputArgs(): args = sys.argv num_args = len(args) params = { 'INPUT_FILE' : '', 'NUM_CLUSTERS' : 0, 'THRESHOLD' : 0.0001, 'MIN_ITERS' : 0, 'MAX_ITERS' : 100, 'DEVICE' : 0, 'FUZZINESS' : 2, 'DISTANCE_MEASURE': 0, 'K1': 1.0, 'K2': 0.01, 'K3': 1.5, 'MEMBER_THRESHOLD': 0.05, 'TABU_ITER': 100, 'TABU_TENURE': 5, 'M... | 7ef63f0d6acaed783b4943ead1066c04c97005ad /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11171/7ef63f0d6acaed783b4943ead1066c04c97005ad/cmeansMultiGPU.py |
current_path = os.getcwd() print "Current Directory: %s" % current_path print "PROJECT_PATH: %s" % PROJECT_PATH print "Compiling C-means for target file" os.chdir(PROJECT_PATH) | def parseInputArgs(): args = sys.argv num_args = len(args) params = { 'INPUT_FILE' : '', 'NUM_CLUSTERS' : 0, 'THRESHOLD' : 0.0001, 'MIN_ITERS' : 0, 'MAX_ITERS' : 100, 'DEVICE' : 0, 'FUZZINESS' : 2, 'DISTANCE_MEASURE': 0, 'K1': 1.0, 'K2': 0.01, 'K3': 1.5, 'MEMBER_THRESHOLD': 0.05, 'TABU_ITER': 100, 'TABU_TENURE': 5, 'M... | 7ef63f0d6acaed783b4943ead1066c04c97005ad /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11171/7ef63f0d6acaed783b4943ead1066c04c97005ad/cmeansMultiGPU.py | |
print "CWD:",os.getcwd() | def parseInputArgs(): args = sys.argv num_args = len(args) params = { 'INPUT_FILE' : '', 'NUM_CLUSTERS' : 0, 'THRESHOLD' : 0.0001, 'MIN_ITERS' : 0, 'MAX_ITERS' : 100, 'DEVICE' : 0, 'FUZZINESS' : 2, 'DISTANCE_MEASURE': 0, 'K1': 1.0, 'K2': 0.01, 'K3': 1.5, 'MEMBER_THRESHOLD': 0.05, 'TABU_ITER': 100, 'TABU_TENURE': 5, 'M... | 7ef63f0d6acaed783b4943ead1066c04c97005ad /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11171/7ef63f0d6acaed783b4943ead1066c04c97005ad/cmeansMultiGPU.py | |
cmd = '../../bin/linux/release/cmeansMultiGPU "%s"' % params['INPUT_FILE'] | cmd = '%s/../../bin/linux/release/cmeansMultiGPU "%s"' % (PROJECT_PATH,params['INPUT_FILE']) | def parseInputArgs(): args = sys.argv num_args = len(args) params = { 'INPUT_FILE' : '', 'NUM_CLUSTERS' : 0, 'THRESHOLD' : 0.0001, 'MIN_ITERS' : 0, 'MAX_ITERS' : 100, 'DEVICE' : 0, 'FUZZINESS' : 2, 'DISTANCE_MEASURE': 0, 'K1': 1.0, 'K2': 0.01, 'K3': 1.5, 'MEMBER_THRESHOLD': 0.05, 'TABU_ITER': 100, 'TABU_TENURE': 5, 'M... | 7ef63f0d6acaed783b4943ead1066c04c97005ad /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11171/7ef63f0d6acaed783b4943ead1066c04c97005ad/cmeansMultiGPU.py |
if not isinstance(region.parsed, TestCase): return | def evaluate(region, document, globs): try: old_compile = doctest.compile except AttributeError: old_compile = compile doctest.compile = monkey_compile if not isinstance(region.parsed, TestCase): return result = manuel.doctest.DocTestResult() if region.parsed.group: test_name = region.parsed.group else: test_name = o... | 5eb62cd33f167fd4c250f074ee04b668ec0f8948 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9784/5eb62cd33f167fd4c250f074ee04b668ec0f8948/sphinx.py | |
if s[-1] != '\n': | if s == '' or s[-1] != '\n': | def newlineify(s): if s[-1] != '\n': s += '\n' return s | f32339b667b0d23fd16c8082a1e5e1232f3b5bb4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9784/f32339b667b0d23fd16c8082a1e5e1232f3b5bb4/__init__.py |
globs = GlobWrapper(globs) | wrapped_globs = GlobWrapper(globs) | def evaluate_with(self, m, globs): globs = GlobWrapper(globs) for region in list(self): for evaluater in sort_handlers(m.evaluaters): evaluater(region, self, globs) | 36513ccaa72ab9805fc471d7d13d68472e784a89 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9784/36513ccaa72ab9805fc471d7d13d68472e784a89/__init__.py |
evaluater(region, self, globs) | evaluater(region, self, wrapped_globs) globs.update(wrapped_globs) | def evaluate_with(self, m, globs): globs = GlobWrapper(globs) for region in list(self): for evaluater in sort_handlers(m.evaluaters): evaluater(region, self, globs) | 36513ccaa72ab9805fc471d7d13d68472e784a89 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9784/36513ccaa72ab9805fc471d7d13d68472e784a89/__init__.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.