<commit_before>class AppDelegate
  attr_accessor :van_hoorden_sounds, :miller_and_heise_sounds, :window, :subject, :test_count, :doing_part_2, :time_of_test

  def application(application, didFinishLaunchingWithOptions:launchOptions)
    self.window = UIWindow.alloc.initWithFrame(UIScreen.mainScreen.bounds)
    start_experiment
  end

  def start_experiment
    self.time_of_test = Time.now.strftime("%Y%m%d_%H%M%S")

    self.test_count = 0
    self.doing_part_2 = false
    self.van_hoorden_sounds = NSFileManager.defaultManager.contentsOfDirectoryAtPath(NSBundle.mainBundle.resourcePath, error:nil).select {|file| file =~ /vn/}
    self.van_hoorden_sounds = self.van_hoorden_sounds + self.van_hoorden_sounds.dup
    self.van_hoorden_sounds.map! {|file| Tone.new(file)}
    NSLog "#{self.van_hoorden_sounds.size}"
    self.miller_and_heise_sounds = NSFileManager.defaultManager.contentsOfDirectoryAtPath(NSBundle.mainBundle.resourcePath, error:nil).select {|file| file =~ /mh/}
    self.miller_and_heise_sounds.map! {|file| Tone.new(file)}
    # NSLog "#{self.van_hoorden_sounds.size} #{self.miller_and_heise_sounds.size}"
    self.window.rootViewController = TestSubjectInfoController.new
    self.window.makeKeyAndVisible
    true
  end
end<commit_msg>Clean up code<commit_after>class AppDelegate
  attr_accessor :van_hoorden_sounds, :miller_and_heise_sounds, :window, :subject, :test_count, :doing_part_2, :time_of_test

  def application(application, didFinishLaunchingWithOptions:launchOptions)
    @window = UIWindow.alloc.initWithFrame(UIScreen.mainScreen.bounds)
    start_experiment
  end

  def start_experiment
    @time_of_test = Time.now.strftime("%Y%m%d_%H%M%S")

    @test_count = 0
    @doing_part_2 = false
    @van_hoorden_sounds = NSFileManager.defaultManager.contentsOfDirectoryAtPath(NSBundle.mainBundle.resourcePath, error:nil).select {|file| file =~ /vn/}
    @van_hoorden_sounds = @van_hoorden_sounds + @van_hoorden_sounds.dup
    @van_hoorden_sounds.map! {|file| Tone.new(file)}
    NSLog "#{@van_hoorden_sounds.size}"
    @miller_and_heise_sounds = NSFileManager.defaultManager.contentsOfDirectoryAtPath(NSBundle.mainBundle.resourcePath, error:nil).select {|file| file =~ /mh/}
    @miller_and_heise_sounds.map! {|file| Tone.new(file)}
    @window.rootViewController = TestSubjectInfoController.new
    @window.makeKeyAndVisible
    true
  end
end
{'fraction_non_alphanumeric': 0.1089608750525873, 'fraction_numerical': 0.002524190155658393, 'mean_word_length': 5.736543909348442, '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': '3174553', 'n_tokens_mistral': 866, 'n_tokens_neox': 841, 'n_words': 112}