<commit_before>#!/usr/bin/ruby
require "rubygems"
require "bundler/setup"
require 'apple-dev'

def ensure_file_specified_and_exists(name, file)
  raise OptionParser::MissingArgument, name if file.nil?
  raise OptionParser::InvalidArgument, "'#{file}' #{name} file doesn't exists" if not File.exists?(file)
end

def parse_command_line(args)
  options = {}

  opts = OptionParser.new { |opts|
    opts.banner = "Usage: #{File.basename($0)} profileFile options"
    opts.separator("Options:")
    
    opts.on( '-d', '--dump [KEY]', 'Dump a particular KEY or the full XML.') do |key|
      options[:dump] = true
      options[:dumpKey] = key
    end
    opts.on( '-t', '--type', 'Prints the type of the profile (distribution or development).') do |key|
      options[:type] = true
    end<commit_msg>missing requires<commit_after>#!/usr/bin/ruby
require "rubygems"
require "bundler/setup"
require 'optparse'
require 'yaml'
require 'apple-dev'

def ensure_file_specified_and_exists(name, file)
  raise OptionParser::MissingArgument, name if file.nil?
  raise OptionParser::InvalidArgument, "'#{file}' #{name} file doesn't exists" if not File.exists?(file)
end

def parse_command_line(args)
  options = {}

  opts = OptionParser.new { |opts|
    opts.banner = "Usage: #{File.basename($0)} profileFile options"
    opts.separator("Options:")
    
    opts.on( '-d', '--dump [KEY]', 'Dump a particular KEY or the full XML.') do |key|
      options[:dump] = true
      options[:dumpKey] = key
    end
    opts.on( '-t', '--type', 'Prints the type of the profile (distribution or development).') do |key|
      options[:type] = true
    end
{'fraction_non_alphanumeric': 0.1496014714898835, 'fraction_numerical': 0.001226241569589209, 'mean_word_length': 4.006134969325154, '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': '2851048', 'n_tokens_mistral': 537, 'n_tokens_neox': 524, 'n_words': 152}