Sequence setter.
350706
def nlmsg_seq(self, value):
        """"""
        self.bytearray[self._get_slicers(3)] = bytearray(c_uint32(value or 0))
945902
protected final <R extends Request<T>> R setSequence(int sequence) {
        checkIfActive();
        this.sequence = sequence;
        return (R) this;
    }
972203
function sequence ( map, components, results, missing, recursive, nest ) {
  components.forEach( component => {
    if ( results.indexOf( component ) !== -1 ) {
      return; // de-dup results
    }

    const deps = map.get( component );

    if ( ! deps ) {
      missing.push( component );
    } else if ( nest.indexOf( component ) > -1 ) {
      nest.push( component );
      recursive.push( nest.slice(0) );
      nest.pop( component );
    } else if ( deps.length ) {
      nest.push( component );
      sequence( map, deps, results, missing, recursive, nest ); // recurse
      nest.pop( component );
    }
    results.push( component );
  });
}
789791
def build(cls, seqs: Iterable[int], uid: bool = False) -> 'SequenceSet':
        
        seqs_list = sorted(set(seqs))
        groups: List[Union[int, Tuple[int, int]]] = []
        group: Union[int, Tuple[int, int]] = seqs_list[0]
        for i in range(1, len(seqs_list)):
            group_i = seqs_list[i]
            if isinstance(group, int):
                if group_i == group + 1:
                    group = (group, group_i)
                else:
                    groups.append(group)
                    group = group_i
            elif isinstance(group, tuple):
                if group_i == group[1] + 1:
                    group = (group[0], group_i)
                else:
                    groups.append(group)
                    group = group_i
        groups.append(group)
        return SequenceSet(groups, uid)
146192
def sequences(self):
        """"""
        lines = Lines()
        lines.add(0, '@cython.final')
        lines.add(0, 'cdef class Sequences(object):')
        for subseqs in self.model.sequences:
            lines.add(1, 'cdef public %s %s'
                         % (objecttools.classname(subseqs), subseqs.name))
        if getattr(self.model.sequences, 'states', None) is not None:
            lines.add(1, 'cdef public StateSequences old_states')
            lines.add(1, 'cdef public StateSequences new_states')
        for subseqs in self.model.sequences:
            print('        - %s' % subseqs.name)
            lines.add(0, '@cython.final')
            lines.add(0, 'cdef class %s(object):'
                         % objecttools.classname(subseqs))
            for seq in subseqs:
                ctype = 'double' + NDIM2STR[seq.NDIM]
                if isinstance(subseqs, sequencetools.LinkSequences):
                    if seq.NDIM == 0:
                        lines.add(1, 'cdef double *%s' % seq.name)
                    elif seq.NDIM == 1:
                        lines.add(1, 'cdef double **%s' % seq.name)
                        lines.add(1, 'cdef public int len_%s' % seq.name)
                else:
                    lines.add(1, 'cdef public %s %s' % (ctype, seq.name))
                lines.add(1, 'cdef public int _%s_ndim' % seq.name)
                lines.add(1, 'cdef public int _%s_length' % seq.name)
                for idx in range(seq.NDIM):
                    lines.add(1, 'cdef public int _%s_length_%d'
                                 % (seq.name, idx))
                if seq.NUMERIC:
                    ctype_numeric = 'double' + NDIM2STR[seq.NDIM+1]
                    lines.add(1, 'cdef public %s _%s_points'
                                 % (ctype_numeric, seq.name))
                    lines.add(1, 'cdef public %s _%s_results'
                                 % (ctype_numeric, seq.name))
                    if isinstance(subseqs, sequencetools.FluxSequences):
                        lines.add(1, 'cdef public %s _%s_integrals'
                                     % (ctype_numeric, seq.name))
                        lines.add(1, 'cdef public %s _%s_sum'
                                     % (ctype, seq.name))
                if isinstance(subseqs, sequencetools.IOSequences):
                    lines.extend(self.iosequence(seq))
            if isinstance(subseqs, sequencetools.InputSequences):
                lines.extend(self.load_data(subseqs))
            if isinstance(subseqs, sequencetools.IOSequences):
                lines.extend(self.open_files(subseqs))
                lines.extend(self.close_files(subseqs))
                if not isinstance(subseqs, sequencetools.InputSequence):
                    lines.extend(self.save_data(subseqs))
            if isinstance(subseqs, sequencetools.LinkSequences):
                lines.extend(self.set_pointer(subseqs))
        return lines
