<commit_before>import numpy as np

def scroll(clip, h=None, w=None, x_speed=0, y_speed=0,
           x_start=0, y_start=0, apply_to="mask"):
    """ Scrolls horizontally or vertically a clip, e.g. to make end
        credits """
    if h is None: h = clip.h
    if w is None: w = clip.w
    
    xmax = clip.w-w-1
    ymax = clip.h-h-1

    def f(gf,t):
        x = max(0, min(xmax, x_start+ np.round(x_speed*t)))
        y = max(0, min(ymax, y_start+ np.round(y_speed*t)))
        return gf(t)[y:y+h, x:x+w]
    
    return clip.fl(f, apply_to = apply_to)<commit_msg>Add int() wrapper to prevent floats<commit_after>import numpy as np

def scroll(clip, h=None, w=None, x_speed=0, y_speed=0,
           x_start=0, y_start=0, apply_to="mask"):
    """ Scrolls horizontally or vertically a clip, e.g. to make end
        credits """
    if h is None: h = clip.h
    if w is None: w = clip.w
    
    xmax = clip.w-w-1
    ymax = clip.h-h-1

    def f(gf,t):
        x = int(max(0, min(xmax, x_start+ np.round(x_speed*t))))
        y = int(max(0, min(ymax, y_start+ np.round(y_speed*t))))
        return gf(t)[y:y+h, x:x+w]
    
    return clip.fl(f, apply_to = apply_to)
{'fraction_non_alphanumeric': 0.1541095890410959, 'fraction_numerical': 0.0136986301369863, 'mean_word_length': 2.5210843373493974, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4481521', 'n_tokens_mistral': 490, 'n_tokens_neox': 479, 'n_words': 122}