<commit_before>#!/usr/bin/env ruby

require 'bundler'
Bundler.require

NOTE_MAP = {
  0 => ' ',
  1 => 'a',
  2 => 'b',
  3 => 'c',
  4 => 'd',
  5 => 'e',
  6 => 'f',
  7 => 'g'
}

bleep = Bloops.new
bleep.tempo = 120
instrument = bleep.sound Bloops::SINE

File.open ARGV[0] do |handle|
  handle.gets # skip header
  handle.each do |line|
    counts = line.strip.split(',')[1..-1].map(&:to_i)

    song = counts.map { |x| NOTE_MAP[x] }.join(' ')

    bleep.tune instrument, song
    bleep.play

    sleep 1 while !bleep.stopped?
  end
end<commit_msg>print lines<commit_after>#!/usr/bin/env ruby

require 'bundler'
Bundler.require

NOTE_MAP = {
  0 => ' ',
  1 => 'a',
  2 => 'b',
  3 => 'c',
  4 => 'd',
  5 => 'e',
  6 => 'f',
  7 => 'g'
}

bleep = Bloops.new
bleep.tempo = 120
instrument = bleep.sound Bloops::SINE

File.open ARGV[0] do |handle|
  handle.gets # skip header
  handle.each do |line|
    counts = line.strip.split(',')[1..-1].map(&:to_i)

    song = counts.map { |x| NOTE_MAP[x] }.join(' ')

    bleep.tune instrument, song
    bleep.play

    print line

    sleep 1 while !bleep.stopped?
  end
end
{'fraction_non_alphanumeric': 0.1935483870967742, 'fraction_numerical': 0.026881720430107527, 'mean_word_length': 2.7357859531772575, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 19, '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': '6549165', 'n_tokens_mistral': 497, 'n_tokens_neox': 479, 'n_words': 112}