<commit_before>class CodeRunner

  # A module containing methods for submitting runs using the CodeRunner
  # launcher. Typically this would be used on a home Linux system or in
  # an interactive session on a supercomputer.
  module Launcher
    def launcher_prefix
		  ENV['CODE_RUNNER_LAUNCHER']
    end
    def use_launcher
      launcher_prefix and launcher_prefix.size > 0
    end
    def queue_status_launcher
			%x[cat #{ENV['HOME']}/.coderunner_to_launch_#{prefix}/queue_status.txt]  +
			%x[cat #{ENV['HOME']}/.coderunner_to_launch_#{prefix}/queue_status2.txt] 
    end 
    def execute_launcher
      launch_id = "#{Time.now.to_i}#{$$}"
      fname = ENV['HOME'] + "/.coderunner_to_launch_#{prefix}/#{launch_id}"
      File.open(fname + '.start', 'w'){|file| file.puts "cd #{Dir.pwd};#{run_command}"}
      sleep 1 until FileTest.exist? fname + '.pid'
      pid = File.read(fname + '.pid').to_i
      FileUtils.rm fname + '.pid'
      return pid
    end
    def cancel_job_launcher
      fname = ENV['HOME'] + "/.coderunner_to_launch_#{prefix}/#{$$}.stop"
      File.open(fname, 'w'){|file| file.puts "\n"}
    end
  end
end
<commit_msg>--Bugfix to launcher<commit_after>class CodeRunner

  # A module containing methods for submitting runs using the CodeRunner
  # launcher. Typically this would be used on a home Linux system or in
  # an interactive session on a supercomputer.
  module Launcher
    def launcher_prefix
		  ENV['CODE_RUNNER_LAUNCHER']
    end
    def use_launcher
      launcher_prefix and launcher_prefix.size > 0
    end
    def queue_status_launcher
			%x[cat #{ENV['HOME']}/.coderunner_to_launch_#{launcher_prefix}/queue_status.txt]  +
			%x[cat #{ENV['HOME']}/.coderunner_to_launch_#{launcher_prefix}/queue_status2.txt] 
    end 
    def execute_launcher
      launch_id = "#{Time.now.to_i}#{$$}"
      fname = ENV['HOME'] + "/.coderunner_to_launch_#{launcher_prefix}/#{launch_id}"
      File.open(fname + '.start', 'w'){|file| file.puts "cd #{Dir.pwd};#{run_command}"}
      sleep 1 until FileTest.exist? fname + '.pid'
      pid = File.read(fname + '.pid').to_i
      FileUtils.rm fname + '.pid'
      return pid
    end
    def cancel_job_launcher
      fname = ENV['HOME'] + "/.coderunner_to_launch_#{launcher_prefix}/#{$$}.stop"
      File.open(fname, 'w'){|file| file.puts "\n"}
    end
  end
end

{'fraction_non_alphanumeric': 0.13595553655408293, 'fraction_numerical': 0.0025651988029072254, 'mean_word_length': 3.3902439024390243, 'pattern_counts': {'":': 0, '<': 3, '<?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': '2753763', 'n_tokens_mistral': 875, 'n_tokens_neox': 835, 'n_words': 184}