<jupyter_start><jupyter_text>Generate video frames to train and test<jupyter_code>import numpy as np
import matplotlib.pyplot as plt
from scipy.ndimage.filters import gaussian_filter
%matplotlib inline

def generate_frames():
    width = 20
    height = 20
    gutter = 10

    frames = []

    for y in range(gutter+1, gutter+8, 2):
        for x in range(width+2*gutter):
            frame = np.zeros((width + 2 * gutter, height + 2 * gutter))
            frame[y:10+y, x:x+3] = 1
            frame=gaussian_filter(frame, 1)
            clipped = frame[gutter:-gutter, gutter:-gutter]
            frames.append(clipped)

    return frames<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.10298507462686567, 'fraction_numerical': 0.025373134328358207, 'mean_word_length': 2.9011627906976742, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '130157', 'license': 'MIT', 'n_tokens_mistral': 240, 'n_tokens_neox': 225, 'n_words': 57, 'path': 'Domain Quantization/05 - Simple video generator.ipynb', 'repo_name': 'amolk/AGI-experiments', 'size': '670'}