<commit_before>import scipy.io.wavfile as wav
import numpy
import warnings

def wavread(filename):
	with warnings.catch_warnings():
		warnings.simplefilter("ignore")
		fs,x = wav.read(filename)
	x = x.astype('float')
	maxv = numpy.max(numpy.abs(x),axis=0);
	x = x / maxv * 2
	x -= 1;
	return (fs,x,maxv)

def wavwrite(filename, fs, x, maxv=1):
	x /= numpy.max(numpy.abs(x),axis=0);
	x += 1;
	x *= maxv / 2;
	x = x.astype('int16')
	wav.write(filename, fs, x)<commit_msg>Quatschige maxv sache raus<commit_after>import scipy.io.wavfile as wav
import numpy
import warnings

def wavread(filename):
	with warnings.catch_warnings():
		warnings.simplefilter("ignore")
		fs,x = wav.read(filename)
	maxv = numpy.iinfo(x.dtype).max
	x = x.astype('float')
	x = x / maxv * 2
	x -= 1;
	return (fs,x)

def wavwrite(filename, fs, x):
	maxv = numpy.iinfo(numpy.int16).max
	x /= numpy.max(numpy.abs(x),axis=0);
	x += 1;
	x *= maxv / 2;
	x = x.astype('int16')
	wav.write(filename, fs, x)
{'fraction_non_alphanumeric': 0.1725206611570248, 'fraction_numerical': 0.01859504132231405, 'mean_word_length': 4.181818181818182, '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': '1226901', 'n_tokens_mistral': 439, 'n_tokens_neox': 423, 'n_words': 91}