<commit_before>import pyglitch.core as pgc
import numpy as np
import math

def reverb(I, delay_pixels, decay = 0.5):

    x = pgc.to_1d_array(I)
    for i in range(0, len(x) - delay_pixels-1):
        # WARNING: overflow potential
        # x[i + delay_pixels] += (x[i] * decay).astype(np.uint8)
        x[i + delay_pixels] += (x[i] * decay)
    I = np.reshape(x, I.shape)
    return I.astype(np.uint8)


def wah_wah(I, damp=0.05, minf=500, maxf=5000, Fw=2000, Fs=44100):
    """wah-wah filter<commit_msg>added assert to reverb function to check that the parameter delay_pixels >0. TODO: handle case when delay_pixels < 0 reversing for loop<commit_after>import pyglitch.core as pgc
import numpy as np
import math

def reverb(I, delay_pixels, decay = 0.5):
    assert delay_pixels > 0, "delay_pixels must be positive integer"
    x = pgc.to_1d_array(I)
    for i in range(0, len(x) - delay_pixels-1):
        # WARNING: overflow potential
        # x[i + delay_pixels] += (x[i] * decay).astype(np.uint8)
        x[i + delay_pixels] += (x[i] * decay)
    I = np.reshape(x, I.shape)
    return I.astype(np.uint8)


def wah_wah(I, damp=0.05, minf=500, maxf=5000, Fw=2000, Fs=44100):
    """wah-wah filter
{'fraction_non_alphanumeric': 0.13666666666666666, 'fraction_numerical': 0.04583333333333333, 'mean_word_length': 3.367272727272727, 'pattern_counts': {'":': 0, '<': 4, '<?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}}
{'dir': 'git-commits-cleaned', 'id': '6155741', 'n_tokens_mistral': 510, 'n_tokens_neox': 477, 'n_words': 123}