<commit_before>export default audioContext => {
  const lengthInSeconds = 5;
  const buffer = audioContext.createBuffer(
    1,
    audioContext.sampleRate * lengthInSeconds,
    audioContext.sampleRate
  );
  const data = buffer.getChannelData(0);
  for (let i = data.length; i; i -= 1) data[i] = Math.random() * 2 - 1;

  const source = audioContext.createBufferSource();
  source.buffer = buffer;
  source.loop = true;
  source.start(0);
  return source;
};<commit_msg>Extract createNoiseBuffer()<commit_after>export default audioContext => {
  const source = audioContext.createBufferSource();
  source.buffer = createNoiseBuffer(audioContext);
  source.loop = true;
  source.start(0);
  return source;
};

const createNoiseBuffer = audioContext => {
  const lengthInSeconds = 5;
  const buffer = audioContext.createBuffer(
    1,
    audioContext.sampleRate * lengthInSeconds,
    audioContext.sampleRate
  );
  const data = buffer.getChannelData(0);
  for (let i = data.length; i; i -= 1) data[i] = Math.random() * 2 - 1;
  return buffer;
};
{'fraction_non_alphanumeric': 0.12129894937917861, 'fraction_numerical': 0.013371537726838587, 'mean_word_length': 4.06280193236715, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 6, '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': '4018840', 'n_tokens_mistral': 334, 'n_tokens_neox': 325, 'n_words': 80}