<commit_before>require "alexandria/version"
require "alexandria/config"
require "alexandria/command"
require "alexandria/user"

require "erb"

module Alexandria
  def self.run
    config = Alexandria::Config.new

    if ARGV[0] == "ssh"
      user = Alexandria::User.new(ARGV[1])
      command = Alexandria::Command.new(ENV['SSH_ORIGINAL_COMMAND'])
      command.run(config, user)
    elsif ARGV[0] == "write_keys"
      puts "Generating authorized keys..."
      key_data = User.generate_keys
      File.open(config.key_file, "w") {|f| f.write(key_data) }
      puts "Authorized keys written to: #{config.key_file}"<commit_msg>Create the dir<commit_after>require "alexandria/version"
require "alexandria/config"
require "alexandria/command"
require "alexandria/user"

require "erb"
require "fileutils"

module Alexandria
  def self.run
    config = Alexandria::Config.new

    if ARGV[0] == "ssh"
      user = Alexandria::User.new(ARGV[1])
      command = Alexandria::Command.new(ENV['SSH_ORIGINAL_COMMAND'])
      command.run(config, user)
    elsif ARGV[0] == "write_keys"
      puts "Generating authorized keys..."
      key_data = User.generate_keys
      FileUtils.mkdir_p File.dirname(config.key_file)
      File.open(config.key_file, "w") {|f| f.write(key_data) }
      puts "Authorized keys written to: #{config.key_file}"
{'fraction_non_alphanumeric': 0.13148009015777612, 'fraction_numerical': 0.004507888805409466, 'mean_word_length': 3.970149253731343, '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': '6371157', 'n_tokens_mistral': 468, 'n_tokens_neox': 448, 'n_words': 93}