695753
private void setSequenceNumber() {
        if (LOG.isDebugEnabled()) {
            LOG.debug("Sequence id of the request is set to : {}", sequenceId);
        }
        inboundRequestMsg.setSequenceId(sequenceId);
        sequenceId++;
    }
809650
def sequence(arcs):
    """"""
    succ = {}
    for (i,j) in arcs:
        succ[i] = j
    curr = 1    # first node being visited
    sol = [curr]
    for i in range(len(arcs)-2):
        curr = succ[curr]
        sol.append(curr)
    return sol
165069
def from_sequence(cls, seq, order=None, **kwargs):
        """"""
        for arg in seq:
            yield cls(arg, order=order, **kwargs)
61602
def sequence_dir(self):
        """"""
        if self.root_dir:
            return op.join(self.protein_dir, 'sequences')
        else:
            log.debug('Root directory not set')
            return None
926220
def key(
        seq: Sequence,
        tooth: Callable[[Sequence], str] = (
            lambda seq: str(random.SystemRandom().choice(seq)).strip()
        ),
        nteeth: int = 6,
        delimiter: str = ' ',
) -> str:
    """"""
    return delimiter.join(tooth(seq) for _ in range(nteeth))
1079404
def chunk_sequence(sequence, chunk_length):
    """"""
    for index in range(0, len(sequence), chunk_length):
        yield sequence[index:index + chunk_length]
244709
def _run_sequence(self, sequence):
        '''
        
        '''
        self._check_pause()
        self._pre_test()
        session_data = self.target.get_session_data()
        self._test_info()
        resp = None
        for edge in sequence:
            if edge.callback:
                edge.callback(self, edge, resp)
            session_data = self.target.get_session_data()
            node = edge.dst
            node.set_session_data(session_data)
            resp = self._transmit(node)
        return self._post_test()
680293
public void updateSequenceElement(int[] sequence, int pos, int oldVal) {
    if(models != null){
      for(int i = 0; i < models.length; i++)
        models[i].updateSequenceElement(sequence, pos, oldVal);
      return; 
    }
    model1.updateSequenceElement(sequence, pos, 0);
    model2.updateSequenceElement(sequence, pos, 0);
  }
230181
def sequenceToWord(sequence):
    
    reberString = ''
    for i in xrange(len(sequence)):
        index = np.where(sequence[i]==1.)[0][0]
        reberString += chars[index]
    return reberString
588022
private void createSequencesConstraintsStatements(Statements statements, Iterable<Sequence> sequences) {
		Statement statement = createUniqueConstraintStatement( SEQUENCE_NAME_PROPERTY, NodeLabel.SEQUENCE.name() );
		statements.addStatement( statement );
	}
581753
public void setSequenceNumber(long value) {
        Preconditions.checkState(this.sequenceNumber < 0, "Sequence Number has been previously set for this entry. Cannot set a new one.");
        Exceptions.checkArgument(value >= 0, "value", "Sequence Number must be a non-negative number.");

        this.sequenceNumber = value;
    }
751811
def precursor_sequence(loci, reference):
    """"""
    region = "%s\t%s\t%s\t.\t.\t%s" % (loci[1], loci[2], loci[3], loci[4])
    precursor = pybedtools.BedTool(str(region), from_string=True).sequence(fi=reference, s=True)
    return open(precursor.seqfn).read().split("\n")[1]