Immutable sequence of |_Run| objects corresponding to the runs in
        this paragraph.
164802
def runs(self):
        
        return tuple(_Run(r, self) for r in self._element.r_lst)
1285052
def fastalite(handle):
    

    Seq = namedtuple('Seq', ['id', 'description', 'seq'])

    header, seq = '', []
    for line in handle:
        if line.startswith('>'):
            if header:
                yield Seq(header.split()[0], header, ''.join(seq))
            header, seq = line[1:].strip(), []
        else:
            seq.append(line.strip())

    if header and seq:
        yield Seq(header.split()[0], header, ''.join(seq))
404092
def run_all(scopes = {})
      UI.clear(force: true)
      UI.action_with_scopes("Run", scopes)
      Runner.new.run(:run_all, scopes)
    end
187406
def recursive_iter(enumerables):
    '''
    
    '''
    if not is_collection(enumerables) or isinstance(enumerables, (basestring, dict)):
        yield enumerables
    else:
        for elem in enumerables:
            for sub_elem in recursive_iter(elem):
                yield sub_elem
1290043
def _pre_run(self, pre_run=None):
        "  "
        if pre_run:
            pre_run()

        # Process registered "pre_run_callables" and clear list.
        for c in self.pre_run_callables:
            c()
        del self.pre_run_callables[:]
1051690
public static <X> Iterator<X> after(final Iterator<X> iterator, final Runnable f)
  {
    return new Iterator<X>()
    {
      private final Runnable fOnlyOnce = new RunOnlyOnce(f);

      @Override
      public boolean hasNext()
      {
        final boolean hasNext = iterator.hasNext();
        if (!hasNext) {
          fOnlyOnce.run();
        }
        return hasNext;
      }

      @Override
      public X next()
      {
        try {
          return iterator.next();
        }
        catch (NoSuchElementException e) {
          fOnlyOnce.run(); // (f exceptions are prohibited because they destroy e here)
          throw e;
        }
      }

      @Override
      public void remove()
      {
        iterator.remove();
      }
    };
  }
1140997
private Statements createSequencesStatements(Iterable<Sequence> sequences) {
		Statements statements = new Statements();
		for ( Sequence sequence : sequences ) {
			addSequence( statements, sequence );
		}
		return statements;
	}
375039
def wrap_threading_run(run_func):
    

    def call(self):
        execution_context.set_opencensus_full_context(
            *self._opencensus_context
        )
        return run_func(self)

    return call
560910
def get_next_rngruns(self):
        
        available_runs = [result['params']['RngRun'] for result in
                          self.get_results()]
        yield from DatabaseManager.get_next_values(available_runs)
496068
def as_list(x):
    ''''''
    
    if x is None:
        x = []
    elif not isinstance(x, Sequence):
        x = [x]
    return list(x)
1219878
def running_windows(iterable, size):
    
    fifo = collections.deque(maxlen=size)
    for i in iterable:
        fifo.append(i)
        if len(fifo) == size:
            yield list(fifo)
704348
def each_run(file)
      if file
        file = File.new(file)
        matrix = YAML.load(ERB.new(file.read).result)
        file.close

        matrix.each_with_index do |run, i|
          DEFAULT_RUN.merge(run)
          yield(run, i)
        end
      else
        yield(DEFAULT_RUN)
      end
    end
377134
def writeSequence(self, iterable):
        
        try:
            alias = self.context.getClassAlias(iterable.__class__)
        except (AttributeError, pyamf.UnknownClassAlias):
            self.writeList(iterable)

            return

        if alias.external:
            # a is a subclassed list with a registered alias - push to the
            # correct method
            self.writeObject(iterable)

            return

        self.writeList(iterable)
273170
def running_objects(self):
        """"""
        return [obj for obj in self.database_objects
                if obj.status in [obj.known_statuses.RUNNING]]
983725
def fake_run(self):
        ''''''
        clusters = {}
        used_names = set()
        seq_reader = pyfastaq.sequences.file_reader(self.infile)

        for seq in seq_reader:
            if seq.id in used_names:
                raise Error('Sequence name "' + seq.id + '" not unique. Cannot continue')

            clusters[str(len(clusters) + self.min_cluster_number)] = {seq.id}
            used_names.add(seq.id)

        return clusters
218786
def run(self, order=None):
    
    for event in self.runner.run(order=order):
      self.receive(event)
1039984
function runNext() {
	if (this.locked) return false;

    var item = this.queue[0];
    if (!item) return false;

    if (item.exclusive) {
        if (this.running) return false;
        this.locked = true;
    }

    this.queue.shift();

    this.running++;

	var self = this;
	item.fn.call(item.ctx).then(function(res) {
		runDone.call(self, item, true, res);
	}, function(err) {
		runDone.call(self, item, false, err);
	});

	return true;
}