<commit_before>from __future__ import print_function, division, absolute_import

import numpy as np
import scipy.io.wavfile

import fnmatch, os

def wavread(filename):
    fs, x = scipy.io.wavfile.read(filename)
    if np.issubdtype(x.dtype, np.integer):
        x = x / np.iinfo(x.dtype).max
    return x, fs


def wavwrite(filename, s, fs):
    if s.dtype != np.int16:
        s = np.array(s * 2**15, dtype=np.int16)
    if np.any(abs(s) > 1.0):
        print('Warning: clipping detected when writing {}'.format(filename))
    scipy.io.wavfile.write(filename, fs, s)


def recursive_glob(treeroot, pattern):
    results = []<commit_msg>Fixed clipping warnings<commit_after>from __future__ import print_function, division, absolute_import

import numpy as np
import scipy.io.wavfile

import fnmatch, os, warnings

def wavread(filename):
    fs, x = scipy.io.wavfile.read(filename)
    if np.issubdtype(x.dtype, np.integer):
        x = x / np.iinfo(x.dtype).max
    return x, fs


def wavwrite(filename, s, fs):
    if s.dtype != np.int16:
        s = np.array(s * 2**15, dtype=np.int16)
    if np.any(s > np.iinfo(np.int16)) or np.any(s < np.iinfo(np.int16)):
        warnings.warn('Warning: clipping detected when writing {}'.format(filename))
    scipy.io.wavfile.write(filename, fs, s)


def recursive_glob(treeroot, pattern):
    results = []
{'fraction_non_alphanumeric': 0.13427299703264095, 'fraction_numerical': 0.01483679525222552, 'mean_word_length': 3.452145214521452, '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': '606752', 'n_tokens_mistral': 507, 'n_tokens_neox': 498, 'n_words': 118}