Transformation for Sequence.drop_right
    :param n: number to drop from right
    :return: transformation
772413
def drop_right_t(n):
    
    if n <= 0:
        end_index = None
    else:
        end_index = -n
    return Transformation(
        'drop_right({0})'.format(n),
        lambda sequence: sequence[:end_index],
        None
    )
520801
function drop ($n = 1)
  {
    $this->pack ();
    $this->data = array_slice ($this->data, 0, -$n);
    return $this;
  }
878180
def apply_reverse(
        t: Union[List[List[float]], np.ndarray],
        pos: Tuple[float, float, float],
        with_offsets=True) -> Tuple[float, float, float]:
    
    return apply_transform(inv(t), pos)
1113394
def unrank(n, sequence=string.ascii_lowercase):
    
    return list(map(sequence.__getitem__, indexes(n)))
1020429
def _dict_merge_right(dict_left, dict_right, merge_method):
    """"""
    new_dict = deepcopy(dict_left)
    for key, value in dict_right.items():
        if key not in new_dict:
            new_dict[key] = value
        else:
            recurse = (merge_method == 'take_right_deep' and
                       isinstance(dict_left[key], dict) and
                       isinstance(dict_right[key], dict))
            if recurse:
                new_dict[key] = dict_merge(dict_left[key],
                                           dict_right[key],
                                           merge_method='take_right_deep')
            else:
                new_dict[key] = value
    return new_dict
424490
def get_left_right(seq):
    
    cseq = seq.strip(GAPS)
    leftjust = seq.index(cseq[0])
    rightjust = seq.rindex(cseq[-1])

    return leftjust, rightjust
115368
def generate_traj(self, N, start=None, stop=None, dt=1):
        
        from msmtools.generation import generate_traj
        return generate_traj(self._P, N, start=start, stop=stop, dt=dt)
1086286
def shift_right(self, times=1):
        
        try:
            return Location(self._rank, self._file + times)
        except IndexError as e:
            raise IndexError(e)
664933
def transform_from_rot_trans(R, t):
    """"""
    R = R.reshape(3, 3)
    t = t.reshape(3, 1)
    return np.vstack((np.hstack([R, t]), [0, 0, 0, 1]))
219536
def Shift(self, n):
    
    headn = tuple(Take(self, n))
    yield from self
    yield from headn
1047947
protected void shiftRight(int start, int end)
  {
    float prevVal = positions[start];
    long prevCnt = bins[start];

    for (int i = start + 1; i <= end; ++i) {
      float tmpVal = positions[i];
      long tmpCnt = bins[i];

      positions[i] = prevVal;
      bins[i] = prevCnt;

      prevVal = tmpVal;
      prevCnt = tmpCnt;
    }
  }
351094
def take(self, n):
        
        if n <= 0:
            return self._transform(transformations.take_t(0))
        else:
            return self._transform(transformations.take_t(n))
664698
private void moveAtFirst(int n_from) {
		int eT = elements[0];
		int eF = elements[n_from];
		positions[eT] = -1;
		positions[eF] = 0;
		elements[0] = eF;
		elements[n_from] = -1;
	}
940076
def shiftRight(col, numBits):
    
    sc = SparkContext._active_spark_context
    jc = sc._jvm.functions.shiftRight(_to_java_column(col), numBits)
    return Column(jc)
901439
@Override
    public ListT<W,T> takeRight(final int num) {

        return (ListT<W,T>) FoldableTransformerSeq.super.takeRight(num);
    }
228955
public static Slice rightTrim(Slice utf8, int[] whiteSpaceCodePoints)
    {
        int position = lastNonMatchPosition(utf8, 0, whiteSpaceCodePoints);
        return utf8.slice(0, position);
    }
1048584
public static Slice rightTrim(Slice utf8)
    {
        int position = lastNonWhitespacePosition(utf8, 0);
        return utf8.slice(0, position);
    }