bugged
stringlengths
4
228k
fixed
stringlengths
0
96.3M
__index_level_0__
int64
0
481k
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...
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...
480,500
def uniconvw_run(): file=None icon=None _pkgdir = __path__[0] app_ver = string.strip(open(os.path.join(_pkgdir, 'VERSION')).read())
defuniconvw_run():file=Noneicon=None_pkgdir=__path__[0]app_ver=string.strip(open(os.path.join(_pkgdir,'VERSION')).read())
480,501
def uniconvw_run(): file=None icon=None _pkgdir = __path__[0] app_ver = string.strip(open(os.path.join(_pkgdir, 'VERSION')).read())
def uniconvw_run(): file=None icon=None _pkgdir = __path__[0] app_ver = string.strip(open(os.path.join(_pkgdir, 'VERSION')).read())
480,502
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
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
480,503
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'])
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'])
480,504
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'])
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'])
480,505
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 ...
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 ...
480,506
def interpret(self, nodes): "Extract information from the nodes."
def interpret(self, nodes): "Extract information from the nodes."
480,507
def extract_subroutine(self, node, text): "Extract subroutine from source code."
defextract_subroutine(self,node,text):"Extractsubroutinefromsourcecode."
480,508
def extract_subroutine(self, node, text): "Extract subroutine from source code."
def extract_subroutine(self, node, text): "Extract subroutine from source code."
480,509
def extract_variables(self, text, l): "Extract variable and group information from source code."
def extract_variables(self, text, l): "Extract variable and group information from source code."
480,510
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
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
480,511
def commentblock(scanner, token): self.current_comment = token.strip()
def commentblock(scanner, token): self.current_comment = token.strip()
480,512
def blank_lines(scanner, token): self.current_comment = None
def blank_lines(scanner, token): self.current_comment = None
480,513
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...
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...
480,514
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...
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...
480,515
def write_interface(self, interface, description, f): f.writelines([self.cmd('interface', interface), '\n']) f.writelines([self.env('desc', description), '\n'])
def write_interface(self, interface, description, f): f.writelines([self.cmd('interface', interface), '\n']) f.writelines([self.env('desc', description), '\n'])
480,516
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'])
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'])
480,517
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'])
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'])
480,518
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
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, dist assert dist[1] == 2
480,519
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)...
def main(): global done, worker_count done = False worker_count = 0 infile = sys.argv[1] outfile = infile + '.graphsize' 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) ...
480,520
def test_3_merge_013(self): ht = khmer.new_hashbits(20, 4**14+1) filename = os.path.join(thisdir, 'test-graph2.fa')
def test_3_merge_013(self): ht = khmer.new_hashbits(20, 4**14+1) filename = os.path.join(thisdir, 'test-graph2.fa')
480,521
def test_3_merge_023(self): ht = khmer.new_hashbits(20, 4**14+1) filename = os.path.join(thisdir, 'test-graph2.fa')
def test_3_merge_023(self): ht = khmer.new_hashbits(20, 4**14+1) filename = os.path.join(thisdir, 'test-graph2.fa')
480,522
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'
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'
480,523
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'
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'
480,524
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'
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'
480,525
def test_save_load_merge(self): ht = khmer.new_hashbits(20, 4**14+1) filename = os.path.join(thisdir, 'test-graph2.fa')
def test_save_load_merge(self): ht = khmer.new_hashbits(20, 4**14+1) filename = os.path.join(thisdir, 'test-graph2.fa')
480,526
def test_complex6_32_12(self): ht = khmer.new_hashtable(20, 4**12+1)
def test_complex6_32_12(self): ht = khmer.new_hashtable(20, 4**12+1)
480,527
def test_complex6_32_12(self): ht = khmer.new_hashtable(20, 4**12+1)
def test_complex6_32_12(self): ht = khmer.new_hashtable(20, 4**12+1)
480,528
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)...
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_hashbits(K, 1, 1) # put jobs on queue merge_queue = Queue.Queue() for filename in subset_filenames: merge_queue.put((ht, filenam...
480,529
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...
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...
480,530
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 =...
def ht = khmer.new_hashtable(K, 1) main(dir1, ht = khmer.new_hashtable(K, 1) dir2, ht = khmer.new_hashtable(K, 1) n_threads): ht = khmer.new_hashtable(K, 1) # ht = khmer.new_hashtable(K, 1) detect ht = khmer.new_hashtable(K, 1) all ht = khmer.new_hashtable(K, 1) of ht = khmer.new_hashtable(K, 1) the ht ...
480,531
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'
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'
480,532
def test_surrendered(self): ht = khmer.new_hashtable(32, 4**15+1)
def test_surrendered(self): ht = khmer.new_hashtable(32, 4**15+1)
480,533
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...
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...
480,534
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...
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...
480,535
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...
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...
480,536
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...
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...
480,537
def threaded_calc(ht, filename, start, stop): x = ht.do_subset_partition(filename, start, stop) print 'done!' results.append(x)
def threaded_calc(ht, start, stop): x = ht.do_subset_partition(start, stop) print 'done!' results.append(x)
480,538
def threaded_calc(ht, filename, start, stop): x = ht.do_subset_partition(filename, start, stop) print 'done!' results.append(x)
defthreaded_calc(ht,filename,start,stop):x=ht.do_subset_partition(filename,start,stop)print'done!'results.append(x)
480,539
def threaded_calc(ht, filename, start, stop): x = ht.do_subset_partition(filename, start, stop) print 'done!' results.append(x)
def threaded_calc(ht, filename, start, stop): x = ht.do_subset_partition(filename, start, stop) print 'done!' results.append(x)
480,540
def threaded_calc(ht, filename, start, stop): x = ht.do_subset_partition(filename, start, stop) print 'done!' results.append(x)
def threaded_calc(ht, filename, start, stop): x = ht.do_subset_partition(filename, start, stop) print 'done!' results.append(x)
480,541
def test_simple_20_12(self): ht = khmer.new_hashtable(20, 4**12+1)
def test_simple_20_12(self): ht = khmer.new_hashtable(20, 4**12+1)
480,542
def test_simple_30_12(self): ht = khmer.new_hashtable(32, 4**12+1)
def test_simple_30_12(self): ht = khmer.new_hashtable(32, 4**12+1)
480,543
def test_merge_20_12(self): ht = khmer.new_hashtable(20, 4**12+1)
def test_merge_20_12(self): ht = khmer.new_hashtable(20, 4**12+1)
480,544
def test_merge_32_12(self): ht = khmer.new_hashtable(32, 4**12+1)
def test_merge_32_12(self): ht = khmer.new_hashtable(32, 4**12+1)
480,545
def test_complex_20_12(self): ht = khmer.new_hashtable(20, 4**12+1)
def test_complex_20_12(self): ht = khmer.new_hashtable(20, 4**12+1)
480,546
def test_complex_31_12(self): ht = khmer.new_hashtable(31, 4**12+1)
def test_complex_31_12(self): ht = khmer.new_hashtable(31, 4**12+1)
480,547
def test_complex_32_12(self): ht = khmer.new_hashtable(32, 4**12+1)
def test_complex_32_12(self): ht = khmer.new_hashtable(32, 4**12+1)
480,548
def main(filename): basename = os.path.basename(filename) # populate the hash table and tag set ht.consume_fasta_and_tag(filename, callback)
def main(filename): basename = os.path.basename(filename) # populate the hash table and tag set ht.consume_fasta_and_tag(filename, callback)
480,549
def main(filename): basename = os.path.basename(filename) # populate the hash table and tag set ht.consume_fasta_and_tag(filename, callback)
def main(filename): basename = os.path.basename(filename) # populate the hash table and tag set ht.consume_fasta(filename, 0, 0, None, True, callback)
480,550
def main(filename): basename = os.path.basename(filename) # populate the hash table and tag set ht.consume_fasta_and_tag(filename, callback)
def main(filename): basename = os.path.basename(filename) # populate the hash table and tag set ht.consume_fasta_and_tag(filename, callback)
480,551
def update_params(self, d): super(SourceDownloadsWidget, self).update_params(d) sources = [] releases = [] dist_tags = {}
def update_params(self, d): super(SourceDownloadsWidget, self).update_params(d) sources = [] releases = [] dist_tags = {}
480,552
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
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
480,553
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
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
480,554
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
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
480,555
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
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
480,556
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...
def changed_saved(self): items = self.saved_items.selectedItems() if len(items) == 0: 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')].t...
480,557
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()
def remove_entry(self): items = self.saved_items.selectedItems() for item in items: config = SafeConfig(os.path.join(sys.path[0], 'saved.ini')) config.remove_section(str(item.text())) config.write() self.load_saved_items()
480,558
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()
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()
480,559
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()
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()
480,560
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()
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()
480,561
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()
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()
480,562
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()
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()
480,563
def __init__(self, terminal): QtCore.QThread.__init__(self) self.terminal = terminal
def __init__(self, terminal, index): QtCore.QThread.__init__(self) self.terminal = terminal
480,564
def run(self): self.terminal.connect()
def run(self): self.terminal.connect()
480,565
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...
defconnection_finished():term=th.terminalifterm.channel.is_connected():self.tabs.removeTab(idx)self.tabs.add_new_tab(term,index=idx)else:ifterm.channel.authentication_error:self.status_label.setText("AuthenticationError.")else:self.status_label.setText("Unabletoconnect.")self.login_button.setDisabled(False)deltermself....
480,566
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...
defconnection_finished():term=th.terminalifterm.channel.is_connected():self.tabs.removeTab(idx)self.tabs.add_new_tab(term,index=idx)else:ifterm.channel.authentication_error:self.status_label.setText("AuthenticationError.")else:self.status_label.setText("Unabletoconnect.")self.login_button.setDisabled(False)deltermself....
480,567
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)
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)
480,568
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)))
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)))
480,569
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)))
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)))
480,570
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...
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() first = scroll_top - 1 last = scroll_bottom - 1 rows = [TerminalRow(self.width, self) for x in range(0, times)] del buf[first:first + ...
480,571
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...
defscroll(self,times=1):self.log.debug("screenscroll")ifself.alternate_active:scroll_top=self.get_scroll_top()scroll_bottom=self.get_scroll_bottom()buf=self.get_buffer()forcntinrange(0,times):row=buf.pop(scroll_top-1)row.reset()buf.insert(scroll_bottom-1,row)self.parent.set_dirty()self.print_debug()returnself.base+=tim...
480,572
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...
def process_call_function_command(message, sender, connection): 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(in...
480,573
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...
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...
480,574
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...
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...
480,575
def wrapper(*args, **kwargs): with lock: function(*args, **kwargs)
def wrapper(*args, **kwargs): with lock: function(*args, **kwargs)
480,576
def sql(self): return "objects.path like ? escape ?", [self.path.replace("/", "//") + "///%", "/"]
def sql(self): return "objects.path like ? escape ?", [self.path.replace("/", "//") + "///%", "/"]
480,577
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...
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...
480,578
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...
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...
480,579
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 ...
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 ...
480,580
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 ...
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 ...
480,581
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...
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...
480,582
def __eq__(self, other): return (isinstance(other, Changeset) and self.path == other.path and self.db is other.db)
def __eq__(self, other): return (isinstance(other, Changeset) and self.path == other.path and self.db is other.db)
480,583
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))
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))
480,584
def sanitize_file(name): return name.replace(".", "").replace("\\", "").replace("/", "")
def sanitize_file(name): return name.replace(".", "").replace("\\", "").replace("/", "")
480,585
def sanitize_file(name): return name.replace(".", "").replace("\\", "").replace("/", "")
def sanitize_file(name): return name.replace(".", "").replace("\\", "").replace("/", "")
480,586
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...
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...
480,587
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...
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...
480,588
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
def foreign_get(object, item): if object is None or object is Null: return None try: return foreign_translate(object[item]) except (KeyError, IndexError): return None
480,589
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...
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] [TRUNCATE=1] [RANDOM_SEED=1]" print print " INPUT...
480,590
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...
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...
480,591
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...
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...
480,592
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...
def 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) parseInputArgs(): current_path = os.getcwd() print "Current Directory: %s" % current_path print "PROJECT_PATH: %s" % PROJECT_PATH print "...
480,593
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...
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...
480,594
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...
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...
480,595
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...
def evaluate(region, document, globs): try: old_compile = doctest.compile except AttributeError: old_compile = compile doctest.compile = monkey_compile result = manuel.doctest.DocTestResult() if region.parsed.group: test_name = region.parsed.group else: test_name = os.path.split(document.location)[1] exc_msg = None o...
480,596
def newlineify(s): if s[-1] != '\n': s += '\n' return s
def newlineify(s): if s == '' or s[-1] != '\n': s += '\n' return s
480,597
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)
def evaluate_with(self, m, globs): wrapped_globs = GlobWrapper(globs) for region in list(self): for evaluater in sort_handlers(m.evaluaters): evaluater(region, self, globs)
480,598
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)
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)
480,599