Step forward in the subtitle list by <value> steps
 step backwards if <value> is negative
 can also set type to :backward or :forward and return postive <value>
772778
def sub_step(value, type = :next)
      val = value.abs
      type = :prev if value < 0
      command(type == :next ? "sub_step #{val}" : "sub_step #{-val}" )
    end
918335
def backward(self):
        
        if not self.filt:
            self.forward()
        self.smth = [self.filt[-1]]
        log_trans = np.log(self.hmm.trans_mat)
        ctg = np.zeros(self.hmm.dim)  # cost to go (log-lik of y_{t+1:T} given x_t=k)
        for filt, next_ft in reversed(list(zip(self.filt[:-1], 
                                               self.logft[1:]))):
            new_ctg = np.empty(self.hmm.dim)
            for k in range(self.hmm.dim):
                new_ctg[k] = rs.log_sum_exp(log_trans[k, :] + next_ft + ctg)
            ctg = new_ctg
            smth = rs.exp_and_normalise(np.log(filt) + ctg)
            self.smth.append(smth)
        self.smth.reverse()
1334584
def num_forward_until(self, condition):
        
        i, c = 0, ''
        while self.hasNext() and not condition(self.peek()):
            c += self.forward(1)
            i += 1
        assert self.backward(i) == c
        return i
43004
def rollforward(self, date):
        """"""
        if self.onOffset(date):
            return date
        else:
            return date + YearEnd(month=self.month)
1297537
def forward_word(event):
    
    buff = event.current_buffer
    pos = buff.document.find_next_word_ending(count=event.arg)

    if pos:
        buff.cursor_position += pos
1015354
def forward_backward(self, x):
        """"""
        (src_seq, tgt_seq, src_valid_length, tgt_valid_length), batch_size = x
        with mx.autograd.record():
            out, _ = self._model(src_seq, tgt_seq[:, :-1],
                                 src_valid_length, tgt_valid_length - 1)
            smoothed_label = self._label_smoothing(tgt_seq[:, 1:])
            ls = self._loss(out, smoothed_label, tgt_valid_length - 1).sum()
            ls = (ls * (tgt_seq.shape[1] - 1)) / batch_size / self._rescale_loss
        ls.backward()
        return ls
959222
def scroll_backward_vertically(self, steps=10, *args, **selectors):
        
        return self.device(**selectors).scroll.vert.backward(steps=steps)
601038
def move(x, y)
      (x < 0 ? backward(-x) : (x > 0 ? forward(x) : '')) +
      (y < 0 ? down(-y) : (y > 0 ? up(y) : ''))
    end
462330
def isSubtitle(self):
        
        val=False
        if self.__dict__['codec_type']:
            if str(self.codec_type)=='subtitle':
                val=True
        return val
693907
def backwards(self, backwards):
        """"""

        if self._backwards is not None:
            raise ValueError('Backwards action already specified.')

        self._backwards = backwards
        return backwards
155819
def forward(data, model, mlm_loss, nsp_loss, vocab_size, dtype):
    """"""
    (input_id, masked_id, masked_position, masked_weight, \
     next_sentence_label, segment_id, valid_length) = data
    num_masks = masked_weight.sum() + 1e-8
    valid_length = valid_length.reshape(-1)
    masked_id = masked_id.reshape(-1)
    valid_length_typed = valid_length.astype(dtype, copy=False)
    _, _, classified, decoded = model(input_id, segment_id, valid_length_typed,
                                      masked_position)
    decoded = decoded.reshape((-1, vocab_size))
    ls1 = mlm_loss(decoded.astype('float32', copy=False),
                   masked_id, masked_weight.reshape((-1, 1)))
    ls2 = nsp_loss(classified.astype('float32', copy=False), next_sentence_label)
    ls1 = ls1.sum() / num_masks
    ls2 = ls2.mean()
    ls = ls1 + ls2
    return ls, next_sentence_label, classified, masked_id, decoded, \
           masked_weight, ls1, ls2, valid_length.astype('float32', copy=False)
899536
def forwards(self, orm):
        ""
        for doc in orm['document_library.Document'].objects.all():
            for title in doc.documenttitle_set.all():
                title.is_published = doc.is_published
                title.save()
572519
def decrease_step(self) -> str:
        
        if self._steps_index > 0:
            self._steps_index = self._steps_index - 1
        return 'step: {}'.format(self.current_step())
432032
@Override
    public int searchBackwards(String searchTerm, int startIndex, boolean startsWith)
    {
        ListIterator<jline.console.history.History.Entry> it = this.getHistory().entries(startIndex);
        while (it.hasPrevious()) {
            jline.console.history.History.Entry e = it.previous();
            String itemNormalized = e.value().toString().toLowerCase();
            String termNormalized = searchTerm.toLowerCase();
            if (startsWith) {
                if (itemNormalized.startsWith(termNormalized)) {
                    return e.index();
                }
            }
            else {
                if (itemNormalized.contains(termNormalized)) {
                    return e.index();
                }
            }
        }
        return -1;
    }
439462
def p_next(self):
        ""
        try:
            self.pos += 1
            return self.input[self.pos - 1]
        except IndexError:
            self.pos -= 1
            return None
16761
def _forward_word(text, pos):
    
    while pos < len(text) and not text[pos].isalnum():
        pos += 1
    while pos < len(text) and text[pos].isalnum():
        pos += 1
    return text, pos
1234108
static boolean topicSkipBackward(char[] chars, int[] cursor) {
    if (cursor[0] == cursor[1])
      return false;
    while (cursor[0] < cursor[1] && 
        chars[cursor[1]-1] != MatchSpace.SUBTOPIC_SEPARATOR_CHAR)
      cursor[1]--;
    return true;      
  }